@lazycatcloud/lzc-toolkit 0.0.215 → 0.0.217
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 +1344 -1330
- 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/types/useDragSelect/index.d.ts +2 -1
- package/dist/types/useScaleImage/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,542 +1,542 @@
|
|
|
1
|
-
import { shallowRef as
|
|
2
|
-
const
|
|
3
|
-
created(
|
|
1
|
+
import { shallowRef as mt, watchEffect as Qt, readonly as yt, getCurrentScope as Yt, onScopeDispose as pt, onMounted as ve, nextTick as pe, ref as g, watch as K, customRef as Bt, unref as j, isRef as Ut, getCurrentInstance as Fe, onUpdated as Rt, computed as L, reactive as Ie, onUnmounted as Dt, inject as le, provide as R, defineComponent as J, h as fe, render as Ee, openBlock as Y, createBlock as Ce, Transition as We, withCtx as Xe, withDirectives as de, createElementBlock as U, normalizeClass as ue, createElementVNode as Q, withModifiers as we, renderSlot as De, createCommentVNode as ge, useCssVars as Ze, normalizeProps as Re, guardReactiveProps as $e, pushScopeId as Se, popScopeId as Oe, normalizeStyle as q, toDisplayString as Ve, vShow as be, createVNode as Te, onBeforeUnmount as Tt, onActivated as Nt, onBeforeMount as $t, onDeactivated as Ht, useSlots as Pt, toRef as Ft, Fragment as He, mergeProps as Ne, renderList as Wt, toRefs as wt, createTextVNode as Xt } from "vue";
|
|
2
|
+
const Zt = {
|
|
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
|
-
|
|
11
|
+
const v = c.clientX, i = c.clientY, f = Math.abs(v - 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
|
},
|
|
16
|
-
unmounted(
|
|
17
|
-
|
|
16
|
+
unmounted(t) {
|
|
17
|
+
t.removeEventListener("pointerdown", t._down__), t.removeEventListener("pointerup", t._up__);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
20
|
-
created(
|
|
21
|
-
const { fn: n, ms: o = 1500 } =
|
|
19
|
+
}, ko = {
|
|
20
|
+
created(t, e) {
|
|
21
|
+
const { fn: n, ms: o = 1500 } = e.value;
|
|
22
22
|
let l = null;
|
|
23
23
|
function s(a) {
|
|
24
24
|
l || (n(a), l = setTimeout(() => {
|
|
25
25
|
l = null;
|
|
26
26
|
}, o));
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
t.addEventListener("click", s);
|
|
29
29
|
}
|
|
30
|
-
},
|
|
31
|
-
beforeMount(
|
|
32
|
-
|
|
30
|
+
}, It = {
|
|
31
|
+
beforeMount(t, e) {
|
|
32
|
+
e.value();
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
function
|
|
35
|
+
function Vt(t, e) {
|
|
36
36
|
var n;
|
|
37
|
-
const o =
|
|
38
|
-
return
|
|
39
|
-
o.value =
|
|
37
|
+
const o = mt();
|
|
38
|
+
return Qt(() => {
|
|
39
|
+
o.value = t();
|
|
40
40
|
}, {
|
|
41
|
-
...
|
|
42
|
-
flush: (n =
|
|
43
|
-
}),
|
|
41
|
+
...e,
|
|
42
|
+
flush: (n = e?.flush) != null ? n : "sync"
|
|
43
|
+
}), yt(o);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Kt(t, e) {
|
|
46
46
|
let n, o, l;
|
|
47
47
|
const s = g(!0), a = () => {
|
|
48
48
|
s.value = !0, l();
|
|
49
49
|
};
|
|
50
|
-
|
|
51
|
-
const
|
|
50
|
+
K(t, a, { flush: "sync" });
|
|
51
|
+
const c = typeof e == "function" ? e : e.get, v = typeof e == "function" ? void 0 : e.set, i = Bt((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
|
+
v?.(M);
|
|
57
57
|
}
|
|
58
58
|
}));
|
|
59
|
-
return Object.isExtensible(
|
|
59
|
+
return Object.isExtensible(i) && (i.trigger = a), i;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
61
|
+
function Ke(t) {
|
|
62
|
+
return Yt() ? (pt(t), !0) : !1;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
return typeof
|
|
64
|
+
function se(t) {
|
|
65
|
+
return typeof t == "function" ? t() : j(t);
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const Et = typeof window < "u" && typeof document < "u";
|
|
68
68
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
69
|
-
const
|
|
69
|
+
const Gt = Object.prototype.toString, qt = (t) => Gt.call(t) === "[object Object]", he = () => {
|
|
70
70
|
};
|
|
71
|
-
function
|
|
71
|
+
function At(t, e) {
|
|
72
72
|
function n(...o) {
|
|
73
73
|
return new Promise((l, s) => {
|
|
74
|
-
Promise.resolve(
|
|
74
|
+
Promise.resolve(t(() => e.apply(this, o), { fn: e, thisArg: this, args: o })).then(l).catch(s);
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
return n;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
let n, o, l =
|
|
81
|
-
const s = (
|
|
82
|
-
clearTimeout(
|
|
79
|
+
function Jt(t, e = {}) {
|
|
80
|
+
let n, o, l = he;
|
|
81
|
+
const s = (c) => {
|
|
82
|
+
clearTimeout(c), l(), l = he;
|
|
83
83
|
};
|
|
84
|
-
return (
|
|
85
|
-
const
|
|
86
|
-
return n && s(n),
|
|
87
|
-
l =
|
|
88
|
-
n && s(n), o = null,
|
|
89
|
-
},
|
|
90
|
-
o && s(o), o = null,
|
|
91
|
-
},
|
|
84
|
+
return (c) => {
|
|
85
|
+
const v = se(t), i = se(e.maxWait);
|
|
86
|
+
return n && s(n), v <= 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
|
+
}, i)), n = setTimeout(() => {
|
|
90
|
+
o && s(o), o = null, f(c());
|
|
91
|
+
}, v);
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
let
|
|
97
|
-
!
|
|
98
|
-
const
|
|
99
|
-
n && (clearTimeout(n), n = void 0, l(), l =
|
|
95
|
+
function en(...t) {
|
|
96
|
+
let e = 0, n, o = !0, l = he, s, a, c, v, i;
|
|
97
|
+
!Ut(t[0]) && typeof t[0] == "object" ? { delay: a, trailing: c = !0, leading: v = !0, rejectOnCancel: i = !1 } = t[0] : [a, c = !0, v = !0, i = !1] = t;
|
|
98
|
+
const f = () => {
|
|
99
|
+
n && (clearTimeout(n), n = void 0, l(), l = he);
|
|
100
100
|
};
|
|
101
101
|
return (M) => {
|
|
102
|
-
const
|
|
103
|
-
return
|
|
104
|
-
l =
|
|
105
|
-
|
|
106
|
-
}, Math.max(0,
|
|
107
|
-
})), !
|
|
102
|
+
const d = se(a), u = Date.now() - e, y = () => s = M();
|
|
103
|
+
return f(), d <= 0 ? (e = Date.now(), y()) : (u > d && (v || !o) ? (e = Date.now(), y()) : c && (s = new Promise((p, E) => {
|
|
104
|
+
l = i ? E : p, n = setTimeout(() => {
|
|
105
|
+
e = Date.now(), o = !0, p(y()), f();
|
|
106
|
+
}, Math.max(0, d - u));
|
|
107
|
+
})), !v && !n && (n = setTimeout(() => o = !0, d)), o = !1, s);
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
return
|
|
110
|
+
function tn(t) {
|
|
111
|
+
return t || Fe();
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
function _e(t, e = 200, n = {}) {
|
|
114
|
+
return At(
|
|
115
|
+
Jt(e, n),
|
|
116
|
+
t
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
return
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
function Pe(t, e = 200, n = !1, o = !0, l = !1) {
|
|
120
|
+
return At(
|
|
121
|
+
en(e, n, o, l),
|
|
122
|
+
t
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
|
|
125
|
+
function Ge(t, e = !0, n) {
|
|
126
|
+
tn() ? ve(t, n) : e ? t() : pe(t);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
var
|
|
130
|
-
const n =
|
|
131
|
-
return (
|
|
128
|
+
function ce(t) {
|
|
129
|
+
var e;
|
|
130
|
+
const n = se(t);
|
|
131
|
+
return (e = n?.$el) != null ? e : n;
|
|
132
132
|
}
|
|
133
|
-
const
|
|
134
|
-
function
|
|
135
|
-
let
|
|
136
|
-
if (typeof
|
|
137
|
-
return
|
|
133
|
+
const ke = Et ? window : void 0, nn = Et ? window.document : void 0;
|
|
134
|
+
function Le(...t) {
|
|
135
|
+
let e, n, o, l;
|
|
136
|
+
if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([n, o, l] = t, e = ke) : [e, n, o, l] = t, !e)
|
|
137
|
+
return he;
|
|
138
138
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
139
139
|
const s = [], a = () => {
|
|
140
|
-
s.forEach((
|
|
141
|
-
},
|
|
142
|
-
() => [
|
|
143
|
-
([
|
|
144
|
-
if (a(), !
|
|
140
|
+
s.forEach((f) => f()), s.length = 0;
|
|
141
|
+
}, c = (f, r, M, d) => (f.addEventListener(r, M, d), () => f.removeEventListener(r, M, d)), v = K(
|
|
142
|
+
() => [ce(e), se(l)],
|
|
143
|
+
([f, r]) => {
|
|
144
|
+
if (a(), !f)
|
|
145
145
|
return;
|
|
146
|
-
const M =
|
|
146
|
+
const M = qt(r) ? { ...r } : r;
|
|
147
147
|
s.push(
|
|
148
|
-
...n.flatMap((
|
|
148
|
+
...n.flatMap((d) => o.map((u) => c(f, d, u, M)))
|
|
149
149
|
);
|
|
150
150
|
},
|
|
151
151
|
{ immediate: !0, flush: "post" }
|
|
152
|
-
),
|
|
153
|
-
|
|
152
|
+
), i = () => {
|
|
153
|
+
v(), a();
|
|
154
154
|
};
|
|
155
|
-
return
|
|
155
|
+
return Ke(i), i;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
const
|
|
159
|
-
return
|
|
160
|
-
|
|
161
|
-
},
|
|
157
|
+
function on() {
|
|
158
|
+
const t = g(!1), e = Fe();
|
|
159
|
+
return e && ve(() => {
|
|
160
|
+
t.value = !0;
|
|
161
|
+
}, e), t;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
const
|
|
165
|
-
return
|
|
163
|
+
function ln(t) {
|
|
164
|
+
const e = on();
|
|
165
|
+
return L(() => (e.value, Boolean(t())));
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
const
|
|
167
|
+
function sn(t) {
|
|
168
|
+
const e = Fe(), n = Kt(
|
|
169
169
|
() => null,
|
|
170
|
-
() =>
|
|
170
|
+
() => t ? ce(t) : e.proxy.$el
|
|
171
171
|
);
|
|
172
|
-
return
|
|
172
|
+
return Rt(n.trigger), ve(n.trigger), n;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
const { window: o =
|
|
174
|
+
function qe(t, e, n = {}) {
|
|
175
|
+
const { window: o = ke, ...l } = n;
|
|
176
176
|
let s;
|
|
177
|
-
const a =
|
|
177
|
+
const a = ln(() => o && "ResizeObserver" in o), c = () => {
|
|
178
178
|
s && (s.disconnect(), s = void 0);
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
(
|
|
182
|
-
if (
|
|
183
|
-
s = new ResizeObserver(
|
|
184
|
-
for (const M of
|
|
179
|
+
}, v = L(() => Array.isArray(t) ? t.map((r) => ce(r)) : [ce(t)]), i = K(
|
|
180
|
+
v,
|
|
181
|
+
(r) => {
|
|
182
|
+
if (c(), a.value && o) {
|
|
183
|
+
s = new ResizeObserver(e);
|
|
184
|
+
for (const M of r)
|
|
185
185
|
M && s.observe(M, l);
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
188
|
{ immediate: !0, flush: "post" }
|
|
189
|
-
),
|
|
190
|
-
|
|
189
|
+
), f = () => {
|
|
190
|
+
c(), i();
|
|
191
191
|
};
|
|
192
|
-
return
|
|
192
|
+
return Ke(f), {
|
|
193
193
|
isSupported: a,
|
|
194
|
-
stop:
|
|
194
|
+
stop: f
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
const { window: o =
|
|
199
|
-
var
|
|
200
|
-
return (M = (
|
|
201
|
-
}), a = g(
|
|
202
|
-
|
|
203
|
-
([
|
|
204
|
-
const M = l === "border-box" ?
|
|
197
|
+
function an(t, e = { width: 0, height: 0 }, n = {}) {
|
|
198
|
+
const { window: o = ke, box: l = "content-box" } = n, s = L(() => {
|
|
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: v } = qe(
|
|
202
|
+
t,
|
|
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
|
|
209
|
-
a.value = Number.parseFloat(
|
|
206
|
+
const d = ce(t);
|
|
207
|
+
if (d) {
|
|
208
|
+
const u = o.getComputedStyle(d);
|
|
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 d = Array.isArray(M) ? M : [M];
|
|
213
|
+
a.value = d.reduce((u, { inlineSize: y }) => u + y, 0), c.value = d.reduce((u, { blockSize: y }) => u + y, 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
|
-
|
|
220
|
-
const
|
|
221
|
-
|
|
219
|
+
Ge(() => {
|
|
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
|
-
const
|
|
224
|
-
() =>
|
|
225
|
-
(
|
|
226
|
-
a.value =
|
|
223
|
+
const i = K(
|
|
224
|
+
() => ce(t),
|
|
225
|
+
(r) => {
|
|
226
|
+
a.value = r ? e.width : 0, c.value = r ? e.height : 0;
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
|
-
function
|
|
230
|
-
|
|
229
|
+
function f() {
|
|
230
|
+
v(), i();
|
|
231
231
|
}
|
|
232
232
|
return {
|
|
233
233
|
width: a,
|
|
234
|
-
height:
|
|
235
|
-
stop:
|
|
234
|
+
height: c,
|
|
235
|
+
stop: f
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
|
-
const
|
|
239
|
-
function
|
|
238
|
+
const dt = 1;
|
|
239
|
+
function un(t, e = {}) {
|
|
240
240
|
const {
|
|
241
241
|
throttle: n = 0,
|
|
242
242
|
idle: o = 200,
|
|
243
|
-
onStop: l =
|
|
244
|
-
onScroll: s =
|
|
243
|
+
onStop: l = he,
|
|
244
|
+
onScroll: s = he,
|
|
245
245
|
offset: a = {
|
|
246
246
|
left: 0,
|
|
247
247
|
right: 0,
|
|
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:
|
|
256
|
-
window:
|
|
257
|
-
onError:
|
|
258
|
-
console.error(
|
|
255
|
+
behavior: v = "auto",
|
|
256
|
+
window: i = ke,
|
|
257
|
+
onError: f = (T) => {
|
|
258
|
+
console.error(T);
|
|
259
259
|
}
|
|
260
|
-
} =
|
|
260
|
+
} = e, r = g(0), M = g(0), d = L({
|
|
261
261
|
get() {
|
|
262
|
-
return
|
|
262
|
+
return r.value;
|
|
263
263
|
},
|
|
264
|
-
set(
|
|
265
|
-
y(
|
|
264
|
+
set(T) {
|
|
265
|
+
y(T, void 0);
|
|
266
266
|
}
|
|
267
|
-
}),
|
|
267
|
+
}), u = L({
|
|
268
268
|
get() {
|
|
269
269
|
return M.value;
|
|
270
270
|
},
|
|
271
|
-
set(
|
|
272
|
-
y(void 0,
|
|
271
|
+
set(T) {
|
|
272
|
+
y(void 0, T);
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
function y(
|
|
276
|
-
var
|
|
277
|
-
if (!
|
|
275
|
+
function y(T, C) {
|
|
276
|
+
var k, P, Z;
|
|
277
|
+
if (!i)
|
|
278
278
|
return;
|
|
279
|
-
const
|
|
280
|
-
!
|
|
281
|
-
top: (
|
|
282
|
-
left: (
|
|
283
|
-
behavior:
|
|
279
|
+
const F = se(t);
|
|
280
|
+
!F || (Z = F instanceof Document ? i.document.body : F) == null || Z.scrollTo({
|
|
281
|
+
top: (k = se(C)) != null ? k : u.value,
|
|
282
|
+
left: (P = se(T)) != null ? P : d.value,
|
|
283
|
+
behavior: se(v)
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const p = g(!1), E = Ie({
|
|
287
287
|
left: !0,
|
|
288
288
|
right: !1,
|
|
289
289
|
top: !0,
|
|
290
290
|
bottom: !1
|
|
291
|
-
}),
|
|
291
|
+
}), A = Ie({
|
|
292
292
|
left: !1,
|
|
293
293
|
right: !1,
|
|
294
294
|
top: !1,
|
|
295
295
|
bottom: !1
|
|
296
|
-
}), z = (
|
|
297
|
-
!
|
|
298
|
-
}, h =
|
|
296
|
+
}), z = (T) => {
|
|
297
|
+
!p.value || (p.value = !1, A.left = !1, A.right = !1, A.top = !1, A.bottom = !1, l(T));
|
|
298
|
+
}, h = _e(z, n + o), m = (T) => {
|
|
299
299
|
var C;
|
|
300
|
-
if (!
|
|
300
|
+
if (!i)
|
|
301
301
|
return;
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
let
|
|
307
|
-
|
|
308
|
-
const
|
|
309
|
-
|
|
310
|
-
},
|
|
302
|
+
const k = ((C = T?.document) == null ? void 0 : C.documentElement) || T?.documentElement || ce(T), { display: P, flexDirection: Z } = getComputedStyle(k), F = k.scrollLeft;
|
|
303
|
+
A.left = F < r.value, A.right = F > r.value;
|
|
304
|
+
const ee = Math.abs(F) <= (a.left || 0), te = Math.abs(F) + k.clientWidth >= k.scrollWidth - (a.right || 0) - dt;
|
|
305
|
+
P === "flex" && Z === "row-reverse" ? (E.left = te, E.right = ee) : (E.left = ee, E.right = te), r.value = F;
|
|
306
|
+
let D = k.scrollTop;
|
|
307
|
+
T === i.document && !D && (D = i.document.body.scrollTop), A.top = D < M.value, A.bottom = D > M.value;
|
|
308
|
+
const w = Math.abs(D) <= (a.top || 0), N = Math.abs(D) + k.clientHeight >= k.scrollHeight - (a.bottom || 0) - dt;
|
|
309
|
+
P === "flex" && Z === "column-reverse" ? (E.top = N, E.bottom = w) : (E.top = w, E.bottom = N), M.value = D;
|
|
310
|
+
}, I = (T) => {
|
|
311
311
|
var C;
|
|
312
|
-
if (!
|
|
312
|
+
if (!i)
|
|
313
313
|
return;
|
|
314
|
-
const
|
|
315
|
-
m(
|
|
314
|
+
const k = (C = T.target.documentElement) != null ? C : T.target;
|
|
315
|
+
m(k), p.value = !0, h(T), s(T);
|
|
316
316
|
};
|
|
317
|
-
return
|
|
318
|
-
|
|
317
|
+
return Le(
|
|
318
|
+
t,
|
|
319
319
|
"scroll",
|
|
320
|
-
n ?
|
|
321
|
-
|
|
322
|
-
),
|
|
320
|
+
n ? Pe(I, n, !0, !1) : I,
|
|
321
|
+
c
|
|
322
|
+
), Ge(() => {
|
|
323
323
|
try {
|
|
324
|
-
const
|
|
325
|
-
if (!
|
|
324
|
+
const T = se(t);
|
|
325
|
+
if (!T)
|
|
326
326
|
return;
|
|
327
|
-
m(
|
|
328
|
-
} catch (
|
|
329
|
-
|
|
327
|
+
m(T);
|
|
328
|
+
} catch (T) {
|
|
329
|
+
f(T);
|
|
330
330
|
}
|
|
331
|
-
}),
|
|
332
|
-
|
|
331
|
+
}), Le(
|
|
332
|
+
t,
|
|
333
333
|
"scrollend",
|
|
334
334
|
z,
|
|
335
|
-
|
|
335
|
+
c
|
|
336
336
|
), {
|
|
337
|
-
x:
|
|
338
|
-
y:
|
|
339
|
-
isScrolling:
|
|
340
|
-
arrivedState:
|
|
341
|
-
directions:
|
|
337
|
+
x: d,
|
|
338
|
+
y: u,
|
|
339
|
+
isScrolling: p,
|
|
340
|
+
arrivedState: E,
|
|
341
|
+
directions: A,
|
|
342
342
|
measure() {
|
|
343
|
-
const
|
|
344
|
-
|
|
343
|
+
const T = se(t);
|
|
344
|
+
i && T && m(T);
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
let
|
|
349
|
-
function
|
|
348
|
+
let rn = 0;
|
|
349
|
+
function Je(t, e = {}) {
|
|
350
350
|
const n = g(!1), {
|
|
351
|
-
document: o =
|
|
351
|
+
document: o = nn,
|
|
352
352
|
immediate: l = !0,
|
|
353
353
|
manual: s = !1,
|
|
354
|
-
id: a = `vueuse_styletag_${++
|
|
355
|
-
} =
|
|
356
|
-
let
|
|
354
|
+
id: a = `vueuse_styletag_${++rn}`
|
|
355
|
+
} = e, c = g(t);
|
|
356
|
+
let v = () => {
|
|
357
357
|
};
|
|
358
|
-
const
|
|
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 && (v = K(
|
|
363
|
+
c,
|
|
364
364
|
(M) => {
|
|
365
|
-
|
|
365
|
+
r.textContent = M;
|
|
366
366
|
},
|
|
367
367
|
{ immediate: !0 }
|
|
368
368
|
), n.value = !0);
|
|
369
|
-
},
|
|
370
|
-
!o || !n.value || (
|
|
369
|
+
}, f = () => {
|
|
370
|
+
!o || !n.value || (v(), o.head.removeChild(o.getElementById(a)), n.value = !1);
|
|
371
371
|
};
|
|
372
|
-
return l && !s &&
|
|
372
|
+
return l && !s && Ge(i), s || Ke(f), {
|
|
373
373
|
id: a,
|
|
374
|
-
css:
|
|
375
|
-
unload:
|
|
376
|
-
load:
|
|
377
|
-
isLoaded:
|
|
374
|
+
css: c,
|
|
375
|
+
unload: f,
|
|
376
|
+
load: i,
|
|
377
|
+
isLoaded: yt(n)
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
const o =
|
|
382
|
-
return o != n && (
|
|
380
|
+
function cn(t, e, n) {
|
|
381
|
+
const o = t.style[e];
|
|
382
|
+
return o != n && (t.style[e] = n), {
|
|
383
383
|
reset() {
|
|
384
|
-
o != n && (
|
|
384
|
+
o != n && (t.style[e] = o);
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } =
|
|
390
|
-
let
|
|
391
|
-
const
|
|
392
|
-
let
|
|
393
|
-
const y = g([]),
|
|
394
|
-
let { sum:
|
|
395
|
-
return
|
|
396
|
-
}),
|
|
397
|
-
const { start:
|
|
398
|
-
return y.value.slice(
|
|
388
|
+
function fn(t, e) {
|
|
389
|
+
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = e, s = g(null), a = an(s), c = g(!0), v = _e(m, 100);
|
|
390
|
+
let i;
|
|
391
|
+
const f = mt(t), r = g(0), M = g({ start: 0, end: 10 }), d = g({ start: 0, end: l });
|
|
392
|
+
let u = 0;
|
|
393
|
+
const y = g([]), p = L(() => {
|
|
394
|
+
let { sum: w, height: N } = { sum: 0, height: 0 };
|
|
395
|
+
return f.value.map((S, _) => (typeof o == "number" ? N = o : N = o(_), w += N, { height: N, sum: w }));
|
|
396
|
+
}), E = L(() => P(M.value.start)), A = L(() => typeof o == "number" ? p.value.length * o : p.value[p.value.length - 1]?.sum || 0), z = L(() => {
|
|
397
|
+
const { start: w, end: N } = d.value;
|
|
398
|
+
return y.value.slice(w, N);
|
|
399
399
|
});
|
|
400
|
-
|
|
401
|
-
}),
|
|
402
|
-
|
|
400
|
+
ve(() => {
|
|
401
|
+
}), Dt(() => cancelAnimationFrame(i)), K(
|
|
402
|
+
f,
|
|
403
403
|
() => {
|
|
404
|
-
(a.width.value || a.height.value) &&
|
|
404
|
+
(a.width.value || a.height.value) && I();
|
|
405
405
|
},
|
|
406
406
|
{ deep: !0 }
|
|
407
|
-
),
|
|
407
|
+
), K(
|
|
408
408
|
[a.width, a.height],
|
|
409
|
-
([
|
|
410
|
-
(
|
|
409
|
+
([w, N]) => {
|
|
410
|
+
(w || N) && I();
|
|
411
411
|
},
|
|
412
412
|
{ deep: !0 }
|
|
413
|
-
),
|
|
414
|
-
h(),
|
|
413
|
+
), K(r, () => {
|
|
414
|
+
h(), v();
|
|
415
415
|
});
|
|
416
416
|
function h() {
|
|
417
|
-
|
|
417
|
+
c.value = !1;
|
|
418
418
|
}
|
|
419
419
|
function m() {
|
|
420
|
-
|
|
420
|
+
c.value = !0, n?.();
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
cancelAnimationFrame(
|
|
422
|
+
function I() {
|
|
423
|
+
cancelAnimationFrame(i), i = requestAnimationFrame(T);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function T() {
|
|
426
426
|
if (s.value) {
|
|
427
|
-
|
|
428
|
-
let
|
|
429
|
-
|
|
430
|
-
let
|
|
431
|
-
|
|
432
|
-
|
|
427
|
+
r.value = s.value.scrollTop;
|
|
428
|
+
let w = C(r.value);
|
|
429
|
+
u = k(w);
|
|
430
|
+
let N = Math.max(0, w - l), S = Math.min(
|
|
431
|
+
w + u + l,
|
|
432
|
+
f.value.length
|
|
433
433
|
);
|
|
434
|
-
M.value = { start:
|
|
435
|
-
data:
|
|
436
|
-
index:
|
|
437
|
-
})),
|
|
434
|
+
M.value = { start: N, end: S }, y.value = f.value.slice(N, S).map((_, x) => ({
|
|
435
|
+
data: _,
|
|
436
|
+
index: x + N
|
|
437
|
+
})), d.value.start = w - N, d.value.end = d.value.start + u;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
function C(
|
|
441
|
-
let
|
|
442
|
-
for (;
|
|
443
|
-
const
|
|
444
|
-
|
|
440
|
+
function C(w) {
|
|
441
|
+
let N = 0, S = p.value.length - 1, _ = -1;
|
|
442
|
+
for (; N <= S; ) {
|
|
443
|
+
const x = Math.floor((N + S) / 2);
|
|
444
|
+
p.value[x].sum >= w ? (_ = x, S = x - 1) : N = x + 1;
|
|
445
445
|
}
|
|
446
|
-
return Math.max(0,
|
|
446
|
+
return Math.max(0, _);
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
let
|
|
450
|
-
for (let
|
|
448
|
+
function k(w) {
|
|
449
|
+
let N = 0, S = 0;
|
|
450
|
+
for (let _ = w; _ < p.value.length && (N++, S += p.value[_].height, !(S >= a.height.value)); _++)
|
|
451
451
|
;
|
|
452
|
-
return
|
|
452
|
+
return N;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function P(w) {
|
|
455
455
|
if (typeof o == "number")
|
|
456
|
-
return
|
|
457
|
-
let
|
|
458
|
-
return
|
|
456
|
+
return w * o;
|
|
457
|
+
let N = p.value[w];
|
|
458
|
+
return N ? N.sum - N.height : 0;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
return
|
|
460
|
+
function Z(w) {
|
|
461
|
+
return p.value[w] || { sum: 0, height: 0 };
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function F(w, N = "smooth") {
|
|
464
464
|
if (s.value) {
|
|
465
|
-
const { reset:
|
|
465
|
+
const { reset: S } = cn(
|
|
466
466
|
s.value,
|
|
467
467
|
"scrollBehavior",
|
|
468
|
-
|
|
469
|
-
),
|
|
470
|
-
s.value.scrollTop =
|
|
468
|
+
N
|
|
469
|
+
), _ = Z(w);
|
|
470
|
+
s.value.scrollTop = _.sum - _.height, T(), S();
|
|
471
471
|
}
|
|
472
472
|
if (s.value) {
|
|
473
|
-
const
|
|
474
|
-
s.value.scrollTop =
|
|
473
|
+
const S = Z(w);
|
|
474
|
+
s.value.scrollTop = S.sum - S.height, T();
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
const
|
|
477
|
+
const ee = L(() => ({
|
|
478
478
|
style: {
|
|
479
479
|
width: "100%",
|
|
480
|
-
height: `${
|
|
481
|
-
pointerEvents:
|
|
480
|
+
height: `${A.value}px`,
|
|
481
|
+
pointerEvents: c.value ? void 0 : "none"
|
|
482
482
|
}
|
|
483
|
-
})),
|
|
483
|
+
})), te = L(() => ({
|
|
484
484
|
style: {
|
|
485
|
-
transform: `translate3d(0, ${
|
|
485
|
+
transform: `translate3d(0, ${E.value}px, 0)`,
|
|
486
486
|
"will-change": "transform"
|
|
487
487
|
}
|
|
488
|
-
})),
|
|
488
|
+
})), D = {
|
|
489
489
|
overflowY: "auto"
|
|
490
490
|
};
|
|
491
491
|
return {
|
|
492
492
|
list: y,
|
|
493
493
|
visiableList: z,
|
|
494
|
-
getItemHeightData:
|
|
494
|
+
getItemHeightData: Z,
|
|
495
495
|
getoffsetTopIndex: C,
|
|
496
|
-
totalHeight:
|
|
496
|
+
totalHeight: A,
|
|
497
497
|
clientHeight: a.height,
|
|
498
|
-
scrollTo:
|
|
499
|
-
scrollTop:
|
|
500
|
-
isScrollEnd:
|
|
498
|
+
scrollTo: F,
|
|
499
|
+
scrollTop: r,
|
|
500
|
+
isScrollEnd: c,
|
|
501
501
|
containerProps: {
|
|
502
502
|
ref: s,
|
|
503
503
|
onScroll: () => {
|
|
504
|
-
|
|
504
|
+
I();
|
|
505
505
|
},
|
|
506
|
-
style:
|
|
506
|
+
style: D
|
|
507
507
|
},
|
|
508
|
-
wrapperProps:
|
|
509
|
-
innerProps:
|
|
508
|
+
wrapperProps: ee,
|
|
509
|
+
innerProps: te
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
|
-
const
|
|
513
|
-
function
|
|
514
|
-
const { voidFn:
|
|
515
|
-
voidFn: (
|
|
512
|
+
const zt = Symbol(), et = Symbol(), tt = Symbol(), nt = Symbol(), ot = Symbol(), lt = Symbol(), st = Symbol(), at = Symbol(), it = Symbol(), Ae = Symbol(), ut = Symbol();
|
|
513
|
+
function Qo() {
|
|
514
|
+
const { voidFn: t, boolFn: e, boolRef: n, numberRef: o, arrayRef: l } = {
|
|
515
|
+
voidFn: (p) => {
|
|
516
516
|
},
|
|
517
|
-
boolFn: (
|
|
518
|
-
boolRef:
|
|
519
|
-
numberRef:
|
|
520
|
-
arrayRef:
|
|
521
|
-
}, s =
|
|
517
|
+
boolFn: (p) => !1,
|
|
518
|
+
boolRef: L(() => !1),
|
|
519
|
+
numberRef: L(() => 0),
|
|
520
|
+
arrayRef: L(() => [])
|
|
521
|
+
}, s = le(zt, "id"), a = le(ot, l), c = le(nt, e), v = le(it, n), i = le(tt, t), f = le(et, t), r = le(lt, t), M = le(st, t), d = le(at, t), u = le(Ae, t), y = le(ut, o);
|
|
522
522
|
return {
|
|
523
523
|
itemKey: s,
|
|
524
524
|
selected: a,
|
|
525
|
-
isSelected:
|
|
526
|
-
isAllSelected:
|
|
527
|
-
toggle:
|
|
528
|
-
toggleAll:
|
|
529
|
-
select:
|
|
525
|
+
isSelected: c,
|
|
526
|
+
isAllSelected: v,
|
|
527
|
+
toggle: i,
|
|
528
|
+
toggleAll: f,
|
|
529
|
+
select: r,
|
|
530
530
|
selectAll: M,
|
|
531
|
-
unselect:
|
|
532
|
-
unselectAll:
|
|
531
|
+
unselect: d,
|
|
532
|
+
unselectAll: u,
|
|
533
533
|
selectedCount: y
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
function
|
|
537
|
-
const o = g(!1), l = g(/* @__PURE__ */ new Set()), s =
|
|
538
|
-
|
|
539
|
-
|
|
536
|
+
function Yo(t, e, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
537
|
+
const o = g(!1), l = g(/* @__PURE__ */ new Set()), s = Ie(/* @__PURE__ */ new Map());
|
|
538
|
+
K(
|
|
539
|
+
t,
|
|
540
540
|
(h) => {
|
|
541
541
|
a(h);
|
|
542
542
|
},
|
|
@@ -544,82 +544,82 @@ function Qo(e, t, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
|
544
544
|
deep: n.deep,
|
|
545
545
|
immediate: !0
|
|
546
546
|
}
|
|
547
|
-
),
|
|
548
|
-
() =>
|
|
547
|
+
), K(
|
|
548
|
+
() => t.value.length,
|
|
549
549
|
() => {
|
|
550
|
-
a(
|
|
550
|
+
a(t.value);
|
|
551
551
|
}
|
|
552
|
-
),
|
|
552
|
+
), pt(() => {
|
|
553
553
|
o.value = !1, l.value.clear(), s.clear();
|
|
554
554
|
});
|
|
555
555
|
function a(h) {
|
|
556
556
|
s.clear(), h.forEach((m) => {
|
|
557
|
-
s.has(m[
|
|
557
|
+
s.has(m[e]) || s.set(m[e], m);
|
|
558
558
|
}), z();
|
|
559
559
|
}
|
|
560
|
-
const
|
|
560
|
+
const c = L(() => {
|
|
561
561
|
let h = [];
|
|
562
562
|
if (o.value != null)
|
|
563
563
|
o.value && (h = Array.from(s.values()));
|
|
564
564
|
else if (l.value.size) {
|
|
565
565
|
let m;
|
|
566
|
-
l.value.forEach((
|
|
567
|
-
m = s.get(
|
|
566
|
+
l.value.forEach((I) => {
|
|
567
|
+
m = s.get(I), m && h.push(m);
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
570
|
return h;
|
|
571
|
-
}),
|
|
571
|
+
}), v = L(() => {
|
|
572
572
|
let h = 0;
|
|
573
573
|
return o.value != null ? o.value && (h = s.size) : h = l.value.size, h;
|
|
574
|
-
}),
|
|
574
|
+
}), i = L(() => {
|
|
575
575
|
let h;
|
|
576
576
|
if (o.value != null)
|
|
577
577
|
h = o.value;
|
|
578
578
|
else {
|
|
579
|
-
const m = l.value.size,
|
|
580
|
-
h = m ==
|
|
579
|
+
const m = l.value.size, I = s.size;
|
|
580
|
+
h = m == I;
|
|
581
581
|
}
|
|
582
582
|
return h;
|
|
583
583
|
});
|
|
584
|
-
function
|
|
584
|
+
function f() {
|
|
585
585
|
o.value = !0;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function r() {
|
|
588
588
|
o.value = !1;
|
|
589
589
|
}
|
|
590
590
|
function M(h) {
|
|
591
591
|
s.has(h) && l.value.add(h);
|
|
592
592
|
}
|
|
593
|
-
function
|
|
594
|
-
|
|
593
|
+
function d(h) {
|
|
594
|
+
p(() => {
|
|
595
595
|
h.forEach((m) => {
|
|
596
|
-
M(m[
|
|
596
|
+
M(m[e]);
|
|
597
597
|
});
|
|
598
598
|
});
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
|
|
600
|
+
function u(h) {
|
|
601
|
+
p(() => {
|
|
602
602
|
h.forEach((m) => {
|
|
603
|
-
l.value.delete(m[
|
|
603
|
+
l.value.delete(m[e]);
|
|
604
604
|
});
|
|
605
605
|
});
|
|
606
606
|
}
|
|
607
607
|
function y(h) {
|
|
608
|
-
return o.value != null ? o.value : l.value.has(h[
|
|
608
|
+
return o.value != null ? o.value : l.value.has(h[e]);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function p(h) {
|
|
611
611
|
o.value != null && (o.value ? l.value = new Set(Array.from(s.keys())) : l.value = /* @__PURE__ */ new Set()), h(), 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
|
|
614
|
-
|
|
613
|
+
function E(h) {
|
|
614
|
+
p(() => {
|
|
615
615
|
h.forEach((m) => {
|
|
616
|
-
y(m) ? l.value.delete(m[
|
|
616
|
+
y(m) ? l.value.delete(m[e]) : M(m[e]);
|
|
617
617
|
});
|
|
618
618
|
});
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
const { value: h } =
|
|
622
|
-
h ?
|
|
620
|
+
function A() {
|
|
621
|
+
const { value: h } = i;
|
|
622
|
+
h ? r() : f();
|
|
623
623
|
}
|
|
624
624
|
function z() {
|
|
625
625
|
const h = [];
|
|
@@ -627,284 +627,288 @@ function Qo(e, t, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
|
627
627
|
s.get(m) || h.push(m);
|
|
628
628
|
}), h.forEach((m) => l.value.delete(m));
|
|
629
629
|
}
|
|
630
|
-
return
|
|
631
|
-
selected:
|
|
632
|
-
select:
|
|
633
|
-
selectAll:
|
|
634
|
-
unselect:
|
|
635
|
-
unselectAll:
|
|
636
|
-
toggle:
|
|
637
|
-
toggleAll:
|
|
630
|
+
return R(zt, e), R(et, A), R(tt, E), R(nt, y), R(ot, c), R(lt, d), R(st, f), R(at, u), R(it, i), R(Ae, r), R(Ae, r), R(ut, v), {
|
|
631
|
+
selected: c,
|
|
632
|
+
select: d,
|
|
633
|
+
selectAll: f,
|
|
634
|
+
unselect: u,
|
|
635
|
+
unselectAll: r,
|
|
636
|
+
toggle: E,
|
|
637
|
+
toggleAll: A,
|
|
638
638
|
isSelected: y,
|
|
639
|
-
isAllSelected:
|
|
640
|
-
selectedCount:
|
|
639
|
+
isAllSelected: i,
|
|
640
|
+
selectedCount: v
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
|
-
function
|
|
644
|
-
const
|
|
645
|
-
let
|
|
646
|
-
return
|
|
647
|
-
}), l =
|
|
648
|
-
let
|
|
649
|
-
return
|
|
650
|
-
}), s =
|
|
651
|
-
let
|
|
652
|
-
if (
|
|
653
|
-
|
|
643
|
+
function Bo(t) {
|
|
644
|
+
const e = g(!1), n = g(/* @__PURE__ */ new Set()), o = L(() => {
|
|
645
|
+
let u = [];
|
|
646
|
+
return e.value != null ? e.value && (u = t.value) : n.value.size && (u = Array.from(n.value.values())), u;
|
|
647
|
+
}), l = L(() => {
|
|
648
|
+
let u = 0;
|
|
649
|
+
return e.value != null ? e.value && (u = t.value.length) : u = n.value.size, u;
|
|
650
|
+
}), s = L(() => {
|
|
651
|
+
let u;
|
|
652
|
+
if (e.value != null)
|
|
653
|
+
u = e.value;
|
|
654
654
|
else {
|
|
655
|
-
const y = n.value.size,
|
|
656
|
-
|
|
655
|
+
const y = n.value.size, p = t.value.length;
|
|
656
|
+
u = y == p;
|
|
657
657
|
}
|
|
658
|
-
return
|
|
658
|
+
return u;
|
|
659
659
|
});
|
|
660
660
|
function a() {
|
|
661
|
-
|
|
661
|
+
e.value = !0;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
664
|
-
|
|
663
|
+
function c() {
|
|
664
|
+
e.value = !1;
|
|
665
665
|
}
|
|
666
|
-
function u
|
|
667
|
-
|
|
668
|
-
|
|
666
|
+
function v(u) {
|
|
667
|
+
r(() => {
|
|
668
|
+
u.forEach((y) => {
|
|
669
669
|
n.value.add(y);
|
|
670
670
|
});
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
|
|
675
|
-
|
|
673
|
+
function i(u) {
|
|
674
|
+
r(() => {
|
|
675
|
+
u.forEach((y) => {
|
|
676
676
|
n.value.delete(y);
|
|
677
677
|
});
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
|
-
function
|
|
681
|
-
return
|
|
680
|
+
function f(u) {
|
|
681
|
+
return e.value != null ? e.value : n.value.has(u);
|
|
682
682
|
}
|
|
683
|
-
function
|
|
684
|
-
|
|
683
|
+
function r(u) {
|
|
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
|
-
function M(
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
686
|
+
function M(u) {
|
|
687
|
+
r(() => {
|
|
688
|
+
u.forEach((y) => {
|
|
689
|
+
f(y) ? n.value.delete(y) : n.value.add(y);
|
|
690
690
|
});
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
|
-
function
|
|
694
|
-
const { value:
|
|
695
|
-
|
|
693
|
+
function d() {
|
|
694
|
+
const { value: u } = s;
|
|
695
|
+
u ? c() : a();
|
|
696
696
|
}
|
|
697
|
-
return
|
|
697
|
+
return R(et, d), R(tt, M), R(nt, f), R(ot, o), R(lt, v), R(st, a), R(at, i), R(it, s), R(Ae, c), R(Ae, c), R(ut, l), {
|
|
698
698
|
selected: o,
|
|
699
|
-
select:
|
|
699
|
+
select: v,
|
|
700
700
|
selectAll: a,
|
|
701
|
-
unselect:
|
|
702
|
-
unselectAll:
|
|
701
|
+
unselect: i,
|
|
702
|
+
unselectAll: c,
|
|
703
703
|
toggle: M,
|
|
704
|
-
toggleAll:
|
|
705
|
-
isSelected:
|
|
704
|
+
toggleAll: d,
|
|
705
|
+
isSelected: f,
|
|
706
706
|
isAllSelected: s,
|
|
707
707
|
selectedCount: l
|
|
708
708
|
};
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
return
|
|
710
|
+
function dn(t, e) {
|
|
711
|
+
return t > e ? "horizontal" : e > t ? "vertical" : "";
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
const
|
|
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(""), c = () => a.value === "vertical", v = () => 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) -
|
|
720
|
-
const
|
|
721
|
-
(!a.value || l.value <
|
|
718
|
+
move: (M, d) => {
|
|
719
|
+
n.value = (M < 0 ? 0 : M) - t.value, o.value = d - e.value, l.value = Math.abs(n.value), s.value = Math.abs(o.value);
|
|
720
|
+
const u = 10;
|
|
721
|
+
(!a.value || l.value < u && s.value < u) && (a.value = dn(l.value, s.value));
|
|
722
722
|
},
|
|
723
|
-
start: (M,
|
|
724
|
-
|
|
723
|
+
start: (M, d) => {
|
|
724
|
+
i(), t.value = M, e.value = d;
|
|
725
725
|
},
|
|
726
|
-
reset:
|
|
727
|
-
startX:
|
|
728
|
-
startY:
|
|
726
|
+
reset: i,
|
|
727
|
+
startX: t,
|
|
728
|
+
startY: e,
|
|
729
729
|
deltaX: n,
|
|
730
730
|
deltaY: o,
|
|
731
731
|
offsetX: l,
|
|
732
732
|
offsetY: s,
|
|
733
733
|
direction: a,
|
|
734
|
-
isVertical:
|
|
735
|
-
isHorizontal:
|
|
734
|
+
isVertical: c,
|
|
735
|
+
isHorizontal: v
|
|
736
736
|
};
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function Ye(t) {
|
|
739
739
|
return () => {
|
|
740
|
-
console.debug(`\u9ED8\u8BA4${
|
|
740
|
+
console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`);
|
|
741
741
|
};
|
|
742
742
|
}
|
|
743
|
-
function
|
|
744
|
-
key:
|
|
745
|
-
customAttributeValue:
|
|
743
|
+
function Lt({
|
|
744
|
+
key: t,
|
|
745
|
+
customAttributeValue: e,
|
|
746
746
|
attribute: n,
|
|
747
747
|
selectWay: o = "colum",
|
|
748
748
|
scrollOptions: l = {},
|
|
749
749
|
getSelectMap: s = () => ({})
|
|
750
750
|
}) {
|
|
751
751
|
const {
|
|
752
|
-
select: a =
|
|
753
|
-
unselect:
|
|
754
|
-
unselectAll:
|
|
755
|
-
selected:
|
|
752
|
+
select: a = Ye("\u9009\u62E9"),
|
|
753
|
+
unselect: c = Ye("\u53D6\u6D88\u9009\u62E9"),
|
|
754
|
+
unselectAll: v = Ye("\u53D6\u6D88\u5168\u9009"),
|
|
755
|
+
selected: i = L(() => [])
|
|
756
756
|
} = s();
|
|
757
|
-
let
|
|
758
|
-
const
|
|
759
|
-
() =>
|
|
760
|
-
), M =
|
|
757
|
+
let f = {};
|
|
758
|
+
const r = L(
|
|
759
|
+
() => Pe(o === "colum" ? bt : _t, 50)
|
|
760
|
+
), M = L(() => t ?? n), d = (() => e ? (b) => e(b) : (b) => b)(), u = /* @__PURE__ */ new Set();
|
|
761
761
|
let y = /* @__PURE__ */ new Set();
|
|
762
|
-
const
|
|
762
|
+
const p = g(!0), E = g(), A = g(!1), z = g({ x: 0, y: 0 }), h = g({ x: 0, y: 0, scrollTop: 0 }), m = g({}), I = g({
|
|
763
763
|
top: 0,
|
|
764
764
|
height: 0,
|
|
765
765
|
sync(b = !1) {
|
|
766
|
-
|
|
766
|
+
I.value.top = E.value?.scrollTop || 0, b && (I.value.height = E.value?.scrollHeight || 0);
|
|
767
767
|
}
|
|
768
|
-
}),
|
|
768
|
+
}), T = L(() => A.value ? {
|
|
769
769
|
left: Math.min(z.value.x, h.value.x) - m.value.left,
|
|
770
770
|
top: Math.min(z.value.y, h.value.y) - m.value.top,
|
|
771
771
|
width: Math.abs(z.value.x - h.value.x),
|
|
772
772
|
height: Math.abs(z.value.y - h.value.y)
|
|
773
|
-
} : { left: 0, top: 0, width: 0, height: 0 }), C = g(!1), { margin:
|
|
774
|
-
let
|
|
775
|
-
const
|
|
776
|
-
let
|
|
777
|
-
function
|
|
778
|
-
if (cancelAnimationFrame(
|
|
779
|
-
Math.min(
|
|
780
|
-
-
|
|
781
|
-
),
|
|
782
|
-
const
|
|
783
|
-
if (!
|
|
773
|
+
} : { left: 0, top: 0, width: 0, height: 0 }), C = g(!1), { margin: k = 50, startSpeed: P = 30, maxSpeed: Z = 30 } = l;
|
|
774
|
+
let F;
|
|
775
|
+
const ee = k, te = P, D = Z, w = (b) => b ** 1;
|
|
776
|
+
let N = 0;
|
|
777
|
+
function S(b) {
|
|
778
|
+
if (cancelAnimationFrame(F), N = _(b), N = Math.max(
|
|
779
|
+
Math.min(N, D),
|
|
780
|
+
-D
|
|
781
|
+
), N !== 0) {
|
|
782
|
+
const O = E.value;
|
|
783
|
+
if (!O || !A.value)
|
|
784
784
|
return;
|
|
785
|
-
const
|
|
786
|
-
let
|
|
787
|
-
|
|
785
|
+
const H = I.value.height - m.value.height;
|
|
786
|
+
let $ = I.value.top + Number(N);
|
|
787
|
+
$ = Math.min(Math.max(0, $), H), O.scrollTop = $, B(), F = requestAnimationFrame(() => S(b));
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
function
|
|
791
|
-
if (
|
|
792
|
-
const
|
|
793
|
-
if (
|
|
794
|
-
return
|
|
795
|
-
const
|
|
796
|
-
if (
|
|
797
|
-
return -
|
|
790
|
+
function _(b) {
|
|
791
|
+
if (E.value) {
|
|
792
|
+
const H = m.value, $ = H.bottom - b;
|
|
793
|
+
if ($ < ee)
|
|
794
|
+
return te * w(1 - $ / ee);
|
|
795
|
+
const V = b - H.top;
|
|
796
|
+
if (V < ee)
|
|
797
|
+
return -te * w(1 - V / ee);
|
|
798
798
|
}
|
|
799
799
|
return 0;
|
|
800
800
|
}
|
|
801
|
-
function
|
|
802
|
-
const
|
|
803
|
-
return
|
|
801
|
+
function x(b) {
|
|
802
|
+
const O = { ...T.value, right: 0, bottom: 0 };
|
|
803
|
+
return O.left += m.value.left, O.top += m.value.top - I.value.top, O.right = O.width + O.left, O.bottom = O.height + O.top, O.left < b.right && O.right > b.left && O.top < b.bottom && O.bottom > b.top;
|
|
804
804
|
}
|
|
805
|
-
function
|
|
806
|
-
|
|
807
|
-
const { top: b, height:
|
|
805
|
+
function B() {
|
|
806
|
+
I.value.sync();
|
|
807
|
+
const { top: b, height: O } = I.value;
|
|
808
808
|
h.value.y = Math.min(
|
|
809
|
-
|
|
809
|
+
O + m.value.top,
|
|
810
810
|
h.value.y + b - h.value.scrollTop
|
|
811
811
|
), h.value.scrollTop = b;
|
|
812
812
|
}
|
|
813
|
-
function
|
|
814
|
-
let
|
|
815
|
-
|
|
816
|
-
const
|
|
817
|
-
for (let
|
|
818
|
-
const
|
|
819
|
-
if (
|
|
813
|
+
function W(b, O, H = "dynamic-styles") {
|
|
814
|
+
let $ = document.getElementById(H);
|
|
815
|
+
$ || ($ = document.createElement("style"), $.id = H, document.head.appendChild($));
|
|
816
|
+
const V = $.sheet.cssRules, oe = V.length, ze = `${b} { ${O} }`;
|
|
817
|
+
for (let ye = 0; ye < oe; ye++) {
|
|
818
|
+
const Qe = V[ye];
|
|
819
|
+
if (Qe.selectorText === b && Qe.style.cssText === O)
|
|
820
820
|
return;
|
|
821
821
|
}
|
|
822
|
-
|
|
822
|
+
$.sheet.insertRule(ze, oe);
|
|
823
823
|
}
|
|
824
|
-
function
|
|
825
|
-
|
|
826
|
-
const
|
|
827
|
-
z.value.x = b, z.value.y =
|
|
828
|
-
const
|
|
824
|
+
function ne(b, O) {
|
|
825
|
+
p.value = !0, A.value = !0, I.value.sync(!0);
|
|
826
|
+
const H = O + I.value.top;
|
|
827
|
+
z.value.x = b, z.value.y = H, h.value.x = b, h.value.y = H, E.value?.classList.add("disable-scroll-behavior"), u.clear();
|
|
828
|
+
const $ = i.value;
|
|
829
829
|
y = new Set(
|
|
830
|
-
|
|
831
|
-
),
|
|
830
|
+
$.map((V) => V[M.value])
|
|
831
|
+
), ft();
|
|
832
832
|
}
|
|
833
|
-
function
|
|
834
|
-
!
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
), h.value.scrollTop =
|
|
833
|
+
function G(b, O, H) {
|
|
834
|
+
!A.value || (p.value && (o === "colum" && X() || (p.value = !1)), H?.(), S(O), h.value.x = Math.max(b, m.value.left), h.value.y = Math.min(
|
|
835
|
+
O + I.value.top,
|
|
836
|
+
I.value.height + m.value.top
|
|
837
|
+
), h.value.scrollTop = I.value.top, r.value());
|
|
838
838
|
}
|
|
839
839
|
function Me() {
|
|
840
|
-
|
|
840
|
+
A.value = !1, E.value?.classList.remove("disable-scroll-behavior");
|
|
841
841
|
}
|
|
842
|
-
function
|
|
843
|
-
!
|
|
842
|
+
function ie() {
|
|
843
|
+
!A.value || (N || B(), r.value());
|
|
844
844
|
}
|
|
845
|
-
function
|
|
846
|
-
if (!
|
|
845
|
+
function X() {
|
|
846
|
+
if (!A.value)
|
|
847
847
|
return !1;
|
|
848
|
-
const { width: b, height:
|
|
849
|
-
return !(Math.max(b,
|
|
850
|
-
}
|
|
851
|
-
function
|
|
852
|
-
|
|
853
|
-
}
|
|
854
|
-
function
|
|
855
|
-
|
|
856
|
-
const S = v(b.getAttribute(`${n}`));
|
|
857
|
-
d[M.value] = S;
|
|
858
|
-
const W = y.has(S), F = i.has(S);
|
|
859
|
-
k(b.getBoundingClientRect()) ? F || (W ? r([d]) : a([d]), i.add(S)) : F && (W ? a([d]) : r([d]), i.delete(S));
|
|
860
|
-
});
|
|
848
|
+
const { width: b, height: O } = T.value;
|
|
849
|
+
return !(Math.max(b, O) > 5);
|
|
850
|
+
}
|
|
851
|
+
function me() {
|
|
852
|
+
X() && ct();
|
|
853
|
+
}
|
|
854
|
+
function ct() {
|
|
855
|
+
v();
|
|
861
856
|
}
|
|
862
857
|
function bt() {
|
|
858
|
+
X() || E.value?.querySelectorAll(`[${n}]`).forEach((b) => {
|
|
859
|
+
const O = d(b.getAttribute(`${n}`));
|
|
860
|
+
f[M.value] = O;
|
|
861
|
+
const H = y.has(O), $ = u.has(O);
|
|
862
|
+
x(b.getBoundingClientRect()) ? $ || (H ? c([f]) : a([f]), u.add(O)) : $ && (H ? a([f]) : c([f]), u.delete(O));
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
function _t() {
|
|
863
866
|
const b = [];
|
|
864
|
-
let
|
|
865
|
-
|
|
866
|
-
const
|
|
867
|
-
b.push(
|
|
868
|
-
}),
|
|
869
|
-
const
|
|
870
|
-
|
|
867
|
+
let O = null, H = 0;
|
|
868
|
+
E.value?.querySelectorAll(`[${n}]`).forEach(($, V) => {
|
|
869
|
+
const oe = d($.getAttribute(`${n}`));
|
|
870
|
+
b.push(oe), x($.getBoundingClientRect()) && (O === null && (O = V), O = Math.min(O, V), H = Math.max(H, V));
|
|
871
|
+
}), E.value?.querySelectorAll(`[${n}]`).forEach(($, V) => {
|
|
872
|
+
const oe = b[V], ze = y.has(oe), ye = u.has(oe);
|
|
873
|
+
O !== null && V >= O && V <= H ? 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));
|
|
871
874
|
});
|
|
872
875
|
}
|
|
873
|
-
function
|
|
874
|
-
!
|
|
876
|
+
function ft() {
|
|
877
|
+
!E.value || (m.value = E.value.getBoundingClientRect());
|
|
875
878
|
}
|
|
876
|
-
function
|
|
877
|
-
return !b?.value || (
|
|
879
|
+
function kt(b) {
|
|
880
|
+
return !b?.value || (E.value = b.value, !E?.value) ? !1 : (ft(), W(".disable-scroll-behavior", "scroll-behavior: unset !important;"), !0);
|
|
878
881
|
}
|
|
879
882
|
return {
|
|
880
|
-
init:
|
|
881
|
-
dragStart:
|
|
882
|
-
dragMove:
|
|
883
|
+
init: kt,
|
|
884
|
+
dragStart: ne,
|
|
885
|
+
dragMove: G,
|
|
883
886
|
dragEnd: Me,
|
|
884
|
-
onScroll:
|
|
885
|
-
isSingleClick:
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
887
|
+
onScroll: ie,
|
|
888
|
+
isSingleClick: X,
|
|
889
|
+
cancelSelect: ct,
|
|
890
|
+
cancelSelectAllBySingleClick: me,
|
|
891
|
+
selectFn: r,
|
|
892
|
+
getAttributeValue: d,
|
|
889
893
|
incrementalSelect: C,
|
|
890
|
-
selectRange:
|
|
891
|
-
isPressing:
|
|
892
|
-
containerEl:
|
|
894
|
+
selectRange: T,
|
|
895
|
+
isPressing: A,
|
|
896
|
+
containerEl: E
|
|
893
897
|
};
|
|
894
898
|
}
|
|
895
|
-
function
|
|
896
|
-
const
|
|
897
|
-
onScroll:
|
|
898
|
-
dragStart:
|
|
899
|
-
dragMove:
|
|
900
|
-
dragEnd:
|
|
901
|
-
cancelSelectAllBySingleClick:
|
|
902
|
-
} =
|
|
903
|
-
left: `${
|
|
904
|
-
top: `${
|
|
905
|
-
width: `${
|
|
906
|
-
height: `${
|
|
907
|
-
})), { load:
|
|
899
|
+
function Uo(t) {
|
|
900
|
+
const e = Lt(t), { selectRange: n } = e, {
|
|
901
|
+
onScroll: o,
|
|
902
|
+
dragStart: l,
|
|
903
|
+
dragMove: s,
|
|
904
|
+
dragEnd: a,
|
|
905
|
+
cancelSelectAllBySingleClick: c
|
|
906
|
+
} = e, v = L(() => ({
|
|
907
|
+
left: `${n.value.left}px`,
|
|
908
|
+
top: `${n.value.top}px`,
|
|
909
|
+
width: `${n.value.width}px`,
|
|
910
|
+
height: `${n.value.height}px`
|
|
911
|
+
})), { load: i } = Je(
|
|
908
912
|
`.drag-select-box {
|
|
909
913
|
position: absolute;
|
|
910
914
|
z-index: 99999;
|
|
@@ -912,84 +916,84 @@ function Bo(e, t = !1) {
|
|
|
912
916
|
opacity: 0.5;
|
|
913
917
|
}`,
|
|
914
918
|
{ id: "styletag_lzc_dragselect", manual: !0 }
|
|
915
|
-
),
|
|
919
|
+
), f = J({
|
|
916
920
|
render() {
|
|
917
|
-
return
|
|
921
|
+
return fe("div", {
|
|
918
922
|
id: "selectBoxEl",
|
|
919
923
|
class: "drag-select-box",
|
|
920
|
-
style:
|
|
924
|
+
style: v.value
|
|
921
925
|
});
|
|
922
926
|
}
|
|
923
927
|
});
|
|
924
|
-
function
|
|
925
|
-
|
|
928
|
+
function r(p) {
|
|
929
|
+
p.button === 0 && (p.ctrlKey || p.metaKey ? e.incrementalSelect.value = !0 : e.incrementalSelect.value = !1, l(p.x, p.y), window.addEventListener("mousemove", M), window.addEventListener("mouseup", d));
|
|
926
930
|
}
|
|
927
|
-
function
|
|
928
|
-
|
|
931
|
+
function M(p) {
|
|
932
|
+
s(p.x, p.y);
|
|
929
933
|
}
|
|
930
|
-
function
|
|
931
|
-
window.removeEventListener("mousemove",
|
|
932
|
-
(
|
|
933
|
-
|
|
934
|
+
function d(p) {
|
|
935
|
+
window.removeEventListener("mousemove", M), window.removeEventListener("mouseup", d), p.composedPath().some(
|
|
936
|
+
(A) => e.getAttributeValue(
|
|
937
|
+
A?.getAttribute?.(t.attribute)
|
|
934
938
|
)
|
|
935
|
-
) ||
|
|
939
|
+
) || c(), a(), e.incrementalSelect.value = !1;
|
|
936
940
|
}
|
|
937
|
-
function
|
|
941
|
+
function u(p) {
|
|
938
942
|
try {
|
|
939
|
-
if (!
|
|
943
|
+
if (!e.init(p))
|
|
940
944
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
941
|
-
if (!
|
|
945
|
+
if (!e.containerEl?.value)
|
|
942
946
|
return !1;
|
|
943
|
-
|
|
947
|
+
Ee(fe(f), e.containerEl.value), i(), e.containerEl.value?.addEventListener("scroll", o), e.containerEl.value?.addEventListener("mousedown", r);
|
|
944
948
|
} catch (E) {
|
|
945
949
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", E);
|
|
946
950
|
}
|
|
947
951
|
}
|
|
948
|
-
function
|
|
949
|
-
|
|
952
|
+
function y() {
|
|
953
|
+
e.containerEl.value?.removeEventListener("scroll", o), e.containerEl.value?.removeEventListener("mousedown", r);
|
|
950
954
|
}
|
|
951
|
-
return { init:
|
|
955
|
+
return { init: u, unMount: y };
|
|
952
956
|
}
|
|
953
|
-
function
|
|
954
|
-
const { joinSelectMode: n, pressTime: o = 600, selectModeRef: l } =
|
|
955
|
-
...
|
|
957
|
+
function Ro(t, e = {}) {
|
|
958
|
+
const { joinSelectMode: n, pressTime: o = 600, selectModeRef: l } = e, s = Lt({
|
|
959
|
+
...t,
|
|
956
960
|
selectWay: "row",
|
|
957
961
|
scrollOptions: {
|
|
958
962
|
startSpeed: 5,
|
|
959
963
|
maxSpeed: 5
|
|
960
964
|
}
|
|
961
|
-
}), { onScroll: a, dragStart:
|
|
962
|
-
let
|
|
963
|
-
const
|
|
965
|
+
}), { onScroll: a, dragStart: c, dragMove: v, dragEnd: i } = s;
|
|
966
|
+
let f;
|
|
967
|
+
const r = vn();
|
|
964
968
|
function M() {
|
|
965
|
-
clearTimeout(
|
|
969
|
+
clearTimeout(f);
|
|
966
970
|
}
|
|
967
|
-
function
|
|
968
|
-
return m.composedPath().some((
|
|
971
|
+
function d(m) {
|
|
972
|
+
return m.composedPath().some((I) => !!I?.getAttribute?.(t.attribute));
|
|
969
973
|
}
|
|
970
|
-
function
|
|
971
|
-
return l?.value && !s.isPressing.value &&
|
|
974
|
+
function u() {
|
|
975
|
+
return l?.value && !s.isPressing.value && r.isHorizontal();
|
|
972
976
|
}
|
|
973
|
-
function y(m,
|
|
974
|
-
(
|
|
977
|
+
function y(m, I, T) {
|
|
978
|
+
(I == null || T == null) && (I = m.targetTouches[0].clientX, T = m.targetTouches[0].clientY), c(I, T), n?.(), v(I, T, () => m.preventDefault());
|
|
975
979
|
}
|
|
976
|
-
function
|
|
977
|
-
const { clientX:
|
|
978
|
-
|
|
980
|
+
function p(m) {
|
|
981
|
+
const { clientX: I, clientY: T } = m.targetTouches[0];
|
|
982
|
+
r.start(I, T), M(), d(m) && (f = setTimeout(() => {
|
|
979
983
|
y(m), m.preventDefault();
|
|
980
984
|
}, o));
|
|
981
985
|
}
|
|
982
|
-
function
|
|
986
|
+
function E(m) {
|
|
983
987
|
M();
|
|
984
|
-
const { clientX:
|
|
985
|
-
if (
|
|
986
|
-
y(m,
|
|
988
|
+
const { clientX: I, clientY: T } = m.targetTouches[0];
|
|
989
|
+
if (r.move(I, T), u()) {
|
|
990
|
+
y(m, r.startX.value, r.startY.value);
|
|
987
991
|
return;
|
|
988
992
|
}
|
|
989
|
-
|
|
993
|
+
v(I, T, () => m.preventDefault());
|
|
990
994
|
}
|
|
991
|
-
function
|
|
992
|
-
M(),
|
|
995
|
+
function A() {
|
|
996
|
+
M(), i();
|
|
993
997
|
}
|
|
994
998
|
function z(m) {
|
|
995
999
|
try {
|
|
@@ -997,21 +1001,21 @@ function Uo(e, t = {}) {
|
|
|
997
1001
|
throw new Error("\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E");
|
|
998
1002
|
if (!s.containerEl?.value)
|
|
999
1003
|
return !1;
|
|
1000
|
-
const
|
|
1001
|
-
|
|
1002
|
-
} catch (
|
|
1003
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
1004
|
+
const I = s.containerEl.value;
|
|
1005
|
+
I.addEventListener("scroll", a), I.addEventListener("touchstart", p), I.addEventListener("touchmove", E), window.addEventListener("pointerup", A);
|
|
1006
|
+
} catch (I) {
|
|
1007
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", I);
|
|
1004
1008
|
}
|
|
1005
1009
|
}
|
|
1006
1010
|
function h() {
|
|
1007
1011
|
if (!s.containerEl?.value)
|
|
1008
1012
|
return;
|
|
1009
1013
|
const m = s.containerEl.value;
|
|
1010
|
-
m.removeEventListener("scroll", a), m.removeEventListener("touchstart",
|
|
1014
|
+
m.removeEventListener("scroll", a), m.removeEventListener("touchstart", p), m.removeEventListener("touchmove", E), window.removeEventListener("pointerup", A);
|
|
1011
1015
|
}
|
|
1012
1016
|
return { init: z, unMount: h };
|
|
1013
1017
|
}
|
|
1014
|
-
const
|
|
1018
|
+
const Mn = Symbol(), gn = /* @__PURE__ */ J({
|
|
1015
1019
|
__name: "Dialog",
|
|
1016
1020
|
props: {
|
|
1017
1021
|
visiable: { type: Boolean, default: !1 },
|
|
@@ -1022,71 +1026,71 @@ const vn = Symbol(), Mn = /* @__PURE__ */ J({
|
|
|
1022
1026
|
onClickOverlay: null
|
|
1023
1027
|
},
|
|
1024
1028
|
emits: ["update:visiable"],
|
|
1025
|
-
setup(
|
|
1026
|
-
const n =
|
|
1027
|
-
n.onClickOverlay?.(), n.closeOnClickOverlay &&
|
|
1029
|
+
setup(t, { emit: e }) {
|
|
1030
|
+
const n = t, o = () => {
|
|
1031
|
+
n.onClickOverlay?.(), n.closeOnClickOverlay && e("update:visiable", !1);
|
|
1028
1032
|
};
|
|
1029
|
-
return
|
|
1030
|
-
default:
|
|
1031
|
-
|
|
1033
|
+
return R(Mn, () => e("update:visiable", !1)), (l, s) => (Y(), Ce(We, { name: "modal" }, {
|
|
1034
|
+
default: Xe(() => [
|
|
1035
|
+
t.visiable ? de((Y(), U("div", {
|
|
1032
1036
|
key: 0,
|
|
1033
|
-
class:
|
|
1037
|
+
class: ue([t.hiddenOverlay ? "no-overlay-modal" : "lzc-modal", t.modalClass])
|
|
1034
1038
|
}, [
|
|
1035
|
-
|
|
1036
|
-
onMousedown: s[0] || (s[0] =
|
|
1039
|
+
Q("div", {
|
|
1040
|
+
onMousedown: s[0] || (s[0] = we(() => {
|
|
1037
1041
|
}, ["stop"])),
|
|
1038
|
-
class:
|
|
1042
|
+
class: ue(["lzc-dialog", t.dialogClass])
|
|
1039
1043
|
}, [
|
|
1040
|
-
|
|
1044
|
+
De(l.$slots, "default", {}, void 0, !0)
|
|
1041
1045
|
], 34)
|
|
1042
1046
|
], 2)), [
|
|
1043
|
-
[j(
|
|
1044
|
-
]) :
|
|
1047
|
+
[j(Zt), () => o()]
|
|
1048
|
+
]) : ge("", !0)
|
|
1045
1049
|
]),
|
|
1046
1050
|
_: 3
|
|
1047
1051
|
}));
|
|
1048
1052
|
}
|
|
1049
1053
|
});
|
|
1050
|
-
const
|
|
1051
|
-
const n =
|
|
1052
|
-
for (const [o, l] of
|
|
1054
|
+
const ae = (t, e) => {
|
|
1055
|
+
const n = t.__vccOpts || t;
|
|
1056
|
+
for (const [o, l] of e)
|
|
1053
1057
|
n[o] = l;
|
|
1054
1058
|
return n;
|
|
1055
|
-
},
|
|
1056
|
-
function
|
|
1057
|
-
function
|
|
1059
|
+
}, hn = /* @__PURE__ */ ae(gn, [["__scopeId", "data-v-3d61e60a"]]);
|
|
1060
|
+
function $o(t) {
|
|
1061
|
+
function e(n, o) {
|
|
1058
1062
|
const l = document.createElement("div"), s = {
|
|
1059
1063
|
setup() {
|
|
1060
|
-
return () =>
|
|
1061
|
-
|
|
1064
|
+
return () => fe(
|
|
1065
|
+
hn,
|
|
1062
1066
|
{
|
|
1063
1067
|
visiable: !0,
|
|
1064
1068
|
"onUpdate:visiable": () => {
|
|
1065
1069
|
l?.remove();
|
|
1066
1070
|
},
|
|
1067
|
-
...
|
|
1071
|
+
...t
|
|
1068
1072
|
},
|
|
1069
1073
|
{
|
|
1070
|
-
default: () =>
|
|
1074
|
+
default: () => fe(n, o)
|
|
1071
1075
|
}
|
|
1072
1076
|
);
|
|
1073
1077
|
}
|
|
1074
1078
|
};
|
|
1075
|
-
return document.body.appendChild(l),
|
|
1079
|
+
return document.body.appendChild(l), Ee(fe(s), l), {
|
|
1076
1080
|
close: () => l?.remove()
|
|
1077
1081
|
};
|
|
1078
1082
|
}
|
|
1079
1083
|
return {
|
|
1080
|
-
create:
|
|
1084
|
+
create: e
|
|
1081
1085
|
};
|
|
1082
1086
|
}
|
|
1083
|
-
function
|
|
1084
|
-
component:
|
|
1085
|
-
componentProps:
|
|
1087
|
+
function jt({
|
|
1088
|
+
component: t,
|
|
1089
|
+
componentProps: e,
|
|
1086
1090
|
delay: n = 300
|
|
1087
1091
|
}) {
|
|
1088
1092
|
const l = `lzc-delay-loading-${`${new Date().getTime()}`}`, s = `${n}ms`;
|
|
1089
|
-
return
|
|
1093
|
+
return Je(
|
|
1090
1094
|
`@keyframes lzcDelayLoad {
|
|
1091
1095
|
to {
|
|
1092
1096
|
opacity: 1;
|
|
@@ -1098,21 +1102,21 @@ function At({
|
|
|
1098
1102
|
}`
|
|
1099
1103
|
), { LoadingComp: J({
|
|
1100
1104
|
setup() {
|
|
1101
|
-
const
|
|
1102
|
-
return
|
|
1103
|
-
|
|
1104
|
-
}), () =>
|
|
1105
|
+
const c = sn();
|
|
1106
|
+
return ve(() => {
|
|
1107
|
+
c.value?.classList?.add(l);
|
|
1108
|
+
}), () => fe(t, e);
|
|
1105
1109
|
}
|
|
1106
1110
|
}) };
|
|
1107
1111
|
}
|
|
1108
|
-
function
|
|
1109
|
-
component:
|
|
1110
|
-
componentProps:
|
|
1112
|
+
function Ho({
|
|
1113
|
+
component: t,
|
|
1114
|
+
componentProps: e,
|
|
1111
1115
|
delay: n = 300
|
|
1112
1116
|
}) {
|
|
1113
|
-
const { LoadingComp: o } =
|
|
1114
|
-
component:
|
|
1115
|
-
componentProps:
|
|
1117
|
+
const { LoadingComp: o } = jt({
|
|
1118
|
+
component: t,
|
|
1119
|
+
componentProps: e,
|
|
1116
1120
|
delay: n
|
|
1117
1121
|
}), l = g(!1);
|
|
1118
1122
|
function s() {
|
|
@@ -1123,52 +1127,52 @@ function $o({
|
|
|
1123
1127
|
}
|
|
1124
1128
|
return { LoadingComp: o, loading: l, load: s, unload: a };
|
|
1125
1129
|
}
|
|
1126
|
-
const
|
|
1127
|
-
/* @__PURE__ */
|
|
1128
|
-
], -1)),
|
|
1129
|
-
|
|
1130
|
-
],
|
|
1130
|
+
const mn = (t) => (Se("data-v-92a1804d"), t = t(), Oe(), t), yn = /* @__PURE__ */ mn(() => /* @__PURE__ */ Q("div", { class: "ldio-mm5gwljcryb" }, [
|
|
1131
|
+
/* @__PURE__ */ Q("div")
|
|
1132
|
+
], -1)), pn = [
|
|
1133
|
+
yn
|
|
1134
|
+
], Dn = /* @__PURE__ */ J({
|
|
1131
1135
|
__name: "DefaultLoading",
|
|
1132
1136
|
props: {
|
|
1133
1137
|
width: { default: 24 },
|
|
1134
1138
|
height: { default: 24 }
|
|
1135
1139
|
},
|
|
1136
|
-
setup(
|
|
1137
|
-
return
|
|
1138
|
-
"4e4a9ce4":
|
|
1139
|
-
e56fe5c2:
|
|
1140
|
-
})), (
|
|
1140
|
+
setup(t) {
|
|
1141
|
+
return Ze((e) => ({
|
|
1142
|
+
"4e4a9ce4": t.width + "px",
|
|
1143
|
+
e56fe5c2: t.height + "px"
|
|
1144
|
+
})), (e, n) => (Y(), U("div", Re($e(e.$attrs)), pn, 16));
|
|
1141
1145
|
}
|
|
1142
1146
|
});
|
|
1143
|
-
const
|
|
1147
|
+
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({
|
|
1144
1148
|
__name: "PageLoading",
|
|
1145
1149
|
props: {
|
|
1146
1150
|
delay: { default: "0.15s" },
|
|
1147
1151
|
size: { default: "mini" }
|
|
1148
1152
|
},
|
|
1149
|
-
setup(
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1152
|
-
b1cf73a8:
|
|
1153
|
+
setup(t) {
|
|
1154
|
+
const e = t;
|
|
1155
|
+
Ze((o) => ({
|
|
1156
|
+
b1cf73a8: t.delay
|
|
1153
1157
|
}));
|
|
1154
|
-
const n =
|
|
1158
|
+
const n = L(() => {
|
|
1155
1159
|
const o = {};
|
|
1156
|
-
return
|
|
1160
|
+
return e.size === "mini" ? (o.width = "22px", o.height = "22px") : e.size === "large" && (o.width = "28px", o.height = "28px"), o;
|
|
1157
1161
|
});
|
|
1158
|
-
return (o, l) => (
|
|
1159
|
-
|
|
1162
|
+
return (o, l) => (Y(), U("div", wn, [
|
|
1163
|
+
Q("img", {
|
|
1160
1164
|
class: "loading-circle",
|
|
1161
|
-
src: j(
|
|
1165
|
+
src: j(Nn),
|
|
1162
1166
|
style: q(j(n))
|
|
1163
|
-
}, null, 12,
|
|
1167
|
+
}, null, 12, In)
|
|
1164
1168
|
]));
|
|
1165
1169
|
}
|
|
1166
1170
|
});
|
|
1167
|
-
const
|
|
1168
|
-
async function
|
|
1169
|
-
return new Promise((
|
|
1171
|
+
const Po = /* @__PURE__ */ ae(En, [["__scopeId", "data-v-3c54972f"]]);
|
|
1172
|
+
async function je(t) {
|
|
1173
|
+
return new Promise((e) => setTimeout(() => e(), t));
|
|
1170
1174
|
}
|
|
1171
|
-
const
|
|
1175
|
+
const An = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4IiB2aWV3Qm94PSIwIDAgMTIgMTIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMTAyLjAwMDAwMCwgLTQwNi4wMDAwMDApIiBmaWxsPSIjOTk5OTk5IiBmaWxsLXJ1bGU9Im5vbnplcm8iPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDc5MC4wMDAwMDAsIDM5MC4wMDAwMDApIj4KICAgICAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzEyLjAwMDAwMCwgMTYuMDAwMDAwKSI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLjU0NjQyODU3MiwwLjA5NjM0MjU1MTMgTDYuMDEsNS41NTUgTDExLjQ1MzU3MTQsMC4xMTc3NTIwMTEgQzExLjU4MjE0MjksLTAuMDEwNzA0NzIzNyAxMS43NzUsLTAuMDEwNzA0NzIzNyAxMS45MDM1NzE0LDAuMTE3NzUyMDExIEMxMi4wMzIxNDI5LDAuMjQ2MjA4NzQ2IDEyLjAzMjE0MjksMC40Mzg4OTM4NDkgMTEuOTAzNTcxNCwwLjU2NzM1MDU4NCBMNi40Niw2LjAwNSBMMTEuOTAzNTcxNCwxMS40NDMzNTQxIEMxMi4wMzIxNDI5LDExLjU3MTgxMDkgMTIuMDMyMTQyOSwxMS43NjQ0OTYgMTEuOTAzNTcxNCwxMS44OTI5NTI3IEMxMS44NjA3MTQzLDExLjk3ODU5MDUgMTEuNzc1LDEyIDExLjY4OTI4NTcsMTIgQzExLjYwMzU3MTQsMTIgMTEuNTE3ODU3MiwxMS45Nzg1OTA1IDExLjQ1MzU3MTQsMTEuOTE0MzYyMiBMNiw2LjQ2NSBMMC41NDY0Mjg1NzIsMTEuOTE0MzYyMiBDMC41MDM1NzE0MzMsMTEuOTc4NTkwNSAwLjQxNzg1NzE0MywxMiAwLjMzMjE0Mjg1MywxMiBDMC4yNDY0Mjg1NjMsMTIgMC4xNjA3MTQyODYsMTEuOTc4NTkwNSAwLjA5NjQyODU3MTUsMTEuOTE0MzYyMiBDLTAuMDMyMTQyODU3MiwxMS43ODU5MDU0IC0wLjAzMjE0Mjg1NzIsMTEuNTkzMjIwMyAwLjA5NjQyODU3MTUsMTEuNDY0NzYzNiBMNS41NDksNi4wMTUgTDAuMDk2NDI4NTcxNSwwLjU2NzM1MDU4NCBDLTAuMDEwNzE0MjgxNSwwLjQzODg5Mzg0OSAtMC4wMTA3MTQyODE1LDAuMjI0Nzk5Mjg2IDAuMDk2NDI4NTcxNSwwLjA5NjM0MjU1MTMgQzAuMjAzNTcxNDI0LC0wLjAzMjExNDE4MzggMC40MTc4NTcxNDMsLTAuMDMyMTE0MTgzOCAwLjU0NjQyODU3MiwwLjA5NjM0MjU1MTMgWiIgaWQ9IuW9oueKtue7k+WQiCI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+", zn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzVweCIgaGVpZ2h0PSIzNXB4IiB2aWV3Qm94PSIwIDAgNDAgNDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xNjguMDAwMDAwLCAtMzczLjAwMDAwMCkiIGZpbGw9IiM5RjlGOUYiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTE4LjAwMDAwMCwgMzU2LjAwMDAwMCkiPgogICAgICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MC4wMDAwMDAsIDE3LjAwMDAwMCkiPgogICAgICAgICAgICA8cGF0aCBkPSJNMjAsMTIuMzQ0ODI3NiBDMTkuMjAwMTM5MywxMi4zNDQ4Mjc2IDE4LjU1MTcyNDEsMTEuNjk2NDEyNCAxOC41NTE3MjQxLDEwLjg5NjU1MTcgTDE4LjU1MTcyNDEsMy40NDgyNzU4NiBDMTguNTUxNzI0MSwyLjY0ODQxNTE5IDE5LjIwMDEzOTMsMiAyMCwyIEMyMC43OTk4NjA3LDIgMjEuNDQ4Mjc1OSwyLjY0ODQxNTE5IDIxLjQ0ODI3NTksMy40NDgyNzU4NiBMMjEuNDQ4Mjc1OSwxMC44OTY1NTE3IEMyMS40NDgyNzU5LDExLjY5NjQxMjQgMjAuNzk5ODYwNywxMi4zNDQ4Mjc2IDIwLDEyLjM0NDgyNzYgTDIwLDEyLjM0NDgyNzYgWiBNMjAsMzggQzE5LjYxNTg5MzQsMzggMTkuMjQ3NTE4NywzNy44NDc0MTQyIDE4Ljk3NTkxNDMsMzcuNTc1ODA5OCBDMTguNzA0MzA5OSwzNy4zMDQyMDU0IDE4LjU1MTcyNDEsMzYuOTM1ODMwOCAxOC41NTE3MjQxLDM2LjU1MTcyNDEgTDE4LjU1MTcyNDEsMjkuMTAzNDQ4MyBDMTguNTUxNzI0MSwyOC4zMDM1ODc2IDE5LjIwMDEzOTMsMjcuNjU1MTcyNCAyMCwyNy42NTUxNzI0IEMyMC43OTk4NjA3LDI3LjY1NTE3MjQgMjEuNDQ4Mjc1OSwyOC4zMDM1ODc2IDIxLjQ0ODI3NTksMjkuMTAzNDQ4MyBMMjEuNDQ4Mjc1OSwzNi41NTE3MjQxIEMyMS40NDgyNzU5LDM3LjM1MTU4NDggMjAuNzk5ODYwNywzOCAyMCwzOCBMMjAsMzggWiBNMjUuNDEzMDM0NSwxNC41ODY5NjU1IEMyNS4xNDE0MTA3LDE0LjMxNTM5MjIgMjQuOTg4ODA5OCwxMy45NDcwMjk0IDI0Ljk4ODgwOTgsMTMuNTYyOTMxIEMyNC45ODg4MDk4LDEzLjE3ODgzMjcgMjUuMTQxNDEwNywxMi44MTA0Njk5IDI1LjQxMzAzNDUsMTIuNTM4ODk2NiBMMzAuNjc5NzkzMSw3LjI3MjEzNzkzIEMzMC45NTEzNjY0LDcuMDAwNTE0MTQgMzEuMzE5NzI5Miw2Ljg0NzkxMzI0IDMxLjcwMzgyNzYsNi44NDc5MTMyNCBDMzIuMDg3OTI2LDYuODQ3OTEzMjQgMzIuNDU2Mjg4Nyw3LjAwMDUxNDE0IDMyLjcyNzg2MjEsNy4yNzIxMzc5MyBDMzIuOTk5NDg1OSw3LjU0MzcxMTI3IDMzLjE1MjA4NjgsNy45MTIwNzQwNCAzMy4xNTIwODY4LDguMjk2MTcyNDEgQzMzLjE1MjA4NjgsOC42ODAyNzA3OSAzMi45OTk0ODU5LDkuMDQ4NjMzNTYgMzIuNzI3ODYyMSw5LjMyMDIwNjkgTDI3LjQ2MTEwMzQsMTQuNTg2OTY1NSBDMjcuMTg5NTMwMSwxNC44NTg1ODkzIDI2LjgyMTE2NzMsMTUuMDExMTkwMiAyNi40MzcwNjksMTUuMDExMTkwMiBDMjYuMDUyOTcwNiwxNS4wMTExOTAyIDI1LjY4NDYwNzgsMTQuODU4NTg5MyAyNS40MTMwMzQ1LDE0LjU4Njk2NTUgTDI1LjQxMzAzNDUsMTQuNTg2OTY1NSBaIE03LjI3MjEzNzkzLDMyLjcyNzg2MjEgQzcuMDAwNTE0MTQsMzIuNDU2Mjg4NyA2Ljg0NzkxMzI0LDMyLjA4NzkyNiA2Ljg0NzkxMzI0LDMxLjcwMzgyNzYgQzYuODQ3OTEzMjQsMzEuMzE5NzI5MiA3LjAwMDUxNDE0LDMwLjk1MTM2NjQgNy4yNzIxMzc5MywzMC42Nzk3OTMxIEwxMi41Mzg4OTY2LDI1LjQxMzAzNDUgQzEyLjgxMDQ2OTksMjUuMTQxNDEwNyAxMy4xNzg4MzI3LDI0Ljk4ODgwOTggMTMuNTYyOTMxLDI0Ljk4ODgwOTggQzEzLjk0NzAyOTQsMjQuOTg4ODA5OCAxNC4zMTUzOTIyLDI1LjE0MTQxMDcgMTQuNTg2OTY1NSwyNS40MTMwMzQ1IEMxNC44NTg1ODkzLDI1LjY4NDYwNzggMTUuMDExMTkwMiwyNi4wNTI5NzA2IDE1LjAxMTE5MDIsMjYuNDM3MDY5IEMxNS4wMTExOTAyLDI2LjgyMTE2NzMgMTQuODU4NTg5MywyNy4xODk1MzAxIDE0LjU4Njk2NTUsMjcuNDYxMTAzNCBMOS4zMjAyMDY5LDMyLjcyNzg2MjEgQzkuMDQ4NjMzNTYsMzIuOTk5NDg1OSA4LjY4MDI3MDc5LDMzLjE1MjA4NjggOC4yOTYxNzI0MSwzMy4xNTIwODY4IEM3LjkxMjA3NDA0LDMzLjE1MjA4NjggNy41NDM3MTEyNywzMi45OTk0ODU5IDcuMjcyMTM3OTMsMzIuNzI3ODYyMSBMNy4yNzIxMzc5MywzMi43Mjc4NjIxIFogTTI3LjY1NTE3MjQsMjAgQzI3LjY1NTE3MjQsMTkuMjAwMTM5MyAyOC4zMDM1ODc2LDE4LjU1MTcyNDEgMjkuMTAzNDQ4MywxOC41NTE3MjQxIEwzNi41NTE3MjQxLDE4LjU1MTcyNDEgQzM3LjM1MTU4NDgsMTguNTUxNzI0MSAzOCwxOS4yMDAxMzkzIDM4LDIwIEMzOCwyMC43OTk4NjA3IDM3LjM1MTU4NDgsMjEuNDQ4Mjc1OSAzNi41NTE3MjQxLDIxLjQ0ODI3NTkgTDI5LjEwMzQ0ODMsMjEuNDQ4Mjc1OSBDMjguMzAzNTg3NiwyMS40NDgyNzU5IDI3LjY1NTE3MjQsMjAuNzk5ODYwNyAyNy42NTUxNzI0LDIwIEwyNy42NTUxNzI0LDIwIFogTTIsMjAgQzIsMTkuMjAwMTM5MyAyLjY0ODQxNTE5LDE4LjU1MTcyNDEgMy40NDgyNzU4NiwxOC41NTE3MjQxIEwxMC44OTY1NTE3LDE4LjU1MTcyNDEgQzExLjY5NjQxMjQsMTguNTUxNzI0MSAxMi4zNDQ4Mjc2LDE5LjIwMDEzOTMgMTIuMzQ0ODI3NiwyMCBDMTIuMzQ0ODI3NiwyMC43OTk4NjA3IDExLjY5NjQxMjQsMjEuNDQ4Mjc1OSAxMC44OTY1NTE3LDIxLjQ0ODI3NTkgTDMuNDQ4Mjc1ODYsMjEuNDQ4Mjc1OSBDMi42NDg0MTUxOSwyMS40NDgyNzU5IDIsMjAuNzk5ODYwNyAyLDIwIFogTTI1LjQxMzAzNDUsMjUuNDEzMDM0NSBDMjUuNjg0NjA3OCwyNS4xNDE0MTA3IDI2LjA1Mjk3MDYsMjQuOTg4ODA5OCAyNi40MzcwNjksMjQuOTg4ODA5OCBDMjYuODIxMTY3MywyNC45ODg4MDk4IDI3LjE4OTUzMDEsMjUuMTQxNDEwNyAyNy40NjExMDM0LDI1LjQxMzAzNDUgTDMyLjcyNzg2MjEsMzAuNjc5NzkzMSBDMzIuOTk5NDg1OSwzMC45NTEzNjY0IDMzLjE1MjA4NjgsMzEuMzE5NzI5MiAzMy4xNTIwODY4LDMxLjcwMzgyNzYgQzMzLjE1MjA4NjgsMzIuMDg3OTI2IDMyLjk5OTQ4NTksMzIuNDU2Mjg4NyAzMi43Mjc4NjIxLDMyLjcyNzg2MjEgQzMyLjQ1NjI4ODcsMzIuOTk5NDg1OSAzMi4wODc5MjYsMzMuMTUyMDg2OCAzMS43MDM4Mjc2LDMzLjE1MjA4NjggQzMxLjMxOTcyOTIsMzMuMTUyMDg2OCAzMC45NTEzNjY0LDMyLjk5OTQ4NTkgMzAuNjc5NzkzMSwzMi43Mjc4NjIxIEwyNS40MTMwMzQ1LDI3LjQ2MTEwMzQgQzI1LjE0MTQxMDcsMjcuMTg5NTMwMSAyNC45ODg4MDk4LDI2LjgyMTE2NzMgMjQuOTg4ODA5OCwyNi40MzcwNjkgQzI0Ljk4ODgwOTgsMjYuMDUyOTcwNiAyNS4xNDE0MTA3LDI1LjY4NDYwNzggMjUuNDEzMDM0NSwyNS40MTMwMzQ1IEwyNS40MTMwMzQ1LDI1LjQxMzAzNDUgWiBNNy4yNzIxMzc5Myw3LjI3MjEzNzkzIEM3LjU0MzcxMTI3LDcuMDAwNTE0MTQgNy45MTIwNzQwNCw2Ljg0NzkxMzI0IDguMjk2MTcyNDEsNi44NDc5MTMyNCBDOC42ODAyNzA3OSw2Ljg0NzkxMzI0IDkuMDQ4NjMzNTYsNy4wMDA1MTQxNCA5LjMyMDIwNjksNy4yNzIxMzc5MyBMMTQuNTg2OTY1NSwxMi41Mzg4OTY2IEMxNC44NTg1ODkzLDEyLjgxMDQ2OTkgMTUuMDExMTkwMiwxMy4xNzg4MzI3IDE1LjAxMTE5MDIsMTMuNTYyOTMxIEMxNS4wMTExOTAyLDEzLjk0NzAyOTQgMTQuODU4NTg5MywxNC4zMTUzOTIyIDE0LjU4Njk2NTUsMTQuNTg2OTY1NSBDMTQuMzE1MzkyMiwxNC44NTg1ODkzIDEzLjk0NzAyOTQsMTUuMDExMTkwMiAxMy41NjI5MzEsMTUuMDExMTkwMiBDMTMuMTc4ODMyNywxNS4wMTExOTAyIDEyLjgxMDQ2OTksMTQuODU4NTg5MyAxMi41Mzg4OTY2LDE0LjU4Njk2NTUgTDcuMjcyMTM3OTMsOS4zMjAyMDY5IEM3LjAwMDUxNDE0LDkuMDQ4NjMzNTYgNi44NDc5MTMyNCw4LjY4MDI3MDc5IDYuODQ3OTEzMjQsOC4yOTYxNzI0MSBDNi44NDc5MTMyNCw3LjkxMjA3NDA0IDcuMDAwNTE0MTQsNy41NDM3MTEyNyA3LjI3MjEzNzkzLDcuMjcyMTM3OTMgWiI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+", Ln = ["onClick"], jn = ["onClick"], xn = ["src"], Cn = ["src"], Sn = /* @__PURE__ */ J({
|
|
1172
1176
|
__name: "index",
|
|
1173
1177
|
props: {
|
|
1174
1178
|
visible: null,
|
|
@@ -1186,69 +1190,69 @@ const En = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1186
1190
|
captureEventP: { type: Boolean, default: !0 }
|
|
1187
1191
|
},
|
|
1188
1192
|
emits: ["close"],
|
|
1189
|
-
setup(
|
|
1190
|
-
const n =
|
|
1191
|
-
let
|
|
1192
|
-
return n.captureEventP && (
|
|
1193
|
-
}), s =
|
|
1194
|
-
let
|
|
1193
|
+
setup(t, { emit: e }) {
|
|
1194
|
+
const n = t, o = "lzc-loading-toast", l = L(() => {
|
|
1195
|
+
let i = {};
|
|
1196
|
+
return n.captureEventP && (i.pointerEvents = "none"), i;
|
|
1197
|
+
}), s = L(() => {
|
|
1198
|
+
let i = {
|
|
1195
1199
|
padding: "12px"
|
|
1196
1200
|
};
|
|
1197
|
-
return (n.icon || n.showIcon) && (
|
|
1198
|
-
...
|
|
1201
|
+
return (n.icon || n.showIcon) && (i.padding = "20px"), n.width && (i.width = n.width), n.maxWidth && (i.maxWidth = n.maxWidth), n.overlayContentStyle && (i = {
|
|
1202
|
+
...i,
|
|
1199
1203
|
...n.overlayContentStyle
|
|
1200
|
-
}),
|
|
1201
|
-
}), a =
|
|
1202
|
-
let
|
|
1203
|
-
return n.showClose && !n.icon && (
|
|
1204
|
+
}), i;
|
|
1205
|
+
}), a = L(() => {
|
|
1206
|
+
let i = {};
|
|
1207
|
+
return n.showClose && !n.icon && (i.paddingRight = "16px"), i;
|
|
1204
1208
|
});
|
|
1205
|
-
function
|
|
1206
|
-
n.closeOnClickOverlay &&
|
|
1209
|
+
function c() {
|
|
1210
|
+
n.closeOnClickOverlay && e("close");
|
|
1207
1211
|
}
|
|
1208
|
-
function
|
|
1209
|
-
n.closeOnClick &&
|
|
1212
|
+
function v() {
|
|
1213
|
+
n.closeOnClick && e("close");
|
|
1210
1214
|
}
|
|
1211
|
-
return (
|
|
1215
|
+
return (i, f) => (Y(), Ce(We, {
|
|
1212
1216
|
"enter-active-class": "lzc-animate-fade-in lzc-animate-duration-300",
|
|
1213
1217
|
"leave-active-class": "lzc-animate-fade-out lzc-animate-duration-300"
|
|
1214
1218
|
}, {
|
|
1215
|
-
default:
|
|
1216
|
-
|
|
1219
|
+
default: Xe(() => [
|
|
1220
|
+
Q("div", {
|
|
1217
1221
|
id: o,
|
|
1218
1222
|
style: q(j(l))
|
|
1219
1223
|
}, [
|
|
1220
|
-
|
|
1221
|
-
class:
|
|
1222
|
-
onClick:
|
|
1224
|
+
de(Q("div", {
|
|
1225
|
+
class: ue(`${o} ${t.className}`),
|
|
1226
|
+
onClick: we(c, ["stop"])
|
|
1223
1227
|
}, [
|
|
1224
|
-
|
|
1225
|
-
class:
|
|
1226
|
-
onClick:
|
|
1228
|
+
Q("div", {
|
|
1229
|
+
class: ue(`${o}-wrap`),
|
|
1230
|
+
onClick: we(v, ["stop"])
|
|
1227
1231
|
}, [
|
|
1228
|
-
|
|
1229
|
-
class:
|
|
1232
|
+
Q("div", {
|
|
1233
|
+
class: ue(`${o}-content`),
|
|
1230
1234
|
style: q(j(s))
|
|
1231
1235
|
}, [
|
|
1232
|
-
|
|
1236
|
+
t.showClose ? (Y(), U("img", {
|
|
1233
1237
|
key: 0,
|
|
1234
|
-
onClick:
|
|
1235
|
-
src: j(
|
|
1236
|
-
class:
|
|
1237
|
-
}, null, 10,
|
|
1238
|
-
|
|
1238
|
+
onClick: f[0] || (f[0] = we((r) => e("close"), ["stop"])),
|
|
1239
|
+
src: j(An),
|
|
1240
|
+
class: ue(`${o}-close`)
|
|
1241
|
+
}, null, 10, xn)) : ge("", !0),
|
|
1242
|
+
t.showIcon ? (Y(), U("img", {
|
|
1239
1243
|
key: 1,
|
|
1240
|
-
src:
|
|
1241
|
-
class:
|
|
1242
|
-
}, null, 10,
|
|
1243
|
-
|
|
1244
|
+
src: t.icon || j(zn),
|
|
1245
|
+
class: ue(`${o}-icon`)
|
|
1246
|
+
}, null, 10, Cn)) : ge("", !0),
|
|
1247
|
+
t.message ? (Y(), U("div", {
|
|
1244
1248
|
key: 2,
|
|
1245
|
-
class:
|
|
1249
|
+
class: ue(`${o}-message`),
|
|
1246
1250
|
style: q(j(a))
|
|
1247
|
-
},
|
|
1251
|
+
}, Ve(t.message), 7)) : ge("", !0)
|
|
1248
1252
|
], 6)
|
|
1249
|
-
], 10,
|
|
1250
|
-
], 10,
|
|
1251
|
-
[
|
|
1253
|
+
], 10, jn)
|
|
1254
|
+
], 10, Ln), [
|
|
1255
|
+
[be, t.visible]
|
|
1252
1256
|
])
|
|
1253
1257
|
], 4)
|
|
1254
1258
|
]),
|
|
@@ -1256,32 +1260,32 @@ const En = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1256
1260
|
}));
|
|
1257
1261
|
}
|
|
1258
1262
|
});
|
|
1259
|
-
const
|
|
1260
|
-
class
|
|
1263
|
+
const On = /* @__PURE__ */ ae(Sn, [["__scopeId", "data-v-0947d1e3"]]);
|
|
1264
|
+
class bn {
|
|
1261
1265
|
loadingToast;
|
|
1262
1266
|
el;
|
|
1263
1267
|
options;
|
|
1264
1268
|
visible = g(!1);
|
|
1265
1269
|
animateDuration = 300;
|
|
1266
|
-
constructor(
|
|
1267
|
-
this.options = { ...
|
|
1270
|
+
constructor(e) {
|
|
1271
|
+
this.options = { ...e, visible: this.visible }, this.options.duration == null && (this.options.duration = 60 * 10 * 1e3), this.el = document.createElement("div"), this.loadingToast = On;
|
|
1268
1272
|
}
|
|
1269
1273
|
async show() {
|
|
1270
|
-
const
|
|
1271
|
-
this.close(),
|
|
1272
|
-
} }, l =
|
|
1273
|
-
|
|
1274
|
+
const e = this.options, o = { ...e, onClose: () => {
|
|
1275
|
+
this.close(), e?.onClose?.();
|
|
1276
|
+
} }, l = Te(this.loadingToast, o);
|
|
1277
|
+
Ee(l, this.el), document.body.insertBefore(this.el, document.body.firstChild), this.visible.value = !0, e.duration !== 0 && setTimeout(() => {
|
|
1274
1278
|
this.destory();
|
|
1275
|
-
},
|
|
1279
|
+
}, e.duration), await je(e.duration + this.animateDuration);
|
|
1276
1280
|
}
|
|
1277
1281
|
async destory() {
|
|
1278
|
-
!this.visible.value || (this.visible.value = !1, await new Promise((
|
|
1282
|
+
!this.visible.value || (this.visible.value = !1, await new Promise((e) => {
|
|
1279
1283
|
setTimeout(() => {
|
|
1280
1284
|
if (!this.el) {
|
|
1281
|
-
|
|
1285
|
+
e();
|
|
1282
1286
|
return;
|
|
1283
1287
|
}
|
|
1284
|
-
document.body.removeChild(this.el),
|
|
1288
|
+
document.body.removeChild(this.el), e();
|
|
1285
1289
|
}, this.animateDuration - 10);
|
|
1286
1290
|
}));
|
|
1287
1291
|
}
|
|
@@ -1289,424 +1293,434 @@ class On {
|
|
|
1289
1293
|
document.querySelector("#lzc-loading-toast")?.remove();
|
|
1290
1294
|
}
|
|
1291
1295
|
}
|
|
1292
|
-
function
|
|
1293
|
-
const n = !!
|
|
1294
|
-
...
|
|
1295
|
-
showIcon:
|
|
1296
|
-
captureEventP:
|
|
1296
|
+
function Fo(t, e) {
|
|
1297
|
+
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, v = {
|
|
1298
|
+
...e,
|
|
1299
|
+
showIcon: e?.showIcon !== !1,
|
|
1300
|
+
captureEventP: e?.captureEventP === !0
|
|
1297
1301
|
};
|
|
1298
1302
|
n && console.log(
|
|
1299
1303
|
"useDelayAsync - loading: %s autoClose: %s delay: %s loadingToastOptions: %o",
|
|
1300
1304
|
l,
|
|
1301
1305
|
s,
|
|
1302
1306
|
a,
|
|
1303
|
-
|
|
1307
|
+
v
|
|
1304
1308
|
);
|
|
1305
|
-
const
|
|
1306
|
-
let
|
|
1307
|
-
const
|
|
1308
|
-
async function M(...
|
|
1309
|
-
if (n && console.log(`useDelayAsync - handler - processing: ${
|
|
1310
|
-
|
|
1309
|
+
const i = g(!1);
|
|
1310
|
+
let f = null;
|
|
1311
|
+
const r = new bn(v);
|
|
1312
|
+
async function M(...u) {
|
|
1313
|
+
if (n && console.log(`useDelayAsync - handler - processing: ${i.value}`), !i.value) {
|
|
1314
|
+
i.value = !0, f = setTimeout(() => {
|
|
1311
1315
|
n && console.log(
|
|
1312
1316
|
"useDelayAsync - handler - setTimeout - loading: %s processing: %s",
|
|
1313
1317
|
l,
|
|
1314
|
-
|
|
1315
|
-
), l && (!
|
|
1318
|
+
i.value
|
|
1319
|
+
), l && (!i.value || r.show());
|
|
1316
1320
|
}, a);
|
|
1317
1321
|
try {
|
|
1318
1322
|
n && console.time("useDelayAsync - handler-execute-time");
|
|
1319
|
-
const y = await
|
|
1320
|
-
return n && console.log("useDelayAsync - execute res: ", y), n && console.timeEnd("useDelayAsync - handler-execute-time"), await
|
|
1323
|
+
const y = await t(...u);
|
|
1324
|
+
return n && console.log("useDelayAsync - execute res: ", y), n && console.timeEnd("useDelayAsync - handler-execute-time"), await d(s), await e?.onSuccess?.(y, [...u]), y;
|
|
1321
1325
|
} catch (y) {
|
|
1322
|
-
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(y), await
|
|
1326
|
+
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(y), await d(s), await e?.onError?.(y, [...u]);
|
|
1323
1327
|
}
|
|
1324
1328
|
}
|
|
1325
1329
|
}
|
|
1326
|
-
async function
|
|
1327
|
-
n && console.log("useDelayAsync - close - closeLoading: ",
|
|
1330
|
+
async function d(u = !0) {
|
|
1331
|
+
n && console.log("useDelayAsync - close - closeLoading: ", u), i.value = !1, f && clearTimeout(f), f = null, u && await r.destory();
|
|
1328
1332
|
}
|
|
1329
|
-
return
|
|
1330
|
-
n && console.log("useDelayAsync - onBeforeUnmount - close"),
|
|
1333
|
+
return c && Tt(() => {
|
|
1334
|
+
n && console.log("useDelayAsync - onBeforeUnmount - close"), d();
|
|
1331
1335
|
}), {
|
|
1332
|
-
processing:
|
|
1336
|
+
processing: i,
|
|
1333
1337
|
handler: M,
|
|
1334
|
-
close:
|
|
1338
|
+
close: d
|
|
1335
1339
|
};
|
|
1336
1340
|
}
|
|
1337
|
-
function
|
|
1338
|
-
return
|
|
1341
|
+
function _n(t, e) {
|
|
1342
|
+
return t > e ? "horizontal" : e > t ? "vertical" : "";
|
|
1339
1343
|
}
|
|
1340
|
-
function
|
|
1341
|
-
const
|
|
1344
|
+
function kn() {
|
|
1345
|
+
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", v = () => a.value === "horizontal", i = () => {
|
|
1342
1346
|
n.value = 0, o.value = 0, l.value = 0, s.value = 0, a.value = "";
|
|
1343
1347
|
};
|
|
1344
|
-
function
|
|
1345
|
-
|
|
1348
|
+
function f(M, d) {
|
|
1349
|
+
i(), t.value = M, e.value = d;
|
|
1346
1350
|
}
|
|
1347
|
-
function
|
|
1348
|
-
n.value = (M < 0 ? 0 : M) -
|
|
1349
|
-
const
|
|
1350
|
-
(!a.value || l.value <
|
|
1351
|
+
function r(M, d) {
|
|
1352
|
+
n.value = (M < 0 ? 0 : M) - t.value, o.value = d - e.value, l.value = Math.abs(n.value), s.value = Math.abs(o.value);
|
|
1353
|
+
const u = 10;
|
|
1354
|
+
(!a.value || l.value < u && s.value < u) && (a.value = _n(l.value, s.value));
|
|
1351
1355
|
}
|
|
1352
1356
|
return {
|
|
1353
|
-
move:
|
|
1354
|
-
start:
|
|
1355
|
-
reset:
|
|
1356
|
-
startX:
|
|
1357
|
-
startY:
|
|
1357
|
+
move: r,
|
|
1358
|
+
start: f,
|
|
1359
|
+
reset: i,
|
|
1360
|
+
startX: t,
|
|
1361
|
+
startY: e,
|
|
1358
1362
|
deltaX: n,
|
|
1359
1363
|
deltaY: o,
|
|
1360
1364
|
offsetX: l,
|
|
1361
1365
|
offsetY: s,
|
|
1362
1366
|
direction: a,
|
|
1363
|
-
isVertical:
|
|
1364
|
-
isHorizontal:
|
|
1367
|
+
isVertical: c,
|
|
1368
|
+
isHorizontal: v
|
|
1365
1369
|
};
|
|
1366
1370
|
}
|
|
1367
|
-
const
|
|
1368
|
-
function
|
|
1369
|
-
const { isDouble:
|
|
1371
|
+
const vt = 250, Mt = 5, Qn = 500;
|
|
1372
|
+
function Yn(t) {
|
|
1373
|
+
const { isDouble: e = !0 } = t;
|
|
1370
1374
|
let n, o;
|
|
1371
1375
|
function l() {
|
|
1372
1376
|
n = Date.now();
|
|
1373
1377
|
}
|
|
1374
|
-
async function s(a,
|
|
1375
|
-
const
|
|
1376
|
-
a <
|
|
1377
|
-
|
|
1378
|
-
},
|
|
1378
|
+
async function s(a, c) {
|
|
1379
|
+
const v = Date.now() - n;
|
|
1380
|
+
a < Mt && c < Mt && (v < vt ? e ? o ? (clearTimeout(o), o = null, t.onDoubleTap?.()) : o = setTimeout(async () => {
|
|
1381
|
+
t.onTap?.(), o = null;
|
|
1382
|
+
}, vt) : t.onTap?.() : v > Qn && t.onLongPress?.());
|
|
1379
1383
|
}
|
|
1380
1384
|
return { startTap: l, checkTap: s };
|
|
1381
1385
|
}
|
|
1382
|
-
function
|
|
1386
|
+
function Bn(t, e) {
|
|
1383
1387
|
const n = g(!1);
|
|
1384
1388
|
function o() {
|
|
1385
|
-
n.value || (n.value = !0, j(
|
|
1389
|
+
n.value || (n.value = !0, j(t)?.addEventListener("transitionend", l));
|
|
1386
1390
|
}
|
|
1387
1391
|
function l() {
|
|
1388
|
-
j(
|
|
1392
|
+
j(t)?.removeEventListener("transitionend", l), n.value = !1, e.onComplate?.();
|
|
1389
1393
|
}
|
|
1390
1394
|
return { transitioning: n, startTransition: o };
|
|
1391
1395
|
}
|
|
1392
|
-
function
|
|
1396
|
+
function Un(t, e, n, o) {
|
|
1393
1397
|
var l = Math.min(
|
|
1394
|
-
n /
|
|
1395
|
-
o /
|
|
1396
|
-
), s =
|
|
1398
|
+
n / t,
|
|
1399
|
+
o / e
|
|
1400
|
+
), s = t * l, a = e * l;
|
|
1397
1401
|
return {
|
|
1398
|
-
width:
|
|
1399
|
-
height:
|
|
1402
|
+
width: re(s),
|
|
1403
|
+
height: re(a)
|
|
1400
1404
|
};
|
|
1401
1405
|
}
|
|
1402
|
-
function
|
|
1403
|
-
return
|
|
1406
|
+
function Rn(t) {
|
|
1407
|
+
return t < 3 ? "444ms" : t < 6 ? "555ms" : "666ms";
|
|
1404
1408
|
}
|
|
1405
|
-
function
|
|
1406
|
-
return Math.min(Math.max(
|
|
1409
|
+
function Be(t, e, n) {
|
|
1410
|
+
return Math.min(Math.max(t, e), n);
|
|
1407
1411
|
}
|
|
1408
|
-
function
|
|
1409
|
-
return parseFloat(
|
|
1412
|
+
function re(t, e = 2) {
|
|
1413
|
+
return parseFloat(t.toFixed(e));
|
|
1410
1414
|
}
|
|
1411
|
-
function
|
|
1412
|
-
return
|
|
1415
|
+
function Ue(t, e, n) {
|
|
1416
|
+
return t = re(t), e = re(e), `translate3d(${t}px, ${e}px, 0) scale3d(${n},${n},${n})`;
|
|
1413
1417
|
}
|
|
1414
|
-
function
|
|
1418
|
+
function gt(t) {
|
|
1415
1419
|
return Math.sqrt(
|
|
1416
|
-
(
|
|
1420
|
+
(t[0].clientX - t[1].clientX) ** 2 + (t[0].clientY - t[1].clientY) ** 2
|
|
1417
1421
|
);
|
|
1418
1422
|
}
|
|
1419
|
-
function
|
|
1423
|
+
function $n(t) {
|
|
1420
1424
|
return {
|
|
1421
|
-
x: (
|
|
1422
|
-
y: (
|
|
1425
|
+
x: (t[0].clientX + t[1].clientX) / 2,
|
|
1426
|
+
y: (t[0].clientY + t[1].clientY) / 2
|
|
1423
1427
|
};
|
|
1424
1428
|
}
|
|
1425
|
-
function
|
|
1426
|
-
const
|
|
1429
|
+
function xt(t) {
|
|
1430
|
+
const e = g(!1), n = g(!1), o = g(1), l = g(9), s = g(), a = g(), c = g({ width: 0, height: 0 }), v = g({ width: 0, height: 0 }), i = Ie({
|
|
1427
1431
|
level: 1,
|
|
1428
1432
|
offsetX: 0,
|
|
1429
1433
|
offsetY: 0,
|
|
1430
1434
|
zooming: !1,
|
|
1431
1435
|
preview: !0,
|
|
1432
1436
|
lastCenter: { x: 0, y: 0 }
|
|
1433
|
-
}), f = g({}),
|
|
1437
|
+
}), f = g({}), r = kn(), M = Bn(a, {
|
|
1434
1438
|
onComplate() {
|
|
1435
|
-
|
|
1439
|
+
i.preview || E();
|
|
1436
1440
|
}
|
|
1437
|
-
}),
|
|
1441
|
+
}), d = Yn({
|
|
1438
1442
|
onTap() {
|
|
1439
|
-
|
|
1443
|
+
t.onTap?.();
|
|
1440
1444
|
},
|
|
1441
1445
|
onDoubleTap() {
|
|
1442
|
-
|
|
1446
|
+
t.onDoubleTap?.();
|
|
1443
1447
|
},
|
|
1444
1448
|
onLongPress() {
|
|
1445
|
-
|
|
1449
|
+
t.onLongPress?.();
|
|
1446
1450
|
}
|
|
1447
1451
|
});
|
|
1448
|
-
|
|
1449
|
-
[
|
|
1450
|
-
([
|
|
1451
|
-
|
|
1452
|
+
qe(a, (D) => u(D)), K(
|
|
1453
|
+
[s, a],
|
|
1454
|
+
([D, w]) => {
|
|
1455
|
+
y(D, w);
|
|
1452
1456
|
},
|
|
1453
1457
|
{ immediate: !0 }
|
|
1454
1458
|
);
|
|
1455
|
-
async function
|
|
1456
|
-
const [
|
|
1457
|
-
|
|
1459
|
+
async function u(D) {
|
|
1460
|
+
const [w] = D;
|
|
1461
|
+
w.contentRect.width == v.value.width && w.contentRect.height == v.value.height || (await y(s.value), await E(i.level, !0));
|
|
1458
1462
|
}
|
|
1459
|
-
async function
|
|
1460
|
-
await
|
|
1463
|
+
async function y(D, w) {
|
|
1464
|
+
await P(D, w), D && Z();
|
|
1461
1465
|
}
|
|
1462
|
-
async function
|
|
1463
|
-
if (!
|
|
1466
|
+
async function p(D) {
|
|
1467
|
+
if (!i.preview)
|
|
1464
1468
|
return;
|
|
1465
|
-
|
|
1466
|
-
const
|
|
1467
|
-
if (!
|
|
1469
|
+
i.preview = !1, D = D ?? i.level;
|
|
1470
|
+
const w = a.value;
|
|
1471
|
+
if (!w)
|
|
1468
1472
|
return;
|
|
1469
|
-
const { scrollTop:
|
|
1470
|
-
|
|
1471
|
-
const { value:
|
|
1472
|
-
|
|
1473
|
+
const { scrollTop: N, scrollLeft: S } = w, { width: _, height: x } = c.value, { scaleW: B, scaleH: W } = C(D), { top: ne, left: G } = k(B, W), Me = G != 0 ? G : S * -1, ie = ne != 0 ? ne : N * -1;
|
|
1474
|
+
w.scrollTop = 0, w.scrollLeft = 0;
|
|
1475
|
+
const { value: X } = f;
|
|
1476
|
+
X.width = `${_}px`, X.height = `${x}px`, X.maxHeight = "none", X.transitionDuration = "0s", X.transform = Ue(Me, ie, D), f.value = X, await pe(), i.offsetX = Me, i.offsetY = ie, await je(20);
|
|
1473
1477
|
}
|
|
1474
|
-
async function
|
|
1475
|
-
if (!
|
|
1478
|
+
async function E(D, w) {
|
|
1479
|
+
if (!w && i.preview)
|
|
1476
1480
|
return;
|
|
1477
|
-
|
|
1478
|
-
const { value:
|
|
1479
|
-
|
|
1480
|
-
const
|
|
1481
|
-
if (!
|
|
1481
|
+
i.preview = !0, D = D ?? i.level;
|
|
1482
|
+
const { value: N } = f, { scaleW: S, scaleH: _ } = C(D), { left: x, top: B } = k(S, _);
|
|
1483
|
+
D === 1 && (N.maxHeight = "100%"), N.width = `${S}px`, N.height = `${_}px`, N.transitionDuration = "0s", N.filter = "blur(0.1px)", N.transform = Ue(x, B, 1), f.value = N, await pe();
|
|
1484
|
+
const W = a.value;
|
|
1485
|
+
if (!W)
|
|
1482
1486
|
return;
|
|
1483
|
-
const { offsetX:
|
|
1484
|
-
|
|
1485
|
-
}
|
|
1486
|
-
async function
|
|
1487
|
-
await
|
|
1488
|
-
}
|
|
1489
|
-
async function
|
|
1490
|
-
if (
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
),
|
|
1487
|
+
const { offsetX: ne, offsetY: G } = i;
|
|
1488
|
+
ne < 0 && (W.scrollLeft = Math.abs(ne)), G < 0 && (W.scrollTop = Math.abs(G)), await A();
|
|
1489
|
+
}
|
|
1490
|
+
async function A() {
|
|
1491
|
+
await je(15), delete f.value.filter;
|
|
1492
|
+
}
|
|
1493
|
+
async function z(D, w, N) {
|
|
1494
|
+
if (e.value || (D = re(D), D = Be(
|
|
1495
|
+
D,
|
|
1496
|
+
o.value - o.value * 0.5,
|
|
1497
|
+
l.value + l.value * 0.5
|
|
1498
|
+
), D == i.level))
|
|
1495
1499
|
return;
|
|
1496
|
-
|
|
1497
|
-
const { value:
|
|
1498
|
-
left: Math.abs(
|
|
1499
|
-
top: Math.abs(
|
|
1500
|
-
right:
|
|
1501
|
-
bottom:
|
|
1500
|
+
i.preview && await p(), w || (w = { x: r.startX.value, y: r.startY.value });
|
|
1501
|
+
const { value: S } = f, { width: _, height: x } = c.value, { scaleW: B, scaleH: W } = C(D), { top: ne, left: G } = k(B, W), Me = D / i.level, ie = {
|
|
1502
|
+
left: Math.abs(_ * D - v.value.width) * -1,
|
|
1503
|
+
top: Math.abs(x * D - v.value.height) * -1,
|
|
1504
|
+
right: G,
|
|
1505
|
+
bottom: ne
|
|
1502
1506
|
};
|
|
1503
|
-
let
|
|
1504
|
-
|
|
1507
|
+
let X = G != 0 ? G : (i.offsetX - w.x) * Me + w.x, me = ne != 0 ? ne : (i.offsetY - w.y) * Me + w.y;
|
|
1508
|
+
X = re(Be(X, ie.left, ie.right)), me = re(Be(me, ie.top, ie.bottom)), S.width = `${_}px`, S.height = `${x}px`, S.transitionDuration = N ? Rn(D) : "0s", S.transform = Ue(X, me, D), i.offsetX = X, i.offsetY = me, i.level = D, f.value = S, await pe(), N && M.startTransition(), t.onScale?.(D);
|
|
1505
1509
|
}
|
|
1506
|
-
function
|
|
1507
|
-
const
|
|
1508
|
-
|
|
1510
|
+
function h() {
|
|
1511
|
+
const D = i.level > 1 ? 1 : T();
|
|
1512
|
+
z(D, void 0, !0);
|
|
1509
1513
|
}
|
|
1510
|
-
function
|
|
1511
|
-
if (!
|
|
1514
|
+
function m(D, w) {
|
|
1515
|
+
if (!i.preview)
|
|
1512
1516
|
return;
|
|
1513
|
-
const
|
|
1514
|
-
!
|
|
1515
|
-
left:
|
|
1516
|
-
top:
|
|
1517
|
+
const N = a.value;
|
|
1518
|
+
!N || N.scrollTo({
|
|
1519
|
+
left: i.offsetX - D,
|
|
1520
|
+
top: i.offsetY - w
|
|
1517
1521
|
});
|
|
1518
1522
|
}
|
|
1519
|
-
async function
|
|
1520
|
-
|
|
1523
|
+
async function I() {
|
|
1524
|
+
i.level >= o.value && i.level <= l.value ? i.zooming && await E() : i.level < o.value ? await z(o.value, void 0, !0) : i.level > l.value && await z(l.value, i.lastCenter, !0), i.zooming = !1;
|
|
1521
1525
|
}
|
|
1522
|
-
function
|
|
1523
|
-
const { width:
|
|
1524
|
-
let
|
|
1525
|
-
return
|
|
1526
|
+
function T() {
|
|
1527
|
+
const { width: D, height: w } = c.value, { width: N, height: S } = v.value, _ = 2.5;
|
|
1528
|
+
let x;
|
|
1529
|
+
return w == S ? (x = N / D, x - 1 < 0.1 && (x = _)) : x = Math.max(_, N / D, S / w), x;
|
|
1526
1530
|
}
|
|
1527
|
-
function D
|
|
1528
|
-
const { width:
|
|
1531
|
+
function C(D) {
|
|
1532
|
+
const { width: w, height: N } = c.value;
|
|
1529
1533
|
return {
|
|
1530
|
-
scaleW:
|
|
1531
|
-
scaleH:
|
|
1534
|
+
scaleW: re(D * w),
|
|
1535
|
+
scaleH: re(D * N)
|
|
1532
1536
|
};
|
|
1533
1537
|
}
|
|
1534
|
-
function
|
|
1535
|
-
const { width:
|
|
1536
|
-
return { top:
|
|
1538
|
+
function k(D, w) {
|
|
1539
|
+
const { width: N, height: S } = v.value, _ = Math.max(0, (S - w) * 0.5), x = Math.max(0, (N - D) * 0.5);
|
|
1540
|
+
return { top: _, left: x };
|
|
1537
1541
|
}
|
|
1538
|
-
async function
|
|
1539
|
-
if (
|
|
1542
|
+
async function P(D, w) {
|
|
1543
|
+
if (D = D ?? s.value, w = w ?? a.value, !w)
|
|
1540
1544
|
return;
|
|
1541
|
-
let
|
|
1542
|
-
const { clientWidth:
|
|
1543
|
-
if (
|
|
1544
|
-
const
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1545
|
+
let N, { clientWidth: S = 0, clientHeight: _ = 0 } = D || {};
|
|
1546
|
+
const { clientWidth: x, clientHeight: B } = w;
|
|
1547
|
+
if (D instanceof HTMLImageElement ? N = { width: D.naturalWidth, height: D.naturalHeight } : D instanceof HTMLVideoElement && (N = { width: D.videoWidth, height: D.videoHeight }), N) {
|
|
1548
|
+
const W = Un(
|
|
1549
|
+
N.width,
|
|
1550
|
+
N.height,
|
|
1551
|
+
x,
|
|
1552
|
+
B
|
|
1549
1553
|
);
|
|
1550
|
-
|
|
1554
|
+
S = W.width, _ = W.height;
|
|
1551
1555
|
}
|
|
1552
|
-
(
|
|
1553
|
-
width: Math.min(
|
|
1554
|
-
height: Math.min(
|
|
1555
|
-
},
|
|
1556
|
+
(S === 0 || _ === 0) && (S = c.value.width || x, _ = c.value.height || B), c.value = {
|
|
1557
|
+
width: Math.min(S, x),
|
|
1558
|
+
height: Math.min(_, B)
|
|
1559
|
+
}, v.value = { width: x, height: B }, E(void 0, !0);
|
|
1556
1560
|
}
|
|
1557
|
-
function
|
|
1558
|
-
const
|
|
1559
|
-
|
|
1561
|
+
function Z() {
|
|
1562
|
+
const D = T();
|
|
1563
|
+
l.value = Math.max(l.value, D * 2);
|
|
1560
1564
|
}
|
|
1561
|
-
function
|
|
1562
|
-
|
|
1565
|
+
function F(D) {
|
|
1566
|
+
e.value = D;
|
|
1567
|
+
}
|
|
1568
|
+
function ee() {
|
|
1569
|
+
return n.value;
|
|
1570
|
+
}
|
|
1571
|
+
function te(D) {
|
|
1572
|
+
n.value = D;
|
|
1563
1573
|
}
|
|
1564
1574
|
return {
|
|
1565
|
-
touch:
|
|
1566
|
-
state:
|
|
1575
|
+
touch: r,
|
|
1576
|
+
state: i,
|
|
1567
1577
|
style: f,
|
|
1568
|
-
gesture:
|
|
1569
|
-
transition:
|
|
1570
|
-
imageRef:
|
|
1571
|
-
containerRef:
|
|
1572
|
-
switchToZoom:
|
|
1573
|
-
switchToPreview:
|
|
1574
|
-
panTo:
|
|
1575
|
-
zoomTo:
|
|
1576
|
-
zoomFinished:
|
|
1577
|
-
toggleZoom:
|
|
1578
|
-
setDisableZoom:
|
|
1578
|
+
gesture: d,
|
|
1579
|
+
transition: M,
|
|
1580
|
+
imageRef: s,
|
|
1581
|
+
containerRef: a,
|
|
1582
|
+
switchToZoom: p,
|
|
1583
|
+
switchToPreview: E,
|
|
1584
|
+
panTo: m,
|
|
1585
|
+
zoomTo: z,
|
|
1586
|
+
zoomFinished: I,
|
|
1587
|
+
toggleZoom: h,
|
|
1588
|
+
setDisableZoom: F,
|
|
1589
|
+
setDisableMove: te,
|
|
1590
|
+
getDisableMove: ee
|
|
1579
1591
|
};
|
|
1580
1592
|
}
|
|
1581
|
-
function
|
|
1582
|
-
const { state: n, touch: o, transition: l, containerRef: s } =
|
|
1583
|
-
let
|
|
1584
|
-
function
|
|
1585
|
-
|
|
1593
|
+
function Ct(t, e) {
|
|
1594
|
+
const { state: n, touch: o, transition: l, containerRef: s } = t, a = un(s);
|
|
1595
|
+
let c, v;
|
|
1596
|
+
function i(M) {
|
|
1597
|
+
c = M;
|
|
1586
1598
|
}
|
|
1587
|
-
function
|
|
1588
|
-
return
|
|
1599
|
+
function f(M) {
|
|
1600
|
+
return c == M;
|
|
1589
1601
|
}
|
|
1590
|
-
function
|
|
1602
|
+
function r(M, d, u, y) {
|
|
1591
1603
|
a.measure();
|
|
1592
|
-
const { top:
|
|
1604
|
+
const { top: p, left: E, right: A, bottom: z } = a.arrivedState;
|
|
1593
1605
|
if (M == "start")
|
|
1594
|
-
|
|
1595
|
-
else if (
|
|
1596
|
-
|
|
1597
|
-
else if (
|
|
1606
|
+
v = p || E || A || z;
|
|
1607
|
+
else if (c == 2)
|
|
1608
|
+
v = !1;
|
|
1609
|
+
else if (v) {
|
|
1598
1610
|
if (o.direction.value == "vertical")
|
|
1599
1611
|
if (n.level != 1)
|
|
1600
|
-
|
|
1612
|
+
v = !1;
|
|
1601
1613
|
else {
|
|
1602
|
-
const h = o.startY.value <
|
|
1603
|
-
|
|
1614
|
+
const h = o.startY.value < u;
|
|
1615
|
+
v = p && h || z && !h;
|
|
1604
1616
|
}
|
|
1605
1617
|
else if (o.direction.value == "horizontal") {
|
|
1606
|
-
const h = o.startX.value <
|
|
1607
|
-
|
|
1618
|
+
const h = o.startX.value < d;
|
|
1619
|
+
v = E && h || A && !h;
|
|
1608
1620
|
}
|
|
1609
1621
|
}
|
|
1610
|
-
|
|
1622
|
+
v && l.transitioning.value && (v = !1, y?.preventDefault()), M == "end" && !v && (d = o.startX.value, u = o.startY.value, v = !0), (M != "move" || v) && e?.(M, o.direction.value, d, u, y);
|
|
1611
1623
|
}
|
|
1612
|
-
return { onSwipeEdge:
|
|
1624
|
+
return { onSwipeEdge: r, setFingerNum: i, isEqualFingerNum: f };
|
|
1613
1625
|
}
|
|
1614
|
-
function
|
|
1615
|
-
const
|
|
1626
|
+
function Wo(t) {
|
|
1627
|
+
const e = xt({
|
|
1616
1628
|
onDoubleTap() {
|
|
1617
|
-
|
|
1629
|
+
e.toggleZoom();
|
|
1618
1630
|
},
|
|
1619
|
-
...
|
|
1620
|
-
}), { state: n, touch: o, gesture: l, transition: s } =
|
|
1621
|
-
let a = !1,
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1631
|
+
...t
|
|
1632
|
+
}), { state: n, touch: o, gesture: l, transition: s } = e;
|
|
1633
|
+
let a = !1, c = null;
|
|
1634
|
+
const v = { top: 0, left: 0 }, i = _e(p, 150), { onSwipeEdge: f } = Ct(e, t.onSwipeEdge), r = g({ top: 0, left: 0 });
|
|
1635
|
+
Le("keyup", A), Le("keydown", E);
|
|
1624
1636
|
function M(z) {
|
|
1625
|
-
const h =
|
|
1637
|
+
const h = e.containerRef.value;
|
|
1626
1638
|
if (!h)
|
|
1627
1639
|
return;
|
|
1628
|
-
const { left: m, top:
|
|
1629
|
-
|
|
1630
|
-
let
|
|
1631
|
-
o.start(
|
|
1640
|
+
const { left: m, top: I } = h.getBoundingClientRect();
|
|
1641
|
+
r.value.left = m, r.value.top = I, l.startTap();
|
|
1642
|
+
let T = z.clientX - m, C = z.clientY - I;
|
|
1643
|
+
o.start(T, C), f("start", T, C, z), s.transitioning.value || (a = !0, v.left = m, v.top = I, n.offsetX = h.scrollLeft, n.offsetY = h.scrollTop), window.addEventListener("pointermove", d), window.addEventListener("pointerup", u);
|
|
1632
1644
|
}
|
|
1633
|
-
function
|
|
1634
|
-
if (!a)
|
|
1645
|
+
function d(z) {
|
|
1646
|
+
if (!a || e.getDisableMove())
|
|
1635
1647
|
return;
|
|
1636
1648
|
let h = z.clientX, m = z.clientY;
|
|
1637
|
-
o.move(h, m),
|
|
1649
|
+
o.move(h, m), f(
|
|
1638
1650
|
"move",
|
|
1639
|
-
h -
|
|
1640
|
-
m -
|
|
1651
|
+
h - r.value.left,
|
|
1652
|
+
m - r.value.top,
|
|
1641
1653
|
z
|
|
1642
|
-
), n.level !== 1 &&
|
|
1643
|
-
o.deltaX.value -
|
|
1644
|
-
o.deltaY.value -
|
|
1654
|
+
), n.level !== 1 && e.panTo(
|
|
1655
|
+
o.deltaX.value - v.left,
|
|
1656
|
+
o.deltaY.value - v.top
|
|
1645
1657
|
);
|
|
1646
1658
|
}
|
|
1647
|
-
function
|
|
1648
|
-
|
|
1659
|
+
function u(z) {
|
|
1660
|
+
f("end", o.offsetX.value, o.offsetY.value, z), l.checkTap(o.offsetX.value, o.offsetY.value), o.reset(), a = !1, window.removeEventListener("pointermove", d), window.removeEventListener("pointerup", u);
|
|
1649
1661
|
}
|
|
1650
1662
|
function y(z) {
|
|
1651
1663
|
if (!z.ctrlKey)
|
|
1652
1664
|
return;
|
|
1653
|
-
n.zooming || (n.zooming = !0,
|
|
1665
|
+
n.zooming || (n.zooming = !0, c == "Control" && window.addEventListener("keyup", p)), z.preventDefault();
|
|
1654
1666
|
let h = -z.deltaY;
|
|
1655
|
-
z.deltaMode === 1 ? h *= 0.05 : h *= z.deltaMode ? 1 : 2e-3,
|
|
1667
|
+
z.deltaMode === 1 ? h *= 0.05 : h *= z.deltaMode ? 1 : 2e-3, c != "Control" && (h *= 10), h = 2 ** h;
|
|
1656
1668
|
const m = n.level * h;
|
|
1657
1669
|
n.lastCenter = {
|
|
1658
|
-
x: z.clientX -
|
|
1659
|
-
y: z.clientY -
|
|
1660
|
-
},
|
|
1670
|
+
x: z.clientX - r.value.left,
|
|
1671
|
+
y: z.clientY - r.value.top
|
|
1672
|
+
}, e.zoomTo(m, n.lastCenter), c != "Control" && i();
|
|
1661
1673
|
}
|
|
1662
|
-
function
|
|
1663
|
-
|
|
1674
|
+
function p() {
|
|
1675
|
+
e.zoomFinished(), window.removeEventListener("keyup", p);
|
|
1664
1676
|
}
|
|
1665
|
-
function
|
|
1666
|
-
|
|
1677
|
+
function E(z) {
|
|
1678
|
+
c = z.key;
|
|
1667
1679
|
}
|
|
1668
|
-
function
|
|
1669
|
-
|
|
1680
|
+
function A() {
|
|
1681
|
+
c = null;
|
|
1670
1682
|
}
|
|
1671
|
-
return { core:
|
|
1683
|
+
return { core: e, onPointerDown: M, onWheel: y };
|
|
1672
1684
|
}
|
|
1673
|
-
function
|
|
1674
|
-
const
|
|
1685
|
+
function Xo(t) {
|
|
1686
|
+
const e = xt({
|
|
1675
1687
|
onDoubleTap() {
|
|
1676
|
-
|
|
1688
|
+
e.toggleZoom();
|
|
1677
1689
|
},
|
|
1678
|
-
...
|
|
1679
|
-
}), { state: n, touch: o, gesture: l } =
|
|
1680
|
-
|
|
1681
|
-
|
|
1690
|
+
...t
|
|
1691
|
+
}), { state: n, touch: o, gesture: l } = e, { setFingerNum: s, onSwipeEdge: a, isEqualFingerNum: c } = Ct(
|
|
1692
|
+
e,
|
|
1693
|
+
t.onSwipeEdge
|
|
1682
1694
|
);
|
|
1683
|
-
let
|
|
1684
|
-
async function d
|
|
1685
|
-
const { touches:
|
|
1686
|
-
s(
|
|
1687
|
-
const { clientX: y, clientY:
|
|
1688
|
-
o.start(y,
|
|
1689
|
-
}
|
|
1690
|
-
async function
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
const {
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1695
|
+
let v, i;
|
|
1696
|
+
async function f(d) {
|
|
1697
|
+
const { touches: u } = d;
|
|
1698
|
+
s(u.length), n.zooming = c(2), l.startTap();
|
|
1699
|
+
const { clientX: y, clientY: p } = u[0];
|
|
1700
|
+
o.start(y, p), a("start", y, p, d), n.zooming && (d.preventDefault(), v = n.level, i = gt(u), await e.switchToZoom(), n.lastCenter = $n(u));
|
|
1701
|
+
}
|
|
1702
|
+
async function r(d) {
|
|
1703
|
+
if (e.getDisableMove())
|
|
1704
|
+
return;
|
|
1705
|
+
const { touches: u } = d;
|
|
1706
|
+
s(u.length);
|
|
1707
|
+
const { clientX: y, clientY: p } = u[0];
|
|
1708
|
+
if (o.move(y, p), a("move", y, p, d), n.zooming && c(2)) {
|
|
1709
|
+
d.preventDefault();
|
|
1710
|
+
const E = gt(u), A = v * E / i;
|
|
1711
|
+
e.zoomTo(A, n.lastCenter);
|
|
1698
1712
|
}
|
|
1699
1713
|
}
|
|
1700
|
-
async function M(
|
|
1701
|
-
if (
|
|
1714
|
+
async function M(d) {
|
|
1715
|
+
if (d.touches.length)
|
|
1702
1716
|
return;
|
|
1703
|
-
const { clientX:
|
|
1704
|
-
a("end",
|
|
1717
|
+
const { clientX: u, clientY: y } = d.changedTouches[0];
|
|
1718
|
+
a("end", u, y, d), l.checkTap(o.offsetX.value, o.offsetY.value), e.zoomFinished(), o.reset();
|
|
1705
1719
|
}
|
|
1706
|
-
return { core:
|
|
1720
|
+
return { core: e, onTouchStart: f, onTouchMove: r, onTouchEnd: M };
|
|
1707
1721
|
}
|
|
1708
|
-
function
|
|
1709
|
-
const
|
|
1722
|
+
function Zo() {
|
|
1723
|
+
const t = Ie({
|
|
1710
1724
|
scale: 1,
|
|
1711
1725
|
startX: 0,
|
|
1712
1726
|
startY: 0,
|
|
@@ -1715,64 +1729,64 @@ function Xo() {
|
|
|
1715
1729
|
dragging: !1,
|
|
1716
1730
|
started: !1
|
|
1717
1731
|
});
|
|
1718
|
-
function
|
|
1719
|
-
|
|
1732
|
+
function e(l, s) {
|
|
1733
|
+
t.startX = l, t.startY = s, t.scale = 1;
|
|
1720
1734
|
}
|
|
1721
1735
|
function n(l, s) {
|
|
1722
|
-
|
|
1736
|
+
t.started = !0, t.dragging = !0, t.offsetX = l - t.startX, t.offsetY = s - t.startY, t.scale = 1 - Math.abs(t.offsetY / s * 0.4);
|
|
1723
1737
|
}
|
|
1724
1738
|
function o() {
|
|
1725
|
-
!
|
|
1739
|
+
!t.dragging || (Math.abs(t.offsetY) > window.innerHeight * 0.14 ? t.scale = 0.3 : t.scale = 1, t.dragging = !1, t.offsetX = 0, t.offsetY = 0);
|
|
1726
1740
|
}
|
|
1727
|
-
return { state:
|
|
1741
|
+
return { state: t, dragStart: e, dragMove: n, dragEnd: o };
|
|
1728
1742
|
}
|
|
1729
|
-
function
|
|
1730
|
-
const
|
|
1731
|
-
return
|
|
1732
|
-
!
|
|
1733
|
-
}),
|
|
1734
|
-
|
|
1735
|
-
|
|
1743
|
+
function Hn() {
|
|
1744
|
+
const t = g(!1), e = g(!1);
|
|
1745
|
+
return Nt(() => {
|
|
1746
|
+
!e.value || (t.value = !0);
|
|
1747
|
+
}), ve(() => {
|
|
1748
|
+
e.value = !1, setTimeout(() => {
|
|
1749
|
+
e.value = !0;
|
|
1736
1750
|
});
|
|
1737
1751
|
}), {
|
|
1738
|
-
isActivated:
|
|
1752
|
+
isActivated: t
|
|
1739
1753
|
};
|
|
1740
1754
|
}
|
|
1741
|
-
function
|
|
1742
|
-
let
|
|
1755
|
+
function Pn(t) {
|
|
1756
|
+
let e = !1;
|
|
1743
1757
|
return () => {
|
|
1744
|
-
|
|
1758
|
+
e || (t(), e = !0);
|
|
1745
1759
|
};
|
|
1746
1760
|
}
|
|
1747
|
-
function
|
|
1748
|
-
let
|
|
1749
|
-
const { isActivated: n } =
|
|
1761
|
+
function Vo(t) {
|
|
1762
|
+
let e = null;
|
|
1763
|
+
const { isActivated: n } = Hn(), o = Pn(() => e = window.onBackPress);
|
|
1750
1764
|
function l() {
|
|
1751
|
-
o(), window.onBackPress = () =>
|
|
1765
|
+
o(), window.onBackPress = () => t();
|
|
1752
1766
|
}
|
|
1753
1767
|
function s() {
|
|
1754
|
-
window.onBackPress =
|
|
1768
|
+
window.onBackPress = e;
|
|
1755
1769
|
}
|
|
1756
|
-
return
|
|
1770
|
+
return Nt(() => {
|
|
1757
1771
|
!n.value || l();
|
|
1758
|
-
}),
|
|
1772
|
+
}), $t(() => {
|
|
1759
1773
|
l();
|
|
1760
|
-
}),
|
|
1774
|
+
}), Tt(() => {
|
|
1761
1775
|
s();
|
|
1762
|
-
}),
|
|
1776
|
+
}), Ht(() => {
|
|
1763
1777
|
s();
|
|
1764
1778
|
}), { register: l, unregister: s };
|
|
1765
1779
|
}
|
|
1766
|
-
const
|
|
1780
|
+
const Fn = ["onClick"], Wn = /* @__PURE__ */ J({
|
|
1767
1781
|
__name: "Toast",
|
|
1768
1782
|
props: {
|
|
1769
1783
|
message: null,
|
|
1770
1784
|
position: null,
|
|
1771
1785
|
buttonClickEvent: null
|
|
1772
1786
|
},
|
|
1773
|
-
setup(
|
|
1774
|
-
const
|
|
1775
|
-
switch (
|
|
1787
|
+
setup(t) {
|
|
1788
|
+
const e = t, n = g(), o = g(), l = g(), s = L(() => {
|
|
1789
|
+
switch (e.position) {
|
|
1776
1790
|
case "top":
|
|
1777
1791
|
return 10;
|
|
1778
1792
|
case "middle":
|
|
@@ -1780,14 +1794,14 @@ const Pn = ["onClick"], Fn = /* @__PURE__ */ J({
|
|
|
1780
1794
|
case "bottom":
|
|
1781
1795
|
return 85;
|
|
1782
1796
|
}
|
|
1783
|
-
}), a =
|
|
1797
|
+
}), a = L(() => ({
|
|
1784
1798
|
position: "absolute",
|
|
1785
1799
|
borderRadius: "10px",
|
|
1786
1800
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
1787
1801
|
padding: "14px 19px",
|
|
1788
1802
|
top: `calc(${s.value}% - ${l.value}px)`,
|
|
1789
1803
|
left: `calc(50% - ${o.value}px)`
|
|
1790
|
-
})),
|
|
1804
|
+
})), c = L(() => ({
|
|
1791
1805
|
width: "fit-content",
|
|
1792
1806
|
display: "flex",
|
|
1793
1807
|
justifyContent: "center",
|
|
@@ -1795,60 +1809,60 @@ const Pn = ["onClick"], Fn = /* @__PURE__ */ J({
|
|
|
1795
1809
|
color: "white",
|
|
1796
1810
|
fontSize: "14px"
|
|
1797
1811
|
}));
|
|
1798
|
-
function
|
|
1799
|
-
!
|
|
1812
|
+
function v() {
|
|
1813
|
+
!e.buttonClickEvent || e.buttonClickEvent();
|
|
1800
1814
|
}
|
|
1801
|
-
return
|
|
1815
|
+
return pe(() => {
|
|
1802
1816
|
o.value = n.value.offsetWidth / 2, l.value = n.value.offsetHeight / 2;
|
|
1803
|
-
}), (
|
|
1804
|
-
onClick:
|
|
1817
|
+
}), (i, f) => (Y(), U("div", {
|
|
1818
|
+
onClick: we(v, ["stop"]),
|
|
1805
1819
|
id: "toastWrapper",
|
|
1806
1820
|
ref_key: "toastWrapper",
|
|
1807
1821
|
ref: n,
|
|
1808
1822
|
class: "toastWrapper",
|
|
1809
1823
|
style: q([j(a), { zIndex: 9999999 }])
|
|
1810
1824
|
}, [
|
|
1811
|
-
|
|
1812
|
-
style: q(j(
|
|
1825
|
+
Q("div", {
|
|
1826
|
+
style: q(j(c))
|
|
1813
1827
|
}, [
|
|
1814
|
-
|
|
1828
|
+
Q("span", null, Ve(t.message), 1)
|
|
1815
1829
|
], 4)
|
|
1816
|
-
], 12,
|
|
1830
|
+
], 12, Fn));
|
|
1817
1831
|
}
|
|
1818
1832
|
});
|
|
1819
|
-
const
|
|
1833
|
+
const Xn = /* @__PURE__ */ ae(Wn, [["__scopeId", "data-v-25d39b90"]]), ht = {
|
|
1820
1834
|
message: "\u61D2\u732B\u4E91 Yes!!!",
|
|
1821
1835
|
position: "middle",
|
|
1822
1836
|
duration: 1500,
|
|
1823
1837
|
buttonClickEvent: () => {
|
|
1824
1838
|
}
|
|
1825
1839
|
};
|
|
1826
|
-
class
|
|
1840
|
+
class Ko {
|
|
1827
1841
|
options;
|
|
1828
1842
|
container;
|
|
1829
|
-
constructor(
|
|
1830
|
-
this.options =
|
|
1843
|
+
constructor(e) {
|
|
1844
|
+
this.options = e, this.container = document.createElement("div");
|
|
1831
1845
|
}
|
|
1832
1846
|
present() {
|
|
1833
|
-
const
|
|
1834
|
-
|
|
1835
|
-
const n = this.options.duration ||
|
|
1847
|
+
const e = fe(fe(Xn), { ...ht, ...this.options });
|
|
1848
|
+
Ee(e, this.container), document.body.insertBefore(this.container, document.body.firstChild);
|
|
1849
|
+
const n = this.options.duration || ht.duration;
|
|
1836
1850
|
setTimeout(() => {
|
|
1837
1851
|
this.dismiss();
|
|
1838
1852
|
}, n);
|
|
1839
1853
|
}
|
|
1840
1854
|
dismiss() {
|
|
1841
1855
|
if (this.container) {
|
|
1842
|
-
const
|
|
1856
|
+
const e = this.container.querySelector(
|
|
1843
1857
|
"#toastWrapper"
|
|
1844
1858
|
);
|
|
1845
|
-
|
|
1846
|
-
this.container && (
|
|
1859
|
+
e.style.opacity = "0", e.style.transition = "opacity 0.4s ease-in", setTimeout(() => {
|
|
1860
|
+
this.container && (Ee(null, this.container), document.body.removeChild(this.container));
|
|
1847
1861
|
}, 500);
|
|
1848
1862
|
}
|
|
1849
1863
|
}
|
|
1850
1864
|
}
|
|
1851
|
-
const
|
|
1865
|
+
const Zn = ["xlink:href", "fill", "color"], xe = /* @__PURE__ */ J({
|
|
1852
1866
|
__name: "SvgIcon",
|
|
1853
1867
|
props: {
|
|
1854
1868
|
name: null,
|
|
@@ -1857,136 +1871,136 @@ const Xn = ["xlink:href", "fill", "color"], Le = /* @__PURE__ */ J({
|
|
|
1857
1871
|
width: null,
|
|
1858
1872
|
height: null
|
|
1859
1873
|
},
|
|
1860
|
-
setup(
|
|
1861
|
-
const
|
|
1862
|
-
width: `${
|
|
1863
|
-
height: `${
|
|
1864
|
-
aspectRatio:
|
|
1874
|
+
setup(t) {
|
|
1875
|
+
const e = t, n = L(() => `#${e.prefix}-${e.name}`), o = L(() => ({
|
|
1876
|
+
width: `${e.width ?? e.height}px`,
|
|
1877
|
+
height: `${e.height ?? e.width}px`,
|
|
1878
|
+
aspectRatio: e.width && e.height ? void 0 : "1/1"
|
|
1865
1879
|
}));
|
|
1866
1880
|
function l(s) {
|
|
1867
1881
|
const { style: a } = s;
|
|
1868
1882
|
return typeof a == "object" ? a : {};
|
|
1869
1883
|
}
|
|
1870
|
-
return (s, a) => (
|
|
1884
|
+
return (s, a) => (Y(), U("svg", {
|
|
1871
1885
|
"aria-hidden": "",
|
|
1872
1886
|
style: q({ ...j(o), ...l(s.$attrs) })
|
|
1873
1887
|
}, [
|
|
1874
|
-
|
|
1888
|
+
Q("use", {
|
|
1875
1889
|
"xlink:href": j(n),
|
|
1876
|
-
fill:
|
|
1877
|
-
color:
|
|
1878
|
-
}, null, 8,
|
|
1890
|
+
fill: t.color,
|
|
1891
|
+
color: t.color
|
|
1892
|
+
}, null, 8, Zn)
|
|
1879
1893
|
], 4));
|
|
1880
1894
|
}
|
|
1881
1895
|
});
|
|
1882
|
-
function
|
|
1896
|
+
function Vn(t) {
|
|
1883
1897
|
const {
|
|
1884
|
-
containerEl:
|
|
1898
|
+
containerEl: e,
|
|
1885
1899
|
sliderEl: n,
|
|
1886
1900
|
autoHeight: o,
|
|
1887
1901
|
performance: l = {},
|
|
1888
1902
|
maxHeightRatio: s = 0.9,
|
|
1889
1903
|
observeMethod: a = "classList"
|
|
1890
|
-
} =
|
|
1891
|
-
let
|
|
1892
|
-
const
|
|
1904
|
+
} = t, c = g(!0), v = _e(P, 100);
|
|
1905
|
+
let i, f = "";
|
|
1906
|
+
const r = g(0), M = g(0), d = g(0), u = g({
|
|
1893
1907
|
top: 0,
|
|
1894
1908
|
scrollTop: 0,
|
|
1895
1909
|
scrollHeight: 0,
|
|
1896
1910
|
clientHeight: 0
|
|
1897
1911
|
}), y = g({
|
|
1898
1912
|
clientHeight: 0
|
|
1899
|
-
}),
|
|
1900
|
-
|
|
1913
|
+
}), p = L(() => !!M.value), E = L(() => u.value.scrollHeight > u.value.clientHeight), A = L(() => o ? u.value.clientHeight - m.value : u.value.clientHeight - y.value.clientHeight), z = L(() => u.value.scrollHeight - u.value.clientHeight), h = L(() => !u.value.clientHeight && !u.value.scrollHeight ? 1 : Math.max(
|
|
1914
|
+
u.value.clientHeight / u.value.scrollHeight,
|
|
1901
1915
|
0.05
|
|
1902
|
-
)), m =
|
|
1916
|
+
)), m = L(() => h.value > s ? 0 : h.value * u.value.clientHeight), I = L(() => ({
|
|
1903
1917
|
willChange: "transform",
|
|
1904
|
-
transform: `translate3d(0,${
|
|
1918
|
+
transform: `translate3d(0,${d.value}px,0)`,
|
|
1905
1919
|
height: o ? `${m.value}px` : void 0
|
|
1906
1920
|
}));
|
|
1907
|
-
|
|
1908
|
-
function
|
|
1909
|
-
|
|
1921
|
+
qe(e, () => N());
|
|
1922
|
+
function T(x) {
|
|
1923
|
+
k(), M.value = x.clientY - n.value.getBoundingClientRect().top || 1, f = getComputedStyle(e.value).scrollBehavior, f === "smooth" && (e.value.style.scrollBehavior = "unset");
|
|
1910
1924
|
}
|
|
1911
1925
|
function C() {
|
|
1912
|
-
|
|
1926
|
+
e.value.style.scrollBehavior = f, M.value = 0, v();
|
|
1913
1927
|
}
|
|
1914
|
-
function
|
|
1915
|
-
|
|
1928
|
+
function k() {
|
|
1929
|
+
c.value = !1;
|
|
1916
1930
|
}
|
|
1917
|
-
function
|
|
1918
|
-
|
|
1931
|
+
function P() {
|
|
1932
|
+
p.value || (c.value = !0);
|
|
1919
1933
|
}
|
|
1920
|
-
function
|
|
1921
|
-
if (!
|
|
1934
|
+
function Z(x) {
|
|
1935
|
+
if (!p.value)
|
|
1922
1936
|
return;
|
|
1923
|
-
let
|
|
1924
|
-
|
|
1925
|
-
top:
|
|
1937
|
+
let B = x.clientY - u.value.top - M.value;
|
|
1938
|
+
B < 0 ? d.value = 0 : B >= A.value ? d.value = A.value : d.value = B, e.value.scrollTo({
|
|
1939
|
+
top: d.value / A.value * z.value
|
|
1926
1940
|
});
|
|
1927
1941
|
}
|
|
1928
|
-
function
|
|
1929
|
-
|
|
1942
|
+
function F() {
|
|
1943
|
+
p.value || ee();
|
|
1930
1944
|
}
|
|
1931
|
-
function
|
|
1932
|
-
cancelAnimationFrame(
|
|
1945
|
+
function ee() {
|
|
1946
|
+
cancelAnimationFrame(i), i = requestAnimationFrame(te);
|
|
1933
1947
|
}
|
|
1934
|
-
function
|
|
1935
|
-
|
|
1948
|
+
function te() {
|
|
1949
|
+
e.value && (r.value = l.scrollTop?.value ?? e.value.scrollTop, d.value = r.value / z.value * A.value);
|
|
1936
1950
|
}
|
|
1937
|
-
function
|
|
1938
|
-
let
|
|
1939
|
-
|
|
1951
|
+
function D(x) {
|
|
1952
|
+
let B = "addEventListener";
|
|
1953
|
+
x === "add" ? B = "addEventListener" : B = "removeEventListener", n.value?.[B]("pointerdown", T, {
|
|
1940
1954
|
passive: !0
|
|
1941
|
-
}), window[
|
|
1955
|
+
}), window[B]("pointermove", Z, { passive: !0 }), window[B]("pointerup", C, { passive: !0 });
|
|
1942
1956
|
}
|
|
1943
|
-
const
|
|
1944
|
-
(a == "classList" ||
|
|
1957
|
+
const w = new MutationObserver((x) => {
|
|
1958
|
+
(a == "classList" || x.map((W) => W.oldValue).join().includes("height")) && N();
|
|
1945
1959
|
});
|
|
1946
|
-
function
|
|
1947
|
-
|
|
1948
|
-
const { scrollHeight:
|
|
1949
|
-
|
|
1950
|
-
const { clientHeight:
|
|
1951
|
-
|
|
1952
|
-
}
|
|
1953
|
-
function
|
|
1954
|
-
|
|
1955
|
-
y.value.clientHeight = n.value?.clientHeight ?? 0,
|
|
1960
|
+
function N() {
|
|
1961
|
+
u.value.top = e.value?.getBoundingClientRect().top ?? 0;
|
|
1962
|
+
const { scrollHeight: x = 0, clientHeight: B = 0 } = e.value || {}, { scrollHeight: W, clientHeight: ne } = u.value;
|
|
1963
|
+
x != W && (u.value.scrollHeight = x, te()), B != ne && (u.value.clientHeight = B, te());
|
|
1964
|
+
const { clientHeight: G = 0 } = n.value || {};
|
|
1965
|
+
G != y.value.clientHeight && (y.value.clientHeight = G);
|
|
1966
|
+
}
|
|
1967
|
+
function S() {
|
|
1968
|
+
k(), setTimeout(() => {
|
|
1969
|
+
y.value.clientHeight = n.value?.clientHeight ?? 0, P();
|
|
1956
1970
|
}, 150);
|
|
1957
1971
|
}
|
|
1958
|
-
function
|
|
1959
|
-
if (
|
|
1960
|
-
|
|
1972
|
+
function _() {
|
|
1973
|
+
if (e.value && n.value) {
|
|
1974
|
+
e.value.classList.add("hide-scrollbar"), e.value.addEventListener("scroll", F, {
|
|
1961
1975
|
passive: !0
|
|
1962
|
-
}),
|
|
1963
|
-
const
|
|
1964
|
-
a === "classList" ? Object.assign(
|
|
1976
|
+
}), D("add");
|
|
1977
|
+
const x = {};
|
|
1978
|
+
a === "classList" ? Object.assign(x, { subtree: !0, childList: !0 }) : Object.assign(x, {
|
|
1965
1979
|
subtree: !0,
|
|
1966
1980
|
attributeOldValue: !0,
|
|
1967
1981
|
attributeFilter: ["style"]
|
|
1968
|
-
}),
|
|
1969
|
-
|
|
1970
|
-
}, 100),
|
|
1982
|
+
}), w.observe(e.value, x), setTimeout(() => {
|
|
1983
|
+
N();
|
|
1984
|
+
}, 100), S();
|
|
1971
1985
|
} else
|
|
1972
|
-
console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl:
|
|
1986
|
+
console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: e, sliderEl: n });
|
|
1973
1987
|
}
|
|
1974
|
-
return
|
|
1975
|
-
|
|
1988
|
+
return K(r, () => {
|
|
1989
|
+
k(), v();
|
|
1976
1990
|
}), {
|
|
1977
|
-
isScrollEnd:
|
|
1978
|
-
isDragSlider:
|
|
1979
|
-
offsetTop:
|
|
1980
|
-
scrollTop:
|
|
1981
|
-
scrollable:
|
|
1982
|
-
sliderPos:
|
|
1983
|
-
sliderRollableHeight:
|
|
1984
|
-
init:
|
|
1985
|
-
modifySliderEventListener:
|
|
1991
|
+
isScrollEnd: c,
|
|
1992
|
+
isDragSlider: p,
|
|
1993
|
+
offsetTop: d,
|
|
1994
|
+
scrollTop: r,
|
|
1995
|
+
scrollable: E,
|
|
1996
|
+
sliderPos: I,
|
|
1997
|
+
sliderRollableHeight: A,
|
|
1998
|
+
init: _,
|
|
1999
|
+
modifySliderEventListener: D,
|
|
1986
2000
|
heightRatio: h
|
|
1987
2001
|
};
|
|
1988
2002
|
}
|
|
1989
|
-
const
|
|
2003
|
+
const Kn = (t) => (Se("data-v-7fd39e51"), t = t(), Oe(), t), Gn = /* @__PURE__ */ Kn(() => /* @__PURE__ */ Q("div", { class: "default-slider" }, null, -1)), qn = /* @__PURE__ */ J({
|
|
1990
2004
|
__name: "ScrollBar",
|
|
1991
2005
|
props: {
|
|
1992
2006
|
containerEl: null,
|
|
@@ -1996,14 +2010,14 @@ const Vn = (e) => (xe("data-v-7fd39e51"), e = e(), Ce(), e), Kn = /* @__PURE__ *
|
|
|
1996
2010
|
performance: null,
|
|
1997
2011
|
maxHeightRatio: { default: 0.9 }
|
|
1998
2012
|
},
|
|
1999
|
-
setup(
|
|
2000
|
-
const n =
|
|
2013
|
+
setup(t, { expose: e }) {
|
|
2014
|
+
const n = t, o = !!Pt().default, l = g(null), s = L(() => n.containerEl), a = Vn({
|
|
2001
2015
|
containerEl: s,
|
|
2002
2016
|
sliderEl: l,
|
|
2003
2017
|
autoHeight: o ? n.autoHeight : !0,
|
|
2004
2018
|
performance: n.performance,
|
|
2005
2019
|
observeMethod: n.observeMethod
|
|
2006
|
-
}), { scrollable:
|
|
2020
|
+
}), { scrollable: c, isScrollEnd: v, sliderPos: i, heightRatio: f } = a, r = g(!1), M = n.autoHide ? L(() => n.maxHeightRatio < f.value ? !1 : r.value || !v.value) : L(() => n.maxHeightRatio < f.value ? !1 : c.value), { load: d } = Je(
|
|
2007
2021
|
`.hide-scrollbar {
|
|
2008
2022
|
scrollbar-width: none;
|
|
2009
2023
|
-ms-overflow-style: none;
|
|
@@ -2013,47 +2027,47 @@ const Vn = (e) => (xe("data-v-7fd39e51"), e = e(), Ce(), e), Kn = /* @__PURE__ *
|
|
|
2013
2027
|
}`,
|
|
2014
2028
|
{ id: "styletag_lzc_scrollbar", manual: !0 }
|
|
2015
2029
|
);
|
|
2016
|
-
|
|
2017
|
-
|
|
2030
|
+
ve(() => {
|
|
2031
|
+
d(), pe(() => {
|
|
2018
2032
|
a.init();
|
|
2019
2033
|
});
|
|
2020
|
-
}),
|
|
2034
|
+
}), Dt(() => {
|
|
2021
2035
|
a.modifySliderEventListener("remove");
|
|
2022
2036
|
});
|
|
2023
|
-
function
|
|
2024
|
-
|
|
2037
|
+
function u() {
|
|
2038
|
+
r.value = !0;
|
|
2025
2039
|
}
|
|
2026
2040
|
function y() {
|
|
2027
|
-
|
|
2041
|
+
r.value = !1;
|
|
2028
2042
|
}
|
|
2029
|
-
return
|
|
2030
|
-
default:
|
|
2031
|
-
|
|
2043
|
+
return e({ uScrollBarReturn: a }), (p, E) => (Y(), Ce(We, null, {
|
|
2044
|
+
default: Xe(() => [
|
|
2045
|
+
de(Q("div", {
|
|
2032
2046
|
ref_key: "sliderRef",
|
|
2033
2047
|
ref: l,
|
|
2034
2048
|
class: "slider-wrapper",
|
|
2035
|
-
onMouseenter:
|
|
2049
|
+
onMouseenter: u,
|
|
2036
2050
|
onMouseleave: y,
|
|
2037
|
-
style: q(j(
|
|
2051
|
+
style: q(j(i))
|
|
2038
2052
|
}, [
|
|
2039
|
-
|
|
2040
|
-
|
|
2053
|
+
De(p.$slots, "default", {}, () => [
|
|
2054
|
+
Gn
|
|
2041
2055
|
], !0)
|
|
2042
2056
|
], 36), [
|
|
2043
|
-
[
|
|
2057
|
+
[be, j(M)]
|
|
2044
2058
|
])
|
|
2045
2059
|
]),
|
|
2046
2060
|
_: 3
|
|
2047
2061
|
}));
|
|
2048
2062
|
}
|
|
2049
2063
|
});
|
|
2050
|
-
const
|
|
2064
|
+
const Go = /* @__PURE__ */ ae(qn, [["__scopeId", "data-v-7fd39e51"]]), Jn = (t) => (Se("data-v-df5da876"), t = t(), Oe(), t), eo = { class: "pull-refresh" }, to = {
|
|
2051
2065
|
key: 0,
|
|
2052
2066
|
class: "pull-arrow-circle"
|
|
2053
|
-
},
|
|
2067
|
+
}, no = {
|
|
2054
2068
|
key: 0,
|
|
2055
2069
|
class: "box-load"
|
|
2056
|
-
},
|
|
2070
|
+
}, oo = { class: "left-load" }, lo = { class: "right-load" }, so = /* @__PURE__ */ Jn(() => /* @__PURE__ */ Q("div", { class: "among-load" }, null, -1)), ao = { class: "pull-arrow" }, io = { key: 1 }, uo = /* @__PURE__ */ J({
|
|
2057
2071
|
__name: "PullRefresh",
|
|
2058
2072
|
props: {
|
|
2059
2073
|
refresh: null,
|
|
@@ -2061,81 +2075,81 @@ const Ko = /* @__PURE__ */ se(Gn, [["__scopeId", "data-v-7fd39e51"]]), qn = (e)
|
|
|
2061
2075
|
scrollTop: null,
|
|
2062
2076
|
pullRefreshContainer: null
|
|
2063
2077
|
},
|
|
2064
|
-
setup(
|
|
2065
|
-
const
|
|
2078
|
+
setup(t) {
|
|
2079
|
+
const e = t, n = 0.7, o = "#2EC1CC", l = g(-999), s = g(1), a = g(0), c = g(0.3), v = g(!1), i = g(0), f = g(0), r = g(0), M = g(0), d = g(0), u = g(), y = L(() => e.scrollTop), p = L(() => ({
|
|
2066
2080
|
transition: `${M.value}ms`,
|
|
2067
2081
|
transform: `translate3d(0,${l.value}px, 0) scale(${s.value})`
|
|
2068
|
-
})),
|
|
2082
|
+
})), E = L(() => ({
|
|
2069
2083
|
borderColor: o,
|
|
2070
2084
|
transition: M.value,
|
|
2071
2085
|
transform: `rotate(${100 + a.value}deg)`,
|
|
2072
|
-
opacity:
|
|
2086
|
+
opacity: c.value
|
|
2073
2087
|
}));
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
}),
|
|
2077
|
-
if (
|
|
2088
|
+
K(d, (T) => {
|
|
2089
|
+
T === 0 && (l.value = -50, c.value = 0.3);
|
|
2090
|
+
}), K(f, (T) => {
|
|
2091
|
+
if (d.value === 2)
|
|
2078
2092
|
return;
|
|
2079
|
-
const C = Math.pow(
|
|
2080
|
-
C === 0 && (l.value = -50), C <= 50 && C > 0 && (l.value = C - 45, a.value = Math.pow(C, 1.5), C > 15 ?
|
|
2093
|
+
const C = Math.pow(T, n);
|
|
2094
|
+
C === 0 && (l.value = -50), C <= 50 && C > 0 && (l.value = C - 45, a.value = Math.pow(C, 1.5), C > 15 ? v.value = !0 : v.value = !1), C > 50 && (l.value = 5, c.value = 1, d.value);
|
|
2081
2095
|
});
|
|
2082
|
-
const
|
|
2083
|
-
|
|
2084
|
-
}, h = (
|
|
2085
|
-
const C =
|
|
2086
|
-
|
|
2096
|
+
const A = g(0), z = (T) => {
|
|
2097
|
+
A.value = T.touches[0].pageY;
|
|
2098
|
+
}, h = (T) => {
|
|
2099
|
+
const C = T.touches[0].pageY - A.value;
|
|
2100
|
+
A.value = T.touches[0].pageY, !e.refreshOff && (!e?.refresh || d.value !== 2 && y.value === 0 && (i.value === 0 && (i.value = T.touches[0].pageY), r.value = 0, I.value.style.transition = `${r.value}ms`, M.value = 0, f.value = T.touches[0].pageY - i.value, I.value.style.transform = `translate3d(0, ${Math.pow(f.value, n)}px, 0)`, C > 0 && T.preventDefault()));
|
|
2087
2101
|
}, m = () => {
|
|
2088
|
-
if (
|
|
2102
|
+
if (e.refreshOff || !e?.refresh || d.value === 2)
|
|
2089
2103
|
return;
|
|
2090
|
-
|
|
2091
|
-
const
|
|
2092
|
-
|
|
2093
|
-
|
|
2104
|
+
i.value = 0, r.value = 300;
|
|
2105
|
+
const T = Math.pow(f.value, n);
|
|
2106
|
+
I.value.style.transition = `${r.value}ms`, T > 50 ? (d.value = 2, f.value = Math.pow(50, 1 / n), I.value.style.transform = `translate3d(0, ${Math.pow(f.value, n)}px, 0)`, M.value = 300, e?.refresh && e?.refresh().then(() => {
|
|
2107
|
+
u.value = "\u5237\u65B0\u6210\u529F";
|
|
2094
2108
|
}).catch(() => {
|
|
2095
|
-
|
|
2109
|
+
u.value = "\u5237\u65B0\u5931\u8D25";
|
|
2096
2110
|
}).finally(() => {
|
|
2097
2111
|
setTimeout(() => {
|
|
2098
|
-
|
|
2099
|
-
|
|
2112
|
+
d.value = 0, f.value = 0, I.value.style.transform = `translate3d(0, ${Math.pow(
|
|
2113
|
+
f.value,
|
|
2100
2114
|
n
|
|
2101
2115
|
)}px, 0)`, setTimeout(() => {
|
|
2102
|
-
|
|
2116
|
+
u.value = void 0;
|
|
2103
2117
|
}, M.value);
|
|
2104
2118
|
}, 600);
|
|
2105
|
-
})) : (
|
|
2106
|
-
},
|
|
2107
|
-
return
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
),
|
|
2111
|
-
}), (
|
|
2112
|
-
|
|
2119
|
+
})) : (f.value = 0, I.value.style.transform = `translate3d(0, ${Math.pow(f.value, n)}px, 0)`);
|
|
2120
|
+
}, I = g(null);
|
|
2121
|
+
return ve(() => {
|
|
2122
|
+
e?.refreshOff || (I.value = document.querySelector(
|
|
2123
|
+
e.pullRefreshContainer
|
|
2124
|
+
), I.value?.addEventListener("touchstart", z), I.value?.addEventListener("touchmove", h), I.value?.addEventListener("touchend", m));
|
|
2125
|
+
}), (T, C) => (Y(), U("div", eo, [
|
|
2126
|
+
Q("div", {
|
|
2113
2127
|
class: "pull-refresh-box",
|
|
2114
|
-
style: q(j(
|
|
2128
|
+
style: q(j(p))
|
|
2115
2129
|
}, [
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2130
|
+
u.value ? (Y(), U("div", io, Ve(u.value), 1)) : (Y(), U("div", to, [
|
|
2131
|
+
d.value == 2 ? (Y(), U("div", no, [
|
|
2132
|
+
Q("div", oo, [
|
|
2133
|
+
Q("div", {
|
|
2120
2134
|
class: "left-circle",
|
|
2121
2135
|
style: q({ backgroundColor: o })
|
|
2122
2136
|
}, null, 4)
|
|
2123
2137
|
]),
|
|
2124
|
-
|
|
2125
|
-
|
|
2138
|
+
Q("div", lo, [
|
|
2139
|
+
Q("div", {
|
|
2126
2140
|
class: "right-circle",
|
|
2127
2141
|
style: q({ backgroundColor: o })
|
|
2128
2142
|
}, null, 4)
|
|
2129
2143
|
]),
|
|
2130
|
-
|
|
2131
|
-
])) : (
|
|
2144
|
+
so
|
|
2145
|
+
])) : (Y(), U("div", {
|
|
2132
2146
|
key: 1,
|
|
2133
2147
|
class: "pull-circle-line",
|
|
2134
|
-
style: q(j(
|
|
2148
|
+
style: q(j(E))
|
|
2135
2149
|
}, [
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
class:
|
|
2150
|
+
Q("div", ao, [
|
|
2151
|
+
Q("div", {
|
|
2152
|
+
class: ue(["arrows", { opacity: v.value }]),
|
|
2139
2153
|
style: q({ borderBottomColor: o })
|
|
2140
2154
|
}, null, 6)
|
|
2141
2155
|
])
|
|
@@ -2145,10 +2159,10 @@ const Ko = /* @__PURE__ */ se(Gn, [["__scopeId", "data-v-7fd39e51"]]), qn = (e)
|
|
|
2145
2159
|
]));
|
|
2146
2160
|
}
|
|
2147
2161
|
});
|
|
2148
|
-
const
|
|
2162
|
+
const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-df5da876"]]), co = ["data-key"], fo = {
|
|
2149
2163
|
inheritAttrs: !1
|
|
2150
|
-
},
|
|
2151
|
-
...
|
|
2164
|
+
}, vo = /* @__PURE__ */ J({
|
|
2165
|
+
...fo,
|
|
2152
2166
|
__name: "VirtualList",
|
|
2153
2167
|
props: {
|
|
2154
2168
|
data: null,
|
|
@@ -2159,9 +2173,9 @@ const uo = /* @__PURE__ */ se(io, [["__scopeId", "data-v-df5da876"]]), ro = ["da
|
|
|
2159
2173
|
refreshOff: { type: Boolean, default: !1 }
|
|
2160
2174
|
},
|
|
2161
2175
|
emits: ["scrollEnd"],
|
|
2162
|
-
setup(
|
|
2163
|
-
const o =
|
|
2164
|
-
itemHeight: (
|
|
2176
|
+
setup(t, { expose: e, emit: n }) {
|
|
2177
|
+
const o = t, l = fn(Ft(o, "data"), {
|
|
2178
|
+
itemHeight: (d) => o.itemHeight(o.data[d]),
|
|
2165
2179
|
overscan: o.overscan,
|
|
2166
2180
|
scrollEndHook: () => {
|
|
2167
2181
|
n("scrollEnd");
|
|
@@ -2169,49 +2183,49 @@ const uo = /* @__PURE__ */ se(io, [["__scopeId", "data-v-df5da876"]]), ro = ["da
|
|
|
2169
2183
|
}), {
|
|
2170
2184
|
list: s,
|
|
2171
2185
|
containerProps: a,
|
|
2172
|
-
wrapperProps:
|
|
2173
|
-
innerProps:
|
|
2174
|
-
getItemHeightData:
|
|
2175
|
-
scrollTop:
|
|
2186
|
+
wrapperProps: c,
|
|
2187
|
+
innerProps: v,
|
|
2188
|
+
getItemHeightData: i,
|
|
2189
|
+
scrollTop: f
|
|
2176
2190
|
} = l;
|
|
2177
|
-
|
|
2191
|
+
e({
|
|
2178
2192
|
vListReturn: l
|
|
2179
2193
|
});
|
|
2180
|
-
const
|
|
2181
|
-
function M(
|
|
2182
|
-
return o.getItemKey ? o.getItemKey(
|
|
2194
|
+
const r = "virtualListWrapper" + new Date().getTime();
|
|
2195
|
+
function M(d, u) {
|
|
2196
|
+
return o.getItemKey ? o.getItemKey(d, u) : `${u}`;
|
|
2183
2197
|
}
|
|
2184
|
-
return (
|
|
2185
|
-
|
|
2186
|
-
refresh:
|
|
2187
|
-
refreshOff:
|
|
2188
|
-
scrollTop: j(
|
|
2189
|
-
pullRefreshContainer: "#" +
|
|
2198
|
+
return (d, u) => (Y(), U(He, null, [
|
|
2199
|
+
Te(ro, {
|
|
2200
|
+
refresh: t.refresh,
|
|
2201
|
+
refreshOff: t.refreshOff,
|
|
2202
|
+
scrollTop: j(f),
|
|
2203
|
+
pullRefreshContainer: "#" + r
|
|
2190
2204
|
}, null, 8, ["refresh", "refreshOff", "scrollTop", "pullRefreshContainer"]),
|
|
2191
|
-
|
|
2205
|
+
Q("div", {
|
|
2192
2206
|
class: "virtualListWrapper",
|
|
2193
|
-
id:
|
|
2207
|
+
id: r
|
|
2194
2208
|
}, [
|
|
2195
|
-
|
|
2196
|
-
onScrollPassive:
|
|
2209
|
+
Q("div", Ne({
|
|
2210
|
+
onScrollPassive: u[0] || (u[0] = (...y) => j(a).onScroll && j(a).onScroll(...y)),
|
|
2197
2211
|
ref: j(a).ref,
|
|
2198
2212
|
class: "virtualList"
|
|
2199
|
-
},
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
(
|
|
2203
|
-
key: M(y,
|
|
2204
|
-
"data-key": M(y,
|
|
2213
|
+
}, d.$attrs), [
|
|
2214
|
+
Q("div", Re($e(j(c))), [
|
|
2215
|
+
Q("div", Re($e(j(v))), [
|
|
2216
|
+
(Y(!0), U(He, null, Wt(j(s), ({ data: y, index: p }) => (Y(), U("div", {
|
|
2217
|
+
key: M(y, p),
|
|
2218
|
+
"data-key": M(y, p),
|
|
2205
2219
|
style: q({
|
|
2206
|
-
height: `${j(
|
|
2220
|
+
height: `${j(i)(p).height}px`,
|
|
2207
2221
|
display: "flex"
|
|
2208
2222
|
})
|
|
2209
2223
|
}, [
|
|
2210
|
-
|
|
2224
|
+
De(d.$slots, "default", {
|
|
2211
2225
|
data: y,
|
|
2212
|
-
index:
|
|
2226
|
+
index: p
|
|
2213
2227
|
}, void 0, !0)
|
|
2214
|
-
], 12,
|
|
2228
|
+
], 12, co))), 128))
|
|
2215
2229
|
], 16)
|
|
2216
2230
|
], 16)
|
|
2217
2231
|
], 16)
|
|
@@ -2219,62 +2233,62 @@ const uo = /* @__PURE__ */ se(io, [["__scopeId", "data-v-df5da876"]]), ro = ["da
|
|
|
2219
2233
|
], 64));
|
|
2220
2234
|
}
|
|
2221
2235
|
});
|
|
2222
|
-
const
|
|
2236
|
+
const qo = /* @__PURE__ */ ae(vo, [["__scopeId", "data-v-dfe60586"]]), rt = (t) => (Se("data-v-33519afd"), t = t(), Oe(), t), Mo = { style: { position: "absolute" } }, go = /* @__PURE__ */ rt(() => /* @__PURE__ */ Q("div", { class: "wrapper" }, null, -1)), ho = ["width", "height"], mo = /* @__PURE__ */ rt(() => /* @__PURE__ */ Q("title", null, "logo", -1)), yo = /* @__PURE__ */ rt(() => /* @__PURE__ */ Q("g", {
|
|
2223
2237
|
id: "group-1",
|
|
2224
2238
|
stroke: "none",
|
|
2225
2239
|
"stroke-width": "1",
|
|
2226
2240
|
fill: "none",
|
|
2227
2241
|
"fill-rule": "evenodd"
|
|
2228
2242
|
}, [
|
|
2229
|
-
/* @__PURE__ */
|
|
2243
|
+
/* @__PURE__ */ Q("path", {
|
|
2230
2244
|
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",
|
|
2231
2245
|
id: "path-1",
|
|
2232
2246
|
fill: "#FFF"
|
|
2233
2247
|
})
|
|
2234
|
-
], -1)),
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
],
|
|
2248
|
+
], -1)), po = [
|
|
2249
|
+
mo,
|
|
2250
|
+
yo
|
|
2251
|
+
], Do = /* @__PURE__ */ J({
|
|
2238
2252
|
__name: "Loading",
|
|
2239
2253
|
props: {
|
|
2240
2254
|
width: { default: "90" },
|
|
2241
2255
|
height: { default: "90" },
|
|
2242
2256
|
duration: { default: 1300 }
|
|
2243
2257
|
},
|
|
2244
|
-
setup(
|
|
2245
|
-
const
|
|
2246
|
-
|
|
2258
|
+
setup(t) {
|
|
2259
|
+
const e = t;
|
|
2260
|
+
Ze((o) => ({
|
|
2247
2261
|
"312487ac": n
|
|
2248
2262
|
}));
|
|
2249
|
-
const n = `${
|
|
2250
|
-
return (o, l) => (
|
|
2251
|
-
|
|
2252
|
-
(
|
|
2263
|
+
const n = `${e.duration}ms`;
|
|
2264
|
+
return (o, l) => (Y(), U("div", Mo, [
|
|
2265
|
+
go,
|
|
2266
|
+
(Y(), U("svg", {
|
|
2253
2267
|
style: { position: "relative" },
|
|
2254
|
-
width:
|
|
2255
|
-
height:
|
|
2268
|
+
width: t.width,
|
|
2269
|
+
height: t.height,
|
|
2256
2270
|
viewBox: "0 0 260 260",
|
|
2257
2271
|
version: "1.1",
|
|
2258
2272
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2259
|
-
},
|
|
2273
|
+
}, po, 8, ho))
|
|
2260
2274
|
]));
|
|
2261
2275
|
}
|
|
2262
2276
|
});
|
|
2263
|
-
const
|
|
2277
|
+
const Jo = /* @__PURE__ */ ae(Do, [["__scopeId", "data-v-33519afd"]]), To = [
|
|
2264
2278
|
"image/vnd.adobe.photoshop",
|
|
2265
2279
|
"image/x-photoshop",
|
|
2266
2280
|
"image/jp2",
|
|
2267
2281
|
"image/pcx"
|
|
2268
2282
|
];
|
|
2269
|
-
function
|
|
2270
|
-
const n = g(
|
|
2271
|
-
const
|
|
2272
|
-
return !
|
|
2283
|
+
function St(t, e) {
|
|
2284
|
+
const n = g(t?.value), o = L(() => n.value?.startsWith("/_lzc")), l = g(!1), s = L(() => l.value), a = L(() => {
|
|
2285
|
+
const v = e?.value;
|
|
2286
|
+
return !v || v.startsWith("video/") ? !0 : v.startsWith("image/") ? o.value ? !0 : !To.includes(v) : !1;
|
|
2273
2287
|
});
|
|
2274
|
-
|
|
2275
|
-
n.value =
|
|
2288
|
+
t && K(t, (v) => {
|
|
2289
|
+
n.value = v, l.value = !1;
|
|
2276
2290
|
});
|
|
2277
|
-
function
|
|
2291
|
+
function c() {
|
|
2278
2292
|
l.value = !0;
|
|
2279
2293
|
}
|
|
2280
2294
|
return {
|
|
@@ -2282,20 +2296,20 @@ function jt(e, t) {
|
|
|
2282
2296
|
isError: l,
|
|
2283
2297
|
hasError: s,
|
|
2284
2298
|
isSupport: a,
|
|
2285
|
-
handleError:
|
|
2299
|
+
handleError: c
|
|
2286
2300
|
};
|
|
2287
2301
|
}
|
|
2288
|
-
function
|
|
2302
|
+
function Ot() {
|
|
2289
2303
|
return { vImageCancel: {
|
|
2290
|
-
beforeUnmount(
|
|
2291
|
-
!
|
|
2304
|
+
beforeUnmount(e) {
|
|
2305
|
+
!e || (e.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
|
|
2292
2306
|
}
|
|
2293
2307
|
} };
|
|
2294
2308
|
}
|
|
2295
|
-
const
|
|
2296
|
-
|
|
2297
|
-
],
|
|
2298
|
-
...
|
|
2309
|
+
const No = ["title"], wo = { class: "tip" }, Io = /* @__PURE__ */ Xt("\u5F53\u524D\u683C\u5F0F\u4E0D\u652F\u6301"), Eo = [
|
|
2310
|
+
Io
|
|
2311
|
+
], Ao = ["src"], zo = ["src"], Lo = ["title"], jo = { inheritAttrs: !1 }, xo = /* @__PURE__ */ J({
|
|
2312
|
+
...jo,
|
|
2299
2313
|
__name: "Image",
|
|
2300
2314
|
props: {
|
|
2301
2315
|
src: null,
|
|
@@ -2307,175 +2321,175 @@ const To = ["title"], No = { class: "tip" }, wo = /* @__PURE__ */ Wt("\u5F53\u52
|
|
|
2307
2321
|
badImageIconName: { default: "\u56FE\u7247\u635F\u574F" }
|
|
2308
2322
|
},
|
|
2309
2323
|
emits: ["load", "noSupport", "loadError"],
|
|
2310
|
-
setup(
|
|
2311
|
-
const n =
|
|
2312
|
-
component:
|
|
2324
|
+
setup(t, { emit: e }) {
|
|
2325
|
+
const n = t, o = g(), l = g(), s = g(!1), a = g(!1), c = g(!1), { src: v, mime: i } = wt(n), { imgSrc: f, isSupport: r, hasError: M, handleError: d } = St(v, i), { vImageCancel: u } = Ot(), { LoadingComp: y } = jt({
|
|
2326
|
+
component: Tn,
|
|
2313
2327
|
delay: 300
|
|
2314
|
-
}),
|
|
2315
|
-
function
|
|
2328
|
+
}), p = Vt(() => c.value && n.autoRemoveThumbnail ? !1 : n.thumbnail && !c.value);
|
|
2329
|
+
function E() {
|
|
2316
2330
|
a.value = !0;
|
|
2317
2331
|
}
|
|
2318
|
-
function
|
|
2319
|
-
a.value && (
|
|
2332
|
+
function A() {
|
|
2333
|
+
a.value && (c.value = !0);
|
|
2320
2334
|
}
|
|
2321
2335
|
async function z() {
|
|
2322
|
-
|
|
2336
|
+
E(), p.value ? (o.value?.addEventListener("animationend", h), o.value?.classList.add("showing"), await je(10)) : o.value && e("load", o.value), o.value?.classList.remove("src-class");
|
|
2323
2337
|
}
|
|
2324
2338
|
function h() {
|
|
2325
|
-
o.value?.removeEventListener("animationend", h), o.value?.classList.remove("showing"), o.value &&
|
|
2339
|
+
o.value?.removeEventListener("animationend", h), o.value?.classList.remove("showing"), o.value && e("load", o.value), A();
|
|
2326
2340
|
}
|
|
2327
2341
|
async function m(C) {
|
|
2328
|
-
C ? z() : l.value &&
|
|
2342
|
+
C ? z() : l.value && e("load", l.value), s.value = !0;
|
|
2329
2343
|
}
|
|
2330
|
-
function
|
|
2331
|
-
C ? (
|
|
2344
|
+
function I(C) {
|
|
2345
|
+
C ? (d(), e("loadError")) : E(), s.value = !0;
|
|
2332
2346
|
}
|
|
2333
|
-
function
|
|
2334
|
-
|
|
2347
|
+
function T() {
|
|
2348
|
+
e("noSupport");
|
|
2335
2349
|
}
|
|
2336
|
-
return (C,
|
|
2337
|
-
j(
|
|
2338
|
-
j(
|
|
2339
|
-
title: j(
|
|
2350
|
+
return (C, k) => (Y(), U(He, null, [
|
|
2351
|
+
j(r) && !s.value ? (Y(), Ce(j(y), { key: 0 })) : ge("", !0),
|
|
2352
|
+
j(r) ? j(M) ? (Y(), U("div", Ne({ key: 3 }, C.$attrs, {
|
|
2353
|
+
title: j(f),
|
|
2340
2354
|
class: "tip-wrap"
|
|
2341
2355
|
}), [
|
|
2342
|
-
|
|
2356
|
+
Te(xe, {
|
|
2343
2357
|
class: "bad-image",
|
|
2344
|
-
name:
|
|
2358
|
+
name: t.badImageIconName
|
|
2345
2359
|
}, null, 8, ["name"])
|
|
2346
|
-
], 16,
|
|
2360
|
+
], 16, Lo)) : De(C.$slots, "default", {
|
|
2347
2361
|
key: 2,
|
|
2348
|
-
src: j(
|
|
2362
|
+
src: j(f),
|
|
2349
2363
|
onLoad: m,
|
|
2350
|
-
onError:
|
|
2351
|
-
vImageCancel: j(
|
|
2364
|
+
onError: I,
|
|
2365
|
+
vImageCancel: j(u)
|
|
2352
2366
|
}, () => [
|
|
2353
|
-
j(
|
|
2367
|
+
j(p) ? de((Y(), U("img", Ne({ key: 0 }, C.$attrs, {
|
|
2354
2368
|
ref_key: "thumbnailRef",
|
|
2355
2369
|
ref: l,
|
|
2356
|
-
onLoad:
|
|
2357
|
-
onError:
|
|
2358
|
-
src:
|
|
2359
|
-
}), null, 16,
|
|
2360
|
-
[j(
|
|
2361
|
-
]) :
|
|
2362
|
-
|
|
2370
|
+
onLoad: k[0] || (k[0] = (P) => m()),
|
|
2371
|
+
onError: k[1] || (k[1] = (P) => I()),
|
|
2372
|
+
src: t.thumbnail
|
|
2373
|
+
}), null, 16, Ao)), [
|
|
2374
|
+
[j(u)]
|
|
2375
|
+
]) : ge("", !0),
|
|
2376
|
+
t.isShowSrc || a.value ? de((Y(), U("img", Ne({ key: 1 }, C.$attrs, {
|
|
2363
2377
|
ref_key: "srcRef",
|
|
2364
2378
|
ref: o,
|
|
2365
2379
|
class: "src-class",
|
|
2366
|
-
onLoad:
|
|
2367
|
-
onError:
|
|
2368
|
-
src: j(
|
|
2369
|
-
}), null, 16,
|
|
2370
|
-
[j(
|
|
2371
|
-
[
|
|
2372
|
-
]) :
|
|
2373
|
-
], !0) : (
|
|
2374
|
-
title: j(
|
|
2380
|
+
onLoad: k[2] || (k[2] = (P) => m(!0)),
|
|
2381
|
+
onError: k[3] || (k[3] = (P) => I(!0)),
|
|
2382
|
+
src: j(f)
|
|
2383
|
+
}), null, 16, zo)), [
|
|
2384
|
+
[j(u)],
|
|
2385
|
+
[be, a.value]
|
|
2386
|
+
]) : ge("", !0)
|
|
2387
|
+
], !0) : (Y(), U("div", Ne({ key: 1 }, C.$attrs, {
|
|
2388
|
+
title: j(f),
|
|
2375
2389
|
class: "tip-wrap"
|
|
2376
2390
|
}), [
|
|
2377
|
-
|
|
2391
|
+
Te(xe, {
|
|
2378
2392
|
class: "no-support-icon",
|
|
2379
|
-
name:
|
|
2393
|
+
name: t.noSupportIconName
|
|
2380
2394
|
}, null, 8, ["name"]),
|
|
2381
|
-
|
|
2382
|
-
[j(
|
|
2395
|
+
de((Y(), U("span", wo, Eo)), [
|
|
2396
|
+
[j(It), T]
|
|
2383
2397
|
])
|
|
2384
|
-
], 16,
|
|
2398
|
+
], 16, No))
|
|
2385
2399
|
], 64));
|
|
2386
2400
|
}
|
|
2387
2401
|
});
|
|
2388
|
-
const
|
|
2402
|
+
const el = /* @__PURE__ */ ae(xo, [["__scopeId", "data-v-bfec1a6b"]]), Co = ["title"], So = ["src"], Oo = ["title"], bo = /* @__PURE__ */ J({
|
|
2389
2403
|
__name: "Thumbnail",
|
|
2390
2404
|
props: {
|
|
2391
2405
|
src: null,
|
|
2392
2406
|
mime: null
|
|
2393
2407
|
},
|
|
2394
2408
|
emits: ["noSupport"],
|
|
2395
|
-
setup(
|
|
2396
|
-
const n =
|
|
2397
|
-
function
|
|
2398
|
-
|
|
2409
|
+
setup(t, { emit: e }) {
|
|
2410
|
+
const n = t, o = g(!1), { src: l, mime: s } = wt(n), { imgSrc: a, hasError: c, isSupport: v, handleError: i } = St(l, s), { vImageCancel: f } = Ot();
|
|
2411
|
+
function r() {
|
|
2412
|
+
e("noSupport");
|
|
2399
2413
|
}
|
|
2400
|
-
return (M,
|
|
2401
|
-
|
|
2414
|
+
return (M, d) => j(v) ? j(c) ? De(M.$slots, "imageError", { key: 2 }, () => [
|
|
2415
|
+
Q("div", {
|
|
2402
2416
|
title: j(a),
|
|
2403
2417
|
class: "icon-wrap"
|
|
2404
2418
|
}, [
|
|
2405
|
-
|
|
2419
|
+
Te(xe, {
|
|
2406
2420
|
class: "icon",
|
|
2407
2421
|
name: "\u56FE\u7247\u635F\u574F"
|
|
2408
2422
|
})
|
|
2409
|
-
], 8,
|
|
2410
|
-
], !0) :
|
|
2423
|
+
], 8, Oo)
|
|
2424
|
+
], !0) : de((Y(), U("img", {
|
|
2411
2425
|
key: 1,
|
|
2412
2426
|
fetchpriority: "high",
|
|
2413
|
-
onLoad:
|
|
2414
|
-
onError:
|
|
2427
|
+
onLoad: d[0] || (d[0] = (u) => o.value = !0),
|
|
2428
|
+
onError: d[1] || (d[1] = (...u) => j(i) && j(i)(...u)),
|
|
2415
2429
|
src: j(a)
|
|
2416
|
-
}, null, 40,
|
|
2417
|
-
[j(
|
|
2418
|
-
[
|
|
2419
|
-
]) :
|
|
2420
|
-
|
|
2430
|
+
}, null, 40, So)), [
|
|
2431
|
+
[j(f)],
|
|
2432
|
+
[be, o.value]
|
|
2433
|
+
]) : De(M.$slots, "noSupport", { key: 0 }, () => [
|
|
2434
|
+
Q("div", {
|
|
2421
2435
|
title: j(a),
|
|
2422
2436
|
class: "icon-wrap"
|
|
2423
2437
|
}, [
|
|
2424
|
-
|
|
2438
|
+
de(Te(xe, {
|
|
2425
2439
|
class: "icon",
|
|
2426
2440
|
name: "\u672A\u77E5\u7C7B\u578B"
|
|
2427
2441
|
}, null, 512), [
|
|
2428
|
-
[j(
|
|
2442
|
+
[j(It), r]
|
|
2429
2443
|
])
|
|
2430
|
-
], 8,
|
|
2444
|
+
], 8, Co)
|
|
2431
2445
|
], !0);
|
|
2432
2446
|
}
|
|
2433
2447
|
});
|
|
2434
|
-
const
|
|
2448
|
+
const tl = /* @__PURE__ */ ae(bo, [["__scopeId", "data-v-ab86da1e"]]);
|
|
2435
2449
|
export {
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2450
|
+
Tn as DefaultLoading,
|
|
2451
|
+
el as Image,
|
|
2452
|
+
Jo as Loading,
|
|
2453
|
+
bn as LoadingToast,
|
|
2454
|
+
Po as PageLoading,
|
|
2455
|
+
ro as PullRefresh,
|
|
2456
|
+
Go as ScrollBar,
|
|
2457
|
+
xe as SvgIcon,
|
|
2458
|
+
tl as Thumbnail,
|
|
2459
|
+
Ko as ToastCreator,
|
|
2460
|
+
qo as VirtualList,
|
|
2461
|
+
ot as allSelectedKey,
|
|
2462
|
+
Mn as closeDialogKey,
|
|
2463
|
+
$o as dialogController,
|
|
2464
|
+
Ue as getTransform,
|
|
2465
|
+
it as isAllSelectedKey,
|
|
2466
|
+
nt as isSelectedKey,
|
|
2467
|
+
zt as itemKeyKey,
|
|
2468
|
+
Pn as once,
|
|
2469
|
+
st as selectAllKey,
|
|
2470
|
+
lt as selectKey,
|
|
2471
|
+
ut as selectedCountKey,
|
|
2472
|
+
et as toggleAllKey,
|
|
2473
|
+
tt as toggleKey,
|
|
2474
|
+
Ae as unselectAllKey,
|
|
2475
|
+
at as unselectKey,
|
|
2476
|
+
Vo as useBackPress,
|
|
2477
|
+
Fo as useDelayAsync,
|
|
2478
|
+
Ho as useDelayLoad,
|
|
2479
|
+
jt as useDelayLoadComp,
|
|
2480
|
+
Zo as useDownDrag,
|
|
2481
|
+
Lt as useDragSelect,
|
|
2482
|
+
Ro as useDragSelectByMobile,
|
|
2483
|
+
Uo as useDragSelectByPc,
|
|
2484
|
+
Hn as useRouterActivated,
|
|
2485
|
+
Xo as useScaleImageByMobile,
|
|
2486
|
+
Wo as useScaleImageByPc,
|
|
2487
|
+
Yo as useSelectable,
|
|
2488
|
+
Bo as useSelectableByBase,
|
|
2489
|
+
Qo as useSelectableInjectors,
|
|
2490
|
+
fn as useVirtualList,
|
|
2491
|
+
ko as vDebounceClick,
|
|
2492
|
+
It as vEnter,
|
|
2493
|
+
Zt as vSingleClick
|
|
2480
2494
|
};
|
|
2481
2495
|
//# sourceMappingURL=index.es.js.map
|