@huyooo/file-explorer-frontend-vue 0.4.10 → 0.4.12
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/components/CompressDialog.vue.d.ts.map +1 -1
- package/dist/components/FileInfoDialog.vue.d.ts.map +1 -1
- package/dist/components/FileListView.vue.d.ts.map +1 -1
- package/dist/components/ProgressDialog.vue.d.ts.map +1 -1
- package/dist/components/Window.vue.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1096 -2224
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
- package/src/components/CompressDialog.vue +4 -4
- package/src/components/FileInfoDialog.vue +6 -19
- package/src/components/FileListView.vue +2 -2
- package/src/components/ProgressDialog.vue +9 -9
- package/src/components/Window.vue +4 -4
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as q, computed as F, createElementBlock as h, openBlock as a, normalizeClass as B, createVNode as N, unref as O, withModifiers as R, Fragment as G, renderList as J, createElementVNode as s, createBlock as H, createCommentVNode as j, withKeys as ce, toDisplayString as z, createTextVNode as te, ref as D, renderSlot as Z, watch as ee, nextTick as fe, onUnmounted as ne, Teleport as ie, normalizeStyle as de, onMounted as ve, withDirectives as se, vModelText as we, vModelSelect as ye, vModelRadio as ke, vModelDynamic as xe, vModelCheckbox as $e } from "vue";
|
|
2
|
+
import { Icon as T } from "@iconify/vue";
|
|
3
|
+
const d = {
|
|
4
4
|
FOLDER: "folder",
|
|
5
5
|
FILE: "file",
|
|
6
6
|
IMAGE: "image",
|
|
@@ -13,1189 +13,7 @@ const w = {
|
|
|
13
13
|
ARCHIVE: "archive",
|
|
14
14
|
APPLICATION: "application",
|
|
15
15
|
UNKNOWN: "unknown"
|
|
16
|
-
},
|
|
17
|
-
const n = e.split(":");
|
|
18
|
-
if (e.slice(0, 1) === "@") {
|
|
19
|
-
if (n.length < 2 || n.length > 3)
|
|
20
|
-
return null;
|
|
21
|
-
i = n.shift().slice(1);
|
|
22
|
-
}
|
|
23
|
-
if (n.length > 3 || !n.length)
|
|
24
|
-
return null;
|
|
25
|
-
if (n.length > 1) {
|
|
26
|
-
const p = n.pop(), c = n.pop(), a = {
|
|
27
|
-
// Allow provider without '@': "provider:prefix:name"
|
|
28
|
-
provider: n.length > 0 ? n[0] : i,
|
|
29
|
-
prefix: c,
|
|
30
|
-
name: p
|
|
31
|
-
};
|
|
32
|
-
return s && !me(a) ? null : a;
|
|
33
|
-
}
|
|
34
|
-
const o = n[0], l = o.split("-");
|
|
35
|
-
if (l.length > 1) {
|
|
36
|
-
const p = {
|
|
37
|
-
provider: i,
|
|
38
|
-
prefix: l.shift(),
|
|
39
|
-
name: l.join("-")
|
|
40
|
-
};
|
|
41
|
-
return s && !me(p) ? null : p;
|
|
42
|
-
}
|
|
43
|
-
if (t && i === "") {
|
|
44
|
-
const p = {
|
|
45
|
-
provider: i,
|
|
46
|
-
prefix: "",
|
|
47
|
-
name: o
|
|
48
|
-
};
|
|
49
|
-
return s && !me(p, t) ? null : p;
|
|
50
|
-
}
|
|
51
|
-
return null;
|
|
52
|
-
}, me = (e, s) => e ? !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
|
|
53
|
-
// Check name: cannot be empty
|
|
54
|
-
((s && e.prefix === "" || e.prefix) && e.name) : !1, et = Object.freeze(
|
|
55
|
-
{
|
|
56
|
-
left: 0,
|
|
57
|
-
top: 0,
|
|
58
|
-
width: 16,
|
|
59
|
-
height: 16
|
|
60
|
-
}
|
|
61
|
-
), be = Object.freeze({
|
|
62
|
-
rotate: 0,
|
|
63
|
-
vFlip: !1,
|
|
64
|
-
hFlip: !1
|
|
65
|
-
}), ke = Object.freeze({
|
|
66
|
-
...et,
|
|
67
|
-
...be
|
|
68
|
-
}), Ce = Object.freeze({
|
|
69
|
-
...ke,
|
|
70
|
-
body: "",
|
|
71
|
-
hidden: !1
|
|
72
|
-
});
|
|
73
|
-
function Mt(e, s) {
|
|
74
|
-
const t = {};
|
|
75
|
-
!e.hFlip != !s.hFlip && (t.hFlip = !0), !e.vFlip != !s.vFlip && (t.vFlip = !0);
|
|
76
|
-
const i = ((e.rotate || 0) + (s.rotate || 0)) % 4;
|
|
77
|
-
return i && (t.rotate = i), t;
|
|
78
|
-
}
|
|
79
|
-
function Ae(e, s) {
|
|
80
|
-
const t = Mt(e, s);
|
|
81
|
-
for (const i in Ce)
|
|
82
|
-
i in be ? i in e && !(i in t) && (t[i] = be[i]) : i in s ? t[i] = s[i] : i in e && (t[i] = e[i]);
|
|
83
|
-
return t;
|
|
84
|
-
}
|
|
85
|
-
function St(e, s) {
|
|
86
|
-
const t = e.icons, i = e.aliases || /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
|
|
87
|
-
function o(l) {
|
|
88
|
-
if (t[l])
|
|
89
|
-
return n[l] = [];
|
|
90
|
-
if (!(l in n)) {
|
|
91
|
-
n[l] = null;
|
|
92
|
-
const p = i[l] && i[l].parent, c = p && o(p);
|
|
93
|
-
c && (n[l] = [p].concat(c));
|
|
94
|
-
}
|
|
95
|
-
return n[l];
|
|
96
|
-
}
|
|
97
|
-
return Object.keys(t).concat(Object.keys(i)).forEach(o), n;
|
|
98
|
-
}
|
|
99
|
-
function Dt(e, s, t) {
|
|
100
|
-
const i = e.icons, n = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
101
|
-
let o = {};
|
|
102
|
-
function l(p) {
|
|
103
|
-
o = Ae(
|
|
104
|
-
i[p] || n[p],
|
|
105
|
-
o
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
return l(s), t.forEach(l), Ae(e, o);
|
|
109
|
-
}
|
|
110
|
-
function tt(e, s) {
|
|
111
|
-
const t = [];
|
|
112
|
-
if (typeof e != "object" || typeof e.icons != "object")
|
|
113
|
-
return t;
|
|
114
|
-
e.not_found instanceof Array && e.not_found.forEach((n) => {
|
|
115
|
-
s(n, null), t.push(n);
|
|
116
|
-
});
|
|
117
|
-
const i = St(e);
|
|
118
|
-
for (const n in i) {
|
|
119
|
-
const o = i[n];
|
|
120
|
-
o && (s(n, Dt(e, n, o)), t.push(n));
|
|
121
|
-
}
|
|
122
|
-
return t;
|
|
123
|
-
}
|
|
124
|
-
const zt = {
|
|
125
|
-
provider: "",
|
|
126
|
-
aliases: {},
|
|
127
|
-
not_found: {},
|
|
128
|
-
...et
|
|
129
|
-
};
|
|
130
|
-
function xe(e, s) {
|
|
131
|
-
for (const t in s)
|
|
132
|
-
if (t in e && typeof e[t] != typeof s[t])
|
|
133
|
-
return !1;
|
|
134
|
-
return !0;
|
|
135
|
-
}
|
|
136
|
-
function nt(e) {
|
|
137
|
-
if (typeof e != "object" || e === null)
|
|
138
|
-
return null;
|
|
139
|
-
const s = e;
|
|
140
|
-
if (typeof s.prefix != "string" || !e.icons || typeof e.icons != "object" || !xe(e, zt))
|
|
141
|
-
return null;
|
|
142
|
-
const t = s.icons;
|
|
143
|
-
for (const n in t) {
|
|
144
|
-
const o = t[n];
|
|
145
|
-
if (
|
|
146
|
-
// Name cannot be empty
|
|
147
|
-
!n || // Must have body
|
|
148
|
-
typeof o.body != "string" || // Check other props
|
|
149
|
-
!xe(
|
|
150
|
-
o,
|
|
151
|
-
Ce
|
|
152
|
-
)
|
|
153
|
-
)
|
|
154
|
-
return null;
|
|
155
|
-
}
|
|
156
|
-
const i = s.aliases || /* @__PURE__ */ Object.create(null);
|
|
157
|
-
for (const n in i) {
|
|
158
|
-
const o = i[n], l = o.parent;
|
|
159
|
-
if (
|
|
160
|
-
// Name cannot be empty
|
|
161
|
-
!n || // Parent must be set and point to existing icon
|
|
162
|
-
typeof l != "string" || !t[l] && !i[l] || // Check other props
|
|
163
|
-
!xe(
|
|
164
|
-
o,
|
|
165
|
-
Ce
|
|
166
|
-
)
|
|
167
|
-
)
|
|
168
|
-
return null;
|
|
169
|
-
}
|
|
170
|
-
return s;
|
|
171
|
-
}
|
|
172
|
-
const Fe = /* @__PURE__ */ Object.create(null);
|
|
173
|
-
function Ot(e, s) {
|
|
174
|
-
return {
|
|
175
|
-
provider: e,
|
|
176
|
-
prefix: s,
|
|
177
|
-
icons: /* @__PURE__ */ Object.create(null),
|
|
178
|
-
missing: /* @__PURE__ */ new Set()
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
function ne(e, s) {
|
|
182
|
-
const t = Fe[e] || (Fe[e] = /* @__PURE__ */ Object.create(null));
|
|
183
|
-
return t[s] || (t[s] = Ot(e, s));
|
|
184
|
-
}
|
|
185
|
-
function st(e, s) {
|
|
186
|
-
return nt(s) ? tt(s, (t, i) => {
|
|
187
|
-
i ? e.icons[t] = i : e.missing.add(t);
|
|
188
|
-
}) : [];
|
|
189
|
-
}
|
|
190
|
-
function Tt(e, s, t) {
|
|
191
|
-
try {
|
|
192
|
-
if (typeof t.body == "string")
|
|
193
|
-
return e.icons[s] = { ...t }, !0;
|
|
194
|
-
} catch {
|
|
195
|
-
}
|
|
196
|
-
return !1;
|
|
197
|
-
}
|
|
198
|
-
let re = !1;
|
|
199
|
-
function it(e) {
|
|
200
|
-
return typeof e == "boolean" && (re = e), re;
|
|
201
|
-
}
|
|
202
|
-
function Lt(e) {
|
|
203
|
-
const s = typeof e == "string" ? we(e, !0, re) : e;
|
|
204
|
-
if (s) {
|
|
205
|
-
const t = ne(s.provider, s.prefix), i = s.name;
|
|
206
|
-
return t.icons[i] || (t.missing.has(i) ? null : void 0);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
function Pt(e, s) {
|
|
210
|
-
const t = we(e, !0, re);
|
|
211
|
-
if (!t)
|
|
212
|
-
return !1;
|
|
213
|
-
const i = ne(t.provider, t.prefix);
|
|
214
|
-
return s ? Tt(i, t.name, s) : (i.missing.add(t.name), !0);
|
|
215
|
-
}
|
|
216
|
-
function At(e, s) {
|
|
217
|
-
if (typeof e != "object")
|
|
218
|
-
return !1;
|
|
219
|
-
if (typeof s != "string" && (s = e.provider || ""), re && !s && !e.prefix) {
|
|
220
|
-
let n = !1;
|
|
221
|
-
return nt(e) && (e.prefix = "", tt(e, (o, l) => {
|
|
222
|
-
Pt(o, l) && (n = !0);
|
|
223
|
-
})), n;
|
|
224
|
-
}
|
|
225
|
-
const t = e.prefix;
|
|
226
|
-
if (!me({
|
|
227
|
-
prefix: t,
|
|
228
|
-
name: "a"
|
|
229
|
-
}))
|
|
230
|
-
return !1;
|
|
231
|
-
const i = ne(s, t);
|
|
232
|
-
return !!st(i, e);
|
|
233
|
-
}
|
|
234
|
-
const ot = Object.freeze({
|
|
235
|
-
width: null,
|
|
236
|
-
height: null
|
|
237
|
-
}), lt = Object.freeze({
|
|
238
|
-
// Dimensions
|
|
239
|
-
...ot,
|
|
240
|
-
// Transformations
|
|
241
|
-
...be
|
|
242
|
-
}), Ft = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Nt = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
243
|
-
function Ne(e, s, t) {
|
|
244
|
-
if (s === 1)
|
|
245
|
-
return e;
|
|
246
|
-
if (t = t || 100, typeof e == "number")
|
|
247
|
-
return Math.ceil(e * s * t) / t;
|
|
248
|
-
if (typeof e != "string")
|
|
249
|
-
return e;
|
|
250
|
-
const i = e.split(Ft);
|
|
251
|
-
if (i === null || !i.length)
|
|
252
|
-
return e;
|
|
253
|
-
const n = [];
|
|
254
|
-
let o = i.shift(), l = Nt.test(o);
|
|
255
|
-
for (; ; ) {
|
|
256
|
-
if (l) {
|
|
257
|
-
const p = parseFloat(o);
|
|
258
|
-
isNaN(p) ? n.push(o) : n.push(Math.ceil(p * s * t) / t);
|
|
259
|
-
} else
|
|
260
|
-
n.push(o);
|
|
261
|
-
if (o = i.shift(), o === void 0)
|
|
262
|
-
return n.join("");
|
|
263
|
-
l = !l;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
function Ut(e, s = "defs") {
|
|
267
|
-
let t = "";
|
|
268
|
-
const i = e.indexOf("<" + s);
|
|
269
|
-
for (; i >= 0; ) {
|
|
270
|
-
const n = e.indexOf(">", i), o = e.indexOf("</" + s);
|
|
271
|
-
if (n === -1 || o === -1)
|
|
272
|
-
break;
|
|
273
|
-
const l = e.indexOf(">", o);
|
|
274
|
-
if (l === -1)
|
|
275
|
-
break;
|
|
276
|
-
t += e.slice(n + 1, o).trim(), e = e.slice(0, i).trim() + e.slice(l + 1);
|
|
277
|
-
}
|
|
278
|
-
return {
|
|
279
|
-
defs: t,
|
|
280
|
-
content: e
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
function Rt(e, s) {
|
|
284
|
-
return e ? "<defs>" + e + "</defs>" + s : s;
|
|
285
|
-
}
|
|
286
|
-
function Ht(e, s, t) {
|
|
287
|
-
const i = Ut(e);
|
|
288
|
-
return Rt(i.defs, s + i.content + t);
|
|
289
|
-
}
|
|
290
|
-
const Wt = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
291
|
-
function Bt(e, s) {
|
|
292
|
-
const t = {
|
|
293
|
-
...ke,
|
|
294
|
-
...e
|
|
295
|
-
}, i = {
|
|
296
|
-
...lt,
|
|
297
|
-
...s
|
|
298
|
-
}, n = {
|
|
299
|
-
left: t.left,
|
|
300
|
-
top: t.top,
|
|
301
|
-
width: t.width,
|
|
302
|
-
height: t.height
|
|
303
|
-
};
|
|
304
|
-
let o = t.body;
|
|
305
|
-
[t, i].forEach((b) => {
|
|
306
|
-
const y = [], S = b.hFlip, z = b.vFlip;
|
|
307
|
-
let C = b.rotate;
|
|
308
|
-
S ? z ? C += 2 : (y.push(
|
|
309
|
-
"translate(" + (n.width + n.left).toString() + " " + (0 - n.top).toString() + ")"
|
|
310
|
-
), y.push("scale(-1 1)"), n.top = n.left = 0) : z && (y.push(
|
|
311
|
-
"translate(" + (0 - n.left).toString() + " " + (n.height + n.top).toString() + ")"
|
|
312
|
-
), y.push("scale(1 -1)"), n.top = n.left = 0);
|
|
313
|
-
let v;
|
|
314
|
-
switch (C < 0 && (C -= Math.floor(C / 4) * 4), C = C % 4, C) {
|
|
315
|
-
case 1:
|
|
316
|
-
v = n.height / 2 + n.top, y.unshift(
|
|
317
|
-
"rotate(90 " + v.toString() + " " + v.toString() + ")"
|
|
318
|
-
);
|
|
319
|
-
break;
|
|
320
|
-
case 2:
|
|
321
|
-
y.unshift(
|
|
322
|
-
"rotate(180 " + (n.width / 2 + n.left).toString() + " " + (n.height / 2 + n.top).toString() + ")"
|
|
323
|
-
);
|
|
324
|
-
break;
|
|
325
|
-
case 3:
|
|
326
|
-
v = n.width / 2 + n.left, y.unshift(
|
|
327
|
-
"rotate(-90 " + v.toString() + " " + v.toString() + ")"
|
|
328
|
-
);
|
|
329
|
-
break;
|
|
330
|
-
}
|
|
331
|
-
C % 2 === 1 && (n.left !== n.top && (v = n.left, n.left = n.top, n.top = v), n.width !== n.height && (v = n.width, n.width = n.height, n.height = v)), y.length && (o = Ht(
|
|
332
|
-
o,
|
|
333
|
-
'<g transform="' + y.join(" ") + '">',
|
|
334
|
-
"</g>"
|
|
335
|
-
));
|
|
336
|
-
});
|
|
337
|
-
const l = i.width, p = i.height, c = n.width, a = n.height;
|
|
338
|
-
let d, f;
|
|
339
|
-
l === null ? (f = p === null ? "1em" : p === "auto" ? a : p, d = Ne(f, c / a)) : (d = l === "auto" ? c : l, f = p === null ? Ne(d, a / c) : p === "auto" ? a : p);
|
|
340
|
-
const r = {}, I = (b, y) => {
|
|
341
|
-
Wt(y) || (r[b] = y.toString());
|
|
342
|
-
};
|
|
343
|
-
I("width", d), I("height", f);
|
|
344
|
-
const g = [n.left, n.top, c, a];
|
|
345
|
-
return r.viewBox = g.join(" "), {
|
|
346
|
-
attributes: r,
|
|
347
|
-
viewBox: g,
|
|
348
|
-
body: o
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
const Vt = /\sid="(\S+)"/g, _t = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
352
|
-
let qt = 0;
|
|
353
|
-
function Gt(e, s = _t) {
|
|
354
|
-
const t = [];
|
|
355
|
-
let i;
|
|
356
|
-
for (; i = Vt.exec(e); )
|
|
357
|
-
t.push(i[1]);
|
|
358
|
-
if (!t.length)
|
|
359
|
-
return e;
|
|
360
|
-
const n = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
361
|
-
return t.forEach((o) => {
|
|
362
|
-
const l = typeof s == "function" ? s(o) : s + (qt++).toString(), p = o.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
363
|
-
e = e.replace(
|
|
364
|
-
// Allowed characters before id: [#;"]
|
|
365
|
-
// Allowed characters after id: [)"], .[a-z]
|
|
366
|
-
new RegExp('([#;"])(' + p + ')([")]|\\.[a-z])', "g"),
|
|
367
|
-
"$1" + l + n + "$3"
|
|
368
|
-
);
|
|
369
|
-
}), e = e.replace(new RegExp(n, "g"), ""), e;
|
|
370
|
-
}
|
|
371
|
-
const $e = /* @__PURE__ */ Object.create(null);
|
|
372
|
-
function Kt(e, s) {
|
|
373
|
-
$e[e] = s;
|
|
374
|
-
}
|
|
375
|
-
function Ee(e) {
|
|
376
|
-
return $e[e] || $e[""];
|
|
377
|
-
}
|
|
378
|
-
function De(e) {
|
|
379
|
-
let s;
|
|
380
|
-
if (typeof e.resources == "string")
|
|
381
|
-
s = [e.resources];
|
|
382
|
-
else if (s = e.resources, !(s instanceof Array) || !s.length)
|
|
383
|
-
return null;
|
|
384
|
-
return {
|
|
385
|
-
// API hosts
|
|
386
|
-
resources: s,
|
|
387
|
-
// Root path
|
|
388
|
-
path: e.path || "/",
|
|
389
|
-
// URL length limit
|
|
390
|
-
maxURL: e.maxURL || 500,
|
|
391
|
-
// Timeout before next host is used.
|
|
392
|
-
rotate: e.rotate || 750,
|
|
393
|
-
// Timeout before failing query.
|
|
394
|
-
timeout: e.timeout || 5e3,
|
|
395
|
-
// Randomise default API end point.
|
|
396
|
-
random: e.random === !0,
|
|
397
|
-
// Start index
|
|
398
|
-
index: e.index || 0,
|
|
399
|
-
// Receive data after time out (used if time out kicks in first, then API module sends data anyway).
|
|
400
|
-
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
const ze = /* @__PURE__ */ Object.create(null), oe = [
|
|
404
|
-
"https://api.simplesvg.com",
|
|
405
|
-
"https://api.unisvg.com"
|
|
406
|
-
], pe = [];
|
|
407
|
-
for (; oe.length > 0; )
|
|
408
|
-
oe.length === 1 || Math.random() > 0.5 ? pe.push(oe.shift()) : pe.push(oe.pop());
|
|
409
|
-
ze[""] = De({
|
|
410
|
-
resources: ["https://api.iconify.design"].concat(pe)
|
|
411
|
-
});
|
|
412
|
-
function Qt(e, s) {
|
|
413
|
-
const t = De(s);
|
|
414
|
-
return t === null ? !1 : (ze[e] = t, !0);
|
|
415
|
-
}
|
|
416
|
-
function Oe(e) {
|
|
417
|
-
return ze[e];
|
|
418
|
-
}
|
|
419
|
-
const Xt = () => {
|
|
420
|
-
let e;
|
|
421
|
-
try {
|
|
422
|
-
if (e = fetch, typeof e == "function")
|
|
423
|
-
return e;
|
|
424
|
-
} catch {
|
|
425
|
-
}
|
|
426
|
-
};
|
|
427
|
-
let Ue = Xt();
|
|
428
|
-
function Yt(e, s) {
|
|
429
|
-
const t = Oe(e);
|
|
430
|
-
if (!t)
|
|
431
|
-
return 0;
|
|
432
|
-
let i;
|
|
433
|
-
if (!t.maxURL)
|
|
434
|
-
i = 0;
|
|
435
|
-
else {
|
|
436
|
-
let n = 0;
|
|
437
|
-
t.resources.forEach((l) => {
|
|
438
|
-
n = Math.max(n, l.length);
|
|
439
|
-
});
|
|
440
|
-
const o = s + ".json?icons=";
|
|
441
|
-
i = t.maxURL - n - t.path.length - o.length;
|
|
442
|
-
}
|
|
443
|
-
return i;
|
|
444
|
-
}
|
|
445
|
-
function Jt(e) {
|
|
446
|
-
return e === 404;
|
|
447
|
-
}
|
|
448
|
-
const Zt = (e, s, t) => {
|
|
449
|
-
const i = [], n = Yt(e, s), o = "icons";
|
|
450
|
-
let l = {
|
|
451
|
-
type: o,
|
|
452
|
-
provider: e,
|
|
453
|
-
prefix: s,
|
|
454
|
-
icons: []
|
|
455
|
-
}, p = 0;
|
|
456
|
-
return t.forEach((c, a) => {
|
|
457
|
-
p += c.length + 1, p >= n && a > 0 && (i.push(l), l = {
|
|
458
|
-
type: o,
|
|
459
|
-
provider: e,
|
|
460
|
-
prefix: s,
|
|
461
|
-
icons: []
|
|
462
|
-
}, p = c.length), l.icons.push(c);
|
|
463
|
-
}), i.push(l), i;
|
|
464
|
-
};
|
|
465
|
-
function en(e) {
|
|
466
|
-
if (typeof e == "string") {
|
|
467
|
-
const s = Oe(e);
|
|
468
|
-
if (s)
|
|
469
|
-
return s.path;
|
|
470
|
-
}
|
|
471
|
-
return "/";
|
|
472
|
-
}
|
|
473
|
-
const tn = (e, s, t) => {
|
|
474
|
-
if (!Ue) {
|
|
475
|
-
t("abort", 424);
|
|
476
|
-
return;
|
|
477
|
-
}
|
|
478
|
-
let i = en(s.provider);
|
|
479
|
-
switch (s.type) {
|
|
480
|
-
case "icons": {
|
|
481
|
-
const o = s.prefix, p = s.icons.join(","), c = new URLSearchParams({
|
|
482
|
-
icons: p
|
|
483
|
-
});
|
|
484
|
-
i += o + ".json?" + c.toString();
|
|
485
|
-
break;
|
|
486
|
-
}
|
|
487
|
-
case "custom": {
|
|
488
|
-
const o = s.uri;
|
|
489
|
-
i += o.slice(0, 1) === "/" ? o.slice(1) : o;
|
|
490
|
-
break;
|
|
491
|
-
}
|
|
492
|
-
default:
|
|
493
|
-
t("abort", 400);
|
|
494
|
-
return;
|
|
495
|
-
}
|
|
496
|
-
let n = 503;
|
|
497
|
-
Ue(e + i).then((o) => {
|
|
498
|
-
const l = o.status;
|
|
499
|
-
if (l !== 200) {
|
|
500
|
-
setTimeout(() => {
|
|
501
|
-
t(Jt(l) ? "abort" : "next", l);
|
|
502
|
-
});
|
|
503
|
-
return;
|
|
504
|
-
}
|
|
505
|
-
return n = 501, o.json();
|
|
506
|
-
}).then((o) => {
|
|
507
|
-
if (typeof o != "object" || o === null) {
|
|
508
|
-
setTimeout(() => {
|
|
509
|
-
o === 404 ? t("abort", o) : t("next", n);
|
|
510
|
-
});
|
|
511
|
-
return;
|
|
512
|
-
}
|
|
513
|
-
setTimeout(() => {
|
|
514
|
-
t("success", o);
|
|
515
|
-
});
|
|
516
|
-
}).catch(() => {
|
|
517
|
-
t("next", n);
|
|
518
|
-
});
|
|
519
|
-
}, nn = {
|
|
520
|
-
prepare: Zt,
|
|
521
|
-
send: tn
|
|
522
|
-
};
|
|
523
|
-
function sn(e) {
|
|
524
|
-
const s = {
|
|
525
|
-
loaded: [],
|
|
526
|
-
missing: [],
|
|
527
|
-
pending: []
|
|
528
|
-
}, t = /* @__PURE__ */ Object.create(null);
|
|
529
|
-
e.sort((n, o) => n.provider !== o.provider ? n.provider.localeCompare(o.provider) : n.prefix !== o.prefix ? n.prefix.localeCompare(o.prefix) : n.name.localeCompare(o.name));
|
|
530
|
-
let i = {
|
|
531
|
-
provider: "",
|
|
532
|
-
prefix: "",
|
|
533
|
-
name: ""
|
|
534
|
-
};
|
|
535
|
-
return e.forEach((n) => {
|
|
536
|
-
if (i.name === n.name && i.prefix === n.prefix && i.provider === n.provider)
|
|
537
|
-
return;
|
|
538
|
-
i = n;
|
|
539
|
-
const o = n.provider, l = n.prefix, p = n.name, c = t[o] || (t[o] = /* @__PURE__ */ Object.create(null)), a = c[l] || (c[l] = ne(o, l));
|
|
540
|
-
let d;
|
|
541
|
-
p in a.icons ? d = s.loaded : l === "" || a.missing.has(p) ? d = s.missing : d = s.pending;
|
|
542
|
-
const f = {
|
|
543
|
-
provider: o,
|
|
544
|
-
prefix: l,
|
|
545
|
-
name: p
|
|
546
|
-
};
|
|
547
|
-
d.push(f);
|
|
548
|
-
}), s;
|
|
549
|
-
}
|
|
550
|
-
function rt(e, s) {
|
|
551
|
-
e.forEach((t) => {
|
|
552
|
-
const i = t.loaderCallbacks;
|
|
553
|
-
i && (t.loaderCallbacks = i.filter((n) => n.id !== s));
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
function on(e) {
|
|
557
|
-
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
558
|
-
e.pendingCallbacksFlag = !1;
|
|
559
|
-
const s = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
560
|
-
if (!s.length)
|
|
561
|
-
return;
|
|
562
|
-
let t = !1;
|
|
563
|
-
const i = e.provider, n = e.prefix;
|
|
564
|
-
s.forEach((o) => {
|
|
565
|
-
const l = o.icons, p = l.pending.length;
|
|
566
|
-
l.pending = l.pending.filter((c) => {
|
|
567
|
-
if (c.prefix !== n)
|
|
568
|
-
return !0;
|
|
569
|
-
const a = c.name;
|
|
570
|
-
if (e.icons[a])
|
|
571
|
-
l.loaded.push({
|
|
572
|
-
provider: i,
|
|
573
|
-
prefix: n,
|
|
574
|
-
name: a
|
|
575
|
-
});
|
|
576
|
-
else if (e.missing.has(a))
|
|
577
|
-
l.missing.push({
|
|
578
|
-
provider: i,
|
|
579
|
-
prefix: n,
|
|
580
|
-
name: a
|
|
581
|
-
});
|
|
582
|
-
else
|
|
583
|
-
return t = !0, !0;
|
|
584
|
-
return !1;
|
|
585
|
-
}), l.pending.length !== p && (t || rt([e], o.id), o.callback(
|
|
586
|
-
l.loaded.slice(0),
|
|
587
|
-
l.missing.slice(0),
|
|
588
|
-
l.pending.slice(0),
|
|
589
|
-
o.abort
|
|
590
|
-
));
|
|
591
|
-
});
|
|
592
|
-
}));
|
|
593
|
-
}
|
|
594
|
-
let ln = 0;
|
|
595
|
-
function rn(e, s, t) {
|
|
596
|
-
const i = ln++, n = rt.bind(null, t, i);
|
|
597
|
-
if (!s.pending.length)
|
|
598
|
-
return n;
|
|
599
|
-
const o = {
|
|
600
|
-
id: i,
|
|
601
|
-
icons: s,
|
|
602
|
-
callback: e,
|
|
603
|
-
abort: n
|
|
604
|
-
};
|
|
605
|
-
return t.forEach((l) => {
|
|
606
|
-
(l.loaderCallbacks || (l.loaderCallbacks = [])).push(o);
|
|
607
|
-
}), n;
|
|
608
|
-
}
|
|
609
|
-
function an(e, s = !0, t = !1) {
|
|
610
|
-
const i = [];
|
|
611
|
-
return e.forEach((n) => {
|
|
612
|
-
const o = typeof n == "string" ? we(n, s, t) : n;
|
|
613
|
-
o && i.push(o);
|
|
614
|
-
}), i;
|
|
615
|
-
}
|
|
616
|
-
var cn = {
|
|
617
|
-
resources: [],
|
|
618
|
-
index: 0,
|
|
619
|
-
timeout: 2e3,
|
|
620
|
-
rotate: 750,
|
|
621
|
-
random: !1,
|
|
622
|
-
dataAfterTimeout: !1
|
|
623
|
-
};
|
|
624
|
-
function un(e, s, t, i) {
|
|
625
|
-
const n = e.resources.length, o = e.random ? Math.floor(Math.random() * n) : e.index;
|
|
626
|
-
let l;
|
|
627
|
-
if (e.random) {
|
|
628
|
-
let j = e.resources.slice(0);
|
|
629
|
-
for (l = []; j.length > 1; ) {
|
|
630
|
-
const m = Math.floor(Math.random() * j.length);
|
|
631
|
-
l.push(j[m]), j = j.slice(0, m).concat(j.slice(m + 1));
|
|
632
|
-
}
|
|
633
|
-
l = l.concat(j);
|
|
634
|
-
} else
|
|
635
|
-
l = e.resources.slice(o).concat(e.resources.slice(0, o));
|
|
636
|
-
const p = Date.now();
|
|
637
|
-
let c = "pending", a = 0, d, f = null, r = [], I = [];
|
|
638
|
-
typeof i == "function" && I.push(i);
|
|
639
|
-
function g() {
|
|
640
|
-
f && (clearTimeout(f), f = null);
|
|
641
|
-
}
|
|
642
|
-
function b() {
|
|
643
|
-
c === "pending" && (c = "aborted"), g(), r.forEach((j) => {
|
|
644
|
-
j.status === "pending" && (j.status = "aborted");
|
|
645
|
-
}), r = [];
|
|
646
|
-
}
|
|
647
|
-
function y(j, m) {
|
|
648
|
-
m && (I = []), typeof j == "function" && I.push(j);
|
|
649
|
-
}
|
|
650
|
-
function S() {
|
|
651
|
-
return {
|
|
652
|
-
startTime: p,
|
|
653
|
-
payload: s,
|
|
654
|
-
status: c,
|
|
655
|
-
queriesSent: a,
|
|
656
|
-
queriesPending: r.length,
|
|
657
|
-
subscribe: y,
|
|
658
|
-
abort: b
|
|
659
|
-
};
|
|
660
|
-
}
|
|
661
|
-
function z() {
|
|
662
|
-
c = "failed", I.forEach((j) => {
|
|
663
|
-
j(void 0, d);
|
|
664
|
-
});
|
|
665
|
-
}
|
|
666
|
-
function C() {
|
|
667
|
-
r.forEach((j) => {
|
|
668
|
-
j.status === "pending" && (j.status = "aborted");
|
|
669
|
-
}), r = [];
|
|
670
|
-
}
|
|
671
|
-
function v(j, m, $) {
|
|
672
|
-
const k = m !== "success";
|
|
673
|
-
switch (r = r.filter((A) => A !== j), c) {
|
|
674
|
-
case "pending":
|
|
675
|
-
break;
|
|
676
|
-
case "failed":
|
|
677
|
-
if (k || !e.dataAfterTimeout)
|
|
678
|
-
return;
|
|
679
|
-
break;
|
|
680
|
-
default:
|
|
681
|
-
return;
|
|
682
|
-
}
|
|
683
|
-
if (m === "abort") {
|
|
684
|
-
d = $, z();
|
|
685
|
-
return;
|
|
686
|
-
}
|
|
687
|
-
if (k) {
|
|
688
|
-
d = $, r.length || (l.length ? L() : z());
|
|
689
|
-
return;
|
|
690
|
-
}
|
|
691
|
-
if (g(), C(), !e.random) {
|
|
692
|
-
const A = e.resources.indexOf(j.resource);
|
|
693
|
-
A !== -1 && A !== e.index && (e.index = A);
|
|
694
|
-
}
|
|
695
|
-
c = "completed", I.forEach((A) => {
|
|
696
|
-
A($);
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
function L() {
|
|
700
|
-
if (c !== "pending")
|
|
701
|
-
return;
|
|
702
|
-
g();
|
|
703
|
-
const j = l.shift();
|
|
704
|
-
if (j === void 0) {
|
|
705
|
-
if (r.length) {
|
|
706
|
-
f = setTimeout(() => {
|
|
707
|
-
g(), c === "pending" && (C(), z());
|
|
708
|
-
}, e.timeout);
|
|
709
|
-
return;
|
|
710
|
-
}
|
|
711
|
-
z();
|
|
712
|
-
return;
|
|
713
|
-
}
|
|
714
|
-
const m = {
|
|
715
|
-
status: "pending",
|
|
716
|
-
resource: j,
|
|
717
|
-
callback: ($, k) => {
|
|
718
|
-
v(m, $, k);
|
|
719
|
-
}
|
|
720
|
-
};
|
|
721
|
-
r.push(m), a++, f = setTimeout(L, e.rotate), t(j, s, m.callback);
|
|
722
|
-
}
|
|
723
|
-
return setTimeout(L), S;
|
|
724
|
-
}
|
|
725
|
-
function at(e) {
|
|
726
|
-
const s = {
|
|
727
|
-
...cn,
|
|
728
|
-
...e
|
|
729
|
-
};
|
|
730
|
-
let t = [];
|
|
731
|
-
function i() {
|
|
732
|
-
t = t.filter((p) => p().status === "pending");
|
|
733
|
-
}
|
|
734
|
-
function n(p, c, a) {
|
|
735
|
-
const d = un(
|
|
736
|
-
s,
|
|
737
|
-
p,
|
|
738
|
-
c,
|
|
739
|
-
(f, r) => {
|
|
740
|
-
i(), a && a(f, r);
|
|
741
|
-
}
|
|
742
|
-
);
|
|
743
|
-
return t.push(d), d;
|
|
744
|
-
}
|
|
745
|
-
function o(p) {
|
|
746
|
-
return t.find((c) => p(c)) || null;
|
|
747
|
-
}
|
|
748
|
-
return {
|
|
749
|
-
query: n,
|
|
750
|
-
find: o,
|
|
751
|
-
setIndex: (p) => {
|
|
752
|
-
s.index = p;
|
|
753
|
-
},
|
|
754
|
-
getIndex: () => s.index,
|
|
755
|
-
cleanup: i
|
|
756
|
-
};
|
|
757
|
-
}
|
|
758
|
-
function Re() {
|
|
759
|
-
}
|
|
760
|
-
const Ie = /* @__PURE__ */ Object.create(null);
|
|
761
|
-
function dn(e) {
|
|
762
|
-
if (!Ie[e]) {
|
|
763
|
-
const s = Oe(e);
|
|
764
|
-
if (!s)
|
|
765
|
-
return;
|
|
766
|
-
const t = at(s), i = {
|
|
767
|
-
config: s,
|
|
768
|
-
redundancy: t
|
|
769
|
-
};
|
|
770
|
-
Ie[e] = i;
|
|
771
|
-
}
|
|
772
|
-
return Ie[e];
|
|
773
|
-
}
|
|
774
|
-
function fn(e, s, t) {
|
|
775
|
-
let i, n;
|
|
776
|
-
if (typeof e == "string") {
|
|
777
|
-
const o = Ee(e);
|
|
778
|
-
if (!o)
|
|
779
|
-
return t(void 0, 424), Re;
|
|
780
|
-
n = o.send;
|
|
781
|
-
const l = dn(e);
|
|
782
|
-
l && (i = l.redundancy);
|
|
783
|
-
} else {
|
|
784
|
-
const o = De(e);
|
|
785
|
-
if (o) {
|
|
786
|
-
i = at(o);
|
|
787
|
-
const l = e.resources ? e.resources[0] : "", p = Ee(l);
|
|
788
|
-
p && (n = p.send);
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
return !i || !n ? (t(void 0, 424), Re) : i.query(s, n, t)().abort;
|
|
792
|
-
}
|
|
793
|
-
function He() {
|
|
794
|
-
}
|
|
795
|
-
function mn(e) {
|
|
796
|
-
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
797
|
-
e.iconsLoaderFlag = !1, on(e);
|
|
798
|
-
}));
|
|
799
|
-
}
|
|
800
|
-
function pn(e) {
|
|
801
|
-
const s = [], t = [];
|
|
802
|
-
return e.forEach((i) => {
|
|
803
|
-
(i.match(Ze) ? s : t).push(i);
|
|
804
|
-
}), {
|
|
805
|
-
valid: s,
|
|
806
|
-
invalid: t
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
function le(e, s, t) {
|
|
810
|
-
function i() {
|
|
811
|
-
const n = e.pendingIcons;
|
|
812
|
-
s.forEach((o) => {
|
|
813
|
-
n && n.delete(o), e.icons[o] || e.missing.add(o);
|
|
814
|
-
});
|
|
815
|
-
}
|
|
816
|
-
if (t && typeof t == "object")
|
|
817
|
-
try {
|
|
818
|
-
if (!st(e, t).length) {
|
|
819
|
-
i();
|
|
820
|
-
return;
|
|
821
|
-
}
|
|
822
|
-
} catch (n) {
|
|
823
|
-
console.error(n);
|
|
824
|
-
}
|
|
825
|
-
i(), mn(e);
|
|
826
|
-
}
|
|
827
|
-
function We(e, s) {
|
|
828
|
-
e instanceof Promise ? e.then((t) => {
|
|
829
|
-
s(t);
|
|
830
|
-
}).catch(() => {
|
|
831
|
-
s(null);
|
|
832
|
-
}) : s(e);
|
|
833
|
-
}
|
|
834
|
-
function gn(e, s) {
|
|
835
|
-
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(s).sort() : e.iconsToLoad = s, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
836
|
-
e.iconsQueueFlag = !1;
|
|
837
|
-
const { provider: t, prefix: i } = e, n = e.iconsToLoad;
|
|
838
|
-
if (delete e.iconsToLoad, !n || !n.length)
|
|
839
|
-
return;
|
|
840
|
-
const o = e.loadIcon;
|
|
841
|
-
if (e.loadIcons && (n.length > 1 || !o)) {
|
|
842
|
-
We(
|
|
843
|
-
e.loadIcons(n, i, t),
|
|
844
|
-
(d) => {
|
|
845
|
-
le(e, n, d);
|
|
846
|
-
}
|
|
847
|
-
);
|
|
848
|
-
return;
|
|
849
|
-
}
|
|
850
|
-
if (o) {
|
|
851
|
-
n.forEach((d) => {
|
|
852
|
-
const f = o(d, i, t);
|
|
853
|
-
We(f, (r) => {
|
|
854
|
-
const I = r ? {
|
|
855
|
-
prefix: i,
|
|
856
|
-
icons: {
|
|
857
|
-
[d]: r
|
|
858
|
-
}
|
|
859
|
-
} : null;
|
|
860
|
-
le(e, [d], I);
|
|
861
|
-
});
|
|
862
|
-
});
|
|
863
|
-
return;
|
|
864
|
-
}
|
|
865
|
-
const { valid: l, invalid: p } = pn(n);
|
|
866
|
-
if (p.length && le(e, p, null), !l.length)
|
|
867
|
-
return;
|
|
868
|
-
const c = i.match(Ze) ? Ee(t) : null;
|
|
869
|
-
if (!c) {
|
|
870
|
-
le(e, l, null);
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
c.prepare(t, i, l).forEach((d) => {
|
|
874
|
-
fn(t, d, (f) => {
|
|
875
|
-
le(e, d.icons, f);
|
|
876
|
-
});
|
|
877
|
-
});
|
|
878
|
-
}));
|
|
879
|
-
}
|
|
880
|
-
const hn = (e, s) => {
|
|
881
|
-
const t = an(e, !0, it()), i = sn(t);
|
|
882
|
-
if (!i.pending.length) {
|
|
883
|
-
let c = !0;
|
|
884
|
-
return s && setTimeout(() => {
|
|
885
|
-
c && s(
|
|
886
|
-
i.loaded,
|
|
887
|
-
i.missing,
|
|
888
|
-
i.pending,
|
|
889
|
-
He
|
|
890
|
-
);
|
|
891
|
-
}), () => {
|
|
892
|
-
c = !1;
|
|
893
|
-
};
|
|
894
|
-
}
|
|
895
|
-
const n = /* @__PURE__ */ Object.create(null), o = [];
|
|
896
|
-
let l, p;
|
|
897
|
-
return i.pending.forEach((c) => {
|
|
898
|
-
const { provider: a, prefix: d } = c;
|
|
899
|
-
if (d === p && a === l)
|
|
900
|
-
return;
|
|
901
|
-
l = a, p = d, o.push(ne(a, d));
|
|
902
|
-
const f = n[a] || (n[a] = /* @__PURE__ */ Object.create(null));
|
|
903
|
-
f[d] || (f[d] = []);
|
|
904
|
-
}), i.pending.forEach((c) => {
|
|
905
|
-
const { provider: a, prefix: d, name: f } = c, r = ne(a, d), I = r.pendingIcons || (r.pendingIcons = /* @__PURE__ */ new Set());
|
|
906
|
-
I.has(f) || (I.add(f), n[a][d].push(f));
|
|
907
|
-
}), o.forEach((c) => {
|
|
908
|
-
const a = n[c.provider][c.prefix];
|
|
909
|
-
a.length && gn(c, a);
|
|
910
|
-
}), s ? rn(s, i, o) : He;
|
|
911
|
-
};
|
|
912
|
-
function vn(e, s) {
|
|
913
|
-
const t = {
|
|
914
|
-
...e
|
|
915
|
-
};
|
|
916
|
-
for (const i in s) {
|
|
917
|
-
const n = s[i], o = typeof n;
|
|
918
|
-
i in ot ? (n === null || n && (o === "string" || o === "number")) && (t[i] = n) : o === typeof t[i] && (t[i] = i === "rotate" ? n % 4 : n);
|
|
919
|
-
}
|
|
920
|
-
return t;
|
|
921
|
-
}
|
|
922
|
-
const bn = /[\s,]+/;
|
|
923
|
-
function yn(e, s) {
|
|
924
|
-
s.split(bn).forEach((t) => {
|
|
925
|
-
switch (t.trim()) {
|
|
926
|
-
case "horizontal":
|
|
927
|
-
e.hFlip = !0;
|
|
928
|
-
break;
|
|
929
|
-
case "vertical":
|
|
930
|
-
e.vFlip = !0;
|
|
931
|
-
break;
|
|
932
|
-
}
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
function wn(e, s = 0) {
|
|
936
|
-
const t = e.replace(/^-?[0-9.]*/, "");
|
|
937
|
-
function i(n) {
|
|
938
|
-
for (; n < 0; )
|
|
939
|
-
n += 4;
|
|
940
|
-
return n % 4;
|
|
941
|
-
}
|
|
942
|
-
if (t === "") {
|
|
943
|
-
const n = parseInt(e);
|
|
944
|
-
return isNaN(n) ? 0 : i(n);
|
|
945
|
-
} else if (t !== e) {
|
|
946
|
-
let n = 0;
|
|
947
|
-
switch (t) {
|
|
948
|
-
case "%":
|
|
949
|
-
n = 25;
|
|
950
|
-
break;
|
|
951
|
-
case "deg":
|
|
952
|
-
n = 90;
|
|
953
|
-
}
|
|
954
|
-
if (n) {
|
|
955
|
-
let o = parseFloat(e.slice(0, e.length - t.length));
|
|
956
|
-
return isNaN(o) ? 0 : (o = o / n, o % 1 === 0 ? i(o) : 0);
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
return s;
|
|
960
|
-
}
|
|
961
|
-
function kn(e, s) {
|
|
962
|
-
let t = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
963
|
-
for (const i in s)
|
|
964
|
-
t += " " + i + '="' + s[i] + '"';
|
|
965
|
-
return '<svg xmlns="http://www.w3.org/2000/svg"' + t + ">" + e + "</svg>";
|
|
966
|
-
}
|
|
967
|
-
function xn(e) {
|
|
968
|
-
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
969
|
-
}
|
|
970
|
-
function In(e) {
|
|
971
|
-
return "data:image/svg+xml," + xn(e);
|
|
972
|
-
}
|
|
973
|
-
function Cn(e) {
|
|
974
|
-
return 'url("' + In(e) + '")';
|
|
975
|
-
}
|
|
976
|
-
const Be = {
|
|
977
|
-
...lt,
|
|
978
|
-
inline: !1
|
|
979
|
-
}, $n = {
|
|
980
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
981
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
982
|
-
"aria-hidden": !0,
|
|
983
|
-
role: "img"
|
|
984
|
-
}, En = {
|
|
985
|
-
display: "inline-block"
|
|
986
|
-
}, je = {
|
|
987
|
-
backgroundColor: "currentColor"
|
|
988
|
-
}, ct = {
|
|
989
|
-
backgroundColor: "transparent"
|
|
990
|
-
}, Ve = {
|
|
991
|
-
Image: "var(--svg)",
|
|
992
|
-
Repeat: "no-repeat",
|
|
993
|
-
Size: "100% 100%"
|
|
994
|
-
}, _e = {
|
|
995
|
-
webkitMask: je,
|
|
996
|
-
mask: je,
|
|
997
|
-
background: ct
|
|
998
|
-
};
|
|
999
|
-
for (const e in _e) {
|
|
1000
|
-
const s = _e[e];
|
|
1001
|
-
for (const t in Ve)
|
|
1002
|
-
s[e + t] = Ve[t];
|
|
1003
|
-
}
|
|
1004
|
-
const ge = {};
|
|
1005
|
-
["horizontal", "vertical"].forEach((e) => {
|
|
1006
|
-
const s = e.slice(0, 1) + "Flip";
|
|
1007
|
-
ge[e + "-flip"] = s, ge[e.slice(0, 1) + "-flip"] = s, ge[e + "Flip"] = s;
|
|
1008
|
-
});
|
|
1009
|
-
function qe(e) {
|
|
1010
|
-
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
1011
|
-
}
|
|
1012
|
-
const Ge = (e, s) => {
|
|
1013
|
-
const t = vn(Be, s), i = { ...$n }, n = s.mode || "svg", o = {}, l = s.style, p = typeof l == "object" && !(l instanceof Array) ? l : {};
|
|
1014
|
-
for (let b in s) {
|
|
1015
|
-
const y = s[b];
|
|
1016
|
-
if (y !== void 0)
|
|
1017
|
-
switch (b) {
|
|
1018
|
-
// Properties to ignore
|
|
1019
|
-
case "icon":
|
|
1020
|
-
case "style":
|
|
1021
|
-
case "onLoad":
|
|
1022
|
-
case "mode":
|
|
1023
|
-
case "ssr":
|
|
1024
|
-
break;
|
|
1025
|
-
// Boolean attributes
|
|
1026
|
-
case "inline":
|
|
1027
|
-
case "hFlip":
|
|
1028
|
-
case "vFlip":
|
|
1029
|
-
t[b] = y === !0 || y === "true" || y === 1;
|
|
1030
|
-
break;
|
|
1031
|
-
// Flip as string: 'horizontal,vertical'
|
|
1032
|
-
case "flip":
|
|
1033
|
-
typeof y == "string" && yn(t, y);
|
|
1034
|
-
break;
|
|
1035
|
-
// Color: override style
|
|
1036
|
-
case "color":
|
|
1037
|
-
o.color = y;
|
|
1038
|
-
break;
|
|
1039
|
-
// Rotation as string
|
|
1040
|
-
case "rotate":
|
|
1041
|
-
typeof y == "string" ? t[b] = wn(y) : typeof y == "number" && (t[b] = y);
|
|
1042
|
-
break;
|
|
1043
|
-
// Remove aria-hidden
|
|
1044
|
-
case "ariaHidden":
|
|
1045
|
-
case "aria-hidden":
|
|
1046
|
-
y !== !0 && y !== "true" && delete i["aria-hidden"];
|
|
1047
|
-
break;
|
|
1048
|
-
default: {
|
|
1049
|
-
const S = ge[b];
|
|
1050
|
-
S ? (y === !0 || y === "true" || y === 1) && (t[S] = !0) : Be[b] === void 0 && (i[b] = y);
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
const c = Bt(e, t), a = c.attributes;
|
|
1055
|
-
if (t.inline && (o.verticalAlign = "-0.125em"), n === "svg") {
|
|
1056
|
-
i.style = {
|
|
1057
|
-
...o,
|
|
1058
|
-
...p
|
|
1059
|
-
}, Object.assign(i, a);
|
|
1060
|
-
let b = 0, y = s.id;
|
|
1061
|
-
return typeof y == "string" && (y = y.replace(/-/g, "_")), i.innerHTML = Gt(c.body, y ? () => y + "ID" + b++ : "iconifyVue"), Le("svg", i);
|
|
1062
|
-
}
|
|
1063
|
-
const { body: d, width: f, height: r } = e, I = n === "mask" || (n === "bg" ? !1 : d.indexOf("currentColor") !== -1), g = kn(d, {
|
|
1064
|
-
...a,
|
|
1065
|
-
width: f + "",
|
|
1066
|
-
height: r + ""
|
|
1067
|
-
});
|
|
1068
|
-
return i.style = {
|
|
1069
|
-
...o,
|
|
1070
|
-
"--svg": Cn(g),
|
|
1071
|
-
width: qe(a.width),
|
|
1072
|
-
height: qe(a.height),
|
|
1073
|
-
...En,
|
|
1074
|
-
...I ? je : ct,
|
|
1075
|
-
...p
|
|
1076
|
-
}, Le("span", i);
|
|
1077
|
-
};
|
|
1078
|
-
it(!0);
|
|
1079
|
-
Kt("", nn);
|
|
1080
|
-
if (typeof document < "u" && typeof window < "u") {
|
|
1081
|
-
const e = window;
|
|
1082
|
-
if (e.IconifyPreload !== void 0) {
|
|
1083
|
-
const s = e.IconifyPreload, t = "Invalid IconifyPreload syntax.";
|
|
1084
|
-
typeof s == "object" && s !== null && (s instanceof Array ? s : [s]).forEach((i) => {
|
|
1085
|
-
try {
|
|
1086
|
-
// Check if item is an object and not null/array
|
|
1087
|
-
(typeof i != "object" || i === null || i instanceof Array || // Check for 'icons' and 'prefix'
|
|
1088
|
-
typeof i.icons != "object" || typeof i.prefix != "string" || // Add icon set
|
|
1089
|
-
!At(i)) && console.error(t);
|
|
1090
|
-
} catch {
|
|
1091
|
-
console.error(t);
|
|
1092
|
-
}
|
|
1093
|
-
});
|
|
1094
|
-
}
|
|
1095
|
-
if (e.IconifyProviders !== void 0) {
|
|
1096
|
-
const s = e.IconifyProviders;
|
|
1097
|
-
if (typeof s == "object" && s !== null)
|
|
1098
|
-
for (let t in s) {
|
|
1099
|
-
const i = "IconifyProviders[" + t + "] is invalid.";
|
|
1100
|
-
try {
|
|
1101
|
-
const n = s[t];
|
|
1102
|
-
if (typeof n != "object" || !n || n.resources === void 0)
|
|
1103
|
-
continue;
|
|
1104
|
-
Qt(t, n) || console.error(i);
|
|
1105
|
-
} catch {
|
|
1106
|
-
console.error(i);
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
const jn = {
|
|
1112
|
-
...ke,
|
|
1113
|
-
body: ""
|
|
1114
|
-
}, _ = G((e, { emit: s }) => {
|
|
1115
|
-
const t = M(null);
|
|
1116
|
-
function i() {
|
|
1117
|
-
var a, d;
|
|
1118
|
-
t.value && ((d = (a = t.value).abort) == null || d.call(a), t.value = null);
|
|
1119
|
-
}
|
|
1120
|
-
const n = M(!!e.ssr), o = M(""), l = ft(null);
|
|
1121
|
-
function p() {
|
|
1122
|
-
const a = e.icon;
|
|
1123
|
-
if (typeof a == "object" && a !== null && typeof a.body == "string")
|
|
1124
|
-
return o.value = "", {
|
|
1125
|
-
data: a
|
|
1126
|
-
};
|
|
1127
|
-
let d;
|
|
1128
|
-
if (typeof a != "string" || (d = we(a, !1, !0)) === null)
|
|
1129
|
-
return null;
|
|
1130
|
-
let f = Lt(d);
|
|
1131
|
-
if (!f) {
|
|
1132
|
-
const g = t.value;
|
|
1133
|
-
return (!g || g.name !== a) && (f === null ? t.value = {
|
|
1134
|
-
name: a
|
|
1135
|
-
} : t.value = {
|
|
1136
|
-
name: a,
|
|
1137
|
-
abort: hn([d], c)
|
|
1138
|
-
}), null;
|
|
1139
|
-
}
|
|
1140
|
-
i(), o.value !== a && (o.value = a, Se(() => {
|
|
1141
|
-
s("load", a);
|
|
1142
|
-
}));
|
|
1143
|
-
const r = e.customise;
|
|
1144
|
-
if (r) {
|
|
1145
|
-
f = Object.assign({}, f);
|
|
1146
|
-
const g = r(f.body, d.name, d.prefix, d.provider);
|
|
1147
|
-
typeof g == "string" && (f.body = g);
|
|
1148
|
-
}
|
|
1149
|
-
const I = ["iconify"];
|
|
1150
|
-
return d.prefix !== "" && I.push("iconify--" + d.prefix), d.provider !== "" && I.push("iconify--" + d.provider), { data: f, classes: I };
|
|
1151
|
-
}
|
|
1152
|
-
function c() {
|
|
1153
|
-
var d;
|
|
1154
|
-
const a = p();
|
|
1155
|
-
a ? a.data !== ((d = l.value) == null ? void 0 : d.data) && (l.value = a) : l.value = null;
|
|
1156
|
-
}
|
|
1157
|
-
return n.value ? c() : Me(() => {
|
|
1158
|
-
n.value = !0, c();
|
|
1159
|
-
}), J(() => e.icon, c), se(i), () => {
|
|
1160
|
-
const a = l.value;
|
|
1161
|
-
if (!a)
|
|
1162
|
-
return Ge(jn, e);
|
|
1163
|
-
let d = e;
|
|
1164
|
-
return a.classes && (d = {
|
|
1165
|
-
...e,
|
|
1166
|
-
class: a.classes.join(" ")
|
|
1167
|
-
}), Ge({
|
|
1168
|
-
...ke,
|
|
1169
|
-
...a.data
|
|
1170
|
-
}, d);
|
|
1171
|
-
};
|
|
1172
|
-
}, {
|
|
1173
|
-
props: [
|
|
1174
|
-
// Icon and render mode
|
|
1175
|
-
"icon",
|
|
1176
|
-
"mode",
|
|
1177
|
-
"ssr",
|
|
1178
|
-
// Layout and style
|
|
1179
|
-
"width",
|
|
1180
|
-
"height",
|
|
1181
|
-
"style",
|
|
1182
|
-
"color",
|
|
1183
|
-
"inline",
|
|
1184
|
-
// Transformations
|
|
1185
|
-
"rotate",
|
|
1186
|
-
"hFlip",
|
|
1187
|
-
"horizontalFlip",
|
|
1188
|
-
"vFlip",
|
|
1189
|
-
"verticalFlip",
|
|
1190
|
-
"flip",
|
|
1191
|
-
// Misc
|
|
1192
|
-
"id",
|
|
1193
|
-
"ariaHidden",
|
|
1194
|
-
"customise",
|
|
1195
|
-
"title"
|
|
1196
|
-
],
|
|
1197
|
-
emits: ["load"]
|
|
1198
|
-
}), Ke = /* @__PURE__ */ new Set([
|
|
16
|
+
}, me = /* @__PURE__ */ new Set([
|
|
1199
17
|
"3d",
|
|
1200
18
|
"actionscript",
|
|
1201
19
|
"ada",
|
|
@@ -1511,7 +329,7 @@ const jn = {
|
|
|
1511
329
|
"yarn",
|
|
1512
330
|
"zig",
|
|
1513
331
|
"zip"
|
|
1514
|
-
]),
|
|
332
|
+
]), ge = {
|
|
1515
333
|
// JavaScript/TypeScript
|
|
1516
334
|
js: "javascript",
|
|
1517
335
|
mjs: "javascript",
|
|
@@ -1695,7 +513,7 @@ const jn = {
|
|
|
1695
513
|
el: "lisp",
|
|
1696
514
|
vim: "vim",
|
|
1697
515
|
dockerfile: "docker"
|
|
1698
|
-
},
|
|
516
|
+
}, pe = {
|
|
1699
517
|
// Git
|
|
1700
518
|
".gitignore": "git",
|
|
1701
519
|
".gitattributes": "git",
|
|
@@ -1836,62 +654,62 @@ const jn = {
|
|
|
1836
654
|
"deno.json": "deno",
|
|
1837
655
|
"deno.jsonc": "deno"
|
|
1838
656
|
};
|
|
1839
|
-
function
|
|
657
|
+
function he(e, g) {
|
|
1840
658
|
const t = e.toLowerCase();
|
|
1841
|
-
if (
|
|
1842
|
-
const
|
|
1843
|
-
if (
|
|
1844
|
-
return `material-icon-theme:${
|
|
659
|
+
if (pe[t]) {
|
|
660
|
+
const i = pe[t];
|
|
661
|
+
if (me.has(i))
|
|
662
|
+
return `material-icon-theme:${i}`;
|
|
1845
663
|
}
|
|
1846
664
|
if (t === "dockerfile" || t.startsWith("dockerfile."))
|
|
1847
665
|
return "material-icon-theme:docker";
|
|
1848
666
|
if (t === ".env" || t.startsWith(".env."))
|
|
1849
667
|
return "material-icon-theme:settings";
|
|
1850
|
-
const
|
|
1851
|
-
if (
|
|
1852
|
-
const
|
|
1853
|
-
if (
|
|
668
|
+
const r = e.lastIndexOf("."), l = r > 0 ? e.substring(r + 1).toLowerCase() : "";
|
|
669
|
+
if (l === "ts" || l === "js") {
|
|
670
|
+
const i = e.substring(0, r).toLowerCase();
|
|
671
|
+
if (i.endsWith(".d"))
|
|
1854
672
|
return "material-icon-theme:typescript-def";
|
|
1855
|
-
if (
|
|
1856
|
-
return
|
|
673
|
+
if (i.endsWith(".test") || i.endsWith(".spec"))
|
|
674
|
+
return l === "ts" ? "material-icon-theme:test-ts" : "material-icon-theme:test-js";
|
|
1857
675
|
}
|
|
1858
|
-
if (
|
|
1859
|
-
const
|
|
1860
|
-
if (
|
|
1861
|
-
return
|
|
676
|
+
if (l === "jsx" || l === "tsx") {
|
|
677
|
+
const i = e.substring(0, r).toLowerCase();
|
|
678
|
+
if (i.endsWith(".test") || i.endsWith(".spec"))
|
|
679
|
+
return l === "tsx" ? "material-icon-theme:test-ts" : "material-icon-theme:test-jsx";
|
|
1862
680
|
}
|
|
1863
|
-
if (
|
|
1864
|
-
const
|
|
1865
|
-
if (
|
|
1866
|
-
return `material-icon-theme:${
|
|
681
|
+
if (l && ge[l]) {
|
|
682
|
+
const i = ge[l];
|
|
683
|
+
if (me.has(i))
|
|
684
|
+
return `material-icon-theme:${i}`;
|
|
1867
685
|
}
|
|
1868
|
-
return
|
|
686
|
+
return g ? Ce(g) : "material-icon-theme:document";
|
|
1869
687
|
}
|
|
1870
|
-
function
|
|
688
|
+
function Ce(e) {
|
|
1871
689
|
switch (e) {
|
|
1872
|
-
case
|
|
690
|
+
case d.IMAGE:
|
|
1873
691
|
return "material-icon-theme:image";
|
|
1874
|
-
case
|
|
692
|
+
case d.VIDEO:
|
|
1875
693
|
return "material-icon-theme:video";
|
|
1876
|
-
case
|
|
694
|
+
case d.MUSIC:
|
|
1877
695
|
return "material-icon-theme:audio";
|
|
1878
|
-
case
|
|
696
|
+
case d.CODE:
|
|
1879
697
|
return "material-icon-theme:javascript";
|
|
1880
|
-
case
|
|
698
|
+
case d.TEXT:
|
|
1881
699
|
return "material-icon-theme:document";
|
|
1882
|
-
case
|
|
700
|
+
case d.DOCUMENT:
|
|
1883
701
|
return "material-icon-theme:word";
|
|
1884
|
-
case
|
|
702
|
+
case d.PDF:
|
|
1885
703
|
return "material-icon-theme:pdf";
|
|
1886
|
-
case
|
|
704
|
+
case d.ARCHIVE:
|
|
1887
705
|
return "material-icon-theme:zip";
|
|
1888
|
-
case
|
|
706
|
+
case d.APPLICATION:
|
|
1889
707
|
return "material-icon-theme:exe";
|
|
1890
708
|
default:
|
|
1891
709
|
return "material-icon-theme:document";
|
|
1892
710
|
}
|
|
1893
711
|
}
|
|
1894
|
-
const
|
|
712
|
+
const Ie = /* @__PURE__ */ new Set([
|
|
1895
713
|
"admin",
|
|
1896
714
|
"android",
|
|
1897
715
|
"angular",
|
|
@@ -2147,7 +965,7 @@ const Sn = /* @__PURE__ */ new Set([
|
|
|
2147
965
|
"wordpress",
|
|
2148
966
|
"yarn",
|
|
2149
967
|
"zeabur"
|
|
2150
|
-
]),
|
|
968
|
+
]), Ee = {
|
|
2151
969
|
// 复数/变体
|
|
2152
970
|
tests: "test",
|
|
2153
971
|
__tests__: "test",
|
|
@@ -2296,14 +1114,14 @@ const Sn = /* @__PURE__ */ new Set([
|
|
|
2296
1114
|
electron: "desktop",
|
|
2297
1115
|
tauri: "src-tauri"
|
|
2298
1116
|
};
|
|
2299
|
-
function
|
|
2300
|
-
const
|
|
2301
|
-
if (!
|
|
2302
|
-
const t =
|
|
2303
|
-
if (
|
|
2304
|
-
return `material-icon-theme:folder-${
|
|
2305
|
-
}
|
|
2306
|
-
const
|
|
1117
|
+
function Me(e) {
|
|
1118
|
+
const g = (e || "").trim();
|
|
1119
|
+
if (!g) return;
|
|
1120
|
+
const t = g.replace(/[\\/]+$/, "").toLowerCase(), r = Ee[t] ?? t;
|
|
1121
|
+
if (Ie.has(r))
|
|
1122
|
+
return `material-icon-theme:folder-${r}`;
|
|
1123
|
+
}
|
|
1124
|
+
const je = /* @__PURE__ */ q({
|
|
2307
1125
|
__name: "FileIcon",
|
|
2308
1126
|
props: {
|
|
2309
1127
|
type: {},
|
|
@@ -2312,79 +1130,79 @@ const On = /* @__PURE__ */ G({
|
|
|
2312
1130
|
size: { default: 24 }
|
|
2313
1131
|
},
|
|
2314
1132
|
setup(e) {
|
|
2315
|
-
const
|
|
2316
|
-
if (
|
|
2317
|
-
return (
|
|
2318
|
-
if (
|
|
2319
|
-
return
|
|
2320
|
-
switch (
|
|
2321
|
-
case
|
|
1133
|
+
const g = e, t = F(() => {
|
|
1134
|
+
if (g.type === d.FOLDER)
|
|
1135
|
+
return (g.name ? Me(g.name) : void 0) ?? "flat-color-icons:folder";
|
|
1136
|
+
if (g.name)
|
|
1137
|
+
return he(g.name, g.type);
|
|
1138
|
+
switch (g.type) {
|
|
1139
|
+
case d.IMAGE:
|
|
2322
1140
|
return "material-icon-theme:image";
|
|
2323
|
-
case
|
|
1141
|
+
case d.TEXT:
|
|
2324
1142
|
return "material-icon-theme:document";
|
|
2325
|
-
case
|
|
1143
|
+
case d.CODE:
|
|
2326
1144
|
return "material-icon-theme:javascript";
|
|
2327
|
-
case
|
|
1145
|
+
case d.MUSIC:
|
|
2328
1146
|
return "material-icon-theme:audio";
|
|
2329
|
-
case
|
|
1147
|
+
case d.VIDEO:
|
|
2330
1148
|
return "material-icon-theme:video";
|
|
2331
|
-
case
|
|
1149
|
+
case d.PDF:
|
|
2332
1150
|
return "material-icon-theme:pdf";
|
|
2333
|
-
case
|
|
1151
|
+
case d.DOCUMENT:
|
|
2334
1152
|
return "material-icon-theme:word";
|
|
2335
|
-
case
|
|
1153
|
+
case d.APPLICATION:
|
|
2336
1154
|
return "material-icon-theme:exe";
|
|
2337
|
-
case
|
|
1155
|
+
case d.ARCHIVE:
|
|
2338
1156
|
return "material-icon-theme:zip";
|
|
2339
1157
|
default:
|
|
2340
1158
|
return "material-icon-theme:document";
|
|
2341
1159
|
}
|
|
2342
|
-
}),
|
|
2343
|
-
const
|
|
2344
|
-
switch (
|
|
2345
|
-
case
|
|
2346
|
-
return `${
|
|
2347
|
-
case
|
|
2348
|
-
return `${
|
|
2349
|
-
case
|
|
2350
|
-
return `${
|
|
2351
|
-
case
|
|
2352
|
-
return `${
|
|
2353
|
-
case
|
|
2354
|
-
return `${
|
|
2355
|
-
case
|
|
2356
|
-
return `${
|
|
2357
|
-
case
|
|
2358
|
-
case
|
|
2359
|
-
return `${
|
|
2360
|
-
case
|
|
2361
|
-
return `${
|
|
2362
|
-
case
|
|
2363
|
-
return `${
|
|
1160
|
+
}), r = F(() => {
|
|
1161
|
+
const l = "file-icon";
|
|
1162
|
+
switch (g.type) {
|
|
1163
|
+
case d.FOLDER:
|
|
1164
|
+
return `${l} file-icon--folder`;
|
|
1165
|
+
case d.IMAGE:
|
|
1166
|
+
return `${l} file-icon--image`;
|
|
1167
|
+
case d.TEXT:
|
|
1168
|
+
return `${l} file-icon--text`;
|
|
1169
|
+
case d.CODE:
|
|
1170
|
+
return `${l} file-icon--code`;
|
|
1171
|
+
case d.MUSIC:
|
|
1172
|
+
return `${l} file-icon--music`;
|
|
1173
|
+
case d.VIDEO:
|
|
1174
|
+
return `${l} file-icon--video`;
|
|
1175
|
+
case d.PDF:
|
|
1176
|
+
case d.DOCUMENT:
|
|
1177
|
+
return `${l} file-icon--pdf`;
|
|
1178
|
+
case d.APPLICATION:
|
|
1179
|
+
return `${l} file-icon--application`;
|
|
1180
|
+
case d.ARCHIVE:
|
|
1181
|
+
return `${l} file-icon--archive`;
|
|
2364
1182
|
default:
|
|
2365
|
-
return `${
|
|
1183
|
+
return `${l} file-icon--default`;
|
|
2366
1184
|
}
|
|
2367
1185
|
});
|
|
2368
|
-
return (
|
|
1186
|
+
return (l, i) => (a(), h("div", {
|
|
2369
1187
|
class: B(e.className)
|
|
2370
1188
|
}, [
|
|
2371
|
-
N(
|
|
1189
|
+
N(O(T), {
|
|
2372
1190
|
icon: t.value,
|
|
2373
1191
|
width: e.size,
|
|
2374
1192
|
height: e.size,
|
|
2375
|
-
class: B(
|
|
1193
|
+
class: B(r.value)
|
|
2376
1194
|
}, null, 8, ["icon", "width", "height", "class"])
|
|
2377
1195
|
], 2));
|
|
2378
1196
|
}
|
|
2379
|
-
}), K = (e,
|
|
1197
|
+
}), K = (e, g) => {
|
|
2380
1198
|
const t = e.__vccOpts || e;
|
|
2381
|
-
for (const [
|
|
2382
|
-
t[
|
|
1199
|
+
for (const [r, l] of g)
|
|
1200
|
+
t[r] = l;
|
|
2383
1201
|
return t;
|
|
2384
|
-
},
|
|
1202
|
+
}, be = /* @__PURE__ */ K(je, [["__scopeId", "data-v-25d349c6"]]), De = ["draggable", "onDragstart", "onDragover", "onDrop", "onClick", "onDblclick", "onContextmenu"], ze = { class: "file-grid-item-icon" }, Se = ["src", "alt"], Oe = {
|
|
2385
1203
|
key: 0,
|
|
2386
1204
|
class: "file-grid-item-thumbnail file-grid-item-thumbnail--video"
|
|
2387
|
-
},
|
|
1205
|
+
}, Le = ["src", "alt", "onError"], Te = ["src", "alt", "onError"], Ae = { class: "file-grid-item-name-wrapper" }, Ne = ["value", "onBlur"], Pe = ["onClick", "title"], Ue = { class: "file-grid-item-name-base" }, Fe = { class: "file-grid-item-name-ext" }, We = /* @__PURE__ */ q({
|
|
2388
1206
|
__name: "FileGrid",
|
|
2389
1207
|
props: {
|
|
2390
1208
|
items: {},
|
|
@@ -2394,140 +1212,140 @@ const On = /* @__PURE__ */ G({
|
|
|
2394
1212
|
getAppIconUrl: { type: Function }
|
|
2395
1213
|
},
|
|
2396
1214
|
emits: ["select", "open", "contextMenu", "contextMenuEmpty", "nameClick", "rename", "renameCancel", "dragStart", "dragOver", "dragLeave", "drop", "thumbnailError"],
|
|
2397
|
-
setup(e, { emit:
|
|
2398
|
-
function t(
|
|
2399
|
-
if (
|
|
2400
|
-
return { baseName:
|
|
2401
|
-
const
|
|
2402
|
-
return
|
|
2403
|
-
baseName:
|
|
2404
|
-
ext:
|
|
1215
|
+
setup(e, { emit: g }) {
|
|
1216
|
+
function t(n, C) {
|
|
1217
|
+
if (C)
|
|
1218
|
+
return { baseName: n, ext: "" };
|
|
1219
|
+
const c = n.lastIndexOf(".");
|
|
1220
|
+
return c <= 0 ? { baseName: n, ext: "" } : {
|
|
1221
|
+
baseName: n.substring(0, c),
|
|
1222
|
+
ext: n.substring(c)
|
|
2405
1223
|
};
|
|
2406
1224
|
}
|
|
2407
|
-
const
|
|
2408
|
-
function n
|
|
2409
|
-
const
|
|
2410
|
-
return
|
|
1225
|
+
const r = /* @__PURE__ */ new Map();
|
|
1226
|
+
function l(n) {
|
|
1227
|
+
const C = `${n.id}-${n.name}`;
|
|
1228
|
+
return r.has(C) || r.set(C, t(n.name, n.type === d.FOLDER)), r.get(C);
|
|
2411
1229
|
}
|
|
2412
|
-
const
|
|
2413
|
-
|
|
2414
|
-
},
|
|
2415
|
-
var
|
|
2416
|
-
return
|
|
2417
|
-
},
|
|
2418
|
-
const
|
|
2419
|
-
|
|
2420
|
-
},
|
|
2421
|
-
|
|
2422
|
-
},
|
|
2423
|
-
const
|
|
2424
|
-
|
|
1230
|
+
const i = e, w = g, I = (n) => {
|
|
1231
|
+
n.target.closest(".file-grid-item") || w("contextMenuEmpty", n);
|
|
1232
|
+
}, m = (n) => {
|
|
1233
|
+
var C;
|
|
1234
|
+
return n.type === d.APPLICATION && ((C = i.getAppIconUrl) != null && C.call(i, n)) ? !0 : n.type === d.IMAGE || n.type === d.VIDEO ? !!n.thumbnailUrl : !1;
|
|
1235
|
+
}, v = (n, C) => {
|
|
1236
|
+
const y = C.target.value.trim();
|
|
1237
|
+
y && y !== n.name ? w("rename", n, y) : w("renameCancel", n);
|
|
1238
|
+
}, b = (n) => {
|
|
1239
|
+
n.target.blur();
|
|
1240
|
+
}, u = (n) => {
|
|
1241
|
+
const C = n.target, c = i.items.find((y) => y.id === i.editingId);
|
|
1242
|
+
c && (C.value = c.name), C.blur();
|
|
2425
1243
|
};
|
|
2426
|
-
return (
|
|
1244
|
+
return (n, C) => (a(), h("div", {
|
|
2427
1245
|
class: "file-grid",
|
|
2428
|
-
onContextmenu:
|
|
1246
|
+
onContextmenu: R(I, ["prevent"])
|
|
2429
1247
|
}, [
|
|
2430
|
-
(
|
|
2431
|
-
var
|
|
2432
|
-
return
|
|
2433
|
-
key:
|
|
2434
|
-
draggable: e.editingId !==
|
|
2435
|
-
onDragstart: (
|
|
2436
|
-
onDragover:
|
|
2437
|
-
onDragleave:
|
|
2438
|
-
onDrop:
|
|
2439
|
-
onClick:
|
|
2440
|
-
onDblclick:
|
|
2441
|
-
onContextmenu:
|
|
1248
|
+
(a(!0), h(G, null, J(e.items, (c) => {
|
|
1249
|
+
var y;
|
|
1250
|
+
return a(), h("div", {
|
|
1251
|
+
key: c.id,
|
|
1252
|
+
draggable: e.editingId !== c.id,
|
|
1253
|
+
onDragstart: (M) => n.$emit("dragStart", M, c),
|
|
1254
|
+
onDragover: R((M) => n.$emit("dragOver", M, c), ["prevent"]),
|
|
1255
|
+
onDragleave: C[0] || (C[0] = (M) => n.$emit("dragLeave", M)),
|
|
1256
|
+
onDrop: R((M) => n.$emit("drop", M, c), ["prevent"]),
|
|
1257
|
+
onClick: R((M) => n.$emit("select", c, M), ["stop"]),
|
|
1258
|
+
onDblclick: R((M) => n.$emit("open", c), ["stop"]),
|
|
1259
|
+
onContextmenu: R((M) => n.$emit("contextMenu", c, M), ["prevent", "stop"]),
|
|
2442
1260
|
class: B([
|
|
2443
1261
|
"file-grid-item",
|
|
2444
|
-
e.selectedIds.has(
|
|
1262
|
+
e.selectedIds.has(c.id) && e.editingId !== c.id ? "file-grid-item--selected" : e.dragOverId === c.id ? "file-grid-item--drag-over" : "file-grid-item--normal"
|
|
2445
1263
|
])
|
|
2446
1264
|
}, [
|
|
2447
|
-
|
|
2448
|
-
|
|
1265
|
+
s("div", ze, [
|
|
1266
|
+
c.type === O(d).APPLICATION && ((y = e.getAppIconUrl) != null && y.call(e, c)) ? (a(), h("img", {
|
|
2449
1267
|
key: 0,
|
|
2450
|
-
src: e.getAppIconUrl(
|
|
2451
|
-
alt:
|
|
1268
|
+
src: e.getAppIconUrl(c),
|
|
1269
|
+
alt: c.name,
|
|
2452
1270
|
class: B([
|
|
2453
1271
|
"file-grid-item-thumbnail file-grid-item-thumbnail--application",
|
|
2454
|
-
e.selectedIds.has(
|
|
1272
|
+
e.selectedIds.has(c.id) && e.editingId !== c.id ? "file-grid-item-thumbnail--selected" : ""
|
|
2455
1273
|
])
|
|
2456
|
-
}, null, 10,
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
src:
|
|
1274
|
+
}, null, 10, Se)) : m(c) ? (a(), h(G, { key: 1 }, [
|
|
1275
|
+
c.type === O(d).VIDEO && c.thumbnailUrl ? (a(), h("div", Oe, [
|
|
1276
|
+
s("img", {
|
|
1277
|
+
src: c.thumbnailUrl,
|
|
2460
1278
|
class: "file-grid-item-thumbnail",
|
|
2461
|
-
alt:
|
|
2462
|
-
onError: (
|
|
2463
|
-
}, null, 40,
|
|
2464
|
-
|
|
2465
|
-
|
|
1279
|
+
alt: c.name,
|
|
1280
|
+
onError: (M) => n.$emit("thumbnailError", c, M)
|
|
1281
|
+
}, null, 40, Le),
|
|
1282
|
+
C[1] || (C[1] = s("div", { class: "file-grid-item-video-play" }, [
|
|
1283
|
+
s("div", { class: "file-grid-item-video-play-icon" })
|
|
2466
1284
|
], -1))
|
|
2467
|
-
])) :
|
|
1285
|
+
])) : c.thumbnailUrl ? (a(), h("img", {
|
|
2468
1286
|
key: 1,
|
|
2469
|
-
src:
|
|
2470
|
-
alt:
|
|
1287
|
+
src: c.thumbnailUrl,
|
|
1288
|
+
alt: c.name,
|
|
2471
1289
|
class: "file-grid-item-thumbnail",
|
|
2472
|
-
onError: (
|
|
2473
|
-
}, null, 40,
|
|
2474
|
-
], 64)) : (
|
|
1290
|
+
onError: (M) => n.$emit("thumbnailError", c, M)
|
|
1291
|
+
}, null, 40, Te)) : j("", !0)
|
|
1292
|
+
], 64)) : (a(), H(be, {
|
|
2475
1293
|
key: 2,
|
|
2476
|
-
type:
|
|
2477
|
-
name:
|
|
1294
|
+
type: c.type,
|
|
1295
|
+
name: c.name,
|
|
2478
1296
|
size: 48
|
|
2479
1297
|
}, null, 8, ["type", "name"]))
|
|
2480
1298
|
]),
|
|
2481
|
-
|
|
2482
|
-
e.editingId ===
|
|
1299
|
+
s("div", Ae, [
|
|
1300
|
+
e.editingId === c.id ? (a(), h("input", {
|
|
2483
1301
|
key: 0,
|
|
2484
1302
|
type: "text",
|
|
2485
1303
|
class: "file-grid-item-rename-input",
|
|
2486
|
-
value:
|
|
2487
|
-
onBlur: (
|
|
1304
|
+
value: c.name,
|
|
1305
|
+
onBlur: (M) => v(c, M),
|
|
2488
1306
|
onKeydown: [
|
|
2489
|
-
|
|
2490
|
-
|
|
1307
|
+
ce(b, ["enter"]),
|
|
1308
|
+
ce(u, ["escape"])
|
|
2491
1309
|
],
|
|
2492
1310
|
ref_for: !0,
|
|
2493
1311
|
ref: "renameInput",
|
|
2494
1312
|
autofocus: ""
|
|
2495
|
-
}, null, 40,
|
|
1313
|
+
}, null, 40, Ne)) : (a(), h("span", {
|
|
2496
1314
|
key: 1,
|
|
2497
|
-
onClick:
|
|
1315
|
+
onClick: R((M) => n.$emit("nameClick", c, M), ["stop"]),
|
|
2498
1316
|
class: B([
|
|
2499
1317
|
"file-grid-item-name",
|
|
2500
|
-
e.selectedIds.has(
|
|
1318
|
+
e.selectedIds.has(c.id) ? "file-grid-item-name--selected" : ""
|
|
2501
1319
|
]),
|
|
2502
|
-
title:
|
|
1320
|
+
title: c.name
|
|
2503
1321
|
}, [
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
], 64)) : (
|
|
2508
|
-
te(
|
|
1322
|
+
l(c).ext ? (a(), h(G, { key: 0 }, [
|
|
1323
|
+
s("span", Ue, z(l(c).baseName), 1),
|
|
1324
|
+
s("span", Fe, z(l(c).ext), 1)
|
|
1325
|
+
], 64)) : (a(), h(G, { key: 1 }, [
|
|
1326
|
+
te(z(c.name), 1)
|
|
2509
1327
|
], 64))
|
|
2510
|
-
], 10,
|
|
1328
|
+
], 10, Pe))
|
|
2511
1329
|
])
|
|
2512
|
-
], 42,
|
|
1330
|
+
], 42, De);
|
|
2513
1331
|
}), 128))
|
|
2514
1332
|
], 32));
|
|
2515
1333
|
}
|
|
2516
|
-
}),
|
|
1334
|
+
}), Re = /* @__PURE__ */ K(We, [["__scopeId", "data-v-c7f13402"]]), Be = { class: "sort-indicator" }, He = /* @__PURE__ */ q({
|
|
2517
1335
|
__name: "SortIndicator",
|
|
2518
1336
|
props: {
|
|
2519
1337
|
direction: {}
|
|
2520
1338
|
},
|
|
2521
1339
|
setup(e) {
|
|
2522
|
-
return (
|
|
2523
|
-
N(
|
|
1340
|
+
return (g, t) => (a(), h("span", Be, [
|
|
1341
|
+
N(O(T), {
|
|
2524
1342
|
icon: e.direction === "asc" ? "lucide:chevron-up" : "lucide:chevron-down",
|
|
2525
1343
|
width: 12,
|
|
2526
1344
|
height: 12
|
|
2527
1345
|
}, null, 8, ["icon"])
|
|
2528
1346
|
]));
|
|
2529
1347
|
}
|
|
2530
|
-
}),
|
|
1348
|
+
}), ae = /* @__PURE__ */ K(He, [["__scopeId", "data-v-6757236d"]]), Ve = { class: "file-list-table" }, _e = { class: "file-list-header" }, Ge = { class: "file-list-body" }, qe = ["draggable", "onDragstart", "onDragover", "onDrop", "onClick", "onDblclick", "onContextmenu"], Ke = { class: "file-list-cell file-list-cell--name" }, Xe = ["value", "onBlur"], Ye = ["onClick"], Je = /* @__PURE__ */ q({
|
|
2531
1349
|
__name: "FileList",
|
|
2532
1350
|
props: {
|
|
2533
1351
|
items: {},
|
|
@@ -2537,146 +1355,146 @@ const On = /* @__PURE__ */ G({
|
|
|
2537
1355
|
dragOverId: {}
|
|
2538
1356
|
},
|
|
2539
1357
|
emits: ["select", "open", "contextMenu", "contextMenuEmpty", "nameClick", "rename", "renameCancel", "sort", "dragStart", "dragOver", "dragLeave", "drop"],
|
|
2540
|
-
setup(e, { emit:
|
|
2541
|
-
const t = e,
|
|
2542
|
-
|
|
2543
|
-
},
|
|
2544
|
-
[
|
|
2545
|
-
[
|
|
2546
|
-
[
|
|
2547
|
-
[
|
|
2548
|
-
[
|
|
2549
|
-
[
|
|
2550
|
-
[
|
|
2551
|
-
[
|
|
2552
|
-
[
|
|
2553
|
-
[
|
|
2554
|
-
[
|
|
2555
|
-
[
|
|
2556
|
-
})[
|
|
2557
|
-
const
|
|
2558
|
-
|
|
2559
|
-
},
|
|
2560
|
-
|
|
2561
|
-
},
|
|
2562
|
-
const
|
|
2563
|
-
|
|
1358
|
+
setup(e, { emit: g }) {
|
|
1359
|
+
const t = e, r = g, l = (v) => {
|
|
1360
|
+
v.target.closest("tr") || r("contextMenuEmpty", v);
|
|
1361
|
+
}, i = (v) => ({
|
|
1362
|
+
[d.FOLDER]: "文件夹",
|
|
1363
|
+
[d.FILE]: "文件",
|
|
1364
|
+
[d.IMAGE]: "图片",
|
|
1365
|
+
[d.VIDEO]: "视频",
|
|
1366
|
+
[d.MUSIC]: "音频",
|
|
1367
|
+
[d.DOCUMENT]: "文档",
|
|
1368
|
+
[d.CODE]: "代码",
|
|
1369
|
+
[d.TEXT]: "文本",
|
|
1370
|
+
[d.PDF]: "PDF",
|
|
1371
|
+
[d.ARCHIVE]: "压缩包",
|
|
1372
|
+
[d.APPLICATION]: "应用程序",
|
|
1373
|
+
[d.UNKNOWN]: "未知"
|
|
1374
|
+
})[v] || v, w = (v, b) => {
|
|
1375
|
+
const n = b.target.value.trim();
|
|
1376
|
+
n && n !== v.name ? r("rename", v, n) : r("renameCancel", v);
|
|
1377
|
+
}, I = (v) => {
|
|
1378
|
+
v.target.blur();
|
|
1379
|
+
}, m = (v) => {
|
|
1380
|
+
const b = v.target, u = t.items.find((n) => n.id === t.editingId);
|
|
1381
|
+
u && (b.value = u.name), b.blur();
|
|
2564
1382
|
};
|
|
2565
|
-
return (
|
|
2566
|
-
var
|
|
2567
|
-
return
|
|
1383
|
+
return (v, b) => {
|
|
1384
|
+
var u, n, C, c;
|
|
1385
|
+
return a(), h("div", {
|
|
2568
1386
|
class: "file-list",
|
|
2569
|
-
onContextmenu:
|
|
1387
|
+
onContextmenu: R(l, ["prevent"])
|
|
2570
1388
|
}, [
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
1389
|
+
s("table", Ve, [
|
|
1390
|
+
s("thead", _e, [
|
|
1391
|
+
s("tr", null, [
|
|
1392
|
+
s("th", {
|
|
2575
1393
|
class: "file-list-header-cell file-list-header-cell--name",
|
|
2576
|
-
onClick:
|
|
1394
|
+
onClick: b[0] || (b[0] = (y) => v.$emit("sort", "name"))
|
|
2577
1395
|
}, [
|
|
2578
|
-
|
|
2579
|
-
((
|
|
1396
|
+
b[5] || (b[5] = te(" 名称 ", -1)),
|
|
1397
|
+
((u = e.sortConfig) == null ? void 0 : u.field) === "name" ? (a(), H(ae, {
|
|
2580
1398
|
key: 0,
|
|
2581
1399
|
direction: e.sortConfig.direction
|
|
2582
|
-
}, null, 8, ["direction"])) :
|
|
1400
|
+
}, null, 8, ["direction"])) : j("", !0)
|
|
2583
1401
|
]),
|
|
2584
|
-
|
|
1402
|
+
s("th", {
|
|
2585
1403
|
class: "file-list-header-cell",
|
|
2586
|
-
onClick:
|
|
1404
|
+
onClick: b[1] || (b[1] = (y) => v.$emit("sort", "dateModified"))
|
|
2587
1405
|
}, [
|
|
2588
|
-
|
|
2589
|
-
((
|
|
1406
|
+
b[6] || (b[6] = te(" 修改日期 ", -1)),
|
|
1407
|
+
((n = e.sortConfig) == null ? void 0 : n.field) === "dateModified" ? (a(), H(ae, {
|
|
2590
1408
|
key: 0,
|
|
2591
1409
|
direction: e.sortConfig.direction
|
|
2592
|
-
}, null, 8, ["direction"])) :
|
|
1410
|
+
}, null, 8, ["direction"])) : j("", !0)
|
|
2593
1411
|
]),
|
|
2594
|
-
|
|
1412
|
+
s("th", {
|
|
2595
1413
|
class: "file-list-header-cell",
|
|
2596
|
-
onClick:
|
|
1414
|
+
onClick: b[2] || (b[2] = (y) => v.$emit("sort", "size"))
|
|
2597
1415
|
}, [
|
|
2598
|
-
|
|
2599
|
-
((
|
|
1416
|
+
b[7] || (b[7] = te(" 大小 ", -1)),
|
|
1417
|
+
((C = e.sortConfig) == null ? void 0 : C.field) === "size" ? (a(), H(ae, {
|
|
2600
1418
|
key: 0,
|
|
2601
1419
|
direction: e.sortConfig.direction
|
|
2602
|
-
}, null, 8, ["direction"])) :
|
|
1420
|
+
}, null, 8, ["direction"])) : j("", !0)
|
|
2603
1421
|
]),
|
|
2604
|
-
|
|
1422
|
+
s("th", {
|
|
2605
1423
|
class: "file-list-header-cell",
|
|
2606
|
-
onClick:
|
|
1424
|
+
onClick: b[3] || (b[3] = (y) => v.$emit("sort", "type"))
|
|
2607
1425
|
}, [
|
|
2608
|
-
|
|
2609
|
-
((
|
|
1426
|
+
b[8] || (b[8] = te(" 类型 ", -1)),
|
|
1427
|
+
((c = e.sortConfig) == null ? void 0 : c.field) === "type" ? (a(), H(ae, {
|
|
2610
1428
|
key: 0,
|
|
2611
1429
|
direction: e.sortConfig.direction
|
|
2612
|
-
}, null, 8, ["direction"])) :
|
|
1430
|
+
}, null, 8, ["direction"])) : j("", !0)
|
|
2613
1431
|
])
|
|
2614
1432
|
])
|
|
2615
1433
|
]),
|
|
2616
|
-
|
|
2617
|
-
(
|
|
2618
|
-
key:
|
|
2619
|
-
draggable: e.editingId !==
|
|
2620
|
-
onDragstart: (S) =>
|
|
2621
|
-
onDragover:
|
|
2622
|
-
onDragleave:
|
|
2623
|
-
onDrop:
|
|
2624
|
-
onClick:
|
|
2625
|
-
onDblclick:
|
|
2626
|
-
onContextmenu:
|
|
1434
|
+
s("tbody", Ge, [
|
|
1435
|
+
(a(!0), h(G, null, J(e.items, (y, M) => (a(), h("tr", {
|
|
1436
|
+
key: y.id,
|
|
1437
|
+
draggable: e.editingId !== y.id,
|
|
1438
|
+
onDragstart: (S) => v.$emit("dragStart", S, y),
|
|
1439
|
+
onDragover: R((S) => v.$emit("dragOver", S, y), ["prevent"]),
|
|
1440
|
+
onDragleave: b[4] || (b[4] = (S) => v.$emit("dragLeave", S)),
|
|
1441
|
+
onDrop: R((S) => v.$emit("drop", S, y), ["prevent"]),
|
|
1442
|
+
onClick: R((S) => v.$emit("select", y, S), ["stop"]),
|
|
1443
|
+
onDblclick: R((S) => v.$emit("open", y), ["stop"]),
|
|
1444
|
+
onContextmenu: R((S) => v.$emit("contextMenu", y, S), ["prevent", "stop"]),
|
|
2627
1445
|
class: B([
|
|
2628
1446
|
"file-list-row",
|
|
2629
|
-
e.selectedIds.has(
|
|
1447
|
+
e.selectedIds.has(y.id) ? "file-list-row--selected" : e.dragOverId === y.id ? "file-list-row--drag-over" : M % 2 === 0 ? "file-list-row--even" : "file-list-row--odd"
|
|
2630
1448
|
])
|
|
2631
1449
|
}, [
|
|
2632
|
-
|
|
2633
|
-
N(
|
|
2634
|
-
type:
|
|
2635
|
-
name:
|
|
1450
|
+
s("td", Ke, [
|
|
1451
|
+
N(be, {
|
|
1452
|
+
type: y.type,
|
|
1453
|
+
name: y.name,
|
|
2636
1454
|
size: 16
|
|
2637
1455
|
}, null, 8, ["type", "name"]),
|
|
2638
|
-
e.editingId ===
|
|
1456
|
+
e.editingId === y.id ? (a(), h("input", {
|
|
2639
1457
|
key: 0,
|
|
2640
1458
|
type: "text",
|
|
2641
1459
|
class: "file-list-rename-input",
|
|
2642
|
-
value:
|
|
2643
|
-
onBlur: (S) =>
|
|
1460
|
+
value: y.name,
|
|
1461
|
+
onBlur: (S) => w(y, S),
|
|
2644
1462
|
onKeydown: [
|
|
2645
|
-
|
|
2646
|
-
|
|
1463
|
+
ce(I, ["enter"]),
|
|
1464
|
+
ce(m, ["escape"])
|
|
2647
1465
|
],
|
|
2648
1466
|
autofocus: ""
|
|
2649
|
-
}, null, 40,
|
|
1467
|
+
}, null, 40, Xe)) : (a(), h("span", {
|
|
2650
1468
|
key: 1,
|
|
2651
|
-
onClick:
|
|
1469
|
+
onClick: R((S) => v.$emit("nameClick", y, S), ["stop"]),
|
|
2652
1470
|
class: B([
|
|
2653
1471
|
"file-list-name",
|
|
2654
|
-
e.selectedIds.has(
|
|
1472
|
+
e.selectedIds.has(y.id) ? "file-list-name--selected" : ""
|
|
2655
1473
|
])
|
|
2656
|
-
},
|
|
1474
|
+
}, z(y.name), 11, Ye))
|
|
2657
1475
|
]),
|
|
2658
|
-
|
|
2659
|
-
class: B(["file-list-cell", e.selectedIds.has(
|
|
2660
|
-
},
|
|
2661
|
-
|
|
2662
|
-
class: B(["file-list-cell file-list-cell--size", e.selectedIds.has(
|
|
2663
|
-
},
|
|
2664
|
-
|
|
2665
|
-
class: B(["file-list-cell", e.selectedIds.has(
|
|
2666
|
-
},
|
|
2667
|
-
], 42,
|
|
1476
|
+
s("td", {
|
|
1477
|
+
class: B(["file-list-cell", e.selectedIds.has(y.id) ? "file-list-cell--selected" : ""])
|
|
1478
|
+
}, z(y.dateModified || "--"), 3),
|
|
1479
|
+
s("td", {
|
|
1480
|
+
class: B(["file-list-cell file-list-cell--size", e.selectedIds.has(y.id) ? "file-list-cell--selected" : ""])
|
|
1481
|
+
}, z(y.size || "--"), 3),
|
|
1482
|
+
s("td", {
|
|
1483
|
+
class: B(["file-list-cell", e.selectedIds.has(y.id) ? "file-list-cell--selected" : ""])
|
|
1484
|
+
}, z(i(y.type)), 3)
|
|
1485
|
+
], 42, qe))), 128))
|
|
2668
1486
|
])
|
|
2669
1487
|
])
|
|
2670
1488
|
], 32);
|
|
2671
1489
|
};
|
|
2672
1490
|
}
|
|
2673
|
-
}),
|
|
1491
|
+
}), Qe = /* @__PURE__ */ K(Je, [["__scopeId", "data-v-c6cf2ecb"]]), Ze = {
|
|
2674
1492
|
key: 0,
|
|
2675
1493
|
class: "file-list-view-loading"
|
|
2676
|
-
},
|
|
1494
|
+
}, et = {
|
|
2677
1495
|
key: 1,
|
|
2678
1496
|
class: "file-list-view-empty"
|
|
2679
|
-
},
|
|
1497
|
+
}, tt = /* @__PURE__ */ q({
|
|
2680
1498
|
__name: "FileListView",
|
|
2681
1499
|
props: {
|
|
2682
1500
|
items: {},
|
|
@@ -2687,208 +1505,210 @@ const On = /* @__PURE__ */ G({
|
|
|
2687
1505
|
getAppIconUrl: {}
|
|
2688
1506
|
},
|
|
2689
1507
|
emits: ["open", "selection-change", "context-menu", "context-menu-empty", "rename", "sort-change", "move"],
|
|
2690
|
-
setup(e, { expose:
|
|
2691
|
-
const
|
|
2692
|
-
() =>
|
|
2693
|
-
),
|
|
2694
|
-
if (
|
|
2695
|
-
const
|
|
2696
|
-
|
|
2697
|
-
} else if (
|
|
2698
|
-
const
|
|
2699
|
-
for (let
|
|
2700
|
-
|
|
2701
|
-
|
|
1508
|
+
setup(e, { expose: g, emit: t }) {
|
|
1509
|
+
const r = e, l = t, i = D(/* @__PURE__ */ new Set()), w = D(null), I = D(null), m = D({ field: "name", direction: "asc" }), v = F(
|
|
1510
|
+
() => r.items.filter((k) => i.value.has(k.id))
|
|
1511
|
+
), b = (k, E) => {
|
|
1512
|
+
if (E.metaKey || E.ctrlKey) {
|
|
1513
|
+
const P = new Set(i.value);
|
|
1514
|
+
P.has(k.id) ? P.delete(k.id) : P.add(k.id), i.value = P;
|
|
1515
|
+
} else if (E.shiftKey && i.value.size > 0) {
|
|
1516
|
+
const P = Array.from(i.value).pop(), _ = r.items.findIndex((Q) => Q.id === P), X = r.items.findIndex((Q) => Q.id === k.id), oe = Math.min(_, X), le = Math.max(_, X), ue = /* @__PURE__ */ new Set();
|
|
1517
|
+
for (let Q = oe; Q <= le; Q++)
|
|
1518
|
+
ue.add(r.items[Q].id);
|
|
1519
|
+
i.value = ue;
|
|
2702
1520
|
} else
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
},
|
|
2706
|
-
|
|
2707
|
-
},
|
|
2708
|
-
|
|
2709
|
-
},
|
|
2710
|
-
|
|
2711
|
-
},
|
|
2712
|
-
|
|
2713
|
-
},
|
|
2714
|
-
const
|
|
2715
|
-
!
|
|
2716
|
-
},
|
|
2717
|
-
|
|
2718
|
-
}, S = (
|
|
2719
|
-
|
|
2720
|
-
|
|
1521
|
+
i.value = /* @__PURE__ */ new Set([k.id]);
|
|
1522
|
+
l("selection-change", i.value, v.value);
|
|
1523
|
+
}, u = (k) => {
|
|
1524
|
+
k.target === k.currentTarget && n();
|
|
1525
|
+
}, n = () => {
|
|
1526
|
+
i.value = /* @__PURE__ */ new Set(), l("selection-change", i.value, []);
|
|
1527
|
+
}, C = (k) => {
|
|
1528
|
+
l("open", k);
|
|
1529
|
+
}, c = (k, E) => {
|
|
1530
|
+
i.value.has(k.id) || (i.value = /* @__PURE__ */ new Set([k.id]), l("selection-change", i.value, [k])), l("context-menu", E, k);
|
|
1531
|
+
}, y = (k) => {
|
|
1532
|
+
const E = k.target;
|
|
1533
|
+
!E.closest(".file-grid-item") && !E.closest(".file-list-row") && (n(), l("context-menu-empty", k));
|
|
1534
|
+
}, M = (k) => {
|
|
1535
|
+
n(), l("context-menu-empty", k);
|
|
1536
|
+
}, S = (k, E) => {
|
|
1537
|
+
i.value.has(k.id) && i.value.size === 1 && setTimeout(() => {
|
|
1538
|
+
i.value.has(k.id) && (w.value = k.id);
|
|
2721
1539
|
}, 500);
|
|
2722
|
-
},
|
|
2723
|
-
|
|
2724
|
-
},
|
|
2725
|
-
|
|
2726
|
-
},
|
|
2727
|
-
|
|
2728
|
-
},
|
|
2729
|
-
var
|
|
2730
|
-
|
|
2731
|
-
},
|
|
2732
|
-
|
|
2733
|
-
},
|
|
2734
|
-
|
|
2735
|
-
},
|
|
2736
|
-
var
|
|
2737
|
-
if (
|
|
2738
|
-
const
|
|
2739
|
-
if (
|
|
1540
|
+
}, L = (k, E) => {
|
|
1541
|
+
E && E !== k.name && l("rename", k, E), w.value = null;
|
|
1542
|
+
}, $ = () => {
|
|
1543
|
+
w.value = null;
|
|
1544
|
+
}, f = (k) => {
|
|
1545
|
+
m.value.field === k ? m.value.direction = m.value.direction === "asc" ? "desc" : "asc" : (m.value.field = k, m.value.direction = "asc"), l("sort-change", { ...m.value });
|
|
1546
|
+
}, A = (k, E) => {
|
|
1547
|
+
var P;
|
|
1548
|
+
i.value.has(E.id) || (i.value = /* @__PURE__ */ new Set([E.id]), l("selection-change", i.value, [E])), (P = k.dataTransfer) == null || P.setData("text/plain", JSON.stringify([...i.value]));
|
|
1549
|
+
}, U = (k, E) => {
|
|
1550
|
+
E.type === d.FOLDER && !i.value.has(E.id) && (I.value = E.id);
|
|
1551
|
+
}, o = () => {
|
|
1552
|
+
I.value = null;
|
|
1553
|
+
}, x = (k, E) => {
|
|
1554
|
+
var _;
|
|
1555
|
+
if (I.value = null, E.type !== d.FOLDER) return;
|
|
1556
|
+
const P = (_ = k.dataTransfer) == null ? void 0 : _.getData("text/plain");
|
|
1557
|
+
if (P)
|
|
2740
1558
|
try {
|
|
2741
|
-
const
|
|
2742
|
-
if (
|
|
2743
|
-
|
|
2744
|
-
} catch (
|
|
2745
|
-
console.error("拖拽解析失败:",
|
|
1559
|
+
const X = JSON.parse(P);
|
|
1560
|
+
if (X.includes(E.id)) return;
|
|
1561
|
+
l("move", X, E.id), n();
|
|
1562
|
+
} catch (X) {
|
|
1563
|
+
console.error("拖拽解析失败:", X);
|
|
2746
1564
|
}
|
|
2747
1565
|
};
|
|
2748
|
-
return
|
|
2749
|
-
clearSelection:
|
|
2750
|
-
startRename: (
|
|
2751
|
-
|
|
1566
|
+
return g({
|
|
1567
|
+
clearSelection: n,
|
|
1568
|
+
startRename: (k) => {
|
|
1569
|
+
w.value = k;
|
|
2752
1570
|
},
|
|
2753
1571
|
selectAll: () => {
|
|
2754
|
-
|
|
1572
|
+
i.value = new Set(r.items.map((k) => k.id)), l("selection-change", i.value, r.items);
|
|
2755
1573
|
},
|
|
2756
|
-
selectedIds:
|
|
2757
|
-
selectedItems:
|
|
2758
|
-
}), (
|
|
1574
|
+
selectedIds: i,
|
|
1575
|
+
selectedItems: v
|
|
1576
|
+
}), (k, E) => (a(), h("div", {
|
|
2759
1577
|
class: "file-list-view",
|
|
2760
|
-
onClick:
|
|
2761
|
-
onContextmenu:
|
|
1578
|
+
onClick: u,
|
|
1579
|
+
onContextmenu: R(y, ["prevent"])
|
|
2762
1580
|
}, [
|
|
2763
|
-
e.loading ? (
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
])])) : e.items.length === 0 ? (
|
|
2767
|
-
N(
|
|
2768
|
-
|
|
1581
|
+
e.loading ? (a(), h("div", Ze, [...E[0] || (E[0] = [
|
|
1582
|
+
s("div", { class: "file-list-view-spinner" }, null, -1),
|
|
1583
|
+
s("p", null, "加载中...", -1)
|
|
1584
|
+
])])) : e.items.length === 0 ? (a(), h("div", et, [
|
|
1585
|
+
N(O(T), {
|
|
1586
|
+
icon: "lucide:folder-open",
|
|
1587
|
+
width: "64",
|
|
1588
|
+
height: "64",
|
|
2769
1589
|
class: "file-list-view-empty-icon"
|
|
2770
1590
|
}),
|
|
2771
|
-
|
|
2772
|
-
])) : e.viewMode === "grid" ? (
|
|
1591
|
+
E[1] || (E[1] = s("p", null, "文件夹为空", -1))
|
|
1592
|
+
])) : e.viewMode === "grid" ? (a(), H(Re, {
|
|
2773
1593
|
key: 2,
|
|
2774
1594
|
items: e.items,
|
|
2775
|
-
"selected-ids":
|
|
2776
|
-
"editing-id":
|
|
2777
|
-
"drag-over-id":
|
|
1595
|
+
"selected-ids": i.value,
|
|
1596
|
+
"editing-id": w.value,
|
|
1597
|
+
"drag-over-id": I.value,
|
|
2778
1598
|
"get-app-icon-url": e.getAppIconUrl,
|
|
2779
|
-
onSelect:
|
|
2780
|
-
onOpen:
|
|
2781
|
-
onContextMenu:
|
|
2782
|
-
onContextMenuEmpty:
|
|
1599
|
+
onSelect: b,
|
|
1600
|
+
onOpen: C,
|
|
1601
|
+
onContextMenu: c,
|
|
1602
|
+
onContextMenuEmpty: M,
|
|
2783
1603
|
onNameClick: S,
|
|
2784
|
-
onRename:
|
|
2785
|
-
onRenameCancel:
|
|
2786
|
-
onDragStart:
|
|
2787
|
-
onDragOver:
|
|
2788
|
-
onDragLeave:
|
|
2789
|
-
onDrop:
|
|
2790
|
-
}, null, 8, ["items", "selected-ids", "editing-id", "drag-over-id", "get-app-icon-url"])) : (
|
|
1604
|
+
onRename: L,
|
|
1605
|
+
onRenameCancel: $,
|
|
1606
|
+
onDragStart: A,
|
|
1607
|
+
onDragOver: U,
|
|
1608
|
+
onDragLeave: o,
|
|
1609
|
+
onDrop: x
|
|
1610
|
+
}, null, 8, ["items", "selected-ids", "editing-id", "drag-over-id", "get-app-icon-url"])) : (a(), H(Qe, {
|
|
2791
1611
|
key: 3,
|
|
2792
1612
|
items: e.items,
|
|
2793
|
-
"selected-ids":
|
|
2794
|
-
"editing-id":
|
|
2795
|
-
"drag-over-id":
|
|
2796
|
-
"sort-config":
|
|
2797
|
-
onSelect:
|
|
2798
|
-
onOpen:
|
|
2799
|
-
onContextMenu:
|
|
2800
|
-
onContextMenuEmpty:
|
|
1613
|
+
"selected-ids": i.value,
|
|
1614
|
+
"editing-id": w.value,
|
|
1615
|
+
"drag-over-id": I.value,
|
|
1616
|
+
"sort-config": m.value,
|
|
1617
|
+
onSelect: b,
|
|
1618
|
+
onOpen: C,
|
|
1619
|
+
onContextMenu: c,
|
|
1620
|
+
onContextMenuEmpty: M,
|
|
2801
1621
|
onNameClick: S,
|
|
2802
|
-
onRename:
|
|
2803
|
-
onRenameCancel:
|
|
2804
|
-
onSort:
|
|
2805
|
-
onDragStart:
|
|
2806
|
-
onDragOver:
|
|
2807
|
-
onDragLeave:
|
|
2808
|
-
onDrop:
|
|
1622
|
+
onRename: L,
|
|
1623
|
+
onRenameCancel: $,
|
|
1624
|
+
onSort: f,
|
|
1625
|
+
onDragStart: A,
|
|
1626
|
+
onDragOver: U,
|
|
1627
|
+
onDragLeave: o,
|
|
1628
|
+
onDrop: x
|
|
2809
1629
|
}, null, 8, ["items", "selected-ids", "editing-id", "drag-over-id", "sort-config"]))
|
|
2810
1630
|
], 32));
|
|
2811
1631
|
}
|
|
2812
|
-
}),
|
|
1632
|
+
}), en = /* @__PURE__ */ K(tt, [["__scopeId", "data-v-543b5fad"]]), st = { class: "file-sidebar" }, nt = { class: "file-sidebar-section-title" }, it = { class: "file-sidebar-list" }, ot = ["onClick"], lt = /* @__PURE__ */ q({
|
|
2813
1633
|
__name: "FileSidebar",
|
|
2814
1634
|
props: {
|
|
2815
1635
|
sections: {},
|
|
2816
1636
|
activeId: {}
|
|
2817
1637
|
},
|
|
2818
1638
|
emits: ["navigate"],
|
|
2819
|
-
setup(e, { emit:
|
|
2820
|
-
const t =
|
|
2821
|
-
t("navigate",
|
|
1639
|
+
setup(e, { emit: g }) {
|
|
1640
|
+
const t = g, r = (i) => i ? i.includes(":") ? i : `lucide:${i.toLowerCase()}` : "mdi:folder", l = (i) => {
|
|
1641
|
+
t("navigate", i);
|
|
2822
1642
|
};
|
|
2823
|
-
return (
|
|
2824
|
-
(
|
|
2825
|
-
key:
|
|
1643
|
+
return (i, w) => (a(), h("div", st, [
|
|
1644
|
+
(a(!0), h(G, null, J(e.sections, (I) => (a(), h("div", {
|
|
1645
|
+
key: I.id,
|
|
2826
1646
|
class: "file-sidebar-section"
|
|
2827
1647
|
}, [
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
(
|
|
2831
|
-
key:
|
|
2832
|
-
onClick: (
|
|
1648
|
+
s("div", nt, z(I.title), 1),
|
|
1649
|
+
s("ul", it, [
|
|
1650
|
+
(a(!0), h(G, null, J(I.items, (m) => (a(), h("li", {
|
|
1651
|
+
key: m.id,
|
|
1652
|
+
onClick: (v) => l(m),
|
|
2833
1653
|
class: B([
|
|
2834
1654
|
"file-sidebar-item",
|
|
2835
|
-
e.activeId ===
|
|
1655
|
+
e.activeId === m.id ? "file-sidebar-item--active" : ""
|
|
2836
1656
|
])
|
|
2837
1657
|
}, [
|
|
2838
|
-
N(
|
|
2839
|
-
icon:
|
|
1658
|
+
N(O(T), {
|
|
1659
|
+
icon: r(m.icon),
|
|
2840
1660
|
width: 18,
|
|
2841
1661
|
height: 18,
|
|
2842
|
-
class: B(e.activeId ===
|
|
1662
|
+
class: B(e.activeId === m.id ? "file-sidebar-item-icon--active" : "file-sidebar-item-icon")
|
|
2843
1663
|
}, null, 8, ["icon", "class"]),
|
|
2844
|
-
|
|
2845
|
-
], 10,
|
|
1664
|
+
s("span", null, z(m.label), 1)
|
|
1665
|
+
], 10, ot))), 128))
|
|
2846
1666
|
])
|
|
2847
1667
|
]))), 128))
|
|
2848
1668
|
]));
|
|
2849
1669
|
}
|
|
2850
|
-
}),
|
|
1670
|
+
}), tn = /* @__PURE__ */ K(lt, [["__scopeId", "data-v-f672ee42"]]), at = { class: "file-breadcrumb" }, rt = ["onClick"], ct = /* @__PURE__ */ q({
|
|
2851
1671
|
__name: "Breadcrumb",
|
|
2852
1672
|
props: {
|
|
2853
1673
|
items: {}
|
|
2854
1674
|
},
|
|
2855
1675
|
emits: ["navigate"],
|
|
2856
|
-
setup(e, { emit:
|
|
2857
|
-
const t = e,
|
|
2858
|
-
|
|
1676
|
+
setup(e, { emit: g }) {
|
|
1677
|
+
const t = e, r = g, l = (i, w) => {
|
|
1678
|
+
w < t.items.length - 1 && r("navigate", i, w);
|
|
2859
1679
|
};
|
|
2860
|
-
return (
|
|
2861
|
-
(
|
|
2862
|
-
key:
|
|
1680
|
+
return (i, w) => (a(), h("div", at, [
|
|
1681
|
+
(a(!0), h(G, null, J(e.items, (I, m) => (a(), h("span", {
|
|
1682
|
+
key: I.id,
|
|
2863
1683
|
class: "file-breadcrumb-item"
|
|
2864
1684
|
}, [
|
|
2865
|
-
|
|
2866
|
-
onClick: (
|
|
1685
|
+
s("span", {
|
|
1686
|
+
onClick: (v) => l(I, m),
|
|
2867
1687
|
class: B([
|
|
2868
1688
|
"file-breadcrumb-link",
|
|
2869
|
-
|
|
1689
|
+
m === e.items.length - 1 ? "file-breadcrumb-link--current" : ""
|
|
2870
1690
|
])
|
|
2871
|
-
},
|
|
2872
|
-
|
|
1691
|
+
}, z(I.name), 11, rt),
|
|
1692
|
+
m < e.items.length - 1 ? (a(), H(O(T), {
|
|
2873
1693
|
key: 0,
|
|
2874
1694
|
icon: "lucide:chevron-right",
|
|
2875
1695
|
width: 14,
|
|
2876
1696
|
height: 14,
|
|
2877
1697
|
class: "file-breadcrumb-separator"
|
|
2878
|
-
})) :
|
|
1698
|
+
})) : j("", !0)
|
|
2879
1699
|
]))), 128))
|
|
2880
1700
|
]));
|
|
2881
1701
|
}
|
|
2882
|
-
}),
|
|
1702
|
+
}), dt = /* @__PURE__ */ K(ct, [["__scopeId", "data-v-632c82e3"]]), ut = { class: "file-toolbar-nav" }, mt = ["disabled"], gt = ["disabled"], pt = { class: "file-toolbar-breadcrumb" }, ft = {
|
|
2883
1703
|
key: 0,
|
|
2884
1704
|
class: "file-toolbar-custom"
|
|
2885
|
-
},
|
|
1705
|
+
}, vt = { class: "file-toolbar-actions" }, ht = {
|
|
2886
1706
|
key: 0,
|
|
2887
1707
|
class: "file-toolbar-search"
|
|
2888
|
-
},
|
|
1708
|
+
}, bt = ["value"], wt = {
|
|
2889
1709
|
key: 1,
|
|
2890
1710
|
class: "file-toolbar-view-toggle"
|
|
2891
|
-
},
|
|
1711
|
+
}, yt = /* @__PURE__ */ q({
|
|
2892
1712
|
__name: "Toolbar",
|
|
2893
1713
|
props: {
|
|
2894
1714
|
canGoBack: { type: Boolean, default: !1 },
|
|
@@ -2901,123 +1721,123 @@ const On = /* @__PURE__ */ G({
|
|
|
2901
1721
|
draggable: { type: Boolean, default: !1 }
|
|
2902
1722
|
},
|
|
2903
1723
|
emits: ["back", "forward", "breadcrumb-navigate", "update:viewMode", "update:searchQuery"],
|
|
2904
|
-
setup(e, { emit:
|
|
2905
|
-
const t =
|
|
2906
|
-
return (
|
|
1724
|
+
setup(e, { emit: g }) {
|
|
1725
|
+
const t = g;
|
|
1726
|
+
return (r, l) => (a(), h("div", {
|
|
2907
1727
|
class: B(["file-toolbar", { "file-toolbar--draggable": e.draggable }])
|
|
2908
1728
|
}, [
|
|
2909
|
-
|
|
2910
|
-
|
|
1729
|
+
s("div", ut, [
|
|
1730
|
+
s("button", {
|
|
2911
1731
|
class: "file-toolbar-button",
|
|
2912
|
-
onClick:
|
|
1732
|
+
onClick: l[0] || (l[0] = (i) => t("back")),
|
|
2913
1733
|
disabled: !e.canGoBack,
|
|
2914
1734
|
title: "后退"
|
|
2915
1735
|
}, [
|
|
2916
|
-
N(
|
|
1736
|
+
N(O(T), {
|
|
2917
1737
|
icon: "lucide:chevron-left",
|
|
2918
1738
|
width: 18,
|
|
2919
1739
|
height: 18
|
|
2920
1740
|
})
|
|
2921
|
-
], 8,
|
|
2922
|
-
|
|
1741
|
+
], 8, mt),
|
|
1742
|
+
s("button", {
|
|
2923
1743
|
class: "file-toolbar-button",
|
|
2924
|
-
onClick:
|
|
1744
|
+
onClick: l[1] || (l[1] = (i) => t("forward")),
|
|
2925
1745
|
disabled: !e.canGoForward,
|
|
2926
1746
|
title: "前进"
|
|
2927
1747
|
}, [
|
|
2928
|
-
N(
|
|
1748
|
+
N(O(T), {
|
|
2929
1749
|
icon: "lucide:chevron-right",
|
|
2930
1750
|
width: 18,
|
|
2931
1751
|
height: 18
|
|
2932
1752
|
})
|
|
2933
|
-
], 8,
|
|
1753
|
+
], 8, gt)
|
|
2934
1754
|
]),
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
e.breadcrumbs.length > 0 ? (
|
|
1755
|
+
s("div", pt, [
|
|
1756
|
+
Z(r.$slots, "breadcrumb", {}, () => [
|
|
1757
|
+
e.breadcrumbs.length > 0 ? (a(), H(dt, {
|
|
2938
1758
|
key: 0,
|
|
2939
1759
|
items: e.breadcrumbs,
|
|
2940
|
-
onNavigate:
|
|
2941
|
-
}, null, 8, ["items"])) :
|
|
1760
|
+
onNavigate: l[2] || (l[2] = (i) => t("breadcrumb-navigate", i))
|
|
1761
|
+
}, null, 8, ["items"])) : j("", !0)
|
|
2942
1762
|
], !0)
|
|
2943
1763
|
]),
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
])) :
|
|
2947
|
-
|
|
2948
|
-
e.showSearch ? (
|
|
2949
|
-
N(
|
|
1764
|
+
r.$slots.default ? (a(), h("div", ft, [
|
|
1765
|
+
Z(r.$slots, "default", {}, void 0, !0)
|
|
1766
|
+
])) : j("", !0),
|
|
1767
|
+
s("div", vt, [
|
|
1768
|
+
e.showSearch ? (a(), h("div", ht, [
|
|
1769
|
+
N(O(T), {
|
|
2950
1770
|
icon: "lucide:search",
|
|
2951
1771
|
width: 16,
|
|
2952
1772
|
height: 16,
|
|
2953
1773
|
class: "file-toolbar-search-icon"
|
|
2954
1774
|
}),
|
|
2955
|
-
|
|
1775
|
+
s("input", {
|
|
2956
1776
|
type: "text",
|
|
2957
1777
|
value: e.searchQuery,
|
|
2958
|
-
onInput:
|
|
1778
|
+
onInput: l[3] || (l[3] = (i) => t("update:searchQuery", i.target.value)),
|
|
2959
1779
|
placeholder: "搜索",
|
|
2960
1780
|
class: "file-toolbar-search-input"
|
|
2961
|
-
}, null, 40,
|
|
2962
|
-
])) :
|
|
2963
|
-
e.showViewToggle ? (
|
|
2964
|
-
|
|
2965
|
-
onClick:
|
|
1781
|
+
}, null, 40, bt)
|
|
1782
|
+
])) : j("", !0),
|
|
1783
|
+
e.showViewToggle ? (a(), h("div", wt, [
|
|
1784
|
+
s("button", {
|
|
1785
|
+
onClick: l[4] || (l[4] = (i) => t("update:viewMode", "grid")),
|
|
2966
1786
|
class: B(["file-toolbar-button", e.viewMode === "grid" ? "file-toolbar-button--active" : ""]),
|
|
2967
1787
|
title: "网格视图"
|
|
2968
1788
|
}, [
|
|
2969
|
-
N(
|
|
1789
|
+
N(O(T), {
|
|
2970
1790
|
icon: "lucide:layout-grid",
|
|
2971
1791
|
width: 18,
|
|
2972
1792
|
height: 18
|
|
2973
1793
|
})
|
|
2974
1794
|
], 2),
|
|
2975
|
-
|
|
2976
|
-
onClick:
|
|
1795
|
+
s("button", {
|
|
1796
|
+
onClick: l[5] || (l[5] = (i) => t("update:viewMode", "list")),
|
|
2977
1797
|
class: B(["file-toolbar-button", e.viewMode === "list" ? "file-toolbar-button--active" : ""]),
|
|
2978
1798
|
title: "列表视图"
|
|
2979
1799
|
}, [
|
|
2980
|
-
N(
|
|
1800
|
+
N(O(T), {
|
|
2981
1801
|
icon: "lucide:list",
|
|
2982
1802
|
width: 18,
|
|
2983
1803
|
height: 18
|
|
2984
1804
|
})
|
|
2985
1805
|
], 2)
|
|
2986
|
-
])) :
|
|
2987
|
-
|
|
1806
|
+
])) : j("", !0),
|
|
1807
|
+
Z(r.$slots, "actions", {}, void 0, !0)
|
|
2988
1808
|
])
|
|
2989
1809
|
], 2));
|
|
2990
1810
|
}
|
|
2991
|
-
}),
|
|
1811
|
+
}), sn = /* @__PURE__ */ K(yt, [["__scopeId", "data-v-d9b74270"]]), kt = { class: "file-status-bar" }, xt = { key: 0 }, $t = /* @__PURE__ */ q({
|
|
2992
1812
|
__name: "StatusBar",
|
|
2993
1813
|
props: {
|
|
2994
1814
|
itemCount: { default: 0 },
|
|
2995
1815
|
selectedCount: { default: 0 }
|
|
2996
1816
|
},
|
|
2997
1817
|
setup(e) {
|
|
2998
|
-
return (
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
e.selectedCount > 0 ? (
|
|
1818
|
+
return (g, t) => (a(), h("div", kt, [
|
|
1819
|
+
Z(g.$slots, "default", {}, () => [
|
|
1820
|
+
s("span", null, z(e.itemCount) + " 个项目", 1),
|
|
1821
|
+
e.selectedCount > 0 ? (a(), h("span", xt, " • 已选择 " + z(e.selectedCount) + " 个", 1)) : j("", !0)
|
|
3002
1822
|
], !0)
|
|
3003
1823
|
]));
|
|
3004
1824
|
}
|
|
3005
|
-
}),
|
|
1825
|
+
}), nn = /* @__PURE__ */ K($t, [["__scopeId", "data-v-f63c7226"]]), Ct = {
|
|
3006
1826
|
key: 0,
|
|
3007
1827
|
class: "context-menu-container"
|
|
3008
|
-
},
|
|
1828
|
+
}, It = {
|
|
3009
1829
|
key: 0,
|
|
3010
1830
|
class: "context-menu-separator"
|
|
3011
|
-
},
|
|
1831
|
+
}, Et = ["onClick", "onMouseenter"], Mt = { class: "context-menu-item-label" }, jt = {
|
|
3012
1832
|
key: 2,
|
|
3013
1833
|
class: "context-menu-item-shortcut"
|
|
3014
|
-
},
|
|
1834
|
+
}, Dt = {
|
|
3015
1835
|
key: 0,
|
|
3016
1836
|
class: "context-menu-separator"
|
|
3017
|
-
},
|
|
1837
|
+
}, zt = ["onClick"], St = { class: "context-menu-item-label" }, Ot = {
|
|
3018
1838
|
key: 2,
|
|
3019
1839
|
class: "context-menu-item-shortcut"
|
|
3020
|
-
},
|
|
1840
|
+
}, W = 8, Y = 220, Lt = 32, Tt = 9, At = 8, re = 0, Nt = /* @__PURE__ */ q({
|
|
3021
1841
|
__name: "ContextMenu",
|
|
3022
1842
|
props: {
|
|
3023
1843
|
visible: { type: Boolean },
|
|
@@ -3026,203 +1846,203 @@ const On = /* @__PURE__ */ G({
|
|
|
3026
1846
|
options: {}
|
|
3027
1847
|
},
|
|
3028
1848
|
emits: ["close", "select"],
|
|
3029
|
-
setup(e, { emit:
|
|
3030
|
-
const t = e,
|
|
3031
|
-
function
|
|
3032
|
-
let
|
|
3033
|
-
for (const
|
|
3034
|
-
|
|
3035
|
-
return
|
|
1849
|
+
setup(e, { emit: g }) {
|
|
1850
|
+
const t = e, r = g;
|
|
1851
|
+
function l(o) {
|
|
1852
|
+
let x = At;
|
|
1853
|
+
for (const p of o)
|
|
1854
|
+
x += p.separator ? Tt : Lt;
|
|
1855
|
+
return x;
|
|
3036
1856
|
}
|
|
3037
|
-
function o
|
|
3038
|
-
const
|
|
3039
|
-
let
|
|
3040
|
-
const
|
|
3041
|
-
|
|
3042
|
-
const
|
|
3043
|
-
return
|
|
1857
|
+
function i(o, x, p) {
|
|
1858
|
+
const V = window.innerWidth, k = window.innerHeight;
|
|
1859
|
+
let E = o, P = x;
|
|
1860
|
+
const _ = V - o, X = o;
|
|
1861
|
+
_ < Y + W && (X >= Y + W ? E = o - Y : _ > X ? E = V - Y - W : E = W);
|
|
1862
|
+
const oe = k - x, le = x;
|
|
1863
|
+
return oe < p + W && (le >= p + W ? P = x - p : oe > le ? P = k - p - W : P = W), E = Math.max(W, Math.min(E, V - Y - W)), P = Math.max(W, Math.min(P, k - p - W)), { x: E, y: P };
|
|
3044
1864
|
}
|
|
3045
|
-
function
|
|
3046
|
-
const
|
|
3047
|
-
let
|
|
3048
|
-
return
|
|
1865
|
+
function w(o, x) {
|
|
1866
|
+
const p = window.innerWidth, V = window.innerHeight, k = p - o.right, E = o.left;
|
|
1867
|
+
let P, _;
|
|
1868
|
+
return k >= Y + re + W ? P = o.right + re : E >= Y + re + W ? P = o.left - Y - re : k > E ? P = p - Y - W : P = W, _ = o.top, _ + x > V - W && (_ = V - x - W), _ < W && (_ = W), { x: P, y: _ };
|
|
3049
1869
|
}
|
|
3050
|
-
const
|
|
3051
|
-
const
|
|
3052
|
-
return
|
|
3053
|
-
}),
|
|
3054
|
-
left: `${
|
|
3055
|
-
top: `${
|
|
3056
|
-
})),
|
|
3057
|
-
left: `${
|
|
3058
|
-
top: `${
|
|
3059
|
-
} : {}),
|
|
3060
|
-
|
|
3061
|
-
},
|
|
3062
|
-
|
|
3063
|
-
if (!
|
|
3064
|
-
|
|
1870
|
+
const I = D(null), m = D(null), v = D(null), b = D(/* @__PURE__ */ new Map()), u = F(() => {
|
|
1871
|
+
const o = l(t.options);
|
|
1872
|
+
return i(t.x, t.y, o);
|
|
1873
|
+
}), n = F(() => ({
|
|
1874
|
+
left: `${u.value.x}px`,
|
|
1875
|
+
top: `${u.value.y}px`
|
|
1876
|
+
})), C = F(() => v.value ? {
|
|
1877
|
+
left: `${v.value.x}px`,
|
|
1878
|
+
top: `${v.value.y}px`
|
|
1879
|
+
} : {}), c = F(() => m.value ? t.options.find((o) => o.id === m.value && o.children && o.children.length > 0) : null), y = (o, x) => {
|
|
1880
|
+
x && x instanceof HTMLElement ? b.value.set(o, x) : b.value.delete(o);
|
|
1881
|
+
}, M = (o) => o.children && o.children.length > 0;
|
|
1882
|
+
ee(m, (o) => {
|
|
1883
|
+
if (!o || !c.value) {
|
|
1884
|
+
v.value = null;
|
|
3065
1885
|
return;
|
|
3066
1886
|
}
|
|
3067
|
-
|
|
3068
|
-
var
|
|
3069
|
-
const
|
|
3070
|
-
if (
|
|
3071
|
-
|
|
1887
|
+
fe(() => {
|
|
1888
|
+
var k;
|
|
1889
|
+
const x = b.value.get(o);
|
|
1890
|
+
if (!x || !((k = c.value) != null && k.children)) {
|
|
1891
|
+
v.value = null;
|
|
3072
1892
|
return;
|
|
3073
1893
|
}
|
|
3074
|
-
const
|
|
3075
|
-
|
|
1894
|
+
const p = x.getBoundingClientRect(), V = l(c.value.children);
|
|
1895
|
+
v.value = w(p, V);
|
|
3076
1896
|
});
|
|
3077
|
-
}),
|
|
3078
|
-
|
|
1897
|
+
}), ee(() => t.visible, (o) => {
|
|
1898
|
+
o || (m.value = null, v.value = null);
|
|
3079
1899
|
});
|
|
3080
|
-
const S = (
|
|
3081
|
-
const
|
|
3082
|
-
|
|
3083
|
-
},
|
|
3084
|
-
|
|
1900
|
+
const S = (o) => {
|
|
1901
|
+
const x = o.target, p = document.querySelector(".context-menu-container");
|
|
1902
|
+
p && p.contains(x) || r("close");
|
|
1903
|
+
}, L = (o) => {
|
|
1904
|
+
o.key === "Escape" && r("close");
|
|
3085
1905
|
};
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
}, { immediate: !0 }),
|
|
3089
|
-
document.removeEventListener("mousedown", S), document.removeEventListener("keydown",
|
|
1906
|
+
ee(() => t.visible, (o) => {
|
|
1907
|
+
o ? (document.addEventListener("mousedown", S), document.addEventListener("keydown", L)) : (document.removeEventListener("mousedown", S), document.removeEventListener("keydown", L));
|
|
1908
|
+
}, { immediate: !0 }), ne(() => {
|
|
1909
|
+
document.removeEventListener("mousedown", S), document.removeEventListener("keydown", L);
|
|
3090
1910
|
});
|
|
3091
|
-
const
|
|
3092
|
-
|
|
3093
|
-
},
|
|
3094
|
-
|
|
3095
|
-
},
|
|
3096
|
-
},
|
|
3097
|
-
|
|
1911
|
+
const $ = (o) => {
|
|
1912
|
+
o.disabled || o.children && o.children.length > 0 || (o.action && o.action(), r("select", o), r("close"));
|
|
1913
|
+
}, f = (o) => {
|
|
1914
|
+
o.children && o.children.length > 0 ? m.value = o.id : m.value = null;
|
|
1915
|
+
}, A = () => {
|
|
1916
|
+
}, U = () => {
|
|
1917
|
+
m.value = null;
|
|
3098
1918
|
};
|
|
3099
|
-
return (
|
|
3100
|
-
e.visible ? (
|
|
3101
|
-
|
|
1919
|
+
return (o, x) => (a(), H(ie, { to: "body" }, [
|
|
1920
|
+
e.visible ? (a(), h("div", Ct, [
|
|
1921
|
+
s("div", {
|
|
3102
1922
|
ref_key: "menuRef",
|
|
3103
|
-
ref:
|
|
1923
|
+
ref: I,
|
|
3104
1924
|
class: "context-menu",
|
|
3105
|
-
style:
|
|
1925
|
+
style: de(n.value)
|
|
3106
1926
|
}, [
|
|
3107
|
-
(
|
|
3108
|
-
key:
|
|
1927
|
+
(a(!0), h(G, null, J(e.options, (p, V) => (a(), h(G, {
|
|
1928
|
+
key: p.id || V
|
|
3109
1929
|
}, [
|
|
3110
|
-
|
|
1930
|
+
p.separator ? (a(), h("div", It)) : (a(), h("div", {
|
|
3111
1931
|
key: 1,
|
|
3112
1932
|
ref_for: !0,
|
|
3113
|
-
ref: (
|
|
1933
|
+
ref: (k) => y(p.id, k),
|
|
3114
1934
|
class: B([
|
|
3115
1935
|
"context-menu-item",
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
1936
|
+
p.disabled ? "context-menu-item--disabled" : "",
|
|
1937
|
+
p.danger ? "context-menu-item--danger" : "",
|
|
1938
|
+
M(p) ? "context-menu-item--has-children" : "",
|
|
1939
|
+
m.value === p.id ? "context-menu-item--active" : ""
|
|
3120
1940
|
]),
|
|
3121
|
-
onClick: (
|
|
3122
|
-
onMouseenter: (
|
|
1941
|
+
onClick: (k) => $(p),
|
|
1942
|
+
onMouseenter: (k) => f(p)
|
|
3123
1943
|
}, [
|
|
3124
|
-
|
|
1944
|
+
p.icon ? (a(), H(O(T), {
|
|
3125
1945
|
key: 0,
|
|
3126
|
-
icon:
|
|
1946
|
+
icon: p.icon,
|
|
3127
1947
|
width: "16",
|
|
3128
1948
|
height: "16",
|
|
3129
1949
|
class: "context-menu-item-icon"
|
|
3130
|
-
}, null, 8, ["icon"])) :
|
|
3131
|
-
|
|
3132
|
-
|
|
1950
|
+
}, null, 8, ["icon"])) : j("", !0),
|
|
1951
|
+
s("span", Mt, z(p.label), 1),
|
|
1952
|
+
p.checked ? (a(), H(O(T), {
|
|
3133
1953
|
key: 1,
|
|
3134
1954
|
icon: "lucide:check",
|
|
3135
1955
|
width: "14",
|
|
3136
1956
|
height: "14",
|
|
3137
1957
|
class: "context-menu-item-check"
|
|
3138
|
-
})) :
|
|
3139
|
-
|
|
3140
|
-
|
|
1958
|
+
})) : j("", !0),
|
|
1959
|
+
p.shortcut && !M(p) ? (a(), h("span", jt, z(p.shortcut), 1)) : j("", !0),
|
|
1960
|
+
M(p) ? (a(), H(O(T), {
|
|
3141
1961
|
key: 3,
|
|
3142
1962
|
icon: "lucide:chevron-right",
|
|
3143
1963
|
width: "14",
|
|
3144
1964
|
height: "14",
|
|
3145
1965
|
class: "context-menu-item-arrow"
|
|
3146
|
-
})) :
|
|
3147
|
-
], 42,
|
|
1966
|
+
})) : j("", !0)
|
|
1967
|
+
], 42, Et))
|
|
3148
1968
|
], 64))), 128))
|
|
3149
1969
|
], 4),
|
|
3150
|
-
|
|
1970
|
+
c.value && v.value ? (a(), h("div", {
|
|
3151
1971
|
key: 0,
|
|
3152
1972
|
class: "context-menu context-menu-submenu",
|
|
3153
|
-
style:
|
|
3154
|
-
onMouseenter:
|
|
3155
|
-
onMouseleave:
|
|
1973
|
+
style: de(C.value),
|
|
1974
|
+
onMouseenter: A,
|
|
1975
|
+
onMouseleave: U
|
|
3156
1976
|
}, [
|
|
3157
|
-
(
|
|
3158
|
-
key:
|
|
1977
|
+
(a(!0), h(G, null, J(c.value.children, (p, V) => (a(), h(G, {
|
|
1978
|
+
key: p.id || V
|
|
3159
1979
|
}, [
|
|
3160
|
-
|
|
1980
|
+
p.separator ? (a(), h("div", Dt)) : (a(), h("div", {
|
|
3161
1981
|
key: 1,
|
|
3162
1982
|
class: B([
|
|
3163
1983
|
"context-menu-item",
|
|
3164
|
-
|
|
3165
|
-
|
|
1984
|
+
p.disabled ? "context-menu-item--disabled" : "",
|
|
1985
|
+
p.danger ? "context-menu-item--danger" : ""
|
|
3166
1986
|
]),
|
|
3167
|
-
onClick: (
|
|
1987
|
+
onClick: (k) => $(p)
|
|
3168
1988
|
}, [
|
|
3169
|
-
|
|
1989
|
+
p.icon ? (a(), H(O(T), {
|
|
3170
1990
|
key: 0,
|
|
3171
|
-
icon:
|
|
1991
|
+
icon: p.icon,
|
|
3172
1992
|
width: "16",
|
|
3173
1993
|
height: "16",
|
|
3174
1994
|
class: "context-menu-item-icon"
|
|
3175
|
-
}, null, 8, ["icon"])) :
|
|
3176
|
-
|
|
3177
|
-
|
|
1995
|
+
}, null, 8, ["icon"])) : j("", !0),
|
|
1996
|
+
s("span", St, z(p.label), 1),
|
|
1997
|
+
p.checked ? (a(), H(O(T), {
|
|
3178
1998
|
key: 1,
|
|
3179
1999
|
icon: "lucide:check",
|
|
3180
2000
|
width: "14",
|
|
3181
2001
|
height: "14",
|
|
3182
2002
|
class: "context-menu-item-check"
|
|
3183
|
-
})) :
|
|
3184
|
-
|
|
3185
|
-
], 10,
|
|
2003
|
+
})) : j("", !0),
|
|
2004
|
+
p.shortcut ? (a(), h("span", Ot, z(p.shortcut), 1)) : j("", !0)
|
|
2005
|
+
], 10, zt))
|
|
3186
2006
|
], 64))), 128))
|
|
3187
|
-
], 36)) :
|
|
3188
|
-
])) :
|
|
2007
|
+
], 36)) : j("", !0)
|
|
2008
|
+
])) : j("", !0)
|
|
3189
2009
|
]));
|
|
3190
2010
|
}
|
|
3191
|
-
}),
|
|
3192
|
-
function
|
|
3193
|
-
const e =
|
|
3194
|
-
|
|
3195
|
-
x: e.value.x +
|
|
3196
|
-
y: e.value.y +
|
|
2011
|
+
}), on = /* @__PURE__ */ K(Nt, [["__scopeId", "data-v-503c7155"]]);
|
|
2012
|
+
function Pt() {
|
|
2013
|
+
const e = D({ x: 0, y: 0 }), g = D(!1), t = (i) => {
|
|
2014
|
+
g.value && (e.value = {
|
|
2015
|
+
x: e.value.x + i.movementX,
|
|
2016
|
+
y: e.value.y + i.movementY
|
|
3197
2017
|
});
|
|
3198
|
-
},
|
|
3199
|
-
|
|
3200
|
-
},
|
|
3201
|
-
const
|
|
3202
|
-
|
|
2018
|
+
}, r = () => {
|
|
2019
|
+
g.value = !1;
|
|
2020
|
+
}, l = (i) => {
|
|
2021
|
+
const w = i.target;
|
|
2022
|
+
w.closest(".draggable-area") && !w.closest("button") && (i.preventDefault(), g.value = !0);
|
|
3203
2023
|
};
|
|
3204
|
-
return
|
|
3205
|
-
|
|
3206
|
-
}),
|
|
3207
|
-
window.removeEventListener("mousemove", t), window.removeEventListener("mouseup",
|
|
2024
|
+
return ee(g, (i) => {
|
|
2025
|
+
i ? (window.addEventListener("mousemove", t), window.addEventListener("mouseup", r)) : (window.removeEventListener("mousemove", t), window.removeEventListener("mouseup", r));
|
|
2026
|
+
}), ne(() => {
|
|
2027
|
+
window.removeEventListener("mousemove", t), window.removeEventListener("mouseup", r);
|
|
3208
2028
|
}), {
|
|
3209
2029
|
position: e,
|
|
3210
|
-
isDragging:
|
|
3211
|
-
startDrag:
|
|
2030
|
+
isDragging: g,
|
|
2031
|
+
startDrag: l
|
|
3212
2032
|
};
|
|
3213
2033
|
}
|
|
3214
|
-
function
|
|
3215
|
-
const
|
|
3216
|
-
if (!
|
|
3217
|
-
const
|
|
3218
|
-
let
|
|
3219
|
-
const
|
|
3220
|
-
|
|
3221
|
-
},
|
|
3222
|
-
|
|
3223
|
-
},
|
|
3224
|
-
|
|
3225
|
-
}, S = (
|
|
2034
|
+
function Ut(e, g, t, r, l, i) {
|
|
2035
|
+
const w = D(e), I = D(g), m = D(!1), v = D(null), b = D(0), u = D(0), n = D(0), C = D(0), c = (L) => {
|
|
2036
|
+
if (!m.value || !v.value) return;
|
|
2037
|
+
const $ = L.clientX - b.value, f = L.clientY - u.value;
|
|
2038
|
+
let A = n.value, U = C.value;
|
|
2039
|
+
const o = v.value;
|
|
2040
|
+
o.includes("e") ? A = Math.min(Math.max(n.value + $, t), l) : o.includes("w") && (A = Math.min(Math.max(n.value - $, t), l)), o.includes("s") ? U = Math.min(Math.max(C.value + f, r), i) : o.includes("n") && (U = Math.min(Math.max(C.value - f, r), i)), w.value = A, I.value = U;
|
|
2041
|
+
}, y = () => {
|
|
2042
|
+
m.value = !1, v.value = null;
|
|
2043
|
+
}, M = (L, $, f, A) => {
|
|
2044
|
+
L.preventDefault(), L.stopPropagation(), m.value = !0, v.value = $, b.value = L.clientX, u.value = L.clientY, n.value = f, C.value = A;
|
|
2045
|
+
}, S = (L) => ({
|
|
3226
2046
|
n: "n-resize",
|
|
3227
2047
|
s: "s-resize",
|
|
3228
2048
|
e: "e-resize",
|
|
@@ -3231,19 +2051,19 @@ function Ws(e, s, t, i, n, o) {
|
|
|
3231
2051
|
nw: "nw-resize",
|
|
3232
2052
|
se: "se-resize",
|
|
3233
2053
|
sw: "sw-resize"
|
|
3234
|
-
})[
|
|
3235
|
-
return
|
|
3236
|
-
|
|
3237
|
-
}),
|
|
3238
|
-
window.removeEventListener("mousemove",
|
|
2054
|
+
})[L];
|
|
2055
|
+
return ee(m, (L) => {
|
|
2056
|
+
L ? (window.addEventListener("mousemove", c), window.addEventListener("mouseup", y), document.body.style.cursor = S(v.value || "se"), document.body.style.userSelect = "none") : (window.removeEventListener("mousemove", c), window.removeEventListener("mouseup", y), document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
2057
|
+
}), ne(() => {
|
|
2058
|
+
window.removeEventListener("mousemove", c), window.removeEventListener("mouseup", y), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
3239
2059
|
}), {
|
|
3240
|
-
width:
|
|
3241
|
-
height:
|
|
3242
|
-
isResizing:
|
|
3243
|
-
startResize:
|
|
2060
|
+
width: w,
|
|
2061
|
+
height: I,
|
|
2062
|
+
isResizing: m,
|
|
2063
|
+
startResize: M
|
|
3244
2064
|
};
|
|
3245
2065
|
}
|
|
3246
|
-
const
|
|
2066
|
+
const Ft = { class: "window-controls" }, Wt = { class: "window-title-info" }, Rt = { class: "window-title-text" }, Bt = { class: "window-title-actions" }, Ht = { class: "window-content" }, Vt = /* @__PURE__ */ q({
|
|
3247
2067
|
__name: "Window",
|
|
3248
2068
|
props: {
|
|
3249
2069
|
title: {},
|
|
@@ -3262,145 +2082,151 @@ const Bs = { class: "window-controls" }, Vs = { class: "window-title-info" }, _s
|
|
|
3262
2082
|
fitContent: { type: Boolean, default: !1 }
|
|
3263
2083
|
},
|
|
3264
2084
|
emits: ["close", "minimize", "maximize"],
|
|
3265
|
-
setup(e, { emit:
|
|
3266
|
-
const t = e,
|
|
3267
|
-
if (
|
|
2085
|
+
setup(e, { emit: g }) {
|
|
2086
|
+
const t = e, r = g, l = D(null), i = t.draggable ? Pt() : null, w = F(() => t.fitContent || t.width === "auto" || t.width === "fit-content" || t.height === "auto" || t.height === "fit-content"), I = () => {
|
|
2087
|
+
if (w.value)
|
|
3268
2088
|
return { initialWidth: 0, initialHeight: 0 };
|
|
3269
|
-
const
|
|
3270
|
-
let
|
|
3271
|
-
return t.width !== "auto" && t.width !== "fit-content" && (
|
|
3272
|
-
},
|
|
3273
|
-
const
|
|
2089
|
+
const o = 600, x = 500;
|
|
2090
|
+
let p = o, V = x;
|
|
2091
|
+
return t.width !== "auto" && t.width !== "fit-content" && (p = typeof t.width == "number" ? t.width : parseInt(t.width)), t.height !== "auto" && t.height !== "fit-content" && (V = typeof t.height == "number" ? t.height : parseInt(t.height)), { initialWidth: p, initialHeight: V };
|
|
2092
|
+
}, m = (o, x) => typeof o == "number" ? o : o.endsWith("px") ? parseInt(o) : o.endsWith("vw") ? parseInt(o) / 100 * window.innerWidth : o.endsWith("vh") ? parseInt(o) / 100 * window.innerHeight : x, { initialWidth: v, initialHeight: b } = I(), u = m(t.minWidth, 500), n = m(t.minHeight, 350), C = m(t.maxWidth, window.innerWidth * 0.8), c = m(t.maxHeight, window.innerHeight * 0.8), y = t.resizable ? Ut(v, b, u, n, C, c) : null, M = F(() => {
|
|
2093
|
+
const o = {
|
|
3274
2094
|
left: "50%",
|
|
3275
2095
|
top: "50%"
|
|
3276
2096
|
};
|
|
3277
|
-
let
|
|
3278
|
-
return t.draggable &&
|
|
3279
|
-
}), S = (
|
|
3280
|
-
t.closeOnBackdrop &&
|
|
3281
|
-
},
|
|
3282
|
-
t.draggable &&
|
|
3283
|
-
},
|
|
3284
|
-
|
|
3285
|
-
},
|
|
3286
|
-
|
|
3287
|
-
},
|
|
3288
|
-
|
|
3289
|
-
},
|
|
3290
|
-
if (!t.resizable || !
|
|
3291
|
-
const
|
|
3292
|
-
|
|
2097
|
+
let x = "-50%", p = "-50%";
|
|
2098
|
+
return t.draggable && i && (x = `calc(-50% + ${i.position.value.x}px)`, p = `calc(-50% + ${i.position.value.y}px)`), o.transform = `translate(${x}, ${p})`, o.transformOrigin = "center center", w.value ? t.resizable && y && y.width.value > 0 && (o.width = `${y.width.value}px`, o.height = `${y.height.value}px`) : t.resizable && y ? (o.width = `${y.width.value}px`, o.height = `${y.height.value}px`) : (t.width !== "auto" && t.width !== "fit-content" && (o.width = typeof t.width == "number" ? `${t.width}px` : t.width), t.height !== "auto" && t.height !== "fit-content" && (o.height = typeof t.height == "number" ? `${t.height}px` : t.height)), t.minWidth && (o.minWidth = typeof t.minWidth == "number" ? `${t.minWidth}px` : t.minWidth), t.minHeight && (o.minHeight = typeof t.minHeight == "number" ? `${t.minHeight}px` : t.minHeight), t.maxWidth && (o.maxWidth = typeof t.maxWidth == "number" ? `${t.maxWidth}px` : t.maxWidth), t.maxHeight && (o.maxHeight = typeof t.maxHeight == "number" ? `${t.maxHeight}px` : t.maxHeight), o;
|
|
2099
|
+
}), S = (o) => {
|
|
2100
|
+
t.closeOnBackdrop && o.target === o.currentTarget && r("close");
|
|
2101
|
+
}, L = (o) => {
|
|
2102
|
+
t.draggable && i && i.startDrag(o);
|
|
2103
|
+
}, $ = () => {
|
|
2104
|
+
r("close");
|
|
2105
|
+
}, f = () => {
|
|
2106
|
+
r("minimize");
|
|
2107
|
+
}, A = () => {
|
|
2108
|
+
r("maximize");
|
|
2109
|
+
}, U = (o, x) => {
|
|
2110
|
+
if (!t.resizable || !y || !l.value) return;
|
|
2111
|
+
const p = l.value.getBoundingClientRect(), V = p.width, k = p.height;
|
|
2112
|
+
y.startResize(o, x, V, k);
|
|
3293
2113
|
};
|
|
3294
|
-
return
|
|
3295
|
-
const
|
|
3296
|
-
|
|
2114
|
+
return ve(() => {
|
|
2115
|
+
const o = (x) => {
|
|
2116
|
+
x.key === "Escape" && (x.preventDefault(), r("close"));
|
|
3297
2117
|
};
|
|
3298
|
-
window.addEventListener("keydown",
|
|
3299
|
-
window.removeEventListener("keydown",
|
|
2118
|
+
window.addEventListener("keydown", o), ne(() => {
|
|
2119
|
+
window.removeEventListener("keydown", o);
|
|
3300
2120
|
});
|
|
3301
|
-
}), (
|
|
3302
|
-
|
|
2121
|
+
}), (o, x) => (a(), H(ie, { to: "body" }, [
|
|
2122
|
+
s("div", {
|
|
3303
2123
|
class: "window-overlay",
|
|
3304
2124
|
onClick: S
|
|
3305
2125
|
}, [
|
|
3306
|
-
|
|
2126
|
+
s("div", {
|
|
3307
2127
|
ref_key: "windowContainerRef",
|
|
3308
|
-
ref:
|
|
2128
|
+
ref: l,
|
|
3309
2129
|
class: "window-container",
|
|
3310
|
-
style:
|
|
3311
|
-
onClick:
|
|
2130
|
+
style: de(M.value),
|
|
2131
|
+
onClick: x[8] || (x[8] = R(() => {
|
|
3312
2132
|
}, ["stop"]))
|
|
3313
2133
|
}, [
|
|
3314
|
-
e.showTitleBar ? (
|
|
2134
|
+
e.showTitleBar ? (a(), h("div", {
|
|
3315
2135
|
key: 0,
|
|
3316
2136
|
class: "window-title-bar draggable-area",
|
|
3317
|
-
onMousedown:
|
|
2137
|
+
onMousedown: L
|
|
3318
2138
|
}, [
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
onClick:
|
|
2139
|
+
s("div", Ft, [
|
|
2140
|
+
s("button", {
|
|
2141
|
+
onClick: R($, ["stop"]),
|
|
3322
2142
|
class: "window-control-button window-control-button--close"
|
|
3323
2143
|
}, [
|
|
3324
|
-
N(
|
|
3325
|
-
|
|
2144
|
+
N(O(T), {
|
|
2145
|
+
icon: "lucide:x",
|
|
2146
|
+
width: "7",
|
|
2147
|
+
height: "7",
|
|
3326
2148
|
class: "window-control-icon"
|
|
3327
2149
|
})
|
|
3328
2150
|
]),
|
|
3329
|
-
e.showMinimize ? (
|
|
2151
|
+
e.showMinimize ? (a(), h("button", {
|
|
3330
2152
|
key: 0,
|
|
3331
|
-
onClick:
|
|
2153
|
+
onClick: R(f, ["stop"]),
|
|
3332
2154
|
class: "window-control-button window-control-button--minimize"
|
|
3333
2155
|
}, [
|
|
3334
|
-
N(
|
|
3335
|
-
|
|
2156
|
+
N(O(T), {
|
|
2157
|
+
icon: "lucide:minus",
|
|
2158
|
+
width: "7",
|
|
2159
|
+
height: "7",
|
|
3336
2160
|
class: "window-control-icon"
|
|
3337
2161
|
})
|
|
3338
|
-
])) :
|
|
3339
|
-
e.showMaximize ? (
|
|
2162
|
+
])) : j("", !0),
|
|
2163
|
+
e.showMaximize ? (a(), h("button", {
|
|
3340
2164
|
key: 1,
|
|
3341
|
-
onClick:
|
|
2165
|
+
onClick: R(A, ["stop"]),
|
|
3342
2166
|
class: "window-control-button window-control-button--maximize"
|
|
3343
2167
|
}, [
|
|
3344
|
-
N(
|
|
3345
|
-
|
|
2168
|
+
N(O(T), {
|
|
2169
|
+
icon: "lucide:maximize-2",
|
|
2170
|
+
width: "7",
|
|
2171
|
+
height: "7",
|
|
3346
2172
|
class: "window-control-icon"
|
|
3347
2173
|
})
|
|
3348
|
-
])) :
|
|
2174
|
+
])) : j("", !0)
|
|
3349
2175
|
]),
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
2176
|
+
s("div", Wt, [
|
|
2177
|
+
Z(o.$slots, "title", {}, () => [
|
|
2178
|
+
s("span", Rt, z(e.title), 1)
|
|
3353
2179
|
], !0)
|
|
3354
2180
|
]),
|
|
3355
|
-
|
|
3356
|
-
|
|
2181
|
+
s("div", Bt, [
|
|
2182
|
+
Z(o.$slots, "actions", {}, void 0, !0)
|
|
3357
2183
|
])
|
|
3358
|
-
], 32)) :
|
|
3359
|
-
|
|
3360
|
-
|
|
2184
|
+
], 32)) : j("", !0),
|
|
2185
|
+
s("div", Ht, [
|
|
2186
|
+
Z(o.$slots, "default", {}, void 0, !0)
|
|
3361
2187
|
]),
|
|
3362
|
-
e.resizable ? (
|
|
3363
|
-
|
|
2188
|
+
e.resizable ? (a(), h(G, { key: 1 }, [
|
|
2189
|
+
s("div", {
|
|
3364
2190
|
class: "window-resize-handle window-resize-handle--n",
|
|
3365
|
-
onMousedown:
|
|
2191
|
+
onMousedown: x[0] || (x[0] = (p) => U(p, "n"))
|
|
3366
2192
|
}, null, 32),
|
|
3367
|
-
|
|
2193
|
+
s("div", {
|
|
3368
2194
|
class: "window-resize-handle window-resize-handle--s",
|
|
3369
|
-
onMousedown:
|
|
2195
|
+
onMousedown: x[1] || (x[1] = (p) => U(p, "s"))
|
|
3370
2196
|
}, null, 32),
|
|
3371
|
-
|
|
2197
|
+
s("div", {
|
|
3372
2198
|
class: "window-resize-handle window-resize-handle--e",
|
|
3373
|
-
onMousedown:
|
|
2199
|
+
onMousedown: x[2] || (x[2] = (p) => U(p, "e"))
|
|
3374
2200
|
}, null, 32),
|
|
3375
|
-
|
|
2201
|
+
s("div", {
|
|
3376
2202
|
class: "window-resize-handle window-resize-handle--w",
|
|
3377
|
-
onMousedown:
|
|
2203
|
+
onMousedown: x[3] || (x[3] = (p) => U(p, "w"))
|
|
3378
2204
|
}, null, 32),
|
|
3379
|
-
|
|
2205
|
+
s("div", {
|
|
3380
2206
|
class: "window-resize-handle window-resize-handle--ne",
|
|
3381
|
-
onMousedown:
|
|
2207
|
+
onMousedown: x[4] || (x[4] = (p) => U(p, "ne"))
|
|
3382
2208
|
}, null, 32),
|
|
3383
|
-
|
|
2209
|
+
s("div", {
|
|
3384
2210
|
class: "window-resize-handle window-resize-handle--nw",
|
|
3385
|
-
onMousedown:
|
|
2211
|
+
onMousedown: x[5] || (x[5] = (p) => U(p, "nw"))
|
|
3386
2212
|
}, null, 32),
|
|
3387
|
-
|
|
2213
|
+
s("div", {
|
|
3388
2214
|
class: "window-resize-handle window-resize-handle--se",
|
|
3389
|
-
onMousedown:
|
|
2215
|
+
onMousedown: x[6] || (x[6] = (p) => U(p, "se"))
|
|
3390
2216
|
}, null, 32),
|
|
3391
|
-
|
|
2217
|
+
s("div", {
|
|
3392
2218
|
class: "window-resize-handle window-resize-handle--sw",
|
|
3393
|
-
onMousedown:
|
|
2219
|
+
onMousedown: x[7] || (x[7] = (p) => U(p, "sw"))
|
|
3394
2220
|
}, null, 32)
|
|
3395
|
-
], 64)) :
|
|
2221
|
+
], 64)) : j("", !0)
|
|
3396
2222
|
], 4)
|
|
3397
2223
|
])
|
|
3398
2224
|
]));
|
|
3399
2225
|
}
|
|
3400
|
-
}),
|
|
2226
|
+
}), ln = /* @__PURE__ */ K(Vt, [["__scopeId", "data-v-b0daa560"]]), _t = { class: "compress-dialog-header" }, Gt = { class: "compress-dialog-title" }, qt = { class: "compress-dialog-content" }, Kt = { class: "compress-dialog-info" }, Xt = { class: "compress-dialog-field" }, Yt = { class: "compress-dialog-input-group" }, Jt = { class: "compress-dialog-ext" }, Qt = { class: "compress-dialog-field" }, Zt = ["value"], es = { class: "compress-dialog-field" }, ts = { class: "compress-dialog-levels" }, ss = ["value"], ns = { class: "compress-dialog-level-label" }, is = { class: "compress-dialog-level-desc" }, os = {
|
|
3401
2227
|
key: 0,
|
|
3402
2228
|
class: "compress-dialog-field"
|
|
3403
|
-
},
|
|
2229
|
+
}, ls = { class: "compress-dialog-input-group" }, as = ["type"], rs = { class: "compress-dialog-field compress-dialog-checkbox" }, cs = { class: "compress-dialog-preview" }, ds = { class: "compress-dialog-preview-path" }, us = { class: "compress-dialog-footer" }, ms = ["disabled"], gs = /* @__PURE__ */ q({
|
|
3404
2230
|
__name: "CompressDialog",
|
|
3405
2231
|
props: {
|
|
3406
2232
|
visible: { type: Boolean },
|
|
@@ -3408,191 +2234,203 @@ const Bs = { class: "window-controls" }, Vs = { class: "window-title-info" }, _s
|
|
|
3408
2234
|
outputDir: {}
|
|
3409
2235
|
},
|
|
3410
2236
|
emits: ["confirm", "cancel"],
|
|
3411
|
-
setup(e, { emit:
|
|
3412
|
-
const t = e,
|
|
2237
|
+
setup(e, { emit: g }) {
|
|
2238
|
+
const t = e, r = g, l = [
|
|
3413
2239
|
{ value: "zip", label: "ZIP", ext: ".zip" },
|
|
3414
2240
|
{ value: "tgz", label: "TAR.GZ (gzip)", ext: ".tar.gz" },
|
|
3415
2241
|
{ value: "tarbz2", label: "TAR.BZ2 (bzip2)", ext: ".tar.bz2" },
|
|
3416
2242
|
{ value: "tar", label: "TAR (无压缩)", ext: ".tar" }
|
|
3417
|
-
],
|
|
2243
|
+
], i = [
|
|
3418
2244
|
{ value: "fast", label: "快速", desc: "压缩速度快,文件较大" },
|
|
3419
2245
|
{ value: "normal", label: "标准", desc: "平衡速度和大小" },
|
|
3420
2246
|
{ value: "best", label: "最佳", desc: "文件最小,速度较慢" }
|
|
3421
|
-
],
|
|
3422
|
-
var
|
|
3423
|
-
return ((
|
|
3424
|
-
}),
|
|
3425
|
-
|
|
3426
|
-
|
|
2247
|
+
], w = D("zip"), I = D("normal"), m = D(""), v = D(!1), b = D(""), u = D(!1), n = F(() => t.filePaths.length === 0 ? "archive" : t.filePaths.length === 1 ? (t.filePaths[0].split("/").pop() || "archive").replace(/\.[^.]+$/, "") : "压缩文件"), C = F(() => t.filePaths.length === 1 ? t.filePaths[0].split("/").pop() : `${t.filePaths.length} 个项目`), c = F(() => {
|
|
2248
|
+
var L;
|
|
2249
|
+
return ((L = l.find(($) => $.value === w.value)) == null ? void 0 : L.ext) || ".zip";
|
|
2250
|
+
}), y = F(() => `${t.outputDir}/${m.value}${c.value}`), M = F(() => !1);
|
|
2251
|
+
ee(() => t.visible, (L) => {
|
|
2252
|
+
L && (m.value = n.value, w.value = "zip", I.value = "normal", v.value = !1, b.value = "");
|
|
3427
2253
|
});
|
|
3428
2254
|
const S = () => {
|
|
3429
|
-
|
|
3430
|
-
format:
|
|
3431
|
-
level:
|
|
3432
|
-
outputName:
|
|
3433
|
-
deleteSource:
|
|
2255
|
+
r("confirm", {
|
|
2256
|
+
format: w.value,
|
|
2257
|
+
level: I.value,
|
|
2258
|
+
outputName: m.value + c.value,
|
|
2259
|
+
deleteSource: v.value
|
|
3434
2260
|
});
|
|
3435
2261
|
};
|
|
3436
|
-
return (
|
|
3437
|
-
e.visible ? (
|
|
2262
|
+
return (L, $) => (a(), H(ie, { to: "body" }, [
|
|
2263
|
+
e.visible ? (a(), h("div", {
|
|
3438
2264
|
key: 0,
|
|
3439
2265
|
class: "compress-dialog-overlay",
|
|
3440
|
-
onClick:
|
|
2266
|
+
onClick: $[9] || ($[9] = (f) => r("cancel"))
|
|
3441
2267
|
}, [
|
|
3442
|
-
|
|
2268
|
+
s("div", {
|
|
3443
2269
|
class: "compress-dialog",
|
|
3444
|
-
onClick:
|
|
2270
|
+
onClick: $[8] || ($[8] = R(() => {
|
|
3445
2271
|
}, ["stop"]))
|
|
3446
2272
|
}, [
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
N(
|
|
3450
|
-
|
|
2273
|
+
s("div", _t, [
|
|
2274
|
+
s("div", Gt, [
|
|
2275
|
+
N(O(T), {
|
|
2276
|
+
icon: "lucide:archive",
|
|
2277
|
+
width: "20",
|
|
2278
|
+
height: "20"
|
|
2279
|
+
}),
|
|
2280
|
+
$[10] || ($[10] = s("span", null, "压缩文件", -1))
|
|
3451
2281
|
]),
|
|
3452
|
-
|
|
2282
|
+
s("button", {
|
|
3453
2283
|
class: "compress-dialog-close",
|
|
3454
|
-
onClick:
|
|
2284
|
+
onClick: $[0] || ($[0] = (f) => r("cancel"))
|
|
3455
2285
|
}, [
|
|
3456
|
-
N(
|
|
2286
|
+
N(O(T), {
|
|
2287
|
+
icon: "lucide:x",
|
|
2288
|
+
width: "18",
|
|
2289
|
+
height: "18"
|
|
2290
|
+
})
|
|
3457
2291
|
])
|
|
3458
2292
|
]),
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
N(
|
|
3462
|
-
|
|
2293
|
+
s("div", qt, [
|
|
2294
|
+
s("div", Kt, [
|
|
2295
|
+
N(O(T), {
|
|
2296
|
+
icon: "lucide:file-archive",
|
|
2297
|
+
width: "16",
|
|
2298
|
+
height: "16"
|
|
2299
|
+
}),
|
|
2300
|
+
s("span", null, z(C.value), 1)
|
|
3463
2301
|
]),
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
2302
|
+
s("div", Xt, [
|
|
2303
|
+
$[11] || ($[11] = s("label", null, "文件名", -1)),
|
|
2304
|
+
s("div", Yt, [
|
|
2305
|
+
se(s("input", {
|
|
3468
2306
|
type: "text",
|
|
3469
|
-
"onUpdate:modelValue":
|
|
2307
|
+
"onUpdate:modelValue": $[1] || ($[1] = (f) => m.value = f),
|
|
3470
2308
|
placeholder: "输入文件名"
|
|
3471
2309
|
}, null, 512), [
|
|
3472
|
-
[
|
|
2310
|
+
[we, m.value]
|
|
3473
2311
|
]),
|
|
3474
|
-
|
|
2312
|
+
s("span", Jt, z(c.value), 1)
|
|
3475
2313
|
])
|
|
3476
2314
|
]),
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
"onUpdate:modelValue":
|
|
2315
|
+
s("div", Qt, [
|
|
2316
|
+
$[12] || ($[12] = s("label", null, "压缩格式", -1)),
|
|
2317
|
+
se(s("select", {
|
|
2318
|
+
"onUpdate:modelValue": $[2] || ($[2] = (f) => w.value = f)
|
|
3481
2319
|
}, [
|
|
3482
|
-
(
|
|
3483
|
-
key:
|
|
3484
|
-
value:
|
|
3485
|
-
},
|
|
2320
|
+
(a(), h(G, null, J(l, (f) => s("option", {
|
|
2321
|
+
key: f.value,
|
|
2322
|
+
value: f.value
|
|
2323
|
+
}, z(f.label), 9, Zt)), 64))
|
|
3486
2324
|
], 512), [
|
|
3487
|
-
[
|
|
2325
|
+
[ye, w.value]
|
|
3488
2326
|
])
|
|
3489
2327
|
]),
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
(
|
|
3494
|
-
key:
|
|
2328
|
+
s("div", es, [
|
|
2329
|
+
$[13] || ($[13] = s("label", null, "压缩级别", -1)),
|
|
2330
|
+
s("div", ts, [
|
|
2331
|
+
(a(), h(G, null, J(i, (f) => s("label", {
|
|
2332
|
+
key: f.value,
|
|
3495
2333
|
class: "compress-dialog-level"
|
|
3496
2334
|
}, [
|
|
3497
|
-
|
|
2335
|
+
se(s("input", {
|
|
3498
2336
|
type: "radio",
|
|
3499
2337
|
name: "level",
|
|
3500
|
-
value:
|
|
3501
|
-
"onUpdate:modelValue":
|
|
3502
|
-
}, null, 8,
|
|
3503
|
-
[
|
|
2338
|
+
value: f.value,
|
|
2339
|
+
"onUpdate:modelValue": $[3] || ($[3] = (A) => I.value = A)
|
|
2340
|
+
}, null, 8, ss), [
|
|
2341
|
+
[ke, I.value]
|
|
3504
2342
|
]),
|
|
3505
|
-
|
|
3506
|
-
|
|
2343
|
+
s("span", ns, z(f.label), 1),
|
|
2344
|
+
s("span", is, z(f.desc), 1)
|
|
3507
2345
|
])), 64))
|
|
3508
2346
|
])
|
|
3509
2347
|
]),
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
type:
|
|
3515
|
-
"onUpdate:modelValue":
|
|
2348
|
+
M.value ? (a(), h("div", os, [
|
|
2349
|
+
$[14] || ($[14] = s("label", null, "密码保护(可选)", -1)),
|
|
2350
|
+
s("div", ls, [
|
|
2351
|
+
se(s("input", {
|
|
2352
|
+
type: u.value ? "text" : "password",
|
|
2353
|
+
"onUpdate:modelValue": $[4] || ($[4] = (f) => b.value = f),
|
|
3516
2354
|
placeholder: "设置密码"
|
|
3517
|
-
}, null, 8,
|
|
3518
|
-
[
|
|
2355
|
+
}, null, 8, as), [
|
|
2356
|
+
[xe, b.value]
|
|
3519
2357
|
]),
|
|
3520
|
-
|
|
2358
|
+
s("button", {
|
|
3521
2359
|
type: "button",
|
|
3522
2360
|
class: "compress-dialog-toggle-password",
|
|
3523
|
-
onClick:
|
|
3524
|
-
},
|
|
2361
|
+
onClick: $[5] || ($[5] = (f) => u.value = !u.value)
|
|
2362
|
+
}, z(u.value ? "隐藏" : "显示"), 1)
|
|
3525
2363
|
])
|
|
3526
|
-
])) :
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
2364
|
+
])) : j("", !0),
|
|
2365
|
+
s("div", rs, [
|
|
2366
|
+
s("label", null, [
|
|
2367
|
+
se(s("input", {
|
|
3530
2368
|
type: "checkbox",
|
|
3531
|
-
"onUpdate:modelValue":
|
|
2369
|
+
"onUpdate:modelValue": $[6] || ($[6] = (f) => v.value = f)
|
|
3532
2370
|
}, null, 512), [
|
|
3533
|
-
[
|
|
2371
|
+
[$e, v.value]
|
|
3534
2372
|
]),
|
|
3535
|
-
|
|
2373
|
+
$[15] || ($[15] = s("span", null, "压缩后删除源文件", -1))
|
|
3536
2374
|
])
|
|
3537
2375
|
]),
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
2376
|
+
s("div", cs, [
|
|
2377
|
+
$[16] || ($[16] = s("span", { class: "compress-dialog-preview-label" }, "输出位置:", -1)),
|
|
2378
|
+
s("span", ds, z(y.value), 1)
|
|
3541
2379
|
])
|
|
3542
2380
|
]),
|
|
3543
|
-
|
|
3544
|
-
|
|
2381
|
+
s("div", us, [
|
|
2382
|
+
s("button", {
|
|
3545
2383
|
class: "compress-dialog-btn compress-dialog-btn-cancel",
|
|
3546
|
-
onClick:
|
|
2384
|
+
onClick: $[7] || ($[7] = (f) => r("cancel"))
|
|
3547
2385
|
}, " 取消 "),
|
|
3548
|
-
|
|
2386
|
+
s("button", {
|
|
3549
2387
|
class: "compress-dialog-btn compress-dialog-btn-confirm",
|
|
3550
2388
|
onClick: S,
|
|
3551
|
-
disabled: !
|
|
3552
|
-
}, " 压缩 ", 8,
|
|
2389
|
+
disabled: !m.value.trim()
|
|
2390
|
+
}, " 压缩 ", 8, ms)
|
|
3553
2391
|
])
|
|
3554
2392
|
])
|
|
3555
|
-
])) :
|
|
2393
|
+
])) : j("", !0)
|
|
3556
2394
|
]));
|
|
3557
2395
|
}
|
|
3558
|
-
}),
|
|
2396
|
+
}), an = /* @__PURE__ */ K(gs, [["__scopeId", "data-v-66281e07"]]), ps = {
|
|
3559
2397
|
key: 0,
|
|
3560
2398
|
class: "progress-dialog-overlay"
|
|
3561
|
-
},
|
|
2399
|
+
}, fs = { class: "progress-dialog" }, vs = { class: "progress-dialog-header" }, hs = { class: "progress-dialog-title" }, bs = { class: "progress-dialog-content" }, ws = { class: "progress-dialog-status" }, ys = {
|
|
3562
2400
|
key: 0,
|
|
3563
2401
|
class: "progress-dialog-bar-container"
|
|
3564
|
-
},
|
|
2402
|
+
}, ks = { class: "progress-dialog-bar" }, xs = { class: "progress-dialog-percent" }, $s = {
|
|
3565
2403
|
key: 1,
|
|
3566
2404
|
class: "progress-dialog-current-file"
|
|
3567
|
-
},
|
|
2405
|
+
}, Cs = {
|
|
3568
2406
|
key: 2,
|
|
3569
2407
|
class: "progress-dialog-count"
|
|
3570
|
-
},
|
|
2408
|
+
}, Is = {
|
|
3571
2409
|
key: 3,
|
|
3572
2410
|
class: "progress-dialog-error"
|
|
3573
|
-
},
|
|
2411
|
+
}, Es = {
|
|
3574
2412
|
key: 4,
|
|
3575
2413
|
class: "progress-dialog-output"
|
|
3576
|
-
},
|
|
2414
|
+
}, Ms = { class: "progress-dialog-output-path" }, js = { class: "progress-dialog-footer" }, Ds = /* @__PURE__ */ q({
|
|
3577
2415
|
__name: "ProgressDialog",
|
|
3578
2416
|
props: {
|
|
3579
2417
|
visible: { type: Boolean },
|
|
3580
2418
|
progress: {}
|
|
3581
2419
|
},
|
|
3582
2420
|
emits: ["cancel", "close", "openFolder"],
|
|
3583
|
-
setup(e, { emit:
|
|
3584
|
-
const t = e,
|
|
2421
|
+
setup(e, { emit: g }) {
|
|
2422
|
+
const t = e, r = g, l = F(() => t.progress.type === "compress" ? "压缩文件" : "解压文件"), i = F(() => t.progress.status === "success" || t.progress.status === "error"), w = F(() => {
|
|
3585
2423
|
switch (t.progress.status) {
|
|
3586
2424
|
case "processing":
|
|
3587
|
-
return
|
|
2425
|
+
return "lucide:loader-2";
|
|
3588
2426
|
case "success":
|
|
3589
|
-
return
|
|
2427
|
+
return "lucide:check-circle";
|
|
3590
2428
|
case "error":
|
|
3591
|
-
return
|
|
2429
|
+
return "lucide:x-circle";
|
|
3592
2430
|
default:
|
|
3593
|
-
return
|
|
2431
|
+
return "lucide:archive";
|
|
3594
2432
|
}
|
|
3595
|
-
}),
|
|
2433
|
+
}), I = F(() => {
|
|
3596
2434
|
switch (t.progress.status) {
|
|
3597
2435
|
case "processing":
|
|
3598
2436
|
return "progress-dialog-icon-spin";
|
|
@@ -3603,7 +2441,7 @@ const Bs = { class: "window-controls" }, Vs = { class: "window-title-info" }, _s
|
|
|
3603
2441
|
default:
|
|
3604
2442
|
return "";
|
|
3605
2443
|
}
|
|
3606
|
-
}),
|
|
2444
|
+
}), m = F(() => {
|
|
3607
2445
|
switch (t.progress.status) {
|
|
3608
2446
|
case "pending":
|
|
3609
2447
|
return "准备中...";
|
|
@@ -3616,436 +2454,470 @@ const Bs = { class: "window-controls" }, Vs = { class: "window-title-info" }, _s
|
|
|
3616
2454
|
default:
|
|
3617
2455
|
return "";
|
|
3618
2456
|
}
|
|
3619
|
-
}),
|
|
3620
|
-
|
|
2457
|
+
}), v = () => {
|
|
2458
|
+
i.value ? r("close") : r("cancel");
|
|
3621
2459
|
};
|
|
3622
|
-
return (
|
|
3623
|
-
e.visible ? (
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
(
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
2460
|
+
return (b, u) => (a(), H(ie, { to: "body" }, [
|
|
2461
|
+
e.visible ? (a(), h("div", ps, [
|
|
2462
|
+
s("div", fs, [
|
|
2463
|
+
s("div", vs, [
|
|
2464
|
+
s("div", hs, [
|
|
2465
|
+
N(O(T), {
|
|
2466
|
+
icon: w.value,
|
|
2467
|
+
width: "24",
|
|
2468
|
+
height: "24",
|
|
2469
|
+
class: B(I.value)
|
|
2470
|
+
}, null, 8, ["icon", "class"]),
|
|
2471
|
+
s("span", null, z(l.value), 1)
|
|
3632
2472
|
]),
|
|
3633
|
-
|
|
2473
|
+
i.value ? (a(), h("button", {
|
|
3634
2474
|
key: 0,
|
|
3635
2475
|
class: "progress-dialog-close",
|
|
3636
|
-
onClick:
|
|
2476
|
+
onClick: v
|
|
3637
2477
|
}, [
|
|
3638
|
-
N(
|
|
3639
|
-
|
|
2478
|
+
N(O(T), {
|
|
2479
|
+
icon: "lucide:x",
|
|
2480
|
+
width: "18",
|
|
2481
|
+
height: "18"
|
|
2482
|
+
})
|
|
2483
|
+
])) : j("", !0)
|
|
3640
2484
|
]),
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
e.progress.status === "processing" ? (
|
|
3644
|
-
|
|
3645
|
-
|
|
2485
|
+
s("div", bs, [
|
|
2486
|
+
s("div", ws, z(m.value), 1),
|
|
2487
|
+
e.progress.status === "processing" ? (a(), h("div", ys, [
|
|
2488
|
+
s("div", ks, [
|
|
2489
|
+
s("div", {
|
|
3646
2490
|
class: "progress-dialog-bar-fill",
|
|
3647
|
-
style:
|
|
2491
|
+
style: de({ width: `${e.progress.percent}%` })
|
|
3648
2492
|
}, null, 4)
|
|
3649
2493
|
]),
|
|
3650
|
-
|
|
3651
|
-
])) :
|
|
3652
|
-
e.progress.currentFile && e.progress.status === "processing" ? (
|
|
3653
|
-
e.progress.totalCount && e.progress.totalCount > 0 && e.progress.status === "processing" ? (
|
|
3654
|
-
e.progress.error ? (
|
|
3655
|
-
e.progress.status === "success" && e.progress.outputPath ? (
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
])) :
|
|
2494
|
+
s("span", xs, z(e.progress.percent) + "%", 1)
|
|
2495
|
+
])) : j("", !0),
|
|
2496
|
+
e.progress.currentFile && e.progress.status === "processing" ? (a(), h("div", $s, z(e.progress.currentFile), 1)) : j("", !0),
|
|
2497
|
+
e.progress.totalCount && e.progress.totalCount > 0 && e.progress.status === "processing" ? (a(), h("div", Cs, z(e.progress.processedCount || 0) + " / " + z(e.progress.totalCount) + " 个文件 ", 1)) : j("", !0),
|
|
2498
|
+
e.progress.error ? (a(), h("div", Is, z(e.progress.error), 1)) : j("", !0),
|
|
2499
|
+
e.progress.status === "success" && e.progress.outputPath ? (a(), h("div", Es, [
|
|
2500
|
+
u[2] || (u[2] = s("span", { class: "progress-dialog-output-label" }, "输出位置:", -1)),
|
|
2501
|
+
s("span", Ms, z(e.progress.outputPath), 1)
|
|
2502
|
+
])) : j("", !0)
|
|
3659
2503
|
]),
|
|
3660
|
-
|
|
3661
|
-
e.progress.status === "processing" ? (
|
|
2504
|
+
s("div", js, [
|
|
2505
|
+
e.progress.status === "processing" ? (a(), h("button", {
|
|
3662
2506
|
key: 0,
|
|
3663
2507
|
class: "progress-dialog-btn progress-dialog-btn-cancel",
|
|
3664
|
-
onClick:
|
|
3665
|
-
}, " 取消 ")) :
|
|
3666
|
-
e.progress.status === "success" && e.progress.outputPath ? (
|
|
2508
|
+
onClick: u[0] || (u[0] = (n) => r("cancel"))
|
|
2509
|
+
}, " 取消 ")) : j("", !0),
|
|
2510
|
+
e.progress.status === "success" && e.progress.outputPath ? (a(), h("button", {
|
|
3667
2511
|
key: 1,
|
|
3668
2512
|
class: "progress-dialog-btn progress-dialog-btn-folder",
|
|
3669
|
-
onClick:
|
|
2513
|
+
onClick: u[1] || (u[1] = (n) => r("openFolder", e.progress.outputPath))
|
|
3670
2514
|
}, [
|
|
3671
|
-
N(
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
2515
|
+
N(O(T), {
|
|
2516
|
+
icon: "lucide:folder-open",
|
|
2517
|
+
width: "16",
|
|
2518
|
+
height: "16"
|
|
2519
|
+
}),
|
|
2520
|
+
u[3] || (u[3] = te(" 打开文件夹 ", -1))
|
|
2521
|
+
])) : j("", !0),
|
|
2522
|
+
i.value ? (a(), h("button", {
|
|
3675
2523
|
key: 2,
|
|
3676
2524
|
class: "progress-dialog-btn progress-dialog-btn-close",
|
|
3677
|
-
onClick:
|
|
3678
|
-
}, " 关闭 ")) :
|
|
2525
|
+
onClick: v
|
|
2526
|
+
}, " 关闭 ")) : j("", !0)
|
|
3679
2527
|
])
|
|
3680
2528
|
])
|
|
3681
|
-
])) :
|
|
2529
|
+
])) : j("", !0)
|
|
3682
2530
|
]));
|
|
3683
2531
|
}
|
|
3684
|
-
}),
|
|
2532
|
+
}), rn = /* @__PURE__ */ K(Ds, [["__scopeId", "data-v-bf8c14f8"]]), zs = { class: "file-info-dialog" }, Ss = { class: "file-info-dialog-header" }, Os = { class: "file-info-dialog-title" }, Ls = ["title"], Ts = { class: "file-info-dialog-content" }, As = { class: "file-info-row" }, Ns = { class: "file-info-label" }, Ps = { class: "file-info-value" }, Us = {
|
|
3685
2533
|
key: 0,
|
|
3686
2534
|
class: "file-info-row"
|
|
3687
|
-
},
|
|
2535
|
+
}, Fs = { class: "file-info-label" }, Ws = { class: "file-info-value" }, Rs = { class: "file-info-row" }, Bs = { class: "file-info-label" }, Hs = ["title"], Vs = { class: "file-info-row" }, _s = { class: "file-info-label" }, Gs = ["title"], qs = {
|
|
3688
2536
|
key: 1,
|
|
3689
2537
|
class: "file-info-row"
|
|
3690
|
-
},
|
|
2538
|
+
}, Ks = { class: "file-info-label" }, Xs = { class: "file-info-value" }, Ys = { class: "file-info-dialog-footer" }, Js = /* @__PURE__ */ q({
|
|
3691
2539
|
__name: "FileInfoDialog",
|
|
3692
2540
|
props: {
|
|
3693
2541
|
visible: { type: Boolean },
|
|
3694
2542
|
item: {}
|
|
3695
2543
|
},
|
|
3696
2544
|
emits: ["close"],
|
|
3697
|
-
setup(e, { emit:
|
|
3698
|
-
const t = e,
|
|
3699
|
-
function
|
|
3700
|
-
if (
|
|
2545
|
+
setup(e, { emit: g }) {
|
|
2546
|
+
const t = e, r = g;
|
|
2547
|
+
function l(u, n) {
|
|
2548
|
+
if (u === d.FOLDER)
|
|
3701
2549
|
return "flat-color-icons:folder";
|
|
3702
|
-
if (
|
|
3703
|
-
return
|
|
3704
|
-
switch (
|
|
3705
|
-
case
|
|
2550
|
+
if (n)
|
|
2551
|
+
return he(n, u);
|
|
2552
|
+
switch (u) {
|
|
2553
|
+
case d.IMAGE:
|
|
3706
2554
|
return "material-icon-theme:image";
|
|
3707
|
-
case
|
|
2555
|
+
case d.VIDEO:
|
|
3708
2556
|
return "material-icon-theme:video";
|
|
3709
|
-
case
|
|
2557
|
+
case d.MUSIC:
|
|
3710
2558
|
return "material-icon-theme:audio";
|
|
3711
|
-
case
|
|
2559
|
+
case d.DOCUMENT:
|
|
3712
2560
|
return "material-icon-theme:word";
|
|
3713
|
-
case
|
|
2561
|
+
case d.CODE:
|
|
3714
2562
|
return "material-icon-theme:javascript";
|
|
3715
|
-
case
|
|
2563
|
+
case d.ARCHIVE:
|
|
3716
2564
|
return "material-icon-theme:zip";
|
|
3717
2565
|
default:
|
|
3718
2566
|
return "material-icon-theme:document";
|
|
3719
2567
|
}
|
|
3720
2568
|
}
|
|
3721
|
-
function
|
|
3722
|
-
switch (
|
|
3723
|
-
case
|
|
2569
|
+
function i(u) {
|
|
2570
|
+
switch (u) {
|
|
2571
|
+
case d.FOLDER:
|
|
3724
2572
|
return "file-info-icon--folder";
|
|
3725
|
-
case
|
|
2573
|
+
case d.IMAGE:
|
|
3726
2574
|
return "file-info-icon--image";
|
|
3727
|
-
case
|
|
2575
|
+
case d.VIDEO:
|
|
3728
2576
|
return "file-info-icon--video";
|
|
3729
|
-
case
|
|
2577
|
+
case d.MUSIC:
|
|
3730
2578
|
return "file-info-icon--music";
|
|
3731
|
-
case
|
|
2579
|
+
case d.DOCUMENT:
|
|
3732
2580
|
return "file-info-icon--document";
|
|
3733
|
-
case
|
|
2581
|
+
case d.CODE:
|
|
3734
2582
|
return "file-info-icon--code";
|
|
3735
|
-
case
|
|
2583
|
+
case d.ARCHIVE:
|
|
3736
2584
|
return "file-info-icon--archive";
|
|
3737
2585
|
default:
|
|
3738
2586
|
return "file-info-icon--file";
|
|
3739
2587
|
}
|
|
3740
2588
|
}
|
|
3741
|
-
function
|
|
3742
|
-
switch (
|
|
3743
|
-
case
|
|
2589
|
+
function w(u, n) {
|
|
2590
|
+
switch (u) {
|
|
2591
|
+
case d.FOLDER:
|
|
3744
2592
|
return "文件夹";
|
|
3745
|
-
case
|
|
3746
|
-
return `图片${
|
|
3747
|
-
case
|
|
3748
|
-
return `视频${
|
|
3749
|
-
case
|
|
3750
|
-
return `音频${
|
|
3751
|
-
case
|
|
3752
|
-
return `文档${
|
|
3753
|
-
case
|
|
3754
|
-
return `代码文件${
|
|
3755
|
-
case
|
|
3756
|
-
return `压缩包${
|
|
2593
|
+
case d.IMAGE:
|
|
2594
|
+
return `图片${n ? ` (${n.toUpperCase()})` : ""}`;
|
|
2595
|
+
case d.VIDEO:
|
|
2596
|
+
return `视频${n ? ` (${n.toUpperCase()})` : ""}`;
|
|
2597
|
+
case d.MUSIC:
|
|
2598
|
+
return `音频${n ? ` (${n.toUpperCase()})` : ""}`;
|
|
2599
|
+
case d.DOCUMENT:
|
|
2600
|
+
return `文档${n ? ` (${n.toUpperCase()})` : ""}`;
|
|
2601
|
+
case d.CODE:
|
|
2602
|
+
return `代码文件${n ? ` (${n.toUpperCase()})` : ""}`;
|
|
2603
|
+
case d.ARCHIVE:
|
|
2604
|
+
return `压缩包${n ? ` (${n.toUpperCase()})` : ""}`;
|
|
3757
2605
|
default:
|
|
3758
|
-
return
|
|
2606
|
+
return n ? `${n.toUpperCase()} 文件` : "文件";
|
|
3759
2607
|
}
|
|
3760
2608
|
}
|
|
3761
|
-
const
|
|
2609
|
+
const I = F(() => {
|
|
3762
2610
|
if (!t.item) return;
|
|
3763
|
-
const
|
|
3764
|
-
if (!(
|
|
3765
|
-
return t.item.name.substring(
|
|
3766
|
-
}),
|
|
2611
|
+
const u = t.item.name.lastIndexOf(".");
|
|
2612
|
+
if (!(u === -1 || u === 0))
|
|
2613
|
+
return t.item.name.substring(u + 1).toLowerCase();
|
|
2614
|
+
}), m = F(() => {
|
|
3767
2615
|
if (!t.item) return "";
|
|
3768
|
-
const
|
|
3769
|
-
return
|
|
2616
|
+
const u = t.item.id.lastIndexOf("/");
|
|
2617
|
+
return u === -1 ? t.item.id : t.item.id.substring(0, u) || "/";
|
|
3770
2618
|
});
|
|
3771
|
-
function
|
|
3772
|
-
|
|
2619
|
+
function v(u) {
|
|
2620
|
+
u.target === u.currentTarget && r("close");
|
|
3773
2621
|
}
|
|
3774
|
-
function
|
|
3775
|
-
|
|
2622
|
+
function b(u) {
|
|
2623
|
+
u.key === "Escape" && t.visible && r("close");
|
|
3776
2624
|
}
|
|
3777
|
-
return
|
|
3778
|
-
document.addEventListener("keydown",
|
|
3779
|
-
}),
|
|
3780
|
-
document.removeEventListener("keydown",
|
|
3781
|
-
}), (
|
|
3782
|
-
e.visible && e.item ? (
|
|
2625
|
+
return ve(() => {
|
|
2626
|
+
document.addEventListener("keydown", b);
|
|
2627
|
+
}), ne(() => {
|
|
2628
|
+
document.removeEventListener("keydown", b);
|
|
2629
|
+
}), (u, n) => (a(), H(ie, { to: "body" }, [
|
|
2630
|
+
e.visible && e.item ? (a(), h("div", {
|
|
3783
2631
|
key: 0,
|
|
3784
2632
|
class: "file-info-dialog-overlay",
|
|
3785
|
-
onClick:
|
|
2633
|
+
onClick: v
|
|
3786
2634
|
}, [
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
N(
|
|
3791
|
-
icon:
|
|
2635
|
+
s("div", zs, [
|
|
2636
|
+
s("div", Ss, [
|
|
2637
|
+
s("div", Os, [
|
|
2638
|
+
N(O(T), {
|
|
2639
|
+
icon: l(e.item.type, e.item.name),
|
|
3792
2640
|
width: "48",
|
|
3793
2641
|
height: "48",
|
|
3794
|
-
class: B(["file-info-icon",
|
|
2642
|
+
class: B(["file-info-icon", i(e.item.type)])
|
|
3795
2643
|
}, null, 8, ["icon", "class"]),
|
|
3796
|
-
|
|
2644
|
+
s("span", {
|
|
3797
2645
|
class: "file-info-dialog-name",
|
|
3798
2646
|
title: e.item.name
|
|
3799
|
-
},
|
|
2647
|
+
}, z(e.item.name), 9, Ls)
|
|
3800
2648
|
]),
|
|
3801
|
-
|
|
2649
|
+
s("button", {
|
|
3802
2650
|
class: "file-info-dialog-close",
|
|
3803
|
-
onClick:
|
|
2651
|
+
onClick: n[0] || (n[0] = (C) => r("close"))
|
|
3804
2652
|
}, [
|
|
3805
|
-
N(
|
|
2653
|
+
N(O(T), {
|
|
2654
|
+
icon: "lucide:x",
|
|
2655
|
+
width: "18",
|
|
2656
|
+
height: "18"
|
|
2657
|
+
})
|
|
3806
2658
|
])
|
|
3807
2659
|
]),
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
N(
|
|
3812
|
-
|
|
2660
|
+
s("div", Ts, [
|
|
2661
|
+
s("div", As, [
|
|
2662
|
+
s("div", Ns, [
|
|
2663
|
+
N(O(T), {
|
|
2664
|
+
icon: "lucide:file",
|
|
2665
|
+
width: "14",
|
|
2666
|
+
height: "14"
|
|
2667
|
+
}),
|
|
2668
|
+
n[2] || (n[2] = s("span", null, "类型", -1))
|
|
3813
2669
|
]),
|
|
3814
|
-
|
|
2670
|
+
s("div", Ps, z(w(e.item.type, I.value)), 1)
|
|
3815
2671
|
]),
|
|
3816
|
-
e.item.type !==
|
|
3817
|
-
|
|
3818
|
-
N(
|
|
3819
|
-
|
|
2672
|
+
e.item.type !== O(d).FOLDER && e.item.size ? (a(), h("div", Us, [
|
|
2673
|
+
s("div", Fs, [
|
|
2674
|
+
N(O(T), {
|
|
2675
|
+
icon: "lucide:hard-drive",
|
|
2676
|
+
width: "14",
|
|
2677
|
+
height: "14"
|
|
2678
|
+
}),
|
|
2679
|
+
n[3] || (n[3] = s("span", null, "大小", -1))
|
|
3820
2680
|
]),
|
|
3821
|
-
|
|
3822
|
-
])) :
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
N(
|
|
3826
|
-
|
|
2681
|
+
s("div", Ws, z(e.item.size), 1)
|
|
2682
|
+
])) : j("", !0),
|
|
2683
|
+
s("div", Rs, [
|
|
2684
|
+
s("div", Bs, [
|
|
2685
|
+
N(O(T), {
|
|
2686
|
+
icon: "lucide:map-pin",
|
|
2687
|
+
width: "14",
|
|
2688
|
+
height: "14"
|
|
2689
|
+
}),
|
|
2690
|
+
n[4] || (n[4] = s("span", null, "位置", -1))
|
|
3827
2691
|
]),
|
|
3828
|
-
|
|
2692
|
+
s("div", {
|
|
3829
2693
|
class: "file-info-value file-info-value--path",
|
|
3830
|
-
title:
|
|
3831
|
-
},
|
|
2694
|
+
title: m.value
|
|
2695
|
+
}, z(m.value), 9, Hs)
|
|
3832
2696
|
]),
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
N(
|
|
3836
|
-
|
|
2697
|
+
s("div", Vs, [
|
|
2698
|
+
s("div", _s, [
|
|
2699
|
+
N(O(T), {
|
|
2700
|
+
icon: "lucide:map-pin",
|
|
2701
|
+
width: "14",
|
|
2702
|
+
height: "14"
|
|
2703
|
+
}),
|
|
2704
|
+
n[5] || (n[5] = s("span", null, "完整路径", -1))
|
|
3837
2705
|
]),
|
|
3838
|
-
|
|
2706
|
+
s("div", {
|
|
3839
2707
|
class: "file-info-value file-info-value--path",
|
|
3840
2708
|
title: e.item.id
|
|
3841
|
-
},
|
|
2709
|
+
}, z(e.item.id), 9, Gs)
|
|
3842
2710
|
]),
|
|
3843
|
-
e.item.dateModified ? (
|
|
3844
|
-
|
|
3845
|
-
N(
|
|
3846
|
-
|
|
2711
|
+
e.item.dateModified ? (a(), h("div", qs, [
|
|
2712
|
+
s("div", Ks, [
|
|
2713
|
+
N(O(T), {
|
|
2714
|
+
icon: "lucide:clock",
|
|
2715
|
+
width: "14",
|
|
2716
|
+
height: "14"
|
|
2717
|
+
}),
|
|
2718
|
+
n[6] || (n[6] = s("span", null, "修改时间", -1))
|
|
3847
2719
|
]),
|
|
3848
|
-
|
|
3849
|
-
])) :
|
|
2720
|
+
s("div", Xs, z(e.item.dateModified), 1)
|
|
2721
|
+
])) : j("", !0)
|
|
3850
2722
|
]),
|
|
3851
|
-
|
|
3852
|
-
|
|
2723
|
+
s("div", Ys, [
|
|
2724
|
+
s("button", {
|
|
3853
2725
|
class: "file-info-dialog-btn",
|
|
3854
|
-
onClick:
|
|
2726
|
+
onClick: n[1] || (n[1] = (C) => r("close"))
|
|
3855
2727
|
}, " 关闭 ")
|
|
3856
2728
|
])
|
|
3857
2729
|
])
|
|
3858
|
-
])) :
|
|
2730
|
+
])) : j("", !0)
|
|
3859
2731
|
]));
|
|
3860
2732
|
}
|
|
3861
|
-
}),
|
|
3862
|
-
function
|
|
3863
|
-
const e =
|
|
3864
|
-
e.value = /* @__PURE__ */ new Set(),
|
|
2733
|
+
}), cn = /* @__PURE__ */ K(Js, [["__scopeId", "data-v-9a2f9949"]]);
|
|
2734
|
+
function dn() {
|
|
2735
|
+
const e = D(/* @__PURE__ */ new Set()), g = D(null), t = D(null), r = () => {
|
|
2736
|
+
e.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
3865
2737
|
};
|
|
3866
2738
|
return {
|
|
3867
2739
|
selectedIds: e,
|
|
3868
|
-
lastSelectedId:
|
|
2740
|
+
lastSelectedId: g,
|
|
3869
2741
|
editingId: t,
|
|
3870
|
-
clearSelection:
|
|
3871
|
-
selectItem: (
|
|
3872
|
-
if (!
|
|
3873
|
-
|
|
2742
|
+
clearSelection: r,
|
|
2743
|
+
selectItem: (m, v, b = !1, u = !1) => {
|
|
2744
|
+
if (!m) {
|
|
2745
|
+
r();
|
|
3874
2746
|
return;
|
|
3875
2747
|
}
|
|
3876
|
-
if (
|
|
3877
|
-
const
|
|
3878
|
-
if (
|
|
3879
|
-
const
|
|
3880
|
-
for (let S =
|
|
3881
|
-
const
|
|
3882
|
-
|
|
2748
|
+
if (u && g.value) {
|
|
2749
|
+
const n = v.findIndex((c) => c.id === g.value), C = v.findIndex((c) => c.id === m);
|
|
2750
|
+
if (n !== -1 && C !== -1) {
|
|
2751
|
+
const c = Math.min(n, C), y = Math.max(n, C), M = new Set(b ? e.value : []);
|
|
2752
|
+
for (let S = c; S <= y; S++) {
|
|
2753
|
+
const L = v[S];
|
|
2754
|
+
L && M.add(L.id);
|
|
3883
2755
|
}
|
|
3884
|
-
e.value =
|
|
2756
|
+
e.value = M;
|
|
3885
2757
|
return;
|
|
3886
2758
|
}
|
|
3887
2759
|
}
|
|
3888
|
-
if (
|
|
3889
|
-
const
|
|
3890
|
-
|
|
2760
|
+
if (b) {
|
|
2761
|
+
const n = new Set(e.value);
|
|
2762
|
+
n.has(m) ? n.delete(m) : n.add(m), g.value = m, e.value = n;
|
|
3891
2763
|
return;
|
|
3892
2764
|
}
|
|
3893
|
-
|
|
2765
|
+
g.value = m, e.value = /* @__PURE__ */ new Set([m]);
|
|
3894
2766
|
},
|
|
3895
|
-
selectAll: (
|
|
3896
|
-
e.value = new Set(
|
|
2767
|
+
selectAll: (m) => {
|
|
2768
|
+
e.value = new Set(m.map((v) => v.id));
|
|
3897
2769
|
},
|
|
3898
|
-
setEditing: (
|
|
3899
|
-
t.value =
|
|
2770
|
+
setEditing: (m) => {
|
|
2771
|
+
t.value = m;
|
|
3900
2772
|
},
|
|
3901
|
-
isSelected: (
|
|
2773
|
+
isSelected: (m) => e.value.has(m)
|
|
3902
2774
|
};
|
|
3903
2775
|
}
|
|
3904
|
-
function
|
|
3905
|
-
const
|
|
2776
|
+
function un(e, g, t) {
|
|
2777
|
+
const r = D(null), l = D(!1);
|
|
3906
2778
|
return {
|
|
3907
|
-
dragOverId:
|
|
3908
|
-
isDragging:
|
|
3909
|
-
handleDragStart: (
|
|
3910
|
-
if (!
|
|
3911
|
-
const
|
|
3912
|
-
|
|
3913
|
-
const
|
|
3914
|
-
|
|
2779
|
+
dragOverId: r,
|
|
2780
|
+
isDragging: l,
|
|
2781
|
+
handleDragStart: (b, u) => {
|
|
2782
|
+
if (!b.dataTransfer) return;
|
|
2783
|
+
const n = e();
|
|
2784
|
+
n.has(u) || g(u, !1, !1);
|
|
2785
|
+
const C = n.has(u) ? n : /* @__PURE__ */ new Set([u]);
|
|
2786
|
+
b.dataTransfer.setData("text/plain", JSON.stringify([...C])), b.dataTransfer.effectAllowed = "move", l.value = !0;
|
|
3915
2787
|
},
|
|
3916
|
-
handleDragOver: (
|
|
3917
|
-
|
|
2788
|
+
handleDragOver: (b, u) => {
|
|
2789
|
+
l.value && u.type === d.FOLDER && (e().has(u.id) || (b.preventDefault(), r.value = u.id));
|
|
3918
2790
|
},
|
|
3919
2791
|
handleDragLeave: () => {
|
|
3920
|
-
|
|
2792
|
+
r.value = null;
|
|
3921
2793
|
},
|
|
3922
|
-
handleDrop: (
|
|
3923
|
-
if (
|
|
3924
|
-
const
|
|
3925
|
-
if (
|
|
2794
|
+
handleDrop: (b, u) => {
|
|
2795
|
+
if (r.value = null, l.value = !1, !b.dataTransfer || u.type !== d.FOLDER) return;
|
|
2796
|
+
const n = b.dataTransfer.getData("text/plain");
|
|
2797
|
+
if (n)
|
|
3926
2798
|
try {
|
|
3927
|
-
const
|
|
3928
|
-
if (
|
|
3929
|
-
t(
|
|
2799
|
+
const C = JSON.parse(n), c = new Set(C);
|
|
2800
|
+
if (c.has(u.id)) return;
|
|
2801
|
+
t(u.id, c);
|
|
3930
2802
|
} catch {
|
|
3931
2803
|
}
|
|
3932
2804
|
},
|
|
3933
2805
|
handleDragEnd: () => {
|
|
3934
|
-
|
|
2806
|
+
r.value = null, l.value = !1;
|
|
3935
2807
|
}
|
|
3936
2808
|
};
|
|
3937
2809
|
}
|
|
3938
|
-
function
|
|
3939
|
-
const t =
|
|
3940
|
-
const
|
|
3941
|
-
if (
|
|
3942
|
-
const
|
|
3943
|
-
|
|
2810
|
+
function mn(e, g) {
|
|
2811
|
+
const t = D(!1), r = D(0), l = D(0), i = D(0), w = D(!1), I = D(1), m = D(1), v = D(!1), b = e === d.MUSIC, u = () => {
|
|
2812
|
+
const f = g();
|
|
2813
|
+
if (f) {
|
|
2814
|
+
const A = f.currentTime, U = f.duration;
|
|
2815
|
+
l.value = A, U && !isNaN(U) && (i.value = U, r.value = A / U * 100);
|
|
3944
2816
|
}
|
|
3945
2817
|
};
|
|
3946
2818
|
return {
|
|
3947
2819
|
isPlaying: t,
|
|
3948
|
-
progress:
|
|
3949
|
-
currentTime:
|
|
3950
|
-
duration:
|
|
3951
|
-
isMuted:
|
|
3952
|
-
volume:
|
|
3953
|
-
showControls:
|
|
3954
|
-
isAudio:
|
|
2820
|
+
progress: r,
|
|
2821
|
+
currentTime: l,
|
|
2822
|
+
duration: i,
|
|
2823
|
+
isMuted: w,
|
|
2824
|
+
volume: I,
|
|
2825
|
+
showControls: v,
|
|
2826
|
+
isAudio: b,
|
|
3955
2827
|
togglePlay: () => {
|
|
3956
|
-
const
|
|
3957
|
-
|
|
2828
|
+
const f = g();
|
|
2829
|
+
f && (t.value ? (f.pause(), t.value = !1) : (f.play(), t.value = !0));
|
|
3958
2830
|
},
|
|
3959
2831
|
toggleMute: () => {
|
|
3960
|
-
const
|
|
3961
|
-
if (
|
|
3962
|
-
if (
|
|
3963
|
-
const
|
|
3964
|
-
|
|
2832
|
+
const f = g();
|
|
2833
|
+
if (f)
|
|
2834
|
+
if (w.value) {
|
|
2835
|
+
const A = m.value || 1;
|
|
2836
|
+
f.volume = A, f.muted = !1, I.value = A, w.value = !1;
|
|
3965
2837
|
} else
|
|
3966
|
-
|
|
2838
|
+
m.value = I.value, f.volume = 0, f.muted = !0, I.value = 0, w.value = !0;
|
|
3967
2839
|
},
|
|
3968
|
-
handleVolumeChange: (
|
|
3969
|
-
|
|
3970
|
-
const
|
|
3971
|
-
|
|
2840
|
+
handleVolumeChange: (f) => {
|
|
2841
|
+
I.value = f;
|
|
2842
|
+
const A = g();
|
|
2843
|
+
A && (A.volume = f, f === 0 ? (w.value = !0, A.muted = !0) : (w.value = !1, A.muted = !1));
|
|
3972
2844
|
},
|
|
3973
|
-
seekTo: (
|
|
3974
|
-
const
|
|
3975
|
-
|
|
2845
|
+
seekTo: (f) => {
|
|
2846
|
+
const A = g();
|
|
2847
|
+
A && i.value && (A.currentTime = f, l.value = f, r.value = f / i.value * 100);
|
|
3976
2848
|
},
|
|
3977
|
-
formatTime: (
|
|
3978
|
-
if (isNaN(
|
|
3979
|
-
const
|
|
3980
|
-
return `${
|
|
2849
|
+
formatTime: (f) => {
|
|
2850
|
+
if (isNaN(f)) return "0:00";
|
|
2851
|
+
const A = Math.floor(f / 60), U = Math.floor(f % 60);
|
|
2852
|
+
return `${A}:${U.toString().padStart(2, "0")}`;
|
|
3981
2853
|
},
|
|
3982
2854
|
autoPlay: () => {
|
|
3983
|
-
|
|
3984
|
-
const
|
|
3985
|
-
(e ===
|
|
2855
|
+
fe(() => {
|
|
2856
|
+
const f = g();
|
|
2857
|
+
(e === d.VIDEO || b) && f && (f.volume = I.value, f.play().catch(() => {
|
|
3986
2858
|
}), t.value = !0);
|
|
3987
2859
|
});
|
|
3988
2860
|
},
|
|
3989
2861
|
setupMediaListeners: () => {
|
|
3990
|
-
const
|
|
3991
|
-
|
|
2862
|
+
const f = g();
|
|
2863
|
+
f && (f.addEventListener("timeupdate", u), f.addEventListener("loadedmetadata", u), f.addEventListener("ended", () => {
|
|
3992
2864
|
t.value = !1;
|
|
3993
2865
|
}));
|
|
3994
2866
|
},
|
|
3995
2867
|
cleanupMediaListeners: () => {
|
|
3996
|
-
const
|
|
3997
|
-
|
|
2868
|
+
const f = g();
|
|
2869
|
+
f && (f.removeEventListener("timeupdate", u), f.removeEventListener("loadedmetadata", u));
|
|
3998
2870
|
},
|
|
3999
|
-
updateProgress:
|
|
2871
|
+
updateProgress: u
|
|
4000
2872
|
};
|
|
4001
2873
|
}
|
|
4002
|
-
function
|
|
4003
|
-
const
|
|
4004
|
-
if (!(
|
|
4005
|
-
if (
|
|
4006
|
-
const
|
|
4007
|
-
|
|
2874
|
+
function gn(e) {
|
|
2875
|
+
const g = /* @__PURE__ */ new Map(), t = D(/* @__PURE__ */ new Map()), r = async (i) => {
|
|
2876
|
+
if (!(i.type !== d.APPLICATION || !i.id)) {
|
|
2877
|
+
if (g.has(i.id)) {
|
|
2878
|
+
const w = g.get(i.id);
|
|
2879
|
+
w && t.value.set(i.id, w);
|
|
4008
2880
|
return;
|
|
4009
2881
|
}
|
|
4010
|
-
if (!t.value.has(
|
|
2882
|
+
if (!t.value.has(i.id) && typeof window.fileExplorerAPI < "u" && window.fileExplorerAPI.getApplicationIcon)
|
|
4011
2883
|
try {
|
|
4012
|
-
const
|
|
4013
|
-
|
|
4014
|
-
} catch (
|
|
4015
|
-
console.error(`Failed to load application icon for ${
|
|
2884
|
+
const w = await window.fileExplorerAPI.getApplicationIcon(i.id);
|
|
2885
|
+
w && (g.set(i.id, w), t.value.set(i.id, w));
|
|
2886
|
+
} catch (w) {
|
|
2887
|
+
console.error(`Failed to load application icon for ${i.name}:`, w);
|
|
4016
2888
|
}
|
|
4017
2889
|
}
|
|
4018
2890
|
};
|
|
4019
|
-
return
|
|
4020
|
-
|
|
4021
|
-
|
|
2891
|
+
return ee(e, (i) => {
|
|
2892
|
+
i.forEach((w) => {
|
|
2893
|
+
w.type === d.APPLICATION && !t.value.has(w.id) && r(w);
|
|
4022
2894
|
});
|
|
4023
2895
|
}, { immediate: !0, deep: !0 }), {
|
|
4024
|
-
getAppIconUrl: (
|
|
4025
|
-
loadApplicationIcon:
|
|
2896
|
+
getAppIconUrl: (i) => t.value.get(i.id),
|
|
2897
|
+
loadApplicationIcon: r
|
|
4026
2898
|
};
|
|
4027
2899
|
}
|
|
4028
2900
|
export {
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
2901
|
+
dt as Breadcrumb,
|
|
2902
|
+
an as CompressDialog,
|
|
2903
|
+
on as ContextMenu,
|
|
2904
|
+
Re as FileGrid,
|
|
2905
|
+
be as FileIcon,
|
|
2906
|
+
cn as FileInfoDialog,
|
|
2907
|
+
Qe as FileList,
|
|
2908
|
+
en as FileListView,
|
|
2909
|
+
tn as FileSidebar,
|
|
2910
|
+
d as FileType,
|
|
2911
|
+
rn as ProgressDialog,
|
|
2912
|
+
ae as SortIndicator,
|
|
2913
|
+
nn as StatusBar,
|
|
2914
|
+
sn as Toolbar,
|
|
2915
|
+
ln as Window,
|
|
2916
|
+
gn as useApplicationIcon,
|
|
2917
|
+
un as useDragAndDrop,
|
|
2918
|
+
mn as useMediaPlayer,
|
|
2919
|
+
dn as useSelection,
|
|
2920
|
+
Pt as useWindowDrag,
|
|
2921
|
+
Ut as useWindowResize
|
|
4050
2922
|
};
|
|
4051
2923
|
//# sourceMappingURL=index.js.map
|