mirror of
https://gitee.com/myxzgzs/boyue_jnpf.git
synced 2025-08-08 15:22:43 +08:00
6 lines
22 KiB
JavaScript
6 lines
22 KiB
JavaScript
![]() |
/*! QRious v4.0.2 | (C) 2017 Alasdair Mercer | GPL v3 License
|
||
|
Based on jsqrencode | (C) 2010 tz@execpc.com | GPL v3 License
|
||
|
*/
|
||
|
!function (t, e) { "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.QRious = e() }(this, function () { "use strict"; function t (t, e) { var n; return "function" == typeof Object.create ? n = Object.create(t) : (s.prototype = t, n = new s, s.prototype = null), e && i(!0, n, e), n } function e (e, n, s, r) { var o = this; return "string" != typeof e && (r = s, s = n, n = e, e = null), "function" != typeof n && (r = s, s = n, n = function () { return o.apply(this, arguments) }), i(!1, n, o, r), n.prototype = t(o.prototype, s), n.prototype.constructor = n, n.class_ = e || o.class_, n.super_ = o, n } function i (t, e, i) { for (var n, s, a = 0, h = (i = o.call(arguments, 2)).length; a < h; a++) { s = i[a]; for (n in s) t && !r.call(s, n) || (e[n] = s[n]) } } function n () { } var s = function () { }, r = Object.prototype.hasOwnProperty, o = Array.prototype.slice, a = e; n.class_ = "Nevis", n.super_ = Object, n.extend = a; var h = n, f = h.extend(function (t, e, i) { this.qrious = t, this.element = e, this.element.qrious = t, this.enabled = Boolean(i) }, { draw: function (t) { }, getElement: function () { return this.enabled || (this.enabled = !0, this.render()), this.element }, getModuleSize: function (t) { var e = this.qrious, i = e.padding || 0, n = Math.floor((e.size - 2 * i) / t.width); return Math.max(1, n) }, getOffset: function (t) { var e = this.qrious, i = e.padding; if (null != i) return i; var n = this.getModuleSize(t), s = Math.floor((e.size - n * t.width) / 2); return Math.max(0, s) }, render: function (t) { this.enabled && (this.resize(), this.reset(), this.draw(t)) }, reset: function () { }, resize: function () { } }), c = f.extend({ draw: function (t) { var e, i, n = this.qrious, s = this.getModuleSize(t), r = this.getOffset(t), o = this.element.getContext("2d"); for (o.fillStyle = n.foreground, o.globalAlpha = n.foregroundAlpha, e = 0; e < t.width; e++)for (i = 0; i < t.width; i++)t.buffer[i * t.width + e] && o.fillRect(s * e + r, s * i + r, s, s) }, reset: function () { var t = this.qrious, e = this.element.getContext("2d"), i = t.size; e.lineWidth = 1, e.clearRect(0, 0, i, i), e.fillStyle = t.background, e.globalAlpha = t.backgroundAlpha, e.fillRect(0, 0, i, i) }, resize: function () { var t = this.element; t.width = t.height = this.qrious.size } }), u = h.extend(null, { BLOCK: [0, 11, 15, 19, 23, 27, 31, 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24, 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28] }), l = h.extend(null, { BLOCKS: [1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17, 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28, 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22, 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16, 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22, 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28, 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26, 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26, 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24, 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28, 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24, 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28, 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22, 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24, 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24, 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30, 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28, 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28, 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26, 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28, 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30, 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24, 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30, 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30, 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30, 10, 2, 114, 28, 19, 4,
|
||
|
|
||
|
//# sourceMappingURL=qrious.min.js.map
|