@lazycatcloud/lzc-toolkit 0.0.51 → 0.0.53

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.es.js CHANGED
@@ -1,106 +1,120 @@
1
- import { unref as y, getCurrentScope as Ce, onScopeDispose as Re, getCurrentInstance as Be, onMounted as te, nextTick as ne, ref as g, watch as $, shallowRef as Pe, computed as f, onUnmounted as ve, inject as T, provide as x, defineComponent as A, openBlock as I, createBlock as fe, Transition as pe, withCtx as he, createElementBlock as R, createElementVNode as H, withModifiers as $e, normalizeClass as Fe, renderSlot as oe, createCommentVNode as Ae, render as J, h as P, normalizeStyle as F, toDisplayString as Le, useSlots as De, withDirectives as We, vShow as Me, pushScopeId as ke, popScopeId as ze, toRef as Ve, mergeProps as je, normalizeProps as le, guardReactiveProps as se, Fragment as Ke, renderList as Ne } from "vue";
2
- var re;
3
- const L = typeof window < "u";
4
- L && ((re = window?.navigator) == null ? void 0 : re.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
5
- function X(t) {
6
- return typeof t == "function" ? t() : y(t);
1
+ import { unref as B, getCurrentScope as Ke, onScopeDispose as Qe, getCurrentInstance as Ue, onMounted as de, nextTick as fe, ref as w, watch as ne, shallowRef as qe, computed as S, onUnmounted as Oe, inject as F, provide as $, defineComponent as Z, h as Q, render as ae, openBlock as k, createBlock as De, Transition as Re, withCtx as Ce, createElementBlock as J, createElementVNode as M, withModifiers as Ye, normalizeClass as Ge, renderSlot as he, createCommentVNode as Xe, normalizeStyle as le, toDisplayString as Je, useSlots as Ze, withDirectives as et, vShow as tt, pushScopeId as nt, popScopeId as lt, toRef as ot, mergeProps as rt, normalizeProps as ge, guardReactiveProps as ye, Fragment as at, renderList as st } from "vue";
2
+ var be;
3
+ const Be = typeof window < "u";
4
+ Be && ((be = window?.navigator) == null ? void 0 : be.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
5
+ function se(t) {
6
+ return typeof t == "function" ? t() : B(t);
7
7
  }
8
- function Qe(t, e) {
9
- function n(...o) {
10
- t(() => e.apply(this, o), { fn: e, thisArg: this, args: o });
8
+ function Ie(t, e) {
9
+ function n(...l) {
10
+ t(() => e.apply(this, l), { fn: e, thisArg: this, args: l });
11
11
  }
12
12
  return n;
13
13
  }
14
- function Ue(t, e = {}) {
15
- let n, o;
16
- return (r) => {
17
- const l = X(t), c = X(e.maxWait);
18
- if (n && clearTimeout(n), l <= 0 || c !== void 0 && c <= 0)
19
- return o && (clearTimeout(o), o = null), r();
20
- c && !o && (o = setTimeout(() => {
21
- n && clearTimeout(n), o = null, r();
22
- }, c)), n = setTimeout(() => {
23
- o && clearTimeout(o), o = null, r();
24
- }, l);
14
+ function ut(t, e = {}) {
15
+ let n, l;
16
+ return (a) => {
17
+ const r = se(t), i = se(e.maxWait);
18
+ if (n && clearTimeout(n), r <= 0 || i !== void 0 && i <= 0)
19
+ return l && (clearTimeout(l), l = null), a();
20
+ i && !l && (l = setTimeout(() => {
21
+ n && clearTimeout(n), l = null, a();
22
+ }, i)), n = setTimeout(() => {
23
+ l && clearTimeout(l), l = null, a();
24
+ }, r);
25
25
  };
26
26
  }
27
- function qe(t) {
27
+ function it(t, e = !0, n = !0) {
28
+ let l = 0, o, a = !0;
29
+ const r = () => {
30
+ o && (clearTimeout(o), o = void 0);
31
+ };
32
+ return (m) => {
33
+ const p = se(t), d = Date.now() - l;
34
+ if (r(), p <= 0)
35
+ return l = Date.now(), m();
36
+ d > p && (n || !a) ? (l = Date.now(), m()) : e && (o = setTimeout(() => {
37
+ l = Date.now(), a = !0, r(), m();
38
+ }, p - d)), !n && !o && (o = setTimeout(() => a = !0, p)), a = !1;
39
+ };
40
+ }
41
+ function ct(t) {
28
42
  return t;
29
43
  }
30
- function Ye(t) {
31
- return Ce() ? (Re(t), !0) : !1;
44
+ function vt(t) {
45
+ return Ke() ? (Qe(t), !0) : !1;
32
46
  }
33
- function me(t, e = 200, n = {}) {
34
- return Qe(Ue(e, n), t);
47
+ function Le(t, e = 200, n = {}) {
48
+ return Ie(ut(e, n), t);
35
49
  }
36
- function Ge(t, e = !0) {
37
- Be() ? te(t) : e ? t() : ne(t);
50
+ function Se(t, e = 200, n = !1, l = !0) {
51
+ return Ie(it(e, n, l), t);
38
52
  }
39
- function ge(t) {
53
+ function dt(t, e = !0) {
54
+ Ue() ? de(t) : e ? t() : fe(t);
55
+ }
56
+ function He(t) {
40
57
  var e;
41
- const n = X(t);
58
+ const n = se(t);
42
59
  return (e = n?.$el) != null ? e : n;
43
60
  }
44
- const Je = L ? window : void 0;
45
- L && window.document;
46
- L && window.navigator;
47
- L && window.location;
48
- function Xe(t, e = !1) {
49
- const n = g(), o = () => n.value = Boolean(t());
50
- return o(), Ge(o, e), n;
61
+ const ft = Be ? window : void 0;
62
+ function ht(t, e = !1) {
63
+ const n = w(), l = () => n.value = Boolean(t());
64
+ return l(), dt(l, e), n;
51
65
  }
52
- const Z = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ee = "__vueuse_ssr_handlers__";
53
- Z[ee] = Z[ee] || {};
54
- Z[ee];
55
- var ae = Object.getOwnPropertySymbols, Ze = Object.prototype.hasOwnProperty, et = Object.prototype.propertyIsEnumerable, tt = (t, e) => {
66
+ const ce = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ve = "__vueuse_ssr_handlers__";
67
+ ce[ve] = ce[ve] || {};
68
+ ce[ve];
69
+ var Ee = Object.getOwnPropertySymbols, pt = Object.prototype.hasOwnProperty, mt = Object.prototype.propertyIsEnumerable, gt = (t, e) => {
56
70
  var n = {};
57
- for (var o in t)
58
- Ze.call(t, o) && e.indexOf(o) < 0 && (n[o] = t[o]);
59
- if (t != null && ae)
60
- for (var o of ae(t))
61
- e.indexOf(o) < 0 && et.call(t, o) && (n[o] = t[o]);
71
+ for (var l in t)
72
+ pt.call(t, l) && e.indexOf(l) < 0 && (n[l] = t[l]);
73
+ if (t != null && Ee)
74
+ for (var l of Ee(t))
75
+ e.indexOf(l) < 0 && mt.call(t, l) && (n[l] = t[l]);
62
76
  return n;
63
77
  };
64
- function nt(t, e, n = {}) {
65
- const o = n, { window: s = Je } = o, r = tt(o, ["window"]);
66
- let l;
67
- const c = Xe(() => s && "ResizeObserver" in s), m = () => {
68
- l && (l.disconnect(), l = void 0);
69
- }, p = $(() => ge(t), (h) => {
70
- m(), c.value && s && h && (l = new ResizeObserver(e), l.observe(h, r));
71
- }, { immediate: !0, flush: "post" }), v = () => {
78
+ function yt(t, e, n = {}) {
79
+ const l = n, { window: o = ft } = l, a = gt(l, ["window"]);
80
+ let r;
81
+ const i = ht(() => o && "ResizeObserver" in o), m = () => {
82
+ r && (r.disconnect(), r = void 0);
83
+ }, p = ne(() => He(t), (c) => {
84
+ m(), i.value && o && c && (r = new ResizeObserver(e), r.observe(c, a));
85
+ }, { immediate: !0, flush: "post" }), d = () => {
72
86
  m(), p();
73
87
  };
74
- return Ye(v), {
75
- isSupported: c,
76
- stop: v
88
+ return vt(d), {
89
+ isSupported: i,
90
+ stop: d
77
91
  };
78
92
  }
79
- function ot(t, e = { width: 0, height: 0 }, n = {}) {
80
- const { box: o = "content-box" } = n, s = g(e.width), r = g(e.height);
81
- return nt(t, ([l]) => {
82
- const c = o === "border-box" ? l.borderBoxSize : o === "content-box" ? l.contentBoxSize : l.devicePixelContentBoxSize;
83
- c ? (s.value = c.reduce((m, { inlineSize: p }) => m + p, 0), r.value = c.reduce((m, { blockSize: p }) => m + p, 0)) : (s.value = l.contentRect.width, r.value = l.contentRect.height);
84
- }, n), $(() => ge(t), (l) => {
85
- s.value = l ? e.width : 0, r.value = l ? e.height : 0;
93
+ function bt(t, e = { width: 0, height: 0 }, n = {}) {
94
+ const { box: l = "content-box" } = n, o = w(e.width), a = w(e.height);
95
+ return yt(t, ([r]) => {
96
+ const i = l === "border-box" ? r.borderBoxSize : l === "content-box" ? r.contentBoxSize : r.devicePixelContentBoxSize;
97
+ i ? (o.value = i.reduce((m, { inlineSize: p }) => m + p, 0), a.value = i.reduce((m, { blockSize: p }) => m + p, 0)) : (o.value = r.contentRect.width, a.value = r.contentRect.height);
98
+ }, n), ne(() => He(t), (r) => {
99
+ o.value = r ? e.width : 0, a.value = r ? e.height : 0;
86
100
  }), {
87
- width: s,
88
- height: r
101
+ width: o,
102
+ height: a
89
103
  };
90
104
  }
91
- var ie;
105
+ var we;
92
106
  (function(t) {
93
107
  t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
94
- })(ie || (ie = {}));
95
- var lt = Object.defineProperty, ue = Object.getOwnPropertySymbols, st = Object.prototype.hasOwnProperty, rt = Object.prototype.propertyIsEnumerable, ce = (t, e, n) => e in t ? lt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, at = (t, e) => {
108
+ })(we || (we = {}));
109
+ var St = Object.defineProperty, _e = Object.getOwnPropertySymbols, Et = Object.prototype.hasOwnProperty, wt = Object.prototype.propertyIsEnumerable, xe = (t, e, n) => e in t ? St(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, _t = (t, e) => {
96
110
  for (var n in e || (e = {}))
97
- st.call(e, n) && ce(t, n, e[n]);
98
- if (ue)
99
- for (var n of ue(e))
100
- rt.call(e, n) && ce(t, n, e[n]);
111
+ Et.call(e, n) && xe(t, n, e[n]);
112
+ if (_e)
113
+ for (var n of _e(e))
114
+ wt.call(e, n) && xe(t, n, e[n]);
101
115
  return t;
102
116
  };
103
- const it = {
117
+ const xt = {
104
118
  easeInSine: [0.12, 0, 0.39, 0],
105
119
  easeOutSine: [0.61, 1, 0.88, 1],
106
120
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -126,183 +140,415 @@ const it = {
126
140
  easeOutBack: [0.34, 1.56, 0.64, 1],
127
141
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
128
142
  };
129
- at({
130
- linear: qe
131
- }, it);
132
- function ut(t, e) {
133
- const { scrollEndHook: n, itemHeight: o, overscan: s = 5 } = e, r = g(null), l = ot(r), c = g(!0), m = me(Q, 100);
143
+ _t({
144
+ linear: ct
145
+ }, xt);
146
+ function Tt(t, e) {
147
+ const { scrollEndHook: n, itemHeight: l, overscan: o = 5 } = e, a = w(null), r = bt(a), i = w(!0), m = Le(ee, 100);
134
148
  let p;
135
- const v = Pe(t), h = g(0), i = g({ start: 0, end: 10 });
149
+ const d = qe(t), c = w(0), s = w({ start: 0, end: 10 });
136
150
  let u = 0;
137
- const E = g([]), b = f(() => {
138
- let { sum: a, height: d } = { sum: 0, height: 0 };
139
- return v.value.map((w, _) => (typeof o == "number" ? d = o : d = o(_), a += d, { height: d, sum: a }));
140
- }), N = f(() => V(i.value.start)), C = f(() => typeof o == "number" ? b.value.length * o : b.value[b.value.length - 1]?.sum || 0), D = f(() => {
141
- let a = E.value.length - s, d = Math.max(a - u, 0);
142
- return E.value.slice(d, a);
151
+ const b = w([]), _ = S(() => {
152
+ let { sum: f, height: y } = { sum: 0, height: 0 };
153
+ return d.value.map((I, C) => (typeof l == "number" ? y = l : y = l(C), f += y, { height: y, sum: f }));
154
+ }), E = S(() => V(s.value.start)), g = S(() => typeof l == "number" ? _.value.length * l : _.value[_.value.length - 1]?.sum || 0), D = S(() => {
155
+ let f = b.value.length - o, y = Math.max(f - u, 0);
156
+ return b.value.slice(y, f);
143
157
  });
144
- te(() => {
145
- }), ve(() => cancelAnimationFrame(p)), $(
146
- [l.width, l.height, v],
147
- ([a, d]) => {
148
- (a || d) && M();
158
+ de(() => {
159
+ }), Oe(() => cancelAnimationFrame(p)), ne(
160
+ [r.width, r.height, d],
161
+ ([f, y]) => {
162
+ (f || y) && U();
149
163
  },
150
164
  { deep: !0 }
151
- ), $(h, () => {
152
- W(), m();
165
+ ), ne(c, () => {
166
+ L(), m();
153
167
  });
154
- function W() {
155
- c.value = !1;
168
+ function L() {
169
+ i.value = !1;
156
170
  }
157
- function Q() {
158
- c.value = !0, n?.();
171
+ function ee() {
172
+ i.value = !0, n?.();
159
173
  }
160
- function M() {
161
- cancelAnimationFrame(p), p = requestAnimationFrame(k);
162
- }
163
- function k() {
164
- if (r.value) {
165
- h.value = r.value.scrollTop, u = B();
166
- let a = z(h.value), d = a + u + s;
167
- a = a - s, a = a < 0 ? 0 : a, d = d > v.value.length ? v.value.length : d, i.value = { start: a, end: d }, E.value = v.value.slice(a, d).map((w, _) => ({
168
- data: w,
169
- index: _ + a
174
+ function U() {
175
+ cancelAnimationFrame(p), p = requestAnimationFrame(N);
176
+ }
177
+ function N() {
178
+ if (a.value) {
179
+ c.value = a.value.scrollTop, u = W();
180
+ let f = A(c.value), y = f + u + o;
181
+ f = f - o, f = f < 0 ? 0 : f, y = y > d.value.length ? d.value.length : y, s.value = { start: f, end: y }, b.value = d.value.slice(f, y).map((I, C) => ({
182
+ data: I,
183
+ index: C + f
170
184
  }));
171
185
  }
172
186
  }
173
- function z(a) {
174
- let d = 0, w = b.value.length - 1, _ = -1;
175
- for (; d <= w; ) {
176
- const S = Math.floor((d + w) / 2);
177
- b.value[S].sum >= a ? (_ = S, w = S - 1) : d = S + 1;
187
+ function A(f) {
188
+ let y = 0, I = _.value.length - 1, C = -1;
189
+ for (; y <= I; ) {
190
+ const O = Math.floor((y + I) / 2);
191
+ _.value[O].sum >= f ? (C = O, I = O - 1) : y = O + 1;
178
192
  }
179
- return Math.max(0, _);
193
+ return Math.max(0, C);
180
194
  }
181
- function B() {
182
- let a = 0, d = 0, w = U();
183
- for (let _ = w; _ < b.value.length && (a++, d += b.value[_].height, !(d >= l.height.value)); _++)
195
+ function W() {
196
+ let f = 0, y = 0, I = H();
197
+ for (let C = I; C < _.value.length && (f++, y += _.value[C].height, !(y >= r.height.value)); C++)
184
198
  ;
185
- return a;
199
+ return f;
186
200
  }
187
- function V(a) {
188
- if (typeof o == "number")
189
- return a * o;
190
- let d = b.value[a];
191
- return d ? d.sum - d.height : 0;
201
+ function V(f) {
202
+ if (typeof l == "number")
203
+ return f * l;
204
+ let y = _.value[f];
205
+ return y ? y.sum - y.height : 0;
192
206
  }
193
- function j(a) {
194
- return b.value[a] || { sum: 0, height: 0 };
207
+ function j(f) {
208
+ return _.value[f] || { sum: 0, height: 0 };
195
209
  }
196
- function U() {
197
- let a = i.value.start;
198
- return a >= s && (a += s), a;
210
+ function H() {
211
+ let f = s.value.start;
212
+ return f >= o && (f += o), f;
199
213
  }
200
- function q(a) {
201
- if (r.value) {
202
- const d = j(a);
203
- r.value.scrollTop = d.sum - d.height, k();
214
+ function q(f) {
215
+ if (a.value) {
216
+ const y = j(f);
217
+ a.value.scrollTop = y.sum - y.height, N();
204
218
  }
205
219
  }
206
- const Y = f(() => ({
220
+ const te = S(() => ({
207
221
  style: {
208
222
  width: "100%",
209
- height: `${C.value}px`,
210
- pointerEvents: c.value ? void 0 : "none"
223
+ height: `${g.value}px`,
224
+ pointerEvents: i.value ? void 0 : "none"
211
225
  }
212
- })), K = f(() => ({
226
+ })), K = S(() => ({
213
227
  style: {
214
- transform: `translate3d(0, ${N.value}px, 0)`,
228
+ transform: `translate3d(0, ${E.value}px, 0)`,
215
229
  "will-change": "transform"
216
230
  }
217
- })), G = {
231
+ })), Y = {
218
232
  overflowY: "auto"
219
233
  };
220
234
  return {
221
- list: E,
235
+ list: b,
222
236
  visiableList: D,
223
237
  getItemHeightData: j,
224
- getoffsetTopIndex: z,
225
- totalHeight: C,
226
- clientHeight: l.height,
238
+ getoffsetTopIndex: A,
239
+ totalHeight: g,
240
+ clientHeight: r.height,
227
241
  scrollTo: q,
228
- scrollTop: h,
229
- isScrollEnd: c,
242
+ scrollTop: c,
243
+ isScrollEnd: i,
230
244
  containerProps: {
231
- ref: r,
245
+ ref: a,
232
246
  onScroll: () => {
233
- M();
247
+ U();
234
248
  },
235
- style: G
249
+ style: Y
236
250
  },
237
- wrapperProps: Y,
251
+ wrapperProps: te,
238
252
  innerProps: K
239
253
  };
240
254
  }
241
- const be = Symbol(), ye = Symbol(), _e = Symbol(), Se = Symbol(), we = Symbol(), Oe = Symbol(), xe = Symbol(), Ee = Symbol(), Te = Symbol();
242
- function wt() {
243
- const { voidFn: t, boolFn: e, boolRef: n, arrayRef: o } = {
255
+ const $e = Symbol(), Ae = Symbol(), Pe = Symbol(), Fe = Symbol(), Me = Symbol(), We = Symbol(), ze = Symbol(), ke = Symbol(), Ne = Symbol();
256
+ function Wt() {
257
+ const { voidFn: t, boolFn: e, boolRef: n, arrayRef: l } = {
244
258
  voidFn: (u) => {
245
259
  },
246
260
  boolFn: (u) => !1,
247
- boolRef: f(() => !1),
248
- arrayRef: f(() => [])
249
- }, s = T(Se, o), r = T(_e, e), l = T(Ee, n), c = T(ye, t), m = T(be, t), p = T(we, t), v = T(Oe, t), h = T(xe, t), i = T(Te, t);
261
+ boolRef: S(() => !1),
262
+ arrayRef: S(() => [])
263
+ }, o = F(Fe, l), a = F(Pe, e), r = F(ke, n), i = F(Ae, t), m = F($e, t), p = F(Me, t), d = F(We, t), c = F(ze, t), s = F(Ne, t);
250
264
  return {
251
- selected: s,
252
- isSelected: r,
253
- isAllSelected: l,
254
- toggle: c,
265
+ selected: o,
266
+ isSelected: a,
267
+ isAllSelected: r,
268
+ toggle: i,
255
269
  toggleAll: m,
256
270
  select: p,
257
- selectAll: v,
258
- unselect: h,
259
- unselectAll: i
271
+ selectAll: d,
272
+ unselect: c,
273
+ unselectAll: s
260
274
  };
261
275
  }
262
- function Ot(t, e) {
263
- const n = g({}), o = f(() => t.value.filter((i) => n.value[i[e]])), s = f(() => o.value.length != 0 && Object.keys(n.value).length == t.value.length);
264
- function r() {
265
- t.value.forEach((i) => {
266
- n.value[i[e]] = !0;
276
+ function zt(t, e) {
277
+ const n = w({}), l = S(() => t.value.filter((s) => n.value[s[e]])), o = S(() => l.value.length != 0 && Object.keys(n.value).length == t.value.length);
278
+ function a() {
279
+ t.value.forEach((s) => {
280
+ n.value[s[e]] = !0;
267
281
  });
268
282
  }
269
- function l() {
283
+ function r() {
270
284
  n.value = {};
271
285
  }
272
- function c(i) {
273
- i.forEach((u) => {
286
+ function i(s) {
287
+ s.forEach((u) => {
274
288
  n.value[u[e]] || (n.value[u[e]] = !0);
275
289
  });
276
290
  }
277
- function m(i) {
278
- i.forEach((u) => {
291
+ function m(s) {
292
+ s.forEach((u) => {
279
293
  n.value[u[e]] && delete n.value[u[e]];
280
294
  });
281
295
  }
282
- function p(i) {
283
- return !!n.value[i[e]];
296
+ function p(s) {
297
+ return !!n.value[s[e]];
284
298
  }
285
- function v(i) {
286
- i.forEach((u) => {
299
+ function d(s) {
300
+ s.forEach((u) => {
287
301
  p(u) ? delete n.value[u[e]] : n.value[u[e]] = !0;
288
302
  });
289
303
  }
290
- function h() {
291
- s.value ? l() : r();
304
+ function c() {
305
+ o.value ? r() : a();
292
306
  }
293
- return x(be, h), x(ye, v), x(_e, p), x(Se, o), x(we, c), x(Oe, r), x(xe, m), x(Ee, s), x(Te, l), {
294
- selected: o,
295
- select: c,
296
- selectAll: r,
307
+ return $($e, c), $(Ae, d), $(Pe, p), $(Fe, l), $(Me, i), $(We, a), $(ze, m), $(ke, o), $(Ne, r), {
308
+ selected: l,
309
+ select: i,
310
+ selectAll: a,
297
311
  unselect: m,
298
- unselectAll: l,
299
- toggle: v,
300
- toggleAll: h,
312
+ unselectAll: r,
313
+ toggle: d,
314
+ toggleAll: c,
301
315
  isSelected: p,
302
- isAllSelected: s
316
+ isAllSelected: o
317
+ };
318
+ }
319
+ function ie(t) {
320
+ return () => {
321
+ console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`);
322
+ };
323
+ }
324
+ function Ve({
325
+ attribute: t,
326
+ selectWay: e = "colum",
327
+ scrollOptions: n = {},
328
+ getSelectMap: l = () => ({})
329
+ }) {
330
+ const {
331
+ select: o = ie("\u9009\u62E9"),
332
+ unselect: a = ie("\u53D6\u6D88\u9009\u62E9"),
333
+ unselectAll: r = ie("\u53D6\u6D88\u5168\u9009")
334
+ } = l();
335
+ let i = {};
336
+ const m = S(
337
+ () => Se(e === "colum" ? z : oe, 50)
338
+ ), p = /* @__PURE__ */ new Set(), d = w(!0), c = w(), s = w(!1), u = w({ x: 0, y: 0 }), b = w({ x: 0, y: 0, scrollTop: 0 }), _ = new ResizeObserver(
339
+ (v) => E.value = v[0].target.getBoundingClientRect()
340
+ ), E = w({}), g = w({
341
+ top: 0,
342
+ height: 0,
343
+ sync(v = !1) {
344
+ g.value.top = c.value?.scrollTop || 0, v && (g.value.height = c.value?.scrollHeight || 0);
345
+ }
346
+ }), D = S(() => s.value ? {
347
+ left: Math.min(u.value.x, b.value.x) - E.value.left,
348
+ top: Math.min(u.value.y, b.value.y) - E.value.top,
349
+ width: Math.abs(u.value.x - b.value.x),
350
+ height: Math.abs(u.value.y - b.value.y)
351
+ } : { left: 0, top: 0, width: 0, height: 0 }), { margin: L = 50, startSpeed: ee = 30, maxSpeed: U = 30 } = n;
352
+ let N;
353
+ const A = L, W = ee, V = U, j = (v) => v ** 1;
354
+ let H = 0;
355
+ function q(v) {
356
+ if (cancelAnimationFrame(N), H = te(v), H = Math.max(
357
+ Math.min(H, V),
358
+ -V
359
+ ), H !== 0) {
360
+ const h = c.value;
361
+ if (!h || !s.value)
362
+ return;
363
+ const R = g.value.height - E.value.height;
364
+ let x = g.value.top + Number(H);
365
+ x = Math.min(Math.max(0, x), R), h.scrollTop = x, Y(), N = requestAnimationFrame(() => q(v));
366
+ }
367
+ }
368
+ function te(v) {
369
+ if (c.value) {
370
+ const R = E.value, x = R.bottom - v;
371
+ if (x < A)
372
+ return W * j(1 - x / A);
373
+ const P = v - R.top;
374
+ if (P < A)
375
+ return -W * j(1 - P / A);
376
+ }
377
+ return 0;
378
+ }
379
+ function K(v) {
380
+ const h = { ...D.value, right: 0, bottom: 0 };
381
+ return h.left += E.value.left, h.top += E.value.top - g.value.top, h.right = h.width + h.left, h.bottom = h.height + h.top, h.left < v.right && h.right > v.left && h.top < v.bottom && h.bottom > v.top;
382
+ }
383
+ function Y() {
384
+ g.value.sync();
385
+ const { top: v, height: h } = g.value;
386
+ b.value.y = Math.min(
387
+ h + E.value.top,
388
+ b.value.y + v - b.value.scrollTop
389
+ ), b.value.scrollTop = v;
390
+ }
391
+ function f(v, h, R = "dynamic-styles") {
392
+ let x = document.getElementById(R);
393
+ x || (x = document.createElement("style"), x.id = R, document.head.appendChild(x));
394
+ const P = x.sheet.cssRules, X = P.length, je = `${v} { ${h} }`;
395
+ for (let ue = 0; ue < X; ue++) {
396
+ const me = P[ue];
397
+ if (me.selectorText === v && me.style.cssText === h)
398
+ return;
399
+ }
400
+ x.sheet.insertRule(je, X);
401
+ }
402
+ function y(v, h) {
403
+ d.value = !0, s.value = !0, g.value.height ? g.value.sync() : g.value.sync(!0), u.value.x = v, u.value.y = h + g.value.top, b.value.x = u.value.x, b.value.y = u.value.y, c.value?.classList.add("disable-scroll-behavior"), p.clear();
404
+ }
405
+ function I(v, h, R) {
406
+ !s.value || (d.value && e === "colum" && !T() && (r(), d.value = !1), R?.(), q(h), b.value.x = Math.max(v, E.value.left), b.value.y = Math.min(
407
+ h + g.value.top,
408
+ g.value.height + E.value.top
409
+ ), b.value.scrollTop = g.value.top, m.value());
410
+ }
411
+ function C() {
412
+ s.value = !1, c.value?.classList.remove("disable-scroll-behavior");
413
+ }
414
+ function O() {
415
+ !s.value || (H || Y(), m.value());
416
+ }
417
+ function T() {
418
+ if (!s.value)
419
+ return !1;
420
+ const { width: v, height: h } = D.value;
421
+ return !(Math.max(v, h) > 5);
422
+ }
423
+ function G() {
424
+ T() && r();
425
+ }
426
+ function z() {
427
+ T() || c.value?.querySelectorAll(`[${t}]`).forEach((v) => {
428
+ i[`${t}`] = v.getAttribute(`${t}`), K(v.getBoundingClientRect()) ? o([i]) : a([i]);
429
+ });
430
+ }
431
+ function oe() {
432
+ const v = [];
433
+ let h = null, R = 0;
434
+ c.value?.querySelectorAll(`[${t}]`).forEach((x, P) => {
435
+ const X = x.getAttribute(`${t}`);
436
+ v.push(X), K(x.getBoundingClientRect()) ? (h === null && (h = P), h = Math.min(h, P), R = Math.max(R, P)) : (i[`${t}`] = X, p.has(X) && a([i]));
437
+ });
438
+ for (let x = h; x < R + 1; x++)
439
+ i[`${t}`] = v[x], o([i]), p.add(v[x]);
440
+ }
441
+ function re(v) {
442
+ return !v?.value || (c.value = v.value, !c?.value) ? !1 : (_.observe(c.value), f(
443
+ ".disable-scroll-behavior",
444
+ "scroll-behavior: unset !important;"
445
+ ), !0);
446
+ }
447
+ return {
448
+ init: re,
449
+ dragStart: y,
450
+ dragMove: I,
451
+ dragEnd: C,
452
+ onScroll: O,
453
+ isSingleClick: T,
454
+ cancelSelectAllBySingleClick: G,
455
+ selectFn: m,
456
+ selectRange: D,
457
+ isPressing: s,
458
+ containerEl: c,
459
+ observer: _
303
460
  };
304
461
  }
305
- const ct = Symbol(), dt = /* @__PURE__ */ A({
462
+ function kt(t) {
463
+ const e = Ve(t), { observer: n, selectRange: l } = e, {
464
+ onScroll: o,
465
+ dragStart: a,
466
+ dragMove: r,
467
+ dragEnd: i,
468
+ cancelSelectAllBySingleClick: m
469
+ } = e, p = S(() => ({
470
+ left: `${l.value.left}px`,
471
+ top: `${l.value.top}px`,
472
+ width: `${l.value.width}px`,
473
+ height: `${l.value.height}px`
474
+ })), d = Z({
475
+ render() {
476
+ return Q("div", {
477
+ id: "selectBoxEl",
478
+ class: "absolute z-50 bg-blue-200 opacity-50",
479
+ style: p.value
480
+ });
481
+ }
482
+ });
483
+ function c(E) {
484
+ E.button === 0 && a(E.x, E.y);
485
+ }
486
+ function s(E) {
487
+ r(E.x, E.y);
488
+ }
489
+ function u(E) {
490
+ E.composedPath().some((D) => D?.getAttribute?.(t.attribute)) || m(), i();
491
+ }
492
+ function b(E) {
493
+ try {
494
+ if (!e.init(E))
495
+ throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
496
+ if (!e.containerEl?.value)
497
+ return !1;
498
+ ae(Q(d), e.containerEl.value), e.containerEl.value?.addEventListener("scroll", o), e.containerEl.value?.addEventListener("mousedown", c), window.addEventListener("mousemove", s), window.addEventListener("mouseup", u);
499
+ } catch (g) {
500
+ console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", g);
501
+ }
502
+ }
503
+ function _() {
504
+ n.disconnect(), e.containerEl.value?.removeEventListener("scroll", o), e.containerEl.value?.removeEventListener("mousedown", c), window.removeEventListener("mousemove", s), window.removeEventListener("mouseup", u);
505
+ }
506
+ return { init: b, unMount: _ };
507
+ }
508
+ function Nt(t, e, n = 600) {
509
+ const l = Ve({
510
+ ...t,
511
+ selectWay: "row",
512
+ scrollOptions: {
513
+ startSpeed: 5,
514
+ maxSpeed: 5
515
+ }
516
+ }), { observer: o } = l, { onScroll: a, dragStart: r, dragMove: i, dragEnd: m, selectFn: p } = l;
517
+ let d;
518
+ function c() {
519
+ clearTimeout(d);
520
+ }
521
+ function s(g) {
522
+ c(), d = setTimeout(() => {
523
+ const { clientX: D, clientY: L } = g.targetTouches[0];
524
+ r(D, L), e?.(), p.value(), g.preventDefault();
525
+ }, n);
526
+ }
527
+ function u(g) {
528
+ c();
529
+ const { clientX: D, clientY: L } = g.targetTouches[0];
530
+ i(D, L, () => g.preventDefault());
531
+ }
532
+ function b() {
533
+ c(), m();
534
+ }
535
+ function _(g) {
536
+ try {
537
+ if (!l.init(g))
538
+ throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
539
+ if (!l.containerEl?.value)
540
+ return !1;
541
+ l.containerEl.value?.addEventListener("scroll", a), l.containerEl.value?.addEventListener("touchstart", s), l.containerEl.value?.addEventListener("touchmove", u), window.addEventListener("touchcancel", b), window.addEventListener("touchend", b);
542
+ } catch (D) {
543
+ console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", D);
544
+ }
545
+ }
546
+ function E() {
547
+ o.disconnect(), l.containerEl.value?.removeEventListener("scroll", a), l.containerEl.value?.removeEventListener("touchstart", s), l.containerEl.value?.removeEventListener("touchmove", u), window.removeEventListener("touchcancel", b), window.removeEventListener("touchEnd", b);
548
+ }
549
+ return { init: _, unMount: E };
550
+ }
551
+ const Ot = Symbol(), Dt = /* @__PURE__ */ Z({
306
552
  __name: "Dialog",
307
553
  props: {
308
554
  visiable: { type: Boolean, default: !1 },
@@ -311,64 +557,70 @@ const ct = Symbol(), dt = /* @__PURE__ */ A({
311
557
  },
312
558
  emits: ["update:visiable"],
313
559
  setup(t, { emit: e }) {
314
- const n = t, o = () => {
560
+ const n = t, l = () => {
315
561
  n.closeOnClickOverlay && e("update:visiable", !1);
316
562
  };
317
- return x(ct, () => e("update:visiable", !1)), (s, r) => (I(), fe(pe, { name: "modal" }, {
318
- default: he(() => [
319
- t.visiable ? (I(), R("div", {
563
+ return $(Ot, () => e("update:visiable", !1)), (o, a) => (k(), De(Re, { name: "modal" }, {
564
+ default: Ce(() => [
565
+ t.visiable ? (k(), J("div", {
320
566
  key: 0,
321
- onClick: o,
322
- class: "modal absolute inset-0 bottom-0 flex bg-stone-900 bg-opacity-50 z-[999]"
567
+ onClick: l,
568
+ class: "modal"
323
569
  }, [
324
- H("div", {
325
- onClick: r[0] || (r[0] = $e(() => {
570
+ M("div", {
571
+ onClick: a[0] || (a[0] = Ye(() => {
326
572
  }, ["stop"])),
327
- class: Fe(["dialog m-auto flex flex-col", t.dialogClass])
573
+ class: Ge(["dialog", t.dialogClass])
328
574
  }, [
329
- oe(s.$slots, "default")
575
+ he(o.$slots, "default", {}, void 0, !0)
330
576
  ], 2)
331
- ])) : Ae("", !0)
577
+ ])) : Xe("", !0)
332
578
  ]),
333
579
  _: 3
334
580
  }));
335
581
  }
336
582
  });
337
- function xt(t) {
338
- function e(n, o) {
339
- const s = document.createElement("div"), r = {
583
+ const pe = (t, e) => {
584
+ const n = t.__vccOpts || t;
585
+ for (const [l, o] of e)
586
+ n[l] = o;
587
+ return n;
588
+ }, Rt = /* @__PURE__ */ pe(Dt, [["__scopeId", "data-v-415900d3"]]);
589
+ function Vt(t) {
590
+ function e(n, l) {
591
+ const o = document.createElement("div"), a = {
340
592
  setup() {
341
- return () => P(
342
- dt,
593
+ return () => Q(
594
+ Rt,
343
595
  {
344
596
  visiable: !0,
345
597
  "onUpdate:visiable": () => {
346
- s?.remove();
598
+ o?.remove();
347
599
  },
348
600
  ...t
349
601
  },
350
602
  {
351
- default: () => P(n, o)
603
+ default: () => Q(n, l)
352
604
  }
353
605
  );
354
606
  }
355
607
  };
356
- return document.body.appendChild(s), J(P(r), s), {
357
- close: () => s?.remove()
608
+ return document.body.appendChild(o), ae(Q(a), o), {
609
+ close: () => o?.remove()
358
610
  };
359
611
  }
360
612
  return {
361
613
  create: e
362
614
  };
363
615
  }
364
- const vt = /* @__PURE__ */ A({
616
+ const Ct = /* @__PURE__ */ Z({
365
617
  __name: "Toast",
366
618
  props: {
367
619
  message: null,
368
620
  position: null
369
621
  },
370
622
  setup(t) {
371
- const e = t, n = g(), o = g(), s = g(), r = f(() => {
623
+ const e = t, n = w(), l = w(), o = w(), a = S(() => {
372
624
  switch (e.position) {
373
625
  case "top":
374
626
  return 10;
@@ -377,14 +629,14 @@ const vt = /* @__PURE__ */ A({
377
629
  case "bottom":
378
630
  return 85;
379
631
  }
380
- }), l = f(() => ({
632
+ }), r = S(() => ({
381
633
  position: "absolute",
382
634
  borderRadius: "10px",
383
635
  backgroundColor: "rgba(0, 0, 0, 0.8)",
384
636
  padding: "14px 19px",
385
- top: `calc(${r.value}% - ${s.value}px)`,
386
- left: `calc(50% - ${o.value}px)`
387
- })), c = f(() => ({
637
+ top: `calc(${a.value}% - ${o.value}px)`,
638
+ left: `calc(50% - ${l.value}px)`
639
+ })), i = S(() => ({
388
640
  width: "fit-content",
389
641
  display: "flex",
390
642
  justifyContent: "center",
@@ -392,48 +644,48 @@ const vt = /* @__PURE__ */ A({
392
644
  color: "white",
393
645
  fontSize: "14px"
394
646
  }));
395
- return ne(() => {
396
- o.value = n.value.offsetWidth / 2, s.value = n.value.offsetHeight / 2;
397
- }), (m, p) => (I(), R("div", {
647
+ return fe(() => {
648
+ l.value = n.value.offsetWidth / 2, o.value = n.value.offsetHeight / 2;
649
+ }), (m, p) => (k(), J("div", {
398
650
  id: "toastWrapper",
399
651
  ref_key: "toastWrapper",
400
652
  ref: n,
401
653
  class: "toastWrapper",
402
- style: F([y(l), { zIndex: 9999 }])
654
+ style: le([B(r), { zIndex: 9999 }])
403
655
  }, [
404
- H("div", {
405
- style: F(y(c))
656
+ M("div", {
657
+ style: le(B(i))
406
658
  }, [
407
- H("span", null, Le(t.message), 1)
659
+ M("span", null, Je(t.message), 1)
408
660
  ], 4)
409
661
  ], 4));
410
662
  }
411
- }), de = {
663
+ }), Te = {
412
664
  message: "\u61D2\u732B\u4E91 Yes!!!",
413
665
  position: "middle",
414
666
  duration: 1500
415
667
  };
416
- class Et {
668
+ class jt {
417
669
  options;
418
670
  container;
419
671
  constructor(e) {
420
672
  this.options = e, this.container = document.createElement("div");
421
673
  }
422
674
  present() {
423
- const e = P(P(vt), { ...de, ...this.options });
424
- J(e, this.container), document.body.insertBefore(this.container, document.body.firstChild);
425
- const n = this.options.duration || de.duration;
675
+ const e = Q(Q(Ct), { ...Te, ...this.options });
676
+ ae(e, this.container), document.body.insertBefore(this.container, document.body.firstChild);
677
+ const n = this.options.duration || Te.duration;
426
678
  setTimeout(() => {
427
679
  this.dismiss();
428
680
  }, n);
429
681
  }
430
682
  dismiss() {
431
683
  this.container && (this.container.querySelector("#toastWrapper")?.classList.add("animate-toastAnimation"), setTimeout(() => {
432
- this.container && (J(null, this.container), document.body.removeChild(this.container));
684
+ this.container && (ae(null, this.container), document.body.removeChild(this.container));
433
685
  }, 500));
434
686
  }
435
687
  }
436
- const ft = ["xlink:href", "fill", "color"], Tt = /* @__PURE__ */ A({
688
+ const Bt = ["xlink:href", "fill", "color"], Kt = /* @__PURE__ */ Z({
437
689
  __name: "SvgIcon",
438
690
  props: {
439
691
  name: null,
@@ -443,127 +695,132 @@ const ft = ["xlink:href", "fill", "color"], Tt = /* @__PURE__ */ A({
443
695
  height: null
444
696
  },
445
697
  setup(t) {
446
- const e = t, n = f(() => `#${e.prefix}-${e.name}`), o = f(() => ({
698
+ const e = t, n = S(() => `#${e.prefix}-${e.name}`), l = S(() => ({
447
699
  width: `${e.width ?? e.height}px`,
448
700
  height: `${e.height ?? e.width}px`,
449
701
  aspectRatio: e.width && e.height ? void 0 : "1/1"
450
702
  }));
451
- return (s, r) => (I(), R("svg", {
703
+ return (o, a) => (k(), J("svg", {
452
704
  "aria-hidden": "",
453
- style: F(y(o))
705
+ style: le(B(l))
454
706
  }, [
455
- H("use", {
456
- "xlink:href": y(n),
707
+ M("use", {
708
+ "xlink:href": B(n),
457
709
  fill: t.color,
458
710
  color: t.color
459
- }, null, 8, ft)
711
+ }, null, 8, Bt)
460
712
  ], 4));
461
713
  }
462
714
  });
463
- function pt(t) {
715
+ function It(t) {
464
716
  const {
465
717
  containerEl: e,
466
718
  sliderEl: n,
467
- autoHeight: o,
468
- performance: s = {},
469
- maxHeightRatio: r = 0.9
470
- } = t, l = g(!0), c = me(V, 100);
719
+ autoHeight: l,
720
+ performance: o = {},
721
+ maxHeightRatio: a = 0.9
722
+ } = t, r = w(!0), i = Le(V, 100);
471
723
  let m, p = "";
472
- const v = g(0), h = g(0), i = g(0), u = g({
724
+ const d = w(0), c = w(0), s = w(0), u = w({
473
725
  top: 0,
474
726
  scrollTop: 0,
475
727
  scrollHeight: 0,
476
728
  clientHeight: 0
477
- }), E = g({
729
+ }), b = w({
478
730
  clientHeight: 0
479
- }), b = f(() => !!h.value), N = f(() => u.value.scrollHeight > u.value.clientHeight), C = f(() => u.value.clientHeight - E.value.clientHeight), D = f(() => u.value.scrollHeight - u.value.clientHeight), W = f(() => Math.max(
731
+ }), _ = S(() => !!c.value), E = S(() => u.value.scrollHeight > u.value.clientHeight), g = S(() => u.value.clientHeight - b.value.clientHeight), D = S(() => u.value.scrollHeight - u.value.clientHeight), L = S(() => Math.max(
480
732
  u.value.clientHeight / u.value.scrollHeight,
481
733
  0.05
482
- )), Q = f(() => W.value > r ? 0 : W.value * u.value.clientHeight), M = f(() => ({
734
+ )), ee = S(() => L.value > a ? 0 : L.value * u.value.clientHeight), U = S(() => ({
483
735
  willChange: "transform",
484
- transform: `translate3d(0,${i.value}px,0)`,
485
- height: o ? `${Q.value}px` : void 0
736
+ transform: `translate3d(0,${s.value}px,0)`,
737
+ height: l ? `${ee.value}px` : void 0
486
738
  }));
487
- function k(S) {
488
- B(), h.value = S.clientY - n.value.getBoundingClientRect().top || 1, p = getComputedStyle(e.value).scrollBehavior, p === "smooth" && (e.value.style.scrollBehavior = "unset");
739
+ function N(O) {
740
+ W(), c.value = O.clientY - n.value.getBoundingClientRect().top || 1, p = getComputedStyle(e.value).scrollBehavior, p === "smooth" && (e.value.style.scrollBehavior = "unset");
489
741
  }
490
- function z() {
491
- e.value.style.scrollBehavior = p, h.value = 0, c();
742
+ function A() {
743
+ e.value.style.scrollBehavior = p, c.value = 0, i();
492
744
  }
493
- function B() {
494
- l.value = !1;
745
+ function W() {
746
+ r.value = !1;
495
747
  }
496
748
  function V() {
497
- b.value || (l.value = !0);
749
+ _.value || (r.value = !0);
498
750
  }
499
- function j(S) {
500
- if (!b.value)
751
+ function j(O) {
752
+ if (!_.value)
501
753
  return;
502
- let O = S.clientY - u.value.top - h.value;
503
- O < 0 ? i.value = 0 : O >= C.value ? i.value = C.value : i.value = O, e.value.scrollTo({
504
- top: i.value / C.value * D.value
754
+ let T = O.clientY - u.value.top - c.value;
755
+ T < 0 ? s.value = 0 : T >= g.value ? s.value = g.value : s.value = T, e.value.scrollTo({
756
+ top: s.value / g.value * D.value
505
757
  });
506
758
  }
507
- function U() {
508
- b.value || q();
759
+ function H() {
760
+ _.value || q();
509
761
  }
510
762
  function q() {
511
- cancelAnimationFrame(m), m = requestAnimationFrame(Y);
763
+ cancelAnimationFrame(m), m = requestAnimationFrame(te);
512
764
  }
513
- function Y() {
514
- e.value && (v.value = s.scrollTop?.value ?? e.value.scrollTop, i.value = v.value / D.value * C.value);
765
+ function te() {
766
+ e.value && (d.value = o.scrollTop?.value ?? e.value.scrollTop, s.value = d.value / D.value * g.value);
515
767
  }
516
- function K(S) {
517
- let O = "addEventListener";
518
- S === "add" ? O = "addEventListener" : O = "removeEventListener", n.value?.[O]("pointerdown", k, {
768
+ function K(O) {
769
+ let T = "addEventListener";
770
+ O === "add" ? T = "addEventListener" : T = "removeEventListener", n.value?.[T]("pointerdown", N, {
519
771
  passive: !0
520
- }), window[O]("pointermove", j, { passive: !0 }), window[O]("pointerup", z, { passive: !0 });
772
+ }), window[T]("pointermove", j, { passive: !0 }), window[T]("pointerup", A, { passive: !0 });
521
773
  }
522
- const G = new MutationObserver((S) => {
523
- S.map((Ie) => Ie.oldValue).join().includes("height") && a();
774
+ const Y = new MutationObserver((O) => {
775
+ O.map((G) => G.oldValue).join().includes("height") && f();
524
776
  });
525
- function a() {
777
+ function f() {
526
778
  u.value.top = e.value?.getBoundingClientRect().top ?? 0, u.value.scrollHeight = e.value?.scrollHeight ?? 0, u.value.clientHeight = e.value?.clientHeight ?? 0;
527
779
  }
528
- function d() {
529
- B(), setTimeout(() => {
530
- E.value.clientHeight = n.value?.clientHeight ?? 0, V();
780
+ function y() {
781
+ W(), setTimeout(() => {
782
+ b.value.clientHeight = n.value?.clientHeight ?? 0, V();
531
783
  }, 150);
532
784
  }
533
- function w() {
534
- document.styleSheets[0].insertRule(
535
- ".hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }",
536
- 0
537
- ), document.styleSheets[0].insertRule(
538
- ".hide-scrollbar::-webkit-scrollbar{ display: none }",
539
- 0
540
- ), e.value?.classList.add("hide-scrollbar");
785
+ function I(O, T, G = "dynamic-styles") {
786
+ let z = document.getElementById(G);
787
+ z || (z = document.createElement("style"), z.id = G, document.head.appendChild(z));
788
+ const oe = z.sheet.cssRules, re = oe.length, v = `${O} { ${T} }`;
789
+ for (let h = 0; h < re; h++) {
790
+ const R = oe[h];
791
+ if (R.selectorText === O && R.style.cssText === T)
792
+ return;
793
+ }
794
+ z.sheet.insertRule(v, re);
541
795
  }
542
- function _() {
543
- e.value && n.value ? (w(), e.value.addEventListener("scroll", U, {
796
+ function C() {
797
+ e.value && n.value ? (I(
798
+ ".hide-scrollbar",
799
+ "scrollbar-width: none; -ms-overflow-style: none;"
800
+ ), I(".hide-scrollbar::-webkit-scrollbar", "display: none"), e.value.addEventListener("scroll", H, {
544
801
  passive: !0
545
- }), K("add"), G.observe(e.value, {
802
+ }), K("add"), Y.observe(e.value, {
546
803
  subtree: !0,
547
804
  attributeOldValue: !0,
548
805
  attributeFilter: ["style"]
549
806
  }), setTimeout(() => {
550
- a();
551
- }, 100), d()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: e, sliderEl: n });
807
+ f();
808
+ }, 100), y()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: e, sliderEl: n });
552
809
  }
553
- return $(v, () => {
554
- B(), c();
810
+ return ne(d, () => {
811
+ W(), i();
555
812
  }), {
556
- isScrollEnd: l,
557
- isDragSlider: b,
558
- offsetTop: i,
559
- scrollTop: v,
560
- scrollable: N,
561
- sliderPos: M,
562
- init: _,
813
+ isScrollEnd: r,
814
+ isDragSlider: _,
815
+ offsetTop: s,
816
+ scrollTop: d,
817
+ scrollable: E,
818
+ sliderPos: U,
819
+ init: C,
563
820
  modifySliderEventListener: K
564
821
  };
565
822
  }
566
- const ht = (t) => (ke("data-v-edec7292"), t = t(), ze(), t), mt = /* @__PURE__ */ ht(() => /* @__PURE__ */ H("div", { class: "default-slider" }, null, -1)), gt = /* @__PURE__ */ A({
823
+ const Lt = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Ht = /* @__PURE__ */ Lt(() => /* @__PURE__ */ M("div", { class: "default-slider" }, null, -1)), $t = /* @__PURE__ */ Z({
567
824
  __name: "ScrollBar",
568
825
  props: {
569
826
  containerEl: null,
@@ -572,55 +829,50 @@ const ht = (t) => (ke("data-v-edec7292"), t = t(), ze(), t), mt = /* @__PURE__ *
572
829
  performance: null
573
830
  },
574
831
  setup(t, { expose: e }) {
575
- const n = t, o = !!De().default, s = g(null), r = f(() => n.containerEl), l = pt({
576
- containerEl: r,
577
- sliderEl: s,
578
- autoHeight: o ? n.autoHeight : !0,
832
+ const n = t, l = !!Ze().default, o = w(null), a = S(() => n.containerEl), r = It({
833
+ containerEl: a,
834
+ sliderEl: o,
835
+ autoHeight: l ? n.autoHeight : !0,
579
836
  performance: n.performance
580
- }), { scrollable: c, isScrollEnd: m, sliderPos: p } = l, v = g(!1), h = n.autoHide ? f(() => v.value || !m.value) : f(() => c.value);
581
- te(() => {
582
- ne(() => {
583
- l.init();
837
+ }), { scrollable: i, isScrollEnd: m, sliderPos: p } = r, d = w(!1), c = n.autoHide ? S(() => d.value || !m.value) : S(() => i.value);
838
+ de(() => {
839
+ fe(() => {
840
+ r.init();
584
841
  });
585
- }), ve(() => {
586
- l.modifySliderEventListener("remove");
842
+ }), Oe(() => {
843
+ r.modifySliderEventListener("remove");
587
844
  });
588
- function i() {
589
- v.value = !0;
845
+ function s() {
846
+ d.value = !0;
590
847
  }
591
848
  function u() {
592
- v.value = !1;
849
+ d.value = !1;
593
850
  }
594
- return e({ uScrollBarReturn: l }), (E, b) => (I(), fe(pe, null, {
595
- default: he(() => [
596
- We(H("div", {
851
+ return e({ uScrollBarReturn: r }), (b, _) => (k(), De(Re, null, {
852
+ default: Ce(() => [
853
+ et(M("div", {
597
854
  ref_key: "sliderRef",
598
- ref: s,
855
+ ref: o,
599
856
  class: "slider-wrapper",
600
- onMouseenter: i,
857
+ onMouseenter: s,
601
858
  onMouseleave: u,
602
- style: F(y(p))
859
+ style: le(B(p))
603
860
  }, [
604
- oe(E.$slots, "default", {}, () => [
605
- mt
861
+ he(b.$slots, "default", {}, () => [
862
+ Ht
606
863
  ], !0)
607
864
  ], 36), [
608
- [Me, y(h)]
865
+ [tt, B(c)]
609
866
  ])
610
867
  ]),
611
868
  _: 3
612
869
  }));
613
870
  }
614
871
  });
615
- const He = (t, e) => {
616
- const n = t.__vccOpts || t;
617
- for (const [o, s] of e)
618
- n[o] = s;
619
- return n;
620
- }, Ht = /* @__PURE__ */ He(gt, [["__scopeId", "data-v-edec7292"]]), bt = { class: "virtualListWrapper" }, yt = {
872
+ const Qt = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-edec7292"]]), At = { class: "virtualListWrapper" }, Pt = {
621
873
  inheritAttrs: !1
622
- }, _t = /* @__PURE__ */ A({
623
- ...yt,
874
+ }, Ft = /* @__PURE__ */ Z({
875
+ ...Pt,
624
876
  __name: "VirtualList",
625
877
  props: {
626
878
  data: null,
@@ -629,33 +881,33 @@ const He = (t, e) => {
629
881
  },
630
882
  emits: ["scrollEnd"],
631
883
  setup(t, { expose: e, emit: n }) {
632
- const o = t, s = ut(Ve(o, "data"), {
633
- itemHeight: (v) => o.itemHeight(o.data[v]),
634
- overscan: o.overscan,
884
+ const l = t, o = Tt(ot(l, "data"), {
885
+ itemHeight: (d) => l.itemHeight(l.data[d]),
886
+ overscan: l.overscan,
635
887
  scrollEndHook: () => {
636
888
  n("scrollEnd");
637
889
  }
638
- }), { list: r, containerProps: l, wrapperProps: c, innerProps: m, getItemHeightData: p } = s;
890
+ }), { list: a, containerProps: r, wrapperProps: i, innerProps: m, getItemHeightData: p } = o;
639
891
  return e({
640
- vListReturn: s
641
- }), (v, h) => (I(), R("div", bt, [
642
- H("div", je({
643
- onScrollPassive: h[0] || (h[0] = (...i) => y(l).onScroll && y(l).onScroll(...i)),
644
- ref: y(l).ref,
892
+ vListReturn: o
893
+ }), (d, c) => (k(), J("div", At, [
894
+ M("div", rt({
895
+ onScrollPassive: c[0] || (c[0] = (...s) => B(r).onScroll && B(r).onScroll(...s)),
896
+ ref: B(r).ref,
645
897
  class: "virtualList"
646
- }, v.$attrs), [
647
- H("div", le(se(y(c))), [
648
- H("div", le(se(y(m))), [
649
- (I(!0), R(Ke, null, Ne(y(r), ({ index: i, data: u }) => (I(), R("div", {
650
- key: i,
651
- style: F({
652
- height: `${y(p)(i).height}px`,
898
+ }, d.$attrs), [
899
+ M("div", ge(ye(B(i))), [
900
+ M("div", ge(ye(B(m))), [
901
+ (k(!0), J(at, null, st(B(a), ({ index: s, data: u }) => (k(), J("div", {
902
+ key: s,
903
+ style: le({
904
+ height: `${B(p)(s).height}px`,
653
905
  display: "flex"
654
906
  })
655
907
  }, [
656
- oe(v.$slots, "default", {
908
+ he(d.$slots, "default", {
657
909
  data: u,
658
- index: i
910
+ index: s
659
911
  }, void 0, !0)
660
912
  ], 4))), 128))
661
913
  ], 16)
@@ -664,24 +916,27 @@ const He = (t, e) => {
664
916
  ]));
665
917
  }
666
918
  });
667
- const It = /* @__PURE__ */ He(_t, [["__scopeId", "data-v-4ba97cce"]]);
919
+ const Ut = /* @__PURE__ */ pe(Ft, [["__scopeId", "data-v-4ba97cce"]]);
668
920
  export {
669
- Ht as ScrollBar,
670
- Tt as SvgIcon,
671
- Et as ToastCreator,
672
- It as VirtualList,
673
- Se as allSelectedKey,
674
- ct as closeDialogKey,
675
- xt as dialogController,
676
- Ee as isAllSelectedKey,
677
- _e as isSelectedKey,
678
- Oe as selectAllKey,
679
- we as selectKey,
680
- be as toggleAllKey,
681
- ye as toggleKey,
682
- Te as unselectAllKey,
683
- xe as unselectKey,
684
- Ot as useSelectable,
685
- wt as useSelectableInjectors,
686
- ut as useVirtualList
921
+ Qt as ScrollBar,
922
+ Kt as SvgIcon,
923
+ jt as ToastCreator,
924
+ Ut as VirtualList,
925
+ Fe as allSelectedKey,
926
+ Ot as closeDialogKey,
927
+ Vt as dialogController,
928
+ ke as isAllSelectedKey,
929
+ Pe as isSelectedKey,
930
+ We as selectAllKey,
931
+ Me as selectKey,
932
+ $e as toggleAllKey,
933
+ Ae as toggleKey,
934
+ Ne as unselectAllKey,
935
+ ze as unselectKey,
936
+ Ve as useDragSelect,
937
+ Nt as useDragSelectByMobile,
938
+ kt as useDragSelectByPc,
939
+ zt as useSelectable,
940
+ Wt as useSelectableInjectors,
941
+ Tt as useVirtualList
687
942
  };