UNPKG

@tjieco/library

Version:

TypeScript port of ZXing multi-format 1D/2D barcode image processing library, with Code128 and ITF support.

1 lines 147 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("text-encoding")):"function"==typeof define&&define.amd?define("Library",["text-encoding"],e):"object"==typeof exports?exports.Library=e(require("text-encoding")):t.Library=e(t["text-encoding"])}("undefined"!=typeof self?self:this,function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=50)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){this.type=t,this.message=e}return t.prototype.getType=function(){return this.type},t.prototype.getMessage=function(){return this.message},t.isOfType=function(t,e){return t.type===e},t.IllegalArgumentException="IllegalArgumentException",t.NotFoundException="NotFoundException",t.ArithmeticException="ArithmeticException",t.FormatException="FormatException",t.ChecksumException="ChecksumException",t.WriterException="WriterException",t.IllegalStateException="IllegalStateException",t.UnsupportedOperationException="UnsupportedOperationException",t.ReedSolomonException="ReedSolomonException",t.ArgumentException="ArgumentException",t.ReaderException="ReaderException",t}();e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.arraycopy=function(t,e,r,n,a){for(var o=e,i=n,u=a;u--;)r[i++]=t[o++]},t.currentTimeMillis=function(){return Date.now()},t}();e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(13),a=r(53),o=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*a.default.floatToIntBits(this.x)+a.default.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(t){var e,r,n,a=this.distance(t[0],t[1]),o=this.distance(t[1],t[2]),i=this.distance(t[0],t[2]);if(o>=a&&o>=i?(r=t[0],e=t[1],n=t[2]):i>=o&&i>=a?(r=t[1],e=t[0],n=t[2]):(r=t[2],e=t[0],n=t[1]),this.crossProductZ(e,r,n)<0){var u=e;e=n,n=u}t[0]=e,t[1]=r,t[2]=n},t.distance=function(t,e){return n.default.distance(t.x,t.y,e.x,e.y)},t.crossProductZ=function(t,e,r){var n=e.x,a=e.y;return(r.x-n)*(t.y-a)-(r.y-a)*(t.x-n)},t}();e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),a=r(4),o=r(1),i=r(17),u=r(5),f=function(){function t(t,e,r,a){if(this.width=t,this.height=e,this.rowSize=r,this.bits=a,void 0!==e&&null!==e||(e=t),this.height=e,t<1||e<1)throw new n.default(n.default.IllegalArgumentException,"Both dimensions must be greater than 0");void 0!==r&&null!==r||(r=Math.floor((t+31)/32)),this.rowSize=r,void 0!==a&&null!==a||(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,a=new t(n,r),o=0;o<r;o++)for(var i=e[o],u=0;u<n;u++)i[u]&&a.set(u,o);return a},t.parseFromString=function(e,r,a){if(null===e)throw new n.default(n.default.IllegalArgumentException,"stringRepresentation cannot be null");for(var o=new Array(e.length),i=0,u=0,f=-1,l=0,s=0;s<e.length;)if("\n"===e.charAt(s)||"\r"===e.charAt(s)){if(i>u){if(-1===f)f=i-u;else if(i-u!==f)throw new n.default(n.default.IllegalArgumentException,"row lengths do not match");u=i,l++}s++}else if(e.substring(s,s+r.length)===r)s+=r.length,o[i]=!0,i++;else{if(e.substring(s,s+a.length)!==a)throw new n.default(n.default.IllegalArgumentException,"illegal character encountered: "+e.substring(s));s+=a.length,o[i]=!1,i++}if(i>u){if(-1===f)f=i-u;else if(i-u!==f)throw new n.default(n.default.IllegalArgumentException,"row lengths do not match");l++}for(var d=new t(f,l),c=0;c<i;c++)o[c]&&d.set(Math.floor(c%f),Math.floor(c/f));return d},t.prototype.get=function(t,e){var r=e*this.rowSize+Math.floor(t/32);return 0!=(this.bits[r]>>>(31&t)&1)},t.prototype.set=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295},t.prototype.unset=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)},t.prototype.flip=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295},t.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new n.default(n.default.IllegalArgumentException,"input matrix dimensions do not match");for(var e=new a.default(Math.floor(this.width/32)+1),r=this.rowSize,o=this.bits,i=0,u=this.height;i<u;i++)for(var f=i*r,l=t.getRow(i,e).getBitArray(),s=0;s<r;s++)o[f+s]^=l[s]},t.prototype.clear=function(){for(var t=this.bits,e=t.length,r=0;r<e;r++)t[r]=0},t.prototype.setRegion=function(t,e,r,a){if(e<0||t<0)throw new n.default(n.default.IllegalArgumentException,"Left and top must be nonnegative");if(a<1||r<1)throw new n.default(n.default.IllegalArgumentException,"Height and width must be at least 1");var o=t+r,i=e+a;if(i>this.height||o>this.width)throw new n.default(n.default.IllegalArgumentException,"The region must fit inside the matrix");for(var u=this.rowSize,f=this.bits,l=e;l<i;l++)for(var s=l*u,d=t;d<o;d++)f[s+Math.floor(d/32)]|=1<<(31&d)&4294967295},t.prototype.getRow=function(t,e){null===e||void 0===e||e.getSize()<this.width?e=new a.default(this.width):e.clear();for(var r=this.rowSize,n=this.bits,o=t*r,i=0;i<r;i++)e.setBulk(32*i,n[o+i]);return e},t.prototype.setRow=function(t,e){o.default.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),r=new a.default(t),n=new a.default(t),o=0,i=Math.floor((e+1)/2);o<i;o++)r=this.getRow(o,r),n=this.getRow(e-1-o,n),r.reverse(),n.reverse(),this.setRow(o,n),this.setRow(e-1-o,r)},t.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,r=this.rowSize,n=this.bits,a=t,o=e,i=-1,u=-1,f=0;f<e;f++)for(var l=0;l<r;l++){var s=n[f*r+l];if(0!==s){if(f<o&&(o=f),f>u&&(u=f),32*l<a){for(var d=0;0==(s<<31-d&4294967295);)d++;32*l+d<a&&(a=32*l+d)}if(32*l+31>i){for(d=31;s>>>d==0;)d--;32*l+d>i&&(i=32*l+d)}}}return i<a||u<o?null:Int32Array.from([a,o,i-a+1,u-o+1])},t.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,e=this.bits,r=0;r<e.length&&0===e[r];)r++;if(r===e.length)return null;for(var n=r/t,a=r%t*32,o=e[r],i=0;0==(o<<31-i&4294967295);)i++;return a+=i,Int32Array.from([a,n])},t.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,r=e.length-1;r>=0&&0===e[r];)r--;if(r<0)return null;for(var n=Math.floor(r/t),a=32*Math.floor(r%t),o=e[r],i=31;o>>>i==0;)i--;return a+=i,Int32Array.from([a,n])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&i.default.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var t=this.width;return t=31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+i.default.hashCode(this.bits)},t.prototype.toString=function(t,e,r){return void 0===t&&(t="x"),void 0===e&&(e=" "),void 0===r&&(r="\n"),this.buildToString(t,e,r)},t.prototype.buildToString=function(t,e,r){var n=new u.default;n.append(r);for(var a=0,o=this.height;a<o;a++){for(var i=0,f=this.width;i<f;i++)n.append(this.get(i,a)?t:e);n.append(r)}return n.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}();e.default=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),a=r(10),o=r(17),i=r(0),u=function(){function t(e,r){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=void 0===r||null===r?t.makeArray(e):r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var r=t.makeArray(e);n.default.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(t){return 0!=(this.bits[Math.floor(t/32)]&1<<(31&t))},t.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},t.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},t.prototype.getNextSet=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=r[n]}var u=32*n+a.default.numberOfTrailingZeros(o);return u>e?e:u},t.prototype.getNextUnset=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=~r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=~r[n]}var u=32*n+a.default.numberOfTrailingZeros(o);return u>e?e:u},t.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},t.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new i.default(i.default.IllegalArgumentException);if(e!==t){e--;for(var r=Math.floor(t/32),n=Math.floor(e/32),a=this.bits,o=r;o<=n;o++){var u=(2<<(o<n?31:31&e))-(1<<(o>r?0:31&t));a[o]|=u}}},t.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,r=0;r<t;r++)e[r]=0},t.prototype.isRange=function(t,e,r){if(e<t||t<0||e>this.size)throw new i.default(i.default.IllegalArgumentException);if(e===t)return!0;e--;for(var n=Math.floor(t/32),a=Math.floor(e/32),o=this.bits,u=n;u<=a;u++){var f=(2<<(u<a?31:31&e))-(1<<(u>n?0:31&t))&4294967295;if((o[u]&f)!==(r?f:0))return!1}return!0},t.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},t.prototype.appendBits=function(t,e){if(e<0||e>32)throw new i.default(i.default.IllegalArgumentException,"Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);this.appendBit;for(var r=e;r>0;r--)this.appendBit(1==(t>>r-1&1))},t.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e);this.appendBit;for(var r=0;r<e;r++)this.appendBit(t.get(r))},t.prototype.xor=function(t){if(this.size!==t.size)throw new i.default(i.default.IllegalArgumentException,"Sizes don't match");for(var e=this.bits,r=0,n=e.length;r<n;r++)e[r]^=t.bits[r]},t.prototype.toBytes=function(t,e,r,n){for(var a=0;a<n;a++){for(var o=0,i=0;i<8;i++)this.get(t)&&(o|=1<<7-i),t++;e[r+a]=o}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),r=e+1,n=this.bits,a=0;a<r;a++){var o=n[a];o=(o=(o=(o=(o=o>>1&1431655765|(1431655765&o)<<1)>>2&858993459|(858993459&o)<<2)>>4&252645135|(252645135&o)<<4)>>8&16711935|(16711935&o)<<8)>>16&65535|(65535&o)<<16,t[e-a]=o}if(this.size!==32*r){var i=32*r-this.size,u=t[0]>>>i;for(a=1;a<r;a++){var f=t[a];u|=f<<32-i,t[a-1]=u,u=f>>>i}t[r-1]=u}this.bits=t},t.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&o.default.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+o.default.hashCode(this.bits)},t.prototype.toString=function(){for(var t="",e=0,r=this.size;e<r;e++)0==(7&e)&&(t+=" "),t+=this.get(e)?"X":".";return t},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t}();e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){void 0===t&&(t=""),this.value=t}return t.prototype.append=function(t){return this.value+="string"==typeof t?t.toString():String.fromCharCode(t),this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(t){return this.value.charAt(t)},t.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},t.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},t.prototype.toString=function(){return this.value},t}();e.default=n},function(t,e,r){"use strict";var n,a=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var r=t.call(this,e.getWidth(),e.getHeight())||this;return r.delegate=e,r}return a(e,t),e.prototype.getRow=function(t,e){for(var r=this.delegate.getRow(t,e),n=this.getWidth(),a=0;a<n;a++)r[a]=255-(255&r[a]);return r},e.prototype.getMatrix=function(){for(var t=this.delegate.getMatrix(),e=this.getWidth()*this.getHeight(),r=new Uint8ClampedArray(e),n=0;n<e;n++)r[n]=255-(255&t[n]);return r},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(t,r,n,a){return new e(this.delegate.crop(t,r,n,a))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}(r(7).default);e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),a=r(5),o=function(){function t(t,e){this.width=t,this.height=e}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(t,e,r,a){throw new n.default(n.default.UnsupportedOperationException,"This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new n.default(n.default.UnsupportedOperationException,"This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new n.default(n.default.UnsupportedOperationException,"This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new a.default,r=0;r<this.height;r++){for(var n=this.getRow(r,t),o=0;o<this.width;o++){var i=255&n[o],u=void 0;u=i<64?"#":i<128?"+":i<192?".":" ",e.append(u)}e.append("\n")}return e.toString()},t}();e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(14),a=r(0),o=r(10),i=function(){function t(t,e,r){this.primitive=t,this.size=e,this.generatorBase=r;for(var a=new Int32Array(e),o=1,i=0;i<e;i++)a[i]=o,(o*=2)>=e&&(o^=t,o&=e-1);this.expTable=a;var u=new Int32Array(e);for(i=0;i<e-1;i++)u[a[i]]=i;this.logTable=u,this.zero=new n.default(this,Int32Array.from([0])),this.one=new n.default(this,Int32Array.from([1]))}return t.prototype.getZero=function(){return this.zero},t.prototype.getOne=function(){return this.one},t.prototype.buildMonomial=function(t,e){if(t<0)throw new a.default(a.default.IllegalArgumentException);if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new n.default(this,r)},t.addOrSubtract=function(t,e){return t^e},t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new a.default(a.default.IllegalArgumentException);return this.logTable[t]},t.prototype.inverse=function(t){if(0===t)throw new a.default(a.default.ArithmeticException);return this.expTable[this.size-this.logTable[t]-1]},t.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},t.prototype.getSize=function(){return this.size},t.prototype.getGeneratorBase=function(){return this.generatorBase},t.prototype.toString=function(){return"GF(0x"+o.default.toHexString(this.primitive)+","+this.size+")"},t.prototype.equals=function(t){return t===this},t.AZTEC_DATA_12=new t(4201,4096,1),t.AZTEC_DATA_10=new t(1033,1024,1),t.AZTEC_DATA_6=new t(67,64,1),t.AZTEC_PARAM=new t(19,16,1),t.QR_CODE_FIELD_256=new t(285,256,0),t.DATA_MATRIX_FIELD_256=new t(301,256,1),t.AZTEC_DATA_8=t.DATA_MATRIX_FIELD_256,t.MAXICODE_FIELD_64=t.AZTEC_DATA_6,t}();e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),a=function(){function t(e,r,n){for(var a=[],o=3;o<arguments.length;o++)a[o-3]=arguments[o];this.valueIdentifier=e,this.name=n,this.values="number"==typeof r?Int32Array.from([r]):r,this.otherEncodingNames=a,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var i=this.values,u=0,f=i.length;u!==f;u++){var l=i[u];t.VALUES_TO_ECI.set(l,this)}for(var s=0,d=a;s<d.length;s++){var c=d[s];t.NAME_TO_ECI.set(c,this)}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new n.default(n.default.FormatException,"incorect value");var r=t.VALUES_TO_ECI.get(e);if(void 0===r)throw new n.default(n.default.FormatException,"incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(void 0===r)throw new n.default(n.default.FormatException,"incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(0,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(12,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(13,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(14,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(15,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(16,20,"SJIS","Shift_JIS"),t.Cp1250=new t(17,21,"Cp1250","windows-1250"),t.Cp1251=new t(18,22,"Cp1251","windows-1251"),t.Cp1252=new t(19,23,"Cp1252","windows-1252"),t.Cp1256=new t(20,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(21,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(22,26,"UTF8","UTF-8"),t.ASCII=new t(23,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(24,28,"Big5"),t.GB18030=new t(25,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(26,30,"EUC_KR","EUC-KR"),t}();e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.numberOfTrailingZeros=function(t){var e;if(0===t)return 32;var r=31;return 0!==(e=t<<16)&&(r-=16,t=e),0!==(e=t<<8)&&(r-=8,t=e),0!==(e=t<<4)&&(r-=4,t=e),0!==(e=t<<2)&&(r-=2,t=e),r-(t<<1>>>31)},t.numberOfLeadingZeros=function(t){if(0===t)return 32;var e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-=t>>>31},t.toHexString=function(t){return t.toString(16)},t.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,t+=t>>>8,63&(t+=t>>>16)},t.MIN_VALUE_32_BITS=-2147483648,t}();e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){return function(t,e){this.deviceId=t,this.label=e}}();e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2),a=r(1),o=function(){function t(t,e,r,n,o,i){this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=o,this.timestamp=i,this.text=t,this.rawBytes=e,this.numBits=void 0===r||null===r?null===e||void 0===e?0:8*e.length:r,this.resultPoints=n,this.format=o,this.resultMetadata=null,this.timestamp=void 0===i||null===i?a.default.currentTimeMillis():i}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},t.prototype.putAllMetadata=function(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))},t.prototype.addResultPoints=function(t){var e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){var r=new n.default[e.length+t.length];a.default.arraycopy(e,0,r,0,e.length),a.default.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}();e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.MathUtils=function(){},t.round=function(t){return NaN===t?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0},t.distance=function(t,e,r,n){var a=t-r,o=e-n;return Math.sqrt(a*a+o*o)},t.sum=function(t){for(var e=0,r=0,n=t.length;r!==n;r++){e+=t[r]}return e},t}();e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(8),a=r(0),o=r(1),i=function(){function t(t,e){if(0===e.length)throw new a.default(a.default.IllegalArgumentException);this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(r-n),o.default.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){if(0===t)return this.getCoefficient(0);var e,r=this.coefficients;if(1===t){e=0;for(var a=0,o=r.length;a!==o;a++){var i=r[a];e=n.default.addOrSubtract(e,i)}return e}e=r[0];var u=r.length,f=this.field;for(a=1;a<u;a++)e=n.default.addOrSubtract(f.multiply(t,e),r[a]);return e},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new a.default(a.default.IllegalArgumentException,"GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,i=e.coefficients;if(r.length>i.length){var u=r;r=i,i=u}var f=new Int32Array(i.length),l=i.length-r.length;o.default.arraycopy(i,0,f,0,l);for(var s=l;s<i.length;s++)f[s]=n.default.addOrSubtract(r[s-l],i[s]);return new t(this.field,f)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new a.default(a.default.IllegalArgumentException,"GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,o=r.length,i=e.coefficients,u=i.length,f=new Int32Array(o+u-1),l=this.field,s=0;s<o;s++)for(var d=r[s],c=0;c<u;c++)f[s+c]=n.default.addOrSubtract(f[s+c],l.multiply(d,i[c]));return new t(l,f)},t.prototype.multiplyScalar=function(e){if(0===e)return this.field.getZero();if(1===e)return this;for(var r=this.coefficients.length,n=this.field,a=new Int32Array(r),o=this.coefficients,i=0;i<r;i++)a[i]=n.multiply(o[i],e);return new t(n,a)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new a.default(a.default.IllegalArgumentException);if(0===r)return this.field.getZero();for(var n=this.coefficients,o=n.length,i=new Int32Array(o+e),u=this.field,f=0;f<o;f++)i[f]=u.multiply(n[f],r);return new t(u,i)},t.prototype.divide=function(t){if(!this.field.equals(t.field))throw new a.default(a.default.IllegalArgumentException,"GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new a.default(a.default.IllegalArgumentException,"Divide by 0");for(var e=this.field,r=e.getZero(),n=this,o=t.getCoefficient(t.getDegree()),i=e.inverse(o);n.getDegree()>=t.getDegree()&&!n.isZero();){var u=n.getDegree()-t.getDegree(),f=e.multiply(n.getCoefficient(n.getDegree()),i),l=t.multiplyByMonomial(u,f),s=e.buildMonomial(u,f);r=r.addOrSubtract(s),n=n.addOrSubtract(l)}return[r,n]},t.prototype.toString=function(){for(var t="",e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):t.length>0&&(t+=" + "),0===e||1!==r){var n=this.field.log(r);0===n?t+="1":1===n?t+="a":(t+="a^",t+=n)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t},t}();e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4),a=r(0),o=r(19),i=r(2),u=function(){function t(){}return t.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(c){if(e&&!0===e.get(3)&&t.isRotateSupported()){var r=t.rotateCounterClockwise(),n=this.doDecode(r,e),u=n.getResultMetadata(),f=270;null!==u&&!0===u.get(o.default.ORIENTATION)&&(f+=u.get(o.default.ORIENTATION)%360),n.putMetadata(o.default.ORIENTATION,f);var l=n.getResultPoints();if(null!==l)for(var s=r.getHeight(),d=0;d<l.length;d++)l[d]=new i.default(s-l[d].getY()-1,l[d].getX());return n}throw new a.default(a.default.NotFoundException)}},t.prototype.reset=function(){},t.prototype.doDecode=function(t,e){var r,u=t.getWidth(),f=t.getHeight(),l=new n.default(u),s=e&&!0===e.get(3),d=Math.max(1,f>>(s?8:5));r=s?f:15;for(var c=Math.trunc(f/2),h=0;h<r;h++){var p=Math.trunc((h+1)/2),g=c+d*(0==(1&h)?p:-p);if(g<0||g>=f)break;try{l=t.getBlackRow(g,l)}catch(t){continue}for(var w=function(t){if(1===t&&(l.reverse(),e&&!0===e.get(9))){var r=new Map;e.forEach(function(t,e){return r.set(e,t)}),r.delete(9),e=r}try{var n=v.decodeRow(g,l,e);if(1===t){n.putMetadata(o.default.ORIENTATION,180);var a=n.getResultPoints();null!==a&&(a[0]=new i.default(u-a[0].getX()-1,a[0].getY()),a[1]=new i.default(u-a[1].getX()-1,a[1].getY()))}return{value:n}}catch(t){}},v=this,y=0;y<2;y++){var m=w(y);if("object"==typeof m)return m.value}}throw new a.default(a.default.NotFoundException)},t.recordPattern=function(t,e,r){for(var n=r.length,o=0;o<n;o++)r[o]=0;var i=t.getSize();if(e>=i)throw new a.default(a.default.NotFoundException);for(var u=!t.get(e),f=0,l=e;l<i;){if(t.get(l)!==u)r[f]++;else{if(++f===n)break;r[f]=1,u=!u}l++}if(f!==n&&(f!==n-1||l!==i))throw new a.default(a.default.NotFoundException)},t.recordPatternInReverse=function(e,r,n){for(var o=n.length,i=e.get(r);r>0&&o>=0;)e.get(--r)!==i&&(o--,i=!i);if(o>=0)throw new a.default(a.default.NotFoundException);t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(t,e,r){for(var n=t.length,a=0,o=0,i=0;i<n;i++)a+=t[i],o+=e[i];if(a<o)return Number.POSITIVE_INFINITY;var u=a/o;r*=u;for(var f=0,l=0;l<n;l++){var s=t[l],d=e[l]*u,c=s>d?s-d:d-s;if(c>r)return Number.POSITIVE_INFINITY;f+=c}return f/a},t}();e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(24),a=r(25),o=r(0),i=r(28),u=r(11),f=function(){function t(t,e,r){void 0===e&&(e=500),this.reader=t,this.timeBetweenScansMillis=e,this.hints=r}return t.prototype.getVideoInputDevices=function(){return new Promise(function(t,e){navigator.mediaDevices.enumerateDevices().then(function(e){for(var r=new Array,n=0,a=0,o=e.length;a!==o;a++){var i=e[a];"videoinput"===i.kind&&(r.push(new u.default(i.deviceId,i.label||"Video source "+n)),n++)}t(r)}).catch(function(t){e(t)})})},t.prototype.decodeFromInputVideoDevice=function(t,e){var r;this.reset(),this.prepareVideoElement(e),r=void 0===t?{video:{facingMode:"environment"}}:{video:{deviceId:{exact:t}}};var n=this;return new Promise(function(t,e){navigator.mediaDevices.getUserMedia(r).then(function(r){n.stream=r,n.videoElement.srcObject=r,n.videoPlayingEventListener=function(){n.decodeOnceWithDelay(t,e)},n.videoElement.addEventListener("playing",n.videoPlayingEventListener),n.videoElement.play()}).catch(function(t){e(t)})})},t.prototype.decodeFromVideoSource=function(t,e){this.reset(),this.prepareVideoElement(e);var r=this;return new Promise(function(e,n){r.videoPlayEndedEventListener=function(){r.stop(),n(new o.default(o.default.NotFoundException))},r.videoElement.addEventListener("ended",r.videoPlayEndedEventListener),r.videoPlayingEventListener=function(){r.decodeOnceWithDelay(e,n)},r.videoElement.addEventListener("playing",r.videoPlayingEventListener),r.videoElement.setAttribute("autoplay","true"),r.videoElement.setAttribute("src",t)})},t.prototype.prepareVideoElement=function(t){void 0===t?(this.videoElement=document.createElement("video"),this.videoElement.width=640,this.videoElement.height=480):this.videoElement="string"==typeof t?this.getMediaElement(t,"video"):t,this.videoElement.setAttribute("autoplay","true"),this.videoElement.setAttribute("muted","true"),this.videoElement.setAttribute("playsinline","true"),this.videoElement.setAttribute("autofocus","true")},t.prototype.getMediaElement=function(t,e){var r=document.getElementById(t);if(null===r)throw new o.default(o.default.ArgumentException,"element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw console.log(r.nodeName),new o.default(o.default.ArgumentException,"element with id '"+t+"' must be an "+e+" element");return r},t.prototype.decodeFromImage=function(t,e){var r=this;if(this.reset(),void 0===t&&void 0===e)throw new o.default(o.default.ArgumentException,"either imageElement with a src set or an url must be provided");this.prepareImageElement(t);var n=this;return new Promise(function(t,a){if(void 0!==e)n.imageLoadedEventListener=function(){n.decodeOnce(t,a,!1,!0)},n.imageElement.addEventListener("load",n.imageLoadedEventListener),n.imageElement.src=e;else{if(!r.isImageLoaded(r.imageElement))throw new o.default(o.default.ArgumentException,"either src or a loaded img should be provided");n.decodeOnce(t,a,!1,!0)}})},t.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.prototype.prepareImageElement=function(t){void 0===t?(this.imageElement=document.createElement("img"),this.imageElement.width=200,this.imageElement.height=200):this.imageElement="string"==typeof t?this.getMediaElement(t,"img"):t},t.prototype.decodeOnceWithDelay=function(t,e){this.timeoutHandler=window.setTimeout(this.decodeOnce.bind(this,t,e),this.timeBetweenScansMillis)},t.prototype.decodeOnce=function(t,e,r,u){void 0===r&&(r=!0),void 0===u&&(u=!0),void 0===this.canvasElementContext&&this.prepareCaptureCanvas(),this.canvasElementContext.drawImage(this.videoElement||this.imageElement,0,0);var f=new i.default(this.canvasElement),l=new n.default(new a.default(f));try{t(this.readerDecode(l))}catch(n){console.log(u,n),r&&o.default.isOfType(n,o.default.NotFoundException)?(console.log("not found, trying again..."),this.decodeOnceWithDelay(t,e)):u&&(o.default.isOfType(n,o.default.ChecksumException)||o.default.isOfType(n,o.default.FormatException))?(console.log("checksum or format error, trying again...",n),this.decodeOnceWithDelay(t,e)):e(n)}},t.prototype.readerDecode=function(t){return this.reader.decode(t,this.hints)},t.prototype.prepareCaptureCanvas=function(){var t,e,r=document.createElement("canvas");void 0!==this.videoElement?(t=this.videoElement.videoWidth,e=this.videoElement.videoHeight):(t=this.imageElement.naturalWidth||this.imageElement.width,e=this.imageElement.naturalHeight||this.imageElement.height),r.style.width=t+"px",r.style.height=e+"px",r.width=t,r.height=e,this.canvasElement=r,this.canvasElementContext=r.getContext("2d")},t.prototype.stop=function(){void 0!==this.timeoutHandler&&(window.clearTimeout(this.timeoutHandler),this.timeoutHandler=void 0),void 0!==this.stream&&(this.stream.getTracks()[0].stop(),this.stream=void 0)},t.prototype.reset=function(){this.stop(),void 0!==this.videoPlayEndedEventListener&&void 0!==this.videoElement&&this.videoElement.removeEventListener("ended",this.videoPlayEndedEventListener),void 0!==this.videoPlayingEventListener&&void 0!==this.videoElement&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoElement&&(this.videoElement.srcObject=void 0,this.videoElement.removeAttribute("src"),this.videoElement=void 0),void 0!==this.videoPlayEndedEventListener&&void 0!==this.imageElement&&this.imageElement.removeEventListener("load",this.imageLoadedEventListener),void 0!==this.imageElement&&(this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0),this.canvasElementContext=void 0,this.canvasElement=void 0},t}();e.default=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),a=function(){function t(){}return t.equals=function(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0},t.hashCode=function(t){if(null===t)return 0;for(var e=1,r=0,n=t;r<n.length;r++){e=31*e+n[r]}return e},t.fillUint8Array=function(t,e){for(var r=0;r!==t.length;r++)t[r]=e},t.copyOf=function(t,e){var r=new Int32Array(e);return n.default.arraycopy(t,0,r,0,Math.min(t.length,e)),r},t.binarySearch=function(e,r,n){void 0===n&&(n=t.numberComparator);for(var a=0,o=e.length-1;a<=o;){var i=o+a>>1,u=n(r,e[i]);if(u>0)a=i+1;else{if(!(u<0))return i;o=i-1}}return-a-1},t.numberComparator=function(t,e){return t-e},t}();e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(12),a=r(19),o=r(3),i=r(54),u=r(31),f=r(61),l=r(0),s=function(){function t(){this.decoder=new i.default}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var o,i;if(void 0!==r&&null!==r&&void 0!==r.get(1)){var l=t.extractPureBits(e.getBlackMatrix());o=this.decoder.decodeBitMatrix(l,r),i=t.NO_POINTS}else{var s=new f.default(e.getBlackMatrix()).detect(r);o=this.decoder.decodeBitMatrix(s.getBits(),r),i=s.getPoints()}o.getOther()instanceof u.default&&o.getOther().applyMirroredCorrection(i);var d=new n.default(o.getText(),o.getRawBytes(),void 0,i,11,void 0),c=o.getByteSegments();null!==c&&d.putMetadata(a.default.BYTE_SEGMENTS,c);var h=o.getECLevel();return null!==h&&d.putMetadata(a.default.ERROR_CORRECTION_LEVEL,h),o.hasStructuredAppend()&&(d.putMetadata(a.default.STRUCTURED_APPEND_SEQUENCE,o.getStructuredAppendSequenceNumber()),d.putMetadata(a.default.STRUCTURED_APPEND_PARITY,o.getStructuredAppendParity())),d},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new l.default(l.default.NotFoundException);var n=this.moduleSize(e,t),a=e[1],i=r[1],u=e[0],f=r[0];if(u>=f||a>=i)throw new l.default(l.default.NotFoundException);if(i-a!=f-u&&(f=u+(i-a))>=t.getWidth())throw new l.default(l.default.NotFoundException);var s=Math.round((f-u+1)/n),d=Math.round((i-a+1)/n);if(s<=0||d<=0)throw new l.default(l.default.NotFoundException);if(d!==s)throw new l.default(l.default.NotFoundException);var c=Math.floor(n/2);a+=c;var h=(u+=c)+Math.floor((s-1)*n)-f;if(h>0){if(h>c)throw new l.default(l.default.NotFoundException);u-=h}var p=a+Math.floor((d-1)*n)-i;if(p>0){if(p>c)throw new l.default(l.default.NotFoundException);a-=p}for(var g=new o.default(s,d),w=0;w<d;w++)for(var v=a+Math.floor(w*n),y=0;y<s;y++)t.get(u+Math.floor(y*n),v)&&g.set(y,w);return g},t.moduleSize=function(t,e){for(var r=e.getHeight(),n=e.getWidth(),a=t[0],o=t[1],i=!0,u=0;a<n&&o<r;){if(i!==e.get(a,o)){if(5==++u)break;i=!i}a++,o++}if(a===n||o===r)throw new l.default(l.default.NotFoundException);return(a-t[0])/7},t.NO_POINTS=new Array,t}();e.default=s},function(t,e,r){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(n||(n={})),e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3),a=r(0),o=r(30),i=r(56),u=r(57),f=function(){function t(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=r;for(var a=0,o=r[0].getECCodewordsPerBlock(),i=0,u=r[0].getECBlocks();i<u.length;i++){var f=u[i];a+=f.getCount()*(f.getDataCodewords()+o)}this.totalCodewords=a}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},t.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new a.default(a.default.FormatException);try{return this.getVersionForNumber((t-17)/4)}catch(t){throw new a.default(a.default.FormatException)}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new a.default(a.default.IllegalArgumentException);return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,a=0;a<t.VERSION_DECODE_INFO.length;a++){var i=t.VERSION_DECODE_INFO[a];if(i===e)return t.getVersionForNumber(a+7);var u=o.default.numBitsDiffering(e,i);u<r&&(n=a+7,r=u)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var t=this.getDimensionForVersion(),e=new n.default(t);e.setRegion(0,0,9,9),e.setRegion(t-8,0,8,9),e.setRegion(0,t-8,9,8);for(var r=this.alignmentPatternCenters.length,a=0;a<r;a++)for(var o=this.alignmentPatternCenters[a]-2,i=0;i<r;i++)0===a&&(0===i||i===r-1)||a===r-1&&0===i||e.setRegion(this.alignmentPatternCenters[i]-2,o,5,5);return e.setRegion(6,9,1,t-17),e.setRegion(9,6,t-17,1),this.versionNumber>6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new i.default(7,new u.default(1,19)),new i.default(10,new u.default(1,16)),new i.default(13,new u.default(1,13)),new i.default(17,new u.default(1,9))),new t(2,Int32Array.from([6,18]),new i.default(10,new u.default(1,34)),new i.default(16,new u.default(1,28)),new i.default(22,new u.default(1,22)),new i.default(28,new u.default(1,16))),new t(3,Int32Array.from([6,22]),new i.default(15,new u.default(1,55)),new i.default(26,new u.default(1,44)),new i.default(18,new u.default(2,17)),new i.default(22,new u.default(2,13))),new t(4,Int32Array.from([6,26]),new i.default(20,new u.default(1,80)),new i.default(18,new u.default(2,32)),new i.default(26,new u.default(2,24)),new i.default(16,new u.default(4,9))),new t(5,Int32Array.from([6,30]),new i.default(26,new u.default(1,108)),new i.default(24,new u.default(2,43)),new i.default(18,new u.default(2,15),new u.default(2,16)),new i.default(22,new u.default(2,11),new u.default(2,12))),new t(6,Int32Array.from([6,34]),new i.default(18,new u.default(2,68)),new i.default(16,new u.default(4,27)),new i.default(24,new u.default(4,19)),new i.default(28,new u.default(4,15))),new t(7,Int32Array.from([6,22,38]),new i.default(20,new u.default(2,78)),new i.default(18,new u.default(4,31)),new i.default(18,new u.default(2,14),new u.default(4,15)),new i.default(26,new u.default(4,13),new u.default(1,14))),new t(8,Int32Array.from([6,24,42]),new i.default(24,new u.default(2,97)),new i.default(22,new u.default(2,38),new u.default(2,39)),new i.default(22,new u.default(4,18),new u.default(2,19)),new i.default(26,new u.default(4,14),new u.default(2,15))),new t(9,Int32Array.from([6,26,46]),new i.default(30,new u.default(2,116)),new i.default(22,new u.default(3,36),new u.default(2,37)),new i.default(20,new u.default(4,16),new u.default(4,17)),new i.default(24,new u.default(4,12),new u.default(4,13))),new t(10,Int32Array.from([6,28,50]),new i.default(18,new u.default(2,68),new u.default(2,69)),new i.default(26,new u.default(4,43),new u.default(1,44)),new i.default(24,new u.default(6,19),new u.default(2,20)),new i.default(28,new u.default(6,15),new u.default(2,16))),new t(11,Int32Array.from([6,30,54]),new i.default(20,new u.default(4,81)),new i.default(30,new u.default(1,50),new u.default(4,51)),new i.default(28,new u.default(4,22),new u.default(4,23)),new i.default(24,new u.default(3,12),new u.default(8,13))),new t(12,Int32Array.from([6,32,58]),new i.default(24,new u.default(2,92),new u.default(2,93)),new i.default(22,new u.default(6,36),new u.default(2,37)),new i.default(26,new u.default(4,20),new u.default(6,21)),new i.default(28,new u.default(7,14),new u.default(4,15))),new t(13,Int32Array.from([6,34,62]),new i.default(26,new u.default(4,107)),new i.default(22,new u.default(8,37),new u.default(1,38)),new i.default(24,new u.default(8,20),new u.default(4,21)),new i.default(22,new u.default(12,11),new u.default(4,12))),new t(14,Int32Array.from([6,26,46,66]),new i.default(30,new u.default(3,115),new u.default(1,116)),new i.default(24,new u.default(4,40),new u.default(5,41)),new i.default(20,new u.default(11,16),new u.default(5,17)),new i.default(24,new u.default(11,12),new u.default(5,13))),new t(15,Int32Array.from([6,26,48,70]),new i.default(22,new u.default(5,87),new u.default(1,88)),new i.default(24,new u.default(5,41),new u.default(5,42)),new i.default(30,new u.default(5,24),new u.default(7,25)),new i.default(24,new u.default(11,12),new u.default(7,13))),new t(16,Int32Array.from([6,26,50,74]),new i.default(24,new u.default(5,98),new u.default(1,99)),new i.default(28,new u.default(7,45),new u.default(3,46)),new i.default(24,new u.default(15,19),new u.default(2,20)),new i.default(30,new u.default(3,15),new u.default(13,16))),new t(17,Int32Array.from([6,30,54,78]),new i.default(28,new u.default(1,107),new u.default(5,108)),new i.default(28,new u.default(10,46),new u.default(1,47)),new i.default(28,new u.default(1,22),new u.default(15,23)),new i.default(28,new u.default(2,14),new u.default(17,15))),new t(18,Int32Array.from([6,30,56,82]),new i.default(30,new u.default(5,120),new u.default(1,121)),new i.default(26,new u.default(9,43),new u.default(4,44)),new i.default(28,new u.default(17,22),new u.default(1,23)),new i.default(28,new u.default(2,14),new u.default(19,15))),new t(19,Int32Array.from([6,30,58,86]),new i.default(28,new u.default(3,113),new u.default(4,114)),new i.default(26,new u.default(3,44),new u.default(11,45)),new i.default(26,new u.default(17,21),new u.default(4,22)),new i.default(26,new u.default(9,13),new u.default(16,14))),new t(20,Int32Array.from([6,34,62,90]),new i.default(28,new u.default(3,107),new u.default(5,108)),new i.default(26,new u.default(3,41),new u.default(13,42)),new i.default(30,new u.default(15,24),new u.default(5,25)),new i.default(28,new u.default(15,15),new u.default(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new i.default(28,new u.default(4,116),new u.default(4,117)),new i.default(26,new u.default(17,42)),new i.default(28,new u.default(17,22),new u.default(6,23)),new i.default(30,new u.default(19,16),new u.default(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new i.default(28,new u.default(2,111),new u.default(7,112)),new i.default(28,new u.default(17,46)),new i.default(30,new u.default(7,24),new u.default(16,25)),new i.default(24,new u.default(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new i.default(30,new u.default(4,121),new u.default(5,122)),new i.default(28,new u.default(4,47),new u.default(14,48)),new i.default(30,new u.default(11,24),new u.default(14,25)),new i.default(30,new u.default(16,15),new u.default(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new i.default(30,new u.default(6,117),new u.default(4,118)),new i.default(28,new u.default(6,45),new u.default(14,46)),new i.default(30,new u.default(11,24),new u.default(16,25)),new i.default(30,new u.default(30,16),new u.default(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new i.default(26,new u.default(8,106),new u.default(4,107)),new i.default(28,new u.default(8,47),new u.default(13,48)),new i.default(30,new u.default(7,24),new u.default(22,25)),new i.default(30,new u.default(22,15),new u.default(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new i.default(28,new u.default(10,114),new u.default(2,115)),new i.default(28,new u.default(19,46),new u.default(4,47)),new i.default(28,new u.default(28,22),new u.default(6,23)),new i.default(30,new u.default(33,16),new u.default(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new i.default(30,new u.default(8,122),new u.default(4,123)),new i.default(28,new u.default(22,45),new u.default(3,46)),new i.default(30,new u.default(8,23),new u.default(26,24)),new i.default(30,new u.default(12,15),new u.default(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new i.default(30,new u.default(3,117),new u.default(10,118)),new i.default(28,new u.default(3,45),new u.default(23,46)),new i.default(30,new u.default(4,24),new u.default(31,25)),new i.default(30,new u.default(11,15),new u.default(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new i.default(30,new u.default(7,116),new u.default(7,117)),new i.default(28,new u.default(21,45),new u.default(7,46)),new i.default(30,new u.default(1,23),new u.default(37,24)),new i.default(30,new u.default(19,15),new u.default(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new i.default(30,new u.default(5,115),new u.default(10,116)),new i.default(28,new u.default(19,47),new u.default(10,48)),new i.default(30,new u.default(15,24),new u.default(25,25)),new i.default(30,new u.default(23,15),new u.default(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new i.default(30,new u.default(13,115),new u.default(3,116)),new i.default(28,new u.default(2,46),new u.default(29,47)),new i.default(30,new u.default(42,24),new u.default(1,25)),new i.default(30,new u.default(23,15),new u.default(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new i.default(30,new u.default(17,115)),new i.default(28,new u.default(10,46),new u.default(23,47)),new i.default(30,new u.default(10,24),new u.default(35,25)),new i.default(30,new u.default(19,15),new u.default(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new i.default(30,new u.default(17,115),new u.default(1,116)),new i.default(28,new u.default(14,46),new u.default(21,47)),new i.default(30,new u.default(29,24),new u.default(19,25)),new i.default(30,new u.default(11,15),new u.default(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new i.default(30,new u.default(13,115),new u.default(6,116)),new i.default(28,new u.default(14,46),new u.default(23,47)),new i.default(30,new u.default(44,24),new u.default(7,25)),new i.default(30,new u.default(59,16),new u.default(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new i.default(30,new u.default(12,121),new u.default(7,122)),new i.default(28,new u.default(12,47),new u.default(26,48)),new i.default(30,new u.default(39,24),new u.default(14,25)),new i.default(30,new u.default(22,15),new u.default(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new i.default(30,new u.default(6,121),new u.default(14,122)),new i.default(28,new u.default(6,47),new u.default(34,48)),new i.default(30,new u.default(46,24),new u.default(10,25)),new i.default(30,new u.default(2,15),new u.default(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new i.default(30,new u.default(17,122),new u.default(4,123)),new i.default(28,new u.default(29,46),new u.default(14,47)),new i.default(30,new u.default(49,24),new u.default(10,25)),new i.default(30,new u.default(24,15),new u.default(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new i.default(30,new u.default(4,122),new u.default(18,123)),new i.default(28,new u.default(13,46),new u.default(32,47)),new i.default(30,new u.default(48,24),new u.default(14,25)),new i.default(30,new u.default(42,15),new u.default(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new i.default(30,new u.default(20,117),new u.default(4,118)),new i.default(28,new u.default(40,47),new u.default(7,48)),new i.default(30,new u.default(43,24),new u.default(22,25)),new i.default(30,new u.default(10,15),new u.default(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new i.default(30,new u.default(19,1