nicklabs-ui 1.0.110 → 1.0.112
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/index.mjs +403 -432
- package/dist/nicklabs-ui.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Transition as n, TransitionGroup as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createStaticVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, getCurrentScope as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onScopeDispose as x, onUnmounted as S, openBlock as C, reactive as w, ref as T, renderList as E, renderSlot as D, shallowReadonly as O, shallowRef as k, toDisplayString as A, toValue as j, triggerRef as M, unref as N, useCssVars as P, useSlots as F, vModelText as I, watch as L, withCtx as R, withDirectives as
|
|
1
|
+
import { Fragment as e, Teleport as t, Transition as n, TransitionGroup as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createStaticVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, getCurrentScope as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onScopeDispose as x, onUnmounted as S, openBlock as C, reactive as w, ref as T, renderList as E, renderSlot as D, shallowReadonly as O, shallowRef as k, toDisplayString as A, toValue as j, triggerRef as M, unref as N, useCssVars as P, useSlots as F, vModelText as I, watch as L, withCtx as R, withDirectives as ee, withModifiers as z } from "vue";
|
|
2
2
|
//#region src/composables/sharedRouter.ts
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
|
|
3
|
+
var te = null;
|
|
4
|
+
function ne(e) {
|
|
5
|
+
te = e;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return
|
|
7
|
+
function B() {
|
|
8
|
+
return te;
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/components/NButton.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
12
|
+
var re = ["type", "disabled"], V = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "spinner",
|
|
15
15
|
viewBox: "0 0 24 24",
|
|
@@ -63,7 +63,7 @@ var ne = ["type", "disabled"], re = {
|
|
|
63
63
|
]),
|
|
64
64
|
type: e.type,
|
|
65
65
|
disabled: e.disabled || e.loading
|
|
66
|
-
}, [e.loading ? (C(), s("svg",
|
|
66
|
+
}, [e.loading ? (C(), s("svg", V, [...n[0] ||= [c("circle", {
|
|
67
67
|
cx: "12",
|
|
68
68
|
cy: "12",
|
|
69
69
|
r: "10",
|
|
@@ -72,14 +72,14 @@ var ne = ["type", "disabled"], re = {
|
|
|
72
72
|
"stroke-linecap": "round",
|
|
73
73
|
"stroke-dasharray": "32",
|
|
74
74
|
"stroke-dashoffset": "12"
|
|
75
|
-
}, null, -1)]])) : o("", !0), D(t.$slots, "default", {}, void 0, !0)], 10,
|
|
75
|
+
}, null, -1)]])) : o("", !0), D(t.$slots, "default", {}, void 0, !0)], 10, re));
|
|
76
76
|
}
|
|
77
77
|
}), U = (e, t) => {
|
|
78
78
|
let n = e.__vccOpts || e;
|
|
79
79
|
for (let [e, r] of t) n[e] = r;
|
|
80
80
|
return n;
|
|
81
81
|
}, W = /* @__PURE__ */ U(H, [["__scopeId", "data-v-285afe14"]]), G = (e) => e.meta?.breadcrumb ?? "", K = T((e) => e);
|
|
82
|
-
function
|
|
82
|
+
function q() {
|
|
83
83
|
function e(e) {
|
|
84
84
|
G = e;
|
|
85
85
|
}
|
|
@@ -87,7 +87,7 @@ function ie() {
|
|
|
87
87
|
K.value = e;
|
|
88
88
|
}
|
|
89
89
|
let n = i(() => {
|
|
90
|
-
let e =
|
|
90
|
+
let e = B();
|
|
91
91
|
if (!e) return [];
|
|
92
92
|
let t = e.currentRoute.value.matched, n = [];
|
|
93
93
|
return t.forEach((e, r) => {
|
|
@@ -101,7 +101,7 @@ function ie() {
|
|
|
101
101
|
}), n;
|
|
102
102
|
});
|
|
103
103
|
function r(e) {
|
|
104
|
-
|
|
104
|
+
B()?.push(e);
|
|
105
105
|
}
|
|
106
106
|
function a() {
|
|
107
107
|
K.value = (e) => e;
|
|
@@ -116,14 +116,14 @@ function ie() {
|
|
|
116
116
|
}
|
|
117
117
|
//#endregion
|
|
118
118
|
//#region src/components/NBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
119
|
-
var
|
|
119
|
+
var ie = { class: "breadcrumbs" }, ae = ["onClick"], oe = {
|
|
120
120
|
key: 1,
|
|
121
121
|
class: "active"
|
|
122
122
|
}, se = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
123
123
|
__name: "NBreadcrumb",
|
|
124
124
|
setup(t) {
|
|
125
|
-
let { breadcrumbs: n, navigate: r } =
|
|
126
|
-
return (t, i) => (C(), s("nav",
|
|
125
|
+
let { breadcrumbs: n, navigate: r } = q();
|
|
126
|
+
return (t, i) => (C(), s("nav", ie, [(C(!0), s(e, null, E(N(n), (t, n) => (C(), s(e, { key: n }, [t.path ? (C(), s("span", {
|
|
127
127
|
key: 0,
|
|
128
128
|
class: "crumb-link",
|
|
129
129
|
onClick: (e) => N(r)(t.path)
|
|
@@ -522,7 +522,7 @@ var q = { class: "breadcrumbs" }, ae = ["onClick"], oe = {
|
|
|
522
522
|
}), (n, r) => (C(), s("div", { class: _(["checkbox", { inline: t.inline }]) }, [t.title ? (C(), s("h3", xe, A(t.title), 1)) : o("", !0), c("div", { class: _(["group", [t.direction]]) }, [l.value ? (C(), s("label", {
|
|
523
523
|
key: 1,
|
|
524
524
|
class: "item",
|
|
525
|
-
onClick: r[0] ||=
|
|
525
|
+
onClick: r[0] ||= z((e) => h(), ["prevent"])
|
|
526
526
|
}, [
|
|
527
527
|
c("input", {
|
|
528
528
|
type: "checkbox",
|
|
@@ -544,7 +544,7 @@ var q = { class: "breadcrumbs" }, ae = ["onClick"], oe = {
|
|
|
544
544
|
])) : (C(!0), s(e, { key: 0 }, E(t.options, (e, n) => (C(), s("label", {
|
|
545
545
|
key: `${t.formatLabel(e)}${n}`,
|
|
546
546
|
class: "item",
|
|
547
|
-
onClick:
|
|
547
|
+
onClick: z((t) => h(e), ["prevent"])
|
|
548
548
|
}, [
|
|
549
549
|
c("input", {
|
|
550
550
|
type: "checkbox",
|
|
@@ -2212,23 +2212,23 @@ var Bn = { class: "select" }, Vn = {
|
|
|
2212
2212
|
r.disabled || (d.value = !d.value, d.value && (await g(), r.searchable && S.value?.focus()));
|
|
2213
2213
|
}, F = () => {
|
|
2214
2214
|
d.value = !1, p.value = "";
|
|
2215
|
-
},
|
|
2215
|
+
}, te = (e) => {
|
|
2216
2216
|
if (!d.value) return;
|
|
2217
2217
|
let t = e.target;
|
|
2218
2218
|
m.value?.contains(t) || x.value?.contains(t) || F();
|
|
2219
|
-
},
|
|
2219
|
+
}, ne = (e) => j.value.hasOwnProperty(e), B = (e) => {
|
|
2220
2220
|
if (r.disabled) return;
|
|
2221
2221
|
let t;
|
|
2222
|
-
r.multiple ? (
|
|
2223
|
-
},
|
|
2222
|
+
r.multiple ? (ne(r.formatValue(e)) ? delete j.value[r.formatValue(e)] : j.value[r.formatValue(e)] = e, t = Object.keys(j.value), u("update:modelValue", t), u("change", t), u("change:item", e), u("change:value", t), u("change:values", t)) : (t = r.formatValue(e), u("update:modelValue", t), u("change", t), u("change:item", e), u("change:value", t), F());
|
|
2223
|
+
}, re = () => {
|
|
2224
2224
|
if (r.disabled) return;
|
|
2225
2225
|
let e = r.multiple ? [] : void 0;
|
|
2226
2226
|
u("update:modelValue", e), u("change", e), u("change:value", e), u("change:values", []);
|
|
2227
|
-
},
|
|
2227
|
+
}, V = i(() => {
|
|
2228
2228
|
let e = p.value.trim().toLowerCase();
|
|
2229
2229
|
return e ? r.options.filter((t) => String(r.formatLabel(t)).toLowerCase().includes(e)) : r.options;
|
|
2230
2230
|
}), H = zn(i(() => ({
|
|
2231
|
-
count:
|
|
2231
|
+
count: V.value.length,
|
|
2232
2232
|
getScrollElement: () => w.value,
|
|
2233
2233
|
estimateSize: () => Xn,
|
|
2234
2234
|
overscan: 8
|
|
@@ -2237,12 +2237,12 @@ var Bn = { class: "select" }, Vn = {
|
|
|
2237
2237
|
};
|
|
2238
2238
|
L(d, async (e) => {
|
|
2239
2239
|
e && (await g(), H.value.measure());
|
|
2240
|
-
}), L(
|
|
2240
|
+
}), L(V, async () => {
|
|
2241
2241
|
d.value && (await g(), H.value.scrollToOffset(0));
|
|
2242
2242
|
}), b(() => {
|
|
2243
|
-
document.addEventListener("pointerdown",
|
|
2243
|
+
document.addEventListener("pointerdown", te);
|
|
2244
2244
|
}), y(() => {
|
|
2245
|
-
document.removeEventListener("pointerdown",
|
|
2245
|
+
document.removeEventListener("pointerdown", te);
|
|
2246
2246
|
});
|
|
2247
2247
|
let K = i(() => {
|
|
2248
2248
|
let e = Object.keys(j.value), t = e.length;
|
|
@@ -2270,7 +2270,7 @@ var Bn = { class: "select" }, Vn = {
|
|
|
2270
2270
|
class: "select-chip"
|
|
2271
2271
|
}, [c("span", null, A(r.formatLabel(e)), 1), c("span", {
|
|
2272
2272
|
class: "remove-chip",
|
|
2273
|
-
onClick:
|
|
2273
|
+
onClick: z((t) => B(e), ["stop"])
|
|
2274
2274
|
}, [...l[1] ||= [c("svg", {
|
|
2275
2275
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2276
2276
|
width: "14",
|
|
@@ -2286,7 +2286,7 @@ var Bn = { class: "select" }, Vn = {
|
|
|
2286
2286
|
key: 0,
|
|
2287
2287
|
class: "clear-btn",
|
|
2288
2288
|
type: "button",
|
|
2289
|
-
onClick:
|
|
2289
|
+
onClick: z(re, ["stop"])
|
|
2290
2290
|
}, [...l[2] ||= [c("svg", {
|
|
2291
2291
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2292
2292
|
width: "14",
|
|
@@ -2332,7 +2332,7 @@ var Bn = { class: "select" }, Vn = {
|
|
|
2332
2332
|
cx: "11",
|
|
2333
2333
|
cy: "11",
|
|
2334
2334
|
r: "8"
|
|
2335
|
-
})], -1),
|
|
2335
|
+
})], -1), ee(c("input", {
|
|
2336
2336
|
ref_key: "searchInputRef",
|
|
2337
2337
|
ref: S,
|
|
2338
2338
|
type: "text",
|
|
@@ -2343,7 +2343,7 @@ var Bn = { class: "select" }, Vn = {
|
|
|
2343
2343
|
ref_key: "optionsRef",
|
|
2344
2344
|
ref: w,
|
|
2345
2345
|
class: "options"
|
|
2346
|
-
}, [
|
|
2346
|
+
}, [V.value.length > 0 ? (C(), s("div", {
|
|
2347
2347
|
key: 0,
|
|
2348
2348
|
class: "options-viewport",
|
|
2349
2349
|
style: v({ height: `${W.value}px` })
|
|
@@ -2352,10 +2352,10 @@ var Bn = { class: "select" }, Vn = {
|
|
|
2352
2352
|
ref_for: !0,
|
|
2353
2353
|
ref: (e) => G(e),
|
|
2354
2354
|
"data-index": e.index,
|
|
2355
|
-
class: _(["option", { selected:
|
|
2355
|
+
class: _(["option", { selected: ne(r.formatValue(V.value[e.index])) }]),
|
|
2356
2356
|
style: v({ transform: `translateY(${e.start}px)` }),
|
|
2357
|
-
onClick: (t) => V
|
|
2358
|
-
}, [c("span", null, A(r.formatLabel(
|
|
2357
|
+
onClick: (t) => B(V.value[e.index])
|
|
2358
|
+
}, [c("span", null, A(r.formatLabel(V.value[e.index])), 1), ne(r.formatValue(V.value[e.index])) ? (C(), s("svg", Jn, [...l[5] ||= [c("path", { d: "M20 6 9 17l-5-5" }, null, -1)]])) : o("", !0)], 14, qn))), 128))], 4)) : (C(), s("div", Yn, "無符合選項"))], 512)])], 6)) : o("", !0)]),
|
|
2359
2359
|
_: 1
|
|
2360
2360
|
})]))], 2)]));
|
|
2361
2361
|
}
|
|
@@ -2849,7 +2849,7 @@ var li = {
|
|
|
2849
2849
|
"aria-label": "刪除",
|
|
2850
2850
|
type: "button",
|
|
2851
2851
|
disabled: t.disabled,
|
|
2852
|
-
onClick:
|
|
2852
|
+
onClick: z((t) => y(e.id), ["stop"])
|
|
2853
2853
|
}, [...r[1] ||= [c("svg", {
|
|
2854
2854
|
viewBox: "0 0 24 24",
|
|
2855
2855
|
fill: "none",
|
|
@@ -2995,8 +2995,8 @@ var Oi = { class: "hero-section-container" }, ki = { class: "hero-section" }, Ai
|
|
|
2995
2995
|
"title",
|
|
2996
2996
|
"description"
|
|
2997
2997
|
])], !0), c("form", {
|
|
2998
|
-
onSubmit:
|
|
2999
|
-
onReset:
|
|
2998
|
+
onSubmit: z(p, ["prevent"]),
|
|
2999
|
+
onReset: z(m, ["prevent"])
|
|
3000
3000
|
}, [
|
|
3001
3001
|
i[0] ||= c("button", {
|
|
3002
3002
|
type: "submit",
|
|
@@ -3325,7 +3325,7 @@ var Oi = { class: "hero-section-container" }, ki = { class: "hero-section" }, Ai
|
|
|
3325
3325
|
let n = e.dataset.stickyKey;
|
|
3326
3326
|
n && (t[n] = e.getBoundingClientRect().width);
|
|
3327
3327
|
}), S.value = t;
|
|
3328
|
-
},
|
|
3328
|
+
}, ee = async () => {
|
|
3329
3329
|
if (P?.disconnect(), P = null, !b.value) {
|
|
3330
3330
|
S.value = {};
|
|
3331
3331
|
return;
|
|
@@ -3340,7 +3340,7 @@ var Oi = { class: "hero-section-container" }, ki = { class: "hero-section" }, Ai
|
|
|
3340
3340
|
() => t.columns,
|
|
3341
3341
|
() => t.items.length
|
|
3342
3342
|
], () => {
|
|
3343
|
-
|
|
3343
|
+
ee();
|
|
3344
3344
|
}, { immediate: !0 }), y(() => {
|
|
3345
3345
|
P?.disconnect(), P = null;
|
|
3346
3346
|
}), (n, i) => (C(), s("div", { class: _(["table", [{ bordered: t.bordered }, { hoverable: t.hoverable }]]) }, [f(fa, {
|
|
@@ -3613,7 +3613,7 @@ var Oi = { class: "hero-section-container" }, ki = { class: "hero-section" }, Ai
|
|
|
3613
3613
|
key: 0,
|
|
3614
3614
|
class: _(["batch", { "is-sticky": e.stickyBatch }])
|
|
3615
3615
|
}, [f(J, {
|
|
3616
|
-
onClick:
|
|
3616
|
+
onClick: z((e) => g(n), ["stop"]),
|
|
3617
3617
|
"model-value": m(u(n))
|
|
3618
3618
|
}, null, 8, ["onClick", "model-value"])], 2)) : o("", !0), D(t.$slots, "item", {
|
|
3619
3619
|
index: r,
|
|
@@ -3632,7 +3632,7 @@ var Oi = { class: "hero-section-container" }, ki = { class: "hero-section" }, Ai
|
|
|
3632
3632
|
e.updatable ? (C(), a(W, {
|
|
3633
3633
|
key: 0,
|
|
3634
3634
|
variant: "outline",
|
|
3635
|
-
onClick:
|
|
3635
|
+
onClick: z(() => n("update", r), ["stop"])
|
|
3636
3636
|
}, {
|
|
3637
3637
|
default: R(() => [d(A(e.updateLabel), 1)]),
|
|
3638
3638
|
_: 1
|
|
@@ -3641,7 +3641,7 @@ var Oi = { class: "hero-section-container" }, ki = { class: "hero-section" }, Ai
|
|
|
3641
3641
|
key: 1,
|
|
3642
3642
|
variant: "solid",
|
|
3643
3643
|
intent: "error",
|
|
3644
|
-
onClick:
|
|
3644
|
+
onClick: z(() => n("delete", r), ["stop"])
|
|
3645
3645
|
}, {
|
|
3646
3646
|
default: R(() => [d(A(e.deleteLabel), 1)]),
|
|
3647
3647
|
_: 1
|
|
@@ -4024,7 +4024,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4024
4024
|
k.value = window.innerWidth < 768;
|
|
4025
4025
|
}, 150);
|
|
4026
4026
|
}
|
|
4027
|
-
let
|
|
4027
|
+
let ee = [
|
|
4028
4028
|
"一月",
|
|
4029
4029
|
"二月",
|
|
4030
4030
|
"三月",
|
|
@@ -4037,7 +4037,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4037
4037
|
"十月",
|
|
4038
4038
|
"十一月",
|
|
4039
4039
|
"十二月"
|
|
4040
|
-
],
|
|
4040
|
+
], te = [
|
|
4041
4041
|
"日",
|
|
4042
4042
|
"一",
|
|
4043
4043
|
"二",
|
|
@@ -4045,7 +4045,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4045
4045
|
"四",
|
|
4046
4046
|
"五",
|
|
4047
4047
|
"六"
|
|
4048
|
-
],
|
|
4048
|
+
], ne = /* @__PURE__ */ new Date(), B = ne.getFullYear(), re = ne.getMonth(), V = ne.getDate();
|
|
4049
4049
|
function H(e, t) {
|
|
4050
4050
|
let n = new Date(e, t, 1).getDay(), r = new Date(e, t + 1, 0).getDate(), i = new Date(e, t, 0).getDate(), a = [];
|
|
4051
4051
|
for (let r = n - 1; r >= 0; r--) {
|
|
@@ -4078,7 +4078,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4078
4078
|
function G(e) {
|
|
4079
4079
|
return String(e).padStart(2, "0");
|
|
4080
4080
|
}
|
|
4081
|
-
let K = T("date"),
|
|
4081
|
+
let K = T("date"), q = T(/* @__PURE__ */ new Date()), ie = T(null), ae = T(0), oe = T(0), se = null, ce = null, le = i(() => q.value.getFullYear()), ue = i(() => q.value.getMonth()), de = T(Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 12) * 12), fe = i(() => {
|
|
4082
4082
|
let e = [];
|
|
4083
4083
|
for (let t = 0; t < 12; t++) e.push(de.value + t);
|
|
4084
4084
|
return e;
|
|
@@ -4088,7 +4088,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4088
4088
|
}, { immediate: !0 }), L(() => r.modelValue, (e) => {
|
|
4089
4089
|
if (!e) return;
|
|
4090
4090
|
let t = m(String(e));
|
|
4091
|
-
t && (
|
|
4091
|
+
t && (q.value = new Date(t.year, t.month, 1));
|
|
4092
4092
|
}, { immediate: !0 });
|
|
4093
4093
|
let pe = i(() => H(le.value, ue.value)), me = i(() => {
|
|
4094
4094
|
if (!r.modelValue) return "";
|
|
@@ -4097,12 +4097,12 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4097
4097
|
}), he = i(() => r.range ? r.start && r.end ? `${r.start} → ${r.end}` : r.start ? `${r.start} → ...` : "" : me.value);
|
|
4098
4098
|
function ge() {
|
|
4099
4099
|
let e = m(String(r.modelValue));
|
|
4100
|
-
e ? (
|
|
4100
|
+
e ? (q.value = new Date(e.year, e.month, 1), ae.value = e.hour, oe.value = e.min, ie.value = x.value ? {
|
|
4101
4101
|
year: e.year,
|
|
4102
4102
|
month: e.month,
|
|
4103
4103
|
day: e.day,
|
|
4104
4104
|
isCurrentMonth: !0
|
|
4105
|
-
} : null) : (ae.value = 0, oe.value = 0,
|
|
4105
|
+
} : null) : (ae.value = 0, oe.value = 0, ie.value = null), K.value = "date";
|
|
4106
4106
|
}
|
|
4107
4107
|
function _e(e) {
|
|
4108
4108
|
if (!r.modelValue) return !1;
|
|
@@ -4110,33 +4110,33 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4110
4110
|
return t ? t.year === e.year && t.month === e.month && t.day === e.day : !1;
|
|
4111
4111
|
}
|
|
4112
4112
|
function ve(e) {
|
|
4113
|
-
return
|
|
4113
|
+
return B === e.year && re === e.month && V === e.day;
|
|
4114
4114
|
}
|
|
4115
4115
|
function ye(e) {
|
|
4116
|
-
return x.value ?
|
|
4116
|
+
return x.value ? ie.value !== null && ie.value.year === e.year && ie.value.month === e.month && ie.value.day === e.day : _e(e);
|
|
4117
4117
|
}
|
|
4118
4118
|
function be(e) {
|
|
4119
4119
|
let t = p(e.year, e.month, e.day, ae.value, oe.value);
|
|
4120
4120
|
u("update:modelValue", t), u("change", t);
|
|
4121
4121
|
}
|
|
4122
4122
|
function xe(e) {
|
|
4123
|
-
if (x.value)
|
|
4123
|
+
if (x.value) ie.value = { ...e }, q.value = new Date(e.year, e.month, 1), be(e);
|
|
4124
4124
|
else {
|
|
4125
4125
|
let t = p(e.year, e.month, e.day, 0, 0);
|
|
4126
4126
|
u("update:modelValue", t), u("change", t), Je();
|
|
4127
4127
|
}
|
|
4128
4128
|
}
|
|
4129
4129
|
function Se(e) {
|
|
4130
|
-
|
|
4130
|
+
q.value = new Date(e, ue.value, 1), K.value = "date";
|
|
4131
4131
|
}
|
|
4132
4132
|
function Ce(e) {
|
|
4133
|
-
|
|
4133
|
+
q.value = new Date(le.value, ue.value + e, 1);
|
|
4134
4134
|
}
|
|
4135
4135
|
function we(e) {
|
|
4136
|
-
K.value === "year" ? de.value += e * 12 :
|
|
4136
|
+
K.value === "year" ? de.value += e * 12 : q.value = new Date(le.value + e, ue.value, 1);
|
|
4137
4137
|
}
|
|
4138
4138
|
function Te(e, t) {
|
|
4139
|
-
e === "H" ? ae.value = Math.max(0, Math.min(23, ae.value + t)) : oe.value = Math.max(0, Math.min(59, oe.value + t)),
|
|
4139
|
+
e === "H" ? ae.value = Math.max(0, Math.min(23, ae.value + t)) : oe.value = Math.max(0, Math.min(59, oe.value + t)), ie.value && be(ie.value);
|
|
4140
4140
|
}
|
|
4141
4141
|
function Ee(e, t) {
|
|
4142
4142
|
Te(e, t), se = setTimeout(() => {
|
|
@@ -4148,9 +4148,9 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4148
4148
|
}
|
|
4149
4149
|
function De(e, t) {
|
|
4150
4150
|
let n = parseInt(e.target.value);
|
|
4151
|
-
t === "H" ? ae.value = n : oe.value = n,
|
|
4151
|
+
t === "H" ? ae.value = n : oe.value = n, ie.value && be(ie.value);
|
|
4152
4152
|
}
|
|
4153
|
-
let Y = T(
|
|
4153
|
+
let Y = T(B), X = T(re), Z = T(null), Q = T(null), Oe = T(null), ke = T(null), Ae = i(() => !!Q.value && !!Oe.value), je = i(() => X.value === 11 ? Y.value + 1 : Y.value), Me = i(() => X.value === 11 ? 0 : X.value + 1), Ne = i(() => H(Y.value, X.value)), Pe = i(() => H(je.value, Me.value)), Fe = i(() => [{
|
|
4154
4154
|
year: Y.value,
|
|
4155
4155
|
month: X.value,
|
|
4156
4156
|
days: Ne.value,
|
|
@@ -4190,8 +4190,8 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4190
4190
|
});
|
|
4191
4191
|
function Ve() {
|
|
4192
4192
|
let e = m(r.start) ?? {
|
|
4193
|
-
year:
|
|
4194
|
-
month:
|
|
4193
|
+
year: B,
|
|
4194
|
+
month: re,
|
|
4195
4195
|
day: 1,
|
|
4196
4196
|
hour: 0,
|
|
4197
4197
|
min: 0
|
|
@@ -4212,7 +4212,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4212
4212
|
}
|
|
4213
4213
|
}
|
|
4214
4214
|
function Ge(e) {
|
|
4215
|
-
let t = e.year ===
|
|
4215
|
+
let t = e.year === B && e.month === re && e.day === V, n = Z.value && e.year === Z.value.year && e.month === Z.value.month && e.day === Z.value.day, r = Le.value, i = Re.value, a = r && e.year === r.year && e.month === r.month && e.day === r.day, o = i && e.year === i.year && e.month === i.month && e.day === i.day, s = r && i && U(e, r) > 0 && U(e, i) < 0;
|
|
4216
4216
|
return {
|
|
4217
4217
|
"is-other-month": !e.isCurrentMonth,
|
|
4218
4218
|
"is-today": t && !a && !o,
|
|
@@ -4334,7 +4334,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4334
4334
|
c("div", {
|
|
4335
4335
|
class: "header-title",
|
|
4336
4336
|
onClick: Ye
|
|
4337
|
-
}, [K.value === "date" ? (C(), s(e, { key: 0 }, [d(A(
|
|
4337
|
+
}, [K.value === "date" ? (C(), s(e, { key: 0 }, [d(A(ee[ue.value]) + " " + A(le.value), 1)], 64)) : (C(), s(e, { key: 1 }, [d(A(fe.value[0]) + " - " + A(fe.value[fe.value.length - 1]), 1)], 64))]),
|
|
4338
4338
|
c("div", $a, [K.value === "date" ? (C(), a(W, {
|
|
4339
4339
|
key: 0,
|
|
4340
4340
|
variant: "ghost",
|
|
@@ -4372,7 +4372,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4372
4372
|
_: 1
|
|
4373
4373
|
})])
|
|
4374
4374
|
]),
|
|
4375
|
-
c("div", eo, [K.value === "date" ? (C(), s(e, { key: 0 }, [c("div", to, [(C(), s(e, null, E(
|
|
4375
|
+
c("div", eo, [K.value === "date" ? (C(), s(e, { key: 0 }, [c("div", to, [(C(), s(e, null, E(te, (e) => c("span", {
|
|
4376
4376
|
key: e,
|
|
4377
4377
|
class: "weekday"
|
|
4378
4378
|
}, A(e), 1)), 64))]), c("div", no, [(C(!0), s(e, null, E(pe.value, (e, t) => (C(), a(W, {
|
|
@@ -4411,7 +4411,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4411
4411
|
square: "",
|
|
4412
4412
|
size: "sm",
|
|
4413
4413
|
class: "time-step",
|
|
4414
|
-
onMousedown: l[4] ||=
|
|
4414
|
+
onMousedown: l[4] ||= z((e) => Ee("H", -1), ["prevent"]),
|
|
4415
4415
|
onMouseup: J,
|
|
4416
4416
|
onMouseleave: J
|
|
4417
4417
|
}, {
|
|
@@ -4441,7 +4441,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4441
4441
|
square: "",
|
|
4442
4442
|
size: "sm",
|
|
4443
4443
|
class: "time-step",
|
|
4444
|
-
onMousedown: l[6] ||=
|
|
4444
|
+
onMousedown: l[6] ||= z((e) => Ee("H", 1), ["prevent"]),
|
|
4445
4445
|
onMouseup: J,
|
|
4446
4446
|
onMouseleave: J
|
|
4447
4447
|
}, {
|
|
@@ -4466,7 +4466,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4466
4466
|
square: "",
|
|
4467
4467
|
size: "sm",
|
|
4468
4468
|
class: "time-step",
|
|
4469
|
-
onMousedown: l[7] ||=
|
|
4469
|
+
onMousedown: l[7] ||= z((e) => Ee("m", -1), ["prevent"]),
|
|
4470
4470
|
onMouseup: J,
|
|
4471
4471
|
onMouseleave: J
|
|
4472
4472
|
}, {
|
|
@@ -4496,7 +4496,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4496
4496
|
square: "",
|
|
4497
4497
|
size: "sm",
|
|
4498
4498
|
class: "time-step",
|
|
4499
|
-
onMousedown: l[9] ||=
|
|
4499
|
+
onMousedown: l[9] ||= z((e) => Ee("m", 1), ["prevent"]),
|
|
4500
4500
|
onMouseup: J,
|
|
4501
4501
|
onMouseleave: J
|
|
4502
4502
|
}, {
|
|
@@ -4522,7 +4522,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4522
4522
|
default: R(() => [S.value && !r.range && k.value ? (C(), s("div", {
|
|
4523
4523
|
key: 0,
|
|
4524
4524
|
class: "mobile-overlay",
|
|
4525
|
-
onClick:
|
|
4525
|
+
onClick: z(Je, ["self"])
|
|
4526
4526
|
}, [c("div", po, [
|
|
4527
4527
|
l[41] ||= c("div", { class: "sheet-handle" }, null, -1),
|
|
4528
4528
|
c("div", mo, [
|
|
@@ -4565,7 +4565,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4565
4565
|
c("div", {
|
|
4566
4566
|
class: "header-title",
|
|
4567
4567
|
onClick: Ye
|
|
4568
|
-
}, [K.value === "date" ? (C(), s(e, { key: 0 }, [d(A(
|
|
4568
|
+
}, [K.value === "date" ? (C(), s(e, { key: 0 }, [d(A(ee[ue.value]) + " " + A(le.value), 1)], 64)) : (C(), s(e, { key: 1 }, [d(A(fe.value[0]) + " - " + A(fe.value[fe.value.length - 1]), 1)], 64))]),
|
|
4569
4569
|
c("div", go, [K.value === "date" ? (C(), a(W, {
|
|
4570
4570
|
key: 0,
|
|
4571
4571
|
variant: "ghost",
|
|
@@ -4603,7 +4603,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4603
4603
|
_: 1
|
|
4604
4604
|
})])
|
|
4605
4605
|
]),
|
|
4606
|
-
c("div", _o, [K.value === "date" ? (C(), s(e, { key: 0 }, [c("div", vo, [(C(), s(e, null, E(
|
|
4606
|
+
c("div", _o, [K.value === "date" ? (C(), s(e, { key: 0 }, [c("div", vo, [(C(), s(e, null, E(te, (e) => c("span", {
|
|
4607
4607
|
key: e,
|
|
4608
4608
|
class: "weekday"
|
|
4609
4609
|
}, A(e), 1)), 64))]), c("div", yo, [(C(!0), s(e, null, E(pe.value, (e, t) => (C(), a(W, {
|
|
@@ -4642,7 +4642,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4642
4642
|
square: "",
|
|
4643
4643
|
size: "sm",
|
|
4644
4644
|
class: "time-step",
|
|
4645
|
-
onMousedown: l[14] ||=
|
|
4645
|
+
onMousedown: l[14] ||= z((e) => Ee("H", -1), ["prevent"]),
|
|
4646
4646
|
onMouseup: J,
|
|
4647
4647
|
onMouseleave: J
|
|
4648
4648
|
}, {
|
|
@@ -4672,7 +4672,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4672
4672
|
square: "",
|
|
4673
4673
|
size: "sm",
|
|
4674
4674
|
class: "time-step",
|
|
4675
|
-
onMousedown: l[16] ||=
|
|
4675
|
+
onMousedown: l[16] ||= z((e) => Ee("H", 1), ["prevent"]),
|
|
4676
4676
|
onMouseup: J,
|
|
4677
4677
|
onMouseleave: J
|
|
4678
4678
|
}, {
|
|
@@ -4697,7 +4697,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4697
4697
|
square: "",
|
|
4698
4698
|
size: "sm",
|
|
4699
4699
|
class: "time-step",
|
|
4700
|
-
onMousedown: l[17] ||=
|
|
4700
|
+
onMousedown: l[17] ||= z((e) => Ee("m", -1), ["prevent"]),
|
|
4701
4701
|
onMouseup: J,
|
|
4702
4702
|
onMouseleave: J
|
|
4703
4703
|
}, {
|
|
@@ -4727,7 +4727,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4727
4727
|
square: "",
|
|
4728
4728
|
size: "sm",
|
|
4729
4729
|
class: "time-step",
|
|
4730
|
-
onMousedown: l[19] ||=
|
|
4730
|
+
onMousedown: l[19] ||= z((e) => Ee("m", 1), ["prevent"]),
|
|
4731
4731
|
onMouseup: J,
|
|
4732
4732
|
onMouseleave: J
|
|
4733
4733
|
}, {
|
|
@@ -4753,7 +4753,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4753
4753
|
default: R(() => [S.value && r.range && !k.value ? (C(), s("div", {
|
|
4754
4754
|
key: 0,
|
|
4755
4755
|
class: "range-overlay",
|
|
4756
|
-
onClick:
|
|
4756
|
+
onClick: z(Je, ["self"])
|
|
4757
4757
|
}, [c("div", ko, [
|
|
4758
4758
|
l[46] ||= c("p", { class: "range-modal-title" }, "選擇日期範圍", -1),
|
|
4759
4759
|
c("div", Ao, [(C(!0), s(e, null, E(Fe.value, (t) => (C(), s(e, { key: t.isLeft ? "left" : "right" }, [t.isLeft ? o("", !0) : (C(), s("div", jo)), c("div", Mo, [
|
|
@@ -4777,7 +4777,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4777
4777
|
}, [c("path", { d: "m15 18-6-6 6-6" })], -1)]]),
|
|
4778
4778
|
_: 1
|
|
4779
4779
|
})) : (C(), s("div", Fo))]),
|
|
4780
|
-
c("div", Io, A(
|
|
4780
|
+
c("div", Io, A(ee[t.month]) + " " + A(t.year), 1),
|
|
4781
4781
|
c("div", Lo, [t.isLeft ? (C(), s("div", Ro)) : (C(), a(W, {
|
|
4782
4782
|
key: 0,
|
|
4783
4783
|
variant: "ghost",
|
|
@@ -4798,7 +4798,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4798
4798
|
_: 1
|
|
4799
4799
|
}))])
|
|
4800
4800
|
]),
|
|
4801
|
-
c("div", zo, [(C(), s(e, null, E(
|
|
4801
|
+
c("div", zo, [(C(), s(e, null, E(te, (e) => c("span", {
|
|
4802
4802
|
key: e,
|
|
4803
4803
|
class: "weekday"
|
|
4804
4804
|
}, A(e), 1)), 64))]),
|
|
@@ -4818,7 +4818,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4818
4818
|
intent: "primary",
|
|
4819
4819
|
class: "confirm-btn",
|
|
4820
4820
|
disabled: !Ae.value,
|
|
4821
|
-
onClick:
|
|
4821
|
+
onClick: z(Ke, ["stop"])
|
|
4822
4822
|
}, {
|
|
4823
4823
|
default: R(() => [...l[45] ||= [d(" 確認 ", -1)]]),
|
|
4824
4824
|
_: 1
|
|
@@ -4830,7 +4830,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4830
4830
|
default: R(() => [S.value && r.range && k.value ? (C(), s("div", {
|
|
4831
4831
|
key: 0,
|
|
4832
4832
|
class: "mobile-overlay",
|
|
4833
|
-
onClick:
|
|
4833
|
+
onClick: z(Je, ["self"])
|
|
4834
4834
|
}, [c("div", Wo, [
|
|
4835
4835
|
l[51] ||= c("div", { class: "sheet-handle" }, null, -1),
|
|
4836
4836
|
l[52] ||= c("p", { class: "range-modal-title" }, "選擇日期範圍", -1),
|
|
@@ -4853,7 +4853,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4853
4853
|
}, [c("path", { d: "m15 18-6-6 6-6" })], -1)]]),
|
|
4854
4854
|
_: 1
|
|
4855
4855
|
})]),
|
|
4856
|
-
c("div", qo, A(
|
|
4856
|
+
c("div", qo, A(ee[X.value]) + " " + A(Y.value), 1),
|
|
4857
4857
|
c("div", Jo, [f(W, {
|
|
4858
4858
|
variant: "ghost",
|
|
4859
4859
|
square: "",
|
|
@@ -4873,7 +4873,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4873
4873
|
_: 1
|
|
4874
4874
|
})])
|
|
4875
4875
|
]),
|
|
4876
|
-
c("div", Yo, [(C(), s(e, null, E(
|
|
4876
|
+
c("div", Yo, [(C(), s(e, null, E(te, (e) => c("span", {
|
|
4877
4877
|
key: e,
|
|
4878
4878
|
class: "weekday"
|
|
4879
4879
|
}, A(e), 1)), 64))]),
|
|
@@ -4891,7 +4891,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4891
4891
|
intent: "primary",
|
|
4892
4892
|
class: "confirm-btn",
|
|
4893
4893
|
disabled: !Ae.value,
|
|
4894
|
-
onClick:
|
|
4894
|
+
onClick: z(Ke, ["stop"])
|
|
4895
4895
|
}, {
|
|
4896
4896
|
default: R(() => [...l[50] ||= [d(" 確認 ", -1)]]),
|
|
4897
4897
|
_: 1
|
|
@@ -4904,7 +4904,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4904
4904
|
}), [["__scopeId", "data-v-526e880b"]]), ts = {
|
|
4905
4905
|
key: 0,
|
|
4906
4906
|
class: "label"
|
|
4907
|
-
}, ns = { class: "dropdown-inner" }, rs = { class: "col-head" }, is = { class: "wheel" }, as = ["data-unit"], os = ["data-val", "onClick"], ss =
|
|
4907
|
+
}, ns = { class: "dropdown-inner" }, rs = { class: "col-head" }, is = { class: "wheel" }, as = ["data-unit"], os = ["data-val", "onClick"], ss = 40, cs = 2, ls = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
4908
4908
|
__name: "NTimePicker",
|
|
4909
4909
|
props: {
|
|
4910
4910
|
modelValue: { default: "" },
|
|
@@ -4930,7 +4930,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4930
4930
|
default: !1
|
|
4931
4931
|
},
|
|
4932
4932
|
title: { default: "" },
|
|
4933
|
-
size: { default: "
|
|
4933
|
+
size: { default: "lg" }
|
|
4934
4934
|
},
|
|
4935
4935
|
emits: [
|
|
4936
4936
|
"update:modelValue",
|
|
@@ -4938,23 +4938,23 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4938
4938
|
"clear"
|
|
4939
4939
|
],
|
|
4940
4940
|
setup(r, { emit: l }) {
|
|
4941
|
-
let u = l,
|
|
4941
|
+
let u = l, d = i(() => r.hour || r.minute || r.second), p = i(() => {
|
|
4942
4942
|
let e = [];
|
|
4943
4943
|
return r.hour && e.push("hour"), r.minute && e.push("minute"), r.second && e.push("second"), e.length ? e : ["hour"];
|
|
4944
4944
|
});
|
|
4945
|
-
function
|
|
4945
|
+
function m(e) {
|
|
4946
4946
|
return e === "hour" ? 23 : 59;
|
|
4947
4947
|
}
|
|
4948
|
-
function
|
|
4948
|
+
function h(e) {
|
|
4949
4949
|
return String(e).padStart(2, "0");
|
|
4950
4950
|
}
|
|
4951
|
-
function
|
|
4952
|
-
return
|
|
4951
|
+
function x(e) {
|
|
4952
|
+
return p.value.map((t) => h(t === "hour" ? e.hour : t === "minute" ? e.minute : e.second)).join(":");
|
|
4953
4953
|
}
|
|
4954
|
-
function
|
|
4955
|
-
return Math.max(0, Math.min(
|
|
4954
|
+
function S(e, t) {
|
|
4955
|
+
return Math.max(0, Math.min(m(e), t));
|
|
4956
4956
|
}
|
|
4957
|
-
function
|
|
4957
|
+
function w(e) {
|
|
4958
4958
|
if (!e) return null;
|
|
4959
4959
|
let t = String(e).split(":").map((e) => parseInt(e, 10));
|
|
4960
4960
|
if (t.some((e) => Number.isNaN(e))) return null;
|
|
@@ -4963,24 +4963,24 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4963
4963
|
minute: 0,
|
|
4964
4964
|
second: 0
|
|
4965
4965
|
};
|
|
4966
|
-
return
|
|
4966
|
+
return p.value.forEach((e, r) => {
|
|
4967
4967
|
let i = t[r];
|
|
4968
|
-
i !== void 0 && (n[e] =
|
|
4968
|
+
i !== void 0 && (n[e] = S(e, i));
|
|
4969
4969
|
}), n;
|
|
4970
4970
|
}
|
|
4971
|
-
let
|
|
4972
|
-
"--item-h": `${
|
|
4973
|
-
"--wheel-h": `${
|
|
4974
|
-
"--wheel-pad": `${
|
|
4975
|
-
})),
|
|
4971
|
+
let D = T(!1), O = T(null), k = T(null), j = T(null), M = T(0), P = T(0), F = T(0), I = T(!1), ee = Array.from({ length: 24 }, (e, t) => t), z = Array.from({ length: 60 }, (e, t) => t), te = Array.from({ length: 60 }, (e, t) => t), ne = ss * (cs * 2 + 1), B = ss * cs, re = i(() => ({
|
|
4972
|
+
"--item-h": `${ss}px`,
|
|
4973
|
+
"--wheel-h": `${ne}px`,
|
|
4974
|
+
"--wheel-pad": `${B}px`
|
|
4975
|
+
})), V = {
|
|
4976
4976
|
hour: null,
|
|
4977
4977
|
minute: null,
|
|
4978
4978
|
second: null
|
|
4979
|
-
},
|
|
4979
|
+
}, H = {
|
|
4980
4980
|
hour: !1,
|
|
4981
4981
|
minute: !1,
|
|
4982
4982
|
second: !1
|
|
4983
|
-
}, { floatingStyles:
|
|
4983
|
+
}, { floatingStyles: U, placement: G } = _n(k, j, {
|
|
4984
4984
|
placement: "bottom-start",
|
|
4985
4985
|
strategy: "fixed",
|
|
4986
4986
|
middleware: [
|
|
@@ -4989,77 +4989,87 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
4989
4989
|
ln({ padding: 8 })
|
|
4990
4990
|
],
|
|
4991
4991
|
whileElementsMounted: sn
|
|
4992
|
-
}),
|
|
4993
|
-
let e =
|
|
4994
|
-
return e ?
|
|
4992
|
+
}), K = i(() => G.value.startsWith("top")), q = i(() => {
|
|
4993
|
+
let e = w(String(r.modelValue));
|
|
4994
|
+
return e ? x(e) : "";
|
|
4995
4995
|
});
|
|
4996
|
-
L([() => r.modelValue,
|
|
4997
|
-
|
|
4996
|
+
L([() => r.modelValue, p], () => {
|
|
4997
|
+
ie();
|
|
4998
4998
|
}, { immediate: !0 });
|
|
4999
|
-
function
|
|
5000
|
-
let e =
|
|
5001
|
-
e ? (
|
|
4999
|
+
function ie() {
|
|
5000
|
+
let e = w(String(r.modelValue));
|
|
5001
|
+
e ? (M.value = e.hour, P.value = e.minute, F.value = e.second, I.value = !0) : (M.value = 0, P.value = 0, F.value = 0, I.value = !1);
|
|
5002
5002
|
}
|
|
5003
|
-
function
|
|
5004
|
-
return e === "hour" ?
|
|
5003
|
+
function ae(e) {
|
|
5004
|
+
return e === "hour" ? M.value : e === "minute" ? P.value : F.value;
|
|
5005
5005
|
}
|
|
5006
|
-
function
|
|
5007
|
-
e === "hour" ?
|
|
5006
|
+
function oe(e, t) {
|
|
5007
|
+
e === "hour" ? M.value = t : e === "minute" ? P.value = t : F.value = t;
|
|
5008
5008
|
}
|
|
5009
|
-
function
|
|
5010
|
-
let e =
|
|
5009
|
+
function se() {
|
|
5010
|
+
let e = j.value;
|
|
5011
5011
|
return e ? Array.from(e.querySelectorAll(".time-col[data-unit]")) : [];
|
|
5012
5012
|
}
|
|
5013
|
-
function
|
|
5014
|
-
|
|
5013
|
+
function ce() {
|
|
5014
|
+
se().forEach((e) => {
|
|
5015
5015
|
let t = e.dataset.unit;
|
|
5016
|
-
|
|
5016
|
+
H[t] = !0, e.scrollTop = ae(t) * ss;
|
|
5017
5017
|
}), requestAnimationFrame(() => {
|
|
5018
5018
|
requestAnimationFrame(() => {
|
|
5019
|
-
Object.keys(
|
|
5020
|
-
|
|
5019
|
+
Object.keys(H).forEach((e) => {
|
|
5020
|
+
H[e] = !1;
|
|
5021
5021
|
});
|
|
5022
5022
|
});
|
|
5023
5023
|
});
|
|
5024
5024
|
}
|
|
5025
|
-
function
|
|
5026
|
-
return Math.max(0, Math.min(t, Math.round(e /
|
|
5025
|
+
function le(e, t) {
|
|
5026
|
+
return Math.max(0, Math.min(t, Math.round(e / ss)));
|
|
5027
5027
|
}
|
|
5028
|
-
function
|
|
5028
|
+
function ue(e, t) {
|
|
5029
5029
|
if (!e.isConnected) return;
|
|
5030
|
-
let n =
|
|
5031
|
-
|
|
5032
|
-
top: n *
|
|
5030
|
+
let n = le(e.scrollTop, m(t));
|
|
5031
|
+
H[t] = !0, e.scrollTo({
|
|
5032
|
+
top: n * ss,
|
|
5033
5033
|
behavior: "smooth"
|
|
5034
|
-
}),
|
|
5034
|
+
}), ae(t) !== n && oe(t, n);
|
|
5035
5035
|
let r = () => {
|
|
5036
|
-
|
|
5036
|
+
H[t] = !1, e.removeEventListener("scrollend", r);
|
|
5037
5037
|
};
|
|
5038
5038
|
e.addEventListener("scrollend", r, { once: !0 }), window.setTimeout(r, 400);
|
|
5039
5039
|
}
|
|
5040
|
-
function
|
|
5040
|
+
function de(e) {
|
|
5041
5041
|
let t = e.currentTarget, n = t.dataset.unit;
|
|
5042
|
-
if (
|
|
5043
|
-
|
|
5044
|
-
let r =
|
|
5045
|
-
|
|
5042
|
+
if (H[n]) return;
|
|
5043
|
+
I.value = !0;
|
|
5044
|
+
let r = le(t.scrollTop, m(n));
|
|
5045
|
+
ae(n) !== r && oe(n, r), V[n] && clearTimeout(V[n]), V[n] = setTimeout(() => {
|
|
5046
|
+
ue(t, n), fe();
|
|
5047
|
+
}, 120);
|
|
5048
|
+
}
|
|
5049
|
+
function fe() {
|
|
5050
|
+
let e = x({
|
|
5051
|
+
hour: M.value,
|
|
5052
|
+
minute: P.value,
|
|
5053
|
+
second: F.value
|
|
5054
|
+
});
|
|
5055
|
+
u("update:modelValue", e), u("change", e);
|
|
5046
5056
|
}
|
|
5047
5057
|
function pe(e, t) {
|
|
5048
|
-
|
|
5058
|
+
V[e] && (clearTimeout(V[e]), V[e] = null), I.value = !0, oe(e, S(e, t)), fe(), g(ce);
|
|
5049
5059
|
}
|
|
5050
5060
|
function me(e, t) {
|
|
5051
|
-
return
|
|
5061
|
+
return I.value ? e === "hour" ? M.value === t : e === "minute" ? P.value === t : F.value === t : !1;
|
|
5052
5062
|
}
|
|
5053
5063
|
let he = i(() => {
|
|
5054
5064
|
let e = [];
|
|
5055
5065
|
return r.hour && e.push({
|
|
5056
5066
|
unit: "hour",
|
|
5057
5067
|
label: "時",
|
|
5058
|
-
values:
|
|
5068
|
+
values: ee
|
|
5059
5069
|
}), r.minute && e.push({
|
|
5060
5070
|
unit: "minute",
|
|
5061
5071
|
label: "分",
|
|
5062
|
-
values:
|
|
5072
|
+
values: z
|
|
5063
5073
|
}), r.second && e.push({
|
|
5064
5074
|
unit: "second",
|
|
5065
5075
|
label: "秒",
|
|
@@ -5072,51 +5082,46 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5072
5082
|
"minute",
|
|
5073
5083
|
"second"
|
|
5074
5084
|
].forEach((e) => {
|
|
5075
|
-
|
|
5085
|
+
V[e] && (clearTimeout(V[e]), V[e] = null);
|
|
5076
5086
|
});
|
|
5077
5087
|
}
|
|
5078
5088
|
function _e() {
|
|
5079
|
-
|
|
5080
|
-
hour: P.value,
|
|
5081
|
-
minute: F.value,
|
|
5082
|
-
second: I.value
|
|
5083
|
-
});
|
|
5084
|
-
u("update:modelValue", e), u("change", e);
|
|
5089
|
+
r.disabled || (D.value || ie(), D.value = !D.value);
|
|
5085
5090
|
}
|
|
5086
5091
|
function ve() {
|
|
5087
|
-
|
|
5088
|
-
}
|
|
5089
|
-
function ye() {
|
|
5090
|
-
z.value = !0, ge(), _e(), O.value = !1;
|
|
5091
|
-
}
|
|
5092
|
-
function be() {
|
|
5093
|
-
ge(), O.value = !1;
|
|
5092
|
+
ge(), D.value = !1;
|
|
5094
5093
|
}
|
|
5095
|
-
let
|
|
5094
|
+
let ye = (e) => {
|
|
5096
5095
|
let t = e.target;
|
|
5097
|
-
|
|
5098
|
-
},
|
|
5099
|
-
e.stopPropagation(), ge(),
|
|
5096
|
+
O.value?.contains(t) || j.value?.contains(t) || ve();
|
|
5097
|
+
}, be = (e) => {
|
|
5098
|
+
e.stopPropagation(), ge(), M.value = 0, P.value = 0, F.value = 0, I.value = !1, u("update:modelValue", ""), u("change", ""), u("clear");
|
|
5100
5099
|
};
|
|
5101
5100
|
return b(() => {
|
|
5102
|
-
document.addEventListener("mousedown",
|
|
5101
|
+
document.addEventListener("mousedown", ye);
|
|
5103
5102
|
}), y(() => {
|
|
5104
|
-
document.removeEventListener("mousedown",
|
|
5103
|
+
document.removeEventListener("mousedown", ye), ge();
|
|
5105
5104
|
}), (i, l) => (C(), s("div", {
|
|
5106
5105
|
ref_key: "containerRef",
|
|
5107
|
-
ref:
|
|
5106
|
+
ref: O,
|
|
5108
5107
|
class: _(["timepicker", `size-${r.size}`])
|
|
5109
5108
|
}, [r.title ? (C(), s("label", ts, A(r.title), 1)) : o("", !0), c("div", { class: _(["time-picker", {
|
|
5110
|
-
open:
|
|
5109
|
+
open: D.value,
|
|
5111
5110
|
disabled: r.disabled
|
|
5112
5111
|
}]) }, [c("div", {
|
|
5113
5112
|
ref_key: "triggerRef",
|
|
5114
|
-
ref:
|
|
5113
|
+
ref: k,
|
|
5115
5114
|
class: "picker-trigger",
|
|
5116
|
-
onClick:
|
|
5117
|
-
}, [
|
|
5118
|
-
|
|
5119
|
-
|
|
5115
|
+
onClick: _e
|
|
5116
|
+
}, [c("span", { class: _(["text", { placeholder: !q.value }]) }, A(q.value || r.placeholder), 3), r.clearable && q.value ? (C(), a(W, {
|
|
5117
|
+
key: 0,
|
|
5118
|
+
variant: "none",
|
|
5119
|
+
square: "",
|
|
5120
|
+
class: "clear",
|
|
5121
|
+
size: "sm",
|
|
5122
|
+
onClick: be
|
|
5123
|
+
}, {
|
|
5124
|
+
default: R(() => [...l[0] ||= [c("svg", {
|
|
5120
5125
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5121
5126
|
width: "16",
|
|
5122
5127
|
height: "16",
|
|
@@ -5126,43 +5131,18 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5126
5131
|
"stroke-width": "2",
|
|
5127
5132
|
"stroke-linecap": "round",
|
|
5128
5133
|
"stroke-linejoin": "round"
|
|
5129
|
-
}, [c("
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
r: "10"
|
|
5133
|
-
}), c("polyline", { points: "12 6 12 12 16 14" })], -1),
|
|
5134
|
-
c("span", { class: _(["text", { placeholder: !q.value }]) }, A(q.value || r.placeholder), 3),
|
|
5135
|
-
r.clearable && q.value ? (C(), a(W, {
|
|
5136
|
-
key: 0,
|
|
5137
|
-
variant: "none",
|
|
5138
|
-
square: "",
|
|
5139
|
-
class: "clear",
|
|
5140
|
-
size: "sm",
|
|
5141
|
-
onClick: Se
|
|
5142
|
-
}, {
|
|
5143
|
-
default: R(() => [...l[0] ||= [c("svg", {
|
|
5144
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5145
|
-
width: "16",
|
|
5146
|
-
height: "16",
|
|
5147
|
-
viewBox: "0 0 24 24",
|
|
5148
|
-
fill: "none",
|
|
5149
|
-
stroke: "currentColor",
|
|
5150
|
-
"stroke-width": "2",
|
|
5151
|
-
"stroke-linecap": "round",
|
|
5152
|
-
"stroke-linejoin": "round"
|
|
5153
|
-
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]]),
|
|
5154
|
-
_: 1
|
|
5155
|
-
})) : o("", !0)
|
|
5156
|
-
], 512), (C(), a(t, { to: "body" }, [f(n, {
|
|
5134
|
+
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]]),
|
|
5135
|
+
_: 1
|
|
5136
|
+
})) : o("", !0)], 512), (C(), a(t, { to: "body" }, [f(n, {
|
|
5157
5137
|
name: "dropdown-pop",
|
|
5158
|
-
onAfterEnter:
|
|
5138
|
+
onAfterEnter: ce
|
|
5159
5139
|
}, {
|
|
5160
|
-
default: R(() => [
|
|
5140
|
+
default: R(() => [D.value && d.value ? (C(), s("div", {
|
|
5161
5141
|
key: 0,
|
|
5162
5142
|
ref_key: "dropdownRef",
|
|
5163
|
-
ref:
|
|
5164
|
-
class: _(["picker-dropdown", { "is-flipped":
|
|
5165
|
-
style: v(N(
|
|
5143
|
+
ref: j,
|
|
5144
|
+
class: _(["picker-dropdown", { "is-flipped": K.value }]),
|
|
5145
|
+
style: v(N(U))
|
|
5166
5146
|
}, [c("div", ns, [c("div", {
|
|
5167
5147
|
class: "time-wheels",
|
|
5168
5148
|
style: v(re.value)
|
|
@@ -5172,27 +5152,18 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5172
5152
|
}, [c("div", rs, A(t.label), 1), c("div", is, [c("div", {
|
|
5173
5153
|
class: "time-col",
|
|
5174
5154
|
"data-unit": t.unit,
|
|
5175
|
-
onScrollPassive:
|
|
5155
|
+
onScrollPassive: de
|
|
5176
5156
|
}, [(C(!0), s(e, null, E(t.values, (e) => (C(), s("button", {
|
|
5177
5157
|
key: e,
|
|
5178
5158
|
type: "button",
|
|
5179
5159
|
class: _(["time-item", { "is-active": me(t.unit, e) }]),
|
|
5180
5160
|
"data-val": e,
|
|
5181
5161
|
onClick: (n) => pe(t.unit, e)
|
|
5182
|
-
}, A(
|
|
5183
|
-
variant: "solid",
|
|
5184
|
-
intent: "primary",
|
|
5185
|
-
size: "sm",
|
|
5186
|
-
class: "confirm-btn",
|
|
5187
|
-
onClick: ye
|
|
5188
|
-
}, {
|
|
5189
|
-
default: R(() => [...l[3] ||= [d(" 確定 ", -1)]]),
|
|
5190
|
-
_: 1
|
|
5191
|
-
})])])], 6)) : o("", !0)]),
|
|
5162
|
+
}, A(h(e)), 11, os))), 128))], 40, as)])]))), 128)), l[1] ||= c("div", { class: "wheel-selection" }, null, -1)], 4)])], 6)) : o("", !0)]),
|
|
5192
5163
|
_: 1
|
|
5193
5164
|
})]))], 2)], 2));
|
|
5194
5165
|
}
|
|
5195
|
-
}), [["__scopeId", "data-v-
|
|
5166
|
+
}), [["__scopeId", "data-v-b40844fb"]]), us = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
5196
5167
|
__name: "NTooltip",
|
|
5197
5168
|
props: {
|
|
5198
5169
|
content: { default: "" },
|
|
@@ -5227,10 +5198,10 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5227
5198
|
_: 3
|
|
5228
5199
|
})], 32));
|
|
5229
5200
|
}
|
|
5230
|
-
}), [["__scopeId", "data-v-7a53ca0a"]]),
|
|
5201
|
+
}), [["__scopeId", "data-v-7a53ca0a"]]), ds = { class: "modal-header" }, fs = { class: "modal-title" }, ps = { class: "modal-content" }, ms = {
|
|
5231
5202
|
key: 0,
|
|
5232
5203
|
class: "modal-footer"
|
|
5233
|
-
},
|
|
5204
|
+
}, hs = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
5234
5205
|
__name: "NModal",
|
|
5235
5206
|
props: {
|
|
5236
5207
|
show: {
|
|
@@ -5269,12 +5240,12 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5269
5240
|
key: 0,
|
|
5270
5241
|
class: "modal-overlay",
|
|
5271
5242
|
style: v({ zIndex: e.zIndex }),
|
|
5272
|
-
onClick:
|
|
5243
|
+
onClick: z(u, ["self"])
|
|
5273
5244
|
}, [c("div", {
|
|
5274
5245
|
class: "modal-container",
|
|
5275
5246
|
style: v({ width: e.width })
|
|
5276
5247
|
}, [
|
|
5277
|
-
c("header",
|
|
5248
|
+
c("header", ds, [c("h3", fs, A(e.title), 1), e.showClose ? (C(), s("button", {
|
|
5278
5249
|
key: 0,
|
|
5279
5250
|
class: "close-btn",
|
|
5280
5251
|
onClick: l
|
|
@@ -5286,16 +5257,16 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5286
5257
|
fill: "currentColor",
|
|
5287
5258
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"
|
|
5288
5259
|
})], -1)]])) : o("", !0)]),
|
|
5289
|
-
c("main",
|
|
5290
|
-
r.$slots.footer ? (C(), s("footer",
|
|
5260
|
+
c("main", ps, [D(r.$slots, "default", {}, void 0, !0)]),
|
|
5261
|
+
r.$slots.footer ? (C(), s("footer", ms, [D(r.$slots, "footer", {}, void 0, !0)])) : o("", !0)
|
|
5291
5262
|
], 4)], 4)) : o("", !0)]),
|
|
5292
5263
|
_: 3
|
|
5293
5264
|
})]));
|
|
5294
5265
|
}
|
|
5295
|
-
}), [["__scopeId", "data-v-ee2fac3c"]]),
|
|
5266
|
+
}), [["__scopeId", "data-v-ee2fac3c"]]), gs = { class: "drawer-header" }, _s = { class: "drawer-title" }, vs = { class: "drawer-body" }, ys = {
|
|
5296
5267
|
key: 0,
|
|
5297
5268
|
class: "drawer-footer"
|
|
5298
|
-
},
|
|
5269
|
+
}, bs = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
5299
5270
|
__name: "NDrawer",
|
|
5300
5271
|
props: {
|
|
5301
5272
|
show: {
|
|
@@ -5335,12 +5306,12 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5335
5306
|
key: 0,
|
|
5336
5307
|
class: "drawer-overlay",
|
|
5337
5308
|
style: v({ zIndex: e.zIndex }),
|
|
5338
|
-
onClick:
|
|
5309
|
+
onClick: z(u, ["self"])
|
|
5339
5310
|
}, [c("div", {
|
|
5340
5311
|
class: _(["drawer-container", [`placement-${e.placement}`]]),
|
|
5341
5312
|
style: v({ width: e.width })
|
|
5342
5313
|
}, [
|
|
5343
|
-
c("header",
|
|
5314
|
+
c("header", gs, [c("h3", _s, [D(r.$slots, "title", {}, () => [d(A(e.title), 1)], !0)]), e.showClose ? (C(), s("button", {
|
|
5344
5315
|
key: 0,
|
|
5345
5316
|
class: "close-btn",
|
|
5346
5317
|
onClick: l
|
|
@@ -5352,16 +5323,16 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5352
5323
|
fill: "currentColor",
|
|
5353
5324
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"
|
|
5354
5325
|
})], -1)]])) : o("", !0)]),
|
|
5355
|
-
c("main",
|
|
5356
|
-
r.$slots.footer ? (C(), s("footer",
|
|
5326
|
+
c("main", vs, [D(r.$slots, "default", {}, void 0, !0)]),
|
|
5327
|
+
r.$slots.footer ? (C(), s("footer", ys, [D(r.$slots, "footer", {}, void 0, !0)])) : o("", !0)
|
|
5357
5328
|
], 6)], 4)) : o("", !0)]),
|
|
5358
5329
|
_: 3
|
|
5359
5330
|
})]));
|
|
5360
5331
|
}
|
|
5361
|
-
}), [["__scopeId", "data-v-f8c0a0bb"]]),
|
|
5332
|
+
}), [["__scopeId", "data-v-f8c0a0bb"]]), xs = { class: "cards-wrapper" }, Ss = ["innerHTML"], Cs = { class: "card-body" }, ws = {
|
|
5362
5333
|
key: 0,
|
|
5363
5334
|
class: "card-title"
|
|
5364
|
-
},
|
|
5335
|
+
}, Ts = { class: "card-message" }, Es = { class: "card-footer" }, Ds = ["onClick"], Os = ["onClick"], ks = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
5365
5336
|
__name: "NAlert",
|
|
5366
5337
|
setup(n) {
|
|
5367
5338
|
let { alerts: r, clearAlerts: i } = ci(), l = {
|
|
@@ -5401,7 +5372,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5401
5372
|
}
|
|
5402
5373
|
return b(() => document.addEventListener("keydown", m)), S(() => {
|
|
5403
5374
|
document.removeEventListener("keydown", m), i();
|
|
5404
|
-
}), (n, i) => (C(), a(t, { to: "body" }, [c("div", { class: _(["backdrop", { open: N(r).length > 0 }]) }, null, 2), c("div", { class: _(["alert-stack", { open: N(r).length > 0 }]) }, [c("div",
|
|
5375
|
+
}), (n, i) => (C(), a(t, { to: "body" }, [c("div", { class: _(["backdrop", { open: N(r).length > 0 }]) }, null, 2), c("div", { class: _(["alert-stack", { open: N(r).length > 0 }]) }, [c("div", xs, [(C(!0), s(e, null, E(N(r), (e, t) => (C(), s("div", {
|
|
5405
5376
|
key: e.id,
|
|
5406
5377
|
class: _(["alert-card", `status-${e.status}`]),
|
|
5407
5378
|
style: v(d(t))
|
|
@@ -5409,22 +5380,22 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5409
5380
|
c("div", {
|
|
5410
5381
|
class: "card-icon",
|
|
5411
5382
|
innerHTML: u(e)
|
|
5412
|
-
}, null, 8,
|
|
5413
|
-
c("div",
|
|
5414
|
-
c("div",
|
|
5383
|
+
}, null, 8, Ss),
|
|
5384
|
+
c("div", Cs, [e.title ? (C(), s("p", ws, A(e.title), 1)) : o("", !0), c("p", Ts, A(e.message), 1)]),
|
|
5385
|
+
c("div", Es, [e.type === "confirm" ? (C(), s("button", {
|
|
5415
5386
|
key: 0,
|
|
5416
5387
|
class: "btn btn-cancel",
|
|
5417
5388
|
onClick: (t) => p(e)
|
|
5418
|
-
}, A(e.cancelText), 9,
|
|
5389
|
+
}, A(e.cancelText), 9, Ds)) : o("", !0), c("button", {
|
|
5419
5390
|
class: _(["btn btn-confirm", `btn-${e.status}`]),
|
|
5420
5391
|
onClick: (t) => f(e)
|
|
5421
|
-
}, A(e.confirmText), 11,
|
|
5392
|
+
}, A(e.confirmText), 11, Os)])
|
|
5422
5393
|
], 6))), 128))])], 2)]));
|
|
5423
5394
|
}
|
|
5424
|
-
}), [["__scopeId", "data-v-08d5a71b"]]),
|
|
5395
|
+
}), [["__scopeId", "data-v-08d5a71b"]]), As = { class: "vtable-hscroll" }, js = { class: "vtable-htable" }, Ms = ["onClick"], Ns = { class: "th-content" }, Ps = {
|
|
5425
5396
|
key: 0,
|
|
5426
5397
|
class: "sort-icon"
|
|
5427
|
-
},
|
|
5398
|
+
}, Fs = {
|
|
5428
5399
|
key: 0,
|
|
5429
5400
|
viewBox: "0 0 24 24",
|
|
5430
5401
|
fill: "none",
|
|
@@ -5432,7 +5403,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5432
5403
|
"stroke-width": "2",
|
|
5433
5404
|
"stroke-linecap": "round",
|
|
5434
5405
|
"stroke-linejoin": "round"
|
|
5435
|
-
},
|
|
5406
|
+
}, Is = {
|
|
5436
5407
|
key: 1,
|
|
5437
5408
|
viewBox: "0 0 24 24",
|
|
5438
5409
|
fill: "none",
|
|
@@ -5440,7 +5411,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5440
5411
|
"stroke-width": "2",
|
|
5441
5412
|
"stroke-linecap": "round",
|
|
5442
5413
|
"stroke-linejoin": "round"
|
|
5443
|
-
},
|
|
5414
|
+
}, Ls = {
|
|
5444
5415
|
key: 2,
|
|
5445
5416
|
viewBox: "0 0 24 24",
|
|
5446
5417
|
fill: "none",
|
|
@@ -5448,13 +5419,13 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5448
5419
|
"stroke-width": "2",
|
|
5449
5420
|
"stroke-linecap": "round",
|
|
5450
5421
|
"stroke-linejoin": "round"
|
|
5451
|
-
},
|
|
5422
|
+
}, Rs = {
|
|
5452
5423
|
key: 0,
|
|
5453
5424
|
class: "vtable-th actions"
|
|
5454
|
-
},
|
|
5425
|
+
}, zs = ["onClick"], Bs = {
|
|
5455
5426
|
key: 0,
|
|
5456
5427
|
class: "actions"
|
|
5457
|
-
},
|
|
5428
|
+
}, Vs = "120px", Hs = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
5458
5429
|
__name: "NVirtualTable",
|
|
5459
5430
|
props: {
|
|
5460
5431
|
columns: { default: () => [] },
|
|
@@ -5486,7 +5457,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5486
5457
|
order: null
|
|
5487
5458
|
}), p = i(() => !!a.actions), m = (e) => {
|
|
5488
5459
|
let t = e ?? "1fr";
|
|
5489
|
-
return t.endsWith("fr") ? `minmax(${
|
|
5460
|
+
return t.endsWith("fr") ? `minmax(${Vs}, ${t})` : `minmax(${t}, ${t})`;
|
|
5490
5461
|
}, h = i(() => {
|
|
5491
5462
|
let e = t.columns.map((e) => m(e.width));
|
|
5492
5463
|
return p.value && e.push(`minmax(${t.actionsWidth}, ${t.actionsWidth})`), e.join(" ");
|
|
@@ -5498,14 +5469,14 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5498
5469
|
}))), y = i(() => g.value.getVirtualItems()), b = i(() => g.value.getTotalSize()), x = (e) => {
|
|
5499
5470
|
e.sortable && (u.value.key === e.key ? u.value.order = u.value.order === "asc" ? "desc" : "asc" : (u.value.key = e.key, u.value.order = "asc"), r("sort", { ...u.value }));
|
|
5500
5471
|
};
|
|
5501
|
-
return (n, i) => (C(), s("div", { class: _(["vtable", [{ bordered: t.bordered }, { hoverable: t.hoverable }]]) }, [c("div",
|
|
5472
|
+
return (n, i) => (C(), s("div", { class: _(["vtable", [{ bordered: t.bordered }, { hoverable: t.hoverable }]]) }, [c("div", As, [c("div", js, [c("div", {
|
|
5502
5473
|
class: "vtable-header",
|
|
5503
5474
|
style: v({ gridTemplateColumns: h.value })
|
|
5504
5475
|
}, [(C(!0), s(e, null, E(t.columns, (e) => (C(), s("div", {
|
|
5505
5476
|
key: e.key,
|
|
5506
5477
|
class: _(["vtable-th", { sortable: e.sortable }]),
|
|
5507
5478
|
onClick: (t) => x(e)
|
|
5508
|
-
}, [c("span",
|
|
5479
|
+
}, [c("span", Ns, [d(A(e.label) + " ", 1), e.sortable ? (C(), s("span", Ps, [u.value.key !== e.key || u.value.order === null ? (C(), s("svg", Fs, [...i[0] ||= [c("path", { d: "M8 9l4-4 4 4" }, null, -1), c("path", { d: "M16 15l-4 4-4-4" }, null, -1)]])) : u.value.order === "asc" ? (C(), s("svg", Is, [...i[1] ||= [c("path", { d: "M8 15l4-6 4 6" }, null, -1)]])) : (C(), s("svg", Ls, [...i[2] ||= [c("path", { d: "M8 9l4 6 4-6" }, null, -1)]]))])) : o("", !0)])], 10, Ms))), 128)), p.value ? (C(), s("div", Rs, [D(n.$slots, "actions-header", {}, () => [i[3] ||= d("操作", -1)], !0)])) : o("", !0)], 4), f(fa, {
|
|
5509
5480
|
loading: t.loading,
|
|
5510
5481
|
overlay: ""
|
|
5511
5482
|
}, {
|
|
@@ -5532,10 +5503,10 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5532
5503
|
index: e.index,
|
|
5533
5504
|
item: t.items[e.index],
|
|
5534
5505
|
columns: t.columns
|
|
5535
|
-
}, void 0, !0), p.value ? (C(), s("div",
|
|
5506
|
+
}, void 0, !0), p.value ? (C(), s("div", Bs, [D(n.$slots, "actions", {
|
|
5536
5507
|
index: e.index,
|
|
5537
5508
|
item: t.items[e.index]
|
|
5538
|
-
}, void 0, !0)])) : o("", !0)], 12,
|
|
5509
|
+
}, void 0, !0)])) : o("", !0)], 12, zs))), 128))], 4)) : o("", !0)], 4)) : o("", !0)]),
|
|
5539
5510
|
_: 3
|
|
5540
5511
|
}, 8, ["loading"])])]), !t.loading && t.items.length === 0 ? D(n.$slots, "empty", { key: 0 }, () => [f(ta, {
|
|
5541
5512
|
title: t.emptyTitle,
|
|
@@ -5545,7 +5516,7 @@ var ja = { class: "icon-wrap" }, Ma = ["innerHTML"], Na = {
|
|
|
5545
5516
|
}), [["__scopeId", "data-v-c7d6a7e3"]]);
|
|
5546
5517
|
//#endregion
|
|
5547
5518
|
//#region src/composables/useDisclosure.ts
|
|
5548
|
-
function
|
|
5519
|
+
function Us() {
|
|
5549
5520
|
let e = T(!1);
|
|
5550
5521
|
function t() {
|
|
5551
5522
|
e.value = !0;
|
|
@@ -5561,11 +5532,11 @@ function Ws() {
|
|
|
5561
5532
|
}
|
|
5562
5533
|
//#endregion
|
|
5563
5534
|
//#region src/composables/useMediaSelect.ts
|
|
5564
|
-
var
|
|
5535
|
+
var Ws = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 1024).toFixed(0) + " KB" : e < 1073741824 ? (e / 1048576).toFixed(1) + " MB" : (e / 1073741824).toFixed(2) + " GB", Gs = (e, t = "floor") => {
|
|
5565
5536
|
if (e == null || isNaN(e)) return "0:00";
|
|
5566
5537
|
let n = t === "round" ? Math.round(e) : Math.floor(e), r = Math.floor(n / 60), i = n % 60;
|
|
5567
5538
|
return r + ":" + (i < 10 ? "0" : "") + i;
|
|
5568
|
-
},
|
|
5539
|
+
}, Ks = (e) => e.width && e.height ? e.width + "×" + e.height : "—", qs = (e, t) => {
|
|
5569
5540
|
if (e.name) return e.name;
|
|
5570
5541
|
try {
|
|
5571
5542
|
let n = new URL(e.url, window.location.href).pathname;
|
|
@@ -5573,17 +5544,17 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5573
5544
|
} catch {
|
|
5574
5545
|
return t;
|
|
5575
5546
|
}
|
|
5576
|
-
},
|
|
5547
|
+
}, Js = (e) => {
|
|
5577
5548
|
e?.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
5578
|
-
},
|
|
5549
|
+
}, Ys = (e) => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : e + Math.random().toString(36).slice(2, 9), Xs = (e, t, n) => {
|
|
5579
5550
|
let r = t.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
5580
5551
|
if (r.length === 0) return e.type.startsWith(n);
|
|
5581
5552
|
let i = e.type.toLowerCase(), a = e.name.toLowerCase();
|
|
5582
5553
|
return r.some((e) => e.startsWith(".") ? a.endsWith(e) : e.endsWith("/*") ? i.startsWith(e.slice(0, -1)) : i === e);
|
|
5583
|
-
},
|
|
5554
|
+
}, Zs = (e, t) => {
|
|
5584
5555
|
let n = [], r = !1;
|
|
5585
5556
|
return Array.prototype.forEach.call(e, (e) => {
|
|
5586
|
-
if (!
|
|
5557
|
+
if (!Xs(e, t.accept, t.fallbackTypePrefix)) {
|
|
5587
5558
|
t.onError({
|
|
5588
5559
|
type: "type",
|
|
5589
5560
|
file: e
|
|
@@ -5606,7 +5577,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5606
5577
|
}
|
|
5607
5578
|
n.push(e);
|
|
5608
5579
|
}), n;
|
|
5609
|
-
},
|
|
5580
|
+
}, Qs = (e) => {
|
|
5610
5581
|
let t = T(!1), n = async () => {
|
|
5611
5582
|
if (!e.isBlocked()) if (e.multiple()) {
|
|
5612
5583
|
let t = await ai.input.custom(e.accept(), !0);
|
|
@@ -5637,7 +5608,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5637
5608
|
},
|
|
5638
5609
|
openFileDialog: n
|
|
5639
5610
|
};
|
|
5640
|
-
},
|
|
5611
|
+
}, $s = (e, t) => {
|
|
5641
5612
|
let n = "", r = (e) => {
|
|
5642
5613
|
e.key === "Escape" && t();
|
|
5643
5614
|
};
|
|
@@ -5646,26 +5617,26 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5646
5617
|
}), y(() => {
|
|
5647
5618
|
e.value && (document.body.style.overflow = n), document.removeEventListener("keydown", r);
|
|
5648
5619
|
});
|
|
5649
|
-
},
|
|
5620
|
+
}, ec = {
|
|
5650
5621
|
key: 0,
|
|
5651
5622
|
class: "head"
|
|
5652
|
-
},
|
|
5623
|
+
}, tc = ["textContent"], nc = {
|
|
5653
5624
|
key: 1,
|
|
5654
5625
|
class: "count-chip"
|
|
5655
|
-
},
|
|
5626
|
+
}, rc = { class: "grid" }, ic = {
|
|
5656
5627
|
key: 0,
|
|
5657
5628
|
class: "icon",
|
|
5658
5629
|
"aria-hidden": "true"
|
|
5659
|
-
},
|
|
5630
|
+
}, ac = ["textContent"], oc = ["textContent"], sc = ["onClick"], cc = ["src"], lc = {
|
|
5660
5631
|
key: 1,
|
|
5661
5632
|
class: "placeholder-label"
|
|
5662
|
-
},
|
|
5633
|
+
}, uc = { class: "duration" }, dc = { class: "card-body" }, fc = ["title"], pc = { class: "file-meta" }, mc = { key: 0 }, hc = {
|
|
5663
5634
|
key: 1,
|
|
5664
5635
|
class: "dot-separator"
|
|
5665
|
-
},
|
|
5636
|
+
}, gc = { key: 2 }, _c = { class: "card-actions" }, vc = ["onClick"], yc = ["disabled", "onClick"], bc = { class: "vi-modal-card" }, xc = { class: "vi-modal-media" }, Sc = ["src"], Cc = {
|
|
5666
5637
|
key: 1,
|
|
5667
5638
|
class: "vi-modal-placeholder"
|
|
5668
|
-
},
|
|
5639
|
+
}, wc = { class: "vi-modal-bar" }, Tc = { class: "vi-modal-info" }, Ec = { class: "modal-name" }, Dc = { class: "modal-meta" }, Oc = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
5669
5640
|
__name: "NVideoSelect",
|
|
5670
5641
|
props: {
|
|
5671
5642
|
modelValue: { default: () => [] },
|
|
@@ -5703,7 +5674,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5703
5674
|
"error"
|
|
5704
5675
|
],
|
|
5705
5676
|
setup(r, { emit: l }) {
|
|
5706
|
-
let u = l, p = T(null), [m, g, v] =
|
|
5677
|
+
let u = l, p = T(null), [m, g, v] = Us(), { confirm: b } = ci(), x = !1, S = i(() => r.modelValue.length), w = (e) => Gs(e, "round"), D = (e) => qs(e, "影片"), O = (e) => {
|
|
5707
5678
|
if (!e.url) return;
|
|
5708
5679
|
let t = document.createElement("video");
|
|
5709
5680
|
t.preload = "metadata";
|
|
@@ -5728,13 +5699,13 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5728
5699
|
!e.url || k.has(e.id) || (k.add(e.id), (e.duration == null || e.width == null) && O(e));
|
|
5729
5700
|
});
|
|
5730
5701
|
}, { immediate: !0 });
|
|
5731
|
-
let { isDragging: j, dropZoneHandlers: M } =
|
|
5702
|
+
let { isDragging: j, dropZoneHandlers: M } = Qs({
|
|
5732
5703
|
isBlocked: () => r.disabled || r.readonly,
|
|
5733
5704
|
accept: () => r.accept,
|
|
5734
5705
|
multiple: () => r.multiple,
|
|
5735
5706
|
onFiles: (e) => {
|
|
5736
5707
|
if (r.disabled || r.readonly) return;
|
|
5737
|
-
let t =
|
|
5708
|
+
let t = Zs(e, {
|
|
5738
5709
|
accept: r.accept,
|
|
5739
5710
|
fallbackTypePrefix: "video/",
|
|
5740
5711
|
maxSize: r.maxSize,
|
|
@@ -5743,7 +5714,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5743
5714
|
});
|
|
5744
5715
|
if (t.length === 0) return;
|
|
5745
5716
|
let n = t.map((e) => ({
|
|
5746
|
-
id:
|
|
5717
|
+
id: Ys("v"),
|
|
5747
5718
|
file: e,
|
|
5748
5719
|
name: e.name,
|
|
5749
5720
|
size: e.size,
|
|
@@ -5765,40 +5736,40 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5765
5736
|
confirmText: "移除",
|
|
5766
5737
|
cancelText: "取消"
|
|
5767
5738
|
})) return;
|
|
5768
|
-
|
|
5739
|
+
Js(t.url), k.delete(e);
|
|
5769
5740
|
let n = r.modelValue.filter((t) => t.id !== e);
|
|
5770
5741
|
u("update:modelValue", n), u("change", n), u("remove", t);
|
|
5771
5742
|
}, F = (e) => {
|
|
5772
5743
|
p.value = e, g();
|
|
5773
5744
|
}, I = () => {
|
|
5774
5745
|
v();
|
|
5775
|
-
},
|
|
5746
|
+
}, ee = i(() => {
|
|
5776
5747
|
let e = p.value;
|
|
5777
5748
|
return e ? [
|
|
5778
|
-
e.size == null ? null :
|
|
5779
|
-
e.width && e.height ?
|
|
5749
|
+
e.size == null ? null : Ws(e.size),
|
|
5750
|
+
e.width && e.height ? Ks(e) : null,
|
|
5780
5751
|
w(e.duration)
|
|
5781
5752
|
].filter(Boolean).join(" · ") : "";
|
|
5782
5753
|
});
|
|
5783
|
-
return
|
|
5784
|
-
x = !0, r.autoRevoke && r.modelValue.forEach((e) =>
|
|
5754
|
+
return $s(m, I), y(() => {
|
|
5755
|
+
x = !0, r.autoRevoke && r.modelValue.forEach((e) => Js(e.url));
|
|
5785
5756
|
}), (i, l) => (C(), s("div", { class: _(["video-input", {
|
|
5786
5757
|
"is-disabled": r.disabled,
|
|
5787
5758
|
"is-readonly": r.readonly
|
|
5788
5759
|
}]) }, [
|
|
5789
|
-
r.title || r.showCount ? (C(), s("div",
|
|
5760
|
+
r.title || r.showCount ? (C(), s("div", ec, [r.title ? (C(), s("span", {
|
|
5790
5761
|
key: 0,
|
|
5791
5762
|
class: "title",
|
|
5792
5763
|
textContent: A(r.title)
|
|
5793
|
-
}, null, 8,
|
|
5794
|
-
c("div",
|
|
5764
|
+
}, null, 8, tc)) : o("", !0), r.showCount ? (C(), s("span", nc, A(S.value) + " 支", 1)) : o("", !0)])) : o("", !0),
|
|
5765
|
+
c("div", rc, [S.value === 0 ? (C(), s("div", h({
|
|
5795
5766
|
key: 0,
|
|
5796
5767
|
class: ["empty", {
|
|
5797
5768
|
"is-drag": N(j),
|
|
5798
5769
|
"is-static": r.readonly
|
|
5799
5770
|
}]
|
|
5800
5771
|
}, r.readonly ? {} : N(M)), [
|
|
5801
|
-
r.readonly ? o("", !0) : (C(), s("span",
|
|
5772
|
+
r.readonly ? o("", !0) : (C(), s("span", ic, [...l[0] ||= [c("svg", {
|
|
5802
5773
|
viewBox: "0 0 24 24",
|
|
5803
5774
|
fill: "none",
|
|
5804
5775
|
stroke: "currentColor",
|
|
@@ -5810,11 +5781,11 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5810
5781
|
c("path", { d: "M7 9l5-5 5 5" }),
|
|
5811
5782
|
c("path", { d: "M12 4v12" })
|
|
5812
5783
|
], -1)]])),
|
|
5813
|
-
c("h3", { textContent: A(r.readonly ? "目前沒有影片" : r.emptyTitle) }, null, 8,
|
|
5784
|
+
c("h3", { textContent: A(r.readonly ? "目前沒有影片" : r.emptyTitle) }, null, 8, ac),
|
|
5814
5785
|
r.readonly ? o("", !0) : (C(), s("p", {
|
|
5815
5786
|
key: 1,
|
|
5816
5787
|
textContent: A(r.emptyHint)
|
|
5817
|
-
}, null, 8,
|
|
5788
|
+
}, null, 8, oc))
|
|
5818
5789
|
], 16)) : (C(), s(e, { key: 1 }, [(C(!0), s(e, null, E(r.modelValue, (e) => (C(), s("div", {
|
|
5819
5790
|
key: e.id,
|
|
5820
5791
|
class: "card"
|
|
@@ -5827,7 +5798,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5827
5798
|
src: e.url + "#t=0.5",
|
|
5828
5799
|
muted: "",
|
|
5829
5800
|
preload: "metadata"
|
|
5830
|
-
}, null, 8,
|
|
5801
|
+
}, null, 8, cc)) : (C(), s("div", lc, "縮圖預覽")),
|
|
5831
5802
|
l[1] ||= c("div", {
|
|
5832
5803
|
class: "play",
|
|
5833
5804
|
"aria-hidden": "true"
|
|
@@ -5835,18 +5806,18 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5835
5806
|
viewBox: "0 0 24 24",
|
|
5836
5807
|
fill: "currentColor"
|
|
5837
5808
|
}, [c("path", { d: "M8 5v14l11-7z" })])], -1),
|
|
5838
|
-
c("div",
|
|
5839
|
-
], 10,
|
|
5809
|
+
c("div", uc, A(w(e.duration)), 1)
|
|
5810
|
+
], 10, sc), c("div", dc, [
|
|
5840
5811
|
c("div", {
|
|
5841
5812
|
class: "file-name",
|
|
5842
5813
|
title: D(e)
|
|
5843
|
-
}, A(D(e)), 9,
|
|
5844
|
-
c("div",
|
|
5845
|
-
e.size == null ? o("", !0) : (C(), s("span",
|
|
5846
|
-
e.size != null && e.width && e.height ? (C(), s("span",
|
|
5847
|
-
e.width && e.height ? (C(), s("span",
|
|
5814
|
+
}, A(D(e)), 9, fc),
|
|
5815
|
+
c("div", pc, [
|
|
5816
|
+
e.size == null ? o("", !0) : (C(), s("span", mc, A(N(Ws)(e.size)), 1)),
|
|
5817
|
+
e.size != null && e.width && e.height ? (C(), s("span", hc)) : o("", !0),
|
|
5818
|
+
e.width && e.height ? (C(), s("span", gc, A(N(Ks)(e)), 1)) : o("", !0)
|
|
5848
5819
|
]),
|
|
5849
|
-
c("div",
|
|
5820
|
+
c("div", _c, [c("button", {
|
|
5850
5821
|
class: "action preview",
|
|
5851
5822
|
onClick: (t) => F(e),
|
|
5852
5823
|
type: "button"
|
|
@@ -5861,12 +5832,12 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5861
5832
|
cx: "12",
|
|
5862
5833
|
cy: "12",
|
|
5863
5834
|
r: "3"
|
|
5864
|
-
})], -1), d(" 預覽 ", -1)]], 8,
|
|
5835
|
+
})], -1), d(" 預覽 ", -1)]], 8, vc), r.readonly ? o("", !0) : (C(), s("button", {
|
|
5865
5836
|
key: 0,
|
|
5866
5837
|
class: "action delete",
|
|
5867
5838
|
"aria-label": "刪除",
|
|
5868
5839
|
disabled: r.disabled,
|
|
5869
|
-
onClick:
|
|
5840
|
+
onClick: z((t) => P(e.id), ["stop"]),
|
|
5870
5841
|
type: "button"
|
|
5871
5842
|
}, [...l[3] ||= [c("svg", {
|
|
5872
5843
|
viewBox: "0 0 24 24",
|
|
@@ -5875,7 +5846,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5875
5846
|
"stroke-width": "2",
|
|
5876
5847
|
"stroke-linecap": "round",
|
|
5877
5848
|
"stroke-linejoin": "round"
|
|
5878
|
-
}, [c("path", { d: "M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }), c("path", { d: "M10 11v6M14 11v6" })], -1)]], 8,
|
|
5849
|
+
}, [c("path", { d: "M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }), c("path", { d: "M10 11v6M14 11v6" })], -1)]], 8, yc))])
|
|
5879
5850
|
])]))), 128)), r.multiple && !r.readonly ? (C(), s("div", h({
|
|
5880
5851
|
key: 0,
|
|
5881
5852
|
class: ["add-card", { "is-drag": N(j) }]
|
|
@@ -5898,8 +5869,8 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5898
5869
|
default: R(() => [N(m) ? (C(), s("div", {
|
|
5899
5870
|
key: 0,
|
|
5900
5871
|
class: "vi-modal",
|
|
5901
|
-
onClick:
|
|
5902
|
-
}, [c("div",
|
|
5872
|
+
onClick: z(I, ["self"])
|
|
5873
|
+
}, [c("div", bc, [c("div", xc, [p.value?.url ? (C(), s("video", {
|
|
5903
5874
|
key: 0,
|
|
5904
5875
|
src: p.value.url,
|
|
5905
5876
|
controls: "",
|
|
@@ -5907,7 +5878,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5907
5878
|
playsinline: "",
|
|
5908
5879
|
controlslist: "nofullscreen nodownload noremoteplayback noplaybackrate",
|
|
5909
5880
|
disablepictureinpicture: ""
|
|
5910
|
-
}, null, 8,
|
|
5881
|
+
}, null, 8, Sc)) : (C(), s("div", Cc, " 示範影片 · 上傳真實檔案即可在此播放 "))]), c("div", wc, [c("div", Tc, [c("div", Ec, A(p.value ? D(p.value) : ""), 1), c("div", Dc, A(ee.value), 1)]), c("button", {
|
|
5911
5882
|
class: "vi-modal-close",
|
|
5912
5883
|
"aria-label": "關閉",
|
|
5913
5884
|
onClick: I,
|
|
@@ -5924,26 +5895,26 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5924
5895
|
})]))
|
|
5925
5896
|
], 2));
|
|
5926
5897
|
}
|
|
5927
|
-
}), [["__scopeId", "data-v-48e045dd"]]),
|
|
5898
|
+
}), [["__scopeId", "data-v-48e045dd"]]), kc = {
|
|
5928
5899
|
key: 0,
|
|
5929
5900
|
class: "head"
|
|
5930
|
-
},
|
|
5901
|
+
}, Ac = ["textContent"], jc = {
|
|
5931
5902
|
key: 1,
|
|
5932
5903
|
class: "count-chip"
|
|
5933
|
-
},
|
|
5904
|
+
}, Mc = { class: "grid" }, Nc = {
|
|
5934
5905
|
key: 0,
|
|
5935
5906
|
class: "icon",
|
|
5936
5907
|
"aria-hidden": "true"
|
|
5937
|
-
},
|
|
5908
|
+
}, Pc = ["textContent"], Fc = ["textContent"], Ic = ["onClick"], Lc = ["src", "alt"], Rc = {
|
|
5938
5909
|
key: 1,
|
|
5939
5910
|
class: "placeholder-label"
|
|
5940
|
-
},
|
|
5911
|
+
}, zc = { class: "card-body" }, Bc = ["title"], Vc = { class: "file-meta" }, Hc = { key: 0 }, Uc = {
|
|
5941
5912
|
key: 1,
|
|
5942
5913
|
class: "dot-separator"
|
|
5943
|
-
},
|
|
5914
|
+
}, Wc = { key: 2 }, Gc = { class: "card-actions" }, Kc = ["onClick"], qc = ["disabled", "onClick"], Jc = { class: "ii-modal-card" }, Yc = { class: "ii-modal-media" }, Xc = ["src", "alt"], Zc = {
|
|
5944
5915
|
key: 1,
|
|
5945
5916
|
class: "ii-modal-ph"
|
|
5946
|
-
},
|
|
5917
|
+
}, Qc = { class: "ii-modal-bar" }, $c = { class: "ii-modal-info" }, el = { class: "modal-name" }, tl = { class: "modal-meta" }, nl = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
5947
5918
|
__name: "NImageSelect",
|
|
5948
5919
|
props: {
|
|
5949
5920
|
modelValue: { default: () => [] },
|
|
@@ -5981,7 +5952,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5981
5952
|
"error"
|
|
5982
5953
|
],
|
|
5983
5954
|
setup(r, { emit: l }) {
|
|
5984
|
-
let u = l, p = T(null), [m, g, v] =
|
|
5955
|
+
let u = l, p = T(null), [m, g, v] = Us(), { confirm: b } = ci(), x = !1, S = i(() => r.modelValue.length), w = (e) => qs(e, "圖片"), D = (e) => {
|
|
5985
5956
|
if (!e.url) return;
|
|
5986
5957
|
let t = new Image(), n = () => {
|
|
5987
5958
|
t.removeEventListener("load", i), t.removeEventListener("error", n), t.removeAttribute("src");
|
|
@@ -6003,13 +5974,13 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6003
5974
|
!e.url || O.has(e.id) || (O.add(e.id), (e.width == null || e.height == null) && D(e));
|
|
6004
5975
|
});
|
|
6005
5976
|
}, { immediate: !0 });
|
|
6006
|
-
let { isDragging: k, dropZoneHandlers: j } =
|
|
5977
|
+
let { isDragging: k, dropZoneHandlers: j } = Qs({
|
|
6007
5978
|
isBlocked: () => r.disabled || r.readonly,
|
|
6008
5979
|
accept: () => r.accept,
|
|
6009
5980
|
multiple: () => r.multiple,
|
|
6010
5981
|
onFiles: (e) => {
|
|
6011
5982
|
if (r.disabled || r.readonly) return;
|
|
6012
|
-
let t =
|
|
5983
|
+
let t = Zs(e, {
|
|
6013
5984
|
accept: r.accept,
|
|
6014
5985
|
fallbackTypePrefix: "image/",
|
|
6015
5986
|
maxSize: r.maxSize,
|
|
@@ -6018,7 +5989,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6018
5989
|
});
|
|
6019
5990
|
if (t.length === 0) return;
|
|
6020
5991
|
let n = t.map((e) => ({
|
|
6021
|
-
id:
|
|
5992
|
+
id: Ys("i"),
|
|
6022
5993
|
file: e,
|
|
6023
5994
|
name: e.name,
|
|
6024
5995
|
size: e.size,
|
|
@@ -6039,7 +6010,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6039
6010
|
confirmText: "移除",
|
|
6040
6011
|
cancelText: "取消"
|
|
6041
6012
|
})) return;
|
|
6042
|
-
|
|
6013
|
+
Js(t.url), O.delete(e);
|
|
6043
6014
|
let n = r.modelValue.filter((t) => t.id !== e);
|
|
6044
6015
|
u("update:modelValue", n), u("change", n), u("remove", t);
|
|
6045
6016
|
}, P = (e) => {
|
|
@@ -6048,27 +6019,27 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6048
6019
|
v();
|
|
6049
6020
|
}, I = i(() => {
|
|
6050
6021
|
let e = p.value;
|
|
6051
|
-
return e ? [e.size == null ? null :
|
|
6022
|
+
return e ? [e.size == null ? null : Ws(e.size), e.width && e.height ? Ks(e) : null].filter(Boolean).join(" · ") : "";
|
|
6052
6023
|
});
|
|
6053
|
-
return
|
|
6054
|
-
x = !0, r.autoRevoke && r.modelValue.forEach((e) =>
|
|
6024
|
+
return $s(m, F), y(() => {
|
|
6025
|
+
x = !0, r.autoRevoke && r.modelValue.forEach((e) => Js(e.url));
|
|
6055
6026
|
}), (i, l) => (C(), s("div", { class: _(["image-input", {
|
|
6056
6027
|
"is-disabled": r.disabled,
|
|
6057
6028
|
"is-readonly": r.readonly
|
|
6058
6029
|
}]) }, [
|
|
6059
|
-
r.title || r.showCount ? (C(), s("div",
|
|
6030
|
+
r.title || r.showCount ? (C(), s("div", kc, [r.title ? (C(), s("span", {
|
|
6060
6031
|
key: 0,
|
|
6061
6032
|
class: "title",
|
|
6062
6033
|
textContent: A(r.title)
|
|
6063
|
-
}, null, 8,
|
|
6064
|
-
c("div",
|
|
6034
|
+
}, null, 8, Ac)) : o("", !0), r.showCount ? (C(), s("span", jc, A(S.value) + " 張", 1)) : o("", !0)])) : o("", !0),
|
|
6035
|
+
c("div", Mc, [S.value === 0 ? (C(), s("div", h({
|
|
6065
6036
|
key: 0,
|
|
6066
6037
|
class: ["empty", {
|
|
6067
6038
|
"is-drag": N(k),
|
|
6068
6039
|
"is-static": r.readonly
|
|
6069
6040
|
}]
|
|
6070
6041
|
}, r.readonly ? {} : N(j)), [
|
|
6071
|
-
r.readonly ? o("", !0) : (C(), s("span",
|
|
6042
|
+
r.readonly ? o("", !0) : (C(), s("span", Nc, [...l[0] ||= [c("svg", {
|
|
6072
6043
|
viewBox: "0 0 24 24",
|
|
6073
6044
|
fill: "none",
|
|
6074
6045
|
stroke: "currentColor",
|
|
@@ -6090,11 +6061,11 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6090
6061
|
}),
|
|
6091
6062
|
c("path", { d: "M21 15l-5-5L5 21" })
|
|
6092
6063
|
], -1)]])),
|
|
6093
|
-
c("h3", { textContent: A(r.readonly ? "目前沒有圖片" : r.emptyTitle) }, null, 8,
|
|
6064
|
+
c("h3", { textContent: A(r.readonly ? "目前沒有圖片" : r.emptyTitle) }, null, 8, Pc),
|
|
6094
6065
|
r.readonly ? o("", !0) : (C(), s("p", {
|
|
6095
6066
|
key: 1,
|
|
6096
6067
|
textContent: A(r.emptyHint)
|
|
6097
|
-
}, null, 8,
|
|
6068
|
+
}, null, 8, Fc))
|
|
6098
6069
|
], 16)) : (C(), s(e, { key: 1 }, [(C(!0), s(e, null, E(r.modelValue, (e) => (C(), s("div", {
|
|
6099
6070
|
key: e.id,
|
|
6100
6071
|
class: "card"
|
|
@@ -6106,7 +6077,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6106
6077
|
src: e.url,
|
|
6107
6078
|
alt: w(e),
|
|
6108
6079
|
loading: "lazy"
|
|
6109
|
-
}, null, 8,
|
|
6080
|
+
}, null, 8, Lc)) : (C(), s("div", Rc, "縮圖預覽")), l[1] ||= c("div", {
|
|
6110
6081
|
class: "zoom",
|
|
6111
6082
|
"aria-hidden": "true"
|
|
6112
6083
|
}, [c("svg", {
|
|
@@ -6120,17 +6091,17 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6120
6091
|
cx: "11",
|
|
6121
6092
|
cy: "11",
|
|
6122
6093
|
r: "7"
|
|
6123
|
-
}), c("path", { d: "m21 21-4.3-4.3M11 8v6M8 11h6" })])], -1)], 10,
|
|
6094
|
+
}), c("path", { d: "m21 21-4.3-4.3M11 8v6M8 11h6" })])], -1)], 10, Ic), c("div", zc, [
|
|
6124
6095
|
c("div", {
|
|
6125
6096
|
class: "file-name",
|
|
6126
6097
|
title: w(e)
|
|
6127
|
-
}, A(w(e)), 9,
|
|
6128
|
-
c("div",
|
|
6129
|
-
e.size == null ? o("", !0) : (C(), s("span",
|
|
6130
|
-
e.size != null && e.width && e.height ? (C(), s("span",
|
|
6131
|
-
e.width && e.height ? (C(), s("span",
|
|
6098
|
+
}, A(w(e)), 9, Bc),
|
|
6099
|
+
c("div", Vc, [
|
|
6100
|
+
e.size == null ? o("", !0) : (C(), s("span", Hc, A(N(Ws)(e.size)), 1)),
|
|
6101
|
+
e.size != null && e.width && e.height ? (C(), s("span", Uc)) : o("", !0),
|
|
6102
|
+
e.width && e.height ? (C(), s("span", Wc, A(N(Ks)(e)), 1)) : o("", !0)
|
|
6132
6103
|
]),
|
|
6133
|
-
c("div",
|
|
6104
|
+
c("div", Gc, [c("button", {
|
|
6134
6105
|
class: "action preview",
|
|
6135
6106
|
onClick: (t) => P(e),
|
|
6136
6107
|
type: "button"
|
|
@@ -6145,12 +6116,12 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6145
6116
|
cx: "12",
|
|
6146
6117
|
cy: "12",
|
|
6147
6118
|
r: "3"
|
|
6148
|
-
})], -1), d(" 預覽 ", -1)]], 8,
|
|
6119
|
+
})], -1), d(" 預覽 ", -1)]], 8, Kc), r.readonly ? o("", !0) : (C(), s("button", {
|
|
6149
6120
|
key: 0,
|
|
6150
6121
|
class: "action delete",
|
|
6151
6122
|
"aria-label": "刪除",
|
|
6152
6123
|
disabled: r.disabled,
|
|
6153
|
-
onClick:
|
|
6124
|
+
onClick: z((t) => M(e.id), ["stop"]),
|
|
6154
6125
|
type: "button"
|
|
6155
6126
|
}, [...l[3] ||= [c("svg", {
|
|
6156
6127
|
viewBox: "0 0 24 24",
|
|
@@ -6159,7 +6130,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6159
6130
|
"stroke-width": "2",
|
|
6160
6131
|
"stroke-linecap": "round",
|
|
6161
6132
|
"stroke-linejoin": "round"
|
|
6162
|
-
}, [c("path", { d: "M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }), c("path", { d: "M10 11v6M14 11v6" })], -1)]], 8,
|
|
6133
|
+
}, [c("path", { d: "M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }), c("path", { d: "M10 11v6M14 11v6" })], -1)]], 8, qc))])
|
|
6163
6134
|
])]))), 128)), r.multiple && !r.readonly ? (C(), s("div", h({
|
|
6164
6135
|
key: 0,
|
|
6165
6136
|
class: ["add-card", { "is-drag": N(k) }]
|
|
@@ -6182,12 +6153,12 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6182
6153
|
default: R(() => [N(m) ? (C(), s("div", {
|
|
6183
6154
|
key: 0,
|
|
6184
6155
|
class: "ii-modal",
|
|
6185
|
-
onClick:
|
|
6186
|
-
}, [c("div",
|
|
6156
|
+
onClick: z(F, ["self"])
|
|
6157
|
+
}, [c("div", Jc, [c("div", Yc, [p.value?.url ? (C(), s("img", {
|
|
6187
6158
|
key: 0,
|
|
6188
6159
|
src: p.value.url,
|
|
6189
6160
|
alt: p.value ? w(p.value) : ""
|
|
6190
|
-
}, null, 8,
|
|
6161
|
+
}, null, 8, Xc)) : (C(), s("div", Zc, " 示範圖片 · 上傳真實檔案即可在此檢視 "))]), c("div", Qc, [c("div", $c, [c("div", el, A(p.value ? w(p.value) : ""), 1), c("div", tl, A(I.value), 1)]), c("button", {
|
|
6191
6162
|
class: "ii-modal-close",
|
|
6192
6163
|
"aria-label": "關閉",
|
|
6193
6164
|
onClick: F,
|
|
@@ -6204,40 +6175,40 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6204
6175
|
})]))
|
|
6205
6176
|
], 2));
|
|
6206
6177
|
}
|
|
6207
|
-
}), [["__scopeId", "data-v-68af7848"]]),
|
|
6178
|
+
}), [["__scopeId", "data-v-68af7848"]]), rl = {
|
|
6208
6179
|
key: 0,
|
|
6209
6180
|
class: "head"
|
|
6210
|
-
},
|
|
6181
|
+
}, il = ["textContent"], al = {
|
|
6211
6182
|
key: 1,
|
|
6212
6183
|
class: "count-chip"
|
|
6213
|
-
},
|
|
6184
|
+
}, ol = {
|
|
6214
6185
|
key: 0,
|
|
6215
6186
|
class: "icon",
|
|
6216
6187
|
"aria-hidden": "true"
|
|
6217
|
-
},
|
|
6188
|
+
}, sl = ["textContent"], cl = ["textContent"], ll = {
|
|
6218
6189
|
key: 2,
|
|
6219
6190
|
class: "list"
|
|
6220
|
-
},
|
|
6191
|
+
}, ul = [
|
|
6221
6192
|
"src",
|
|
6222
6193
|
"onLoadedmetadata",
|
|
6223
6194
|
"onTimeupdate",
|
|
6224
6195
|
"onEnded"
|
|
6225
|
-
],
|
|
6196
|
+
], dl = [
|
|
6226
6197
|
"aria-label",
|
|
6227
6198
|
"disabled",
|
|
6228
6199
|
"onClick"
|
|
6229
|
-
],
|
|
6200
|
+
], fl = {
|
|
6230
6201
|
key: 0,
|
|
6231
6202
|
viewBox: "0 0 24 24",
|
|
6232
6203
|
fill: "currentColor"
|
|
6233
|
-
},
|
|
6204
|
+
}, pl = {
|
|
6234
6205
|
key: 1,
|
|
6235
6206
|
viewBox: "0 0 24 24",
|
|
6236
6207
|
fill: "currentColor"
|
|
6237
|
-
},
|
|
6208
|
+
}, ml = { class: "meta" }, hl = ["title"], gl = { class: "sub" }, _l = ["onMousedown", "onTouchstart"], vl = {
|
|
6238
6209
|
key: 1,
|
|
6239
6210
|
class: "track"
|
|
6240
|
-
},
|
|
6211
|
+
}, yl = { class: "time" }, bl = ["disabled", "onClick"], xl = { class: "meta" }, Sl = { class: "name" }, Cl = 30, wl = 256, Tl = 5, El = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
6241
6212
|
__name: "NAudioSelect",
|
|
6242
6213
|
props: {
|
|
6243
6214
|
modelValue: { default: () => [] },
|
|
@@ -6288,8 +6259,8 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6288
6259
|
let e = 0;
|
|
6289
6260
|
if (r.forEach((t) => {
|
|
6290
6261
|
t.refCount <= 0 && (e += 1);
|
|
6291
|
-
}), !(e <=
|
|
6292
|
-
for (let [t, n] of r) if (!(n.refCount > 0) && (r.delete(t), --e, e <=
|
|
6262
|
+
}), !(e <= Cl)) {
|
|
6263
|
+
for (let [t, n] of r) if (!(n.refCount > 0) && (r.delete(t), --e, e <= Cl)) break;
|
|
6293
6264
|
}
|
|
6294
6265
|
}, f = (e, t) => {
|
|
6295
6266
|
if (!e) return;
|
|
@@ -6303,9 +6274,9 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6303
6274
|
n <= 0 || (n === 1 ? j.delete(e) : j.set(e, n - 1), f(e, t));
|
|
6304
6275
|
}, F = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), R = (e, t) => {
|
|
6305
6276
|
t ? F.set(e, t) : F.delete(e);
|
|
6306
|
-
},
|
|
6307
|
-
let t = await
|
|
6308
|
-
for (let e = 0; e <
|
|
6277
|
+
}, ee = i(() => t.modelValue.length), te = () => Ys("a"), ne = (e) => qs(e, "音訊"), B = null, re = () => (B ||= new (window.AudioContext || window.webkitAudioContext)(), B), V = async (e) => {
|
|
6278
|
+
let t = await re().decodeAudioData(e.slice(0)), n = t.getChannelData(0), r = Math.floor(n.length / wl) || 1, i = Array(wl), a = 0;
|
|
6279
|
+
for (let e = 0; e < wl; e++) {
|
|
6309
6280
|
let t = 0, o = e * r, s = Math.min(n.length, o + r);
|
|
6310
6281
|
for (let e = o; e < s; e++) {
|
|
6311
6282
|
let r = Math.abs(n[e]);
|
|
@@ -6314,12 +6285,12 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6314
6285
|
i[e] = t, t > a && (a = t);
|
|
6315
6286
|
}
|
|
6316
6287
|
let o = a > 0 ? 1 / a : 1;
|
|
6317
|
-
for (let e = 0; e <
|
|
6288
|
+
for (let e = 0; e < wl; e++) i[e] = Math.max(.06, i[e] * o);
|
|
6318
6289
|
return {
|
|
6319
6290
|
peaks: i,
|
|
6320
6291
|
duration: t.duration
|
|
6321
6292
|
};
|
|
6322
|
-
}, H = (e) => e.arrayBuffer().then((e) =>
|
|
6293
|
+
}, H = (e) => e.arrayBuffer().then((e) => V(e)), U = (e) => {
|
|
6323
6294
|
let t = I.get(e), n = S[e];
|
|
6324
6295
|
if (!t || !n) return;
|
|
6325
6296
|
let r = t.clientWidth;
|
|
@@ -6327,7 +6298,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6327
6298
|
W || requestAnimationFrame(() => U(e));
|
|
6328
6299
|
return;
|
|
6329
6300
|
}
|
|
6330
|
-
let i = Math.max(8, Math.min(n.length, Math.floor((r + 2) /
|
|
6301
|
+
let i = Math.max(8, Math.min(n.length, Math.floor((r + 2) / Tl)));
|
|
6331
6302
|
if (D[e] && D[e].length === i) return;
|
|
6332
6303
|
let a = Array(i);
|
|
6333
6304
|
for (let e = 0; e < i; e++) {
|
|
@@ -6347,13 +6318,13 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6347
6318
|
let n = t;
|
|
6348
6319
|
n.dataset.waveId = e, I.set(e, n), W ? W.observe(n) : U(e);
|
|
6349
6320
|
} else I.delete(e);
|
|
6350
|
-
}, { isDragging: K, dropZoneHandlers:
|
|
6321
|
+
}, { isDragging: K, dropZoneHandlers: q } = Qs({
|
|
6351
6322
|
isBlocked: () => t.disabled || t.readonly,
|
|
6352
6323
|
accept: () => t.accept,
|
|
6353
6324
|
multiple: () => t.multiple,
|
|
6354
6325
|
onFiles: (e) => {
|
|
6355
6326
|
if (t.disabled || t.readonly) return;
|
|
6356
|
-
let n =
|
|
6327
|
+
let n = Zs(e, {
|
|
6357
6328
|
accept: t.accept,
|
|
6358
6329
|
fallbackTypePrefix: "audio/",
|
|
6359
6330
|
maxSize: t.maxSize,
|
|
@@ -6361,14 +6332,14 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6361
6332
|
onError: (e) => p("error", e)
|
|
6362
6333
|
});
|
|
6363
6334
|
n.length !== 0 && n.forEach((e) => {
|
|
6364
|
-
let n = "p" +
|
|
6335
|
+
let n = "p" + te();
|
|
6365
6336
|
g.value.push({
|
|
6366
6337
|
tag: n,
|
|
6367
6338
|
name: e.name
|
|
6368
6339
|
}), H(e).then(({ peaks: n, duration: r }) => {
|
|
6369
6340
|
if (b) return;
|
|
6370
6341
|
let i = {
|
|
6371
|
-
id:
|
|
6342
|
+
id: te(),
|
|
6372
6343
|
file: e,
|
|
6373
6344
|
name: e.name,
|
|
6374
6345
|
size: e.size,
|
|
@@ -6388,16 +6359,16 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6388
6359
|
});
|
|
6389
6360
|
});
|
|
6390
6361
|
}
|
|
6391
|
-
}),
|
|
6362
|
+
}), ie = async (e) => {
|
|
6392
6363
|
if (t.disabled || t.readonly) return;
|
|
6393
6364
|
let n = t.modelValue.find((t) => t.id === e);
|
|
6394
|
-
if (!n || !await m(`確定要移除「${
|
|
6365
|
+
if (!n || !await m(`確定要移除「${ne(n)}」嗎?`, {
|
|
6395
6366
|
title: "移除音訊",
|
|
6396
6367
|
status: "danger",
|
|
6397
6368
|
confirmText: "移除",
|
|
6398
6369
|
cancelText: "取消"
|
|
6399
6370
|
})) return;
|
|
6400
|
-
x.value === e && ae(),
|
|
6371
|
+
x.value === e && ae(), Js(n.url), P(n.url, !0), delete S[e], delete D[e], delete O[e], k.delete(e);
|
|
6401
6372
|
let r = t.modelValue.filter((t) => t.id !== e);
|
|
6402
6373
|
p("update:modelValue", r), p("change", r), p("remove", n);
|
|
6403
6374
|
}, ae = () => {
|
|
@@ -6455,7 +6426,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6455
6426
|
return;
|
|
6456
6427
|
}
|
|
6457
6428
|
try {
|
|
6458
|
-
let { peaks: t, duration: n } = await
|
|
6429
|
+
let { peaks: t, duration: n } = await V(await (await fetch(e.url)).arrayBuffer());
|
|
6459
6430
|
if (b) return;
|
|
6460
6431
|
M(e.url, t, n), he(e.id, t, n);
|
|
6461
6432
|
} catch {}
|
|
@@ -6468,24 +6439,24 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6468
6439
|
!e.url || k.has(e.id) || (k.add(e.id), S[e.id] || ge(e));
|
|
6469
6440
|
});
|
|
6470
6441
|
}, { immediate: !0 }), y(() => {
|
|
6471
|
-
b = !0, ue?.(), t.autoRevoke && t.modelValue.forEach((e) =>
|
|
6442
|
+
b = !0, ue?.(), t.autoRevoke && t.modelValue.forEach((e) => Js(e.url)), j.forEach((e, t) => {
|
|
6472
6443
|
for (let n = 0; n < e; n++) f(t, !1);
|
|
6473
|
-
}), j.clear(), W?.disconnect(),
|
|
6444
|
+
}), j.clear(), W?.disconnect(), B &&= (B.close(), null);
|
|
6474
6445
|
}), (n, r) => (C(), s("div", { class: _(["audio-input", {
|
|
6475
6446
|
"is-disabled": t.disabled,
|
|
6476
6447
|
"is-readonly": t.readonly
|
|
6477
|
-
}]) }, [t.title || t.showCount ? (C(), s("div",
|
|
6448
|
+
}]) }, [t.title || t.showCount ? (C(), s("div", rl, [t.title ? (C(), s("span", {
|
|
6478
6449
|
key: 0,
|
|
6479
6450
|
class: "title",
|
|
6480
6451
|
textContent: A(t.title)
|
|
6481
|
-
}, null, 8,
|
|
6452
|
+
}, null, 8, il)) : o("", !0), t.showCount ? (C(), s("span", al, A(ee.value) + " 首", 1)) : o("", !0)])) : o("", !0), ee.value === 0 && g.value.length === 0 ? (C(), s("div", h({
|
|
6482
6453
|
key: 1,
|
|
6483
6454
|
class: ["empty", {
|
|
6484
6455
|
"is-drag": N(K),
|
|
6485
6456
|
"is-static": t.readonly
|
|
6486
6457
|
}]
|
|
6487
|
-
}, t.readonly ? {} : N(
|
|
6488
|
-
t.readonly ? o("", !0) : (C(), s("span",
|
|
6458
|
+
}, t.readonly ? {} : N(q)), [
|
|
6459
|
+
t.readonly ? o("", !0) : (C(), s("span", ol, [...r[0] ||= [c("svg", {
|
|
6489
6460
|
viewBox: "0 0 24 24",
|
|
6490
6461
|
fill: "none",
|
|
6491
6462
|
stroke: "currentColor",
|
|
@@ -6505,12 +6476,12 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6505
6476
|
r: "3"
|
|
6506
6477
|
})
|
|
6507
6478
|
], -1)]])),
|
|
6508
|
-
c("h3", { textContent: A(t.readonly ? "目前沒有音訊" : t.emptyTitle) }, null, 8,
|
|
6479
|
+
c("h3", { textContent: A(t.readonly ? "目前沒有音訊" : t.emptyTitle) }, null, 8, sl),
|
|
6509
6480
|
t.readonly ? o("", !0) : (C(), s("p", {
|
|
6510
6481
|
key: 1,
|
|
6511
6482
|
textContent: A(t.emptyHint)
|
|
6512
|
-
}, null, 8,
|
|
6513
|
-
], 16)) : (C(), s("div",
|
|
6483
|
+
}, null, 8, cl))
|
|
6484
|
+
], 16)) : (C(), s("div", ll, [
|
|
6514
6485
|
(C(!0), s(e, null, E(t.modelValue, (n) => (C(), s("div", {
|
|
6515
6486
|
key: n.id,
|
|
6516
6487
|
class: _(["row", { "is-playing": x.value === n.id }])
|
|
@@ -6523,14 +6494,14 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6523
6494
|
onLoadedmetadata: (e) => _e(n.id, e),
|
|
6524
6495
|
onTimeupdate: (e) => se(n.id, e),
|
|
6525
6496
|
onEnded: (e) => ce(n.id)
|
|
6526
|
-
}, null, 40,
|
|
6497
|
+
}, null, 40, ul),
|
|
6527
6498
|
c("button", {
|
|
6528
6499
|
class: "play-btn",
|
|
6529
6500
|
"aria-label": x.value === n.id ? "暫停" : "播放",
|
|
6530
6501
|
disabled: !n.url,
|
|
6531
6502
|
onClick: (e) => oe(n.id),
|
|
6532
6503
|
type: "button"
|
|
6533
|
-
}, [x.value === n.id ? (C(), s("svg",
|
|
6504
|
+
}, [x.value === n.id ? (C(), s("svg", fl, [...r[1] ||= [c("rect", {
|
|
6534
6505
|
x: "6",
|
|
6535
6506
|
y: "5",
|
|
6536
6507
|
width: "4",
|
|
@@ -6542,11 +6513,11 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6542
6513
|
width: "4",
|
|
6543
6514
|
height: "14",
|
|
6544
6515
|
rx: "1"
|
|
6545
|
-
}, null, -1)]])) : (C(), s("svg",
|
|
6546
|
-
c("div",
|
|
6516
|
+
}, null, -1)]])) : (C(), s("svg", pl, [...r[2] ||= [c("path", { d: "M8 5v14l11-7z" }, null, -1)]]))], 8, dl),
|
|
6517
|
+
c("div", ml, [c("div", {
|
|
6547
6518
|
class: "name",
|
|
6548
|
-
title:
|
|
6549
|
-
}, A(
|
|
6519
|
+
title: ne(n)
|
|
6520
|
+
}, A(ne(n)), 9, hl), c("div", gl, [n.size == null ? o("", !0) : (C(), s(e, { key: 0 }, [d(A(N(Ws)(n.size)) + " · ", 1)], 64)), d(" " + A(N(Gs)(n.duration)), 1)])]),
|
|
6550
6521
|
c("div", {
|
|
6551
6522
|
class: _(["wave", { "is-track": !D[n.id]?.length }]),
|
|
6552
6523
|
ref_for: !0,
|
|
@@ -6557,17 +6528,17 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6557
6528
|
key: t,
|
|
6558
6529
|
class: _(["bar", { "is-played": fe(n, t) }]),
|
|
6559
6530
|
style: v({ height: Math.max(2, Math.round(e * 34)) + "px" })
|
|
6560
|
-
}, null, 6))), 128)) : (C(), s("div",
|
|
6531
|
+
}, null, 6))), 128)) : (C(), s("div", vl, [c("div", {
|
|
6561
6532
|
class: "track-fill",
|
|
6562
6533
|
style: v({ width: pe(n) * 100 + "%" })
|
|
6563
|
-
}, null, 4)]))], 42,
|
|
6564
|
-
c("div",
|
|
6534
|
+
}, null, 4)]))], 42, _l),
|
|
6535
|
+
c("div", yl, A(N(Gs)(O[n.id] || 0)) + " / " + A(N(Gs)(n.duration)), 1),
|
|
6565
6536
|
t.readonly ? o("", !0) : (C(), s("button", {
|
|
6566
6537
|
key: 0,
|
|
6567
6538
|
class: "del-btn",
|
|
6568
6539
|
"aria-label": "刪除",
|
|
6569
6540
|
disabled: t.disabled,
|
|
6570
|
-
onClick:
|
|
6541
|
+
onClick: z((e) => ie(n.id), ["stop"]),
|
|
6571
6542
|
type: "button"
|
|
6572
6543
|
}, [...r[3] ||= [c("svg", {
|
|
6573
6544
|
viewBox: "0 0 24 24",
|
|
@@ -6576,7 +6547,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6576
6547
|
"stroke-width": "1.8",
|
|
6577
6548
|
"stroke-linecap": "round",
|
|
6578
6549
|
"stroke-linejoin": "round"
|
|
6579
|
-
}, [c("path", { d: "M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14" })], -1)]], 8,
|
|
6550
|
+
}, [c("path", { d: "M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14" })], -1)]], 8, bl))
|
|
6580
6551
|
], 2))), 128)),
|
|
6581
6552
|
(C(!0), s(e, null, E(g.value, (e) => (C(), s("div", {
|
|
6582
6553
|
key: e.tag,
|
|
@@ -6590,18 +6561,18 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6590
6561
|
stroke: "currentColor",
|
|
6591
6562
|
"stroke-width": "2",
|
|
6592
6563
|
"stroke-linecap": "round"
|
|
6593
|
-
}, [c("path", { d: "M12 3a9 9 0 1 0 9 9" })])], -1), c("div",
|
|
6564
|
+
}, [c("path", { d: "M12 3a9 9 0 1 0 9 9" })])], -1), c("div", xl, [c("div", Sl, A(e.name), 1), r[4] ||= c("div", { class: "sub" }, "解析波形中…", -1)])]))), 128)),
|
|
6594
6565
|
t.multiple && !t.readonly ? (C(), s("div", h({
|
|
6595
6566
|
key: 0,
|
|
6596
6567
|
class: ["add", { "is-drag": N(K) }]
|
|
6597
|
-
}, N(
|
|
6568
|
+
}, N(q)), [...r[6] ||= [u("<span class=\"plus\" aria-hidden=\"true\" data-v-550a16fe><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" data-v-550a16fe><path d=\"M12 5v14M5 12h14\" data-v-550a16fe></path></svg></span><div class=\"add-text\" data-v-550a16fe><div class=\"t\" data-v-550a16fe>新增音訊</div><div class=\"d\" data-v-550a16fe>點擊或拖放檔案 · MP3 / WAV / OGG / M4A</div></div>", 2)]], 16)) : o("", !0)
|
|
6598
6569
|
]))], 2));
|
|
6599
6570
|
}
|
|
6600
|
-
}), [["__scopeId", "data-v-550a16fe"]]),
|
|
6571
|
+
}), [["__scopeId", "data-v-550a16fe"]]), Dl = [
|
|
6601
6572
|
"src",
|
|
6602
6573
|
"alt",
|
|
6603
6574
|
"loading"
|
|
6604
|
-
],
|
|
6575
|
+
], Ol = ["src", "alt"], kl = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
6605
6576
|
__name: "NImage",
|
|
6606
6577
|
props: {
|
|
6607
6578
|
src: {},
|
|
@@ -6661,12 +6632,12 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6661
6632
|
onClick: y,
|
|
6662
6633
|
onLoad: h,
|
|
6663
6634
|
onError: g
|
|
6664
|
-
}, null, 44,
|
|
6635
|
+
}, null, 44, Dl), (C(), a(t, { to: "body" }, [f(n, { name: "n-image-fade" }, {
|
|
6665
6636
|
default: R(() => [u.value ? (C(), s("div", {
|
|
6666
6637
|
key: 0,
|
|
6667
6638
|
class: "n-image-overlay",
|
|
6668
6639
|
style: v({ zIndex: e.zIndex }),
|
|
6669
|
-
onClick:
|
|
6640
|
+
onClick: z(x, ["self"])
|
|
6670
6641
|
}, [c("button", {
|
|
6671
6642
|
class: "n-image-close",
|
|
6672
6643
|
onClick: b
|
|
@@ -6681,17 +6652,17 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6681
6652
|
class: "n-image-preview",
|
|
6682
6653
|
src: m.value,
|
|
6683
6654
|
alt: e.alt
|
|
6684
|
-
}, null, 8,
|
|
6655
|
+
}, null, 8, Ol)], 4)) : o("", !0)]),
|
|
6685
6656
|
_: 1
|
|
6686
6657
|
})]))], 2));
|
|
6687
6658
|
}
|
|
6688
|
-
}), [["__scopeId", "data-v-6cfc93a7"]]),
|
|
6659
|
+
}), [["__scopeId", "data-v-6cfc93a7"]]), Al = { class: "header" }, jl = { class: "brand-logo" }, Ml = { class: "logo-text" }, Nl = { class: "logo-icon" }, Pl = { class: "nav" }, Fl = ["onClick"], Il = ["innerHTML"], Ll = { class: "nav-list" }, Rl = ["href", "onClick"], zl = ["innerHTML"], Bl = { class: "nav-text" }, Vl = ["href", "onClick"], Hl = { class: "title no-children" }, Ul = ["innerHTML"], Wl = { class: "user-capsule" }, Gl = { class: "user-avatar" }, Kl = ["src"], ql = {
|
|
6689
6660
|
key: 1,
|
|
6690
6661
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6691
6662
|
width: "36",
|
|
6692
6663
|
height: "36",
|
|
6693
6664
|
viewBox: "0 0 36 36"
|
|
6694
|
-
},
|
|
6665
|
+
}, Jl = { class: "user-info" }, Yl = { class: "user-name-row" }, Xl = { class: "user-name" }, Zl = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
6695
6666
|
__name: "NSidebar",
|
|
6696
6667
|
props: {
|
|
6697
6668
|
title: { default: "" },
|
|
@@ -6744,8 +6715,8 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6744
6715
|
class: "content",
|
|
6745
6716
|
onMouseenter: i[2] ||= (e) => m.value = !0
|
|
6746
6717
|
}, [
|
|
6747
|
-
D(r.$slots, "header", {}, () => [c("div",
|
|
6748
|
-
c("div",
|
|
6718
|
+
D(r.$slots, "header", {}, () => [c("div", Al, [c("div", jl, [c("span", Ml, A(n.title), 1), c("span", Nl, A(n.title.substring(0, 1).toUpperCase()), 1)])])], !0),
|
|
6719
|
+
c("div", Pl, [(C(!0), s(e, null, E(n.menus, (t) => (C(), s(e, null, [t.children?.length ? (C(), s("div", {
|
|
6749
6720
|
key: 0,
|
|
6750
6721
|
class: _(["menu", {
|
|
6751
6722
|
open: g.value.get(t.title),
|
|
@@ -6754,7 +6725,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6754
6725
|
}, [c("div", {
|
|
6755
6726
|
class: "title",
|
|
6756
6727
|
onClick: (e) => N(l)(t.title)
|
|
6757
|
-
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8,
|
|
6728
|
+
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, Il), c("span", null, A(t.title), 1)]), i[6] ||= c("svg", {
|
|
6758
6729
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6759
6730
|
width: "14",
|
|
6760
6731
|
height: "14",
|
|
@@ -6765,23 +6736,23 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6765
6736
|
"stroke-linecap": "round",
|
|
6766
6737
|
"stroke-linejoin": "round",
|
|
6767
6738
|
class: "icon"
|
|
6768
|
-
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8,
|
|
6739
|
+
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8, Fl), c("div", Ll, [c("div", null, [(C(!0), s(e, null, E(t.children, (e) => (C(), s("a", {
|
|
6769
6740
|
href: e.route,
|
|
6770
|
-
onClick:
|
|
6771
|
-
}, [c("div", { class: _(["nav-item", { active: y.value.get(e.route) }]) }, [c("div", { innerHTML: e.icon }, null, 8,
|
|
6741
|
+
onClick: z((t) => b(e), ["prevent"])
|
|
6742
|
+
}, [c("div", { class: _(["nav-item", { active: y.value.get(e.route) }]) }, [c("div", { innerHTML: e.icon }, null, 8, zl), c("span", Bl, A(e.title), 1)], 2)], 8, Rl))), 256))])])], 2)) : (C(), s("div", {
|
|
6772
6743
|
key: 1,
|
|
6773
6744
|
class: _(["menu", { active: v.value.get(t.title) }])
|
|
6774
6745
|
}, [c("a", {
|
|
6775
6746
|
href: t.route,
|
|
6776
|
-
onClick:
|
|
6777
|
-
}, [c("div",
|
|
6778
|
-
c("div",
|
|
6779
|
-
c("div",
|
|
6747
|
+
onClick: z((e) => x(t), ["prevent"])
|
|
6748
|
+
}, [c("div", Hl, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, Ul), c("span", null, A(t.title), 1)])])], 8, Vl)], 2))], 64))), 256))]),
|
|
6749
|
+
c("div", Wl, [D(r.$slots, "user", {}, () => [
|
|
6750
|
+
c("div", Gl, [n.userAvatarUrl ? (C(), s("img", {
|
|
6780
6751
|
key: 0,
|
|
6781
6752
|
src: n.userAvatarUrl,
|
|
6782
6753
|
alt: "User Avatar"
|
|
6783
|
-
}, null, 8,
|
|
6784
|
-
c("div",
|
|
6754
|
+
}, null, 8, Kl)) : (C(), s("svg", ql, [...i[7] ||= [u("<defs data-v-beb07b23><clipPath id=\"avatarClip\" data-v-beb07b23><circle cx=\"18\" cy=\"18\" r=\"18\" data-v-beb07b23></circle></clipPath></defs><circle cx=\"18\" cy=\"18\" r=\"18\" fill=\"#dbeafe\" data-v-beb07b23></circle><g clip-path=\"url(#avatarClip)\" data-v-beb07b23><circle cx=\"18\" cy=\"14\" r=\"6\" fill=\"#2563eb\" data-v-beb07b23></circle><path d=\"M6,34 Q6,24 18,24 Q30,24 30,34\" fill=\"#2563eb\" data-v-beb07b23></path></g>", 3)]]))]),
|
|
6755
|
+
c("div", Jl, [c("div", Yl, [c("span", Xl, A(n.userName), 1)])]),
|
|
6785
6756
|
f(W, {
|
|
6786
6757
|
class: "logout-btn",
|
|
6787
6758
|
intent: "error",
|
|
@@ -6820,7 +6791,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6820
6791
|
}, null, 2)]))
|
|
6821
6792
|
], 34));
|
|
6822
6793
|
}
|
|
6823
|
-
}), [["__scopeId", "data-v-beb07b23"]]),
|
|
6794
|
+
}), [["__scopeId", "data-v-beb07b23"]]), Ql = { class: "layout" }, $l = { class: "main-content" }, eu = { class: "copyright" }, tu = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
6824
6795
|
__name: "NLayout",
|
|
6825
6796
|
props: {
|
|
6826
6797
|
title: { default: "NICKLABS" },
|
|
@@ -6836,7 +6807,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6836
6807
|
emits: ["logout", "navigate"],
|
|
6837
6808
|
setup(e, { emit: t }) {
|
|
6838
6809
|
let n = Di(), r = t;
|
|
6839
|
-
return (t, i) => (C(), s("div",
|
|
6810
|
+
return (t, i) => (C(), s("div", Ql, [e.isShowSidebar ? (C(), a(Zl, {
|
|
6840
6811
|
key: 0,
|
|
6841
6812
|
title: e.title,
|
|
6842
6813
|
userName: e.userName,
|
|
@@ -6852,18 +6823,18 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6852
6823
|
"isOpen",
|
|
6853
6824
|
"menus",
|
|
6854
6825
|
"currentPath"
|
|
6855
|
-
])) : o("", !0), c("main",
|
|
6826
|
+
])) : o("", !0), c("main", $l, [D(t.$slots, "default", {}, void 0, !0), c("div", eu, A(e.copyright), 1)])]));
|
|
6856
6827
|
}
|
|
6857
|
-
}), [["__scopeId", "data-v-41b1eb44"]]),
|
|
6828
|
+
}), [["__scopeId", "data-v-41b1eb44"]]), nu = { class: "topbar" }, ru = { class: "topbar-left" }, iu = { class: "topbar-right" }, au = {
|
|
6858
6829
|
key: 0,
|
|
6859
6830
|
class: "pill"
|
|
6860
|
-
},
|
|
6831
|
+
}, ou = {
|
|
6861
6832
|
key: 0,
|
|
6862
6833
|
class: "name"
|
|
6863
|
-
},
|
|
6834
|
+
}, su = {
|
|
6864
6835
|
key: 1,
|
|
6865
6836
|
class: "separator"
|
|
6866
|
-
},
|
|
6837
|
+
}, cu = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
6867
6838
|
__name: "NNavigation",
|
|
6868
6839
|
props: {
|
|
6869
6840
|
isShowSidebar: {
|
|
@@ -6888,7 +6859,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6888
6859
|
let n = t, r = () => {
|
|
6889
6860
|
document.fullscreenElement ? document.exitFullscreen?.() : document.documentElement.requestFullscreen();
|
|
6890
6861
|
};
|
|
6891
|
-
return (t, i) => (C(), s("header",
|
|
6862
|
+
return (t, i) => (C(), s("header", nu, [c("div", ru, [e.isShowSidebar ? (C(), a(W, {
|
|
6892
6863
|
key: 0,
|
|
6893
6864
|
onClick: i[0] ||= (e) => n("toggleSidebar"),
|
|
6894
6865
|
padding: "8px"
|
|
@@ -6912,7 +6883,7 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6912
6883
|
})) : o("", !0), e.isShowFullscreen ? (C(), a(W, {
|
|
6913
6884
|
key: 1,
|
|
6914
6885
|
padding: "8px",
|
|
6915
|
-
onClick:
|
|
6886
|
+
onClick: z(r, ["prevent"])
|
|
6916
6887
|
}, {
|
|
6917
6888
|
default: R(() => [...i[3] ||= [c("svg", {
|
|
6918
6889
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6931,14 +6902,14 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6931
6902
|
c("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
|
|
6932
6903
|
], -1)]]),
|
|
6933
6904
|
_: 1
|
|
6934
|
-
})) : o("", !0)]), c("div",
|
|
6935
|
-
e.isShowUser ? (C(), s("span",
|
|
6936
|
-
e.isShowUser && e.isShowLogoutButton ? (C(), s("div",
|
|
6905
|
+
})) : o("", !0)]), c("div", iu, [e.isShowUser || e.isShowLogoutButton ? (C(), s("div", au, [
|
|
6906
|
+
e.isShowUser ? (C(), s("span", ou, "Nick")) : o("", !0),
|
|
6907
|
+
e.isShowUser && e.isShowLogoutButton ? (C(), s("div", su)) : o("", !0),
|
|
6937
6908
|
e.isShowLogoutButton ? (C(), a(W, {
|
|
6938
6909
|
key: 2,
|
|
6939
6910
|
variant: "mute",
|
|
6940
6911
|
intent: "error",
|
|
6941
|
-
onClick: i[1] ||=
|
|
6912
|
+
onClick: i[1] ||= z((e) => n("logout"), ["prevent"])
|
|
6942
6913
|
}, {
|
|
6943
6914
|
default: R(() => [...i[4] ||= [c("svg", {
|
|
6944
6915
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6959,10 +6930,10 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6959
6930
|
})) : o("", !0)
|
|
6960
6931
|
])) : o("", !0)])]));
|
|
6961
6932
|
}
|
|
6962
|
-
}), [["__scopeId", "data-v-f38a4beb"]]),
|
|
6933
|
+
}), [["__scopeId", "data-v-f38a4beb"]]), lu = { class: "brand" }, uu = ["src", "alt"], du = {
|
|
6963
6934
|
key: 1,
|
|
6964
6935
|
class: "icon"
|
|
6965
|
-
},
|
|
6936
|
+
}, fu = { key: 2 }, pu = { key: 3 }, mu = /* @__PURE__ */ U(/* @__PURE__ */ p({
|
|
6966
6937
|
__name: "NLoginLayout",
|
|
6967
6938
|
props: {
|
|
6968
6939
|
backgroundImage: { default: "" },
|
|
@@ -6980,15 +6951,15 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6980
6951
|
radius: "xl",
|
|
6981
6952
|
class: "card"
|
|
6982
6953
|
}, {
|
|
6983
|
-
default: R(() => [c("div",
|
|
6954
|
+
default: R(() => [c("div", lu, [
|
|
6984
6955
|
t.value ? (C(), s("img", {
|
|
6985
6956
|
key: 0,
|
|
6986
6957
|
class: "logo-img",
|
|
6987
6958
|
src: e.logo,
|
|
6988
6959
|
alt: e.title
|
|
6989
|
-
}, null, 8,
|
|
6990
|
-
e.title ? (C(), s("h1",
|
|
6991
|
-
e.description ? (C(), s("p",
|
|
6960
|
+
}, null, 8, uu)) : (C(), s("div", du, A(e.logo), 1)),
|
|
6961
|
+
e.title ? (C(), s("h1", fu, A(e.title), 1)) : o("", !0),
|
|
6962
|
+
e.description ? (C(), s("p", pu, A(e.description), 1)) : o("", !0)
|
|
6992
6963
|
]), D(n.$slots, "default", {}, void 0, !0)]),
|
|
6993
6964
|
_: 3
|
|
6994
6965
|
})], 4));
|
|
@@ -6996,19 +6967,19 @@ var Gs = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6996
6967
|
}), [["__scopeId", "data-v-f0866bc5"]]);
|
|
6997
6968
|
//#endregion
|
|
6998
6969
|
//#region src/composables/useRouteModal.ts
|
|
6999
|
-
function
|
|
6970
|
+
function hu(e) {
|
|
7000
6971
|
let t = i(() => {
|
|
7001
|
-
let t =
|
|
6972
|
+
let t = B();
|
|
7002
6973
|
return t ? t.currentRoute.value.matched.some((t) => t.name === e.routeName) : !1;
|
|
7003
|
-
}), n = i(() =>
|
|
6974
|
+
}), n = i(() => B()?.currentRoute.value.params ?? {});
|
|
7004
6975
|
function r(t = {}) {
|
|
7005
|
-
|
|
6976
|
+
B()?.push({
|
|
7006
6977
|
name: e.routeName,
|
|
7007
6978
|
params: t
|
|
7008
6979
|
});
|
|
7009
6980
|
}
|
|
7010
6981
|
function a() {
|
|
7011
|
-
let t =
|
|
6982
|
+
let t = B();
|
|
7012
6983
|
t && (window.history.state?.back ? t.back() : e.parentRouteName ? t.push({ name: e.parentRouteName }) : t.back());
|
|
7013
6984
|
}
|
|
7014
6985
|
return {
|
|
@@ -7020,7 +6991,7 @@ function gu(e) {
|
|
|
7020
6991
|
}
|
|
7021
6992
|
//#endregion
|
|
7022
6993
|
//#region src/index.ts
|
|
7023
|
-
var
|
|
6994
|
+
var gu = {
|
|
7024
6995
|
NButton: W,
|
|
7025
6996
|
NBreadcrumb: se,
|
|
7026
6997
|
NInput: he,
|
|
@@ -7037,26 +7008,26 @@ var _u = {
|
|
|
7037
7008
|
NSwitch: qa,
|
|
7038
7009
|
NTag: Ja,
|
|
7039
7010
|
NDatePicker: es,
|
|
7040
|
-
NTimePicker:
|
|
7041
|
-
NTooltip:
|
|
7042
|
-
NModal:
|
|
7043
|
-
NDrawer:
|
|
7044
|
-
NAlert:
|
|
7011
|
+
NTimePicker: ls,
|
|
7012
|
+
NTooltip: us,
|
|
7013
|
+
NModal: hs,
|
|
7014
|
+
NDrawer: bs,
|
|
7015
|
+
NAlert: ks,
|
|
7045
7016
|
NTable: wa,
|
|
7046
|
-
NVirtualTable:
|
|
7047
|
-
NVideoSelect:
|
|
7048
|
-
NImageSelect:
|
|
7049
|
-
NAudioSelect:
|
|
7050
|
-
NImage:
|
|
7051
|
-
NLayout:
|
|
7052
|
-
NNavigation:
|
|
7053
|
-
NSidebar:
|
|
7017
|
+
NVirtualTable: Hs,
|
|
7018
|
+
NVideoSelect: Oc,
|
|
7019
|
+
NImageSelect: nl,
|
|
7020
|
+
NAudioSelect: El,
|
|
7021
|
+
NImage: kl,
|
|
7022
|
+
NLayout: tu,
|
|
7023
|
+
NNavigation: cu,
|
|
7024
|
+
NSidebar: Zl,
|
|
7054
7025
|
NCard: Gi,
|
|
7055
|
-
NLoginLayout:
|
|
7056
|
-
},
|
|
7057
|
-
Object.entries(
|
|
7026
|
+
NLoginLayout: mu
|
|
7027
|
+
}, _u = { install(e, t = {}) {
|
|
7028
|
+
Object.entries(gu).forEach(([t, n]) => {
|
|
7058
7029
|
e.component(t, n);
|
|
7059
|
-
}), t.router &&
|
|
7030
|
+
}), t.router && ne(t.router);
|
|
7060
7031
|
} };
|
|
7061
7032
|
//#endregion
|
|
7062
|
-
export {
|
|
7033
|
+
export { ks as NAlert, El as NAudioSelect, W as NButton, Gi as NCard, J as NCheckbox, Ga as NCode, es as NDatePicker, bs as NDrawer, ta as NEmpty, Ci as NFileSelect, Wi as NForm, kl as NImage, nl as NImageSelect, he as NInput, tu as NLayout, Da as NList, fa as NLoading, mu as NLoginLayout, hs as NModal, cu as NNavigation, Zn as NSelect, Zl as NSidebar, qa as NSwitch, wa as NTable, Ja as NTag, be as NTextarea, ls as NTimePicker, Ia as NToast, us as NTooltip, Oc as NVideoSelect, Hs as NVirtualTable, _u as NickLabsUI, ci as useAlert, q as useBreadcrumb, Us as useDisclosure, hu as useRouteModal, Di as useSidebarManager, Aa as useToast };
|