@lazycatcloud/lzc-toolkit 0.0.222 → 0.0.223
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 +846 -826
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/useVirtualList/PullRefresh.vue.d.ts +18 -5
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { shallowRef as mt, watchEffect as Yt, readonly as
|
|
1
|
+
import { shallowRef as mt, watchEffect as Yt, readonly as pt, getCurrentScope as Bt, onScopeDispose as yt, onMounted as ve, nextTick as De, ref as g, watch as G, customRef as Ut, unref as A, isRef as Rt, getCurrentInstance as We, onUpdated as $t, computed as z, reactive as Ie, onUnmounted as Dt, inject as le, provide as F, defineComponent as J, h as fe, render as Ee, openBlock as R, createBlock as Se, Transition as Xe, withCtx as Ze, withDirectives as de, createElementBlock as P, normalizeClass as ue, createElementVNode as B, withModifiers as we, renderSlot as he, createCommentVNode as ge, useCssVars as Ve, normalizeProps as $e, guardReactiveProps as He, pushScopeId as be, popScopeId as Oe, normalizeStyle as q, toDisplayString as Ke, vShow as _e, createVNode as Te, onBeforeUnmount as Tt, onActivated as Nt, onBeforeMount as Ht, onDeactivated as Pt, useSlots as Ft, createTextVNode as wt, toRef as Wt, Fragment as Pe, mergeProps as Ne, renderList as Xt, toRefs as It } from "vue";
|
|
2
2
|
const Zt = {
|
|
3
3
|
created(t, e) {
|
|
4
4
|
let n, o, l;
|
|
5
|
-
function s(
|
|
6
|
-
|
|
5
|
+
function s(c) {
|
|
6
|
+
c.button == 0 && (n = Date.now(), o = c.clientX, l = c.clientY, e.modifiers?.stop && c.stopPropagation());
|
|
7
7
|
}
|
|
8
|
-
function a(
|
|
9
|
-
if (
|
|
8
|
+
function a(c) {
|
|
9
|
+
if (c.button != 0 || o === void 0)
|
|
10
10
|
return;
|
|
11
|
-
const
|
|
12
|
-
f > 5 ||
|
|
11
|
+
const d = c.clientX, i = c.clientY, f = Math.abs(d - o), r = Math.abs(i - l);
|
|
12
|
+
f > 5 || r > 5 || Date.now() - n > 300 || e.value?.(c);
|
|
13
13
|
}
|
|
14
14
|
t._down__ = s, t._up__ = a, t.addEventListener("pointerdown", s), t.addEventListener("pointerup", a);
|
|
15
15
|
},
|
|
@@ -40,7 +40,7 @@ function Vt(t, e) {
|
|
|
40
40
|
}, {
|
|
41
41
|
...e,
|
|
42
42
|
flush: (n = e?.flush) != null ? n : "sync"
|
|
43
|
-
}),
|
|
43
|
+
}), pt(o);
|
|
44
44
|
}
|
|
45
45
|
function Kt(t, e) {
|
|
46
46
|
let n, o, l;
|
|
@@ -48,21 +48,21 @@ function Kt(t, e) {
|
|
|
48
48
|
s.value = !0, l();
|
|
49
49
|
};
|
|
50
50
|
G(t, a, { flush: "sync" });
|
|
51
|
-
const
|
|
51
|
+
const c = typeof e == "function" ? e : e.get, d = typeof e == "function" ? void 0 : e.set, i = Ut((f, r) => (o = f, l = r, {
|
|
52
52
|
get() {
|
|
53
|
-
return s.value && (n =
|
|
53
|
+
return s.value && (n = c(), s.value = !1), o(), n;
|
|
54
54
|
},
|
|
55
55
|
set(M) {
|
|
56
|
-
|
|
56
|
+
d?.(M);
|
|
57
57
|
}
|
|
58
58
|
}));
|
|
59
59
|
return Object.isExtensible(i) && (i.trigger = a), i;
|
|
60
60
|
}
|
|
61
61
|
function Ge(t) {
|
|
62
|
-
return Bt() ? (
|
|
62
|
+
return Bt() ? (yt(t), !0) : !1;
|
|
63
63
|
}
|
|
64
64
|
function se(t) {
|
|
65
|
-
return typeof t == "function" ? t() :
|
|
65
|
+
return typeof t == "function" ? t() : A(t);
|
|
66
66
|
}
|
|
67
67
|
const At = typeof window < "u" && typeof document < "u";
|
|
68
68
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -78,33 +78,33 @@ function zt(t, e) {
|
|
|
78
78
|
}
|
|
79
79
|
function Jt(t, e = {}) {
|
|
80
80
|
let n, o, l = me;
|
|
81
|
-
const s = (
|
|
82
|
-
clearTimeout(
|
|
81
|
+
const s = (c) => {
|
|
82
|
+
clearTimeout(c), l(), l = me;
|
|
83
83
|
};
|
|
84
|
-
return (
|
|
85
|
-
const
|
|
86
|
-
return n && s(n),
|
|
87
|
-
l = e.rejectOnCancel ?
|
|
88
|
-
n && s(n), o = null, f(
|
|
84
|
+
return (c) => {
|
|
85
|
+
const d = se(t), i = se(e.maxWait);
|
|
86
|
+
return n && s(n), d <= 0 || i !== void 0 && i <= 0 ? (o && (s(o), o = null), Promise.resolve(c())) : new Promise((f, r) => {
|
|
87
|
+
l = e.rejectOnCancel ? r : f, i && !o && (o = setTimeout(() => {
|
|
88
|
+
n && s(n), o = null, f(c());
|
|
89
89
|
}, i)), n = setTimeout(() => {
|
|
90
|
-
o && s(o), o = null, f(
|
|
91
|
-
},
|
|
90
|
+
o && s(o), o = null, f(c());
|
|
91
|
+
}, d);
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
function en(...t) {
|
|
96
|
-
let e = 0, n, o = !0, l = me, s, a,
|
|
97
|
-
!Rt(t[0]) && typeof t[0] == "object" ? { delay: a, trailing:
|
|
96
|
+
let e = 0, n, o = !0, l = me, s, a, c, d, i;
|
|
97
|
+
!Rt(t[0]) && typeof t[0] == "object" ? { delay: a, trailing: c = !0, leading: d = !0, rejectOnCancel: i = !1 } = t[0] : [a, c = !0, d = !0, i = !1] = t;
|
|
98
98
|
const f = () => {
|
|
99
99
|
n && (clearTimeout(n), n = void 0, l(), l = me);
|
|
100
100
|
};
|
|
101
101
|
return (M) => {
|
|
102
|
-
const
|
|
103
|
-
return f(),
|
|
104
|
-
l = i ? I :
|
|
105
|
-
e = Date.now(), o = !0, p(
|
|
106
|
-
}, Math.max(0,
|
|
107
|
-
})), !
|
|
102
|
+
const v = se(a), u = Date.now() - e, p = () => s = M();
|
|
103
|
+
return f(), v <= 0 ? (e = Date.now(), p()) : (u > v && (d || !o) ? (e = Date.now(), p()) : c && (s = new Promise((h, I) => {
|
|
104
|
+
l = i ? I : h, n = setTimeout(() => {
|
|
105
|
+
e = Date.now(), o = !0, h(p()), f();
|
|
106
|
+
}, Math.max(0, v - u));
|
|
107
|
+
})), !d && !n && (n = setTimeout(() => o = !0, v)), o = !1, s);
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
110
|
function tn(t) {
|
|
@@ -138,19 +138,19 @@ function Le(...t) {
|
|
|
138
138
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
139
139
|
const s = [], a = () => {
|
|
140
140
|
s.forEach((f) => f()), s.length = 0;
|
|
141
|
-
},
|
|
141
|
+
}, c = (f, r, M, v) => (f.addEventListener(r, M, v), () => f.removeEventListener(r, M, v)), d = G(
|
|
142
142
|
() => [ce(e), se(l)],
|
|
143
|
-
([f,
|
|
143
|
+
([f, r]) => {
|
|
144
144
|
if (a(), !f)
|
|
145
145
|
return;
|
|
146
|
-
const M = qt(
|
|
146
|
+
const M = qt(r) ? { ...r } : r;
|
|
147
147
|
s.push(
|
|
148
|
-
...n.flatMap((
|
|
148
|
+
...n.flatMap((v) => o.map((u) => c(f, v, u, M)))
|
|
149
149
|
);
|
|
150
150
|
},
|
|
151
151
|
{ immediate: !0, flush: "post" }
|
|
152
152
|
), i = () => {
|
|
153
|
-
|
|
153
|
+
d(), a();
|
|
154
154
|
};
|
|
155
155
|
return Ge(i), i;
|
|
156
156
|
}
|
|
@@ -162,7 +162,7 @@ function on() {
|
|
|
162
162
|
}
|
|
163
163
|
function ln(t) {
|
|
164
164
|
const e = on();
|
|
165
|
-
return
|
|
165
|
+
return z(() => (e.value, Boolean(t())));
|
|
166
166
|
}
|
|
167
167
|
function sn(t) {
|
|
168
168
|
const e = We(), n = Kt(
|
|
@@ -174,20 +174,20 @@ function sn(t) {
|
|
|
174
174
|
function je(t, e, n = {}) {
|
|
175
175
|
const { window: o = Qe, ...l } = n;
|
|
176
176
|
let s;
|
|
177
|
-
const a = ln(() => o && "ResizeObserver" in o),
|
|
177
|
+
const a = ln(() => o && "ResizeObserver" in o), c = () => {
|
|
178
178
|
s && (s.disconnect(), s = void 0);
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
(
|
|
182
|
-
if (
|
|
179
|
+
}, d = z(() => Array.isArray(t) ? t.map((r) => ce(r)) : [ce(t)]), i = G(
|
|
180
|
+
d,
|
|
181
|
+
(r) => {
|
|
182
|
+
if (c(), a.value && o) {
|
|
183
183
|
s = new ResizeObserver(e);
|
|
184
|
-
for (const M of
|
|
184
|
+
for (const M of r)
|
|
185
185
|
M && s.observe(M, l);
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
188
|
{ immediate: !0, flush: "post" }
|
|
189
189
|
), f = () => {
|
|
190
|
-
|
|
190
|
+
c(), i();
|
|
191
191
|
};
|
|
192
192
|
return Ge(f), {
|
|
193
193
|
isSupported: a,
|
|
@@ -195,43 +195,43 @@ function je(t, e, n = {}) {
|
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
function an(t, e = { width: 0, height: 0 }, n = {}) {
|
|
198
|
-
const { window: o = Qe, box: l = "content-box" } = n, s =
|
|
199
|
-
var
|
|
200
|
-
return (M = (
|
|
201
|
-
}), a = g(e.width),
|
|
198
|
+
const { window: o = Qe, box: l = "content-box" } = n, s = z(() => {
|
|
199
|
+
var r, M;
|
|
200
|
+
return (M = (r = ce(t)) == null ? void 0 : r.namespaceURI) == null ? void 0 : M.includes("svg");
|
|
201
|
+
}), a = g(e.width), c = g(e.height), { stop: d } = je(
|
|
202
202
|
t,
|
|
203
|
-
([
|
|
204
|
-
const M = l === "border-box" ?
|
|
203
|
+
([r]) => {
|
|
204
|
+
const M = l === "border-box" ? r.borderBoxSize : l === "content-box" ? r.contentBoxSize : r.devicePixelContentBoxSize;
|
|
205
205
|
if (o && s.value) {
|
|
206
|
-
const
|
|
207
|
-
if (
|
|
208
|
-
const u = o.getComputedStyle(
|
|
209
|
-
a.value = Number.parseFloat(u.width),
|
|
206
|
+
const v = ce(t);
|
|
207
|
+
if (v) {
|
|
208
|
+
const u = o.getComputedStyle(v);
|
|
209
|
+
a.value = Number.parseFloat(u.width), c.value = Number.parseFloat(u.height);
|
|
210
210
|
}
|
|
211
211
|
} else if (M) {
|
|
212
|
-
const
|
|
213
|
-
a.value =
|
|
212
|
+
const v = Array.isArray(M) ? M : [M];
|
|
213
|
+
a.value = v.reduce((u, { inlineSize: p }) => u + p, 0), c.value = v.reduce((u, { blockSize: p }) => u + p, 0);
|
|
214
214
|
} else
|
|
215
|
-
a.value =
|
|
215
|
+
a.value = r.contentRect.width, c.value = r.contentRect.height;
|
|
216
216
|
},
|
|
217
217
|
n
|
|
218
218
|
);
|
|
219
219
|
qe(() => {
|
|
220
|
-
const
|
|
221
|
-
|
|
220
|
+
const r = ce(t);
|
|
221
|
+
r && (a.value = "offsetWidth" in r ? r.offsetWidth : e.width, c.value = "offsetHeight" in r ? r.offsetHeight : e.height);
|
|
222
222
|
});
|
|
223
223
|
const i = G(
|
|
224
224
|
() => ce(t),
|
|
225
|
-
(
|
|
226
|
-
a.value =
|
|
225
|
+
(r) => {
|
|
226
|
+
a.value = r ? e.width : 0, c.value = r ? e.height : 0;
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
229
|
function f() {
|
|
230
|
-
|
|
230
|
+
d(), i();
|
|
231
231
|
}
|
|
232
232
|
return {
|
|
233
233
|
width: a,
|
|
234
|
-
height:
|
|
234
|
+
height: c,
|
|
235
235
|
stop: f
|
|
236
236
|
};
|
|
237
237
|
}
|
|
@@ -248,42 +248,42 @@ function un(t, e = {}) {
|
|
|
248
248
|
top: 0,
|
|
249
249
|
bottom: 0
|
|
250
250
|
},
|
|
251
|
-
eventListenerOptions:
|
|
251
|
+
eventListenerOptions: c = {
|
|
252
252
|
capture: !1,
|
|
253
253
|
passive: !0
|
|
254
254
|
},
|
|
255
|
-
behavior:
|
|
255
|
+
behavior: d = "auto",
|
|
256
256
|
window: i = Qe,
|
|
257
|
-
onError: f = (
|
|
258
|
-
console.error(
|
|
257
|
+
onError: f = (w) => {
|
|
258
|
+
console.error(w);
|
|
259
259
|
}
|
|
260
|
-
} = e,
|
|
260
|
+
} = e, r = g(0), M = g(0), v = z({
|
|
261
261
|
get() {
|
|
262
|
-
return
|
|
262
|
+
return r.value;
|
|
263
263
|
},
|
|
264
|
-
set(
|
|
265
|
-
|
|
264
|
+
set(w) {
|
|
265
|
+
p(w, void 0);
|
|
266
266
|
}
|
|
267
|
-
}), u =
|
|
267
|
+
}), u = z({
|
|
268
268
|
get() {
|
|
269
269
|
return M.value;
|
|
270
270
|
},
|
|
271
|
-
set(
|
|
272
|
-
|
|
271
|
+
set(w) {
|
|
272
|
+
p(void 0, w);
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
function
|
|
276
|
-
var
|
|
275
|
+
function p(w, _) {
|
|
276
|
+
var b, H, Q;
|
|
277
277
|
if (!i)
|
|
278
278
|
return;
|
|
279
|
-
const
|
|
280
|
-
!
|
|
281
|
-
top: (
|
|
282
|
-
left: (
|
|
283
|
-
behavior: se(
|
|
279
|
+
const U = se(t);
|
|
280
|
+
!U || (Q = U instanceof Document ? i.document.body : U) == null || Q.scrollTo({
|
|
281
|
+
top: (b = se(_)) != null ? b : u.value,
|
|
282
|
+
left: (H = se(w)) != null ? H : v.value,
|
|
283
|
+
behavior: se(d)
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const h = g(!1), I = Ie({
|
|
287
287
|
left: !0,
|
|
288
288
|
right: !1,
|
|
289
289
|
top: !0,
|
|
@@ -293,55 +293,55 @@ function un(t, e = {}) {
|
|
|
293
293
|
right: !1,
|
|
294
294
|
top: !1,
|
|
295
295
|
bottom: !1
|
|
296
|
-
}),
|
|
297
|
-
!
|
|
298
|
-
},
|
|
299
|
-
var
|
|
296
|
+
}), L = (w) => {
|
|
297
|
+
!h.value || (h.value = !1, j.left = !1, j.right = !1, j.top = !1, j.bottom = !1, l(w));
|
|
298
|
+
}, m = ke(L, n + o), y = (w) => {
|
|
299
|
+
var _;
|
|
300
300
|
if (!i)
|
|
301
301
|
return;
|
|
302
|
-
const
|
|
303
|
-
j.left =
|
|
304
|
-
const ee = Math.abs(
|
|
305
|
-
|
|
306
|
-
let D =
|
|
307
|
-
|
|
308
|
-
const
|
|
309
|
-
|
|
310
|
-
}, E = (
|
|
311
|
-
var
|
|
302
|
+
const b = ((_ = w?.document) == null ? void 0 : _.documentElement) || w?.documentElement || ce(w), { display: H, flexDirection: Q } = getComputedStyle(b), U = b.scrollLeft;
|
|
303
|
+
j.left = U < r.value, j.right = U > r.value;
|
|
304
|
+
const ee = Math.abs(U) <= (a.left || 0), te = Math.abs(U) + b.clientWidth >= b.scrollWidth - (a.right || 0) - dt;
|
|
305
|
+
H === "flex" && Q === "row-reverse" ? (I.left = te, I.right = ee) : (I.left = ee, I.right = te), r.value = U;
|
|
306
|
+
let D = b.scrollTop;
|
|
307
|
+
w === i.document && !D && (D = i.document.body.scrollTop), j.top = D < M.value, j.bottom = D > M.value;
|
|
308
|
+
const N = Math.abs(D) <= (a.top || 0), T = Math.abs(D) + b.clientHeight >= b.scrollHeight - (a.bottom || 0) - dt;
|
|
309
|
+
H === "flex" && Q === "column-reverse" ? (I.top = T, I.bottom = N) : (I.top = N, I.bottom = T), M.value = D;
|
|
310
|
+
}, E = (w) => {
|
|
311
|
+
var _;
|
|
312
312
|
if (!i)
|
|
313
313
|
return;
|
|
314
|
-
const
|
|
315
|
-
|
|
314
|
+
const b = (_ = w.target.documentElement) != null ? _ : w.target;
|
|
315
|
+
y(b), h.value = !0, m(w), s(w);
|
|
316
316
|
};
|
|
317
317
|
return Le(
|
|
318
318
|
t,
|
|
319
319
|
"scroll",
|
|
320
320
|
n ? Fe(E, n, !0, !1) : E,
|
|
321
|
-
|
|
321
|
+
c
|
|
322
322
|
), qe(() => {
|
|
323
323
|
try {
|
|
324
|
-
const
|
|
325
|
-
if (!
|
|
324
|
+
const w = se(t);
|
|
325
|
+
if (!w)
|
|
326
326
|
return;
|
|
327
|
-
|
|
328
|
-
} catch (
|
|
329
|
-
f(
|
|
327
|
+
y(w);
|
|
328
|
+
} catch (w) {
|
|
329
|
+
f(w);
|
|
330
330
|
}
|
|
331
331
|
}), Le(
|
|
332
332
|
t,
|
|
333
333
|
"scrollend",
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
L,
|
|
335
|
+
c
|
|
336
336
|
), {
|
|
337
|
-
x:
|
|
337
|
+
x: v,
|
|
338
338
|
y: u,
|
|
339
|
-
isScrolling:
|
|
339
|
+
isScrolling: h,
|
|
340
340
|
arrivedState: I,
|
|
341
341
|
directions: j,
|
|
342
342
|
measure() {
|
|
343
|
-
const
|
|
344
|
-
i &&
|
|
343
|
+
const w = se(t);
|
|
344
|
+
i && w && y(w);
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
347
|
}
|
|
@@ -352,29 +352,29 @@ function Je(t, e = {}) {
|
|
|
352
352
|
immediate: l = !0,
|
|
353
353
|
manual: s = !1,
|
|
354
354
|
id: a = `vueuse_styletag_${++rn}`
|
|
355
|
-
} = e,
|
|
356
|
-
let
|
|
355
|
+
} = e, c = g(t);
|
|
356
|
+
let d = () => {
|
|
357
357
|
};
|
|
358
358
|
const i = () => {
|
|
359
359
|
if (!o)
|
|
360
360
|
return;
|
|
361
|
-
const
|
|
362
|
-
|
|
363
|
-
|
|
361
|
+
const r = o.getElementById(a) || o.createElement("style");
|
|
362
|
+
r.isConnected || (r.id = a, e.media && (r.media = e.media), o.head.appendChild(r)), !n.value && (d = G(
|
|
363
|
+
c,
|
|
364
364
|
(M) => {
|
|
365
|
-
|
|
365
|
+
r.textContent = M;
|
|
366
366
|
},
|
|
367
367
|
{ immediate: !0 }
|
|
368
368
|
), n.value = !0);
|
|
369
369
|
}, f = () => {
|
|
370
|
-
!o || !n.value || (
|
|
370
|
+
!o || !n.value || (d(), o.head.removeChild(o.getElementById(a)), n.value = !1);
|
|
371
371
|
};
|
|
372
372
|
return l && !s && qe(i), s || Ge(f), {
|
|
373
373
|
id: a,
|
|
374
|
-
css:
|
|
374
|
+
css: c,
|
|
375
375
|
unload: f,
|
|
376
376
|
load: i,
|
|
377
|
-
isLoaded:
|
|
377
|
+
isLoaded: pt(n)
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
function cn(t, e, n) {
|
|
@@ -386,16 +386,16 @@ function cn(t, e, n) {
|
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
388
|
function fn(t, e) {
|
|
389
|
-
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = e, s = g(null), a = an(s),
|
|
389
|
+
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = e, s = g(null), a = an(s), c = g(!0), d = ke(y, 100);
|
|
390
390
|
let i;
|
|
391
|
-
const f = mt(t),
|
|
391
|
+
const f = mt(t), r = g(0), M = g({ start: 0, end: 10 }), v = g({ start: 0, end: l });
|
|
392
392
|
let u = 0;
|
|
393
|
-
const
|
|
394
|
-
let { sum:
|
|
395
|
-
return f.value.map((
|
|
396
|
-
}), I =
|
|
397
|
-
const { start:
|
|
398
|
-
return
|
|
393
|
+
const p = g([]), h = z(() => {
|
|
394
|
+
let { sum: N, height: T } = { sum: 0, height: 0 };
|
|
395
|
+
return f.value.map((C, O) => (typeof o == "number" ? T = o : T = o(O), N += T, { height: T, sum: N }));
|
|
396
|
+
}), I = z(() => H(M.value.start)), j = z(() => typeof o == "number" ? h.value.length * o : h.value[h.value.length - 1]?.sum || 0), L = z(() => {
|
|
397
|
+
const { start: N, end: T } = v.value;
|
|
398
|
+
return p.value.slice(N, T);
|
|
399
399
|
});
|
|
400
400
|
ve(() => {
|
|
401
401
|
}), Dt(() => cancelAnimationFrame(i)), G(
|
|
@@ -406,81 +406,81 @@ function fn(t, e) {
|
|
|
406
406
|
{ deep: !0 }
|
|
407
407
|
), G(
|
|
408
408
|
[a.width, a.height],
|
|
409
|
-
([
|
|
410
|
-
(
|
|
409
|
+
([N, T]) => {
|
|
410
|
+
(N || T) && E();
|
|
411
411
|
},
|
|
412
412
|
{ deep: !0 }
|
|
413
|
-
), G(
|
|
414
|
-
|
|
413
|
+
), G(r, () => {
|
|
414
|
+
m(), d();
|
|
415
415
|
});
|
|
416
|
-
function h() {
|
|
417
|
-
r.value = !1;
|
|
418
|
-
}
|
|
419
416
|
function m() {
|
|
420
|
-
|
|
417
|
+
c.value = !1;
|
|
418
|
+
}
|
|
419
|
+
function y() {
|
|
420
|
+
c.value = !0, n?.();
|
|
421
421
|
}
|
|
422
422
|
function E() {
|
|
423
|
-
cancelAnimationFrame(i), i = requestAnimationFrame(
|
|
423
|
+
cancelAnimationFrame(i), i = requestAnimationFrame(w);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function w() {
|
|
426
426
|
if (s.value) {
|
|
427
|
-
|
|
428
|
-
let
|
|
429
|
-
u =
|
|
430
|
-
let T = Math.max(0,
|
|
431
|
-
|
|
427
|
+
r.value = s.value.scrollTop;
|
|
428
|
+
let N = _(r.value);
|
|
429
|
+
u = b(N);
|
|
430
|
+
let T = Math.max(0, N - l), C = Math.min(
|
|
431
|
+
N + u + l,
|
|
432
432
|
f.value.length
|
|
433
433
|
);
|
|
434
|
-
M.value = { start: T, end:
|
|
435
|
-
data:
|
|
434
|
+
M.value = { start: T, end: C }, p.value = f.value.slice(T, C).map((O, k) => ({
|
|
435
|
+
data: O,
|
|
436
436
|
index: k + T
|
|
437
|
-
})),
|
|
437
|
+
})), v.value.start = N - T, v.value.end = v.value.start + u;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
let T = 0,
|
|
442
|
-
for (; T <=
|
|
443
|
-
const k = Math.floor((T +
|
|
444
|
-
|
|
440
|
+
function _(N) {
|
|
441
|
+
let T = 0, C = h.value.length - 1, O = -1;
|
|
442
|
+
for (; T <= C; ) {
|
|
443
|
+
const k = Math.floor((T + C) / 2);
|
|
444
|
+
h.value[k].sum >= N ? (O = k, C = k - 1) : T = k + 1;
|
|
445
445
|
}
|
|
446
|
-
return Math.max(0,
|
|
446
|
+
return Math.max(0, O);
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
let T = 0,
|
|
450
|
-
for (let
|
|
448
|
+
function b(N) {
|
|
449
|
+
let T = 0, C = 0;
|
|
450
|
+
for (let O = N; O < h.value.length && (T++, C += h.value[O].height, !(C >= a.height.value)); O++)
|
|
451
451
|
;
|
|
452
452
|
return T;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function H(N) {
|
|
455
455
|
if (typeof o == "number")
|
|
456
|
-
return
|
|
457
|
-
let T =
|
|
456
|
+
return N * o;
|
|
457
|
+
let T = h.value[N];
|
|
458
458
|
return T ? T.sum - T.height : 0;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
return
|
|
460
|
+
function Q(N) {
|
|
461
|
+
return h.value[N] || { sum: 0, height: 0 };
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function U(N, T = "smooth") {
|
|
464
464
|
if (s.value) {
|
|
465
|
-
const { reset:
|
|
465
|
+
const { reset: C } = cn(
|
|
466
466
|
s.value,
|
|
467
467
|
"scrollBehavior",
|
|
468
468
|
T
|
|
469
|
-
),
|
|
470
|
-
s.value.scrollTop =
|
|
469
|
+
), O = Q(N);
|
|
470
|
+
s.value.scrollTop = O.sum - O.height, w(), C();
|
|
471
471
|
}
|
|
472
472
|
if (s.value) {
|
|
473
|
-
const
|
|
474
|
-
s.value.scrollTop =
|
|
473
|
+
const C = Q(N);
|
|
474
|
+
s.value.scrollTop = C.sum - C.height, w();
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
const ee =
|
|
477
|
+
const ee = z(() => ({
|
|
478
478
|
style: {
|
|
479
479
|
width: "100%",
|
|
480
480
|
height: `${j.value}px`,
|
|
481
|
-
pointerEvents:
|
|
481
|
+
pointerEvents: c.value ? void 0 : "none"
|
|
482
482
|
}
|
|
483
|
-
})), te =
|
|
483
|
+
})), te = z(() => ({
|
|
484
484
|
style: {
|
|
485
485
|
transform: `translate3d(0, ${I.value}px, 0)`,
|
|
486
486
|
"will-change": "transform"
|
|
@@ -489,15 +489,15 @@ function fn(t, e) {
|
|
|
489
489
|
overflowY: "auto"
|
|
490
490
|
};
|
|
491
491
|
return {
|
|
492
|
-
list:
|
|
493
|
-
visiableList:
|
|
494
|
-
getItemHeightData:
|
|
495
|
-
getoffsetTopIndex:
|
|
492
|
+
list: p,
|
|
493
|
+
visiableList: L,
|
|
494
|
+
getItemHeightData: Q,
|
|
495
|
+
getoffsetTopIndex: _,
|
|
496
496
|
totalHeight: j,
|
|
497
497
|
clientHeight: a.height,
|
|
498
|
-
scrollTo:
|
|
499
|
-
scrollTop:
|
|
500
|
-
isScrollEnd:
|
|
498
|
+
scrollTo: U,
|
|
499
|
+
scrollTop: r,
|
|
500
|
+
isScrollEnd: c,
|
|
501
501
|
containerProps: {
|
|
502
502
|
ref: s,
|
|
503
503
|
onScroll: () => {
|
|
@@ -512,33 +512,33 @@ function fn(t, e) {
|
|
|
512
512
|
const Lt = Symbol(), et = Symbol(), tt = Symbol(), nt = Symbol(), ot = Symbol(), lt = Symbol(), st = Symbol(), at = Symbol(), it = Symbol(), Ae = Symbol(), ut = Symbol();
|
|
513
513
|
function Qo() {
|
|
514
514
|
const { voidFn: t, boolFn: e, boolRef: n, numberRef: o, arrayRef: l } = {
|
|
515
|
-
voidFn: (
|
|
515
|
+
voidFn: (h) => {
|
|
516
516
|
},
|
|
517
|
-
boolFn: (
|
|
518
|
-
boolRef:
|
|
519
|
-
numberRef:
|
|
520
|
-
arrayRef:
|
|
521
|
-
}, s = le(Lt, "id"), a = le(ot, l),
|
|
517
|
+
boolFn: (h) => !1,
|
|
518
|
+
boolRef: z(() => !1),
|
|
519
|
+
numberRef: z(() => 0),
|
|
520
|
+
arrayRef: z(() => [])
|
|
521
|
+
}, s = le(Lt, "id"), a = le(ot, l), c = le(nt, e), d = le(it, n), i = le(tt, t), f = le(et, t), r = le(lt, t), M = le(st, t), v = le(at, t), u = le(Ae, t), p = le(ut, o);
|
|
522
522
|
return {
|
|
523
523
|
itemKey: s,
|
|
524
524
|
selected: a,
|
|
525
|
-
isSelected:
|
|
526
|
-
isAllSelected:
|
|
525
|
+
isSelected: c,
|
|
526
|
+
isAllSelected: d,
|
|
527
527
|
toggle: i,
|
|
528
528
|
toggleAll: f,
|
|
529
|
-
select:
|
|
529
|
+
select: r,
|
|
530
530
|
selectAll: M,
|
|
531
|
-
unselect:
|
|
531
|
+
unselect: v,
|
|
532
532
|
unselectAll: u,
|
|
533
|
-
selectedCount:
|
|
533
|
+
selectedCount: p
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
536
|
function Yo(t, e, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
537
537
|
const o = g(!1), l = g(/* @__PURE__ */ new Set()), s = Ie(/* @__PURE__ */ new Map());
|
|
538
538
|
G(
|
|
539
539
|
t,
|
|
540
|
-
(
|
|
541
|
-
a(
|
|
540
|
+
(m) => {
|
|
541
|
+
a(m);
|
|
542
542
|
},
|
|
543
543
|
{
|
|
544
544
|
deep: n.deep,
|
|
@@ -549,159 +549,159 @@ function Yo(t, e, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
|
549
549
|
() => {
|
|
550
550
|
a(t.value);
|
|
551
551
|
}
|
|
552
|
-
),
|
|
552
|
+
), yt(() => {
|
|
553
553
|
o.value = !1, l.value.clear(), s.clear();
|
|
554
554
|
});
|
|
555
|
-
function a(
|
|
556
|
-
s.clear(),
|
|
557
|
-
s.has(
|
|
558
|
-
}),
|
|
555
|
+
function a(m) {
|
|
556
|
+
s.clear(), m.forEach((y) => {
|
|
557
|
+
s.has(y[e]) || s.set(y[e], y);
|
|
558
|
+
}), L();
|
|
559
559
|
}
|
|
560
|
-
const
|
|
561
|
-
let
|
|
560
|
+
const c = z(() => {
|
|
561
|
+
let m = [];
|
|
562
562
|
if (o.value != null)
|
|
563
|
-
o.value && (
|
|
563
|
+
o.value && (m = Array.from(s.values()));
|
|
564
564
|
else if (l.value.size) {
|
|
565
|
-
let
|
|
565
|
+
let y;
|
|
566
566
|
l.value.forEach((E) => {
|
|
567
|
-
|
|
567
|
+
y = s.get(E), y && m.push(y);
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
|
-
return
|
|
571
|
-
}),
|
|
572
|
-
let
|
|
573
|
-
return o.value != null ? o.value && (
|
|
574
|
-
}), i =
|
|
575
|
-
let
|
|
570
|
+
return m;
|
|
571
|
+
}), d = z(() => {
|
|
572
|
+
let m = 0;
|
|
573
|
+
return o.value != null ? o.value && (m = s.size) : m = l.value.size, m;
|
|
574
|
+
}), i = z(() => {
|
|
575
|
+
let m;
|
|
576
576
|
if (o.value != null)
|
|
577
|
-
|
|
577
|
+
m = o.value;
|
|
578
578
|
else {
|
|
579
|
-
const
|
|
580
|
-
|
|
579
|
+
const y = l.value.size, E = s.size;
|
|
580
|
+
m = y == E;
|
|
581
581
|
}
|
|
582
|
-
return
|
|
582
|
+
return m;
|
|
583
583
|
});
|
|
584
584
|
function f() {
|
|
585
585
|
o.value = !0;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function r() {
|
|
588
588
|
o.value = !1;
|
|
589
589
|
}
|
|
590
|
-
function M(
|
|
591
|
-
s.has(
|
|
590
|
+
function M(m) {
|
|
591
|
+
s.has(m) && l.value.add(m);
|
|
592
592
|
}
|
|
593
|
-
function
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
M(
|
|
593
|
+
function v(m) {
|
|
594
|
+
h(() => {
|
|
595
|
+
m.forEach((y) => {
|
|
596
|
+
M(y[e]);
|
|
597
597
|
});
|
|
598
598
|
});
|
|
599
599
|
}
|
|
600
|
-
function u(
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
l.value.delete(
|
|
600
|
+
function u(m) {
|
|
601
|
+
h(() => {
|
|
602
|
+
m.forEach((y) => {
|
|
603
|
+
l.value.delete(y[e]);
|
|
604
604
|
});
|
|
605
605
|
});
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
return o.value != null ? o.value : l.value.has(
|
|
607
|
+
function p(m) {
|
|
608
|
+
return o.value != null ? o.value : l.value.has(m[e]);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
o.value != null && (o.value ? l.value = new Set(Array.from(s.keys())) : l.value = /* @__PURE__ */ new Set()),
|
|
610
|
+
function h(m) {
|
|
611
|
+
o.value != null && (o.value ? l.value = new Set(Array.from(s.keys())) : l.value = /* @__PURE__ */ new Set()), m(), n.useAllFlagOptimizatiofn ? l.value.size == 0 ? o.value = !1 : l.value.size == s.size ? o.value = !0 : o.value = null : o.value = null;
|
|
612
612
|
}
|
|
613
|
-
function I(
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
y
|
|
613
|
+
function I(m) {
|
|
614
|
+
h(() => {
|
|
615
|
+
m.forEach((y) => {
|
|
616
|
+
p(y) ? l.value.delete(y[e]) : M(y[e]);
|
|
617
617
|
});
|
|
618
618
|
});
|
|
619
619
|
}
|
|
620
620
|
function j() {
|
|
621
|
-
const { value:
|
|
622
|
-
|
|
621
|
+
const { value: m } = i;
|
|
622
|
+
m ? r() : f();
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
const
|
|
626
|
-
l.value.forEach((
|
|
627
|
-
s.get(
|
|
628
|
-
}),
|
|
624
|
+
function L() {
|
|
625
|
+
const m = [];
|
|
626
|
+
l.value.forEach((y) => {
|
|
627
|
+
s.get(y) || m.push(y);
|
|
628
|
+
}), m.forEach((y) => l.value.delete(y));
|
|
629
629
|
}
|
|
630
|
-
return
|
|
631
|
-
selected:
|
|
632
|
-
select:
|
|
630
|
+
return F(Lt, e), F(et, j), F(tt, I), F(nt, p), F(ot, c), F(lt, v), F(st, f), F(at, u), F(it, i), F(Ae, r), F(Ae, r), F(ut, d), {
|
|
631
|
+
selected: c,
|
|
632
|
+
select: v,
|
|
633
633
|
selectAll: f,
|
|
634
634
|
unselect: u,
|
|
635
|
-
unselectAll:
|
|
635
|
+
unselectAll: r,
|
|
636
636
|
toggle: I,
|
|
637
637
|
toggleAll: j,
|
|
638
|
-
isSelected:
|
|
638
|
+
isSelected: p,
|
|
639
639
|
isAllSelected: i,
|
|
640
|
-
selectedCount:
|
|
640
|
+
selectedCount: d
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
643
|
function Bo(t) {
|
|
644
|
-
const e = g(!1), n = g(/* @__PURE__ */ new Set()), o =
|
|
644
|
+
const e = g(!1), n = g(/* @__PURE__ */ new Set()), o = z(() => {
|
|
645
645
|
let u = [];
|
|
646
646
|
return e.value != null ? e.value && (u = t.value) : n.value.size && (u = Array.from(n.value.values())), u;
|
|
647
|
-
}), l =
|
|
647
|
+
}), l = z(() => {
|
|
648
648
|
let u = 0;
|
|
649
649
|
return e.value != null ? e.value && (u = t.value.length) : u = n.value.size, u;
|
|
650
|
-
}), s =
|
|
650
|
+
}), s = z(() => {
|
|
651
651
|
let u;
|
|
652
652
|
if (e.value != null)
|
|
653
653
|
u = e.value;
|
|
654
654
|
else {
|
|
655
|
-
const
|
|
656
|
-
u =
|
|
655
|
+
const p = n.value.size, h = t.value.length;
|
|
656
|
+
u = p == h;
|
|
657
657
|
}
|
|
658
658
|
return u;
|
|
659
659
|
});
|
|
660
660
|
function a() {
|
|
661
661
|
e.value = !0;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function c() {
|
|
664
664
|
e.value = !1;
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
|
|
668
|
-
u.forEach((
|
|
669
|
-
n.value.add(
|
|
666
|
+
function d(u) {
|
|
667
|
+
r(() => {
|
|
668
|
+
u.forEach((p) => {
|
|
669
|
+
n.value.add(p);
|
|
670
670
|
});
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
673
|
function i(u) {
|
|
674
|
-
|
|
675
|
-
u.forEach((
|
|
676
|
-
n.value.delete(
|
|
674
|
+
r(() => {
|
|
675
|
+
u.forEach((p) => {
|
|
676
|
+
n.value.delete(p);
|
|
677
677
|
});
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
680
|
function f(u) {
|
|
681
681
|
return e.value != null ? e.value : n.value.has(u);
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function r(u) {
|
|
684
684
|
e.value != null && (e.value ? n.value = new Set(Array.from(t.value)) : n.value = /* @__PURE__ */ new Set()), u(), n.value.size == 0 ? e.value = !1 : n.value.size == t.value.length ? e.value = !0 : e.value = null;
|
|
685
685
|
}
|
|
686
686
|
function M(u) {
|
|
687
|
-
|
|
688
|
-
u.forEach((
|
|
689
|
-
f(
|
|
687
|
+
r(() => {
|
|
688
|
+
u.forEach((p) => {
|
|
689
|
+
f(p) ? n.value.delete(p) : n.value.add(p);
|
|
690
690
|
});
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function v() {
|
|
694
694
|
const { value: u } = s;
|
|
695
|
-
u ?
|
|
695
|
+
u ? c() : a();
|
|
696
696
|
}
|
|
697
|
-
return
|
|
697
|
+
return F(et, v), F(tt, M), F(nt, f), F(ot, o), F(lt, d), F(st, a), F(at, i), F(it, s), F(Ae, c), F(Ae, c), F(ut, l), {
|
|
698
698
|
selected: o,
|
|
699
|
-
select:
|
|
699
|
+
select: d,
|
|
700
700
|
selectAll: a,
|
|
701
701
|
unselect: i,
|
|
702
|
-
unselectAll:
|
|
702
|
+
unselectAll: c,
|
|
703
703
|
toggle: M,
|
|
704
|
-
toggleAll:
|
|
704
|
+
toggleAll: v,
|
|
705
705
|
isSelected: f,
|
|
706
706
|
isAllSelected: s,
|
|
707
707
|
selectedCount: l
|
|
@@ -711,17 +711,17 @@ function dn(t, e) {
|
|
|
711
711
|
return t > e ? "horizontal" : e > t ? "vertical" : "";
|
|
712
712
|
}
|
|
713
713
|
function vn() {
|
|
714
|
-
const t = g(0), e = g(0), n = g(0), o = g(0), l = g(0), s = g(0), a = g(""),
|
|
714
|
+
const t = g(0), e = g(0), n = g(0), o = g(0), l = g(0), s = g(0), a = g(""), c = () => a.value === "vertical", d = () => a.value === "horizontal", i = () => {
|
|
715
715
|
n.value = 0, o.value = 0, l.value = 0, s.value = 0, a.value = "";
|
|
716
716
|
};
|
|
717
717
|
return {
|
|
718
|
-
move: (M,
|
|
719
|
-
n.value = (M < 0 ? 0 : M) - t.value, o.value =
|
|
718
|
+
move: (M, v) => {
|
|
719
|
+
n.value = (M < 0 ? 0 : M) - t.value, o.value = v - e.value, l.value = Math.abs(n.value), s.value = Math.abs(o.value);
|
|
720
720
|
const u = 10;
|
|
721
721
|
(!a.value || l.value < u && s.value < u) && (a.value = dn(l.value, s.value));
|
|
722
722
|
},
|
|
723
|
-
start: (M,
|
|
724
|
-
i(), t.value = M, e.value =
|
|
723
|
+
start: (M, v) => {
|
|
724
|
+
i(), t.value = M, e.value = v;
|
|
725
725
|
},
|
|
726
726
|
reset: i,
|
|
727
727
|
startX: t,
|
|
@@ -731,8 +731,8 @@ function vn() {
|
|
|
731
731
|
offsetX: l,
|
|
732
732
|
offsetY: s,
|
|
733
733
|
direction: a,
|
|
734
|
-
isVertical:
|
|
735
|
-
isHorizontal:
|
|
734
|
+
isVertical: c,
|
|
735
|
+
isHorizontal: d
|
|
736
736
|
};
|
|
737
737
|
}
|
|
738
738
|
function Be(t) {
|
|
@@ -750,134 +750,134 @@ function jt({
|
|
|
750
750
|
}) {
|
|
751
751
|
const {
|
|
752
752
|
select: a = Be("\u9009\u62E9"),
|
|
753
|
-
unselect:
|
|
754
|
-
unselectAll:
|
|
755
|
-
selected: i =
|
|
753
|
+
unselect: c = Be("\u53D6\u6D88\u9009\u62E9"),
|
|
754
|
+
unselectAll: d = Be("\u53D6\u6D88\u5168\u9009"),
|
|
755
|
+
selected: i = z(() => [])
|
|
756
756
|
} = s();
|
|
757
757
|
let f = {};
|
|
758
|
-
const
|
|
758
|
+
const r = z(
|
|
759
759
|
() => Fe(o === "colum" ? _t : kt, 50)
|
|
760
|
-
), M =
|
|
761
|
-
let
|
|
762
|
-
const
|
|
760
|
+
), M = z(() => t ?? n), v = (() => e ? (S) => e(S) : (S) => S)(), u = /* @__PURE__ */ new Set();
|
|
761
|
+
let p = /* @__PURE__ */ new Set();
|
|
762
|
+
const h = g(!0), I = g(), j = g(!1), L = g({ x: 0, y: 0 }), m = g({ x: 0, y: 0, scrollTop: 0 }), y = g({}), E = g({
|
|
763
763
|
top: 0,
|
|
764
764
|
height: 0,
|
|
765
|
-
sync(
|
|
766
|
-
E.value.top = I.value?.scrollTop || 0,
|
|
765
|
+
sync(S = !1) {
|
|
766
|
+
E.value.top = I.value?.scrollTop || 0, S && (E.value.height = I.value?.scrollHeight || 0);
|
|
767
767
|
}
|
|
768
|
-
}),
|
|
769
|
-
left: Math.min(
|
|
770
|
-
top: Math.min(
|
|
771
|
-
width: Math.abs(
|
|
772
|
-
height: Math.abs(
|
|
773
|
-
} : { left: 0, top: 0, width: 0, height: 0 }),
|
|
774
|
-
let
|
|
775
|
-
const ee =
|
|
768
|
+
}), w = z(() => j.value ? {
|
|
769
|
+
left: Math.min(L.value.x, m.value.x) - y.value.left,
|
|
770
|
+
top: Math.min(L.value.y, m.value.y) - y.value.top,
|
|
771
|
+
width: Math.abs(L.value.x - m.value.x),
|
|
772
|
+
height: Math.abs(L.value.y - m.value.y)
|
|
773
|
+
} : { left: 0, top: 0, width: 0, height: 0 }), _ = g(!1), { margin: b = 50, startSpeed: H = 30, maxSpeed: Q = 30 } = l;
|
|
774
|
+
let U;
|
|
775
|
+
const ee = b, te = H, D = Q, N = (S) => S ** 1;
|
|
776
776
|
let T = 0;
|
|
777
|
-
function S
|
|
778
|
-
if (cancelAnimationFrame(
|
|
777
|
+
function C(S) {
|
|
778
|
+
if (cancelAnimationFrame(U), T = O(S), T = Math.max(
|
|
779
779
|
Math.min(T, D),
|
|
780
780
|
-D
|
|
781
781
|
), T !== 0) {
|
|
782
|
-
const
|
|
783
|
-
if (!
|
|
782
|
+
const x = I.value;
|
|
783
|
+
if (!x || !j.value)
|
|
784
784
|
return;
|
|
785
|
-
const
|
|
786
|
-
let
|
|
787
|
-
|
|
785
|
+
const X = E.value.height - y.value.height;
|
|
786
|
+
let W = E.value.top + Number(T);
|
|
787
|
+
W = Math.min(Math.max(0, W), X), x.scrollTop = W, Y(), U = requestAnimationFrame(() => C(S));
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function O(S) {
|
|
791
791
|
if (I.value) {
|
|
792
|
-
const
|
|
793
|
-
if (
|
|
794
|
-
return te *
|
|
795
|
-
const K =
|
|
792
|
+
const X = y.value, W = X.bottom - S;
|
|
793
|
+
if (W < ee)
|
|
794
|
+
return te * N(1 - W / ee);
|
|
795
|
+
const K = S - X.top;
|
|
796
796
|
if (K < ee)
|
|
797
|
-
return -te *
|
|
797
|
+
return -te * N(1 - K / ee);
|
|
798
798
|
}
|
|
799
799
|
return 0;
|
|
800
800
|
}
|
|
801
|
-
function k(
|
|
802
|
-
const
|
|
803
|
-
return
|
|
801
|
+
function k(S) {
|
|
802
|
+
const x = { ...w.value, right: 0, bottom: 0 };
|
|
803
|
+
return x.left += y.value.left, x.top += y.value.top - E.value.top, x.right = x.width + x.left, x.bottom = x.height + x.top, x.left < S.right && x.right > S.left && x.top < S.bottom && x.bottom > S.top;
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function Y() {
|
|
806
806
|
E.value.sync();
|
|
807
|
-
const { top:
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
),
|
|
812
|
-
}
|
|
813
|
-
function
|
|
814
|
-
let
|
|
815
|
-
|
|
816
|
-
const K =
|
|
817
|
-
for (let
|
|
818
|
-
const Ye = K[
|
|
819
|
-
if (Ye.selectorText ===
|
|
807
|
+
const { top: S, height: x } = E.value;
|
|
808
|
+
m.value.y = Math.min(
|
|
809
|
+
x + y.value.top,
|
|
810
|
+
m.value.y + S - m.value.scrollTop
|
|
811
|
+
), m.value.scrollTop = S;
|
|
812
|
+
}
|
|
813
|
+
function $(S, x, X = "dynamic-styles") {
|
|
814
|
+
let W = document.getElementById(X);
|
|
815
|
+
W || (W = document.createElement("style"), W.id = X, document.head.appendChild(W));
|
|
816
|
+
const K = W.sheet.cssRules, oe = K.length, ze = `${S} { ${x} }`;
|
|
817
|
+
for (let ye = 0; ye < oe; ye++) {
|
|
818
|
+
const Ye = K[ye];
|
|
819
|
+
if (Ye.selectorText === S && Ye.style.cssText === x)
|
|
820
820
|
return;
|
|
821
821
|
}
|
|
822
|
-
|
|
823
|
-
}
|
|
824
|
-
function V(
|
|
825
|
-
|
|
826
|
-
const
|
|
827
|
-
|
|
828
|
-
const
|
|
829
|
-
|
|
830
|
-
|
|
822
|
+
W.sheet.insertRule(ze, oe);
|
|
823
|
+
}
|
|
824
|
+
function V(S, x) {
|
|
825
|
+
h.value = !0, j.value = !0, E.value.sync(!0);
|
|
826
|
+
const X = x + E.value.top;
|
|
827
|
+
L.value.x = S, L.value.y = X, m.value.x = S, m.value.y = X, I.value?.classList.add("disable-scroll-behavior"), u.clear();
|
|
828
|
+
const W = i.value;
|
|
829
|
+
p = new Set(
|
|
830
|
+
W.map((K) => K[M.value])
|
|
831
831
|
), ft();
|
|
832
832
|
}
|
|
833
|
-
function ne(
|
|
834
|
-
!j.value || (
|
|
835
|
-
|
|
836
|
-
E.value.height +
|
|
837
|
-
),
|
|
833
|
+
function ne(S, x, X) {
|
|
834
|
+
!j.value || (h.value && (o === "colum" && Z() || (h.value = !1)), X?.(), C(x), m.value.x = Math.max(S, y.value.left), m.value.y = Math.min(
|
|
835
|
+
x + E.value.top,
|
|
836
|
+
E.value.height + y.value.top
|
|
837
|
+
), m.value.scrollTop = E.value.top, r.value());
|
|
838
838
|
}
|
|
839
839
|
function Me() {
|
|
840
840
|
j.value = !1, I.value?.classList.remove("disable-scroll-behavior");
|
|
841
841
|
}
|
|
842
842
|
function ie() {
|
|
843
|
-
!j.value || (T ||
|
|
843
|
+
!j.value || (T || Y(), r.value());
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function Z() {
|
|
846
846
|
if (!j.value)
|
|
847
847
|
return !1;
|
|
848
|
-
const { width:
|
|
849
|
-
return !(Math.max(
|
|
848
|
+
const { width: S, height: x } = w.value;
|
|
849
|
+
return !(Math.max(S, x) > 5);
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
|
|
851
|
+
function pe() {
|
|
852
|
+
Z() && ct();
|
|
853
853
|
}
|
|
854
854
|
function ct() {
|
|
855
|
-
|
|
855
|
+
d();
|
|
856
856
|
}
|
|
857
857
|
function _t() {
|
|
858
|
-
|
|
859
|
-
const
|
|
860
|
-
f[M.value] =
|
|
861
|
-
const
|
|
862
|
-
k(
|
|
858
|
+
Z() || I.value?.querySelectorAll(`[${n}]`).forEach((S) => {
|
|
859
|
+
const x = v(S.getAttribute(`${n}`));
|
|
860
|
+
f[M.value] = x;
|
|
861
|
+
const X = p.has(x), W = u.has(x);
|
|
862
|
+
k(S.getBoundingClientRect()) ? W || (X ? c([f]) : a([f]), u.add(x)) : W && (X ? a([f]) : c([f]), u.delete(x));
|
|
863
863
|
});
|
|
864
864
|
}
|
|
865
865
|
function kt() {
|
|
866
|
-
const
|
|
867
|
-
let
|
|
868
|
-
I.value?.querySelectorAll(`[${n}]`).forEach((
|
|
869
|
-
const oe =
|
|
870
|
-
|
|
871
|
-
}), I.value?.querySelectorAll(`[${n}]`).forEach((
|
|
872
|
-
const oe =
|
|
873
|
-
|
|
866
|
+
const S = [];
|
|
867
|
+
let x = null, X = 0;
|
|
868
|
+
I.value?.querySelectorAll(`[${n}]`).forEach((W, K) => {
|
|
869
|
+
const oe = v(W.getAttribute(`${n}`));
|
|
870
|
+
S.push(oe), k(W.getBoundingClientRect()) && (x === null && (x = K), x = Math.min(x, K), X = Math.max(X, K));
|
|
871
|
+
}), I.value?.querySelectorAll(`[${n}]`).forEach((W, K) => {
|
|
872
|
+
const oe = S[K], ze = p.has(oe), ye = u.has(oe);
|
|
873
|
+
x !== null && K >= x && K <= X ? ye || (f[M.value] = oe, ze ? c([f]) : a([f]), u.add(oe)) : ye && (f[M.value] = oe, ze ? a([f]) : c([f]), u.delete(oe));
|
|
874
874
|
});
|
|
875
875
|
}
|
|
876
876
|
function ft() {
|
|
877
|
-
!I.value || (
|
|
877
|
+
!I.value || (y.value = I.value.getBoundingClientRect());
|
|
878
878
|
}
|
|
879
|
-
function Qt(
|
|
880
|
-
return !
|
|
879
|
+
function Qt(S) {
|
|
880
|
+
return !S?.value || (I.value = S.value, !I?.value) ? !1 : (ft(), $(".disable-scroll-behavior", "scroll-behavior: unset !important;"), !0);
|
|
881
881
|
}
|
|
882
882
|
return {
|
|
883
883
|
init: Qt,
|
|
@@ -885,13 +885,13 @@ function jt({
|
|
|
885
885
|
dragMove: ne,
|
|
886
886
|
dragEnd: Me,
|
|
887
887
|
onScroll: ie,
|
|
888
|
-
isSingleClick:
|
|
888
|
+
isSingleClick: Z,
|
|
889
889
|
cancelSelect: ct,
|
|
890
|
-
cancelSelectAllBySingleClick:
|
|
891
|
-
selectFn:
|
|
892
|
-
getAttributeValue:
|
|
893
|
-
incrementalSelect:
|
|
894
|
-
selectRange:
|
|
890
|
+
cancelSelectAllBySingleClick: pe,
|
|
891
|
+
selectFn: r,
|
|
892
|
+
getAttributeValue: v,
|
|
893
|
+
incrementalSelect: _,
|
|
894
|
+
selectRange: w,
|
|
895
895
|
isPressing: j,
|
|
896
896
|
containerEl: I
|
|
897
897
|
};
|
|
@@ -902,8 +902,8 @@ function Uo(t) {
|
|
|
902
902
|
dragStart: l,
|
|
903
903
|
dragMove: s,
|
|
904
904
|
dragEnd: a,
|
|
905
|
-
cancelSelectAllBySingleClick:
|
|
906
|
-
} = e,
|
|
905
|
+
cancelSelectAllBySingleClick: c
|
|
906
|
+
} = e, d = z(() => ({
|
|
907
907
|
left: `${n.value.left}px`,
|
|
908
908
|
top: `${n.value.top}px`,
|
|
909
909
|
width: `${n.value.width}px`,
|
|
@@ -921,38 +921,38 @@ function Uo(t) {
|
|
|
921
921
|
return fe("div", {
|
|
922
922
|
id: "selectBoxEl",
|
|
923
923
|
class: "drag-select-box",
|
|
924
|
-
style:
|
|
924
|
+
style: d.value
|
|
925
925
|
});
|
|
926
926
|
}
|
|
927
927
|
});
|
|
928
|
-
function
|
|
929
|
-
|
|
928
|
+
function r(h) {
|
|
929
|
+
h.button === 0 && (h.ctrlKey || h.metaKey ? e.incrementalSelect.value = !0 : e.incrementalSelect.value = !1, l(h.x, h.y), window.addEventListener("mousemove", M), window.addEventListener("mouseup", v));
|
|
930
930
|
}
|
|
931
|
-
function M(
|
|
932
|
-
s(
|
|
931
|
+
function M(h) {
|
|
932
|
+
s(h.x, h.y);
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
window.removeEventListener("mousemove", M), window.removeEventListener("mouseup",
|
|
934
|
+
function v(h) {
|
|
935
|
+
window.removeEventListener("mousemove", M), window.removeEventListener("mouseup", v), h.composedPath().some(
|
|
936
936
|
(j) => e.getAttributeValue(
|
|
937
937
|
j?.getAttribute?.(t.attribute)
|
|
938
938
|
)
|
|
939
|
-
) ||
|
|
939
|
+
) || c(), a(), e.incrementalSelect.value = !1;
|
|
940
940
|
}
|
|
941
|
-
function u(
|
|
941
|
+
function u(h) {
|
|
942
942
|
try {
|
|
943
|
-
if (!e.init(
|
|
943
|
+
if (!e.init(h))
|
|
944
944
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
945
945
|
if (!e.containerEl?.value)
|
|
946
946
|
return !1;
|
|
947
|
-
Ee(fe(f), e.containerEl.value), i(), e.containerEl.value?.addEventListener("scroll", o), e.containerEl.value?.addEventListener("mousedown",
|
|
947
|
+
Ee(fe(f), e.containerEl.value), i(), e.containerEl.value?.addEventListener("scroll", o), e.containerEl.value?.addEventListener("mousedown", r);
|
|
948
948
|
} catch (I) {
|
|
949
949
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", I);
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
e.containerEl.value?.removeEventListener("scroll", o), e.containerEl.value?.removeEventListener("mousedown",
|
|
952
|
+
function p() {
|
|
953
|
+
e.containerEl.value?.removeEventListener("scroll", o), e.containerEl.value?.removeEventListener("mousedown", r);
|
|
954
954
|
}
|
|
955
|
-
return { init: u, unMount:
|
|
955
|
+
return { init: u, unMount: p };
|
|
956
956
|
}
|
|
957
957
|
function Ro(t, e = {}) {
|
|
958
958
|
const { joinSelectMode: n, pressTime: o = 600, selectModeRef: l } = e, s = jt({
|
|
@@ -962,58 +962,58 @@ function Ro(t, e = {}) {
|
|
|
962
962
|
startSpeed: 5,
|
|
963
963
|
maxSpeed: 5
|
|
964
964
|
}
|
|
965
|
-
}), { onScroll: a, dragStart:
|
|
965
|
+
}), { onScroll: a, dragStart: c, dragMove: d, dragEnd: i } = s;
|
|
966
966
|
let f;
|
|
967
|
-
const
|
|
967
|
+
const r = vn();
|
|
968
968
|
function M() {
|
|
969
969
|
clearTimeout(f);
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
return
|
|
971
|
+
function v(y) {
|
|
972
|
+
return y.composedPath().some((E) => !!E?.getAttribute?.(t.attribute));
|
|
973
973
|
}
|
|
974
974
|
function u() {
|
|
975
|
-
return l?.value && !s.isPressing.value &&
|
|
975
|
+
return l?.value && !s.isPressing.value && r.isHorizontal();
|
|
976
976
|
}
|
|
977
|
-
function y
|
|
978
|
-
(E == null ||
|
|
977
|
+
function p(y, E, w) {
|
|
978
|
+
(E == null || w == null) && (E = y.targetTouches[0].clientX, w = y.targetTouches[0].clientY), c(E, w), n?.(), d(E, w, () => y.preventDefault());
|
|
979
979
|
}
|
|
980
|
-
function
|
|
981
|
-
const { clientX: E, clientY:
|
|
982
|
-
|
|
983
|
-
y
|
|
980
|
+
function h(y) {
|
|
981
|
+
const { clientX: E, clientY: w } = y.targetTouches[0];
|
|
982
|
+
r.start(E, w), M(), v(y) && (f = setTimeout(() => {
|
|
983
|
+
p(y), y.preventDefault();
|
|
984
984
|
}, o));
|
|
985
985
|
}
|
|
986
|
-
function I(
|
|
986
|
+
function I(y) {
|
|
987
987
|
M();
|
|
988
|
-
const { clientX: E, clientY:
|
|
989
|
-
if (
|
|
990
|
-
y
|
|
988
|
+
const { clientX: E, clientY: w } = y.targetTouches[0];
|
|
989
|
+
if (r.move(E, w), u()) {
|
|
990
|
+
p(y, r.startX.value, r.startY.value);
|
|
991
991
|
return;
|
|
992
992
|
}
|
|
993
|
-
|
|
993
|
+
d(E, w, () => y.preventDefault());
|
|
994
994
|
}
|
|
995
995
|
function j() {
|
|
996
996
|
M(), i();
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function L(y) {
|
|
999
999
|
try {
|
|
1000
|
-
if (!s.init(
|
|
1000
|
+
if (!s.init(y))
|
|
1001
1001
|
throw new Error("\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E");
|
|
1002
1002
|
if (!s.containerEl?.value)
|
|
1003
1003
|
return !1;
|
|
1004
1004
|
const E = s.containerEl.value;
|
|
1005
|
-
E.addEventListener("scroll", a), E.addEventListener("touchstart",
|
|
1005
|
+
E.addEventListener("scroll", a), E.addEventListener("touchstart", h), E.addEventListener("touchmove", I), window.addEventListener("pointerup", j);
|
|
1006
1006
|
} catch (E) {
|
|
1007
1007
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", E);
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1010
|
+
function m() {
|
|
1011
1011
|
if (!s.containerEl?.value)
|
|
1012
1012
|
return;
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1013
|
+
const y = s.containerEl.value;
|
|
1014
|
+
y.removeEventListener("scroll", a), y.removeEventListener("touchstart", h), y.removeEventListener("touchmove", I), window.removeEventListener("pointerup", j);
|
|
1015
1015
|
}
|
|
1016
|
-
return { init:
|
|
1016
|
+
return { init: L, unMount: m };
|
|
1017
1017
|
}
|
|
1018
1018
|
const Mn = Symbol(), gn = /* @__PURE__ */ J({
|
|
1019
1019
|
__name: "Dialog",
|
|
@@ -1030,13 +1030,13 @@ const Mn = Symbol(), gn = /* @__PURE__ */ J({
|
|
|
1030
1030
|
const n = t, o = () => {
|
|
1031
1031
|
n.onClickOverlay?.(), n.closeOnClickOverlay && e("update:visiable", !1);
|
|
1032
1032
|
};
|
|
1033
|
-
return
|
|
1033
|
+
return F(Mn, () => e("update:visiable", !1)), (l, s) => (R(), Se(Xe, { name: "modal" }, {
|
|
1034
1034
|
default: Ze(() => [
|
|
1035
|
-
t.visiable ? de((
|
|
1035
|
+
t.visiable ? de((R(), P("div", {
|
|
1036
1036
|
key: 0,
|
|
1037
1037
|
class: ue([t.hiddenOverlay ? "no-overlay-modal" : "lzc-modal", t.modalClass])
|
|
1038
1038
|
}, [
|
|
1039
|
-
|
|
1039
|
+
B("div", {
|
|
1040
1040
|
onMousedown: s[0] || (s[0] = we(() => {
|
|
1041
1041
|
}, ["stop"])),
|
|
1042
1042
|
class: ue(["lzc-dialog", t.dialogClass])
|
|
@@ -1044,7 +1044,7 @@ const Mn = Symbol(), gn = /* @__PURE__ */ J({
|
|
|
1044
1044
|
he(l.$slots, "default", {}, void 0, !0)
|
|
1045
1045
|
], 34)
|
|
1046
1046
|
], 2)), [
|
|
1047
|
-
[
|
|
1047
|
+
[A(Zt), () => o()]
|
|
1048
1048
|
]) : ge("", !0)
|
|
1049
1049
|
]),
|
|
1050
1050
|
_: 3
|
|
@@ -1102,9 +1102,9 @@ function Ct({
|
|
|
1102
1102
|
}`
|
|
1103
1103
|
), { LoadingComp: J({
|
|
1104
1104
|
setup() {
|
|
1105
|
-
const
|
|
1105
|
+
const c = sn();
|
|
1106
1106
|
return ve(() => {
|
|
1107
|
-
|
|
1107
|
+
c.value?.classList?.add(l);
|
|
1108
1108
|
}), () => fe(t, e);
|
|
1109
1109
|
}
|
|
1110
1110
|
}) };
|
|
@@ -1121,18 +1121,18 @@ function Ho({
|
|
|
1121
1121
|
});
|
|
1122
1122
|
let l = 0, s = 0;
|
|
1123
1123
|
const a = g(!1);
|
|
1124
|
-
function
|
|
1124
|
+
function c() {
|
|
1125
1125
|
l++, a.value = !0;
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1127
|
+
function d() {
|
|
1128
1128
|
s++, l === s && (a.value = !1);
|
|
1129
1129
|
}
|
|
1130
|
-
return { LoadingComp: o, loading: a, load:
|
|
1130
|
+
return { LoadingComp: o, loading: a, load: c, unload: d };
|
|
1131
1131
|
}
|
|
1132
|
-
const mn = (t) => (be("data-v-92a1804d"), t = t(), Oe(), t),
|
|
1133
|
-
/* @__PURE__ */
|
|
1134
|
-
], -1)),
|
|
1135
|
-
|
|
1132
|
+
const mn = (t) => (be("data-v-92a1804d"), t = t(), Oe(), t), pn = /* @__PURE__ */ mn(() => /* @__PURE__ */ B("div", { class: "ldio-mm5gwljcryb" }, [
|
|
1133
|
+
/* @__PURE__ */ B("div")
|
|
1134
|
+
], -1)), yn = [
|
|
1135
|
+
pn
|
|
1136
1136
|
], Dn = /* @__PURE__ */ J({
|
|
1137
1137
|
__name: "DefaultLoading",
|
|
1138
1138
|
props: {
|
|
@@ -1143,7 +1143,7 @@ const mn = (t) => (be("data-v-92a1804d"), t = t(), Oe(), t), yn = /* @__PURE__ *
|
|
|
1143
1143
|
return Ve((e) => ({
|
|
1144
1144
|
"4e4a9ce4": t.width + "px",
|
|
1145
1145
|
e56fe5c2: t.height + "px"
|
|
1146
|
-
})), (e, n) => (
|
|
1146
|
+
})), (e, n) => (R(), P("div", $e(He(e.$attrs)), yn, 16));
|
|
1147
1147
|
}
|
|
1148
1148
|
});
|
|
1149
1149
|
const Tn = /* @__PURE__ */ ae(Dn, [["__scopeId", "data-v-92a1804d"]]), Nn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAQAAAC0jZKKAAAAAnNCSVQICFXsRgQAAAABc1JHQgCuzhzpAAAEMklEQVRIx62XzW9VZRDGn2fmPff23qYtlvIRqVVQICgGoS21wYUGEA0x0YUYE/8BNTHujBsNiS5cGBeujAtXLiTGjUnFjRKNQWgJVoqxC/m2RMpX7cf9OOedcXFrg1qutPc+ZzM5b84vc+bNZOYh6sp5tKWQr2qmBZ/Biqxq03Eybsh6I63+l7z90Wirts0VoyU2bYm1ZdFXZtf9shUMWckL8XGrBw+Lvx7pqHTN5Toy9cQSZMgtnLR7m19Hj//i9TNeBDyU7+jOWj2mDgBVlqXqRmHOgXZPvNOLXsHzSwWPdeKelMEiDKlkThMIhSVGTqGKaZRxxm/4VlsSeLTb17ojkpkESwlPrDhTLmn6VXbQACd4RFbhBoElgEfur6yJMXhE9Aoz+mz56sDMP+7a4TDcgW4Bn7wPax05VpGnQ6u4NPgnlq0F8Ojq6n2puxehXkFydeAsDWgYfLFwcYtLztQjieLv2y6hQc2DJx5qSYAUZJV+rr9hLCAAcGoNu6oSSZrI5K7zaIICAJQ2iwZGuGHuwjiaIgFGV2sHmQpIJr8eiM0BB6Byr6i7OBAmd0yiSRJXWQeQFDA5g6YpDK+SxB2As7z1SvPA0rKKJElQ/qA3MeNyp4Raxuk1NFGBHSZwcUFhqqlgKZgAjoj8bFPBlhephQ+kDdM4vKkWmAdXE0DRjL4YCfiiFmk1MGPemEFxJIdyg+QO3zQ/+q8FTa1VCER2tDUM7kE2v1BcEUyBoItLpavRUtiDNNSeccFNBARqIi3dDXfbIFJkyBD9tJQmMq1lbBvelkawrthDh8Hd9XvJT+Qi1NUSa9+3oRHw8T2+0iNNImbtqPSl6VkToVAlP9BQIV6hubuZyVDfnAA4LSoaNaqv/3HjsvPdLb3IkDFjhk8BAQbOZpNGpRCUp8dyy8GOtspBczgNjtO938wP08IP1BiyQJWVc88uB1x5F+sYEd0Y/f2FKb1tPJ4nhVFMuO34niW38mu639ycRuN3/UMLYCAbktSFKkrVvcf2LQV74lW8jChRMzOfxpv/2uhHHrYDokYVYab4acWhjZU7yLWIt3w/1Uklo+D1nV/+xyqc3Bt3O11JCMmb9nn/WH3s8C68Id0QV9CV9I/6P1jUg5x4Tgar6hLoQgX9nH69/dRiy+Eh3fhofMl7QSoE4qT6Z/0Hb2tuTjyFJ10gLlTSleKzPMXx7FL75OUSUCjm11TW6yMYRBfpAURwUZroxzs+rOuaRnb4C1Ks/ZoFCNUFAZTg4oFiQeiJi4gJlOJKasnf6T38v3ZspAsv2hYq6YFCqZXFEsyDhAguVK/FiuPxvZ0X79DnDW/nM94DodRu/G+wEOriAQIlqfjNP+n7dokGcnirPma93jJf73ALWF00xVE/3HdsGc605vk6Nydb0GN38y4UqV7BjE/ggv48NfZE3UH2F3Kp4Zn6aTweAAAAAElFTkSuQmCC", wn = { class: "loading-wrap" }, In = ["src"], En = /* @__PURE__ */ J({
|
|
@@ -1157,15 +1157,15 @@ const Tn = /* @__PURE__ */ ae(Dn, [["__scopeId", "data-v-92a1804d"]]), Nn = "dat
|
|
|
1157
1157
|
Ve((o) => ({
|
|
1158
1158
|
b1cf73a8: t.delay
|
|
1159
1159
|
}));
|
|
1160
|
-
const n =
|
|
1160
|
+
const n = z(() => {
|
|
1161
1161
|
const o = {};
|
|
1162
1162
|
return e.size === "mini" ? (o.width = "22px", o.height = "22px") : e.size === "large" && (o.width = "28px", o.height = "28px"), o;
|
|
1163
1163
|
});
|
|
1164
|
-
return (o, l) => (
|
|
1165
|
-
|
|
1164
|
+
return (o, l) => (R(), P("div", wn, [
|
|
1165
|
+
B("img", {
|
|
1166
1166
|
class: "loading-circle",
|
|
1167
|
-
src:
|
|
1168
|
-
style: q(
|
|
1167
|
+
src: A(Nn),
|
|
1168
|
+
style: q(A(n))
|
|
1169
1169
|
}, null, 12, In)
|
|
1170
1170
|
]));
|
|
1171
1171
|
}
|
|
@@ -1193,10 +1193,10 @@ const An = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1193
1193
|
},
|
|
1194
1194
|
emits: ["close"],
|
|
1195
1195
|
setup(t, { emit: e }) {
|
|
1196
|
-
const n = t, o = "lzc-loading-toast", l =
|
|
1196
|
+
const n = t, o = "lzc-loading-toast", l = z(() => {
|
|
1197
1197
|
let i = {};
|
|
1198
1198
|
return n.captureEventP && (i.pointerEvents = "none"), i;
|
|
1199
|
-
}), s =
|
|
1199
|
+
}), s = z(() => {
|
|
1200
1200
|
let i = {
|
|
1201
1201
|
padding: "12px"
|
|
1202
1202
|
};
|
|
@@ -1204,52 +1204,52 @@ const An = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1204
1204
|
...i,
|
|
1205
1205
|
...n.overlayContentStyle
|
|
1206
1206
|
}), i;
|
|
1207
|
-
}), a =
|
|
1207
|
+
}), a = z(() => {
|
|
1208
1208
|
let i = {};
|
|
1209
1209
|
return n.showClose && !n.icon && (i.paddingRight = "16px"), i;
|
|
1210
1210
|
});
|
|
1211
|
-
function
|
|
1211
|
+
function c() {
|
|
1212
1212
|
n.closeOnClickOverlay && e("close");
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1214
|
+
function d() {
|
|
1215
1215
|
n.closeOnClick && e("close");
|
|
1216
1216
|
}
|
|
1217
|
-
return (i, f) => (
|
|
1217
|
+
return (i, f) => (R(), Se(Xe, {
|
|
1218
1218
|
"enter-active-class": "lzc-animate-fade-in lzc-animate-duration-300",
|
|
1219
1219
|
"leave-active-class": "lzc-animate-fade-out lzc-animate-duration-300"
|
|
1220
1220
|
}, {
|
|
1221
1221
|
default: Ze(() => [
|
|
1222
|
-
|
|
1222
|
+
B("div", {
|
|
1223
1223
|
id: o,
|
|
1224
|
-
style: q(
|
|
1224
|
+
style: q(A(l))
|
|
1225
1225
|
}, [
|
|
1226
|
-
de(
|
|
1226
|
+
de(B("div", {
|
|
1227
1227
|
class: ue(`${o} ${t.className}`),
|
|
1228
|
-
onClick: we(
|
|
1228
|
+
onClick: we(c, ["stop"])
|
|
1229
1229
|
}, [
|
|
1230
|
-
|
|
1230
|
+
B("div", {
|
|
1231
1231
|
class: ue(`${o}-wrap`),
|
|
1232
|
-
onClick: we(
|
|
1232
|
+
onClick: we(d, ["stop"])
|
|
1233
1233
|
}, [
|
|
1234
|
-
|
|
1234
|
+
B("div", {
|
|
1235
1235
|
class: ue(`${o}-content`),
|
|
1236
|
-
style: q(
|
|
1236
|
+
style: q(A(s))
|
|
1237
1237
|
}, [
|
|
1238
|
-
t.showClose ? (
|
|
1238
|
+
t.showClose ? (R(), P("img", {
|
|
1239
1239
|
key: 0,
|
|
1240
|
-
onClick: f[0] || (f[0] = we((
|
|
1241
|
-
src:
|
|
1240
|
+
onClick: f[0] || (f[0] = we((r) => e("close"), ["stop"])),
|
|
1241
|
+
src: A(An),
|
|
1242
1242
|
class: ue(`${o}-close`)
|
|
1243
1243
|
}, null, 10, Cn)) : ge("", !0),
|
|
1244
|
-
t.showIcon ? (
|
|
1244
|
+
t.showIcon ? (R(), P("img", {
|
|
1245
1245
|
key: 1,
|
|
1246
|
-
src: t.icon ||
|
|
1246
|
+
src: t.icon || A(zn),
|
|
1247
1247
|
class: ue(`${o}-icon`)
|
|
1248
1248
|
}, null, 10, xn)) : ge("", !0),
|
|
1249
|
-
t.message ? (
|
|
1249
|
+
t.message ? (R(), P("div", {
|
|
1250
1250
|
key: 2,
|
|
1251
1251
|
class: ue(`${o}-message`),
|
|
1252
|
-
style: q(
|
|
1252
|
+
style: q(A(a))
|
|
1253
1253
|
}, Ke(t.message), 7)) : ge("", !0)
|
|
1254
1254
|
], 6)
|
|
1255
1255
|
], 10, jn)
|
|
@@ -1296,7 +1296,7 @@ class On {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
1298
|
function Fo(t, e) {
|
|
1299
|
-
const n = !!e?.debug, o = e?.printErrorLog !== !1, l = e?.loading !== !1, s = e?.autoClose !== !1, a = e?.delay !== void 0 ? e.delay : 300,
|
|
1299
|
+
const n = !!e?.debug, o = e?.printErrorLog !== !1, l = e?.loading !== !1, s = e?.autoClose !== !1, a = e?.delay !== void 0 ? e.delay : 300, c = e?.hook !== void 0 ? e.hook : !0, d = {
|
|
1300
1300
|
...e,
|
|
1301
1301
|
showIcon: e?.showIcon !== !1,
|
|
1302
1302
|
captureEventP: e?.captureEventP === !0
|
|
@@ -1306,11 +1306,11 @@ function Fo(t, e) {
|
|
|
1306
1306
|
l,
|
|
1307
1307
|
s,
|
|
1308
1308
|
a,
|
|
1309
|
-
|
|
1309
|
+
d
|
|
1310
1310
|
);
|
|
1311
1311
|
const i = g(!1);
|
|
1312
1312
|
let f = null;
|
|
1313
|
-
const
|
|
1313
|
+
const r = new On(d);
|
|
1314
1314
|
async function M(...u) {
|
|
1315
1315
|
if (n && console.log(`useDelayAsync - handler - processing: ${i.value}`), !i.value) {
|
|
1316
1316
|
i.value = !0, f = setTimeout(() => {
|
|
@@ -1318,45 +1318,45 @@ function Fo(t, e) {
|
|
|
1318
1318
|
"useDelayAsync - handler - setTimeout - loading: %s processing: %s",
|
|
1319
1319
|
l,
|
|
1320
1320
|
i.value
|
|
1321
|
-
), l && (!i.value ||
|
|
1321
|
+
), l && (!i.value || r.show());
|
|
1322
1322
|
}, a);
|
|
1323
1323
|
try {
|
|
1324
1324
|
n && console.time("useDelayAsync - handler-execute-time");
|
|
1325
|
-
const
|
|
1326
|
-
return n && console.log("useDelayAsync - execute res: ",
|
|
1327
|
-
} catch (
|
|
1328
|
-
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(
|
|
1325
|
+
const p = await t(...u);
|
|
1326
|
+
return n && console.log("useDelayAsync - execute res: ", p), n && console.timeEnd("useDelayAsync - handler-execute-time"), await v(s), await e?.onSuccess?.(p, [...u]), p;
|
|
1327
|
+
} catch (p) {
|
|
1328
|
+
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(p), await v(s), await e?.onError?.(p, [...u]);
|
|
1329
1329
|
}
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
|
-
async function
|
|
1333
|
-
n && console.log("useDelayAsync - close - closeLoading: ", u), i.value = !1, f && clearTimeout(f), f = null, u && await
|
|
1332
|
+
async function v(u = !0) {
|
|
1333
|
+
n && console.log("useDelayAsync - close - closeLoading: ", u), i.value = !1, f && clearTimeout(f), f = null, u && await r.destory();
|
|
1334
1334
|
}
|
|
1335
|
-
return
|
|
1336
|
-
n && console.log("useDelayAsync - onBeforeUnmount - close"),
|
|
1335
|
+
return c && Tt(() => {
|
|
1336
|
+
n && console.log("useDelayAsync - onBeforeUnmount - close"), v();
|
|
1337
1337
|
}), {
|
|
1338
1338
|
processing: i,
|
|
1339
1339
|
handler: M,
|
|
1340
|
-
close:
|
|
1340
|
+
close: v
|
|
1341
1341
|
};
|
|
1342
1342
|
}
|
|
1343
1343
|
function _n(t, e) {
|
|
1344
1344
|
return t > e ? "horizontal" : e > t ? "vertical" : "";
|
|
1345
1345
|
}
|
|
1346
1346
|
function kn() {
|
|
1347
|
-
const t = g(0), e = g(0), n = g(0), o = g(0), l = g(0), s = g(0), a = g(""),
|
|
1347
|
+
const t = g(0), e = g(0), n = g(0), o = g(0), l = g(0), s = g(0), a = g(""), c = () => a.value === "vertical", d = () => a.value === "horizontal", i = () => {
|
|
1348
1348
|
n.value = 0, o.value = 0, l.value = 0, s.value = 0, a.value = "";
|
|
1349
1349
|
};
|
|
1350
|
-
function f(M,
|
|
1351
|
-
i(), t.value = M, e.value =
|
|
1350
|
+
function f(M, v) {
|
|
1351
|
+
i(), t.value = M, e.value = v;
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1354
|
-
n.value = (M < 0 ? 0 : M) - t.value, o.value =
|
|
1353
|
+
function r(M, v) {
|
|
1354
|
+
n.value = (M < 0 ? 0 : M) - t.value, o.value = v - e.value, l.value = Math.abs(n.value), s.value = Math.abs(o.value);
|
|
1355
1355
|
const u = 10;
|
|
1356
1356
|
(!a.value || l.value < u && s.value < u) && (a.value = _n(l.value, s.value));
|
|
1357
1357
|
}
|
|
1358
1358
|
return {
|
|
1359
|
-
move:
|
|
1359
|
+
move: r,
|
|
1360
1360
|
start: f,
|
|
1361
1361
|
reset: i,
|
|
1362
1362
|
startX: t,
|
|
@@ -1366,8 +1366,8 @@ function kn() {
|
|
|
1366
1366
|
offsetX: l,
|
|
1367
1367
|
offsetY: s,
|
|
1368
1368
|
direction: a,
|
|
1369
|
-
isVertical:
|
|
1370
|
-
isHorizontal:
|
|
1369
|
+
isVertical: c,
|
|
1370
|
+
isHorizontal: d
|
|
1371
1371
|
};
|
|
1372
1372
|
}
|
|
1373
1373
|
const vt = 250, Mt = 5, Qn = 500;
|
|
@@ -1377,21 +1377,21 @@ function Yn(t) {
|
|
|
1377
1377
|
function l() {
|
|
1378
1378
|
n = Date.now();
|
|
1379
1379
|
}
|
|
1380
|
-
async function s(a,
|
|
1381
|
-
const
|
|
1382
|
-
a < Mt &&
|
|
1380
|
+
async function s(a, c) {
|
|
1381
|
+
const d = Date.now() - n;
|
|
1382
|
+
a < Mt && c < Mt && (d < vt ? e ? o ? (clearTimeout(o), o = null, t.onDoubleTap?.()) : o = setTimeout(async () => {
|
|
1383
1383
|
t.onTap?.(), o = null;
|
|
1384
|
-
}, vt) : t.onTap?.() :
|
|
1384
|
+
}, vt) : t.onTap?.() : d > Qn && t.onLongPress?.());
|
|
1385
1385
|
}
|
|
1386
1386
|
return { startTap: l, checkTap: s };
|
|
1387
1387
|
}
|
|
1388
1388
|
function Bn(t, e) {
|
|
1389
1389
|
const n = g(!1);
|
|
1390
1390
|
function o() {
|
|
1391
|
-
n.value || (n.value = !0,
|
|
1391
|
+
n.value || (n.value = !0, A(t)?.addEventListener("transitionend", l));
|
|
1392
1392
|
}
|
|
1393
1393
|
function l() {
|
|
1394
|
-
|
|
1394
|
+
A(t)?.removeEventListener("transitionend", l), n.value = !1, e.onComplate?.();
|
|
1395
1395
|
}
|
|
1396
1396
|
return { transitioning: n, startTransition: o };
|
|
1397
1397
|
}
|
|
@@ -1429,18 +1429,18 @@ function $n(t) {
|
|
|
1429
1429
|
};
|
|
1430
1430
|
}
|
|
1431
1431
|
function xt(t) {
|
|
1432
|
-
const e = g(!1), n = g(!1), o = g(1), l = g(9), s = g(), a = g(),
|
|
1432
|
+
const e = g(!1), n = g(!1), o = g(1), l = g(9), s = g(), a = g(), c = g({ width: 0, height: 0 }), d = g({ width: 0, height: 0 }), i = Ie({
|
|
1433
1433
|
level: 1,
|
|
1434
1434
|
offsetX: 0,
|
|
1435
1435
|
offsetY: 0,
|
|
1436
1436
|
zooming: !1,
|
|
1437
1437
|
preview: !0,
|
|
1438
1438
|
lastCenter: { x: 0, y: 0 }
|
|
1439
|
-
}), f = g({}),
|
|
1439
|
+
}), f = g({}), r = kn(), M = Bn(a, {
|
|
1440
1440
|
onComplate() {
|
|
1441
1441
|
i.preview || I();
|
|
1442
1442
|
}
|
|
1443
|
-
}),
|
|
1443
|
+
}), v = Yn({
|
|
1444
1444
|
onTap() {
|
|
1445
1445
|
t.onTap?.();
|
|
1446
1446
|
},
|
|
@@ -1453,118 +1453,118 @@ function xt(t) {
|
|
|
1453
1453
|
});
|
|
1454
1454
|
je(a, (D) => u(D)), G(
|
|
1455
1455
|
[s, a],
|
|
1456
|
-
([D,
|
|
1457
|
-
|
|
1456
|
+
([D, N]) => {
|
|
1457
|
+
p(D, N);
|
|
1458
1458
|
},
|
|
1459
1459
|
{ immediate: !0 }
|
|
1460
1460
|
);
|
|
1461
1461
|
async function u(D) {
|
|
1462
|
-
const [
|
|
1463
|
-
|
|
1462
|
+
const [N] = D;
|
|
1463
|
+
N.contentRect.width == d.value.width && N.contentRect.height == d.value.height || (await p(s.value), await I(i.level, !0));
|
|
1464
1464
|
}
|
|
1465
|
-
async function
|
|
1466
|
-
await
|
|
1465
|
+
async function p(D, N) {
|
|
1466
|
+
await H(D, N), D && Q();
|
|
1467
1467
|
}
|
|
1468
|
-
async function
|
|
1468
|
+
async function h(D) {
|
|
1469
1469
|
if (!i.preview)
|
|
1470
1470
|
return;
|
|
1471
1471
|
i.preview = !1, D = D ?? i.level;
|
|
1472
|
-
const
|
|
1473
|
-
if (!
|
|
1472
|
+
const N = a.value;
|
|
1473
|
+
if (!N)
|
|
1474
1474
|
return;
|
|
1475
|
-
const { scrollTop: T, scrollLeft:
|
|
1476
|
-
|
|
1477
|
-
const { value:
|
|
1478
|
-
|
|
1475
|
+
const { scrollTop: T, scrollLeft: C } = N, { width: O, height: k } = c.value, { scaleW: Y, scaleH: $ } = _(D), { top: V, left: ne } = b(Y, $), Me = ne != 0 ? ne : C * -1, ie = V != 0 ? V : T * -1;
|
|
1476
|
+
N.scrollTop = 0, N.scrollLeft = 0;
|
|
1477
|
+
const { value: Z } = f;
|
|
1478
|
+
Z.width = `${O}px`, Z.height = `${k}px`, Z.maxHeight = "none", Z.transitionDuration = "0s", Z.transform = Re(Me, ie, D), f.value = Z, await De(), i.offsetX = Me, i.offsetY = ie, await Ce(20);
|
|
1479
1479
|
}
|
|
1480
|
-
async function I(D,
|
|
1481
|
-
if (!
|
|
1480
|
+
async function I(D, N) {
|
|
1481
|
+
if (!N && i.preview)
|
|
1482
1482
|
return;
|
|
1483
1483
|
i.preview = !0, D = D ?? i.level;
|
|
1484
|
-
const { value: T } = f, { scaleW:
|
|
1485
|
-
D === 1 && (T.maxHeight = "100%"), T.width = `${
|
|
1486
|
-
const
|
|
1487
|
-
if (
|
|
1484
|
+
const { value: T } = f, { scaleW: C, scaleH: O } = _(D), { left: k, top: Y } = b(C, O);
|
|
1485
|
+
D === 1 && (T.maxHeight = "100%"), T.width = `${C}px`, T.height = `${O}px`, T.transitionDuration = "0s", T.filter = "blur(0.1px)", T.transform = Re(k, Y, 1), f.value = T, await De();
|
|
1486
|
+
const $ = a.value;
|
|
1487
|
+
if (!$)
|
|
1488
1488
|
return;
|
|
1489
1489
|
const { offsetX: V, offsetY: ne } = i;
|
|
1490
|
-
V < 0 && (
|
|
1490
|
+
V < 0 && ($.scrollLeft = Math.abs(V)), ne < 0 && ($.scrollTop = Math.abs(ne)), await j();
|
|
1491
1491
|
}
|
|
1492
1492
|
async function j() {
|
|
1493
1493
|
await Ce(15), delete f.value.filter;
|
|
1494
1494
|
}
|
|
1495
|
-
async function
|
|
1495
|
+
async function L(D, N, T) {
|
|
1496
1496
|
if (e.value || (D = re(D), D = Ue(
|
|
1497
1497
|
D,
|
|
1498
1498
|
o.value - o.value * 0.5,
|
|
1499
1499
|
l.value + l.value * 0.5
|
|
1500
1500
|
), D == i.level))
|
|
1501
1501
|
return;
|
|
1502
|
-
i.preview && await
|
|
1503
|
-
const { value:
|
|
1504
|
-
left: Math.abs(
|
|
1505
|
-
top: Math.abs(k * D -
|
|
1502
|
+
i.preview && await h(), N || (N = { x: r.startX.value, y: r.startY.value });
|
|
1503
|
+
const { value: C } = f, { width: O, height: k } = c.value, { scaleW: Y, scaleH: $ } = _(D), { top: V, left: ne } = b(Y, $), Me = D / i.level, ie = {
|
|
1504
|
+
left: Math.abs(O * D - d.value.width) * -1,
|
|
1505
|
+
top: Math.abs(k * D - d.value.height) * -1,
|
|
1506
1506
|
right: ne,
|
|
1507
1507
|
bottom: V
|
|
1508
1508
|
};
|
|
1509
|
-
let
|
|
1510
|
-
|
|
1509
|
+
let Z = ne != 0 ? ne : (i.offsetX - N.x) * Me + N.x, pe = V != 0 ? V : (i.offsetY - N.y) * Me + N.y;
|
|
1510
|
+
Z = re(Ue(Z, ie.left, ie.right)), pe = re(Ue(pe, ie.top, ie.bottom)), C.width = `${O}px`, C.height = `${k}px`, C.transitionDuration = T ? Rn(D) : "0s", C.transform = Re(Z, pe, D), i.offsetX = Z, i.offsetY = pe, i.level = D, f.value = C, await De(), T && M.startTransition(), t.onScale?.(D);
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1513
|
-
const D = i.level > 1 ? 1 :
|
|
1514
|
-
|
|
1512
|
+
function m() {
|
|
1513
|
+
const D = i.level > 1 ? 1 : w();
|
|
1514
|
+
L(D, void 0, !0);
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function y(D, N) {
|
|
1517
1517
|
if (!i.preview)
|
|
1518
1518
|
return;
|
|
1519
1519
|
const T = a.value;
|
|
1520
1520
|
!T || T.scrollTo({
|
|
1521
1521
|
left: i.offsetX - D,
|
|
1522
|
-
top: i.offsetY -
|
|
1522
|
+
top: i.offsetY - N
|
|
1523
1523
|
});
|
|
1524
1524
|
}
|
|
1525
1525
|
async function E() {
|
|
1526
|
-
i.level >= o.value && i.level <= l.value ? i.zooming && await I() : i.level < o.value ? await
|
|
1526
|
+
i.level >= o.value && i.level <= l.value ? i.zooming && await I() : i.level < o.value ? await L(o.value, void 0, !0) : i.level > l.value && await L(l.value, i.lastCenter, !0), i.zooming = !1;
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1529
|
-
const { width: D, height:
|
|
1528
|
+
function w() {
|
|
1529
|
+
const { width: D, height: N } = c.value, { width: T, height: C } = d.value, O = 2.5;
|
|
1530
1530
|
let k;
|
|
1531
|
-
return
|
|
1531
|
+
return N == C ? (k = T / D, k - 1 < 0.1 && (k = O)) : k = Math.max(O, T / D, C / N), isNaN(k) ? O : k;
|
|
1532
1532
|
}
|
|
1533
|
-
function
|
|
1534
|
-
const { width:
|
|
1533
|
+
function _(D) {
|
|
1534
|
+
const { width: N, height: T } = c.value;
|
|
1535
1535
|
return {
|
|
1536
|
-
scaleW: re(D *
|
|
1536
|
+
scaleW: re(D * N),
|
|
1537
1537
|
scaleH: re(D * T)
|
|
1538
1538
|
};
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1541
|
-
const { width: T, height:
|
|
1542
|
-
return { top:
|
|
1540
|
+
function b(D, N) {
|
|
1541
|
+
const { width: T, height: C } = d.value, O = Math.max(0, (C - N) * 0.5), k = Math.max(0, (T - D) * 0.5);
|
|
1542
|
+
return { top: O, left: k };
|
|
1543
1543
|
}
|
|
1544
|
-
async function
|
|
1545
|
-
if (D = D ?? s.value,
|
|
1544
|
+
async function H(D, N) {
|
|
1545
|
+
if (D = D ?? s.value, N = N ?? a.value, !N)
|
|
1546
1546
|
return;
|
|
1547
|
-
let T, { clientWidth:
|
|
1548
|
-
const { clientWidth: k, clientHeight:
|
|
1547
|
+
let T, { clientWidth: C = 0, clientHeight: O = 0 } = D || {};
|
|
1548
|
+
const { clientWidth: k, clientHeight: Y } = N;
|
|
1549
1549
|
if (D instanceof HTMLImageElement ? T = { width: D.naturalWidth, height: D.naturalHeight } : D instanceof HTMLVideoElement && (T = { width: D.videoWidth, height: D.videoHeight }), T) {
|
|
1550
|
-
const
|
|
1550
|
+
const $ = Un(
|
|
1551
1551
|
T.width,
|
|
1552
1552
|
T.height,
|
|
1553
1553
|
k,
|
|
1554
|
-
|
|
1554
|
+
Y
|
|
1555
1555
|
);
|
|
1556
|
-
|
|
1556
|
+
C = $.width, O = $.height;
|
|
1557
1557
|
}
|
|
1558
|
-
(
|
|
1559
|
-
width: Math.min(
|
|
1560
|
-
height: Math.min(
|
|
1561
|
-
},
|
|
1558
|
+
(C === 0 || O === 0) && (C = c.value.width || k, O = c.value.height || Y), c.value = {
|
|
1559
|
+
width: Math.min(C, k),
|
|
1560
|
+
height: Math.min(O, Y)
|
|
1561
|
+
}, d.value = { width: k, height: Y }, I(void 0, !0);
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1564
|
-
const D =
|
|
1563
|
+
function Q() {
|
|
1564
|
+
const D = w();
|
|
1565
1565
|
l.value = Math.max(l.value, D * 2);
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1567
|
+
function U(D) {
|
|
1568
1568
|
e.value = D;
|
|
1569
1569
|
}
|
|
1570
1570
|
function ee() {
|
|
@@ -1574,56 +1574,56 @@ function xt(t) {
|
|
|
1574
1574
|
n.value = D;
|
|
1575
1575
|
}
|
|
1576
1576
|
return {
|
|
1577
|
-
touch:
|
|
1577
|
+
touch: r,
|
|
1578
1578
|
state: i,
|
|
1579
1579
|
style: f,
|
|
1580
|
-
gesture:
|
|
1580
|
+
gesture: v,
|
|
1581
1581
|
transition: M,
|
|
1582
1582
|
imageRef: s,
|
|
1583
1583
|
containerRef: a,
|
|
1584
|
-
switchToZoom:
|
|
1584
|
+
switchToZoom: h,
|
|
1585
1585
|
switchToPreview: I,
|
|
1586
|
-
panTo:
|
|
1587
|
-
zoomTo:
|
|
1586
|
+
panTo: y,
|
|
1587
|
+
zoomTo: L,
|
|
1588
1588
|
zoomFinished: E,
|
|
1589
|
-
toggleZoom:
|
|
1590
|
-
setDisableZoom:
|
|
1589
|
+
toggleZoom: m,
|
|
1590
|
+
setDisableZoom: U,
|
|
1591
1591
|
setDisableMove: te,
|
|
1592
1592
|
getDisableMove: ee
|
|
1593
1593
|
};
|
|
1594
1594
|
}
|
|
1595
1595
|
function St(t, e) {
|
|
1596
1596
|
const { state: n, touch: o, transition: l, containerRef: s } = t, a = un(s);
|
|
1597
|
-
let
|
|
1597
|
+
let c, d;
|
|
1598
1598
|
function i(M) {
|
|
1599
|
-
|
|
1599
|
+
c = M;
|
|
1600
1600
|
}
|
|
1601
1601
|
function f(M) {
|
|
1602
|
-
return
|
|
1602
|
+
return c == M;
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function r(M, v, u, p) {
|
|
1605
1605
|
a.measure();
|
|
1606
|
-
const { top:
|
|
1606
|
+
const { top: h, left: I, right: j, bottom: L } = a.arrivedState;
|
|
1607
1607
|
if (M == "start")
|
|
1608
|
-
|
|
1609
|
-
else if (
|
|
1610
|
-
|
|
1611
|
-
else if (
|
|
1608
|
+
d = h || I || j || L;
|
|
1609
|
+
else if (c == 2)
|
|
1610
|
+
d = !1;
|
|
1611
|
+
else if (d) {
|
|
1612
1612
|
if (o.direction.value == "vertical")
|
|
1613
1613
|
if (n.level != 1)
|
|
1614
|
-
|
|
1614
|
+
d = !1;
|
|
1615
1615
|
else {
|
|
1616
|
-
const
|
|
1617
|
-
|
|
1616
|
+
const m = o.startY.value < u;
|
|
1617
|
+
d = h && m || L && !m;
|
|
1618
1618
|
}
|
|
1619
1619
|
else if (o.direction.value == "horizontal") {
|
|
1620
|
-
const
|
|
1621
|
-
|
|
1620
|
+
const m = o.startX.value < v;
|
|
1621
|
+
d = I && m || j && !m;
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
|
-
|
|
1624
|
+
d && l.transitioning.value && (d = !1, p?.preventDefault()), M == "end" && !d && (v = o.startX.value, u = o.startY.value, d = !0), (M != "move" || d) && e?.(M, o.direction.value, v, u, p);
|
|
1625
1625
|
}
|
|
1626
|
-
return { onSwipeEdge:
|
|
1626
|
+
return { onSwipeEdge: r, setFingerNum: i, isEqualFingerNum: f };
|
|
1627
1627
|
}
|
|
1628
1628
|
function Wo(t) {
|
|
1629
1629
|
const e = xt({
|
|
@@ -1632,57 +1632,57 @@ function Wo(t) {
|
|
|
1632
1632
|
},
|
|
1633
1633
|
...t
|
|
1634
1634
|
}), { state: n, touch: o, gesture: l, transition: s } = e;
|
|
1635
|
-
let a = !1,
|
|
1636
|
-
const
|
|
1635
|
+
let a = !1, c = null;
|
|
1636
|
+
const d = { top: 0, left: 0 }, i = ke(h, 150), { onSwipeEdge: f } = St(e, t.onSwipeEdge), r = g({ top: 0, left: 0 });
|
|
1637
1637
|
Le("keyup", j), Le("keydown", I);
|
|
1638
|
-
function M(
|
|
1639
|
-
const
|
|
1640
|
-
if (!
|
|
1638
|
+
function M(L) {
|
|
1639
|
+
const m = e.containerRef.value;
|
|
1640
|
+
if (!m)
|
|
1641
1641
|
return;
|
|
1642
|
-
const { left:
|
|
1643
|
-
|
|
1644
|
-
let
|
|
1645
|
-
o.start(
|
|
1642
|
+
const { left: y, top: E } = m.getBoundingClientRect();
|
|
1643
|
+
r.value.left = y, r.value.top = E, l.startTap();
|
|
1644
|
+
let w = L.clientX - y, _ = L.clientY - E;
|
|
1645
|
+
o.start(w, _), f("start", w, _, L), s.transitioning.value || (a = !0, d.left = y, d.top = E, n.offsetX = m.scrollLeft, n.offsetY = m.scrollTop), window.addEventListener("pointermove", v), window.addEventListener("pointerup", u);
|
|
1646
1646
|
}
|
|
1647
|
-
function
|
|
1647
|
+
function v(L) {
|
|
1648
1648
|
if (!a || e.getDisableMove())
|
|
1649
1649
|
return;
|
|
1650
|
-
let
|
|
1651
|
-
o.move(
|
|
1650
|
+
let m = L.clientX, y = L.clientY;
|
|
1651
|
+
o.move(m, y), f(
|
|
1652
1652
|
"move",
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1653
|
+
m - r.value.left,
|
|
1654
|
+
y - r.value.top,
|
|
1655
|
+
L
|
|
1656
1656
|
), n.level !== 1 && e.panTo(
|
|
1657
|
-
o.deltaX.value -
|
|
1658
|
-
o.deltaY.value -
|
|
1657
|
+
o.deltaX.value - d.left,
|
|
1658
|
+
o.deltaY.value - d.top
|
|
1659
1659
|
);
|
|
1660
1660
|
}
|
|
1661
|
-
function u(
|
|
1662
|
-
f("end", o.offsetX.value, o.offsetY.value,
|
|
1661
|
+
function u(L) {
|
|
1662
|
+
f("end", o.offsetX.value, o.offsetY.value, L), l.checkTap(o.offsetX.value, o.offsetY.value), o.reset(), a = !1, window.removeEventListener("pointermove", v), window.removeEventListener("pointerup", u);
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1665
|
-
if (!
|
|
1664
|
+
function p(L) {
|
|
1665
|
+
if (!L.ctrlKey)
|
|
1666
1666
|
return;
|
|
1667
|
-
n.zooming || (n.zooming = !0,
|
|
1668
|
-
let
|
|
1669
|
-
|
|
1670
|
-
const
|
|
1667
|
+
n.zooming || (n.zooming = !0, c == "Control" && window.addEventListener("keyup", h)), L.preventDefault();
|
|
1668
|
+
let m = -L.deltaY;
|
|
1669
|
+
L.deltaMode === 1 ? m *= 0.05 : m *= L.deltaMode ? 1 : 2e-3, c != "Control" && (m *= 10), m = 2 ** m;
|
|
1670
|
+
const y = n.level * m;
|
|
1671
1671
|
n.lastCenter = {
|
|
1672
|
-
x:
|
|
1673
|
-
y:
|
|
1674
|
-
}, e.zoomTo(
|
|
1672
|
+
x: L.clientX - r.value.left,
|
|
1673
|
+
y: L.clientY - r.value.top
|
|
1674
|
+
}, e.zoomTo(y, n.lastCenter), c != "Control" && i();
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1677
|
-
e.zoomFinished(), window.removeEventListener("keyup",
|
|
1676
|
+
function h() {
|
|
1677
|
+
e.zoomFinished(), window.removeEventListener("keyup", h);
|
|
1678
1678
|
}
|
|
1679
|
-
function I(
|
|
1680
|
-
|
|
1679
|
+
function I(L) {
|
|
1680
|
+
c = L.key;
|
|
1681
1681
|
}
|
|
1682
1682
|
function j() {
|
|
1683
|
-
|
|
1683
|
+
c = null;
|
|
1684
1684
|
}
|
|
1685
|
-
return { core: e, onPointerDown: M, onWheel:
|
|
1685
|
+
return { core: e, onPointerDown: M, onWheel: p };
|
|
1686
1686
|
}
|
|
1687
1687
|
function Xo(t) {
|
|
1688
1688
|
const e = xt({
|
|
@@ -1690,36 +1690,36 @@ function Xo(t) {
|
|
|
1690
1690
|
e.toggleZoom();
|
|
1691
1691
|
},
|
|
1692
1692
|
...t
|
|
1693
|
-
}), { state: n, touch: o, gesture: l } = e, { setFingerNum: s, onSwipeEdge: a, isEqualFingerNum:
|
|
1693
|
+
}), { state: n, touch: o, gesture: l } = e, { setFingerNum: s, onSwipeEdge: a, isEqualFingerNum: c } = St(
|
|
1694
1694
|
e,
|
|
1695
1695
|
t.onSwipeEdge
|
|
1696
1696
|
);
|
|
1697
|
-
let
|
|
1698
|
-
async function f(
|
|
1699
|
-
const { touches: u } =
|
|
1700
|
-
s(u.length), n.zooming =
|
|
1701
|
-
const { clientX:
|
|
1702
|
-
o.start(
|
|
1703
|
-
}
|
|
1704
|
-
async function
|
|
1697
|
+
let d, i;
|
|
1698
|
+
async function f(v) {
|
|
1699
|
+
const { touches: u } = v;
|
|
1700
|
+
s(u.length), n.zooming = c(2), l.startTap();
|
|
1701
|
+
const { clientX: p, clientY: h } = u[0];
|
|
1702
|
+
o.start(p, h), a("start", p, h, v), n.zooming && (v.preventDefault(), d = n.level, i = gt(u), await e.switchToZoom(), n.lastCenter = $n(u));
|
|
1703
|
+
}
|
|
1704
|
+
async function r(v) {
|
|
1705
1705
|
if (e.getDisableMove())
|
|
1706
1706
|
return;
|
|
1707
|
-
const { touches: u } =
|
|
1707
|
+
const { touches: u } = v;
|
|
1708
1708
|
s(u.length);
|
|
1709
|
-
const { clientX:
|
|
1710
|
-
if (o.move(
|
|
1711
|
-
|
|
1712
|
-
const I = gt(u), j =
|
|
1709
|
+
const { clientX: p, clientY: h } = u[0];
|
|
1710
|
+
if (o.move(p, h), a("move", p, h, v), n.zooming && c(2)) {
|
|
1711
|
+
v.preventDefault();
|
|
1712
|
+
const I = gt(u), j = d * I / i;
|
|
1713
1713
|
e.zoomTo(j, n.lastCenter);
|
|
1714
1714
|
}
|
|
1715
1715
|
}
|
|
1716
|
-
async function M(
|
|
1717
|
-
if (
|
|
1716
|
+
async function M(v) {
|
|
1717
|
+
if (v.touches.length)
|
|
1718
1718
|
return;
|
|
1719
|
-
const { clientX: u, clientY:
|
|
1720
|
-
a("end", u,
|
|
1719
|
+
const { clientX: u, clientY: p } = v.changedTouches[0];
|
|
1720
|
+
a("end", u, p, v), l.checkTap(o.offsetX.value, o.offsetY.value), e.zoomFinished(), o.reset();
|
|
1721
1721
|
}
|
|
1722
|
-
return { core: e, onTouchStart: f, onTouchMove:
|
|
1722
|
+
return { core: e, onTouchStart: f, onTouchMove: r, onTouchEnd: M };
|
|
1723
1723
|
}
|
|
1724
1724
|
function Zo() {
|
|
1725
1725
|
const t = Ie({
|
|
@@ -1787,7 +1787,7 @@ const Fn = ["onClick"], Wn = /* @__PURE__ */ J({
|
|
|
1787
1787
|
buttonClickEvent: null
|
|
1788
1788
|
},
|
|
1789
1789
|
setup(t) {
|
|
1790
|
-
const e = t, n = g(), o = g(), l = g(), s =
|
|
1790
|
+
const e = t, n = g(), o = g(), l = g(), s = z(() => {
|
|
1791
1791
|
switch (e.position) {
|
|
1792
1792
|
case "top":
|
|
1793
1793
|
return 10;
|
|
@@ -1796,14 +1796,14 @@ const Fn = ["onClick"], Wn = /* @__PURE__ */ J({
|
|
|
1796
1796
|
case "bottom":
|
|
1797
1797
|
return 85;
|
|
1798
1798
|
}
|
|
1799
|
-
}), a =
|
|
1799
|
+
}), a = z(() => ({
|
|
1800
1800
|
position: "absolute",
|
|
1801
1801
|
borderRadius: "10px",
|
|
1802
1802
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
1803
1803
|
padding: "14px 19px",
|
|
1804
1804
|
top: `calc(${s.value}% - ${l.value}px)`,
|
|
1805
1805
|
left: `calc(50% - ${o.value}px)`
|
|
1806
|
-
})),
|
|
1806
|
+
})), c = z(() => ({
|
|
1807
1807
|
width: "fit-content",
|
|
1808
1808
|
display: "flex",
|
|
1809
1809
|
justifyContent: "center",
|
|
@@ -1811,23 +1811,23 @@ const Fn = ["onClick"], Wn = /* @__PURE__ */ J({
|
|
|
1811
1811
|
color: "white",
|
|
1812
1812
|
fontSize: "14px"
|
|
1813
1813
|
}));
|
|
1814
|
-
function
|
|
1814
|
+
function d() {
|
|
1815
1815
|
!e.buttonClickEvent || e.buttonClickEvent();
|
|
1816
1816
|
}
|
|
1817
1817
|
return De(() => {
|
|
1818
1818
|
o.value = n.value.offsetWidth / 2, l.value = n.value.offsetHeight / 2;
|
|
1819
|
-
}), (i, f) => (
|
|
1820
|
-
onClick: we(
|
|
1819
|
+
}), (i, f) => (R(), P("div", {
|
|
1820
|
+
onClick: we(d, ["stop"]),
|
|
1821
1821
|
id: "toastWrapper",
|
|
1822
1822
|
ref_key: "toastWrapper",
|
|
1823
1823
|
ref: n,
|
|
1824
1824
|
class: "toastWrapper",
|
|
1825
|
-
style: q([
|
|
1825
|
+
style: q([A(a), { zIndex: 9999999 }])
|
|
1826
1826
|
}, [
|
|
1827
|
-
|
|
1828
|
-
style: q(
|
|
1827
|
+
B("div", {
|
|
1828
|
+
style: q(A(c))
|
|
1829
1829
|
}, [
|
|
1830
|
-
|
|
1830
|
+
B("span", null, Ke(t.message), 1)
|
|
1831
1831
|
], 4)
|
|
1832
1832
|
], 12, Fn));
|
|
1833
1833
|
}
|
|
@@ -1874,7 +1874,7 @@ const Zn = ["xlink:href", "fill", "color"], xe = /* @__PURE__ */ J({
|
|
|
1874
1874
|
height: null
|
|
1875
1875
|
},
|
|
1876
1876
|
setup(t) {
|
|
1877
|
-
const e = t, n =
|
|
1877
|
+
const e = t, n = z(() => `#${e.prefix}-${e.name}`), o = z(() => ({
|
|
1878
1878
|
width: `${e.width ?? e.height}px`,
|
|
1879
1879
|
height: `${e.height ?? e.width}px`,
|
|
1880
1880
|
aspectRatio: e.width && e.height ? void 0 : "1/1"
|
|
@@ -1883,12 +1883,12 @@ const Zn = ["xlink:href", "fill", "color"], xe = /* @__PURE__ */ J({
|
|
|
1883
1883
|
const { style: a } = s;
|
|
1884
1884
|
return typeof a == "object" ? a : {};
|
|
1885
1885
|
}
|
|
1886
|
-
return (s, a) => (
|
|
1886
|
+
return (s, a) => (R(), P("svg", {
|
|
1887
1887
|
"aria-hidden": "",
|
|
1888
|
-
style: q({ ...
|
|
1888
|
+
style: q({ ...A(o), ...l(s.$attrs) })
|
|
1889
1889
|
}, [
|
|
1890
|
-
|
|
1891
|
-
"xlink:href":
|
|
1890
|
+
B("use", {
|
|
1891
|
+
"xlink:href": A(n),
|
|
1892
1892
|
fill: t.color,
|
|
1893
1893
|
color: t.color
|
|
1894
1894
|
}, null, 8, Zn)
|
|
@@ -1903,108 +1903,108 @@ function Vn(t) {
|
|
|
1903
1903
|
performance: l = {},
|
|
1904
1904
|
maxHeightRatio: s = 0.9,
|
|
1905
1905
|
observeMethod: a = "classList"
|
|
1906
|
-
} = t,
|
|
1906
|
+
} = t, c = g(!0), d = ke(H, 100);
|
|
1907
1907
|
let i, f = "";
|
|
1908
|
-
const
|
|
1908
|
+
const r = g(0), M = g(0), v = g(0), u = g({
|
|
1909
1909
|
top: 0,
|
|
1910
1910
|
scrollTop: 0,
|
|
1911
1911
|
scrollHeight: 0,
|
|
1912
1912
|
clientHeight: 0
|
|
1913
|
-
}),
|
|
1913
|
+
}), p = g({
|
|
1914
1914
|
clientHeight: 0
|
|
1915
|
-
}),
|
|
1915
|
+
}), h = z(() => !!M.value), I = z(() => u.value.scrollHeight > u.value.clientHeight), j = z(() => o ? u.value.clientHeight - y.value : u.value.clientHeight - p.value.clientHeight), L = z(() => u.value.scrollHeight - u.value.clientHeight), m = z(() => !u.value.clientHeight && !u.value.scrollHeight ? 1 : Math.max(
|
|
1916
1916
|
u.value.clientHeight / u.value.scrollHeight,
|
|
1917
1917
|
0.05
|
|
1918
|
-
)),
|
|
1918
|
+
)), y = z(() => m.value > s ? 0 : m.value * u.value.clientHeight), E = z(() => ({
|
|
1919
1919
|
willChange: "transform",
|
|
1920
|
-
transform: `translate3d(0,${
|
|
1921
|
-
height: o ? `${
|
|
1920
|
+
transform: `translate3d(0,${v.value}px,0)`,
|
|
1921
|
+
height: o ? `${y.value}px` : void 0
|
|
1922
1922
|
}));
|
|
1923
|
-
je(e, () => T()), je(n, () =>
|
|
1924
|
-
function
|
|
1925
|
-
|
|
1923
|
+
je(e, () => T()), je(n, () => C());
|
|
1924
|
+
function w(Y) {
|
|
1925
|
+
b(), M.value = Y.clientY - n.value.getBoundingClientRect().top || 1, f = getComputedStyle(e.value).scrollBehavior, f === "smooth" && (e.value.style.scrollBehavior = "unset");
|
|
1926
1926
|
}
|
|
1927
|
-
function
|
|
1928
|
-
e.value.style.scrollBehavior = f, M.value = 0,
|
|
1927
|
+
function _() {
|
|
1928
|
+
e.value.style.scrollBehavior = f, M.value = 0, d();
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1931
|
-
|
|
1930
|
+
function b() {
|
|
1931
|
+
c.value = !1;
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1934
|
-
|
|
1933
|
+
function H() {
|
|
1934
|
+
h.value || (c.value = !0);
|
|
1935
1935
|
}
|
|
1936
|
-
function
|
|
1937
|
-
if (!
|
|
1936
|
+
function Q(Y) {
|
|
1937
|
+
if (!h.value)
|
|
1938
1938
|
return;
|
|
1939
|
-
let
|
|
1940
|
-
|
|
1941
|
-
top:
|
|
1939
|
+
let $ = Y.clientY - u.value.top - M.value;
|
|
1940
|
+
$ < 0 ? v.value = 0 : $ >= j.value ? v.value = j.value : v.value = $, e.value.scrollTo({
|
|
1941
|
+
top: v.value / j.value * L.value
|
|
1942
1942
|
});
|
|
1943
1943
|
}
|
|
1944
|
-
function
|
|
1945
|
-
|
|
1944
|
+
function U() {
|
|
1945
|
+
h.value || ee();
|
|
1946
1946
|
}
|
|
1947
1947
|
function ee() {
|
|
1948
1948
|
cancelAnimationFrame(i), i = requestAnimationFrame(te);
|
|
1949
1949
|
}
|
|
1950
1950
|
function te() {
|
|
1951
|
-
e.value && (
|
|
1951
|
+
e.value && (r.value = l.scrollTop?.value ?? e.value.scrollTop, v.value = r.value / L.value * j.value);
|
|
1952
1952
|
}
|
|
1953
|
-
function D(
|
|
1954
|
-
let
|
|
1955
|
-
|
|
1953
|
+
function D(Y) {
|
|
1954
|
+
let $ = "addEventListener";
|
|
1955
|
+
Y === "add" ? $ = "addEventListener" : $ = "removeEventListener", n.value?.[$]("pointerdown", w, {
|
|
1956
1956
|
passive: !0
|
|
1957
|
-
}), window[
|
|
1957
|
+
}), window[$]("pointermove", Q, { passive: !0 }), window[$]("pointerup", _, { passive: !0 });
|
|
1958
1958
|
}
|
|
1959
|
-
const
|
|
1960
|
-
(a == "classList" ||
|
|
1959
|
+
const N = new MutationObserver((Y) => {
|
|
1960
|
+
(a == "classList" || Y.map((V) => V.oldValue).join().includes("height")) && T();
|
|
1961
1961
|
});
|
|
1962
1962
|
function T() {
|
|
1963
1963
|
u.value.top = e.value?.getBoundingClientRect().top ?? 0;
|
|
1964
|
-
const { scrollHeight:
|
|
1965
|
-
|
|
1964
|
+
const { scrollHeight: Y = 0, clientHeight: $ = 0 } = e.value || {}, { scrollHeight: V, clientHeight: ne } = u.value;
|
|
1965
|
+
Y != V && (u.value.scrollHeight = Y, te()), $ != ne && (u.value.clientHeight = $, te());
|
|
1966
1966
|
}
|
|
1967
|
-
function
|
|
1968
|
-
const { clientHeight:
|
|
1969
|
-
|
|
1967
|
+
function C() {
|
|
1968
|
+
const { clientHeight: Y = 0 } = n.value || {};
|
|
1969
|
+
Y != p.value.clientHeight && (p.value.clientHeight = Y);
|
|
1970
1970
|
}
|
|
1971
|
-
function
|
|
1972
|
-
|
|
1973
|
-
|
|
1971
|
+
function O() {
|
|
1972
|
+
b(), setTimeout(() => {
|
|
1973
|
+
p.value.clientHeight = n.value?.clientHeight ?? 0, H();
|
|
1974
1974
|
}, 150);
|
|
1975
1975
|
}
|
|
1976
1976
|
function k() {
|
|
1977
1977
|
if (e.value && n.value) {
|
|
1978
|
-
e.value.classList.add("hide-scrollbar"), e.value.addEventListener("scroll",
|
|
1978
|
+
e.value.classList.add("hide-scrollbar"), e.value.addEventListener("scroll", U, {
|
|
1979
1979
|
passive: !0
|
|
1980
1980
|
}), D("add");
|
|
1981
|
-
const
|
|
1982
|
-
a === "classList" ? Object.assign(
|
|
1981
|
+
const Y = {};
|
|
1982
|
+
a === "classList" ? Object.assign(Y, { subtree: !0, childList: !0 }) : Object.assign(Y, {
|
|
1983
1983
|
subtree: !0,
|
|
1984
1984
|
attributeOldValue: !0,
|
|
1985
1985
|
attributeFilter: ["style"]
|
|
1986
|
-
}),
|
|
1986
|
+
}), N.observe(e.value, Y), setTimeout(() => {
|
|
1987
1987
|
T();
|
|
1988
|
-
}, 100),
|
|
1988
|
+
}, 100), O();
|
|
1989
1989
|
} else
|
|
1990
1990
|
console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: e, sliderEl: n });
|
|
1991
1991
|
}
|
|
1992
|
-
return G(
|
|
1993
|
-
|
|
1992
|
+
return G(r, () => {
|
|
1993
|
+
b(), d();
|
|
1994
1994
|
}), {
|
|
1995
|
-
isScrollEnd:
|
|
1996
|
-
isDragSlider:
|
|
1997
|
-
offsetTop:
|
|
1998
|
-
scrollTop:
|
|
1995
|
+
isScrollEnd: c,
|
|
1996
|
+
isDragSlider: h,
|
|
1997
|
+
offsetTop: v,
|
|
1998
|
+
scrollTop: r,
|
|
1999
1999
|
scrollable: I,
|
|
2000
2000
|
sliderPos: E,
|
|
2001
2001
|
sliderRollableHeight: j,
|
|
2002
2002
|
init: k,
|
|
2003
2003
|
modifySliderEventListener: D,
|
|
2004
|
-
heightRatio:
|
|
2004
|
+
heightRatio: m
|
|
2005
2005
|
};
|
|
2006
2006
|
}
|
|
2007
|
-
const Kn = (t) => (be("data-v-7fd39e51"), t = t(), Oe(), t), Gn = /* @__PURE__ */ Kn(() => /* @__PURE__ */
|
|
2007
|
+
const Kn = (t) => (be("data-v-7fd39e51"), t = t(), Oe(), t), Gn = /* @__PURE__ */ Kn(() => /* @__PURE__ */ B("div", { class: "default-slider" }, null, -1)), qn = /* @__PURE__ */ J({
|
|
2008
2008
|
__name: "ScrollBar",
|
|
2009
2009
|
props: {
|
|
2010
2010
|
containerEl: null,
|
|
@@ -2015,13 +2015,13 @@ const Kn = (t) => (be("data-v-7fd39e51"), t = t(), Oe(), t), Gn = /* @__PURE__ *
|
|
|
2015
2015
|
maxHeightRatio: { default: 0.9 }
|
|
2016
2016
|
},
|
|
2017
2017
|
setup(t, { expose: e }) {
|
|
2018
|
-
const n = t, o = !!Ft().default, l = g(null), s =
|
|
2018
|
+
const n = t, o = !!Ft().default, l = g(null), s = z(() => n.containerEl), a = Vn({
|
|
2019
2019
|
containerEl: s,
|
|
2020
2020
|
sliderEl: l,
|
|
2021
2021
|
autoHeight: o ? n.autoHeight : !0,
|
|
2022
2022
|
performance: n.performance,
|
|
2023
2023
|
observeMethod: n.observeMethod
|
|
2024
|
-
}), { scrollable:
|
|
2024
|
+
}), { scrollable: c, isScrollEnd: d, sliderPos: i, heightRatio: f } = a, r = g(!1), M = n.autoHide ? z(() => n.maxHeightRatio < f.value ? !1 : r.value || !d.value) : z(() => n.maxHeightRatio < f.value ? !1 : c.value), { load: v } = Je(
|
|
2025
2025
|
`.hide-scrollbar {
|
|
2026
2026
|
scrollbar-width: none;
|
|
2027
2027
|
-ms-overflow-style: none;
|
|
@@ -2032,46 +2032,46 @@ const Kn = (t) => (be("data-v-7fd39e51"), t = t(), Oe(), t), Gn = /* @__PURE__ *
|
|
|
2032
2032
|
{ id: "styletag_lzc_scrollbar", manual: !0 }
|
|
2033
2033
|
);
|
|
2034
2034
|
ve(() => {
|
|
2035
|
-
|
|
2035
|
+
v(), De(() => {
|
|
2036
2036
|
a.init();
|
|
2037
2037
|
});
|
|
2038
2038
|
}), Dt(() => {
|
|
2039
2039
|
a.modifySliderEventListener("remove");
|
|
2040
2040
|
});
|
|
2041
2041
|
function u() {
|
|
2042
|
-
|
|
2042
|
+
r.value = !0;
|
|
2043
2043
|
}
|
|
2044
|
-
function
|
|
2045
|
-
|
|
2044
|
+
function p() {
|
|
2045
|
+
r.value = !1;
|
|
2046
2046
|
}
|
|
2047
|
-
return e({ uScrollBarReturn: a }), (
|
|
2047
|
+
return e({ uScrollBarReturn: a }), (h, I) => (R(), Se(Xe, null, {
|
|
2048
2048
|
default: Ze(() => [
|
|
2049
|
-
de(
|
|
2049
|
+
de(B("div", {
|
|
2050
2050
|
ref_key: "sliderRef",
|
|
2051
2051
|
ref: l,
|
|
2052
2052
|
class: "slider-wrapper",
|
|
2053
2053
|
onMouseenter: u,
|
|
2054
|
-
onMouseleave:
|
|
2055
|
-
style: q(
|
|
2054
|
+
onMouseleave: p,
|
|
2055
|
+
style: q(A(i))
|
|
2056
2056
|
}, [
|
|
2057
|
-
he(
|
|
2057
|
+
he(h.$slots, "default", {}, () => [
|
|
2058
2058
|
Gn
|
|
2059
2059
|
], !0)
|
|
2060
2060
|
], 36), [
|
|
2061
|
-
[_e,
|
|
2061
|
+
[_e, A(M)]
|
|
2062
2062
|
])
|
|
2063
2063
|
]),
|
|
2064
2064
|
_: 3
|
|
2065
2065
|
}));
|
|
2066
2066
|
}
|
|
2067
2067
|
});
|
|
2068
|
-
const Go = /* @__PURE__ */ ae(qn, [["__scopeId", "data-v-7fd39e51"]]), Jn = (t) => (be("data-v-
|
|
2068
|
+
const Go = /* @__PURE__ */ ae(qn, [["__scopeId", "data-v-7fd39e51"]]), Jn = (t) => (be("data-v-b28b4e7e"), t = t(), Oe(), t), eo = { class: "pull-refresh" }, to = {
|
|
2069
2069
|
key: 0,
|
|
2070
2070
|
class: "pull-arrow-circle"
|
|
2071
2071
|
}, no = {
|
|
2072
2072
|
key: 0,
|
|
2073
2073
|
class: "box-load"
|
|
2074
|
-
}, oo = { class: "left-load" }, lo = { class: "right-load" }, so = /* @__PURE__ */ Jn(() => /* @__PURE__ */
|
|
2074
|
+
}, oo = { class: "left-load" }, lo = { class: "right-load" }, so = /* @__PURE__ */ Jn(() => /* @__PURE__ */ B("div", { class: "among-load" }, null, -1)), ao = { class: "pull-arrow" }, io = { key: 1 }, uo = /* @__PURE__ */ J({
|
|
2075
2075
|
__name: "PullRefresh",
|
|
2076
2076
|
props: {
|
|
2077
2077
|
refresh: null,
|
|
@@ -2079,94 +2079,114 @@ const Go = /* @__PURE__ */ ae(qn, [["__scopeId", "data-v-7fd39e51"]]), Jn = (t)
|
|
|
2079
2079
|
scrollTop: null,
|
|
2080
2080
|
pullRefreshContainer: null
|
|
2081
2081
|
},
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
transition:
|
|
2089
|
-
transform: `
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2082
|
+
emits: ["pull-move"],
|
|
2083
|
+
setup(t, { emit: e }) {
|
|
2084
|
+
const n = t, o = 0.7, l = "#2EC1CC", s = g(-999), a = g(1), c = g(0), d = g(0.3), i = g(!1), f = g(0), r = g(0), M = g(0), v = g(0), u = g(0), p = g(), h = g({
|
|
2085
|
+
transition: "0ms",
|
|
2086
|
+
transform: "translate3d(0, 0, 0)"
|
|
2087
|
+
}), I = z(() => n.scrollTop), j = z(() => ({
|
|
2088
|
+
transition: `${v.value}ms`,
|
|
2089
|
+
transform: `translate3d(0,${s.value}px, 0) scale(${a.value})`
|
|
2090
|
+
})), L = z(() => ({
|
|
2091
|
+
borderColor: l,
|
|
2092
|
+
transition: v.value,
|
|
2093
|
+
transform: `rotate(${100 + c.value}deg)`,
|
|
2094
|
+
opacity: d.value
|
|
2095
|
+
})), m = z(() => {
|
|
2096
|
+
if (!!p.value)
|
|
2097
|
+
switch (p.value) {
|
|
2094
2098
|
case "success":
|
|
2095
2099
|
return "\u5237\u65B0\u6210\u529F";
|
|
2096
2100
|
case "failed":
|
|
2097
2101
|
return "\u5237\u65B0\u5931\u8D25";
|
|
2098
2102
|
}
|
|
2099
2103
|
});
|
|
2100
|
-
G(
|
|
2101
|
-
|
|
2102
|
-
}), G(
|
|
2103
|
-
if (
|
|
2104
|
+
G(u, (Q) => {
|
|
2105
|
+
Q === 0 && (s.value = -50, d.value = 0.3);
|
|
2106
|
+
}), G(r, (Q) => {
|
|
2107
|
+
if (u.value === 2)
|
|
2104
2108
|
return;
|
|
2105
|
-
const
|
|
2106
|
-
|
|
2109
|
+
const U = Math.pow(Q, o);
|
|
2110
|
+
U === 0 && (s.value = -50), U <= 50 && U > 0 && (s.value = U - 45, c.value = Math.pow(U, 1.5), U > 15 ? i.value = !0 : i.value = !1), U > 50 && (s.value = 5, d.value = 1, u.value);
|
|
2107
2111
|
});
|
|
2108
|
-
const
|
|
2109
|
-
|
|
2110
|
-
},
|
|
2111
|
-
const
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2112
|
+
const y = g(0), E = (Q) => {
|
|
2113
|
+
y.value = Q.touches[0].pageY;
|
|
2114
|
+
}, w = (Q) => {
|
|
2115
|
+
const U = Q.touches[0].pageY - y.value;
|
|
2116
|
+
y.value = Q.touches[0].pageY, !n.refreshOff && (!n?.refresh || u.value !== 2 && I.value === 0 && (f.value === 0 && (f.value = Q.touches[0].pageY), M.value = 0, h.value.transition = `${M.value}ms`, v.value = 0, r.value = Q.touches[0].pageY - f.value, h.value.transform = `translate3d(0, ${Math.pow(
|
|
2117
|
+
r.value,
|
|
2118
|
+
o
|
|
2119
|
+
)}px, 0)`, b(), U > 0 && Q.preventDefault()));
|
|
2120
|
+
}, _ = () => {
|
|
2121
|
+
if (n.refreshOff || !n?.refresh || u.value === 2)
|
|
2115
2122
|
return;
|
|
2116
|
-
|
|
2117
|
-
const
|
|
2118
|
-
|
|
2119
|
-
|
|
2123
|
+
f.value = 0, M.value = 300;
|
|
2124
|
+
const Q = Math.pow(r.value, o);
|
|
2125
|
+
h.value.transition = `${M.value}ms`, b(), Q > 50 ? (u.value = 2, r.value = Math.pow(50, 1 / o), h.value.transform = `translate3d(0, ${Math.pow(
|
|
2126
|
+
r.value,
|
|
2127
|
+
o
|
|
2128
|
+
)}px, 0)`, b(), v.value = 300, n?.refresh && n?.refresh().then(() => {
|
|
2129
|
+
p.value = "success";
|
|
2120
2130
|
}).catch(() => {
|
|
2121
|
-
|
|
2131
|
+
p.value = "failed";
|
|
2122
2132
|
}).finally(() => {
|
|
2123
2133
|
setTimeout(() => {
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
)}px, 0)`, setTimeout(() => {
|
|
2128
|
-
|
|
2129
|
-
},
|
|
2134
|
+
u.value = 0, r.value = 0, h.value.transform = `translate3d(0, ${Math.pow(
|
|
2135
|
+
r.value,
|
|
2136
|
+
o
|
|
2137
|
+
)}px, 0)`, b(), setTimeout(() => {
|
|
2138
|
+
p.value = void 0;
|
|
2139
|
+
}, v.value);
|
|
2130
2140
|
}, 600);
|
|
2131
|
-
})) : (
|
|
2132
|
-
|
|
2141
|
+
})) : (r.value = 0, h.value.transform = `translate3d(0, ${Math.pow(
|
|
2142
|
+
r.value,
|
|
2143
|
+
o
|
|
2144
|
+
)}px, 0)`, b());
|
|
2145
|
+
};
|
|
2146
|
+
function b() {
|
|
2147
|
+
!H.value || (Object.assign(
|
|
2148
|
+
H.value.style,
|
|
2149
|
+
h.value
|
|
2150
|
+
), e("pull-move", h.value));
|
|
2151
|
+
}
|
|
2152
|
+
const H = g(null);
|
|
2133
2153
|
return ve(() => {
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
),
|
|
2137
|
-
}), (
|
|
2138
|
-
|
|
2154
|
+
n?.refreshOff || (H.value = document.querySelector(
|
|
2155
|
+
n.pullRefreshContainer
|
|
2156
|
+
), H.value?.addEventListener("touchstart", E), H.value?.addEventListener("touchmove", w), H.value?.addEventListener("touchend", _));
|
|
2157
|
+
}), (Q, U) => (R(), P("div", eo, [
|
|
2158
|
+
B("div", {
|
|
2139
2159
|
class: "pull-refresh-box",
|
|
2140
|
-
style: q(
|
|
2160
|
+
style: q(A(j))
|
|
2141
2161
|
}, [
|
|
2142
|
-
|
|
2143
|
-
he(
|
|
2144
|
-
wt(Ke(
|
|
2162
|
+
A(m) ? (R(), P("div", io, [
|
|
2163
|
+
he(Q.$slots, "tip", { status: p.value }, () => [
|
|
2164
|
+
wt(Ke(A(m)), 1)
|
|
2145
2165
|
], !0)
|
|
2146
|
-
])) : (
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2166
|
+
])) : (R(), P("div", to, [
|
|
2167
|
+
u.value == 2 ? (R(), P("div", no, [
|
|
2168
|
+
B("div", oo, [
|
|
2169
|
+
B("div", {
|
|
2150
2170
|
class: "left-circle",
|
|
2151
|
-
style: q({ backgroundColor:
|
|
2171
|
+
style: q({ backgroundColor: l })
|
|
2152
2172
|
}, null, 4)
|
|
2153
2173
|
]),
|
|
2154
|
-
|
|
2155
|
-
|
|
2174
|
+
B("div", lo, [
|
|
2175
|
+
B("div", {
|
|
2156
2176
|
class: "right-circle",
|
|
2157
|
-
style: q({ backgroundColor:
|
|
2177
|
+
style: q({ backgroundColor: l })
|
|
2158
2178
|
}, null, 4)
|
|
2159
2179
|
]),
|
|
2160
2180
|
so
|
|
2161
|
-
])) : (
|
|
2181
|
+
])) : (R(), P("div", {
|
|
2162
2182
|
key: 1,
|
|
2163
2183
|
class: "pull-circle-line",
|
|
2164
|
-
style: q(
|
|
2184
|
+
style: q(A(L))
|
|
2165
2185
|
}, [
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
class: ue(["arrows", { opacity:
|
|
2169
|
-
style: q({ borderBottomColor:
|
|
2186
|
+
B("div", ao, [
|
|
2187
|
+
B("div", {
|
|
2188
|
+
class: ue(["arrows", { opacity: i.value }]),
|
|
2189
|
+
style: q({ borderBottomColor: l })
|
|
2170
2190
|
}, null, 6)
|
|
2171
2191
|
])
|
|
2172
2192
|
], 4))
|
|
@@ -2175,7 +2195,7 @@ const Go = /* @__PURE__ */ ae(qn, [["__scopeId", "data-v-7fd39e51"]]), Jn = (t)
|
|
|
2175
2195
|
]));
|
|
2176
2196
|
}
|
|
2177
2197
|
});
|
|
2178
|
-
const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-
|
|
2198
|
+
const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-b28b4e7e"]]), co = ["data-key"], fo = {
|
|
2179
2199
|
inheritAttrs: !1
|
|
2180
2200
|
}, vo = /* @__PURE__ */ J({
|
|
2181
2201
|
...fo,
|
|
@@ -2191,7 +2211,7 @@ const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-759822db"]]), co = ["da
|
|
|
2191
2211
|
emits: ["scrollEnd"],
|
|
2192
2212
|
setup(t, { expose: e, emit: n }) {
|
|
2193
2213
|
const o = t, l = fn(Wt(o, "data"), {
|
|
2194
|
-
itemHeight: (
|
|
2214
|
+
itemHeight: (v) => o.itemHeight(o.data[v]),
|
|
2195
2215
|
overscan: o.overscan,
|
|
2196
2216
|
scrollEndHook: () => {
|
|
2197
2217
|
n("scrollEnd");
|
|
@@ -2199,47 +2219,47 @@ const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-759822db"]]), co = ["da
|
|
|
2199
2219
|
}), {
|
|
2200
2220
|
list: s,
|
|
2201
2221
|
containerProps: a,
|
|
2202
|
-
wrapperProps:
|
|
2203
|
-
innerProps:
|
|
2222
|
+
wrapperProps: c,
|
|
2223
|
+
innerProps: d,
|
|
2204
2224
|
getItemHeightData: i,
|
|
2205
2225
|
scrollTop: f
|
|
2206
2226
|
} = l;
|
|
2207
2227
|
e({
|
|
2208
2228
|
vListReturn: l
|
|
2209
2229
|
});
|
|
2210
|
-
const
|
|
2211
|
-
function M(
|
|
2212
|
-
return o.getItemKey ? o.getItemKey(
|
|
2230
|
+
const r = "virtualListWrapper" + new Date().getTime();
|
|
2231
|
+
function M(v, u) {
|
|
2232
|
+
return o.getItemKey ? o.getItemKey(v, u) : `${u}`;
|
|
2213
2233
|
}
|
|
2214
|
-
return (
|
|
2234
|
+
return (v, u) => (R(), P(Pe, null, [
|
|
2215
2235
|
Te(ro, {
|
|
2216
2236
|
refresh: t.refresh,
|
|
2217
2237
|
refreshOff: t.refreshOff,
|
|
2218
|
-
scrollTop:
|
|
2219
|
-
pullRefreshContainer: "#" +
|
|
2238
|
+
scrollTop: A(f),
|
|
2239
|
+
pullRefreshContainer: "#" + r
|
|
2220
2240
|
}, null, 8, ["refresh", "refreshOff", "scrollTop", "pullRefreshContainer"]),
|
|
2221
|
-
|
|
2241
|
+
B("div", {
|
|
2222
2242
|
class: "virtualListWrapper",
|
|
2223
|
-
id:
|
|
2243
|
+
id: r
|
|
2224
2244
|
}, [
|
|
2225
|
-
|
|
2226
|
-
onScrollPassive: u[0] || (u[0] = (...
|
|
2227
|
-
ref:
|
|
2245
|
+
B("div", Ne({
|
|
2246
|
+
onScrollPassive: u[0] || (u[0] = (...p) => A(a).onScroll && A(a).onScroll(...p)),
|
|
2247
|
+
ref: A(a).ref,
|
|
2228
2248
|
class: "virtualList"
|
|
2229
|
-
},
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
(
|
|
2233
|
-
key: M(
|
|
2234
|
-
"data-key": M(
|
|
2249
|
+
}, v.$attrs), [
|
|
2250
|
+
B("div", $e(He(A(c))), [
|
|
2251
|
+
B("div", $e(He(A(d))), [
|
|
2252
|
+
(R(!0), P(Pe, null, Xt(A(s), ({ data: p, index: h }) => (R(), P("div", {
|
|
2253
|
+
key: M(p, h),
|
|
2254
|
+
"data-key": M(p, h),
|
|
2235
2255
|
style: q({
|
|
2236
|
-
height: `${
|
|
2256
|
+
height: `${A(i)(h).height}px`,
|
|
2237
2257
|
display: "flex"
|
|
2238
2258
|
})
|
|
2239
2259
|
}, [
|
|
2240
|
-
he(
|
|
2241
|
-
data:
|
|
2242
|
-
index:
|
|
2260
|
+
he(v.$slots, "default", {
|
|
2261
|
+
data: p,
|
|
2262
|
+
index: h
|
|
2243
2263
|
}, void 0, !0)
|
|
2244
2264
|
], 12, co))), 128))
|
|
2245
2265
|
], 16)
|
|
@@ -2249,21 +2269,21 @@ const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-759822db"]]), co = ["da
|
|
|
2249
2269
|
], 64));
|
|
2250
2270
|
}
|
|
2251
2271
|
});
|
|
2252
|
-
const qo = /* @__PURE__ */ ae(vo, [["__scopeId", "data-v-dfe60586"]]), rt = (t) => (be("data-v-33519afd"), t = t(), Oe(), t), Mo = { style: { position: "absolute" } }, go = /* @__PURE__ */ rt(() => /* @__PURE__ */
|
|
2272
|
+
const qo = /* @__PURE__ */ ae(vo, [["__scopeId", "data-v-dfe60586"]]), rt = (t) => (be("data-v-33519afd"), t = t(), Oe(), t), Mo = { style: { position: "absolute" } }, go = /* @__PURE__ */ rt(() => /* @__PURE__ */ B("div", { class: "wrapper" }, null, -1)), ho = ["width", "height"], mo = /* @__PURE__ */ rt(() => /* @__PURE__ */ B("title", null, "logo", -1)), po = /* @__PURE__ */ rt(() => /* @__PURE__ */ B("g", {
|
|
2253
2273
|
id: "group-1",
|
|
2254
2274
|
stroke: "none",
|
|
2255
2275
|
"stroke-width": "1",
|
|
2256
2276
|
fill: "none",
|
|
2257
2277
|
"fill-rule": "evenodd"
|
|
2258
2278
|
}, [
|
|
2259
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ B("path", {
|
|
2260
2280
|
d: "M260,0 L260,260 L0,260 L0,0 L260,0 Z M173.523673,59.478426 L168.543315,62.4752911 C160.9116,67.0675753 153.089651,71.6349169 145.95806,75.5800674 C142.130471,77.697465 141.695584,77.8197038 137.842227,77.8197038 L123.620155,77.8194132 C120.16747,77.8127705 119.807362,77.673506 116.200006,75.5626777 L115.86045,75.3641139 C113.295911,73.8653877 110.281688,72.1255413 103.60737,68.2932221 C100.032855,66.2486474 96.3694634,64.1645054 92.8123362,62.1486494 L88.1098826,59.4837265 L86.4238232,64.6191026 C83.7525911,72.7551036 81.4062856,80.7653112 79.9222326,87.4417622 C78.9474243,91.8460343 78.2380884,93.2327734 74.2195073,98.9752733 C73.3694777,100.207223 72.630007,101.343155 72.0710109,102.283257 C67.5201215,110.313953 65.2975905,119.339776 65.6004928,128.457001 C66.1750084,143.318086 73.5375842,157.955758 85.6992798,168.473706 C96.9509724,178.204645 111.5737,183.826593 127.858154,184.209647 L130.088901,184.229303 C130.3376,186.684365 130.531293,189.982467 130.67329,193.770543 L130.951876,201.202421 L137.351863,197.414204 C154.766094,187.106546 169.345402,176.172255 180.160428,163.526119 C190.679421,151.226139 196.179795,138.745301 195.345608,125.762609 C194.727393,116.39373 192.289395,107.848059 187.082918,99.046007 C186.275378,97.7498121 185.738167,97.0056347 184.495395,95.37077 C181.975467,92.0558065 181.159964,90.5424149 180.493634,87.4039653 C178.713605,78.9218624 176.863265,71.4211865 175.088993,65.0761883 L173.523673,59.478426 Z M93.177,72.537 L93.8226224,72.9040486 C95.6240552,73.9292933 97.4266638,74.9575498 99.2051531,75.9748184 C106.15023,79.9626119 109.111289,81.6727026 111.728598,83.2042091 C116.752992,86.1442112 118.538634,86.6733184 123.964152,86.6733184 L137.842227,86.6733184 C143.264867,86.6733184 145.156143,86.1417146 150.243765,83.3272749 L153.915953,81.276117 C157.635687,79.179445 161.486156,76.9543599 165.360239,74.6740288 L168.062636,73.0710869 L168.527808,74.8705095 C169.630114,79.2468106 170.742831,84.0476913 171.830914,89.2325336 C172.820403,93.8931438 174.207097,96.4665356 177.447051,100.728693 C178.530829,102.154402 178.952253,102.738183 179.517404,103.643654 C183.925243,111.098001 185.980436,118.301862 186.51071,126.337939 C187.173867,136.658947 182.587388,147.066077 173.431821,157.771787 L171.503004,159.959402 C163.609627,168.649028 153.591728,176.617571 141.90907,184.187495 L139.123121,185.960576 L139.113767,185.819152 C139.047016,184.932364 138.975009,184.102769 138.897435,183.336992 C138.769034,182.069465 138.589718,180.629122 138.367155,179.053334 L137.795381,175.005053 L133.714496,175.253822 C132.500079,175.327852 131.274186,175.368647 130.037423,175.375838 C114.999567,175.463276 101.629066,170.545082 91.4908024,161.777083 C81.1421175,152.827103 74.9249947,140.466728 74.4483613,128.138982 C74.2004611,120.675327 76.0261036,113.26129 79.7275986,106.727863 C80.126032,106.059698 80.7615655,105.083428 81.4902403,104.02721 C86.0997527,97.4404488 87.2937074,95.1062887 88.5657754,89.358959 C89.6596645,84.4377825 91.2792852,78.6447463 93.1627518,72.6043699 L93.177,72.537 Z",
|
|
2261
2281
|
id: "path-1",
|
|
2262
2282
|
fill: "#FFF"
|
|
2263
2283
|
})
|
|
2264
|
-
], -1)),
|
|
2284
|
+
], -1)), yo = [
|
|
2265
2285
|
mo,
|
|
2266
|
-
|
|
2286
|
+
po
|
|
2267
2287
|
], Do = /* @__PURE__ */ J({
|
|
2268
2288
|
__name: "Loading",
|
|
2269
2289
|
props: {
|
|
@@ -2277,16 +2297,16 @@ const qo = /* @__PURE__ */ ae(vo, [["__scopeId", "data-v-dfe60586"]]), rt = (t)
|
|
|
2277
2297
|
"312487ac": n
|
|
2278
2298
|
}));
|
|
2279
2299
|
const n = `${e.duration}ms`;
|
|
2280
|
-
return (o, l) => (
|
|
2300
|
+
return (o, l) => (R(), P("div", Mo, [
|
|
2281
2301
|
go,
|
|
2282
|
-
(
|
|
2302
|
+
(R(), P("svg", {
|
|
2283
2303
|
style: { position: "relative" },
|
|
2284
2304
|
width: t.width,
|
|
2285
2305
|
height: t.height,
|
|
2286
2306
|
viewBox: "0 0 260 260",
|
|
2287
2307
|
version: "1.1",
|
|
2288
2308
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2289
|
-
},
|
|
2309
|
+
}, yo, 8, ho))
|
|
2290
2310
|
]));
|
|
2291
2311
|
}
|
|
2292
2312
|
});
|
|
@@ -2297,14 +2317,14 @@ const Jo = /* @__PURE__ */ ae(Do, [["__scopeId", "data-v-33519afd"]]), To = [
|
|
|
2297
2317
|
"image/pcx"
|
|
2298
2318
|
];
|
|
2299
2319
|
function bt(t, e) {
|
|
2300
|
-
const n = g(t?.value), o =
|
|
2301
|
-
const
|
|
2302
|
-
return !
|
|
2320
|
+
const n = g(t?.value), o = z(() => n.value?.startsWith("/_lzc")), l = g(!1), s = z(() => l.value), a = z(() => {
|
|
2321
|
+
const d = e?.value;
|
|
2322
|
+
return !d || d.startsWith("video/") ? !0 : d.startsWith("image/") ? o.value ? !0 : !To.includes(d) : !1;
|
|
2303
2323
|
});
|
|
2304
|
-
t && G(t, (
|
|
2305
|
-
n.value =
|
|
2324
|
+
t && G(t, (d) => {
|
|
2325
|
+
n.value = d, l.value = !1;
|
|
2306
2326
|
});
|
|
2307
|
-
function
|
|
2327
|
+
function c() {
|
|
2308
2328
|
l.value = !0;
|
|
2309
2329
|
}
|
|
2310
2330
|
return {
|
|
@@ -2312,7 +2332,7 @@ function bt(t, e) {
|
|
|
2312
2332
|
isError: l,
|
|
2313
2333
|
hasError: s,
|
|
2314
2334
|
isSupport: a,
|
|
2315
|
-
handleError:
|
|
2335
|
+
handleError: c
|
|
2316
2336
|
};
|
|
2317
2337
|
}
|
|
2318
2338
|
function Ot() {
|
|
@@ -2338,78 +2358,78 @@ const No = ["title"], wo = { class: "tip" }, Io = /* @__PURE__ */ wt("\u5F53\u52
|
|
|
2338
2358
|
},
|
|
2339
2359
|
emits: ["load", "noSupport", "loadError"],
|
|
2340
2360
|
setup(t, { emit: e }) {
|
|
2341
|
-
const n = t, o = g(), l = g(), s = g(!1), a = g(!1),
|
|
2361
|
+
const n = t, o = g(), l = g(), s = g(!1), a = g(!1), c = g(!1), { src: d, mime: i } = It(n), { imgSrc: f, isSupport: r, hasError: M, handleError: v } = bt(d, i), { vImageCancel: u } = Ot(), { LoadingComp: p } = Ct({
|
|
2342
2362
|
component: Tn,
|
|
2343
2363
|
delay: 300
|
|
2344
|
-
}),
|
|
2364
|
+
}), h = Vt(() => c.value && n.autoRemoveThumbnail ? !1 : n.thumbnail && !c.value);
|
|
2345
2365
|
function I() {
|
|
2346
2366
|
a.value = !0;
|
|
2347
2367
|
}
|
|
2348
2368
|
function j() {
|
|
2349
|
-
a.value && (
|
|
2369
|
+
a.value && (c.value = !0);
|
|
2350
2370
|
}
|
|
2351
|
-
async function
|
|
2352
|
-
I(),
|
|
2371
|
+
async function L() {
|
|
2372
|
+
I(), h.value ? (o.value?.addEventListener("animationend", m), o.value?.classList.add("showing"), await Ce(10)) : o.value && e("load", o.value), o.value?.classList.remove("src-class");
|
|
2353
2373
|
}
|
|
2354
|
-
function
|
|
2355
|
-
o.value?.removeEventListener("animationend",
|
|
2374
|
+
function m() {
|
|
2375
|
+
o.value?.removeEventListener("animationend", m), o.value?.classList.remove("showing"), o.value && e("load", o.value), j();
|
|
2356
2376
|
}
|
|
2357
|
-
async function
|
|
2358
|
-
|
|
2377
|
+
async function y(_) {
|
|
2378
|
+
_ ? L() : l.value && e("load", l.value), s.value = !0;
|
|
2359
2379
|
}
|
|
2360
|
-
function E(
|
|
2361
|
-
|
|
2380
|
+
function E(_) {
|
|
2381
|
+
_ ? (v(), e("loadError")) : I(), s.value = !0;
|
|
2362
2382
|
}
|
|
2363
|
-
function
|
|
2383
|
+
function w() {
|
|
2364
2384
|
e("noSupport");
|
|
2365
2385
|
}
|
|
2366
|
-
return (
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
title:
|
|
2386
|
+
return (_, b) => (R(), P(Pe, null, [
|
|
2387
|
+
A(r) && !s.value ? (R(), Se(A(p), { key: 0 })) : ge("", !0),
|
|
2388
|
+
A(r) ? A(M) ? (R(), P("div", Ne({ key: 3 }, _.$attrs, {
|
|
2389
|
+
title: A(f),
|
|
2370
2390
|
class: "tip-wrap"
|
|
2371
2391
|
}), [
|
|
2372
2392
|
Te(xe, {
|
|
2373
2393
|
class: "bad-image",
|
|
2374
2394
|
name: t.badImageIconName
|
|
2375
2395
|
}, null, 8, ["name"])
|
|
2376
|
-
], 16, Lo)) : he(
|
|
2396
|
+
], 16, Lo)) : he(_.$slots, "default", {
|
|
2377
2397
|
key: 2,
|
|
2378
|
-
src:
|
|
2379
|
-
onLoad:
|
|
2398
|
+
src: A(f),
|
|
2399
|
+
onLoad: y,
|
|
2380
2400
|
onError: E,
|
|
2381
|
-
vImageCancel:
|
|
2401
|
+
vImageCancel: A(u)
|
|
2382
2402
|
}, () => [
|
|
2383
|
-
|
|
2403
|
+
A(h) ? de((R(), P("img", Ne({ key: 0 }, _.$attrs, {
|
|
2384
2404
|
ref_key: "thumbnailRef",
|
|
2385
2405
|
ref: l,
|
|
2386
|
-
onLoad:
|
|
2387
|
-
onError:
|
|
2406
|
+
onLoad: b[0] || (b[0] = (H) => y()),
|
|
2407
|
+
onError: b[1] || (b[1] = (H) => E()),
|
|
2388
2408
|
src: t.thumbnail
|
|
2389
2409
|
}), null, 16, Ao)), [
|
|
2390
|
-
[
|
|
2410
|
+
[A(u)]
|
|
2391
2411
|
]) : ge("", !0),
|
|
2392
|
-
t.isShowSrc || a.value ? de((
|
|
2412
|
+
t.isShowSrc || a.value ? de((R(), P("img", Ne({ key: 1 }, _.$attrs, {
|
|
2393
2413
|
ref_key: "srcRef",
|
|
2394
2414
|
ref: o,
|
|
2395
2415
|
class: "src-class",
|
|
2396
|
-
onLoad:
|
|
2397
|
-
onError:
|
|
2398
|
-
src:
|
|
2416
|
+
onLoad: b[2] || (b[2] = (H) => y(!0)),
|
|
2417
|
+
onError: b[3] || (b[3] = (H) => E(!0)),
|
|
2418
|
+
src: A(f)
|
|
2399
2419
|
}), null, 16, zo)), [
|
|
2400
|
-
[
|
|
2420
|
+
[A(u)],
|
|
2401
2421
|
[_e, a.value]
|
|
2402
2422
|
]) : ge("", !0)
|
|
2403
|
-
], !0) : (
|
|
2404
|
-
title:
|
|
2423
|
+
], !0) : (R(), P("div", Ne({ key: 1 }, _.$attrs, {
|
|
2424
|
+
title: A(f),
|
|
2405
2425
|
class: "tip-wrap"
|
|
2406
2426
|
}), [
|
|
2407
2427
|
Te(xe, {
|
|
2408
2428
|
class: "no-support-icon",
|
|
2409
2429
|
name: t.noSupportIconName
|
|
2410
2430
|
}, null, 8, ["name"]),
|
|
2411
|
-
de((
|
|
2412
|
-
[
|
|
2431
|
+
de((R(), P("span", wo, Eo)), [
|
|
2432
|
+
[A(Et), w]
|
|
2413
2433
|
])
|
|
2414
2434
|
], 16, No))
|
|
2415
2435
|
], 64));
|
|
@@ -2423,13 +2443,13 @@ const el = /* @__PURE__ */ ae(Co, [["__scopeId", "data-v-bfec1a6b"]]), xo = ["ti
|
|
|
2423
2443
|
},
|
|
2424
2444
|
emits: ["noSupport"],
|
|
2425
2445
|
setup(t, { emit: e }) {
|
|
2426
|
-
const n = t, o = g(!1), { src: l, mime: s } = It(n), { imgSrc: a, hasError:
|
|
2427
|
-
function
|
|
2446
|
+
const n = t, o = g(!1), { src: l, mime: s } = It(n), { imgSrc: a, hasError: c, isSupport: d, handleError: i } = bt(l, s), { vImageCancel: f } = Ot();
|
|
2447
|
+
function r() {
|
|
2428
2448
|
e("noSupport");
|
|
2429
2449
|
}
|
|
2430
|
-
return (M,
|
|
2431
|
-
|
|
2432
|
-
title:
|
|
2450
|
+
return (M, v) => A(d) ? A(c) ? he(M.$slots, "imageError", { key: 2 }, () => [
|
|
2451
|
+
B("div", {
|
|
2452
|
+
title: A(a),
|
|
2433
2453
|
class: "icon-wrap"
|
|
2434
2454
|
}, [
|
|
2435
2455
|
Te(xe, {
|
|
@@ -2437,25 +2457,25 @@ const el = /* @__PURE__ */ ae(Co, [["__scopeId", "data-v-bfec1a6b"]]), xo = ["ti
|
|
|
2437
2457
|
name: "\u56FE\u7247\u635F\u574F"
|
|
2438
2458
|
})
|
|
2439
2459
|
], 8, bo)
|
|
2440
|
-
], !0) : de((
|
|
2460
|
+
], !0) : de((R(), P("img", {
|
|
2441
2461
|
key: 1,
|
|
2442
2462
|
fetchpriority: "high",
|
|
2443
|
-
onLoad:
|
|
2444
|
-
onError:
|
|
2445
|
-
src:
|
|
2463
|
+
onLoad: v[0] || (v[0] = (u) => o.value = !0),
|
|
2464
|
+
onError: v[1] || (v[1] = (...u) => A(i) && A(i)(...u)),
|
|
2465
|
+
src: A(a)
|
|
2446
2466
|
}, null, 40, So)), [
|
|
2447
|
-
[
|
|
2467
|
+
[A(f)],
|
|
2448
2468
|
[_e, o.value]
|
|
2449
2469
|
]) : he(M.$slots, "noSupport", { key: 0 }, () => [
|
|
2450
|
-
|
|
2451
|
-
title:
|
|
2470
|
+
B("div", {
|
|
2471
|
+
title: A(a),
|
|
2452
2472
|
class: "icon-wrap"
|
|
2453
2473
|
}, [
|
|
2454
2474
|
de(Te(xe, {
|
|
2455
2475
|
class: "icon",
|
|
2456
2476
|
name: "\u672A\u77E5\u7C7B\u578B"
|
|
2457
2477
|
}, null, 512), [
|
|
2458
|
-
[
|
|
2478
|
+
[A(Et), r]
|
|
2459
2479
|
])
|
|
2460
2480
|
], 8, xo)
|
|
2461
2481
|
], !0);
|