@plattar/plattar-ar-adapter 1.178.1 → 1.180.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.
|
@@ -5242,7 +5242,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
5242
5242
|
Object.defineProperty(exports, "__esModule", {
|
|
5243
5243
|
value: true
|
|
5244
5244
|
});
|
|
5245
|
-
exports["default"] = "1.
|
|
5245
|
+
exports["default"] = "1.180.1";
|
|
5246
5246
|
}, {}],
|
|
5247
5247
|
20: [function (require, module, exports) {
|
|
5248
5248
|
"use strict";
|
|
@@ -10171,7 +10171,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
10171
10171
|
if (!this._qrCode) {
|
|
10172
10172
|
return;
|
|
10173
10173
|
}
|
|
10174
|
-
var canvas = this._qrCode._canvas;
|
|
10174
|
+
var canvas = this._qrCode._domCanvas || this._qrCode._canvas;
|
|
10175
10175
|
if (canvas) {
|
|
10176
10176
|
if (canvas.style.width !== "100%") {
|
|
10177
10177
|
canvas.style.width = "100%";
|
|
@@ -10304,8 +10304,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
10304
10304
|
"./version": 116
|
|
10305
10305
|
}],
|
|
10306
10306
|
116: [function (require, module, exports) {
|
|
10307
|
-
|
|
10308
|
-
}, {
|
|
10307
|
+
arguments[4][112][0].apply(exports, arguments);
|
|
10308
|
+
}, {
|
|
10309
|
+
"dup": 112
|
|
10310
|
+
}],
|
|
10309
10311
|
117: [function (require, module, exports) {
|
|
10310
10312
|
"use strict";
|
|
10311
10313
|
|
|
@@ -15029,18 +15031,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
15029
15031
|
}
|
|
15030
15032
|
var u = function () {
|
|
15031
15033
|
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]],
|
|
15032
|
-
e = function (_e2) {
|
|
15033
|
-
function e(_x17, _x18) {
|
|
15034
|
-
return _e2.apply(this, arguments);
|
|
15035
|
-
}
|
|
15036
|
-
e.toString = function () {
|
|
15037
|
-
return _e2.toString();
|
|
15038
|
-
};
|
|
15039
|
-
return e;
|
|
15040
|
-
}(function (t, e) {
|
|
15034
|
+
e = function e(t, _e2) {
|
|
15041
15035
|
var i = {};
|
|
15042
|
-
return i.totalCount = t, i.dataCount =
|
|
15043
|
-
}
|
|
15036
|
+
return i.totalCount = t, i.dataCount = _e2, i;
|
|
15037
|
+
},
|
|
15044
15038
|
i = {
|
|
15045
15039
|
getRSBlocks: function getRSBlocks(i, r) {
|
|
15046
15040
|
var n = function (e, i) {
|
|
@@ -15398,7 +15392,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
15398
15392
|
|
|
15399
15393
|
i.d(r, {
|
|
15400
15394
|
"default": function _default() {
|
|
15401
|
-
return
|
|
15395
|
+
return $;
|
|
15402
15396
|
}
|
|
15403
15397
|
});
|
|
15404
15398
|
var t = function t(_t2) {
|
|
@@ -15740,23 +15734,29 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
15740
15734
|
}
|
|
15741
15735
|
}]);
|
|
15742
15736
|
}();
|
|
15743
|
-
var a =
|
|
15744
|
-
|
|
15737
|
+
var a = {
|
|
15738
|
+
dot: "dot",
|
|
15739
|
+
square: "square",
|
|
15740
|
+
extraRounded: "extra-rounded"
|
|
15741
|
+
},
|
|
15742
|
+
h = Object.values(a);
|
|
15743
|
+
var d = /*#__PURE__*/function () {
|
|
15744
|
+
function d(_ref9) {
|
|
15745
15745
|
var t = _ref9.svg,
|
|
15746
15746
|
e = _ref9.type,
|
|
15747
15747
|
i = _ref9.window;
|
|
15748
|
-
_classCallCheck(this,
|
|
15748
|
+
_classCallCheck(this, d);
|
|
15749
15749
|
this._svg = t, this._type = e, this._window = i;
|
|
15750
15750
|
}
|
|
15751
|
-
return _createClass(
|
|
15751
|
+
return _createClass(d, [{
|
|
15752
15752
|
key: "draw",
|
|
15753
15753
|
value: function draw(t, e, i, r) {
|
|
15754
15754
|
var n;
|
|
15755
15755
|
switch (this._type) {
|
|
15756
|
-
case
|
|
15756
|
+
case a.square:
|
|
15757
15757
|
n = this._drawSquare;
|
|
15758
15758
|
break;
|
|
15759
|
-
case
|
|
15759
|
+
case a.extraRounded:
|
|
15760
15760
|
n = this._drawExtraRounded;
|
|
15761
15761
|
break;
|
|
15762
15762
|
default:
|
|
@@ -15780,8 +15780,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
15780
15780
|
n = _ref10.draw;
|
|
15781
15781
|
var o;
|
|
15782
15782
|
var s = t + i / 2,
|
|
15783
|
-
|
|
15784
|
-
n(), null === (o = this._element) || void 0 === o || o.setAttribute("transform", "rotate(".concat(180 * r / Math.PI, ",").concat(s, ",").concat(
|
|
15783
|
+
a = e + i / 2;
|
|
15784
|
+
n(), null === (o = this._element) || void 0 === o || o.setAttribute("transform", "rotate(".concat(180 * r / Math.PI, ",").concat(s, ",").concat(a, ")"));
|
|
15785
15785
|
}
|
|
15786
15786
|
}, {
|
|
15787
15787
|
key: "_basicDot",
|
|
@@ -15869,19 +15869,24 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
15869
15869
|
}
|
|
15870
15870
|
}]);
|
|
15871
15871
|
}();
|
|
15872
|
-
var
|
|
15873
|
-
|
|
15872
|
+
var u = {
|
|
15873
|
+
dot: "dot",
|
|
15874
|
+
square: "square"
|
|
15875
|
+
},
|
|
15876
|
+
c = Object.values(u);
|
|
15877
|
+
var l = /*#__PURE__*/function () {
|
|
15878
|
+
function l(_ref14) {
|
|
15874
15879
|
var t = _ref14.svg,
|
|
15875
15880
|
e = _ref14.type,
|
|
15876
15881
|
i = _ref14.window;
|
|
15877
|
-
_classCallCheck(this,
|
|
15882
|
+
_classCallCheck(this, l);
|
|
15878
15883
|
this._svg = t, this._type = e, this._window = i;
|
|
15879
15884
|
}
|
|
15880
|
-
return _createClass(
|
|
15885
|
+
return _createClass(l, [{
|
|
15881
15886
|
key: "draw",
|
|
15882
15887
|
value: function draw(t, e, i, r) {
|
|
15883
15888
|
var n;
|
|
15884
|
-
n =
|
|
15889
|
+
n = this._type === u.square ? this._drawSquare : this._drawDot, n.call(this, {
|
|
15885
15890
|
x: t,
|
|
15886
15891
|
y: e,
|
|
15887
15892
|
size: i,
|
|
@@ -15958,18 +15963,18 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
15958
15963
|
}
|
|
15959
15964
|
}]);
|
|
15960
15965
|
}();
|
|
15961
|
-
var
|
|
15962
|
-
|
|
15963
|
-
|
|
15964
|
-
var
|
|
15965
|
-
function
|
|
15966
|
+
var g = "circle",
|
|
15967
|
+
f = [[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]],
|
|
15968
|
+
w = [[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]];
|
|
15969
|
+
var p = /*#__PURE__*/function () {
|
|
15970
|
+
function p(t, e) {
|
|
15966
15971
|
var _this83 = this;
|
|
15967
|
-
_classCallCheck(this,
|
|
15972
|
+
_classCallCheck(this, p);
|
|
15968
15973
|
this._roundSize = function (t) {
|
|
15969
15974
|
return _this83._options.dotsOptions.roundSize ? Math.floor(t) : t;
|
|
15970
|
-
}, this._window = e, this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "svg"), this._element.setAttribute("width", String(t.width)), this._element.setAttribute("height", String(t.height)), this._element.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), t.dotsOptions.roundSize || this._element.setAttribute("shape-rendering", "crispEdges"), this._element.setAttribute("viewBox", "0 0 ".concat(t.width, " ").concat(t.height)), this._defs = this._window.document.createElementNS("http://www.w3.org/2000/svg", "defs"), this._element.appendChild(this._defs), this._imageUri = t.image, this._instanceId =
|
|
15975
|
+
}, this._window = e, this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "svg"), this._element.setAttribute("width", String(t.width)), this._element.setAttribute("height", String(t.height)), this._element.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), t.dotsOptions.roundSize || this._element.setAttribute("shape-rendering", "crispEdges"), this._element.setAttribute("viewBox", "0 0 ".concat(t.width, " ").concat(t.height)), this._defs = this._window.document.createElementNS("http://www.w3.org/2000/svg", "defs"), this._element.appendChild(this._defs), this._imageUri = t.image, this._instanceId = p.instanceCount++, this._options = t;
|
|
15971
15976
|
}
|
|
15972
|
-
return _createClass(
|
|
15977
|
+
return _createClass(p, [{
|
|
15973
15978
|
key: "width",
|
|
15974
15979
|
get: function get() {
|
|
15975
15980
|
return this._options.width;
|
|
@@ -15989,11 +15994,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
15989
15994
|
value: function () {
|
|
15990
15995
|
var _drawQR = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee49(t) {
|
|
15991
15996
|
var _this84 = this;
|
|
15992
|
-
var e, i, r, n, s, _this$_options, _t3, _i2, _r5,
|
|
15997
|
+
var e, i, r, n, s, _this$_options, _t3, _i2, _r5, _a;
|
|
15993
15998
|
return _regeneratorRuntime().wrap(function _callee49$(_context49) {
|
|
15994
15999
|
while (1) switch (_context49.prev = _context49.next) {
|
|
15995
16000
|
case 0:
|
|
15996
|
-
e = t.getModuleCount(), i = Math.min(this._options.width, this._options.height) - 2 * this._options.margin, r = this._options.shape ===
|
|
16001
|
+
e = t.getModuleCount(), i = Math.min(this._options.width, this._options.height) - 2 * this._options.margin, r = this._options.shape === g ? i / Math.sqrt(2) : i, n = this._roundSize(r / e);
|
|
15997
16002
|
s = {
|
|
15998
16003
|
hideXDots: 0,
|
|
15999
16004
|
hideYDots: 0,
|
|
@@ -16013,7 +16018,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16013
16018
|
}
|
|
16014
16019
|
return _context49.abrupt("return");
|
|
16015
16020
|
case 7:
|
|
16016
|
-
_this$_options = this._options, _t3 = _this$_options.imageOptions, _i2 = _this$_options.qrOptions, _r5 = _t3.imageSize * o[_i2.errorCorrectionLevel],
|
|
16021
|
+
_this$_options = this._options, _t3 = _this$_options.imageOptions, _i2 = _this$_options.qrOptions, _r5 = _t3.imageSize * o[_i2.errorCorrectionLevel], _a = Math.floor(_r5 * e * e);
|
|
16017
16022
|
s = function (_ref18) {
|
|
16018
16023
|
var t = _ref18.originalHeight,
|
|
16019
16024
|
e = _ref18.originalWidth,
|
|
@@ -16044,7 +16049,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16044
16049
|
}({
|
|
16045
16050
|
originalWidth: this._image.width,
|
|
16046
16051
|
originalHeight: this._image.height,
|
|
16047
|
-
maxHiddenDots:
|
|
16052
|
+
maxHiddenDots: _a,
|
|
16048
16053
|
maxHiddenAxisDots: e - 14,
|
|
16049
16054
|
dotSize: n
|
|
16050
16055
|
});
|
|
@@ -16052,7 +16057,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16052
16057
|
this.drawBackground();
|
|
16053
16058
|
this.drawDots(function (t, i) {
|
|
16054
16059
|
var r, n, o, a, h, d;
|
|
16055
|
-
return !(_this84._options.imageOptions.hideBackgroundDots && t >= (e - s.hideYDots) / 2 && t < (e + s.hideYDots) / 2 && i >= (e - s.hideXDots) / 2 && i < (e + s.hideXDots) / 2 || (null === (r =
|
|
16060
|
+
return !(_this84._options.imageOptions.hideBackgroundDots && t >= (e - s.hideYDots) / 2 && t < (e + s.hideYDots) / 2 && i >= (e - s.hideXDots) / 2 && i < (e + s.hideXDots) / 2 || (null === (r = f[t]) || void 0 === r ? void 0 : r[i]) || (null === (n = f[t - e + 7]) || void 0 === n ? void 0 : n[i]) || (null === (o = f[t]) || void 0 === o ? void 0 : o[i - e + 7]) || (null === (a = w[t]) || void 0 === a ? void 0 : a[i]) || (null === (h = w[t - e + 7]) || void 0 === h ? void 0 : h[i]) || (null === (d = w[t]) || void 0 === d ? void 0 : d[i - e + 7]));
|
|
16056
16061
|
});
|
|
16057
16062
|
this.drawCorners();
|
|
16058
16063
|
_context49.t0 = this._options.image;
|
|
@@ -16073,7 +16078,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16073
16078
|
}
|
|
16074
16079
|
}, _callee49, this);
|
|
16075
16080
|
}));
|
|
16076
|
-
function drawQR(
|
|
16081
|
+
function drawQR(_x17) {
|
|
16077
16082
|
return _drawQR.apply(this, arguments);
|
|
16078
16083
|
}
|
|
16079
16084
|
return drawQR;
|
|
@@ -16088,10 +16093,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16088
16093
|
var _r6 = null === (t = n.backgroundOptions) || void 0 === t ? void 0 : t.gradient,
|
|
16089
16094
|
_o = null === (e = n.backgroundOptions) || void 0 === e ? void 0 : e.color;
|
|
16090
16095
|
var _s6 = n.height,
|
|
16091
|
-
|
|
16096
|
+
_a2 = n.width;
|
|
16092
16097
|
if (_r6 || _o) {
|
|
16093
16098
|
var _t4 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
16094
|
-
this._backgroundClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", "clip-path-background-color-".concat(this._instanceId)), this._defs.appendChild(this._backgroundClipPath), (null === (i = n.backgroundOptions) || void 0 === i ? void 0 : i.round) && (_s6 =
|
|
16099
|
+
this._backgroundClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", "clip-path-background-color-".concat(this._instanceId)), this._defs.appendChild(this._backgroundClipPath), (null === (i = n.backgroundOptions) || void 0 === i ? void 0 : i.round) && (_s6 = _a2 = Math.min(n.width, n.height), _t4.setAttribute("rx", String(_s6 / 2 * n.backgroundOptions.round))), _t4.setAttribute("x", String(this._roundSize((n.width - _a2) / 2))), _t4.setAttribute("y", String(this._roundSize((n.height - _s6) / 2))), _t4.setAttribute("width", String(_a2)), _t4.setAttribute("height", String(_s6)), this._backgroundClipPath.appendChild(_t4), this._createColor({
|
|
16095
16100
|
options: _r6,
|
|
16096
16101
|
color: _o,
|
|
16097
16102
|
additionalRotation: 0,
|
|
@@ -16114,11 +16119,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16114
16119
|
n = this._qr.getModuleCount();
|
|
16115
16120
|
if (n > r.width || n > r.height) throw "The canvas is too small.";
|
|
16116
16121
|
var o = Math.min(r.width, r.height) - 2 * r.margin,
|
|
16117
|
-
a = r.shape ===
|
|
16122
|
+
a = r.shape === g ? o / Math.sqrt(2) : o,
|
|
16118
16123
|
h = this._roundSize(a / n),
|
|
16119
|
-
|
|
16120
|
-
|
|
16121
|
-
|
|
16124
|
+
d = this._roundSize((r.width - n * h) / 2),
|
|
16125
|
+
u = this._roundSize((r.height - n * h) / 2),
|
|
16126
|
+
c = new s({
|
|
16122
16127
|
svg: this._element,
|
|
16123
16128
|
type: r.dotsOptions.type,
|
|
16124
16129
|
window: this._window
|
|
@@ -16135,9 +16140,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16135
16140
|
});
|
|
16136
16141
|
var _loop2 = function _loop2(_e3) {
|
|
16137
16142
|
var _loop5 = function _loop5(_r9) {
|
|
16138
|
-
t && !t(_e3, _r9) || (null === (i = _this85._qr) || void 0 === i ? void 0 : i.isDark(_e3, _r9)) && (
|
|
16143
|
+
t && !t(_e3, _r9) || (null === (i = _this85._qr) || void 0 === i ? void 0 : i.isDark(_e3, _r9)) && (c.draw(d + _r9 * h, u + _e3 * h, h, function (i, o) {
|
|
16139
16144
|
return !(_r9 + i < 0 || _e3 + o < 0 || _r9 + i >= n || _e3 + o >= n) && !(t && !t(_e3 + o, _r9 + i)) && !!_this85._qr && _this85._qr.isDark(_e3 + o, _r9 + i);
|
|
16140
|
-
}),
|
|
16145
|
+
}), c._element && _this85._dotsClipPath && _this85._dotsClipPath.appendChild(c._element));
|
|
16141
16146
|
};
|
|
16142
16147
|
for (var _r9 = 0; _r9 < n; _r9++) {
|
|
16143
16148
|
_loop5(_r9);
|
|
@@ -16146,23 +16151,23 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16146
16151
|
for (var _e3 = 0; _e3 < n; _e3++) {
|
|
16147
16152
|
_loop2(_e3);
|
|
16148
16153
|
}
|
|
16149
|
-
if (r.shape ===
|
|
16154
|
+
if (r.shape === g) {
|
|
16150
16155
|
var _t5 = this._roundSize((o / h - n) / 2),
|
|
16151
16156
|
_e4 = n + 2 * _t5,
|
|
16152
|
-
_i3 =
|
|
16153
|
-
_r7 =
|
|
16157
|
+
_i3 = d - _t5 * h,
|
|
16158
|
+
_r7 = u - _t5 * h,
|
|
16154
16159
|
_s7 = [],
|
|
16155
|
-
|
|
16160
|
+
_a3 = this._roundSize(_e4 / 2);
|
|
16156
16161
|
for (var _i4 = 0; _i4 < _e4; _i4++) {
|
|
16157
16162
|
_s7[_i4] = [];
|
|
16158
|
-
for (var _r8 = 0; _r8 < _e4; _r8++) _i4 >= _t5 - 1 && _i4 <= _e4 - _t5 && _r8 >= _t5 - 1 && _r8 <= _e4 - _t5 || Math.sqrt((_i4 -
|
|
16163
|
+
for (var _r8 = 0; _r8 < _e4; _r8++) _i4 >= _t5 - 1 && _i4 <= _e4 - _t5 && _r8 >= _t5 - 1 && _r8 <= _e4 - _t5 || Math.sqrt((_i4 - _a3) * (_i4 - _a3) + (_r8 - _a3) * (_r8 - _a3)) > _a3 ? _s7[_i4][_r8] = 0 : _s7[_i4][_r8] = this._qr.isDark(_r8 - 2 * _t5 < 0 ? _r8 : _r8 >= n ? _r8 - 2 * _t5 : _r8 - _t5, _i4 - 2 * _t5 < 0 ? _i4 : _i4 >= n ? _i4 - 2 * _t5 : _i4 - _t5) ? 1 : 0;
|
|
16159
16164
|
}
|
|
16160
16165
|
var _loop3 = function _loop3(_t6) {
|
|
16161
16166
|
var _loop4 = function _loop4(_n) {
|
|
16162
|
-
_s7[_t6][_n] && (
|
|
16167
|
+
_s7[_t6][_n] && (c.draw(_i3 + _n * h, _r7 + _t6 * h, h, function (e, i) {
|
|
16163
16168
|
var r;
|
|
16164
16169
|
return !!(null === (r = _s7[_t6 + i]) || void 0 === r ? void 0 : r[_n + e]);
|
|
16165
|
-
}),
|
|
16170
|
+
}), c._element && _this85._dotsClipPath && _this85._dotsClipPath.appendChild(c._element));
|
|
16166
16171
|
};
|
|
16167
16172
|
for (var _n = 0; _n < _e4; _n++) {
|
|
16168
16173
|
_loop4(_n);
|
|
@@ -16183,93 +16188,93 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16183
16188
|
if (!t) throw "Element code is not defined";
|
|
16184
16189
|
var i = this._qr.getModuleCount(),
|
|
16185
16190
|
r = Math.min(e.width, e.height) - 2 * e.margin,
|
|
16186
|
-
n = e.shape ===
|
|
16191
|
+
n = e.shape === g ? r / Math.sqrt(2) : r,
|
|
16187
16192
|
o = this._roundSize(n / i),
|
|
16188
|
-
|
|
16189
|
-
|
|
16190
|
-
|
|
16191
|
-
|
|
16193
|
+
a = 7 * o,
|
|
16194
|
+
u = 3 * o,
|
|
16195
|
+
_p = this._roundSize((e.width - i * o) / 2),
|
|
16196
|
+
v = this._roundSize((e.height - i * o) / 2);
|
|
16192
16197
|
[[0, 0, 0], [1, 0, Math.PI / 2], [0, 1, -Math.PI / 2]].forEach(function (_ref19) {
|
|
16193
16198
|
var _ref20 = _slicedToArray(_ref19, 3),
|
|
16194
16199
|
t = _ref20[0],
|
|
16195
16200
|
r = _ref20[1],
|
|
16196
16201
|
n = _ref20[2];
|
|
16197
|
-
var
|
|
16198
|
-
var
|
|
16199
|
-
|
|
16200
|
-
var
|
|
16201
|
-
|
|
16202
|
-
if (((null === (
|
|
16203
|
-
options: null === (
|
|
16204
|
-
color: null === (
|
|
16202
|
+
var g, _, m, b, y, x, S, C, A, M, $, O, D, z;
|
|
16203
|
+
var k = _p + t * o * (i - 7),
|
|
16204
|
+
B = v + r * o * (i - 7);
|
|
16205
|
+
var P = _this86._dotsClipPath,
|
|
16206
|
+
I = _this86._dotsClipPath;
|
|
16207
|
+
if (((null === (g = e.cornersSquareOptions) || void 0 === g ? void 0 : g.gradient) || (null === (_ = e.cornersSquareOptions) || void 0 === _ ? void 0 : _.color)) && (P = _this86._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), P.setAttribute("id", "clip-path-corners-square-color-".concat(t, "-").concat(r, "-").concat(_this86._instanceId)), _this86._defs.appendChild(P), _this86._cornersSquareClipPath = _this86._cornersDotClipPath = I = P, _this86._createColor({
|
|
16208
|
+
options: null === (m = e.cornersSquareOptions) || void 0 === m ? void 0 : m.gradient,
|
|
16209
|
+
color: null === (b = e.cornersSquareOptions) || void 0 === b ? void 0 : b.color,
|
|
16205
16210
|
additionalRotation: n,
|
|
16206
|
-
x:
|
|
16207
|
-
y:
|
|
16208
|
-
height:
|
|
16209
|
-
width:
|
|
16211
|
+
x: k,
|
|
16212
|
+
y: B,
|
|
16213
|
+
height: a,
|
|
16214
|
+
width: a,
|
|
16210
16215
|
name: "corners-square-color-".concat(t, "-").concat(r, "-").concat(_this86._instanceId)
|
|
16211
|
-
})), null === (
|
|
16212
|
-
var _t7 = new
|
|
16216
|
+
})), (null === (y = e.cornersSquareOptions) || void 0 === y ? void 0 : y.type) && h.includes(e.cornersSquareOptions.type)) {
|
|
16217
|
+
var _t7 = new d({
|
|
16213
16218
|
svg: _this86._element,
|
|
16214
16219
|
type: e.cornersSquareOptions.type,
|
|
16215
16220
|
window: _this86._window
|
|
16216
16221
|
});
|
|
16217
|
-
_t7.draw(
|
|
16222
|
+
_t7.draw(k, B, a, n), _t7._element && P && P.appendChild(_t7._element);
|
|
16218
16223
|
} else {
|
|
16219
16224
|
var _t8 = new s({
|
|
16220
16225
|
svg: _this86._element,
|
|
16221
|
-
type: e.dotsOptions.type,
|
|
16226
|
+
type: (null === (x = e.cornersSquareOptions) || void 0 === x ? void 0 : x.type) || e.dotsOptions.type,
|
|
16222
16227
|
window: _this86._window
|
|
16223
16228
|
});
|
|
16224
16229
|
var _loop6 = function _loop6(_e5) {
|
|
16225
16230
|
var _loop7 = function _loop7(_i5) {
|
|
16226
|
-
(null === (
|
|
16231
|
+
(null === (S = f[_e5]) || void 0 === S ? void 0 : S[_i5]) && (_t8.draw(k + _i5 * o, B + _e5 * o, o, function (t, r) {
|
|
16227
16232
|
var n;
|
|
16228
|
-
return !!(null === (n =
|
|
16229
|
-
}), _t8._element &&
|
|
16233
|
+
return !!(null === (n = f[_e5 + r]) || void 0 === n ? void 0 : n[_i5 + t]);
|
|
16234
|
+
}), _t8._element && P && P.appendChild(_t8._element));
|
|
16230
16235
|
};
|
|
16231
|
-
for (var _i5 = 0; _i5 <
|
|
16236
|
+
for (var _i5 = 0; _i5 < f[_e5].length; _i5++) {
|
|
16232
16237
|
_loop7(_i5);
|
|
16233
16238
|
}
|
|
16234
16239
|
};
|
|
16235
|
-
for (var _e5 = 0; _e5 <
|
|
16240
|
+
for (var _e5 = 0; _e5 < f.length; _e5++) {
|
|
16236
16241
|
_loop6(_e5);
|
|
16237
16242
|
}
|
|
16238
16243
|
}
|
|
16239
|
-
if (((null === (
|
|
16240
|
-
options: null === (
|
|
16241
|
-
color: null === (
|
|
16244
|
+
if (((null === (C = e.cornersDotOptions) || void 0 === C ? void 0 : C.gradient) || (null === (A = e.cornersDotOptions) || void 0 === A ? void 0 : A.color)) && (I = _this86._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), I.setAttribute("id", "clip-path-corners-dot-color-".concat(t, "-").concat(r, "-").concat(_this86._instanceId)), _this86._defs.appendChild(I), _this86._cornersDotClipPath = I, _this86._createColor({
|
|
16245
|
+
options: null === (M = e.cornersDotOptions) || void 0 === M ? void 0 : M.gradient,
|
|
16246
|
+
color: null === ($ = e.cornersDotOptions) || void 0 === $ ? void 0 : $.color,
|
|
16242
16247
|
additionalRotation: n,
|
|
16243
|
-
x:
|
|
16244
|
-
y:
|
|
16245
|
-
height:
|
|
16246
|
-
width:
|
|
16248
|
+
x: k + 2 * o,
|
|
16249
|
+
y: B + 2 * o,
|
|
16250
|
+
height: u,
|
|
16251
|
+
width: u,
|
|
16247
16252
|
name: "corners-dot-color-".concat(t, "-").concat(r, "-").concat(_this86._instanceId)
|
|
16248
|
-
})), null === (
|
|
16249
|
-
var _t9 = new
|
|
16253
|
+
})), (null === (O = e.cornersDotOptions) || void 0 === O ? void 0 : O.type) && c.includes(e.cornersDotOptions.type)) {
|
|
16254
|
+
var _t9 = new l({
|
|
16250
16255
|
svg: _this86._element,
|
|
16251
16256
|
type: e.cornersDotOptions.type,
|
|
16252
16257
|
window: _this86._window
|
|
16253
16258
|
});
|
|
16254
|
-
_t9.draw(
|
|
16259
|
+
_t9.draw(k + 2 * o, B + 2 * o, u, n), _t9._element && I && I.appendChild(_t9._element);
|
|
16255
16260
|
} else {
|
|
16256
16261
|
var _t10 = new s({
|
|
16257
16262
|
svg: _this86._element,
|
|
16258
|
-
type: e.dotsOptions.type,
|
|
16263
|
+
type: (null === (D = e.cornersDotOptions) || void 0 === D ? void 0 : D.type) || e.dotsOptions.type,
|
|
16259
16264
|
window: _this86._window
|
|
16260
16265
|
});
|
|
16261
16266
|
var _loop8 = function _loop8(_e6) {
|
|
16262
16267
|
var _loop9 = function _loop9(_i6) {
|
|
16263
|
-
(null === (
|
|
16268
|
+
(null === (z = w[_e6]) || void 0 === z ? void 0 : z[_i6]) && (_t10.draw(k + _i6 * o, B + _e6 * o, o, function (t, r) {
|
|
16264
16269
|
var n;
|
|
16265
|
-
return !!(null === (n =
|
|
16266
|
-
}), _t10._element &&
|
|
16270
|
+
return !!(null === (n = w[_e6 + r]) || void 0 === n ? void 0 : n[_i6 + t]);
|
|
16271
|
+
}), _t10._element && I && I.appendChild(_t10._element));
|
|
16267
16272
|
};
|
|
16268
|
-
for (var _i6 = 0; _i6 <
|
|
16273
|
+
for (var _i6 = 0; _i6 < w[_e6].length; _i6++) {
|
|
16269
16274
|
_loop9(_i6);
|
|
16270
16275
|
}
|
|
16271
16276
|
};
|
|
16272
|
-
for (var _e6 = 0; _e6 <
|
|
16277
|
+
for (var _e6 = 0; _e6 < w.length; _e6++) {
|
|
16273
16278
|
_loop8(_e6);
|
|
16274
16279
|
}
|
|
16275
16280
|
}
|
|
@@ -16322,7 +16327,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16322
16327
|
}
|
|
16323
16328
|
}, _callee50);
|
|
16324
16329
|
}));
|
|
16325
|
-
return function (
|
|
16330
|
+
return function (_x18, _x19) {
|
|
16326
16331
|
return _ref22.apply(this, arguments);
|
|
16327
16332
|
};
|
|
16328
16333
|
}()(r.image || "", _this87._window);
|
|
@@ -16356,7 +16361,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16356
16361
|
}
|
|
16357
16362
|
}, _callee52, this);
|
|
16358
16363
|
}));
|
|
16359
|
-
function drawImage(
|
|
16364
|
+
function drawImage(_x20) {
|
|
16360
16365
|
return _drawImage.apply(this, arguments);
|
|
16361
16366
|
}
|
|
16362
16367
|
return drawImage;
|
|
@@ -16382,9 +16387,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16382
16387
|
_d = (_h + 2 * Math.PI) % (2 * Math.PI);
|
|
16383
16388
|
var _u = r + s / 2,
|
|
16384
16389
|
_c = n + o / 2,
|
|
16385
|
-
|
|
16390
|
+
_l = r + s / 2,
|
|
16386
16391
|
_g = n + o / 2;
|
|
16387
|
-
_d >= 0 && _d <= .25 * Math.PI || _d > 1.75 * Math.PI && _d <= 2 * Math.PI ? (_u -= s / 2, _c -= o / 2 * Math.tan(_h),
|
|
16392
|
+
_d >= 0 && _d <= .25 * Math.PI || _d > 1.75 * Math.PI && _d <= 2 * Math.PI ? (_u -= s / 2, _c -= o / 2 * Math.tan(_h), _l += s / 2, _g += o / 2 * Math.tan(_h)) : _d > .25 * Math.PI && _d <= .75 * Math.PI ? (_c -= o / 2, _u -= s / 2 / Math.tan(_h), _g += o / 2, _l += s / 2 / Math.tan(_h)) : _d > .75 * Math.PI && _d <= 1.25 * Math.PI ? (_u += s / 2, _c += o / 2 * Math.tan(_h), _l -= s / 2, _g -= o / 2 * Math.tan(_h)) : _d > 1.25 * Math.PI && _d <= 1.75 * Math.PI && (_c += o / 2, _u += s / 2 / Math.tan(_h), _g -= o / 2, _l -= s / 2 / Math.tan(_h)), _e8 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"), _e8.setAttribute("id", a), _e8.setAttribute("gradientUnits", "userSpaceOnUse"), _e8.setAttribute("x1", String(Math.round(_u))), _e8.setAttribute("y1", String(Math.round(_c))), _e8.setAttribute("x2", String(Math.round(_l))), _e8.setAttribute("y2", String(Math.round(_g)));
|
|
16388
16393
|
}
|
|
16389
16394
|
t.colorStops.forEach(function (_ref25) {
|
|
16390
16395
|
var t = _ref25.offset,
|
|
@@ -16397,20 +16402,20 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16397
16402
|
}
|
|
16398
16403
|
}]);
|
|
16399
16404
|
}();
|
|
16400
|
-
|
|
16401
|
-
var
|
|
16402
|
-
|
|
16403
|
-
|
|
16404
|
-
for (var _t12 = 0; _t12 <= 40; _t12++)
|
|
16405
|
-
var
|
|
16406
|
-
type:
|
|
16405
|
+
p.instanceCount = 0;
|
|
16406
|
+
var v = p,
|
|
16407
|
+
_ = "canvas",
|
|
16408
|
+
m = {};
|
|
16409
|
+
for (var _t12 = 0; _t12 <= 40; _t12++) m[_t12] = _t12;
|
|
16410
|
+
var b = {
|
|
16411
|
+
type: _,
|
|
16407
16412
|
shape: "square",
|
|
16408
16413
|
width: 300,
|
|
16409
16414
|
height: 300,
|
|
16410
16415
|
data: "",
|
|
16411
16416
|
margin: 0,
|
|
16412
16417
|
qrOptions: {
|
|
16413
|
-
typeNumber:
|
|
16418
|
+
typeNumber: m[0],
|
|
16414
16419
|
mode: void 0,
|
|
16415
16420
|
errorCorrectionLevel: "Q"
|
|
16416
16421
|
},
|
|
@@ -16431,7 +16436,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16431
16436
|
color: "#fff"
|
|
16432
16437
|
}
|
|
16433
16438
|
};
|
|
16434
|
-
function
|
|
16439
|
+
function y(t) {
|
|
16435
16440
|
var e = Object.assign({}, t);
|
|
16436
16441
|
if (!e.colorStops || !e.colorStops.length) throw "Field 'colorStops' is required in gradient";
|
|
16437
16442
|
return e.rotation ? e.rotation = Number(e.rotation) : e.rotation = 0, e.colorStops = e.colorStops.map(function (t) {
|
|
@@ -16440,17 +16445,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16440
16445
|
});
|
|
16441
16446
|
}), e;
|
|
16442
16447
|
}
|
|
16443
|
-
function
|
|
16448
|
+
function x(t) {
|
|
16444
16449
|
var e = Object.assign({}, t);
|
|
16445
16450
|
return e.width = Number(e.width), e.height = Number(e.height), e.margin = Number(e.margin), e.imageOptions = Object.assign(Object.assign({}, e.imageOptions), {
|
|
16446
16451
|
hideBackgroundDots: Boolean(e.imageOptions.hideBackgroundDots),
|
|
16447
16452
|
imageSize: Number(e.imageOptions.imageSize),
|
|
16448
16453
|
margin: Number(e.imageOptions.margin)
|
|
16449
|
-
}), e.margin > Math.min(e.width, e.height) && (e.margin = Math.min(e.width, e.height)), e.dotsOptions = Object.assign({}, e.dotsOptions), e.dotsOptions.gradient && (e.dotsOptions.gradient =
|
|
16454
|
+
}), e.margin > Math.min(e.width, e.height) && (e.margin = Math.min(e.width, e.height)), e.dotsOptions = Object.assign({}, e.dotsOptions), e.dotsOptions.gradient && (e.dotsOptions.gradient = y(e.dotsOptions.gradient)), e.cornersSquareOptions && (e.cornersSquareOptions = Object.assign({}, e.cornersSquareOptions), e.cornersSquareOptions.gradient && (e.cornersSquareOptions.gradient = y(e.cornersSquareOptions.gradient))), e.cornersDotOptions && (e.cornersDotOptions = Object.assign({}, e.cornersDotOptions), e.cornersDotOptions.gradient && (e.cornersDotOptions.gradient = y(e.cornersDotOptions.gradient))), e.backgroundOptions && (e.backgroundOptions = Object.assign({}, e.backgroundOptions), e.backgroundOptions.gradient && (e.backgroundOptions.gradient = y(e.backgroundOptions.gradient))), e;
|
|
16450
16455
|
}
|
|
16451
|
-
var
|
|
16452
|
-
|
|
16453
|
-
function
|
|
16456
|
+
var S = i(873),
|
|
16457
|
+
C = i.n(S);
|
|
16458
|
+
function A(t) {
|
|
16454
16459
|
if (!t) throw new Error("Extension must be defined");
|
|
16455
16460
|
"." === t[0] && (t = t.substring(1));
|
|
16456
16461
|
var e = {
|
|
@@ -16469,19 +16474,19 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16469
16474
|
if (!e) throw new Error("Extension \"".concat(t, "\" is not supported"));
|
|
16470
16475
|
return e;
|
|
16471
16476
|
}
|
|
16472
|
-
var
|
|
16473
|
-
function
|
|
16474
|
-
_classCallCheck(this,
|
|
16477
|
+
var M = /*#__PURE__*/function () {
|
|
16478
|
+
function M(t) {
|
|
16479
|
+
_classCallCheck(this, M);
|
|
16475
16480
|
(null == t ? void 0 : t.jsdom) ? this._window = new t.jsdom("", {
|
|
16476
16481
|
resources: "usable"
|
|
16477
|
-
}).window : this._window = window, this._options = t ?
|
|
16482
|
+
}).window : this._window = window, this._options = t ? x(e(b, t)) : b, this.update();
|
|
16478
16483
|
}
|
|
16479
|
-
return _createClass(
|
|
16484
|
+
return _createClass(M, [{
|
|
16480
16485
|
key: "_setupSvg",
|
|
16481
16486
|
value: function _setupSvg() {
|
|
16482
16487
|
var _this89 = this;
|
|
16483
16488
|
if (!this._qr) return;
|
|
16484
|
-
var t = new
|
|
16489
|
+
var t = new v(this._options, this._window);
|
|
16485
16490
|
this._svg = t.getElement(), this._svgDrawingPromise = t.drawQR(this._qr).then(function () {
|
|
16486
16491
|
var e;
|
|
16487
16492
|
_this89._svg && (null === (e = _this89._extension) || void 0 === e || e.call(_this89, t.getElement(), _this89._options));
|
|
@@ -16498,7 +16503,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16498
16503
|
var e = _this90._svg,
|
|
16499
16504
|
i = new _this90._window.XMLSerializer().serializeToString(e),
|
|
16500
16505
|
r = btoa(i),
|
|
16501
|
-
n = "data:".concat(
|
|
16506
|
+
n = "data:".concat(A("svg"), ";base64,").concat(r);
|
|
16502
16507
|
if (null === (t = _this90._options.nodeCanvas) || void 0 === t ? void 0 : t.loadImage) return _this90._options.nodeCanvas.loadImage(n).then(function (t) {
|
|
16503
16508
|
var e, i;
|
|
16504
16509
|
t.width = _this90._options.width, t.height = _this90._options.height, null === (i = null === (e = _this90._nodeCanvas) || void 0 === e ? void 0 : e.getContext("2d")) || void 0 === i || i.drawImage(t, 0, 0);
|
|
@@ -16563,7 +16568,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16563
16568
|
}, {
|
|
16564
16569
|
key: "update",
|
|
16565
16570
|
value: function update(t) {
|
|
16566
|
-
|
|
16571
|
+
M._clearContainer(this._container), this._options = t ? x(e(this._options, t)) : this._options, this._options.data && (this._qr = C()(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel), this._qr.addData(this._options.data, this._options.qrOptions.mode || function (t) {
|
|
16567
16572
|
switch (!0) {
|
|
16568
16573
|
case /^[0-9]*$/.test(t):
|
|
16569
16574
|
return "Numeric";
|
|
@@ -16572,14 +16577,14 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16572
16577
|
default:
|
|
16573
16578
|
return "Byte";
|
|
16574
16579
|
}
|
|
16575
|
-
}(this._options.data)), this._qr.make(), this._options.type ===
|
|
16580
|
+
}(this._options.data)), this._qr.make(), this._options.type === _ ? this._setupCanvas() : this._setupSvg(), this.append(this._container));
|
|
16576
16581
|
}
|
|
16577
16582
|
}, {
|
|
16578
16583
|
key: "append",
|
|
16579
16584
|
value: function append(t) {
|
|
16580
16585
|
if (t) {
|
|
16581
16586
|
if ("function" != typeof t.appendChild) throw "Container should be a single DOM node";
|
|
16582
|
-
this._options.type ===
|
|
16587
|
+
this._options.type === _ ? this._domCanvas && t.appendChild(this._domCanvas) : this._svg && t.appendChild(this._svg), this._container = t;
|
|
16583
16588
|
}
|
|
16584
16589
|
}
|
|
16585
16590
|
}, {
|
|
@@ -16616,7 +16621,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16616
16621
|
return this._getElement(t);
|
|
16617
16622
|
case 5:
|
|
16618
16623
|
e = _context54.sent;
|
|
16619
|
-
i =
|
|
16624
|
+
i = A(t);
|
|
16620
16625
|
if (e) {
|
|
16621
16626
|
_context54.next = 9;
|
|
16622
16627
|
break;
|
|
@@ -16680,15 +16685,15 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16680
16685
|
r = _context55.sent;
|
|
16681
16686
|
if (r) if ("svg" === e.toLowerCase()) {
|
|
16682
16687
|
_t15 = new XMLSerializer().serializeToString(r);
|
|
16683
|
-
_t15 = '<?xml version="1.0" standalone="no"?>\r\n' + _t15, n("data:".concat(
|
|
16684
|
-
} else n(r.toDataURL(
|
|
16688
|
+
_t15 = '<?xml version="1.0" standalone="no"?>\r\n' + _t15, n("data:".concat(A(e), ";charset=utf-8,").concat(encodeURIComponent(_t15)), "".concat(i, ".svg"));
|
|
16689
|
+
} else n(r.toDataURL(A(e)), "".concat(i, ".").concat(e));
|
|
16685
16690
|
case 10:
|
|
16686
16691
|
case "end":
|
|
16687
16692
|
return _context55.stop();
|
|
16688
16693
|
}
|
|
16689
16694
|
}, _callee55, this);
|
|
16690
16695
|
}));
|
|
16691
|
-
function download(
|
|
16696
|
+
function download(_x21) {
|
|
16692
16697
|
return _download.apply(this, arguments);
|
|
16693
16698
|
}
|
|
16694
16699
|
return download;
|
|
@@ -16700,7 +16705,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16700
16705
|
}
|
|
16701
16706
|
}]);
|
|
16702
16707
|
}();
|
|
16703
|
-
var
|
|
16708
|
+
var $ = M;
|
|
16704
16709
|
}(), r["default"];
|
|
16705
16710
|
}();
|
|
16706
16711
|
});
|