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