@10yun/open-sdk 0.3.126 → 0.3.127

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.
@@ -1,1424 +0,0 @@
1
- import { _ as te, S as ie, H as se, a as X, u as oe, b as ne, c as re, d as ae } from "./index-DmigSfXx.js";
2
- import "pinia";
3
- import { resolveComponent as U, createElementBlock as P, openBlock as b, createCommentVNode as B, createBlock as G, createElementVNode as f, toDisplayString as T, createVNode as E, withCtx as N, createTextVNode as R, withKeys as le } from "vue";
4
- function he(n) {
5
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
6
- }
7
- var Q = { exports: {} }, ce = Q.exports, z;
8
- function ue() {
9
- return z || (z = 1, function(n, a) {
10
- var _;
11
- (function(m, c) {
12
- n.exports = c();
13
- })(ce, function() {
14
- function m(e) {
15
- this.mode = g.MODE_8BIT_BYTE, this.data = e, this.parsedData = [];
16
- for (var t = 0, i = this.data.length; t < i; t++) {
17
- var s = [], o = this.data.charCodeAt(t);
18
- o > 65536 ? (s[0] = 240 | (o & 1835008) >>> 18, s[1] = 128 | (o & 258048) >>> 12, s[2] = 128 | (o & 4032) >>> 6, s[3] = 128 | o & 63) : o > 2048 ? (s[0] = 224 | (o & 61440) >>> 12, s[1] = 128 | (o & 4032) >>> 6, s[2] = 128 | o & 63) : o > 128 ? (s[0] = 192 | (o & 1984) >>> 6, s[1] = 128 | o & 63) : s[0] = o, this.parsedData.push(s);
19
- }
20
- this.parsedData = Array.prototype.concat.apply([], this.parsedData), this.parsedData.length != this.data.length && (this.parsedData.unshift(191), this.parsedData.unshift(187), this.parsedData.unshift(239));
21
- }
22
- m.prototype = {
23
- getLength: function(e) {
24
- return this.parsedData.length;
25
- },
26
- write: function(e) {
27
- for (var t = 0, i = this.parsedData.length; t < i; t++)
28
- e.put(this.parsedData[t], 8);
29
- }
30
- };
31
- function c(e, t) {
32
- this.typeNumber = e, this.errorCorrectLevel = t, this.modules = null, this.moduleCount = 0, this.dataCache = null, this.dataList = [];
33
- }
34
- c.prototype = {
35
- addData: function(e) {
36
- var t = new m(e);
37
- this.dataList.push(t), this.dataCache = null;
38
- },
39
- isDark: function(e, t) {
40
- if (e < 0 || this.moduleCount <= e || t < 0 || this.moduleCount <= t)
41
- throw new Error(e + "," + t);
42
- return this.modules[e][t];
43
- },
44
- getModuleCount: function() {
45
- return this.moduleCount;
46
- },
47
- make: function() {
48
- this.makeImpl(!1, this.getBestMaskPattern());
49
- },
50
- makeImpl: function(e, t) {
51
- this.moduleCount = this.typeNumber * 4 + 17, this.modules = new Array(this.moduleCount);
52
- for (var i = 0; i < this.moduleCount; i++) {
53
- this.modules[i] = new Array(this.moduleCount);
54
- for (var s = 0; s < this.moduleCount; s++)
55
- this.modules[i][s] = null;
56
- }
57
- this.setupPositionProbePattern(0, 0), this.setupPositionProbePattern(this.moduleCount - 7, 0), this.setupPositionProbePattern(0, this.moduleCount - 7), this.setupPositionAdjustPattern(), this.setupTimingPattern(), this.setupTypeInfo(e, t), this.typeNumber >= 7 && this.setupTypeNumber(e), this.dataCache == null && (this.dataCache = c.createData(this.typeNumber, this.errorCorrectLevel, this.dataList)), this.mapData(this.dataCache, t);
58
- },
59
- setupPositionProbePattern: function(e, t) {
60
- for (var i = -1; i <= 7; i++)
61
- if (!(e + i <= -1 || this.moduleCount <= e + i))
62
- for (var s = -1; s <= 7; s++)
63
- t + s <= -1 || this.moduleCount <= t + s || (0 <= i && i <= 6 && (s == 0 || s == 6) || 0 <= s && s <= 6 && (i == 0 || i == 6) || 2 <= i && i <= 4 && 2 <= s && s <= 4 ? this.modules[e + i][t + s] = !0 : this.modules[e + i][t + s] = !1);
64
- },
65
- getBestMaskPattern: function() {
66
- for (var e = 0, t = 0, i = 0; i < 8; i++) {
67
- this.makeImpl(!0, i);
68
- var s = w.getLostPoint(this);
69
- (i == 0 || e > s) && (e = s, t = i);
70
- }
71
- return t;
72
- },
73
- createMovieClip: function(e, t, i) {
74
- var s = e.createEmptyMovieClip(t, i), o = 1;
75
- this.make();
76
- for (var l = 0; l < this.modules.length; l++)
77
- for (var h = l * o, r = 0; r < this.modules[l].length; r++) {
78
- var u = r * o, p = this.modules[l][r];
79
- p && (s.beginFill(0, 100), s.moveTo(u, h), s.lineTo(u + o, h), s.lineTo(u + o, h + o), s.lineTo(u, h + o), s.endFill());
80
- }
81
- return s;
82
- },
83
- setupTimingPattern: function() {
84
- for (var e = 8; e < this.moduleCount - 8; e++)
85
- this.modules[e][6] == null && (this.modules[e][6] = e % 2 == 0);
86
- for (var t = 8; t < this.moduleCount - 8; t++)
87
- this.modules[6][t] == null && (this.modules[6][t] = t % 2 == 0);
88
- },
89
- setupPositionAdjustPattern: function() {
90
- for (var e = w.getPatternPosition(this.typeNumber), t = 0; t < e.length; t++)
91
- for (var i = 0; i < e.length; i++) {
92
- var s = e[t], o = e[i];
93
- if (this.modules[s][o] == null)
94
- for (var l = -2; l <= 2; l++)
95
- for (var h = -2; h <= 2; h++)
96
- l == -2 || l == 2 || h == -2 || h == 2 || l == 0 && h == 0 ? this.modules[s + l][o + h] = !0 : this.modules[s + l][o + h] = !1;
97
- }
98
- },
99
- setupTypeNumber: function(e) {
100
- for (var t = w.getBCHTypeNumber(this.typeNumber), i = 0; i < 18; i++) {
101
- var s = !e && (t >> i & 1) == 1;
102
- this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = s;
103
- }
104
- for (var i = 0; i < 18; i++) {
105
- var s = !e && (t >> i & 1) == 1;
106
- this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = s;
107
- }
108
- },
109
- setupTypeInfo: function(e, t) {
110
- for (var i = this.errorCorrectLevel << 3 | t, s = w.getBCHTypeInfo(i), o = 0; o < 15; o++) {
111
- var l = !e && (s >> o & 1) == 1;
112
- o < 6 ? this.modules[o][8] = l : o < 8 ? this.modules[o + 1][8] = l : this.modules[this.moduleCount - 15 + o][8] = l;
113
- }
114
- for (var o = 0; o < 15; o++) {
115
- var l = !e && (s >> o & 1) == 1;
116
- o < 8 ? this.modules[8][this.moduleCount - o - 1] = l : o < 9 ? this.modules[8][15 - o - 1 + 1] = l : this.modules[8][15 - o - 1] = l;
117
- }
118
- this.modules[this.moduleCount - 8][8] = !e;
119
- },
120
- mapData: function(e, t) {
121
- for (var i = -1, s = this.moduleCount - 1, o = 7, l = 0, h = this.moduleCount - 1; h > 0; h -= 2)
122
- for (h == 6 && h--; ; ) {
123
- for (var r = 0; r < 2; r++)
124
- if (this.modules[s][h - r] == null) {
125
- var u = !1;
126
- l < e.length && (u = (e[l] >>> o & 1) == 1);
127
- var p = w.getMask(t, s, h - r);
128
- p && (u = !u), this.modules[s][h - r] = u, o--, o == -1 && (l++, o = 7);
129
- }
130
- if (s += i, s < 0 || this.moduleCount <= s) {
131
- s -= i, i = -i;
132
- break;
133
- }
134
- }
135
- }
136
- }, c.PAD0 = 236, c.PAD1 = 17, c.createData = function(e, t, i) {
137
- for (var s = y.getRSBlocks(e, t), o = new v(), l = 0; l < i.length; l++) {
138
- var h = i[l];
139
- o.put(h.mode, 4), o.put(h.getLength(), w.getLengthInBits(h.mode, e)), h.write(o);
140
- }
141
- for (var r = 0, l = 0; l < s.length; l++)
142
- r += s[l].dataCount;
143
- if (o.getLengthInBits() > r * 8)
144
- throw new Error("code length overflow. (" + o.getLengthInBits() + ">" + r * 8 + ")");
145
- for (o.getLengthInBits() + 4 <= r * 8 && o.put(0, 4); o.getLengthInBits() % 8 != 0; )
146
- o.putBit(!1);
147
- for (; !(o.getLengthInBits() >= r * 8 || (o.put(c.PAD0, 8), o.getLengthInBits() >= r * 8)); )
148
- o.put(c.PAD1, 8);
149
- return c.createBytes(o, s);
150
- }, c.createBytes = function(e, t) {
151
- for (var i = 0, s = 0, o = 0, l = new Array(t.length), h = new Array(t.length), r = 0; r < t.length; r++) {
152
- var u = t[r].dataCount, p = t[r].totalCount - u;
153
- s = Math.max(s, u), o = Math.max(o, p), l[r] = new Array(u);
154
- for (var d = 0; d < l[r].length; d++)
155
- l[r][d] = 255 & e.buffer[d + i];
156
- i += u;
157
- var S = w.getErrorCorrectPolynomial(p), k = new O(l[r], S.getLength() - 1), M = k.mod(S);
158
- h[r] = new Array(S.getLength() - 1);
159
- for (var d = 0; d < h[r].length; d++) {
160
- var I = d + M.getLength() - h[r].length;
161
- h[r][d] = I >= 0 ? M.get(I) : 0;
162
- }
163
- }
164
- for (var x = 0, d = 0; d < t.length; d++)
165
- x += t[d].totalCount;
166
- for (var H = new Array(x), F = 0, d = 0; d < s; d++)
167
- for (var r = 0; r < t.length; r++)
168
- d < l[r].length && (H[F++] = l[r][d]);
169
- for (var d = 0; d < o; d++)
170
- for (var r = 0; r < t.length; r++)
171
- d < h[r].length && (H[F++] = h[r][d]);
172
- return H;
173
- };
174
- for (var g = { MODE_NUMBER: 1, MODE_ALPHA_NUM: 2, MODE_8BIT_BYTE: 4, MODE_KANJI: 8 }, A = { L: 1, M: 0, Q: 3, H: 2 }, D = {
175
- PATTERN000: 0,
176
- PATTERN001: 1,
177
- PATTERN010: 2,
178
- PATTERN011: 3,
179
- PATTERN100: 4,
180
- PATTERN101: 5,
181
- PATTERN110: 6,
182
- PATTERN111: 7
183
- }, w = {
184
- PATTERN_POSITION_TABLE: [
185
- [],
186
- [6, 18],
187
- [6, 22],
188
- [6, 26],
189
- [6, 30],
190
- [6, 34],
191
- [6, 22, 38],
192
- [6, 24, 42],
193
- [6, 26, 46],
194
- [6, 28, 50],
195
- [6, 30, 54],
196
- [6, 32, 58],
197
- [6, 34, 62],
198
- [6, 26, 46, 66],
199
- [6, 26, 48, 70],
200
- [6, 26, 50, 74],
201
- [6, 30, 54, 78],
202
- [6, 30, 56, 82],
203
- [6, 30, 58, 86],
204
- [6, 34, 62, 90],
205
- [6, 28, 50, 72, 94],
206
- [6, 26, 50, 74, 98],
207
- [6, 30, 54, 78, 102],
208
- [6, 28, 54, 80, 106],
209
- [6, 32, 58, 84, 110],
210
- [6, 30, 58, 86, 114],
211
- [6, 34, 62, 90, 118],
212
- [6, 26, 50, 74, 98, 122],
213
- [6, 30, 54, 78, 102, 126],
214
- [6, 26, 52, 78, 104, 130],
215
- [6, 30, 56, 82, 108, 134],
216
- [6, 34, 60, 86, 112, 138],
217
- [6, 30, 58, 86, 114, 142],
218
- [6, 34, 62, 90, 118, 146],
219
- [6, 30, 54, 78, 102, 126, 150],
220
- [6, 24, 50, 76, 102, 128, 154],
221
- [6, 28, 54, 80, 106, 132, 158],
222
- [6, 32, 58, 84, 110, 136, 162],
223
- [6, 26, 54, 82, 110, 138, 166],
224
- [6, 30, 58, 86, 114, 142, 170]
225
- ],
226
- G15: 1335,
227
- G18: 7973,
228
- G15_MASK: 21522,
229
- getBCHTypeInfo: function(e) {
230
- for (var t = e << 10; w.getBCHDigit(t) - w.getBCHDigit(w.G15) >= 0; )
231
- t ^= w.G15 << w.getBCHDigit(t) - w.getBCHDigit(w.G15);
232
- return (e << 10 | t) ^ w.G15_MASK;
233
- },
234
- getBCHTypeNumber: function(e) {
235
- for (var t = e << 12; w.getBCHDigit(t) - w.getBCHDigit(w.G18) >= 0; )
236
- t ^= w.G18 << w.getBCHDigit(t) - w.getBCHDigit(w.G18);
237
- return e << 12 | t;
238
- },
239
- getBCHDigit: function(e) {
240
- for (var t = 0; e != 0; )
241
- t++, e >>>= 1;
242
- return t;
243
- },
244
- getPatternPosition: function(e) {
245
- return w.PATTERN_POSITION_TABLE[e - 1];
246
- },
247
- getMask: function(e, t, i) {
248
- switch (e) {
249
- case D.PATTERN000:
250
- return (t + i) % 2 == 0;
251
- case D.PATTERN001:
252
- return t % 2 == 0;
253
- case D.PATTERN010:
254
- return i % 3 == 0;
255
- case D.PATTERN011:
256
- return (t + i) % 3 == 0;
257
- case D.PATTERN100:
258
- return (Math.floor(t / 2) + Math.floor(i / 3)) % 2 == 0;
259
- case D.PATTERN101:
260
- return t * i % 2 + t * i % 3 == 0;
261
- case D.PATTERN110:
262
- return (t * i % 2 + t * i % 3) % 2 == 0;
263
- case D.PATTERN111:
264
- return (t * i % 3 + (t + i) % 2) % 2 == 0;
265
- default:
266
- throw new Error("bad maskPattern:" + e);
267
- }
268
- },
269
- getErrorCorrectPolynomial: function(e) {
270
- for (var t = new O([1], 0), i = 0; i < e; i++)
271
- t = t.multiply(new O([1, C.gexp(i)], 0));
272
- return t;
273
- },
274
- getLengthInBits: function(e, t) {
275
- if (1 <= t && t < 10)
276
- switch (e) {
277
- case g.MODE_NUMBER:
278
- return 10;
279
- case g.MODE_ALPHA_NUM:
280
- return 9;
281
- case g.MODE_8BIT_BYTE:
282
- return 8;
283
- case g.MODE_KANJI:
284
- return 8;
285
- default:
286
- throw new Error("mode:" + e);
287
- }
288
- else if (t < 27)
289
- switch (e) {
290
- case g.MODE_NUMBER:
291
- return 12;
292
- case g.MODE_ALPHA_NUM:
293
- return 11;
294
- case g.MODE_8BIT_BYTE:
295
- return 16;
296
- case g.MODE_KANJI:
297
- return 10;
298
- default:
299
- throw new Error("mode:" + e);
300
- }
301
- else if (t < 41)
302
- switch (e) {
303
- case g.MODE_NUMBER:
304
- return 14;
305
- case g.MODE_ALPHA_NUM:
306
- return 13;
307
- case g.MODE_8BIT_BYTE:
308
- return 16;
309
- case g.MODE_KANJI:
310
- return 12;
311
- default:
312
- throw new Error("mode:" + e);
313
- }
314
- else
315
- throw new Error("type:" + t);
316
- },
317
- getLostPoint: function(e) {
318
- for (var t = e.getModuleCount(), i = 0, s = 0; s < t; s++)
319
- for (var o = 0; o < t; o++) {
320
- for (var l = 0, h = e.isDark(s, o), r = -1; r <= 1; r++)
321
- if (!(s + r < 0 || t <= s + r))
322
- for (var u = -1; u <= 1; u++)
323
- o + u < 0 || t <= o + u || r == 0 && u == 0 || h == e.isDark(s + r, o + u) && l++;
324
- l > 5 && (i += 3 + l - 5);
325
- }
326
- for (var s = 0; s < t - 1; s++)
327
- for (var o = 0; o < t - 1; o++) {
328
- var p = 0;
329
- e.isDark(s, o) && p++, e.isDark(s + 1, o) && p++, e.isDark(s, o + 1) && p++, e.isDark(s + 1, o + 1) && p++, (p == 0 || p == 4) && (i += 3);
330
- }
331
- for (var s = 0; s < t; s++)
332
- for (var o = 0; o < t - 6; o++)
333
- e.isDark(s, o) && !e.isDark(s, o + 1) && e.isDark(s, o + 2) && e.isDark(s, o + 3) && e.isDark(s, o + 4) && !e.isDark(s, o + 5) && e.isDark(s, o + 6) && (i += 40);
334
- for (var o = 0; o < t; o++)
335
- for (var s = 0; s < t - 6; s++)
336
- e.isDark(s, o) && !e.isDark(s + 1, o) && e.isDark(s + 2, o) && e.isDark(s + 3, o) && e.isDark(s + 4, o) && !e.isDark(s + 5, o) && e.isDark(s + 6, o) && (i += 40);
337
- for (var d = 0, o = 0; o < t; o++)
338
- for (var s = 0; s < t; s++)
339
- e.isDark(s, o) && d++;
340
- var S = Math.abs(100 * d / t / t - 50) / 5;
341
- return i += S * 10, i;
342
- }
343
- }, C = {
344
- glog: function(e) {
345
- if (e < 1)
346
- throw new Error("glog(" + e + ")");
347
- return C.LOG_TABLE[e];
348
- },
349
- gexp: function(e) {
350
- for (; e < 0; )
351
- e += 255;
352
- for (; e >= 256; )
353
- e -= 255;
354
- return C.EXP_TABLE[e];
355
- },
356
- EXP_TABLE: new Array(256),
357
- LOG_TABLE: new Array(256)
358
- }, L = 0; L < 8; L++)
359
- C.EXP_TABLE[L] = 1 << L;
360
- for (var L = 8; L < 256; L++)
361
- C.EXP_TABLE[L] = C.EXP_TABLE[L - 4] ^ C.EXP_TABLE[L - 5] ^ C.EXP_TABLE[L - 6] ^ C.EXP_TABLE[L - 8];
362
- for (var L = 0; L < 255; L++)
363
- C.LOG_TABLE[C.EXP_TABLE[L]] = L;
364
- function O(e, t) {
365
- if (e.length == null)
366
- throw new Error(e.length + "/" + t);
367
- for (var i = 0; i < e.length && e[i] == 0; )
368
- i++;
369
- this.num = new Array(e.length - i + t);
370
- for (var s = 0; s < e.length - i; s++)
371
- this.num[s] = e[s + i];
372
- }
373
- O.prototype = {
374
- get: function(e) {
375
- return this.num[e];
376
- },
377
- getLength: function() {
378
- return this.num.length;
379
- },
380
- multiply: function(e) {
381
- for (var t = new Array(this.getLength() + e.getLength() - 1), i = 0; i < this.getLength(); i++)
382
- for (var s = 0; s < e.getLength(); s++)
383
- t[i + s] ^= C.gexp(C.glog(this.get(i)) + C.glog(e.get(s)));
384
- return new O(t, 0);
385
- },
386
- mod: function(e) {
387
- if (this.getLength() - e.getLength() < 0)
388
- return this;
389
- for (var t = C.glog(this.get(0)) - C.glog(e.get(0)), i = new Array(this.getLength()), s = 0; s < this.getLength(); s++)
390
- i[s] = this.get(s);
391
- for (var s = 0; s < e.getLength(); s++)
392
- i[s] ^= C.gexp(C.glog(e.get(s)) + t);
393
- return new O(i, 0).mod(e);
394
- }
395
- };
396
- function y(e, t) {
397
- this.totalCount = e, this.dataCount = t;
398
- }
399
- y.RS_BLOCK_TABLE = [
400
- [1, 26, 19],
401
- [1, 26, 16],
402
- [1, 26, 13],
403
- [1, 26, 9],
404
- [1, 44, 34],
405
- [1, 44, 28],
406
- [1, 44, 22],
407
- [1, 44, 16],
408
- [1, 70, 55],
409
- [1, 70, 44],
410
- [2, 35, 17],
411
- [2, 35, 13],
412
- [1, 100, 80],
413
- [2, 50, 32],
414
- [2, 50, 24],
415
- [4, 25, 9],
416
- [1, 134, 108],
417
- [2, 67, 43],
418
- [2, 33, 15, 2, 34, 16],
419
- [2, 33, 11, 2, 34, 12],
420
- [2, 86, 68],
421
- [4, 43, 27],
422
- [4, 43, 19],
423
- [4, 43, 15],
424
- [2, 98, 78],
425
- [4, 49, 31],
426
- [2, 32, 14, 4, 33, 15],
427
- [4, 39, 13, 1, 40, 14],
428
- [2, 121, 97],
429
- [2, 60, 38, 2, 61, 39],
430
- [4, 40, 18, 2, 41, 19],
431
- [4, 40, 14, 2, 41, 15],
432
- [2, 146, 116],
433
- [3, 58, 36, 2, 59, 37],
434
- [4, 36, 16, 4, 37, 17],
435
- [4, 36, 12, 4, 37, 13],
436
- [2, 86, 68, 2, 87, 69],
437
- [4, 69, 43, 1, 70, 44],
438
- [6, 43, 19, 2, 44, 20],
439
- [6, 43, 15, 2, 44, 16],
440
- [4, 101, 81],
441
- [1, 80, 50, 4, 81, 51],
442
- [4, 50, 22, 4, 51, 23],
443
- [3, 36, 12, 8, 37, 13],
444
- [2, 116, 92, 2, 117, 93],
445
- [6, 58, 36, 2, 59, 37],
446
- [4, 46, 20, 6, 47, 21],
447
- [7, 42, 14, 4, 43, 15],
448
- [4, 133, 107],
449
- [8, 59, 37, 1, 60, 38],
450
- [8, 44, 20, 4, 45, 21],
451
- [12, 33, 11, 4, 34, 12],
452
- [3, 145, 115, 1, 146, 116],
453
- [4, 64, 40, 5, 65, 41],
454
- [11, 36, 16, 5, 37, 17],
455
- [11, 36, 12, 5, 37, 13],
456
- [5, 109, 87, 1, 110, 88],
457
- [5, 65, 41, 5, 66, 42],
458
- [5, 54, 24, 7, 55, 25],
459
- [11, 36, 12],
460
- [5, 122, 98, 1, 123, 99],
461
- [7, 73, 45, 3, 74, 46],
462
- [15, 43, 19, 2, 44, 20],
463
- [3, 45, 15, 13, 46, 16],
464
- [1, 135, 107, 5, 136, 108],
465
- [10, 74, 46, 1, 75, 47],
466
- [1, 50, 22, 15, 51, 23],
467
- [2, 42, 14, 17, 43, 15],
468
- [5, 150, 120, 1, 151, 121],
469
- [9, 69, 43, 4, 70, 44],
470
- [17, 50, 22, 1, 51, 23],
471
- [2, 42, 14, 19, 43, 15],
472
- [3, 141, 113, 4, 142, 114],
473
- [3, 70, 44, 11, 71, 45],
474
- [17, 47, 21, 4, 48, 22],
475
- [9, 39, 13, 16, 40, 14],
476
- [3, 135, 107, 5, 136, 108],
477
- [3, 67, 41, 13, 68, 42],
478
- [15, 54, 24, 5, 55, 25],
479
- [15, 43, 15, 10, 44, 16],
480
- [4, 144, 116, 4, 145, 117],
481
- [17, 68, 42],
482
- [17, 50, 22, 6, 51, 23],
483
- [19, 46, 16, 6, 47, 17],
484
- [2, 139, 111, 7, 140, 112],
485
- [17, 74, 46],
486
- [7, 54, 24, 16, 55, 25],
487
- [34, 37, 13],
488
- [4, 151, 121, 5, 152, 122],
489
- [4, 75, 47, 14, 76, 48],
490
- [11, 54, 24, 14, 55, 25],
491
- [16, 45, 15, 14, 46, 16],
492
- [6, 147, 117, 4, 148, 118],
493
- [6, 73, 45, 14, 74, 46],
494
- [11, 54, 24, 16, 55, 25],
495
- [30, 46, 16, 2, 47, 17],
496
- [8, 132, 106, 4, 133, 107],
497
- [8, 75, 47, 13, 76, 48],
498
- [7, 54, 24, 22, 55, 25],
499
- [22, 45, 15, 13, 46, 16],
500
- [10, 142, 114, 2, 143, 115],
501
- [19, 74, 46, 4, 75, 47],
502
- [28, 50, 22, 6, 51, 23],
503
- [33, 46, 16, 4, 47, 17],
504
- [8, 152, 122, 4, 153, 123],
505
- [22, 73, 45, 3, 74, 46],
506
- [8, 53, 23, 26, 54, 24],
507
- [12, 45, 15, 28, 46, 16],
508
- [3, 147, 117, 10, 148, 118],
509
- [3, 73, 45, 23, 74, 46],
510
- [4, 54, 24, 31, 55, 25],
511
- [11, 45, 15, 31, 46, 16],
512
- [7, 146, 116, 7, 147, 117],
513
- [21, 73, 45, 7, 74, 46],
514
- [1, 53, 23, 37, 54, 24],
515
- [19, 45, 15, 26, 46, 16],
516
- [5, 145, 115, 10, 146, 116],
517
- [19, 75, 47, 10, 76, 48],
518
- [15, 54, 24, 25, 55, 25],
519
- [23, 45, 15, 25, 46, 16],
520
- [13, 145, 115, 3, 146, 116],
521
- [2, 74, 46, 29, 75, 47],
522
- [42, 54, 24, 1, 55, 25],
523
- [23, 45, 15, 28, 46, 16],
524
- [17, 145, 115],
525
- [10, 74, 46, 23, 75, 47],
526
- [10, 54, 24, 35, 55, 25],
527
- [19, 45, 15, 35, 46, 16],
528
- [17, 145, 115, 1, 146, 116],
529
- [14, 74, 46, 21, 75, 47],
530
- [29, 54, 24, 19, 55, 25],
531
- [11, 45, 15, 46, 46, 16],
532
- [13, 145, 115, 6, 146, 116],
533
- [14, 74, 46, 23, 75, 47],
534
- [44, 54, 24, 7, 55, 25],
535
- [59, 46, 16, 1, 47, 17],
536
- [12, 151, 121, 7, 152, 122],
537
- [12, 75, 47, 26, 76, 48],
538
- [39, 54, 24, 14, 55, 25],
539
- [22, 45, 15, 41, 46, 16],
540
- [6, 151, 121, 14, 152, 122],
541
- [6, 75, 47, 34, 76, 48],
542
- [46, 54, 24, 10, 55, 25],
543
- [2, 45, 15, 64, 46, 16],
544
- [17, 152, 122, 4, 153, 123],
545
- [29, 74, 46, 14, 75, 47],
546
- [49, 54, 24, 10, 55, 25],
547
- [24, 45, 15, 46, 46, 16],
548
- [4, 152, 122, 18, 153, 123],
549
- [13, 74, 46, 32, 75, 47],
550
- [48, 54, 24, 14, 55, 25],
551
- [42, 45, 15, 32, 46, 16],
552
- [20, 147, 117, 4, 148, 118],
553
- [40, 75, 47, 7, 76, 48],
554
- [43, 54, 24, 22, 55, 25],
555
- [10, 45, 15, 67, 46, 16],
556
- [19, 148, 118, 6, 149, 119],
557
- [18, 75, 47, 31, 76, 48],
558
- [34, 54, 24, 34, 55, 25],
559
- [20, 45, 15, 61, 46, 16]
560
- ], y.getRSBlocks = function(e, t) {
561
- var i = y.getRsBlockTable(e, t);
562
- if (i == null)
563
- throw new Error("bad rs block @ typeNumber:" + e + "/errorCorrectLevel:" + t);
564
- for (var s = i.length / 3, o = [], l = 0; l < s; l++)
565
- for (var h = i[l * 3 + 0], r = i[l * 3 + 1], u = i[l * 3 + 2], p = 0; p < h; p++)
566
- o.push(new y(r, u));
567
- return o;
568
- }, y.getRsBlockTable = function(e, t) {
569
- switch (t) {
570
- case A.L:
571
- return y.RS_BLOCK_TABLE[(e - 1) * 4 + 0];
572
- case A.M:
573
- return y.RS_BLOCK_TABLE[(e - 1) * 4 + 1];
574
- case A.Q:
575
- return y.RS_BLOCK_TABLE[(e - 1) * 4 + 2];
576
- case A.H:
577
- return y.RS_BLOCK_TABLE[(e - 1) * 4 + 3];
578
- default:
579
- return;
580
- }
581
- };
582
- function v() {
583
- this.buffer = [], this.length = 0;
584
- }
585
- v.prototype = {
586
- get: function(e) {
587
- var t = Math.floor(e / 8);
588
- return (this.buffer[t] >>> 7 - e % 8 & 1) == 1;
589
- },
590
- put: function(e, t) {
591
- for (var i = 0; i < t; i++)
592
- this.putBit((e >>> t - i - 1 & 1) == 1);
593
- },
594
- getLengthInBits: function() {
595
- return this.length;
596
- },
597
- putBit: function(e) {
598
- var t = Math.floor(this.length / 8);
599
- this.buffer.length <= t && this.buffer.push(0), e && (this.buffer[t] |= 128 >>> this.length % 8), this.length++;
600
- }
601
- };
602
- var V = [
603
- [17, 14, 11, 7],
604
- [32, 26, 20, 14],
605
- [53, 42, 32, 24],
606
- [78, 62, 46, 34],
607
- [106, 84, 60, 44],
608
- [134, 106, 74, 58],
609
- [154, 122, 86, 64],
610
- [192, 152, 108, 84],
611
- [230, 180, 130, 98],
612
- [271, 213, 151, 119],
613
- [321, 251, 177, 137],
614
- [367, 287, 203, 155],
615
- [425, 331, 241, 177],
616
- [458, 362, 258, 194],
617
- [520, 412, 292, 220],
618
- [586, 450, 322, 250],
619
- [644, 504, 364, 280],
620
- [718, 560, 394, 310],
621
- [792, 624, 442, 338],
622
- [858, 666, 482, 382],
623
- [929, 711, 509, 403],
624
- [1003, 779, 565, 439],
625
- [1091, 857, 611, 461],
626
- [1171, 911, 661, 511],
627
- [1273, 997, 715, 535],
628
- [1367, 1059, 751, 593],
629
- [1465, 1125, 805, 625],
630
- [1528, 1190, 868, 658],
631
- [1628, 1264, 908, 698],
632
- [1732, 1370, 982, 742],
633
- [1840, 1452, 1030, 790],
634
- [1952, 1538, 1112, 842],
635
- [2068, 1628, 1168, 898],
636
- [2188, 1722, 1228, 958],
637
- [2303, 1809, 1283, 983],
638
- [2431, 1911, 1351, 1051],
639
- [2563, 1989, 1423, 1093],
640
- [2699, 2099, 1499, 1139],
641
- [2809, 2213, 1579, 1219],
642
- [2953, 2331, 1663, 1273]
643
- ];
644
- function W() {
645
- return typeof CanvasRenderingContext2D < "u";
646
- }
647
- function q() {
648
- var e = !1, t = navigator.userAgent;
649
- if (/android/i.test(t)) {
650
- e = !0;
651
- var i = t.toString().match(/android ([0-9]\.[0-9])/i);
652
- i && i[1] && (e = parseFloat(i[1]));
653
- }
654
- return e;
655
- }
656
- var K = function() {
657
- var e = function(t, i) {
658
- this._el = t, this._htOption = i;
659
- };
660
- return e.prototype.draw = function(t) {
661
- var i = this._htOption, s = this._el, o = t.getModuleCount();
662
- Math.floor(i.width / o), Math.floor(i.height / o), this.clear();
663
- function l(d, S) {
664
- var k = document.createElementNS("http://www.w3.org/2000/svg", d);
665
- for (var M in S) S.hasOwnProperty(M) && k.setAttribute(M, S[M]);
666
- return k;
667
- }
668
- var h = l("svg", {
669
- viewBox: "0 0 " + String(o) + " " + String(o),
670
- width: "100%",
671
- height: "100%",
672
- fill: i.colorLight
673
- });
674
- h.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"), s.appendChild(h), h.appendChild(l("rect", { fill: i.colorLight, width: "100%", height: "100%" })), h.appendChild(l("rect", { fill: i.colorDark, width: "1", height: "1", id: "template" }));
675
- for (var r = 0; r < o; r++)
676
- for (var u = 0; u < o; u++)
677
- if (t.isDark(r, u)) {
678
- var p = l("use", { x: String(u), y: String(r) });
679
- p.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template"), h.appendChild(p);
680
- }
681
- }, e.prototype.clear = function() {
682
- for (; this._el.hasChildNodes(); ) this._el.removeChild(this._el.lastChild);
683
- }, e;
684
- }(), j = document.documentElement.tagName.toLowerCase() === "svg", J = j ? K : W() ? function() {
685
- function e() {
686
- this._elImage.src = this._elCanvas.toDataURL("image/png"), this._elImage.style.display = "block", this._elCanvas.style.display = "none";
687
- }
688
- if (this && this._android && this._android <= 2.1) {
689
- var t = 1 / window.devicePixelRatio, i = CanvasRenderingContext2D.prototype.drawImage;
690
- CanvasRenderingContext2D.prototype.drawImage = function(l, h, r, u, p, d, S, k, M) {
691
- if ("nodeName" in l && /img/i.test(l.nodeName))
692
- for (var I = arguments.length - 1; I >= 1; I--)
693
- arguments[I] = arguments[I] * t;
694
- else typeof k > "u" && (arguments[1] *= t, arguments[2] *= t, arguments[3] *= t, arguments[4] *= t);
695
- i.apply(this, arguments);
696
- };
697
- }
698
- function s(l, h) {
699
- var r = this;
700
- if (r._fFail = h, r._fSuccess = l, r._bSupportDataURI === null) {
701
- var u = document.createElement("img"), p = function() {
702
- r._bSupportDataURI = !1, r._fFail && r._fFail.call(r);
703
- }, d = function() {
704
- r._bSupportDataURI = !0, r._fSuccess && r._fSuccess.call(r);
705
- };
706
- u.onabort = p, u.onerror = p, u.onload = d, u.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";
707
- return;
708
- } else r._bSupportDataURI === !0 && r._fSuccess ? r._fSuccess.call(r) : r._bSupportDataURI === !1 && r._fFail && r._fFail.call(r);
709
- }
710
- var o = function(l, h) {
711
- this._bIsPainted = !1, this._android = q(), this._htOption = h, this._elCanvas = document.createElement("canvas"), this._elCanvas.width = h.width, this._elCanvas.height = h.height, l.appendChild(this._elCanvas), this._el = l, this._oContext = this._elCanvas.getContext("2d"), this._bIsPainted = !1, this._elImage = document.createElement("img"), this._elImage.alt = "Scan me!", this._elImage.style.display = "none", this._el.appendChild(this._elImage), this._bSupportDataURI = null;
712
- };
713
- return o.prototype.draw = function(l) {
714
- var h = this._elImage, r = this._oContext, u = this._htOption, p = l.getModuleCount(), d = u.width / p, S = u.height / p, k = Math.round(d), M = Math.round(S);
715
- h.style.display = "none", this.clear();
716
- for (var I = 0; I < p; I++)
717
- for (var x = 0; x < p; x++) {
718
- var H = l.isDark(I, x), F = x * d, $ = I * S;
719
- r.strokeStyle = H ? u.colorDark : u.colorLight, r.lineWidth = 1, r.fillStyle = H ? u.colorDark : u.colorLight, r.fillRect(F, $, d, S), r.strokeRect(Math.floor(F) + 0.5, Math.floor($) + 0.5, k, M), r.strokeRect(Math.ceil(F) - 0.5, Math.ceil($) - 0.5, k, M);
720
- }
721
- this._bIsPainted = !0;
722
- }, o.prototype.makeImage = function() {
723
- this._bIsPainted && s.call(this, e);
724
- }, o.prototype.isPainted = function() {
725
- return this._bIsPainted;
726
- }, o.prototype.clear = function() {
727
- this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height), this._bIsPainted = !1;
728
- }, o.prototype.round = function(l) {
729
- return l && Math.floor(l * 1e3) / 1e3;
730
- }, o;
731
- }() : function() {
732
- var e = function(t, i) {
733
- this._el = t, this._htOption = i;
734
- };
735
- return e.prototype.draw = function(t) {
736
- for (var i = this._htOption, s = this._el, o = t.getModuleCount(), l = Math.floor(i.width / o), h = Math.floor(i.height / o), r = ['<table style="border:0;border-collapse:collapse;">'], u = 0; u < o; u++) {
737
- r.push("<tr>");
738
- for (var p = 0; p < o; p++)
739
- r.push(
740
- '<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:' + l + "px;height:" + h + "px;background-color:" + (t.isDark(u, p) ? i.colorDark : i.colorLight) + ';"></td>'
741
- );
742
- r.push("</tr>");
743
- }
744
- r.push("</table>"), s.innerHTML = r.join("");
745
- var d = s.childNodes[0], S = (i.width - d.offsetWidth) / 2, k = (i.height - d.offsetHeight) / 2;
746
- S > 0 && k > 0 && (d.style.margin = k + "px " + S + "px");
747
- }, e.prototype.clear = function() {
748
- this._el.innerHTML = "";
749
- }, e;
750
- }();
751
- function Z(e, t) {
752
- for (var i = 1, s = ee(e), o = 0, l = V.length; o <= l; o++) {
753
- var h = 0;
754
- switch (t) {
755
- case A.L:
756
- h = V[o][0];
757
- break;
758
- case A.M:
759
- h = V[o][1];
760
- break;
761
- case A.Q:
762
- h = V[o][2];
763
- break;
764
- case A.H:
765
- h = V[o][3];
766
- break;
767
- }
768
- if (s <= h)
769
- break;
770
- i++;
771
- }
772
- if (i > V.length)
773
- throw new Error("Too long data");
774
- return i;
775
- }
776
- function ee(e) {
777
- var t = encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g, "a");
778
- return t.length + (t.length != e ? 3 : 0);
779
- }
780
- return _ = function(e, t) {
781
- if (this._htOption = {
782
- width: 256,
783
- height: 256,
784
- typeNumber: 4,
785
- colorDark: "#000000",
786
- colorLight: "#ffffff",
787
- correctLevel: A.H
788
- }, typeof t == "string" && (t = {
789
- text: t
790
- }), t)
791
- for (var i in t)
792
- this._htOption[i] = t[i];
793
- typeof e == "string" && (e = document.getElementById(e)), this._htOption.useSVG && (J = K), this._android = q(), this._el = e, this._oQRCode = null, this._oDrawing = new J(this._el, this._htOption), this._htOption.text && this.makeCode(this._htOption.text);
794
- }, _.prototype.makeCode = function(e) {
795
- this._oQRCode = new c(Z(e, this._htOption.correctLevel), this._htOption.correctLevel), this._oQRCode.addData(e), this._oQRCode.make(), this._el.title = e, this._oDrawing.draw(this._oQRCode), this.makeImage();
796
- }, _.prototype.makeImage = function() {
797
- typeof this._oDrawing.makeImage == "function" && (!this._android || this._android >= 3) && this._oDrawing.makeImage();
798
- }, _.prototype.clear = function() {
799
- this._oDrawing.clear();
800
- }, _.CorrectLevel = A, _;
801
- });
802
- }(Q)), Q.exports;
803
- }
804
- var de = ue();
805
- const Y = /* @__PURE__ */ he(de), ge = {
806
- components: { SwitchBusiness: ie },
807
- data() {
808
- return {
809
- loadOngoing: !1,
810
- //
811
- /**
812
- * smsLogin 短信登录
813
- * accessLogin 账号密码登录
814
- */
815
- loginMode: "access",
816
- //
817
- loginJump: !1,
818
- //
819
- cache_remember: "off",
820
- cache_privacy: "off",
821
- // 表单
822
- account_mobile: "",
823
- account_password: "",
824
- account_password2: "",
825
- captcha_code: "",
826
- sms_code: "",
827
- account_business_id: 0,
828
- reg_invite: "",
829
- regInviteNeed: !1,
830
- //
831
- codeNeed: !1,
832
- codeLoad: 0,
833
- codeKey: "",
834
- codeUrl: "",
835
- //
836
- chainShowFlag: !1,
837
- // 是否连锁
838
- chainAccountList: [],
839
- // 连锁列表
840
- chainTempToken: "",
841
- //
842
- qrcodeExpiredShow: !1,
843
- qrcodeTimer: null,
844
- qrcodeLoad: !1,
845
- qrcodeScanVernum: 15,
846
- //每隔3秒验证次数,允许验证几次
847
- qrcodeScanVererr: 0,
848
- // 错误几次
849
- //
850
- copyright_info: ""
851
- };
852
- },
853
- watch: {
854
- $route({ query: n }) {
855
- n.type == "reg" && this.$nextTick(() => {
856
- this.loginMode = "reg";
857
- });
858
- },
859
- account_mobile(n) {
860
- this.$nextTick(() => {
861
- var _, m;
862
- let a = (m = (_ = this.$refs.account_mobile) == null ? void 0 : _.$el) == null ? void 0 : m.querySelector("input");
863
- if (a) {
864
- const g = getComputedStyle(a).background.match(/rgb\((\d+,\s*\d+,\s*\d+)\)/);
865
- g && g[0] === "rgb(232, 240, 254)" && this.onBlur();
866
- }
867
- });
868
- },
869
- loginMode(n) {
870
- n == "reg" && (this.regInviteNeed = !!this.cacheInstConfig.reg_invite_need);
871
- }
872
- },
873
- computed: {
874
- currentLanguage() {
875
- return this.languageList[this.languageName] || "Language";
876
- }
877
- },
878
- created() {
879
- this.cache_remember = localStorage.getItem("cacheLoginRemember") || "off", this.cache_privacy = localStorage.getItem("cacheLoginPrivacy") || "off", this.account_mobile = localStorage.getItem("cacheLoginMobile") || "";
880
- },
881
- async mounted() {
882
- this.loginMode = this.$route.query.type === "reg" ? "reg" : "access", this.$Electron && (this.$Electron.sendMessage("webTabDestroyAll"), this.$Electron.sendMessage("childWindowDestroyAll")), ae().$subscribe((n, a) => {
883
- n.events.key == "useSSOLogin" && a.useSSOLogin == !0 && this.inputServerUrl();
884
- });
885
- },
886
- beforeDestroy() {
887
- clearInterval(this.qrcodeTimer), this.loginJump = !1, this.account_password = "", this.account_password2 = "", this.captcha_code = "", this.reg_invite = "";
888
- },
889
- methods: {
890
- handleRemember(n) {
891
- n == "on" ? localStorage.setItem("cacheLoginRemember", n) : localStorage.removeItem("cacheLoginRemember");
892
- },
893
- handleRrivacy(n) {
894
- n == "on" ? (localStorage.setItem("cacheLoginPrivacy", n), this.chackServerUrl().catch((a) => {
895
- })) : localStorage.removeItem("cacheLoginPrivacy"), this.cache_privacy = n;
896
- },
897
- handleForgot() {
898
- this.$message.warning("请联系管理员!");
899
- },
900
- chackServerUrl(n) {
901
- return new Promise((a, _) => {
902
- a();
903
- });
904
- },
905
- /* 修改登录方式 */
906
- switchLoginMode(n) {
907
- this.chackServerUrl(!0).then(() => {
908
- clearInterval(this.qrcodeTimer), n === "qrcode" ? (this.loginMode = "qrcode", this.scanQrcodeRefresh()) : n === "access" ? this.loginMode = "access" : n === "smsLogin" ? (this.loginMode = "smsLogin", this.refreshCode()) : this.loginMode = n;
909
- });
910
- },
911
- refreshCode() {
912
- this.captcha_code = "", !(this.codeLoad > 0) && (setTimeout((n) => {
913
- this.codeLoad++;
914
- }, 600), this.$request.flagGet("BASE_PASSPORT_CODE_DATA", {
915
- account_mobile: this.account_mobile
916
- }).then(({ data: n }) => {
917
- var a;
918
- this.codeKey = n.key, this.codeUrl = n.img, (a = this.$refs.captcha_code) == null || a.focus();
919
- }).catch((n) => {
920
- this.codeUrl = "error";
921
- }).finally((n) => {
922
- this.codeLoad--;
923
- }));
924
- },
925
- onBlur() {
926
- if (!this.account_mobile) {
927
- this.codeNeed = !1;
928
- return;
929
- }
930
- this.loadOngoing = !0, this.$request.flagGet("BASE_PASSPORT_CODE_NEED", {
931
- account_mobile: this.account_mobile
932
- }).then((n) => {
933
- this.loadOngoing = !1, n.data == "need" ? (this.refreshCode(), this.codeNeed = !0) : this.codeNeed = !1;
934
- }).catch((n) => {
935
- this.loadOngoing = !1;
936
- }).finally((n) => {
937
- this.loadOngoing = !1;
938
- });
939
- },
940
- accessLoginFunc() {
941
- if (this.loadOngoing)
942
- return this.$message({
943
- type: "warning",
944
- message: "正在登录中,请勿重新确认~"
945
- }), !1;
946
- this.chackServerUrl(!0).then(() => {
947
- if (this.account_mobile = cvUtils.strTrimAll(this.account_mobile), this.account_password = cvUtils.strTrimAll(this.account_password), this.account_password2 = cvUtils.strTrimAll(this.account_password2), this.captcha_code = cvUtils.strTrimAll(this.captcha_code), this.reg_invite = cvUtils.strTrimAll(this.reg_invite), this.cache_privacy != "on") {
948
- this.$message.warning("请同意协议");
949
- return;
950
- }
951
- if (!cvUtils.isMobile(this.account_mobile)) {
952
- this.$message.warning("请输入正确的手机号码"), this.$refs.account_mobile.focus();
953
- return;
954
- }
955
- if (!this.account_password) {
956
- this.$message.warning("请输入密码"), this.$refs.account_password.focus();
957
- return;
958
- }
959
- if (this.loginMode == "reg" && this.account_password != this.account_password2) {
960
- this.$message.warning("确认密码输入不一致"), this.$refs.account_password2.focus();
961
- return;
962
- }
963
- if (this.codeNeed && !this.captcha_code) {
964
- this.$message.warning("请输入验证码"), this.$refs.captcha_code.focus();
965
- return;
966
- }
967
- this.passportHandle2(null, "MobilePwdLogin");
968
- });
969
- },
970
- // 多商户选择登录
971
- loginBusinessCheck(n) {
972
- this.account_mobile = n.account_mobile_show, this.account_business_id = n.business_id, n.acc_rules_type == "sy-org-admin" ? this.passportHandle2(null, "OrgAdminPwdLogin") : n.acc_rules_type == "sy-org-staff" && this.passportHandle2(null, "OrgStaffPwdLogin");
973
- },
974
- passportHandle2(n, a) {
975
- let _ = this.$message({
976
- iconClass: "ElIconLoading",
977
- message: "正在登录...",
978
- duration: 0
979
- });
980
- this.loadOngoing = !0, localStorage.setItem("cacheLoginMobile", this.account_mobile);
981
- try {
982
- let m = {};
983
- this.loginMode == "access" ? (m = {
984
- account_mobile: this.account_mobile,
985
- business_id: this.account_business_id,
986
- account_password: this.account_password,
987
- captcha_code: this.captcha_code,
988
- captcha_key: this.codeKey
989
- }, (a == "OrgAdminPwdLogin" || a == "OrgStaffPwdLogin") && (m.temp_token = this.chainTempToken)) : this.loginMode == "reg" && (m = {
990
- account_mobile: this.account_mobile,
991
- business_id: this.account_business_id,
992
- account_password: this.account_password,
993
- captcha_code: this.captcha_code,
994
- captcha_key: this.codeKey,
995
- reg_invite: this.reg_invite
996
- }), this.$request.setOptions({
997
- timeout: 1e4
998
- }).flagPost("BASE_PASSPORT_PASSPORT", {
999
- handleType: a,
1000
- ...m
1001
- }).then((c) => {
1002
- _.close(), this.loadOngoing = !1, c.status == 200 ? this.adminLoginSucc(c) : c.status == 400130 ? (this.$message.error("验证码有误!"), this.refreshCode(), this.codeNeed = !0) : (this.$message.error(c.msg), this.refreshCode());
1003
- }).catch((c) => {
1004
- this.loadOngoing = !1, this.chainShowFlag = !1, _.close(), this.refreshCode(), this.codeNeed = !0;
1005
- });
1006
- } catch {
1007
- this.$message.error("登录异常"), _.close(), this.loadOngoing = !1, this.refreshCode();
1008
- }
1009
- },
1010
- async adminLoginSucc(n) {
1011
- let a = n.data || {};
1012
- if (a.result_type == "chain")
1013
- this.chainAccountList = a.result_data || [], this.chainShowFlag = !0, this.chainTempToken = a.result_token || "";
1014
- else {
1015
- const _ = a.result_data || {};
1016
- await re().SA_ACCOUNT_SIGNIN(_), this.codeNeed = !1, this.$message({
1017
- type: "success",
1018
- message: "登录成功...",
1019
- duration: 800,
1020
- onClose: () => {
1021
- this.goNext();
1022
- }
1023
- });
1024
- }
1025
- },
1026
- chainReselection() {
1027
- this.refreshCode(), this.chainShowFlag = !1;
1028
- },
1029
- scanCreate(n) {
1030
- new Y(this.$refs.qrCodeUrl, {
1031
- text: n,
1032
- width: 180,
1033
- height: 180,
1034
- margin: 2,
1035
- colorDark: "#000000",
1036
- //前景色
1037
- colorLight: "#ffffff",
1038
- //背景色
1039
- correctLevel: Y.CorrectLevel.L
1040
- //容错等级
1041
- // correctLevel: QRCode.CorrectLevel.H //容错等级
1042
- });
1043
- },
1044
- scanQrcodeRefresh() {
1045
- if (this.loginMode != "qrcode" || this.qrcodeLoad)
1046
- return !1;
1047
- this.qrcodeExpiredShow = !1, this.qrcodeScanVererr = 0, this.$nextTick(() => {
1048
- document.getElementById("qrcode").innerHTML = "", clearInterval(this.qrcodeTimer), this.qrcodeLoad = !0, this.$request.flagGet("BASE_PASSPORT_SCAN_QRCODE", {
1049
- name: "app",
1050
- fun: "scanQrcode"
1051
- }).then((n) => {
1052
- var a;
1053
- n.status == 200 ? (this.scanCreate((a = n == null ? void 0 : n.data) == null ? void 0 : a.checkLogin), this.qrcodeTimer = window.setInterval(() => {
1054
- var _;
1055
- this.scanCheckFunc((_ = n == null ? void 0 : n.data) == null ? void 0 : _.scanCode);
1056
- }, 3e3)) : result.status == 404;
1057
- }).catch((n) => {
1058
- }).finally((n) => {
1059
- this.qrcodeLoad = !1;
1060
- });
1061
- });
1062
- },
1063
- scanCheckFunc(n) {
1064
- if (this.qrcodeScanVererr++, this.qrcodeScanVererr > this.qrcodeScanVernum)
1065
- return clearInterval(this.qrcodeTimer), this.qrcodeExpiredShow = !0, !1;
1066
- this.$request.flagPost("BASE_PASSPORT_SCAN_CHECK", {
1067
- name: "app",
1068
- fun: "scanCheck",
1069
- scanCode: n || ""
1070
- }).then((a) => {
1071
- var m, c;
1072
- if (a.status == 200) {
1073
- var _ = a.msg && ((m = a == null ? void 0 : a.data) == null ? void 0 : m.scanCVal) || "";
1074
- _ != "" && (clearInterval(this.qrcodeTimer), this.scanLoginFunc(n, (c = a == null ? void 0 : a.data) == null ? void 0 : c.scanCVal));
1075
- } else a.status == 405 && (clearInterval(this.qrcodeTimer), this.qrcodeExpiredShow = !0);
1076
- }).catch(() => {
1077
- });
1078
- },
1079
- scanLoginFunc(n, a) {
1080
- this.$message({
1081
- type: "success",
1082
- message: "扫码成功,请稍后...",
1083
- duration: 1500
1084
- }), this.$request.flagPost("BASE_PASSPORT_SCAN_LOGIN", {
1085
- name: "app",
1086
- fun: "scanLogin",
1087
- scanCode: n,
1088
- scanCVal: a
1089
- }).then((_) => {
1090
- if (_.status == 200) {
1091
- let m = this.$message({
1092
- iconClass: "ElIconLoading",
1093
- message: "正在安全登录中,请稍后...",
1094
- duration: 0
1095
- });
1096
- setTimeout(() => {
1097
- m.close(), this.$message({
1098
- message: _.msg,
1099
- type: _.status == 200 ? "success" : "error"
1100
- });
1101
- }, 2e3);
1102
- }
1103
- }).catch(() => {
1104
- });
1105
- },
1106
- goNext() {
1107
- this.loginJump = !0;
1108
- let n = cvUtils.urlQueryToObj(this.$route.query);
1109
- const a = decodeURIComponent(n.from || "");
1110
- a ? X.idbSetItem("clearCache", "login").then((_) => {
1111
- window.location.replace(a);
1112
- }) : this.$router.push({ path: "/" });
1113
- },
1114
- setTheme(n) {
1115
- ne().SA_THEMES_SET(n);
1116
- },
1117
- setLanguage(n) {
1118
- oe().SA_LANGUAGE_SET(n);
1119
- },
1120
- inputServerUrl() {
1121
- },
1122
- inputServerChack(n) {
1123
- return new Promise((a, _) => {
1124
- let m = n;
1125
- /\/api\/$/.test(m) || (m = m + (cvUtils.strRightExists(m, "/") ? "api/" : "/api/")), /^https*:\/\//i.test(m) || (m = `https://${m}`), se.setOptions({
1126
- checkNetwork: !1
1127
- }).flagGet("SYS_SETT_ALL", {}).then(async ({ data: c }) => {
1128
- typeof c.server_version > "u" && typeof c.all_group_mute > "u" ? _(`服务器(${cvUtils.urlGetDomain(n)})版本过低`) : (m != this.sysServerUrl && (await X.idbSetItem("sysServerUrl", m), window.location.reload()), a());
1129
- }).catch(({ ret: c, msg: g }) => {
1130
- if (c === -1001) {
1131
- if (!/^https*:\/\//i.test(n)) {
1132
- this.inputServerChack(`http://${n}`).then(a).catch(_);
1133
- return;
1134
- }
1135
- g = "服务器地址无效";
1136
- }
1137
- _(g);
1138
- });
1139
- });
1140
- }
1141
- }
1142
- }, fe = { class: "cloud-login-wrap" }, pe = {
1143
- key: 0,
1144
- class: "cloud-login-main"
1145
- }, _e = { class: "cloud-login-logo no-dark-content can-click" }, ve = ["src"], me = {
1146
- key: 0,
1147
- class: "cloud-login-box"
1148
- }, we = { class: "login-title" }, Ce = { class: "login-subtitle" }, Le = { class: "cloud-login-mode-access" }, Te = { class: "login-switch" }, Se = {
1149
- key: 1,
1150
- class: "cloud-login-box"
1151
- }, Ae = { class: "login-mode-switch" }, be = { class: "login-mode-switch-box" }, Ee = { class: "login-title" }, ye = { class: "login-subtitle" }, ke = { class: "cloud-login-mode-access" }, Ie = {
1152
- key: 0,
1153
- class: "code-load"
1154
- }, De = {
1155
- key: 1,
1156
- class: "code-error"
1157
- }, Pe = ["src"], Me = { class: "cloud-login-other" }, Be = { class: "cloud-login-other" }, Oe = {
1158
- key: 0,
1159
- class: "login-switch"
1160
- }, Ne = {
1161
- key: 1,
1162
- class: "page-login-oauth"
1163
- }, xe = {
1164
- key: 2,
1165
- class: "cloud-login-box"
1166
- }, Ue = { class: "login-mode-switch" }, Re = { class: "login-mode-switch-box" }, Ve = { class: "login-title" }, He = { class: "login-subtitle" }, Fe = {
1167
- id: "qrcode",
1168
- ref: "qrCodeUrl"
1169
- }, Qe = {
1170
- key: 3,
1171
- class: "cloud-login-box"
1172
- }, $e = { class: "login-title" }, Ge = { class: "login-subtitle" }, qe = { class: "cloud-login-mode-access" }, Ke = { class: "page-login-oauth" };
1173
- function Je(n, a, _, m, c, g) {
1174
- const A = U("el-input"), D = U("el-button"), w = U("cv-icons"), C = U("el-tooltip"), L = U("ElIconLoading"), O = U("el-checkbox"), y = U("SwitchBusiness");
1175
- return b(), P("div", fe, [
1176
- c.chainShowFlag ? B("", !0) : (b(), P("div", pe, [
1177
- f("div", _e, [
1178
- f("img", {
1179
- src: n.cacheInstInfo.LAST_IP_LOGO,
1180
- alt: ""
1181
- }, null, 8, ve)
1182
- ]),
1183
- c.loginMode == "reg" ? (b(), P("div", me, [
1184
- f("div", we, T(n.cacheInstInfo.LAST_IP_TITLE), 1),
1185
- f("div", Ce, T(n.$t("输入您的信息以创建帐户。")), 1),
1186
- f("div", Le, [
1187
- f("form", null, [
1188
- E(A, {
1189
- modelValue: c.account_password2,
1190
- "onUpdate:modelValue": a[0] || (a[0] = (v) => c.account_password2 = v),
1191
- ref: "account_password2",
1192
- "prefix-icon": "ElIconLock",
1193
- placeholder: n.$t("输入确认密码"),
1194
- type: "password",
1195
- size: "large",
1196
- clearable: ""
1197
- }, null, 8, ["modelValue", "placeholder"]),
1198
- c.regInviteNeed ? (b(), G(A, {
1199
- key: 0,
1200
- modelValue: c.reg_invite,
1201
- "onUpdate:modelValue": a[1] || (a[1] = (v) => c.reg_invite = v),
1202
- ref: "reg_invite",
1203
- class: "login-code",
1204
- placeholder: n.$t("请输入注册邀请码"),
1205
- type: "text",
1206
- size: "large",
1207
- clearable: ""
1208
- }, {
1209
- prepend: N(() => [
1210
- R(" " + T(n.$t("邀请码")) + " ", 1)
1211
- ]),
1212
- _: 1
1213
- }, 8, ["modelValue", "placeholder"])) : B("", !0)
1214
- ]),
1215
- E(D, null, {
1216
- default: N(() => [
1217
- R(T(c.loginJump ? "注册成功" : "注册"), 1)
1218
- ]),
1219
- _: 1
1220
- }),
1221
- f("div", Te, [
1222
- R(T(n.$t("已经有帐号?")) + " ", 1),
1223
- f("a", {
1224
- href: "javascript:void(0)",
1225
- onClick: a[2] || (a[2] = (v) => g.switchLoginMode("access"))
1226
- }, T(n.$t("登录帐号")), 1)
1227
- ])
1228
- ])
1229
- ])) : B("", !0),
1230
- c.loginMode == "access" ? (b(), P("div", Se, [
1231
- f("div", Ae, [
1232
- f("div", be, [
1233
- E(C, {
1234
- content: "扫码登录",
1235
- placement: "left"
1236
- }, {
1237
- default: N(() => [
1238
- f("span", {
1239
- class: "login-mode-switch-icon",
1240
- onClick: a[3] || (a[3] = (v) => g.switchLoginMode("qrcode"))
1241
- }, [
1242
- E(w, {
1243
- type: "cvSvgBaseQrcode",
1244
- size: "45"
1245
- })
1246
- ])
1247
- ]),
1248
- _: 1
1249
- })
1250
- ])
1251
- ]),
1252
- f("div", Ee, T(n.cacheInstInfo.LAST_IP_TITLE), 1),
1253
- f("div", ye, T(n.$t("输入您的凭证以访问您的帐户。")), 1),
1254
- f("div", ke, [
1255
- f("form", null, [
1256
- E(A, {
1257
- modelValue: c.account_mobile,
1258
- "onUpdate:modelValue": a[4] || (a[4] = (v) => c.account_mobile = v),
1259
- ref: "account_mobile",
1260
- "prefix-icon": "ElIconUser",
1261
- placeholder: n.$t("输入您的手机账号"),
1262
- type: "text",
1263
- size: "large",
1264
- maxlength: "11",
1265
- onBlur: g.onBlur,
1266
- clearable: ""
1267
- }, null, 8, ["modelValue", "placeholder", "onBlur"]),
1268
- E(A, {
1269
- modelValue: c.account_password,
1270
- "onUpdate:modelValue": a[5] || (a[5] = (v) => c.account_password = v),
1271
- ref: "account_password",
1272
- "prefix-icon": "ElIconLock",
1273
- placeholder: n.$t("输入您的密码"),
1274
- type: "password",
1275
- size: "large",
1276
- clearable: "",
1277
- onKeydown: le(g.accessLoginFunc, ["enter"])
1278
- }, null, 8, ["modelValue", "placeholder", "onKeydown"]),
1279
- c.codeNeed ? (b(), G(A, {
1280
- key: 0,
1281
- modelValue: c.captcha_code,
1282
- "onUpdate:modelValue": a[7] || (a[7] = (v) => c.captcha_code = v),
1283
- ref: "captcha_code",
1284
- class: "login-code",
1285
- placeholder: n.$t("输入图形验证码"),
1286
- type: "text",
1287
- size: "large",
1288
- clearable: ""
1289
- }, {
1290
- prefix: N(() => [
1291
- E(w, { type: "cvSvgCircleCheck" })
1292
- ]),
1293
- append: N(() => [
1294
- f("div", {
1295
- class: "login-code-end",
1296
- onClick: a[6] || (a[6] = (...v) => g.refreshCode && g.refreshCode(...v))
1297
- }, [
1298
- c.codeLoad > 0 ? (b(), P("div", Ie, [
1299
- E(L)
1300
- ])) : c.codeUrl === "error" ? (b(), P("span", De, T(n.$t("加载失败")), 1)) : (b(), P("img", {
1301
- key: 2,
1302
- src: c.codeUrl
1303
- }, null, 8, Pe))
1304
- ])
1305
- ]),
1306
- _: 1
1307
- }, 8, ["modelValue", "placeholder"])) : B("", !0)
1308
- ]),
1309
- E(D, {
1310
- type: "primary",
1311
- loading: c.loadOngoing || c.loginJump,
1312
- size: "large",
1313
- style: { width: "100%", "margin-bottom": "15px" },
1314
- onClick: g.accessLoginFunc
1315
- }, {
1316
- default: N(() => [
1317
- R(T(c.loginJump ? "登录成功" : "登录"), 1)
1318
- ]),
1319
- _: 1
1320
- }, 8, ["loading", "onClick"]),
1321
- f("div", Me, [
1322
- E(O, {
1323
- modelValue: c.cache_privacy,
1324
- "onUpdate:modelValue": a[9] || (a[9] = (v) => c.cache_privacy = v),
1325
- "true-value": "on",
1326
- "false-value": "off",
1327
- onChange: g.handleRrivacy
1328
- }, {
1329
- default: N(() => [
1330
- a[17] || (a[17] = R(" 同意 ", -1)),
1331
- f("a", {
1332
- onClick: a[8] || (a[8] = (v) => n.jumpsXieyi("privacy")),
1333
- target: "_blank"
1334
- }, "《隐私条款》")
1335
- ]),
1336
- _: 1
1337
- }, 8, ["modelValue", "onChange"]),
1338
- f("a", {
1339
- href: "javascript:void(0)",
1340
- onClick: a[10] || (a[10] = (...v) => g.handleForgot && g.handleForgot(...v))
1341
- }, T(n.$t("忘记密码了?")), 1)
1342
- ]),
1343
- f("div", Be, [
1344
- n.cacheInstConfig.open_business_reg == "on" ? (b(), P("div", Oe, [
1345
- R(T(n.$t("还没有帐号?")) + " ", 1),
1346
- f("a", {
1347
- href: "javascript:void(0)",
1348
- onClick: a[11] || (a[11] = (v) => g.switchLoginMode("reg"))
1349
- }, T(n.$t("注册帐号")), 1)
1350
- ])) : B("", !0),
1351
- n.cacheInstConfig.open_business_oauth2 == "on" ? (b(), P("div", Ne, [
1352
- f("a", {
1353
- href: "javascript:void(0)",
1354
- onClick: a[12] || (a[12] = (v) => g.switchLoginMode("oauth2"))
1355
- }, T(n.$t("OAuth2授权登陆")), 1)
1356
- ])) : B("", !0)
1357
- ])
1358
- ])
1359
- ])) : B("", !0),
1360
- c.loginMode == "qrcode" ? (b(), P("div", xe, [
1361
- f("div", Ue, [
1362
- f("div", Re, [
1363
- E(C, {
1364
- content: "帐号登录",
1365
- placement: "left"
1366
- }, {
1367
- default: N(() => [
1368
- f("span", {
1369
- class: "login-mode-switch-icon",
1370
- onClick: a[13] || (a[13] = (v) => g.switchLoginMode("access"))
1371
- }, [
1372
- E(w, {
1373
- type: "cvSvgBasePc",
1374
- size: "45"
1375
- })
1376
- ])
1377
- ]),
1378
- _: 1
1379
- })
1380
- ])
1381
- ]),
1382
- f("div", Ve, T(n.$t("扫码登录")), 1),
1383
- f("div", He, [
1384
- E(w, {
1385
- type: "cvSvgActionScan",
1386
- size: "20",
1387
- style: { "margin-right": "10px" }
1388
- }),
1389
- R(" " + T(n.$t(`请使用【${n.cacheInstInfo.LAST_IP_BRAND}】移动端扫描二维码`)), 1)
1390
- ]),
1391
- f("div", {
1392
- class: "login-qrcode",
1393
- onClick: a[14] || (a[14] = (...v) => g.scanQrcodeRefresh && g.scanQrcodeRefresh(...v))
1394
- }, [
1395
- f("div", Fe, null, 512)
1396
- ])
1397
- ])) : B("", !0),
1398
- c.loginMode == "oauth2" ? (b(), P("div", Qe, [
1399
- f("div", $e, T(n.cacheInstInfo.LAST_IP_TITLE), 1),
1400
- f("div", Ge, T(n.$t("输入您的信息以创建帐户。")), 1),
1401
- f("div", qe, [
1402
- f("div", Ke, [
1403
- f("a", {
1404
- href: "javascript:void(0)",
1405
- onClick: a[15] || (a[15] = (v) => g.switchLoginMode("access"))
1406
- }, T(n.$t("帐号登录")), 1)
1407
- ])
1408
- ])
1409
- ])) : B("", !0)
1410
- ])),
1411
- c.chainShowFlag ? (b(), G(y, {
1412
- key: 1,
1413
- modelValue: c.chainAccountList,
1414
- "onUpdate:modelValue": a[16] || (a[16] = (v) => c.chainAccountList = v),
1415
- reselectTitle: "重新登录",
1416
- onReselectFunc: g.chainReselection,
1417
- onSelectFunc: g.loginBusinessCheck
1418
- }, null, 8, ["modelValue", "onReselectFunc", "onSelectFunc"])) : B("", !0)
1419
- ]);
1420
- }
1421
- const We = /* @__PURE__ */ te(ge, [["render", Je]]);
1422
- export {
1423
- We as default
1424
- };