uni-ticket-system/node_modules/qrcode-reader/dist/index.min.js

1 line
41 KiB
JavaScript
Raw Normal View History

2023-12-05 02:11:10 +00:00
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.QrCode=e()}(this,function(){"use strict";function t(t,e,n){this.ordinal_Renamed_Field=t,this.bits=e,this.name=n}function e(e){this.errorCorrectionLevel=t.forBits(e>>3&3),this.dataMask=7&e}function n(t,e){if(e||(e=t),t<1||e<1)throw"Both dimensions must be greater than 0";this.width=t,this.height=e;var n=t>>5;0!=(31&t)&&n++,this.rowSize=n,this.bits=new Array(n*e);for(var i=0;i<this.bits.length;i++)this.bits[i]=0}function i(t,e){this.count=t,this.dataCodewords=e}function r(t,e,n){this.ecCodewordsPerBlock=t,this.ecBlocks=n?[e,n]:[e]}function o(t,e,n,i,r,o){this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=[n,i,r,o];for(var s=0,a=n.ecCodewordsPerBlock,h=n.getECBlocks(),w=0;w<h.length;w++){var f=h[w];s+=f.count*(f.dataCodewords+a)}this.totalCodewords=s}function s(t,e,n){this.x=t,this.y=e,this.count=1,this.estimatedModuleSize=n}function a(t,e,n,i,r,o,s){this.image=t,this.possibleCenters=[],this.startX=e,this.startY=n,this.width=i,this.height=r,this.moduleSize=o,this.crossCheckStateCount=[0,0,0],this.resultPointCallback=s}function h(t){function e(t,e){var n=t.X-e.X,i=t.Y-e.Y;return Math.sqrt(n*n+i*i)}var n,i,r,o=e(t[0],t[1]),s=e(t[1],t[2]),a=e(t[0],t[2]);if(s>=o&&s>=a?(i=t[0],n=t[1],r=t[2]):a>=s&&a>=o?(i=t[1],n=t[0],r=t[2]):(i=t[2],n=t[0],r=t[1]),function(t,e,n){var i=e.x,r=e.y;return(n.x-i)*(t.y-r)-(n.y-r)*(t.x-i)}(n,i,r)<0){var h=n;n=r,r=h}t[0]=n,t[1]=i,t[2]=r}function w(t,e,n){this.x=t,this.y=e,this.count=1,this.estimatedModuleSize=n}function f(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}function u(){this.image=null,this.possibleCenters=[],this.hasSkipped=!1,this.crossCheckStateCount=[0,0,0,0,0],this.resultPointCallback=null}function l(t,e,n,i,r,o,s,a,h){this.a11=t,this.a12=i,this.a13=s,this.a21=e,this.a22=r,this.a23=a,this.a31=n,this.a32=o,this.a33=h}function d(t,e){this.bits=t,this.points=e}function c(t){this.image=t,this.resultPointCallback=null}function p(t,e){if(null==e||0==e.length)throw"System.ArgumentException";this.field=t;var n=e.length;if(n>1&&0==e[0]){for(var i=1;i<n&&0==e[i];)i++;if(i==n)this.coefficients=t.Zero.coefficients;else{this.coefficients=new Array(n-i);for(var r=0;r<this.coefficients.length;r++)this.coefficients[r]=0;for(var o=0;o<this.coefficients.length;o++)this.coefficients[o]=e[i+o]}}else this.coefficients=e}function g(t){this.expTable=new Array(256),this.logTable=new Array(256);for(var e=1,n=0;n<256;n++)this.expTable[n]=e,(e<<=1)>=256&&(e^=t);for(n=0;n<255;n++)this.logTable[this.expTable[n]]=n;var i=new Array(1);i[0]=0,this.zero=new p(this,new Array(i));var r=new Array(1);r[0]=1,this.one=new p(this,new Array(r))}function v(t){this.field=t}function m(t){var e=t.Dimension;if(e<21||1!=(3&e))throw"Error BitMatrixParser";this.bitMatrix=t,this.parsedVersion=null,this.parsedFormatInfo=null}function b(t,e){this.numDataCodewords=t,this.codewords=e}function y(t,e,n){this.blockPointer=0,this.bitPointer=7,this.dataLength=0,this.blocks=t,this.numErrorCorrectionCode=n,e<=9?this.dataLengthMode=0:e>=10&&e<=26?this.dataLengthMode=1:e>=27&&e<=40&&(this.dataLengthMode=2)}function C(){this.imagedata=null,this.width=0,this.height=0,this.qrCodeSymbol=null,this.debug=!1,this.callback=null}function M(t,e){return t>=0?t>>e:(t>>e)+(2<<~e)}t.prototype.ordinal=function(){return this.ordinal_Renamed_Field},t.forBits=function(t){if(t<0||t>=k.length)throw"ArgumentException";return k[t]};var k=[new t(1,0,"M"),new t(0,1,"L"),new t(3,2,"H"),new t(2,3,"Q")],P=[[21522,0],[20773,1],[24188,2],[23371,3],[17913,4],[16590,5],[20375,6],[19104,7],[30660,8],[29427,9],[32170,10],[30877,11],[26159,12],[25368,13],[27713,14],[26998,15],[5769,16],[5054,17],[7399,18],[6608,19],[1890,20],[597,21],[3340,22],[2107,23],[13663,24],[12392,25],[16177,26],[14854,27],[9396,28],[8579,29],[11994,30],[11245,31]],N=[0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4];e.prototype.GetHashCode=function(){return this.errorCorrectionLevel.ordinal()<<3|this.dataMask},e.prototype.Equals=function(t){var e=t;return this