@l1yp/file-viewer 0.1.4 → 0.1.5
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 +2 -0
- package/dist/components/AnsiText.d.ts +47 -0
- package/dist/components/AnsiText.js +41 -0
- package/dist/components/AnsiText.js.map +1 -0
- package/dist/components/CodeView.js +1 -1
- package/dist/components/CodeView.js.map +1 -1
- package/dist/components/CodeView.vue_vue_type_script_setup_true_lang.js +80 -71
- package/dist/components/CodeView.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/DocxEmbeddedFiles.js +9 -0
- package/dist/components/DocxEmbeddedFiles.js.map +1 -0
- package/dist/components/DocxEmbeddedFiles.vue.d.ts +15 -0
- package/dist/components/DocxEmbeddedFiles.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/components/DocxEmbeddedFiles.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/DocxViewer.js +1 -1
- package/dist/components/DocxViewer.js.map +1 -1
- package/dist/components/DocxViewer.vue_vue_type_script_setup_true_lang.js +180 -50
- package/dist/components/DocxViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/FileViewerBody.js +1 -1
- package/dist/components/FileViewerBody.js.map +1 -1
- package/dist/components/FileViewerBody.vue.d.ts +1 -0
- package/dist/components/FileViewerBody.vue_vue_type_script_setup_true_lang.js +117 -114
- package/dist/components/FileViewerBody.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/FileViewerPanel.js +1 -1
- package/dist/components/FileViewerPanel.js.map +1 -1
- package/dist/components/FileViewerPanel.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/FileViewerPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/LogViewer.js +1 -1
- package/dist/components/LogViewer.js.map +1 -1
- package/dist/components/LogViewer.vue.d.ts +3 -1
- package/dist/components/LogViewer.vue_vue_type_script_setup_true_lang.js +284 -280
- package/dist/components/LogViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/lib/ansi.d.ts +44 -0
- package/dist/lib/ansi.js +224 -0
- package/dist/lib/ansi.js.map +1 -0
- package/dist/lib/cfb.d.ts +37 -0
- package/dist/lib/cfb.js +112 -0
- package/dist/lib/cfb.js.map +1 -0
- package/dist/lib/docxEmbeddedDom.d.ts +22 -0
- package/dist/lib/docxEmbeddedDom.js +128 -0
- package/dist/lib/docxEmbeddedDom.js.map +1 -0
- package/dist/lib/docxEmbeddings.d.ts +41 -0
- package/dist/lib/docxEmbeddings.js +226 -0
- package/dist/lib/docxEmbeddings.js.map +1 -0
- package/dist/lib/msi.js +62 -154
- package/dist/lib/msi.js.map +1 -1
- package/dist/lib/olePackage.d.ts +8 -0
- package/dist/lib/olePackage.js +37 -0
- package/dist/lib/olePackage.js.map +1 -0
- package/dist/lib/pptxFirstSlide.d.ts +11 -0
- package/dist/lib/pptxFirstSlide.js +34 -0
- package/dist/lib/pptxFirstSlide.js.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -5,65 +5,66 @@ import { optionalViewer as r } from "./optionalViewer.js";
|
|
|
5
5
|
import { VIEWER_FORMATTERS as i, applyFormatter as ee, findFormatter as te } from "../lib/viewerFormats.js";
|
|
6
6
|
import { parseFrontmatter as ne } from "../lib/frontmatter.js";
|
|
7
7
|
import { formatBytes as re } from "../lib/format.js";
|
|
8
|
-
import a from "
|
|
8
|
+
import { ansiPlainText as a } from "../lib/ansi.js";
|
|
9
|
+
import o from "./icons/Icon.js";
|
|
9
10
|
import ie from "./CodeView.js";
|
|
10
11
|
import ae from "./MarkdownText.js";
|
|
11
12
|
import oe from "./FrontmatterCard.js";
|
|
12
13
|
import se from "./ZoomImage.js";
|
|
13
|
-
import { Fragment as
|
|
14
|
+
import { Fragment as s, Teleport as ce, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineAsyncComponent as m, defineComponent as h, normalizeClass as g, onBeforeUnmount as le, openBlock as _, ref as v, renderList as y, toDisplayString as b, unref as x, useTemplateRef as ue, watch as S } from "vue";
|
|
14
15
|
//#region src/components/FileViewerBody.vue?vue&type=script&setup=true&lang.ts
|
|
15
|
-
var
|
|
16
|
+
var de = { class: "fvb" }, fe = {
|
|
16
17
|
key: 0,
|
|
17
18
|
class: "fvb__fmtbar"
|
|
18
|
-
},
|
|
19
|
+
}, pe = ["onClick"], me = {
|
|
19
20
|
key: 35,
|
|
20
21
|
class: "fvb__imagezoom"
|
|
21
|
-
},
|
|
22
|
+
}, he = {
|
|
22
23
|
key: 36,
|
|
23
24
|
class: "fvb__video"
|
|
24
|
-
},
|
|
25
|
+
}, ge = ["src"], _e = {
|
|
25
26
|
key: 37,
|
|
26
27
|
class: "fvb__binary"
|
|
27
|
-
},
|
|
28
|
+
}, ve = {
|
|
28
29
|
key: 0,
|
|
29
30
|
class: "fvb__binary-sub"
|
|
30
|
-
},
|
|
31
|
+
}, ye = ["href", "download"], be = { class: "fvb__openas" }, xe = { class: "fvb__openas-grid" }, Se = ["onClick"], Ce = {
|
|
31
32
|
key: 38,
|
|
32
33
|
class: "fvb__msg"
|
|
33
|
-
},
|
|
34
|
+
}, C = {
|
|
34
35
|
key: 39,
|
|
35
36
|
class: "fvb__msg fvb__msg--error"
|
|
36
|
-
},
|
|
37
|
+
}, w = {
|
|
37
38
|
key: 40,
|
|
38
39
|
class: "fvb__scroll fvb__scroll--doc"
|
|
39
|
-
},
|
|
40
|
+
}, T = { class: "fvb__markdown" }, E = {
|
|
40
41
|
key: 41,
|
|
41
42
|
class: "fvb__html"
|
|
42
|
-
},
|
|
43
|
+
}, D = { class: "fvb__htmlbar" }, O = ["title"], k = ["src", "sandbox"], A = {
|
|
43
44
|
key: 0,
|
|
44
45
|
class: "fvb__fs"
|
|
45
|
-
},
|
|
46
|
+
}, we = { class: "fvb__fsbar" }, Te = ["title"], Ee = ["src", "sandbox"], De = {
|
|
46
47
|
key: 42,
|
|
47
48
|
class: "fvb__svg"
|
|
48
|
-
},
|
|
49
|
+
}, Oe = ["src", "alt"], ke = {
|
|
49
50
|
key: 43,
|
|
50
51
|
class: "fvb__fill"
|
|
51
|
-
},
|
|
52
|
+
}, Ae = {
|
|
52
53
|
key: 44,
|
|
53
54
|
class: "fvb__fill"
|
|
54
|
-
},
|
|
55
|
+
}, je = {
|
|
55
56
|
key: 45,
|
|
56
57
|
class: "fvb__fill"
|
|
57
|
-
},
|
|
58
|
+
}, Me = {
|
|
58
59
|
key: 46,
|
|
59
60
|
class: "fvb__fill"
|
|
60
|
-
},
|
|
61
|
+
}, Ne = {
|
|
61
62
|
key: 47,
|
|
62
63
|
class: "fvb__fill"
|
|
63
|
-
},
|
|
64
|
+
}, Pe = {
|
|
64
65
|
key: 48,
|
|
65
66
|
class: "fvb__fill"
|
|
66
|
-
},
|
|
67
|
+
}, Fe = "<meta http-equiv=\"Content-Security-Policy\" content=\"script-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'\">", Ie = "<meta http-equiv=\"Content-Security-Policy\" content=\"default-src 'unsafe-inline' 'unsafe-eval' data: blob: https: http:; connect-src data: blob: https: http: ws: wss:; object-src 'none'; base-uri 'none'\">", j = /*@__PURE__*/ h({
|
|
67
68
|
__name: "FileViewerBody",
|
|
68
69
|
props: {
|
|
69
70
|
file: {},
|
|
@@ -79,23 +80,23 @@ var ue = { class: "fvb" }, de = {
|
|
|
79
80
|
"formatchange",
|
|
80
81
|
"formatpick"
|
|
81
82
|
],
|
|
82
|
-
setup(
|
|
83
|
-
let M =
|
|
83
|
+
setup(h, { expose: j, emit: Le }) {
|
|
84
|
+
let M = h, N = Le, Re = m(() => import("./ZipBrowser.js")), ze = m(() => import("./SevenZipBrowser.js")), Be = m(() => import("./ArchiveBrowser.js")), Ve = m(() => import("./BinObjBrowser.js")), He = m(() => import("./EplViewer.js")), Ue = m(() => import("./ClassViewer.js")), We = m(() => import("./HprofViewer.js")), Ge = m(() => import("./MsiViewer.js")), Ke = m(() => import("./AppxViewer.js")), qe = r(() => import("./DicomViewer.js"), "dicom-parser", "DICOM 影像"), P = r(() => import("./DocxViewer.js"), "docx-preview", "Word 文档"), Je = r(() => import("./XlsxViewer.js"), ["exceljs", "numfmt"], "Excel 表格"), Ye = r(() => import("./PptxViewer.js"), ["@aiden0z/pptx-renderer", "pdfjs-dist"], "PowerPoint"), Xe = m(() => import("./RtfViewer.js")), Ze = r(() => import("./PdfViewer.js"), "pdfjs-dist", "PDF"), Qe = m(() => import("./MindMapView.js")), $e = m(() => import("./XmindViewer.js")), et = m(() => import("./EmlViewer.js")), tt = m(() => import("./MhtViewer.js")), nt = m(() => import("./HarViewer.js")), rt = r(() => import("./SqliteViewer.js"), "sql.js", "SQLite 数据库"), it = m(() => import("./SubtitleViewer.js")), at = m(() => import("./FontViewer.js")), ot = m(() => import("./NotebookViewer.js")), st = m(() => import("./GeoViewer.js")), ct = m(() => import("./CsvViewer.js")), lt = m(() => import("./JsonlViewer.js")), ut = m(() => import("./CertViewer.js")), dt = m(() => import("./JksViewer.js")), ft = m(() => import("./AudioViewer.js")), pt = m(() => import("./QmcAudioViewer.js")), mt = m(() => import("./LrcViewer.js")), ht = m(() => import("./LogViewer.js")), gt = r(() => import("./ModelViewer.js"), "three", "3D 模型"), _t = m(() => import("./RasterViewer.js")), vt = m(() => import("./PsdViewer.js")), yt = m(() => import("./EbookViewer.js")), bt = m(() => import("./DrawioViewer.js")), xt = m(() => import("./DxfViewer.js")), St = m(() => import("./HexViewer.js")), Ct = ue("logViewer"), F = v(""), I = v(null), L = c(() => I.value ?? M.file);
|
|
84
85
|
function R(e) {
|
|
85
86
|
F.value = e.key, I.value = ee(M.file, e);
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function wt(e) {
|
|
88
89
|
let t = te(e);
|
|
89
90
|
t && R(t);
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
+
function Tt() {
|
|
92
93
|
F.value = "", I.value = null;
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
-
let z =
|
|
95
|
+
S(F, (e) => N("formatpick", e));
|
|
96
|
+
let z = v("loading"), B = v(""), V = v(""), Et = c(() => L.value.mindmap === !0 && z.value === "ready" && t(B.value, e(L.value.name))), H = c(() => L.value.lang === "markdown" ? ne(B.value) : {
|
|
96
97
|
data: {},
|
|
97
98
|
body: B.value
|
|
98
|
-
}),
|
|
99
|
+
}), Dt = c(() => Object.keys(H.value.data).length > 0), Ot = c(() => B.value.replace(/\n$/, "")), kt = c(() => B.value ? `data:image/svg+xml,${encodeURIComponent(B.value)}` : "");
|
|
99
100
|
function U(e, t) {
|
|
100
101
|
let n = e.match(/<head[^>]*>/i);
|
|
101
102
|
if (n) {
|
|
@@ -104,24 +105,24 @@ var ue = { class: "fvb" }, de = {
|
|
|
104
105
|
}
|
|
105
106
|
return `<!doctype html><html><head><meta charset="utf-8">${t}</head><body>${e}</body></html>`;
|
|
106
107
|
}
|
|
107
|
-
let W =
|
|
108
|
+
let W = v(""), G = v(""), K = v(!1), q = v(!1), J = c(() => K.value ? G.value : W.value), Y = c(() => M.htmlPreview ?? B.value);
|
|
108
109
|
function X() {
|
|
109
110
|
W.value &&= (URL.revokeObjectURL(W.value), ""), G.value &&= (URL.revokeObjectURL(G.value), "");
|
|
110
111
|
}
|
|
111
|
-
|
|
112
|
-
X(), K.value = !1, q.value = !1, e && typeof URL < "u" && URL.createObjectURL && (W.value = URL.createObjectURL(new Blob([U(t,
|
|
112
|
+
S([() => L.value.html, Y], ([e, t]) => {
|
|
113
|
+
X(), K.value = !1, q.value = !1, e && typeof URL < "u" && URL.createObjectURL && (W.value = URL.createObjectURL(new Blob([U(t, Fe)], { type: "text/html" })));
|
|
113
114
|
});
|
|
114
115
|
function Z() {
|
|
115
116
|
if (K.value) {
|
|
116
117
|
K.value = !1;
|
|
117
118
|
return;
|
|
118
119
|
}
|
|
119
|
-
typeof URL < "u" && URL.createObjectURL && !G.value && (G.value = URL.createObjectURL(new Blob([U(Y.value,
|
|
120
|
+
typeof URL < "u" && URL.createObjectURL && !G.value && (G.value = URL.createObjectURL(new Blob([U(Y.value, Ie)], { type: "text/html" }))), K.value = !0;
|
|
120
121
|
}
|
|
121
122
|
function Q(e) {
|
|
122
123
|
e.key === "Escape" && (q.value = !1);
|
|
123
124
|
}
|
|
124
|
-
|
|
125
|
+
S(q, (e) => {
|
|
125
126
|
typeof window > "u" || (e ? (window.addEventListener("keydown", Q), document.body.style.overflow = "hidden") : (window.removeEventListener("keydown", Q), document.body.style.overflow = ""));
|
|
126
127
|
});
|
|
127
128
|
async function $(e = !1) {
|
|
@@ -131,7 +132,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
131
132
|
return;
|
|
132
133
|
}
|
|
133
134
|
if (t.content != null) {
|
|
134
|
-
B.value = t.content, z.value = "ready", N("loaded", t.content);
|
|
135
|
+
B.value = t.content, z.value = "ready", N("loaded", a(t.content));
|
|
135
136
|
return;
|
|
136
137
|
}
|
|
137
138
|
if (!t.url) {
|
|
@@ -143,38 +144,39 @@ var ue = { class: "fvb" }, de = {
|
|
|
143
144
|
let n = await fetch(t.url, e ? { cache: "no-store" } : {});
|
|
144
145
|
if (!n.ok) throw Error(`HTTP ${n.status}`);
|
|
145
146
|
let r = await n.text();
|
|
146
|
-
B.value = r, z.value = "ready", N("loaded", r);
|
|
147
|
+
B.value = r, z.value = "ready", N("loaded", a(r));
|
|
147
148
|
} catch (e) {
|
|
148
149
|
V.value = String(e), z.value = "error";
|
|
149
150
|
}
|
|
150
151
|
}
|
|
151
|
-
return
|
|
152
|
+
return S(() => M.file, () => {
|
|
152
153
|
I.value = null, F.value = "";
|
|
153
|
-
}),
|
|
154
|
+
}), S(L, (e) => {
|
|
154
155
|
N("formatchange", e), $();
|
|
155
156
|
}, { immediate: !0 }), le(() => {
|
|
156
157
|
X(), typeof window < "u" && (window.removeEventListener("keydown", Q), document.body.style.overflow = "");
|
|
157
158
|
}), j({
|
|
158
159
|
reload: () => $(!0),
|
|
159
|
-
pickFormat:
|
|
160
|
-
resetFormat:
|
|
161
|
-
|
|
160
|
+
pickFormat: wt,
|
|
161
|
+
resetFormat: Tt,
|
|
162
|
+
copyText: () => L.value.log ? Ct.value?.copyText() ?? "" : a(B.value)
|
|
163
|
+
}), (e, t) => (_(), d("div", de, [I.value && !h.hostChooser ? (_(), d("div", fe, [t[3] ||= f("span", { class: "fvb__fmtbar-label" }, "格式", -1), (_(!0), d(s, null, y(x(i), (e) => (_(), d("button", {
|
|
162
164
|
key: e.key,
|
|
163
165
|
type: "button",
|
|
164
|
-
class:
|
|
166
|
+
class: g(["fvb__fmtchip", { "fvb__fmtchip--on": F.value === e.key }]),
|
|
165
167
|
onClick: (t) => R(e)
|
|
166
|
-
}, [
|
|
168
|
+
}, [p(o, {
|
|
167
169
|
name: e.icon,
|
|
168
170
|
size: 13
|
|
169
|
-
}, null, 8, ["name"]),
|
|
171
|
+
}, null, 8, ["name"]), f("span", null, b(e.label), 1)], 10, pe))), 128))])) : u("", !0), L.value.zip ? (_(), l(x(Re), {
|
|
170
172
|
key: 1,
|
|
171
173
|
url: L.value.url ?? "",
|
|
172
174
|
name: L.value.name
|
|
173
|
-
}, null, 8, ["url", "name"])) : L.value.sevenZip ? (
|
|
175
|
+
}, null, 8, ["url", "name"])) : L.value.sevenZip ? (_(), l(x(ze), {
|
|
174
176
|
key: 2,
|
|
175
177
|
url: L.value.url ?? "",
|
|
176
178
|
name: L.value.name
|
|
177
|
-
}, null, 8, ["url", "name"])) : L.value.archive ? (
|
|
179
|
+
}, null, 8, ["url", "name"])) : L.value.archive ? (_(), l(x(Be), {
|
|
178
180
|
key: 3,
|
|
179
181
|
url: L.value.url ?? "",
|
|
180
182
|
name: L.value.name,
|
|
@@ -183,7 +185,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
183
185
|
"url",
|
|
184
186
|
"name",
|
|
185
187
|
"kind"
|
|
186
|
-
])) : L.value.binobj ? (
|
|
188
|
+
])) : L.value.binobj ? (_(), l(x(Ve), {
|
|
187
189
|
key: 4,
|
|
188
190
|
url: L.value.url ?? "",
|
|
189
191
|
name: L.value.name,
|
|
@@ -192,7 +194,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
192
194
|
"url",
|
|
193
195
|
"name",
|
|
194
196
|
"size"
|
|
195
|
-
])) : L.value.epl ? (
|
|
197
|
+
])) : L.value.epl ? (_(), l(x(He), {
|
|
196
198
|
key: 5,
|
|
197
199
|
url: L.value.url ?? "",
|
|
198
200
|
name: L.value.name,
|
|
@@ -201,7 +203,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
201
203
|
"url",
|
|
202
204
|
"name",
|
|
203
205
|
"size"
|
|
204
|
-
])) : L.value.javaClass ? (
|
|
206
|
+
])) : L.value.javaClass ? (_(), l(x(Ue), {
|
|
205
207
|
key: 6,
|
|
206
208
|
url: L.value.url ?? "",
|
|
207
209
|
name: L.value.name,
|
|
@@ -210,7 +212,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
210
212
|
"url",
|
|
211
213
|
"name",
|
|
212
214
|
"size"
|
|
213
|
-
])) : L.value.hprof ? (
|
|
215
|
+
])) : L.value.hprof ? (_(), l(x(We), {
|
|
214
216
|
key: 7,
|
|
215
217
|
url: L.value.url ?? "",
|
|
216
218
|
name: L.value.name,
|
|
@@ -219,7 +221,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
219
221
|
"url",
|
|
220
222
|
"name",
|
|
221
223
|
"size"
|
|
222
|
-
])) : L.value.msi ? (
|
|
224
|
+
])) : L.value.msi ? (_(), l(x(Ge), {
|
|
223
225
|
key: 8,
|
|
224
226
|
url: L.value.url ?? "",
|
|
225
227
|
name: L.value.name,
|
|
@@ -228,7 +230,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
228
230
|
"url",
|
|
229
231
|
"name",
|
|
230
232
|
"size"
|
|
231
|
-
])) : L.value.appx ? (
|
|
233
|
+
])) : L.value.appx ? (_(), l(x(Ke), {
|
|
232
234
|
key: 9,
|
|
233
235
|
url: L.value.url ?? "",
|
|
234
236
|
name: L.value.name,
|
|
@@ -237,7 +239,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
237
239
|
"url",
|
|
238
240
|
"name",
|
|
239
241
|
"size"
|
|
240
|
-
])) : L.value.xmind ? (
|
|
242
|
+
])) : L.value.xmind ? (_(), l(x($e), {
|
|
241
243
|
key: 10,
|
|
242
244
|
url: L.value.url ?? "",
|
|
243
245
|
name: L.value.name,
|
|
@@ -246,7 +248,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
246
248
|
"url",
|
|
247
249
|
"name",
|
|
248
250
|
"size"
|
|
249
|
-
])) : L.value.dxf ? (
|
|
251
|
+
])) : L.value.dxf ? (_(), l(x(xt), {
|
|
250
252
|
key: 11,
|
|
251
253
|
url: L.value.url ?? "",
|
|
252
254
|
name: L.value.name,
|
|
@@ -255,7 +257,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
255
257
|
"url",
|
|
256
258
|
"name",
|
|
257
259
|
"size"
|
|
258
|
-
])) : L.value.dicom ? (
|
|
260
|
+
])) : L.value.dicom ? (_(), l(x(qe), {
|
|
259
261
|
key: 12,
|
|
260
262
|
url: L.value.url ?? "",
|
|
261
263
|
name: L.value.name,
|
|
@@ -264,7 +266,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
264
266
|
"url",
|
|
265
267
|
"name",
|
|
266
268
|
"size"
|
|
267
|
-
])) : L.value.docx ? (
|
|
269
|
+
])) : L.value.docx ? (_(), l(x(P), {
|
|
268
270
|
key: 13,
|
|
269
271
|
url: L.value.url ?? "",
|
|
270
272
|
name: L.value.name,
|
|
@@ -273,7 +275,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
273
275
|
"url",
|
|
274
276
|
"name",
|
|
275
277
|
"size"
|
|
276
|
-
])) : L.value.xlsx ? (
|
|
278
|
+
])) : L.value.xlsx ? (_(), l(x(Je), {
|
|
277
279
|
key: 14,
|
|
278
280
|
url: L.value.url ?? "",
|
|
279
281
|
name: L.value.name,
|
|
@@ -282,7 +284,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
282
284
|
"url",
|
|
283
285
|
"name",
|
|
284
286
|
"size"
|
|
285
|
-
])) : L.value.pptx ? (
|
|
287
|
+
])) : L.value.pptx ? (_(), l(x(Ye), {
|
|
286
288
|
key: 15,
|
|
287
289
|
url: L.value.url ?? "",
|
|
288
290
|
name: L.value.name,
|
|
@@ -291,7 +293,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
291
293
|
"url",
|
|
292
294
|
"name",
|
|
293
295
|
"size"
|
|
294
|
-
])) : L.value.rtf ? (
|
|
296
|
+
])) : L.value.rtf ? (_(), l(x(Xe), {
|
|
295
297
|
key: 16,
|
|
296
298
|
url: L.value.url ?? "",
|
|
297
299
|
name: L.value.name,
|
|
@@ -300,7 +302,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
300
302
|
"url",
|
|
301
303
|
"name",
|
|
302
304
|
"size"
|
|
303
|
-
])) : L.value.pdf ? (
|
|
305
|
+
])) : L.value.pdf ? (_(), l(x(Ze), {
|
|
304
306
|
key: 17,
|
|
305
307
|
url: L.value.url ?? "",
|
|
306
308
|
name: L.value.name,
|
|
@@ -309,7 +311,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
309
311
|
"url",
|
|
310
312
|
"name",
|
|
311
313
|
"size"
|
|
312
|
-
])) : L.value.eml ? (
|
|
314
|
+
])) : L.value.eml ? (_(), l(x(et), {
|
|
313
315
|
key: 18,
|
|
314
316
|
url: L.value.url ?? "",
|
|
315
317
|
name: L.value.name,
|
|
@@ -318,7 +320,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
318
320
|
"url",
|
|
319
321
|
"name",
|
|
320
322
|
"size"
|
|
321
|
-
])) : L.value.mht ? (
|
|
323
|
+
])) : L.value.mht ? (_(), l(x(tt), {
|
|
322
324
|
key: 19,
|
|
323
325
|
url: L.value.url ?? "",
|
|
324
326
|
name: L.value.name,
|
|
@@ -327,7 +329,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
327
329
|
"url",
|
|
328
330
|
"name",
|
|
329
331
|
"size"
|
|
330
|
-
])) : L.value.har ? (
|
|
332
|
+
])) : L.value.har ? (_(), l(x(nt), {
|
|
331
333
|
key: 20,
|
|
332
334
|
url: L.value.url ?? "",
|
|
333
335
|
name: L.value.name,
|
|
@@ -336,7 +338,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
336
338
|
"url",
|
|
337
339
|
"name",
|
|
338
340
|
"size"
|
|
339
|
-
])) : L.value.sqlite ? (
|
|
341
|
+
])) : L.value.sqlite ? (_(), l(x(rt), {
|
|
340
342
|
key: 21,
|
|
341
343
|
url: L.value.url ?? "",
|
|
342
344
|
name: L.value.name,
|
|
@@ -345,7 +347,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
345
347
|
"url",
|
|
346
348
|
"name",
|
|
347
349
|
"size"
|
|
348
|
-
])) : L.value.cert ? (
|
|
350
|
+
])) : L.value.cert ? (_(), l(x(ut), {
|
|
349
351
|
key: 22,
|
|
350
352
|
url: L.value.url ?? "",
|
|
351
353
|
name: L.value.name,
|
|
@@ -354,7 +356,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
354
356
|
"url",
|
|
355
357
|
"name",
|
|
356
358
|
"size"
|
|
357
|
-
])) : L.value.jks ? (
|
|
359
|
+
])) : L.value.jks ? (_(), l(x(dt), {
|
|
358
360
|
key: 23,
|
|
359
361
|
url: L.value.url ?? "",
|
|
360
362
|
name: L.value.name,
|
|
@@ -363,7 +365,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
363
365
|
"url",
|
|
364
366
|
"name",
|
|
365
367
|
"size"
|
|
366
|
-
])) : L.value.font ? (
|
|
368
|
+
])) : L.value.font ? (_(), l(x(at), {
|
|
367
369
|
key: 24,
|
|
368
370
|
url: L.value.url ?? "",
|
|
369
371
|
name: L.value.name,
|
|
@@ -372,7 +374,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
372
374
|
"url",
|
|
373
375
|
"name",
|
|
374
376
|
"size"
|
|
375
|
-
])) : L.value.ipynb ? (
|
|
377
|
+
])) : L.value.ipynb ? (_(), l(x(ot), {
|
|
376
378
|
key: 25,
|
|
377
379
|
url: L.value.url ?? "",
|
|
378
380
|
name: L.value.name,
|
|
@@ -381,7 +383,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
381
383
|
"url",
|
|
382
384
|
"name",
|
|
383
385
|
"size"
|
|
384
|
-
])) : L.value.audio ? (
|
|
386
|
+
])) : L.value.audio ? (_(), l(x(ft), {
|
|
385
387
|
key: 26,
|
|
386
388
|
url: L.value.url ?? "",
|
|
387
389
|
name: L.value.name,
|
|
@@ -390,7 +392,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
390
392
|
"url",
|
|
391
393
|
"name",
|
|
392
394
|
"size"
|
|
393
|
-
])) : L.value.qmc ? (
|
|
395
|
+
])) : L.value.qmc ? (_(), l(x(pt), {
|
|
394
396
|
key: 27,
|
|
395
397
|
url: L.value.url ?? "",
|
|
396
398
|
name: L.value.name,
|
|
@@ -399,7 +401,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
399
401
|
"url",
|
|
400
402
|
"name",
|
|
401
403
|
"size"
|
|
402
|
-
])) : L.value.lrc ? (
|
|
404
|
+
])) : L.value.lrc ? (_(), l(x(mt), {
|
|
403
405
|
key: 28,
|
|
404
406
|
url: L.value.url ?? "",
|
|
405
407
|
name: L.value.name,
|
|
@@ -408,8 +410,9 @@ var ue = { class: "fvb" }, de = {
|
|
|
408
410
|
"url",
|
|
409
411
|
"name",
|
|
410
412
|
"size"
|
|
411
|
-
])) : L.value.log ? (
|
|
413
|
+
])) : L.value.log ? (_(), l(x(ht), {
|
|
412
414
|
key: 29,
|
|
415
|
+
ref: "logViewer",
|
|
413
416
|
url: L.value.url ?? "",
|
|
414
417
|
name: L.value.name,
|
|
415
418
|
size: L.value.size
|
|
@@ -417,7 +420,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
417
420
|
"url",
|
|
418
421
|
"name",
|
|
419
422
|
"size"
|
|
420
|
-
])) : L.value.model ? (
|
|
423
|
+
])) : L.value.model ? (_(), l(x(gt), {
|
|
421
424
|
key: 30,
|
|
422
425
|
url: L.value.url ?? "",
|
|
423
426
|
name: L.value.name,
|
|
@@ -426,7 +429,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
426
429
|
"url",
|
|
427
430
|
"name",
|
|
428
431
|
"size"
|
|
429
|
-
])) : L.value.raster === "psd" ? (
|
|
432
|
+
])) : L.value.raster === "psd" ? (_(), l(x(vt), {
|
|
430
433
|
key: 31,
|
|
431
434
|
url: L.value.url ?? "",
|
|
432
435
|
name: L.value.name,
|
|
@@ -435,7 +438,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
435
438
|
"url",
|
|
436
439
|
"name",
|
|
437
440
|
"size"
|
|
438
|
-
])) : L.value.raster ? (
|
|
441
|
+
])) : L.value.raster ? (_(), l(x(_t), {
|
|
439
442
|
key: 32,
|
|
440
443
|
url: L.value.url ?? "",
|
|
441
444
|
name: L.value.name,
|
|
@@ -446,7 +449,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
446
449
|
"name",
|
|
447
450
|
"size",
|
|
448
451
|
"kind"
|
|
449
|
-
])) : L.value.ebook ? (
|
|
452
|
+
])) : L.value.ebook ? (_(), l(x(yt), {
|
|
450
453
|
key: 33,
|
|
451
454
|
url: L.value.url ?? "",
|
|
452
455
|
name: L.value.name,
|
|
@@ -457,7 +460,7 @@ var ue = { class: "fvb" }, de = {
|
|
|
457
460
|
"name",
|
|
458
461
|
"size",
|
|
459
462
|
"kind"
|
|
460
|
-
])) : L.value.hex ? (
|
|
463
|
+
])) : L.value.hex ? (_(), l(x(St), {
|
|
461
464
|
key: 34,
|
|
462
465
|
url: L.value.url ?? "",
|
|
463
466
|
name: L.value.name,
|
|
@@ -466,64 +469,64 @@ var ue = { class: "fvb" }, de = {
|
|
|
466
469
|
"url",
|
|
467
470
|
"name",
|
|
468
471
|
"size"
|
|
469
|
-
])) : L.value.image ? (
|
|
472
|
+
])) : L.value.image ? (_(), d("div", me, [p(se, {
|
|
470
473
|
src: L.value.url ?? "",
|
|
471
474
|
alt: L.value.name
|
|
472
|
-
}, null, 8, ["src", "alt"])])) : L.value.video ? (
|
|
475
|
+
}, null, 8, ["src", "alt"])])) : L.value.video ? (_(), d("div", he, [f("video", {
|
|
473
476
|
class: "fvb__videoel",
|
|
474
477
|
src: L.value.url ?? "",
|
|
475
478
|
controls: "",
|
|
476
479
|
preload: "metadata"
|
|
477
|
-
}, null, 8,
|
|
478
|
-
|
|
480
|
+
}, null, 8, ge)])) : L.value.binary ? (_(), d("div", _e, [
|
|
481
|
+
p(o, {
|
|
479
482
|
name: "archive",
|
|
480
483
|
size: 34
|
|
481
484
|
}),
|
|
482
|
-
t[5] ||=
|
|
483
|
-
L.value.size ? (
|
|
484
|
-
|
|
485
|
+
t[5] ||= f("p", null, "无法预览的二进制文件", -1),
|
|
486
|
+
L.value.size ? (_(), d("p", ve, b(x(re)(L.value.size)), 1)) : u("", !0),
|
|
487
|
+
f("a", {
|
|
485
488
|
class: "fvb__dlbtn",
|
|
486
489
|
href: L.value.url,
|
|
487
490
|
download: L.value.name
|
|
488
|
-
}, "下载", 8,
|
|
489
|
-
|
|
491
|
+
}, "下载", 8, ye),
|
|
492
|
+
f("div", be, [t[4] ||= f("span", { class: "fvb__openas-label" }, "用查看器打开:", -1), f("div", xe, [(_(!0), d(s, null, y(x(i), (e) => (_(), d("button", {
|
|
490
493
|
key: e.key,
|
|
491
494
|
type: "button",
|
|
492
495
|
class: "fvb__fmtchip",
|
|
493
496
|
onClick: (t) => R(e)
|
|
494
|
-
}, [
|
|
497
|
+
}, [p(o, {
|
|
495
498
|
name: e.icon,
|
|
496
499
|
size: 13
|
|
497
|
-
}, null, 8, ["name"]),
|
|
498
|
-
])) : z.value === "loading" ? (
|
|
500
|
+
}, null, 8, ["name"]), f("span", null, b(e.label), 1)], 8, Se))), 128))])])
|
|
501
|
+
])) : z.value === "loading" ? (_(), d("p", Ce, "加载文件中…")) : z.value === "error" ? (_(), d("div", C, [f("p", null, "加载失败:" + b(V.value), 1), f("button", {
|
|
499
502
|
type: "button",
|
|
500
503
|
class: "fvb__retry",
|
|
501
504
|
onClick: t[0] ||= (e) => $(!0)
|
|
502
|
-
}, "重试")])) : L.value.lang === "markdown" &&
|
|
505
|
+
}, "重试")])) : L.value.lang === "markdown" && h.mode === "render" ? (_(), d("div", w, [f("div", T, [Dt.value ? (_(), l(oe, {
|
|
503
506
|
key: 0,
|
|
504
507
|
data: H.value.data
|
|
505
|
-
}, null, 8, ["data"])) :
|
|
508
|
+
}, null, 8, ["data"])) : u("", !0), p(x(ae), {
|
|
506
509
|
text: H.value.body,
|
|
507
510
|
kp: "fv"
|
|
508
|
-
}, null, 8, ["text"])])])) : L.value.html &&
|
|
509
|
-
|
|
511
|
+
}, null, 8, ["text"])])])) : L.value.html && h.mode === "render" ? (_(), d("div", E, [
|
|
512
|
+
f("div", D, [f("button", {
|
|
510
513
|
type: "button",
|
|
511
|
-
class:
|
|
514
|
+
class: g(["fvb__htmlbtn", { "fvb__htmlbtn--on": K.value }]),
|
|
512
515
|
title: K.value ? "交互脚本已启用(点击禁用)—— 隔离沙箱内运行:可加载外部 CDN 并发起网络请求(fetch/XHR/WebSocket),但无法访问本站会话 / cookie(不透明源隔离)" : "启用交互脚本(隔离沙箱执行:可加载 CDN、可联网,但无法访问本站会话 / cookie;建议先切到源码视图审查再启用)",
|
|
513
516
|
onClick: Z
|
|
514
|
-
}, [
|
|
517
|
+
}, [p(o, {
|
|
515
518
|
name: "play",
|
|
516
519
|
size: 13
|
|
517
|
-
})], 10,
|
|
520
|
+
})], 10, O), f("button", {
|
|
518
521
|
type: "button",
|
|
519
522
|
class: "fvb__htmlbtn",
|
|
520
523
|
title: "全屏预览(在应用内放大查看;可在全屏内开启交互脚本)",
|
|
521
524
|
onClick: t[1] ||= (e) => q.value = !0
|
|
522
|
-
}, [
|
|
525
|
+
}, [p(o, {
|
|
523
526
|
name: "maximize",
|
|
524
527
|
size: 13
|
|
525
528
|
})])]),
|
|
526
|
-
(
|
|
529
|
+
(_(), d("iframe", {
|
|
527
530
|
key: K.value ? "interactive" : "inert",
|
|
528
531
|
class: "fvb__frame",
|
|
529
532
|
src: J.value,
|
|
@@ -531,52 +534,52 @@ var ue = { class: "fvb" }, de = {
|
|
|
531
534
|
sandbox: K.value ? "allow-scripts" : "",
|
|
532
535
|
loading: "lazy",
|
|
533
536
|
referrerpolicy: "no-referrer"
|
|
534
|
-
}, null, 8,
|
|
535
|
-
(
|
|
537
|
+
}, null, 8, k)),
|
|
538
|
+
(_(), l(ce, { to: "body" }, [q.value ? (_(), d("div", A, [f("div", we, [f("button", {
|
|
536
539
|
type: "button",
|
|
537
|
-
class:
|
|
540
|
+
class: g(["fvb__htmlbtn", { "fvb__htmlbtn--on": K.value }]),
|
|
538
541
|
title: K.value ? "交互脚本已启用(点击禁用)—— 隔离沙箱内运行,可联网但访问不到本站会话 / cookie" : "启用交互脚本(隔离沙箱执行:可加载 CDN、可联网,访问不到本站会话 / cookie)",
|
|
539
542
|
onClick: Z
|
|
540
|
-
}, [
|
|
543
|
+
}, [p(o, {
|
|
541
544
|
name: "play",
|
|
542
545
|
size: 15
|
|
543
|
-
})], 10,
|
|
546
|
+
})], 10, Te), f("button", {
|
|
544
547
|
type: "button",
|
|
545
548
|
class: "fvb__htmlbtn",
|
|
546
549
|
title: "关闭全屏 (Esc)",
|
|
547
550
|
onClick: t[2] ||= (e) => q.value = !1
|
|
548
|
-
}, [
|
|
551
|
+
}, [p(o, {
|
|
549
552
|
name: "close",
|
|
550
553
|
size: 15,
|
|
551
554
|
"stroke-width": 2.2
|
|
552
|
-
})])]), (
|
|
555
|
+
})])]), (_(), d("iframe", {
|
|
553
556
|
key: K.value ? "fs-interactive" : "fs-inert",
|
|
554
557
|
class: "fvb__fsframe",
|
|
555
558
|
src: J.value,
|
|
556
559
|
title: "HTML 全屏预览",
|
|
557
560
|
sandbox: K.value ? "allow-scripts" : "",
|
|
558
561
|
referrerpolicy: "no-referrer"
|
|
559
|
-
}, null, 8,
|
|
560
|
-
])) : L.value.svg &&
|
|
562
|
+
}, null, 8, Ee))])) : u("", !0)]))
|
|
563
|
+
])) : L.value.svg && h.mode === "render" ? (_(), d("div", De, [f("img", {
|
|
561
564
|
class: "fvb__svgimg",
|
|
562
|
-
src:
|
|
565
|
+
src: kt.value,
|
|
563
566
|
alt: L.value.name
|
|
564
|
-
}, null, 8,
|
|
567
|
+
}, null, 8, Oe)])) : Et.value && h.mode === "render" ? (_(), d("div", ke, [p(x(Qe), {
|
|
565
568
|
text: B.value,
|
|
566
569
|
name: L.value.name
|
|
567
|
-
}, null, 8, ["text", "name"])])) : L.value.subtitle &&
|
|
570
|
+
}, null, 8, ["text", "name"])])) : L.value.subtitle && h.mode === "render" ? (_(), d("div", Ae, [p(x(it), {
|
|
568
571
|
text: B.value,
|
|
569
572
|
name: L.value.name
|
|
570
|
-
}, null, 8, ["text", "name"])])) : L.value.geo &&
|
|
573
|
+
}, null, 8, ["text", "name"])])) : L.value.geo && h.mode === "render" ? (_(), d("div", je, [p(x(st), {
|
|
571
574
|
text: B.value,
|
|
572
575
|
name: L.value.name
|
|
573
|
-
}, null, 8, ["text", "name"])])) : L.value.csv &&
|
|
576
|
+
}, null, 8, ["text", "name"])])) : L.value.csv && h.mode === "render" ? (_(), d("div", Me, [p(x(ct), {
|
|
574
577
|
text: B.value,
|
|
575
578
|
name: L.value.name
|
|
576
|
-
}, null, 8, ["text", "name"])])) : L.value.jsonl &&
|
|
579
|
+
}, null, 8, ["text", "name"])])) : L.value.jsonl && h.mode === "render" ? (_(), d("div", Ne, [p(x(lt), {
|
|
577
580
|
text: B.value,
|
|
578
581
|
name: L.value.name
|
|
579
|
-
}, null, 8, ["text", "name"])])) : L.value.diagram &&
|
|
582
|
+
}, null, 8, ["text", "name"])])) : L.value.diagram && h.mode === "render" ? (_(), d("div", Pe, [p(x(bt), {
|
|
580
583
|
text: B.value,
|
|
581
584
|
name: L.value.name,
|
|
582
585
|
kind: L.value.diagram
|
|
@@ -584,9 +587,9 @@ var ue = { class: "fvb" }, de = {
|
|
|
584
587
|
"text",
|
|
585
588
|
"name",
|
|
586
589
|
"kind"
|
|
587
|
-
])])) : (
|
|
590
|
+
])])) : (_(), l(ie, {
|
|
588
591
|
key: 49,
|
|
589
|
-
code:
|
|
592
|
+
code: Ot.value,
|
|
590
593
|
lang: L.value.lang ?? "",
|
|
591
594
|
name: L.value.name
|
|
592
595
|
}, null, 8, [
|