@nhdropshipping/y-components 1.0.53 → 1.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as we, computed as q, createElementBlock as u, openBlock as s, normalizeClass as H, createElementVNode as l, renderSlot as ue, Fragment as ce, renderList as ge, createCommentVNode as R, toDisplayString as se, ref as z, watch as ae, normalizeStyle as fe, withKeys as ke, nextTick as re, onMounted as Ce, onUnmounted as Be, resolveComponent as Ve, createVNode as ve, Transition as $e, withCtx as he, createTextVNode as De, createBlock as Ie, withModifiers as te, withDirectives as Ee, vModelText as at, Teleport as Fe, vShow as Ke, provide as st, reactive as it, onBeforeUnmount as Ge, TransitionGroup as rt, resolveDynamicComponent as ut, mergeProps as dt, toHandlers as ct, render as et } from "vue";
1
+ import { defineComponent as we, computed as q, createElementBlock as u, openBlock as s, normalizeClass as H, createElementVNode as l, renderSlot as ue, Fragment as ce, renderList as ge, createCommentVNode as R, toDisplayString as se, ref as z, watch as ae, normalizeStyle as fe, withKeys as ke, nextTick as re, onMounted as Ce, onUnmounted as Be, resolveComponent as Ve, createVNode as ve, Transition as $e, withCtx as he, createTextVNode as De, createBlock as Me, withModifiers as te, withDirectives as Ee, vModelText as at, Teleport as Fe, vShow as Ke, provide as st, reactive as it, onBeforeUnmount as Ge, TransitionGroup as rt, resolveDynamicComponent as ut, mergeProps as dt, toHandlers as ct, render as et } from "vue";
2
2
  const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "content" }, ht = {
3
3
  key: 1,
4
4
  class: "y-btn-group",
@@ -28,9 +28,9 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
28
28
  groupItems: { default: void 0 }
29
29
  },
30
30
  emits: ["click", "group-click"],
31
- setup(t, { emit: D }) {
32
- const e = t, n = D;
33
- function g(C) {
31
+ setup(t, { emit: x }) {
32
+ const e = t, n = x;
33
+ function m(C) {
34
34
  if (e.disabled || e.loading) {
35
35
  C.preventDefault(), C.stopPropagation();
36
36
  return;
@@ -48,48 +48,48 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
48
48
  default:
49
49
  return "group-pos-single";
50
50
  }
51
- }), h = q(() => Array.isArray(e.groupItems) && e.groupItems.length > 0);
52
- function S(C, B) {
51
+ }), p = q(() => Array.isArray(e.groupItems) && e.groupItems.length > 0);
52
+ function I(C, B) {
53
53
  if (e.disabled || e.loading || C.disabled || C.loading) {
54
54
  B.preventDefault(), B.stopPropagation();
55
55
  return;
56
56
  }
57
57
  n("group-click", C.value, B);
58
58
  }
59
- return (C, B) => h.value ? (s(), u("div", ht, [
60
- (s(!0), u(ce, null, ge(t.groupItems, (x, m) => {
61
- var w;
59
+ return (C, B) => p.value ? (s(), u("div", ht, [
60
+ (s(!0), u(ce, null, ge(t.groupItems, ($, w) => {
61
+ var g;
62
62
  return s(), u("button", {
63
- key: x.value ?? m,
63
+ key: $.value ?? w,
64
64
  class: H(["y-btn", [
65
- `y-btn--${x.variant ?? t.variant}`,
66
- `y-btn--${x.size ?? t.size}`,
65
+ `y-btn--${$.variant ?? t.variant}`,
66
+ `y-btn--${$.size ?? t.size}`,
67
67
  "is-grouped",
68
- m === 0 ? "group-pos-start" : m === (((w = t.groupItems) == null ? void 0 : w.length) || 0) - 1 ? "group-pos-end" : "group-pos-middle",
69
- { "is-loading": x.loading || t.loading }
68
+ w === 0 ? "group-pos-start" : w === (((g = t.groupItems) == null ? void 0 : g.length) || 0) - 1 ? "group-pos-end" : "group-pos-middle",
69
+ { "is-loading": $.loading || t.loading }
70
70
  ]]),
71
71
  type: t.htmlType,
72
- disabled: (x.disabled ?? !1) || t.disabled || t.loading || x.loading,
73
- "aria-busy": x.loading || t.loading ? "true" : "false",
74
- "aria-disabled": (x.disabled ?? !1) || t.disabled || t.loading || x.loading ? "true" : "false",
75
- "aria-label": x.ariaLabel || x.label,
76
- onClick: (k) => S(x, k)
72
+ disabled: ($.disabled ?? !1) || t.disabled || t.loading || $.loading,
73
+ "aria-busy": $.loading || t.loading ? "true" : "false",
74
+ "aria-disabled": ($.disabled ?? !1) || t.disabled || t.loading || $.loading ? "true" : "false",
75
+ "aria-label": $.ariaLabel || $.label,
76
+ onClick: (b) => I($, b)
77
77
  }, [
78
78
  l("span", yt, [
79
- x.icon === "chevron-left" ? (s(), u("svg", gt, [...B[0] || (B[0] = [
79
+ $.icon === "chevron-left" ? (s(), u("svg", gt, [...B[0] || (B[0] = [
80
80
  l("path", {
81
81
  "fill-rule": "evenodd",
82
82
  d: "M12.78 15.22a.75.75 0 01-1.06 0l-5-5a.75.75 0 010-1.06l5-5a.75.75 0 111.06 1.06L8.81 10l3.97 3.97a.75.75 0 010 1.06z",
83
83
  "clip-rule": "evenodd"
84
84
  }, null, -1)
85
- ])])) : x.icon === "chevron-right" ? (s(), u("svg", mt, [...B[1] || (B[1] = [
85
+ ])])) : $.icon === "chevron-right" ? (s(), u("svg", mt, [...B[1] || (B[1] = [
86
86
  l("path", {
87
87
  "fill-rule": "evenodd",
88
88
  d: "M7.22 4.78a.75.75 0 011.06 0l5 5a.75.75 0 010 1.06l-5 5a.75.75 0 11-1.06-1.06L11.19 10 7.22 6.03a.75.75 0 010-1.06z",
89
89
  "clip-rule": "evenodd"
90
90
  }, null, -1)
91
91
  ])])) : R("", !0),
92
- x.label && !x.onlyIcon ? (s(), u("span", wt, se(x.label), 1)) : R("", !0)
92
+ $.label && !$.onlyIcon ? (s(), u("span", wt, se($.label), 1)) : R("", !0)
93
93
  ])
94
94
  ], 10, pt);
95
95
  }), 128))
@@ -106,17 +106,17 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
106
106
  disabled: t.disabled || t.loading,
107
107
  "aria-busy": t.loading ? "true" : "false",
108
108
  "aria-disabled": t.disabled || t.loading ? "true" : "false",
109
- onClick: g
109
+ onClick: m
110
110
  }, [
111
111
  l("span", vt, [
112
112
  ue(C.$slots, "default", {}, void 0, !0)
113
113
  ])
114
114
  ], 10, ft));
115
115
  }
116
- }), be = (t, D) => {
116
+ }), be = (t, x) => {
117
117
  const e = t.__vccOpts || t;
118
- for (const [n, g] of D)
119
- e[n] = g;
118
+ for (const [n, m] of x)
119
+ e[n] = m;
120
120
  return e;
121
121
  }, Ne = /* @__PURE__ */ be(bt, [["__scopeId", "data-v-53157673"]]), kt = ["id", "name", "type", "placeholder", "autocomplete", "inputmode", "min", "max", "disabled", "required", "value"], xt = /* @__PURE__ */ we({
122
122
  __name: "yinput",
@@ -138,30 +138,30 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
138
138
  clearOnFocus: { type: Boolean, default: !1 }
139
139
  },
140
140
  emits: ["update:modelValue", "enter", "paste"],
141
- setup(t, { emit: D }) {
142
- const e = t, n = D, g = z(null), v = z(""), h = z(!1), S = z(!1), C = z(e.placeholder || "");
141
+ setup(t, { emit: x }) {
142
+ const e = t, n = x, m = z(null), v = z(""), p = z(!1), I = z(!1), C = z(e.placeholder || "");
143
143
  ae(() => e.placeholder, (A) => {
144
- S.value || (C.value = A || "");
144
+ I.value || (C.value = A || "");
145
145
  });
146
146
  function B(A) {
147
147
  const U = A.target;
148
- h.value = !0, n("update:modelValue", U.value);
148
+ p.value = !0, n("update:modelValue", U.value);
149
149
  }
150
- function x() {
151
- S.value = !0, e.clearOnFocus && (v.value = e.modelValue || "", h.value = !1, C.value = v.value || e.placeholder || "", n("update:modelValue", ""));
150
+ function $() {
151
+ I.value = !0, e.clearOnFocus && (v.value = e.modelValue || "", p.value = !1, C.value = v.value || e.placeholder || "", n("update:modelValue", ""));
152
152
  }
153
- function m() {
154
- if (S.value = !1, e.clearOnFocus && !h.value && (!e.modelValue || e.modelValue === "") && n("update:modelValue", v.value), e.min !== void 0 && e.modelValue !== void 0 && e.modelValue !== "") {
153
+ function w() {
154
+ if (I.value = !1, e.clearOnFocus && !p.value && (!e.modelValue || e.modelValue === "") && n("update:modelValue", v.value), e.min !== void 0 && e.modelValue !== void 0 && e.modelValue !== "") {
155
155
  const A = Number(e.modelValue), U = Number(e.min);
156
156
  !Number.isNaN(A) && !Number.isNaN(U) && A < U && n("update:modelValue", String(U));
157
157
  }
158
158
  C.value = e.placeholder || "";
159
159
  }
160
- function w(A) {
160
+ function g(A) {
161
161
  const U = A.target;
162
162
  n("enter", U.value);
163
163
  }
164
- function k(A) {
164
+ function b(A) {
165
165
  const U = A.target;
166
166
  requestAnimationFrame(() => {
167
167
  n("paste", U.value);
@@ -173,7 +173,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
173
173
  }, [
174
174
  l("input", {
175
175
  ref_key: "inputRef",
176
- ref: g,
176
+ ref: m,
177
177
  class: H(["y-input", `y-input--${t.size}`]),
178
178
  id: t.id,
179
179
  name: t.name,
@@ -187,23 +187,23 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
187
187
  required: t.required,
188
188
  value: t.modelValue,
189
189
  onInput: B,
190
- onFocus: x,
191
- onBlur: m,
192
- onKeyup: ke(w, ["enter"]),
193
- onPaste: k
190
+ onFocus: $,
191
+ onBlur: w,
192
+ onKeyup: ke(g, ["enter"]),
193
+ onPaste: b
194
194
  }, null, 42, kt)
195
195
  ], 6));
196
196
  }
197
197
  }), tt = /* @__PURE__ */ be(xt, [["__scopeId", "data-v-c4912c99"]]), $t = {
198
198
  key: 0,
199
199
  class: "bulk-bar"
200
- }, Dt = { class: "bulk-left" }, Ct = { class: "bulk-actions" }, _t = { class: "card" }, St = { class: "table" }, It = {
200
+ }, Dt = { class: "bulk-left" }, Ct = { class: "bulk-actions" }, _t = { class: "card" }, St = { class: "table" }, Mt = {
201
201
  key: 0,
202
202
  style: { width: "34px", "min-width": "34px" }
203
- }, Lt = {
203
+ }, It = {
204
204
  key: 1,
205
205
  style: { width: "40px", "min-width": "40px" }
206
- }, Mt = {
206
+ }, Lt = {
207
207
  key: 0,
208
208
  class: "col-expand"
209
209
  }, Et = {
@@ -255,8 +255,8 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
255
255
  selectedItems: { default: void 0 }
256
256
  },
257
257
  emits: ["edit", "select", "update:selectedItems", "page-change", "page-size-change"],
258
- setup(t, { emit: D }) {
259
- const e = t, n = D, g = z(e.currentPage || 1), v = z(e.pageSize), h = z(e.selectedItems || []), S = z(/* @__PURE__ */ new Set()), C = z("none"), B = z(), x = z(), m = z(), w = z(), k = z([]), A = z({}), U = q(
258
+ setup(t, { emit: x }) {
259
+ const e = t, n = x, m = z(e.currentPage || 1), v = z(e.pageSize), p = z(e.selectedItems || []), I = z(/* @__PURE__ */ new Set()), C = z("none"), B = z(), $ = z(), w = z(), g = z(), b = z([]), A = z({}), U = q(
260
260
  () => e.columns.filter((a) => !E(a.width)).map((a) => a.key)
261
261
  );
262
262
  function P() {
@@ -280,8 +280,8 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
280
280
  function F(a) {
281
281
  const c = E(a);
282
282
  if (!c) return null;
283
- const $ = parseFloat(c);
284
- return Number.isFinite($) ? $ : null;
283
+ const D = parseFloat(c);
284
+ return Number.isFinite(D) ? D : null;
285
285
  }
286
286
  const K = q(() => {
287
287
  let a = e.columns.length;
@@ -290,57 +290,57 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
290
290
  if (!e.searchKeyword || !e.searchFields.length)
291
291
  return e.data;
292
292
  const a = e.searchKeyword.toLowerCase();
293
- return e.data.filter((c) => e.searchFields.some(($) => {
294
- const _ = b(c, $);
293
+ return e.data.filter((c) => e.searchFields.some((D) => {
294
+ const _ = k(c, D);
295
295
  return String(_).toLowerCase().includes(a);
296
296
  }));
297
297
  }), ne = q(() => (e.pagination, Y.value)), Q = q(() => {
298
298
  if (!e.selectable) return !1;
299
- const a = ne.value.map((c, $) => ({ key: d(c, $), item: c, index: $ })).filter(({ item: c, index: $ }) => !o(c, $)).map(({ key: c }) => c);
300
- return a.length > 0 && a.every((c) => h.value.includes(c));
299
+ const a = ne.value.map((c, D) => ({ key: d(c, D), item: c, index: D })).filter(({ item: c, index: D }) => !o(c, D)).map(({ key: c }) => c);
300
+ return a.length > 0 && a.every((c) => p.value.includes(c));
301
301
  }), pe = q(() => {
302
302
  if (!e.selectable) return !1;
303
- const a = ne.value.map((c, $) => ({ item: c, index: $ }));
304
- return a.length > 0 && a.every(({ item: c, index: $ }) => o(c, $));
303
+ const a = ne.value.map((c, D) => ({ item: c, index: D }));
304
+ return a.length > 0 && a.every(({ item: c, index: D }) => o(c, D));
305
305
  }), j = q(() => {
306
306
  const a = [];
307
307
  let c = e.selectable ? 40 : 0;
308
- for (let $ = 0; $ < e.columns.length; $++) {
309
- const _ = e.columns[$];
308
+ for (let D = 0; D < e.columns.length; D++) {
309
+ const _ = e.columns[D];
310
310
  if (_.fixed === "left") {
311
- let M = 80;
311
+ let L = 80;
312
312
  const W = F(_.width);
313
- W !== null ? M = W : k.value[$] && (M = F(k.value[$]) ?? M), a.push(c), c += M;
313
+ W !== null ? L = W : b.value[D] && (L = F(b.value[D]) ?? L), a.push(c), c += L;
314
314
  }
315
315
  }
316
316
  return a;
317
317
  }), ee = q(() => {
318
318
  const a = [];
319
319
  let c = 0;
320
- const $ = [];
320
+ const D = [];
321
321
  for (let _ = e.columns.length - 1; _ >= 0; _--) {
322
- const M = e.columns[_];
323
- if (M.fixed === "right") {
322
+ const L = e.columns[_];
323
+ if (L.fixed === "right") {
324
324
  let W = 80;
325
- const J = F(M.width);
326
- J !== null ? W = J : k.value[_] && (W = F(k.value[_]) ?? W), $.push({ index: _, width: W });
325
+ const J = F(L.width);
326
+ J !== null ? W = J : b.value[_] && (W = F(b.value[_]) ?? W), D.push({ index: _, width: W });
327
327
  }
328
328
  }
329
- for (let _ = 0; _ < $.length; _++)
330
- a.push(c), c += $[_].width;
329
+ for (let _ = 0; _ < D.length; _++)
330
+ a.push(c), c += D[_].width;
331
331
  return a;
332
332
  });
333
- function p(a, c) {
333
+ function h(a, c) {
334
334
  if (c === "left") {
335
- let $ = 0;
335
+ let D = 0;
336
336
  for (let _ = 0; _ < a; _++)
337
- e.columns[_].fixed === "left" && $++;
338
- return $;
337
+ e.columns[_].fixed === "left" && D++;
338
+ return D;
339
339
  } else {
340
- let $ = 0;
340
+ let D = 0;
341
341
  for (let _ = e.columns.length - 1; _ > a; _--)
342
- e.columns[_].fixed === "right" && $++;
343
- return $;
342
+ e.columns[_].fixed === "right" && D++;
343
+ return D;
344
344
  }
345
345
  }
346
346
  function d(a, c) {
@@ -350,113 +350,113 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
350
350
  return e.rowDisabled && typeof e.rowDisabled == "function" ? e.rowDisabled(a, c) : !1;
351
351
  }
352
352
  function i(a) {
353
- return S.value.has(a);
353
+ return I.value.has(a);
354
354
  }
355
355
  function f(a) {
356
- S.value.has(a) ? S.value.delete(a) : S.value.add(a);
356
+ I.value.has(a) ? I.value.delete(a) : I.value.add(a);
357
357
  }
358
- function b(a, c) {
359
- return c.split(".").reduce(($, _) => $ == null ? void 0 : $[_], a);
358
+ function k(a, c) {
359
+ return c.split(".").reduce((D, _) => D == null ? void 0 : D[_], a);
360
360
  }
361
- function L(a, c = !1) {
362
- const $ = [];
363
- return a.align && $.push(`text-${a.align}`), a.fixed === "right" && ($.push("col-fixed-right"), c && $.push("col-fixed-right-header")), a.fixed === "left" && ($.push("col-fixed-left"), c && $.push("col-fixed-left-header")), $.join(" ");
361
+ function M(a, c = !1) {
362
+ const D = [];
363
+ return a.align && D.push(`text-${a.align}`), a.fixed === "right" && (D.push("col-fixed-right"), c && D.push("col-fixed-right-header")), a.fixed === "left" && (D.push("col-fixed-left"), c && D.push("col-fixed-left-header")), D.join(" ");
364
364
  }
365
- function T(a, c, $) {
366
- const _ = {}, M = E(a.width);
367
- if (M)
368
- _.width = M, _.minWidth = M, _.maxWidth = M;
365
+ function T(a, c, D) {
366
+ const _ = {}, L = E(a.width);
367
+ if (L)
368
+ _.width = L, _.minWidth = L, _.maxWidth = L;
369
369
  else {
370
370
  const W = P();
371
371
  _.width = W, _.minWidth = W, _.maxWidth = W;
372
372
  }
373
373
  if (a.fixed === "left") {
374
- const W = p(c, "left"), J = j.value[W] || 0;
375
- _.left = `${J}px`, _.zIndex = $ ? `${10 + W}` : `${5 + W}`;
374
+ const W = h(c, "left"), J = j.value[W] || 0;
375
+ _.left = `${J}px`, _.zIndex = D ? `${10 + W}` : `${5 + W}`;
376
376
  } else if (a.fixed === "right") {
377
- const W = p(c, "right"), J = ee.value[W] || 0;
378
- $ ? _.right = `${J - 3}px` : _.right = `${J}px`, _.zIndex = $ ? `${10 + W}` : `${5 + W}`;
377
+ const W = h(c, "right"), J = ee.value[W] || 0;
378
+ D ? _.right = `${J - 3}px` : _.right = `${J}px`, _.zIndex = D ? `${10 + W}` : `${5 + W}`;
379
379
  }
380
380
  return _;
381
381
  }
382
382
  function N(a, c) {
383
- const $ = b(a, c.key);
384
- return c.formatter ? c.formatter($, a) : $ || "";
383
+ const D = k(a, c.key);
384
+ return c.formatter ? c.formatter(D, a) : D || "";
385
385
  }
386
386
  function oe(a) {
387
- const c = ne.value.find((_, M) => d(_, M) === a), $ = ne.value.findIndex((_, M) => d(_, M) === a);
388
- c && $ >= 0 && o(c, $) || (h.value.includes(a) ? h.value = h.value.filter((_) => _ !== a) : h.value = [...h.value, a], n("select", h.value), n("update:selectedItems", h.value));
387
+ const c = ne.value.find((_, L) => d(_, L) === a), D = ne.value.findIndex((_, L) => d(_, L) === a);
388
+ c && D >= 0 && o(c, D) || (p.value.includes(a) ? p.value = p.value.filter((_) => _ !== a) : p.value = [...p.value, a], n("select", p.value), n("update:selectedItems", p.value));
389
389
  }
390
390
  function me() {
391
- const a = ne.value.map((c, $) => ({ key: d(c, $), item: c, index: $ })).filter(({ item: c, index: $ }) => !o(c, $)).map(({ key: c }) => c);
391
+ const a = ne.value.map((c, D) => ({ key: d(c, D), item: c, index: D })).filter(({ item: c, index: D }) => !o(c, D)).map(({ key: c }) => c);
392
392
  if (a.length !== 0) {
393
- if (a.every((c) => h.value.includes(c)))
394
- h.value = h.value.filter((c) => !a.includes(c));
393
+ if (a.every((c) => p.value.includes(c)))
394
+ p.value = p.value.filter((c) => !a.includes(c));
395
395
  else {
396
- const c = /* @__PURE__ */ new Set([...h.value, ...a]);
397
- h.value = Array.from(c);
396
+ const c = /* @__PURE__ */ new Set([...p.value, ...a]);
397
+ p.value = Array.from(c);
398
398
  }
399
- n("select", h.value), n("update:selectedItems", h.value);
399
+ n("select", p.value), n("update:selectedItems", p.value);
400
400
  }
401
401
  }
402
402
  function _e() {
403
- h.value = [], n("select", h.value), n("update:selectedItems", h.value);
403
+ p.value = [], n("select", p.value), n("update:selectedItems", p.value);
404
404
  }
405
405
  ae(() => e.selectedItems, (a) => {
406
406
  if (a !== void 0 && Array.isArray(a)) {
407
- const c = new Set(h.value), $ = new Set(a);
408
- (c.size !== $.size || ![...c].every((_) => $.has(_))) && (h.value = [...a]);
409
- } else a === void 0 && h.value.length > 0 && (h.value = []);
407
+ const c = new Set(p.value), D = new Set(a);
408
+ (c.size !== D.size || ![...c].every((_) => D.has(_))) && (p.value = [...a]);
409
+ } else a === void 0 && p.value.length > 0 && (p.value = []);
410
410
  }, { deep: !0, immediate: !0 }), ae(() => e.searchKeyword, () => {
411
- g.value = 1;
411
+ m.value = 1;
412
412
  }), ae(() => e.data, () => {
413
- e.total || (g.value = 1);
413
+ e.total || (m.value = 1);
414
414
  }, { deep: !0 });
415
415
  function He(a) {
416
- g.value = a, n("page-change", a);
416
+ m.value = a, n("page-change", a);
417
417
  }
418
418
  function qe(a) {
419
- v.value = a, g.value = 1, n("page-size-change", a);
419
+ v.value = a, m.value = 1, n("page-size-change", a);
420
420
  }
421
421
  ae(() => e.currentPage, (a) => {
422
422
  const c = typeof a == "number" && a > 0 ? a : 1;
423
- g.value !== c && (g.value = c);
423
+ m.value !== c && (m.value = c);
424
424
  }), ae(() => e.pageSize, (a) => {
425
425
  const c = typeof a == "number" && a > 0 ? a : 10;
426
426
  v.value !== c && (v.value = c);
427
427
  });
428
428
  function Te() {
429
429
  B.value && re(() => {
430
- const a = B.value.getBoundingClientRect(), c = window.innerHeight, $ = a.top, _ = B.value.querySelector(".table-header"), M = _ ? _.offsetHeight : 40, W = B.value.querySelector(".ypagination"), J = W ? W.offsetHeight : 60, ye = B.value.querySelector(".bulk-bar"), le = ye ? ye.offsetHeight : 0, xe = M + J + le + 20, Ye = c - $ - xe, ot = Math.max(200, Ye), Qe = B.value.querySelector(".table-body-wrap .table");
430
+ const a = B.value.getBoundingClientRect(), c = window.innerHeight, D = a.top, _ = B.value.querySelector(".table-header"), L = _ ? _.offsetHeight : 40, W = B.value.querySelector(".ypagination"), J = W ? W.offsetHeight : 60, ye = B.value.querySelector(".bulk-bar"), le = ye ? ye.offsetHeight : 0, xe = L + J + le + 20, Ye = c - D - xe, ot = Math.max(200, Ye), Qe = B.value.querySelector(".table-body-wrap .table");
431
431
  Qe && (Qe.offsetHeight > Ye ? C.value = `${ot}px` : C.value = "none");
432
432
  });
433
433
  }
434
- let Le = !1;
435
- function Me() {
436
- !x.value || !m.value || Le || x.value.scrollLeft !== m.value.scrollLeft && (Le = !0, x.value.scrollLeft = m.value.scrollLeft, requestAnimationFrame(() => {
437
- Le = !1;
434
+ let Ie = !1;
435
+ function Le() {
436
+ !$.value || !w.value || Ie || $.value.scrollLeft !== w.value.scrollLeft && (Ie = !0, $.value.scrollLeft = w.value.scrollLeft, requestAnimationFrame(() => {
437
+ Ie = !1;
438
438
  }));
439
439
  }
440
440
  function Re() {
441
- !x.value || !m.value || Le || m.value.scrollLeft !== x.value.scrollLeft && (Le = !0, m.value.scrollLeft = x.value.scrollLeft, requestAnimationFrame(() => {
442
- Le = !1;
441
+ !$.value || !w.value || Ie || w.value.scrollLeft !== $.value.scrollLeft && (Ie = !0, w.value.scrollLeft = $.value.scrollLeft, requestAnimationFrame(() => {
442
+ Ie = !1;
443
443
  }));
444
444
  }
445
445
  function Ae() {
446
446
  re(() => {
447
- if (!m.value) return;
448
- const a = m.value, c = a.scrollHeight, $ = a.clientHeight, _ = a.scrollTop, M = c > $ + 1;
449
- if (Z.value.show = M, !M) return;
450
- const W = 24, J = $ / c, ye = V.value ? V.value.clientHeight : $, le = Math.max(W, Math.floor(ye * J));
447
+ if (!w.value) return;
448
+ const a = w.value, c = a.scrollHeight, D = a.clientHeight, _ = a.scrollTop, L = c > D + 1;
449
+ if (Z.value.show = L, !L) return;
450
+ const W = 24, J = D / c, ye = V.value ? V.value.clientHeight : D, le = Math.max(W, Math.floor(ye * J));
451
451
  Z.value.thumbHeight = le;
452
- const xe = Math.max(0, ye - le), Ye = Math.max(1, c - $);
452
+ const xe = Math.max(0, ye - le), Ye = Math.max(1, c - D);
453
453
  Z.value.thumbTop = Math.min(xe, Math.floor(_ / Ye * xe));
454
454
  });
455
455
  }
456
456
  function We(a) {
457
- if (!X || !m.value || !V.value) return;
457
+ if (!X || !w.value || !V.value) return;
458
458
  a.preventDefault();
459
- const c = V.value.clientHeight, $ = Math.max(0, c - Z.value.thumbHeight), _ = m.value, M = _.scrollHeight, W = _.clientHeight, J = Math.max(1, M - W), le = (a.clientY - ie) / Math.max(1, $) * J;
459
+ const c = V.value.clientHeight, D = Math.max(0, c - Z.value.thumbHeight), _ = w.value, L = _.scrollHeight, W = _.clientHeight, J = Math.max(1, L - W), le = (a.clientY - ie) / Math.max(1, D) * J;
460
460
  _.scrollTop = Math.min(J, Math.max(0, G + le)), Ae();
461
461
  }
462
462
  function Pe() {
@@ -464,32 +464,32 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
464
464
  }
465
465
  function ze() {
466
466
  re(() => {
467
- var $, _;
468
- if (k.value.length === e.columns.length && k.value.every((M) => !!M))
467
+ var D, _;
468
+ if (b.value.length === e.columns.length && b.value.every((L) => !!L))
469
469
  return;
470
470
  const a = [];
471
- e.columns.forEach((M, W) => {
472
- const J = E(M.width);
471
+ e.columns.forEach((L, W) => {
472
+ const J = E(L.width);
473
473
  if (J)
474
- a.push(J), A.value[M.key] = J;
475
- else if (A.value[M.key])
476
- a.push(A.value[M.key]);
474
+ a.push(J), A.value[L.key] = J;
475
+ else if (A.value[L.key])
476
+ a.push(A.value[L.key]);
477
477
  else {
478
- const ye = k.value[W];
478
+ const ye = b.value[W];
479
479
  if (ye)
480
- a.push(ye), A.value[M.key] = ye;
480
+ a.push(ye), A.value[L.key] = ye;
481
481
  else {
482
482
  const le = P();
483
- a.push(le), A.value[M.key] = le;
483
+ a.push(le), A.value[L.key] = le;
484
484
  }
485
485
  }
486
486
  });
487
- const c = ($ = w.value) == null ? void 0 : $.querySelector("tbody tr");
487
+ const c = (D = g.value) == null ? void 0 : D.querySelector("tbody tr");
488
488
  if (c) {
489
- const M = e.selectable ? 1 : 0, W = Array.from(c.children);
489
+ const L = e.selectable ? 1 : 0, W = Array.from(c.children);
490
490
  for (let J = 0; J < e.columns.length; J++)
491
491
  if (!a[J]) {
492
- const ye = W[M + J];
492
+ const ye = W[L + J];
493
493
  if (ye && ye.clientWidth > 0) {
494
494
  const le = `${ye.clientWidth}px`;
495
495
  a[J] = le, A.value[e.columns[J].key] = le;
@@ -499,75 +499,75 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
499
499
  }
500
500
  }
501
501
  } else
502
- for (let M = 0; M < a.length; M++)
503
- if (!a[M]) {
504
- const W = A.value[((_ = e.columns[M]) == null ? void 0 : _.key) || ""];
505
- a[M] = W || k.value[M] || "80px", e.columns[M] && (A.value[e.columns[M].key] = a[M]);
502
+ for (let L = 0; L < a.length; L++)
503
+ if (!a[L]) {
504
+ const W = A.value[((_ = e.columns[L]) == null ? void 0 : _.key) || ""];
505
+ a[L] = W || b.value[L] || "80px", e.columns[L] && (A.value[e.columns[L].key] = a[L]);
506
506
  }
507
- k.value = a;
507
+ b.value = a;
508
508
  });
509
509
  }
510
510
  function r() {
511
- Te(), I();
511
+ Te(), S();
512
512
  }
513
513
  ae(() => e.data, () => {
514
514
  re(() => {
515
- Te(), Me(), I(), S.value.clear();
515
+ Te(), Le(), S(), I.value.clear();
516
516
  });
517
- }, { deep: !0 }), ae([g, v], () => {
517
+ }, { deep: !0 }), ae([m, v], () => {
518
518
  re(() => {
519
- Te(), Me(), I();
519
+ Te(), Le(), S();
520
520
  });
521
521
  }), ae(() => e.columns, () => {
522
522
  const a = [], c = { ...A.value };
523
- e.columns.forEach((_, M) => {
523
+ e.columns.forEach((_, L) => {
524
524
  const W = E(_.width);
525
- W ? (a.push(W), c[_.key] = W) : c[_.key] ? a.push(c[_.key]) : k.value[M] ? (a.push(k.value[M]), c[_.key] = k.value[M]) : a.push("");
525
+ W ? (a.push(W), c[_.key] = W) : c[_.key] ? a.push(c[_.key]) : b.value[L] ? (a.push(b.value[L]), c[_.key] = b.value[L]) : a.push("");
526
526
  });
527
- const $ = new Set(e.columns.map((_) => _.key));
527
+ const D = new Set(e.columns.map((_) => _.key));
528
528
  Object.keys(c).forEach((_) => {
529
- $.has(_) || delete c[_];
530
- }), A.value = c, k.value = a, re(() => {
531
- ze(), Me(), I();
529
+ D.has(_) || delete c[_];
530
+ }), A.value = c, b.value = a, re(() => {
531
+ ze(), Le(), S();
532
532
  });
533
- }, { deep: !0 }), ae(() => h.value, () => {
533
+ }, { deep: !0 }), ae(() => p.value, () => {
534
534
  re(() => {
535
- Te(), I();
535
+ Te(), S();
536
536
  });
537
537
  }, { deep: !0 }), ae(() => e.loading, () => {
538
538
  re(() => {
539
- I();
539
+ S();
540
540
  });
541
541
  }), Ce(() => {
542
542
  var a, c;
543
543
  re(() => {
544
- Te(), ze(), I(), Ae();
545
- }), window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), (a = m.value) == null || a.addEventListener("scroll", () => {
546
- Me(), Ae(), I();
547
- }, { passive: !0 }), (c = x.value) == null || c.addEventListener("scroll", () => {
544
+ Te(), ze(), S(), Ae();
545
+ }), window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), (a = w.value) == null || a.addEventListener("scroll", () => {
546
+ Le(), Ae(), S();
547
+ }, { passive: !0 }), (c = $.value) == null || c.addEventListener("scroll", () => {
548
548
  Re();
549
- }, { passive: !0 }), re(() => Me()), m.value && typeof ResizeObserver < "u" && (O = new ResizeObserver(() => {
550
- I();
551
- }), O.observe(m.value));
549
+ }, { passive: !0 }), re(() => Le()), w.value && typeof ResizeObserver < "u" && (O = new ResizeObserver(() => {
550
+ S();
551
+ }), O.observe(w.value));
552
552
  }), Be(() => {
553
553
  var a, c;
554
- window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0), (a = m.value) == null || a.removeEventListener("scroll", Me), (c = x.value) == null || c.removeEventListener("scroll", Re), window.removeEventListener("mousemove", We), window.removeEventListener("mouseup", Pe), O && (O.disconnect(), O = null);
554
+ window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0), (a = w.value) == null || a.removeEventListener("scroll", Le), (c = $.value) == null || c.removeEventListener("scroll", Re), window.removeEventListener("mousemove", We), window.removeEventListener("mouseup", Pe), O && (O.disconnect(), O = null);
555
555
  });
556
556
  let y = -1;
557
- function I() {
558
- !x.value || !m.value || requestAnimationFrame(() => {
559
- if (!x.value || !m.value) return;
560
- const a = m.value, c = Math.ceil(a.offsetWidth - a.clientWidth);
557
+ function S() {
558
+ !$.value || !w.value || requestAnimationFrame(() => {
559
+ if (!$.value || !w.value) return;
560
+ const a = w.value, c = Math.ceil(a.offsetWidth - a.clientWidth);
561
561
  if (de.value = c, c !== y) {
562
562
  y = c;
563
- const $ = x.value.querySelector(".table"), _ = w.value;
564
- $ && _ && (x.value.style.paddingRight = "0px", $.style.width = "", $.style.marginRight = "", c > 0 ? (x.value.style.paddingRight = `${c}px`, $.style.width = "100%", $.style.marginRight = `-${c}px`) : (x.value.style.paddingRight = "0px", $.style.width = "100%", $.style.marginRight = "0px"));
563
+ const D = $.value.querySelector(".table"), _ = g.value;
564
+ D && _ && ($.value.style.paddingRight = "0px", D.style.width = "", D.style.marginRight = "", c > 0 ? ($.value.style.paddingRight = `${c}px`, D.style.width = "100%", D.style.marginRight = `-${c}px`) : ($.value.style.paddingRight = "0px", D.style.width = "100%", D.style.marginRight = "0px"));
565
565
  }
566
566
  });
567
567
  }
568
568
  let O = null;
569
569
  return (a, c) => {
570
- const $ = Ve("YButton"), _ = Ve("YPagination");
570
+ const D = Ve("YButton"), _ = Ve("YPagination");
571
571
  return s(), u("div", {
572
572
  class: "ytable-container",
573
573
  ref_key: "tableContainer",
@@ -575,14 +575,14 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
575
575
  }, [
576
576
  ve($e, { name: "bulk-slide" }, {
577
577
  default: he(() => [
578
- h.value.length && t.showBulkActions ? (s(), u("div", $t, [
579
- l("div", Dt, "已选择 " + se(h.value.length) + " 项", 1),
578
+ p.value.length && t.showBulkActions ? (s(), u("div", $t, [
579
+ l("div", Dt, "已选择 " + se(p.value.length) + " 项", 1),
580
580
  l("div", Ct, [
581
581
  ue(a.$slots, "bulk-actions", {
582
- selectedItems: h.value,
582
+ selectedItems: p.value,
583
583
  clearSelection: _e
584
584
  }, () => [
585
- ve($, {
585
+ ve(D, {
586
586
  size: "small",
587
587
  class: "btn",
588
588
  onClick: _e
@@ -602,20 +602,20 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
602
602
  l("div", {
603
603
  class: "table-header",
604
604
  ref_key: "headerRef",
605
- ref: x
605
+ ref: $
606
606
  }, [
607
607
  l("table", St, [
608
608
  l("colgroup", null, [
609
- e.expandable ? (s(), u("col", It)) : R("", !0),
610
- t.selectable ? (s(), u("col", Lt)) : R("", !0),
611
- (s(!0), u(ce, null, ge(t.columns, (M, W) => (s(), u("col", {
612
- key: M.key,
613
- style: fe({ width: k.value[W] || void 0, minWidth: k.value[W] || "80px" })
609
+ e.expandable ? (s(), u("col", Mt)) : R("", !0),
610
+ t.selectable ? (s(), u("col", It)) : R("", !0),
611
+ (s(!0), u(ce, null, ge(t.columns, (L, W) => (s(), u("col", {
612
+ key: L.key,
613
+ style: fe({ width: b.value[W] || void 0, minWidth: b.value[W] || "80px" })
614
614
  }, null, 4))), 128))
615
615
  ]),
616
616
  l("thead", null, [
617
617
  l("tr", null, [
618
- e.expandable ? (s(), u("th", Mt)) : R("", !0),
618
+ e.expandable ? (s(), u("th", Lt)) : R("", !0),
619
619
  t.selectable ? (s(), u("th", Et, [
620
620
  l("input", {
621
621
  type: "checkbox",
@@ -624,11 +624,11 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
624
624
  onChange: me
625
625
  }, null, 40, Bt)
626
626
  ])) : R("", !0),
627
- (s(!0), u(ce, null, ge(t.columns, (M, W) => (s(), u("th", {
628
- key: M.key,
629
- class: H(L(M, !0)),
630
- style: fe(T(M, W, !0))
631
- }, se(M.title), 7))), 128))
627
+ (s(!0), u(ce, null, ge(t.columns, (L, W) => (s(), u("th", {
628
+ key: L.key,
629
+ class: H(M(L, !0)),
630
+ style: fe(T(L, W, !0))
631
+ }, se(L.title), 7))), 128))
632
632
  ])
633
633
  ])
634
634
  ])
@@ -636,7 +636,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
636
636
  l("div", {
637
637
  class: H(["table-body-wrap", { "is-loading": t.loading, "is-empty": !ne.value.length && !t.loading }]),
638
638
  ref_key: "bodyWrapRef",
639
- ref: m,
639
+ ref: w,
640
640
  style: fe({ maxHeight: C.value })
641
641
  }, [
642
642
  t.loading ? (s(), u("div", Tt, [...c[3] || (c[3] = [
@@ -651,57 +651,57 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
651
651
  l("table", {
652
652
  class: H(["table", { "loading-table": t.loading }]),
653
653
  ref_key: "bodyTableRef",
654
- ref: w
654
+ ref: g
655
655
  }, [
656
656
  l("colgroup", null, [
657
657
  e.expandable ? (s(), u("col", Kt)) : R("", !0),
658
658
  t.selectable ? (s(), u("col", Ht)) : R("", !0),
659
- (s(!0), u(ce, null, ge(t.columns, (M, W) => (s(), u("col", {
660
- key: M.key,
661
- style: fe({ width: k.value[W] || void 0, minWidth: k.value[W] || "80px" })
659
+ (s(!0), u(ce, null, ge(t.columns, (L, W) => (s(), u("col", {
660
+ key: L.key,
661
+ style: fe({ width: b.value[W] || void 0, minWidth: b.value[W] || "80px" })
662
662
  }, null, 4))), 128))
663
663
  ]),
664
664
  l("tbody", null, [
665
- (s(!0), u(ce, null, ge(ne.value, (M, W) => (s(), u(ce, {
666
- key: d(M, W)
665
+ (s(!0), u(ce, null, ge(ne.value, (L, W) => (s(), u(ce, {
666
+ key: d(L, W)
667
667
  }, [
668
668
  l("tr", null, [
669
669
  e.expandable ? (s(), u("td", Rt, [
670
670
  l("button", {
671
671
  class: "expand-btn",
672
672
  type: "button",
673
- onClick: (J) => f(d(M, W))
673
+ onClick: (J) => f(d(L, W))
674
674
  }, [
675
675
  l("span", {
676
- class: H(["expand-icon", { "is-open": i(d(M, W)) }])
676
+ class: H(["expand-icon", { "is-open": i(d(L, W)) }])
677
677
  }, null, 2)
678
678
  ], 8, At)
679
679
  ])) : R("", !0),
680
680
  t.selectable ? (s(), u("td", Wt, [
681
681
  l("input", {
682
682
  type: "checkbox",
683
- value: d(M, W),
684
- checked: h.value.includes(d(M, W)),
685
- disabled: o(M, W),
686
- onChange: (J) => oe(d(M, W))
683
+ value: d(L, W),
684
+ checked: p.value.includes(d(L, W)),
685
+ disabled: o(L, W),
686
+ onChange: (J) => oe(d(L, W))
687
687
  }, null, 40, Vt)
688
688
  ])) : R("", !0),
689
689
  (s(!0), u(ce, null, ge(t.columns, (J, ye) => (s(), u("td", {
690
690
  key: J.key,
691
- class: H(L(J)),
691
+ class: H(M(J)),
692
692
  style: fe(T(J, ye, !1))
693
693
  }, [
694
694
  ue(a.$slots, `cell-${J.key}`, {
695
- item: M,
696
- value: b(M, J.key),
695
+ item: L,
696
+ value: k(L, J.key),
697
697
  index: W
698
698
  }, () => [
699
- De(se(N(M, J)), 1)
699
+ De(se(N(L, J)), 1)
700
700
  ], !0)
701
701
  ], 6))), 128))
702
702
  ]),
703
- e.expandable && i(d(M, W)) ? (s(), u("tr", {
704
- key: `${d(M, W)}-expand`,
703
+ e.expandable && i(d(L, W)) ? (s(), u("tr", {
704
+ key: `${d(L, W)}-expand`,
705
705
  class: "expand-row"
706
706
  }, [
707
707
  l("td", {
@@ -709,7 +709,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
709
709
  class: "expand-cell"
710
710
  }, [
711
711
  ue(a.$slots, "expand", {
712
- item: M,
712
+ item: L,
713
713
  index: W
714
714
  }, void 0, !0)
715
715
  ], 8, Ft)
@@ -718,13 +718,13 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
718
718
  ])
719
719
  ], 2)
720
720
  ], 6),
721
- t.pagination ? (s(), Ie(_, {
721
+ t.pagination ? (s(), Me(_, {
722
722
  key: 0,
723
723
  class: "align-right",
724
- "current-page": g.value,
725
- "onUpdate:currentPage": c[0] || (c[0] = (M) => g.value = M),
724
+ "current-page": m.value,
725
+ "onUpdate:currentPage": c[0] || (c[0] = (L) => m.value = L),
726
726
  "page-size": v.value,
727
- "onUpdate:pageSize": c[1] || (c[1] = (M) => v.value = M),
727
+ "onUpdate:pageSize": c[1] || (c[1] = (L) => v.value = L),
728
728
  loading: e.loading,
729
729
  "page-size-options": t.pageSizeOptions,
730
730
  onPageChange: He,
@@ -752,27 +752,27 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
752
752
  width: { default: "200px" }
753
753
  },
754
754
  emits: ["update:modelValue", "change", "focus", "blur", "clear"],
755
- setup(t, { emit: D }) {
756
- const e = t, n = D, g = z(!1), v = z(-1), h = z(), S = z(), C = z(), B = z(), x = z(!1), m = z(), w = z(""), k = q(() => e.options.find((o) => Z(o) === e.modelValue) || null), A = q(() => k.value ? X(k.value) : ""), U = q(() => {
755
+ setup(t, { emit: x }) {
756
+ const e = t, n = x, m = z(!1), v = z(-1), p = z(), I = z(), C = z(), B = z(), $ = z(!1), w = z(), g = z(""), b = q(() => e.options.find((o) => Z(o) === e.modelValue) || null), A = q(() => b.value ? X(b.value) : ""), U = q(() => {
757
757
  if (!e.filterable) return e.options;
758
- const o = w.value.trim().toLowerCase();
758
+ const o = g.value.trim().toLowerCase();
759
759
  return o ? e.options.filter((i) => {
760
760
  const f = X(i);
761
761
  return String(f).toLowerCase().includes(o);
762
762
  }) : e.options;
763
763
  }), P = q(() => {
764
- var L;
765
- const o = { position: "fixed", zIndex: "4000" }, i = S.value;
764
+ var M;
765
+ const o = { position: "fixed", zIndex: "4000" }, i = I.value;
766
766
  if (!i) return o;
767
- const f = i.getBoundingClientRect(), b = ((L = C.value) == null ? void 0 : L.getBoundingClientRect().width) || f.width;
768
- return o.left = `${f.left}px`, o.width = `${b}px`, x.value ? (o.bottom = `${window.innerHeight - f.top + 4}px`, o.top = "auto") : o.top = `${f.bottom + 4}px`, o;
767
+ const f = i.getBoundingClientRect(), k = ((M = C.value) == null ? void 0 : M.getBoundingClientRect().width) || f.width;
768
+ return o.left = `${f.left}px`, o.width = `${k}px`, $.value ? (o.bottom = `${window.innerHeight - f.top + 4}px`, o.top = "auto") : o.top = `${f.bottom + 4}px`, o;
769
769
  });
770
770
  function V() {
771
- !g.value || !S.value || re(() => {
772
- const o = S.value;
771
+ !m.value || !I.value || re(() => {
772
+ const o = I.value;
773
773
  if (!o) return;
774
- const i = o.getBoundingClientRect(), f = window.innerHeight, b = 200, L = i.bottom + b + 4, T = i.top - b - 4, N = L <= f - 20, oe = T >= 20;
775
- x.value = !N && oe;
774
+ const i = o.getBoundingClientRect(), f = window.innerHeight, k = 200, M = i.bottom + k + 4, T = i.top - k - 4, N = M <= f - 20, oe = T >= 20;
775
+ $.value = !N && oe;
776
776
  });
777
777
  }
778
778
  function Z(o) {
@@ -791,15 +791,15 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
791
791
  return typeof o == "object" && o !== null ? o[e.disabledKey] === !0 : !1;
792
792
  }
793
793
  function E() {
794
- e.disabled || (g.value ? K() : F());
794
+ e.disabled || (m.value ? K() : F());
795
795
  }
796
796
  function F() {
797
- e.disabled || (g.value = !0, re(() => {
798
- V(), j(), e.filterable && m.value && (m.value.focus(), w.value = "");
797
+ e.disabled || (m.value = !0, re(() => {
798
+ V(), j(), e.filterable && w.value && (w.value.focus(), g.value = "");
799
799
  }));
800
800
  }
801
801
  function K() {
802
- g.value = !1, v.value = -1, x.value = !1, e.filterable && (w.value = "");
802
+ m.value = !1, v.value = -1, $.value = !1, e.filterable && (g.value = "");
803
803
  }
804
804
  function Y(o, i) {
805
805
  if (de(o)) return;
@@ -819,10 +819,10 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
819
819
  let i = v.value;
820
820
  const f = U.value.length;
821
821
  i === -1 ? i = o > 0 ? 0 : f - 1 : i = (i + o + f) % f;
822
- let b = 0;
823
- for (; b < f && de(U.value[i]); )
824
- i = (i + o + f) % f, b++;
825
- v.value = b >= f ? -1 : i, ee();
822
+ let k = 0;
823
+ for (; k < f && de(U.value[i]); )
824
+ i = (i + o + f) % f, k++;
825
+ v.value = k >= f ? -1 : i, ee();
826
826
  }
827
827
  function pe() {
828
828
  if (v.value < 0) return;
@@ -830,16 +830,16 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
830
830
  !o || de(o) || Y(o, v.value);
831
831
  }
832
832
  function j() {
833
- if (!h.value) return;
834
- const o = h.value.querySelector(".yselect__option--selected");
833
+ if (!p.value) return;
834
+ const o = p.value.querySelector(".yselect__option--selected");
835
835
  o && o.scrollIntoView({ block: "nearest" });
836
836
  }
837
837
  function ee() {
838
- if (!h.value || v.value < 0) return;
839
- const i = h.value.querySelectorAll(".yselect__option")[v.value];
838
+ if (!p.value || v.value < 0) return;
839
+ const i = p.value.querySelectorAll(".yselect__option")[v.value];
840
840
  i && i.scrollIntoView({ block: "nearest" });
841
841
  }
842
- function p(o) {
842
+ function h(o) {
843
843
  const i = o.target;
844
844
  (!C.value || !C.value.contains(i)) && K();
845
845
  }
@@ -847,12 +847,12 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
847
847
  v.value = -1;
848
848
  });
849
849
  function d() {
850
- g.value && V();
850
+ m.value && V();
851
851
  }
852
852
  return Ce(() => {
853
- document.addEventListener("click", p), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0);
853
+ document.addEventListener("click", h), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0);
854
854
  }), Be(() => {
855
- document.removeEventListener("click", p), window.removeEventListener("resize", d), window.removeEventListener("scroll", d, !0);
855
+ document.removeEventListener("click", h), window.removeEventListener("resize", d), window.removeEventListener("scroll", d, !0);
856
856
  }), (o, i) => (s(), u("div", {
857
857
  class: H(["yselect", { "yselect--disabled": t.disabled, [`yselect--${t.size}`]: !0 }]),
858
858
  style: fe({ width: t.width }),
@@ -861,9 +861,9 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
861
861
  }, [
862
862
  l("div", {
863
863
  ref_key: "triggerElement",
864
- ref: S,
864
+ ref: I,
865
865
  class: H(["yselect__trigger", {
866
- "yselect__trigger--open": g.value,
866
+ "yselect__trigger--open": m.value,
867
867
  "yselect__trigger--disabled": t.disabled,
868
868
  "yselect__trigger--error": t.error
869
869
  }]),
@@ -877,24 +877,24 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
877
877
  ],
878
878
  tabindex: "0",
879
879
  role: "combobox",
880
- "aria-expanded": g.value,
880
+ "aria-expanded": m.value,
881
881
  "aria-haspopup": !0
882
882
  }, [
883
- !t.filterable || !g.value ? (s(), u("span", {
883
+ !t.filterable || !m.value ? (s(), u("span", {
884
884
  key: 0,
885
885
  class: H(["yselect__value", { yselect__placeholder: !A.value }])
886
886
  }, [
887
887
  ue(o.$slots, "value", {
888
- value: k.value,
888
+ value: b.value,
889
889
  label: A.value
890
890
  }, () => {
891
891
  var f;
892
892
  return [
893
- k.value ? (s(), u(ce, { key: 0 }, [
894
- (f = k.value) != null && f.flagImg ? (s(), u("img", {
893
+ b.value ? (s(), u(ce, { key: 0 }, [
894
+ (f = b.value) != null && f.flagImg ? (s(), u("img", {
895
895
  key: 0,
896
896
  class: "yselect__flag",
897
- src: k.value.flagImg,
897
+ src: b.value.flagImg,
898
898
  alt: "flag"
899
899
  }, null, 8, Ot)) : R("", !0),
900
900
  De(" " + se(A.value), 1)
@@ -906,11 +906,11 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
906
906
  ], 2)) : Ee((s(), u("input", {
907
907
  key: 1,
908
908
  ref_key: "inputElement",
909
- ref: m,
909
+ ref: w,
910
910
  class: "yselect__input",
911
911
  type: "text",
912
912
  placeholder: A.value || t.placeholder,
913
- "onUpdate:modelValue": i[0] || (i[0] = (f) => w.value = f),
913
+ "onUpdate:modelValue": i[0] || (i[0] = (f) => g.value = f),
914
914
  onKeydown: [
915
915
  i[1] || (i[1] = te(() => {
916
916
  }, ["stop"])),
@@ -921,9 +921,9 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
921
921
  ke(te(ne, ["prevent"]), ["delete"])
922
922
  ]
923
923
  }, null, 40, jt)), [
924
- [at, w.value]
924
+ [at, g.value]
925
925
  ]),
926
- t.clearable && !t.disabled && k.value ? (s(), u("span", {
926
+ t.clearable && !t.disabled && b.value ? (s(), u("span", {
927
927
  key: 2,
928
928
  class: "yselect__clear",
929
929
  title: "清空",
@@ -944,7 +944,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
944
944
  ], -1)
945
945
  ])])) : R("", !0),
946
946
  l("span", {
947
- class: H(["yselect__arrow", { "yselect__arrow--open": g.value }])
947
+ class: H(["yselect__arrow", { "yselect__arrow--open": m.value }])
948
948
  }, [...i[9] || (i[9] = [
949
949
  l("svg", {
950
950
  width: "12",
@@ -964,12 +964,12 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
964
964
  ], 42, Nt),
965
965
  ve($e, { name: "yselect-dropdown" }, {
966
966
  default: he(() => [
967
- (s(), Ie(Fe, { to: "body" }, [
968
- g.value ? (s(), u("div", {
967
+ (s(), Me(Fe, { to: "body" }, [
968
+ m.value ? (s(), u("div", {
969
969
  key: 0,
970
970
  ref_key: "dropdownEl",
971
971
  ref: B,
972
- class: H(["yselect__dropdown yselect__dropdown--portal", { "yselect__dropdown--top": x.value }]),
972
+ class: H(["yselect__dropdown yselect__dropdown--portal", { "yselect__dropdown--top": $.value }]),
973
973
  style: fe(P.value),
974
974
  onMousedown: i[6] || (i[6] = te(() => {
975
975
  }, ["stop"])),
@@ -979,22 +979,22 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
979
979
  l("div", {
980
980
  class: "yselect__options",
981
981
  ref_key: "optionsContainer",
982
- ref: h
982
+ ref: p
983
983
  }, [
984
- (s(!0), u(ce, null, ge(U.value, (f, b) => (s(), u("div", {
985
- key: ie(f, b),
984
+ (s(!0), u(ce, null, ge(U.value, (f, k) => (s(), u("div", {
985
+ key: ie(f, k),
986
986
  class: H(["yselect__option", {
987
987
  "yselect__option--selected": G(f),
988
988
  "yselect__option--disabled": de(f),
989
- "yselect__option--hover": v.value === b
989
+ "yselect__option--hover": v.value === k
990
990
  }]),
991
- onClick: (L) => Y(f),
992
- onMouseenter: (L) => v.value = b,
993
- onMouseleave: i[5] || (i[5] = (L) => v.value = -1)
991
+ onClick: (M) => Y(f),
992
+ onMouseenter: (M) => v.value = k,
993
+ onMouseleave: i[5] || (i[5] = (M) => v.value = -1)
994
994
  }, [
995
995
  ue(o.$slots, "option", {
996
996
  option: f,
997
- index: b,
997
+ index: k,
998
998
  selected: G(f)
999
999
  }, () => [
1000
1000
  f != null && f.flagImg ? (s(), u("img", {
@@ -1028,56 +1028,56 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1028
1028
  ] }
1029
1029
  },
1030
1030
  emits: ["update:currentPage", "update:pageSize", "page-change", "page-size-change"],
1031
- setup(t, { emit: D }) {
1032
- const e = t, n = D, g = z(e.pageSize), v = q(() => e.pageSizeOptions), h = q({
1031
+ setup(t, { emit: x }) {
1032
+ const e = t, n = x, m = z(e.pageSize), v = q(() => e.pageSizeOptions), p = q({
1033
1033
  get: () => e.currentPage,
1034
- set: (x) => {
1035
- n("update:currentPage", x), n("page-change", x);
1034
+ set: ($) => {
1035
+ n("update:currentPage", $), n("page-change", $);
1036
1036
  }
1037
1037
  });
1038
- function S(x) {
1039
- e.loading || x >= 1 && x !== e.currentPage && (h.value = x);
1038
+ function I($) {
1039
+ e.loading || $ >= 1 && $ !== e.currentPage && (p.value = $);
1040
1040
  }
1041
- function C(x) {
1042
- e.loading || (g.value = x, n("update:pageSize", x), n("page-size-change", x), h.value = 1);
1041
+ function C($) {
1042
+ e.loading || (m.value = $, n("update:pageSize", $), n("page-size-change", $), p.value = 1);
1043
1043
  }
1044
- function B(x) {
1045
- e.loading || (x === "prev" ? S(h.value - 1) : x === "next" && S(h.value + 1));
1044
+ function B($) {
1045
+ e.loading || ($ === "prev" ? I(p.value - 1) : $ === "next" && I(p.value + 1));
1046
1046
  }
1047
- return g.value = e.pageSize, ae(
1047
+ return m.value = e.pageSize, ae(
1048
1048
  () => e.pageSize,
1049
- (x) => {
1050
- typeof x == "number" && g.value !== x && (g.value = x);
1049
+ ($) => {
1050
+ typeof $ == "number" && m.value !== $ && (m.value = $);
1051
1051
  }
1052
- ), (x, m) => {
1053
- const w = Ve("YButton"), k = Ve("YSelect");
1052
+ ), ($, w) => {
1053
+ const g = Ve("YButton"), b = Ve("YSelect");
1054
1054
  return s(), u("div", Qt, [
1055
1055
  l("div", Jt, [
1056
- ve(w, {
1056
+ ve(g, {
1057
1057
  size: "small",
1058
1058
  variant: "secondary",
1059
- disabled: h.value === 1 || t.loading,
1060
- onClick: m[0] || (m[0] = (A) => S(1))
1059
+ disabled: p.value === 1 || t.loading,
1060
+ onClick: w[0] || (w[0] = (A) => I(1))
1061
1061
  }, {
1062
- default: he(() => [...m[2] || (m[2] = [
1062
+ default: he(() => [...w[2] || (w[2] = [
1063
1063
  De("首页", -1)
1064
1064
  ])]),
1065
1065
  _: 1
1066
1066
  }, 8, ["disabled"]),
1067
- ve(w, {
1067
+ ve(g, {
1068
1068
  class: "ml-1",
1069
1069
  variant: "secondary",
1070
1070
  size: "small",
1071
1071
  groupItems: [
1072
- { label: "上一页", value: "prev", disabled: h.value === 1 || t.loading, icon: "chevron-left", onlyIcon: !0, ariaLabel: "上一页" },
1072
+ { label: "上一页", value: "prev", disabled: p.value === 1 || t.loading, icon: "chevron-left", onlyIcon: !0, ariaLabel: "上一页" },
1073
1073
  { label: "下一页", value: "next", disabled: t.loading, icon: "chevron-right", onlyIcon: !0, ariaLabel: "下一页" }
1074
1074
  ],
1075
1075
  onGroupClick: B
1076
1076
  }, null, 8, ["groupItems"]),
1077
1077
  l("div", Xt, [
1078
- ve(k, {
1079
- modelValue: g.value,
1080
- "onUpdate:modelValue": m[1] || (m[1] = (A) => g.value = A),
1078
+ ve(b, {
1079
+ modelValue: m.value,
1080
+ "onUpdate:modelValue": w[1] || (w[1] = (A) => m.value = A),
1081
1081
  options: v.value,
1082
1082
  size: "small",
1083
1083
  width: "105px",
@@ -1145,18 +1145,18 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1145
1145
  label: { default: "" }
1146
1146
  },
1147
1147
  setup(t) {
1148
- const D = t, e = q(() => D.tone || "default"), n = q(() => {
1149
- const g = (D.label || "").trim(), v = D.tone, h = D.progress;
1150
- if (h) {
1151
- const S = {
1148
+ const x = t, e = q(() => x.tone || "default"), n = q(() => {
1149
+ const m = (x.label || "").trim(), v = x.tone, p = x.progress;
1150
+ if (p) {
1151
+ const I = {
1152
1152
  incomplete: "未完成",
1153
1153
  partiallyComplete: "部分完成",
1154
1154
  complete: "已完成"
1155
1155
  };
1156
- return g ? `${g},进度:${S[h] || h}` : `进度:${S[h] || h}`;
1156
+ return m ? `${m},进度:${I[p] || p}` : `进度:${I[p] || p}`;
1157
1157
  }
1158
1158
  if (v && v !== "default") {
1159
- const S = {
1159
+ const I = {
1160
1160
  informational: "信息",
1161
1161
  success: "成功",
1162
1162
  attention: "注意",
@@ -1164,11 +1164,11 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1164
1164
  critical: "严重",
1165
1165
  default: "默认"
1166
1166
  };
1167
- return g ? `${g},语气:${S[v] || v}` : `语气:${S[v] || v}`;
1167
+ return m ? `${m},语气:${I[v] || v}` : `语气:${I[v] || v}`;
1168
1168
  }
1169
- return g || "标记";
1169
+ return m || "标记";
1170
1170
  });
1171
- return (g, v) => (s(), u("span", {
1171
+ return (m, v) => (s(), u("span", {
1172
1172
  class: H(["y-badge", [
1173
1173
  `y-badge--${e.value}`,
1174
1174
  `y-badge--${t.size}`,
@@ -1231,7 +1231,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1231
1231
  ])]))
1232
1232
  ])) : R("", !0),
1233
1233
  l("span", vn, [
1234
- ue(g.$slots, "default", {}, () => [
1234
+ ue(m.$slots, "default", {}, () => [
1235
1235
  De(se(t.label), 1)
1236
1236
  ], !0)
1237
1237
  ])
@@ -1258,46 +1258,46 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1258
1258
  center: { type: Boolean, default: !1 }
1259
1259
  },
1260
1260
  emits: ["update:modelValue", "open", "close"],
1261
- setup(t, { emit: D }) {
1262
- const e = t, n = D, g = q({
1261
+ setup(t, { emit: x }) {
1262
+ const e = t, n = x, m = q({
1263
1263
  get: () => e.modelValue,
1264
- set: (m) => n("update:modelValue", m)
1265
- }), v = z(null), h = q(() => {
1266
- const m = {};
1267
- return m.width = typeof e.width == "number" ? `${e.width}px` : String(e.width), m.margin = "0 auto", m.top = e.top, m;
1264
+ set: (w) => n("update:modelValue", w)
1265
+ }), v = z(null), p = q(() => {
1266
+ const w = {};
1267
+ return w.width = typeof e.width == "number" ? `${e.width}px` : String(e.width), w.margin = "0 auto", w.top = e.top, w;
1268
1268
  });
1269
- function S() {
1269
+ function I() {
1270
1270
  e.maskClosable && C();
1271
1271
  }
1272
1272
  function C() {
1273
- g.value && (g.value = !1, n("close"));
1273
+ m.value && (m.value = !1, n("close"));
1274
1274
  }
1275
1275
  function B() {
1276
1276
  e.closable && C();
1277
1277
  }
1278
- function x(m) {
1279
- m.key === "Escape" && B();
1278
+ function $(w) {
1279
+ w.key === "Escape" && B();
1280
1280
  }
1281
- return ae(() => e.modelValue, (m) => {
1282
- m ? (n("open"), requestAnimationFrame(() => {
1283
- var w;
1284
- return (w = v.value) == null ? void 0 : w.focus();
1285
- }), document.addEventListener("keydown", x), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", x), document.body.style.overflow = "");
1281
+ return ae(() => e.modelValue, (w) => {
1282
+ w ? (n("open"), requestAnimationFrame(() => {
1283
+ var g;
1284
+ return (g = v.value) == null ? void 0 : g.focus();
1285
+ }), document.addEventListener("keydown", $), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", $), document.body.style.overflow = "");
1286
1286
  }), Ce(() => {
1287
- e.modelValue && (document.addEventListener("keydown", x), document.body.style.overflow = "hidden");
1287
+ e.modelValue && (document.addEventListener("keydown", $), document.body.style.overflow = "hidden");
1288
1288
  }), Be(() => {
1289
- document.removeEventListener("keydown", x), document.body.style.overflow = "";
1290
- }), (m, w) => (s(), Ie(Fe, { to: "body" }, [
1289
+ document.removeEventListener("keydown", $), document.body.style.overflow = "";
1290
+ }), (w, g) => (s(), Me(Fe, { to: "body" }, [
1291
1291
  Ee(l("div", {
1292
1292
  class: "y-dialog-root",
1293
1293
  role: "dialog",
1294
1294
  "aria-modal": !0,
1295
- "aria-hidden": !g.value,
1295
+ "aria-hidden": !m.value,
1296
1296
  style: fe({ zIndex: String(t.zIndex) })
1297
1297
  }, [
1298
1298
  l("div", {
1299
1299
  class: "y-dialog-mask",
1300
- onClick: S
1300
+ onClick: I
1301
1301
  }),
1302
1302
  ve($e, { name: "dialog-zoom-fade" }, {
1303
1303
  default: he(() => [
@@ -1305,12 +1305,12 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1305
1305
  ref_key: "panelRef",
1306
1306
  ref: v,
1307
1307
  class: H(["y-dialog-panel", [t.center ? "is-center" : ""]]),
1308
- style: fe(h.value),
1308
+ style: fe(p.value),
1309
1309
  onKeydown: ke(te(B, ["prevent", "stop"]), ["esc"]),
1310
1310
  tabindex: "-1"
1311
1311
  }, [
1312
1312
  t.showHeader ? (s(), u("div", mn, [
1313
- ue(m.$slots, "header", {}, () => [
1313
+ ue(w.$slots, "header", {}, () => [
1314
1314
  l("div", wn, se(t.title), 1)
1315
1315
  ], !0),
1316
1316
  t.closable ? (s(), u("button", {
@@ -1322,19 +1322,19 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1322
1322
  }, " ✕ ")) : R("", !0)
1323
1323
  ])) : R("", !0),
1324
1324
  l("div", bn, [
1325
- ue(m.$slots, "default", {}, void 0, !0)
1325
+ ue(w.$slots, "default", {}, void 0, !0)
1326
1326
  ]),
1327
- m.$slots.footer ? (s(), u("div", kn, [
1328
- ue(m.$slots, "footer", {}, void 0, !0)
1327
+ w.$slots.footer ? (s(), u("div", kn, [
1328
+ ue(w.$slots, "footer", {}, void 0, !0)
1329
1329
  ])) : R("", !0)
1330
1330
  ], 46, gn), [
1331
- [Ke, g.value]
1331
+ [Ke, m.value]
1332
1332
  ])
1333
1333
  ]),
1334
1334
  _: 3
1335
1335
  })
1336
1336
  ], 12, yn), [
1337
- [Ke, g.value]
1337
+ [Ke, m.value]
1338
1338
  ])
1339
1339
  ]));
1340
1340
  }
@@ -1357,125 +1357,125 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1357
1357
  modelValue: { type: Boolean, default: !1 }
1358
1358
  },
1359
1359
  emits: ["update:modelValue", "show", "hide", "before-show", "before-hide"],
1360
- setup(t, { expose: D, emit: e }) {
1361
- const n = t, g = e, v = z(), h = z(), S = z(), C = z(!1), B = z(), x = z(), m = z({});
1362
- let w = null, k = null;
1360
+ setup(t, { expose: x, emit: e }) {
1361
+ const n = t, m = e, v = z(), p = z(), I = z(), C = z(!1), B = z(), $ = z(), w = z({});
1362
+ let g = null, b = null;
1363
1363
  const A = q(() => {
1364
1364
  if (!C.value || !B.value) return {};
1365
1365
  const j = {};
1366
1366
  n.width !== "auto" && (j.width = typeof n.width == "number" ? `${n.width}px` : n.width), n.maxWidth && (j.maxWidth = typeof n.maxWidth == "number" ? `${n.maxWidth}px` : n.maxWidth);
1367
- const { top: ee, left: p } = P();
1368
- return j.top = `${ee}px`, j.left = `${p}px`, j;
1367
+ const { top: ee, left: h } = P();
1368
+ return j.top = `${ee}px`, j.left = `${h}px`, j;
1369
1369
  }), U = q(() => {
1370
1370
  if (!n.showArrow) return {};
1371
- if (Object.keys(m.value).length > 0)
1372
- return m.value;
1371
+ if (Object.keys(w.value).length > 0)
1372
+ return w.value;
1373
1373
  const j = {};
1374
1374
  return n.placement.startsWith("top") || n.placement.startsWith("bottom") ? j.left = "50%" : j.top = "50%", j;
1375
1375
  });
1376
1376
  function P() {
1377
1377
  var N, oe;
1378
1378
  if (!B.value) return { top: 0, left: 0 };
1379
- const { width: j, height: ee, top: p, left: d } = B.value, o = ((N = S.value) == null ? void 0 : N.offsetWidth) || 200, i = ((oe = S.value) == null ? void 0 : oe.offsetHeight) || 100;
1380
- let f = 0, b = 0;
1379
+ const { width: j, height: ee, top: h, left: d } = B.value, o = ((N = I.value) == null ? void 0 : N.offsetWidth) || 200, i = ((oe = I.value) == null ? void 0 : oe.offsetHeight) || 100;
1380
+ let f = 0, k = 0;
1381
1381
  switch (n.placement) {
1382
1382
  case "top":
1383
- f = p - i - n.offset, b = d + (j - o) / 2;
1383
+ f = h - i - n.offset, k = d + (j - o) / 2;
1384
1384
  break;
1385
1385
  case "top-start":
1386
- f = p - i - n.offset, b = d;
1386
+ f = h - i - n.offset, k = d;
1387
1387
  break;
1388
1388
  case "top-end":
1389
- f = p - i - n.offset, b = d + j - o;
1389
+ f = h - i - n.offset, k = d + j - o;
1390
1390
  break;
1391
1391
  case "bottom":
1392
- f = p + ee + n.offset, b = d + (j - o) / 2;
1392
+ f = h + ee + n.offset, k = d + (j - o) / 2;
1393
1393
  break;
1394
1394
  case "bottom-start":
1395
- f = p + ee + n.offset, b = d;
1395
+ f = h + ee + n.offset, k = d;
1396
1396
  break;
1397
1397
  case "bottom-end":
1398
- f = p + ee + n.offset, b = d + j - o;
1398
+ f = h + ee + n.offset, k = d + j - o;
1399
1399
  break;
1400
1400
  case "left":
1401
- f = p + (ee - i) / 2, b = d - o - n.offset;
1401
+ f = h + (ee - i) / 2, k = d - o - n.offset;
1402
1402
  break;
1403
1403
  case "left-start":
1404
- f = p, b = d - o - n.offset;
1404
+ f = h, k = d - o - n.offset;
1405
1405
  break;
1406
1406
  case "left-end":
1407
- f = p + ee - i, b = d - o - n.offset;
1407
+ f = h + ee - i, k = d - o - n.offset;
1408
1408
  break;
1409
1409
  case "right":
1410
- f = p + (ee - i) / 2, b = d + j + n.offset;
1410
+ f = h + (ee - i) / 2, k = d + j + n.offset;
1411
1411
  break;
1412
1412
  case "right-start":
1413
- f = p, b = d + j + n.offset;
1413
+ f = h, k = d + j + n.offset;
1414
1414
  break;
1415
1415
  case "right-end":
1416
- f = p + ee - i, b = d + j + n.offset;
1416
+ f = h + ee - i, k = d + j + n.offset;
1417
1417
  break;
1418
1418
  }
1419
- const L = window.innerWidth, T = window.innerHeight;
1420
- return b < 8 && (b = 8), b + o > L - 8 && (b = L - o - 8), f < 8 && (f = 8), f + i > T - 8 && (f = T - i - 8), { top: f, left: b };
1419
+ const M = window.innerWidth, T = window.innerHeight;
1420
+ return k < 8 && (k = 8), k + o > M - 8 && (k = M - o - 8), f < 8 && (f = 8), f + i > T - 8 && (f = T - i - 8), { top: f, left: k };
1421
1421
  }
1422
1422
  function V() {
1423
- n.disabled || C.value || (G(), n.openDelay > 0 ? w = setTimeout(() => {
1423
+ n.disabled || C.value || (G(), n.openDelay > 0 ? g = setTimeout(() => {
1424
1424
  Z();
1425
1425
  }, n.openDelay) : Z());
1426
1426
  }
1427
1427
  function Z() {
1428
- g("before-show"), C.value = !0, g("update:modelValue", !0), g("show"), re(() => {
1428
+ m("before-show"), C.value = !0, m("update:modelValue", !0), m("show"), re(() => {
1429
1429
  re(() => {
1430
1430
  E();
1431
1431
  });
1432
1432
  });
1433
1433
  }
1434
1434
  function X() {
1435
- C.value && (G(), n.closeDelay > 0 ? k = setTimeout(() => {
1435
+ C.value && (G(), n.closeDelay > 0 ? b = setTimeout(() => {
1436
1436
  ie();
1437
1437
  }, n.closeDelay) : ie());
1438
1438
  }
1439
1439
  function ie() {
1440
- g("before-hide"), C.value = !1, g("update:modelValue", !1), g("hide");
1440
+ m("before-hide"), C.value = !1, m("update:modelValue", !1), m("hide");
1441
1441
  }
1442
1442
  function G() {
1443
- w && (clearTimeout(w), w = null), k && (clearTimeout(k), k = null);
1443
+ g && (clearTimeout(g), g = null), b && (clearTimeout(b), b = null);
1444
1444
  }
1445
1445
  function de() {
1446
- if (!n.showArrow || !B.value || !S.value) {
1447
- m.value = {};
1446
+ if (!n.showArrow || !B.value || !I.value) {
1447
+ w.value = {};
1448
1448
  return;
1449
1449
  }
1450
- const j = B.value, ee = S.value.getBoundingClientRect();
1450
+ const j = B.value, ee = I.value.getBoundingClientRect();
1451
1451
  if (ee.width === 0 || ee.height === 0) {
1452
1452
  const d = {};
1453
- n.placement.startsWith("top") || n.placement.startsWith("bottom") ? d.left = "50%" : d.top = "50%", m.value = d;
1453
+ n.placement.startsWith("top") || n.placement.startsWith("bottom") ? d.left = "50%" : d.top = "50%", w.value = d;
1454
1454
  return;
1455
1455
  }
1456
- const p = {};
1456
+ const h = {};
1457
1457
  if (n.placement.startsWith("top")) {
1458
- p.bottom = "-6px";
1458
+ h.bottom = "-6px";
1459
1459
  const d = j.left + j.width / 2, o = ee.left, i = d - o;
1460
- p.left = `${Math.max(12, Math.min(i, ee.width - 12))}px`;
1460
+ h.left = `${Math.max(12, Math.min(i, ee.width - 12))}px`;
1461
1461
  } else if (n.placement.startsWith("bottom")) {
1462
- p.top = "-6px";
1462
+ h.top = "-6px";
1463
1463
  const d = j.left + j.width / 2, o = ee.left, i = d - o;
1464
- p.left = `${Math.max(12, Math.min(i, ee.width - 12))}px`;
1464
+ h.left = `${Math.max(12, Math.min(i, ee.width - 12))}px`;
1465
1465
  } else if (n.placement.startsWith("left")) {
1466
- p.right = "-6px";
1466
+ h.right = "-6px";
1467
1467
  const d = j.top + j.height / 2, o = ee.top, i = d - o;
1468
- p.top = `${Math.max(12, Math.min(i, ee.height - 12))}px`;
1468
+ h.top = `${Math.max(12, Math.min(i, ee.height - 12))}px`;
1469
1469
  } else if (n.placement.startsWith("right")) {
1470
- p.left = "-6px";
1470
+ h.left = "-6px";
1471
1471
  const d = j.top + j.height / 2, o = ee.top, i = d - o;
1472
- p.top = `${Math.max(12, Math.min(i, ee.height - 12))}px`;
1472
+ h.top = `${Math.max(12, Math.min(i, ee.height - 12))}px`;
1473
1473
  }
1474
- m.value = p;
1474
+ w.value = h;
1475
1475
  }
1476
1476
  function E() {
1477
- h.value && (B.value = h.value.getBoundingClientRect(), S.value && (x.value = S.value.getBoundingClientRect(), de(), C.value && requestAnimationFrame(() => {
1478
- S.value && (x.value = S.value.getBoundingClientRect(), de());
1477
+ p.value && (B.value = p.value.getBoundingClientRect(), I.value && ($.value = I.value.getBoundingClientRect(), de(), C.value && requestAnimationFrame(() => {
1478
+ I.value && ($.value = I.value.getBoundingClientRect(), de());
1479
1479
  })));
1480
1480
  }
1481
1481
  function F() {
@@ -1496,7 +1496,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1496
1496
  function pe(j) {
1497
1497
  if (!n.closeOnClickOutside || !C.value) return;
1498
1498
  const ee = j.target;
1499
- v.value && !v.value.contains(ee) && S.value && !S.value.contains(ee) && X();
1499
+ v.value && !v.value.contains(ee) && I.value && !I.value.contains(ee) && X();
1500
1500
  }
1501
1501
  return ae(() => n.modelValue, (j) => {
1502
1502
  j !== C.value && (j ? V() : X());
@@ -1512,7 +1512,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1512
1512
  n.modelValue && V();
1513
1513
  }), Be(() => {
1514
1514
  G(), document.removeEventListener("click", pe), window.removeEventListener("resize", E), window.removeEventListener("scroll", E, !0);
1515
- }), D({
1515
+ }), x({
1516
1516
  show: V,
1517
1517
  hide: X,
1518
1518
  updatePosition: E
@@ -1523,20 +1523,20 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1523
1523
  }, [
1524
1524
  l("div", {
1525
1525
  ref_key: "triggerRef",
1526
- ref: h,
1526
+ ref: p,
1527
1527
  onClick: F,
1528
1528
  onMouseenter: K,
1529
1529
  onMouseleave: Y
1530
1530
  }, [
1531
1531
  ue(j.$slots, "reference", {}, void 0, !0)
1532
1532
  ], 544),
1533
- (s(), Ie(Fe, { to: "body" }, [
1533
+ (s(), Me(Fe, { to: "body" }, [
1534
1534
  ve($e, { name: "ypopover-fade" }, {
1535
1535
  default: he(() => [
1536
1536
  C.value ? (s(), u("div", {
1537
1537
  key: 0,
1538
1538
  ref_key: "contentRef",
1539
- ref: S,
1539
+ ref: I,
1540
1540
  class: H(["ypopover__content", [
1541
1541
  `ypopover__content--${t.placement}`,
1542
1542
  {
@@ -1565,7 +1565,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1565
1565
  ]))
1566
1566
  ], 512));
1567
1567
  }
1568
- }), _n = /* @__PURE__ */ be(Cn, [["__scopeId", "data-v-be755399"]]), Sn = { class: "relative" }, In = ["value", "placeholder"], Ln = { class: "nh-time-suffix" }, Mn = { class: "nh-time-shortcuts" }, En = { class: "nh-time-shortcuts-list" }, Bn = ["onClick", "onKeydown", "onMouseenter"], Tn = { class: "nh-time-custom" }, zn = { class: "nh-time-custom-header" }, Kn = { class: "nh-time-selection-status" }, Hn = {
1568
+ }), _n = /* @__PURE__ */ be(Cn, [["__scopeId", "data-v-be755399"]]), Sn = { class: "relative" }, Mn = ["value", "placeholder"], In = { class: "nh-time-suffix" }, Ln = { class: "nh-time-shortcuts" }, En = { class: "nh-time-shortcuts-list" }, Bn = ["onClick", "onKeydown", "onMouseenter"], Tn = { class: "nh-time-custom" }, zn = { class: "nh-time-custom-header" }, Kn = { class: "nh-time-selection-status" }, Hn = {
1569
1569
  key: 0,
1570
1570
  class: "status-text"
1571
1571
  }, Rn = {
@@ -1583,8 +1583,8 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1583
1583
  {
1584
1584
  label: "今天",
1585
1585
  getValue: () => {
1586
- const t = /* @__PURE__ */ new Date(), D = new Date(t.getFullYear(), t.getMonth(), t.getDate()), e = new Date(t.getFullYear(), t.getMonth(), t.getDate(), 23, 59, 59);
1587
- return { startDate: D, endDate: e };
1586
+ const t = /* @__PURE__ */ new Date(), x = new Date(t.getFullYear(), t.getMonth(), t.getDate()), e = new Date(t.getFullYear(), t.getMonth(), t.getDate(), 23, 59, 59);
1587
+ return { startDate: x, endDate: e };
1588
1588
  }
1589
1589
  },
1590
1590
  {
@@ -1592,29 +1592,29 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1592
1592
  getValue: () => {
1593
1593
  const t = /* @__PURE__ */ new Date();
1594
1594
  t.setDate(t.getDate() - 1);
1595
- const D = new Date(t.getFullYear(), t.getMonth(), t.getDate()), e = new Date(t.getFullYear(), t.getMonth(), t.getDate(), 23, 59, 59);
1596
- return { startDate: D, endDate: e };
1595
+ const x = new Date(t.getFullYear(), t.getMonth(), t.getDate()), e = new Date(t.getFullYear(), t.getMonth(), t.getDate(), 23, 59, 59);
1596
+ return { startDate: x, endDate: e };
1597
1597
  }
1598
1598
  },
1599
1599
  {
1600
1600
  label: "近7天",
1601
1601
  getValue: () => {
1602
- const t = /* @__PURE__ */ new Date(), D = /* @__PURE__ */ new Date();
1603
- return D.setDate(D.getDate() - 6), D.setHours(0, 0, 0, 0), t.setHours(23, 59, 59, 999), { startDate: D, endDate: t };
1602
+ const t = /* @__PURE__ */ new Date(), x = /* @__PURE__ */ new Date();
1603
+ return x.setDate(x.getDate() - 6), x.setHours(0, 0, 0, 0), t.setHours(23, 59, 59, 999), { startDate: x, endDate: t };
1604
1604
  }
1605
1605
  },
1606
1606
  {
1607
1607
  label: "近30天",
1608
1608
  getValue: () => {
1609
- const t = /* @__PURE__ */ new Date(), D = /* @__PURE__ */ new Date();
1610
- return D.setDate(D.getDate() - 29), D.setHours(0, 0, 0, 0), t.setHours(23, 59, 59, 999), { startDate: D, endDate: t };
1609
+ const t = /* @__PURE__ */ new Date(), x = /* @__PURE__ */ new Date();
1610
+ return x.setDate(x.getDate() - 29), x.setHours(0, 0, 0, 0), t.setHours(23, 59, 59, 999), { startDate: x, endDate: t };
1611
1611
  }
1612
1612
  },
1613
1613
  {
1614
1614
  label: "近3个月",
1615
1615
  getValue: () => {
1616
- const t = /* @__PURE__ */ new Date(), D = /* @__PURE__ */ new Date();
1617
- return D.setMonth(D.getMonth() - 3), D.setHours(0, 0, 0, 0), t.setHours(23, 59, 59, 999), { startDate: D, endDate: t };
1616
+ const t = /* @__PURE__ */ new Date(), x = /* @__PURE__ */ new Date();
1617
+ return x.setMonth(x.getMonth() - 3), x.setHours(0, 0, 0, 0), t.setHours(23, 59, 59, 999), { startDate: x, endDate: t };
1618
1618
  }
1619
1619
  }
1620
1620
  ] },
@@ -1624,27 +1624,27 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1624
1624
  size: { default: "small" }
1625
1625
  },
1626
1626
  emits: ["update:modelValue", "change"],
1627
- setup(t, { emit: D }) {
1628
- const e = t, n = D, g = z(!1), v = z(-1), h = z(-1), S = z(null), C = z(), B = z(), x = z({
1627
+ setup(t, { emit: x }) {
1628
+ const e = t, n = x, m = z(!1), v = z(-1), p = z(-1), I = z(null), C = z(), B = z(), $ = z({
1629
1629
  top: !0,
1630
1630
  left: !0
1631
- }), m = z({
1631
+ }), w = z({
1632
1632
  year: (/* @__PURE__ */ new Date()).getFullYear(),
1633
1633
  month: (/* @__PURE__ */ new Date()).getMonth()
1634
- }), w = z({
1634
+ }), g = z({
1635
1635
  year: (/* @__PURE__ */ new Date()).getFullYear(),
1636
1636
  month: (/* @__PURE__ */ new Date()).getMonth() + 1
1637
- }), k = () => {
1638
- const r = new Date(m.value.year, m.value.month).getTime(), y = new Date(w.value.year, w.value.month).getTime();
1637
+ }), b = () => {
1638
+ const r = new Date(w.value.year, w.value.month).getTime(), y = new Date(g.value.year, g.value.month).getTime();
1639
1639
  if (r >= y) {
1640
- const I = new Date(m.value.year, m.value.month + 1);
1641
- w.value.year = I.getFullYear(), w.value.month = I.getMonth();
1640
+ const S = new Date(w.value.year, w.value.month + 1);
1641
+ g.value.year = S.getFullYear(), g.value.month = S.getMonth();
1642
1642
  }
1643
1643
  }, A = () => {
1644
- const r = new Date(m.value.year, m.value.month).getTime();
1645
- if (new Date(w.value.year, w.value.month).getTime() <= r) {
1646
- const I = new Date(w.value.year, w.value.month - 1);
1647
- m.value.year = I.getFullYear(), m.value.month = I.getMonth();
1644
+ const r = new Date(w.value.year, w.value.month).getTime();
1645
+ if (new Date(g.value.year, g.value.month).getTime() <= r) {
1646
+ const S = new Date(g.value.year, g.value.month - 1);
1647
+ w.value.year = S.getFullYear(), w.value.month = S.getMonth();
1648
1648
  }
1649
1649
  }, U = ["一", "二", "三", "四", "五", "六", "日"], P = z(null), V = z(null), Z = (r) => {
1650
1650
  if (!r) return null;
@@ -1658,12 +1658,12 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1658
1658
  return null;
1659
1659
  }, X = (r) => {
1660
1660
  if (!r) return null;
1661
- const y = r.getFullYear(), I = String(r.getMonth() + 1).padStart(2, "0"), O = String(r.getDate()).padStart(2, "0");
1661
+ const y = r.getFullYear(), S = String(r.getMonth() + 1).padStart(2, "0"), O = String(r.getDate()).padStart(2, "0");
1662
1662
  if (e.includeTime) {
1663
- const a = String(r.getHours()).padStart(2, "0"), c = String(r.getMinutes()).padStart(2, "0"), $ = String(r.getSeconds()).padStart(2, "0");
1664
- return `${y}-${I}-${O} ${a}:${c}:${$}`;
1663
+ const a = String(r.getHours()).padStart(2, "0"), c = String(r.getMinutes()).padStart(2, "0"), D = String(r.getSeconds()).padStart(2, "0");
1664
+ return `${y}-${S}-${O} ${a}:${c}:${D}`;
1665
1665
  } else
1666
- return `${y}-${I}-${O}`;
1666
+ return `${y}-${S}-${O}`;
1667
1667
  }, ie = (r) => r ? r.getTime() : null, G = (r) => r ? {
1668
1668
  startDate: Z(r.startDate),
1669
1669
  endDate: Z(r.endDate)
@@ -1673,12 +1673,12 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1673
1673
  } : e.format === "timestamp" ? {
1674
1674
  startDate: ie(r.startDate),
1675
1675
  endDate: ie(r.endDate)
1676
- } : r, E = (r, y) => `${String(y + 1).padStart(2, "0")}/${r}`, F = (r, y) => r.getFullYear() === y.getFullYear() && r.getMonth() === y.getMonth() && r.getDate() === y.getDate(), K = (r, y, I) => !y || !I ? !1 : r >= y && r <= I, Y = (r) => {
1676
+ } : r, E = (r, y) => `${String(y + 1).padStart(2, "0")}/${r}`, F = (r, y) => r.getFullYear() === y.getFullYear() && r.getMonth() === y.getMonth() && r.getDate() === y.getDate(), K = (r, y, S) => !y || !S ? !1 : r >= y && r <= S, Y = (r) => {
1677
1677
  const y = G(r);
1678
1678
  if (!(y != null && y.startDate) || !(y != null && y.endDate))
1679
1679
  return -1;
1680
- for (let I = 0; I < e.shortcuts.length; I++) {
1681
- const O = e.shortcuts[I].getValue();
1680
+ for (let S = 0; S < e.shortcuts.length; S++) {
1681
+ const O = e.shortcuts[S].getValue();
1682
1682
  if (O.startDate && O.endDate && y.startDate && y.endDate) {
1683
1683
  const a = new Date(
1684
1684
  y.startDate.getFullYear(),
@@ -1688,7 +1688,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1688
1688
  y.endDate.getFullYear(),
1689
1689
  y.endDate.getMonth(),
1690
1690
  y.endDate.getDate()
1691
- ), $ = new Date(
1691
+ ), D = new Date(
1692
1692
  O.startDate.getFullYear(),
1693
1693
  O.startDate.getMonth(),
1694
1694
  O.startDate.getDate()
@@ -1697,16 +1697,16 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1697
1697
  O.endDate.getMonth(),
1698
1698
  O.endDate.getDate()
1699
1699
  );
1700
- if (a.getTime() === $.getTime() && c.getTime() === _.getTime())
1701
- return I;
1700
+ if (a.getTime() === D.getTime() && c.getTime() === _.getTime())
1701
+ return S;
1702
1702
  }
1703
1703
  }
1704
1704
  return -1;
1705
1705
  }, ne = (r, y) => {
1706
- const I = new Date(r, y, 1), O = new Date(r, y + 1, 0), a = I.getDay(), c = O.getDate(), $ = [], _ = /* @__PURE__ */ new Date(), M = a === 0 ? 6 : a - 1, W = new Date(r, y, 0);
1707
- for (let le = M - 1; le >= 0; le--) {
1706
+ const S = new Date(r, y, 1), O = new Date(r, y + 1, 0), a = S.getDay(), c = O.getDate(), D = [], _ = /* @__PURE__ */ new Date(), L = a === 0 ? 6 : a - 1, W = new Date(r, y, 0);
1707
+ for (let le = L - 1; le >= 0; le--) {
1708
1708
  const xe = new Date(r, y - 1, W.getDate() - le);
1709
- $.push({
1709
+ D.push({
1710
1710
  date: xe,
1711
1711
  day: xe.getDate(),
1712
1712
  isCurrentMonth: !1,
@@ -1719,7 +1719,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1719
1719
  }
1720
1720
  for (let le = 1; le <= c; le++) {
1721
1721
  const xe = new Date(r, y, le);
1722
- $.push({
1722
+ D.push({
1723
1723
  date: xe,
1724
1724
  day: le,
1725
1725
  isCurrentMonth: !0,
@@ -1729,10 +1729,10 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1729
1729
  isDisabled: !1
1730
1730
  });
1731
1731
  }
1732
- const J = 42 - $.length;
1732
+ const J = 42 - D.length;
1733
1733
  for (let le = 1; le <= J; le++) {
1734
1734
  const xe = new Date(r, y + 1, le);
1735
- $.push({
1735
+ D.push({
1736
1736
  date: xe,
1737
1737
  day: le,
1738
1738
  isCurrentMonth: !1,
@@ -1744,142 +1744,142 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1744
1744
  });
1745
1745
  }
1746
1746
  const ye = [];
1747
- for (let le = 0; le < $.length; le += 7)
1748
- ye.push($.slice(le, le + 7));
1747
+ for (let le = 0; le < D.length; le += 7)
1748
+ ye.push(D.slice(le, le + 7));
1749
1749
  return ye;
1750
1750
  }, Q = (r) => {
1751
1751
  const y = de(r);
1752
1752
  n("update:modelValue", y), n("change", y);
1753
1753
  }, pe = () => {
1754
1754
  if (!C.value || !B.value) return;
1755
- const r = C.value.getBoundingClientRect(), y = B.value.getBoundingClientRect(), I = window.innerWidth, a = window.innerHeight - r.bottom, c = r.top, $ = y.height || 400;
1756
- a < $ && c > $ ? x.value.top = !1 : x.value.top = !0;
1757
- const _ = I - r.left, M = y.width || 640;
1758
- _ < M ? x.value.left = !1 : x.value.left = !0;
1755
+ const r = C.value.getBoundingClientRect(), y = B.value.getBoundingClientRect(), S = window.innerWidth, a = window.innerHeight - r.bottom, c = r.top, D = y.height || 400;
1756
+ a < D && c > D ? $.value.top = !1 : $.value.top = !0;
1757
+ const _ = S - r.left, L = y.width || 640;
1758
+ _ < L ? $.value.left = !1 : $.value.left = !0;
1759
1759
  }, j = () => {
1760
- if (g.value = !g.value, g.value) {
1760
+ if (m.value = !m.value, m.value) {
1761
1761
  const r = G(e.modelValue);
1762
- if (P.value = (r == null ? void 0 : r.startDate) || null, V.value = (r == null ? void 0 : r.endDate) || null, h.value = Y(e.modelValue), v.value = -1, r != null && r.startDate && (m.value.year = r.startDate.getFullYear(), m.value.month = r.startDate.getMonth()), r != null && r.endDate)
1763
- w.value.year = r.endDate.getFullYear(), w.value.month = r.endDate.getMonth();
1762
+ if (P.value = (r == null ? void 0 : r.startDate) || null, V.value = (r == null ? void 0 : r.endDate) || null, p.value = Y(e.modelValue), v.value = -1, r != null && r.startDate && (w.value.year = r.startDate.getFullYear(), w.value.month = r.startDate.getMonth()), r != null && r.endDate)
1763
+ g.value.year = r.endDate.getFullYear(), g.value.month = r.endDate.getMonth();
1764
1764
  else {
1765
- const y = new Date(m.value.year, m.value.month + 1);
1766
- w.value.year = y.getFullYear(), w.value.month = y.getMonth();
1765
+ const y = new Date(w.value.year, w.value.month + 1);
1766
+ g.value.year = y.getFullYear(), g.value.month = y.getMonth();
1767
1767
  }
1768
- k(), re(() => {
1768
+ b(), re(() => {
1769
1769
  pe();
1770
1770
  });
1771
1771
  }
1772
1772
  }, ee = (r) => {
1773
- const y = r.target, I = C.value, O = B.value;
1774
- I && O && !I.contains(y) && !O.contains(y) && (g.value = !1, v.value = -1);
1775
- }, p = (r) => {
1776
- r.key === "Enter" || r.key === " " ? (r.preventDefault(), j()) : r.key === "ArrowDown" && (r.preventDefault(), g.value = !0, re(() => {
1777
- pe(), b();
1773
+ const y = r.target, S = C.value, O = B.value;
1774
+ S && O && !S.contains(y) && !O.contains(y) && (m.value = !1, v.value = -1);
1775
+ }, h = (r) => {
1776
+ r.key === "Enter" || r.key === " " ? (r.preventDefault(), j()) : r.key === "ArrowDown" && (r.preventDefault(), m.value = !0, re(() => {
1777
+ pe(), k();
1778
1778
  }));
1779
1779
  }, d = (r) => {
1780
1780
  var y;
1781
- r.key === "Escape" && (g.value = !1, v.value = -1, (y = C.value) == null || y.focus());
1781
+ r.key === "Escape" && (m.value = !1, v.value = -1, (y = C.value) == null || y.focus());
1782
1782
  }, o = (r, y) => {
1783
- r.key === "ArrowDown" ? (r.preventDefault(), v.value = Math.min(y + 1, e.shortcuts.length - 1), L(v.value)) : r.key === "ArrowUp" ? (r.preventDefault(), v.value = Math.max(y - 1, 0), L(v.value)) : (r.key === "Enter" || r.key === " ") && (r.preventDefault(), T(e.shortcuts[y]));
1783
+ r.key === "ArrowDown" ? (r.preventDefault(), v.value = Math.min(y + 1, e.shortcuts.length - 1), M(v.value)) : r.key === "ArrowUp" ? (r.preventDefault(), v.value = Math.max(y - 1, 0), M(v.value)) : (r.key === "Enter" || r.key === " ") && (r.preventDefault(), T(e.shortcuts[y]));
1784
1784
  }, i = (r) => {
1785
1785
  v.value = r;
1786
1786
  }, f = () => {
1787
1787
  v.value = -1;
1788
- }, b = () => {
1789
- v.value = 0, L(0);
1790
- }, L = (r) => {
1788
+ }, k = () => {
1789
+ v.value = 0, M(0);
1790
+ }, M = (r) => {
1791
1791
  if (B.value) {
1792
- const I = B.value.querySelectorAll(".nh-time-shortcut")[r];
1793
- I && I.focus();
1792
+ const S = B.value.querySelectorAll(".nh-time-shortcut")[r];
1793
+ S && S.focus();
1794
1794
  }
1795
1795
  }, T = (r) => {
1796
1796
  const y = r.getValue();
1797
- e.includeTime && y.startDate && y.endDate && (y.startDate.setHours(0, 0, 0, 0), y.endDate.setHours(23, 59, 59, 999)), Q(y), h.value = e.shortcuts.findIndex((I) => I.label === r.label), v.value = -1, g.value = !1;
1797
+ e.includeTime && y.startDate && y.endDate && (y.startDate.setHours(0, 0, 0, 0), y.endDate.setHours(23, 59, 59, 999)), Q(y), p.value = e.shortcuts.findIndex((S) => S.label === r.label), v.value = -1, m.value = !1;
1798
1798
  }, N = (r, y) => {
1799
1799
  if (!r || r.isDisabled) return;
1800
- let I;
1801
- if (e.includeTime ? (I = new Date(r.date), y === "start" || !P.value ? I.setHours(0, 0, 0, 0) : I.setHours(23, 59, 59, 999)) : I = new Date(r.date.getFullYear(), r.date.getMonth(), r.date.getDate()), !P.value && !V.value)
1802
- P.value = I, V.value = null;
1800
+ let S;
1801
+ if (e.includeTime ? (S = new Date(r.date), y === "start" || !P.value ? S.setHours(0, 0, 0, 0) : S.setHours(23, 59, 59, 999)) : S = new Date(r.date.getFullYear(), r.date.getMonth(), r.date.getDate()), !P.value && !V.value)
1802
+ P.value = S, V.value = null;
1803
1803
  else if (P.value && !V.value)
1804
- if (I >= P.value)
1805
- e.includeTime && I.setHours(23, 59, 59, 999), V.value = I;
1804
+ if (S >= P.value)
1805
+ e.includeTime && S.setHours(23, 59, 59, 999), V.value = S;
1806
1806
  else {
1807
1807
  const O = P.value;
1808
- e.includeTime && O.setHours(23, 59, 59, 999), V.value = O, P.value = I;
1808
+ e.includeTime && O.setHours(23, 59, 59, 999), V.value = O, P.value = S;
1809
1809
  }
1810
1810
  else
1811
- P.value = I, V.value = null;
1812
- if (h.value = -1, P.value && V.value) {
1811
+ P.value = S, V.value = null;
1812
+ if (p.value = -1, P.value && V.value) {
1813
1813
  const O = new Date(V.value);
1814
- e.includeTime && O.setHours(23, 59, 59, 999), S.value = {
1814
+ e.includeTime && O.setHours(23, 59, 59, 999), I.value = {
1815
1815
  startDate: P.value,
1816
1816
  endDate: O
1817
1817
  };
1818
1818
  } else
1819
- S.value = null;
1819
+ I.value = null;
1820
1820
  }, oe = (r, y) => {
1821
1821
  if (!r) return ["nh-date-table-td"];
1822
- const I = ["nh-date-table-td"];
1823
- return r.isCurrentMonth || I.push("is-prev-month"), r.isToday && I.push("is-today"), r.isDisabled && I.push("is-disabled"), P.value && F(r.date, P.value) && I.push("is-selected", "is-start"), V.value && F(r.date, V.value) && I.push("is-selected", "is-end"), P.value && V.value && K(r.date, P.value, V.value) && I.push("is-in-range"), I;
1822
+ const S = ["nh-date-table-td"];
1823
+ return r.isCurrentMonth || S.push("is-prev-month"), r.isToday && S.push("is-today"), r.isDisabled && S.push("is-disabled"), P.value && F(r.date, P.value) && S.push("is-selected", "is-start"), V.value && F(r.date, V.value) && S.push("is-selected", "is-end"), P.value && V.value && K(r.date, P.value, V.value) && S.push("is-in-range"), S;
1824
1824
  }, me = () => {
1825
- S.value && (e.includeTime && S.value.endDate && S.value.endDate.setHours(23, 59, 59, 999), Q(S.value), h.value = Y(S.value), g.value = !1);
1825
+ I.value && (e.includeTime && I.value.endDate && I.value.endDate.setHours(23, 59, 59, 999), Q(I.value), p.value = Y(I.value), m.value = !1);
1826
1826
  }, _e = () => {
1827
- Q({ startDate: null, endDate: null }), We(), v.value = -1, g.value = !1;
1827
+ Q({ startDate: null, endDate: null }), We(), v.value = -1, m.value = !1;
1828
1828
  }, He = () => {
1829
- g.value && re(() => {
1829
+ m.value && re(() => {
1830
1830
  pe();
1831
1831
  });
1832
- }, qe = q(() => ne(m.value.year, m.value.month)), Te = q(() => ne(w.value.year, w.value.month)), Le = q(() => {
1832
+ }, qe = q(() => ne(w.value.year, w.value.month)), Te = q(() => ne(g.value.year, g.value.month)), Ie = q(() => {
1833
1833
  const r = G(e.modelValue);
1834
1834
  if (!r || !r.startDate || !r.endDate)
1835
1835
  return "";
1836
1836
  const y = (a) => {
1837
- const c = String(a.getFullYear()), $ = String(a.getMonth() + 1).padStart(2, "0"), _ = String(a.getDate()).padStart(2, "0");
1838
- return `${c}/${$}/${_}`;
1839
- }, I = y(r.startDate), O = y(r.endDate);
1840
- return !e.includeTime && I === O ? I : `${I} - ${O}`;
1841
- }), Me = q(() => [
1837
+ const c = String(a.getFullYear()), D = String(a.getMonth() + 1).padStart(2, "0"), _ = String(a.getDate()).padStart(2, "0");
1838
+ return `${c}/${D}/${_}`;
1839
+ }, S = y(r.startDate), O = y(r.endDate);
1840
+ return !e.includeTime && S === O ? S : `${S} - ${O}`;
1841
+ }), Le = q(() => [
1842
1842
  "nh-time-dropdown",
1843
1843
  {
1844
- "nh-time-dropdown-top": !x.value.top,
1845
- "nh-time-dropdown-right": !x.value.left
1844
+ "nh-time-dropdown-top": !$.value.top,
1845
+ "nh-time-dropdown-right": !$.value.left
1846
1846
  }
1847
1847
  ]), Re = q(() => {
1848
1848
  const r = G(e.modelValue);
1849
1849
  return !!(r != null && r.startDate && (r != null && r.endDate));
1850
1850
  }), Ae = q(() => !!(P.value && V.value)), We = () => {
1851
- P.value = null, V.value = null, S.value = null, h.value = -1;
1851
+ P.value = null, V.value = null, I.value = null, p.value = -1;
1852
1852
  };
1853
1853
  ae(() => e.modelValue, (r) => {
1854
1854
  const y = G(r);
1855
1855
  if (y != null && y.startDate) {
1856
- const I = y.startDate;
1857
- m.value.year = I.getFullYear(), m.value.month = I.getMonth();
1856
+ const S = y.startDate;
1857
+ w.value.year = S.getFullYear(), w.value.month = S.getMonth();
1858
1858
  }
1859
1859
  if (y != null && y.endDate) {
1860
- const I = y.endDate;
1861
- w.value.year = I.getFullYear(), w.value.month = I.getMonth();
1860
+ const S = y.endDate;
1861
+ g.value.year = S.getFullYear(), g.value.month = S.getMonth();
1862
1862
  } else if (y != null && y.startDate) {
1863
- const I = new Date(m.value.year, m.value.month + 1);
1864
- w.value.year = I.getFullYear(), w.value.month = I.getMonth();
1863
+ const S = new Date(w.value.year, w.value.month + 1);
1864
+ g.value.year = S.getFullYear(), g.value.month = S.getMonth();
1865
1865
  }
1866
- (y != null && y.startDate || y != null && y.endDate) && k(), g.value || (h.value = Y(r));
1867
- }, { immediate: !0, deep: !0 }), ae([m, w], () => {
1868
- const r = new Date(m.value.year, m.value.month).getTime(), y = new Date(w.value.year, w.value.month).getTime();
1866
+ (y != null && y.startDate || y != null && y.endDate) && b(), m.value || (p.value = Y(r));
1867
+ }, { immediate: !0, deep: !0 }), ae([w, g], () => {
1868
+ const r = new Date(w.value.year, w.value.month).getTime(), y = new Date(g.value.year, g.value.month).getTime();
1869
1869
  if (r === y) {
1870
- const I = new Date(m.value.year, m.value.month + 1);
1871
- w.value.year = I.getFullYear(), w.value.month = I.getMonth();
1870
+ const S = new Date(w.value.year, w.value.month + 1);
1871
+ g.value.year = S.getFullYear(), g.value.month = S.getMonth();
1872
1872
  }
1873
1873
  }, { deep: !0 }), Ce(() => {
1874
- document.addEventListener("click", ee), window.addEventListener("resize", He), window.addEventListener("scroll", He), h.value = Y(e.modelValue);
1874
+ document.addEventListener("click", ee), window.addEventListener("resize", He), window.addEventListener("scroll", He), p.value = Y(e.modelValue);
1875
1875
  const r = G(e.modelValue);
1876
- if (r != null && r.startDate && (m.value.year = r.startDate.getFullYear(), m.value.month = r.startDate.getMonth()), r != null && r.endDate)
1877
- w.value.year = r.endDate.getFullYear(), w.value.month = r.endDate.getMonth();
1876
+ if (r != null && r.startDate && (w.value.year = r.startDate.getFullYear(), w.value.month = r.startDate.getMonth()), r != null && r.endDate)
1877
+ g.value.year = r.endDate.getFullYear(), g.value.month = r.endDate.getMonth();
1878
1878
  else {
1879
- const y = new Date(m.value.year, m.value.month + 1);
1880
- w.value.year = y.getFullYear(), w.value.month = y.getMonth();
1879
+ const y = new Date(w.value.year, w.value.month + 1);
1880
+ g.value.year = y.getFullYear(), g.value.month = y.getMonth();
1881
1881
  }
1882
- k();
1882
+ b();
1883
1883
  }), Be(() => {
1884
1884
  document.removeEventListener("click", ee), window.removeEventListener("resize", He), window.removeEventListener("scroll", He);
1885
1885
  });
@@ -1887,15 +1887,15 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1887
1887
  e.clearable && (Q({ startDate: null, endDate: null }), We(), v.value = -1);
1888
1888
  }, ze = (r, y) => {
1889
1889
  if (r === "start") {
1890
- const I = new Date(m.value.year, m.value.month + y, 1);
1891
- m.value.year = I.getFullYear(), m.value.month = I.getMonth(), k();
1890
+ const S = new Date(w.value.year, w.value.month + y, 1);
1891
+ w.value.year = S.getFullYear(), w.value.month = S.getMonth(), b();
1892
1892
  } else {
1893
- const I = new Date(w.value.year, w.value.month + y, 1);
1894
- w.value.year = I.getFullYear(), w.value.month = I.getMonth(), A();
1893
+ const S = new Date(g.value.year, g.value.month + y, 1);
1894
+ g.value.year = S.getFullYear(), g.value.month = S.getMonth(), A();
1895
1895
  }
1896
1896
  };
1897
1897
  return (r, y) => {
1898
- const I = Ve("YButton");
1898
+ const S = Ve("YButton");
1899
1899
  return s(), u("div", {
1900
1900
  class: H(["nh-time-search", [`nh-time--${t.size}`]])
1901
1901
  }, [
@@ -1904,17 +1904,17 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1904
1904
  ref_key: "trigger",
1905
1905
  ref: C,
1906
1906
  onClick: j,
1907
- onKeydown: p,
1908
- class: H(["nh-time-trigger", { "is-focus": g.value, "has-value": Re.value }]),
1907
+ onKeydown: h,
1908
+ class: H(["nh-time-trigger", { "is-focus": m.value, "has-value": Re.value }]),
1909
1909
  tabindex: "0"
1910
1910
  }, [
1911
1911
  l("input", {
1912
1912
  readonly: "",
1913
- value: Le.value,
1913
+ value: Ie.value,
1914
1914
  placeholder: t.placeholder,
1915
1915
  class: "nh-time-input"
1916
- }, null, 8, In),
1917
- l("span", Ln, [
1916
+ }, null, 8, Mn),
1917
+ l("span", In, [
1918
1918
  t.clearable && Re.value ? (s(), u("i", {
1919
1919
  key: 0,
1920
1920
  onClick: te(Pe, ["stop"]),
@@ -1944,7 +1944,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1944
1944
  ])
1945
1945
  ], -1)),
1946
1946
  l("i", {
1947
- class: H(["nh-time-arrow", { "is-reverse": g.value }])
1947
+ class: H(["nh-time-arrow", { "is-reverse": m.value }])
1948
1948
  }, [...y[5] || (y[5] = [
1949
1949
  l("svg", {
1950
1950
  viewBox: "0 0 1024 1024",
@@ -1961,14 +1961,14 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1961
1961
  ], 34),
1962
1962
  ve($e, { name: "el-zoom-in-top" }, {
1963
1963
  default: he(() => [
1964
- g.value ? (s(), u("div", {
1964
+ m.value ? (s(), u("div", {
1965
1965
  key: 0,
1966
1966
  ref_key: "dropdown",
1967
1967
  ref: B,
1968
- class: H(Me.value),
1968
+ class: H(Le.value),
1969
1969
  onKeydown: d
1970
1970
  }, [
1971
- l("div", Mn, [
1971
+ l("div", Ln, [
1972
1972
  y[7] || (y[7] = l("div", { class: "nh-time-shortcuts-title" }, "快捷选项", -1)),
1973
1973
  l("ul", En, [
1974
1974
  (s(!0), u(ce, null, ge(t.shortcuts, (O, a) => (s(), u("li", {
@@ -1981,7 +1981,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
1981
1981
  "nh-time-shortcut",
1982
1982
  {
1983
1983
  "is-active": v.value === a,
1984
- "is-selected": h.value === a
1984
+ "is-selected": p.value === a
1985
1985
  }
1986
1986
  ]),
1987
1987
  tabindex: "0"
@@ -2015,7 +2015,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2015
2015
  })
2016
2016
  ], -1)
2017
2017
  ])]),
2018
- l("span", Yn, se(E(m.value.year, m.value.month)), 1),
2018
+ l("span", Yn, se(E(w.value.year, w.value.month)), 1),
2019
2019
  l("button", {
2020
2020
  onClick: y[1] || (y[1] = (O) => ze("start", 1)),
2021
2021
  class: "nh-date-picker-btn nh-date-picker-next-btn",
@@ -2047,8 +2047,8 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2047
2047
  (s(!0), u(ce, null, ge(qe.value, (O, a) => (s(), u("tr", {
2048
2048
  key: `start-week-${a}`
2049
2049
  }, [
2050
- (s(!0), u(ce, null, ge(O, (c, $) => (s(), u("td", {
2051
- key: `start-day-${a}-${$}`,
2050
+ (s(!0), u(ce, null, ge(O, (c, D) => (s(), u("td", {
2051
+ key: `start-day-${a}-${D}`,
2052
2052
  class: H(oe(c)),
2053
2053
  onClick: (_) => N(c, "start")
2054
2054
  }, [
@@ -2081,7 +2081,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2081
2081
  })
2082
2082
  ], -1)
2083
2083
  ])]),
2084
- l("span", Xn, se(E(w.value.year, w.value.month)), 1),
2084
+ l("span", Xn, se(E(g.value.year, g.value.month)), 1),
2085
2085
  l("button", {
2086
2086
  onClick: y[3] || (y[3] = (O) => ze("end", 1)),
2087
2087
  class: "nh-date-picker-btn nh-date-picker-next-btn",
@@ -2113,8 +2113,8 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2113
2113
  (s(!0), u(ce, null, ge(Te.value, (O, a) => (s(), u("tr", {
2114
2114
  key: `end-week-${a}`
2115
2115
  }, [
2116
- (s(!0), u(ce, null, ge(O, (c, $) => (s(), u("td", {
2117
- key: `end-day-${a}-${$}`,
2116
+ (s(!0), u(ce, null, ge(O, (c, D) => (s(), u("td", {
2117
+ key: `end-day-${a}-${D}`,
2118
2118
  class: H(oe(c)),
2119
2119
  onClick: (_) => N(c, "end")
2120
2120
  }, [
@@ -2130,7 +2130,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2130
2130
  ])
2131
2131
  ]),
2132
2132
  l("div", ol, [
2133
- t.clearable ? (s(), Ie(I, {
2133
+ t.clearable ? (s(), Me(S, {
2134
2134
  key: 0,
2135
2135
  onClick: _e,
2136
2136
  variant: "secondary",
@@ -2141,7 +2141,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2141
2141
  ])]),
2142
2142
  _: 1
2143
2143
  }, 8, ["size"])) : R("", !0),
2144
- ve(I, {
2144
+ ve(S, {
2145
2145
  onClick: me,
2146
2146
  disabled: !Ae.value,
2147
2147
  variant: "primary",
@@ -2182,35 +2182,35 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2182
2182
  showText: { type: Boolean, default: !1 }
2183
2183
  },
2184
2184
  emits: ["update:modelValue", "change", "focus", "blur"],
2185
- setup(t, { emit: D }) {
2186
- const e = t, n = D, g = z(), v = q(() => e.modelValue === e.trueValue), h = q(() => {
2185
+ setup(t, { emit: x }) {
2186
+ const e = t, n = x, m = z(), v = q(() => e.modelValue === e.trueValue), p = q(() => {
2187
2187
  const C = {};
2188
2188
  return C.background = v.value ? e.activeColor : e.inactiveColor, C;
2189
2189
  });
2190
- function S() {
2190
+ function I() {
2191
2191
  if (e.disabled || e.loading) return;
2192
2192
  const C = v.value ? e.falseValue : e.trueValue;
2193
2193
  n("update:modelValue", C), n("change", C);
2194
2194
  }
2195
2195
  return Ce(() => {
2196
- const C = g.value;
2196
+ const C = m.value;
2197
2197
  C && (C.addEventListener("focus", (B) => n("focus", B)), C.addEventListener("blur", (B) => n("blur", B)));
2198
2198
  }), (C, B) => (s(), u("button", {
2199
2199
  ref_key: "rootEl",
2200
- ref: g,
2200
+ ref: m,
2201
2201
  class: H(["yswitch", [
2202
2202
  `yswitch--${t.size}`,
2203
2203
  { "yswitch--checked": v.value, "yswitch--disabled": t.disabled, "yswitch--loading": t.loading }
2204
2204
  ]]),
2205
- style: fe(h.value),
2205
+ style: fe(p.value),
2206
2206
  role: "switch",
2207
2207
  "aria-checked": v.value,
2208
2208
  "aria-disabled": t.disabled,
2209
2209
  disabled: t.disabled || t.loading,
2210
- onClick: S,
2210
+ onClick: I,
2211
2211
  onKeydown: [
2212
- ke(te(S, ["prevent"]), ["enter"]),
2213
- ke(te(S, ["prevent"]), ["space"])
2212
+ ke(te(I, ["prevent"]), ["enter"]),
2213
+ ke(te(I, ["prevent"]), ["space"])
2214
2214
  ]
2215
2215
  }, [
2216
2216
  B[0] || (B[0] = l("span", { class: "yswitch__track" }, null, -1)),
@@ -2238,8 +2238,8 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2238
2238
  previewSrcList: {}
2239
2239
  },
2240
2240
  emits: ["load", "error", "preview"],
2241
- setup(t, { expose: D, emit: e }) {
2242
- const n = t, g = e, v = z(), h = z(), S = z(), C = z(!1), B = z(!1), x = z(!1), m = z(!1), w = z(!1), k = z("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPCEtLSDog4zmma8gLS0+CiAgPHJlY3Qgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIGZpbGw9IiNGM0Y0RjYiLz4KICAKICA8IS0tIOWbvueJh+WbvuaghyAtLT4KICA8cmVjdCB4PSI1MCIgeT0iNDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iODAiIHJ4PSI0IiBmaWxsPSIjRDFENURCIiBzdHJva2U9IiM5Q0EzQUYiIHN0cm9rZS13aWR0aD0iMiIvPgogIAogIDwhLS0g5Zu+54mH5YaF6YOo6KOF6aWwIC0tPgogIDxjaXJjbGUgY3g9IjgwIiBjeT0iNzAiIHI9IjgiIGZpbGw9IiM5Q0EzQUYiLz4KICA8cGF0aCBkPSJNNjAgMTAwIEw5MCA4NSBMMTIwIDk1IEwxNDAgODAiIHN0cm9rZT0iIzlDQTNBRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAKICA8IS0tIOaWh+WtlyAtLT4KICA8dGV4dCB4PSIxMDAiIHk9IjE2MCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzZCNzI4MCIgZm9udC1mYW1pbHk9IkFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIj4KICAgIEltYWdlIG5vdCBhdmFpbGFibGUKICA8L3RleHQ+Cjwvc3ZnPiA="), A = z(""), U = z(1), P = z(!1), V = z({
2241
+ setup(t, { expose: x, emit: e }) {
2242
+ const n = t, m = e, v = z(), p = z(), I = z(), C = z(!1), B = z(!1), $ = z(!1), w = z(!1), g = z(!1), b = z("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPCEtLSDog4zmma8gLS0+CiAgPHJlY3Qgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIGZpbGw9IiNGM0Y0RjYiLz4KICAKICA8IS0tIOWbvueJh+WbvuaghyAtLT4KICA8cmVjdCB4PSI1MCIgeT0iNDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iODAiIHJ4PSI0IiBmaWxsPSIjRDFENURCIiBzdHJva2U9IiM5Q0EzQUYiIHN0cm9rZS13aWR0aD0iMiIvPgogIAogIDwhLS0g5Zu+54mH5YaF6YOo6KOF6aWwIC0tPgogIDxjaXJjbGUgY3g9IjgwIiBjeT0iNzAiIHI9IjgiIGZpbGw9IiM5Q0EzQUYiLz4KICA8cGF0aCBkPSJNNjAgMTAwIEw5MCA4NSBMMTIwIDk1IEwxNDAgODAiIHN0cm9rZT0iIzlDQTNBRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAKICA8IS0tIOaWh+WtlyAtLT4KICA8dGV4dCB4PSIxMDAiIHk9IjE2MCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzZCNzI4MCIgZm9udC1mYW1pbHk9IkFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIj4KICAgIEltYWdlIG5vdCBhdmFpbGFibGUKICA8L3RleHQ+Cjwvc3ZnPiA="), A = z(""), U = z(1), P = z(!1), V = z({
2243
2243
  overflow: "",
2244
2244
  paddingRight: ""
2245
2245
  }), Z = {
@@ -2293,7 +2293,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2293
2293
  !n.lazy || !v.value || (Q = new IntersectionObserver(
2294
2294
  (T) => {
2295
2295
  T.forEach((N) => {
2296
- N.isIntersecting && (m.value = !0, k.value = n.src, Q == null || Q.unobserve(N.target));
2296
+ N.isIntersecting && (w.value = !0, b.value = n.src, Q == null || Q.unobserve(N.target));
2297
2297
  });
2298
2298
  },
2299
2299
  {
@@ -2301,22 +2301,22 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2301
2301
  }
2302
2302
  ), Q.observe(v.value));
2303
2303
  }, j = (T) => {
2304
- C.value = !0, B.value = !1, x.value = !1, g("load", T);
2304
+ C.value = !0, B.value = !1, $.value = !1, m("load", T);
2305
2305
  }, ee = (T) => {
2306
- x.value = !0, B.value = !1, C.value = !1, g("error", T);
2307
- }, p = () => {
2308
- x.value = !1, B.value = !0, C.value = !1, re(() => {
2309
- h.value && (h.value.src = n.src);
2306
+ $.value = !0, B.value = !1, C.value = !1, m("error", T);
2307
+ }, h = () => {
2308
+ $.value = !1, B.value = !0, C.value = !1, re(() => {
2309
+ p.value && (p.value.src = n.src);
2310
2310
  });
2311
2311
  }, d = () => Array.isArray(n.previewSrcList) ? n.previewSrcList.find(Boolean) || n.src : n.previewSrcList || n.src, o = () => {
2312
- n.preview && (n.previewSrcList || n.src) ? i() : p();
2312
+ n.preview && (n.previewSrcList || n.src) ? i() : h();
2313
2313
  }, i = () => {
2314
2314
  if (!n.preview) return;
2315
2315
  U.value = 1;
2316
2316
  const T = d();
2317
- if (h.value && h.value.complete && h.value.naturalWidth > 0) {
2317
+ if (p.value && p.value.complete && p.value.naturalWidth > 0) {
2318
2318
  A.value = T, re(() => {
2319
- w.value = !0, Y(), g("preview", T);
2319
+ g.value = !0, Y(), m("preview", T);
2320
2320
  });
2321
2321
  return;
2322
2322
  }
@@ -2324,7 +2324,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2324
2324
  let oe = null, me = !1;
2325
2325
  const _e = () => {
2326
2326
  me || (me = !0, oe && (clearTimeout(oe), oe = null), A.value = T, re(() => {
2327
- w.value = !0, Y(), g("preview", T);
2327
+ g.value = !0, Y(), m("preview", T);
2328
2328
  }));
2329
2329
  };
2330
2330
  oe = setTimeout(() => {
@@ -2335,31 +2335,31 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2335
2335
  _e();
2336
2336
  }, N.src = T, N.complete && _e();
2337
2337
  }, f = () => {
2338
- w.value = !1, setTimeout(() => {
2338
+ g.value = !1, setTimeout(() => {
2339
2339
  ne();
2340
2340
  }, 300);
2341
- }, b = (T) => {
2341
+ }, k = (T) => {
2342
2342
  const N = T.deltaY < 0 ? 1 : -1;
2343
2343
  let me = U.value + N * 0.1;
2344
2344
  me = Math.max(0.5, Math.min(2, me)), U.value = me;
2345
2345
  };
2346
2346
  return Ce(() => {
2347
- n.lazy ? pe() : m.value = !0, m.value && (B.value = !0), P.value = !0;
2347
+ n.lazy ? pe() : w.value = !0, w.value && (B.value = !0), P.value = !0;
2348
2348
  }), Be(() => {
2349
- Q && Q.disconnect(), w.value && ne();
2350
- }), ae(() => k.value, () => {
2351
- n.src && m.value && (B.value = !0, x.value = !1, C.value = !1);
2349
+ Q && Q.disconnect(), g.value && ne();
2350
+ }), ae(() => b.value, () => {
2351
+ n.src && w.value && (B.value = !0, $.value = !1, C.value = !1);
2352
2352
  }), ae(() => n.src, (T) => {
2353
- k.value = T || "";
2354
- }), D({
2355
- retryLoad: p,
2353
+ b.value = T || "";
2354
+ }), x({
2355
+ retryLoad: h,
2356
2356
  closePreview: f
2357
2357
  }), (T, N) => (s(), u("div", {
2358
2358
  ref_key: "containerRef",
2359
2359
  ref: v,
2360
2360
  class: H(["yimage-container", X.value])
2361
2361
  }, [
2362
- !C.value && !x.value && !m.value ? (s(), u("div", {
2362
+ !C.value && !$.value && !w.value ? (s(), u("div", {
2363
2363
  key: 0,
2364
2364
  class: "yimage-placeholder",
2365
2365
  style: fe(G.value)
@@ -2380,7 +2380,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2380
2380
  ])
2381
2381
  ], -1)
2382
2382
  ])], 4)) : R("", !0),
2383
- B.value && !x.value ? (s(), u("div", {
2383
+ B.value && !$.value ? (s(), u("div", {
2384
2384
  key: 1,
2385
2385
  class: "yimage-loading",
2386
2386
  style: fe(G.value)
@@ -2389,7 +2389,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2389
2389
  l("div", { class: "yimage-spinner" })
2390
2390
  ], -1)
2391
2391
  ])], 4)) : R("", !0),
2392
- x.value ? (s(), u("div", {
2392
+ $.value ? (s(), u("div", {
2393
2393
  key: 2,
2394
2394
  class: "yimage-error",
2395
2395
  style: fe(G.value),
@@ -2404,8 +2404,8 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2404
2404
  ], 4)) : R("", !0),
2405
2405
  Ee(l("img", {
2406
2406
  ref_key: "imageRef",
2407
- ref: h,
2408
- src: k.value,
2407
+ ref: p,
2408
+ src: b.value,
2409
2409
  alt: t.alt,
2410
2410
  class: H(de.value),
2411
2411
  onLoad: j,
@@ -2413,31 +2413,31 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2413
2413
  onClick: te(i, ["stop"]),
2414
2414
  style: fe(E.value)
2415
2415
  }, null, 46, cl), [
2416
- [Ke, C.value && !x.value]
2416
+ [Ke, C.value && !$.value]
2417
2417
  ]),
2418
- n.preview && (!C.value || B.value || x.value || !m.value) ? (s(), u("div", {
2418
+ n.preview && (!C.value || B.value || $.value || !w.value) ? (s(), u("div", {
2419
2419
  key: 3,
2420
2420
  class: "yimage-preview-trigger",
2421
2421
  onClick: te(i, ["stop"])
2422
2422
  })) : R("", !0),
2423
- P.value ? (s(), Ie(Fe, {
2423
+ P.value ? (s(), Me(Fe, {
2424
2424
  key: 4,
2425
2425
  to: "body"
2426
2426
  }, [
2427
2427
  ve($e, { name: "fade" }, {
2428
2428
  default: he(() => [
2429
- w.value ? (s(), u("div", {
2429
+ g.value ? (s(), u("div", {
2430
2430
  key: 0,
2431
2431
  class: "yimage-preview-mask",
2432
2432
  onClick: te(f, ["self"]),
2433
- onWheel: te(b, ["prevent"])
2433
+ onWheel: te(k, ["prevent"])
2434
2434
  }, [
2435
2435
  l("div", {
2436
- class: H(["yimage-preview-content", { "is-active": w.value }])
2436
+ class: H(["yimage-preview-content", { "is-active": g.value }])
2437
2437
  }, [
2438
2438
  l("img", {
2439
2439
  ref_key: "previewImageRef",
2440
- ref: S,
2440
+ ref: I,
2441
2441
  src: F.value,
2442
2442
  alt: t.alt,
2443
2443
  class: "yimage-preview-image",
@@ -2462,32 +2462,32 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2462
2462
  menuWidth: { default: void 0 }
2463
2463
  },
2464
2464
  setup(t) {
2465
- const D = t, e = z(!1), n = z();
2466
- let g = null;
2467
- const v = q(() => `y-dropdown__menu--${D.placement}`), h = q(() => {
2468
- if (!D.menuWidth) return {};
2469
- const w = typeof D.menuWidth == "number" ? `${D.menuWidth}px` : D.menuWidth;
2465
+ const x = t, e = z(!1), n = z();
2466
+ let m = null;
2467
+ const v = q(() => `y-dropdown__menu--${x.placement}`), p = q(() => {
2468
+ if (!x.menuWidth) return {};
2469
+ const g = typeof x.menuWidth == "number" ? `${x.menuWidth}px` : x.menuWidth;
2470
2470
  return {
2471
- width: w,
2472
- minWidth: w,
2473
- maxWidth: w
2471
+ width: g,
2472
+ minWidth: g,
2473
+ maxWidth: g
2474
2474
  };
2475
- }), S = () => {
2476
- console.log("显示下拉菜单", e.value), !D.disabled && (g && (clearTimeout(g), g = null), e.value = !0, console.log("设置 visible 为 true", e.value), re(() => {
2475
+ }), I = () => {
2476
+ console.log("显示下拉菜单", e.value), !x.disabled && (m && (clearTimeout(m), m = null), e.value = !0, console.log("设置 visible 为 true", e.value), re(() => {
2477
2477
  B();
2478
2478
  }));
2479
2479
  }, C = () => {
2480
- console.log("隐藏下拉菜单"), g = setTimeout(() => {
2480
+ console.log("隐藏下拉菜单"), m = setTimeout(() => {
2481
2481
  e.value = !1, console.log("设置 visible 为 false", e.value);
2482
2482
  }, 150);
2483
2483
  }, B = () => {
2484
2484
  if (!n.value) return;
2485
- const w = n.value.querySelector(".y-dropdown__trigger"), k = n.value.querySelector(".y-dropdown__menu");
2486
- if (!w || !k) return;
2487
- const A = w.getBoundingClientRect(), U = k.getBoundingClientRect(), P = window.innerWidth, V = window.innerHeight;
2488
- k.style.top = "", k.style.left = "", k.style.right = "", k.style.bottom = "", k.style.transform = "";
2485
+ const g = n.value.querySelector(".y-dropdown__trigger"), b = n.value.querySelector(".y-dropdown__menu");
2486
+ if (!g || !b) return;
2487
+ const A = g.getBoundingClientRect(), U = b.getBoundingClientRect(), P = window.innerWidth, V = window.innerHeight;
2488
+ b.style.top = "", b.style.left = "", b.style.right = "", b.style.bottom = "", b.style.transform = "";
2489
2489
  let Z = 0, X = 0;
2490
- switch (D.placement) {
2490
+ switch (x.placement) {
2491
2491
  case "bottom":
2492
2492
  Z = A.height + 4, X = 0;
2493
2493
  break;
@@ -2502,43 +2502,43 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2502
2502
  break;
2503
2503
  }
2504
2504
  let ie = A.top + Z, G = A.left + X;
2505
- if (D.placement === "bottom" || D.placement === "top") {
2505
+ if (x.placement === "bottom" || x.placement === "top") {
2506
2506
  const de = U.width || 260;
2507
2507
  G + de > P - 10 && (G = P - de - 10), G < 10 && (G = 10);
2508
2508
  }
2509
- if (D.placement === "left" || D.placement === "right") {
2509
+ if (x.placement === "left" || x.placement === "right") {
2510
2510
  const de = U.height || 200;
2511
2511
  ie + de > V - 10 && (ie = V - de - 10), ie < 10 && (ie = 10);
2512
2512
  }
2513
- k.style.top = `${ie}px`, k.style.left = `${G}px`;
2514
- }, x = (w) => {
2515
- D.trigger === "click" && n.value && !n.value.contains(w.target) && (e.value = !1);
2516
- }, m = () => {
2513
+ b.style.top = `${ie}px`, b.style.left = `${G}px`;
2514
+ }, $ = (g) => {
2515
+ x.trigger === "click" && n.value && !n.value.contains(g.target) && (e.value = !1);
2516
+ }, w = () => {
2517
2517
  e.value && B();
2518
2518
  };
2519
2519
  return Ce(() => {
2520
- D.trigger === "click" && document.addEventListener("click", x), window.addEventListener("resize", m), window.addEventListener("scroll", m);
2520
+ x.trigger === "click" && document.addEventListener("click", $), window.addEventListener("resize", w), window.addEventListener("scroll", w);
2521
2521
  }), Be(() => {
2522
- D.trigger === "click" && document.removeEventListener("click", x), g && clearTimeout(g), window.removeEventListener("resize", m), window.removeEventListener("scroll", m);
2522
+ x.trigger === "click" && document.removeEventListener("click", $), m && clearTimeout(m), window.removeEventListener("resize", w), window.removeEventListener("scroll", w);
2523
2523
  }), ae(
2524
- () => D.menuWidth,
2524
+ () => x.menuWidth,
2525
2525
  () => {
2526
2526
  e.value && re(() => {
2527
2527
  B();
2528
2528
  });
2529
2529
  }
2530
- ), (w, k) => (s(), u("div", {
2530
+ ), (g, b) => (s(), u("div", {
2531
2531
  class: "y-dropdown",
2532
2532
  ref_key: "dropdownRef",
2533
2533
  ref: n
2534
2534
  }, [
2535
2535
  l("div", {
2536
2536
  class: "y-dropdown__trigger",
2537
- onMouseenter: S,
2537
+ onMouseenter: I,
2538
2538
  onMouseleave: C
2539
2539
  }, [
2540
- ue(w.$slots, "trigger", {}, () => [
2541
- k[0] || (k[0] = l("button", { class: "y-dropdown__button" }, " 下拉菜单 ", -1))
2540
+ ue(g.$slots, "trigger", {}, () => [
2541
+ b[0] || (b[0] = l("button", { class: "y-dropdown__button" }, " 下拉菜单 ", -1))
2542
2542
  ], !0)
2543
2543
  ], 32),
2544
2544
  ve($e, {
@@ -2548,14 +2548,14 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2548
2548
  default: he(() => [
2549
2549
  Ee(l("div", {
2550
2550
  class: H(["y-dropdown__menu", v.value]),
2551
- style: fe(h.value),
2552
- onMouseenter: S,
2551
+ style: fe(p.value),
2552
+ onMouseenter: I,
2553
2553
  onMouseleave: C
2554
2554
  }, [
2555
- ue(w.$slots, "default", {}, () => [
2556
- k[1] || (k[1] = l("div", { class: "y-dropdown__item" }, "选项 1", -1)),
2557
- k[2] || (k[2] = l("div", { class: "y-dropdown__item" }, "选项 2", -1)),
2558
- k[3] || (k[3] = l("div", { class: "y-dropdown__item" }, "选项 3", -1))
2555
+ ue(g.$slots, "default", {}, () => [
2556
+ b[1] || (b[1] = l("div", { class: "y-dropdown__item" }, "选项 1", -1)),
2557
+ b[2] || (b[2] = l("div", { class: "y-dropdown__item" }, "选项 2", -1)),
2558
+ b[3] || (b[3] = l("div", { class: "y-dropdown__item" }, "选项 3", -1))
2559
2559
  ], !0)
2560
2560
  ], 38), [
2561
2561
  [Ke, e.value]
@@ -2585,58 +2585,58 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2585
2585
  showHeader: { type: Boolean, default: !0 }
2586
2586
  },
2587
2587
  emits: ["update:modelValue", "open", "close"],
2588
- setup(t, { emit: D }) {
2589
- const e = t, n = D, g = q({
2588
+ setup(t, { emit: x }) {
2589
+ const e = t, n = x, m = q({
2590
2590
  get: () => e.modelValue,
2591
- set: (k) => n("update:modelValue", k)
2592
- }), v = z(null), h = q(() => e.placement === "right" ? "drawer-slide-right" : "drawer-slide-bottom"), S = q(() => e.placement === "right" ? "rounded-left" : "rounded-top"), C = q(() => {
2593
- const k = {};
2594
- return e.placement === "right" ? (k.width = typeof e.width == "number" ? `${e.width}px` : String(e.width), k.height = "100%", k.right = "0", k.top = "0") : (k.height = typeof e.height == "number" ? `${e.height}px` : String(e.height), k.width = "100%", k.bottom = "0", k.left = "0"), k;
2591
+ set: (b) => n("update:modelValue", b)
2592
+ }), v = z(null), p = q(() => e.placement === "right" ? "drawer-slide-right" : "drawer-slide-bottom"), I = q(() => e.placement === "right" ? "rounded-left" : "rounded-top"), C = q(() => {
2593
+ const b = {};
2594
+ return e.placement === "right" ? (b.width = typeof e.width == "number" ? `${e.width}px` : String(e.width), b.height = "100%", b.right = "0", b.top = "0") : (b.height = typeof e.height == "number" ? `${e.height}px` : String(e.height), b.width = "100%", b.bottom = "0", b.left = "0"), b;
2595
2595
  });
2596
2596
  function B() {
2597
- e.maskClosable && x();
2597
+ e.maskClosable && $();
2598
2598
  }
2599
- function x() {
2600
- g.value && (g.value = !1, n("close"));
2599
+ function $() {
2600
+ m.value && (m.value = !1, n("close"));
2601
2601
  }
2602
- function m() {
2603
- e.closable && x();
2602
+ function w() {
2603
+ e.closable && $();
2604
2604
  }
2605
- function w(k) {
2606
- k.key === "Escape" && m();
2605
+ function g(b) {
2606
+ b.key === "Escape" && w();
2607
2607
  }
2608
- return ae(() => e.modelValue, (k) => {
2609
- k ? (n("open"), requestAnimationFrame(() => {
2608
+ return ae(() => e.modelValue, (b) => {
2609
+ b ? (n("open"), requestAnimationFrame(() => {
2610
2610
  var A;
2611
2611
  return (A = v.value) == null ? void 0 : A.focus();
2612
- }), document.addEventListener("keydown", w), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", w), document.body.style.overflow = "");
2612
+ }), document.addEventListener("keydown", g), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", g), document.body.style.overflow = "");
2613
2613
  }), Ce(() => {
2614
- e.modelValue && (document.addEventListener("keydown", w), document.body.style.overflow = "hidden");
2614
+ e.modelValue && (document.addEventListener("keydown", g), document.body.style.overflow = "hidden");
2615
2615
  }), Be(() => {
2616
- document.removeEventListener("keydown", w), document.body.style.overflow = "";
2617
- }), (k, A) => (s(), Ie(Fe, { to: "body" }, [
2616
+ document.removeEventListener("keydown", g), document.body.style.overflow = "";
2617
+ }), (b, A) => (s(), Me(Fe, { to: "body" }, [
2618
2618
  Ee(l("div", {
2619
2619
  class: "y-drawer-root",
2620
2620
  role: "dialog",
2621
2621
  "aria-modal": !0,
2622
- "aria-hidden": !g.value,
2622
+ "aria-hidden": !m.value,
2623
2623
  style: fe({ zIndex: String(t.zIndex) })
2624
2624
  }, [
2625
2625
  l("div", {
2626
2626
  class: "y-drawer-mask",
2627
2627
  onClick: B
2628
2628
  }),
2629
- ve($e, { name: h.value }, {
2629
+ ve($e, { name: p.value }, {
2630
2630
  default: he(() => [
2631
2631
  Ee(l("div", {
2632
2632
  ref_key: "panelRef",
2633
2633
  ref: v,
2634
2634
  class: H(["y-drawer-panel", [
2635
2635
  `is-${t.placement}`,
2636
- S.value
2636
+ I.value
2637
2637
  ]]),
2638
2638
  style: fe(C.value),
2639
- onKeydown: ke(te(m, ["prevent", "stop"]), ["esc"]),
2639
+ onKeydown: ke(te(w, ["prevent", "stop"]), ["esc"]),
2640
2640
  tabindex: "-1"
2641
2641
  }, [
2642
2642
  t.showHeader ? (s(), u("div", wl, [
@@ -2646,30 +2646,30 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2646
2646
  type: "button",
2647
2647
  class: "y-drawer-close",
2648
2648
  "aria-label": "Close",
2649
- onClick: x
2649
+ onClick: $
2650
2650
  }, " ✕ ")) : R("", !0)
2651
2651
  ])) : R("", !0),
2652
2652
  l("div", kl, [
2653
- ue(k.$slots, "default", {}, void 0, !0)
2653
+ ue(b.$slots, "default", {}, void 0, !0)
2654
2654
  ]),
2655
- k.$slots.footer ? (s(), u("div", xl, [
2656
- ue(k.$slots, "footer", {}, void 0, !0)
2655
+ b.$slots.footer ? (s(), u("div", xl, [
2656
+ ue(b.$slots, "footer", {}, void 0, !0)
2657
2657
  ])) : R("", !0)
2658
2658
  ], 46, ml), [
2659
- [Ke, g.value]
2659
+ [Ke, m.value]
2660
2660
  ])
2661
2661
  ]),
2662
2662
  _: 3
2663
2663
  }, 8, ["name"])
2664
2664
  ], 12, gl), [
2665
- [Ke, g.value]
2665
+ [Ke, m.value]
2666
2666
  ])
2667
2667
  ]));
2668
2668
  }
2669
- }), Dl = /* @__PURE__ */ be($l, [["__scopeId", "data-v-b2797950"]]), Cl = { class: "ytree__container" }, _l = ["data-level", "onClick", "onContextmenu"], Sl = ["onClick"], Il = {
2669
+ }), Dl = /* @__PURE__ */ be($l, [["__scopeId", "data-v-b2797950"]]), Cl = { class: "ytree__container" }, _l = ["data-level", "onClick", "onContextmenu"], Sl = ["onClick"], Ml = {
2670
2670
  key: 1,
2671
2671
  class: "w-[16px]"
2672
- }, Ll = ["onClick"], Ml = {
2672
+ }, Il = ["onClick"], Ll = {
2673
2673
  key: 0,
2674
2674
  width: "12",
2675
2675
  height: "12",
@@ -2801,8 +2801,8 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2801
2801
  enableChildStyleCustomClick: { type: Boolean, default: !1 }
2802
2802
  },
2803
2803
  emits: ["node-click", "node-contextmenu", "check-change", "check", "current-change", "node-expand", "node-collapse", "node-drag-start", "node-drag-enter", "node-drag-leave", "node-drag-over", "node-drag-end", "node-drop", "checked-keys-change", "child-node-click"],
2804
- setup(t, { expose: D, emit: e }) {
2805
- const n = t, g = e, v = q(() => (console.log("ytree 组件接收到的数据:", n.data), n.data || [])), h = z({
2804
+ setup(t, { expose: x, emit: e }) {
2805
+ const n = t, m = e, v = q(() => (console.log("ytree 组件接收到的数据:", n.data), n.data || [])), p = z({
2806
2806
  currentNode: null,
2807
2807
  currentKey: null,
2808
2808
  checkedKeys: /* @__PURE__ */ new Set(),
@@ -2810,256 +2810,256 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
2810
2810
  selectedKeys: /* @__PURE__ */ new Set(),
2811
2811
  highlightedKeys: /* @__PURE__ */ new Set()
2812
2812
  });
2813
- st("treeStore", h);
2814
- const S = q(() => n.restrictAutoExpandFromLevel && n.restrictAutoExpandFromLevel > 0 ? n.restrictAutoExpandFromLevel : void 0);
2815
- function C(p) {
2816
- return p[n.nodeKey] || p.id || Math.random();
2813
+ st("treeStore", p);
2814
+ const I = q(() => n.restrictAutoExpandFromLevel && n.restrictAutoExpandFromLevel > 0 ? n.restrictAutoExpandFromLevel : void 0);
2815
+ function C(h) {
2816
+ return h[n.nodeKey] || h.id || Math.random();
2817
2817
  }
2818
- function B(p) {
2818
+ function B(h) {
2819
2819
  var d;
2820
- return ((d = n.props) != null && d.label ? p[n.props.label] : void 0) || p.label || "";
2820
+ return ((d = n.props) != null && d.label ? h[n.props.label] : void 0) || h.label || "";
2821
2821
  }
2822
- function x(p) {
2822
+ function $(h) {
2823
2823
  var d;
2824
- return !!((d = p == null ? void 0 : p.data) != null && d.isEmployee);
2824
+ return !!((d = h == null ? void 0 : h.data) != null && d.isEmployee);
2825
2825
  }
2826
- function m(p, d) {
2827
- var L;
2828
- const o = n.deptIconUrl || go, i = n.personIconUrl || mo, f = n.buttonIconUrl || "", b = n.childStyleIconUrl || "";
2829
- return d && b && U(p, d) ? b : (L = p == null ? void 0 : p.data) != null && L.isButton && f ? f : x(p) ? i : o;
2826
+ function w(h, d) {
2827
+ var M;
2828
+ const o = n.deptIconUrl || go, i = n.personIconUrl || mo, f = n.buttonIconUrl || "", k = n.childStyleIconUrl || "";
2829
+ return d && k && U(h, d) ? k : (M = h == null ? void 0 : h.data) != null && M.isButton && f ? f : $(h) ? i : o;
2830
2830
  }
2831
- function w(p) {
2831
+ function g(h) {
2832
2832
  var o;
2833
- const d = ((o = n.props) != null && o.children ? p[n.props.children] : void 0) || p.children;
2833
+ const d = ((o = n.props) != null && o.children ? h[n.props.children] : void 0) || h.children;
2834
2834
  return d && d.length > 0;
2835
2835
  }
2836
- function k(p) {
2836
+ function b(h) {
2837
2837
  var d;
2838
- return ((d = n.props) != null && d.children ? p[n.props.children] : void 0) || p.children || [];
2838
+ return ((d = n.props) != null && d.children ? h[n.props.children] : void 0) || h.children || [];
2839
2839
  }
2840
- function A(p, d, o = 1) {
2841
- if (p === d)
2840
+ function A(h, d, o = 1) {
2841
+ if (h === d)
2842
2842
  return o;
2843
- const i = k(p);
2843
+ const i = b(h);
2844
2844
  for (const f of i) {
2845
- const b = A(f, d, o + 1);
2846
- if (b > 0)
2847
- return b;
2845
+ const k = A(f, d, o + 1);
2846
+ if (k > 0)
2847
+ return k;
2848
2848
  }
2849
2849
  return 0;
2850
2850
  }
2851
- function U(p, d) {
2852
- return !n.childStyleLevel || n.childStyleLevel < 1 ? !1 : A(d, p) === n.childStyleLevel;
2851
+ function U(h, d) {
2852
+ return !n.childStyleLevel || n.childStyleLevel < 1 ? !1 : A(d, h) === n.childStyleLevel;
2853
2853
  }
2854
- function P(p) {
2855
- const d = C(p);
2856
- return h.value.expandedKeys.has(d);
2854
+ function P(h) {
2855
+ const d = C(h);
2856
+ return p.value.expandedKeys.has(d);
2857
2857
  }
2858
- function V(p) {
2859
- const d = C(p);
2860
- if (h.value.checkedKeys.has(d)) {
2861
- if (w(p)) {
2862
- const i = k(p), f = i.filter((L) => V(L)), b = i.filter(
2863
- (L) => Z(L)
2858
+ function V(h) {
2859
+ const d = C(h);
2860
+ if (p.value.checkedKeys.has(d)) {
2861
+ if (g(h)) {
2862
+ const i = b(h), f = i.filter((M) => V(M)), k = i.filter(
2863
+ (M) => Z(M)
2864
2864
  );
2865
- return f.length === i.length && b.length === 0;
2865
+ return f.length === i.length && k.length === 0;
2866
2866
  }
2867
2867
  return !0;
2868
2868
  }
2869
- if (w(p)) {
2870
- const i = k(p);
2869
+ if (g(h)) {
2870
+ const i = b(h);
2871
2871
  return i.some(
2872
- (b) => Z(b)
2873
- ) ? !1 : i.length > 0 && i.every((b) => V(b));
2872
+ (k) => Z(k)
2873
+ ) ? !1 : i.length > 0 && i.every((k) => V(k));
2874
2874
  }
2875
2875
  return !1;
2876
2876
  }
2877
- function Z(p) {
2878
- if (!w(p)) return !1;
2879
- const d = k(p), o = d.filter((f) => V(f)), i = d.filter(
2877
+ function Z(h) {
2878
+ if (!g(h)) return !1;
2879
+ const d = b(h), o = d.filter((f) => V(f)), i = d.filter(
2880
2880
  (f) => Z(f)
2881
2881
  );
2882
2882
  return o.length === d.length ? !1 : o.length > 0 || i.length > 0;
2883
2883
  }
2884
- function X(p) {
2885
- const d = C(p);
2886
- return h.value.currentKey === d;
2884
+ function X(h) {
2885
+ const d = C(h);
2886
+ return p.value.currentKey === d;
2887
2887
  }
2888
- function ie(p) {
2889
- const d = C(p);
2890
- return h.value.highlightedKeys.has(d);
2888
+ function ie(h) {
2889
+ const d = C(h);
2890
+ return p.value.highlightedKeys.has(d);
2891
2891
  }
2892
- function G(p) {
2892
+ function G(h) {
2893
2893
  if (n.disabled) return;
2894
- const d = C(p), i = !h.value.checkedKeys.has(d), f = new Set(h.value.expandedKeys);
2895
- i ? h.value.checkedKeys.add(d) : h.value.checkedKeys.delete(d);
2896
- function b(L, T) {
2897
- L.forEach((N) => {
2894
+ const d = C(h), i = !p.value.checkedKeys.has(d), f = new Set(p.value.expandedKeys);
2895
+ i ? p.value.checkedKeys.add(d) : p.value.checkedKeys.delete(d);
2896
+ function k(M, T) {
2897
+ M.forEach((N) => {
2898
2898
  const oe = C(N);
2899
- T ? h.value.checkedKeys.add(oe) : h.value.checkedKeys.delete(oe), w(N) && b(k(N), T);
2899
+ T ? p.value.checkedKeys.add(oe) : p.value.checkedKeys.delete(oe), g(N) && k(b(N), T);
2900
2900
  });
2901
2901
  }
2902
- b(k(p), i), i && de(), F(), h.value.expandedKeys = f, g("check-change", p, i, !1), g("check", p, i, !1), g("checked-keys-change", Array.from(h.value.checkedKeys));
2902
+ k(b(h), i), i && de(), F(), p.value.expandedKeys = f, m("check-change", h, i, !1), m("check", h, i, !1), m("checked-keys-change", Array.from(p.value.checkedKeys));
2903
2903
  }
2904
- function de(p) {
2905
- S.value && console.log(
2906
- `已启用从第${S.value}级开始不默认展开的限制(不主动收起已展开节点)`
2904
+ function de(h) {
2905
+ I.value && console.log(
2906
+ `已启用从第${I.value}级开始不默认展开的限制(不主动收起已展开节点)`
2907
2907
  );
2908
2908
  }
2909
- function E(p) {
2910
- const d = C(p);
2911
- h.value.expandedKeys.has(d) ? (h.value.expandedKeys.delete(d), g("node-collapse", p, p, null)) : (h.value.expandedKeys.add(d), g("node-expand", p, p, null));
2909
+ function E(h) {
2910
+ const d = C(h);
2911
+ p.value.expandedKeys.has(d) ? (p.value.expandedKeys.delete(d), m("node-collapse", h, h, null)) : (p.value.expandedKeys.add(d), m("node-expand", h, h, null));
2912
2912
  }
2913
2913
  function F() {
2914
- const p = [];
2914
+ const h = [];
2915
2915
  function d(i) {
2916
2916
  i.forEach((f) => {
2917
- p.push(f), w(f) && d(k(f));
2917
+ h.push(f), g(f) && d(b(f));
2918
2918
  });
2919
2919
  }
2920
2920
  d(v.value);
2921
2921
  function o(i) {
2922
- if (w(i)) {
2923
- const f = k(i), b = C(i), L = f.filter((N) => V(N)), T = f.filter(
2922
+ if (g(i)) {
2923
+ const f = b(i), k = C(i), M = f.filter((N) => V(N)), T = f.filter(
2924
2924
  (N) => Z(N)
2925
2925
  );
2926
- L.length === f.length && T.length === 0 || L.length > 0 || T.length > 0 ? h.value.checkedKeys.add(b) : h.value.checkedKeys.delete(b);
2926
+ M.length === f.length && T.length === 0 || M.length > 0 || T.length > 0 ? p.value.checkedKeys.add(k) : p.value.checkedKeys.delete(k);
2927
2927
  }
2928
2928
  }
2929
- for (let i = p.length - 1; i >= 0; i--)
2930
- o(p[i]);
2929
+ for (let i = h.length - 1; i >= 0; i--)
2930
+ o(h[i]);
2931
2931
  }
2932
- function K(p, d, o, i) {
2932
+ function K(h, d, o, i) {
2933
2933
  if (n.disabled) return;
2934
- const f = i ? U(p, i) : !1;
2934
+ const f = i ? U(h, i) : !1;
2935
2935
  if (n.enableChildStyleCustomClick && f) {
2936
- g("child-node-click", p, d, o);
2936
+ m("child-node-click", h, d, o);
2937
2937
  return;
2938
2938
  }
2939
- if (n.expandOnClickNode && w(p)) {
2940
- E(p);
2939
+ if (n.expandOnClickNode && g(h)) {
2940
+ E(h);
2941
2941
  return;
2942
2942
  }
2943
- h.value.currentNode = p, h.value.currentKey = C(p), n.showCheckbox && G(p), g("node-click", p, d, o);
2943
+ p.value.currentNode = h, p.value.currentKey = C(h), n.showCheckbox && G(h), m("node-click", h, d, o);
2944
2944
  }
2945
- function Y(p, d, o, i) {
2946
- n.disabled || g("node-contextmenu", p, d, o, i);
2945
+ function Y(h, d, o, i) {
2946
+ n.disabled || m("node-contextmenu", h, d, o, i);
2947
2947
  }
2948
2948
  ae(
2949
2949
  () => n.defaultExpandedKeys,
2950
- (p) => {
2951
- if (p) {
2952
- const d = S.value;
2950
+ (h) => {
2951
+ if (h) {
2952
+ const d = I.value;
2953
2953
  if (d) {
2954
- let o = function(L, T, N = 1) {
2954
+ let o = function(M, T, N = 1) {
2955
2955
  for (const oe of T) {
2956
- if (C(oe) === L) return N;
2957
- if (w(oe)) {
2958
- const me = o(L, k(oe), N + 1);
2956
+ if (C(oe) === M) return N;
2957
+ if (g(oe)) {
2958
+ const me = o(M, b(oe), N + 1);
2959
2959
  if (me > 0) return me;
2960
2960
  }
2961
2961
  }
2962
2962
  return 0;
2963
- }, i = function(L, T, N) {
2964
- L.forEach((oe) => {
2965
- T < N && w(oe) ? (b.add(C(oe)), i(k(oe), T + 1, N)) : T < N && w(oe);
2963
+ }, i = function(M, T, N) {
2964
+ M.forEach((oe) => {
2965
+ T < N && g(oe) ? (k.add(C(oe)), i(b(oe), T + 1, N)) : T < N && g(oe);
2966
2966
  });
2967
2967
  };
2968
- const f = (p || []).filter((L) => {
2969
- const T = o(L, v.value, 1);
2968
+ const f = (h || []).filter((M) => {
2969
+ const T = o(M, v.value, 1);
2970
2970
  return T > 0 && T < d;
2971
- }), b = new Set(f);
2972
- i(v.value, 1, d), h.value.expandedKeys.forEach((L) => {
2973
- o(L, v.value, 1) >= d && b.add(L);
2974
- }), h.value.expandedKeys = b;
2971
+ }), k = new Set(f);
2972
+ i(v.value, 1, d), p.value.expandedKeys.forEach((M) => {
2973
+ o(M, v.value, 1) >= d && k.add(M);
2974
+ }), p.value.expandedKeys = k;
2975
2975
  } else
2976
- h.value.expandedKeys = new Set(p);
2976
+ p.value.expandedKeys = new Set(h);
2977
2977
  }
2978
2978
  },
2979
2979
  { immediate: !0 }
2980
2980
  );
2981
2981
  function ne() {
2982
2982
  if (n.defaultExpandAll) {
2983
- let p = function(i, f = 1) {
2984
- i.forEach((b) => {
2985
- if (!w(b)) return;
2986
- const L = k(b);
2983
+ let h = function(i, f = 1) {
2984
+ i.forEach((k) => {
2985
+ if (!g(k)) return;
2986
+ const M = b(k);
2987
2987
  if (o) {
2988
2988
  if (f >= o) return;
2989
- f + 1 === o || d.add(C(b)), p(L, f + 1);
2989
+ f + 1 === o || d.add(C(k)), h(M, f + 1);
2990
2990
  } else
2991
- d.add(C(b)), p(L, f + 1);
2991
+ d.add(C(k)), h(M, f + 1);
2992
2992
  });
2993
2993
  };
2994
- const d = /* @__PURE__ */ new Set(), o = S.value;
2995
- p(v.value, 1), h.value.expandedKeys = d;
2994
+ const d = /* @__PURE__ */ new Set(), o = I.value;
2995
+ h(v.value, 1), p.value.expandedKeys = d;
2996
2996
  }
2997
2997
  }
2998
2998
  function Q() {
2999
2999
  if (n.defaultCheckedKeys && n.defaultCheckedKeys.length > 0) {
3000
- let p = function(f, b = []) {
3001
- f.forEach((L) => {
3002
- const T = C(L), N = [...b, T];
3003
- d.has(T) && b.forEach((oe) => o.add(oe)), w(L) && p(k(L), N);
3000
+ let h = function(f, k = []) {
3001
+ f.forEach((M) => {
3002
+ const T = C(M), N = [...k, T];
3003
+ d.has(T) && k.forEach((oe) => o.add(oe)), g(M) && h(b(M), N);
3004
3004
  });
3005
3005
  };
3006
3006
  const d = new Set(n.defaultCheckedKeys), o = /* @__PURE__ */ new Set();
3007
- p(v.value);
3008
- const i = S.value;
3007
+ h(v.value);
3008
+ const i = I.value;
3009
3009
  if (i) {
3010
3010
  console.log(
3011
3011
  `已启用从第${i}级开始不默认展开:保持当前展开状态不变`
3012
3012
  );
3013
3013
  return;
3014
3014
  }
3015
- h.value.expandedKeys = o;
3015
+ p.value.expandedKeys = o;
3016
3016
  }
3017
3017
  }
3018
3018
  ae(() => n.defaultExpandAll, ne, { immediate: !0 }), ae(() => v.value, ne, { deep: !0 }), ae(
3019
3019
  () => n.defaultCheckedKeys,
3020
- (p) => {
3021
- p ? (h.value.checkedKeys = new Set(p), n.enableFourthLevelSpecialHandling ? console.log("权限树模式:跳过自动展开逻辑,保持当前展开状态") : Q()) : h.value.checkedKeys.clear();
3020
+ (h) => {
3021
+ h ? (p.value.checkedKeys = new Set(h), n.enableFourthLevelSpecialHandling ? console.log("权限树模式:跳过自动展开逻辑,保持当前展开状态") : Q()) : p.value.checkedKeys.clear();
3022
3022
  },
3023
3023
  { immediate: !0 }
3024
3024
  );
3025
- function pe(p) {
3025
+ function pe(h) {
3026
3026
  try {
3027
- let d = function(f, b, L = []) {
3027
+ let d = function(f, k, M = []) {
3028
3028
  for (const T of f) {
3029
- const N = C(T), oe = [...L, N];
3030
- if (N === b) return oe;
3031
- if (w(T)) {
3032
- const me = d(k(T), b, oe);
3029
+ const N = C(T), oe = [...M, N];
3030
+ if (N === k) return oe;
3031
+ if (g(T)) {
3032
+ const me = d(b(T), k, oe);
3033
3033
  if (me) return me;
3034
3034
  }
3035
3035
  }
3036
3036
  return null;
3037
3037
  };
3038
- const o = Array.isArray(p) ? p : [];
3038
+ const o = Array.isArray(h) ? h : [];
3039
3039
  if (o.length === 0) return;
3040
- h.value.highlightedKeys.clear();
3041
- const i = new Set(h.value.expandedKeys);
3040
+ p.value.highlightedKeys.clear();
3041
+ const i = new Set(p.value.expandedKeys);
3042
3042
  o.forEach((f) => {
3043
- const b = d(v.value, f);
3044
- b && b.length > 0 && (b.slice(0, -1).forEach((L) => i.add(L)), h.value.highlightedKeys.add(b[b.length - 1]));
3045
- }), h.value.expandedKeys = i;
3043
+ const k = d(v.value, f);
3044
+ k && k.length > 0 && (k.slice(0, -1).forEach((M) => i.add(M)), p.value.highlightedKeys.add(k[k.length - 1]));
3045
+ }), p.value.expandedKeys = i;
3046
3046
  } catch (d) {
3047
3047
  console.warn("highlightAndExpandByIds 执行失败", d);
3048
3048
  }
3049
3049
  }
3050
3050
  function j() {
3051
- h.value.highlightedKeys.clear();
3051
+ p.value.highlightedKeys.clear();
3052
3052
  }
3053
3053
  function ee() {
3054
- h.value.currentNode = null, h.value.currentKey = null;
3054
+ p.value.currentNode = null, p.value.currentKey = null;
3055
3055
  }
3056
- return D({ highlightAndExpandByIds: pe, clearHighlights: j, clearCurrentNode: ee }), ae(
3056
+ return x({ highlightAndExpandByIds: pe, clearHighlights: j, clearCurrentNode: ee }), ae(
3057
3057
  () => n.defaultSelectedKeys,
3058
- (p) => {
3059
- p && (h.value.selectedKeys = new Set(p));
3058
+ (h) => {
3059
+ h && (p.value.selectedKeys = new Set(h));
3060
3060
  },
3061
3061
  { immediate: !0 }
3062
- ), (p, d) => (s(), u("div", {
3062
+ ), (h, d) => (s(), u("div", {
3063
3063
  class: H(["ytree", [`ytree--${t.size}`, { "ytree--disabled": t.disabled }]])
3064
3064
  }, [
3065
3065
  l("div", Cl, [
@@ -3074,7 +3074,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3074
3074
  onClick: (i) => K(o, o, null, o),
3075
3075
  onContextmenu: (i) => Y(i, o, o, null)
3076
3076
  }, [
3077
- w(o) ? (s(), u("span", {
3077
+ g(o) ? (s(), u("span", {
3078
3078
  key: 0,
3079
3079
  class: H(["ytree-node__expand-icon", { "is-expanded": P(o) }]),
3080
3080
  onClick: te((i) => E(o), ["stop"])
@@ -3093,7 +3093,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3093
3093
  "stroke-linejoin": "round"
3094
3094
  })
3095
3095
  ], -1)
3096
- ])], 10, Sl)) : (s(), u("span", Il)),
3096
+ ])], 10, Sl)) : (s(), u("span", Ml)),
3097
3097
  t.showCheckbox ? (s(), u("span", {
3098
3098
  key: 2,
3099
3099
  class: H(["ytree-node__checkbox", {
@@ -3102,7 +3102,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3102
3102
  }]),
3103
3103
  onClick: te((i) => G(o), ["stop"])
3104
3104
  }, [
3105
- V(o) ? (s(), u("svg", Ml, [...d[1] || (d[1] = [
3105
+ V(o) ? (s(), u("svg", Ll, [...d[1] || (d[1] = [
3106
3106
  l("path", {
3107
3107
  d: "M2 6L4.5 8.5L10 3",
3108
3108
  stroke: "currentColor",
@@ -3118,32 +3118,32 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3118
3118
  "stroke-linecap": "round"
3119
3119
  }, null, -1)
3120
3120
  ])])) : R("", !0)
3121
- ], 10, Ll)) : R("", !0),
3121
+ ], 10, Il)) : R("", !0),
3122
3122
  t.iconClass ? (s(), u("span", {
3123
3123
  key: 3,
3124
3124
  class: H(["ytree-node__icon", t.iconClass])
3125
3125
  }, null, 2)) : R("", !0),
3126
3126
  l("img", {
3127
3127
  class: "ytree-node__avatar",
3128
- src: m(o, o),
3129
- alt: x(o) ? "person" : "dept"
3128
+ src: w(o, o),
3129
+ alt: $(o) ? "person" : "dept"
3130
3130
  }, null, 8, Bl),
3131
3131
  l("span", {
3132
- class: H(["ytree-node__label", { "is-employee": x(o) }])
3132
+ class: H(["ytree-node__label", { "is-employee": $(o) }])
3133
3133
  }, se(B(o)), 3),
3134
3134
  l("div", Tl, [
3135
- ue(p.$slots, "node-content", {
3135
+ ue(h.$slots, "node-content", {
3136
3136
  node: o,
3137
3137
  isCurrent: X(o),
3138
3138
  isExpanded: P(o),
3139
- hasChildren: w(o)
3139
+ hasChildren: g(o)
3140
3140
  }, void 0, !0)
3141
3141
  ])
3142
3142
  ], 42, _l),
3143
3143
  ve($e, { name: "ytree-node" }, {
3144
3144
  default: he(() => [
3145
- w(o) && P(o) ? (s(), u("div", zl, [
3146
- (s(!0), u(ce, null, ge(k(o), (i) => (s(), u("div", {
3145
+ g(o) && P(o) ? (s(), u("div", zl, [
3146
+ (s(!0), u(ce, null, ge(b(o), (i) => (s(), u("div", {
3147
3147
  key: C(i),
3148
3148
  class: H(["ytree-node", { "ytree-node--current": X(i), "ytree-node--highlight": ie(i) }])
3149
3149
  }, [
@@ -3154,7 +3154,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3154
3154
  onClick: (f) => K(i, i, null, o),
3155
3155
  onContextmenu: (f) => Y(f, i, i, null)
3156
3156
  }, [
3157
- w(i) ? (s(), u("span", {
3157
+ g(i) ? (s(), u("span", {
3158
3158
  key: 0,
3159
3159
  class: H(["ytree-node__expand-icon", { "is-expanded": P(i) }]),
3160
3160
  onClick: te((f) => E(i), ["stop"])
@@ -3205,25 +3205,25 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3205
3205
  }, null, 2)) : R("", !0),
3206
3206
  l("img", {
3207
3207
  class: "ytree-node__avatar",
3208
- src: m(i, o),
3209
- alt: x(i) ? "person" : "dept"
3208
+ src: w(i, o),
3209
+ alt: $(i) ? "person" : "dept"
3210
3210
  }, null, 8, Fl),
3211
3211
  l("span", {
3212
- class: H(["ytree-node__label", { "is-employee": x(i) }])
3212
+ class: H(["ytree-node__label", { "is-employee": $(i) }])
3213
3213
  }, se(B(i)), 3),
3214
3214
  l("div", Pl, [
3215
- ue(p.$slots, "node-content", {
3215
+ ue(h.$slots, "node-content", {
3216
3216
  node: i,
3217
3217
  isCurrent: X(i),
3218
3218
  isExpanded: P(i),
3219
- hasChildren: w(i)
3219
+ hasChildren: g(i)
3220
3220
  }, void 0, !0)
3221
3221
  ])
3222
3222
  ], 42, Kl),
3223
3223
  ve($e, { name: "ytree-node" }, {
3224
3224
  default: he(() => [
3225
- w(i) && P(i) ? (s(), u("div", Yl, [
3226
- (s(!0), u(ce, null, ge(k(i), (f) => (s(), u("div", {
3225
+ g(i) && P(i) ? (s(), u("div", Yl, [
3226
+ (s(!0), u(ce, null, ge(b(i), (f) => (s(), u("div", {
3227
3227
  key: C(f),
3228
3228
  class: H(["ytree-node", {
3229
3229
  "ytree-node--current": X(f),
@@ -3234,18 +3234,18 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3234
3234
  class: H(["ytree-node__content", { "is-child-style": U(f, o) }]),
3235
3235
  style: { paddingLeft: "38px" },
3236
3236
  "data-level": A(o, f),
3237
- onClick: (b) => K(f, f, null, o),
3238
- onContextmenu: (b) => Y(
3239
- b,
3237
+ onClick: (k) => K(f, f, null, o),
3238
+ onContextmenu: (k) => Y(
3239
+ k,
3240
3240
  f,
3241
3241
  f,
3242
3242
  null
3243
3243
  )
3244
3244
  }, [
3245
- w(f) ? (s(), u("span", {
3245
+ g(f) ? (s(), u("span", {
3246
3246
  key: 0,
3247
3247
  class: H(["ytree-node__expand-icon", { "is-expanded": P(f) }]),
3248
- onClick: te((b) => E(f), ["stop"])
3248
+ onClick: te((k) => E(f), ["stop"])
3249
3249
  }, [...d[6] || (d[6] = [
3250
3250
  l("svg", {
3251
3251
  width: "12",
@@ -3268,7 +3268,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3268
3268
  "is-checked": V(f),
3269
3269
  "is-indeterminate": Z(f)
3270
3270
  }]),
3271
- onClick: te((b) => G(f), ["stop"])
3271
+ onClick: te((k) => G(f), ["stop"])
3272
3272
  }, [
3273
3273
  V(f) ? (s(), u("svg", Ul, [...d[7] || (d[7] = [
3274
3274
  l("path", {
@@ -3293,56 +3293,56 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3293
3293
  }, null, 2)) : R("", !0),
3294
3294
  l("img", {
3295
3295
  class: "ytree-node__avatar",
3296
- src: m(f, o),
3297
- alt: x(f) ? "person" : "dept"
3296
+ src: w(f, o),
3297
+ alt: $(f) ? "person" : "dept"
3298
3298
  }, null, 8, Ql),
3299
3299
  l("span", {
3300
- class: H(["ytree-node__label", { "is-employee": x(f) }])
3300
+ class: H(["ytree-node__label", { "is-employee": $(f) }])
3301
3301
  }, se(B(f)), 3),
3302
3302
  l("div", Jl, [
3303
- ue(p.$slots, "node-content", {
3303
+ ue(h.$slots, "node-content", {
3304
3304
  node: f,
3305
3305
  isCurrent: X(f),
3306
3306
  isExpanded: P(f),
3307
- hasChildren: w(f)
3307
+ hasChildren: g(f)
3308
3308
  }, void 0, !0)
3309
3309
  ])
3310
3310
  ], 42, Nl),
3311
3311
  ve($e, { name: "ytree-node" }, {
3312
3312
  default: he(() => [
3313
- w(f) && P(f) ? (s(), u("div", Xl, [
3314
- (s(!0), u(ce, null, ge(k(f), (b) => (s(), u("div", {
3315
- key: C(b),
3313
+ g(f) && P(f) ? (s(), u("div", Xl, [
3314
+ (s(!0), u(ce, null, ge(b(f), (k) => (s(), u("div", {
3315
+ key: C(k),
3316
3316
  class: H(["ytree-node", {
3317
- "ytree-node--current": X(b),
3318
- "ytree-node--highlight": ie(b)
3317
+ "ytree-node--current": X(k),
3318
+ "ytree-node--highlight": ie(k)
3319
3319
  }])
3320
3320
  }, [
3321
3321
  l("div", {
3322
- class: H(["ytree-node__content", { "is-child-style": U(b, o) }]),
3322
+ class: H(["ytree-node__content", { "is-child-style": U(k, o) }]),
3323
3323
  style: {
3324
3324
  paddingLeft: "54px"
3325
3325
  },
3326
- "data-level": A(o, b),
3327
- onClick: (L) => K(
3328
- b,
3329
- b,
3326
+ "data-level": A(o, k),
3327
+ onClick: (M) => K(
3328
+ k,
3329
+ k,
3330
3330
  null,
3331
3331
  o
3332
3332
  ),
3333
- onContextmenu: (L) => Y(
3334
- L,
3335
- b,
3336
- b,
3333
+ onContextmenu: (M) => Y(
3334
+ M,
3335
+ k,
3336
+ k,
3337
3337
  null
3338
3338
  )
3339
3339
  }, [
3340
- w(b) ? (s(), u("span", {
3340
+ g(k) ? (s(), u("span", {
3341
3341
  key: 0,
3342
3342
  class: H(["ytree-node__expand-icon", {
3343
- "is-expanded": P(b)
3343
+ "is-expanded": P(k)
3344
3344
  }]),
3345
- onClick: te((L) => E(b), ["stop"])
3345
+ onClick: te((M) => E(k), ["stop"])
3346
3346
  }, [...d[9] || (d[9] = [
3347
3347
  l("svg", {
3348
3348
  width: "12",
@@ -3362,12 +3362,12 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3362
3362
  t.showCheckbox ? (s(), u("span", {
3363
3363
  key: 2,
3364
3364
  class: H(["ytree-node__checkbox", {
3365
- "is-checked": V(b),
3366
- "is-indeterminate": Z(b)
3365
+ "is-checked": V(k),
3366
+ "is-indeterminate": Z(k)
3367
3367
  }]),
3368
- onClick: te((L) => G(b), ["stop"])
3368
+ onClick: te((M) => G(k), ["stop"])
3369
3369
  }, [
3370
- V(b) ? (s(), u("svg", lo, [...d[10] || (d[10] = [
3370
+ V(k) ? (s(), u("svg", lo, [...d[10] || (d[10] = [
3371
3371
  l("path", {
3372
3372
  d: "M2 6L4.5 8.5L10 3",
3373
3373
  stroke: "currentColor",
@@ -3375,7 +3375,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3375
3375
  "stroke-linecap": "round",
3376
3376
  "stroke-linejoin": "round"
3377
3377
  }, null, -1)
3378
- ])])) : Z(b) ? (s(), u("svg", oo, [...d[11] || (d[11] = [
3378
+ ])])) : Z(k) ? (s(), u("svg", oo, [...d[11] || (d[11] = [
3379
3379
  l("path", {
3380
3380
  d: "M2 6L10 6",
3381
3381
  stroke: "currentColor",
@@ -3390,59 +3390,59 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3390
3390
  }, null, 2)) : R("", !0),
3391
3391
  l("img", {
3392
3392
  class: "ytree-node__avatar",
3393
- src: m(b, o),
3394
- alt: x(b) ? "person" : "dept"
3393
+ src: w(k, o),
3394
+ alt: $(k) ? "person" : "dept"
3395
3395
  }, null, 8, ao),
3396
3396
  l("span", {
3397
3397
  class: H(["ytree-node__label", {
3398
- "is-employee": x(b)
3398
+ "is-employee": $(k)
3399
3399
  }])
3400
- }, se(B(b)), 3),
3400
+ }, se(B(k)), 3),
3401
3401
  l("div", so, [
3402
- ue(p.$slots, "node-content", {
3403
- node: b,
3404
- isCurrent: X(b),
3405
- isExpanded: P(b),
3406
- hasChildren: w(b)
3402
+ ue(h.$slots, "node-content", {
3403
+ node: k,
3404
+ isCurrent: X(k),
3405
+ isExpanded: P(k),
3406
+ hasChildren: g(k)
3407
3407
  }, void 0, !0)
3408
3408
  ])
3409
3409
  ], 42, Gl),
3410
3410
  ve($e, { name: "ytree-node" }, {
3411
3411
  default: he(() => [
3412
- w(b) && P(b) ? (s(), u("div", io, [
3413
- (s(!0), u(ce, null, ge(k(
3414
- b
3415
- ), (L) => (s(), u("div", {
3416
- key: C(L),
3412
+ g(k) && P(k) ? (s(), u("div", io, [
3413
+ (s(!0), u(ce, null, ge(b(
3414
+ k
3415
+ ), (M) => (s(), u("div", {
3416
+ key: C(M),
3417
3417
  class: H(["ytree-node", {
3418
- "ytree-node--current": X(L)
3418
+ "ytree-node--current": X(M)
3419
3419
  }])
3420
3420
  }, [
3421
3421
  l("div", {
3422
- class: H(["ytree-node__content", { "is-child-style": U(L, o) }]),
3422
+ class: H(["ytree-node__content", { "is-child-style": U(M, o) }]),
3423
3423
  style: {
3424
3424
  paddingLeft: "70px"
3425
3425
  },
3426
- "data-level": A(o, L),
3426
+ "data-level": A(o, M),
3427
3427
  onClick: (T) => K(
3428
- L,
3429
- L,
3428
+ M,
3429
+ M,
3430
3430
  null,
3431
3431
  o
3432
3432
  ),
3433
3433
  onContextmenu: (T) => Y(
3434
3434
  T,
3435
- L,
3436
- L,
3435
+ M,
3436
+ M,
3437
3437
  null
3438
3438
  )
3439
3439
  }, [
3440
- w(L) ? (s(), u("span", {
3440
+ g(M) ? (s(), u("span", {
3441
3441
  key: 0,
3442
3442
  class: H(["ytree-node__expand-icon", {
3443
- "is-expanded": P(L)
3443
+ "is-expanded": P(M)
3444
3444
  }]),
3445
- onClick: te((T) => E(L), ["stop"])
3445
+ onClick: te((T) => E(M), ["stop"])
3446
3446
  }, [...d[12] || (d[12] = [
3447
3447
  l("svg", {
3448
3448
  width: "12",
@@ -3462,14 +3462,14 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3462
3462
  t.showCheckbox ? (s(), u("span", {
3463
3463
  key: 2,
3464
3464
  class: H(["ytree-node__checkbox", {
3465
- "is-checked": V(L),
3465
+ "is-checked": V(M),
3466
3466
  "is-indeterminate": Z(
3467
- L
3467
+ M
3468
3468
  )
3469
3469
  }]),
3470
- onClick: te((T) => G(L), ["stop"])
3470
+ onClick: te((T) => G(M), ["stop"])
3471
3471
  }, [
3472
- V(L) ? (s(), u("svg", vo, [...d[13] || (d[13] = [
3472
+ V(M) ? (s(), u("svg", vo, [...d[13] || (d[13] = [
3473
3473
  l("path", {
3474
3474
  d: "M2 6L4.5 8.5L10 3",
3475
3475
  stroke: "currentColor",
@@ -3478,7 +3478,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3478
3478
  "stroke-linejoin": "round"
3479
3479
  }, null, -1)
3480
3480
  ])])) : Z(
3481
- L
3481
+ M
3482
3482
  ) ? (s(), u("svg", ho, [...d[14] || (d[14] = [
3483
3483
  l("path", {
3484
3484
  d: "M2 6L10 6",
@@ -3494,20 +3494,20 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3494
3494
  }, null, 2)) : R("", !0),
3495
3495
  l("img", {
3496
3496
  class: "ytree-node__avatar",
3497
- src: m(L, o),
3498
- alt: x(L) ? "person" : "dept"
3497
+ src: w(M, o),
3498
+ alt: $(M) ? "person" : "dept"
3499
3499
  }, null, 8, po),
3500
3500
  l("span", {
3501
3501
  class: H(["ytree-node__label", {
3502
- "is-employee": x(L)
3502
+ "is-employee": $(M)
3503
3503
  }])
3504
- }, se(B(L)), 3),
3504
+ }, se(B(M)), 3),
3505
3505
  l("div", yo, [
3506
- ue(p.$slots, "node-content", {
3507
- node: L,
3508
- isCurrent: X(L),
3509
- isExpanded: P(L),
3510
- hasChildren: w(L)
3506
+ ue(h.$slots, "node-content", {
3507
+ node: M,
3508
+ isCurrent: X(M),
3509
+ isExpanded: P(M),
3510
+ hasChildren: g(M)
3511
3511
  }, void 0, !0)
3512
3512
  ])
3513
3513
  ], 42, ro)
@@ -3541,7 +3541,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3541
3541
  }, So = {
3542
3542
  key: 0,
3543
3543
  class: "query-encapsulation__toggle"
3544
- }, Io = { class: "query-encapsulation__actions" }, Lo = { class: "query-encapsulation__actions-group" }, Mo = /* @__PURE__ */ we({
3544
+ }, Mo = { class: "query-encapsulation__actions" }, Io = { class: "query-encapsulation__actions-group" }, Lo = /* @__PURE__ */ we({
3545
3545
  __name: "QueryEncapsulation",
3546
3546
  props: {
3547
3547
  Iflabel: { type: Boolean, default: !0 },
@@ -3551,11 +3551,11 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3551
3551
  modelValue: { default: () => ({}) }
3552
3552
  },
3553
3553
  emits: ["update:modelValue", "search", "reset", "field-change"],
3554
- setup(t, { emit: D }) {
3555
- const e = t, n = D, g = z(!1), v = it({}), h = ["select", "date", "daterange"];
3556
- let S;
3557
- const C = q(() => e.fields.filter((E) => !E.hidden)), B = q(() => g.value ? C.value : C.value.slice(0, e.maxVisibleFields)), x = q(() => C.value.length > e.maxVisibleFields);
3558
- function m(E) {
3554
+ setup(t, { emit: x }) {
3555
+ const e = t, n = x, m = z(!1), v = it({}), p = ["select", "date", "daterange"];
3556
+ let I;
3557
+ const C = q(() => e.fields.filter((E) => !E.hidden)), B = q(() => m.value ? C.value : C.value.slice(0, e.maxVisibleFields)), $ = q(() => C.value.length > e.maxVisibleFields);
3558
+ function w(E) {
3559
3559
  switch (E) {
3560
3560
  case "select":
3561
3561
  return nt;
@@ -3567,13 +3567,13 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3567
3567
  return tt;
3568
3568
  }
3569
3569
  }
3570
- function w(E, F) {
3570
+ function g(E, F) {
3571
3571
  v[E] = F;
3572
3572
  const K = e.fields.find((Y) => Y.key === E);
3573
- K && k(K);
3573
+ K && b(K);
3574
3574
  }
3575
- function k(E) {
3576
- n("field-change", E, v[E.key]), n("update:modelValue", { ...v }), h.includes(E.type) && X();
3575
+ function b(E) {
3576
+ n("field-change", E, v[E.key]), n("update:modelValue", { ...v }), p.includes(E.type) && X();
3577
3577
  }
3578
3578
  function A() {
3579
3579
  const E = ie(v), F = G(E), K = { ...v };
@@ -3586,7 +3586,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3586
3586
  }), n("reset"), n("update:modelValue", { ...v });
3587
3587
  }
3588
3588
  function P() {
3589
- g.value = !g.value;
3589
+ m.value = !m.value;
3590
3590
  }
3591
3591
  function V(E) {
3592
3592
  return E.type !== "input" ? {} : {
@@ -3598,8 +3598,8 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3598
3598
  await re(), A();
3599
3599
  }
3600
3600
  function X() {
3601
- S && clearTimeout(S), S = setTimeout(() => {
3602
- S = void 0, re().then(() => A());
3601
+ I && clearTimeout(I), I = setTimeout(() => {
3602
+ I = void 0, re().then(() => A());
3603
3603
  }, 0);
3604
3604
  }
3605
3605
  function ie(E) {
@@ -3650,7 +3650,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3650
3650
  ), Ce(() => {
3651
3651
  de();
3652
3652
  }), Ge(() => {
3653
- S && (clearTimeout(S), S = void 0);
3653
+ I && (clearTimeout(I), I = void 0);
3654
3654
  }), (E, F) => (s(), u("div", ko, [
3655
3655
  l("div", xo, [
3656
3656
  l("div", $o, [
@@ -3668,11 +3668,11 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3668
3668
  ue(E.$slots, `field-${K.key}`, {
3669
3669
  field: K,
3670
3670
  value: v[K.key],
3671
- updateValue: (Y) => w(K.key, Y)
3671
+ updateValue: (Y) => g(K.key, Y)
3672
3672
  }, () => [
3673
3673
  l("div", Co, [
3674
3674
  t.Iflabel ? (s(), u("label", _o, se(K.label), 1)) : R("", !0),
3675
- (s(), Ie(ut(m(K.type)), dt({
3675
+ (s(), Me(ut(w(K.type)), dt({
3676
3676
  modelValue: v[K.key],
3677
3677
  "onUpdate:modelValue": (Y) => v[K.key] = Y,
3678
3678
  placeholder: K.placeholder || `请输入${K.label}`,
@@ -3684,8 +3684,8 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3684
3684
  "include-time": K.includeTime || !1,
3685
3685
  filterable: K.filterable === !0
3686
3686
  }, ct(V(K)), {
3687
- onInput: (Y) => k(K),
3688
- onChange: (Y) => k(K)
3687
+ onInput: (Y) => b(K),
3688
+ onChange: (Y) => b(K)
3689
3689
  }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "options", "clearable", "size", "width", "format", "include-time", "filterable", "onInput", "onChange"]))
3690
3690
  ])
3691
3691
  ], !0)
@@ -3693,23 +3693,23 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3693
3693
  ]),
3694
3694
  _: 3
3695
3695
  }),
3696
- x.value ? (s(), u("div", So, [
3696
+ $.value ? (s(), u("div", So, [
3697
3697
  ve(Ne, {
3698
3698
  variant: "secondary",
3699
3699
  size: "small",
3700
3700
  onClick: P
3701
3701
  }, {
3702
3702
  default: he(() => [
3703
- De(se(g.value ? "收起" : "展开") + " ", 1),
3703
+ De(se(m.value ? "收起" : "展开") + " ", 1),
3704
3704
  l("span", {
3705
- class: H(["query-encapsulation__toggle-icon", { "is-expanded": g.value }])
3705
+ class: H(["query-encapsulation__toggle-icon", { "is-expanded": m.value }])
3706
3706
  }, "▼", 2)
3707
3707
  ]),
3708
3708
  _: 1
3709
3709
  })
3710
3710
  ])) : R("", !0),
3711
- l("div", Io, [
3712
- l("div", Lo, [
3711
+ l("div", Mo, [
3712
+ l("div", Io, [
3713
3713
  ve(Ne, {
3714
3714
  variant: "primary",
3715
3715
  size: "small",
@@ -3740,7 +3740,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3740
3740
  ])
3741
3741
  ]));
3742
3742
  }
3743
- }), Eo = /* @__PURE__ */ be(Mo, [["__scopeId", "data-v-73456475"]]), Bo = {
3743
+ }), Eo = /* @__PURE__ */ be(Lo, [["__scopeId", "data-v-73456475"]]), Bo = {
3744
3744
  key: 0,
3745
3745
  width: "16",
3746
3746
  height: "16",
@@ -3771,38 +3771,56 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3771
3771
  onClose: {}
3772
3772
  },
3773
3773
  setup(t) {
3774
- const D = t, e = z(!1);
3775
- let n;
3774
+ const x = t, e = z(!1);
3775
+ let n, m = 0, v = 0;
3776
3776
  Ce(() => {
3777
3777
  requestAnimationFrame(() => {
3778
- e.value = !0, D.duration && D.duration > 0 && (n = window.setTimeout(() => g(), D.duration));
3778
+ e.value = !0, x.duration && x.duration > 0 && p(x.duration);
3779
3779
  });
3780
3780
  }), Ge(() => {
3781
- n && window.clearTimeout(n);
3781
+ I();
3782
3782
  });
3783
- function g() {
3783
+ function p(g) {
3784
+ m = g, v = Date.now(), n = window.setTimeout(() => $(), g);
3785
+ }
3786
+ function I() {
3787
+ n && (window.clearTimeout(n), n = void 0);
3788
+ }
3789
+ function C() {
3790
+ if (n && x.duration && x.duration > 0) {
3791
+ I();
3792
+ const g = Date.now() - v;
3793
+ m = Math.max(0, m - g);
3794
+ }
3795
+ }
3796
+ function B() {
3797
+ x.duration && x.duration > 0 && m > 0 && p(m);
3798
+ }
3799
+ function $() {
3784
3800
  e.value = !1;
3785
3801
  }
3786
- function v() {
3787
- var h;
3788
- (h = D.onClose) == null || h.call(D, D.id);
3802
+ function w() {
3803
+ var g;
3804
+ (g = x.onClose) == null || g.call(x, x.id);
3789
3805
  }
3790
- return (h, S) => (s(), Ie($e, {
3806
+ return (g, b) => (s(), Me($e, {
3791
3807
  name: "y-msg-fade",
3792
- onAfterLeave: v
3808
+ onAfterLeave: w
3793
3809
  }, {
3794
3810
  default: he(() => [
3795
3811
  Ee(l("div", {
3796
3812
  class: H(["y-msg", [`y-msg--${t.type}`]]),
3797
3813
  style: fe({ zIndex: t.zIndex }),
3798
3814
  role: "status",
3799
- "aria-live": "polite"
3815
+ "aria-live": "polite",
3816
+ onMouseenter: C,
3817
+ onMouseleave: B
3800
3818
  }, [
3801
3819
  l("span", {
3802
3820
  class: H(["y-msg__icon", `y-msg__icon--${t.type}`]),
3803
3821
  "aria-hidden": "true"
3804
3822
  }, [
3805
- t.type === "success" ? (s(), u("svg", Bo, [...S[0] || (S[0] = [
3823
+ t.type === "success" ? (s(), u("svg", Bo, [...b[0] || (b[0] = [
3806
3824
  l("path", {
3807
3825
  d: "M20 6L9 17l-5-5",
3808
3826
  stroke: "currentColor",
@@ -3810,7 +3828,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3810
3828
  "stroke-linecap": "round",
3811
3829
  "stroke-linejoin": "round"
3812
3830
  }, null, -1)
3813
- ])])) : t.type === "warning" ? (s(), u("svg", To, [...S[1] || (S[1] = [
3831
+ ])])) : t.type === "warning" ? (s(), u("svg", To, [...b[1] || (b[1] = [
3814
3832
  l("path", {
3815
3833
  d: "M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z",
3816
3834
  stroke: "currentColor",
@@ -3818,7 +3836,7 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3818
3836
  "stroke-linecap": "round",
3819
3837
  "stroke-linejoin": "round"
3820
3838
  }, null, -1)
3821
- ])])) : (s(), u("svg", zo, [...S[2] || (S[2] = [
3839
+ ])])) : (s(), u("svg", zo, [...b[2] || (b[2] = [
3822
3840
  l("path", {
3823
3841
  d: "M12 9v4m0 4h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z",
3824
3842
  stroke: "currentColor",
@@ -3836,84 +3854,84 @@ const ft = ["type", "disabled", "aria-busy", "aria-disabled"], vt = { class: "co
3836
3854
  key: 0,
3837
3855
  class: "y-msg__close",
3838
3856
  type: "button",
3839
- onClick: g
3857
+ onClick: $
3840
3858
  }, "✕")) : R("", !0)
3841
- ], 6), [
3859
+ ], 38), [
3842
3860
  [Ke, e.value]
3843
3861
  ])
3844
3862
  ]),
3845
3863
  _: 1
3846
3864
  }));
3847
3865
  }
3848
- }), Ro = /* @__PURE__ */ be(Ho, [["__scopeId", "data-v-c5dc221c"]]);
3866
+ }), Ro = /* @__PURE__ */ be(Ho, [["__scopeId", "data-v-db173617"]]);
3849
3867
  let Ao = 1;
3850
3868
  const Ze = 12, Se = [];
3851
3869
  function Wo() {
3852
3870
  let t = 20;
3853
- return Se.forEach((D) => {
3854
- t += D.height + Ze;
3871
+ return Se.forEach((x) => {
3872
+ t += x.height + Ze;
3855
3873
  }), t;
3856
3874
  }
3857
3875
  function Je(t) {
3858
- const D = Se.findIndex((v) => v.id === t);
3859
- if (D === -1) return;
3860
- const { el: e } = Se[D], n = e.firstElementChild;
3876
+ const x = Se.findIndex((v) => v.id === t);
3877
+ if (x === -1) return;
3878
+ const { el: e } = Se[x], n = e.firstElementChild;
3861
3879
  if (n) {
3862
3880
  const v = window.getComputedStyle(n).top;
3863
3881
  n.style.top = v, n.classList.add("is-leaving"), n.style.willChange = "opacity, transform";
3864
3882
  }
3865
- Se[D].leaving = !0, je(), setTimeout(() => {
3883
+ Se[x].leaving = !0, je(), setTimeout(() => {
3866
3884
  et(null, e), e.parentNode && e.parentNode.removeChild(e);
3867
- const v = Se.findIndex((h) => h.id === t);
3885
+ const v = Se.findIndex((p) => p.id === t);
3868
3886
  v !== -1 && Se.splice(v, 1), je();
3869
3887
  }, 260);
3870
3888
  }
3871
3889
  function Ue(t) {
3872
3890
  var v;
3873
- const D = Ao++, e = document.createElement("div");
3891
+ const x = Ao++, e = document.createElement("div");
3874
3892
  document.body.appendChild(e);
3875
3893
  const n = ve(Ro, {
3876
- id: D,
3894
+ id: x,
3877
3895
  type: t.type || "success",
3878
3896
  message: t.message,
3879
3897
  duration: t.duration ?? 2500,
3880
3898
  offset: Wo(),
3881
- zIndex: 3e3 + D,
3899
+ zIndex: 3e3 + x,
3882
3900
  closable: t.closable ?? !1,
3883
- onClose: (h) => Je(h)
3901
+ onClose: (p) => Je(p)
3884
3902
  });
3885
3903
  et(n, e);
3886
- const g = ((v = e.firstElementChild) == null ? void 0 : v.offsetHeight) || 0;
3887
- return Se.push({ id: D, el: e, vm: n, height: g, leaving: !1 }), je(), requestAnimationFrame(() => {
3888
- const h = e.firstElementChild;
3889
- if (!h) return;
3890
- const S = h.offsetHeight || g || 0, C = Se.find((B) => B.id === D);
3891
- C && (C.height = S, je());
3892
- }), { close: () => Je(D) };
3904
+ const m = ((v = e.firstElementChild) == null ? void 0 : v.offsetHeight) || 0;
3905
+ return Se.push({ id: x, el: e, vm: n, height: m, leaving: !1 }), je(), requestAnimationFrame(() => {
3906
+ const p = e.firstElementChild;
3907
+ if (!p) return;
3908
+ const I = p.offsetHeight || m || 0, C = Se.find((B) => B.id === x);
3909
+ C && (C.height = I, je());
3910
+ }), { close: () => Je(x) };
3893
3911
  }
3894
3912
  const Oe = {
3895
- success(t, D = {}) {
3896
- return Ue({ ...D, type: "success", message: t });
3913
+ success(t, x) {
3914
+ return Ue({ ...typeof x == "number" ? { duration: x } : x || {}, type: "success", message: t });
3897
3915
  },
3898
- warning(t, D = {}) {
3899
- return Ue({ ...D, type: "warning", message: t });
3916
+ warning(t, x) {
3917
+ return Ue({ ...typeof x == "number" ? { duration: x } : x || {}, type: "warning", message: t });
3900
3918
  },
3901
- error(t, D = {}) {
3902
- return Ue({ ...D, type: "error", message: t });
3919
+ error(t, x) {
3920
+ return Ue({ ...typeof x == "number" ? { duration: x } : x || {}, type: "error", message: t });
3903
3921
  }
3904
3922
  };
3905
3923
  typeof window < "u" && (window.YMessage = Oe, typeof globalThis.YMessage > "u" && (globalThis.YMessage = Oe));
3906
3924
  function je() {
3907
3925
  let t = 20;
3908
- Se.forEach((D) => {
3909
- const e = D.el.firstElementChild;
3926
+ Se.forEach((x) => {
3927
+ const e = x.el.firstElementChild;
3910
3928
  if (!e) return;
3911
3929
  const n = t;
3912
- if (e.style.transform = `translate(-50%, ${n}px)`, e.style.top || (e.style.top = "0px"), !D.leaving)
3913
- t += (e.offsetHeight || D.height) + Ze;
3930
+ if (e.style.transform = `translate(-50%, ${n}px)`, e.style.top || (e.style.top = "0px"), !x.leaving)
3931
+ t += (e.offsetHeight || x.height) + Ze;
3914
3932
  else {
3915
- const g = e.offsetHeight || D.height;
3916
- t += g + Ze;
3933
+ const m = e.offsetHeight || x.height;
3934
+ t += m + Ze;
3917
3935
  }
3918
3936
  });
3919
3937
  }
@@ -3935,8 +3953,8 @@ const Xe = {
3935
3953
  QueryEncapsulation: Eo
3936
3954
  }, Yo = {
3937
3955
  install(t) {
3938
- Object.keys(Xe).forEach((D) => {
3939
- t.component(D, Xe[D]);
3956
+ Object.keys(Xe).forEach((x) => {
3957
+ t.component(x, Xe[x]);
3940
3958
  }), t.config.globalProperties.$message = Oe, typeof window < "u" && (window.YMessage = Oe);
3941
3959
  }
3942
3960
  };