@ddict/popup 1.0.10 → 1.0.11
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/README.md +5 -1
- package/dist/popup.css +1 -1
- package/dist/popup.es.js +115 -116
- package/dist/popup.umd.js +9 -9
- package/package.json +3 -3
package/dist/popup.es.js
CHANGED
|
@@ -54,18 +54,18 @@ function ye(e, o, t) {
|
|
|
54
54
|
let u;
|
|
55
55
|
t.key && ((r = t.debug) != null && r.call(t)) && (u = Date.now());
|
|
56
56
|
const v = e();
|
|
57
|
-
if (!(v.length !== n.length || v.some((m,
|
|
57
|
+
if (!(v.length !== n.length || v.some((m, h) => n[h] !== m)))
|
|
58
58
|
return l;
|
|
59
59
|
n = v;
|
|
60
|
-
let
|
|
61
|
-
if (t.key && ((i = t.debug) != null && i.call(t)) && (
|
|
62
|
-
const m = Math.round((Date.now() - u) * 100) / 100,
|
|
60
|
+
let p;
|
|
61
|
+
if (t.key && ((i = t.debug) != null && i.call(t)) && (p = Date.now()), l = o(...v), t.key && ((s = t.debug) != null && s.call(t))) {
|
|
62
|
+
const m = Math.round((Date.now() - u) * 100) / 100, h = Math.round((Date.now() - p) * 100) / 100, $ = h / 16, N = (L, I) => {
|
|
63
63
|
for (L = String(L); L.length < I; )
|
|
64
64
|
L = " " + L;
|
|
65
65
|
return L;
|
|
66
66
|
};
|
|
67
67
|
console.info(
|
|
68
|
-
`%c⏱ ${N(
|
|
68
|
+
`%c⏱ ${N(h, 5)} /${N(m, 5)} ms`,
|
|
69
69
|
`
|
|
70
70
|
font-size: .6rem;
|
|
71
71
|
font-weight: bold;
|
|
@@ -295,8 +295,8 @@ class Bn {
|
|
|
295
295
|
this.pendingMeasuredCacheIndexes = [];
|
|
296
296
|
const v = this.measurementsCache.slice(0, u);
|
|
297
297
|
for (let c = u; c < t; c++) {
|
|
298
|
-
let
|
|
299
|
-
|
|
298
|
+
let p = (a = this.measurementsCache[c]) == null ? void 0 : a.measureElement;
|
|
299
|
+
p || (p = (A) => {
|
|
300
300
|
const _ = r(c), P = this.elementsCache.get(_);
|
|
301
301
|
if (!A) {
|
|
302
302
|
P && (this.observer.unobserve(P), this.elementsCache.delete(_));
|
|
@@ -307,7 +307,7 @@ class Bn {
|
|
|
307
307
|
this.options.measureElement(A, void 0, this)
|
|
308
308
|
);
|
|
309
309
|
});
|
|
310
|
-
const m = r(c),
|
|
310
|
+
const m = r(c), h = this.options.lanes === 1 ? v[c - 1] : this.getFurthestMeasurement(v, c), $ = h ? h.end + this.options.gap : n + l, N = s.get(m), L = typeof N == "number" ? N : this.options.estimateSize(c), I = $ + L, R = h ? h.lane : c % this.options.lanes;
|
|
311
311
|
v[c] = {
|
|
312
312
|
index: c,
|
|
313
313
|
start: $,
|
|
@@ -315,7 +315,7 @@ class Bn {
|
|
|
315
315
|
end: I,
|
|
316
316
|
key: m,
|
|
317
317
|
lane: R,
|
|
318
|
-
measureElement:
|
|
318
|
+
measureElement: p
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
321
|
return this.measurementsCache = v, v;
|
|
@@ -773,20 +773,20 @@ function Ge({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
|
773
773
|
var r, i;
|
|
774
774
|
let { as: s, ...a } = je(e, ["unmount", "static"]), u = (r = t.default) == null ? void 0 : r.call(t, n), v = {};
|
|
775
775
|
if (n) {
|
|
776
|
-
let c = !1,
|
|
777
|
-
for (let [m,
|
|
778
|
-
c && (v["data-headlessui-state"] =
|
|
776
|
+
let c = !1, p = [];
|
|
777
|
+
for (let [m, h] of Object.entries(n)) typeof h == "boolean" && (c = !0), h === !0 && p.push(m);
|
|
778
|
+
c && (v["data-headlessui-state"] = p.join(" "));
|
|
779
779
|
}
|
|
780
780
|
if (s === "template") {
|
|
781
781
|
if (u = kt(u ?? []), Object.keys(a).length > 0 || Object.keys(o).length > 0) {
|
|
782
|
-
let [c, ...
|
|
783
|
-
if (!mo(c) ||
|
|
782
|
+
let [c, ...p] = u ?? [];
|
|
783
|
+
if (!mo(c) || p.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${l} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(a).concat(Object.keys(o)).map(($) => $.trim()).filter(($, N, L) => L.indexOf($) === N).sort(($, N) => $.localeCompare(N)).map(($) => ` - ${$}`).join(`
|
|
784
784
|
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map(($) => ` - ${$}`).join(`
|
|
785
785
|
`)].join(`
|
|
786
786
|
`));
|
|
787
|
-
let m = Rt((i = c.props) != null ? i : {}, a, v),
|
|
788
|
-
for (let $ in m) $.startsWith("on") && (
|
|
789
|
-
return
|
|
787
|
+
let m = Rt((i = c.props) != null ? i : {}, a, v), h = Et(c, m, !0);
|
|
788
|
+
for (let $ in m) $.startsWith("on") && (h.props || (h.props = {}), h.props[$] = m[$]);
|
|
789
|
+
return h;
|
|
790
790
|
}
|
|
791
791
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
792
792
|
}
|
|
@@ -935,8 +935,8 @@ let zt = Symbol("VirtualContext"), Oo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
935
935
|
}
|
|
936
936
|
} }, l.value.getVirtualItems().map((s) => Et(o.default({ option: t.virtual.value.options[s.index], open: t.comboboxState.value === 0 })[0], { key: `${i.value}-${s.index}`, "data-index": s.index, "aria-setsize": t.virtual.value.options.length, "aria-posinset": s.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${s.start}px)`, overflowAnchor: "none" } })))];
|
|
937
937
|
} }), $o = ae({ name: "Combobox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], nullable: !0, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, nullable: { type: Boolean, default: !1 }, multiple: { type: [Boolean], default: !1 }, immediate: { type: [Boolean], default: !1 }, virtual: { type: Object, default: null } }, inheritAttrs: !1, setup(e, { slots: o, attrs: t, emit: n }) {
|
|
938
|
-
let l = E(1), r = E(null), i = E(null), s = E(null), a = E(null), u = E({ static: !1, hold: !1 }), v = E([]), c = E(null),
|
|
939
|
-
function
|
|
938
|
+
let l = E(1), r = E(null), i = E(null), s = E(null), a = E(null), u = E({ static: !1, hold: !1 }), v = E([]), c = E(null), p = E(2), m = E(!1);
|
|
939
|
+
function h(d = (f) => f) {
|
|
940
940
|
let f = c.value !== null ? v.value[c.value] : null, x = d(v.value.slice()), S = x.length > 0 && x[0].dataRef.order.value !== null ? x.sort((D, G) => D.dataRef.order.value - G.dataRef.order.value) : so(x, (D) => M(D.dataRef.domRef)), k = f ? S.indexOf(f) : null;
|
|
941
941
|
return k === -1 && (k = null), { options: S, activeOptionIndex: k };
|
|
942
942
|
}
|
|
@@ -980,7 +980,7 @@ let zt = Symbol("VirtualContext"), Oo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
980
980
|
if (d !== -1) return d;
|
|
981
981
|
}
|
|
982
982
|
return c.value;
|
|
983
|
-
}), activationTrigger:
|
|
983
|
+
}), activationTrigger: p, optionsPropsRef: u, closeCombobox() {
|
|
984
984
|
m.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, c.value = null);
|
|
985
985
|
}, openCombobox() {
|
|
986
986
|
if (m.value = !0, !e.disabled && l.value !== 0) {
|
|
@@ -991,7 +991,7 @@ let zt = Symbol("VirtualContext"), Oo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
991
991
|
l.value = 0;
|
|
992
992
|
}
|
|
993
993
|
}, setActivationTrigger(d) {
|
|
994
|
-
|
|
994
|
+
p.value = d;
|
|
995
995
|
}, goToOption(d, f, x) {
|
|
996
996
|
m.value = !1, A !== null && cancelAnimationFrame(A), A = requestAnimationFrame(() => {
|
|
997
997
|
if (e.disabled || a.value && !u.value.static && l.value === 1) return;
|
|
@@ -1004,16 +1004,16 @@ let zt = Symbol("VirtualContext"), Oo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1004
1004
|
})) != null ? G : null;
|
|
1005
1005
|
}, resolveDisabled: (D) => b.virtual.value.disabled(D), resolveId() {
|
|
1006
1006
|
throw new Error("Function not implemented.");
|
|
1007
|
-
} }),
|
|
1007
|
+
} }), p.value = x ?? 2;
|
|
1008
1008
|
return;
|
|
1009
1009
|
}
|
|
1010
|
-
let S =
|
|
1010
|
+
let S = h();
|
|
1011
1011
|
if (S.activeOptionIndex === null) {
|
|
1012
1012
|
let D = S.options.findIndex((G) => !G.dataRef.disabled);
|
|
1013
1013
|
D !== -1 && (S.activeOptionIndex = D);
|
|
1014
1014
|
}
|
|
1015
1015
|
let k = d === z.Specific ? f : pt({ focus: d }, { resolveItems: () => S.options, resolveActiveIndex: () => S.activeOptionIndex, resolveId: (D) => D.id, resolveDisabled: (D) => D.dataRef.disabled });
|
|
1016
|
-
c.value = k,
|
|
1016
|
+
c.value = k, p.value = x ?? 2, v.value = S.options;
|
|
1017
1017
|
});
|
|
1018
1018
|
}, selectOption(d) {
|
|
1019
1019
|
let f = v.value.find((S) => S.id === d);
|
|
@@ -1036,9 +1036,9 @@ let zt = Symbol("VirtualContext"), Oo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1036
1036
|
return;
|
|
1037
1037
|
}
|
|
1038
1038
|
_ && cancelAnimationFrame(_);
|
|
1039
|
-
let S =
|
|
1040
|
-
c.value === null && b.isSelected(f.value.value) && (S.activeOptionIndex = S.options.indexOf(x)), v.value = S.options, c.value = S.activeOptionIndex,
|
|
1041
|
-
let k =
|
|
1039
|
+
let S = h((k) => (k.push(x), k));
|
|
1040
|
+
c.value === null && b.isSelected(f.value.value) && (S.activeOptionIndex = S.options.indexOf(x)), v.value = S.options, c.value = S.activeOptionIndex, p.value = 2, S.options.some((k) => !M(k.dataRef.domRef)) && (_ = requestAnimationFrame(() => {
|
|
1041
|
+
let k = h();
|
|
1042
1042
|
v.value = k.options, c.value = k.activeOptionIndex;
|
|
1043
1043
|
}));
|
|
1044
1044
|
}, unregisterOption(d, f) {
|
|
@@ -1046,11 +1046,11 @@ let zt = Symbol("VirtualContext"), Oo = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1046
1046
|
v.value = v.value.filter((S) => S.id !== d);
|
|
1047
1047
|
return;
|
|
1048
1048
|
}
|
|
1049
|
-
let x =
|
|
1049
|
+
let x = h((S) => {
|
|
1050
1050
|
let k = S.findIndex((D) => D.id === d);
|
|
1051
1051
|
return k !== -1 && S.splice(k, 1), S;
|
|
1052
1052
|
});
|
|
1053
|
-
v.value = x.options, c.value = x.activeOptionIndex,
|
|
1053
|
+
v.value = x.options, c.value = x.activeOptionIndex, p.value = 2;
|
|
1054
1054
|
}, isSelected(d) {
|
|
1055
1055
|
return le($.value, { 0: () => b.compare(K(b.value.value), K(d)), 1: () => K(b.value.value).some((f) => b.compare(K(f), K(d))) });
|
|
1056
1056
|
}, isActive(d) {
|
|
@@ -1128,8 +1128,8 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1128
1128
|
let u = co(y(() => ({ as: e.as, type: o.type })), i.buttonRef);
|
|
1129
1129
|
return () => {
|
|
1130
1130
|
var v, c;
|
|
1131
|
-
let
|
|
1132
|
-
return pe({ ourProps:
|
|
1131
|
+
let p = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...m } = e, h = { ref: i.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (v = M(i.optionsRef)) == null ? void 0 : v.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(c = M(i.labelRef)) == null ? void 0 : c.id, r].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick: s };
|
|
1132
|
+
return pe({ ourProps: h, theirProps: m, slot: p, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1133
1133
|
};
|
|
1134
1134
|
} }), Lo = ae({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (e) => !0 }, setup(e, { emit: o, attrs: t, slots: n, expose: l }) {
|
|
1135
1135
|
var r;
|
|
@@ -1165,13 +1165,13 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1165
1165
|
}
|
|
1166
1166
|
});
|
|
1167
1167
|
});
|
|
1168
|
-
let
|
|
1168
|
+
let p = E(!1);
|
|
1169
1169
|
function m() {
|
|
1170
|
-
|
|
1170
|
+
p.value = !0;
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function h() {
|
|
1173
1173
|
De().nextFrame(() => {
|
|
1174
|
-
|
|
1174
|
+
p.value = !1;
|
|
1175
1175
|
});
|
|
1176
1176
|
}
|
|
1177
1177
|
let $ = qn();
|
|
@@ -1180,7 +1180,7 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1180
1180
|
u.value = !1;
|
|
1181
1181
|
}), _.key) {
|
|
1182
1182
|
case Z.Enter:
|
|
1183
|
-
if (u.value = !1, s.comboboxState.value !== 0 ||
|
|
1183
|
+
if (u.value = !1, s.comboboxState.value !== 0 || p.value) return;
|
|
1184
1184
|
if (_.preventDefault(), _.stopPropagation(), s.activeOptionIndex.value === null) {
|
|
1185
1185
|
s.closeCombobox();
|
|
1186
1186
|
return;
|
|
@@ -1236,7 +1236,7 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1236
1236
|
});
|
|
1237
1237
|
return () => {
|
|
1238
1238
|
var _, P, C, b, V, d, f;
|
|
1239
|
-
let x = { open: s.comboboxState.value === 0 }, { displayValue: S, onChange: k, ...D } = e, G = { "aria-controls": (_ = s.optionsRef.value) == null ? void 0 : _.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (P = s.options.value.find((q) => !s.virtual.value.disabled(q.dataRef.value) && s.compare(q.dataRef.value, s.virtual.value.options[s.activeOptionIndex.value]))) == null ? void 0 : P.id : (C = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : C.id, "aria-labelledby": (d = (b = M(s.labelRef)) == null ? void 0 : b.id) != null ? d : (V = M(s.buttonRef)) == null ? void 0 : V.id, "aria-autocomplete": "list", id: i, onCompositionstart: m, onCompositionend:
|
|
1239
|
+
let x = { open: s.comboboxState.value === 0 }, { displayValue: S, onChange: k, ...D } = e, G = { "aria-controls": (_ = s.optionsRef.value) == null ? void 0 : _.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (P = s.options.value.find((q) => !s.virtual.value.disabled(q.dataRef.value) && s.compare(q.dataRef.value, s.virtual.value.options[s.activeOptionIndex.value]))) == null ? void 0 : P.id : (C = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : C.id, "aria-labelledby": (d = (b = M(s.labelRef)) == null ? void 0 : b.id) != null ? d : (V = M(s.buttonRef)) == null ? void 0 : V.id, "aria-autocomplete": "list", id: i, onCompositionstart: m, onCompositionend: h, onKeydown: N, onInput: L, onFocus: R, onBlur: I, role: "combobox", type: (f = t.type) != null ? f : "text", tabIndex: 0, ref: s.inputRef, defaultValue: A.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
|
|
1240
1240
|
return pe({ ourProps: G, theirProps: D, slot: x, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1241
1241
|
};
|
|
1242
1242
|
} }), To = ae({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, hold: { type: [Boolean], default: !1 } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
@@ -1257,8 +1257,8 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1257
1257
|
}
|
|
1258
1258
|
return () => {
|
|
1259
1259
|
var u, v, c;
|
|
1260
|
-
let
|
|
1261
|
-
return pe({ ourProps: m, theirProps:
|
|
1260
|
+
let p = { open: l.comboboxState.value === 0 }, m = { "aria-labelledby": (c = (u = M(l.labelRef)) == null ? void 0 : u.id) != null ? c : (v = M(l.buttonRef)) == null ? void 0 : v.id, id: r, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: a }, h = je(e, ["hold"]);
|
|
1261
|
+
return pe({ ourProps: m, theirProps: h, slot: p, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Se(Oo, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: s.value, name: "ComboboxOptions" });
|
|
1262
1262
|
};
|
|
1263
1263
|
} }), Vo = ae({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, order: { type: [Number], default: null } }, setup(e, { slots: o, attrs: t, expose: n }) {
|
|
1264
1264
|
let l = he("ComboboxOption"), r = `headlessui-combobox-option-${Te()}`, i = E(null), s = y(() => e.disabled);
|
|
@@ -1276,7 +1276,7 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1276
1276
|
return (R = (I = M(i)) == null ? void 0 : I.scrollIntoView) == null ? void 0 : R.call(I, { block: "nearest" });
|
|
1277
1277
|
}));
|
|
1278
1278
|
});
|
|
1279
|
-
function
|
|
1279
|
+
function p(I) {
|
|
1280
1280
|
I.preventDefault(), I.button === At.Left && (s.value || (l.selectOption(r), Mt() || requestAnimationFrame(() => {
|
|
1281
1281
|
var R;
|
|
1282
1282
|
return (R = M(l.inputRef)) == null ? void 0 : R.focus({ preventScroll: !0 });
|
|
@@ -1288,22 +1288,22 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1288
1288
|
let R = l.calculateIndex(e.value);
|
|
1289
1289
|
l.goToOption(z.Specific, R);
|
|
1290
1290
|
}
|
|
1291
|
-
let
|
|
1291
|
+
let h = fo();
|
|
1292
1292
|
function $(I) {
|
|
1293
|
-
|
|
1293
|
+
h.update(I);
|
|
1294
1294
|
}
|
|
1295
1295
|
function N(I) {
|
|
1296
1296
|
var R;
|
|
1297
|
-
if (!
|
|
1297
|
+
if (!h.wasMoved(I) || e.disabled || (R = l.virtual.value) != null && R.disabled(e.value) || a.value) return;
|
|
1298
1298
|
let A = l.calculateIndex(e.value);
|
|
1299
1299
|
l.goToOption(z.Specific, A, 0);
|
|
1300
1300
|
}
|
|
1301
1301
|
function L(I) {
|
|
1302
1302
|
var R;
|
|
1303
|
-
|
|
1303
|
+
h.wasMoved(I) && (e.disabled || (R = l.virtual.value) != null && R.disabled(e.value) || a.value && (l.optionsPropsRef.value.hold || l.goToOption(z.Nothing)));
|
|
1304
1304
|
}
|
|
1305
1305
|
return () => {
|
|
1306
|
-
let { disabled: I } = e, R = { active: a.value, selected: u.value, disabled: I }, A = { id: r, ref: i, role: "option", tabIndex: I === !0 ? void 0 : -1, "aria-disabled": I === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown:
|
|
1306
|
+
let { disabled: I } = e, R = { active: a.value, selected: u.value, disabled: I }, A = { id: r, ref: i, role: "option", tabIndex: I === !0 ? void 0 : -1, "aria-disabled": I === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: p, onFocus: m, onPointerenter: $, onMouseenter: $, onPointermove: N, onMousemove: N, onPointerleave: L, onMouseleave: L }, _ = je(e, ["order", "value"]);
|
|
1307
1307
|
return pe({ ourProps: A, theirProps: _, slot: R, attrs: t, slots: o, name: "ComboboxOption" });
|
|
1308
1308
|
};
|
|
1309
1309
|
} });
|
|
@@ -1403,7 +1403,7 @@ const ht = {
|
|
|
1403
1403
|
key: u,
|
|
1404
1404
|
value: u
|
|
1405
1405
|
}, {
|
|
1406
|
-
default: Ve(({ active: c, selected:
|
|
1406
|
+
default: Ve(({ active: c, selected: p }) => [
|
|
1407
1407
|
g("li", {
|
|
1408
1408
|
class: _e([
|
|
1409
1409
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
@@ -1411,7 +1411,7 @@ const ht = {
|
|
|
1411
1411
|
])
|
|
1412
1412
|
}, [
|
|
1413
1413
|
g("span", {
|
|
1414
|
-
class: _e(["block truncate",
|
|
1414
|
+
class: _e(["block truncate", p && "font-semibold"])
|
|
1415
1415
|
}, ee(v), 3)
|
|
1416
1416
|
], 2)
|
|
1417
1417
|
]),
|
|
@@ -2177,10 +2177,10 @@ function _t(e, o, t, n) {
|
|
|
2177
2177
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2178
2178
|
at(E(l ? l() : {}).value)
|
|
2179
2179
|
) : at(t.state.value[e]);
|
|
2180
|
-
return J(v, r, Object.keys(i || {}).reduce((c,
|
|
2180
|
+
return J(v, r, Object.keys(i || {}).reduce((c, p) => (process.env.NODE_ENV !== "production" && p in v && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`), c[p] = de(y(() => {
|
|
2181
2181
|
Ie(t);
|
|
2182
2182
|
const m = t._s.get(e);
|
|
2183
|
-
return i[
|
|
2183
|
+
return i[p].call(m, m);
|
|
2184
2184
|
})), c), {}));
|
|
2185
2185
|
}
|
|
2186
2186
|
return a = Qe(e, u, o, t, n, !0), a;
|
|
@@ -2197,9 +2197,9 @@ function Qe(e, o, t = {}, n, l, r) {
|
|
|
2197
2197
|
process.env.NODE_ENV !== "production" && !Zt && (a.onTrigger = (d) => {
|
|
2198
2198
|
u ? m = d : u == !1 && !C._hotUpdating && (Array.isArray(m) ? m.push(d) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2199
2199
|
});
|
|
2200
|
-
let u, v, c = [],
|
|
2201
|
-
const
|
|
2202
|
-
!r && !
|
|
2200
|
+
let u, v, c = [], p = [], m;
|
|
2201
|
+
const h = n.state.value[e];
|
|
2202
|
+
!r && !h && (process.env.NODE_ENV === "production" || !l) && (n.state.value[e] = {});
|
|
2203
2203
|
const $ = E({});
|
|
2204
2204
|
let N;
|
|
2205
2205
|
function L(d) {
|
|
@@ -2231,7 +2231,7 @@ function Qe(e, o, t = {}, n, l, r) {
|
|
|
2231
2231
|
} : ln
|
|
2232
2232
|
);
|
|
2233
2233
|
function R() {
|
|
2234
|
-
i.stop(), c = [],
|
|
2234
|
+
i.stop(), c = [], p = [], n._s.delete(e);
|
|
2235
2235
|
}
|
|
2236
2236
|
function A(d, f) {
|
|
2237
2237
|
return function() {
|
|
@@ -2243,7 +2243,7 @@ function Qe(e, o, t = {}, n, l, r) {
|
|
|
2243
2243
|
function G(j) {
|
|
2244
2244
|
k.push(j);
|
|
2245
2245
|
}
|
|
2246
|
-
be(
|
|
2246
|
+
be(p, {
|
|
2247
2247
|
args: x,
|
|
2248
2248
|
name: d,
|
|
2249
2249
|
store: C,
|
|
@@ -2268,7 +2268,7 @@ function Qe(e, o, t = {}, n, l, r) {
|
|
|
2268
2268
|
_p: n,
|
|
2269
2269
|
// _s: scope,
|
|
2270
2270
|
$id: e,
|
|
2271
|
-
$onAction: bt.bind(null,
|
|
2271
|
+
$onAction: bt.bind(null, p),
|
|
2272
2272
|
$patch: L,
|
|
2273
2273
|
$reset: I,
|
|
2274
2274
|
$subscribe(d, f = {}) {
|
|
@@ -2297,7 +2297,7 @@ function Qe(e, o, t = {}, n, l, r) {
|
|
|
2297
2297
|
for (const d in V) {
|
|
2298
2298
|
const f = V[d];
|
|
2299
2299
|
if (xe(f) && !Ct(f) || tt(f))
|
|
2300
|
-
process.env.NODE_ENV !== "production" && l ? Me($.value, d, Ze(V, d)) : r || (
|
|
2300
|
+
process.env.NODE_ENV !== "production" && l ? Me($.value, d, Ze(V, d)) : r || (h && p2(f) && (xe(f) ? f.value = h[d] : Ye(f, h[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && _.state.push(d);
|
|
2301
2301
|
else if (typeof f == "function") {
|
|
2302
2302
|
const x = process.env.NODE_ENV !== "production" && l ? f : A(d, f);
|
|
2303
2303
|
V[d] = x, process.env.NODE_ENV !== "production" && (_.actions[d] = f), s.actions[d] = f;
|
|
@@ -2373,7 +2373,7 @@ function Qe(e, o, t = {}, n, l, r) {
|
|
|
2373
2373
|
})));
|
|
2374
2374
|
}), process.env.NODE_ENV !== "production" && C.$state && typeof C.$state == "object" && typeof C.$state.constructor == "function" && !C.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
2375
2375
|
state: () => new MyClass()
|
|
2376
|
-
Found in store "${C.$id}".`),
|
|
2376
|
+
Found in store "${C.$id}".`), h && r && t.hydrate && t.hydrate(C.$state, h), u = !0, v = !0, C;
|
|
2377
2377
|
}
|
|
2378
2378
|
function rt(e, o, t) {
|
|
2379
2379
|
let n, l;
|
|
@@ -2393,14 +2393,14 @@ This will fail in production.`);
|
|
|
2393
2393
|
s = we, s._s.has(n) || (r ? Qe(n, o, l, s) : _t(n, l, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
|
|
2394
2394
|
const v = s._s.get(n);
|
|
2395
2395
|
if (process.env.NODE_ENV !== "production" && a) {
|
|
2396
|
-
const c = "__hot:" + n,
|
|
2397
|
-
a._hotUpdate(
|
|
2396
|
+
const c = "__hot:" + n, p = r ? Qe(c, o, l, s, !0) : _t(c, J({}, l), s, !0);
|
|
2397
|
+
a._hotUpdate(p), delete s.state.value[c], s._s.delete(c);
|
|
2398
2398
|
}
|
|
2399
2399
|
if (process.env.NODE_ENV !== "production" && Be) {
|
|
2400
2400
|
const c = $t();
|
|
2401
2401
|
if (c && c.proxy && // avoid adding stores that are just built for hot module replacement
|
|
2402
2402
|
!a) {
|
|
2403
|
-
const
|
|
2403
|
+
const p = c.proxy, m = "_pStores" in p ? p._pStores : p._pStores = {};
|
|
2404
2404
|
m[n] = v;
|
|
2405
2405
|
}
|
|
2406
2406
|
}
|
|
@@ -2470,7 +2470,7 @@ function _2(e, o) {
|
|
|
2470
2470
|
const x2 = /* @__PURE__ */ ze(b2, [["render", _2]]), y2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.33325%204.66667H3.51125C3.82693%204.6667%204.13239%204.55473%204.37325%204.35067L6.83392%202.26667C6.99592%202.12953%207.19374%202.04156%207.40407%202.01312C7.61441%201.98468%207.82849%202.01696%208.02109%202.10615C8.21369%202.19534%208.37678%202.33772%208.49114%202.51652C8.60551%202.69532%208.66638%202.90309%208.66659%203.11534V12.8847C8.66649%2013.097%208.60565%2013.305%208.49125%2013.4839C8.37685%2013.6628%208.21367%2013.8053%208.02094%2013.8945C7.82822%2013.9837%207.614%2014.0159%207.40356%2013.9874C7.19312%2013.9588%206.99523%2013.8707%206.83325%2013.7333L4.37325%2011.6487C4.13229%2011.4449%203.82685%2011.3331%203.51125%2011.3333H2.33325C2.06804%2011.3333%201.81368%2011.228%201.62615%2011.0404C1.43861%2010.8529%201.33325%2010.5986%201.33325%2010.3333V5.66667C1.33325%205.40145%201.43861%205.1471%201.62615%204.95956C1.81368%204.77203%202.06804%204.66667%202.33325%204.66667ZM11.1779%2011.18C11.5969%2010.763%2011.9294%2010.2674%2012.1562%209.72156C12.3831%209.17572%2012.4999%208.59044%2012.4999%207.99934C12.4999%207.40823%2012.3831%206.82295%2012.1562%206.27711C11.9294%205.73127%2011.5969%205.23564%2011.1779%204.81867C11.1317%204.77098%2011.0765%204.73297%2011.0155%204.70686C10.9544%204.68075%2010.8888%204.66705%2010.8224%204.66657C10.756%204.66609%2010.6902%204.67883%2010.6288%204.70406C10.5674%204.72929%2010.5116%204.76649%2010.4647%204.8135C10.4179%204.86051%2010.3808%204.91639%2010.3558%204.97787C10.3307%205.03935%2010.3181%205.10521%2010.3188%205.17159C10.3195%205.23798%2010.3334%205.30357%2010.3597%205.36453C10.3859%205.42549%2010.4241%205.48061%2010.4719%205.52667C10.7977%205.85079%2011.0562%206.23609%2011.2326%206.66043C11.409%207.08477%2011.4998%207.53979%2011.4998%207.99934C11.4998%208.45888%2011.409%208.9139%2011.2326%209.33824C11.0562%209.76258%2010.7977%2010.1479%2010.4719%2010.472C10.4241%2010.5181%2010.3859%2010.5732%2010.3597%2010.6341C10.3334%2010.6951%2010.3195%2010.7607%2010.3188%2010.8271C10.3181%2010.8935%2010.3307%2010.9593%2010.3558%2011.0208C10.3808%2011.0823%2010.4179%2011.1382%2010.4647%2011.1852C10.5116%2011.2322%2010.5674%2011.2694%2010.6288%2011.2946C10.6902%2011.3198%2010.756%2011.3326%2010.8224%2011.3321C10.8888%2011.3316%2010.9544%2011.3179%2011.0155%2011.2918C11.0765%2011.2657%2011.1317%2011.2277%2011.1779%2011.18ZM12.7113%2013.2127C12.6123%2013.2126%2012.5157%2013.1832%2012.4335%2013.1281C12.3513%2013.0731%2012.2873%2012.9949%2012.2495%2012.9035C12.2118%2012.8121%2012.202%2012.7115%2012.2214%2012.6146C12.2408%2012.5176%2012.2886%2012.4285%2012.3586%2012.3587C12.9317%2011.7866%2013.3865%2011.1071%2013.6967%2010.359C14.0069%209.61101%2014.1666%208.80915%2014.1666%207.99934C14.1666%207.18952%2014.0069%206.38766%2013.6967%205.63963C13.3865%204.8916%2012.9317%204.2121%2012.3586%203.64C12.3122%203.59351%2012.2754%203.53834%2012.2503%203.47764C12.2252%203.41693%2012.2124%203.35188%2012.2124%203.2862C12.2125%203.22052%2012.2255%203.15549%2012.2507%203.09483C12.2759%203.03417%2012.3128%202.97907%2012.3593%202.93267C12.4057%202.88627%2012.4609%202.84948%2012.5216%202.8244C12.5823%202.79932%2012.6474%202.78645%2012.7131%202.78651C12.7787%202.78657%2012.8438%202.79957%2012.9044%202.82476C12.9651%202.84995%2013.0202%202.88685%2013.0666%202.93334C13.7327%203.59825%2014.2612%204.38801%2014.6218%205.25741C14.9824%206.12681%2015.168%207.05879%2015.168%208C15.168%208.94122%2014.9824%209.87319%2014.6218%2010.7426C14.2612%2011.612%2013.7327%2012.4018%2013.0666%2013.0667C13.02%2013.1134%2012.9646%2013.1504%2012.9036%2013.1756C12.8426%2013.2007%2012.7772%2013.2129%2012.7113%2013.2127Z'%20fill='%233B5695'/%3e%3c/svg%3e", w2 = "data:image/svg+xml,%3csvg%20class='swap-on%20fill-current%20h-4%20w-4'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill-rule='evenodd'%20d='M4.5%207.5a3%203%200%200%201%203-3h9a3%203%200%200%201%203%203v9a3%203%200%200%201-3%203h-9a3%203%200%200%201-3-3v-9Z'%20clip-rule='evenodd'%20fill='%238595BE'/%3e%3c/svg%3e";
|
|
2471
2471
|
function E2(e, { volume: o = 1, playbackRate: t = 1, soundEnabled: n = !0, interrupt: l = !1, autoplay: r = !1, onload: i, ...s } = {}) {
|
|
2472
2472
|
const a = E(null), u = E(!1), v = E(null), c = E(null);
|
|
2473
|
-
function
|
|
2473
|
+
function p() {
|
|
2474
2474
|
var L;
|
|
2475
2475
|
typeof i == "function" && i.call(this), v.value = (v.value || ((L = c.value) == null ? void 0 : L.duration()) || 0) * 1e3, r === !0 && (u.value = !0);
|
|
2476
2476
|
}
|
|
@@ -2480,7 +2480,7 @@ function E2(e, { volume: o = 1, playbackRate: t = 1, soundEnabled: n = !0, inter
|
|
|
2480
2480
|
src: T(e),
|
|
2481
2481
|
volume: T(o),
|
|
2482
2482
|
rate: T(t),
|
|
2483
|
-
onload:
|
|
2483
|
+
onload: p,
|
|
2484
2484
|
...s
|
|
2485
2485
|
});
|
|
2486
2486
|
}), F(
|
|
@@ -2490,7 +2490,7 @@ function E2(e, { volume: o = 1, playbackRate: t = 1, soundEnabled: n = !0, inter
|
|
|
2490
2490
|
src: T(e),
|
|
2491
2491
|
volume: T(o),
|
|
2492
2492
|
rate: T(t),
|
|
2493
|
-
onload:
|
|
2493
|
+
onload: p,
|
|
2494
2494
|
...s
|
|
2495
2495
|
}));
|
|
2496
2496
|
}
|
|
@@ -2662,8 +2662,8 @@ const k2 = /* @__PURE__ */ ze(L2, [["render", M2]]), R2 = "data:image/svg+xml,%3
|
|
|
2662
2662
|
src: null,
|
|
2663
2663
|
target: null
|
|
2664
2664
|
}), u = He(), v = y(() => u.getLabel(e.value)), c = y(() => u.getLabel(o.value));
|
|
2665
|
-
function h
|
|
2666
|
-
e.value =
|
|
2665
|
+
function p(h) {
|
|
2666
|
+
e.value = h.src, o.value = h.target, t.value = h.phonetic, n.value = h.result, l.value = h.dictionary, r.value = h.definitions, i.value = h.synonyms, s.value = h.examples, a.value = h.tts;
|
|
2667
2667
|
}
|
|
2668
2668
|
function m() {
|
|
2669
2669
|
e.value = null, o.value = null, t.value = {
|
|
@@ -2686,7 +2686,7 @@ const k2 = /* @__PURE__ */ ze(L2, [["render", M2]]), R2 = "data:image/svg+xml,%3
|
|
|
2686
2686
|
synonyms: i,
|
|
2687
2687
|
examples: s,
|
|
2688
2688
|
tts: a,
|
|
2689
|
-
init:
|
|
2689
|
+
init: p,
|
|
2690
2690
|
reset: m
|
|
2691
2691
|
};
|
|
2692
2692
|
});
|
|
@@ -2756,8 +2756,8 @@ function X2(e, o, t = {}) {
|
|
|
2756
2756
|
(c) => {
|
|
2757
2757
|
if (s(), i.value && n) {
|
|
2758
2758
|
r = new ResizeObserver(o);
|
|
2759
|
-
for (const
|
|
2760
|
-
|
|
2759
|
+
for (const p of c)
|
|
2760
|
+
p && r.observe(p, l);
|
|
2761
2761
|
}
|
|
2762
2762
|
},
|
|
2763
2763
|
{ immediate: !0, flush: "post" }
|
|
@@ -2799,15 +2799,15 @@ const el = {
|
|
|
2799
2799
|
emits: ["change", "clear"],
|
|
2800
2800
|
setup(e, { emit: o }) {
|
|
2801
2801
|
const t = me(), n = e, l = E(n.text), r = y(() => t.src), i = y(() => t.srcLabel), s = y(() => {
|
|
2802
|
-
var
|
|
2803
|
-
return (
|
|
2802
|
+
var h;
|
|
2803
|
+
return (h = t.phonetic) == null ? void 0 : h.src;
|
|
2804
2804
|
}), a = y(() => {
|
|
2805
|
-
var
|
|
2806
|
-
return (
|
|
2805
|
+
var h;
|
|
2806
|
+
return (h = t.tts) == null ? void 0 : h.src;
|
|
2807
2807
|
}), { textarea: u } = rn({ input: l, styleProp: "minHeight" }), v = o, c = J2(() => {
|
|
2808
2808
|
v("change", l.value);
|
|
2809
2809
|
}, g2.INPUT_DEBOUNCE);
|
|
2810
|
-
function
|
|
2810
|
+
function p() {
|
|
2811
2811
|
if (!l.value) {
|
|
2812
2812
|
m();
|
|
2813
2813
|
return;
|
|
@@ -2819,10 +2819,10 @@ const el = {
|
|
|
2819
2819
|
}
|
|
2820
2820
|
return F(
|
|
2821
2821
|
() => n.text,
|
|
2822
|
-
(
|
|
2823
|
-
l.value =
|
|
2822
|
+
(h) => {
|
|
2823
|
+
l.value = h;
|
|
2824
2824
|
}
|
|
2825
|
-
), (
|
|
2825
|
+
), (h, $) => (w(), O(W, null, [
|
|
2826
2826
|
H(sn, {
|
|
2827
2827
|
src: r.value,
|
|
2828
2828
|
srcLabel: i.value,
|
|
@@ -2838,7 +2838,8 @@ const el = {
|
|
|
2838
2838
|
class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3",
|
|
2839
2839
|
autofocus: "",
|
|
2840
2840
|
rows: "2",
|
|
2841
|
-
onInput:
|
|
2841
|
+
onInput: p,
|
|
2842
|
+
onFocus: $[1] || ($[1] = (N) => N.target.select())
|
|
2842
2843
|
}, null, 544), [
|
|
2843
2844
|
[
|
|
2844
2845
|
Tt,
|
|
@@ -2849,7 +2850,7 @@ const el = {
|
|
|
2849
2850
|
])
|
|
2850
2851
|
], 64));
|
|
2851
2852
|
}
|
|
2852
|
-
}, tl = /* @__PURE__ */ ze(el, [["__scopeId", "data-v-
|
|
2853
|
+
}, tl = /* @__PURE__ */ ze(el, [["__scopeId", "data-v-5ce52ee5"]]), nl = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.2018%204.409H8.2373L7.46364%202H2.79867C2.35907%202%202%202.3595%202%202.7995V10.937C2%2011.376%202.36008%2011.7355%202.79867%2011.7355H7.79971L8.53636%2014H13.2013C13.6404%2014%2014%2013.6465%2014%2013.214V5.195C14%204.7625%2013.6404%204.409%2013.2018%204.409ZM5.3702%208.749C4.33499%208.749%203.49481%207.909%203.49481%206.874C3.49481%205.839%204.33499%204.999%205.3702%204.999C5.87631%204.999%206.3004%205.1865%206.62646%205.487L6.13136%205.963C5.9244%205.77181%205.65196%205.66729%205.3702%205.671C4.71757%205.671%204.18846%206.211%204.18846%206.8755C4.18846%207.54%204.71757%208.08%205.3697%208.08C6.12336%208.08%206.43492%207.54%206.46493%207.176L5.3707%207.175V6.533H7.12607C7.15107%206.648%207.17108%206.7615%207.17108%206.915C7.17108%207.9885%206.45393%208.7495%205.3697%208.7495L5.3702%208.749ZM13.7504%2013.214C13.7504%2013.509%2013.5044%2013.75%2013.2018%2013.75H8.76341L10.5883%2011.735H10.5908L10.2207%2010.584L10.2237%2010.5815C10.2237%2010.5815%2010.5078%2010.3375%2010.8623%209.9615C11.2184%2010.347%2011.6775%2010.811%2012.2716%2011.364L12.6572%2010.978C12.0211%2010.401%2011.555%209.943%2011.2119%209.5755C11.6715%209.032%2012.1381%208.348%2012.2366%207.722H13.2538V7.723H13.2548V7.253H10.9884V6.493H10.2527V7.253H9.15049L8.31432%204.648L8.31732%204.659H13.2018C13.5044%204.659%2013.7504%204.899%2013.7504%205.195V13.214ZM10.5078%209.5585C10.2397%209.8325%2010.0362%209.995%2010.0362%209.995L10.0322%209.997L9.30202%207.723H11.6845C11.531%208.265%2011.1904%208.777%2010.8588%209.175C10.2707%208.479%2010.2687%208.253%2010.2687%208.253H9.6576C9.6576%208.253%209.6826%208.5925%2010.5078%209.5585Z'%20fill='%237E7E7E'/%3e%3c/svg%3e", an = rt("loader", () => ({ loading: E(!1) })), ol = (e) => (mn("data-v-5a9dbf88"), e = e(), gn(), e), ll = { class: "flex flex-col" }, sl = /* @__PURE__ */ ol(() => /* @__PURE__ */ g("div", { class: "w-full flex align-item-center justify-end" }, [
|
|
2853
2854
|
/* @__PURE__ */ g("span", { class: "text-sm" }, "Powered by Google Translate"),
|
|
2854
2855
|
/* @__PURE__ */ g("img", {
|
|
2855
2856
|
src: nl,
|
|
@@ -2863,13 +2864,13 @@ const el = {
|
|
|
2863
2864
|
},
|
|
2864
2865
|
setup(e) {
|
|
2865
2866
|
const o = me(), t = E(!1), n = y(() => o.result), l = y(() => o.target), r = y(() => o.targetLabel), i = y(() => {
|
|
2866
|
-
var
|
|
2867
|
-
return (
|
|
2867
|
+
var p;
|
|
2868
|
+
return (p = o.phonetic) == null ? void 0 : p.target;
|
|
2868
2869
|
}), s = y(() => {
|
|
2869
|
-
var
|
|
2870
|
-
return (
|
|
2870
|
+
var p;
|
|
2871
|
+
return (p = o.tts) == null ? void 0 : p.target;
|
|
2871
2872
|
}), a = e, u = an(), { textarea: v, input: c } = rn({ input: n, styleProp: "minHeight" });
|
|
2872
|
-
return (
|
|
2873
|
+
return (p, m) => (w(), O(W, null, [
|
|
2873
2874
|
H(sn, {
|
|
2874
2875
|
loading: T(u).loading,
|
|
2875
2876
|
src: l.value,
|
|
@@ -2878,13 +2879,13 @@ const el = {
|
|
|
2878
2879
|
isFavoriteBtn: a.isFavoriteFeatureEnabled,
|
|
2879
2880
|
isFavorite: t.value,
|
|
2880
2881
|
phonetic: i.value,
|
|
2881
|
-
onFavorite: m[0] || (m[0] = (
|
|
2882
|
+
onFavorite: m[0] || (m[0] = (h) => t.value = !t.value)
|
|
2882
2883
|
}, null, 8, ["loading", "src", "srcLabel", "tts", "isFavoriteBtn", "isFavorite", "phonetic"]),
|
|
2883
2884
|
g("div", ll, [
|
|
2884
2885
|
Lt(g("textarea", {
|
|
2885
2886
|
ref_key: "textarea",
|
|
2886
2887
|
ref: v,
|
|
2887
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
2888
|
+
"onUpdate:modelValue": m[1] || (m[1] = (h) => xe(c) ? c.value = h : null),
|
|
2888
2889
|
class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3",
|
|
2889
2890
|
readonly: "",
|
|
2890
2891
|
rows: "2",
|
|
@@ -2920,8 +2921,7 @@ const el = {
|
|
|
2920
2921
|
const t = E(!0), n = me(), l = He(), r = y(() => n.dictionary), i = o, s = () => {
|
|
2921
2922
|
t.value = !t.value;
|
|
2922
2923
|
}, a = (u) => {
|
|
2923
|
-
|
|
2924
|
-
l.src = c, l.target = v, i("translate", u);
|
|
2924
|
+
i("translate", u, n.target, n.src), l.src = n.target, l.target = n.src;
|
|
2925
2925
|
};
|
|
2926
2926
|
return (u, v) => (w(), O("div", ul, [
|
|
2927
2927
|
g("div", cl, [
|
|
@@ -2936,14 +2936,14 @@ const el = {
|
|
|
2936
2936
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2937
2937
|
}, [
|
|
2938
2938
|
g("ul", null, [
|
|
2939
|
-
(w(!0), O(W, null, se(r.value, (c,
|
|
2940
|
-
key: `${c.pos}-${
|
|
2939
|
+
(w(!0), O(W, null, se(r.value, (c, p) => (w(), O("li", {
|
|
2940
|
+
key: `${c.pos}-${p}`,
|
|
2941
2941
|
class: "mb-2"
|
|
2942
2942
|
}, [
|
|
2943
2943
|
g("h5", vl, ee(c.pos), 1),
|
|
2944
2944
|
g("ul", pl, [
|
|
2945
|
-
(w(!0), O(W, null, se(c.items, (m,
|
|
2946
|
-
key: `${m.word}-${
|
|
2945
|
+
(w(!0), O(W, null, se(c.items, (m, h) => (w(), O("li", {
|
|
2946
|
+
key: `${m.word}-${h}`
|
|
2947
2947
|
}, [
|
|
2948
2948
|
g("span", {
|
|
2949
2949
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
@@ -3057,16 +3057,16 @@ const el = {
|
|
|
3057
3057
|
}, [
|
|
3058
3058
|
g("h5", Al, ee(v.pos), 1),
|
|
3059
3059
|
g("ul", Fl, [
|
|
3060
|
-
(w(!0), O(W, null, se(v.items, (
|
|
3061
|
-
key: `${
|
|
3060
|
+
(w(!0), O(W, null, se(v.items, (p, m) => (w(), O("li", {
|
|
3061
|
+
key: `${p.word}-${m}`,
|
|
3062
3062
|
class: "mb-2"
|
|
3063
3063
|
}, [
|
|
3064
3064
|
g("div", jl, [
|
|
3065
|
-
(w(!0), O(W, null, se(
|
|
3066
|
-
key: `${
|
|
3065
|
+
(w(!0), O(W, null, se(p.synonym, (h, $) => (w(), O("span", {
|
|
3066
|
+
key: `${h}-${$}`,
|
|
3067
3067
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3068
|
-
onClick: (N) => s(
|
|
3069
|
-
}, ee(
|
|
3068
|
+
onClick: (N) => s(h)
|
|
3069
|
+
}, ee(h), 9, Bl))), 128))
|
|
3070
3070
|
])
|
|
3071
3071
|
]))), 128))
|
|
3072
3072
|
])
|
|
@@ -3104,40 +3104,39 @@ const el = {
|
|
|
3104
3104
|
},
|
|
3105
3105
|
emits: ["opt", "translate", "reader", "settings", "fullscreen"],
|
|
3106
3106
|
setup(e, { emit: o }) {
|
|
3107
|
-
|
|
3108
|
-
const t = d2(), n = me(t), l = He(t), r = an(t), i = e, s = o, a = E((h = i.translation) == null ? void 0 : h.text);
|
|
3107
|
+
const t = d2(), n = me(t), l = He(t), r = an(t), i = e, s = o, a = E("");
|
|
3109
3108
|
F(
|
|
3110
3109
|
() => i.translation,
|
|
3111
|
-
(
|
|
3112
|
-
r.loading = !1, n.init(
|
|
3110
|
+
(p) => {
|
|
3111
|
+
r.loading = !1, a.value = p.text, n.init(p);
|
|
3113
3112
|
},
|
|
3114
3113
|
{ immediate: !0 }
|
|
3115
|
-
), F([() => i.opt, () => i.languages], ([
|
|
3116
|
-
l.init(m,
|
|
3117
|
-
}), F([() => l.src, () => l.target], ([
|
|
3118
|
-
s("opt", { src:
|
|
3114
|
+
), F([() => i.opt, () => i.languages], ([p, m]) => {
|
|
3115
|
+
l.init(p, m), c(a.value);
|
|
3116
|
+
}), F([() => l.src, () => l.target], ([p, m]) => {
|
|
3117
|
+
s("opt", { src: p, target: m }), a.value && c(a.value);
|
|
3119
3118
|
}), ve(() => {
|
|
3120
3119
|
l.init(i.opt, i.languages);
|
|
3121
3120
|
});
|
|
3122
3121
|
function u() {
|
|
3123
3122
|
a.value = "", n.reset();
|
|
3124
3123
|
}
|
|
3125
|
-
function v(
|
|
3126
|
-
|
|
3124
|
+
function v(p) {
|
|
3125
|
+
p && c(p);
|
|
3127
3126
|
}
|
|
3128
|
-
function c(m) {
|
|
3129
|
-
a.value =
|
|
3130
|
-
src:
|
|
3131
|
-
target:
|
|
3132
|
-
text:
|
|
3127
|
+
function c(p, m = l.src, h = l.target) {
|
|
3128
|
+
a.value = p, r.loading = !0, s("translate", {
|
|
3129
|
+
src: m,
|
|
3130
|
+
target: h,
|
|
3131
|
+
text: p
|
|
3133
3132
|
});
|
|
3134
3133
|
}
|
|
3135
|
-
return (
|
|
3134
|
+
return (p, m) => (w(), O("div", zl, [
|
|
3136
3135
|
g("div", Ul, [
|
|
3137
3136
|
H(Vn, {
|
|
3138
|
-
onReader:
|
|
3139
|
-
onSettings:
|
|
3140
|
-
onFullScreen:
|
|
3137
|
+
onReader: m[0] || (m[0] = (h) => s("reader")),
|
|
3138
|
+
onSettings: m[1] || (m[1] = (h) => s("settings")),
|
|
3139
|
+
onFullScreen: m[2] || (m[2] = (h) => s("fullscreen"))
|
|
3141
3140
|
})
|
|
3142
3141
|
]),
|
|
3143
3142
|
g("div", Zl, [
|