go-captcha-vue 2.0.2 → 2.0.3
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/README.md +41 -4
- package/dist/components/button/index.vue.d.ts +3 -6
- package/dist/components/click/hooks/handler.d.ts +5 -1
- package/dist/components/click/index.vue.d.ts +9 -6
- package/dist/components/click/meta/config.d.ts +2 -0
- package/dist/components/click/meta/data.d.ts +1 -1
- package/dist/components/click/meta/event.d.ts +2 -3
- package/dist/components/click/meta/expose.d.ts +11 -0
- package/dist/components/rotate/hooks/handler.d.ts +7 -1
- package/dist/components/rotate/index.vue.d.ts +9 -6
- package/dist/components/rotate/meta/config.d.ts +2 -0
- package/dist/components/rotate/meta/data.d.ts +1 -0
- package/dist/components/rotate/meta/event.d.ts +1 -1
- package/dist/components/rotate/meta/expose.d.ts +11 -0
- package/dist/components/slide/hooks/handler.d.ts +7 -1
- package/dist/components/slide/index.vue.d.ts +9 -6
- package/dist/components/slide/meta/config.d.ts +2 -0
- package/dist/components/slide/meta/data.d.ts +1 -0
- package/dist/components/slide/meta/event.d.ts +1 -1
- package/dist/components/slide/meta/expose.d.ts +11 -0
- package/dist/components/slide-region/hooks/handler.d.ts +7 -1
- package/dist/components/slide-region/index.vue.d.ts +9 -6
- package/dist/components/slide-region/meta/config.d.ts +2 -0
- package/dist/components/slide-region/meta/data.d.ts +1 -0
- package/dist/components/slide-region/meta/event.d.ts +1 -1
- package/dist/components/slide-region/meta/expose.d.ts +11 -0
- package/dist/go-captcha-vue.es.js +747 -591
- package/dist/go-captcha-vue.umd.js +8 -8
- package/dist/index.d.ts +4 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as U, openBlock as z, createElementBlock as Y, mergeProps as oe, createElementVNode as o, reactive as B, toRaw as I, watch as F, computed as x, withDirectives as K, normalizeClass as se, normalizeStyle as D, toDisplayString as ie, vShow as Q, createVNode as A, unref as v, Fragment as De, renderList as $e, ref as ee, onMounted as pe, nextTick as _e, toRefs as ze, createBlock as ae, createCommentVNode as Ce } from "vue";
|
|
2
|
+
const we = () => ({
|
|
3
3
|
width: 300,
|
|
4
4
|
height: 220,
|
|
5
5
|
thumbWidth: 150,
|
|
@@ -8,32 +8,34 @@ const re = () => ({
|
|
|
8
8
|
horizontalPadding: 12,
|
|
9
9
|
showTheme: !0,
|
|
10
10
|
title: "请在下图依次点击",
|
|
11
|
-
buttonText: "确认"
|
|
12
|
-
|
|
11
|
+
buttonText: "确认",
|
|
12
|
+
iconSize: 22,
|
|
13
|
+
dotSize: 24
|
|
14
|
+
}), Se = /* @__PURE__ */ o("path", { d: `M100.1,189.9C100.1,189.9,100,189.9,100.1,189.9c-49.7,0-90-40.4-90-89.9c0-49.6,40.4-89.9,89.9-89.9
|
|
13
15
|
c49.6,0,89.9,40.4,89.9,89.9c0,18.2-5.4,35.7-15.6,50.7c-1.5,2.1-3.6,3.4-6.1,3.9c-2.5,0.4-5-0.1-7-1.6c-4.2-3-5.3-8.6-2.4-12.9
|
|
14
16
|
c8.1-11.9,12.4-25.7,12.4-40.1c0-39.2-31.9-71.1-71.1-71.1c-39.2,0-71.1,31.9-71.1,71.1c0,39.2,31.9,71.1,71.1,71.1
|
|
15
17
|
c7.7,0,15.3-1.2,22.6-3.6c2.4-0.8,4.9-0.6,7.2,0.5c2.2,1.1,3.9,3.1,4.7,5.5c1.6,4.9-1,10.2-5.9,11.9
|
|
16
18
|
C119.3,188.4,109.8,189.9,100.1,189.9z M73,136.4C73,136.4,73,136.4,73,136.4c-2.5,0-4.9-1-6.7-2.8c-3.7-3.7-3.7-9.6,0-13.3
|
|
17
19
|
L86.7,100L66.4,79.7c-3.7-3.7-3.7-9.6,0-13.3c3.7-3.7,9.6-3.7,13.3,0L100,86.7l20.3-20.3c1.8-1.8,4.1-2.8,6.7-2.8c0,0,0,0,0,0
|
|
18
20
|
c2.5,0,4.9,1,6.7,2.8c1.8,1.8,2.8,4.1,2.8,6.7c0,2.5-1,4.9-2.8,6.7L113.3,100l20.3,20.3c3.7,3.7,3.7,9.6,0,13.3
|
|
19
|
-
c-3.7,3.7-9.6,3.7-13.3,0L100,113.3l-20.3,20.3C77.9,135.4,75.5,136.4,73,136.4z` }, null, -1),
|
|
20
|
-
|
|
21
|
-
],
|
|
21
|
+
c-3.7,3.7-9.6,3.7-13.3,0L100,113.3l-20.3,20.3C77.9,135.4,75.5,136.4,73,136.4z` }, null, -1), Be = [
|
|
22
|
+
Se
|
|
23
|
+
], ge = /* @__PURE__ */ U({
|
|
22
24
|
__name: "close-icon",
|
|
23
25
|
emits: ["click"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
setup(n, { emit: t }) {
|
|
27
|
+
const a = t;
|
|
28
|
+
function r(i) {
|
|
29
|
+
a("click", i);
|
|
28
30
|
}
|
|
29
|
-
return (
|
|
31
|
+
return (i, m) => (z(), Y("svg", oe({
|
|
30
32
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31
33
|
viewBox: "0 0 200 200",
|
|
32
34
|
width: "20",
|
|
33
35
|
height: "20"
|
|
34
|
-
},
|
|
36
|
+
}, i.$attrs, { onClick: r }), Be, 16));
|
|
35
37
|
}
|
|
36
|
-
}),
|
|
38
|
+
}), Te = /* @__PURE__ */ o("path", { d: `M135,149.9c-10.7,7.6-23.2,11.4-36,11.2c-1.7,0-3.4-0.1-5-0.3c-0.7-0.1-1.4-0.2-2-0.3c-1.3-0.2-2.6-0.4-3.9-0.6
|
|
37
39
|
c-0.8-0.2-1.6-0.4-2.3-0.5c-1.2-0.3-2.5-0.6-3.7-1c-0.6-0.2-1.2-0.4-1.7-0.6c-1.4-0.5-2.8-1-4.2-1.5c-0.3-0.1-0.6-0.3-0.9-0.4
|
|
38
40
|
c-1.6-0.7-3.2-1.4-4.7-2.3c-0.1,0-0.1-0.1-0.2-0.1c-5.1-2.9-9.8-6.4-14-10.6c-0.1-0.1-0.1-0.1-0.2-0.2c-1.3-1.3-2.5-2.7-3.7-4.1
|
|
39
41
|
c-0.2-0.3-0.5-0.6-0.7-0.9c-8.4-10.6-13.5-24.1-13.5-38.8h14.3c0.4,0,0.7-0.2,0.9-0.5c0.2-0.3,0.2-0.8,0-1.1L29.5,60.9
|
|
@@ -50,29 +52,29 @@ const re = () => ({
|
|
|
50
52
|
c0.6,0.1,1.3,0.3,1.9,0.4c1.4,0.3,2.8,0.7,4.2,1.1c0.4,0.1,0.9,0.3,1.3,0.4c1.6,0.5,3.1,1.1,4.6,1.7c0.2,0.1,0.3,0.1,0.5,0.2
|
|
51
53
|
c9,3.9,17,10,23.2,17.6c0,0,0.1,0.1,0.1,0.2c8.7,10.7,14,24.5,14,39.4H147c-0.4,0-0.7,0.2-0.9,0.5c-0.2,0.3-0.2,0.8,0,1.1l24,36.4
|
|
52
54
|
c0.2,0.3,0.5,0.5,0.9,0.5c0.4,0,0.7-0.2,0.9-0.5l23.9-36.4c0.2-0.3,0.2-0.7,0-1.1c-0.2-0.3-0.5-0.5-0.9-0.5L180.6,98.9L180.6,98.9
|
|
53
|
-
L180.6,98.9z` }, null, -1),
|
|
54
|
-
|
|
55
|
-
],
|
|
55
|
+
L180.6,98.9z` }, null, -1), Pe = [
|
|
56
|
+
Te
|
|
57
|
+
], fe = /* @__PURE__ */ U({
|
|
56
58
|
__name: "refresh-icon",
|
|
57
59
|
emits: ["click"],
|
|
58
|
-
setup(
|
|
59
|
-
const
|
|
60
|
-
function
|
|
61
|
-
|
|
60
|
+
setup(n, { emit: t }) {
|
|
61
|
+
const a = t;
|
|
62
|
+
function r(i) {
|
|
63
|
+
a("click", i);
|
|
62
64
|
}
|
|
63
|
-
return (
|
|
65
|
+
return (i, m) => (z(), Y("svg", oe({
|
|
64
66
|
xmlns: "http://www.w3.org/2000/svg",
|
|
65
67
|
viewBox: "0 0 200 200",
|
|
66
68
|
width: "20",
|
|
67
69
|
height: "20"
|
|
68
|
-
},
|
|
70
|
+
}, i.$attrs, { onClick: r }), Pe, 16));
|
|
69
71
|
}
|
|
70
|
-
}),
|
|
72
|
+
}), Xe = /* @__PURE__ */ o("circle", {
|
|
71
73
|
cx: "50",
|
|
72
74
|
cy: "36.8101",
|
|
73
75
|
r: "10"
|
|
74
76
|
}, [
|
|
75
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ o("animate", {
|
|
76
78
|
attributeName: "cy",
|
|
77
79
|
dur: "1s",
|
|
78
80
|
repeatCount: "indefinite",
|
|
@@ -81,164 +83,190 @@ const re = () => ({
|
|
|
81
83
|
keyTimes: "0;0.5;1",
|
|
82
84
|
values: "23;77;23"
|
|
83
85
|
})
|
|
84
|
-
], -1),
|
|
85
|
-
|
|
86
|
-
],
|
|
86
|
+
], -1), We = [
|
|
87
|
+
Xe
|
|
88
|
+
], ve = /* @__PURE__ */ U({
|
|
87
89
|
__name: "loading-icon",
|
|
88
90
|
emits: ["click"],
|
|
89
|
-
setup(
|
|
90
|
-
const
|
|
91
|
-
function
|
|
92
|
-
|
|
91
|
+
setup(n, { emit: t }) {
|
|
92
|
+
const a = t;
|
|
93
|
+
function r(i) {
|
|
94
|
+
a("click", i);
|
|
93
95
|
}
|
|
94
|
-
return (
|
|
96
|
+
return (i, m) => (z(), Y("svg", oe({
|
|
95
97
|
xmlns: "http://www.w3.org/2000/svg",
|
|
96
98
|
viewBox: "0 0 100 100",
|
|
97
99
|
preserveAspectRatio: "xMidYMid",
|
|
98
100
|
width: "84",
|
|
99
101
|
height: "84"
|
|
100
|
-
},
|
|
102
|
+
}, i.$attrs, { onClick: r }), We, 16));
|
|
101
103
|
}
|
|
102
104
|
});
|
|
103
|
-
function
|
|
104
|
-
let
|
|
105
|
-
if (
|
|
106
|
-
const
|
|
107
|
-
|
|
105
|
+
function Me(n) {
|
|
106
|
+
let t = 0, a = 0;
|
|
107
|
+
if (n.getBoundingClientRect) {
|
|
108
|
+
const r = n.getBoundingClientRect(), i = document.documentElement;
|
|
109
|
+
t = r.left + Math.max(i.scrollLeft, document.body.scrollLeft) - i.clientLeft, a = r.top + Math.max(i.scrollTop, document.body.scrollTop) - i.clientTop;
|
|
108
110
|
} else
|
|
109
|
-
for (;
|
|
110
|
-
|
|
111
|
+
for (; n !== document.body; )
|
|
112
|
+
t += n.offsetLeft, a += n.offsetTop, n = n.offsetParent;
|
|
111
113
|
return {
|
|
112
|
-
domX:
|
|
113
|
-
domY:
|
|
114
|
+
domX: t,
|
|
115
|
+
domY: a
|
|
114
116
|
};
|
|
115
117
|
}
|
|
116
|
-
function
|
|
117
|
-
let
|
|
118
|
+
function be(n, t) {
|
|
119
|
+
let a = t.relatedTarget;
|
|
118
120
|
try {
|
|
119
|
-
for (;
|
|
120
|
-
|
|
121
|
-
} catch (
|
|
122
|
-
console.warn(
|
|
121
|
+
for (; a && a !== n; )
|
|
122
|
+
a = a.parentNode;
|
|
123
|
+
} catch (r) {
|
|
124
|
+
console.warn(r);
|
|
123
125
|
}
|
|
124
|
-
return
|
|
126
|
+
return a !== n;
|
|
125
127
|
}
|
|
126
|
-
function
|
|
127
|
-
const
|
|
128
|
+
function Fe(n, t, a) {
|
|
129
|
+
const r = B({ list: [] }), i = (s) => {
|
|
130
|
+
const p = s.currentTarget, b = Me(p), l = s.pageX || s.clientX, _ = s.pageY || s.clientY, g = b.domX, S = b.domY, L = l - g, h = _ - S, f = parseInt(L.toString()), w = parseInt(h.toString()), T = /* @__PURE__ */ new Date(), q = r.list.length;
|
|
131
|
+
return r.list.push({ key: T.getTime(), index: q + 1, x: f, y: w }), t.click && t.click(f, w), s.cancelBubble = !0, s.preventDefault(), !1;
|
|
132
|
+
}, m = (s) => (t.confirm && t.confirm(I(r.list), () => {
|
|
133
|
+
y();
|
|
134
|
+
}), s.cancelBubble = !0, s.preventDefault(), !1), c = (s) => (e(), s.cancelBubble = !0, s.preventDefault(), !1), u = (s) => (d(), s.cancelBubble = !0, s.preventDefault(), !1), e = () => {
|
|
135
|
+
t.close && t.close(), y();
|
|
136
|
+
}, d = () => {
|
|
137
|
+
t.refresh && t.refresh(), y();
|
|
138
|
+
}, y = () => {
|
|
139
|
+
r.list = [];
|
|
140
|
+
};
|
|
128
141
|
return {
|
|
129
|
-
dots:
|
|
130
|
-
clickEvent:
|
|
131
|
-
|
|
132
|
-
|
|
142
|
+
dots: r,
|
|
143
|
+
clickEvent: i,
|
|
144
|
+
confirmEvent: m,
|
|
145
|
+
closeEvent: c,
|
|
146
|
+
refreshEvent: u,
|
|
147
|
+
resetData: y,
|
|
148
|
+
clearData: () => {
|
|
149
|
+
y(), a && a();
|
|
133
150
|
},
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}), o.cancelBubble = !0, o.preventDefault(), !1),
|
|
137
|
-
closeEvent: (o) => (n.close && n.close(), t.list = [], o.cancelBubble = !0, o.preventDefault(), !1),
|
|
138
|
-
refreshEvent: (o) => (n.refresh && n.refresh(), t.list = [], o.cancelBubble = !0, o.preventDefault(), !1)
|
|
151
|
+
refresh: d,
|
|
152
|
+
close: e
|
|
139
153
|
};
|
|
140
154
|
}
|
|
141
|
-
const
|
|
155
|
+
const Re = { class: "gc-header" }, Ye = ["src"], He = { class: "gc-loading" }, Oe = ["src"], je = { class: "gc-dots" }, Ae = { class: "gc-footer" }, Ie = { class: "gc-icon-block gc-icon-block2" }, Ve = { class: "gc-button-block" }, le = /* @__PURE__ */ U({
|
|
142
156
|
__name: "index",
|
|
143
157
|
props: {
|
|
144
|
-
config: { default:
|
|
158
|
+
config: { default: we },
|
|
145
159
|
events: { default: () => ({}) },
|
|
146
160
|
data: { default: () => ({}) }
|
|
147
161
|
},
|
|
148
|
-
setup(
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
})
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
162
|
+
setup(n, { expose: t }) {
|
|
163
|
+
const a = n, { data: r, events: i, config: m } = a, c = B({ ...I(r) }), u = B({ ...I(i) }), e = B({ ...we(), ...I(m) });
|
|
164
|
+
F(() => a.data, (l, _) => {
|
|
165
|
+
Object.assign(c, l);
|
|
166
|
+
}, { deep: !0 }), F(() => a.events, (l, _) => {
|
|
167
|
+
Object.assign(u, l);
|
|
168
|
+
}, { deep: !0 }), F(() => a.config, (l, _) => {
|
|
169
|
+
Object.assign(e, l);
|
|
170
|
+
}, { deep: !0 });
|
|
171
|
+
const d = Fe(c, u, () => {
|
|
172
|
+
c.thumb = "", c.image = "";
|
|
173
|
+
}), y = x(() => {
|
|
174
|
+
const l = e.horizontalPadding || 0, _ = e.verticalPadding || 0;
|
|
175
|
+
return {
|
|
176
|
+
width: (e.width || 0) + l * 2 + (e.showTheme ? 2 : 0) + "px",
|
|
177
|
+
paddingLeft: l + "px",
|
|
178
|
+
paddingRight: l + "px",
|
|
179
|
+
paddingTop: _ + "px",
|
|
180
|
+
paddingBottom: _ + "px"
|
|
157
181
|
};
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
class: j(`go-captcha gc-wrapper ${e.value.showTheme ? "gc-theme" : ""}`),
|
|
174
|
-
style: _(m.value)
|
|
182
|
+
}), E = x(() => ({
|
|
183
|
+
width: e.thumbWidth + "px",
|
|
184
|
+
height: e.thumbHeight + "px"
|
|
185
|
+
})), s = x(() => ({
|
|
186
|
+
width: e.width + "px",
|
|
187
|
+
height: e.height + "px"
|
|
188
|
+
})), p = x(() => c.image != "" || c.thumb != ""), b = x(() => (e.width || 0) > 0 || (e.height || 0) > 0);
|
|
189
|
+
return t({
|
|
190
|
+
reset: d.resetData,
|
|
191
|
+
clear: d.clearData,
|
|
192
|
+
refresh: d.refresh,
|
|
193
|
+
close: d.close
|
|
194
|
+
}), (l, _) => K((z(), Y("div", {
|
|
195
|
+
class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
|
|
196
|
+
style: D(y.value)
|
|
175
197
|
}, [
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
style:
|
|
180
|
-
src:
|
|
181
|
-
alt: "
|
|
182
|
-
}, null, 12,
|
|
183
|
-
[
|
|
198
|
+
o("div", Re, [
|
|
199
|
+
o("span", null, ie(e.title), 1),
|
|
200
|
+
K(o("img", {
|
|
201
|
+
style: D(E.value),
|
|
202
|
+
src: c.thumb,
|
|
203
|
+
alt: ""
|
|
204
|
+
}, null, 12, Ye), [
|
|
205
|
+
[Q, p.value]
|
|
184
206
|
])
|
|
185
207
|
]),
|
|
186
|
-
|
|
208
|
+
o("div", {
|
|
187
209
|
class: "gc-body",
|
|
188
|
-
style:
|
|
210
|
+
style: D(s.value)
|
|
189
211
|
}, [
|
|
190
|
-
|
|
191
|
-
|
|
212
|
+
o("div", He, [
|
|
213
|
+
A(ve)
|
|
192
214
|
]),
|
|
193
|
-
|
|
194
|
-
style:
|
|
215
|
+
K(o("img", {
|
|
216
|
+
style: D(s.value),
|
|
195
217
|
class: "gc-picture",
|
|
196
|
-
src:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}, null, 12,
|
|
201
|
-
[
|
|
218
|
+
src: c.image,
|
|
219
|
+
onClick: _[0] || (_[0] = //@ts-ignore
|
|
220
|
+
(...g) => v(d).clickEvent && v(d).clickEvent(...g)),
|
|
221
|
+
alt: ""
|
|
222
|
+
}, null, 12, Oe), [
|
|
223
|
+
[Q, p.value]
|
|
202
224
|
]),
|
|
203
|
-
|
|
204
|
-
(
|
|
225
|
+
o("div", je, [
|
|
226
|
+
(z(!0), Y(De, null, $e(v(d).dots.list, (g) => (z(), Y("div", {
|
|
205
227
|
class: "gc-dot",
|
|
206
228
|
key: `${g.key + "-" + g.index}`,
|
|
207
|
-
style:
|
|
208
|
-
|
|
209
|
-
|
|
229
|
+
style: D({
|
|
230
|
+
width: e.dotSize + "px",
|
|
231
|
+
height: e.dotSize + "px",
|
|
232
|
+
borderRadius: e.dotSize + "px",
|
|
233
|
+
top: g.y - (e.dotSize || 1) / 2 - 1 + "px",
|
|
234
|
+
left: g.x - (e.dotSize || 1) / 2 - 1 + "px"
|
|
210
235
|
})
|
|
211
|
-
},
|
|
236
|
+
}, ie(g.index), 5))), 128))
|
|
212
237
|
])
|
|
213
238
|
], 4),
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
width:
|
|
218
|
-
height:
|
|
219
|
-
onClick:
|
|
220
|
-
}, null, 8, ["onClick"]),
|
|
221
|
-
|
|
222
|
-
width:
|
|
223
|
-
height:
|
|
224
|
-
onClick:
|
|
225
|
-
}, null, 8, ["onClick"])
|
|
239
|
+
o("div", Ae, [
|
|
240
|
+
o("div", Ie, [
|
|
241
|
+
A(ge, {
|
|
242
|
+
width: e.iconSize,
|
|
243
|
+
height: e.iconSize,
|
|
244
|
+
onClick: v(d).closeEvent
|
|
245
|
+
}, null, 8, ["width", "height", "onClick"]),
|
|
246
|
+
A(fe, {
|
|
247
|
+
width: e.iconSize,
|
|
248
|
+
height: e.iconSize,
|
|
249
|
+
onClick: v(d).refreshEvent
|
|
250
|
+
}, null, 8, ["width", "height", "onClick"])
|
|
226
251
|
]),
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
252
|
+
o("div", Ve, [
|
|
253
|
+
o("button", {
|
|
254
|
+
class: se(!p.value && "disabled"),
|
|
255
|
+
onClick: _[1] || (_[1] = //@ts-ignore
|
|
256
|
+
(...g) => v(d).confirmEvent && v(d).confirmEvent(...g))
|
|
257
|
+
}, ie(e.buttonText), 3)
|
|
232
258
|
])
|
|
233
259
|
])
|
|
234
|
-
], 6))
|
|
260
|
+
], 6)), [
|
|
261
|
+
[Q, b.value]
|
|
262
|
+
]);
|
|
235
263
|
}
|
|
236
264
|
});
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
265
|
+
le.name = "gocaptcha-click";
|
|
266
|
+
le.install = function(n) {
|
|
267
|
+
n.component("gocaptcha-click", le);
|
|
240
268
|
};
|
|
241
|
-
const
|
|
269
|
+
const xe = () => ({
|
|
242
270
|
width: 300,
|
|
243
271
|
height: 220,
|
|
244
272
|
thumbWidth: 150,
|
|
@@ -246,664 +274,792 @@ const de = () => ({
|
|
|
246
274
|
verticalPadding: 16,
|
|
247
275
|
horizontalPadding: 12,
|
|
248
276
|
showTheme: !0,
|
|
249
|
-
title: "请拖动滑块完成拼图"
|
|
250
|
-
|
|
277
|
+
title: "请拖动滑块完成拼图",
|
|
278
|
+
iconSize: 22,
|
|
279
|
+
scope: !0
|
|
280
|
+
}), Ne = /* @__PURE__ */ o("path", { d: `M131.6,116.3c0,0-75.6,0-109.7,0c-9.1,0-16.2-7.4-16.2-16.2c0-9.1,7.4-16.2,16.2-16.2c28.7,0,109.7,0,109.7,0
|
|
251
281
|
s-5.4-5.4-30.4-30.7c-6.4-6.4-6.4-16.7,0-23.1s16.7-6.4,23.1,0l58.4,58.4c6.4,6.4,6.4,16.7,0,23.1c0,0-32.9,32.9-57.9,57.9
|
|
252
|
-
c-6.4,6.4-16.7,6.4-23.1,0c-6.4-6.4-6.4-16.7,0-23.1C121.8,126.2,131.6,116.3,131.6,116.3z` }, null, -1),
|
|
253
|
-
|
|
254
|
-
],
|
|
282
|
+
c-6.4,6.4-16.7,6.4-23.1,0c-6.4-6.4-6.4-16.7,0-23.1C121.8,126.2,131.6,116.3,131.6,116.3z` }, null, -1), Ue = [
|
|
283
|
+
Ne
|
|
284
|
+
], ye = /* @__PURE__ */ U({
|
|
255
285
|
__name: "arrows-icon",
|
|
256
286
|
emits: ["click"],
|
|
257
|
-
setup(
|
|
258
|
-
const
|
|
259
|
-
function
|
|
260
|
-
|
|
287
|
+
setup(n, { emit: t }) {
|
|
288
|
+
const a = t;
|
|
289
|
+
function r(i) {
|
|
290
|
+
a("click", i);
|
|
261
291
|
}
|
|
262
|
-
return (
|
|
292
|
+
return (i, m) => (z(), Y("svg", oe({
|
|
263
293
|
xmlns: "http://www.w3.org/2000/svg",
|
|
264
294
|
viewBox: "0 0 200 200",
|
|
265
295
|
width: "20",
|
|
266
296
|
height: "20"
|
|
267
|
-
},
|
|
297
|
+
}, i.$attrs, { onClick: r }), Ue, 16));
|
|
268
298
|
}
|
|
299
|
+
}), qe = () => ({
|
|
300
|
+
thumbX: 0,
|
|
301
|
+
thumbY: 0,
|
|
302
|
+
thumbWidth: 0,
|
|
303
|
+
thumbHeight: 0,
|
|
304
|
+
image: "",
|
|
305
|
+
thumb: ""
|
|
269
306
|
});
|
|
270
|
-
function
|
|
271
|
-
const d =
|
|
272
|
-
|
|
307
|
+
function Ge(n, t, a, r, i, m, c, u, e) {
|
|
308
|
+
const d = B({ dragLeft: 0, thumbLeft: n.thumbX || 0, isFreeze: !1 });
|
|
309
|
+
F(() => n, (g, S) => {
|
|
310
|
+
d.isFreeze || (d.thumbLeft = g.thumbX || 0);
|
|
311
|
+
}, { deep: !0 });
|
|
312
|
+
const y = (g) => {
|
|
313
|
+
const S = g.touches && g.touches[0], L = c.value.offsetLeft, h = i.value.offsetWidth, f = c.value.offsetWidth, w = h - f, T = m.value.offsetWidth, q = m.value.offsetLeft, te = h - T, G = (h - (T + q)) / w;
|
|
314
|
+
let V = !1, P = null, Z = 0, H = 0;
|
|
315
|
+
S ? Z = S.pageX - L : Z = g.clientX - L;
|
|
316
|
+
const R = (W) => {
|
|
317
|
+
V = !0;
|
|
318
|
+
const J = W.touches && W.touches[0];
|
|
319
|
+
let M = 0;
|
|
320
|
+
J ? M = J.pageX - Z : M = W.clientX - Z;
|
|
321
|
+
let ke = q + M * G;
|
|
322
|
+
if (M >= w) {
|
|
323
|
+
d.dragLeft = w, d.thumbLeft = H = te;
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
if (M <= 0) {
|
|
327
|
+
d.dragLeft = 0, d.thumbLeft = H = q;
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
d.dragLeft = M, d.thumbLeft = H = ke, t.move && t.move(H, n.thumbY || 0), W.cancelBubble = !0, W.preventDefault();
|
|
331
|
+
}, N = (W) => {
|
|
332
|
+
be(u.value, W) && V && (X(), !(H < 0) && (V = !1, t.confirm && t.confirm({ x: parseInt(H.toString()), y: n.thumbY || 0 }, () => {
|
|
333
|
+
l();
|
|
334
|
+
}), W.cancelBubble = !0, W.preventDefault()));
|
|
335
|
+
}, O = (W) => {
|
|
336
|
+
P = W;
|
|
337
|
+
}, j = () => {
|
|
338
|
+
P = null;
|
|
339
|
+
}, ce = (W) => {
|
|
340
|
+
P && (N(P), X());
|
|
341
|
+
}, k = a.scope, $ = k ? r.value : u.value, C = k ? r.value : document.body, X = () => {
|
|
342
|
+
C.removeEventListener("mousemove", R, !1), C.removeEventListener("touchmove", R, { passive: !1 }), $.removeEventListener("mouseup", N, !1), $.removeEventListener("mouseenter", j, !1), $.removeEventListener("mouseleave", O, !1), $.removeEventListener("touchend", N, !1), C.removeEventListener("mouseleave", N, !1), C.removeEventListener("mouseup", ce, !1), d.isFreeze = !1;
|
|
343
|
+
};
|
|
344
|
+
d.isFreeze = !0, C.addEventListener("mousemove", R, !1), C.addEventListener("touchmove", R, { passive: !1 }), $.addEventListener("mouseup", N, !1), $.addEventListener("mouseenter", j, !1), $.addEventListener("mouseleave", O, !1), $.addEventListener("touchend", N, !1), C.addEventListener("mouseleave", N, !1), C.addEventListener("mouseup", ce, !1);
|
|
345
|
+
}, E = (g) => (p(), g.cancelBubble = !0, g.preventDefault(), !1), s = (g) => (b(), g.cancelBubble = !0, g.preventDefault(), !1), p = () => {
|
|
346
|
+
t && t.close && t.close(), l();
|
|
347
|
+
}, b = () => {
|
|
348
|
+
t && t.refresh && t.refresh(), l();
|
|
349
|
+
}, l = () => {
|
|
350
|
+
d.dragLeft = 0, d.thumbLeft = n.thumbX || 0;
|
|
273
351
|
};
|
|
274
352
|
return {
|
|
275
353
|
state: d,
|
|
276
|
-
dragEvent:
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
const G = f.touches && f.touches[0];
|
|
283
|
-
let y = 0;
|
|
284
|
-
if (G ? y = G.pageX - Y : y = f.clientX - Y, y >= p) {
|
|
285
|
-
d.dragLeft = p;
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
if (y <= 0) {
|
|
289
|
-
d.dragLeft = 0;
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
d.dragLeft = y, H = L + y * T, d.thumbLeft = H, n.move && n.move(H, l.thumbY || 0), f.cancelBubble = !0, f.preventDefault();
|
|
293
|
-
}, h = (f) => {
|
|
294
|
-
ue(i.value, f) && k && (k = !1, J(), n.confirm && n.confirm({ x: parseInt(H.toString()), y: l.thumbY || 0 }, () => {
|
|
295
|
-
o();
|
|
296
|
-
}), f.cancelBubble = !0, f.preventDefault());
|
|
297
|
-
}, A = (f) => {
|
|
298
|
-
S = f;
|
|
299
|
-
}, W = () => {
|
|
300
|
-
S = null;
|
|
301
|
-
}, q = (f) => {
|
|
302
|
-
S && (h(S), J());
|
|
303
|
-
}, J = () => {
|
|
304
|
-
i.value.removeEventListener("mousemove", B, !1), i.value.removeEventListener("touchmove", B, { passive: !1 }), i.value.removeEventListener("mouseup", h, !1), i.value.removeEventListener("mouseenter", W, !1), i.value.removeEventListener("mouseleave", A, !1), i.value.removeEventListener("touchend", h, !1), document.body.removeEventListener("mouseleave", h, !1), document.body.removeEventListener("mouseup", q, !1);
|
|
305
|
-
};
|
|
306
|
-
i.value.addEventListener("mousemove", B, !1), i.value.addEventListener("touchmove", B, { passive: !1 }), i.value.addEventListener("mouseup", h, !1), i.value.addEventListener("mouseenter", W, !1), i.value.addEventListener("mouseleave", A, !1), i.value.addEventListener("touchend", h, !1), document.body.addEventListener("mouseleave", h, !1), document.body.addEventListener("mouseup", q, !1);
|
|
354
|
+
dragEvent: y,
|
|
355
|
+
closeEvent: E,
|
|
356
|
+
refreshEvent: s,
|
|
357
|
+
resetData: l,
|
|
358
|
+
clearData: () => {
|
|
359
|
+
e && e(), l();
|
|
307
360
|
},
|
|
308
|
-
|
|
309
|
-
|
|
361
|
+
refresh: b,
|
|
362
|
+
close: p
|
|
310
363
|
};
|
|
311
364
|
}
|
|
312
|
-
const
|
|
365
|
+
const Je = { class: "gc-header" }, Ke = { class: "gc-icon-block" }, Qe = { class: "gc-loading" }, Ze = ["src"], et = ["src"], tt = { class: "gc-footer" }, nt = /* @__PURE__ */ o("div", { class: "gc-drag-line" }, null, -1), re = /* @__PURE__ */ U({
|
|
313
366
|
__name: "index",
|
|
314
367
|
props: {
|
|
315
|
-
config: { default:
|
|
368
|
+
config: { default: xe },
|
|
316
369
|
events: { default: () => ({}) },
|
|
317
370
|
data: { default: () => ({}) }
|
|
318
371
|
},
|
|
319
|
-
setup(
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
})
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
372
|
+
setup(n, { expose: t }) {
|
|
373
|
+
const a = n, { data: r, events: i, config: m } = a, c = B({ ...qe(), ...I(r) }), u = B({ ...I(i) }), e = B({ ...xe(), ...I(m) });
|
|
374
|
+
F(() => a.data, (f, w) => {
|
|
375
|
+
Object.assign(c, f);
|
|
376
|
+
}, { deep: !0 }), F(() => a.events, (f, w) => {
|
|
377
|
+
Object.assign(u, f);
|
|
378
|
+
}, { deep: !0 }), F(() => a.config, (f, w) => {
|
|
379
|
+
Object.assign(e, f);
|
|
380
|
+
}, { deep: !0 });
|
|
381
|
+
const d = ee(null), y = ee(null), E = ee(null), s = ee(null), p = ee(null), b = Ge(
|
|
382
|
+
c,
|
|
383
|
+
u,
|
|
384
|
+
e,
|
|
385
|
+
d,
|
|
386
|
+
E,
|
|
387
|
+
p,
|
|
388
|
+
s,
|
|
389
|
+
y,
|
|
390
|
+
() => {
|
|
391
|
+
c.thumb = "", c.image = "", c.thumbX = 0, c.thumbY = 0, c.thumbWidth = 0, c.thumbHeight = 0;
|
|
392
|
+
}
|
|
393
|
+
), l = x(() => {
|
|
394
|
+
const f = e.horizontalPadding || 0, w = e.verticalPadding || 0;
|
|
395
|
+
return {
|
|
396
|
+
width: (e.width || 0) + f * 2 + (e.showTheme ? 2 : 0) + "px",
|
|
397
|
+
paddingLeft: f + "px",
|
|
398
|
+
paddingRight: f + "px",
|
|
399
|
+
paddingTop: w + "px",
|
|
400
|
+
paddingBottom: w + "px"
|
|
328
401
|
};
|
|
329
|
-
})
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
402
|
+
}), _ = x(() => ({
|
|
403
|
+
width: c.thumbWidth + "px",
|
|
404
|
+
height: c.thumbHeight + "px",
|
|
405
|
+
top: c.thumbY + "px",
|
|
406
|
+
left: b.state.thumbLeft + "px"
|
|
407
|
+
})), g = x(() => ({
|
|
408
|
+
width: e.width + "px",
|
|
409
|
+
height: e.height + "px"
|
|
410
|
+
})), S = x(() => c.image != ""), L = x(() => c.thumb != ""), h = x(() => (e.width || 0) > 0 || (e.height || 0) > 0);
|
|
411
|
+
return pe(async () => {
|
|
412
|
+
await _e(), s.value && s.value.addEventListener("dragstart", (f) => f.preventDefault());
|
|
413
|
+
}), t({
|
|
414
|
+
reset: b.resetData,
|
|
415
|
+
clear: b.clearData,
|
|
416
|
+
refresh: b.refresh,
|
|
417
|
+
close: b.close
|
|
418
|
+
}), (f, w) => K((z(), Y("div", {
|
|
419
|
+
class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
|
|
420
|
+
style: D(l.value),
|
|
421
|
+
ref_key: "rootRef",
|
|
422
|
+
ref: d
|
|
350
423
|
}, [
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
width:
|
|
356
|
-
height:
|
|
357
|
-
onClick:
|
|
358
|
-
}, null, 8, ["onClick"]),
|
|
359
|
-
|
|
360
|
-
width:
|
|
361
|
-
height:
|
|
362
|
-
onClick:
|
|
363
|
-
}, null, 8, ["onClick"])
|
|
424
|
+
o("div", Je, [
|
|
425
|
+
o("span", null, ie(e.title), 1),
|
|
426
|
+
o("div", Ke, [
|
|
427
|
+
A(ge, {
|
|
428
|
+
width: e.iconSize,
|
|
429
|
+
height: e.iconSize,
|
|
430
|
+
onClick: v(b).closeEvent
|
|
431
|
+
}, null, 8, ["width", "height", "onClick"]),
|
|
432
|
+
A(fe, {
|
|
433
|
+
width: e.iconSize,
|
|
434
|
+
height: e.iconSize,
|
|
435
|
+
onClick: v(b).refreshEvent
|
|
436
|
+
}, null, 8, ["width", "height", "onClick"])
|
|
364
437
|
])
|
|
365
438
|
]),
|
|
366
|
-
|
|
439
|
+
o("div", {
|
|
367
440
|
class: "gc-body",
|
|
368
441
|
ref_key: "containerRef",
|
|
369
|
-
ref:
|
|
370
|
-
style:
|
|
442
|
+
ref: E,
|
|
443
|
+
style: D(g.value)
|
|
371
444
|
}, [
|
|
372
|
-
|
|
373
|
-
|
|
445
|
+
o("div", Qe, [
|
|
446
|
+
A(ve)
|
|
374
447
|
]),
|
|
375
|
-
|
|
448
|
+
K(o("img", {
|
|
376
449
|
class: "gc-picture",
|
|
377
|
-
style:
|
|
378
|
-
src:
|
|
379
|
-
alt: "
|
|
380
|
-
}, null, 12,
|
|
381
|
-
[
|
|
450
|
+
style: D(g.value),
|
|
451
|
+
src: c.image,
|
|
452
|
+
alt: ""
|
|
453
|
+
}, null, 12, Ze), [
|
|
454
|
+
[Q, S.value]
|
|
382
455
|
]),
|
|
383
|
-
|
|
456
|
+
o("div", {
|
|
384
457
|
class: "gc-tile",
|
|
385
458
|
ref_key: "tileRef",
|
|
386
|
-
ref:
|
|
387
|
-
style: _
|
|
459
|
+
ref: p,
|
|
460
|
+
style: D(_.value)
|
|
388
461
|
}, [
|
|
389
|
-
|
|
390
|
-
src:
|
|
391
|
-
alt: "
|
|
392
|
-
}, null, 8,
|
|
393
|
-
[
|
|
462
|
+
K(o("img", {
|
|
463
|
+
src: c.thumb,
|
|
464
|
+
alt: ""
|
|
465
|
+
}, null, 8, et), [
|
|
466
|
+
[Q, L.value]
|
|
394
467
|
])
|
|
395
468
|
], 4)
|
|
396
469
|
], 4),
|
|
397
|
-
|
|
398
|
-
|
|
470
|
+
o("div", tt, [
|
|
471
|
+
o("div", {
|
|
399
472
|
class: "gc-drag-slide-bar",
|
|
400
473
|
ref_key: "dragBarRef",
|
|
401
|
-
ref:
|
|
474
|
+
ref: y
|
|
402
475
|
}, [
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
class: "gc-drag-block",
|
|
476
|
+
nt,
|
|
477
|
+
o("div", {
|
|
478
|
+
class: se(["gc-drag-block", !S.value && "disabled"]),
|
|
406
479
|
ref_key: "dragBlockRef",
|
|
407
|
-
ref:
|
|
408
|
-
onMousedown:
|
|
409
|
-
(
|
|
410
|
-
style:
|
|
480
|
+
ref: s,
|
|
481
|
+
onMousedown: w[1] || (w[1] = //@ts-ignore
|
|
482
|
+
(...T) => v(b).dragEvent && v(b).dragEvent(...T)),
|
|
483
|
+
style: D({ left: v(b).state.dragLeft + "px" })
|
|
411
484
|
}, [
|
|
412
|
-
|
|
413
|
-
class: "drag-block-inline",
|
|
414
|
-
onTouchstart:
|
|
415
|
-
(
|
|
485
|
+
o("div", {
|
|
486
|
+
class: "gc-drag-block-inline",
|
|
487
|
+
onTouchstart: w[0] || (w[0] = //@ts-ignore
|
|
488
|
+
(...T) => v(b).dragEvent && v(b).dragEvent(...T))
|
|
416
489
|
}, [
|
|
417
|
-
|
|
490
|
+
A(ye)
|
|
418
491
|
], 32)
|
|
419
|
-
],
|
|
492
|
+
], 38)
|
|
420
493
|
], 512)
|
|
421
494
|
])
|
|
422
|
-
], 6))
|
|
495
|
+
], 6)), [
|
|
496
|
+
[Q, h.value]
|
|
497
|
+
]);
|
|
423
498
|
}
|
|
424
499
|
});
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
500
|
+
re.name = "gocaptcha-slide";
|
|
501
|
+
re.install = function(n) {
|
|
502
|
+
n.component("gocaptcha-slide", re);
|
|
428
503
|
};
|
|
429
|
-
const
|
|
504
|
+
const Ee = () => ({
|
|
430
505
|
width: 300,
|
|
431
506
|
height: 220,
|
|
432
507
|
verticalPadding: 16,
|
|
433
508
|
horizontalPadding: 12,
|
|
434
509
|
showTheme: !0,
|
|
435
|
-
title: "请拖拽贴图完成拼图"
|
|
510
|
+
title: "请拖拽贴图完成拼图",
|
|
511
|
+
iconSize: 22,
|
|
512
|
+
scope: !0
|
|
513
|
+
}), st = () => ({
|
|
514
|
+
thumbX: 0,
|
|
515
|
+
thumbY: 0,
|
|
516
|
+
thumbWidth: 0,
|
|
517
|
+
thumbHeight: 0,
|
|
518
|
+
image: "",
|
|
519
|
+
thumb: ""
|
|
436
520
|
});
|
|
437
|
-
function
|
|
438
|
-
const
|
|
439
|
-
|
|
521
|
+
function ct(n, t, a, r, i, m, c) {
|
|
522
|
+
const u = B({ x: n.thumbX || 0, y: n.thumbY || 0, isFreeze: !1 });
|
|
523
|
+
F(() => n, (l, _) => {
|
|
524
|
+
u.isFreeze || (u.x = l.thumbX || 0, u.y = l.thumbY || 0);
|
|
525
|
+
}, { deep: !0 });
|
|
526
|
+
const e = (l) => {
|
|
527
|
+
const _ = l.touches && l.touches[0], g = m.value.offsetLeft, S = m.value.offsetTop, L = i.value.offsetWidth, h = i.value.offsetHeight, f = m.value.offsetWidth, w = m.value.offsetHeight, T = L - f, q = h - w;
|
|
528
|
+
let te = !1, ne = null, G = 0, V = 0, P = 0, Z = 0;
|
|
529
|
+
_ ? (G = _.pageX - g, V = _.pageY - S) : (G = l.clientX - g, V = l.clientY - S);
|
|
530
|
+
const H = (X) => {
|
|
531
|
+
te = !0;
|
|
532
|
+
const W = X.touches && X.touches[0];
|
|
533
|
+
let J = 0, M = 0;
|
|
534
|
+
W ? (J = W.pageX - G, M = W.pageY - V) : (J = X.clientX - G, M = X.clientY - V), J <= 0 && (J = 0), M <= 0 && (M = 0), J >= T && (J = T), M >= q && (M = q), u.x = J, u.y = M, P = J, Z = M, t.move && t.move(J, M), X.cancelBubble = !0, X.preventDefault();
|
|
535
|
+
}, R = (X) => {
|
|
536
|
+
be(i.value, X) && te && (te = !1, C(), !(P < 0 || Z < 0) && (t.confirm && t.confirm({ x: P, y: Z }, () => {
|
|
537
|
+
p();
|
|
538
|
+
}), X.cancelBubble = !0, X.preventDefault()));
|
|
539
|
+
}, N = (X) => {
|
|
540
|
+
ne = X;
|
|
541
|
+
}, O = () => {
|
|
542
|
+
ne = null;
|
|
543
|
+
}, j = (X) => {
|
|
544
|
+
ne && (R(ne), C());
|
|
545
|
+
}, ce = a.scope, k = ce ? r.value : i.value, $ = ce ? r.value : document.body, C = () => {
|
|
546
|
+
$.removeEventListener("mousemove", H, !1), $.removeEventListener("touchmove", H, { passive: !1 }), k.removeEventListener("mouseup", R, !1), k.removeEventListener("mouseenter", O, !1), k.removeEventListener("mouseleave", N, !1), k.removeEventListener("touchend", R, !1), $.removeEventListener("mouseleave", R, !1), $.removeEventListener("mouseup", j, !1), u.isFreeze = !1;
|
|
547
|
+
};
|
|
548
|
+
u.isFreeze = !0, $.addEventListener("mousemove", H, !1), $.addEventListener("touchmove", H, { passive: !1 }), k.addEventListener("mouseup", R, !1), k.addEventListener("mouseenter", O, !1), k.addEventListener("mouseleave", N, !1), k.addEventListener("touchend", R, !1), $.addEventListener("mouseleave", R, !1), $.addEventListener("mouseup", j, !1);
|
|
549
|
+
}, d = (l) => (E(), l.cancelBubble = !0, l.preventDefault(), !1), y = (l) => (s(), l.cancelBubble = !0, l.preventDefault(), !1), E = () => {
|
|
550
|
+
t && t.close && t.close(), p();
|
|
551
|
+
}, s = () => {
|
|
552
|
+
t && t.refresh && t.refresh(), p();
|
|
553
|
+
}, p = () => {
|
|
554
|
+
u.x = n.thumbX || 0, u.y = n.thumbY || 0;
|
|
440
555
|
};
|
|
441
556
|
return {
|
|
442
|
-
state:
|
|
443
|
-
dragEvent:
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
const G = f.touches && f.touches[0];
|
|
450
|
-
let y = 0, F = 0;
|
|
451
|
-
G ? (y = G.pageX - k, F = G.pageY - S) : (y = f.clientX - k, F = f.clientY - S), y <= 0 && (y = 0), F <= 0 && (F = 0), y >= L && (y = L), F >= $ && (F = $), e.x = y, e.y = F, Y = y, H = F, n.move && n.move(y, F), f.cancelBubble = !0, f.preventDefault();
|
|
452
|
-
}, h = (f) => {
|
|
453
|
-
ue(t.value, f) && M && (M = !1, J(), n.confirm && n.confirm({ x: Y, y: H }, () => {
|
|
454
|
-
i();
|
|
455
|
-
}), f.cancelBubble = !0, f.preventDefault());
|
|
456
|
-
}, A = (f) => {
|
|
457
|
-
T = f;
|
|
458
|
-
}, W = () => {
|
|
459
|
-
T = null;
|
|
460
|
-
}, q = (f) => {
|
|
461
|
-
T && (h(T), J());
|
|
462
|
-
}, J = () => {
|
|
463
|
-
t.value.removeEventListener("mousemove", B, !1), t.value.removeEventListener("touchmove", B, { passive: !1 }), t.value.removeEventListener("mouseup", h, !1), t.value.removeEventListener("mouseenter", W, !1), t.value.removeEventListener("mouseleave", A, !1), t.value.removeEventListener("touchend", h, !1), document.body.removeEventListener("mouseleave", h, !1), document.body.removeEventListener("mouseup", q, !1);
|
|
464
|
-
};
|
|
465
|
-
t.value.addEventListener("mousemove", B, !1), t.value.addEventListener("touchmove", B, { passive: !1 }), t.value.addEventListener("mouseup", h, !1), t.value.addEventListener("mouseenter", W, !1), t.value.addEventListener("mouseleave", A, !1), t.value.addEventListener("touchend", h, !1), document.body.addEventListener("mouseleave", h, !1), document.body.addEventListener("mouseup", q, !1);
|
|
557
|
+
state: u,
|
|
558
|
+
dragEvent: e,
|
|
559
|
+
closeEvent: d,
|
|
560
|
+
refreshEvent: y,
|
|
561
|
+
resetData: p,
|
|
562
|
+
clearData: () => {
|
|
563
|
+
c && c(), p();
|
|
466
564
|
},
|
|
467
|
-
|
|
468
|
-
|
|
565
|
+
refresh: s,
|
|
566
|
+
close: E
|
|
469
567
|
};
|
|
470
568
|
}
|
|
471
|
-
const
|
|
569
|
+
const ot = { class: "gc-header gc-header2" }, it = { class: "gc-loading" }, at = ["src"], lt = ["src"], rt = { class: "gc-footer" }, ut = { class: "gc-icon-block" }, ue = /* @__PURE__ */ U({
|
|
472
570
|
__name: "index",
|
|
473
571
|
props: {
|
|
474
|
-
config: { default:
|
|
572
|
+
config: { default: Ee },
|
|
475
573
|
events: { default: () => ({}) },
|
|
476
574
|
data: { default: () => ({}) }
|
|
477
575
|
},
|
|
478
|
-
setup(
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
})
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
576
|
+
setup(n, { expose: t }) {
|
|
577
|
+
const a = n, { data: r, events: i, config: m } = a, c = B({ ...st(), ...I(r) }), u = B({ ...I(i) }), e = B({ ...Ee(), ...I(m) });
|
|
578
|
+
F(() => a.data, (L, h) => {
|
|
579
|
+
Object.assign(c, L);
|
|
580
|
+
}, { deep: !0 }), F(() => a.events, (L, h) => {
|
|
581
|
+
Object.assign(u, L);
|
|
582
|
+
}, { deep: !0 }), F(() => a.config, (L, h) => {
|
|
583
|
+
Object.assign(e, L);
|
|
584
|
+
}, { deep: !0 });
|
|
585
|
+
const d = ee(null), y = ee(null), E = ee(null), s = ct(
|
|
586
|
+
c,
|
|
587
|
+
u,
|
|
588
|
+
e,
|
|
589
|
+
d,
|
|
590
|
+
y,
|
|
591
|
+
E,
|
|
592
|
+
() => {
|
|
593
|
+
c.thumb = "", c.image = "", c.thumbX = 0, c.thumbY = 0, c.thumbWidth = 0, c.thumbHeight = 0;
|
|
594
|
+
}
|
|
595
|
+
), p = x(() => {
|
|
596
|
+
const L = e.horizontalPadding || 0, h = e.verticalPadding || 0;
|
|
597
|
+
return {
|
|
598
|
+
width: (e.width || 0) + L * 2 + (e.showTheme ? 2 : 0) + "px",
|
|
599
|
+
paddingLeft: L + "px",
|
|
600
|
+
paddingRight: L + "px",
|
|
601
|
+
paddingTop: h + "px",
|
|
602
|
+
paddingBottom: h + "px"
|
|
487
603
|
};
|
|
488
|
-
})
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
class: j(`go-captcha gc-wrapper ${e.value.showTheme ? "gc-theme" : ""}`),
|
|
510
|
-
style: _(r.value)
|
|
604
|
+
}), b = x(() => ({
|
|
605
|
+
width: c.thumbWidth + "px",
|
|
606
|
+
height: c.thumbHeight + "px",
|
|
607
|
+
top: s.state.y + "px",
|
|
608
|
+
left: s.state.x + "px"
|
|
609
|
+
})), l = x(() => ({
|
|
610
|
+
width: e.width + "px",
|
|
611
|
+
height: e.height + "px"
|
|
612
|
+
})), _ = x(() => c.image != ""), g = x(() => c.thumb != ""), S = x(() => (e.width || 0) > 0 || (e.height || 0) > 0);
|
|
613
|
+
return pe(async () => {
|
|
614
|
+
await _e(), E.value && E.value.addEventListener("dragstart", (L) => L.preventDefault());
|
|
615
|
+
}), t({
|
|
616
|
+
reset: s.resetData,
|
|
617
|
+
clear: s.clearData,
|
|
618
|
+
refresh: s.refresh,
|
|
619
|
+
close: s.close
|
|
620
|
+
}), (L, h) => K((z(), Y("div", {
|
|
621
|
+
class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
|
|
622
|
+
style: D(p.value),
|
|
623
|
+
ref_key: "rootRef",
|
|
624
|
+
ref: d
|
|
511
625
|
}, [
|
|
512
|
-
|
|
513
|
-
|
|
626
|
+
o("div", ot, [
|
|
627
|
+
o("span", null, ie(e.title), 1)
|
|
514
628
|
]),
|
|
515
|
-
|
|
629
|
+
o("div", {
|
|
516
630
|
class: "gc-body",
|
|
517
631
|
ref_key: "containerRef",
|
|
518
|
-
ref:
|
|
519
|
-
style:
|
|
632
|
+
ref: y,
|
|
633
|
+
style: D(l.value)
|
|
520
634
|
}, [
|
|
521
|
-
|
|
522
|
-
|
|
635
|
+
o("div", it, [
|
|
636
|
+
A(ve)
|
|
523
637
|
]),
|
|
524
|
-
|
|
638
|
+
K(o("img", {
|
|
525
639
|
class: "gc-picture",
|
|
526
|
-
style:
|
|
527
|
-
src:
|
|
528
|
-
alt: "
|
|
529
|
-
}, null, 12,
|
|
530
|
-
[
|
|
640
|
+
style: D(l.value),
|
|
641
|
+
src: c.image,
|
|
642
|
+
alt: ""
|
|
643
|
+
}, null, 12, at), [
|
|
644
|
+
[Q, _.value]
|
|
531
645
|
]),
|
|
532
|
-
|
|
646
|
+
o("div", {
|
|
533
647
|
class: "gc-tile",
|
|
534
648
|
ref_key: "tileRef",
|
|
535
|
-
ref:
|
|
536
|
-
style:
|
|
537
|
-
onMousedown:
|
|
538
|
-
(...
|
|
539
|
-
onTouchstart:
|
|
540
|
-
(...
|
|
649
|
+
ref: E,
|
|
650
|
+
style: D(b.value),
|
|
651
|
+
onMousedown: h[0] || (h[0] = //@ts-ignore
|
|
652
|
+
(...f) => v(s).dragEvent && v(s).dragEvent(...f)),
|
|
653
|
+
onTouchstart: h[1] || (h[1] = //@ts-ignore
|
|
654
|
+
(...f) => v(s).dragEvent && v(s).dragEvent(...f))
|
|
541
655
|
}, [
|
|
542
|
-
|
|
543
|
-
src:
|
|
544
|
-
alt: "
|
|
545
|
-
}, null, 8,
|
|
546
|
-
[
|
|
656
|
+
K(o("img", {
|
|
657
|
+
src: c.thumb,
|
|
658
|
+
alt: ""
|
|
659
|
+
}, null, 8, lt), [
|
|
660
|
+
[Q, g.value]
|
|
547
661
|
])
|
|
548
662
|
], 36)
|
|
549
663
|
], 4),
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
width:
|
|
554
|
-
height:
|
|
555
|
-
onClick:
|
|
556
|
-
}, null, 8, ["onClick"]),
|
|
557
|
-
|
|
558
|
-
width:
|
|
559
|
-
height:
|
|
560
|
-
onClick:
|
|
561
|
-
}, null, 8, ["onClick"])
|
|
664
|
+
o("div", rt, [
|
|
665
|
+
o("div", ut, [
|
|
666
|
+
A(ge, {
|
|
667
|
+
width: e.iconSize,
|
|
668
|
+
height: e.iconSize,
|
|
669
|
+
onClick: v(s).closeEvent
|
|
670
|
+
}, null, 8, ["width", "height", "onClick"]),
|
|
671
|
+
A(fe, {
|
|
672
|
+
width: e.iconSize,
|
|
673
|
+
height: e.iconSize,
|
|
674
|
+
onClick: v(s).refreshEvent
|
|
675
|
+
}, null, 8, ["width", "height", "onClick"])
|
|
562
676
|
])
|
|
563
677
|
])
|
|
564
|
-
], 6))
|
|
678
|
+
], 6)), [
|
|
679
|
+
[Q, S.value]
|
|
680
|
+
]);
|
|
565
681
|
}
|
|
566
682
|
});
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
683
|
+
ue.name = "gocaptcha-slide-region";
|
|
684
|
+
ue.install = function(n) {
|
|
685
|
+
n.component("gocaptcha-slide-region", ue);
|
|
570
686
|
};
|
|
571
|
-
const
|
|
687
|
+
const me = () => ({
|
|
572
688
|
width: 300,
|
|
573
689
|
height: 220,
|
|
574
690
|
size: 220,
|
|
575
691
|
verticalPadding: 16,
|
|
576
692
|
horizontalPadding: 12,
|
|
577
693
|
showTheme: !0,
|
|
578
|
-
title: "请拖动滑块完成拼图"
|
|
694
|
+
title: "请拖动滑块完成拼图",
|
|
695
|
+
iconSize: 22,
|
|
696
|
+
scope: !0
|
|
697
|
+
}), dt = () => ({
|
|
698
|
+
angle: 0,
|
|
699
|
+
image: "",
|
|
700
|
+
thumb: ""
|
|
579
701
|
});
|
|
580
|
-
function
|
|
581
|
-
const
|
|
582
|
-
|
|
702
|
+
function ht(n, t, a, r, i, m, c) {
|
|
703
|
+
const u = B({ dragLeft: 0, thumbAngle: n.angle || 0, isFreeze: !1 });
|
|
704
|
+
F(() => n, (l, _) => {
|
|
705
|
+
u.isFreeze || (u.thumbAngle = l.angle || 0);
|
|
706
|
+
}, { deep: !0 });
|
|
707
|
+
const e = (l) => {
|
|
708
|
+
const _ = l.touches && l.touches[0], g = i.value.offsetLeft, S = m.value.offsetWidth, L = i.value.offsetWidth, h = S - L, f = 360, w = (f - n.angle) / h;
|
|
709
|
+
let T = 0, q = !1, te = null, ne = 0, G = 0;
|
|
710
|
+
_ ? ne = _.pageX - g : ne = l.clientX - g;
|
|
711
|
+
const V = (k) => {
|
|
712
|
+
q = !0;
|
|
713
|
+
const $ = k.touches && k.touches[0];
|
|
714
|
+
let C = 0;
|
|
715
|
+
if ($ ? C = $.pageX - ne : C = k.clientX - ne, T = n.angle + C * w, C >= h) {
|
|
716
|
+
u.dragLeft = h, u.thumbAngle = G = f;
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
719
|
+
if (C <= 0) {
|
|
720
|
+
u.dragLeft = 0, u.thumbAngle = G = n.angle;
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
u.dragLeft = C, u.thumbAngle = G = T, t.rotate && t.rotate(T), k.cancelBubble = !0, k.preventDefault();
|
|
724
|
+
}, P = (k) => {
|
|
725
|
+
be(m.value, k) && q && (ce(), !(G < 0) && (q = !1, t.confirm && t.confirm(parseInt(G.toString()), () => {
|
|
726
|
+
p();
|
|
727
|
+
}), k.cancelBubble = !0, k.preventDefault()));
|
|
728
|
+
}, Z = (k) => {
|
|
729
|
+
te = k;
|
|
730
|
+
}, H = () => {
|
|
731
|
+
te = null;
|
|
732
|
+
}, R = (k) => {
|
|
733
|
+
te && (P(te), ce());
|
|
734
|
+
}, N = a.scope, O = N ? r.value : m.value, j = N ? r.value : document.body, ce = () => {
|
|
735
|
+
j.removeEventListener("mousemove", V, !1), j.removeEventListener("touchmove", V, { passive: !1 }), O.removeEventListener("mouseup", P, !1), O.removeEventListener("mouseenter", H, !1), O.removeEventListener("mouseleave", Z, !1), O.removeEventListener("touchend", P, !1), j.removeEventListener("mouseleave", P, !1), j.removeEventListener("mouseup", R, !1), u.isFreeze = !1;
|
|
736
|
+
};
|
|
737
|
+
u.isFreeze = !0, j.addEventListener("mousemove", V, !1), j.addEventListener("touchmove", V, { passive: !1 }), O.addEventListener("mouseup", P, !1), O.addEventListener("mouseenter", H, !1), O.addEventListener("mouseleave", Z, !1), O.addEventListener("touchend", P, !1), j.addEventListener("mouseleave", P, !1), j.addEventListener("mouseup", R, !1);
|
|
738
|
+
}, d = (l) => (E(), l.cancelBubble = !0, l.preventDefault(), !1), y = (l) => (s(), l.cancelBubble = !0, l.preventDefault(), !1), E = () => {
|
|
739
|
+
t && t.close && t.close(), p();
|
|
740
|
+
}, s = () => {
|
|
741
|
+
t && t.refresh && t.refresh(), p();
|
|
742
|
+
}, p = () => {
|
|
743
|
+
u.dragLeft = 0, u.thumbAngle = n.angle;
|
|
583
744
|
};
|
|
584
745
|
return {
|
|
585
|
-
state:
|
|
586
|
-
dragEvent:
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
const A = h.touches && h.touches[0];
|
|
593
|
-
let W = 0;
|
|
594
|
-
if (A ? W = A.pageX - M : W = h.clientX - M, W >= b) {
|
|
595
|
-
e.dragLeft = b;
|
|
596
|
-
return;
|
|
597
|
-
}
|
|
598
|
-
if (W <= 0) {
|
|
599
|
-
e.dragLeft = 0;
|
|
600
|
-
return;
|
|
601
|
-
}
|
|
602
|
-
e.dragLeft = W, p = W * g, e.thumbAngle = p, n.rotate && n.rotate(p), h.cancelBubble = !0, h.preventDefault();
|
|
603
|
-
}, k = (h) => {
|
|
604
|
-
ue(s.value, h) && L && (B(), L = !1, n.confirm && n.confirm(parseInt(p.toString()), () => {
|
|
605
|
-
i();
|
|
606
|
-
}), h.cancelBubble = !0, h.preventDefault());
|
|
607
|
-
}, S = (h) => {
|
|
608
|
-
$ = h;
|
|
609
|
-
}, Y = () => {
|
|
610
|
-
$ = null;
|
|
611
|
-
}, H = (h) => {
|
|
612
|
-
$ && (k($), B());
|
|
613
|
-
}, B = () => {
|
|
614
|
-
s.value.removeEventListener("mousemove", T, !1), s.value.removeEventListener("touchmove", T, { passive: !1 }), s.value.removeEventListener("mouseup", k, !1), s.value.removeEventListener("mouseenter", Y, !1), s.value.removeEventListener("mouseleave", S, !1), s.value.removeEventListener("touchend", k, !1), document.body.removeEventListener("mouseleave", k, !1), document.body.removeEventListener("mouseup", H, !1);
|
|
615
|
-
};
|
|
616
|
-
s.value.addEventListener("mousemove", T, !1), s.value.addEventListener("touchmove", T, { passive: !1 }), s.value.addEventListener("mouseup", k, !1), s.value.addEventListener("mouseenter", Y, !1), s.value.addEventListener("mouseleave", S, !1), s.value.addEventListener("touchend", k, !1), document.body.addEventListener("mouseleave", k, !1), document.body.addEventListener("mouseup", H, !1);
|
|
746
|
+
state: u,
|
|
747
|
+
dragEvent: e,
|
|
748
|
+
closeEvent: d,
|
|
749
|
+
refreshEvent: y,
|
|
750
|
+
resetData: p,
|
|
751
|
+
clearData: () => {
|
|
752
|
+
c && c(), p();
|
|
617
753
|
},
|
|
618
|
-
|
|
619
|
-
|
|
754
|
+
refresh: s,
|
|
755
|
+
close: E
|
|
620
756
|
};
|
|
621
757
|
}
|
|
622
|
-
const
|
|
758
|
+
const gt = { class: "gc-header" }, ft = { class: "gc-icon-block" }, vt = { class: "gc-loading" }, mt = ["src"], pt = /* @__PURE__ */ o("div", { class: "gc-round" }, null, -1), _t = { class: "gc-thumb gc-rotate-thumb" }, bt = ["src"], wt = { class: "gc-footer" }, xt = /* @__PURE__ */ o("div", { class: "gc-drag-line" }, null, -1), de = /* @__PURE__ */ U({
|
|
623
759
|
__name: "index",
|
|
624
760
|
props: {
|
|
625
|
-
config: { default:
|
|
761
|
+
config: { default: me },
|
|
626
762
|
events: { default: () => ({}) },
|
|
627
763
|
data: { default: () => ({}) }
|
|
628
764
|
},
|
|
629
|
-
setup(
|
|
630
|
-
const
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
})
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
765
|
+
setup(n, { expose: t }) {
|
|
766
|
+
const a = n, { data: r, events: i, config: m } = a, c = B({ ...dt(), ...I(r) }), u = B({ ...I(i) }), e = B({ ...me(), ...I(m) });
|
|
767
|
+
F(() => a.data, (h, f) => {
|
|
768
|
+
Object.assign(c, h);
|
|
769
|
+
}, { deep: !0 }), F(() => a.events, (h, f) => {
|
|
770
|
+
Object.assign(u, h);
|
|
771
|
+
}, { deep: !0 }), F(() => a.config, (h, f) => {
|
|
772
|
+
Object.assign(e, h);
|
|
773
|
+
}, { deep: !0 });
|
|
774
|
+
const d = ee(null), y = ee(null), E = ee(null), s = ht(
|
|
775
|
+
c,
|
|
776
|
+
u,
|
|
777
|
+
e,
|
|
778
|
+
d,
|
|
779
|
+
E,
|
|
780
|
+
y,
|
|
781
|
+
() => {
|
|
782
|
+
c.thumb = "", c.image = "", c.angle = 0;
|
|
783
|
+
}
|
|
784
|
+
), p = x(() => {
|
|
785
|
+
const h = e.horizontalPadding || 0, f = e.verticalPadding || 0;
|
|
642
786
|
return {
|
|
643
|
-
width: (e.
|
|
644
|
-
paddingLeft:
|
|
645
|
-
paddingRight:
|
|
646
|
-
paddingTop:
|
|
647
|
-
paddingBottom:
|
|
787
|
+
width: (e.width || 0) + h * 2 + (e.showTheme ? 2 : 0) + "px",
|
|
788
|
+
paddingLeft: h + "px",
|
|
789
|
+
paddingRight: h + "px",
|
|
790
|
+
paddingTop: f + "px",
|
|
791
|
+
paddingBottom: f + "px"
|
|
648
792
|
};
|
|
649
|
-
}),
|
|
650
|
-
transform: `rotate(${
|
|
651
|
-
})),
|
|
652
|
-
|
|
653
|
-
|
|
793
|
+
}), b = x(() => ({
|
|
794
|
+
transform: `rotate(${s.state.thumbAngle}deg)`
|
|
795
|
+
})), l = x(() => ({
|
|
796
|
+
width: e.width + "px",
|
|
797
|
+
height: e.height + "px"
|
|
798
|
+
})), _ = x(() => {
|
|
799
|
+
const h = (e.size || 0) > 0 ? e.size : me().size;
|
|
654
800
|
return {
|
|
655
|
-
width:
|
|
656
|
-
height:
|
|
801
|
+
width: h + "px",
|
|
802
|
+
height: h + "px"
|
|
657
803
|
};
|
|
658
|
-
});
|
|
659
|
-
return
|
|
660
|
-
await
|
|
661
|
-
}), (
|
|
662
|
-
|
|
663
|
-
|
|
804
|
+
}), g = x(() => c.image != ""), S = x(() => c.thumb != ""), L = x(() => (e.width || 0) > 0 || (e.height || 0) > 0);
|
|
805
|
+
return pe(async () => {
|
|
806
|
+
await _e(), E.value && E.value.addEventListener("dragstart", (h) => h.preventDefault());
|
|
807
|
+
}), t({
|
|
808
|
+
reset: s.resetData,
|
|
809
|
+
clear: s.clearData,
|
|
810
|
+
refresh: s.refresh,
|
|
811
|
+
close: s.close
|
|
812
|
+
}), (h, f) => K((z(), Y("div", {
|
|
813
|
+
class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
|
|
814
|
+
style: D(p.value),
|
|
815
|
+
ref_key: "rootRef",
|
|
816
|
+
ref: d
|
|
664
817
|
}, [
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
width:
|
|
670
|
-
height:
|
|
671
|
-
onClick:
|
|
672
|
-
}, null, 8, ["onClick"]),
|
|
673
|
-
|
|
674
|
-
width:
|
|
675
|
-
height:
|
|
676
|
-
onClick:
|
|
677
|
-
}, null, 8, ["onClick"])
|
|
818
|
+
o("div", gt, [
|
|
819
|
+
o("span", null, ie(e.title), 1),
|
|
820
|
+
o("div", ft, [
|
|
821
|
+
A(ge, {
|
|
822
|
+
width: e.iconSize,
|
|
823
|
+
height: e.iconSize,
|
|
824
|
+
onClick: v(s).closeEvent
|
|
825
|
+
}, null, 8, ["width", "height", "onClick"]),
|
|
826
|
+
A(fe, {
|
|
827
|
+
width: e.iconSize,
|
|
828
|
+
height: e.iconSize,
|
|
829
|
+
onClick: v(s).refreshEvent
|
|
830
|
+
}, null, 8, ["width", "height", "onClick"])
|
|
678
831
|
])
|
|
679
832
|
]),
|
|
680
|
-
|
|
833
|
+
o("div", {
|
|
681
834
|
class: "gc-body gc-rotate-body",
|
|
682
835
|
ref: "containerRef",
|
|
683
|
-
style:
|
|
836
|
+
style: D(l.value)
|
|
684
837
|
}, [
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
c("div", {
|
|
689
|
-
class: "gc-picture gc-rotate-picture",
|
|
690
|
-
style: _(m.value)
|
|
838
|
+
o("div", {
|
|
839
|
+
class: "gc-body-inner",
|
|
840
|
+
style: D(_.value)
|
|
691
841
|
}, [
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
alt: "..."
|
|
695
|
-
}, null, 8, st), [
|
|
696
|
-
[N, a(t).image !== ""]
|
|
842
|
+
o("div", vt, [
|
|
843
|
+
A(ve)
|
|
697
844
|
]),
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
c("div", {
|
|
702
|
-
class: "gc-rotate-thumb-block",
|
|
703
|
-
style: _(u.value)
|
|
845
|
+
o("div", {
|
|
846
|
+
class: "gc-picture gc-rotate-picture",
|
|
847
|
+
style: D(_.value)
|
|
704
848
|
}, [
|
|
705
|
-
|
|
706
|
-
src:
|
|
707
|
-
alt: "
|
|
708
|
-
}, null, 8,
|
|
709
|
-
[
|
|
710
|
-
])
|
|
711
|
-
|
|
712
|
-
|
|
849
|
+
K(o("img", {
|
|
850
|
+
src: c.image,
|
|
851
|
+
alt: ""
|
|
852
|
+
}, null, 8, mt), [
|
|
853
|
+
[Q, g.value]
|
|
854
|
+
]),
|
|
855
|
+
pt
|
|
856
|
+
], 4),
|
|
857
|
+
o("div", _t, [
|
|
858
|
+
o("div", {
|
|
859
|
+
class: "gc-rotate-thumb-block",
|
|
860
|
+
style: D(b.value)
|
|
861
|
+
}, [
|
|
862
|
+
K(o("img", {
|
|
863
|
+
src: c.thumb,
|
|
864
|
+
alt: ""
|
|
865
|
+
}, null, 8, bt), [
|
|
866
|
+
[Q, S.value]
|
|
867
|
+
])
|
|
868
|
+
], 4)
|
|
869
|
+
])
|
|
870
|
+
], 4)
|
|
713
871
|
], 4),
|
|
714
|
-
|
|
715
|
-
|
|
872
|
+
o("div", wt, [
|
|
873
|
+
o("div", {
|
|
716
874
|
class: "gc-drag-slide-bar",
|
|
717
875
|
ref_key: "dragBarRef",
|
|
718
|
-
ref:
|
|
876
|
+
ref: y
|
|
719
877
|
}, [
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
class: "gc-drag-block",
|
|
878
|
+
xt,
|
|
879
|
+
o("div", {
|
|
880
|
+
class: se(["gc-drag-block", !g.value && "disabled"]),
|
|
723
881
|
ref_key: "dragBlockRef",
|
|
724
|
-
ref:
|
|
725
|
-
onMousedown:
|
|
726
|
-
(...
|
|
727
|
-
style:
|
|
882
|
+
ref: E,
|
|
883
|
+
onMousedown: f[1] || (f[1] = //@ts-ignore
|
|
884
|
+
(...w) => v(s).dragEvent && v(s).dragEvent(...w)),
|
|
885
|
+
style: D({ left: v(s).state.dragLeft + "px" })
|
|
728
886
|
}, [
|
|
729
|
-
|
|
730
|
-
class: "drag-block-inline",
|
|
731
|
-
onTouchstart:
|
|
732
|
-
(...
|
|
887
|
+
o("div", {
|
|
888
|
+
class: "gc-drag-block-inline",
|
|
889
|
+
onTouchstart: f[0] || (f[0] = //@ts-ignore
|
|
890
|
+
(...w) => v(s).dragEvent && v(s).dragEvent(...w))
|
|
733
891
|
}, [
|
|
734
|
-
|
|
892
|
+
A(ye)
|
|
735
893
|
], 32)
|
|
736
|
-
],
|
|
894
|
+
], 38)
|
|
737
895
|
], 512)
|
|
738
896
|
])
|
|
739
|
-
], 6))
|
|
897
|
+
], 6)), [
|
|
898
|
+
[Q, L.value]
|
|
899
|
+
]);
|
|
740
900
|
}
|
|
741
901
|
});
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
902
|
+
de.name = "gocaptcha-rotate";
|
|
903
|
+
de.install = function(n) {
|
|
904
|
+
n.component("gocaptcha-rotate", de);
|
|
745
905
|
};
|
|
746
|
-
const
|
|
906
|
+
const Et = /* @__PURE__ */ o("circle", {
|
|
747
907
|
fill: "#3E7CFF",
|
|
748
908
|
cx: "100",
|
|
749
909
|
cy: "100",
|
|
750
910
|
r: "96.3"
|
|
751
|
-
}, null, -1),
|
|
911
|
+
}, null, -1), Lt = /* @__PURE__ */ o("path", {
|
|
752
912
|
fill: "#FFFFFF",
|
|
753
913
|
d: `M140.8,64.4l-39.6-11.9h-2.4L59.2,64.4c-1.6,0.8-2.8,2.4-2.8,4v24.1c0,25.3,15.8,45.9,42.3,54.6
|
|
754
914
|
c0.4,0,0.8,0.4,1.2,0.4c0.4,0,0.8,0,1.2-0.4c26.5-8.7,42.3-28.9,42.3-54.6V68.3C143.5,66.8,142.3,65.2,140.8,64.4z`
|
|
755
|
-
}, null, -1),
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
],
|
|
915
|
+
}, null, -1), yt = [
|
|
916
|
+
Et,
|
|
917
|
+
Lt
|
|
918
|
+
], kt = /* @__PURE__ */ U({
|
|
759
919
|
__name: "btn-default-icon",
|
|
760
920
|
emits: ["click"],
|
|
761
|
-
setup(
|
|
762
|
-
const
|
|
763
|
-
function
|
|
764
|
-
|
|
921
|
+
setup(n, { emit: t }) {
|
|
922
|
+
const a = t;
|
|
923
|
+
function r(i) {
|
|
924
|
+
a("click", i);
|
|
765
925
|
}
|
|
766
|
-
return (
|
|
926
|
+
return (i, m) => (z(), Y("svg", oe({
|
|
767
927
|
xmlns: "http://www.w3.org/2000/svg",
|
|
768
928
|
viewBox: "0 0 200 200",
|
|
769
929
|
width: "20",
|
|
770
930
|
height: "20"
|
|
771
|
-
},
|
|
931
|
+
}, i.$attrs, { onClick: r }), yt, 16));
|
|
772
932
|
}
|
|
773
|
-
}),
|
|
933
|
+
}), Dt = /* @__PURE__ */ o("path", {
|
|
774
934
|
fill: "#FFA000",
|
|
775
935
|
d: `M184,26.6L102.4,2.1h-4.9L16,26.6c-3.3,1.6-5.7,4.9-5.7,8.2v49.8c0,52.2,32.6,94.7,87.3,112.6
|
|
776
936
|
c0.8,0,1.6,0.8,2.4,0.8s1.6,0,2.4-0.8c54.7-18,87.3-59.6,87.3-112.6V34.7C189.8,31.5,187.3,28.2,184,26.6z M107.3,109.1
|
|
777
937
|
c-0.5,5.4-3.9,7.9-7.3,7.9c-2.5,0,0,0,0,0c-3.2-0.6-5.7-2-6.8-7.4l-4.4-50.9c0-5.1,6.2-9.7,11.5-9.7c5.3,0,11,4.7,11,9.9
|
|
778
938
|
L107.3,109.1z M109.3,133.3c0,5.1-4.2,9.3-9.3,9.3c-5.1,0-9.3-4.2-9.3-9.3c0-5.1,4.2-9.3,9.3-9.3C105.1,124,109.3,128.1,109.3,133.3
|
|
779
939
|
z`
|
|
780
|
-
}, null, -1),
|
|
781
|
-
|
|
782
|
-
],
|
|
940
|
+
}, null, -1), $t = [
|
|
941
|
+
Dt
|
|
942
|
+
], zt = /* @__PURE__ */ U({
|
|
783
943
|
__name: "btn-warn-icon",
|
|
784
944
|
emits: ["click"],
|
|
785
|
-
setup(
|
|
786
|
-
const
|
|
787
|
-
function
|
|
788
|
-
|
|
945
|
+
setup(n, { emit: t }) {
|
|
946
|
+
const a = t;
|
|
947
|
+
function r(i) {
|
|
948
|
+
a("click", i);
|
|
789
949
|
}
|
|
790
|
-
return (
|
|
950
|
+
return (i, m) => (z(), Y("svg", oe({
|
|
791
951
|
xmlns: "http://www.w3.org/2000/svg",
|
|
792
952
|
viewBox: "0 0 200 200",
|
|
793
953
|
width: "20",
|
|
794
954
|
height: "20"
|
|
795
|
-
},
|
|
955
|
+
}, i.$attrs, { onClick: r }), $t, 16));
|
|
796
956
|
}
|
|
797
|
-
}),
|
|
957
|
+
}), Ct = /* @__PURE__ */ o("path", {
|
|
798
958
|
fill: "#ED4630",
|
|
799
959
|
d: `M184,26.6L102.4,2.1h-4.9L16,26.6c-3.3,1.6-5.7,4.9-5.7,8.2v49.8c0,52.2,32.6,94.7,87.3,112.6
|
|
800
960
|
c0.8,0,1.6,0.8,2.4,0.8s1.6,0,2.4-0.8c54.7-18,87.3-59.6,87.3-112.6V34.7C189.8,31.5,187.3,28.2,184,26.6z M134.5,123.1
|
|
801
961
|
c3.1,3.1,3.1,8.2,0,11.3c-1.6,1.6-3.6,2.3-5.7,2.3s-4.1-0.8-5.7-2.3L100,111.3l-23.1,23.1c-1.6,1.6-3.6,2.3-5.7,2.3
|
|
802
962
|
c-2,0-4.1-0.8-5.7-2.3c-3.1-3.1-3.1-8.2,0-11.3L88.7,100L65.5,76.9c-3.1-3.1-3.1-8.2,0-11.3c3.1-3.1,8.2-3.1,11.3,0L100,88.7
|
|
803
963
|
l23.1-23.1c3.1-3.1,8.2-3.1,11.3,0c3.1,3.1,3.1,8.2,0,11.3L111.3,100L134.5,123.1z`
|
|
804
|
-
}, null, -1),
|
|
805
|
-
|
|
806
|
-
],
|
|
964
|
+
}, null, -1), St = [
|
|
965
|
+
Ct
|
|
966
|
+
], Bt = /* @__PURE__ */ U({
|
|
807
967
|
__name: "btn-error-icon",
|
|
808
968
|
emits: ["click"],
|
|
809
|
-
setup(
|
|
810
|
-
const
|
|
811
|
-
function
|
|
812
|
-
|
|
969
|
+
setup(n, { emit: t }) {
|
|
970
|
+
const a = t;
|
|
971
|
+
function r(i) {
|
|
972
|
+
a("click", i);
|
|
813
973
|
}
|
|
814
|
-
return (
|
|
974
|
+
return (i, m) => (z(), Y("svg", oe({
|
|
815
975
|
xmlns: "http://www.w3.org/2000/svg",
|
|
816
976
|
viewBox: "0 0 200 200",
|
|
817
977
|
width: "20",
|
|
818
978
|
height: "20"
|
|
819
|
-
},
|
|
979
|
+
}, i.$attrs, { onClick: r }), St, 16));
|
|
820
980
|
}
|
|
821
|
-
}),
|
|
981
|
+
}), Tt = /* @__PURE__ */ o("path", {
|
|
822
982
|
fill: "#5EAA2F",
|
|
823
983
|
d: `M183.3,27.2L102.4,2.9h-4.9L16.7,27.2C13.4,28.8,11,32,11,35.3v49.4c0,51.8,32.4,93.9,86.6,111.7
|
|
824
984
|
c0.8,0,1.6,0.8,2.4,0.8c0.8,0,1.6,0,2.4-0.8c54.2-17.8,86.6-59.1,86.6-111.7V35.3C189,32,186.6,28.8,183.3,27.2z M146.1,81.4
|
|
825
985
|
l-48.5,48.5c-1.6,1.6-3.2,2.4-5.7,2.4c-2.4,0-4-0.8-5.7-2.4L62,105.7c-3.2-3.2-3.2-8.1,0-11.3c3.2-3.2,8.1-3.2,11.3,0l18.6,18.6
|
|
826
986
|
l42.9-42.9c3.2-3.2,8.1-3.2,11.3,0C149.4,73.3,149.4,78.2,146.1,81.4L146.1,81.4z`
|
|
827
|
-
}, null, -1),
|
|
828
|
-
|
|
829
|
-
],
|
|
987
|
+
}, null, -1), Pt = [
|
|
988
|
+
Tt
|
|
989
|
+
], Xt = /* @__PURE__ */ U({
|
|
830
990
|
__name: "btn-success-icon",
|
|
831
991
|
emits: ["click"],
|
|
832
|
-
setup(
|
|
833
|
-
const
|
|
834
|
-
function
|
|
835
|
-
|
|
992
|
+
setup(n, { emit: t }) {
|
|
993
|
+
const a = t;
|
|
994
|
+
function r(i) {
|
|
995
|
+
a("click", i);
|
|
836
996
|
}
|
|
837
|
-
return (
|
|
997
|
+
return (i, m) => (z(), Y("svg", oe({
|
|
838
998
|
xmlns: "http://www.w3.org/2000/svg",
|
|
839
999
|
viewBox: "0 0 200 200",
|
|
840
1000
|
width: "20",
|
|
841
1001
|
height: "20"
|
|
842
|
-
},
|
|
1002
|
+
}, i.$attrs, { onClick: r }), Pt, 16));
|
|
843
1003
|
}
|
|
844
|
-
}),
|
|
1004
|
+
}), Le = () => ({
|
|
845
1005
|
width: 330,
|
|
846
1006
|
height: 44,
|
|
847
1007
|
verticalPadding: 12,
|
|
848
1008
|
horizontalPadding: 16
|
|
849
|
-
}),
|
|
1009
|
+
}), he = /* @__PURE__ */ U({
|
|
850
1010
|
__name: "index",
|
|
851
1011
|
props: {
|
|
852
|
-
config: { default:
|
|
1012
|
+
config: { default: Le },
|
|
853
1013
|
clickEvent: {},
|
|
854
1014
|
disabled: { type: Boolean, default: !1 },
|
|
855
1015
|
type: { default: "default" },
|
|
856
1016
|
title: { default: "点击按键进行验证" }
|
|
857
1017
|
},
|
|
858
1018
|
emits: ["click-event"],
|
|
859
|
-
setup(
|
|
860
|
-
const
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
});
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
paddingRight: d.value.horizontalPadding + "px",
|
|
875
|
-
paddingTop: d.value.verticalPadding + "px",
|
|
876
|
-
paddingBottom: d.value.verticalPadding + "px"
|
|
877
|
-
})), u = n;
|
|
878
|
-
function m(r) {
|
|
879
|
-
u("click-event", r);
|
|
1019
|
+
setup(n, { emit: t }) {
|
|
1020
|
+
const a = n, { type: r, title: i, disabled: m, config: c } = ze(a), u = B({ ...Le(), ...I(c) });
|
|
1021
|
+
F(() => a.config, (s, p) => {
|
|
1022
|
+
Object.assign(u, s);
|
|
1023
|
+
}, { deep: !0 });
|
|
1024
|
+
const e = x(() => ["go-captcha", "gc-btn-block", `gc-${r.value}`, m.value ? "gc-disabled" : ""]), d = x(() => ({
|
|
1025
|
+
width: u.width + "px",
|
|
1026
|
+
height: u.height + "px",
|
|
1027
|
+
paddingLeft: u.horizontalPadding + "px",
|
|
1028
|
+
paddingRight: u.horizontalPadding + "px",
|
|
1029
|
+
paddingTop: u.verticalPadding + "px",
|
|
1030
|
+
paddingBottom: u.verticalPadding + "px"
|
|
1031
|
+
})), y = t;
|
|
1032
|
+
function E(s) {
|
|
1033
|
+
y("click-event", s);
|
|
880
1034
|
}
|
|
881
|
-
return (
|
|
882
|
-
class:
|
|
883
|
-
style:
|
|
884
|
-
onClick:
|
|
1035
|
+
return (s, p) => (z(), Y("div", {
|
|
1036
|
+
class: se(e.value),
|
|
1037
|
+
style: D(d.value),
|
|
1038
|
+
onClick: E
|
|
885
1039
|
}, [
|
|
886
|
-
|
|
887
|
-
class:
|
|
1040
|
+
o("div", {
|
|
1041
|
+
class: se(v(r) === "default" ? "gc-ripple" : "")
|
|
888
1042
|
}, [
|
|
889
|
-
|
|
1043
|
+
v(r) === "default" ? (z(), ae(kt, { key: 0 })) : v(r) === "warn" ? (z(), ae(zt, { key: 1 })) : v(r) === "error" ? (z(), ae(Bt, { key: 2 })) : v(r) === "success" ? (z(), ae(Xt, { key: 3 })) : Ce("", !0)
|
|
890
1044
|
], 2),
|
|
891
|
-
|
|
1045
|
+
o("span", null, ie(v(i)), 1)
|
|
892
1046
|
], 6));
|
|
893
1047
|
}
|
|
894
1048
|
});
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
1049
|
+
he.name = "gocaptcha-button";
|
|
1050
|
+
he.install = function(n) {
|
|
1051
|
+
n.component("gocaptcha-button", he);
|
|
898
1052
|
};
|
|
899
|
-
const
|
|
900
|
-
|
|
1053
|
+
const Mt = {
|
|
1054
|
+
install(n) {
|
|
1055
|
+
le.install(n), re.install(n), ue.install(n), de.install(n), he.install(n);
|
|
1056
|
+
}
|
|
901
1057
|
};
|
|
902
1058
|
export {
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
1059
|
+
he as Button,
|
|
1060
|
+
le as Click,
|
|
1061
|
+
de as Rotate,
|
|
1062
|
+
re as Slide,
|
|
1063
|
+
ue as SlideRegion,
|
|
1064
|
+
Mt as default
|
|
909
1065
|
};
|