diff --git a/CHANGES.md b/CHANGES.md index fe4a320..f2365cd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +## Version 2.0.2, 2016.08.05 + +* Fix bug where mask is incorrectly applied [#50](https://github.com/neocotic/qrious/issues/50) + ## Version 2.0.1, 2016.07.03 * Correct license mentioned into `README.md` diff --git a/README.md b/README.md index 1d43bb3..9e53124 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ The current version of `QRious`. ``` javascript console.log(QRious.VERSION) -//=> "2.0.0" +//=> "2.0.2" ``` ## Migrating from v1 @@ -213,6 +213,7 @@ A list of QRious contributors can be found in [AUTHORS.md](https://github.com/ne ## License -Copyright (c) 2016 Alasdair Mercer +Copyright © 2016 Alasdair Mercer +Copyright © 2010 Tom Zerucha See [LICENSE.md](https://github.com/neocotic/qrious/blob/master/LICENSE.md) for more information on our GPLv3 license. diff --git a/bower.json b/bower.json index 09bb405..25a23fb 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "qrious", - "version": "2.0.1", + "version": "2.0.2", "description": "Library for QR code generation using canvas", "homepage": "https://github.com/neocotic/qrious", "authors": [ diff --git a/dist/cjs/qrious.js b/dist/cjs/qrious.js index 55fdd36..855cdb3 100644 --- a/dist/cjs/qrious.js +++ b/dist/cjs/qrious.js @@ -1,5 +1,5 @@ /* - * QRious v2.0.1 + * QRious v2.0.2 * Copyright (C) 2016 Alasdair Mercer * Copyright (C) 2010 Tom Zerucha * @@ -921,7 +921,7 @@ var Frame = function () { this._value = options.value; this._valueLength = this._value.length; this._version = 0; - this._stringBuffer = this._value.slice(0); + this._stringBuffer = []; var dataBlock = void 0; var eccBlock = void 0; @@ -981,7 +981,7 @@ var Frame = function () { this._insertTimingRowAndColumn(); this._insertVersion(); this._syncMask(); - this._convertBitStream(this._stringBuffer.length); + this._convertBitStream(this._value.length); this._calculatePolynomial(); this._appendEccToData(); this._interleaveBlocks(); @@ -1153,7 +1153,7 @@ var Frame = function () { _r3x4 = 0; } - if (!(_x6 & _y6 & 1 + (_r3x4 && _r3x4 === _r3y3) & 1) && !this._isMasked(_x6, _y6)) { + if (!((_x6 & _y6 & 1) + (_r3x4 && _r3x4 === _r3y3) & 1) && !this._isMasked(_x6, _y6)) { this.buffer[_x6 + _y6 * width] ^= 1; } } @@ -1289,11 +1289,9 @@ var Frame = function () { }, { key: '_convertBitStream', value: function _convertBitStream(length) { - // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji - // not supported). - + // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji not supported). for (var i = 0; i < length; i++) { - this._ecc[i] = this._stringBuffer.charCodeAt(i); + this._ecc[i] = this._value.charCodeAt(i); } this._stringBuffer = this._ecc.slice(0); @@ -1917,7 +1915,7 @@ var QRious = function () { }, { key: 'VERSION', get: function get() { - return '2.0.1'; + return '2.0.2'; } }]); diff --git a/dist/cjs/qrious.js.map b/dist/cjs/qrious.js.map index 928c9bc..678046c 100644 --- a/dist/cjs/qrious.js.map +++ b/dist/cjs/qrious.js.map @@ -1 +1 @@ -{"version":3,"file":null,"sources":["../../../../../../\u0000babelHelpers","../../src/util/Utilities.js","../../src/service/Service.js","../../src/service/element/ElementService.js","../../src/service/element/NodeElementService.js","../../src/renderer/Renderer.js","../../src/renderer/CanvasRenderer.js","../../src/Alignment.js","../../src/ErrorCorrection.js","../../src/Galois.js","../../src/Version.js","../../src/Frame.js","../../src/renderer/ImageRenderer.js","../../src/service/ServiceManager.js","../../src/QRious.js","../../src/runtime/node.js"],"sourcesContent":["var babelHelpers = {};\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n};\n\nexport var jsx = function () {\n var REACT_ELEMENT_TYPE = typeof Symbol === \"function\" && Symbol.for && Symbol.for(\"react.element\") || 0xeac7;\n return function createRawReactElement(type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n props = {};\n }\n\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null\n };\n };\n}();\n\nexport var asyncToGenerator = function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n return step(\"next\", value);\n }, function (err) {\n return step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n};\n\nexport var classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nexport var createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nexport var defineEnumerableProperties = function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n return obj;\n};\n\nexport var defaults = function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n\n return obj;\n};\n\nexport var defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nexport var get = function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n};\n\nexport var inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar _instanceof = function (left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n};\n\nexport var interopRequireDefault = function (obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n};\n\nexport var interopRequireWildcard = function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n return newObj;\n }\n};\n\nexport var newArrowCheck = function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n};\n\nexport var objectDestructuringEmpty = function (obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n};\n\nexport var objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nexport var possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nexport var selfGlobal = typeof global === \"undefined\" ? self : global;\n\nexport var set = function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if (\"value\" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n};\n\nexport var slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\n\nexport var slicedToArrayLoose = function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n\n if (i && _arr.length === i) break;\n }\n\n return _arr;\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n};\n\nexport var taggedTemplateLiteral = function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n};\n\nexport var taggedTemplateLiteralLoose = function (strings, raw) {\n strings.raw = raw;\n return strings;\n};\n\nexport var temporalRef = function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n } else {\n return val;\n }\n};\n\nexport var temporalUndefined = {};\n\nexport var toArray = function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n};\n\nexport var toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n};\n\nbabelHelpers;\n\nexport { _typeof as typeof, _extends as extends, _instanceof as instanceof }","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n */\nclass Utilities {\n\n /**\n * Copies all properties from the source object to the target object, however, all property\n * names on the target will be prefixed with an underscore, used to indicate that they are private.\n *\n * @param {Object} target - the object to which the private fields are to be copied\n * @param {Object} source - the object from which the fields are to be copied\n * @return {Object} A reference to the target object.\n * @public\n * @static\n */\n static privatize(target, source) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n target[`_${key}`] = source[key]\n }\n }\n\n return target\n }\n\n /**\n * Sets the specified value on a given field on the object provided.\n *\n * If value is null, the specified default value will be used instead.\n *\n * An optional transformer can be specified which will be used to transform the value (or default value)\n * before it is assigned to the field.\n *\n * @param {Object} object - the object whose field is to be set with value\n * @param {String} fieldName - the field to be set with value\n * @param {*} value - the value to be set on the named field\n * @param {*} [defaultValue] - the value to be used if value is null\n * @param {Function} [transformer] - a function used to transform the value before it is assigned to the named field\n * @return {Boolean} true if the value of the field has changed as a result of the assignment; otherwise\n * false.\n * @public\n * @static\n */\n static setter(object, fieldName, value, defaultValue, transformer) {\n const oldValue = object[fieldName]\n let newValue = value != null ? value : defaultValue\n if (typeof transformer === 'function') {\n newValue = transformer(newValue)\n }\n\n object[fieldName] = newValue\n\n return newValue !== oldValue\n }\n\n /**\n * Throws an error indicating that the a given method on a specific class has not been implemented.\n *\n * @param {String} className - the name of the class on which the method has not been implemented\n * @param {String} methodName - the name of the method which has not been implemented\n * @throws {Error} The error describing the class method which has not been implemented.\n * @public\n * @static\n */\n static throwUnimplemented(className, methodName) {\n throw new Error(`\"${methodName}\" method must be implemented on the ${className} class`)\n }\n\n /**\n * Transforms the specified string to upper case while remaining null-safe.\n *\n * @param {String} string - the string to be transformed to upper case\n * @return {String} string transformed to upper case if string is not null.\n * @public\n * @static\n */\n static toUpperCase(string) {\n return string != null && string.toUpperCase()\n }\n}\n\nexport default Utilities\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n */\nclass Service {\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {String} The service name.\n * @public\n */\n getName() {\n Utilities.throwUnimplemented('Service', 'getName')\n }\n}\n\nexport default Service\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Service from '../Service'\nimport Utilities from '../../util/Utilities'\n\n/**\n * A service for working with elements.\n *\n * @public\n * @extends Service\n */\nclass ElementService extends Service {\n\n /**\n * Creates an instance of a canvas element.\n *\n * @return {*} The newly created canvas element.\n * @public\n */\n createCanvas() {\n Utilities.throwUnimplemented('ElementService', 'createCanvas')\n }\n\n /**\n * Creates an instance of a image element.\n *\n * @return {*} The newly created image element.\n * @public\n */\n createImage() {\n Utilities.throwUnimplemented('ElementService', 'createImage')\n }\n\n /**\n * @override\n */\n getName() {\n return 'element'\n }\n\n /**\n * Returns whether the specified element is a canvas.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is a canvas; otherwise false.\n * @public\n */\n isCanvas(element) {\n Utilities.throwUnimplemented('ElementService', 'isCanvas')\n }\n\n /**\n * Returns whether the specified element is an image.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is an image; otherwise false.\n * @public\n */\n isImage(element) {\n Utilities.throwUnimplemented('ElementService', 'isImage')\n }\n}\n\nexport default ElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Canvas, { Image } from 'canvas'\n\nimport ElementService from './ElementService'\n\n/**\n * An implementation of {@link ElementService} intended for use within a Node.js environment but is only supported when\n * the canvas module has also been depended on.\n *\n * @public\n * @extends ElementService\n */\nclass NodeElementService extends ElementService {\n\n /**\n * @override\n */\n static isSupported() {\n return Canvas != null\n }\n\n /**\n * @override\n */\n createCanvas() {\n return new Canvas()\n }\n\n /**\n * @override\n */\n createImage() {\n return new Image()\n }\n\n /**\n * @override\n */\n isCanvas(element) {\n return element instanceof Canvas\n }\n\n /**\n * @override\n */\n isImage(element) {\n return element instanceof Image\n }\n}\n\nexport default NodeElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so ordering of their execution is important.\n *\n * @public\n */\nclass Renderer {\n\n /**\n * Creates a new instance of {@link Renderer} for the qrious instance provided.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @public\n */\n constructor(qrious) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n */\n this.qrious = qrious\n }\n\n /**\n * Draws the specified QR code frame on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @protected\n */\n draw(frame) {\n Utilities.throwUnimplemented('Renderer', 'draw')\n }\n\n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame provided.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {Number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n */\n getModuleSize(frame) {\n const pixels = Math.floor(this.qrious.size / frame.width)\n\n return Math.max(1, pixels)\n }\n\n /**\n * Calculates the offset/padding (in pixel units) to be inserted before the QR code based on the frame\n * provided.\n *\n * The returned value will be zero if there is no available offset or if the size of the QR code does not fit its\n * contents. It will never be a negative value. This is done so that the inevitable clipping appears more naturally\n * and it is not clipped from all directions.\n *\n * @param {Frame} frame - the {@link Frame} from which the offset is to be derived\n * @return {Number} The pixel offset for the QR code which will be no less than zero.\n * @protected\n */\n getOffset(frame) {\n const moduleSize = this.getModuleSize(frame)\n const offset = Math.floor((this.qrious.size - moduleSize * frame.width) / 2)\n\n return Math.max(0, offset)\n }\n\n /**\n * Renders a QR code on the underlying element based on the frame provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @public\n */\n render(frame) {\n this.resize()\n this.reset()\n this.draw(frame)\n }\n\n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n reset() {\n Utilities.throwUnimplemented('Renderer', 'reset')\n }\n\n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n resize() {\n Utilities.throwUnimplemented('Renderer', 'resize')\n }\n}\n\nexport default Renderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with canvas elements.\n *\n * @public\n * @extends Renderer\n */\nclass CanvasRenderer extends Renderer {\n\n /**\n * @override\n */\n draw(frame) {\n const qrious = this.qrious\n const moduleSize = this.getModuleSize(frame)\n const offset = this.getOffset(frame)\n const context = qrious.canvas.getContext('2d')\n\n context.fillStyle = qrious.foreground\n\n for (let i = 0; i < frame.width; i++) {\n for (let j = 0; j < frame.width; j++) {\n if (frame.buffer[j * frame.width + i]) {\n context.fillRect(moduleSize * i + offset, moduleSize * j + offset, moduleSize, moduleSize)\n }\n }\n }\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n const context = qrious.canvas.getContext('2d')\n\n context.lineWidth = 1\n context.clearRect(0, 0, qrious.size, qrious.size)\n context.fillStyle = qrious.background\n context.fillRect(0, 0, qrious.size, qrious.size)\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const canvas = qrious.canvas\n\n canvas.width = qrious.size\n canvas.height = qrious.size\n }\n}\n\nexport default CanvasRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains alignment pattern information.\n *\n * @public\n */\nclass Alignment {\n\n /**\n * Returns the alignment pattern block.\n *\n * @return {Number[]} The alignment pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n }\n}\n\nexport default Alignment\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains error correction information.\n *\n * @public\n */\nclass ErrorCorrection {\n\n /**\n * Returns the error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @return {Number[]} The ECC blocks.\n * @public\n * @static\n */\n static get BLOCKS() {\n return [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ]\n }\n\n /**\n * Returns the final format bits with mask (level << 3 | mask).\n *\n * @return {Number[]} The final format bits.\n * @public\n * @static\n */\n static get FINAL_FORMAT() {\n return [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ]\n }\n\n /**\n * Returns a map of human-readable ECC levels.\n *\n * @return {Object} A ECC level mapping.\n * @public\n * @static\n */\n static get LEVELS() {\n return {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n }\n}\n\nexport default ErrorCorrection\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains Galois field information.\n *\n * @public\n */\nclass Galois {\n\n /**\n * Returns the Galois field exponent table.\n *\n * @return {Number[]} The Galois field exponent table.\n * @public\n * @static\n */\n static get EXPONENT() {\n return [\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x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6,\n 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ]\n }\n\n /**\n * Returns the Galois field log table.\n *\n * @return {Number[]} The Galois field log table.\n * @public\n * @static\n */\n static get LOG() {\n return [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,\n 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6,\n 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88,\n 0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40,\n 0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d,\n 0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57,\n 0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18,\n 0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e,\n 0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61,\n 0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2,\n 0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6,\n 0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a,\n 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,\n 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n ]\n }\n}\n\nexport default Galois\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains version pattern information.\n *\n * @public\n */\nclass Version {\n\n /**\n * Returns the version pattern block.\n *\n * @return {Number[]} The version pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n }\n}\n\nexport default Version\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Alignment from './Alignment'\nimport ErrorCorrection from './ErrorCorrection'\nimport Galois from './Galois'\nimport Version from './Version'\n\n/**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @public\n */\nclass Frame {\n\n static _createArray(length) {\n const array = []\n\n for (let i = 0; i < length; i++) {\n array[i] = 0\n }\n\n return array\n }\n\n static _getMaskBit(x, y) {\n let bit\n\n if (x > y) {\n bit = x\n x = y\n y = bit\n }\n\n bit = y\n bit += y * y\n bit >>= 1\n bit += x\n\n return bit\n }\n\n static _modN(x) {\n while (x >= 255) {\n x -= 255\n x = (x >> 8) + (x & 255)\n }\n\n return x\n }\n\n // *Badness* coefficients.\n static get N1() {\n return 3\n }\n static get N2() {\n return 3\n }\n static get N3() {\n return 40\n }\n static get N4() {\n return 10\n }\n\n /**\n * Creates an instance of {@link Frame} based on the options provided.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n */\n constructor(options) {\n this._badness = []\n this._level = ErrorCorrection.LEVELS[options.level]\n this._polynomial = []\n this._value = options.value\n this._valueLength = this._value.length\n this._version = 0\n this._stringBuffer = this._value.slice(0)\n\n let dataBlock\n let eccBlock\n let neccBlock1\n let neccBlock2\n\n while (this._version < 40) {\n this._version++\n\n let index = (this._level - 1) * 4 + (this._version - 1) * 16\n\n neccBlock1 = ErrorCorrection.BLOCKS[index++]\n neccBlock2 = ErrorCorrection.BLOCKS[index++]\n dataBlock = ErrorCorrection.BLOCKS[index++]\n eccBlock = ErrorCorrection.BLOCKS[index]\n\n index = dataBlock * (neccBlock1 + neccBlock2) + neccBlock2 - 3 + (this._version <= 9)\n\n if (this._valueLength <= index) {\n break\n }\n }\n\n this._dataBlock = dataBlock\n this._eccBlock = eccBlock\n this._neccBlock1 = neccBlock1\n this._neccBlock2 = neccBlock2\n\n /**\n * The data width is based on version.\n *\n * @public\n * @type {Number}\n */\n // FIXME: Ensure that it fits instead of being truncated.\n this.width = 17 + 4 * this._version\n\n /**\n * The image buffer.\n *\n * @public\n * @type {Number[]}\n */\n this.buffer = Frame._createArray(this.width * this.width)\n\n this._ecc = Frame._createArray(this._dataBlock + (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2)\n this._mask = Frame._createArray((this.width * (this.width + 1) + 1) / 2)\n\n this._insertFinders()\n this._insertAlignments()\n\n // Insert single foreground cell.\n this.buffer[8 + this.width * (this.width - 8)] = 1\n\n this._insertTimingGap()\n this._reverseMask()\n this._insertTimingRowAndColumn()\n this._insertVersion()\n this._syncMask()\n this._convertBitStream(this._stringBuffer.length)\n this._calculatePolynomial()\n this._appendEccToData()\n this._interleaveBlocks()\n this._pack()\n this._finish()\n }\n\n _addAlignment(x, y) {\n this.buffer[x + this.width * y] = 1\n\n for (let i = -2; i < 2; i++) {\n this.buffer[x + i + this.width * (y - 2)] = 1\n this.buffer[x - 2 + this.width * (y + i + 1)] = 1\n this.buffer[x + 2 + this.width * (y + i)] = 1\n this.buffer[x + i + 1 + this.width * (y + 2)] = 1\n }\n\n for (let i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i)\n this._setMask(x + 1, y - i)\n this._setMask(x - i, y - 1)\n this._setMask(x + i, y + 1)\n }\n }\n\n _appendData(data, dataLength, ecc, eccLength) {\n for (let i = 0; i < eccLength; i++) {\n this._stringBuffer[ecc + i] = 0\n }\n\n for (let i = 0; i < dataLength; i++) {\n const bit = Galois.LOG[this._stringBuffer[data + i] ^ this._stringBuffer[ecc]]\n\n if (bit !== 255) {\n for (let j = 1; j < eccLength; j++) {\n this._stringBuffer[ecc + j - 1] = this._stringBuffer[ecc + j] ^ Galois.EXPONENT[Frame._modN(bit + this._polynomial[eccLength - j])]\n }\n } else {\n for (let j = ecc; j < ecc + eccLength; j++) {\n this._stringBuffer[j] = this._stringBuffer[j + 1]\n }\n }\n\n this._stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois.EXPONENT[Frame._modN(bit + this._polynomial[0])]\n }\n }\n\n _appendEccToData() {\n let data = 0\n let ecc = this._calculateMaxLength()\n\n for (let i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, this._dataBlock, ecc, this._eccBlock)\n\n data += this._dataBlock\n ecc += this._eccBlock\n }\n\n for (let i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, this._dataBlock + 1, ecc, this._eccBlock)\n\n data += this._dataBlock + 1\n ecc += this._eccBlock\n }\n }\n\n _applyMask(mask) {\n const width = this.width\n\n switch (mask) {\n case 0:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(x + y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 1:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 2:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 3:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 4:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, r3y = y >> 1 & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n r3y = !r3y\n }\n\n if (!r3y && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 5:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 6:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!(x & y & 1 + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 7:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n }\n }\n\n _calculateMaxLength() {\n return this._dataBlock * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n }\n\n _calculatePolynomial() {\n this._polynomial[0] = 1\n\n for (let i = 0; i < this._eccBlock; i++) {\n this._polynomial[i + 1] = 1\n\n for (let j = i; j > 0; j--) {\n this._polynomial[j] = this._polynomial[j] ? this._polynomial[j - 1] ^ Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[j]] + i)] : this._polynomial[j - 1]\n }\n\n this._polynomial[0] = Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[0]] + i)]\n }\n\n // Use logs for generator polynomial to save calculation step.\n for (let i = 0; i <= this._eccBlock; i++) {\n this._polynomial[i] = Galois.LOG[this._polynomial[i]]\n }\n }\n\n _checkBadness() {\n let bad = 0\n const width = this.width\n\n // Blocks of same colour.\n for (let y = 0; y < width - 1; y++) {\n for (let x = 0; x < width - 1; x++) {\n // All foreground colour.\n if (this.buffer[x + width * y] &&\n this.buffer[x + 1 + width * y] &&\n this.buffer[x + width * (y + 1)] &&\n this.buffer[x + 1 + width * (y + 1)] ||\n // All background colour.\n !(this.buffer[x + width * y] ||\n this.buffer[x + 1 + width * y] ||\n this.buffer[x + width * (y + 1)] ||\n this.buffer[x + 1 + width * (y + 1)])) {\n bad += Frame.N2\n }\n }\n }\n\n let bw = 0\n\n // X runs.\n for (let y = 0; y < width; y++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, x = 0; x < width; x++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n bw += b ? 1 : -1\n }\n\n bad += this._getBadness(h)\n }\n\n if (bw < 0) {\n bw = -bw\n }\n\n let count = 0\n let big = bw\n big += big << 2\n big <<= 1\n\n while (big > width * width) {\n big -= width * width\n count++\n }\n\n bad += count * Frame.N4\n\n // Y runs.\n for (let x = 0; x < width; x++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, y = 0; y < width; y++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n }\n\n bad += this._getBadness(h)\n }\n\n return bad\n }\n\n _convertBitStream(length) {\n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji\n // not supported).\n\n for (let i = 0; i < length; i++) {\n this._ecc[i] = this._stringBuffer.charCodeAt(i)\n }\n\n this._stringBuffer = this._ecc.slice(0)\n\n const maxLength = this._calculateMaxLength()\n\n if (length >= maxLength - 2) {\n length = maxLength - 2\n\n if (this._version > 9) {\n length--\n }\n }\n\n // Shift and re-pack to insert length prefix.\n let index = length\n\n if (this._version > 9) {\n this._stringBuffer[index + 2] = 0\n this._stringBuffer[index + 3] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 3] |= 255 & bit << 4\n this._stringBuffer[index + 2] = bit >> 4\n }\n\n this._stringBuffer[2] |= 255 & length << 4\n this._stringBuffer[1] = length >> 4\n this._stringBuffer[0] = 0x40 | length >> 12\n } else {\n this._stringBuffer[index + 1] = 0\n this._stringBuffer[index + 2] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 2] |= 255 & bit << 4\n this._stringBuffer[index + 1] = bit >> 4\n }\n\n this._stringBuffer[1] |= 255 & length << 4\n this._stringBuffer[0] = 0x40 | length >> 4\n }\n\n // Fill to end with pad pattern.\n index = length + 3 - (this._version < 10)\n\n while (index < maxLength) {\n this._stringBuffer[index++] = 0xec\n this._stringBuffer[index++] = 0x11\n }\n }\n\n _getBadness(length) {\n let badRuns = 0\n\n for (let i = 0; i <= length; i++) {\n if (this._badness[i] >= 5) {\n badRuns += Frame.N1 + this._badness[i] - 5\n }\n }\n\n // FBFFFBF as in finder.\n for (let i = 3; i < length - 1; i += 2) {\n if (this._badness[i - 2] === this._badness[i + 2] &&\n this._badness[i + 2] === this._badness[i - 1] &&\n this._badness[i - 1] === this._badness[i + 1] &&\n this._badness[i - 1] * 3 === this._badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (this._badness[i - 3] === 0 || i + 3 > length ||\n this._badness[i - 3] * 3 >= this._badness[i] * 4 ||\n this._badness[i + 3] * 3 >= this._badness[i] * 4)) {\n badRuns += Frame.N3\n }\n }\n\n return badRuns\n }\n\n _finish() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice(0)\n\n let bit = 0\n let i\n let mask = 30000\n\n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i)\n\n const currentMask = this._checkBadness()\n\n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask\n bit = i\n }\n\n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break\n }\n\n // Reset for next pass.\n this.buffer = this._stringBuffer.slice(0)\n }\n\n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit)\n }\n\n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection.FINAL_FORMAT[bit + (this._level - 1 << 3)]\n\n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[this.width - 1 - i + this.width * 8] = 1\n\n if (i < 6) {\n this.buffer[8 + this.width * i] = 1\n } else {\n this.buffer[8 + this.width * (i + 1)] = 1\n }\n }\n }\n\n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[8 + this.width * (this.width - 7 + i)] = 1\n\n if (i) {\n this.buffer[6 - i + this.width * 8] = 1\n } else {\n this.buffer[7 + this.width * 8] = 1\n }\n }\n }\n }\n\n _interleaveBlocks() {\n const maxLength = this._calculateMaxLength()\n let i\n let k = 0\n\n for (i = 0; i < this._dataBlock; i++) {\n for (let j = 0; j < this._neccBlock1; j++) {\n this._ecc[k++] = this._stringBuffer[i + j * this._dataBlock]\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n\n for (i = 0; i < this._eccBlock; i++) {\n for (let j = 0; j < this._neccBlock1 + this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[maxLength + i + j * this._eccBlock]\n }\n }\n\n this._stringBuffer = this._ecc\n }\n\n _insertAlignments() {\n const width = this.width\n\n if (this._version > 1) {\n const i = Alignment.BLOCK[this._version]\n let y = width - 7\n\n for (;;) {\n let x = width - 7\n\n while (x > i - 3) {\n this._addAlignment(x, y)\n\n if (x < i) {\n break\n }\n\n x -= i\n }\n\n if (y <= i + 9) {\n break\n }\n\n y -= i\n\n this._addAlignment(6, y)\n this._addAlignment(y, 6)\n }\n }\n }\n\n _insertFinders() {\n const width = this.width\n\n for (let i = 0; i < 3; i++) {\n let j = 0\n let y = 0\n\n if (i === 1) {\n j = width - 7\n }\n if (i === 2) {\n y = width - 7\n }\n\n this.buffer[y + 3 + width * (j + 3)] = 1\n\n for (let x = 0; x < 6; x++) {\n this.buffer[y + x + width * j] = 1\n this.buffer[y + width * (j + x + 1)] = 1\n this.buffer[y + 6 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 6)] = 1\n }\n\n for (let x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1)\n this._setMask(y + 1, j + x + 1)\n this._setMask(y + 5, j + x)\n this._setMask(y + x + 1, j + 5)\n }\n\n for (let x = 2; x < 4; x++) {\n this.buffer[y + x + width * (j + 2)] = 1\n this.buffer[y + 2 + width * (j + x + 1)] = 1\n this.buffer[y + 4 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 4)] = 1\n }\n }\n }\n\n _insertTimingGap() {\n const width = this.width\n\n for (let y = 0; y < 7; y++) {\n this._setMask(7, y)\n this._setMask(width - 8, y)\n this._setMask(7, y + width - 7)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x, 7)\n this._setMask(x + width - 8, 7)\n this._setMask(x, width - 8)\n }\n }\n\n _insertTimingRowAndColumn() {\n const width = this.width\n\n for (let x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6)\n this._setMask(6, 8 + x)\n } else {\n this.buffer[8 + x + width * 6] = 1\n this.buffer[6 + width * (8 + x)] = 1\n }\n }\n }\n\n _insertVersion() {\n const width = this.width\n\n if (this._version > 6) {\n let i = Version.BLOCK[this._version - 7]\n let j = 17\n\n for (let x = 0; x < 6; x++) {\n for (let y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? this._version >> j - 12 : i >> j)) {\n this.buffer[5 - x + width * (2 - y + width - 11)] = 1\n this.buffer[2 - y + width - 11 + width * (5 - x)] = 1\n } else {\n this._setMask(5 - x, 2 - y + width - 11)\n this._setMask(2 - y + width - 11, 5 - x)\n }\n }\n }\n }\n }\n\n _isMasked(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n return this._mask[bit] === 1\n }\n\n _pack() {\n let x = this.width - 1\n let y = this.width - 1\n let k = 1\n let v = 1\n\n // Interleaved data and ECC codes.\n const length = (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n\n for (let i = 0; i < length; i++) {\n let bit = this._stringBuffer[i]\n\n for (let j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + this.width * y] = 1\n }\n\n // Find next fill position.\n do {\n if (v) {\n x--\n } else {\n x++\n\n if (k) {\n if (y !== 0) {\n y--\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y = 9\n }\n }\n } else if (y !== this.width - 1) {\n y++\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y -= 8\n }\n }\n }\n\n v = !v\n } while (this._isMasked(x, y))\n }\n }\n }\n\n _reverseMask() {\n const width = this.width\n\n for (let x = 0; x < 9; x++) {\n this._setMask(x, 8)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8)\n this._setMask(8, x)\n }\n\n for (let y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7)\n }\n }\n\n _setMask(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n this._mask[bit] = 1\n }\n\n _syncMask() {\n const width = this.width\n\n for (let y = 0; y < width; y++) {\n for (let x = 0; x <= y; x++) {\n if (this.buffer[x + width * y]) {\n this._setMask(x, y)\n }\n }\n }\n }\n}\n\nexport default Frame\n\n/**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {String} level - The ECC level to be used.\n * @property {String} value - The value to be encoded.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with img elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas element as the src for the img element being rendered.\n *\n * @public\n * @extends Renderer\n */\nclass ImageRenderer extends Renderer {\n\n /**\n * @override\n */\n draw() {\n const qrious = this.qrious\n\n qrious.image.src = qrious.toDataURL()\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n\n qrious.image.src = ''\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const image = qrious.image\n\n image.width = qrious.size\n image.height = qrious.size\n }\n}\n\nexport default ImageRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n */\nclass ServiceManager {\n\n /**\n * Creates a new instance of {@link ServiceManager}.\n *\n * @public\n */\n constructor() {\n this._services = {}\n }\n\n /**\n * Returns the {@link Service} being managed with the specified name.\n *\n * @param {String} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name.\n * @throws {Error} If no {@link Service} is being managed with name.\n * @public\n */\n getService(name) {\n const service = this._services[name]\n if (!service) {\n throw new Error(`Service is not being managed with name: ${name}`)\n }\n\n return service\n }\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name to the\n * service provided.\n *\n * @param {String} name - the name of the {@link Service} to be managed with name\n * @param {Service} service - the {@link Service} implementation to be managed\n * @throws {Error} If a {@link Service} is already being managed with the same name.\n * @public\n */\n setService(name, service) {\n if (this._services[name]) {\n throw new Error(`Service is already managed with name: ${name}`)\n }\n\n if (service) {\n this._services[name] = service\n }\n }\n}\n\nexport default ServiceManager\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport CanvasRenderer from './renderer/CanvasRenderer'\nimport Frame from './Frame'\nimport ImageRenderer from './renderer/ImageRenderer'\nimport ServiceManager from './service/ServiceManager'\nimport Utilities from './util/Utilities'\n\n/**\n * Enables configuration of a QR code generator which uses HTML5 canvas for rendering.\n *\n * @public\n */\nclass QRious {\n\n /**\n * Returns the default options for {@link QRious}.\n *\n * @return {QRious~Options} The default options.\n * @public\n * @static\n */\n static get DEFAULTS() {\n return {\n background: 'white',\n foreground: 'black',\n level: 'L',\n mime: 'image/png',\n size: 100,\n value: ''\n }\n }\n\n /**\n * Returns the current version of {@link QRious}.\n *\n * @return {String} The current version.\n * @public\n * @static\n */\n static get VERSION() {\n return '2.0.1'\n }\n\n /**\n * Configures the service provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n */\n static use(service) {\n QRious._serviceManager.setService(service.getName(), service)\n }\n\n static _parseOptions(options) {\n options = Object.assign({}, QRious.DEFAULTS, options)\n options.level = Utilities.toUpperCase(options.level)\n options.size = Math.abs(options.size)\n\n return options\n }\n\n /**\n * Creates a new instance of {@link QRious} based on the options provided.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @public\n */\n constructor(options) {\n options = QRious._parseOptions(options)\n\n Utilities.privatize(this, options)\n\n let element = this._element\n let elementService = QRious._serviceManager.getService('element')\n\n /**\n * The canvas being used to render the QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas()\n this.canvas.qrious = this\n\n /**\n * The img to contain the rendered QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.image = element && elementService.isImage(element) ? element : elementService.createImage()\n this.image.qrious = this\n\n this._renderers = [\n new CanvasRenderer(this),\n new ImageRenderer(this)\n ]\n\n this.update()\n }\n\n /**\n * Returns the image data URI for the generated QR code using the mime provided.\n *\n * @param {String} [mime] - the MIME type for the image\n * @return {String} The image data URI for the QR code.\n * @public\n */\n toDataURL(mime) {\n return this.canvas.toDataURL(mime || this.mime)\n }\n\n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @protected\n */\n update() {\n const frame = new Frame({\n level: this.level,\n value: this.value\n })\n\n this._renderers.forEach((renderer) => renderer.render(frame))\n }\n\n /**\n * Returns the background color for the QR code.\n *\n * @return {String} The background color.\n * @public\n */\n get background() {\n return this._background\n }\n\n /**\n * Sets the background color for the QR code to background.\n *\n * @param {String} [background=\"white\"] - the background color to be set\n * @public\n */\n set background(background) {\n const changed = Utilities.setter(this, '_background', background, QRious.DEFAULTS.background)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the foreground color for the QR code.\n *\n * @return {String} The foreground color.\n * @public\n */\n get foreground() {\n return this._foreground\n }\n\n /**\n * Sets the foreground color for the QR code to foreground.\n *\n * @param {String} [foreground=\"black\"] - the foreground color to be set\n * @public\n */\n set foreground(foreground) {\n const changed = Utilities.setter(this, '_foreground', foreground, QRious.DEFAULTS.foreground)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the error correction level for the QR code.\n *\n * @return {String} The ECC level.\n * @public\n */\n get level() {\n return this._level\n }\n\n /**\n * Sets the error correction level for the QR code to level.\n *\n * level will be transformed to upper case to aid mapping to known ECC level blocks.\n *\n * @param {String} [level=\"L\"] - the ECC level to be set\n * @public\n */\n set level(level) {\n const changed = Utilities.setter(this, '_level', level, QRious.DEFAULTS.level, Utilities.toUpperCase)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the MIME type for the image rendered for the QR code.\n *\n * @return {String} The image MIME type.\n * @public\n */\n get mime() {\n return this._mime\n }\n\n /**\n * Sets the MIME type for the image rendered for the QR code to mime.\n *\n * @param {String} [mime=\"image/png\"] - the image MIME type to be set\n * @public\n */\n set mime(mime) {\n const changed = Utilities.setter(this, '_mime', mime, QRious.DEFAULTS.mime)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the size of the QR code.\n *\n * @return {Number} The size in pixels.\n * @public\n */\n get size() {\n return this._size\n }\n\n /**\n * Sets the size of the QR code to size.\n *\n * size will be transformed to ensure that it is always an absolute positive numbers (e.g.\n * -100 would become 100).\n *\n * @param {Number} [size=100] - the size in pixels to be set\n * @public\n */\n set size(size) {\n const changed = Utilities.setter(this, '_size', size, QRious.DEFAULTS.size, Math.abs)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the value of the QR code.\n *\n * @return {String} The value.\n * @public\n */\n get value() {\n return this._value\n }\n\n /**\n * Sets the value of the QR code to value.\n *\n * @param {String} [value=\"\"] - the value to be set\n * @public\n */\n set value(value) {\n const changed = Utilities.setter(this, '_value', value, QRious.DEFAULTS.value)\n\n if (changed) {\n this.update()\n }\n }\n}\n\nQRious._serviceManager = new ServiceManager()\n\nexport default QRious\n\n/**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {String} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas or\n * img. The element(s) will be created if needed.\n * @property {String} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {String} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {String} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {Number} [size=100] - The size of the QR code in pixels.\n * @property {String} [value=\"\"] - The value to be encoded within the QR code.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport NodeElementService from '../service/element/NodeElementService'\nimport QRious from '../QRious'\n\nQRious.use(new NodeElementService())\n\nexport default QRious\n"],"names":["Canvas","Image"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+EO,IAAI,cAAc,GAAG,UAAU,QAAQ,EAAE,WAAW,EAAE;EAC3D,IAAI,CAAC,CAAC,QAAQ,YAAY,WAAW,CAAC,EAAE;IACtC,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;GAC1D;CACF,CAAC;;AAEF,AAAO,IAAI,WAAW,GAAG,YAAY;EACnC,SAAS,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE;IACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;MACrC,IAAI,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;MAC1B,UAAU,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,IAAI,KAAK,CAAC;MACvD,UAAU,CAAC,YAAY,GAAG,IAAI,CAAC;MAC/B,IAAI,OAAO,IAAI,UAAU,EAAE,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC;MACtD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;KAC3D;GACF;;EAED,OAAO,UAAU,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE;IACrD,IAAI,UAAU,EAAE,gBAAgB,CAAC,WAAW,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACpE,IAAI,WAAW,EAAE,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAA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iB,IAAjB,EAAuB,aAAvB,EAAsC,UAAtC,EAAkD,OAAO,QAAP,CAAgB,UAAlE,CAAhB;;UAEI,OAAJ,EAAa;aACN,MAAL;;;;;;;;;;;;;wBAUQ;aACH,KAAK,MAAZ;;;;;;;;;;;;sBAWQ,OAAO;UACT,UAAU,UAAU,MAAV,CAAiB,IAAjB,EAAuB,QAAvB,EAAiC,KAAjC,EAAwC,OAAO,QAAP,CAAgB,KAAxD,EAA+D,UAAU,WAAzE,CAAhB;;UAEI,OAAJ,EAAa;aACN,MAAL;;;;;;;;;;;;;wBAUO;aACF,KAAK,KAAZ;;;;;;;;;;sBASO,MAAM;UACP,UAAU,UAAU,MAAV,CAAiB,IAAjB,EAAuB,OAAvB,EAAgC,IAAhC,EAAsC,OAAO,QAAP,CAAgB,IAAtD,CAAhB;;UAEI,OAAJ,EAAa;aACN,MAAL;;;;;;;;;;;;;wBAUO;aACF,KAAK,KAAZ;;;;;;;;;;;;;sBAYO,MAAM;UACP,UAAU,UAAU,MAAV,CAAiB,IAAjB,EAAuB,OAAvB,EAAgC,IAAhC,EAAsC,OAAO,QAAP,CAAgB,IAAtD,EAA4D,KAAK,GAAjE,CAAhB;;UAEI,OAAJ,EAAa;aACN,MAAL;;;;;;;;;;;;;wBAUQ;aACH,KAAK,MAAZ;;;;;;;;;;sBASQ,OAAO;UACT,UAAU,UAAU,MAAV,CAAiB,IAAjB,EAAuB,QAAvB,EAAiC,KAAjC,EAAwC,OAAO,QAAP,CAAgB,KAAxD,CAAhB;;UAEI,OAAJ,EAAa;aACN,MAAL;;;;;;;AAKN,OAAO,eAAP,GAAyB,IAAI,cAAJ,EAAzB,CAEA;;ACpRA,OAAO,GAAP,CAAW,IAAI,kBAAJ,EAAX,EAEA;;"} \ No newline at end of file +{"version":3,"file":null,"sources":["../../src/util/Utilities.js","../../src/service/Service.js","../../src/service/element/ElementService.js","../../src/service/element/NodeElementService.js","../../src/renderer/Renderer.js","../../src/renderer/CanvasRenderer.js","../../src/Alignment.js","../../src/ErrorCorrection.js","../../src/Galois.js","../../src/Version.js","../../src/Frame.js","../../src/renderer/ImageRenderer.js","../../src/service/ServiceManager.js","../../src/QRious.js","../../src/runtime/node.js"],"sourcesContent":["/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n */\nclass Utilities {\n\n /**\n * Copies all properties from the source object to the target object, however, all property\n * names on the target will be prefixed with an underscore, used to indicate that they are private.\n *\n * @param {Object} target - the object to which the private fields are to be copied\n * @param {Object} source - the object from which the fields are to be copied\n * @return {Object} A reference to the target object.\n * @public\n * @static\n */\n static privatize(target, source) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n target[`_${key}`] = source[key]\n }\n }\n\n return target\n }\n\n /**\n * Sets the specified value on a given field on the object provided.\n *\n * If value is null, the specified default value will be used instead.\n *\n * An optional transformer can be specified which will be used to transform the value (or default value)\n * before it is assigned to the field.\n *\n * @param {Object} object - the object whose field is to be set with value\n * @param {String} fieldName - the field to be set with value\n * @param {*} value - the value to be set on the named field\n * @param {*} [defaultValue] - the value to be used if value is null\n * @param {Function} [transformer] - a function used to transform the value before it is assigned to the named field\n * @return {Boolean} true if the value of the field has changed as a result of the assignment; otherwise\n * false.\n * @public\n * @static\n */\n static setter(object, fieldName, value, defaultValue, transformer) {\n const oldValue = object[fieldName]\n let newValue = value != null ? value : defaultValue\n if (typeof transformer === 'function') {\n newValue = transformer(newValue)\n }\n\n object[fieldName] = newValue\n\n return newValue !== oldValue\n }\n\n /**\n * Throws an error indicating that the a given method on a specific class has not been implemented.\n *\n * @param {String} className - the name of the class on which the method has not been implemented\n * @param {String} methodName - the name of the method which has not been implemented\n * @throws {Error} The error describing the class method which has not been implemented.\n * @public\n * @static\n */\n static throwUnimplemented(className, methodName) {\n throw new Error(`\"${methodName}\" method must be implemented on the ${className} class`)\n }\n\n /**\n * Transforms the specified string to upper case while remaining null-safe.\n *\n * @param {String} string - the string to be transformed to upper case\n * @return {String} string transformed to upper case if string is not null.\n * @public\n * @static\n */\n static toUpperCase(string) {\n return string != null && string.toUpperCase()\n }\n}\n\nexport default Utilities\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n */\nclass Service {\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {String} The service name.\n * @public\n */\n getName() {\n Utilities.throwUnimplemented('Service', 'getName')\n }\n}\n\nexport default Service\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Service from '../Service'\nimport Utilities from '../../util/Utilities'\n\n/**\n * A service for working with elements.\n *\n * @public\n * @extends Service\n */\nclass ElementService extends Service {\n\n /**\n * Creates an instance of a canvas element.\n *\n * @return {*} The newly created canvas element.\n * @public\n */\n createCanvas() {\n Utilities.throwUnimplemented('ElementService', 'createCanvas')\n }\n\n /**\n * Creates an instance of a image element.\n *\n * @return {*} The newly created image element.\n * @public\n */\n createImage() {\n Utilities.throwUnimplemented('ElementService', 'createImage')\n }\n\n /**\n * @override\n */\n getName() {\n return 'element'\n }\n\n /**\n * Returns whether the specified element is a canvas.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is a canvas; otherwise false.\n * @public\n */\n isCanvas(element) {\n Utilities.throwUnimplemented('ElementService', 'isCanvas')\n }\n\n /**\n * Returns whether the specified element is an image.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is an image; otherwise false.\n * @public\n */\n isImage(element) {\n Utilities.throwUnimplemented('ElementService', 'isImage')\n }\n}\n\nexport default ElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Canvas, { Image } from 'canvas'\n\nimport ElementService from './ElementService'\n\n/**\n * An implementation of {@link ElementService} intended for use within a Node.js environment but is only supported when\n * the canvas module has also been depended on.\n *\n * @public\n * @extends ElementService\n */\nclass NodeElementService extends ElementService {\n\n /**\n * @override\n */\n static isSupported() {\n return Canvas != null\n }\n\n /**\n * @override\n */\n createCanvas() {\n return new Canvas()\n }\n\n /**\n * @override\n */\n createImage() {\n return new Image()\n }\n\n /**\n * @override\n */\n isCanvas(element) {\n return element instanceof Canvas\n }\n\n /**\n * @override\n */\n isImage(element) {\n return element instanceof Image\n }\n}\n\nexport default NodeElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so ordering of their execution is important.\n *\n * @public\n */\nclass Renderer {\n\n /**\n * Creates a new instance of {@link Renderer} for the qrious instance provided.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @public\n */\n constructor(qrious) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n */\n this.qrious = qrious\n }\n\n /**\n * Draws the specified QR code frame on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @protected\n */\n draw(frame) {\n Utilities.throwUnimplemented('Renderer', 'draw')\n }\n\n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame provided.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {Number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n */\n getModuleSize(frame) {\n const pixels = Math.floor(this.qrious.size / frame.width)\n\n return Math.max(1, pixels)\n }\n\n /**\n * Calculates the offset/padding (in pixel units) to be inserted before the QR code based on the frame\n * provided.\n *\n * The returned value will be zero if there is no available offset or if the size of the QR code does not fit its\n * contents. It will never be a negative value. This is done so that the inevitable clipping appears more naturally\n * and it is not clipped from all directions.\n *\n * @param {Frame} frame - the {@link Frame} from which the offset is to be derived\n * @return {Number} The pixel offset for the QR code which will be no less than zero.\n * @protected\n */\n getOffset(frame) {\n const moduleSize = this.getModuleSize(frame)\n const offset = Math.floor((this.qrious.size - moduleSize * frame.width) / 2)\n\n return Math.max(0, offset)\n }\n\n /**\n * Renders a QR code on the underlying element based on the frame provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @public\n */\n render(frame) {\n this.resize()\n this.reset()\n this.draw(frame)\n }\n\n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n reset() {\n Utilities.throwUnimplemented('Renderer', 'reset')\n }\n\n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n resize() {\n Utilities.throwUnimplemented('Renderer', 'resize')\n }\n}\n\nexport default Renderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with canvas elements.\n *\n * @public\n * @extends Renderer\n */\nclass CanvasRenderer extends Renderer {\n\n /**\n * @override\n */\n draw(frame) {\n const qrious = this.qrious\n const moduleSize = this.getModuleSize(frame)\n const offset = this.getOffset(frame)\n const context = qrious.canvas.getContext('2d')\n\n context.fillStyle = qrious.foreground\n\n for (let i = 0; i < frame.width; i++) {\n for (let j = 0; j < frame.width; j++) {\n if (frame.buffer[j * frame.width + i]) {\n context.fillRect(moduleSize * i + offset, moduleSize * j + offset, moduleSize, moduleSize)\n }\n }\n }\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n const context = qrious.canvas.getContext('2d')\n\n context.lineWidth = 1\n context.clearRect(0, 0, qrious.size, qrious.size)\n context.fillStyle = qrious.background\n context.fillRect(0, 0, qrious.size, qrious.size)\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const canvas = qrious.canvas\n\n canvas.width = qrious.size\n canvas.height = qrious.size\n }\n}\n\nexport default CanvasRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains alignment pattern information.\n *\n * @public\n */\nclass Alignment {\n\n /**\n * Returns the alignment pattern block.\n *\n * @return {Number[]} The alignment pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n }\n}\n\nexport default Alignment\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains error correction information.\n *\n * @public\n */\nclass ErrorCorrection {\n\n /**\n * Returns the error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @return {Number[]} The ECC blocks.\n * @public\n * @static\n */\n static get BLOCKS() {\n return [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ]\n }\n\n /**\n * Returns the final format bits with mask (level << 3 | mask).\n *\n * @return {Number[]} The final format bits.\n * @public\n * @static\n */\n static get FINAL_FORMAT() {\n return [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ]\n }\n\n /**\n * Returns a map of human-readable ECC levels.\n *\n * @return {Object} A ECC level mapping.\n * @public\n * @static\n */\n static get LEVELS() {\n return {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n }\n}\n\nexport default ErrorCorrection\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains Galois field information.\n *\n * @public\n */\nclass Galois {\n\n /**\n * Returns the Galois field exponent table.\n *\n * @return {Number[]} The Galois field exponent table.\n * @public\n * @static\n */\n static get EXPONENT() {\n return [\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0,\n 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23,\n 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1,\n 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0,\n 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2,\n 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce,\n 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc,\n 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54,\n 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73,\n 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff,\n 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41,\n 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,\n 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ]\n }\n\n /**\n * Returns the Galois field log table.\n *\n * @return {Number[]} The Galois field log table.\n * @public\n * @static\n */\n static get LOG() {\n return [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,\n 0x1d, 0xb5, 0xc2,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 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,\n 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n ]\n }\n}\n\nexport default Galois\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains version pattern information.\n *\n * @public\n */\nclass Version {\n\n /**\n * Returns the version pattern block.\n *\n * @return {Number[]} The version pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n }\n}\n\nexport default Version\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Alignment from './Alignment'\nimport ErrorCorrection from './ErrorCorrection'\nimport Galois from './Galois'\nimport Version from './Version'\n\n/**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @public\n */\nclass Frame {\n\n static _createArray(length) {\n const array = []\n\n for (let i = 0; i < length; i++) {\n array[i] = 0\n }\n\n return array\n }\n\n static _getMaskBit(x, y) {\n let bit\n\n if (x > y) {\n bit = x\n x = y\n y = bit\n }\n\n bit = y\n bit += y * y\n bit >>= 1\n bit += x\n\n return bit\n }\n\n static _modN(x) {\n while (x >= 255) {\n x -= 255\n x = (x >> 8) + (x & 255)\n }\n\n return x\n }\n\n // *Badness* coefficients.\n static get N1() {\n return 3\n }\n static get N2() {\n return 3\n }\n static get N3() {\n return 40\n }\n static get N4() {\n return 10\n }\n\n /**\n * Creates an instance of {@link Frame} based on the options provided.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n */\n constructor(options) {\n this._badness = []\n this._level = ErrorCorrection.LEVELS[options.level]\n this._polynomial = []\n this._value = options.value\n this._valueLength = this._value.length\n this._version = 0\n this._stringBuffer = []\n\n let dataBlock\n let eccBlock\n let neccBlock1\n let neccBlock2\n\n while (this._version < 40) {\n this._version++\n\n let index = (this._level - 1) * 4 + (this._version - 1) * 16\n\n neccBlock1 = ErrorCorrection.BLOCKS[index++]\n neccBlock2 = ErrorCorrection.BLOCKS[index++]\n dataBlock = ErrorCorrection.BLOCKS[index++]\n eccBlock = ErrorCorrection.BLOCKS[index]\n\n index = dataBlock * (neccBlock1 + neccBlock2) + neccBlock2 - 3 + (this._version <= 9)\n\n if (this._valueLength <= index) {\n break\n }\n }\n\n this._dataBlock = dataBlock\n this._eccBlock = eccBlock\n this._neccBlock1 = neccBlock1\n this._neccBlock2 = neccBlock2\n\n /**\n * The data width is based on version.\n *\n * @public\n * @type {Number}\n */\n // FIXME: Ensure that it fits instead of being truncated.\n this.width = 17 + 4 * this._version\n\n /**\n * The image buffer.\n *\n * @public\n * @type {Number[]}\n */\n this.buffer = Frame._createArray(this.width * this.width)\n\n this._ecc = Frame._createArray(this._dataBlock + (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2)\n this._mask = Frame._createArray((this.width * (this.width + 1) + 1) / 2)\n\n this._insertFinders()\n this._insertAlignments()\n\n // Insert single foreground cell.\n this.buffer[8 + this.width * (this.width - 8)] = 1\n\n this._insertTimingGap()\n this._reverseMask()\n this._insertTimingRowAndColumn()\n this._insertVersion()\n this._syncMask()\n this._convertBitStream(this._value.length)\n this._calculatePolynomial()\n this._appendEccToData()\n this._interleaveBlocks()\n this._pack()\n this._finish()\n }\n\n _addAlignment(x, y) {\n this.buffer[x + this.width * y] = 1\n\n for (let i = -2; i < 2; i++) {\n this.buffer[x + i + this.width * (y - 2)] = 1\n this.buffer[x - 2 + this.width * (y + i + 1)] = 1\n this.buffer[x + 2 + this.width * (y + i)] = 1\n this.buffer[x + i + 1 + this.width * (y + 2)] = 1\n }\n\n for (let i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i)\n this._setMask(x + 1, y - i)\n this._setMask(x - i, y - 1)\n this._setMask(x + i, y + 1)\n }\n }\n\n _appendData(data, dataLength, ecc, eccLength) {\n for (let i = 0; i < eccLength; i++) {\n this._stringBuffer[ecc + i] = 0\n }\n\n for (let i = 0; i < dataLength; i++) {\n const bit = Galois.LOG[this._stringBuffer[data + i] ^ this._stringBuffer[ecc]]\n\n if (bit !== 255) {\n for (let j = 1; j < eccLength; j++) {\n this._stringBuffer[ecc + j - 1] = this._stringBuffer[ecc + j] ^ Galois.EXPONENT[Frame._modN(bit + this._polynomial[eccLength - j])]\n }\n } else {\n for (let j = ecc; j < ecc + eccLength; j++) {\n this._stringBuffer[j] = this._stringBuffer[j + 1]\n }\n }\n\n this._stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois.EXPONENT[Frame._modN(bit + this._polynomial[0])]\n }\n }\n\n _appendEccToData() {\n let data = 0\n let ecc = this._calculateMaxLength()\n\n for (let i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, this._dataBlock, ecc, this._eccBlock)\n\n data += this._dataBlock\n ecc += this._eccBlock\n }\n\n for (let i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, this._dataBlock + 1, ecc, this._eccBlock)\n\n data += this._dataBlock + 1\n ecc += this._eccBlock\n }\n }\n\n _applyMask(mask) {\n const width = this.width\n\n switch (mask) {\n case 0:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(x + y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 1:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 2:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 3:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 4:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, r3y = y >> 1 & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n r3y = !r3y\n }\n\n if (!r3y && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 5:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 6:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((x & y & 1) + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 7:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n }\n }\n\n _calculateMaxLength() {\n return this._dataBlock * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n }\n\n _calculatePolynomial() {\n this._polynomial[0] = 1\n\n for (let i = 0; i < this._eccBlock; i++) {\n this._polynomial[i + 1] = 1\n\n for (let j = i; j > 0; j--) {\n this._polynomial[j] = this._polynomial[j] ? this._polynomial[j - 1] ^ Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[j]] + i)] : this._polynomial[j - 1]\n }\n\n this._polynomial[0] = Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[0]] + i)]\n }\n\n // Use logs for generator polynomial to save calculation step.\n for (let i = 0; i <= this._eccBlock; i++) {\n this._polynomial[i] = Galois.LOG[this._polynomial[i]]\n }\n }\n\n _checkBadness() {\n let bad = 0\n const width = this.width\n\n // Blocks of same colour.\n for (let y = 0; y < width - 1; y++) {\n for (let x = 0; x < width - 1; x++) {\n // All foreground colour.\n if (this.buffer[x + width * y] &&\n this.buffer[x + 1 + width * y] &&\n this.buffer[x + width * (y + 1)] &&\n this.buffer[x + 1 + width * (y + 1)] ||\n // All background colour.\n !(this.buffer[x + width * y] ||\n this.buffer[x + 1 + width * y] ||\n this.buffer[x + width * (y + 1)] ||\n this.buffer[x + 1 + width * (y + 1)])) {\n bad += Frame.N2\n }\n }\n }\n\n let bw = 0\n\n // X runs.\n for (let y = 0; y < width; y++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, x = 0; x < width; x++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n bw += b ? 1 : -1\n }\n\n bad += this._getBadness(h)\n }\n\n if (bw < 0) {\n bw = -bw\n }\n\n let count = 0\n let big = bw\n big += big << 2\n big <<= 1\n\n while (big > width * width) {\n big -= width * width\n count++\n }\n\n bad += count * Frame.N4\n\n // Y runs.\n for (let x = 0; x < width; x++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, y = 0; y < width; y++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n }\n\n bad += this._getBadness(h)\n }\n\n return bad\n }\n\n _convertBitStream(length) {\n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji not supported).\n for (let i = 0; i < length; i++) {\n this._ecc[i] = this._value.charCodeAt(i)\n }\n\n this._stringBuffer = this._ecc.slice(0)\n\n const maxLength = this._calculateMaxLength()\n\n if (length >= maxLength - 2) {\n length = maxLength - 2\n\n if (this._version > 9) {\n length--\n }\n }\n\n // Shift and re-pack to insert length prefix.\n let index = length\n\n if (this._version > 9) {\n this._stringBuffer[index + 2] = 0\n this._stringBuffer[index + 3] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 3] |= 255 & bit << 4\n this._stringBuffer[index + 2] = bit >> 4\n }\n\n this._stringBuffer[2] |= 255 & length << 4\n this._stringBuffer[1] = length >> 4\n this._stringBuffer[0] = 0x40 | length >> 12\n } else {\n this._stringBuffer[index + 1] = 0\n this._stringBuffer[index + 2] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 2] |= 255 & bit << 4\n this._stringBuffer[index + 1] = bit >> 4\n }\n\n this._stringBuffer[1] |= 255 & length << 4\n this._stringBuffer[0] = 0x40 | length >> 4\n }\n\n // Fill to end with pad pattern.\n index = length + 3 - (this._version < 10)\n\n while (index < maxLength) {\n this._stringBuffer[index++] = 0xec\n this._stringBuffer[index++] = 0x11\n }\n }\n\n _getBadness(length) {\n let badRuns = 0\n\n for (let i = 0; i <= length; i++) {\n if (this._badness[i] >= 5) {\n badRuns += Frame.N1 + this._badness[i] - 5\n }\n }\n\n // FBFFFBF as in finder.\n for (let i = 3; i < length - 1; i += 2) {\n if (this._badness[i - 2] === this._badness[i + 2] &&\n this._badness[i + 2] === this._badness[i - 1] &&\n this._badness[i - 1] === this._badness[i + 1] &&\n this._badness[i - 1] * 3 === this._badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (this._badness[i - 3] === 0 || i + 3 > length ||\n this._badness[i - 3] * 3 >= this._badness[i] * 4 ||\n this._badness[i + 3] * 3 >= this._badness[i] * 4)) {\n badRuns += Frame.N3\n }\n }\n\n return badRuns\n }\n\n _finish() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice(0)\n\n let bit = 0\n let i\n let mask = 30000\n\n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i)\n\n const currentMask = this._checkBadness()\n\n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask\n bit = i\n }\n\n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break\n }\n\n // Reset for next pass.\n this.buffer = this._stringBuffer.slice(0)\n }\n\n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit)\n }\n\n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection.FINAL_FORMAT[bit + (this._level - 1 << 3)]\n\n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[this.width - 1 - i + this.width * 8] = 1\n\n if (i < 6) {\n this.buffer[8 + this.width * i] = 1\n } else {\n this.buffer[8 + this.width * (i + 1)] = 1\n }\n }\n }\n\n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[8 + this.width * (this.width - 7 + i)] = 1\n\n if (i) {\n this.buffer[6 - i + this.width * 8] = 1\n } else {\n this.buffer[7 + this.width * 8] = 1\n }\n }\n }\n }\n\n _interleaveBlocks() {\n const maxLength = this._calculateMaxLength()\n let i\n let k = 0\n\n for (i = 0; i < this._dataBlock; i++) {\n for (let j = 0; j < this._neccBlock1; j++) {\n this._ecc[k++] = this._stringBuffer[i + j * this._dataBlock]\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n\n for (i = 0; i < this._eccBlock; i++) {\n for (let j = 0; j < this._neccBlock1 + this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[maxLength + i + j * this._eccBlock]\n }\n }\n\n this._stringBuffer = this._ecc\n }\n\n _insertAlignments() {\n const width = this.width\n\n if (this._version > 1) {\n const i = Alignment.BLOCK[this._version]\n let y = width - 7\n\n for (;;) {\n let x = width - 7\n\n while (x > i - 3) {\n this._addAlignment(x, y)\n\n if (x < i) {\n break\n }\n\n x -= i\n }\n\n if (y <= i + 9) {\n break\n }\n\n y -= i\n\n this._addAlignment(6, y)\n this._addAlignment(y, 6)\n }\n }\n }\n\n _insertFinders() {\n const width = this.width\n\n for (let i = 0; i < 3; i++) {\n let j = 0\n let y = 0\n\n if (i === 1) {\n j = width - 7\n }\n if (i === 2) {\n y = width - 7\n }\n\n this.buffer[y + 3 + width * (j + 3)] = 1\n\n for (let x = 0; x < 6; x++) {\n this.buffer[y + x + width * j] = 1\n this.buffer[y + width * (j + x + 1)] = 1\n this.buffer[y + 6 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 6)] = 1\n }\n\n for (let x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1)\n this._setMask(y + 1, j + x + 1)\n this._setMask(y + 5, j + x)\n this._setMask(y + x + 1, j + 5)\n }\n\n for (let x = 2; x < 4; x++) {\n this.buffer[y + x + width * (j + 2)] = 1\n this.buffer[y + 2 + width * (j + x + 1)] = 1\n this.buffer[y + 4 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 4)] = 1\n }\n }\n }\n\n _insertTimingGap() {\n const width = this.width\n\n for (let y = 0; y < 7; y++) {\n this._setMask(7, y)\n this._setMask(width - 8, y)\n this._setMask(7, y + width - 7)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x, 7)\n this._setMask(x + width - 8, 7)\n this._setMask(x, width - 8)\n }\n }\n\n _insertTimingRowAndColumn() {\n const width = this.width\n\n for (let x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6)\n this._setMask(6, 8 + x)\n } else {\n this.buffer[8 + x + width * 6] = 1\n this.buffer[6 + width * (8 + x)] = 1\n }\n }\n }\n\n _insertVersion() {\n const width = this.width\n\n if (this._version > 6) {\n let i = Version.BLOCK[this._version - 7]\n let j = 17\n\n for (let x = 0; x < 6; x++) {\n for (let y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? this._version >> j - 12 : i >> j)) {\n this.buffer[5 - x + width * (2 - y + width - 11)] = 1\n this.buffer[2 - y + width - 11 + width * (5 - x)] = 1\n } else {\n this._setMask(5 - x, 2 - y + width - 11)\n this._setMask(2 - y + width - 11, 5 - x)\n }\n }\n }\n }\n }\n\n _isMasked(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n return this._mask[bit] === 1\n }\n\n _pack() {\n let x = this.width - 1\n let y = this.width - 1\n let k = 1\n let v = 1\n\n // Interleaved data and ECC codes.\n const length = (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n\n for (let i = 0; i < length; i++) {\n let bit = this._stringBuffer[i]\n\n for (let j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + this.width * y] = 1\n }\n\n // Find next fill position.\n do {\n if (v) {\n x--\n } else {\n x++\n\n if (k) {\n if (y !== 0) {\n y--\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y = 9\n }\n }\n } else if (y !== this.width - 1) {\n y++\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y -= 8\n }\n }\n }\n\n v = !v\n } while (this._isMasked(x, y))\n }\n }\n }\n\n _reverseMask() {\n const width = this.width\n\n for (let x = 0; x < 9; x++) {\n this._setMask(x, 8)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8)\n this._setMask(8, x)\n }\n\n for (let y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7)\n }\n }\n\n _setMask(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n this._mask[bit] = 1\n }\n\n _syncMask() {\n const width = this.width\n\n for (let y = 0; y < width; y++) {\n for (let x = 0; x <= y; x++) {\n if (this.buffer[x + width * y]) {\n this._setMask(x, y)\n }\n }\n }\n }\n}\n\nexport default Frame\n\n/**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {String} level - The ECC level to be used.\n * @property {String} value - The value to be encoded.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with img elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas element as the src for the img element being rendered.\n *\n * @public\n * @extends Renderer\n */\nclass ImageRenderer extends Renderer {\n\n /**\n * @override\n */\n draw() {\n const qrious = this.qrious\n\n qrious.image.src = qrious.toDataURL()\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n\n qrious.image.src = ''\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const image = qrious.image\n\n image.width = qrious.size\n image.height = qrious.size\n }\n}\n\nexport default ImageRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n */\nclass ServiceManager {\n\n /**\n * Creates a new instance of {@link ServiceManager}.\n *\n * @public\n */\n constructor() {\n this._services = {}\n }\n\n /**\n * Returns the {@link Service} being managed with the specified name.\n *\n * @param {String} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name.\n * @throws {Error} If no {@link Service} is being managed with name.\n * @public\n */\n getService(name) {\n const service = this._services[name]\n if (!service) {\n throw new Error(`Service is not being managed with name: ${name}`)\n }\n\n return service\n }\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name to the\n * service provided.\n *\n * @param {String} name - the name of the {@link Service} to be managed with name\n * @param {Service} service - the {@link Service} implementation to be managed\n * @throws {Error} If a {@link Service} is already being managed with the same name.\n * @public\n */\n setService(name, service) {\n if (this._services[name]) {\n throw new Error(`Service is already managed with name: ${name}`)\n }\n\n if (service) {\n this._services[name] = service\n }\n }\n}\n\nexport default ServiceManager\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport CanvasRenderer from './renderer/CanvasRenderer'\nimport Frame from './Frame'\nimport ImageRenderer from './renderer/ImageRenderer'\nimport ServiceManager from './service/ServiceManager'\nimport Utilities from './util/Utilities'\n\n/**\n * Enables configuration of a QR code generator which uses HTML5 canvas for rendering.\n *\n * @public\n */\nclass QRious {\n\n /**\n * Returns the default options for {@link QRious}.\n *\n * @return {QRious~Options} The default options.\n * @public\n * @static\n */\n static get DEFAULTS() {\n return {\n background: 'white',\n foreground: 'black',\n level: 'L',\n mime: 'image/png',\n size: 100,\n value: ''\n }\n }\n\n /**\n * Returns the current version of {@link QRious}.\n *\n * @return {String} The current version.\n * @public\n * @static\n */\n static get VERSION() {\n return '2.0.2'\n }\n\n /**\n * Configures the service provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n */\n static use(service) {\n QRious._serviceManager.setService(service.getName(), service)\n }\n\n static _parseOptions(options) {\n options = Object.assign({}, QRious.DEFAULTS, options)\n options.level = Utilities.toUpperCase(options.level)\n options.size = Math.abs(options.size)\n\n return options\n }\n\n /**\n * Creates a new instance of {@link QRious} based on the options provided.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @public\n */\n constructor(options) {\n options = QRious._parseOptions(options)\n\n Utilities.privatize(this, options)\n\n let element = this._element\n let elementService = QRious._serviceManager.getService('element')\n\n /**\n * The canvas being used to render the QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas()\n this.canvas.qrious = this\n\n /**\n * The img to contain the rendered QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.image = element && elementService.isImage(element) ? element : elementService.createImage()\n this.image.qrious = this\n\n this._renderers = [\n new CanvasRenderer(this),\n new ImageRenderer(this)\n ]\n\n this.update()\n }\n\n /**\n * Returns the image data URI for the generated QR code using the mime provided.\n *\n * @param {String} [mime] - the MIME type for the image\n * @return {String} The image data URI for the QR code.\n * @public\n */\n toDataURL(mime) {\n return this.canvas.toDataURL(mime || this.mime)\n }\n\n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @protected\n */\n update() {\n const frame = new Frame({\n level: this.level,\n value: this.value\n })\n\n this._renderers.forEach((renderer) => renderer.render(frame))\n }\n\n /**\n * Returns the background color for the QR code.\n *\n * @return {String} The background color.\n * @public\n */\n get background() {\n return this._background\n }\n\n /**\n * Sets the background color for the QR code to background.\n *\n * @param {String} [background=\"white\"] - the background color to be set\n * @public\n */\n set background(background) {\n const changed = Utilities.setter(this, '_background', background, QRious.DEFAULTS.background)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the foreground color for the QR code.\n *\n * @return {String} The foreground color.\n * @public\n */\n get foreground() {\n return this._foreground\n }\n\n /**\n * Sets the foreground color for the QR code to foreground.\n *\n * @param {String} [foreground=\"black\"] - the foreground color to be set\n * @public\n */\n set foreground(foreground) {\n const changed = Utilities.setter(this, '_foreground', foreground, QRious.DEFAULTS.foreground)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the error correction level for the QR code.\n *\n * @return {String} The ECC level.\n * @public\n */\n get level() {\n return this._level\n }\n\n /**\n * Sets the error correction level for the QR code to level.\n *\n * level will be transformed to upper case to aid mapping to known ECC level blocks.\n *\n * @param {String} [level=\"L\"] - the ECC level to be set\n * @public\n */\n set level(level) {\n const changed = Utilities.setter(this, '_level', level, QRious.DEFAULTS.level, Utilities.toUpperCase)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the MIME type for the image rendered for the QR code.\n *\n * @return {String} The image MIME type.\n * @public\n */\n get mime() {\n return this._mime\n }\n\n /**\n * Sets the MIME type for the image rendered for the QR code to mime.\n *\n * @param {String} [mime=\"image/png\"] - the image MIME type to be set\n * @public\n */\n set mime(mime) {\n const changed = Utilities.setter(this, '_mime', mime, QRious.DEFAULTS.mime)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the size of the QR code.\n *\n * @return {Number} The size in pixels.\n * @public\n */\n get size() {\n return this._size\n }\n\n /**\n * Sets the size of the QR code to size.\n *\n * size will be transformed to ensure that it is always an absolute positive numbers (e.g.\n * -100 would become 100).\n *\n * @param {Number} [size=100] - the size in pixels to be set\n * @public\n */\n set size(size) {\n const changed = Utilities.setter(this, '_size', size, QRious.DEFAULTS.size, Math.abs)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the value of the QR code.\n *\n * @return {String} The value.\n * @public\n */\n get value() {\n return this._value\n }\n\n /**\n * Sets the value of the QR code to value.\n *\n * @param {String} [value=\"\"] - the value to be set\n * @public\n */\n set value(value) {\n const changed = Utilities.setter(this, '_value', value, QRious.DEFAULTS.value)\n\n if (changed) {\n this.update()\n }\n }\n}\n\nQRious._serviceManager = new ServiceManager()\n\nexport default QRious\n\n/**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {String} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas or\n * img. The element(s) will be created if needed.\n * @property {String} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {String} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {String} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {Number} [size=100] - The size of the QR code in pixels.\n * @property {String} [value=\"\"] - The value to be encoded within the QR code.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport NodeElementService from '../service/element/NodeElementService'\nimport QRious from '../QRious'\n\nQRious.use(new NodeElementService())\n\nexport default QRious\n"],"names":["Canvas","Image"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;IAwBM;;;;;;;;;;;;;;;;;;;8BAYa,QAAQ,QAAQ;WAC1B,IAAI,GAAT,IAAgB,MAAhB,EAAwB;YAClB,OAAO,cAAP,CAAsB,GAAtB,CAAJ,EAAgC;uBACnB,GAAX,IAAoB,OAAO,GAAP,CAApB;;;;aAIG,MAAP;;;;;;;;;;;;;;;;;;;;;;;;2BAqBY,QAAQ,WAAW,OAAO,cAAc,aAAa;UAC3D,WAAW,OAAO,SAAP,CAAjB;UACI,WAAW,SAAS,IAAT,GAAgB,KAAhB,GAAwB,YAAvC;UACI,OAAO,WAAP,KAA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MAAV,CAAiB,IAAjB,EAAuB,QAAvB,EAAiC,KAAjC,EAAwC,OAAO,QAAP,CAAgB,KAAxD,EAA+D,UAAU,WAAzE,CAAhB;;UAEI,OAAJ,EAAa;aACN,MAAL;;;;;;;;;;;;;wBAUO;aACF,KAAK,KAAZ;;;;;;;;;;sBASO,MAAM;UACP,UAAU,UAAU,MAAV,CAAiB,IAAjB,EAAuB,OAAvB,EAAgC,IAAhC,EAAsC,OAAO,QAAP,CAAgB,IAAtD,CAAhB;;UAEI,OAAJ,EAAa;aACN,MAAL;;;;;;;;;;;;;wBAUO;aACF,KAAK,KAAZ;;;;;;;;;;;;;sBAYO,MAAM;UACP,UAAU,UAAU,MAAV,CAAiB,IAAjB,EAAuB,OAAvB,EAAgC,IAAhC,EAAsC,OAAO,QAAP,CAAgB,IAAtD,EAA4D,KAAK,GAAjE,CAAhB;;UAEI,OAAJ,EAAa;aACN,MAAL;;;;;;;;;;;;;wBAUQ;aACH,KAAK,MAAZ;;;;;;;;;;sBASQ,OAAO;UACT,UAAU,UAAU,MAAV,CAAiB,IAAjB,EAAuB,QAAvB,EAAiC,KAAjC,EAAwC,OAAO,QAAP,CAAgB,KAAxD,CAAhB;;UAEI,OAAJ,EAAa;aACN,MAAL;;;;;;;AAKN,OAAO,eAAP,GAAyB,IAAI,cAAJ,EAAzB,CAEA,AAEA;;ACtRA,OAAO,GAAP,CAAW,IAAI,kBAAJ,EAAX,EAEA;;"} \ No newline at end of file diff --git a/dist/umd/qrious.js b/dist/umd/qrious.js index a69e377..dca33f2 100644 --- a/dist/umd/qrious.js +++ b/dist/umd/qrious.js @@ -1,5 +1,5 @@ /* - * QRious v2.0.1 + * QRious v2.0.2 * Copyright (C) 2016 Alasdair Mercer * Copyright (C) 2010 Tom Zerucha * @@ -909,7 +909,7 @@ this._value = options.value; this._valueLength = this._value.length; this._version = 0; - this._stringBuffer = this._value.slice(0); + this._stringBuffer = []; var dataBlock = void 0; var eccBlock = void 0; @@ -969,7 +969,7 @@ this._insertTimingRowAndColumn(); this._insertVersion(); this._syncMask(); - this._convertBitStream(this._stringBuffer.length); + this._convertBitStream(this._value.length); this._calculatePolynomial(); this._appendEccToData(); this._interleaveBlocks(); @@ -1141,7 +1141,7 @@ _r3x4 = 0; } - if (!(_x6 & _y6 & 1 + (_r3x4 && _r3x4 === _r3y3) & 1) && !this._isMasked(_x6, _y6)) { + if (!((_x6 & _y6 & 1) + (_r3x4 && _r3x4 === _r3y3) & 1) && !this._isMasked(_x6, _y6)) { this.buffer[_x6 + _y6 * width] ^= 1; } } @@ -1277,11 +1277,9 @@ }, { key: '_convertBitStream', value: function _convertBitStream(length) { - // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji - // not supported). - + // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji not supported). for (var i = 0; i < length; i++) { - this._ecc[i] = this._stringBuffer.charCodeAt(i); + this._ecc[i] = this._value.charCodeAt(i); } this._stringBuffer = this._ecc.slice(0); @@ -1905,7 +1903,7 @@ }, { key: 'VERSION', get: function get() { - return '2.0.1'; + return '2.0.2'; } }]); diff --git a/dist/umd/qrious.js.map b/dist/umd/qrious.js.map index 6c565b3..dc1440c 100644 --- a/dist/umd/qrious.js.map +++ b/dist/umd/qrious.js.map @@ -1 +1 @@ -{"version":3,"file":null,"sources":["../../../../../../\u0000babelHelpers","../../src/util/Utilities.js","../../src/service/Service.js","../../src/service/element/ElementService.js","../../src/service/element/BrowserElementService.js","../../src/renderer/Renderer.js","../../src/renderer/CanvasRenderer.js","../../src/Alignment.js","../../src/ErrorCorrection.js","../../src/Galois.js","../../src/Version.js","../../src/Frame.js","../../src/renderer/ImageRenderer.js","../../src/service/ServiceManager.js","../../src/QRious.js","../../src/runtime/browser.js"],"sourcesContent":["var babelHelpers = {};\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n};\n\nexport var jsx = function () {\n var REACT_ELEMENT_TYPE = typeof Symbol === \"function\" && Symbol.for && Symbol.for(\"react.element\") || 0xeac7;\n return function createRawReactElement(type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n props = {};\n }\n\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null\n };\n };\n}();\n\nexport var asyncToGenerator = function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n return step(\"next\", value);\n }, function (err) {\n return step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n};\n\nexport var classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nexport var createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nexport var defineEnumerableProperties = function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n return obj;\n};\n\nexport var defaults = function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n\n return obj;\n};\n\nexport var defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nexport var get = function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n};\n\nexport var inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar _instanceof = function (left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n};\n\nexport var interopRequireDefault = function (obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n};\n\nexport var interopRequireWildcard = function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n return newObj;\n }\n};\n\nexport var newArrowCheck = function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n};\n\nexport var objectDestructuringEmpty = function (obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n};\n\nexport var objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nexport var possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nexport var selfGlobal = typeof global === \"undefined\" ? self : global;\n\nexport var set = function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if (\"value\" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n};\n\nexport var slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\n\nexport var slicedToArrayLoose = function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n\n if (i && _arr.length === i) break;\n }\n\n return _arr;\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n};\n\nexport var taggedTemplateLiteral = function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n};\n\nexport var taggedTemplateLiteralLoose = function (strings, raw) {\n strings.raw = raw;\n return strings;\n};\n\nexport var temporalRef = function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n } else {\n return val;\n }\n};\n\nexport var temporalUndefined = {};\n\nexport var toArray = function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n};\n\nexport var toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n};\n\nbabelHelpers;\n\nexport { _typeof as typeof, _extends as extends, _instanceof as instanceof }","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n */\nclass Utilities {\n\n /**\n * Copies all properties from the source object to the target object, however, all property\n * names on the target will be prefixed with an underscore, used to indicate that they are private.\n *\n * @param {Object} target - the object to which the private fields are to be copied\n * @param {Object} source - the object from which the fields are to be copied\n * @return {Object} A reference to the target object.\n * @public\n * @static\n */\n static privatize(target, source) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n target[`_${key}`] = source[key]\n }\n }\n\n return target\n }\n\n /**\n * Sets the specified value on a given field on the object provided.\n *\n * If value is null, the specified default value will be used instead.\n *\n * An optional transformer can be specified which will be used to transform the value (or default value)\n * before it is assigned to the field.\n *\n * @param {Object} object - the object whose field is to be set with value\n * @param {String} fieldName - the field to be set with value\n * @param {*} value - the value to be set on the named field\n * @param {*} [defaultValue] - the value to be used if value is null\n * @param {Function} [transformer] - a function used to transform the value before it is assigned to the named field\n * @return {Boolean} true if the value of the field has changed as a result of the assignment; otherwise\n * false.\n * @public\n * @static\n */\n static setter(object, fieldName, value, defaultValue, transformer) {\n const oldValue = object[fieldName]\n let newValue = value != null ? value : defaultValue\n if (typeof transformer === 'function') {\n newValue = transformer(newValue)\n }\n\n object[fieldName] = newValue\n\n return newValue !== oldValue\n }\n\n /**\n * Throws an error indicating that the a given method on a specific class has not been implemented.\n *\n * @param {String} className - the name of the class on which the method has not been implemented\n * @param {String} methodName - the name of the method which has not been implemented\n * @throws {Error} The error describing the class method which has not been implemented.\n * @public\n * @static\n */\n static throwUnimplemented(className, methodName) {\n throw new Error(`\"${methodName}\" method must be implemented on the ${className} class`)\n }\n\n /**\n * Transforms the specified string to upper case while remaining null-safe.\n *\n * @param {String} string - the string to be transformed to upper case\n * @return {String} string transformed to upper case if string is not null.\n * @public\n * @static\n */\n static toUpperCase(string) {\n return string != null && string.toUpperCase()\n }\n}\n\nexport default Utilities\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n */\nclass Service {\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {String} The service name.\n * @public\n */\n getName() {\n Utilities.throwUnimplemented('Service', 'getName')\n }\n}\n\nexport default Service\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Service from '../Service'\nimport Utilities from '../../util/Utilities'\n\n/**\n * A service for working with elements.\n *\n * @public\n * @extends Service\n */\nclass ElementService extends Service {\n\n /**\n * Creates an instance of a canvas element.\n *\n * @return {*} The newly created canvas element.\n * @public\n */\n createCanvas() {\n Utilities.throwUnimplemented('ElementService', 'createCanvas')\n }\n\n /**\n * Creates an instance of a image element.\n *\n * @return {*} The newly created image element.\n * @public\n */\n createImage() {\n Utilities.throwUnimplemented('ElementService', 'createImage')\n }\n\n /**\n * @override\n */\n getName() {\n return 'element'\n }\n\n /**\n * Returns whether the specified element is a canvas.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is a canvas; otherwise false.\n * @public\n */\n isCanvas(element) {\n Utilities.throwUnimplemented('ElementService', 'isCanvas')\n }\n\n /**\n * Returns whether the specified element is an image.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is an image; otherwise false.\n * @public\n */\n isImage(element) {\n Utilities.throwUnimplemented('ElementService', 'isImage')\n }\n}\n\nexport default ElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport ElementService from './ElementService'\n\n/**\n * An implementation of {@link ElementService} intended for use within a browser environment.\n *\n * @public\n * @extends ElementService\n */\nclass BrowserElementService extends ElementService {\n\n /**\n * @override\n */\n createCanvas() {\n return document.createElement('canvas')\n }\n\n /**\n * @override\n */\n createImage() {\n return document.createElement('img')\n }\n\n /**\n * @override\n */\n isCanvas(element) {\n return element instanceof HTMLCanvasElement\n }\n\n /**\n * @override\n */\n isImage(element) {\n return element instanceof HTMLImageElement\n }\n}\n\nexport default BrowserElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so ordering of their execution is important.\n *\n * @public\n */\nclass Renderer {\n\n /**\n * Creates a new instance of {@link Renderer} for the qrious instance provided.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @public\n */\n constructor(qrious) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n */\n this.qrious = qrious\n }\n\n /**\n * Draws the specified QR code frame on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @protected\n */\n draw(frame) {\n Utilities.throwUnimplemented('Renderer', 'draw')\n }\n\n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame provided.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {Number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n */\n getModuleSize(frame) {\n const pixels = Math.floor(this.qrious.size / frame.width)\n\n return Math.max(1, pixels)\n }\n\n /**\n * Calculates the offset/padding (in pixel units) to be inserted before the QR code based on the frame\n * provided.\n *\n * The returned value will be zero if there is no available offset or if the size of the QR code does not fit its\n * contents. It will never be a negative value. This is done so that the inevitable clipping appears more naturally\n * and it is not clipped from all directions.\n *\n * @param {Frame} frame - the {@link Frame} from which the offset is to be derived\n * @return {Number} The pixel offset for the QR code which will be no less than zero.\n * @protected\n */\n getOffset(frame) {\n const moduleSize = this.getModuleSize(frame)\n const offset = Math.floor((this.qrious.size - moduleSize * frame.width) / 2)\n\n return Math.max(0, offset)\n }\n\n /**\n * Renders a QR code on the underlying element based on the frame provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @public\n */\n render(frame) {\n this.resize()\n this.reset()\n this.draw(frame)\n }\n\n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n reset() {\n Utilities.throwUnimplemented('Renderer', 'reset')\n }\n\n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n resize() {\n Utilities.throwUnimplemented('Renderer', 'resize')\n }\n}\n\nexport default Renderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with canvas elements.\n *\n * @public\n * @extends Renderer\n */\nclass CanvasRenderer extends Renderer {\n\n /**\n * @override\n */\n draw(frame) {\n const qrious = this.qrious\n const moduleSize = this.getModuleSize(frame)\n const offset = this.getOffset(frame)\n const context = qrious.canvas.getContext('2d')\n\n context.fillStyle = qrious.foreground\n\n for (let i = 0; i < frame.width; i++) {\n for (let j = 0; j < frame.width; j++) {\n if (frame.buffer[j * frame.width + i]) {\n context.fillRect(moduleSize * i + offset, moduleSize * j + offset, moduleSize, moduleSize)\n }\n }\n }\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n const context = qrious.canvas.getContext('2d')\n\n context.lineWidth = 1\n context.clearRect(0, 0, qrious.size, qrious.size)\n context.fillStyle = qrious.background\n context.fillRect(0, 0, qrious.size, qrious.size)\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const canvas = qrious.canvas\n\n canvas.width = qrious.size\n canvas.height = qrious.size\n }\n}\n\nexport default CanvasRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains alignment pattern information.\n *\n * @public\n */\nclass Alignment {\n\n /**\n * Returns the alignment pattern block.\n *\n * @return {Number[]} The alignment pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n }\n}\n\nexport default Alignment\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains error correction information.\n *\n * @public\n */\nclass ErrorCorrection {\n\n /**\n * Returns the error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @return {Number[]} The ECC blocks.\n * @public\n * @static\n */\n static get BLOCKS() {\n return [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ]\n }\n\n /**\n * Returns the final format bits with mask (level << 3 | mask).\n *\n * @return {Number[]} The final format bits.\n * @public\n * @static\n */\n static get FINAL_FORMAT() {\n return [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ]\n }\n\n /**\n * Returns a map of human-readable ECC levels.\n *\n * @return {Object} A ECC level mapping.\n * @public\n * @static\n */\n static get LEVELS() {\n return {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n }\n}\n\nexport default ErrorCorrection\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains Galois field information.\n *\n * @public\n */\nclass Galois {\n\n /**\n * Returns the Galois field exponent table.\n *\n * @return {Number[]} The Galois field exponent table.\n * @public\n * @static\n */\n static get EXPONENT() {\n return [\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n 0x4c, 0x98, 0x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, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,\n 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ]\n }\n\n /**\n * Returns the Galois field log table.\n *\n * @return {Number[]} The Galois field log table.\n * @public\n * @static\n */\n static get LOG() {\n return [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,\n 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6,\n 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88,\n 0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40,\n 0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d,\n 0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57,\n 0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18,\n 0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e,\n 0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61,\n 0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2,\n 0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6,\n 0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a,\n 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,\n 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n ]\n }\n}\n\nexport default Galois\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains version pattern information.\n *\n * @public\n */\nclass Version {\n\n /**\n * Returns the version pattern block.\n *\n * @return {Number[]} The version pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n }\n}\n\nexport default Version\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Alignment from './Alignment'\nimport ErrorCorrection from './ErrorCorrection'\nimport Galois from './Galois'\nimport Version from './Version'\n\n/**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @public\n */\nclass Frame {\n\n static _createArray(length) {\n const array = []\n\n for (let i = 0; i < length; i++) {\n array[i] = 0\n }\n\n return array\n }\n\n static _getMaskBit(x, y) {\n let bit\n\n if (x > y) {\n bit = x\n x = y\n y = bit\n }\n\n bit = y\n bit += y * y\n bit >>= 1\n bit += x\n\n return bit\n }\n\n static _modN(x) {\n while (x >= 255) {\n x -= 255\n x = (x >> 8) + (x & 255)\n }\n\n return x\n }\n\n // *Badness* coefficients.\n static get N1() {\n return 3\n }\n static get N2() {\n return 3\n }\n static get N3() {\n return 40\n }\n static get N4() {\n return 10\n }\n\n /**\n * Creates an instance of {@link Frame} based on the options provided.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n */\n constructor(options) {\n this._badness = []\n this._level = ErrorCorrection.LEVELS[options.level]\n this._polynomial = []\n this._value = options.value\n this._valueLength = this._value.length\n this._version = 0\n this._stringBuffer = this._value.slice(0)\n\n let dataBlock\n let eccBlock\n let neccBlock1\n let neccBlock2\n\n while (this._version < 40) {\n this._version++\n\n let index = (this._level - 1) * 4 + (this._version - 1) * 16\n\n neccBlock1 = ErrorCorrection.BLOCKS[index++]\n neccBlock2 = ErrorCorrection.BLOCKS[index++]\n dataBlock = ErrorCorrection.BLOCKS[index++]\n eccBlock = ErrorCorrection.BLOCKS[index]\n\n index = dataBlock * (neccBlock1 + neccBlock2) + neccBlock2 - 3 + (this._version <= 9)\n\n if (this._valueLength <= index) {\n break\n }\n }\n\n this._dataBlock = dataBlock\n this._eccBlock = eccBlock\n this._neccBlock1 = neccBlock1\n this._neccBlock2 = neccBlock2\n\n /**\n * The data width is based on version.\n *\n * @public\n * @type {Number}\n */\n // FIXME: Ensure that it fits instead of being truncated.\n this.width = 17 + 4 * this._version\n\n /**\n * The image buffer.\n *\n * @public\n * @type {Number[]}\n */\n this.buffer = Frame._createArray(this.width * this.width)\n\n this._ecc = Frame._createArray(this._dataBlock + (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2)\n this._mask = Frame._createArray((this.width * (this.width + 1) + 1) / 2)\n\n this._insertFinders()\n this._insertAlignments()\n\n // Insert single foreground cell.\n this.buffer[8 + this.width * (this.width - 8)] = 1\n\n this._insertTimingGap()\n this._reverseMask()\n this._insertTimingRowAndColumn()\n this._insertVersion()\n this._syncMask()\n this._convertBitStream(this._stringBuffer.length)\n this._calculatePolynomial()\n this._appendEccToData()\n this._interleaveBlocks()\n this._pack()\n this._finish()\n }\n\n _addAlignment(x, y) {\n this.buffer[x + this.width * y] = 1\n\n for (let i = -2; i < 2; i++) {\n this.buffer[x + i + this.width * (y - 2)] = 1\n this.buffer[x - 2 + this.width * (y + i + 1)] = 1\n this.buffer[x + 2 + this.width * (y + i)] = 1\n this.buffer[x + i + 1 + this.width * (y + 2)] = 1\n }\n\n for (let i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i)\n this._setMask(x + 1, y - i)\n this._setMask(x - i, y - 1)\n this._setMask(x + i, y + 1)\n }\n }\n\n _appendData(data, dataLength, ecc, eccLength) {\n for (let i = 0; i < eccLength; i++) {\n this._stringBuffer[ecc + i] = 0\n }\n\n for (let i = 0; i < dataLength; i++) {\n const bit = Galois.LOG[this._stringBuffer[data + i] ^ this._stringBuffer[ecc]]\n\n if (bit !== 255) {\n for (let j = 1; j < eccLength; j++) {\n this._stringBuffer[ecc + j - 1] = this._stringBuffer[ecc + j] ^ Galois.EXPONENT[Frame._modN(bit + this._polynomial[eccLength - j])]\n }\n } else {\n for (let j = ecc; j < ecc + eccLength; j++) {\n this._stringBuffer[j] = this._stringBuffer[j + 1]\n }\n }\n\n this._stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois.EXPONENT[Frame._modN(bit + this._polynomial[0])]\n }\n }\n\n _appendEccToData() {\n let data = 0\n let ecc = this._calculateMaxLength()\n\n for (let i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, this._dataBlock, ecc, this._eccBlock)\n\n data += this._dataBlock\n ecc += this._eccBlock\n }\n\n for (let i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, this._dataBlock + 1, ecc, this._eccBlock)\n\n data += this._dataBlock + 1\n ecc += this._eccBlock\n }\n }\n\n _applyMask(mask) {\n const width = this.width\n\n switch (mask) {\n case 0:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(x + y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 1:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 2:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 3:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 4:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, r3y = y >> 1 & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n r3y = !r3y\n }\n\n if (!r3y && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 5:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 6:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!(x & y & 1 + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 7:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n }\n }\n\n _calculateMaxLength() {\n return this._dataBlock * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n }\n\n _calculatePolynomial() {\n this._polynomial[0] = 1\n\n for (let i = 0; i < this._eccBlock; i++) {\n this._polynomial[i + 1] = 1\n\n for (let j = i; j > 0; j--) {\n this._polynomial[j] = this._polynomial[j] ? this._polynomial[j - 1] ^ Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[j]] + i)] : this._polynomial[j - 1]\n }\n\n this._polynomial[0] = Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[0]] + i)]\n }\n\n // Use logs for generator polynomial to save calculation step.\n for (let i = 0; i <= this._eccBlock; i++) {\n this._polynomial[i] = Galois.LOG[this._polynomial[i]]\n }\n }\n\n _checkBadness() {\n let bad = 0\n const width = this.width\n\n // Blocks of same colour.\n for (let y = 0; y < width - 1; y++) {\n for (let x = 0; x < width - 1; x++) {\n // All foreground colour.\n if (this.buffer[x + width * y] &&\n this.buffer[x + 1 + width * y] &&\n this.buffer[x + width * (y + 1)] &&\n this.buffer[x + 1 + width * (y + 1)] ||\n // All background colour.\n !(this.buffer[x + width * y] ||\n this.buffer[x + 1 + width * y] ||\n this.buffer[x + width * (y + 1)] ||\n this.buffer[x + 1 + width * (y + 1)])) {\n bad += Frame.N2\n }\n }\n }\n\n let bw = 0\n\n // X runs.\n for (let y = 0; y < width; y++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, x = 0; x < width; x++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n bw += b ? 1 : -1\n }\n\n bad += this._getBadness(h)\n }\n\n if (bw < 0) {\n bw = -bw\n }\n\n let count = 0\n let big = bw\n big += big << 2\n big <<= 1\n\n while (big > width * width) {\n big -= width * width\n count++\n }\n\n bad += count * Frame.N4\n\n // Y runs.\n for (let x = 0; x < width; x++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, y = 0; y < width; y++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n }\n\n bad += this._getBadness(h)\n }\n\n return bad\n }\n\n _convertBitStream(length) {\n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji\n // not supported).\n\n for (let i = 0; i < length; i++) {\n this._ecc[i] = this._stringBuffer.charCodeAt(i)\n }\n\n this._stringBuffer = this._ecc.slice(0)\n\n const maxLength = this._calculateMaxLength()\n\n if (length >= maxLength - 2) {\n length = maxLength - 2\n\n if (this._version > 9) {\n length--\n }\n }\n\n // Shift and re-pack to insert length prefix.\n let index = length\n\n if (this._version > 9) {\n this._stringBuffer[index + 2] = 0\n this._stringBuffer[index + 3] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 3] |= 255 & bit << 4\n this._stringBuffer[index + 2] = bit >> 4\n }\n\n this._stringBuffer[2] |= 255 & length << 4\n this._stringBuffer[1] = length >> 4\n this._stringBuffer[0] = 0x40 | length >> 12\n } else {\n this._stringBuffer[index + 1] = 0\n this._stringBuffer[index + 2] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 2] |= 255 & bit << 4\n this._stringBuffer[index + 1] = bit >> 4\n }\n\n this._stringBuffer[1] |= 255 & length << 4\n this._stringBuffer[0] = 0x40 | length >> 4\n }\n\n // Fill to end with pad pattern.\n index = length + 3 - (this._version < 10)\n\n while (index < maxLength) {\n this._stringBuffer[index++] = 0xec\n this._stringBuffer[index++] = 0x11\n }\n }\n\n _getBadness(length) {\n let badRuns = 0\n\n for (let i = 0; i <= length; i++) {\n if (this._badness[i] >= 5) {\n badRuns += Frame.N1 + this._badness[i] - 5\n }\n }\n\n // FBFFFBF as in finder.\n for (let i = 3; i < length - 1; i += 2) {\n if (this._badness[i - 2] === this._badness[i + 2] &&\n this._badness[i + 2] === this._badness[i - 1] &&\n this._badness[i - 1] === this._badness[i + 1] &&\n this._badness[i - 1] * 3 === this._badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (this._badness[i - 3] === 0 || i + 3 > length ||\n this._badness[i - 3] * 3 >= this._badness[i] * 4 ||\n this._badness[i + 3] * 3 >= this._badness[i] * 4)) {\n badRuns += Frame.N3\n }\n }\n\n return badRuns\n }\n\n _finish() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice(0)\n\n let bit = 0\n let i\n let mask = 30000\n\n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i)\n\n const currentMask = this._checkBadness()\n\n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask\n bit = i\n }\n\n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break\n }\n\n // Reset for next pass.\n this.buffer = this._stringBuffer.slice(0)\n }\n\n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit)\n }\n\n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection.FINAL_FORMAT[bit + (this._level - 1 << 3)]\n\n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[this.width - 1 - i + this.width * 8] = 1\n\n if (i < 6) {\n this.buffer[8 + this.width * i] = 1\n } else {\n this.buffer[8 + this.width * (i + 1)] = 1\n }\n }\n }\n\n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[8 + this.width * (this.width - 7 + i)] = 1\n\n if (i) {\n this.buffer[6 - i + this.width * 8] = 1\n } else {\n this.buffer[7 + this.width * 8] = 1\n }\n }\n }\n }\n\n _interleaveBlocks() {\n const maxLength = this._calculateMaxLength()\n let i\n let k = 0\n\n for (i = 0; i < this._dataBlock; i++) {\n for (let j = 0; j < this._neccBlock1; j++) {\n this._ecc[k++] = this._stringBuffer[i + j * this._dataBlock]\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n\n for (i = 0; i < this._eccBlock; i++) {\n for (let j = 0; j < this._neccBlock1 + this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[maxLength + i + j * this._eccBlock]\n }\n }\n\n this._stringBuffer = this._ecc\n }\n\n _insertAlignments() {\n const width = this.width\n\n if (this._version > 1) {\n const i = Alignment.BLOCK[this._version]\n let y = width - 7\n\n for (;;) {\n let x = width - 7\n\n while (x > i - 3) {\n this._addAlignment(x, y)\n\n if (x < i) {\n break\n }\n\n x -= i\n }\n\n if (y <= i + 9) {\n break\n }\n\n y -= i\n\n this._addAlignment(6, y)\n this._addAlignment(y, 6)\n }\n }\n }\n\n _insertFinders() {\n const width = this.width\n\n for (let i = 0; i < 3; i++) {\n let j = 0\n let y = 0\n\n if (i === 1) {\n j = width - 7\n }\n if (i === 2) {\n y = width - 7\n }\n\n this.buffer[y + 3 + width * (j + 3)] = 1\n\n for (let x = 0; x < 6; x++) {\n this.buffer[y + x + width * j] = 1\n this.buffer[y + width * (j + x + 1)] = 1\n this.buffer[y + 6 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 6)] = 1\n }\n\n for (let x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1)\n this._setMask(y + 1, j + x + 1)\n this._setMask(y + 5, j + x)\n this._setMask(y + x + 1, j + 5)\n }\n\n for (let x = 2; x < 4; x++) {\n this.buffer[y + x + width * (j + 2)] = 1\n this.buffer[y + 2 + width * (j + x + 1)] = 1\n this.buffer[y + 4 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 4)] = 1\n }\n }\n }\n\n _insertTimingGap() {\n const width = this.width\n\n for (let y = 0; y < 7; y++) {\n this._setMask(7, y)\n this._setMask(width - 8, y)\n this._setMask(7, y + width - 7)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x, 7)\n this._setMask(x + width - 8, 7)\n this._setMask(x, width - 8)\n }\n }\n\n _insertTimingRowAndColumn() {\n const width = this.width\n\n for (let x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6)\n this._setMask(6, 8 + x)\n } else {\n this.buffer[8 + x + width * 6] = 1\n this.buffer[6 + width * (8 + x)] = 1\n }\n }\n }\n\n _insertVersion() {\n const width = this.width\n\n if (this._version > 6) {\n let i = Version.BLOCK[this._version - 7]\n let j = 17\n\n for (let x = 0; x < 6; x++) {\n for (let y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? this._version >> j - 12 : i >> j)) {\n this.buffer[5 - x + width * (2 - y + width - 11)] = 1\n this.buffer[2 - y + width - 11 + width * (5 - x)] = 1\n } else {\n this._setMask(5 - x, 2 - y + width - 11)\n this._setMask(2 - y + width - 11, 5 - x)\n }\n }\n }\n }\n }\n\n _isMasked(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n return this._mask[bit] === 1\n }\n\n _pack() {\n let x = this.width - 1\n let y = this.width - 1\n let k = 1\n let v = 1\n\n // Interleaved data and ECC codes.\n const length = (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n\n for (let i = 0; i < length; i++) {\n let bit = this._stringBuffer[i]\n\n for (let j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + this.width * y] = 1\n }\n\n // Find next fill position.\n do {\n if (v) {\n x--\n } else {\n x++\n\n if (k) {\n if (y !== 0) {\n y--\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y = 9\n }\n }\n } else if (y !== this.width - 1) {\n y++\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y -= 8\n }\n }\n }\n\n v = !v\n } while (this._isMasked(x, y))\n }\n }\n }\n\n _reverseMask() {\n const width = this.width\n\n for (let x = 0; x < 9; x++) {\n this._setMask(x, 8)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8)\n this._setMask(8, x)\n }\n\n for (let y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7)\n }\n }\n\n _setMask(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n this._mask[bit] = 1\n }\n\n _syncMask() {\n const width = this.width\n\n for (let y = 0; y < width; y++) {\n for (let x = 0; x <= y; x++) {\n if (this.buffer[x + width * y]) {\n this._setMask(x, y)\n }\n }\n }\n }\n}\n\nexport default Frame\n\n/**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {String} level - The ECC level to be used.\n * @property {String} value - The value to be encoded.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with img elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas element as the src for the img element being rendered.\n *\n * @public\n * @extends Renderer\n */\nclass ImageRenderer extends Renderer {\n\n /**\n * @override\n */\n draw() {\n const qrious = this.qrious\n\n qrious.image.src = qrious.toDataURL()\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n\n qrious.image.src = ''\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const image = qrious.image\n\n image.width = qrious.size\n image.height = qrious.size\n }\n}\n\nexport default ImageRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n */\nclass ServiceManager {\n\n /**\n * Creates a new instance of {@link ServiceManager}.\n *\n * @public\n */\n constructor() {\n this._services = {}\n }\n\n /**\n * Returns the {@link Service} being managed with the specified name.\n *\n * @param {String} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name.\n * @throws {Error} If no {@link Service} is being managed with name.\n * @public\n */\n getService(name) {\n const service = this._services[name]\n if (!service) {\n throw new Error(`Service is not being managed with name: ${name}`)\n }\n\n return service\n }\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name to the\n * service provided.\n *\n * @param {String} name - the name of the {@link Service} to be managed with name\n * @param {Service} service - the {@link Service} implementation to be managed\n * @throws {Error} If a {@link Service} is already being managed with the same name.\n * @public\n */\n setService(name, service) {\n if (this._services[name]) {\n throw new Error(`Service is already managed with name: ${name}`)\n }\n\n if (service) {\n this._services[name] = service\n }\n }\n}\n\nexport default ServiceManager\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport CanvasRenderer from './renderer/CanvasRenderer'\nimport Frame from './Frame'\nimport ImageRenderer from './renderer/ImageRenderer'\nimport ServiceManager from './service/ServiceManager'\nimport Utilities from './util/Utilities'\n\n/**\n * Enables configuration of a QR code generator which uses HTML5 canvas for rendering.\n *\n * @public\n */\nclass QRious {\n\n /**\n * Returns the default options for {@link QRious}.\n *\n * @return {QRious~Options} The default options.\n * @public\n * @static\n */\n static get DEFAULTS() {\n return {\n background: 'white',\n foreground: 'black',\n level: 'L',\n mime: 'image/png',\n size: 100,\n value: ''\n }\n }\n\n /**\n * Returns the current version of {@link QRious}.\n *\n * @return {String} The current version.\n * @public\n * @static\n */\n static get VERSION() {\n return '2.0.1'\n }\n\n /**\n * Configures the service provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n */\n static use(service) {\n QRious._serviceManager.setService(service.getName(), service)\n }\n\n static _parseOptions(options) {\n options = Object.assign({}, QRious.DEFAULTS, options)\n options.level = Utilities.toUpperCase(options.level)\n options.size = Math.abs(options.size)\n\n return options\n }\n\n /**\n * Creates a new instance of {@link QRious} based on the options provided.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @public\n */\n constructor(options) {\n options = QRious._parseOptions(options)\n\n Utilities.privatize(this, options)\n\n let element = this._element\n let elementService = QRious._serviceManager.getService('element')\n\n /**\n * The canvas being used to render the QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas()\n this.canvas.qrious = this\n\n /**\n * The img to contain the rendered QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.image = element && elementService.isImage(element) ? element : elementService.createImage()\n this.image.qrious = this\n\n this._renderers = [\n new CanvasRenderer(this),\n new ImageRenderer(this)\n ]\n\n this.update()\n }\n\n /**\n * Returns the image data URI for the generated QR code using the mime provided.\n *\n * @param {String} [mime] - the MIME type for the image\n * @return {String} The image data URI for the QR code.\n * @public\n */\n toDataURL(mime) {\n return this.canvas.toDataURL(mime || this.mime)\n }\n\n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @protected\n */\n update() {\n const frame = new Frame({\n level: this.level,\n value: this.value\n })\n\n this._renderers.forEach((renderer) => renderer.render(frame))\n }\n\n /**\n * Returns the background color for the QR code.\n *\n * @return {String} The background color.\n * @public\n */\n get background() {\n return this._background\n }\n\n /**\n * Sets the background color for the QR code to background.\n *\n * @param {String} [background=\"white\"] - the background color to be set\n * @public\n */\n set background(background) {\n const changed = Utilities.setter(this, '_background', background, QRious.DEFAULTS.background)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the foreground color for the QR code.\n *\n * @return {String} The foreground color.\n * @public\n */\n get foreground() {\n return this._foreground\n }\n\n /**\n * Sets the foreground color for the QR code to foreground.\n *\n * @param {String} [foreground=\"black\"] - the foreground color to be set\n * @public\n */\n set foreground(foreground) {\n const changed = Utilities.setter(this, '_foreground', foreground, QRious.DEFAULTS.foreground)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the error correction level for the QR code.\n *\n * @return {String} The ECC level.\n * @public\n */\n get level() {\n return this._level\n }\n\n /**\n * Sets the error correction level for the QR code to level.\n *\n * level will be transformed to upper case to aid mapping to known ECC level blocks.\n *\n * @param {String} [level=\"L\"] - the ECC level to be set\n * @public\n */\n set level(level) {\n const changed = Utilities.setter(this, '_level', level, QRious.DEFAULTS.level, Utilities.toUpperCase)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the MIME type for the image rendered for the QR code.\n *\n * @return {String} The image MIME type.\n * @public\n */\n get mime() {\n return this._mime\n }\n\n /**\n * Sets the MIME type for the image rendered for the QR code to mime.\n *\n * @param {String} [mime=\"image/png\"] - the image MIME type to be set\n * @public\n */\n set mime(mime) {\n const changed = Utilities.setter(this, '_mime', mime, QRious.DEFAULTS.mime)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the size of the QR code.\n *\n * @return {Number} The size in pixels.\n * @public\n */\n get size() {\n return this._size\n }\n\n /**\n * Sets the size of the QR code to size.\n *\n * size will be transformed to ensure that it is always an absolute positive numbers (e.g.\n * -100 would become 100).\n *\n * @param {Number} [size=100] - the size in pixels to be set\n * @public\n */\n set size(size) {\n const changed = Utilities.setter(this, '_size', size, QRious.DEFAULTS.size, Math.abs)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the value of the QR code.\n *\n * @return {String} The value.\n * @public\n */\n get value() {\n return this._value\n }\n\n /**\n * Sets the value of the QR code to value.\n *\n * @param {String} [value=\"\"] - the value to be set\n * @public\n */\n set value(value) {\n const changed = Utilities.setter(this, '_value', value, QRious.DEFAULTS.value)\n\n if (changed) {\n this.update()\n }\n }\n}\n\nQRious._serviceManager = new ServiceManager()\n\nexport default QRious\n\n/**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {String} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas or\n * img. The element(s) will be created if needed.\n * @property {String} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {String} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {String} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {Number} [size=100] - The size of the QR code in pixels.\n * @property {String} [value=\"\"] - The value to be encoded within the QR code.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport BrowserElementService from '../service/element/BrowserElementService'\nimport QRious from '../QRious'\n\nQRious.use(new BrowserElementService())\n\nexport default QRious\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA+EO,IAAI,cAAc,GAAG,UAAU,QAAQ,EAAE,WAAW,EAAE;AAC7D,EAAA,EAAE,IAAI,CAAC,CAAC,QAAQ,YAAY,WAAW,CAAC,EAAE;AAC1C,EAAA,IAAI,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;AAC7D,EAAA,GAAG;AACH,EAAA,CAAC,CAAC;;AAEF,AAAO,EAAA,IAAI,WAAW,GAAG,YAAY;AACrC,EAAA,EAAE,SAAS,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE;AAC3C,EAAA,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC3C,EAAA,MAAM,IAAI,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAChC,EAAA,MAAM,UAAU,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,IAAI,KAAK,CAAC;AAC7D,EAAA,MAAM,UAAU,CAAC,YAAY,GAAG,IAAI,CAAC;AACrC,EAAA,MAAM,IAAI,OAAO,IAAI,UAAU,EAAE,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC;AAC5D,EAAA,MAAM,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AAChE,EAAA,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AACD,EAAA;AACF,EAAA;;;;;;;;;;;0BAQU;AACT,EAAA,aAAO,KAAK,KAAZ;AACD,EAAA;;;;;;;;;;;;wBAWQ,MAAM;AACb,EAAA,UAAM,UAAU,UAAU,MAAV,CAAiB,IAAjB,EAAuB,OAAvB,EAAgC,IAAhC,EAAsC,OAAO,QAAP,CAAgB,IAAtD,EAA4D,KAAK,GAAjE,CAAhB;;AAEA,EAAA,UAAI,OAAJ,EAAa;AACX,EAAA,aAAK,MAAL;AACD,EAAA;AACF,EAAA;;;;;;;;;;;0BAQW;AACV,EAAA,aAAO,KAAK,MAAZ;AACD,EAAA;;;;;;;;;wBAQS,OAAO;AACf,EAAA,UAAM,UAAU,UAAU,MAAV,CAAiB,IAAjB,EAAuB,QAAvB,EAAiC,KAAjC,EAAwC,OAAO,QAAP,CAAgB,KAAxD,CAAhB;;AAEA,EAAA,UAAI,OAAJ,EAAa;AACX,EAAA,aAAK,MAAL;AACD,EAAA;AACF,EAAA;;;;;AAGH,EAAA,OAAO,eAAP,GAAyB,IAAI,cAAJ,EAAzB,CAEA;;ECpRA,OAAO,GAAP,CAAW,IAAI,qBAAJ,EAAX,EAEA;;;;"} \ No newline at end of file +{"version":3,"file":null,"sources":["../../src/util/Utilities.js","../../src/service/Service.js","../../src/service/element/ElementService.js","../../src/service/element/BrowserElementService.js","../../src/renderer/Renderer.js","../../src/renderer/CanvasRenderer.js","../../src/Alignment.js","../../src/ErrorCorrection.js","../../src/Galois.js","../../src/Version.js","../../src/Frame.js","../../src/renderer/ImageRenderer.js","../../src/service/ServiceManager.js","../../src/QRious.js","../../src/runtime/browser.js"],"sourcesContent":["/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n */\nclass Utilities {\n\n /**\n * Copies all properties from the source object to the target object, however, all property\n * names on the target will be prefixed with an underscore, used to indicate that they are private.\n *\n * @param {Object} target - the object to which the private fields are to be copied\n * @param {Object} source - the object from which the fields are to be copied\n * @return {Object} A reference to the target object.\n * @public\n * @static\n */\n static privatize(target, source) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n target[`_${key}`] = source[key]\n }\n }\n\n return target\n }\n\n /**\n * Sets the specified value on a given field on the object provided.\n *\n * If value is null, the specified default value will be used instead.\n *\n * An optional transformer can be specified which will be used to transform the value (or default value)\n * before it is assigned to the field.\n *\n * @param {Object} object - the object whose field is to be set with value\n * @param {String} fieldName - the field to be set with value\n * @param {*} value - the value to be set on the named field\n * @param {*} [defaultValue] - the value to be used if value is null\n * @param {Function} [transformer] - a function used to transform the value before it is assigned to the named field\n * @return {Boolean} true if the value of the field has changed as a result of the assignment; otherwise\n * false.\n * @public\n * @static\n */\n static setter(object, fieldName, value, defaultValue, transformer) {\n const oldValue = object[fieldName]\n let newValue = value != null ? value : defaultValue\n if (typeof transformer === 'function') {\n newValue = transformer(newValue)\n }\n\n object[fieldName] = newValue\n\n return newValue !== oldValue\n }\n\n /**\n * Throws an error indicating that the a given method on a specific class has not been implemented.\n *\n * @param {String} className - the name of the class on which the method has not been implemented\n * @param {String} methodName - the name of the method which has not been implemented\n * @throws {Error} The error describing the class method which has not been implemented.\n * @public\n * @static\n */\n static throwUnimplemented(className, methodName) {\n throw new Error(`\"${methodName}\" method must be implemented on the ${className} class`)\n }\n\n /**\n * Transforms the specified string to upper case while remaining null-safe.\n *\n * @param {String} string - the string to be transformed to upper case\n * @return {String} string transformed to upper case if string is not null.\n * @public\n * @static\n */\n static toUpperCase(string) {\n return string != null && string.toUpperCase()\n }\n}\n\nexport default Utilities\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n */\nclass Service {\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {String} The service name.\n * @public\n */\n getName() {\n Utilities.throwUnimplemented('Service', 'getName')\n }\n}\n\nexport default Service\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Service from '../Service'\nimport Utilities from '../../util/Utilities'\n\n/**\n * A service for working with elements.\n *\n * @public\n * @extends Service\n */\nclass ElementService extends Service {\n\n /**\n * Creates an instance of a canvas element.\n *\n * @return {*} The newly created canvas element.\n * @public\n */\n createCanvas() {\n Utilities.throwUnimplemented('ElementService', 'createCanvas')\n }\n\n /**\n * Creates an instance of a image element.\n *\n * @return {*} The newly created image element.\n * @public\n */\n createImage() {\n Utilities.throwUnimplemented('ElementService', 'createImage')\n }\n\n /**\n * @override\n */\n getName() {\n return 'element'\n }\n\n /**\n * Returns whether the specified element is a canvas.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is a canvas; otherwise false.\n * @public\n */\n isCanvas(element) {\n Utilities.throwUnimplemented('ElementService', 'isCanvas')\n }\n\n /**\n * Returns whether the specified element is an image.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is an image; otherwise false.\n * @public\n */\n isImage(element) {\n Utilities.throwUnimplemented('ElementService', 'isImage')\n }\n}\n\nexport default ElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport ElementService from './ElementService'\n\n/**\n * An implementation of {@link ElementService} intended for use within a browser environment.\n *\n * @public\n * @extends ElementService\n */\nclass BrowserElementService extends ElementService {\n\n /**\n * @override\n */\n createCanvas() {\n return document.createElement('canvas')\n }\n\n /**\n * @override\n */\n createImage() {\n return document.createElement('img')\n }\n\n /**\n * @override\n */\n isCanvas(element) {\n return element instanceof HTMLCanvasElement\n }\n\n /**\n * @override\n */\n isImage(element) {\n return element instanceof HTMLImageElement\n }\n}\n\nexport default BrowserElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so ordering of their execution is important.\n *\n * @public\n */\nclass Renderer {\n\n /**\n * Creates a new instance of {@link Renderer} for the qrious instance provided.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @public\n */\n constructor(qrious) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n */\n this.qrious = qrious\n }\n\n /**\n * Draws the specified QR code frame on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @protected\n */\n draw(frame) {\n Utilities.throwUnimplemented('Renderer', 'draw')\n }\n\n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame provided.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {Number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n */\n getModuleSize(frame) {\n const pixels = Math.floor(this.qrious.size / frame.width)\n\n return Math.max(1, pixels)\n }\n\n /**\n * Calculates the offset/padding (in pixel units) to be inserted before the QR code based on the frame\n * provided.\n *\n * The returned value will be zero if there is no available offset or if the size of the QR code does not fit its\n * contents. It will never be a negative value. This is done so that the inevitable clipping appears more naturally\n * and it is not clipped from all directions.\n *\n * @param {Frame} frame - the {@link Frame} from which the offset is to be derived\n * @return {Number} The pixel offset for the QR code which will be no less than zero.\n * @protected\n */\n getOffset(frame) {\n const moduleSize = this.getModuleSize(frame)\n const offset = Math.floor((this.qrious.size - moduleSize * frame.width) / 2)\n\n return Math.max(0, offset)\n }\n\n /**\n * Renders a QR code on the underlying element based on the frame provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @public\n */\n render(frame) {\n this.resize()\n this.reset()\n this.draw(frame)\n }\n\n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n reset() {\n Utilities.throwUnimplemented('Renderer', 'reset')\n }\n\n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n resize() {\n Utilities.throwUnimplemented('Renderer', 'resize')\n }\n}\n\nexport default Renderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with canvas elements.\n *\n * @public\n * @extends Renderer\n */\nclass CanvasRenderer extends Renderer {\n\n /**\n * @override\n */\n draw(frame) {\n const qrious = this.qrious\n const moduleSize = this.getModuleSize(frame)\n const offset = this.getOffset(frame)\n const context = qrious.canvas.getContext('2d')\n\n context.fillStyle = qrious.foreground\n\n for (let i = 0; i < frame.width; i++) {\n for (let j = 0; j < frame.width; j++) {\n if (frame.buffer[j * frame.width + i]) {\n context.fillRect(moduleSize * i + offset, moduleSize * j + offset, moduleSize, moduleSize)\n }\n }\n }\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n const context = qrious.canvas.getContext('2d')\n\n context.lineWidth = 1\n context.clearRect(0, 0, qrious.size, qrious.size)\n context.fillStyle = qrious.background\n context.fillRect(0, 0, qrious.size, qrious.size)\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const canvas = qrious.canvas\n\n canvas.width = qrious.size\n canvas.height = qrious.size\n }\n}\n\nexport default CanvasRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains alignment pattern information.\n *\n * @public\n */\nclass Alignment {\n\n /**\n * Returns the alignment pattern block.\n *\n * @return {Number[]} The alignment pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n }\n}\n\nexport default Alignment\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains error correction information.\n *\n * @public\n */\nclass ErrorCorrection {\n\n /**\n * Returns the error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @return {Number[]} The ECC blocks.\n * @public\n * @static\n */\n static get BLOCKS() {\n return [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ]\n }\n\n /**\n * Returns the final format bits with mask (level << 3 | mask).\n *\n * @return {Number[]} The final format bits.\n * @public\n * @static\n */\n static get FINAL_FORMAT() {\n return [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ]\n }\n\n /**\n * Returns a map of human-readable ECC levels.\n *\n * @return {Object} A ECC level mapping.\n * @public\n * @static\n */\n static get LEVELS() {\n return {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n }\n}\n\nexport default ErrorCorrection\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains Galois field information.\n *\n * @public\n */\nclass Galois {\n\n /**\n * Returns the Galois field exponent table.\n *\n * @return {Number[]} The Galois field exponent table.\n * @public\n * @static\n */\n static get EXPONENT() {\n return [\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 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38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,\n 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ]\n }\n\n /**\n * Returns the Galois field log table.\n *\n * @return {Number[]} The Galois field log table.\n * @public\n * @static\n */\n static get LOG() {\n return [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,\n 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6,\n 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88,\n 0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40,\n 0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d,\n 0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57,\n 0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18,\n 0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e,\n 0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61,\n 0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2,\n 0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6,\n 0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a,\n 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,\n 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n ]\n }\n}\n\nexport default Galois\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains version pattern information.\n *\n * @public\n */\nclass Version {\n\n /**\n * Returns the version pattern block.\n *\n * @return {Number[]} The version pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n }\n}\n\nexport default Version\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Alignment from './Alignment'\nimport ErrorCorrection from './ErrorCorrection'\nimport Galois from './Galois'\nimport Version from './Version'\n\n/**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @public\n */\nclass Frame {\n\n static _createArray(length) {\n const array = []\n\n for (let i = 0; i < length; i++) {\n array[i] = 0\n }\n\n return array\n }\n\n static _getMaskBit(x, y) {\n let bit\n\n if (x > y) {\n bit = x\n x = y\n y = bit\n }\n\n bit = y\n bit += y * y\n bit >>= 1\n bit += x\n\n return bit\n }\n\n static _modN(x) {\n while (x >= 255) {\n x -= 255\n x = (x >> 8) + (x & 255)\n }\n\n return x\n }\n\n // *Badness* coefficients.\n static get N1() {\n return 3\n }\n static get N2() {\n return 3\n }\n static get N3() {\n return 40\n }\n static get N4() {\n return 10\n }\n\n /**\n * Creates an instance of {@link Frame} based on the options provided.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n */\n constructor(options) {\n this._badness = []\n this._level = ErrorCorrection.LEVELS[options.level]\n this._polynomial = []\n this._value = options.value\n this._valueLength = this._value.length\n this._version = 0\n this._stringBuffer = []\n\n let dataBlock\n let eccBlock\n let neccBlock1\n let neccBlock2\n\n while (this._version < 40) {\n this._version++\n\n let index = (this._level - 1) * 4 + (this._version - 1) * 16\n\n neccBlock1 = ErrorCorrection.BLOCKS[index++]\n neccBlock2 = ErrorCorrection.BLOCKS[index++]\n dataBlock = ErrorCorrection.BLOCKS[index++]\n eccBlock = ErrorCorrection.BLOCKS[index]\n\n index = dataBlock * (neccBlock1 + neccBlock2) + neccBlock2 - 3 + (this._version <= 9)\n\n if (this._valueLength <= index) {\n break\n }\n }\n\n this._dataBlock = dataBlock\n this._eccBlock = eccBlock\n this._neccBlock1 = neccBlock1\n this._neccBlock2 = neccBlock2\n\n /**\n * The data width is based on version.\n *\n * @public\n * @type {Number}\n */\n // FIXME: Ensure that it fits instead of being truncated.\n this.width = 17 + 4 * this._version\n\n /**\n * The image buffer.\n *\n * @public\n * @type {Number[]}\n */\n this.buffer = Frame._createArray(this.width * this.width)\n\n this._ecc = Frame._createArray(this._dataBlock + (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2)\n this._mask = Frame._createArray((this.width * (this.width + 1) + 1) / 2)\n\n this._insertFinders()\n this._insertAlignments()\n\n // Insert single foreground cell.\n this.buffer[8 + this.width * (this.width - 8)] = 1\n\n this._insertTimingGap()\n this._reverseMask()\n this._insertTimingRowAndColumn()\n this._insertVersion()\n this._syncMask()\n this._convertBitStream(this._value.length)\n this._calculatePolynomial()\n this._appendEccToData()\n this._interleaveBlocks()\n this._pack()\n this._finish()\n }\n\n _addAlignment(x, y) {\n this.buffer[x + this.width * y] = 1\n\n for (let i = -2; i < 2; i++) {\n this.buffer[x + i + this.width * (y - 2)] = 1\n this.buffer[x - 2 + this.width * (y + i + 1)] = 1\n this.buffer[x + 2 + this.width * (y + i)] = 1\n this.buffer[x + i + 1 + this.width * (y + 2)] = 1\n }\n\n for (let i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i)\n this._setMask(x + 1, y - i)\n this._setMask(x - i, y - 1)\n this._setMask(x + i, y + 1)\n }\n }\n\n _appendData(data, dataLength, ecc, eccLength) {\n for (let i = 0; i < eccLength; i++) {\n this._stringBuffer[ecc + i] = 0\n }\n\n for (let i = 0; i < dataLength; i++) {\n const bit = Galois.LOG[this._stringBuffer[data + i] ^ this._stringBuffer[ecc]]\n\n if (bit !== 255) {\n for (let j = 1; j < eccLength; j++) {\n this._stringBuffer[ecc + j - 1] = this._stringBuffer[ecc + j] ^ Galois.EXPONENT[Frame._modN(bit + this._polynomial[eccLength - j])]\n }\n } else {\n for (let j = ecc; j < ecc + eccLength; j++) {\n this._stringBuffer[j] = this._stringBuffer[j + 1]\n }\n }\n\n this._stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois.EXPONENT[Frame._modN(bit + this._polynomial[0])]\n }\n }\n\n _appendEccToData() {\n let data = 0\n let ecc = this._calculateMaxLength()\n\n for (let i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, this._dataBlock, ecc, this._eccBlock)\n\n data += this._dataBlock\n ecc += this._eccBlock\n }\n\n for (let i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, this._dataBlock + 1, ecc, this._eccBlock)\n\n data += this._dataBlock + 1\n ecc += this._eccBlock\n }\n }\n\n _applyMask(mask) {\n const width = this.width\n\n switch (mask) {\n case 0:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(x + y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 1:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 2:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 3:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 4:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, r3y = y >> 1 & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n r3y = !r3y\n }\n\n if (!r3y && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 5:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 6:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((x & y & 1) + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 7:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n }\n }\n\n _calculateMaxLength() {\n return this._dataBlock * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n }\n\n _calculatePolynomial() {\n this._polynomial[0] = 1\n\n for (let i = 0; i < this._eccBlock; i++) {\n this._polynomial[i + 1] = 1\n\n for (let j = i; j > 0; j--) {\n this._polynomial[j] = this._polynomial[j] ? this._polynomial[j - 1] ^ Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[j]] + i)] : this._polynomial[j - 1]\n }\n\n this._polynomial[0] = Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[0]] + i)]\n }\n\n // Use logs for generator polynomial to save calculation step.\n for (let i = 0; i <= this._eccBlock; i++) {\n this._polynomial[i] = Galois.LOG[this._polynomial[i]]\n }\n }\n\n _checkBadness() {\n let bad = 0\n const width = this.width\n\n // Blocks of same colour.\n for (let y = 0; y < width - 1; y++) {\n for (let x = 0; x < width - 1; x++) {\n // All foreground colour.\n if (this.buffer[x + width * y] &&\n this.buffer[x + 1 + width * y] &&\n this.buffer[x + width * (y + 1)] &&\n this.buffer[x + 1 + width * (y + 1)] ||\n // All background colour.\n !(this.buffer[x + width * y] ||\n this.buffer[x + 1 + width * y] ||\n this.buffer[x + width * (y + 1)] ||\n this.buffer[x + 1 + width * (y + 1)])) {\n bad += Frame.N2\n }\n }\n }\n\n let bw = 0\n\n // X runs.\n for (let y = 0; y < width; y++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, x = 0; x < width; x++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n bw += b ? 1 : -1\n }\n\n bad += this._getBadness(h)\n }\n\n if (bw < 0) {\n bw = -bw\n }\n\n let count = 0\n let big = bw\n big += big << 2\n big <<= 1\n\n while (big > width * width) {\n big -= width * width\n count++\n }\n\n bad += count * Frame.N4\n\n // Y runs.\n for (let x = 0; x < width; x++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, y = 0; y < width; y++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n }\n\n bad += this._getBadness(h)\n }\n\n return bad\n }\n\n _convertBitStream(length) {\n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji not supported).\n for (let i = 0; i < length; i++) {\n this._ecc[i] = this._value.charCodeAt(i)\n }\n\n this._stringBuffer = this._ecc.slice(0)\n\n const maxLength = this._calculateMaxLength()\n\n if (length >= maxLength - 2) {\n length = maxLength - 2\n\n if (this._version > 9) {\n length--\n }\n }\n\n // Shift and re-pack to insert length prefix.\n let index = length\n\n if (this._version > 9) {\n this._stringBuffer[index + 2] = 0\n this._stringBuffer[index + 3] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 3] |= 255 & bit << 4\n this._stringBuffer[index + 2] = bit >> 4\n }\n\n this._stringBuffer[2] |= 255 & length << 4\n this._stringBuffer[1] = length >> 4\n this._stringBuffer[0] = 0x40 | length >> 12\n } else {\n this._stringBuffer[index + 1] = 0\n this._stringBuffer[index + 2] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 2] |= 255 & bit << 4\n this._stringBuffer[index + 1] = bit >> 4\n }\n\n this._stringBuffer[1] |= 255 & length << 4\n this._stringBuffer[0] = 0x40 | length >> 4\n }\n\n // Fill to end with pad pattern.\n index = length + 3 - (this._version < 10)\n\n while (index < maxLength) {\n this._stringBuffer[index++] = 0xec\n this._stringBuffer[index++] = 0x11\n }\n }\n\n _getBadness(length) {\n let badRuns = 0\n\n for (let i = 0; i <= length; i++) {\n if (this._badness[i] >= 5) {\n badRuns += Frame.N1 + this._badness[i] - 5\n }\n }\n\n // FBFFFBF as in finder.\n for (let i = 3; i < length - 1; i += 2) {\n if (this._badness[i - 2] === this._badness[i + 2] &&\n this._badness[i + 2] === this._badness[i - 1] &&\n this._badness[i - 1] === this._badness[i + 1] &&\n this._badness[i - 1] * 3 === this._badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (this._badness[i - 3] === 0 || i + 3 > length ||\n this._badness[i - 3] * 3 >= this._badness[i] * 4 ||\n this._badness[i + 3] * 3 >= this._badness[i] * 4)) {\n badRuns += Frame.N3\n }\n }\n\n return badRuns\n }\n\n _finish() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice(0)\n\n let bit = 0\n let i\n let mask = 30000\n\n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i)\n\n const currentMask = this._checkBadness()\n\n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask\n bit = i\n }\n\n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break\n }\n\n // Reset for next pass.\n this.buffer = this._stringBuffer.slice(0)\n }\n\n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit)\n }\n\n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection.FINAL_FORMAT[bit + (this._level - 1 << 3)]\n\n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[this.width - 1 - i + this.width * 8] = 1\n\n if (i < 6) {\n this.buffer[8 + this.width * i] = 1\n } else {\n this.buffer[8 + this.width * (i + 1)] = 1\n }\n }\n }\n\n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[8 + this.width * (this.width - 7 + i)] = 1\n\n if (i) {\n this.buffer[6 - i + this.width * 8] = 1\n } else {\n this.buffer[7 + this.width * 8] = 1\n }\n }\n }\n }\n\n _interleaveBlocks() {\n const maxLength = this._calculateMaxLength()\n let i\n let k = 0\n\n for (i = 0; i < this._dataBlock; i++) {\n for (let j = 0; j < this._neccBlock1; j++) {\n this._ecc[k++] = this._stringBuffer[i + j * this._dataBlock]\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n\n for (i = 0; i < this._eccBlock; i++) {\n for (let j = 0; j < this._neccBlock1 + this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[maxLength + i + j * this._eccBlock]\n }\n }\n\n this._stringBuffer = this._ecc\n }\n\n _insertAlignments() {\n const width = this.width\n\n if (this._version > 1) {\n const i = Alignment.BLOCK[this._version]\n let y = width - 7\n\n for (;;) {\n let x = width - 7\n\n while (x > i - 3) {\n this._addAlignment(x, y)\n\n if (x < i) {\n break\n }\n\n x -= i\n }\n\n if (y <= i + 9) {\n break\n }\n\n y -= i\n\n this._addAlignment(6, y)\n this._addAlignment(y, 6)\n }\n }\n }\n\n _insertFinders() {\n const width = this.width\n\n for (let i = 0; i < 3; i++) {\n let j = 0\n let y = 0\n\n if (i === 1) {\n j = width - 7\n }\n if (i === 2) {\n y = width - 7\n }\n\n this.buffer[y + 3 + width * (j + 3)] = 1\n\n for (let x = 0; x < 6; x++) {\n this.buffer[y + x + width * j] = 1\n this.buffer[y + width * (j + x + 1)] = 1\n this.buffer[y + 6 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 6)] = 1\n }\n\n for (let x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1)\n this._setMask(y + 1, j + x + 1)\n this._setMask(y + 5, j + x)\n this._setMask(y + x + 1, j + 5)\n }\n\n for (let x = 2; x < 4; x++) {\n this.buffer[y + x + width * (j + 2)] = 1\n this.buffer[y + 2 + width * (j + x + 1)] = 1\n this.buffer[y + 4 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 4)] = 1\n }\n }\n }\n\n _insertTimingGap() {\n const width = this.width\n\n for (let y = 0; y < 7; y++) {\n this._setMask(7, y)\n this._setMask(width - 8, y)\n this._setMask(7, y + width - 7)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x, 7)\n this._setMask(x + width - 8, 7)\n this._setMask(x, width - 8)\n }\n }\n\n _insertTimingRowAndColumn() {\n const width = this.width\n\n for (let x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6)\n this._setMask(6, 8 + x)\n } else {\n this.buffer[8 + x + width * 6] = 1\n this.buffer[6 + width * (8 + x)] = 1\n }\n }\n }\n\n _insertVersion() {\n const width = this.width\n\n if (this._version > 6) {\n let i = Version.BLOCK[this._version - 7]\n let j = 17\n\n for (let x = 0; x < 6; x++) {\n for (let y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? this._version >> j - 12 : i >> j)) {\n this.buffer[5 - x + width * (2 - y + width - 11)] = 1\n this.buffer[2 - y + width - 11 + width * (5 - x)] = 1\n } else {\n this._setMask(5 - x, 2 - y + width - 11)\n this._setMask(2 - y + width - 11, 5 - x)\n }\n }\n }\n }\n }\n\n _isMasked(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n return this._mask[bit] === 1\n }\n\n _pack() {\n let x = this.width - 1\n let y = this.width - 1\n let k = 1\n let v = 1\n\n // Interleaved data and ECC codes.\n const length = (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n\n for (let i = 0; i < length; i++) {\n let bit = this._stringBuffer[i]\n\n for (let j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + this.width * y] = 1\n }\n\n // Find next fill position.\n do {\n if (v) {\n x--\n } else {\n x++\n\n if (k) {\n if (y !== 0) {\n y--\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y = 9\n }\n }\n } else if (y !== this.width - 1) {\n y++\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y -= 8\n }\n }\n }\n\n v = !v\n } while (this._isMasked(x, y))\n }\n }\n }\n\n _reverseMask() {\n const width = this.width\n\n for (let x = 0; x < 9; x++) {\n this._setMask(x, 8)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8)\n this._setMask(8, x)\n }\n\n for (let y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7)\n }\n }\n\n _setMask(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n this._mask[bit] = 1\n }\n\n _syncMask() {\n const width = this.width\n\n for (let y = 0; y < width; y++) {\n for (let x = 0; x <= y; x++) {\n if (this.buffer[x + width * y]) {\n this._setMask(x, y)\n }\n }\n }\n }\n}\n\nexport default Frame\n\n/**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {String} level - The ECC level to be used.\n * @property {String} value - The value to be encoded.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with img elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas element as the src for the img element being rendered.\n *\n * @public\n * @extends Renderer\n */\nclass ImageRenderer extends Renderer {\n\n /**\n * @override\n */\n draw() {\n const qrious = this.qrious\n\n qrious.image.src = qrious.toDataURL()\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n\n qrious.image.src = ''\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const image = qrious.image\n\n image.width = qrious.size\n image.height = qrious.size\n }\n}\n\nexport default ImageRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n */\nclass ServiceManager {\n\n /**\n * Creates a new instance of {@link ServiceManager}.\n *\n * @public\n */\n constructor() {\n this._services = {}\n }\n\n /**\n * Returns the {@link Service} being managed with the specified name.\n *\n * @param {String} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name.\n * @throws {Error} If no {@link Service} is being managed with name.\n * @public\n */\n getService(name) {\n const service = this._services[name]\n if (!service) {\n throw new Error(`Service is not being managed with name: ${name}`)\n }\n\n return service\n }\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name to the\n * service provided.\n *\n * @param {String} name - the name of the {@link Service} to be managed with name\n * @param {Service} service - the {@link Service} implementation to be managed\n * @throws {Error} If a {@link Service} is already being managed with the same name.\n * @public\n */\n setService(name, service) {\n if (this._services[name]) {\n throw new Error(`Service is already managed with name: ${name}`)\n }\n\n if (service) {\n this._services[name] = service\n }\n }\n}\n\nexport default ServiceManager\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport CanvasRenderer from './renderer/CanvasRenderer'\nimport Frame from './Frame'\nimport ImageRenderer from './renderer/ImageRenderer'\nimport ServiceManager from './service/ServiceManager'\nimport Utilities from './util/Utilities'\n\n/**\n * Enables configuration of a QR code generator which uses HTML5 canvas for rendering.\n *\n * @public\n */\nclass QRious {\n\n /**\n * Returns the default options for {@link QRious}.\n *\n * @return {QRious~Options} The default options.\n * @public\n * @static\n */\n static get DEFAULTS() {\n return {\n background: 'white',\n foreground: 'black',\n level: 'L',\n mime: 'image/png',\n size: 100,\n value: ''\n }\n }\n\n /**\n * Returns the current version of {@link QRious}.\n *\n * @return {String} The current version.\n * @public\n * @static\n */\n static get VERSION() {\n return '2.0.2'\n }\n\n /**\n * Configures the service provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n */\n static use(service) {\n QRious._serviceManager.setService(service.getName(), service)\n }\n\n static _parseOptions(options) {\n options = Object.assign({}, QRious.DEFAULTS, options)\n options.level = Utilities.toUpperCase(options.level)\n options.size = Math.abs(options.size)\n\n return options\n }\n\n /**\n * Creates a new instance of {@link QRious} based on the options provided.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @public\n */\n constructor(options) {\n options = QRious._parseOptions(options)\n\n Utilities.privatize(this, options)\n\n let element = this._element\n let elementService = QRious._serviceManager.getService('element')\n\n /**\n * The canvas being used to render the QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas()\n this.canvas.qrious = this\n\n /**\n * The img to contain the rendered QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.image = element && elementService.isImage(element) ? element : elementService.createImage()\n this.image.qrious = this\n\n this._renderers = [\n new CanvasRenderer(this),\n new ImageRenderer(this)\n ]\n\n this.update()\n }\n\n /**\n * Returns the image data URI for the generated QR code using the mime provided.\n *\n * @param {String} [mime] - the MIME type for the image\n * @return {String} The image data URI for the QR code.\n * @public\n */\n toDataURL(mime) {\n return this.canvas.toDataURL(mime || this.mime)\n }\n\n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @protected\n */\n update() {\n const frame = new Frame({\n level: this.level,\n value: this.value\n })\n\n this._renderers.forEach((renderer) => renderer.render(frame))\n }\n\n /**\n * Returns the background color for the QR code.\n *\n * @return {String} The background color.\n * @public\n */\n get background() {\n return this._background\n }\n\n /**\n * Sets the background color for the QR code to background.\n *\n * @param {String} [background=\"white\"] - the background color to be set\n * @public\n */\n set background(background) {\n const changed = Utilities.setter(this, '_background', background, QRious.DEFAULTS.background)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the foreground color for the QR code.\n *\n * @return {String} The foreground color.\n * @public\n */\n get foreground() {\n return this._foreground\n }\n\n /**\n * Sets the foreground color for the QR code to foreground.\n *\n * @param {String} [foreground=\"black\"] - the foreground color to be set\n * @public\n */\n set foreground(foreground) {\n const changed = Utilities.setter(this, '_foreground', foreground, QRious.DEFAULTS.foreground)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the error correction level for the QR code.\n *\n * @return {String} The ECC level.\n * @public\n */\n get level() {\n return this._level\n }\n\n /**\n * Sets the error correction level for the QR code to level.\n *\n * level will be transformed to upper case to aid mapping to known ECC level blocks.\n *\n * @param {String} [level=\"L\"] - the ECC level to be set\n * @public\n */\n set level(level) {\n const changed = Utilities.setter(this, '_level', level, QRious.DEFAULTS.level, Utilities.toUpperCase)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the MIME type for the image rendered for the QR code.\n *\n * @return {String} The image MIME type.\n * @public\n */\n get mime() {\n return this._mime\n }\n\n /**\n * Sets the MIME type for the image rendered for the QR code to mime.\n *\n * @param {String} [mime=\"image/png\"] - the image MIME type to be set\n * @public\n */\n set mime(mime) {\n const changed = Utilities.setter(this, '_mime', mime, QRious.DEFAULTS.mime)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the size of the QR code.\n *\n * @return {Number} The size in pixels.\n * @public\n */\n get size() {\n return this._size\n }\n\n /**\n * Sets the size of the QR code to size.\n *\n * size will be transformed to ensure that it is always an absolute positive numbers (e.g.\n * -100 would become 100).\n *\n * @param {Number} [size=100] - the size in pixels to be set\n * @public\n */\n set size(size) {\n const changed = Utilities.setter(this, '_size', size, QRious.DEFAULTS.size, Math.abs)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the value of the QR code.\n *\n * @return {String} The value.\n * @public\n */\n get value() {\n return this._value\n }\n\n /**\n * Sets the value of the QR code to value.\n *\n * @param {String} [value=\"\"] - the value to be set\n * @public\n */\n set value(value) {\n const changed = Utilities.setter(this, '_value', value, QRious.DEFAULTS.value)\n\n if (changed) {\n this.update()\n }\n }\n}\n\nQRious._serviceManager = new ServiceManager()\n\nexport default QRious\n\n/**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {String} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas or\n * img. The element(s) will be created if needed.\n * @property {String} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {String} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {String} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {Number} [size=100] - The size of the QR code in pixels.\n * @property {String} [value=\"\"] - The value to be encoded within the QR code.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport BrowserElementService from '../service/element/BrowserElementService'\nimport QRious from '../QRious'\n\nQRious.use(new BrowserElementService())\n\nexport default QRious\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;;;;;;;;;;;;;;;;;;;AAmBA,EAAA;;;;;;MAKM;;;;;;;;;AAEJ,EAAA;;;;;;;;;;gCAUiB,QAAQ,QAAQ;AAC/B,EAAA,WAAK,IAAI,GAAT,IAAgB,MAAhB,EAAwB;AACtB,EAAA,YAAI,OAAO,cAAP,CAAsB,GAAtB,CAAJ,EAAgC;AAC9B,EAAA,uBAAW,GAAX,IAAoB,OAAO,GAAP,CAApB;AACD,EAAA;AACF,EAAA;;AAED,EAAA,aAAO,MAAP;AACD,EAAA;;AAED,EAAA;;;;;;;;;;;;;;;;;;;;;6BAkBc,QAAQ,WAAW,OAAO,cAAc,aAAa;AACjE,EAAA,UAAM,WAAW,OAAO,SAAP,CAAjB;AACA,EAAA,UAAI,WAAW,SAAS,IAAT,GAAgB,KAAhB,GAAwB,YAAvC;AACA,EAAA,UAAI,OAAO,WAAP,KAAuB,UAA3B,EAAuC;AACrC,EAAA,mBAAW,YAAY,QAAZ,CAAX;AACD,EAAA;;AAED,EAAA,aAAO,SAAP,IAAoB,QAApB;;AAEA,EAAA,aAAO,aAAa,QAApB;AACD,EAAA;;AAED,EAAA;;;;;;;;;;;;yCAS0B,WAAW,YAAY;AAC/C,EAAA,YAAM,IAAI,KAAJ,OAAc,UAAd,4CAA+D,SAA/D,YAAN;AACD,EAAA;;AAED,EAAA;;;;;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C,IAAhC,EAAsC,OAAO,QAAP,CAAgB,IAAtD,EAA4D,KAAK,GAAjE,CAAhB;;AAEA,EAAA,UAAI,OAAJ,EAAa;AACX,EAAA,aAAK,MAAL;AACD,EAAA;AACF,EAAA;;AAED,EAAA;;;;;;;;;0BAMY;AACV,EAAA,aAAO,KAAK,MAAZ;AACD,EAAA;;AAED,EAAA;;;;;;;wBAMU,OAAO;AACf,EAAA,UAAM,UAAU,UAAU,MAAV,CAAiB,IAAjB,EAAuB,QAAvB,EAAiC,KAAjC,EAAwC,OAAO,QAAP,CAAgB,KAAxD,CAAhB;;AAEA,EAAA,UAAI,OAAJ,EAAa;AACX,EAAA,aAAK,MAAL;AACD,EAAA;AACF,EAAA;;;;;AAGH,EAAA,OAAO,eAAP,GAAyB,IAAI,cAAJ,EAAzB,CAEA,AAEA;;ECtRA,OAAO,GAAP,CAAW,IAAI,qBAAJ,EAAX,EAEA;;;;"} \ No newline at end of file diff --git a/dist/umd/qrious.min.js b/dist/umd/qrious.min.js index e78b5cc..cd1c35a 100644 --- a/dist/umd/qrious.min.js +++ b/dist/umd/qrious.min.js @@ -1,5 +1,5 @@ -/*! QRious v2.0.1 | (C) 2016 Alasdair Mercer | GPL v3 License +/*! QRious v2.0.2 | (C) 2016 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("qrious",e):t.QRious=e()}(this,function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},e=function(){function t(t,e){for(var i=0;ie&&(i=t,t=e,e=i),i=e,i+=e*e,i>>=1,i+=t}},{key:"_modN",value:function(t){for(;t>=255;)t-=255,t=(t>>8)+(255&t);return t}},{key:"N1",get:function(){return 3}},{key:"N2",get:function(){return 3}},{key:"N3",get:function(){return 40}},{key:"N4",get:function(){return 10}}]),e(i,[{key:"_addAlignment",value:function(t,e){this.buffer[t+this.width*e]=1;for(var i=-2;i<2;i++)this.buffer[t+i+this.width*(e-2)]=1,this.buffer[t-2+this.width*(e+i+1)]=1,this.buffer[t+2+this.width*(e+i)]=1,this.buffer[t+i+1+this.width*(e+2)]=1;for(var s=0;s<2;s++)this._setMask(t-1,e+s),this._setMask(t+1,e-s),this._setMask(t-s,e-1),this._setMask(t+s,e+1)}},{key:"_appendData",value:function(t,e,s,r){for(var n=0;n>1&1,d=0;d0;e--)this._polynomial[e]=this._polynomial[e]?this._polynomial[e-1]^l.EXPONENT[i._modN(l.LOG[this._polynomial[e]]+t)]:this._polynomial[e-1];this._polynomial[0]=l.EXPONENT[i._modN(l.LOG[this._polynomial[0]]+t)]}for(var s=0;s<=this._eccBlock;s++)this._polynomial[s]=l.LOG[this._polynomial[s]]}},{key:"_checkBadness",value:function(){for(var t=0,e=this.width,s=0;se*e;)l-=e*e,c++;t+=c*i.N4;for(var _=0;_=i-2&&(t=i-2,this._version>9&&t--);var s=t;if(this._version>9){for(this._stringBuffer[s+2]=0,this._stringBuffer[s+3]=0;s--;){var r=this._stringBuffer[s];this._stringBuffer[s+3]|=255&r<<4,this._stringBuffer[s+2]=r>>4}this._stringBuffer[2]|=255&t<<4,this._stringBuffer[1]=t>>4,this._stringBuffer[0]=64|t>>12}else{for(this._stringBuffer[s+1]=0,this._stringBuffer[s+2]=0;s--;){var n=this._stringBuffer[s];this._stringBuffer[s+2]|=255&n<<4,this._stringBuffer[s+1]=n>>4}this._stringBuffer[1]|=255&t<<4,this._stringBuffer[0]=64|t>>4}for(s=t+3-(this._version<10);s=5&&(e+=i.N1+this._badness[s]-5);for(var r=3;rt||3*this._badness[r-3]>=4*this._badness[r]||3*this._badness[r+3]>=4*this._badness[r])&&(e+=i.N3);return e}},{key:"_finish",value:function(){this._stringBuffer=this.buffer.slice(0);var t=0,e=void 0,i=3e4;for(e=0;e<8;e++){this._applyMask(e);var s=this._checkBadness();if(s>=1)1&i&&(this.buffer[this.width-1-e+8*this.width]=1,e<6?this.buffer[8+this.width*e]=1:this.buffer[8+this.width*(e+1)]=1);for(e=0;e<7;e++,i>>=1)1&i&&(this.buffer[8+this.width*(this.width-7+e)]=1,e?this.buffer[6-e+8*this.width]=1:this.buffer[7+8*this.width]=1)}},{key:"_interleaveBlocks",value:function(){var t=this._calculateMaxLength(),e=void 0,i=0;for(e=0;e1)for(var e=u.BLOCK[this._version],i=t-7;;){for(var s=t-7;s>e-3&&(this._addAlignment(s,i),!(s6)for(var e=_.BLOCK[this._version-7],i=17,s=0;s<6;s++)for(var r=0;r<3;r++,i--)1&(i>11?this._version>>i-12:e>>i)?(this.buffer[5-s+t*(2-r+t-11)]=1,this.buffer[2-r+t-11+t*(5-s)]=1):(this._setMask(5-s,2-r+t-11),this._setMask(2-r+t-11,5-s))}},{key:"_isMasked",value:function(t,e){var s=i._getMaskBit(t,e);return 1===this._mask[s]}},{key:"_pack",value:function(){for(var t=this.width-1,e=this.width-1,i=1,s=1,r=(this._dataBlock+this._eccBlock)*(this._neccBlock1+this._neccBlock2)+this._neccBlock2,n=0;ne&&(i=t,t=e,e=i),i=e,i+=e*e,i>>=1,i+=t}},{key:"_modN",value:function(t){for(;t>=255;)t-=255,t=(t>>8)+(255&t);return t}},{key:"N1",get:function(){return 3}},{key:"N2",get:function(){return 3}},{key:"N3",get:function(){return 40}},{key:"N4",get:function(){return 10}}]),e(i,[{key:"_addAlignment",value:function(t,e){this.buffer[t+this.width*e]=1;for(var i=-2;i<2;i++)this.buffer[t+i+this.width*(e-2)]=1,this.buffer[t-2+this.width*(e+i+1)]=1,this.buffer[t+2+this.width*(e+i)]=1,this.buffer[t+i+1+this.width*(e+2)]=1;for(var s=0;s<2;s++)this._setMask(t-1,e+s),this._setMask(t+1,e-s),this._setMask(t-s,e-1),this._setMask(t+s,e+1)}},{key:"_appendData",value:function(t,e,s,r){for(var n=0;n>1&1,d=0;d0;e--)this._polynomial[e]=this._polynomial[e]?this._polynomial[e-1]^l.EXPONENT[i._modN(l.LOG[this._polynomial[e]]+t)]:this._polynomial[e-1];this._polynomial[0]=l.EXPONENT[i._modN(l.LOG[this._polynomial[0]]+t)]}for(var s=0;s<=this._eccBlock;s++)this._polynomial[s]=l.LOG[this._polynomial[s]]}},{key:"_checkBadness",value:function(){for(var t=0,e=this.width,s=0;se*e;)l-=e*e,c++;t+=c*i.N4;for(var _=0;_=i-2&&(t=i-2,this._version>9&&t--);var s=t;if(this._version>9){for(this._stringBuffer[s+2]=0,this._stringBuffer[s+3]=0;s--;){var r=this._stringBuffer[s];this._stringBuffer[s+3]|=255&r<<4,this._stringBuffer[s+2]=r>>4}this._stringBuffer[2]|=255&t<<4,this._stringBuffer[1]=t>>4,this._stringBuffer[0]=64|t>>12}else{for(this._stringBuffer[s+1]=0,this._stringBuffer[s+2]=0;s--;){var n=this._stringBuffer[s];this._stringBuffer[s+2]|=255&n<<4,this._stringBuffer[s+1]=n>>4}this._stringBuffer[1]|=255&t<<4,this._stringBuffer[0]=64|t>>4}for(s=t+3-(this._version<10);s=5&&(e+=i.N1+this._badness[s]-5);for(var r=3;rt||3*this._badness[r-3]>=4*this._badness[r]||3*this._badness[r+3]>=4*this._badness[r])&&(e+=i.N3);return e}},{key:"_finish",value:function(){this._stringBuffer=this.buffer.slice(0);var t=0,e=void 0,i=3e4;for(e=0;e<8;e++){this._applyMask(e);var s=this._checkBadness();if(s>=1)1&i&&(this.buffer[this.width-1-e+8*this.width]=1,e<6?this.buffer[8+this.width*e]=1:this.buffer[8+this.width*(e+1)]=1);for(e=0;e<7;e++,i>>=1)1&i&&(this.buffer[8+this.width*(this.width-7+e)]=1,e?this.buffer[6-e+8*this.width]=1:this.buffer[7+8*this.width]=1)}},{key:"_interleaveBlocks",value:function(){var t=this._calculateMaxLength(),e=void 0,i=0;for(e=0;e1)for(var e=u.BLOCK[this._version],i=t-7;;){for(var s=t-7;s>e-3&&(this._addAlignment(s,i),!(s6)for(var e=_.BLOCK[this._version-7],i=17,s=0;s<6;s++)for(var r=0;r<3;r++,i--)1&(i>11?this._version>>i-12:e>>i)?(this.buffer[5-s+t*(2-r+t-11)]=1,this.buffer[2-r+t-11+t*(5-s)]=1):(this._setMask(5-s,2-r+t-11),this._setMask(2-r+t-11,5-s))}},{key:"_isMasked",value:function(t,e){var s=i._getMaskBit(t,e);return 1===this._mask[s]}},{key:"_pack",value:function(){for(var t=this.width-1,e=this.width-1,i=1,s=1,r=(this._dataBlock+this._eccBlock)*(this._neccBlock1+this._neccBlock2)+this._neccBlock2,n=0;n 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null\n };\n };\n}();\n\nexport var asyncToGenerator = function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n return step(\"next\", value);\n }, function (err) {\n return step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n};\n\nexport var classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nexport var createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nexport var defineEnumerableProperties = function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n return obj;\n};\n\nexport var defaults = function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n\n return obj;\n};\n\nexport var defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nexport var get = function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n};\n\nexport var inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar _instanceof = function (left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n};\n\nexport var interopRequireDefault = function (obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n};\n\nexport var interopRequireWildcard = function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n return newObj;\n }\n};\n\nexport var newArrowCheck = function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n};\n\nexport var objectDestructuringEmpty = function (obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n};\n\nexport var objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nexport var possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nexport var selfGlobal = typeof global === \"undefined\" ? self : global;\n\nexport var set = function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if (\"value\" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n};\n\nexport var slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\n\nexport var slicedToArrayLoose = function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n\n if (i && _arr.length === i) break;\n }\n\n return _arr;\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n};\n\nexport var taggedTemplateLiteral = function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n};\n\nexport var taggedTemplateLiteralLoose = function (strings, raw) {\n strings.raw = raw;\n return strings;\n};\n\nexport var temporalRef = function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n } else {\n return val;\n }\n};\n\nexport var temporalUndefined = {};\n\nexport var toArray = function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n};\n\nexport var toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n};\n\nbabelHelpers;\n\nexport { _typeof as typeof, _extends as extends, _instanceof as instanceof }","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n */\nclass Utilities {\n\n /**\n * Copies all properties from the source object to the target object, however, all property\n * names on the target will be prefixed with an underscore, used to indicate that they are private.\n *\n * @param {Object} target - the object to which the private fields are to be copied\n * @param {Object} source - the object from which the fields are to be copied\n * @return {Object} A reference to the target object.\n * @public\n * @static\n */\n static privatize(target, source) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n target[`_${key}`] = source[key]\n }\n }\n\n return target\n }\n\n /**\n * Sets the specified value on a given field on the object provided.\n *\n * If value is null, the specified default value will be used instead.\n *\n * An optional transformer can be specified which will be used to transform the value (or default value)\n * before it is assigned to the field.\n *\n * @param {Object} object - the object whose field is to be set with value\n * @param {String} fieldName - the field to be set with value\n * @param {*} value - the value to be set on the named field\n * @param {*} [defaultValue] - the value to be used if value is null\n * @param {Function} [transformer] - a function used to transform the value before it is assigned to the named field\n * @return {Boolean} true if the value of the field has changed as a result of the assignment; otherwise\n * false.\n * @public\n * @static\n */\n static setter(object, fieldName, value, defaultValue, transformer) {\n const oldValue = object[fieldName]\n let newValue = value != null ? value : defaultValue\n if (typeof transformer === 'function') {\n newValue = transformer(newValue)\n }\n\n object[fieldName] = newValue\n\n return newValue !== oldValue\n }\n\n /**\n * Throws an error indicating that the a given method on a specific class has not been implemented.\n *\n * @param {String} className - the name of the class on which the method has not been implemented\n * @param {String} methodName - the name of the method which has not been implemented\n * @throws {Error} The error describing the class method which has not been implemented.\n * @public\n * @static\n */\n static throwUnimplemented(className, methodName) {\n throw new Error(`\"${methodName}\" method must be implemented on the ${className} class`)\n }\n\n /**\n * Transforms the specified string to upper case while remaining null-safe.\n *\n * @param {String} string - the string to be transformed to upper case\n * @return {String} string transformed to upper case if string is not null.\n * @public\n * @static\n */\n static toUpperCase(string) {\n return string != null && string.toUpperCase()\n }\n}\n\nexport default Utilities\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n */\nclass Service {\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {String} The service name.\n * @public\n */\n getName() {\n Utilities.throwUnimplemented('Service', 'getName')\n }\n}\n\nexport default Service\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Service from '../Service'\nimport Utilities from '../../util/Utilities'\n\n/**\n * A service for working with elements.\n *\n * @public\n * @extends Service\n */\nclass ElementService extends Service {\n\n /**\n * Creates an instance of a canvas element.\n *\n * @return {*} The newly created canvas element.\n * @public\n */\n createCanvas() {\n Utilities.throwUnimplemented('ElementService', 'createCanvas')\n }\n\n /**\n * Creates an instance of a image element.\n *\n * @return {*} The newly created image element.\n * @public\n */\n createImage() {\n Utilities.throwUnimplemented('ElementService', 'createImage')\n }\n\n /**\n * @override\n */\n getName() {\n return 'element'\n }\n\n /**\n * Returns whether the specified element is a canvas.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is a canvas; otherwise false.\n * @public\n */\n isCanvas(element) {\n Utilities.throwUnimplemented('ElementService', 'isCanvas')\n }\n\n /**\n * Returns whether the specified element is an image.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is an image; otherwise false.\n * @public\n */\n isImage(element) {\n Utilities.throwUnimplemented('ElementService', 'isImage')\n }\n}\n\nexport default ElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport ElementService from './ElementService'\n\n/**\n * An implementation of {@link ElementService} intended for use within a browser environment.\n *\n * @public\n * @extends ElementService\n */\nclass BrowserElementService extends ElementService {\n\n /**\n * @override\n */\n createCanvas() {\n return document.createElement('canvas')\n }\n\n /**\n * @override\n */\n createImage() {\n return document.createElement('img')\n }\n\n /**\n * @override\n */\n isCanvas(element) {\n return element instanceof HTMLCanvasElement\n }\n\n /**\n * @override\n */\n isImage(element) {\n return element instanceof HTMLImageElement\n }\n}\n\nexport default BrowserElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so ordering of their execution is important.\n *\n * @public\n */\nclass Renderer {\n\n /**\n * Creates a new instance of {@link Renderer} for the qrious instance provided.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @public\n */\n constructor(qrious) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n */\n this.qrious = qrious\n }\n\n /**\n * Draws the specified QR code frame on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @protected\n */\n draw(frame) {\n Utilities.throwUnimplemented('Renderer', 'draw')\n }\n\n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame provided.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {Number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n */\n getModuleSize(frame) {\n const pixels = Math.floor(this.qrious.size / frame.width)\n\n return Math.max(1, pixels)\n }\n\n /**\n * Calculates the offset/padding (in pixel units) to be inserted before the QR code based on the frame\n * provided.\n *\n * The returned value will be zero if there is no available offset or if the size of the QR code does not fit its\n * contents. It will never be a negative value. This is done so that the inevitable clipping appears more naturally\n * and it is not clipped from all directions.\n *\n * @param {Frame} frame - the {@link Frame} from which the offset is to be derived\n * @return {Number} The pixel offset for the QR code which will be no less than zero.\n * @protected\n */\n getOffset(frame) {\n const moduleSize = this.getModuleSize(frame)\n const offset = Math.floor((this.qrious.size - moduleSize * frame.width) / 2)\n\n return Math.max(0, offset)\n }\n\n /**\n * Renders a QR code on the underlying element based on the frame provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @public\n */\n render(frame) {\n this.resize()\n this.reset()\n this.draw(frame)\n }\n\n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n reset() {\n Utilities.throwUnimplemented('Renderer', 'reset')\n }\n\n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n resize() {\n Utilities.throwUnimplemented('Renderer', 'resize')\n }\n}\n\nexport default Renderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with canvas elements.\n *\n * @public\n * @extends Renderer\n */\nclass CanvasRenderer extends Renderer {\n\n /**\n * @override\n */\n draw(frame) {\n const qrious = this.qrious\n const moduleSize = this.getModuleSize(frame)\n const offset = this.getOffset(frame)\n const context = qrious.canvas.getContext('2d')\n\n context.fillStyle = qrious.foreground\n\n for (let i = 0; i < frame.width; i++) {\n for (let j = 0; j < frame.width; j++) {\n if (frame.buffer[j * frame.width + i]) {\n context.fillRect(moduleSize * i + offset, moduleSize * j + offset, moduleSize, moduleSize)\n }\n }\n }\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n const context = qrious.canvas.getContext('2d')\n\n context.lineWidth = 1\n context.clearRect(0, 0, qrious.size, qrious.size)\n context.fillStyle = qrious.background\n context.fillRect(0, 0, qrious.size, qrious.size)\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const canvas = qrious.canvas\n\n canvas.width = qrious.size\n canvas.height = qrious.size\n }\n}\n\nexport default CanvasRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains alignment pattern information.\n *\n * @public\n */\nclass Alignment {\n\n /**\n * Returns the alignment pattern block.\n *\n * @return {Number[]} The alignment pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n }\n}\n\nexport default Alignment\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains error correction information.\n *\n * @public\n */\nclass ErrorCorrection {\n\n /**\n * Returns the error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @return {Number[]} The ECC blocks.\n * @public\n * @static\n */\n static get BLOCKS() {\n return [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ]\n }\n\n /**\n * Returns the final format bits with mask (level << 3 | mask).\n *\n * @return {Number[]} The final format bits.\n * @public\n * @static\n */\n static get FINAL_FORMAT() {\n return [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ]\n }\n\n /**\n * Returns a map of human-readable ECC levels.\n *\n * @return {Object} A ECC level mapping.\n * @public\n * @static\n */\n static get LEVELS() {\n return {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n }\n}\n\nexport default ErrorCorrection\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains Galois field information.\n *\n * @public\n */\nclass Galois {\n\n /**\n * Returns the Galois field exponent table.\n *\n * @return {Number[]} The Galois field exponent table.\n * @public\n * @static\n */\n static get EXPONENT() {\n return [\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x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xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ]\n }\n\n /**\n * Returns the Galois field log table.\n *\n * @return {Number[]} The Galois field log table.\n * @public\n * @static\n */\n static get LOG() {\n return [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,\n 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6,\n 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88,\n 0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40,\n 0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d,\n 0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57,\n 0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18,\n 0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e,\n 0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61,\n 0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2,\n 0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6,\n 0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a,\n 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,\n 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n ]\n }\n}\n\nexport default Galois\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains version pattern information.\n *\n * @public\n */\nclass Version {\n\n /**\n * Returns the version pattern block.\n *\n * @return {Number[]} The version pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n }\n}\n\nexport default Version\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Alignment from './Alignment'\nimport ErrorCorrection from './ErrorCorrection'\nimport Galois from './Galois'\nimport Version from './Version'\n\n/**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @public\n */\nclass Frame {\n\n static _createArray(length) {\n const array = []\n\n for (let i = 0; i < length; i++) {\n array[i] = 0\n }\n\n return array\n }\n\n static _getMaskBit(x, y) {\n let bit\n\n if (x > y) {\n bit = x\n x = y\n y = bit\n }\n\n bit = y\n bit += y * y\n bit >>= 1\n bit += x\n\n return bit\n }\n\n static _modN(x) {\n while (x >= 255) {\n x -= 255\n x = (x >> 8) + (x & 255)\n }\n\n return x\n }\n\n // *Badness* coefficients.\n static get N1() {\n return 3\n }\n static get N2() {\n return 3\n }\n static get N3() {\n return 40\n }\n static get N4() {\n return 10\n }\n\n /**\n * Creates an instance of {@link Frame} based on the options provided.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n */\n constructor(options) {\n this._badness = []\n this._level = ErrorCorrection.LEVELS[options.level]\n this._polynomial = []\n this._value = options.value\n this._valueLength = this._value.length\n this._version = 0\n this._stringBuffer = this._value.slice(0)\n\n let dataBlock\n let eccBlock\n let neccBlock1\n let neccBlock2\n\n while (this._version < 40) {\n this._version++\n\n let index = (this._level - 1) * 4 + (this._version - 1) * 16\n\n neccBlock1 = ErrorCorrection.BLOCKS[index++]\n neccBlock2 = ErrorCorrection.BLOCKS[index++]\n dataBlock = ErrorCorrection.BLOCKS[index++]\n eccBlock = ErrorCorrection.BLOCKS[index]\n\n index = dataBlock * (neccBlock1 + neccBlock2) + neccBlock2 - 3 + (this._version <= 9)\n\n if (this._valueLength <= index) {\n break\n }\n }\n\n this._dataBlock = dataBlock\n this._eccBlock = eccBlock\n this._neccBlock1 = neccBlock1\n this._neccBlock2 = neccBlock2\n\n /**\n * The data width is based on version.\n *\n * @public\n * @type {Number}\n */\n // FIXME: Ensure that it fits instead of being truncated.\n this.width = 17 + 4 * this._version\n\n /**\n * The image buffer.\n *\n * @public\n * @type {Number[]}\n */\n this.buffer = Frame._createArray(this.width * this.width)\n\n this._ecc = Frame._createArray(this._dataBlock + (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2)\n this._mask = Frame._createArray((this.width * (this.width + 1) + 1) / 2)\n\n this._insertFinders()\n this._insertAlignments()\n\n // Insert single foreground cell.\n this.buffer[8 + this.width * (this.width - 8)] = 1\n\n this._insertTimingGap()\n this._reverseMask()\n this._insertTimingRowAndColumn()\n this._insertVersion()\n this._syncMask()\n this._convertBitStream(this._stringBuffer.length)\n this._calculatePolynomial()\n this._appendEccToData()\n this._interleaveBlocks()\n this._pack()\n this._finish()\n }\n\n _addAlignment(x, y) {\n this.buffer[x + this.width * y] = 1\n\n for (let i = -2; i < 2; i++) {\n this.buffer[x + i + this.width * (y - 2)] = 1\n this.buffer[x - 2 + this.width * (y + i + 1)] = 1\n this.buffer[x + 2 + this.width * (y + i)] = 1\n this.buffer[x + i + 1 + this.width * (y + 2)] = 1\n }\n\n for (let i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i)\n this._setMask(x + 1, y - i)\n this._setMask(x - i, y - 1)\n this._setMask(x + i, y + 1)\n }\n }\n\n _appendData(data, dataLength, ecc, eccLength) {\n for (let i = 0; i < eccLength; i++) {\n this._stringBuffer[ecc + i] = 0\n }\n\n for (let i = 0; i < dataLength; i++) {\n const bit = Galois.LOG[this._stringBuffer[data + i] ^ this._stringBuffer[ecc]]\n\n if (bit !== 255) {\n for (let j = 1; j < eccLength; j++) {\n this._stringBuffer[ecc + j - 1] = this._stringBuffer[ecc + j] ^ Galois.EXPONENT[Frame._modN(bit + this._polynomial[eccLength - j])]\n }\n } else {\n for (let j = ecc; j < ecc + eccLength; j++) {\n this._stringBuffer[j] = this._stringBuffer[j + 1]\n }\n }\n\n this._stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois.EXPONENT[Frame._modN(bit + this._polynomial[0])]\n }\n }\n\n _appendEccToData() {\n let data = 0\n let ecc = this._calculateMaxLength()\n\n for (let i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, this._dataBlock, ecc, this._eccBlock)\n\n data += this._dataBlock\n ecc += this._eccBlock\n }\n\n for (let i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, this._dataBlock + 1, ecc, this._eccBlock)\n\n data += this._dataBlock + 1\n ecc += this._eccBlock\n }\n }\n\n _applyMask(mask) {\n const width = this.width\n\n switch (mask) {\n case 0:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(x + y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 1:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 2:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 3:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 4:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, r3y = y >> 1 & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n r3y = !r3y\n }\n\n if (!r3y && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 5:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 6:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!(x & y & 1 + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 7:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n }\n }\n\n _calculateMaxLength() {\n return this._dataBlock * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n }\n\n _calculatePolynomial() {\n this._polynomial[0] = 1\n\n for (let i = 0; i < this._eccBlock; i++) {\n this._polynomial[i + 1] = 1\n\n for (let j = i; j > 0; j--) {\n this._polynomial[j] = this._polynomial[j] ? this._polynomial[j - 1] ^ Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[j]] + i)] : this._polynomial[j - 1]\n }\n\n this._polynomial[0] = Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[0]] + i)]\n }\n\n // Use logs for generator polynomial to save calculation step.\n for (let i = 0; i <= this._eccBlock; i++) {\n this._polynomial[i] = Galois.LOG[this._polynomial[i]]\n }\n }\n\n _checkBadness() {\n let bad = 0\n const width = this.width\n\n // Blocks of same colour.\n for (let y = 0; y < width - 1; y++) {\n for (let x = 0; x < width - 1; x++) {\n // All foreground colour.\n if (this.buffer[x + width * y] &&\n this.buffer[x + 1 + width * y] &&\n this.buffer[x + width * (y + 1)] &&\n this.buffer[x + 1 + width * (y + 1)] ||\n // All background colour.\n !(this.buffer[x + width * y] ||\n this.buffer[x + 1 + width * y] ||\n this.buffer[x + width * (y + 1)] ||\n this.buffer[x + 1 + width * (y + 1)])) {\n bad += Frame.N2\n }\n }\n }\n\n let bw = 0\n\n // X runs.\n for (let y = 0; y < width; y++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, x = 0; x < width; x++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n bw += b ? 1 : -1\n }\n\n bad += this._getBadness(h)\n }\n\n if (bw < 0) {\n bw = -bw\n }\n\n let count = 0\n let big = bw\n big += big << 2\n big <<= 1\n\n while (big > width * width) {\n big -= width * width\n count++\n }\n\n bad += count * Frame.N4\n\n // Y runs.\n for (let x = 0; x < width; x++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, y = 0; y < width; y++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n }\n\n bad += this._getBadness(h)\n }\n\n return bad\n }\n\n _convertBitStream(length) {\n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji\n // not supported).\n\n for (let i = 0; i < length; i++) {\n this._ecc[i] = this._stringBuffer.charCodeAt(i)\n }\n\n this._stringBuffer = this._ecc.slice(0)\n\n const maxLength = this._calculateMaxLength()\n\n if (length >= maxLength - 2) {\n length = maxLength - 2\n\n if (this._version > 9) {\n length--\n }\n }\n\n // Shift and re-pack to insert length prefix.\n let index = length\n\n if (this._version > 9) {\n this._stringBuffer[index + 2] = 0\n this._stringBuffer[index + 3] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 3] |= 255 & bit << 4\n this._stringBuffer[index + 2] = bit >> 4\n }\n\n this._stringBuffer[2] |= 255 & length << 4\n this._stringBuffer[1] = length >> 4\n this._stringBuffer[0] = 0x40 | length >> 12\n } else {\n this._stringBuffer[index + 1] = 0\n this._stringBuffer[index + 2] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 2] |= 255 & bit << 4\n this._stringBuffer[index + 1] = bit >> 4\n }\n\n this._stringBuffer[1] |= 255 & length << 4\n this._stringBuffer[0] = 0x40 | length >> 4\n }\n\n // Fill to end with pad pattern.\n index = length + 3 - (this._version < 10)\n\n while (index < maxLength) {\n this._stringBuffer[index++] = 0xec\n this._stringBuffer[index++] = 0x11\n }\n }\n\n _getBadness(length) {\n let badRuns = 0\n\n for (let i = 0; i <= length; i++) {\n if (this._badness[i] >= 5) {\n badRuns += Frame.N1 + this._badness[i] - 5\n }\n }\n\n // FBFFFBF as in finder.\n for (let i = 3; i < length - 1; i += 2) {\n if (this._badness[i - 2] === this._badness[i + 2] &&\n this._badness[i + 2] === this._badness[i - 1] &&\n this._badness[i - 1] === this._badness[i + 1] &&\n this._badness[i - 1] * 3 === this._badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (this._badness[i - 3] === 0 || i + 3 > length ||\n this._badness[i - 3] * 3 >= this._badness[i] * 4 ||\n this._badness[i + 3] * 3 >= this._badness[i] * 4)) {\n badRuns += Frame.N3\n }\n }\n\n return badRuns\n }\n\n _finish() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice(0)\n\n let bit = 0\n let i\n let mask = 30000\n\n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i)\n\n const currentMask = this._checkBadness()\n\n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask\n bit = i\n }\n\n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break\n }\n\n // Reset for next pass.\n this.buffer = this._stringBuffer.slice(0)\n }\n\n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit)\n }\n\n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection.FINAL_FORMAT[bit + (this._level - 1 << 3)]\n\n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[this.width - 1 - i + this.width * 8] = 1\n\n if (i < 6) {\n this.buffer[8 + this.width * i] = 1\n } else {\n this.buffer[8 + this.width * (i + 1)] = 1\n }\n }\n }\n\n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[8 + this.width * (this.width - 7 + i)] = 1\n\n if (i) {\n this.buffer[6 - i + this.width * 8] = 1\n } else {\n this.buffer[7 + this.width * 8] = 1\n }\n }\n }\n }\n\n _interleaveBlocks() {\n const maxLength = this._calculateMaxLength()\n let i\n let k = 0\n\n for (i = 0; i < this._dataBlock; i++) {\n for (let j = 0; j < this._neccBlock1; j++) {\n this._ecc[k++] = this._stringBuffer[i + j * this._dataBlock]\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n\n for (i = 0; i < this._eccBlock; i++) {\n for (let j = 0; j < this._neccBlock1 + this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[maxLength + i + j * this._eccBlock]\n }\n }\n\n this._stringBuffer = this._ecc\n }\n\n _insertAlignments() {\n const width = this.width\n\n if (this._version > 1) {\n const i = Alignment.BLOCK[this._version]\n let y = width - 7\n\n for (;;) {\n let x = width - 7\n\n while (x > i - 3) {\n this._addAlignment(x, y)\n\n if (x < i) {\n break\n }\n\n x -= i\n }\n\n if (y <= i + 9) {\n break\n }\n\n y -= i\n\n this._addAlignment(6, y)\n this._addAlignment(y, 6)\n }\n }\n }\n\n _insertFinders() {\n const width = this.width\n\n for (let i = 0; i < 3; i++) {\n let j = 0\n let y = 0\n\n if (i === 1) {\n j = width - 7\n }\n if (i === 2) {\n y = width - 7\n }\n\n this.buffer[y + 3 + width * (j + 3)] = 1\n\n for (let x = 0; x < 6; x++) {\n this.buffer[y + x + width * j] = 1\n this.buffer[y + width * (j + x + 1)] = 1\n this.buffer[y + 6 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 6)] = 1\n }\n\n for (let x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1)\n this._setMask(y + 1, j + x + 1)\n this._setMask(y + 5, j + x)\n this._setMask(y + x + 1, j + 5)\n }\n\n for (let x = 2; x < 4; x++) {\n this.buffer[y + x + width * (j + 2)] = 1\n this.buffer[y + 2 + width * (j + x + 1)] = 1\n this.buffer[y + 4 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 4)] = 1\n }\n }\n }\n\n _insertTimingGap() {\n const width = this.width\n\n for (let y = 0; y < 7; y++) {\n this._setMask(7, y)\n this._setMask(width - 8, y)\n this._setMask(7, y + width - 7)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x, 7)\n this._setMask(x + width - 8, 7)\n this._setMask(x, width - 8)\n }\n }\n\n _insertTimingRowAndColumn() {\n const width = this.width\n\n for (let x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6)\n this._setMask(6, 8 + x)\n } else {\n this.buffer[8 + x + width * 6] = 1\n this.buffer[6 + width * (8 + x)] = 1\n }\n }\n }\n\n _insertVersion() {\n const width = this.width\n\n if (this._version > 6) {\n let i = Version.BLOCK[this._version - 7]\n let j = 17\n\n for (let x = 0; x < 6; x++) {\n for (let y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? this._version >> j - 12 : i >> j)) {\n this.buffer[5 - x + width * (2 - y + width - 11)] = 1\n this.buffer[2 - y + width - 11 + width * (5 - x)] = 1\n } else {\n this._setMask(5 - x, 2 - y + width - 11)\n this._setMask(2 - y + width - 11, 5 - x)\n }\n }\n }\n }\n }\n\n _isMasked(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n return this._mask[bit] === 1\n }\n\n _pack() {\n let x = this.width - 1\n let y = this.width - 1\n let k = 1\n let v = 1\n\n // Interleaved data and ECC codes.\n const length = (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n\n for (let i = 0; i < length; i++) {\n let bit = this._stringBuffer[i]\n\n for (let j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + this.width * y] = 1\n }\n\n // Find next fill position.\n do {\n if (v) {\n x--\n } else {\n x++\n\n if (k) {\n if (y !== 0) {\n y--\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y = 9\n }\n }\n } else if (y !== this.width - 1) {\n y++\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y -= 8\n }\n }\n }\n\n v = !v\n } while (this._isMasked(x, y))\n }\n }\n }\n\n _reverseMask() {\n const width = this.width\n\n for (let x = 0; x < 9; x++) {\n this._setMask(x, 8)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8)\n this._setMask(8, x)\n }\n\n for (let y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7)\n }\n }\n\n _setMask(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n this._mask[bit] = 1\n }\n\n _syncMask() {\n const width = this.width\n\n for (let y = 0; y < width; y++) {\n for (let x = 0; x <= y; x++) {\n if (this.buffer[x + width * y]) {\n this._setMask(x, y)\n }\n }\n }\n }\n}\n\nexport default Frame\n\n/**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {String} level - The ECC level to be used.\n * @property {String} value - The value to be encoded.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with img elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas element as the src for the img element being rendered.\n *\n * @public\n * @extends Renderer\n */\nclass ImageRenderer extends Renderer {\n\n /**\n * @override\n */\n draw() {\n const qrious = this.qrious\n\n qrious.image.src = qrious.toDataURL()\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n\n qrious.image.src = ''\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const image = qrious.image\n\n image.width = qrious.size\n image.height = qrious.size\n }\n}\n\nexport default ImageRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n */\nclass ServiceManager {\n\n /**\n * Creates a new instance of {@link ServiceManager}.\n *\n * @public\n */\n constructor() {\n this._services = {}\n }\n\n /**\n * Returns the {@link Service} being managed with the specified name.\n *\n * @param {String} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name.\n * @throws {Error} If no {@link Service} is being managed with name.\n * @public\n */\n getService(name) {\n const service = this._services[name]\n if (!service) {\n throw new Error(`Service is not being managed with name: ${name}`)\n }\n\n return service\n }\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name to the\n * service provided.\n *\n * @param {String} name - the name of the {@link Service} to be managed with name\n * @param {Service} service - the {@link Service} implementation to be managed\n * @throws {Error} If a {@link Service} is already being managed with the same name.\n * @public\n */\n setService(name, service) {\n if (this._services[name]) {\n throw new Error(`Service is already managed with name: ${name}`)\n }\n\n if (service) {\n this._services[name] = service\n }\n }\n}\n\nexport default ServiceManager\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport CanvasRenderer from './renderer/CanvasRenderer'\nimport Frame from './Frame'\nimport ImageRenderer from './renderer/ImageRenderer'\nimport ServiceManager from './service/ServiceManager'\nimport Utilities from './util/Utilities'\n\n/**\n * Enables configuration of a QR code generator which uses HTML5 canvas for rendering.\n *\n * @public\n */\nclass QRious {\n\n /**\n * Returns the default options for {@link QRious}.\n *\n * @return {QRious~Options} The default options.\n * @public\n * @static\n */\n static get DEFAULTS() {\n return {\n background: 'white',\n foreground: 'black',\n level: 'L',\n mime: 'image/png',\n size: 100,\n value: ''\n }\n }\n\n /**\n * Returns the current version of {@link QRious}.\n *\n * @return {String} The current version.\n * @public\n * @static\n */\n static get VERSION() {\n return '2.0.1'\n }\n\n /**\n * Configures the service provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n */\n static use(service) {\n QRious._serviceManager.setService(service.getName(), service)\n }\n\n static _parseOptions(options) {\n options = Object.assign({}, QRious.DEFAULTS, options)\n options.level = Utilities.toUpperCase(options.level)\n options.size = Math.abs(options.size)\n\n return options\n }\n\n /**\n * Creates a new instance of {@link QRious} based on the options provided.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @public\n */\n constructor(options) {\n options = QRious._parseOptions(options)\n\n Utilities.privatize(this, options)\n\n let element = this._element\n let elementService = QRious._serviceManager.getService('element')\n\n /**\n * The canvas being used to render the QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas()\n this.canvas.qrious = this\n\n /**\n * The img to contain the rendered QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.image = element && elementService.isImage(element) ? element : elementService.createImage()\n this.image.qrious = this\n\n this._renderers = [\n new CanvasRenderer(this),\n new ImageRenderer(this)\n ]\n\n this.update()\n }\n\n /**\n * Returns the image data URI for the generated QR code using the mime provided.\n *\n * @param {String} [mime] - the MIME type for the image\n * @return {String} The image data URI for the QR code.\n * @public\n */\n toDataURL(mime) {\n return this.canvas.toDataURL(mime || this.mime)\n }\n\n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @protected\n */\n update() {\n const frame = new Frame({\n level: this.level,\n value: this.value\n })\n\n this._renderers.forEach((renderer) => renderer.render(frame))\n }\n\n /**\n * Returns the background color for the QR code.\n *\n * @return {String} The background color.\n * @public\n */\n get background() {\n return this._background\n }\n\n /**\n * Sets the background color for the QR code to background.\n *\n * @param {String} [background=\"white\"] - the background color to be set\n * @public\n */\n set background(background) {\n const changed = Utilities.setter(this, '_background', background, QRious.DEFAULTS.background)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the foreground color for the QR code.\n *\n * @return {String} The foreground color.\n * @public\n */\n get foreground() {\n return this._foreground\n }\n\n /**\n * Sets the foreground color for the QR code to foreground.\n *\n * @param {String} [foreground=\"black\"] - the foreground color to be set\n * @public\n */\n set foreground(foreground) {\n const changed = Utilities.setter(this, '_foreground', foreground, QRious.DEFAULTS.foreground)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the error correction level for the QR code.\n *\n * @return {String} The ECC level.\n * @public\n */\n get level() {\n return this._level\n }\n\n /**\n * Sets the error correction level for the QR code to level.\n *\n * level will be transformed to upper case to aid mapping to known ECC level blocks.\n *\n * @param {String} [level=\"L\"] - the ECC level to be set\n * @public\n */\n set level(level) {\n const changed = Utilities.setter(this, '_level', level, QRious.DEFAULTS.level, Utilities.toUpperCase)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the MIME type for the image rendered for the QR code.\n *\n * @return {String} The image MIME type.\n * @public\n */\n get mime() {\n return this._mime\n }\n\n /**\n * Sets the MIME type for the image rendered for the QR code to mime.\n *\n * @param {String} [mime=\"image/png\"] - the image MIME type to be set\n * @public\n */\n set mime(mime) {\n const changed = Utilities.setter(this, '_mime', mime, QRious.DEFAULTS.mime)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the size of the QR code.\n *\n * @return {Number} The size in pixels.\n * @public\n */\n get size() {\n return this._size\n }\n\n /**\n * Sets the size of the QR code to size.\n *\n * size will be transformed to ensure that it is always an absolute positive numbers (e.g.\n * -100 would become 100).\n *\n * @param {Number} [size=100] - the size in pixels to be set\n * @public\n */\n set size(size) {\n const changed = Utilities.setter(this, '_size', size, QRious.DEFAULTS.size, Math.abs)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the value of the QR code.\n *\n * @return {String} The value.\n * @public\n */\n get value() {\n return this._value\n }\n\n /**\n * Sets the value of the QR code to value.\n *\n * @param {String} [value=\"\"] - the value to be set\n * @public\n */\n set value(value) {\n const changed = Utilities.setter(this, '_value', value, QRious.DEFAULTS.value)\n\n if (changed) {\n this.update()\n }\n }\n}\n\nQRious._serviceManager = new ServiceManager()\n\nexport default QRious\n\n/**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {String} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas or\n * img. The element(s) will be created if needed.\n * @property {String} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {String} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {String} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {Number} [size=100] - The size of the QR code in pixels.\n * @property {String} [value=\"\"] - The value to be encoded within the QR code.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport BrowserElementService from '../service/element/BrowserElementService'\nimport QRious from '../QRious'\n\nQRious.use(new BrowserElementService())\n\nexport default QRious\n"],"names":["classCallCheck","instance","Constructor","TypeError","createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","protoProps","staticProps","prototype","inherits","subClass","superClass","create","constructor","value","setPrototypeOf","__proto__","possibleConstructorReturn","self","call","ReferenceError","Utilities","source","hasOwnProperty","object","fieldName","defaultValue","transformer","oldValue","newValue","className","methodName","Error","string","toUpperCase","Service","throwUnimplemented","ElementService","element","BrowserElementService","document","createElement","HTMLCanvasElement","HTMLImageElement","Renderer","qrious","frame","pixels","Math","floor","this","size","width","max","moduleSize","getModuleSize","offset","resize","reset","draw","CanvasRenderer","getOffset","context","canvas","getContext","fillStyle","foreground","j","buffer","fillRect","lineWidth","clearRect","background","height","Alignment","ErrorCorrection","Galois","Version","Frame","options","_badness","_level","LEVELS","level","_polynomial","_value","_valueLength","_version","_stringBuffer","slice","dataBlock","eccBlock","neccBlock1","neccBlock2","index","BLOCKS","_dataBlock","_eccBlock","_neccBlock1","_neccBlock2","_createArray","_ecc","_mask","_insertFinders","_insertAlignments","_insertTimingGap","_reverseMask","_insertTimingRowAndColumn","_insertVersion","_syncMask","_convertBitStream","_calculatePolynomial","_appendEccToData","_interleaveBlocks","_pack","_finish","array","x","y","bit","_i","_setMask","data","dataLength","ecc","eccLength","_i2","LOG","EXPONENT","_modN","_j","_calculateMaxLength","_appendData","_i3","mask","_isMasked","_y","_x","_y2","r3x","_x2","r3y","_y3","_r3x","_x3","_y4","_r3x2","_r3y","_x4","_r3y2","_y5","_r3x3","_x5","_r3y3","_y6","_r3x4","_x6","_r3y4","_y7","_r3x5","_x7","_i4","bad","N2","bw","_y8","h","b","_x8","b1","_getBadness","count","big","N4","_x9","_h","_b","_y9","_b2","charCodeAt","maxLength","_bit","badRuns","N1","_i5","N3","_applyMask","currentMask","_checkBadness","FINAL_FORMAT","k","_j2","_j3","_j4","BLOCK","_addAlignment","_x10","_x11","_getMaskBit","v","_x12","ImageRenderer","image","src","toDataURL","ServiceManager","_services","name","service","QRious","_parseOptions","privatize","_element","elementService","_serviceManager","getService","isCanvas","createCanvas","isImage","createImage","_renderers","update","setService","getName","assign","DEFAULTS","abs","mime","forEach","renderer","render","_background","changed","setter","_foreground","_mime","_size","use"],"mappings":";;;0LA+EO,IAAIA,GAAiB,SAAUC,EAAUC,GAC9C,KAAMD,YAAoBC,IACxB,KAAM,IAAIC,WAAU,sCAIbC,EAAc,WACvB,QAASC,GAAiBC,EAAQC,GAChC,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CACrC,GAAIE,GAAaH,EAAMC,EACvBE,GAAWC,WAAaD,EAAWC,aAAc,EACjDD,EAAWE,cAAe,EACtB,SAAWF,KAAYA,EAAWG,UAAW,GACjDC,OAAOC,eAAeT,EAAQI,EAAWM,IAAKN,IAIlD,MAAO,UAAUR,EAAae,EAAYC,GAGxC,MAFID,IAAYZ,EAAiBH,EAAYiB,UAAWF,GACpDC,GAAab,EAAiBH,EAAagB,GACxChB,MAoFAkB,EAAW,SAAUC,EAAUC,GACxC,GAA0B,kBAAfA,IAA4C,OAAfA,EACtC,KAAM,IAAInB,WAAU,iEAAoEmB,GAG1FD,GAASF,UAAYL,OAAOS,OAAOD,GAAcA,EAAWH,WAC1DK,aACEC,MAAOJ,EACPV,YAAY,EACZE,UAAU,EACVD,cAAc,KAGdU,IAAYR,OAAOY,eAAiBZ,OAAOY,eAAeL,EAAUC,GAAcD,EAASM,UAAYL,IAwDlGM,EAA4B,SAAUC,EAAMC,GACrD,IAAKD,EACH,KAAM,IAAIE,gBAAe,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ACT5E,OAAO6N,UAAWf,EAAOgB,SAAUlJ,KACrCI,MAAQ9D,EAAUa,YAAY6C,EAAQI,SACtChC,KAAOH,KAAKkL,IAAInJ,EAAQ5B,MAEzB4B,qDArCO,mBACA,cACL,SACD,iBACA,UACC,0CAYF,iDAsECoJ,SACDjL,MAAKa,OAAO6I,UAAUuB,GAAQjL,KAAKiL,0CASpCrL,GAAQ,GAAIgC,UACT5B,KAAKiC,YACLjC,KAAKpC,aAGT8M,WAAWQ,QAAQ,SAACC,SAAaA,GAASC,OAAOxL,8CAU/CI,MAAKqL,0BASC/J,MACPgK,GAAUnN,EAAUoN,OAAOvL,KAAM,cAAesB,EAAYyI,EAAOgB,SAASzJ,WAE9EgK,SACGX,kDAWA3K,MAAKwL,0BASCxK,MACPsK,GAAUnN,EAAUoN,OAAOvL,KAAM,cAAegB,EAAY+I,EAAOgB,SAAS/J,WAE9EsK,SACGX,6CAWA3K,MAAK+B,qBAWJE,MACFqJ,GAAUnN,EAAUoN,OAAOvL,KAAM,SAAUiC,EAAO8H,EAAOgB,SAAS9I,MAAO9D,EAAUa,YAErFsM,SACGX,4CAWA3K,MAAKyL,oBASLR,MACDK,GAAUnN,EAAUoN,OAAOvL,KAAM,QAASiL,EAAMlB,EAAOgB,SAASE,KAElEK,SACGX,4CAWA3K,MAAK0L,oBAYLzL,MACDqL,GAAUnN,EAAUoN,OAAOvL,KAAM,QAASC,EAAM8J,EAAOgB,SAAS9K,KAAMH,KAAKkL,IAE7EM,SACGX,6CAWA3K,MAAKmC,qBASJvE,MACF0N,GAAUnN,EAAUoN,OAAOvL,KAAM,SAAUpC,EAAOmM,EAAOgB,SAASnN,MAEpE0N,SACGX,wBAKXZ,GAAOK,gBAAkB,GAAIT,GClR7BI,EAAO4B,IAAI,GAAItM"} \ No newline at end of file +{"version":3,"file":null,"sources":["../../src/util/Utilities.js","../../src/service/Service.js","../../src/service/element/ElementService.js","../../src/service/element/BrowserElementService.js","../../src/renderer/Renderer.js","../../src/renderer/CanvasRenderer.js","../../src/Alignment.js","../../src/ErrorCorrection.js","../../src/Galois.js","../../src/Version.js","../../src/Frame.js","../../src/renderer/ImageRenderer.js","../../src/service/ServiceManager.js","../../src/QRious.js","../../src/runtime/browser.js"],"sourcesContent":["/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n */\nclass Utilities {\n\n /**\n * Copies all properties from the source object to the target object, however, all property\n * names on the target will be prefixed with an underscore, used to indicate that they are private.\n *\n * @param {Object} target - the object to which the private fields are to be copied\n * @param {Object} source - the object from which the fields are to be copied\n * @return {Object} A reference to the target object.\n * @public\n * @static\n */\n static privatize(target, source) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n target[`_${key}`] = source[key]\n }\n }\n\n return target\n }\n\n /**\n * Sets the specified value on a given field on the object provided.\n *\n * If value is null, the specified default value will be used instead.\n *\n * An optional transformer can be specified which will be used to transform the value (or default value)\n * before it is assigned to the field.\n *\n * @param {Object} object - the object whose field is to be set with value\n * @param {String} fieldName - the field to be set with value\n * @param {*} value - the value to be set on the named field\n * @param {*} [defaultValue] - the value to be used if value is null\n * @param {Function} [transformer] - a function used to transform the value before it is assigned to the named field\n * @return {Boolean} true if the value of the field has changed as a result of the assignment; otherwise\n * false.\n * @public\n * @static\n */\n static setter(object, fieldName, value, defaultValue, transformer) {\n const oldValue = object[fieldName]\n let newValue = value != null ? value : defaultValue\n if (typeof transformer === 'function') {\n newValue = transformer(newValue)\n }\n\n object[fieldName] = newValue\n\n return newValue !== oldValue\n }\n\n /**\n * Throws an error indicating that the a given method on a specific class has not been implemented.\n *\n * @param {String} className - the name of the class on which the method has not been implemented\n * @param {String} methodName - the name of the method which has not been implemented\n * @throws {Error} The error describing the class method which has not been implemented.\n * @public\n * @static\n */\n static throwUnimplemented(className, methodName) {\n throw new Error(`\"${methodName}\" method must be implemented on the ${className} class`)\n }\n\n /**\n * Transforms the specified string to upper case while remaining null-safe.\n *\n * @param {String} string - the string to be transformed to upper case\n * @return {String} string transformed to upper case if string is not null.\n * @public\n * @static\n */\n static toUpperCase(string) {\n return string != null && string.toUpperCase()\n }\n}\n\nexport default Utilities\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n */\nclass Service {\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {String} The service name.\n * @public\n */\n getName() {\n Utilities.throwUnimplemented('Service', 'getName')\n }\n}\n\nexport default Service\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Service from '../Service'\nimport Utilities from '../../util/Utilities'\n\n/**\n * A service for working with elements.\n *\n * @public\n * @extends Service\n */\nclass ElementService extends Service {\n\n /**\n * Creates an instance of a canvas element.\n *\n * @return {*} The newly created canvas element.\n * @public\n */\n createCanvas() {\n Utilities.throwUnimplemented('ElementService', 'createCanvas')\n }\n\n /**\n * Creates an instance of a image element.\n *\n * @return {*} The newly created image element.\n * @public\n */\n createImage() {\n Utilities.throwUnimplemented('ElementService', 'createImage')\n }\n\n /**\n * @override\n */\n getName() {\n return 'element'\n }\n\n /**\n * Returns whether the specified element is a canvas.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is a canvas; otherwise false.\n * @public\n */\n isCanvas(element) {\n Utilities.throwUnimplemented('ElementService', 'isCanvas')\n }\n\n /**\n * Returns whether the specified element is an image.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is an image; otherwise false.\n * @public\n */\n isImage(element) {\n Utilities.throwUnimplemented('ElementService', 'isImage')\n }\n}\n\nexport default ElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport ElementService from './ElementService'\n\n/**\n * An implementation of {@link ElementService} intended for use within a browser environment.\n *\n * @public\n * @extends ElementService\n */\nclass BrowserElementService extends ElementService {\n\n /**\n * @override\n */\n createCanvas() {\n return document.createElement('canvas')\n }\n\n /**\n * @override\n */\n createImage() {\n return document.createElement('img')\n }\n\n /**\n * @override\n */\n isCanvas(element) {\n return element instanceof HTMLCanvasElement\n }\n\n /**\n * @override\n */\n isImage(element) {\n return element instanceof HTMLImageElement\n }\n}\n\nexport default BrowserElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so ordering of their execution is important.\n *\n * @public\n */\nclass Renderer {\n\n /**\n * Creates a new instance of {@link Renderer} for the qrious instance provided.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @public\n */\n constructor(qrious) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n */\n this.qrious = qrious\n }\n\n /**\n * Draws the specified QR code frame on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @protected\n */\n draw(frame) {\n Utilities.throwUnimplemented('Renderer', 'draw')\n }\n\n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame provided.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {Number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n */\n getModuleSize(frame) {\n const pixels = Math.floor(this.qrious.size / frame.width)\n\n return Math.max(1, pixels)\n }\n\n /**\n * Calculates the offset/padding (in pixel units) to be inserted before the QR code based on the frame\n * provided.\n *\n * The returned value will be zero if there is no available offset or if the size of the QR code does not fit its\n * contents. It will never be a negative value. This is done so that the inevitable clipping appears more naturally\n * and it is not clipped from all directions.\n *\n * @param {Frame} frame - the {@link Frame} from which the offset is to be derived\n * @return {Number} The pixel offset for the QR code which will be no less than zero.\n * @protected\n */\n getOffset(frame) {\n const moduleSize = this.getModuleSize(frame)\n const offset = Math.floor((this.qrious.size - moduleSize * frame.width) / 2)\n\n return Math.max(0, offset)\n }\n\n /**\n * Renders a QR code on the underlying element based on the frame provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @public\n */\n render(frame) {\n this.resize()\n this.reset()\n this.draw(frame)\n }\n\n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n reset() {\n Utilities.throwUnimplemented('Renderer', 'reset')\n }\n\n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n resize() {\n Utilities.throwUnimplemented('Renderer', 'resize')\n }\n}\n\nexport default Renderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with canvas elements.\n *\n * @public\n * @extends Renderer\n */\nclass CanvasRenderer extends Renderer {\n\n /**\n * @override\n */\n draw(frame) {\n const qrious = this.qrious\n const moduleSize = this.getModuleSize(frame)\n const offset = this.getOffset(frame)\n const context = qrious.canvas.getContext('2d')\n\n context.fillStyle = qrious.foreground\n\n for (let i = 0; i < frame.width; i++) {\n for (let j = 0; j < frame.width; j++) {\n if (frame.buffer[j * frame.width + i]) {\n context.fillRect(moduleSize * i + offset, moduleSize * j + offset, moduleSize, moduleSize)\n }\n }\n }\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n const context = qrious.canvas.getContext('2d')\n\n context.lineWidth = 1\n context.clearRect(0, 0, qrious.size, qrious.size)\n context.fillStyle = qrious.background\n context.fillRect(0, 0, qrious.size, qrious.size)\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const canvas = qrious.canvas\n\n canvas.width = qrious.size\n canvas.height = qrious.size\n }\n}\n\nexport default CanvasRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains alignment pattern information.\n *\n * @public\n */\nclass Alignment {\n\n /**\n * Returns the alignment pattern block.\n *\n * @return {Number[]} The alignment pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n }\n}\n\nexport default Alignment\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains error correction information.\n *\n * @public\n */\nclass ErrorCorrection {\n\n /**\n * Returns the error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @return {Number[]} The ECC blocks.\n * @public\n * @static\n */\n static get BLOCKS() {\n return [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ]\n }\n\n /**\n * Returns the final format bits with mask (level << 3 | mask).\n *\n * @return {Number[]} The final format bits.\n * @public\n * @static\n */\n static get FINAL_FORMAT() {\n return [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ]\n }\n\n /**\n * Returns a map of human-readable ECC levels.\n *\n * @return {Object} A ECC level mapping.\n * @public\n * @static\n */\n static get LEVELS() {\n return {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n }\n}\n\nexport default ErrorCorrection\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains Galois field information.\n *\n * @public\n */\nclass Galois {\n\n /**\n * Returns the Galois field exponent table.\n *\n * @return {Number[]} The Galois field exponent table.\n * @public\n * @static\n */\n static get EXPONENT() {\n return [\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0,\n 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23,\n 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1,\n 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0,\n 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2,\n 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce,\n 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc,\n 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54,\n 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73,\n 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff,\n 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41,\n 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,\n 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ]\n }\n\n /**\n * Returns the Galois field log table.\n *\n * @return {Number[]} The Galois field log table.\n * @public\n * @static\n */\n static get LOG() {\n return [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,\n 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9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 0x2c, 0xd7,\n 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n ]\n }\n}\n\nexport default Galois\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains version pattern information.\n *\n * @public\n */\nclass Version {\n\n /**\n * Returns the version pattern block.\n *\n * @return {Number[]} The version pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n }\n}\n\nexport default Version\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Alignment from './Alignment'\nimport ErrorCorrection from './ErrorCorrection'\nimport Galois from './Galois'\nimport Version from './Version'\n\n/**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @public\n */\nclass Frame {\n\n static _createArray(length) {\n const array = []\n\n for (let i = 0; i < length; i++) {\n array[i] = 0\n }\n\n return array\n }\n\n static _getMaskBit(x, y) {\n let bit\n\n if (x > y) {\n bit = x\n x = y\n y = bit\n }\n\n bit = y\n bit += y * y\n bit >>= 1\n bit += x\n\n return bit\n }\n\n static _modN(x) {\n while (x >= 255) {\n x -= 255\n x = (x >> 8) + (x & 255)\n }\n\n return x\n }\n\n // *Badness* coefficients.\n static get N1() {\n return 3\n }\n static get N2() {\n return 3\n }\n static get N3() {\n return 40\n }\n static get N4() {\n return 10\n }\n\n /**\n * Creates an instance of {@link Frame} based on the options provided.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n */\n constructor(options) {\n this._badness = []\n this._level = ErrorCorrection.LEVELS[options.level]\n this._polynomial = []\n this._value = options.value\n this._valueLength = this._value.length\n this._version = 0\n this._stringBuffer = []\n\n let dataBlock\n let eccBlock\n let neccBlock1\n let neccBlock2\n\n while (this._version < 40) {\n this._version++\n\n let index = (this._level - 1) * 4 + (this._version - 1) * 16\n\n neccBlock1 = ErrorCorrection.BLOCKS[index++]\n neccBlock2 = ErrorCorrection.BLOCKS[index++]\n dataBlock = ErrorCorrection.BLOCKS[index++]\n eccBlock = ErrorCorrection.BLOCKS[index]\n\n index = dataBlock * (neccBlock1 + neccBlock2) + neccBlock2 - 3 + (this._version <= 9)\n\n if (this._valueLength <= index) {\n break\n }\n }\n\n this._dataBlock = dataBlock\n this._eccBlock = eccBlock\n this._neccBlock1 = neccBlock1\n this._neccBlock2 = neccBlock2\n\n /**\n * The data width is based on version.\n *\n * @public\n * @type {Number}\n */\n // FIXME: Ensure that it fits instead of being truncated.\n this.width = 17 + 4 * this._version\n\n /**\n * The image buffer.\n *\n * @public\n * @type {Number[]}\n */\n this.buffer = Frame._createArray(this.width * this.width)\n\n this._ecc = Frame._createArray(this._dataBlock + (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2)\n this._mask = Frame._createArray((this.width * (this.width + 1) + 1) / 2)\n\n this._insertFinders()\n this._insertAlignments()\n\n // Insert single foreground cell.\n this.buffer[8 + this.width * (this.width - 8)] = 1\n\n this._insertTimingGap()\n this._reverseMask()\n this._insertTimingRowAndColumn()\n this._insertVersion()\n this._syncMask()\n this._convertBitStream(this._value.length)\n this._calculatePolynomial()\n this._appendEccToData()\n this._interleaveBlocks()\n this._pack()\n this._finish()\n }\n\n _addAlignment(x, y) {\n this.buffer[x + this.width * y] = 1\n\n for (let i = -2; i < 2; i++) {\n this.buffer[x + i + this.width * (y - 2)] = 1\n this.buffer[x - 2 + this.width * (y + i + 1)] = 1\n this.buffer[x + 2 + this.width * (y + i)] = 1\n this.buffer[x + i + 1 + this.width * (y + 2)] = 1\n }\n\n for (let i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i)\n this._setMask(x + 1, y - i)\n this._setMask(x - i, y - 1)\n this._setMask(x + i, y + 1)\n }\n }\n\n _appendData(data, dataLength, ecc, eccLength) {\n for (let i = 0; i < eccLength; i++) {\n this._stringBuffer[ecc + i] = 0\n }\n\n for (let i = 0; i < dataLength; i++) {\n const bit = Galois.LOG[this._stringBuffer[data + i] ^ this._stringBuffer[ecc]]\n\n if (bit !== 255) {\n for (let j = 1; j < eccLength; j++) {\n this._stringBuffer[ecc + j - 1] = this._stringBuffer[ecc + j] ^ Galois.EXPONENT[Frame._modN(bit + this._polynomial[eccLength - j])]\n }\n } else {\n for (let j = ecc; j < ecc + eccLength; j++) {\n this._stringBuffer[j] = this._stringBuffer[j + 1]\n }\n }\n\n this._stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois.EXPONENT[Frame._modN(bit + this._polynomial[0])]\n }\n }\n\n _appendEccToData() {\n let data = 0\n let ecc = this._calculateMaxLength()\n\n for (let i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, this._dataBlock, ecc, this._eccBlock)\n\n data += this._dataBlock\n ecc += this._eccBlock\n }\n\n for (let i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, this._dataBlock + 1, ecc, this._eccBlock)\n\n data += this._dataBlock + 1\n ecc += this._eccBlock\n }\n }\n\n _applyMask(mask) {\n const width = this.width\n\n switch (mask) {\n case 0:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(x + y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 1:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 2:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 3:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 4:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, r3y = y >> 1 & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n r3y = !r3y\n }\n\n if (!r3y && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 5:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 6:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((x & y & 1) + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 7:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n }\n }\n\n _calculateMaxLength() {\n return this._dataBlock * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n }\n\n _calculatePolynomial() {\n this._polynomial[0] = 1\n\n for (let i = 0; i < this._eccBlock; i++) {\n this._polynomial[i + 1] = 1\n\n for (let j = i; j > 0; j--) {\n this._polynomial[j] = this._polynomial[j] ? this._polynomial[j - 1] ^ Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[j]] + i)] : this._polynomial[j - 1]\n }\n\n this._polynomial[0] = Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[0]] + i)]\n }\n\n // Use logs for generator polynomial to save calculation step.\n for (let i = 0; i <= this._eccBlock; i++) {\n this._polynomial[i] = Galois.LOG[this._polynomial[i]]\n }\n }\n\n _checkBadness() {\n let bad = 0\n const width = this.width\n\n // Blocks of same colour.\n for (let y = 0; y < width - 1; y++) {\n for (let x = 0; x < width - 1; x++) {\n // All foreground colour.\n if (this.buffer[x + width * y] &&\n this.buffer[x + 1 + width * y] &&\n this.buffer[x + width * (y + 1)] &&\n this.buffer[x + 1 + width * (y + 1)] ||\n // All background colour.\n !(this.buffer[x + width * y] ||\n this.buffer[x + 1 + width * y] ||\n this.buffer[x + width * (y + 1)] ||\n this.buffer[x + 1 + width * (y + 1)])) {\n bad += Frame.N2\n }\n }\n }\n\n let bw = 0\n\n // X runs.\n for (let y = 0; y < width; y++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, x = 0; x < width; x++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n bw += b ? 1 : -1\n }\n\n bad += this._getBadness(h)\n }\n\n if (bw < 0) {\n bw = -bw\n }\n\n let count = 0\n let big = bw\n big += big << 2\n big <<= 1\n\n while (big > width * width) {\n big -= width * width\n count++\n }\n\n bad += count * Frame.N4\n\n // Y runs.\n for (let x = 0; x < width; x++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, y = 0; y < width; y++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n }\n\n bad += this._getBadness(h)\n }\n\n return bad\n }\n\n _convertBitStream(length) {\n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji not supported).\n for (let i = 0; i < length; i++) {\n this._ecc[i] = this._value.charCodeAt(i)\n }\n\n this._stringBuffer = this._ecc.slice(0)\n\n const maxLength = this._calculateMaxLength()\n\n if (length >= maxLength - 2) {\n length = maxLength - 2\n\n if (this._version > 9) {\n length--\n }\n }\n\n // Shift and re-pack to insert length prefix.\n let index = length\n\n if (this._version > 9) {\n this._stringBuffer[index + 2] = 0\n this._stringBuffer[index + 3] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 3] |= 255 & bit << 4\n this._stringBuffer[index + 2] = bit >> 4\n }\n\n this._stringBuffer[2] |= 255 & length << 4\n this._stringBuffer[1] = length >> 4\n this._stringBuffer[0] = 0x40 | length >> 12\n } else {\n this._stringBuffer[index + 1] = 0\n this._stringBuffer[index + 2] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 2] |= 255 & bit << 4\n this._stringBuffer[index + 1] = bit >> 4\n }\n\n this._stringBuffer[1] |= 255 & length << 4\n this._stringBuffer[0] = 0x40 | length >> 4\n }\n\n // Fill to end with pad pattern.\n index = length + 3 - (this._version < 10)\n\n while (index < maxLength) {\n this._stringBuffer[index++] = 0xec\n this._stringBuffer[index++] = 0x11\n }\n }\n\n _getBadness(length) {\n let badRuns = 0\n\n for (let i = 0; i <= length; i++) {\n if (this._badness[i] >= 5) {\n badRuns += Frame.N1 + this._badness[i] - 5\n }\n }\n\n // FBFFFBF as in finder.\n for (let i = 3; i < length - 1; i += 2) {\n if (this._badness[i - 2] === this._badness[i + 2] &&\n this._badness[i + 2] === this._badness[i - 1] &&\n this._badness[i - 1] === this._badness[i + 1] &&\n this._badness[i - 1] * 3 === this._badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (this._badness[i - 3] === 0 || i + 3 > length ||\n this._badness[i - 3] * 3 >= this._badness[i] * 4 ||\n this._badness[i + 3] * 3 >= this._badness[i] * 4)) {\n badRuns += Frame.N3\n }\n }\n\n return badRuns\n }\n\n _finish() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice(0)\n\n let bit = 0\n let i\n let mask = 30000\n\n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i)\n\n const currentMask = this._checkBadness()\n\n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask\n bit = i\n }\n\n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break\n }\n\n // Reset for next pass.\n this.buffer = this._stringBuffer.slice(0)\n }\n\n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit)\n }\n\n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection.FINAL_FORMAT[bit + (this._level - 1 << 3)]\n\n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[this.width - 1 - i + this.width * 8] = 1\n\n if (i < 6) {\n this.buffer[8 + this.width * i] = 1\n } else {\n this.buffer[8 + this.width * (i + 1)] = 1\n }\n }\n }\n\n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[8 + this.width * (this.width - 7 + i)] = 1\n\n if (i) {\n this.buffer[6 - i + this.width * 8] = 1\n } else {\n this.buffer[7 + this.width * 8] = 1\n }\n }\n }\n }\n\n _interleaveBlocks() {\n const maxLength = this._calculateMaxLength()\n let i\n let k = 0\n\n for (i = 0; i < this._dataBlock; i++) {\n for (let j = 0; j < this._neccBlock1; j++) {\n this._ecc[k++] = this._stringBuffer[i + j * this._dataBlock]\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n\n for (i = 0; i < this._eccBlock; i++) {\n for (let j = 0; j < this._neccBlock1 + this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[maxLength + i + j * this._eccBlock]\n }\n }\n\n this._stringBuffer = this._ecc\n }\n\n _insertAlignments() {\n const width = this.width\n\n if (this._version > 1) {\n const i = Alignment.BLOCK[this._version]\n let y = width - 7\n\n for (;;) {\n let x = width - 7\n\n while (x > i - 3) {\n this._addAlignment(x, y)\n\n if (x < i) {\n break\n }\n\n x -= i\n }\n\n if (y <= i + 9) {\n break\n }\n\n y -= i\n\n this._addAlignment(6, y)\n this._addAlignment(y, 6)\n }\n }\n }\n\n _insertFinders() {\n const width = this.width\n\n for (let i = 0; i < 3; i++) {\n let j = 0\n let y = 0\n\n if (i === 1) {\n j = width - 7\n }\n if (i === 2) {\n y = width - 7\n }\n\n this.buffer[y + 3 + width * (j + 3)] = 1\n\n for (let x = 0; x < 6; x++) {\n this.buffer[y + x + width * j] = 1\n this.buffer[y + width * (j + x + 1)] = 1\n this.buffer[y + 6 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 6)] = 1\n }\n\n for (let x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1)\n this._setMask(y + 1, j + x + 1)\n this._setMask(y + 5, j + x)\n this._setMask(y + x + 1, j + 5)\n }\n\n for (let x = 2; x < 4; x++) {\n this.buffer[y + x + width * (j + 2)] = 1\n this.buffer[y + 2 + width * (j + x + 1)] = 1\n this.buffer[y + 4 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 4)] = 1\n }\n }\n }\n\n _insertTimingGap() {\n const width = this.width\n\n for (let y = 0; y < 7; y++) {\n this._setMask(7, y)\n this._setMask(width - 8, y)\n this._setMask(7, y + width - 7)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x, 7)\n this._setMask(x + width - 8, 7)\n this._setMask(x, width - 8)\n }\n }\n\n _insertTimingRowAndColumn() {\n const width = this.width\n\n for (let x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6)\n this._setMask(6, 8 + x)\n } else {\n this.buffer[8 + x + width * 6] = 1\n this.buffer[6 + width * (8 + x)] = 1\n }\n }\n }\n\n _insertVersion() {\n const width = this.width\n\n if (this._version > 6) {\n let i = Version.BLOCK[this._version - 7]\n let j = 17\n\n for (let x = 0; x < 6; x++) {\n for (let y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? this._version >> j - 12 : i >> j)) {\n this.buffer[5 - x + width * (2 - y + width - 11)] = 1\n this.buffer[2 - y + width - 11 + width * (5 - x)] = 1\n } else {\n this._setMask(5 - x, 2 - y + width - 11)\n this._setMask(2 - y + width - 11, 5 - x)\n }\n }\n }\n }\n }\n\n _isMasked(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n return this._mask[bit] === 1\n }\n\n _pack() {\n let x = this.width - 1\n let y = this.width - 1\n let k = 1\n let v = 1\n\n // Interleaved data and ECC codes.\n const length = (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n\n for (let i = 0; i < length; i++) {\n let bit = this._stringBuffer[i]\n\n for (let j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + this.width * y] = 1\n }\n\n // Find next fill position.\n do {\n if (v) {\n x--\n } else {\n x++\n\n if (k) {\n if (y !== 0) {\n y--\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y = 9\n }\n }\n } else if (y !== this.width - 1) {\n y++\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y -= 8\n }\n }\n }\n\n v = !v\n } while (this._isMasked(x, y))\n }\n }\n }\n\n _reverseMask() {\n const width = this.width\n\n for (let x = 0; x < 9; x++) {\n this._setMask(x, 8)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8)\n this._setMask(8, x)\n }\n\n for (let y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7)\n }\n }\n\n _setMask(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n this._mask[bit] = 1\n }\n\n _syncMask() {\n const width = this.width\n\n for (let y = 0; y < width; y++) {\n for (let x = 0; x <= y; x++) {\n if (this.buffer[x + width * y]) {\n this._setMask(x, y)\n }\n }\n }\n }\n}\n\nexport default Frame\n\n/**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {String} level - The ECC level to be used.\n * @property {String} value - The value to be encoded.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with img elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas element as the src for the img element being rendered.\n *\n * @public\n * @extends Renderer\n */\nclass ImageRenderer extends Renderer {\n\n /**\n * @override\n */\n draw() {\n const qrious = this.qrious\n\n qrious.image.src = qrious.toDataURL()\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n\n qrious.image.src = ''\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const image = qrious.image\n\n image.width = qrious.size\n image.height = qrious.size\n }\n}\n\nexport default ImageRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n */\nclass ServiceManager {\n\n /**\n * Creates a new instance of {@link ServiceManager}.\n *\n * @public\n */\n constructor() {\n this._services = {}\n }\n\n /**\n * Returns the {@link Service} being managed with the specified name.\n *\n * @param {String} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name.\n * @throws {Error} If no {@link Service} is being managed with name.\n * @public\n */\n getService(name) {\n const service = this._services[name]\n if (!service) {\n throw new Error(`Service is not being managed with name: ${name}`)\n }\n\n return service\n }\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name to the\n * service provided.\n *\n * @param {String} name - the name of the {@link Service} to be managed with name\n * @param {Service} service - the {@link Service} implementation to be managed\n * @throws {Error} If a {@link Service} is already being managed with the same name.\n * @public\n */\n setService(name, service) {\n if (this._services[name]) {\n throw new Error(`Service is already managed with name: ${name}`)\n }\n\n if (service) {\n this._services[name] = service\n }\n }\n}\n\nexport default ServiceManager\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport CanvasRenderer from './renderer/CanvasRenderer'\nimport Frame from './Frame'\nimport ImageRenderer from './renderer/ImageRenderer'\nimport ServiceManager from './service/ServiceManager'\nimport Utilities from './util/Utilities'\n\n/**\n * Enables configuration of a QR code generator which uses HTML5 canvas for rendering.\n *\n * @public\n */\nclass QRious {\n\n /**\n * Returns the default options for {@link QRious}.\n *\n * @return {QRious~Options} The default options.\n * @public\n * @static\n */\n static get DEFAULTS() {\n return {\n background: 'white',\n foreground: 'black',\n level: 'L',\n mime: 'image/png',\n size: 100,\n value: ''\n }\n }\n\n /**\n * Returns the current version of {@link QRious}.\n *\n * @return {String} The current version.\n * @public\n * @static\n */\n static get VERSION() {\n return '2.0.2'\n }\n\n /**\n * Configures the service provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n */\n static use(service) {\n QRious._serviceManager.setService(service.getName(), service)\n }\n\n static _parseOptions(options) {\n options = Object.assign({}, QRious.DEFAULTS, options)\n options.level = Utilities.toUpperCase(options.level)\n options.size = Math.abs(options.size)\n\n return options\n }\n\n /**\n * Creates a new instance of {@link QRious} based on the options provided.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @public\n */\n constructor(options) {\n options = QRious._parseOptions(options)\n\n Utilities.privatize(this, options)\n\n let element = this._element\n let elementService = QRious._serviceManager.getService('element')\n\n /**\n * The canvas being used to render the QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas()\n this.canvas.qrious = this\n\n /**\n * The img to contain the rendered QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.image = element && elementService.isImage(element) ? element : elementService.createImage()\n this.image.qrious = this\n\n this._renderers = [\n new CanvasRenderer(this),\n new ImageRenderer(this)\n ]\n\n this.update()\n }\n\n /**\n * Returns the image data URI for the generated QR code using the mime provided.\n *\n * @param {String} [mime] - the MIME type for the image\n * @return {String} The image data URI for the QR code.\n * @public\n */\n toDataURL(mime) {\n return this.canvas.toDataURL(mime || this.mime)\n }\n\n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @protected\n */\n update() {\n const frame = new Frame({\n level: this.level,\n value: this.value\n })\n\n this._renderers.forEach((renderer) => renderer.render(frame))\n }\n\n /**\n * Returns the background color for the QR code.\n *\n * @return {String} The background color.\n * @public\n */\n get background() {\n return this._background\n }\n\n /**\n * Sets the background color for the QR code to background.\n *\n * @param {String} [background=\"white\"] - the background color to be set\n * @public\n */\n set background(background) {\n const changed = Utilities.setter(this, '_background', background, QRious.DEFAULTS.background)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the foreground color for the QR code.\n *\n * @return {String} The foreground color.\n * @public\n */\n get foreground() {\n return this._foreground\n }\n\n /**\n * Sets the foreground color for the QR code to foreground.\n *\n * @param {String} [foreground=\"black\"] - the foreground color to be set\n * @public\n */\n set foreground(foreground) {\n const changed = Utilities.setter(this, '_foreground', foreground, QRious.DEFAULTS.foreground)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the error correction level for the QR code.\n *\n * @return {String} The ECC level.\n * @public\n */\n get level() {\n return this._level\n }\n\n /**\n * Sets the error correction level for the QR code to level.\n *\n * level will be transformed to upper case to aid mapping to known ECC level blocks.\n *\n * @param {String} [level=\"L\"] - the ECC level to be set\n * @public\n */\n set level(level) {\n const changed = Utilities.setter(this, '_level', level, QRious.DEFAULTS.level, Utilities.toUpperCase)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the MIME type for the image rendered for the QR code.\n *\n * @return {String} The image MIME type.\n * @public\n */\n get mime() {\n return this._mime\n }\n\n /**\n * Sets the MIME type for the image rendered for the QR code to mime.\n *\n * @param {String} [mime=\"image/png\"] - the image MIME type to be set\n * @public\n */\n set mime(mime) {\n const changed = Utilities.setter(this, '_mime', mime, QRious.DEFAULTS.mime)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the size of the QR code.\n *\n * @return {Number} The size in pixels.\n * @public\n */\n get size() {\n return this._size\n }\n\n /**\n * Sets the size of the QR code to size.\n *\n * size will be transformed to ensure that it is always an absolute positive numbers (e.g.\n * -100 would become 100).\n *\n * @param {Number} [size=100] - the size in pixels to be set\n * @public\n */\n set size(size) {\n const changed = Utilities.setter(this, '_size', size, QRious.DEFAULTS.size, Math.abs)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the value of the QR code.\n *\n * @return {String} The value.\n * @public\n */\n get value() {\n return this._value\n }\n\n /**\n * Sets the value of the QR code to value.\n *\n * @param {String} [value=\"\"] - the value to be set\n * @public\n */\n set value(value) {\n const changed = Utilities.setter(this, '_value', value, QRious.DEFAULTS.value)\n\n if (changed) {\n this.update()\n }\n }\n}\n\nQRious._serviceManager = new ServiceManager()\n\nexport default QRious\n\n/**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {String} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas or\n * img. The element(s) will be created if needed.\n * @property {String} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {String} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {String} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {Number} [size=100] - The size of the QR code in pixels.\n * @property {String} [value=\"\"] - The value to be encoded within the QR code.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport BrowserElementService from '../service/element/BrowserElementService'\nimport QRious from '../QRious'\n\nQRious.use(new BrowserElementService())\n\nexport default QRious\n"],"names":["Utilities","target","source","key","hasOwnProperty","object","fieldName","value","defaultValue","transformer","oldValue","newValue","className","methodName","Error","string","toUpperCase","Service","throwUnimplemented","ElementService","element","BrowserElementService","document","createElement","HTMLCanvasElement","HTMLImageElement","Renderer","qrious","frame","pixels","Math","floor","this","size","width","max","moduleSize","getModuleSize","offset","resize","reset","draw","CanvasRenderer","getOffset","context","canvas","getContext","fillStyle","foreground","i","j","buffer","fillRect","lineWidth","clearRect","background","height","Alignment","ErrorCorrection","Galois","Version","Frame","options","_badness","_level","LEVELS","level","_polynomial","_value","_valueLength","length","_version","_stringBuffer","dataBlock","eccBlock","neccBlock1","neccBlock2","index","BLOCKS","_dataBlock","_eccBlock","_neccBlock1","_neccBlock2","_createArray","_ecc","_mask","_insertFinders","_insertAlignments","_insertTimingGap","_reverseMask","_insertTimingRowAndColumn","_insertVersion","_syncMask","_convertBitStream","_calculatePolynomial","_appendEccToData","_interleaveBlocks","_pack","_finish","array","x","y","bit","_i","_setMask","data","dataLength","ecc","eccLength","_i2","LOG","EXPONENT","_modN","_j","_calculateMaxLength","_appendData","_i3","mask","_isMasked","_y","_x","_y2","r3x","_x2","r3y","_y3","_r3x","_x3","_y4","_r3x2","_r3y","_x4","_r3y2","_y5","_r3x3","_x5","_r3y3","_y6","_r3x4","_x6","_r3y4","_y7","_r3x5","_x7","_i4","bad","N2","bw","_y8","h","b","_x8","b1","_getBadness","count","big","N4","_x9","_h","_b","_y9","_b2","charCodeAt","slice","maxLength","_bit","badRuns","N1","_i5","N3","_applyMask","currentMask","_checkBadness","FINAL_FORMAT","k","_j2","_j3","_j4","BLOCK","_addAlignment","_x10","_x11","_getMaskBit","v","_x12","ImageRenderer","image","src","toDataURL","ServiceManager","_services","name","service","QRious","_parseOptions","privatize","_element","elementService","_serviceManager","getService","isCanvas","createCanvas","isImage","createImage","_renderers","update","setService","getName","Object","assign","DEFAULTS","abs","mime","forEach","renderer","render","_background","changed","setter","_foreground","_mime","_size","use"],"mappings":";;;m/BAwBMA,qFAYaC,EAAQC,OAClB,GAAIC,KAAOD,GACVA,EAAOE,eAAeD,WACbA,GAASD,EAAOC,UAIxBF,kCAqBKI,EAAQC,EAAWC,EAAOC,EAAcC,MAC9CC,GAAWL,EAAOC,GACpBK,EAAoB,MAATJ,EAAgBA,EAAQC,QACZ,kBAAhBC,OACEA,EAAYE,MAGlBL,GAAaK,EAEbA,IAAaD,6CAYIE,EAAWC,QAC7B,IAAIC,WAAUD,yCAAiDD,gDAWpDG,SACA,OAAVA,GAAkBA,EAAOC,uBCxE9BC,kFASQC,mBAAmB,UAAW,oBCPtCC,6JASQD,mBAAmB,iBAAkB,wDAUrCA,mBAAmB,iBAAkB,uDAOxC,2CAUAE,KACGF,mBAAmB,iBAAkB,4CAUzCE,KACIF,mBAAmB,iBAAkB,kBAhDtBD,GCDvBI,iKAMKC,UAASC,cAAc,sDAOvBD,UAASC,cA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GZ,4CAWA7K,MAAK4L,oBASLR,MACDK,GAAUzN,EAAU0N,OAAO1L,KAAM,QAASoL,EAAMnB,EAAOiB,SAASE,KAElEK,SACGZ,4CAWA7K,MAAK6L,oBAYL5L,MACDwL,GAAUzN,EAAU0N,OAAO1L,KAAM,QAASC,EAAMgK,EAAOiB,SAASjL,KAAMH,KAAKqL,IAE7EM,SACGZ,6CAWA7K,MAAKoC,qBASJ7D,MACFkN,GAAUzN,EAAU0N,OAAO1L,KAAM,SAAUzB,EAAO0L,EAAOiB,SAAS3M,MAEpEkN,SACGZ,wBAKXZ,GAAOK,gBAAkB,GAAIT,GClR7BI,EAAO6B,IAAI,GAAIzM"} \ No newline at end of file diff --git a/package.json b/package.json index c1f8d6e..af7525a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "qrious", - "version": "2.0.1", + "version": "2.0.2", "description": "Library for QR code generation using canvas", "homepage": "https://github.com/neocotic/qrious", "bugs": { diff --git a/src/Frame.js b/src/Frame.js index b9256b0..a153a01 100644 --- a/src/Frame.js +++ b/src/Frame.js @@ -92,7 +92,7 @@ class Frame { this._value = options.value this._valueLength = this._value.length this._version = 0 - this._stringBuffer = this._value.slice(0) + this._stringBuffer = [] let dataBlock let eccBlock @@ -152,7 +152,7 @@ class Frame { this._insertTimingRowAndColumn() this._insertVersion() this._syncMask() - this._convertBitStream(this._stringBuffer.length) + this._convertBitStream(this._value.length) this._calculatePolynomial() this._appendEccToData() this._interleaveBlocks() @@ -319,7 +319,7 @@ class Frame { r3x = 0 } - if (!(x & y & 1 + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) { + if (!((x & y & 1) + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) { this.buffer[x + y * width] ^= 1 } } @@ -457,11 +457,9 @@ class Frame { } _convertBitStream(length) { - // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji - // not supported). - + // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji not supported). for (let i = 0; i < length; i++) { - this._ecc[i] = this._stringBuffer.charCodeAt(i) + this._ecc[i] = this._value.charCodeAt(i) } this._stringBuffer = this._ecc.slice(0) diff --git a/src/QRious.js b/src/QRious.js index 6811a98..4b1df8b 100644 --- a/src/QRious.js +++ b/src/QRious.js @@ -56,7 +56,7 @@ class QRious { * @static */ static get VERSION() { - return '2.0.1' + return '2.0.2' } /**