@plattar/plattar-qrcode 1.134.1 → 1.148.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,33 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
-
|
|
5
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
6
|
-
|
|
4
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
7
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
|
-
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
8
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10
|
-
|
|
11
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
|
-
|
|
13
10
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
14
|
-
|
|
15
11
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
16
|
-
|
|
17
12
|
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
18
|
-
|
|
19
13
|
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
20
|
-
|
|
21
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
22
|
-
|
|
23
15
|
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
24
|
-
|
|
25
16
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
26
|
-
|
|
27
17
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
28
|
-
|
|
29
18
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
30
|
-
|
|
31
19
|
(function (f) {
|
|
32
20
|
if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") {
|
|
33
21
|
module.exports = f();
|
|
@@ -35,7 +23,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
35
23
|
define([], f);
|
|
36
24
|
} else {
|
|
37
25
|
var g;
|
|
38
|
-
|
|
39
26
|
if (typeof window !== "undefined") {
|
|
40
27
|
g = window;
|
|
41
28
|
} else if (typeof global !== "undefined") {
|
|
@@ -45,7 +32,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
45
32
|
} else {
|
|
46
33
|
g = this;
|
|
47
34
|
}
|
|
48
|
-
|
|
49
35
|
g.PlattarQRCode = f();
|
|
50
36
|
}
|
|
51
37
|
})(function () {
|
|
@@ -61,7 +47,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
61
47
|
var a = new Error("Cannot find module '" + i + "'");
|
|
62
48
|
throw a.code = "MODULE_NOT_FOUND", a;
|
|
63
49
|
}
|
|
64
|
-
|
|
65
50
|
var p = n[i] = {
|
|
66
51
|
exports: {}
|
|
67
52
|
};
|
|
@@ -70,42 +55,29 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
70
55
|
return o(n || r);
|
|
71
56
|
}, p, p.exports, r, e, n, t);
|
|
72
57
|
}
|
|
73
|
-
|
|
74
58
|
return n[i].exports;
|
|
75
59
|
}
|
|
76
|
-
|
|
77
|
-
for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) {
|
|
78
|
-
o(t[i]);
|
|
79
|
-
}
|
|
80
|
-
|
|
60
|
+
for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) o(t[i]);
|
|
81
61
|
return o;
|
|
82
62
|
}
|
|
83
|
-
|
|
84
63
|
return r;
|
|
85
64
|
}()({
|
|
86
65
|
1: [function (require, module, exports) {
|
|
87
66
|
var QRCodeStyling = require("qr-code-styling");
|
|
88
|
-
|
|
89
67
|
var BaseElement = /*#__PURE__*/function (_HTMLElement) {
|
|
90
68
|
_inherits(BaseElement, _HTMLElement);
|
|
91
|
-
|
|
92
69
|
var _super = _createSuper(BaseElement);
|
|
93
|
-
|
|
94
70
|
function BaseElement() {
|
|
95
71
|
_classCallCheck(this, BaseElement);
|
|
96
|
-
|
|
97
72
|
return _super.call(this);
|
|
98
73
|
}
|
|
99
|
-
|
|
100
74
|
_createClass(BaseElement, [{
|
|
101
75
|
key: "connectedCallback",
|
|
102
76
|
value: function connectedCallback() {
|
|
103
77
|
var _this = this;
|
|
104
|
-
|
|
105
78
|
if (this.hasAttribute("url")) {
|
|
106
79
|
this.renderQRCode();
|
|
107
80
|
}
|
|
108
|
-
|
|
109
81
|
var observer = new MutationObserver(function (mutations) {
|
|
110
82
|
mutations.forEach(function (mutation) {
|
|
111
83
|
if (mutation.type === "attributes") {
|
|
@@ -126,7 +98,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
126
98
|
name: "plattar-qrcode",
|
|
127
99
|
extension: "png"
|
|
128
100
|
};
|
|
129
|
-
|
|
130
101
|
if (this._qrCode) {
|
|
131
102
|
this._qrCode.download(opt);
|
|
132
103
|
}
|
|
@@ -135,14 +106,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
135
106
|
key: "renderQRCode",
|
|
136
107
|
value: function renderQRCode() {
|
|
137
108
|
var _this2 = this;
|
|
138
|
-
|
|
139
109
|
var url = this.hasAttribute("url") ? this.getAttribute("url") : undefined;
|
|
140
|
-
|
|
141
110
|
if (!url) {
|
|
142
111
|
console.warn("PlattarQR.renderQRCode() - required attribute \"url\" is missing or invalid, QR Code will not render");
|
|
143
112
|
return;
|
|
144
113
|
}
|
|
145
|
-
|
|
146
114
|
var width = this.hasAttribute("width") ? this.getAttribute("width") : "100%";
|
|
147
115
|
var height = this.hasAttribute("height") ? this.getAttribute("height") : "100%";
|
|
148
116
|
var margin = this.hasAttribute("margin") ? this.getAttribute("margin") : 0;
|
|
@@ -224,30 +192,27 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
224
192
|
type: "canvas"
|
|
225
193
|
};
|
|
226
194
|
this._options.margin = margin;
|
|
227
|
-
this._options.image = image;
|
|
195
|
+
this._options.image = image;
|
|
228
196
|
|
|
197
|
+
// set the colors
|
|
229
198
|
this._options.dotsOptions.color = color;
|
|
230
199
|
this._options.cornersDotOptions.color = color;
|
|
231
200
|
this._options.cornersSquareOptions.color = color;
|
|
232
|
-
|
|
233
201
|
switch (style) {
|
|
234
202
|
case "dots":
|
|
235
203
|
this._options.dotsOptions.type = "dots";
|
|
236
204
|
break;
|
|
237
|
-
|
|
238
205
|
case "default":
|
|
239
206
|
default:
|
|
240
207
|
this._options.dotsOptions.type = "rounded";
|
|
241
208
|
}
|
|
242
|
-
|
|
243
209
|
var shortenURL = this.hasAttribute("shorten") ? this.getAttribute("shorten") : "false";
|
|
244
|
-
|
|
245
210
|
if (shortenURL && shortenURL.toLowerCase() === "true") {
|
|
246
211
|
this._ShortenURL(url).then(function (newURL) {
|
|
247
212
|
_this2._GenerateQRCode(newURL, width, height);
|
|
248
213
|
})["catch"](function (_err) {
|
|
249
|
-
console.warn(_err);
|
|
250
|
-
|
|
214
|
+
console.warn(_err);
|
|
215
|
+
// ignore error and just generate normal QR Code
|
|
251
216
|
_this2._GenerateQRCode(url, width, height);
|
|
252
217
|
});
|
|
253
218
|
} else {
|
|
@@ -260,18 +225,23 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
260
225
|
if (!this._qrCode) {
|
|
261
226
|
return;
|
|
262
227
|
}
|
|
263
|
-
|
|
264
228
|
var canvas = this._qrCode._canvas;
|
|
265
|
-
|
|
266
229
|
if (canvas) {
|
|
267
|
-
canvas.style.width
|
|
268
|
-
|
|
230
|
+
if (canvas.style.width !== "100%") {
|
|
231
|
+
canvas.style.width = "100%";
|
|
232
|
+
}
|
|
233
|
+
if (canvas.style.height !== "100%") {
|
|
234
|
+
canvas.style.height = "100%";
|
|
235
|
+
}
|
|
269
236
|
}
|
|
270
|
-
|
|
271
237
|
if (this._divContainer) {
|
|
272
238
|
var div = this._divContainer;
|
|
273
|
-
div.style.width
|
|
274
|
-
|
|
239
|
+
if (div.style.width !== width) {
|
|
240
|
+
div.style.width = width;
|
|
241
|
+
}
|
|
242
|
+
if (div.style.height !== height) {
|
|
243
|
+
div.style.height = height;
|
|
244
|
+
}
|
|
275
245
|
}
|
|
276
246
|
}
|
|
277
247
|
}, {
|
|
@@ -282,22 +252,18 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
282
252
|
mode: 'open'
|
|
283
253
|
});
|
|
284
254
|
var qrCode = this._qrCode;
|
|
285
|
-
|
|
286
255
|
if (!qrCode) {
|
|
287
256
|
var div = document.createElement("div");
|
|
257
|
+
div.style.display = "none";
|
|
288
258
|
shadow.appendChild(div);
|
|
289
259
|
this._divContainer = div;
|
|
290
260
|
this._qrCode = new QRCodeStyling(this._options);
|
|
291
|
-
|
|
292
261
|
this._qrCode.append(div);
|
|
293
|
-
|
|
294
262
|
this._UpdateCanvas(width, height);
|
|
295
|
-
|
|
263
|
+
div.style.display = "block";
|
|
296
264
|
return;
|
|
297
265
|
}
|
|
298
|
-
|
|
299
266
|
this._qrCode.update(this._options);
|
|
300
|
-
|
|
301
267
|
this._UpdateCanvas(width, height);
|
|
302
268
|
}
|
|
303
269
|
}, {
|
|
@@ -309,20 +275,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
309
275
|
key: "_ShortenURL",
|
|
310
276
|
value: function _ShortenURL(url) {
|
|
311
277
|
var _this3 = this;
|
|
312
|
-
|
|
313
278
|
return new Promise(function (accept, reject) {
|
|
314
279
|
if (!_this3._IsFetchAPISupported()) {
|
|
315
280
|
return reject(new Error("PlattarQR._ShortenURL() - fetch api not supported, cannot proceed"));
|
|
316
281
|
}
|
|
317
|
-
|
|
318
282
|
try {
|
|
319
283
|
var b64 = btoa(url);
|
|
320
|
-
var endpoint = "https://
|
|
284
|
+
var endpoint = "https://c2.plattar.space/api/v2/shorten?base64=" + b64;
|
|
321
285
|
fetch(endpoint).then(function (response) {
|
|
322
286
|
if (!response.ok) {
|
|
323
287
|
throw new Error("PlattarQR._ShortenURL() - response was invalid");
|
|
324
288
|
}
|
|
325
|
-
|
|
326
289
|
return response.text();
|
|
327
290
|
}).then(function (text) {
|
|
328
291
|
return accept(text);
|
|
@@ -335,31 +298,23 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
335
298
|
});
|
|
336
299
|
}
|
|
337
300
|
}]);
|
|
338
|
-
|
|
339
301
|
return BaseElement;
|
|
340
302
|
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
|
|
341
|
-
|
|
342
303
|
module.exports = BaseElement;
|
|
343
304
|
}, {
|
|
344
305
|
"qr-code-styling": 4
|
|
345
306
|
}],
|
|
346
307
|
2: [function (require, module, exports) {
|
|
347
308
|
var BaseElement = require("./base/base-element.js");
|
|
348
|
-
|
|
349
309
|
var QRCodeElement = /*#__PURE__*/function (_BaseElement) {
|
|
350
310
|
_inherits(QRCodeElement, _BaseElement);
|
|
351
|
-
|
|
352
311
|
var _super2 = _createSuper(QRCodeElement);
|
|
353
|
-
|
|
354
312
|
function QRCodeElement() {
|
|
355
313
|
_classCallCheck(this, QRCodeElement);
|
|
356
|
-
|
|
357
314
|
return _super2.call(this);
|
|
358
315
|
}
|
|
359
|
-
|
|
360
316
|
return _createClass(QRCodeElement);
|
|
361
317
|
}(BaseElement);
|
|
362
|
-
|
|
363
318
|
module.exports = QRCodeElement;
|
|
364
319
|
}, {
|
|
365
320
|
"./base/base-element.js": 1
|
|
@@ -368,15 +323,12 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
368
323
|
"use strict";
|
|
369
324
|
|
|
370
325
|
var QRCodeElement = require("./elements/qrcode-element.js");
|
|
371
|
-
|
|
372
326
|
var Version = require("./version");
|
|
373
|
-
|
|
374
327
|
if (customElements) {
|
|
375
328
|
if (customElements.get("plattar-qrcode") === undefined) {
|
|
376
329
|
customElements.define("plattar-qrcode", QRCodeElement);
|
|
377
330
|
}
|
|
378
331
|
}
|
|
379
|
-
|
|
380
332
|
console.log("using @plattar/plattar-qrcode v" + Version);
|
|
381
333
|
module.exports = {
|
|
382
334
|
version: Version
|
|
@@ -391,1342 +343,987 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
391
343
|
}(self, function () {
|
|
392
344
|
return function () {
|
|
393
345
|
var t = {
|
|
394
|
-
|
|
395
|
-
|
|
346
|
+
192: function _(t, e) {
|
|
347
|
+
var r,
|
|
396
348
|
n,
|
|
397
349
|
o = function () {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
350
|
+
var t = function t(_t, e) {
|
|
351
|
+
var r = _t,
|
|
352
|
+
n = a[e],
|
|
353
|
+
o = null,
|
|
354
|
+
i = 0,
|
|
355
|
+
u = null,
|
|
356
|
+
v = [],
|
|
357
|
+
w = {},
|
|
358
|
+
m = function m(t, e) {
|
|
359
|
+
o = function (t) {
|
|
360
|
+
for (var e = new Array(t), r = 0; r < t; r += 1) {
|
|
361
|
+
e[r] = new Array(t);
|
|
362
|
+
for (var n = 0; n < t; n += 1) e[r][n] = null;
|
|
363
|
+
}
|
|
364
|
+
return e;
|
|
365
|
+
}(i = 4 * r + 17), b(0, 0), b(i - 7, 0), b(0, i - 7), x(), _(), M(t, e), r >= 7 && S(t), null == u && (u = A(r, n, v)), C(u, e);
|
|
366
|
+
},
|
|
367
|
+
b = function b(t, e) {
|
|
368
|
+
for (var r = -1; r <= 7; r += 1) if (!(t + r <= -1 || i <= t + r)) for (var n = -1; n <= 7; n += 1) e + n <= -1 || i <= e + n || (o[t + r][e + n] = 0 <= r && r <= 6 && (0 == n || 6 == n) || 0 <= n && n <= 6 && (0 == r || 6 == r) || 2 <= r && r <= 4 && 2 <= n && n <= 4);
|
|
369
|
+
},
|
|
370
|
+
_ = function _() {
|
|
371
|
+
for (var t = 8; t < i - 8; t += 1) null == o[t][6] && (o[t][6] = t % 2 == 0);
|
|
372
|
+
for (var e = 8; e < i - 8; e += 1) null == o[6][e] && (o[6][e] = e % 2 == 0);
|
|
373
|
+
},
|
|
374
|
+
x = function x() {
|
|
375
|
+
for (var t = s.getPatternPosition(r), e = 0; e < t.length; e += 1) for (var n = 0; n < t.length; n += 1) {
|
|
376
|
+
var i = t[e],
|
|
377
|
+
a = t[n];
|
|
378
|
+
if (null == o[i][a]) for (var u = -2; u <= 2; u += 1) for (var h = -2; h <= 2; h += 1) o[i + u][a + h] = -2 == u || 2 == u || -2 == h || 2 == h || 0 == u && 0 == h;
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
S = function S(t) {
|
|
382
|
+
for (var e = s.getBCHTypeNumber(r), n = 0; n < 18; n += 1) {
|
|
383
|
+
var a = !t && 1 == (e >> n & 1);
|
|
384
|
+
o[Math.floor(n / 3)][n % 3 + i - 8 - 3] = a;
|
|
385
|
+
}
|
|
386
|
+
for (n = 0; n < 18; n += 1) a = !t && 1 == (e >> n & 1), o[n % 3 + i - 8 - 3][Math.floor(n / 3)] = a;
|
|
387
|
+
},
|
|
388
|
+
M = function M(t, e) {
|
|
389
|
+
for (var r = n << 3 | e, a = s.getBCHTypeInfo(r), u = 0; u < 15; u += 1) {
|
|
390
|
+
var h = !t && 1 == (a >> u & 1);
|
|
391
|
+
u < 6 ? o[u][8] = h : u < 8 ? o[u + 1][8] = h : o[i - 15 + u][8] = h;
|
|
392
|
+
}
|
|
393
|
+
for (u = 0; u < 15; u += 1) h = !t && 1 == (a >> u & 1), u < 8 ? o[8][i - u - 1] = h : u < 9 ? o[8][15 - u - 1 + 1] = h : o[8][15 - u - 1] = h;
|
|
394
|
+
o[i - 8][8] = !t;
|
|
395
|
+
},
|
|
396
|
+
C = function C(t, e) {
|
|
397
|
+
for (var r = -1, n = i - 1, a = 7, u = 0, h = s.getMaskFunction(e), c = i - 1; c > 0; c -= 2) for (6 == c && (c -= 1);;) {
|
|
398
|
+
for (var l = 0; l < 2; l += 1) if (null == o[n][c - l]) {
|
|
399
|
+
var d = !1;
|
|
400
|
+
u < t.length && (d = 1 == (t[u] >>> a & 1)), h(n, c - l) && (d = !d), o[n][c - l] = d, -1 == (a -= 1) && (u += 1, a = 7);
|
|
401
|
+
}
|
|
402
|
+
if ((n += r) < 0 || i <= n) {
|
|
403
|
+
n -= r, r = -r;
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
A = function A(t, e, r) {
|
|
409
|
+
for (var n = c.getRSBlocks(t, e), o = l(), i = 0; i < r.length; i += 1) {
|
|
410
|
+
var a = r[i];
|
|
411
|
+
o.put(a.getMode(), 4), o.put(a.getLength(), s.getLengthInBits(a.getMode(), t)), a.write(o);
|
|
412
|
+
}
|
|
413
|
+
var u = 0;
|
|
414
|
+
for (i = 0; i < n.length; i += 1) u += n[i].dataCount;
|
|
415
|
+
if (o.getLengthInBits() > 8 * u) throw "code length overflow. (" + o.getLengthInBits() + ">" + 8 * u + ")";
|
|
416
|
+
for (o.getLengthInBits() + 4 <= 8 * u && o.put(0, 4); o.getLengthInBits() % 8 != 0;) o.putBit(!1);
|
|
417
|
+
for (; !(o.getLengthInBits() >= 8 * u || (o.put(236, 8), o.getLengthInBits() >= 8 * u));) o.put(17, 8);
|
|
418
|
+
return function (t, e) {
|
|
419
|
+
for (var r = 0, n = 0, o = 0, i = new Array(e.length), a = new Array(e.length), u = 0; u < e.length; u += 1) {
|
|
420
|
+
var c = e[u].dataCount,
|
|
421
|
+
l = e[u].totalCount - c;
|
|
422
|
+
n = Math.max(n, c), o = Math.max(o, l), i[u] = new Array(c);
|
|
423
|
+
for (var d = 0; d < i[u].length; d += 1) i[u][d] = 255 & t.getBuffer()[d + r];
|
|
424
|
+
r += c;
|
|
425
|
+
var f = s.getErrorCorrectPolynomial(l),
|
|
426
|
+
g = h(i[u], f.getLength() - 1).mod(f);
|
|
427
|
+
for (a[u] = new Array(f.getLength() - 1), d = 0; d < a[u].length; d += 1) {
|
|
428
|
+
var p = d + g.getLength() - a[u].length;
|
|
429
|
+
a[u][d] = p >= 0 ? g.getAt(p) : 0;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
var v = 0;
|
|
433
|
+
for (d = 0; d < e.length; d += 1) v += e[d].totalCount;
|
|
434
|
+
var w = new Array(v),
|
|
435
|
+
y = 0;
|
|
436
|
+
for (d = 0; d < n; d += 1) for (u = 0; u < e.length; u += 1) d < i[u].length && (w[y] = i[u][d], y += 1);
|
|
437
|
+
for (d = 0; d < o; d += 1) for (u = 0; u < e.length; u += 1) d < a[u].length && (w[y] = a[u][d], y += 1);
|
|
438
|
+
return w;
|
|
439
|
+
}(o, n);
|
|
440
|
+
};
|
|
441
|
+
w.addData = function (t, e) {
|
|
442
|
+
var r = null;
|
|
443
|
+
switch (e = e || "Byte") {
|
|
444
|
+
case "Numeric":
|
|
445
|
+
r = d(t);
|
|
446
|
+
break;
|
|
447
|
+
case "Alphanumeric":
|
|
448
|
+
r = f(t);
|
|
449
|
+
break;
|
|
450
|
+
case "Byte":
|
|
451
|
+
r = g(t);
|
|
452
|
+
break;
|
|
453
|
+
case "Kanji":
|
|
454
|
+
r = p(t);
|
|
455
|
+
break;
|
|
456
|
+
default:
|
|
457
|
+
throw "mode:" + e;
|
|
413
458
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
for (var e = 8; e < i - 8; e += 1) {
|
|
432
|
-
null == o[6][e] && (o[6][e] = e % 2 == 0);
|
|
433
|
-
}
|
|
434
|
-
},
|
|
435
|
-
x = function x() {
|
|
436
|
-
for (var t = s.getPatternPosition(r), e = 0; e < t.length; e += 1) {
|
|
437
|
-
for (var n = 0; n < t.length; n += 1) {
|
|
438
|
-
var i = t[e],
|
|
439
|
-
a = t[n];
|
|
440
|
-
if (null == o[i][a]) for (var u = -2; u <= 2; u += 1) {
|
|
441
|
-
for (var h = -2; h <= 2; h += 1) {
|
|
442
|
-
o[i + u][a + h] = -2 == u || 2 == u || -2 == h || 2 == h || 0 == u && 0 == h;
|
|
459
|
+
v.push(r), u = null;
|
|
460
|
+
}, w.isDark = function (t, e) {
|
|
461
|
+
if (t < 0 || i <= t || e < 0 || i <= e) throw t + "," + e;
|
|
462
|
+
return o[t][e];
|
|
463
|
+
}, w.getModuleCount = function () {
|
|
464
|
+
return i;
|
|
465
|
+
}, w.make = function () {
|
|
466
|
+
if (r < 1) {
|
|
467
|
+
for (var t = 1; t < 40; t++) {
|
|
468
|
+
for (var e = c.getRSBlocks(t, n), o = l(), i = 0; i < v.length; i++) {
|
|
469
|
+
var a = v[i];
|
|
470
|
+
o.put(a.getMode(), 4), o.put(a.getLength(), s.getLengthInBits(a.getMode(), t)), a.write(o);
|
|
471
|
+
}
|
|
472
|
+
var u = 0;
|
|
473
|
+
for (i = 0; i < e.length; i++) u += e[i].dataCount;
|
|
474
|
+
if (o.getLengthInBits() <= 8 * u) break;
|
|
443
475
|
}
|
|
476
|
+
r = t;
|
|
444
477
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
var a = !t && 1 == (e >> n & 1);
|
|
451
|
-
o[Math.floor(n / 3)][n % 3 + i - 8 - 3] = a;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
for (n = 0; n < 18; n += 1) {
|
|
455
|
-
a = !t && 1 == (e >> n & 1), o[n % 3 + i - 8 - 3][Math.floor(n / 3)] = a;
|
|
456
|
-
}
|
|
457
|
-
},
|
|
458
|
-
M = function M(t, e) {
|
|
459
|
-
for (var r = n << 3 | e, a = s.getBCHTypeInfo(r), u = 0; u < 15; u += 1) {
|
|
460
|
-
var h = !t && 1 == (a >> u & 1);
|
|
461
|
-
u < 6 ? o[u][8] = h : u < 8 ? o[u + 1][8] = h : o[i - 15 + u][8] = h;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
for (u = 0; u < 15; u += 1) {
|
|
465
|
-
h = !t && 1 == (a >> u & 1), u < 8 ? o[8][i - u - 1] = h : u < 9 ? o[8][15 - u - 1 + 1] = h : o[8][15 - u - 1] = h;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
o[i - 8][8] = !t;
|
|
469
|
-
},
|
|
470
|
-
C = function C(t, e) {
|
|
471
|
-
for (var r = -1, n = i - 1, a = 7, u = 0, h = s.getMaskFunction(e), c = i - 1; c > 0; c -= 2) {
|
|
472
|
-
for (6 == c && (c -= 1);;) {
|
|
473
|
-
for (var l = 0; l < 2; l += 1) {
|
|
474
|
-
if (null == o[n][c - l]) {
|
|
475
|
-
var d = !1;
|
|
476
|
-
u < t.length && (d = 1 == (t[u] >>> a & 1)), h(n, c - l) && (d = !d), o[n][c - l] = d, -1 == (a -= 1) && (u += 1, a = 7);
|
|
478
|
+
m(!1, function () {
|
|
479
|
+
for (var t = 0, e = 0, r = 0; r < 8; r += 1) {
|
|
480
|
+
m(!0, r);
|
|
481
|
+
var n = s.getLostPoint(w);
|
|
482
|
+
(0 == r || t > n) && (t = n, e = r);
|
|
477
483
|
}
|
|
484
|
+
return e;
|
|
485
|
+
}());
|
|
486
|
+
}, w.createTableTag = function (t, e) {
|
|
487
|
+
t = t || 2;
|
|
488
|
+
var r = "";
|
|
489
|
+
r += '<table style="', r += " border-width: 0px; border-style: none;", r += " border-collapse: collapse;", r += " padding: 0px; margin: " + (e = void 0 === e ? 4 * t : e) + "px;", r += '">', r += "<tbody>";
|
|
490
|
+
for (var n = 0; n < w.getModuleCount(); n += 1) {
|
|
491
|
+
r += "<tr>";
|
|
492
|
+
for (var o = 0; o < w.getModuleCount(); o += 1) r += '<td style="', r += " border-width: 0px; border-style: none;", r += " border-collapse: collapse;", r += " padding: 0px; margin: 0px;", r += " width: " + t + "px;", r += " height: " + t + "px;", r += " background-color: ", r += w.isDark(n, o) ? "#000000" : "#ffffff", r += ";", r += '"/>';
|
|
493
|
+
r += "</tr>";
|
|
478
494
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
495
|
+
return (r += "</tbody>") + "</table>";
|
|
496
|
+
}, w.createSvgTag = function (t, e, r, n) {
|
|
497
|
+
var o = {};
|
|
498
|
+
"object" == _typeof(arguments[0]) && (t = (o = arguments[0]).cellSize, e = o.margin, r = o.alt, n = o.title), t = t || 2, e = void 0 === e ? 4 * t : e, (r = "string" == typeof r ? {
|
|
499
|
+
text: r
|
|
500
|
+
} : r || {}).text = r.text || null, r.id = r.text ? r.id || "qrcode-description" : null, (n = "string" == typeof n ? {
|
|
501
|
+
text: n
|
|
502
|
+
} : n || {}).text = n.text || null, n.id = n.text ? n.id || "qrcode-title" : null;
|
|
503
|
+
var i,
|
|
504
|
+
a,
|
|
505
|
+
s,
|
|
506
|
+
u,
|
|
507
|
+
h = w.getModuleCount() * t + 2 * e,
|
|
508
|
+
c = "";
|
|
509
|
+
for (u = "l" + t + ",0 0," + t + " -" + t + ",0 0,-" + t + "z ", c += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', c += o.scalable ? "" : ' width="' + h + 'px" height="' + h + 'px"', c += ' viewBox="0 0 ' + h + " " + h + '" ', c += ' preserveAspectRatio="xMinYMin meet"', c += n.text || r.text ? ' role="img" aria-labelledby="' + k([n.id, r.id].join(" ").trim()) + '"' : "", c += ">", c += n.text ? '<title id="' + k(n.id) + '">' + k(n.text) + "</title>" : "", c += r.text ? '<description id="' + k(r.id) + '">' + k(r.text) + "</description>" : "", c += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', c += '<path d="', a = 0; a < w.getModuleCount(); a += 1) for (s = a * t + e, i = 0; i < w.getModuleCount(); i += 1) w.isDark(a, i) && (c += "M" + (i * t + e) + "," + s + u);
|
|
510
|
+
return (c += '" stroke="transparent" fill="black"/>') + "</svg>";
|
|
511
|
+
}, w.createDataURL = function (t, e) {
|
|
512
|
+
t = t || 2, e = void 0 === e ? 4 * t : e;
|
|
513
|
+
var r = w.getModuleCount() * t + 2 * e,
|
|
514
|
+
n = e,
|
|
515
|
+
o = r - e;
|
|
516
|
+
return y(r, r, function (e, r) {
|
|
517
|
+
if (n <= e && e < o && n <= r && r < o) {
|
|
518
|
+
var i = Math.floor((e - n) / t),
|
|
519
|
+
a = Math.floor((r - n) / t);
|
|
520
|
+
return w.isDark(a, i) ? 0 : 1;
|
|
521
|
+
}
|
|
522
|
+
return 1;
|
|
523
|
+
});
|
|
524
|
+
}, w.createImgTag = function (t, e, r) {
|
|
525
|
+
t = t || 2, e = void 0 === e ? 4 * t : e;
|
|
526
|
+
var n = w.getModuleCount() * t + 2 * e,
|
|
527
|
+
o = "";
|
|
528
|
+
return o += "<img", o += ' src="', o += w.createDataURL(t, e), o += '"', o += ' width="', o += n, o += '"', o += ' height="', o += n, o += '"', r && (o += ' alt="', o += k(r), o += '"'), o + "/>";
|
|
529
|
+
};
|
|
530
|
+
var k = function k(t) {
|
|
531
|
+
for (var e = "", r = 0; r < t.length; r += 1) {
|
|
532
|
+
var n = t.charAt(r);
|
|
533
|
+
switch (n) {
|
|
534
|
+
case "<":
|
|
535
|
+
e += "<";
|
|
536
|
+
break;
|
|
537
|
+
case ">":
|
|
538
|
+
e += ">";
|
|
539
|
+
break;
|
|
540
|
+
case "&":
|
|
541
|
+
e += "&";
|
|
542
|
+
break;
|
|
543
|
+
case '"':
|
|
544
|
+
e += """;
|
|
545
|
+
break;
|
|
546
|
+
default:
|
|
547
|
+
e += n;
|
|
548
|
+
}
|
|
483
549
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
l
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
550
|
+
return e;
|
|
551
|
+
};
|
|
552
|
+
return w.createASCII = function (t, e) {
|
|
553
|
+
if ((t = t || 1) < 2) return function (t) {
|
|
554
|
+
t = void 0 === t ? 2 : t;
|
|
555
|
+
var e,
|
|
556
|
+
r,
|
|
557
|
+
n,
|
|
558
|
+
o,
|
|
559
|
+
i,
|
|
560
|
+
a = 1 * w.getModuleCount() + 2 * t,
|
|
561
|
+
s = t,
|
|
562
|
+
u = a - t,
|
|
563
|
+
h = {
|
|
564
|
+
"██": "█",
|
|
565
|
+
"█ ": "▀",
|
|
566
|
+
" █": "▄",
|
|
567
|
+
" ": " "
|
|
568
|
+
},
|
|
569
|
+
c = {
|
|
570
|
+
"██": "▀",
|
|
571
|
+
"█ ": "▀",
|
|
572
|
+
" █": " ",
|
|
573
|
+
" ": " "
|
|
574
|
+
},
|
|
575
|
+
l = "";
|
|
576
|
+
for (e = 0; e < a; e += 2) {
|
|
577
|
+
for (n = Math.floor((e - s) / 1), o = Math.floor((e + 1 - s) / 1), r = 0; r < a; r += 1) i = "█", s <= r && r < u && s <= e && e < u && w.isDark(n, Math.floor((r - s) / 1)) && (i = " "), s <= r && r < u && s <= e + 1 && e + 1 < u && w.isDark(o, Math.floor((r - s) / 1)) ? i += " " : i += "█", l += t < 1 && e + 1 >= u ? c[i] : h[i];
|
|
578
|
+
l += "\n";
|
|
579
|
+
}
|
|
580
|
+
return a % 2 && t > 0 ? l.substring(0, l.length - a - 1) + Array(a + 1).join("▀") : l.substring(0, l.length - 1);
|
|
581
|
+
}(e);
|
|
582
|
+
t -= 1, e = void 0 === e ? 2 * t : e;
|
|
583
|
+
var r,
|
|
584
|
+
n,
|
|
585
|
+
o,
|
|
586
|
+
i,
|
|
587
|
+
a = w.getModuleCount() * t + 2 * e,
|
|
588
|
+
s = e,
|
|
589
|
+
u = a - e,
|
|
590
|
+
h = Array(t + 1).join("██"),
|
|
591
|
+
c = Array(t + 1).join(" "),
|
|
592
|
+
l = "",
|
|
593
|
+
d = "";
|
|
594
|
+
for (r = 0; r < a; r += 1) {
|
|
595
|
+
for (o = Math.floor((r - s) / t), d = "", n = 0; n < a; n += 1) i = 1, s <= n && n < u && s <= r && r < u && w.isDark(o, Math.floor((n - s) / t)) && (i = 0), d += i ? h : c;
|
|
596
|
+
for (o = 0; o < t; o += 1) l += d + "\n";
|
|
517
597
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
598
|
+
return l.substring(0, l.length - 1);
|
|
599
|
+
}, w.renderTo2dContext = function (t, e) {
|
|
600
|
+
e = e || 2;
|
|
601
|
+
for (var r = w.getModuleCount(), n = 0; n < r; n++) for (var o = 0; o < r; o++) t.fillStyle = w.isDark(n, o) ? "black" : "white", t.fillRect(n * e, o * e, e, e);
|
|
602
|
+
}, w;
|
|
603
|
+
};
|
|
604
|
+
t.stringToBytes = (t.stringToBytesFuncs = {
|
|
605
|
+
"default": function _default(t) {
|
|
606
|
+
for (var e = [], r = 0; r < t.length; r += 1) {
|
|
607
|
+
var n = t.charCodeAt(r);
|
|
608
|
+
e.push(255 & n);
|
|
526
609
|
}
|
|
610
|
+
return e;
|
|
527
611
|
}
|
|
528
|
-
|
|
529
|
-
var
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
612
|
+
})["default"], t.createStringToBytes = function (t, e) {
|
|
613
|
+
var r = function () {
|
|
614
|
+
for (var r = w(t), n = function n() {
|
|
615
|
+
var t = r.read();
|
|
616
|
+
if (-1 == t) throw "eof";
|
|
617
|
+
return t;
|
|
618
|
+
}, o = 0, i = {};;) {
|
|
619
|
+
var a = r.read();
|
|
620
|
+
if (-1 == a) break;
|
|
621
|
+
var s = n(),
|
|
622
|
+
u = n() << 8 | n();
|
|
623
|
+
i[String.fromCharCode(a << 8 | s)] = u, o += 1;
|
|
624
|
+
}
|
|
625
|
+
if (o != e) throw o + " != " + e;
|
|
626
|
+
return i;
|
|
627
|
+
}(),
|
|
628
|
+
n = "?".charCodeAt(0);
|
|
629
|
+
return function (t) {
|
|
630
|
+
for (var e = [], o = 0; o < t.length; o += 1) {
|
|
631
|
+
var i = t.charCodeAt(o);
|
|
632
|
+
if (i < 128) e.push(i);else {
|
|
633
|
+
var a = r[t.charAt(o)];
|
|
634
|
+
"number" == typeof a ? (255 & a) == a ? e.push(a) : (e.push(a >>> 8), e.push(255 & a)) : e.push(n);
|
|
635
|
+
}
|
|
541
636
|
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
637
|
+
return e;
|
|
638
|
+
};
|
|
639
|
+
};
|
|
640
|
+
var e,
|
|
641
|
+
r,
|
|
642
|
+
n,
|
|
643
|
+
o,
|
|
644
|
+
i,
|
|
645
|
+
a = {
|
|
646
|
+
L: 1,
|
|
647
|
+
M: 0,
|
|
648
|
+
Q: 3,
|
|
649
|
+
H: 2
|
|
650
|
+
},
|
|
651
|
+
s = (e = [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], r = 1335, n = 7973, i = function i(t) {
|
|
652
|
+
for (var e = 0; 0 != t;) e += 1, t >>>= 1;
|
|
653
|
+
return e;
|
|
654
|
+
}, (o = {}).getBCHTypeInfo = function (t) {
|
|
655
|
+
for (var e = t << 10; i(e) - i(r) >= 0;) e ^= r << i(e) - i(r);
|
|
656
|
+
return 21522 ^ (t << 10 | e);
|
|
657
|
+
}, o.getBCHTypeNumber = function (t) {
|
|
658
|
+
for (var e = t << 12; i(e) - i(n) >= 0;) e ^= n << i(e) - i(n);
|
|
659
|
+
return t << 12 | e;
|
|
660
|
+
}, o.getPatternPosition = function (t) {
|
|
661
|
+
return e[t - 1];
|
|
662
|
+
}, o.getMaskFunction = function (t) {
|
|
663
|
+
switch (t) {
|
|
664
|
+
case 0:
|
|
665
|
+
return function (t, e) {
|
|
666
|
+
return (t + e) % 2 == 0;
|
|
667
|
+
};
|
|
668
|
+
case 1:
|
|
669
|
+
return function (t, e) {
|
|
670
|
+
return t % 2 == 0;
|
|
671
|
+
};
|
|
672
|
+
case 2:
|
|
673
|
+
return function (t, e) {
|
|
674
|
+
return e % 3 == 0;
|
|
675
|
+
};
|
|
676
|
+
case 3:
|
|
677
|
+
return function (t, e) {
|
|
678
|
+
return (t + e) % 3 == 0;
|
|
679
|
+
};
|
|
680
|
+
case 4:
|
|
681
|
+
return function (t, e) {
|
|
682
|
+
return (Math.floor(t / 2) + Math.floor(e / 3)) % 2 == 0;
|
|
683
|
+
};
|
|
684
|
+
case 5:
|
|
685
|
+
return function (t, e) {
|
|
686
|
+
return t * e % 2 + t * e % 3 == 0;
|
|
687
|
+
};
|
|
688
|
+
case 6:
|
|
689
|
+
return function (t, e) {
|
|
690
|
+
return (t * e % 2 + t * e % 3) % 2 == 0;
|
|
691
|
+
};
|
|
692
|
+
case 7:
|
|
693
|
+
return function (t, e) {
|
|
694
|
+
return (t * e % 3 + (t + e) % 2) % 2 == 0;
|
|
695
|
+
};
|
|
696
|
+
default:
|
|
697
|
+
throw "bad maskPattern:" + t;
|
|
547
698
|
}
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
for (var e = c.getRSBlocks(t, n), o = l(), i = 0; i < v.length; i++) {
|
|
588
|
-
var a = v[i];
|
|
589
|
-
o.put(a.getMode(), 4), o.put(a.getLength(), s.getLengthInBits(a.getMode(), t)), a.write(o);
|
|
699
|
+
}, o.getErrorCorrectPolynomial = function (t) {
|
|
700
|
+
for (var e = h([1], 0), r = 0; r < t; r += 1) e = e.multiply(h([1, u.gexp(r)], 0));
|
|
701
|
+
return e;
|
|
702
|
+
}, o.getLengthInBits = function (t, e) {
|
|
703
|
+
if (1 <= e && e < 10) switch (t) {
|
|
704
|
+
case 1:
|
|
705
|
+
return 10;
|
|
706
|
+
case 2:
|
|
707
|
+
return 9;
|
|
708
|
+
case 4:
|
|
709
|
+
case 8:
|
|
710
|
+
return 8;
|
|
711
|
+
default:
|
|
712
|
+
throw "mode:" + t;
|
|
713
|
+
} else if (e < 27) switch (t) {
|
|
714
|
+
case 1:
|
|
715
|
+
return 12;
|
|
716
|
+
case 2:
|
|
717
|
+
return 11;
|
|
718
|
+
case 4:
|
|
719
|
+
return 16;
|
|
720
|
+
case 8:
|
|
721
|
+
return 10;
|
|
722
|
+
default:
|
|
723
|
+
throw "mode:" + t;
|
|
724
|
+
} else {
|
|
725
|
+
if (!(e < 41)) throw "type:" + e;
|
|
726
|
+
switch (t) {
|
|
727
|
+
case 1:
|
|
728
|
+
return 14;
|
|
729
|
+
case 2:
|
|
730
|
+
return 13;
|
|
731
|
+
case 4:
|
|
732
|
+
return 16;
|
|
733
|
+
case 8:
|
|
734
|
+
return 12;
|
|
735
|
+
default:
|
|
736
|
+
throw "mode:" + t;
|
|
737
|
+
}
|
|
590
738
|
}
|
|
591
|
-
|
|
592
|
-
var
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
u += e[i].dataCount;
|
|
739
|
+
}, o.getLostPoint = function (t) {
|
|
740
|
+
for (var e = t.getModuleCount(), r = 0, n = 0; n < e; n += 1) for (var o = 0; o < e; o += 1) {
|
|
741
|
+
for (var i = 0, a = t.isDark(n, o), s = -1; s <= 1; s += 1) if (!(n + s < 0 || e <= n + s)) for (var u = -1; u <= 1; u += 1) o + u < 0 || e <= o + u || 0 == s && 0 == u || a == t.isDark(n + s, o + u) && (i += 1);
|
|
742
|
+
i > 5 && (r += 3 + i - 5);
|
|
596
743
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
(
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
r
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
return (c += '" stroke="transparent" fill="black"/>') + "</svg>";
|
|
650
|
-
}, w.createDataURL = function (t, e) {
|
|
651
|
-
t = t || 2, e = void 0 === e ? 4 * t : e;
|
|
652
|
-
var r = w.getModuleCount() * t + 2 * e,
|
|
653
|
-
n = e,
|
|
654
|
-
o = r - e;
|
|
655
|
-
return y(r, r, function (e, r) {
|
|
656
|
-
if (n <= e && e < o && n <= r && r < o) {
|
|
657
|
-
var i = Math.floor((e - n) / t),
|
|
658
|
-
a = Math.floor((r - n) / t);
|
|
659
|
-
return w.isDark(a, i) ? 0 : 1;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
return 1;
|
|
663
|
-
});
|
|
664
|
-
}, w.createImgTag = function (t, e, r) {
|
|
665
|
-
t = t || 2, e = void 0 === e ? 4 * t : e;
|
|
666
|
-
var n = w.getModuleCount() * t + 2 * e,
|
|
667
|
-
o = "";
|
|
668
|
-
return o += "<img", o += ' src="', o += w.createDataURL(t, e), o += '"', o += ' width="', o += n, o += '"', o += ' height="', o += n, o += '"', r && (o += ' alt="', o += k(r), o += '"'), o + "/>";
|
|
669
|
-
};
|
|
670
|
-
|
|
671
|
-
var k = function k(t) {
|
|
672
|
-
for (var e = "", r = 0; r < t.length; r += 1) {
|
|
673
|
-
var n = t.charAt(r);
|
|
674
|
-
|
|
675
|
-
switch (n) {
|
|
676
|
-
case "<":
|
|
677
|
-
e += "<";
|
|
678
|
-
break;
|
|
679
|
-
|
|
680
|
-
case ">":
|
|
681
|
-
e += ">";
|
|
682
|
-
break;
|
|
683
|
-
|
|
684
|
-
case "&":
|
|
685
|
-
e += "&";
|
|
686
|
-
break;
|
|
687
|
-
|
|
688
|
-
case '"':
|
|
689
|
-
e += """;
|
|
690
|
-
break;
|
|
691
|
-
|
|
692
|
-
default:
|
|
693
|
-
e += n;
|
|
694
|
-
}
|
|
744
|
+
for (n = 0; n < e - 1; n += 1) for (o = 0; o < e - 1; o += 1) {
|
|
745
|
+
var h = 0;
|
|
746
|
+
t.isDark(n, o) && (h += 1), t.isDark(n + 1, o) && (h += 1), t.isDark(n, o + 1) && (h += 1), t.isDark(n + 1, o + 1) && (h += 1), 0 != h && 4 != h || (r += 3);
|
|
747
|
+
}
|
|
748
|
+
for (n = 0; n < e; n += 1) for (o = 0; o < e - 6; o += 1) t.isDark(n, o) && !t.isDark(n, o + 1) && t.isDark(n, o + 2) && t.isDark(n, o + 3) && t.isDark(n, o + 4) && !t.isDark(n, o + 5) && t.isDark(n, o + 6) && (r += 40);
|
|
749
|
+
for (o = 0; o < e; o += 1) for (n = 0; n < e - 6; n += 1) t.isDark(n, o) && !t.isDark(n + 1, o) && t.isDark(n + 2, o) && t.isDark(n + 3, o) && t.isDark(n + 4, o) && !t.isDark(n + 5, o) && t.isDark(n + 6, o) && (r += 40);
|
|
750
|
+
var c = 0;
|
|
751
|
+
for (o = 0; o < e; o += 1) for (n = 0; n < e; n += 1) t.isDark(n, o) && (c += 1);
|
|
752
|
+
return r + Math.abs(100 * c / e / e - 50) / 5 * 10;
|
|
753
|
+
}, o),
|
|
754
|
+
u = function () {
|
|
755
|
+
for (var t = new Array(256), e = new Array(256), r = 0; r < 8; r += 1) t[r] = 1 << r;
|
|
756
|
+
for (r = 8; r < 256; r += 1) t[r] = t[r - 4] ^ t[r - 5] ^ t[r - 6] ^ t[r - 8];
|
|
757
|
+
for (r = 0; r < 255; r += 1) e[t[r]] = r;
|
|
758
|
+
return {
|
|
759
|
+
glog: function glog(t) {
|
|
760
|
+
if (t < 1) throw "glog(" + t + ")";
|
|
761
|
+
return e[t];
|
|
762
|
+
},
|
|
763
|
+
gexp: function gexp(e) {
|
|
764
|
+
for (; e < 0;) e += 255;
|
|
765
|
+
for (; e >= 256;) e -= 255;
|
|
766
|
+
return t[e];
|
|
767
|
+
}
|
|
768
|
+
};
|
|
769
|
+
}();
|
|
770
|
+
function h(t, e) {
|
|
771
|
+
if (void 0 === t.length) throw t.length + "/" + e;
|
|
772
|
+
var r = function () {
|
|
773
|
+
for (var r = 0; r < t.length && 0 == t[r];) r += 1;
|
|
774
|
+
for (var n = new Array(t.length - r + e), o = 0; o < t.length - r; o += 1) n[o] = t[o + r];
|
|
775
|
+
return n;
|
|
776
|
+
}(),
|
|
777
|
+
n = {
|
|
778
|
+
getAt: function getAt(t) {
|
|
779
|
+
return r[t];
|
|
780
|
+
},
|
|
781
|
+
getLength: function getLength() {
|
|
782
|
+
return r.length;
|
|
783
|
+
},
|
|
784
|
+
multiply: function multiply(t) {
|
|
785
|
+
for (var e = new Array(n.getLength() + t.getLength() - 1), r = 0; r < n.getLength(); r += 1) for (var o = 0; o < t.getLength(); o += 1) e[r + o] ^= u.gexp(u.glog(n.getAt(r)) + u.glog(t.getAt(o)));
|
|
786
|
+
return h(e, 0);
|
|
787
|
+
},
|
|
788
|
+
mod: function mod(t) {
|
|
789
|
+
if (n.getLength() - t.getLength() < 0) return n;
|
|
790
|
+
for (var e = u.glog(n.getAt(0)) - u.glog(t.getAt(0)), r = new Array(n.getLength()), o = 0; o < n.getLength(); o += 1) r[o] = n.getAt(o);
|
|
791
|
+
for (o = 0; o < t.getLength(); o += 1) r[o] ^= u.gexp(u.glog(t.getAt(o)) + e);
|
|
792
|
+
return h(r, 0).mod(t);
|
|
793
|
+
}
|
|
794
|
+
};
|
|
795
|
+
return n;
|
|
695
796
|
}
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
797
|
+
var c = function () {
|
|
798
|
+
var t = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12, 7, 37, 13], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]],
|
|
799
|
+
e = function e(t, _e) {
|
|
800
|
+
var r = {};
|
|
801
|
+
return r.totalCount = t, r.dataCount = _e, r;
|
|
802
|
+
},
|
|
803
|
+
r = {
|
|
804
|
+
getRSBlocks: function getRSBlocks(r, n) {
|
|
805
|
+
var o = function (e, r) {
|
|
806
|
+
switch (r) {
|
|
807
|
+
case a.L:
|
|
808
|
+
return t[4 * (e - 1) + 0];
|
|
809
|
+
case a.M:
|
|
810
|
+
return t[4 * (e - 1) + 1];
|
|
811
|
+
case a.Q:
|
|
812
|
+
return t[4 * (e - 1) + 2];
|
|
813
|
+
case a.H:
|
|
814
|
+
return t[4 * (e - 1) + 3];
|
|
815
|
+
default:
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
}(r, n);
|
|
819
|
+
if (void 0 === o) throw "bad rs block @ typeNumber:" + r + "/errorCorrectionLevel:" + n;
|
|
820
|
+
for (var i = o.length / 3, s = [], u = 0; u < i; u += 1) for (var h = o[3 * u + 0], c = o[3 * u + 1], l = o[3 * u + 2], d = 0; d < h; d += 1) s.push(e(c, l));
|
|
821
|
+
return s;
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
return r;
|
|
825
|
+
}(),
|
|
826
|
+
l = function l() {
|
|
827
|
+
var t = [],
|
|
828
|
+
e = 0,
|
|
829
|
+
r = {
|
|
830
|
+
getBuffer: function getBuffer() {
|
|
831
|
+
return t;
|
|
832
|
+
},
|
|
833
|
+
getAt: function getAt(e) {
|
|
834
|
+
var r = Math.floor(e / 8);
|
|
835
|
+
return 1 == (t[r] >>> 7 - e % 8 & 1);
|
|
836
|
+
},
|
|
837
|
+
put: function put(t, e) {
|
|
838
|
+
for (var n = 0; n < e; n += 1) r.putBit(1 == (t >>> e - n - 1 & 1));
|
|
839
|
+
},
|
|
840
|
+
getLengthInBits: function getLengthInBits() {
|
|
841
|
+
return e;
|
|
842
|
+
},
|
|
843
|
+
putBit: function putBit(r) {
|
|
844
|
+
var n = Math.floor(e / 8);
|
|
845
|
+
t.length <= n && t.push(0), r && (t[n] |= 128 >>> e % 8), e += 1;
|
|
846
|
+
}
|
|
847
|
+
};
|
|
848
|
+
return r;
|
|
716
849
|
},
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
850
|
+
d = function d(t) {
|
|
851
|
+
var e = t,
|
|
852
|
+
r = {
|
|
853
|
+
getMode: function getMode() {
|
|
854
|
+
return 1;
|
|
855
|
+
},
|
|
856
|
+
getLength: function getLength(t) {
|
|
857
|
+
return e.length;
|
|
858
|
+
},
|
|
859
|
+
write: function write(t) {
|
|
860
|
+
for (var r = e, o = 0; o + 2 < r.length;) t.put(n(r.substring(o, o + 3)), 10), o += 3;
|
|
861
|
+
o < r.length && (r.length - o == 1 ? t.put(n(r.substring(o, o + 1)), 4) : r.length - o == 2 && t.put(n(r.substring(o, o + 2)), 7));
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
n = function n(t) {
|
|
865
|
+
for (var e = 0, r = 0; r < t.length; r += 1) e = 10 * e + o(t.charAt(r));
|
|
866
|
+
return e;
|
|
867
|
+
},
|
|
868
|
+
o = function o(t) {
|
|
869
|
+
if ("0" <= t && t <= "9") return t.charCodeAt(0) - "0".charCodeAt(0);
|
|
870
|
+
throw "illegal char :" + t;
|
|
871
|
+
};
|
|
872
|
+
return r;
|
|
722
873
|
},
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
874
|
+
f = function f(t) {
|
|
875
|
+
var e = t,
|
|
876
|
+
r = {
|
|
877
|
+
getMode: function getMode() {
|
|
878
|
+
return 2;
|
|
879
|
+
},
|
|
880
|
+
getLength: function getLength(t) {
|
|
881
|
+
return e.length;
|
|
882
|
+
},
|
|
883
|
+
write: function write(t) {
|
|
884
|
+
for (var r = e, o = 0; o + 1 < r.length;) t.put(45 * n(r.charAt(o)) + n(r.charAt(o + 1)), 11), o += 2;
|
|
885
|
+
o < r.length && t.put(n(r.charAt(o)), 6);
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
n = function n(t) {
|
|
889
|
+
if ("0" <= t && t <= "9") return t.charCodeAt(0) - "0".charCodeAt(0);
|
|
890
|
+
if ("A" <= t && t <= "Z") return t.charCodeAt(0) - "A".charCodeAt(0) + 10;
|
|
891
|
+
switch (t) {
|
|
892
|
+
case " ":
|
|
893
|
+
return 36;
|
|
894
|
+
case "$":
|
|
895
|
+
return 37;
|
|
896
|
+
case "%":
|
|
897
|
+
return 38;
|
|
898
|
+
case "*":
|
|
899
|
+
return 39;
|
|
900
|
+
case "+":
|
|
901
|
+
return 40;
|
|
902
|
+
case "-":
|
|
903
|
+
return 41;
|
|
904
|
+
case ".":
|
|
905
|
+
return 42;
|
|
906
|
+
case "/":
|
|
907
|
+
return 43;
|
|
908
|
+
case ":":
|
|
909
|
+
return 44;
|
|
910
|
+
default:
|
|
911
|
+
throw "illegal char :" + t;
|
|
912
|
+
}
|
|
913
|
+
};
|
|
914
|
+
return r;
|
|
915
|
+
},
|
|
916
|
+
g = function g(e) {
|
|
917
|
+
var r = t.stringToBytes(e);
|
|
918
|
+
return {
|
|
919
|
+
getMode: function getMode() {
|
|
920
|
+
return 4;
|
|
921
|
+
},
|
|
922
|
+
getLength: function getLength(t) {
|
|
923
|
+
return r.length;
|
|
924
|
+
},
|
|
925
|
+
write: function write(t) {
|
|
926
|
+
for (var e = 0; e < r.length; e += 1) t.put(r[e], 8);
|
|
927
|
+
}
|
|
928
|
+
};
|
|
929
|
+
},
|
|
930
|
+
p = function p(e) {
|
|
931
|
+
var r = t.stringToBytesFuncs.SJIS;
|
|
932
|
+
if (!r) throw "sjis not supported.";
|
|
933
|
+
!function (t, e) {
|
|
934
|
+
var n = r("友");
|
|
935
|
+
if (2 != n.length || 38726 != (n[0] << 8 | n[1])) throw "sjis not supported.";
|
|
936
|
+
}();
|
|
937
|
+
var n = r(e);
|
|
938
|
+
return {
|
|
939
|
+
getMode: function getMode() {
|
|
940
|
+
return 8;
|
|
941
|
+
},
|
|
942
|
+
getLength: function getLength(t) {
|
|
943
|
+
return ~~(n.length / 2);
|
|
944
|
+
},
|
|
945
|
+
write: function write(t) {
|
|
946
|
+
for (var e = n, r = 0; r + 1 < e.length;) {
|
|
947
|
+
var o = (255 & e[r]) << 8 | 255 & e[r + 1];
|
|
948
|
+
if (33088 <= o && o <= 40956) o -= 33088;else {
|
|
949
|
+
if (!(57408 <= o && o <= 60351)) throw "illegal char at " + (r + 1) + "/" + o;
|
|
950
|
+
o -= 49472;
|
|
951
|
+
}
|
|
952
|
+
o = 192 * (o >>> 8 & 255) + (255 & o), t.put(o, 13), r += 2;
|
|
953
|
+
}
|
|
954
|
+
if (r < e.length) throw "illegal char at " + (r + 1);
|
|
955
|
+
}
|
|
956
|
+
};
|
|
957
|
+
},
|
|
958
|
+
v = function v() {
|
|
959
|
+
var t = [],
|
|
960
|
+
e = {
|
|
961
|
+
writeByte: function writeByte(e) {
|
|
962
|
+
t.push(255 & e);
|
|
963
|
+
},
|
|
964
|
+
writeShort: function writeShort(t) {
|
|
965
|
+
e.writeByte(t), e.writeByte(t >>> 8);
|
|
966
|
+
},
|
|
967
|
+
writeBytes: function writeBytes(t, r, n) {
|
|
968
|
+
r = r || 0, n = n || t.length;
|
|
969
|
+
for (var o = 0; o < n; o += 1) e.writeByte(t[o + r]);
|
|
970
|
+
},
|
|
971
|
+
writeString: function writeString(t) {
|
|
972
|
+
for (var r = 0; r < t.length; r += 1) e.writeByte(t.charCodeAt(r));
|
|
973
|
+
},
|
|
974
|
+
toByteArray: function toByteArray() {
|
|
975
|
+
return t;
|
|
976
|
+
},
|
|
977
|
+
toString: function toString() {
|
|
978
|
+
var e = "";
|
|
979
|
+
e += "[";
|
|
980
|
+
for (var r = 0; r < t.length; r += 1) r > 0 && (e += ","), e += t[r];
|
|
981
|
+
return e + "]";
|
|
982
|
+
}
|
|
983
|
+
};
|
|
984
|
+
return e;
|
|
985
|
+
},
|
|
986
|
+
w = function w(t) {
|
|
987
|
+
var e = t,
|
|
988
|
+
r = 0,
|
|
989
|
+
n = 0,
|
|
990
|
+
o = 0,
|
|
991
|
+
i = {
|
|
992
|
+
read: function read() {
|
|
993
|
+
for (; o < 8;) {
|
|
994
|
+
if (r >= e.length) {
|
|
995
|
+
if (0 == o) return -1;
|
|
996
|
+
throw "unexpected end of file./" + o;
|
|
997
|
+
}
|
|
998
|
+
var t = e.charAt(r);
|
|
999
|
+
if (r += 1, "=" == t) return o = 0, -1;
|
|
1000
|
+
t.match(/^\s$/) || (n = n << 6 | a(t.charCodeAt(0)), o += 6);
|
|
1001
|
+
}
|
|
1002
|
+
var i = n >>> o - 8 & 255;
|
|
1003
|
+
return o -= 8, i;
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
a = function a(t) {
|
|
1007
|
+
if (65 <= t && t <= 90) return t - 65;
|
|
1008
|
+
if (97 <= t && t <= 122) return t - 97 + 26;
|
|
1009
|
+
if (48 <= t && t <= 57) return t - 48 + 52;
|
|
1010
|
+
if (43 == t) return 62;
|
|
1011
|
+
if (47 == t) return 63;
|
|
1012
|
+
throw "c:" + t;
|
|
1013
|
+
};
|
|
1014
|
+
return i;
|
|
1015
|
+
},
|
|
1016
|
+
y = function y(t, e, r) {
|
|
1017
|
+
for (var n = function (t, e) {
|
|
1018
|
+
var r = t,
|
|
1019
|
+
n = e,
|
|
1020
|
+
o = new Array(t * e),
|
|
1021
|
+
i = {
|
|
1022
|
+
setPixel: function setPixel(t, e, n) {
|
|
1023
|
+
o[e * r + t] = n;
|
|
1024
|
+
},
|
|
1025
|
+
write: function write(t) {
|
|
1026
|
+
t.writeString("GIF87a"), t.writeShort(r), t.writeShort(n), t.writeByte(128), t.writeByte(0), t.writeByte(0), t.writeByte(0), t.writeByte(0), t.writeByte(0), t.writeByte(255), t.writeByte(255), t.writeByte(255), t.writeString(","), t.writeShort(0), t.writeShort(0), t.writeShort(r), t.writeShort(n), t.writeByte(0);
|
|
1027
|
+
var e = a(2);
|
|
1028
|
+
t.writeByte(2);
|
|
1029
|
+
for (var o = 0; e.length - o > 255;) t.writeByte(255), t.writeBytes(e, o, 255), o += 255;
|
|
1030
|
+
t.writeByte(e.length - o), t.writeBytes(e, o, e.length - o), t.writeByte(0), t.writeString(";");
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
a = function a(t) {
|
|
1034
|
+
for (var e = 1 << t, r = 1 + (1 << t), n = t + 1, i = s(), a = 0; a < e; a += 1) i.add(String.fromCharCode(a));
|
|
1035
|
+
i.add(String.fromCharCode(e)), i.add(String.fromCharCode(r));
|
|
1036
|
+
var u,
|
|
1037
|
+
h,
|
|
1038
|
+
c,
|
|
1039
|
+
l = v(),
|
|
1040
|
+
d = (u = l, h = 0, c = 0, {
|
|
1041
|
+
write: function write(t, e) {
|
|
1042
|
+
if (t >>> e != 0) throw "length over";
|
|
1043
|
+
for (; h + e >= 8;) u.writeByte(255 & (t << h | c)), e -= 8 - h, t >>>= 8 - h, c = 0, h = 0;
|
|
1044
|
+
c |= t << h, h += e;
|
|
1045
|
+
},
|
|
1046
|
+
flush: function flush() {
|
|
1047
|
+
h > 0 && u.writeByte(c);
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1050
|
+
d.write(e, n);
|
|
1051
|
+
var f = 0,
|
|
1052
|
+
g = String.fromCharCode(o[f]);
|
|
1053
|
+
for (f += 1; f < o.length;) {
|
|
1054
|
+
var p = String.fromCharCode(o[f]);
|
|
1055
|
+
f += 1, i.contains(g + p) ? g += p : (d.write(i.indexOf(g), n), i.size() < 4095 && (i.size() == 1 << n && (n += 1), i.add(g + p)), g = p);
|
|
1056
|
+
}
|
|
1057
|
+
return d.write(i.indexOf(g), n), d.write(r, n), d.flush(), l.toByteArray();
|
|
1058
|
+
},
|
|
1059
|
+
s = function s() {
|
|
1060
|
+
var t = {},
|
|
1061
|
+
e = 0,
|
|
1062
|
+
r = {
|
|
1063
|
+
add: function add(n) {
|
|
1064
|
+
if (r.contains(n)) throw "dup key:" + n;
|
|
1065
|
+
t[n] = e, e += 1;
|
|
1066
|
+
},
|
|
1067
|
+
size: function size() {
|
|
1068
|
+
return e;
|
|
1069
|
+
},
|
|
1070
|
+
indexOf: function indexOf(e) {
|
|
1071
|
+
return t[e];
|
|
1072
|
+
},
|
|
1073
|
+
contains: function contains(e) {
|
|
1074
|
+
return void 0 !== t[e];
|
|
1075
|
+
}
|
|
1076
|
+
};
|
|
1077
|
+
return r;
|
|
1078
|
+
};
|
|
1079
|
+
return i;
|
|
1080
|
+
}(t, e), o = 0; o < e; o += 1) for (var i = 0; i < t; i += 1) n.setPixel(i, o, r(i, o));
|
|
1081
|
+
var a = v();
|
|
1082
|
+
n.write(a);
|
|
1083
|
+
for (var s = function () {
|
|
1084
|
+
var t = 0,
|
|
1085
|
+
e = 0,
|
|
1086
|
+
r = 0,
|
|
1087
|
+
n = "",
|
|
1088
|
+
o = {},
|
|
1089
|
+
i = function i(t) {
|
|
1090
|
+
n += String.fromCharCode(a(63 & t));
|
|
1091
|
+
},
|
|
1092
|
+
a = function a(t) {
|
|
1093
|
+
if (t < 0) ;else {
|
|
1094
|
+
if (t < 26) return 65 + t;
|
|
1095
|
+
if (t < 52) return t - 26 + 97;
|
|
1096
|
+
if (t < 62) return t - 52 + 48;
|
|
1097
|
+
if (62 == t) return 43;
|
|
1098
|
+
if (63 == t) return 47;
|
|
1099
|
+
}
|
|
1100
|
+
throw "n:" + t;
|
|
1101
|
+
};
|
|
1102
|
+
return o.writeByte = function (n) {
|
|
1103
|
+
for (t = t << 8 | 255 & n, e += 8, r += 1; e >= 6;) i(t >>> e - 6), e -= 6;
|
|
1104
|
+
}, o.flush = function () {
|
|
1105
|
+
if (e > 0 && (i(t << 6 - e), t = 0, e = 0), r % 3 != 0) for (var o = 3 - r % 3, a = 0; a < o; a += 1) n += "=";
|
|
1106
|
+
}, o.toString = function () {
|
|
1107
|
+
return n;
|
|
1108
|
+
}, o;
|
|
1109
|
+
}(), u = a.toByteArray(), h = 0; h < u.length; h += 1) s.writeByte(u[h]);
|
|
1110
|
+
return s.flush(), "data:image/gif;base64," + s;
|
|
1111
|
+
};
|
|
1112
|
+
return t;
|
|
1113
|
+
}();
|
|
1114
|
+
o.stringToBytesFuncs["UTF-8"] = function (t) {
|
|
798
1115
|
return function (t) {
|
|
799
|
-
for (var e = [],
|
|
800
|
-
var
|
|
801
|
-
|
|
802
|
-
var a = r[t.charAt(o)];
|
|
803
|
-
"number" == typeof a ? (255 & a) == a ? e.push(a) : (e.push(a >>> 8), e.push(255 & a)) : e.push(n);
|
|
804
|
-
}
|
|
1116
|
+
for (var e = [], r = 0; r < t.length; r++) {
|
|
1117
|
+
var n = t.charCodeAt(r);
|
|
1118
|
+
n < 128 ? e.push(n) : n < 2048 ? e.push(192 | n >> 6, 128 | 63 & n) : n < 55296 || n >= 57344 ? e.push(224 | n >> 12, 128 | n >> 6 & 63, 128 | 63 & n) : (r++, n = 65536 + ((1023 & n) << 10 | 1023 & t.charCodeAt(r)), e.push(240 | n >> 18, 128 | n >> 12 & 63, 128 | n >> 6 & 63, 128 | 63 & n));
|
|
805
1119
|
}
|
|
806
|
-
|
|
807
1120
|
return e;
|
|
808
|
-
};
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
i,
|
|
816
|
-
a = {
|
|
817
|
-
L: 1,
|
|
818
|
-
M: 0,
|
|
819
|
-
Q: 3,
|
|
820
|
-
H: 2
|
|
821
|
-
},
|
|
822
|
-
s = (e = [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], r = 1335, n = 7973, i = function i(t) {
|
|
823
|
-
for (var e = 0; 0 != t;) {
|
|
824
|
-
e += 1, t >>>= 1;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
return e;
|
|
828
|
-
}, (o = {}).getBCHTypeInfo = function (t) {
|
|
829
|
-
for (var e = t << 10; i(e) - i(r) >= 0;) {
|
|
830
|
-
e ^= r << i(e) - i(r);
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
return 21522 ^ (t << 10 | e);
|
|
834
|
-
}, o.getBCHTypeNumber = function (t) {
|
|
835
|
-
for (var e = t << 12; i(e) - i(n) >= 0;) {
|
|
836
|
-
e ^= n << i(e) - i(n);
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
return t << 12 | e;
|
|
840
|
-
}, o.getPatternPosition = function (t) {
|
|
841
|
-
return e[t - 1];
|
|
842
|
-
}, o.getMaskFunction = function (t) {
|
|
843
|
-
switch (t) {
|
|
844
|
-
case 0:
|
|
845
|
-
return function (t, e) {
|
|
846
|
-
return (t + e) % 2 == 0;
|
|
847
|
-
};
|
|
848
|
-
|
|
849
|
-
case 1:
|
|
850
|
-
return function (t, e) {
|
|
851
|
-
return t % 2 == 0;
|
|
852
|
-
};
|
|
853
|
-
|
|
854
|
-
case 2:
|
|
855
|
-
return function (t, e) {
|
|
856
|
-
return e % 3 == 0;
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
case 3:
|
|
860
|
-
return function (t, e) {
|
|
861
|
-
return (t + e) % 3 == 0;
|
|
862
|
-
};
|
|
863
|
-
|
|
864
|
-
case 4:
|
|
865
|
-
return function (t, e) {
|
|
866
|
-
return (Math.floor(t / 2) + Math.floor(e / 3)) % 2 == 0;
|
|
867
|
-
};
|
|
868
|
-
|
|
869
|
-
case 5:
|
|
870
|
-
return function (t, e) {
|
|
871
|
-
return t * e % 2 + t * e % 3 == 0;
|
|
872
|
-
};
|
|
873
|
-
|
|
874
|
-
case 6:
|
|
875
|
-
return function (t, e) {
|
|
876
|
-
return (t * e % 2 + t * e % 3) % 2 == 0;
|
|
877
|
-
};
|
|
878
|
-
|
|
879
|
-
case 7:
|
|
880
|
-
return function (t, e) {
|
|
881
|
-
return (t * e % 3 + (t + e) % 2) % 2 == 0;
|
|
882
|
-
};
|
|
883
|
-
|
|
884
|
-
default:
|
|
885
|
-
throw "bad maskPattern:" + t;
|
|
886
|
-
}
|
|
887
|
-
}, o.getErrorCorrectPolynomial = function (t) {
|
|
888
|
-
for (var e = h([1], 0), r = 0; r < t; r += 1) {
|
|
889
|
-
e = e.multiply(h([1, u.gexp(r)], 0));
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
return e;
|
|
893
|
-
}, o.getLengthInBits = function (t, e) {
|
|
894
|
-
if (1 <= e && e < 10) switch (t) {
|
|
895
|
-
case 1:
|
|
896
|
-
return 10;
|
|
897
|
-
|
|
898
|
-
case 2:
|
|
899
|
-
return 9;
|
|
900
|
-
|
|
901
|
-
case 4:
|
|
902
|
-
case 8:
|
|
903
|
-
return 8;
|
|
904
|
-
|
|
905
|
-
default:
|
|
906
|
-
throw "mode:" + t;
|
|
907
|
-
} else if (e < 27) switch (t) {
|
|
908
|
-
case 1:
|
|
909
|
-
return 12;
|
|
910
|
-
|
|
911
|
-
case 2:
|
|
912
|
-
return 11;
|
|
913
|
-
|
|
914
|
-
case 4:
|
|
915
|
-
return 16;
|
|
916
|
-
|
|
917
|
-
case 8:
|
|
918
|
-
return 10;
|
|
919
|
-
|
|
920
|
-
default:
|
|
921
|
-
throw "mode:" + t;
|
|
922
|
-
} else {
|
|
923
|
-
if (!(e < 41)) throw "type:" + e;
|
|
924
|
-
|
|
925
|
-
switch (t) {
|
|
926
|
-
case 1:
|
|
927
|
-
return 14;
|
|
928
|
-
|
|
929
|
-
case 2:
|
|
930
|
-
return 13;
|
|
931
|
-
|
|
932
|
-
case 4:
|
|
933
|
-
return 16;
|
|
934
|
-
|
|
935
|
-
case 8:
|
|
936
|
-
return 12;
|
|
937
|
-
|
|
938
|
-
default:
|
|
939
|
-
throw "mode:" + t;
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
}, o.getLostPoint = function (t) {
|
|
943
|
-
for (var e = t.getModuleCount(), r = 0, n = 0; n < e; n += 1) {
|
|
944
|
-
for (var o = 0; o < e; o += 1) {
|
|
945
|
-
for (var i = 0, a = t.isDark(n, o), s = -1; s <= 1; s += 1) {
|
|
946
|
-
if (!(n + s < 0 || e <= n + s)) for (var u = -1; u <= 1; u += 1) {
|
|
947
|
-
o + u < 0 || e <= o + u || 0 == s && 0 == u || a == t.isDark(n + s, o + u) && (i += 1);
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
i > 5 && (r += 3 + i - 5);
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
for (n = 0; n < e - 1; n += 1) {
|
|
956
|
-
for (o = 0; o < e - 1; o += 1) {
|
|
957
|
-
var h = 0;
|
|
958
|
-
t.isDark(n, o) && (h += 1), t.isDark(n + 1, o) && (h += 1), t.isDark(n, o + 1) && (h += 1), t.isDark(n + 1, o + 1) && (h += 1), 0 != h && 4 != h || (r += 3);
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
for (n = 0; n < e; n += 1) {
|
|
963
|
-
for (o = 0; o < e - 6; o += 1) {
|
|
964
|
-
t.isDark(n, o) && !t.isDark(n, o + 1) && t.isDark(n, o + 2) && t.isDark(n, o + 3) && t.isDark(n, o + 4) && !t.isDark(n, o + 5) && t.isDark(n, o + 6) && (r += 40);
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
for (o = 0; o < e; o += 1) {
|
|
969
|
-
for (n = 0; n < e - 6; n += 1) {
|
|
970
|
-
t.isDark(n, o) && !t.isDark(n + 1, o) && t.isDark(n + 2, o) && t.isDark(n + 3, o) && t.isDark(n + 4, o) && !t.isDark(n + 5, o) && t.isDark(n + 6, o) && (r += 40);
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
var c = 0;
|
|
975
|
-
|
|
976
|
-
for (o = 0; o < e; o += 1) {
|
|
977
|
-
for (n = 0; n < e; n += 1) {
|
|
978
|
-
t.isDark(n, o) && (c += 1);
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
return r + Math.abs(100 * c / e / e - 50) / 5 * 10;
|
|
983
|
-
}, o),
|
|
984
|
-
u = function () {
|
|
985
|
-
for (var t = new Array(256), e = new Array(256), r = 0; r < 8; r += 1) {
|
|
986
|
-
t[r] = 1 << r;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
for (r = 8; r < 256; r += 1) {
|
|
990
|
-
t[r] = t[r - 4] ^ t[r - 5] ^ t[r - 6] ^ t[r - 8];
|
|
991
|
-
}
|
|
1121
|
+
}(t);
|
|
1122
|
+
}, void 0 === (n = "function" == typeof (r = function r() {
|
|
1123
|
+
return o;
|
|
1124
|
+
}) ? r.apply(e, []) : r) || (t.exports = n);
|
|
1125
|
+
},
|
|
1126
|
+
676: function _(t, e, r) {
|
|
1127
|
+
"use strict";
|
|
992
1128
|
|
|
993
|
-
|
|
994
|
-
|
|
1129
|
+
r.d(e, {
|
|
1130
|
+
"default": function _default() {
|
|
1131
|
+
return q;
|
|
995
1132
|
}
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
return e[t];
|
|
1001
|
-
},
|
|
1002
|
-
gexp: function gexp(e) {
|
|
1003
|
-
for (; e < 0;) {
|
|
1004
|
-
e += 255;
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
for (; e >= 256;) {
|
|
1008
|
-
e -= 255;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
return t[e];
|
|
1012
|
-
}
|
|
1013
|
-
};
|
|
1014
|
-
}();
|
|
1015
|
-
|
|
1016
|
-
function h(t, e) {
|
|
1017
|
-
if (void 0 === t.length) throw t.length + "/" + e;
|
|
1018
|
-
|
|
1019
|
-
var r = function () {
|
|
1020
|
-
for (var r = 0; r < t.length && 0 == t[r];) {
|
|
1021
|
-
r += 1;
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
for (var n = new Array(t.length - r + e), o = 0; o < t.length - r; o += 1) {
|
|
1025
|
-
n[o] = t[o + r];
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
return n;
|
|
1029
|
-
}(),
|
|
1030
|
-
n = {
|
|
1031
|
-
getAt: function getAt(t) {
|
|
1032
|
-
return r[t];
|
|
1033
|
-
},
|
|
1034
|
-
getLength: function getLength() {
|
|
1035
|
-
return r.length;
|
|
1036
|
-
},
|
|
1037
|
-
multiply: function multiply(t) {
|
|
1038
|
-
for (var e = new Array(n.getLength() + t.getLength() - 1), r = 0; r < n.getLength(); r += 1) {
|
|
1039
|
-
for (var o = 0; o < t.getLength(); o += 1) {
|
|
1040
|
-
e[r + o] ^= u.gexp(u.glog(n.getAt(r)) + u.glog(t.getAt(o)));
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
return h(e, 0);
|
|
1045
|
-
},
|
|
1046
|
-
mod: function mod(t) {
|
|
1047
|
-
if (n.getLength() - t.getLength() < 0) return n;
|
|
1048
|
-
|
|
1049
|
-
for (var e = u.glog(n.getAt(0)) - u.glog(t.getAt(0)), r = new Array(n.getLength()), o = 0; o < n.getLength(); o += 1) {
|
|
1050
|
-
r[o] = n.getAt(o);
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
for (o = 0; o < t.getLength(); o += 1) {
|
|
1054
|
-
r[o] ^= u.gexp(u.glog(t.getAt(o)) + e);
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
return h(r, 0).mod(t);
|
|
1058
|
-
}
|
|
1059
|
-
};
|
|
1060
|
-
|
|
1061
|
-
return n;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
var c = function () {
|
|
1065
|
-
var t = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12, 7, 37, 13], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]],
|
|
1066
|
-
e = function e(t, _e) {
|
|
1067
|
-
var r = {};
|
|
1068
|
-
return r.totalCount = t, r.dataCount = _e, r;
|
|
1069
|
-
},
|
|
1070
|
-
r = {
|
|
1071
|
-
getRSBlocks: function getRSBlocks(r, n) {
|
|
1072
|
-
var o = function (e, r) {
|
|
1073
|
-
switch (r) {
|
|
1074
|
-
case a.L:
|
|
1075
|
-
return t[4 * (e - 1) + 0];
|
|
1076
|
-
|
|
1077
|
-
case a.M:
|
|
1078
|
-
return t[4 * (e - 1) + 1];
|
|
1079
|
-
|
|
1080
|
-
case a.Q:
|
|
1081
|
-
return t[4 * (e - 1) + 2];
|
|
1082
|
-
|
|
1083
|
-
case a.H:
|
|
1084
|
-
return t[4 * (e - 1) + 3];
|
|
1085
|
-
|
|
1086
|
-
default:
|
|
1087
|
-
return;
|
|
1088
|
-
}
|
|
1089
|
-
}(r, n);
|
|
1090
|
-
|
|
1091
|
-
if (void 0 === o) throw "bad rs block @ typeNumber:" + r + "/errorCorrectionLevel:" + n;
|
|
1092
|
-
|
|
1093
|
-
for (var i = o.length / 3, s = [], u = 0; u < i; u += 1) {
|
|
1094
|
-
for (var h = o[3 * u + 0], c = o[3 * u + 1], l = o[3 * u + 2], d = 0; d < h; d += 1) {
|
|
1095
|
-
s.push(e(c, l));
|
|
1096
|
-
}
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
return s;
|
|
1100
|
-
}
|
|
1101
|
-
};
|
|
1102
|
-
|
|
1103
|
-
return r;
|
|
1104
|
-
}(),
|
|
1105
|
-
l = function l() {
|
|
1106
|
-
var t = [],
|
|
1107
|
-
e = 0,
|
|
1108
|
-
r = {
|
|
1109
|
-
getBuffer: function getBuffer() {
|
|
1133
|
+
});
|
|
1134
|
+
var _n = function n() {
|
|
1135
|
+
return (_n = Object.assign || function (t) {
|
|
1136
|
+
for (var e, r = 1, n = arguments.length; r < n; r++) for (var o in e = arguments[r]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
1110
1137
|
return t;
|
|
1111
|
-
},
|
|
1112
|
-
getAt: function getAt(e) {
|
|
1113
|
-
var r = Math.floor(e / 8);
|
|
1114
|
-
return 1 == (t[r] >>> 7 - e % 8 & 1);
|
|
1115
|
-
},
|
|
1116
|
-
put: function put(t, e) {
|
|
1117
|
-
for (var n = 0; n < e; n += 1) {
|
|
1118
|
-
r.putBit(1 == (t >>> e - n - 1 & 1));
|
|
1119
|
-
}
|
|
1120
|
-
},
|
|
1121
|
-
getLengthInBits: function getLengthInBits() {
|
|
1122
|
-
return e;
|
|
1123
|
-
},
|
|
1124
|
-
putBit: function putBit(r) {
|
|
1125
|
-
var n = Math.floor(e / 8);
|
|
1126
|
-
t.length <= n && t.push(0), r && (t[n] |= 128 >>> e % 8), e += 1;
|
|
1127
|
-
}
|
|
1128
|
-
};
|
|
1129
|
-
return r;
|
|
1130
|
-
},
|
|
1131
|
-
d = function d(t) {
|
|
1132
|
-
var e = t,
|
|
1133
|
-
r = {
|
|
1134
|
-
getMode: function getMode() {
|
|
1135
|
-
return 1;
|
|
1136
|
-
},
|
|
1137
|
-
getLength: function getLength(t) {
|
|
1138
|
-
return e.length;
|
|
1139
|
-
},
|
|
1140
|
-
write: function write(t) {
|
|
1141
|
-
for (var r = e, o = 0; o + 2 < r.length;) {
|
|
1142
|
-
t.put(n(r.substring(o, o + 3)), 10), o += 3;
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
o < r.length && (r.length - o == 1 ? t.put(n(r.substring(o, o + 1)), 4) : r.length - o == 2 && t.put(n(r.substring(o, o + 2)), 7));
|
|
1146
|
-
}
|
|
1138
|
+
}).apply(this, arguments);
|
|
1147
1139
|
},
|
|
1148
|
-
|
|
1149
|
-
for (var
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
return
|
|
1154
|
-
},
|
|
1155
|
-
o = function o(t) {
|
|
1156
|
-
if ("0" <= t && t <= "9") return t.charCodeAt(0) - "0".charCodeAt(0);
|
|
1157
|
-
throw "illegal char :" + t;
|
|
1158
|
-
};
|
|
1159
|
-
|
|
1160
|
-
return r;
|
|
1161
|
-
},
|
|
1162
|
-
f = function f(t) {
|
|
1163
|
-
var e = t,
|
|
1164
|
-
r = {
|
|
1165
|
-
getMode: function getMode() {
|
|
1166
|
-
return 2;
|
|
1167
|
-
},
|
|
1168
|
-
getLength: function getLength(t) {
|
|
1169
|
-
return e.length;
|
|
1170
|
-
},
|
|
1171
|
-
write: function write(t) {
|
|
1172
|
-
for (var r = e, o = 0; o + 1 < r.length;) {
|
|
1173
|
-
t.put(45 * n(r.charAt(o)) + n(r.charAt(o + 1)), 11), o += 2;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
o < r.length && t.put(n(r.charAt(o)), 6);
|
|
1177
|
-
}
|
|
1178
|
-
},
|
|
1179
|
-
n = function n(t) {
|
|
1180
|
-
if ("0" <= t && t <= "9") return t.charCodeAt(0) - "0".charCodeAt(0);
|
|
1181
|
-
if ("A" <= t && t <= "Z") return t.charCodeAt(0) - "A".charCodeAt(0) + 10;
|
|
1182
|
-
|
|
1183
|
-
switch (t) {
|
|
1184
|
-
case " ":
|
|
1185
|
-
return 36;
|
|
1186
|
-
|
|
1187
|
-
case "$":
|
|
1188
|
-
return 37;
|
|
1189
|
-
|
|
1190
|
-
case "%":
|
|
1191
|
-
return 38;
|
|
1192
|
-
|
|
1193
|
-
case "*":
|
|
1194
|
-
return 39;
|
|
1195
|
-
|
|
1196
|
-
case "+":
|
|
1197
|
-
return 40;
|
|
1198
|
-
|
|
1199
|
-
case "-":
|
|
1200
|
-
return 41;
|
|
1201
|
-
|
|
1202
|
-
case ".":
|
|
1203
|
-
return 42;
|
|
1204
|
-
|
|
1205
|
-
case "/":
|
|
1206
|
-
return 43;
|
|
1207
|
-
|
|
1208
|
-
case ":":
|
|
1209
|
-
return 44;
|
|
1210
|
-
|
|
1211
|
-
default:
|
|
1212
|
-
throw "illegal char :" + t;
|
|
1213
|
-
}
|
|
1214
|
-
};
|
|
1215
|
-
|
|
1216
|
-
return r;
|
|
1217
|
-
},
|
|
1218
|
-
g = function g(e) {
|
|
1219
|
-
var r = t.stringToBytes(e);
|
|
1220
|
-
return {
|
|
1221
|
-
getMode: function getMode() {
|
|
1222
|
-
return 4;
|
|
1223
|
-
},
|
|
1224
|
-
getLength: function getLength(t) {
|
|
1225
|
-
return r.length;
|
|
1226
|
-
},
|
|
1227
|
-
write: function write(t) {
|
|
1228
|
-
for (var e = 0; e < r.length; e += 1) {
|
|
1229
|
-
t.put(r[e], 8);
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
};
|
|
1233
|
-
},
|
|
1234
|
-
p = function p(e) {
|
|
1235
|
-
var r = t.stringToBytesFuncs.SJIS;
|
|
1236
|
-
if (!r) throw "sjis not supported.";
|
|
1237
|
-
!function (t, e) {
|
|
1238
|
-
var n = r("友");
|
|
1239
|
-
if (2 != n.length || 38726 != (n[0] << 8 | n[1])) throw "sjis not supported.";
|
|
1240
|
-
}();
|
|
1241
|
-
var n = r(e);
|
|
1242
|
-
return {
|
|
1243
|
-
getMode: function getMode() {
|
|
1244
|
-
return 8;
|
|
1245
|
-
},
|
|
1246
|
-
getLength: function getLength(t) {
|
|
1247
|
-
return ~~(n.length / 2);
|
|
1248
|
-
},
|
|
1249
|
-
write: function write(t) {
|
|
1250
|
-
for (var e = n, r = 0; r + 1 < e.length;) {
|
|
1251
|
-
var o = (255 & e[r]) << 8 | 255 & e[r + 1];
|
|
1252
|
-
if (33088 <= o && o <= 40956) o -= 33088;else {
|
|
1253
|
-
if (!(57408 <= o && o <= 60351)) throw "illegal char at " + (r + 1) + "/" + o;
|
|
1254
|
-
o -= 49472;
|
|
1255
|
-
}
|
|
1256
|
-
o = 192 * (o >>> 8 & 255) + (255 & o), t.put(o, 13), r += 2;
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
if (r < e.length) throw "illegal char at " + (r + 1);
|
|
1260
|
-
}
|
|
1261
|
-
};
|
|
1262
|
-
},
|
|
1263
|
-
v = function v() {
|
|
1264
|
-
var t = [],
|
|
1265
|
-
e = {
|
|
1266
|
-
writeByte: function writeByte(e) {
|
|
1267
|
-
t.push(255 & e);
|
|
1268
|
-
},
|
|
1269
|
-
writeShort: function writeShort(t) {
|
|
1270
|
-
e.writeByte(t), e.writeByte(t >>> 8);
|
|
1271
|
-
},
|
|
1272
|
-
writeBytes: function writeBytes(t, r, n) {
|
|
1273
|
-
r = r || 0, n = n || t.length;
|
|
1274
|
-
|
|
1275
|
-
for (var o = 0; o < n; o += 1) {
|
|
1276
|
-
e.writeByte(t[o + r]);
|
|
1277
|
-
}
|
|
1278
|
-
},
|
|
1279
|
-
writeString: function writeString(t) {
|
|
1280
|
-
for (var r = 0; r < t.length; r += 1) {
|
|
1281
|
-
e.writeByte(t.charCodeAt(r));
|
|
1282
|
-
}
|
|
1283
|
-
},
|
|
1284
|
-
toByteArray: function toByteArray() {
|
|
1285
|
-
return t;
|
|
1286
|
-
},
|
|
1287
|
-
toString: function toString() {
|
|
1288
|
-
var e = "";
|
|
1289
|
-
e += "[";
|
|
1290
|
-
|
|
1291
|
-
for (var r = 0; r < t.length; r += 1) {
|
|
1292
|
-
r > 0 && (e += ","), e += t[r];
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
return e + "]";
|
|
1296
|
-
}
|
|
1297
|
-
};
|
|
1298
|
-
return e;
|
|
1299
|
-
},
|
|
1300
|
-
w = function w(t) {
|
|
1301
|
-
var e = t,
|
|
1302
|
-
r = 0,
|
|
1303
|
-
n = 0,
|
|
1304
|
-
o = 0,
|
|
1305
|
-
i = {
|
|
1306
|
-
read: function read() {
|
|
1307
|
-
for (; o < 8;) {
|
|
1308
|
-
if (r >= e.length) {
|
|
1309
|
-
if (0 == o) return -1;
|
|
1310
|
-
throw "unexpected end of file./" + o;
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
var t = e.charAt(r);
|
|
1314
|
-
if (r += 1, "=" == t) return o = 0, -1;
|
|
1315
|
-
t.match(/^\s$/) || (n = n << 6 | a(t.charCodeAt(0)), o += 6);
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
var i = n >>> o - 8 & 255;
|
|
1319
|
-
return o -= 8, i;
|
|
1320
|
-
}
|
|
1140
|
+
o = function o() {
|
|
1141
|
+
for (var t = 0, e = 0, r = arguments.length; e < r; e++) t += arguments[e].length;
|
|
1142
|
+
var n = Array(t),
|
|
1143
|
+
o = 0;
|
|
1144
|
+
for (e = 0; e < r; e++) for (var i = arguments[e], a = 0, s = i.length; a < s; a++, o++) n[o] = i[a];
|
|
1145
|
+
return n;
|
|
1321
1146
|
},
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
if (97 <= t && t <= 122) return t - 97 + 26;
|
|
1325
|
-
if (48 <= t && t <= 57) return t - 48 + 52;
|
|
1326
|
-
if (43 == t) return 62;
|
|
1327
|
-
if (47 == t) return 63;
|
|
1328
|
-
throw "c:" + t;
|
|
1147
|
+
i = function i(t) {
|
|
1148
|
+
return !!t && "object" == _typeof(t) && !Array.isArray(t);
|
|
1329
1149
|
};
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
var r = t,
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
setPixel: function setPixel(t, e, n) {
|
|
1340
|
-
o[e * r + t] = n;
|
|
1341
|
-
},
|
|
1342
|
-
write: function write(t) {
|
|
1343
|
-
t.writeString("GIF87a"), t.writeShort(r), t.writeShort(n), t.writeByte(128), t.writeByte(0), t.writeByte(0), t.writeByte(0), t.writeByte(0), t.writeByte(0), t.writeByte(255), t.writeByte(255), t.writeByte(255), t.writeString(","), t.writeShort(0), t.writeShort(0), t.writeShort(r), t.writeShort(n), t.writeByte(0);
|
|
1344
|
-
var e = a(2);
|
|
1345
|
-
t.writeByte(2);
|
|
1346
|
-
|
|
1347
|
-
for (var o = 0; e.length - o > 255;) {
|
|
1348
|
-
t.writeByte(255), t.writeBytes(e, o, 255), o += 255;
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
t.writeByte(e.length - o), t.writeBytes(e, o, e.length - o), t.writeByte(0), t.writeString(";");
|
|
1352
|
-
}
|
|
1353
|
-
},
|
|
1354
|
-
a = function a(t) {
|
|
1355
|
-
for (var e = 1 << t, r = 1 + (1 << t), n = t + 1, i = s(), a = 0; a < e; a += 1) {
|
|
1356
|
-
i.add(String.fromCharCode(a));
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
i.add(String.fromCharCode(e)), i.add(String.fromCharCode(r));
|
|
1360
|
-
var u,
|
|
1361
|
-
h,
|
|
1362
|
-
c,
|
|
1363
|
-
l = v(),
|
|
1364
|
-
d = (u = l, h = 0, c = 0, {
|
|
1365
|
-
write: function write(t, e) {
|
|
1366
|
-
if (t >>> e != 0) throw "length over";
|
|
1367
|
-
|
|
1368
|
-
for (; h + e >= 8;) {
|
|
1369
|
-
u.writeByte(255 & (t << h | c)), e -= 8 - h, t >>>= 8 - h, c = 0, h = 0;
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
c |= t << h, h += e;
|
|
1373
|
-
},
|
|
1374
|
-
flush: function flush() {
|
|
1375
|
-
h > 0 && u.writeByte(c);
|
|
1376
|
-
}
|
|
1377
|
-
});
|
|
1378
|
-
d.write(e, n);
|
|
1379
|
-
var f = 0,
|
|
1380
|
-
g = String.fromCharCode(o[f]);
|
|
1381
|
-
|
|
1382
|
-
for (f += 1; f < o.length;) {
|
|
1383
|
-
var p = String.fromCharCode(o[f]);
|
|
1384
|
-
f += 1, i.contains(g + p) ? g += p : (d.write(i.indexOf(g), n), i.size() < 4095 && (i.size() == 1 << n && (n += 1), i.add(g + p)), g = p);
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
return d.write(i.indexOf(g), n), d.write(r, n), d.flush(), l.toByteArray();
|
|
1388
|
-
},
|
|
1389
|
-
s = function s() {
|
|
1390
|
-
var t = {},
|
|
1391
|
-
e = 0,
|
|
1392
|
-
r = {
|
|
1393
|
-
add: function add(n) {
|
|
1394
|
-
if (r.contains(n)) throw "dup key:" + n;
|
|
1395
|
-
t[n] = e, e += 1;
|
|
1396
|
-
},
|
|
1397
|
-
size: function size() {
|
|
1398
|
-
return e;
|
|
1399
|
-
},
|
|
1400
|
-
indexOf: function indexOf(e) {
|
|
1401
|
-
return t[e];
|
|
1402
|
-
},
|
|
1403
|
-
contains: function contains(e) {
|
|
1404
|
-
return void 0 !== t[e];
|
|
1405
|
-
}
|
|
1406
|
-
};
|
|
1407
|
-
return r;
|
|
1408
|
-
};
|
|
1409
|
-
|
|
1410
|
-
return i;
|
|
1411
|
-
}(t, e), o = 0; o < e; o += 1) {
|
|
1412
|
-
for (var i = 0; i < t; i += 1) {
|
|
1413
|
-
n.setPixel(i, o, r(i, o));
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
var a = v();
|
|
1418
|
-
n.write(a);
|
|
1419
|
-
|
|
1420
|
-
for (var s = function () {
|
|
1421
|
-
var t = 0,
|
|
1422
|
-
e = 0,
|
|
1423
|
-
r = 0,
|
|
1424
|
-
n = "",
|
|
1425
|
-
o = {},
|
|
1426
|
-
i = function i(t) {
|
|
1427
|
-
n += String.fromCharCode(a(63 & t));
|
|
1428
|
-
},
|
|
1429
|
-
a = function a(t) {
|
|
1430
|
-
if (t < 0) ;else {
|
|
1431
|
-
if (t < 26) return 65 + t;
|
|
1432
|
-
if (t < 52) return t - 26 + 97;
|
|
1433
|
-
if (t < 62) return t - 52 + 48;
|
|
1434
|
-
if (62 == t) return 43;
|
|
1435
|
-
if (63 == t) return 47;
|
|
1436
|
-
}
|
|
1437
|
-
throw "n:" + t;
|
|
1438
|
-
};
|
|
1439
|
-
|
|
1440
|
-
return o.writeByte = function (n) {
|
|
1441
|
-
for (t = t << 8 | 255 & n, e += 8, r += 1; e >= 6;) {
|
|
1442
|
-
i(t >>> e - 6), e -= 6;
|
|
1443
|
-
}
|
|
1444
|
-
}, o.flush = function () {
|
|
1445
|
-
if (e > 0 && (i(t << 6 - e), t = 0, e = 0), r % 3 != 0) for (var o = 3 - r % 3, a = 0; a < o; a += 1) {
|
|
1446
|
-
n += "=";
|
|
1447
|
-
}
|
|
1448
|
-
}, o.toString = function () {
|
|
1449
|
-
return n;
|
|
1450
|
-
}, o;
|
|
1451
|
-
}(), u = a.toByteArray(), h = 0; h < u.length; h += 1) {
|
|
1452
|
-
s.writeByte(u[h]);
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
return s.flush(), "data:image/gif;base64," + s;
|
|
1456
|
-
};
|
|
1457
|
-
|
|
1458
|
-
return t;
|
|
1459
|
-
}();
|
|
1460
|
-
|
|
1461
|
-
o.stringToBytesFuncs["UTF-8"] = function (t) {
|
|
1462
|
-
return function (t) {
|
|
1463
|
-
for (var e = [], r = 0; r < t.length; r++) {
|
|
1464
|
-
var n = t.charCodeAt(r);
|
|
1465
|
-
n < 128 ? e.push(n) : n < 2048 ? e.push(192 | n >> 6, 128 | 63 & n) : n < 55296 || n >= 57344 ? e.push(224 | n >> 12, 128 | n >> 6 & 63, 128 | 63 & n) : (r++, n = 65536 + ((1023 & n) << 10 | 1023 & t.charCodeAt(r)), e.push(240 | n >> 18, 128 | n >> 12 & 63, 128 | n >> 6 & 63, 128 | 63 & n));
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
return e;
|
|
1469
|
-
}(t);
|
|
1470
|
-
}, void 0 === (n = "function" == typeof (r = function r() {
|
|
1471
|
-
return o;
|
|
1472
|
-
}) ? r.apply(e, []) : r) || (t.exports = n);
|
|
1473
|
-
},
|
|
1474
|
-
676: function _(t, e, r) {
|
|
1475
|
-
"use strict";
|
|
1476
|
-
|
|
1477
|
-
r.d(e, {
|
|
1478
|
-
"default": function _default() {
|
|
1479
|
-
return q;
|
|
1480
|
-
}
|
|
1481
|
-
});
|
|
1482
|
-
|
|
1483
|
-
var _n = function n() {
|
|
1484
|
-
return (_n = Object.assign || function (t) {
|
|
1485
|
-
for (var e, r = 1, n = arguments.length; r < n; r++) {
|
|
1486
|
-
for (var o in e = arguments[r]) {
|
|
1487
|
-
Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
return t;
|
|
1492
|
-
}).apply(this, arguments);
|
|
1493
|
-
},
|
|
1494
|
-
o = function o() {
|
|
1495
|
-
for (var t = 0, e = 0, r = arguments.length; e < r; e++) {
|
|
1496
|
-
t += arguments[e].length;
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
var n = Array(t),
|
|
1500
|
-
o = 0;
|
|
1501
|
-
|
|
1502
|
-
for (e = 0; e < r; e++) {
|
|
1503
|
-
for (var i = arguments[e], a = 0, s = i.length; a < s; a++, o++) {
|
|
1504
|
-
n[o] = i[a];
|
|
1505
|
-
}
|
|
1150
|
+
function a(t) {
|
|
1151
|
+
for (var e = [], r = 1; r < arguments.length; r++) e[r - 1] = arguments[r];
|
|
1152
|
+
if (!e.length) return t;
|
|
1153
|
+
var s = e.shift();
|
|
1154
|
+
return void 0 !== s && i(t) && i(s) ? (t = _n({}, t), Object.keys(s).forEach(function (e) {
|
|
1155
|
+
var r = t[e],
|
|
1156
|
+
n = s[e];
|
|
1157
|
+
Array.isArray(r) && Array.isArray(n) ? t[e] = n : i(r) && i(n) ? t[e] = a(Object.assign({}, r), n) : t[e] = n;
|
|
1158
|
+
}), a.apply(void 0, o([t], e))) : t;
|
|
1506
1159
|
}
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
i = function i(t) {
|
|
1511
|
-
return !!t && "object" == _typeof(t) && !Array.isArray(t);
|
|
1512
|
-
};
|
|
1513
|
-
|
|
1514
|
-
function a(t) {
|
|
1515
|
-
for (var e = [], r = 1; r < arguments.length; r++) {
|
|
1516
|
-
e[r - 1] = arguments[r];
|
|
1160
|
+
function s(t, e) {
|
|
1161
|
+
var r = document.createElement("a");
|
|
1162
|
+
r.download = e, r.href = t, document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
1517
1163
|
}
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
var r = t[e],
|
|
1523
|
-
n = s[e];
|
|
1524
|
-
Array.isArray(r) && Array.isArray(n) ? t[e] = n : i(r) && i(n) ? t[e] = a(Object.assign({}, r), n) : t[e] = n;
|
|
1525
|
-
}), a.apply(void 0, o([t], e))) : t;
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
function s(t, e) {
|
|
1529
|
-
var r = document.createElement("a");
|
|
1530
|
-
r.download = e, r.href = t, document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
function u(t) {
|
|
1534
|
-
return e = this, r = void 0, o = function o() {
|
|
1535
|
-
return function (t, e) {
|
|
1536
|
-
var r,
|
|
1164
|
+
function u(t) {
|
|
1165
|
+
return e = this, r = void 0, o = function o() {
|
|
1166
|
+
return function (t, e) {
|
|
1167
|
+
var r,
|
|
1537
1168
|
n,
|
|
1538
1169
|
o,
|
|
1539
1170
|
i,
|
|
1540
1171
|
a = {
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
for (; a;) {
|
|
1563
|
-
try {
|
|
1172
|
+
label: 0,
|
|
1173
|
+
sent: function sent() {
|
|
1174
|
+
if (1 & o[0]) throw o[1];
|
|
1175
|
+
return o[1];
|
|
1176
|
+
},
|
|
1177
|
+
trys: [],
|
|
1178
|
+
ops: []
|
|
1179
|
+
};
|
|
1180
|
+
return i = {
|
|
1181
|
+
next: s(0),
|
|
1182
|
+
"throw": s(1),
|
|
1183
|
+
"return": s(2)
|
|
1184
|
+
}, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
|
|
1185
|
+
return this;
|
|
1186
|
+
}), i;
|
|
1187
|
+
function s(i) {
|
|
1188
|
+
return function (s) {
|
|
1189
|
+
return function (i) {
|
|
1190
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
1191
|
+
for (; a;) try {
|
|
1564
1192
|
if (r = 1, n && (o = 2 & i[0] ? n["return"] : i[0] ? n["throw"] || ((o = n["return"]) && o.call(n), 0) : n.next) && !(o = o.call(n, i[1])).done) return o;
|
|
1565
|
-
|
|
1566
1193
|
switch (n = 0, o && (i = [2 & i[0], o.value]), i[0]) {
|
|
1567
1194
|
case 0:
|
|
1568
1195
|
case 1:
|
|
1569
1196
|
o = i;
|
|
1570
1197
|
break;
|
|
1571
|
-
|
|
1572
1198
|
case 4:
|
|
1573
1199
|
return a.label++, {
|
|
1574
1200
|
value: i[1],
|
|
1575
1201
|
done: !1
|
|
1576
1202
|
};
|
|
1577
|
-
|
|
1578
1203
|
case 5:
|
|
1579
1204
|
a.label++, n = i[1], i = [0];
|
|
1580
1205
|
continue;
|
|
1581
|
-
|
|
1582
1206
|
case 7:
|
|
1583
1207
|
i = a.ops.pop(), a.trys.pop();
|
|
1584
1208
|
continue;
|
|
1585
|
-
|
|
1586
1209
|
default:
|
|
1587
1210
|
if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
|
|
1588
1211
|
a = 0;
|
|
1589
1212
|
continue;
|
|
1590
1213
|
}
|
|
1591
|
-
|
|
1592
1214
|
if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
|
|
1593
1215
|
a.label = i[1];
|
|
1594
1216
|
break;
|
|
1595
1217
|
}
|
|
1596
|
-
|
|
1597
1218
|
if (6 === i[0] && a.label < o[1]) {
|
|
1598
1219
|
a.label = o[1], o = i;
|
|
1599
1220
|
break;
|
|
1600
1221
|
}
|
|
1601
|
-
|
|
1602
1222
|
if (o && a.label < o[2]) {
|
|
1603
1223
|
a.label = o[2], a.ops.push(i);
|
|
1604
1224
|
break;
|
|
1605
1225
|
}
|
|
1606
|
-
|
|
1607
1226
|
o[2] && a.ops.pop(), a.trys.pop();
|
|
1608
1227
|
continue;
|
|
1609
1228
|
}
|
|
1610
|
-
|
|
1611
1229
|
i = e.call(t, a);
|
|
1612
1230
|
} catch (t) {
|
|
1613
1231
|
i = [6, t], n = 0;
|
|
1614
1232
|
} finally {
|
|
1615
1233
|
r = o = 0;
|
|
1616
1234
|
}
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
i(t);
|
|
1235
|
+
if (5 & i[0]) throw i[1];
|
|
1236
|
+
return {
|
|
1237
|
+
value: i[0] ? i[1] : void 0,
|
|
1238
|
+
done: !0
|
|
1239
|
+
};
|
|
1240
|
+
}([i, s]);
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
}(this, function (e) {
|
|
1244
|
+
return [2, new Promise(function (e) {
|
|
1245
|
+
var r = new XMLHttpRequest();
|
|
1246
|
+
r.onload = function () {
|
|
1247
|
+
var t = new FileReader();
|
|
1248
|
+
t.onloadend = function () {
|
|
1249
|
+
e(t.result);
|
|
1250
|
+
}, t.readAsDataURL(r.response);
|
|
1251
|
+
}, r.open("GET", t), r.responseType = "blob", r.send();
|
|
1252
|
+
})];
|
|
1253
|
+
});
|
|
1254
|
+
}, new ((n = void 0) || (n = Promise))(function (t, i) {
|
|
1255
|
+
function a(t) {
|
|
1256
|
+
try {
|
|
1257
|
+
u(o.next(t));
|
|
1258
|
+
} catch (t) {
|
|
1259
|
+
i(t);
|
|
1260
|
+
}
|
|
1644
1261
|
}
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
i(t);
|
|
1262
|
+
function s(t) {
|
|
1263
|
+
try {
|
|
1264
|
+
u(o["throw"](t));
|
|
1265
|
+
} catch (t) {
|
|
1266
|
+
i(t);
|
|
1267
|
+
}
|
|
1652
1268
|
}
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
t(r);
|
|
1659
|
-
})).then(a, s);
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
u((o = o.apply(e, r || [])).next());
|
|
1663
|
-
});
|
|
1664
|
-
var e, r, n, o;
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
var h = {
|
|
1668
|
-
L: .07,
|
|
1669
|
-
M: .15,
|
|
1670
|
-
Q: .25,
|
|
1671
|
-
H: .3
|
|
1672
|
-
};
|
|
1673
|
-
|
|
1674
|
-
var _c = function c() {
|
|
1675
|
-
return (_c = Object.assign || function (t) {
|
|
1676
|
-
for (var e, r = 1, n = arguments.length; r < n; r++) {
|
|
1677
|
-
for (var o in e = arguments[r]) {
|
|
1678
|
-
Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
1269
|
+
function u(e) {
|
|
1270
|
+
var r;
|
|
1271
|
+
e.done ? t(e.value) : (r = e.value, r instanceof n ? r : new n(function (t) {
|
|
1272
|
+
t(r);
|
|
1273
|
+
})).then(a, s);
|
|
1679
1274
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
}).apply(this, arguments);
|
|
1684
|
-
};
|
|
1685
|
-
|
|
1686
|
-
var l = function () {
|
|
1687
|
-
function t(t) {
|
|
1688
|
-
var e = t.svg,
|
|
1689
|
-
r = t.type;
|
|
1690
|
-
this._svg = e, this._type = r;
|
|
1275
|
+
u((o = o.apply(e, r || [])).next());
|
|
1276
|
+
});
|
|
1277
|
+
var e, r, n, o;
|
|
1691
1278
|
}
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
case "rounded":
|
|
1710
|
-
o = this._drawRounded;
|
|
1711
|
-
break;
|
|
1712
|
-
|
|
1713
|
-
case "extra-rounded":
|
|
1714
|
-
o = this._drawExtraRounded;
|
|
1715
|
-
break;
|
|
1716
|
-
|
|
1717
|
-
case "square":
|
|
1718
|
-
default:
|
|
1719
|
-
o = this._drawSquare;
|
|
1279
|
+
var h = {
|
|
1280
|
+
L: .07,
|
|
1281
|
+
M: .15,
|
|
1282
|
+
Q: .25,
|
|
1283
|
+
H: .3
|
|
1284
|
+
};
|
|
1285
|
+
var _c = function c() {
|
|
1286
|
+
return (_c = Object.assign || function (t) {
|
|
1287
|
+
for (var e, r = 1, n = arguments.length; r < n; r++) for (var o in e = arguments[r]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
1288
|
+
return t;
|
|
1289
|
+
}).apply(this, arguments);
|
|
1290
|
+
};
|
|
1291
|
+
var l = function () {
|
|
1292
|
+
function t(t) {
|
|
1293
|
+
var e = t.svg,
|
|
1294
|
+
r = t.type;
|
|
1295
|
+
this._svg = e, this._type = r;
|
|
1720
1296
|
}
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1297
|
+
return t.prototype.draw = function (t, e, r, n) {
|
|
1298
|
+
var o;
|
|
1299
|
+
switch (this._type) {
|
|
1300
|
+
case "dots":
|
|
1301
|
+
o = this._drawDot;
|
|
1302
|
+
break;
|
|
1303
|
+
case "classy":
|
|
1304
|
+
o = this._drawClassy;
|
|
1305
|
+
break;
|
|
1306
|
+
case "classy-rounded":
|
|
1307
|
+
o = this._drawClassyRounded;
|
|
1308
|
+
break;
|
|
1309
|
+
case "rounded":
|
|
1310
|
+
o = this._drawRounded;
|
|
1311
|
+
break;
|
|
1312
|
+
case "extra-rounded":
|
|
1313
|
+
o = this._drawExtraRounded;
|
|
1314
|
+
break;
|
|
1315
|
+
case "square":
|
|
1316
|
+
default:
|
|
1317
|
+
o = this._drawSquare;
|
|
1318
|
+
}
|
|
1319
|
+
o.call(this, {
|
|
1320
|
+
x: t,
|
|
1321
|
+
y: e,
|
|
1322
|
+
size: r,
|
|
1323
|
+
getNeighbor: n
|
|
1324
|
+
});
|
|
1325
|
+
}, t.prototype._rotateFigure = function (t) {
|
|
1326
|
+
var e,
|
|
1730
1327
|
r = t.x,
|
|
1731
1328
|
n = t.y,
|
|
1732
1329
|
o = t.size,
|
|
@@ -1734,97 +1331,89 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1734
1331
|
a = void 0 === i ? 0 : i,
|
|
1735
1332
|
s = r + o / 2,
|
|
1736
1333
|
u = n + o / 2;
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1334
|
+
(0, t.draw)(), null === (e = this._element) || void 0 === e || e.setAttribute("transform", "rotate(" + 180 * a / Math.PI + "," + s + "," + u + ")");
|
|
1335
|
+
}, t.prototype._basicDot = function (t) {
|
|
1336
|
+
var e = this,
|
|
1740
1337
|
r = t.size,
|
|
1741
1338
|
n = t.x,
|
|
1742
1339
|
o = t.y;
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
}
|
|
1748
|
-
})
|
|
1749
|
-
|
|
1750
|
-
var e = this,
|
|
1340
|
+
this._rotateFigure(_c(_c({}, t), {
|
|
1341
|
+
draw: function draw() {
|
|
1342
|
+
e._element = document.createElementNS("http://www.w3.org/2000/svg", "circle"), e._element.setAttribute("cx", String(n + r / 2)), e._element.setAttribute("cy", String(o + r / 2)), e._element.setAttribute("r", String(r / 2));
|
|
1343
|
+
}
|
|
1344
|
+
}));
|
|
1345
|
+
}, t.prototype._basicSquare = function (t) {
|
|
1346
|
+
var e = this,
|
|
1751
1347
|
r = t.size,
|
|
1752
1348
|
n = t.x,
|
|
1753
1349
|
o = t.y;
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
}
|
|
1759
|
-
})
|
|
1760
|
-
|
|
1761
|
-
var e = this,
|
|
1350
|
+
this._rotateFigure(_c(_c({}, t), {
|
|
1351
|
+
draw: function draw() {
|
|
1352
|
+
e._element = document.createElementNS("http://www.w3.org/2000/svg", "rect"), e._element.setAttribute("x", String(n)), e._element.setAttribute("y", String(o)), e._element.setAttribute("width", String(r)), e._element.setAttribute("height", String(r));
|
|
1353
|
+
}
|
|
1354
|
+
}));
|
|
1355
|
+
}, t.prototype._basicSideRounded = function (t) {
|
|
1356
|
+
var e = this,
|
|
1762
1357
|
r = t.size,
|
|
1763
1358
|
n = t.x,
|
|
1764
1359
|
o = t.y;
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
}
|
|
1770
|
-
})
|
|
1771
|
-
|
|
1772
|
-
var e = this,
|
|
1360
|
+
this._rotateFigure(_c(_c({}, t), {
|
|
1361
|
+
draw: function draw() {
|
|
1362
|
+
e._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), e._element.setAttribute("d", "M " + n + " " + o + "v " + r + "h " + r / 2 + "a " + r / 2 + " " + r / 2 + ", 0, 0, 0, 0 " + -r);
|
|
1363
|
+
}
|
|
1364
|
+
}));
|
|
1365
|
+
}, t.prototype._basicCornerRounded = function (t) {
|
|
1366
|
+
var e = this,
|
|
1773
1367
|
r = t.size,
|
|
1774
1368
|
n = t.x,
|
|
1775
1369
|
o = t.y;
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
}
|
|
1781
|
-
})
|
|
1782
|
-
|
|
1783
|
-
var e = this,
|
|
1370
|
+
this._rotateFigure(_c(_c({}, t), {
|
|
1371
|
+
draw: function draw() {
|
|
1372
|
+
e._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), e._element.setAttribute("d", "M " + n + " " + o + "v " + r + "h " + r + "v " + -r / 2 + "a " + r / 2 + " " + r / 2 + ", 0, 0, 0, " + -r / 2 + " " + -r / 2);
|
|
1373
|
+
}
|
|
1374
|
+
}));
|
|
1375
|
+
}, t.prototype._basicCornerExtraRounded = function (t) {
|
|
1376
|
+
var e = this,
|
|
1784
1377
|
r = t.size,
|
|
1785
1378
|
n = t.x,
|
|
1786
1379
|
o = t.y;
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
}
|
|
1792
|
-
})
|
|
1793
|
-
|
|
1794
|
-
var e = this,
|
|
1380
|
+
this._rotateFigure(_c(_c({}, t), {
|
|
1381
|
+
draw: function draw() {
|
|
1382
|
+
e._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), e._element.setAttribute("d", "M " + n + " " + o + "v " + r + "h " + r + "a " + r + " " + r + ", 0, 0, 0, " + -r + " " + -r);
|
|
1383
|
+
}
|
|
1384
|
+
}));
|
|
1385
|
+
}, t.prototype._basicCornersRounded = function (t) {
|
|
1386
|
+
var e = this,
|
|
1795
1387
|
r = t.size,
|
|
1796
1388
|
n = t.x,
|
|
1797
1389
|
o = t.y;
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
}
|
|
1803
|
-
})
|
|
1804
|
-
|
|
1805
|
-
var e = t.x,
|
|
1390
|
+
this._rotateFigure(_c(_c({}, t), {
|
|
1391
|
+
draw: function draw() {
|
|
1392
|
+
e._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), e._element.setAttribute("d", "M " + n + " " + o + "v " + r / 2 + "a " + r / 2 + " " + r / 2 + ", 0, 0, 0, " + r / 2 + " " + r / 2 + "h " + r / 2 + "v " + -r / 2 + "a " + r / 2 + " " + r / 2 + ", 0, 0, 0, " + -r / 2 + " " + -r / 2);
|
|
1393
|
+
}
|
|
1394
|
+
}));
|
|
1395
|
+
}, t.prototype._drawDot = function (t) {
|
|
1396
|
+
var e = t.x,
|
|
1806
1397
|
r = t.y,
|
|
1807
1398
|
n = t.size;
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
})
|
|
1815
|
-
|
|
1816
|
-
var e = t.x,
|
|
1399
|
+
this._basicDot({
|
|
1400
|
+
x: e,
|
|
1401
|
+
y: r,
|
|
1402
|
+
size: n,
|
|
1403
|
+
rotation: 0
|
|
1404
|
+
});
|
|
1405
|
+
}, t.prototype._drawSquare = function (t) {
|
|
1406
|
+
var e = t.x,
|
|
1817
1407
|
r = t.y,
|
|
1818
1408
|
n = t.size;
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
})
|
|
1826
|
-
|
|
1827
|
-
var e = t.x,
|
|
1409
|
+
this._basicSquare({
|
|
1410
|
+
x: e,
|
|
1411
|
+
y: r,
|
|
1412
|
+
size: n,
|
|
1413
|
+
rotation: 0
|
|
1414
|
+
});
|
|
1415
|
+
}, t.prototype._drawRounded = function (t) {
|
|
1416
|
+
var e = t.x,
|
|
1828
1417
|
r = t.y,
|
|
1829
1418
|
n = t.size,
|
|
1830
1419
|
o = t.getNeighbor,
|
|
@@ -1833,38 +1422,37 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1833
1422
|
s = o ? +o(0, -1) : 0,
|
|
1834
1423
|
u = o ? +o(0, 1) : 0,
|
|
1835
1424
|
h = i + a + s + u;
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1425
|
+
if (0 !== h) {
|
|
1426
|
+
if (h > 2 || i && a || s && u) this._basicSquare({
|
|
1427
|
+
x: e,
|
|
1428
|
+
y: r,
|
|
1429
|
+
size: n,
|
|
1430
|
+
rotation: 0
|
|
1431
|
+
});else {
|
|
1432
|
+
if (2 === h) {
|
|
1433
|
+
var c = 0;
|
|
1434
|
+
return i && s ? c = Math.PI / 2 : s && a ? c = Math.PI : a && u && (c = -Math.PI / 2), void this._basicCornerRounded({
|
|
1435
|
+
x: e,
|
|
1436
|
+
y: r,
|
|
1437
|
+
size: n,
|
|
1438
|
+
rotation: c
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
if (1 === h) return c = 0, s ? c = Math.PI / 2 : a ? c = Math.PI : u && (c = -Math.PI / 2), void this._basicSideRounded({
|
|
1846
1442
|
x: e,
|
|
1847
1443
|
y: r,
|
|
1848
1444
|
size: n,
|
|
1849
1445
|
rotation: c
|
|
1850
1446
|
});
|
|
1851
1447
|
}
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
} else this._basicDot({
|
|
1861
|
-
x: e,
|
|
1862
|
-
y: r,
|
|
1863
|
-
size: n,
|
|
1864
|
-
rotation: 0
|
|
1865
|
-
});
|
|
1866
|
-
}, t.prototype._drawExtraRounded = function (t) {
|
|
1867
|
-
var e = t.x,
|
|
1448
|
+
} else this._basicDot({
|
|
1449
|
+
x: e,
|
|
1450
|
+
y: r,
|
|
1451
|
+
size: n,
|
|
1452
|
+
rotation: 0
|
|
1453
|
+
});
|
|
1454
|
+
}, t.prototype._drawExtraRounded = function (t) {
|
|
1455
|
+
var e = t.x,
|
|
1868
1456
|
r = t.y,
|
|
1869
1457
|
n = t.size,
|
|
1870
1458
|
o = t.getNeighbor,
|
|
@@ -1873,38 +1461,37 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1873
1461
|
s = o ? +o(0, -1) : 0,
|
|
1874
1462
|
u = o ? +o(0, 1) : 0,
|
|
1875
1463
|
h = i + a + s + u;
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1464
|
+
if (0 !== h) {
|
|
1465
|
+
if (h > 2 || i && a || s && u) this._basicSquare({
|
|
1466
|
+
x: e,
|
|
1467
|
+
y: r,
|
|
1468
|
+
size: n,
|
|
1469
|
+
rotation: 0
|
|
1470
|
+
});else {
|
|
1471
|
+
if (2 === h) {
|
|
1472
|
+
var c = 0;
|
|
1473
|
+
return i && s ? c = Math.PI / 2 : s && a ? c = Math.PI : a && u && (c = -Math.PI / 2), void this._basicCornerExtraRounded({
|
|
1474
|
+
x: e,
|
|
1475
|
+
y: r,
|
|
1476
|
+
size: n,
|
|
1477
|
+
rotation: c
|
|
1478
|
+
});
|
|
1479
|
+
}
|
|
1480
|
+
if (1 === h) return c = 0, s ? c = Math.PI / 2 : a ? c = Math.PI : u && (c = -Math.PI / 2), void this._basicSideRounded({
|
|
1886
1481
|
x: e,
|
|
1887
1482
|
y: r,
|
|
1888
1483
|
size: n,
|
|
1889
1484
|
rotation: c
|
|
1890
1485
|
});
|
|
1891
1486
|
}
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
} else this._basicDot({
|
|
1901
|
-
x: e,
|
|
1902
|
-
y: r,
|
|
1903
|
-
size: n,
|
|
1904
|
-
rotation: 0
|
|
1905
|
-
});
|
|
1906
|
-
}, t.prototype._drawClassy = function (t) {
|
|
1907
|
-
var e = t.x,
|
|
1487
|
+
} else this._basicDot({
|
|
1488
|
+
x: e,
|
|
1489
|
+
y: r,
|
|
1490
|
+
size: n,
|
|
1491
|
+
rotation: 0
|
|
1492
|
+
});
|
|
1493
|
+
}, t.prototype._drawClassy = function (t) {
|
|
1494
|
+
var e = t.x,
|
|
1908
1495
|
r = t.y,
|
|
1909
1496
|
n = t.size,
|
|
1910
1497
|
o = t.getNeighbor,
|
|
@@ -1912,29 +1499,29 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1912
1499
|
a = o ? +o(1, 0) : 0,
|
|
1913
1500
|
s = o ? +o(0, -1) : 0,
|
|
1914
1501
|
u = o ? +o(0, 1) : 0;
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1502
|
+
0 !== i + a + s + u ? i || s ? a || u ? this._basicSquare({
|
|
1503
|
+
x: e,
|
|
1504
|
+
y: r,
|
|
1505
|
+
size: n,
|
|
1506
|
+
rotation: 0
|
|
1507
|
+
}) : this._basicCornerRounded({
|
|
1508
|
+
x: e,
|
|
1509
|
+
y: r,
|
|
1510
|
+
size: n,
|
|
1511
|
+
rotation: Math.PI / 2
|
|
1512
|
+
}) : this._basicCornerRounded({
|
|
1513
|
+
x: e,
|
|
1514
|
+
y: r,
|
|
1515
|
+
size: n,
|
|
1516
|
+
rotation: -Math.PI / 2
|
|
1517
|
+
}) : this._basicCornersRounded({
|
|
1518
|
+
x: e,
|
|
1519
|
+
y: r,
|
|
1520
|
+
size: n,
|
|
1521
|
+
rotation: Math.PI / 2
|
|
1522
|
+
});
|
|
1523
|
+
}, t.prototype._drawClassyRounded = function (t) {
|
|
1524
|
+
var e = t.x,
|
|
1938
1525
|
r = t.y,
|
|
1939
1526
|
n = t.size,
|
|
1940
1527
|
o = t.getNeighbor,
|
|
@@ -1942,74 +1529,62 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1942
1529
|
a = o ? +o(1, 0) : 0,
|
|
1943
1530
|
s = o ? +o(0, -1) : 0,
|
|
1944
1531
|
u = o ? +o(0, 1) : 0;
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
return t;
|
|
1978
|
-
}).apply(this, arguments);
|
|
1979
|
-
};
|
|
1980
|
-
|
|
1981
|
-
var f = function () {
|
|
1982
|
-
function t(t) {
|
|
1983
|
-
var e = t.svg,
|
|
1532
|
+
0 !== i + a + s + u ? i || s ? a || u ? this._basicSquare({
|
|
1533
|
+
x: e,
|
|
1534
|
+
y: r,
|
|
1535
|
+
size: n,
|
|
1536
|
+
rotation: 0
|
|
1537
|
+
}) : this._basicCornerExtraRounded({
|
|
1538
|
+
x: e,
|
|
1539
|
+
y: r,
|
|
1540
|
+
size: n,
|
|
1541
|
+
rotation: Math.PI / 2
|
|
1542
|
+
}) : this._basicCornerExtraRounded({
|
|
1543
|
+
x: e,
|
|
1544
|
+
y: r,
|
|
1545
|
+
size: n,
|
|
1546
|
+
rotation: -Math.PI / 2
|
|
1547
|
+
}) : this._basicCornersRounded({
|
|
1548
|
+
x: e,
|
|
1549
|
+
y: r,
|
|
1550
|
+
size: n,
|
|
1551
|
+
rotation: Math.PI / 2
|
|
1552
|
+
});
|
|
1553
|
+
}, t;
|
|
1554
|
+
}();
|
|
1555
|
+
var _d = function d() {
|
|
1556
|
+
return (_d = Object.assign || function (t) {
|
|
1557
|
+
for (var e, r = 1, n = arguments.length; r < n; r++) for (var o in e = arguments[r]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
1558
|
+
return t;
|
|
1559
|
+
}).apply(this, arguments);
|
|
1560
|
+
};
|
|
1561
|
+
var f = function () {
|
|
1562
|
+
function t(t) {
|
|
1563
|
+
var e = t.svg,
|
|
1984
1564
|
r = t.type;
|
|
1985
|
-
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
return t.prototype.draw = function (t, e, r, n) {
|
|
1989
|
-
var o;
|
|
1990
|
-
|
|
1991
|
-
switch (this._type) {
|
|
1992
|
-
case "square":
|
|
1993
|
-
o = this._drawSquare;
|
|
1994
|
-
break;
|
|
1995
|
-
|
|
1996
|
-
case "extra-rounded":
|
|
1997
|
-
o = this._drawExtraRounded;
|
|
1998
|
-
break;
|
|
1999
|
-
|
|
2000
|
-
case "dot":
|
|
2001
|
-
default:
|
|
2002
|
-
o = this._drawDot;
|
|
1565
|
+
this._svg = e, this._type = r;
|
|
2003
1566
|
}
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
1567
|
+
return t.prototype.draw = function (t, e, r, n) {
|
|
1568
|
+
var o;
|
|
1569
|
+
switch (this._type) {
|
|
1570
|
+
case "square":
|
|
1571
|
+
o = this._drawSquare;
|
|
1572
|
+
break;
|
|
1573
|
+
case "extra-rounded":
|
|
1574
|
+
o = this._drawExtraRounded;
|
|
1575
|
+
break;
|
|
1576
|
+
case "dot":
|
|
1577
|
+
default:
|
|
1578
|
+
o = this._drawDot;
|
|
1579
|
+
}
|
|
1580
|
+
o.call(this, {
|
|
1581
|
+
x: t,
|
|
1582
|
+
y: e,
|
|
1583
|
+
size: r,
|
|
1584
|
+
rotation: n
|
|
1585
|
+
});
|
|
1586
|
+
}, t.prototype._rotateFigure = function (t) {
|
|
1587
|
+
var e,
|
|
2013
1588
|
r = t.x,
|
|
2014
1589
|
n = t.y,
|
|
2015
1590
|
o = t.size,
|
|
@@ -2017,976 +1592,849 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2017
1592
|
a = void 0 === i ? 0 : i,
|
|
2018
1593
|
s = r + o / 2,
|
|
2019
1594
|
u = n + o / 2;
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
1595
|
+
(0, t.draw)(), null === (e = this._element) || void 0 === e || e.setAttribute("transform", "rotate(" + 180 * a / Math.PI + "," + s + "," + u + ")");
|
|
1596
|
+
}, t.prototype._basicDot = function (t) {
|
|
1597
|
+
var e = this,
|
|
2023
1598
|
r = t.size,
|
|
2024
1599
|
n = t.x,
|
|
2025
1600
|
o = t.y,
|
|
2026
1601
|
i = r / 7;
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
}
|
|
2032
|
-
})
|
|
2033
|
-
|
|
2034
|
-
var e = this,
|
|
1602
|
+
this._rotateFigure(_d(_d({}, t), {
|
|
1603
|
+
draw: function draw() {
|
|
1604
|
+
e._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), e._element.setAttribute("clip-rule", "evenodd"), e._element.setAttribute("d", "M " + (n + r / 2) + " " + o + "a " + r / 2 + " " + r / 2 + " 0 1 0 0.1 0zm 0 " + i + "a " + (r / 2 - i) + " " + (r / 2 - i) + " 0 1 1 -0.1 0Z");
|
|
1605
|
+
}
|
|
1606
|
+
}));
|
|
1607
|
+
}, t.prototype._basicSquare = function (t) {
|
|
1608
|
+
var e = this,
|
|
2035
1609
|
r = t.size,
|
|
2036
1610
|
n = t.x,
|
|
2037
1611
|
o = t.y,
|
|
2038
1612
|
i = r / 7;
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
}
|
|
2044
|
-
})
|
|
2045
|
-
|
|
2046
|
-
var e = this,
|
|
1613
|
+
this._rotateFigure(_d(_d({}, t), {
|
|
1614
|
+
draw: function draw() {
|
|
1615
|
+
e._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), e._element.setAttribute("clip-rule", "evenodd"), e._element.setAttribute("d", "M " + n + " " + o + "v " + r + "h " + r + "v " + -r + "zM " + (n + i) + " " + (o + i) + "h " + (r - 2 * i) + "v " + (r - 2 * i) + "h " + (2 * i - r) + "z");
|
|
1616
|
+
}
|
|
1617
|
+
}));
|
|
1618
|
+
}, t.prototype._basicExtraRounded = function (t) {
|
|
1619
|
+
var e = this,
|
|
2047
1620
|
r = t.size,
|
|
2048
1621
|
n = t.x,
|
|
2049
1622
|
o = t.y,
|
|
2050
1623
|
i = r / 7;
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
}
|
|
2056
|
-
})
|
|
2057
|
-
|
|
2058
|
-
var e = t.x,
|
|
2059
|
-
r = t.y,
|
|
2060
|
-
n = t.size,
|
|
2061
|
-
o = t.rotation;
|
|
2062
|
-
|
|
2063
|
-
this._basicDot({
|
|
2064
|
-
x: e,
|
|
2065
|
-
y: r,
|
|
2066
|
-
size: n,
|
|
2067
|
-
rotation: o
|
|
2068
|
-
});
|
|
2069
|
-
}, t.prototype._drawSquare = function (t) {
|
|
2070
|
-
var e = t.x,
|
|
2071
|
-
r = t.y,
|
|
2072
|
-
n = t.size,
|
|
2073
|
-
o = t.rotation;
|
|
2074
|
-
|
|
2075
|
-
this._basicSquare({
|
|
2076
|
-
x: e,
|
|
2077
|
-
y: r,
|
|
2078
|
-
size: n,
|
|
2079
|
-
rotation: o
|
|
2080
|
-
});
|
|
2081
|
-
}, t.prototype._drawExtraRounded = function (t) {
|
|
2082
|
-
var e = t.x,
|
|
1624
|
+
this._rotateFigure(_d(_d({}, t), {
|
|
1625
|
+
draw: function draw() {
|
|
1626
|
+
e._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), e._element.setAttribute("clip-rule", "evenodd"), e._element.setAttribute("d", "M " + n + " " + (o + 2.5 * i) + "v " + 2 * i + "a " + 2.5 * i + " " + 2.5 * i + ", 0, 0, 0, " + 2.5 * i + " " + 2.5 * i + "h " + 2 * i + "a " + 2.5 * i + " " + 2.5 * i + ", 0, 0, 0, " + 2.5 * i + " " + 2.5 * -i + "v " + -2 * i + "a " + 2.5 * i + " " + 2.5 * i + ", 0, 0, 0, " + 2.5 * -i + " " + 2.5 * -i + "h " + -2 * i + "a " + 2.5 * i + " " + 2.5 * i + ", 0, 0, 0, " + 2.5 * -i + " " + 2.5 * i + "M " + (n + 2.5 * i) + " " + (o + i) + "h " + 2 * i + "a " + 1.5 * i + " " + 1.5 * i + ", 0, 0, 1, " + 1.5 * i + " " + 1.5 * i + "v " + 2 * i + "a " + 1.5 * i + " " + 1.5 * i + ", 0, 0, 1, " + 1.5 * -i + " " + 1.5 * i + "h " + -2 * i + "a " + 1.5 * i + " " + 1.5 * i + ", 0, 0, 1, " + 1.5 * -i + " " + 1.5 * -i + "v " + -2 * i + "a " + 1.5 * i + " " + 1.5 * i + ", 0, 0, 1, " + 1.5 * i + " " + 1.5 * -i);
|
|
1627
|
+
}
|
|
1628
|
+
}));
|
|
1629
|
+
}, t.prototype._drawDot = function (t) {
|
|
1630
|
+
var e = t.x,
|
|
2083
1631
|
r = t.y,
|
|
2084
1632
|
n = t.size,
|
|
2085
1633
|
o = t.rotation;
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
})
|
|
2093
|
-
|
|
2094
|
-
}();
|
|
2095
|
-
|
|
2096
|
-
var _g = function g() {
|
|
2097
|
-
return (_g = Object.assign || function (t) {
|
|
2098
|
-
for (var e, r = 1, n = arguments.length; r < n; r++) {
|
|
2099
|
-
for (var o in e = arguments[r]) {
|
|
2100
|
-
Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
return t;
|
|
2105
|
-
}).apply(this, arguments);
|
|
2106
|
-
};
|
|
2107
|
-
|
|
2108
|
-
var p = function () {
|
|
2109
|
-
function t(t) {
|
|
2110
|
-
var e = t.svg,
|
|
2111
|
-
r = t.type;
|
|
2112
|
-
this._svg = e, this._type = r;
|
|
2113
|
-
}
|
|
2114
|
-
|
|
2115
|
-
return t.prototype.draw = function (t, e, r, n) {
|
|
2116
|
-
var o;
|
|
2117
|
-
|
|
2118
|
-
switch (this._type) {
|
|
2119
|
-
case "square":
|
|
2120
|
-
o = this._drawSquare;
|
|
2121
|
-
break;
|
|
2122
|
-
|
|
2123
|
-
case "dot":
|
|
2124
|
-
default:
|
|
2125
|
-
o = this._drawDot;
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
o.call(this, {
|
|
2129
|
-
x: t,
|
|
2130
|
-
y: e,
|
|
2131
|
-
size: r,
|
|
2132
|
-
rotation: n
|
|
2133
|
-
});
|
|
2134
|
-
}, t.prototype._rotateFigure = function (t) {
|
|
2135
|
-
var e,
|
|
2136
|
-
r = t.x,
|
|
2137
|
-
n = t.y,
|
|
2138
|
-
o = t.size,
|
|
2139
|
-
i = t.rotation,
|
|
2140
|
-
a = void 0 === i ? 0 : i,
|
|
2141
|
-
s = r + o / 2,
|
|
2142
|
-
u = n + o / 2;
|
|
2143
|
-
(0, t.draw)(), null === (e = this._element) || void 0 === e || e.setAttribute("transform", "rotate(" + 180 * a / Math.PI + "," + s + "," + u + ")");
|
|
2144
|
-
}, t.prototype._basicDot = function (t) {
|
|
2145
|
-
var e = this,
|
|
2146
|
-
r = t.size,
|
|
2147
|
-
n = t.x,
|
|
2148
|
-
o = t.y;
|
|
2149
|
-
|
|
2150
|
-
this._rotateFigure(_g(_g({}, t), {
|
|
2151
|
-
draw: function draw() {
|
|
2152
|
-
e._element = document.createElementNS("http://www.w3.org/2000/svg", "circle"), e._element.setAttribute("cx", String(n + r / 2)), e._element.setAttribute("cy", String(o + r / 2)), e._element.setAttribute("r", String(r / 2));
|
|
2153
|
-
}
|
|
2154
|
-
}));
|
|
2155
|
-
}, t.prototype._basicSquare = function (t) {
|
|
2156
|
-
var e = this,
|
|
2157
|
-
r = t.size,
|
|
2158
|
-
n = t.x,
|
|
2159
|
-
o = t.y;
|
|
2160
|
-
|
|
2161
|
-
this._rotateFigure(_g(_g({}, t), {
|
|
2162
|
-
draw: function draw() {
|
|
2163
|
-
e._element = document.createElementNS("http://www.w3.org/2000/svg", "rect"), e._element.setAttribute("x", String(n)), e._element.setAttribute("y", String(o)), e._element.setAttribute("width", String(r)), e._element.setAttribute("height", String(r));
|
|
2164
|
-
}
|
|
2165
|
-
}));
|
|
2166
|
-
}, t.prototype._drawDot = function (t) {
|
|
2167
|
-
var e = t.x,
|
|
1634
|
+
this._basicDot({
|
|
1635
|
+
x: e,
|
|
1636
|
+
y: r,
|
|
1637
|
+
size: n,
|
|
1638
|
+
rotation: o
|
|
1639
|
+
});
|
|
1640
|
+
}, t.prototype._drawSquare = function (t) {
|
|
1641
|
+
var e = t.x,
|
|
2168
1642
|
r = t.y,
|
|
2169
1643
|
n = t.size,
|
|
2170
1644
|
o = t.rotation;
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
})
|
|
2178
|
-
|
|
2179
|
-
var e = t.x,
|
|
1645
|
+
this._basicSquare({
|
|
1646
|
+
x: e,
|
|
1647
|
+
y: r,
|
|
1648
|
+
size: n,
|
|
1649
|
+
rotation: o
|
|
1650
|
+
});
|
|
1651
|
+
}, t.prototype._drawExtraRounded = function (t) {
|
|
1652
|
+
var e = t.x,
|
|
2180
1653
|
r = t.y,
|
|
2181
1654
|
n = t.size,
|
|
2182
1655
|
o = t.rotation;
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
function a(t) {
|
|
2197
|
-
try {
|
|
2198
|
-
u(n.next(t));
|
|
2199
|
-
} catch (t) {
|
|
2200
|
-
i(t);
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
function s(t) {
|
|
2205
|
-
try {
|
|
2206
|
-
u(n["throw"](t));
|
|
2207
|
-
} catch (t) {
|
|
2208
|
-
i(t);
|
|
2209
|
-
}
|
|
2210
|
-
}
|
|
2211
|
-
|
|
2212
|
-
function u(t) {
|
|
2213
|
-
var e;
|
|
2214
|
-
t.done ? o(t.value) : (e = t.value, e instanceof r ? e : new r(function (t) {
|
|
2215
|
-
t(e);
|
|
2216
|
-
})).then(a, s);
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
u((n = n.apply(t, e || [])).next());
|
|
2220
|
-
});
|
|
2221
|
-
},
|
|
2222
|
-
y = function y(t, e) {
|
|
2223
|
-
var r,
|
|
2224
|
-
n,
|
|
2225
|
-
o,
|
|
2226
|
-
i,
|
|
2227
|
-
a = {
|
|
2228
|
-
label: 0,
|
|
2229
|
-
sent: function sent() {
|
|
2230
|
-
if (1 & o[0]) throw o[1];
|
|
2231
|
-
return o[1];
|
|
2232
|
-
},
|
|
2233
|
-
trys: [],
|
|
2234
|
-
ops: []
|
|
1656
|
+
this._basicExtraRounded({
|
|
1657
|
+
x: e,
|
|
1658
|
+
y: r,
|
|
1659
|
+
size: n,
|
|
1660
|
+
rotation: o
|
|
1661
|
+
});
|
|
1662
|
+
}, t;
|
|
1663
|
+
}();
|
|
1664
|
+
var _g = function g() {
|
|
1665
|
+
return (_g = Object.assign || function (t) {
|
|
1666
|
+
for (var e, r = 1, n = arguments.length; r < n; r++) for (var o in e = arguments[r]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
1667
|
+
return t;
|
|
1668
|
+
}).apply(this, arguments);
|
|
2235
1669
|
};
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
1670
|
+
var p = function () {
|
|
1671
|
+
function t(t) {
|
|
1672
|
+
var e = t.svg,
|
|
1673
|
+
r = t.type;
|
|
1674
|
+
this._svg = e, this._type = r;
|
|
1675
|
+
}
|
|
1676
|
+
return t.prototype.draw = function (t, e, r, n) {
|
|
1677
|
+
var o;
|
|
1678
|
+
switch (this._type) {
|
|
1679
|
+
case "square":
|
|
1680
|
+
o = this._drawSquare;
|
|
1681
|
+
break;
|
|
1682
|
+
case "dot":
|
|
1683
|
+
default:
|
|
1684
|
+
o = this._drawDot;
|
|
1685
|
+
}
|
|
1686
|
+
o.call(this, {
|
|
1687
|
+
x: t,
|
|
1688
|
+
y: e,
|
|
1689
|
+
size: r,
|
|
1690
|
+
rotation: n
|
|
1691
|
+
});
|
|
1692
|
+
}, t.prototype._rotateFigure = function (t) {
|
|
1693
|
+
var e,
|
|
1694
|
+
r = t.x,
|
|
1695
|
+
n = t.y,
|
|
1696
|
+
o = t.size,
|
|
1697
|
+
i = t.rotation,
|
|
1698
|
+
a = void 0 === i ? 0 : i,
|
|
1699
|
+
s = r + o / 2,
|
|
1700
|
+
u = n + o / 2;
|
|
1701
|
+
(0, t.draw)(), null === (e = this._element) || void 0 === e || e.setAttribute("transform", "rotate(" + 180 * a / Math.PI + "," + s + "," + u + ")");
|
|
1702
|
+
}, t.prototype._basicDot = function (t) {
|
|
1703
|
+
var e = this,
|
|
1704
|
+
r = t.size,
|
|
1705
|
+
n = t.x,
|
|
1706
|
+
o = t.y;
|
|
1707
|
+
this._rotateFigure(_g(_g({}, t), {
|
|
1708
|
+
draw: function draw() {
|
|
1709
|
+
e._element = document.createElementNS("http://www.w3.org/2000/svg", "circle"), e._element.setAttribute("cx", String(n + r / 2)), e._element.setAttribute("cy", String(o + r / 2)), e._element.setAttribute("r", String(r / 2));
|
|
1710
|
+
}
|
|
1711
|
+
}));
|
|
1712
|
+
}, t.prototype._basicSquare = function (t) {
|
|
1713
|
+
var e = this,
|
|
1714
|
+
r = t.size,
|
|
1715
|
+
n = t.x,
|
|
1716
|
+
o = t.y;
|
|
1717
|
+
this._rotateFigure(_g(_g({}, t), {
|
|
1718
|
+
draw: function draw() {
|
|
1719
|
+
e._element = document.createElementNS("http://www.w3.org/2000/svg", "rect"), e._element.setAttribute("x", String(n)), e._element.setAttribute("y", String(o)), e._element.setAttribute("width", String(r)), e._element.setAttribute("height", String(r));
|
|
1720
|
+
}
|
|
1721
|
+
}));
|
|
1722
|
+
}, t.prototype._drawDot = function (t) {
|
|
1723
|
+
var e = t.x,
|
|
1724
|
+
r = t.y,
|
|
1725
|
+
n = t.size,
|
|
1726
|
+
o = t.rotation;
|
|
1727
|
+
this._basicDot({
|
|
1728
|
+
x: e,
|
|
1729
|
+
y: r,
|
|
1730
|
+
size: n,
|
|
1731
|
+
rotation: o
|
|
1732
|
+
});
|
|
1733
|
+
}, t.prototype._drawSquare = function (t) {
|
|
1734
|
+
var e = t.x,
|
|
1735
|
+
r = t.y,
|
|
1736
|
+
n = t.size,
|
|
1737
|
+
o = t.rotation;
|
|
1738
|
+
this._basicSquare({
|
|
1739
|
+
x: e,
|
|
1740
|
+
y: r,
|
|
1741
|
+
size: n,
|
|
1742
|
+
rotation: o
|
|
1743
|
+
});
|
|
1744
|
+
}, t;
|
|
1745
|
+
}(),
|
|
1746
|
+
v = "circle";
|
|
1747
|
+
var w = function w(t, e, r, n) {
|
|
1748
|
+
return new (r || (r = Promise))(function (o, i) {
|
|
1749
|
+
function a(t) {
|
|
2250
1750
|
try {
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
switch (n = 0, o && (i = [2 & i[0], o.value]), i[0]) {
|
|
2254
|
-
case 0:
|
|
2255
|
-
case 1:
|
|
2256
|
-
o = i;
|
|
2257
|
-
break;
|
|
2258
|
-
|
|
2259
|
-
case 4:
|
|
2260
|
-
return a.label++, {
|
|
2261
|
-
value: i[1],
|
|
2262
|
-
done: !1
|
|
2263
|
-
};
|
|
2264
|
-
|
|
2265
|
-
case 5:
|
|
2266
|
-
a.label++, n = i[1], i = [0];
|
|
2267
|
-
continue;
|
|
2268
|
-
|
|
2269
|
-
case 7:
|
|
2270
|
-
i = a.ops.pop(), a.trys.pop();
|
|
2271
|
-
continue;
|
|
2272
|
-
|
|
2273
|
-
default:
|
|
2274
|
-
if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
|
|
2275
|
-
a = 0;
|
|
2276
|
-
continue;
|
|
2277
|
-
}
|
|
2278
|
-
|
|
2279
|
-
if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
|
|
2280
|
-
a.label = i[1];
|
|
2281
|
-
break;
|
|
2282
|
-
}
|
|
2283
|
-
|
|
2284
|
-
if (6 === i[0] && a.label < o[1]) {
|
|
2285
|
-
a.label = o[1], o = i;
|
|
2286
|
-
break;
|
|
2287
|
-
}
|
|
2288
|
-
|
|
2289
|
-
if (o && a.label < o[2]) {
|
|
2290
|
-
a.label = o[2], a.ops.push(i);
|
|
2291
|
-
break;
|
|
2292
|
-
}
|
|
2293
|
-
|
|
2294
|
-
o[2] && a.ops.pop(), a.trys.pop();
|
|
2295
|
-
continue;
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
|
-
i = e.call(t, a);
|
|
1751
|
+
u(n.next(t));
|
|
2299
1752
|
} catch (t) {
|
|
2300
|
-
i
|
|
2301
|
-
} finally {
|
|
2302
|
-
r = o = 0;
|
|
1753
|
+
i(t);
|
|
2303
1754
|
}
|
|
2304
1755
|
}
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
var _ = function () {
|
|
2319
|
-
function t(t) {
|
|
2320
|
-
this._element = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this._element.setAttribute("width", String(t.width)), this._element.setAttribute("height", String(t.height)), this._defs = document.createElementNS("http://www.w3.org/2000/svg", "defs"), this._element.appendChild(this._defs), this._options = t;
|
|
2321
|
-
}
|
|
2322
|
-
|
|
2323
|
-
return Object.defineProperty(t.prototype, "width", {
|
|
2324
|
-
get: function get() {
|
|
2325
|
-
return this._options.width;
|
|
2326
|
-
},
|
|
2327
|
-
enumerable: !1,
|
|
2328
|
-
configurable: !0
|
|
2329
|
-
}), Object.defineProperty(t.prototype, "height", {
|
|
2330
|
-
get: function get() {
|
|
2331
|
-
return this._options.height;
|
|
2332
|
-
},
|
|
2333
|
-
enumerable: !1,
|
|
2334
|
-
configurable: !0
|
|
2335
|
-
}), t.prototype.getElement = function () {
|
|
2336
|
-
return this._element;
|
|
2337
|
-
}, t.prototype.drawQR = function (t) {
|
|
2338
|
-
return w(this, void 0, void 0, function () {
|
|
2339
|
-
var e,
|
|
2340
|
-
r,
|
|
2341
|
-
n,
|
|
2342
|
-
o,
|
|
2343
|
-
i,
|
|
2344
|
-
a,
|
|
2345
|
-
s,
|
|
2346
|
-
u,
|
|
2347
|
-
c,
|
|
2348
|
-
l,
|
|
2349
|
-
d = this;
|
|
2350
|
-
return y(this, function (f) {
|
|
2351
|
-
switch (f.label) {
|
|
2352
|
-
case 0:
|
|
2353
|
-
return e = t.getModuleCount(), r = Math.min(this._options.width, this._options.height) - 2 * this._options.margin, n = this._options.shape === v ? r / Math.sqrt(2) : r, o = Math.floor(n / e), i = {
|
|
2354
|
-
hideXDots: 0,
|
|
2355
|
-
hideYDots: 0,
|
|
2356
|
-
width: 0,
|
|
2357
|
-
height: 0
|
|
2358
|
-
}, this._qr = t, this._options.image ? [4, this.loadImage()] : [3, 2];
|
|
2359
|
-
|
|
2360
|
-
case 1:
|
|
2361
|
-
if (f.sent(), !this._image) return [2];
|
|
2362
|
-
a = this._options, s = a.imageOptions, u = a.qrOptions, c = s.imageSize * h[u.errorCorrectionLevel], l = Math.floor(c * e * e), i = function (t) {
|
|
2363
|
-
var e = t.originalHeight,
|
|
2364
|
-
r = t.originalWidth,
|
|
2365
|
-
n = t.maxHiddenDots,
|
|
2366
|
-
o = t.maxHiddenAxisDots,
|
|
2367
|
-
i = t.dotSize,
|
|
2368
|
-
a = {
|
|
2369
|
-
x: 0,
|
|
2370
|
-
y: 0
|
|
2371
|
-
},
|
|
2372
|
-
s = {
|
|
2373
|
-
x: 0,
|
|
2374
|
-
y: 0
|
|
2375
|
-
};
|
|
2376
|
-
if (e <= 0 || r <= 0 || n <= 0 || i <= 0) return {
|
|
2377
|
-
height: 0,
|
|
2378
|
-
width: 0,
|
|
2379
|
-
hideYDots: 0,
|
|
2380
|
-
hideXDots: 0
|
|
2381
|
-
};
|
|
2382
|
-
var u = e / r;
|
|
2383
|
-
return a.x = Math.floor(Math.sqrt(n / u)), a.x <= 0 && (a.x = 1), o && o < a.x && (a.x = o), a.x % 2 == 0 && a.x--, s.x = a.x * i, a.y = 1 + 2 * Math.ceil((a.x * u - 1) / 2), s.y = Math.round(s.x * u), (a.y * a.x > n || o && o < a.y) && (o && o < a.y ? (a.y = o, a.y % 2 == 0 && a.x--) : a.y -= 2, s.y = a.y * i, a.x = 1 + 2 * Math.ceil((a.y / u - 1) / 2), s.x = Math.round(s.y / u)), {
|
|
2384
|
-
height: s.y,
|
|
2385
|
-
width: s.x,
|
|
2386
|
-
hideYDots: a.y,
|
|
2387
|
-
hideXDots: a.x
|
|
2388
|
-
};
|
|
2389
|
-
}({
|
|
2390
|
-
originalWidth: this._image.width,
|
|
2391
|
-
originalHeight: this._image.height,
|
|
2392
|
-
maxHiddenDots: l,
|
|
2393
|
-
maxHiddenAxisDots: e - 14,
|
|
2394
|
-
dotSize: o
|
|
2395
|
-
}), f.label = 2;
|
|
2396
|
-
|
|
2397
|
-
case 2:
|
|
2398
|
-
return this.drawBackground(), this.drawDots(function (t, r) {
|
|
2399
|
-
var n, o, a, s, u, h;
|
|
2400
|
-
return !(d._options.imageOptions.hideBackgroundDots && t >= (e - i.hideXDots) / 2 && t < (e + i.hideXDots) / 2 && r >= (e - i.hideYDots) / 2 && r < (e + i.hideYDots) / 2 || (null === (n = m[t]) || void 0 === n ? void 0 : n[r]) || (null === (o = m[t - e + 7]) || void 0 === o ? void 0 : o[r]) || (null === (a = m[t]) || void 0 === a ? void 0 : a[r - e + 7]) || (null === (s = b[t]) || void 0 === s ? void 0 : s[r]) || (null === (u = b[t - e + 7]) || void 0 === u ? void 0 : u[r]) || (null === (h = b[t]) || void 0 === h ? void 0 : h[r - e + 7]));
|
|
2401
|
-
}), this.drawCorners(), this._options.image ? [4, this.drawImage({
|
|
2402
|
-
width: i.width,
|
|
2403
|
-
height: i.height,
|
|
2404
|
-
count: e,
|
|
2405
|
-
dotSize: o
|
|
2406
|
-
})] : [3, 4];
|
|
2407
|
-
|
|
2408
|
-
case 3:
|
|
2409
|
-
f.sent(), f.label = 4;
|
|
2410
|
-
|
|
2411
|
-
case 4:
|
|
2412
|
-
return [2];
|
|
1756
|
+
function s(t) {
|
|
1757
|
+
try {
|
|
1758
|
+
u(n["throw"](t));
|
|
1759
|
+
} catch (t) {
|
|
1760
|
+
i(t);
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
function u(t) {
|
|
1764
|
+
var e;
|
|
1765
|
+
t.done ? o(t.value) : (e = t.value, e instanceof r ? e : new r(function (t) {
|
|
1766
|
+
t(e);
|
|
1767
|
+
})).then(a, s);
|
|
2413
1768
|
}
|
|
1769
|
+
u((n = n.apply(t, e || [])).next());
|
|
2414
1770
|
});
|
|
2415
|
-
}
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
}),
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
1771
|
+
},
|
|
1772
|
+
y = function y(t, e) {
|
|
1773
|
+
var r,
|
|
1774
|
+
n,
|
|
1775
|
+
o,
|
|
1776
|
+
i,
|
|
1777
|
+
a = {
|
|
1778
|
+
label: 0,
|
|
1779
|
+
sent: function sent() {
|
|
1780
|
+
if (1 & o[0]) throw o[1];
|
|
1781
|
+
return o[1];
|
|
1782
|
+
},
|
|
1783
|
+
trys: [],
|
|
1784
|
+
ops: []
|
|
1785
|
+
};
|
|
1786
|
+
return i = {
|
|
1787
|
+
next: s(0),
|
|
1788
|
+
"throw": s(1),
|
|
1789
|
+
"return": s(2)
|
|
1790
|
+
}, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
|
|
1791
|
+
return this;
|
|
1792
|
+
}), i;
|
|
1793
|
+
function s(i) {
|
|
1794
|
+
return function (s) {
|
|
1795
|
+
return function (i) {
|
|
1796
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
1797
|
+
for (; a;) try {
|
|
1798
|
+
if (r = 1, n && (o = 2 & i[0] ? n["return"] : i[0] ? n["throw"] || ((o = n["return"]) && o.call(n), 0) : n.next) && !(o = o.call(n, i[1])).done) return o;
|
|
1799
|
+
switch (n = 0, o && (i = [2 & i[0], o.value]), i[0]) {
|
|
1800
|
+
case 0:
|
|
1801
|
+
case 1:
|
|
1802
|
+
o = i;
|
|
1803
|
+
break;
|
|
1804
|
+
case 4:
|
|
1805
|
+
return a.label++, {
|
|
1806
|
+
value: i[1],
|
|
1807
|
+
done: !1
|
|
1808
|
+
};
|
|
1809
|
+
case 5:
|
|
1810
|
+
a.label++, n = i[1], i = [0];
|
|
1811
|
+
continue;
|
|
1812
|
+
case 7:
|
|
1813
|
+
i = a.ops.pop(), a.trys.pop();
|
|
1814
|
+
continue;
|
|
1815
|
+
default:
|
|
1816
|
+
if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
|
|
1817
|
+
a = 0;
|
|
1818
|
+
continue;
|
|
1819
|
+
}
|
|
1820
|
+
if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
|
|
1821
|
+
a.label = i[1];
|
|
1822
|
+
break;
|
|
1823
|
+
}
|
|
1824
|
+
if (6 === i[0] && a.label < o[1]) {
|
|
1825
|
+
a.label = o[1], o = i;
|
|
1826
|
+
break;
|
|
1827
|
+
}
|
|
1828
|
+
if (o && a.label < o[2]) {
|
|
1829
|
+
a.label = o[2], a.ops.push(i);
|
|
1830
|
+
break;
|
|
1831
|
+
}
|
|
1832
|
+
o[2] && a.ops.pop(), a.trys.pop();
|
|
1833
|
+
continue;
|
|
1834
|
+
}
|
|
1835
|
+
i = e.call(t, a);
|
|
1836
|
+
} catch (t) {
|
|
1837
|
+
i = [6, t], n = 0;
|
|
1838
|
+
} finally {
|
|
1839
|
+
r = o = 0;
|
|
1840
|
+
}
|
|
1841
|
+
if (5 & i[0]) throw i[1];
|
|
1842
|
+
return {
|
|
1843
|
+
value: i[0] ? i[1] : void 0,
|
|
1844
|
+
done: !0
|
|
1845
|
+
};
|
|
1846
|
+
}([i, s]);
|
|
1847
|
+
};
|
|
2479
1848
|
}
|
|
2480
|
-
},
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
y = i + 2 * w,
|
|
2487
|
-
m = h - w * u,
|
|
2488
|
-
b = c - w * u,
|
|
2489
|
-
_ = [],
|
|
2490
|
-
x = Math.floor(y / 2);
|
|
2491
|
-
|
|
2492
|
-
for (p = 0; p < y; p++) {
|
|
2493
|
-
_[p] = [];
|
|
2494
|
-
|
|
2495
|
-
for (var S = 0; S < y; S++) {
|
|
2496
|
-
p >= w - 1 && p <= y - w && S >= w - 1 && S <= y - w || Math.sqrt((p - x) * (p - x) + (S - x) * (S - x)) > x ? _[p][S] = 0 : _[p][S] = this._qr.isDark(S - 2 * w < 0 ? S : S >= i ? S - 2 * w : S - w, p - 2 * w < 0 ? p : p >= i ? p - 2 * w : p - w) ? 1 : 0;
|
|
2497
|
-
}
|
|
1849
|
+
},
|
|
1850
|
+
m = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]],
|
|
1851
|
+
b = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]];
|
|
1852
|
+
var _ = function () {
|
|
1853
|
+
function t(t) {
|
|
1854
|
+
this._element = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this._element.setAttribute("width", String(t.width)), this._element.setAttribute("height", String(t.height)), this._defs = document.createElementNS("http://www.w3.org/2000/svg", "defs"), this._element.appendChild(this._defs), this._options = t;
|
|
2498
1855
|
}
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
1856
|
+
return Object.defineProperty(t.prototype, "width", {
|
|
1857
|
+
get: function get() {
|
|
1858
|
+
return this._options.width;
|
|
1859
|
+
},
|
|
1860
|
+
enumerable: !1,
|
|
1861
|
+
configurable: !0
|
|
1862
|
+
}), Object.defineProperty(t.prototype, "height", {
|
|
1863
|
+
get: function get() {
|
|
1864
|
+
return this._options.height;
|
|
1865
|
+
},
|
|
1866
|
+
enumerable: !1,
|
|
1867
|
+
configurable: !0
|
|
1868
|
+
}), t.prototype.getElement = function () {
|
|
1869
|
+
return this._element;
|
|
1870
|
+
}, t.prototype.drawQR = function (t) {
|
|
1871
|
+
return w(this, void 0, void 0, function () {
|
|
1872
|
+
var e,
|
|
1873
|
+
r,
|
|
1874
|
+
n,
|
|
1875
|
+
o,
|
|
1876
|
+
i,
|
|
1877
|
+
a,
|
|
1878
|
+
s,
|
|
1879
|
+
u,
|
|
1880
|
+
c,
|
|
1881
|
+
l,
|
|
1882
|
+
d = this;
|
|
1883
|
+
return y(this, function (f) {
|
|
1884
|
+
switch (f.label) {
|
|
1885
|
+
case 0:
|
|
1886
|
+
return e = t.getModuleCount(), r = Math.min(this._options.width, this._options.height) - 2 * this._options.margin, n = this._options.shape === v ? r / Math.sqrt(2) : r, o = Math.floor(n / e), i = {
|
|
1887
|
+
hideXDots: 0,
|
|
1888
|
+
hideYDots: 0,
|
|
1889
|
+
width: 0,
|
|
1890
|
+
height: 0
|
|
1891
|
+
}, this._qr = t, this._options.image ? [4, this.loadImage()] : [3, 2];
|
|
1892
|
+
case 1:
|
|
1893
|
+
if (f.sent(), !this._image) return [2];
|
|
1894
|
+
a = this._options, s = a.imageOptions, u = a.qrOptions, c = s.imageSize * h[u.errorCorrectionLevel], l = Math.floor(c * e * e), i = function (t) {
|
|
1895
|
+
var e = t.originalHeight,
|
|
1896
|
+
r = t.originalWidth,
|
|
1897
|
+
n = t.maxHiddenDots,
|
|
1898
|
+
o = t.maxHiddenAxisDots,
|
|
1899
|
+
i = t.dotSize,
|
|
1900
|
+
a = {
|
|
1901
|
+
x: 0,
|
|
1902
|
+
y: 0
|
|
1903
|
+
},
|
|
1904
|
+
s = {
|
|
1905
|
+
x: 0,
|
|
1906
|
+
y: 0
|
|
1907
|
+
};
|
|
1908
|
+
if (e <= 0 || r <= 0 || n <= 0 || i <= 0) return {
|
|
1909
|
+
height: 0,
|
|
1910
|
+
width: 0,
|
|
1911
|
+
hideYDots: 0,
|
|
1912
|
+
hideXDots: 0
|
|
1913
|
+
};
|
|
1914
|
+
var u = e / r;
|
|
1915
|
+
return a.x = Math.floor(Math.sqrt(n / u)), a.x <= 0 && (a.x = 1), o && o < a.x && (a.x = o), a.x % 2 == 0 && a.x--, s.x = a.x * i, a.y = 1 + 2 * Math.ceil((a.x * u - 1) / 2), s.y = Math.round(s.x * u), (a.y * a.x > n || o && o < a.y) && (o && o < a.y ? (a.y = o, a.y % 2 == 0 && a.x--) : a.y -= 2, s.y = a.y * i, a.x = 1 + 2 * Math.ceil((a.y / u - 1) / 2), s.x = Math.round(s.y / u)), {
|
|
1916
|
+
height: s.y,
|
|
1917
|
+
width: s.x,
|
|
1918
|
+
hideYDots: a.y,
|
|
1919
|
+
hideXDots: a.x
|
|
1920
|
+
};
|
|
1921
|
+
}({
|
|
1922
|
+
originalWidth: this._image.width,
|
|
1923
|
+
originalHeight: this._image.height,
|
|
1924
|
+
maxHiddenDots: l,
|
|
1925
|
+
maxHiddenAxisDots: e - 14,
|
|
1926
|
+
dotSize: o
|
|
1927
|
+
}), f.label = 2;
|
|
1928
|
+
case 2:
|
|
1929
|
+
return this.drawBackground(), this.drawDots(function (t, r) {
|
|
1930
|
+
var n, o, a, s, u, h;
|
|
1931
|
+
return !(d._options.imageOptions.hideBackgroundDots && t >= (e - i.hideXDots) / 2 && t < (e + i.hideXDots) / 2 && r >= (e - i.hideYDots) / 2 && r < (e + i.hideYDots) / 2 || (null === (n = m[t]) || void 0 === n ? void 0 : n[r]) || (null === (o = m[t - e + 7]) || void 0 === o ? void 0 : o[r]) || (null === (a = m[t]) || void 0 === a ? void 0 : a[r - e + 7]) || (null === (s = b[t]) || void 0 === s ? void 0 : s[r]) || (null === (u = b[t - e + 7]) || void 0 === u ? void 0 : u[r]) || (null === (h = b[t]) || void 0 === h ? void 0 : h[r - e + 7]));
|
|
1932
|
+
}), this.drawCorners(), this._options.image ? [4, this.drawImage({
|
|
1933
|
+
width: i.width,
|
|
1934
|
+
height: i.height,
|
|
1935
|
+
count: e,
|
|
1936
|
+
dotSize: o
|
|
1937
|
+
})] : [3, 4];
|
|
1938
|
+
case 3:
|
|
1939
|
+
f.sent(), f.label = 4;
|
|
1940
|
+
case 4:
|
|
1941
|
+
return [2];
|
|
1942
|
+
}
|
|
1943
|
+
});
|
|
1944
|
+
});
|
|
1945
|
+
}, t.prototype.drawBackground = function () {
|
|
1946
|
+
var t,
|
|
1947
|
+
e,
|
|
1948
|
+
r,
|
|
1949
|
+
n = this._element,
|
|
1950
|
+
o = this._options;
|
|
1951
|
+
if (n) {
|
|
1952
|
+
var i = null === (t = o.backgroundOptions) || void 0 === t ? void 0 : t.gradient,
|
|
1953
|
+
a = null === (e = o.backgroundOptions) || void 0 === e ? void 0 : e.color;
|
|
1954
|
+
if ((i || a) && this._createColor({
|
|
1955
|
+
options: i,
|
|
1956
|
+
color: a,
|
|
1957
|
+
additionalRotation: 0,
|
|
1958
|
+
x: 0,
|
|
1959
|
+
y: 0,
|
|
1960
|
+
height: o.height,
|
|
1961
|
+
width: o.width,
|
|
1962
|
+
name: "background-color"
|
|
1963
|
+
}), null === (r = o.backgroundOptions) || void 0 === r ? void 0 : r.round) {
|
|
1964
|
+
var s = Math.min(o.width, o.height),
|
|
1965
|
+
u = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1966
|
+
this._backgroundClipPath = document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", "clip-path-background-color"), this._defs.appendChild(this._backgroundClipPath), u.setAttribute("x", String((o.width - s) / 2)), u.setAttribute("y", String((o.height - s) / 2)), u.setAttribute("width", String(s)), u.setAttribute("height", String(s)), u.setAttribute("rx", String(s / 2 * o.backgroundOptions.round)), this._backgroundClipPath.appendChild(u);
|
|
1967
|
+
}
|
|
2509
1968
|
}
|
|
2510
|
-
},
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
d,
|
|
2537
|
-
g,
|
|
2538
|
-
v,
|
|
2539
|
-
w,
|
|
2540
|
-
y,
|
|
2541
|
-
_,
|
|
2542
|
-
x,
|
|
2543
|
-
S,
|
|
2544
|
-
M,
|
|
2545
|
-
C,
|
|
2546
|
-
A = e[0],
|
|
2547
|
-
k = e[1],
|
|
2548
|
-
O = e[2],
|
|
2549
|
-
D = h + A * a * (n - 7),
|
|
2550
|
-
P = c + k * a * (n - 7),
|
|
2551
|
-
z = t._dotsClipPath,
|
|
2552
|
-
B = t._dotsClipPath;
|
|
2553
|
-
|
|
2554
|
-
if (((null === (o = r.cornersSquareOptions) || void 0 === o ? void 0 : o.gradient) || (null === (i = r.cornersSquareOptions) || void 0 === i ? void 0 : i.color)) && ((z = document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id", "clip-path-corners-square-color-" + A + "-" + k), t._defs.appendChild(z), t._cornersSquareClipPath = t._cornersDotClipPath = B = z, t._createColor({
|
|
2555
|
-
options: null === (d = r.cornersSquareOptions) || void 0 === d ? void 0 : d.gradient,
|
|
2556
|
-
color: null === (g = r.cornersSquareOptions) || void 0 === g ? void 0 : g.color,
|
|
2557
|
-
additionalRotation: O,
|
|
2558
|
-
x: D,
|
|
2559
|
-
y: P,
|
|
2560
|
-
height: s,
|
|
2561
|
-
width: s,
|
|
2562
|
-
name: "corners-square-color-" + A + "-" + k
|
|
2563
|
-
})), null === (v = r.cornersSquareOptions) || void 0 === v ? void 0 : v.type) {
|
|
2564
|
-
var q = new f({
|
|
2565
|
-
svg: t._element,
|
|
2566
|
-
type: r.cornersSquareOptions.type
|
|
1969
|
+
}, t.prototype.drawDots = function (t) {
|
|
1970
|
+
var e,
|
|
1971
|
+
r,
|
|
1972
|
+
n = this;
|
|
1973
|
+
if (!this._qr) throw "QR code is not defined";
|
|
1974
|
+
var o = this._options,
|
|
1975
|
+
i = this._qr.getModuleCount();
|
|
1976
|
+
if (i > o.width || i > o.height) throw "The canvas is too small.";
|
|
1977
|
+
var a = Math.min(o.width, o.height) - 2 * o.margin,
|
|
1978
|
+
s = o.shape === v ? a / Math.sqrt(2) : a,
|
|
1979
|
+
u = Math.floor(s / i),
|
|
1980
|
+
h = Math.floor((o.width - i * u) / 2),
|
|
1981
|
+
c = Math.floor((o.height - i * u) / 2),
|
|
1982
|
+
d = new l({
|
|
1983
|
+
svg: this._element,
|
|
1984
|
+
type: o.dotsOptions.type
|
|
1985
|
+
});
|
|
1986
|
+
this._dotsClipPath = document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._dotsClipPath.setAttribute("id", "clip-path-dot-color"), this._defs.appendChild(this._dotsClipPath), this._createColor({
|
|
1987
|
+
options: null === (e = o.dotsOptions) || void 0 === e ? void 0 : e.gradient,
|
|
1988
|
+
color: o.dotsOptions.color,
|
|
1989
|
+
additionalRotation: 0,
|
|
1990
|
+
x: 0,
|
|
1991
|
+
y: 0,
|
|
1992
|
+
height: o.height,
|
|
1993
|
+
width: o.width,
|
|
1994
|
+
name: "dot-color"
|
|
2567
1995
|
});
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
1996
|
+
for (var f = function f(e) {
|
|
1997
|
+
for (var o = function o(_o) {
|
|
1998
|
+
return t && !t(e, _o) ? "continue" : (null === (r = g._qr) || void 0 === r ? void 0 : r.isDark(e, _o)) ? (d.draw(h + e * u, c + _o * u, u, function (r, a) {
|
|
1999
|
+
return !(e + r < 0 || _o + a < 0 || e + r >= i || _o + a >= i) && !(t && !t(e + r, _o + a)) && !!n._qr && n._qr.isDark(e + r, _o + a);
|
|
2000
|
+
}), void (d._element && g._dotsClipPath && g._dotsClipPath.appendChild(d._element))) : "continue";
|
|
2001
|
+
}, a = 0; a < i; a++) o(a);
|
|
2002
|
+
}, g = this, p = 0; p < i; p++) f(p);
|
|
2003
|
+
if (o.shape === v) {
|
|
2004
|
+
var w = Math.floor((a / u - i) / 2),
|
|
2005
|
+
y = i + 2 * w,
|
|
2006
|
+
m = h - w * u,
|
|
2007
|
+
b = c - w * u,
|
|
2008
|
+
_ = [],
|
|
2009
|
+
x = Math.floor(y / 2);
|
|
2010
|
+
for (p = 0; p < y; p++) {
|
|
2011
|
+
_[p] = [];
|
|
2012
|
+
for (var S = 0; S < y; S++) p >= w - 1 && p <= y - w && S >= w - 1 && S <= y - w || Math.sqrt((p - x) * (p - x) + (S - x) * (S - x)) > x ? _[p][S] = 0 : _[p][S] = this._qr.isDark(S - 2 * w < 0 ? S : S >= i ? S - 2 * w : S - w, p - 2 * w < 0 ? p : p >= i ? p - 2 * w : p - w) ? 1 : 0;
|
|
2013
|
+
}
|
|
2014
|
+
var M = function M(t) {
|
|
2015
|
+
for (var e = function e(_e2) {
|
|
2016
|
+
if (!_[t][_e2]) return "continue";
|
|
2017
|
+
d.draw(m + t * u, b + _e2 * u, u, function (r, n) {
|
|
2018
|
+
var o;
|
|
2019
|
+
return !!(null === (o = _[t + r]) || void 0 === o ? void 0 : o[_e2 + n]);
|
|
2020
|
+
}), d._element && C._dotsClipPath && C._dotsClipPath.appendChild(d._element);
|
|
2021
|
+
}, r = 0; r < y; r++) e(r);
|
|
2022
|
+
},
|
|
2023
|
+
C = this;
|
|
2024
|
+
for (p = 0; p < y; p++) M(p);
|
|
2581
2025
|
}
|
|
2582
|
-
},
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2026
|
+
}, t.prototype.drawCorners = function () {
|
|
2027
|
+
var t = this;
|
|
2028
|
+
if (!this._qr) throw "QR code is not defined";
|
|
2029
|
+
var e = this._element,
|
|
2030
|
+
r = this._options;
|
|
2031
|
+
if (!e) throw "Element code is not defined";
|
|
2032
|
+
var n = this._qr.getModuleCount(),
|
|
2033
|
+
o = Math.min(r.width, r.height) - 2 * r.margin,
|
|
2034
|
+
i = r.shape === v ? o / Math.sqrt(2) : o,
|
|
2035
|
+
a = Math.floor(i / n),
|
|
2036
|
+
s = 7 * a,
|
|
2037
|
+
u = 3 * a,
|
|
2038
|
+
h = Math.floor((r.width - n * a) / 2),
|
|
2039
|
+
c = Math.floor((r.height - n * a) / 2);
|
|
2040
|
+
[[0, 0, 0], [1, 0, Math.PI / 2], [0, 1, -Math.PI / 2]].forEach(function (e) {
|
|
2041
|
+
var o,
|
|
2042
|
+
i,
|
|
2043
|
+
d,
|
|
2044
|
+
g,
|
|
2045
|
+
v,
|
|
2046
|
+
w,
|
|
2047
|
+
y,
|
|
2048
|
+
_,
|
|
2049
|
+
x,
|
|
2050
|
+
S,
|
|
2051
|
+
M,
|
|
2052
|
+
C,
|
|
2053
|
+
A = e[0],
|
|
2054
|
+
k = e[1],
|
|
2055
|
+
O = e[2],
|
|
2056
|
+
D = h + A * a * (n - 7),
|
|
2057
|
+
P = c + k * a * (n - 7),
|
|
2058
|
+
z = t._dotsClipPath,
|
|
2059
|
+
B = t._dotsClipPath;
|
|
2060
|
+
if (((null === (o = r.cornersSquareOptions) || void 0 === o ? void 0 : o.gradient) || (null === (i = r.cornersSquareOptions) || void 0 === i ? void 0 : i.color)) && ((z = document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id", "clip-path-corners-square-color-" + A + "-" + k), t._defs.appendChild(z), t._cornersSquareClipPath = t._cornersDotClipPath = B = z, t._createColor({
|
|
2061
|
+
options: null === (d = r.cornersSquareOptions) || void 0 === d ? void 0 : d.gradient,
|
|
2062
|
+
color: null === (g = r.cornersSquareOptions) || void 0 === g ? void 0 : g.color,
|
|
2063
|
+
additionalRotation: O,
|
|
2064
|
+
x: D,
|
|
2065
|
+
y: P,
|
|
2066
|
+
height: s,
|
|
2067
|
+
width: s,
|
|
2068
|
+
name: "corners-square-color-" + A + "-" + k
|
|
2069
|
+
})), null === (v = r.cornersSquareOptions) || void 0 === v ? void 0 : v.type) {
|
|
2070
|
+
var q = new f({
|
|
2071
|
+
svg: t._element,
|
|
2072
|
+
type: r.cornersSquareOptions.type
|
|
2073
|
+
});
|
|
2074
|
+
q.draw(D, P, s, O), q._element && z && z.appendChild(q._element);
|
|
2075
|
+
} else for (var I = new l({
|
|
2076
|
+
svg: t._element,
|
|
2077
|
+
type: r.dotsOptions.type
|
|
2078
|
+
}), E = function E(t) {
|
|
2079
|
+
for (var e = function e(_e3) {
|
|
2080
|
+
if (!(null === (w = m[t]) || void 0 === w ? void 0 : w[_e3])) return "continue";
|
|
2081
|
+
I.draw(D + t * a, P + _e3 * a, a, function (r, n) {
|
|
2082
|
+
var o;
|
|
2083
|
+
return !!(null === (o = m[t + r]) || void 0 === o ? void 0 : o[_e3 + n]);
|
|
2084
|
+
}), I._element && z && z.appendChild(I._element);
|
|
2085
|
+
}, r = 0; r < m[t].length; r++) e(r);
|
|
2086
|
+
}, L = 0; L < m.length; L++) E(L);
|
|
2087
|
+
if (((null === (y = r.cornersDotOptions) || void 0 === y ? void 0 : y.gradient) || (null === (_ = r.cornersDotOptions) || void 0 === _ ? void 0 : _.color)) && ((B = document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id", "clip-path-corners-dot-color-" + A + "-" + k), t._defs.appendChild(B), t._cornersDotClipPath = B, t._createColor({
|
|
2088
|
+
options: null === (x = r.cornersDotOptions) || void 0 === x ? void 0 : x.gradient,
|
|
2089
|
+
color: null === (S = r.cornersDotOptions) || void 0 === S ? void 0 : S.color,
|
|
2090
|
+
additionalRotation: O,
|
|
2091
|
+
x: D + 2 * a,
|
|
2092
|
+
y: P + 2 * a,
|
|
2093
|
+
height: u,
|
|
2094
|
+
width: u,
|
|
2095
|
+
name: "corners-dot-color-" + A + "-" + k
|
|
2096
|
+
})), null === (M = r.cornersDotOptions) || void 0 === M ? void 0 : M.type) {
|
|
2097
|
+
var R = new p({
|
|
2098
|
+
svg: t._element,
|
|
2099
|
+
type: r.cornersDotOptions.type
|
|
2100
|
+
});
|
|
2101
|
+
R.draw(D + 2 * a, P + 2 * a, u, O), R._element && B && B.appendChild(R._element);
|
|
2102
|
+
} else {
|
|
2103
|
+
I = new l({
|
|
2104
|
+
svg: t._element,
|
|
2105
|
+
type: r.dotsOptions.type
|
|
2106
|
+
});
|
|
2107
|
+
var N = function N(t) {
|
|
2108
|
+
for (var e = function e(_e4) {
|
|
2109
|
+
if (!(null === (C = b[t]) || void 0 === C ? void 0 : C[_e4])) return "continue";
|
|
2110
|
+
I.draw(D + t * a, P + _e4 * a, a, function (r, n) {
|
|
2111
|
+
var o;
|
|
2112
|
+
return !!(null === (o = b[t + r]) || void 0 === o ? void 0 : o[_e4 + n]);
|
|
2113
|
+
}), I._element && B && B.appendChild(I._element);
|
|
2114
|
+
}, r = 0; r < b[t].length; r++) e(r);
|
|
2115
|
+
};
|
|
2116
|
+
for (L = 0; L < b.length; L++) N(L);
|
|
2117
|
+
}
|
|
2599
2118
|
});
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2119
|
+
}, t.prototype.loadImage = function () {
|
|
2120
|
+
var t = this;
|
|
2121
|
+
return new Promise(function (e, r) {
|
|
2122
|
+
var n = t._options,
|
|
2123
|
+
o = new Image();
|
|
2124
|
+
if (!n.image) return r("Image is not defined");
|
|
2125
|
+
"string" == typeof n.imageOptions.crossOrigin && (o.crossOrigin = n.imageOptions.crossOrigin), t._image = o, o.onload = function () {
|
|
2126
|
+
e();
|
|
2127
|
+
}, o.src = n.image;
|
|
2605
2128
|
});
|
|
2606
|
-
|
|
2607
|
-
var
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2129
|
+
}, t.prototype.drawImage = function (t) {
|
|
2130
|
+
var e = t.width,
|
|
2131
|
+
r = t.height,
|
|
2132
|
+
n = t.count,
|
|
2133
|
+
o = t.dotSize;
|
|
2134
|
+
return w(this, void 0, void 0, function () {
|
|
2135
|
+
var t, i, a, s, h, c, l, d, f;
|
|
2136
|
+
return y(this, function (g) {
|
|
2137
|
+
switch (g.label) {
|
|
2138
|
+
case 0:
|
|
2139
|
+
return t = this._options, i = Math.floor((t.width - n * o) / 2), a = Math.floor((t.height - n * o) / 2), s = i + t.imageOptions.margin + (n * o - e) / 2, h = a + t.imageOptions.margin + (n * o - r) / 2, c = e - 2 * t.imageOptions.margin, l = r - 2 * t.imageOptions.margin, (d = document.createElementNS("http://www.w3.org/2000/svg", "image")).setAttribute("x", String(s)), d.setAttribute("y", String(h)), d.setAttribute("width", c + "px"), d.setAttribute("height", l + "px"), [4, u(t.image || "")];
|
|
2140
|
+
case 1:
|
|
2141
|
+
return f = g.sent(), d.setAttribute("href", f || ""), this._element.appendChild(d), [2];
|
|
2142
|
+
}
|
|
2143
|
+
});
|
|
2144
|
+
});
|
|
2145
|
+
}, t.prototype._createColor = function (t) {
|
|
2146
|
+
var e = t.options,
|
|
2147
|
+
r = t.color,
|
|
2148
|
+
n = t.additionalRotation,
|
|
2149
|
+
o = t.x,
|
|
2150
|
+
i = t.y,
|
|
2151
|
+
a = t.height,
|
|
2152
|
+
s = t.width,
|
|
2153
|
+
u = t.name,
|
|
2154
|
+
h = s > a ? s : a,
|
|
2155
|
+
c = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2156
|
+
if (c.setAttribute("x", String(o)), c.setAttribute("y", String(i)), c.setAttribute("height", String(a)), c.setAttribute("width", String(s)), c.setAttribute("clip-path", "url('#clip-path-" + u + "')"), e) {
|
|
2157
|
+
var l;
|
|
2158
|
+
if ("radial" === e.type) (l = document.createElementNS("http://www.w3.org/2000/svg", "radialGradient")).setAttribute("id", u), l.setAttribute("gradientUnits", "userSpaceOnUse"), l.setAttribute("fx", String(o + s / 2)), l.setAttribute("fy", String(i + a / 2)), l.setAttribute("cx", String(o + s / 2)), l.setAttribute("cy", String(i + a / 2)), l.setAttribute("r", String(h / 2));else {
|
|
2159
|
+
var d = ((e.rotation || 0) + n) % (2 * Math.PI),
|
|
2160
|
+
f = (d + 2 * Math.PI) % (2 * Math.PI),
|
|
2161
|
+
g = o + s / 2,
|
|
2162
|
+
p = i + a / 2,
|
|
2163
|
+
v = o + s / 2,
|
|
2164
|
+
w = i + a / 2;
|
|
2165
|
+
f >= 0 && f <= .25 * Math.PI || f > 1.75 * Math.PI && f <= 2 * Math.PI ? (g -= s / 2, p -= a / 2 * Math.tan(d), v += s / 2, w += a / 2 * Math.tan(d)) : f > .25 * Math.PI && f <= .75 * Math.PI ? (p -= a / 2, g -= s / 2 / Math.tan(d), w += a / 2, v += s / 2 / Math.tan(d)) : f > .75 * Math.PI && f <= 1.25 * Math.PI ? (g += s / 2, p += a / 2 * Math.tan(d), v -= s / 2, w -= a / 2 * Math.tan(d)) : f > 1.25 * Math.PI && f <= 1.75 * Math.PI && (p += a / 2, g += s / 2 / Math.tan(d), w -= a / 2, v -= s / 2 / Math.tan(d)), (l = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient")).setAttribute("id", u), l.setAttribute("gradientUnits", "userSpaceOnUse"), l.setAttribute("x1", String(Math.round(g))), l.setAttribute("y1", String(Math.round(p))), l.setAttribute("x2", String(Math.round(v))), l.setAttribute("y2", String(Math.round(w)));
|
|
2616
2166
|
}
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
var n = t._options,
|
|
2628
|
-
o = new Image();
|
|
2629
|
-
if (!n.image) return r("Image is not defined");
|
|
2630
|
-
"string" == typeof n.imageOptions.crossOrigin && (o.crossOrigin = n.imageOptions.crossOrigin), t._image = o, o.onload = function () {
|
|
2631
|
-
e();
|
|
2632
|
-
}, o.src = n.image;
|
|
2633
|
-
});
|
|
2634
|
-
}, t.prototype.drawImage = function (t) {
|
|
2635
|
-
var e = t.width,
|
|
2636
|
-
r = t.height,
|
|
2637
|
-
n = t.count,
|
|
2638
|
-
o = t.dotSize;
|
|
2639
|
-
return w(this, void 0, void 0, function () {
|
|
2640
|
-
var t, i, a, s, h, c, l, d, f;
|
|
2641
|
-
return y(this, function (g) {
|
|
2642
|
-
switch (g.label) {
|
|
2643
|
-
case 0:
|
|
2644
|
-
return t = this._options, i = Math.floor((t.width - n * o) / 2), a = Math.floor((t.height - n * o) / 2), s = i + t.imageOptions.margin + (n * o - e) / 2, h = a + t.imageOptions.margin + (n * o - r) / 2, c = e - 2 * t.imageOptions.margin, l = r - 2 * t.imageOptions.margin, (d = document.createElementNS("http://www.w3.org/2000/svg", "image")).setAttribute("x", String(s)), d.setAttribute("y", String(h)), d.setAttribute("width", c + "px"), d.setAttribute("height", l + "px"), [4, u(t.image || "")];
|
|
2645
|
-
|
|
2646
|
-
case 1:
|
|
2647
|
-
return f = g.sent(), d.setAttribute("href", f || ""), this._element.appendChild(d), [2];
|
|
2648
|
-
}
|
|
2649
|
-
});
|
|
2650
|
-
});
|
|
2651
|
-
}, t.prototype._createColor = function (t) {
|
|
2652
|
-
var e = t.options,
|
|
2653
|
-
r = t.color,
|
|
2654
|
-
n = t.additionalRotation,
|
|
2655
|
-
o = t.x,
|
|
2656
|
-
i = t.y,
|
|
2657
|
-
a = t.height,
|
|
2658
|
-
s = t.width,
|
|
2659
|
-
u = t.name,
|
|
2660
|
-
h = s > a ? s : a,
|
|
2661
|
-
c = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2662
|
-
|
|
2663
|
-
if (c.setAttribute("x", String(o)), c.setAttribute("y", String(i)), c.setAttribute("height", String(a)), c.setAttribute("width", String(s)), c.setAttribute("clip-path", "url('#clip-path-" + u + "')"), e) {
|
|
2664
|
-
var l;
|
|
2665
|
-
if ("radial" === e.type) (l = document.createElementNS("http://www.w3.org/2000/svg", "radialGradient")).setAttribute("id", u), l.setAttribute("gradientUnits", "userSpaceOnUse"), l.setAttribute("fx", String(o + s / 2)), l.setAttribute("fy", String(i + a / 2)), l.setAttribute("cx", String(o + s / 2)), l.setAttribute("cy", String(i + a / 2)), l.setAttribute("r", String(h / 2));else {
|
|
2666
|
-
var d = ((e.rotation || 0) + n) % (2 * Math.PI),
|
|
2667
|
-
f = (d + 2 * Math.PI) % (2 * Math.PI),
|
|
2668
|
-
g = o + s / 2,
|
|
2669
|
-
p = i + a / 2,
|
|
2670
|
-
v = o + s / 2,
|
|
2671
|
-
w = i + a / 2;
|
|
2672
|
-
f >= 0 && f <= .25 * Math.PI || f > 1.75 * Math.PI && f <= 2 * Math.PI ? (g -= s / 2, p -= a / 2 * Math.tan(d), v += s / 2, w += a / 2 * Math.tan(d)) : f > .25 * Math.PI && f <= .75 * Math.PI ? (p -= a / 2, g -= s / 2 / Math.tan(d), w += a / 2, v += s / 2 / Math.tan(d)) : f > .75 * Math.PI && f <= 1.25 * Math.PI ? (g += s / 2, p += a / 2 * Math.tan(d), v -= s / 2, w -= a / 2 * Math.tan(d)) : f > 1.25 * Math.PI && f <= 1.75 * Math.PI && (p += a / 2, g += s / 2 / Math.tan(d), w -= a / 2, v -= s / 2 / Math.tan(d)), (l = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient")).setAttribute("id", u), l.setAttribute("gradientUnits", "userSpaceOnUse"), l.setAttribute("x1", String(Math.round(g))), l.setAttribute("y1", String(Math.round(p))), l.setAttribute("x2", String(Math.round(v))), l.setAttribute("y2", String(Math.round(w)));
|
|
2673
|
-
}
|
|
2674
|
-
e.colorStops.forEach(function (t) {
|
|
2675
|
-
var e = t.offset,
|
|
2676
|
-
r = t.color,
|
|
2677
|
-
n = document.createElementNS("http://www.w3.org/2000/svg", "stop");
|
|
2678
|
-
n.setAttribute("offset", 100 * e + "%"), n.setAttribute("stop-color", r), l.appendChild(n);
|
|
2679
|
-
}), c.setAttribute("fill", "url('#" + u + "')"), this._defs.appendChild(l);
|
|
2680
|
-
} else r && c.setAttribute("fill", r);
|
|
2681
|
-
|
|
2682
|
-
this._element.appendChild(c);
|
|
2683
|
-
}, t;
|
|
2684
|
-
}(),
|
|
2167
|
+
e.colorStops.forEach(function (t) {
|
|
2168
|
+
var e = t.offset,
|
|
2169
|
+
r = t.color,
|
|
2170
|
+
n = document.createElementNS("http://www.w3.org/2000/svg", "stop");
|
|
2171
|
+
n.setAttribute("offset", 100 * e + "%"), n.setAttribute("stop-color", r), l.appendChild(n);
|
|
2172
|
+
}), c.setAttribute("fill", "url('#" + u + "')"), this._defs.appendChild(l);
|
|
2173
|
+
} else r && c.setAttribute("fill", r);
|
|
2174
|
+
this._element.appendChild(c);
|
|
2175
|
+
}, t;
|
|
2176
|
+
}(),
|
|
2685
2177
|
x = "canvas";
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
},
|
|
2713
|
-
backgroundOptions: {
|
|
2714
|
-
round: 0,
|
|
2715
|
-
color: "#fff"
|
|
2716
|
-
}
|
|
2717
|
-
};
|
|
2718
|
-
|
|
2719
|
-
var _A = function A() {
|
|
2720
|
-
return (_A = Object.assign || function (t) {
|
|
2721
|
-
for (var e, r = 1, n = arguments.length; r < n; r++) {
|
|
2722
|
-
for (var o in e = arguments[r]) {
|
|
2723
|
-
Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
2724
|
-
}
|
|
2178
|
+
for (var S = {}, M = 0; M <= 40; M++) S[M] = M;
|
|
2179
|
+
var C = {
|
|
2180
|
+
type: x,
|
|
2181
|
+
shape: "square",
|
|
2182
|
+
width: 300,
|
|
2183
|
+
height: 300,
|
|
2184
|
+
data: "",
|
|
2185
|
+
margin: 0,
|
|
2186
|
+
qrOptions: {
|
|
2187
|
+
typeNumber: S[0],
|
|
2188
|
+
mode: void 0,
|
|
2189
|
+
errorCorrectionLevel: "Q"
|
|
2190
|
+
},
|
|
2191
|
+
imageOptions: {
|
|
2192
|
+
hideBackgroundDots: !0,
|
|
2193
|
+
imageSize: .4,
|
|
2194
|
+
crossOrigin: void 0,
|
|
2195
|
+
margin: 0
|
|
2196
|
+
},
|
|
2197
|
+
dotsOptions: {
|
|
2198
|
+
type: "square",
|
|
2199
|
+
color: "#000"
|
|
2200
|
+
},
|
|
2201
|
+
backgroundOptions: {
|
|
2202
|
+
round: 0,
|
|
2203
|
+
color: "#fff"
|
|
2725
2204
|
}
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
return
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
margin
|
|
2749
|
-
}
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
var D = r(192),
|
|
2205
|
+
};
|
|
2206
|
+
var _A = function A() {
|
|
2207
|
+
return (_A = Object.assign || function (t) {
|
|
2208
|
+
for (var e, r = 1, n = arguments.length; r < n; r++) for (var o in e = arguments[r]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
2209
|
+
return t;
|
|
2210
|
+
}).apply(this, arguments);
|
|
2211
|
+
};
|
|
2212
|
+
function k(t) {
|
|
2213
|
+
var e = _A({}, t);
|
|
2214
|
+
if (!e.colorStops || !e.colorStops.length) throw "Field 'colorStops' is required in gradient";
|
|
2215
|
+
return e.rotation ? e.rotation = Number(e.rotation) : e.rotation = 0, e.colorStops = e.colorStops.map(function (t) {
|
|
2216
|
+
return _A(_A({}, t), {
|
|
2217
|
+
offset: Number(t.offset)
|
|
2218
|
+
});
|
|
2219
|
+
}), e;
|
|
2220
|
+
}
|
|
2221
|
+
function O(t) {
|
|
2222
|
+
var e = _A({}, t);
|
|
2223
|
+
return e.width = Number(e.width), e.height = Number(e.height), e.margin = Number(e.margin), e.imageOptions = _A(_A({}, e.imageOptions), {
|
|
2224
|
+
hideBackgroundDots: Boolean(e.imageOptions.hideBackgroundDots),
|
|
2225
|
+
imageSize: Number(e.imageOptions.imageSize),
|
|
2226
|
+
margin: Number(e.imageOptions.margin)
|
|
2227
|
+
}), e.margin > Math.min(e.width, e.height) && (e.margin = Math.min(e.width, e.height)), e.dotsOptions = _A({}, e.dotsOptions), e.dotsOptions.gradient && (e.dotsOptions.gradient = k(e.dotsOptions.gradient)), e.cornersSquareOptions && (e.cornersSquareOptions = _A({}, e.cornersSquareOptions), e.cornersSquareOptions.gradient && (e.cornersSquareOptions.gradient = k(e.cornersSquareOptions.gradient))), e.cornersDotOptions && (e.cornersDotOptions = _A({}, e.cornersDotOptions), e.cornersDotOptions.gradient && (e.cornersDotOptions.gradient = k(e.cornersDotOptions.gradient))), e.backgroundOptions && (e.backgroundOptions = _A({}, e.backgroundOptions), e.backgroundOptions.gradient && (e.backgroundOptions.gradient = k(e.backgroundOptions.gradient))), e;
|
|
2228
|
+
}
|
|
2229
|
+
var D = r(192),
|
|
2753
2230
|
P = r.n(D),
|
|
2754
2231
|
z = function z(t, e, r, n) {
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
try {
|
|
2758
|
-
u(n.next(t));
|
|
2759
|
-
} catch (t) {
|
|
2760
|
-
i(t);
|
|
2761
|
-
}
|
|
2762
|
-
}
|
|
2763
|
-
|
|
2764
|
-
function s(t) {
|
|
2765
|
-
try {
|
|
2766
|
-
u(n["throw"](t));
|
|
2767
|
-
} catch (t) {
|
|
2768
|
-
i(t);
|
|
2769
|
-
}
|
|
2770
|
-
}
|
|
2771
|
-
|
|
2772
|
-
function u(t) {
|
|
2773
|
-
var e;
|
|
2774
|
-
t.done ? o(t.value) : (e = t.value, e instanceof r ? e : new r(function (t) {
|
|
2775
|
-
t(e);
|
|
2776
|
-
})).then(a, s);
|
|
2777
|
-
}
|
|
2778
|
-
|
|
2779
|
-
u((n = n.apply(t, e || [])).next());
|
|
2780
|
-
});
|
|
2781
|
-
},
|
|
2782
|
-
B = function B(t, e) {
|
|
2783
|
-
var r,
|
|
2784
|
-
n,
|
|
2785
|
-
o,
|
|
2786
|
-
i,
|
|
2787
|
-
a = {
|
|
2788
|
-
label: 0,
|
|
2789
|
-
sent: function sent() {
|
|
2790
|
-
if (1 & o[0]) throw o[1];
|
|
2791
|
-
return o[1];
|
|
2792
|
-
},
|
|
2793
|
-
trys: [],
|
|
2794
|
-
ops: []
|
|
2795
|
-
};
|
|
2796
|
-
return i = {
|
|
2797
|
-
next: s(0),
|
|
2798
|
-
"throw": s(1),
|
|
2799
|
-
"return": s(2)
|
|
2800
|
-
}, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
|
|
2801
|
-
return this;
|
|
2802
|
-
}), i;
|
|
2803
|
-
|
|
2804
|
-
function s(i) {
|
|
2805
|
-
return function (s) {
|
|
2806
|
-
return function (i) {
|
|
2807
|
-
if (r) throw new TypeError("Generator is already executing.");
|
|
2808
|
-
|
|
2809
|
-
for (; a;) {
|
|
2232
|
+
return new (r || (r = Promise))(function (o, i) {
|
|
2233
|
+
function a(t) {
|
|
2810
2234
|
try {
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
switch (n = 0, o && (i = [2 & i[0], o.value]), i[0]) {
|
|
2814
|
-
case 0:
|
|
2815
|
-
case 1:
|
|
2816
|
-
o = i;
|
|
2817
|
-
break;
|
|
2818
|
-
|
|
2819
|
-
case 4:
|
|
2820
|
-
return a.label++, {
|
|
2821
|
-
value: i[1],
|
|
2822
|
-
done: !1
|
|
2823
|
-
};
|
|
2824
|
-
|
|
2825
|
-
case 5:
|
|
2826
|
-
a.label++, n = i[1], i = [0];
|
|
2827
|
-
continue;
|
|
2828
|
-
|
|
2829
|
-
case 7:
|
|
2830
|
-
i = a.ops.pop(), a.trys.pop();
|
|
2831
|
-
continue;
|
|
2832
|
-
|
|
2833
|
-
default:
|
|
2834
|
-
if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
|
|
2835
|
-
a = 0;
|
|
2836
|
-
continue;
|
|
2837
|
-
}
|
|
2838
|
-
|
|
2839
|
-
if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
|
|
2840
|
-
a.label = i[1];
|
|
2841
|
-
break;
|
|
2842
|
-
}
|
|
2843
|
-
|
|
2844
|
-
if (6 === i[0] && a.label < o[1]) {
|
|
2845
|
-
a.label = o[1], o = i;
|
|
2846
|
-
break;
|
|
2847
|
-
}
|
|
2848
|
-
|
|
2849
|
-
if (o && a.label < o[2]) {
|
|
2850
|
-
a.label = o[2], a.ops.push(i);
|
|
2851
|
-
break;
|
|
2852
|
-
}
|
|
2853
|
-
|
|
2854
|
-
o[2] && a.ops.pop(), a.trys.pop();
|
|
2855
|
-
continue;
|
|
2856
|
-
}
|
|
2857
|
-
|
|
2858
|
-
i = e.call(t, a);
|
|
2235
|
+
u(n.next(t));
|
|
2859
2236
|
} catch (t) {
|
|
2860
|
-
i
|
|
2861
|
-
} finally {
|
|
2862
|
-
r = o = 0;
|
|
2237
|
+
i(t);
|
|
2863
2238
|
}
|
|
2864
2239
|
}
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2240
|
+
function s(t) {
|
|
2241
|
+
try {
|
|
2242
|
+
u(n["throw"](t));
|
|
2243
|
+
} catch (t) {
|
|
2244
|
+
i(t);
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
function u(t) {
|
|
2248
|
+
var e;
|
|
2249
|
+
t.done ? o(t.value) : (e = t.value, e instanceof r ? e : new r(function (t) {
|
|
2250
|
+
t(e);
|
|
2251
|
+
})).then(a, s);
|
|
2252
|
+
}
|
|
2253
|
+
u((n = n.apply(t, e || [])).next());
|
|
2254
|
+
});
|
|
2255
|
+
},
|
|
2256
|
+
B = function B(t, e) {
|
|
2257
|
+
var r,
|
|
2258
|
+
n,
|
|
2259
|
+
o,
|
|
2260
|
+
i,
|
|
2261
|
+
a = {
|
|
2262
|
+
label: 0,
|
|
2263
|
+
sent: function sent() {
|
|
2264
|
+
if (1 & o[0]) throw o[1];
|
|
2265
|
+
return o[1];
|
|
2266
|
+
},
|
|
2267
|
+
trys: [],
|
|
2268
|
+
ops: []
|
|
2269
|
+
};
|
|
2270
|
+
return i = {
|
|
2271
|
+
next: s(0),
|
|
2272
|
+
"throw": s(1),
|
|
2273
|
+
"return": s(2)
|
|
2274
|
+
}, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
|
|
2275
|
+
return this;
|
|
2276
|
+
}), i;
|
|
2277
|
+
function s(i) {
|
|
2278
|
+
return function (s) {
|
|
2279
|
+
return function (i) {
|
|
2280
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
2281
|
+
for (; a;) try {
|
|
2282
|
+
if (r = 1, n && (o = 2 & i[0] ? n["return"] : i[0] ? n["throw"] || ((o = n["return"]) && o.call(n), 0) : n.next) && !(o = o.call(n, i[1])).done) return o;
|
|
2283
|
+
switch (n = 0, o && (i = [2 & i[0], o.value]), i[0]) {
|
|
2284
|
+
case 0:
|
|
2285
|
+
case 1:
|
|
2286
|
+
o = i;
|
|
2287
|
+
break;
|
|
2288
|
+
case 4:
|
|
2289
|
+
return a.label++, {
|
|
2290
|
+
value: i[1],
|
|
2291
|
+
done: !1
|
|
2292
|
+
};
|
|
2293
|
+
case 5:
|
|
2294
|
+
a.label++, n = i[1], i = [0];
|
|
2295
|
+
continue;
|
|
2296
|
+
case 7:
|
|
2297
|
+
i = a.ops.pop(), a.trys.pop();
|
|
2298
|
+
continue;
|
|
2299
|
+
default:
|
|
2300
|
+
if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
|
|
2301
|
+
a = 0;
|
|
2302
|
+
continue;
|
|
2303
|
+
}
|
|
2304
|
+
if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
|
|
2305
|
+
a.label = i[1];
|
|
2306
|
+
break;
|
|
2307
|
+
}
|
|
2308
|
+
if (6 === i[0] && a.label < o[1]) {
|
|
2309
|
+
a.label = o[1], o = i;
|
|
2310
|
+
break;
|
|
2311
|
+
}
|
|
2312
|
+
if (o && a.label < o[2]) {
|
|
2313
|
+
a.label = o[2], a.ops.push(i);
|
|
2314
|
+
break;
|
|
2315
|
+
}
|
|
2316
|
+
o[2] && a.ops.pop(), a.trys.pop();
|
|
2317
|
+
continue;
|
|
2318
|
+
}
|
|
2319
|
+
i = e.call(t, a);
|
|
2320
|
+
} catch (t) {
|
|
2321
|
+
i = [6, t], n = 0;
|
|
2322
|
+
} finally {
|
|
2323
|
+
r = o = 0;
|
|
2324
|
+
}
|
|
2325
|
+
if (5 & i[0]) throw i[1];
|
|
2326
|
+
return {
|
|
2327
|
+
value: i[0] ? i[1] : void 0,
|
|
2328
|
+
done: !0
|
|
2329
|
+
};
|
|
2330
|
+
}([i, s]);
|
|
2870
2331
|
};
|
|
2871
|
-
}
|
|
2332
|
+
}
|
|
2872
2333
|
};
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
var q = function () {
|
|
2877
|
-
function t(t) {
|
|
2878
|
-
this._options = t ? O(a(C, t)) : C, this.update();
|
|
2879
|
-
}
|
|
2880
|
-
|
|
2881
|
-
return t._clearContainer = function (t) {
|
|
2882
|
-
t && (t.innerHTML = "");
|
|
2883
|
-
}, t.prototype._setupSvg = function () {
|
|
2884
|
-
var t = this;
|
|
2885
|
-
|
|
2886
|
-
if (this._qr) {
|
|
2887
|
-
var e = new _(this._options);
|
|
2888
|
-
this._svg = e.getElement(), this._svgDrawingPromise = e.drawQR(this._qr).then(function () {
|
|
2889
|
-
var r;
|
|
2890
|
-
t._svg && (null === (r = t._extension) || void 0 === r || r.call(t, e.getElement(), t._options));
|
|
2891
|
-
});
|
|
2334
|
+
var q = function () {
|
|
2335
|
+
function t(t) {
|
|
2336
|
+
this._options = t ? O(a(C, t)) : C, this.update();
|
|
2892
2337
|
}
|
|
2893
|
-
|
|
2894
|
-
|
|
2338
|
+
return t._clearContainer = function (t) {
|
|
2339
|
+
t && (t.innerHTML = "");
|
|
2340
|
+
}, t.prototype._setupSvg = function () {
|
|
2341
|
+
var t = this;
|
|
2342
|
+
if (this._qr) {
|
|
2343
|
+
var e = new _(this._options);
|
|
2344
|
+
this._svg = e.getElement(), this._svgDrawingPromise = e.drawQR(this._qr).then(function () {
|
|
2345
|
+
var r;
|
|
2346
|
+
t._svg && (null === (r = t._extension) || void 0 === r || r.call(t, e.getElement(), t._options));
|
|
2347
|
+
});
|
|
2348
|
+
}
|
|
2349
|
+
}, t.prototype._setupCanvas = function () {
|
|
2350
|
+
var t,
|
|
2895
2351
|
e = this;
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2352
|
+
this._qr && (this._canvas = document.createElement("canvas"), this._canvas.width = this._options.width, this._canvas.height = this._options.height, this._setupSvg(), this._canvasDrawingPromise = null === (t = this._svgDrawingPromise) || void 0 === t ? void 0 : t.then(function () {
|
|
2353
|
+
if (e._svg) {
|
|
2354
|
+
var t = e._svg,
|
|
2899
2355
|
r = new XMLSerializer().serializeToString(t),
|
|
2900
2356
|
n = "data:image/svg+xml;base64," + btoa(r),
|
|
2901
2357
|
o = new Image();
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
}
|
|
2909
|
-
}));
|
|
2910
|
-
}, t.prototype._getElement = function (t) {
|
|
2911
|
-
return void 0 === t && (t = "png"), z(this, void 0, void 0, function () {
|
|
2912
|
-
return B(this, function (e) {
|
|
2913
|
-
switch (e.label) {
|
|
2914
|
-
case 0:
|
|
2915
|
-
if (!this._qr) throw "QR code is empty";
|
|
2916
|
-
return "svg" !== t.toLowerCase() ? [3, 2] : (this._svg && this._svgDrawingPromise || this._setupSvg(), [4, this._svgDrawingPromise]);
|
|
2917
|
-
|
|
2918
|
-
case 1:
|
|
2919
|
-
return e.sent(), [2, this._svg];
|
|
2920
|
-
|
|
2921
|
-
case 2:
|
|
2922
|
-
return this._canvas && this._canvasDrawingPromise || this._setupCanvas(), [4, this._canvasDrawingPromise];
|
|
2923
|
-
|
|
2924
|
-
case 3:
|
|
2925
|
-
return e.sent(), [2, this._canvas];
|
|
2358
|
+
return new Promise(function (t) {
|
|
2359
|
+
o.onload = function () {
|
|
2360
|
+
var r, n;
|
|
2361
|
+
null === (n = null === (r = e._canvas) || void 0 === r ? void 0 : r.getContext("2d")) || void 0 === n || n.drawImage(o, 0, 0), t();
|
|
2362
|
+
}, o.src = n;
|
|
2363
|
+
});
|
|
2926
2364
|
}
|
|
2365
|
+
}));
|
|
2366
|
+
}, t.prototype._getElement = function (t) {
|
|
2367
|
+
return void 0 === t && (t = "png"), z(this, void 0, void 0, function () {
|
|
2368
|
+
return B(this, function (e) {
|
|
2369
|
+
switch (e.label) {
|
|
2370
|
+
case 0:
|
|
2371
|
+
if (!this._qr) throw "QR code is empty";
|
|
2372
|
+
return "svg" !== t.toLowerCase() ? [3, 2] : (this._svg && this._svgDrawingPromise || this._setupSvg(), [4, this._svgDrawingPromise]);
|
|
2373
|
+
case 1:
|
|
2374
|
+
return e.sent(), [2, this._svg];
|
|
2375
|
+
case 2:
|
|
2376
|
+
return this._canvas && this._canvasDrawingPromise || this._setupCanvas(), [4, this._canvasDrawingPromise];
|
|
2377
|
+
case 3:
|
|
2378
|
+
return e.sent(), [2, this._canvas];
|
|
2379
|
+
}
|
|
2380
|
+
});
|
|
2927
2381
|
});
|
|
2928
|
-
})
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
default:
|
|
2939
|
-
return "Byte";
|
|
2940
|
-
}
|
|
2941
|
-
}(this._options.data)), this._qr.make(), this._options.type === x ? this._setupCanvas() : this._setupSvg(), this.append(this._container));
|
|
2942
|
-
}, t.prototype.append = function (t) {
|
|
2943
|
-
if (t) {
|
|
2944
|
-
if ("function" != typeof t.appendChild) throw "Container should be a single DOM node";
|
|
2945
|
-
this._options.type === x ? this._canvas && t.appendChild(this._canvas) : this._svg && t.appendChild(this._svg), this._container = t;
|
|
2946
|
-
}
|
|
2947
|
-
}, t.prototype.applyExtension = function (t) {
|
|
2948
|
-
if (!t) throw "Extension function should be defined.";
|
|
2949
|
-
this._extension = t, this.update();
|
|
2950
|
-
}, t.prototype.deleteExtension = function () {
|
|
2951
|
-
this._extension = void 0, this.update();
|
|
2952
|
-
}, t.prototype.getRawData = function (t) {
|
|
2953
|
-
return void 0 === t && (t = "png"), z(this, void 0, void 0, function () {
|
|
2954
|
-
var e, r, n;
|
|
2955
|
-
return B(this, function (o) {
|
|
2956
|
-
switch (o.label) {
|
|
2957
|
-
case 0:
|
|
2958
|
-
if (!this._qr) throw "QR code is empty";
|
|
2959
|
-
return [4, this._getElement(t)];
|
|
2960
|
-
|
|
2961
|
-
case 1:
|
|
2962
|
-
return (e = o.sent()) ? "svg" === t.toLowerCase() ? (r = new XMLSerializer(), n = r.serializeToString(e), [2, new Blob(['<?xml version="1.0" standalone="no"?>\r\n' + n], {
|
|
2963
|
-
type: "image/svg+xml"
|
|
2964
|
-
})]) : [2, new Promise(function (r) {
|
|
2965
|
-
return e.toBlob(r, "image/" + t, 1);
|
|
2966
|
-
})] : [2, null];
|
|
2382
|
+
}, t.prototype.update = function (e) {
|
|
2383
|
+
t._clearContainer(this._container), this._options = e ? O(a(this._options, e)) : this._options, this._options.data && (this._qr = P()(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel), this._qr.addData(this._options.data, this._options.qrOptions.mode || function (t) {
|
|
2384
|
+
switch (!0) {
|
|
2385
|
+
case /^[0-9]*$/.test(t):
|
|
2386
|
+
return "Numeric";
|
|
2387
|
+
case /^[0-9A-Z $%*+\-./:]*$/.test(t):
|
|
2388
|
+
return "Alphanumeric";
|
|
2389
|
+
default:
|
|
2390
|
+
return "Byte";
|
|
2967
2391
|
}
|
|
2392
|
+
}(this._options.data)), this._qr.make(), this._options.type === x ? this._setupCanvas() : this._setupSvg(), this.append(this._container));
|
|
2393
|
+
}, t.prototype.append = function (t) {
|
|
2394
|
+
if (t) {
|
|
2395
|
+
if ("function" != typeof t.appendChild) throw "Container should be a single DOM node";
|
|
2396
|
+
this._options.type === x ? this._canvas && t.appendChild(this._canvas) : this._svg && t.appendChild(this._svg), this._container = t;
|
|
2397
|
+
}
|
|
2398
|
+
}, t.prototype.applyExtension = function (t) {
|
|
2399
|
+
if (!t) throw "Extension function should be defined.";
|
|
2400
|
+
this._extension = t, this.update();
|
|
2401
|
+
}, t.prototype.deleteExtension = function () {
|
|
2402
|
+
this._extension = void 0, this.update();
|
|
2403
|
+
}, t.prototype.getRawData = function (t) {
|
|
2404
|
+
return void 0 === t && (t = "png"), z(this, void 0, void 0, function () {
|
|
2405
|
+
var e, r, n;
|
|
2406
|
+
return B(this, function (o) {
|
|
2407
|
+
switch (o.label) {
|
|
2408
|
+
case 0:
|
|
2409
|
+
if (!this._qr) throw "QR code is empty";
|
|
2410
|
+
return [4, this._getElement(t)];
|
|
2411
|
+
case 1:
|
|
2412
|
+
return (e = o.sent()) ? "svg" === t.toLowerCase() ? (r = new XMLSerializer(), n = r.serializeToString(e), [2, new Blob(['<?xml version="1.0" standalone="no"?>\r\n' + n], {
|
|
2413
|
+
type: "image/svg+xml"
|
|
2414
|
+
})]) : [2, new Promise(function (r) {
|
|
2415
|
+
return e.toBlob(r, "image/" + t, 1);
|
|
2416
|
+
})] : [2, null];
|
|
2417
|
+
}
|
|
2418
|
+
});
|
|
2968
2419
|
});
|
|
2969
|
-
})
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
}
|
|
2420
|
+
}, t.prototype.download = function (t) {
|
|
2421
|
+
return z(this, void 0, void 0, function () {
|
|
2422
|
+
var e, r, n, o, i;
|
|
2423
|
+
return B(this, function (a) {
|
|
2424
|
+
switch (a.label) {
|
|
2425
|
+
case 0:
|
|
2426
|
+
if (!this._qr) throw "QR code is empty";
|
|
2427
|
+
return e = "png", r = "qr", "string" == typeof t ? (e = t, console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")) : "object" == _typeof(t) && null !== t && (t.name && (r = t.name), t.extension && (e = t.extension)), [4, this._getElement(e)];
|
|
2428
|
+
case 1:
|
|
2429
|
+
return (n = a.sent()) ? ("svg" === e.toLowerCase() ? (o = new XMLSerializer(), i = '<?xml version="1.0" standalone="no"?>\r\n' + (i = o.serializeToString(n)), s("data:image/svg+xml;charset=utf-8," + encodeURIComponent(i), r + ".svg")) : s(n.toDataURL("image/" + e), r + "." + e), [2]) : [2];
|
|
2430
|
+
}
|
|
2431
|
+
});
|
|
2982
2432
|
});
|
|
2983
|
-
}
|
|
2984
|
-
}
|
|
2985
|
-
}
|
|
2986
|
-
}
|
|
2987
|
-
|
|
2988
|
-
e = {};
|
|
2989
|
-
|
|
2433
|
+
}, t;
|
|
2434
|
+
}();
|
|
2435
|
+
}
|
|
2436
|
+
},
|
|
2437
|
+
e = {};
|
|
2990
2438
|
function r(n) {
|
|
2991
2439
|
if (e[n]) return e[n].exports;
|
|
2992
2440
|
var o = e[n] = {
|
|
@@ -2994,7 +2442,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2994
2442
|
};
|
|
2995
2443
|
return t[n](o, o.exports, r), o.exports;
|
|
2996
2444
|
}
|
|
2997
|
-
|
|
2998
2445
|
return r.n = function (t) {
|
|
2999
2446
|
var e = t && t.__esModule ? function () {
|
|
3000
2447
|
return t["default"];
|
|
@@ -3005,12 +2452,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
3005
2452
|
a: e
|
|
3006
2453
|
}), e;
|
|
3007
2454
|
}, r.d = function (t, e) {
|
|
3008
|
-
for (var n in e) {
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
});
|
|
3013
|
-
}
|
|
2455
|
+
for (var n in e) r.o(e, n) && !r.o(t, n) && Object.defineProperty(t, n, {
|
|
2456
|
+
enumerable: !0,
|
|
2457
|
+
get: e[n]
|
|
2458
|
+
});
|
|
3014
2459
|
}, r.o = function (t, e) {
|
|
3015
2460
|
return Object.prototype.hasOwnProperty.call(t, e);
|
|
3016
2461
|
}, r(676);
|
|
@@ -3018,7 +2463,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
3018
2463
|
});
|
|
3019
2464
|
}, {}],
|
|
3020
2465
|
5: [function (require, module, exports) {
|
|
3021
|
-
module.exports = "1.
|
|
2466
|
+
module.exports = "1.148.1";
|
|
3022
2467
|
}, {}]
|
|
3023
2468
|
}, {}, [3])(3);
|
|
3024
2469
|
});
|