@linker-design-plus/tiny-peony 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/foundation/contentManager/contentManager.d.ts +5 -0
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +409 -396
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var GE = Object.defineProperty;
|
|
2
2
|
var kE = (C, e, Q) => e in C ? GE(C, e, { enumerable: !0, configurable: !0, writable: !0, value: Q }) : C[e] = Q;
|
|
3
3
|
var X = (C, e, Q) => kE(C, typeof e != "symbol" ? e + "" : e, Q);
|
|
4
|
-
import { getCurrentScope as LE, onScopeDispose as UE, isRef as SE, ref as cA, toValue as Dg, readonly as ME, watch as oI, computed as FA, shallowRef as VC, getCurrentInstance as CB, onMounted as Mg, toRaw as pE, defineComponent as MA, withDirectives as iI, openBlock as iA, createElementBlock as nA, normalizeClass as RA, unref as sA, withModifiers as BC, Fragment as $A, renderList as BB, createElementVNode as QA, toDisplayString as Ug, vShow as nI, createVNode as y, render as QC, createBlock as JE, withCtx as Cg, createTextVNode as
|
|
4
|
+
import { getCurrentScope as LE, onScopeDispose as UE, isRef as SE, ref as cA, toValue as Dg, readonly as ME, watch as oI, computed as FA, shallowRef as VC, getCurrentInstance as CB, onMounted as Mg, toRaw as pE, defineComponent as MA, withDirectives as iI, openBlock as iA, createElementBlock as nA, normalizeClass as RA, unref as sA, withModifiers as BC, Fragment as $A, renderList as BB, createElementVNode as QA, toDisplayString as Ug, vShow as nI, createVNode as y, render as QC, createBlock as JE, withCtx as Cg, createTextVNode as LA, inject as Ag, normalizeStyle as yg, h as CI, nextTick as YE, resolveComponent as YA, mergeProps as rI, onBeforeUnmount as QB, reactive as HE, toRefs as mE, onUnmounted as EB, provide as eB, Teleport as KE } from "vue";
|
|
5
5
|
import { Message as Sg, Row as qE, Col as BI, Input as OC, Space as vE, Button as ZI, Modal as XC, Tooltip as xE } from "@arco-design/web-vue";
|
|
6
6
|
var tB = (C) => Object.prototype.toString.call(C), bE = (C) => tB(C) === "[object Null]", TE = (C) => tB(C) === "[object Number]", _I = (C, e) => e ? typeof e == "string" ? ` ${C}--${e}` : Array.isArray(e) ? e.reduce((Q, o) => Q + _I(C, o), "") : Object.keys(e).reduce((Q, o) => Q + (e[o] ? _I(C, o) : ""), "") : "", PE = (C) => (e, Q) => (e && typeof e != "string" && (Q = e, e = ""), e = e ? `${C}__${e}` : C, `${e}${_I(e, Q)}`), oB = (C) => (e) => {
|
|
7
7
|
const Q = `${C}-${e}`;
|
|
@@ -38,10 +38,10 @@ const Ae = (C, e) => {
|
|
|
38
38
|
e.preventDefault();
|
|
39
39
|
const Q = ((u = e.data) == null ? void 0 : u.length) ?? 0, o = C.content.calcTextCount() - Q, i = C.maxLength - o;
|
|
40
40
|
if (i >= Q || !Q) return;
|
|
41
|
-
const s = i <= 0 ? Q : Q - i,
|
|
42
|
-
if (v(
|
|
41
|
+
const s = i <= 0 ? Q : Q - i, r = window.getSelection(), n = r == null ? void 0 : r.getRangeAt(0);
|
|
42
|
+
if (v(r) || v(n)) return;
|
|
43
43
|
const { endContainer: w, endOffset: h } = n, D = document.createRange();
|
|
44
|
-
D.setStart(w, h - s), D.setEnd(w, h), D.deleteContents(),
|
|
44
|
+
D.setStart(w, h - s), D.setEnd(w, h), D.deleteContents(), r.removeAllRanges(), r.addRange(D);
|
|
45
45
|
}, ge = (C, e) => {
|
|
46
46
|
const { inputType: Q } = e;
|
|
47
47
|
C.content.calcTextCount() >= C.maxLength && Q.includes("insert") && Q !== "insertParagraph" && e.preventDefault();
|
|
@@ -89,10 +89,10 @@ class Ie extends XE {
|
|
|
89
89
|
// 增加内容(增量)
|
|
90
90
|
appendContent(Q, o) {
|
|
91
91
|
var n;
|
|
92
|
-
const i = EC(this._editor, nB(Q) ? Q : [Q]), s = this.getParas()[0],
|
|
93
|
-
|
|
92
|
+
const i = EC(this._editor, nB(Q) ? Q : [Q]), s = this.getParas()[0], r = (n = s.textContent) != null && n.length ? void 0 : i.shift();
|
|
93
|
+
r && (s.innerHTML = r, o == null || o(s)), i.forEach((w) => {
|
|
94
94
|
const h = document.createElement("p");
|
|
95
|
-
h.innerHTML = w, h.classList.add(
|
|
95
|
+
h.innerHTML = w, h.classList.add(UA), this._editorElement.appendChild(h), o == null || o(h);
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
// 增加内容
|
|
@@ -110,23 +110,23 @@ class Ie extends XE {
|
|
|
110
110
|
// 获取段落节点
|
|
111
111
|
getParas() {
|
|
112
112
|
return Array.from(
|
|
113
|
-
this._editorElement.querySelectorAll(`.${
|
|
113
|
+
this._editorElement.querySelectorAll(`.${UA}`)
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
116
|
// 获取纯文本内容(段落划分)
|
|
117
117
|
getTextContent() {
|
|
118
118
|
const Q = this.getParas(), o = (i) => {
|
|
119
119
|
const s = Array.from(i.childNodes);
|
|
120
|
-
let
|
|
120
|
+
let r = "";
|
|
121
121
|
for (let n = 0; n < s.length; n++) {
|
|
122
122
|
const w = s[n];
|
|
123
|
-
yA(w) ?
|
|
123
|
+
yA(w) ? r += w.textContent ?? "" : oA(w) && (r += // 主播标签需要递归处理
|
|
124
124
|
q.anchor === w.dataset.type ? o(w) : (
|
|
125
125
|
// 读音替换标签,需要使用替换后文本
|
|
126
126
|
q.pronunciation === w.dataset.type ? w.dataset.value : w.dataset.raw ?? ""
|
|
127
127
|
));
|
|
128
128
|
}
|
|
129
|
-
return
|
|
129
|
+
return r;
|
|
130
130
|
};
|
|
131
131
|
return Q.map(o);
|
|
132
132
|
}
|
|
@@ -135,19 +135,15 @@ class Ie extends XE {
|
|
|
135
135
|
if (v(o) || !o.rangeCount || v(i)) return;
|
|
136
136
|
const s = document.createDocumentFragment();
|
|
137
137
|
if (iB(Q)) {
|
|
138
|
-
const
|
|
139
|
-
for (
|
|
140
|
-
s.appendChild(
|
|
138
|
+
const h = document.createElement("div");
|
|
139
|
+
for (h.innerHTML = Q; h.firstChild; )
|
|
140
|
+
s.appendChild(h.firstChild);
|
|
141
141
|
} else
|
|
142
142
|
s.appendChild(Q);
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
} else
|
|
148
|
-
i.insertNode(s);
|
|
149
|
-
const n = document.createRange();
|
|
150
|
-
n.setStartAfter(a), n.setEndAfter(a), o.removeAllRanges(), o.addRange(n);
|
|
143
|
+
const r = s.lastChild;
|
|
144
|
+
(this._calcRange(i) ?? i).insertNode(s);
|
|
145
|
+
const w = document.createRange();
|
|
146
|
+
w.setStartAfter(r), w.setEndAfter(r), o.removeAllRanges(), o.addRange(w);
|
|
151
147
|
}
|
|
152
148
|
_delete() {
|
|
153
149
|
const { range: Q } = this._editor.cursor;
|
|
@@ -156,6 +152,23 @@ class Ie extends XE {
|
|
|
156
152
|
_update(Q) {
|
|
157
153
|
this._delete(), this._insert(Q);
|
|
158
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* 将 fragment 插入到 range 所在 contenteditable 的上一个 <p> 元素末尾
|
|
157
|
+
* @param {Range} range - 当前的 Range 对象
|
|
158
|
+
*/
|
|
159
|
+
_calcRange(Q) {
|
|
160
|
+
const o = Q.commonAncestorContainer;
|
|
161
|
+
if (o.tagName !== "DIV")
|
|
162
|
+
return Q;
|
|
163
|
+
const i = Q.startOffset, s = Array.from(o.children).filter((w) => w.tagName === "P");
|
|
164
|
+
if (i <= 0 || i - 1 >= s.length)
|
|
165
|
+
return console.warn("上一个 <p> 不存在"), Q;
|
|
166
|
+
const r = s[i - 1];
|
|
167
|
+
if (!r)
|
|
168
|
+
return console.warn("未找到上一个 <p>"), Q;
|
|
169
|
+
const n = document.createRange();
|
|
170
|
+
return n.selectNodeContents(r), n.collapse(!1), n;
|
|
171
|
+
}
|
|
159
172
|
}
|
|
160
173
|
class Ce extends zE {
|
|
161
174
|
constructor(Q) {
|
|
@@ -223,8 +236,8 @@ class Be extends ZE {
|
|
|
223
236
|
const o = [];
|
|
224
237
|
let i = Q;
|
|
225
238
|
for (; i && i.parentElement; ) {
|
|
226
|
-
const
|
|
227
|
-
if (o.unshift({ index:
|
|
239
|
+
const r = Array.from(i.parentElement.childNodes).indexOf(i);
|
|
240
|
+
if (o.unshift({ index: r }), oA(i) && i.tagName === "P" && i.classList.contains(UA))
|
|
228
241
|
break;
|
|
229
242
|
i = i.parentElement;
|
|
230
243
|
}
|
|
@@ -232,10 +245,10 @@ class Be extends ZE {
|
|
|
232
245
|
}
|
|
233
246
|
_record() {
|
|
234
247
|
var D;
|
|
235
|
-
const Q = this._editor.cursor.range, o = this._editor.content.getParas(), i = _A(Q.startContainer), s = o.indexOf(i),
|
|
248
|
+
const Q = this._editor.cursor.range, o = this._editor.content.getParas(), i = _A(Q.startContainer), s = o.indexOf(i), r = this._calcNodePathMatches(Q.startContainer), n = _A(Q.endContainer), w = o.indexOf(n), h = this._calcNodePathMatches(Q.endContainer);
|
|
236
249
|
return {
|
|
237
250
|
startParaIndex: s,
|
|
238
|
-
startMatchedIndexes:
|
|
251
|
+
startMatchedIndexes: r,
|
|
239
252
|
startOffset: Q.startOffset,
|
|
240
253
|
endParaIndex: w,
|
|
241
254
|
endMatchedIndexes: h,
|
|
@@ -268,8 +281,8 @@ class Be extends ZE {
|
|
|
268
281
|
D = w[f].index;
|
|
269
282
|
}
|
|
270
283
|
return u;
|
|
271
|
-
}, s = i(Q.startMatchedIndexes),
|
|
272
|
-
n.setStart(s, Q.startOffset), n.setEnd(
|
|
284
|
+
}, s = i(Q.startMatchedIndexes), r = i(Q.endMatchedIndexes), n = document.createRange();
|
|
285
|
+
n.setStart(s, Q.startOffset), n.setEnd(r, Q.endOffset), o.removeAllRanges(), o.addRange(n);
|
|
273
286
|
}
|
|
274
287
|
}
|
|
275
288
|
const GA = [];
|
|
@@ -311,7 +324,7 @@ const EI = (C, e) => {
|
|
|
311
324
|
data: "Hello"
|
|
312
325
|
});
|
|
313
326
|
C.element.dispatchEvent(Q);
|
|
314
|
-
const { range: o } = C.cursor, i = e[0], s = e[e.length - 1],
|
|
327
|
+
const { range: o } = C.cursor, i = e[0], s = e[e.length - 1], r = e.slice(1, -1);
|
|
315
328
|
let n = o;
|
|
316
329
|
if (!i || !n) return;
|
|
317
330
|
let w = null, h = 0, D = null;
|
|
@@ -330,7 +343,7 @@ const EI = (C, e) => {
|
|
|
330
343
|
n = window.getSelection().getRangeAt(0), n = yA(n.commonAncestorContainer) && n.commonAncestorContainer.textContent === "粘贴文本" ? o : n;
|
|
331
344
|
const [f] = SA(
|
|
332
345
|
n.commonAncestorContainer,
|
|
333
|
-
(T) => T.tagName === "P" && T.classList.contains(
|
|
346
|
+
(T) => T.tagName === "P" && T.classList.contains(UA)
|
|
334
347
|
), [R] = SA(n.startContainer, (T) => T.tagName === "SPAN" && T.dataset.type === q.anchor), G = document.createRange(), U = !!R;
|
|
335
348
|
G.setStart(n.startContainer, n.startOffset), G.setEndAfter(f.lastChild);
|
|
336
349
|
const L = G.extractContents();
|
|
@@ -348,16 +361,16 @@ const EI = (C, e) => {
|
|
|
348
361
|
U ? f.lastChild : f
|
|
349
362
|
);
|
|
350
363
|
let { nextSibling: J } = f;
|
|
351
|
-
if (
|
|
364
|
+
if (r.forEach((T) => {
|
|
352
365
|
var lA;
|
|
353
366
|
const $ = document.createElement("p");
|
|
354
|
-
if ($.classList.add(
|
|
367
|
+
if ($.classList.add(UA), $.textContent = T, (lA = f == null ? void 0 : f.parentNode) == null || lA.insertBefore($, J), J = $.nextSibling, EI(C, $), U) {
|
|
355
368
|
const V = R.cloneNode(!1);
|
|
356
369
|
V.innerHTML = $.innerHTML, $.innerHTML = V.outerHTML;
|
|
357
370
|
}
|
|
358
371
|
}), !s) return;
|
|
359
372
|
const M = document.createElement("p");
|
|
360
|
-
if (M.classList.add(
|
|
373
|
+
if (M.classList.add(UA), M.appendChild(L), !M.textContent)
|
|
361
374
|
M.innerHTML = s;
|
|
362
375
|
else if (yA(M.firstChild))
|
|
363
376
|
M.firstChild.textContent = s + M.firstChild.textContent;
|
|
@@ -370,7 +383,7 @@ const EI = (C, e) => {
|
|
|
370
383
|
var $;
|
|
371
384
|
return !(($ = M.textContent) != null && $.trim().endsWith(`停顿: ${T}S`));
|
|
372
385
|
}) && EI(C, M);
|
|
373
|
-
}, [oe] = vA("paragraph"),
|
|
386
|
+
}, [oe] = vA("paragraph"), UA = oe(), ie = `<p class="${UA}"><br /></p>`;
|
|
374
387
|
class ne extends OE {
|
|
375
388
|
constructor(Q, o) {
|
|
376
389
|
super();
|
|
@@ -385,8 +398,8 @@ class ne extends OE {
|
|
|
385
398
|
X(this, "maxLength");
|
|
386
399
|
X(this, "plugin");
|
|
387
400
|
this._uid = rB(), this._editorElement = Q, this.content = new Ie(Q, this), this.cursor = new Ce(Q), this.undo = new Be(this, this.content, o == null ? void 0 : o.onUndoChange), this.command = new $E(this.content, this.cursor), this.maxLength = (o == null ? void 0 : o.maxLength) ?? 1e4, this.plugin = ((o == null ? void 0 : o.plugins) ?? []).reduce((i, s) => {
|
|
388
|
-
const
|
|
389
|
-
return i[n] =
|
|
401
|
+
const r = new s(this), n = r.prefix;
|
|
402
|
+
return i[n] = r, i;
|
|
390
403
|
}, {}), this._onchange = o == null ? void 0 : o.onChange, this._handleBackspace = this._handleBackspace.bind(this), this._handlePaste = this._handlePaste.bind(this), this._handleBeforeInput = this._handleBeforeInput.bind(this), this._handleCompositionEnd = this._handleCompositionEnd.bind(this), this._setup();
|
|
391
404
|
}
|
|
392
405
|
destroy() {
|
|
@@ -410,21 +423,21 @@ class ne extends OE {
|
|
|
410
423
|
if (Q.removedNodes.length) {
|
|
411
424
|
const i = Q.removedNodes[0];
|
|
412
425
|
if (oA(i) && i.dataset.type === q.highlight) {
|
|
413
|
-
const s = window.getSelection(), { range:
|
|
414
|
-
if (v(
|
|
426
|
+
const s = window.getSelection(), { range: r } = this.cursor;
|
|
427
|
+
if (v(r) || v(s)) return;
|
|
415
428
|
const n = document.createTextNode(""), w = document.createRange();
|
|
416
|
-
|
|
429
|
+
r.insertNode(n), w.setStartAfter(n), w.setEndAfter(n), s.removeAllRanges(), s.addRange(w);
|
|
417
430
|
}
|
|
418
431
|
}
|
|
419
432
|
Q.addedNodes.forEach((i) => {
|
|
420
|
-
oA(i) && i.tagName === "P" && !i.classList.contains(
|
|
433
|
+
oA(i) && i.tagName === "P" && !i.classList.contains(UA) && i.classList.add(UA);
|
|
421
434
|
}), Q.removedNodes.length && !this.content.getParas().length && this.content.insertEmptyPara(), (o = this._onchange) == null || o.call(this, this.content.calcTextCount()), Array.from(document.querySelectorAll("p span")).forEach((i) => {
|
|
422
435
|
var D;
|
|
423
|
-
const s = i.parentNode,
|
|
436
|
+
const s = i.parentNode, r = i.firstChild, n = i && i.style.textIndent === "20px" && i.style.fontSize && i.style.color, w = i && i.style.backgroundColor && ((D = i.parentElement) == null ? void 0 : D.style.textIndent) === "0px", h = i && Array.from(i.childNodes).every((u) => yA(u) && !u.textContent || oA(u) && u.tagName === "BR");
|
|
424
437
|
if (n || w) {
|
|
425
438
|
for (; i.firstChild; )
|
|
426
439
|
s == null || s.insertBefore(i.firstChild, i);
|
|
427
|
-
s == null || s.removeChild(i), jA(
|
|
440
|
+
s == null || s.removeChild(i), jA(r);
|
|
428
441
|
}
|
|
429
442
|
if (h && (s == null || s.removeChild(i)), w) {
|
|
430
443
|
s.removeAttribute("style");
|
|
@@ -432,8 +445,8 @@ class ne extends OE {
|
|
|
432
445
|
R.setStartAfter(R.startContainer), R.setEndAfter(R.endContainer), u == null || u.removeAllRanges(), u == null || u.addRange(R);
|
|
433
446
|
}
|
|
434
447
|
}), this.content.getParas().forEach((i) => {
|
|
435
|
-
const s = i.firstChild,
|
|
436
|
-
i.childNodes.length > 1 && (oA(
|
|
448
|
+
const s = i.firstChild, r = i.lastChild;
|
|
449
|
+
i.childNodes.length > 1 && (oA(r) && r.tagName === "BR" && r.remove(), oA(s) && s.tagName === "BR" && s.remove()), (i.childNodes.length === 0 || i.childNodes.length === 1 && yA(i.childNodes[0]) && i.childNodes[0].textContent === "") && i.remove();
|
|
437
450
|
});
|
|
438
451
|
}), this._observer.observe(this._editorElement, {
|
|
439
452
|
childList: !0,
|
|
@@ -450,7 +463,7 @@ class ne extends OE {
|
|
|
450
463
|
var s;
|
|
451
464
|
const o = window.getSelection(), i = o.getRangeAt(0);
|
|
452
465
|
if (Q.key === "Backspace" && i.startOffset === 0 && i.collapsed) {
|
|
453
|
-
const [
|
|
466
|
+
const [r] = SA(i.startContainer, (w) => w.tagName === "P" && w.classList.contains(UA)), n = r == null ? void 0 : r.previousElementSibling;
|
|
454
467
|
if (n) {
|
|
455
468
|
Q.preventDefault();
|
|
456
469
|
const w = n.childNodes, h = n.childNodes[0];
|
|
@@ -462,50 +475,50 @@ class ne extends OE {
|
|
|
462
475
|
) {
|
|
463
476
|
n.remove();
|
|
464
477
|
const D = document.createRange();
|
|
465
|
-
D.setStartBefore(
|
|
478
|
+
D.setStartBefore(r.firstChild), D.setEndBefore(r.firstChild), o.removeAllRanges(), o.addRange(D);
|
|
466
479
|
} else {
|
|
467
480
|
const D = document.createRange();
|
|
468
481
|
D.selectNodeContents(n), D.collapse(!1), o.removeAllRanges(), o.addRange(D);
|
|
469
|
-
const u = document.createDocumentFragment(), f =
|
|
470
|
-
for (;
|
|
471
|
-
u.appendChild(
|
|
472
|
-
D.insertNode(u),
|
|
482
|
+
const u = document.createDocumentFragment(), f = r.firstChild;
|
|
483
|
+
for (; r.firstChild; )
|
|
484
|
+
u.appendChild(r.firstChild);
|
|
485
|
+
D.insertNode(u), r.remove();
|
|
473
486
|
const R = document.createRange();
|
|
474
487
|
R.setStartBefore(f), R.setEndBefore(f), o.removeAllRanges(), o.addRange(R);
|
|
475
488
|
}
|
|
476
489
|
}
|
|
477
490
|
}
|
|
478
491
|
if (Q.key === "Delete" && ae()) {
|
|
479
|
-
const
|
|
480
|
-
if (v(
|
|
492
|
+
const r = getSelection(), n = (s = getSelection()) == null ? void 0 : s.getRangeAt(0);
|
|
493
|
+
if (v(r) || v(n)) return;
|
|
481
494
|
const w = _A(n.endContainer), h = w == null ? void 0 : w.nextElementSibling;
|
|
482
495
|
if (v(w) || v(h)) return;
|
|
483
496
|
const D = document.createRange();
|
|
484
497
|
for (D.selectNodeContents(w), D.collapse(!1); h.firstChild; )
|
|
485
498
|
w.appendChild(h.firstChild);
|
|
486
|
-
h.remove(),
|
|
499
|
+
h.remove(), r.removeAllRanges(), r.addRange(D), w.normalize();
|
|
487
500
|
}
|
|
488
501
|
if (Q.key === "Enter") {
|
|
489
|
-
const { range:
|
|
490
|
-
if (bE(
|
|
491
|
-
const [n] = SA(
|
|
492
|
-
if (
|
|
502
|
+
const { range: r } = this.cursor;
|
|
503
|
+
if (bE(r)) return;
|
|
504
|
+
const [n] = SA(r == null ? void 0 : r.commonAncestorContainer, (w) => w.tagName === "SPAN" && w.dataset.type === q.anchor);
|
|
505
|
+
if (r != null && r.collapsed && r.startOffset === 0 && n) {
|
|
493
506
|
Q.preventDefault();
|
|
494
507
|
const w = document.createElement("p");
|
|
495
508
|
w.innerHTML = "<br />", this._editorElement.insertBefore(w, n.parentElement);
|
|
496
509
|
}
|
|
497
510
|
}
|
|
498
511
|
if (i.startOffset === 0 && i.endContainer.tagName === "P" && _A(i.startContainer) === _A(i.endContainer)) {
|
|
499
|
-
const
|
|
500
|
-
if (v(
|
|
501
|
-
Q.key === "Backspace" && ce(
|
|
512
|
+
const r = _A(i.endContainer);
|
|
513
|
+
if (v(r)) return;
|
|
514
|
+
Q.key === "Backspace" && ce(r, o);
|
|
502
515
|
}
|
|
503
516
|
}
|
|
504
517
|
// 粘贴事件处理函数
|
|
505
518
|
_handlePaste(Q) {
|
|
506
519
|
var i, s;
|
|
507
520
|
Q.preventDefault(), se(this._editorElement);
|
|
508
|
-
const o = ((s = (i = Q.clipboardData) == null ? void 0 : i.getData("text/plain")) == null ? void 0 : s.split(/(?:\r?\n){2,}/).map((
|
|
521
|
+
const o = ((s = (i = Q.clipboardData) == null ? void 0 : i.getData("text/plain")) == null ? void 0 : s.split(/(?:\r?\n){2,}/).map((r) => r.trim()).filter((r) => r)) ?? [];
|
|
509
522
|
eC(this, EC(this, o));
|
|
510
523
|
}
|
|
511
524
|
_handleBeforeInput(Q) {
|
|
@@ -532,15 +545,15 @@ const Jg = (C, e, Q, o) => {
|
|
|
532
545
|
const Q = nB(e) ? e : [e];
|
|
533
546
|
let o = C;
|
|
534
547
|
for (; o; ) {
|
|
535
|
-
const i = o, s = Q.map((
|
|
536
|
-
if (s.some((
|
|
548
|
+
const i = o, s = Q.map((r) => r(i)).map((r) => r ? i : null);
|
|
549
|
+
if (s.some((r) => r)) return s;
|
|
537
550
|
o = o.parentElement;
|
|
538
551
|
}
|
|
539
552
|
return new Array(Q.length).fill(null);
|
|
540
553
|
}, _A = (C) => {
|
|
541
554
|
const [e] = SA(
|
|
542
555
|
C,
|
|
543
|
-
(Q) => Q.tagName === "P" && Q.classList.contains(
|
|
556
|
+
(Q) => Q.tagName === "P" && Q.classList.contains(UA)
|
|
544
557
|
);
|
|
545
558
|
return e;
|
|
546
559
|
}, re = (C, e) => {
|
|
@@ -554,7 +567,7 @@ const Jg = (C, e, Q, o) => {
|
|
|
554
567
|
const e = document.createElement("div");
|
|
555
568
|
return e.setAttribute("class", `editor-${C}-tag-modal`), e;
|
|
556
569
|
}, jA = (C, e, Q) => {
|
|
557
|
-
var
|
|
570
|
+
var r, n, w;
|
|
558
571
|
const o = C.previousSibling, i = C.nextSibling, s = e ?? C.textContent ?? "";
|
|
559
572
|
if (Q && // 空节点
|
|
560
573
|
(!o && !i || // 相邻停顿节点
|
|
@@ -565,7 +578,7 @@ const Jg = (C, e, Q, o) => {
|
|
|
565
578
|
q.pausation,
|
|
566
579
|
q.pronunciation
|
|
567
580
|
].includes(o.dataset.type))) {
|
|
568
|
-
oA(C) && C.dataset.type !== q.pausation ? C.replaceWith(C.dataset.raw ?? "") : (
|
|
581
|
+
oA(C) && C.dataset.type !== q.pausation ? C.replaceWith(C.dataset.raw ?? "") : (r = C.parentNode) == null || r.removeChild(C);
|
|
569
582
|
return;
|
|
570
583
|
}
|
|
571
584
|
if (yA(o)) {
|
|
@@ -575,15 +588,15 @@ const Jg = (C, e, Q, o) => {
|
|
|
575
588
|
yA(i) && (i.textContent = s + i.textContent, (w = C.parentNode) == null || w.removeChild(C), jA(i, i.textContent, !1));
|
|
576
589
|
}, mI = (C, e) => {
|
|
577
590
|
const Q = C.length, o = e.length, i = new Array(o).fill(0);
|
|
578
|
-
let s = i[0],
|
|
591
|
+
let s = i[0], r = 0, n = 0;
|
|
579
592
|
for (let w = 1; w <= Q; w++) {
|
|
580
593
|
for (let h = 1; h <= o; h++) {
|
|
581
594
|
const D = i[h];
|
|
582
|
-
C[w - 1] === e[h - 1] ? (i[h] = s + 1, i[h] >
|
|
595
|
+
C[w - 1] === e[h - 1] ? (i[h] = s + 1, i[h] > r && (r = Math.max(r, i[h]), n = h - 1)) : i[h] = 0, s = D;
|
|
583
596
|
}
|
|
584
597
|
s = i[0];
|
|
585
598
|
}
|
|
586
|
-
return e.substring(n -
|
|
599
|
+
return e.substring(n - r + 1, n + 1);
|
|
587
600
|
}, ae = () => {
|
|
588
601
|
const C = window.getSelection();
|
|
589
602
|
if (!C || !C.rangeCount || C.type !== "Caret") return !1;
|
|
@@ -641,14 +654,14 @@ function De(C, e, Q = {}) {
|
|
|
641
654
|
immediate: o = !0
|
|
642
655
|
} = Q, i = cA(!1);
|
|
643
656
|
let s = null;
|
|
644
|
-
function
|
|
657
|
+
function r() {
|
|
645
658
|
s && (clearTimeout(s), s = null);
|
|
646
659
|
}
|
|
647
660
|
function n() {
|
|
648
|
-
i.value = !1,
|
|
661
|
+
i.value = !1, r();
|
|
649
662
|
}
|
|
650
663
|
function w(...h) {
|
|
651
|
-
|
|
664
|
+
r(), i.value = !0, s = setTimeout(() => {
|
|
652
665
|
i.value = !1, s = null, C(...h);
|
|
653
666
|
}, Dg(e));
|
|
654
667
|
}
|
|
@@ -663,7 +676,7 @@ function eI(C = !1, e = {}) {
|
|
|
663
676
|
truthyValue: Q = !0,
|
|
664
677
|
falsyValue: o = !1
|
|
665
678
|
} = e, i = SE(C), s = cA(C);
|
|
666
|
-
function
|
|
679
|
+
function r(n) {
|
|
667
680
|
if (arguments.length)
|
|
668
681
|
return s.value = n, s.value;
|
|
669
682
|
{
|
|
@@ -671,7 +684,7 @@ function eI(C = !1, e = {}) {
|
|
|
671
684
|
return s.value = s.value === w ? Dg(o) : w, s.value;
|
|
672
685
|
}
|
|
673
686
|
}
|
|
674
|
-
return i ?
|
|
687
|
+
return i ? r : [s, r];
|
|
675
688
|
}
|
|
676
689
|
const sB = oC ? window : void 0, cB = oC ? window.navigator : void 0;
|
|
677
690
|
function de(C) {
|
|
@@ -684,12 +697,12 @@ function lg(...C) {
|
|
|
684
697
|
if (typeof C[0] == "string" || Array.isArray(C[0]) ? ([Q, o, i] = C, e = sB) : [e, Q, o, i] = C, !e)
|
|
685
698
|
return AC;
|
|
686
699
|
Q = ZC(Q), o = ZC(o);
|
|
687
|
-
const s = [],
|
|
700
|
+
const s = [], r = () => {
|
|
688
701
|
s.forEach((D) => D()), s.length = 0;
|
|
689
702
|
}, n = (D, u, f, R) => (D.addEventListener(u, f, R), () => D.removeEventListener(u, f, R)), w = oI(
|
|
690
703
|
() => [de(e), Dg(i)],
|
|
691
704
|
([D, u]) => {
|
|
692
|
-
if (
|
|
705
|
+
if (r(), !D)
|
|
693
706
|
return;
|
|
694
707
|
const f = we(u) ? { ...u } : u;
|
|
695
708
|
s.push(
|
|
@@ -698,7 +711,7 @@ function lg(...C) {
|
|
|
698
711
|
},
|
|
699
712
|
{ immediate: !0, flush: "post" }
|
|
700
713
|
), h = () => {
|
|
701
|
-
w(),
|
|
714
|
+
w(), r();
|
|
702
715
|
};
|
|
703
716
|
return aB(h), h;
|
|
704
717
|
}
|
|
@@ -716,7 +729,7 @@ function _C(C, e = {}) {
|
|
|
716
729
|
const {
|
|
717
730
|
controls: Q = !1,
|
|
718
731
|
navigator: o = cB
|
|
719
|
-
} = e, i = lB(() => o && "permissions" in o), s = VC(),
|
|
732
|
+
} = e, i = lB(() => o && "permissions" in o), s = VC(), r = typeof C == "string" ? { name: C } : C, n = VC(), w = () => {
|
|
720
733
|
var D, u;
|
|
721
734
|
n.value = (u = (D = s.value) == null ? void 0 : D.state) != null ? u : "prompt";
|
|
722
735
|
};
|
|
@@ -725,7 +738,7 @@ function _C(C, e = {}) {
|
|
|
725
738
|
if (i.value) {
|
|
726
739
|
if (!s.value)
|
|
727
740
|
try {
|
|
728
|
-
s.value = await o.permissions.query(
|
|
741
|
+
s.value = await o.permissions.query(r);
|
|
729
742
|
} catch {
|
|
730
743
|
s.value = void 0;
|
|
731
744
|
} finally {
|
|
@@ -748,15 +761,15 @@ function wB(C = {}) {
|
|
|
748
761
|
source: o,
|
|
749
762
|
copiedDuring: i = 1500,
|
|
750
763
|
legacy: s = !1
|
|
751
|
-
} = C,
|
|
764
|
+
} = C, r = lB(() => e && "clipboard" in e), n = _C("clipboard-read"), w = _C("clipboard-write"), h = FA(() => r.value || s), D = cA(""), u = cA(!1), f = De(() => u.value = !1, i, { immediate: !1 });
|
|
752
765
|
function R() {
|
|
753
|
-
|
|
766
|
+
r.value && J(n.value) ? e.clipboard.readText().then((M) => {
|
|
754
767
|
D.value = M;
|
|
755
768
|
}) : D.value = L();
|
|
756
769
|
}
|
|
757
770
|
h.value && Q && lg(["copy", "cut"], R, { passive: !0 });
|
|
758
771
|
async function G(M = Dg(o)) {
|
|
759
|
-
h.value && M != null && (
|
|
772
|
+
h.value && M != null && (r.value && J(w.value) ? await e.clipboard.writeText(M) : U(M), D.value = M, u.value = !0, f.start());
|
|
760
773
|
}
|
|
761
774
|
function U(M) {
|
|
762
775
|
const _ = document.createElement("textarea");
|
|
@@ -789,7 +802,7 @@ function cI(C = {}) {
|
|
|
789
802
|
resetOnTouchEnds: o = !1,
|
|
790
803
|
initialValue: i = { x: 0, y: 0 },
|
|
791
804
|
window: s = sB,
|
|
792
|
-
target:
|
|
805
|
+
target: r = s,
|
|
793
806
|
scroll: n = !0,
|
|
794
807
|
eventFilter: w
|
|
795
808
|
} = C;
|
|
@@ -810,9 +823,9 @@ function cI(C = {}) {
|
|
|
810
823
|
}, _ = () => {
|
|
811
824
|
f.value = i.x, R.value = i.y;
|
|
812
825
|
}, T = w ? (V) => w(() => L(V), {}) : (V) => L(V), $ = w ? (V) => w(() => J(V), {}) : (V) => J(V), lA = w ? () => w(() => M(), {}) : () => M();
|
|
813
|
-
if (
|
|
826
|
+
if (r) {
|
|
814
827
|
const V = { passive: !0 };
|
|
815
|
-
lg(
|
|
828
|
+
lg(r, ["mousemove", "dragover"], T, V), Q && e !== "movement" && (lg(r, ["touchstart", "touchmove"], $, V), o && lg(r, "touchend", _, V)), n && e === "page" && lg(s, "scroll", lA, V);
|
|
816
829
|
}
|
|
817
830
|
return {
|
|
818
831
|
x: f,
|
|
@@ -834,7 +847,7 @@ const fe = ["onClick"], Re = /* @__PURE__ */ MA({
|
|
|
834
847
|
{ label: "2S", value: 2 },
|
|
835
848
|
{ label: "2.5S", value: 2.5 }
|
|
836
849
|
];
|
|
837
|
-
return (
|
|
850
|
+
return (r, n) => iI((iA(), nA("ul", {
|
|
838
851
|
class: RA(sA(i)()),
|
|
839
852
|
contenteditable: "false",
|
|
840
853
|
onClick: n[0] || (n[0] = BC(() => {
|
|
@@ -885,7 +898,7 @@ const fe = ["onClick"], Re = /* @__PURE__ */ MA({
|
|
|
885
898
|
o == null || o(h, D), s();
|
|
886
899
|
}, s = () => {
|
|
887
900
|
w.component && (w.component.props.visible = !1);
|
|
888
|
-
},
|
|
901
|
+
}, r = (h) => {
|
|
889
902
|
var D, u;
|
|
890
903
|
if (w.component) {
|
|
891
904
|
let f = Ge.value, R = Ne.value;
|
|
@@ -904,7 +917,7 @@ const fe = ["onClick"], Re = /* @__PURE__ */ MA({
|
|
|
904
917
|
return QC(w, Q), document.body.appendChild(Q), {
|
|
905
918
|
target: void 0,
|
|
906
919
|
close: s,
|
|
907
|
-
update:
|
|
920
|
+
update: r
|
|
908
921
|
};
|
|
909
922
|
};
|
|
910
923
|
class Se extends sI {
|
|
@@ -942,7 +955,7 @@ class Se extends sI {
|
|
|
942
955
|
* @param evt Event对象
|
|
943
956
|
*/
|
|
944
957
|
_triggerPausationTagClick(Q) {
|
|
945
|
-
var
|
|
958
|
+
var r;
|
|
946
959
|
const o = Q.target, [i] = SA(
|
|
947
960
|
o,
|
|
948
961
|
(n) => n.tagName === "svg" && n.classList.contains(DB)
|
|
@@ -951,7 +964,7 @@ class Se extends sI {
|
|
|
951
964
|
(n) => n.tagName === "SPAN" && n.dataset.type === wg
|
|
952
965
|
);
|
|
953
966
|
if (i || v(s)) {
|
|
954
|
-
i && this.remove(s), (
|
|
967
|
+
i && this.remove(s), (r = this.modalInstance) == null || r.close();
|
|
955
968
|
return;
|
|
956
969
|
}
|
|
957
970
|
if (v(this.modalInstance)) {
|
|
@@ -994,7 +1007,7 @@ const Me = { style: { display: "none" } }, pe = /* @__PURE__ */ MA({
|
|
|
994
1007
|
return;
|
|
995
1008
|
}
|
|
996
1009
|
o("ok", w, n.value ?? "", Q.oldText);
|
|
997
|
-
},
|
|
1010
|
+
}, r = (w) => {
|
|
998
1011
|
o("cancel", w);
|
|
999
1012
|
}, n = cA();
|
|
1000
1013
|
return oI([() => Q.visible, () => Q.oldText, () => Q.modelValue], () => {
|
|
@@ -1009,7 +1022,7 @@ const Me = { style: { display: "none" } }, pe = /* @__PURE__ */ MA({
|
|
|
1009
1022
|
class: RA(sA(i)("title"))
|
|
1010
1023
|
}, {
|
|
1011
1024
|
default: Cg(() => h[2] || (h[2] = [
|
|
1012
|
-
|
|
1025
|
+
LA("读音替换")
|
|
1013
1026
|
])),
|
|
1014
1027
|
_: 1
|
|
1015
1028
|
}, 8, ["class"]),
|
|
@@ -1054,9 +1067,9 @@ const Me = { style: { display: "none" } }, pe = /* @__PURE__ */ MA({
|
|
|
1054
1067
|
default: Cg(() => {
|
|
1055
1068
|
var D;
|
|
1056
1069
|
return [
|
|
1057
|
-
y(sA(ZI), { onClick:
|
|
1070
|
+
y(sA(ZI), { onClick: r }, {
|
|
1058
1071
|
default: Cg(() => h[3] || (h[3] = [
|
|
1059
|
-
|
|
1072
|
+
LA("取消")
|
|
1060
1073
|
])),
|
|
1061
1074
|
_: 1
|
|
1062
1075
|
}),
|
|
@@ -1066,7 +1079,7 @@ const Me = { style: { display: "none" } }, pe = /* @__PURE__ */ MA({
|
|
|
1066
1079
|
onClick: s
|
|
1067
1080
|
}, {
|
|
1068
1081
|
default: Cg(() => h[4] || (h[4] = [
|
|
1069
|
-
|
|
1082
|
+
LA("替换")
|
|
1070
1083
|
])),
|
|
1071
1084
|
_: 1
|
|
1072
1085
|
}, 8, ["disabled"])
|
|
@@ -1097,7 +1110,7 @@ const ag = q.pronunciation, [sg] = pg(ag), dB = sg("close"), { x: He, y: me } =
|
|
|
1097
1110
|
</g>
|
|
1098
1111
|
</g>
|
|
1099
1112
|
</svg>`, qe = (C, e) => {
|
|
1100
|
-
const Q = tC(q.pronunciation), { oldText: o, onOk: i, onCancel: s, onTryPlay:
|
|
1113
|
+
const Q = tC(q.pronunciation), { oldText: o, onOk: i, onCancel: s, onTryPlay: r } = e, n = (G, U, L) => {
|
|
1101
1114
|
i == null || i(G, U, L), h();
|
|
1102
1115
|
}, w = (G) => {
|
|
1103
1116
|
s == null || s(G), h();
|
|
@@ -1114,7 +1127,7 @@ const ag = q.pronunciation, [sg] = pg(ag), dB = sg("close"), { x: He, y: me } =
|
|
|
1114
1127
|
onOk: n,
|
|
1115
1128
|
onCancel: w,
|
|
1116
1129
|
onTryPlay: (G, U, L) => {
|
|
1117
|
-
|
|
1130
|
+
r == null || r(G, U, L);
|
|
1118
1131
|
}
|
|
1119
1132
|
});
|
|
1120
1133
|
return QC(R, Q), document.body.appendChild(Q), {
|
|
@@ -1140,7 +1153,7 @@ class ve extends sI {
|
|
|
1140
1153
|
jA(Q, Q.dataset.raw, !0);
|
|
1141
1154
|
}
|
|
1142
1155
|
_triggerPronunciationTagClick(Q) {
|
|
1143
|
-
var
|
|
1156
|
+
var r;
|
|
1144
1157
|
const o = Q.target, [i] = SA(
|
|
1145
1158
|
o,
|
|
1146
1159
|
(n) => n.tagName === "svg" && n.classList.contains(dB)
|
|
@@ -1149,7 +1162,7 @@ class ve extends sI {
|
|
|
1149
1162
|
(n) => n.tagName === "SPAN" && n.dataset.type === ag
|
|
1150
1163
|
);
|
|
1151
1164
|
if (i || v(s)) {
|
|
1152
|
-
i && this.remove(s), (
|
|
1165
|
+
i && this.remove(s), (r = this.modalInstance) == null || r.close();
|
|
1153
1166
|
return;
|
|
1154
1167
|
}
|
|
1155
1168
|
if (v(this.modalInstance)) {
|
|
@@ -1222,8 +1235,8 @@ class be extends sI {
|
|
|
1222
1235
|
this._insertAnchorTag(Q.anchor);
|
|
1223
1236
|
}
|
|
1224
1237
|
remove(Q) {
|
|
1225
|
-
const { top: o, id: i } = Q.dataset, s = i.split("_")[1],
|
|
1226
|
-
|
|
1238
|
+
const { top: o, id: i } = Q.dataset, s = i.split("_")[1], r = this.data[o].findIndex((u) => u.id === Number(s));
|
|
1239
|
+
r > -1 && (this.data[o].splice(r, 1), $C.delete(s));
|
|
1227
1240
|
const n = Array.from(Q.childNodes);
|
|
1228
1241
|
if (n.every((u) => yA(u))) {
|
|
1229
1242
|
jA(Q), Q.replaceWith(Q.textContent);
|
|
@@ -1233,8 +1246,8 @@ class be extends sI {
|
|
|
1233
1246
|
n.forEach((u) => w.appendChild(u)), Q.replaceWith(w), yA(h) && jA(h), yA(D) && jA(D);
|
|
1234
1247
|
}
|
|
1235
1248
|
_recordAnchor(Q, o, i, s) {
|
|
1236
|
-
const
|
|
1237
|
-
Q.id = o, Q.top = i,
|
|
1249
|
+
const r = this.data[i] ?? (this.data[i] = []);
|
|
1250
|
+
Q.id = o, Q.top = i, r.push({ background: s, data: Q, id: o }), $C.set(String(o), Q);
|
|
1238
1251
|
}
|
|
1239
1252
|
get _newAnchorId() {
|
|
1240
1253
|
const Q = Object.values(this.data).flat().map((o) => o.id);
|
|
@@ -1249,7 +1262,7 @@ class be extends sI {
|
|
|
1249
1262
|
Sg.warning("同一个文本不能同时选择两个及以上主播!");
|
|
1250
1263
|
return;
|
|
1251
1264
|
}
|
|
1252
|
-
const o = this._newAnchorId, i = yB[(o - 1) % 10], s = this.editor.cursor.range, { startContainer:
|
|
1265
|
+
const o = this._newAnchorId, i = yB[(o - 1) % 10], s = this.editor.cursor.range, { startContainer: r, startOffset: n, endContainer: w, endOffset: h } = s, D = (L) => oA(L) && L.tagName === "DIV" ? L.firstElementChild : oA(L) && L.tagName === "P" ? L : L.parentElement, u = (L) => {
|
|
1253
1266
|
const J = document.createElement("span");
|
|
1254
1267
|
return Jg(
|
|
1255
1268
|
J,
|
|
@@ -1281,18 +1294,18 @@ class be extends sI {
|
|
|
1281
1294
|
this.editor.content.update(V);
|
|
1282
1295
|
const EA = this._calcTopValue(V.getBoundingClientRect());
|
|
1283
1296
|
V.dataset.top = String(EA), T && this._recordAnchor(Q, o, EA, i);
|
|
1284
|
-
}, R = D(
|
|
1297
|
+
}, R = D(r), G = D(w), U = re(R, G);
|
|
1285
1298
|
if (R === G) {
|
|
1286
1299
|
f(
|
|
1287
|
-
oA(
|
|
1288
|
-
oA(
|
|
1300
|
+
oA(r) && r.tagName === "P" ? r.firstChild : r,
|
|
1301
|
+
oA(r) && r.tagName === "P" ? 0 : n,
|
|
1289
1302
|
w,
|
|
1290
1303
|
h,
|
|
1291
1304
|
!0
|
|
1292
1305
|
);
|
|
1293
1306
|
return;
|
|
1294
1307
|
}
|
|
1295
|
-
f(
|
|
1308
|
+
f(r, n, R, R.childNodes.length, !0), U.forEach((L) => {
|
|
1296
1309
|
f(L, 0, L, L.childNodes.length);
|
|
1297
1310
|
}), f(G.firstChild, 0, w, h, !1);
|
|
1298
1311
|
}
|
|
@@ -1317,19 +1330,19 @@ class be extends sI {
|
|
|
1317
1330
|
_syncAnchorTopValue() {
|
|
1318
1331
|
const o = Array.from(
|
|
1319
1332
|
this.editor.element.querySelectorAll(`span[data-type="${cg}"]`)
|
|
1320
|
-
).reduce((
|
|
1333
|
+
).reduce((r, n) => {
|
|
1321
1334
|
const w = n.dataset.id.split("_")[1];
|
|
1322
|
-
if (
|
|
1323
|
-
return n.dataset.top = String(
|
|
1335
|
+
if (r.has(w))
|
|
1336
|
+
return n.dataset.top = String(r.get(w)), r;
|
|
1324
1337
|
const h = this._calcTopValue(n.getBoundingClientRect());
|
|
1325
|
-
return n.dataset.top = String(h),
|
|
1338
|
+
return n.dataset.top = String(h), r.set(w, h), r;
|
|
1326
1339
|
}, /* @__PURE__ */ new Map()), i = Object.values(this.data).flat();
|
|
1327
|
-
Object.keys(this.data).forEach((
|
|
1328
|
-
const s = i.reduce((
|
|
1340
|
+
Object.keys(this.data).forEach((r) => delete this.data[r]);
|
|
1341
|
+
const s = i.reduce((r, n) => {
|
|
1329
1342
|
const w = o.get(String(n.id));
|
|
1330
|
-
return (
|
|
1343
|
+
return (r[w] ?? (r[w] = [])).push(n), r;
|
|
1331
1344
|
}, {});
|
|
1332
|
-
Object.keys(s).forEach((
|
|
1345
|
+
Object.keys(s).forEach((r) => this.data[r] = s[r]);
|
|
1333
1346
|
}
|
|
1334
1347
|
setup() {
|
|
1335
1348
|
this.observer = new MutationObserver(() => this._syncAnchorTopValue()), this.observer.observe(this.editor.element, {
|
|
@@ -1354,10 +1367,10 @@ const Te = ["onClick"], Pe = /* @__PURE__ */ MA({
|
|
|
1354
1367
|
},
|
|
1355
1368
|
emits: ["ok", "cancel"],
|
|
1356
1369
|
setup(C, { emit: e }) {
|
|
1357
|
-
const Q = C, o = e, [i] = vA("homophones"), s = (
|
|
1358
|
-
o("ok",
|
|
1370
|
+
const Q = C, o = e, [i] = vA("homophones"), s = (r, n) => {
|
|
1371
|
+
o("ok", r, n);
|
|
1359
1372
|
};
|
|
1360
|
-
return (
|
|
1373
|
+
return (r, n) => iI((iA(), nA("ul", {
|
|
1361
1374
|
class: RA(sA(i)()),
|
|
1362
1375
|
onClick: n[0] || (n[0] = BC(() => {
|
|
1363
1376
|
}, ["stop"]))
|
|
@@ -1405,10 +1418,10 @@ const Te = ["onClick"], Pe = /* @__PURE__ */ MA({
|
|
|
1405
1418
|
`
|
|
1406
1419
|
), s;
|
|
1407
1420
|
}, Ze = (C, e) => {
|
|
1408
|
-
const Q = tC(q.homophones), { word: o, data: i, onOK: s, onCancel:
|
|
1421
|
+
const Q = tC(q.homophones), { word: o, data: i, onOK: s, onCancel: r } = e, n = (R, G) => {
|
|
1409
1422
|
s == null || s(R, G), h();
|
|
1410
1423
|
}, w = (R) => {
|
|
1411
|
-
|
|
1424
|
+
r == null || r(R), h();
|
|
1412
1425
|
}, h = () => {
|
|
1413
1426
|
f.component && (f.component.props.visible = !1);
|
|
1414
1427
|
}, D = (R) => {
|
|
@@ -1456,7 +1469,7 @@ class _e extends sI {
|
|
|
1456
1469
|
jA(Q, Q.dataset.raw, !0);
|
|
1457
1470
|
}
|
|
1458
1471
|
_triggerHomophonesTagClick(Q) {
|
|
1459
|
-
var
|
|
1472
|
+
var r, n, w;
|
|
1460
1473
|
const o = Q.target, [i] = SA(
|
|
1461
1474
|
o,
|
|
1462
1475
|
(h) => h.tagName === "svg" && h.classList.contains(uB)
|
|
@@ -1465,7 +1478,7 @@ class _e extends sI {
|
|
|
1465
1478
|
(h) => h.tagName === "SPAN" && h.dataset.type === hg
|
|
1466
1479
|
);
|
|
1467
1480
|
if (i || v(s)) {
|
|
1468
|
-
i && this.remove(s), (
|
|
1481
|
+
i && this.remove(s), (r = this.modalInstance) == null || r.close();
|
|
1469
1482
|
return;
|
|
1470
1483
|
}
|
|
1471
1484
|
if (v(this.modalInstance)) {
|
|
@@ -1493,9 +1506,9 @@ class _e extends sI {
|
|
|
1493
1506
|
});
|
|
1494
1507
|
}
|
|
1495
1508
|
_insertHomophonesTag(Q) {
|
|
1496
|
-
const o = this.editor.content.getParas(), i = (s,
|
|
1509
|
+
const o = this.editor.content.getParas(), i = (s, r, n) => {
|
|
1497
1510
|
var h;
|
|
1498
|
-
let w =
|
|
1511
|
+
let w = r;
|
|
1499
1512
|
for (let D = 0; D < s.length; D++) {
|
|
1500
1513
|
const u = s[D], f = (h = u == null ? void 0 : u.dataset) == null ? void 0 : h.type, R = [
|
|
1501
1514
|
q.pausation,
|
|
@@ -1522,13 +1535,13 @@ class _e extends sI {
|
|
|
1522
1535
|
}
|
|
1523
1536
|
};
|
|
1524
1537
|
Q.forEach((s) => {
|
|
1525
|
-
const
|
|
1538
|
+
const r = o[s.paraIndex], n = Array.from(r.childNodes);
|
|
1526
1539
|
i(n, -1, s);
|
|
1527
1540
|
});
|
|
1528
1541
|
}
|
|
1529
1542
|
// 累计计算并更新索引属性
|
|
1530
1543
|
_calc(Q, o, i) {
|
|
1531
|
-
const s = window.getSelection(),
|
|
1544
|
+
const s = window.getSelection(), r = document.createRange();
|
|
1532
1545
|
if (Q.nodeType === Node.TEXT_NODE) {
|
|
1533
1546
|
const n = ze(
|
|
1534
1547
|
i.word,
|
|
@@ -1537,7 +1550,7 @@ class _e extends sI {
|
|
|
1537
1550
|
i.pinyin1,
|
|
1538
1551
|
i.pinyin2
|
|
1539
1552
|
);
|
|
1540
|
-
|
|
1553
|
+
r.selectNode(Q), r.setStart(Q, o), r.setEnd(Q, o + 1), r.deleteContents(), r.insertNode(n), s == null || s.removeAllRanges(), s == null || s.addRange(r), this.editor.cursor.toEnd(n);
|
|
1541
1554
|
}
|
|
1542
1555
|
oA(Q) && Q.dataset.type === q.homophones && (Q.dataset.value = i.modify, Q.firstElementChild.innerHTML = `${i.word}[${i.modify}]`);
|
|
1543
1556
|
}
|
|
@@ -1721,14 +1734,14 @@ const ot = MA({
|
|
|
1721
1734
|
},
|
|
1722
1735
|
setup(C, { emit: e }) {
|
|
1723
1736
|
const Q = Hg("icon"), o = FA(() => [Q, `${Q}-right`, { [`${Q}-spin`]: C.spin }]), i = FA(() => {
|
|
1724
|
-
const
|
|
1725
|
-
return C.size && (
|
|
1737
|
+
const r = {};
|
|
1738
|
+
return C.size && (r.fontSize = mg(C.size) ? `${C.size}px` : C.size), C.rotate && (r.transform = `rotate(${C.rotate}deg)`), r;
|
|
1726
1739
|
});
|
|
1727
1740
|
return {
|
|
1728
1741
|
cls: o,
|
|
1729
1742
|
innerStyle: i,
|
|
1730
|
-
onClick: (
|
|
1731
|
-
e("click",
|
|
1743
|
+
onClick: (r) => {
|
|
1744
|
+
e("click", r);
|
|
1732
1745
|
}
|
|
1733
1746
|
};
|
|
1734
1747
|
}
|
|
@@ -1746,7 +1759,7 @@ function at(C, e, Q, o, i, s) {
|
|
|
1746
1759
|
"stroke-width": C.strokeWidth,
|
|
1747
1760
|
"stroke-linecap": C.strokeLinecap,
|
|
1748
1761
|
"stroke-linejoin": C.strokeLinejoin,
|
|
1749
|
-
onClick: e[0] || (e[0] = (...
|
|
1762
|
+
onClick: e[0] || (e[0] = (...r) => C.onClick && C.onClick(...r))
|
|
1750
1763
|
}, rt, 14, it);
|
|
1751
1764
|
}
|
|
1752
1765
|
var KI = /* @__PURE__ */ Kg(ot, [["render", at]]);
|
|
@@ -1784,14 +1797,14 @@ const st = Object.assign(KI, {
|
|
|
1784
1797
|
},
|
|
1785
1798
|
setup(C, { emit: e }) {
|
|
1786
1799
|
const Q = Hg("icon"), o = FA(() => [Q, `${Q}-check-circle-fill`, { [`${Q}-spin`]: C.spin }]), i = FA(() => {
|
|
1787
|
-
const
|
|
1788
|
-
return C.size && (
|
|
1800
|
+
const r = {};
|
|
1801
|
+
return C.size && (r.fontSize = mg(C.size) ? `${C.size}px` : C.size), C.rotate && (r.transform = `rotate(${C.rotate}deg)`), r;
|
|
1789
1802
|
});
|
|
1790
1803
|
return {
|
|
1791
1804
|
cls: o,
|
|
1792
1805
|
innerStyle: i,
|
|
1793
|
-
onClick: (
|
|
1794
|
-
e("click",
|
|
1806
|
+
onClick: (r) => {
|
|
1807
|
+
e("click", r);
|
|
1795
1808
|
}
|
|
1796
1809
|
};
|
|
1797
1810
|
}
|
|
@@ -1815,7 +1828,7 @@ function Dt(C, e, Q, o, i, s) {
|
|
|
1815
1828
|
"stroke-width": C.strokeWidth,
|
|
1816
1829
|
"stroke-linecap": C.strokeLinecap,
|
|
1817
1830
|
"stroke-linejoin": C.strokeLinejoin,
|
|
1818
|
-
onClick: e[0] || (e[0] = (...
|
|
1831
|
+
onClick: e[0] || (e[0] = (...r) => C.onClick && C.onClick(...r))
|
|
1819
1832
|
}, ht, 14, lt);
|
|
1820
1833
|
}
|
|
1821
1834
|
var qI = /* @__PURE__ */ Kg(ct, [["render", Dt]]);
|
|
@@ -1853,14 +1866,14 @@ const dt = Object.assign(qI, {
|
|
|
1853
1866
|
},
|
|
1854
1867
|
setup(C, { emit: e }) {
|
|
1855
1868
|
const Q = Hg("icon"), o = FA(() => [Q, `${Q}-close-circle-fill`, { [`${Q}-spin`]: C.spin }]), i = FA(() => {
|
|
1856
|
-
const
|
|
1857
|
-
return C.size && (
|
|
1869
|
+
const r = {};
|
|
1870
|
+
return C.size && (r.fontSize = mg(C.size) ? `${C.size}px` : C.size), C.rotate && (r.transform = `rotate(${C.rotate}deg)`), r;
|
|
1858
1871
|
});
|
|
1859
1872
|
return {
|
|
1860
1873
|
cls: o,
|
|
1861
1874
|
innerStyle: i,
|
|
1862
|
-
onClick: (
|
|
1863
|
-
e("click",
|
|
1875
|
+
onClick: (r) => {
|
|
1876
|
+
e("click", r);
|
|
1864
1877
|
}
|
|
1865
1878
|
};
|
|
1866
1879
|
}
|
|
@@ -1884,7 +1897,7 @@ function Ft(C, e, Q, o, i, s) {
|
|
|
1884
1897
|
"stroke-width": C.strokeWidth,
|
|
1885
1898
|
"stroke-linecap": C.strokeLinecap,
|
|
1886
1899
|
"stroke-linejoin": C.strokeLinejoin,
|
|
1887
|
-
onClick: e[0] || (e[0] = (...
|
|
1900
|
+
onClick: e[0] || (e[0] = (...r) => C.onClick && C.onClick(...r))
|
|
1888
1901
|
}, Rt, 14, ut);
|
|
1889
1902
|
}
|
|
1890
1903
|
var vI = /* @__PURE__ */ Kg(yt, [["render", Ft]]);
|
|
@@ -1922,14 +1935,14 @@ const Nt = Object.assign(vI, {
|
|
|
1922
1935
|
},
|
|
1923
1936
|
setup(C, { emit: e }) {
|
|
1924
1937
|
const Q = Hg("icon"), o = FA(() => [Q, `${Q}-exclamation-circle-fill`, { [`${Q}-spin`]: C.spin }]), i = FA(() => {
|
|
1925
|
-
const
|
|
1926
|
-
return C.size && (
|
|
1938
|
+
const r = {};
|
|
1939
|
+
return C.size && (r.fontSize = mg(C.size) ? `${C.size}px` : C.size), C.rotate && (r.transform = `rotate(${C.rotate}deg)`), r;
|
|
1927
1940
|
});
|
|
1928
1941
|
return {
|
|
1929
1942
|
cls: o,
|
|
1930
1943
|
innerStyle: i,
|
|
1931
|
-
onClick: (
|
|
1932
|
-
e("click",
|
|
1944
|
+
onClick: (r) => {
|
|
1945
|
+
e("click", r);
|
|
1933
1946
|
}
|
|
1934
1947
|
};
|
|
1935
1948
|
}
|
|
@@ -1953,7 +1966,7 @@ function St(C, e, Q, o, i, s) {
|
|
|
1953
1966
|
"stroke-width": C.strokeWidth,
|
|
1954
1967
|
"stroke-linecap": C.strokeLinecap,
|
|
1955
1968
|
"stroke-linejoin": C.strokeLinejoin,
|
|
1956
|
-
onClick: e[0] || (e[0] = (...
|
|
1969
|
+
onClick: e[0] || (e[0] = (...r) => C.onClick && C.onClick(...r))
|
|
1957
1970
|
}, Ut, 14, kt);
|
|
1958
1971
|
}
|
|
1959
1972
|
var xI = /* @__PURE__ */ Kg(Gt, [["render", St]]);
|
|
@@ -1991,14 +2004,14 @@ const bI = Object.assign(xI, {
|
|
|
1991
2004
|
},
|
|
1992
2005
|
setup(C, { emit: e }) {
|
|
1993
2006
|
const Q = Hg("icon"), o = FA(() => [Q, `${Q}-info-circle-fill`, { [`${Q}-spin`]: C.spin }]), i = FA(() => {
|
|
1994
|
-
const
|
|
1995
|
-
return C.size && (
|
|
2007
|
+
const r = {};
|
|
2008
|
+
return C.size && (r.fontSize = mg(C.size) ? `${C.size}px` : C.size), C.rotate && (r.transform = `rotate(${C.rotate}deg)`), r;
|
|
1996
2009
|
});
|
|
1997
2010
|
return {
|
|
1998
2011
|
cls: o,
|
|
1999
2012
|
innerStyle: i,
|
|
2000
|
-
onClick: (
|
|
2001
|
-
e("click",
|
|
2013
|
+
onClick: (r) => {
|
|
2014
|
+
e("click", r);
|
|
2002
2015
|
}
|
|
2003
2016
|
};
|
|
2004
2017
|
}
|
|
@@ -2022,7 +2035,7 @@ function Ht(C, e, Q, o, i, s) {
|
|
|
2022
2035
|
"stroke-width": C.strokeWidth,
|
|
2023
2036
|
"stroke-linecap": C.strokeLinecap,
|
|
2024
2037
|
"stroke-linejoin": C.strokeLinejoin,
|
|
2025
|
-
onClick: e[0] || (e[0] = (...
|
|
2038
|
+
onClick: e[0] || (e[0] = (...r) => C.onClick && C.onClick(...r))
|
|
2026
2039
|
}, Yt, 14, pt);
|
|
2027
2040
|
}
|
|
2028
2041
|
var TI = /* @__PURE__ */ Kg(Mt, [["render", Ht]]);
|
|
@@ -2044,7 +2057,7 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2044
2057
|
var i;
|
|
2045
2058
|
var o = typeof document < "u" ? (i = document.currentScript) == null ? void 0 : i.src : void 0;
|
|
2046
2059
|
return typeof __filename < "u" && (o || (o = __filename)), function(s = {}) {
|
|
2047
|
-
var
|
|
2060
|
+
var r, n = Object.assign({}, s), w, h, D = new Promise((A, g) => {
|
|
2048
2061
|
w = A, h = g;
|
|
2049
2062
|
}), u = typeof window == "object", f = typeof importScripts == "function", R = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string", G = Object.assign({}, n), U = "./this.program", L = (A, g) => {
|
|
2050
2063
|
throw g;
|
|
@@ -2055,8 +2068,8 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2055
2068
|
var g = M(A, !0);
|
|
2056
2069
|
return g.buffer || (g = new Uint8Array(g)), g;
|
|
2057
2070
|
}, _ = (A, g, I, B = !0) => {
|
|
2058
|
-
A = rC(A) ? new URL(A) : lA.normalize(A), $.readFile(A, B ? void 0 : "utf8", (t,
|
|
2059
|
-
t ? I(t) : g(B ?
|
|
2071
|
+
A = rC(A) ? new URL(A) : lA.normalize(A), $.readFile(A, B ? void 0 : "utf8", (t, a) => {
|
|
2072
|
+
t ? I(t) : g(B ? a.buffer : a);
|
|
2060
2073
|
});
|
|
2061
2074
|
}, !n.thisProgram && process.argv.length > 1 && (U = process.argv[1].replace(/\\/g, "/")), process.argv.slice(2), L = (A, g) => {
|
|
2062
2075
|
throw process.exitCode = A, g;
|
|
@@ -2166,7 +2179,7 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2166
2179
|
function KB() {
|
|
2167
2180
|
var A = mB();
|
|
2168
2181
|
function g(B, t) {
|
|
2169
|
-
return
|
|
2182
|
+
return kA = B.exports, mA = kA.F, IA(), cC = kA.I, LB(kA.G), vg(), kA;
|
|
2170
2183
|
}
|
|
2171
2184
|
wI();
|
|
2172
2185
|
function I(B) {
|
|
@@ -2258,12 +2271,12 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2258
2271
|
d.length !== A.length && jg("Mismatched type converter count");
|
|
2259
2272
|
for (var F = 0; F < A.length; ++F) XA(A[F], d[F]);
|
|
2260
2273
|
}
|
|
2261
|
-
var t = new Array(g.length),
|
|
2274
|
+
var t = new Array(g.length), a = [], c = 0;
|
|
2262
2275
|
g.forEach((l, d) => {
|
|
2263
|
-
Eg.hasOwnProperty(l) ? t[d] = Eg[l] : (
|
|
2264
|
-
t[d] = Eg[l], ++c, c ===
|
|
2276
|
+
Eg.hasOwnProperty(l) ? t[d] = Eg[l] : (a.push(l), ig.hasOwnProperty(l) || (ig[l] = []), ig[l].push(() => {
|
|
2277
|
+
t[d] = Eg[l], ++c, c === a.length && B(t);
|
|
2265
2278
|
}));
|
|
2266
|
-
}),
|
|
2279
|
+
}), a.length === 0 && B(t);
|
|
2267
2280
|
};
|
|
2268
2281
|
function jB(A, g, I = {}) {
|
|
2269
2282
|
var B = g.name;
|
|
@@ -2273,7 +2286,7 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2273
2286
|
}
|
|
2274
2287
|
if (Eg[A] = g, delete Pg[A], ig.hasOwnProperty(A)) {
|
|
2275
2288
|
var t = ig[A];
|
|
2276
|
-
delete ig[A], t.forEach((
|
|
2289
|
+
delete ig[A], t.forEach((a) => a());
|
|
2277
2290
|
}
|
|
2278
2291
|
}
|
|
2279
2292
|
function XA(A, g, I = {}) {
|
|
@@ -2283,8 +2296,8 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2283
2296
|
var gg = 8, WB = (A, g, I, B) => {
|
|
2284
2297
|
g = KA(g), XA(A, { name: g, fromWireType: function(t) {
|
|
2285
2298
|
return !!t;
|
|
2286
|
-
}, toWireType: function(t,
|
|
2287
|
-
return
|
|
2299
|
+
}, toWireType: function(t, a) {
|
|
2300
|
+
return a ? I : B;
|
|
2288
2301
|
}, argPackAdvance: gg, readValueFromPointer: function(t) {
|
|
2289
2302
|
return this.fromWireType(x[t]);
|
|
2290
2303
|
}, destructorFunction: null });
|
|
@@ -2338,7 +2351,7 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2338
2351
|
function t() {
|
|
2339
2352
|
return this.isSmartPointer ? Wg(this.registeredClass.instancePrototype, { ptrType: this.pointeeType, ptr: g, smartPtrType: this, smartPtr: A }) : Wg(this.registeredClass.instancePrototype, { ptrType: this, ptr: A });
|
|
2340
2353
|
}
|
|
2341
|
-
var
|
|
2354
|
+
var a = this.registeredClass.getActualType(g), c = uC[a];
|
|
2342
2355
|
if (!c) return t.call(this);
|
|
2343
2356
|
var l;
|
|
2344
2357
|
this.isConst ? l = c.constPointerType : l = c.pointerType;
|
|
@@ -2391,8 +2404,8 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2391
2404
|
var g = A.charCodeAt(0);
|
|
2392
2405
|
return g >= BQ && g <= QQ ? `_${A}` : A;
|
|
2393
2406
|
};
|
|
2394
|
-
function eQ(A, g, I, B, t,
|
|
2395
|
-
this.name = A, this.constructor = g, this.instancePrototype = I, this.rawDestructor = B, this.baseClass = t, this.getActualType =
|
|
2407
|
+
function eQ(A, g, I, B, t, a, c, l) {
|
|
2408
|
+
this.name = A, this.constructor = g, this.instancePrototype = I, this.rawDestructor = B, this.baseClass = t, this.getActualType = a, this.upcast = c, this.downcast = l, this.pureVirtualFunctions = [];
|
|
2396
2409
|
}
|
|
2397
2410
|
var RI = (A, g, I) => {
|
|
2398
2411
|
for (; g !== I; ) g.upcast || CA(`Expected null or instance of ${I.name}, got an instance of ${g.name}`), A = g.upcast(A), g = g.baseClass;
|
|
@@ -2445,8 +2458,8 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2445
2458
|
(g = this.rawDestructor) == null || g.call(this, A);
|
|
2446
2459
|
}, argPackAdvance: gg, readValueFromPointer: Xg, fromWireType: gQ });
|
|
2447
2460
|
};
|
|
2448
|
-
function zg(A, g, I, B, t,
|
|
2449
|
-
this.name = A, this.registeredClass = g, this.isReference = I, this.isConst = B, this.isSmartPointer = t, this.pointeeType =
|
|
2461
|
+
function zg(A, g, I, B, t, a, c, l, d, F, k) {
|
|
2462
|
+
this.name = A, this.registeredClass = g, this.isReference = I, this.isConst = B, this.isSmartPointer = t, this.pointeeType = a, this.sharingPolicy = c, this.rawGetPointee = l, this.rawConstructor = d, this.rawShare = F, this.rawDestructor = k, !t && g.baseClass === void 0 ? B ? (this.toWireType = tQ, this.destructorFunction = null) : (this.toWireType = iQ, this.destructorFunction = null) : this.toWireType = oQ;
|
|
2450
2463
|
}
|
|
2451
2464
|
var rQ = (A, g, I) => {
|
|
2452
2465
|
n.hasOwnProperty(A) || jg("Replacing nonexistent public symbol"), n[A].overloadTable !== void 0 && I !== void 0 ? n[A].overloadTable[I] = g : (n[A] = g, n[A].argCount = I);
|
|
@@ -2480,18 +2493,18 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2480
2493
|
return ZA(g), I;
|
|
2481
2494
|
}, Zg = (A, g) => {
|
|
2482
2495
|
var I = [], B = {};
|
|
2483
|
-
function t(
|
|
2484
|
-
if (!B[
|
|
2485
|
-
if (Pg[
|
|
2486
|
-
Pg[
|
|
2496
|
+
function t(a) {
|
|
2497
|
+
if (!B[a] && !Eg[a]) {
|
|
2498
|
+
if (Pg[a]) {
|
|
2499
|
+
Pg[a].forEach(t);
|
|
2487
2500
|
return;
|
|
2488
2501
|
}
|
|
2489
|
-
I.push(
|
|
2502
|
+
I.push(a), B[a] = !0;
|
|
2490
2503
|
}
|
|
2491
2504
|
}
|
|
2492
2505
|
throw g.forEach(t), new fC(`${A}: ` + I.map(RC).join([", "]));
|
|
2493
|
-
}, wQ = (A, g, I, B, t,
|
|
2494
|
-
k = KA(k),
|
|
2506
|
+
}, wQ = (A, g, I, B, t, a, c, l, d, F, k, m, p) => {
|
|
2507
|
+
k = KA(k), a = tg(t, a), l && (l = tg(c, l)), F && (F = tg(d, F)), p = tg(m, p);
|
|
2495
2508
|
var K = EQ(k);
|
|
2496
2509
|
CQ(K, function() {
|
|
2497
2510
|
Zg(`Cannot construct ${k} due to unbound types`, [B]);
|
|
@@ -2508,7 +2521,7 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2508
2521
|
return WC.apply(this, YI);
|
|
2509
2522
|
}), N = Object.create(aA, { constructor: { value: hA } });
|
|
2510
2523
|
hA.prototype = N;
|
|
2511
|
-
var H = new eQ(k, hA, N, p, rA,
|
|
2524
|
+
var H = new eQ(k, hA, N, p, rA, a, l, F);
|
|
2512
2525
|
H.baseClass && ((wA = H.baseClass).__derivedClasses ?? (wA.__derivedClasses = []), H.baseClass.__derivedClasses.push(H));
|
|
2513
2526
|
var DA = new zg(k, H, !0, !1, !1), eA = new zg(k + "*", H, !1, !1, !1), JA = new zg(k + " const*", H, !1, !0, !1);
|
|
2514
2527
|
return uC[A] = { pointerType: eA, constPointerType: JA }, rQ(K, hA), [DA, eA, JA];
|
|
@@ -2532,18 +2545,18 @@ var mt = Object.create, RB = Object.defineProperty, Kt = Object.getOwnPropertyDe
|
|
|
2532
2545
|
return t instanceof Object ? t : B;
|
|
2533
2546
|
}
|
|
2534
2547
|
function dQ(A, g, I, B) {
|
|
2535
|
-
for (var t = FC(A),
|
|
2548
|
+
for (var t = FC(A), a = A.length, c = "", l = "", d = 0; d < a - 2; ++d) c += (d !== 0 ? ", " : "") + "arg" + d, l += (d !== 0 ? ", " : "") + "arg" + d + "Wired";
|
|
2536
2549
|
var F = `
|
|
2537
2550
|
return function (${c}) {
|
|
2538
|
-
if (arguments.length !== ${
|
|
2539
|
-
throwBindingError('function ' + humanName + ' called with ' + arguments.length + ' arguments, expected ${
|
|
2551
|
+
if (arguments.length !== ${a - 2}) {
|
|
2552
|
+
throwBindingError('function ' + humanName + ' called with ' + arguments.length + ' arguments, expected ${a - 2}');
|
|
2540
2553
|
}`;
|
|
2541
2554
|
t && (F += `var destructors = [];
|
|
2542
2555
|
`);
|
|
2543
2556
|
var k = t ? "destructors" : "null", m = ["humanName", "throwBindingError", "invoker", "fn", "runDestructors", "retType", "classParam"];
|
|
2544
2557
|
g && (F += "var thisWired = classParam['toWireType'](" + k + `, this);
|
|
2545
2558
|
`);
|
|
2546
|
-
for (var d = 0; d <
|
|
2559
|
+
for (var d = 0; d < a - 2; ++d) F += "var arg" + d + "Wired = argType" + d + "['toWireType'](" + k + ", arg" + d + `);
|
|
2547
2560
|
`, m.push("argType" + d);
|
|
2548
2561
|
if (g && (l = "thisWired" + (l.length > 0 ? ", " : "") + l), F += (I || B ? "var rv = " : "") + "invoker(fn" + (l.length > 0 ? ", " : "") + l + `);
|
|
2549
2562
|
`, t) F += `runDestructors(destructors);
|
|
@@ -2558,12 +2571,12 @@ return ret;
|
|
|
2558
2571
|
`), F += `}
|
|
2559
2572
|
`, [m, F];
|
|
2560
2573
|
}
|
|
2561
|
-
function FI(A, g, I, B, t,
|
|
2574
|
+
function FI(A, g, I, B, t, a) {
|
|
2562
2575
|
var c = g.length;
|
|
2563
2576
|
c < 2 && CA("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
2564
2577
|
for (var l = g[1] !== null && I !== null, d = FC(g), F = g[0].name !== "void", k = [A, CA, B, t, hQ, g[0], g[1]], m = 0; m < c - 2; ++m) k.push(g[m + 2]);
|
|
2565
2578
|
if (!d) for (var m = l ? 1 : 2; m < g.length; ++m) g[m].destructorFunction !== null && k.push(g[m].destructorFunction);
|
|
2566
|
-
let [p, K] = dQ(g, l, F,
|
|
2579
|
+
let [p, K] = dQ(g, l, F, a);
|
|
2567
2580
|
p.push(K);
|
|
2568
2581
|
var W = DQ(Function, p)(...k);
|
|
2569
2582
|
return Og(A, W);
|
|
@@ -2575,9 +2588,9 @@ return ret;
|
|
|
2575
2588
|
A = A.trim();
|
|
2576
2589
|
let g = A.indexOf("(");
|
|
2577
2590
|
return g !== -1 ? A.substr(0, g) : A;
|
|
2578
|
-
}, yQ = (A, g, I, B, t,
|
|
2591
|
+
}, yQ = (A, g, I, B, t, a, c, l) => {
|
|
2579
2592
|
var d = NI(I, B);
|
|
2580
|
-
g = KA(g), g = NC(g),
|
|
2593
|
+
g = KA(g), g = NC(g), a = tg(t, a), eg([], [A], (F) => {
|
|
2581
2594
|
F = F[0];
|
|
2582
2595
|
var k = `${F.name}.${g}`;
|
|
2583
2596
|
function m() {
|
|
@@ -2586,12 +2599,12 @@ return ret;
|
|
|
2586
2599
|
g.startsWith("@@") && (g = Symbol[g.substring(2)]);
|
|
2587
2600
|
var p = F.registeredClass.constructor;
|
|
2588
2601
|
return p[g] === void 0 ? (m.argCount = I - 1, p[g] = m) : (fI(p, g, k), p[g].overloadTable[I - 1] = m), eg([], d, (K) => {
|
|
2589
|
-
var W = [K[0], null].concat(K.slice(1)), rA = FI(k, W, null,
|
|
2602
|
+
var W = [K[0], null].concat(K.slice(1)), rA = FI(k, W, null, a, c, l);
|
|
2590
2603
|
if (p[g].overloadTable === void 0 ? (rA.argCount = I - 1, p[g] = rA) : p[g].overloadTable[I - 1] = rA, F.registeredClass.__derivedClasses) for (let aA of F.registeredClass.__derivedClasses) aA.constructor.hasOwnProperty(g) || (aA.constructor[g] = rA);
|
|
2591
2604
|
return [];
|
|
2592
2605
|
}), [];
|
|
2593
2606
|
});
|
|
2594
|
-
}, uQ = (A, g, I, B, t,
|
|
2607
|
+
}, uQ = (A, g, I, B, t, a) => {
|
|
2595
2608
|
var c = NI(g, I);
|
|
2596
2609
|
t = tg(B, t), eg([], [A], (l) => {
|
|
2597
2610
|
l = l[0];
|
|
@@ -2599,11 +2612,11 @@ return ret;
|
|
|
2599
2612
|
if (l.registeredClass.constructor_body === void 0 && (l.registeredClass.constructor_body = []), l.registeredClass.constructor_body[g - 1] !== void 0) throw new ng(`Cannot register multiple constructors with identical number of parameters (${g - 1}) for class '${l.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
2600
2613
|
return l.registeredClass.constructor_body[g - 1] = () => {
|
|
2601
2614
|
Zg(`Cannot construct ${l.name} due to unbound types`, c);
|
|
2602
|
-
}, eg([], c, (F) => (F.splice(1, 0, null), l.registeredClass.constructor_body[g - 1] = FI(d, F, null, t,
|
|
2615
|
+
}, eg([], c, (F) => (F.splice(1, 0, null), l.registeredClass.constructor_body[g - 1] = FI(d, F, null, t, a), [])), [];
|
|
2603
2616
|
});
|
|
2604
|
-
}, fQ = (A, g, I, B, t,
|
|
2617
|
+
}, fQ = (A, g, I, B, t, a, c, l, d) => {
|
|
2605
2618
|
var F = NI(I, B);
|
|
2606
|
-
g = KA(g), g = NC(g),
|
|
2619
|
+
g = KA(g), g = NC(g), a = tg(t, a), eg([], [A], (k) => {
|
|
2607
2620
|
k = k[0];
|
|
2608
2621
|
var m = `${k.name}.${g}`;
|
|
2609
2622
|
g.startsWith("@@") && (g = Symbol[g.substring(2)]), l && k.registeredClass.pureVirtualFunctions.push(g);
|
|
@@ -2612,7 +2625,7 @@ return ret;
|
|
|
2612
2625
|
}
|
|
2613
2626
|
var K = k.registeredClass.instancePrototype, W = K[g];
|
|
2614
2627
|
return W === void 0 || W.overloadTable === void 0 && W.className !== k.name && W.argCount === I - 2 ? (p.argCount = I - 2, p.className = k.name, K[g] = p) : (fI(K, g, m), K[g].overloadTable[I - 2] = p), eg([], F, (rA) => {
|
|
2615
|
-
var aA = FI(m, rA, k,
|
|
2628
|
+
var aA = FI(m, rA, k, a, c, d);
|
|
2616
2629
|
return K[g].overloadTable === void 0 ? (aA.argCount = I - 2, K[g] = aA) : K[g].overloadTable[I - 2] = aA, [];
|
|
2617
2630
|
}), [];
|
|
2618
2631
|
});
|
|
@@ -2670,10 +2683,10 @@ return ret;
|
|
|
2670
2683
|
}
|
|
2671
2684
|
}, SQ = (A, g, I, B, t) => {
|
|
2672
2685
|
g = KA(g);
|
|
2673
|
-
var
|
|
2686
|
+
var a = (k) => k;
|
|
2674
2687
|
if (B === 0) {
|
|
2675
2688
|
var c = 32 - 8 * I;
|
|
2676
|
-
|
|
2689
|
+
a = (k) => k << c >>> c;
|
|
2677
2690
|
}
|
|
2678
2691
|
var l = g.includes("unsigned"), d = (k, m) => {
|
|
2679
2692
|
}, F;
|
|
@@ -2681,35 +2694,35 @@ return ret;
|
|
|
2681
2694
|
return d(m, this.name), m >>> 0;
|
|
2682
2695
|
} : F = function(k, m) {
|
|
2683
2696
|
return d(m, this.name), m;
|
|
2684
|
-
}, XA(A, { name: g, fromWireType:
|
|
2697
|
+
}, XA(A, { name: g, fromWireType: a, toWireType: F, argPackAdvance: gg, readValueFromPointer: UQ(g, I, B !== 0), destructorFunction: null });
|
|
2685
2698
|
}, MQ = (A, g, I) => {
|
|
2686
2699
|
var B = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], t = B[g];
|
|
2687
|
-
function
|
|
2700
|
+
function a(c) {
|
|
2688
2701
|
var l = z[c >> 2], d = z[c + 4 >> 2];
|
|
2689
2702
|
return new t(Y.buffer, d, l);
|
|
2690
2703
|
}
|
|
2691
|
-
I = KA(I), XA(A, { name: I, fromWireType:
|
|
2704
|
+
I = KA(I), XA(A, { name: I, fromWireType: a, argPackAdvance: gg, readValueFromPointer: a }, { ignoreDuplicateRegistrations: !0 });
|
|
2692
2705
|
}, pQ = (A, g) => {
|
|
2693
2706
|
GC(A);
|
|
2694
2707
|
}, LI = (A, g, I, B) => {
|
|
2695
2708
|
if (!(B > 0)) return 0;
|
|
2696
|
-
for (var t = I,
|
|
2709
|
+
for (var t = I, a = I + B - 1, c = 0; c < A.length; ++c) {
|
|
2697
2710
|
var l = A.charCodeAt(c);
|
|
2698
2711
|
if (l >= 55296 && l <= 57343) {
|
|
2699
2712
|
var d = A.charCodeAt(++c);
|
|
2700
2713
|
l = 65536 + ((l & 1023) << 10) | d & 1023;
|
|
2701
2714
|
}
|
|
2702
2715
|
if (l <= 127) {
|
|
2703
|
-
if (I >=
|
|
2716
|
+
if (I >= a) break;
|
|
2704
2717
|
g[I++] = l;
|
|
2705
2718
|
} else if (l <= 2047) {
|
|
2706
|
-
if (I + 1 >=
|
|
2719
|
+
if (I + 1 >= a) break;
|
|
2707
2720
|
g[I++] = 192 | l >> 6, g[I++] = 128 | l & 63;
|
|
2708
2721
|
} else if (l <= 65535) {
|
|
2709
|
-
if (I + 2 >=
|
|
2722
|
+
if (I + 2 >= a) break;
|
|
2710
2723
|
g[I++] = 224 | l >> 12, g[I++] = 128 | l >> 6 & 63, g[I++] = 128 | l & 63;
|
|
2711
2724
|
} else {
|
|
2712
|
-
if (I + 3 >=
|
|
2725
|
+
if (I + 3 >= a) break;
|
|
2713
2726
|
g[I++] = 240 | l >> 18, g[I++] = 128 | l >> 12 & 63, g[I++] = 128 | l >> 6 & 63, g[I++] = 128 | l & 63;
|
|
2714
2727
|
}
|
|
2715
2728
|
}
|
|
@@ -2723,53 +2736,53 @@ return ret;
|
|
|
2723
2736
|
}, LC = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0, rg = (A, g, I) => {
|
|
2724
2737
|
for (var B = g + I, t = g; A[t] && !(t >= B); ) ++t;
|
|
2725
2738
|
if (t - g > 16 && A.buffer && LC) return LC.decode(A.subarray(g, t));
|
|
2726
|
-
for (var
|
|
2739
|
+
for (var a = ""; g < t; ) {
|
|
2727
2740
|
var c = A[g++];
|
|
2728
2741
|
if (!(c & 128)) {
|
|
2729
|
-
|
|
2742
|
+
a += String.fromCharCode(c);
|
|
2730
2743
|
continue;
|
|
2731
2744
|
}
|
|
2732
2745
|
var l = A[g++] & 63;
|
|
2733
2746
|
if ((c & 224) == 192) {
|
|
2734
|
-
|
|
2747
|
+
a += String.fromCharCode((c & 31) << 6 | l);
|
|
2735
2748
|
continue;
|
|
2736
2749
|
}
|
|
2737
2750
|
var d = A[g++] & 63;
|
|
2738
|
-
if ((c & 240) == 224 ? c = (c & 15) << 12 | l << 6 | d : c = (c & 7) << 18 | l << 12 | d << 6 | A[g++] & 63, c < 65536)
|
|
2751
|
+
if ((c & 240) == 224 ? c = (c & 15) << 12 | l << 6 | d : c = (c & 7) << 18 | l << 12 | d << 6 | A[g++] & 63, c < 65536) a += String.fromCharCode(c);
|
|
2739
2752
|
else {
|
|
2740
2753
|
var F = c - 65536;
|
|
2741
|
-
|
|
2754
|
+
a += String.fromCharCode(55296 | F >> 10, 56320 | F & 1023);
|
|
2742
2755
|
}
|
|
2743
2756
|
}
|
|
2744
|
-
return
|
|
2757
|
+
return a;
|
|
2745
2758
|
}, $g = (A, g) => A ? rg(x, A, g) : "", JQ = (A, g) => {
|
|
2746
2759
|
g = KA(g);
|
|
2747
2760
|
var I = g === "std::string";
|
|
2748
2761
|
XA(A, { name: g, fromWireType(B) {
|
|
2749
|
-
var t = z[B >> 2],
|
|
2750
|
-
if (I) for (var l =
|
|
2751
|
-
var F =
|
|
2762
|
+
var t = z[B >> 2], a = B + 4, c;
|
|
2763
|
+
if (I) for (var l = a, d = 0; d <= t; ++d) {
|
|
2764
|
+
var F = a + d;
|
|
2752
2765
|
if (d == t || x[F] == 0) {
|
|
2753
2766
|
var k = F - l, m = $g(l, k);
|
|
2754
2767
|
c === void 0 ? c = m : (c += "\0", c += m), l = F + 1;
|
|
2755
2768
|
}
|
|
2756
2769
|
}
|
|
2757
2770
|
else {
|
|
2758
|
-
for (var p = new Array(t), d = 0; d < t; ++d) p[d] = String.fromCharCode(x[
|
|
2771
|
+
for (var p = new Array(t), d = 0; d < t; ++d) p[d] = String.fromCharCode(x[a + d]);
|
|
2759
2772
|
c = p.join("");
|
|
2760
2773
|
}
|
|
2761
2774
|
return ZA(B), c;
|
|
2762
2775
|
}, toWireType(B, t) {
|
|
2763
2776
|
t instanceof ArrayBuffer && (t = new Uint8Array(t));
|
|
2764
|
-
var
|
|
2765
|
-
c || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Int8Array || CA("Cannot pass non-string to std::string"), I && c ?
|
|
2766
|
-
var l = JI(4 +
|
|
2767
|
-
if (z[l >> 2] =
|
|
2768
|
-
else if (c) for (var F = 0; F <
|
|
2777
|
+
var a, c = typeof t == "string";
|
|
2778
|
+
c || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Int8Array || CA("Cannot pass non-string to std::string"), I && c ? a = UI(t) : a = t.length;
|
|
2779
|
+
var l = JI(4 + a + 1), d = l + 4;
|
|
2780
|
+
if (z[l >> 2] = a, I && c) kC(t, d, a + 1);
|
|
2781
|
+
else if (c) for (var F = 0; F < a; ++F) {
|
|
2769
2782
|
var k = t.charCodeAt(F);
|
|
2770
2783
|
k > 255 && (ZA(d), CA("String has UTF-16 code units that do not fit in 8 bits")), x[d + F] = k;
|
|
2771
2784
|
}
|
|
2772
|
-
else for (var F = 0; F <
|
|
2785
|
+
else for (var F = 0; F < a; ++F) x[d + F] = t[F];
|
|
2773
2786
|
return B !== null && B.push(ZA, l), l;
|
|
2774
2787
|
}, argPackAdvance: gg, readValueFromPointer: Xg, destructorFunction(B) {
|
|
2775
2788
|
ZA(B);
|
|
@@ -2777,17 +2790,17 @@ return ret;
|
|
|
2777
2790
|
}, UC = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, YQ = (A, g) => {
|
|
2778
2791
|
for (var I = A, B = I >> 1, t = B + g / 2; !(B >= t) && Z[B]; ) ++B;
|
|
2779
2792
|
if (I = B << 1, I - A > 32 && UC) return UC.decode(x.subarray(A, I));
|
|
2780
|
-
for (var
|
|
2793
|
+
for (var a = "", c = 0; !(c >= g / 2); ++c) {
|
|
2781
2794
|
var l = j[A + c * 2 >> 1];
|
|
2782
2795
|
if (l == 0) break;
|
|
2783
|
-
|
|
2796
|
+
a += String.fromCharCode(l);
|
|
2784
2797
|
}
|
|
2785
|
-
return
|
|
2798
|
+
return a;
|
|
2786
2799
|
}, HQ = (A, g, I) => {
|
|
2787
2800
|
if (I ?? (I = 2147483647), I < 2) return 0;
|
|
2788
2801
|
I -= 2;
|
|
2789
|
-
for (var B = g, t = I < A.length * 2 ? I / 2 : A.length,
|
|
2790
|
-
var c = A.charCodeAt(
|
|
2802
|
+
for (var B = g, t = I < A.length * 2 ? I / 2 : A.length, a = 0; a < t; ++a) {
|
|
2803
|
+
var c = A.charCodeAt(a);
|
|
2791
2804
|
j[g >> 1] = c, g += 2;
|
|
2792
2805
|
}
|
|
2793
2806
|
return j[g >> 1] = 0, g - B;
|
|
@@ -2796,17 +2809,17 @@ return ret;
|
|
|
2796
2809
|
var t = P[A + I * 4 >> 2];
|
|
2797
2810
|
if (t == 0) break;
|
|
2798
2811
|
if (++I, t >= 65536) {
|
|
2799
|
-
var
|
|
2800
|
-
B += String.fromCharCode(55296 |
|
|
2812
|
+
var a = t - 65536;
|
|
2813
|
+
B += String.fromCharCode(55296 | a >> 10, 56320 | a & 1023);
|
|
2801
2814
|
} else B += String.fromCharCode(t);
|
|
2802
2815
|
}
|
|
2803
2816
|
return B;
|
|
2804
2817
|
}, qQ = (A, g, I) => {
|
|
2805
2818
|
if (I ?? (I = 2147483647), I < 4) return 0;
|
|
2806
|
-
for (var B = g, t = B + I - 4,
|
|
2807
|
-
var c = A.charCodeAt(
|
|
2819
|
+
for (var B = g, t = B + I - 4, a = 0; a < A.length; ++a) {
|
|
2820
|
+
var c = A.charCodeAt(a);
|
|
2808
2821
|
if (c >= 55296 && c <= 57343) {
|
|
2809
|
-
var l = A.charCodeAt(++
|
|
2822
|
+
var l = A.charCodeAt(++a);
|
|
2810
2823
|
c = 65536 + ((c & 1023) << 10) | l & 1023;
|
|
2811
2824
|
}
|
|
2812
2825
|
if (P[g >> 2] = c, g += 4, g + 4 > t) break;
|
|
@@ -2820,11 +2833,11 @@ return ret;
|
|
|
2820
2833
|
return g;
|
|
2821
2834
|
}, xQ = (A, g, I) => {
|
|
2822
2835
|
I = KA(I);
|
|
2823
|
-
var B, t,
|
|
2824
|
-
g === 2 ? (B = YQ, t = HQ, c = mQ,
|
|
2836
|
+
var B, t, a, c;
|
|
2837
|
+
g === 2 ? (B = YQ, t = HQ, c = mQ, a = (l) => Z[l >> 1]) : g === 4 && (B = KQ, t = qQ, c = vQ, a = (l) => z[l >> 2]), XA(A, { name: I, fromWireType: (l) => {
|
|
2825
2838
|
for (var d = z[l >> 2], F, k = l + 4, m = 0; m <= d; ++m) {
|
|
2826
2839
|
var p = l + 4 + m * g;
|
|
2827
|
-
if (m == d ||
|
|
2840
|
+
if (m == d || a(p) == 0) {
|
|
2828
2841
|
var K = p - k, W = B(k, K);
|
|
2829
2842
|
F === void 0 ? F = W : (F += "\0", F += W), k = p + g;
|
|
2830
2843
|
}
|
|
@@ -2899,8 +2912,8 @@ return ret;
|
|
|
2899
2912
|
}, IE = (A, g) => {
|
|
2900
2913
|
var I = 0;
|
|
2901
2914
|
return kg().forEach((B, t) => {
|
|
2902
|
-
var
|
|
2903
|
-
z[A + t * 4 >> 2] =
|
|
2915
|
+
var a = g + I;
|
|
2916
|
+
z[A + t * 4 >> 2] = a, gE(B, a), I += B.length + 1;
|
|
2904
2917
|
}), 0;
|
|
2905
2918
|
}, CE = (A, g) => {
|
|
2906
2919
|
var I = kg();
|
|
@@ -2945,7 +2958,7 @@ return ret;
|
|
|
2945
2958
|
if (!t) return "";
|
|
2946
2959
|
g = t + "/" + g, I = tA.isAbs(t);
|
|
2947
2960
|
}
|
|
2948
|
-
return g = tA.normalizeArray(g.split("/").filter((
|
|
2961
|
+
return g = tA.normalizeArray(g.split("/").filter((a) => !!a), !I).join("/"), (I ? "/" : "") + g || ".";
|
|
2949
2962
|
}, relative: (A, g) => {
|
|
2950
2963
|
A = zA.resolve(A).substr(1), g = zA.resolve(g).substr(1);
|
|
2951
2964
|
function I(F) {
|
|
@@ -2953,7 +2966,7 @@ return ret;
|
|
|
2953
2966
|
for (var m = F.length - 1; m >= 0 && F[m] === ""; m--) ;
|
|
2954
2967
|
return k > m ? [] : F.slice(k, m - k + 1);
|
|
2955
2968
|
}
|
|
2956
|
-
for (var B = I(A.split("/")), t = I(g.split("/")),
|
|
2969
|
+
for (var B = I(A.split("/")), t = I(g.split("/")), a = Math.min(B.length, t.length), c = a, l = 0; l < a; l++) if (B[l] !== t[l]) {
|
|
2957
2970
|
c = l;
|
|
2958
2971
|
break;
|
|
2959
2972
|
}
|
|
@@ -2961,8 +2974,8 @@ return ret;
|
|
|
2961
2974
|
return d = d.concat(t.slice(c)), d.join("/");
|
|
2962
2975
|
} }, MI = [];
|
|
2963
2976
|
function AI(A, g, I) {
|
|
2964
|
-
var B = UI(A) + 1, t = new Array(B),
|
|
2965
|
-
return g && (t.length =
|
|
2977
|
+
var B = UI(A) + 1, t = new Array(B), a = LI(A, t, 0, t.length);
|
|
2978
|
+
return g && (t.length = a), t;
|
|
2966
2979
|
}
|
|
2967
2980
|
var QE = () => {
|
|
2968
2981
|
if (!MI.length) {
|
|
@@ -2971,9 +2984,9 @@ return ret;
|
|
|
2971
2984
|
var g = 256, I = Buffer.alloc(g), B = 0, t = process.stdin.fd;
|
|
2972
2985
|
try {
|
|
2973
2986
|
B = $.readSync(t, I);
|
|
2974
|
-
} catch (
|
|
2975
|
-
if (
|
|
2976
|
-
else throw
|
|
2987
|
+
} catch (a) {
|
|
2988
|
+
if (a.toString().includes("EOF")) B = 0;
|
|
2989
|
+
else throw a;
|
|
2977
2990
|
}
|
|
2978
2991
|
B > 0 ? A = I.slice(0, B).toString("utf-8") : A = null;
|
|
2979
2992
|
} else typeof window < "u" && typeof window.prompt == "function" ? (A = window.prompt("Input: "), A !== null && (A += `
|
|
@@ -2997,26 +3010,26 @@ return ret;
|
|
|
2997
3010
|
A.tty.ops.fsync(A.tty);
|
|
2998
3011
|
}, read(A, g, I, B, t) {
|
|
2999
3012
|
if (!A.tty || !A.tty.ops.get_char) throw new E.ErrnoError(60);
|
|
3000
|
-
for (var
|
|
3013
|
+
for (var a = 0, c = 0; c < B; c++) {
|
|
3001
3014
|
var l;
|
|
3002
3015
|
try {
|
|
3003
3016
|
l = A.tty.ops.get_char(A.tty);
|
|
3004
3017
|
} catch {
|
|
3005
3018
|
throw new E.ErrnoError(29);
|
|
3006
3019
|
}
|
|
3007
|
-
if (l === void 0 &&
|
|
3020
|
+
if (l === void 0 && a === 0) throw new E.ErrnoError(6);
|
|
3008
3021
|
if (l == null) break;
|
|
3009
|
-
|
|
3022
|
+
a++, g[I + c] = l;
|
|
3010
3023
|
}
|
|
3011
|
-
return
|
|
3024
|
+
return a && (A.node.timestamp = Date.now()), a;
|
|
3012
3025
|
}, write(A, g, I, B, t) {
|
|
3013
3026
|
if (!A.tty || !A.tty.ops.put_char) throw new E.ErrnoError(60);
|
|
3014
3027
|
try {
|
|
3015
|
-
for (var
|
|
3028
|
+
for (var a = 0; a < B; a++) A.tty.ops.put_char(A.tty, g[I + a]);
|
|
3016
3029
|
} catch {
|
|
3017
3030
|
throw new E.ErrnoError(29);
|
|
3018
3031
|
}
|
|
3019
|
-
return B && (A.node.timestamp = Date.now()),
|
|
3032
|
+
return B && (A.node.timestamp = Date.now()), a;
|
|
3020
3033
|
} }, default_tty_ops: { get_char(A) {
|
|
3021
3034
|
return QE();
|
|
3022
3035
|
}, put_char(A, g) {
|
|
@@ -3096,17 +3109,17 @@ return ret;
|
|
|
3096
3109
|
if (!E.isLink(A.mode)) throw new E.ErrnoError(28);
|
|
3097
3110
|
return A.link;
|
|
3098
3111
|
} }, stream_ops: { read(A, g, I, B, t) {
|
|
3099
|
-
var
|
|
3112
|
+
var a = A.node.contents;
|
|
3100
3113
|
if (t >= A.node.usedBytes) return 0;
|
|
3101
3114
|
var c = Math.min(A.node.usedBytes - t, B);
|
|
3102
|
-
if (c > 8 &&
|
|
3103
|
-
else for (var l = 0; l < c; l++) g[I + l] =
|
|
3115
|
+
if (c > 8 && a.subarray) g.set(a.subarray(t, t + c), I);
|
|
3116
|
+
else for (var l = 0; l < c; l++) g[I + l] = a[t + l];
|
|
3104
3117
|
return c;
|
|
3105
|
-
}, write(A, g, I, B, t,
|
|
3118
|
+
}, write(A, g, I, B, t, a) {
|
|
3106
3119
|
if (!B) return 0;
|
|
3107
3120
|
var c = A.node;
|
|
3108
3121
|
if (c.timestamp = Date.now(), g.subarray && (!c.contents || c.contents.subarray)) {
|
|
3109
|
-
if (
|
|
3122
|
+
if (a) return c.contents = g.subarray(I, I + B), c.usedBytes = B, B;
|
|
3110
3123
|
if (c.usedBytes === 0 && t === 0) return c.contents = g.slice(I, I + B), c.usedBytes = B, B;
|
|
3111
3124
|
if (t + B <= c.usedBytes) return c.contents.set(g.subarray(I, I + B), t), B;
|
|
3112
3125
|
}
|
|
@@ -3121,36 +3134,36 @@ return ret;
|
|
|
3121
3134
|
O.expandFileStorage(A.node, g + I), A.node.usedBytes = Math.max(A.node.usedBytes, g + I);
|
|
3122
3135
|
}, mmap(A, g, I, B, t) {
|
|
3123
3136
|
if (!E.isFile(A.node.mode)) throw new E.ErrnoError(43);
|
|
3124
|
-
var
|
|
3125
|
-
if (!(t & 2) && l.buffer === Y.buffer) c = !1,
|
|
3137
|
+
var a, c, l = A.node.contents;
|
|
3138
|
+
if (!(t & 2) && l.buffer === Y.buffer) c = !1, a = l.byteOffset;
|
|
3126
3139
|
else {
|
|
3127
|
-
if ((I > 0 || I + g < l.length) && (l.subarray ? l = l.subarray(I, I + g) : l = Array.prototype.slice.call(l, I, I + g)), c = !0,
|
|
3128
|
-
Y.set(l,
|
|
3140
|
+
if ((I > 0 || I + g < l.length) && (l.subarray ? l = l.subarray(I, I + g) : l = Array.prototype.slice.call(l, I, I + g)), c = !0, a = KC(g), !a) throw new E.ErrnoError(48);
|
|
3141
|
+
Y.set(l, a);
|
|
3129
3142
|
}
|
|
3130
|
-
return { ptr:
|
|
3143
|
+
return { ptr: a, allocated: c };
|
|
3131
3144
|
}, msync(A, g, I, B, t) {
|
|
3132
3145
|
return O.stream_ops.write(A, g, 0, B, I, !1), 0;
|
|
3133
3146
|
} } }, tE = (A, g, I, B) => {
|
|
3134
3147
|
var t = `al ${A}`;
|
|
3135
|
-
_(A, (
|
|
3136
|
-
g(new Uint8Array(
|
|
3137
|
-
}, (
|
|
3148
|
+
_(A, (a) => {
|
|
3149
|
+
g(new Uint8Array(a)), t && vg();
|
|
3150
|
+
}, (a) => {
|
|
3138
3151
|
if (I) I();
|
|
3139
3152
|
else throw `Loading data file "${A}" failed.`;
|
|
3140
3153
|
}), t && wI();
|
|
3141
|
-
}, oE = (A, g, I, B, t,
|
|
3142
|
-
E.createDataFile(A, g, I, B, t,
|
|
3154
|
+
}, oE = (A, g, I, B, t, a) => {
|
|
3155
|
+
E.createDataFile(A, g, I, B, t, a);
|
|
3143
3156
|
}, iE = n.preloadPlugins || [], nE = (A, g, I, B) => {
|
|
3144
3157
|
typeof Browser < "u" && Browser.init();
|
|
3145
3158
|
var t = !1;
|
|
3146
|
-
return iE.forEach((
|
|
3147
|
-
t ||
|
|
3159
|
+
return iE.forEach((a) => {
|
|
3160
|
+
t || a.canHandle(g) && (a.handle(A, g, I, B), t = !0);
|
|
3148
3161
|
}), t;
|
|
3149
|
-
}, rE = (A, g, I, B, t,
|
|
3162
|
+
}, rE = (A, g, I, B, t, a, c, l, d, F) => {
|
|
3150
3163
|
var k = g ? zA.resolve(tA.join2(A, g)) : A;
|
|
3151
3164
|
function m(p) {
|
|
3152
3165
|
function K(W) {
|
|
3153
|
-
F == null || F(), l || oE(A, g, W, B, t, d),
|
|
3166
|
+
F == null || F(), l || oE(A, g, W, B, t, d), a == null || a(), vg();
|
|
3154
3167
|
}
|
|
3155
3168
|
nE(p, k, K, () => {
|
|
3156
3169
|
c == null || c(), vg();
|
|
@@ -3225,17 +3238,17 @@ return ret;
|
|
|
3225
3238
|
if (A = zA.resolve(A), !A) return { path: "", node: null };
|
|
3226
3239
|
var I = { follow_mount: !0, recurse_count: 0 };
|
|
3227
3240
|
if (g = Object.assign(I, g), g.recurse_count > 8) throw new E.ErrnoError(32);
|
|
3228
|
-
for (var B = A.split("/").filter((m) => !!m), t = E.root,
|
|
3241
|
+
for (var B = A.split("/").filter((m) => !!m), t = E.root, a = "/", c = 0; c < B.length; c++) {
|
|
3229
3242
|
var l = c === B.length - 1;
|
|
3230
3243
|
if (l && g.parent) break;
|
|
3231
|
-
if (t = E.lookupNode(t, B[c]),
|
|
3232
|
-
var F = E.readlink(
|
|
3233
|
-
|
|
3234
|
-
var k = E.lookupPath(
|
|
3244
|
+
if (t = E.lookupNode(t, B[c]), a = tA.join2(a, B[c]), E.isMountpoint(t) && (!l || l && g.follow_mount) && (t = t.mounted.root), !l || g.follow) for (var d = 0; E.isLink(t.mode); ) {
|
|
3245
|
+
var F = E.readlink(a);
|
|
3246
|
+
a = zA.resolve(tA.dirname(a), F);
|
|
3247
|
+
var k = E.lookupPath(a, { recurse_count: g.recurse_count + 1 });
|
|
3235
3248
|
if (t = k.node, d++ > 40) throw new E.ErrnoError(32);
|
|
3236
3249
|
}
|
|
3237
3250
|
}
|
|
3238
|
-
return { path:
|
|
3251
|
+
return { path: a, node: t };
|
|
3239
3252
|
}, getPath(A) {
|
|
3240
3253
|
for (var g; ; ) {
|
|
3241
3254
|
if (E.isRoot(A)) {
|
|
@@ -3264,8 +3277,8 @@ return ret;
|
|
|
3264
3277
|
var I = E.mayLookup(A);
|
|
3265
3278
|
if (I) throw new E.ErrnoError(I);
|
|
3266
3279
|
for (var B = E.hashName(A.id, g), t = E.nameTable[B]; t; t = t.name_next) {
|
|
3267
|
-
var
|
|
3268
|
-
if (t.parent.id === A.id &&
|
|
3280
|
+
var a = t.name;
|
|
3281
|
+
if (t.parent.id === A.id && a === g) return t;
|
|
3269
3282
|
}
|
|
3270
3283
|
return E.lookup(A, g);
|
|
3271
3284
|
}, createNode(A, g, I, B) {
|
|
@@ -3311,8 +3324,8 @@ return ret;
|
|
|
3311
3324
|
var B;
|
|
3312
3325
|
try {
|
|
3313
3326
|
B = E.lookupNode(A, g);
|
|
3314
|
-
} catch (
|
|
3315
|
-
return
|
|
3327
|
+
} catch (a) {
|
|
3328
|
+
return a.errno;
|
|
3316
3329
|
}
|
|
3317
3330
|
var t = E.nodePermissions(A, "wx");
|
|
3318
3331
|
if (t) return t;
|
|
@@ -3358,24 +3371,24 @@ return ret;
|
|
|
3358
3371
|
function t(c) {
|
|
3359
3372
|
return E.syncFSRequests--, g(c);
|
|
3360
3373
|
}
|
|
3361
|
-
function
|
|
3362
|
-
if (c) return
|
|
3374
|
+
function a(c) {
|
|
3375
|
+
if (c) return a.errored ? void 0 : (a.errored = !0, t(c));
|
|
3363
3376
|
++B >= I.length && t(null);
|
|
3364
3377
|
}
|
|
3365
3378
|
I.forEach((c) => {
|
|
3366
|
-
if (!c.type.syncfs) return
|
|
3367
|
-
c.type.syncfs(c, A,
|
|
3379
|
+
if (!c.type.syncfs) return a(null);
|
|
3380
|
+
c.type.syncfs(c, A, a);
|
|
3368
3381
|
});
|
|
3369
3382
|
}, mount(A, g, I) {
|
|
3370
|
-
var B = I === "/", t = !I,
|
|
3383
|
+
var B = I === "/", t = !I, a;
|
|
3371
3384
|
if (B && E.root) throw new E.ErrnoError(10);
|
|
3372
3385
|
if (!B && !t) {
|
|
3373
3386
|
var c = E.lookupPath(I, { follow_mount: !1 });
|
|
3374
|
-
if (I = c.path,
|
|
3375
|
-
if (!E.isDir(
|
|
3387
|
+
if (I = c.path, a = c.node, E.isMountpoint(a)) throw new E.ErrnoError(10);
|
|
3388
|
+
if (!E.isDir(a.mode)) throw new E.ErrnoError(54);
|
|
3376
3389
|
}
|
|
3377
3390
|
var l = { type: A, opts: g, mountpoint: I, mounts: [] }, d = A.mount(l);
|
|
3378
|
-
return d.mount = l, l.root = d, B ? E.root = d :
|
|
3391
|
+
return d.mount = l, l.root = d, B ? E.root = d : a && (a.mounted = l, a.mount && a.mount.mounts.push(l)), d;
|
|
3379
3392
|
}, unmount(A) {
|
|
3380
3393
|
var g = E.lookupPath(A, { follow_mount: !1 });
|
|
3381
3394
|
if (!E.isMountpoint(g.node)) throw new E.ErrnoError(28);
|
|
@@ -3386,17 +3399,17 @@ return ret;
|
|
|
3386
3399
|
t.includes(l.mount) && E.destroyNode(l), l = d;
|
|
3387
3400
|
}
|
|
3388
3401
|
}), I.mounted = null;
|
|
3389
|
-
var
|
|
3390
|
-
I.mount.mounts.splice(
|
|
3402
|
+
var a = I.mount.mounts.indexOf(B);
|
|
3403
|
+
I.mount.mounts.splice(a, 1);
|
|
3391
3404
|
}, lookup(A, g) {
|
|
3392
3405
|
return A.node_ops.lookup(A, g);
|
|
3393
3406
|
}, mknod(A, g, I) {
|
|
3394
|
-
var B = E.lookupPath(A, { parent: !0 }), t = B.node,
|
|
3395
|
-
if (!
|
|
3396
|
-
var c = E.mayCreate(t,
|
|
3407
|
+
var B = E.lookupPath(A, { parent: !0 }), t = B.node, a = tA.basename(A);
|
|
3408
|
+
if (!a || a === "." || a === "..") throw new E.ErrnoError(28);
|
|
3409
|
+
var c = E.mayCreate(t, a);
|
|
3397
3410
|
if (c) throw new E.ErrnoError(c);
|
|
3398
3411
|
if (!t.node_ops.mknod) throw new E.ErrnoError(63);
|
|
3399
|
-
return t.node_ops.mknod(t,
|
|
3412
|
+
return t.node_ops.mknod(t, a, g, I);
|
|
3400
3413
|
}, create(A, g) {
|
|
3401
3414
|
return g = g !== void 0 ? g : 438, g &= 4095, g |= 32768, E.mknod(A, g, 0);
|
|
3402
3415
|
}, mkdir(A, g) {
|
|
@@ -3406,8 +3419,8 @@ return ret;
|
|
|
3406
3419
|
B += "/" + I[t];
|
|
3407
3420
|
try {
|
|
3408
3421
|
E.mkdir(B, g);
|
|
3409
|
-
} catch (
|
|
3410
|
-
if (
|
|
3422
|
+
} catch (a) {
|
|
3423
|
+
if (a.errno != 20) throw a;
|
|
3411
3424
|
}
|
|
3412
3425
|
}
|
|
3413
3426
|
}, mkdev(A, g, I) {
|
|
@@ -3416,12 +3429,12 @@ return ret;
|
|
|
3416
3429
|
if (!zA.resolve(A)) throw new E.ErrnoError(44);
|
|
3417
3430
|
var I = E.lookupPath(g, { parent: !0 }), B = I.node;
|
|
3418
3431
|
if (!B) throw new E.ErrnoError(44);
|
|
3419
|
-
var t = tA.basename(g),
|
|
3420
|
-
if (
|
|
3432
|
+
var t = tA.basename(g), a = E.mayCreate(B, t);
|
|
3433
|
+
if (a) throw new E.ErrnoError(a);
|
|
3421
3434
|
if (!B.node_ops.symlink) throw new E.ErrnoError(63);
|
|
3422
3435
|
return B.node_ops.symlink(B, t, A);
|
|
3423
3436
|
}, rename(A, g) {
|
|
3424
|
-
var I = tA.dirname(A), B = tA.dirname(g), t = tA.basename(A),
|
|
3437
|
+
var I = tA.dirname(A), B = tA.dirname(g), t = tA.basename(A), a = tA.basename(g), c, l, d;
|
|
3425
3438
|
if (c = E.lookupPath(A, { parent: !0 }), l = c.node, c = E.lookupPath(g, { parent: !0 }), d = c.node, !l || !d) throw new E.ErrnoError(44);
|
|
3426
3439
|
if (l.mount !== d.mount) throw new E.ErrnoError(75);
|
|
3427
3440
|
var F = E.lookupNode(l, t), k = zA.relative(A, B);
|
|
@@ -3429,19 +3442,19 @@ return ret;
|
|
|
3429
3442
|
if (k = zA.relative(g, I), k.charAt(0) !== ".") throw new E.ErrnoError(55);
|
|
3430
3443
|
var m;
|
|
3431
3444
|
try {
|
|
3432
|
-
m = E.lookupNode(d,
|
|
3445
|
+
m = E.lookupNode(d, a);
|
|
3433
3446
|
} catch {
|
|
3434
3447
|
}
|
|
3435
3448
|
if (F !== m) {
|
|
3436
3449
|
var p = E.isDir(F.mode), K = E.mayDelete(l, t, p);
|
|
3437
3450
|
if (K) throw new E.ErrnoError(K);
|
|
3438
|
-
if (K = m ? E.mayDelete(d,
|
|
3451
|
+
if (K = m ? E.mayDelete(d, a, p) : E.mayCreate(d, a), K) throw new E.ErrnoError(K);
|
|
3439
3452
|
if (!l.node_ops.rename) throw new E.ErrnoError(63);
|
|
3440
3453
|
if (E.isMountpoint(F) || m && E.isMountpoint(m)) throw new E.ErrnoError(10);
|
|
3441
3454
|
if (d !== l && (K = E.nodePermissions(l, "w"), K)) throw new E.ErrnoError(K);
|
|
3442
3455
|
E.hashRemoveNode(F);
|
|
3443
3456
|
try {
|
|
3444
|
-
l.node_ops.rename(F, d,
|
|
3457
|
+
l.node_ops.rename(F, d, a);
|
|
3445
3458
|
} catch (W) {
|
|
3446
3459
|
throw W;
|
|
3447
3460
|
} finally {
|
|
@@ -3449,8 +3462,8 @@ return ret;
|
|
|
3449
3462
|
}
|
|
3450
3463
|
}
|
|
3451
3464
|
}, rmdir(A) {
|
|
3452
|
-
var g = E.lookupPath(A, { parent: !0 }), I = g.node, B = tA.basename(A), t = E.lookupNode(I, B),
|
|
3453
|
-
if (
|
|
3465
|
+
var g = E.lookupPath(A, { parent: !0 }), I = g.node, B = tA.basename(A), t = E.lookupNode(I, B), a = E.mayDelete(I, B, !0);
|
|
3466
|
+
if (a) throw new E.ErrnoError(a);
|
|
3454
3467
|
if (!I.node_ops.rmdir) throw new E.ErrnoError(63);
|
|
3455
3468
|
if (E.isMountpoint(t)) throw new E.ErrnoError(10);
|
|
3456
3469
|
I.node_ops.rmdir(I, B), E.destroyNode(t);
|
|
@@ -3461,8 +3474,8 @@ return ret;
|
|
|
3461
3474
|
}, unlink(A) {
|
|
3462
3475
|
var g = E.lookupPath(A, { parent: !0 }), I = g.node;
|
|
3463
3476
|
if (!I) throw new E.ErrnoError(44);
|
|
3464
|
-
var B = tA.basename(A), t = E.lookupNode(I, B),
|
|
3465
|
-
if (
|
|
3477
|
+
var B = tA.basename(A), t = E.lookupNode(I, B), a = E.mayDelete(I, B, !1);
|
|
3478
|
+
if (a) throw new E.ErrnoError(a);
|
|
3466
3479
|
if (!I.node_ops.unlink) throw new E.ErrnoError(63);
|
|
3467
3480
|
if (E.isMountpoint(t)) throw new E.ErrnoError(10);
|
|
3468
3481
|
I.node_ops.unlink(I, B), E.destroyNode(t);
|
|
@@ -3494,8 +3507,8 @@ return ret;
|
|
|
3494
3507
|
}, chown(A, g, I, B) {
|
|
3495
3508
|
var t;
|
|
3496
3509
|
if (typeof A == "string") {
|
|
3497
|
-
var
|
|
3498
|
-
t =
|
|
3510
|
+
var a = E.lookupPath(A, { follow: !B });
|
|
3511
|
+
t = a.node;
|
|
3499
3512
|
} else t = A;
|
|
3500
3513
|
if (!t.node_ops.setattr) throw new E.ErrnoError(63);
|
|
3501
3514
|
t.node_ops.setattr(t, { timestamp: Date.now() });
|
|
@@ -3537,17 +3550,17 @@ return ret;
|
|
|
3537
3550
|
} catch {
|
|
3538
3551
|
}
|
|
3539
3552
|
}
|
|
3540
|
-
var
|
|
3553
|
+
var a = !1;
|
|
3541
3554
|
if (g & 64) if (B) {
|
|
3542
3555
|
if (g & 128) throw new E.ErrnoError(20);
|
|
3543
|
-
} else B = E.mknod(A, I, 0),
|
|
3556
|
+
} else B = E.mknod(A, I, 0), a = !0;
|
|
3544
3557
|
if (!B) throw new E.ErrnoError(44);
|
|
3545
3558
|
if (E.isChrdev(B.mode) && (g &= -513), g & 65536 && !E.isDir(B.mode)) throw new E.ErrnoError(54);
|
|
3546
|
-
if (!
|
|
3559
|
+
if (!a) {
|
|
3547
3560
|
var c = E.mayOpen(B, g);
|
|
3548
3561
|
if (c) throw new E.ErrnoError(c);
|
|
3549
3562
|
}
|
|
3550
|
-
g & 512 && !
|
|
3563
|
+
g & 512 && !a && E.truncate(B, 0), g &= -131713;
|
|
3551
3564
|
var l = E.createStream({ node: B, path: E.getPath(B), flags: g, seekable: !0, position: 0, stream_ops: B.stream_ops, ungotten: [], error: !1 });
|
|
3552
3565
|
return l.stream_ops.open && l.stream_ops.open(l), n.logReadFiles && !(g & 1) && (E.readFiles || (E.readFiles = {}), A in E.readFiles || (E.readFiles[A] = 1)), l;
|
|
3553
3566
|
}, close(A) {
|
|
@@ -3574,12 +3587,12 @@ return ret;
|
|
|
3574
3587
|
if ((A.flags & 2097155) === 1) throw new E.ErrnoError(8);
|
|
3575
3588
|
if (E.isDir(A.node.mode)) throw new E.ErrnoError(31);
|
|
3576
3589
|
if (!A.stream_ops.read) throw new E.ErrnoError(28);
|
|
3577
|
-
var
|
|
3578
|
-
if (!
|
|
3590
|
+
var a = typeof t < "u";
|
|
3591
|
+
if (!a) t = A.position;
|
|
3579
3592
|
else if (!A.seekable) throw new E.ErrnoError(70);
|
|
3580
3593
|
var c = A.stream_ops.read(A, g, I, B, t);
|
|
3581
|
-
return
|
|
3582
|
-
}, write(A, g, I, B, t,
|
|
3594
|
+
return a || (A.position += c), c;
|
|
3595
|
+
}, write(A, g, I, B, t, a) {
|
|
3583
3596
|
if (B < 0 || t < 0) throw new E.ErrnoError(28);
|
|
3584
3597
|
if (E.isClosed(A)) throw new E.ErrnoError(8);
|
|
3585
3598
|
if (!(A.flags & 2097155)) throw new E.ErrnoError(8);
|
|
@@ -3589,7 +3602,7 @@ return ret;
|
|
|
3589
3602
|
var c = typeof t < "u";
|
|
3590
3603
|
if (!c) t = A.position;
|
|
3591
3604
|
else if (!A.seekable) throw new E.ErrnoError(70);
|
|
3592
|
-
var l = A.stream_ops.write(A, g, I, B, t,
|
|
3605
|
+
var l = A.stream_ops.write(A, g, I, B, t, a);
|
|
3593
3606
|
return c || (A.position += l), l;
|
|
3594
3607
|
}, allocate(A, g, I) {
|
|
3595
3608
|
if (E.isClosed(A)) throw new E.ErrnoError(8);
|
|
@@ -3610,14 +3623,14 @@ return ret;
|
|
|
3610
3623
|
return A.stream_ops.ioctl(A, g, I);
|
|
3611
3624
|
}, readFile(A, g = {}) {
|
|
3612
3625
|
if (g.flags = g.flags || 0, g.encoding = g.encoding || "binary", g.encoding !== "utf8" && g.encoding !== "binary") throw new Error(`Invalid encoding type "${g.encoding}"`);
|
|
3613
|
-
var I, B = E.open(A, g.flags), t = E.stat(A),
|
|
3614
|
-
return E.read(B, c, 0,
|
|
3626
|
+
var I, B = E.open(A, g.flags), t = E.stat(A), a = t.size, c = new Uint8Array(a);
|
|
3627
|
+
return E.read(B, c, 0, a, 0), g.encoding === "utf8" ? I = rg(c, 0) : g.encoding === "binary" && (I = c), E.close(B), I;
|
|
3615
3628
|
}, writeFile(A, g, I = {}) {
|
|
3616
3629
|
I.flags = I.flags || 577;
|
|
3617
3630
|
var B = E.open(A, I.flags, I.mode);
|
|
3618
3631
|
if (typeof g == "string") {
|
|
3619
|
-
var t = new Uint8Array(UI(g) + 1),
|
|
3620
|
-
E.write(B, t, 0,
|
|
3632
|
+
var t = new Uint8Array(UI(g) + 1), a = LI(g, t, 0, t.length);
|
|
3633
|
+
E.write(B, t, 0, a, void 0, I.canOwn);
|
|
3621
3634
|
} else if (ArrayBuffer.isView(g)) E.write(B, g, 0, g.byteLength, void 0, I.canOwn);
|
|
3622
3635
|
else throw new Error("Unsupported data type");
|
|
3623
3636
|
E.close(B);
|
|
@@ -3631,7 +3644,7 @@ return ret;
|
|
|
3631
3644
|
}, createDefaultDirectories() {
|
|
3632
3645
|
E.mkdir("/tmp"), E.mkdir("/home"), E.mkdir("/home/web_user");
|
|
3633
3646
|
}, createDefaultDevices() {
|
|
3634
|
-
E.mkdir("/dev"), E.registerDevice(E.makedev(1, 3), { read: () => 0, write: (B, t,
|
|
3647
|
+
E.mkdir("/dev"), E.registerDevice(E.makedev(1, 3), { read: () => 0, write: (B, t, a, c, l) => c }), E.mkdev("/dev/null", E.makedev(1, 3)), og.register(E.makedev(5, 0), og.default_tty_ops), og.register(E.makedev(6, 0), og.default_tty1_ops), E.mkdev("/dev/tty", E.makedev(5, 0)), E.mkdev("/dev/tty1", E.makedev(6, 0));
|
|
3635
3648
|
var A = new Uint8Array(1024), g = 0, I = () => (g === 0 && (g = mC(A).byteLength), A[--g]);
|
|
3636
3649
|
E.createDevice("/dev", "random", I), E.createDevice("/dev", "urandom", I), E.mkdir("/dev/shm"), E.mkdir("/dev/shm/tmp");
|
|
3637
3650
|
}, createSpecialDirectories() {
|
|
@@ -3640,7 +3653,7 @@ return ret;
|
|
|
3640
3653
|
E.mkdir("/proc/self/fd"), E.mount({ mount() {
|
|
3641
3654
|
var g = E.createNode(A, "fd", 16895, 73);
|
|
3642
3655
|
return g.node_ops = { lookup(I, B) {
|
|
3643
|
-
var t = +B,
|
|
3656
|
+
var t = +B, a = E.getStreamChecked(t), c = { parent: null, mount: { mountpoint: "fake" }, node_ops: { readlink: () => a.path } };
|
|
3644
3657
|
return c.parent = c, c;
|
|
3645
3658
|
} }, g;
|
|
3646
3659
|
} }, {}, "/proc/self/fd");
|
|
@@ -3678,9 +3691,9 @@ return ret;
|
|
|
3678
3691
|
}, createPath(A, g, I, B) {
|
|
3679
3692
|
A = typeof A == "string" ? A : E.getPath(A);
|
|
3680
3693
|
for (var t = g.split("/").reverse(); t.length; ) {
|
|
3681
|
-
var
|
|
3682
|
-
if (
|
|
3683
|
-
var c = tA.join2(A,
|
|
3694
|
+
var a = t.pop();
|
|
3695
|
+
if (a) {
|
|
3696
|
+
var c = tA.join2(A, a);
|
|
3684
3697
|
try {
|
|
3685
3698
|
E.mkdir(c);
|
|
3686
3699
|
} catch {
|
|
@@ -3690,9 +3703,9 @@ return ret;
|
|
|
3690
3703
|
}
|
|
3691
3704
|
return c;
|
|
3692
3705
|
}, createFile(A, g, I, B, t) {
|
|
3693
|
-
var
|
|
3694
|
-
return E.create(
|
|
3695
|
-
}, createDataFile(A, g, I, B, t,
|
|
3706
|
+
var a = tA.join2(typeof A == "string" ? A : E.getPath(A), g), c = pI(B, t);
|
|
3707
|
+
return E.create(a, c);
|
|
3708
|
+
}, createDataFile(A, g, I, B, t, a) {
|
|
3696
3709
|
var c = g;
|
|
3697
3710
|
A && (A = typeof A == "string" ? A : E.getPath(A), c = g ? tA.join2(A, g) : A);
|
|
3698
3711
|
var l = pI(B, t), d = E.create(c, l);
|
|
@@ -3703,10 +3716,10 @@ return ret;
|
|
|
3703
3716
|
}
|
|
3704
3717
|
E.chmod(d, l | 146);
|
|
3705
3718
|
var p = E.open(d, 577);
|
|
3706
|
-
E.write(p, I, 0, I.length, 0,
|
|
3719
|
+
E.write(p, I, 0, I.length, 0, a), E.close(p), E.chmod(d, l);
|
|
3707
3720
|
}
|
|
3708
3721
|
}, createDevice(A, g, I, B) {
|
|
3709
|
-
var t = tA.join2(typeof A == "string" ? A : E.getPath(A), g),
|
|
3722
|
+
var t = tA.join2(typeof A == "string" ? A : E.getPath(A), g), a = pI(!!I, !!B);
|
|
3710
3723
|
E.createDevice.major || (E.createDevice.major = 64);
|
|
3711
3724
|
var c = E.makedev(E.createDevice.major++, 0);
|
|
3712
3725
|
return E.registerDevice(c, { open(l) {
|
|
@@ -3734,7 +3747,7 @@ return ret;
|
|
|
3734
3747
|
throw new E.ErrnoError(29);
|
|
3735
3748
|
}
|
|
3736
3749
|
return k && (l.node.timestamp = Date.now()), p;
|
|
3737
|
-
} }), E.mkdev(t,
|
|
3750
|
+
} }), E.mkdev(t, a, c);
|
|
3738
3751
|
}, forceLoadFile(A) {
|
|
3739
3752
|
if (A.isDevice || A.isFolder || A.link || A.contents) return !0;
|
|
3740
3753
|
if (typeof XMLHttpRequest < "u") throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
|
|
@@ -3745,7 +3758,7 @@ return ret;
|
|
|
3745
3758
|
}
|
|
3746
3759
|
else throw new Error("Cannot load without read() or XMLHttpRequest.");
|
|
3747
3760
|
}, createLazyFile(A, g, I, B, t) {
|
|
3748
|
-
class
|
|
3761
|
+
class a {
|
|
3749
3762
|
constructor() {
|
|
3750
3763
|
this.lengthKnown = !1, this.chunks = [];
|
|
3751
3764
|
}
|
|
@@ -3785,7 +3798,7 @@ return ret;
|
|
|
3785
3798
|
}
|
|
3786
3799
|
if (typeof XMLHttpRequest < "u") {
|
|
3787
3800
|
if (!f) throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";
|
|
3788
|
-
var c = new
|
|
3801
|
+
var c = new a(), l = { isDevice: !1, contents: c };
|
|
3789
3802
|
} else var l = { isDevice: !1, url: I };
|
|
3790
3803
|
var d = E.createFile(A, g, l, B, t);
|
|
3791
3804
|
l.contents ? d.contents = l.contents : l.url && (d.contents = null, d.url = l.url), Object.defineProperties(d, { usedBytes: { get: function() {
|
|
@@ -3826,13 +3839,13 @@ return ret;
|
|
|
3826
3839
|
}, doStat(A, g, I) {
|
|
3827
3840
|
var B = A(g);
|
|
3828
3841
|
P[I >> 2] = B.dev, P[I + 4 >> 2] = B.mode, z[I + 8 >> 2] = B.nlink, P[I + 12 >> 2] = B.uid, P[I + 16 >> 2] = B.gid, P[I + 20 >> 2] = B.rdev, fA = [B.size >>> 0, (gA = B.size, +Math.abs(gA) >= 1 ? gA > 0 ? +Math.floor(gA / 4294967296) >>> 0 : ~~+Math.ceil((gA - +(~~gA >>> 0)) / 4294967296) >>> 0 : 0)], P[I + 24 >> 2] = fA[0], P[I + 28 >> 2] = fA[1], P[I + 32 >> 2] = 4096, P[I + 36 >> 2] = B.blocks;
|
|
3829
|
-
var t = B.atime.getTime(),
|
|
3830
|
-
return fA = [Math.floor(t / 1e3) >>> 0, (gA = Math.floor(t / 1e3), +Math.abs(gA) >= 1 ? gA > 0 ? +Math.floor(gA / 4294967296) >>> 0 : ~~+Math.ceil((gA - +(~~gA >>> 0)) / 4294967296) >>> 0 : 0)], P[I + 40 >> 2] = fA[0], P[I + 44 >> 2] = fA[1], z[I + 48 >> 2] = t % 1e3 * 1e3, fA = [Math.floor(
|
|
3842
|
+
var t = B.atime.getTime(), a = B.mtime.getTime(), c = B.ctime.getTime();
|
|
3843
|
+
return fA = [Math.floor(t / 1e3) >>> 0, (gA = Math.floor(t / 1e3), +Math.abs(gA) >= 1 ? gA > 0 ? +Math.floor(gA / 4294967296) >>> 0 : ~~+Math.ceil((gA - +(~~gA >>> 0)) / 4294967296) >>> 0 : 0)], P[I + 40 >> 2] = fA[0], P[I + 44 >> 2] = fA[1], z[I + 48 >> 2] = t % 1e3 * 1e3, fA = [Math.floor(a / 1e3) >>> 0, (gA = Math.floor(a / 1e3), +Math.abs(gA) >= 1 ? gA > 0 ? +Math.floor(gA / 4294967296) >>> 0 : ~~+Math.ceil((gA - +(~~gA >>> 0)) / 4294967296) >>> 0 : 0)], P[I + 56 >> 2] = fA[0], P[I + 60 >> 2] = fA[1], z[I + 64 >> 2] = a % 1e3 * 1e3, fA = [Math.floor(c / 1e3) >>> 0, (gA = Math.floor(c / 1e3), +Math.abs(gA) >= 1 ? gA > 0 ? +Math.floor(gA / 4294967296) >>> 0 : ~~+Math.ceil((gA - +(~~gA >>> 0)) / 4294967296) >>> 0 : 0)], P[I + 72 >> 2] = fA[0], P[I + 76 >> 2] = fA[1], z[I + 80 >> 2] = c % 1e3 * 1e3, fA = [B.ino >>> 0, (gA = B.ino, +Math.abs(gA) >= 1 ? gA > 0 ? +Math.floor(gA / 4294967296) >>> 0 : ~~+Math.ceil((gA - +(~~gA >>> 0)) / 4294967296) >>> 0 : 0)], P[I + 88 >> 2] = fA[0], P[I + 92 >> 2] = fA[1], 0;
|
|
3831
3844
|
}, doMsync(A, g, I, B, t) {
|
|
3832
3845
|
if (!E.isFile(g.node.mode)) throw new E.ErrnoError(43);
|
|
3833
3846
|
if (B & 2) return 0;
|
|
3834
|
-
var
|
|
3835
|
-
E.msync(g,
|
|
3847
|
+
var a = x.slice(A, A + I);
|
|
3848
|
+
E.msync(g, a, t, I, B);
|
|
3836
3849
|
}, getStreamFromFD(A) {
|
|
3837
3850
|
var g = E.getStreamChecked(A);
|
|
3838
3851
|
return g;
|
|
@@ -3850,7 +3863,7 @@ return ret;
|
|
|
3850
3863
|
}
|
|
3851
3864
|
}
|
|
3852
3865
|
var cE = (A, g, I, B) => {
|
|
3853
|
-
for (var t = 0,
|
|
3866
|
+
for (var t = 0, a = 0; a < I; a++) {
|
|
3854
3867
|
var c = z[g >> 2], l = z[g + 4 >> 2];
|
|
3855
3868
|
g += 8;
|
|
3856
3869
|
var d = E.read(A, Y, c, l, B);
|
|
@@ -3861,8 +3874,8 @@ return ret;
|
|
|
3861
3874
|
};
|
|
3862
3875
|
function lE(A, g, I, B) {
|
|
3863
3876
|
try {
|
|
3864
|
-
var t = Lg.getStreamFromFD(A),
|
|
3865
|
-
return z[B >> 2] =
|
|
3877
|
+
var t = Lg.getStreamFromFD(A), a = cE(t, g, I);
|
|
3878
|
+
return z[B >> 2] = a, 0;
|
|
3866
3879
|
} catch (c) {
|
|
3867
3880
|
if (typeof E > "u" || c.name !== "ErrnoError") throw c;
|
|
3868
3881
|
return c.errno;
|
|
@@ -3870,18 +3883,18 @@ return ret;
|
|
|
3870
3883
|
}
|
|
3871
3884
|
var wE = (A, g) => g + 2097152 >>> 0 < 4194305 - !!A ? (A >>> 0) + g * 4294967296 : NaN;
|
|
3872
3885
|
function hE(A, g, I, B, t) {
|
|
3873
|
-
var
|
|
3886
|
+
var a = wE(g, I);
|
|
3874
3887
|
try {
|
|
3875
|
-
if (isNaN(
|
|
3888
|
+
if (isNaN(a)) return 61;
|
|
3876
3889
|
var c = Lg.getStreamFromFD(A);
|
|
3877
|
-
return E.llseek(c,
|
|
3890
|
+
return E.llseek(c, a, B), fA = [c.position >>> 0, (gA = c.position, +Math.abs(gA) >= 1 ? gA > 0 ? +Math.floor(gA / 4294967296) >>> 0 : ~~+Math.ceil((gA - +(~~gA >>> 0)) / 4294967296) >>> 0 : 0)], P[t >> 2] = fA[0], P[t + 4 >> 2] = fA[1], c.getdents && a === 0 && B === 0 && (c.getdents = null), 0;
|
|
3878
3891
|
} catch (l) {
|
|
3879
3892
|
if (typeof E > "u" || l.name !== "ErrnoError") throw l;
|
|
3880
3893
|
return l.errno;
|
|
3881
3894
|
}
|
|
3882
3895
|
}
|
|
3883
3896
|
var DE = (A, g, I, B) => {
|
|
3884
|
-
for (var t = 0,
|
|
3897
|
+
for (var t = 0, a = 0; a < I; a++) {
|
|
3885
3898
|
var c = z[g >> 2], l = z[g + 4 >> 2];
|
|
3886
3899
|
g += 8;
|
|
3887
3900
|
var d = E.write(A, Y, c, l, B);
|
|
@@ -3892,8 +3905,8 @@ return ret;
|
|
|
3892
3905
|
};
|
|
3893
3906
|
function dE(A, g, I, B) {
|
|
3894
3907
|
try {
|
|
3895
|
-
var t = Lg.getStreamFromFD(A),
|
|
3896
|
-
return z[B >> 2] =
|
|
3908
|
+
var t = Lg.getStreamFromFD(A), a = DE(t, g, I);
|
|
3909
|
+
return z[B >> 2] = a, 0;
|
|
3897
3910
|
} catch (c) {
|
|
3898
3911
|
if (typeof E > "u" || c.name !== "ErrnoError") throw c;
|
|
3899
3912
|
return c.errno;
|
|
@@ -3904,15 +3917,15 @@ return ret;
|
|
|
3904
3917
|
return I;
|
|
3905
3918
|
}, qC = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], vC = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], uE = (A, g) => {
|
|
3906
3919
|
for (var I = new Date(A.getTime()); g > 0; ) {
|
|
3907
|
-
var B = gI(I.getFullYear()), t = I.getMonth(),
|
|
3908
|
-
if (g >
|
|
3920
|
+
var B = gI(I.getFullYear()), t = I.getMonth(), a = (B ? qC : vC)[t];
|
|
3921
|
+
if (g > a - I.getDate()) g -= a - I.getDate() + 1, I.setDate(1), t < 11 ? I.setMonth(t + 1) : (I.setMonth(0), I.setFullYear(I.getFullYear() + 1));
|
|
3909
3922
|
else return I.setDate(I.getDate() + g), I;
|
|
3910
3923
|
}
|
|
3911
3924
|
return I;
|
|
3912
3925
|
}, fE = (A, g) => {
|
|
3913
3926
|
Y.set(A, g);
|
|
3914
3927
|
}, RE = (A, g, I, B) => {
|
|
3915
|
-
var t = z[B + 40 >> 2],
|
|
3928
|
+
var t = z[B + 40 >> 2], a = { tm_sec: P[B >> 2], tm_min: P[B + 4 >> 2], tm_hour: P[B + 8 >> 2], tm_mday: P[B + 12 >> 2], tm_mon: P[B + 16 >> 2], tm_year: P[B + 20 >> 2], tm_wday: P[B + 24 >> 2], tm_yday: P[B + 28 >> 2], tm_isdst: P[B + 32 >> 2], tm_gmtoff: P[B + 36 >> 2], tm_zone: t ? $g(t) : "" }, c = $g(I), l = { "%c": "%a %b %d %H:%M:%S %Y", "%D": "%m/%d/%y", "%F": "%Y-%m-%d", "%h": "%b", "%r": "%I:%M:%S %p", "%R": "%H:%M", "%T": "%H:%M:%S", "%x": "%m/%d/%y", "%X": "%H:%M:%S", "%Ec": "%c", "%EC": "%C", "%Ex": "%m/%d/%y", "%EX": "%H:%M:%S", "%Ey": "%y", "%EY": "%Y", "%Od": "%d", "%Oe": "%e", "%OH": "%H", "%OI": "%I", "%Om": "%m", "%OM": "%M", "%OS": "%S", "%Ou": "%u", "%OU": "%U", "%OV": "%V", "%Ow": "%w", "%OW": "%W", "%Oy": "%y" };
|
|
3916
3929
|
for (var d in l) c = c.replace(new RegExp(d, "g"), l[d]);
|
|
3917
3930
|
var F = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], k = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
3918
3931
|
function m(N, H, DA) {
|
|
@@ -3982,7 +3995,7 @@ return ret;
|
|
|
3982
3995
|
return H = Math.abs(H) / 60, H = H / 60 * 100 + H % 60, (DA ? "+" : "-") + ("0000" + H).slice(-4);
|
|
3983
3996
|
}, "%Z": (N) => N.tm_zone, "%%": () => "%" };
|
|
3984
3997
|
c = c.replace(/%%/g, "\0\0");
|
|
3985
|
-
for (var d in aA) c.includes(d) && (c = c.replace(new RegExp(d, "g"), aA[d](
|
|
3998
|
+
for (var d in aA) c.includes(d) && (c = c.replace(new RegExp(d, "g"), aA[d](a)));
|
|
3986
3999
|
c = c.replace(/\0\0/g, "%");
|
|
3987
4000
|
var hA = AI(c, !1);
|
|
3988
4001
|
return hA.length > g ? 0 : (fE(hA, A), hA.length - 1);
|
|
@@ -3996,8 +4009,8 @@ return ret;
|
|
|
3996
4009
|
super(A), this.name = "InternalError";
|
|
3997
4010
|
}
|
|
3998
4011
|
}, IQ(), _B(), nQ(), fC = n.UnboundTypeError = lQ(Error, "UnboundTypeError"), NQ(), E.createPreloadedFile = rE, E.staticInit();
|
|
3999
|
-
var NE = { t: qB, f: xB, x: bB, p: TB, k: WB, j: wQ, d: yQ, o: uQ, c: fQ, E: GC, i: LQ, b: SQ, a: MQ, y: pQ, h: JQ, e: xQ, l: bQ, v: TQ, w: PQ, u: jQ, m: VQ, r: _Q, s: AE, B: IE, C: CE, A: sE, z: lE, n: hE, g: dE, D: YC, q: FE },
|
|
4000
|
-
n.dynCall_jiji = (A, g, I, B, t) => (n.dynCall_jiji =
|
|
4012
|
+
var NE = { t: qB, f: xB, x: bB, p: TB, k: WB, j: wQ, d: yQ, o: uQ, c: fQ, E: GC, i: LQ, b: SQ, a: MQ, y: pQ, h: JQ, e: xQ, l: bQ, v: TQ, w: PQ, u: jQ, m: VQ, r: _Q, s: AE, B: IE, C: CE, A: sE, z: lE, n: hE, g: dE, D: YC, q: FE }, kA = KB(), xC = (A) => (xC = kA.H)(A), JI = (A) => (JI = kA.J)(A), ZA = (A) => (ZA = kA.K)(A), bC = (A, g) => (bC = kA.L)(A, g), TC = (A, g) => (TC = kA.M)(A, g), PC = (A) => (PC = kA.N)(A);
|
|
4013
|
+
n.dynCall_jiji = (A, g, I, B, t) => (n.dynCall_jiji = kA.O)(A, g, I, B, t), n.dynCall_viijii = (A, g, I, B, t, a, c) => (n.dynCall_viijii = kA.P)(A, g, I, B, t, a, c), n.dynCall_iiiiij = (A, g, I, B, t, a, c) => (n.dynCall_iiiiij = kA.Q)(A, g, I, B, t, a, c), n.dynCall_iiiiijj = (A, g, I, B, t, a, c, l, d) => (n.dynCall_iiiiijj = kA.R)(A, g, I, B, t, a, c, l, d), n.dynCall_iiiiiijj = (A, g, I, B, t, a, c, l, d, F) => (n.dynCall_iiiiiijj = kA.S)(A, g, I, B, t, a, c, l, d, F);
|
|
4001
4014
|
var II;
|
|
4002
4015
|
ug = function A() {
|
|
4003
4016
|
II || jC(), II || (ug = A);
|
|
@@ -4014,7 +4027,7 @@ return ret;
|
|
|
4014
4027
|
}, 1)) : A();
|
|
4015
4028
|
}
|
|
4016
4029
|
if (n.preInit) for (typeof n.preInit == "function" && (n.preInit = [n.preInit]); n.preInit.length > 0; ) n.preInit.pop()();
|
|
4017
|
-
return jC(),
|
|
4030
|
+
return jC(), r = D, r;
|
|
4018
4031
|
};
|
|
4019
4032
|
})();
|
|
4020
4033
|
typeof C == "object" && typeof e == "object" ? e.exports = Q : typeof define == "function" && define.amd && define([], () => Q);
|
|
@@ -4044,10 +4057,10 @@ const zt = [
|
|
|
4044
4057
|
syncConfirm: [bI, "--warning-6"]
|
|
4045
4058
|
}, _t = () => {
|
|
4046
4059
|
const C = (i, s) => {
|
|
4047
|
-
const [
|
|
4060
|
+
const [r, n] = Zt[i], { title: w } = s;
|
|
4048
4061
|
return () => [
|
|
4049
4062
|
CI("span", { class: "shim-icon" }),
|
|
4050
|
-
CI(
|
|
4063
|
+
CI(r, {
|
|
4051
4064
|
class: "normal-icon",
|
|
4052
4065
|
style: { color: `rgba(var(${n}))` }
|
|
4053
4066
|
}),
|
|
@@ -4059,7 +4072,7 @@ const zt = [
|
|
|
4059
4072
|
style: { padding: "0 0 4px" }
|
|
4060
4073
|
},
|
|
4061
4074
|
s.content
|
|
4062
|
-
), Q = (i, s,
|
|
4075
|
+
), Q = (i, s, r) => {
|
|
4063
4076
|
const { title: n, content: w, modalClass: h } = s, D = jI(n) ? C(i, s) : n, u = jI(w) ? e(i, s) : w, f = [
|
|
4064
4077
|
"common-modal",
|
|
4065
4078
|
["info", "success", "warning", "error", "confirm", "syncConfirm"].includes(i) && `common-modal__${i}`,
|
|
@@ -4083,11 +4096,11 @@ const zt = [
|
|
|
4083
4096
|
onOk: () => G(!0),
|
|
4084
4097
|
onCancel: () => G(!1)
|
|
4085
4098
|
},
|
|
4086
|
-
|
|
4099
|
+
r
|
|
4087
4100
|
);
|
|
4088
|
-
}) : XC[i](R,
|
|
4101
|
+
}) : XC[i](R, r);
|
|
4089
4102
|
};
|
|
4090
|
-
return { Modal: zt.reduce((i, s) => (i[s] = (
|
|
4103
|
+
return { Modal: zt.reduce((i, s) => (i[s] = (r, n) => Q(s, r, n), i), {}) };
|
|
4091
4104
|
}, WI = /* @__PURE__ */ MA({
|
|
4092
4105
|
name: "CommonModal",
|
|
4093
4106
|
props: {
|
|
@@ -4122,7 +4135,7 @@ const zt = [
|
|
|
4122
4135
|
h && (h.scrollTop = 0);
|
|
4123
4136
|
});
|
|
4124
4137
|
});
|
|
4125
|
-
const s = e.titleIcon || e["title-icon"],
|
|
4138
|
+
const s = e.titleIcon || e["title-icon"], r = () => C.renderIcon ? (s == null ? void 0 : s()) ?? y($A, null, [y("span", {
|
|
4126
4139
|
class: "shim-icon"
|
|
4127
4140
|
}, null), y(CC, {
|
|
4128
4141
|
class: "normal-icon",
|
|
@@ -4131,7 +4144,7 @@ const zt = [
|
|
|
4131
4144
|
...e,
|
|
4132
4145
|
title: () => {
|
|
4133
4146
|
var w, h;
|
|
4134
|
-
return y($A, null, [
|
|
4147
|
+
return y($A, null, [r(), y("span", {
|
|
4135
4148
|
style: {
|
|
4136
4149
|
marginLeft: C.renderIcon ? "30px" : "0"
|
|
4137
4150
|
},
|
|
@@ -4158,7 +4171,7 @@ const zt = [
|
|
|
4158
4171
|
C.config.globalProperties.$modal = e;
|
|
4159
4172
|
}
|
|
4160
4173
|
}), Ao = (C, e, Q) => {
|
|
4161
|
-
const o = cA(), i = cA(), s = cA(0),
|
|
4174
|
+
const o = cA(), i = cA(), s = cA(0), r = cA(!1);
|
|
4162
4175
|
let n;
|
|
4163
4176
|
const { renderHighlight: w, unrenderHighlight: h } = Bt(o, e), D = () => {
|
|
4164
4177
|
o.value = new ne(C.value, {
|
|
@@ -4171,7 +4184,7 @@ const zt = [
|
|
|
4171
4184
|
maxLength: e.maxLength,
|
|
4172
4185
|
onChange: (S) => {
|
|
4173
4186
|
var Y;
|
|
4174
|
-
s.value = S,
|
|
4187
|
+
s.value = S, r.value = !!((Y = o.value) != null && Y.element.querySelector(
|
|
4175
4188
|
`span[data-type=${q.pausation}]`
|
|
4176
4189
|
)), Q("update:textCount", S), Q("change", S);
|
|
4177
4190
|
},
|
|
@@ -4225,7 +4238,7 @@ const zt = [
|
|
|
4225
4238
|
var j;
|
|
4226
4239
|
const S = (j = i.value) == null ? void 0 : j.base.cursor.range;
|
|
4227
4240
|
if (v(S)) return !1;
|
|
4228
|
-
const [Y] = SA(S.startContainer, (Z) => Z.tagName === "P" && Z.classList.contains(
|
|
4241
|
+
const [Y] = SA(S.startContainer, (Z) => Z.tagName === "P" && Z.classList.contains(UA)), [x] = SA(S.endContainer, (Z) => Z.tagName === "P" && Z.classList.contains(UA));
|
|
4229
4242
|
return !(v(Y) || v(x) || Y === x);
|
|
4230
4243
|
}, lA = (S) => {
|
|
4231
4244
|
var Z, P;
|
|
@@ -4286,7 +4299,7 @@ const zt = [
|
|
|
4286
4299
|
R(""), setTimeout(() => {
|
|
4287
4300
|
var Z, P;
|
|
4288
4301
|
const S = window.getSelection(), Y = S != null && S.rangeCount ? S == null ? void 0 : S.getRangeAt(0) : null;
|
|
4289
|
-
if (v(S) || Y && oA(Y.commonAncestorContainer) && Y.commonAncestorContainer.classList.contains(
|
|
4302
|
+
if (v(S) || Y && oA(Y.commonAncestorContainer) && Y.commonAncestorContainer.classList.contains(UA))
|
|
4290
4303
|
return;
|
|
4291
4304
|
const x = document.createRange(), j = (P = (Z = o.value) == null ? void 0 : Z.content.getParas()) == null ? void 0 : P[0];
|
|
4292
4305
|
v(j) || (x.selectNodeContents(j), x.collapse(!1), S.removeAllRanges(), S.addRange(x));
|
|
@@ -4306,7 +4319,7 @@ const zt = [
|
|
|
4306
4319
|
editorCore: o,
|
|
4307
4320
|
editorAction: i,
|
|
4308
4321
|
count: s,
|
|
4309
|
-
hasPausationTag:
|
|
4322
|
+
hasPausationTag: r,
|
|
4310
4323
|
getContent: f,
|
|
4311
4324
|
setContent: R,
|
|
4312
4325
|
appendContent: G,
|
|
@@ -4332,7 +4345,7 @@ const zt = [
|
|
|
4332
4345
|
const [e] = vA("quick-context-menu"), Q = Ag(Yg), { x: o, y: i } = cI(), s = (L, J) => {
|
|
4333
4346
|
var M, _;
|
|
4334
4347
|
(_ = (M = Q == null ? void 0 : Q.editorAction.value) == null ? void 0 : M.plugin.pausation) == null || _.add({ delay: J }), D(!1);
|
|
4335
|
-
},
|
|
4348
|
+
}, r = async () => {
|
|
4336
4349
|
const L = await navigator.clipboard.readText(), J = (L == null ? void 0 : L.split(/(?:\r?\n){2,}/).map((M) => M.trim()).filter((M) => M)) ?? [];
|
|
4337
4350
|
eC(
|
|
4338
4351
|
Q.editorCore.value,
|
|
@@ -4370,7 +4383,7 @@ const zt = [
|
|
|
4370
4383
|
QA("li", {
|
|
4371
4384
|
class: RA(sA(e)("action-item")),
|
|
4372
4385
|
"data-type": "paste",
|
|
4373
|
-
onClick:
|
|
4386
|
+
onClick: r
|
|
4374
4387
|
}, "粘贴文本", 2),
|
|
4375
4388
|
QA("li", {
|
|
4376
4389
|
class: RA(sA(e)("action-item")),
|
|
@@ -4393,8 +4406,8 @@ const zt = [
|
|
|
4393
4406
|
}
|
|
4394
4407
|
}), Eo = /* @__PURE__ */ uA(Qo, [["__scopeId", "data-v-70332ebc"]]), TA = (C, e, Q) => {
|
|
4395
4408
|
const o = HE({ value: C }), { value: i } = mE(o);
|
|
4396
|
-
return [i, (
|
|
4397
|
-
o.value =
|
|
4409
|
+
return [i, (r) => {
|
|
4410
|
+
o.value = r, e == null || e(o.value);
|
|
4398
4411
|
}];
|
|
4399
4412
|
}, eo = {}, to = {
|
|
4400
4413
|
class: "icon",
|
|
@@ -4617,7 +4630,7 @@ const bo = /* @__PURE__ */ uA(qo, [["render", xo]]), [OI] = vA("refine-content")
|
|
|
4617
4630
|
}), s = () => {
|
|
4618
4631
|
var w;
|
|
4619
4632
|
v(e) || v(e.editorCore.value) || (eC(e == null ? void 0 : e.editorCore.value, [((w = Q.activedContent.value) == null ? void 0 : w.content) ?? ""]), Q.setVisible(!1));
|
|
4620
|
-
},
|
|
4633
|
+
}, r = () => {
|
|
4621
4634
|
var J;
|
|
4622
4635
|
if (v(e) || v(e.editorCore.value)) return;
|
|
4623
4636
|
const {
|
|
@@ -4669,7 +4682,7 @@ const bo = /* @__PURE__ */ uA(qo, [["render", xo]]), [OI] = vA("refine-content")
|
|
|
4669
4682
|
default: () => "替换",
|
|
4670
4683
|
icon: () => y(Go, null, null)
|
|
4671
4684
|
}), y(YA("a-button"), {
|
|
4672
|
-
onClick:
|
|
4685
|
+
onClick: r
|
|
4673
4686
|
}, {
|
|
4674
4687
|
default: () => "插入",
|
|
4675
4688
|
icon: () => y(So, null, null)
|
|
@@ -4768,8 +4781,8 @@ const GB = /* @__PURE__ */ uA(_o, [["render", Ai]]), [AB] = vA("refine-input"),
|
|
|
4768
4781
|
emit: e
|
|
4769
4782
|
}) => {
|
|
4770
4783
|
const Q = Ag(qg) ?? {}, o = FA(() => (Q == null ? void 0 : Q.contentState.value) === PA.未生成 ? "请输入优化文本的指令" : "AI撰写中..."), i = FA(() => {
|
|
4771
|
-
var
|
|
4772
|
-
return (
|
|
4784
|
+
var r;
|
|
4785
|
+
return (r = Q == null ? void 0 : Q.prompt.value) == null ? void 0 : r.length;
|
|
4773
4786
|
}), s = () => {
|
|
4774
4787
|
i.value && (Q.setShortVisible(!1), Q == null || Q.genRefineContent({
|
|
4775
4788
|
generateType: dg.重置,
|
|
@@ -4785,7 +4798,7 @@ const GB = /* @__PURE__ */ uA(_o, [["render", Ai]]), [AB] = vA("refine-input"),
|
|
|
4785
4798
|
modelValue: C.modelValue,
|
|
4786
4799
|
disabled: Q == null ? void 0 : Q.generating.value,
|
|
4787
4800
|
placeholder: o.value,
|
|
4788
|
-
onInput: (
|
|
4801
|
+
onInput: (r) => e("update:modelValue", r),
|
|
4789
4802
|
onPressEnter: s
|
|
4790
4803
|
}, {
|
|
4791
4804
|
prefix: () => y("span", null, [y(GB, {
|
|
@@ -4823,8 +4836,8 @@ const GB = /* @__PURE__ */ uA(_o, [["render", Ai]]), [AB] = vA("refine-input"),
|
|
|
4823
4836
|
}));
|
|
4824
4837
|
}, Q = (n, w) => {
|
|
4825
4838
|
var h;
|
|
4826
|
-
(h = n.children) != null && h.length && (
|
|
4827
|
-
}, [o, i] = eI(), [s,
|
|
4839
|
+
(h = n.children) != null && h.length && (r(w), i(!0));
|
|
4840
|
+
}, [o, i] = eI(), [s, r] = TA(-1);
|
|
4828
4841
|
return () => {
|
|
4829
4842
|
const n = (h, D, u = !0) => {
|
|
4830
4843
|
var f, R;
|
|
@@ -4873,10 +4886,10 @@ const GB = /* @__PURE__ */ uA(_o, [["render", Ai]]), [AB] = vA("refine-input"),
|
|
|
4873
4886
|
emits: {},
|
|
4874
4887
|
setup: () => {
|
|
4875
4888
|
const C = Ag(Yg), e = Ag(qg), Q = cA(), [o, i] = TA(!1, (f) => {
|
|
4876
|
-
f ||
|
|
4889
|
+
f || r({
|
|
4877
4890
|
zIndex: -10
|
|
4878
4891
|
});
|
|
4879
|
-
}), [s,
|
|
4892
|
+
}), [s, r] = TA({
|
|
4880
4893
|
zIndex: -10
|
|
4881
4894
|
}), n = (f) => {
|
|
4882
4895
|
if (v(C) || v(C.editorCore.value)) return;
|
|
@@ -4885,7 +4898,7 @@ const GB = /* @__PURE__ */ uA(_o, [["render", Ai]]), [AB] = vA("refine-input"),
|
|
|
4885
4898
|
} = C.editorCore.value;
|
|
4886
4899
|
if (!C.editorCore.value._editorElement.contains(f.target) || v(R.range) || R.isCaret() || e.visible.value) return;
|
|
4887
4900
|
const G = R.range.getBoundingClientRect();
|
|
4888
|
-
|
|
4901
|
+
r({
|
|
4889
4902
|
top: `${G.bottom + 10}px`,
|
|
4890
4903
|
left: `${G.left + (G.width - 172) / 2}px`
|
|
4891
4904
|
}), i(!0);
|
|
@@ -4923,7 +4936,7 @@ const GB = /* @__PURE__ */ uA(_o, [["render", Ai]]), [AB] = vA("refine-input"),
|
|
|
4923
4936
|
color: "rgba(var(--primary-6))",
|
|
4924
4937
|
fontSize: "16px"
|
|
4925
4938
|
}
|
|
4926
|
-
}, null),
|
|
4939
|
+
}, null), LA("AI改写")]), y(YA("a-divider"), {
|
|
4927
4940
|
direction: "vertical",
|
|
4928
4941
|
margin: "4px"
|
|
4929
4942
|
}, null), y("div", {
|
|
@@ -4933,7 +4946,7 @@ const GB = /* @__PURE__ */ uA(_o, [["render", Ai]]), [AB] = vA("refine-input"),
|
|
|
4933
4946
|
style: {
|
|
4934
4947
|
fontSize: "16px"
|
|
4935
4948
|
}
|
|
4936
|
-
}, null),
|
|
4949
|
+
}, null), LA("复制")])]);
|
|
4937
4950
|
}
|
|
4938
4951
|
}), [Bi] = vA("refine-generator"), Qi = /* @__PURE__ */ MA({
|
|
4939
4952
|
name: "RefineGenerator",
|
|
@@ -4950,8 +4963,8 @@ const GB = /* @__PURE__ */ uA(_o, [["render", Ai]]), [AB] = vA("refine-input"),
|
|
|
4950
4963
|
createSession: o,
|
|
4951
4964
|
sendSessionMessage: i,
|
|
4952
4965
|
abortSession: s
|
|
4953
|
-
} = e.refineContext, [
|
|
4954
|
-
sessionId:
|
|
4966
|
+
} = e.refineContext, [r, n] = TA(void 0), w = () => (i.abort(), s({
|
|
4967
|
+
sessionId: r.value
|
|
4955
4968
|
})), h = (b) => {
|
|
4956
4969
|
console.log("---insert ", b);
|
|
4957
4970
|
}, D = (b) => {
|
|
@@ -4959,7 +4972,7 @@ const GB = /* @__PURE__ */ uA(_o, [["render", Ai]]), [AB] = vA("refine-input"),
|
|
|
4959
4972
|
}, u = cA(), [f, R] = TA({
|
|
4960
4973
|
zIndex: -10
|
|
4961
4974
|
}), [G, U] = TA(!1, (b) => {
|
|
4962
|
-
b || (
|
|
4975
|
+
b || (r.value && w(), n(void 0), T(!1), lA(void 0), WA(!1), mA(PA.未生成), S(0), x([]), Z(void 0), EA(!0), R({
|
|
4963
4976
|
zIndex: -10
|
|
4964
4977
|
}));
|
|
4965
4978
|
}), L = () => {
|
|
@@ -5012,7 +5025,7 @@ const GB = /* @__PURE__ */ uA(_o, [["render", Ai]]), [AB] = vA("refine-input"),
|
|
|
5012
5025
|
}] : [NA(b)]), Z(Y.value[Y.value.length - 1]), S(Y.value.length), mA(PA.等待生成), n(rB());
|
|
5013
5026
|
const BA = await o({
|
|
5014
5027
|
agentId: Q,
|
|
5015
|
-
sessionId:
|
|
5028
|
+
sessionId: r.value
|
|
5016
5029
|
});
|
|
5017
5030
|
WA(!0), mA(PA.正在生成), i({
|
|
5018
5031
|
messageRequest: {
|
|
@@ -5023,7 +5036,7 @@ const GB = /* @__PURE__ */ uA(_o, [["render", Ai]]), [AB] = vA("refine-input"),
|
|
|
5023
5036
|
},
|
|
5024
5037
|
meta_data: {
|
|
5025
5038
|
ai_rewrite: (b == null ? void 0 : b.shortcutType) ?? (b == null ? void 0 : b.prompt),
|
|
5026
|
-
sessionId:
|
|
5039
|
+
sessionId: r.value
|
|
5027
5040
|
}
|
|
5028
5041
|
}
|
|
5029
5042
|
}, {
|
|
@@ -5233,7 +5246,7 @@ const gB = /* @__PURE__ */ uA(ri, [["render", ai]]), [pA] = vA("editor-container
|
|
|
5233
5246
|
}) => {
|
|
5234
5247
|
const o = cA(), i = cA(), {
|
|
5235
5248
|
editorCore: s,
|
|
5236
|
-
editorAction:
|
|
5249
|
+
editorAction: r,
|
|
5237
5250
|
count: n,
|
|
5238
5251
|
hasPausationTag: w,
|
|
5239
5252
|
getContent: h,
|
|
@@ -5258,7 +5271,7 @@ const gB = /* @__PURE__ */ uA(ri, [["render", ai]]), [pA] = vA("editor-container
|
|
|
5258
5271
|
eB(Yg, {
|
|
5259
5272
|
name: "Editor",
|
|
5260
5273
|
editorCore: s,
|
|
5261
|
-
editorAction:
|
|
5274
|
+
editorAction: r,
|
|
5262
5275
|
getContent: h,
|
|
5263
5276
|
setContent: D,
|
|
5264
5277
|
appendContent: u,
|
|
@@ -5280,11 +5293,11 @@ const gB = /* @__PURE__ */ uA(ri, [["render", ai]]), [pA] = vA("editor-container
|
|
|
5280
5293
|
});
|
|
5281
5294
|
const VA = FA(() => {
|
|
5282
5295
|
var b, BA;
|
|
5283
|
-
return ((BA = (b =
|
|
5296
|
+
return ((BA = (b = r.value) == null ? void 0 : b.plugin.anchor) == null ? void 0 : BA.data) ?? {};
|
|
5284
5297
|
}), mA = FA(() => Object.values(VA.value).flat().length), bA = FA(() => n.value <= 0 && !w.value), S = (b, BA, IA) => {
|
|
5285
5298
|
Array.from(document.body.querySelectorAll(`span[data-frag-id="anchor_${b}"]`)).forEach((NA) => {
|
|
5286
5299
|
var dA, HA;
|
|
5287
|
-
return (HA = (dA =
|
|
5300
|
+
return (HA = (dA = r.value) == null ? void 0 : dA.plugin.anchor) == null ? void 0 : HA.remove(NA);
|
|
5288
5301
|
}), Q("anchorRemove", IA);
|
|
5289
5302
|
}, Y = (b) => Object.entries(b).filter(([BA, IA]) => !!IA.length).map(([BA, IA]) => y("div", {
|
|
5290
5303
|
style: {
|
|
@@ -5316,7 +5329,7 @@ const gB = /* @__PURE__ */ uA(ri, [["render", ai]]), [pA] = vA("editor-container
|
|
|
5316
5329
|
default: lI,
|
|
5317
5330
|
content: () => y("section", {
|
|
5318
5331
|
class: qA("tooltip")
|
|
5319
|
-
}, [y("p", null, [
|
|
5332
|
+
}, [y("p", null, [LA("主播: "), AA.name]), y("p", null, [LA("情绪: "), AA.activeEmotion]), AA.activeRole && AA.activeRole !== "无" ? y("p", null, [LA("角色: "), AA.activeRole || "--"]) : null, y("p", null, [LA("语速: "), AA.speed]), y("p", null, [LA("音量: "), AA.volume])])
|
|
5320
5333
|
}))(() => y("section", {
|
|
5321
5334
|
class: qA(),
|
|
5322
5335
|
style: {
|
|
@@ -5335,7 +5348,7 @@ const gB = /* @__PURE__ */ uA(ri, [["render", ai]]), [pA] = vA("editor-container
|
|
|
5335
5348
|
title: AA.name
|
|
5336
5349
|
}, [AA.name]), y("label", {
|
|
5337
5350
|
class: qA("info-speed-volume")
|
|
5338
|
-
}, [
|
|
5351
|
+
}, [LA("语速: "), AA.speed, LA(", 音量: "), AA.volume]), y("div", {
|
|
5339
5352
|
onClick: () => S(b, BA, AA)
|
|
5340
5353
|
}, [y(gB, {
|
|
5341
5354
|
class: qA("info-rem")
|
|
@@ -5362,19 +5375,19 @@ const gB = /* @__PURE__ */ uA(ri, [["render", ai]]), [pA] = vA("editor-container
|
|
|
5362
5375
|
class: pA("status-clear"),
|
|
5363
5376
|
onClick: EA
|
|
5364
5377
|
}, {
|
|
5365
|
-
default: () => [
|
|
5378
|
+
default: () => [LA("清空")]
|
|
5366
5379
|
})), y("div", {
|
|
5367
5380
|
class: pA("status-info")
|
|
5368
5381
|
}, [C.simple ? null : y($A, null, [y("label", {
|
|
5369
5382
|
class: pA("status-info-label")
|
|
5370
|
-
}, [y("span", null, [
|
|
5383
|
+
}, [y("span", null, [LA("预计时长:")]), y("span", null, [C.preTime || "00:00:00"])]), y("label", {
|
|
5371
5384
|
class: pA("status-info-label")
|
|
5372
|
-
}, [y("span", null, [
|
|
5385
|
+
}, [y("span", null, [LA("实际时长:")]), y("span", null, [C.realTime || "00:00:00"])])]), C.showWordLimit ? y("label", {
|
|
5373
5386
|
class: pA("status-info-length")
|
|
5374
|
-
}, [y("span", null, [n.value <= C.maxLength ? n.value : C.maxLength]), y("span", null, [
|
|
5387
|
+
}, [y("span", null, [n.value <= C.maxLength ? n.value : C.maxLength]), y("span", null, [LA(" / ")]), y("span", null, [C.maxLength, C.simple ? "" : "字"])]) : null])]);
|
|
5375
5388
|
}, P = cA();
|
|
5376
5389
|
return {
|
|
5377
|
-
action:
|
|
5390
|
+
action: r,
|
|
5378
5391
|
innerRender: () => {
|
|
5379
5392
|
var b, BA;
|
|
5380
5393
|
return y($A, null, [y("div", {
|
|
@@ -5400,7 +5413,7 @@ const gB = /* @__PURE__ */ uA(ri, [["render", ai]]), [pA] = vA("editor-container
|
|
|
5400
5413
|
onDragover: (IA) => IA.preventDefault(),
|
|
5401
5414
|
onDrop: (IA) => IA.preventDefault()
|
|
5402
5415
|
}, [y("p", {
|
|
5403
|
-
class:
|
|
5416
|
+
class: UA
|
|
5404
5417
|
}, [y("br", null, null)])])])]), C.simple ? null : y("div", {
|
|
5405
5418
|
ref: i,
|
|
5406
5419
|
class: pA("core-anchor")
|
|
@@ -5414,7 +5427,7 @@ const gB = /* @__PURE__ */ uA(ri, [["render", ai]]), [pA] = vA("editor-container
|
|
|
5414
5427
|
ref: P
|
|
5415
5428
|
}, null)]), Z(), y("span", {
|
|
5416
5429
|
style: "display: none"
|
|
5417
|
-
}, [JSON.stringify(Object.keys(((BA = (b =
|
|
5430
|
+
}, [JSON.stringify(Object.keys(((BA = (b = r.value) == null ? void 0 : b.plugin.anchor) == null ? void 0 : BA.data) ?? {}))])]);
|
|
5418
5431
|
},
|
|
5419
5432
|
innerGetContent: h,
|
|
5420
5433
|
innerSetContent: D,
|
|
@@ -5492,7 +5505,7 @@ const gB = /* @__PURE__ */ uA(ri, [["render", ai]]), [pA] = vA("editor-container
|
|
|
5492
5505
|
return this.innerClearContent();
|
|
5493
5506
|
},
|
|
5494
5507
|
clear() {
|
|
5495
|
-
return this.setContent(`<p class="${
|
|
5508
|
+
return this.setContent(`<p class="${UA}"><br /></p>`);
|
|
5496
5509
|
},
|
|
5497
5510
|
renderHighlight(C) {
|
|
5498
5511
|
return this.innerRenderHightlight(C);
|