@genai-fi/base 4.3.7 → 4.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Button-BgSe1MyE.js → Button-HlUfDiMM.js} +3 -3
- package/dist/{CircularProgress-DgKnRiq7.js → CircularProgress-DZ8YZ0Dt.js} +345 -310
- package/dist/{Close-Cv_QwhIN.js → Close-TS8H1lQg.js} +1 -1
- package/dist/{DefaultPropsProvider-BurgXZzw.js → DefaultPropsProvider-B_x1hwuY.js} +2 -2
- package/dist/{DialogQR-DoM8ZHBM.js → DialogQR-ByOert0g.js} +4 -4
- package/dist/{FileSaver.min-DhePf63e.js → FileSaver.min-CDwyANUI.js} +57 -57
- package/dist/{FlashWifi-slUpI7sB.js → FlashWifi-CNanHNye.js} +1 -1
- package/dist/{Portal-MiwrHMB_.js → Portal-BdRLJx1y.js} +140 -133
- package/dist/assets/SidePanel.css +1 -1
- package/dist/assets/SvgLayer.css +1 -1
- package/dist/assets/Widget.css +1 -1
- package/dist/{browser-HW-wgeM2.js → browser-DWbgwj89.js} +421 -451
- package/dist/components/AlertPara/AlertPara.js +1 -1
- package/dist/components/Application/Application.js +724 -689
- package/dist/components/BusyButton/BusyButton.d.ts +4 -4
- package/dist/components/BusyButton/BusyButton.js +1 -1
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/ConnectionStatus/ConnectionStatus.js +3 -3
- package/dist/components/ConnectionStatus/FlashWifi.js +1 -1
- package/dist/components/Feedback/Feedback.js +4 -4
- package/dist/components/Feedback/Rating.js +1 -1
- package/dist/components/Help/Help.js +5 -5
- package/dist/components/LangSelect/LangSelect.js +1 -1
- package/dist/components/Motd/Motd.js +1 -1
- package/dist/components/PieScore/PieScore.js +9609 -6092
- package/dist/components/QRCode/DialogQR.js +4 -4
- package/dist/components/QRCode/QRCode.js +2 -2
- package/dist/components/SidePanel/SidePanel.d.ts +2 -1
- package/dist/components/SidePanel/SidePanel.js +91 -73
- package/dist/components/Webcam/Webcam.js +3 -3
- package/dist/components/WorkflowLayout/Widget.js +1460 -1438
- package/dist/{createSvgIcon-BM4dw4Lw.js → createSvgIcon-DjQWJ3wn.js} +2 -2
- package/dist/{createTheme-DV959X3d.js → createTheme-DnBeI7Zz.js} +752 -749
- package/dist/hooks/peer.js +1 -1
- package/dist/{index-SOhdqzHq.js → index-B_zFkp-8.js} +2 -2
- package/dist/react-CiLnfHJp.js +140 -0
- package/dist/services/peer2peer/Incoming.js +1 -1
- package/dist/services/peer2peer/Outgoing.js +1 -1
- package/dist/services/peer2peer/Peer2Peer.js +538 -541
- package/dist/services/peer2peer/PeerConnection.js +1 -1
- package/dist/state/webrtcState.js +1 -1
- package/dist/style/theme.js +1 -1
- package/dist/util/Observer.js +1 -1
- package/dist/util/zip.js +1 -1
- package/dist/vanilla-OLGM3aAq.js +439 -0
- package/package.json +3 -3
- package/dist/react-B9NW8BS7.js +0 -112
- package/dist/vanilla-BJxibF1U.js +0 -404
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
var z = {}, Q,
|
|
3
|
-
function
|
|
4
|
-
return
|
|
1
|
+
import { g as ne } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
2
|
+
var z = {}, Q, pt;
|
|
3
|
+
function re() {
|
|
4
|
+
return pt || (pt = 1, Q = function() {
|
|
5
5
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
6
6
|
}), Q;
|
|
7
7
|
}
|
|
8
|
-
var W = {}, U = {},
|
|
9
|
-
function
|
|
10
|
-
if (
|
|
11
|
-
|
|
8
|
+
var W = {}, U = {}, At;
|
|
9
|
+
function _() {
|
|
10
|
+
if (At) return U;
|
|
11
|
+
At = 1;
|
|
12
12
|
let r;
|
|
13
13
|
const o = [
|
|
14
14
|
0,
|
|
@@ -54,30 +54,30 @@ function F() {
|
|
|
54
54
|
3532,
|
|
55
55
|
3706
|
|
56
56
|
];
|
|
57
|
-
return U.getSymbolSize = function(
|
|
58
|
-
if (!
|
|
59
|
-
if (
|
|
60
|
-
return
|
|
61
|
-
}, U.getSymbolTotalCodewords = function(
|
|
62
|
-
return o[
|
|
57
|
+
return U.getSymbolSize = function(e) {
|
|
58
|
+
if (!e) throw new Error('"version" cannot be null or undefined');
|
|
59
|
+
if (e < 1 || e > 40) throw new Error('"version" should be in range from 1 to 40');
|
|
60
|
+
return e * 4 + 17;
|
|
61
|
+
}, U.getSymbolTotalCodewords = function(e) {
|
|
62
|
+
return o[e];
|
|
63
63
|
}, U.getBCHDigit = function(i) {
|
|
64
|
-
let
|
|
64
|
+
let e = 0;
|
|
65
65
|
for (; i !== 0; )
|
|
66
|
-
|
|
67
|
-
return
|
|
68
|
-
}, U.setToSJISFunction = function(
|
|
69
|
-
if (typeof
|
|
66
|
+
e++, i >>>= 1;
|
|
67
|
+
return e;
|
|
68
|
+
}, U.setToSJISFunction = function(e) {
|
|
69
|
+
if (typeof e != "function")
|
|
70
70
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
71
|
-
r =
|
|
71
|
+
r = e;
|
|
72
72
|
}, U.isKanjiModeEnabled = function() {
|
|
73
73
|
return typeof r < "u";
|
|
74
|
-
}, U.toSJIS = function(
|
|
75
|
-
return r(
|
|
74
|
+
}, U.toSJIS = function(e) {
|
|
75
|
+
return r(e);
|
|
76
76
|
}, U;
|
|
77
77
|
}
|
|
78
|
-
var Z = {},
|
|
79
|
-
function
|
|
80
|
-
return
|
|
78
|
+
var Z = {}, Rt;
|
|
79
|
+
function Ct() {
|
|
80
|
+
return Rt || (Rt = 1, (function(r) {
|
|
81
81
|
r.L = { bit: 1 }, r.M = { bit: 0 }, r.Q = { bit: 3 }, r.H = { bit: 2 };
|
|
82
82
|
function o(i) {
|
|
83
83
|
if (typeof i != "string")
|
|
@@ -99,21 +99,21 @@ function Et() {
|
|
|
99
99
|
throw new Error("Unknown EC Level: " + i);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
r.isValid = function(
|
|
103
|
-
return
|
|
104
|
-
}, r.from = function(
|
|
105
|
-
if (r.isValid(
|
|
106
|
-
return
|
|
102
|
+
r.isValid = function(e) {
|
|
103
|
+
return e && typeof e.bit < "u" && e.bit >= 0 && e.bit < 4;
|
|
104
|
+
}, r.from = function(e, t) {
|
|
105
|
+
if (r.isValid(e))
|
|
106
|
+
return e;
|
|
107
107
|
try {
|
|
108
|
-
return o(
|
|
108
|
+
return o(e);
|
|
109
109
|
} catch {
|
|
110
110
|
return t;
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
-
}(Z)), Z;
|
|
113
|
+
})(Z)), Z;
|
|
114
114
|
}
|
|
115
115
|
var X, Tt;
|
|
116
|
-
function
|
|
116
|
+
function oe() {
|
|
117
117
|
if (Tt) return X;
|
|
118
118
|
Tt = 1;
|
|
119
119
|
function r() {
|
|
@@ -125,8 +125,8 @@ function ue() {
|
|
|
125
125
|
return (this.buffer[i] >>> 7 - o % 8 & 1) === 1;
|
|
126
126
|
},
|
|
127
127
|
put: function(o, i) {
|
|
128
|
-
for (let
|
|
129
|
-
this.putBit((o >>> i -
|
|
128
|
+
for (let e = 0; e < i; e++)
|
|
129
|
+
this.putBit((o >>> i - e - 1 & 1) === 1);
|
|
130
130
|
},
|
|
131
131
|
getLengthInBits: function() {
|
|
132
132
|
return this.length;
|
|
@@ -137,54 +137,54 @@ function ue() {
|
|
|
137
137
|
}
|
|
138
138
|
}, X = r, X;
|
|
139
139
|
}
|
|
140
|
-
var x,
|
|
141
|
-
function
|
|
142
|
-
if (
|
|
143
|
-
|
|
140
|
+
var x, It;
|
|
141
|
+
function ie() {
|
|
142
|
+
if (It) return x;
|
|
143
|
+
It = 1;
|
|
144
144
|
function r(o) {
|
|
145
145
|
if (!o || o < 1)
|
|
146
146
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
147
147
|
this.size = o, this.data = new Uint8Array(o * o), this.reservedBit = new Uint8Array(o * o);
|
|
148
148
|
}
|
|
149
|
-
return r.prototype.set = function(o, i,
|
|
150
|
-
const
|
|
151
|
-
this.data[
|
|
149
|
+
return r.prototype.set = function(o, i, e, t) {
|
|
150
|
+
const n = o * this.size + i;
|
|
151
|
+
this.data[n] = e, t && (this.reservedBit[n] = !0);
|
|
152
152
|
}, r.prototype.get = function(o, i) {
|
|
153
153
|
return this.data[o * this.size + i];
|
|
154
|
-
}, r.prototype.xor = function(o, i,
|
|
155
|
-
this.data[o * this.size + i] ^=
|
|
154
|
+
}, r.prototype.xor = function(o, i, e) {
|
|
155
|
+
this.data[o * this.size + i] ^= e;
|
|
156
156
|
}, r.prototype.isReserved = function(o, i) {
|
|
157
157
|
return this.reservedBit[o * this.size + i];
|
|
158
158
|
}, x = r, x;
|
|
159
159
|
}
|
|
160
|
-
var $ = {},
|
|
161
|
-
function
|
|
162
|
-
return
|
|
163
|
-
const o =
|
|
164
|
-
r.getRowColCoords = function(
|
|
165
|
-
if (
|
|
166
|
-
const t = Math.floor(
|
|
160
|
+
var $ = {}, Nt;
|
|
161
|
+
function ue() {
|
|
162
|
+
return Nt || (Nt = 1, (function(r) {
|
|
163
|
+
const o = _().getSymbolSize;
|
|
164
|
+
r.getRowColCoords = function(e) {
|
|
165
|
+
if (e === 1) return [];
|
|
166
|
+
const t = Math.floor(e / 7) + 2, n = o(e), u = n === 145 ? 26 : Math.ceil((n - 13) / (2 * t - 2)) * 2, a = [n - 7];
|
|
167
167
|
for (let s = 1; s < t - 1; s++)
|
|
168
168
|
a[s] = a[s - 1] - u;
|
|
169
169
|
return a.push(6), a.reverse();
|
|
170
|
-
}, r.getPositions = function(
|
|
171
|
-
const t = [],
|
|
170
|
+
}, r.getPositions = function(e) {
|
|
171
|
+
const t = [], n = r.getRowColCoords(e), u = n.length;
|
|
172
172
|
for (let a = 0; a < u; a++)
|
|
173
173
|
for (let s = 0; s < u; s++)
|
|
174
174
|
a === 0 && s === 0 || // top-left
|
|
175
175
|
a === 0 && s === u - 1 || // bottom-left
|
|
176
|
-
a === u - 1 && s === 0 || t.push([
|
|
176
|
+
a === u - 1 && s === 0 || t.push([n[a], n[s]]);
|
|
177
177
|
return t;
|
|
178
178
|
};
|
|
179
|
-
}($)), $;
|
|
179
|
+
})($)), $;
|
|
180
180
|
}
|
|
181
|
-
var tt = {},
|
|
182
|
-
function
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
const r =
|
|
186
|
-
return tt.getPositions = function(
|
|
187
|
-
const t = r(
|
|
181
|
+
var tt = {}, Mt;
|
|
182
|
+
function se() {
|
|
183
|
+
if (Mt) return tt;
|
|
184
|
+
Mt = 1;
|
|
185
|
+
const r = _().getSymbolSize, o = 7;
|
|
186
|
+
return tt.getPositions = function(e) {
|
|
187
|
+
const t = r(e);
|
|
188
188
|
return [
|
|
189
189
|
// top-left
|
|
190
190
|
[0, 0],
|
|
@@ -195,9 +195,9 @@ function ce() {
|
|
|
195
195
|
];
|
|
196
196
|
}, tt;
|
|
197
197
|
}
|
|
198
|
-
var et = {},
|
|
199
|
-
function
|
|
200
|
-
return
|
|
198
|
+
var et = {}, Pt;
|
|
199
|
+
function ae() {
|
|
200
|
+
return Pt || (Pt = 1, (function(r) {
|
|
201
201
|
r.Patterns = {
|
|
202
202
|
PATTERN000: 0,
|
|
203
203
|
PATTERN001: 1,
|
|
@@ -219,11 +219,11 @@ function fe() {
|
|
|
219
219
|
}, r.from = function(t) {
|
|
220
220
|
return r.isValid(t) ? parseInt(t, 10) : void 0;
|
|
221
221
|
}, r.getPenaltyN1 = function(t) {
|
|
222
|
-
const
|
|
222
|
+
const n = t.size;
|
|
223
223
|
let u = 0, a = 0, s = 0, c = null, d = null;
|
|
224
|
-
for (let B = 0; B <
|
|
224
|
+
for (let B = 0; B < n; B++) {
|
|
225
225
|
a = s = 0, c = d = null;
|
|
226
|
-
for (let h = 0; h <
|
|
226
|
+
for (let h = 0; h < n; h++) {
|
|
227
227
|
let f = t.get(B, h);
|
|
228
228
|
f === c ? a++ : (a >= 5 && (u += o.N1 + (a - 5)), c = f, a = 1), f = t.get(h, B), f === d ? s++ : (s >= 5 && (u += o.N1 + (s - 5)), d = f, s = 1);
|
|
229
229
|
}
|
|
@@ -231,73 +231,73 @@ function fe() {
|
|
|
231
231
|
}
|
|
232
232
|
return u;
|
|
233
233
|
}, r.getPenaltyN2 = function(t) {
|
|
234
|
-
const
|
|
234
|
+
const n = t.size;
|
|
235
235
|
let u = 0;
|
|
236
|
-
for (let a = 0; a <
|
|
237
|
-
for (let s = 0; s <
|
|
236
|
+
for (let a = 0; a < n - 1; a++)
|
|
237
|
+
for (let s = 0; s < n - 1; s++) {
|
|
238
238
|
const c = t.get(a, s) + t.get(a, s + 1) + t.get(a + 1, s) + t.get(a + 1, s + 1);
|
|
239
239
|
(c === 4 || c === 0) && u++;
|
|
240
240
|
}
|
|
241
241
|
return u * o.N2;
|
|
242
242
|
}, r.getPenaltyN3 = function(t) {
|
|
243
|
-
const
|
|
243
|
+
const n = t.size;
|
|
244
244
|
let u = 0, a = 0, s = 0;
|
|
245
|
-
for (let c = 0; c <
|
|
245
|
+
for (let c = 0; c < n; c++) {
|
|
246
246
|
a = s = 0;
|
|
247
|
-
for (let d = 0; d <
|
|
247
|
+
for (let d = 0; d < n; d++)
|
|
248
248
|
a = a << 1 & 2047 | t.get(c, d), d >= 10 && (a === 1488 || a === 93) && u++, s = s << 1 & 2047 | t.get(d, c), d >= 10 && (s === 1488 || s === 93) && u++;
|
|
249
249
|
}
|
|
250
250
|
return u * o.N3;
|
|
251
251
|
}, r.getPenaltyN4 = function(t) {
|
|
252
|
-
let
|
|
252
|
+
let n = 0;
|
|
253
253
|
const u = t.data.length;
|
|
254
|
-
for (let s = 0; s < u; s++)
|
|
255
|
-
return Math.abs(Math.ceil(
|
|
254
|
+
for (let s = 0; s < u; s++) n += t.data[s];
|
|
255
|
+
return Math.abs(Math.ceil(n * 100 / u / 5) - 10) * o.N4;
|
|
256
256
|
};
|
|
257
|
-
function i(
|
|
258
|
-
switch (
|
|
257
|
+
function i(e, t, n) {
|
|
258
|
+
switch (e) {
|
|
259
259
|
case r.Patterns.PATTERN000:
|
|
260
|
-
return (t +
|
|
260
|
+
return (t + n) % 2 === 0;
|
|
261
261
|
case r.Patterns.PATTERN001:
|
|
262
262
|
return t % 2 === 0;
|
|
263
263
|
case r.Patterns.PATTERN010:
|
|
264
|
-
return
|
|
264
|
+
return n % 3 === 0;
|
|
265
265
|
case r.Patterns.PATTERN011:
|
|
266
|
-
return (t +
|
|
266
|
+
return (t + n) % 3 === 0;
|
|
267
267
|
case r.Patterns.PATTERN100:
|
|
268
|
-
return (Math.floor(t / 2) + Math.floor(
|
|
268
|
+
return (Math.floor(t / 2) + Math.floor(n / 3)) % 2 === 0;
|
|
269
269
|
case r.Patterns.PATTERN101:
|
|
270
|
-
return t *
|
|
270
|
+
return t * n % 2 + t * n % 3 === 0;
|
|
271
271
|
case r.Patterns.PATTERN110:
|
|
272
|
-
return (t *
|
|
272
|
+
return (t * n % 2 + t * n % 3) % 2 === 0;
|
|
273
273
|
case r.Patterns.PATTERN111:
|
|
274
|
-
return (t *
|
|
274
|
+
return (t * n % 3 + (t + n) % 2) % 2 === 0;
|
|
275
275
|
default:
|
|
276
|
-
throw new Error("bad maskPattern:" +
|
|
276
|
+
throw new Error("bad maskPattern:" + e);
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
-
r.applyMask = function(t,
|
|
280
|
-
const u =
|
|
279
|
+
r.applyMask = function(t, n) {
|
|
280
|
+
const u = n.size;
|
|
281
281
|
for (let a = 0; a < u; a++)
|
|
282
282
|
for (let s = 0; s < u; s++)
|
|
283
|
-
|
|
284
|
-
}, r.getBestMask = function(t,
|
|
283
|
+
n.isReserved(s, a) || n.xor(s, a, i(t, s, a));
|
|
284
|
+
}, r.getBestMask = function(t, n) {
|
|
285
285
|
const u = Object.keys(r.Patterns).length;
|
|
286
286
|
let a = 0, s = 1 / 0;
|
|
287
287
|
for (let c = 0; c < u; c++) {
|
|
288
|
-
|
|
288
|
+
n(c), r.applyMask(c, t);
|
|
289
289
|
const d = r.getPenaltyN1(t) + r.getPenaltyN2(t) + r.getPenaltyN3(t) + r.getPenaltyN4(t);
|
|
290
290
|
r.applyMask(c, t), d < s && (s = d, a = c);
|
|
291
291
|
}
|
|
292
292
|
return a;
|
|
293
293
|
};
|
|
294
|
-
}(et)), et;
|
|
294
|
+
})(et)), et;
|
|
295
295
|
}
|
|
296
|
-
var J = {},
|
|
297
|
-
function
|
|
298
|
-
if (
|
|
299
|
-
|
|
300
|
-
const r =
|
|
296
|
+
var J = {}, St;
|
|
297
|
+
function Wt() {
|
|
298
|
+
if (St) return J;
|
|
299
|
+
St = 1;
|
|
300
|
+
const r = Ct(), o = [
|
|
301
301
|
// L M Q H
|
|
302
302
|
1,
|
|
303
303
|
1,
|
|
@@ -622,8 +622,8 @@ function Xt() {
|
|
|
622
622
|
2040,
|
|
623
623
|
2430
|
|
624
624
|
];
|
|
625
|
-
return J.getBlocksCount = function(t,
|
|
626
|
-
switch (
|
|
625
|
+
return J.getBlocksCount = function(t, n) {
|
|
626
|
+
switch (n) {
|
|
627
627
|
case r.L:
|
|
628
628
|
return o[(t - 1) * 4 + 0];
|
|
629
629
|
case r.M:
|
|
@@ -635,8 +635,8 @@ function Xt() {
|
|
|
635
635
|
default:
|
|
636
636
|
return;
|
|
637
637
|
}
|
|
638
|
-
}, J.getTotalCodewordsCount = function(t,
|
|
639
|
-
switch (
|
|
638
|
+
}, J.getTotalCodewordsCount = function(t, n) {
|
|
639
|
+
switch (n) {
|
|
640
640
|
case r.L:
|
|
641
641
|
return i[(t - 1) * 4 + 0];
|
|
642
642
|
case r.M:
|
|
@@ -650,107 +650,107 @@ function Xt() {
|
|
|
650
650
|
}
|
|
651
651
|
}, J;
|
|
652
652
|
}
|
|
653
|
-
var nt = {}, K = {},
|
|
654
|
-
function
|
|
655
|
-
if (
|
|
656
|
-
|
|
653
|
+
var nt = {}, K = {}, bt;
|
|
654
|
+
function ce() {
|
|
655
|
+
if (bt) return K;
|
|
656
|
+
bt = 1;
|
|
657
657
|
const r = new Uint8Array(512), o = new Uint8Array(256);
|
|
658
|
-
return function() {
|
|
659
|
-
let
|
|
658
|
+
return (function() {
|
|
659
|
+
let e = 1;
|
|
660
660
|
for (let t = 0; t < 255; t++)
|
|
661
|
-
r[t] =
|
|
661
|
+
r[t] = e, o[e] = t, e <<= 1, e & 256 && (e ^= 285);
|
|
662
662
|
for (let t = 255; t < 512; t++)
|
|
663
663
|
r[t] = r[t - 255];
|
|
664
|
-
}(), K.log = function(
|
|
665
|
-
if (
|
|
666
|
-
return o[
|
|
667
|
-
}, K.exp = function(
|
|
668
|
-
return r[
|
|
669
|
-
}, K.mul = function(
|
|
670
|
-
return
|
|
664
|
+
})(), K.log = function(e) {
|
|
665
|
+
if (e < 1) throw new Error("log(" + e + ")");
|
|
666
|
+
return o[e];
|
|
667
|
+
}, K.exp = function(e) {
|
|
668
|
+
return r[e];
|
|
669
|
+
}, K.mul = function(e, t) {
|
|
670
|
+
return e === 0 || t === 0 ? 0 : r[o[e] + o[t]];
|
|
671
671
|
}, K;
|
|
672
672
|
}
|
|
673
|
-
var
|
|
674
|
-
function
|
|
675
|
-
return
|
|
676
|
-
const o =
|
|
677
|
-
r.mul = function(
|
|
678
|
-
const
|
|
679
|
-
for (let u = 0; u <
|
|
673
|
+
var Lt;
|
|
674
|
+
function fe() {
|
|
675
|
+
return Lt || (Lt = 1, (function(r) {
|
|
676
|
+
const o = ce();
|
|
677
|
+
r.mul = function(e, t) {
|
|
678
|
+
const n = new Uint8Array(e.length + t.length - 1);
|
|
679
|
+
for (let u = 0; u < e.length; u++)
|
|
680
680
|
for (let a = 0; a < t.length; a++)
|
|
681
|
-
|
|
682
|
-
return
|
|
683
|
-
}, r.mod = function(
|
|
684
|
-
let
|
|
685
|
-
for (;
|
|
686
|
-
const u =
|
|
681
|
+
n[u + a] ^= o.mul(e[u], t[a]);
|
|
682
|
+
return n;
|
|
683
|
+
}, r.mod = function(e, t) {
|
|
684
|
+
let n = new Uint8Array(e);
|
|
685
|
+
for (; n.length - t.length >= 0; ) {
|
|
686
|
+
const u = n[0];
|
|
687
687
|
for (let s = 0; s < t.length; s++)
|
|
688
|
-
|
|
688
|
+
n[s] ^= o.mul(t[s], u);
|
|
689
689
|
let a = 0;
|
|
690
|
-
for (; a <
|
|
691
|
-
|
|
690
|
+
for (; a < n.length && n[a] === 0; ) a++;
|
|
691
|
+
n = n.slice(a);
|
|
692
692
|
}
|
|
693
|
-
return
|
|
694
|
-
}, r.generateECPolynomial = function(
|
|
693
|
+
return n;
|
|
694
|
+
}, r.generateECPolynomial = function(e) {
|
|
695
695
|
let t = new Uint8Array([1]);
|
|
696
|
-
for (let
|
|
697
|
-
t = r.mul(t, new Uint8Array([1, o.exp(
|
|
696
|
+
for (let n = 0; n < e; n++)
|
|
697
|
+
t = r.mul(t, new Uint8Array([1, o.exp(n)]));
|
|
698
698
|
return t;
|
|
699
699
|
};
|
|
700
|
-
}(nt)), nt;
|
|
700
|
+
})(nt)), nt;
|
|
701
701
|
}
|
|
702
|
-
var rt,
|
|
703
|
-
function
|
|
704
|
-
if (
|
|
705
|
-
|
|
706
|
-
const r =
|
|
702
|
+
var rt, qt;
|
|
703
|
+
function le() {
|
|
704
|
+
if (qt) return rt;
|
|
705
|
+
qt = 1;
|
|
706
|
+
const r = fe();
|
|
707
707
|
function o(i) {
|
|
708
708
|
this.genPoly = void 0, this.degree = i, this.degree && this.initialize(this.degree);
|
|
709
709
|
}
|
|
710
|
-
return o.prototype.initialize = function(
|
|
711
|
-
this.degree =
|
|
712
|
-
}, o.prototype.encode = function(
|
|
710
|
+
return o.prototype.initialize = function(e) {
|
|
711
|
+
this.degree = e, this.genPoly = r.generateECPolynomial(this.degree);
|
|
712
|
+
}, o.prototype.encode = function(e) {
|
|
713
713
|
if (!this.genPoly)
|
|
714
714
|
throw new Error("Encoder not initialized");
|
|
715
|
-
const t = new Uint8Array(
|
|
716
|
-
t.set(
|
|
717
|
-
const
|
|
715
|
+
const t = new Uint8Array(e.length + this.degree);
|
|
716
|
+
t.set(e);
|
|
717
|
+
const n = r.mod(t, this.genPoly), u = this.degree - n.length;
|
|
718
718
|
if (u > 0) {
|
|
719
719
|
const a = new Uint8Array(this.degree);
|
|
720
|
-
return a.set(
|
|
720
|
+
return a.set(n, u), a;
|
|
721
721
|
}
|
|
722
|
-
return
|
|
722
|
+
return n;
|
|
723
723
|
}, rt = o, rt;
|
|
724
724
|
}
|
|
725
|
-
var ot = {}, it = {}, ut = {},
|
|
726
|
-
function
|
|
727
|
-
return
|
|
725
|
+
var ot = {}, it = {}, ut = {}, Dt;
|
|
726
|
+
function Zt() {
|
|
727
|
+
return Dt || (Dt = 1, ut.isValid = function(o) {
|
|
728
728
|
return !isNaN(o) && o >= 1 && o <= 40;
|
|
729
729
|
}), ut;
|
|
730
730
|
}
|
|
731
|
-
var L = {},
|
|
732
|
-
function
|
|
733
|
-
if (
|
|
734
|
-
|
|
731
|
+
var L = {}, vt;
|
|
732
|
+
function Xt() {
|
|
733
|
+
if (vt) return L;
|
|
734
|
+
vt = 1;
|
|
735
735
|
const r = "[0-9]+", o = "[A-Z $%*+\\-./:]+";
|
|
736
736
|
let i = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
737
737
|
i = i.replace(/u/g, "\\u");
|
|
738
|
-
const
|
|
738
|
+
const e = "(?:(?![A-Z0-9 $%*+\\-./:]|" + i + `)(?:.|[\r
|
|
739
739
|
]))+`;
|
|
740
|
-
L.KANJI = new RegExp(i, "g"), L.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), L.BYTE = new RegExp(
|
|
741
|
-
const t = new RegExp("^" + i + "$"),
|
|
740
|
+
L.KANJI = new RegExp(i, "g"), L.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), L.BYTE = new RegExp(e, "g"), L.NUMERIC = new RegExp(r, "g"), L.ALPHANUMERIC = new RegExp(o, "g");
|
|
741
|
+
const t = new RegExp("^" + i + "$"), n = new RegExp("^" + r + "$"), u = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
742
742
|
return L.testKanji = function(s) {
|
|
743
743
|
return t.test(s);
|
|
744
744
|
}, L.testNumeric = function(s) {
|
|
745
|
-
return
|
|
745
|
+
return n.test(s);
|
|
746
746
|
}, L.testAlphanumeric = function(s) {
|
|
747
747
|
return u.test(s);
|
|
748
748
|
}, L;
|
|
749
749
|
}
|
|
750
|
-
var
|
|
751
|
-
function
|
|
752
|
-
return
|
|
753
|
-
const o =
|
|
750
|
+
var Ut;
|
|
751
|
+
function F() {
|
|
752
|
+
return Ut || (Ut = 1, (function(r) {
|
|
753
|
+
const o = Zt(), i = Xt();
|
|
754
754
|
r.NUMERIC = {
|
|
755
755
|
id: "Numeric",
|
|
756
756
|
bit: 1,
|
|
@@ -769,20 +769,20 @@ function _() {
|
|
|
769
769
|
ccBits: [8, 10, 12]
|
|
770
770
|
}, r.MIXED = {
|
|
771
771
|
bit: -1
|
|
772
|
-
}, r.getCharCountIndicator = function(
|
|
773
|
-
if (!
|
|
772
|
+
}, r.getCharCountIndicator = function(n, u) {
|
|
773
|
+
if (!n.ccBits) throw new Error("Invalid mode: " + n);
|
|
774
774
|
if (!o.isValid(u))
|
|
775
775
|
throw new Error("Invalid version: " + u);
|
|
776
|
-
return u >= 1 && u < 10 ?
|
|
777
|
-
}, r.getBestModeForData = function(
|
|
778
|
-
return i.testNumeric(
|
|
779
|
-
}, r.toString = function(
|
|
780
|
-
if (
|
|
776
|
+
return u >= 1 && u < 10 ? n.ccBits[0] : u < 27 ? n.ccBits[1] : n.ccBits[2];
|
|
777
|
+
}, r.getBestModeForData = function(n) {
|
|
778
|
+
return i.testNumeric(n) ? r.NUMERIC : i.testAlphanumeric(n) ? r.ALPHANUMERIC : i.testKanji(n) ? r.KANJI : r.BYTE;
|
|
779
|
+
}, r.toString = function(n) {
|
|
780
|
+
if (n && n.id) return n.id;
|
|
781
781
|
throw new Error("Invalid mode");
|
|
782
|
-
}, r.isValid = function(
|
|
783
|
-
return
|
|
782
|
+
}, r.isValid = function(n) {
|
|
783
|
+
return n && n.bit && n.ccBits;
|
|
784
784
|
};
|
|
785
|
-
function
|
|
785
|
+
function e(t) {
|
|
786
786
|
if (typeof t != "string")
|
|
787
787
|
throw new Error("Param is not a string");
|
|
788
788
|
switch (t.toLowerCase()) {
|
|
@@ -798,21 +798,21 @@ function _() {
|
|
|
798
798
|
throw new Error("Unknown mode: " + t);
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
r.from = function(
|
|
802
|
-
if (r.isValid(
|
|
803
|
-
return
|
|
801
|
+
r.from = function(n, u) {
|
|
802
|
+
if (r.isValid(n))
|
|
803
|
+
return n;
|
|
804
804
|
try {
|
|
805
|
-
return n
|
|
805
|
+
return e(n);
|
|
806
806
|
} catch {
|
|
807
807
|
return u;
|
|
808
808
|
}
|
|
809
809
|
};
|
|
810
|
-
}(it)), it;
|
|
810
|
+
})(it)), it;
|
|
811
811
|
}
|
|
812
812
|
var _t;
|
|
813
|
-
function
|
|
814
|
-
return _t || (_t = 1, function(r) {
|
|
815
|
-
const o =
|
|
813
|
+
function de() {
|
|
814
|
+
return _t || (_t = 1, (function(r) {
|
|
815
|
+
const o = _(), i = Wt(), e = Ct(), t = F(), n = Zt(), u = 7973, a = o.getBCHDigit(u);
|
|
816
816
|
function s(h, f, N) {
|
|
817
817
|
for (let M = 1; M <= 40; M++)
|
|
818
818
|
if (f <= r.getCapacity(M, N, h))
|
|
@@ -834,28 +834,28 @@ function he() {
|
|
|
834
834
|
return N;
|
|
835
835
|
}
|
|
836
836
|
r.from = function(f, N) {
|
|
837
|
-
return
|
|
837
|
+
return n.isValid(f) ? parseInt(f, 10) : N;
|
|
838
838
|
}, r.getCapacity = function(f, N, M) {
|
|
839
|
-
if (!
|
|
839
|
+
if (!n.isValid(f))
|
|
840
840
|
throw new Error("Invalid QR Code version");
|
|
841
841
|
typeof M > "u" && (M = t.BYTE);
|
|
842
842
|
const S = o.getSymbolTotalCodewords(f), R = i.getTotalCodewordsCount(f, N), P = (S - R) * 8;
|
|
843
843
|
if (M === t.MIXED) return P;
|
|
844
|
-
const
|
|
844
|
+
const T = P - c(M, f);
|
|
845
845
|
switch (M) {
|
|
846
846
|
case t.NUMERIC:
|
|
847
|
-
return Math.floor(
|
|
847
|
+
return Math.floor(T / 10 * 3);
|
|
848
848
|
case t.ALPHANUMERIC:
|
|
849
|
-
return Math.floor(
|
|
849
|
+
return Math.floor(T / 11 * 2);
|
|
850
850
|
case t.KANJI:
|
|
851
|
-
return Math.floor(
|
|
851
|
+
return Math.floor(T / 13);
|
|
852
852
|
case t.BYTE:
|
|
853
853
|
default:
|
|
854
|
-
return Math.floor(
|
|
854
|
+
return Math.floor(T / 8);
|
|
855
855
|
}
|
|
856
856
|
}, r.getBestVersionForData = function(f, N) {
|
|
857
857
|
let M;
|
|
858
|
-
const S =
|
|
858
|
+
const S = e.from(N, e.M);
|
|
859
859
|
if (Array.isArray(f)) {
|
|
860
860
|
if (f.length > 1)
|
|
861
861
|
return B(f, S);
|
|
@@ -866,55 +866,55 @@ function he() {
|
|
|
866
866
|
M = f;
|
|
867
867
|
return s(M.mode, M.getLength(), S);
|
|
868
868
|
}, r.getEncodedBits = function(f) {
|
|
869
|
-
if (!
|
|
869
|
+
if (!n.isValid(f) || f < 7)
|
|
870
870
|
throw new Error("Invalid QR Code version");
|
|
871
871
|
let N = f << 12;
|
|
872
872
|
for (; o.getBCHDigit(N) - a >= 0; )
|
|
873
873
|
N ^= u << o.getBCHDigit(N) - a;
|
|
874
874
|
return f << 12 | N;
|
|
875
875
|
};
|
|
876
|
-
}(ot)), ot;
|
|
876
|
+
})(ot)), ot;
|
|
877
877
|
}
|
|
878
|
-
var st = {},
|
|
879
|
-
function
|
|
880
|
-
if (
|
|
881
|
-
|
|
882
|
-
const r =
|
|
883
|
-
return st.getEncodedBits = function(
|
|
884
|
-
const a =
|
|
878
|
+
var st = {}, Ft;
|
|
879
|
+
function ge() {
|
|
880
|
+
if (Ft) return st;
|
|
881
|
+
Ft = 1;
|
|
882
|
+
const r = _(), o = 1335, i = 21522, e = r.getBCHDigit(o);
|
|
883
|
+
return st.getEncodedBits = function(n, u) {
|
|
884
|
+
const a = n.bit << 3 | u;
|
|
885
885
|
let s = a << 10;
|
|
886
|
-
for (; r.getBCHDigit(s) -
|
|
887
|
-
s ^= o << r.getBCHDigit(s) -
|
|
886
|
+
for (; r.getBCHDigit(s) - e >= 0; )
|
|
887
|
+
s ^= o << r.getBCHDigit(s) - e;
|
|
888
888
|
return (a << 10 | s) ^ i;
|
|
889
889
|
}, st;
|
|
890
890
|
}
|
|
891
|
-
var at = {}, ct,
|
|
892
|
-
function
|
|
893
|
-
if (
|
|
894
|
-
|
|
895
|
-
const r =
|
|
891
|
+
var at = {}, ct, kt;
|
|
892
|
+
function he() {
|
|
893
|
+
if (kt) return ct;
|
|
894
|
+
kt = 1;
|
|
895
|
+
const r = F();
|
|
896
896
|
function o(i) {
|
|
897
897
|
this.mode = r.NUMERIC, this.data = i.toString();
|
|
898
898
|
}
|
|
899
|
-
return o.getBitsLength = function(
|
|
900
|
-
return 10 * Math.floor(
|
|
899
|
+
return o.getBitsLength = function(e) {
|
|
900
|
+
return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
|
|
901
901
|
}, o.prototype.getLength = function() {
|
|
902
902
|
return this.data.length;
|
|
903
903
|
}, o.prototype.getBitsLength = function() {
|
|
904
904
|
return o.getBitsLength(this.data.length);
|
|
905
|
-
}, o.prototype.write = function(
|
|
906
|
-
let t,
|
|
905
|
+
}, o.prototype.write = function(e) {
|
|
906
|
+
let t, n, u;
|
|
907
907
|
for (t = 0; t + 3 <= this.data.length; t += 3)
|
|
908
|
-
|
|
908
|
+
n = this.data.substr(t, 3), u = parseInt(n, 10), e.put(u, 10);
|
|
909
909
|
const a = this.data.length - t;
|
|
910
|
-
a > 0 && (
|
|
910
|
+
a > 0 && (n = this.data.substr(t), u = parseInt(n, 10), e.put(u, a * 3 + 1));
|
|
911
911
|
}, ct = o, ct;
|
|
912
912
|
}
|
|
913
|
-
var ft,
|
|
914
|
-
function
|
|
915
|
-
if (
|
|
916
|
-
|
|
917
|
-
const r =
|
|
913
|
+
var ft, zt;
|
|
914
|
+
function me() {
|
|
915
|
+
if (zt) return ft;
|
|
916
|
+
zt = 1;
|
|
917
|
+
const r = F(), o = [
|
|
918
918
|
"0",
|
|
919
919
|
"1",
|
|
920
920
|
"2",
|
|
@@ -961,8 +961,8 @@ function Ce() {
|
|
|
961
961
|
"/",
|
|
962
962
|
":"
|
|
963
963
|
];
|
|
964
|
-
function i(
|
|
965
|
-
this.mode = r.ALPHANUMERIC, this.data =
|
|
964
|
+
function i(e) {
|
|
965
|
+
this.mode = r.ALPHANUMERIC, this.data = e;
|
|
966
966
|
}
|
|
967
967
|
return i.getBitsLength = function(t) {
|
|
968
968
|
return 11 * Math.floor(t / 2) + 6 * (t % 2);
|
|
@@ -971,70 +971,40 @@ function Ce() {
|
|
|
971
971
|
}, i.prototype.getBitsLength = function() {
|
|
972
972
|
return i.getBitsLength(this.data.length);
|
|
973
973
|
}, i.prototype.write = function(t) {
|
|
974
|
-
let
|
|
975
|
-
for (
|
|
976
|
-
let u = o.indexOf(this.data[
|
|
977
|
-
u += o.indexOf(this.data[
|
|
974
|
+
let n;
|
|
975
|
+
for (n = 0; n + 2 <= this.data.length; n += 2) {
|
|
976
|
+
let u = o.indexOf(this.data[n]) * 45;
|
|
977
|
+
u += o.indexOf(this.data[n + 1]), t.put(u, 11);
|
|
978
978
|
}
|
|
979
|
-
this.data.length % 2 && t.put(o.indexOf(this.data[
|
|
979
|
+
this.data.length % 2 && t.put(o.indexOf(this.data[n]), 6);
|
|
980
980
|
}, ft = i, ft;
|
|
981
981
|
}
|
|
982
|
-
var lt,
|
|
983
|
-
function
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
u >= 56320 && u <= 57343 && (e = (e - 55296) * 1024 + u - 56320 + 65536, t += 1);
|
|
990
|
-
}
|
|
991
|
-
if (e < 128) {
|
|
992
|
-
i.push(e);
|
|
993
|
-
continue;
|
|
994
|
-
}
|
|
995
|
-
if (e < 2048) {
|
|
996
|
-
i.push(e >> 6 | 192), i.push(e & 63 | 128);
|
|
997
|
-
continue;
|
|
998
|
-
}
|
|
999
|
-
if (e < 55296 || e >= 57344 && e < 65536) {
|
|
1000
|
-
i.push(e >> 12 | 224), i.push(e >> 6 & 63 | 128), i.push(e & 63 | 128);
|
|
1001
|
-
continue;
|
|
1002
|
-
}
|
|
1003
|
-
if (e >= 65536 && e <= 1114111) {
|
|
1004
|
-
i.push(e >> 18 | 240), i.push(e >> 12 & 63 | 128), i.push(e >> 6 & 63 | 128), i.push(e & 63 | 128);
|
|
1005
|
-
continue;
|
|
1006
|
-
}
|
|
1007
|
-
i.push(239, 191, 189);
|
|
1008
|
-
}
|
|
1009
|
-
return new Uint8Array(i).buffer;
|
|
1010
|
-
}), lt;
|
|
1011
|
-
}
|
|
1012
|
-
var dt, Ht;
|
|
1013
|
-
function ye() {
|
|
1014
|
-
if (Ht) return dt;
|
|
1015
|
-
Ht = 1;
|
|
1016
|
-
const r = Ee(), o = _();
|
|
1017
|
-
function i(n) {
|
|
1018
|
-
this.mode = o.BYTE, typeof n == "string" && (n = r(n)), this.data = new Uint8Array(n);
|
|
982
|
+
var lt, Vt;
|
|
983
|
+
function we() {
|
|
984
|
+
if (Vt) return lt;
|
|
985
|
+
Vt = 1;
|
|
986
|
+
const r = F();
|
|
987
|
+
function o(i) {
|
|
988
|
+
this.mode = r.BYTE, typeof i == "string" ? this.data = new TextEncoder().encode(i) : this.data = new Uint8Array(i);
|
|
1019
989
|
}
|
|
1020
|
-
return
|
|
1021
|
-
return
|
|
1022
|
-
},
|
|
990
|
+
return o.getBitsLength = function(e) {
|
|
991
|
+
return e * 8;
|
|
992
|
+
}, o.prototype.getLength = function() {
|
|
1023
993
|
return this.data.length;
|
|
1024
|
-
},
|
|
1025
|
-
return
|
|
1026
|
-
},
|
|
1027
|
-
for (let
|
|
1028
|
-
|
|
1029
|
-
},
|
|
994
|
+
}, o.prototype.getBitsLength = function() {
|
|
995
|
+
return o.getBitsLength(this.data.length);
|
|
996
|
+
}, o.prototype.write = function(i) {
|
|
997
|
+
for (let e = 0, t = this.data.length; e < t; e++)
|
|
998
|
+
i.put(this.data[e], 8);
|
|
999
|
+
}, lt = o, lt;
|
|
1030
1000
|
}
|
|
1031
|
-
var
|
|
1032
|
-
function
|
|
1033
|
-
if (
|
|
1034
|
-
|
|
1035
|
-
const r =
|
|
1036
|
-
function i(
|
|
1037
|
-
this.mode = r.KANJI, this.data =
|
|
1001
|
+
var dt, Kt;
|
|
1002
|
+
function Ce() {
|
|
1003
|
+
if (Kt) return dt;
|
|
1004
|
+
Kt = 1;
|
|
1005
|
+
const r = F(), o = _();
|
|
1006
|
+
function i(e) {
|
|
1007
|
+
this.mode = r.KANJI, this.data = e;
|
|
1038
1008
|
}
|
|
1039
1009
|
return i.getBitsLength = function(t) {
|
|
1040
1010
|
return t * 13;
|
|
@@ -1042,52 +1012,52 @@ function Be() {
|
|
|
1042
1012
|
return this.data.length;
|
|
1043
1013
|
}, i.prototype.getBitsLength = function() {
|
|
1044
1014
|
return i.getBitsLength(this.data.length);
|
|
1045
|
-
}, i.prototype.write = function(
|
|
1015
|
+
}, i.prototype.write = function(e) {
|
|
1046
1016
|
let t;
|
|
1047
1017
|
for (t = 0; t < this.data.length; t++) {
|
|
1048
|
-
let
|
|
1049
|
-
if (
|
|
1050
|
-
|
|
1051
|
-
else if (
|
|
1052
|
-
|
|
1018
|
+
let n = o.toSJIS(this.data[t]);
|
|
1019
|
+
if (n >= 33088 && n <= 40956)
|
|
1020
|
+
n -= 33088;
|
|
1021
|
+
else if (n >= 57408 && n <= 60351)
|
|
1022
|
+
n -= 49472;
|
|
1053
1023
|
else
|
|
1054
1024
|
throw new Error(
|
|
1055
1025
|
"Invalid SJIS character: " + this.data[t] + `
|
|
1056
1026
|
Make sure your charset is UTF-8`
|
|
1057
1027
|
);
|
|
1058
|
-
|
|
1028
|
+
n = (n >>> 8 & 255) * 192 + (n & 255), e.put(n, 13);
|
|
1059
1029
|
}
|
|
1060
|
-
},
|
|
1030
|
+
}, dt = i, dt;
|
|
1061
1031
|
}
|
|
1062
|
-
var
|
|
1063
|
-
function
|
|
1064
|
-
return
|
|
1032
|
+
var gt = { exports: {} }, Ht;
|
|
1033
|
+
function Ee() {
|
|
1034
|
+
return Ht || (Ht = 1, (function(r) {
|
|
1065
1035
|
var o = {
|
|
1066
|
-
single_source_shortest_paths: function(i,
|
|
1067
|
-
var
|
|
1068
|
-
u[
|
|
1036
|
+
single_source_shortest_paths: function(i, e, t) {
|
|
1037
|
+
var n = {}, u = {};
|
|
1038
|
+
u[e] = 0;
|
|
1069
1039
|
var a = o.PriorityQueue.make();
|
|
1070
|
-
a.push(
|
|
1040
|
+
a.push(e, 0);
|
|
1071
1041
|
for (var s, c, d, B, h, f, N, M, S; !a.empty(); ) {
|
|
1072
1042
|
s = a.pop(), c = s.value, B = s.cost, h = i[c] || {};
|
|
1073
1043
|
for (d in h)
|
|
1074
|
-
h.hasOwnProperty(d) && (f = h[d], N = B + f, M = u[d], S = typeof u[d] > "u", (S || M > N) && (u[d] = N, a.push(d, N),
|
|
1044
|
+
h.hasOwnProperty(d) && (f = h[d], N = B + f, M = u[d], S = typeof u[d] > "u", (S || M > N) && (u[d] = N, a.push(d, N), n[d] = c));
|
|
1075
1045
|
}
|
|
1076
1046
|
if (typeof t < "u" && typeof u[t] > "u") {
|
|
1077
|
-
var R = ["Could not find a path from ",
|
|
1047
|
+
var R = ["Could not find a path from ", e, " to ", t, "."].join("");
|
|
1078
1048
|
throw new Error(R);
|
|
1079
1049
|
}
|
|
1080
|
-
return
|
|
1050
|
+
return n;
|
|
1081
1051
|
},
|
|
1082
|
-
extract_shortest_path_from_predecessor_list: function(i,
|
|
1083
|
-
for (var t = [],
|
|
1084
|
-
t.push(
|
|
1052
|
+
extract_shortest_path_from_predecessor_list: function(i, e) {
|
|
1053
|
+
for (var t = [], n = e; n; )
|
|
1054
|
+
t.push(n), i[n], n = i[n];
|
|
1085
1055
|
return t.reverse(), t;
|
|
1086
1056
|
},
|
|
1087
|
-
find_path: function(i,
|
|
1088
|
-
var
|
|
1057
|
+
find_path: function(i, e, t) {
|
|
1058
|
+
var n = o.single_source_shortest_paths(i, e, t);
|
|
1089
1059
|
return o.extract_shortest_path_from_predecessor_list(
|
|
1090
|
-
|
|
1060
|
+
n,
|
|
1091
1061
|
t
|
|
1092
1062
|
);
|
|
1093
1063
|
},
|
|
@@ -1096,21 +1066,21 @@ function pe() {
|
|
|
1096
1066
|
*/
|
|
1097
1067
|
PriorityQueue: {
|
|
1098
1068
|
make: function(i) {
|
|
1099
|
-
var
|
|
1069
|
+
var e = o.PriorityQueue, t = {}, n;
|
|
1100
1070
|
i = i || {};
|
|
1101
|
-
for (
|
|
1102
|
-
|
|
1103
|
-
return t.queue = [], t.sorter = i.sorter ||
|
|
1071
|
+
for (n in e)
|
|
1072
|
+
e.hasOwnProperty(n) && (t[n] = e[n]);
|
|
1073
|
+
return t.queue = [], t.sorter = i.sorter || e.default_sorter, t;
|
|
1104
1074
|
},
|
|
1105
|
-
default_sorter: function(i,
|
|
1106
|
-
return i.cost -
|
|
1075
|
+
default_sorter: function(i, e) {
|
|
1076
|
+
return i.cost - e.cost;
|
|
1107
1077
|
},
|
|
1108
1078
|
/**
|
|
1109
1079
|
* Add a new item to the queue and ensure the highest priority element
|
|
1110
1080
|
* is at the front of the queue.
|
|
1111
1081
|
*/
|
|
1112
|
-
push: function(i,
|
|
1113
|
-
var t = { value: i, cost:
|
|
1082
|
+
push: function(i, e) {
|
|
1083
|
+
var t = { value: i, cost: e };
|
|
1114
1084
|
this.queue.push(t), this.queue.sort(this.sorter);
|
|
1115
1085
|
},
|
|
1116
1086
|
/**
|
|
@@ -1125,19 +1095,19 @@ function pe() {
|
|
|
1125
1095
|
}
|
|
1126
1096
|
};
|
|
1127
1097
|
r.exports = o;
|
|
1128
|
-
}(
|
|
1098
|
+
})(gt)), gt.exports;
|
|
1129
1099
|
}
|
|
1130
|
-
var
|
|
1131
|
-
function
|
|
1132
|
-
return
|
|
1133
|
-
const o =
|
|
1100
|
+
var Jt;
|
|
1101
|
+
function ye() {
|
|
1102
|
+
return Jt || (Jt = 1, (function(r) {
|
|
1103
|
+
const o = F(), i = he(), e = me(), t = we(), n = Ce(), u = Xt(), a = _(), s = Ee();
|
|
1134
1104
|
function c(R) {
|
|
1135
1105
|
return unescape(encodeURIComponent(R)).length;
|
|
1136
1106
|
}
|
|
1137
|
-
function d(R, P,
|
|
1107
|
+
function d(R, P, T) {
|
|
1138
1108
|
const p = [];
|
|
1139
1109
|
let b;
|
|
1140
|
-
for (; (b = R.exec(
|
|
1110
|
+
for (; (b = R.exec(T)) !== null; )
|
|
1141
1111
|
p.push({
|
|
1142
1112
|
data: b[0],
|
|
1143
1113
|
index: b.index,
|
|
@@ -1147,9 +1117,9 @@ function Ae() {
|
|
|
1147
1117
|
return p;
|
|
1148
1118
|
}
|
|
1149
1119
|
function B(R) {
|
|
1150
|
-
const P = d(u.NUMERIC, o.NUMERIC, R),
|
|
1120
|
+
const P = d(u.NUMERIC, o.NUMERIC, R), T = d(u.ALPHANUMERIC, o.ALPHANUMERIC, R);
|
|
1151
1121
|
let p, b;
|
|
1152
|
-
return a.isKanjiModeEnabled() ? (p = d(u.BYTE, o.BYTE, R), b = d(u.KANJI, o.KANJI, R)) : (p = d(u.BYTE_KANJI, o.BYTE, R), b = []), P.concat(
|
|
1122
|
+
return a.isKanjiModeEnabled() ? (p = d(u.BYTE, o.BYTE, R), b = d(u.KANJI, o.KANJI, R)) : (p = d(u.BYTE_KANJI, o.BYTE, R), b = []), P.concat(T, p, b).sort(function(E, C) {
|
|
1153
1123
|
return E.index - C.index;
|
|
1154
1124
|
}).map(function(E) {
|
|
1155
1125
|
return {
|
|
@@ -1164,23 +1134,23 @@ function Ae() {
|
|
|
1164
1134
|
case o.NUMERIC:
|
|
1165
1135
|
return i.getBitsLength(R);
|
|
1166
1136
|
case o.ALPHANUMERIC:
|
|
1167
|
-
return n.getBitsLength(R);
|
|
1168
|
-
case o.KANJI:
|
|
1169
1137
|
return e.getBitsLength(R);
|
|
1138
|
+
case o.KANJI:
|
|
1139
|
+
return n.getBitsLength(R);
|
|
1170
1140
|
case o.BYTE:
|
|
1171
1141
|
return t.getBitsLength(R);
|
|
1172
1142
|
}
|
|
1173
1143
|
}
|
|
1174
1144
|
function f(R) {
|
|
1175
|
-
return R.reduce(function(P,
|
|
1145
|
+
return R.reduce(function(P, T) {
|
|
1176
1146
|
const p = P.length - 1 >= 0 ? P[P.length - 1] : null;
|
|
1177
|
-
return p && p.mode ===
|
|
1147
|
+
return p && p.mode === T.mode ? (P[P.length - 1].data += T.data, P) : (P.push(T), P);
|
|
1178
1148
|
}, []);
|
|
1179
1149
|
}
|
|
1180
1150
|
function N(R) {
|
|
1181
1151
|
const P = [];
|
|
1182
|
-
for (let
|
|
1183
|
-
const p = R[
|
|
1152
|
+
for (let T = 0; T < R.length; T++) {
|
|
1153
|
+
const p = R[T];
|
|
1184
1154
|
switch (p.mode) {
|
|
1185
1155
|
case o.NUMERIC:
|
|
1186
1156
|
P.push([
|
|
@@ -1210,47 +1180,47 @@ function Ae() {
|
|
|
1210
1180
|
return P;
|
|
1211
1181
|
}
|
|
1212
1182
|
function M(R, P) {
|
|
1213
|
-
const
|
|
1183
|
+
const T = {}, p = { start: {} };
|
|
1214
1184
|
let b = ["start"];
|
|
1215
1185
|
for (let g = 0; g < R.length; g++) {
|
|
1216
1186
|
const E = R[g], C = [];
|
|
1217
1187
|
for (let l = 0; l < E.length; l++) {
|
|
1218
1188
|
const A = E[l], m = "" + g + l;
|
|
1219
|
-
C.push(m),
|
|
1189
|
+
C.push(m), T[m] = { node: A, lastCount: 0 }, p[m] = {};
|
|
1220
1190
|
for (let y = 0; y < b.length; y++) {
|
|
1221
1191
|
const w = b[y];
|
|
1222
|
-
|
|
1192
|
+
T[w] && T[w].node.mode === A.mode ? (p[w][m] = h(T[w].lastCount + A.length, A.mode) - h(T[w].lastCount, A.mode), T[w].lastCount += A.length) : (T[w] && (T[w].lastCount = A.length), p[w][m] = h(A.length, A.mode) + 4 + o.getCharCountIndicator(A.mode, P));
|
|
1223
1193
|
}
|
|
1224
1194
|
}
|
|
1225
1195
|
b = C;
|
|
1226
1196
|
}
|
|
1227
1197
|
for (let g = 0; g < b.length; g++)
|
|
1228
1198
|
p[b[g]].end = 0;
|
|
1229
|
-
return { map: p, table:
|
|
1199
|
+
return { map: p, table: T };
|
|
1230
1200
|
}
|
|
1231
1201
|
function S(R, P) {
|
|
1232
|
-
let
|
|
1202
|
+
let T;
|
|
1233
1203
|
const p = o.getBestModeForData(R);
|
|
1234
|
-
if (
|
|
1235
|
-
throw new Error('"' + R + '" cannot be encoded with mode ' + o.toString(
|
|
1204
|
+
if (T = o.from(P, p), T !== o.BYTE && T.bit < p.bit)
|
|
1205
|
+
throw new Error('"' + R + '" cannot be encoded with mode ' + o.toString(T) + `.
|
|
1236
1206
|
Suggested mode is: ` + o.toString(p));
|
|
1237
|
-
switch (
|
|
1207
|
+
switch (T === o.KANJI && !a.isKanjiModeEnabled() && (T = o.BYTE), T) {
|
|
1238
1208
|
case o.NUMERIC:
|
|
1239
1209
|
return new i(R);
|
|
1240
1210
|
case o.ALPHANUMERIC:
|
|
1241
|
-
return new n(R);
|
|
1242
|
-
case o.KANJI:
|
|
1243
1211
|
return new e(R);
|
|
1212
|
+
case o.KANJI:
|
|
1213
|
+
return new n(R);
|
|
1244
1214
|
case o.BYTE:
|
|
1245
1215
|
return new t(R);
|
|
1246
1216
|
}
|
|
1247
1217
|
}
|
|
1248
1218
|
r.fromArray = function(P) {
|
|
1249
|
-
return P.reduce(function(
|
|
1250
|
-
return typeof p == "string" ?
|
|
1219
|
+
return P.reduce(function(T, p) {
|
|
1220
|
+
return typeof p == "string" ? T.push(S(p, null)) : p.data && T.push(S(p.data, p.mode)), T;
|
|
1251
1221
|
}, []);
|
|
1252
|
-
}, r.fromString = function(P,
|
|
1253
|
-
const p = B(P, a.isKanjiModeEnabled()), b = N(p), g = M(b,
|
|
1222
|
+
}, r.fromString = function(P, T) {
|
|
1223
|
+
const p = B(P, a.isKanjiModeEnabled()), b = N(p), g = M(b, T), E = s.find_path(g.map, "start", "end"), C = [];
|
|
1254
1224
|
for (let l = 1; l < E.length - 1; l++)
|
|
1255
1225
|
C.push(g.table[E[l]].node);
|
|
1256
1226
|
return r.fromArray(f(C));
|
|
@@ -1259,21 +1229,21 @@ function Ae() {
|
|
|
1259
1229
|
B(P, a.isKanjiModeEnabled())
|
|
1260
1230
|
);
|
|
1261
1231
|
};
|
|
1262
|
-
}(at)), at;
|
|
1232
|
+
})(at)), at;
|
|
1263
1233
|
}
|
|
1264
|
-
var
|
|
1265
|
-
function
|
|
1266
|
-
if (
|
|
1267
|
-
|
|
1268
|
-
const r =
|
|
1234
|
+
var Yt;
|
|
1235
|
+
function Be() {
|
|
1236
|
+
if (Yt) return W;
|
|
1237
|
+
Yt = 1;
|
|
1238
|
+
const r = _(), o = Ct(), i = oe(), e = ie(), t = ue(), n = se(), u = ae(), a = Wt(), s = le(), c = de(), d = ge(), B = F(), h = ye();
|
|
1269
1239
|
function f(g, E) {
|
|
1270
|
-
const C = g.size, l =
|
|
1240
|
+
const C = g.size, l = n.getPositions(E);
|
|
1271
1241
|
for (let A = 0; A < l.length; A++) {
|
|
1272
1242
|
const m = l[A][0], y = l[A][1];
|
|
1273
1243
|
for (let w = -1; w <= 7; w++)
|
|
1274
1244
|
if (!(m + w <= -1 || C <= m + w))
|
|
1275
|
-
for (let
|
|
1276
|
-
y +
|
|
1245
|
+
for (let I = -1; I <= 7; I++)
|
|
1246
|
+
y + I <= -1 || C <= y + I || (w >= 0 && w <= 6 && (I === 0 || I === 6) || I >= 0 && I <= 6 && (w === 0 || w === 6) || w >= 2 && w <= 4 && I >= 2 && I <= 4 ? g.set(m + w, y + I, !0, !0) : g.set(m + w, y + I, !1, !0));
|
|
1277
1247
|
}
|
|
1278
1248
|
}
|
|
1279
1249
|
function N(g) {
|
|
@@ -1310,10 +1280,10 @@ function Re() {
|
|
|
1310
1280
|
let l = -1, A = C - 1, m = 7, y = 0;
|
|
1311
1281
|
for (let w = C - 1; w > 0; w -= 2)
|
|
1312
1282
|
for (w === 6 && w--; ; ) {
|
|
1313
|
-
for (let
|
|
1314
|
-
if (!g.isReserved(A, w -
|
|
1315
|
-
let
|
|
1316
|
-
y < E.length && (
|
|
1283
|
+
for (let I = 0; I < 2; I++)
|
|
1284
|
+
if (!g.isReserved(A, w - I)) {
|
|
1285
|
+
let v = !1;
|
|
1286
|
+
y < E.length && (v = (E[y] >>> m & 1) === 1), g.set(A, w - I, v), m--, m === -1 && (y++, m = 7);
|
|
1317
1287
|
}
|
|
1318
1288
|
if (A += l, A < 0 || C <= A) {
|
|
1319
1289
|
A -= l, l = -l;
|
|
@@ -1321,37 +1291,37 @@ function Re() {
|
|
|
1321
1291
|
}
|
|
1322
1292
|
}
|
|
1323
1293
|
}
|
|
1324
|
-
function
|
|
1294
|
+
function T(g, E, C) {
|
|
1325
1295
|
const l = new i();
|
|
1326
|
-
C.forEach(function(
|
|
1327
|
-
l.put(
|
|
1296
|
+
C.forEach(function(I) {
|
|
1297
|
+
l.put(I.mode.bit, 4), l.put(I.getLength(), B.getCharCountIndicator(I.mode, g)), I.write(l);
|
|
1328
1298
|
});
|
|
1329
1299
|
const A = r.getSymbolTotalCodewords(g), m = a.getTotalCodewordsCount(g, E), y = (A - m) * 8;
|
|
1330
1300
|
for (l.getLengthInBits() + 4 <= y && l.put(0, 4); l.getLengthInBits() % 8 !== 0; )
|
|
1331
1301
|
l.putBit(0);
|
|
1332
1302
|
const w = (y - l.getLengthInBits()) / 8;
|
|
1333
|
-
for (let
|
|
1334
|
-
l.put(
|
|
1303
|
+
for (let I = 0; I < w; I++)
|
|
1304
|
+
l.put(I % 2 ? 17 : 236, 8);
|
|
1335
1305
|
return p(l, g, E);
|
|
1336
1306
|
}
|
|
1337
1307
|
function p(g, E, C) {
|
|
1338
|
-
const l = r.getSymbolTotalCodewords(E), A = a.getTotalCodewordsCount(E, C), m = l - A, y = a.getBlocksCount(E, C), w = l % y,
|
|
1308
|
+
const l = r.getSymbolTotalCodewords(E), A = a.getTotalCodewordsCount(E, C), m = l - A, y = a.getBlocksCount(E, C), w = l % y, I = y - w, v = Math.floor(l / y), V = Math.floor(m / y), $t = V + 1, Et = v - V, te = new s(Et);
|
|
1339
1309
|
let Y = 0;
|
|
1340
|
-
const H = new Array(y),
|
|
1310
|
+
const H = new Array(y), yt = new Array(y);
|
|
1341
1311
|
let j = 0;
|
|
1342
|
-
const
|
|
1312
|
+
const ee = new Uint8Array(g.buffer);
|
|
1343
1313
|
for (let k = 0; k < y; k++) {
|
|
1344
|
-
const G = k <
|
|
1345
|
-
H[k] =
|
|
1314
|
+
const G = k < I ? V : $t;
|
|
1315
|
+
H[k] = ee.slice(Y, Y + G), yt[k] = te.encode(H[k]), Y += G, j = Math.max(j, G);
|
|
1346
1316
|
}
|
|
1347
1317
|
const O = new Uint8Array(l);
|
|
1348
|
-
let
|
|
1349
|
-
for (
|
|
1350
|
-
for (
|
|
1351
|
-
|
|
1352
|
-
for (
|
|
1353
|
-
for (
|
|
1354
|
-
O[
|
|
1318
|
+
let Bt = 0, q, D;
|
|
1319
|
+
for (q = 0; q < j; q++)
|
|
1320
|
+
for (D = 0; D < y; D++)
|
|
1321
|
+
q < H[D].length && (O[Bt++] = H[D][q]);
|
|
1322
|
+
for (q = 0; q < Et; q++)
|
|
1323
|
+
for (D = 0; D < y; D++)
|
|
1324
|
+
O[Bt++] = yt[D][q];
|
|
1355
1325
|
return O;
|
|
1356
1326
|
}
|
|
1357
1327
|
function b(g, E, C, l) {
|
|
@@ -1359,12 +1329,12 @@ function Re() {
|
|
|
1359
1329
|
if (Array.isArray(g))
|
|
1360
1330
|
A = h.fromArray(g);
|
|
1361
1331
|
else if (typeof g == "string") {
|
|
1362
|
-
let
|
|
1363
|
-
if (!
|
|
1332
|
+
let v = E;
|
|
1333
|
+
if (!v) {
|
|
1364
1334
|
const V = h.rawSplit(g);
|
|
1365
|
-
|
|
1335
|
+
v = c.getBestVersionForData(V, C);
|
|
1366
1336
|
}
|
|
1367
|
-
A = h.fromString(g,
|
|
1337
|
+
A = h.fromString(g, v || 40);
|
|
1368
1338
|
} else
|
|
1369
1339
|
throw new Error("Invalid data");
|
|
1370
1340
|
const m = c.getBestVersionForData(A, C);
|
|
@@ -1379,12 +1349,12 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
1379
1349
|
Minimum version required to store current data is: ` + m + `.
|
|
1380
1350
|
`
|
|
1381
1351
|
);
|
|
1382
|
-
const y =
|
|
1383
|
-
return f(
|
|
1384
|
-
|
|
1385
|
-
R.bind(null,
|
|
1386
|
-
)), u.applyMask(l,
|
|
1387
|
-
modules:
|
|
1352
|
+
const y = T(E, C, A), w = r.getSymbolSize(E), I = new e(w);
|
|
1353
|
+
return f(I, E), N(I), M(I, E), R(I, C, 0), E >= 7 && S(I, E), P(I, y), isNaN(l) && (l = u.getBestMask(
|
|
1354
|
+
I,
|
|
1355
|
+
R.bind(null, I, C)
|
|
1356
|
+
)), u.applyMask(l, I), R(I, C, l), {
|
|
1357
|
+
modules: I,
|
|
1388
1358
|
version: E,
|
|
1389
1359
|
errorCorrectionLevel: C,
|
|
1390
1360
|
maskPattern: l,
|
|
@@ -1398,120 +1368,120 @@ Minimum version required to store current data is: ` + m + `.
|
|
|
1398
1368
|
return typeof C < "u" && (l = o.from(C.errorCorrectionLevel, o.M), A = c.from(C.version), m = u.from(C.maskPattern), C.toSJISFunc && r.setToSJISFunction(C.toSJISFunc)), b(E, A, l, m);
|
|
1399
1369
|
}, W;
|
|
1400
1370
|
}
|
|
1401
|
-
var
|
|
1402
|
-
function
|
|
1403
|
-
return
|
|
1371
|
+
var ht = {}, mt = {}, jt;
|
|
1372
|
+
function xt() {
|
|
1373
|
+
return jt || (jt = 1, (function(r) {
|
|
1404
1374
|
function o(i) {
|
|
1405
1375
|
if (typeof i == "number" && (i = i.toString()), typeof i != "string")
|
|
1406
1376
|
throw new Error("Color should be defined as hex string");
|
|
1407
|
-
let
|
|
1408
|
-
if (
|
|
1377
|
+
let e = i.slice().replace("#", "").split("");
|
|
1378
|
+
if (e.length < 3 || e.length === 5 || e.length > 8)
|
|
1409
1379
|
throw new Error("Invalid hex color: " + i);
|
|
1410
|
-
(
|
|
1411
|
-
return [
|
|
1412
|
-
}))),
|
|
1413
|
-
const t = parseInt(
|
|
1380
|
+
(e.length === 3 || e.length === 4) && (e = Array.prototype.concat.apply([], e.map(function(n) {
|
|
1381
|
+
return [n, n];
|
|
1382
|
+
}))), e.length === 6 && e.push("F", "F");
|
|
1383
|
+
const t = parseInt(e.join(""), 16);
|
|
1414
1384
|
return {
|
|
1415
1385
|
r: t >> 24 & 255,
|
|
1416
1386
|
g: t >> 16 & 255,
|
|
1417
1387
|
b: t >> 8 & 255,
|
|
1418
1388
|
a: t & 255,
|
|
1419
|
-
hex: "#" +
|
|
1389
|
+
hex: "#" + e.slice(0, 6).join("")
|
|
1420
1390
|
};
|
|
1421
1391
|
}
|
|
1422
|
-
r.getOptions = function(
|
|
1423
|
-
|
|
1424
|
-
const t = typeof
|
|
1392
|
+
r.getOptions = function(e) {
|
|
1393
|
+
e || (e = {}), e.color || (e.color = {});
|
|
1394
|
+
const t = typeof e.margin > "u" || e.margin === null || e.margin < 0 ? 4 : e.margin, n = e.width && e.width >= 21 ? e.width : void 0, u = e.scale || 4;
|
|
1425
1395
|
return {
|
|
1426
|
-
width:
|
|
1427
|
-
scale:
|
|
1396
|
+
width: n,
|
|
1397
|
+
scale: n ? 4 : u,
|
|
1428
1398
|
margin: t,
|
|
1429
1399
|
color: {
|
|
1430
|
-
dark: o(
|
|
1431
|
-
light: o(
|
|
1400
|
+
dark: o(e.color.dark || "#000000ff"),
|
|
1401
|
+
light: o(e.color.light || "#ffffffff")
|
|
1432
1402
|
},
|
|
1433
|
-
type:
|
|
1434
|
-
rendererOpts:
|
|
1403
|
+
type: e.type,
|
|
1404
|
+
rendererOpts: e.rendererOpts || {}
|
|
1435
1405
|
};
|
|
1436
|
-
}, r.getScale = function(
|
|
1437
|
-
return t.width && t.width >=
|
|
1438
|
-
}, r.getImageWidth = function(
|
|
1439
|
-
const
|
|
1440
|
-
return Math.floor((
|
|
1441
|
-
}, r.qrToImageData = function(
|
|
1442
|
-
const u = t.modules.size, a = t.modules.data, s = r.getScale(u,
|
|
1406
|
+
}, r.getScale = function(e, t) {
|
|
1407
|
+
return t.width && t.width >= e + t.margin * 2 ? t.width / (e + t.margin * 2) : t.scale;
|
|
1408
|
+
}, r.getImageWidth = function(e, t) {
|
|
1409
|
+
const n = r.getScale(e, t);
|
|
1410
|
+
return Math.floor((e + t.margin * 2) * n);
|
|
1411
|
+
}, r.qrToImageData = function(e, t, n) {
|
|
1412
|
+
const u = t.modules.size, a = t.modules.data, s = r.getScale(u, n), c = Math.floor((u + n.margin * 2) * s), d = n.margin * s, B = [n.color.light, n.color.dark];
|
|
1443
1413
|
for (let h = 0; h < c; h++)
|
|
1444
1414
|
for (let f = 0; f < c; f++) {
|
|
1445
|
-
let N = (h * c + f) * 4, M =
|
|
1415
|
+
let N = (h * c + f) * 4, M = n.color.light;
|
|
1446
1416
|
if (h >= d && f >= d && h < c - d && f < c - d) {
|
|
1447
1417
|
const S = Math.floor((h - d) / s), R = Math.floor((f - d) / s);
|
|
1448
1418
|
M = B[a[S * u + R] ? 1 : 0];
|
|
1449
1419
|
}
|
|
1450
|
-
|
|
1420
|
+
e[N++] = M.r, e[N++] = M.g, e[N++] = M.b, e[N] = M.a;
|
|
1451
1421
|
}
|
|
1452
1422
|
};
|
|
1453
|
-
}(
|
|
1423
|
+
})(mt)), mt;
|
|
1454
1424
|
}
|
|
1455
|
-
var
|
|
1456
|
-
function
|
|
1457
|
-
return
|
|
1458
|
-
const o =
|
|
1459
|
-
function i(t,
|
|
1460
|
-
t.clearRect(0, 0,
|
|
1425
|
+
var Ot;
|
|
1426
|
+
function pe() {
|
|
1427
|
+
return Ot || (Ot = 1, (function(r) {
|
|
1428
|
+
const o = xt();
|
|
1429
|
+
function i(t, n, u) {
|
|
1430
|
+
t.clearRect(0, 0, n.width, n.height), n.style || (n.style = {}), n.height = u, n.width = u, n.style.height = u + "px", n.style.width = u + "px";
|
|
1461
1431
|
}
|
|
1462
|
-
function
|
|
1432
|
+
function e() {
|
|
1463
1433
|
try {
|
|
1464
1434
|
return document.createElement("canvas");
|
|
1465
1435
|
} catch {
|
|
1466
1436
|
throw new Error("You need to specify a canvas element");
|
|
1467
1437
|
}
|
|
1468
1438
|
}
|
|
1469
|
-
r.render = function(
|
|
1439
|
+
r.render = function(n, u, a) {
|
|
1470
1440
|
let s = a, c = u;
|
|
1471
|
-
typeof s > "u" && (!u || !u.getContext) && (s = u, u = void 0), u || (c =
|
|
1472
|
-
const d = o.getImageWidth(
|
|
1473
|
-
return o.qrToImageData(h.data,
|
|
1474
|
-
}, r.renderToDataURL = function(
|
|
1441
|
+
typeof s > "u" && (!u || !u.getContext) && (s = u, u = void 0), u || (c = e()), s = o.getOptions(s);
|
|
1442
|
+
const d = o.getImageWidth(n.modules.size, s), B = c.getContext("2d"), h = B.createImageData(d, d);
|
|
1443
|
+
return o.qrToImageData(h.data, n, s), i(B, c, d), B.putImageData(h, 0, 0), c;
|
|
1444
|
+
}, r.renderToDataURL = function(n, u, a) {
|
|
1475
1445
|
let s = a;
|
|
1476
1446
|
typeof s > "u" && (!u || !u.getContext) && (s = u, u = void 0), s || (s = {});
|
|
1477
|
-
const c = r.render(
|
|
1447
|
+
const c = r.render(n, u, s), d = s.type || "image/png", B = s.rendererOpts || {};
|
|
1478
1448
|
return c.toDataURL(d, B.quality);
|
|
1479
1449
|
};
|
|
1480
|
-
}(
|
|
1450
|
+
})(ht)), ht;
|
|
1481
1451
|
}
|
|
1482
|
-
var
|
|
1483
|
-
function
|
|
1484
|
-
if (
|
|
1485
|
-
|
|
1486
|
-
const r =
|
|
1487
|
-
function o(t,
|
|
1488
|
-
const u = t.a / 255, a =
|
|
1489
|
-
return u < 1 ? a + " " +
|
|
1452
|
+
var wt = {}, Gt;
|
|
1453
|
+
function Ae() {
|
|
1454
|
+
if (Gt) return wt;
|
|
1455
|
+
Gt = 1;
|
|
1456
|
+
const r = xt();
|
|
1457
|
+
function o(t, n) {
|
|
1458
|
+
const u = t.a / 255, a = n + '="' + t.hex + '"';
|
|
1459
|
+
return u < 1 ? a + " " + n + '-opacity="' + u.toFixed(2).slice(1) + '"' : a;
|
|
1490
1460
|
}
|
|
1491
|
-
function i(t,
|
|
1492
|
-
let a = t +
|
|
1461
|
+
function i(t, n, u) {
|
|
1462
|
+
let a = t + n;
|
|
1493
1463
|
return typeof u < "u" && (a += " " + u), a;
|
|
1494
1464
|
}
|
|
1495
|
-
function
|
|
1465
|
+
function e(t, n, u) {
|
|
1496
1466
|
let a = "", s = 0, c = !1, d = 0;
|
|
1497
1467
|
for (let B = 0; B < t.length; B++) {
|
|
1498
|
-
const h = Math.floor(B %
|
|
1499
|
-
!h && !c && (c = !0), t[B] ? (d++, B > 0 && h > 0 && t[B - 1] || (a += c ? i("M", h + u, 0.5 + f + u) : i("m", s, 0), s = 0, c = !1), h + 1 <
|
|
1468
|
+
const h = Math.floor(B % n), f = Math.floor(B / n);
|
|
1469
|
+
!h && !c && (c = !0), t[B] ? (d++, B > 0 && h > 0 && t[B - 1] || (a += c ? i("M", h + u, 0.5 + f + u) : i("m", s, 0), s = 0, c = !1), h + 1 < n && t[B + 1] || (a += i("h", d), d = 0)) : s++;
|
|
1500
1470
|
}
|
|
1501
1471
|
return a;
|
|
1502
1472
|
}
|
|
1503
|
-
return
|
|
1504
|
-
const s = r.getOptions(u), c =
|
|
1473
|
+
return wt.render = function(n, u, a) {
|
|
1474
|
+
const s = r.getOptions(u), c = n.modules.size, d = n.modules.data, B = c + s.margin * 2, h = s.color.light.a ? "<path " + o(s.color.light, "fill") + ' d="M0 0h' + B + "v" + B + 'H0z"/>' : "", f = "<path " + o(s.color.dark, "stroke") + ' d="' + e(d, c, s.margin) + '"/>', N = 'viewBox="0 0 ' + B + " " + B + '"', S = '<svg xmlns="http://www.w3.org/2000/svg" ' + (s.width ? 'width="' + s.width + '" height="' + s.width + '" ' : "") + N + ' shape-rendering="crispEdges">' + h + f + `</svg>
|
|
1505
1475
|
`;
|
|
1506
1476
|
return typeof a == "function" && a(null, S), S;
|
|
1507
|
-
},
|
|
1477
|
+
}, wt;
|
|
1508
1478
|
}
|
|
1509
|
-
var
|
|
1510
|
-
function
|
|
1511
|
-
if (
|
|
1512
|
-
|
|
1513
|
-
const r =
|
|
1514
|
-
function t(
|
|
1479
|
+
var Qt;
|
|
1480
|
+
function Re() {
|
|
1481
|
+
if (Qt) return z;
|
|
1482
|
+
Qt = 1;
|
|
1483
|
+
const r = re(), o = Be(), i = pe(), e = Ae();
|
|
1484
|
+
function t(n, u, a, s, c) {
|
|
1515
1485
|
const d = [].slice.call(arguments, 1), B = d.length, h = typeof d[B - 1] == "function";
|
|
1516
1486
|
if (!h && !r())
|
|
1517
1487
|
throw new Error("Callback required as last argument");
|
|
@@ -1525,7 +1495,7 @@ function Ne() {
|
|
|
1525
1495
|
return B === 1 ? (a = u, u = s = void 0) : B === 2 && !u.getContext && (s = a, a = u, u = void 0), new Promise(function(f, N) {
|
|
1526
1496
|
try {
|
|
1527
1497
|
const M = o.create(a, s);
|
|
1528
|
-
f(
|
|
1498
|
+
f(n(M, u, s));
|
|
1529
1499
|
} catch (M) {
|
|
1530
1500
|
N(M);
|
|
1531
1501
|
}
|
|
@@ -1533,17 +1503,17 @@ function Ne() {
|
|
|
1533
1503
|
}
|
|
1534
1504
|
try {
|
|
1535
1505
|
const f = o.create(a, s);
|
|
1536
|
-
c(null,
|
|
1506
|
+
c(null, n(f, u, s));
|
|
1537
1507
|
} catch (f) {
|
|
1538
1508
|
c(f);
|
|
1539
1509
|
}
|
|
1540
1510
|
}
|
|
1541
|
-
return z.create = o.create, z.toCanvas = t.bind(null, i.render), z.toDataURL = t.bind(null, i.renderToDataURL), z.toString = t.bind(null, function(
|
|
1542
|
-
return
|
|
1511
|
+
return z.create = o.create, z.toCanvas = t.bind(null, i.render), z.toDataURL = t.bind(null, i.renderToDataURL), z.toString = t.bind(null, function(n, u, a) {
|
|
1512
|
+
return e.render(n, a);
|
|
1543
1513
|
}), z;
|
|
1544
1514
|
}
|
|
1545
|
-
var
|
|
1546
|
-
const
|
|
1515
|
+
var Te = Re();
|
|
1516
|
+
const Ne = /* @__PURE__ */ ne(Te);
|
|
1547
1517
|
export {
|
|
1548
|
-
|
|
1518
|
+
Ne as q
|
|
1549
1519
|
};
|