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