nicklabs-ui 1.0.80 → 1.0.81

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 CHANGED
@@ -1,21 +1,21 @@
1
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, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onUnmounted as b, openBlock as x, reactive as S, ref as C, renderList as w, renderSlot as T, toDisplayString as E, unref as D, useCssVars as O, vModelText as k, watch as A, withCtx as j, withDirectives as M, withModifiers as N } from "vue";
2
2
  //#region src/composables/sharedRouter.ts
3
3
  var P = null;
4
- function ee(e) {
4
+ function F(e) {
5
5
  P = e;
6
6
  }
7
- function F() {
7
+ function I() {
8
8
  return P;
9
9
  }
10
10
  //#endregion
11
11
  //#region src/components/NButton.vue?vue&type=script&setup=true&lang.ts
12
- var I = ["type", "disabled"], L = {
12
+ var ee = ["type", "disabled"], te = {
13
13
  key: 0,
14
14
  class: "spinner",
15
15
  viewBox: "0 0 24 24",
16
16
  fill: "none",
17
17
  xmlns: "http://www.w3.org/2000/svg"
18
- }, te = /* @__PURE__ */ p({
18
+ }, L = /* @__PURE__ */ p({
19
19
  __name: "NButton",
20
20
  props: {
21
21
  variant: { default: "none" },
@@ -63,7 +63,7 @@ var I = ["type", "disabled"], L = {
63
63
  ]),
64
64
  type: e.type,
65
65
  disabled: e.disabled || e.loading
66
- }, [e.loading ? (x(), s("svg", L, [...n[0] ||= [c("circle", {
66
+ }, [e.loading ? (x(), s("svg", te, [...n[0] ||= [c("circle", {
67
67
  cx: "12",
68
68
  cy: "12",
69
69
  r: "10",
@@ -72,13 +72,13 @@ var I = ["type", "disabled"], L = {
72
72
  "stroke-linecap": "round",
73
73
  "stroke-dasharray": "32",
74
74
  "stroke-dashoffset": "12"
75
- }, null, -1)]])) : o("", !0), T(t.$slots, "default", {}, void 0, !0)], 10, I));
75
+ }, null, -1)]])) : o("", !0), T(t.$slots, "default", {}, void 0, !0)], 10, ee));
76
76
  }
77
77
  }), R = (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
- }, z = /* @__PURE__ */ R(te, [["__scopeId", "data-v-285afe14"]]), B = (e) => e.meta?.breadcrumb ?? "", V = C((e) => e);
81
+ }, z = /* @__PURE__ */ R(L, [["__scopeId", "data-v-285afe14"]]), B = (e) => e.meta?.breadcrumb ?? "", V = C((e) => e);
82
82
  function H() {
83
83
  function e(e) {
84
84
  B = e;
@@ -87,7 +87,7 @@ function H() {
87
87
  V.value = e;
88
88
  }
89
89
  let n = i(() => {
90
- let e = F();
90
+ let e = I();
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 H() {
101
101
  }), n;
102
102
  });
103
103
  function r(e) {
104
- F()?.push(e);
104
+ I()?.push(e);
105
105
  }
106
106
  function a() {
107
107
  V.value = (e) => e;
@@ -132,7 +132,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
132
132
  }), [["__scopeId", "data-v-46f3b63f"]]), G = {
133
133
  key: 0,
134
134
  class: "label"
135
- }, ie = ["disabled"], ae = [
135
+ }, K = ["disabled"], ie = [
136
136
  "type",
137
137
  "placeholder",
138
138
  "disabled",
@@ -140,10 +140,10 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
140
140
  "value",
141
141
  "maxlength",
142
142
  "autocomplete"
143
- ], oe = ["disabled"], se = {
143
+ ], q = ["disabled"], ae = {
144
144
  key: 2,
145
145
  class: "actions"
146
- }, ce = {
146
+ }, oe = {
147
147
  key: 0,
148
148
  xmlns: "http://www.w3.org/2000/svg",
149
149
  width: "16",
@@ -154,7 +154,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
154
154
  "stroke-width": "2",
155
155
  "stroke-linecap": "round",
156
156
  "stroke-linejoin": "round"
157
- }, le = {
157
+ }, se = {
158
158
  key: 1,
159
159
  xmlns: "http://www.w3.org/2000/svg",
160
160
  width: "16",
@@ -165,7 +165,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
165
165
  "stroke-width": "2",
166
166
  "stroke-linecap": "round",
167
167
  "stroke-linejoin": "round"
168
- }, ue = /* @__PURE__ */ R(/* @__PURE__ */ p({
168
+ }, ce = /* @__PURE__ */ R(/* @__PURE__ */ p({
169
169
  __name: "NInput",
170
170
  props: {
171
171
  modelValue: { default: "" },
@@ -292,7 +292,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
292
292
  "stroke-width": "2",
293
293
  "stroke-linecap": "round",
294
294
  "stroke-linejoin": "round"
295
- }, [c("path", { d: "M5 12h14" })], -1)]], 8, ie)) : o("", !0),
295
+ }, [c("path", { d: "M5 12h14" })], -1)]], 8, K)) : o("", !0),
296
296
  c("input", {
297
297
  type: u.value,
298
298
  placeholder: e.placeholder,
@@ -307,7 +307,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
307
307
  onChange: i[1] ||= (e) => n("change", e),
308
308
  onKeydown: h,
309
309
  onCompositionend: _
310
- }, null, 40, ae),
310
+ }, null, 40, ie),
311
311
  a.value ? (x(), s("button", {
312
312
  key: 1,
313
313
  class: "tool-button",
@@ -324,18 +324,18 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
324
324
  "stroke-width": "2",
325
325
  "stroke-linecap": "round",
326
326
  "stroke-linejoin": "round"
327
- }, [c("path", { d: "M5 12h14" }), c("path", { d: "M12 5v14" })], -1)]], 8, oe)) : o("", !0),
328
- a.value ? o("", !0) : (x(), s("div", se, [r.value && !e.disabled ? (x(), s("button", {
327
+ }, [c("path", { d: "M5 12h14" }), c("path", { d: "M12 5v14" })], -1)]], 8, q)) : o("", !0),
328
+ a.value ? o("", !0) : (x(), s("div", ae, [r.value && !e.disabled ? (x(), s("button", {
329
329
  key: 0,
330
330
  type: "button",
331
331
  onClick: T,
332
332
  "aria-label": "Toggle password visibility"
333
- }, [l.value ? (x(), s("svg", le, [...i[5] ||= [
333
+ }, [l.value ? (x(), s("svg", se, [...i[5] ||= [
334
334
  c("path", { d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }, null, -1),
335
335
  c("path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }, null, -1),
336
336
  c("path", { d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }, null, -1),
337
337
  c("path", { d: "m2 2 20 20" }, null, -1)
338
- ]])) : (x(), s("svg", ce, [...i[4] ||= [c("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }, null, -1), c("circle", {
338
+ ]])) : (x(), s("svg", oe, [...i[4] ||= [c("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }, null, -1), c("circle", {
339
339
  cx: "12",
340
340
  cy: "12",
341
341
  r: "3"
@@ -357,7 +357,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
357
357
  }, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]])) : o("", !0)]))
358
358
  ], 2)], 2));
359
359
  }
360
- }), [["__scopeId", "data-v-91e7a17e"]]), de = { class: "textarea" }, fe = ["textContent"], pe = [
360
+ }), [["__scopeId", "data-v-91e7a17e"]]), le = { class: "textarea" }, ue = ["textContent"], de = [
361
361
  "rows",
362
362
  "placeholder",
363
363
  "disabled",
@@ -366,10 +366,10 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
366
366
  "maxlength",
367
367
  "autocomplete",
368
368
  "wrap"
369
- ], me = {
369
+ ], fe = {
370
370
  key: 1,
371
371
  class: "char-count"
372
- }, he = /* @__PURE__ */ R(/* @__PURE__ */ p({
372
+ }, pe = /* @__PURE__ */ R(/* @__PURE__ */ p({
373
373
  __name: "NTextarea",
374
374
  props: {
375
375
  modelValue: { default: "" },
@@ -419,12 +419,12 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
419
419
  };
420
420
  return y(() => {
421
421
  e.autofocus && r.value?.focus();
422
- }), (t, i) => (x(), s("div", de, [
422
+ }), (t, i) => (x(), s("div", le, [
423
423
  e.title ? (x(), s("label", {
424
424
  key: 0,
425
425
  class: "label",
426
426
  textContent: E(e.title)
427
- }, null, 8, fe)) : o("", !0),
427
+ }, null, 8, ue)) : o("", !0),
428
428
  c("textarea", {
429
429
  ref_key: "textareaRef",
430
430
  ref: r,
@@ -443,17 +443,17 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
443
443
  onChange: i[2] ||= (e) => n("change", e),
444
444
  onKeydown: i[3] ||= (e) => n("keydown", e),
445
445
  onPaste: i[4] ||= (e) => n("paste", e)
446
- }, null, 40, pe),
447
- e.showCount ? (x(), s("div", me, E(u.value), 1)) : o("", !0)
446
+ }, null, 40, de),
447
+ e.showCount ? (x(), s("div", fe, E(u.value), 1)) : o("", !0)
448
448
  ]));
449
449
  }
450
- }), [["__scopeId", "data-v-03ad19c3"]]), ge = {
450
+ }), [["__scopeId", "data-v-03ad19c3"]]), me = {
451
451
  key: 0,
452
452
  class: "label"
453
- }, _e = ["onClick"], ve = ["checked", "disabled"], ye = { class: "text" }, be = ["checked", "disabled"], K = {
453
+ }, he = ["onClick"], ge = ["checked", "disabled"], _e = { class: "text" }, ve = ["checked", "disabled"], J = {
454
454
  key: 0,
455
455
  class: "text"
456
- }, xe = /* @__PURE__ */ R(/* @__PURE__ */ p({
456
+ }, ye = /* @__PURE__ */ R(/* @__PURE__ */ p({
457
457
  __name: "NCheckbox",
458
458
  props: {
459
459
  modelValue: { default: !1 },
@@ -517,7 +517,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
517
517
  };
518
518
  return y(() => {
519
519
  t.autofocus || a.value?.focus();
520
- }), (n, r) => (x(), s("div", { class: g(["checkbox", { inline: t.inline }]) }, [t.title ? (x(), s("h3", ge, E(t.title), 1)) : o("", !0), c("div", { class: g(["group", [t.direction]]) }, [l.value ? (x(), s("label", {
520
+ }), (n, r) => (x(), s("div", { class: g(["checkbox", { inline: t.inline }]) }, [t.title ? (x(), s("h3", me, E(t.title), 1)) : o("", !0), c("div", { class: g(["group", [t.direction]]) }, [l.value ? (x(), s("label", {
521
521
  key: 1,
522
522
  class: "item",
523
523
  onClick: r[0] ||= N((e) => h(), ["prevent"])
@@ -526,7 +526,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
526
526
  type: "checkbox",
527
527
  checked: !!t.modelValue,
528
528
  disabled: t.disabled
529
- }, null, 8, be),
529
+ }, null, 8, ve),
530
530
  r[2] ||= c("span", { class: "icon" }, [c("svg", {
531
531
  xmlns: "http://www.w3.org/2000/svg",
532
532
  width: "24",
@@ -538,7 +538,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
538
538
  "stroke-linecap": "round",
539
539
  "stroke-linejoin": "round"
540
540
  }, [c("path", { d: "M20 6 9 17l-5-5" })])], -1),
541
- n.$slots.default || t.label ? (x(), s("span", K, [T(n.$slots, "default", {}, () => [d(E(t.label), 1)], !0)])) : o("", !0)
541
+ n.$slots.default || t.label ? (x(), s("span", J, [T(n.$slots, "default", {}, () => [d(E(t.label), 1)], !0)])) : o("", !0)
542
542
  ])) : (x(!0), s(e, { key: 0 }, w(t.options, (e, n) => (x(), s("label", {
543
543
  key: `${t.formatLabel(e)}${n}`,
544
544
  class: "item",
@@ -548,7 +548,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
548
548
  type: "checkbox",
549
549
  checked: m(t.formatValue(e)),
550
550
  disabled: t.disabled
551
- }, null, 8, ve),
551
+ }, null, 8, ge),
552
552
  c("span", { class: g(["icon", { radio: !t.multiple }]) }, [...r[1] ||= [c("svg", {
553
553
  xmlns: "http://www.w3.org/2000/svg",
554
554
  width: "24",
@@ -560,13 +560,13 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
560
560
  "stroke-linecap": "round",
561
561
  "stroke-linejoin": "round"
562
562
  }, [c("path", { d: "M20 6 9 17l-5-5" })], -1)]], 2),
563
- c("span", ye, E(t.formatLabel(e)), 1)
564
- ], 8, _e))), 128))], 2)], 2));
563
+ c("span", _e, E(t.formatLabel(e)), 1)
564
+ ], 8, he))), 128))], 2)], 2));
565
565
  }
566
- }), [["__scopeId", "data-v-1f6a325a"]]), Se = { class: "select" }, q = {
566
+ }), [["__scopeId", "data-v-1f6a325a"]]), be = { class: "select" }, Y = {
567
567
  key: 0,
568
568
  class: "label"
569
- }, J = { class: "select-chips-container" }, Y = ["textContent"], X = ["onClick"], Z = {
569
+ }, X = { class: "select-chips-container" }, xe = ["textContent"], Se = ["onClick"], Z = {
570
570
  key: 0,
571
571
  class: "search-box"
572
572
  }, Ce = { class: "options" }, we = ["onClick"], Te = {
@@ -664,7 +664,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
664
664
  let e = Object.keys(p.value), n = e.length;
665
665
  return n === 0 ? "" : t.multiple ? `已選 ${n} 項` : t.formatLabel(p.value[e[0]]) ?? "";
666
666
  });
667
- return (n, r) => (x(), s("div", Se, [t.title ? (x(), s("label", q, E(t.title), 1)) : o("", !0), c("div", {
667
+ return (n, r) => (x(), s("div", be, [t.title ? (x(), s("label", Y, E(t.title), 1)) : o("", !0), c("div", {
668
668
  ref_key: "selectGroupRef",
669
669
  ref: d,
670
670
  class: g(["group", {
@@ -675,11 +675,11 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
675
675
  class: g(["trigger", { disabled: t.disabled }]),
676
676
  onClick: _
677
677
  }, [
678
- c("div", J, [!m.value || !t.multiple || t.multiple && t.multipleDisplay === "count" ? (x(), s("span", {
678
+ c("div", X, [!m.value || !t.multiple || t.multiple && t.multipleDisplay === "count" ? (x(), s("span", {
679
679
  key: 0,
680
680
  class: g(["trigger-text", { placeholder: !m.value }]),
681
681
  textContent: E(m.value ? j.value : t.placeholder)
682
- }, null, 10, Y)) : o("", !0), t.multiple && t.multipleDisplay === "tags" ? (x(!0), s(e, { key: 1 }, w(p.value, (e, n) => (x(), s("div", {
682
+ }, null, 10, xe)) : o("", !0), t.multiple && t.multipleDisplay === "tags" ? (x(!0), s(e, { key: 1 }, w(p.value, (e, n) => (x(), s("div", {
683
683
  key: `${t.formatLabel(e)}${n}`,
684
684
  class: "select-chip"
685
685
  }, [c("span", null, E(t.formatLabel(e)), 1), c("span", {
@@ -695,7 +695,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
695
695
  "stroke-width": "2",
696
696
  "stroke-linecap": "round",
697
697
  "stroke-linejoin": "round"
698
- }, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]], 8, X)]))), 128)) : o("", !0)]),
698
+ }, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]], 8, Se)]))), 128)) : o("", !0)]),
699
699
  t.clearable && m.value && !t.disabled ? (x(), s("button", {
700
700
  key: 0,
701
701
  class: "clear-btn",
@@ -1899,7 +1899,7 @@ var an = { class: "hero-section-container" }, on = { class: "hero-section" }, sn
1899
1899
  }, l({ _: 2 }, [
1900
1900
  e.batchDeletable ? {
1901
1901
  name: "batch",
1902
- fn: j(() => [f(xe, {
1902
+ fn: j(() => [f(ye, {
1903
1903
  "model-value": m.value,
1904
1904
  "onUpdate:modelValue": r[4] ||= () => g()
1905
1905
  }, null, 8, ["model-value"])]),
@@ -1907,7 +1907,7 @@ var an = { class: "hero-section-container" }, on = { class: "hero-section" }, sn
1907
1907
  } : void 0,
1908
1908
  t.$slots.item ? {
1909
1909
  name: "item",
1910
- fn: j(({ item: n, column: r, index: i }) => [e.batchDeletable ? (x(), s("td", ir, [f(xe, {
1910
+ fn: j(({ item: n, column: r, index: i }) => [e.batchDeletable ? (x(), s("td", ir, [f(ye, {
1911
1911
  onClick: N((e) => h(n), ["stop"]),
1912
1912
  "model-value": p(n.id)
1913
1913
  }, null, 8, ["onClick", "model-value"])])) : o("", !0), T(t.$slots, "item", {
@@ -2324,8 +2324,8 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2324
2324
  "四",
2325
2325
  "五",
2326
2326
  "六"
2327
- ], P = /* @__PURE__ */ new Date(), ee = P.getFullYear(), F = P.getMonth(), I = P.getDate();
2328
- function L(e, t) {
2327
+ ], P = /* @__PURE__ */ new Date(), F = P.getFullYear(), I = P.getMonth(), ee = P.getDate();
2328
+ function te(e, t) {
2329
2329
  let n = new Date(e, t, 1).getDay(), r = new Date(e, t + 1, 0).getDate(), i = new Date(e, t, 0).getDate(), a = [];
2330
2330
  for (let r = n - 1; r >= 0; r--) {
2331
2331
  let n = t === 0 ? 11 : t - 1, o = t === 0 ? e - 1 : e;
@@ -2351,30 +2351,30 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2351
2351
  });
2352
2352
  return a;
2353
2353
  }
2354
- function te(e, t) {
2354
+ function L(e, t) {
2355
2355
  return e.year === t.year ? e.month === t.month ? e.day - t.day : e.month - t.month : e.year - t.year;
2356
2356
  }
2357
2357
  function R(e) {
2358
2358
  return String(e).padStart(2, "0");
2359
2359
  }
2360
- let B = C("date"), V = C(/* @__PURE__ */ new Date()), H = C(null), U = C(0), W = C(0), ne = null, re = null, G = i(() => V.value.getFullYear()), ie = i(() => V.value.getMonth()), ae = C(Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 12) * 12), oe = i(() => {
2360
+ let B = C("date"), V = C(/* @__PURE__ */ new Date()), H = C(null), U = C(0), W = C(0), ne = null, re = null, G = i(() => V.value.getFullYear()), K = i(() => V.value.getMonth()), ie = C(Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 12) * 12), q = i(() => {
2361
2361
  let e = [];
2362
- for (let t = 0; t < 12; t++) e.push(ae.value + t);
2362
+ for (let t = 0; t < 12; t++) e.push(ie.value + t);
2363
2363
  return e;
2364
2364
  });
2365
2365
  A(G, (e) => {
2366
- ae.value = Math.floor(e / 12) * 12;
2366
+ ie.value = Math.floor(e / 12) * 12;
2367
2367
  }, { immediate: !0 }), A(() => t.modelValue, (e) => {
2368
2368
  if (!e) return;
2369
2369
  let t = p(String(e));
2370
2370
  t && (V.value = new Date(t.year, t.month, 1));
2371
2371
  }, { immediate: !0 });
2372
- let se = i(() => L(G.value, ie.value)), ce = i(() => {
2372
+ let ae = i(() => te(G.value, K.value)), oe = i(() => {
2373
2373
  if (!t.modelValue) return "";
2374
2374
  let e = p(String(t.modelValue));
2375
2375
  return e ? u(e.year, e.month, e.day, e.hour, e.min) : "";
2376
- }), le = i(() => t.range ? t.start && t.end ? `${t.start} → ${t.end}` : t.start ? `${t.start} → ...` : "" : ce.value);
2377
- function ue() {
2376
+ }), se = i(() => t.range ? t.start && t.end ? `${t.start} → ${t.end}` : t.start ? `${t.start} → ...` : "" : oe.value);
2377
+ function ce() {
2378
2378
  let e = p(String(t.modelValue));
2379
2379
  e ? (V.value = new Date(e.year, e.month, 1), U.value = e.hour, W.value = e.min, H.value = _.value ? {
2380
2380
  year: e.year,
@@ -2383,55 +2383,55 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2383
2383
  isCurrentMonth: !0
2384
2384
  } : null) : (U.value = 0, W.value = 0, H.value = null), B.value = "date";
2385
2385
  }
2386
- function de(e) {
2386
+ function le(e) {
2387
2387
  if (!t.modelValue) return !1;
2388
2388
  let n = p(String(t.modelValue));
2389
2389
  return n ? n.year === e.year && n.month === e.month && n.day === e.day : !1;
2390
2390
  }
2391
- function fe(e) {
2392
- return ee === e.year && F === e.month && I === e.day;
2391
+ function ue(e) {
2392
+ return F === e.year && I === e.month && ee === e.day;
2393
2393
  }
2394
- function pe(e) {
2395
- return _.value ? H.value !== null && H.value.year === e.year && H.value.month === e.month && H.value.day === e.day : de(e);
2394
+ function de(e) {
2395
+ return _.value ? H.value !== null && H.value.year === e.year && H.value.month === e.month && H.value.day === e.day : le(e);
2396
2396
  }
2397
- function me(e) {
2397
+ function fe(e) {
2398
2398
  let t = u(e.year, e.month, e.day, U.value, W.value);
2399
2399
  l("update:modelValue", t), l("change", t);
2400
2400
  }
2401
- function he(e) {
2402
- if (_.value) H.value = { ...e }, V.value = new Date(e.year, e.month, 1), me(e);
2401
+ function pe(e) {
2402
+ if (_.value) H.value = { ...e }, V.value = new Date(e.year, e.month, 1), fe(e);
2403
2403
  else {
2404
2404
  let t = u(e.year, e.month, e.day, 0, 0);
2405
2405
  l("update:modelValue", t), l("change", t), Be();
2406
2406
  }
2407
2407
  }
2408
- function ge(e) {
2409
- V.value = new Date(e, ie.value, 1), B.value = "date";
2408
+ function me(e) {
2409
+ V.value = new Date(e, K.value, 1), B.value = "date";
2410
2410
  }
2411
- function _e(e) {
2412
- V.value = new Date(G.value, ie.value + e, 1);
2411
+ function he(e) {
2412
+ V.value = new Date(G.value, K.value + e, 1);
2413
2413
  }
2414
- function ve(e) {
2415
- B.value === "year" ? ae.value += e * 12 : V.value = new Date(G.value + e, ie.value, 1);
2414
+ function ge(e) {
2415
+ B.value === "year" ? ie.value += e * 12 : V.value = new Date(G.value + e, K.value, 1);
2416
2416
  }
2417
- function ye(e, t) {
2418
- e === "H" ? U.value = Math.max(0, Math.min(23, U.value + t)) : W.value = Math.max(0, Math.min(59, W.value + t)), H.value && me(H.value);
2417
+ function _e(e, t) {
2418
+ e === "H" ? U.value = Math.max(0, Math.min(23, U.value + t)) : W.value = Math.max(0, Math.min(59, W.value + t)), H.value && fe(H.value);
2419
2419
  }
2420
- function be(e, t) {
2421
- ye(e, t), ne = setTimeout(() => {
2422
- re = setInterval(() => ye(e, t), 100);
2420
+ function ve(e, t) {
2421
+ _e(e, t), ne = setTimeout(() => {
2422
+ re = setInterval(() => _e(e, t), 100);
2423
2423
  }, 300);
2424
2424
  }
2425
- function K() {
2425
+ function J() {
2426
2426
  ne &&= (clearTimeout(ne), null), re &&= (clearInterval(re), null);
2427
2427
  }
2428
- function xe(e, t) {
2428
+ function ye(e, t) {
2429
2429
  let n = parseInt(e.target.value);
2430
- t === "H" ? U.value = n : W.value = n, H.value && me(H.value);
2430
+ t === "H" ? U.value = n : W.value = n, H.value && fe(H.value);
2431
2431
  }
2432
- let Se = C(ee), q = C(F), J = C(null), Y = C(null), X = C(null), Z = C(null), Ce = i(() => !!Y.value && !!X.value), we = i(() => q.value === 11 ? Se.value + 1 : Se.value), Te = i(() => q.value === 11 ? 0 : q.value + 1), Ee = i(() => L(Se.value, q.value)), De = i(() => L(we.value, Te.value)), Oe = i(() => [{
2433
- year: Se.value,
2434
- month: q.value,
2432
+ let be = C(F), Y = C(I), X = C(null), xe = C(null), Se = C(null), Z = C(null), Ce = i(() => !!xe.value && !!Se.value), we = i(() => Y.value === 11 ? be.value + 1 : be.value), Te = i(() => Y.value === 11 ? 0 : Y.value + 1), Ee = i(() => te(be.value, Y.value)), De = i(() => te(we.value, Te.value)), Oe = i(() => [{
2433
+ year: be.value,
2434
+ month: Y.value,
2435
2435
  days: Ee.value,
2436
2436
  isLeft: !0
2437
2437
  }, {
@@ -2449,49 +2449,49 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2449
2449
  isCurrentMonth: !0
2450
2450
  } : null;
2451
2451
  }
2452
- let Ae = i(() => J.value && Z.value ? te(J.value, Z.value) <= 0 ? J.value : Z.value : Y.value ?? ke(t.start)), je = i(() => J.value && Z.value ? te(J.value, Z.value) <= 0 ? Z.value : J.value : X.value ?? ke(t.end)), Me = i(() => {
2453
- if (J.value) {
2454
- let e = J.value;
2452
+ let Ae = i(() => X.value && Z.value ? L(X.value, Z.value) <= 0 ? X.value : Z.value : xe.value ?? ke(t.start)), je = i(() => X.value && Z.value ? L(X.value, Z.value) <= 0 ? Z.value : X.value : Se.value ?? ke(t.end)), Me = i(() => {
2453
+ if (X.value) {
2454
+ let e = X.value;
2455
2455
  return `${e.year}-${R(e.month + 1)}-${R(e.day)}`;
2456
2456
  }
2457
- if (Y.value) {
2458
- let e = Y.value;
2457
+ if (xe.value) {
2458
+ let e = xe.value;
2459
2459
  return `${e.year}-${R(e.month + 1)}-${R(e.day)}`;
2460
2460
  }
2461
2461
  return t.start;
2462
2462
  }), Ne = i(() => {
2463
- if (J.value) return "";
2464
- if (X.value) {
2465
- let e = X.value;
2463
+ if (X.value) return "";
2464
+ if (Se.value) {
2465
+ let e = Se.value;
2466
2466
  return `${e.year}-${R(e.month + 1)}-${R(e.day)}`;
2467
2467
  }
2468
2468
  return t.end;
2469
2469
  });
2470
2470
  function Pe() {
2471
2471
  let e = p(t.start) ?? {
2472
- year: ee,
2473
- month: F,
2472
+ year: F,
2473
+ month: I,
2474
2474
  day: 1,
2475
2475
  hour: 0,
2476
2476
  min: 0
2477
2477
  };
2478
- Se.value = e.year, q.value = e.month, Y.value = ke(t.start), X.value = ke(t.end), J.value = null, Z.value = null;
2478
+ be.value = e.year, Y.value = e.month, xe.value = ke(t.start), Se.value = ke(t.end), X.value = null, Z.value = null;
2479
2479
  }
2480
2480
  function Q() {
2481
- q.value === 0 ? (Se.value--, q.value = 11) : q.value--;
2481
+ Y.value === 0 ? (be.value--, Y.value = 11) : Y.value--;
2482
2482
  }
2483
2483
  function Fe() {
2484
- q.value === 11 ? (Se.value++, q.value = 0) : q.value++;
2484
+ Y.value === 11 ? (be.value++, Y.value = 0) : Y.value++;
2485
2485
  }
2486
2486
  function Ie(e) {
2487
- if (!J.value) J.value = { ...e }, Y.value = null, X.value = null;
2487
+ if (!X.value) X.value = { ...e }, xe.value = null, Se.value = null;
2488
2488
  else {
2489
- let t = J.value, [n, r] = te(t, e) <= 0 ? [t, e] : [e, t];
2490
- Y.value = n, X.value = r, J.value = null, Z.value = null;
2489
+ let t = X.value, [n, r] = L(t, e) <= 0 ? [t, e] : [e, t];
2490
+ xe.value = n, Se.value = r, X.value = null, Z.value = null;
2491
2491
  }
2492
2492
  }
2493
2493
  function Le(e) {
2494
- let t = e.year === ee && e.month === F && e.day === I, n = J.value && e.year === J.value.year && e.month === J.value.month && e.day === J.value.day, r = Ae.value, i = je.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 && te(e, r) > 0 && te(e, i) < 0;
2494
+ let t = e.year === F && e.month === I && e.day === ee, n = X.value && e.year === X.value.year && e.month === X.value.month && e.day === X.value.day, r = Ae.value, i = je.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 && L(e, r) > 0 && L(e, i) < 0;
2495
2495
  return {
2496
2496
  "is-other-month": !e.isCurrentMonth,
2497
2497
  "is-today": t && !a && !o,
@@ -2502,15 +2502,15 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2502
2502
  };
2503
2503
  }
2504
2504
  function Re() {
2505
- if (!Y.value || !X.value) return;
2506
- let e = Y.value, t = X.value, n = `${e.year}-${R(e.month + 1)}-${R(e.day)}`, r = `${t.year}-${R(t.month + 1)}-${R(t.day)}`;
2505
+ if (!xe.value || !Se.value) return;
2506
+ let e = xe.value, t = Se.value, n = `${e.year}-${R(e.month + 1)}-${R(e.day)}`, r = `${t.year}-${R(t.month + 1)}-${R(t.day)}`;
2507
2507
  l("update:start", n), l("update:end", r), l("change", n, r), Be();
2508
2508
  }
2509
2509
  function ze() {
2510
- t.disabled || (b.value || (t.range ? Pe() : ue()), b.value = !b.value);
2510
+ t.disabled || (b.value || (t.range ? Pe() : ce()), b.value = !b.value);
2511
2511
  }
2512
2512
  function Be() {
2513
- b.value = !1, J.value = null, Z.value = null;
2513
+ b.value = !1, X.value = null, Z.value = null;
2514
2514
  }
2515
2515
  function Ve() {
2516
2516
  B.value = B.value === "date" ? "year" : "date";
@@ -2522,11 +2522,11 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2522
2522
  y(() => {
2523
2523
  document.addEventListener("mousedown", He), window.addEventListener("resize", O);
2524
2524
  }), v(() => {
2525
- document.removeEventListener("mousedown", He), window.removeEventListener("resize", O), D && clearTimeout(D), K();
2525
+ document.removeEventListener("mousedown", He), window.removeEventListener("resize", O), D && clearTimeout(D), J();
2526
2526
  });
2527
2527
  let Ue = (e) => {
2528
2528
  if (e.stopPropagation(), t.range) {
2529
- Y.value = null, X.value = null, J.value = null, Z.value = null, l("update:start", ""), l("update:end", ""), l("change", "", ""), l("clear");
2529
+ xe.value = null, Se.value = null, X.value = null, Z.value = null, l("update:start", ""), l("update:end", ""), l("change", "", ""), l("clear");
2530
2530
  return;
2531
2531
  }
2532
2532
  l("update:modelValue", ""), l("change", ""), l("clear");
@@ -2543,7 +2543,7 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2543
2543
  }]) }, [c("div", {
2544
2544
  class: "picker-trigger",
2545
2545
  onClick: ze
2546
- }, [c("span", { class: g(["text", { placeholder: !le.value }]) }, E(le.value || t.placeholder), 3), t.clearable && le.value ? (x(), a(z, {
2546
+ }, [c("span", { class: g(["text", { placeholder: !se.value }]) }, E(se.value || t.placeholder), 3), t.clearable && se.value ? (x(), a(z, {
2547
2547
  key: 0,
2548
2548
  variant: "none",
2549
2549
  square: "",
@@ -2569,7 +2569,7 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2569
2569
  c("div", jr, [f(z, {
2570
2570
  variant: "ghost",
2571
2571
  square: "",
2572
- onClick: i[0] ||= (e) => ve(-1)
2572
+ onClick: i[0] ||= (e) => ge(-1)
2573
2573
  }, {
2574
2574
  default: j(() => [...i[21] ||= [c("svg", {
2575
2575
  xmlns: "http://www.w3.org/2000/svg",
@@ -2587,7 +2587,7 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2587
2587
  key: 0,
2588
2588
  variant: "ghost",
2589
2589
  square: "",
2590
- onClick: i[1] ||= (e) => _e(-1)
2590
+ onClick: i[1] ||= (e) => he(-1)
2591
2591
  }, {
2592
2592
  default: j(() => [...i[22] ||= [c("svg", {
2593
2593
  xmlns: "http://www.w3.org/2000/svg",
@@ -2605,12 +2605,12 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2605
2605
  c("div", {
2606
2606
  class: "header-title",
2607
2607
  onClick: Ve
2608
- }, [B.value === "date" ? (x(), s(e, { key: 0 }, [d(E(k[ie.value]) + " " + E(G.value), 1)], 64)) : (x(), s(e, { key: 1 }, [d(E(oe.value[0]) + " - " + E(oe.value[oe.value.length - 1]), 1)], 64))]),
2608
+ }, [B.value === "date" ? (x(), s(e, { key: 0 }, [d(E(k[K.value]) + " " + E(G.value), 1)], 64)) : (x(), s(e, { key: 1 }, [d(E(q.value[0]) + " - " + E(q.value[q.value.length - 1]), 1)], 64))]),
2609
2609
  c("div", Mr, [B.value === "date" ? (x(), a(z, {
2610
2610
  key: 0,
2611
2611
  variant: "ghost",
2612
2612
  square: "",
2613
- onClick: i[2] ||= (e) => _e(1)
2613
+ onClick: i[2] ||= (e) => he(1)
2614
2614
  }, {
2615
2615
  default: j(() => [...i[23] ||= [c("svg", {
2616
2616
  xmlns: "http://www.w3.org/2000/svg",
@@ -2627,7 +2627,7 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2627
2627
  })) : o("", !0), f(z, {
2628
2628
  variant: "ghost",
2629
2629
  square: "",
2630
- onClick: i[3] ||= (e) => ve(1)
2630
+ onClick: i[3] ||= (e) => ge(1)
2631
2631
  }, {
2632
2632
  default: j(() => [...i[24] ||= [c("svg", {
2633
2633
  xmlns: "http://www.w3.org/2000/svg",
@@ -2646,13 +2646,13 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2646
2646
  c("div", Nr, [B.value === "date" ? (x(), s(e, { key: 0 }, [c("div", Pr, [(x(), s(e, null, w(M, (e) => c("span", {
2647
2647
  key: e,
2648
2648
  class: "weekday"
2649
- }, E(e), 1)), 64))]), c("div", Fr, [(x(!0), s(e, null, w(se.value, (e, t) => (x(), a(z, {
2649
+ }, E(e), 1)), 64))]), c("div", Fr, [(x(!0), s(e, null, w(ae.value, (e, t) => (x(), a(z, {
2650
2650
  key: t,
2651
- variant: pe(e) ? "solid" : fe(e) ? "mute" : "ghost",
2652
- intent: pe(e) || fe(e) ? "primary" : "none",
2651
+ variant: de(e) ? "solid" : ue(e) ? "mute" : "ghost",
2652
+ intent: de(e) || ue(e) ? "primary" : "none",
2653
2653
  class: g(["day-cell", { "is-not-current": !e.isCurrentMonth }]),
2654
2654
  padding: "0",
2655
- onClick: (t) => he(e)
2655
+ onClick: (t) => pe(e)
2656
2656
  }, {
2657
2657
  default: j(() => [d(E(e.day), 1)]),
2658
2658
  _: 2
@@ -2661,12 +2661,12 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2661
2661
  "intent",
2662
2662
  "class",
2663
2663
  "onClick"
2664
- ]))), 128))])], 64)) : (x(), s("div", Ir, [(x(!0), s(e, null, w(oe.value, (e) => (x(), a(z, {
2664
+ ]))), 128))])], 64)) : (x(), s("div", Ir, [(x(!0), s(e, null, w(q.value, (e) => (x(), a(z, {
2665
2665
  key: e,
2666
2666
  variant: e === G.value ? "solid" : "ghost",
2667
2667
  intent: e === G.value ? "primary" : "none",
2668
2668
  class: "year-cell",
2669
- onClick: (t) => ge(e)
2669
+ onClick: (t) => me(e)
2670
2670
  }, {
2671
2671
  default: j(() => [d(E(e), 1)]),
2672
2672
  _: 2
@@ -2682,9 +2682,9 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2682
2682
  square: "",
2683
2683
  size: "sm",
2684
2684
  class: "time-step",
2685
- onMousedown: i[4] ||= N((e) => be("H", -1), ["prevent"]),
2686
- onMouseup: K,
2687
- onMouseleave: K
2685
+ onMousedown: i[4] ||= N((e) => ve("H", -1), ["prevent"]),
2686
+ onMouseup: J,
2687
+ onMouseleave: J
2688
2688
  }, {
2689
2689
  default: j(() => [...i[25] ||= [c("svg", {
2690
2690
  xmlns: "http://www.w3.org/2000/svg",
@@ -2705,16 +2705,16 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2705
2705
  min: "0",
2706
2706
  max: "23",
2707
2707
  value: U.value,
2708
- onInput: i[5] ||= (e) => xe(e, "H")
2708
+ onInput: i[5] ||= (e) => ye(e, "H")
2709
2709
  }, null, 40, Br),
2710
2710
  f(z, {
2711
2711
  variant: "ghost",
2712
2712
  square: "",
2713
2713
  size: "sm",
2714
2714
  class: "time-step",
2715
- onMousedown: i[6] ||= N((e) => be("H", 1), ["prevent"]),
2716
- onMouseup: K,
2717
- onMouseleave: K
2715
+ onMousedown: i[6] ||= N((e) => ve("H", 1), ["prevent"]),
2716
+ onMouseup: J,
2717
+ onMouseleave: J
2718
2718
  }, {
2719
2719
  default: j(() => [...i[26] ||= [c("svg", {
2720
2720
  xmlns: "http://www.w3.org/2000/svg",
@@ -2737,9 +2737,9 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2737
2737
  square: "",
2738
2738
  size: "sm",
2739
2739
  class: "time-step",
2740
- onMousedown: i[7] ||= N((e) => be("m", -1), ["prevent"]),
2741
- onMouseup: K,
2742
- onMouseleave: K
2740
+ onMousedown: i[7] ||= N((e) => ve("m", -1), ["prevent"]),
2741
+ onMouseup: J,
2742
+ onMouseleave: J
2743
2743
  }, {
2744
2744
  default: j(() => [...i[28] ||= [c("svg", {
2745
2745
  xmlns: "http://www.w3.org/2000/svg",
@@ -2760,16 +2760,16 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2760
2760
  min: "0",
2761
2761
  max: "59",
2762
2762
  value: W.value,
2763
- onInput: i[8] ||= (e) => xe(e, "m")
2763
+ onInput: i[8] ||= (e) => ye(e, "m")
2764
2764
  }, null, 40, Ur),
2765
2765
  f(z, {
2766
2766
  variant: "ghost",
2767
2767
  square: "",
2768
2768
  size: "sm",
2769
2769
  class: "time-step",
2770
- onMousedown: i[9] ||= N((e) => be("m", 1), ["prevent"]),
2771
- onMouseup: K,
2772
- onMouseleave: K
2770
+ onMousedown: i[9] ||= N((e) => ve("m", 1), ["prevent"]),
2771
+ onMouseup: J,
2772
+ onMouseleave: J
2773
2773
  }, {
2774
2774
  default: j(() => [...i[29] ||= [c("svg", {
2775
2775
  xmlns: "http://www.w3.org/2000/svg",
@@ -2800,7 +2800,7 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2800
2800
  c("div", qr, [f(z, {
2801
2801
  variant: "ghost",
2802
2802
  square: "",
2803
- onClick: i[10] ||= (e) => ve(-1)
2803
+ onClick: i[10] ||= (e) => ge(-1)
2804
2804
  }, {
2805
2805
  default: j(() => [...i[31] ||= [c("svg", {
2806
2806
  xmlns: "http://www.w3.org/2000/svg",
@@ -2818,7 +2818,7 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2818
2818
  key: 0,
2819
2819
  variant: "ghost",
2820
2820
  square: "",
2821
- onClick: i[11] ||= (e) => _e(-1)
2821
+ onClick: i[11] ||= (e) => he(-1)
2822
2822
  }, {
2823
2823
  default: j(() => [...i[32] ||= [c("svg", {
2824
2824
  xmlns: "http://www.w3.org/2000/svg",
@@ -2836,12 +2836,12 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2836
2836
  c("div", {
2837
2837
  class: "header-title",
2838
2838
  onClick: Ve
2839
- }, [B.value === "date" ? (x(), s(e, { key: 0 }, [d(E(k[ie.value]) + " " + E(G.value), 1)], 64)) : (x(), s(e, { key: 1 }, [d(E(oe.value[0]) + " - " + E(oe.value[oe.value.length - 1]), 1)], 64))]),
2839
+ }, [B.value === "date" ? (x(), s(e, { key: 0 }, [d(E(k[K.value]) + " " + E(G.value), 1)], 64)) : (x(), s(e, { key: 1 }, [d(E(q.value[0]) + " - " + E(q.value[q.value.length - 1]), 1)], 64))]),
2840
2840
  c("div", Jr, [B.value === "date" ? (x(), a(z, {
2841
2841
  key: 0,
2842
2842
  variant: "ghost",
2843
2843
  square: "",
2844
- onClick: i[12] ||= (e) => _e(1)
2844
+ onClick: i[12] ||= (e) => he(1)
2845
2845
  }, {
2846
2846
  default: j(() => [...i[33] ||= [c("svg", {
2847
2847
  xmlns: "http://www.w3.org/2000/svg",
@@ -2858,7 +2858,7 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2858
2858
  })) : o("", !0), f(z, {
2859
2859
  variant: "ghost",
2860
2860
  square: "",
2861
- onClick: i[13] ||= (e) => ve(1)
2861
+ onClick: i[13] ||= (e) => ge(1)
2862
2862
  }, {
2863
2863
  default: j(() => [...i[34] ||= [c("svg", {
2864
2864
  xmlns: "http://www.w3.org/2000/svg",
@@ -2877,13 +2877,13 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2877
2877
  c("div", Yr, [B.value === "date" ? (x(), s(e, { key: 0 }, [c("div", Xr, [(x(), s(e, null, w(M, (e) => c("span", {
2878
2878
  key: e,
2879
2879
  class: "weekday"
2880
- }, E(e), 1)), 64))]), c("div", Zr, [(x(!0), s(e, null, w(se.value, (e, t) => (x(), a(z, {
2880
+ }, E(e), 1)), 64))]), c("div", Zr, [(x(!0), s(e, null, w(ae.value, (e, t) => (x(), a(z, {
2881
2881
  key: t,
2882
- variant: pe(e) ? "solid" : fe(e) ? "mute" : "ghost",
2883
- intent: pe(e) || fe(e) ? "primary" : "none",
2882
+ variant: de(e) ? "solid" : ue(e) ? "mute" : "ghost",
2883
+ intent: de(e) || ue(e) ? "primary" : "none",
2884
2884
  class: g(["day-cell", { "is-not-current": !e.isCurrentMonth }]),
2885
2885
  padding: "0",
2886
- onClick: (t) => he(e)
2886
+ onClick: (t) => pe(e)
2887
2887
  }, {
2888
2888
  default: j(() => [d(E(e.day), 1)]),
2889
2889
  _: 2
@@ -2892,12 +2892,12 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2892
2892
  "intent",
2893
2893
  "class",
2894
2894
  "onClick"
2895
- ]))), 128))])], 64)) : (x(), s("div", Qr, [(x(!0), s(e, null, w(oe.value, (e) => (x(), a(z, {
2895
+ ]))), 128))])], 64)) : (x(), s("div", Qr, [(x(!0), s(e, null, w(q.value, (e) => (x(), a(z, {
2896
2896
  key: e,
2897
2897
  variant: e === G.value ? "solid" : "ghost",
2898
2898
  intent: e === G.value ? "primary" : "none",
2899
2899
  class: "year-cell",
2900
- onClick: (t) => ge(e)
2900
+ onClick: (t) => me(e)
2901
2901
  }, {
2902
2902
  default: j(() => [d(E(e), 1)]),
2903
2903
  _: 2
@@ -2913,9 +2913,9 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2913
2913
  square: "",
2914
2914
  size: "sm",
2915
2915
  class: "time-step",
2916
- onMousedown: i[14] ||= N((e) => be("H", -1), ["prevent"]),
2917
- onMouseup: K,
2918
- onMouseleave: K
2916
+ onMousedown: i[14] ||= N((e) => ve("H", -1), ["prevent"]),
2917
+ onMouseup: J,
2918
+ onMouseleave: J
2919
2919
  }, {
2920
2920
  default: j(() => [...i[35] ||= [c("svg", {
2921
2921
  xmlns: "http://www.w3.org/2000/svg",
@@ -2936,16 +2936,16 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2936
2936
  min: "0",
2937
2937
  max: "23",
2938
2938
  value: U.value,
2939
- onInput: i[15] ||= (e) => xe(e, "H")
2939
+ onInput: i[15] ||= (e) => ye(e, "H")
2940
2940
  }, null, 40, ni),
2941
2941
  f(z, {
2942
2942
  variant: "ghost",
2943
2943
  square: "",
2944
2944
  size: "sm",
2945
2945
  class: "time-step",
2946
- onMousedown: i[16] ||= N((e) => be("H", 1), ["prevent"]),
2947
- onMouseup: K,
2948
- onMouseleave: K
2946
+ onMousedown: i[16] ||= N((e) => ve("H", 1), ["prevent"]),
2947
+ onMouseup: J,
2948
+ onMouseleave: J
2949
2949
  }, {
2950
2950
  default: j(() => [...i[36] ||= [c("svg", {
2951
2951
  xmlns: "http://www.w3.org/2000/svg",
@@ -2968,9 +2968,9 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2968
2968
  square: "",
2969
2969
  size: "sm",
2970
2970
  class: "time-step",
2971
- onMousedown: i[17] ||= N((e) => be("m", -1), ["prevent"]),
2972
- onMouseup: K,
2973
- onMouseleave: K
2971
+ onMousedown: i[17] ||= N((e) => ve("m", -1), ["prevent"]),
2972
+ onMouseup: J,
2973
+ onMouseleave: J
2974
2974
  }, {
2975
2975
  default: j(() => [...i[38] ||= [c("svg", {
2976
2976
  xmlns: "http://www.w3.org/2000/svg",
@@ -2991,16 +2991,16 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
2991
2991
  min: "0",
2992
2992
  max: "59",
2993
2993
  value: W.value,
2994
- onInput: i[18] ||= (e) => xe(e, "m")
2994
+ onInput: i[18] ||= (e) => ye(e, "m")
2995
2995
  }, null, 40, ai),
2996
2996
  f(z, {
2997
2997
  variant: "ghost",
2998
2998
  square: "",
2999
2999
  size: "sm",
3000
3000
  class: "time-step",
3001
- onMousedown: i[19] ||= N((e) => be("m", 1), ["prevent"]),
3002
- onMouseup: K,
3003
- onMouseleave: K
3001
+ onMousedown: i[19] ||= N((e) => ve("m", 1), ["prevent"]),
3002
+ onMouseup: J,
3003
+ onMouseleave: J
3004
3004
  }, {
3005
3005
  default: j(() => [...i[39] ||= [c("svg", {
3006
3006
  xmlns: "http://www.w3.org/2000/svg",
@@ -3124,7 +3124,7 @@ var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
3124
3124
  }, [c("path", { d: "m15 18-6-6 6-6" })], -1)]]),
3125
3125
  _: 1
3126
3126
  })]),
3127
- c("div", Ti, E(k[q.value]) + " " + E(Se.value), 1),
3127
+ c("div", Ti, E(k[Y.value]) + " " + E(be.value), 1),
3128
3128
  c("div", Ei, [f(z, {
3129
3129
  variant: "ghost",
3130
3130
  square: "",
@@ -3426,13 +3426,20 @@ var ea = {
3426
3426
  }, ta = ["textContent"], na = {
3427
3427
  key: 1,
3428
3428
  class: "count-chip"
3429
- }, ra = { class: "grid" }, ia = ["textContent"], aa = ["textContent"], oa = ["onClick"], sa = ["src"], ca = {
3429
+ }, ra = { class: "grid" }, ia = {
3430
+ key: 0,
3431
+ class: "icon",
3432
+ "aria-hidden": "true"
3433
+ }, aa = ["textContent"], oa = ["textContent"], sa = ["onClick"], ca = ["src"], la = {
3430
3434
  key: 1,
3431
3435
  class: "placeholder-label"
3432
- }, la = { class: "duration" }, ua = { class: "card-body" }, da = ["title"], fa = { class: "file-meta" }, pa = { class: "card-actions" }, ma = ["onClick"], ha = ["disabled", "onClick"], ga = { class: "vi-modal-card" }, _a = { class: "vi-modal-media" }, va = ["src"], ya = {
3436
+ }, ua = { class: "duration" }, da = { class: "card-body" }, fa = ["title"], pa = { class: "file-meta" }, ma = { key: 0 }, ha = {
3437
+ key: 1,
3438
+ class: "dot-separator"
3439
+ }, ga = { key: 2 }, _a = { class: "card-actions" }, va = ["onClick"], ya = ["disabled", "onClick"], ba = { class: "vi-modal-card" }, xa = { class: "vi-modal-media" }, Sa = ["src"], Ca = {
3433
3440
  key: 1,
3434
3441
  class: "vi-modal-placeholder"
3435
- }, ba = { class: "vi-modal-bar" }, xa = { class: "vi-modal-info" }, Sa = { class: "modal-name" }, Ca = { class: "modal-meta" }, wa = /* @__PURE__ */ R(/* @__PURE__ */ p({
3442
+ }, wa = { class: "vi-modal-bar" }, Ta = { class: "vi-modal-info" }, Ea = { class: "modal-name" }, Da = { class: "modal-meta" }, Oa = /* @__PURE__ */ R(/* @__PURE__ */ p({
3436
3443
  __name: "NVideoSelect",
3437
3444
  props: {
3438
3445
  modelValue: { default: () => [] },
@@ -3446,6 +3453,10 @@ var ea = {
3446
3453
  type: Boolean,
3447
3454
  default: !1
3448
3455
  },
3456
+ readonly: {
3457
+ type: Boolean,
3458
+ default: !1
3459
+ },
3449
3460
  title: { default: "" },
3450
3461
  showCount: {
3451
3462
  type: Boolean,
@@ -3466,20 +3477,32 @@ var ea = {
3466
3477
  "error"
3467
3478
  ],
3468
3479
  setup(r, { emit: l }) {
3469
- let p = l, h = C(!1), _ = C(null), [y, b, S] = $i(), { confirm: T } = Rt(), O = i(() => r.modelValue.length), k = (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", M = (e) => {
3480
+ let u = l, p = C(!1), h = C(null), [_, y, b] = $i(), { confirm: S } = Rt(), T = i(() => r.modelValue.length), O = (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", k = (e) => {
3470
3481
  if (e == null || isNaN(e)) return "0:00";
3471
3482
  let t = Math.round(e), n = Math.floor(t / 60), r = t % 60;
3472
3483
  return n + ":" + (r < 10 ? "0" : "") + r;
3473
- }, P = (e) => e.width && e.height ? e.width + "×" + e.height : "—", ee = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "v" + Math.random().toString(36).slice(2, 9), F = (e) => {
3484
+ }, M = (e) => e.width && e.height ? e.width + "×" + e.height : "—", P = (e) => {
3485
+ if (e.name) return e.name;
3486
+ try {
3487
+ let t = new URL(e.url, window.location.href).pathname;
3488
+ return decodeURIComponent(t.split("/").filter(Boolean).pop() ?? "影片");
3489
+ } catch {
3490
+ return "影片";
3491
+ }
3492
+ }, F = (e) => {
3493
+ e?.startsWith("blob:") && URL.revokeObjectURL(e);
3494
+ }, I = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "v" + Math.random().toString(36).slice(2, 9), ee = (e) => {
3474
3495
  let t = r.accept.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
3475
3496
  if (t.length === 0) return e.type.startsWith("video/");
3476
3497
  let n = e.type.toLowerCase(), i = e.name.toLowerCase();
3477
3498
  return t.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? n.startsWith(e.slice(0, -1)) : n === e);
3478
- }, I = (e) => {
3499
+ }, te = (e) => {
3479
3500
  if (!e.url) return;
3480
3501
  let t = document.createElement("video");
3481
3502
  t.preload = "metadata";
3482
3503
  let n = () => {
3504
+ t.removeEventListener("loadedmetadata", i), t.removeEventListener("error", n), t.removeAttribute("src"), t.load();
3505
+ }, i = () => {
3483
3506
  if (r.modelValue.some((t) => t.id === e.id)) {
3484
3507
  let n = r.modelValue.map((n) => n.id === e.id ? {
3485
3508
  ...n,
@@ -3487,38 +3510,44 @@ var ea = {
3487
3510
  width: t.videoWidth,
3488
3511
  height: t.videoHeight
3489
3512
  } : n);
3490
- p("update:modelValue", n), p("change", n);
3513
+ u("update:modelValue", n), u("change", n);
3491
3514
  }
3492
- t.removeEventListener("loadedmetadata", n), t.removeAttribute("src"), t.load();
3515
+ n();
3493
3516
  };
3494
- t.addEventListener("loadedmetadata", n), t.src = e.url;
3495
- }, L = (e) => {
3496
- if (r.disabled) return;
3517
+ t.addEventListener("loadedmetadata", i), t.addEventListener("error", n), t.src = e.url;
3518
+ }, L = /* @__PURE__ */ new Set();
3519
+ A(() => r.modelValue, (e) => {
3520
+ e.forEach((e) => {
3521
+ !e.url || L.has(e.id) || (L.add(e.id), (e.duration == null || e.width == null) && te(e));
3522
+ });
3523
+ }, { immediate: !0 });
3524
+ let R = (e) => {
3525
+ if (r.disabled || r.readonly) return;
3497
3526
  let t = [], n = !1;
3498
3527
  if (Array.prototype.forEach.call(e, (e) => {
3499
- if (!F(e)) {
3500
- p("error", {
3528
+ if (!ee(e)) {
3529
+ u("error", {
3501
3530
  type: "type",
3502
3531
  file: e
3503
3532
  });
3504
3533
  return;
3505
3534
  }
3506
3535
  if (r.maxSize > 0 && e.size > r.maxSize * 1024 * 1024) {
3507
- p("error", {
3536
+ u("error", {
3508
3537
  type: "size",
3509
3538
  file: e
3510
3539
  });
3511
3540
  return;
3512
3541
  }
3513
3542
  if (!r.multiple && r.modelValue.length + t.length >= 1) {
3514
- n ||= (p("error", {
3543
+ n ||= (u("error", {
3515
3544
  type: "count",
3516
3545
  file: e
3517
3546
  }), !0);
3518
3547
  return;
3519
3548
  }
3520
3549
  t.push({
3521
- id: ee(),
3550
+ id: I(),
3522
3551
  file: e,
3523
3552
  name: e.name,
3524
3553
  size: e.size,
@@ -3529,89 +3558,109 @@ var ea = {
3529
3558
  });
3530
3559
  }), t.length === 0) return;
3531
3560
  let i = [...r.modelValue, ...t];
3532
- p("update:modelValue", i), p("change", i), p("add", t), t.forEach(I);
3533
- }, te = async () => {
3534
- if (!r.disabled) if (r.multiple) {
3561
+ u("update:modelValue", i), u("change", i), u("add", t), t.forEach((e) => {
3562
+ L.add(e.id), te(e);
3563
+ });
3564
+ }, z = async () => {
3565
+ if (!(r.disabled || r.readonly)) if (r.multiple) {
3535
3566
  let e = await $.input.custom(r.accept, !0);
3536
3567
  if (e.length === 0) return;
3537
- L(e.map((e) => e.file));
3568
+ R(e.map((e) => e.file));
3538
3569
  } else {
3539
3570
  let e = await $.input.custom(r.accept, !1);
3540
3571
  if (!e) return;
3541
- L([e.file]);
3572
+ R([e.file]);
3542
3573
  }
3543
- }, R = async (e) => {
3544
- if (r.disabled) return;
3574
+ }, B = async (e) => {
3575
+ if (r.disabled || r.readonly) return;
3545
3576
  let t = r.modelValue.find((t) => t.id === e);
3546
- if (!t || !await T(`確定要移除「${t.name}」嗎?`, {
3577
+ if (!t || !await S(`確定要移除「${P(t)}」嗎?`, {
3547
3578
  title: "移除影片",
3548
3579
  status: "danger",
3549
3580
  confirmText: "移除",
3550
3581
  cancelText: "取消"
3551
3582
  })) return;
3552
- t.url && URL.revokeObjectURL(t.url);
3583
+ F(t.url);
3553
3584
  let n = r.modelValue.filter((t) => t.id !== e);
3554
- p("update:modelValue", n), p("change", n), p("remove", t);
3555
- }, z = (e) => {
3556
- _.value = e, b();
3557
- }, B = () => {
3558
- S();
3559
- }, V = i(() => {
3560
- let e = _.value;
3585
+ u("update:modelValue", n), u("change", n), u("remove", t);
3586
+ }, V = (e) => {
3587
+ h.value = e, y();
3588
+ }, H = () => {
3589
+ b();
3590
+ }, U = i(() => {
3591
+ let e = h.value;
3561
3592
  return e ? [
3562
- k(e.size),
3563
- P(e),
3564
- M(e.duration)
3565
- ].join(" · ") : "";
3566
- }), H = (e) => {
3567
- e.key === "Escape" && B();
3568
- }, U = "";
3569
- A(y, (e) => {
3570
- e ? (U = document.body.style.overflow, document.body.style.overflow = "hidden", document.addEventListener("keydown", H)) : (document.body.style.overflow = U, document.removeEventListener("keydown", H));
3593
+ e.size == null ? null : O(e.size),
3594
+ e.width && e.height ? M(e) : null,
3595
+ k(e.duration)
3596
+ ].filter(Boolean).join(" · ") : "";
3597
+ }), W = (e) => {
3598
+ e.key === "Escape" && H();
3599
+ }, ne = "";
3600
+ A(_, (e) => {
3601
+ e ? (ne = document.body.style.overflow, document.body.style.overflow = "hidden", document.addEventListener("keydown", W)) : (document.body.style.overflow = ne, document.removeEventListener("keydown", W));
3571
3602
  }), v(() => {
3572
- document.body.style.overflow = U, document.removeEventListener("keydown", H), r.autoRevoke && r.modelValue.forEach((e) => {
3573
- e.url && URL.revokeObjectURL(e.url);
3574
- });
3603
+ document.body.style.overflow = ne, document.removeEventListener("keydown", W), r.autoRevoke && r.modelValue.forEach((e) => F(e.url));
3575
3604
  });
3576
- let W = {
3577
- onClick: te,
3605
+ let re = {
3606
+ onClick: z,
3578
3607
  onDragenter: (e) => {
3579
- r.disabled || (e.preventDefault(), h.value = !0);
3608
+ r.disabled || r.readonly || (e.preventDefault(), p.value = !0);
3580
3609
  },
3581
3610
  onDragover: (e) => e.preventDefault(),
3582
3611
  onDragleave: (e) => {
3583
- e.preventDefault(), h.value = !1;
3612
+ e.preventDefault(), p.value = !1;
3584
3613
  },
3585
3614
  onDrop: (e) => {
3586
- r.disabled || (e.preventDefault(), h.value = !1, e.dataTransfer?.files?.length && L(e.dataTransfer.files));
3615
+ r.disabled || r.readonly || (e.preventDefault(), p.value = !1, e.dataTransfer?.files?.length && R(e.dataTransfer.files));
3587
3616
  }
3588
3617
  };
3589
- return (i, l) => (x(), s("div", { class: g(["video-input", { "is-disabled": r.disabled }]) }, [
3618
+ return (i, l) => (x(), s("div", { class: g(["video-input", {
3619
+ "is-disabled": r.disabled,
3620
+ "is-readonly": r.readonly
3621
+ }]) }, [
3590
3622
  r.title || r.showCount ? (x(), s("div", ea, [r.title ? (x(), s("span", {
3591
3623
  key: 0,
3592
3624
  class: "title",
3593
3625
  textContent: E(r.title)
3594
- }, null, 8, ta)) : o("", !0), r.showCount ? (x(), s("span", na, E(O.value) + " 支", 1)) : o("", !0)])) : o("", !0),
3595
- c("div", ra, [O.value === 0 ? (x(), s("div", m({
3626
+ }, null, 8, ta)) : o("", !0), r.showCount ? (x(), s("span", na, E(T.value) + " 支", 1)) : o("", !0)])) : o("", !0),
3627
+ c("div", ra, [T.value === 0 ? (x(), s("div", m({
3596
3628
  key: 0,
3597
- class: ["empty", { "is-drag": h.value }]
3598
- }, W), [
3599
- l[0] ||= u("<span class=\"icon\" aria-hidden=\"true\" data-v-8ea5b0a2><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-8ea5b0a2><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" data-v-8ea5b0a2></path><path d=\"M7 9l5-5 5 5\" data-v-8ea5b0a2></path><path d=\"M12 4v12\" data-v-8ea5b0a2></path></svg></span>", 1),
3600
- c("h3", { textContent: E(r.emptyTitle) }, null, 8, ia),
3601
- c("p", { textContent: E(r.emptyHint) }, null, 8, aa)
3629
+ class: ["empty", {
3630
+ "is-drag": p.value,
3631
+ "is-static": r.readonly
3632
+ }]
3633
+ }, r.readonly ? {} : re), [
3634
+ r.readonly ? o("", !0) : (x(), s("span", ia, [...l[0] ||= [c("svg", {
3635
+ viewBox: "0 0 24 24",
3636
+ fill: "none",
3637
+ stroke: "currentColor",
3638
+ "stroke-width": "1.7",
3639
+ "stroke-linecap": "round",
3640
+ "stroke-linejoin": "round"
3641
+ }, [
3642
+ c("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
3643
+ c("path", { d: "M7 9l5-5 5 5" }),
3644
+ c("path", { d: "M12 4v12" })
3645
+ ], -1)]])),
3646
+ c("h3", { textContent: E(r.readonly ? "目前沒有影片" : r.emptyTitle) }, null, 8, aa),
3647
+ r.readonly ? o("", !0) : (x(), s("p", {
3648
+ key: 1,
3649
+ textContent: E(r.emptyHint)
3650
+ }, null, 8, oa))
3602
3651
  ], 16)) : (x(), s(e, { key: 1 }, [(x(!0), s(e, null, w(r.modelValue, (e) => (x(), s("div", {
3603
3652
  key: e.id,
3604
3653
  class: "card"
3605
3654
  }, [c("div", {
3606
3655
  class: g(["thumb", { placeholder: !e.url }]),
3607
- onClick: (t) => z(e)
3656
+ onClick: (t) => V(e)
3608
3657
  }, [
3609
3658
  e.url ? (x(), s("video", {
3610
3659
  key: 0,
3611
3660
  src: e.url + "#t=0.5",
3612
3661
  muted: "",
3613
3662
  preload: "metadata"
3614
- }, null, 8, sa)) : (x(), s("div", ca, "縮圖預覽")),
3663
+ }, null, 8, ca)) : (x(), s("div", la, "縮圖預覽")),
3615
3664
  l[1] ||= c("div", {
3616
3665
  class: "play",
3617
3666
  "aria-hidden": "true"
@@ -3619,21 +3668,21 @@ var ea = {
3619
3668
  viewBox: "0 0 24 24",
3620
3669
  fill: "currentColor"
3621
3670
  }, [c("path", { d: "M8 5v14l11-7z" })])], -1),
3622
- c("div", la, E(M(e.duration)), 1)
3623
- ], 10, oa), c("div", ua, [
3671
+ c("div", ua, E(k(e.duration)), 1)
3672
+ ], 10, sa), c("div", da, [
3624
3673
  c("div", {
3625
3674
  class: "file-name",
3626
- title: e.name
3627
- }, E(e.name), 9, da),
3628
- c("div", fa, [
3629
- c("span", null, E(k(e.size)), 1),
3630
- l[2] ||= c("span", { class: "dot-separator" }, null, -1),
3631
- c("span", null, E(P(e)), 1)
3675
+ title: P(e)
3676
+ }, E(P(e)), 9, fa),
3677
+ c("div", pa, [
3678
+ e.size == null ? o("", !0) : (x(), s("span", ma, E(O(e.size)), 1)),
3679
+ e.size != null && e.width && e.height ? (x(), s("span", ha)) : o("", !0),
3680
+ e.width && e.height ? (x(), s("span", ga, E(M(e)), 1)) : o("", !0)
3632
3681
  ]),
3633
- c("div", pa, [c("button", {
3682
+ c("div", _a, [c("button", {
3634
3683
  class: "action preview",
3635
- onClick: (t) => z(e)
3636
- }, [...l[3] ||= [c("svg", {
3684
+ onClick: (t) => V(e)
3685
+ }, [...l[2] ||= [c("svg", {
3637
3686
  viewBox: "0 0 24 24",
3638
3687
  fill: "none",
3639
3688
  stroke: "currentColor",
@@ -3644,23 +3693,24 @@ var ea = {
3644
3693
  cx: "12",
3645
3694
  cy: "12",
3646
3695
  r: "3"
3647
- })], -1), d(" 預覽 ", -1)]], 8, ma), c("button", {
3696
+ })], -1), d(" 預覽 ", -1)]], 8, va), r.readonly ? o("", !0) : (x(), s("button", {
3697
+ key: 0,
3648
3698
  class: "action delete",
3649
3699
  "aria-label": "刪除",
3650
3700
  disabled: r.disabled,
3651
- onClick: N((t) => R(e.id), ["stop"])
3652
- }, [...l[4] ||= [c("svg", {
3701
+ onClick: N((t) => B(e.id), ["stop"])
3702
+ }, [...l[3] ||= [c("svg", {
3653
3703
  viewBox: "0 0 24 24",
3654
3704
  fill: "none",
3655
3705
  stroke: "currentColor",
3656
3706
  "stroke-width": "2",
3657
3707
  "stroke-linecap": "round",
3658
3708
  "stroke-linejoin": "round"
3659
- }, [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, ha)])
3660
- ])]))), 128)), r.multiple ? (x(), s("div", m({
3709
+ }, [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, ya))])
3710
+ ])]))), 128)), r.multiple && !r.readonly ? (x(), s("div", m({
3661
3711
  key: 0,
3662
- class: ["add-card", { "is-drag": h.value }]
3663
- }, W), [...l[5] ||= [
3712
+ class: ["add-card", { "is-drag": p.value }]
3713
+ }, re), [...l[4] ||= [
3664
3714
  c("span", {
3665
3715
  class: "plus",
3666
3716
  "aria-hidden": "true"
@@ -3676,23 +3726,23 @@ var ea = {
3676
3726
  c("span", { class: "hint" }, "點擊或拖放檔案 · MP4 / MOV / WebM", -1)
3677
3727
  ]], 16)) : o("", !0)], 64))]),
3678
3728
  (x(), a(t, { to: "body" }, [f(n, { name: "vi-modal" }, {
3679
- default: j(() => [D(y) ? (x(), s("div", {
3729
+ default: j(() => [D(_) ? (x(), s("div", {
3680
3730
  key: 0,
3681
3731
  class: "vi-modal",
3682
- onClick: N(B, ["self"])
3683
- }, [c("div", ga, [c("div", _a, [_.value?.url ? (x(), s("video", {
3732
+ onClick: N(H, ["self"])
3733
+ }, [c("div", ba, [c("div", xa, [h.value?.url ? (x(), s("video", {
3684
3734
  key: 0,
3685
- src: _.value.url,
3735
+ src: h.value.url,
3686
3736
  controls: "",
3687
3737
  autoplay: "",
3688
3738
  playsinline: "",
3689
3739
  controlslist: "nofullscreen nodownload noremoteplayback noplaybackrate",
3690
3740
  disablepictureinpicture: ""
3691
- }, null, 8, va)) : (x(), s("div", ya, " 示範影片 · 上傳真實檔案即可在此播放 "))]), c("div", ba, [c("div", xa, [c("div", Sa, E(_.value?.name), 1), c("div", Ca, E(V.value), 1)]), c("button", {
3741
+ }, null, 8, Sa)) : (x(), s("div", Ca, " 示範影片 · 上傳真實檔案即可在此播放 "))]), c("div", wa, [c("div", Ta, [c("div", Ea, E(h.value ? P(h.value) : ""), 1), c("div", Da, E(U.value), 1)]), c("button", {
3692
3742
  class: "vi-modal-close",
3693
3743
  "aria-label": "關閉",
3694
- onClick: B
3695
- }, [...l[6] ||= [c("svg", {
3744
+ onClick: H
3745
+ }, [...l[5] ||= [c("svg", {
3696
3746
  viewBox: "0 0 24 24",
3697
3747
  fill: "none",
3698
3748
  stroke: "currentColor",
@@ -3704,19 +3754,26 @@ var ea = {
3704
3754
  })]))
3705
3755
  ], 2));
3706
3756
  }
3707
- }), [["__scopeId", "data-v-8ea5b0a2"]]), Ta = {
3757
+ }), [["__scopeId", "data-v-414cc3f4"]]), ka = {
3708
3758
  key: 0,
3709
3759
  class: "head"
3710
- }, Ea = ["textContent"], Da = {
3760
+ }, Aa = ["textContent"], ja = {
3711
3761
  key: 1,
3712
3762
  class: "count-chip"
3713
- }, Oa = { class: "grid" }, ka = ["textContent"], Aa = ["textContent"], ja = ["onClick"], Ma = ["src", "alt"], Na = {
3763
+ }, Ma = { class: "grid" }, Na = {
3764
+ key: 0,
3765
+ class: "icon",
3766
+ "aria-hidden": "true"
3767
+ }, Pa = ["textContent"], Fa = ["textContent"], Ia = ["onClick"], La = ["src", "alt"], Ra = {
3714
3768
  key: 1,
3715
3769
  class: "placeholder-label"
3716
- }, Pa = { class: "card-body" }, Fa = ["title"], Ia = { class: "file-meta" }, La = { class: "card-actions" }, Ra = ["onClick"], za = ["disabled", "onClick"], Ba = { class: "ii-modal-card" }, Va = { class: "ii-modal-media" }, Ha = ["src", "alt"], Ua = {
3770
+ }, za = { class: "card-body" }, Ba = ["title"], Va = { class: "file-meta" }, Ha = { key: 0 }, Ua = {
3771
+ key: 1,
3772
+ class: "dot-separator"
3773
+ }, Wa = { key: 2 }, Ga = { class: "card-actions" }, Ka = ["onClick"], qa = ["disabled", "onClick"], Ja = { class: "ii-modal-card" }, Ya = { class: "ii-modal-media" }, Xa = ["src", "alt"], Za = {
3717
3774
  key: 1,
3718
3775
  class: "ii-modal-ph"
3719
- }, Wa = { class: "ii-modal-bar" }, Ga = { class: "ii-modal-info" }, Ka = { class: "modal-name" }, qa = { class: "modal-meta" }, Ja = /* @__PURE__ */ R(/* @__PURE__ */ p({
3776
+ }, Qa = { class: "ii-modal-bar" }, $a = { class: "ii-modal-info" }, eo = { class: "modal-name" }, to = { class: "modal-meta" }, no = /* @__PURE__ */ R(/* @__PURE__ */ p({
3720
3777
  __name: "NImageSelect",
3721
3778
  props: {
3722
3779
  modelValue: { default: () => [] },
@@ -3730,6 +3787,10 @@ var ea = {
3730
3787
  type: Boolean,
3731
3788
  default: !1
3732
3789
  },
3790
+ readonly: {
3791
+ type: Boolean,
3792
+ default: !1
3793
+ },
3733
3794
  title: { default: "" },
3734
3795
  showCount: {
3735
3796
  type: Boolean,
@@ -3750,52 +3811,70 @@ var ea = {
3750
3811
  "error"
3751
3812
  ],
3752
3813
  setup(r, { emit: l }) {
3753
- let p = l, h = C(!1), _ = C(null), [y, b, S] = $i(), { confirm: T } = Rt(), O = i(() => r.modelValue.length), k = (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", M = (e) => e.width && e.height ? e.width + "×" + e.height : "—", P = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "i" + Math.random().toString(36).slice(2, 9), ee = (e) => {
3814
+ let u = l, p = C(!1), h = C(null), [_, y, b] = $i(), { confirm: S } = Rt(), T = i(() => r.modelValue.length), O = (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", k = (e) => e.width && e.height ? e.width + "×" + e.height : "—", M = (e) => {
3815
+ if (e.name) return e.name;
3816
+ try {
3817
+ let t = new URL(e.url, window.location.href).pathname;
3818
+ return decodeURIComponent(t.split("/").filter(Boolean).pop() ?? "圖片");
3819
+ } catch {
3820
+ return "圖片";
3821
+ }
3822
+ }, P = (e) => {
3823
+ e?.startsWith("blob:") && URL.revokeObjectURL(e);
3824
+ }, F = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "i" + Math.random().toString(36).slice(2, 9), I = (e) => {
3754
3825
  let t = r.accept.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
3755
3826
  if (t.length === 0) return e.type.startsWith("image/");
3756
3827
  let n = e.type.toLowerCase(), i = e.name.toLowerCase();
3757
3828
  return t.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? n.startsWith(e.slice(0, -1)) : n === e);
3758
- }, F = (e) => {
3829
+ }, ee = (e) => {
3759
3830
  if (!e.url) return;
3760
3831
  let t = new Image(), n = () => {
3832
+ t.removeEventListener("load", i), t.removeEventListener("error", n), t.removeAttribute("src");
3833
+ }, i = () => {
3761
3834
  if (r.modelValue.some((t) => t.id === e.id)) {
3762
3835
  let n = r.modelValue.map((n) => n.id === e.id ? {
3763
3836
  ...n,
3764
3837
  width: t.naturalWidth,
3765
3838
  height: t.naturalHeight
3766
3839
  } : n);
3767
- p("update:modelValue", n), p("change", n);
3840
+ u("update:modelValue", n), u("change", n);
3768
3841
  }
3769
- t.removeEventListener("load", n), t.removeAttribute("src");
3842
+ n();
3770
3843
  };
3771
- t.addEventListener("load", n), t.src = e.url;
3772
- }, I = (e) => {
3773
- if (r.disabled) return;
3844
+ t.addEventListener("load", i), t.addEventListener("error", n), t.src = e.url;
3845
+ }, te = /* @__PURE__ */ new Set();
3846
+ A(() => r.modelValue, (e) => {
3847
+ e.forEach((e) => {
3848
+ !e.url || te.has(e.id) || (te.add(e.id), (e.width == null || e.height == null) && ee(e));
3849
+ });
3850
+ }, { immediate: !0 });
3851
+ let L = (e) => {
3852
+ if (r.disabled || r.readonly) return;
3774
3853
  let t = [], n = !1;
3775
3854
  if (Array.prototype.forEach.call(e, (e) => {
3776
- if (!ee(e)) {
3777
- p("error", {
3855
+ if (!I(e)) {
3856
+ u("error", {
3778
3857
  type: "type",
3779
3858
  file: e
3780
3859
  });
3781
3860
  return;
3782
3861
  }
3783
3862
  if (r.maxSize > 0 && e.size > r.maxSize * 1024 * 1024) {
3784
- p("error", {
3863
+ u("error", {
3785
3864
  type: "size",
3786
3865
  file: e
3787
3866
  });
3788
3867
  return;
3789
3868
  }
3790
3869
  if (!r.multiple && r.modelValue.length + t.length >= 1) {
3791
- n ||= (p("error", {
3870
+ n ||= (u("error", {
3792
3871
  type: "count",
3793
3872
  file: e
3794
3873
  }), !0);
3795
3874
  return;
3796
3875
  }
3797
3876
  t.push({
3798
- id: P(),
3877
+ id: F(),
3799
3878
  file: e,
3800
3879
  name: e.name,
3801
3880
  size: e.size,
@@ -3805,84 +3884,114 @@ var ea = {
3805
3884
  });
3806
3885
  }), t.length === 0) return;
3807
3886
  let i = [...r.modelValue, ...t];
3808
- p("update:modelValue", i), p("change", i), p("add", t), t.forEach(F);
3809
- }, L = async () => {
3810
- if (!r.disabled) if (r.multiple) {
3887
+ u("update:modelValue", i), u("change", i), u("add", t), t.forEach((e) => {
3888
+ te.add(e.id), ee(e);
3889
+ });
3890
+ }, R = async () => {
3891
+ if (!(r.disabled || r.readonly)) if (r.multiple) {
3811
3892
  let e = await $.input.custom(r.accept, !0);
3812
3893
  if (e.length === 0) return;
3813
- I(e.map((e) => e.file));
3894
+ L(e.map((e) => e.file));
3814
3895
  } else {
3815
3896
  let e = await $.input.custom(r.accept, !1);
3816
3897
  if (!e) return;
3817
- I([e.file]);
3898
+ L([e.file]);
3818
3899
  }
3819
- }, te = async (e) => {
3820
- if (r.disabled) return;
3900
+ }, z = async (e) => {
3901
+ if (r.disabled || r.readonly) return;
3821
3902
  let t = r.modelValue.find((t) => t.id === e);
3822
- if (!t || !await T(`確定要移除「${t.name}」嗎?`, {
3903
+ if (!t || !await S(`確定要移除「${M(t)}」嗎?`, {
3823
3904
  title: "移除圖片",
3824
3905
  status: "danger",
3825
3906
  confirmText: "移除",
3826
3907
  cancelText: "取消"
3827
3908
  })) return;
3828
- t.url && URL.revokeObjectURL(t.url);
3909
+ P(t.url);
3829
3910
  let n = r.modelValue.filter((t) => t.id !== e);
3830
- p("update:modelValue", n), p("change", n), p("remove", t);
3831
- }, R = (e) => {
3832
- _.value = e, b();
3833
- }, z = () => {
3834
- S();
3835
- }, B = i(() => {
3836
- let e = _.value;
3837
- return e ? [k(e.size), M(e)].join(" · ") : "";
3838
- }), V = (e) => {
3839
- e.key === "Escape" && z();
3840
- }, H = "";
3841
- A(y, (e) => {
3842
- e ? (H = document.body.style.overflow, document.body.style.overflow = "hidden", document.addEventListener("keydown", V)) : (document.body.style.overflow = H, document.removeEventListener("keydown", V));
3911
+ u("update:modelValue", n), u("change", n), u("remove", t);
3912
+ }, B = (e) => {
3913
+ h.value = e, y();
3914
+ }, V = () => {
3915
+ b();
3916
+ }, H = i(() => {
3917
+ let e = h.value;
3918
+ return e ? [e.size == null ? null : O(e.size), e.width && e.height ? k(e) : null].filter(Boolean).join(" · ") : "";
3919
+ }), U = (e) => {
3920
+ e.key === "Escape" && V();
3921
+ }, W = "";
3922
+ A(_, (e) => {
3923
+ e ? (W = document.body.style.overflow, document.body.style.overflow = "hidden", document.addEventListener("keydown", U)) : (document.body.style.overflow = W, document.removeEventListener("keydown", U));
3843
3924
  }), v(() => {
3844
- document.body.style.overflow = H, document.removeEventListener("keydown", V), r.autoRevoke && r.modelValue.forEach((e) => {
3845
- e.url && URL.revokeObjectURL(e.url);
3846
- });
3925
+ document.body.style.overflow = W, document.removeEventListener("keydown", U), r.autoRevoke && r.modelValue.forEach((e) => P(e.url));
3847
3926
  });
3848
- let U = {
3849
- onClick: L,
3927
+ let ne = {
3928
+ onClick: R,
3850
3929
  onDragenter: (e) => {
3851
- r.disabled || (e.preventDefault(), h.value = !0);
3930
+ r.disabled || r.readonly || (e.preventDefault(), p.value = !0);
3852
3931
  },
3853
3932
  onDragover: (e) => e.preventDefault(),
3854
3933
  onDragleave: (e) => {
3855
- e.preventDefault(), h.value = !1;
3934
+ e.preventDefault(), p.value = !1;
3856
3935
  },
3857
3936
  onDrop: (e) => {
3858
- r.disabled || (e.preventDefault(), h.value = !1, e.dataTransfer?.files?.length && I(e.dataTransfer.files));
3937
+ r.disabled || r.readonly || (e.preventDefault(), p.value = !1, e.dataTransfer?.files?.length && L(e.dataTransfer.files));
3859
3938
  }
3860
3939
  };
3861
- return (i, l) => (x(), s("div", { class: g(["image-input", { "is-disabled": r.disabled }]) }, [
3862
- r.title || r.showCount ? (x(), s("div", Ta, [r.title ? (x(), s("span", {
3940
+ return (i, l) => (x(), s("div", { class: g(["image-input", {
3941
+ "is-disabled": r.disabled,
3942
+ "is-readonly": r.readonly
3943
+ }]) }, [
3944
+ r.title || r.showCount ? (x(), s("div", ka, [r.title ? (x(), s("span", {
3863
3945
  key: 0,
3864
3946
  class: "title",
3865
3947
  textContent: E(r.title)
3866
- }, null, 8, Ea)) : o("", !0), r.showCount ? (x(), s("span", Da, E(O.value) + " 張", 1)) : o("", !0)])) : o("", !0),
3867
- c("div", Oa, [O.value === 0 ? (x(), s("div", m({
3948
+ }, null, 8, Aa)) : o("", !0), r.showCount ? (x(), s("span", ja, E(T.value) + " 張", 1)) : o("", !0)])) : o("", !0),
3949
+ c("div", Ma, [T.value === 0 ? (x(), s("div", m({
3868
3950
  key: 0,
3869
- class: ["empty", { "is-drag": h.value }]
3870
- }, U), [
3871
- l[0] ||= u("<span class=\"icon\" aria-hidden=\"true\" data-v-c05e4edc><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-c05e4edc><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" data-v-c05e4edc></rect><circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\" data-v-c05e4edc></circle><path d=\"M21 15l-5-5L5 21\" data-v-c05e4edc></path></svg></span>", 1),
3872
- c("h3", { textContent: E(r.emptyTitle) }, null, 8, ka),
3873
- c("p", { textContent: E(r.emptyHint) }, null, 8, Aa)
3951
+ class: ["empty", {
3952
+ "is-drag": p.value,
3953
+ "is-static": r.readonly
3954
+ }]
3955
+ }, r.readonly ? {} : ne), [
3956
+ r.readonly ? o("", !0) : (x(), s("span", Na, [...l[0] ||= [c("svg", {
3957
+ viewBox: "0 0 24 24",
3958
+ fill: "none",
3959
+ stroke: "currentColor",
3960
+ "stroke-width": "2",
3961
+ "stroke-linecap": "round",
3962
+ "stroke-linejoin": "round"
3963
+ }, [
3964
+ c("rect", {
3965
+ x: "3",
3966
+ y: "3",
3967
+ width: "18",
3968
+ height: "18",
3969
+ rx: "2"
3970
+ }),
3971
+ c("circle", {
3972
+ cx: "8.5",
3973
+ cy: "8.5",
3974
+ r: "1.5"
3975
+ }),
3976
+ c("path", { d: "M21 15l-5-5L5 21" })
3977
+ ], -1)]])),
3978
+ c("h3", { textContent: E(r.readonly ? "目前沒有圖片" : r.emptyTitle) }, null, 8, Pa),
3979
+ r.readonly ? o("", !0) : (x(), s("p", {
3980
+ key: 1,
3981
+ textContent: E(r.emptyHint)
3982
+ }, null, 8, Fa))
3874
3983
  ], 16)) : (x(), s(e, { key: 1 }, [(x(!0), s(e, null, w(r.modelValue, (e) => (x(), s("div", {
3875
3984
  key: e.id,
3876
3985
  class: "card"
3877
3986
  }, [c("div", {
3878
3987
  class: g(["thumb", { placeholder: !e.url }]),
3879
- onClick: (t) => R(e)
3988
+ onClick: (t) => B(e)
3880
3989
  }, [e.url ? (x(), s("img", {
3881
3990
  key: 0,
3882
3991
  src: e.url,
3883
- alt: e.name,
3992
+ alt: M(e),
3884
3993
  loading: "lazy"
3885
- }, null, 8, Ma)) : (x(), s("div", Na, "縮圖預覽")), l[1] ||= c("div", {
3994
+ }, null, 8, La)) : (x(), s("div", Ra, "縮圖預覽")), l[1] ||= c("div", {
3886
3995
  class: "zoom",
3887
3996
  "aria-hidden": "true"
3888
3997
  }, [c("svg", {
@@ -3896,20 +4005,20 @@ var ea = {
3896
4005
  cx: "11",
3897
4006
  cy: "11",
3898
4007
  r: "7"
3899
- }), c("path", { d: "m21 21-4.3-4.3M11 8v6M8 11h6" })])], -1)], 10, ja), c("div", Pa, [
4008
+ }), c("path", { d: "m21 21-4.3-4.3M11 8v6M8 11h6" })])], -1)], 10, Ia), c("div", za, [
3900
4009
  c("div", {
3901
4010
  class: "file-name",
3902
- title: e.name
3903
- }, E(e.name), 9, Fa),
3904
- c("div", Ia, [
3905
- c("span", null, E(k(e.size)), 1),
3906
- l[2] ||= c("span", { class: "dot-separator" }, null, -1),
3907
- c("span", null, E(M(e)), 1)
4011
+ title: M(e)
4012
+ }, E(M(e)), 9, Ba),
4013
+ c("div", Va, [
4014
+ e.size == null ? o("", !0) : (x(), s("span", Ha, E(O(e.size)), 1)),
4015
+ e.size != null && e.width && e.height ? (x(), s("span", Ua)) : o("", !0),
4016
+ e.width && e.height ? (x(), s("span", Wa, E(k(e)), 1)) : o("", !0)
3908
4017
  ]),
3909
- c("div", La, [c("button", {
4018
+ c("div", Ga, [c("button", {
3910
4019
  class: "action preview",
3911
- onClick: (t) => R(e)
3912
- }, [...l[3] ||= [c("svg", {
4020
+ onClick: (t) => B(e)
4021
+ }, [...l[2] ||= [c("svg", {
3913
4022
  viewBox: "0 0 24 24",
3914
4023
  fill: "none",
3915
4024
  stroke: "currentColor",
@@ -3920,23 +4029,24 @@ var ea = {
3920
4029
  cx: "12",
3921
4030
  cy: "12",
3922
4031
  r: "3"
3923
- })], -1), d(" 預覽 ", -1)]], 8, Ra), c("button", {
4032
+ })], -1), d(" 預覽 ", -1)]], 8, Ka), r.readonly ? o("", !0) : (x(), s("button", {
4033
+ key: 0,
3924
4034
  class: "action delete",
3925
4035
  "aria-label": "刪除",
3926
4036
  disabled: r.disabled,
3927
- onClick: N((t) => te(e.id), ["stop"])
3928
- }, [...l[4] ||= [c("svg", {
4037
+ onClick: N((t) => z(e.id), ["stop"])
4038
+ }, [...l[3] ||= [c("svg", {
3929
4039
  viewBox: "0 0 24 24",
3930
4040
  fill: "none",
3931
4041
  stroke: "currentColor",
3932
4042
  "stroke-width": "2",
3933
4043
  "stroke-linecap": "round",
3934
4044
  "stroke-linejoin": "round"
3935
- }, [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, za)])
3936
- ])]))), 128)), r.multiple ? (x(), s("div", m({
4045
+ }, [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, qa))])
4046
+ ])]))), 128)), r.multiple && !r.readonly ? (x(), s("div", m({
3937
4047
  key: 0,
3938
- class: ["add-card", { "is-drag": h.value }]
3939
- }, U), [...l[5] ||= [
4048
+ class: ["add-card", { "is-drag": p.value }]
4049
+ }, ne), [...l[4] ||= [
3940
4050
  c("span", {
3941
4051
  class: "plus",
3942
4052
  "aria-hidden": "true"
@@ -3952,19 +4062,19 @@ var ea = {
3952
4062
  c("span", { class: "hint" }, "點擊或拖放檔案 · JPG / PNG / WebP / GIF", -1)
3953
4063
  ]], 16)) : o("", !0)], 64))]),
3954
4064
  (x(), a(t, { to: "body" }, [f(n, { name: "ii-modal" }, {
3955
- default: j(() => [D(y) ? (x(), s("div", {
4065
+ default: j(() => [D(_) ? (x(), s("div", {
3956
4066
  key: 0,
3957
4067
  class: "ii-modal",
3958
- onClick: N(z, ["self"])
3959
- }, [c("div", Ba, [c("div", Va, [_.value?.url ? (x(), s("img", {
4068
+ onClick: N(V, ["self"])
4069
+ }, [c("div", Ja, [c("div", Ya, [h.value?.url ? (x(), s("img", {
3960
4070
  key: 0,
3961
- src: _.value.url,
3962
- alt: _.value.name
3963
- }, null, 8, Ha)) : (x(), s("div", Ua, " 示範圖片 · 上傳真實檔案即可在此檢視 "))]), c("div", Wa, [c("div", Ga, [c("div", Ka, E(_.value?.name), 1), c("div", qa, E(B.value), 1)]), c("button", {
4071
+ src: h.value.url,
4072
+ alt: h.value ? M(h.value) : ""
4073
+ }, null, 8, Xa)) : (x(), s("div", Za, " 示範圖片 · 上傳真實檔案即可在此檢視 "))]), c("div", Qa, [c("div", $a, [c("div", eo, E(h.value ? M(h.value) : ""), 1), c("div", to, E(H.value), 1)]), c("button", {
3964
4074
  class: "ii-modal-close",
3965
4075
  "aria-label": "關閉",
3966
- onClick: z
3967
- }, [...l[6] ||= [c("svg", {
4076
+ onClick: V
4077
+ }, [...l[5] ||= [c("svg", {
3968
4078
  viewBox: "0 0 24 24",
3969
4079
  fill: "none",
3970
4080
  stroke: "currentColor",
@@ -3976,32 +4086,37 @@ var ea = {
3976
4086
  })]))
3977
4087
  ], 2));
3978
4088
  }
3979
- }), [["__scopeId", "data-v-c05e4edc"]]), Ya = {
4089
+ }), [["__scopeId", "data-v-0531aeda"]]), ro = {
3980
4090
  key: 0,
3981
4091
  class: "head"
3982
- }, Xa = ["textContent"], Za = {
4092
+ }, io = ["textContent"], ao = {
3983
4093
  key: 1,
3984
4094
  class: "count-chip"
3985
- }, Qa = ["textContent"], $a = ["textContent"], eo = {
4095
+ }, oo = {
4096
+ key: 0,
4097
+ class: "icon",
4098
+ "aria-hidden": "true"
4099
+ }, so = ["textContent"], co = ["textContent"], lo = {
3986
4100
  key: 2,
3987
4101
  class: "list"
3988
- }, to = [
4102
+ }, uo = [
3989
4103
  "src",
4104
+ "onLoadedmetadata",
3990
4105
  "onTimeupdate",
3991
4106
  "onEnded"
3992
- ], no = [
4107
+ ], fo = [
3993
4108
  "aria-label",
3994
4109
  "disabled",
3995
4110
  "onClick"
3996
- ], ro = {
4111
+ ], po = {
3997
4112
  key: 0,
3998
4113
  viewBox: "0 0 24 24",
3999
4114
  fill: "currentColor"
4000
- }, io = {
4115
+ }, mo = {
4001
4116
  key: 1,
4002
4117
  viewBox: "0 0 24 24",
4003
4118
  fill: "currentColor"
4004
- }, ao = { class: "meta" }, oo = ["title"], so = { class: "sub" }, co = ["onMousedown", "onTouchstart"], lo = { class: "time" }, uo = ["disabled", "onClick"], fo = { class: "meta" }, po = { class: "name" }, mo = 256, ho = 5, go = /* @__PURE__ */ R(/* @__PURE__ */ p({
4119
+ }, ho = { class: "meta" }, go = ["title"], _o = { class: "sub" }, vo = ["onMousedown", "onTouchstart"], yo = { class: "time" }, bo = ["disabled", "onClick"], xo = { class: "meta" }, So = { class: "name" }, Co = 256, wo = 5, To = /* @__PURE__ */ R(/* @__PURE__ */ p({
4005
4120
  __name: "NAudioSelect",
4006
4121
  props: {
4007
4122
  modelValue: { default: () => [] },
@@ -4015,6 +4130,10 @@ var ea = {
4015
4130
  type: Boolean,
4016
4131
  default: !1
4017
4132
  },
4133
+ readonly: {
4134
+ type: Boolean,
4135
+ default: !1
4136
+ },
4018
4137
  title: { default: "" },
4019
4138
  showCount: {
4020
4139
  type: Boolean,
@@ -4035,81 +4154,110 @@ var ea = {
4035
4154
  "error"
4036
4155
  ],
4037
4156
  setup(t, { emit: n }) {
4038
- let r = n, { confirm: a } = Rt(), l = C(!1), d = C([]), f = C(null), p = S({}), h = S({}), y = S({}), b = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), D = (e, t) => {
4039
- t ? b.set(e, t) : b.delete(e);
4040
- }, O = i(() => t.modelValue.length), k = (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", A = (e) => {
4157
+ let r = /* @__PURE__ */ new Map(), a = (e, t, n) => {
4158
+ let i = r.get(e);
4159
+ if (i) return i.refCount += 1, i;
4160
+ let a = {
4161
+ peaks: t,
4162
+ duration: n,
4163
+ refCount: 1
4164
+ };
4165
+ return r.set(e, a), a;
4166
+ }, l = (e, t) => {
4167
+ if (!e) return;
4168
+ let n = r.get(e);
4169
+ n && (--n.refCount, t && n.refCount <= 0 && r.delete(e));
4170
+ }, f = n, { confirm: p } = Rt(), h = C(!1), y = C([]), b = C(null), T = S({}), D = S({}), O = S({}), k = /* @__PURE__ */ new Set(), j = /* @__PURE__ */ new Map(), M = (e, t, n) => {
4171
+ a(e, t, n), j.set(e, (j.get(e) ?? 0) + 1);
4172
+ }, P = (e, t) => {
4173
+ if (!e) return;
4174
+ let n = j.get(e) ?? 0;
4175
+ n <= 0 || (n === 1 ? j.delete(e) : j.set(e, n - 1), l(e, t));
4176
+ }, F = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), ee = (e, t) => {
4177
+ t ? F.set(e, t) : F.delete(e);
4178
+ }, te = i(() => t.modelValue.length), L = (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", R = (e) => {
4041
4179
  if (e == null || isNaN(e)) return "0:00";
4042
4180
  let t = Math.floor(e), n = Math.floor(t / 60), r = t % 60;
4043
4181
  return n + ":" + (r < 10 ? "0" : "") + r;
4044
- }, j = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "a" + Math.random().toString(36).slice(2, 9), M = (e) => {
4182
+ }, z = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "a" + Math.random().toString(36).slice(2, 9), B = (e) => {
4183
+ if (e.name) return e.name;
4184
+ try {
4185
+ let t = new URL(e.url, window.location.href).pathname;
4186
+ return decodeURIComponent(t.split("/").filter(Boolean).pop() ?? "音訊");
4187
+ } catch {
4188
+ return "音訊";
4189
+ }
4190
+ }, V = (e) => {
4191
+ e?.startsWith("blob:") && URL.revokeObjectURL(e);
4192
+ }, H = (e) => {
4045
4193
  let n = t.accept.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
4046
4194
  if (n.length === 0) return e.type.startsWith("audio/");
4047
4195
  let r = e.type.toLowerCase(), i = e.name.toLowerCase();
4048
4196
  return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r === e);
4049
- }, P = null, ee = () => (P ||= new (window.AudioContext || window.webkitAudioContext)(), P), F = async (e) => {
4050
- let t = await e.arrayBuffer(), n = await ee().decodeAudioData(t.slice(0)), r = n.getChannelData(0), i = Math.floor(r.length / mo) || 1, a = Array(mo), o = 0;
4051
- for (let e = 0; e < mo; e++) {
4052
- let t = 0, n = e * i, s = Math.min(r.length, n + i);
4053
- for (let e = n; e < s; e++) {
4054
- let n = Math.abs(r[e]);
4055
- n > t && (t = n);
4197
+ }, U = null, W = () => (U ||= new (window.AudioContext || window.webkitAudioContext)(), U), ne = async (e) => {
4198
+ let t = await W().decodeAudioData(e.slice(0)), n = t.getChannelData(0), r = Math.floor(n.length / Co) || 1, i = Array(Co), a = 0;
4199
+ for (let e = 0; e < Co; e++) {
4200
+ let t = 0, o = e * r, s = Math.min(n.length, o + r);
4201
+ for (let e = o; e < s; e++) {
4202
+ let r = Math.abs(n[e]);
4203
+ r > t && (t = r);
4056
4204
  }
4057
- a[e] = t, t > o && (o = t);
4205
+ i[e] = t, t > a && (a = t);
4058
4206
  }
4059
- let s = o > 0 ? 1 / o : 1;
4060
- for (let e = 0; e < mo; e++) a[e] = Math.max(.06, a[e] * s);
4207
+ let o = a > 0 ? 1 / a : 1;
4208
+ for (let e = 0; e < Co; e++) i[e] = Math.max(.06, i[e] * o);
4061
4209
  return {
4062
- peaks: a,
4063
- duration: n.duration
4210
+ peaks: i,
4211
+ duration: t.duration
4064
4212
  };
4065
- }, I = (e) => {
4066
- let t = T.get(e), n = p[e];
4213
+ }, re = (e) => e.arrayBuffer().then((e) => ne(e)), G = (e) => {
4214
+ let t = I.get(e), n = T[e];
4067
4215
  if (!t || !n) return;
4068
4216
  let r = t.clientWidth;
4069
4217
  if (r <= 0) {
4070
- requestAnimationFrame(() => I(e));
4218
+ requestAnimationFrame(() => G(e));
4071
4219
  return;
4072
4220
  }
4073
- let i = Math.max(8, Math.min(n.length, Math.floor((r + 2) / ho)));
4074
- if (h[e] && h[e].length === i) return;
4221
+ let i = Math.max(8, Math.min(n.length, Math.floor((r + 2) / wo)));
4222
+ if (D[e] && D[e].length === i) return;
4075
4223
  let a = Array(i);
4076
4224
  for (let e = 0; e < i; e++) {
4077
4225
  let t = Math.floor(e * n.length / i), r = Math.max(t + 1, Math.floor((e + 1) * n.length / i)), o = 0;
4078
4226
  for (let e = t; e < r; e++) n[e] > o && (o = n[e]);
4079
4227
  a[e] = o;
4080
4228
  }
4081
- h[e] = a;
4082
- }, L = typeof ResizeObserver < "u" ? new ResizeObserver((e) => {
4229
+ D[e] = a;
4230
+ }, K = typeof ResizeObserver < "u" ? new ResizeObserver((e) => {
4083
4231
  e.forEach((e) => {
4084
4232
  let t = e.target.dataset.waveId;
4085
- t && I(t);
4233
+ t && G(t);
4086
4234
  });
4087
- }) : null, te = (e, t) => {
4088
- let n = T.get(e);
4089
- if (n && L && L.unobserve(n), t) {
4235
+ }) : null, ie = (e, t) => {
4236
+ let n = I.get(e);
4237
+ if (n && K && K.unobserve(n), t) {
4090
4238
  let n = t;
4091
- n.dataset.waveId = e, T.set(e, n), L ? L.observe(n) : I(e);
4092
- } else T.delete(e);
4093
- }, R = (e) => {
4094
- if (t.disabled) return;
4095
- let n = [], i = !1;
4239
+ n.dataset.waveId = e, I.set(e, n), K ? K.observe(n) : G(e);
4240
+ } else I.delete(e);
4241
+ }, q = (e) => {
4242
+ if (t.disabled || t.readonly) return;
4243
+ let n = [], r = !1;
4096
4244
  Array.prototype.forEach.call(e, (e) => {
4097
- if (!M(e)) {
4098
- r("error", {
4245
+ if (!H(e)) {
4246
+ f("error", {
4099
4247
  type: "type",
4100
4248
  file: e
4101
4249
  });
4102
4250
  return;
4103
4251
  }
4104
4252
  if (t.maxSize > 0 && e.size > t.maxSize * 1024 * 1024) {
4105
- r("error", {
4253
+ f("error", {
4106
4254
  type: "size",
4107
4255
  file: e
4108
4256
  });
4109
4257
  return;
4110
4258
  }
4111
- if (!t.multiple && t.modelValue.length + n.length + d.value.length >= 1) {
4112
- i ||= (r("error", {
4259
+ if (!t.multiple && t.modelValue.length + n.length + y.value.length >= 1) {
4260
+ r ||= (f("error", {
4113
4261
  type: "count",
4114
4262
  file: e
4115
4263
  }), !0);
@@ -4117,139 +4265,196 @@ var ea = {
4117
4265
  }
4118
4266
  n.push(e);
4119
4267
  }), n.length !== 0 && n.forEach((e) => {
4120
- let n = "p" + j();
4121
- d.value.push({
4268
+ let n = "p" + z();
4269
+ y.value.push({
4122
4270
  tag: n,
4123
4271
  name: e.name
4124
- }), F(e).then(({ peaks: n, duration: i }) => {
4125
- let a = {
4126
- id: j(),
4272
+ }), re(e).then(({ peaks: n, duration: r }) => {
4273
+ let i = {
4274
+ id: z(),
4127
4275
  file: e,
4128
4276
  name: e.name,
4129
4277
  size: e.size,
4130
- duration: i,
4278
+ duration: r,
4131
4279
  url: URL.createObjectURL(e)
4132
4280
  };
4133
- p[a.id] = n, y[a.id] = 0;
4134
- let o = [...t.modelValue, a];
4135
- r("update:modelValue", o), r("change", o), r("add", [a]);
4281
+ T[i.id] = n, O[i.id] = 0, k.add(i.id), M(i.url, n, r);
4282
+ let a = [...t.modelValue, i];
4283
+ f("update:modelValue", a), f("change", a), f("add", [i]);
4136
4284
  }).catch(() => {
4137
- r("error", {
4285
+ f("error", {
4138
4286
  type: "type",
4139
4287
  file: e
4140
4288
  });
4141
4289
  }).finally(() => {
4142
- d.value = d.value.filter((e) => e.tag !== n);
4290
+ y.value = y.value.filter((e) => e.tag !== n);
4143
4291
  });
4144
4292
  });
4145
- }, z = async () => {
4146
- if (!t.disabled) if (t.multiple) {
4293
+ }, ae = async () => {
4294
+ if (!(t.disabled || t.readonly)) if (t.multiple) {
4147
4295
  let e = await $.input.custom(t.accept, !0);
4148
4296
  if (e.length === 0) return;
4149
- R(e.map((e) => e.file));
4297
+ q(e.map((e) => e.file));
4150
4298
  } else {
4151
4299
  let e = await $.input.custom(t.accept, !1);
4152
4300
  if (!e) return;
4153
- R([e.file]);
4301
+ q([e.file]);
4154
4302
  }
4155
- }, B = async (e) => {
4156
- if (t.disabled) return;
4303
+ }, oe = async (e) => {
4304
+ if (t.disabled || t.readonly) return;
4157
4305
  let n = t.modelValue.find((t) => t.id === e);
4158
- if (!n || !await a(`確定要移除「${n.name}」嗎?`, {
4306
+ if (!n || !await p(`確定要移除「${B(n)}」嗎?`, {
4159
4307
  title: "移除音訊",
4160
4308
  status: "danger",
4161
4309
  confirmText: "移除",
4162
4310
  cancelText: "取消"
4163
4311
  })) return;
4164
- f.value === e && V(), n.url && URL.revokeObjectURL(n.url), delete p[e], delete h[e], delete y[e];
4165
- let i = t.modelValue.filter((t) => t.id !== e);
4166
- r("update:modelValue", i), r("change", i), r("remove", n);
4167
- }, V = () => {
4168
- let e = f.value;
4169
- e && b.get(e)?.pause(), f.value = null;
4170
- }, H = (e) => {
4171
- let n = b.get(e);
4312
+ b.value === e && se(), V(n.url), P(n.url, !0), delete T[e], delete D[e], delete O[e], k.delete(e);
4313
+ let r = t.modelValue.filter((t) => t.id !== e);
4314
+ f("update:modelValue", r), f("change", r), f("remove", n);
4315
+ }, se = () => {
4316
+ let e = b.value;
4317
+ e && F.get(e)?.pause(), b.value = null;
4318
+ }, ce = (e) => {
4319
+ let n = F.get(e);
4172
4320
  if (!n) return;
4173
- if (f.value === e) {
4174
- n.pause(), f.value = null;
4321
+ if (b.value === e) {
4322
+ n.pause(), b.value = null;
4175
4323
  return;
4176
4324
  }
4177
- f.value && b.get(f.value)?.pause();
4325
+ b.value && F.get(b.value)?.pause();
4178
4326
  let r = t.modelValue.find((t) => t.id === e);
4179
- (n.ended || r?.duration && n.currentTime >= r.duration) && (n.currentTime = 0), f.value = e, n.play();
4180
- }, U = (e, t) => {
4181
- y[e] = t.target.currentTime;
4182
- }, W = (e) => {
4183
- f.value === e && (f.value = null), y[e] = 0;
4184
- }, ne = (e, t) => {
4185
- let n = b.get(e), r = T.get(e);
4327
+ (n.ended || r?.duration && n.currentTime >= r.duration) && (n.currentTime = 0), b.value = e, n.play();
4328
+ }, le = (e, t) => {
4329
+ O[e] = t.target.currentTime;
4330
+ }, ue = (e) => {
4331
+ b.value === e && (b.value = null), O[e] = 0;
4332
+ }, de = (e, t) => {
4333
+ let n = F.get(e), r = I.get(e);
4186
4334
  if (!n || !r || !n.duration || isNaN(n.duration)) return;
4187
4335
  let i = r.getBoundingClientRect();
4188
- n.currentTime = Math.min(Math.max((t - i.left) / i.width, 0), 1) * n.duration, y[e] = n.currentTime;
4189
- }, re = (e, n) => {
4336
+ n.currentTime = Math.min(Math.max((t - i.left) / i.width, 0), 1) * n.duration, O[e] = n.currentTime;
4337
+ }, fe = (e, n) => {
4190
4338
  if (t.disabled) return;
4191
- n.preventDefault(), ne(e, ("touches" in n ? n.touches[0] : n).clientX);
4339
+ n.preventDefault(), de(e, ("touches" in n ? n.touches[0] : n).clientX);
4192
4340
  let r = (t) => {
4193
- ne(e, ("touches" in t ? t.touches[0] : t).clientX);
4341
+ de(e, ("touches" in t ? t.touches[0] : t).clientX);
4194
4342
  }, i = () => {
4195
4343
  window.removeEventListener("mousemove", r), window.removeEventListener("mouseup", i), window.removeEventListener("touchmove", r), window.removeEventListener("touchend", i);
4196
4344
  };
4197
4345
  window.addEventListener("mousemove", r), window.addEventListener("mouseup", i), window.addEventListener("touchmove", r, { passive: !1 }), window.addEventListener("touchend", i);
4198
- }, G = (e, t) => {
4346
+ }, pe = (e, t) => {
4199
4347
  if (!e.duration || isNaN(e.duration)) return !1;
4200
- let n = h[e.id]?.length || 0;
4348
+ let n = D[e.id]?.length || 0;
4201
4349
  if (n === 0) return !1;
4202
- let r = (y[e.id] || 0) / e.duration;
4350
+ let r = (O[e.id] || 0) / e.duration;
4203
4351
  return (t + .5) / n <= r;
4352
+ }, me = (e, n) => {
4353
+ let r = t.modelValue.find((t) => t.id === e);
4354
+ if (!r || r.duration != null) return;
4355
+ let i = t.modelValue.map((t) => t.id === e ? {
4356
+ ...t,
4357
+ duration: n
4358
+ } : t);
4359
+ f("update:modelValue", i), f("change", i);
4360
+ }, he = (e, n, r) => {
4361
+ t.modelValue.some((t) => t.id === e) && (T[e] = n, G(e), me(e, r));
4362
+ }, ge = async (e) => {
4363
+ O[e.id] ?? (O[e.id] = 0);
4364
+ let t = r.get(e.url);
4365
+ if (t) {
4366
+ M(e.url, t.peaks, t.duration), he(e.id, t.peaks, t.duration);
4367
+ return;
4368
+ }
4369
+ try {
4370
+ let { peaks: t, duration: n } = await ne(await (await fetch(e.url)).arrayBuffer());
4371
+ M(e.url, t, n), he(e.id, t, n);
4372
+ } catch {}
4373
+ }, _e = (e, t) => {
4374
+ let n = t.target.duration;
4375
+ !isNaN(n) && isFinite(n) && me(e, n);
4204
4376
  };
4205
- v(() => {
4206
- t.autoRevoke && t.modelValue.forEach((e) => {
4207
- e.url && URL.revokeObjectURL(e.url);
4208
- }), L?.disconnect(), P &&= (P.close(), null);
4377
+ A(() => t.modelValue, (e) => {
4378
+ e.forEach((e) => {
4379
+ !e.url || k.has(e.id) || (k.add(e.id), T[e.id] || ge(e));
4380
+ });
4381
+ }, { immediate: !0 }), v(() => {
4382
+ t.autoRevoke && t.modelValue.forEach((e) => V(e.url)), j.forEach((e, t) => {
4383
+ for (let n = 0; n < e; n++) l(t, !1);
4384
+ }), j.clear(), K?.disconnect(), U &&= (U.close(), null);
4209
4385
  });
4210
- let ie = {
4211
- onClick: z,
4386
+ let ve = {
4387
+ onClick: ae,
4212
4388
  onDragenter: (e) => {
4213
- t.disabled || (e.preventDefault(), l.value = !0);
4389
+ t.disabled || t.readonly || (e.preventDefault(), h.value = !0);
4214
4390
  },
4215
4391
  onDragover: (e) => e.preventDefault(),
4216
4392
  onDragleave: (e) => {
4217
- e.preventDefault(), l.value = !1;
4393
+ e.preventDefault(), h.value = !1;
4218
4394
  },
4219
4395
  onDrop: (e) => {
4220
- t.disabled || (e.preventDefault(), l.value = !1, e.dataTransfer?.files?.length && R(e.dataTransfer.files));
4396
+ t.disabled || t.readonly || (e.preventDefault(), h.value = !1, e.dataTransfer?.files?.length && q(e.dataTransfer.files));
4221
4397
  }
4222
4398
  };
4223
- return (n, r) => (x(), s("div", { class: g(["audio-input", { "is-disabled": t.disabled }]) }, [t.title || t.showCount ? (x(), s("div", Ya, [t.title ? (x(), s("span", {
4399
+ return (n, r) => (x(), s("div", { class: g(["audio-input", {
4400
+ "is-disabled": t.disabled,
4401
+ "is-readonly": t.readonly
4402
+ }]) }, [t.title || t.showCount ? (x(), s("div", ro, [t.title ? (x(), s("span", {
4224
4403
  key: 0,
4225
4404
  class: "title",
4226
4405
  textContent: E(t.title)
4227
- }, null, 8, Xa)) : o("", !0), t.showCount ? (x(), s("span", Za, E(O.value) + " 首", 1)) : o("", !0)])) : o("", !0), O.value === 0 && d.value.length === 0 ? (x(), s("div", m({
4406
+ }, null, 8, io)) : o("", !0), t.showCount ? (x(), s("span", ao, E(te.value) + " 首", 1)) : o("", !0)])) : o("", !0), te.value === 0 && y.value.length === 0 ? (x(), s("div", m({
4228
4407
  key: 1,
4229
- class: ["empty", { "is-drag": l.value }]
4230
- }, ie), [
4231
- r[0] ||= u("<span class=\"icon\" aria-hidden=\"true\" data-v-ef784628><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-ef784628><path d=\"M9 18V5l12-2v13\" data-v-ef784628></path><circle cx=\"6\" cy=\"18\" r=\"3\" data-v-ef784628></circle><circle cx=\"18\" cy=\"16\" r=\"3\" data-v-ef784628></circle></svg></span>", 1),
4232
- c("h3", { textContent: E(t.emptyTitle) }, null, 8, Qa),
4233
- c("p", { textContent: E(t.emptyHint) }, null, 8, $a)
4234
- ], 16)) : (x(), s("div", eo, [
4408
+ class: ["empty", {
4409
+ "is-drag": h.value,
4410
+ "is-static": t.readonly
4411
+ }]
4412
+ }, t.readonly ? {} : ve), [
4413
+ t.readonly ? o("", !0) : (x(), s("span", oo, [...r[0] ||= [c("svg", {
4414
+ viewBox: "0 0 24 24",
4415
+ fill: "none",
4416
+ stroke: "currentColor",
4417
+ "stroke-width": "1.7",
4418
+ "stroke-linecap": "round",
4419
+ "stroke-linejoin": "round"
4420
+ }, [
4421
+ c("path", { d: "M9 18V5l12-2v13" }),
4422
+ c("circle", {
4423
+ cx: "6",
4424
+ cy: "18",
4425
+ r: "3"
4426
+ }),
4427
+ c("circle", {
4428
+ cx: "18",
4429
+ cy: "16",
4430
+ r: "3"
4431
+ })
4432
+ ], -1)]])),
4433
+ c("h3", { textContent: E(t.readonly ? "目前沒有音訊" : t.emptyTitle) }, null, 8, so),
4434
+ t.readonly ? o("", !0) : (x(), s("p", {
4435
+ key: 1,
4436
+ textContent: E(t.emptyHint)
4437
+ }, null, 8, co))
4438
+ ], 16)) : (x(), s("div", lo, [
4235
4439
  (x(!0), s(e, null, w(t.modelValue, (n) => (x(), s("div", {
4236
4440
  key: n.id,
4237
- class: g(["row", { "is-playing": f.value === n.id }])
4441
+ class: g(["row", { "is-playing": b.value === n.id }])
4238
4442
  }, [
4239
4443
  c("audio", {
4240
4444
  ref_for: !0,
4241
- ref: (e) => D(n.id, e),
4445
+ ref: (e) => ee(n.id, e),
4242
4446
  src: n.url,
4243
4447
  preload: "metadata",
4244
- onTimeupdate: (e) => U(n.id, e),
4245
- onEnded: (e) => W(n.id)
4246
- }, null, 40, to),
4448
+ onLoadedmetadata: (e) => _e(n.id, e),
4449
+ onTimeupdate: (e) => le(n.id, e),
4450
+ onEnded: (e) => ue(n.id)
4451
+ }, null, 40, uo),
4247
4452
  c("button", {
4248
4453
  class: "play-btn",
4249
- "aria-label": f.value === n.id ? "暫停" : "播放",
4454
+ "aria-label": b.value === n.id ? "暫停" : "播放",
4250
4455
  disabled: !n.url,
4251
- onClick: (e) => H(n.id)
4252
- }, [f.value === n.id ? (x(), s("svg", ro, [...r[1] ||= [c("rect", {
4456
+ onClick: (e) => ce(n.id)
4457
+ }, [b.value === n.id ? (x(), s("svg", po, [...r[1] ||= [c("rect", {
4253
4458
  x: "6",
4254
4459
  y: "5",
4255
4460
  width: "4",
@@ -4261,28 +4466,29 @@ var ea = {
4261
4466
  width: "4",
4262
4467
  height: "14",
4263
4468
  rx: "1"
4264
- }, null, -1)]])) : (x(), s("svg", io, [...r[2] ||= [c("path", { d: "M8 5v14l11-7z" }, null, -1)]]))], 8, no),
4265
- c("div", ao, [c("div", {
4469
+ }, null, -1)]])) : (x(), s("svg", mo, [...r[2] ||= [c("path", { d: "M8 5v14l11-7z" }, null, -1)]]))], 8, fo),
4470
+ c("div", ho, [c("div", {
4266
4471
  class: "name",
4267
- title: n.name
4268
- }, E(n.name), 9, oo), c("div", so, E(k(n.size)) + " · " + E(A(n.duration)), 1)]),
4472
+ title: B(n)
4473
+ }, E(B(n)), 9, go), c("div", _o, [n.size == null ? o("", !0) : (x(), s(e, { key: 0 }, [d(E(L(n.size)) + " · ", 1)], 64)), d(" " + E(R(n.duration)), 1)])]),
4269
4474
  c("div", {
4270
4475
  class: "wave",
4271
4476
  ref_for: !0,
4272
- ref: (e) => te(n.id, e),
4273
- onMousedown: (e) => re(n.id, e),
4274
- onTouchstart: (e) => re(n.id, e)
4275
- }, [(x(!0), s(e, null, w(h[n.id] || [], (e, t) => (x(), s("span", {
4477
+ ref: (e) => ie(n.id, e),
4478
+ onMousedown: (e) => fe(n.id, e),
4479
+ onTouchstart: (e) => fe(n.id, e)
4480
+ }, [(x(!0), s(e, null, w(D[n.id] || [], (e, t) => (x(), s("span", {
4276
4481
  key: t,
4277
- class: g(["bar", { "is-played": G(n, t) }]),
4482
+ class: g(["bar", { "is-played": pe(n, t) }]),
4278
4483
  style: _({ height: Math.max(2, Math.round(e * 34)) + "px" })
4279
- }, null, 6))), 128))], 40, co),
4280
- c("div", lo, E(A(y[n.id] || 0)) + " / " + E(A(n.duration)), 1),
4281
- c("button", {
4484
+ }, null, 6))), 128))], 40, vo),
4485
+ c("div", yo, E(R(O[n.id] || 0)) + " / " + E(R(n.duration)), 1),
4486
+ t.readonly ? o("", !0) : (x(), s("button", {
4487
+ key: 0,
4282
4488
  class: "del-btn",
4283
4489
  "aria-label": "刪除",
4284
4490
  disabled: t.disabled,
4285
- onClick: N((e) => B(n.id), ["stop"])
4491
+ onClick: N((e) => oe(n.id), ["stop"])
4286
4492
  }, [...r[3] ||= [c("svg", {
4287
4493
  viewBox: "0 0 24 24",
4288
4494
  fill: "none",
@@ -4290,9 +4496,9 @@ var ea = {
4290
4496
  "stroke-width": "1.8",
4291
4497
  "stroke-linecap": "round",
4292
4498
  "stroke-linejoin": "round"
4293
- }, [c("path", { d: "M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14" })], -1)]], 8, uo)
4499
+ }, [c("path", { d: "M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14" })], -1)]], 8, bo))
4294
4500
  ], 2))), 128)),
4295
- (x(!0), s(e, null, w(d.value, (e) => (x(), s("div", {
4501
+ (x(!0), s(e, null, w(y.value, (e) => (x(), s("div", {
4296
4502
  key: e.tag,
4297
4503
  class: "row is-pending"
4298
4504
  }, [r[5] ||= c("span", {
@@ -4304,20 +4510,20 @@ var ea = {
4304
4510
  stroke: "currentColor",
4305
4511
  "stroke-width": "2",
4306
4512
  "stroke-linecap": "round"
4307
- }, [c("path", { d: "M12 3a9 9 0 1 0 9 9" })])], -1), c("div", fo, [c("div", po, E(e.name), 1), r[4] ||= c("div", { class: "sub" }, "解析波形中…", -1)])]))), 128)),
4308
- t.multiple ? (x(), s("div", m({
4513
+ }, [c("path", { d: "M12 3a9 9 0 1 0 9 9" })])], -1), c("div", xo, [c("div", So, E(e.name), 1), r[4] ||= c("div", { class: "sub" }, "解析波形中…", -1)])]))), 128)),
4514
+ t.multiple && !t.readonly ? (x(), s("div", m({
4309
4515
  key: 0,
4310
- class: ["add", { "is-drag": l.value }]
4311
- }, ie), [...r[6] ||= [u("<span class=\"plus\" aria-hidden=\"true\" data-v-ef784628><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" data-v-ef784628><path d=\"M12 5v14M5 12h14\" data-v-ef784628></path></svg></span><div class=\"add-text\" data-v-ef784628><div class=\"t\" data-v-ef784628>新增音訊</div><div class=\"d\" data-v-ef784628>點擊或拖放檔案 · MP3 / WAV / OGG / M4A</div></div>", 2)]], 16)) : o("", !0)
4516
+ class: ["add", { "is-drag": h.value }]
4517
+ }, ve), [...r[6] ||= [u("<span class=\"plus\" aria-hidden=\"true\" data-v-1e35f393><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" data-v-1e35f393><path d=\"M12 5v14M5 12h14\" data-v-1e35f393></path></svg></span><div class=\"add-text\" data-v-1e35f393><div class=\"t\" data-v-1e35f393>新增音訊</div><div class=\"d\" data-v-1e35f393>點擊或拖放檔案 · MP3 / WAV / OGG / M4A</div></div>", 2)]], 16)) : o("", !0)
4312
4518
  ]))], 2));
4313
4519
  }
4314
- }), [["__scopeId", "data-v-ef784628"]]), _o = { class: "header" }, vo = { class: "brand-logo" }, yo = { class: "logo-text" }, bo = { class: "logo-icon" }, xo = { class: "nav" }, So = ["onClick"], Co = ["innerHTML"], wo = { class: "nav-list" }, To = ["href", "onClick"], Eo = ["innerHTML"], Do = { class: "nav-text" }, Oo = ["href", "onClick"], ko = { class: "title no-children" }, Ao = ["innerHTML"], jo = { class: "user-capsule" }, Mo = { class: "user-avatar" }, No = ["src"], Po = {
4520
+ }), [["__scopeId", "data-v-1e35f393"]]), Eo = { class: "header" }, Do = { class: "brand-logo" }, Oo = { class: "logo-text" }, ko = { class: "logo-icon" }, Ao = { class: "nav" }, jo = ["onClick"], Mo = ["innerHTML"], No = { class: "nav-list" }, Po = ["href", "onClick"], Fo = ["innerHTML"], Io = { class: "nav-text" }, Lo = ["href", "onClick"], Ro = { class: "title no-children" }, zo = ["innerHTML"], Bo = { class: "user-capsule" }, Vo = { class: "user-avatar" }, Ho = ["src"], Uo = {
4315
4521
  key: 1,
4316
4522
  xmlns: "http://www.w3.org/2000/svg",
4317
4523
  width: "36",
4318
4524
  height: "36",
4319
4525
  viewBox: "0 0 36 36"
4320
- }, Fo = { class: "user-info" }, Io = { class: "user-name-row" }, Lo = { class: "user-name" }, Ro = /* @__PURE__ */ R(/* @__PURE__ */ p({
4526
+ }, Wo = { class: "user-info" }, Go = { class: "user-name-row" }, Ko = { class: "user-name" }, qo = /* @__PURE__ */ R(/* @__PURE__ */ p({
4321
4527
  __name: "NSidebar",
4322
4528
  props: {
4323
4529
  title: { default: "" },
@@ -4370,8 +4576,8 @@ var ea = {
4370
4576
  class: "content",
4371
4577
  onMouseenter: v[2] ||= (e) => p.value = !0
4372
4578
  }, [
4373
- T(r.$slots, "header", {}, () => [c("div", _o, [c("div", vo, [c("span", yo, E(n.title), 1), c("span", bo, E(n.title.substring(0, 1).toUpperCase()), 1)])])], !0),
4374
- c("div", xo, [(x(!0), s(e, null, w(n.menus, (t) => (x(), s(e, null, [t.children?.length ? (x(), s("div", {
4579
+ T(r.$slots, "header", {}, () => [c("div", Eo, [c("div", Do, [c("span", Oo, E(n.title), 1), c("span", ko, E(n.title.substring(0, 1).toUpperCase()), 1)])])], !0),
4580
+ c("div", Ao, [(x(!0), s(e, null, w(n.menus, (t) => (x(), s(e, null, [t.children?.length ? (x(), s("div", {
4375
4581
  key: 0,
4376
4582
  class: g(["menu", {
4377
4583
  open: D(i)(t.title),
@@ -4380,7 +4586,7 @@ var ea = {
4380
4586
  }, [c("div", {
4381
4587
  class: "title",
4382
4588
  onClick: (e) => D(o)(t.title)
4383
- }, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, Co), c("span", null, E(t.title), 1)]), v[6] ||= c("svg", {
4589
+ }, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, Mo), c("span", null, E(t.title), 1)]), v[6] ||= c("svg", {
4384
4590
  xmlns: "http://www.w3.org/2000/svg",
4385
4591
  width: "14",
4386
4592
  height: "14",
@@ -4391,23 +4597,23 @@ var ea = {
4391
4597
  "stroke-linecap": "round",
4392
4598
  "stroke-linejoin": "round",
4393
4599
  class: "icon"
4394
- }, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8, So), c("div", wo, [c("div", null, [(x(!0), s(e, null, w(t.children, (e) => (x(), s("a", {
4600
+ }, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8, jo), c("div", No, [c("div", null, [(x(!0), s(e, null, w(t.children, (e) => (x(), s("a", {
4395
4601
  href: e.route,
4396
4602
  onClick: N((t) => h(e), ["prevent"])
4397
- }, [c("div", { class: g(["nav-item", { active: D(d)(e, n.currentPath) }]) }, [c("div", { innerHTML: e.icon }, null, 8, Eo), c("span", Do, E(e.title), 1)], 2)], 8, To))), 256))])])], 2)) : (x(), s("div", {
4603
+ }, [c("div", { class: g(["nav-item", { active: D(d)(e, n.currentPath) }]) }, [c("div", { innerHTML: e.icon }, null, 8, Fo), c("span", Io, E(e.title), 1)], 2)], 8, Po))), 256))])])], 2)) : (x(), s("div", {
4398
4604
  key: 1,
4399
4605
  class: g(["menu", { active: t.route === n.currentPath }])
4400
4606
  }, [c("a", {
4401
4607
  href: t.route,
4402
4608
  onClick: N((e) => _(t), ["prevent"])
4403
- }, [c("div", ko, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, Ao), c("span", null, E(t.title), 1)])])], 8, Oo)], 2))], 64))), 256))]),
4404
- c("div", jo, [T(r.$slots, "user", {}, () => [
4405
- c("div", Mo, [n.userAvatarUrl ? (x(), s("img", {
4609
+ }, [c("div", Ro, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, zo), c("span", null, E(t.title), 1)])])], 8, Lo)], 2))], 64))), 256))]),
4610
+ c("div", Bo, [T(r.$slots, "user", {}, () => [
4611
+ c("div", Vo, [n.userAvatarUrl ? (x(), s("img", {
4406
4612
  key: 0,
4407
4613
  src: n.userAvatarUrl,
4408
4614
  alt: "User Avatar"
4409
- }, null, 8, No)) : (x(), s("svg", Po, [...v[7] ||= [u("<defs data-v-2c73c218><clipPath id=\"avatarClip\" data-v-2c73c218><circle cx=\"18\" cy=\"18\" r=\"18\" data-v-2c73c218></circle></clipPath></defs><circle cx=\"18\" cy=\"18\" r=\"18\" fill=\"#dbeafe\" data-v-2c73c218></circle><g clip-path=\"url(#avatarClip)\" data-v-2c73c218><circle cx=\"18\" cy=\"14\" r=\"6\" fill=\"#2563eb\" data-v-2c73c218></circle><path d=\"M6,34 Q6,24 18,24 Q30,24 30,34\" fill=\"#2563eb\" data-v-2c73c218></path></g>", 3)]]))]),
4410
- c("div", Fo, [c("div", Io, [c("span", Lo, E(n.userName), 1)])]),
4615
+ }, null, 8, Ho)) : (x(), s("svg", Uo, [...v[7] ||= [u("<defs data-v-2c73c218><clipPath id=\"avatarClip\" data-v-2c73c218><circle cx=\"18\" cy=\"18\" r=\"18\" data-v-2c73c218></circle></clipPath></defs><circle cx=\"18\" cy=\"18\" r=\"18\" fill=\"#dbeafe\" data-v-2c73c218></circle><g clip-path=\"url(#avatarClip)\" data-v-2c73c218><circle cx=\"18\" cy=\"14\" r=\"6\" fill=\"#2563eb\" data-v-2c73c218></circle><path d=\"M6,34 Q6,24 18,24 Q30,24 30,34\" fill=\"#2563eb\" data-v-2c73c218></path></g>", 3)]]))]),
4616
+ c("div", Wo, [c("div", Go, [c("span", Ko, E(n.userName), 1)])]),
4411
4617
  f(z, {
4412
4618
  class: "logout-btn",
4413
4619
  intent: "error",
@@ -4446,7 +4652,7 @@ var ea = {
4446
4652
  }, null, 2)]))
4447
4653
  ], 34));
4448
4654
  }
4449
- }), [["__scopeId", "data-v-2c73c218"]]), zo = { class: "layout" }, Bo = { class: "main-content" }, Vo = { class: "copyright" }, Ho = /* @__PURE__ */ R(/* @__PURE__ */ p({
4655
+ }), [["__scopeId", "data-v-2c73c218"]]), Jo = { class: "layout" }, Yo = { class: "main-content" }, Xo = { class: "copyright" }, Zo = /* @__PURE__ */ R(/* @__PURE__ */ p({
4450
4656
  __name: "NLayout",
4451
4657
  props: {
4452
4658
  title: { default: "NICKLABS" },
@@ -4462,7 +4668,7 @@ var ea = {
4462
4668
  emits: ["logout", "navigate"],
4463
4669
  setup(e, { emit: t }) {
4464
4670
  let n = rn(), r = t;
4465
- return (t, i) => (x(), s("div", zo, [e.isShowSidebar ? (x(), a(Ro, {
4671
+ return (t, i) => (x(), s("div", Jo, [e.isShowSidebar ? (x(), a(qo, {
4466
4672
  key: 0,
4467
4673
  title: e.title,
4468
4674
  userName: e.userName,
@@ -4478,18 +4684,18 @@ var ea = {
4478
4684
  "isOpen",
4479
4685
  "menus",
4480
4686
  "currentPath"
4481
- ])) : o("", !0), c("main", Bo, [T(t.$slots, "default", {}, void 0, !0), c("div", Vo, E(e.copyright), 1)])]));
4687
+ ])) : o("", !0), c("main", Yo, [T(t.$slots, "default", {}, void 0, !0), c("div", Xo, E(e.copyright), 1)])]));
4482
4688
  }
4483
- }), [["__scopeId", "data-v-41b1eb44"]]), Uo = { class: "topbar" }, Wo = { class: "topbar-left" }, Go = { class: "topbar-right" }, Ko = {
4689
+ }), [["__scopeId", "data-v-41b1eb44"]]), Qo = { class: "topbar" }, $o = { class: "topbar-left" }, es = { class: "topbar-right" }, ts = {
4484
4690
  key: 0,
4485
4691
  class: "pill"
4486
- }, qo = {
4692
+ }, ns = {
4487
4693
  key: 0,
4488
4694
  class: "name"
4489
- }, Jo = {
4695
+ }, rs = {
4490
4696
  key: 1,
4491
4697
  class: "separator"
4492
- }, Yo = /* @__PURE__ */ R(/* @__PURE__ */ p({
4698
+ }, is = /* @__PURE__ */ R(/* @__PURE__ */ p({
4493
4699
  __name: "NNavigation",
4494
4700
  props: {
4495
4701
  isShowSidebar: {
@@ -4514,7 +4720,7 @@ var ea = {
4514
4720
  let n = t, r = () => {
4515
4721
  document.fullscreenElement ? document.exitFullscreen?.() : document.documentElement.requestFullscreen();
4516
4722
  };
4517
- return (t, i) => (x(), s("header", Uo, [c("div", Wo, [e.isShowSidebar ? (x(), a(z, {
4723
+ return (t, i) => (x(), s("header", Qo, [c("div", $o, [e.isShowSidebar ? (x(), a(z, {
4518
4724
  key: 0,
4519
4725
  onClick: i[0] ||= (e) => n("toggleSidebar"),
4520
4726
  padding: "8px"
@@ -4557,9 +4763,9 @@ var ea = {
4557
4763
  c("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
4558
4764
  ], -1)]]),
4559
4765
  _: 1
4560
- })) : o("", !0)]), c("div", Go, [e.isShowUser || e.isShowLogoutButton ? (x(), s("div", Ko, [
4561
- e.isShowUser ? (x(), s("span", qo, "Nick")) : o("", !0),
4562
- e.isShowUser && e.isShowLogoutButton ? (x(), s("div", Jo)) : o("", !0),
4766
+ })) : o("", !0)]), c("div", es, [e.isShowUser || e.isShowLogoutButton ? (x(), s("div", ts, [
4767
+ e.isShowUser ? (x(), s("span", ns, "Nick")) : o("", !0),
4768
+ e.isShowUser && e.isShowLogoutButton ? (x(), s("div", rs)) : o("", !0),
4563
4769
  e.isShowLogoutButton ? (x(), a(z, {
4564
4770
  key: 2,
4565
4771
  variant: "mute",
@@ -4585,10 +4791,10 @@ var ea = {
4585
4791
  })) : o("", !0)
4586
4792
  ])) : o("", !0)])]));
4587
4793
  }
4588
- }), [["__scopeId", "data-v-f38a4beb"]]), Xo = { class: "brand" }, Zo = ["src", "alt"], Qo = {
4794
+ }), [["__scopeId", "data-v-f38a4beb"]]), as = { class: "brand" }, os = ["src", "alt"], ss = {
4589
4795
  key: 1,
4590
4796
  class: "icon"
4591
- }, $o = { key: 2 }, es = { key: 3 }, ts = /* @__PURE__ */ R(/* @__PURE__ */ p({
4797
+ }, cs = { key: 2 }, ls = { key: 3 }, us = /* @__PURE__ */ R(/* @__PURE__ */ p({
4592
4798
  __name: "NLoginLayout",
4593
4799
  props: {
4594
4800
  backgroundImage: { default: "" },
@@ -4606,15 +4812,15 @@ var ea = {
4606
4812
  radius: "xl",
4607
4813
  class: "card"
4608
4814
  }, {
4609
- default: j(() => [c("div", Xo, [
4815
+ default: j(() => [c("div", as, [
4610
4816
  t.value ? (x(), s("img", {
4611
4817
  key: 0,
4612
4818
  class: "logo-img",
4613
4819
  src: e.logo,
4614
4820
  alt: e.title
4615
- }, null, 8, Zo)) : (x(), s("div", Qo, E(e.logo), 1)),
4616
- e.title ? (x(), s("h1", $o, E(e.title), 1)) : o("", !0),
4617
- e.description ? (x(), s("p", es, E(e.description), 1)) : o("", !0)
4821
+ }, null, 8, os)) : (x(), s("div", ss, E(e.logo), 1)),
4822
+ e.title ? (x(), s("h1", cs, E(e.title), 1)) : o("", !0),
4823
+ e.description ? (x(), s("p", ls, E(e.description), 1)) : o("", !0)
4618
4824
  ]), T(n.$slots, "default", {}, void 0, !0)]),
4619
4825
  _: 3
4620
4826
  })], 4));
@@ -4622,19 +4828,19 @@ var ea = {
4622
4828
  }), [["__scopeId", "data-v-f0866bc5"]]);
4623
4829
  //#endregion
4624
4830
  //#region src/composables/useRouteModal.ts
4625
- function ns(e) {
4831
+ function ds(e) {
4626
4832
  let t = i(() => {
4627
- let t = F();
4833
+ let t = I();
4628
4834
  return t ? t.currentRoute.value.matched.some((t) => t.name === e.routeName) : !1;
4629
- }), n = i(() => F()?.currentRoute.value.params ?? {});
4835
+ }), n = i(() => I()?.currentRoute.value.params ?? {});
4630
4836
  function r(t = {}) {
4631
- F()?.push({
4837
+ I()?.push({
4632
4838
  name: e.routeName,
4633
4839
  params: t
4634
4840
  });
4635
4841
  }
4636
4842
  function a() {
4637
- let t = F();
4843
+ let t = I();
4638
4844
  t && (window.history.state?.back ? t.back() : e.parentRouteName ? t.push({ name: e.parentRouteName }) : t.back());
4639
4845
  }
4640
4846
  return {
@@ -4646,12 +4852,12 @@ function ns(e) {
4646
4852
  }
4647
4853
  //#endregion
4648
4854
  //#region src/index.ts
4649
- var rs = {
4855
+ var fs = {
4650
4856
  NButton: z,
4651
4857
  NBreadcrumb: re,
4652
- NInput: ue,
4653
- NTextarea: he,
4654
- NCheckbox: xe,
4858
+ NInput: ce,
4859
+ NTextarea: pe,
4860
+ NCheckbox: ye,
4655
4861
  NSelect: Oe,
4656
4862
  NFileSelect: $t,
4657
4863
  NForm: xn,
@@ -4668,18 +4874,18 @@ var rs = {
4668
4874
  NDrawer: Ui,
4669
4875
  NAlert: Qi,
4670
4876
  NTable: nr,
4671
- NVideoSelect: wa,
4672
- NImageSelect: Ja,
4673
- NAudioSelect: go,
4674
- NLayout: Ho,
4675
- NNavigation: Yo,
4676
- NSidebar: Ro,
4877
+ NVideoSelect: Oa,
4878
+ NImageSelect: no,
4879
+ NAudioSelect: To,
4880
+ NLayout: Zo,
4881
+ NNavigation: is,
4882
+ NSidebar: qo,
4677
4883
  NCard: Sn,
4678
- NLoginLayout: ts
4679
- }, is = { install(e, t = {}) {
4680
- Object.entries(rs).forEach(([t, n]) => {
4884
+ NLoginLayout: us
4885
+ }, ps = { install(e, t = {}) {
4886
+ Object.entries(fs).forEach(([t, n]) => {
4681
4887
  e.component(t, n);
4682
- }), t.router && ee(t.router);
4888
+ }), t.router && F(t.router);
4683
4889
  } };
4684
4890
  //#endregion
4685
- export { Qi as NAlert, go as NAudioSelect, z as NButton, Sn as NCard, xe as NCheckbox, wr as NCode, Mi as NDatePicker, Ui as NDrawer, Mn as NEmpty, $t as NFileSelect, xn as NForm, Ja as NImageSelect, ue as NInput, Ho as NLayout, or as NList, Un as NLoading, ts as NLoginLayout, Ri as NModal, Yo as NNavigation, Oe as NSelect, Ro as NSidebar, Er as NSwitch, nr as NTable, Dr as NTag, he as NTextarea, hr as NToast, Ni as NTooltip, wa as NVideoSelect, is as NickLabsUI, Rt as useAlert, H as useBreadcrumb, $i as useDisclosure, ns as useRouteModal, rn as useSidebarManager, lr as useToast };
4891
+ export { Qi as NAlert, To as NAudioSelect, z as NButton, Sn as NCard, ye as NCheckbox, wr as NCode, Mi as NDatePicker, Ui as NDrawer, Mn as NEmpty, $t as NFileSelect, xn as NForm, no as NImageSelect, ce as NInput, Zo as NLayout, or as NList, Un as NLoading, us as NLoginLayout, Ri as NModal, is as NNavigation, Oe as NSelect, qo as NSidebar, Er as NSwitch, nr as NTable, Dr as NTag, pe as NTextarea, hr as NToast, Ni as NTooltip, Oa as NVideoSelect, ps as NickLabsUI, Rt as useAlert, H as useBreadcrumb, $i as useDisclosure, ds as useRouteModal, rn as useSidebarManager, lr as useToast };