nicklabs-ui 0.1.1

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.
Files changed (36) hide show
  1. package/dist/index.mjs +3939 -0
  2. package/dist/nicklabs-ui.css +1 -0
  3. package/dist/src/components/NAlert.vue.d.ts +3 -0
  4. package/dist/src/components/NButton.vue.d.ts +25 -0
  5. package/dist/src/components/NCheckbox.vue.d.ts +35 -0
  6. package/dist/src/components/NCode.vue.d.ts +8 -0
  7. package/dist/src/components/NDatePicker.vue.d.ts +26 -0
  8. package/dist/src/components/NEmpty.vue.d.ts +19 -0
  9. package/dist/src/components/NFileSelect.vue.d.ts +17 -0
  10. package/dist/src/components/NForm.vue.d.ts +30 -0
  11. package/dist/src/components/NInput.vue.d.ts +32 -0
  12. package/dist/src/components/NList.vue.d.ts +67 -0
  13. package/dist/src/components/NLoading.vue.d.ts +21 -0
  14. package/dist/src/components/NModal.vue.d.ts +31 -0
  15. package/dist/src/components/NSelect.vue.d.ts +26 -0
  16. package/dist/src/components/NSwitch.vue.d.ts +20 -0
  17. package/dist/src/components/NTable.vue.d.ts +50 -0
  18. package/dist/src/components/NTag.vue.d.ts +24 -0
  19. package/dist/src/components/NTextarea.vue.d.ts +32 -0
  20. package/dist/src/components/NToast.vue.d.ts +3 -0
  21. package/dist/src/components/NTooltip.vue.d.ts +20 -0
  22. package/dist/src/composables/useAlert.d.ts +12 -0
  23. package/dist/src/composables/useDisclosure.d.ts +1 -0
  24. package/dist/src/composables/useSidebarManager.d.ts +6 -0
  25. package/dist/src/composables/useToast.d.ts +11 -0
  26. package/dist/src/index.d.ts +28 -0
  27. package/dist/src/layouts/NBreadcrumb.vue.d.ts +5 -0
  28. package/dist/src/layouts/NCard.vue.d.ts +17 -0
  29. package/dist/src/layouts/NHeroSection.vue.d.ts +17 -0
  30. package/dist/src/layouts/NLayout.vue.d.ts +38 -0
  31. package/dist/src/layouts/NLoginLayout.vue.d.ts +19 -0
  32. package/dist/src/layouts/NNavigation.vue.d.ts +15 -0
  33. package/dist/src/layouts/NPaginate.vue.d.ts +12 -0
  34. package/dist/src/layouts/NSideFilter.vue.d.ts +13 -0
  35. package/dist/src/layouts/NSidebar.vue.d.ts +13 -0
  36. package/package.json +42 -0
package/dist/index.mjs ADDED
@@ -0,0 +1,3939 @@
1
+ import { defineComponent as A, useCssVars as mt, computed as M, createElementBlock as i, openBlock as a, normalizeClass as S, renderSlot as I, ref as T, createCommentVNode as f, createElementVNode as t, toDisplayString as k, onMounted as Ce, Fragment as N, renderList as F, withModifiers as R, createTextVNode as z, onBeforeUnmount as wt, withDirectives as Ut, vModelText as Yt, nextTick as qt, inject as yt, reactive as Pe, createVNode as D, unref as ae, withCtx as $, createBlock as L, normalizeStyle as fe, useSlots as Kt, createSlots as Wt, Teleport as Re, TransitionGroup as Zt, Transition as he, watch as He, onUnmounted as kt, createStaticVNode as Gt } from "vue";
2
+ const Jt = ["type", "disabled"], Qt = /* @__PURE__ */ A({
3
+ __name: "NButton",
4
+ props: {
5
+ variant: { default: "none" },
6
+ intent: { default: "none" },
7
+ disabled: { type: Boolean, default: !1 },
8
+ type: { default: "button" },
9
+ radiusSize: { default: "md" },
10
+ size: { default: "md" },
11
+ padding: { default: () => {
12
+ } },
13
+ width: { default: () => {
14
+ } },
15
+ height: { default: () => {
16
+ } },
17
+ square: { type: Boolean, default: !1 }
18
+ },
19
+ setup(e) {
20
+ mt((s) => ({
21
+ v7679b000: o.value,
22
+ aa741ce6: s.width,
23
+ d7ad7380: s.height
24
+ }));
25
+ const n = {
26
+ sm: "4px 10px",
27
+ md: "6px 14px",
28
+ lg: "8px 18px"
29
+ }, o = M(() => e.padding ?? n[e.size]);
30
+ return (s, r) => (a(), i("button", {
31
+ class: S([
32
+ `variant-${e.variant}`,
33
+ `intent-${e.intent}`,
34
+ `radiusSize-${e.radiusSize}`,
35
+ `size-${e.size}`,
36
+ { square: e.square }
37
+ ]),
38
+ type: e.type,
39
+ disabled: e.disabled
40
+ }, [
41
+ I(s.$slots, "default", {}, void 0, !0)
42
+ ], 10, Jt));
43
+ }
44
+ }), E = (e, n) => {
45
+ const o = e.__vccOpts || e;
46
+ for (const [s, r] of n)
47
+ o[s] = r;
48
+ return o;
49
+ }, B = /* @__PURE__ */ E(Qt, [["__scopeId", "data-v-d06c4b84"]]), Xt = { class: "input" }, _t = {
50
+ key: 0,
51
+ class: "label"
52
+ }, en = ["disabled"], tn = ["type", "placeholder", "disabled", "readonly", "value", "maxlength", "autocomplete"], nn = ["disabled"], on = {
53
+ key: 2,
54
+ class: "actions"
55
+ }, an = {
56
+ key: 0,
57
+ xmlns: "http://www.w3.org/2000/svg",
58
+ width: "16",
59
+ height: "16",
60
+ viewBox: "0 0 24 24",
61
+ fill: "none",
62
+ stroke: "currentColor",
63
+ "stroke-width": "2",
64
+ "stroke-linecap": "round",
65
+ "stroke-linejoin": "round"
66
+ }, ln = {
67
+ key: 1,
68
+ xmlns: "http://www.w3.org/2000/svg",
69
+ width: "16",
70
+ height: "16",
71
+ viewBox: "0 0 24 24",
72
+ fill: "none",
73
+ stroke: "currentColor",
74
+ "stroke-width": "2",
75
+ "stroke-linecap": "round",
76
+ "stroke-linejoin": "round"
77
+ }, sn = /* @__PURE__ */ A({
78
+ __name: "NInput",
79
+ props: {
80
+ modelValue: { default: "" },
81
+ type: { default: "text" },
82
+ placeholder: { default: "" },
83
+ disabled: { type: Boolean, default: !1 },
84
+ readonly: { type: Boolean, default: !1 },
85
+ clearable: { type: Boolean, default: !1 },
86
+ maxlength: { default: () => {
87
+ } },
88
+ min: { default: () => -1 / 0 },
89
+ max: { default: () => 1 / 0 },
90
+ title: { default: "" },
91
+ autocomplete: { default: "off" }
92
+ },
93
+ emits: ["update:modelValue", "focus", "blur", "input", "change", "keydown", "clear"],
94
+ setup(e, { emit: n }) {
95
+ mt((x) => ({
96
+ v70dd38b4: p.value
97
+ }));
98
+ const o = n, s = M(() => e.type === "password"), r = M(() => e.type === "number"), d = T(!1), h = M(() => r.value ? "text" : s.value ? d.value ? "text" : "password" : e.type), p = M(() => {
99
+ let x = 12;
100
+ return s.value && (x += 24), e.clearable && (x += 24), `${x}px`;
101
+ }), w = (x) => {
102
+ const y = x.replace(/[^0-9]/g, "");
103
+ return y === "" ? "" : r.value ? String(Math.min(Math.max(Number(y), e.min), e.max)) : y;
104
+ }, b = (x) => !!([
105
+ "Backspace",
106
+ "Delete",
107
+ "ArrowLeft",
108
+ "ArrowRight",
109
+ "ArrowUp",
110
+ "ArrowDown",
111
+ "Tab",
112
+ "Home",
113
+ "End"
114
+ ].includes(x.key) || x.ctrlKey || x.metaKey || /^[0-9]$/.test(x.key)), g = (x) => {
115
+ if (o("keydown", x), !!r.value) {
116
+ if (x.key === "ArrowUp") {
117
+ x.preventDefault(), J();
118
+ return;
119
+ }
120
+ if (x.key === "ArrowDown") {
121
+ x.preventDefault(), Z();
122
+ return;
123
+ }
124
+ if (!b(x)) {
125
+ x.preventDefault();
126
+ return;
127
+ }
128
+ }
129
+ }, c = (x) => {
130
+ if (r.value) {
131
+ const y = x.target, V = w(y.value);
132
+ y.value !== V && (y.value = V, o("update:modelValue", V));
133
+ }
134
+ }, m = (x) => {
135
+ o("input", x);
136
+ const y = x.target;
137
+ if (r.value) {
138
+ const V = w(y.value);
139
+ if (y.value !== V) {
140
+ y.value = V, o("update:modelValue", V);
141
+ return;
142
+ }
143
+ }
144
+ o("update:modelValue", y.value);
145
+ }, C = (x) => {
146
+ if (o("blur", x), r.value && e.modelValue === "") {
147
+ const y = String(e.min === -1 / 0 ? 0 : e.min);
148
+ o("update:modelValue", y);
149
+ }
150
+ }, O = () => {
151
+ e.disabled || e.readonly || (o("update:modelValue", ""), o("clear"));
152
+ }, Z = () => {
153
+ if (e.disabled)
154
+ return;
155
+ const x = e.modelValue !== "" ? Number(e.modelValue) : e.min, y = Math.max(x - 1, e.min);
156
+ if (e.min <= y && y <= e.max) {
157
+ o("update:modelValue", String(y));
158
+ return;
159
+ }
160
+ o("update:modelValue", String(e.min));
161
+ }, J = () => {
162
+ if (e.disabled)
163
+ return;
164
+ const x = e.modelValue !== "" ? Number(e.modelValue) : e.min, y = Math.min(x + 1, e.max);
165
+ if (e.min <= y && y <= e.max) {
166
+ o("update:modelValue", String(y));
167
+ return;
168
+ }
169
+ o("update:modelValue", String(e.min));
170
+ }, G = () => d.value = !d.value;
171
+ return (x, y) => (a(), i("div", Xt, [
172
+ e.title ? (a(), i("label", _t, k(e.title), 1)) : f("", !0),
173
+ t("div", {
174
+ class: S({
175
+ common: !r.value,
176
+ number: r.value,
177
+ disabled: e.disabled
178
+ })
179
+ }, [
180
+ r.value ? (a(), i("button", {
181
+ key: 0,
182
+ class: "tool-button",
183
+ type: "button",
184
+ disabled: e.disabled || Number(e.modelValue) <= e.min,
185
+ onClick: Z
186
+ }, [...y[2] || (y[2] = [
187
+ t("svg", {
188
+ xmlns: "http://www.w3.org/2000/svg",
189
+ width: "16",
190
+ height: "16",
191
+ viewBox: "0 0 24 24",
192
+ fill: "none",
193
+ stroke: "currentColor",
194
+ "stroke-width": "2",
195
+ "stroke-linecap": "round",
196
+ "stroke-linejoin": "round"
197
+ }, [
198
+ t("path", { d: "M5 12h14" })
199
+ ], -1)
200
+ ])], 8, en)) : f("", !0),
201
+ t("input", {
202
+ type: h.value,
203
+ placeholder: e.placeholder,
204
+ disabled: e.disabled,
205
+ readonly: e.readonly,
206
+ value: e.modelValue,
207
+ maxlength: e.maxlength,
208
+ autocomplete: e.autocomplete,
209
+ onFocus: y[0] || (y[0] = (V) => o("focus", V)),
210
+ onBlur: C,
211
+ onInput: m,
212
+ onChange: y[1] || (y[1] = (V) => o("change", V)),
213
+ onKeydown: g,
214
+ onCompositionend: c
215
+ }, null, 40, tn),
216
+ r.value ? (a(), i("button", {
217
+ key: 1,
218
+ class: "tool-button",
219
+ type: "button",
220
+ disabled: e.disabled || Number(e.modelValue) >= e.max,
221
+ onClick: J
222
+ }, [...y[3] || (y[3] = [
223
+ t("svg", {
224
+ xmlns: "http://www.w3.org/2000/svg",
225
+ width: "16",
226
+ height: "16",
227
+ viewBox: "0 0 24 24",
228
+ fill: "none",
229
+ stroke: "currentColor",
230
+ "stroke-width": "2",
231
+ "stroke-linecap": "round",
232
+ "stroke-linejoin": "round"
233
+ }, [
234
+ t("path", { d: "M5 12h14" }),
235
+ t("path", { d: "M12 5v14" })
236
+ ], -1)
237
+ ])], 8, nn)) : f("", !0),
238
+ r.value ? f("", !0) : (a(), i("div", on, [
239
+ s.value && !e.disabled ? (a(), i("button", {
240
+ key: 0,
241
+ type: "button",
242
+ onClick: G,
243
+ "aria-label": "Toggle password visibility"
244
+ }, [
245
+ d.value ? (a(), i("svg", ln, [...y[5] || (y[5] = [
246
+ t("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),
247
+ t("path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }, null, -1),
248
+ t("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),
249
+ t("path", { d: "m2 2 20 20" }, null, -1)
250
+ ])])) : (a(), i("svg", an, [...y[4] || (y[4] = [
251
+ t("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),
252
+ t("circle", {
253
+ cx: "12",
254
+ cy: "12",
255
+ r: "3"
256
+ }, null, -1)
257
+ ])]))
258
+ ])) : f("", !0),
259
+ e.clearable && `${e.modelValue}`.length > 0 && !e.disabled ? (a(), i("button", {
260
+ key: 1,
261
+ type: "button",
262
+ "aria-label": "Clear input",
263
+ onClick: O
264
+ }, [...y[6] || (y[6] = [
265
+ t("svg", {
266
+ xmlns: "http://www.w3.org/2000/svg",
267
+ width: "16",
268
+ height: "16",
269
+ viewBox: "0 0 24 24",
270
+ fill: "none",
271
+ stroke: "currentColor",
272
+ "stroke-width": "2",
273
+ "stroke-linecap": "round",
274
+ "stroke-linejoin": "round"
275
+ }, [
276
+ t("path", { d: "M18 6 6 18" }),
277
+ t("path", { d: "m6 6 12 12" })
278
+ ], -1)
279
+ ])])) : f("", !0)
280
+ ]))
281
+ ], 2)
282
+ ]));
283
+ }
284
+ }), ci = /* @__PURE__ */ E(sn, [["__scopeId", "data-v-d5f9697c"]]), rn = { class: "textarea" }, un = ["textContent"], dn = ["rows", "placeholder", "disabled", "readonly", "value", "maxlength", "autocomplete", "wrap"], cn = {
285
+ key: 1,
286
+ class: "char-count"
287
+ }, vn = /* @__PURE__ */ A({
288
+ __name: "NTextarea",
289
+ props: {
290
+ modelValue: { default: "" },
291
+ placeholder: { default: "" },
292
+ disabled: { type: Boolean, default: !1 },
293
+ readonly: { type: Boolean, default: !1 },
294
+ rows: { default: 5 },
295
+ maxLength: { default: () => {
296
+ } },
297
+ title: { default: () => {
298
+ } },
299
+ autocomplete: { default: "off" },
300
+ autofocus: { type: Boolean, default: !1 },
301
+ showCount: { type: [Boolean, Function], default: !1 },
302
+ wrap: { default: "soft" }
303
+ },
304
+ emits: ["update:modelValue", "focus", "blur", "input", "change", "keydown", "paste"],
305
+ setup(e, { emit: n }) {
306
+ const o = n, s = T(null), r = M(() => {
307
+ const w = Number(e.maxLength);
308
+ return Number.isFinite(w) && w > 0 ? w : void 0;
309
+ }), d = M(() => r.value !== void 0), h = M(() => {
310
+ const w = e.modelValue ?? "";
311
+ return typeof e.showCount == "function" ? e.showCount(w, r.value) : e.showCount ? d.value ? `${w.length} / ${r.value}` : String(w.length) : "";
312
+ }), p = (w) => {
313
+ o("input", w);
314
+ const b = w.target;
315
+ o("update:modelValue", b.value);
316
+ };
317
+ return Ce(() => {
318
+ e.autofocus && s.value?.focus();
319
+ }), (w, b) => (a(), i("div", rn, [
320
+ e.title ? (a(), i("label", {
321
+ key: 0,
322
+ class: "label",
323
+ textContent: k(e.title)
324
+ }, null, 8, un)) : f("", !0),
325
+ t("textarea", {
326
+ ref_key: "textareaRef",
327
+ ref: s,
328
+ class: "textarea-control",
329
+ rows: e.rows,
330
+ placeholder: e.placeholder,
331
+ disabled: e.disabled,
332
+ readonly: e.readonly,
333
+ value: e.modelValue,
334
+ maxlength: r.value,
335
+ autocomplete: e.autocomplete,
336
+ wrap: e.wrap,
337
+ onFocus: b[0] || (b[0] = (g) => o("focus", g)),
338
+ onBlur: b[1] || (b[1] = (g) => o("blur", g)),
339
+ onInput: p,
340
+ onChange: b[2] || (b[2] = (g) => o("change", g)),
341
+ onKeydown: b[3] || (b[3] = (g) => o("keydown", g)),
342
+ onPaste: b[4] || (b[4] = (g) => o("paste", g))
343
+ }, null, 40, dn),
344
+ e.showCount ? (a(), i("div", cn, k(h.value), 1)) : f("", !0)
345
+ ]));
346
+ }
347
+ }), vi = /* @__PURE__ */ E(vn, [["__scopeId", "data-v-3356cfbd"]]), hn = { class: "checkbox" }, fn = {
348
+ key: 0,
349
+ class: "label"
350
+ }, gn = ["onClick"], mn = ["checked", "disabled"], wn = ["checked", "disabled"], yn = /* @__PURE__ */ A({
351
+ __name: "NCheckbox",
352
+ props: {
353
+ modelValue: { default: !1 },
354
+ multiple: { type: Boolean, default: !1 },
355
+ disabled: { type: Boolean, default: !1 },
356
+ title: { default: () => {
357
+ } },
358
+ autofocus: { type: Boolean, default: !1 },
359
+ ariaLabel: { default: () => {
360
+ } },
361
+ direction: { default: "row" },
362
+ options: { default: () => [] }
363
+ },
364
+ emits: ["update:modelValue", "change", "change:item", "change:value", "change:values"],
365
+ setup(e, { emit: n }) {
366
+ const o = n, s = T(null), r = M(() => !e.options || e.options.length === 0), d = M(() => !!e.multiple), h = M(() => Array.isArray(e.options) && e.options.length > 0), p = M(() => h.value ? Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue] : []), w = (g) => p.value.some((c) => c === g), b = (g) => {
367
+ if (e.disabled)
368
+ return;
369
+ if (r.value) {
370
+ const C = !e.modelValue;
371
+ o("update:modelValue", C), o("change", C), o("change:value", C);
372
+ return;
373
+ }
374
+ if (!g)
375
+ return;
376
+ let c = [...p.value];
377
+ const m = w(g.value);
378
+ d.value ? m ? c = c.filter(
379
+ (C) => C !== g.value
380
+ ) : c.push(g.value) : m ? c = !1 : c = g.value, o("update:modelValue", c), o("change", c), o("change:item", g), o("change:value", c), o("change:values", c);
381
+ };
382
+ return Ce(() => {
383
+ e.autofocus || s.value?.focus();
384
+ }), (g, c) => (a(), i("div", hn, [
385
+ e.title ? (a(), i("h3", fn, k(e.title), 1)) : f("", !0),
386
+ t("div", {
387
+ class: S(["group", [e.direction]])
388
+ }, [
389
+ r.value ? (a(), i("label", {
390
+ key: 1,
391
+ class: "item",
392
+ onClick: c[0] || (c[0] = R((m) => b(), ["prevent"]))
393
+ }, [
394
+ t("input", {
395
+ type: "checkbox",
396
+ checked: !!e.modelValue,
397
+ disabled: e.disabled
398
+ }, null, 8, wn),
399
+ c[2] || (c[2] = t("span", { class: "icon" }, [
400
+ t("svg", {
401
+ xmlns: "http://www.w3.org/2000/svg",
402
+ width: "24",
403
+ height: "24",
404
+ viewBox: "0 0 24 24",
405
+ fill: "none",
406
+ stroke: "currentColor",
407
+ "stroke-width": "2",
408
+ "stroke-linecap": "round",
409
+ "stroke-linejoin": "round"
410
+ }, [
411
+ t("path", { d: "M20 6 9 17l-5-5" })
412
+ ])
413
+ ], -1)),
414
+ I(g.$slots, "default", {}, () => [
415
+ z(k(e.title || e.ariaLabel), 1)
416
+ ], !0)
417
+ ])) : (a(!0), i(N, { key: 0 }, F(e.options, (m, C) => (a(), i("label", {
418
+ key: `${m.label}${C}`,
419
+ class: "item",
420
+ onClick: R((O) => b(m), ["prevent"])
421
+ }, [
422
+ t("input", {
423
+ type: "checkbox",
424
+ checked: w(m.value),
425
+ disabled: e.disabled
426
+ }, null, 8, mn),
427
+ c[1] || (c[1] = t("span", { class: "icon" }, [
428
+ t("svg", {
429
+ xmlns: "http://www.w3.org/2000/svg",
430
+ width: "24",
431
+ height: "24",
432
+ viewBox: "0 0 24 24",
433
+ fill: "none",
434
+ stroke: "currentColor",
435
+ "stroke-width": "2",
436
+ "stroke-linecap": "round",
437
+ "stroke-linejoin": "round"
438
+ }, [
439
+ t("path", { d: "M20 6 9 17l-5-5" })
440
+ ])
441
+ ], -1)),
442
+ z(" " + k(m.label), 1)
443
+ ], 8, gn))), 128))
444
+ ], 2)
445
+ ]));
446
+ }
447
+ }), ut = /* @__PURE__ */ E(yn, [["__scopeId", "data-v-55b1d909"]]), kn = { class: "select" }, pn = {
448
+ key: 0,
449
+ class: "label"
450
+ }, bn = { class: "select-chips-container" }, xn = ["textContent"], $n = ["onClick"], Cn = {
451
+ key: 0,
452
+ class: "search-box"
453
+ }, Mn = { class: "options" }, Bn = ["onClick"], Sn = {
454
+ key: 0,
455
+ xmlns: "http://www.w3.org/2000/svg",
456
+ width: "14",
457
+ height: "14",
458
+ viewBox: "0 0 24 24",
459
+ fill: "none",
460
+ stroke: "currentColor",
461
+ "stroke-width": "2.5",
462
+ "stroke-linecap": "round",
463
+ "stroke-linejoin": "round"
464
+ }, Dn = {
465
+ key: 0,
466
+ class: "empty"
467
+ }, Nn = 240, Tn = /* @__PURE__ */ A({
468
+ __name: "NSelect",
469
+ props: {
470
+ modelValue: { default: () => {
471
+ } },
472
+ options: { default: () => [] },
473
+ multiple: { type: Boolean, default: !1 },
474
+ searchable: { type: Boolean, default: !1 },
475
+ clearable: { type: Boolean, default: !1 },
476
+ placeholder: { default: "" },
477
+ disabled: { type: Boolean, default: !1 },
478
+ title: { default: "" },
479
+ multipleDisplay: { default: "count" }
480
+ },
481
+ emits: ["update:modelValue", "change", "change:item", "change:value", "change:values"],
482
+ setup(e, { emit: n }) {
483
+ const o = n, s = T(!1), r = T(""), d = T(!1), h = T(null), p = T(null), w = M(() => {
484
+ const x = {};
485
+ return e.multiple ? Array.isArray(e.modelValue) && e.modelValue.forEach((y) => {
486
+ x[y] = e.options.find((V) => V.value === y);
487
+ }) : e.modelValue !== void 0 && e.modelValue !== null && (x[e.modelValue] = e.options.find(
488
+ (y) => y.value === e.modelValue
489
+ )), x;
490
+ }), b = M(
491
+ () => Object.keys(w.value).length > 0
492
+ ), g = async () => {
493
+ if (!e.disabled && (s.value = !s.value, s.value)) {
494
+ if (await qt(), h.value) {
495
+ const x = h.value.getBoundingClientRect(), y = window.innerHeight - x.bottom;
496
+ d.value = y < Nn;
497
+ }
498
+ e.searchable && p.value?.focus();
499
+ }
500
+ }, c = () => {
501
+ s.value = !1, r.value = "";
502
+ }, m = (x) => {
503
+ if (!s.value)
504
+ return;
505
+ const y = x.target;
506
+ h.value && !h.value.contains(y) && c();
507
+ }, C = (x) => w.value.hasOwnProperty(x), O = (x) => {
508
+ if (e.disabled)
509
+ return;
510
+ let y;
511
+ e.multiple ? (C(x.value) ? delete w.value[x.value] : w.value[x.value] = x, y = Object.keys(w.value), o("update:modelValue", y), o("change", y), o("change:item", x), o("change:value", y), o("change:values", y)) : (y = x.value, o("update:modelValue", y), o("change", y), o("change:item", x), o("change:value", y), c());
512
+ }, Z = () => {
513
+ if (e.disabled)
514
+ return;
515
+ const x = e.multiple ? [] : void 0;
516
+ o("update:modelValue", x), o("change", x), o("change:value", x), o("change:values", []);
517
+ }, J = M(() => {
518
+ const x = r.value.trim().toLowerCase();
519
+ return x ? e.options.filter(
520
+ (y) => y.label.toLowerCase().includes(x)
521
+ ) : e.options;
522
+ });
523
+ Ce(() => {
524
+ document.addEventListener("pointerdown", m);
525
+ }), wt(() => {
526
+ document.removeEventListener("pointerdown", m);
527
+ });
528
+ const G = M(() => {
529
+ const x = Object.keys(w.value), y = x.length;
530
+ return y === 0 ? "" : e.multiple ? `已選 ${y} 項` : w.value[x[0]]?.label ?? "";
531
+ });
532
+ return (x, y) => (a(), i("div", kn, [
533
+ e.title ? (a(), i("label", pn, k(e.title), 1)) : f("", !0),
534
+ t("div", {
535
+ ref_key: "selectGroupRef",
536
+ ref: h,
537
+ class: S(["group", {
538
+ open: s.value,
539
+ multiple: e.multiple
540
+ }])
541
+ }, [
542
+ t("div", {
543
+ class: S(["trigger", {
544
+ disabled: e.disabled
545
+ }]),
546
+ onClick: g
547
+ }, [
548
+ t("div", bn, [
549
+ !b.value || !e.multiple || e.multiple && e.multipleDisplay === "count" ? (a(), i("span", {
550
+ key: 0,
551
+ class: S(["trigger-text", { placeholder: !b.value }]),
552
+ textContent: k(b.value ? G.value : e.placeholder)
553
+ }, null, 10, xn)) : f("", !0),
554
+ e.multiple && e.multipleDisplay === "tags" ? (a(!0), i(N, { key: 1 }, F(w.value, (V, Y) => (a(), i("div", {
555
+ key: `${V.label}${Y}`,
556
+ class: "select-chip"
557
+ }, [
558
+ t("span", null, k(V.label), 1),
559
+ t("span", {
560
+ class: "remove-chip",
561
+ onClick: R((q) => O(V), ["stop"])
562
+ }, [...y[1] || (y[1] = [
563
+ t("svg", {
564
+ xmlns: "http://www.w3.org/2000/svg",
565
+ width: "14",
566
+ height: "14",
567
+ viewBox: "0 0 24 24",
568
+ fill: "none",
569
+ stroke: "currentColor",
570
+ "stroke-width": "2",
571
+ "stroke-linecap": "round",
572
+ "stroke-linejoin": "round"
573
+ }, [
574
+ t("path", { d: "M18 6 6 18" }),
575
+ t("path", { d: "m6 6 12 12" })
576
+ ], -1)
577
+ ])], 8, $n)
578
+ ]))), 128)) : f("", !0)
579
+ ]),
580
+ e.clearable && b.value && !e.disabled ? (a(), i("button", {
581
+ key: 0,
582
+ class: "clear-btn",
583
+ type: "button",
584
+ onClick: R(Z, ["stop"])
585
+ }, [...y[2] || (y[2] = [
586
+ t("svg", {
587
+ xmlns: "http://www.w3.org/2000/svg",
588
+ width: "14",
589
+ height: "14",
590
+ viewBox: "0 0 24 24",
591
+ fill: "none",
592
+ stroke: "currentColor",
593
+ "stroke-width": "2",
594
+ "stroke-linecap": "round",
595
+ "stroke-linejoin": "round"
596
+ }, [
597
+ t("path", { d: "M18 6 6 18" }),
598
+ t("path", { d: "m6 6 12 12" })
599
+ ], -1)
600
+ ])])) : f("", !0),
601
+ y[3] || (y[3] = t("svg", {
602
+ xmlns: "http://www.w3.org/2000/svg",
603
+ width: "14",
604
+ height: "14",
605
+ viewBox: "0 0 24 24",
606
+ fill: "none",
607
+ stroke: "currentColor",
608
+ "stroke-width": "2",
609
+ "stroke-linecap": "round",
610
+ "stroke-linejoin": "round",
611
+ class: "arrow-icon"
612
+ }, [
613
+ t("path", { d: "m6 10 6 6 6-6" })
614
+ ], -1))
615
+ ], 2),
616
+ t("div", {
617
+ class: S(["dropdown", { upward: d.value }])
618
+ }, [
619
+ e.searchable ? (a(), i("div", Cn, [
620
+ y[4] || (y[4] = t("svg", {
621
+ xmlns: "http://www.w3.org/2000/svg",
622
+ width: "14",
623
+ height: "14",
624
+ viewBox: "0 0 24 24",
625
+ fill: "none",
626
+ stroke: "currentColor",
627
+ "stroke-width": "2",
628
+ "stroke-linecap": "round",
629
+ "stroke-linejoin": "round",
630
+ class: "icon"
631
+ }, [
632
+ t("path", { d: "m21 21-4.34-4.34" }),
633
+ t("circle", {
634
+ cx: "11",
635
+ cy: "11",
636
+ r: "8"
637
+ })
638
+ ], -1)),
639
+ Ut(t("input", {
640
+ ref_key: "searchInputRef",
641
+ ref: p,
642
+ type: "text",
643
+ class: "search-input",
644
+ placeholder: "Search...",
645
+ "onUpdate:modelValue": y[0] || (y[0] = (V) => r.value = V)
646
+ }, null, 512), [
647
+ [Yt, r.value]
648
+ ])
649
+ ])) : f("", !0),
650
+ t("div", Mn, [
651
+ (a(!0), i(N, null, F(J.value, (V, Y) => (a(), i("div", {
652
+ key: `${V.label}${Y}`,
653
+ class: S(["option", {
654
+ selected: C(V.value)
655
+ }]),
656
+ onClick: (q) => O(V)
657
+ }, [
658
+ t("span", null, k(V.label), 1),
659
+ C(V.value) ? (a(), i("svg", Sn, [...y[5] || (y[5] = [
660
+ t("path", { d: "M20 6 9 17l-5-5" }, null, -1)
661
+ ])])) : f("", !0)
662
+ ], 10, Bn))), 128)),
663
+ J.value.length === 0 ? (a(), i("div", Dn, " 無符合選項 ")) : f("", !0)
664
+ ])
665
+ ], 2)
666
+ ], 2)
667
+ ]));
668
+ }
669
+ }), hi = /* @__PURE__ */ E(Tn, [["__scopeId", "data-v-ab7179eb"]]), ke = typeof Buffer == "function", dt = typeof TextDecoder == "function" ? new TextDecoder() : void 0, ct = typeof TextEncoder == "function" ? new TextEncoder() : void 0, Vn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", $e = Array.prototype.slice.call(Vn), Ae = ((e) => {
670
+ let n = {};
671
+ return e.forEach((o, s) => n[o] = s), n;
672
+ })($e), jn = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, W = String.fromCharCode.bind(String), vt = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), Ln = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (n) => n == "+" ? "-" : "_"), pt = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), In = (e) => {
673
+ let n, o, s, r, d = "";
674
+ const h = e.length % 3;
675
+ for (let p = 0; p < e.length; ) {
676
+ if ((o = e.charCodeAt(p++)) > 255 || (s = e.charCodeAt(p++)) > 255 || (r = e.charCodeAt(p++)) > 255)
677
+ throw new TypeError("invalid character found");
678
+ n = o << 16 | s << 8 | r, d += $e[n >> 18 & 63] + $e[n >> 12 & 63] + $e[n >> 6 & 63] + $e[n & 63];
679
+ }
680
+ return h ? d.slice(0, h - 3) + "===".substring(h) : d;
681
+ }, bt = typeof btoa == "function" ? (e) => btoa(e) : ke ? (e) => Buffer.from(e, "binary").toString("base64") : In, An = ke ? (e) => Buffer.from(e).toString("base64") : (e) => {
682
+ let n = [];
683
+ for (let o = 0, s = e.length; o < s; o += 4096)
684
+ n.push(W.apply(null, e.subarray(o, o + 4096)));
685
+ return bt(n.join(""));
686
+ }, En = (e) => {
687
+ if (e.length < 2) {
688
+ var n = e.charCodeAt(0);
689
+ return n < 128 ? e : n < 2048 ? W(192 | n >>> 6) + W(128 | n & 63) : W(224 | n >>> 12 & 15) + W(128 | n >>> 6 & 63) + W(128 | n & 63);
690
+ } else {
691
+ var n = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
692
+ return W(240 | n >>> 18 & 7) + W(128 | n >>> 12 & 63) + W(128 | n >>> 6 & 63) + W(128 | n & 63);
693
+ }
694
+ }, Rn = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, Fn = (e) => e.replace(Rn, En), ht = ke ? (e) => Buffer.from(e, "utf8").toString("base64") : ct ? (e) => An(ct.encode(e)) : (e) => bt(Fn(e)), zn = (e, n = !1) => n ? Ln(ht(e)) : ht(e), On = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, Hn = (e) => {
695
+ switch (e.length) {
696
+ case 4:
697
+ var n = (7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3), o = n - 65536;
698
+ return W((o >>> 10) + 55296) + W((o & 1023) + 56320);
699
+ case 3:
700
+ return W((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
701
+ default:
702
+ return W((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1));
703
+ }
704
+ }, Pn = (e) => e.replace(On, Hn), Un = (e) => {
705
+ if (e = e.replace(/\s+/g, ""), !jn.test(e))
706
+ throw new TypeError("malformed base64.");
707
+ e += "==".slice(2 - (e.length & 3));
708
+ let n, o, s, r = [];
709
+ for (let d = 0; d < e.length; )
710
+ n = Ae[e.charAt(d++)] << 18 | Ae[e.charAt(d++)] << 12 | (o = Ae[e.charAt(d++)]) << 6 | (s = Ae[e.charAt(d++)]), o === 64 ? r.push(W(n >> 16 & 255)) : s === 64 ? r.push(W(n >> 16 & 255, n >> 8 & 255)) : r.push(W(n >> 16 & 255, n >> 8 & 255, n & 255));
711
+ return r.join("");
712
+ }, xt = typeof atob == "function" ? (e) => atob(pt(e)) : ke ? (e) => Buffer.from(e, "base64").toString("binary") : Un, Yn = ke ? (e) => vt(Buffer.from(e, "base64")) : (e) => vt(xt(e).split("").map((n) => n.charCodeAt(0))), qn = ke ? (e) => Buffer.from(e, "base64").toString("utf8") : dt ? (e) => dt.decode(Yn(e)) : (e) => Pn(xt(e)), Kn = (e) => pt(e.replace(/[-_]/g, (n) => n == "-" ? "+" : "/")), Wn = (e) => qn(Kn(e)), $t = "N_UTILS_KEY", Zn = !0, ie = [], Ue = () => {
713
+ const e = zn(JSON.stringify(ie));
714
+ localStorage.setItem($t, e);
715
+ }, Gn = () => {
716
+ const e = localStorage.getItem($t) ?? "";
717
+ if (e.length == 0)
718
+ return [];
719
+ try {
720
+ return JSON.parse(Zn ? Wn(e) : e);
721
+ } catch {
722
+ return [];
723
+ }
724
+ }, Ye = () => {
725
+ ie.clear();
726
+ const e = Gn(), n = (/* @__PURE__ */ new Date()).getTime();
727
+ e.forEach((o) => {
728
+ o.expireTime && o.expireTime < n || ie.push({
729
+ key: o.key,
730
+ value: o.value,
731
+ expireTime: o.expireTime
732
+ });
733
+ }), ie.length > 0 && Ue();
734
+ }, Jn = (e) => (Ye(), ie.some((n) => n.key == e)), Qn = (e, n, o) => {
735
+ Ct(e);
736
+ const s = {
737
+ key: e,
738
+ value: n
739
+ };
740
+ o && (s.expireTime = (/* @__PURE__ */ new Date()).getTime() + o * 1e3), ie.push(s), Ue();
741
+ }, Xn = (e, n) => {
742
+ Ye();
743
+ const o = ie.find((s) => s.key == e);
744
+ return o ? o.value : n;
745
+ }, Ct = (e) => {
746
+ Ye();
747
+ const n = ie.findIndex((o) => o.key == e);
748
+ n != -1 && (ie.splice(n, 1), Ue());
749
+ }, _n = {
750
+ set: Qn,
751
+ get: Xn,
752
+ has: Jn,
753
+ forget: Ct
754
+ }, eo = /* @__PURE__ */ (() => {
755
+ let e = !1;
756
+ return () => {
757
+ e ? document.exitFullscreen() : document.documentElement.requestFullscreen(), e = !e;
758
+ };
759
+ })(), to = {
760
+ fullScreenToggle: eo
761
+ }, no = (e = 5) => Array(e).fill(null).map(() => {
762
+ const n = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", o = Math.random() * n.length;
763
+ return n.charAt(o);
764
+ }).join(""), oo = (e) => {
765
+ navigator.clipboard.writeText(e);
766
+ }, ao = {
767
+ random: no,
768
+ copy: oo
769
+ }, ft = [], pe = (e = "", n = !1, o = !1) => (ft.clear(), new Promise((s, r) => {
770
+ const d = document.createElement("input");
771
+ ft.push(d), d.hidden = !0, d.type = "file", d.accept = e, d.multiple = n, d.onchange = async (h) => {
772
+ const p = [];
773
+ d.files && d.files.length === 0 && s(p);
774
+ for (const w of d.files) {
775
+ const b = {
776
+ name: w.name,
777
+ size: w.size,
778
+ sizeInKB: parseFloat((w.size / 1024).toFixed(2)),
779
+ sizeInMB: parseFloat((w.size / 1024 / 1024).toFixed(2)),
780
+ type: w.type,
781
+ file: w
782
+ };
783
+ o && (b.base64String = await ve.file.convertBase64(w)), p.push(b);
784
+ }
785
+ s(p);
786
+ }, d.onerror = (h) => {
787
+ r(h);
788
+ }, d.click();
789
+ })), lo = (e = !1, n = !1) => pe("", e, n), so = async (e = !1, n = !1) => pe([
790
+ "image/jpg",
791
+ "image/jpeg",
792
+ "image/png",
793
+ "image/gif",
794
+ "image/bmp"
795
+ ].join(","), e, n), io = async (e = !1, n = !1) => pe([
796
+ ".pdf",
797
+ "application/pdf",
798
+ ".doc",
799
+ "application/msword",
800
+ ".docx",
801
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
802
+ ".txt",
803
+ "text/plain",
804
+ ".md"
805
+ ].join(","), e, n), ro = async (e = !1, n = !1) => pe([
806
+ "video/mp4",
807
+ "video/quicktime",
808
+ // .mov
809
+ "video/webm",
810
+ "video/ogg"
811
+ ].join(","), e, n), uo = async (e = !1, n = !1) => pe([
812
+ "audio/mp3",
813
+ "audio/wav",
814
+ "audio/ogg",
815
+ "audio/aac",
816
+ "audio/flac"
817
+ ].join(","), e, n), co = (e = "", n = !1, o = !1) => pe(e, n, o), vo = {
818
+ all: lo,
819
+ image: so,
820
+ documentFile: io,
821
+ video: ro,
822
+ audio: uo,
823
+ custom: co
824
+ }, ho = (e) => new Promise((n, o) => {
825
+ const s = new FileReader();
826
+ s.readAsDataURL(e), s.onload = () => {
827
+ const r = s.result.split(";base64,");
828
+ r.length > 1 ? n(r[1]) : o(new Error("Failed to convert file to base64 string."));
829
+ }, s.onerror = o;
830
+ }), fo = (e) => {
831
+ const n = new Blob([e], { type: "xxxx" });
832
+ return Mt(n);
833
+ }, Mt = (e) => (window.URL || window.webkitURL).createObjectURL(e), go = (e) => {
834
+ (window.URL || window.webkitURL).revokeObjectURL(e);
835
+ }, mo = {
836
+ convertBase64: ho,
837
+ createImageUrlFromFile: fo,
838
+ createImageUrlFromBlob: Mt,
839
+ revokeObjectUrl: go
840
+ }, wo = (e, n) => {
841
+ const o = document.createElement("a");
842
+ o.target = "_blank", n && (o.download = n), o.href = e, o.click(), o.remove();
843
+ }, yo = (e) => {
844
+ const n = document.createElement("a");
845
+ n.target = "_blank", n.href = e, n.click(), n.remove();
846
+ }, ko = {
847
+ download: wo,
848
+ openExternalLink: yo
849
+ }, po = async (e) => {
850
+ const n = e.includes("data:image/") ? e : `data:image/jpeg;base64,${e}`;
851
+ return (await fetch(n)).blob();
852
+ }, bo = (e) => new Promise(async (n, o) => {
853
+ try {
854
+ const s = typeof e == "string" ? await po(e) : e, r = window.URL || window.webkitURL, d = r.createObjectURL(s), h = document.createElement("img");
855
+ h.src = d, h.onload = () => {
856
+ r.revokeObjectURL(d), n(h);
857
+ }, h.onerror = (p) => {
858
+ r.revokeObjectURL(d), o(new Error(`Image failed to load. Error: ${p}`));
859
+ };
860
+ } catch (s) {
861
+ o(s);
862
+ }
863
+ }), xo = (e, n) => {
864
+ const o = Math.min(
865
+ n / e.width,
866
+ n / e.height,
867
+ 1
868
+ ), s = o * e.width, r = o * e.height, d = document.createElement("canvas"), h = d.getContext("2d");
869
+ return d.width = s, d.height = r, h.drawImage(e, 0, 0, s, r), d;
870
+ }, Bt = (e) => {
871
+ const n = e.toDataURL("image/jpeg", 0.8).split(";base64,");
872
+ return n.length > 1 ? n[1] : "";
873
+ }, St = (e) => new Promise((n, o) => {
874
+ e.toBlob((s) => {
875
+ s ? n(s) : o(new Error("Failed to create Blob from canvas."));
876
+ }, "image/jpeg", 0.8);
877
+ }), Fe = async (e, n) => {
878
+ const o = await bo(e);
879
+ return xo(o, n);
880
+ }, $o = async (e, n) => {
881
+ const o = await Fe(e, n);
882
+ return Bt(o);
883
+ }, Co = async (e, n) => {
884
+ const o = await Fe(e, n);
885
+ return St(o);
886
+ }, Mo = async (e, n) => {
887
+ const o = await Fe(e, n);
888
+ return Bt(o);
889
+ }, Bo = async (e, n) => {
890
+ const o = await Fe(e, n);
891
+ return St(o);
892
+ }, So = {
893
+ thumbnailFromBlobToBase64: $o,
894
+ thumbnailFromBlobToBlob: Co,
895
+ thumbnailFromBase64ToBase64: Mo,
896
+ thumbnailFromBase64ToBlob: Bo
897
+ }, Dt = () => {
898
+ const e = navigator.userAgent;
899
+ return !!/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e);
900
+ }, Nt = () => {
901
+ const e = navigator.userAgent;
902
+ return !!/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e);
903
+ }, Do = () => Dt() == !1 && Nt() == !1, No = {
904
+ isMobile: Dt,
905
+ isTablet: Nt,
906
+ isDesktop: Do
907
+ }, To = (e) => {
908
+ e.setDate(1);
909
+ const n = {
910
+ year: e.getFullYear(),
911
+ month: e.getRealMonth(),
912
+ days: []
913
+ };
914
+ for (let o = 0; o < e.daysInMonth(); o++) {
915
+ const s = e.addDays(o);
916
+ n.days.push({
917
+ day: s.getDate(),
918
+ week: s.getDay() == 0 ? 7 : s.getDay()
919
+ });
920
+ }
921
+ return n;
922
+ }, Vo = {
923
+ getCalendarByDate: To
924
+ }, jo = /* @__PURE__ */ (() => {
925
+ let e = -1;
926
+ return (n, o = 50) => {
927
+ e > 0 && window.clearTimeout(e), e = window.setTimeout(n, o);
928
+ };
929
+ })(), Lo = {
930
+ debounce: jo
931
+ };
932
+ Array.prototype.clear = function() {
933
+ this.length = 0;
934
+ };
935
+ Array.prototype.first = function() {
936
+ return this.length > 0 ? this[0] : !1;
937
+ };
938
+ Array.prototype.last = function() {
939
+ return this.length > 0 ? this[this.length - 1] : !1;
940
+ };
941
+ Date.prototype.isValid = function() {
942
+ return this.getTime() === this.getTime();
943
+ };
944
+ Date.prototype.getRealMonth = function() {
945
+ return this.getMonth() + 1;
946
+ };
947
+ Date.prototype.getFullMonth = function() {
948
+ return (this.getMonth() + 1).toString().padStart(2, "0");
949
+ };
950
+ Date.prototype.getFullDate = function() {
951
+ return this.getDate().toString().padStart(2, "0");
952
+ };
953
+ Date.prototype.daysInMonth = function() {
954
+ return new Date(
955
+ this.getFullYear(),
956
+ this.getMonth() + 1,
957
+ 0
958
+ ).getDate();
959
+ };
960
+ Date.prototype.addYears = function(e = 1) {
961
+ const n = new Date(this.valueOf());
962
+ return n.setMonth(n.getMonth() + e * 12), n;
963
+ };
964
+ Date.prototype.minusYears = function(e = 1) {
965
+ const n = new Date(this.valueOf());
966
+ return n.setMonth(n.getMonth() - e * 12), n;
967
+ };
968
+ Date.prototype.addMonths = function(e = 1) {
969
+ const n = new Date(this.valueOf());
970
+ return n.setMonth(n.getMonth() + e), n;
971
+ };
972
+ Date.prototype.minusMonths = function(e = 1) {
973
+ const n = new Date(this.valueOf());
974
+ return n.setMonth(n.getMonth() - e), n;
975
+ };
976
+ Date.prototype.addDays = function(e = 1) {
977
+ const n = new Date(this.valueOf());
978
+ return n.setDate(n.getDate() + e), n;
979
+ };
980
+ Date.prototype.minusDays = function(e = 1) {
981
+ const n = new Date(this.valueOf());
982
+ return n.setDate(n.getDate() - e), n;
983
+ };
984
+ FileList.prototype.toArray = function() {
985
+ const e = [];
986
+ for (let n = 0; n < this.length; n++)
987
+ e.push(this.item(n));
988
+ return e;
989
+ };
990
+ const ve = {
991
+ store: _n,
992
+ screen: to,
993
+ str: ao,
994
+ input: vo,
995
+ file: mo,
996
+ link: ko,
997
+ image: So,
998
+ device: No,
999
+ date: Vo,
1000
+ tool: Lo
1001
+ }, Io = { class: "file-select" }, Ao = ["textContent"], Eo = ["aria-disabled"], Ro = { class: "inner" }, Fo = { class: "text" }, zo = ["textContent"], Oo = ["textContent"], Ho = /* @__PURE__ */ A({
1002
+ __name: "NFileSelect",
1003
+ props: {
1004
+ multiple: { type: Boolean, default: !1 },
1005
+ disabled: { type: Boolean, default: !1 },
1006
+ label: { default: "拖曳檔案至此處或點擊選擇檔案" },
1007
+ hint: { default: "支援所有檔案格式" },
1008
+ accept: { default: "" },
1009
+ title: { default: "" }
1010
+ },
1011
+ emits: ["change:file", "change:files"],
1012
+ setup(e, { emit: n }) {
1013
+ const o = n, s = async () => {
1014
+ if (!e.disabled)
1015
+ try {
1016
+ const r = await ve.input.custom(e.accept, e.multiple);
1017
+ if (r.length === 0)
1018
+ return;
1019
+ e.multiple ? o("change:files", r) : o("change:file", r[0]);
1020
+ } catch (r) {
1021
+ console.log(r);
1022
+ }
1023
+ };
1024
+ return (r, d) => (a(), i("div", Io, [
1025
+ e.title ? (a(), i("div", {
1026
+ key: 0,
1027
+ class: "title",
1028
+ textContent: k(e.title)
1029
+ }, null, 8, Ao)) : f("", !0),
1030
+ t("div", {
1031
+ class: S(["select", {
1032
+ multiple: e.multiple,
1033
+ disabled: e.disabled
1034
+ }]),
1035
+ tabindex: "0",
1036
+ "aria-disabled": e.disabled ? "true" : void 0,
1037
+ onClick: s
1038
+ }, [
1039
+ t("div", Ro, [
1040
+ d[0] || (d[0] = t("span", {
1041
+ class: "icon",
1042
+ "aria-hidden": "true"
1043
+ }, [
1044
+ t("svg", {
1045
+ fill: "none",
1046
+ stroke: "currentColor",
1047
+ viewBox: "0 0 24 24",
1048
+ xmlns: "http://www.w3.org/2000/svg"
1049
+ }, [
1050
+ t("path", {
1051
+ "stroke-linecap": "round",
1052
+ "stroke-linejoin": "round",
1053
+ "stroke-width": "2",
1054
+ d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"
1055
+ })
1056
+ ])
1057
+ ], -1)),
1058
+ t("div", Fo, [
1059
+ t("p", {
1060
+ class: "label",
1061
+ textContent: k(e.label)
1062
+ }, null, 8, zo),
1063
+ t("p", {
1064
+ class: "hint",
1065
+ textContent: k(e.hint)
1066
+ }, null, 8, Oo)
1067
+ ])
1068
+ ])
1069
+ ], 10, Eo)
1070
+ ]));
1071
+ }
1072
+ }), fi = /* @__PURE__ */ E(Ho, [["__scopeId", "data-v-0fd41b7d"]]);
1073
+ /*!
1074
+ * vue-router v4.6.3
1075
+ * (c) 2025 Eduardo San Martin Morote
1076
+ * @license MIT
1077
+ */
1078
+ Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : "");
1079
+ Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : "");
1080
+ Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : "");
1081
+ const Po = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""), Uo = Symbol(process.env.NODE_ENV !== "production" ? "route location" : "");
1082
+ Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
1083
+ /*!
1084
+ * vue-router v4.6.3
1085
+ * (c) 2025 Eduardo San Martin Morote
1086
+ * @license MIT
1087
+ */
1088
+ function Yo() {
1089
+ return yt(Po);
1090
+ }
1091
+ function qo(e) {
1092
+ return yt(Uo);
1093
+ }
1094
+ const Ko = { class: "breadcrumbs" }, Wo = /* @__PURE__ */ A({
1095
+ __name: "NBreadcrumb",
1096
+ setup(e) {
1097
+ return (n, o) => (a(), i("nav", Ko, [...o[0] || (o[0] = [
1098
+ t("span", null, "Home", -1),
1099
+ t("span", null, "Admin", -1),
1100
+ t("span", { class: "active" }, "Functions", -1)
1101
+ ])]));
1102
+ }
1103
+ }), Zo = /* @__PURE__ */ E(Wo, [["__scopeId", "data-v-c06b466b"]]), be = T(!1);
1104
+ function qe(e = "default") {
1105
+ const n = `NSidebar:${e}:expanded`, o = Pe(
1106
+ ve.store.get(n, {})
1107
+ );
1108
+ be.value = ve.store.get("NSidebar:expanded", !1);
1109
+ const s = (p) => !!o[p];
1110
+ return {
1111
+ isMenuExpanded: s,
1112
+ toggleMenu: (p) => {
1113
+ o[p] = !s(p), ve.store.set(n, o);
1114
+ },
1115
+ isSidebarExpanded: () => be.value,
1116
+ toggleSidebar: () => {
1117
+ be.value = !be.value, ve.store.set("NSidebar:expanded", be.value);
1118
+ }
1119
+ };
1120
+ }
1121
+ const Go = { class: "hero-section" }, Jo = { class: "header" }, Qo = ["innerHTML"], Xo = { class: "body" }, _o = { class: "title-section" }, ea = { class: "title" }, ta = { key: 0 }, na = { class: "toolbar" }, oa = /* @__PURE__ */ A({
1122
+ __name: "NHeroSection",
1123
+ props: {
1124
+ icon: { default: "" },
1125
+ title: { default: "" }
1126
+ },
1127
+ setup(e) {
1128
+ const n = qe();
1129
+ return (o, s) => (a(), i("div", Go, [
1130
+ t("div", Jo, [
1131
+ D(B, {
1132
+ class: "sidebar-toggle-button",
1133
+ padding: "8px",
1134
+ intent: "none",
1135
+ variant: "ghost",
1136
+ onClick: s[0] || (s[0] = (r) => ae(n).toggleSidebar())
1137
+ }, {
1138
+ default: $(() => [...s[1] || (s[1] = [
1139
+ t("svg", {
1140
+ xmlns: "http://www.w3.org/2000/svg",
1141
+ width: "24",
1142
+ height: "24",
1143
+ viewBox: "0 0 24 24",
1144
+ fill: "none",
1145
+ stroke: "currentColor",
1146
+ "stroke-width": "2",
1147
+ "stroke-linecap": "round",
1148
+ "stroke-linejoin": "round"
1149
+ }, [
1150
+ t("path", { d: "M4 5h16" }),
1151
+ t("path", { d: "M4 12h16" }),
1152
+ t("path", { d: "M4 19h16" })
1153
+ ], -1)
1154
+ ])]),
1155
+ _: 1
1156
+ }),
1157
+ D(Zo)
1158
+ ]),
1159
+ e.icon ? (a(), i("div", {
1160
+ key: 0,
1161
+ class: "icon-bg",
1162
+ innerHTML: e.icon
1163
+ }, null, 8, Qo)) : f("", !0),
1164
+ t("div", Xo, [
1165
+ t("div", _o, [
1166
+ t("div", ea, [
1167
+ e.title ? (a(), i("h1", ta, k(e.title), 1)) : f("", !0)
1168
+ ])
1169
+ ]),
1170
+ t("div", na, [
1171
+ I(o.$slots, "default", {}, void 0, !0)
1172
+ ])
1173
+ ])
1174
+ ]));
1175
+ }
1176
+ }), Tt = /* @__PURE__ */ E(oa, [["__scopeId", "data-v-38ca441b"]]), aa = { class: "content-container" }, la = {
1177
+ key: 0,
1178
+ class: "nav-tabs"
1179
+ }, sa = ["textContent", "onClick"], ia = { class: "tab-content" }, ra = { class: "footer" }, ua = /* @__PURE__ */ A({
1180
+ __name: "NForm",
1181
+ props: {
1182
+ model: { default: () => ({}) },
1183
+ icon: { default: "" },
1184
+ disabled: { type: Boolean, default: !1 },
1185
+ title: { default: "" },
1186
+ tabs: { default: () => [] }
1187
+ },
1188
+ emits: ["submit", "reset"],
1189
+ setup(e, { emit: n }) {
1190
+ const o = n, r = `NForm:${qo().path}:tab`, d = T(
1191
+ e.tabs.length > 0 ? ve.store.get(r, 0) : 0
1192
+ ), h = () => {
1193
+ e.disabled || o("submit", e.model);
1194
+ }, p = () => {
1195
+ e.disabled || o("reset");
1196
+ };
1197
+ return (w, b) => (a(), i("div", aa, [
1198
+ D(Tt, {
1199
+ icon: e.icon,
1200
+ title: e.title
1201
+ }, null, 8, ["icon", "title"]),
1202
+ t("form", {
1203
+ onSubmit: R(h, ["prevent"]),
1204
+ onReset: R(p, ["prevent"])
1205
+ }, [
1206
+ e.tabs.length > 0 ? (a(), i("div", la, [
1207
+ (a(!0), i(N, null, F(e.tabs, (g, c) => (a(), i("button", {
1208
+ key: `${g}${c}`,
1209
+ class: S(["nav-link", {
1210
+ active: d.value === c
1211
+ }]),
1212
+ textContent: k(g),
1213
+ onClick: () => {
1214
+ d.value = c, ae(ve).store.set(r, c);
1215
+ }
1216
+ }, null, 10, sa))), 128))
1217
+ ])) : f("", !0),
1218
+ t("div", ia, [
1219
+ e.tabs.length > 0 ? (a(!0), i(N, { key: 0 }, F(e.tabs, (g, c) => (a(), i(N, null, [
1220
+ d.value === c ? I(w.$slots, `tab${c}`, { key: 0 }, void 0, !0) : f("", !0)
1221
+ ], 64))), 256)) : f("", !0),
1222
+ e.tabs.length == 0 && w.$slots.tab0 ? I(w.$slots, "tab0", { key: 1 }, void 0, !0) : f("", !0)
1223
+ ]),
1224
+ t("div", ra, [
1225
+ I(w.$slots, "footer", {}, void 0, !0)
1226
+ ])
1227
+ ], 32)
1228
+ ]));
1229
+ }
1230
+ }), gi = /* @__PURE__ */ E(ua, [["__scopeId", "data-v-ca2ceba7"]]), da = ["innerHTML"], ca = { class: "title" }, va = {
1231
+ key: 1,
1232
+ class: "description"
1233
+ }, ha = {
1234
+ key: 2,
1235
+ class: "action"
1236
+ }, fa = /* @__PURE__ */ A({
1237
+ __name: "NEmpty",
1238
+ props: {
1239
+ title: { default: "目前沒有資料" },
1240
+ description: { default: "" },
1241
+ size: { default: "md" },
1242
+ icon: { default: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
1243
+ <polyline points="22 12 16 12 14 15 10 15 8 12 2 12"/>
1244
+ <path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"/>
1245
+ </svg>` }
1246
+ },
1247
+ setup(e) {
1248
+ return (n, o) => (a(), i("div", {
1249
+ class: S(["empty", [`size-${e.size}`]])
1250
+ }, [
1251
+ e.icon ? (a(), i("div", {
1252
+ key: 0,
1253
+ class: "icon",
1254
+ innerHTML: e.icon
1255
+ }, null, 8, da)) : f("", !0),
1256
+ t("p", ca, k(e.title), 1),
1257
+ e.description ? (a(), i("p", va, k(e.description), 1)) : f("", !0),
1258
+ n.$slots.default ? (a(), i("div", ha, [
1259
+ I(n.$slots, "default", {}, void 0, !0)
1260
+ ])) : f("", !0)
1261
+ ], 2));
1262
+ }
1263
+ }), ga = /* @__PURE__ */ E(fa, [["__scopeId", "data-v-b806fad9"]]), ma = /* @__PURE__ */ A({
1264
+ __name: "NCard",
1265
+ props: {
1266
+ size: { default: "md" },
1267
+ radius: { default: "md" }
1268
+ },
1269
+ setup(e) {
1270
+ return (n, o) => (a(), i("div", {
1271
+ class: S(["card", {
1272
+ [`size-${e.size}`]: !0,
1273
+ [`radius-${e.radius}`]: !0
1274
+ }])
1275
+ }, [
1276
+ I(n.$slots, "default", {}, void 0, !0)
1277
+ ], 2));
1278
+ }
1279
+ }), Vt = /* @__PURE__ */ E(ma, [["__scopeId", "data-v-2f12383f"]]), wa = {
1280
+ key: 0,
1281
+ class: "paginate"
1282
+ }, ya = { class: "summary" }, ka = { class: "pages" }, pa = {
1283
+ key: 1,
1284
+ class: "separator"
1285
+ }, ba = /* @__PURE__ */ A({
1286
+ __name: "NPaginate",
1287
+ props: {
1288
+ totalItems: {},
1289
+ pageSize: {},
1290
+ maxPageButtons: { default: 7 }
1291
+ },
1292
+ emits: ["onPageChange"],
1293
+ setup(e, { emit: n }) {
1294
+ const o = n, s = T(1), r = M(() => Math.max(1, Math.ceil(e.totalItems / e.pageSize))), d = M(() => {
1295
+ const b = r.value, g = s.value, c = Math.max(5, e.maxPageButtons);
1296
+ if (b <= c)
1297
+ return Array.from({ length: b }, (G, x) => x + 1);
1298
+ const m = [], C = Math.max(1, Math.floor((c - 3) / 2)), O = Math.max(2, g - C);
1299
+ let Z = Math.min(b - 1, g + C);
1300
+ const J = 2 + (Z - O + 1) + 2;
1301
+ if (J > c) {
1302
+ const G = J - c;
1303
+ Z = Math.max(O, Z - G);
1304
+ }
1305
+ m.push(1), O > 2 && m.push("...l");
1306
+ for (let G = O; G <= Z; G++) m.push(G);
1307
+ return Z < b - 1 && m.push("...r"), m.push(b), m;
1308
+ });
1309
+ function h() {
1310
+ s.value <= 1 || (s.value -= 1, o("onPageChange", s.value));
1311
+ }
1312
+ function p() {
1313
+ s.value >= r.value || (s.value += 1, o("onPageChange", s.value));
1314
+ }
1315
+ function w(b) {
1316
+ const g = Math.min(Math.max(1, b), r.value);
1317
+ s.value !== g && (s.value = g, o("onPageChange", s.value));
1318
+ }
1319
+ return (b, g) => e.totalItems > 0 ? (a(), i("div", wa, [
1320
+ t("span", ya, "第 " + k(s.value) + " / " + k(r.value) + " 頁,共 " + k(e.totalItems) + " 筆", 1),
1321
+ t("div", ka, [
1322
+ D(B, {
1323
+ variant: "outline",
1324
+ padding: "",
1325
+ width: "35px",
1326
+ height: "35px",
1327
+ disabled: s.value <= 1,
1328
+ onClick: h
1329
+ }, {
1330
+ default: $(() => [...g[0] || (g[0] = [
1331
+ t("svg", {
1332
+ xmlns: "http://www.w3.org/2000/svg",
1333
+ width: "16",
1334
+ height: "16",
1335
+ viewBox: "0 0 24 24",
1336
+ fill: "none",
1337
+ stroke: "currentColor",
1338
+ "stroke-width": "2",
1339
+ "stroke-linecap": "round",
1340
+ "stroke-linejoin": "round"
1341
+ }, [
1342
+ t("path", { d: "M15 18l-6-6 6-6" })
1343
+ ], -1)
1344
+ ])]),
1345
+ _: 1
1346
+ }, 8, ["disabled"]),
1347
+ (a(!0), i(N, null, F(d.value, (c) => (a(), i(N, {
1348
+ key: "p-" + c
1349
+ }, [
1350
+ typeof c == "number" ? (a(), L(B, {
1351
+ key: 0,
1352
+ variant: s.value === c ? "solid" : "outline",
1353
+ intent: s.value === c ? "primary" : "none",
1354
+ padding: "",
1355
+ width: "35px",
1356
+ height: "35px",
1357
+ onClick: (m) => w(c)
1358
+ }, {
1359
+ default: $(() => [
1360
+ z(k(c), 1)
1361
+ ]),
1362
+ _: 2
1363
+ }, 1032, ["variant", "intent", "onClick"])) : (a(), i("span", pa, "…"))
1364
+ ], 64))), 128)),
1365
+ D(B, {
1366
+ variant: "outline",
1367
+ padding: "",
1368
+ width: "35px",
1369
+ height: "35px",
1370
+ disabled: s.value >= r.value,
1371
+ onClick: p
1372
+ }, {
1373
+ default: $(() => [...g[1] || (g[1] = [
1374
+ t("svg", {
1375
+ xmlns: "http://www.w3.org/2000/svg",
1376
+ width: "16",
1377
+ height: "16",
1378
+ viewBox: "0 0 24 24",
1379
+ fill: "none",
1380
+ stroke: "currentColor",
1381
+ "stroke-width": "2",
1382
+ "stroke-linecap": "round",
1383
+ "stroke-linejoin": "round"
1384
+ }, [
1385
+ t("path", { d: "M9 18l6-6-6-6" })
1386
+ ], -1)
1387
+ ])]),
1388
+ _: 1
1389
+ }, 8, ["disabled"])
1390
+ ])
1391
+ ])) : f("", !0);
1392
+ }
1393
+ }), xa = /* @__PURE__ */ E(ba, [["__scopeId", "data-v-06443bd8"]]), $a = { class: "table-scroll" }, Ca = ["onClick"], Ma = { class: "th-content" }, Ba = {
1394
+ key: 0,
1395
+ class: "sort-icon"
1396
+ }, Sa = {
1397
+ key: 0,
1398
+ viewBox: "0 0 24 24",
1399
+ fill: "none",
1400
+ stroke: "currentColor",
1401
+ "stroke-width": "2",
1402
+ "stroke-linecap": "round",
1403
+ "stroke-linejoin": "round"
1404
+ }, Da = {
1405
+ key: 1,
1406
+ viewBox: "0 0 24 24",
1407
+ fill: "none",
1408
+ stroke: "currentColor",
1409
+ "stroke-width": "2",
1410
+ "stroke-linecap": "round",
1411
+ "stroke-linejoin": "round"
1412
+ }, Na = {
1413
+ key: 2,
1414
+ viewBox: "0 0 24 24",
1415
+ fill: "none",
1416
+ stroke: "currentColor",
1417
+ "stroke-width": "2",
1418
+ "stroke-linecap": "round",
1419
+ "stroke-linejoin": "round"
1420
+ }, Ta = {
1421
+ key: 0,
1422
+ class: "col-actions"
1423
+ }, Va = ["onClick"], ja = {
1424
+ key: 0,
1425
+ class: "col-actions"
1426
+ }, La = { key: 1 }, Ia = ["colspan"], Aa = { key: 2 }, Ea = ["colspan"], Ra = /* @__PURE__ */ A({
1427
+ __name: "NTable",
1428
+ props: {
1429
+ columns: { default: () => [] },
1430
+ rows: { default: () => [] },
1431
+ striped: { type: Boolean, default: !1 },
1432
+ bordered: { type: Boolean, default: !1 },
1433
+ hoverable: { type: Boolean, default: !0 },
1434
+ loading: { type: Boolean, default: !1 },
1435
+ emptyText: { default: "No data" },
1436
+ rowKey: { default: "id" }
1437
+ },
1438
+ emits: ["sort", "row-click"],
1439
+ setup(e, { emit: n }) {
1440
+ const o = n, s = T({ key: "", order: null }), r = (h) => {
1441
+ h.sortable && (s.value.key !== h.key ? (s.value.key = h.key, s.value.order = "asc") : s.value.order = s.value.order === "asc" ? "desc" : "asc", o("sort", { ...s.value }));
1442
+ }, d = (h, p) => {
1443
+ const w = h[p.key];
1444
+ return p.formatter ? p.formatter(w, h) : w;
1445
+ };
1446
+ return (h, p) => (a(), i("div", {
1447
+ class: S(["table", [
1448
+ { striped: e.striped },
1449
+ { bordered: e.bordered },
1450
+ { hoverable: e.hoverable },
1451
+ { loading: e.loading }
1452
+ ]])
1453
+ }, [
1454
+ t("div", $a, [
1455
+ t("table", null, [
1456
+ t("thead", null, [
1457
+ t("tr", null, [
1458
+ (a(!0), i(N, null, F(e.columns, (w) => (a(), i("th", {
1459
+ key: w.key,
1460
+ style: fe({
1461
+ width: w.width,
1462
+ textAlign: w.align ?? "left"
1463
+ }),
1464
+ class: S({ sortable: w.sortable }),
1465
+ onClick: (b) => r(w)
1466
+ }, [
1467
+ t("span", Ma, [
1468
+ I(h.$slots, `header-${w.key}`, { col: w }, () => [
1469
+ z(k(w.label), 1)
1470
+ ], !0),
1471
+ w.sortable ? (a(), i("span", Ba, [
1472
+ s.value.key !== w.key || s.value.order === null ? (a(), i("svg", Sa, [...p[0] || (p[0] = [
1473
+ t("path", { d: "M8 9l4-4 4 4" }, null, -1),
1474
+ t("path", { d: "M16 15l-4 4-4-4" }, null, -1)
1475
+ ])])) : s.value.order === "asc" ? (a(), i("svg", Da, [...p[1] || (p[1] = [
1476
+ t("path", { d: "M8 15l4-6 4 6" }, null, -1)
1477
+ ])])) : (a(), i("svg", Na, [...p[2] || (p[2] = [
1478
+ t("path", { d: "M8 9l4 6 4-6" }, null, -1)
1479
+ ])]))
1480
+ ])) : f("", !0)
1481
+ ])
1482
+ ], 14, Ca))), 128)),
1483
+ h.$slots.actions ? (a(), i("th", Ta, [
1484
+ I(h.$slots, "actions-header", {}, () => [
1485
+ p[3] || (p[3] = z("操作", -1))
1486
+ ], !0)
1487
+ ])) : f("", !0)
1488
+ ])
1489
+ ]),
1490
+ t("tbody", null, [
1491
+ !e.loading && e.rows.length > 0 ? (a(!0), i(N, { key: 0 }, F(e.rows, (w, b) => (a(), i("tr", {
1492
+ key: w[e.rowKey] ?? b,
1493
+ onClick: (g) => o("row-click", w)
1494
+ }, [
1495
+ (a(!0), i(N, null, F(e.columns, (g) => (a(), i("td", {
1496
+ key: g.key,
1497
+ style: fe({ textAlign: g.align ?? "left" })
1498
+ }, [
1499
+ I(h.$slots, `cell-${g.key}`, {
1500
+ value: d(w, g),
1501
+ row: w,
1502
+ index: b
1503
+ }, () => [
1504
+ z(k(d(w, g)), 1)
1505
+ ], !0)
1506
+ ], 4))), 128)),
1507
+ h.$slots.actions ? (a(), i("td", ja, [
1508
+ I(h.$slots, "actions", {
1509
+ row: w,
1510
+ index: b
1511
+ }, void 0, !0)
1512
+ ])) : f("", !0)
1513
+ ], 8, Va))), 128)) : !e.loading && e.rows.length === 0 ? (a(), i("tr", La, [
1514
+ t("td", {
1515
+ colspan: e.columns.length + (h.$slots.actions ? 1 : 0),
1516
+ class: "empty-cell"
1517
+ }, [
1518
+ I(h.$slots, "empty", {}, () => [
1519
+ z(k(e.emptyText), 1)
1520
+ ], !0)
1521
+ ], 8, Ia)
1522
+ ])) : e.loading ? (a(), i("tr", Aa, [
1523
+ t("td", {
1524
+ colspan: e.columns.length + (h.$slots.actions ? 1 : 0),
1525
+ class: "loading-cell"
1526
+ }, [
1527
+ I(h.$slots, "loading", {}, () => [
1528
+ p[4] || (p[4] = t("span", { class: "loading-dots" }, [
1529
+ t("span"),
1530
+ t("span"),
1531
+ t("span")
1532
+ ], -1))
1533
+ ], !0)
1534
+ ], 8, Ea)
1535
+ ])) : f("", !0)
1536
+ ])
1537
+ ])
1538
+ ])
1539
+ ], 2));
1540
+ }
1541
+ }), Fa = /* @__PURE__ */ E(Ra, [["__scopeId", "data-v-e6e63613"]]), za = { class: "content-container" }, Oa = {
1542
+ key: 0,
1543
+ class: "toolbar"
1544
+ }, Ha = /* @__PURE__ */ A({
1545
+ __name: "NList",
1546
+ props: {
1547
+ title: { default: "" },
1548
+ items: { default: () => [] },
1549
+ pageSize: { default: 10 },
1550
+ filterable: { type: Boolean, default: !1 },
1551
+ rowEditable: { type: Boolean, default: !1 },
1552
+ rowDeletable: { type: Boolean, default: !1 },
1553
+ creatable: { type: Boolean, default: !1 },
1554
+ batchDeletable: { type: Boolean, default: !1 },
1555
+ refreshable: { type: Boolean, default: !1 },
1556
+ columns: { default: () => [] },
1557
+ maxPageButtons: { default: 7 },
1558
+ emptyTitle: { default: "目前沒有資料" },
1559
+ emptyDescription: { default: "可以點擊上方的按鈕來新增資料或重新整理" },
1560
+ emptyIcon: {}
1561
+ },
1562
+ emits: ["onRowEdit", "onRowDelete", "onPageChange", "onCreate", "onBatchDelete", "onRefresh", "onFilter", "row-click", "sort"],
1563
+ setup(e, { emit: n }) {
1564
+ const o = Kt(), s = n, r = T(/* @__PURE__ */ new Set()), d = M(() => Array.from(r.value)), h = (c) => r.value.has(c), p = M(() => e.items.length > 0 && e.items.length === r.value.size), w = M(() => e.batchDeletable ? [
1565
+ {
1566
+ key: "__select__",
1567
+ label: "",
1568
+ width: "40px"
1569
+ },
1570
+ ...e.columns
1571
+ ] : e.columns);
1572
+ function b(c) {
1573
+ if (!e.batchDeletable)
1574
+ return;
1575
+ const m = c.id;
1576
+ r.value.has(m) ? r.value.delete(m) : r.value.add(m);
1577
+ }
1578
+ function g() {
1579
+ e.batchDeletable && (p.value ? e.items.forEach((c) => r.value.delete(c.id)) : e.items.forEach((c) => r.value.add(c.id)), r.value = new Set(r.value));
1580
+ }
1581
+ return (c, m) => (a(), i("div", za, [
1582
+ D(Tt, {
1583
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
1584
+ <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path>
1585
+ <circle cx="12" cy="7" r="4"></circle>
1586
+ </svg>`,
1587
+ title: e.title
1588
+ }, {
1589
+ default: $(() => [
1590
+ o.toolbar || e.refreshable || e.creatable || e.batchDeletable ? (a(), i("div", Oa, [
1591
+ I(c.$slots, "toolbar", {}, void 0, !0),
1592
+ e.refreshable ? (a(), L(B, {
1593
+ key: 0,
1594
+ variant: "outline",
1595
+ onClick: m[0] || (m[0] = (C) => s("onRefresh"))
1596
+ }, {
1597
+ default: $(() => [...m[8] || (m[8] = [
1598
+ t("svg", {
1599
+ xmlns: "http://www.w3.org/2000/svg",
1600
+ width: "16",
1601
+ height: "16",
1602
+ viewBox: "0 0 24 24",
1603
+ fill: "none",
1604
+ stroke: "currentColor",
1605
+ "stroke-width": "2",
1606
+ "stroke-linecap": "round",
1607
+ "stroke-linejoin": "round"
1608
+ }, [
1609
+ t("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
1610
+ t("path", { d: "M21 3v5h-5" }),
1611
+ t("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
1612
+ t("path", { d: "M8 16H3v5" })
1613
+ ], -1),
1614
+ z(" Refresh ", -1)
1615
+ ])]),
1616
+ _: 1
1617
+ })) : f("", !0),
1618
+ e.filterable ? (a(), L(B, {
1619
+ key: 1,
1620
+ variant: "outline",
1621
+ onClick: m[1] || (m[1] = (C) => s("onFilter"))
1622
+ }, {
1623
+ default: $(() => [...m[9] || (m[9] = [
1624
+ t("svg", {
1625
+ xmlns: "http://www.w3.org/2000/svg",
1626
+ width: "16",
1627
+ height: "16",
1628
+ viewBox: "0 0 24 24",
1629
+ fill: "none",
1630
+ stroke: "currentColor",
1631
+ "stroke-width": "2",
1632
+ "stroke-linecap": "round",
1633
+ "stroke-linejoin": "round"
1634
+ }, [
1635
+ t("path", { d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" })
1636
+ ], -1),
1637
+ z(" Filters ", -1)
1638
+ ])]),
1639
+ _: 1
1640
+ })) : f("", !0),
1641
+ e.batchDeletable ? (a(), L(B, {
1642
+ key: 2,
1643
+ variant: "solid",
1644
+ intent: "error",
1645
+ disabled: d.value.length == 0,
1646
+ onClick: m[2] || (m[2] = (C) => s("onBatchDelete", d.value))
1647
+ }, {
1648
+ default: $(() => [...m[10] || (m[10] = [
1649
+ t("svg", {
1650
+ xmlns: "http://www.w3.org/2000/svg",
1651
+ width: "16",
1652
+ height: "16",
1653
+ viewBox: "0 0 24 24",
1654
+ fill: "none",
1655
+ stroke: "currentColor",
1656
+ "stroke-width": "2",
1657
+ "stroke-linecap": "round",
1658
+ "stroke-linejoin": "round"
1659
+ }, [
1660
+ t("path", { d: "M10 11v6" }),
1661
+ t("path", { d: "M14 11v6" }),
1662
+ t("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
1663
+ t("path", { d: "M3 6h18" }),
1664
+ t("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
1665
+ ], -1),
1666
+ z(" Batch Delete ", -1)
1667
+ ])]),
1668
+ _: 1
1669
+ }, 8, ["disabled"])) : f("", !0),
1670
+ e.creatable ? (a(), L(B, {
1671
+ key: 3,
1672
+ variant: "solid",
1673
+ intent: "primary",
1674
+ onClick: m[3] || (m[3] = (C) => s("onCreate"))
1675
+ }, {
1676
+ default: $(() => [...m[11] || (m[11] = [
1677
+ t("svg", {
1678
+ xmlns: "http://www.w3.org/2000/svg",
1679
+ width: "16",
1680
+ height: "16",
1681
+ viewBox: "0 0 24 24",
1682
+ fill: "none",
1683
+ stroke: "currentColor",
1684
+ "stroke-width": "2",
1685
+ "stroke-linecap": "round",
1686
+ "stroke-linejoin": "round"
1687
+ }, [
1688
+ t("path", { d: "M5 12h14" }),
1689
+ t("path", { d: "M12 5v14" })
1690
+ ], -1),
1691
+ z(" Add New ", -1)
1692
+ ])]),
1693
+ _: 1
1694
+ })) : f("", !0)
1695
+ ])) : f("", !0)
1696
+ ]),
1697
+ _: 3
1698
+ }, 8, ["title"]),
1699
+ D(Vt, {
1700
+ size: "none",
1701
+ radius: "xl"
1702
+ }, {
1703
+ default: $(() => [
1704
+ D(Fa, {
1705
+ columns: w.value,
1706
+ rows: e.items,
1707
+ hoverable: "",
1708
+ striped: "",
1709
+ "row-key": "id",
1710
+ onRowClick: m[5] || (m[5] = (C) => {
1711
+ b(C), s("row-click", C);
1712
+ }),
1713
+ onSort: m[6] || (m[6] = (C) => s("sort", C))
1714
+ }, Wt({
1715
+ empty: $(() => [
1716
+ D(ga, {
1717
+ title: e.emptyTitle,
1718
+ description: e.emptyDescription,
1719
+ icon: e.emptyIcon,
1720
+ size: "md"
1721
+ }, {
1722
+ default: $(() => [
1723
+ o.empty ? I(c.$slots, "empty", { key: 0 }, void 0, !0) : f("", !0)
1724
+ ]),
1725
+ _: 3
1726
+ }, 8, ["title", "description", "icon"])
1727
+ ]),
1728
+ _: 2
1729
+ }, [
1730
+ e.batchDeletable ? {
1731
+ name: "header-__select__",
1732
+ fn: $(() => [
1733
+ D(ut, {
1734
+ "model-value": p.value,
1735
+ "onUpdate:modelValue": m[4] || (m[4] = () => g())
1736
+ }, null, 8, ["model-value"])
1737
+ ]),
1738
+ key: "0"
1739
+ } : void 0,
1740
+ e.batchDeletable ? {
1741
+ name: "cell-__select__",
1742
+ fn: $(({ row: C }) => [
1743
+ D(ut, {
1744
+ onClick: R((O) => b(C), ["stop"]),
1745
+ "model-value": h(C.id)
1746
+ }, null, 8, ["onClick", "model-value"])
1747
+ ]),
1748
+ key: "1"
1749
+ } : void 0,
1750
+ e.rowEditable || e.rowDeletable || o.actions ? {
1751
+ name: "actions",
1752
+ fn: $(({ row: C, index: O }) => [
1753
+ I(c.$slots, "actions", {
1754
+ row: C,
1755
+ index: O
1756
+ }, () => [
1757
+ e.rowEditable ? (a(), L(B, {
1758
+ key: 0,
1759
+ variant: "outline",
1760
+ onClick: R(() => s("onRowEdit", C), ["stop"])
1761
+ }, {
1762
+ default: $(() => [...m[12] || (m[12] = [
1763
+ z(" 編輯 ", -1)
1764
+ ])]),
1765
+ _: 1
1766
+ }, 8, ["onClick"])) : f("", !0),
1767
+ e.rowDeletable ? (a(), L(B, {
1768
+ key: 1,
1769
+ variant: "solid",
1770
+ intent: "error",
1771
+ onClick: R(() => s("onRowDelete", C), ["stop"])
1772
+ }, {
1773
+ default: $(() => [...m[13] || (m[13] = [
1774
+ z(" 刪除 ", -1)
1775
+ ])]),
1776
+ _: 1
1777
+ }, 8, ["onClick"])) : f("", !0)
1778
+ ], !0)
1779
+ ]),
1780
+ key: "2"
1781
+ } : void 0,
1782
+ o["actions-header"] ? {
1783
+ name: "actions-header",
1784
+ fn: $(() => [
1785
+ I(c.$slots, "actions-header", {}, void 0, !0)
1786
+ ]),
1787
+ key: "3"
1788
+ } : void 0
1789
+ ]), 1032, ["columns", "rows"]),
1790
+ e.items.length > 0 ? (a(), L(xa, {
1791
+ key: 0,
1792
+ totalItems: e.items.length,
1793
+ pageSize: e.pageSize,
1794
+ maxPageButtons: e.maxPageButtons,
1795
+ onOnPageChange: m[7] || (m[7] = (C) => s("onPageChange", C))
1796
+ }, null, 8, ["totalItems", "pageSize", "maxPageButtons"])) : f("", !0)
1797
+ ]),
1798
+ _: 3
1799
+ })
1800
+ ]));
1801
+ }
1802
+ }), mi = /* @__PURE__ */ E(Ha, [["__scopeId", "data-v-b5402ec0"]]);
1803
+ let Pa = 0;
1804
+ const Ee = Pe([]);
1805
+ function Ua() {
1806
+ const e = function(s, r = {}) {
1807
+ const d = ++Pa, h = r.duration ?? 4e3;
1808
+ Ee.push({
1809
+ id: d,
1810
+ description: s,
1811
+ status: r.status ?? "info",
1812
+ title: r.title ?? "",
1813
+ duration: h
1814
+ }), h > 0 && setTimeout(() => n(d), h);
1815
+ };
1816
+ e.success = (o, s = {}) => e(o, { ...s, status: "success" }), e.danger = (o, s = {}) => e(o, { ...s, status: "danger" }), e.warning = (o, s = {}) => e(o, { ...s, status: "warning" }), e.info = (o, s = {}) => e(o, { ...s, status: "info" });
1817
+ function n(o) {
1818
+ const s = Ee.findIndex((r) => r.id === o);
1819
+ s !== -1 && Ee.splice(s, 1);
1820
+ }
1821
+ return { toasts: Ee, toast: e, removeToast: n };
1822
+ }
1823
+ const Ya = { class: "icon-wrap" }, qa = ["innerHTML"], Ka = {
1824
+ key: 0,
1825
+ class: "arc-timer",
1826
+ viewBox: "0 0 36 36",
1827
+ width: "36",
1828
+ height: "36",
1829
+ "shape-rendering": "geometricPrecision"
1830
+ }, Wa = { class: "body" }, Za = {
1831
+ key: 0,
1832
+ class: "title"
1833
+ }, Ga = {
1834
+ key: 1,
1835
+ class: "description"
1836
+ }, Ja = /* @__PURE__ */ A({
1837
+ __name: "NToast",
1838
+ setup(e) {
1839
+ const { toasts: n } = Ua(), o = {
1840
+ success: `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1841
+ <path d="M20 6 9 17l-5-5"/>
1842
+ </svg>`,
1843
+ danger: `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1844
+ <circle cx="12" cy="12" r="10"/>
1845
+ <path d="m15 9-6 6"/>
1846
+ <path d="m9 9 6 6"/>
1847
+ </svg>`,
1848
+ warning: `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1849
+ <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/>
1850
+ <path d="M12 9v4"/>
1851
+ <path d="M12 17h.01"/>
1852
+ </svg>`,
1853
+ info: `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1854
+ <circle cx="12" cy="12" r="10"/>
1855
+ <path d="M12 16v-4"/>
1856
+ <path d="M12 8h.01"/>
1857
+ </svg>`
1858
+ };
1859
+ return (s, r) => (a(), L(Re, { to: "body" }, [
1860
+ D(Zt, {
1861
+ name: "toast",
1862
+ tag: "div",
1863
+ class: "toast-wrapper"
1864
+ }, {
1865
+ default: $(() => [
1866
+ (a(!0), i(N, null, F(ae(n), (d) => (a(), i("div", {
1867
+ key: d.id,
1868
+ class: S(["toast", [`${d.status}`]])
1869
+ }, [
1870
+ t("div", Ya, [
1871
+ t("div", {
1872
+ class: "icon",
1873
+ innerHTML: o[d.status]
1874
+ }, null, 8, qa),
1875
+ d.duration > 0 ? (a(), i("svg", Ka, [
1876
+ r[0] || (r[0] = t("circle", {
1877
+ class: "arc-track",
1878
+ cx: "18",
1879
+ cy: "18",
1880
+ r: "16"
1881
+ }, null, -1)),
1882
+ t("circle", {
1883
+ class: "arc-progress",
1884
+ cx: "18",
1885
+ cy: "18",
1886
+ r: "16",
1887
+ transform: "rotate(-90 18 18)",
1888
+ style: fe({
1889
+ animationDuration: `${d.duration}ms`
1890
+ })
1891
+ }, null, 4)
1892
+ ])) : f("", !0)
1893
+ ]),
1894
+ t("div", Wa, [
1895
+ d.title ? (a(), i("p", Za, k(d.title), 1)) : f("", !0),
1896
+ d.description ? (a(), i("p", Ga, k(d.description), 1)) : f("", !0)
1897
+ ])
1898
+ ], 2))), 128))
1899
+ ]),
1900
+ _: 1
1901
+ })
1902
+ ]));
1903
+ }
1904
+ }), wi = /* @__PURE__ */ E(Ja, [["__scopeId", "data-v-ecce7d4e"]]), Qa = {
1905
+ key: 0,
1906
+ class: "loading-wrapper"
1907
+ }, Xa = {
1908
+ key: 0,
1909
+ class: "overlay"
1910
+ }, _a = { class: "content" }, el = {
1911
+ key: 0,
1912
+ class: "title"
1913
+ }, tl = {
1914
+ key: 0,
1915
+ class: "loading-inline"
1916
+ }, nl = {
1917
+ key: 0,
1918
+ class: "title"
1919
+ }, ol = {
1920
+ key: 0,
1921
+ class: "title"
1922
+ }, al = /* @__PURE__ */ A({
1923
+ __name: "NLoading",
1924
+ props: {
1925
+ loading: { type: Boolean, default: !0 },
1926
+ title: { default: "" },
1927
+ variant: { default: "spinner" },
1928
+ overlay: { type: Boolean, default: !1 }
1929
+ },
1930
+ setup(e) {
1931
+ return (n, o) => e.overlay ? (a(), i("div", Qa, [
1932
+ I(n.$slots, "default", {}, void 0, !0),
1933
+ D(he, { name: "fade" }, {
1934
+ default: $(() => [
1935
+ e.loading ? (a(), i("div", Xa, [
1936
+ t("div", _a, [
1937
+ o[0] || (o[0] = t("div", { class: "spinner" }, [
1938
+ t("svg", { viewBox: "0 0 50 50" }, [
1939
+ t("circle", {
1940
+ cx: "25",
1941
+ cy: "25",
1942
+ r: "20",
1943
+ fill: "none",
1944
+ "stroke-width": "4"
1945
+ })
1946
+ ])
1947
+ ], -1)),
1948
+ e.title ? (a(), i("p", el, k(e.title), 1)) : f("", !0)
1949
+ ])
1950
+ ])) : f("", !0)
1951
+ ]),
1952
+ _: 1
1953
+ })
1954
+ ])) : (a(), i(N, { key: 1 }, [
1955
+ e.loading ? (a(), i("div", tl, [
1956
+ e.variant === "spinner" ? (a(), i(N, { key: 0 }, [
1957
+ o[1] || (o[1] = t("div", { class: "spinner" }, [
1958
+ t("svg", { viewBox: "0 0 50 50" }, [
1959
+ t("circle", {
1960
+ cx: "25",
1961
+ cy: "25",
1962
+ r: "20",
1963
+ fill: "none",
1964
+ "stroke-width": "4"
1965
+ })
1966
+ ])
1967
+ ], -1)),
1968
+ e.title ? (a(), i("p", nl, k(e.title), 1)) : f("", !0)
1969
+ ], 64)) : f("", !0),
1970
+ e.variant === "dots" ? (a(), i(N, { key: 1 }, [
1971
+ o[2] || (o[2] = t("div", { class: "dots" }, [
1972
+ t("span"),
1973
+ t("span"),
1974
+ t("span")
1975
+ ], -1)),
1976
+ e.title ? (a(), i("p", ol, k(e.title), 1)) : f("", !0)
1977
+ ], 64)) : f("", !0)
1978
+ ])) : I(n.$slots, "default", { key: 1 }, void 0, !0)
1979
+ ], 64));
1980
+ }
1981
+ }), yi = /* @__PURE__ */ E(al, [["__scopeId", "data-v-b1c571f6"]]), ll = { class: "code" }, sl = {
1982
+ key: 0,
1983
+ class: "header"
1984
+ }, il = { class: "language-label" }, rl = {
1985
+ key: 0,
1986
+ xmlns: "http://www.w3.org/2000/svg",
1987
+ width: "14",
1988
+ height: "14",
1989
+ viewBox: "0 0 24 24",
1990
+ fill: "none",
1991
+ stroke: "currentColor",
1992
+ "stroke-width": "2",
1993
+ "stroke-linecap": "round",
1994
+ "stroke-linejoin": "round"
1995
+ }, ul = {
1996
+ key: 1,
1997
+ xmlns: "http://www.w3.org/2000/svg",
1998
+ width: "14",
1999
+ height: "14",
2000
+ viewBox: "0 0 24 24",
2001
+ fill: "none",
2002
+ stroke: "currentColor",
2003
+ "stroke-width": "2",
2004
+ "stroke-linecap": "round",
2005
+ "stroke-linejoin": "round"
2006
+ }, dl = { class: "code-body" }, cl = {
2007
+ key: 0,
2008
+ class: "gutter"
2009
+ }, vl = ["textContent"], hl = /* @__PURE__ */ A({
2010
+ __name: "NCode",
2011
+ props: {
2012
+ code: {},
2013
+ language: { default: "" },
2014
+ showLineNumbers: { type: Boolean, default: !0 }
2015
+ },
2016
+ setup(e) {
2017
+ const n = T(!1), o = M(() => e.code.trim().split(`
2018
+ `));
2019
+ async function s() {
2020
+ try {
2021
+ await navigator.clipboard.writeText(e.code), n.value = !0, setTimeout(() => {
2022
+ n.value = !1;
2023
+ }, 2e3);
2024
+ } catch {
2025
+ }
2026
+ }
2027
+ return (r, d) => (a(), i("div", ll, [
2028
+ (e.language, a(), i("div", sl, [
2029
+ t("span", il, k(e.language || "code"), 1),
2030
+ t("button", {
2031
+ class: S(["copy-btn", { copied: n.value }]),
2032
+ onClick: s
2033
+ }, [
2034
+ n.value ? (a(), i("svg", ul, [...d[1] || (d[1] = [
2035
+ t("polyline", { points: "20 6 9 17 4 12" }, null, -1)
2036
+ ])])) : (a(), i("svg", rl, [...d[0] || (d[0] = [
2037
+ t("rect", {
2038
+ x: "9",
2039
+ y: "9",
2040
+ width: "13",
2041
+ height: "13",
2042
+ rx: "2",
2043
+ ry: "2"
2044
+ }, null, -1),
2045
+ t("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
2046
+ ])])),
2047
+ t("span", null, k(n.value ? "Copied!" : "Copy"), 1)
2048
+ ], 2)
2049
+ ])),
2050
+ t("div", dl, [
2051
+ e.showLineNumbers ? (a(), i("div", cl, [
2052
+ (a(!0), i(N, null, F(o.value, (h, p) => (a(), i("span", {
2053
+ key: p,
2054
+ class: "line-number"
2055
+ }, k(p + 1), 1))), 128))
2056
+ ])) : f("", !0),
2057
+ t("pre", {
2058
+ class: "code-content",
2059
+ textContent: k(e.code.trim())
2060
+ }, null, 8, vl)
2061
+ ])
2062
+ ]));
2063
+ }
2064
+ }), ki = /* @__PURE__ */ E(hl, [["__scopeId", "data-v-6fed5425"]]), fl = {
2065
+ key: 0,
2066
+ class: "label"
2067
+ }, gl = /* @__PURE__ */ A({
2068
+ __name: "NSwitch",
2069
+ props: {
2070
+ modelValue: { type: Boolean, default: !1 },
2071
+ disabled: { type: Boolean, default: !1 },
2072
+ size: { default: "md" },
2073
+ label: { default: "" }
2074
+ },
2075
+ emits: ["update:modelValue", "change"],
2076
+ setup(e, { emit: n }) {
2077
+ const o = e, s = n, r = M(() => o.modelValue), d = () => {
2078
+ if (o.disabled) return;
2079
+ const h = !o.modelValue;
2080
+ s("update:modelValue", h), s("change", h);
2081
+ };
2082
+ return (h, p) => (a(), i("div", {
2083
+ class: S(["switch", [
2084
+ `size-${e.size}`,
2085
+ { checked: r.value },
2086
+ { disabled: e.disabled }
2087
+ ]]),
2088
+ onClick: d
2089
+ }, [
2090
+ p[0] || (p[0] = t("div", { class: "inner" }, [
2091
+ t("div", { class: "handle" })
2092
+ ], -1)),
2093
+ e.label ? (a(), i("span", fl, k(e.label), 1)) : f("", !0)
2094
+ ], 2));
2095
+ }
2096
+ }), pi = /* @__PURE__ */ E(gl, [["__scopeId", "data-v-ba9c30d4"]]), ml = /* @__PURE__ */ A({
2097
+ __name: "NTag",
2098
+ props: {
2099
+ intent: { default: "none" },
2100
+ variant: { default: "light" },
2101
+ size: { default: "md" },
2102
+ closable: { type: Boolean, default: !1 },
2103
+ round: { type: Boolean, default: !1 }
2104
+ },
2105
+ emits: ["close"],
2106
+ setup(e, { emit: n }) {
2107
+ const o = n, s = (r) => {
2108
+ r.stopPropagation(), o("close");
2109
+ };
2110
+ return (r, d) => (a(), i("span", {
2111
+ class: S(["tag", [
2112
+ `intent-${e.intent}`,
2113
+ `variant-${e.variant}`,
2114
+ `size-${e.size}`,
2115
+ { round: e.round }
2116
+ ]])
2117
+ }, [
2118
+ I(r.$slots, "default", {}, void 0, !0),
2119
+ e.closable ? (a(), i("button", {
2120
+ key: 0,
2121
+ type: "button",
2122
+ class: "close",
2123
+ onClick: s
2124
+ }, [...d[0] || (d[0] = [
2125
+ t("svg", {
2126
+ viewBox: "0 0 24 24",
2127
+ fill: "none",
2128
+ stroke: "currentColor",
2129
+ "stroke-width": "2.5",
2130
+ "stroke-linecap": "round",
2131
+ "stroke-linejoin": "round"
2132
+ }, [
2133
+ t("line", {
2134
+ x1: "18",
2135
+ y1: "6",
2136
+ x2: "6",
2137
+ y2: "18"
2138
+ }),
2139
+ t("line", {
2140
+ x1: "6",
2141
+ y1: "6",
2142
+ x2: "18",
2143
+ y2: "18"
2144
+ })
2145
+ ], -1)
2146
+ ])])) : f("", !0)
2147
+ ], 2));
2148
+ }
2149
+ }), bi = /* @__PURE__ */ E(ml, [["__scopeId", "data-v-77d4f175"]]), wl = {
2150
+ key: 0,
2151
+ class: "label"
2152
+ }, yl = {
2153
+ key: 0,
2154
+ class: "picker-dropdown"
2155
+ }, kl = { class: "picker-header" }, pl = { class: "header-nav" }, bl = { class: "header-nav" }, xl = { class: "picker-body" }, $l = { class: "weekday-grid" }, Cl = { class: "day-grid" }, Ml = {
2156
+ key: 1,
2157
+ class: "year-grid"
2158
+ }, Bl = {
2159
+ key: 0,
2160
+ class: "time-section"
2161
+ }, Sl = { class: "time-sliders" }, Dl = {
2162
+ key: 0,
2163
+ class: "time-row"
2164
+ }, Nl = ["value"], Tl = { class: "time-val" }, Vl = {
2165
+ key: 1,
2166
+ class: "time-row"
2167
+ }, jl = ["value"], Ll = { class: "time-val" }, Il = { class: "mobile-sheet" }, Al = { class: "picker-header" }, El = { class: "header-nav" }, Rl = { class: "header-nav" }, Fl = { class: "picker-body" }, zl = { class: "weekday-grid" }, Ol = { class: "day-grid" }, Hl = {
2168
+ key: 1,
2169
+ class: "year-grid"
2170
+ }, Pl = {
2171
+ key: 0,
2172
+ class: "time-section"
2173
+ }, Ul = { class: "time-sliders" }, Yl = {
2174
+ key: 0,
2175
+ class: "time-row"
2176
+ }, ql = ["value"], Kl = { class: "time-val" }, Wl = {
2177
+ key: 1,
2178
+ class: "time-row"
2179
+ }, Zl = ["value"], Gl = { class: "time-val" }, Jl = { class: "range-modal" }, Ql = { class: "range-body" }, Xl = {
2180
+ key: 0,
2181
+ class: "range-sep"
2182
+ }, _l = { class: "range-cal" }, es = { class: "picker-header" }, ts = { class: "header-nav" }, ns = {
2183
+ key: 1,
2184
+ class: "header-nav-placeholder"
2185
+ }, os = { class: "header-title no-click" }, as = { class: "header-nav" }, ls = {
2186
+ key: 1,
2187
+ class: "header-nav-placeholder"
2188
+ }, ss = { class: "weekday-grid" }, is = { class: "day-grid range-day-grid" }, rs = ["onClick", "onMouseenter"], us = { class: "range-footer" }, ds = { class: "range-display" }, cs = { class: "mobile-sheet" }, vs = {
2189
+ class: "picker-header",
2190
+ style: { "margin-top": "8px" }
2191
+ }, hs = { class: "header-nav" }, fs = { class: "header-title no-click" }, gs = { class: "header-nav" }, ms = { class: "weekday-grid" }, ws = { class: "day-grid range-day-grid" }, ys = ["onClick"], ks = { class: "range-footer" }, ps = { class: "range-display" }, bs = /* @__PURE__ */ A({
2192
+ __name: "NDatePicker",
2193
+ props: {
2194
+ modelValue: { default: "" },
2195
+ start: { default: "" },
2196
+ end: { default: "" },
2197
+ placeholder: { default: "請選擇日期" },
2198
+ disabled: { type: Boolean, default: !1 },
2199
+ clearable: { type: Boolean, default: !1 },
2200
+ title: { default: "" },
2201
+ format: { default: "YYYY-MM-DD" },
2202
+ range: { type: Boolean, default: !1 }
2203
+ },
2204
+ emits: ["update:modelValue", "change", "clear", "update:start", "update:end"],
2205
+ setup(e, { emit: n }) {
2206
+ const o = n;
2207
+ function s(u, l, v, j, U) {
2208
+ return e.format.replace("YYYY", String(u)).replace("MM", String(l + 1).padStart(2, "0")).replace("DD", String(v).padStart(2, "0")).replace("HH", String(j).padStart(2, "0")).replace("mm", String(U).padStart(2, "0"));
2209
+ }
2210
+ function r(u) {
2211
+ if (!u)
2212
+ return null;
2213
+ const l = [], v = e.format.replace(/YYYY|MM|DD|HH|mm/g, (H) => H === "YYYY" ? (l.push("year"), "(\\d{4})") : H === "MM" ? (l.push("month"), "(\\d{1,2})") : H === "DD" ? (l.push("day"), "(\\d{1,2})") : H === "HH" ? (l.push("hour"), "(\\d{1,2})") : (l.push("min"), "(\\d{1,2})")), j = String(u).match(new RegExp(v));
2214
+ if (!j)
2215
+ return null;
2216
+ const U = {
2217
+ year: (/* @__PURE__ */ new Date()).getFullYear(),
2218
+ month: 0,
2219
+ day: 1,
2220
+ hour: 0,
2221
+ min: 0
2222
+ };
2223
+ return l.forEach((H, we) => {
2224
+ const ye = parseInt(j[we + 1] ?? "0");
2225
+ H === "month" ? U[H] = ye - 1 : U[H] = ye;
2226
+ }), U;
2227
+ }
2228
+ const d = M(() => e.format.includes("HH")), h = M(() => e.format.includes("mm")), p = M(() => d.value || h.value), w = T(!1), b = T(null), g = T(typeof window < "u" && window.innerWidth < 768);
2229
+ let c = null;
2230
+ function m() {
2231
+ c && clearTimeout(c), c = setTimeout(() => {
2232
+ g.value = window.innerWidth < 768;
2233
+ }, 150);
2234
+ }
2235
+ const C = [
2236
+ "一月",
2237
+ "二月",
2238
+ "三月",
2239
+ "四月",
2240
+ "五月",
2241
+ "六月",
2242
+ "七月",
2243
+ "八月",
2244
+ "九月",
2245
+ "十月",
2246
+ "十一月",
2247
+ "十二月"
2248
+ ], O = ["日", "一", "二", "三", "四", "五", "六"], Z = /* @__PURE__ */ new Date(), J = Z.getFullYear(), G = Z.getMonth(), x = Z.getDate();
2249
+ function y(u, l) {
2250
+ const v = new Date(u, l, 1).getDay(), j = new Date(u, l + 1, 0).getDate(), U = new Date(u, l, 0).getDate(), H = [];
2251
+ for (let oe = v - 1; oe >= 0; oe--) {
2252
+ const Ht = l === 0 ? 11 : l - 1, Pt = l === 0 ? u - 1 : u;
2253
+ H.push({
2254
+ year: Pt,
2255
+ month: Ht,
2256
+ day: U - oe,
2257
+ isCurrentMonth: !1
2258
+ });
2259
+ }
2260
+ for (let oe = 1; oe <= j; oe++)
2261
+ H.push({ year: u, month: l, day: oe, isCurrentMonth: !0 });
2262
+ const we = l === 11 ? 0 : l + 1, ye = l === 11 ? u + 1 : u;
2263
+ for (let oe = 1; H.length < 42; oe++)
2264
+ H.push({ year: ye, month: we, day: oe, isCurrentMonth: !1 });
2265
+ return H;
2266
+ }
2267
+ function V(u, l) {
2268
+ return u.year !== l.year ? u.year - l.year : u.month !== l.month ? u.month - l.month : u.day - l.day;
2269
+ }
2270
+ function Y(u) {
2271
+ return String(u).padStart(2, "0");
2272
+ }
2273
+ const q = T("date"), re = T(/* @__PURE__ */ new Date()), X = T(null), _ = T(0), ee = T(0);
2274
+ let Me = null, Be = null;
2275
+ const te = M(() => re.value.getFullYear()), ge = M(() => re.value.getMonth()), ze = T(Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 12) * 12), ue = M(() => {
2276
+ const u = [];
2277
+ for (let l = 0; l < 12; l++) u.push(ze.value + l);
2278
+ return u;
2279
+ });
2280
+ He(
2281
+ te,
2282
+ (u) => {
2283
+ ze.value = Math.floor(u / 12) * 12;
2284
+ },
2285
+ { immediate: !0 }
2286
+ ), He(
2287
+ () => e.modelValue,
2288
+ (u) => {
2289
+ if (!u)
2290
+ return;
2291
+ const l = r(String(u));
2292
+ l && (re.value = new Date(l.year, l.month, 1));
2293
+ },
2294
+ { immediate: !0 }
2295
+ );
2296
+ const Ke = M(
2297
+ () => y(te.value, ge.value)
2298
+ ), We = M(() => {
2299
+ if (!e.modelValue)
2300
+ return "";
2301
+ const u = r(String(e.modelValue));
2302
+ return u ? s(
2303
+ u.year,
2304
+ u.month,
2305
+ u.day,
2306
+ u.hour,
2307
+ u.min
2308
+ ) : "";
2309
+ }), Ze = M(() => e.range ? e.start && e.end ? `${e.start} → ${e.end}` : e.start ? `${e.start} → ...` : "" : We.value);
2310
+ function jt() {
2311
+ const u = r(String(e.modelValue));
2312
+ u ? (re.value = new Date(u.year, u.month, 1), _.value = u.hour, ee.value = u.min, X.value = p.value ? {
2313
+ year: u.year,
2314
+ month: u.month,
2315
+ day: u.day,
2316
+ isCurrentMonth: !0
2317
+ } : null) : (_.value = 0, ee.value = 0, X.value = null), q.value = "date";
2318
+ }
2319
+ function Lt(u) {
2320
+ if (!e.modelValue) return !1;
2321
+ const l = r(String(e.modelValue));
2322
+ return l ? l.year === u.year && l.month === u.month && l.day === u.day : !1;
2323
+ }
2324
+ function Se(u) {
2325
+ return J === u.year && G === u.month && x === u.day;
2326
+ }
2327
+ function De(u) {
2328
+ return p.value ? X.value !== null && X.value.year === u.year && X.value.month === u.month && X.value.day === u.day : Lt(u);
2329
+ }
2330
+ function Oe(u) {
2331
+ const l = s(
2332
+ u.year,
2333
+ u.month,
2334
+ u.day,
2335
+ _.value,
2336
+ ee.value
2337
+ );
2338
+ o("update:modelValue", l), o("change", l);
2339
+ }
2340
+ function Ge(u) {
2341
+ if (p.value)
2342
+ X.value = { ...u }, re.value = new Date(u.year, u.month, 1), Oe(u);
2343
+ else {
2344
+ const l = s(u.year, u.month, u.day, 0, 0);
2345
+ o("update:modelValue", l), o("change", l), me();
2346
+ }
2347
+ }
2348
+ function Je(u) {
2349
+ re.value = new Date(u, ge.value, 1), q.value = "date";
2350
+ }
2351
+ function Ne(u) {
2352
+ re.value = new Date(
2353
+ te.value,
2354
+ ge.value + u,
2355
+ 1
2356
+ );
2357
+ }
2358
+ function Te(u) {
2359
+ q.value === "year" ? ze.value += u * 12 : re.value = new Date(
2360
+ te.value + u,
2361
+ ge.value,
2362
+ 1
2363
+ );
2364
+ }
2365
+ function Qe(u, l) {
2366
+ u === "H" ? _.value = Math.max(0, Math.min(23, _.value + l)) : ee.value = Math.max(0, Math.min(59, ee.value + l)), X.value && Oe(X.value);
2367
+ }
2368
+ function de(u, l) {
2369
+ Qe(u, l), Me = setTimeout(() => {
2370
+ Be = setInterval(() => Qe(u, l), 100);
2371
+ }, 300);
2372
+ }
2373
+ function K() {
2374
+ Me && (clearTimeout(Me), Me = null), Be && (clearInterval(Be), Be = null);
2375
+ }
2376
+ function Ve(u, l) {
2377
+ const v = parseInt(u.target.value);
2378
+ l === "H" ? _.value = v : ee.value = v, X.value && Oe(X.value);
2379
+ }
2380
+ const ce = T(J), Q = T(G), P = T(null), le = T(null), se = T(null), ne = T(null), Xe = M(
2381
+ () => !!le.value && !!se.value
2382
+ ), _e = M(
2383
+ () => Q.value === 11 ? ce.value + 1 : ce.value
2384
+ ), et = M(
2385
+ () => Q.value === 11 ? 0 : Q.value + 1
2386
+ ), tt = M(
2387
+ () => y(ce.value, Q.value)
2388
+ ), It = M(
2389
+ () => y(_e.value, et.value)
2390
+ ), At = M(() => [
2391
+ {
2392
+ year: ce.value,
2393
+ month: Q.value,
2394
+ days: tt.value,
2395
+ isLeft: !0
2396
+ },
2397
+ {
2398
+ year: _e.value,
2399
+ month: et.value,
2400
+ days: It.value,
2401
+ isLeft: !1
2402
+ }
2403
+ ]);
2404
+ function je(u) {
2405
+ const l = r(u);
2406
+ return l ? { year: l.year, month: l.month, day: l.day, isCurrentMonth: !0 } : null;
2407
+ }
2408
+ const Et = M(() => P.value && ne.value ? V(P.value, ne.value) <= 0 ? P.value : ne.value : le.value ?? je(e.start)), Rt = M(() => P.value && ne.value ? V(P.value, ne.value) <= 0 ? ne.value : P.value : se.value ?? je(e.end)), Le = M(() => {
2409
+ if (P.value) {
2410
+ const u = P.value;
2411
+ return `${u.year}-${Y(u.month + 1)}-${Y(u.day)}`;
2412
+ }
2413
+ if (le.value) {
2414
+ const u = le.value;
2415
+ return `${u.year}-${Y(u.month + 1)}-${Y(u.day)}`;
2416
+ }
2417
+ return e.start;
2418
+ }), Ie = M(() => {
2419
+ if (P.value) return "";
2420
+ if (se.value) {
2421
+ const u = se.value;
2422
+ return `${u.year}-${Y(u.month + 1)}-${Y(u.day)}`;
2423
+ }
2424
+ return e.end;
2425
+ });
2426
+ function Ft() {
2427
+ const u = r(e.start) ?? {
2428
+ year: J,
2429
+ month: G
2430
+ };
2431
+ ce.value = u.year, Q.value = u.month, le.value = je(e.start), se.value = je(e.end), P.value = null, ne.value = null;
2432
+ }
2433
+ function nt() {
2434
+ Q.value === 0 ? (ce.value--, Q.value = 11) : Q.value--;
2435
+ }
2436
+ function ot() {
2437
+ Q.value === 11 ? (ce.value++, Q.value = 0) : Q.value++;
2438
+ }
2439
+ function at(u) {
2440
+ if (!P.value)
2441
+ P.value = { ...u }, le.value = null, se.value = null;
2442
+ else {
2443
+ const l = P.value, [v, j] = V(l, u) <= 0 ? [l, u] : [u, l];
2444
+ le.value = v, se.value = j, P.value = null, ne.value = null;
2445
+ }
2446
+ }
2447
+ function lt(u) {
2448
+ const l = u.year === J && u.month === G && u.day === x, v = P.value && u.year === P.value.year && u.month === P.value.month && u.day === P.value.day, j = Et.value, U = Rt.value, H = j && u.year === j.year && u.month === j.month && u.day === j.day, we = U && u.year === U.year && u.month === U.month && u.day === U.day, ye = j && U && V(u, j) > 0 && V(u, U) < 0;
2449
+ return {
2450
+ "is-other-month": !u.isCurrentMonth,
2451
+ "is-today": l && !H && !we,
2452
+ "is-range-start": !!H,
2453
+ "is-range-end": !!we,
2454
+ "is-in-range": !!ye,
2455
+ "is-pending": !!v && !H
2456
+ };
2457
+ }
2458
+ function st() {
2459
+ if (!le.value || !se.value) return;
2460
+ const u = le.value, l = se.value;
2461
+ o("update:start", `${u.year}-${Y(u.month + 1)}-${Y(u.day)}`), o("update:end", `${l.year}-${Y(l.month + 1)}-${Y(l.day)}`), me();
2462
+ }
2463
+ function zt() {
2464
+ e.disabled || (w.value || (e.range ? Ft() : jt()), w.value = !w.value);
2465
+ }
2466
+ function me() {
2467
+ w.value = !1, P.value = null, ne.value = null;
2468
+ }
2469
+ function it() {
2470
+ q.value = q.value === "date" ? "year" : "date";
2471
+ }
2472
+ const rt = (u) => {
2473
+ const l = u.target;
2474
+ b.value?.contains(l) || g.value || me();
2475
+ };
2476
+ Ce(() => {
2477
+ document.addEventListener("mousedown", rt), window.addEventListener("resize", m);
2478
+ }), wt(() => {
2479
+ document.removeEventListener("mousedown", rt), window.removeEventListener("resize", m), c && clearTimeout(c), K();
2480
+ });
2481
+ const Ot = (u) => {
2482
+ u.stopPropagation(), o("update:modelValue", ""), o("change", ""), o("clear");
2483
+ };
2484
+ return (u, l) => (a(), i("div", {
2485
+ ref_key: "containerRef",
2486
+ ref: b,
2487
+ class: "datepicker"
2488
+ }, [
2489
+ e.title ? (a(), i("label", wl, k(e.title), 1)) : f("", !0),
2490
+ t("div", {
2491
+ class: S(["date-picker", { open: w.value && !e.range && !g.value, disabled: e.disabled }])
2492
+ }, [
2493
+ t("div", {
2494
+ class: "picker-trigger",
2495
+ onClick: zt
2496
+ }, [
2497
+ t("span", {
2498
+ class: S(["text", { placeholder: !Ze.value }])
2499
+ }, k(Ze.value || e.placeholder), 3),
2500
+ e.clearable && We.value && !e.range ? (a(), L(B, {
2501
+ key: 0,
2502
+ variant: "ghost",
2503
+ square: "",
2504
+ class: "clear",
2505
+ onClick: Ot
2506
+ }, {
2507
+ default: $(() => [...l[20] || (l[20] = [
2508
+ t("svg", {
2509
+ xmlns: "http://www.w3.org/2000/svg",
2510
+ width: "16",
2511
+ height: "16",
2512
+ viewBox: "0 0 24 24",
2513
+ fill: "none",
2514
+ stroke: "currentColor",
2515
+ "stroke-width": "2",
2516
+ "stroke-linecap": "round",
2517
+ "stroke-linejoin": "round"
2518
+ }, [
2519
+ t("path", { d: "M18 6 6 18" }),
2520
+ t("path", { d: "m6 6 12 12" })
2521
+ ], -1)
2522
+ ])]),
2523
+ _: 1
2524
+ })) : f("", !0)
2525
+ ]),
2526
+ D(he, { name: "fade" }, {
2527
+ default: $(() => [
2528
+ w.value && !e.range && !g.value ? (a(), i("div", yl, [
2529
+ t("div", kl, [
2530
+ t("div", pl, [
2531
+ D(B, {
2532
+ variant: "ghost",
2533
+ square: "",
2534
+ onClick: l[0] || (l[0] = (v) => Te(-1))
2535
+ }, {
2536
+ default: $(() => [...l[21] || (l[21] = [
2537
+ t("svg", {
2538
+ xmlns: "http://www.w3.org/2000/svg",
2539
+ width: "16",
2540
+ height: "16",
2541
+ viewBox: "0 0 24 24",
2542
+ fill: "none",
2543
+ stroke: "currentColor",
2544
+ "stroke-width": "2",
2545
+ "stroke-linecap": "round",
2546
+ "stroke-linejoin": "round"
2547
+ }, [
2548
+ t("path", { d: "m11 17-5-5 5-5" }),
2549
+ t("path", { d: "m18 17-5-5 5-5" })
2550
+ ], -1)
2551
+ ])]),
2552
+ _: 1
2553
+ }),
2554
+ q.value === "date" ? (a(), L(B, {
2555
+ key: 0,
2556
+ variant: "ghost",
2557
+ square: "",
2558
+ onClick: l[1] || (l[1] = (v) => Ne(-1))
2559
+ }, {
2560
+ default: $(() => [...l[22] || (l[22] = [
2561
+ t("svg", {
2562
+ xmlns: "http://www.w3.org/2000/svg",
2563
+ width: "16",
2564
+ height: "16",
2565
+ viewBox: "0 0 24 24",
2566
+ fill: "none",
2567
+ stroke: "currentColor",
2568
+ "stroke-width": "2",
2569
+ "stroke-linecap": "round",
2570
+ "stroke-linejoin": "round"
2571
+ }, [
2572
+ t("path", { d: "m15 18-6-6 6-6" })
2573
+ ], -1)
2574
+ ])]),
2575
+ _: 1
2576
+ })) : f("", !0)
2577
+ ]),
2578
+ t("div", {
2579
+ class: "header-title",
2580
+ onClick: it
2581
+ }, [
2582
+ q.value === "date" ? (a(), i(N, { key: 0 }, [
2583
+ z(k(C[ge.value]) + " " + k(te.value), 1)
2584
+ ], 64)) : (a(), i(N, { key: 1 }, [
2585
+ z(k(ue.value[0]) + " - " + k(ue.value[ue.value.length - 1]), 1)
2586
+ ], 64))
2587
+ ]),
2588
+ t("div", bl, [
2589
+ q.value === "date" ? (a(), L(B, {
2590
+ key: 0,
2591
+ variant: "ghost",
2592
+ square: "",
2593
+ onClick: l[2] || (l[2] = (v) => Ne(1))
2594
+ }, {
2595
+ default: $(() => [...l[23] || (l[23] = [
2596
+ t("svg", {
2597
+ xmlns: "http://www.w3.org/2000/svg",
2598
+ width: "16",
2599
+ height: "16",
2600
+ viewBox: "0 0 24 24",
2601
+ fill: "none",
2602
+ stroke: "currentColor",
2603
+ "stroke-width": "2",
2604
+ "stroke-linecap": "round",
2605
+ "stroke-linejoin": "round"
2606
+ }, [
2607
+ t("path", { d: "m9 18 6-6-6-6" })
2608
+ ], -1)
2609
+ ])]),
2610
+ _: 1
2611
+ })) : f("", !0),
2612
+ D(B, {
2613
+ variant: "ghost",
2614
+ square: "",
2615
+ onClick: l[3] || (l[3] = (v) => Te(1))
2616
+ }, {
2617
+ default: $(() => [...l[24] || (l[24] = [
2618
+ t("svg", {
2619
+ xmlns: "http://www.w3.org/2000/svg",
2620
+ width: "16",
2621
+ height: "16",
2622
+ viewBox: "0 0 24 24",
2623
+ fill: "none",
2624
+ stroke: "currentColor",
2625
+ "stroke-width": "2",
2626
+ "stroke-linecap": "round",
2627
+ "stroke-linejoin": "round"
2628
+ }, [
2629
+ t("path", { d: "m6 17 5-5-5-5" }),
2630
+ t("path", { d: "m13 17 5-5-5-5" })
2631
+ ], -1)
2632
+ ])]),
2633
+ _: 1
2634
+ })
2635
+ ])
2636
+ ]),
2637
+ t("div", xl, [
2638
+ q.value === "date" ? (a(), i(N, { key: 0 }, [
2639
+ t("div", $l, [
2640
+ (a(), i(N, null, F(O, (v) => t("span", {
2641
+ key: v,
2642
+ class: "weekday"
2643
+ }, k(v), 1)), 64))
2644
+ ]),
2645
+ t("div", Cl, [
2646
+ (a(!0), i(N, null, F(Ke.value, (v, j) => (a(), L(B, {
2647
+ key: j,
2648
+ variant: De(v) ? "solid" : Se(v) ? "mute" : "ghost",
2649
+ intent: De(v) || Se(v) ? "primary" : "none",
2650
+ class: S(["day-cell", {
2651
+ "is-not-current": !v.isCurrentMonth
2652
+ }]),
2653
+ padding: "0",
2654
+ onClick: (U) => Ge(v)
2655
+ }, {
2656
+ default: $(() => [
2657
+ z(k(v.day), 1)
2658
+ ]),
2659
+ _: 2
2660
+ }, 1032, ["variant", "intent", "class", "onClick"]))), 128))
2661
+ ])
2662
+ ], 64)) : (a(), i("div", Ml, [
2663
+ (a(!0), i(N, null, F(ue.value, (v) => (a(), L(B, {
2664
+ key: v,
2665
+ variant: v === te.value ? "solid" : "ghost",
2666
+ intent: v === te.value ? "primary" : "none",
2667
+ class: "year-cell",
2668
+ onClick: (j) => Je(v)
2669
+ }, {
2670
+ default: $(() => [
2671
+ z(k(v), 1)
2672
+ ]),
2673
+ _: 2
2674
+ }, 1032, ["variant", "intent", "onClick"]))), 128))
2675
+ ]))
2676
+ ]),
2677
+ p.value && q.value === "date" ? (a(), i("div", Bl, [
2678
+ t("div", Sl, [
2679
+ d.value ? (a(), i("div", Dl, [
2680
+ l[27] || (l[27] = t("span", { class: "time-label" }, "時", -1)),
2681
+ D(B, {
2682
+ variant: "ghost",
2683
+ square: "",
2684
+ size: "sm",
2685
+ class: "time-step",
2686
+ onMousedown: l[4] || (l[4] = R((v) => de("H", -1), ["prevent"])),
2687
+ onMouseup: K,
2688
+ onMouseleave: K
2689
+ }, {
2690
+ default: $(() => [...l[25] || (l[25] = [
2691
+ t("svg", {
2692
+ xmlns: "http://www.w3.org/2000/svg",
2693
+ width: "16",
2694
+ height: "16",
2695
+ viewBox: "0 0 24 24",
2696
+ fill: "none",
2697
+ stroke: "currentColor",
2698
+ "stroke-width": "2",
2699
+ "stroke-linecap": "round",
2700
+ "stroke-linejoin": "round"
2701
+ }, [
2702
+ t("path", { d: "m15 18-6-6 6-6" })
2703
+ ], -1)
2704
+ ])]),
2705
+ _: 1
2706
+ }),
2707
+ t("input", {
2708
+ class: "time-range",
2709
+ type: "range",
2710
+ min: "0",
2711
+ max: "23",
2712
+ value: _.value,
2713
+ onInput: l[5] || (l[5] = (v) => Ve(v, "H"))
2714
+ }, null, 40, Nl),
2715
+ D(B, {
2716
+ variant: "ghost",
2717
+ square: "",
2718
+ size: "sm",
2719
+ class: "time-step",
2720
+ onMousedown: l[6] || (l[6] = R((v) => de("H", 1), ["prevent"])),
2721
+ onMouseup: K,
2722
+ onMouseleave: K
2723
+ }, {
2724
+ default: $(() => [...l[26] || (l[26] = [
2725
+ t("svg", {
2726
+ xmlns: "http://www.w3.org/2000/svg",
2727
+ width: "16",
2728
+ height: "16",
2729
+ viewBox: "0 0 24 24",
2730
+ fill: "none",
2731
+ stroke: "currentColor",
2732
+ "stroke-width": "2",
2733
+ "stroke-linecap": "round",
2734
+ "stroke-linejoin": "round"
2735
+ }, [
2736
+ t("path", { d: "m9 18 6-6-6-6" })
2737
+ ], -1)
2738
+ ])]),
2739
+ _: 1
2740
+ }),
2741
+ t("span", Tl, k(Y(_.value)), 1)
2742
+ ])) : f("", !0),
2743
+ h.value ? (a(), i("div", Vl, [
2744
+ l[30] || (l[30] = t("span", { class: "time-label" }, "分", -1)),
2745
+ D(B, {
2746
+ variant: "ghost",
2747
+ square: "",
2748
+ size: "sm",
2749
+ class: "time-step",
2750
+ onMousedown: l[7] || (l[7] = R((v) => de("m", -1), ["prevent"])),
2751
+ onMouseup: K,
2752
+ onMouseleave: K
2753
+ }, {
2754
+ default: $(() => [...l[28] || (l[28] = [
2755
+ t("svg", {
2756
+ xmlns: "http://www.w3.org/2000/svg",
2757
+ width: "16",
2758
+ height: "16",
2759
+ viewBox: "0 0 24 24",
2760
+ fill: "none",
2761
+ stroke: "currentColor",
2762
+ "stroke-width": "2",
2763
+ "stroke-linecap": "round",
2764
+ "stroke-linejoin": "round"
2765
+ }, [
2766
+ t("path", { d: "m15 18-6-6 6-6" })
2767
+ ], -1)
2768
+ ])]),
2769
+ _: 1
2770
+ }),
2771
+ t("input", {
2772
+ class: "time-range",
2773
+ type: "range",
2774
+ min: "0",
2775
+ max: "59",
2776
+ value: ee.value,
2777
+ onInput: l[8] || (l[8] = (v) => Ve(v, "m"))
2778
+ }, null, 40, jl),
2779
+ D(B, {
2780
+ variant: "ghost",
2781
+ square: "",
2782
+ size: "sm",
2783
+ class: "time-step",
2784
+ onMousedown: l[9] || (l[9] = R((v) => de("m", 1), ["prevent"])),
2785
+ onMouseup: K,
2786
+ onMouseleave: K
2787
+ }, {
2788
+ default: $(() => [...l[29] || (l[29] = [
2789
+ t("svg", {
2790
+ xmlns: "http://www.w3.org/2000/svg",
2791
+ width: "16",
2792
+ height: "16",
2793
+ viewBox: "0 0 24 24",
2794
+ fill: "none",
2795
+ stroke: "currentColor",
2796
+ "stroke-width": "2",
2797
+ "stroke-linecap": "round",
2798
+ "stroke-linejoin": "round"
2799
+ }, [
2800
+ t("path", { d: "m9 18 6-6-6-6" })
2801
+ ], -1)
2802
+ ])]),
2803
+ _: 1
2804
+ }),
2805
+ t("span", Ll, k(Y(ee.value)), 1)
2806
+ ])) : f("", !0)
2807
+ ])
2808
+ ])) : f("", !0)
2809
+ ])) : f("", !0)
2810
+ ]),
2811
+ _: 1
2812
+ })
2813
+ ], 2),
2814
+ D(he, { name: "sheet-slide" }, {
2815
+ default: $(() => [
2816
+ w.value && !e.range && g.value ? (a(), i("div", {
2817
+ key: 0,
2818
+ class: "mobile-overlay",
2819
+ onClick: R(me, ["self"])
2820
+ }, [
2821
+ t("div", Il, [
2822
+ l[41] || (l[41] = t("div", { class: "sheet-handle" }, null, -1)),
2823
+ t("div", Al, [
2824
+ t("div", El, [
2825
+ D(B, {
2826
+ variant: "ghost",
2827
+ square: "",
2828
+ onClick: l[10] || (l[10] = (v) => Te(-1))
2829
+ }, {
2830
+ default: $(() => [...l[31] || (l[31] = [
2831
+ t("svg", {
2832
+ xmlns: "http://www.w3.org/2000/svg",
2833
+ width: "16",
2834
+ height: "16",
2835
+ viewBox: "0 0 24 24",
2836
+ fill: "none",
2837
+ stroke: "currentColor",
2838
+ "stroke-width": "2",
2839
+ "stroke-linecap": "round",
2840
+ "stroke-linejoin": "round"
2841
+ }, [
2842
+ t("path", { d: "m11 17-5-5 5-5" }),
2843
+ t("path", { d: "m18 17-5-5 5-5" })
2844
+ ], -1)
2845
+ ])]),
2846
+ _: 1
2847
+ }),
2848
+ q.value === "date" ? (a(), L(B, {
2849
+ key: 0,
2850
+ variant: "ghost",
2851
+ square: "",
2852
+ onClick: l[11] || (l[11] = (v) => Ne(-1))
2853
+ }, {
2854
+ default: $(() => [...l[32] || (l[32] = [
2855
+ t("svg", {
2856
+ xmlns: "http://www.w3.org/2000/svg",
2857
+ width: "16",
2858
+ height: "16",
2859
+ viewBox: "0 0 24 24",
2860
+ fill: "none",
2861
+ stroke: "currentColor",
2862
+ "stroke-width": "2",
2863
+ "stroke-linecap": "round",
2864
+ "stroke-linejoin": "round"
2865
+ }, [
2866
+ t("path", { d: "m15 18-6-6 6-6" })
2867
+ ], -1)
2868
+ ])]),
2869
+ _: 1
2870
+ })) : f("", !0)
2871
+ ]),
2872
+ t("div", {
2873
+ class: "header-title",
2874
+ onClick: it
2875
+ }, [
2876
+ q.value === "date" ? (a(), i(N, { key: 0 }, [
2877
+ z(k(C[ge.value]) + " " + k(te.value), 1)
2878
+ ], 64)) : (a(), i(N, { key: 1 }, [
2879
+ z(k(ue.value[0]) + " - " + k(ue.value[ue.value.length - 1]), 1)
2880
+ ], 64))
2881
+ ]),
2882
+ t("div", Rl, [
2883
+ q.value === "date" ? (a(), L(B, {
2884
+ key: 0,
2885
+ variant: "ghost",
2886
+ square: "",
2887
+ onClick: l[12] || (l[12] = (v) => Ne(1))
2888
+ }, {
2889
+ default: $(() => [...l[33] || (l[33] = [
2890
+ t("svg", {
2891
+ xmlns: "http://www.w3.org/2000/svg",
2892
+ width: "16",
2893
+ height: "16",
2894
+ viewBox: "0 0 24 24",
2895
+ fill: "none",
2896
+ stroke: "currentColor",
2897
+ "stroke-width": "2",
2898
+ "stroke-linecap": "round",
2899
+ "stroke-linejoin": "round"
2900
+ }, [
2901
+ t("path", { d: "m9 18 6-6-6-6" })
2902
+ ], -1)
2903
+ ])]),
2904
+ _: 1
2905
+ })) : f("", !0),
2906
+ D(B, {
2907
+ variant: "ghost",
2908
+ square: "",
2909
+ onClick: l[13] || (l[13] = (v) => Te(1))
2910
+ }, {
2911
+ default: $(() => [...l[34] || (l[34] = [
2912
+ t("svg", {
2913
+ xmlns: "http://www.w3.org/2000/svg",
2914
+ width: "16",
2915
+ height: "16",
2916
+ viewBox: "0 0 24 24",
2917
+ fill: "none",
2918
+ stroke: "currentColor",
2919
+ "stroke-width": "2",
2920
+ "stroke-linecap": "round",
2921
+ "stroke-linejoin": "round"
2922
+ }, [
2923
+ t("path", { d: "m6 17 5-5-5-5" }),
2924
+ t("path", { d: "m13 17 5-5-5-5" })
2925
+ ], -1)
2926
+ ])]),
2927
+ _: 1
2928
+ })
2929
+ ])
2930
+ ]),
2931
+ t("div", Fl, [
2932
+ q.value === "date" ? (a(), i(N, { key: 0 }, [
2933
+ t("div", zl, [
2934
+ (a(), i(N, null, F(O, (v) => t("span", {
2935
+ key: v,
2936
+ class: "weekday"
2937
+ }, k(v), 1)), 64))
2938
+ ]),
2939
+ t("div", Ol, [
2940
+ (a(!0), i(N, null, F(Ke.value, (v, j) => (a(), L(B, {
2941
+ key: j,
2942
+ variant: De(v) ? "solid" : Se(v) ? "mute" : "ghost",
2943
+ intent: De(v) || Se(v) ? "primary" : "none",
2944
+ class: S(["day-cell", {
2945
+ "is-not-current": !v.isCurrentMonth
2946
+ }]),
2947
+ padding: "0",
2948
+ onClick: (U) => Ge(v)
2949
+ }, {
2950
+ default: $(() => [
2951
+ z(k(v.day), 1)
2952
+ ]),
2953
+ _: 2
2954
+ }, 1032, ["variant", "intent", "class", "onClick"]))), 128))
2955
+ ])
2956
+ ], 64)) : (a(), i("div", Hl, [
2957
+ (a(!0), i(N, null, F(ue.value, (v) => (a(), L(B, {
2958
+ key: v,
2959
+ variant: v === te.value ? "solid" : "ghost",
2960
+ intent: v === te.value ? "primary" : "none",
2961
+ class: "year-cell",
2962
+ onClick: (j) => Je(v)
2963
+ }, {
2964
+ default: $(() => [
2965
+ z(k(v), 1)
2966
+ ]),
2967
+ _: 2
2968
+ }, 1032, ["variant", "intent", "onClick"]))), 128))
2969
+ ]))
2970
+ ]),
2971
+ p.value && q.value === "date" ? (a(), i("div", Pl, [
2972
+ t("div", Ul, [
2973
+ d.value ? (a(), i("div", Yl, [
2974
+ l[37] || (l[37] = t("span", { class: "time-label" }, "時", -1)),
2975
+ D(B, {
2976
+ variant: "ghost",
2977
+ square: "",
2978
+ size: "sm",
2979
+ class: "time-step",
2980
+ onMousedown: l[14] || (l[14] = R((v) => de("H", -1), ["prevent"])),
2981
+ onMouseup: K,
2982
+ onMouseleave: K
2983
+ }, {
2984
+ default: $(() => [...l[35] || (l[35] = [
2985
+ t("svg", {
2986
+ xmlns: "http://www.w3.org/2000/svg",
2987
+ width: "16",
2988
+ height: "16",
2989
+ viewBox: "0 0 24 24",
2990
+ fill: "none",
2991
+ stroke: "currentColor",
2992
+ "stroke-width": "2",
2993
+ "stroke-linecap": "round",
2994
+ "stroke-linejoin": "round"
2995
+ }, [
2996
+ t("path", { d: "m15 18-6-6 6-6" })
2997
+ ], -1)
2998
+ ])]),
2999
+ _: 1
3000
+ }),
3001
+ t("input", {
3002
+ class: "time-range",
3003
+ type: "range",
3004
+ min: "0",
3005
+ max: "23",
3006
+ value: _.value,
3007
+ onInput: l[15] || (l[15] = (v) => Ve(v, "H"))
3008
+ }, null, 40, ql),
3009
+ D(B, {
3010
+ variant: "ghost",
3011
+ square: "",
3012
+ size: "sm",
3013
+ class: "time-step",
3014
+ onMousedown: l[16] || (l[16] = R((v) => de("H", 1), ["prevent"])),
3015
+ onMouseup: K,
3016
+ onMouseleave: K
3017
+ }, {
3018
+ default: $(() => [...l[36] || (l[36] = [
3019
+ t("svg", {
3020
+ xmlns: "http://www.w3.org/2000/svg",
3021
+ width: "16",
3022
+ height: "16",
3023
+ viewBox: "0 0 24 24",
3024
+ fill: "none",
3025
+ stroke: "currentColor",
3026
+ "stroke-width": "2",
3027
+ "stroke-linecap": "round",
3028
+ "stroke-linejoin": "round"
3029
+ }, [
3030
+ t("path", { d: "m9 18 6-6-6-6" })
3031
+ ], -1)
3032
+ ])]),
3033
+ _: 1
3034
+ }),
3035
+ t("span", Kl, k(Y(_.value)), 1)
3036
+ ])) : f("", !0),
3037
+ h.value ? (a(), i("div", Wl, [
3038
+ l[40] || (l[40] = t("span", { class: "time-label" }, "分", -1)),
3039
+ D(B, {
3040
+ variant: "ghost",
3041
+ square: "",
3042
+ size: "sm",
3043
+ class: "time-step",
3044
+ onMousedown: l[17] || (l[17] = R((v) => de("m", -1), ["prevent"])),
3045
+ onMouseup: K,
3046
+ onMouseleave: K
3047
+ }, {
3048
+ default: $(() => [...l[38] || (l[38] = [
3049
+ t("svg", {
3050
+ xmlns: "http://www.w3.org/2000/svg",
3051
+ width: "16",
3052
+ height: "16",
3053
+ viewBox: "0 0 24 24",
3054
+ fill: "none",
3055
+ stroke: "currentColor",
3056
+ "stroke-width": "2",
3057
+ "stroke-linecap": "round",
3058
+ "stroke-linejoin": "round"
3059
+ }, [
3060
+ t("path", { d: "m15 18-6-6 6-6" })
3061
+ ], -1)
3062
+ ])]),
3063
+ _: 1
3064
+ }),
3065
+ t("input", {
3066
+ class: "time-range",
3067
+ type: "range",
3068
+ min: "0",
3069
+ max: "59",
3070
+ value: ee.value,
3071
+ onInput: l[18] || (l[18] = (v) => Ve(v, "m"))
3072
+ }, null, 40, Zl),
3073
+ D(B, {
3074
+ variant: "ghost",
3075
+ square: "",
3076
+ size: "sm",
3077
+ class: "time-step",
3078
+ onMousedown: l[19] || (l[19] = R((v) => de("m", 1), ["prevent"])),
3079
+ onMouseup: K,
3080
+ onMouseleave: K
3081
+ }, {
3082
+ default: $(() => [...l[39] || (l[39] = [
3083
+ t("svg", {
3084
+ xmlns: "http://www.w3.org/2000/svg",
3085
+ width: "16",
3086
+ height: "16",
3087
+ viewBox: "0 0 24 24",
3088
+ fill: "none",
3089
+ stroke: "currentColor",
3090
+ "stroke-width": "2",
3091
+ "stroke-linecap": "round",
3092
+ "stroke-linejoin": "round"
3093
+ }, [
3094
+ t("path", { d: "m9 18 6-6-6-6" })
3095
+ ], -1)
3096
+ ])]),
3097
+ _: 1
3098
+ }),
3099
+ t("span", Gl, k(Y(ee.value)), 1)
3100
+ ])) : f("", !0)
3101
+ ])
3102
+ ])) : f("", !0)
3103
+ ])
3104
+ ])) : f("", !0)
3105
+ ]),
3106
+ _: 1
3107
+ }),
3108
+ D(he, { name: "overlay-fade" }, {
3109
+ default: $(() => [
3110
+ w.value && e.range && !g.value ? (a(), i("div", {
3111
+ key: 0,
3112
+ class: "range-overlay",
3113
+ onClick: R(me, ["self"])
3114
+ }, [
3115
+ t("div", Jl, [
3116
+ l[46] || (l[46] = t("p", { class: "range-modal-title" }, "選擇日期範圍", -1)),
3117
+ t("div", Ql, [
3118
+ (a(!0), i(N, null, F(At.value, (v) => (a(), i(N, {
3119
+ key: v.isLeft ? "left" : "right"
3120
+ }, [
3121
+ v.isLeft ? f("", !0) : (a(), i("div", Xl)),
3122
+ t("div", _l, [
3123
+ t("div", es, [
3124
+ t("div", ts, [
3125
+ v.isLeft ? (a(), L(B, {
3126
+ key: 0,
3127
+ variant: "ghost",
3128
+ square: "",
3129
+ onClick: nt
3130
+ }, {
3131
+ default: $(() => [...l[42] || (l[42] = [
3132
+ t("svg", {
3133
+ xmlns: "http://www.w3.org/2000/svg",
3134
+ width: "16",
3135
+ height: "16",
3136
+ viewBox: "0 0 24 24",
3137
+ fill: "none",
3138
+ stroke: "currentColor",
3139
+ "stroke-width": "2",
3140
+ "stroke-linecap": "round",
3141
+ "stroke-linejoin": "round"
3142
+ }, [
3143
+ t("path", { d: "m15 18-6-6 6-6" })
3144
+ ], -1)
3145
+ ])]),
3146
+ _: 1
3147
+ })) : (a(), i("div", ns))
3148
+ ]),
3149
+ t("div", os, k(C[v.month]) + " " + k(v.year), 1),
3150
+ t("div", as, [
3151
+ v.isLeft ? (a(), i("div", ls)) : (a(), L(B, {
3152
+ key: 0,
3153
+ variant: "ghost",
3154
+ square: "",
3155
+ onClick: ot
3156
+ }, {
3157
+ default: $(() => [...l[43] || (l[43] = [
3158
+ t("svg", {
3159
+ xmlns: "http://www.w3.org/2000/svg",
3160
+ width: "16",
3161
+ height: "16",
3162
+ viewBox: "0 0 24 24",
3163
+ fill: "none",
3164
+ stroke: "currentColor",
3165
+ "stroke-width": "2",
3166
+ "stroke-linecap": "round",
3167
+ "stroke-linejoin": "round"
3168
+ }, [
3169
+ t("path", { d: "m9 18 6-6-6-6" })
3170
+ ], -1)
3171
+ ])]),
3172
+ _: 1
3173
+ }))
3174
+ ])
3175
+ ]),
3176
+ t("div", ss, [
3177
+ (a(), i(N, null, F(O, (j) => t("span", {
3178
+ key: j,
3179
+ class: "weekday"
3180
+ }, k(j), 1)), 64))
3181
+ ]),
3182
+ t("div", is, [
3183
+ (a(!0), i(N, null, F(v.days, (j, U) => (a(), i("div", {
3184
+ key: U,
3185
+ class: S(["range-day", lt(j)]),
3186
+ onClick: (H) => at(j),
3187
+ onMouseenter: (H) => ne.value = j
3188
+ }, k(j.day), 43, rs))), 128))
3189
+ ])
3190
+ ])
3191
+ ], 64))), 128))
3192
+ ]),
3193
+ t("div", us, [
3194
+ t("div", ds, [
3195
+ t("span", {
3196
+ class: S([
3197
+ "range-val",
3198
+ { "is-empty": !Le.value }
3199
+ ])
3200
+ }, k(Le.value || "開始日期"), 3),
3201
+ l[44] || (l[44] = t("span", { class: "range-arrow" }, "→", -1)),
3202
+ t("span", {
3203
+ class: S([
3204
+ "range-val",
3205
+ { "is-empty": !Ie.value }
3206
+ ])
3207
+ }, k(Ie.value || "結束日期"), 3)
3208
+ ]),
3209
+ D(B, {
3210
+ variant: "solid",
3211
+ intent: "primary",
3212
+ class: "confirm-btn",
3213
+ disabled: !Xe.value,
3214
+ onClick: R(st, ["stop"])
3215
+ }, {
3216
+ default: $(() => [...l[45] || (l[45] = [
3217
+ z("確認", -1)
3218
+ ])]),
3219
+ _: 1
3220
+ }, 8, ["disabled"])
3221
+ ])
3222
+ ])
3223
+ ])) : f("", !0)
3224
+ ]),
3225
+ _: 1
3226
+ }),
3227
+ D(he, { name: "sheet-slide" }, {
3228
+ default: $(() => [
3229
+ w.value && e.range && g.value ? (a(), i("div", {
3230
+ key: 0,
3231
+ class: "mobile-overlay",
3232
+ onClick: R(me, ["self"])
3233
+ }, [
3234
+ t("div", cs, [
3235
+ l[51] || (l[51] = t("div", { class: "sheet-handle" }, null, -1)),
3236
+ l[52] || (l[52] = t("p", { class: "range-modal-title" }, "選擇日期範圍", -1)),
3237
+ t("div", vs, [
3238
+ t("div", hs, [
3239
+ D(B, {
3240
+ variant: "ghost",
3241
+ square: "",
3242
+ onClick: nt
3243
+ }, {
3244
+ default: $(() => [...l[47] || (l[47] = [
3245
+ t("svg", {
3246
+ xmlns: "http://www.w3.org/2000/svg",
3247
+ width: "16",
3248
+ height: "16",
3249
+ viewBox: "0 0 24 24",
3250
+ fill: "none",
3251
+ stroke: "currentColor",
3252
+ "stroke-width": "2",
3253
+ "stroke-linecap": "round",
3254
+ "stroke-linejoin": "round"
3255
+ }, [
3256
+ t("path", { d: "m15 18-6-6 6-6" })
3257
+ ], -1)
3258
+ ])]),
3259
+ _: 1
3260
+ })
3261
+ ]),
3262
+ t("div", fs, k(C[Q.value]) + " " + k(ce.value), 1),
3263
+ t("div", gs, [
3264
+ D(B, {
3265
+ variant: "ghost",
3266
+ square: "",
3267
+ onClick: ot
3268
+ }, {
3269
+ default: $(() => [...l[48] || (l[48] = [
3270
+ t("svg", {
3271
+ xmlns: "http://www.w3.org/2000/svg",
3272
+ width: "16",
3273
+ height: "16",
3274
+ viewBox: "0 0 24 24",
3275
+ fill: "none",
3276
+ stroke: "currentColor",
3277
+ "stroke-width": "2",
3278
+ "stroke-linecap": "round",
3279
+ "stroke-linejoin": "round"
3280
+ }, [
3281
+ t("path", { d: "m9 18 6-6-6-6" })
3282
+ ], -1)
3283
+ ])]),
3284
+ _: 1
3285
+ })
3286
+ ])
3287
+ ]),
3288
+ t("div", ms, [
3289
+ (a(), i(N, null, F(O, (v) => t("span", {
3290
+ key: v,
3291
+ class: "weekday"
3292
+ }, k(v), 1)), 64))
3293
+ ]),
3294
+ t("div", ws, [
3295
+ (a(!0), i(N, null, F(tt.value, (v, j) => (a(), i("div", {
3296
+ key: j,
3297
+ class: S(["range-day", lt(v)]),
3298
+ onClick: (U) => at(v)
3299
+ }, k(v.day), 11, ys))), 128))
3300
+ ]),
3301
+ t("div", ks, [
3302
+ t("div", ps, [
3303
+ t("span", {
3304
+ class: S([
3305
+ "range-val",
3306
+ { "is-empty": !Le.value }
3307
+ ])
3308
+ }, k(Le.value || "開始日期"), 3),
3309
+ l[49] || (l[49] = t("span", { class: "range-arrow" }, "→", -1)),
3310
+ t("span", {
3311
+ class: S([
3312
+ "range-val",
3313
+ { "is-empty": !Ie.value }
3314
+ ])
3315
+ }, k(Ie.value || "結束日期"), 3)
3316
+ ]),
3317
+ D(B, {
3318
+ variant: "solid",
3319
+ intent: "primary",
3320
+ class: "confirm-btn",
3321
+ disabled: !Xe.value,
3322
+ onClick: R(st, ["stop"])
3323
+ }, {
3324
+ default: $(() => [...l[50] || (l[50] = [
3325
+ z("確認", -1)
3326
+ ])]),
3327
+ _: 1
3328
+ }, 8, ["disabled"])
3329
+ ])
3330
+ ])
3331
+ ])) : f("", !0)
3332
+ ]),
3333
+ _: 1
3334
+ })
3335
+ ], 512));
3336
+ }
3337
+ }), xi = /* @__PURE__ */ E(bs, [["__scopeId", "data-v-1511ddb7"]]), xs = /* @__PURE__ */ A({
3338
+ __name: "NTooltip",
3339
+ props: {
3340
+ content: { default: "" },
3341
+ position: { default: "top" },
3342
+ disabled: { type: Boolean, default: !1 }
3343
+ },
3344
+ setup(e) {
3345
+ const n = T(!1);
3346
+ let o = null;
3347
+ const s = () => {
3348
+ e.disabled || (o && (clearTimeout(o), o = null), n.value = !0);
3349
+ }, r = () => {
3350
+ e.disabled || (o = setTimeout(() => {
3351
+ n.value = !1;
3352
+ }, 100));
3353
+ };
3354
+ return (d, h) => (a(), i("div", {
3355
+ class: "tooltip",
3356
+ onMouseenter: s,
3357
+ onMouseleave: r,
3358
+ onFocusin: s,
3359
+ onFocusout: r
3360
+ }, [
3361
+ I(d.$slots, "default", {}, void 0, !0),
3362
+ D(he, { name: "fade" }, {
3363
+ default: $(() => [
3364
+ n.value ? (a(), i("div", {
3365
+ key: 0,
3366
+ class: S(["content", [e.position]]),
3367
+ role: "tooltip",
3368
+ onMouseenter: s,
3369
+ onMouseleave: r
3370
+ }, [
3371
+ I(d.$slots, "content", {}, () => [
3372
+ z(k(e.content), 1)
3373
+ ], !0),
3374
+ t("div", {
3375
+ class: S(["arrow", [e.position]])
3376
+ }, null, 2)
3377
+ ], 34)) : f("", !0)
3378
+ ]),
3379
+ _: 3
3380
+ })
3381
+ ], 32));
3382
+ }
3383
+ }), $i = /* @__PURE__ */ E(xs, [["__scopeId", "data-v-7a53ca0a"]]), $s = { class: "modal-header" }, Cs = { class: "modal-title" }, Ms = { class: "modal-content" }, Bs = {
3384
+ key: 0,
3385
+ class: "modal-footer"
3386
+ }, Ss = /* @__PURE__ */ A({
3387
+ __name: "NModal",
3388
+ props: {
3389
+ show: { type: Boolean, default: !1 },
3390
+ title: { default: "" },
3391
+ width: { default: "500px" },
3392
+ closeOnClickOverlay: { type: Boolean, default: !0 },
3393
+ showClose: { type: Boolean, default: !0 },
3394
+ zIndex: { default: 1e3 }
3395
+ },
3396
+ emits: ["update:show", "close", "open"],
3397
+ setup(e, { emit: n }) {
3398
+ const o = n, s = () => {
3399
+ o("update:show", !1), o("close");
3400
+ }, r = () => {
3401
+ e.closeOnClickOverlay && s();
3402
+ }, d = T("");
3403
+ return He(
3404
+ () => e.show,
3405
+ (h) => {
3406
+ h ? (d.value = document.body.style.overflow, document.body.style.overflow = "hidden", o("open")) : document.body.style.overflow = d.value;
3407
+ },
3408
+ { immediate: !0 }
3409
+ ), kt(() => {
3410
+ e.show && (document.body.style.overflow = d.value);
3411
+ }), (h, p) => (a(), L(Re, { to: "body" }, [
3412
+ D(he, { name: "modal-fade" }, {
3413
+ default: $(() => [
3414
+ e.show ? (a(), i("div", {
3415
+ key: 0,
3416
+ class: "modal-overlay",
3417
+ style: fe({ zIndex: e.zIndex }),
3418
+ onClick: R(r, ["self"])
3419
+ }, [
3420
+ t("div", {
3421
+ class: "modal-container",
3422
+ style: fe({ width: e.width })
3423
+ }, [
3424
+ t("header", $s, [
3425
+ t("h3", Cs, k(e.title), 1),
3426
+ e.showClose ? (a(), i("button", {
3427
+ key: 0,
3428
+ class: "close-btn",
3429
+ onClick: s
3430
+ }, [...p[0] || (p[0] = [
3431
+ t("svg", {
3432
+ viewBox: "0 0 24 24",
3433
+ width: "20",
3434
+ height: "20"
3435
+ }, [
3436
+ t("path", {
3437
+ fill: "currentColor",
3438
+ d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"
3439
+ })
3440
+ ], -1)
3441
+ ])])) : f("", !0)
3442
+ ]),
3443
+ t("main", Ms, [
3444
+ I(h.$slots, "default", {}, void 0, !0)
3445
+ ]),
3446
+ h.$slots.footer ? (a(), i("footer", Bs, [
3447
+ I(h.$slots, "footer", {}, void 0, !0)
3448
+ ])) : f("", !0)
3449
+ ], 4)
3450
+ ], 4)) : f("", !0)
3451
+ ]),
3452
+ _: 3
3453
+ })
3454
+ ]));
3455
+ }
3456
+ }), Ci = /* @__PURE__ */ E(Ss, [["__scopeId", "data-v-ee2fac3c"]]);
3457
+ let gt = 0;
3458
+ const xe = Pe([]);
3459
+ function Ds() {
3460
+ const e = function(r, d = {}) {
3461
+ const h = ++gt;
3462
+ return new Promise((p) => {
3463
+ xe.push({
3464
+ id: h,
3465
+ type: "alert",
3466
+ message: r,
3467
+ resolve: () => p(),
3468
+ status: d.status ?? "info",
3469
+ title: d.title ?? "",
3470
+ confirmText: d.confirmText ?? "確定"
3471
+ });
3472
+ });
3473
+ };
3474
+ e.success = (s, r = {}) => e(s, { ...r, status: "success" }), e.warning = (s, r = {}) => e(s, { ...r, status: "warning" }), e.danger = (s, r = {}) => e(s, { ...r, status: "danger" }), e.info = (s, r = {}) => e(s, { ...r, status: "info" });
3475
+ function n(s, r = {}) {
3476
+ return new Promise((d) => {
3477
+ const h = ++gt;
3478
+ xe.push({
3479
+ id: h,
3480
+ type: "confirm",
3481
+ message: s,
3482
+ resolve: d,
3483
+ status: r.status ?? "question",
3484
+ title: r.title ?? "",
3485
+ confirmText: r.confirmText ?? "確定",
3486
+ cancelText: r.cancelText ?? "取消"
3487
+ });
3488
+ });
3489
+ }
3490
+ function o() {
3491
+ for (; xe.length > 0; )
3492
+ xe.shift().resolve(!1);
3493
+ }
3494
+ return { alerts: xe, alert: e, confirm: n, clearAlerts: o };
3495
+ }
3496
+ const Ns = { class: "cards-wrapper" }, Ts = ["innerHTML"], Vs = { class: "card-body" }, js = {
3497
+ key: 0,
3498
+ class: "card-title"
3499
+ }, Ls = { class: "card-message" }, Is = { class: "card-footer" }, As = ["onClick"], Es = ["onClick"], Rs = /* @__PURE__ */ A({
3500
+ __name: "NAlert",
3501
+ setup(e) {
3502
+ const { alerts: n, clearAlerts: o } = Ds(), s = {
3503
+ success: '<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M20 6 9 17l-5-5"/></svg>',
3504
+ warning: '<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>',
3505
+ danger: '<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>',
3506
+ info: '<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>',
3507
+ question: '<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/></svg>'
3508
+ };
3509
+ function r(b) {
3510
+ return s[b.status] ?? s.question;
3511
+ }
3512
+ function d(b) {
3513
+ const g = n.length, c = g - 1 - b, m = b === g - 1, C = 1 - c * 0.04, O = -c * 12, Z = 1 - c * 0.25;
3514
+ return {
3515
+ position: m ? "relative" : "absolute",
3516
+ top: m ? "auto" : "0",
3517
+ left: m ? "auto" : "0",
3518
+ transform: `scale(${C}) translateY(${O}px)`,
3519
+ opacity: Math.max(Z, 0.3),
3520
+ zIndex: b + 1,
3521
+ pointerEvents: m ? "auto" : "none"
3522
+ };
3523
+ }
3524
+ function h(b) {
3525
+ const g = n.findIndex((c) => c.id === b.id);
3526
+ g !== -1 && n.splice(g, 1), b.resolve(!0);
3527
+ }
3528
+ function p(b) {
3529
+ const g = n.findIndex((c) => c.id === b.id);
3530
+ g !== -1 && n.splice(g, 1), b.resolve(!1);
3531
+ }
3532
+ function w(b) {
3533
+ if (n.length === 0) return;
3534
+ const g = n[n.length - 1];
3535
+ g && (b.key === "Enter" ? (b.preventDefault(), h(g)) : b.key === "Escape" && (b.preventDefault(), g.type === "confirm" ? p(g) : h(g)));
3536
+ }
3537
+ return Ce(() => document.addEventListener("keydown", w)), kt(() => {
3538
+ document.removeEventListener("keydown", w), o();
3539
+ }), (b, g) => (a(), L(Re, { to: "body" }, [
3540
+ t("div", {
3541
+ class: S(["backdrop", { open: ae(n).length > 0 }])
3542
+ }, null, 2),
3543
+ t("div", {
3544
+ class: S(["alert-stack", { open: ae(n).length > 0 }])
3545
+ }, [
3546
+ t("div", Ns, [
3547
+ (a(!0), i(N, null, F(ae(n), (c, m) => (a(), i("div", {
3548
+ key: c.id,
3549
+ class: S(["alert-card", `status-${c.status}`]),
3550
+ style: fe(d(m))
3551
+ }, [
3552
+ t("div", {
3553
+ class: "card-icon",
3554
+ innerHTML: r(c)
3555
+ }, null, 8, Ts),
3556
+ t("div", Vs, [
3557
+ c.title ? (a(), i("p", js, k(c.title), 1)) : f("", !0),
3558
+ t("p", Ls, k(c.message), 1)
3559
+ ]),
3560
+ t("div", Is, [
3561
+ c.type === "confirm" ? (a(), i("button", {
3562
+ key: 0,
3563
+ class: "btn btn-cancel",
3564
+ onClick: (C) => p(c)
3565
+ }, k(c.cancelText), 9, As)) : f("", !0),
3566
+ t("button", {
3567
+ class: S(["btn btn-confirm", `btn-${c.status}`]),
3568
+ onClick: (C) => h(c)
3569
+ }, k(c.confirmText), 11, Es)
3570
+ ])
3571
+ ], 6))), 128))
3572
+ ])
3573
+ ], 2)
3574
+ ]));
3575
+ }
3576
+ }), Mi = /* @__PURE__ */ E(Rs, [["__scopeId", "data-v-dd6fc0e6"]]), Fs = { class: "nav" }, zs = ["onClick"], Os = ["innerHTML"], Hs = { class: "nav-list" }, Ps = ["href", "onClick"], Us = ["innerHTML"], Ys = { class: "nav-text" }, qs = { class: "user-capsule" }, Ks = /* @__PURE__ */ A({
3577
+ __name: "NSidebar",
3578
+ props: {
3579
+ isOpen: { type: Boolean, default: !1 },
3580
+ menus: {}
3581
+ },
3582
+ emits: ["update:isOpen", "logout"],
3583
+ setup(e, { emit: n }) {
3584
+ const { isMenuExpanded: o, toggleMenu: s } = qe(), r = T(!1), d = Yo(), h = n, p = (g) => {
3585
+ const c = d.currentRoute.value.path;
3586
+ return g.children?.some(
3587
+ (m) => m.route === c
3588
+ );
3589
+ }, w = (g) => d.currentRoute.value.path === g, b = (g) => {
3590
+ if (d.currentRoute.value.path === g)
3591
+ return;
3592
+ if (!d.getRoutes().some((m) => m.path === g)) {
3593
+ alert(`Route path "${g}" does not exist.`), console.error(`Route path "${g}" does not exist.`);
3594
+ return;
3595
+ }
3596
+ d.push(g);
3597
+ };
3598
+ return (g, c) => (a(), i("nav", {
3599
+ class: S(["sidebar", {
3600
+ open: e.isOpen,
3601
+ "hover-expanded": r.value
3602
+ }]),
3603
+ onMouseleave: c[4] || (c[4] = (m) => r.value = !1)
3604
+ }, [
3605
+ t("div", {
3606
+ class: "arrow",
3607
+ onClick: c[0] || (c[0] = (m) => h("update:isOpen", !e.isOpen))
3608
+ }, [...c[5] || (c[5] = [
3609
+ t("div", { class: "icon" }, [
3610
+ t("svg", {
3611
+ xmlns: "http://www.w3.org/2000/svg",
3612
+ width: "18",
3613
+ height: "18",
3614
+ viewBox: "0 0 24 24",
3615
+ fill: "none",
3616
+ stroke: "currentColor",
3617
+ "stroke-width": "2",
3618
+ "stroke-linecap": "round",
3619
+ "stroke-linejoin": "round"
3620
+ }, [
3621
+ t("path", { d: "m9 18 6-6-6-6" })
3622
+ ])
3623
+ ], -1)
3624
+ ])]),
3625
+ t("div", {
3626
+ class: "content",
3627
+ onMouseenter: c[2] || (c[2] = (m) => r.value = !0)
3628
+ }, [
3629
+ c[9] || (c[9] = t("div", { class: "header" }, [
3630
+ t("div", { class: "brand-logo" }, [
3631
+ t("span", { class: "logo-text" }, "NICKLABS"),
3632
+ t("span", { class: "logo-icon" }, "N")
3633
+ ])
3634
+ ], -1)),
3635
+ t("div", Fs, [
3636
+ (a(!0), i(N, null, F(e.menus, (m) => (a(), i("div", {
3637
+ class: S(["menu", {
3638
+ open: ae(o)(m.title),
3639
+ active: p(m)
3640
+ }])
3641
+ }, [
3642
+ t("div", {
3643
+ class: "title",
3644
+ onClick: (C) => ae(s)(m.title)
3645
+ }, [
3646
+ t("div", null, [
3647
+ t("div", {
3648
+ innerHTML: m.icon
3649
+ }, null, 8, Os),
3650
+ t("span", null, k(m.title), 1)
3651
+ ]),
3652
+ c[6] || (c[6] = t("svg", {
3653
+ xmlns: "http://www.w3.org/2000/svg",
3654
+ width: "14",
3655
+ height: "14",
3656
+ viewBox: "0 0 24 24",
3657
+ fill: "none",
3658
+ stroke: "currentColor",
3659
+ "stroke-width": "2",
3660
+ "stroke-linecap": "round",
3661
+ "stroke-linejoin": "round",
3662
+ class: "icon"
3663
+ }, [
3664
+ t("path", { d: "m9 18 6-6-6-6" })
3665
+ ], -1))
3666
+ ], 8, zs),
3667
+ t("div", Hs, [
3668
+ t("div", null, [
3669
+ (a(!0), i(N, null, F(m.children, (C) => (a(), i("a", {
3670
+ href: C.route,
3671
+ onClick: R((O) => b(C.route), ["prevent"])
3672
+ }, [
3673
+ t("div", {
3674
+ class: S(["nav-item", {
3675
+ active: w(C.route)
3676
+ }])
3677
+ }, [
3678
+ t("div", {
3679
+ innerHTML: C.icon
3680
+ }, null, 8, Us),
3681
+ t("span", Ys, k(C.title), 1)
3682
+ ], 2)
3683
+ ], 8, Ps))), 256))
3684
+ ])
3685
+ ])
3686
+ ], 2))), 256))
3687
+ ]),
3688
+ t("div", qs, [
3689
+ c[8] || (c[8] = Gt('<div class="user-avatar" data-v-bb988f83><img src="https://api.dicebear.com/7.x/pixel-art/svg?seed=Nick" alt="User Avatar" data-v-bb988f83></div><div class="user-info" data-v-bb988f83><div class="user-name-row" data-v-bb988f83><span class="user-name" data-v-bb988f83>Nick Huang</span></div></div>', 2)),
3690
+ D(B, {
3691
+ class: "logout-btn",
3692
+ intent: "error",
3693
+ variant: "ghost",
3694
+ "radius-size": "full",
3695
+ padding: "12px",
3696
+ onClick: c[1] || (c[1] = (m) => h("logout"))
3697
+ }, {
3698
+ default: $(() => [...c[7] || (c[7] = [
3699
+ t("svg", {
3700
+ xmlns: "http://www.w3.org/2000/svg",
3701
+ width: "18",
3702
+ height: "18",
3703
+ viewBox: "0 0 24 24",
3704
+ fill: "none",
3705
+ stroke: "currentColor",
3706
+ "stroke-width": "2",
3707
+ "stroke-linecap": "round",
3708
+ "stroke-linejoin": "round"
3709
+ }, [
3710
+ t("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
3711
+ t("polyline", { points: "16 17 21 12 16 7" }),
3712
+ t("line", {
3713
+ x1: "21",
3714
+ y1: "12",
3715
+ x2: "9",
3716
+ y2: "12"
3717
+ })
3718
+ ], -1)
3719
+ ])]),
3720
+ _: 1
3721
+ })
3722
+ ])
3723
+ ], 32),
3724
+ (a(), L(Re, { to: "body" }, [
3725
+ t("div", {
3726
+ class: S(["overlay", {
3727
+ active: e.isOpen
3728
+ }]),
3729
+ onClick: c[3] || (c[3] = (m) => h("update:isOpen", !e.isOpen))
3730
+ }, null, 2)
3731
+ ]))
3732
+ ], 34));
3733
+ }
3734
+ }), Ws = /* @__PURE__ */ E(Ks, [["__scopeId", "data-v-bb988f83"]]), Zs = { class: "layout" }, Gs = { class: "main-content" }, Js = /* @__PURE__ */ A({
3735
+ __name: "NLayout",
3736
+ props: {
3737
+ isShowSidebar: { type: Boolean, default: !0 },
3738
+ menus: {}
3739
+ },
3740
+ emits: ["logout"],
3741
+ setup(e, { emit: n }) {
3742
+ const o = qe();
3743
+ return (s, r) => (a(), i("div", Zs, [
3744
+ e.isShowSidebar ? (a(), L(Ws, {
3745
+ key: 0,
3746
+ isOpen: ae(o).isSidebarExpanded(),
3747
+ "onUpdate:isOpen": r[0] || (r[0] = (d) => ae(o).toggleSidebar()),
3748
+ menus: e.menus,
3749
+ onLogout: r[1] || (r[1] = () => {
3750
+ s.$router.push({ name: "login" });
3751
+ })
3752
+ }, null, 8, ["isOpen", "menus"])) : f("", !0),
3753
+ t("main", Gs, [
3754
+ I(s.$slots, "default", {}, void 0, !0),
3755
+ r[2] || (r[2] = t("div", { class: "copyright" }, " copyright © 2026 NickLabs. All rights reserved. ", -1))
3756
+ ])
3757
+ ]));
3758
+ }
3759
+ }), Bi = /* @__PURE__ */ E(Js, [["__scopeId", "data-v-e5b1a071"]]), Qs = { class: "topbar" }, Xs = { class: "topbar-left" }, _s = { class: "topbar-right" }, ei = {
3760
+ key: 0,
3761
+ class: "pill"
3762
+ }, ti = {
3763
+ key: 0,
3764
+ class: "name"
3765
+ }, ni = {
3766
+ key: 1,
3767
+ class: "separator"
3768
+ }, oi = /* @__PURE__ */ A({
3769
+ __name: "NNavigation",
3770
+ props: {
3771
+ isShowSidebar: { type: Boolean, default: !0 },
3772
+ isShowFullscreen: { type: Boolean, default: !0 },
3773
+ isShowUser: { type: Boolean, default: !0 },
3774
+ isShowLogoutButton: { type: Boolean, default: !0 }
3775
+ },
3776
+ emits: ["toggleSidebar", "logout"],
3777
+ setup(e, { emit: n }) {
3778
+ const o = n, s = () => {
3779
+ document.fullscreenElement ? document.exitFullscreen?.() : document.documentElement.requestFullscreen();
3780
+ };
3781
+ return (r, d) => (a(), i("header", Qs, [
3782
+ t("div", Xs, [
3783
+ e.isShowSidebar ? (a(), L(B, {
3784
+ key: 0,
3785
+ onClick: d[0] || (d[0] = (h) => o("toggleSidebar")),
3786
+ padding: "8px"
3787
+ }, {
3788
+ default: $(() => [...d[2] || (d[2] = [
3789
+ t("svg", {
3790
+ xmlns: "http://www.w3.org/2000/svg",
3791
+ width: "24",
3792
+ height: "24",
3793
+ viewBox: "0 0 24 24",
3794
+ fill: "none",
3795
+ stroke: "currentColor",
3796
+ "stroke-width": "2",
3797
+ "stroke-linecap": "round",
3798
+ "stroke-linejoin": "round"
3799
+ }, [
3800
+ t("path", { d: "M4 5h16" }),
3801
+ t("path", { d: "M4 12h16" }),
3802
+ t("path", { d: "M4 19h16" })
3803
+ ], -1)
3804
+ ])]),
3805
+ _: 1
3806
+ })) : f("", !0),
3807
+ e.isShowFullscreen ? (a(), L(B, {
3808
+ key: 1,
3809
+ padding: "8px",
3810
+ onClick: R(s, ["prevent"])
3811
+ }, {
3812
+ default: $(() => [...d[3] || (d[3] = [
3813
+ t("svg", {
3814
+ xmlns: "http://www.w3.org/2000/svg",
3815
+ width: "24",
3816
+ height: "24",
3817
+ viewBox: "0 0 24 24",
3818
+ fill: "none",
3819
+ stroke: "currentColor",
3820
+ "stroke-width": "2",
3821
+ "stroke-linecap": "round",
3822
+ "stroke-linejoin": "round"
3823
+ }, [
3824
+ t("path", { d: "M8 3H5a2 2 0 0 0-2 2v3" }),
3825
+ t("path", { d: "M21 8V5a2 2 0 0 0-2-2h-3" }),
3826
+ t("path", { d: "M3 16v3a2 2 0 0 0 2 2h3" }),
3827
+ t("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
3828
+ ], -1)
3829
+ ])]),
3830
+ _: 1
3831
+ })) : f("", !0)
3832
+ ]),
3833
+ t("div", _s, [
3834
+ e.isShowUser || e.isShowLogoutButton ? (a(), i("div", ei, [
3835
+ e.isShowUser ? (a(), i("span", ti, "Nick")) : f("", !0),
3836
+ e.isShowUser && e.isShowLogoutButton ? (a(), i("div", ni)) : f("", !0),
3837
+ e.isShowLogoutButton ? (a(), L(B, {
3838
+ key: 2,
3839
+ variant: "mute",
3840
+ intent: "error",
3841
+ onClick: d[1] || (d[1] = R((h) => o("logout"), ["prevent"]))
3842
+ }, {
3843
+ default: $(() => [...d[4] || (d[4] = [
3844
+ t("svg", {
3845
+ xmlns: "http://www.w3.org/2000/svg",
3846
+ width: "14",
3847
+ height: "14",
3848
+ viewBox: "0 0 24 24",
3849
+ fill: "none",
3850
+ stroke: "currentColor",
3851
+ "stroke-width": "2",
3852
+ "stroke-linecap": "round",
3853
+ "stroke-linejoin": "round"
3854
+ }, [
3855
+ t("path", { d: "m16 17 5-5-5-5" }),
3856
+ t("path", { d: "M21 12H9" }),
3857
+ t("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" })
3858
+ ], -1),
3859
+ z(" 登出 ", -1)
3860
+ ])]),
3861
+ _: 1
3862
+ })) : f("", !0)
3863
+ ])) : f("", !0)
3864
+ ])
3865
+ ]));
3866
+ }
3867
+ }), Si = /* @__PURE__ */ E(oi, [["__scopeId", "data-v-bb912f40"]]), ai = { class: "brand" }, li = ["src", "alt"], si = {
3868
+ key: 1,
3869
+ class: "icon"
3870
+ }, ii = { key: 2 }, ri = { key: 3 }, ui = /* @__PURE__ */ A({
3871
+ __name: "NLoginLayout",
3872
+ props: {
3873
+ backgroundImage: { default: "" },
3874
+ logo: { default: "" },
3875
+ title: { default: "" },
3876
+ description: { default: "" }
3877
+ },
3878
+ setup(e) {
3879
+ const n = M(
3880
+ () => !!e.logo && (e.logo.startsWith("http") || e.logo.startsWith("/"))
3881
+ );
3882
+ return (o, s) => (a(), i("div", {
3883
+ class: "login-wrapper",
3884
+ style: fe({
3885
+ "--login-bg": e.backgroundImage ? `url('${e.backgroundImage}')` : "var(--bg-gradient)"
3886
+ })
3887
+ }, [
3888
+ D(Vt, {
3889
+ size: "lg",
3890
+ radius: "xl",
3891
+ class: "card"
3892
+ }, {
3893
+ default: $(() => [
3894
+ t("div", ai, [
3895
+ n.value ? (a(), i("img", {
3896
+ key: 0,
3897
+ class: "logo-img",
3898
+ src: e.logo,
3899
+ alt: e.title
3900
+ }, null, 8, li)) : (a(), i("div", si, k(e.logo), 1)),
3901
+ e.title ? (a(), i("h1", ii, k(e.title), 1)) : f("", !0),
3902
+ e.description ? (a(), i("p", ri, k(e.description), 1)) : f("", !0)
3903
+ ]),
3904
+ I(o.$slots, "default", {}, void 0, !0)
3905
+ ]),
3906
+ _: 3
3907
+ })
3908
+ ], 4));
3909
+ }
3910
+ }), Di = /* @__PURE__ */ E(ui, [["__scopeId", "data-v-f0866bc5"]]);
3911
+ export {
3912
+ Mi as NAlert,
3913
+ B as NButton,
3914
+ Vt as NCard,
3915
+ ut as NCheckbox,
3916
+ ki as NCode,
3917
+ xi as NDatePicker,
3918
+ ga as NEmpty,
3919
+ fi as NFileSelect,
3920
+ gi as NForm,
3921
+ ci as NInput,
3922
+ Bi as NLayout,
3923
+ mi as NList,
3924
+ yi as NLoading,
3925
+ Di as NLoginLayout,
3926
+ Ci as NModal,
3927
+ Si as NNavigation,
3928
+ hi as NSelect,
3929
+ Ws as NSidebar,
3930
+ pi as NSwitch,
3931
+ Fa as NTable,
3932
+ bi as NTag,
3933
+ vi as NTextarea,
3934
+ wi as NToast,
3935
+ $i as NTooltip,
3936
+ Ds as useAlert,
3937
+ qe as useSidebarManager,
3938
+ Ua as useToast
3939
+ };