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