@nhdropshipping/y-components 1.0.48 → 1.0.50

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 ge, computed as O, createElementBlock as u, openBlock as i, normalizeClass as K, createElementVNode as o, renderSlot as ce, Fragment as re, renderList as ve, createCommentVNode as H, toDisplayString as ne, ref as E, watch as oe, normalizeStyle as ue, withKeys as ke, nextTick as se, onMounted as $e, onUnmounted as Be, resolveComponent as Ae, createVNode as de, Transition as be, withCtx as fe, createTextVNode as xe, createBlock as Se, withModifiers as G, withDirectives as Ee, vModelText as ot, Teleport as Fe, vShow as ze, provide as at, reactive as st, onBeforeUnmount as Xe, TransitionGroup as it, resolveDynamicComponent as rt, mergeProps as ut, toHandlers as ct, render as Ge } from "vue";
1
+ import { defineComponent as we, computed as N, createElementBlock as u, openBlock as i, normalizeClass as z, createElementVNode as o, renderSlot as ce, Fragment as ue, renderList as he, createCommentVNode as K, toDisplayString as le, ref as E, watch as oe, normalizeStyle as ie, withKeys as ke, nextTick as ae, onMounted as De, onUnmounted as Be, resolveComponent as Ve, createVNode as de, Transition as $e, withCtx as ve, createTextVNode as Ce, createBlock as Me, withModifiers as X, withDirectives as Ee, vModelText as ot, Teleport as Fe, vShow as Ke, provide as at, reactive as st, onBeforeUnmount as Xe, TransitionGroup as it, resolveDynamicComponent as rt, mergeProps as ut, toHandlers as ct, render as Ge } from "vue";
2
2
  const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "content" }, vt = {
3
3
  key: 1,
4
4
  class: "y-btn-group",
@@ -15,7 +15,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
15
15
  viewBox: "0 0 20 20",
16
16
  fill: "currentColor",
17
17
  "aria-hidden": "true"
18
- }, mt = { key: 2 }, wt = /* @__PURE__ */ ge({
18
+ }, mt = { key: 2 }, wt = /* @__PURE__ */ we({
19
19
  __name: "ybutton",
20
20
  props: {
21
21
  htmlType: { default: "button" },
@@ -37,7 +37,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
37
37
  }
38
38
  n("click", C);
39
39
  }
40
- const p = O(() => {
40
+ const y = N(() => {
41
41
  switch (t.groupPosition) {
42
42
  case "start":
43
43
  return "group-pos-start";
@@ -48,7 +48,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
48
48
  default:
49
49
  return "group-pos-single";
50
50
  }
51
- }), y = O(() => Array.isArray(t.groupItems) && t.groupItems.length > 0);
51
+ }), p = N(() => Array.isArray(t.groupItems) && t.groupItems.length > 0);
52
52
  function L(C, I) {
53
53
  if (t.disabled || t.loading || C.disabled || C.loading) {
54
54
  I.preventDefault(), I.stopPropagation();
@@ -56,12 +56,12 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
56
56
  }
57
57
  n("group-click", C.value, I);
58
58
  }
59
- return (C, I) => y.value ? (i(), u("div", vt, [
60
- (i(!0), u(re, null, ve(e.groupItems, (x, w) => {
59
+ return (C, I) => p.value ? (i(), u("div", vt, [
60
+ (i(!0), u(ue, null, he(e.groupItems, (x, w) => {
61
61
  var g;
62
62
  return i(), u("button", {
63
63
  key: x.value ?? w,
64
- class: K(["y-btn", [
64
+ class: z(["y-btn", [
65
65
  `y-btn--${x.variant ?? e.variant}`,
66
66
  `y-btn--${x.size ?? e.size}`,
67
67
  "is-grouped",
@@ -73,7 +73,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
73
73
  "aria-busy": x.loading || e.loading ? "true" : "false",
74
74
  "aria-disabled": (x.disabled ?? !1) || e.disabled || e.loading || x.loading ? "true" : "false",
75
75
  "aria-label": x.ariaLabel || x.label,
76
- onClick: (b) => L(x, b)
76
+ onClick: (k) => L(x, k)
77
77
  }, [
78
78
  o("span", pt, [
79
79
  x.icon === "chevron-left" ? (i(), u("svg", yt, [...I[0] || (I[0] = [
@@ -88,19 +88,19 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
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
- ])])) : H("", !0),
92
- x.label && !x.onlyIcon ? (i(), u("span", mt, ne(x.label), 1)) : H("", !0)
91
+ ])])) : K("", !0),
92
+ x.label && !x.onlyIcon ? (i(), u("span", mt, le(x.label), 1)) : K("", !0)
93
93
  ])
94
94
  ], 10, ht);
95
95
  }), 128))
96
96
  ])) : (i(), u("button", {
97
97
  key: 0,
98
- class: K(["y-btn", [
98
+ class: z(["y-btn", [
99
99
  `y-btn--${e.variant}`,
100
100
  `y-btn--${e.size}`,
101
101
  { "is-block": e.block, "is-loading": e.loading },
102
102
  e.groupPosition !== "single" ? "is-grouped" : "",
103
- p.value
103
+ y.value
104
104
  ]]),
105
105
  type: e.htmlType,
106
106
  disabled: e.disabled || e.loading,
@@ -113,12 +113,12 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
113
113
  ])
114
114
  ], 10, dt));
115
115
  }
116
- }), me = (e, $) => {
116
+ }), be = (e, $) => {
117
117
  const t = e.__vccOpts || e;
118
118
  for (const [n, m] of $)
119
119
  t[n] = m;
120
120
  return t;
121
- }, Ne = /* @__PURE__ */ me(wt, [["__scopeId", "data-v-53157673"]]), kt = ["id", "name", "type", "placeholder", "autocomplete", "inputmode", "min", "max", "disabled", "required", "value"], bt = /* @__PURE__ */ ge({
121
+ }, Ne = /* @__PURE__ */ be(wt, [["__scopeId", "data-v-53157673"]]), bt = ["id", "name", "type", "placeholder", "autocomplete", "inputmode", "min", "max", "disabled", "required", "value"], kt = /* @__PURE__ */ we({
122
122
  __name: "yinput",
123
123
  props: {
124
124
  modelValue: { default: "" },
@@ -139,42 +139,42 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
139
139
  },
140
140
  emits: ["update:modelValue", "enter", "paste"],
141
141
  setup(e, { emit: $ }) {
142
- const t = e, n = $, m = E(null), p = E(""), y = E(!1), L = E(!1), C = E(t.placeholder || "");
142
+ const t = e, n = $, m = E(null), y = E(""), p = E(!1), L = E(!1), C = E(t.placeholder || "");
143
143
  oe(() => t.placeholder, (V) => {
144
144
  L.value || (C.value = V || "");
145
145
  });
146
146
  function I(V) {
147
- const j = V.target;
148
- y.value = !0, n("update:modelValue", j.value);
147
+ const O = V.target;
148
+ p.value = !0, n("update:modelValue", O.value);
149
149
  }
150
150
  function x() {
151
- L.value = !0, t.clearOnFocus && (p.value = t.modelValue || "", y.value = !1, C.value = p.value || t.placeholder || "", n("update:modelValue", ""));
151
+ L.value = !0, t.clearOnFocus && (y.value = t.modelValue || "", p.value = !1, C.value = y.value || t.placeholder || "", n("update:modelValue", ""));
152
152
  }
153
153
  function w() {
154
- if (L.value = !1, t.clearOnFocus && !y.value && (!t.modelValue || t.modelValue === "") && n("update:modelValue", p.value), t.min !== void 0 && t.modelValue !== void 0 && t.modelValue !== "") {
155
- const V = Number(t.modelValue), j = Number(t.min);
156
- !Number.isNaN(V) && !Number.isNaN(j) && V < j && n("update:modelValue", String(j));
154
+ if (L.value = !1, t.clearOnFocus && !p.value && (!t.modelValue || t.modelValue === "") && n("update:modelValue", y.value), t.min !== void 0 && t.modelValue !== void 0 && t.modelValue !== "") {
155
+ const V = Number(t.modelValue), O = Number(t.min);
156
+ !Number.isNaN(V) && !Number.isNaN(O) && V < O && n("update:modelValue", String(O));
157
157
  }
158
158
  C.value = t.placeholder || "";
159
159
  }
160
160
  function g(V) {
161
- const j = V.target;
162
- n("enter", j.value);
161
+ const O = V.target;
162
+ n("enter", O.value);
163
163
  }
164
- function b(V) {
165
- const j = V.target;
164
+ function k(V) {
165
+ const O = V.target;
166
166
  requestAnimationFrame(() => {
167
- n("paste", j.value);
167
+ n("paste", O.value);
168
168
  });
169
169
  }
170
- return (V, j) => (i(), u("div", {
171
- class: K(["y-input-wrap", { "is-block": e.block }]),
172
- style: ue({ width: e.width })
170
+ return (V, O) => (i(), u("div", {
171
+ class: z(["y-input-wrap", { "is-block": e.block }]),
172
+ style: ie({ width: e.width })
173
173
  }, [
174
174
  o("input", {
175
175
  ref_key: "inputRef",
176
176
  ref: m,
177
- class: K(["y-input", `y-input--${e.size}`]),
177
+ class: z(["y-input", `y-input--${e.size}`]),
178
178
  id: e.id,
179
179
  name: e.name,
180
180
  type: e.type,
@@ -190,11 +190,11 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
190
190
  onFocus: x,
191
191
  onBlur: w,
192
192
  onKeyup: ke(g, ["enter"]),
193
- onPaste: b
194
- }, null, 42, kt)
193
+ onPaste: k
194
+ }, null, 42, bt)
195
195
  ], 6));
196
196
  }
197
- }), et = /* @__PURE__ */ me(bt, [["__scopeId", "data-v-c4912c99"]]), xt = {
197
+ }), et = /* @__PURE__ */ be(kt, [["__scopeId", "data-v-c4912c99"]]), xt = {
198
198
  key: 0,
199
199
  class: "bulk-bar"
200
200
  }, $t = { class: "bulk-left" }, Ct = { class: "bulk-actions" }, Dt = { class: "card" }, _t = { class: "table" }, St = {
@@ -215,19 +215,19 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
215
215
  }, Tt = {
216
216
  key: 1,
217
217
  class: "empty-overlay"
218
- }, Kt = {
218
+ }, zt = {
219
219
  key: 0,
220
220
  style: { width: "34px", "min-width": "34px" }
221
- }, zt = {
221
+ }, Kt = {
222
222
  key: 1,
223
223
  style: { width: "40px", "min-width": "40px" }
224
224
  }, Ht = {
225
225
  key: 0,
226
226
  class: "col-expand"
227
- }, Rt = ["onClick"], Vt = {
227
+ }, At = ["onClick"], Rt = {
228
228
  key: 1,
229
229
  class: "col-select"
230
- }, Wt = ["value", "checked", "onChange"], At = ["colspan"], Ft = /* @__PURE__ */ ge({
230
+ }, Wt = ["value", "checked", "onChange"], Vt = ["colspan"], Ft = /* @__PURE__ */ we({
231
231
  __name: "ytable",
232
232
  props: {
233
233
  data: {},
@@ -254,78 +254,78 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
254
254
  },
255
255
  emits: ["edit", "select", "update:selectedItems", "page-change", "page-size-change"],
256
256
  setup(e, { emit: $ }) {
257
- const t = e, n = $, m = E(t.currentPage || 1), p = E(t.pageSize), y = E([]), L = E(/* @__PURE__ */ new Set()), C = E("none"), I = E(), x = E(), w = E(), g = E(), b = E([]), V = E({}), j = O(
258
- () => t.columns.filter((l) => !z(l.width)).map((l) => l.key)
257
+ const t = e, n = $, m = E(t.currentPage || 1), y = E(t.pageSize), p = E([]), L = E(/* @__PURE__ */ new Set()), C = E("none"), I = E(), x = E(), w = E(), g = E(), k = E([]), V = E({}), O = N(
258
+ () => t.columns.filter((l) => !B(l.width)).map((l) => l.key)
259
259
  );
260
- function F() {
261
- return `${(100 / (j.value.length || 1)).toFixed(6)}%`;
260
+ function P() {
261
+ return `${(100 / (O.value.length || 1)).toFixed(6)}%`;
262
262
  }
263
- const A = E(), q = E({
263
+ const R = E(), j = E({
264
264
  show: !1,
265
265
  thumbHeight: 40,
266
266
  thumbTop: 0
267
267
  });
268
- let Q = !1, le = 0, J = 0;
269
- const W = E(0);
270
- function z(l) {
268
+ let Z = !1, se = 0, G = 0;
269
+ const H = E(0);
270
+ function B(l) {
271
271
  if (l == null) return;
272
272
  if (typeof l == "number")
273
273
  return Number.isFinite(l) ? `${l}px` : void 0;
274
- const d = String(l).trim();
275
- if (d)
276
- return /^\d+(\.\d+)?$/.test(d) ? `${d}px` : d;
277
- }
278
- function R(l) {
279
- const d = z(l);
280
- if (!d) return null;
281
- const D = parseFloat(d);
274
+ const c = String(l).trim();
275
+ if (c)
276
+ return /^\d+(\.\d+)?$/.test(c) ? `${c}px` : c;
277
+ }
278
+ function W(l) {
279
+ const c = B(l);
280
+ if (!c) return null;
281
+ const D = parseFloat(c);
282
282
  return Number.isFinite(D) ? D : null;
283
283
  }
284
- const Y = O(() => {
284
+ const Y = N(() => {
285
285
  let l = t.columns.length;
286
286
  return t.selectable && (l += 1), t.expandable && (l += 1), l;
287
- }), ee = O(() => {
287
+ }), ee = N(() => {
288
288
  if (!t.searchKeyword || !t.searchFields.length)
289
289
  return t.data;
290
290
  const l = t.searchKeyword.toLowerCase();
291
- return t.data.filter((d) => t.searchFields.some((D) => {
292
- const S = r(d, D);
291
+ return t.data.filter((c) => t.searchFields.some((D) => {
292
+ const S = r(c, D);
293
293
  return String(S).toLowerCase().includes(l);
294
294
  }));
295
- }), X = O(() => (t.pagination, ee.value)), ae = O(() => {
295
+ }), J = N(() => (t.pagination, ee.value)), fe = N(() => {
296
296
  if (!t.selectable) return !1;
297
- const l = X.value.map((d, D) => c(d, D));
298
- return l.length > 0 && l.every((d) => y.value.includes(d));
299
- }), we = O(() => {
297
+ const l = J.value.map((c, D) => d(c, D));
298
+ return l.length > 0 && l.every((c) => p.value.includes(c));
299
+ }), me = N(() => {
300
300
  const l = [];
301
- let d = t.selectable ? 40 : 0;
301
+ let c = t.selectable ? 40 : 0;
302
302
  for (let D = 0; D < t.columns.length; D++) {
303
303
  const S = t.columns[D];
304
304
  if (S.fixed === "left") {
305
305
  let _ = 80;
306
- const T = R(S.width);
307
- T !== null ? _ = T : b.value[D] && (_ = R(b.value[D]) ?? _), l.push(d), d += _;
306
+ const T = W(S.width);
307
+ T !== null ? _ = T : k.value[D] && (_ = W(k.value[D]) ?? _), l.push(c), c += _;
308
308
  }
309
309
  }
310
310
  return l;
311
- }), N = O(() => {
311
+ }), F = N(() => {
312
312
  const l = [];
313
- let d = 0;
313
+ let c = 0;
314
314
  const D = [];
315
315
  for (let S = t.columns.length - 1; S >= 0; S--) {
316
316
  const _ = t.columns[S];
317
317
  if (_.fixed === "right") {
318
318
  let T = 80;
319
- const U = R(_.width);
320
- U !== null ? T = U : b.value[S] && (T = R(b.value[S]) ?? T), D.push({ index: S, width: T });
319
+ const q = W(_.width);
320
+ q !== null ? T = q : k.value[S] && (T = W(k.value[S]) ?? T), D.push({ index: S, width: T });
321
321
  }
322
322
  }
323
323
  for (let S = 0; S < D.length; S++)
324
- l.push(d), d += D[S].width;
324
+ l.push(c), c += D[S].width;
325
325
  return l;
326
326
  });
327
- function Z(l, d) {
328
- if (d === "left") {
327
+ function Q(l, c) {
328
+ if (c === "left") {
329
329
  let D = 0;
330
330
  for (let S = 0; S < l; S++)
331
331
  t.columns[S].fixed === "left" && D++;
@@ -337,8 +337,8 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
337
337
  return D;
338
338
  }
339
339
  }
340
- function c(l, d) {
341
- return typeof t.rowKey == "function" ? t.rowKey(l) : l[t.rowKey] || d;
340
+ function d(l, c) {
341
+ return typeof t.rowKey == "function" ? t.rowKey(l) : l[t.rowKey] || c;
342
342
  }
343
343
  function h(l) {
344
344
  return L.value.has(l);
@@ -346,238 +346,238 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
346
346
  function a(l) {
347
347
  L.value.has(l) ? L.value.delete(l) : L.value.add(l);
348
348
  }
349
- function r(l, d) {
350
- return d.split(".").reduce((D, S) => D == null ? void 0 : D[S], l);
349
+ function r(l, c) {
350
+ return c.split(".").reduce((D, S) => D == null ? void 0 : D[S], l);
351
351
  }
352
- function f(l, d = !1) {
352
+ function f(l, c = !1) {
353
353
  const D = [];
354
- return l.align && D.push(`text-${l.align}`), l.fixed === "right" && (D.push("col-fixed-right"), d && D.push("col-fixed-right-header")), l.fixed === "left" && (D.push("col-fixed-left"), d && D.push("col-fixed-left-header")), D.join(" ");
354
+ return l.align && D.push(`text-${l.align}`), l.fixed === "right" && (D.push("col-fixed-right"), c && D.push("col-fixed-right-header")), l.fixed === "left" && (D.push("col-fixed-left"), c && D.push("col-fixed-left-header")), D.join(" ");
355
355
  }
356
- function k(l, d, D) {
357
- const S = {}, _ = z(l.width);
356
+ function b(l, c, D) {
357
+ const S = {}, _ = B(l.width);
358
358
  if (_)
359
359
  S.width = _, S.minWidth = _, S.maxWidth = _;
360
360
  else {
361
- const T = F();
361
+ const T = P();
362
362
  S.width = T, S.minWidth = T, S.maxWidth = T;
363
363
  }
364
364
  if (l.fixed === "left") {
365
- const T = Z(d, "left"), U = we.value[T] || 0;
366
- S.left = `${U}px`, S.zIndex = D ? `${10 + T}` : `${5 + T}`;
365
+ const T = Q(c, "left"), q = me.value[T] || 0;
366
+ S.left = `${q}px`, S.zIndex = D ? `${10 + T}` : `${5 + T}`;
367
367
  } else if (l.fixed === "right") {
368
- const T = Z(d, "right"), U = N.value[T] || 0;
369
- D ? S.right = `${U - 3}px` : S.right = `${U}px`, S.zIndex = D ? `${10 + T}` : `${5 + T}`;
368
+ const T = Q(c, "right"), q = F.value[T] || 0;
369
+ D ? S.right = `${q - 3}px` : S.right = `${q}px`, S.zIndex = D ? `${10 + T}` : `${5 + T}`;
370
370
  }
371
371
  return S;
372
372
  }
373
- function M(l, d) {
374
- const D = r(l, d.key);
375
- return d.formatter ? d.formatter(D, l) : D || "";
373
+ function M(l, c) {
374
+ const D = r(l, c.key);
375
+ return c.formatter ? c.formatter(D, l) : D || "";
376
376
  }
377
- function B(l) {
378
- y.value.includes(l) ? y.value = y.value.filter((d) => d !== l) : y.value = [...y.value, l], n("select", y.value), n("update:selectedItems", y.value);
377
+ function U(l) {
378
+ p.value.includes(l) ? p.value = p.value.filter((c) => c !== l) : p.value = [...p.value, l], n("select", p.value), n("update:selectedItems", p.value);
379
379
  }
380
- function P() {
381
- const l = X.value.map((d, D) => c(d, D));
382
- if (l.every((d) => y.value.includes(d)))
383
- y.value = y.value.filter((d) => !l.includes(d));
380
+ function te() {
381
+ const l = J.value.map((c, D) => d(c, D));
382
+ if (l.every((c) => p.value.includes(c)))
383
+ p.value = p.value.filter((c) => !l.includes(c));
384
384
  else {
385
- const d = /* @__PURE__ */ new Set([...y.value, ...l]);
386
- y.value = Array.from(d);
385
+ const c = /* @__PURE__ */ new Set([...p.value, ...l]);
386
+ p.value = Array.from(c);
387
387
  }
388
- n("select", y.value), n("update:selectedItems", y.value);
388
+ n("select", p.value), n("update:selectedItems", p.value);
389
389
  }
390
- function te() {
391
- y.value = [], n("select", y.value), n("update:selectedItems", y.value);
390
+ function A() {
391
+ p.value = [], n("select", p.value), n("update:selectedItems", p.value);
392
392
  }
393
393
  oe(() => t.searchKeyword, () => {
394
394
  m.value = 1;
395
395
  }), oe(() => t.data, () => {
396
396
  t.total || (m.value = 1);
397
397
  }, { deep: !0 });
398
- function ye(l) {
398
+ function ne(l) {
399
399
  m.value = l, n("page-change", l);
400
400
  }
401
- function Le(l) {
402
- p.value = l, m.value = 1, n("page-size-change", l);
401
+ function Se(l) {
402
+ y.value = l, m.value = 1, n("page-size-change", l);
403
403
  }
404
404
  oe(() => t.currentPage, (l) => {
405
- const d = typeof l == "number" && l > 0 ? l : 1;
406
- m.value !== d && (m.value = d);
405
+ const c = typeof l == "number" && l > 0 ? l : 1;
406
+ m.value !== c && (m.value = c);
407
407
  }), oe(() => t.pageSize, (l) => {
408
- const d = typeof l == "number" && l > 0 ? l : 10;
409
- p.value !== d && (p.value = d);
408
+ const c = typeof l == "number" && l > 0 ? l : 10;
409
+ y.value !== c && (y.value = c);
410
410
  });
411
- function Ce() {
412
- I.value && se(() => {
413
- const l = I.value.getBoundingClientRect(), d = window.innerHeight, D = l.top, S = I.value.querySelector(".table-header"), _ = S ? S.offsetHeight : 40, T = I.value.querySelector(".ypagination"), U = T ? T.offsetHeight : 60, he = I.value.querySelector(".bulk-bar"), pe = he ? he.offsetHeight : 0, Ke = _ + U + pe + 20, ie = d - D - Ke, lt = Math.max(200, ie), Ze = I.value.querySelector(".table-body-wrap .table");
414
- Ze && (Ze.offsetHeight > ie ? C.value = `${lt}px` : C.value = "none");
411
+ function ye() {
412
+ I.value && ae(() => {
413
+ const l = I.value.getBoundingClientRect(), c = window.innerHeight, D = l.top, S = I.value.querySelector(".table-header"), _ = S ? S.offsetHeight : 40, T = I.value.querySelector(".ypagination"), q = T ? T.offsetHeight : 60, pe = I.value.querySelector(".bulk-bar"), ge = pe ? pe.offsetHeight : 0, ze = _ + q + ge + 20, re = c - D - ze, lt = Math.max(200, re), Ze = I.value.querySelector(".table-body-wrap .table");
414
+ Ze && (Ze.offsetHeight > re ? C.value = `${lt}px` : C.value = "none");
415
415
  });
416
416
  }
417
- let Me = !1;
417
+ let xe = !1;
418
418
  function Ie() {
419
- !x.value || !w.value || Me || x.value.scrollLeft !== w.value.scrollLeft && (Me = !0, x.value.scrollLeft = w.value.scrollLeft, requestAnimationFrame(() => {
420
- Me = !1;
419
+ !x.value || !w.value || xe || x.value.scrollLeft !== w.value.scrollLeft && (xe = !0, x.value.scrollLeft = w.value.scrollLeft, requestAnimationFrame(() => {
420
+ xe = !1;
421
421
  }));
422
422
  }
423
423
  function Pe() {
424
- !x.value || !w.value || Me || w.value.scrollLeft !== x.value.scrollLeft && (Me = !0, w.value.scrollLeft = x.value.scrollLeft, requestAnimationFrame(() => {
425
- Me = !1;
424
+ !x.value || !w.value || xe || w.value.scrollLeft !== x.value.scrollLeft && (xe = !0, w.value.scrollLeft = x.value.scrollLeft, requestAnimationFrame(() => {
425
+ xe = !1;
426
426
  }));
427
427
  }
428
- function Re() {
429
- se(() => {
428
+ function Ae() {
429
+ ae(() => {
430
430
  if (!w.value) return;
431
- const l = w.value, d = l.scrollHeight, D = l.clientHeight, S = l.scrollTop, _ = d > D + 1;
432
- if (q.value.show = _, !_) return;
433
- const T = 24, U = D / d, he = A.value ? A.value.clientHeight : D, pe = Math.max(T, Math.floor(he * U));
434
- q.value.thumbHeight = pe;
435
- const Ke = Math.max(0, he - pe), ie = Math.max(1, d - D);
436
- q.value.thumbTop = Math.min(Ke, Math.floor(S / ie * Ke));
431
+ const l = w.value, c = l.scrollHeight, D = l.clientHeight, S = l.scrollTop, _ = c > D + 1;
432
+ if (j.value.show = _, !_) return;
433
+ const T = 24, q = D / c, pe = R.value ? R.value.clientHeight : D, ge = Math.max(T, Math.floor(pe * q));
434
+ j.value.thumbHeight = ge;
435
+ const ze = Math.max(0, pe - ge), re = Math.max(1, c - D);
436
+ j.value.thumbTop = Math.min(ze, Math.floor(S / re * ze));
437
437
  });
438
438
  }
439
- function Ve(l) {
440
- if (!Q || !w.value || !A.value) return;
439
+ function Re(l) {
440
+ if (!Z || !w.value || !R.value) return;
441
441
  l.preventDefault();
442
- const d = A.value.clientHeight, D = Math.max(0, d - q.value.thumbHeight), S = w.value, _ = S.scrollHeight, T = S.clientHeight, U = Math.max(1, _ - T), pe = (l.clientY - le) / Math.max(1, D) * U;
443
- S.scrollTop = Math.min(U, Math.max(0, J + pe)), Re();
442
+ const c = R.value.clientHeight, D = Math.max(0, c - j.value.thumbHeight), S = w.value, _ = S.scrollHeight, T = S.clientHeight, q = Math.max(1, _ - T), ge = (l.clientY - se) / Math.max(1, D) * q;
443
+ S.scrollTop = Math.min(q, Math.max(0, G + ge)), Ae();
444
444
  }
445
445
  function Ye() {
446
- Q = !1, window.removeEventListener("mousemove", Ve), window.removeEventListener("mouseup", Ye);
446
+ Z = !1, window.removeEventListener("mousemove", Re), window.removeEventListener("mouseup", Ye);
447
447
  }
448
448
  function We() {
449
- se(() => {
449
+ ae(() => {
450
450
  var D, S;
451
- if (b.value.length === t.columns.length && b.value.every((_) => !!_))
451
+ if (k.value.length === t.columns.length && k.value.every((_) => !!_))
452
452
  return;
453
453
  const l = [];
454
454
  t.columns.forEach((_, T) => {
455
- const U = z(_.width);
456
- if (U)
457
- l.push(U), V.value[_.key] = U;
455
+ const q = B(_.width);
456
+ if (q)
457
+ l.push(q), V.value[_.key] = q;
458
458
  else if (V.value[_.key])
459
459
  l.push(V.value[_.key]);
460
460
  else {
461
- const he = b.value[T];
462
- if (he)
463
- l.push(he), V.value[_.key] = he;
464
- else {
465
- const pe = F();
461
+ const pe = k.value[T];
462
+ if (pe)
466
463
  l.push(pe), V.value[_.key] = pe;
464
+ else {
465
+ const ge = P();
466
+ l.push(ge), V.value[_.key] = ge;
467
467
  }
468
468
  }
469
469
  });
470
- const d = (D = g.value) == null ? void 0 : D.querySelector("tbody tr");
471
- if (d) {
472
- const _ = t.selectable ? 1 : 0, T = Array.from(d.children);
473
- for (let U = 0; U < t.columns.length; U++)
474
- if (!l[U]) {
475
- const he = T[_ + U];
476
- if (he && he.clientWidth > 0) {
477
- const pe = `${he.clientWidth}px`;
478
- l[U] = pe, V.value[t.columns[U].key] = pe;
470
+ const c = (D = g.value) == null ? void 0 : D.querySelector("tbody tr");
471
+ if (c) {
472
+ const _ = t.selectable ? 1 : 0, T = Array.from(c.children);
473
+ for (let q = 0; q < t.columns.length; q++)
474
+ if (!l[q]) {
475
+ const pe = T[_ + q];
476
+ if (pe && pe.clientWidth > 0) {
477
+ const ge = `${pe.clientWidth}px`;
478
+ l[q] = ge, V.value[t.columns[q].key] = ge;
479
479
  } else {
480
- const pe = F();
481
- l[U] = pe, V.value[t.columns[U].key] = pe;
480
+ const ge = P();
481
+ l[q] = ge, V.value[t.columns[q].key] = ge;
482
482
  }
483
483
  }
484
484
  } else
485
485
  for (let _ = 0; _ < l.length; _++)
486
486
  if (!l[_]) {
487
487
  const T = V.value[((S = t.columns[_]) == null ? void 0 : S.key) || ""];
488
- l[_] = T || b.value[_] || "80px", t.columns[_] && (V.value[t.columns[_].key] = l[_]);
488
+ l[_] = T || k.value[_] || "80px", t.columns[_] && (V.value[t.columns[_].key] = l[_]);
489
489
  }
490
- b.value = l;
490
+ k.value = l;
491
491
  });
492
492
  }
493
493
  function He() {
494
- Ce(), s();
494
+ ye(), s();
495
495
  }
496
496
  oe(() => t.data, () => {
497
- se(() => {
498
- Ce(), Ie(), s(), L.value.clear();
497
+ ae(() => {
498
+ ye(), Ie(), s(), L.value.clear();
499
499
  });
500
- }, { deep: !0 }), oe([m, p], () => {
501
- se(() => {
502
- Ce(), Ie(), s();
500
+ }, { deep: !0 }), oe([m, y], () => {
501
+ ae(() => {
502
+ ye(), Ie(), s();
503
503
  });
504
504
  }), oe(() => t.columns, () => {
505
- const l = [], d = { ...V.value };
505
+ const l = [], c = { ...V.value };
506
506
  t.columns.forEach((S, _) => {
507
- const T = z(S.width);
508
- T ? (l.push(T), d[S.key] = T) : d[S.key] ? l.push(d[S.key]) : b.value[_] ? (l.push(b.value[_]), d[S.key] = b.value[_]) : l.push("");
507
+ const T = B(S.width);
508
+ T ? (l.push(T), c[S.key] = T) : c[S.key] ? l.push(c[S.key]) : k.value[_] ? (l.push(k.value[_]), c[S.key] = k.value[_]) : l.push("");
509
509
  });
510
510
  const D = new Set(t.columns.map((S) => S.key));
511
- Object.keys(d).forEach((S) => {
512
- D.has(S) || delete d[S];
513
- }), V.value = d, b.value = l, se(() => {
511
+ Object.keys(c).forEach((S) => {
512
+ D.has(S) || delete c[S];
513
+ }), V.value = c, k.value = l, ae(() => {
514
514
  We(), Ie(), s();
515
515
  });
516
- }, { deep: !0 }), oe(() => y.value, () => {
517
- se(() => {
518
- Ce(), s();
516
+ }, { deep: !0 }), oe(() => p.value, () => {
517
+ ae(() => {
518
+ ye(), s();
519
519
  });
520
520
  }, { deep: !0 }), oe(() => t.loading, () => {
521
- se(() => {
521
+ ae(() => {
522
522
  s();
523
523
  });
524
- }), $e(() => {
525
- var l, d;
526
- se(() => {
527
- Ce(), We(), s(), Re();
524
+ }), De(() => {
525
+ var l, c;
526
+ ae(() => {
527
+ ye(), We(), s(), Ae();
528
528
  }), window.addEventListener("resize", He), window.addEventListener("scroll", He, !0), (l = w.value) == null || l.addEventListener("scroll", () => {
529
- Ie(), Re(), s();
530
- }, { passive: !0 }), (d = x.value) == null || d.addEventListener("scroll", () => {
529
+ Ie(), Ae(), s();
530
+ }, { passive: !0 }), (c = x.value) == null || c.addEventListener("scroll", () => {
531
531
  Pe();
532
- }, { passive: !0 }), se(() => Ie()), w.value && typeof ResizeObserver < "u" && (v = new ResizeObserver(() => {
532
+ }, { passive: !0 }), ae(() => Ie()), w.value && typeof ResizeObserver < "u" && (v = new ResizeObserver(() => {
533
533
  s();
534
534
  }), v.observe(w.value));
535
535
  }), Be(() => {
536
- var l, d;
537
- window.removeEventListener("resize", He), window.removeEventListener("scroll", He, !0), (l = w.value) == null || l.removeEventListener("scroll", Ie), (d = x.value) == null || d.removeEventListener("scroll", Pe), window.removeEventListener("mousemove", Ve), window.removeEventListener("mouseup", Ye), v && (v.disconnect(), v = null);
536
+ var l, c;
537
+ window.removeEventListener("resize", He), window.removeEventListener("scroll", He, !0), (l = w.value) == null || l.removeEventListener("scroll", Ie), (c = x.value) == null || c.removeEventListener("scroll", Pe), window.removeEventListener("mousemove", Re), window.removeEventListener("mouseup", Ye), v && (v.disconnect(), v = null);
538
538
  });
539
539
  let Te = -1;
540
540
  function s() {
541
541
  !x.value || !w.value || requestAnimationFrame(() => {
542
542
  if (!x.value || !w.value) return;
543
- const l = w.value, d = Math.ceil(l.offsetWidth - l.clientWidth);
544
- if (W.value = d, d !== Te) {
545
- Te = d;
543
+ const l = w.value, c = Math.ceil(l.offsetWidth - l.clientWidth);
544
+ if (H.value = c, c !== Te) {
545
+ Te = c;
546
546
  const D = x.value.querySelector(".table"), S = g.value;
547
- D && S && (x.value.style.paddingRight = "0px", D.style.width = "", D.style.marginRight = "", d > 0 ? (x.value.style.paddingRight = `${d}px`, D.style.width = "100%", D.style.marginRight = `-${d}px`) : (x.value.style.paddingRight = "0px", D.style.width = "100%", D.style.marginRight = "0px"));
547
+ D && S && (x.value.style.paddingRight = "0px", D.style.width = "", D.style.marginRight = "", c > 0 ? (x.value.style.paddingRight = `${c}px`, D.style.width = "100%", D.style.marginRight = `-${c}px`) : (x.value.style.paddingRight = "0px", D.style.width = "100%", D.style.marginRight = "0px"));
548
548
  }
549
549
  });
550
550
  }
551
551
  let v = null;
552
- return (l, d) => {
553
- const D = Ae("YButton"), S = Ae("YPagination");
552
+ return (l, c) => {
553
+ const D = Ve("YButton"), S = Ve("YPagination");
554
554
  return i(), u("div", {
555
555
  class: "ytable-container",
556
556
  ref_key: "tableContainer",
557
557
  ref: I
558
558
  }, [
559
- de(be, { name: "bulk-slide" }, {
560
- default: fe(() => [
561
- y.value.length && e.showBulkActions ? (i(), u("div", xt, [
562
- o("div", $t, "已选择 " + ne(y.value.length) + " 项", 1),
559
+ de($e, { name: "bulk-slide" }, {
560
+ default: ve(() => [
561
+ p.value.length && e.showBulkActions ? (i(), u("div", xt, [
562
+ o("div", $t, "已选择 " + le(p.value.length) + " 项", 1),
563
563
  o("div", Ct, [
564
564
  ce(l.$slots, "bulk-actions", {
565
- selectedItems: y.value,
566
- clearSelection: te
565
+ selectedItems: p.value,
566
+ clearSelection: A
567
567
  }, () => [
568
568
  de(D, {
569
569
  size: "small",
570
570
  class: "btn",
571
- onClick: te
571
+ onClick: A
572
572
  }, {
573
- default: fe(() => [...d[2] || (d[2] = [
574
- xe("清除选择", -1)
573
+ default: ve(() => [...c[2] || (c[2] = [
574
+ Ce("清除选择", -1)
575
575
  ])]),
576
576
  _: 1
577
577
  })
578
578
  ], !0)
579
579
  ])
580
- ])) : H("", !0)
580
+ ])) : K("", !0)
581
581
  ]),
582
582
  _: 3
583
583
  }),
@@ -589,100 +589,100 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
589
589
  }, [
590
590
  o("table", _t, [
591
591
  o("colgroup", null, [
592
- t.expandable ? (i(), u("col", St)) : H("", !0),
593
- e.selectable ? (i(), u("col", Lt)) : H("", !0),
594
- (i(!0), u(re, null, ve(e.columns, (_, T) => (i(), u("col", {
592
+ t.expandable ? (i(), u("col", St)) : K("", !0),
593
+ e.selectable ? (i(), u("col", Lt)) : K("", !0),
594
+ (i(!0), u(ue, null, he(e.columns, (_, T) => (i(), u("col", {
595
595
  key: _.key,
596
- style: ue({ width: b.value[T] || void 0, minWidth: b.value[T] || "80px" })
596
+ style: ie({ width: k.value[T] || void 0, minWidth: k.value[T] || "80px" })
597
597
  }, null, 4))), 128))
598
598
  ]),
599
599
  o("thead", null, [
600
600
  o("tr", null, [
601
- t.expandable ? (i(), u("th", Mt)) : H("", !0),
601
+ t.expandable ? (i(), u("th", Mt)) : K("", !0),
602
602
  e.selectable ? (i(), u("th", It, [
603
603
  o("input", {
604
604
  type: "checkbox",
605
- checked: ae.value,
606
- onChange: P
605
+ checked: fe.value,
606
+ onChange: te
607
607
  }, null, 40, Et)
608
- ])) : H("", !0),
609
- (i(!0), u(re, null, ve(e.columns, (_, T) => (i(), u("th", {
608
+ ])) : K("", !0),
609
+ (i(!0), u(ue, null, he(e.columns, (_, T) => (i(), u("th", {
610
610
  key: _.key,
611
- class: K(f(_, !0)),
612
- style: ue(k(_, T, !0))
613
- }, ne(_.title), 7))), 128))
611
+ class: z(f(_, !0)),
612
+ style: ie(b(_, T, !0))
613
+ }, le(_.title), 7))), 128))
614
614
  ])
615
615
  ])
616
616
  ])
617
617
  ], 512),
618
618
  o("div", {
619
- class: K(["table-body-wrap", { "is-loading": e.loading, "is-empty": !X.value.length && !e.loading }]),
619
+ class: z(["table-body-wrap", { "is-loading": e.loading, "is-empty": !J.value.length && !e.loading }]),
620
620
  ref_key: "bodyWrapRef",
621
621
  ref: w,
622
- style: ue({ maxHeight: C.value })
622
+ style: ie({ maxHeight: C.value })
623
623
  }, [
624
- e.loading ? (i(), u("div", Bt, [...d[3] || (d[3] = [
624
+ e.loading ? (i(), u("div", Bt, [...c[3] || (c[3] = [
625
625
  o("div", { class: "loading-spinner" }, null, -1),
626
626
  o("div", { class: "loading-text" }, "加载中...", -1)
627
- ])])) : H("", !0),
628
- !X.value.length && !e.loading ? (i(), u("div", Tt, [
627
+ ])])) : K("", !0),
628
+ !J.value.length && !e.loading ? (i(), u("div", Tt, [
629
629
  ce(l.$slots, "empty", {}, () => [
630
- xe(ne(e.emptyText), 1)
630
+ Ce(le(e.emptyText), 1)
631
631
  ], !0)
632
- ])) : H("", !0),
632
+ ])) : K("", !0),
633
633
  o("table", {
634
- class: K(["table", { "loading-table": e.loading }]),
634
+ class: z(["table", { "loading-table": e.loading }]),
635
635
  ref_key: "bodyTableRef",
636
636
  ref: g
637
637
  }, [
638
638
  o("colgroup", null, [
639
- t.expandable ? (i(), u("col", Kt)) : H("", !0),
640
- e.selectable ? (i(), u("col", zt)) : H("", !0),
641
- (i(!0), u(re, null, ve(e.columns, (_, T) => (i(), u("col", {
639
+ t.expandable ? (i(), u("col", zt)) : K("", !0),
640
+ e.selectable ? (i(), u("col", Kt)) : K("", !0),
641
+ (i(!0), u(ue, null, he(e.columns, (_, T) => (i(), u("col", {
642
642
  key: _.key,
643
- style: ue({ width: b.value[T] || void 0, minWidth: b.value[T] || "80px" })
643
+ style: ie({ width: k.value[T] || void 0, minWidth: k.value[T] || "80px" })
644
644
  }, null, 4))), 128))
645
645
  ]),
646
646
  o("tbody", null, [
647
- (i(!0), u(re, null, ve(X.value, (_, T) => (i(), u(re, {
648
- key: c(_, T)
647
+ (i(!0), u(ue, null, he(J.value, (_, T) => (i(), u(ue, {
648
+ key: d(_, T)
649
649
  }, [
650
650
  o("tr", null, [
651
651
  t.expandable ? (i(), u("td", Ht, [
652
652
  o("button", {
653
653
  class: "expand-btn",
654
654
  type: "button",
655
- onClick: (U) => a(c(_, T))
655
+ onClick: (q) => a(d(_, T))
656
656
  }, [
657
657
  o("span", {
658
- class: K(["expand-icon", { "is-open": h(c(_, T)) }])
658
+ class: z(["expand-icon", { "is-open": h(d(_, T)) }])
659
659
  }, null, 2)
660
- ], 8, Rt)
661
- ])) : H("", !0),
662
- e.selectable ? (i(), u("td", Vt, [
660
+ ], 8, At)
661
+ ])) : K("", !0),
662
+ e.selectable ? (i(), u("td", Rt, [
663
663
  o("input", {
664
664
  type: "checkbox",
665
- value: c(_, T),
666
- checked: y.value.includes(c(_, T)),
667
- onChange: (U) => B(c(_, T))
665
+ value: d(_, T),
666
+ checked: p.value.includes(d(_, T)),
667
+ onChange: (q) => U(d(_, T))
668
668
  }, null, 40, Wt)
669
- ])) : H("", !0),
670
- (i(!0), u(re, null, ve(e.columns, (U, he) => (i(), u("td", {
671
- key: U.key,
672
- class: K(f(U)),
673
- style: ue(k(U, he, !1))
669
+ ])) : K("", !0),
670
+ (i(!0), u(ue, null, he(e.columns, (q, pe) => (i(), u("td", {
671
+ key: q.key,
672
+ class: z(f(q)),
673
+ style: ie(b(q, pe, !1))
674
674
  }, [
675
- ce(l.$slots, `cell-${U.key}`, {
675
+ ce(l.$slots, `cell-${q.key}`, {
676
676
  item: _,
677
- value: r(_, U.key),
677
+ value: r(_, q.key),
678
678
  index: T
679
679
  }, () => [
680
- xe(ne(M(_, U)), 1)
680
+ Ce(le(M(_, q)), 1)
681
681
  ], !0)
682
682
  ], 6))), 128))
683
683
  ]),
684
- t.expandable && h(c(_, T)) ? (i(), u("tr", {
685
- key: `${c(_, T)}-expand`,
684
+ t.expandable && h(d(_, T)) ? (i(), u("tr", {
685
+ key: `${d(_, T)}-expand`,
686
686
  class: "expand-row"
687
687
  }, [
688
688
  o("td", {
@@ -693,29 +693,29 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
693
693
  item: _,
694
694
  index: T
695
695
  }, void 0, !0)
696
- ], 8, At)
697
- ])) : H("", !0)
696
+ ], 8, Vt)
697
+ ])) : K("", !0)
698
698
  ], 64))), 128))
699
699
  ])
700
700
  ], 2)
701
701
  ], 6),
702
- e.pagination ? (i(), Se(S, {
702
+ e.pagination ? (i(), Me(S, {
703
703
  key: 0,
704
704
  class: "align-right",
705
705
  "current-page": m.value,
706
- "onUpdate:currentPage": d[0] || (d[0] = (_) => m.value = _),
707
- "page-size": p.value,
708
- "onUpdate:pageSize": d[1] || (d[1] = (_) => p.value = _),
706
+ "onUpdate:currentPage": c[0] || (c[0] = (_) => m.value = _),
707
+ "page-size": y.value,
708
+ "onUpdate:pageSize": c[1] || (c[1] = (_) => y.value = _),
709
709
  loading: t.loading,
710
710
  "page-size-options": e.pageSizeOptions,
711
- onPageChange: ye,
712
- onPageSizeChange: Le
713
- }, null, 8, ["current-page", "page-size", "loading", "page-size-options"])) : H("", !0)
711
+ onPageChange: ne,
712
+ onPageSizeChange: Se
713
+ }, null, 8, ["current-page", "page-size", "loading", "page-size-options"])) : K("", !0)
714
714
  ])
715
715
  ], 512);
716
716
  };
717
717
  }
718
- }), Pt = /* @__PURE__ */ me(Ft, [["__scopeId", "data-v-a2bea873"]]), Yt = ["onKeydown", "aria-expanded"], Nt = ["src"], Ot = ["placeholder", "onKeydown"], jt = ["onClick", "onMouseenter"], qt = ["src"], Ut = /* @__PURE__ */ ge({
718
+ }), Pt = /* @__PURE__ */ be(Ft, [["__scopeId", "data-v-a2bea873"]]), Yt = ["onKeydown", "aria-expanded"], Nt = ["src"], Ot = ["placeholder", "onKeydown"], jt = ["onClick", "onMouseenter"], qt = ["src"], Ut = /* @__PURE__ */ we({
719
719
  __name: "yselect",
720
720
  props: {
721
721
  modelValue: {},
@@ -734,127 +734,127 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
734
734
  },
735
735
  emits: ["update:modelValue", "change", "focus", "blur", "clear"],
736
736
  setup(e, { emit: $ }) {
737
- const t = e, n = $, m = E(!1), p = E(-1), y = E(), L = E(), C = E(), I = E(), x = E(!1), w = E(), g = E(""), b = O(() => t.options.find((a) => q(a) === t.modelValue) || null), V = O(() => b.value ? Q(b.value) : ""), j = O(() => {
737
+ const t = e, n = $, m = E(!1), y = E(-1), p = E(), L = E(), C = E(), I = E(), x = E(!1), w = E(), g = E(""), k = N(() => t.options.find((a) => j(a) === t.modelValue) || null), V = N(() => k.value ? Z(k.value) : ""), O = N(() => {
738
738
  if (!t.filterable) return t.options;
739
739
  const a = g.value.trim().toLowerCase();
740
740
  return a ? t.options.filter((r) => {
741
- const f = Q(r);
741
+ const f = Z(r);
742
742
  return String(f).toLowerCase().includes(a);
743
743
  }) : t.options;
744
- }), F = O(() => {
744
+ }), P = N(() => {
745
745
  var M;
746
746
  const a = { position: "fixed", zIndex: "4000" }, r = L.value;
747
747
  if (!r) return a;
748
- const f = r.getBoundingClientRect(), k = ((M = C.value) == null ? void 0 : M.getBoundingClientRect().width) || f.width;
749
- return a.left = `${f.left}px`, a.width = `${k}px`, x.value ? (a.bottom = `${window.innerHeight - f.top + 4}px`, a.top = "auto") : a.top = `${f.bottom + 4}px`, a;
748
+ const f = r.getBoundingClientRect(), b = ((M = C.value) == null ? void 0 : M.getBoundingClientRect().width) || f.width;
749
+ return a.left = `${f.left}px`, a.width = `${b}px`, x.value ? (a.bottom = `${window.innerHeight - f.top + 4}px`, a.top = "auto") : a.top = `${f.bottom + 4}px`, a;
750
750
  });
751
- function A() {
752
- !m.value || !L.value || se(() => {
751
+ function R() {
752
+ !m.value || !L.value || ae(() => {
753
753
  const a = L.value;
754
754
  if (!a) return;
755
- const r = a.getBoundingClientRect(), f = window.innerHeight, k = 200, M = r.bottom + k + 4, B = r.top - k - 4, P = M <= f - 20, te = B >= 20;
756
- x.value = !P && te;
755
+ const r = a.getBoundingClientRect(), f = window.innerHeight, b = 200, M = r.bottom + b + 4, U = r.top - b - 4, te = M <= f - 20, A = U >= 20;
756
+ x.value = !te && A;
757
757
  });
758
758
  }
759
- function q(a) {
759
+ function j(a) {
760
760
  return typeof a == "object" && a !== null ? a[t.valueKey] : a;
761
761
  }
762
- function Q(a) {
762
+ function Z(a) {
763
763
  return typeof a == "object" && a !== null ? a[t.labelKey] || String(a[t.valueKey]) : String(a);
764
764
  }
765
- function le(a, r) {
766
- return typeof a == "object" && a !== null && a.id !== void 0 ? a.id : q(a) || r;
765
+ function se(a, r) {
766
+ return typeof a == "object" && a !== null && a.id !== void 0 ? a.id : j(a) || r;
767
767
  }
768
- function J(a) {
769
- return q(a) === t.modelValue;
768
+ function G(a) {
769
+ return j(a) === t.modelValue;
770
770
  }
771
- function W(a) {
771
+ function H(a) {
772
772
  return typeof a == "object" && a !== null ? a[t.disabledKey] === !0 : !1;
773
773
  }
774
- function z() {
775
- t.disabled || (m.value ? Y() : R());
774
+ function B() {
775
+ t.disabled || (m.value ? Y() : W());
776
776
  }
777
- function R() {
778
- t.disabled || (m.value = !0, se(() => {
779
- A(), N(), t.filterable && w.value && (w.value.focus(), g.value = "");
777
+ function W() {
778
+ t.disabled || (m.value = !0, ae(() => {
779
+ R(), F(), t.filterable && w.value && (w.value.focus(), g.value = "");
780
780
  }));
781
781
  }
782
782
  function Y() {
783
- m.value = !1, p.value = -1, x.value = !1, t.filterable && (g.value = "");
783
+ m.value = !1, y.value = -1, x.value = !1, t.filterable && (g.value = "");
784
784
  }
785
785
  function ee(a, r) {
786
- if (W(a)) return;
787
- const f = q(a);
786
+ if (H(a)) return;
787
+ const f = j(a);
788
788
  n("update:modelValue", f), n("change", f, a), Y();
789
789
  }
790
- function X() {
790
+ function J() {
791
791
  if (!t.clearable || t.disabled) return;
792
792
  const a = t.clearTo;
793
793
  n("update:modelValue", a), n("change", a, null), n("clear"), Y();
794
794
  }
795
- function ae(a) {
796
- if (!j.value || j.value.length === 0) {
797
- p.value = -1;
795
+ function fe(a) {
796
+ if (!O.value || O.value.length === 0) {
797
+ y.value = -1;
798
798
  return;
799
799
  }
800
- let r = p.value;
801
- const f = j.value.length;
800
+ let r = y.value;
801
+ const f = O.value.length;
802
802
  r === -1 ? r = a > 0 ? 0 : f - 1 : r = (r + a + f) % f;
803
- let k = 0;
804
- for (; k < f && W(j.value[r]); )
805
- r = (r + a + f) % f, k++;
806
- p.value = k >= f ? -1 : r, Z();
807
- }
808
- function we() {
809
- if (p.value < 0) return;
810
- const a = j.value[p.value];
811
- !a || W(a) || ee(a, p.value);
812
- }
813
- function N() {
814
- if (!y.value) return;
815
- const a = y.value.querySelector(".yselect__option--selected");
803
+ let b = 0;
804
+ for (; b < f && H(O.value[r]); )
805
+ r = (r + a + f) % f, b++;
806
+ y.value = b >= f ? -1 : r, Q();
807
+ }
808
+ function me() {
809
+ if (y.value < 0) return;
810
+ const a = O.value[y.value];
811
+ !a || H(a) || ee(a, y.value);
812
+ }
813
+ function F() {
814
+ if (!p.value) return;
815
+ const a = p.value.querySelector(".yselect__option--selected");
816
816
  a && a.scrollIntoView({ block: "nearest" });
817
817
  }
818
- function Z() {
819
- if (!y.value || p.value < 0) return;
820
- const r = y.value.querySelectorAll(".yselect__option")[p.value];
818
+ function Q() {
819
+ if (!p.value || y.value < 0) return;
820
+ const r = p.value.querySelectorAll(".yselect__option")[y.value];
821
821
  r && r.scrollIntoView({ block: "nearest" });
822
822
  }
823
- function c(a) {
823
+ function d(a) {
824
824
  const r = a.target;
825
825
  (!C.value || !C.value.contains(r)) && Y();
826
826
  }
827
827
  oe(() => t.modelValue, () => {
828
- p.value = -1;
828
+ y.value = -1;
829
829
  });
830
830
  function h() {
831
- m.value && A();
831
+ m.value && R();
832
832
  }
833
- return $e(() => {
834
- document.addEventListener("click", c), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0);
833
+ return De(() => {
834
+ document.addEventListener("click", d), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0);
835
835
  }), Be(() => {
836
- document.removeEventListener("click", c), window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
836
+ document.removeEventListener("click", d), window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
837
837
  }), (a, r) => (i(), u("div", {
838
- class: K(["yselect", { "yselect--disabled": e.disabled, [`yselect--${e.size}`]: !0 }]),
839
- style: ue({ width: e.width }),
838
+ class: z(["yselect", { "yselect--disabled": e.disabled, [`yselect--${e.size}`]: !0 }]),
839
+ style: ie({ width: e.width }),
840
840
  ref_key: "selectContainer",
841
841
  ref: C
842
842
  }, [
843
843
  o("div", {
844
844
  ref_key: "triggerElement",
845
845
  ref: L,
846
- class: K(["yselect__trigger", {
846
+ class: z(["yselect__trigger", {
847
847
  "yselect__trigger--open": m.value,
848
848
  "yselect__trigger--disabled": e.disabled,
849
849
  "yselect__trigger--error": e.error
850
850
  }]),
851
- onMousedown: G(z, ["prevent", "stop"]),
851
+ onMousedown: X(B, ["prevent", "stop"]),
852
852
  onKeydown: [
853
- ke(G(z, ["prevent"]), ["enter"]),
854
- ke(G(z, ["prevent"]), ["space"]),
853
+ ke(X(B, ["prevent"]), ["enter"]),
854
+ ke(X(B, ["prevent"]), ["space"]),
855
855
  ke(Y, ["escape"]),
856
- ke(G(R, ["prevent"]), ["arrow-down"]),
857
- ke(G(R, ["prevent"]), ["arrow-up"])
856
+ ke(X(W, ["prevent"]), ["arrow-down"]),
857
+ ke(X(W, ["prevent"]), ["arrow-up"])
858
858
  ],
859
859
  tabindex: "0",
860
860
  role: "combobox",
@@ -863,24 +863,24 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
863
863
  }, [
864
864
  !e.filterable || !m.value ? (i(), u("span", {
865
865
  key: 0,
866
- class: K(["yselect__value", { yselect__placeholder: !V.value }])
866
+ class: z(["yselect__value", { yselect__placeholder: !V.value }])
867
867
  }, [
868
868
  ce(a.$slots, "value", {
869
- value: b.value,
869
+ value: k.value,
870
870
  label: V.value
871
871
  }, () => {
872
872
  var f;
873
873
  return [
874
- b.value ? (i(), u(re, { key: 0 }, [
875
- (f = b.value) != null && f.flagImg ? (i(), u("img", {
874
+ k.value ? (i(), u(ue, { key: 0 }, [
875
+ (f = k.value) != null && f.flagImg ? (i(), u("img", {
876
876
  key: 0,
877
877
  class: "yselect__flag",
878
- src: b.value.flagImg,
878
+ src: k.value.flagImg,
879
879
  alt: "flag"
880
- }, null, 8, Nt)) : H("", !0),
881
- xe(" " + ne(V.value), 1)
882
- ], 64)) : (i(), u(re, { key: 1 }, [
883
- xe(ne(e.placeholder), 1)
880
+ }, null, 8, Nt)) : K("", !0),
881
+ Ce(" " + le(V.value), 1)
882
+ ], 64)) : (i(), u(ue, { key: 1 }, [
883
+ Ce(le(e.placeholder), 1)
884
884
  ], 64))
885
885
  ];
886
886
  }, !0)
@@ -893,22 +893,22 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
893
893
  placeholder: V.value || e.placeholder,
894
894
  "onUpdate:modelValue": r[0] || (r[0] = (f) => g.value = f),
895
895
  onKeydown: [
896
- r[1] || (r[1] = G(() => {
896
+ r[1] || (r[1] = X(() => {
897
897
  }, ["stop"])),
898
- r[2] || (r[2] = ke(G((f) => ae(1), ["prevent"]), ["arrow-down"])),
899
- r[3] || (r[3] = ke(G((f) => ae(-1), ["prevent"]), ["arrow-up"])),
900
- r[4] || (r[4] = ke(G((f) => we(), ["prevent"]), ["enter"])),
901
- ke(G(Y, ["prevent"]), ["esc"]),
902
- ke(G(X, ["prevent"]), ["delete"])
898
+ r[2] || (r[2] = ke(X((f) => fe(1), ["prevent"]), ["arrow-down"])),
899
+ r[3] || (r[3] = ke(X((f) => fe(-1), ["prevent"]), ["arrow-up"])),
900
+ r[4] || (r[4] = ke(X((f) => me(), ["prevent"]), ["enter"])),
901
+ ke(X(Y, ["prevent"]), ["esc"]),
902
+ ke(X(J, ["prevent"]), ["delete"])
903
903
  ]
904
904
  }, null, 40, Ot)), [
905
905
  [ot, g.value]
906
906
  ]),
907
- e.clearable && !e.disabled && b.value ? (i(), u("span", {
907
+ e.clearable && !e.disabled && k.value ? (i(), u("span", {
908
908
  key: 2,
909
909
  class: "yselect__clear",
910
910
  title: "清空",
911
- onClick: G(X, ["stop"])
911
+ onClick: X(J, ["stop"])
912
912
  }, [...r[8] || (r[8] = [
913
913
  o("svg", {
914
914
  width: "12",
@@ -923,9 +923,9 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
923
923
  "stroke-linecap": "round"
924
924
  })
925
925
  ], -1)
926
- ])])) : H("", !0),
926
+ ])])) : K("", !0),
927
927
  o("span", {
928
- class: K(["yselect__arrow", { "yselect__arrow--open": m.value }])
928
+ class: z(["yselect__arrow", { "yselect__arrow--open": m.value }])
929
929
  }, [...r[9] || (r[9] = [
930
930
  o("svg", {
931
931
  width: "12",
@@ -943,59 +943,59 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
943
943
  ], -1)
944
944
  ])], 2)
945
945
  ], 42, Yt),
946
- de(be, { name: "yselect-dropdown" }, {
947
- default: fe(() => [
948
- (i(), Se(Fe, { to: "body" }, [
946
+ de($e, { name: "yselect-dropdown" }, {
947
+ default: ve(() => [
948
+ (i(), Me(Fe, { to: "body" }, [
949
949
  m.value ? (i(), u("div", {
950
950
  key: 0,
951
951
  ref_key: "dropdownEl",
952
952
  ref: I,
953
- class: K(["yselect__dropdown yselect__dropdown--portal", { "yselect__dropdown--top": x.value }]),
954
- style: ue(F.value),
955
- onMousedown: r[6] || (r[6] = G(() => {
953
+ class: z(["yselect__dropdown yselect__dropdown--portal", { "yselect__dropdown--top": x.value }]),
954
+ style: ie(P.value),
955
+ onMousedown: r[6] || (r[6] = X(() => {
956
956
  }, ["stop"])),
957
- onClick: r[7] || (r[7] = G(() => {
957
+ onClick: r[7] || (r[7] = X(() => {
958
958
  }, ["stop"]))
959
959
  }, [
960
960
  o("div", {
961
961
  class: "yselect__options",
962
962
  ref_key: "optionsContainer",
963
- ref: y
963
+ ref: p
964
964
  }, [
965
- (i(!0), u(re, null, ve(j.value, (f, k) => (i(), u("div", {
966
- key: le(f, k),
967
- class: K(["yselect__option", {
968
- "yselect__option--selected": J(f),
969
- "yselect__option--disabled": W(f),
970
- "yselect__option--hover": p.value === k
965
+ (i(!0), u(ue, null, he(O.value, (f, b) => (i(), u("div", {
966
+ key: se(f, b),
967
+ class: z(["yselect__option", {
968
+ "yselect__option--selected": G(f),
969
+ "yselect__option--disabled": H(f),
970
+ "yselect__option--hover": y.value === b
971
971
  }]),
972
972
  onClick: (M) => ee(f),
973
- onMouseenter: (M) => p.value = k,
974
- onMouseleave: r[5] || (r[5] = (M) => p.value = -1)
973
+ onMouseenter: (M) => y.value = b,
974
+ onMouseleave: r[5] || (r[5] = (M) => y.value = -1)
975
975
  }, [
976
976
  ce(a.$slots, "option", {
977
977
  option: f,
978
- index: k,
979
- selected: J(f)
978
+ index: b,
979
+ selected: G(f)
980
980
  }, () => [
981
981
  f != null && f.flagImg ? (i(), u("img", {
982
982
  key: 0,
983
983
  class: "yselect__flag",
984
984
  src: f.flagImg,
985
985
  alt: "flag"
986
- }, null, 8, qt)) : H("", !0),
987
- xe(" " + ne(Q(f)), 1)
986
+ }, null, 8, qt)) : K("", !0),
987
+ Ce(" " + le(Z(f)), 1)
988
988
  ], !0)
989
989
  ], 42, jt))), 128))
990
990
  ], 512)
991
- ], 38)) : H("", !0)
991
+ ], 38)) : K("", !0)
992
992
  ]))
993
993
  ]),
994
994
  _: 3
995
995
  })
996
996
  ], 6));
997
997
  }
998
- }), tt = /* @__PURE__ */ me(Ut, [["__scopeId", "data-v-6cd47cb7"]]), Zt = { class: "ypagination" }, Qt = { class: "page-actions" }, Jt = { class: "page-size-select" }, Xt = /* @__PURE__ */ ge({
998
+ }), tt = /* @__PURE__ */ be(Ut, [["__scopeId", "data-v-6cd47cb7"]]), Zt = { class: "ypagination" }, Qt = { class: "page-actions" }, Jt = { class: "page-size-select" }, Xt = /* @__PURE__ */ we({
999
999
  __name: "ypagination",
1000
1000
  props: {
1001
1001
  currentPage: {},
@@ -1010,20 +1010,20 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1010
1010
  },
1011
1011
  emits: ["update:currentPage", "update:pageSize", "page-change", "page-size-change"],
1012
1012
  setup(e, { emit: $ }) {
1013
- const t = e, n = $, m = E(t.pageSize), p = O(() => t.pageSizeOptions), y = O({
1013
+ const t = e, n = $, m = E(t.pageSize), y = N(() => t.pageSizeOptions), p = N({
1014
1014
  get: () => t.currentPage,
1015
1015
  set: (x) => {
1016
1016
  n("update:currentPage", x), n("page-change", x);
1017
1017
  }
1018
1018
  });
1019
1019
  function L(x) {
1020
- t.loading || x >= 1 && x !== t.currentPage && (y.value = x);
1020
+ t.loading || x >= 1 && x !== t.currentPage && (p.value = x);
1021
1021
  }
1022
1022
  function C(x) {
1023
- t.loading || (m.value = x, n("update:pageSize", x), n("page-size-change", x), y.value = 1);
1023
+ t.loading || (m.value = x, n("update:pageSize", x), n("page-size-change", x), p.value = 1);
1024
1024
  }
1025
1025
  function I(x) {
1026
- t.loading || (x === "prev" ? L(y.value - 1) : x === "next" && L(y.value + 1));
1026
+ t.loading || (x === "prev" ? L(p.value - 1) : x === "next" && L(p.value + 1));
1027
1027
  }
1028
1028
  return m.value = t.pageSize, oe(
1029
1029
  () => t.pageSize,
@@ -1031,17 +1031,17 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1031
1031
  typeof x == "number" && m.value !== x && (m.value = x);
1032
1032
  }
1033
1033
  ), (x, w) => {
1034
- const g = Ae("YButton"), b = Ae("YSelect");
1034
+ const g = Ve("YButton"), k = Ve("YSelect");
1035
1035
  return i(), u("div", Zt, [
1036
1036
  o("div", Qt, [
1037
1037
  de(g, {
1038
1038
  size: "small",
1039
1039
  variant: "secondary",
1040
- disabled: y.value === 1 || e.loading,
1040
+ disabled: p.value === 1 || e.loading,
1041
1041
  onClick: w[0] || (w[0] = (V) => L(1))
1042
1042
  }, {
1043
- default: fe(() => [...w[2] || (w[2] = [
1044
- xe("首页", -1)
1043
+ default: ve(() => [...w[2] || (w[2] = [
1044
+ Ce("首页", -1)
1045
1045
  ])]),
1046
1046
  _: 1
1047
1047
  }, 8, ["disabled"]),
@@ -1050,16 +1050,16 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1050
1050
  variant: "secondary",
1051
1051
  size: "small",
1052
1052
  groupItems: [
1053
- { label: "上一页", value: "prev", disabled: y.value === 1 || e.loading, icon: "chevron-left", onlyIcon: !0, ariaLabel: "上一页" },
1053
+ { label: "上一页", value: "prev", disabled: p.value === 1 || e.loading, icon: "chevron-left", onlyIcon: !0, ariaLabel: "上一页" },
1054
1054
  { label: "下一页", value: "next", disabled: e.loading, icon: "chevron-right", onlyIcon: !0, ariaLabel: "下一页" }
1055
1055
  ],
1056
1056
  onGroupClick: I
1057
1057
  }, null, 8, ["groupItems"]),
1058
1058
  o("div", Jt, [
1059
- de(b, {
1059
+ de(k, {
1060
1060
  modelValue: m.value,
1061
1061
  "onUpdate:modelValue": w[1] || (w[1] = (V) => m.value = V),
1062
- options: p.value,
1062
+ options: y.value,
1063
1063
  size: "small",
1064
1064
  width: "105px",
1065
1065
  clearable: !1,
@@ -1071,7 +1071,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1071
1071
  ]);
1072
1072
  };
1073
1073
  }
1074
- }), Gt = /* @__PURE__ */ me(Xt, [["__scopeId", "data-v-b8406406"]]), en = ["aria-label"], tn = { class: "y-badge__inner" }, nn = {
1074
+ }), Gt = /* @__PURE__ */ be(Xt, [["__scopeId", "data-v-b8406406"]]), en = ["aria-label"], tn = { class: "y-badge__inner" }, nn = {
1075
1075
  key: 0,
1076
1076
  class: "y-badge__progress",
1077
1077
  "aria-hidden": "true"
@@ -1114,7 +1114,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1114
1114
  class: "icon",
1115
1115
  viewBox: "0 0 20 20",
1116
1116
  fill: "currentColor"
1117
- }, fn = { class: "y-badge__label" }, vn = /* @__PURE__ */ ge({
1117
+ }, fn = { class: "y-badge__label" }, vn = /* @__PURE__ */ we({
1118
1118
  __name: "ybadge",
1119
1119
  props: {
1120
1120
  tone: { default: "default" },
@@ -1126,17 +1126,17 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1126
1126
  label: { default: "" }
1127
1127
  },
1128
1128
  setup(e) {
1129
- const $ = e, t = O(() => $.tone || "default"), n = O(() => {
1130
- const m = ($.label || "").trim(), p = $.tone, y = $.progress;
1131
- if (y) {
1129
+ const $ = e, t = N(() => $.tone || "default"), n = N(() => {
1130
+ const m = ($.label || "").trim(), y = $.tone, p = $.progress;
1131
+ if (p) {
1132
1132
  const L = {
1133
1133
  incomplete: "未完成",
1134
1134
  partiallyComplete: "部分完成",
1135
1135
  complete: "已完成"
1136
1136
  };
1137
- return m ? `${m},进度:${L[y] || y}` : `进度:${L[y] || y}`;
1137
+ return m ? `${m},进度:${L[p] || p}` : `进度:${L[p] || p}`;
1138
1138
  }
1139
- if (p && p !== "default") {
1139
+ if (y && y !== "default") {
1140
1140
  const L = {
1141
1141
  informational: "信息",
1142
1142
  success: "成功",
@@ -1145,12 +1145,12 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1145
1145
  critical: "严重",
1146
1146
  default: "默认"
1147
1147
  };
1148
- return m ? `${m},语气:${L[p] || p}` : `语气:${L[p] || p}`;
1148
+ return m ? `${m},语气:${L[y] || y}` : `语气:${L[y] || y}`;
1149
1149
  }
1150
1150
  return m || "标记";
1151
1151
  });
1152
- return (m, p) => (i(), u("span", {
1153
- class: K(["y-badge", [
1152
+ return (m, y) => (i(), u("span", {
1153
+ class: z(["y-badge", [
1154
1154
  `y-badge--${t.value}`,
1155
1155
  `y-badge--${e.size}`,
1156
1156
  { "is-outline": e.outline, "is-pill": e.pill },
@@ -1161,13 +1161,13 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1161
1161
  }, [
1162
1162
  o("span", tn, [
1163
1163
  e.progress ? (i(), u("span", nn, [
1164
- e.progress === "incomplete" ? (i(), u("svg", ln, [...p[0] || (p[0] = [
1164
+ e.progress === "incomplete" ? (i(), u("svg", ln, [...y[0] || (y[0] = [
1165
1165
  o("circle", {
1166
1166
  cx: "10",
1167
1167
  cy: "10",
1168
1168
  r: "5"
1169
1169
  }, null, -1)
1170
- ])])) : e.progress === "partiallyComplete" ? (i(), u("svg", on, [...p[1] || (p[1] = [
1170
+ ])])) : e.progress === "partiallyComplete" ? (i(), u("svg", on, [...y[1] || (y[1] = [
1171
1171
  o("path", { d: "M10 5a5 5 0 100 10V5z" }, null, -1),
1172
1172
  o("circle", {
1173
1173
  cx: "10",
@@ -1177,55 +1177,55 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1177
1177
  stroke: "currentColor",
1178
1178
  "stroke-width": "2"
1179
1179
  }, null, -1)
1180
- ])])) : e.progress === "complete" ? (i(), u("svg", an, [...p[2] || (p[2] = [
1180
+ ])])) : e.progress === "complete" ? (i(), u("svg", an, [...y[2] || (y[2] = [
1181
1181
  o("path", {
1182
1182
  "fill-rule": "evenodd",
1183
1183
  d: "M16.707 5.293a1 1 0 010 1.414l-7.25 7.25a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L8.75 11.086l6.543-6.543a1 1 0 011.414 0z",
1184
1184
  "clip-rule": "evenodd"
1185
1185
  }, null, -1)
1186
- ])])) : H("", !0)
1186
+ ])])) : K("", !0)
1187
1187
  ])) : e.icon ? (i(), u("span", sn, [
1188
- e.icon === "dot" ? (i(), u("svg", rn, [...p[3] || (p[3] = [
1188
+ e.icon === "dot" ? (i(), u("svg", rn, [...y[3] || (y[3] = [
1189
1189
  o("circle", {
1190
1190
  cx: "10",
1191
1191
  cy: "10",
1192
1192
  r: "4"
1193
1193
  }, null, -1)
1194
- ])])) : e.icon === "check" ? (i(), u("svg", un, [...p[4] || (p[4] = [
1194
+ ])])) : e.icon === "check" ? (i(), u("svg", un, [...y[4] || (y[4] = [
1195
1195
  o("path", {
1196
1196
  "fill-rule": "evenodd",
1197
1197
  d: "M16.707 5.293a1 1 0 010 1.414l-7.25 7.25a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L8.75 11.086l6.543-6.543a1 1 0 011.414 0z",
1198
1198
  "clip-rule": "evenodd"
1199
1199
  }, null, -1)
1200
- ])])) : e.icon === "alert" ? (i(), u("svg", cn, [...p[5] || (p[5] = [
1200
+ ])])) : e.icon === "alert" ? (i(), u("svg", cn, [...y[5] || (y[5] = [
1201
1201
  o("path", {
1202
1202
  "fill-rule": "evenodd",
1203
1203
  d: "M8.257 3.099c.765-1.36 2.721-1.36 3.486 0l6.518 11.59c.75 1.334-.214 3.011-1.743 3.011H3.482c-1.53 0-2.493-1.677-1.743-3.01L8.257 3.1zM11 14a1 1 0 10-2 0 1 1 0 002 0zm-1-2a1 1 0 01-1-1V8a1 1 0 112 0v3a1 1 0 01-1 1z",
1204
1204
  "clip-rule": "evenodd"
1205
1205
  }, null, -1)
1206
- ])])) : (i(), u("svg", dn, [...p[6] || (p[6] = [
1206
+ ])])) : (i(), u("svg", dn, [...y[6] || (y[6] = [
1207
1207
  o("circle", {
1208
1208
  cx: "10",
1209
1209
  cy: "10",
1210
1210
  r: "4"
1211
1211
  }, null, -1)
1212
1212
  ])]))
1213
- ])) : H("", !0),
1213
+ ])) : K("", !0),
1214
1214
  o("span", fn, [
1215
1215
  ce(m.$slots, "default", {}, () => [
1216
- xe(ne(e.label), 1)
1216
+ Ce(le(e.label), 1)
1217
1217
  ], !0)
1218
1218
  ])
1219
1219
  ])
1220
1220
  ], 10, en));
1221
1221
  }
1222
- }), hn = /* @__PURE__ */ me(vn, [["__scopeId", "data-v-ce819797"]]), pn = ["aria-hidden"], yn = ["onKeydown"], gn = {
1222
+ }), hn = /* @__PURE__ */ be(vn, [["__scopeId", "data-v-ce819797"]]), pn = ["aria-hidden"], yn = ["onKeydown"], gn = {
1223
1223
  key: 0,
1224
1224
  class: "y-dialog-header"
1225
- }, mn = { class: "y-dialog-title" }, wn = { class: "y-dialog-body" }, kn = {
1225
+ }, mn = { class: "y-dialog-title" }, wn = { class: "y-dialog-body" }, bn = {
1226
1226
  key: 1,
1227
1227
  class: "y-dialog-footer"
1228
- }, bn = /* @__PURE__ */ ge({
1228
+ }, kn = /* @__PURE__ */ we({
1229
1229
  __name: "ydialog",
1230
1230
  props: {
1231
1231
  modelValue: { type: Boolean, default: !1 },
@@ -1240,10 +1240,10 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1240
1240
  },
1241
1241
  emits: ["update:modelValue", "open", "close"],
1242
1242
  setup(e, { emit: $ }) {
1243
- const t = e, n = $, m = O({
1243
+ const t = e, n = $, m = N({
1244
1244
  get: () => t.modelValue,
1245
1245
  set: (w) => n("update:modelValue", w)
1246
- }), p = E(null), y = O(() => {
1246
+ }), y = E(null), p = N(() => {
1247
1247
  const w = {};
1248
1248
  return w.width = typeof t.width == "number" ? `${t.width}px` : String(t.width), w.margin = "0 auto", w.top = t.top, w;
1249
1249
  });
@@ -1262,37 +1262,37 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1262
1262
  return oe(() => t.modelValue, (w) => {
1263
1263
  w ? (n("open"), requestAnimationFrame(() => {
1264
1264
  var g;
1265
- return (g = p.value) == null ? void 0 : g.focus();
1265
+ return (g = y.value) == null ? void 0 : g.focus();
1266
1266
  }), document.addEventListener("keydown", x), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", x), document.body.style.overflow = "");
1267
- }), $e(() => {
1267
+ }), De(() => {
1268
1268
  t.modelValue && (document.addEventListener("keydown", x), document.body.style.overflow = "hidden");
1269
1269
  }), Be(() => {
1270
1270
  document.removeEventListener("keydown", x), document.body.style.overflow = "";
1271
- }), (w, g) => (i(), Se(Fe, { to: "body" }, [
1271
+ }), (w, g) => (i(), Me(Fe, { to: "body" }, [
1272
1272
  Ee(o("div", {
1273
1273
  class: "y-dialog-root",
1274
1274
  role: "dialog",
1275
1275
  "aria-modal": !0,
1276
1276
  "aria-hidden": !m.value,
1277
- style: ue({ zIndex: String(e.zIndex) })
1277
+ style: ie({ zIndex: String(e.zIndex) })
1278
1278
  }, [
1279
1279
  o("div", {
1280
1280
  class: "y-dialog-mask",
1281
1281
  onClick: L
1282
1282
  }),
1283
- de(be, { name: "dialog-zoom-fade" }, {
1284
- default: fe(() => [
1283
+ de($e, { name: "dialog-zoom-fade" }, {
1284
+ default: ve(() => [
1285
1285
  Ee(o("div", {
1286
1286
  ref_key: "panelRef",
1287
- ref: p,
1288
- class: K(["y-dialog-panel", [e.center ? "is-center" : ""]]),
1289
- style: ue(y.value),
1290
- onKeydown: ke(G(I, ["prevent", "stop"]), ["esc"]),
1287
+ ref: y,
1288
+ class: z(["y-dialog-panel", [e.center ? "is-center" : ""]]),
1289
+ style: ie(p.value),
1290
+ onKeydown: ke(X(I, ["prevent", "stop"]), ["esc"]),
1291
1291
  tabindex: "-1"
1292
1292
  }, [
1293
1293
  e.showHeader ? (i(), u("div", gn, [
1294
1294
  ce(w.$slots, "header", {}, () => [
1295
- o("div", mn, ne(e.title), 1)
1295
+ o("div", mn, le(e.title), 1)
1296
1296
  ], !0),
1297
1297
  e.closable ? (i(), u("button", {
1298
1298
  key: 0,
@@ -1300,26 +1300,26 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1300
1300
  class: "y-dialog-close",
1301
1301
  "aria-label": "Close",
1302
1302
  onClick: C
1303
- }, " ✕ ")) : H("", !0)
1304
- ])) : H("", !0),
1303
+ }, " ✕ ")) : K("", !0)
1304
+ ])) : K("", !0),
1305
1305
  o("div", wn, [
1306
1306
  ce(w.$slots, "default", {}, void 0, !0)
1307
1307
  ]),
1308
- w.$slots.footer ? (i(), u("div", kn, [
1308
+ w.$slots.footer ? (i(), u("div", bn, [
1309
1309
  ce(w.$slots, "footer", {}, void 0, !0)
1310
- ])) : H("", !0)
1310
+ ])) : K("", !0)
1311
1311
  ], 46, yn), [
1312
- [ze, m.value]
1312
+ [Ke, m.value]
1313
1313
  ])
1314
1314
  ]),
1315
1315
  _: 3
1316
1316
  })
1317
1317
  ], 12, pn), [
1318
- [ze, m.value]
1318
+ [Ke, m.value]
1319
1319
  ])
1320
1320
  ]));
1321
1321
  }
1322
- }), xn = /* @__PURE__ */ me(bn, [["__scopeId", "data-v-a7acc6dc"]]), $n = { class: "ypopover__inner" }, Cn = /* @__PURE__ */ ge({
1322
+ }), xn = /* @__PURE__ */ be(kn, [["__scopeId", "data-v-a7acc6dc"]]), $n = { class: "ypopover__inner" }, Cn = /* @__PURE__ */ we({
1323
1323
  __name: "ypopover",
1324
1324
  props: {
1325
1325
  trigger: { default: "click" },
@@ -1339,223 +1339,223 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1339
1339
  },
1340
1340
  emits: ["update:modelValue", "show", "hide", "before-show", "before-hide"],
1341
1341
  setup(e, { expose: $, emit: t }) {
1342
- const n = e, m = t, p = E(), y = E(), L = E(), C = E(!1), I = E(), x = E(), w = E({});
1343
- let g = null, b = null;
1344
- const V = O(() => {
1342
+ const n = e, m = t, y = E(), p = E(), L = E(), C = E(!1), I = E(), x = E(), w = E({});
1343
+ let g = null, k = null;
1344
+ const V = N(() => {
1345
1345
  if (!C.value || !I.value) return {};
1346
- const N = {};
1347
- n.width !== "auto" && (N.width = typeof n.width == "number" ? `${n.width}px` : n.width), n.maxWidth && (N.maxWidth = typeof n.maxWidth == "number" ? `${n.maxWidth}px` : n.maxWidth);
1348
- const { top: Z, left: c } = F();
1349
- return N.top = `${Z}px`, N.left = `${c}px`, N;
1350
- }), j = O(() => {
1346
+ const F = {};
1347
+ n.width !== "auto" && (F.width = typeof n.width == "number" ? `${n.width}px` : n.width), n.maxWidth && (F.maxWidth = typeof n.maxWidth == "number" ? `${n.maxWidth}px` : n.maxWidth);
1348
+ const { top: Q, left: d } = P();
1349
+ return F.top = `${Q}px`, F.left = `${d}px`, F;
1350
+ }), O = N(() => {
1351
1351
  if (!n.showArrow) return {};
1352
1352
  if (Object.keys(w.value).length > 0)
1353
1353
  return w.value;
1354
- const N = {};
1355
- return n.placement.startsWith("top") || n.placement.startsWith("bottom") ? N.left = "50%" : N.top = "50%", N;
1354
+ const F = {};
1355
+ return n.placement.startsWith("top") || n.placement.startsWith("bottom") ? F.left = "50%" : F.top = "50%", F;
1356
1356
  });
1357
- function F() {
1358
- var P, te;
1357
+ function P() {
1358
+ var te, A;
1359
1359
  if (!I.value) return { top: 0, left: 0 };
1360
- const { width: N, height: Z, top: c, left: h } = I.value, a = ((P = L.value) == null ? void 0 : P.offsetWidth) || 200, r = ((te = L.value) == null ? void 0 : te.offsetHeight) || 100;
1361
- let f = 0, k = 0;
1360
+ const { width: F, height: Q, top: d, left: h } = I.value, a = ((te = L.value) == null ? void 0 : te.offsetWidth) || 200, r = ((A = L.value) == null ? void 0 : A.offsetHeight) || 100;
1361
+ let f = 0, b = 0;
1362
1362
  switch (n.placement) {
1363
1363
  case "top":
1364
- f = c - r - n.offset, k = h + (N - a) / 2;
1364
+ f = d - r - n.offset, b = h + (F - a) / 2;
1365
1365
  break;
1366
1366
  case "top-start":
1367
- f = c - r - n.offset, k = h;
1367
+ f = d - r - n.offset, b = h;
1368
1368
  break;
1369
1369
  case "top-end":
1370
- f = c - r - n.offset, k = h + N - a;
1370
+ f = d - r - n.offset, b = h + F - a;
1371
1371
  break;
1372
1372
  case "bottom":
1373
- f = c + Z + n.offset, k = h + (N - a) / 2;
1373
+ f = d + Q + n.offset, b = h + (F - a) / 2;
1374
1374
  break;
1375
1375
  case "bottom-start":
1376
- f = c + Z + n.offset, k = h;
1376
+ f = d + Q + n.offset, b = h;
1377
1377
  break;
1378
1378
  case "bottom-end":
1379
- f = c + Z + n.offset, k = h + N - a;
1379
+ f = d + Q + n.offset, b = h + F - a;
1380
1380
  break;
1381
1381
  case "left":
1382
- f = c + (Z - r) / 2, k = h - a - n.offset;
1382
+ f = d + (Q - r) / 2, b = h - a - n.offset;
1383
1383
  break;
1384
1384
  case "left-start":
1385
- f = c, k = h - a - n.offset;
1385
+ f = d, b = h - a - n.offset;
1386
1386
  break;
1387
1387
  case "left-end":
1388
- f = c + Z - r, k = h - a - n.offset;
1388
+ f = d + Q - r, b = h - a - n.offset;
1389
1389
  break;
1390
1390
  case "right":
1391
- f = c + (Z - r) / 2, k = h + N + n.offset;
1391
+ f = d + (Q - r) / 2, b = h + F + n.offset;
1392
1392
  break;
1393
1393
  case "right-start":
1394
- f = c, k = h + N + n.offset;
1394
+ f = d, b = h + F + n.offset;
1395
1395
  break;
1396
1396
  case "right-end":
1397
- f = c + Z - r, k = h + N + n.offset;
1397
+ f = d + Q - r, b = h + F + n.offset;
1398
1398
  break;
1399
1399
  }
1400
- const M = window.innerWidth, B = window.innerHeight;
1401
- return k < 8 && (k = 8), k + a > M - 8 && (k = M - a - 8), f < 8 && (f = 8), f + r > B - 8 && (f = B - r - 8), { top: f, left: k };
1400
+ const M = window.innerWidth, U = window.innerHeight;
1401
+ return b < 8 && (b = 8), b + a > M - 8 && (b = M - a - 8), f < 8 && (f = 8), f + r > U - 8 && (f = U - r - 8), { top: f, left: b };
1402
1402
  }
1403
- function A() {
1404
- n.disabled || C.value || (J(), n.openDelay > 0 ? g = setTimeout(() => {
1405
- q();
1406
- }, n.openDelay) : q());
1407
- }
1408
- function q() {
1409
- m("before-show"), C.value = !0, m("update:modelValue", !0), m("show"), se(() => {
1410
- se(() => {
1411
- z();
1403
+ function R() {
1404
+ n.disabled || C.value || (G(), n.openDelay > 0 ? g = setTimeout(() => {
1405
+ j();
1406
+ }, n.openDelay) : j());
1407
+ }
1408
+ function j() {
1409
+ m("before-show"), C.value = !0, m("update:modelValue", !0), m("show"), ae(() => {
1410
+ ae(() => {
1411
+ B();
1412
1412
  });
1413
1413
  });
1414
1414
  }
1415
- function Q() {
1416
- C.value && (J(), n.closeDelay > 0 ? b = setTimeout(() => {
1417
- le();
1418
- }, n.closeDelay) : le());
1415
+ function Z() {
1416
+ C.value && (G(), n.closeDelay > 0 ? k = setTimeout(() => {
1417
+ se();
1418
+ }, n.closeDelay) : se());
1419
1419
  }
1420
- function le() {
1420
+ function se() {
1421
1421
  m("before-hide"), C.value = !1, m("update:modelValue", !1), m("hide");
1422
1422
  }
1423
- function J() {
1424
- g && (clearTimeout(g), g = null), b && (clearTimeout(b), b = null);
1423
+ function G() {
1424
+ g && (clearTimeout(g), g = null), k && (clearTimeout(k), k = null);
1425
1425
  }
1426
- function W() {
1426
+ function H() {
1427
1427
  if (!n.showArrow || !I.value || !L.value) {
1428
1428
  w.value = {};
1429
1429
  return;
1430
1430
  }
1431
- const N = I.value, Z = L.value.getBoundingClientRect();
1432
- if (Z.width === 0 || Z.height === 0) {
1431
+ const F = I.value, Q = L.value.getBoundingClientRect();
1432
+ if (Q.width === 0 || Q.height === 0) {
1433
1433
  const h = {};
1434
1434
  n.placement.startsWith("top") || n.placement.startsWith("bottom") ? h.left = "50%" : h.top = "50%", w.value = h;
1435
1435
  return;
1436
1436
  }
1437
- const c = {};
1437
+ const d = {};
1438
1438
  if (n.placement.startsWith("top")) {
1439
- c.bottom = "-6px";
1440
- const h = N.left + N.width / 2, a = Z.left, r = h - a;
1441
- c.left = `${Math.max(12, Math.min(r, Z.width - 12))}px`;
1439
+ d.bottom = "-6px";
1440
+ const h = F.left + F.width / 2, a = Q.left, r = h - a;
1441
+ d.left = `${Math.max(12, Math.min(r, Q.width - 12))}px`;
1442
1442
  } else if (n.placement.startsWith("bottom")) {
1443
- c.top = "-6px";
1444
- const h = N.left + N.width / 2, a = Z.left, r = h - a;
1445
- c.left = `${Math.max(12, Math.min(r, Z.width - 12))}px`;
1443
+ d.top = "-6px";
1444
+ const h = F.left + F.width / 2, a = Q.left, r = h - a;
1445
+ d.left = `${Math.max(12, Math.min(r, Q.width - 12))}px`;
1446
1446
  } else if (n.placement.startsWith("left")) {
1447
- c.right = "-6px";
1448
- const h = N.top + N.height / 2, a = Z.top, r = h - a;
1449
- c.top = `${Math.max(12, Math.min(r, Z.height - 12))}px`;
1447
+ d.right = "-6px";
1448
+ const h = F.top + F.height / 2, a = Q.top, r = h - a;
1449
+ d.top = `${Math.max(12, Math.min(r, Q.height - 12))}px`;
1450
1450
  } else if (n.placement.startsWith("right")) {
1451
- c.left = "-6px";
1452
- const h = N.top + N.height / 2, a = Z.top, r = h - a;
1453
- c.top = `${Math.max(12, Math.min(r, Z.height - 12))}px`;
1451
+ d.left = "-6px";
1452
+ const h = F.top + F.height / 2, a = Q.top, r = h - a;
1453
+ d.top = `${Math.max(12, Math.min(r, Q.height - 12))}px`;
1454
1454
  }
1455
- w.value = c;
1455
+ w.value = d;
1456
1456
  }
1457
- function z() {
1458
- y.value && (I.value = y.value.getBoundingClientRect(), L.value && (x.value = L.value.getBoundingClientRect(), W(), C.value && requestAnimationFrame(() => {
1459
- L.value && (x.value = L.value.getBoundingClientRect(), W());
1457
+ function B() {
1458
+ p.value && (I.value = p.value.getBoundingClientRect(), L.value && (x.value = L.value.getBoundingClientRect(), H(), C.value && requestAnimationFrame(() => {
1459
+ L.value && (x.value = L.value.getBoundingClientRect(), H());
1460
1460
  })));
1461
1461
  }
1462
- function R() {
1463
- n.disabled || n.trigger === "click" && (C.value ? Q() : A());
1462
+ function W() {
1463
+ n.disabled || n.trigger === "click" && (C.value ? Z() : R());
1464
1464
  }
1465
1465
  function Y() {
1466
- n.disabled || n.trigger !== "hover" || (J(), A());
1466
+ n.disabled || n.trigger !== "hover" || (G(), R());
1467
1467
  }
1468
1468
  function ee() {
1469
- n.disabled || n.trigger !== "hover" || Q();
1469
+ n.disabled || n.trigger !== "hover" || Z();
1470
1470
  }
1471
- function X() {
1472
- n.disabled || n.trigger !== "hover" || J();
1471
+ function J() {
1472
+ n.disabled || n.trigger !== "hover" || G();
1473
1473
  }
1474
- function ae() {
1475
- n.disabled || n.trigger !== "hover" || Q();
1474
+ function fe() {
1475
+ n.disabled || n.trigger !== "hover" || Z();
1476
1476
  }
1477
- function we(N) {
1477
+ function me(F) {
1478
1478
  if (!n.closeOnClickOutside || !C.value) return;
1479
- const Z = N.target;
1480
- p.value && !p.value.contains(Z) && L.value && !L.value.contains(Z) && Q();
1481
- }
1482
- return oe(() => n.modelValue, (N) => {
1483
- N !== C.value && (N ? A() : Q());
1484
- }), oe(C, (N) => {
1485
- N ? (document.addEventListener("click", we), window.addEventListener("resize", z), window.addEventListener("scroll", z, !0), se(() => {
1486
- z(), requestAnimationFrame(() => {
1487
- z();
1479
+ const Q = F.target;
1480
+ y.value && !y.value.contains(Q) && L.value && !L.value.contains(Q) && Z();
1481
+ }
1482
+ return oe(() => n.modelValue, (F) => {
1483
+ F !== C.value && (F ? R() : Z());
1484
+ }), oe(C, (F) => {
1485
+ F ? (document.addEventListener("click", me), window.addEventListener("resize", B), window.addEventListener("scroll", B, !0), ae(() => {
1486
+ B(), requestAnimationFrame(() => {
1487
+ B();
1488
1488
  }), setTimeout(() => {
1489
- z();
1489
+ B();
1490
1490
  }, 0);
1491
- })) : (document.removeEventListener("click", we), window.removeEventListener("resize", z), window.removeEventListener("scroll", z, !0));
1492
- }), $e(() => {
1493
- n.modelValue && A();
1491
+ })) : (document.removeEventListener("click", me), window.removeEventListener("resize", B), window.removeEventListener("scroll", B, !0));
1492
+ }), De(() => {
1493
+ n.modelValue && R();
1494
1494
  }), Be(() => {
1495
- J(), document.removeEventListener("click", we), window.removeEventListener("resize", z), window.removeEventListener("scroll", z, !0);
1495
+ G(), document.removeEventListener("click", me), window.removeEventListener("resize", B), window.removeEventListener("scroll", B, !0);
1496
1496
  }), $({
1497
- show: A,
1498
- hide: Q,
1499
- updatePosition: z
1500
- }), (N, Z) => (i(), u("div", {
1497
+ show: R,
1498
+ hide: Z,
1499
+ updatePosition: B
1500
+ }), (F, Q) => (i(), u("div", {
1501
1501
  class: "ypopover",
1502
1502
  ref_key: "popoverRef",
1503
- ref: p
1503
+ ref: y
1504
1504
  }, [
1505
1505
  o("div", {
1506
1506
  ref_key: "triggerRef",
1507
- ref: y,
1508
- onClick: R,
1507
+ ref: p,
1508
+ onClick: W,
1509
1509
  onMouseenter: Y,
1510
1510
  onMouseleave: ee
1511
1511
  }, [
1512
- ce(N.$slots, "reference", {}, void 0, !0)
1512
+ ce(F.$slots, "reference", {}, void 0, !0)
1513
1513
  ], 544),
1514
- (i(), Se(Fe, { to: "body" }, [
1515
- de(be, { name: "ypopover-fade" }, {
1516
- default: fe(() => [
1514
+ (i(), Me(Fe, { to: "body" }, [
1515
+ de($e, { name: "ypopover-fade" }, {
1516
+ default: ve(() => [
1517
1517
  C.value ? (i(), u("div", {
1518
1518
  key: 0,
1519
1519
  ref_key: "contentRef",
1520
1520
  ref: L,
1521
- class: K(["ypopover__content", [
1521
+ class: z(["ypopover__content", [
1522
1522
  `ypopover__content--${e.placement}`,
1523
1523
  {
1524
1524
  "ypopover__content--dark": e.dark,
1525
1525
  "ypopover__content--no-padding": !e.showPadding
1526
1526
  }
1527
1527
  ]]),
1528
- style: ue(V.value),
1529
- onClick: Z[0] || (Z[0] = G(() => {
1528
+ style: ie(V.value),
1529
+ onClick: Q[0] || (Q[0] = X(() => {
1530
1530
  }, ["stop"])),
1531
- onMouseenter: X,
1532
- onMouseleave: ae
1531
+ onMouseenter: J,
1532
+ onMouseleave: fe
1533
1533
  }, [
1534
1534
  e.showArrow ? (i(), u("div", {
1535
1535
  key: 0,
1536
- class: K(["ypopover__arrow", `ypopover__arrow--${e.placement}`]),
1537
- style: ue(j.value)
1538
- }, null, 6)) : H("", !0),
1536
+ class: z(["ypopover__arrow", `ypopover__arrow--${e.placement}`]),
1537
+ style: ie(O.value)
1538
+ }, null, 6)) : K("", !0),
1539
1539
  o("div", $n, [
1540
- ce(N.$slots, "default", {}, void 0, !0)
1540
+ ce(F.$slots, "default", {}, void 0, !0)
1541
1541
  ])
1542
- ], 38)) : H("", !0)
1542
+ ], 38)) : K("", !0)
1543
1543
  ]),
1544
1544
  _: 3
1545
1545
  })
1546
1546
  ]))
1547
1547
  ], 512));
1548
1548
  }
1549
- }), Dn = /* @__PURE__ */ me(Cn, [["__scopeId", "data-v-be755399"]]), _n = { class: "relative" }, Sn = ["value", "placeholder"], Ln = { class: "nh-time-suffix" }, Mn = { class: "nh-time-shortcuts" }, In = { class: "nh-time-shortcuts-list" }, En = ["onClick", "onKeydown", "onMouseenter"], Bn = { class: "nh-time-custom" }, Tn = { class: "nh-time-custom-header" }, Kn = { class: "nh-time-selection-status" }, zn = {
1549
+ }), Dn = /* @__PURE__ */ be(Cn, [["__scopeId", "data-v-be755399"]]), _n = { class: "relative" }, Sn = ["value", "placeholder"], Ln = { class: "nh-time-suffix" }, Mn = { class: "nh-time-shortcuts" }, In = { class: "nh-time-shortcuts-list" }, En = ["onClick", "onKeydown", "onMouseenter"], Bn = { class: "nh-time-custom" }, Tn = { class: "nh-time-custom-header" }, zn = { class: "nh-time-selection-status" }, Kn = {
1550
1550
  key: 0,
1551
1551
  class: "status-text"
1552
1552
  }, Hn = {
1553
1553
  key: 1,
1554
1554
  class: "status-text"
1555
- }, Rn = {
1555
+ }, An = {
1556
1556
  key: 2,
1557
1557
  class: "status-text status-complete"
1558
- }, Vn = { class: "nh-time-pickers" }, Wn = { class: "nh-time-picker" }, An = { class: "nh-date-picker" }, Fn = { class: "nh-date-picker-header" }, Pn = { class: "nh-date-picker-header-label" }, Yn = { class: "nh-date-picker-content" }, Nn = { class: "nh-date-table" }, On = ["onClick"], jn = { class: "nh-date-table-cell" }, qn = { key: 0 }, Un = { class: "nh-time-picker" }, Zn = { class: "nh-date-picker" }, Qn = { class: "nh-date-picker-header" }, Jn = { class: "nh-date-picker-header-label" }, Xn = { class: "nh-date-picker-content" }, Gn = { class: "nh-date-table" }, el = ["onClick"], tl = { class: "nh-date-table-cell" }, nl = { key: 0 }, ll = { class: "nh-time-actions" }, ol = /* @__PURE__ */ ge({
1558
+ }, Rn = { class: "nh-time-pickers" }, Wn = { class: "nh-time-picker" }, Vn = { class: "nh-date-picker" }, Fn = { class: "nh-date-picker-header" }, Pn = { class: "nh-date-picker-header-label" }, Yn = { class: "nh-date-picker-content" }, Nn = { class: "nh-date-table" }, On = ["onClick"], jn = { class: "nh-date-table-cell" }, qn = { key: 0 }, Un = { class: "nh-time-picker" }, Zn = { class: "nh-date-picker" }, Qn = { class: "nh-date-picker-header" }, Jn = { class: "nh-date-picker-header-label" }, Xn = { class: "nh-date-picker-content" }, Gn = { class: "nh-date-table" }, el = ["onClick"], tl = { class: "nh-date-table-cell" }, nl = { key: 0 }, ll = { class: "nh-time-actions" }, ol = /* @__PURE__ */ we({
1559
1559
  __name: "ytime",
1560
1560
  props: {
1561
1561
  modelValue: { default: () => ({ startDate: null, endDate: null }) },
@@ -1606,7 +1606,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1606
1606
  },
1607
1607
  emits: ["update:modelValue", "change"],
1608
1608
  setup(e, { emit: $ }) {
1609
- const t = e, n = $, m = E(!1), p = E(-1), y = E(-1), L = E(null), C = E(), I = E(), x = E({
1609
+ const t = e, n = $, m = E(!1), y = E(-1), p = E(-1), L = E(null), C = E(), I = E(), x = E({
1610
1610
  top: !0,
1611
1611
  left: !0
1612
1612
  }), w = E({
@@ -1615,7 +1615,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1615
1615
  }), g = E({
1616
1616
  year: (/* @__PURE__ */ new Date()).getFullYear(),
1617
1617
  month: (/* @__PURE__ */ new Date()).getMonth() + 1
1618
- }), b = () => {
1618
+ }), k = () => {
1619
1619
  const s = new Date(w.value.year, w.value.month).getTime(), v = new Date(g.value.year, g.value.month).getTime();
1620
1620
  if (s >= v) {
1621
1621
  const l = new Date(w.value.year, w.value.month + 1);
@@ -1627,7 +1627,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1627
1627
  const l = new Date(g.value.year, g.value.month - 1);
1628
1628
  w.value.year = l.getFullYear(), w.value.month = l.getMonth();
1629
1629
  }
1630
- }, j = ["一", "二", "三", "四", "五", "六", "日"], F = E(null), A = E(null), q = (s) => {
1630
+ }, O = ["一", "二", "三", "四", "五", "六", "日"], P = E(null), R = E(null), j = (s) => {
1631
1631
  if (!s) return null;
1632
1632
  if (s instanceof Date) return s;
1633
1633
  if (typeof s == "number")
@@ -1637,30 +1637,30 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1637
1637
  return isNaN(v.getTime()) ? null : v;
1638
1638
  }
1639
1639
  return null;
1640
- }, Q = (s) => {
1640
+ }, Z = (s) => {
1641
1641
  if (!s) return null;
1642
- const v = s.getFullYear(), l = String(s.getMonth() + 1).padStart(2, "0"), d = String(s.getDate()).padStart(2, "0");
1642
+ const v = s.getFullYear(), l = String(s.getMonth() + 1).padStart(2, "0"), c = String(s.getDate()).padStart(2, "0");
1643
1643
  if (t.includeTime) {
1644
1644
  const D = String(s.getHours()).padStart(2, "0"), S = String(s.getMinutes()).padStart(2, "0"), _ = String(s.getSeconds()).padStart(2, "0");
1645
- return `${v}-${l}-${d} ${D}:${S}:${_}`;
1645
+ return `${v}-${l}-${c} ${D}:${S}:${_}`;
1646
1646
  } else
1647
- return `${v}-${l}-${d}`;
1648
- }, le = (s) => s ? s.getTime() : null, J = (s) => s ? {
1649
- startDate: q(s.startDate),
1650
- endDate: q(s.endDate)
1651
- } : { startDate: null, endDate: null }, W = (s) => t.format === "string" ? {
1652
- startDate: Q(s.startDate),
1653
- endDate: Q(s.endDate)
1647
+ return `${v}-${l}-${c}`;
1648
+ }, se = (s) => s ? s.getTime() : null, G = (s) => s ? {
1649
+ startDate: j(s.startDate),
1650
+ endDate: j(s.endDate)
1651
+ } : { startDate: null, endDate: null }, H = (s) => t.format === "string" ? {
1652
+ startDate: Z(s.startDate),
1653
+ endDate: Z(s.endDate)
1654
1654
  } : t.format === "timestamp" ? {
1655
- startDate: le(s.startDate),
1656
- endDate: le(s.endDate)
1657
- } : s, z = (s, v) => `${String(v + 1).padStart(2, "0")}/${s}`, R = (s, v) => s.getFullYear() === v.getFullYear() && s.getMonth() === v.getMonth() && s.getDate() === v.getDate(), Y = (s, v, l) => !v || !l ? !1 : s >= v && s <= l, ee = (s) => {
1658
- const v = J(s);
1655
+ startDate: se(s.startDate),
1656
+ endDate: se(s.endDate)
1657
+ } : s, B = (s, v) => `${String(v + 1).padStart(2, "0")}/${s}`, W = (s, v) => s.getFullYear() === v.getFullYear() && s.getMonth() === v.getMonth() && s.getDate() === v.getDate(), Y = (s, v, l) => !v || !l ? !1 : s >= v && s <= l, ee = (s) => {
1658
+ const v = G(s);
1659
1659
  if (!(v != null && v.startDate) || !(v != null && v.endDate))
1660
1660
  return -1;
1661
1661
  for (let l = 0; l < t.shortcuts.length; l++) {
1662
- const d = t.shortcuts[l].getValue();
1663
- if (d.startDate && d.endDate && v.startDate && v.endDate) {
1662
+ const c = t.shortcuts[l].getValue();
1663
+ if (c.startDate && c.endDate && v.startDate && v.endDate) {
1664
1664
  const D = new Date(
1665
1665
  v.startDate.getFullYear(),
1666
1666
  v.startDate.getMonth(),
@@ -1670,169 +1670,169 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1670
1670
  v.endDate.getMonth(),
1671
1671
  v.endDate.getDate()
1672
1672
  ), _ = new Date(
1673
- d.startDate.getFullYear(),
1674
- d.startDate.getMonth(),
1675
- d.startDate.getDate()
1673
+ c.startDate.getFullYear(),
1674
+ c.startDate.getMonth(),
1675
+ c.startDate.getDate()
1676
1676
  ), T = new Date(
1677
- d.endDate.getFullYear(),
1678
- d.endDate.getMonth(),
1679
- d.endDate.getDate()
1677
+ c.endDate.getFullYear(),
1678
+ c.endDate.getMonth(),
1679
+ c.endDate.getDate()
1680
1680
  );
1681
1681
  if (D.getTime() === _.getTime() && S.getTime() === T.getTime())
1682
1682
  return l;
1683
1683
  }
1684
1684
  }
1685
1685
  return -1;
1686
- }, X = (s, v) => {
1687
- const l = new Date(s, v, 1), d = new Date(s, v + 1, 0), D = l.getDay(), S = d.getDate(), _ = [], T = /* @__PURE__ */ new Date(), U = D === 0 ? 6 : D - 1, he = new Date(s, v, 0);
1688
- for (let ie = U - 1; ie >= 0; ie--) {
1689
- const De = new Date(s, v - 1, he.getDate() - ie);
1686
+ }, J = (s, v) => {
1687
+ const l = new Date(s, v, 1), c = new Date(s, v + 1, 0), D = l.getDay(), S = c.getDate(), _ = [], T = /* @__PURE__ */ new Date(), q = D === 0 ? 6 : D - 1, pe = new Date(s, v, 0);
1688
+ for (let re = q - 1; re >= 0; re--) {
1689
+ const _e = new Date(s, v - 1, pe.getDate() - re);
1690
1690
  _.push({
1691
- date: De,
1692
- day: De.getDate(),
1691
+ date: _e,
1692
+ day: _e.getDate(),
1693
1693
  isCurrentMonth: !1,
1694
- isToday: R(De, T),
1694
+ isToday: W(_e, T),
1695
1695
  isSelected: !1,
1696
1696
  isInRange: !1,
1697
1697
  isDisabled: !0
1698
1698
  // 禁用非当前月的日期
1699
1699
  });
1700
1700
  }
1701
- for (let ie = 1; ie <= S; ie++) {
1702
- const De = new Date(s, v, ie);
1701
+ for (let re = 1; re <= S; re++) {
1702
+ const _e = new Date(s, v, re);
1703
1703
  _.push({
1704
- date: De,
1705
- day: ie,
1704
+ date: _e,
1705
+ day: re,
1706
1706
  isCurrentMonth: !0,
1707
- isToday: R(De, T),
1707
+ isToday: W(_e, T),
1708
1708
  isSelected: !1,
1709
1709
  isInRange: !1,
1710
1710
  isDisabled: !1
1711
1711
  });
1712
1712
  }
1713
- const pe = 42 - _.length;
1714
- for (let ie = 1; ie <= pe; ie++) {
1715
- const De = new Date(s, v + 1, ie);
1713
+ const ge = 42 - _.length;
1714
+ for (let re = 1; re <= ge; re++) {
1715
+ const _e = new Date(s, v + 1, re);
1716
1716
  _.push({
1717
- date: De,
1718
- day: ie,
1717
+ date: _e,
1718
+ day: re,
1719
1719
  isCurrentMonth: !1,
1720
- isToday: R(De, T),
1720
+ isToday: W(_e, T),
1721
1721
  isSelected: !1,
1722
1722
  isInRange: !1,
1723
1723
  isDisabled: !0
1724
1724
  // 禁用非当前月的日期
1725
1725
  });
1726
1726
  }
1727
- const Ke = [];
1728
- for (let ie = 0; ie < _.length; ie += 7)
1729
- Ke.push(_.slice(ie, ie + 7));
1730
- return Ke;
1731
- }, ae = (s) => {
1732
- const v = W(s);
1727
+ const ze = [];
1728
+ for (let re = 0; re < _.length; re += 7)
1729
+ ze.push(_.slice(re, re + 7));
1730
+ return ze;
1731
+ }, fe = (s) => {
1732
+ const v = H(s);
1733
1733
  n("update:modelValue", v), n("change", v);
1734
- }, we = () => {
1734
+ }, me = () => {
1735
1735
  if (!C.value || !I.value) return;
1736
1736
  const s = C.value.getBoundingClientRect(), v = I.value.getBoundingClientRect(), l = window.innerWidth, D = window.innerHeight - s.bottom, S = s.top, _ = v.height || 400;
1737
1737
  D < _ && S > _ ? x.value.top = !1 : x.value.top = !0;
1738
- const T = l - s.left, U = v.width || 640;
1739
- T < U ? x.value.left = !1 : x.value.left = !0;
1740
- }, N = () => {
1738
+ const T = l - s.left, q = v.width || 640;
1739
+ T < q ? x.value.left = !1 : x.value.left = !0;
1740
+ }, F = () => {
1741
1741
  if (m.value = !m.value, m.value) {
1742
- const s = J(t.modelValue);
1743
- if (F.value = (s == null ? void 0 : s.startDate) || null, A.value = (s == null ? void 0 : s.endDate) || null, y.value = ee(t.modelValue), p.value = -1, s != null && s.startDate && (w.value.year = s.startDate.getFullYear(), w.value.month = s.startDate.getMonth()), s != null && s.endDate)
1742
+ const s = G(t.modelValue);
1743
+ if (P.value = (s == null ? void 0 : s.startDate) || null, R.value = (s == null ? void 0 : s.endDate) || null, p.value = ee(t.modelValue), y.value = -1, s != null && s.startDate && (w.value.year = s.startDate.getFullYear(), w.value.month = s.startDate.getMonth()), s != null && s.endDate)
1744
1744
  g.value.year = s.endDate.getFullYear(), g.value.month = s.endDate.getMonth();
1745
1745
  else {
1746
1746
  const v = new Date(w.value.year, w.value.month + 1);
1747
1747
  g.value.year = v.getFullYear(), g.value.month = v.getMonth();
1748
1748
  }
1749
- b(), se(() => {
1750
- we();
1749
+ k(), ae(() => {
1750
+ me();
1751
1751
  });
1752
1752
  }
1753
- }, Z = (s) => {
1754
- const v = s.target, l = C.value, d = I.value;
1755
- l && d && !l.contains(v) && !d.contains(v) && (m.value = !1, p.value = -1);
1756
- }, c = (s) => {
1757
- s.key === "Enter" || s.key === " " ? (s.preventDefault(), N()) : s.key === "ArrowDown" && (s.preventDefault(), m.value = !0, se(() => {
1758
- we(), k();
1753
+ }, Q = (s) => {
1754
+ const v = s.target, l = C.value, c = I.value;
1755
+ l && c && !l.contains(v) && !c.contains(v) && (m.value = !1, y.value = -1);
1756
+ }, d = (s) => {
1757
+ s.key === "Enter" || s.key === " " ? (s.preventDefault(), F()) : s.key === "ArrowDown" && (s.preventDefault(), m.value = !0, ae(() => {
1758
+ me(), b();
1759
1759
  }));
1760
1760
  }, h = (s) => {
1761
1761
  var v;
1762
- s.key === "Escape" && (m.value = !1, p.value = -1, (v = C.value) == null || v.focus());
1762
+ s.key === "Escape" && (m.value = !1, y.value = -1, (v = C.value) == null || v.focus());
1763
1763
  }, a = (s, v) => {
1764
- s.key === "ArrowDown" ? (s.preventDefault(), p.value = Math.min(v + 1, t.shortcuts.length - 1), M(p.value)) : s.key === "ArrowUp" ? (s.preventDefault(), p.value = Math.max(v - 1, 0), M(p.value)) : (s.key === "Enter" || s.key === " ") && (s.preventDefault(), B(t.shortcuts[v]));
1764
+ s.key === "ArrowDown" ? (s.preventDefault(), y.value = Math.min(v + 1, t.shortcuts.length - 1), M(y.value)) : s.key === "ArrowUp" ? (s.preventDefault(), y.value = Math.max(v - 1, 0), M(y.value)) : (s.key === "Enter" || s.key === " ") && (s.preventDefault(), U(t.shortcuts[v]));
1765
1765
  }, r = (s) => {
1766
- p.value = s;
1766
+ y.value = s;
1767
1767
  }, f = () => {
1768
- p.value = -1;
1769
- }, k = () => {
1770
- p.value = 0, M(0);
1768
+ y.value = -1;
1769
+ }, b = () => {
1770
+ y.value = 0, M(0);
1771
1771
  }, M = (s) => {
1772
1772
  if (I.value) {
1773
1773
  const l = I.value.querySelectorAll(".nh-time-shortcut")[s];
1774
1774
  l && l.focus();
1775
1775
  }
1776
- }, B = (s) => {
1776
+ }, U = (s) => {
1777
1777
  const v = s.getValue();
1778
- t.includeTime && v.startDate && v.endDate && (v.startDate.setHours(0, 0, 0, 0), v.endDate.setHours(23, 59, 59, 999)), ae(v), y.value = t.shortcuts.findIndex((l) => l.label === s.label), p.value = -1, m.value = !1;
1779
- }, P = (s, v) => {
1778
+ t.includeTime && v.startDate && v.endDate && (v.startDate.setHours(0, 0, 0, 0), v.endDate.setHours(23, 59, 59, 999)), fe(v), p.value = t.shortcuts.findIndex((l) => l.label === s.label), y.value = -1, m.value = !1;
1779
+ }, te = (s, v) => {
1780
1780
  if (!s || s.isDisabled) return;
1781
1781
  let l;
1782
- if (t.includeTime ? (l = new Date(s.date), v === "start" || !F.value ? l.setHours(0, 0, 0, 0) : l.setHours(23, 59, 59, 999)) : l = new Date(s.date.getFullYear(), s.date.getMonth(), s.date.getDate()), !F.value && !A.value)
1783
- F.value = l, A.value = null;
1784
- else if (F.value && !A.value)
1785
- if (l >= F.value)
1786
- t.includeTime && l.setHours(23, 59, 59, 999), A.value = l;
1782
+ if (t.includeTime ? (l = new Date(s.date), v === "start" || !P.value ? l.setHours(0, 0, 0, 0) : l.setHours(23, 59, 59, 999)) : l = new Date(s.date.getFullYear(), s.date.getMonth(), s.date.getDate()), !P.value && !R.value)
1783
+ P.value = l, R.value = null;
1784
+ else if (P.value && !R.value)
1785
+ if (l >= P.value)
1786
+ t.includeTime && l.setHours(23, 59, 59, 999), R.value = l;
1787
1787
  else {
1788
- const d = F.value;
1789
- t.includeTime && d.setHours(23, 59, 59, 999), A.value = d, F.value = l;
1788
+ const c = P.value;
1789
+ t.includeTime && c.setHours(23, 59, 59, 999), R.value = c, P.value = l;
1790
1790
  }
1791
1791
  else
1792
- F.value = l, A.value = null;
1793
- if (y.value = -1, F.value && A.value) {
1794
- const d = new Date(A.value);
1795
- t.includeTime && d.setHours(23, 59, 59, 999), L.value = {
1796
- startDate: F.value,
1797
- endDate: d
1792
+ P.value = l, R.value = null;
1793
+ if (p.value = -1, P.value && R.value) {
1794
+ const c = new Date(R.value);
1795
+ t.includeTime && c.setHours(23, 59, 59, 999), L.value = {
1796
+ startDate: P.value,
1797
+ endDate: c
1798
1798
  };
1799
1799
  } else
1800
1800
  L.value = null;
1801
- }, te = (s, v) => {
1801
+ }, A = (s, v) => {
1802
1802
  if (!s) return ["nh-date-table-td"];
1803
1803
  const l = ["nh-date-table-td"];
1804
- return s.isCurrentMonth || l.push("is-prev-month"), s.isToday && l.push("is-today"), s.isDisabled && l.push("is-disabled"), F.value && R(s.date, F.value) && l.push("is-selected", "is-start"), A.value && R(s.date, A.value) && l.push("is-selected", "is-end"), F.value && A.value && Y(s.date, F.value, A.value) && l.push("is-in-range"), l;
1804
+ return s.isCurrentMonth || l.push("is-prev-month"), s.isToday && l.push("is-today"), s.isDisabled && l.push("is-disabled"), P.value && W(s.date, P.value) && l.push("is-selected", "is-start"), R.value && W(s.date, R.value) && l.push("is-selected", "is-end"), P.value && R.value && Y(s.date, P.value, R.value) && l.push("is-in-range"), l;
1805
+ }, ne = () => {
1806
+ L.value && (t.includeTime && L.value.endDate && L.value.endDate.setHours(23, 59, 59, 999), fe(L.value), p.value = ee(L.value), m.value = !1);
1807
+ }, Se = () => {
1808
+ fe({ startDate: null, endDate: null }), We(), y.value = -1, m.value = !1;
1805
1809
  }, ye = () => {
1806
- L.value && (t.includeTime && L.value.endDate && L.value.endDate.setHours(23, 59, 59, 999), ae(L.value), y.value = ee(L.value), m.value = !1);
1807
- }, Le = () => {
1808
- ae({ startDate: null, endDate: null }), We(), p.value = -1, m.value = !1;
1809
- }, Ce = () => {
1810
- m.value && se(() => {
1811
- we();
1810
+ m.value && ae(() => {
1811
+ me();
1812
1812
  });
1813
- }, Me = O(() => X(w.value.year, w.value.month)), Ie = O(() => X(g.value.year, g.value.month)), Pe = O(() => {
1814
- const s = J(t.modelValue);
1813
+ }, xe = N(() => J(w.value.year, w.value.month)), Ie = N(() => J(g.value.year, g.value.month)), Pe = N(() => {
1814
+ const s = G(t.modelValue);
1815
1815
  if (!s || !s.startDate || !s.endDate)
1816
1816
  return "";
1817
1817
  const v = (D) => {
1818
1818
  const S = String(D.getFullYear()), _ = String(D.getMonth() + 1).padStart(2, "0"), T = String(D.getDate()).padStart(2, "0");
1819
1819
  return `${S}/${_}/${T}`;
1820
- }, l = v(s.startDate), d = v(s.endDate);
1821
- return !t.includeTime && l === d ? l : `${l} - ${d}`;
1822
- }), Re = O(() => [
1820
+ }, l = v(s.startDate), c = v(s.endDate);
1821
+ return !t.includeTime && l === c ? l : `${l} - ${c}`;
1822
+ }), Ae = N(() => [
1823
1823
  "nh-time-dropdown",
1824
1824
  {
1825
1825
  "nh-time-dropdown-top": !x.value.top,
1826
1826
  "nh-time-dropdown-right": !x.value.left
1827
1827
  }
1828
- ]), Ve = O(() => {
1829
- const s = J(t.modelValue);
1828
+ ]), Re = N(() => {
1829
+ const s = G(t.modelValue);
1830
1830
  return !!(s != null && s.startDate && (s != null && s.endDate));
1831
- }), Ye = O(() => !!(F.value && A.value)), We = () => {
1832
- F.value = null, A.value = null, L.value = null, y.value = -1;
1831
+ }), Ye = N(() => !!(P.value && R.value)), We = () => {
1832
+ P.value = null, R.value = null, L.value = null, p.value = -1;
1833
1833
  };
1834
1834
  oe(() => t.modelValue, (s) => {
1835
- const v = J(s);
1835
+ const v = G(s);
1836
1836
  if (v != null && v.startDate) {
1837
1837
  const l = v.startDate;
1838
1838
  w.value.year = l.getFullYear(), w.value.month = l.getMonth();
@@ -1844,49 +1844,49 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1844
1844
  const l = new Date(w.value.year, w.value.month + 1);
1845
1845
  g.value.year = l.getFullYear(), g.value.month = l.getMonth();
1846
1846
  }
1847
- (v != null && v.startDate || v != null && v.endDate) && b(), m.value || (y.value = ee(s));
1847
+ (v != null && v.startDate || v != null && v.endDate) && k(), m.value || (p.value = ee(s));
1848
1848
  }, { immediate: !0, deep: !0 }), oe([w, g], () => {
1849
1849
  const s = new Date(w.value.year, w.value.month).getTime(), v = new Date(g.value.year, g.value.month).getTime();
1850
1850
  if (s === v) {
1851
1851
  const l = new Date(w.value.year, w.value.month + 1);
1852
1852
  g.value.year = l.getFullYear(), g.value.month = l.getMonth();
1853
1853
  }
1854
- }, { deep: !0 }), $e(() => {
1855
- document.addEventListener("click", Z), window.addEventListener("resize", Ce), window.addEventListener("scroll", Ce), y.value = ee(t.modelValue);
1856
- const s = J(t.modelValue);
1854
+ }, { deep: !0 }), De(() => {
1855
+ document.addEventListener("click", Q), window.addEventListener("resize", ye), window.addEventListener("scroll", ye), p.value = ee(t.modelValue);
1856
+ const s = G(t.modelValue);
1857
1857
  if (s != null && s.startDate && (w.value.year = s.startDate.getFullYear(), w.value.month = s.startDate.getMonth()), s != null && s.endDate)
1858
1858
  g.value.year = s.endDate.getFullYear(), g.value.month = s.endDate.getMonth();
1859
1859
  else {
1860
1860
  const v = new Date(w.value.year, w.value.month + 1);
1861
1861
  g.value.year = v.getFullYear(), g.value.month = v.getMonth();
1862
1862
  }
1863
- b();
1863
+ k();
1864
1864
  }), Be(() => {
1865
- document.removeEventListener("click", Z), window.removeEventListener("resize", Ce), window.removeEventListener("scroll", Ce);
1865
+ document.removeEventListener("click", Q), window.removeEventListener("resize", ye), window.removeEventListener("scroll", ye);
1866
1866
  });
1867
1867
  const He = () => {
1868
- t.clearable && (ae({ startDate: null, endDate: null }), We(), p.value = -1);
1868
+ t.clearable && (fe({ startDate: null, endDate: null }), We(), y.value = -1);
1869
1869
  }, Te = (s, v) => {
1870
1870
  if (s === "start") {
1871
1871
  const l = new Date(w.value.year, w.value.month + v, 1);
1872
- w.value.year = l.getFullYear(), w.value.month = l.getMonth(), b();
1872
+ w.value.year = l.getFullYear(), w.value.month = l.getMonth(), k();
1873
1873
  } else {
1874
1874
  const l = new Date(g.value.year, g.value.month + v, 1);
1875
1875
  g.value.year = l.getFullYear(), g.value.month = l.getMonth(), V();
1876
1876
  }
1877
1877
  };
1878
1878
  return (s, v) => {
1879
- const l = Ae("YButton");
1879
+ const l = Ve("YButton");
1880
1880
  return i(), u("div", {
1881
- class: K(["nh-time-search", [`nh-time--${e.size}`]])
1881
+ class: z(["nh-time-search", [`nh-time--${e.size}`]])
1882
1882
  }, [
1883
1883
  o("div", _n, [
1884
1884
  o("div", {
1885
1885
  ref_key: "trigger",
1886
1886
  ref: C,
1887
- onClick: N,
1888
- onKeydown: c,
1889
- class: K(["nh-time-trigger", { "is-focus": m.value, "has-value": Ve.value }]),
1887
+ onClick: F,
1888
+ onKeydown: d,
1889
+ class: z(["nh-time-trigger", { "is-focus": m.value, "has-value": Re.value }]),
1890
1890
  tabindex: "0"
1891
1891
  }, [
1892
1892
  o("input", {
@@ -1896,9 +1896,9 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1896
1896
  class: "nh-time-input"
1897
1897
  }, null, 8, Sn),
1898
1898
  o("span", Ln, [
1899
- e.clearable && Ve.value ? (i(), u("i", {
1899
+ e.clearable && Re.value ? (i(), u("i", {
1900
1900
  key: 0,
1901
- onClick: G(He, ["stop"]),
1901
+ onClick: X(He, ["stop"]),
1902
1902
  class: "nh-time-clear"
1903
1903
  }, [...v[4] || (v[4] = [
1904
1904
  o("svg", {
@@ -1911,7 +1911,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1911
1911
  fill: "currentColor"
1912
1912
  })
1913
1913
  ], -1)
1914
- ])])) : H("", !0),
1914
+ ])])) : K("", !0),
1915
1915
  v[6] || (v[6] = o("i", { class: "nh-time-icon" }, [
1916
1916
  o("svg", {
1917
1917
  viewBox: "0 0 1024 1024",
@@ -1925,7 +1925,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1925
1925
  ])
1926
1926
  ], -1)),
1927
1927
  o("i", {
1928
- class: K(["nh-time-arrow", { "is-reverse": m.value }])
1928
+ class: z(["nh-time-arrow", { "is-reverse": m.value }])
1929
1929
  }, [...v[5] || (v[5] = [
1930
1930
  o("svg", {
1931
1931
  viewBox: "0 0 1024 1024",
@@ -1940,48 +1940,48 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1940
1940
  ])], 2)
1941
1941
  ])
1942
1942
  ], 34),
1943
- de(be, { name: "el-zoom-in-top" }, {
1944
- default: fe(() => [
1943
+ de($e, { name: "el-zoom-in-top" }, {
1944
+ default: ve(() => [
1945
1945
  m.value ? (i(), u("div", {
1946
1946
  key: 0,
1947
1947
  ref_key: "dropdown",
1948
1948
  ref: I,
1949
- class: K(Re.value),
1949
+ class: z(Ae.value),
1950
1950
  onKeydown: h
1951
1951
  }, [
1952
1952
  o("div", Mn, [
1953
1953
  v[7] || (v[7] = o("div", { class: "nh-time-shortcuts-title" }, "快捷选项", -1)),
1954
1954
  o("ul", In, [
1955
- (i(!0), u(re, null, ve(e.shortcuts, (d, D) => (i(), u("li", {
1956
- key: d.label,
1957
- onClick: (S) => B(d),
1955
+ (i(!0), u(ue, null, he(e.shortcuts, (c, D) => (i(), u("li", {
1956
+ key: c.label,
1957
+ onClick: (S) => U(c),
1958
1958
  onKeydown: (S) => a(S, D),
1959
1959
  onMouseenter: (S) => r(D),
1960
1960
  onMouseleave: f,
1961
- class: K([
1961
+ class: z([
1962
1962
  "nh-time-shortcut",
1963
1963
  {
1964
- "is-active": p.value === D,
1965
- "is-selected": y.value === D
1964
+ "is-active": y.value === D,
1965
+ "is-selected": p.value === D
1966
1966
  }
1967
1967
  ]),
1968
1968
  tabindex: "0"
1969
- }, ne(d.label), 43, En))), 128))
1969
+ }, le(c.label), 43, En))), 128))
1970
1970
  ])
1971
1971
  ]),
1972
1972
  o("div", Bn, [
1973
1973
  o("div", Tn, [
1974
1974
  v[8] || (v[8] = o("span", null, "自定义时间", -1)),
1975
- o("div", Kn, [
1976
- !F.value && !A.value ? (i(), u("span", zn, " 请选择开始日期 ")) : F.value && !A.value ? (i(), u("span", Hn, " 请选择结束日期 ")) : F.value && A.value ? (i(), u("span", Rn, " 已选择完整范围 ")) : H("", !0)
1975
+ o("div", zn, [
1976
+ !P.value && !R.value ? (i(), u("span", Kn, " 请选择开始日期 ")) : P.value && !R.value ? (i(), u("span", Hn, " 请选择结束日期 ")) : P.value && R.value ? (i(), u("span", An, " 已选择完整范围 ")) : K("", !0)
1977
1977
  ])
1978
1978
  ]),
1979
- o("div", Vn, [
1979
+ o("div", Rn, [
1980
1980
  o("div", Wn, [
1981
- o("div", An, [
1981
+ o("div", Vn, [
1982
1982
  o("div", Fn, [
1983
1983
  o("button", {
1984
- onClick: v[0] || (v[0] = (d) => Te("start", -1)),
1984
+ onClick: v[0] || (v[0] = (c) => Te("start", -1)),
1985
1985
  class: "nh-date-picker-btn nh-date-picker-prev-btn",
1986
1986
  type: "button"
1987
1987
  }, [...v[9] || (v[9] = [
@@ -1996,9 +1996,9 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
1996
1996
  })
1997
1997
  ], -1)
1998
1998
  ])]),
1999
- o("span", Pn, ne(z(w.value.year, w.value.month)), 1),
1999
+ o("span", Pn, le(B(w.value.year, w.value.month)), 1),
2000
2000
  o("button", {
2001
- onClick: v[1] || (v[1] = (d) => Te("start", 1)),
2001
+ onClick: v[1] || (v[1] = (c) => Te("start", 1)),
2002
2002
  class: "nh-date-picker-btn nh-date-picker-next-btn",
2003
2003
  type: "button"
2004
2004
  }, [...v[10] || (v[10] = [
@@ -2018,23 +2018,23 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2018
2018
  o("table", Nn, [
2019
2019
  o("thead", null, [
2020
2020
  o("tr", null, [
2021
- (i(), u(re, null, ve(j, (d) => o("th", {
2022
- key: d,
2021
+ (i(), u(ue, null, he(O, (c) => o("th", {
2022
+ key: c,
2023
2023
  class: "nh-date-table-th"
2024
- }, ne(d), 1)), 64))
2024
+ }, le(c), 1)), 64))
2025
2025
  ])
2026
2026
  ]),
2027
2027
  o("tbody", null, [
2028
- (i(!0), u(re, null, ve(Me.value, (d, D) => (i(), u("tr", {
2028
+ (i(!0), u(ue, null, he(xe.value, (c, D) => (i(), u("tr", {
2029
2029
  key: `start-week-${D}`
2030
2030
  }, [
2031
- (i(!0), u(re, null, ve(d, (S, _) => (i(), u("td", {
2031
+ (i(!0), u(ue, null, he(c, (S, _) => (i(), u("td", {
2032
2032
  key: `start-day-${D}-${_}`,
2033
- class: K(te(S)),
2034
- onClick: (T) => P(S, "start")
2033
+ class: z(A(S)),
2034
+ onClick: (T) => te(S, "start")
2035
2035
  }, [
2036
2036
  o("div", jn, [
2037
- S ? (i(), u("span", qn, ne(S.day), 1)) : H("", !0)
2037
+ S ? (i(), u("span", qn, le(S.day), 1)) : K("", !0)
2038
2038
  ])
2039
2039
  ], 10, On))), 128))
2040
2040
  ]))), 128))
@@ -2047,7 +2047,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2047
2047
  o("div", Zn, [
2048
2048
  o("div", Qn, [
2049
2049
  o("button", {
2050
- onClick: v[2] || (v[2] = (d) => Te("end", -1)),
2050
+ onClick: v[2] || (v[2] = (c) => Te("end", -1)),
2051
2051
  class: "nh-date-picker-btn nh-date-picker-prev-btn",
2052
2052
  type: "button"
2053
2053
  }, [...v[11] || (v[11] = [
@@ -2062,9 +2062,9 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2062
2062
  })
2063
2063
  ], -1)
2064
2064
  ])]),
2065
- o("span", Jn, ne(z(g.value.year, g.value.month)), 1),
2065
+ o("span", Jn, le(B(g.value.year, g.value.month)), 1),
2066
2066
  o("button", {
2067
- onClick: v[3] || (v[3] = (d) => Te("end", 1)),
2067
+ onClick: v[3] || (v[3] = (c) => Te("end", 1)),
2068
2068
  class: "nh-date-picker-btn nh-date-picker-next-btn",
2069
2069
  type: "button"
2070
2070
  }, [...v[12] || (v[12] = [
@@ -2084,23 +2084,23 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2084
2084
  o("table", Gn, [
2085
2085
  o("thead", null, [
2086
2086
  o("tr", null, [
2087
- (i(), u(re, null, ve(j, (d) => o("th", {
2088
- key: d,
2087
+ (i(), u(ue, null, he(O, (c) => o("th", {
2088
+ key: c,
2089
2089
  class: "nh-date-table-th"
2090
- }, ne(d), 1)), 64))
2090
+ }, le(c), 1)), 64))
2091
2091
  ])
2092
2092
  ]),
2093
2093
  o("tbody", null, [
2094
- (i(!0), u(re, null, ve(Ie.value, (d, D) => (i(), u("tr", {
2094
+ (i(!0), u(ue, null, he(Ie.value, (c, D) => (i(), u("tr", {
2095
2095
  key: `end-week-${D}`
2096
2096
  }, [
2097
- (i(!0), u(re, null, ve(d, (S, _) => (i(), u("td", {
2097
+ (i(!0), u(ue, null, he(c, (S, _) => (i(), u("td", {
2098
2098
  key: `end-day-${D}-${_}`,
2099
- class: K(te(S)),
2100
- onClick: (T) => P(S, "end")
2099
+ class: z(A(S)),
2100
+ onClick: (T) => te(S, "end")
2101
2101
  }, [
2102
2102
  o("div", tl, [
2103
- S ? (i(), u("span", nl, ne(S.day), 1)) : H("", !0)
2103
+ S ? (i(), u("span", nl, le(S.day), 1)) : K("", !0)
2104
2104
  ])
2105
2105
  ], 10, el))), 128))
2106
2106
  ]))), 128))
@@ -2111,31 +2111,31 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2111
2111
  ])
2112
2112
  ]),
2113
2113
  o("div", ll, [
2114
- e.clearable ? (i(), Se(l, {
2114
+ e.clearable ? (i(), Me(l, {
2115
2115
  key: 0,
2116
- onClick: Le,
2116
+ onClick: Se,
2117
2117
  variant: "secondary",
2118
2118
  size: e.size
2119
2119
  }, {
2120
- default: fe(() => [...v[13] || (v[13] = [
2121
- xe(" 清空 ", -1)
2120
+ default: ve(() => [...v[13] || (v[13] = [
2121
+ Ce(" 清空 ", -1)
2122
2122
  ])]),
2123
2123
  _: 1
2124
- }, 8, ["size"])) : H("", !0),
2124
+ }, 8, ["size"])) : K("", !0),
2125
2125
  de(l, {
2126
- onClick: ye,
2126
+ onClick: ne,
2127
2127
  disabled: !Ye.value,
2128
2128
  variant: "primary",
2129
2129
  size: e.size
2130
2130
  }, {
2131
- default: fe(() => [
2132
- xe(ne(F.value && !A.value ? "继续选择结束日期" : "确认"), 1)
2131
+ default: ve(() => [
2132
+ Ce(le(P.value && !R.value ? "继续选择结束日期" : "确认"), 1)
2133
2133
  ]),
2134
2134
  _: 1
2135
2135
  }, 8, ["disabled", "size"])
2136
2136
  ])
2137
2137
  ])
2138
- ], 34)) : H("", !0)
2138
+ ], 34)) : K("", !0)
2139
2139
  ]),
2140
2140
  _: 1
2141
2141
  })
@@ -2143,11 +2143,11 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2143
2143
  ], 2);
2144
2144
  };
2145
2145
  }
2146
- }), nt = /* @__PURE__ */ me(ol, [["__scopeId", "data-v-e5ef63b1"]]), al = ["aria-checked", "aria-disabled", "disabled", "onKeydown"], sl = { class: "yswitch__thumb" }, il = {
2146
+ }), nt = /* @__PURE__ */ be(ol, [["__scopeId", "data-v-e5ef63b1"]]), al = ["aria-checked", "aria-disabled", "disabled", "onKeydown"], sl = { class: "yswitch__thumb" }, il = {
2147
2147
  key: 0,
2148
2148
  class: "yswitch__spinner",
2149
2149
  "aria-hidden": "true"
2150
- }, rl = /* @__PURE__ */ ge({
2150
+ }, rl = /* @__PURE__ */ we({
2151
2151
  __name: "yswitch",
2152
2152
  props: {
2153
2153
  modelValue: { default: !1 },
@@ -2164,47 +2164,47 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2164
2164
  },
2165
2165
  emits: ["update:modelValue", "change", "focus", "blur"],
2166
2166
  setup(e, { emit: $ }) {
2167
- const t = e, n = $, m = E(), p = O(() => t.modelValue === t.trueValue), y = O(() => {
2167
+ const t = e, n = $, m = E(), y = N(() => t.modelValue === t.trueValue), p = N(() => {
2168
2168
  const C = {};
2169
- return C.background = p.value ? t.activeColor : t.inactiveColor, C;
2169
+ return C.background = y.value ? t.activeColor : t.inactiveColor, C;
2170
2170
  });
2171
2171
  function L() {
2172
2172
  if (t.disabled || t.loading) return;
2173
- const C = p.value ? t.falseValue : t.trueValue;
2173
+ const C = y.value ? t.falseValue : t.trueValue;
2174
2174
  n("update:modelValue", C), n("change", C);
2175
2175
  }
2176
- return $e(() => {
2176
+ return De(() => {
2177
2177
  const C = m.value;
2178
2178
  C && (C.addEventListener("focus", (I) => n("focus", I)), C.addEventListener("blur", (I) => n("blur", I)));
2179
2179
  }), (C, I) => (i(), u("button", {
2180
2180
  ref_key: "rootEl",
2181
2181
  ref: m,
2182
- class: K(["yswitch", [
2182
+ class: z(["yswitch", [
2183
2183
  `yswitch--${e.size}`,
2184
- { "yswitch--checked": p.value, "yswitch--disabled": e.disabled, "yswitch--loading": e.loading }
2184
+ { "yswitch--checked": y.value, "yswitch--disabled": e.disabled, "yswitch--loading": e.loading }
2185
2185
  ]]),
2186
- style: ue(y.value),
2186
+ style: ie(p.value),
2187
2187
  role: "switch",
2188
- "aria-checked": p.value,
2188
+ "aria-checked": y.value,
2189
2189
  "aria-disabled": e.disabled,
2190
2190
  disabled: e.disabled || e.loading,
2191
2191
  onClick: L,
2192
2192
  onKeydown: [
2193
- ke(G(L, ["prevent"]), ["enter"]),
2194
- ke(G(L, ["prevent"]), ["space"])
2193
+ ke(X(L, ["prevent"]), ["enter"]),
2194
+ ke(X(L, ["prevent"]), ["space"])
2195
2195
  ]
2196
2196
  }, [
2197
2197
  I[0] || (I[0] = o("span", { class: "yswitch__track" }, null, -1)),
2198
2198
  o("span", sl, [
2199
- e.loading ? (i(), u("span", il)) : H("", !0)
2199
+ e.loading ? (i(), u("span", il)) : K("", !0)
2200
2200
  ]),
2201
2201
  e.showText ? (i(), u("span", {
2202
2202
  key: 0,
2203
- class: K(["yswitch__label", { "yswitch__label--left": !p.value, "yswitch__label--right": p.value }])
2204
- }, ne(p.value ? e.activeText : e.inactiveText), 3)) : H("", !0)
2203
+ class: z(["yswitch__label", { "yswitch__label--left": !y.value, "yswitch__label--right": y.value }])
2204
+ }, le(y.value ? e.activeText : e.inactiveText), 3)) : K("", !0)
2205
2205
  ], 46, al));
2206
2206
  }
2207
- }), ul = /* @__PURE__ */ me(rl, [["__scopeId", "data-v-0b157fc4"]]), cl = ["src", "alt"], dl = ["src", "alt"], fl = /* @__PURE__ */ ge({
2207
+ }), ul = /* @__PURE__ */ be(rl, [["__scopeId", "data-v-0b157fc4"]]), cl = ["src", "alt"], dl = ["src", "alt"], fl = /* @__PURE__ */ we({
2208
2208
  __name: "yimage",
2209
2209
  props: {
2210
2210
  src: {},
@@ -2216,14 +2216,15 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2216
2216
  fit: { default: "cover" },
2217
2217
  radius: { default: "0" },
2218
2218
  className: { default: "" },
2219
- previewSrcList: {}
2219
+ previewSrcList: {},
2220
+ autoAspect: { type: Boolean, default: !1 }
2220
2221
  },
2221
2222
  emits: ["load", "error", "preview"],
2222
2223
  setup(e, { expose: $, emit: t }) {
2223
- const n = e, m = t, p = E(), y = E(), L = E(), C = E(!1), I = E(!1), x = E(!1), w = E(!1), g = E(!1), b = E("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPCEtLSDog4zmma8gLS0+CiAgPHJlY3Qgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIGZpbGw9IiNGM0Y0RjYiLz4KICAKICA8IS0tIOWbvueJh+WbvuaghyAtLT4KICA8cmVjdCB4PSI1MCIgeT0iNDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iODAiIHJ4PSI0IiBmaWxsPSIjRDFENURCIiBzdHJva2U9IiM5Q0EzQUYiIHN0cm9rZS13aWR0aD0iMiIvPgogIAogIDwhLS0g5Zu+54mH5YaF6YOo6KOF6aWwIC0tPgogIDxjaXJjbGUgY3g9IjgwIiBjeT0iNzAiIHI9IjgiIGZpbGw9IiM5Q0EzQUYiLz4KICA8cGF0aCBkPSJNNjAgMTAwIEw5MCA4NSBMMTIwIDk1IEwxNDAgODAiIHN0cm9rZT0iIzlDQTNBRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAKICA8IS0tIOaWh+WtlyAtLT4KICA8dGV4dCB4PSIxMDAiIHk9IjE2MCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzZCNzI4MCIgZm9udC1mYW1pbHk9IkFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIj4KICAgIEltYWdlIG5vdCBhdmFpbGFibGUKICA8L3RleHQ+Cjwvc3ZnPiA="), V = E(""), j = E(1), F = E(!1), A = E({
2224
+ const n = e, m = t, y = E(), p = E(), L = E(), C = E(!1), I = E(!1), x = E(!1), w = E(!1), g = E(!1), k = E("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPCEtLSDog4zmma8gLS0+CiAgPHJlY3Qgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIGZpbGw9IiNGM0Y0RjYiLz4KICAKICA8IS0tIOWbvueJh+WbvuaghyAtLT4KICA8cmVjdCB4PSI1MCIgeT0iNDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iODAiIHJ4PSI0IiBmaWxsPSIjRDFENURCIiBzdHJva2U9IiM5Q0EzQUYiIHN0cm9rZS13aWR0aD0iMiIvPgogIAogIDwhLS0g5Zu+54mH5YaF6YOo6KOF6aWwIC0tPgogIDxjaXJjbGUgY3g9IjgwIiBjeT0iNzAiIHI9IjgiIGZpbGw9IiM5Q0EzQUYiLz4KICA8cGF0aCBkPSJNNjAgMTAwIEw5MCA4NSBMMTIwIDk1IEwxNDAgODAiIHN0cm9rZT0iIzlDQTNBRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAKICA8IS0tIOaWh+WtlyAtLT4KICA8dGV4dCB4PSIxMDAiIHk9IjE2MCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzZCNzI4MCIgZm9udC1mYW1pbHk9IkFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIj4KICAgIEltYWdlIG5vdCBhdmFpbGFibGUKICA8L3RleHQ+Cjwvc3ZnPiA="), V = E(""), O = E(1), P = E(!1), R = E(null), j = E({
2224
2225
  overflow: "",
2225
2226
  paddingRight: ""
2226
- }), q = {
2227
+ }), Z = {
2227
2228
  none: "0px",
2228
2229
  sm: "0.125rem",
2229
2230
  md: "0.375rem",
@@ -2231,120 +2232,129 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2231
2232
  xl: "0.75rem",
2232
2233
  "2xl": "1rem",
2233
2234
  full: "9999px"
2234
- }, Q = O(() => n.className || ""), le = O(() => {
2235
+ }, se = N(() => n.className || ""), G = N(() => {
2236
+ const A = {};
2237
+ return n.width && (A.width = typeof n.width == "number" ? `${n.width}px` : n.width), n.height && !n.autoAspect && (A.height = typeof n.height == "number" ? `${n.height}px` : n.height), n.autoAspect && (R.value && (A.aspectRatio = `${R.value.width} / ${R.value.height}`), n.height || (A.height = "auto")), H.value && (A.borderRadius = H.value), A;
2238
+ }), H = N(() => {
2235
2239
  if (typeof n.radius == "number")
2236
2240
  return `${n.radius}px`;
2237
2241
  if (typeof n.radius == "string") {
2238
2242
  if (/(px|%|rem|em)$/.test(n.radius))
2239
2243
  return n.radius;
2240
- if (q[n.radius])
2241
- return q[n.radius];
2244
+ if (Z[n.radius])
2245
+ return Z[n.radius];
2242
2246
  }
2243
2247
  return "";
2244
- }), J = O(() => le.value ? {
2245
- borderRadius: le.value
2246
- } : {}), W = O(() => [
2248
+ }), B = N(() => H.value ? {
2249
+ borderRadius: H.value
2250
+ } : {}), W = N(() => [
2247
2251
  "yimage-image",
2248
2252
  n.preview ? "is-previewable" : ""
2249
- ].filter(Boolean).join(" ")), z = O(() => {
2250
- const B = {
2251
- objectFit: n.fit || "cover",
2252
- backgroundColor: "#fff"
2253
+ ].filter(Boolean).join(" ")), Y = N(() => {
2254
+ const A = {
2255
+ objectFit: n.autoAspect ? "contain" : n.fit || "cover",
2256
+ backgroundColor: "#fff",
2257
+ width: "100%",
2258
+ height: "100%"
2253
2259
  };
2254
- return n.width && (B.width = typeof n.width == "number" ? `${n.width}px` : n.width), n.height && (B.height = typeof n.height == "number" ? `${n.height}px` : n.height), le.value && (B.borderRadius = le.value), B;
2255
- }), R = O(() => V.value ? V.value : Array.isArray(n.previewSrcList) ? n.previewSrcList.find(Boolean) || n.src : n.previewSrcList || n.src), Y = () => {
2256
- const B = document.createElement("div");
2257
- B.style.cssText = "width: 100px; height: 100px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(B);
2258
- const P = B.offsetWidth - B.clientWidth;
2259
- return document.body.removeChild(B), P;
2260
- }, ee = () => {
2261
- if (A.value = {
2260
+ return H.value && (A.borderRadius = H.value), A;
2261
+ }), ee = N(() => V.value ? V.value : Array.isArray(n.previewSrcList) ? n.previewSrcList.find(Boolean) || n.src : n.previewSrcList || n.src), J = () => {
2262
+ const A = document.createElement("div");
2263
+ A.style.cssText = "width: 100px; height: 100px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(A);
2264
+ const ne = A.offsetWidth - A.clientWidth;
2265
+ return document.body.removeChild(A), ne;
2266
+ }, fe = () => {
2267
+ if (j.value = {
2262
2268
  overflow: document.body.style.overflow || "",
2263
2269
  paddingRight: document.body.style.paddingRight || ""
2264
2270
  }, document.body.scrollHeight > window.innerHeight) {
2265
- const P = Y();
2266
- document.body.style.paddingRight = `${P}px`;
2271
+ const ne = J();
2272
+ document.body.style.paddingRight = `${ne}px`;
2267
2273
  }
2268
2274
  document.body.style.overflow = "hidden";
2269
- }, X = () => {
2270
- document.body.style.overflow = A.value.overflow, document.body.style.paddingRight = A.value.paddingRight;
2275
+ }, me = () => {
2276
+ document.body.style.overflow = j.value.overflow, document.body.style.paddingRight = j.value.paddingRight;
2271
2277
  };
2272
- let ae = null;
2273
- const we = () => {
2274
- !n.lazy || !p.value || (ae = new IntersectionObserver(
2275
- (B) => {
2276
- B.forEach((P) => {
2277
- P.isIntersecting && (w.value = !0, b.value = n.src, ae == null || ae.unobserve(P.target));
2278
+ let F = null;
2279
+ const Q = () => {
2280
+ !n.lazy || !y.value || (F = new IntersectionObserver(
2281
+ (A) => {
2282
+ A.forEach((ne) => {
2283
+ ne.isIntersecting && (w.value = !0, k.value = n.src, F == null || F.unobserve(ne.target));
2278
2284
  });
2279
2285
  },
2280
2286
  {
2281
2287
  rootMargin: "50px"
2282
2288
  }
2283
- ), ae.observe(p.value));
2284
- }, N = (B) => {
2285
- C.value = !0, I.value = !1, x.value = !1, m("load", B);
2286
- }, Z = (B) => {
2287
- x.value = !0, I.value = !1, C.value = !1, m("error", B);
2288
- }, c = () => {
2289
- x.value = !1, I.value = !0, C.value = !1, se(() => {
2290
- y.value && (y.value.src = n.src);
2289
+ ), F.observe(y.value));
2290
+ }, d = (A) => {
2291
+ C.value = !0, I.value = !1, x.value = !1, n.autoAspect && p.value && (R.value = {
2292
+ width: p.value.naturalWidth || 1,
2293
+ height: p.value.naturalHeight || 1
2294
+ }), m("load", A);
2295
+ }, h = (A) => {
2296
+ x.value = !0, I.value = !1, C.value = !1, m("error", A);
2297
+ }, a = () => {
2298
+ x.value = !1, I.value = !0, C.value = !1, ae(() => {
2299
+ p.value && (p.value.src = n.src);
2291
2300
  });
2292
- }, h = () => Array.isArray(n.previewSrcList) ? n.previewSrcList.find(Boolean) || n.src : n.previewSrcList || n.src, a = () => {
2293
- n.preview && (n.previewSrcList || n.src) ? r() : c();
2294
- }, r = () => {
2301
+ }, r = () => Array.isArray(n.previewSrcList) ? n.previewSrcList.find(Boolean) || n.src : n.previewSrcList || n.src, f = () => {
2302
+ n.preview && (n.previewSrcList || n.src) ? b() : a();
2303
+ }, b = () => {
2295
2304
  if (!n.preview) return;
2296
- j.value = 1;
2297
- const B = h();
2298
- if (y.value && y.value.complete && y.value.naturalWidth > 0) {
2299
- V.value = B, se(() => {
2300
- g.value = !0, ee(), m("preview", B);
2305
+ O.value = 1;
2306
+ const A = r();
2307
+ if (p.value && p.value.complete && p.value.naturalWidth > 0) {
2308
+ V.value = A, ae(() => {
2309
+ g.value = !0, fe(), m("preview", A);
2301
2310
  });
2302
2311
  return;
2303
2312
  }
2304
- const P = new Image();
2305
- let te = null, ye = !1;
2306
- const Le = () => {
2307
- ye || (ye = !0, te && (clearTimeout(te), te = null), V.value = B, se(() => {
2308
- g.value = !0, ee(), m("preview", B);
2313
+ const ne = new Image();
2314
+ let Se = null, ye = !1;
2315
+ const xe = () => {
2316
+ ye || (ye = !0, Se && (clearTimeout(Se), Se = null), V.value = A, ae(() => {
2317
+ g.value = !0, fe(), m("preview", A);
2309
2318
  }));
2310
2319
  };
2311
- te = setTimeout(() => {
2312
- Le();
2313
- }, 500), P.onload = () => {
2314
- Le();
2315
- }, P.onerror = () => {
2316
- Le();
2317
- }, P.src = B, P.complete && Le();
2318
- }, f = () => {
2320
+ Se = setTimeout(() => {
2321
+ xe();
2322
+ }, 500), ne.onload = () => {
2323
+ xe();
2324
+ }, ne.onerror = () => {
2325
+ xe();
2326
+ }, ne.src = A, ne.complete && xe();
2327
+ }, M = () => {
2319
2328
  g.value = !1, setTimeout(() => {
2320
- X();
2329
+ me();
2321
2330
  }, 300);
2322
- }, k = (B) => {
2323
- const P = B.deltaY < 0 ? 1 : -1;
2324
- let ye = j.value + P * 0.1;
2325
- ye = Math.max(0.5, Math.min(2, ye)), j.value = ye;
2331
+ }, U = (A) => {
2332
+ const ne = A.deltaY < 0 ? 1 : -1;
2333
+ let ye = O.value + ne * 0.1;
2334
+ ye = Math.max(0.5, Math.min(2, ye)), O.value = ye;
2326
2335
  };
2327
- return $e(() => {
2328
- n.lazy ? we() : w.value = !0, w.value && (I.value = !0), F.value = !0;
2336
+ return De(() => {
2337
+ n.lazy ? Q() : w.value = !0, w.value && (I.value = !0), P.value = !0;
2329
2338
  }), Be(() => {
2330
- ae && ae.disconnect(), g.value && X();
2331
- }), oe(() => b.value, () => {
2332
- n.src && w.value && (I.value = !0, x.value = !1, C.value = !1);
2333
- }), oe(() => n.src, (B) => {
2334
- b.value = B || "";
2339
+ F && F.disconnect(), g.value && me();
2340
+ }), oe(() => k.value, () => {
2341
+ n.src && w.value && (I.value = !0, x.value = !1, C.value = !1), n.autoAspect && (R.value = null);
2342
+ }), oe(() => n.src, (A) => {
2343
+ k.value = A || "";
2335
2344
  }), $({
2336
- retryLoad: c,
2337
- closePreview: f
2338
- }), (B, P) => (i(), u("div", {
2345
+ retryLoad: a,
2346
+ closePreview: M
2347
+ }), (A, ne) => (i(), u("div", {
2339
2348
  ref_key: "containerRef",
2340
- ref: p,
2341
- class: K(["yimage-container", Q.value])
2349
+ ref: y,
2350
+ class: z(["yimage-container", se.value]),
2351
+ style: ie(G.value)
2342
2352
  }, [
2343
2353
  !C.value && !x.value && !w.value ? (i(), u("div", {
2344
2354
  key: 0,
2345
2355
  class: "yimage-placeholder",
2346
- style: ue(J.value)
2347
- }, [...P[1] || (P[1] = [
2356
+ style: ie(B.value)
2357
+ }, [...ne[1] || (ne[1] = [
2348
2358
  o("div", { class: "yimage-placeholder-content" }, [
2349
2359
  o("svg", {
2350
2360
  class: "yimage-placeholder-icon",
@@ -2360,81 +2370,81 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2360
2370
  })
2361
2371
  ])
2362
2372
  ], -1)
2363
- ])], 4)) : H("", !0),
2373
+ ])], 4)) : K("", !0),
2364
2374
  I.value && !x.value ? (i(), u("div", {
2365
2375
  key: 1,
2366
2376
  class: "yimage-loading",
2367
- style: ue(J.value)
2368
- }, [...P[2] || (P[2] = [
2377
+ style: ie(B.value)
2378
+ }, [...ne[2] || (ne[2] = [
2369
2379
  o("div", { class: "yimage-loading-content" }, [
2370
2380
  o("div", { class: "yimage-spinner" })
2371
2381
  ], -1)
2372
- ])], 4)) : H("", !0),
2382
+ ])], 4)) : K("", !0),
2373
2383
  x.value ? (i(), u("div", {
2374
2384
  key: 2,
2375
2385
  class: "yimage-error",
2376
- style: ue(J.value),
2377
- onClick: a
2386
+ style: ie(B.value),
2387
+ onClick: f
2378
2388
  }, [
2379
2389
  o("img", {
2380
2390
  src: "https://img.nihaojewelry.com/media/2025/6/27/1938511770352222208.png",
2381
2391
  alt: "Error Image",
2382
2392
  class: "yimage-error-image",
2383
- style: ue(J.value)
2393
+ style: ie(B.value)
2384
2394
  }, null, 4)
2385
- ], 4)) : H("", !0),
2395
+ ], 4)) : K("", !0),
2386
2396
  Ee(o("img", {
2387
2397
  ref_key: "imageRef",
2388
- ref: y,
2389
- src: b.value,
2398
+ ref: p,
2399
+ src: k.value,
2390
2400
  alt: e.alt,
2391
- class: K(W.value),
2392
- onLoad: N,
2393
- onError: Z,
2394
- onClick: G(r, ["stop"]),
2395
- style: ue(z.value)
2401
+ class: z(W.value),
2402
+ onLoad: d,
2403
+ onError: h,
2404
+ onClick: X(b, ["stop"]),
2405
+ style: ie(Y.value)
2396
2406
  }, null, 46, cl), [
2397
- [ze, C.value && !x.value]
2407
+ [Ke, C.value && !x.value]
2398
2408
  ]),
2399
2409
  n.preview && (!C.value || I.value || x.value || !w.value) ? (i(), u("div", {
2400
2410
  key: 3,
2401
2411
  class: "yimage-preview-trigger",
2402
- onClick: G(r, ["stop"])
2403
- })) : H("", !0),
2404
- F.value ? (i(), Se(Fe, {
2412
+ onClick: X(b, ["stop"])
2413
+ })) : K("", !0),
2414
+ P.value ? (i(), Me(Fe, {
2405
2415
  key: 4,
2406
2416
  to: "body"
2407
2417
  }, [
2408
- de(be, { name: "fade" }, {
2409
- default: fe(() => [
2418
+ de($e, { name: "fade" }, {
2419
+ default: ve(() => [
2410
2420
  g.value ? (i(), u("div", {
2411
2421
  key: 0,
2412
2422
  class: "yimage-preview-mask",
2413
- onClick: G(f, ["self"]),
2414
- onWheel: G(k, ["prevent"])
2423
+ onClick: X(M, ["self"]),
2424
+ onWheel: X(U, ["prevent"])
2415
2425
  }, [
2416
2426
  o("div", {
2417
- class: K(["yimage-preview-content", { "is-active": g.value }])
2427
+ class: z(["yimage-preview-content", { "is-active": g.value }])
2418
2428
  }, [
2419
2429
  o("img", {
2420
2430
  ref_key: "previewImageRef",
2421
2431
  ref: L,
2422
- src: R.value,
2432
+ src: ee.value,
2423
2433
  alt: e.alt,
2424
2434
  class: "yimage-preview-image",
2425
- style: ue({ transform: `scale(${j.value})` }),
2426
- onClick: P[0] || (P[0] = G(() => {
2435
+ style: ie({ transform: `scale(${O.value})` }),
2436
+ onClick: ne[0] || (ne[0] = X(() => {
2427
2437
  }, ["stop"]))
2428
2438
  }, null, 12, dl)
2429
2439
  ], 2)
2430
- ], 32)) : H("", !0)
2440
+ ], 32)) : K("", !0)
2431
2441
  ]),
2432
2442
  _: 1
2433
2443
  })
2434
- ])) : H("", !0)
2435
- ], 2));
2444
+ ])) : K("", !0)
2445
+ ], 6));
2436
2446
  }
2437
- }), vl = /* @__PURE__ */ me(fl, [["__scopeId", "data-v-c1a55c52"]]), hl = /* @__PURE__ */ ge({
2447
+ }), vl = /* @__PURE__ */ be(fl, [["__scopeId", "data-v-f84bad81"]]), hl = /* @__PURE__ */ we({
2438
2448
  __name: "ydropdown",
2439
2449
  props: {
2440
2450
  trigger: { default: "hover" },
@@ -2445,7 +2455,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2445
2455
  setup(e) {
2446
2456
  const $ = e, t = E(!1), n = E();
2447
2457
  let m = null;
2448
- const p = O(() => `y-dropdown__menu--${$.placement}`), y = O(() => {
2458
+ const y = N(() => `y-dropdown__menu--${$.placement}`), p = N(() => {
2449
2459
  if (!$.menuWidth) return {};
2450
2460
  const g = typeof $.menuWidth == "number" ? `${$.menuWidth}px` : $.menuWidth;
2451
2461
  return {
@@ -2454,7 +2464,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2454
2464
  maxWidth: g
2455
2465
  };
2456
2466
  }), L = () => {
2457
- console.log("显示下拉菜单", t.value), !$.disabled && (m && (clearTimeout(m), m = null), t.value = !0, console.log("设置 visible 为 true", t.value), se(() => {
2467
+ console.log("显示下拉菜单", t.value), !$.disabled && (m && (clearTimeout(m), m = null), t.value = !0, console.log("设置 visible 为 true", t.value), ae(() => {
2458
2468
  I();
2459
2469
  }));
2460
2470
  }, C = () => {
@@ -2463,52 +2473,52 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2463
2473
  }, 150);
2464
2474
  }, I = () => {
2465
2475
  if (!n.value) return;
2466
- const g = n.value.querySelector(".y-dropdown__trigger"), b = n.value.querySelector(".y-dropdown__menu");
2467
- if (!g || !b) return;
2468
- const V = g.getBoundingClientRect(), j = b.getBoundingClientRect(), F = window.innerWidth, A = window.innerHeight;
2469
- b.style.top = "", b.style.left = "", b.style.right = "", b.style.bottom = "", b.style.transform = "";
2470
- let q = 0, Q = 0;
2476
+ const g = n.value.querySelector(".y-dropdown__trigger"), k = n.value.querySelector(".y-dropdown__menu");
2477
+ if (!g || !k) return;
2478
+ const V = g.getBoundingClientRect(), O = k.getBoundingClientRect(), P = window.innerWidth, R = window.innerHeight;
2479
+ k.style.top = "", k.style.left = "", k.style.right = "", k.style.bottom = "", k.style.transform = "";
2480
+ let j = 0, Z = 0;
2471
2481
  switch ($.placement) {
2472
2482
  case "bottom":
2473
- q = V.height + 4, Q = 0;
2483
+ j = V.height + 4, Z = 0;
2474
2484
  break;
2475
2485
  case "top":
2476
- q = -(j.height + 4), Q = 0;
2486
+ j = -(O.height + 4), Z = 0;
2477
2487
  break;
2478
2488
  case "right":
2479
- q = 0, Q = V.width + 4;
2489
+ j = 0, Z = V.width + 4;
2480
2490
  break;
2481
2491
  case "left":
2482
- q = 0, Q = -(j.width + 4);
2492
+ j = 0, Z = -(O.width + 4);
2483
2493
  break;
2484
2494
  }
2485
- let le = V.top + q, J = V.left + Q;
2495
+ let se = V.top + j, G = V.left + Z;
2486
2496
  if ($.placement === "bottom" || $.placement === "top") {
2487
- const W = j.width || 260;
2488
- J + W > F - 10 && (J = F - W - 10), J < 10 && (J = 10);
2497
+ const H = O.width || 260;
2498
+ G + H > P - 10 && (G = P - H - 10), G < 10 && (G = 10);
2489
2499
  }
2490
2500
  if ($.placement === "left" || $.placement === "right") {
2491
- const W = j.height || 200;
2492
- le + W > A - 10 && (le = A - W - 10), le < 10 && (le = 10);
2501
+ const H = O.height || 200;
2502
+ se + H > R - 10 && (se = R - H - 10), se < 10 && (se = 10);
2493
2503
  }
2494
- b.style.top = `${le}px`, b.style.left = `${J}px`;
2504
+ k.style.top = `${se}px`, k.style.left = `${G}px`;
2495
2505
  }, x = (g) => {
2496
2506
  $.trigger === "click" && n.value && !n.value.contains(g.target) && (t.value = !1);
2497
2507
  }, w = () => {
2498
2508
  t.value && I();
2499
2509
  };
2500
- return $e(() => {
2510
+ return De(() => {
2501
2511
  $.trigger === "click" && document.addEventListener("click", x), window.addEventListener("resize", w), window.addEventListener("scroll", w);
2502
2512
  }), Be(() => {
2503
2513
  $.trigger === "click" && document.removeEventListener("click", x), m && clearTimeout(m), window.removeEventListener("resize", w), window.removeEventListener("scroll", w);
2504
2514
  }), oe(
2505
2515
  () => $.menuWidth,
2506
2516
  () => {
2507
- t.value && se(() => {
2517
+ t.value && ae(() => {
2508
2518
  I();
2509
2519
  });
2510
2520
  }
2511
- ), (g, b) => (i(), u("div", {
2521
+ ), (g, k) => (i(), u("div", {
2512
2522
  class: "y-dropdown",
2513
2523
  ref_key: "dropdownRef",
2514
2524
  ref: n
@@ -2519,40 +2529,40 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2519
2529
  onMouseleave: C
2520
2530
  }, [
2521
2531
  ce(g.$slots, "trigger", {}, () => [
2522
- b[0] || (b[0] = o("button", { class: "y-dropdown__button" }, " 下拉菜单 ", -1))
2532
+ k[0] || (k[0] = o("button", { class: "y-dropdown__button" }, " 下拉菜单 ", -1))
2523
2533
  ], !0)
2524
2534
  ], 32),
2525
- de(be, {
2535
+ de($e, {
2526
2536
  name: "dropdown-fade",
2527
2537
  appear: ""
2528
2538
  }, {
2529
- default: fe(() => [
2539
+ default: ve(() => [
2530
2540
  Ee(o("div", {
2531
- class: K(["y-dropdown__menu", p.value]),
2532
- style: ue(y.value),
2541
+ class: z(["y-dropdown__menu", y.value]),
2542
+ style: ie(p.value),
2533
2543
  onMouseenter: L,
2534
2544
  onMouseleave: C
2535
2545
  }, [
2536
2546
  ce(g.$slots, "default", {}, () => [
2537
- b[1] || (b[1] = o("div", { class: "y-dropdown__item" }, "选项 1", -1)),
2538
- b[2] || (b[2] = o("div", { class: "y-dropdown__item" }, "选项 2", -1)),
2539
- b[3] || (b[3] = o("div", { class: "y-dropdown__item" }, "选项 3", -1))
2547
+ k[1] || (k[1] = o("div", { class: "y-dropdown__item" }, "选项 1", -1)),
2548
+ k[2] || (k[2] = o("div", { class: "y-dropdown__item" }, "选项 2", -1)),
2549
+ k[3] || (k[3] = o("div", { class: "y-dropdown__item" }, "选项 3", -1))
2540
2550
  ], !0)
2541
2551
  ], 38), [
2542
- [ze, t.value]
2552
+ [Ke, t.value]
2543
2553
  ])
2544
2554
  ]),
2545
2555
  _: 3
2546
2556
  })
2547
2557
  ], 512));
2548
2558
  }
2549
- }), pl = /* @__PURE__ */ me(hl, [["__scopeId", "data-v-ada3172a"]]), yl = ["aria-hidden"], gl = ["onKeydown"], ml = {
2559
+ }), pl = /* @__PURE__ */ be(hl, [["__scopeId", "data-v-ada3172a"]]), yl = ["aria-hidden"], gl = ["onKeydown"], ml = {
2550
2560
  key: 0,
2551
2561
  class: "y-drawer-header"
2552
- }, wl = { class: "y-drawer-title" }, kl = { class: "y-drawer-body" }, bl = {
2562
+ }, wl = { class: "y-drawer-title" }, bl = { class: "y-drawer-body" }, kl = {
2553
2563
  key: 1,
2554
2564
  class: "y-drawer-footer"
2555
- }, xl = /* @__PURE__ */ ge({
2565
+ }, xl = /* @__PURE__ */ we({
2556
2566
  __name: "ydrawer",
2557
2567
  props: {
2558
2568
  modelValue: { type: Boolean, default: !1 },
@@ -2567,12 +2577,12 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2567
2577
  },
2568
2578
  emits: ["update:modelValue", "open", "close"],
2569
2579
  setup(e, { emit: $ }) {
2570
- const t = e, n = $, m = O({
2580
+ const t = e, n = $, m = N({
2571
2581
  get: () => t.modelValue,
2572
- set: (b) => n("update:modelValue", b)
2573
- }), p = E(null), y = O(() => t.placement === "right" ? "drawer-slide-right" : "drawer-slide-bottom"), L = O(() => t.placement === "right" ? "rounded-left" : "rounded-top"), C = O(() => {
2574
- const b = {};
2575
- return t.placement === "right" ? (b.width = typeof t.width == "number" ? `${t.width}px` : String(t.width), b.height = "100%", b.right = "0", b.top = "0") : (b.height = typeof t.height == "number" ? `${t.height}px` : String(t.height), b.width = "100%", b.bottom = "0", b.left = "0"), b;
2582
+ set: (k) => n("update:modelValue", k)
2583
+ }), y = E(null), p = N(() => t.placement === "right" ? "drawer-slide-right" : "drawer-slide-bottom"), L = N(() => t.placement === "right" ? "rounded-left" : "rounded-top"), C = N(() => {
2584
+ const k = {};
2585
+ return t.placement === "right" ? (k.width = typeof t.width == "number" ? `${t.width}px` : String(t.width), k.height = "100%", k.right = "0", k.top = "0") : (k.height = typeof t.height == "number" ? `${t.height}px` : String(t.height), k.width = "100%", k.bottom = "0", k.left = "0"), k;
2576
2586
  });
2577
2587
  function I() {
2578
2588
  t.maskClosable && x();
@@ -2583,71 +2593,71 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2583
2593
  function w() {
2584
2594
  t.closable && x();
2585
2595
  }
2586
- function g(b) {
2587
- b.key === "Escape" && w();
2596
+ function g(k) {
2597
+ k.key === "Escape" && w();
2588
2598
  }
2589
- return oe(() => t.modelValue, (b) => {
2590
- b ? (n("open"), requestAnimationFrame(() => {
2599
+ return oe(() => t.modelValue, (k) => {
2600
+ k ? (n("open"), requestAnimationFrame(() => {
2591
2601
  var V;
2592
- return (V = p.value) == null ? void 0 : V.focus();
2602
+ return (V = y.value) == null ? void 0 : V.focus();
2593
2603
  }), document.addEventListener("keydown", g), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", g), document.body.style.overflow = "");
2594
- }), $e(() => {
2604
+ }), De(() => {
2595
2605
  t.modelValue && (document.addEventListener("keydown", g), document.body.style.overflow = "hidden");
2596
2606
  }), Be(() => {
2597
2607
  document.removeEventListener("keydown", g), document.body.style.overflow = "";
2598
- }), (b, V) => (i(), Se(Fe, { to: "body" }, [
2608
+ }), (k, V) => (i(), Me(Fe, { to: "body" }, [
2599
2609
  Ee(o("div", {
2600
2610
  class: "y-drawer-root",
2601
2611
  role: "dialog",
2602
2612
  "aria-modal": !0,
2603
2613
  "aria-hidden": !m.value,
2604
- style: ue({ zIndex: String(e.zIndex) })
2614
+ style: ie({ zIndex: String(e.zIndex) })
2605
2615
  }, [
2606
2616
  o("div", {
2607
2617
  class: "y-drawer-mask",
2608
2618
  onClick: I
2609
2619
  }),
2610
- de(be, { name: y.value }, {
2611
- default: fe(() => [
2620
+ de($e, { name: p.value }, {
2621
+ default: ve(() => [
2612
2622
  Ee(o("div", {
2613
2623
  ref_key: "panelRef",
2614
- ref: p,
2615
- class: K(["y-drawer-panel", [
2624
+ ref: y,
2625
+ class: z(["y-drawer-panel", [
2616
2626
  `is-${e.placement}`,
2617
2627
  L.value
2618
2628
  ]]),
2619
- style: ue(C.value),
2620
- onKeydown: ke(G(w, ["prevent", "stop"]), ["esc"]),
2629
+ style: ie(C.value),
2630
+ onKeydown: ke(X(w, ["prevent", "stop"]), ["esc"]),
2621
2631
  tabindex: "-1"
2622
2632
  }, [
2623
2633
  e.showHeader ? (i(), u("div", ml, [
2624
- o("div", wl, ne(e.title), 1),
2634
+ o("div", wl, le(e.title), 1),
2625
2635
  e.closable ? (i(), u("button", {
2626
2636
  key: 0,
2627
2637
  type: "button",
2628
2638
  class: "y-drawer-close",
2629
2639
  "aria-label": "Close",
2630
2640
  onClick: x
2631
- }, " ✕ ")) : H("", !0)
2632
- ])) : H("", !0),
2633
- o("div", kl, [
2634
- ce(b.$slots, "default", {}, void 0, !0)
2641
+ }, " ✕ ")) : K("", !0)
2642
+ ])) : K("", !0),
2643
+ o("div", bl, [
2644
+ ce(k.$slots, "default", {}, void 0, !0)
2635
2645
  ]),
2636
- b.$slots.footer ? (i(), u("div", bl, [
2637
- ce(b.$slots, "footer", {}, void 0, !0)
2638
- ])) : H("", !0)
2646
+ k.$slots.footer ? (i(), u("div", kl, [
2647
+ ce(k.$slots, "footer", {}, void 0, !0)
2648
+ ])) : K("", !0)
2639
2649
  ], 46, gl), [
2640
- [ze, m.value]
2650
+ [Ke, m.value]
2641
2651
  ])
2642
2652
  ]),
2643
2653
  _: 3
2644
2654
  }, 8, ["name"])
2645
2655
  ], 12, yl), [
2646
- [ze, m.value]
2656
+ [Ke, m.value]
2647
2657
  ])
2648
2658
  ]));
2649
2659
  }
2650
- }), $l = /* @__PURE__ */ me(xl, [["__scopeId", "data-v-b2797950"]]), Cl = { class: "ytree__container" }, Dl = ["data-level", "onClick", "onContextmenu"], _l = ["onClick"], Sl = {
2660
+ }), $l = /* @__PURE__ */ be(xl, [["__scopeId", "data-v-b2797950"]]), Cl = { class: "ytree__container" }, Dl = ["data-level", "onClick", "onContextmenu"], _l = ["onClick"], Sl = {
2651
2661
  key: 1,
2652
2662
  class: "w-[16px]"
2653
2663
  }, Ll = ["onClick"], Ml = {
@@ -2665,10 +2675,10 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2665
2675
  }, El = ["src", "alt"], Bl = { class: "ytree-node__custom-content" }, Tl = {
2666
2676
  key: 0,
2667
2677
  class: "ytree-node__children"
2668
- }, Kl = ["data-level", "onClick", "onContextmenu"], zl = ["onClick"], Hl = {
2678
+ }, zl = ["data-level", "onClick", "onContextmenu"], Kl = ["onClick"], Hl = {
2669
2679
  key: 1,
2670
2680
  class: "w-[16px]"
2671
- }, Rl = ["onClick"], Vl = {
2681
+ }, Al = ["onClick"], Rl = {
2672
2682
  key: 0,
2673
2683
  width: "12",
2674
2684
  height: "12",
@@ -2680,7 +2690,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2680
2690
  height: "12",
2681
2691
  viewBox: "0 0 12 12",
2682
2692
  fill: "none"
2683
- }, Al = ["src", "alt"], Fl = { class: "ytree-node__custom-content" }, Pl = {
2693
+ }, Vl = ["src", "alt"], Fl = { class: "ytree-node__custom-content" }, Pl = {
2684
2694
  key: 0,
2685
2695
  class: "ytree-node__children"
2686
2696
  }, Yl = ["data-level", "onClick", "onContextmenu"], Nl = ["onClick"], Ol = {
@@ -2734,7 +2744,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2734
2744
  height: "12",
2735
2745
  viewBox: "0 0 12 12",
2736
2746
  fill: "none"
2737
- }, ho = ["src", "alt"], po = { class: "ytree-node__custom-content" }, yo = "https://image.nhdropshipping.com/fit-in/500x500/filters:format(webp)/media/2025/10/17/1979094146203385856/32.png", go = "https://image.nhdropshipping.com/fit-in/500x500/filters:format(webp)/media/2025/10/17/1979095296159907840/32.png", mo = /* @__PURE__ */ ge({
2747
+ }, ho = ["src", "alt"], po = { class: "ytree-node__custom-content" }, yo = "https://image.nhdropshipping.com/fit-in/500x500/filters:format(webp)/media/2025/10/17/1979094146203385856/32.png", go = "https://image.nhdropshipping.com/fit-in/500x500/filters:format(webp)/media/2025/10/17/1979095296159907840/32.png", mo = /* @__PURE__ */ we({
2738
2748
  __name: "ytree",
2739
2749
  props: {
2740
2750
  data: { default: () => [] },
@@ -2783,7 +2793,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2783
2793
  },
2784
2794
  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"],
2785
2795
  setup(e, { expose: $, emit: t }) {
2786
- const n = e, m = t, p = O(() => (console.log("ytree 组件接收到的数据:", n.data), n.data || [])), y = E({
2796
+ const n = e, m = t, y = N(() => (console.log("ytree 组件接收到的数据:", n.data), n.data || [])), p = E({
2787
2797
  currentNode: null,
2788
2798
  currentKey: null,
2789
2799
  checkedKeys: /* @__PURE__ */ new Set(),
@@ -2791,201 +2801,201 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2791
2801
  selectedKeys: /* @__PURE__ */ new Set(),
2792
2802
  highlightedKeys: /* @__PURE__ */ new Set()
2793
2803
  });
2794
- at("treeStore", y);
2795
- const L = O(() => n.restrictAutoExpandFromLevel && n.restrictAutoExpandFromLevel > 0 ? n.restrictAutoExpandFromLevel : void 0);
2796
- function C(c) {
2797
- return c[n.nodeKey] || c.id || Math.random();
2804
+ at("treeStore", p);
2805
+ const L = N(() => n.restrictAutoExpandFromLevel && n.restrictAutoExpandFromLevel > 0 ? n.restrictAutoExpandFromLevel : void 0);
2806
+ function C(d) {
2807
+ return d[n.nodeKey] || d.id || Math.random();
2798
2808
  }
2799
- function I(c) {
2809
+ function I(d) {
2800
2810
  var h;
2801
- return ((h = n.props) != null && h.label ? c[n.props.label] : void 0) || c.label || "";
2811
+ return ((h = n.props) != null && h.label ? d[n.props.label] : void 0) || d.label || "";
2802
2812
  }
2803
- function x(c) {
2813
+ function x(d) {
2804
2814
  var h;
2805
- return !!((h = c == null ? void 0 : c.data) != null && h.isEmployee);
2815
+ return !!((h = d == null ? void 0 : d.data) != null && h.isEmployee);
2806
2816
  }
2807
- function w(c, h) {
2817
+ function w(d, h) {
2808
2818
  var M;
2809
- const a = n.deptIconUrl || yo, r = n.personIconUrl || go, f = n.buttonIconUrl || "", k = n.childStyleIconUrl || "";
2810
- return h && k && j(c, h) ? k : (M = c == null ? void 0 : c.data) != null && M.isButton && f ? f : x(c) ? r : a;
2819
+ const a = n.deptIconUrl || yo, r = n.personIconUrl || go, f = n.buttonIconUrl || "", b = n.childStyleIconUrl || "";
2820
+ return h && b && O(d, h) ? b : (M = d == null ? void 0 : d.data) != null && M.isButton && f ? f : x(d) ? r : a;
2811
2821
  }
2812
- function g(c) {
2822
+ function g(d) {
2813
2823
  var a;
2814
- const h = ((a = n.props) != null && a.children ? c[n.props.children] : void 0) || c.children;
2824
+ const h = ((a = n.props) != null && a.children ? d[n.props.children] : void 0) || d.children;
2815
2825
  return h && h.length > 0;
2816
2826
  }
2817
- function b(c) {
2827
+ function k(d) {
2818
2828
  var h;
2819
- return ((h = n.props) != null && h.children ? c[n.props.children] : void 0) || c.children || [];
2829
+ return ((h = n.props) != null && h.children ? d[n.props.children] : void 0) || d.children || [];
2820
2830
  }
2821
- function V(c, h, a = 1) {
2822
- if (c === h)
2831
+ function V(d, h, a = 1) {
2832
+ if (d === h)
2823
2833
  return a;
2824
- const r = b(c);
2834
+ const r = k(d);
2825
2835
  for (const f of r) {
2826
- const k = V(f, h, a + 1);
2827
- if (k > 0)
2828
- return k;
2836
+ const b = V(f, h, a + 1);
2837
+ if (b > 0)
2838
+ return b;
2829
2839
  }
2830
2840
  return 0;
2831
2841
  }
2832
- function j(c, h) {
2833
- return !n.childStyleLevel || n.childStyleLevel < 1 ? !1 : V(h, c) === n.childStyleLevel;
2842
+ function O(d, h) {
2843
+ return !n.childStyleLevel || n.childStyleLevel < 1 ? !1 : V(h, d) === n.childStyleLevel;
2834
2844
  }
2835
- function F(c) {
2836
- const h = C(c);
2837
- return y.value.expandedKeys.has(h);
2845
+ function P(d) {
2846
+ const h = C(d);
2847
+ return p.value.expandedKeys.has(h);
2838
2848
  }
2839
- function A(c) {
2840
- const h = C(c);
2841
- if (y.value.checkedKeys.has(h)) {
2842
- if (g(c)) {
2843
- const r = b(c), f = r.filter((M) => A(M)), k = r.filter(
2844
- (M) => q(M)
2849
+ function R(d) {
2850
+ const h = C(d);
2851
+ if (p.value.checkedKeys.has(h)) {
2852
+ if (g(d)) {
2853
+ const r = k(d), f = r.filter((M) => R(M)), b = r.filter(
2854
+ (M) => j(M)
2845
2855
  );
2846
- return f.length === r.length && k.length === 0;
2856
+ return f.length === r.length && b.length === 0;
2847
2857
  }
2848
2858
  return !0;
2849
2859
  }
2850
- if (g(c)) {
2851
- const r = b(c);
2860
+ if (g(d)) {
2861
+ const r = k(d);
2852
2862
  return r.some(
2853
- (k) => q(k)
2854
- ) ? !1 : r.length > 0 && r.every((k) => A(k));
2863
+ (b) => j(b)
2864
+ ) ? !1 : r.length > 0 && r.every((b) => R(b));
2855
2865
  }
2856
2866
  return !1;
2857
2867
  }
2858
- function q(c) {
2859
- if (!g(c)) return !1;
2860
- const h = b(c), a = h.filter((f) => A(f)), r = h.filter(
2861
- (f) => q(f)
2868
+ function j(d) {
2869
+ if (!g(d)) return !1;
2870
+ const h = k(d), a = h.filter((f) => R(f)), r = h.filter(
2871
+ (f) => j(f)
2862
2872
  );
2863
2873
  return a.length === h.length ? !1 : a.length > 0 || r.length > 0;
2864
2874
  }
2865
- function Q(c) {
2866
- const h = C(c);
2867
- return y.value.currentKey === h;
2875
+ function Z(d) {
2876
+ const h = C(d);
2877
+ return p.value.currentKey === h;
2868
2878
  }
2869
- function le(c) {
2870
- const h = C(c);
2871
- return y.value.highlightedKeys.has(h);
2879
+ function se(d) {
2880
+ const h = C(d);
2881
+ return p.value.highlightedKeys.has(h);
2872
2882
  }
2873
- function J(c) {
2883
+ function G(d) {
2874
2884
  if (n.disabled) return;
2875
- const h = C(c), r = !y.value.checkedKeys.has(h), f = new Set(y.value.expandedKeys);
2876
- r ? y.value.checkedKeys.add(h) : y.value.checkedKeys.delete(h);
2877
- function k(M, B) {
2878
- M.forEach((P) => {
2879
- const te = C(P);
2880
- B ? y.value.checkedKeys.add(te) : y.value.checkedKeys.delete(te), g(P) && k(b(P), B);
2885
+ const h = C(d), r = !p.value.checkedKeys.has(h), f = new Set(p.value.expandedKeys);
2886
+ r ? p.value.checkedKeys.add(h) : p.value.checkedKeys.delete(h);
2887
+ function b(M, U) {
2888
+ M.forEach((te) => {
2889
+ const A = C(te);
2890
+ U ? p.value.checkedKeys.add(A) : p.value.checkedKeys.delete(A), g(te) && b(k(te), U);
2881
2891
  });
2882
2892
  }
2883
- k(b(c), r), r && W(), R(), y.value.expandedKeys = f, m("check-change", c, r, !1), m("check", c, r, !1), m("checked-keys-change", Array.from(y.value.checkedKeys));
2893
+ b(k(d), r), r && H(), W(), p.value.expandedKeys = f, m("check-change", d, r, !1), m("check", d, r, !1), m("checked-keys-change", Array.from(p.value.checkedKeys));
2884
2894
  }
2885
- function W(c) {
2895
+ function H(d) {
2886
2896
  L.value && console.log(
2887
2897
  `已启用从第${L.value}级开始不默认展开的限制(不主动收起已展开节点)`
2888
2898
  );
2889
2899
  }
2890
- function z(c) {
2891
- const h = C(c);
2892
- y.value.expandedKeys.has(h) ? (y.value.expandedKeys.delete(h), m("node-collapse", c, c, null)) : (y.value.expandedKeys.add(h), m("node-expand", c, c, null));
2900
+ function B(d) {
2901
+ const h = C(d);
2902
+ p.value.expandedKeys.has(h) ? (p.value.expandedKeys.delete(h), m("node-collapse", d, d, null)) : (p.value.expandedKeys.add(h), m("node-expand", d, d, null));
2893
2903
  }
2894
- function R() {
2895
- const c = [];
2904
+ function W() {
2905
+ const d = [];
2896
2906
  function h(r) {
2897
2907
  r.forEach((f) => {
2898
- c.push(f), g(f) && h(b(f));
2908
+ d.push(f), g(f) && h(k(f));
2899
2909
  });
2900
2910
  }
2901
- h(p.value);
2911
+ h(y.value);
2902
2912
  function a(r) {
2903
2913
  if (g(r)) {
2904
- const f = b(r), k = C(r), M = f.filter((P) => A(P)), B = f.filter(
2905
- (P) => q(P)
2914
+ const f = k(r), b = C(r), M = f.filter((te) => R(te)), U = f.filter(
2915
+ (te) => j(te)
2906
2916
  );
2907
- M.length === f.length && B.length === 0 || M.length > 0 || B.length > 0 ? y.value.checkedKeys.add(k) : y.value.checkedKeys.delete(k);
2917
+ M.length === f.length && U.length === 0 || M.length > 0 || U.length > 0 ? p.value.checkedKeys.add(b) : p.value.checkedKeys.delete(b);
2908
2918
  }
2909
2919
  }
2910
- for (let r = c.length - 1; r >= 0; r--)
2911
- a(c[r]);
2920
+ for (let r = d.length - 1; r >= 0; r--)
2921
+ a(d[r]);
2912
2922
  }
2913
- function Y(c, h, a, r) {
2923
+ function Y(d, h, a, r) {
2914
2924
  if (n.disabled) return;
2915
- const f = r ? j(c, r) : !1;
2925
+ const f = r ? O(d, r) : !1;
2916
2926
  if (n.enableChildStyleCustomClick && f) {
2917
- m("child-node-click", c, h, a);
2927
+ m("child-node-click", d, h, a);
2918
2928
  return;
2919
2929
  }
2920
- if (n.expandOnClickNode && g(c)) {
2921
- z(c);
2930
+ if (n.expandOnClickNode && g(d)) {
2931
+ B(d);
2922
2932
  return;
2923
2933
  }
2924
- y.value.currentNode = c, y.value.currentKey = C(c), n.showCheckbox && J(c), m("node-click", c, h, a);
2934
+ p.value.currentNode = d, p.value.currentKey = C(d), n.showCheckbox && G(d), m("node-click", d, h, a);
2925
2935
  }
2926
- function ee(c, h, a, r) {
2927
- n.disabled || m("node-contextmenu", c, h, a, r);
2936
+ function ee(d, h, a, r) {
2937
+ n.disabled || m("node-contextmenu", d, h, a, r);
2928
2938
  }
2929
2939
  oe(
2930
2940
  () => n.defaultExpandedKeys,
2931
- (c) => {
2932
- if (c) {
2941
+ (d) => {
2942
+ if (d) {
2933
2943
  const h = L.value;
2934
2944
  if (h) {
2935
- let a = function(M, B, P = 1) {
2936
- for (const te of B) {
2937
- if (C(te) === M) return P;
2938
- if (g(te)) {
2939
- const ye = a(M, b(te), P + 1);
2940
- if (ye > 0) return ye;
2945
+ let a = function(M, U, te = 1) {
2946
+ for (const A of U) {
2947
+ if (C(A) === M) return te;
2948
+ if (g(A)) {
2949
+ const ne = a(M, k(A), te + 1);
2950
+ if (ne > 0) return ne;
2941
2951
  }
2942
2952
  }
2943
2953
  return 0;
2944
- }, r = function(M, B, P) {
2945
- M.forEach((te) => {
2946
- B < P && g(te) ? (k.add(C(te)), r(b(te), B + 1, P)) : B < P && g(te);
2954
+ }, r = function(M, U, te) {
2955
+ M.forEach((A) => {
2956
+ U < te && g(A) ? (b.add(C(A)), r(k(A), U + 1, te)) : U < te && g(A);
2947
2957
  });
2948
2958
  };
2949
- const f = (c || []).filter((M) => {
2950
- const B = a(M, p.value, 1);
2951
- return B > 0 && B < h;
2952
- }), k = new Set(f);
2953
- r(p.value, 1, h), y.value.expandedKeys.forEach((M) => {
2954
- a(M, p.value, 1) >= h && k.add(M);
2955
- }), y.value.expandedKeys = k;
2959
+ const f = (d || []).filter((M) => {
2960
+ const U = a(M, y.value, 1);
2961
+ return U > 0 && U < h;
2962
+ }), b = new Set(f);
2963
+ r(y.value, 1, h), p.value.expandedKeys.forEach((M) => {
2964
+ a(M, y.value, 1) >= h && b.add(M);
2965
+ }), p.value.expandedKeys = b;
2956
2966
  } else
2957
- y.value.expandedKeys = new Set(c);
2967
+ p.value.expandedKeys = new Set(d);
2958
2968
  }
2959
2969
  },
2960
2970
  { immediate: !0 }
2961
2971
  );
2962
- function X() {
2972
+ function J() {
2963
2973
  if (n.defaultExpandAll) {
2964
- let c = function(r, f = 1) {
2965
- r.forEach((k) => {
2966
- if (!g(k)) return;
2967
- const M = b(k);
2974
+ let d = function(r, f = 1) {
2975
+ r.forEach((b) => {
2976
+ if (!g(b)) return;
2977
+ const M = k(b);
2968
2978
  if (a) {
2969
2979
  if (f >= a) return;
2970
- f + 1 === a || h.add(C(k)), c(M, f + 1);
2980
+ f + 1 === a || h.add(C(b)), d(M, f + 1);
2971
2981
  } else
2972
- h.add(C(k)), c(M, f + 1);
2982
+ h.add(C(b)), d(M, f + 1);
2973
2983
  });
2974
2984
  };
2975
2985
  const h = /* @__PURE__ */ new Set(), a = L.value;
2976
- c(p.value, 1), y.value.expandedKeys = h;
2986
+ d(y.value, 1), p.value.expandedKeys = h;
2977
2987
  }
2978
2988
  }
2979
- function ae() {
2989
+ function fe() {
2980
2990
  if (n.defaultCheckedKeys && n.defaultCheckedKeys.length > 0) {
2981
- let c = function(f, k = []) {
2991
+ let d = function(f, b = []) {
2982
2992
  f.forEach((M) => {
2983
- const B = C(M), P = [...k, B];
2984
- h.has(B) && k.forEach((te) => a.add(te)), g(M) && c(b(M), P);
2993
+ const U = C(M), te = [...b, U];
2994
+ h.has(U) && b.forEach((A) => a.add(A)), g(M) && d(k(M), te);
2985
2995
  });
2986
2996
  };
2987
2997
  const h = new Set(n.defaultCheckedKeys), a = /* @__PURE__ */ new Set();
2988
- c(p.value);
2998
+ d(y.value);
2989
2999
  const r = L.value;
2990
3000
  if (r) {
2991
3001
  console.log(
@@ -2993,63 +3003,63 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
2993
3003
  );
2994
3004
  return;
2995
3005
  }
2996
- y.value.expandedKeys = a;
3006
+ p.value.expandedKeys = a;
2997
3007
  }
2998
3008
  }
2999
- oe(() => n.defaultExpandAll, X, { immediate: !0 }), oe(() => p.value, X, { deep: !0 }), oe(
3009
+ oe(() => n.defaultExpandAll, J, { immediate: !0 }), oe(() => y.value, J, { deep: !0 }), oe(
3000
3010
  () => n.defaultCheckedKeys,
3001
- (c) => {
3002
- c ? (y.value.checkedKeys = new Set(c), n.enableFourthLevelSpecialHandling ? console.log("权限树模式:跳过自动展开逻辑,保持当前展开状态") : ae()) : y.value.checkedKeys.clear();
3011
+ (d) => {
3012
+ d ? (p.value.checkedKeys = new Set(d), n.enableFourthLevelSpecialHandling ? console.log("权限树模式:跳过自动展开逻辑,保持当前展开状态") : fe()) : p.value.checkedKeys.clear();
3003
3013
  },
3004
3014
  { immediate: !0 }
3005
3015
  );
3006
- function we(c) {
3016
+ function me(d) {
3007
3017
  try {
3008
- let h = function(f, k, M = []) {
3009
- for (const B of f) {
3010
- const P = C(B), te = [...M, P];
3011
- if (P === k) return te;
3012
- if (g(B)) {
3013
- const ye = h(b(B), k, te);
3014
- if (ye) return ye;
3018
+ let h = function(f, b, M = []) {
3019
+ for (const U of f) {
3020
+ const te = C(U), A = [...M, te];
3021
+ if (te === b) return A;
3022
+ if (g(U)) {
3023
+ const ne = h(k(U), b, A);
3024
+ if (ne) return ne;
3015
3025
  }
3016
3026
  }
3017
3027
  return null;
3018
3028
  };
3019
- const a = Array.isArray(c) ? c : [];
3029
+ const a = Array.isArray(d) ? d : [];
3020
3030
  if (a.length === 0) return;
3021
- y.value.highlightedKeys.clear();
3022
- const r = new Set(y.value.expandedKeys);
3031
+ p.value.highlightedKeys.clear();
3032
+ const r = new Set(p.value.expandedKeys);
3023
3033
  a.forEach((f) => {
3024
- const k = h(p.value, f);
3025
- k && k.length > 0 && (k.slice(0, -1).forEach((M) => r.add(M)), y.value.highlightedKeys.add(k[k.length - 1]));
3026
- }), y.value.expandedKeys = r;
3034
+ const b = h(y.value, f);
3035
+ b && b.length > 0 && (b.slice(0, -1).forEach((M) => r.add(M)), p.value.highlightedKeys.add(b[b.length - 1]));
3036
+ }), p.value.expandedKeys = r;
3027
3037
  } catch (h) {
3028
3038
  console.warn("highlightAndExpandByIds 执行失败", h);
3029
3039
  }
3030
3040
  }
3031
- function N() {
3032
- y.value.highlightedKeys.clear();
3041
+ function F() {
3042
+ p.value.highlightedKeys.clear();
3033
3043
  }
3034
- function Z() {
3035
- y.value.currentNode = null, y.value.currentKey = null;
3044
+ function Q() {
3045
+ p.value.currentNode = null, p.value.currentKey = null;
3036
3046
  }
3037
- return $({ highlightAndExpandByIds: we, clearHighlights: N, clearCurrentNode: Z }), oe(
3047
+ return $({ highlightAndExpandByIds: me, clearHighlights: F, clearCurrentNode: Q }), oe(
3038
3048
  () => n.defaultSelectedKeys,
3039
- (c) => {
3040
- c && (y.value.selectedKeys = new Set(c));
3049
+ (d) => {
3050
+ d && (p.value.selectedKeys = new Set(d));
3041
3051
  },
3042
3052
  { immediate: !0 }
3043
- ), (c, h) => (i(), u("div", {
3044
- class: K(["ytree", [`ytree--${e.size}`, { "ytree--disabled": e.disabled }]])
3053
+ ), (d, h) => (i(), u("div", {
3054
+ class: z(["ytree", [`ytree--${e.size}`, { "ytree--disabled": e.disabled }]])
3045
3055
  }, [
3046
3056
  o("div", Cl, [
3047
- (i(!0), u(re, null, ve(p.value, (a) => (i(), u("div", {
3057
+ (i(!0), u(ue, null, he(y.value, (a) => (i(), u("div", {
3048
3058
  key: C(a),
3049
- class: K(["ytree-node", { "ytree-node--current": Q(a), "ytree-node--highlight": le(a) }])
3059
+ class: z(["ytree-node", { "ytree-node--current": Z(a), "ytree-node--highlight": se(a) }])
3050
3060
  }, [
3051
3061
  o("div", {
3052
- class: K(["ytree-node__content", { "is-child-style": j(a, a) }]),
3062
+ class: z(["ytree-node__content", { "is-child-style": O(a, a) }]),
3053
3063
  style: { paddingLeft: "8px" },
3054
3064
  "data-level": V(a, a),
3055
3065
  onClick: (r) => Y(a, a, null, a),
@@ -3057,8 +3067,8 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3057
3067
  }, [
3058
3068
  g(a) ? (i(), u("span", {
3059
3069
  key: 0,
3060
- class: K(["ytree-node__expand-icon", { "is-expanded": F(a) }]),
3061
- onClick: G((r) => z(a), ["stop"])
3070
+ class: z(["ytree-node__expand-icon", { "is-expanded": P(a) }]),
3071
+ onClick: X((r) => B(a), ["stop"])
3062
3072
  }, [...h[0] || (h[0] = [
3063
3073
  o("svg", {
3064
3074
  width: "12",
@@ -3077,13 +3087,13 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3077
3087
  ])], 10, _l)) : (i(), u("span", Sl)),
3078
3088
  e.showCheckbox ? (i(), u("span", {
3079
3089
  key: 2,
3080
- class: K(["ytree-node__checkbox", {
3081
- "is-checked": A(a),
3082
- "is-indeterminate": q(a)
3090
+ class: z(["ytree-node__checkbox", {
3091
+ "is-checked": R(a),
3092
+ "is-indeterminate": j(a)
3083
3093
  }]),
3084
- onClick: G((r) => J(a), ["stop"])
3094
+ onClick: X((r) => G(a), ["stop"])
3085
3095
  }, [
3086
- A(a) ? (i(), u("svg", Ml, [...h[1] || (h[1] = [
3096
+ R(a) ? (i(), u("svg", Ml, [...h[1] || (h[1] = [
3087
3097
  o("path", {
3088
3098
  d: "M2 6L4.5 8.5L10 3",
3089
3099
  stroke: "currentColor",
@@ -3091,45 +3101,45 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3091
3101
  "stroke-linecap": "round",
3092
3102
  "stroke-linejoin": "round"
3093
3103
  }, null, -1)
3094
- ])])) : q(a) ? (i(), u("svg", Il, [...h[2] || (h[2] = [
3104
+ ])])) : j(a) ? (i(), u("svg", Il, [...h[2] || (h[2] = [
3095
3105
  o("path", {
3096
3106
  d: "M2 6L10 6",
3097
3107
  stroke: "currentColor",
3098
3108
  "stroke-width": "1.5",
3099
3109
  "stroke-linecap": "round"
3100
3110
  }, null, -1)
3101
- ])])) : H("", !0)
3102
- ], 10, Ll)) : H("", !0),
3111
+ ])])) : K("", !0)
3112
+ ], 10, Ll)) : K("", !0),
3103
3113
  e.iconClass ? (i(), u("span", {
3104
3114
  key: 3,
3105
- class: K(["ytree-node__icon", e.iconClass])
3106
- }, null, 2)) : H("", !0),
3115
+ class: z(["ytree-node__icon", e.iconClass])
3116
+ }, null, 2)) : K("", !0),
3107
3117
  o("img", {
3108
3118
  class: "ytree-node__avatar",
3109
3119
  src: w(a, a),
3110
3120
  alt: x(a) ? "person" : "dept"
3111
3121
  }, null, 8, El),
3112
3122
  o("span", {
3113
- class: K(["ytree-node__label", { "is-employee": x(a) }])
3114
- }, ne(I(a)), 3),
3123
+ class: z(["ytree-node__label", { "is-employee": x(a) }])
3124
+ }, le(I(a)), 3),
3115
3125
  o("div", Bl, [
3116
- ce(c.$slots, "node-content", {
3126
+ ce(d.$slots, "node-content", {
3117
3127
  node: a,
3118
- isCurrent: Q(a),
3119
- isExpanded: F(a),
3128
+ isCurrent: Z(a),
3129
+ isExpanded: P(a),
3120
3130
  hasChildren: g(a)
3121
3131
  }, void 0, !0)
3122
3132
  ])
3123
3133
  ], 42, Dl),
3124
- de(be, { name: "ytree-node" }, {
3125
- default: fe(() => [
3126
- g(a) && F(a) ? (i(), u("div", Tl, [
3127
- (i(!0), u(re, null, ve(b(a), (r) => (i(), u("div", {
3134
+ de($e, { name: "ytree-node" }, {
3135
+ default: ve(() => [
3136
+ g(a) && P(a) ? (i(), u("div", Tl, [
3137
+ (i(!0), u(ue, null, he(k(a), (r) => (i(), u("div", {
3128
3138
  key: C(r),
3129
- class: K(["ytree-node", { "ytree-node--current": Q(r), "ytree-node--highlight": le(r) }])
3139
+ class: z(["ytree-node", { "ytree-node--current": Z(r), "ytree-node--highlight": se(r) }])
3130
3140
  }, [
3131
3141
  o("div", {
3132
- class: K(["ytree-node__content", { "is-child-style": j(r, a) }]),
3142
+ class: z(["ytree-node__content", { "is-child-style": O(r, a) }]),
3133
3143
  style: { paddingLeft: "22px" },
3134
3144
  "data-level": V(a, r),
3135
3145
  onClick: (f) => Y(r, r, null, a),
@@ -3137,8 +3147,8 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3137
3147
  }, [
3138
3148
  g(r) ? (i(), u("span", {
3139
3149
  key: 0,
3140
- class: K(["ytree-node__expand-icon", { "is-expanded": F(r) }]),
3141
- onClick: G((f) => z(r), ["stop"])
3150
+ class: z(["ytree-node__expand-icon", { "is-expanded": P(r) }]),
3151
+ onClick: X((f) => B(r), ["stop"])
3142
3152
  }, [...h[3] || (h[3] = [
3143
3153
  o("svg", {
3144
3154
  width: "12",
@@ -3154,16 +3164,16 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3154
3164
  "stroke-linejoin": "round"
3155
3165
  })
3156
3166
  ], -1)
3157
- ])], 10, zl)) : (i(), u("span", Hl)),
3167
+ ])], 10, Kl)) : (i(), u("span", Hl)),
3158
3168
  e.showCheckbox ? (i(), u("span", {
3159
3169
  key: 2,
3160
- class: K(["ytree-node__checkbox", {
3161
- "is-checked": A(r),
3162
- "is-indeterminate": q(r)
3170
+ class: z(["ytree-node__checkbox", {
3171
+ "is-checked": R(r),
3172
+ "is-indeterminate": j(r)
3163
3173
  }]),
3164
- onClick: G((f) => J(r), ["stop"])
3174
+ onClick: X((f) => G(r), ["stop"])
3165
3175
  }, [
3166
- A(r) ? (i(), u("svg", Vl, [...h[4] || (h[4] = [
3176
+ R(r) ? (i(), u("svg", Rl, [...h[4] || (h[4] = [
3167
3177
  o("path", {
3168
3178
  d: "M2 6L4.5 8.5L10 3",
3169
3179
  stroke: "currentColor",
@@ -3171,53 +3181,53 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3171
3181
  "stroke-linecap": "round",
3172
3182
  "stroke-linejoin": "round"
3173
3183
  }, null, -1)
3174
- ])])) : q(r) ? (i(), u("svg", Wl, [...h[5] || (h[5] = [
3184
+ ])])) : j(r) ? (i(), u("svg", Wl, [...h[5] || (h[5] = [
3175
3185
  o("path", {
3176
3186
  d: "M2 6L10 6",
3177
3187
  stroke: "currentColor",
3178
3188
  "stroke-width": "1.5",
3179
3189
  "stroke-linecap": "round"
3180
3190
  }, null, -1)
3181
- ])])) : H("", !0)
3182
- ], 10, Rl)) : H("", !0),
3191
+ ])])) : K("", !0)
3192
+ ], 10, Al)) : K("", !0),
3183
3193
  e.iconClass ? (i(), u("span", {
3184
3194
  key: 3,
3185
- class: K(["ytree-node__icon", e.iconClass])
3186
- }, null, 2)) : H("", !0),
3195
+ class: z(["ytree-node__icon", e.iconClass])
3196
+ }, null, 2)) : K("", !0),
3187
3197
  o("img", {
3188
3198
  class: "ytree-node__avatar",
3189
3199
  src: w(r, a),
3190
3200
  alt: x(r) ? "person" : "dept"
3191
- }, null, 8, Al),
3201
+ }, null, 8, Vl),
3192
3202
  o("span", {
3193
- class: K(["ytree-node__label", { "is-employee": x(r) }])
3194
- }, ne(I(r)), 3),
3203
+ class: z(["ytree-node__label", { "is-employee": x(r) }])
3204
+ }, le(I(r)), 3),
3195
3205
  o("div", Fl, [
3196
- ce(c.$slots, "node-content", {
3206
+ ce(d.$slots, "node-content", {
3197
3207
  node: r,
3198
- isCurrent: Q(r),
3199
- isExpanded: F(r),
3208
+ isCurrent: Z(r),
3209
+ isExpanded: P(r),
3200
3210
  hasChildren: g(r)
3201
3211
  }, void 0, !0)
3202
3212
  ])
3203
- ], 42, Kl),
3204
- de(be, { name: "ytree-node" }, {
3205
- default: fe(() => [
3206
- g(r) && F(r) ? (i(), u("div", Pl, [
3207
- (i(!0), u(re, null, ve(b(r), (f) => (i(), u("div", {
3213
+ ], 42, zl),
3214
+ de($e, { name: "ytree-node" }, {
3215
+ default: ve(() => [
3216
+ g(r) && P(r) ? (i(), u("div", Pl, [
3217
+ (i(!0), u(ue, null, he(k(r), (f) => (i(), u("div", {
3208
3218
  key: C(f),
3209
- class: K(["ytree-node", {
3210
- "ytree-node--current": Q(f),
3211
- "ytree-node--highlight": le(f)
3219
+ class: z(["ytree-node", {
3220
+ "ytree-node--current": Z(f),
3221
+ "ytree-node--highlight": se(f)
3212
3222
  }])
3213
3223
  }, [
3214
3224
  o("div", {
3215
- class: K(["ytree-node__content", { "is-child-style": j(f, a) }]),
3225
+ class: z(["ytree-node__content", { "is-child-style": O(f, a) }]),
3216
3226
  style: { paddingLeft: "38px" },
3217
3227
  "data-level": V(a, f),
3218
- onClick: (k) => Y(f, f, null, a),
3219
- onContextmenu: (k) => ee(
3220
- k,
3228
+ onClick: (b) => Y(f, f, null, a),
3229
+ onContextmenu: (b) => ee(
3230
+ b,
3221
3231
  f,
3222
3232
  f,
3223
3233
  null
@@ -3225,8 +3235,8 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3225
3235
  }, [
3226
3236
  g(f) ? (i(), u("span", {
3227
3237
  key: 0,
3228
- class: K(["ytree-node__expand-icon", { "is-expanded": F(f) }]),
3229
- onClick: G((k) => z(f), ["stop"])
3238
+ class: z(["ytree-node__expand-icon", { "is-expanded": P(f) }]),
3239
+ onClick: X((b) => B(f), ["stop"])
3230
3240
  }, [...h[6] || (h[6] = [
3231
3241
  o("svg", {
3232
3242
  width: "12",
@@ -3245,13 +3255,13 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3245
3255
  ])], 10, Nl)) : (i(), u("span", Ol)),
3246
3256
  e.showCheckbox ? (i(), u("span", {
3247
3257
  key: 2,
3248
- class: K(["ytree-node__checkbox", {
3249
- "is-checked": A(f),
3250
- "is-indeterminate": q(f)
3258
+ class: z(["ytree-node__checkbox", {
3259
+ "is-checked": R(f),
3260
+ "is-indeterminate": j(f)
3251
3261
  }]),
3252
- onClick: G((k) => J(f), ["stop"])
3262
+ onClick: X((b) => G(f), ["stop"])
3253
3263
  }, [
3254
- A(f) ? (i(), u("svg", ql, [...h[7] || (h[7] = [
3264
+ R(f) ? (i(), u("svg", ql, [...h[7] || (h[7] = [
3255
3265
  o("path", {
3256
3266
  d: "M2 6L4.5 8.5L10 3",
3257
3267
  stroke: "currentColor",
@@ -3259,71 +3269,71 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3259
3269
  "stroke-linecap": "round",
3260
3270
  "stroke-linejoin": "round"
3261
3271
  }, null, -1)
3262
- ])])) : q(f) ? (i(), u("svg", Ul, [...h[8] || (h[8] = [
3272
+ ])])) : j(f) ? (i(), u("svg", Ul, [...h[8] || (h[8] = [
3263
3273
  o("path", {
3264
3274
  d: "M2 6L10 6",
3265
3275
  stroke: "currentColor",
3266
3276
  "stroke-width": "1.5",
3267
3277
  "stroke-linecap": "round"
3268
3278
  }, null, -1)
3269
- ])])) : H("", !0)
3270
- ], 10, jl)) : H("", !0),
3279
+ ])])) : K("", !0)
3280
+ ], 10, jl)) : K("", !0),
3271
3281
  e.iconClass ? (i(), u("span", {
3272
3282
  key: 3,
3273
- class: K(["ytree-node__icon", e.iconClass])
3274
- }, null, 2)) : H("", !0),
3283
+ class: z(["ytree-node__icon", e.iconClass])
3284
+ }, null, 2)) : K("", !0),
3275
3285
  o("img", {
3276
3286
  class: "ytree-node__avatar",
3277
3287
  src: w(f, a),
3278
3288
  alt: x(f) ? "person" : "dept"
3279
3289
  }, null, 8, Zl),
3280
3290
  o("span", {
3281
- class: K(["ytree-node__label", { "is-employee": x(f) }])
3282
- }, ne(I(f)), 3),
3291
+ class: z(["ytree-node__label", { "is-employee": x(f) }])
3292
+ }, le(I(f)), 3),
3283
3293
  o("div", Ql, [
3284
- ce(c.$slots, "node-content", {
3294
+ ce(d.$slots, "node-content", {
3285
3295
  node: f,
3286
- isCurrent: Q(f),
3287
- isExpanded: F(f),
3296
+ isCurrent: Z(f),
3297
+ isExpanded: P(f),
3288
3298
  hasChildren: g(f)
3289
3299
  }, void 0, !0)
3290
3300
  ])
3291
3301
  ], 42, Yl),
3292
- de(be, { name: "ytree-node" }, {
3293
- default: fe(() => [
3294
- g(f) && F(f) ? (i(), u("div", Jl, [
3295
- (i(!0), u(re, null, ve(b(f), (k) => (i(), u("div", {
3296
- key: C(k),
3297
- class: K(["ytree-node", {
3298
- "ytree-node--current": Q(k),
3299
- "ytree-node--highlight": le(k)
3302
+ de($e, { name: "ytree-node" }, {
3303
+ default: ve(() => [
3304
+ g(f) && P(f) ? (i(), u("div", Jl, [
3305
+ (i(!0), u(ue, null, he(k(f), (b) => (i(), u("div", {
3306
+ key: C(b),
3307
+ class: z(["ytree-node", {
3308
+ "ytree-node--current": Z(b),
3309
+ "ytree-node--highlight": se(b)
3300
3310
  }])
3301
3311
  }, [
3302
3312
  o("div", {
3303
- class: K(["ytree-node__content", { "is-child-style": j(k, a) }]),
3313
+ class: z(["ytree-node__content", { "is-child-style": O(b, a) }]),
3304
3314
  style: {
3305
3315
  paddingLeft: "54px"
3306
3316
  },
3307
- "data-level": V(a, k),
3317
+ "data-level": V(a, b),
3308
3318
  onClick: (M) => Y(
3309
- k,
3310
- k,
3319
+ b,
3320
+ b,
3311
3321
  null,
3312
3322
  a
3313
3323
  ),
3314
3324
  onContextmenu: (M) => ee(
3315
3325
  M,
3316
- k,
3317
- k,
3326
+ b,
3327
+ b,
3318
3328
  null
3319
3329
  )
3320
3330
  }, [
3321
- g(k) ? (i(), u("span", {
3331
+ g(b) ? (i(), u("span", {
3322
3332
  key: 0,
3323
- class: K(["ytree-node__expand-icon", {
3324
- "is-expanded": F(k)
3333
+ class: z(["ytree-node__expand-icon", {
3334
+ "is-expanded": P(b)
3325
3335
  }]),
3326
- onClick: G((M) => z(k), ["stop"])
3336
+ onClick: X((M) => B(b), ["stop"])
3327
3337
  }, [...h[9] || (h[9] = [
3328
3338
  o("svg", {
3329
3339
  width: "12",
@@ -3342,13 +3352,13 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3342
3352
  ])], 10, Gl)) : (i(), u("span", eo)),
3343
3353
  e.showCheckbox ? (i(), u("span", {
3344
3354
  key: 2,
3345
- class: K(["ytree-node__checkbox", {
3346
- "is-checked": A(k),
3347
- "is-indeterminate": q(k)
3355
+ class: z(["ytree-node__checkbox", {
3356
+ "is-checked": R(b),
3357
+ "is-indeterminate": j(b)
3348
3358
  }]),
3349
- onClick: G((M) => J(k), ["stop"])
3359
+ onClick: X((M) => G(b), ["stop"])
3350
3360
  }, [
3351
- A(k) ? (i(), u("svg", no, [...h[10] || (h[10] = [
3361
+ R(b) ? (i(), u("svg", no, [...h[10] || (h[10] = [
3352
3362
  o("path", {
3353
3363
  d: "M2 6L4.5 8.5L10 3",
3354
3364
  stroke: "currentColor",
@@ -3356,63 +3366,63 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3356
3366
  "stroke-linecap": "round",
3357
3367
  "stroke-linejoin": "round"
3358
3368
  }, null, -1)
3359
- ])])) : q(k) ? (i(), u("svg", lo, [...h[11] || (h[11] = [
3369
+ ])])) : j(b) ? (i(), u("svg", lo, [...h[11] || (h[11] = [
3360
3370
  o("path", {
3361
3371
  d: "M2 6L10 6",
3362
3372
  stroke: "currentColor",
3363
3373
  "stroke-width": "1.5",
3364
3374
  "stroke-linecap": "round"
3365
3375
  }, null, -1)
3366
- ])])) : H("", !0)
3367
- ], 10, to)) : H("", !0),
3376
+ ])])) : K("", !0)
3377
+ ], 10, to)) : K("", !0),
3368
3378
  e.iconClass ? (i(), u("span", {
3369
3379
  key: 3,
3370
- class: K(["ytree-node__icon", e.iconClass])
3371
- }, null, 2)) : H("", !0),
3380
+ class: z(["ytree-node__icon", e.iconClass])
3381
+ }, null, 2)) : K("", !0),
3372
3382
  o("img", {
3373
3383
  class: "ytree-node__avatar",
3374
- src: w(k, a),
3375
- alt: x(k) ? "person" : "dept"
3384
+ src: w(b, a),
3385
+ alt: x(b) ? "person" : "dept"
3376
3386
  }, null, 8, oo),
3377
3387
  o("span", {
3378
- class: K(["ytree-node__label", {
3379
- "is-employee": x(k)
3388
+ class: z(["ytree-node__label", {
3389
+ "is-employee": x(b)
3380
3390
  }])
3381
- }, ne(I(k)), 3),
3391
+ }, le(I(b)), 3),
3382
3392
  o("div", ao, [
3383
- ce(c.$slots, "node-content", {
3384
- node: k,
3385
- isCurrent: Q(k),
3386
- isExpanded: F(k),
3387
- hasChildren: g(k)
3393
+ ce(d.$slots, "node-content", {
3394
+ node: b,
3395
+ isCurrent: Z(b),
3396
+ isExpanded: P(b),
3397
+ hasChildren: g(b)
3388
3398
  }, void 0, !0)
3389
3399
  ])
3390
3400
  ], 42, Xl),
3391
- de(be, { name: "ytree-node" }, {
3392
- default: fe(() => [
3393
- g(k) && F(k) ? (i(), u("div", so, [
3394
- (i(!0), u(re, null, ve(b(
3395
- k
3401
+ de($e, { name: "ytree-node" }, {
3402
+ default: ve(() => [
3403
+ g(b) && P(b) ? (i(), u("div", so, [
3404
+ (i(!0), u(ue, null, he(k(
3405
+ b
3396
3406
  ), (M) => (i(), u("div", {
3397
3407
  key: C(M),
3398
- class: K(["ytree-node", {
3399
- "ytree-node--current": Q(M)
3408
+ class: z(["ytree-node", {
3409
+ "ytree-node--current": Z(M)
3400
3410
  }])
3401
3411
  }, [
3402
3412
  o("div", {
3403
- class: K(["ytree-node__content", { "is-child-style": j(M, a) }]),
3413
+ class: z(["ytree-node__content", { "is-child-style": O(M, a) }]),
3404
3414
  style: {
3405
3415
  paddingLeft: "70px"
3406
3416
  },
3407
3417
  "data-level": V(a, M),
3408
- onClick: (B) => Y(
3418
+ onClick: (U) => Y(
3409
3419
  M,
3410
3420
  M,
3411
3421
  null,
3412
3422
  a
3413
3423
  ),
3414
- onContextmenu: (B) => ee(
3415
- B,
3424
+ onContextmenu: (U) => ee(
3425
+ U,
3416
3426
  M,
3417
3427
  M,
3418
3428
  null
@@ -3420,10 +3430,10 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3420
3430
  }, [
3421
3431
  g(M) ? (i(), u("span", {
3422
3432
  key: 0,
3423
- class: K(["ytree-node__expand-icon", {
3424
- "is-expanded": F(M)
3433
+ class: z(["ytree-node__expand-icon", {
3434
+ "is-expanded": P(M)
3425
3435
  }]),
3426
- onClick: G((B) => z(M), ["stop"])
3436
+ onClick: X((U) => B(M), ["stop"])
3427
3437
  }, [...h[12] || (h[12] = [
3428
3438
  o("svg", {
3429
3439
  width: "12",
@@ -3442,15 +3452,15 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3442
3452
  ])], 10, ro)) : (i(), u("span", uo)),
3443
3453
  e.showCheckbox ? (i(), u("span", {
3444
3454
  key: 2,
3445
- class: K(["ytree-node__checkbox", {
3446
- "is-checked": A(M),
3447
- "is-indeterminate": q(
3455
+ class: z(["ytree-node__checkbox", {
3456
+ "is-checked": R(M),
3457
+ "is-indeterminate": j(
3448
3458
  M
3449
3459
  )
3450
3460
  }]),
3451
- onClick: G((B) => J(M), ["stop"])
3461
+ onClick: X((U) => G(M), ["stop"])
3452
3462
  }, [
3453
- A(M) ? (i(), u("svg", fo, [...h[13] || (h[13] = [
3463
+ R(M) ? (i(), u("svg", fo, [...h[13] || (h[13] = [
3454
3464
  o("path", {
3455
3465
  d: "M2 6L4.5 8.5L10 3",
3456
3466
  stroke: "currentColor",
@@ -3458,7 +3468,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3458
3468
  "stroke-linecap": "round",
3459
3469
  "stroke-linejoin": "round"
3460
3470
  }, null, -1)
3461
- ])])) : q(
3471
+ ])])) : j(
3462
3472
  M
3463
3473
  ) ? (i(), u("svg", vo, [...h[14] || (h[14] = [
3464
3474
  o("path", {
@@ -3467,48 +3477,48 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3467
3477
  "stroke-width": "1.5",
3468
3478
  "stroke-linecap": "round"
3469
3479
  }, null, -1)
3470
- ])])) : H("", !0)
3471
- ], 10, co)) : H("", !0),
3480
+ ])])) : K("", !0)
3481
+ ], 10, co)) : K("", !0),
3472
3482
  e.iconClass ? (i(), u("span", {
3473
3483
  key: 3,
3474
- class: K(["ytree-node__icon", e.iconClass])
3475
- }, null, 2)) : H("", !0),
3484
+ class: z(["ytree-node__icon", e.iconClass])
3485
+ }, null, 2)) : K("", !0),
3476
3486
  o("img", {
3477
3487
  class: "ytree-node__avatar",
3478
3488
  src: w(M, a),
3479
3489
  alt: x(M) ? "person" : "dept"
3480
3490
  }, null, 8, ho),
3481
3491
  o("span", {
3482
- class: K(["ytree-node__label", {
3492
+ class: z(["ytree-node__label", {
3483
3493
  "is-employee": x(M)
3484
3494
  }])
3485
- }, ne(I(M)), 3),
3495
+ }, le(I(M)), 3),
3486
3496
  o("div", po, [
3487
- ce(c.$slots, "node-content", {
3497
+ ce(d.$slots, "node-content", {
3488
3498
  node: M,
3489
- isCurrent: Q(M),
3490
- isExpanded: F(M),
3499
+ isCurrent: Z(M),
3500
+ isExpanded: P(M),
3491
3501
  hasChildren: g(M)
3492
3502
  }, void 0, !0)
3493
3503
  ])
3494
3504
  ], 42, io)
3495
3505
  ], 2))), 128))
3496
- ])) : H("", !0)
3506
+ ])) : K("", !0)
3497
3507
  ]),
3498
3508
  _: 2
3499
3509
  }, 1024)
3500
3510
  ], 2))), 128))
3501
- ])) : H("", !0)
3511
+ ])) : K("", !0)
3502
3512
  ]),
3503
3513
  _: 2
3504
3514
  }, 1024)
3505
3515
  ], 2))), 128))
3506
- ])) : H("", !0)
3516
+ ])) : K("", !0)
3507
3517
  ]),
3508
3518
  _: 2
3509
3519
  }, 1024)
3510
3520
  ], 2))), 128))
3511
- ])) : H("", !0)
3521
+ ])) : K("", !0)
3512
3522
  ]),
3513
3523
  _: 2
3514
3524
  }, 1024)
@@ -3516,13 +3526,13 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3516
3526
  ])
3517
3527
  ], 2));
3518
3528
  }
3519
- }), wo = /* @__PURE__ */ me(mo, [["__scopeId", "data-v-6ab410ed"]]), ko = { class: "query-encapsulation" }, bo = { class: "query-encapsulation__container" }, xo = { class: "query-encapsulation__content" }, $o = { class: "query-encapsulation__fields" }, Co = { class: "query-encapsulation__field-wrapper" }, Do = {
3529
+ }), wo = /* @__PURE__ */ be(mo, [["__scopeId", "data-v-6ab410ed"]]), bo = { class: "query-encapsulation" }, ko = { class: "query-encapsulation__container" }, xo = { class: "query-encapsulation__content" }, $o = { class: "query-encapsulation__fields" }, Co = { class: "query-encapsulation__field-wrapper" }, Do = {
3520
3530
  key: 0,
3521
3531
  class: "query-encapsulation__field-label"
3522
3532
  }, _o = {
3523
3533
  key: 0,
3524
3534
  class: "query-encapsulation__toggle"
3525
- }, So = { class: "query-encapsulation__actions" }, Lo = { class: "query-encapsulation__actions-group" }, Mo = /* @__PURE__ */ ge({
3535
+ }, So = { class: "query-encapsulation__actions" }, Lo = { class: "query-encapsulation__actions-group" }, Mo = /* @__PURE__ */ we({
3526
3536
  __name: "QueryEncapsulation",
3527
3537
  props: {
3528
3538
  Iflabel: { type: Boolean, default: !0 },
@@ -3533,11 +3543,11 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3533
3543
  },
3534
3544
  emits: ["update:modelValue", "search", "reset", "field-change"],
3535
3545
  setup(e, { emit: $ }) {
3536
- const t = e, n = $, m = E(!1), p = st({}), y = ["select", "date", "daterange"];
3546
+ const t = e, n = $, m = E(!1), y = st({}), p = ["select", "date", "daterange"];
3537
3547
  let L;
3538
- const C = O(() => t.fields.filter((W) => !W.hidden)), I = O(() => m.value ? C.value : C.value.slice(0, t.maxVisibleFields)), x = O(() => C.value.length > t.maxVisibleFields);
3539
- function w(W) {
3540
- switch (W) {
3548
+ const C = N(() => t.fields.filter((H) => !H.hidden)), I = N(() => m.value ? C.value : C.value.slice(0, t.maxVisibleFields)), x = N(() => C.value.length > t.maxVisibleFields);
3549
+ function w(H) {
3550
+ switch (H) {
3541
3551
  case "select":
3542
3552
  return tt;
3543
3553
  case "date":
@@ -3548,87 +3558,87 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3548
3558
  return et;
3549
3559
  }
3550
3560
  }
3551
- function g(W) {
3552
- n("field-change", W, p[W.key]), n("update:modelValue", { ...p }), y.includes(W.type) && q();
3561
+ function g(H) {
3562
+ n("field-change", H, y[H.key]), n("update:modelValue", { ...y }), p.includes(H.type) && j();
3553
3563
  }
3554
- function b() {
3555
- const W = Q(p), z = le(W), R = { ...p };
3556
- n("search", { data: z, raw: R });
3564
+ function k() {
3565
+ const H = Z(y), B = se(H), W = { ...y };
3566
+ n("search", { data: B, raw: W });
3557
3567
  }
3558
3568
  function V() {
3559
- Object.keys(p).forEach((W) => {
3560
- const z = t.fields.find((R) => R.key === W);
3561
- (z == null ? void 0 : z.type) === "daterange" ? p[W] = { startDate: null, endDate: null } : (z == null ? void 0 : z.type) === "date" ? p[W] = null : p[W] = "";
3562
- }), n("reset"), n("update:modelValue", { ...p });
3569
+ Object.keys(y).forEach((H) => {
3570
+ const B = t.fields.find((W) => W.key === H);
3571
+ (B == null ? void 0 : B.type) === "daterange" ? y[H] = { startDate: null, endDate: null } : (B == null ? void 0 : B.type) === "date" ? y[H] = null : y[H] = "";
3572
+ }), n("reset"), n("update:modelValue", { ...y });
3563
3573
  }
3564
- function j() {
3574
+ function O() {
3565
3575
  m.value = !m.value;
3566
3576
  }
3567
- function F(W) {
3568
- return W.type !== "input" ? {} : {
3569
- enter: () => A(),
3570
- paste: () => A()
3577
+ function P(H) {
3578
+ return H.type !== "input" ? {} : {
3579
+ enter: () => R(),
3580
+ paste: () => R()
3571
3581
  };
3572
3582
  }
3573
- async function A() {
3574
- await se(), b();
3583
+ async function R() {
3584
+ await ae(), k();
3575
3585
  }
3576
- function q() {
3586
+ function j() {
3577
3587
  L && clearTimeout(L), L = setTimeout(() => {
3578
- L = void 0, se().then(() => b());
3588
+ L = void 0, ae().then(() => k());
3579
3589
  }, 0);
3580
3590
  }
3581
- function Q(W) {
3582
- const z = {};
3583
- return Object.keys(W).forEach((R) => {
3584
- const Y = t.fields.find((ae) => ae.key === R), ee = W[R], X = typeof ee == "string" ? ee.trim() : ee;
3585
- if (!(X == null || X === "")) {
3586
- if (typeof X == "object" && X.startDate && X.endDate) {
3587
- X.startDate && X.endDate && (z[R] = X);
3591
+ function Z(H) {
3592
+ const B = {};
3593
+ return Object.keys(H).forEach((W) => {
3594
+ const Y = t.fields.find((fe) => fe.key === W), ee = H[W], J = typeof ee == "string" ? ee.trim() : ee;
3595
+ if (!(J == null || J === "")) {
3596
+ if (typeof J == "object" && J.startDate && J.endDate) {
3597
+ J.startDate && J.endDate && (B[W] = J);
3588
3598
  return;
3589
3599
  }
3590
3600
  if (Y && (Y.type === "date" || Y.type === "daterange")) {
3591
- X !== 0 && (z[R] = X);
3601
+ J !== 0 && (B[W] = J);
3592
3602
  return;
3593
3603
  }
3594
- z[R] = X;
3604
+ B[W] = J;
3595
3605
  }
3596
- }), z;
3606
+ }), B;
3597
3607
  }
3598
- function le(W) {
3599
- const z = {};
3600
- return Object.keys(W).forEach((R) => {
3601
- const Y = W[R], ee = t.fields.find((X) => X.key === R);
3608
+ function se(H) {
3609
+ const B = {};
3610
+ return Object.keys(H).forEach((W) => {
3611
+ const Y = H[W], ee = t.fields.find((J) => J.key === W);
3602
3612
  if (ee)
3603
3613
  if (ee.type === "daterange" && typeof Y == "object") {
3604
- const X = ee.startKey || `${R}Start`, ae = ee.endKey || `${R}End`;
3605
- Y.startDate && Y.endDate && Y.startDate !== 0 && Y.endDate !== 0 && (ee.format === "timestamp" ? (z[X] = new Date(Y.startDate).getTime(), z[ae] = new Date(Y.endDate).getTime()) : (z[X] = Y.startDate, z[ae] = Y.endDate));
3606
- } else ee.type === "date" && Y && Y !== 0 && ee.format === "timestamp" ? z[R] = new Date(Y).getTime() : z[R] = Y;
3614
+ const J = ee.startKey || `${W}Start`, fe = ee.endKey || `${W}End`;
3615
+ Y.startDate && Y.endDate && Y.startDate !== 0 && Y.endDate !== 0 && (ee.format === "timestamp" ? (B[J] = new Date(Y.startDate).getTime(), B[fe] = new Date(Y.endDate).getTime()) : (B[J] = Y.startDate, B[fe] = Y.endDate));
3616
+ } else ee.type === "date" && Y && Y !== 0 && ee.format === "timestamp" ? B[W] = new Date(Y).getTime() : B[W] = Y;
3607
3617
  else
3608
- z[R] = Y;
3609
- }), z;
3618
+ B[W] = Y;
3619
+ }), B;
3610
3620
  }
3611
- function J() {
3612
- t.fields.forEach((W) => {
3613
- var z, R, Y;
3614
- p[W.key] === void 0 && (W.type === "daterange" ? p[W.key] = ((z = t.modelValue) == null ? void 0 : z[W.key]) || {
3621
+ function G() {
3622
+ t.fields.forEach((H) => {
3623
+ var B, W, Y;
3624
+ y[H.key] === void 0 && (H.type === "daterange" ? y[H.key] = ((B = t.modelValue) == null ? void 0 : B[H.key]) || {
3615
3625
  startDate: null,
3616
3626
  endDate: null
3617
- } : W.type === "date" ? p[W.key] = ((R = t.modelValue) == null ? void 0 : R[W.key]) || null : p[W.key] = ((Y = t.modelValue) == null ? void 0 : Y[W.key]) || "");
3627
+ } : H.type === "date" ? y[H.key] = ((W = t.modelValue) == null ? void 0 : W[H.key]) || null : y[H.key] = ((Y = t.modelValue) == null ? void 0 : Y[H.key]) || "");
3618
3628
  });
3619
3629
  }
3620
3630
  return oe(
3621
3631
  () => t.modelValue,
3622
- (W) => {
3623
- W && Object.assign(p, W);
3632
+ (H) => {
3633
+ H && Object.assign(y, H);
3624
3634
  },
3625
3635
  { deep: !0, immediate: !0 }
3626
- ), $e(() => {
3627
- J();
3636
+ ), De(() => {
3637
+ G();
3628
3638
  }), Xe(() => {
3629
3639
  L && (clearTimeout(L), L = void 0);
3630
- }), (W, z) => (i(), u("div", ko, [
3631
- o("div", bo, [
3640
+ }), (H, B) => (i(), u("div", bo, [
3641
+ o("div", ko, [
3632
3642
  o("div", xo, [
3633
3643
  o("div", $o, [
3634
3644
  de(it, {
@@ -3636,27 +3646,27 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3636
3646
  tag: "div",
3637
3647
  class: "query-encapsulation__fields-group"
3638
3648
  }, {
3639
- default: fe(() => [
3640
- (i(!0), u(re, null, ve(I.value, (R) => (i(), u("div", {
3641
- key: R.key,
3649
+ default: ve(() => [
3650
+ (i(!0), u(ue, null, he(I.value, (W) => (i(), u("div", {
3651
+ key: W.key,
3642
3652
  class: "query-encapsulation__field-item"
3643
3653
  }, [
3644
3654
  o("div", Co, [
3645
- e.Iflabel ? (i(), u("label", Do, ne(R.label), 1)) : H("", !0),
3646
- (i(), Se(rt(w(R.type)), ut({
3647
- modelValue: p[R.key],
3648
- "onUpdate:modelValue": (Y) => p[R.key] = Y,
3649
- placeholder: R.placeholder || `请输入${R.label}`,
3650
- options: R.options,
3651
- clearable: R.clearable !== !1,
3652
- size: R.size || "small",
3653
- width: R.width || "180px",
3654
- format: R.format || "timestamp",
3655
- "include-time": R.includeTime || !1,
3656
- filterable: R.filterable === !0
3657
- }, ct(F(R)), {
3658
- onInput: (Y) => g(R),
3659
- onChange: (Y) => g(R)
3655
+ e.Iflabel ? (i(), u("label", Do, le(W.label), 1)) : K("", !0),
3656
+ (i(), Me(rt(w(W.type)), ut({
3657
+ modelValue: y[W.key],
3658
+ "onUpdate:modelValue": (Y) => y[W.key] = Y,
3659
+ placeholder: W.placeholder || `请输入${W.label}`,
3660
+ options: W.options,
3661
+ clearable: W.clearable !== !1,
3662
+ size: W.size || "small",
3663
+ width: W.width || "180px",
3664
+ format: W.format || "timestamp",
3665
+ "include-time": W.includeTime || !1,
3666
+ filterable: W.filterable === !0
3667
+ }, ct(P(W)), {
3668
+ onInput: (Y) => g(W),
3669
+ onChange: (Y) => g(W)
3660
3670
  }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "options", "clearable", "size", "width", "format", "include-time", "filterable", "onInput", "onChange"]))
3661
3671
  ])
3662
3672
  ]))), 128))
@@ -3667,27 +3677,27 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3667
3677
  de(Ne, {
3668
3678
  variant: "secondary",
3669
3679
  size: "small",
3670
- onClick: j
3680
+ onClick: O
3671
3681
  }, {
3672
- default: fe(() => [
3673
- xe(ne(m.value ? "收起" : "展开") + " ", 1),
3682
+ default: ve(() => [
3683
+ Ce(le(m.value ? "收起" : "展开") + " ", 1),
3674
3684
  o("span", {
3675
- class: K(["query-encapsulation__toggle-icon", { "is-expanded": m.value }])
3685
+ class: z(["query-encapsulation__toggle-icon", { "is-expanded": m.value }])
3676
3686
  }, "▼", 2)
3677
3687
  ]),
3678
3688
  _: 1
3679
3689
  })
3680
- ])) : H("", !0),
3690
+ ])) : K("", !0),
3681
3691
  o("div", So, [
3682
3692
  o("div", Lo, [
3683
3693
  de(Ne, {
3684
3694
  variant: "primary",
3685
3695
  size: "small",
3686
- onClick: b,
3696
+ onClick: k,
3687
3697
  loading: e.loading
3688
3698
  }, {
3689
- default: fe(() => [...z[0] || (z[0] = [
3690
- xe(" 搜索 ", -1)
3699
+ default: ve(() => [...B[0] || (B[0] = [
3700
+ Ce(" 搜索 ", -1)
3691
3701
  ])]),
3692
3702
  _: 1
3693
3703
  }, 8, ["loading"]),
@@ -3697,12 +3707,12 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3697
3707
  onClick: V,
3698
3708
  loading: e.loading
3699
3709
  }, {
3700
- default: fe(() => [...z[1] || (z[1] = [
3701
- xe(" 重置 ", -1)
3710
+ default: ve(() => [...B[1] || (B[1] = [
3711
+ Ce(" 重置 ", -1)
3702
3712
  ])]),
3703
3713
  _: 1
3704
3714
  }, 8, ["loading"]),
3705
- ce(W.$slots, "extra-actions", {}, void 0, !0)
3715
+ ce(H.$slots, "extra-actions", {}, void 0, !0)
3706
3716
  ])
3707
3717
  ])
3708
3718
  ])
@@ -3710,7 +3720,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3710
3720
  ])
3711
3721
  ]));
3712
3722
  }
3713
- }), Io = /* @__PURE__ */ me(Mo, [["__scopeId", "data-v-61f05ecd"]]), Eo = {
3723
+ }), Io = /* @__PURE__ */ be(Mo, [["__scopeId", "data-v-61f05ecd"]]), Eo = {
3714
3724
  key: 0,
3715
3725
  width: "16",
3716
3726
  height: "16",
@@ -3728,7 +3738,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3728
3738
  height: "16",
3729
3739
  viewBox: "0 0 24 24",
3730
3740
  fill: "none"
3731
- }, Ko = ["textContent"], zo = /* @__PURE__ */ ge({
3741
+ }, zo = ["textContent"], Ko = /* @__PURE__ */ we({
3732
3742
  __name: "ymessageToast",
3733
3743
  props: {
3734
3744
  id: {},
@@ -3743,7 +3753,7 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3743
3753
  setup(e) {
3744
3754
  const $ = e, t = E(!1);
3745
3755
  let n;
3746
- $e(() => {
3756
+ De(() => {
3747
3757
  requestAnimationFrame(() => {
3748
3758
  t.value = !0, $.duration && $.duration > 0 && (n = window.setTimeout(() => m(), $.duration));
3749
3759
  });
@@ -3753,23 +3763,23 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3753
3763
  function m() {
3754
3764
  t.value = !1;
3755
3765
  }
3756
- function p() {
3757
- var y;
3758
- (y = $.onClose) == null || y.call($, $.id);
3766
+ function y() {
3767
+ var p;
3768
+ (p = $.onClose) == null || p.call($, $.id);
3759
3769
  }
3760
- return (y, L) => (i(), Se(be, {
3770
+ return (p, L) => (i(), Me($e, {
3761
3771
  name: "y-msg-fade",
3762
- onAfterLeave: p
3772
+ onAfterLeave: y
3763
3773
  }, {
3764
- default: fe(() => [
3774
+ default: ve(() => [
3765
3775
  Ee(o("div", {
3766
- class: K(["y-msg", [`y-msg--${e.type}`]]),
3767
- style: ue({ zIndex: e.zIndex }),
3776
+ class: z(["y-msg", [`y-msg--${e.type}`]]),
3777
+ style: ie({ zIndex: e.zIndex }),
3768
3778
  role: "status",
3769
3779
  "aria-live": "polite"
3770
3780
  }, [
3771
3781
  o("span", {
3772
- class: K(["y-msg__icon", `y-msg__icon--${e.type}`]),
3782
+ class: z(["y-msg__icon", `y-msg__icon--${e.type}`]),
3773
3783
  "aria-hidden": "true"
3774
3784
  }, [
3775
3785
  e.type === "success" ? (i(), u("svg", Eo, [...L[0] || (L[0] = [
@@ -3800,64 +3810,64 @@ const dt = ["type", "disabled", "aria-busy", "aria-disabled"], ft = { class: "co
3800
3810
  ], 2),
3801
3811
  o("div", {
3802
3812
  class: "y-msg__content",
3803
- textContent: ne(e.message)
3804
- }, null, 8, Ko),
3813
+ textContent: le(e.message)
3814
+ }, null, 8, zo),
3805
3815
  e.closable ? (i(), u("button", {
3806
3816
  key: 0,
3807
3817
  class: "y-msg__close",
3808
3818
  type: "button",
3809
3819
  onClick: m
3810
- }, "✕")) : H("", !0)
3820
+ }, "✕")) : K("", !0)
3811
3821
  ], 6), [
3812
- [ze, t.value]
3822
+ [Ke, t.value]
3813
3823
  ])
3814
3824
  ]),
3815
3825
  _: 1
3816
3826
  }));
3817
3827
  }
3818
- }), Ho = /* @__PURE__ */ me(zo, [["__scopeId", "data-v-c5dc221c"]]);
3819
- let Ro = 1;
3820
- const Ue = 12, _e = [];
3821
- function Vo() {
3828
+ }), Ho = /* @__PURE__ */ be(Ko, [["__scopeId", "data-v-c5dc221c"]]);
3829
+ let Ao = 1;
3830
+ const Ue = 12, Le = [];
3831
+ function Ro() {
3822
3832
  let e = 20;
3823
- return _e.forEach(($) => {
3833
+ return Le.forEach(($) => {
3824
3834
  e += $.height + Ue;
3825
3835
  }), e;
3826
3836
  }
3827
3837
  function Qe(e) {
3828
- const $ = _e.findIndex((p) => p.id === e);
3838
+ const $ = Le.findIndex((y) => y.id === e);
3829
3839
  if ($ === -1) return;
3830
- const { el: t } = _e[$], n = t.firstElementChild;
3840
+ const { el: t } = Le[$], n = t.firstElementChild;
3831
3841
  if (n) {
3832
- const p = window.getComputedStyle(n).top;
3833
- n.style.top = p, n.classList.add("is-leaving"), n.style.willChange = "opacity, transform";
3842
+ const y = window.getComputedStyle(n).top;
3843
+ n.style.top = y, n.classList.add("is-leaving"), n.style.willChange = "opacity, transform";
3834
3844
  }
3835
- _e[$].leaving = !0, je(), setTimeout(() => {
3845
+ Le[$].leaving = !0, je(), setTimeout(() => {
3836
3846
  Ge(null, t), t.parentNode && t.parentNode.removeChild(t);
3837
- const p = _e.findIndex((y) => y.id === e);
3838
- p !== -1 && _e.splice(p, 1), je();
3847
+ const y = Le.findIndex((p) => p.id === e);
3848
+ y !== -1 && Le.splice(y, 1), je();
3839
3849
  }, 260);
3840
3850
  }
3841
3851
  function qe(e) {
3842
- var p;
3843
- const $ = Ro++, t = document.createElement("div");
3852
+ var y;
3853
+ const $ = Ao++, t = document.createElement("div");
3844
3854
  document.body.appendChild(t);
3845
3855
  const n = de(Ho, {
3846
3856
  id: $,
3847
3857
  type: e.type || "success",
3848
3858
  message: e.message,
3849
3859
  duration: e.duration ?? 2500,
3850
- offset: Vo(),
3860
+ offset: Ro(),
3851
3861
  zIndex: 3e3 + $,
3852
3862
  closable: e.closable ?? !1,
3853
- onClose: (y) => Qe(y)
3863
+ onClose: (p) => Qe(p)
3854
3864
  });
3855
3865
  Ge(n, t);
3856
- const m = ((p = t.firstElementChild) == null ? void 0 : p.offsetHeight) || 0;
3857
- return _e.push({ id: $, el: t, vm: n, height: m, leaving: !1 }), je(), requestAnimationFrame(() => {
3858
- const y = t.firstElementChild;
3859
- if (!y) return;
3860
- const L = y.offsetHeight || m || 0, C = _e.find((I) => I.id === $);
3866
+ const m = ((y = t.firstElementChild) == null ? void 0 : y.offsetHeight) || 0;
3867
+ return Le.push({ id: $, el: t, vm: n, height: m, leaving: !1 }), je(), requestAnimationFrame(() => {
3868
+ const p = t.firstElementChild;
3869
+ if (!p) return;
3870
+ const L = p.offsetHeight || m || 0, C = Le.find((I) => I.id === $);
3861
3871
  C && (C.height = L, je());
3862
3872
  }), { close: () => Qe($) };
3863
3873
  }
@@ -3875,7 +3885,7 @@ const Oe = {
3875
3885
  typeof window < "u" && (window.YMessage = Oe, typeof globalThis.YMessage > "u" && (globalThis.YMessage = Oe));
3876
3886
  function je() {
3877
3887
  let e = 20;
3878
- _e.forEach(($) => {
3888
+ Le.forEach(($) => {
3879
3889
  const t = $.el.firstElementChild;
3880
3890
  if (!t) return;
3881
3891
  const n = e;