@naersen/tts-rich-text 0.8.1 → 0.8.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/CHANGELOG.md +6 -0
- package/README.md +4 -0
- package/dist/base.css +1 -1
- package/dist/components/tts-editor-root/index.vue.d.ts +1 -0
- package/dist/components/tts-rich-text/editor/useRichTextEditor.d.ts +6 -0
- package/dist/components/tts-rich-text-editor/index.vue.d.ts +8 -2
- package/dist/index.js +1141 -1133
- package/dist/type/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToolConfig as P, LanguageOptions as gl, DeleteMode as cl, getInitContent as Jn, sanitizePastedHtml as dl, sanitizePastedText as _i, resolveTtsEditorFeatures as ml, NumberToTextTools as pl, convertToTtsFormat as Yi, estimateTtsDuration as fl, StopOptions as yl } from "./core.js";
|
|
2
2
|
import { allToolTypes as bc, getVisualLength as jc, splitTextToSentences as vc, toCardinal as Ac, toColloquial as Zc, toPhoneReading as xc, toPositional as Cc, transformParagraph as Ic } from "./core.js";
|
|
3
|
-
import { ref as K, computed as T, useSlots as ql, defineComponent as $, useCssVars as Nt, unref as
|
|
3
|
+
import { ref as K, computed as T, useSlots as ql, defineComponent as $, useCssVars as Nt, unref as z, toRefs as ki, openBlock as Y, createElementBlock as L, normalizeClass as bn, createBlock as _, mergeProps as zl, createSlots as bl, withCtx as N, createElementVNode as v, createVNode as H, renderList as gn, renderSlot as wn, normalizeProps as jl, guardReactiveProps as vl, normalizeStyle as he, toDisplayString as F, getCurrentScope as Rt, onScopeDispose as Al, readonly as Ki, toRef as Zl, customRef as xl, watch as cn, onMounted as we, nextTick as de, getCurrentInstance as Ft, shallowRef as zi, watchEffect as $i, toRaw as Pt, Fragment as en, createCommentVNode as yn, Transition as Cl, withModifiers as bi, inject as Il, provide as Wl, onUnmounted as wl, onBeforeUnmount as Se, h as Ut, withDirectives as Te, vModelText as Ne, isRef as Et, createTextVNode as An, toValue as Sl, reactive as Vi, useModel as Gi, mergeModels as ae } from "vue";
|
|
4
4
|
import { ElButton as Ol, ElMessage as ji, ElMessageBox as Yl, ElDialog as Oe, ElInput as nt, ElPopover as _e, ElInputNumber as kl } from "element-plus";
|
|
5
5
|
import { Node as Kl, Extension as Vl, isTextSelection as Gl, posToDOMRect as Dt, getText as Xl, getTextSerializersFromSchema as Jl } from "@tiptap/core";
|
|
6
6
|
import { nodeViewProps as Hl, NodeViewWrapper as Ll, NodeViewContent as ye, VueNodeViewRenderer as Ml, mergeAttributes as et, useEditor as Tl, EditorContent as Nl } from "@tiptap/vue-3";
|
|
@@ -15,99 +15,99 @@ var _t = { exports: {} };
|
|
|
15
15
|
(function(i, t) {
|
|
16
16
|
e.exports = t();
|
|
17
17
|
})(Bt, function() {
|
|
18
|
-
var i = 1e3, t = 6e4, o = 36e5, l = "millisecond", s = "second", h = "minute", r = "hour", u = "day", g = "week", a = "month", c = "quarter",
|
|
19
|
-
var
|
|
20
|
-
return "[" +
|
|
21
|
-
} }, I = function(
|
|
22
|
-
var
|
|
23
|
-
return !
|
|
24
|
-
}, w = { s: I, z: function(
|
|
25
|
-
var
|
|
26
|
-
return (
|
|
27
|
-
}, m: function
|
|
28
|
-
if (
|
|
29
|
-
var
|
|
30
|
-
return +(-(
|
|
31
|
-
}, a: function(
|
|
32
|
-
return
|
|
33
|
-
}, p: function(
|
|
34
|
-
return { M: a, y:
|
|
35
|
-
}, u: function(
|
|
36
|
-
return
|
|
18
|
+
var i = 1e3, t = 6e4, o = 36e5, l = "millisecond", s = "second", h = "minute", r = "hour", u = "day", g = "week", a = "month", c = "quarter", p = "year", f = "date", d = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, b = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, A = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(j) {
|
|
19
|
+
var x = ["th", "st", "nd", "rd"], q = j % 100;
|
|
20
|
+
return "[" + j + (x[(q - 20) % 10] || x[q] || x[0]) + "]";
|
|
21
|
+
} }, I = function(j, x, q) {
|
|
22
|
+
var O = String(j);
|
|
23
|
+
return !O || O.length >= x ? j : "" + Array(x + 1 - O.length).join(q) + j;
|
|
24
|
+
}, w = { s: I, z: function(j) {
|
|
25
|
+
var x = -j.utcOffset(), q = Math.abs(x), O = Math.floor(q / 60), Z = q % 60;
|
|
26
|
+
return (x <= 0 ? "+" : "-") + I(O, 2, "0") + ":" + I(Z, 2, "0");
|
|
27
|
+
}, m: function j(x, q) {
|
|
28
|
+
if (x.date() < q.date()) return -j(q, x);
|
|
29
|
+
var O = 12 * (q.year() - x.year()) + (q.month() - x.month()), Z = x.clone().add(O, a), X = q - Z < 0, R = x.clone().add(O + (X ? -1 : 1), a);
|
|
30
|
+
return +(-(O + (q - Z) / (X ? Z - R : R - Z)) || 0);
|
|
31
|
+
}, a: function(j) {
|
|
32
|
+
return j < 0 ? Math.ceil(j) || 0 : Math.floor(j);
|
|
33
|
+
}, p: function(j) {
|
|
34
|
+
return { M: a, y: p, w: g, d: u, D: f, h: r, m: h, s, ms: l, Q: c }[j] || String(j || "").toLowerCase().replace(/s$/, "");
|
|
35
|
+
}, u: function(j) {
|
|
36
|
+
return j === void 0;
|
|
37
37
|
} }, J = "en", k = {};
|
|
38
|
-
k[J] =
|
|
39
|
-
var G = "$isDayjsObject", M = function(
|
|
40
|
-
return
|
|
41
|
-
}, V = function
|
|
42
|
-
var
|
|
43
|
-
if (!
|
|
44
|
-
if (typeof
|
|
45
|
-
var X =
|
|
46
|
-
k[X] && (
|
|
47
|
-
var R =
|
|
48
|
-
if (!
|
|
38
|
+
k[J] = A;
|
|
39
|
+
var G = "$isDayjsObject", M = function(j) {
|
|
40
|
+
return j instanceof C || !(!j || !j[G]);
|
|
41
|
+
}, V = function j(x, q, O) {
|
|
42
|
+
var Z;
|
|
43
|
+
if (!x) return J;
|
|
44
|
+
if (typeof x == "string") {
|
|
45
|
+
var X = x.toLowerCase();
|
|
46
|
+
k[X] && (Z = X), q && (k[X] = q, Z = X);
|
|
47
|
+
var R = x.split("-");
|
|
48
|
+
if (!Z && R.length > 1) return j(R[0]);
|
|
49
49
|
} else {
|
|
50
|
-
var Q =
|
|
51
|
-
k[Q] =
|
|
50
|
+
var Q = x.name;
|
|
51
|
+
k[Q] = x, Z = Q;
|
|
52
52
|
}
|
|
53
|
-
return !
|
|
54
|
-
},
|
|
55
|
-
if (M(
|
|
56
|
-
var
|
|
57
|
-
return
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
return
|
|
53
|
+
return !O && Z && (J = Z), Z || !O && J;
|
|
54
|
+
}, S = function(j, x) {
|
|
55
|
+
if (M(j)) return j.clone();
|
|
56
|
+
var q = typeof x == "object" ? x : {};
|
|
57
|
+
return q.date = j, q.args = arguments, new C(q);
|
|
58
|
+
}, m = w;
|
|
59
|
+
m.l = V, m.i = M, m.w = function(j, x) {
|
|
60
|
+
return S(j, { locale: x.$L, utc: x.$u, x: x.$x, $offset: x.$offset });
|
|
61
61
|
};
|
|
62
|
-
var
|
|
63
|
-
function
|
|
64
|
-
this.$L = V(
|
|
62
|
+
var C = function() {
|
|
63
|
+
function j(q) {
|
|
64
|
+
this.$L = V(q.locale, null, !0), this.parse(q), this.$x = this.$x || q.x || {}, this[G] = !0;
|
|
65
65
|
}
|
|
66
|
-
var
|
|
67
|
-
return
|
|
68
|
-
this.$d = function(
|
|
69
|
-
var
|
|
70
|
-
if (
|
|
71
|
-
if (
|
|
72
|
-
if (
|
|
73
|
-
if (typeof
|
|
74
|
-
var R =
|
|
66
|
+
var x = j.prototype;
|
|
67
|
+
return x.parse = function(q) {
|
|
68
|
+
this.$d = function(O) {
|
|
69
|
+
var Z = O.date, X = O.utc;
|
|
70
|
+
if (Z === null) return /* @__PURE__ */ new Date(NaN);
|
|
71
|
+
if (m.u(Z)) return /* @__PURE__ */ new Date();
|
|
72
|
+
if (Z instanceof Date) return new Date(Z);
|
|
73
|
+
if (typeof Z == "string" && !/Z$/i.test(Z)) {
|
|
74
|
+
var R = Z.match(y);
|
|
75
75
|
if (R) {
|
|
76
76
|
var Q = R[2] - 1 || 0, tn = (R[7] || "0").substring(0, 3);
|
|
77
77
|
return X ? new Date(Date.UTC(R[1], Q, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, tn)) : new Date(R[1], Q, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, tn);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
return new Date(
|
|
81
|
-
}(
|
|
82
|
-
},
|
|
83
|
-
var
|
|
84
|
-
this.$y =
|
|
85
|
-
},
|
|
86
|
-
return
|
|
87
|
-
},
|
|
88
|
-
return this.$d.toString() !==
|
|
89
|
-
},
|
|
90
|
-
var
|
|
91
|
-
return this.startOf(
|
|
92
|
-
},
|
|
93
|
-
return q
|
|
94
|
-
},
|
|
95
|
-
return this.endOf(
|
|
96
|
-
},
|
|
97
|
-
return
|
|
98
|
-
},
|
|
80
|
+
return new Date(Z);
|
|
81
|
+
}(q), this.init();
|
|
82
|
+
}, x.init = function() {
|
|
83
|
+
var q = this.$d;
|
|
84
|
+
this.$y = q.getFullYear(), this.$M = q.getMonth(), this.$D = q.getDate(), this.$W = q.getDay(), this.$H = q.getHours(), this.$m = q.getMinutes(), this.$s = q.getSeconds(), this.$ms = q.getMilliseconds();
|
|
85
|
+
}, x.$utils = function() {
|
|
86
|
+
return m;
|
|
87
|
+
}, x.isValid = function() {
|
|
88
|
+
return this.$d.toString() !== d;
|
|
89
|
+
}, x.isSame = function(q, O) {
|
|
90
|
+
var Z = S(q);
|
|
91
|
+
return this.startOf(O) <= Z && Z <= this.endOf(O);
|
|
92
|
+
}, x.isAfter = function(q, O) {
|
|
93
|
+
return S(q) < this.startOf(O);
|
|
94
|
+
}, x.isBefore = function(q, O) {
|
|
95
|
+
return this.endOf(O) < S(q);
|
|
96
|
+
}, x.$g = function(q, O, Z) {
|
|
97
|
+
return m.u(q) ? this[O] : this.set(Z, q);
|
|
98
|
+
}, x.unix = function() {
|
|
99
99
|
return Math.floor(this.valueOf() / 1e3);
|
|
100
|
-
},
|
|
100
|
+
}, x.valueOf = function() {
|
|
101
101
|
return this.$d.getTime();
|
|
102
|
-
},
|
|
103
|
-
var
|
|
104
|
-
var Rn =
|
|
102
|
+
}, x.startOf = function(q, O) {
|
|
103
|
+
var Z = this, X = !!m.u(O) || O, R = m.p(q), Q = function(Qn, mn) {
|
|
104
|
+
var Rn = m.w(Z.$u ? Date.UTC(Z.$y, mn, Qn) : new Date(Z.$y, mn, Qn), Z);
|
|
105
105
|
return X ? Rn : Rn.endOf(u);
|
|
106
106
|
}, tn = function(Qn, mn) {
|
|
107
|
-
return
|
|
107
|
+
return m.w(Z.toDate()[Qn].apply(Z.toDate("s"), (X ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(mn)), Z);
|
|
108
108
|
}, hn = this.$W, an = this.$M, zn = this.$D, oe = "set" + (this.$u ? "UTC" : "");
|
|
109
109
|
switch (R) {
|
|
110
|
-
case
|
|
110
|
+
case p:
|
|
111
111
|
return X ? Q(1, 0) : Q(31, 11);
|
|
112
112
|
case a:
|
|
113
113
|
return X ? Q(1, an) : Q(0, an + 1);
|
|
@@ -126,76 +126,76 @@ var _t = { exports: {} };
|
|
|
126
126
|
default:
|
|
127
127
|
return this.clone();
|
|
128
128
|
}
|
|
129
|
-
},
|
|
130
|
-
return this.startOf(
|
|
131
|
-
},
|
|
132
|
-
var
|
|
133
|
-
if (X === a || X ===
|
|
129
|
+
}, x.endOf = function(q) {
|
|
130
|
+
return this.startOf(q, !1);
|
|
131
|
+
}, x.$set = function(q, O) {
|
|
132
|
+
var Z, X = m.p(q), R = "set" + (this.$u ? "UTC" : ""), Q = (Z = {}, Z[u] = R + "Date", Z[f] = R + "Date", Z[a] = R + "Month", Z[p] = R + "FullYear", Z[r] = R + "Hours", Z[h] = R + "Minutes", Z[s] = R + "Seconds", Z[l] = R + "Milliseconds", Z)[X], tn = X === u ? this.$D + (O - this.$W) : O;
|
|
133
|
+
if (X === a || X === p) {
|
|
134
134
|
var hn = this.clone().set(f, 1);
|
|
135
135
|
hn.$d[Q](tn), hn.init(), this.$d = hn.set(f, Math.min(this.$D, hn.daysInMonth())).$d;
|
|
136
136
|
} else Q && this.$d[Q](tn);
|
|
137
137
|
return this.init(), this;
|
|
138
|
-
},
|
|
139
|
-
return this.clone().$set(
|
|
140
|
-
},
|
|
141
|
-
return this[
|
|
142
|
-
},
|
|
143
|
-
var
|
|
144
|
-
|
|
145
|
-
var R =
|
|
146
|
-
var zn =
|
|
147
|
-
return
|
|
138
|
+
}, x.set = function(q, O) {
|
|
139
|
+
return this.clone().$set(q, O);
|
|
140
|
+
}, x.get = function(q) {
|
|
141
|
+
return this[m.p(q)]();
|
|
142
|
+
}, x.add = function(q, O) {
|
|
143
|
+
var Z, X = this;
|
|
144
|
+
q = Number(q);
|
|
145
|
+
var R = m.p(O), Q = function(an) {
|
|
146
|
+
var zn = S(X);
|
|
147
|
+
return m.w(zn.date(zn.date() + Math.round(an * q)), X);
|
|
148
148
|
};
|
|
149
|
-
if (R === a) return this.set(a, this.$M +
|
|
150
|
-
if (R ===
|
|
149
|
+
if (R === a) return this.set(a, this.$M + q);
|
|
150
|
+
if (R === p) return this.set(p, this.$y + q);
|
|
151
151
|
if (R === u) return Q(1);
|
|
152
152
|
if (R === g) return Q(7);
|
|
153
|
-
var tn = (
|
|
154
|
-
return
|
|
155
|
-
},
|
|
156
|
-
return this.add(-1 *
|
|
157
|
-
},
|
|
158
|
-
var
|
|
159
|
-
if (!this.isValid()) return
|
|
160
|
-
var X =
|
|
161
|
-
return mn && (mn[Rn] || mn(
|
|
153
|
+
var tn = (Z = {}, Z[h] = t, Z[r] = o, Z[s] = i, Z)[R] || 1, hn = this.$d.getTime() + q * tn;
|
|
154
|
+
return m.w(hn, this);
|
|
155
|
+
}, x.subtract = function(q, O) {
|
|
156
|
+
return this.add(-1 * q, O);
|
|
157
|
+
}, x.format = function(q) {
|
|
158
|
+
var O = this, Z = this.$locale();
|
|
159
|
+
if (!this.isValid()) return Z.invalidDate || d;
|
|
160
|
+
var X = q || "YYYY-MM-DDTHH:mm:ssZ", R = m.z(this), Q = this.$H, tn = this.$m, hn = this.$M, an = Z.weekdays, zn = Z.months, oe = Z.meridiem, Bn = function(mn, Rn, fe, Ke) {
|
|
161
|
+
return mn && (mn[Rn] || mn(O, X)) || fe[Rn].slice(0, Ke);
|
|
162
162
|
}, pe = function(mn) {
|
|
163
|
-
return
|
|
163
|
+
return m.s(Q % 12 || 12, mn, "0");
|
|
164
164
|
}, Qn = oe || function(mn, Rn, fe) {
|
|
165
165
|
var Ke = mn < 12 ? "AM" : "PM";
|
|
166
166
|
return fe ? Ke.toLowerCase() : Ke;
|
|
167
167
|
};
|
|
168
|
-
return X.replace(
|
|
168
|
+
return X.replace(b, function(mn, Rn) {
|
|
169
169
|
return Rn || function(fe) {
|
|
170
170
|
switch (fe) {
|
|
171
171
|
case "YY":
|
|
172
|
-
return String(
|
|
172
|
+
return String(O.$y).slice(-2);
|
|
173
173
|
case "YYYY":
|
|
174
|
-
return
|
|
174
|
+
return m.s(O.$y, 4, "0");
|
|
175
175
|
case "M":
|
|
176
176
|
return hn + 1;
|
|
177
177
|
case "MM":
|
|
178
|
-
return
|
|
178
|
+
return m.s(hn + 1, 2, "0");
|
|
179
179
|
case "MMM":
|
|
180
|
-
return Bn(
|
|
180
|
+
return Bn(Z.monthsShort, hn, zn, 3);
|
|
181
181
|
case "MMMM":
|
|
182
182
|
return Bn(zn, hn);
|
|
183
183
|
case "D":
|
|
184
|
-
return
|
|
184
|
+
return O.$D;
|
|
185
185
|
case "DD":
|
|
186
|
-
return
|
|
186
|
+
return m.s(O.$D, 2, "0");
|
|
187
187
|
case "d":
|
|
188
|
-
return String(
|
|
188
|
+
return String(O.$W);
|
|
189
189
|
case "dd":
|
|
190
|
-
return Bn(
|
|
190
|
+
return Bn(Z.weekdaysMin, O.$W, an, 2);
|
|
191
191
|
case "ddd":
|
|
192
|
-
return Bn(
|
|
192
|
+
return Bn(Z.weekdaysShort, O.$W, an, 3);
|
|
193
193
|
case "dddd":
|
|
194
|
-
return an[
|
|
194
|
+
return an[O.$W];
|
|
195
195
|
case "H":
|
|
196
196
|
return String(Q);
|
|
197
197
|
case "HH":
|
|
198
|
-
return
|
|
198
|
+
return m.s(Q, 2, "0");
|
|
199
199
|
case "h":
|
|
200
200
|
return pe(1);
|
|
201
201
|
case "hh":
|
|
@@ -207,27 +207,27 @@ var _t = { exports: {} };
|
|
|
207
207
|
case "m":
|
|
208
208
|
return String(tn);
|
|
209
209
|
case "mm":
|
|
210
|
-
return
|
|
210
|
+
return m.s(tn, 2, "0");
|
|
211
211
|
case "s":
|
|
212
|
-
return String(
|
|
212
|
+
return String(O.$s);
|
|
213
213
|
case "ss":
|
|
214
|
-
return
|
|
214
|
+
return m.s(O.$s, 2, "0");
|
|
215
215
|
case "SSS":
|
|
216
|
-
return
|
|
216
|
+
return m.s(O.$ms, 3, "0");
|
|
217
217
|
case "Z":
|
|
218
218
|
return R;
|
|
219
219
|
}
|
|
220
220
|
return null;
|
|
221
221
|
}(mn) || R.replace(":", "");
|
|
222
222
|
});
|
|
223
|
-
},
|
|
223
|
+
}, x.utcOffset = function() {
|
|
224
224
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
225
|
-
},
|
|
226
|
-
var X, R = this, Q =
|
|
227
|
-
return
|
|
225
|
+
}, x.diff = function(q, O, Z) {
|
|
226
|
+
var X, R = this, Q = m.p(O), tn = S(q), hn = (tn.utcOffset() - this.utcOffset()) * t, an = this - tn, zn = function() {
|
|
227
|
+
return m.m(R, tn);
|
|
228
228
|
};
|
|
229
229
|
switch (Q) {
|
|
230
|
-
case
|
|
230
|
+
case p:
|
|
231
231
|
X = zn() / 12;
|
|
232
232
|
break;
|
|
233
233
|
case a:
|
|
@@ -254,36 +254,36 @@ var _t = { exports: {} };
|
|
|
254
254
|
default:
|
|
255
255
|
X = an;
|
|
256
256
|
}
|
|
257
|
-
return
|
|
258
|
-
},
|
|
257
|
+
return Z ? X : m.a(X);
|
|
258
|
+
}, x.daysInMonth = function() {
|
|
259
259
|
return this.endOf(a).$D;
|
|
260
|
-
},
|
|
260
|
+
}, x.$locale = function() {
|
|
261
261
|
return k[this.$L];
|
|
262
|
-
},
|
|
263
|
-
if (!
|
|
264
|
-
var
|
|
265
|
-
return X && (
|
|
266
|
-
},
|
|
267
|
-
return
|
|
268
|
-
},
|
|
262
|
+
}, x.locale = function(q, O) {
|
|
263
|
+
if (!q) return this.$L;
|
|
264
|
+
var Z = this.clone(), X = V(q, O, !0);
|
|
265
|
+
return X && (Z.$L = X), Z;
|
|
266
|
+
}, x.clone = function() {
|
|
267
|
+
return m.w(this.$d, this);
|
|
268
|
+
}, x.toDate = function() {
|
|
269
269
|
return new Date(this.valueOf());
|
|
270
|
-
},
|
|
270
|
+
}, x.toJSON = function() {
|
|
271
271
|
return this.isValid() ? this.toISOString() : null;
|
|
272
|
-
},
|
|
272
|
+
}, x.toISOString = function() {
|
|
273
273
|
return this.$d.toISOString();
|
|
274
|
-
},
|
|
274
|
+
}, x.toString = function() {
|
|
275
275
|
return this.$d.toUTCString();
|
|
276
|
-
},
|
|
277
|
-
}(),
|
|
278
|
-
return
|
|
279
|
-
|
|
280
|
-
return this.$g(
|
|
276
|
+
}, j;
|
|
277
|
+
}(), W = C.prototype;
|
|
278
|
+
return S.prototype = W, [["$ms", l], ["$s", s], ["$m", h], ["$H", r], ["$W", u], ["$M", a], ["$y", p], ["$D", f]].forEach(function(j) {
|
|
279
|
+
W[j[1]] = function(x) {
|
|
280
|
+
return this.$g(x, j[0], j[1]);
|
|
281
281
|
};
|
|
282
|
-
}),
|
|
283
|
-
return
|
|
284
|
-
},
|
|
285
|
-
return
|
|
286
|
-
},
|
|
282
|
+
}), S.extend = function(j, x) {
|
|
283
|
+
return j.$i || (j(x, C, S), j.$i = !0), S;
|
|
284
|
+
}, S.locale = V, S.isDayjs = M, S.unix = function(j) {
|
|
285
|
+
return S(1e3 * j);
|
|
286
|
+
}, S.en = k[J], S.Ls = k, S.p = {}, S;
|
|
287
287
|
});
|
|
288
288
|
})(_t);
|
|
289
289
|
var Pl = _t.exports;
|
|
@@ -296,51 +296,51 @@ var no = { exports: {} };
|
|
|
296
296
|
var i = "minute", t = /[+-]\d\d(?::?\d\d)?/g, o = /([+-]|\d\d)/g;
|
|
297
297
|
return function(l, s, h) {
|
|
298
298
|
var r = s.prototype;
|
|
299
|
-
h.utc = function(
|
|
300
|
-
var y = { date:
|
|
299
|
+
h.utc = function(d) {
|
|
300
|
+
var y = { date: d, utc: !0, args: arguments };
|
|
301
301
|
return new s(y);
|
|
302
|
-
}, r.utc = function(
|
|
302
|
+
}, r.utc = function(d) {
|
|
303
303
|
var y = h(this.toDate(), { locale: this.$L, utc: !0 });
|
|
304
|
-
return
|
|
304
|
+
return d ? y.add(this.utcOffset(), i) : y;
|
|
305
305
|
}, r.local = function() {
|
|
306
306
|
return h(this.toDate(), { locale: this.$L, utc: !1 });
|
|
307
307
|
};
|
|
308
308
|
var u = r.parse;
|
|
309
|
-
r.parse = function(
|
|
310
|
-
|
|
309
|
+
r.parse = function(d) {
|
|
310
|
+
d.utc && (this.$u = !0), this.$utils().u(d.$offset) || (this.$offset = d.$offset), u.call(this, d);
|
|
311
311
|
};
|
|
312
312
|
var g = r.init;
|
|
313
313
|
r.init = function() {
|
|
314
314
|
if (this.$u) {
|
|
315
|
-
var
|
|
316
|
-
this.$y =
|
|
315
|
+
var d = this.$d;
|
|
316
|
+
this.$y = d.getUTCFullYear(), this.$M = d.getUTCMonth(), this.$D = d.getUTCDate(), this.$W = d.getUTCDay(), this.$H = d.getUTCHours(), this.$m = d.getUTCMinutes(), this.$s = d.getUTCSeconds(), this.$ms = d.getUTCMilliseconds();
|
|
317
317
|
} else g.call(this);
|
|
318
318
|
};
|
|
319
319
|
var a = r.utcOffset;
|
|
320
|
-
r.utcOffset = function(
|
|
321
|
-
var
|
|
322
|
-
if (
|
|
323
|
-
if (typeof
|
|
320
|
+
r.utcOffset = function(d, y) {
|
|
321
|
+
var b = this.$utils().u;
|
|
322
|
+
if (b(d)) return this.$u ? 0 : b(this.$offset) ? a.call(this) : this.$offset;
|
|
323
|
+
if (typeof d == "string" && (d = function(J) {
|
|
324
324
|
J === void 0 && (J = "");
|
|
325
325
|
var k = J.match(t);
|
|
326
326
|
if (!k) return null;
|
|
327
327
|
var G = ("" + k[0]).match(o) || ["-", 0, 0], M = G[0], V = 60 * +G[1] + +G[2];
|
|
328
328
|
return V === 0 ? 0 : M === "+" ? V : -V;
|
|
329
|
-
}(
|
|
330
|
-
var
|
|
331
|
-
if (
|
|
329
|
+
}(d), d === null)) return this;
|
|
330
|
+
var A = Math.abs(d) <= 16 ? 60 * d : d;
|
|
331
|
+
if (A === 0) return this.utc(y);
|
|
332
332
|
var I = this.clone();
|
|
333
|
-
if (y) return I.$offset =
|
|
333
|
+
if (y) return I.$offset = A, I.$u = !1, I;
|
|
334
334
|
var w = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
335
|
-
return (I = this.local().add(
|
|
335
|
+
return (I = this.local().add(A + w, i)).$offset = A, I.$x.$localOffset = w, I;
|
|
336
336
|
};
|
|
337
337
|
var c = r.format;
|
|
338
|
-
r.format = function(
|
|
339
|
-
var y =
|
|
338
|
+
r.format = function(d) {
|
|
339
|
+
var y = d || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
340
340
|
return c.call(this, y);
|
|
341
341
|
}, r.valueOf = function() {
|
|
342
|
-
var
|
|
343
|
-
return this.$d.valueOf() - 6e4 *
|
|
342
|
+
var d = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
343
|
+
return this.$d.valueOf() - 6e4 * d;
|
|
344
344
|
}, r.isUTC = function() {
|
|
345
345
|
return !!this.$u;
|
|
346
346
|
}, r.toISOString = function() {
|
|
@@ -348,15 +348,15 @@ var no = { exports: {} };
|
|
|
348
348
|
}, r.toString = function() {
|
|
349
349
|
return this.toDate().toUTCString();
|
|
350
350
|
};
|
|
351
|
-
var
|
|
352
|
-
r.toDate = function(
|
|
353
|
-
return
|
|
351
|
+
var p = r.toDate;
|
|
352
|
+
r.toDate = function(d) {
|
|
353
|
+
return d === "s" && this.$offset ? h(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : p.call(this);
|
|
354
354
|
};
|
|
355
355
|
var f = r.diff;
|
|
356
|
-
r.diff = function(
|
|
357
|
-
if (
|
|
358
|
-
var
|
|
359
|
-
return f.call(
|
|
356
|
+
r.diff = function(d, y, b) {
|
|
357
|
+
if (d && this.$u === d.$u) return f.call(this, d, y, b);
|
|
358
|
+
var A = this.local(), I = h(d).local();
|
|
359
|
+
return f.call(A, I, y, b);
|
|
360
360
|
};
|
|
361
361
|
};
|
|
362
362
|
});
|
|
@@ -557,7 +557,7 @@ const Hn = (e) => {
|
|
|
557
557
|
Nt((a) => ({
|
|
558
558
|
v6cd858ea: u.value,
|
|
559
559
|
v4f17a402: g.value,
|
|
560
|
-
v6f0655b0:
|
|
560
|
+
v6f0655b0: z(t)
|
|
561
561
|
}));
|
|
562
562
|
const n = e, { size: i, color: t, name: o, prefix: l } = ki(n), h = Object.entries(/* @__PURE__ */ Object.assign({
|
|
563
563
|
"../../assets/icons-component/icon-component-clear.svg": ds,
|
|
@@ -598,10 +598,10 @@ const Hn = (e) => {
|
|
|
598
598
|
"../../assets/icons-editor/editor-time.svg": Es,
|
|
599
599
|
"../../assets/icons-editor/editor-upload.svg": Ds
|
|
600
600
|
})).reduce(
|
|
601
|
-
(a, [c,
|
|
602
|
-
var
|
|
603
|
-
const f = (
|
|
604
|
-
return f && (a[f] =
|
|
601
|
+
(a, [c, p]) => {
|
|
602
|
+
var d;
|
|
603
|
+
const f = (d = c.split("/").pop()) == null ? void 0 : d.replace(/\.svg$/, "");
|
|
604
|
+
return f && (a[f] = p), a;
|
|
605
605
|
},
|
|
606
606
|
{}
|
|
607
607
|
), r = T(() => (h[o.value] ?? h[`${l.value}-${o.value}`] ?? "").replace("<svg", '<svg fill="currentColor"')), u = T(() => Ai(i.value) ? "1em" : Hn(vi(i.value) ? i.value[0] : i.value)), g = T(() => Ai(i.value) ? "1em" : Hn(vi(i.value) ? i.value[1] : i.value));
|
|
@@ -627,7 +627,7 @@ const Hn = (e) => {
|
|
|
627
627
|
},
|
|
628
628
|
setup(e) {
|
|
629
629
|
const { renderSlots: n } = cs(["default", "icon"]);
|
|
630
|
-
return (i, t) => (Y(), _(
|
|
630
|
+
return (i, t) => (Y(), _(z(Ol), zl({
|
|
631
631
|
class: [
|
|
632
632
|
{
|
|
633
633
|
"cx-button-link": e.link
|
|
@@ -635,8 +635,8 @@ const Hn = (e) => {
|
|
|
635
635
|
]
|
|
636
636
|
}, i.$attrs, { size: "large" }), bl({
|
|
637
637
|
loading: N(() => [
|
|
638
|
-
|
|
639
|
-
H(
|
|
638
|
+
v("i", _s, [
|
|
639
|
+
H(z(rn), {
|
|
640
640
|
name: "icon-component-loading",
|
|
641
641
|
size: "18px"
|
|
642
642
|
})
|
|
@@ -644,7 +644,7 @@ const Hn = (e) => {
|
|
|
644
644
|
]),
|
|
645
645
|
_: 2
|
|
646
646
|
}, [
|
|
647
|
-
gn(
|
|
647
|
+
gn(z(n), (o) => ({
|
|
648
648
|
name: o,
|
|
649
649
|
fn: N((l) => [
|
|
650
650
|
wn(i.$slots, o, jl(vl(l || {})), void 0, !0)
|
|
@@ -661,20 +661,20 @@ const Hn = (e) => {
|
|
|
661
661
|
},
|
|
662
662
|
setup(e) {
|
|
663
663
|
return (n, i) => (Y(), L("div", ih, [
|
|
664
|
-
|
|
664
|
+
v("div", {
|
|
665
665
|
style: he({
|
|
666
|
-
width:
|
|
667
|
-
height:
|
|
666
|
+
width: z(Hn)(e.size),
|
|
667
|
+
height: z(Hn)(e.size)
|
|
668
668
|
}),
|
|
669
669
|
class: "cx-empty-icon"
|
|
670
670
|
}, [
|
|
671
671
|
wn(n.$slots, "icon", {}, () => [
|
|
672
|
-
|
|
673
|
-
src: e.type === "normal" ?
|
|
672
|
+
v("img", {
|
|
673
|
+
src: e.type === "normal" ? z(nh) : z(eh)
|
|
674
674
|
}, null, 8, th)
|
|
675
675
|
], !0)
|
|
676
676
|
], 4),
|
|
677
|
-
|
|
677
|
+
v("div", oh, F(e.description), 1)
|
|
678
678
|
]));
|
|
679
679
|
}
|
|
680
680
|
}), sh = /* @__PURE__ */ sn(lh, [["__scopeId", "data-v-56b17ee0"]]);
|
|
@@ -698,7 +698,7 @@ function Fe() {
|
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
700
|
function nn(e) {
|
|
701
|
-
return typeof e == "function" ? e() :
|
|
701
|
+
return typeof e == "function" ? e() : z(e);
|
|
702
702
|
}
|
|
703
703
|
const Ye = typeof window < "u" && typeof document < "u";
|
|
704
704
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -791,14 +791,14 @@ function lt(e, n, i = {}) {
|
|
|
791
791
|
{ ...o, flush: "sync" }
|
|
792
792
|
)
|
|
793
793
|
), s = (c) => {
|
|
794
|
-
const
|
|
795
|
-
c(), g.value += a.value -
|
|
794
|
+
const p = a.value;
|
|
795
|
+
c(), g.value += a.value - p;
|
|
796
796
|
}, u.push(
|
|
797
797
|
cn(
|
|
798
798
|
e,
|
|
799
799
|
(...c) => {
|
|
800
|
-
const
|
|
801
|
-
g.value = 0, a.value = 0, !
|
|
800
|
+
const p = g.value > 0 && g.value === a.value;
|
|
801
|
+
g.value = 0, a.value = 0, !p && l(...c);
|
|
802
802
|
},
|
|
803
803
|
o
|
|
804
804
|
)
|
|
@@ -821,14 +821,14 @@ function E(...e) {
|
|
|
821
821
|
Array.isArray(i) || (i = [i]), Array.isArray(t) || (t = [t]);
|
|
822
822
|
const l = [], s = () => {
|
|
823
823
|
l.forEach((g) => g()), l.length = 0;
|
|
824
|
-
}, h = (g, a, c,
|
|
824
|
+
}, h = (g, a, c, p) => (g.addEventListener(a, c, p), () => g.removeEventListener(a, c, p)), r = cn(
|
|
825
825
|
() => [$n(n), nn(o)],
|
|
826
826
|
([g, a]) => {
|
|
827
827
|
if (s(), !g)
|
|
828
828
|
return;
|
|
829
829
|
const c = so(a) ? { ...a } : a;
|
|
830
830
|
l.push(
|
|
831
|
-
...i.flatMap((
|
|
831
|
+
...i.flatMap((p) => t.map((f) => h(g, p, f, c)))
|
|
832
832
|
);
|
|
833
833
|
},
|
|
834
834
|
{ immediate: !0, flush: "post" }
|
|
@@ -884,25 +884,25 @@ function yh(e = {}) {
|
|
|
884
884
|
copiedDuring: o = 1500,
|
|
885
885
|
legacy: l = !1
|
|
886
886
|
} = e, s = Ji(() => n && "clipboard" in n), h = st("clipboard-read"), r = st("clipboard-write"), u = T(() => s.value || l), g = K(""), a = K(!1), c = ph(() => a.value = !1, o);
|
|
887
|
-
function
|
|
888
|
-
s.value &&
|
|
889
|
-
g.value =
|
|
887
|
+
function p() {
|
|
888
|
+
s.value && b(h.value) ? n.clipboard.readText().then((A) => {
|
|
889
|
+
g.value = A;
|
|
890
890
|
}) : g.value = y();
|
|
891
891
|
}
|
|
892
|
-
u.value && i && E(["copy", "cut"],
|
|
893
|
-
async function f(
|
|
894
|
-
u.value &&
|
|
892
|
+
u.value && i && E(["copy", "cut"], p);
|
|
893
|
+
async function f(A = nn(t)) {
|
|
894
|
+
u.value && A != null && (s.value && b(r.value) ? await n.clipboard.writeText(A) : d(A), g.value = A, a.value = !0, c.start());
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function d(A) {
|
|
897
897
|
const I = document.createElement("textarea");
|
|
898
|
-
I.value =
|
|
898
|
+
I.value = A ?? "", I.style.position = "absolute", I.style.opacity = "0", document.body.appendChild(I), I.select(), document.execCommand("copy"), I.remove();
|
|
899
899
|
}
|
|
900
900
|
function y() {
|
|
901
|
-
var
|
|
902
|
-
return (w = (I = (
|
|
901
|
+
var A, I, w;
|
|
902
|
+
return (w = (I = (A = document == null ? void 0 : document.getSelection) == null ? void 0 : A.call(document)) == null ? void 0 : I.toString()) != null ? w : "";
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
return
|
|
904
|
+
function b(A) {
|
|
905
|
+
return A === "granted" || A === "prompt";
|
|
906
906
|
}
|
|
907
907
|
return {
|
|
908
908
|
isSupported: u,
|
|
@@ -916,44 +916,44 @@ function qh(e, n = {}) {
|
|
|
916
916
|
const o = K(!1), l = zi(null);
|
|
917
917
|
let s = 0, h = !0;
|
|
918
918
|
if (Ye) {
|
|
919
|
-
const r = typeof n == "function" ? { onDrop: n } : n, u = (i = r.multiple) != null ? i : !0, g = (t = r.preventDefaultForUnhandled) != null ? t : !1, a = (
|
|
920
|
-
var y,
|
|
921
|
-
const
|
|
922
|
-
return
|
|
923
|
-
}, c = (
|
|
919
|
+
const r = typeof n == "function" ? { onDrop: n } : n, u = (i = r.multiple) != null ? i : !0, g = (t = r.preventDefaultForUnhandled) != null ? t : !1, a = (d) => {
|
|
920
|
+
var y, b;
|
|
921
|
+
const A = Array.from((b = (y = d.dataTransfer) == null ? void 0 : y.files) != null ? b : []);
|
|
922
|
+
return A.length === 0 ? null : u ? A : [A[0]];
|
|
923
|
+
}, c = (d) => {
|
|
924
924
|
if (r.dataTypes) {
|
|
925
|
-
const y =
|
|
926
|
-
return typeof y == "function" ? y(
|
|
925
|
+
const y = z(r.dataTypes);
|
|
926
|
+
return typeof y == "function" ? y(d) : y ? y.some((b) => d.includes(b)) : !0;
|
|
927
927
|
}
|
|
928
928
|
return !0;
|
|
929
|
-
},
|
|
930
|
-
var y,
|
|
931
|
-
const
|
|
929
|
+
}, p = (d) => {
|
|
930
|
+
var y, b;
|
|
931
|
+
const A = Array.from((b = (y = d.dataTransfer) == null ? void 0 : y.items) != null ? b : []), I = A.map((k) => k.type), w = c(I), J = u || A.length <= 1;
|
|
932
932
|
return w && J;
|
|
933
|
-
}, f = (
|
|
934
|
-
var
|
|
935
|
-
if (h = d
|
|
936
|
-
g &&
|
|
933
|
+
}, f = (d, y) => {
|
|
934
|
+
var b, A, I, w;
|
|
935
|
+
if (h = p(d), !h) {
|
|
936
|
+
g && d.preventDefault(), d.dataTransfer && (d.dataTransfer.dropEffect = "none");
|
|
937
937
|
return;
|
|
938
938
|
}
|
|
939
|
-
|
|
940
|
-
const J = a(
|
|
939
|
+
d.preventDefault(), d.dataTransfer && (d.dataTransfer.dropEffect = "copy");
|
|
940
|
+
const J = a(d);
|
|
941
941
|
switch (y) {
|
|
942
942
|
case "enter":
|
|
943
|
-
s += 1, o.value = !0, (
|
|
943
|
+
s += 1, o.value = !0, (b = r.onEnter) == null || b.call(r, null, d);
|
|
944
944
|
break;
|
|
945
945
|
case "over":
|
|
946
|
-
(
|
|
946
|
+
(A = r.onOver) == null || A.call(r, null, d);
|
|
947
947
|
break;
|
|
948
948
|
case "leave":
|
|
949
|
-
s -= 1, s === 0 && (o.value = !1), (I = r.onLeave) == null || I.call(r, null,
|
|
949
|
+
s -= 1, s === 0 && (o.value = !1), (I = r.onLeave) == null || I.call(r, null, d);
|
|
950
950
|
break;
|
|
951
951
|
case "drop":
|
|
952
|
-
s = 0, o.value = !1, h && (l.value = J, (w = r.onDrop) == null || w.call(r, J,
|
|
952
|
+
s = 0, o.value = !1, h && (l.value = J, (w = r.onDrop) == null || w.call(r, J, d));
|
|
953
953
|
break;
|
|
954
954
|
}
|
|
955
955
|
};
|
|
956
|
-
E(e, "dragenter", (
|
|
956
|
+
E(e, "dragenter", (d) => f(d, "enter")), E(e, "dragover", (d) => f(d, "over")), E(e, "dragleave", (d) => f(d, "leave")), E(e, "drop", (d) => f(d, "drop"));
|
|
957
957
|
}
|
|
958
958
|
return {
|
|
959
959
|
files: l,
|
|
@@ -995,14 +995,14 @@ function zh(e, n = { width: 0, height: 0 }, i = {}) {
|
|
|
995
995
|
([a]) => {
|
|
996
996
|
const c = o === "border-box" ? a.borderBoxSize : o === "content-box" ? a.contentBoxSize : a.devicePixelContentBoxSize;
|
|
997
997
|
if (t && l.value) {
|
|
998
|
-
const
|
|
999
|
-
if (
|
|
1000
|
-
const f =
|
|
998
|
+
const p = $n(e);
|
|
999
|
+
if (p) {
|
|
1000
|
+
const f = p.getBoundingClientRect();
|
|
1001
1001
|
s.value = f.width, h.value = f.height;
|
|
1002
1002
|
}
|
|
1003
1003
|
} else if (c) {
|
|
1004
|
-
const
|
|
1005
|
-
s.value =
|
|
1004
|
+
const p = Array.isArray(c) ? c : [c];
|
|
1005
|
+
s.value = p.reduce((f, { inlineSize: d }) => f + d, 0), h.value = p.reduce((f, { blockSize: d }) => f + d, 0);
|
|
1006
1006
|
} else
|
|
1007
1007
|
s.value = a.contentRect.width, h.value = a.contentRect.height;
|
|
1008
1008
|
},
|
|
@@ -1116,83 +1116,83 @@ function xh(e, n = {}) {
|
|
|
1116
1116
|
};
|
|
1117
1117
|
const {
|
|
1118
1118
|
document: i = ro
|
|
1119
|
-
} = n, t = K(0), o = K(0), l = K(!1), s = K(1), h = K(!1), r = K(!1), u = K(!1), g = K(1), a = K(!1), c = K([]),
|
|
1120
|
-
si(e, (
|
|
1121
|
-
if (
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1119
|
+
} = n, t = K(0), o = K(0), l = K(!1), s = K(1), h = K(!1), r = K(!1), u = K(!1), g = K(1), a = K(!1), c = K([]), p = K([]), f = K(-1), d = K(!1), y = K(!1), b = i && "pictureInPictureEnabled" in i, A = Fe(), I = Fe(), w = (m) => {
|
|
1120
|
+
si(e, (C) => {
|
|
1121
|
+
if (m) {
|
|
1122
|
+
const W = typeof m == "number" ? m : m.id;
|
|
1123
|
+
C.textTracks[W].mode = "disabled";
|
|
1124
1124
|
} else
|
|
1125
|
-
for (let
|
|
1126
|
-
|
|
1125
|
+
for (let W = 0; W < C.textTracks.length; ++W)
|
|
1126
|
+
C.textTracks[W].mode = "disabled";
|
|
1127
1127
|
f.value = -1;
|
|
1128
1128
|
});
|
|
1129
|
-
}, J = (
|
|
1130
|
-
si(e, (
|
|
1131
|
-
const
|
|
1132
|
-
|
|
1129
|
+
}, J = (m, C = !0) => {
|
|
1130
|
+
si(e, (W) => {
|
|
1131
|
+
const j = typeof m == "number" ? m : m.id;
|
|
1132
|
+
C && w(), W.textTracks[j].mode = "showing", f.value = j;
|
|
1133
1133
|
});
|
|
1134
|
-
}, k = () => new Promise((
|
|
1135
|
-
si(e, async (
|
|
1136
|
-
|
|
1134
|
+
}, k = () => new Promise((m, C) => {
|
|
1135
|
+
si(e, async (W) => {
|
|
1136
|
+
b && (d.value ? i.exitPictureInPicture().then(m).catch(C) : W.requestPictureInPicture().then(m).catch(C));
|
|
1137
1137
|
});
|
|
1138
1138
|
});
|
|
1139
1139
|
$i(() => {
|
|
1140
1140
|
if (!i)
|
|
1141
1141
|
return;
|
|
1142
|
-
const
|
|
1143
|
-
if (!
|
|
1142
|
+
const m = nn(e);
|
|
1143
|
+
if (!m)
|
|
1144
1144
|
return;
|
|
1145
|
-
const
|
|
1146
|
-
let
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
}),
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1152
|
-
}),
|
|
1145
|
+
const C = nn(n.src);
|
|
1146
|
+
let W = [];
|
|
1147
|
+
C && (typeof C == "string" ? W = [{ src: C }] : Array.isArray(C) ? W = C : so(C) && (W = [C]), m.querySelectorAll("source").forEach((j) => {
|
|
1148
|
+
j.removeEventListener("error", A.trigger), j.remove();
|
|
1149
|
+
}), W.forEach(({ src: j, type: x }) => {
|
|
1150
|
+
const q = i.createElement("source");
|
|
1151
|
+
q.setAttribute("src", j), q.setAttribute("type", x || ""), q.addEventListener("error", A.trigger), m.appendChild(q);
|
|
1152
|
+
}), m.load());
|
|
1153
1153
|
}), ge(() => {
|
|
1154
|
-
const
|
|
1155
|
-
|
|
1154
|
+
const m = nn(e);
|
|
1155
|
+
m && m.querySelectorAll("source").forEach((C) => C.removeEventListener("error", A.trigger));
|
|
1156
1156
|
}), cn([e, s], () => {
|
|
1157
|
-
const
|
|
1158
|
-
|
|
1157
|
+
const m = nn(e);
|
|
1158
|
+
m && (m.volume = s.value);
|
|
1159
1159
|
}), cn([e, y], () => {
|
|
1160
|
-
const
|
|
1161
|
-
|
|
1160
|
+
const m = nn(e);
|
|
1161
|
+
m && (m.muted = y.value);
|
|
1162
1162
|
}), cn([e, g], () => {
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1163
|
+
const m = nn(e);
|
|
1164
|
+
m && (m.playbackRate = g.value);
|
|
1165
1165
|
}), $i(() => {
|
|
1166
1166
|
if (!i)
|
|
1167
1167
|
return;
|
|
1168
|
-
const
|
|
1169
|
-
!
|
|
1168
|
+
const m = nn(n.tracks), C = nn(e);
|
|
1169
|
+
!m || !m.length || !C || (C.querySelectorAll("track").forEach((W) => W.remove()), m.forEach(({ default: W, kind: j, label: x, src: q, srcLang: O }, Z) => {
|
|
1170
1170
|
const X = i.createElement("track");
|
|
1171
|
-
X.default =
|
|
1171
|
+
X.default = W || !1, X.kind = j, X.label = x, X.src = q, X.srclang = O, X.default && (f.value = Z), C.appendChild(X);
|
|
1172
1172
|
}));
|
|
1173
1173
|
});
|
|
1174
|
-
const { ignoreUpdates: G } = lt(t, (
|
|
1175
|
-
const
|
|
1176
|
-
|
|
1177
|
-
}), { ignoreUpdates: M } = lt(u, (
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1180
|
-
throw I.trigger(
|
|
1181
|
-
}) :
|
|
1174
|
+
const { ignoreUpdates: G } = lt(t, (m) => {
|
|
1175
|
+
const C = nn(e);
|
|
1176
|
+
C && (C.currentTime = m);
|
|
1177
|
+
}), { ignoreUpdates: M } = lt(u, (m) => {
|
|
1178
|
+
const C = nn(e);
|
|
1179
|
+
C && (m ? C.play().catch((W) => {
|
|
1180
|
+
throw I.trigger(W), W;
|
|
1181
|
+
}) : C.pause());
|
|
1182
1182
|
});
|
|
1183
1183
|
E(e, "timeupdate", () => G(() => t.value = nn(e).currentTime)), E(e, "durationchange", () => o.value = nn(e).duration), E(e, "progress", () => c.value = Ah(nn(e).buffered)), E(e, "seeking", () => l.value = !0), E(e, "seeked", () => l.value = !1), E(e, ["waiting", "loadstart"], () => {
|
|
1184
1184
|
h.value = !0, M(() => u.value = !1);
|
|
1185
1185
|
}), E(e, "loadeddata", () => h.value = !1), E(e, "playing", () => {
|
|
1186
1186
|
h.value = !1, r.value = !1, M(() => u.value = !0);
|
|
1187
|
-
}), E(e, "ratechange", () => g.value = nn(e).playbackRate), E(e, "stalled", () => a.value = !0), E(e, "ended", () => r.value = !0), E(e, "pause", () => M(() => u.value = !1)), E(e, "play", () => M(() => u.value = !0)), E(e, "enterpictureinpicture", () =>
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1187
|
+
}), E(e, "ratechange", () => g.value = nn(e).playbackRate), E(e, "stalled", () => a.value = !0), E(e, "ended", () => r.value = !0), E(e, "pause", () => M(() => u.value = !1)), E(e, "play", () => M(() => u.value = !0)), E(e, "enterpictureinpicture", () => d.value = !0), E(e, "leavepictureinpicture", () => d.value = !1), E(e, "volumechange", () => {
|
|
1188
|
+
const m = nn(e);
|
|
1189
|
+
m && (s.value = m.volume, y.value = m.muted);
|
|
1190
1190
|
});
|
|
1191
|
-
const V = [],
|
|
1192
|
-
const
|
|
1193
|
-
|
|
1191
|
+
const V = [], S = cn([e], () => {
|
|
1192
|
+
const m = nn(e);
|
|
1193
|
+
m && (S(), V[0] = E(m.textTracks, "addtrack", () => p.value = hi(m.textTracks)), V[1] = E(m.textTracks, "removetrack", () => p.value = hi(m.textTracks)), V[2] = E(m.textTracks, "change", () => p.value = hi(m.textTracks)));
|
|
1194
1194
|
});
|
|
1195
|
-
return ge(() => V.forEach((
|
|
1195
|
+
return ge(() => V.forEach((m) => m())), {
|
|
1196
1196
|
currentTime: t,
|
|
1197
1197
|
duration: o,
|
|
1198
1198
|
waiting: h,
|
|
@@ -1206,16 +1206,16 @@ function xh(e, n = {}) {
|
|
|
1206
1206
|
volume: s,
|
|
1207
1207
|
muted: y,
|
|
1208
1208
|
// Tracks
|
|
1209
|
-
tracks:
|
|
1209
|
+
tracks: p,
|
|
1210
1210
|
selectedTrack: f,
|
|
1211
1211
|
enableTrack: J,
|
|
1212
1212
|
disableTrack: w,
|
|
1213
1213
|
// Picture in Picture
|
|
1214
|
-
supportsPictureInPicture:
|
|
1214
|
+
supportsPictureInPicture: b,
|
|
1215
1215
|
togglePictureInPicture: k,
|
|
1216
|
-
isPictureInPicture:
|
|
1216
|
+
isPictureInPicture: d,
|
|
1217
1217
|
// Events
|
|
1218
|
-
onSourceError:
|
|
1218
|
+
onSourceError: A.on,
|
|
1219
1219
|
onPlaybackError: I.on
|
|
1220
1220
|
};
|
|
1221
1221
|
}
|
|
@@ -1239,72 +1239,72 @@ const Ch = { class: "cx-radio-group" }, Ih = ["onClick"], Wh = {
|
|
|
1239
1239
|
},
|
|
1240
1240
|
emits: ["update:modelValue", "change"],
|
|
1241
1241
|
setup(e, { emit: n }) {
|
|
1242
|
-
Nt((
|
|
1243
|
-
v74036a63:
|
|
1244
|
-
v41a8ae01:
|
|
1245
|
-
c15225e4:
|
|
1246
|
-
v9294f916:
|
|
1247
|
-
v5c0c1e88:
|
|
1248
|
-
v69c0c568:
|
|
1242
|
+
Nt((d) => ({
|
|
1243
|
+
v74036a63: d.background,
|
|
1244
|
+
v41a8ae01: d.activeBackgound,
|
|
1245
|
+
c15225e4: d.color,
|
|
1246
|
+
v9294f916: z(h),
|
|
1247
|
+
v5c0c1e88: z(r),
|
|
1248
|
+
v69c0c568: d.activeColor
|
|
1249
1249
|
}));
|
|
1250
1250
|
const i = e, t = n, { modelValue: o, defaultValue: l, options: s, hoverBackground: h, hoverColor: r } = ki(i), u = lo(
|
|
1251
1251
|
o,
|
|
1252
1252
|
l.value || s.value[0].value,
|
|
1253
|
-
(
|
|
1254
|
-
t("update:modelValue",
|
|
1253
|
+
(d) => {
|
|
1254
|
+
t("update:modelValue", d), t("change", d);
|
|
1255
1255
|
}
|
|
1256
|
-
), g = K([]), a = K(), c = (
|
|
1257
|
-
const y = Hn(
|
|
1256
|
+
), g = K([]), a = K(), c = (d = 18) => {
|
|
1257
|
+
const y = Hn(d);
|
|
1258
1258
|
return {
|
|
1259
1259
|
width: y,
|
|
1260
1260
|
height: y,
|
|
1261
1261
|
fontSize: y
|
|
1262
1262
|
};
|
|
1263
|
-
},
|
|
1264
|
-
u.value !==
|
|
1263
|
+
}, p = (d) => {
|
|
1264
|
+
u.value !== d && (u.value = d);
|
|
1265
1265
|
}, f = async () => {
|
|
1266
1266
|
await de();
|
|
1267
|
-
const
|
|
1268
|
-
(
|
|
1269
|
-
), y =
|
|
1267
|
+
const d = s.value.findIndex(
|
|
1268
|
+
(A) => A.value === u.value
|
|
1269
|
+
), y = d === -1 ? 0 : d, b = g.value[y];
|
|
1270
1270
|
a.value = {
|
|
1271
1271
|
...i.sliderStyle || {},
|
|
1272
|
-
width: Hn(
|
|
1273
|
-
transform: `translateX(${Hn(
|
|
1272
|
+
width: Hn(b == null ? void 0 : b.offsetWidth),
|
|
1273
|
+
transform: `translateX(${Hn(b == null ? void 0 : b.offsetLeft)})`
|
|
1274
1274
|
};
|
|
1275
1275
|
};
|
|
1276
1276
|
return cn(() => u.value, f, {
|
|
1277
1277
|
immediate: !0
|
|
1278
1278
|
}), Hi(g, f, {
|
|
1279
1279
|
box: "border-box"
|
|
1280
|
-
}), (
|
|
1281
|
-
|
|
1280
|
+
}), (d, y) => (Y(), L("div", Ch, [
|
|
1281
|
+
v("div", {
|
|
1282
1282
|
class: "cx-radio-slider",
|
|
1283
1283
|
style: he(a.value)
|
|
1284
1284
|
}, null, 4),
|
|
1285
|
-
(Y(!0), L(en, null, gn(
|
|
1286
|
-
key:
|
|
1285
|
+
(Y(!0), L(en, null, gn(z(s), (b, A) => (Y(), L("div", {
|
|
1286
|
+
key: b.value,
|
|
1287
1287
|
style: he(e.radioStyle),
|
|
1288
1288
|
class: bn([
|
|
1289
1289
|
"cx-radio",
|
|
1290
1290
|
{
|
|
1291
|
-
"cx-radio-selected":
|
|
1291
|
+
"cx-radio-selected": z(u) === b.value
|
|
1292
1292
|
}
|
|
1293
1293
|
]),
|
|
1294
1294
|
ref_for: !0,
|
|
1295
|
-
ref: (I) => g.value[
|
|
1296
|
-
onClick: (I) =>
|
|
1295
|
+
ref: (I) => g.value[A] = I,
|
|
1296
|
+
onClick: (I) => p(b.value)
|
|
1297
1297
|
}, [
|
|
1298
|
-
|
|
1298
|
+
b.icon ? (Y(), L("div", {
|
|
1299
1299
|
key: 0,
|
|
1300
1300
|
class: "cx-radio-icon",
|
|
1301
|
-
style: he(c(
|
|
1301
|
+
style: he(c(b.iconSize))
|
|
1302
1302
|
}, [
|
|
1303
|
-
H(
|
|
1304
|
-
name:
|
|
1303
|
+
H(z(rn), {
|
|
1304
|
+
name: b.icon
|
|
1305
1305
|
}, null, 8, ["name"])
|
|
1306
1306
|
], 4)) : yn("", !0),
|
|
1307
|
-
|
|
1307
|
+
b.label ? (Y(), L("div", Wh, F(b.label), 1)) : yn("", !0)
|
|
1308
1308
|
], 14, Ih))), 128))
|
|
1309
1309
|
]));
|
|
1310
1310
|
}
|
|
@@ -1327,13 +1327,13 @@ const Ch = { class: "cx-radio-group" }, Ih = ["onClick"], Wh = {
|
|
|
1327
1327
|
H(Cl, { name: "el-fade-in" }, {
|
|
1328
1328
|
default: N(() => [
|
|
1329
1329
|
e.loading ? (Y(), L("div", Yh, [
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
src:
|
|
1330
|
+
v("div", kh, [
|
|
1331
|
+
v("img", {
|
|
1332
|
+
src: z(Sh),
|
|
1333
1333
|
class: "cx-spin-loading",
|
|
1334
1334
|
style: he({
|
|
1335
|
-
width:
|
|
1336
|
-
height:
|
|
1335
|
+
width: z(Hn)(e.size),
|
|
1336
|
+
height: z(Hn)(e.size)
|
|
1337
1337
|
})
|
|
1338
1338
|
}, null, 12, Kh),
|
|
1339
1339
|
e.text ? (Y(), L("span", Vh, F(e.text), 1)) : yn("", !0)
|
|
@@ -1369,26 +1369,26 @@ const Ch = { class: "cx-radio-group" }, Ih = ["onClick"], Wh = {
|
|
|
1369
1369
|
(w) => {
|
|
1370
1370
|
o("update:modelValue", w);
|
|
1371
1371
|
}
|
|
1372
|
-
), a = T(() => g.value[0]), { onChange: c, open:
|
|
1372
|
+
), a = T(() => g.value[0]), { onChange: c, open: p } = vh({
|
|
1373
1373
|
accept: r.value.join(","),
|
|
1374
1374
|
multiple: !1,
|
|
1375
1375
|
reset: !0
|
|
1376
1376
|
});
|
|
1377
|
-
c((w) =>
|
|
1378
|
-
const f = K(), { isOverDropZone:
|
|
1377
|
+
c((w) => b(w && [...w]));
|
|
1378
|
+
const f = K(), { isOverDropZone: d } = qh(f, {
|
|
1379
1379
|
preventDefaultForUnhandled: !0,
|
|
1380
|
-
onDrop: (w) =>
|
|
1380
|
+
onDrop: (w) => b(w)
|
|
1381
1381
|
}), y = () => {
|
|
1382
1382
|
o("clear"), g.value = [];
|
|
1383
|
-
},
|
|
1383
|
+
}, b = (w) => {
|
|
1384
1384
|
if (u.value || !(w != null && w.length)) return;
|
|
1385
1385
|
const J = w.filter((k) => I(k));
|
|
1386
1386
|
J.length && (g.value = J, o("change", J));
|
|
1387
|
-
},
|
|
1388
|
-
u.value ||
|
|
1387
|
+
}, A = () => {
|
|
1388
|
+
u.value || p();
|
|
1389
1389
|
}, I = (w) => r.value.includes(`.${oo(w.name)}`) ? h.value > 0 && w.size > h.value ? (ji.error("文件大小不符合上传要求"), o("error", "size", w), !1) : !0 : (ji.error("文件类型不符合上传要求"), o("error", "type", w), !1);
|
|
1390
1390
|
return n({
|
|
1391
|
-
open:
|
|
1391
|
+
open: A,
|
|
1392
1392
|
clear: () => {
|
|
1393
1393
|
g.value = [];
|
|
1394
1394
|
}
|
|
@@ -1396,34 +1396,34 @@ const Ch = { class: "cx-radio-group" }, Ih = ["onClick"], Wh = {
|
|
|
1396
1396
|
class: bn([
|
|
1397
1397
|
"cx-upload-wrapper",
|
|
1398
1398
|
{
|
|
1399
|
-
"cx-upload-dragging":
|
|
1400
|
-
"cx-upload-has-value":
|
|
1401
|
-
"cx-upload-disabled":
|
|
1399
|
+
"cx-upload-dragging": z(d),
|
|
1400
|
+
"cx-upload-has-value": z(g).length > 0,
|
|
1401
|
+
"cx-upload-disabled": z(u)
|
|
1402
1402
|
}
|
|
1403
1403
|
])
|
|
1404
1404
|
}, [
|
|
1405
1405
|
a.value ? (Y(), L("div", Xh, [
|
|
1406
|
-
|
|
1407
|
-
H(
|
|
1408
|
-
name: `icon-component-file-${
|
|
1406
|
+
v("div", Jh, [
|
|
1407
|
+
H(z(rn), {
|
|
1408
|
+
name: `icon-component-file-${z(gs)(a.value.name)}`,
|
|
1409
1409
|
size: "56"
|
|
1410
1410
|
}, null, 8, ["name"]),
|
|
1411
|
-
|
|
1411
|
+
v("span", {
|
|
1412
1412
|
class: "cx-upload-clear-icon",
|
|
1413
1413
|
onClick: y
|
|
1414
1414
|
}, [
|
|
1415
|
-
H(
|
|
1415
|
+
H(z(rn), {
|
|
1416
1416
|
name: "icon-component-upload-clear",
|
|
1417
1417
|
size: "16"
|
|
1418
1418
|
})
|
|
1419
1419
|
])
|
|
1420
1420
|
]),
|
|
1421
|
-
|
|
1422
|
-
|
|
1421
|
+
v("div", Hh, F(a.value.name), 1),
|
|
1422
|
+
v("div", Lh, [
|
|
1423
1423
|
wn(w.$slots, "operate", {}, () => [
|
|
1424
|
-
|
|
1424
|
+
v("div", {
|
|
1425
1425
|
class: "cx-upload-file-replace",
|
|
1426
|
-
onClick:
|
|
1426
|
+
onClick: A
|
|
1427
1427
|
}, " 点击更换文件 ")
|
|
1428
1428
|
], !0)
|
|
1429
1429
|
])
|
|
@@ -1432,15 +1432,15 @@ const Ch = { class: "cx-radio-group" }, Ih = ["onClick"], Wh = {
|
|
|
1432
1432
|
class: "cx-upload",
|
|
1433
1433
|
ref_key: "uploadRef",
|
|
1434
1434
|
ref: f,
|
|
1435
|
-
onClick:
|
|
1435
|
+
onClick: A
|
|
1436
1436
|
}, [
|
|
1437
|
-
|
|
1438
|
-
H(
|
|
1437
|
+
v("div", Mh, [
|
|
1438
|
+
H(z(rn), {
|
|
1439
1439
|
name: "icon-component-cx-upload",
|
|
1440
1440
|
size: [28, 19]
|
|
1441
1441
|
})
|
|
1442
1442
|
]),
|
|
1443
|
-
|
|
1443
|
+
v("div", Th, F(e.title), 1),
|
|
1444
1444
|
e.tip ? (Y(), L("div", Nh, F(e.tip), 1)) : yn("", !0)
|
|
1445
1445
|
], 512))
|
|
1446
1446
|
], 2));
|
|
@@ -1525,8 +1525,8 @@ const Uh = {
|
|
|
1525
1525
|
console.warn("无法获取节点位置");
|
|
1526
1526
|
return;
|
|
1527
1527
|
}
|
|
1528
|
-
const
|
|
1529
|
-
a(
|
|
1528
|
+
const p = n.node.textContent, f = c, d = c + n.node.nodeSize, y = g.schema.text(p), b = g.tr.replaceWith(f, d, y);
|
|
1529
|
+
a(b);
|
|
1530
1530
|
}, s = () => {
|
|
1531
1531
|
const u = P[o.value];
|
|
1532
1532
|
if ("deleteMode" in u && u.deleteMode === cl.DELETE_NODE)
|
|
@@ -1537,7 +1537,7 @@ const Uh = {
|
|
|
1537
1537
|
if (o.value === P.language.type)
|
|
1538
1538
|
return ((u = gl.find((g) => g.value === t.value.code)) == null ? void 0 : u.label) || "";
|
|
1539
1539
|
}), r = T(() => P[o.value].icon);
|
|
1540
|
-
return (u, g) => (Y(), _(
|
|
1540
|
+
return (u, g) => (Y(), _(z(Ll), {
|
|
1541
1541
|
as: "span",
|
|
1542
1542
|
class: bn(["tag-node", {
|
|
1543
1543
|
"is-selected": i.value
|
|
@@ -1545,51 +1545,51 @@ const Uh = {
|
|
|
1545
1545
|
contenteditable: "false"
|
|
1546
1546
|
}, {
|
|
1547
1547
|
default: N(() => {
|
|
1548
|
-
var a, c,
|
|
1548
|
+
var a, c, p;
|
|
1549
1549
|
return [
|
|
1550
|
-
|
|
1551
|
-
H(
|
|
1550
|
+
v("span", Dh, [
|
|
1551
|
+
H(z(rn), {
|
|
1552
1552
|
name: r.value,
|
|
1553
1553
|
size: 14
|
|
1554
1554
|
}, null, 8, ["name"])
|
|
1555
1555
|
]),
|
|
1556
|
-
o.value ===
|
|
1557
|
-
|
|
1558
|
-
H(
|
|
1556
|
+
o.value === z(P).stop.type ? (Y(), L("span", Bh, "停顿")) : o.value === z(P).customStop.type ? (Y(), L("span", Qh, "停顿" + F((a = t.value) == null ? void 0 : a.time) + "s", 1)) : o.value === z(P).continue.type ? (Y(), L(en, { key: 2 }, [
|
|
1557
|
+
v("span", null, "连续" + F(be)),
|
|
1558
|
+
H(z(ye), {
|
|
1559
1559
|
as: "span",
|
|
1560
1560
|
class: "tag-content"
|
|
1561
1561
|
})
|
|
1562
|
-
], 64)) : o.value ===
|
|
1563
|
-
|
|
1564
|
-
H(
|
|
1562
|
+
], 64)) : o.value === z(P).replace.type ? (Y(), L(en, { key: 3 }, [
|
|
1563
|
+
v("span", null, "替换" + F(be)),
|
|
1564
|
+
H(z(ye), {
|
|
1565
1565
|
as: "span",
|
|
1566
1566
|
class: "tag-content"
|
|
1567
1567
|
}),
|
|
1568
|
-
g[0] || (g[0] =
|
|
1569
|
-
|
|
1570
|
-
], 64)) : o.value ===
|
|
1571
|
-
|
|
1572
|
-
H(
|
|
1568
|
+
g[0] || (g[0] = v("span", null, "→", -1)),
|
|
1569
|
+
v("span", null, F((c = t.value) == null ? void 0 : c.text), 1)
|
|
1570
|
+
], 64)) : o.value === z(P).pinyin.type ? (Y(), L(en, { key: 4 }, [
|
|
1571
|
+
v("span", null, "拼音" + F(be)),
|
|
1572
|
+
H(z(ye), {
|
|
1573
1573
|
as: "span",
|
|
1574
1574
|
class: "tag-content"
|
|
1575
1575
|
}),
|
|
1576
|
-
g[1] || (g[1] =
|
|
1577
|
-
|
|
1578
|
-
], 64)) : o.value ===
|
|
1579
|
-
|
|
1580
|
-
H(
|
|
1576
|
+
g[1] || (g[1] = v("span", null, "→", -1)),
|
|
1577
|
+
v("span", null, F((p = t.value) == null ? void 0 : p.text), 1)
|
|
1578
|
+
], 64)) : o.value === z(P).language.type ? (Y(), L(en, { key: 5 }, [
|
|
1579
|
+
v("span", null, F(h.value) + F(be), 1),
|
|
1580
|
+
H(z(ye), {
|
|
1581
1581
|
as: "span",
|
|
1582
1582
|
class: "tag-content"
|
|
1583
1583
|
})
|
|
1584
|
-
], 64)) : o.value ===
|
|
1585
|
-
|
|
1586
|
-
H(
|
|
1584
|
+
], 64)) : o.value === z(P).ignore.type ? (Y(), L(en, { key: 6 }, [
|
|
1585
|
+
v("span", null, "忽略读音" + F(be)),
|
|
1586
|
+
H(z(ye), {
|
|
1587
1587
|
as: "span",
|
|
1588
1588
|
class: "tag-content"
|
|
1589
1589
|
})
|
|
1590
1590
|
], 64)) : yn("", !0),
|
|
1591
|
-
|
|
1592
|
-
H(
|
|
1591
|
+
v("span", _h, [
|
|
1592
|
+
H(z(rn), {
|
|
1593
1593
|
name: "editor-close",
|
|
1594
1594
|
class: "delete-btn",
|
|
1595
1595
|
onClick: bi(s, ["stop"])
|
|
@@ -2153,11 +2153,11 @@ class pn {
|
|
|
2153
2153
|
break;
|
|
2154
2154
|
let u = this.ranges[h + l], g = this.ranges[h + s], a = r + u;
|
|
2155
2155
|
if (n <= a) {
|
|
2156
|
-
let c = u ? n == r ? -1 : n == a ? 1 : i : i,
|
|
2156
|
+
let c = u ? n == r ? -1 : n == a ? 1 : i : i, p = r + o + (c < 0 ? 0 : g);
|
|
2157
2157
|
if (t)
|
|
2158
|
-
return
|
|
2159
|
-
let f = n == (i < 0 ? r : a) ? null : or(h / 3, n - r),
|
|
2160
|
-
return (i < 0 ? n != r : n != a) && (
|
|
2158
|
+
return p;
|
|
2159
|
+
let f = n == (i < 0 ? r : a) ? null : or(h / 3, n - r), d = n == r ? jo : n == a ? bo : Le;
|
|
2160
|
+
return (i < 0 ? n != r : n != a) && (d |= vo), new ut(p, d, f);
|
|
2161
2161
|
}
|
|
2162
2162
|
o += g - u;
|
|
2163
2163
|
}
|
|
@@ -3199,12 +3199,12 @@ function rr(e = {}) {
|
|
|
3199
3199
|
editable: l = K(!0),
|
|
3200
3200
|
services: s = K({}),
|
|
3201
3201
|
features: h = K({})
|
|
3202
|
-
} = e, r = e.getGenerateAudioParams ?? (() => ({})), u = K(Uh.TEXT),
|
|
3203
|
-
const { from: W, to:
|
|
3204
|
-
return
|
|
3205
|
-
},
|
|
3206
|
-
|
|
3207
|
-
},
|
|
3202
|
+
} = e, r = e.getGenerateAudioParams ?? (() => ({})), u = e.getPlaybackSpeed ?? (() => 1), g = K(Uh.TEXT), a = K(""), c = (m, C = "") => {
|
|
3203
|
+
const { from: W, to: j, empty: x } = m.state.selection;
|
|
3204
|
+
return x ? "" : m.state.doc.textBetween(W, j, C);
|
|
3205
|
+
}, p = (m) => {
|
|
3206
|
+
a.value = c(m);
|
|
3207
|
+
}, f = Tl({
|
|
3208
3208
|
content: n,
|
|
3209
3209
|
editable: l.value,
|
|
3210
3210
|
extensions: [
|
|
@@ -3228,65 +3228,65 @@ function rr(e = {}) {
|
|
|
3228
3228
|
attributes: {
|
|
3229
3229
|
class: "tiptap-editor"
|
|
3230
3230
|
},
|
|
3231
|
-
transformPastedText(
|
|
3232
|
-
return _i(
|
|
3231
|
+
transformPastedText(m) {
|
|
3232
|
+
return _i(m);
|
|
3233
3233
|
},
|
|
3234
|
-
transformPastedHTML(
|
|
3235
|
-
return dl(
|
|
3234
|
+
transformPastedHTML(m) {
|
|
3235
|
+
return dl(m);
|
|
3236
3236
|
}
|
|
3237
3237
|
},
|
|
3238
|
-
onCreate({ editor:
|
|
3239
|
-
var
|
|
3240
|
-
|
|
3238
|
+
onCreate({ editor: m }) {
|
|
3239
|
+
var C;
|
|
3240
|
+
p(m), (C = e.onCreate) == null || C.call(e, m);
|
|
3241
3241
|
},
|
|
3242
|
-
onUpdate({ editor:
|
|
3243
|
-
var
|
|
3244
|
-
|
|
3242
|
+
onUpdate({ editor: m }) {
|
|
3243
|
+
var C, W;
|
|
3244
|
+
p(m), (C = e.onChange) == null || C.call(e, m), (W = e.onUpdate) == null || W.call(e, m.getJSON(), m);
|
|
3245
3245
|
},
|
|
3246
|
-
onSelectionUpdate({ editor:
|
|
3247
|
-
|
|
3246
|
+
onSelectionUpdate({ editor: m }) {
|
|
3247
|
+
p(m);
|
|
3248
3248
|
}
|
|
3249
3249
|
});
|
|
3250
|
-
cn(l, (
|
|
3251
|
-
var
|
|
3252
|
-
return (
|
|
3250
|
+
cn(l, (m) => {
|
|
3251
|
+
var C;
|
|
3252
|
+
return (C = f.value) == null ? void 0 : C.setEditable(m);
|
|
3253
3253
|
});
|
|
3254
|
-
const
|
|
3255
|
-
if (!
|
|
3256
|
-
const { empty:
|
|
3257
|
-
return
|
|
3254
|
+
const d = T(() => a.value.length > 0), y = T(() => /^\d+$/.test(a.value)), b = () => f.value ? c(f.value) : "", A = () => {
|
|
3255
|
+
if (!f.value) return null;
|
|
3256
|
+
const { empty: m } = f.value.state.selection;
|
|
3257
|
+
return m ? null : f.value.state.selection.content().toJSON();
|
|
3258
3258
|
};
|
|
3259
|
-
function
|
|
3259
|
+
function I(m) {
|
|
3260
3260
|
var W;
|
|
3261
|
-
if (!
|
|
3262
|
-
const { empty:
|
|
3263
|
-
|
|
3261
|
+
if (!f.value) return;
|
|
3262
|
+
const { empty: C } = f.value.state.selection;
|
|
3263
|
+
C && ((W = f.value) == null || W.chain().focus().insertContent({
|
|
3264
3264
|
type: ce,
|
|
3265
3265
|
attrs: {
|
|
3266
3266
|
id: Zi(16),
|
|
3267
|
-
...
|
|
3267
|
+
...m
|
|
3268
3268
|
}
|
|
3269
3269
|
}).run());
|
|
3270
3270
|
}
|
|
3271
|
-
function
|
|
3272
|
-
if (!
|
|
3273
|
-
const { from:
|
|
3274
|
-
if (
|
|
3275
|
-
const
|
|
3271
|
+
function w(m) {
|
|
3272
|
+
if (!f.value) return;
|
|
3273
|
+
const { from: C, to: W, empty: j } = f.value.state.selection;
|
|
3274
|
+
if (j) return;
|
|
3275
|
+
const x = j ? "" : f.value.state.doc.textBetween(C, W, ""), q = f.value.chain().focus().deleteRange({ from: C, to: W }).insertContent({
|
|
3276
3276
|
type: ce,
|
|
3277
3277
|
attrs: {
|
|
3278
3278
|
id: Zi(16),
|
|
3279
|
-
...
|
|
3279
|
+
...m
|
|
3280
3280
|
},
|
|
3281
|
-
content:
|
|
3281
|
+
content: x ? [{ type: "text", text: x }] : []
|
|
3282
3282
|
});
|
|
3283
|
-
|
|
3283
|
+
j && q.setTextSelection(C + 1), q.run();
|
|
3284
3284
|
}
|
|
3285
|
-
const
|
|
3286
|
-
if (!
|
|
3287
|
-
const { empty:
|
|
3288
|
-
if (
|
|
3289
|
-
const W =
|
|
3285
|
+
const J = () => {
|
|
3286
|
+
if (!f.value) return null;
|
|
3287
|
+
const { empty: m, head: C } = f.value.state.selection;
|
|
3288
|
+
if (m) return null;
|
|
3289
|
+
const W = f.value.view.coordsAtPos(C);
|
|
3290
3290
|
return {
|
|
3291
3291
|
getBoundingClientRect() {
|
|
3292
3292
|
return {
|
|
@@ -3302,58 +3302,59 @@ function rr(e = {}) {
|
|
|
3302
3302
|
}
|
|
3303
3303
|
};
|
|
3304
3304
|
};
|
|
3305
|
-
function
|
|
3306
|
-
var
|
|
3307
|
-
(
|
|
3308
|
-
}
|
|
3309
|
-
const
|
|
3310
|
-
var
|
|
3311
|
-
(
|
|
3312
|
-
},
|
|
3313
|
-
var W,
|
|
3314
|
-
const
|
|
3315
|
-
if (!
|
|
3316
|
-
(W =
|
|
3305
|
+
function k() {
|
|
3306
|
+
var m;
|
|
3307
|
+
(m = f.value) == null || m.commands.setContent(Jn());
|
|
3308
|
+
}
|
|
3309
|
+
const G = (m) => {
|
|
3310
|
+
var C;
|
|
3311
|
+
(C = f.value) == null || C.commands.setContent(m, { emitUpdate: !1 });
|
|
3312
|
+
}, M = (m) => {
|
|
3313
|
+
var W, j;
|
|
3314
|
+
const C = _i(m);
|
|
3315
|
+
if (!C) {
|
|
3316
|
+
(W = f.value) == null || W.commands.setContent(Jn());
|
|
3317
3317
|
return;
|
|
3318
3318
|
}
|
|
3319
|
-
(
|
|
3319
|
+
(j = f.value) == null || j.commands.setContent({
|
|
3320
3320
|
type: "doc",
|
|
3321
|
-
content:
|
|
3322
|
-
`).map((
|
|
3321
|
+
content: C.split(`
|
|
3322
|
+
`).map((x) => ({
|
|
3323
3323
|
type: "paragraph",
|
|
3324
|
-
content:
|
|
3324
|
+
content: x ? [{ type: "text", text: x }] : []
|
|
3325
3325
|
}))
|
|
3326
3326
|
});
|
|
3327
|
-
},
|
|
3328
|
-
var
|
|
3329
|
-
return ((
|
|
3327
|
+
}, V = T(() => {
|
|
3328
|
+
var m;
|
|
3329
|
+
return ((m = f.value) == null ? void 0 : m.storage.characterCount.characters()) || 0;
|
|
3330
3330
|
});
|
|
3331
3331
|
return {
|
|
3332
|
-
editor:
|
|
3333
|
-
driveMode:
|
|
3334
|
-
insertToken:
|
|
3335
|
-
insertWrappedToken:
|
|
3336
|
-
clearContent:
|
|
3337
|
-
setContent:
|
|
3338
|
-
getSelectedText:
|
|
3339
|
-
getSelectedJson:
|
|
3340
|
-
selectedText:
|
|
3341
|
-
hasSelectedText:
|
|
3342
|
-
isSelectedPureNumber:
|
|
3332
|
+
editor: f,
|
|
3333
|
+
driveMode: g,
|
|
3334
|
+
insertToken: I,
|
|
3335
|
+
insertWrappedToken: w,
|
|
3336
|
+
clearContent: k,
|
|
3337
|
+
setContent: G,
|
|
3338
|
+
getSelectedText: b,
|
|
3339
|
+
getSelectedJson: A,
|
|
3340
|
+
selectedText: a,
|
|
3341
|
+
hasSelectedText: d,
|
|
3342
|
+
isSelectedPureNumber: y,
|
|
3343
3343
|
textLimitLength: i,
|
|
3344
3344
|
getGenerateAudioParams: r,
|
|
3345
|
+
getPlaybackSpeed: u,
|
|
3345
3346
|
services: s,
|
|
3346
3347
|
features: h,
|
|
3347
|
-
notify: (
|
|
3348
|
+
notify: (m, C) => {
|
|
3348
3349
|
if (s.value.notify) {
|
|
3349
|
-
s.value.notify(
|
|
3350
|
+
s.value.notify(m, C);
|
|
3350
3351
|
return;
|
|
3351
3352
|
}
|
|
3352
|
-
ji({ type:
|
|
3353
|
+
ji({ type: m, message: C });
|
|
3353
3354
|
},
|
|
3354
|
-
getReferencedVirtualElement:
|
|
3355
|
-
replaceContentWithText:
|
|
3356
|
-
textLength:
|
|
3355
|
+
getReferencedVirtualElement: J,
|
|
3356
|
+
replaceContentWithText: M,
|
|
3357
|
+
textLength: V,
|
|
3357
3358
|
voiceVersion: t
|
|
3358
3359
|
};
|
|
3359
3360
|
}
|
|
@@ -3446,48 +3447,48 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3446
3447
|
const { services: n } = Tn(), i = K(!1), t = K([]), o = K(-1), l = K("idle"), s = K(!1), h = K(!1);
|
|
3447
3448
|
let r = null, u = null;
|
|
3448
3449
|
const g = T(() => {
|
|
3449
|
-
var
|
|
3450
|
-
return o.value < 0 ? "" : ((
|
|
3451
|
-
}), a = xh(e, { src: g }), { playing: c } = a,
|
|
3452
|
-
() => t.value.reduce((
|
|
3453
|
-
), y = T(() => o.value <= 0 ? 0 : t.value.slice(0, o.value).reduce((
|
|
3450
|
+
var j;
|
|
3451
|
+
return o.value < 0 ? "" : ((j = t.value[o.value]) == null ? void 0 : j.src) || "";
|
|
3452
|
+
}), a = xh(e, { src: g }), { playing: c } = a, p = T(() => l.value === "playing"), f = T(() => t.value.length > 0), d = T(
|
|
3453
|
+
() => t.value.reduce((j, x) => j + x.duration, 0)
|
|
3454
|
+
), y = T(() => o.value <= 0 ? 0 : t.value.slice(0, o.value).reduce((j, x) => j + x.duration, 0)), b = T({
|
|
3454
3455
|
get() {
|
|
3455
3456
|
return o.value < 0 || !g.value ? 0 : y.value + a.currentTime.value;
|
|
3456
3457
|
},
|
|
3457
|
-
set(
|
|
3458
|
+
set(j) {
|
|
3458
3459
|
a.currentTime.value = Math.max(
|
|
3459
3460
|
0,
|
|
3460
|
-
|
|
3461
|
+
j - y.value
|
|
3461
3462
|
);
|
|
3462
3463
|
}
|
|
3463
|
-
}),
|
|
3464
|
+
}), A = T({
|
|
3464
3465
|
get: () => c.value,
|
|
3465
|
-
set(
|
|
3466
|
-
l.value =
|
|
3466
|
+
set(j) {
|
|
3467
|
+
l.value = j ? "playing" : "paused", c.value = j;
|
|
3467
3468
|
}
|
|
3468
3469
|
}), I = {
|
|
3469
3470
|
...a,
|
|
3470
|
-
playing:
|
|
3471
|
-
currentTime:
|
|
3472
|
-
duration:
|
|
3471
|
+
playing: A,
|
|
3472
|
+
currentTime: b,
|
|
3473
|
+
duration: d
|
|
3473
3474
|
}, w = async () => {
|
|
3474
3475
|
s.value = !1, await de(), c.value = !0;
|
|
3475
3476
|
}, J = async () => {
|
|
3476
3477
|
t.value.length && (o.value = 0, a.currentTime.value = 0, await w());
|
|
3477
3478
|
}, k = async () => {
|
|
3478
3479
|
if (l.value !== "playing") return;
|
|
3479
|
-
const
|
|
3480
|
-
if (!t.value[
|
|
3480
|
+
const j = o.value + 1;
|
|
3481
|
+
if (!t.value[j]) {
|
|
3481
3482
|
h.value ? l.value = "idle" : s.value = !0;
|
|
3482
3483
|
return;
|
|
3483
3484
|
}
|
|
3484
|
-
o.value =
|
|
3485
|
+
o.value = j, await w();
|
|
3485
3486
|
}, G = async () => {
|
|
3486
3487
|
if (l.value = "playing", o.value < 0 || s.value) {
|
|
3487
3488
|
await k();
|
|
3488
3489
|
return;
|
|
3489
3490
|
}
|
|
3490
|
-
if (
|
|
3491
|
+
if (d.value > 0 && b.value >= d.value) {
|
|
3491
3492
|
await J();
|
|
3492
3493
|
return;
|
|
3493
3494
|
}
|
|
@@ -3496,66 +3497,66 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3496
3497
|
E(e, "ended", () => {
|
|
3497
3498
|
k();
|
|
3498
3499
|
}), E(e, "loadedmetadata", () => {
|
|
3499
|
-
var
|
|
3500
|
-
const
|
|
3501
|
-
|
|
3500
|
+
var q;
|
|
3501
|
+
const j = t.value[o.value], x = (q = e == null ? void 0 : e.value) == null ? void 0 : q.duration;
|
|
3502
|
+
j && !j.duration && Number.isFinite(x) && (j.duration = x || 0);
|
|
3502
3503
|
});
|
|
3503
3504
|
const M = () => {
|
|
3504
3505
|
l.value = "stopped", c.value = !1, s.value = !1, i.value = !1, r == null || r.abort(), r = null;
|
|
3505
3506
|
}, V = () => {
|
|
3506
|
-
t.value.forEach((
|
|
3507
|
-
},
|
|
3507
|
+
t.value.forEach((j) => URL.revokeObjectURL(j.src)), t.value = [], o.value = -1, a.currentTime.value = 0, s.value = !1, h.value = !1;
|
|
3508
|
+
}, S = () => {
|
|
3508
3509
|
h.value = !0, s.value && o.value >= t.value.length - 1 && (s.value = !1, l.value = "idle"), i.value = !1;
|
|
3509
|
-
},
|
|
3510
|
-
if (
|
|
3511
|
-
|
|
3510
|
+
}, m = (j) => {
|
|
3511
|
+
if (j.done) {
|
|
3512
|
+
S(), u = j;
|
|
3512
3513
|
return;
|
|
3513
3514
|
}
|
|
3514
|
-
|
|
3515
|
-
src: pr(
|
|
3516
|
-
duration: mr(
|
|
3515
|
+
j.audio_base64 && (t.value[j.index] = {
|
|
3516
|
+
src: pr(j.audio_base64, j.audio_format),
|
|
3517
|
+
duration: mr(j)
|
|
3517
3518
|
}, l.value === "playing" && (o.value < 0 || s.value) && k());
|
|
3518
|
-
},
|
|
3519
|
-
const
|
|
3520
|
-
t.value[0] = { src:
|
|
3521
|
-
},
|
|
3522
|
-
const
|
|
3523
|
-
if (!
|
|
3519
|
+
}, C = (j) => {
|
|
3520
|
+
const x = j instanceof Blob ? URL.createObjectURL(j) : j;
|
|
3521
|
+
t.value[0] = { src: x, duration: 0 }, h.value = !0, k();
|
|
3522
|
+
}, W = async (j) => {
|
|
3523
|
+
const x = n.value.synthesizePreviewStream, q = n.value.synthesizePreview;
|
|
3524
|
+
if (!x && !q) return null;
|
|
3524
3525
|
M(), V(), i.value = !0, u = null, l.value = "playing";
|
|
3525
|
-
const
|
|
3526
|
-
r =
|
|
3526
|
+
const O = new AbortController();
|
|
3527
|
+
r = O;
|
|
3527
3528
|
try {
|
|
3528
|
-
if (
|
|
3529
|
-
u = await
|
|
3530
|
-
signal:
|
|
3531
|
-
onMessage: (
|
|
3532
|
-
|
|
3529
|
+
if (x)
|
|
3530
|
+
u = await x(j, {
|
|
3531
|
+
signal: O.signal,
|
|
3532
|
+
onMessage: (Z) => {
|
|
3533
|
+
O.signal.aborted || m(Z);
|
|
3533
3534
|
}
|
|
3534
|
-
}), h.value ||
|
|
3535
|
-
else if (
|
|
3536
|
-
const
|
|
3537
|
-
if (
|
|
3538
|
-
|
|
3535
|
+
}), h.value || S();
|
|
3536
|
+
else if (q) {
|
|
3537
|
+
const Z = await q(j, O.signal);
|
|
3538
|
+
if (O.signal.aborted) return null;
|
|
3539
|
+
C(Z);
|
|
3539
3540
|
}
|
|
3540
3541
|
return u;
|
|
3541
|
-
} catch (
|
|
3542
|
-
if (
|
|
3543
|
-
throw
|
|
3542
|
+
} catch (Z) {
|
|
3543
|
+
if (Z instanceof Error && Z.name === "AbortError") return null;
|
|
3544
|
+
throw Z;
|
|
3544
3545
|
} finally {
|
|
3545
|
-
r ===
|
|
3546
|
+
r === O && (i.value = !1, r = null);
|
|
3546
3547
|
}
|
|
3547
3548
|
};
|
|
3548
3549
|
return Se(() => {
|
|
3549
3550
|
M(), V();
|
|
3550
3551
|
}), {
|
|
3551
|
-
execute:
|
|
3552
|
+
execute: W,
|
|
3552
3553
|
loading: i,
|
|
3553
3554
|
abort: M,
|
|
3554
3555
|
resume: G,
|
|
3555
3556
|
stop: M,
|
|
3556
|
-
playing:
|
|
3557
|
+
playing: A,
|
|
3557
3558
|
mediaControls: I,
|
|
3558
|
-
shouldAutoPlay:
|
|
3559
|
+
shouldAutoPlay: p,
|
|
3559
3560
|
hasAudio: f
|
|
3560
3561
|
};
|
|
3561
3562
|
}, yr = /^[\u3400-\u9fff]+$/, qr = ({
|
|
@@ -3571,21 +3572,21 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3571
3572
|
selectedText: h,
|
|
3572
3573
|
hasSelectedText: r,
|
|
3573
3574
|
isSelectedPureNumber: u
|
|
3574
|
-
} = e, { features: g, notify: a, services: c } = e,
|
|
3575
|
+
} = e, { features: g, notify: a, services: c } = e, p = T(
|
|
3575
3576
|
() => ml(i.value, g.value)
|
|
3576
|
-
), f = () => !r.value,
|
|
3577
|
-
var
|
|
3578
|
-
const
|
|
3579
|
-
(
|
|
3580
|
-
var
|
|
3581
|
-
return (
|
|
3577
|
+
), f = () => !r.value, d = () => {
|
|
3578
|
+
var W;
|
|
3579
|
+
const C = (((W = s()) == null ? void 0 : W.content) || []).some(
|
|
3580
|
+
(j) => {
|
|
3581
|
+
var x;
|
|
3582
|
+
return (x = j.content) == null ? void 0 : x.some((q) => q.type !== "text");
|
|
3582
3583
|
}
|
|
3583
3584
|
);
|
|
3584
|
-
return
|
|
3585
|
-
}, y = (
|
|
3585
|
+
return C && a("info", "请选择纯文本"), C;
|
|
3586
|
+
}, y = (m) => yr.test(m) ? Array.from(m).length > p.value.maxPinyinLength ? (a(
|
|
3586
3587
|
"info",
|
|
3587
|
-
`最多选择${
|
|
3588
|
-
), !0) : !1 : (a("info", "请选择中文"), !0),
|
|
3588
|
+
`最多选择${p.value.maxPinyinLength}个中文`
|
|
3589
|
+
), !0) : !1 : (a("info", "请选择中文"), !0), b = [
|
|
3589
3590
|
{
|
|
3590
3591
|
tool: P.customStop
|
|
3591
3592
|
},
|
|
@@ -3597,23 +3598,23 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3597
3598
|
tool: P.continue,
|
|
3598
3599
|
disabled: f,
|
|
3599
3600
|
onClick: () => {
|
|
3600
|
-
|
|
3601
|
+
d() || o({ categ: "continue", payload: {} });
|
|
3601
3602
|
}
|
|
3602
3603
|
},
|
|
3603
3604
|
{
|
|
3604
3605
|
tool: P.pinyin,
|
|
3605
3606
|
disabled: f,
|
|
3606
3607
|
onClick: () => {
|
|
3607
|
-
const
|
|
3608
|
-
!
|
|
3608
|
+
const m = l();
|
|
3609
|
+
!m || d() || y(m) || n.pinyin(m);
|
|
3609
3610
|
}
|
|
3610
3611
|
},
|
|
3611
3612
|
{
|
|
3612
3613
|
tool: P.replace,
|
|
3613
3614
|
disabled: f,
|
|
3614
3615
|
onClick: () => {
|
|
3615
|
-
const
|
|
3616
|
-
!
|
|
3616
|
+
const m = l();
|
|
3617
|
+
!m || d() || n.replace(m);
|
|
3617
3618
|
}
|
|
3618
3619
|
},
|
|
3619
3620
|
{
|
|
@@ -3624,19 +3625,19 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3624
3625
|
tool: P.ignore,
|
|
3625
3626
|
disabled: f,
|
|
3626
3627
|
onClick: () => {
|
|
3627
|
-
|
|
3628
|
+
d() || o({ categ: "ignore", payload: {} });
|
|
3628
3629
|
}
|
|
3629
3630
|
},
|
|
3630
3631
|
{
|
|
3631
3632
|
tool: P.number,
|
|
3632
|
-
disabled: () => !u.value || h.value.length >
|
|
3633
|
+
disabled: () => !u.value || h.value.length > p.value.maxNumberLength
|
|
3633
3634
|
},
|
|
3634
3635
|
{
|
|
3635
3636
|
tool: P.formula,
|
|
3636
3637
|
disabled: f,
|
|
3637
3638
|
onClick: () => {
|
|
3638
|
-
const
|
|
3639
|
-
!
|
|
3639
|
+
const m = l();
|
|
3640
|
+
!m || d() || n.formula(m);
|
|
3640
3641
|
}
|
|
3641
3642
|
},
|
|
3642
3643
|
{
|
|
@@ -3647,30 +3648,30 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3647
3648
|
tool: P.upload,
|
|
3648
3649
|
onClick: n.upload
|
|
3649
3650
|
}
|
|
3650
|
-
],
|
|
3651
|
-
const
|
|
3652
|
-
return
|
|
3653
|
-
}), I = T(() =>
|
|
3654
|
-
label:
|
|
3655
|
-
value:
|
|
3656
|
-
})) : []), J = (
|
|
3651
|
+
], A = T(() => {
|
|
3652
|
+
const m = new Set(p.value.tools);
|
|
3653
|
+
return b.filter((C) => m.has(C.tool.type));
|
|
3654
|
+
}), I = T(() => p.value.languages), w = T(() => u.value ? pl.map((m) => ({
|
|
3655
|
+
label: m.label,
|
|
3656
|
+
value: m.func(h.value)
|
|
3657
|
+
})) : []), J = (m) => m === P.formula.type ? !c.value.readFormula : m === P.aiRewrite.type ? !c.value.generateDraft : m === P.upload.type ? !c.value.parseDocument : !1;
|
|
3657
3658
|
return {
|
|
3658
|
-
toolList:
|
|
3659
|
+
toolList: A,
|
|
3659
3660
|
languageOptions: I,
|
|
3660
3661
|
numberToTextList: w,
|
|
3661
|
-
isToolDisabled: (
|
|
3662
|
-
var
|
|
3663
|
-
return (((
|
|
3662
|
+
isToolDisabled: (m) => {
|
|
3663
|
+
var C;
|
|
3664
|
+
return (((C = m.disabled) == null ? void 0 : C.call(m)) ?? !1) || J(m.tool.type);
|
|
3664
3665
|
},
|
|
3665
|
-
insertCustomStop: (
|
|
3666
|
-
t({ categ: "customStop", payload: { time:
|
|
3666
|
+
insertCustomStop: (m) => {
|
|
3667
|
+
t({ categ: "customStop", payload: { time: m } });
|
|
3667
3668
|
},
|
|
3668
|
-
setLanguage: (
|
|
3669
|
-
replaceText: (
|
|
3670
|
-
o({ categ: "replace", payload: { text:
|
|
3669
|
+
setLanguage: (m) => d() ? !1 : (o({ categ: "language", payload: { code: m } }), !0),
|
|
3670
|
+
replaceText: (m) => {
|
|
3671
|
+
o({ categ: "replace", payload: { text: m } });
|
|
3671
3672
|
},
|
|
3672
|
-
markPinyin: (
|
|
3673
|
-
o({ categ: "pinyin", payload: { text:
|
|
3673
|
+
markPinyin: (m) => {
|
|
3674
|
+
o({ categ: "pinyin", payload: { text: m } });
|
|
3674
3675
|
}
|
|
3675
3676
|
};
|
|
3676
3677
|
}, zr = {
|
|
@@ -3731,10 +3732,10 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3731
3732
|
__name: "index",
|
|
3732
3733
|
setup(e) {
|
|
3733
3734
|
const { editor: n } = Tn();
|
|
3734
|
-
return (i, t) =>
|
|
3735
|
+
return (i, t) => z(n) ? (Y(), _(z(Nl), {
|
|
3735
3736
|
key: 0,
|
|
3736
3737
|
class: "tts-editor-content",
|
|
3737
|
-
editor:
|
|
3738
|
+
editor: z(n)
|
|
3738
3739
|
}, null, 8, ["editor"])) : yn("", !0);
|
|
3739
3740
|
}
|
|
3740
3741
|
}), vr = /* @__PURE__ */ sn(jr, [["__scopeId", "data-v-d764ae22"]]), wo = ["top", "right", "bottom", "left"], mt = ["start", "end"], pt = /* @__PURE__ */ wo.reduce((e, n) => e.concat(n, n + "-" + mt[0], n + "-" + mt[1]), []), Yn = Math.min, Cn = Math.max, Ue = Math.round, Mn = (e) => ({
|
|
@@ -3847,40 +3848,40 @@ function qt(e, n, i) {
|
|
|
3847
3848
|
floating: o
|
|
3848
3849
|
} = e;
|
|
3849
3850
|
const l = Sn(n), s = Ri(n), h = Ni(s), r = Wn(n), u = l === "y", g = t.x + t.width / 2 - o.width / 2, a = t.y + t.height / 2 - o.height / 2, c = t[h] / 2 - o[h] / 2;
|
|
3850
|
-
let
|
|
3851
|
+
let p;
|
|
3851
3852
|
switch (r) {
|
|
3852
3853
|
case "top":
|
|
3853
|
-
|
|
3854
|
+
p = {
|
|
3854
3855
|
x: g,
|
|
3855
3856
|
y: t.y - o.height
|
|
3856
3857
|
};
|
|
3857
3858
|
break;
|
|
3858
3859
|
case "bottom":
|
|
3859
|
-
|
|
3860
|
+
p = {
|
|
3860
3861
|
x: g,
|
|
3861
3862
|
y: t.y + t.height
|
|
3862
3863
|
};
|
|
3863
3864
|
break;
|
|
3864
3865
|
case "right":
|
|
3865
|
-
|
|
3866
|
+
p = {
|
|
3866
3867
|
x: t.x + t.width,
|
|
3867
3868
|
y: a
|
|
3868
3869
|
};
|
|
3869
3870
|
break;
|
|
3870
3871
|
case "left":
|
|
3871
|
-
|
|
3872
|
+
p = {
|
|
3872
3873
|
x: t.x - o.width,
|
|
3873
3874
|
y: a
|
|
3874
3875
|
};
|
|
3875
3876
|
break;
|
|
3876
3877
|
default:
|
|
3877
|
-
|
|
3878
|
+
p = {
|
|
3878
3879
|
x: t.x,
|
|
3879
3880
|
y: t.y
|
|
3880
3881
|
};
|
|
3881
3882
|
}
|
|
3882
3883
|
const f = In(n);
|
|
3883
|
-
return f && (
|
|
3884
|
+
return f && (p[s] += c * (f === "end" ? 1 : -1) * (i && u ? -1 : 1)), p;
|
|
3884
3885
|
}
|
|
3885
3886
|
async function Sr(e, n) {
|
|
3886
3887
|
var i;
|
|
@@ -3897,13 +3898,13 @@ async function Sr(e, n) {
|
|
|
3897
3898
|
rootBoundary: g = "viewport",
|
|
3898
3899
|
elementContext: a = "floating",
|
|
3899
3900
|
altBoundary: c = !1,
|
|
3900
|
-
padding:
|
|
3901
|
-
} = Nn(n, e), f = Fi(
|
|
3901
|
+
padding: p = 0
|
|
3902
|
+
} = Nn(n, e), f = Fi(p), y = h[c ? a === "floating" ? "reference" : "floating" : a], b = Fn(await l.getClippingRect({
|
|
3902
3903
|
element: (i = await (l.isElement == null ? void 0 : l.isElement(y))) == null || i ? y : y.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(h.floating)),
|
|
3903
3904
|
boundary: u,
|
|
3904
3905
|
rootBoundary: g,
|
|
3905
3906
|
strategy: r
|
|
3906
|
-
})),
|
|
3907
|
+
})), A = a === "floating" ? {
|
|
3907
3908
|
x: t,
|
|
3908
3909
|
y: o,
|
|
3909
3910
|
width: s.floating.width,
|
|
@@ -3913,15 +3914,15 @@ async function Sr(e, n) {
|
|
|
3913
3914
|
y: 1
|
|
3914
3915
|
}, J = Fn(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
3915
3916
|
elements: h,
|
|
3916
|
-
rect:
|
|
3917
|
+
rect: A,
|
|
3917
3918
|
offsetParent: I,
|
|
3918
3919
|
strategy: r
|
|
3919
|
-
}) :
|
|
3920
|
+
}) : A);
|
|
3920
3921
|
return {
|
|
3921
|
-
top: (
|
|
3922
|
-
bottom: (J.bottom -
|
|
3923
|
-
left: (
|
|
3924
|
-
right: (J.right -
|
|
3922
|
+
top: (b.top - J.top + f.top) / w.y,
|
|
3923
|
+
bottom: (J.bottom - b.bottom + f.bottom) / w.y,
|
|
3924
|
+
left: (b.left - J.left + f.left) / w.x,
|
|
3925
|
+
right: (J.right - b.right + f.right) / w.x
|
|
3925
3926
|
};
|
|
3926
3927
|
}
|
|
3927
3928
|
const Or = 50, Yr = async (e, n, i) => {
|
|
@@ -3941,21 +3942,21 @@ const Or = 50, Yr = async (e, n, i) => {
|
|
|
3941
3942
|
}), {
|
|
3942
3943
|
x: g,
|
|
3943
3944
|
y: a
|
|
3944
|
-
} = qt(u, t, r), c = t,
|
|
3945
|
+
} = qt(u, t, r), c = t, p = 0;
|
|
3945
3946
|
const f = {};
|
|
3946
|
-
for (let
|
|
3947
|
-
const y = l[
|
|
3947
|
+
for (let d = 0; d < l.length; d++) {
|
|
3948
|
+
const y = l[d];
|
|
3948
3949
|
if (!y)
|
|
3949
3950
|
continue;
|
|
3950
3951
|
const {
|
|
3951
|
-
name:
|
|
3952
|
-
fn:
|
|
3952
|
+
name: b,
|
|
3953
|
+
fn: A
|
|
3953
3954
|
} = y, {
|
|
3954
3955
|
x: I,
|
|
3955
3956
|
y: w,
|
|
3956
3957
|
data: J,
|
|
3957
3958
|
reset: k
|
|
3958
|
-
} = await
|
|
3959
|
+
} = await A({
|
|
3959
3960
|
x: g,
|
|
3960
3961
|
y: a,
|
|
3961
3962
|
initialPlacement: t,
|
|
@@ -3969,17 +3970,17 @@ const Or = 50, Yr = async (e, n, i) => {
|
|
|
3969
3970
|
floating: n
|
|
3970
3971
|
}
|
|
3971
3972
|
});
|
|
3972
|
-
g = I ?? g, a = w ?? a, f[
|
|
3973
|
-
...f[
|
|
3973
|
+
g = I ?? g, a = w ?? a, f[b] = {
|
|
3974
|
+
...f[b],
|
|
3974
3975
|
...J
|
|
3975
|
-
}, k &&
|
|
3976
|
+
}, k && p < Or && (p++, typeof k == "object" && (k.placement && (c = k.placement), k.rects && (u = k.rects === !0 ? await s.getElementRects({
|
|
3976
3977
|
reference: e,
|
|
3977
3978
|
floating: n,
|
|
3978
3979
|
strategy: o
|
|
3979
3980
|
}) : k.rects), {
|
|
3980
3981
|
x: g,
|
|
3981
3982
|
y: a
|
|
3982
|
-
} = qt(u, c, r)),
|
|
3983
|
+
} = qt(u, c, r)), d = -1);
|
|
3983
3984
|
}
|
|
3984
3985
|
return {
|
|
3985
3986
|
x: g,
|
|
@@ -4009,20 +4010,20 @@ const Or = 50, Yr = async (e, n, i) => {
|
|
|
4009
4010
|
const a = Fi(g), c = {
|
|
4010
4011
|
x: i,
|
|
4011
4012
|
y: t
|
|
4012
|
-
},
|
|
4013
|
+
}, p = Ri(o), f = Ni(p), d = await s.getDimensions(u), y = p === "y", b = y ? "top" : "left", A = y ? "bottom" : "right", I = y ? "clientHeight" : "clientWidth", w = l.reference[f] + l.reference[p] - c[p] - l.floating[f], J = c[p] - l.reference[p], k = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
|
|
4013
4014
|
let G = k ? k[I] : 0;
|
|
4014
4015
|
(!G || !await (s.isElement == null ? void 0 : s.isElement(k))) && (G = h.floating[I] || l.floating[f]);
|
|
4015
|
-
const M = w / 2 - J / 2, V = G / 2 -
|
|
4016
|
+
const M = w / 2 - J / 2, V = G / 2 - d[f] / 2 - 1, S = Yn(a[b], V), m = Yn(a[A], V), C = G - d[f] - m, W = G / 2 - d[f] / 2 + M, j = So(S, W, C), x = !r.arrow && In(o) != null && W !== j && l.reference[f] / 2 - (W < S ? S : m) - d[f] / 2 < 0, q = x ? W < S ? W - S : W - C : 0;
|
|
4016
4017
|
return {
|
|
4017
|
-
[
|
|
4018
|
+
[p]: c[p] + q,
|
|
4018
4019
|
data: {
|
|
4019
|
-
[
|
|
4020
|
-
centerOffset:
|
|
4021
|
-
...
|
|
4022
|
-
alignmentOffset:
|
|
4020
|
+
[p]: j,
|
|
4021
|
+
centerOffset: W - j - q,
|
|
4022
|
+
...x && {
|
|
4023
|
+
alignmentOffset: q
|
|
4023
4024
|
}
|
|
4024
4025
|
},
|
|
4025
|
-
reset:
|
|
4026
|
+
reset: x
|
|
4026
4027
|
};
|
|
4027
4028
|
}
|
|
4028
4029
|
});
|
|
@@ -4045,21 +4046,21 @@ const Vr = function(e) {
|
|
|
4045
4046
|
crossAxis: g = !1,
|
|
4046
4047
|
alignment: a,
|
|
4047
4048
|
allowedPlacements: c = pt,
|
|
4048
|
-
autoAlignment:
|
|
4049
|
+
autoAlignment: p = !0,
|
|
4049
4050
|
...f
|
|
4050
|
-
} = Nn(e, n),
|
|
4051
|
-
if (
|
|
4051
|
+
} = Nn(e, n), d = a !== void 0 || c === pt ? Kr(a || null, p, c) : c, y = ((i = s.autoPlacement) == null ? void 0 : i.index) || 0, b = d[y];
|
|
4052
|
+
if (b == null)
|
|
4052
4053
|
return {};
|
|
4053
|
-
if (h !==
|
|
4054
|
+
if (h !== b)
|
|
4054
4055
|
return {
|
|
4055
4056
|
reset: {
|
|
4056
|
-
placement:
|
|
4057
|
+
placement: d[0]
|
|
4057
4058
|
}
|
|
4058
4059
|
};
|
|
4059
|
-
const
|
|
4060
|
-
placement:
|
|
4060
|
+
const A = await r.detectOverflow(n, f), I = Yo(b, l, await (r.isRTL == null ? void 0 : r.isRTL(u.floating))), w = [A[Wn(b)], A[I[0]], A[I[1]]], J = [...((t = s.autoPlacement) == null ? void 0 : t.overflows) || [], {
|
|
4061
|
+
placement: b,
|
|
4061
4062
|
overflows: w
|
|
4062
|
-
}], k =
|
|
4063
|
+
}], k = d[y + 1];
|
|
4063
4064
|
if (k)
|
|
4064
4065
|
return {
|
|
4065
4066
|
data: {
|
|
@@ -4070,21 +4071,21 @@ const Vr = function(e) {
|
|
|
4070
4071
|
placement: k
|
|
4071
4072
|
}
|
|
4072
4073
|
};
|
|
4073
|
-
const G = J.map((
|
|
4074
|
-
const
|
|
4075
|
-
return [
|
|
4074
|
+
const G = J.map((S) => {
|
|
4075
|
+
const m = In(S.placement);
|
|
4076
|
+
return [S.placement, m && g ? (
|
|
4076
4077
|
// Check along the mainAxis and main crossAxis side.
|
|
4077
|
-
|
|
4078
|
+
S.overflows.slice(0, 2).reduce((C, W) => C + W, 0)
|
|
4078
4079
|
) : (
|
|
4079
4080
|
// Check only the mainAxis.
|
|
4080
|
-
|
|
4081
|
-
),
|
|
4082
|
-
}).sort((
|
|
4081
|
+
S.overflows[0]
|
|
4082
|
+
), S.overflows];
|
|
4083
|
+
}).sort((S, m) => S[1] - m[1]), V = ((o = G.filter((S) => S[2].slice(
|
|
4083
4084
|
0,
|
|
4084
4085
|
// Aligned placements should not check their opposite crossAxis
|
|
4085
4086
|
// side.
|
|
4086
|
-
In(
|
|
4087
|
-
).every((
|
|
4087
|
+
In(S[0]) ? 2 : 3
|
|
4088
|
+
).every((m) => m <= 0))[0]) == null ? void 0 : o[0]) || G[0][0];
|
|
4088
4089
|
return V !== h ? {
|
|
4089
4090
|
data: {
|
|
4090
4091
|
index: y + 1,
|
|
@@ -4113,64 +4114,64 @@ const Vr = function(e) {
|
|
|
4113
4114
|
mainAxis: g = !0,
|
|
4114
4115
|
crossAxis: a = !0,
|
|
4115
4116
|
fallbackPlacements: c,
|
|
4116
|
-
fallbackStrategy:
|
|
4117
|
+
fallbackStrategy: p = "bestFit",
|
|
4117
4118
|
fallbackAxisSideDirection: f = "none",
|
|
4118
|
-
flipAlignment:
|
|
4119
|
+
flipAlignment: d = !0,
|
|
4119
4120
|
...y
|
|
4120
4121
|
} = Nn(e, n);
|
|
4121
4122
|
if ((i = l.arrow) != null && i.alignmentOffset)
|
|
4122
4123
|
return {};
|
|
4123
|
-
const
|
|
4124
|
-
!c && k && J.push(...Wr(h,
|
|
4124
|
+
const b = Wn(o), A = Sn(h), I = Wn(h) === h, w = await (r.isRTL == null ? void 0 : r.isRTL(u.floating)), J = c || (I || !d ? [De(h)] : Zr(h)), k = f !== "none";
|
|
4125
|
+
!c && k && J.push(...Wr(h, d, f, w));
|
|
4125
4126
|
const G = [h, ...J], M = await r.detectOverflow(n, y), V = [];
|
|
4126
|
-
let
|
|
4127
|
-
if (g && V.push(M[
|
|
4128
|
-
const
|
|
4129
|
-
V.push(M[
|
|
4127
|
+
let S = ((t = l.flip) == null ? void 0 : t.overflows) || [];
|
|
4128
|
+
if (g && V.push(M[b]), a) {
|
|
4129
|
+
const j = Yo(o, s, w);
|
|
4130
|
+
V.push(M[j[0]], M[j[1]]);
|
|
4130
4131
|
}
|
|
4131
|
-
if (
|
|
4132
|
+
if (S = [...S, {
|
|
4132
4133
|
placement: o,
|
|
4133
4134
|
overflows: V
|
|
4134
|
-
}], !V.every((
|
|
4135
|
-
var
|
|
4136
|
-
const
|
|
4137
|
-
if (
|
|
4135
|
+
}], !V.every((j) => j <= 0)) {
|
|
4136
|
+
var m, C;
|
|
4137
|
+
const j = (((m = l.flip) == null ? void 0 : m.index) || 0) + 1, x = G[j];
|
|
4138
|
+
if (x && (!(a === "alignment" ? A !== Sn(x) : !1) || // We leave the current main axis only if every placement on that axis
|
|
4138
4139
|
// overflows the main axis.
|
|
4139
|
-
|
|
4140
|
+
S.every((Z) => Sn(Z.placement) === A ? Z.overflows[0] > 0 : !0)))
|
|
4140
4141
|
return {
|
|
4141
4142
|
data: {
|
|
4142
|
-
index:
|
|
4143
|
-
overflows:
|
|
4143
|
+
index: j,
|
|
4144
|
+
overflows: S
|
|
4144
4145
|
},
|
|
4145
4146
|
reset: {
|
|
4146
|
-
placement:
|
|
4147
|
+
placement: x
|
|
4147
4148
|
}
|
|
4148
4149
|
};
|
|
4149
|
-
let
|
|
4150
|
-
if (!
|
|
4151
|
-
switch (
|
|
4150
|
+
let q = (C = S.filter((O) => O.overflows[0] <= 0).sort((O, Z) => O.overflows[1] - Z.overflows[1])[0]) == null ? void 0 : C.placement;
|
|
4151
|
+
if (!q)
|
|
4152
|
+
switch (p) {
|
|
4152
4153
|
case "bestFit": {
|
|
4153
|
-
var
|
|
4154
|
-
const
|
|
4154
|
+
var W;
|
|
4155
|
+
const O = (W = S.filter((Z) => {
|
|
4155
4156
|
if (k) {
|
|
4156
|
-
const X = Sn(
|
|
4157
|
-
return X ===
|
|
4157
|
+
const X = Sn(Z.placement);
|
|
4158
|
+
return X === A || // Create a bias to the `y` side axis due to horizontal
|
|
4158
4159
|
// reading directions favoring greater width.
|
|
4159
4160
|
X === "y";
|
|
4160
4161
|
}
|
|
4161
4162
|
return !0;
|
|
4162
|
-
}).map((
|
|
4163
|
-
|
|
4163
|
+
}).map((Z) => [Z.placement, Z.overflows.filter((X) => X > 0).reduce((X, R) => X + R, 0)]).sort((Z, X) => Z[1] - X[1])[0]) == null ? void 0 : W[0];
|
|
4164
|
+
O && (q = O);
|
|
4164
4165
|
break;
|
|
4165
4166
|
}
|
|
4166
4167
|
case "initialPlacement":
|
|
4167
|
-
|
|
4168
|
+
q = h;
|
|
4168
4169
|
break;
|
|
4169
4170
|
}
|
|
4170
|
-
if (o !==
|
|
4171
|
+
if (o !== q)
|
|
4171
4172
|
return {
|
|
4172
4173
|
reset: {
|
|
4173
|
-
placement:
|
|
4174
|
+
placement: q
|
|
4174
4175
|
}
|
|
4175
4176
|
};
|
|
4176
4177
|
}
|
|
@@ -4268,40 +4269,40 @@ const Hr = function(e) {
|
|
|
4268
4269
|
} = Nn(e, n), g = Array.from(await (l.getClientRects == null ? void 0 : l.getClientRects(t.reference)) || []);
|
|
4269
4270
|
if (!g.length)
|
|
4270
4271
|
return {};
|
|
4271
|
-
const a = Jr(g), c = Fn(ko(g)),
|
|
4272
|
+
const a = Jr(g), c = Fn(ko(g)), p = Fi(h);
|
|
4272
4273
|
function f() {
|
|
4273
4274
|
if (a.length === 2 && (a[0].left > a[1].right || a[1].left > a[0].right) && r != null && u != null)
|
|
4274
|
-
return a.find((y) => r > y.left -
|
|
4275
|
+
return a.find((y) => r > y.left - p.left && r < y.right + p.right && u > y.top - p.top && u < y.bottom + p.bottom) || c;
|
|
4275
4276
|
if (a.length >= 2) {
|
|
4276
4277
|
if (Sn(i) === "y") {
|
|
4277
|
-
const k = a[0], G = a[a.length - 1], M = Wn(i) === "top", V = k.top,
|
|
4278
|
+
const k = a[0], G = a[a.length - 1], M = Wn(i) === "top", V = k.top, S = G.bottom, m = M ? k.left : G.left, C = M ? k.right : G.right;
|
|
4278
4279
|
return Fn({
|
|
4279
|
-
x:
|
|
4280
|
+
x: m,
|
|
4280
4281
|
y: V,
|
|
4281
|
-
width:
|
|
4282
|
-
height:
|
|
4282
|
+
width: C - m,
|
|
4283
|
+
height: S - V
|
|
4283
4284
|
});
|
|
4284
4285
|
}
|
|
4285
|
-
const y = Wn(i) === "left",
|
|
4286
|
+
const y = Wn(i) === "left", b = Cn(...a.map((k) => k.right)), A = Yn(...a.map((k) => k.left)), I = a.filter((k) => y ? k.left === A : k.right === b), w = I[0].top, J = I[I.length - 1].bottom;
|
|
4286
4287
|
return Fn({
|
|
4287
|
-
x:
|
|
4288
|
+
x: A,
|
|
4288
4289
|
y: w,
|
|
4289
|
-
width:
|
|
4290
|
+
width: b - A,
|
|
4290
4291
|
height: J - w
|
|
4291
4292
|
});
|
|
4292
4293
|
}
|
|
4293
4294
|
return c;
|
|
4294
4295
|
}
|
|
4295
|
-
const
|
|
4296
|
+
const d = await l.getElementRects({
|
|
4296
4297
|
reference: {
|
|
4297
4298
|
getBoundingClientRect: f
|
|
4298
4299
|
},
|
|
4299
4300
|
floating: t.floating,
|
|
4300
4301
|
strategy: s
|
|
4301
4302
|
});
|
|
4302
|
-
return o.reference.x !==
|
|
4303
|
+
return o.reference.x !== d.reference.x || o.reference.y !== d.reference.y || o.reference.width !== d.reference.width || o.reference.height !== d.reference.height ? {
|
|
4303
4304
|
reset: {
|
|
4304
|
-
rects:
|
|
4305
|
+
rects: d
|
|
4305
4306
|
}
|
|
4306
4307
|
} : {};
|
|
4307
4308
|
}
|
|
@@ -4315,7 +4316,7 @@ async function Mr(e, n) {
|
|
|
4315
4316
|
} = e, l = await (t.isRTL == null ? void 0 : t.isRTL(o.floating)), s = Wn(i), h = In(i), r = Sn(i) === "y", u = Lr.has(s) ? -1 : 1, g = l && r ? -1 : 1, a = Nn(n, e);
|
|
4316
4317
|
let {
|
|
4317
4318
|
mainAxis: c,
|
|
4318
|
-
crossAxis:
|
|
4319
|
+
crossAxis: p,
|
|
4319
4320
|
alignmentAxis: f
|
|
4320
4321
|
} = typeof a == "number" ? {
|
|
4321
4322
|
mainAxis: a,
|
|
@@ -4326,12 +4327,12 @@ async function Mr(e, n) {
|
|
|
4326
4327
|
crossAxis: a.crossAxis || 0,
|
|
4327
4328
|
alignmentAxis: a.alignmentAxis
|
|
4328
4329
|
};
|
|
4329
|
-
return h && typeof f == "number" && (
|
|
4330
|
-
x:
|
|
4330
|
+
return h && typeof f == "number" && (p = h === "end" ? f * -1 : f), r ? {
|
|
4331
|
+
x: p * g,
|
|
4331
4332
|
y: c * u
|
|
4332
4333
|
} : {
|
|
4333
4334
|
x: c * u,
|
|
4334
|
-
y:
|
|
4335
|
+
y: p * g
|
|
4335
4336
|
};
|
|
4336
4337
|
}
|
|
4337
4338
|
const Tr = function(e) {
|
|
@@ -4370,11 +4371,11 @@ const Tr = function(e) {
|
|
|
4370
4371
|
mainAxis: s = !0,
|
|
4371
4372
|
crossAxis: h = !1,
|
|
4372
4373
|
limiter: r = {
|
|
4373
|
-
fn: (
|
|
4374
|
+
fn: (A) => {
|
|
4374
4375
|
let {
|
|
4375
4376
|
x: I,
|
|
4376
4377
|
y: w
|
|
4377
|
-
} =
|
|
4378
|
+
} = A;
|
|
4378
4379
|
return {
|
|
4379
4380
|
x: I,
|
|
4380
4381
|
y: w
|
|
@@ -4385,22 +4386,22 @@ const Tr = function(e) {
|
|
|
4385
4386
|
} = Nn(e, n), g = {
|
|
4386
4387
|
x: i,
|
|
4387
4388
|
y: t
|
|
4388
|
-
}, a = await l.detectOverflow(n, u), c = Sn(o),
|
|
4389
|
-
let f = g[
|
|
4390
|
-
const y = (
|
|
4391
|
-
s && (f = y(
|
|
4392
|
-
const
|
|
4389
|
+
}, a = await l.detectOverflow(n, u), c = Sn(o), p = Oo(c);
|
|
4390
|
+
let f = g[p], d = g[c];
|
|
4391
|
+
const y = (A, I) => So(I + a[A === "y" ? "top" : "left"], I, I - a[A === "y" ? "bottom" : "right"]);
|
|
4392
|
+
s && (f = y(p, f)), h && (d = y(c, d));
|
|
4393
|
+
const b = r.fn({
|
|
4393
4394
|
...n,
|
|
4394
|
-
[
|
|
4395
|
-
[c]:
|
|
4395
|
+
[p]: f,
|
|
4396
|
+
[c]: d
|
|
4396
4397
|
});
|
|
4397
4398
|
return {
|
|
4398
|
-
...
|
|
4399
|
+
...b,
|
|
4399
4400
|
data: {
|
|
4400
|
-
x:
|
|
4401
|
-
y:
|
|
4401
|
+
x: b.x - i,
|
|
4402
|
+
y: b.y - t,
|
|
4402
4403
|
enabled: {
|
|
4403
|
-
[
|
|
4404
|
+
[p]: s,
|
|
4404
4405
|
[c]: h
|
|
4405
4406
|
}
|
|
4406
4407
|
}
|
|
@@ -4423,19 +4424,19 @@ const Tr = function(e) {
|
|
|
4423
4424
|
...h
|
|
4424
4425
|
} = Nn(e, n), r = await o.detectOverflow(n, h), u = Wn(i), g = In(i), a = Sn(i) === "y", {
|
|
4425
4426
|
width: c,
|
|
4426
|
-
height:
|
|
4427
|
+
height: p
|
|
4427
4428
|
} = t.floating;
|
|
4428
|
-
let f,
|
|
4429
|
-
u === "top" || u === "bottom" ? (f = u,
|
|
4430
|
-
const y =
|
|
4431
|
-
let k =
|
|
4432
|
-
w != null && w.enabled.x && (G =
|
|
4429
|
+
let f, d;
|
|
4430
|
+
u === "top" || u === "bottom" ? (f = u, d = g === (await (o.isRTL == null ? void 0 : o.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (d = u, f = g === "end" ? "top" : "bottom");
|
|
4431
|
+
const y = p - r.top - r.bottom, b = c - r.left - r.right, A = Yn(p - r[f], y), I = Yn(c - r[d], b), w = n.middlewareData.shift, J = !w;
|
|
4432
|
+
let k = A, G = I;
|
|
4433
|
+
w != null && w.enabled.x && (G = b), w != null && w.enabled.y && (k = y), J && !g && (a ? G = c - 2 * Cn(r.left, r.right) : k = p - 2 * Cn(r.top, r.bottom)), await s({
|
|
4433
4434
|
...n,
|
|
4434
4435
|
availableWidth: G,
|
|
4435
4436
|
availableHeight: k
|
|
4436
4437
|
});
|
|
4437
4438
|
const M = await o.getDimensions(l.floating);
|
|
4438
|
-
return c !== M.width ||
|
|
4439
|
+
return c !== M.width || p !== M.height ? {
|
|
4439
4440
|
reset: {
|
|
4440
4441
|
rects: !0
|
|
4441
4442
|
}
|
|
@@ -4600,11 +4601,11 @@ function Ie(e, n, i, t) {
|
|
|
4600
4601
|
const h = Br(l, i, t) ? Ho(l) : Mn(0);
|
|
4601
4602
|
let r = (o.left + h.x) / s.x, u = (o.top + h.y) / s.y, g = o.width / s.x, a = o.height / s.y;
|
|
4602
4603
|
if (l && t) {
|
|
4603
|
-
const c = fn(l),
|
|
4604
|
-
let f = c,
|
|
4605
|
-
for (;
|
|
4606
|
-
const y = ue(
|
|
4607
|
-
r *= y.x, u *= y.y, g *= y.x, a *= y.y, r += I, u += w, f = fn(
|
|
4604
|
+
const c = fn(l), p = kn(t) ? fn(t) : t;
|
|
4605
|
+
let f = c, d = Ii(f);
|
|
4606
|
+
for (; d && p !== f; ) {
|
|
4607
|
+
const y = ue(d), b = d.getBoundingClientRect(), A = Kn(d), I = b.left + (d.clientLeft + parseFloat(A.paddingLeft)) * y.x, w = b.top + (d.clientTop + parseFloat(A.paddingTop)) * y.y;
|
|
4608
|
+
r *= y.x, u *= y.y, g *= y.x, a *= y.y, r += I, u += w, f = fn(d), d = Ii(f);
|
|
4608
4609
|
}
|
|
4609
4610
|
}
|
|
4610
4611
|
return Fn({
|
|
@@ -4641,8 +4642,8 @@ function Qr(e) {
|
|
|
4641
4642
|
}, u = Mn(1);
|
|
4642
4643
|
const g = Mn(0), a = Dn(t);
|
|
4643
4644
|
if ((a || !l) && ((me(t) !== "body" || ei(s)) && (r = ti(t)), a)) {
|
|
4644
|
-
const
|
|
4645
|
-
u = ue(t), g.x =
|
|
4645
|
+
const p = Ie(t);
|
|
4646
|
+
u = ue(t), g.x = p.x + t.clientLeft, g.y = p.y + t.clientTop;
|
|
4646
4647
|
}
|
|
4647
4648
|
const c = s && !a && !l ? Lo(s, r) : Mn(0);
|
|
4648
4649
|
return {
|
|
@@ -4676,8 +4677,8 @@ function eu(e, n, i) {
|
|
|
4676
4677
|
t ? c || (u = -s.offsetLeft, g = -s.offsetTop) : (h = s.width, r = s.height, c && (u = s.offsetLeft, g = s.offsetTop));
|
|
4677
4678
|
}
|
|
4678
4679
|
if (oi(l) <= 0) {
|
|
4679
|
-
const c = l.ownerDocument,
|
|
4680
|
-
|
|
4680
|
+
const c = l.ownerDocument, p = c.body, f = getComputedStyle(p), d = c.compatMode === "CSS1Compat" && parseFloat(f.marginLeft) + parseFloat(f.marginRight) || 0, y = Math.abs(l.clientWidth - p.clientWidth - d), b = getComputedStyle(l).scrollbarGutter === "stable both-edges" ? y / 2 : y;
|
|
4681
|
+
b <= nu && (h -= b);
|
|
4681
4682
|
}
|
|
4682
4683
|
return {
|
|
4683
4684
|
width: h,
|
|
@@ -4737,8 +4738,8 @@ function ou(e) {
|
|
|
4737
4738
|
const s = [...i === "clippingAncestors" ? ii(n) ? [] : tu(n, this._c) : [].concat(i), t], h = vt(n, s[0], o);
|
|
4738
4739
|
let r = h.top, u = h.right, g = h.bottom, a = h.left;
|
|
4739
4740
|
for (let c = 1; c < s.length; c++) {
|
|
4740
|
-
const
|
|
4741
|
-
r = Cn(
|
|
4741
|
+
const p = vt(n, s[c], o);
|
|
4742
|
+
r = Cn(p.top, r), u = Yn(p.right, u), g = Yn(p.bottom, g), a = Cn(p.left, a);
|
|
4742
4743
|
}
|
|
4743
4744
|
return {
|
|
4744
4745
|
width: u - a,
|
|
@@ -5069,13 +5070,13 @@ function qu(e) {
|
|
|
5069
5070
|
for (let f = 0; ; f++) {
|
|
5070
5071
|
for (; o < t.length && t[o] != 0; ) o++;
|
|
5071
5072
|
if (f == a.childCount) break;
|
|
5072
|
-
const
|
|
5073
|
-
for (let I = 0; I <
|
|
5073
|
+
const d = a.child(f), { colspan: y, rowspan: b, colwidth: A } = d.attrs;
|
|
5074
|
+
for (let I = 0; I < b; I++) {
|
|
5074
5075
|
if (I + u >= i) {
|
|
5075
5076
|
(l || (l = [])).push({
|
|
5076
5077
|
type: "overlong_rowspan",
|
|
5077
5078
|
pos: g,
|
|
5078
|
-
n:
|
|
5079
|
+
n: b - I
|
|
5079
5080
|
});
|
|
5080
5081
|
break;
|
|
5081
5082
|
}
|
|
@@ -5087,22 +5088,22 @@ function qu(e) {
|
|
|
5087
5088
|
pos: g,
|
|
5088
5089
|
n: y - J
|
|
5089
5090
|
});
|
|
5090
|
-
const k =
|
|
5091
|
+
const k = A && A[J];
|
|
5091
5092
|
if (k) {
|
|
5092
5093
|
const G = (w + J) % n * 2, M = s[G];
|
|
5093
5094
|
M == null || M != k && s[G + 1] == 1 ? (s[G] = k, s[G + 1] = 1) : M == k && s[G + 1]++;
|
|
5094
5095
|
}
|
|
5095
5096
|
}
|
|
5096
5097
|
}
|
|
5097
|
-
o += y, g +=
|
|
5098
|
+
o += y, g += d.nodeSize;
|
|
5098
5099
|
}
|
|
5099
5100
|
const c = (u + 1) * n;
|
|
5100
|
-
let
|
|
5101
|
-
for (; o < c; ) t[o++] == 0 &&
|
|
5102
|
-
|
|
5101
|
+
let p = 0;
|
|
5102
|
+
for (; o < c; ) t[o++] == 0 && p++;
|
|
5103
|
+
p && (l || (l = [])).push({
|
|
5103
5104
|
type: "missing",
|
|
5104
5105
|
row: u,
|
|
5105
|
-
n:
|
|
5106
|
+
n: p
|
|
5106
5107
|
}), g++;
|
|
5107
5108
|
}
|
|
5108
5109
|
(n === 0 || i === 0) && (l || (l = [])).push({ type: "zero_sized" });
|
|
@@ -5243,22 +5244,22 @@ var On = class Gn extends B {
|
|
|
5243
5244
|
const c = i.map[g];
|
|
5244
5245
|
if (l[c]) continue;
|
|
5245
5246
|
l[c] = !0;
|
|
5246
|
-
const
|
|
5247
|
+
const p = i.findCell(c);
|
|
5247
5248
|
let f = n.nodeAt(c);
|
|
5248
5249
|
if (!f) throw new RangeError(`No cell with offset ${c} found`);
|
|
5249
|
-
const
|
|
5250
|
-
if (
|
|
5251
|
-
let
|
|
5252
|
-
if (
|
|
5253
|
-
if (f = f.type.createAndFill(
|
|
5254
|
-
} else f = f.type.create(
|
|
5250
|
+
const d = o.left - p.left, y = p.right - o.right;
|
|
5251
|
+
if (d > 0 || y > 0) {
|
|
5252
|
+
let b = f.attrs;
|
|
5253
|
+
if (d > 0 && (b = xt(b, 0, d)), y > 0 && (b = xt(b, b.colspan - y, y)), p.left < o.left) {
|
|
5254
|
+
if (f = f.type.createAndFill(b), !f) throw new RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`);
|
|
5255
|
+
} else f = f.type.create(b, f.content);
|
|
5255
5256
|
}
|
|
5256
|
-
if (
|
|
5257
|
-
const
|
|
5257
|
+
if (p.top < o.top || p.bottom > o.bottom) {
|
|
5258
|
+
const b = {
|
|
5258
5259
|
...f.attrs,
|
|
5259
|
-
rowspan: Math.min(
|
|
5260
|
+
rowspan: Math.min(p.bottom, o.bottom) - Math.max(p.top, o.top)
|
|
5260
5261
|
};
|
|
5261
|
-
|
|
5262
|
+
p.top < o.top ? f = f.type.createAndFill(b) : f = f.type.create(b, f.content);
|
|
5262
5263
|
}
|
|
5263
5264
|
u.push(f);
|
|
5264
5265
|
}
|
|
@@ -5398,8 +5399,8 @@ function Di(e, n) {
|
|
|
5398
5399
|
bottom: 1
|
|
5399
5400
|
} : l, a = e == "column" ? r ? o.cell : o.header_cell : e == "row" ? h ? o.cell : o.header_cell : o.cell;
|
|
5400
5401
|
l.map.cellsInRect(g).forEach((c) => {
|
|
5401
|
-
const
|
|
5402
|
-
f && s.setNodeMarkup(
|
|
5402
|
+
const p = c + l.tableStart, f = s.doc.nodeAt(p);
|
|
5403
|
+
f && s.setNodeMarkup(p, a, f.attrs);
|
|
5403
5404
|
}), t(s);
|
|
5404
5405
|
}
|
|
5405
5406
|
return !0;
|
|
@@ -5516,11 +5517,11 @@ var Wu = class {
|
|
|
5516
5517
|
}, this.shouldShow = ({
|
|
5517
5518
|
view: a,
|
|
5518
5519
|
state: c,
|
|
5519
|
-
from:
|
|
5520
|
+
from: p,
|
|
5520
5521
|
to: f
|
|
5521
5522
|
}) => {
|
|
5522
|
-
const { doc:
|
|
5523
|
-
return !(!(a.hasFocus() || I) ||
|
|
5523
|
+
const { doc: d, selection: y } = c, { empty: b } = y, A = !d.textBetween(p, f).length && Gl(c.selection), I = this.element.contains(document.activeElement);
|
|
5524
|
+
return !(!(a.hasFocus() || I) || b || A || !this.editor.isEditable);
|
|
5524
5525
|
}, this.mousedownHandler = () => {
|
|
5525
5526
|
this.preventHide = !0;
|
|
5526
5527
|
}, this.dragstartHandler = () => {
|
|
@@ -5543,13 +5544,13 @@ var Wu = class {
|
|
|
5543
5544
|
}
|
|
5544
5545
|
a != null && a.relatedTarget && ((c = this.element.parentNode) != null && c.contains(a.relatedTarget)) || (a == null ? void 0 : a.relatedTarget) !== this.editor.view.dom && this.hide();
|
|
5545
5546
|
}, this.handleDebouncedUpdate = (a, c) => {
|
|
5546
|
-
const
|
|
5547
|
-
!
|
|
5548
|
-
this.updateHandler(a,
|
|
5547
|
+
const p = !(c != null && c.selection.eq(a.state.selection)), f = !(c != null && c.doc.eq(a.state.doc));
|
|
5548
|
+
!p && !f || (this.updateDebounceTimer && clearTimeout(this.updateDebounceTimer), this.updateDebounceTimer = window.setTimeout(() => {
|
|
5549
|
+
this.updateHandler(a, p, f, c);
|
|
5549
5550
|
}, this.updateDelay));
|
|
5550
|
-
}, this.updateHandler = (a, c,
|
|
5551
|
-
const { composing:
|
|
5552
|
-
if (
|
|
5551
|
+
}, this.updateHandler = (a, c, p, f) => {
|
|
5552
|
+
const { composing: d } = a;
|
|
5553
|
+
if (d || !c && !p)
|
|
5553
5554
|
return;
|
|
5554
5555
|
if (!this.getShouldShow(f)) {
|
|
5555
5556
|
this.hide();
|
|
@@ -5622,13 +5623,13 @@ var Wu = class {
|
|
|
5622
5623
|
const { $anchorCell: h, $headCell: r } = t, u = h ? h.pos : r.pos, g = r ? r.pos : h.pos, a = this.view.nodeDOM(u), c = this.view.nodeDOM(g);
|
|
5623
5624
|
if (!a || !c)
|
|
5624
5625
|
return;
|
|
5625
|
-
const
|
|
5626
|
+
const p = a === c ? a.getBoundingClientRect() : Iu(
|
|
5626
5627
|
a.getBoundingClientRect(),
|
|
5627
5628
|
c.getBoundingClientRect()
|
|
5628
5629
|
);
|
|
5629
5630
|
s = {
|
|
5630
|
-
getBoundingClientRect: () =>
|
|
5631
|
-
getClientRects: () => [
|
|
5631
|
+
getBoundingClientRect: () => p,
|
|
5632
|
+
getClientRects: () => [p]
|
|
5632
5633
|
};
|
|
5633
5634
|
}
|
|
5634
5635
|
return s;
|
|
@@ -5750,12 +5751,12 @@ var Wu = class {
|
|
|
5750
5751
|
shouldShow: g,
|
|
5751
5752
|
getReferencedVirtualElement: a,
|
|
5752
5753
|
updateDelay: c
|
|
5753
|
-
} = e,
|
|
5754
|
-
|
|
5754
|
+
} = e, p = o.value;
|
|
5755
|
+
p && (p.style.visibility = "hidden", p.style.position = "absolute", p.remove(), de(() => {
|
|
5755
5756
|
s.registerPlugin(
|
|
5756
5757
|
wu({
|
|
5757
5758
|
editor: s,
|
|
5758
|
-
element:
|
|
5759
|
+
element: p,
|
|
5759
5760
|
options: h,
|
|
5760
5761
|
pluginKey: l,
|
|
5761
5762
|
resizeDelay: r,
|
|
@@ -5787,8 +5788,8 @@ var Wu = class {
|
|
|
5787
5788
|
shouldShow: r
|
|
5788
5789
|
}) {
|
|
5789
5790
|
this.preventHide = !1, this.isVisible = !1, this.scrollTarget = window, this.shouldShow = ({ view: g, state: a }) => {
|
|
5790
|
-
const { selection: c } = a, { $anchor:
|
|
5791
|
-
return !(!g.hasFocus() || !f || !
|
|
5791
|
+
const { selection: c } = a, { $anchor: p, empty: f } = c, d = p.depth === 1, y = p.parent.isTextblock && !p.parent.type.spec.code && !p.parent.textContent && p.parent.childCount === 0 && !this.getTextContent(p.parent);
|
|
5792
|
+
return !(!g.hasFocus() || !f || !d || !y || !this.editor.isEditable);
|
|
5792
5793
|
}, this.floatingUIOptions = {
|
|
5793
5794
|
strategy: "absolute",
|
|
5794
5795
|
placement: "right",
|
|
@@ -5800,11 +5801,11 @@ var Wu = class {
|
|
|
5800
5801
|
autoPlacement: !1,
|
|
5801
5802
|
hide: !1,
|
|
5802
5803
|
inline: !1
|
|
5803
|
-
}, this.updateHandler = (g, a, c,
|
|
5804
|
+
}, this.updateHandler = (g, a, c, p) => {
|
|
5804
5805
|
const { composing: f } = g;
|
|
5805
5806
|
if (f || !a && !c)
|
|
5806
5807
|
return;
|
|
5807
|
-
if (!this.getShouldShow(
|
|
5808
|
+
if (!this.getShouldShow(p)) {
|
|
5808
5809
|
this.hide();
|
|
5809
5810
|
return;
|
|
5810
5811
|
}
|
|
@@ -6011,12 +6012,12 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6011
6012
|
on: () => {
|
|
6012
6013
|
a.abort();
|
|
6013
6014
|
}
|
|
6014
|
-
}),
|
|
6015
|
+
}), p = () => {
|
|
6015
6016
|
var y;
|
|
6016
6017
|
(y = i.value) == null || y.view.dispatch(
|
|
6017
6018
|
i.value.state.tr.setMeta(u, "hide")
|
|
6018
6019
|
);
|
|
6019
|
-
},
|
|
6020
|
+
}, d = [
|
|
6020
6021
|
{
|
|
6021
6022
|
label: "试听",
|
|
6022
6023
|
value: "test",
|
|
@@ -6025,10 +6026,10 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6025
6026
|
c.emit();
|
|
6026
6027
|
const y = l();
|
|
6027
6028
|
if (!y.timberId) return;
|
|
6028
|
-
const
|
|
6029
|
-
if (!
|
|
6030
|
-
const I = Yi(
|
|
6031
|
-
|
|
6029
|
+
const A = t();
|
|
6030
|
+
if (!A) return;
|
|
6031
|
+
const I = Yi(A);
|
|
6032
|
+
p(), await a.execute({
|
|
6032
6033
|
...y,
|
|
6033
6034
|
...I,
|
|
6034
6035
|
partialPreview: !0
|
|
@@ -6039,25 +6040,25 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6039
6040
|
}
|
|
6040
6041
|
}
|
|
6041
6042
|
];
|
|
6042
|
-
return (y,
|
|
6043
|
-
|
|
6043
|
+
return (y, b) => r.value ? (Y(), L("div", ku, [
|
|
6044
|
+
z(i) ? (Y(), _(z(Su), {
|
|
6044
6045
|
key: 0,
|
|
6045
6046
|
"plugin-key": u,
|
|
6046
|
-
editor:
|
|
6047
|
-
"get-referenced-virtual-element":
|
|
6047
|
+
editor: z(i),
|
|
6048
|
+
"get-referenced-virtual-element": z(o),
|
|
6048
6049
|
class: "lsh-menu-box"
|
|
6049
6050
|
}, {
|
|
6050
6051
|
default: N(() => [
|
|
6051
|
-
(Y(), L(en, null, gn(
|
|
6052
|
-
key:
|
|
6052
|
+
(Y(), L(en, null, gn(d, (A) => v("button", {
|
|
6053
|
+
key: A.value,
|
|
6053
6054
|
type: "button",
|
|
6054
6055
|
class: "lsh-menu-item",
|
|
6055
|
-
onClick:
|
|
6056
|
-
}, F(
|
|
6056
|
+
onClick: A.onClick
|
|
6057
|
+
}, F(A.label), 9, Ku)), 64))
|
|
6057
6058
|
]),
|
|
6058
6059
|
_: 1
|
|
6059
6060
|
}, 8, ["editor", "get-referenced-virtual-element"])) : yn("", !0),
|
|
6060
|
-
|
|
6061
|
+
v("audio", {
|
|
6061
6062
|
ref_key: "audioRef",
|
|
6062
6063
|
ref: g,
|
|
6063
6064
|
preload: "metadata"
|
|
@@ -6074,6 +6075,7 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6074
6075
|
features: { default: () => ({}) },
|
|
6075
6076
|
services: { default: () => ({}) },
|
|
6076
6077
|
getPreviewParams: {},
|
|
6078
|
+
getPlaybackSpeed: {},
|
|
6077
6079
|
showSelectionMenu: { type: Boolean, default: !0 },
|
|
6078
6080
|
initialContent: { default: Jn }
|
|
6079
6081
|
},
|
|
@@ -6083,19 +6085,23 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6083
6085
|
content: t.initialContent,
|
|
6084
6086
|
textLimitLength: t.textLimit,
|
|
6085
6087
|
getGenerateAudioParams: () => {
|
|
6086
|
-
var
|
|
6087
|
-
return ((
|
|
6088
|
+
var d;
|
|
6089
|
+
return ((d = t.getPreviewParams) == null ? void 0 : d.call(t)) ?? {};
|
|
6090
|
+
},
|
|
6091
|
+
getPlaybackSpeed: () => {
|
|
6092
|
+
var d;
|
|
6093
|
+
return ((d = t.getPlaybackSpeed) == null ? void 0 : d.call(t)) ?? 1;
|
|
6088
6094
|
},
|
|
6089
6095
|
voiceVersion: l,
|
|
6090
6096
|
placeholder: t.placeholder,
|
|
6091
6097
|
editable: s,
|
|
6092
6098
|
services: h,
|
|
6093
6099
|
features: r,
|
|
6094
|
-
onCreate: (
|
|
6100
|
+
onCreate: (d) => o("ready", d),
|
|
6095
6101
|
onChange: () => o("change")
|
|
6096
6102
|
}), { editor: g, clearContent: a, replaceContentWithText: c } = u;
|
|
6097
6103
|
ur(u);
|
|
6098
|
-
const { handleChangeVoice:
|
|
6104
|
+
const { handleChangeVoice: p } = br({
|
|
6099
6105
|
richTextEditor: u
|
|
6100
6106
|
});
|
|
6101
6107
|
return n({
|
|
@@ -6103,22 +6109,22 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6103
6109
|
...{
|
|
6104
6110
|
clear: a,
|
|
6105
6111
|
focus: () => {
|
|
6106
|
-
var
|
|
6107
|
-
return (
|
|
6112
|
+
var d;
|
|
6113
|
+
return (d = g.value) == null ? void 0 : d.commands.focus();
|
|
6108
6114
|
},
|
|
6109
6115
|
getJson: () => {
|
|
6110
|
-
var
|
|
6111
|
-
return ((
|
|
6116
|
+
var d;
|
|
6117
|
+
return ((d = g.value) == null ? void 0 : d.getJSON()) ?? Jn();
|
|
6112
6118
|
},
|
|
6113
6119
|
getTtsData: () => {
|
|
6114
|
-
var
|
|
6115
|
-
return Yi(((
|
|
6120
|
+
var d;
|
|
6121
|
+
return Yi(((d = g.value) == null ? void 0 : d.getJSON()) ?? Jn());
|
|
6116
6122
|
},
|
|
6117
6123
|
replaceText: c,
|
|
6118
|
-
handleChangeVoice:
|
|
6124
|
+
handleChangeVoice: p
|
|
6119
6125
|
}
|
|
6120
|
-
}), (
|
|
6121
|
-
wn(
|
|
6126
|
+
}), (d, y) => (Y(), L(en, null, [
|
|
6127
|
+
wn(d.$slots, "default"),
|
|
6122
6128
|
t.showSelectionMenu ? (Y(), _(Gu, { key: 0 })) : yn("", !0)
|
|
6123
6129
|
], 64));
|
|
6124
6130
|
}
|
|
@@ -6136,22 +6142,22 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6136
6142
|
emits: ["confirm"],
|
|
6137
6143
|
setup(e, { expose: n, emit: i }) {
|
|
6138
6144
|
const t = i, o = K(!1), l = K(), s = Tn(), { notify: h, services: r, textLimitLength: u } = s, g = Io({
|
|
6139
|
-
runner: (
|
|
6140
|
-
var
|
|
6141
|
-
return ((
|
|
6142
|
-
|
|
6145
|
+
runner: (C, W) => {
|
|
6146
|
+
var j, x;
|
|
6147
|
+
return ((x = (j = r.value).generateDraft) == null ? void 0 : x.call(
|
|
6148
|
+
j,
|
|
6143
6149
|
{
|
|
6144
|
-
themeWord: String(
|
|
6145
|
-
requireWord: String(
|
|
6150
|
+
themeWord: String(C.themeWord ?? ""),
|
|
6151
|
+
requireWord: String(C.requireWord ?? "")
|
|
6146
6152
|
},
|
|
6147
|
-
|
|
6153
|
+
W
|
|
6148
6154
|
)) ?? Promise.resolve();
|
|
6149
6155
|
},
|
|
6150
6156
|
scrollTarget: l
|
|
6151
|
-
}), { loading: a, result: c } = g,
|
|
6157
|
+
}), { loading: a, result: c } = g, p = K(""), f = K(""), { copy: d } = yh({ source: c }), y = K(!1), b = [
|
|
6152
6158
|
{
|
|
6153
6159
|
label: "文稿主题",
|
|
6154
|
-
modelValue:
|
|
6160
|
+
modelValue: p,
|
|
6155
6161
|
placeholder: "请输入文稿主题...",
|
|
6156
6162
|
inputHeight: 80,
|
|
6157
6163
|
maxLength: 200
|
|
@@ -6167,152 +6173,152 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6167
6173
|
inputHeight: 233,
|
|
6168
6174
|
maxLength: 500
|
|
6169
6175
|
}
|
|
6170
|
-
],
|
|
6176
|
+
], A = () => {
|
|
6171
6177
|
o.value = !o.value;
|
|
6172
6178
|
}, I = () => {
|
|
6173
|
-
|
|
6179
|
+
A();
|
|
6174
6180
|
}, w = () => {
|
|
6175
|
-
t("confirm", c.value),
|
|
6181
|
+
t("confirm", c.value), A();
|
|
6176
6182
|
}, J = async () => {
|
|
6177
6183
|
try {
|
|
6178
|
-
await
|
|
6179
|
-
} catch (
|
|
6180
|
-
console.log(
|
|
6184
|
+
await d(), h("success", "复制成功");
|
|
6185
|
+
} catch (C) {
|
|
6186
|
+
console.log(C);
|
|
6181
6187
|
}
|
|
6182
6188
|
}, k = async () => {
|
|
6183
6189
|
try {
|
|
6184
6190
|
await g.exec({
|
|
6185
|
-
themeWord:
|
|
6191
|
+
themeWord: p.value,
|
|
6186
6192
|
requireWord: f.value
|
|
6187
6193
|
}), y.value = !0;
|
|
6188
6194
|
} catch {
|
|
6189
6195
|
}
|
|
6190
|
-
}, G = T(() => !
|
|
6196
|
+
}, G = T(() => !p.value || !f.value), M = T(() => u), V = T(() => c.value.length > M.value), S = T(() => a.value || !c.value), m = T(() => S.value || V.value);
|
|
6191
6197
|
return n({
|
|
6192
6198
|
open: () => {
|
|
6193
|
-
|
|
6199
|
+
A();
|
|
6194
6200
|
}
|
|
6195
|
-
}), (
|
|
6201
|
+
}), (C, W) => (Y(), _(z(Oe), {
|
|
6196
6202
|
modelValue: o.value,
|
|
6197
|
-
"onUpdate:modelValue":
|
|
6203
|
+
"onUpdate:modelValue": W[1] || (W[1] = (j) => o.value = j),
|
|
6198
6204
|
width: 800,
|
|
6199
6205
|
title: "AI写稿",
|
|
6200
6206
|
class: "lsh-ai-modal"
|
|
6201
6207
|
}, {
|
|
6202
6208
|
footer: N(() => [
|
|
6203
|
-
H(
|
|
6209
|
+
H(z(on), {
|
|
6204
6210
|
plain: "",
|
|
6205
6211
|
onClick: I
|
|
6206
6212
|
}, {
|
|
6207
|
-
default: N(() => [...
|
|
6213
|
+
default: N(() => [...W[7] || (W[7] = [
|
|
6208
6214
|
An("取消", -1)
|
|
6209
6215
|
])]),
|
|
6210
6216
|
_: 1
|
|
6211
6217
|
}),
|
|
6212
|
-
H(
|
|
6218
|
+
H(z(on), {
|
|
6213
6219
|
plain: "",
|
|
6214
6220
|
onClick: J,
|
|
6215
|
-
disabled:
|
|
6221
|
+
disabled: S.value
|
|
6216
6222
|
}, {
|
|
6217
|
-
default: N(() => [...
|
|
6223
|
+
default: N(() => [...W[8] || (W[8] = [
|
|
6218
6224
|
An("复制", -1)
|
|
6219
6225
|
])]),
|
|
6220
6226
|
_: 1
|
|
6221
6227
|
}, 8, ["disabled"]),
|
|
6222
|
-
H(
|
|
6228
|
+
H(z(on), {
|
|
6223
6229
|
type: "info",
|
|
6224
6230
|
onClick: w,
|
|
6225
|
-
disabled:
|
|
6226
|
-
loading:
|
|
6231
|
+
disabled: m.value,
|
|
6232
|
+
loading: z(a)
|
|
6227
6233
|
}, {
|
|
6228
|
-
default: N(() => [...
|
|
6234
|
+
default: N(() => [...W[9] || (W[9] = [
|
|
6229
6235
|
An(" 替换原文 ", -1)
|
|
6230
6236
|
])]),
|
|
6231
6237
|
_: 1
|
|
6232
6238
|
}, 8, ["disabled", "loading"])
|
|
6233
6239
|
]),
|
|
6234
6240
|
default: N(() => [
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6241
|
+
v("div", Ju, [
|
|
6242
|
+
v("div", Hu, [
|
|
6243
|
+
v("div", Lu, [
|
|
6244
|
+
W[4] || (W[4] = v("span", { class: "lsh-title" }, "文稿关键词", -1)),
|
|
6245
|
+
z(a) ? (Y(), _(z(on), {
|
|
6240
6246
|
key: 1,
|
|
6241
6247
|
class: "lsh-text-btn red",
|
|
6242
|
-
onClick:
|
|
6248
|
+
onClick: z(g).abort
|
|
6243
6249
|
}, {
|
|
6244
6250
|
icon: N(() => [
|
|
6245
|
-
H(
|
|
6251
|
+
H(z(rn), { name: "editor-generate-stop" })
|
|
6246
6252
|
]),
|
|
6247
6253
|
default: N(() => [
|
|
6248
|
-
|
|
6254
|
+
W[3] || (W[3] = v("span", null, "停止生成 ", -1))
|
|
6249
6255
|
]),
|
|
6250
6256
|
_: 1
|
|
6251
|
-
}, 8, ["onClick"])) : (Y(), _(
|
|
6257
|
+
}, 8, ["onClick"])) : (Y(), _(z(on), {
|
|
6252
6258
|
key: 0,
|
|
6253
6259
|
class: "lsh-text-btn blue",
|
|
6254
6260
|
onClick: k,
|
|
6255
6261
|
disabled: G.value
|
|
6256
6262
|
}, {
|
|
6257
6263
|
icon: N(() => [
|
|
6258
|
-
H(
|
|
6264
|
+
H(z(rn), { name: "editor-send" })
|
|
6259
6265
|
]),
|
|
6260
6266
|
default: N(() => [
|
|
6261
|
-
|
|
6267
|
+
W[2] || (W[2] = v("span", null, "开始生成 ", -1))
|
|
6262
6268
|
]),
|
|
6263
6269
|
_: 1
|
|
6264
6270
|
}, 8, ["disabled"]))
|
|
6265
6271
|
]),
|
|
6266
|
-
|
|
6267
|
-
(Y(), L(en, null, gn(
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6272
|
+
v("div", Mu, [
|
|
6273
|
+
(Y(), L(en, null, gn(b, (j) => v("div", Tu, [
|
|
6274
|
+
v("div", Nu, [
|
|
6275
|
+
v("span", null, F(j.label), 1),
|
|
6276
|
+
v("span", Ru, F(j.modelValue.value.length) + "/" + F(j.maxLength), 1)
|
|
6271
6277
|
]),
|
|
6272
|
-
Te(
|
|
6278
|
+
Te(v("textarea", {
|
|
6273
6279
|
class: "lsh-textarea",
|
|
6274
|
-
"onUpdate:modelValue": (
|
|
6275
|
-
placeholder:
|
|
6276
|
-
style: he({ height:
|
|
6280
|
+
"onUpdate:modelValue": (x) => j.modelValue.value = x,
|
|
6281
|
+
placeholder: j.placeholder,
|
|
6282
|
+
style: he({ height: j.inputHeight + "px" }),
|
|
6277
6283
|
resizable: !1,
|
|
6278
|
-
maxlength:
|
|
6284
|
+
maxlength: j.maxLength
|
|
6279
6285
|
}, null, 12, Fu), [
|
|
6280
|
-
[Ne,
|
|
6286
|
+
[Ne, j.modelValue.value]
|
|
6281
6287
|
])
|
|
6282
6288
|
])), 64))
|
|
6283
6289
|
])
|
|
6284
6290
|
]),
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6291
|
+
v("div", Pu, [
|
|
6292
|
+
W[6] || (W[6] = v("div", { class: "lsh-form-top" }, [
|
|
6293
|
+
v("span", { class: "lsh-title" }, "AI写稿结果")
|
|
6288
6294
|
], -1)),
|
|
6289
|
-
|
|
6290
|
-
Te(
|
|
6295
|
+
z(c) || y.value ? (Y(), L("div", Uu, [
|
|
6296
|
+
Te(v("textarea", {
|
|
6291
6297
|
class: "lsh-textarea lsh-result-box",
|
|
6292
6298
|
ref_key: "textBoxRef",
|
|
6293
6299
|
ref: l,
|
|
6294
|
-
"onUpdate:modelValue":
|
|
6300
|
+
"onUpdate:modelValue": W[0] || (W[0] = (j) => Et(c) ? c.value = j : null)
|
|
6295
6301
|
}, null, 512), [
|
|
6296
|
-
[Ne,
|
|
6302
|
+
[Ne, z(c)]
|
|
6297
6303
|
]),
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6304
|
+
v("div", Eu, [
|
|
6305
|
+
W[5] || (W[5] = v("span", null, "内容由AI生成,仅供参考", -1)),
|
|
6306
|
+
v("span", {
|
|
6301
6307
|
class: bn({
|
|
6302
6308
|
"red-text": V.value
|
|
6303
6309
|
})
|
|
6304
|
-
}, F(
|
|
6310
|
+
}, F(z(c).length) + "/" + F(M.value), 3)
|
|
6305
6311
|
])
|
|
6306
|
-
])) :
|
|
6307
|
-
|
|
6308
|
-
H(
|
|
6312
|
+
])) : z(a) ? (Y(), L("div", Du, [
|
|
6313
|
+
v("div", Bu, [
|
|
6314
|
+
H(z(ao), {
|
|
6309
6315
|
loading: "",
|
|
6310
6316
|
text: "正在生成中,请稍候..."
|
|
6311
6317
|
})
|
|
6312
6318
|
])
|
|
6313
6319
|
])) : (Y(), L("div", Qu, [
|
|
6314
|
-
|
|
6315
|
-
H(
|
|
6320
|
+
v("div", _u, [
|
|
6321
|
+
H(z(sh), {
|
|
6316
6322
|
style: { height: "100%" },
|
|
6317
6323
|
description: "暂无内容,请先输入关键词"
|
|
6318
6324
|
})
|
|
@@ -6327,33 +6333,33 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6327
6333
|
}), na = /* @__PURE__ */ sn($u, [["__scopeId", "data-v-259be8b7"]]), ea = { class: "lsh-footer-box" }, ia = { class: "lsh-option-item gray" }, ta = { class: "lsh-option-item gray" }, oa = /* @__PURE__ */ $({
|
|
6328
6334
|
__name: "editor-footer",
|
|
6329
6335
|
setup(e) {
|
|
6330
|
-
const n = Tn(), { clearContent: i, editor: t,
|
|
6331
|
-
var
|
|
6336
|
+
const n = Tn(), { clearContent: i, editor: t, getPlaybackSpeed: o, textLimitLength: l, textLength: s } = n, h = T(() => {
|
|
6337
|
+
var u;
|
|
6332
6338
|
if (!s.value) return tt(0);
|
|
6333
|
-
const
|
|
6334
|
-
return tt(fl(
|
|
6339
|
+
const r = ((u = t.value) == null ? void 0 : u.getText()) ?? "";
|
|
6340
|
+
return tt(fl(r, o()));
|
|
6335
6341
|
});
|
|
6336
6342
|
return (r, u) => (Y(), L("div", ea, [
|
|
6337
|
-
|
|
6338
|
-
H(
|
|
6339
|
-
|
|
6343
|
+
v("div", ia, [
|
|
6344
|
+
H(z(rn), { name: "editor-text" }),
|
|
6345
|
+
v("span", null, F(z(s)) + "/" + F(z(l)), 1)
|
|
6340
6346
|
]),
|
|
6341
|
-
|
|
6342
|
-
H(
|
|
6343
|
-
|
|
6347
|
+
v("div", ta, [
|
|
6348
|
+
H(z(rn), { name: "editor-time" }),
|
|
6349
|
+
v("span", null, F(h.value), 1)
|
|
6344
6350
|
]),
|
|
6345
|
-
u[2] || (u[2] =
|
|
6346
|
-
|
|
6347
|
-
class: bn(["lsh-option-item btn", { disabled: !
|
|
6351
|
+
u[2] || (u[2] = v("div", { class: "lsh-divider" }, null, -1)),
|
|
6352
|
+
v("div", {
|
|
6353
|
+
class: bn(["lsh-option-item btn", { disabled: !z(s) }]),
|
|
6348
6354
|
onClick: u[0] || (u[0] = //@ts-ignore
|
|
6349
|
-
(...g) =>
|
|
6355
|
+
(...g) => z(i) && z(i)(...g))
|
|
6350
6356
|
}, [
|
|
6351
|
-
H(
|
|
6352
|
-
u[1] || (u[1] =
|
|
6357
|
+
H(z(rn), { name: "editor-clear" }),
|
|
6358
|
+
u[1] || (u[1] = v("span", null, "清空", -1))
|
|
6353
6359
|
], 2)
|
|
6354
6360
|
]));
|
|
6355
6361
|
}
|
|
6356
|
-
}), la = /* @__PURE__ */ sn(oa, [["__scopeId", "data-v-
|
|
6362
|
+
}), la = /* @__PURE__ */ sn(oa, [["__scopeId", "data-v-b83e8b96"]]), sa = ({
|
|
6357
6363
|
list: e,
|
|
6358
6364
|
toolbarRef: n,
|
|
6359
6365
|
measureRef: i,
|
|
@@ -6366,23 +6372,23 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6366
6372
|
() => l.value.slice(s.value)
|
|
6367
6373
|
), g = () => {
|
|
6368
6374
|
var I;
|
|
6369
|
-
const c = n.value,
|
|
6370
|
-
if (!c || !
|
|
6375
|
+
const c = n.value, p = i.value;
|
|
6376
|
+
if (!c || !p) return;
|
|
6371
6377
|
const f = c.clientWidth;
|
|
6372
6378
|
if (f <= 0) return;
|
|
6373
|
-
const
|
|
6374
|
-
|
|
6375
|
-
), y = ((I =
|
|
6376
|
-
if (!y ||
|
|
6377
|
-
let
|
|
6378
|
-
s.value =
|
|
6379
|
-
for (let w = 0; w <
|
|
6380
|
-
const J =
|
|
6379
|
+
const d = Array.from(
|
|
6380
|
+
p.querySelectorAll(t)
|
|
6381
|
+
), y = ((I = d[d.length - 1]) == null ? void 0 : I.offsetWidth) || 0, b = d.slice(0, -1).map((w) => w.offsetWidth);
|
|
6382
|
+
if (!y || b.some((w) => !w)) return;
|
|
6383
|
+
let A = 0;
|
|
6384
|
+
s.value = b.length;
|
|
6385
|
+
for (let w = 0; w < b.length; w++) {
|
|
6386
|
+
const J = b.length - w - 1, k = A + (w > 0 ? o : 0) + b[w];
|
|
6381
6387
|
if (k + (J > 0 ? o + y : 0) > f) {
|
|
6382
6388
|
s.value = w;
|
|
6383
6389
|
return;
|
|
6384
6390
|
}
|
|
6385
|
-
|
|
6391
|
+
A = k;
|
|
6386
6392
|
}
|
|
6387
6393
|
}, a = () => {
|
|
6388
6394
|
de(g);
|
|
@@ -6406,7 +6412,7 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6406
6412
|
var l;
|
|
6407
6413
|
return (l = o.value) == null ? void 0 : l.$el;
|
|
6408
6414
|
}
|
|
6409
|
-
}), (l, s) => (Y(), _(
|
|
6415
|
+
}), (l, s) => (Y(), _(z(on), {
|
|
6410
6416
|
ref_key: "buttonRef",
|
|
6411
6417
|
ref: o,
|
|
6412
6418
|
plain: e.plain,
|
|
@@ -6415,13 +6421,13 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6415
6421
|
link: ""
|
|
6416
6422
|
}, {
|
|
6417
6423
|
icon: N(() => [
|
|
6418
|
-
H(
|
|
6424
|
+
H(z(rn), {
|
|
6419
6425
|
name: e.item.tool.icon,
|
|
6420
6426
|
size: "18"
|
|
6421
6427
|
}, null, 8, ["name"])
|
|
6422
6428
|
]),
|
|
6423
6429
|
default: N(() => [
|
|
6424
|
-
|
|
6430
|
+
v("span", null, F(e.item.tool.label), 1)
|
|
6425
6431
|
]),
|
|
6426
6432
|
_: 1
|
|
6427
6433
|
}, 8, ["plain", "disabled"]));
|
|
@@ -6442,25 +6448,25 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6442
6448
|
return ((V = (M = r.value).readFormula) == null ? void 0 : V.call(M, String(k.formula ?? ""), G)) ?? Promise.resolve();
|
|
6443
6449
|
},
|
|
6444
6450
|
scrollTarget: s
|
|
6445
|
-
}), { loading: c, result:
|
|
6451
|
+
}), { loading: c, result: p } = a, f = K(!1), d = () => {
|
|
6446
6452
|
o.value = !o.value;
|
|
6447
6453
|
}, y = () => {
|
|
6448
|
-
|
|
6449
|
-
},
|
|
6450
|
-
t("confirm",
|
|
6451
|
-
},
|
|
6454
|
+
d();
|
|
6455
|
+
}, b = () => {
|
|
6456
|
+
t("confirm", p.value), d();
|
|
6457
|
+
}, A = async () => {
|
|
6452
6458
|
try {
|
|
6453
6459
|
await a.exec({
|
|
6454
6460
|
formula: l.value
|
|
6455
6461
|
}), f.value = !0;
|
|
6456
6462
|
} catch {
|
|
6457
6463
|
}
|
|
6458
|
-
}, I = T(() => g - u.value + l.value.length), w = T(() =>
|
|
6464
|
+
}, I = T(() => g - u.value + l.value.length), w = T(() => p.value.length > I.value), J = T(() => c.value || !p.value || w.value);
|
|
6459
6465
|
return n({
|
|
6460
6466
|
open: (k) => {
|
|
6461
|
-
l.value = k,
|
|
6467
|
+
l.value = k, A(), d();
|
|
6462
6468
|
}
|
|
6463
|
-
}), (k, G) => (Y(), _(
|
|
6469
|
+
}), (k, G) => (Y(), _(z(Oe), {
|
|
6464
6470
|
modelValue: o.value,
|
|
6465
6471
|
"onUpdate:modelValue": G[2] || (G[2] = (M) => o.value = M),
|
|
6466
6472
|
width: 800,
|
|
@@ -6468,7 +6474,7 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6468
6474
|
class: "lsh-ai-modal"
|
|
6469
6475
|
}, {
|
|
6470
6476
|
footer: N(() => [
|
|
6471
|
-
H(
|
|
6477
|
+
H(z(on), {
|
|
6472
6478
|
plain: "",
|
|
6473
6479
|
onClick: y
|
|
6474
6480
|
}, {
|
|
@@ -6477,11 +6483,11 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6477
6483
|
])]),
|
|
6478
6484
|
_: 1
|
|
6479
6485
|
}),
|
|
6480
|
-
H(
|
|
6486
|
+
H(z(on), {
|
|
6481
6487
|
type: "info",
|
|
6482
|
-
onClick:
|
|
6488
|
+
onClick: b,
|
|
6483
6489
|
disabled: J.value,
|
|
6484
|
-
loading:
|
|
6490
|
+
loading: z(c)
|
|
6485
6491
|
}, {
|
|
6486
6492
|
default: N(() => [...G[9] || (G[9] = [
|
|
6487
6493
|
An(" 确定 ", -1)
|
|
@@ -6490,55 +6496,55 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6490
6496
|
}, 8, ["disabled", "loading"])
|
|
6491
6497
|
]),
|
|
6492
6498
|
default: N(() => [
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
G[3] || (G[3] =
|
|
6496
|
-
|
|
6499
|
+
v("div", ha, [
|
|
6500
|
+
v("div", ra, [
|
|
6501
|
+
G[3] || (G[3] = v("div", { class: "lsh-form-top" }, [
|
|
6502
|
+
v("span", { class: "lsh-title" }, "原始文本")
|
|
6497
6503
|
], -1)),
|
|
6498
|
-
|
|
6499
|
-
|
|
6504
|
+
v("div", ua, [
|
|
6505
|
+
v("span", null, F(l.value), 1)
|
|
6500
6506
|
])
|
|
6501
6507
|
]),
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
G[6] || (G[6] =
|
|
6505
|
-
|
|
6508
|
+
v("div", aa, [
|
|
6509
|
+
v("div", ga, [
|
|
6510
|
+
G[6] || (G[6] = v("span", { class: "lsh-title" }, "AI读公式结果", -1)),
|
|
6511
|
+
z(c) ? (Y(), L("div", {
|
|
6506
6512
|
key: 1,
|
|
6507
6513
|
class: "lsh-text-btn stop",
|
|
6508
6514
|
onClick: G[0] || (G[0] = //@ts-ignore
|
|
6509
|
-
(...M) =>
|
|
6515
|
+
(...M) => z(a).abort && z(a).abort(...M))
|
|
6510
6516
|
}, [
|
|
6511
|
-
H(
|
|
6512
|
-
G[5] || (G[5] =
|
|
6517
|
+
H(z(rn), { name: "editor-generate-stop" }),
|
|
6518
|
+
G[5] || (G[5] = v("span", null, "停止生成 ", -1))
|
|
6513
6519
|
])) : (Y(), L("div", {
|
|
6514
6520
|
key: 0,
|
|
6515
6521
|
class: "lsh-text-btn",
|
|
6516
|
-
onClick:
|
|
6522
|
+
onClick: A
|
|
6517
6523
|
}, [
|
|
6518
|
-
H(
|
|
6519
|
-
G[4] || (G[4] =
|
|
6524
|
+
H(z(rn), { name: "editor-refresh" }),
|
|
6525
|
+
G[4] || (G[4] = v("span", null, "重新生成 ", -1))
|
|
6520
6526
|
]))
|
|
6521
6527
|
]),
|
|
6522
|
-
|
|
6523
|
-
Te(
|
|
6528
|
+
z(p) || f.value ? (Y(), L("div", ca, [
|
|
6529
|
+
Te(v("textarea", {
|
|
6524
6530
|
class: "lsh-textarea lsh-result-box",
|
|
6525
6531
|
ref_key: "textBoxRef",
|
|
6526
6532
|
ref: s,
|
|
6527
|
-
"onUpdate:modelValue": G[1] || (G[1] = (M) => Et(
|
|
6533
|
+
"onUpdate:modelValue": G[1] || (G[1] = (M) => Et(p) ? p.value = M : null)
|
|
6528
6534
|
}, null, 512), [
|
|
6529
|
-
[Ne,
|
|
6535
|
+
[Ne, z(p)]
|
|
6530
6536
|
]),
|
|
6531
|
-
|
|
6532
|
-
G[7] || (G[7] =
|
|
6533
|
-
|
|
6537
|
+
v("div", da, [
|
|
6538
|
+
G[7] || (G[7] = v("span", null, "内容由AI生成,仅供参考", -1)),
|
|
6539
|
+
v("span", {
|
|
6534
6540
|
class: bn({
|
|
6535
6541
|
"red-text": w.value
|
|
6536
6542
|
})
|
|
6537
|
-
}, F(
|
|
6543
|
+
}, F(z(p).length) + "/" + F(I.value), 3)
|
|
6538
6544
|
])
|
|
6539
6545
|
])) : (Y(), L("div", ma, [
|
|
6540
|
-
|
|
6541
|
-
H(
|
|
6546
|
+
v("div", pa, [
|
|
6547
|
+
H(z(ao), {
|
|
6542
6548
|
loading: "",
|
|
6543
6549
|
text: "正在生成中,请稍候..."
|
|
6544
6550
|
})
|
|
@@ -30243,13 +30249,13 @@ const je = (e) => {
|
|
|
30243
30249
|
const g = s[h];
|
|
30244
30250
|
if (g && u === g.index) {
|
|
30245
30251
|
if (g.length === 1 && g.priority <= qn.Normal) {
|
|
30246
|
-
const
|
|
30247
|
-
g.zh =
|
|
30252
|
+
const p = r[u];
|
|
30253
|
+
g.zh = p;
|
|
30248
30254
|
let f = "";
|
|
30249
|
-
f = Mt(
|
|
30250
|
-
origin:
|
|
30255
|
+
f = Mt(p, r[u - 1], r[u + 1]), n[u] = {
|
|
30256
|
+
origin: p,
|
|
30251
30257
|
result: f,
|
|
30252
|
-
isZh: f !==
|
|
30258
|
+
isZh: f !== p,
|
|
30253
30259
|
originPinyin: f
|
|
30254
30260
|
}, u++, h++;
|
|
30255
30261
|
continue;
|
|
@@ -30257,9 +30263,9 @@ const je = (e) => {
|
|
|
30257
30263
|
const a = g.pinyin.split(" ");
|
|
30258
30264
|
let c = 0;
|
|
30259
30265
|
o && (g.zh = r.slice(g.index, g.index + g.length).join(""));
|
|
30260
|
-
for (let
|
|
30261
|
-
n[u +
|
|
30262
|
-
origin: r[
|
|
30266
|
+
for (let p = 0; p < g.length; p++)
|
|
30267
|
+
n[u + p] = {
|
|
30268
|
+
origin: r[p + g.index],
|
|
30263
30269
|
result: a[c] || "",
|
|
30264
30270
|
isZh: !0,
|
|
30265
30271
|
originPinyin: a[c] || ""
|
|
@@ -30606,53 +30612,53 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30606
30612
|
}, c = () => {
|
|
30607
30613
|
const V = s.value === "auto" ? G(u.autoPinyin) : J.value;
|
|
30608
30614
|
o.value = !1, t("confirm", V);
|
|
30609
|
-
},
|
|
30615
|
+
}, p = (V) => {
|
|
30610
30616
|
I.value.initial = V === I.value.initial ? "" : V;
|
|
30611
30617
|
}, f = (V) => {
|
|
30612
30618
|
I.value.final = V;
|
|
30613
|
-
},
|
|
30614
|
-
var
|
|
30619
|
+
}, d = (V) => {
|
|
30620
|
+
var m, C;
|
|
30615
30621
|
r.value = V;
|
|
30616
|
-
const
|
|
30617
|
-
h.value = ((
|
|
30618
|
-
}, y = (V,
|
|
30619
|
-
const
|
|
30620
|
-
|
|
30621
|
-
},
|
|
30622
|
+
const S = ((m = u.manualPinyin[V]) == null ? void 0 : m.final) ?? "";
|
|
30623
|
+
h.value = ((C = le.find((W) => W.options.includes(S))) == null ? void 0 : C.value) ?? le[0].value;
|
|
30624
|
+
}, y = (V, S) => {
|
|
30625
|
+
const m = u.autoPinyin.split(" ");
|
|
30626
|
+
m[V] = S, u.autoPinyin = m.join(" ");
|
|
30627
|
+
}, b = T(() => {
|
|
30622
30628
|
var V;
|
|
30623
|
-
return ((V = le.find((
|
|
30624
|
-
}),
|
|
30629
|
+
return ((V = le.find((S) => S.value === h.value)) == null ? void 0 : V.options) || [];
|
|
30630
|
+
}), A = T(() => s.value === "auto" ? !u.autoPinyin.length : u.manualPinyin.some((V) => !V.final)), I = T(
|
|
30625
30631
|
() => u.manualPinyin[r.value]
|
|
30626
30632
|
), w = (V) => {
|
|
30627
|
-
const
|
|
30628
|
-
return `${V.initial}${V.final}${V.final ?
|
|
30633
|
+
const S = V.tone === "0" ? "" : V.tone;
|
|
30634
|
+
return `${V.initial}${V.final}${V.final ? S : ""}`;
|
|
30629
30635
|
}, J = T(() => s.value === "auto" ? u.autoPinyin : u.manualPinyin.map(w).join(" ")), k = (V) => V.replace(/ü/g, "v").replace(/0$/, ""), G = (V) => V.trim().split(/\s+/).map(k).join(" "), M = (V) => {
|
|
30630
30636
|
try {
|
|
30631
|
-
const
|
|
30637
|
+
const S = lg(V, {
|
|
30632
30638
|
type: "all",
|
|
30633
30639
|
toneType: "num",
|
|
30634
30640
|
nonZh: "consecutive"
|
|
30635
|
-
}),
|
|
30641
|
+
}), m = hg(V, {
|
|
30636
30642
|
type: "array",
|
|
30637
30643
|
toneType: "num",
|
|
30638
30644
|
nonZh: "consecutive"
|
|
30639
30645
|
});
|
|
30640
|
-
let
|
|
30641
|
-
u.autoPinyin =
|
|
30642
|
-
if (!
|
|
30643
|
-
const
|
|
30646
|
+
let C = 0;
|
|
30647
|
+
u.autoPinyin = S.filter((W) => W.isZh && W.pinyin).map((W) => k(W.pinyin)).join(" "), u.pinyinOptions = S.reduce((W, j, x) => {
|
|
30648
|
+
if (!j.isZh || !j.pinyin) return W;
|
|
30649
|
+
const q = Array.from(
|
|
30644
30650
|
/* @__PURE__ */ new Set([
|
|
30645
|
-
k(
|
|
30646
|
-
...(
|
|
30647
|
-
(
|
|
30651
|
+
k(j.pinyin),
|
|
30652
|
+
...(m[x] || []).map(
|
|
30653
|
+
(O) => k(O)
|
|
30648
30654
|
)
|
|
30649
30655
|
])
|
|
30650
30656
|
);
|
|
30651
|
-
return
|
|
30652
|
-
text:
|
|
30653
|
-
index:
|
|
30654
|
-
options:
|
|
30655
|
-
}),
|
|
30657
|
+
return q.length > 1 && W.push({
|
|
30658
|
+
text: j.origin,
|
|
30659
|
+
index: C,
|
|
30660
|
+
options: q
|
|
30661
|
+
}), C += 1, W;
|
|
30656
30662
|
}, []);
|
|
30657
30663
|
} catch {
|
|
30658
30664
|
u.autoPinyin = "", u.pinyinOptions = [];
|
|
@@ -30660,157 +30666,157 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30660
30666
|
};
|
|
30661
30667
|
return n({
|
|
30662
30668
|
open: (V) => {
|
|
30663
|
-
u.text = V, u.autoPinyin = "", u.manualPinyin = Array.from(V, (
|
|
30664
|
-
text:
|
|
30669
|
+
u.text = V, u.autoPinyin = "", u.manualPinyin = Array.from(V, (S) => ({
|
|
30670
|
+
text: S,
|
|
30665
30671
|
initial: "",
|
|
30666
30672
|
tone: ht[4].value,
|
|
30667
30673
|
final: ""
|
|
30668
30674
|
})), r.value = 0, h.value = le[0].value, u.pinyinOptions = [], M(V), g();
|
|
30669
30675
|
}
|
|
30670
|
-
}), (V,
|
|
30676
|
+
}), (V, S) => (Y(), _(z(Oe), {
|
|
30671
30677
|
modelValue: o.value,
|
|
30672
|
-
"onUpdate:modelValue":
|
|
30678
|
+
"onUpdate:modelValue": S[4] || (S[4] = (m) => o.value = m),
|
|
30673
30679
|
width: 800,
|
|
30674
30680
|
"header-class": "lsh-modal-header"
|
|
30675
30681
|
}, {
|
|
30676
30682
|
header: N(() => [
|
|
30677
|
-
|
|
30678
|
-
|
|
30679
|
-
H(
|
|
30683
|
+
v("div", gg, [
|
|
30684
|
+
S[5] || (S[5] = v("span", { class: "lsh-title" }, "拼音标注助手", -1)),
|
|
30685
|
+
H(z(ri), {
|
|
30680
30686
|
class: "lsh-radio-group",
|
|
30681
30687
|
options: l,
|
|
30682
30688
|
modelValue: s.value,
|
|
30683
|
-
"onUpdate:modelValue":
|
|
30689
|
+
"onUpdate:modelValue": S[0] || (S[0] = (m) => s.value = m),
|
|
30684
30690
|
style: { "border-radius": "9px" }
|
|
30685
30691
|
}, null, 8, ["modelValue"])
|
|
30686
30692
|
])
|
|
30687
30693
|
]),
|
|
30688
30694
|
footer: N(() => [
|
|
30689
|
-
H(
|
|
30695
|
+
H(z(on), {
|
|
30690
30696
|
plain: "",
|
|
30691
30697
|
onClick: a
|
|
30692
30698
|
}, {
|
|
30693
|
-
default: N(() => [...
|
|
30699
|
+
default: N(() => [...S[12] || (S[12] = [
|
|
30694
30700
|
An("取消", -1)
|
|
30695
30701
|
])]),
|
|
30696
30702
|
_: 1
|
|
30697
30703
|
}),
|
|
30698
|
-
H(
|
|
30704
|
+
H(z(on), {
|
|
30699
30705
|
type: "info",
|
|
30700
30706
|
onClick: c,
|
|
30701
|
-
disabled:
|
|
30707
|
+
disabled: A.value
|
|
30702
30708
|
}, {
|
|
30703
|
-
default: N(() => [...
|
|
30709
|
+
default: N(() => [...S[13] || (S[13] = [
|
|
30704
30710
|
An(" 确认 ", -1)
|
|
30705
30711
|
])]),
|
|
30706
30712
|
_: 1
|
|
30707
30713
|
}, 8, ["disabled"])
|
|
30708
30714
|
]),
|
|
30709
30715
|
default: N(() => [
|
|
30710
|
-
|
|
30711
|
-
|
|
30712
|
-
|
|
30716
|
+
v("div", cg, [
|
|
30717
|
+
v("div", null, [
|
|
30718
|
+
S[6] || (S[6] = v("div", { class: "lsh-label" }, "拼音", -1)),
|
|
30713
30719
|
s.value === "auto" ? Te((Y(), L("input", {
|
|
30714
30720
|
key: 0,
|
|
30715
30721
|
class: "lsh-text-box",
|
|
30716
|
-
"onUpdate:modelValue":
|
|
30722
|
+
"onUpdate:modelValue": S[1] || (S[1] = (m) => u.autoPinyin = m)
|
|
30717
30723
|
}, null, 512)), [
|
|
30718
30724
|
[Ne, u.autoPinyin]
|
|
30719
30725
|
]) : (Y(), L("div", dg, F(J.value), 1))
|
|
30720
30726
|
]),
|
|
30721
30727
|
s.value === "auto" ? (Y(), L("div", mg, [
|
|
30722
|
-
|
|
30723
|
-
|
|
30728
|
+
S[8] || (S[8] = v("div", { class: "lsh-label" }, "汉字", -1)),
|
|
30729
|
+
v("div", pg, F(u.text), 1),
|
|
30724
30730
|
u.pinyinOptions.length ? (Y(), L("div", fg, [
|
|
30725
|
-
|
|
30726
|
-
|
|
30727
|
-
(Y(!0), L(en, null, gn(u.pinyinOptions, (
|
|
30731
|
+
S[7] || (S[7] = v("div", { class: "lsh-label" }, "多音字候选", -1)),
|
|
30732
|
+
v("div", yg, [
|
|
30733
|
+
(Y(!0), L(en, null, gn(u.pinyinOptions, (m) => (Y(), L("div", {
|
|
30728
30734
|
class: "lsh-polyphonic-item",
|
|
30729
|
-
key: `${
|
|
30735
|
+
key: `${m.text}-${m.index}`
|
|
30730
30736
|
}, [
|
|
30731
|
-
|
|
30732
|
-
|
|
30733
|
-
(Y(!0), L(en, null, gn(
|
|
30737
|
+
v("span", qg, F(m.text), 1),
|
|
30738
|
+
v("div", zg, [
|
|
30739
|
+
(Y(!0), L(en, null, gn(m.options, (C) => (Y(), L("div", {
|
|
30734
30740
|
class: bn(["lsh-polyphonic-option", {
|
|
30735
|
-
active:
|
|
30741
|
+
active: C === u.autoPinyin.split(" ")[m.index]
|
|
30736
30742
|
}]),
|
|
30737
|
-
key:
|
|
30738
|
-
onClick: (
|
|
30739
|
-
|
|
30740
|
-
|
|
30743
|
+
key: C,
|
|
30744
|
+
onClick: (W) => y(
|
|
30745
|
+
m.index,
|
|
30746
|
+
C
|
|
30741
30747
|
)
|
|
30742
|
-
}, F(
|
|
30748
|
+
}, F(C), 11, bg))), 128))
|
|
30743
30749
|
])
|
|
30744
30750
|
]))), 128))
|
|
30745
30751
|
])
|
|
30746
30752
|
])) : yn("", !0)
|
|
30747
30753
|
])) : (Y(), L(en, { key: 1 }, [
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
(Y(!0), L(en, null, gn(u.manualPinyin, (
|
|
30752
|
-
class: bn(["lsh-manual-text-item", { active:
|
|
30753
|
-
key: `${
|
|
30754
|
-
onClick: (
|
|
30754
|
+
v("div", jg, [
|
|
30755
|
+
S[9] || (S[9] = v("div", { class: "lsh-label" }, "汉字", -1)),
|
|
30756
|
+
v("div", vg, [
|
|
30757
|
+
(Y(!0), L(en, null, gn(u.manualPinyin, (m, C) => (Y(), L("div", {
|
|
30758
|
+
class: bn(["lsh-manual-text-item", { active: C === r.value }]),
|
|
30759
|
+
key: `${m.text}-${C}`,
|
|
30760
|
+
onClick: (W) => d(C)
|
|
30755
30761
|
}, [
|
|
30756
|
-
|
|
30757
|
-
|
|
30762
|
+
v("span", null, F(m.text), 1),
|
|
30763
|
+
v("span", Zg, F(w(m) || "-"), 1)
|
|
30758
30764
|
], 10, Ag))), 128))
|
|
30759
30765
|
])
|
|
30760
30766
|
]),
|
|
30761
|
-
|
|
30762
|
-
|
|
30763
|
-
|
|
30764
|
-
|
|
30765
|
-
(Y(!0), L(en, null, gn(
|
|
30767
|
+
v("div", xg, [
|
|
30768
|
+
v("div", Cg, [
|
|
30769
|
+
S[10] || (S[10] = v("div", { class: "lsh-label" }, "声母", -1)),
|
|
30770
|
+
v("div", Ig, [
|
|
30771
|
+
(Y(!0), L(en, null, gn(z(Eh), (m) => (Y(), L("div", {
|
|
30766
30772
|
class: bn(["lsh-initial-btn", {
|
|
30767
|
-
active:
|
|
30773
|
+
active: m === I.value.initial
|
|
30768
30774
|
}]),
|
|
30769
|
-
key:
|
|
30770
|
-
onClick: (
|
|
30771
|
-
}, F(
|
|
30775
|
+
key: m,
|
|
30776
|
+
onClick: (C) => p(m)
|
|
30777
|
+
}, F(m), 11, Wg))), 128))
|
|
30772
30778
|
])
|
|
30773
30779
|
]),
|
|
30774
|
-
|
|
30775
|
-
|
|
30776
|
-
H(
|
|
30780
|
+
v("div", wg, [
|
|
30781
|
+
S[11] || (S[11] = v("div", { class: "lsh-label" }, "韵母", -1)),
|
|
30782
|
+
H(z(ri), {
|
|
30777
30783
|
class: "lsh-radio-group-white",
|
|
30778
|
-
options:
|
|
30784
|
+
options: z(ht),
|
|
30779
30785
|
color: "#101114",
|
|
30780
30786
|
"active-color": "#101114",
|
|
30781
30787
|
background: "#F1F2F5",
|
|
30782
30788
|
"active-backgound": "#fff",
|
|
30783
30789
|
style: { width: "284px" },
|
|
30784
30790
|
modelValue: I.value.tone,
|
|
30785
|
-
"onUpdate:modelValue":
|
|
30791
|
+
"onUpdate:modelValue": S[2] || (S[2] = (m) => I.value.tone = m),
|
|
30786
30792
|
"slider-style": {
|
|
30787
30793
|
borderRadius: "10px",
|
|
30788
30794
|
boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.10)"
|
|
30789
30795
|
}
|
|
30790
30796
|
}, null, 8, ["options", "modelValue"]),
|
|
30791
|
-
|
|
30792
|
-
H(
|
|
30797
|
+
v("div", Sg, [
|
|
30798
|
+
H(z(ri), {
|
|
30793
30799
|
class: "lsh-radio-group-white",
|
|
30794
|
-
options:
|
|
30800
|
+
options: z(le),
|
|
30795
30801
|
color: "#101114",
|
|
30796
30802
|
"active-color": "#101114",
|
|
30797
30803
|
background: "#F1F2F5",
|
|
30798
30804
|
"active-backgound": "#fff",
|
|
30799
30805
|
modelValue: h.value,
|
|
30800
|
-
"onUpdate:modelValue":
|
|
30806
|
+
"onUpdate:modelValue": S[3] || (S[3] = (m) => h.value = m),
|
|
30801
30807
|
"slider-style": {
|
|
30802
30808
|
borderRadius: "10px",
|
|
30803
30809
|
boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.10)"
|
|
30804
30810
|
}
|
|
30805
30811
|
}, null, 8, ["options", "modelValue"]),
|
|
30806
|
-
|
|
30807
|
-
(Y(!0), L(en, null, gn(
|
|
30812
|
+
v("div", Og, [
|
|
30813
|
+
(Y(!0), L(en, null, gn(b.value, (m) => (Y(), L("div", {
|
|
30808
30814
|
class: bn(["lsh-final-item", {
|
|
30809
|
-
active:
|
|
30815
|
+
active: m === I.value.final
|
|
30810
30816
|
}]),
|
|
30811
|
-
key:
|
|
30812
|
-
onClick: (
|
|
30813
|
-
}, F(
|
|
30817
|
+
key: m,
|
|
30818
|
+
onClick: (C) => f(m)
|
|
30819
|
+
}, F(m), 11, Yg))), 128))
|
|
30814
30820
|
])
|
|
30815
30821
|
])
|
|
30816
30822
|
])
|
|
@@ -30842,20 +30848,20 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30842
30848
|
open: (g) => {
|
|
30843
30849
|
l.origin = g, l.new = "", s();
|
|
30844
30850
|
}
|
|
30845
|
-
}), (g, a) => (Y(), _(
|
|
30851
|
+
}), (g, a) => (Y(), _(z(Oe), {
|
|
30846
30852
|
modelValue: o.value,
|
|
30847
30853
|
"onUpdate:modelValue": a[2] || (a[2] = (c) => o.value = c),
|
|
30848
30854
|
width: 400,
|
|
30849
30855
|
"header-class": "lsh-modal-header"
|
|
30850
30856
|
}, {
|
|
30851
30857
|
header: N(() => [...a[3] || (a[3] = [
|
|
30852
|
-
|
|
30853
|
-
|
|
30854
|
-
|
|
30858
|
+
v("div", { class: "lsh-header-content" }, [
|
|
30859
|
+
v("span", { class: "lsh-title" }, "文本替换"),
|
|
30860
|
+
v("p", { class: "lsh-tip" }, " 替换的文本将保留显示,但语音合成朗读会使用替换后的内容 ")
|
|
30855
30861
|
], -1)
|
|
30856
30862
|
])]),
|
|
30857
30863
|
footer: N(() => [
|
|
30858
|
-
H(
|
|
30864
|
+
H(z(on), {
|
|
30859
30865
|
plain: "",
|
|
30860
30866
|
onClick: h
|
|
30861
30867
|
}, {
|
|
@@ -30864,7 +30870,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30864
30870
|
])]),
|
|
30865
30871
|
_: 1
|
|
30866
30872
|
}),
|
|
30867
|
-
H(
|
|
30873
|
+
H(z(on), {
|
|
30868
30874
|
type: "info",
|
|
30869
30875
|
onClick: r,
|
|
30870
30876
|
disabled: u.value
|
|
@@ -30876,18 +30882,18 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30876
30882
|
}, 8, ["disabled"])
|
|
30877
30883
|
]),
|
|
30878
30884
|
default: N(() => [
|
|
30879
|
-
|
|
30880
|
-
|
|
30881
|
-
a[4] || (a[4] =
|
|
30882
|
-
H(
|
|
30885
|
+
v("div", Vg, [
|
|
30886
|
+
v("div", null, [
|
|
30887
|
+
a[4] || (a[4] = v("div", { class: "lsh-form-item-label" }, "原文", -1)),
|
|
30888
|
+
H(z(nt), {
|
|
30883
30889
|
disabled: "",
|
|
30884
30890
|
modelValue: l.origin,
|
|
30885
30891
|
"onUpdate:modelValue": a[0] || (a[0] = (c) => l.origin = c)
|
|
30886
30892
|
}, null, 8, ["modelValue"])
|
|
30887
30893
|
]),
|
|
30888
|
-
|
|
30889
|
-
a[5] || (a[5] =
|
|
30890
|
-
H(
|
|
30894
|
+
v("div", null, [
|
|
30895
|
+
a[5] || (a[5] = v("div", { class: "lsh-form-item-label" }, "替换文本", -1)),
|
|
30896
|
+
H(z(nt), {
|
|
30891
30897
|
placeholder: "请输入",
|
|
30892
30898
|
modelValue: l.new,
|
|
30893
30899
|
"onUpdate:modelValue": a[1] || (a[1] = (c) => l.new = c)
|
|
@@ -30910,7 +30916,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30910
30916
|
emits: /* @__PURE__ */ ae(["select"], ["update:visible"]),
|
|
30911
30917
|
setup(e, { emit: n }) {
|
|
30912
30918
|
const i = Gi(e, "visible"), t = n;
|
|
30913
|
-
return (o, l) => (Y(), _(
|
|
30919
|
+
return (o, l) => (Y(), _(z(_e), {
|
|
30914
30920
|
"virtual-ref": e.virtualRef,
|
|
30915
30921
|
trigger: "click",
|
|
30916
30922
|
"virtual-triggering": "",
|
|
@@ -30921,14 +30927,14 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30921
30927
|
placement: "top"
|
|
30922
30928
|
}, {
|
|
30923
30929
|
default: N(() => [
|
|
30924
|
-
|
|
30925
|
-
(Y(!0), L(en, null, gn(e.options, (s) => (Y(), _(
|
|
30930
|
+
v("div", Jg, [
|
|
30931
|
+
(Y(!0), L(en, null, gn(e.options, (s) => (Y(), _(z(on), {
|
|
30926
30932
|
key: s.value,
|
|
30927
30933
|
onClick: (h) => t("select", s.value)
|
|
30928
30934
|
}, {
|
|
30929
30935
|
default: N(() => [
|
|
30930
|
-
|
|
30931
|
-
|
|
30936
|
+
v("span", null, F(s.value.toUpperCase()), 1),
|
|
30937
|
+
v("span", null, " " + F(s.label), 1)
|
|
30932
30938
|
]),
|
|
30933
30939
|
_: 2
|
|
30934
30940
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -30949,7 +30955,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30949
30955
|
emits: /* @__PURE__ */ ae(["select"], ["update:visible"]),
|
|
30950
30956
|
setup(e, { emit: n }) {
|
|
30951
30957
|
const i = Gi(e, "visible"), t = n;
|
|
30952
|
-
return (o, l) => (Y(), _(
|
|
30958
|
+
return (o, l) => (Y(), _(z(_e), {
|
|
30953
30959
|
"virtual-ref": e.virtualRef,
|
|
30954
30960
|
trigger: "click",
|
|
30955
30961
|
"virtual-triggering": "",
|
|
@@ -30960,14 +30966,14 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30960
30966
|
placement: "top"
|
|
30961
30967
|
}, {
|
|
30962
30968
|
default: N(() => [
|
|
30963
|
-
|
|
30964
|
-
(Y(!0), L(en, null, gn(e.options, (s) => (Y(), _(
|
|
30969
|
+
v("div", Mg, [
|
|
30970
|
+
(Y(!0), L(en, null, gn(e.options, (s) => (Y(), _(z(on), {
|
|
30965
30971
|
key: s.label,
|
|
30966
30972
|
onClick: (h) => t("select", s.value)
|
|
30967
30973
|
}, {
|
|
30968
30974
|
default: N(() => [
|
|
30969
|
-
|
|
30970
|
-
|
|
30975
|
+
v("span", Tg, F(s.label) + ":", 1),
|
|
30976
|
+
v("span", Ng, " " + F(s.value), 1)
|
|
30971
30977
|
]),
|
|
30972
30978
|
_: 2
|
|
30973
30979
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -30989,7 +30995,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30989
30995
|
const i = Gi(e, "visible"), t = n, o = K(), l = (s) => {
|
|
30990
30996
|
t("select", s), o.value = void 0;
|
|
30991
30997
|
};
|
|
30992
|
-
return (s, h) => (Y(), _(
|
|
30998
|
+
return (s, h) => (Y(), _(z(_e), {
|
|
30993
30999
|
"virtual-ref": e.virtualRef,
|
|
30994
31000
|
trigger: "click",
|
|
30995
31001
|
"virtual-triggering": "",
|
|
@@ -31000,8 +31006,8 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31000
31006
|
placement: "top"
|
|
31001
31007
|
}, {
|
|
31002
31008
|
default: N(() => [
|
|
31003
|
-
|
|
31004
|
-
(Y(!0), L(en, null, gn(
|
|
31009
|
+
v("div", Pg, [
|
|
31010
|
+
(Y(!0), L(en, null, gn(z(yl), (r) => (Y(), _(z(on), {
|
|
31005
31011
|
key: r.label,
|
|
31006
31012
|
onClick: (u) => l(r.value)
|
|
31007
31013
|
}, {
|
|
@@ -31010,12 +31016,12 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31010
31016
|
]),
|
|
31011
31017
|
_: 2
|
|
31012
31018
|
}, 1032, ["onClick"]))), 128)),
|
|
31013
|
-
H(
|
|
31019
|
+
H(z(on), {
|
|
31014
31020
|
onClick: h[2] || (h[2] = bi((r) => o.value && l(o.value), ["stop"]))
|
|
31015
31021
|
}, {
|
|
31016
31022
|
default: N(() => [
|
|
31017
|
-
h[4] || (h[4] =
|
|
31018
|
-
H(
|
|
31023
|
+
h[4] || (h[4] = v("span", null, "停顿", -1)),
|
|
31024
|
+
H(z(kl), {
|
|
31019
31025
|
modelValue: o.value,
|
|
31020
31026
|
"onUpdate:modelValue": h[0] || (h[0] = (r) => o.value = r),
|
|
31021
31027
|
min: 0.1,
|
|
@@ -31025,7 +31031,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31025
31031
|
onClick: h[1] || (h[1] = bi(() => {
|
|
31026
31032
|
}, ["stop"]))
|
|
31027
31033
|
}, null, 8, ["modelValue"]),
|
|
31028
|
-
h[5] || (h[5] =
|
|
31034
|
+
h[5] || (h[5] = v("span", null, "秒", -1))
|
|
31029
31035
|
]),
|
|
31030
31036
|
_: 1
|
|
31031
31037
|
})
|
|
@@ -31047,15 +31053,15 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31047
31053
|
s.value = !s.value;
|
|
31048
31054
|
}, c = () => {
|
|
31049
31055
|
u == null || u.abort(), a();
|
|
31050
|
-
},
|
|
31051
|
-
const
|
|
31052
|
-
if (!(!
|
|
31056
|
+
}, p = async () => {
|
|
31057
|
+
const d = h.value[0], y = l.value.parseDocument;
|
|
31058
|
+
if (!(!d || !y)) {
|
|
31053
31059
|
r.value = !0, u == null || u.abort(), u = new AbortController();
|
|
31054
31060
|
try {
|
|
31055
|
-
const
|
|
31056
|
-
t("confirm",
|
|
31057
|
-
} catch (
|
|
31058
|
-
|
|
31061
|
+
const b = await y(d, u.signal);
|
|
31062
|
+
t("confirm", b), a();
|
|
31063
|
+
} catch (b) {
|
|
31064
|
+
b instanceof Error && b.name === "AbortError" || o("error", "解析失败");
|
|
31059
31065
|
} finally {
|
|
31060
31066
|
r.value = !1, u = null;
|
|
31061
31067
|
}
|
|
@@ -31065,15 +31071,15 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31065
31071
|
open: () => {
|
|
31066
31072
|
a();
|
|
31067
31073
|
}
|
|
31068
|
-
}), Se(() => u == null ? void 0 : u.abort()), (
|
|
31074
|
+
}), Se(() => u == null ? void 0 : u.abort()), (d, y) => (Y(), _(z(Oe), {
|
|
31069
31075
|
modelValue: s.value,
|
|
31070
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
|
31076
|
+
"onUpdate:modelValue": y[1] || (y[1] = (b) => s.value = b),
|
|
31071
31077
|
width: 800,
|
|
31072
31078
|
title: "上传文稿",
|
|
31073
31079
|
"modal-class": "word-upload-modal"
|
|
31074
31080
|
}, {
|
|
31075
31081
|
footer: N(() => [
|
|
31076
|
-
H(
|
|
31082
|
+
H(z(on), {
|
|
31077
31083
|
plain: "",
|
|
31078
31084
|
onClick: c
|
|
31079
31085
|
}, {
|
|
@@ -31082,9 +31088,9 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31082
31088
|
])]),
|
|
31083
31089
|
_: 1
|
|
31084
31090
|
}),
|
|
31085
|
-
H(
|
|
31091
|
+
H(z(on), {
|
|
31086
31092
|
type: "info",
|
|
31087
|
-
onClick:
|
|
31093
|
+
onClick: p,
|
|
31088
31094
|
disabled: f.value,
|
|
31089
31095
|
loading: r.value
|
|
31090
31096
|
}, {
|
|
@@ -31095,7 +31101,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31095
31101
|
}, 8, ["disabled", "loading"])
|
|
31096
31102
|
]),
|
|
31097
31103
|
default: N(() => [
|
|
31098
|
-
|
|
31104
|
+
v("div", Dg, [
|
|
31099
31105
|
H(Fh, {
|
|
31100
31106
|
class: "lsh-audio-upload",
|
|
31101
31107
|
accept: [".txt", ".docx"],
|
|
@@ -31104,13 +31110,13 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31104
31110
|
tip: "支持 TXT、DOCX 格式,大小不超过 3 MB",
|
|
31105
31111
|
ref: "uploadRef",
|
|
31106
31112
|
modelValue: h.value,
|
|
31107
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
31113
|
+
"onUpdate:modelValue": y[0] || (y[0] = (b) => h.value = b)
|
|
31108
31114
|
}, null, 8, ["modelValue"]),
|
|
31109
|
-
|
|
31110
|
-
y[2] || (y[2] =
|
|
31111
|
-
(Y(), L(en, null, gn(g, (
|
|
31112
|
-
|
|
31113
|
-
|
|
31115
|
+
v("div", Bg, [
|
|
31116
|
+
y[2] || (y[2] = v("div", { class: "lsh-title" }, "注意事项:", -1)),
|
|
31117
|
+
(Y(), L(en, null, gn(g, (b, A) => v("div", Qg, [
|
|
31118
|
+
v("span", null, F(A + 1) + ".", 1),
|
|
31119
|
+
v("span", null, F(b), 1)
|
|
31114
31120
|
])), 64))
|
|
31115
31121
|
])
|
|
31116
31122
|
])
|
|
@@ -31125,189 +31131,189 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31125
31131
|
customStop: !1,
|
|
31126
31132
|
language: !1,
|
|
31127
31133
|
number: !1
|
|
31128
|
-
}), u = K(), g = K(), a = K(), c = K(),
|
|
31134
|
+
}), u = K(), g = K(), a = K(), c = K(), p = K(), {
|
|
31129
31135
|
toolList: f,
|
|
31130
|
-
languageOptions:
|
|
31136
|
+
languageOptions: d,
|
|
31131
31137
|
numberToTextList: y,
|
|
31132
|
-
isToolDisabled:
|
|
31133
|
-
insertCustomStop:
|
|
31138
|
+
isToolDisabled: b,
|
|
31139
|
+
insertCustomStop: A,
|
|
31134
31140
|
setLanguage: I,
|
|
31135
31141
|
replaceText: w,
|
|
31136
31142
|
markPinyin: J
|
|
31137
31143
|
} = qr({
|
|
31138
31144
|
editorContext: n,
|
|
31139
31145
|
openModal: {
|
|
31140
|
-
pinyin: (
|
|
31141
|
-
var
|
|
31142
|
-
return (
|
|
31146
|
+
pinyin: (q) => {
|
|
31147
|
+
var O;
|
|
31148
|
+
return (O = g.value) == null ? void 0 : O.open(q);
|
|
31143
31149
|
},
|
|
31144
|
-
replace: (
|
|
31145
|
-
var
|
|
31146
|
-
return (
|
|
31150
|
+
replace: (q) => {
|
|
31151
|
+
var O;
|
|
31152
|
+
return (O = u.value) == null ? void 0 : O.open(q);
|
|
31147
31153
|
},
|
|
31148
|
-
formula: (
|
|
31149
|
-
var
|
|
31150
|
-
return (
|
|
31154
|
+
formula: (q) => {
|
|
31155
|
+
var O;
|
|
31156
|
+
return (O = c.value) == null ? void 0 : O.open(q);
|
|
31151
31157
|
},
|
|
31152
31158
|
aiRewrite: () => {
|
|
31153
|
-
var
|
|
31154
|
-
return (
|
|
31159
|
+
var q;
|
|
31160
|
+
return (q = p.value) == null ? void 0 : q.open();
|
|
31155
31161
|
},
|
|
31156
31162
|
upload: () => {
|
|
31157
|
-
var
|
|
31158
|
-
return (
|
|
31163
|
+
var q;
|
|
31164
|
+
return (q = a.value) == null ? void 0 : q.open();
|
|
31159
31165
|
}
|
|
31160
31166
|
}
|
|
31161
31167
|
}), { visibleList: k, hiddenList: G } = sa({
|
|
31162
31168
|
list: f,
|
|
31163
31169
|
toolbarRef: t,
|
|
31164
31170
|
measureRef: o
|
|
31165
|
-
}), M = (
|
|
31166
|
-
if (!
|
|
31167
|
-
const X =
|
|
31168
|
-
X && l.value.set(
|
|
31171
|
+
}), M = (q, O) => {
|
|
31172
|
+
if (!q || q instanceof Element) return;
|
|
31173
|
+
const X = q.getVirtualRef();
|
|
31174
|
+
X && l.value.set(O, X);
|
|
31169
31175
|
}, V = /* @__PURE__ */ new Set([
|
|
31170
31176
|
P.customStop.type,
|
|
31171
31177
|
P.language.type,
|
|
31172
31178
|
P.number.type
|
|
31173
|
-
]),
|
|
31174
|
-
var
|
|
31175
|
-
|
|
31176
|
-
},
|
|
31177
|
-
q
|
|
31178
|
-
},
|
|
31179
|
-
|
|
31180
|
-
},
|
|
31181
|
-
I(
|
|
31182
|
-
},
|
|
31183
|
-
w(
|
|
31184
|
-
},
|
|
31185
|
-
return cn(G, (
|
|
31186
|
-
|
|
31187
|
-
}), (
|
|
31179
|
+
]), S = (q) => {
|
|
31180
|
+
var O;
|
|
31181
|
+
b(q) || ((O = q.onClick) == null || O.call(q), s.value = q.tool.type);
|
|
31182
|
+
}, m = (q) => {
|
|
31183
|
+
S(q), V.has(q.tool.type) || (h.value = !1);
|
|
31184
|
+
}, C = (q) => {
|
|
31185
|
+
A(q), r.customStop = !1;
|
|
31186
|
+
}, W = (q) => {
|
|
31187
|
+
I(q) && (r.language = !1);
|
|
31188
|
+
}, j = (q) => {
|
|
31189
|
+
w(q), r.number = !1;
|
|
31190
|
+
}, x = (q) => s.value !== q || !r[q];
|
|
31191
|
+
return cn(G, (q) => {
|
|
31192
|
+
q.length || (h.value = !1);
|
|
31193
|
+
}), (q, O) => (Y(), L("div", {
|
|
31188
31194
|
ref_key: "toolbarRef",
|
|
31189
31195
|
ref: t,
|
|
31190
31196
|
class: "lsh-toolbar-box"
|
|
31191
31197
|
}, [
|
|
31192
|
-
(Y(!0), L(en, null, gn(
|
|
31193
|
-
key:
|
|
31198
|
+
(Y(!0), L(en, null, gn(z(k), (Z) => (Y(), _(yi, {
|
|
31199
|
+
key: Z.tool.label,
|
|
31194
31200
|
ref_for: !0,
|
|
31195
|
-
ref: (X) => M(X,
|
|
31201
|
+
ref: (X) => M(X, Z.tool.type),
|
|
31196
31202
|
class: "lsh-tool-btn",
|
|
31197
|
-
item:
|
|
31198
|
-
plain:
|
|
31199
|
-
disabled: b
|
|
31200
|
-
onClick: (X) =>
|
|
31203
|
+
item: Z,
|
|
31204
|
+
plain: x(Z.tool.type),
|
|
31205
|
+
disabled: z(b)(Z),
|
|
31206
|
+
onClick: (X) => S(Z)
|
|
31201
31207
|
}, null, 8, ["item", "plain", "disabled", "onClick"]))), 128)),
|
|
31202
|
-
|
|
31208
|
+
z(G).length ? (Y(), _(z(_e), {
|
|
31203
31209
|
key: 0,
|
|
31204
31210
|
visible: h.value,
|
|
31205
|
-
"onUpdate:visible":
|
|
31211
|
+
"onUpdate:visible": O[0] || (O[0] = (Z) => h.value = Z),
|
|
31206
31212
|
"show-arrow": !1,
|
|
31207
31213
|
"popper-class": "lsh-popper lsh-more-popper",
|
|
31208
31214
|
placement: "top-end",
|
|
31209
31215
|
transition: "popper-slide"
|
|
31210
31216
|
}, {
|
|
31211
31217
|
reference: N(() => [
|
|
31212
|
-
H(
|
|
31218
|
+
H(z(on), {
|
|
31213
31219
|
class: "lsh-tool-btn",
|
|
31214
31220
|
plain: !h.value
|
|
31215
31221
|
}, {
|
|
31216
31222
|
icon: N(() => [
|
|
31217
|
-
H(
|
|
31223
|
+
H(z(rn), {
|
|
31218
31224
|
name: "editor-more",
|
|
31219
31225
|
size: "18"
|
|
31220
31226
|
})
|
|
31221
31227
|
]),
|
|
31222
31228
|
default: N(() => [
|
|
31223
|
-
|
|
31229
|
+
O[4] || (O[4] = v("span", null, "更多", -1))
|
|
31224
31230
|
]),
|
|
31225
31231
|
_: 1
|
|
31226
31232
|
}, 8, ["plain"])
|
|
31227
31233
|
]),
|
|
31228
31234
|
default: N(() => [
|
|
31229
|
-
|
|
31230
|
-
(Y(!0), L(en, null, gn(
|
|
31231
|
-
key:
|
|
31235
|
+
v("div", nc, [
|
|
31236
|
+
(Y(!0), L(en, null, gn(z(G), (Z) => (Y(), _(yi, {
|
|
31237
|
+
key: Z.tool.label,
|
|
31232
31238
|
ref_for: !0,
|
|
31233
|
-
ref: (X) => M(X,
|
|
31239
|
+
ref: (X) => M(X, Z.tool.type),
|
|
31234
31240
|
class: "lsh-more-item",
|
|
31235
|
-
item:
|
|
31236
|
-
plain:
|
|
31237
|
-
disabled: b
|
|
31238
|
-
onClick: (X) =>
|
|
31241
|
+
item: Z,
|
|
31242
|
+
plain: x(Z.tool.type),
|
|
31243
|
+
disabled: z(b)(Z),
|
|
31244
|
+
onClick: (X) => m(Z)
|
|
31239
31245
|
}, null, 8, ["item", "plain", "disabled", "onClick"]))), 128))
|
|
31240
31246
|
])
|
|
31241
31247
|
]),
|
|
31242
31248
|
_: 1
|
|
31243
31249
|
}, 8, ["visible"])) : yn("", !0),
|
|
31244
|
-
|
|
31250
|
+
v("div", {
|
|
31245
31251
|
ref_key: "measureRef",
|
|
31246
31252
|
ref: o,
|
|
31247
31253
|
class: "lsh-toolbar-measure"
|
|
31248
31254
|
}, [
|
|
31249
|
-
(Y(!0), L(en, null, gn(
|
|
31250
|
-
key:
|
|
31255
|
+
(Y(!0), L(en, null, gn(z(f), (Z) => (Y(), _(yi, {
|
|
31256
|
+
key: Z.tool.label,
|
|
31251
31257
|
class: "lsh-tool-btn",
|
|
31252
|
-
item:
|
|
31258
|
+
item: Z
|
|
31253
31259
|
}, null, 8, ["item"]))), 128)),
|
|
31254
|
-
H(
|
|
31260
|
+
H(z(on), { class: "lsh-tool-btn" }, {
|
|
31255
31261
|
icon: N(() => [
|
|
31256
|
-
H(
|
|
31262
|
+
H(z(rn), {
|
|
31257
31263
|
name: "editor-more",
|
|
31258
31264
|
size: "18"
|
|
31259
31265
|
})
|
|
31260
31266
|
]),
|
|
31261
31267
|
default: N(() => [
|
|
31262
|
-
|
|
31268
|
+
O[5] || (O[5] = v("span", null, "更多", -1))
|
|
31263
31269
|
]),
|
|
31264
31270
|
_: 1
|
|
31265
31271
|
})
|
|
31266
31272
|
], 512),
|
|
31267
31273
|
H(Eg, {
|
|
31268
31274
|
visible: r.customStop,
|
|
31269
|
-
"onUpdate:visible":
|
|
31270
|
-
"virtual-ref": l.value.get(
|
|
31271
|
-
onSelect:
|
|
31275
|
+
"onUpdate:visible": O[1] || (O[1] = (Z) => r.customStop = Z),
|
|
31276
|
+
"virtual-ref": l.value.get(z(P).customStop.type),
|
|
31277
|
+
onSelect: C
|
|
31272
31278
|
}, null, 8, ["visible", "virtual-ref"]),
|
|
31273
31279
|
H(Lg, {
|
|
31274
31280
|
visible: r.language,
|
|
31275
|
-
"onUpdate:visible":
|
|
31276
|
-
"virtual-ref": l.value.get(
|
|
31277
|
-
options:
|
|
31278
|
-
onSelect:
|
|
31281
|
+
"onUpdate:visible": O[2] || (O[2] = (Z) => r.language = Z),
|
|
31282
|
+
"virtual-ref": l.value.get(z(P).language.type),
|
|
31283
|
+
options: z(d),
|
|
31284
|
+
onSelect: W
|
|
31279
31285
|
}, null, 8, ["visible", "virtual-ref", "options"]),
|
|
31280
31286
|
H(Fg, {
|
|
31281
31287
|
visible: r.number,
|
|
31282
|
-
"onUpdate:visible":
|
|
31283
|
-
"virtual-ref": l.value.get(
|
|
31284
|
-
options:
|
|
31285
|
-
onSelect:
|
|
31288
|
+
"onUpdate:visible": O[3] || (O[3] = (Z) => r.number = Z),
|
|
31289
|
+
"virtual-ref": l.value.get(z(P).number.type),
|
|
31290
|
+
options: z(y),
|
|
31291
|
+
onSelect: j
|
|
31286
31292
|
}, null, 8, ["visible", "virtual-ref", "options"]),
|
|
31287
31293
|
H(Xg, {
|
|
31288
31294
|
ref_key: "replaceTextModalRef",
|
|
31289
31295
|
ref: u,
|
|
31290
|
-
onConfirm:
|
|
31296
|
+
onConfirm: z(w)
|
|
31291
31297
|
}, null, 8, ["onConfirm"]),
|
|
31292
31298
|
H(Kg, {
|
|
31293
31299
|
ref_key: "markPinyinModalRef",
|
|
31294
31300
|
ref: g,
|
|
31295
|
-
onConfirm:
|
|
31301
|
+
onConfirm: z(J)
|
|
31296
31302
|
}, null, 8, ["onConfirm"]),
|
|
31297
31303
|
H($g, {
|
|
31298
31304
|
ref_key: "uploadModalRef",
|
|
31299
31305
|
ref: a,
|
|
31300
|
-
onConfirm:
|
|
31306
|
+
onConfirm: z(i)
|
|
31301
31307
|
}, null, 8, ["onConfirm"]),
|
|
31302
31308
|
H(ya, {
|
|
31303
31309
|
ref_key: "formulaModalRef",
|
|
31304
31310
|
ref: c,
|
|
31305
|
-
onConfirm:
|
|
31311
|
+
onConfirm: z(w)
|
|
31306
31312
|
}, null, 8, ["onConfirm"]),
|
|
31307
31313
|
H(na, {
|
|
31308
31314
|
ref_key: "aiRewriteModalRef",
|
|
31309
|
-
ref:
|
|
31310
|
-
onConfirm:
|
|
31315
|
+
ref: p,
|
|
31316
|
+
onConfirm: z(i)
|
|
31311
31317
|
}, null, 8, ["onConfirm"])
|
|
31312
31318
|
], 512));
|
|
31313
31319
|
}
|
|
@@ -31322,6 +31328,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31322
31328
|
features: { default: () => ({}) },
|
|
31323
31329
|
services: { default: () => ({}) },
|
|
31324
31330
|
getPreviewParams: {},
|
|
31331
|
+
getPlaybackSpeed: {},
|
|
31325
31332
|
showSelectionMenu: { type: Boolean, default: !0 },
|
|
31326
31333
|
showFullscreen: { type: Boolean, default: !0 }
|
|
31327
31334
|
},
|
|
@@ -31337,13 +31344,13 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31337
31344
|
return cn(
|
|
31338
31345
|
() => t.modelValue,
|
|
31339
31346
|
(a) => {
|
|
31340
|
-
var
|
|
31347
|
+
var p;
|
|
31341
31348
|
const c = Pt(a);
|
|
31342
31349
|
if (c === h) {
|
|
31343
31350
|
h = void 0;
|
|
31344
31351
|
return;
|
|
31345
31352
|
}
|
|
31346
|
-
(
|
|
31353
|
+
(p = s.value) == null || p.setContent(c);
|
|
31347
31354
|
}
|
|
31348
31355
|
), n({
|
|
31349
31356
|
clear: () => {
|
|
@@ -31367,10 +31374,10 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31367
31374
|
return (c = s.value) == null ? void 0 : c.replaceText(a);
|
|
31368
31375
|
},
|
|
31369
31376
|
handleChangeVoice: (a, c) => {
|
|
31370
|
-
var
|
|
31371
|
-
return ((
|
|
31377
|
+
var p;
|
|
31378
|
+
return ((p = s.value) == null ? void 0 : p.handleChangeVoice(a, c)) ?? Promise.resolve(!1);
|
|
31372
31379
|
}
|
|
31373
|
-
}), (a, c) => (Y(), _(
|
|
31380
|
+
}), (a, c) => (Y(), _(z(Xu), {
|
|
31374
31381
|
ref_key: "rootRef",
|
|
31375
31382
|
ref: s,
|
|
31376
31383
|
"initial-content": t.modelValue,
|
|
@@ -31381,14 +31388,15 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31381
31388
|
features: t.features,
|
|
31382
31389
|
services: t.services,
|
|
31383
31390
|
"get-preview-params": t.getPreviewParams,
|
|
31391
|
+
"get-playback-speed": t.getPlaybackSpeed,
|
|
31384
31392
|
"show-selection-menu": t.showSelectionMenu,
|
|
31385
31393
|
onChange: r,
|
|
31386
31394
|
onReady: u
|
|
31387
31395
|
}, {
|
|
31388
31396
|
default: N(() => {
|
|
31389
|
-
var
|
|
31397
|
+
var p, f, d, y, b, A, I;
|
|
31390
31398
|
return [
|
|
31391
|
-
|
|
31399
|
+
v("div", {
|
|
31392
31400
|
class: bn([
|
|
31393
31401
|
"tts-rich-text-editor lsh-tts-box",
|
|
31394
31402
|
{
|
|
@@ -31397,10 +31405,10 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31397
31405
|
}
|
|
31398
31406
|
])
|
|
31399
31407
|
}, [
|
|
31400
|
-
|
|
31401
|
-
|
|
31408
|
+
v("div", tc, [
|
|
31409
|
+
v("div", oc, [
|
|
31402
31410
|
wn(a.$slots, "toolbar-before", {
|
|
31403
|
-
editor: (
|
|
31411
|
+
editor: (p = s.value) == null ? void 0 : p.editor
|
|
31404
31412
|
}, void 0, !0),
|
|
31405
31413
|
H(ic),
|
|
31406
31414
|
wn(a.$slots, "toolbar-after", {
|
|
@@ -31413,26 +31421,26 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31413
31421
|
title: l.value ? "退出全屏" : "全屏编辑",
|
|
31414
31422
|
onClick: c[0] || (c[0] = (w) => l.value = !l.value)
|
|
31415
31423
|
}, [
|
|
31416
|
-
H(
|
|
31424
|
+
H(z(rn), {
|
|
31417
31425
|
name: `editor-fullscreen-${l.value ? "shrink" : "expand"}`,
|
|
31418
31426
|
size: "20"
|
|
31419
31427
|
}, null, 8, ["name"])
|
|
31420
31428
|
], 8, lc)) : yn("", !0)
|
|
31421
31429
|
]),
|
|
31422
|
-
|
|
31423
|
-
H(
|
|
31430
|
+
v("div", sc, [
|
|
31431
|
+
H(z(vr), { class: "editor-shell" }),
|
|
31424
31432
|
wn(a.$slots, "editor-after", {
|
|
31425
|
-
editor: (
|
|
31433
|
+
editor: (d = s.value) == null ? void 0 : d.editor
|
|
31426
31434
|
}, void 0, !0)
|
|
31427
31435
|
]),
|
|
31428
|
-
|
|
31436
|
+
v("div", hc, [
|
|
31429
31437
|
wn(a.$slots, "footer-before", {
|
|
31430
31438
|
editor: (y = s.value) == null ? void 0 : y.editor,
|
|
31431
|
-
textLength: ((
|
|
31439
|
+
textLength: ((b = s.value) == null ? void 0 : b.textLength) ?? 0
|
|
31432
31440
|
}, void 0, !0),
|
|
31433
31441
|
H(la),
|
|
31434
31442
|
wn(a.$slots, "footer-after", {
|
|
31435
|
-
editor: (
|
|
31443
|
+
editor: (A = s.value) == null ? void 0 : A.editor,
|
|
31436
31444
|
textLength: ((I = s.value) == null ? void 0 : I.textLength) ?? 0
|
|
31437
31445
|
}, void 0, !0)
|
|
31438
31446
|
])
|
|
@@ -31441,9 +31449,9 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31441
31449
|
];
|
|
31442
31450
|
}),
|
|
31443
31451
|
_: 3
|
|
31444
|
-
}, 8, ["initial-content", "text-limit", "voice-version", "placeholder", "disabled", "features", "services", "get-preview-params", "show-selection-menu"]));
|
|
31452
|
+
}, 8, ["initial-content", "text-limit", "voice-version", "placeholder", "disabled", "features", "services", "get-preview-params", "get-playback-speed", "show-selection-menu"]));
|
|
31445
31453
|
}
|
|
31446
|
-
}), yc = /* @__PURE__ */ sn(rc, [["__scopeId", "data-v-
|
|
31454
|
+
}), yc = /* @__PURE__ */ sn(rc, [["__scopeId", "data-v-3ed36f16"]]);
|
|
31447
31455
|
export {
|
|
31448
31456
|
ce as CustomTagName,
|
|
31449
31457
|
on as CxButton,
|