@datawhale/prosemirror-render 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AttachmentBlock-ChMNTUOo.mjs → AttachmentBlock-BU56Jral.js} +100 -107
- package/dist/AttachmentBlock-D4287MIh.cjs +1 -0
- package/dist/AttachmentInline-DjENK-yS.cjs +1 -0
- package/dist/{AttachmentInline-tbC8BJBy.mjs → AttachmentInline-Dpuxwof6.js} +2 -2
- package/dist/{AttachmentMenu-B5x8P9_n.mjs → AttachmentMenu-CGVTP1Yv.js} +1 -1
- package/dist/AttachmentMenu-DbbJfEmt.cjs +1 -0
- package/dist/{Callout-Cu6HI-xq.mjs → Callout-BXchNfJk.js} +2 -2
- package/dist/Callout-DaFC0yQ4.cjs +1 -0
- package/dist/{CellOutput-DiKZlIFa.js → CellOutput-B7Lb-RKC.cjs} +1 -1
- package/dist/{CellOutput-C33VK0df.mjs → CellOutput-DvijyrkS.js} +1 -1
- package/dist/{CodeBlock-Cjuxuq7B.mjs → CodeBlock-B2ZZtPly.js} +1 -1
- package/dist/{CodeBlock-DWniNUQB.js → CodeBlock-CdWT5lK0.cjs} +1 -1
- package/dist/{FoldBlock-DRdlU-DX.mjs → FoldBlock-DndxoDsF.js} +2 -2
- package/dist/FoldBlock-HGN28wvI.cjs +1 -0
- package/dist/{Grid-GfmJxM93.mjs → Grid-253iqCMF.js} +1 -1
- package/dist/Grid-xOWRvjRR.cjs +1 -0
- package/dist/{IFrame-CaAOVLGN.mjs → IFrame-CY4qkGFL.js} +1 -1
- package/dist/IFrame-k7fk5enb.cjs +1 -0
- package/dist/Image-DkfpQMVQ.cjs +1 -0
- package/dist/{Image-C8v5dCij.mjs → Image-R6iVek-9.js} +1 -1
- package/dist/MathDisplay-Bimaa4Y6.cjs +1 -0
- package/dist/{MathDisplay-CoGsFzXW.mjs → MathDisplay-CEY2k2fV.js} +2 -2
- package/dist/{MathInline-0xTZoIIq.mjs → MathInline-Bz9Baz68.js} +2 -2
- package/dist/MathInline-C3GWYu2n.cjs +1 -0
- package/dist/McChoices-Cq68UY4X.cjs +1 -0
- package/dist/{McChoices-Aj394G5E.mjs → McChoices-D3HhRraE.js} +1 -1
- package/dist/{McQuestion-DvD-J47M.mjs → McQuestion-BtWjhEnd.js} +1 -1
- package/dist/McQuestion-D7skHE3m.cjs +1 -0
- package/dist/{McSolution-C5sTXz3y.mjs → McSolution-DiMXYCQt.js} +1 -1
- package/dist/McSolution-ytOHw96W.cjs +1 -0
- package/dist/MultipleChoice-Byg7IpwO.cjs +1 -0
- package/dist/{MultipleChoice-Dv-k1zUU.mjs → MultipleChoice-Cl8wfstN.js} +4 -4
- package/dist/Paragraph-Bc08aEUA.cjs +1 -0
- package/dist/{Paragraph-DGcZy8t_.mjs → Paragraph-BipTa7mo.js} +1 -1
- package/dist/SlotNode-BBgyADP6.cjs +1 -0
- package/dist/{SlotNode-6OpoUcOa.mjs → SlotNode-Dy-7S7b1.js} +1 -1
- package/dist/{Text-Br_pcGz4.mjs → Text-CRiw47FV.js} +1 -1
- package/dist/Text-DmgJshdk.cjs +1 -0
- package/dist/index-CEnrh8_5.cjs +1 -0
- package/dist/{index-DVmWCrQE.mjs → index-CnHgx6Xd.js} +30 -30
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/prosemirror-render.css +1 -1
- package/package.json +10 -3
- package/dist/AttachmentBlock-DsmJP3Kw.js +0 -1
- package/dist/AttachmentInline-Dc3dp0g-.js +0 -1
- package/dist/AttachmentMenu-ExoCOe4B.js +0 -1
- package/dist/Callout-DPdOqTb4.js +0 -1
- package/dist/FoldBlock-ZPMf0QsR.js +0 -1
- package/dist/Grid-QToZdaRT.js +0 -1
- package/dist/IFrame-DcCpSoDC.js +0 -1
- package/dist/Image-cHL85CXs.js +0 -1
- package/dist/MathDisplay-CESKZV46.js +0 -1
- package/dist/MathInline-C_1SJUVz.js +0 -1
- package/dist/McChoices-B4euzY7M.js +0 -1
- package/dist/McQuestion-Dq0aM5tC.js +0 -1
- package/dist/McSolution-N79CllH9.js +0 -1
- package/dist/MultipleChoice-DTCF3Q8m.js +0 -1
- package/dist/Paragraph-CzRSCJNr.js +0 -1
- package/dist/SlotNode-DMG0R6Vf.js +0 -1
- package/dist/Text-DlUfrsNI.js +0 -1
- package/dist/index-D2CtpNvR.js +0 -1
- package/src/apis/monitor.ts +0 -8
- package/src/apis/tingwu.ts +0 -22
- package/src/apis/types.ts +0 -45
- package/src/components/TreeRecursive.vue +0 -47
- package/src/components/TreeRender.vue +0 -404
- package/src/components/collections/async/AsyncError.vue +0 -17
- package/src/components/collections/async/AsyncLoading.vue +0 -1
- package/src/components/collections/attachment/AttachmentBlock.vue +0 -561
- package/src/components/collections/attachment/AttachmentInline.vue +0 -90
- package/src/components/collections/attachment/AttachmentMenu.vue +0 -359
- package/src/components/collections/attachment/VideoDetail.vue +0 -375
- package/src/components/collections/attachment/index.ts +0 -6
- package/src/components/collections/basic/Blockquote.vue +0 -15
- package/src/components/collections/basic/BulletList.vue +0 -15
- package/src/components/collections/basic/HardBreak.vue +0 -11
- package/src/components/collections/basic/Heading.vue +0 -15
- package/src/components/collections/basic/HorizontalRule.vue +0 -11
- package/src/components/collections/basic/ListItem.vue +0 -15
- package/src/components/collections/basic/OrderedList.vue +0 -15
- package/src/components/collections/basic/Paragraph.vue +0 -19
- package/src/components/collections/basic/Text.vue +0 -73
- package/src/components/collections/basic/index.ts +0 -13
- package/src/components/collections/callout/Callout.vue +0 -77
- package/src/components/collections/callout/index.ts +0 -5
- package/src/components/collections/code/CellOutput.vue +0 -72
- package/src/components/collections/code/CodeBlock.vue +0 -83
- package/src/components/collections/code/index.ts +0 -6
- package/src/components/collections/fold/FoldBlock.vue +0 -130
- package/src/components/collections/fold/index.ts +0 -5
- package/src/components/collections/grid/Grid.vue +0 -70
- package/src/components/collections/grid/index.ts +0 -5
- package/src/components/collections/iframe/IFrame.vue +0 -19
- package/src/components/collections/iframe/index.ts +0 -5
- package/src/components/collections/img/Image.vue +0 -318
- package/src/components/collections/img/index.ts +0 -5
- package/src/components/collections/index.ts +0 -29
- package/src/components/collections/math/MathDisplay.vue +0 -42
- package/src/components/collections/math/MathInline.vue +0 -42
- package/src/components/collections/math/index.ts +0 -6
- package/src/components/collections/multipleChoice/McChoices.vue +0 -72
- package/src/components/collections/multipleChoice/McQuestion.vue +0 -61
- package/src/components/collections/multipleChoice/McSolution.vue +0 -47
- package/src/components/collections/multipleChoice/MultipleChoice.vue +0 -62
- package/src/components/collections/multipleChoice/index.ts +0 -8
- package/src/components/collections/table/TableCell.vue +0 -20
- package/src/components/collections/table/TableContainer.vue +0 -32
- package/src/components/collections/table/TableHeader.vue +0 -15
- package/src/components/collections/table/TableRow.vue +0 -15
- package/src/components/collections/table/index.ts +0 -8
- package/src/components/collections/utils.ts +0 -17
- package/src/components/collections/wrapper/Doc.vue +0 -15
- package/src/components/collections/wrapper/SlotNode.vue +0 -5
- package/src/components/collections/wrapper/index.ts +0 -6
- package/src/components/index.ts +0 -1
- package/src/icons/Attachment/CardView.vue +0 -21
- package/src/icons/Attachment/Code/Bat.vue +0 -26
- package/src/icons/Attachment/Code/C.vue +0 -26
- package/src/icons/Attachment/Code/Cpp.vue +0 -26
- package/src/icons/Attachment/Code/Css.vue +0 -34
- package/src/icons/Attachment/Code/Go.vue +0 -26
- package/src/icons/Attachment/Code/Html.vue +0 -34
- package/src/icons/Attachment/Code/Java.vue +0 -42
- package/src/icons/Attachment/Code/Js.vue +0 -26
- package/src/icons/Attachment/Code/Json.vue +0 -26
- package/src/icons/Attachment/Code/Jsx.vue +0 -30
- package/src/icons/Attachment/Code/Md.vue +0 -26
- package/src/icons/Attachment/Code/Php.vue +0 -26
- package/src/icons/Attachment/Code/Python.vue +0 -30
- package/src/icons/Attachment/Code/Rb.vue +0 -26
- package/src/icons/Attachment/Code/Sh.vue +0 -30
- package/src/icons/Attachment/Code/Sql.vue +0 -30
- package/src/icons/Attachment/Code/Swift.vue +0 -26
- package/src/icons/Attachment/Code/Ts.vue +0 -26
- package/src/icons/Attachment/Code/Tsx.vue +0 -30
- package/src/icons/Attachment/Code/Vue.vue +0 -24
- package/src/icons/Attachment/Excel.vue +0 -26
- package/src/icons/Attachment/Eye.vue +0 -15
- package/src/icons/Attachment/FullScreen.vue +0 -15
- package/src/icons/Attachment/InlineView.vue +0 -21
- package/src/icons/Attachment/Pdf.vue +0 -25
- package/src/icons/Attachment/Ppt.vue +0 -26
- package/src/icons/Attachment/PreviewView.vue +0 -21
- package/src/icons/Attachment/UnknownFile.vue +0 -26
- package/src/icons/Attachment/VideoIcon.vue +0 -25
- package/src/icons/Attachment/VideoPlay.vue +0 -15
- package/src/icons/Attachment/Word.vue +0 -26
- package/src/icons/Code/Confirm.vue +0 -38
- package/src/icons/Code/Paste.vue +0 -8
- package/src/icons/Common/Choice.vue +0 -28
- package/src/icons/Common/Close.vue +0 -15
- package/src/icons/Common/Comment.vue +0 -16
- package/src/icons/Common/CopyAnchorLink.vue +0 -15
- package/src/icons/Common/Delete.vue +0 -15
- package/src/icons/Common/Download.vue +0 -15
- package/src/icons/Common/FoldClose.vue +0 -9
- package/src/icons/Common/FoldOpen.vue +0 -9
- package/src/icons/Common/Plate.vue +0 -23
- package/src/icons/Common/Question.vue +0 -8
- package/src/icons/Common/ShareTextLink.vue +0 -15
- package/src/index.ts +0 -3
- package/src/types.ts +0 -236
- package/src/utils/common.ts +0 -6
- package/src/utils/emoji.ts +0 -3715
- package/src/utils/globalStatus.ts +0 -19
- package/src/utils/shiki.ts +0 -25
- package/src/utils/useAttachment.ts +0 -215
- package/tsconfig.build.json +0 -10
- package/tsconfig.json +0 -23
- package/vite.config.ts +0 -24
- /package/dist/{Blockquote-BamWUQND.mjs → Blockquote-BamWUQND.js} +0 -0
- /package/dist/{Blockquote-CQSBFnsu.js → Blockquote-CQSBFnsu.cjs} +0 -0
- /package/dist/{BulletList-BQTUD69X.mjs → BulletList-BQTUD69X.js} +0 -0
- /package/dist/{BulletList-CFjF3U-l.js → BulletList-CFjF3U-l.cjs} +0 -0
- /package/dist/{Doc-6s4VMDsx.mjs → Doc-6s4VMDsx.js} +0 -0
- /package/dist/{Doc-D2yvlSII.js → Doc-D2yvlSII.cjs} +0 -0
- /package/dist/{HardBreak-B2tFO31P.mjs → HardBreak-B2tFO31P.js} +0 -0
- /package/dist/{HardBreak-Dbf5Zg5o.js → HardBreak-Dbf5Zg5o.cjs} +0 -0
- /package/dist/{Heading-BElRvhGn.mjs → Heading-BElRvhGn.js} +0 -0
- /package/dist/{Heading-BUnffIAz.js → Heading-BUnffIAz.cjs} +0 -0
- /package/dist/{HorizontalRule-BRG45oT0.mjs → HorizontalRule-BRG45oT0.js} +0 -0
- /package/dist/{HorizontalRule-CE09LZGf.js → HorizontalRule-CE09LZGf.cjs} +0 -0
- /package/dist/{ListItem-BrjxeGxz.js → ListItem-BrjxeGxz.cjs} +0 -0
- /package/dist/{ListItem-X0T7a_z8.mjs → ListItem-X0T7a_z8.js} +0 -0
- /package/dist/{OrderedList-B8v1gchv.mjs → OrderedList-B8v1gchv.js} +0 -0
- /package/dist/{OrderedList-DMl3tvwP.js → OrderedList-DMl3tvwP.cjs} +0 -0
- /package/dist/{TableCell-BY9gdldc.js → TableCell-BY9gdldc.cjs} +0 -0
- /package/dist/{TableCell-Bp52L368.mjs → TableCell-Bp52L368.js} +0 -0
- /package/dist/{TableContainer-C5KXY6f7.js → TableContainer-C5KXY6f7.cjs} +0 -0
- /package/dist/{TableContainer-C9PhNGlz.mjs → TableContainer-C9PhNGlz.js} +0 -0
- /package/dist/{TableHeader-BTuqvorM.js → TableHeader-BTuqvorM.cjs} +0 -0
- /package/dist/{TableHeader-C7KKz3e1.mjs → TableHeader-C7KKz3e1.js} +0 -0
- /package/dist/{TableRow-D4F6AKFt.js → TableRow-D4F6AKFt.cjs} +0 -0
- /package/dist/{TableRow-OzpVq1qW.mjs → TableRow-OzpVq1qW.js} +0 -0
- /package/dist/{emoji-Bk6FG72F.js → emoji-Bk6FG72F.cjs} +0 -0
- /package/dist/{emoji-CmOToDEU.mjs → emoji-CmOToDEU.js} +0 -0
- /package/dist/{katex-CS0ZfoxP.js → katex-CS0ZfoxP.cjs} +0 -0
- /package/dist/{katex-r9TeExgs.mjs → katex-r9TeExgs.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createElementBlock as a, openBlock as s, createElementVNode as e, defineComponent as B, ref as h, inject as F, onMounted as L, toDisplayString as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { u as
|
|
4
|
-
async function
|
|
5
|
-
return await t.post("/api/monitor", { data:
|
|
1
|
+
import { createElementBlock as a, openBlock as s, createElementVNode as e, defineComponent as B, ref as h, inject as F, onMounted as L, toDisplayString as i, createCommentVNode as k, normalizeClass as g, Fragment as U, renderList as O, createTextVNode as A, useTemplateRef as j, computed as J, withDirectives as V, createBlock as _, resolveDynamicComponent as x, unref as v, createVNode as I, vShow as R } from "vue";
|
|
2
|
+
import { _ as P, a as z } from "./index-CnHgx6Xd.js";
|
|
3
|
+
import { u as H, A as D, r as N } from "./AttachmentMenu-CGVTP1Yv.js";
|
|
4
|
+
async function K(t, l) {
|
|
5
|
+
return await t.post("/api/monitor", { data: l });
|
|
6
6
|
}
|
|
7
7
|
const q = {}, G = {
|
|
8
8
|
width: "1em",
|
|
@@ -12,15 +12,15 @@ const q = {}, G = {
|
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
13
|
"data-icon": "VisibleOutlined"
|
|
14
14
|
};
|
|
15
|
-
function Q(t,
|
|
16
|
-
return s(), a("svg", G, [...
|
|
15
|
+
function Q(t, l) {
|
|
16
|
+
return s(), a("svg", G, [...l[0] || (l[0] = [
|
|
17
17
|
e("path", {
|
|
18
18
|
d: "M11.985 18.5c3.238 0 6.236-2.06 9.015-6.513C18.292 7.55 15.3 5.5 11.985 5.5 8.67 5.5 5.689 7.549 3 11.987c2.76 4.454 5.748 6.513 8.985 6.513ZM1.502 12.89a1.782 1.782 0 0 1 .023-1.838C4.428 6.017 7.915 3.5 11.984 3.5c4.086 0 7.594 2.538 10.523 7.614l.028.048c.296.519.294 1.16-.01 1.675-3.006 5.108-6.52 7.663-10.541 7.663-4.007 0-7.501-2.537-10.482-7.61ZM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",
|
|
19
19
|
fill: "rgb(100, 106, 115)"
|
|
20
20
|
}, null, -1)
|
|
21
21
|
])]);
|
|
22
22
|
}
|
|
23
|
-
const W = /* @__PURE__ */
|
|
23
|
+
const W = /* @__PURE__ */ P(q, [["render", Q]]), X = {}, Y = {
|
|
24
24
|
width: "1em",
|
|
25
25
|
height: "1em",
|
|
26
26
|
viewBox: "0 0 24 24",
|
|
@@ -28,33 +28,33 @@ const W = /* @__PURE__ */ x(q, [["render", Q]]), X = {}, Y = {
|
|
|
28
28
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29
29
|
"data-icon": "PlayFilled"
|
|
30
30
|
};
|
|
31
|
-
function ee(t,
|
|
32
|
-
return s(), a("svg", Y, [...
|
|
31
|
+
function ee(t, l) {
|
|
32
|
+
return s(), a("svg", Y, [...l[0] || (l[0] = [
|
|
33
33
|
e("path", {
|
|
34
34
|
d: "M21.073 13.698a2.018 2.018 0 0 0 0-3.396L7.116 1.325C5.771.459 4 1.425 4 3.023v17.954c0 1.599 1.771 2.564 3.116 1.698l13.957-8.977Z",
|
|
35
35
|
fill: "rgb(100, 106, 115)"
|
|
36
36
|
}, null, -1)
|
|
37
37
|
])]);
|
|
38
38
|
}
|
|
39
|
-
const te = /* @__PURE__ */
|
|
40
|
-
async function se(t,
|
|
39
|
+
const te = /* @__PURE__ */ P(X, [["render", ee]]);
|
|
40
|
+
async function se(t, l) {
|
|
41
41
|
return (await t.get("/admin/editor/v2/videoProgressDetail", {
|
|
42
|
-
params:
|
|
42
|
+
params: l
|
|
43
43
|
})).data;
|
|
44
44
|
}
|
|
45
45
|
const ae = { class: "ai-panel" }, ne = { class: "panel-header" }, oe = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "panel-loading"
|
|
48
|
-
},
|
|
48
|
+
}, le = {
|
|
49
49
|
key: 1,
|
|
50
50
|
class: "panel-error"
|
|
51
|
-
},
|
|
51
|
+
}, ie = {
|
|
52
52
|
key: 2,
|
|
53
53
|
class: "panel-content"
|
|
54
54
|
}, ce = {
|
|
55
55
|
key: 0,
|
|
56
56
|
class: "content-card summary-card"
|
|
57
|
-
}, de = { class: "content-card chapters-card" }, re = { class: "card-header" }, ve = { class: "badge" }, ue = { class: "chapter-list" }, me = ["onClick"], he = { class: "chapter-index" }, fe = { class: "chapter-info" }, ke = { class: "chapter-title" },
|
|
57
|
+
}, de = { class: "content-card chapters-card" }, re = { class: "card-header" }, ve = { class: "badge" }, ue = { class: "chapter-list" }, me = ["onClick"], he = { class: "chapter-index" }, fe = { class: "chapter-info" }, ke = { class: "chapter-title" }, pe = { class: "chapter-time" }, we = {
|
|
58
58
|
key: 0,
|
|
59
59
|
class: "empty-state"
|
|
60
60
|
}, ye = /* @__PURE__ */ B({
|
|
@@ -64,11 +64,11 @@ const ae = { class: "ai-panel" }, ne = { class: "panel-header" }, oe = {
|
|
|
64
64
|
videoRef: {}
|
|
65
65
|
},
|
|
66
66
|
setup(t) {
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
67
|
+
const l = t, m = h(!1), u = h(""), r = h(null), f = h(!1), b = F(z), p = async () => {
|
|
68
|
+
if (l.taskId && b) {
|
|
69
69
|
m.value = !0;
|
|
70
70
|
try {
|
|
71
|
-
const n = await se(
|
|
71
|
+
const n = await se(b, { taskId: l.taskId });
|
|
72
72
|
r.value = {
|
|
73
73
|
summary: n.summary,
|
|
74
74
|
chapters: JSON.parse(n.chapters)
|
|
@@ -77,16 +77,9 @@ const ae = { class: "ai-panel" }, ne = { class: "panel-header" }, oe = {
|
|
|
77
77
|
u.value = "加载失败", m.value = !1, console.error(n);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
name: "toggleVideoAiPanelSidebar",
|
|
84
|
-
chapterTitle: n.title,
|
|
85
|
-
tingwuTaskId: i.taskId,
|
|
86
|
-
videoPageUrl: window.location.href
|
|
87
|
-
})
|
|
88
|
-
});
|
|
89
|
-
}, y = (n) => {
|
|
80
|
+
}, C = async (n) => {
|
|
81
|
+
l.videoRef && (l.videoRef.currentTime = n.startTime, l.videoRef.play());
|
|
82
|
+
}, w = (n) => {
|
|
90
83
|
const o = Math.floor(n / 60), d = Math.floor(n % 60);
|
|
91
84
|
return `${o}:${d.toString().padStart(2, "0")}`;
|
|
92
85
|
};
|
|
@@ -120,75 +113,75 @@ const ae = { class: "ai-panel" }, ne = { class: "panel-header" }, oe = {
|
|
|
120
113
|
m.value ? (s(), a("div", oe, [...o[4] || (o[4] = [
|
|
121
114
|
e("div", { class: "spinner" }, null, -1),
|
|
122
115
|
e("p", null, "正在生成分析结果...", -1)
|
|
123
|
-
])])) : u.value ? (s(), a("div",
|
|
116
|
+
])])) : u.value ? (s(), a("div", le, i(u.value), 1)) : (s(), a("div", ie, [
|
|
124
117
|
r.value?.summary ? (s(), a("div", ce, [
|
|
125
118
|
o[5] || (o[5] = e("div", { class: "card-header" }, [
|
|
126
119
|
e("span", { class: "card-title" }, "全文摘要")
|
|
127
120
|
], -1)),
|
|
128
121
|
e("div", {
|
|
129
|
-
class:
|
|
130
|
-
},
|
|
122
|
+
class: g(["summary-text", { expanded: f.value }])
|
|
123
|
+
}, i(r.value.summary), 3),
|
|
131
124
|
r.value.summary.length > 100 ? (s(), a("div", {
|
|
132
125
|
key: 0,
|
|
133
126
|
class: "expand-btn",
|
|
134
127
|
onClick: o[1] || (o[1] = (d) => f.value = !f.value)
|
|
135
|
-
},
|
|
136
|
-
])) :
|
|
128
|
+
}, i(f.value ? "收起" : "展开全文"), 1)) : k("", !0)
|
|
129
|
+
])) : k("", !0),
|
|
137
130
|
e("div", de, [
|
|
138
131
|
e("div", re, [
|
|
139
132
|
o[6] || (o[6] = e("span", { class: "card-title" }, "章节速览", -1)),
|
|
140
|
-
e("span", ve,
|
|
133
|
+
e("span", ve, i(r.value?.chapters?.length || 0), 1)
|
|
141
134
|
]),
|
|
142
135
|
e("div", ue, [
|
|
143
|
-
(s(!0), a(
|
|
136
|
+
(s(!0), a(U, null, O(r.value?.chapters || [], (d, $) => (s(), a("div", {
|
|
144
137
|
key: $,
|
|
145
138
|
class: "chapter-item",
|
|
146
|
-
onClick: (
|
|
139
|
+
onClick: (y) => C(d)
|
|
147
140
|
}, [
|
|
148
|
-
e("div", he,
|
|
141
|
+
e("div", he, i($ + 1), 1),
|
|
149
142
|
e("div", fe, [
|
|
150
|
-
e("div", ke,
|
|
151
|
-
e("div",
|
|
143
|
+
e("div", ke, i(d.title), 1),
|
|
144
|
+
e("div", pe, [
|
|
152
145
|
o[7] || (o[7] = e("i", { class: "icon-time" }, "🕒", -1)),
|
|
153
|
-
|
|
146
|
+
A(" " + i(w(d.startTime)) + " - " + i(w(d.endTime)), 1)
|
|
154
147
|
])
|
|
155
148
|
])
|
|
156
149
|
], 8, me))), 128)),
|
|
157
|
-
!r.value?.chapters || r.value.chapters.length === 0 ? (s(), a("div",
|
|
150
|
+
!r.value?.chapters || r.value.chapters.length === 0 ? (s(), a("div", we, "暂无章节信息")) : k("", !0)
|
|
158
151
|
])
|
|
159
152
|
])
|
|
160
153
|
]))
|
|
161
154
|
]));
|
|
162
155
|
}
|
|
163
|
-
}), ge = /* @__PURE__ */
|
|
156
|
+
}), ge = /* @__PURE__ */ P(ye, [["__scopeId", "data-v-487a56a5"]]), be = {
|
|
164
157
|
key: 0,
|
|
165
158
|
class: "attachment-block-card-container"
|
|
166
|
-
}, $e = { class: "attachment-block-card-icon" }, Te = { class: "attachment-block-card-info" }, _e = { class: "attachment-block-card-info-name" },
|
|
159
|
+
}, $e = { class: "attachment-block-card-icon" }, Te = { class: "attachment-block-card-info" }, _e = { class: "attachment-block-card-info-name" }, xe = {
|
|
167
160
|
key: 0,
|
|
168
161
|
class: "attachment-block-card-info-size"
|
|
169
|
-
},
|
|
162
|
+
}, Pe = {
|
|
170
163
|
key: 1,
|
|
171
164
|
class: "attachment-block-card-info-size"
|
|
172
|
-
},
|
|
165
|
+
}, Ce = {
|
|
173
166
|
key: 2,
|
|
174
167
|
class: "attachment-block-card-info-size",
|
|
175
168
|
style: { color: "rgb(247, 78, 0)" }
|
|
176
|
-
},
|
|
169
|
+
}, Me = { class: "attachment-block-card-preview" }, Ie = {
|
|
177
170
|
key: 1,
|
|
178
171
|
class: "attachment-block-preview-container"
|
|
179
|
-
},
|
|
172
|
+
}, Ae = {
|
|
180
173
|
key: 0,
|
|
181
174
|
class: "video-block-preview-container"
|
|
182
|
-
},
|
|
175
|
+
}, Se = { class: "video-main-section" }, Ee = {
|
|
183
176
|
key: 0,
|
|
184
177
|
class: "video-player-wrapper"
|
|
185
|
-
},
|
|
178
|
+
}, Ve = ["src"], Re = {
|
|
186
179
|
key: 1,
|
|
187
180
|
class: "video-uploading-wrapper"
|
|
188
|
-
},
|
|
181
|
+
}, De = {
|
|
189
182
|
key: 0,
|
|
190
183
|
class: "uploading-content"
|
|
191
|
-
},
|
|
184
|
+
}, Ne = {
|
|
192
185
|
key: 1,
|
|
193
186
|
class: "error-content"
|
|
194
187
|
}, Be = {
|
|
@@ -200,20 +193,20 @@ const ae = { class: "ai-panel" }, ne = { class: "panel-header" }, oe = {
|
|
|
200
193
|
}, ze = {
|
|
201
194
|
key: 1,
|
|
202
195
|
class: "notVideo-block-preview-container"
|
|
203
|
-
},
|
|
196
|
+
}, Ze = {
|
|
204
197
|
key: 1,
|
|
205
198
|
class: "attachment-block-preview-unable"
|
|
206
|
-
},
|
|
199
|
+
}, Le = ["src"], Ue = { class: "attachment-block-preview-unable-text" }, Oe = { style: { "font-weight": "bold" } }, je = { class: "attachment-block-preview-unable-text" }, Je = { class: "attachment-block-preview-info" }, He = /* @__PURE__ */ B({
|
|
207
200
|
__name: "AttachmentBlock",
|
|
208
201
|
props: {
|
|
209
202
|
node: {}
|
|
210
203
|
},
|
|
211
204
|
setup(t) {
|
|
212
|
-
const
|
|
205
|
+
const l = F(z), m = j("videoPreviewRef"), u = J(() => t.node.attrs.uploadProgress === void 0 || t.node.attrs.uploadProgress < 1), { icon: r, calculatedFileSize: f, cannotPreviewImgDataUrl: b, canPreview: p, genPreviewSrc: C } = H(
|
|
213
206
|
t.node.attrs.fileType,
|
|
214
207
|
t.node.attrs.fileSize
|
|
215
|
-
),
|
|
216
|
-
n.value = !n.value,
|
|
208
|
+
), w = (E) => ["mp4", "avi", "mkv", "mov"].includes(E), n = h(!1), o = async () => {
|
|
209
|
+
n.value = !n.value, l && n.value && t.node.attrs.tingwuTaskId && await K(l, {
|
|
217
210
|
log: JSON.stringify({
|
|
218
211
|
name: "toggleVideoAiPanel",
|
|
219
212
|
tingwuTaskId: t.node.attrs.tingwuTaskId,
|
|
@@ -222,64 +215,64 @@ const ae = { class: "ai-panel" }, ne = { class: "panel-header" }, oe = {
|
|
|
222
215
|
});
|
|
223
216
|
}, d = h(!1), $ = () => {
|
|
224
217
|
d.value = !0, alert("全屏预览功能将在后续版本中开放");
|
|
225
|
-
},
|
|
218
|
+
}, y = h(!1), T = h(null), Z = () => {
|
|
226
219
|
T.value = setTimeout(() => {
|
|
227
|
-
|
|
220
|
+
y.value = !1;
|
|
228
221
|
}, 200);
|
|
229
|
-
},
|
|
222
|
+
}, S = () => {
|
|
230
223
|
T.value && (clearTimeout(T.value), T.value = null);
|
|
231
224
|
};
|
|
232
|
-
return (
|
|
233
|
-
onMouseenter: c[2] || (c[2] = (
|
|
225
|
+
return (E, c) => (s(), a("div", {
|
|
226
|
+
onMouseenter: c[2] || (c[2] = (M) => y.value = !0),
|
|
234
227
|
onMouseleave: Z,
|
|
235
228
|
class: "attachment-block-container"
|
|
236
229
|
}, [
|
|
237
230
|
t.node.attrs.dispType === "card" ? (s(), a("div", be, [
|
|
238
231
|
e("div", $e, [
|
|
239
|
-
(s(), _(
|
|
232
|
+
(s(), _(x(v(r)), { class: "attachment-block-card-icon-svg" }))
|
|
240
233
|
]),
|
|
241
234
|
e("div", Te, [
|
|
242
|
-
e("div", _e,
|
|
243
|
-
!u.value && !t.node.attrs.uploadError ? (s(), a("div",
|
|
235
|
+
e("div", _e, i(t.node.attrs.fileName) + "." + i(t.node.attrs.fileType), 1),
|
|
236
|
+
!u.value && !t.node.attrs.uploadError ? (s(), a("div", xe, i(v(f)), 1)) : u.value && !t.node.attrs.uploadError ? (s(), a("div", Pe, " 附件正在上传中,请等待... ")) : (s(), a("div", Ce, " 附件出错,请等待管理员处理 "))
|
|
244
237
|
]),
|
|
245
|
-
e("div",
|
|
238
|
+
e("div", Me, [
|
|
246
239
|
e("div", {
|
|
247
240
|
class: "attachment-block-card-preview-wrapper",
|
|
248
241
|
onClick: $
|
|
249
242
|
}, [
|
|
250
|
-
(s(), _(
|
|
243
|
+
(s(), _(x(w(t.node.attrs.fileType) ? te : W), { class: "attachment-block-card-preview-btn" }))
|
|
251
244
|
])
|
|
252
245
|
]),
|
|
253
|
-
|
|
246
|
+
V(e("div", {
|
|
254
247
|
class: "attachment-block-card-menu",
|
|
255
|
-
onMouseenter:
|
|
248
|
+
onMouseenter: S
|
|
256
249
|
}, [
|
|
257
|
-
|
|
250
|
+
I(D, {
|
|
258
251
|
node: t.node,
|
|
259
252
|
"show-full-screen-dialog": d.value,
|
|
260
|
-
"onUpdate:showFullScreenDialog": c[0] || (c[0] = (
|
|
253
|
+
"onUpdate:showFullScreenDialog": c[0] || (c[0] = (M) => d.value = M)
|
|
261
254
|
}, null, 8, ["node", "show-full-screen-dialog"])
|
|
262
255
|
], 544), [
|
|
263
|
-
[
|
|
256
|
+
[R, y.value && !u.value && !t.node.attrs.uploadError]
|
|
264
257
|
])
|
|
265
|
-
])) : t.node.attrs.dispType === "preview" ? (s(), a("div",
|
|
266
|
-
|
|
258
|
+
])) : t.node.attrs.dispType === "preview" ? (s(), a("div", Ie, [
|
|
259
|
+
w(t.node.attrs.fileType) ? (s(), a("div", Ae, [
|
|
267
260
|
e("div", {
|
|
268
|
-
class:
|
|
261
|
+
class: g(["video-block-container", { "has-sidebar": n.value }])
|
|
269
262
|
}, [
|
|
270
|
-
e("div",
|
|
271
|
-
!u.value && !t.node.attrs.uploadError ? (s(), a("div",
|
|
263
|
+
e("div", Se, [
|
|
264
|
+
!u.value && !t.node.attrs.uploadError ? (s(), a("div", Ee, [
|
|
272
265
|
e("video", {
|
|
273
266
|
ref_key: "videoPreviewRef",
|
|
274
267
|
ref: m,
|
|
275
|
-
src: v(
|
|
268
|
+
src: v(N)(t.node.attrs.src),
|
|
276
269
|
controls: "",
|
|
277
270
|
class: "video-element"
|
|
278
|
-
}, null, 8,
|
|
279
|
-
])) : (s(), a("div",
|
|
280
|
-
t.node.attrs.uploadError ? (s(), a("div",
|
|
271
|
+
}, null, 8, Ve)
|
|
272
|
+
])) : (s(), a("div", Re, [
|
|
273
|
+
t.node.attrs.uploadError ? (s(), a("div", Ne, [...c[4] || (c[4] = [
|
|
281
274
|
e("span", null, "⚠️ 视频出错,请等待管理员处理", -1)
|
|
282
|
-
])])) : (s(), a("div",
|
|
275
|
+
])])) : (s(), a("div", De, [...c[3] || (c[3] = [
|
|
283
276
|
e("div", { class: "spinner" }, null, -1),
|
|
284
277
|
e("span", null, "视频正在上传中,请等待...", -1)
|
|
285
278
|
])]))
|
|
@@ -290,62 +283,62 @@ const ae = { class: "ai-panel" }, ne = { class: "panel-header" }, oe = {
|
|
|
290
283
|
e("span", { class: "toolbar-desc" }, "摘要与章节")
|
|
291
284
|
], -1)),
|
|
292
285
|
e("button", {
|
|
293
|
-
class:
|
|
286
|
+
class: g(["ai-toggle-btn", { active: n.value }]),
|
|
294
287
|
onClick: o
|
|
295
288
|
}, [
|
|
296
289
|
c[5] || (c[5] = e("i", { class: "icon-ai" }, "✨", -1)),
|
|
297
|
-
|
|
290
|
+
A(" " + i(n.value ? "收起助手" : "AI 助手"), 1)
|
|
298
291
|
], 2)
|
|
299
|
-
])) :
|
|
292
|
+
])) : k("", !0)
|
|
300
293
|
]),
|
|
301
294
|
n.value ? (s(), a("div", Fe, [
|
|
302
|
-
|
|
295
|
+
I(ge, {
|
|
303
296
|
taskId: t.node.attrs.tingwuTaskId,
|
|
304
297
|
videoRef: m.value,
|
|
305
|
-
onClose: c[1] || (c[1] = (
|
|
298
|
+
onClose: c[1] || (c[1] = (M) => n.value = !1)
|
|
306
299
|
}, null, 8, ["taskId", "videoRef"])
|
|
307
|
-
])) :
|
|
300
|
+
])) : k("", !0)
|
|
308
301
|
], 2)
|
|
309
302
|
])) : (s(), a("div", ze, [
|
|
310
303
|
e("div", {
|
|
311
|
-
class:
|
|
304
|
+
class: g(["attachment-block-preview-content", { "attachment-block-preview-dark-bg": !v(p) }])
|
|
312
305
|
}, [
|
|
313
|
-
v(p) ? (s(), _(
|
|
306
|
+
v(p) ? (s(), _(x(t.node.attrs.fileType === "pdf" ? "embed" : "iframe"), {
|
|
314
307
|
key: 0,
|
|
315
308
|
class: "attachment-block-preview-iframe",
|
|
316
|
-
src: v(
|
|
317
|
-
}, null, 8, ["src"])) : (s(), a("div",
|
|
309
|
+
src: v(N)(v(C)(t.node.attrs.src))
|
|
310
|
+
}, null, 8, ["src"])) : (s(), a("div", Ze, [
|
|
318
311
|
e("img", {
|
|
319
312
|
class: "attachment-block-preview-unable-img",
|
|
320
|
-
src: v(
|
|
313
|
+
src: v(b),
|
|
321
314
|
alt: "该文件类型无法预览"
|
|
322
|
-
}, null, 8,
|
|
323
|
-
e("div",
|
|
324
|
-
e("strong", Oe, "." +
|
|
325
|
-
c[7] || (c[7] =
|
|
315
|
+
}, null, 8, Le),
|
|
316
|
+
e("div", Ue, [
|
|
317
|
+
e("strong", Oe, "." + i(t.node.attrs.fileType), 1),
|
|
318
|
+
c[7] || (c[7] = A("文件类型无法预览 ", -1))
|
|
326
319
|
]),
|
|
327
|
-
e("div",
|
|
320
|
+
e("div", je, i(t.node.attrs.fileName) + "." + i(t.node.attrs.fileType) + " · " + i(v(f)), 1)
|
|
328
321
|
]))
|
|
329
322
|
], 2),
|
|
330
323
|
e("div", {
|
|
331
|
-
class:
|
|
324
|
+
class: g(["attachment-block-preview-footer", { "attachment-block-preview-dark-bg": !v(p) }])
|
|
332
325
|
}, [
|
|
333
|
-
(s(), _(
|
|
334
|
-
e("span",
|
|
326
|
+
(s(), _(x(v(r)), { class: "attachment-block-preview-icon-svg" })),
|
|
327
|
+
e("span", Je, i(t.node.attrs.fileName) + "." + i(t.node.attrs.fileType), 1)
|
|
335
328
|
], 2)
|
|
336
329
|
])),
|
|
337
|
-
|
|
330
|
+
V(e("div", {
|
|
338
331
|
class: "attachment-block-preview-menu",
|
|
339
|
-
onMouseenter:
|
|
332
|
+
onMouseenter: S
|
|
340
333
|
}, [
|
|
341
|
-
|
|
334
|
+
I(D, { node: t.node }, null, 8, ["node"])
|
|
342
335
|
], 544), [
|
|
343
|
-
[
|
|
336
|
+
[R, y.value && !u.value && !t.node.attrs.uploadError]
|
|
344
337
|
])
|
|
345
|
-
])) :
|
|
338
|
+
])) : k("", !0)
|
|
346
339
|
], 32));
|
|
347
340
|
}
|
|
348
|
-
}), Qe = /* @__PURE__ */
|
|
341
|
+
}), Qe = /* @__PURE__ */ P(He, [["__scopeId", "data-v-6ebf6463"]]);
|
|
349
342
|
export {
|
|
350
343
|
Qe as default
|
|
351
344
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-CEnrh8_5.cjs"),p=require("./AttachmentMenu-DbbJfEmt.cjs");async function B(t,a){return await t.post("/api/monitor",{data:a})}const b={},S={width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"VisibleOutlined"};function D(t,a){return e.openBlock(),e.createElementBlock("svg",S,[...a[0]||(a[0]=[e.createElementVNode("path",{d:"M11.985 18.5c3.238 0 6.236-2.06 9.015-6.513C18.292 7.55 15.3 5.5 11.985 5.5 8.67 5.5 5.689 7.549 3 11.987c2.76 4.454 5.748 6.513 8.985 6.513ZM1.502 12.89a1.782 1.782 0 0 1 .023-1.838C4.428 6.017 7.915 3.5 11.984 3.5c4.086 0 7.594 2.538 10.523 7.614l.028.048c.296.519.294 1.16-.01 1.675-3.006 5.108-6.52 7.663-10.541 7.663-4.007 0-7.501-2.537-10.482-7.61ZM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",fill:"rgb(100, 106, 115)"},null,-1)])])}const T=m._export_sfc(b,[["render",D]]),$={},C={width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"PlayFilled"};function _(t,a){return e.openBlock(),e.createElementBlock("svg",C,[...a[0]||(a[0]=[e.createElementVNode("path",{d:"M21.073 13.698a2.018 2.018 0 0 0 0-3.396L7.116 1.325C5.771.459 4 1.425 4 3.023v17.954c0 1.599 1.771 2.564 3.116 1.698l13.957-8.977Z",fill:"rgb(100, 106, 115)"},null,-1)])])}const x=m._export_sfc($,[["render",_]]);async function M(t,a){return(await t.get("/admin/editor/v2/videoProgressDetail",{params:a})).data}const P={class:"ai-panel"},I={class:"panel-header"},A={key:0,class:"panel-loading"},z={key:1,class:"panel-error"},R={key:2,class:"panel-content"},F={key:0,class:"content-card summary-card"},U={class:"content-card chapters-card"},Z={class:"card-header"},j={class:"badge"},L={class:"chapter-list"},O=["onClick"],q={class:"chapter-index"},J={class:"chapter-info"},K={class:"chapter-title"},H={class:"chapter-time"},G={key:0,class:"empty-state"},Q=e.defineComponent({__name:"VideoDetail",props:{taskId:{},videoRef:{}},setup(t){const a=t,i=e.ref(!1),r=e.ref(""),c=e.ref(null),d=e.ref(!1),f=e.inject(m.axiosKey),v=async()=>{if(a.taskId&&f){i.value=!0;try{const o=await M(f,{taskId:a.taskId});c.value={summary:o.summary,chapters:JSON.parse(o.chapters)},i.value=!1}catch(o){r.value="加载失败",i.value=!1,console.error(o)}}},E=async o=>{a.videoRef&&(a.videoRef.currentTime=o.startTime,a.videoRef.play())},u=o=>{const n=Math.floor(o/60),s=Math.floor(o%60);return`${n}:${s.toString().padStart(2,"0")}`};return e.onMounted(async()=>{await v()}),(o,n)=>(e.openBlock(),e.createElementBlock("div",P,[e.createElementVNode("div",I,[n[3]||(n[3]=e.createElementVNode("div",{class:"header-title"},[e.createElementVNode("span",{class:"icon"},"🤖"),e.createElementVNode("span",null,"智能分析结果")],-1)),e.createElementVNode("button",{class:"close-btn",onClick:n[0]||(n[0]=s=>o.$emit("close")),title:"关闭助手"},[...n[2]||(n[2]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),i.value?(e.openBlock(),e.createElementBlock("div",A,[...n[4]||(n[4]=[e.createElementVNode("div",{class:"spinner"},null,-1),e.createElementVNode("p",null,"正在生成分析结果...",-1)])])):r.value?(e.openBlock(),e.createElementBlock("div",z,e.toDisplayString(r.value),1)):(e.openBlock(),e.createElementBlock("div",R,[c.value?.summary?(e.openBlock(),e.createElementBlock("div",F,[n[5]||(n[5]=e.createElementVNode("div",{class:"card-header"},[e.createElementVNode("span",{class:"card-title"},"全文摘要")],-1)),e.createElementVNode("div",{class:e.normalizeClass(["summary-text",{expanded:d.value}])},e.toDisplayString(c.value.summary),3),c.value.summary.length>100?(e.openBlock(),e.createElementBlock("div",{key:0,class:"expand-btn",onClick:n[1]||(n[1]=s=>d.value=!d.value)},e.toDisplayString(d.value?"收起":"展开全文"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",U,[e.createElementVNode("div",Z,[n[6]||(n[6]=e.createElementVNode("span",{class:"card-title"},"章节速览",-1)),e.createElementVNode("span",j,e.toDisplayString(c.value?.chapters?.length||0),1)]),e.createElementVNode("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value?.chapters||[],(s,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"chapter-item",onClick:k=>E(s)},[e.createElementVNode("div",q,e.toDisplayString(h+1),1),e.createElementVNode("div",J,[e.createElementVNode("div",K,e.toDisplayString(s.title),1),e.createElementVNode("div",H,[n[7]||(n[7]=e.createElementVNode("i",{class:"icon-time"},"🕒",-1)),e.createTextVNode(" "+e.toDisplayString(u(s.startTime))+" - "+e.toDisplayString(u(s.endTime)),1)])])],8,O))),128)),!c.value?.chapters||c.value.chapters.length===0?(e.openBlock(),e.createElementBlock("div",G,"暂无章节信息")):e.createCommentVNode("",!0)])])]))]))}}),W=m._export_sfc(Q,[["__scopeId","data-v-487a56a5"]]),X={key:0,class:"attachment-block-card-container"},Y={class:"attachment-block-card-icon"},ee={class:"attachment-block-card-info"},te={class:"attachment-block-card-info-name"},oe={key:0,class:"attachment-block-card-info-size"},ne={key:1,class:"attachment-block-card-info-size"},ae={key:2,class:"attachment-block-card-info-size",style:{color:"rgb(247, 78, 0)"}},le={class:"attachment-block-card-preview"},se={key:1,class:"attachment-block-preview-container"},ce={key:0,class:"video-block-preview-container"},re={class:"video-main-section"},ie={key:0,class:"video-player-wrapper"},de=["src"],me={key:1,class:"video-uploading-wrapper"},ve={key:0,class:"uploading-content"},ue={key:1,class:"error-content"},ke={key:2,class:"video-toolbar"},pe={key:0,class:"video-sidebar-section"},fe={key:1,class:"notVideo-block-preview-container"},he={key:1,class:"attachment-block-preview-unable"},ye=["src"],Ee={class:"attachment-block-preview-unable-text"},ge={style:{"font-weight":"bold"}},Ve={class:"attachment-block-preview-unable-text"},Ne={class:"attachment-block-preview-info"},we=e.defineComponent({__name:"AttachmentBlock",props:{node:{}},setup(t){const a=e.inject(m.axiosKey),i=e.useTemplateRef("videoPreviewRef"),r=e.computed(()=>t.node.attrs.uploadProgress===void 0||t.node.attrs.uploadProgress<1),{icon:c,calculatedFileSize:d,cannotPreviewImgDataUrl:f,canPreview:v,genPreviewSrc:E}=p.useAttachment(t.node.attrs.fileType,t.node.attrs.fileSize),u=N=>["mp4","avi","mkv","mov"].includes(N),o=e.ref(!1),n=async()=>{o.value=!o.value,a&&o.value&&t.node.attrs.tingwuTaskId&&await B(a,{log:JSON.stringify({name:"toggleVideoAiPanel",tingwuTaskId:t.node.attrs.tingwuTaskId,videoPageUrl:window.location.href})})},s=e.ref(!1),h=()=>{s.value=!0,alert("全屏预览功能将在后续版本中开放")},k=e.ref(!1),y=e.ref(null),w=()=>{y.value=setTimeout(()=>{k.value=!1},200)},V=()=>{y.value&&(clearTimeout(y.value),y.value=null)};return(N,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseenter:l[2]||(l[2]=g=>k.value=!0),onMouseleave:w,class:"attachment-block-container"},[t.node.attrs.dispType==="card"?(e.openBlock(),e.createElementBlock("div",X,[e.createElementVNode("div",Y,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c)),{class:"attachment-block-card-icon-svg"}))]),e.createElementVNode("div",ee,[e.createElementVNode("div",te,e.toDisplayString(t.node.attrs.fileName)+"."+e.toDisplayString(t.node.attrs.fileType),1),!r.value&&!t.node.attrs.uploadError?(e.openBlock(),e.createElementBlock("div",oe,e.toDisplayString(e.unref(d)),1)):r.value&&!t.node.attrs.uploadError?(e.openBlock(),e.createElementBlock("div",ne," 附件正在上传中,请等待... ")):(e.openBlock(),e.createElementBlock("div",ae," 附件出错,请等待管理员处理 "))]),e.createElementVNode("div",le,[e.createElementVNode("div",{class:"attachment-block-card-preview-wrapper",onClick:h},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(t.node.attrs.fileType)?x:T),{class:"attachment-block-card-preview-btn"}))])]),e.withDirectives(e.createElementVNode("div",{class:"attachment-block-card-menu",onMouseenter:V},[e.createVNode(p.AttachmentMenu,{node:t.node,"show-full-screen-dialog":s.value,"onUpdate:showFullScreenDialog":l[0]||(l[0]=g=>s.value=g)},null,8,["node","show-full-screen-dialog"])],544),[[e.vShow,k.value&&!r.value&&!t.node.attrs.uploadError]])])):t.node.attrs.dispType==="preview"?(e.openBlock(),e.createElementBlock("div",se,[u(t.node.attrs.fileType)?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",{class:e.normalizeClass(["video-block-container",{"has-sidebar":o.value}])},[e.createElementVNode("div",re,[!r.value&&!t.node.attrs.uploadError?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("video",{ref_key:"videoPreviewRef",ref:i,src:e.unref(p.resolvedFileUrl)(t.node.attrs.src),controls:"",class:"video-element"},null,8,de)])):(e.openBlock(),e.createElementBlock("div",me,[t.node.attrs.uploadError?(e.openBlock(),e.createElementBlock("div",ue,[...l[4]||(l[4]=[e.createElementVNode("span",null,"⚠️ 视频出错,请等待管理员处理",-1)])])):(e.openBlock(),e.createElementBlock("div",ve,[...l[3]||(l[3]=[e.createElementVNode("div",{class:"spinner"},null,-1),e.createElementVNode("span",null,"视频正在上传中,请等待...",-1)])]))])),!r.value&&t.node.attrs.tingwuTaskId?(e.openBlock(),e.createElementBlock("div",ke,[l[6]||(l[6]=e.createElementVNode("div",{class:"toolbar-info"},[e.createElementVNode("span",{class:"toolbar-title"},"分析"),e.createElementVNode("span",{class:"toolbar-desc"},"摘要与章节")],-1)),e.createElementVNode("button",{class:e.normalizeClass(["ai-toggle-btn",{active:o.value}]),onClick:n},[l[5]||(l[5]=e.createElementVNode("i",{class:"icon-ai"},"✨",-1)),e.createTextVNode(" "+e.toDisplayString(o.value?"收起助手":"AI 助手"),1)],2)])):e.createCommentVNode("",!0)]),o.value?(e.openBlock(),e.createElementBlock("div",pe,[e.createVNode(W,{taskId:t.node.attrs.tingwuTaskId,videoRef:i.value,onClose:l[1]||(l[1]=g=>o.value=!1)},null,8,["taskId","videoRef"])])):e.createCommentVNode("",!0)],2)])):(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("div",{class:e.normalizeClass(["attachment-block-preview-content",{"attachment-block-preview-dark-bg":!e.unref(v)}])},[e.unref(v)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.node.attrs.fileType==="pdf"?"embed":"iframe"),{key:0,class:"attachment-block-preview-iframe",src:e.unref(p.resolvedFileUrl)(e.unref(E)(t.node.attrs.src))},null,8,["src"])):(e.openBlock(),e.createElementBlock("div",he,[e.createElementVNode("img",{class:"attachment-block-preview-unable-img",src:e.unref(f),alt:"该文件类型无法预览"},null,8,ye),e.createElementVNode("div",Ee,[e.createElementVNode("strong",ge,"."+e.toDisplayString(t.node.attrs.fileType),1),l[7]||(l[7]=e.createTextVNode("文件类型无法预览 ",-1))]),e.createElementVNode("div",Ve,e.toDisplayString(t.node.attrs.fileName)+"."+e.toDisplayString(t.node.attrs.fileType)+" · "+e.toDisplayString(e.unref(d)),1)]))],2),e.createElementVNode("div",{class:e.normalizeClass(["attachment-block-preview-footer",{"attachment-block-preview-dark-bg":!e.unref(v)}])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c)),{class:"attachment-block-preview-icon-svg"})),e.createElementVNode("span",Ne,e.toDisplayString(t.node.attrs.fileName)+"."+e.toDisplayString(t.node.attrs.fileType),1)],2)])),e.withDirectives(e.createElementVNode("div",{class:"attachment-block-preview-menu",onMouseenter:V},[e.createVNode(p.AttachmentMenu,{node:t.node},null,8,["node"])],544),[[e.vShow,k.value&&!r.value&&!t.node.attrs.uploadError]])])):e.createCommentVNode("",!0)],32))}}),Be=m._export_sfc(we,[["__scopeId","data-v-6ebf6463"]]);exports.default=Be;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./AttachmentMenu-DbbJfEmt.cjs"),f=require("./index-CEnrh8_5.cjs"),m=e.defineComponent({__name:"AttachmentInline",props:{node:{}},setup(t){e.useCssVars(l=>({v4668c5a8:c.value}));const{icon:u}=s.useAttachment(t.node.attrs.fileType,t.node.attrs.fileSize),a=e.ref(null),c=e.ref("0px");e.onMounted(async()=>{const l=1.15*parseFloat(getComputedStyle(document.documentElement).fontSize);await e.nextTick(),a.value&&(c.value=`${(l+a.value.offsetWidth+2)/2}px`)});const o=e.ref(!1),n=e.ref(null),r=()=>{n.value=setTimeout(()=>{o.value=!1},200)},d=()=>{n.value&&(clearTimeout(n.value),n.value=null)};return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:"attachment-inline-container",onMouseenter:i[0]||(i[0]=h=>o.value=!0),onMouseleave:r},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(u)),{class:"attachment-inline-icon",ref:"iconRef"},null,512)),e.createElementVNode("span",{class:"attachment-inline-text",ref_key:"textRef",ref:a},e.toDisplayString(t.node.attrs.fileName)+"."+e.toDisplayString(t.node.attrs.fileType),513),e.withDirectives(e.createElementVNode("div",{class:"attachment-inline-menu",onMouseenter:d},[e.createVNode(s.AttachmentMenu,{node:t.node},null,8,["node"])],544),[[e.vShow,o.value]])],32))}}),v=f._export_sfc(m,[["__scopeId","data-v-7c608a16"]]);exports.default=v;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as v, useCssVars as h, ref as n, onMounted as p, nextTick as x, createElementBlock as y, openBlock as i, createBlock as M, createElementVNode as u, withDirectives as k, resolveDynamicComponent as A, unref as S, toDisplayString as r, createVNode as T, vShow as C } from "vue";
|
|
2
|
-
import { u as E, A as w } from "./AttachmentMenu-
|
|
3
|
-
import { _ as B } from "./index-
|
|
2
|
+
import { u as E, A as w } from "./AttachmentMenu-CGVTP1Yv.js";
|
|
3
|
+
import { _ as B } from "./index-CnHgx6Xd.js";
|
|
4
4
|
const D = /* @__PURE__ */ v({
|
|
5
5
|
__name: "AttachmentInline",
|
|
6
6
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as i, openBlock as l, createStaticVNode as n, createElementVNode as r, defineComponent as D, mergeModels as x, useModel as I, useId as u, Fragment as A, renderList as v, normalizeStyle as w, createBlock as m, resolveDynamicComponent as y } from "vue";
|
|
2
|
-
import { _ as s } from "./index-
|
|
2
|
+
import { _ as s } from "./index-CnHgx6Xd.js";
|
|
3
3
|
const T = {}, C = {
|
|
4
4
|
width: "48",
|
|
5
5
|
height: "48",
|