@10yun/open-sdk 0.3.89

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.
@@ -0,0 +1,1433 @@
1
+ import { _ as ee, s as te, H as ie, u as oe, a as se, b as ne, c as re } from "./index-CYEmAMQY.js";
2
+ import "pinia";
3
+ import { resolveComponent as R, createElementBlock as I, openBlock as E, createCommentVNode as B, createBlock as G, createElementVNode as f, toDisplayString as b, createVNode as A, withCtx as N, createTextVNode as U, withKeys as ae } from "vue";
4
+ function le(n) {
5
+ return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
6
+ }
7
+ var Q = { exports: {} }, he = Q.exports, X;
8
+ function ce() {
9
+ return X || (X = 1, function(n, a) {
10
+ var m;
11
+ (function(p, h) {
12
+ n.exports = h();
13
+ })(he, function() {
14
+ function p(e) {
15
+ this.mode = d.MODE_8BIT_BYTE, this.data = e, this.parsedData = [];
16
+ for (var t = 0, i = this.data.length; t < i; t++) {
17
+ var o = [], s = this.data.charCodeAt(t);
18
+ s > 65536 ? (o[0] = 240 | (s & 1835008) >>> 18, o[1] = 128 | (s & 258048) >>> 12, o[2] = 128 | (s & 4032) >>> 6, o[3] = 128 | s & 63) : s > 2048 ? (o[0] = 224 | (s & 61440) >>> 12, o[1] = 128 | (s & 4032) >>> 6, o[2] = 128 | s & 63) : s > 128 ? (o[0] = 192 | (s & 1984) >>> 6, o[1] = 128 | s & 63) : o[0] = s, this.parsedData.push(o);
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
+ p.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 h(e, t) {
32
+ this.typeNumber = e, this.errorCorrectLevel = t, this.modules = null, this.moduleCount = 0, this.dataCache = null, this.dataList = [];
33
+ }
34
+ h.prototype = {
35
+ addData: function(e) {
36
+ var t = new p(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 o = 0; o < this.moduleCount; o++)
55
+ this.modules[i][o] = 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 = h.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 o = -1; o <= 7; o++)
63
+ t + o <= -1 || this.moduleCount <= t + o || (0 <= i && i <= 6 && (o == 0 || o == 6) || 0 <= o && o <= 6 && (i == 0 || i == 6) || 2 <= i && i <= 4 && 2 <= o && o <= 4 ? this.modules[e + i][t + o] = !0 : this.modules[e + i][t + o] = !1);
64
+ },
65
+ getBestMaskPattern: function() {
66
+ for (var e = 0, t = 0, i = 0; i < 8; i++) {
67
+ this.makeImpl(!0, i);
68
+ var o = v.getLostPoint(this);
69
+ (i == 0 || e > o) && (e = o, t = i);
70
+ }
71
+ return t;
72
+ },
73
+ createMovieClip: function(e, t, i) {
74
+ var o = e.createEmptyMovieClip(t, i), s = 1;
75
+ this.make();
76
+ for (var l = 0; l < this.modules.length; l++)
77
+ for (var c = l * s, r = 0; r < this.modules[l].length; r++) {
78
+ var u = r * s, _ = this.modules[l][r];
79
+ _ && (o.beginFill(0, 100), o.moveTo(u, c), o.lineTo(u + s, c), o.lineTo(u + s, c + s), o.lineTo(u, c + s), o.endFill());
80
+ }
81
+ return o;
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 = v.getPatternPosition(this.typeNumber), t = 0; t < e.length; t++)
91
+ for (var i = 0; i < e.length; i++) {
92
+ var o = e[t], s = e[i];
93
+ if (this.modules[o][s] == null)
94
+ for (var l = -2; l <= 2; l++)
95
+ for (var c = -2; c <= 2; c++)
96
+ l == -2 || l == 2 || c == -2 || c == 2 || l == 0 && c == 0 ? this.modules[o + l][s + c] = !0 : this.modules[o + l][s + c] = !1;
97
+ }
98
+ },
99
+ setupTypeNumber: function(e) {
100
+ for (var t = v.getBCHTypeNumber(this.typeNumber), i = 0; i < 18; i++) {
101
+ var o = !e && (t >> i & 1) == 1;
102
+ this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = o;
103
+ }
104
+ for (var i = 0; i < 18; i++) {
105
+ var o = !e && (t >> i & 1) == 1;
106
+ this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = o;
107
+ }
108
+ },
109
+ setupTypeInfo: function(e, t) {
110
+ for (var i = this.errorCorrectLevel << 3 | t, o = v.getBCHTypeInfo(i), s = 0; s < 15; s++) {
111
+ var l = !e && (o >> s & 1) == 1;
112
+ s < 6 ? this.modules[s][8] = l : s < 8 ? this.modules[s + 1][8] = l : this.modules[this.moduleCount - 15 + s][8] = l;
113
+ }
114
+ for (var s = 0; s < 15; s++) {
115
+ var l = !e && (o >> s & 1) == 1;
116
+ s < 8 ? this.modules[8][this.moduleCount - s - 1] = l : s < 9 ? this.modules[8][15 - s - 1 + 1] = l : this.modules[8][15 - s - 1] = l;
117
+ }
118
+ this.modules[this.moduleCount - 8][8] = !e;
119
+ },
120
+ mapData: function(e, t) {
121
+ for (var i = -1, o = this.moduleCount - 1, s = 7, l = 0, c = this.moduleCount - 1; c > 0; c -= 2)
122
+ for (c == 6 && c--; ; ) {
123
+ for (var r = 0; r < 2; r++)
124
+ if (this.modules[o][c - r] == null) {
125
+ var u = !1;
126
+ l < e.length && (u = (e[l] >>> s & 1) == 1);
127
+ var _ = v.getMask(t, o, c - r);
128
+ _ && (u = !u), this.modules[o][c - r] = u, s--, s == -1 && (l++, s = 7);
129
+ }
130
+ if (o += i, o < 0 || this.moduleCount <= o) {
131
+ o -= i, i = -i;
132
+ break;
133
+ }
134
+ }
135
+ }
136
+ }, h.PAD0 = 236, h.PAD1 = 17, h.createData = function(e, t, i) {
137
+ for (var o = k.getRSBlocks(e, t), s = new w(), l = 0; l < i.length; l++) {
138
+ var c = i[l];
139
+ s.put(c.mode, 4), s.put(c.getLength(), v.getLengthInBits(c.mode, e)), c.write(s);
140
+ }
141
+ for (var r = 0, l = 0; l < o.length; l++)
142
+ r += o[l].dataCount;
143
+ if (s.getLengthInBits() > r * 8)
144
+ throw new Error("code length overflow. (" + s.getLengthInBits() + ">" + r * 8 + ")");
145
+ for (s.getLengthInBits() + 4 <= r * 8 && s.put(0, 4); s.getLengthInBits() % 8 != 0; )
146
+ s.putBit(!1);
147
+ for (; !(s.getLengthInBits() >= r * 8 || (s.put(h.PAD0, 8), s.getLengthInBits() >= r * 8)); )
148
+ s.put(h.PAD1, 8);
149
+ return h.createBytes(s, o);
150
+ }, h.createBytes = function(e, t) {
151
+ for (var i = 0, o = 0, s = 0, l = new Array(t.length), c = new Array(t.length), r = 0; r < t.length; r++) {
152
+ var u = t[r].dataCount, _ = t[r].totalCount - u;
153
+ o = Math.max(o, u), s = Math.max(s, _), l[r] = new Array(u);
154
+ for (var g = 0; g < l[r].length; g++)
155
+ l[r][g] = 255 & e.buffer[g + i];
156
+ i += u;
157
+ var y = v.getErrorCorrectPolynomial(_), S = new O(l[r], y.getLength() - 1), M = S.mod(y);
158
+ c[r] = new Array(y.getLength() - 1);
159
+ for (var g = 0; g < c[r].length; g++) {
160
+ var D = g + M.getLength() - c[r].length;
161
+ c[r][g] = D >= 0 ? M.get(D) : 0;
162
+ }
163
+ }
164
+ for (var x = 0, g = 0; g < t.length; g++)
165
+ x += t[g].totalCount;
166
+ for (var H = new Array(x), F = 0, g = 0; g < o; g++)
167
+ for (var r = 0; r < t.length; r++)
168
+ g < l[r].length && (H[F++] = l[r][g]);
169
+ for (var g = 0; g < s; g++)
170
+ for (var r = 0; r < t.length; r++)
171
+ g < c[r].length && (H[F++] = c[r][g]);
172
+ return H;
173
+ };
174
+ for (var d = { MODE_NUMBER: 1, MODE_ALPHA_NUM: 2, MODE_8BIT_BYTE: 4, MODE_KANJI: 8 }, T = { L: 1, M: 0, Q: 3, H: 2 }, P = {
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
+ }, v = {
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; v.getBCHDigit(t) - v.getBCHDigit(v.G15) >= 0; )
231
+ t ^= v.G15 << v.getBCHDigit(t) - v.getBCHDigit(v.G15);
232
+ return (e << 10 | t) ^ v.G15_MASK;
233
+ },
234
+ getBCHTypeNumber: function(e) {
235
+ for (var t = e << 12; v.getBCHDigit(t) - v.getBCHDigit(v.G18) >= 0; )
236
+ t ^= v.G18 << v.getBCHDigit(t) - v.getBCHDigit(v.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 v.PATTERN_POSITION_TABLE[e - 1];
246
+ },
247
+ getMask: function(e, t, i) {
248
+ switch (e) {
249
+ case P.PATTERN000:
250
+ return (t + i) % 2 == 0;
251
+ case P.PATTERN001:
252
+ return t % 2 == 0;
253
+ case P.PATTERN010:
254
+ return i % 3 == 0;
255
+ case P.PATTERN011:
256
+ return (t + i) % 3 == 0;
257
+ case P.PATTERN100:
258
+ return (Math.floor(t / 2) + Math.floor(i / 3)) % 2 == 0;
259
+ case P.PATTERN101:
260
+ return t * i % 2 + t * i % 3 == 0;
261
+ case P.PATTERN110:
262
+ return (t * i % 2 + t * i % 3) % 2 == 0;
263
+ case P.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 d.MODE_NUMBER:
278
+ return 10;
279
+ case d.MODE_ALPHA_NUM:
280
+ return 9;
281
+ case d.MODE_8BIT_BYTE:
282
+ return 8;
283
+ case d.MODE_KANJI:
284
+ return 8;
285
+ default:
286
+ throw new Error("mode:" + e);
287
+ }
288
+ else if (t < 27)
289
+ switch (e) {
290
+ case d.MODE_NUMBER:
291
+ return 12;
292
+ case d.MODE_ALPHA_NUM:
293
+ return 11;
294
+ case d.MODE_8BIT_BYTE:
295
+ return 16;
296
+ case d.MODE_KANJI:
297
+ return 10;
298
+ default:
299
+ throw new Error("mode:" + e);
300
+ }
301
+ else if (t < 41)
302
+ switch (e) {
303
+ case d.MODE_NUMBER:
304
+ return 14;
305
+ case d.MODE_ALPHA_NUM:
306
+ return 13;
307
+ case d.MODE_8BIT_BYTE:
308
+ return 16;
309
+ case d.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, o = 0; o < t; o++)
319
+ for (var s = 0; s < t; s++) {
320
+ for (var l = 0, c = e.isDark(o, s), r = -1; r <= 1; r++)
321
+ if (!(o + r < 0 || t <= o + r))
322
+ for (var u = -1; u <= 1; u++)
323
+ s + u < 0 || t <= s + u || r == 0 && u == 0 || c == e.isDark(o + r, s + u) && l++;
324
+ l > 5 && (i += 3 + l - 5);
325
+ }
326
+ for (var o = 0; o < t - 1; o++)
327
+ for (var s = 0; s < t - 1; s++) {
328
+ var _ = 0;
329
+ e.isDark(o, s) && _++, e.isDark(o + 1, s) && _++, e.isDark(o, s + 1) && _++, e.isDark(o + 1, s + 1) && _++, (_ == 0 || _ == 4) && (i += 3);
330
+ }
331
+ for (var o = 0; o < t; o++)
332
+ for (var s = 0; s < t - 6; s++)
333
+ e.isDark(o, s) && !e.isDark(o, s + 1) && e.isDark(o, s + 2) && e.isDark(o, s + 3) && e.isDark(o, s + 4) && !e.isDark(o, s + 5) && e.isDark(o, s + 6) && (i += 40);
334
+ for (var s = 0; s < t; s++)
335
+ for (var o = 0; o < t - 6; o++)
336
+ e.isDark(o, s) && !e.isDark(o + 1, s) && e.isDark(o + 2, s) && e.isDark(o + 3, s) && e.isDark(o + 4, s) && !e.isDark(o + 5, s) && e.isDark(o + 6, s) && (i += 40);
337
+ for (var g = 0, s = 0; s < t; s++)
338
+ for (var o = 0; o < t; o++)
339
+ e.isDark(o, s) && g++;
340
+ var y = Math.abs(100 * g / t / t - 50) / 5;
341
+ return i += y * 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 o = 0; o < e.length - i; o++)
371
+ this.num[o] = e[o + 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 o = 0; o < e.getLength(); o++)
383
+ t[i + o] ^= C.gexp(C.glog(this.get(i)) + C.glog(e.get(o)));
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()), o = 0; o < this.getLength(); o++)
390
+ i[o] = this.get(o);
391
+ for (var o = 0; o < e.getLength(); o++)
392
+ i[o] ^= C.gexp(C.glog(e.get(o)) + t);
393
+ return new O(i, 0).mod(e);
394
+ }
395
+ };
396
+ function k(e, t) {
397
+ this.totalCount = e, this.dataCount = t;
398
+ }
399
+ k.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
+ ], k.getRSBlocks = function(e, t) {
561
+ var i = k.getRsBlockTable(e, t);
562
+ if (i == null)
563
+ throw new Error("bad rs block @ typeNumber:" + e + "/errorCorrectLevel:" + t);
564
+ for (var o = i.length / 3, s = [], l = 0; l < o; l++)
565
+ for (var c = i[l * 3 + 0], r = i[l * 3 + 1], u = i[l * 3 + 2], _ = 0; _ < c; _++)
566
+ s.push(new k(r, u));
567
+ return s;
568
+ }, k.getRsBlockTable = function(e, t) {
569
+ switch (t) {
570
+ case T.L:
571
+ return k.RS_BLOCK_TABLE[(e - 1) * 4 + 0];
572
+ case T.M:
573
+ return k.RS_BLOCK_TABLE[(e - 1) * 4 + 1];
574
+ case T.Q:
575
+ return k.RS_BLOCK_TABLE[(e - 1) * 4 + 2];
576
+ case T.H:
577
+ return k.RS_BLOCK_TABLE[(e - 1) * 4 + 3];
578
+ default:
579
+ return;
580
+ }
581
+ };
582
+ function w() {
583
+ this.buffer = [], this.length = 0;
584
+ }
585
+ w.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 Y() {
645
+ return typeof CanvasRenderingContext2D < "u";
646
+ }
647
+ function $() {
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, o = this._el, s = t.getModuleCount();
662
+ Math.floor(i.width / s), Math.floor(i.height / s), this.clear();
663
+ function l(g, y) {
664
+ var S = document.createElementNS("http://www.w3.org/2000/svg", g);
665
+ for (var M in y) y.hasOwnProperty(M) && S.setAttribute(M, y[M]);
666
+ return S;
667
+ }
668
+ var c = l("svg", {
669
+ viewBox: "0 0 " + String(s) + " " + String(s),
670
+ width: "100%",
671
+ height: "100%",
672
+ fill: i.colorLight
673
+ });
674
+ c.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"), o.appendChild(c), c.appendChild(l("rect", { fill: i.colorLight, width: "100%", height: "100%" })), c.appendChild(l("rect", { fill: i.colorDark, width: "1", height: "1", id: "template" }));
675
+ for (var r = 0; r < s; r++)
676
+ for (var u = 0; u < s; u++)
677
+ if (t.isDark(r, u)) {
678
+ var _ = l("use", { x: String(u), y: String(r) });
679
+ _.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template"), c.appendChild(_);
680
+ }
681
+ }, e.prototype.clear = function() {
682
+ for (; this._el.hasChildNodes(); ) this._el.removeChild(this._el.lastChild);
683
+ }, e;
684
+ }(), W = document.documentElement.tagName.toLowerCase() === "svg", J = W ? K : Y() ? 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, c, r, u, _, g, y, S, M) {
691
+ if ("nodeName" in l && /img/i.test(l.nodeName))
692
+ for (var D = arguments.length - 1; D >= 1; D--)
693
+ arguments[D] = arguments[D] * t;
694
+ else typeof S > "u" && (arguments[1] *= t, arguments[2] *= t, arguments[3] *= t, arguments[4] *= t);
695
+ i.apply(this, arguments);
696
+ };
697
+ }
698
+ function o(l, c) {
699
+ var r = this;
700
+ if (r._fFail = c, r._fSuccess = l, r._bSupportDataURI === null) {
701
+ var u = document.createElement("img"), _ = function() {
702
+ r._bSupportDataURI = !1, r._fFail && r._fFail.call(r);
703
+ }, g = function() {
704
+ r._bSupportDataURI = !0, r._fSuccess && r._fSuccess.call(r);
705
+ };
706
+ u.onabort = _, u.onerror = _, u.onload = g, 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 s = function(l, c) {
711
+ this._bIsPainted = !1, this._android = $(), this._htOption = c, this._elCanvas = document.createElement("canvas"), this._elCanvas.width = c.width, this._elCanvas.height = c.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 s.prototype.draw = function(l) {
714
+ var c = this._elImage, r = this._oContext, u = this._htOption, _ = l.getModuleCount(), g = u.width / _, y = u.height / _, S = Math.round(g), M = Math.round(y);
715
+ c.style.display = "none", this.clear();
716
+ for (var D = 0; D < _; D++)
717
+ for (var x = 0; x < _; x++) {
718
+ var H = l.isDark(D, x), F = x * g, q = D * y;
719
+ r.strokeStyle = H ? u.colorDark : u.colorLight, r.lineWidth = 1, r.fillStyle = H ? u.colorDark : u.colorLight, r.fillRect(F, q, g, y), r.strokeRect(Math.floor(F) + 0.5, Math.floor(q) + 0.5, S, M), r.strokeRect(Math.ceil(F) - 0.5, Math.ceil(q) - 0.5, S, M);
720
+ }
721
+ this._bIsPainted = !0;
722
+ }, s.prototype.makeImage = function() {
723
+ this._bIsPainted && o.call(this, e);
724
+ }, s.prototype.isPainted = function() {
725
+ return this._bIsPainted;
726
+ }, s.prototype.clear = function() {
727
+ this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height), this._bIsPainted = !1;
728
+ }, s.prototype.round = function(l) {
729
+ return l && Math.floor(l * 1e3) / 1e3;
730
+ }, s;
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, o = this._el, s = t.getModuleCount(), l = Math.floor(i.width / s), c = Math.floor(i.height / s), r = ['<table style="border:0;border-collapse:collapse;">'], u = 0; u < s; u++) {
737
+ r.push("<tr>");
738
+ for (var _ = 0; _ < s; _++)
739
+ r.push(
740
+ '<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:' + l + "px;height:" + c + "px;background-color:" + (t.isDark(u, _) ? i.colorDark : i.colorLight) + ';"></td>'
741
+ );
742
+ r.push("</tr>");
743
+ }
744
+ r.push("</table>"), o.innerHTML = r.join("");
745
+ var g = o.childNodes[0], y = (i.width - g.offsetWidth) / 2, S = (i.height - g.offsetHeight) / 2;
746
+ y > 0 && S > 0 && (g.style.margin = S + "px " + y + "px");
747
+ }, e.prototype.clear = function() {
748
+ this._el.innerHTML = "";
749
+ }, e;
750
+ }();
751
+ function j(e, t) {
752
+ for (var i = 1, o = Z(e), s = 0, l = V.length; s <= l; s++) {
753
+ var c = 0;
754
+ switch (t) {
755
+ case T.L:
756
+ c = V[s][0];
757
+ break;
758
+ case T.M:
759
+ c = V[s][1];
760
+ break;
761
+ case T.Q:
762
+ c = V[s][2];
763
+ break;
764
+ case T.H:
765
+ c = V[s][3];
766
+ break;
767
+ }
768
+ if (o <= c)
769
+ break;
770
+ i++;
771
+ }
772
+ if (i > V.length)
773
+ throw new Error("Too long data");
774
+ return i;
775
+ }
776
+ function Z(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 m = function(e, t) {
781
+ if (this._htOption = {
782
+ width: 256,
783
+ height: 256,
784
+ typeNumber: 4,
785
+ colorDark: "#000000",
786
+ colorLight: "#ffffff",
787
+ correctLevel: T.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 = $(), this._el = e, this._oQRCode = null, this._oDrawing = new J(this._el, this._htOption), this._htOption.text && this.makeCode(this._htOption.text);
794
+ }, m.prototype.makeCode = function(e) {
795
+ this._oQRCode = new h(j(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
+ }, m.prototype.makeImage = function() {
797
+ typeof this._oDrawing.makeImage == "function" && (!this._android || this._android >= 3) && this._oDrawing.makeImage();
798
+ }, m.prototype.clear = function() {
799
+ this._oDrawing.clear();
800
+ }, m.CorrectLevel = T, m;
801
+ });
802
+ }(Q)), Q.exports;
803
+ }
804
+ var ue = ce();
805
+ const z = /* @__PURE__ */ le(ue), de = {
806
+ components: { switchBusiness: te },
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
+ let a = this.$refs.account_mobile.$el.querySelector("input");
862
+ const p = getComputedStyle(a).background.match(/rgb\((\d+,\s*\d+,\s*\d+)\)/);
863
+ p && p[0] === "rgb(232, 240, 254)" && this.onBlur();
864
+ });
865
+ },
866
+ loginMode(n) {
867
+ n == "reg" && (this.regInviteNeed = !!this.systemConfig.reg_invite_need);
868
+ }
869
+ },
870
+ computed: {
871
+ openProductPrivacyUrl() {
872
+ var n;
873
+ return ((n = this.openProductInfo) == null ? void 0 : n.privacy_url) || "";
874
+ },
875
+ loginLastLogo() {
876
+ return this.openProductInfo.platinfo_log || "/logo-nobg.png";
877
+ },
878
+ loginSystemTitle() {
879
+ var p, h;
880
+ let n = (p = this.openProductInfo) == null ? void 0 : p.system_type;
881
+ return ((h = this.openProductInfo) == null ? void 0 : h.info_title) || n;
882
+ },
883
+ currentLanguage() {
884
+ return this.languageList[this.languageName] || "Language";
885
+ }
886
+ },
887
+ created() {
888
+ this.cache_remember = localStorage.getItem("cacheLoginRemember") || "off", this.cache_privacy = localStorage.getItem("cacheLoginPrivacy") || "off", this.account_mobile = localStorage.getItem("cacheLoginMobile") || "";
889
+ },
890
+ async mounted() {
891
+ this.loginMode = this.$route.query.type === "reg" ? "reg" : "access", this.$Electron && (this.$Electron.sendMessage("webTabDestroyAll"), this.$Electron.sendMessage("childWindowDestroyAll")), re().$subscribe((n, a) => {
892
+ n.events.key == "useSSOLogin" && a.useSSOLogin == !0 && this.inputServerUrl();
893
+ });
894
+ },
895
+ beforeDestroy() {
896
+ clearInterval(this.qrcodeTimer), this.loginJump = !1, this.account_password = "", this.account_password2 = "", this.captcha_code = "", this.reg_invite = "";
897
+ },
898
+ methods: {
899
+ handleRemember(n) {
900
+ n == "on" ? localStorage.setItem("cacheLoginRemember", n) : localStorage.removeItem("cacheLoginRemember");
901
+ },
902
+ handleRrivacy(n) {
903
+ n == "on" ? (localStorage.setItem("cacheLoginPrivacy", n), this.chackServerUrl().catch((a) => {
904
+ })) : localStorage.removeItem("cacheLoginPrivacy"), this.cache_privacy = n;
905
+ },
906
+ handleForgot() {
907
+ this.$message.warning("请联系管理员!");
908
+ },
909
+ chackServerUrl(n) {
910
+ return new Promise((a, m) => {
911
+ a();
912
+ });
913
+ },
914
+ /* 修改登录方式 */
915
+ switchLoginMode(n) {
916
+ this.chackServerUrl(!0).then(() => {
917
+ 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;
918
+ });
919
+ },
920
+ refreshCode() {
921
+ this.captcha_code = "", !(this.codeLoad > 0) && (setTimeout((n) => {
922
+ this.codeLoad++;
923
+ }, 600), this.$request.flagGet("BASE_PASSPORT_CODE_DATA", {
924
+ account_mobile: this.account_mobile
925
+ }).then(({ data: n }) => {
926
+ var a;
927
+ this.codeKey = n.key, this.codeUrl = n.img, (a = this.$refs.captcha_code) == null || a.focus();
928
+ }).catch((n) => {
929
+ this.codeUrl = "error";
930
+ }).finally((n) => {
931
+ this.codeLoad--;
932
+ }));
933
+ },
934
+ onBlur() {
935
+ if (!this.account_mobile) {
936
+ this.codeNeed = !1;
937
+ return;
938
+ }
939
+ this.loadOngoing = !0, this.$request.flagGet("BASE_PASSPORT_CODE_NEED", {
940
+ account_mobile: this.account_mobile
941
+ }).then((n) => {
942
+ this.loadOngoing = !1, n.data == "need" ? (this.refreshCode(), this.codeNeed = !0) : this.codeNeed = !1;
943
+ }).catch((n) => {
944
+ this.loadOngoing = !1;
945
+ }).finally((n) => {
946
+ this.loadOngoing = !1;
947
+ });
948
+ },
949
+ accessLoginFunc() {
950
+ if (this.loadOngoing)
951
+ return this.$message({
952
+ type: "warning",
953
+ message: "正在登录中,请勿重新确认~"
954
+ }), !1;
955
+ this.chackServerUrl(!0).then(() => {
956
+ 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") {
957
+ this.$message.warning("请同意协议");
958
+ return;
959
+ }
960
+ if (!cvUtils.isMobile(this.account_mobile)) {
961
+ this.$message.warning("请输入正确的手机号码"), this.$refs.account_mobile.focus();
962
+ return;
963
+ }
964
+ if (!this.account_password) {
965
+ this.$message.warning("请输入密码"), this.$refs.account_password.focus();
966
+ return;
967
+ }
968
+ if (this.loginMode == "reg" && this.account_password != this.account_password2) {
969
+ this.$message.warning("确认密码输入不一致"), this.$refs.account_password2.focus();
970
+ return;
971
+ }
972
+ if (this.codeNeed && !this.captcha_code) {
973
+ this.$message.warning("请输入验证码"), this.$refs.captcha_code.focus();
974
+ return;
975
+ }
976
+ this.passportHandle2(null, "MobilePwdLogin");
977
+ });
978
+ },
979
+ // 多商户选择登录
980
+ loginBusinessCheck(n) {
981
+ this.account_mobile = n.account_mobile_show, this.account_business_id = n.business_id, n.acc_role_type == "sy-org-admin" ? this.passportHandle2(null, "OrgAdminPwdLogin") : n.acc_role_type == "sy-org-staff" && this.passportHandle2(null, "OrgStaffPwdLogin");
982
+ },
983
+ passportHandle2(n, a) {
984
+ let m = this.$message({
985
+ iconClass: "ElIconLoading",
986
+ message: "正在登录...",
987
+ duration: 0
988
+ });
989
+ this.loadOngoing = !0, localStorage.setItem("cacheLoginMobile", this.account_mobile);
990
+ try {
991
+ let p = {};
992
+ this.loginMode == "access" ? (p = {
993
+ account_mobile: this.account_mobile,
994
+ business_id: this.account_business_id,
995
+ account_password: this.account_password,
996
+ captcha_code: this.captcha_code,
997
+ captcha_key: this.codeKey
998
+ }, (a == "OrgAdminPwdLogin" || a == "OrgStaffPwdLogin") && (p.temp_token = this.chainTempToken)) : this.loginMode == "reg" && (p = {
999
+ account_mobile: this.account_mobile,
1000
+ business_id: this.account_business_id,
1001
+ account_password: this.account_password,
1002
+ captcha_code: this.captcha_code,
1003
+ captcha_key: this.codeKey,
1004
+ reg_invite: this.reg_invite
1005
+ }), this.$request.setOptions({
1006
+ timeout: 1e4
1007
+ }).flagPost("BASE_PASSPORT_PASSPORT", {
1008
+ handleType: a,
1009
+ ...p
1010
+ }).then((h) => {
1011
+ m.close(), this.loadOngoing = !1, h.status == 200 ? this.adminLoginSucc(h) : h.status == 403 ? (this.$message.error("验证码有误!"), this.refreshCode(), this.codeNeed = !0) : (this.$message.error(h.msg), this.refreshCode());
1012
+ }).catch((h) => {
1013
+ this.loadOngoing = !1, this.chainShowFlag = !1, m.close(), this.refreshCode(), this.codeNeed = !0;
1014
+ });
1015
+ } catch {
1016
+ this.$message.error("登录异常"), m.close(), this.loadOngoing = !1, this.refreshCode();
1017
+ }
1018
+ },
1019
+ async adminLoginSucc(n) {
1020
+ let a = n.data || {};
1021
+ if (a.result_type == "chain")
1022
+ this.chainAccountList = a.result_data || [], this.chainShowFlag = !0, this.chainTempToken = a.result_token || "";
1023
+ else {
1024
+ const m = a.result_data || {};
1025
+ await ne().SA_ACCOUNT_SIGNIN(m), this.codeNeed = !1, this.$message({
1026
+ type: "success",
1027
+ message: "登录成功...",
1028
+ duration: 800,
1029
+ onClose: () => {
1030
+ this.goNext();
1031
+ }
1032
+ });
1033
+ }
1034
+ },
1035
+ chainReselection() {
1036
+ this.refreshCode(), this.chainShowFlag = !1;
1037
+ },
1038
+ scanCreate(n) {
1039
+ new z(this.$refs.qrCodeUrl, {
1040
+ text: n,
1041
+ width: 180,
1042
+ height: 180,
1043
+ margin: 2,
1044
+ colorDark: "#000000",
1045
+ //前景色
1046
+ colorLight: "#ffffff",
1047
+ //背景色
1048
+ correctLevel: z.CorrectLevel.L
1049
+ //容错等级
1050
+ // correctLevel: QRCode.CorrectLevel.H //容错等级
1051
+ });
1052
+ },
1053
+ scanQrcodeRefresh() {
1054
+ if (this.loginMode != "qrcode" || this.qrcodeLoad)
1055
+ return !1;
1056
+ this.qrcodeExpiredShow = !1, this.qrcodeScanVererr = 0, this.$nextTick(() => {
1057
+ document.getElementById("qrcode").innerHTML = "", clearInterval(this.qrcodeTimer), this.qrcodeLoad = !0, this.$request.flagGet("BASE_PASSPORT_SCAN_QRCODE", {
1058
+ name: "app",
1059
+ fun: "scanQrcode"
1060
+ }).then((n) => {
1061
+ var a;
1062
+ n.status == 200 ? (this.scanCreate((a = n == null ? void 0 : n.data) == null ? void 0 : a.checkLogin), this.qrcodeTimer = window.setInterval(() => {
1063
+ var m;
1064
+ this.scanCheckFunc((m = n == null ? void 0 : n.data) == null ? void 0 : m.scanCode);
1065
+ }, 3e3)) : result.status == 404;
1066
+ }).catch((n) => {
1067
+ }).finally((n) => {
1068
+ this.qrcodeLoad = !1;
1069
+ });
1070
+ });
1071
+ },
1072
+ scanCheckFunc(n) {
1073
+ if (this.qrcodeScanVererr++, this.qrcodeScanVererr > this.qrcodeScanVernum)
1074
+ return clearInterval(this.qrcodeTimer), this.qrcodeExpiredShow = !0, !1;
1075
+ this.$request.flagPost("BASE_PASSPORT_SCAN_CHECK", {
1076
+ name: "app",
1077
+ fun: "scanCheck",
1078
+ scanCode: n || ""
1079
+ }).then((a) => {
1080
+ var p, h;
1081
+ if (a.status == 200) {
1082
+ var m = a.msg && ((p = a == null ? void 0 : a.data) == null ? void 0 : p.scanCVal) || "";
1083
+ m != "" && (clearInterval(this.qrcodeTimer), this.scanLoginFunc(n, (h = a == null ? void 0 : a.data) == null ? void 0 : h.scanCVal));
1084
+ } else a.status == 405 && (clearInterval(this.qrcodeTimer), this.qrcodeExpiredShow = !0);
1085
+ }).catch(() => {
1086
+ });
1087
+ },
1088
+ scanLoginFunc(n, a) {
1089
+ this.$message({
1090
+ type: "success",
1091
+ message: "扫码成功,请稍后...",
1092
+ duration: 1500
1093
+ }), this.$request.flagPost("BASE_PASSPORT_SCAN_LOGIN", {
1094
+ name: "app",
1095
+ fun: "scanLogin",
1096
+ scanCode: n,
1097
+ scanCVal: a
1098
+ }).then((m) => {
1099
+ if (m.status == 200) {
1100
+ let p = this.$message({
1101
+ iconClass: "ElIconLoading",
1102
+ message: "正在安全登录中,请稍后...",
1103
+ duration: 0
1104
+ });
1105
+ setTimeout(() => {
1106
+ p.close(), this.$message({
1107
+ message: m.msg,
1108
+ type: m.status == 200 ? "success" : "error"
1109
+ });
1110
+ }, 2e3);
1111
+ }
1112
+ }).catch(() => {
1113
+ });
1114
+ },
1115
+ goNext() {
1116
+ this.loginJump = !0;
1117
+ let n = cvUtils.urlQueryToObj(this.$route.query);
1118
+ const a = decodeURIComponent(n.from || "");
1119
+ a ? gbIdbObj.idbSetItem("clearCache", "login").then((m) => {
1120
+ window.location.replace(a);
1121
+ }) : this.$router.push({ path: "/" });
1122
+ },
1123
+ setTheme(n) {
1124
+ se().SA_THEMES_SET(n);
1125
+ },
1126
+ setLanguage(n) {
1127
+ oe().SA_LANGUAGE_SET(n);
1128
+ },
1129
+ inputServerUrl() {
1130
+ },
1131
+ inputServerChack(n) {
1132
+ return new Promise((a, m) => {
1133
+ let p = n;
1134
+ /\/api\/$/.test(p) || (p = p + (cvUtils.strRightExists(p, "/") ? "api/" : "/api/")), /^https*:\/\//i.test(p) || (p = `https://${p}`), ie.setOptions({
1135
+ checkNetwork: !1
1136
+ }).flagGet("SYS_SETT_ALL", {}).then(async ({ data: h }) => {
1137
+ typeof h.server_version > "u" && typeof h.all_group_mute > "u" ? m(`服务器(${cvUtils.urlGetDomain(n)})版本过低`) : (p != this.cacheServerUrl && (await gbIdbObj.idbSetItem("cacheServerUrl", p), window.location.reload()), a());
1138
+ }).catch(({ ret: h, msg: d }) => {
1139
+ if (h === -1001) {
1140
+ if (!/^https*:\/\//i.test(n)) {
1141
+ this.inputServerChack(`http://${n}`).then(a).catch(m);
1142
+ return;
1143
+ }
1144
+ d = "服务器地址无效";
1145
+ }
1146
+ m(d);
1147
+ });
1148
+ });
1149
+ }
1150
+ }
1151
+ }, ge = { class: "cloud-login-wrap" }, fe = {
1152
+ key: 0,
1153
+ class: "cloud-login-main"
1154
+ }, _e = { class: "cloud-login-logo no-dark-content can-click" }, pe = ["src"], me = {
1155
+ key: 0,
1156
+ class: "cloud-login-box"
1157
+ }, ve = { class: "login-title" }, we = { class: "login-subtitle" }, Ce = { class: "cloud-login-mode-access" }, Le = { class: "login-switch" }, be = {
1158
+ key: 1,
1159
+ class: "cloud-login-box"
1160
+ }, ye = { class: "login-mode-switch" }, Te = { class: "login-mode-switch-box" }, Ee = { class: "login-title" }, Ae = { class: "login-subtitle" }, ke = { class: "cloud-login-mode-access" }, Se = {
1161
+ key: 0,
1162
+ class: "code-load"
1163
+ }, De = {
1164
+ key: 1,
1165
+ class: "code-error"
1166
+ }, Pe = ["src"], Ie = { class: "cloud-login-other" }, Me = ["href"], Be = { class: "cloud-login-other" }, Oe = {
1167
+ key: 0,
1168
+ class: "login-switch"
1169
+ }, Ne = {
1170
+ key: 1,
1171
+ class: "page-login-oauth"
1172
+ }, xe = {
1173
+ key: 2,
1174
+ class: "cloud-login-box"
1175
+ }, Re = { class: "login-mode-switch" }, Ue = { class: "login-mode-switch-box" }, Ve = { class: "login-title" }, He = { class: "login-subtitle" }, Fe = {
1176
+ id: "qrcode",
1177
+ ref: "qrCodeUrl"
1178
+ }, Qe = {
1179
+ key: 3,
1180
+ class: "cloud-login-box"
1181
+ }, qe = { class: "login-title" }, Ge = { class: "login-subtitle" }, $e = { class: "cloud-login-mode-access" }, Ke = { class: "page-login-oauth" };
1182
+ function Je(n, a, m, p, h, d) {
1183
+ const T = R("el-input"), P = R("el-button"), v = R("cv-icons"), C = R("el-tooltip"), L = R("ElIconLoading"), O = R("el-checkbox"), k = R("switchBusiness");
1184
+ return E(), I("div", ge, [
1185
+ h.chainShowFlag ? B("", !0) : (E(), I("div", fe, [
1186
+ f("div", _e, [
1187
+ f("img", {
1188
+ src: d.loginLastLogo,
1189
+ alt: ""
1190
+ }, null, 8, pe)
1191
+ ]),
1192
+ h.loginMode == "reg" ? (E(), I("div", me, [
1193
+ f("div", ve, b(d.loginSystemTitle), 1),
1194
+ f("div", we, b(n.$t("输入您的信息以创建帐户。")), 1),
1195
+ f("div", Ce, [
1196
+ f("form", null, [
1197
+ A(T, {
1198
+ modelValue: h.account_password2,
1199
+ "onUpdate:modelValue": a[0] || (a[0] = (w) => h.account_password2 = w),
1200
+ ref: "account_password2",
1201
+ "prefix-icon": "ElIconLock",
1202
+ placeholder: n.$t("输入确认密码"),
1203
+ type: "password",
1204
+ size: "large",
1205
+ clearable: ""
1206
+ }, null, 8, ["modelValue", "placeholder"]),
1207
+ h.regInviteNeed ? (E(), G(T, {
1208
+ key: 0,
1209
+ modelValue: h.reg_invite,
1210
+ "onUpdate:modelValue": a[1] || (a[1] = (w) => h.reg_invite = w),
1211
+ ref: "reg_invite",
1212
+ class: "login-code",
1213
+ placeholder: n.$t("请输入注册邀请码"),
1214
+ type: "text",
1215
+ size: "large",
1216
+ clearable: ""
1217
+ }, {
1218
+ prepend: N(() => [
1219
+ U(" " + b(n.$t("邀请码")) + " ", 1)
1220
+ ]),
1221
+ _: 1
1222
+ }, 8, ["modelValue", "placeholder"])) : B("", !0)
1223
+ ]),
1224
+ A(P, null, {
1225
+ default: N(() => [
1226
+ U(b(h.loginJump ? "注册成功" : "注册"), 1)
1227
+ ]),
1228
+ _: 1
1229
+ }),
1230
+ f("div", Le, [
1231
+ U(b(n.$t("已经有帐号?")) + " ", 1),
1232
+ f("a", {
1233
+ href: "javascript:void(0)",
1234
+ onClick: a[2] || (a[2] = (w) => d.switchLoginMode("access"))
1235
+ }, b(n.$t("登录帐号")), 1)
1236
+ ])
1237
+ ])
1238
+ ])) : B("", !0),
1239
+ h.loginMode == "access" ? (E(), I("div", be, [
1240
+ f("div", ye, [
1241
+ f("div", Te, [
1242
+ A(C, {
1243
+ content: "扫码登录",
1244
+ placement: "left"
1245
+ }, {
1246
+ default: N(() => [
1247
+ f("span", {
1248
+ class: "login-mode-switch-icon",
1249
+ onClick: a[3] || (a[3] = (w) => d.switchLoginMode("qrcode"))
1250
+ }, [
1251
+ A(v, {
1252
+ type: "cvSvgBaseQrcode",
1253
+ size: "45"
1254
+ })
1255
+ ])
1256
+ ]),
1257
+ _: 1
1258
+ })
1259
+ ])
1260
+ ]),
1261
+ f("div", Ee, b(d.loginSystemTitle), 1),
1262
+ f("div", Ae, b(n.$t("输入您的凭证以访问您的帐户。")), 1),
1263
+ f("div", ke, [
1264
+ f("form", null, [
1265
+ A(T, {
1266
+ modelValue: h.account_mobile,
1267
+ "onUpdate:modelValue": a[4] || (a[4] = (w) => h.account_mobile = w),
1268
+ ref: "account_mobile",
1269
+ "prefix-icon": "ElIconUser",
1270
+ placeholder: n.$t("输入您的手机账号"),
1271
+ type: "text",
1272
+ size: "large",
1273
+ maxlength: "11",
1274
+ onBlur: d.onBlur,
1275
+ clearable: ""
1276
+ }, null, 8, ["modelValue", "placeholder", "onBlur"]),
1277
+ A(T, {
1278
+ modelValue: h.account_password,
1279
+ "onUpdate:modelValue": a[5] || (a[5] = (w) => h.account_password = w),
1280
+ ref: "account_password",
1281
+ "prefix-icon": "ElIconLock",
1282
+ placeholder: n.$t("输入您的密码"),
1283
+ type: "password",
1284
+ size: "large",
1285
+ clearable: "",
1286
+ onKeydown: ae(d.accessLoginFunc, ["enter"])
1287
+ }, null, 8, ["modelValue", "placeholder", "onKeydown"]),
1288
+ h.codeNeed ? (E(), G(T, {
1289
+ key: 0,
1290
+ modelValue: h.captcha_code,
1291
+ "onUpdate:modelValue": a[7] || (a[7] = (w) => h.captcha_code = w),
1292
+ ref: "captcha_code",
1293
+ class: "login-code",
1294
+ placeholder: n.$t("输入图形验证码"),
1295
+ type: "text",
1296
+ size: "large",
1297
+ clearable: ""
1298
+ }, {
1299
+ prefix: N(() => [
1300
+ A(v, { type: "cvSvgCircleCheck" })
1301
+ ]),
1302
+ append: N(() => [
1303
+ f("div", {
1304
+ class: "login-code-end",
1305
+ onClick: a[6] || (a[6] = (...w) => d.refreshCode && d.refreshCode(...w))
1306
+ }, [
1307
+ h.codeLoad > 0 ? (E(), I("div", Se, [
1308
+ A(L)
1309
+ ])) : h.codeUrl === "error" ? (E(), I("span", De, b(n.$t("加载失败")), 1)) : (E(), I("img", {
1310
+ key: 2,
1311
+ src: h.codeUrl
1312
+ }, null, 8, Pe))
1313
+ ])
1314
+ ]),
1315
+ _: 1
1316
+ }, 8, ["modelValue", "placeholder"])) : B("", !0)
1317
+ ]),
1318
+ A(P, {
1319
+ type: "primary",
1320
+ loading: h.loadOngoing || h.loginJump,
1321
+ size: "large",
1322
+ style: { width: "100%", "margin-bottom": "15px" },
1323
+ onClick: d.accessLoginFunc
1324
+ }, {
1325
+ default: N(() => [
1326
+ U(b(h.loginJump ? "登录成功" : "登录"), 1)
1327
+ ]),
1328
+ _: 1
1329
+ }, 8, ["loading", "onClick"]),
1330
+ f("div", Ie, [
1331
+ A(O, {
1332
+ modelValue: h.cache_privacy,
1333
+ "onUpdate:modelValue": a[8] || (a[8] = (w) => h.cache_privacy = w),
1334
+ "true-value": "on",
1335
+ "false-value": "off",
1336
+ onChange: d.handleRrivacy
1337
+ }, {
1338
+ default: N(() => [
1339
+ a[16] || (a[16] = U(" 同意 ")),
1340
+ f("a", {
1341
+ href: d.openProductPrivacyUrl,
1342
+ target: "_blank"
1343
+ }, "《隐私条款》", 8, Me)
1344
+ ]),
1345
+ _: 1
1346
+ }, 8, ["modelValue", "onChange"]),
1347
+ f("a", {
1348
+ href: "javascript:void(0)",
1349
+ onClick: a[9] || (a[9] = (...w) => d.handleForgot && d.handleForgot(...w))
1350
+ }, b(n.$t("忘记密码了?")), 1)
1351
+ ]),
1352
+ f("div", Be, [
1353
+ n.systemConfig.open_business_reg == "on" ? (E(), I("div", Oe, [
1354
+ U(b(n.$t("还没有帐号?")) + " ", 1),
1355
+ f("a", {
1356
+ href: "javascript:void(0)",
1357
+ onClick: a[10] || (a[10] = (w) => d.switchLoginMode("reg"))
1358
+ }, b(n.$t("注册帐号")), 1)
1359
+ ])) : B("", !0),
1360
+ n.systemConfig.open_business_oauth2 == "on" ? (E(), I("div", Ne, [
1361
+ f("a", {
1362
+ href: "javascript:void(0)",
1363
+ onClick: a[11] || (a[11] = (w) => d.switchLoginMode("oauth2"))
1364
+ }, b(n.$t("OAuth2授权登陆")), 1)
1365
+ ])) : B("", !0)
1366
+ ])
1367
+ ])
1368
+ ])) : B("", !0),
1369
+ h.loginMode == "qrcode" ? (E(), I("div", xe, [
1370
+ f("div", Re, [
1371
+ f("div", Ue, [
1372
+ A(C, {
1373
+ content: "帐号登录",
1374
+ placement: "left"
1375
+ }, {
1376
+ default: N(() => [
1377
+ f("span", {
1378
+ class: "login-mode-switch-icon",
1379
+ onClick: a[12] || (a[12] = (w) => d.switchLoginMode("access"))
1380
+ }, [
1381
+ A(v, {
1382
+ type: "cvSvgBasePc",
1383
+ size: "45"
1384
+ })
1385
+ ])
1386
+ ]),
1387
+ _: 1
1388
+ })
1389
+ ])
1390
+ ]),
1391
+ f("div", Ve, b(n.$t("扫码登录")), 1),
1392
+ f("div", He, [
1393
+ A(v, {
1394
+ type: "cvSvgActionScan",
1395
+ size: "20",
1396
+ style: { "margin-right": "10px" }
1397
+ }),
1398
+ U(" " + b(n.$t(`请使用【${d.loginSystemTitle}】移动端扫描二维码`)), 1)
1399
+ ]),
1400
+ f("div", {
1401
+ class: "login-qrcode",
1402
+ onClick: a[13] || (a[13] = (...w) => d.scanQrcodeRefresh && d.scanQrcodeRefresh(...w))
1403
+ }, [
1404
+ f("div", Fe, null, 512)
1405
+ ])
1406
+ ])) : B("", !0),
1407
+ h.loginMode == "oauth2" ? (E(), I("div", Qe, [
1408
+ f("div", qe, b(d.loginSystemTitle), 1),
1409
+ f("div", Ge, b(n.$t("输入您的信息以创建帐户。")), 1),
1410
+ f("div", $e, [
1411
+ f("div", Ke, [
1412
+ f("a", {
1413
+ href: "javascript:void(0)",
1414
+ onClick: a[14] || (a[14] = (w) => d.switchLoginMode("access"))
1415
+ }, b(n.$t("帐号登录")), 1)
1416
+ ])
1417
+ ])
1418
+ ])) : B("", !0)
1419
+ ])),
1420
+ h.chainShowFlag ? (E(), G(k, {
1421
+ key: 1,
1422
+ modelValue: h.chainAccountList,
1423
+ "onUpdate:modelValue": a[15] || (a[15] = (w) => h.chainAccountList = w),
1424
+ reselectTitle: "重新登录",
1425
+ onReselectFunc: d.chainReselection,
1426
+ onSelectFunc: d.loginBusinessCheck
1427
+ }, null, 8, ["modelValue", "onReselectFunc", "onSelectFunc"])) : B("", !0)
1428
+ ]);
1429
+ }
1430
+ const We = /* @__PURE__ */ ee(de, [["render", Je]]);
1431
+ export {
1432
+ We as default
1433
+ };