1(self.webpackChunkbooking=self.webpackChunkbooking||[]).push([[1909],{1208:(Zt,pt,M)=>{"use strict";M.d(pt,{R:()=>T});var T=(()=>{return(j=T||(T={})).APPOINTMENT="APPOINTMENT",j.BILLING="BILLING",j.PRESCRIPTION="PRESCRIPTION",T;var j})()},8339:(Zt,pt,M)=>{"use strict";M.d(pt,{w:()=>T});class T{static mapEsSearchRes(rt,ut=0){return{isLoading:rt.isLoading,error:rt.error,data:{error:rt.data?.error,succeeded:rt.data?.succeeded,params:{from:rt.data?.params?.result?.[ut]?.from,size:rt.data?.params?.result?.[ut]?.size,total:rt.data?.params?.result?.[ut]?.total,result:rt.data?.params?.result?.[ut]?.result}}}}}},2109:(Zt,pt,M)=>{"use strict";M.d(pt,{b:()=>He});var T=M(7520),j=M(2560),rt=M(8810);let ut=(()=>{const Ae=class{constructor(){}ngOnInit(){}};let de=Ae;return Ae.\u0275fac=function(Ce){return new(Ce||Ae)},Ae.\u0275cmp=j.Xpm({type:Ae,selectors:[["app-loading-overlay"]],decls:5,vars:1,consts:[[1,"lock-screen","bg-slate-600/60","w-screen","h-screen","flex","justify-center","items-center"],[1,"text-primary"],["nzSize","large",3,"nzSpinning"],[1,"mt-6"]],template:function(Ce,We){1&Ce&&(j.TgZ(0,"div",0)(1,"div",1),j._UZ(2,"nz-spin",2),j.TgZ(3,"p",3),j._uU(4,"\u0110ang x\u1eed l\xfd..."),j.qZA()()()),2&Ce&&(j.xp6(2),j.Q6J("nzSpinning",!0))},dependencies:[rt.W]}),de})();var tt=M(5895);let He=(()=>{const Ae=class{constructor(Qe){this.overlay=Qe}show(){this.overlayRef&&this.overlayRef?.detach(),this.overlayRef=this.overlay.create({positionStrategy:this.overlay.position().global().centerHorizontally().centerVertically(),hasBackdrop:!0,scrollStrategy:this.overlay.scrollStrategies.block()}),this.overlayRef.attach(new T.C5(ut)),setTimeout(()=>{this.hide()},5e3)}hide(){this.overlayRef?.detach()}};let de=Ae;return Ae.\u0275fac=function(Ce){return new(Ce||Ae)(j.LFG(tt.aV))},Ae.\u0275prov=j.Yz7({token:Ae,factory:Ae.\u0275fac}),de})()},6255:(Zt,pt,M)=>{"use strict";M.d(pt,{t2:()=>wt,CE:()=>T});var T=(()=>{return(d=T||(T={}))[d.QR_CODE=0]="QR_CODE",d[d.AZTEC=1]="AZTEC",d[d.CODABAR=2]="CODABAR",d[d.CODE_39=3]="CODE_39",d[d.CODE_93=4]="CODE_93",d[d.CODE_128=5]="CODE_128",d[d.DATA_MATRIX=6]="DATA_MATRIX",d[d.MAXICODE=7]="MAXICODE",d[d.ITF=8]="ITF",d[d.EAN_13=9]="EAN_13",d[d.EAN_8=10]="EAN_8",d[d.PDF_417=11]="PDF_417",d[d.RSS_14=12]="RSS_14",d[d.RSS_EXPANDED=13]="RSS_EXPANDED",d[d.UPC_A=14]="UPC_A",d[d.UPC_E=15]="UPC_E",d[d.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION",T;var d})(),j=new Map([[T.QR_CODE,"QR_CODE"],[T.AZTEC,"AZTEC"],[T.CODABAR,"CODABAR"],[T.CODE_39,"CODE_39"],[T.CODE_93,"CODE_93"],[T.CODE_128,"CODE_128"],[T.DATA_MATRIX,"DATA_MATRIX"],[T.MAXICODE,"MAXICODE"],[T.ITF,"ITF"],[T.EAN_13,"EAN_13"],[T.EAN_8,"EAN_8"],[T.PDF_417,"PDF_417"],[T.RSS_14,"RSS_14"],[T.RSS_EXPANDED,"RSS_EXPANDED"],[T.UPC_A,"UPC_A"],[T.UPC_E,"UPC_E"],[T.UPC_EAN_EXTENSION,"UPC_EAN_EXTENSION"]]);function ut(d){return Object.values(T).includes(d)}var tt=(()=>{return(d=tt||(tt={}))[d.SCAN_TYPE_CAMERA=0]="SCAN_TYPE_CAMERA",d[d.SCAN_TYPE_FILE=1]="SCAN_TYPE_FILE",tt;var d})(),He=function(){function d(){}return d.GITHUB_PROJECT_URL="https://github.com/mebjas/html5-qrcode",d.SCAN_DEFAULT_FPS=2,d.DEFAULT_DISABLE_FLIP=!1,d.DEFAULT_REMEMBER_LAST_CAMERA_USED=!0,d.DEFAULT_SUPPORTED_SCAN_TYPE=[tt.SCAN_TYPE_CAMERA,tt.SCAN_TYPE_FILE],d}(),de=function(){function d(h,f){this.format=h,this.formatName=f}return d.prototype.toString=function(){return this.formatName},d.create=function(h){if(!j.has(h))throw"".concat(h," not in html5QrcodeSupportedFormatsTextMap");return new d(h,j.get(h))},d}(),Ae=function(){function d(){}return d.createFromText=function(h){return{decodedText:h,result:{text:h}}},d.createFromQrcodeResult=function(h){return{decodedText:h.text,result:h}},d}(),Z=(()=>{return(d=Z||(Z={}))[d.UNKWOWN_ERROR=0]="UNKWOWN_ERROR",d[d.IMPLEMENTATION_ERROR=1]="IMPLEMENTATION_ERROR",d[d.NO_CODE_FOUND_ERROR=2]="NO_CODE_FOUND_ERROR",Z;var d})(),Qe=function(){function d(){}return d.createFrom=function(h){return{errorMessage:h,type:Z.UNKWOWN_ERROR}},d}(),Ce=function(){function d(h){this.verbose=h}return d.prototype.log=function(h){this.verbose&&console.log(h)},d.prototype.warn=function(h){this.verbose&&console.warn(h)},d.prototype.logError=function(h,f){(this.verbose||!0===f)&&console.error(h)},d.prototype.logErrors=function(h){if(0===h.length)throw"Logger#logError called without arguments";this.verbose&&console.error(h)},d}();function We(d){return typeof d>"u"||null===d}var d,ht=function(){function d(){}return d.codeParseError=function(h){return"QR code parse error, error = ".concat(h)},d.errorGettingUserMedia=function(h){return"Error getting userMedia, error = ".concat(h)},d.onlyDeviceSupportedError=function(){return"The device doesn't support navigator.mediaDevices , only supported cameraIdOrConfig in this case is deviceId parameter (string)."},d.cameraStreamingNotSupported=function(){return"Camera streaming not supported by the browser."},d.unableToQuerySupportedDevices=function(){return"Unable to query supported devices, unknown error."},d.insecureContextCameraQueryError=function(){return"Camera access is only supported in secure context like https or localhost."},d.scannerPaused=function(){return"Scanner paused"},d}
1(),he=function(){function d(){}return d.scanningStatus=function(){return"Scanning"},d.idleStatus=function(){return"Idle"},d.errorStatus=function(){return"Error"},d.permissionStatus=function(){return"Permission"},d.noCameraFoundErrorStatus=function(){return"No Cameras"},d.lastMatch=function(h){return"Last Match: ".concat(h)},d.codeScannerTitle=function(){return"Code Scanner"},d.cameraPermissionTitle=function(){return"Request Camera Permissions"},d.cameraPermissionRequesting=function(){return"Requesting camera permissions..."},d.noCameraFound=function(){return"No camera found"},d.scanButtonStopScanningText=function(){return"Stop Scanning"},d.scanButtonStartScanningText=function(){return"Start Scanning"},d.torchOnButton=function(){return"Switch On Torch"},d.torchOffButton=function(){return"Switch Off Torch"},d.torchOnFailedMessage=function(){return"Failed to turn on torch"},d.torchOffFailedMessage=function(){return"Failed to turn off torch"},d.scanButtonScanningStarting=function(){return"Launching Camera..."},d.textIfCameraScanSelected=function(){return"Scan an Image File"},d.textIfFileScanSelected=function(){return"Scan using camera directly"},d.selectCamera=function(){return"Select Camera"},d.fileSelectionChooseImage=function(){return"Choose Image"},d.fileSelectionChooseAnother=function(){return"Choose Another"},d.fileSelectionNoImageSelected=function(){return"No image choosen"},d.anonymousCameraPrefix=function(){return"Anonymous Camera"},d.dragAndDropMessage=function(){return"Or drop an image to scan"},d.dragAndDropMessageOnlyImages=function(){return"Or drop an image to scan (other files not supported)"},d.zoom=function(){return"zoom"},d.loadingImage=function(){return"Loading image..."},d.cameraScanAltText=function(){return"Camera based scan"},d.fileScanAltText=function(){return"Fule based scan"},d}(),De=function(){function d(){}return d.poweredBy=function(){return"Powered by "},d.reportIssues=function(){return"Report issues"},d}(),ie=function(){function d(){}return d.isMediaStreamConstraintsValid=function(h,f){if("object"!=typeof h)return f.logError("videoConstraints should be of type object, the "+"object passed is of type ".concat(typeof h,"."),!0),!1;for(var x=new Set(["autoGainControl","channelCount","echoCancellation","latency","noiseSuppression","sampleRate","sampleSize","volume"]),D=0,F=Object.keys(h);D<F.length;D++){var C=F[D];if(x.has(C))return f.logError("".concat(C," is not supported videoConstaints."),!0),!1}return!0},d}(),$=M(52),_t=function(){function d(h,f,A){if(this.formatMap=new Map([[T.QR_CODE,$.BarcodeFormat.QR_CODE],[T.AZTEC,$.BarcodeFormat.AZTEC],[T.CODABAR,$.BarcodeFormat.CODABAR],[T.CODE_39,$.BarcodeFormat.CODE_39],[T.CODE_93,$.BarcodeFormat.CODE_93],[T.CODE_128,$.BarcodeFormat.CODE_128],[T.DATA_MATRIX,$.BarcodeFormat.DATA_MATRIX],[T.MAXICODE,$.BarcodeFormat.MAXICODE],[T.ITF,$.BarcodeFormat.ITF],[T.EAN_13,$.BarcodeFormat.EAN_13],[T.EAN_8,$.BarcodeFormat.EAN_8],[T.PDF_417,$.BarcodeFormat.PDF_417],[T.RSS_14,$.BarcodeFormat.RSS_14],[T.RSS_EXPANDED,$.BarcodeFormat.RSS_EXPANDED],[T.UPC_A,$.BarcodeFormat.UPC_A],[T.UPC_E,$.BarcodeFormat.UPC_E],[T.UPC_EAN_EXTENSION,$.BarcodeFormat.UPC_EAN_EXTENSION]]),this.reverseFormatMap=this.createReverseFormatMap(),!$)throw"Use html5qrcode.min.js without edit, ZXing not found.";this.verbose=f,this.logger=A;var w=this.createZXingFormats(h),x=new Map;x.set($.DecodeHintType.POSSIBLE_FORMATS,w),x.set($.DecodeHintType.TRY_HARDER,!1),this.hints=x}return d.prototype.decodeAsync=function(h){var f=this;return new Promise(function(A,w){try{A(f.decode(h))}catch(x){w(x)}})},d.prototype.decode=function(h){var f=new $.MultiFormatReader(this.verbose,this.hints),A=new $.HTMLCanvasElementLuminanceSource(h),w=new $.BinaryBitmap(new $.HybridBinarizer(A)),x=f.decode(w);return{text:x.text,format:de.create(this.toHtml5QrcodeSupportedFormats(x.format)),debugData:this.createDebugData()}},d.prototype.createReverseFormatMap=function(){var h=new Map;return this.formatMap.forEach(function(f,A,w){h.set(f,A)}),h},d.prototype.toHtml5QrcodeSupportedFormats=function(h){if(!this.reverseFormatMap.has(h))throw"reverseFormatMap doesn't have ".concat(h);return this.reverseFormatMap.get(h)},d.prototype.createZXingFormats=function(h){for(var f=[],A=0,w=h;A<w.length;A++){var x=w[A];this.formatMap.has(x)?f.push(this.formatMap.get(x)):this.logger.logError("".concat(x," is not supported by")+"ZXingHtml5QrcodeShim")}return f},d.prototype.createDebugData=function(){return{decoderName:"zxing-js"}},d}(),re=function(){function d(h,f,A){if(this.formatMap=new Map([[T.QR_CODE,"qr_code"],[T.AZTEC,"aztec"],[T.CODABAR,"codabar"],[T.CODE_39,"code_39"],[T.CODE_93,"code_93"],[T.CODE_128,"code_
1128"],[T.DATA_MATRIX,"data_matrix"],[T.ITF,"itf"],[T.EAN_13,"ean_13"],[T.EAN_8,"ean_8"],[T.PDF_417,"pdf417"],[T.UPC_A,"upc_a"],[T.UPC_E,"upc_e"]]),this.reverseFormatMap=this.createReverseFormatMap(),!d.isSupported())throw"Use html5qrcode.min.js without edit, Use BarcodeDetectorDelegate only if it isSupported();";this.verbose=f,this.logger=A;var w=this.createBarcodeDetectorFormats(h);if(this.detector=new BarcodeDetector(w),!this.detector)throw"BarcodeDetector detector not supported"}return d.isSupported=function(){return"BarcodeDetector"in window&&typeof new BarcodeDetector({formats:["qr_code"]})<"u"},d.prototype.decodeAsync=function(h){return function(d,h,f,A){return new(f||(f=Promise))(function(x,y){function D(v){try{C(A.next(v))}catch(G){y(G)}}function F(v){try{C(A.throw(v))}catch(G){y(G)}}function C(v){v.done?x(v.value):function w(x){return x instanceof f?x:new f(function(y){y(x)})}(v.value).then(D,F)}C((A=A.apply(d,h||[])).next())})}(this,void 0,void 0,function(){var f,A;return function(d,h){var A,w,x,y,f={label:0,sent:function(){if(1&x[0])throw x[1];return x[1]},trys:[],ops:[]};return y={next:D(0),throw:D(1),return:D(2)},"function"==typeof Symbol&&(y[Symbol.iterator]=function(){return this}),y;function D(C){return function(v){return function F(C){if(A)throw new TypeError("Generator is already executing.");for(;y&&(y=0,C[0]&&(f=0)),f;)try{if(A=1,w&&(x=2&C[0]?w.return:C[0]?w.throw||((x=w.return)&&x.call(w),0):w.next)&&!(x=x.call(w,C[1])).done)return x;switch(w=0,x&&(C=[2&C[0],x.value]),C[0]){case 0:case 1:x=C;break;case 4:return f.label++,{value:C[1],done:!1};case 5:f.label++,w=C[1],C=[0];continue;case 7:C=f.ops.pop(),f.trys.pop();continue;default:if(!(x=(x=f.trys).length>0&&x[x.length-1])&&(6===C[0]||2===C[0])){f=0;continue}if(3===C[0]&&(!x||C[1]>x[0]&&C[1]<x[3])){f.label=C[1];break}if(6===C[0]&&f.label<x[1]){f.label=x[1],x=C;break}if(x&&f.label<x[2]){f.label=x[2],f.ops.push(C);break}x[2]&&f.ops.pop(),f.trys.pop();continue}C=h.call(d,f)}catch(v){C=[6,v],w=0}finally{A=x=0}if(5&C[0])throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}([C,v])}}}(this,function(w){switch(w.label){case 0:return[4,this.detector.detect(h)];case 1:if(!(f=w.sent())||0===f.length)throw"No barcode or QR code detected.";return[2,{text:(A=this.selectLargestBarcode(f)).rawValue,format:de.create(this.toHtml5QrcodeSupportedFormats(A.format)),debugData:this.createDebugData()}]}})})},d.prototype.selectLargestBarcode=function(h){for(var f=null,A=0,w=0,x=h;w<x.length;w++){var y=x[w],D=y.boundingBox.width*y.boundingBox.height;D>A&&(A=D,f=y)}if(!f)throw"No largest barcode found";return f},d.prototype.createBarcodeDetectorFormats=function(h){for(var f=[],A=0,w=h;A<w.length;A++){var x=w[A];this.formatMap.has(x)?f.push(this.formatMap.get(x)):this.logger.warn("".concat(x," is not supported by")+"BarcodeDetectorDelegate")}return{formats:f}},d.prototype.toHtml5QrcodeSupportedFormats=function(h){if(!this.reverseFormatMap.has(h))throw"reverseFormatMap doesn't have ".concat(h);return this.reverseFormatMap.get(h)},d.prototype.createReverseFormatMap=function(){var h=new Map;return this.formatMap.forEach(function(f,A,w){h.set(f,A)}),h},d.prototype.createDebugData=function(){return{decoderName:"BarcodeDetector"}},d}(),L=function(d,h,f,A){return new(f||(f=Promise))(function(x,y){function D(v){try{C(A.next(v))}catch(G){y(G)}}function F(v){try{C(A.throw(v))}catch(G){y(G)}}function C(v){v.done?x(v.value):function w(x){return x instanceof f?x:new f(function(y){y(x)})}(v.value).then(D,F)}C((A=A.apply(d,h||[])).next())})},Be=function(d,h){var A,w,x,y,f={label:0,sent:function(){if(1&x[0])throw x[1];return x[1]},trys:[],ops:[]};return y={next:D(0),throw:D(1),return:D(2)},"function"==typeof Symbol&&(y[Symbol.iterator]=function(){return this}),y;function D(C){return function(v){return function F(C){if(A)throw new TypeError("Generator is already executing.");for(;y&&(y=0,C[0]&&(f=0)),f;)try{if(A=1,w&&(x=2&C[0]?w.return:C[0]?w.throw||((x=w.return)&&x.call(w),0):w.next)&&!(x=x.call(w,C[1])).done)return x;switch(w=0,x&&(C=[2&C[0],x.value]),C[0]){case 0:case 1:x=C;break;case 4:return f.label++,{value:C[1],done:!1};case 5:f.label++,w=C[1],C=[0];continue;case 7:C=f.ops.pop(),f.trys.pop();continue;default:if(!(x=(x=f.trys).length>0&&x[x.length-1])&&(6===C[0]||2===C[0])){f=0;continue}if(3===C[0]&&(!x||C[1]>x[0]&&C[1]<x[3])){f.label=C[1];break}if(6===C[0]&&f.label<x[1]){f.label=x[1],x=C;break}if(x&&f.label<x[2]){f.label=x[2],f.ops.push(C);break}x[2]&&f.ops.pop(),f.trys.pop();continue}
1C=h.call(d,f)}catch(v){C=[6,v],w=0}finally{A=x=0}if(5&C[0])throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}([C,v])}}},Le=function(){function d(h,f,A,w){this.EXECUTIONS_TO_REPORT_PERFORMANCE=100,this.executions=0,this.executionResults=[],this.wasPrimaryDecoderUsedInLastDecode=!1,this.verbose=A,f&&re.isSupported()?(this.primaryDecoder=new re(h,A,w),this.secondaryDecoder=new _t(h,A,w)):this.primaryDecoder=new _t(h,A,w)}return d.prototype.decodeAsync=function(h){return L(this,void 0,void 0,function(){var f;return Be(this,function(A){switch(A.label){case 0:f=performance.now(),A.label=1;case 1:return A.trys.push([1,,3,4]),[4,this.getDecoder().decodeAsync(h)];case 2:return[2,A.sent()];case 3:return this.possiblyLogPerformance(f),[7];case 4:return[2]}})})},d.prototype.decodeRobustlyAsync=function(h){return L(this,void 0,void 0,function(){var f,A;return Be(this,function(w){switch(w.label){case 0:f=performance.now(),w.label=1;case 1:return w.trys.push([1,3,4,5]),[4,this.primaryDecoder.decodeAsync(h)];case 2:return[2,w.sent()];case 3:if(A=w.sent(),this.secondaryDecoder)return[2,this.secondaryDecoder.decodeAsync(h)];throw A;case 4:return this.possiblyLogPerformance(f),[7];case 5:return[2]}})})},d.prototype.getDecoder=function(){return this.secondaryDecoder?!1===this.wasPrimaryDecoderUsedInLastDecode?(this.wasPrimaryDecoderUsedInLastDecode=!0,this.primaryDecoder):(this.wasPrimaryDecoderUsedInLastDecode=!1,this.secondaryDecoder):this.primaryDecoder},d.prototype.possiblyLogPerformance=function(h){if(this.verbose){var f=performance.now()-h;this.executionResults.push(f),this.executions++,this.possiblyFlushPerformanceReport()}},d.prototype.possiblyFlushPerformanceReport=function(){if(!(this.executions<this.EXECUTIONS_TO_REPORT_PERFORMANCE)){for(var h=0,f=0,A=this.executionResults;f<A.length;f++)h+=A[f];console.log("".concat(h/this.executionResults.length," ms for ").concat(this.executionResults.length," last runs.")),this.executions=0,this.executionResults=[]}},d}(),q=(d=function(h,f){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,w){A.__proto__=w}||function(A,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(A[x]=w[x])})(h,f)},function(h,f){if("function"!=typeof f&&null!==f)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function A(){this.constructor=h}d(h,f),h.prototype=null===f?Object.create(f):(A.prototype=f.prototype,new A)}),fe=function(d,h,f,A){return new(f||(f=Promise))(function(x,y){function D(v){try{C(A.next(v))}catch(G){y(G)}}function F(v){try{C(A.throw(v))}catch(G){y(G)}}function C(v){v.done?x(v.value):function w(x){return x instanceof f?x:new f(function(y){y(x)})}(v.value).then(D,F)}C((A=A.apply(d,h||[])).next())})},_e=function(d,h){var A,w,x,y,f={label:0,sent:function(){if(1&x[0])throw x[1];return x[1]},trys:[],ops:[]};return y={next:D(0),throw:D(1),return:D(2)},"function"==typeof Symbol&&(y[Symbol.iterator]=function(){return this}),y;function D(C){return function(v){return function F(C){if(A)throw new TypeError("Generator is already executing.");for(;y&&(y=0,C[0]&&(f=0)),f;)try{if(A=1,w&&(x=2&C[0]?w.return:C[0]?w.throw||((x=w.return)&&x.call(w),0):w.next)&&!(x=x.call(w,C[1])).done)return x;switch(w=0,x&&(C=[2&C[0],x.value]),C[0]){case 0:case 1:x=C;break;case 4:return f.label++,{value:C[1],done:!1};case 5:f.label++,w=C[1],C=[0];continue;case 7:C=f.ops.pop(),f.trys.pop();continue;default:if(!(x=(x=f.trys).length>0&&x[x.length-1])&&(6===C[0]||2===C[0])){f=0;continue}if(3===C[0]&&(!x||C[1]>x[0]&&C[1]<x[3])){f.label=C[1];break}if(6===C[0]&&f.label<x[1]){f.label=x[1],x=C;break}if(x&&f.label<x[2]){f.label=x[2],f.ops.push(C);break}x[2]&&f.ops.pop(),f.trys.pop();continue}C=h.call(d,f)}catch(v){C=[6,v],w=0}finally{A=x=0}if(5&C[0])throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}([C,v])}}},R=function(){function d(h,f){this.name=h,this.track=f}return d.prototype.isSupported=function(){return!!this.track.getCapabilities&&this.name in this.track.getCapabilities()},d.prototype.apply=function(h){var f={};return f[this.name]=h,this.track.applyConstraints({advanced:[f]})},d.prototype.value=function(){var h=this.track.getSettings();return this.name in h?h[this.name]:null},d}(),je=function(d){function h(f,A){return d.call(this,f,A)||this}return q(h,d),h.prototype.min=function(){return this.getCapabilities().min},h.prototype.max=function(){return this.getCapabilities().max},h.prototype.step=function(){return this.getCapabilities().step},h.prototype.apply=function(f){var A={};return A[this.name]=f,this.track.applyConstraints({advanced:[A]})},h.prototype.getCapabilities=function(){this.failIfNotSupported();var A=this.track.getCapabilities()[this.name];return{min:A.min,max:A.max,step:A.step}},h.prototype.failIfNotSupported=function(){if(!this.isSupported())throw new Error("".concat(this.name," capability not supported"))},h}(R),oe=function(d){function h(f){return d.call(this,"zoom",f)||this}return q(h,d),h}(je),Lt=function(d){function h(f){return d.call(this,"torch",f)||this}return q(h,d),h}(R),It=function(){function d(h){this.track=h}return d.prototype.zoomFeature=function(){return new oe(this.track)},d.prototype.torchFeature=function(){return new Lt(this.track)},d}(),Tt=function(){function d(h,f,A){this.isClosed=!1,this.parentElement=h,this.mediaStream=f,this.callbacks=A,this.surface=this.createVideoElement(this.parentElement.clientWidth),h.append(this.surface)}return d.prototype.createVideoElement=function(h){var f=document.createElement("video");return f.style.width="".concat(h,"px"),f.style.display="block",f.muted=!0,f.setAttribute("muted","true"),f.playsInl
1ine=!0,f},d.prototype.setupSurface=function(){var h=this;this.surface.onabort=function(){throw"RenderedCameraImpl video surface onabort() called"},this.surface.onerror=function(){throw"RenderedCameraImpl video surface onerror() called"};var f=function(){h.callbacks.onRenderSurfaceReady(h.surface.clientWidth,h.surface.clientHeight),h.surface.removeEventListener("playing",f)};this.surface.addEventListener("playing",f),this.surface.srcObject=this.mediaStream,this.surface.play()},d.create=function(h,f,A,w){return fe(this,void 0,void 0,function(){var x,y;return _e(this,function(D){switch(D.label){case 0:return x=new d(h,f,w),A.aspectRatio?(y={aspectRatio:A.aspectRatio},[4,x.getFirstTrackOrFail().applyConstraints(y)]):[3,2];case 1:D.sent(),D.label=2;case 2:return x.setupSurface(),[2,x]}})})},d.prototype.failIfClosed=function(){if(this.isClosed)throw"The RenderedCamera has already been closed."},d.prototype.getFirstTrackOrFail=function(){if(this.failIfClosed(),0===this.mediaStream.getVideoTracks().length)throw"No video tracks found";return this.mediaStream.getVideoTracks()[0]},d.prototype.pause=function(){this.failIfClosed(),this.surface.pause()},d.prototype.resume=function(h){this.failIfClosed();var f=this,A=function(){setTimeout(h,200),f.surface.removeEventListener("playing",A)};this.surface.addEventListener("playing",A),this.surface.play()},d.prototype.isPaused=function(){return this.failIfClosed(),this.surface.paused},d.prototype.getSurface=function(){return this.failIfClosed(),this.surface},d.prototype.getRunningTrackCapabilities=function(){return this.getFirstTrackOrFail().getCapabilities()},d.prototype.getRunningTrackSettings=function(){return this.getFirstTrackOrFail().getSettings()},d.prototype.applyVideoConstraints=function(h){return fe(this,void 0,void 0,function(){return _e(this,function(f){if("aspectRatio"in h)throw"Changing 'aspectRatio' in run-time is not yet supported.";return[2,this.getFirstTrackOrFail().applyConstraints(h)]})})},d.prototype.close=function(){if(this.isClosed)return Promise.resolve();var h=this;return new Promise(function(f,A){var x=h.mediaStream.getVideoTracks().length,y=0;h.mediaStream.getVideoTracks().forEach(function(D){h.mediaStream.removeTrack(D),D.stop(),++y>=x&&(h.isClosed=!0,h.parentElement.removeChild(h.surface),f())})})},d.prototype.getCapabilities=function(){return new It(this.getFirstTrackOrFail())},d}(),Qt=function(){function d(h){this.mediaStream=h}return d.prototype.render=function(h,f,A){return fe(this,void 0,void 0,function(){return _e(this,function(w){return[2,Tt.create(h,this.mediaStream,f,A)]})})},d.create=function(h){return fe(this,void 0,void 0,function(){return _e(this,function(w){switch(w.label){case 0:if(!navigator.mediaDevices)throw"navigator.mediaDevices not supported";return[4,navigator.mediaDevices.getUserMedia({audio:!1,video:h})];case 1:return[2,new d(w.sent())]}})})},d}(),Ye=function(d,h,f,A){return new(f||(f=Promise))(function(x,y){function D(v){try{C(A.next(v))}catch(G){y(G)}}function F(v){try{C(A.throw(v))}catch(G){y(G)}}function C(v){v.done?x(v.value):function w(x){return x instanceof f?x:new f(function(y){y(x)})}(v.value).then(D,F)}C((A=A.apply(d,h||[])).next())})},St=function(d,h){var A,w,x,y,f={label:0,sent:function(){if(1&x[0])throw x[1];return x[1]},trys:[],ops:[]};return y={next:D(0),throw:D(1),return:D(2)},"function"==typeof Symbol&&(y[Symbol.iterator]=function(){return this}),y;function D(C){return function(v){return function F(C){if(A)throw new TypeError("Generator is already executing.");for(;y&&(y=0,C[0]&&(f=0)),f;)try{if(A=1,w&&(x=2&C[0]?w.return:C[0]?w.throw||((x=w.return)&&x.call(w),0):w.next)&&!(x=x.call(w,C[1])).done)return x;switch(w=0,x&&(C=[2&C[0],x.value]),C[0]){case 0:case 1:x=C;break;case 4:return f.label++,{value:C[1],done:!1};case 5:f.label++,w=C[1],C=[0];continue;case 7:C=f.ops.pop(),f.trys.pop();continue;default:if(!(x=(x=f.trys).length>0&&x[x.length-1])&&(6===C[0]||2===C[0])){f=0;continue}if(3===C[0]&&(!x||C[1]>x[0]&&C[1]<x[3])){f.label=C[1];break}if(6===C[0]&&f.label<x[1]){f.label=x[1],x=C;break}if(x&&f.label<x[2]){f.label=x[2],f.ops.push(C);break}x[2]&&f.ops.pop(),f.trys.pop();continue}
1C=h.call(d,f)}catch(v){C=[6,v],w=0}finally{A=x=0}if(5&C[0])throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}([C,v])}}},Je=function(){function d(){}return d.failIfNotSupported=function(){return Ye(this,void 0,void 0,function(){return St(this,function(h){if(!navigator.mediaDevices)throw"navigator.mediaDevices not supported";return[2,new d]})})},d.prototype.create=function(h){return Ye(this,void 0,void 0,function(){return St(this,function(f){return[2,Qt.create(h)]})})},d}(),H=function(){function d(){}return d.retrieve=function(){if(navigator.mediaDevices)return d.getCamerasFromMediaDevices();var h=MediaStreamTrack;return MediaStreamTrack&&h.getSources?d.getCamerasFromMediaStreamTrack():d.rejectWithError()},d.rejectWithError=function(){var h=ht.unableToQuerySupportedDevices();return d.isHttpsOrLocalhost()||(h=ht.insecureContextCameraQueryError()),Promise.reject(h)},d.isHttpsOrLocalhost=function(){if("https:"===location.protocol)return!0;var h=location.host.split(":")[0];return"127.0.0.1"===h||"localhost"===h},d.getCamerasFromMediaDevices=function(){return function(d,h,f,A){return new(f||(f=Promise))(function(x,y){function D(v){try{C(A.next(v))}catch(G){y(G)}}function F(v){try{C(A.throw(v))}catch(G){y(G)}}function C(v){v.done?x(v.value):function w(x){return x instanceof f?x:new f(function(y){y(x)})}(v.value).then(D,F)}C((A=A.apply(d,h||[])).next())})}(this,void 0,void 0,function(){var h,f,A,w,x,y,D;return function(d,h){var A,w,x,y,f={label:0,sent:function(){if(1&x[0])throw x[1];return x[1]},trys:[],ops:[]};return y={next:D(0),throw:D(1),return:D(2)},"function"==typeof Symbol&&(y[Symbol.iterator]=function(){return this}),y;function D(C){return function(v){return function F(C){if(A)throw new TypeError("Generator is already executing.");for(;y&&(y=0,C[0]&&(f=0)),f;)try{if(A=1,w&&(x=2&C[0]?w.return:C[0]?w.throw||((x=w.return)&&x.call(w),0):w.next)&&!(x=x.call(w,C[1])).done)return x;switch(w=0,x&&(C=[2&C[0],x.value]),C[0]){case 0:case 1:x=C;break;case 4:return f.label++,{value:C[1],done:!1};case 5:f.label++,w=C[1],C=[0];continue;case 7:C=f.ops.pop(),f.trys.pop();continue;default:if(!(x=(x=f.trys).length>0&&x[x.length-1])&&(6===C[0]||2===C[0])){f=0;continue}if(3===C[0]&&(!x||C[1]>x[0]&&C[1]<x[3])){f.label=C[1];break}if(6===C[0]&&f.label<x[1]){f.label=x[1],x=C;break}if(x&&f.label<x[2]){f.label=x[2],f.ops.push(C);break}x[2]&&f.ops.pop(),f.trys.pop();continue}C=h.call(d,f)}catch(v){C=[6,v],w=0}finally{A=x=0}if(5&C[0])throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}([C,v])}}}(this,function(F){switch(F.label){case 0:return h=function(C){for(var G=0,xe=C.getVideoTracks();G<xe.length;G++){var Ie=xe[G];Ie.enabled=!1,Ie.stop(),C.removeTrack(Ie)}},[4,navigator.mediaDevices.getUserMedia({audio:!1,video:!0})];case 1:return f=F.sent(),[4,navigator.mediaDevices.enumerateDevices()];case 2:for(A=F.sent(),w=[],x=0,y=A;x<y.length;x++)"videoinput"===(D=y[x]).kind&&w.push({id:D.deviceId,label:D.label});return h(f),[2,w]}})})},d.getCamerasFromMediaStreamTrack=function(){return new Promise(function(h,f){MediaStreamTrack.getSources(function(x){for(var y=[],D=0,F=x;D<F.length;D++){var C=F[D];"video"===C.kind&&y.push({id:C.id,label:C.label})}h(y)})})},d}(),k=(()=>(function(d){d[d.UNKNOWN=0]="UNKNOWN",d[d.NOT_STARTED=1]="NOT_STARTED",d[d.SCANNING=2]="SCANNING",d[d.PAUSED=3]="PAUSED"}(k||(k={})),k))(),Xe=function(){function d(){this.state=k.NOT_STARTED,this.onGoingTransactionNewState=k.UNKNOWN}return d.prototype.directTransition=function(h){this.failIfTransitionOngoing(),this.validateTransition(h),this.state=h},d.prototype.startTransition=function(h){return this.failIfTransitionOngoing(),this.validateTransition(h),this.onGoingTransactionNewState=h,this},d.prototype.execute=function(){if(this.onGoingTransactionNewState===k.UNKNOWN)throw"Transaction is already cancelled, cannot execute().";var h=this.onGoingTransactionNewState;this.onGoingTransactionNewState=k.UNKNOWN,this.directTransition(h)},d.prototype.cancel=function(){if(this.onGoingTransactionNewState===k.UNKNOWN)throw"Transaction is already cancelled, cannot cancel().";this.onGoingTransactionNewState=k.UNKNOWN},d.prototype.getState=function(){return this.state},d.prototype.failIfTransitionOngoing=function(){if(this.onGoingTransactionNewState!==k.UNKNOWN)throw"Cannot transition to a new state, already under transition"},d.prototype.validateTransition=function(h){switch(this.state){case k.UNKNOWN:throw"Transition from unknown is not allowed";case k.NOT_STARTED:this.failIfNewStateIs(h,[k.PAUSED])}},d.prototype.failIfNewStateIs=function(h,f){for(var A=0,w=f;A<w.length;A++)if(h===w[A])throw"Cannot transition from ".concat(this.state," to ").concat(h)},d}(),yt=function(){function d(h){this.stateManager=h}return d.prototype.startTransition=function(h){return this.stateManager.startTransition(h)},d.prototype.directTransition=function(h){this.stateManager.directTransition(h)},d.prototype.getState=function(){return this.stateManager.getState()},d.prototype.canScanFile=function(){return this.stateManager.getState()===k.NOT_STARTED},d.prototype.isScanning=function(){return this.stateManager.getState()!==k.NOT_STARTED},d.prototype.isStrictlyScanning=function(){return this.stateManager.getState()===k.SCANNING},d.prototype.isPaused=function(){return this.stateManager.getState()===k.PAUSED},d}(),at=function(){function d(){}return d.create=function(){return new yt(new Xe)},d}
1(),sn=function(){var d=function(h,f){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,w){A.__proto__=w}||function(A,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(A[x]=w[x])})(h,f)};return function(h,f){if("function"!=typeof f&&null!==f)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function A(){this.constructor=h}d(h,f),h.prototype=null===f?Object.create(f):(A.prototype=f.prototype,new A)}}(),se=function(d){function h(){return null!==d&&d.apply(this,arguments)||this}return sn(h,d),h.DEFAULT_WIDTH=300,h.DEFAULT_WIDTH_OFFSET=2,h.FILE_SCAN_MIN_HEIGHT=300,h.FILE_SCAN_HIDDEN_CANVAS_PADDING=100,h.MIN_QR_BOX_SIZE=50,h.SHADED_LEFT=1,h.SHADED_RIGHT=2,h.SHADED_TOP=3,h.SHADED_BOTTOM=4,h.SHADED_REGION_ELEMENT_ID="qr-shaded-region",h.VERBOSE=!1,h.BORDER_SHADER_DEFAULT_COLOR="#ffffff",h.BORDER_SHADER_MATCH_COLOR="rgb(90, 193, 56)",h}(He),jt=function(){function d(h,f){this.logger=f,this.fps=se.SCAN_DEFAULT_FPS,h?(h.fps&&(this.fps=h.fps),this.disableFlip=!0===h.disableFlip,this.qrbox=h.qrbox,this.aspectRatio=h.aspectRatio,this.videoConstraints=h.videoConstraints):this.disableFlip=se.DEFAULT_DISABLE_FLIP}return d.prototype.isMediaStreamConstraintsValid=function(){return this.videoConstraints?ie.isMediaStreamConstraintsValid(this.videoConstraints,this.logger):(this.logger.logError("Empty videoConstraints",!0),!1)},d.prototype.isShadedBoxEnabled=function(){return!We(this.qrbox)},d.create=function(h,f){return new d(h,f)},d}(),wt=function(){function d(h,f){if(this.element=null,this.canvasElement=null,this.scannerPausedUiElement=null,this.hasBorderShaders=null,this.borderShaders=null,this.qrMatch=null,this.renderedCamera=null,this.qrRegion=null,this.context=null,this.lastScanImageFile=null,this.isScanning=!1,!document.getElementById(h))throw"HTML Element with id=".concat(h," not found");var w;this.elementId=h,this.verbose=!1,"boolean"==typeof f?this.verbose=!0===f:f&&(this.verbose=!0===(w=f).verbose),this.logger=new Ce(this.verbose),this.qrcode=new Le(this.getSupportedFormats(f),this.getUseBarCodeDetectorIfSupported(w),this.verbose,this.logger),this.shouldScan=!0,this.stateManagerProxy=at.create()}return d.prototype.start=function(h,f,A,w){var y,x=this;if(!h)throw"cameraIdOrConfig is required";if(!A||"function"!=typeof A)throw"qrCodeSuccessCallback is required and should be a function.";y=w||(this.verbose?this.logger.log:function(){});var D=jt.create(f,this.logger);this.clearElement();var F=!1;D.videoConstraints&&(D.isMediaStreamConstraintsValid()?F=!0:this.logger.logError("'videoConstraints' is not valid 'MediaStreamConstraints, it will be ignored.'",!0));var C=F,v=document.getElementById(this.elementId);v.style.position="relative",this.shouldScan=!0,this.element=v;var xe=this,Ie=this.stateManagerProxy.startTransition(k.SCANNING);return new Promise(function(Y,Me){var Pe=C?D.videoConstraints:xe.createVideoConstraints(h);if(!Pe)return Ie.cancel(),void Me("videoConstraints should be defined");var Fe={};(!C||D.aspectRatio)&&(Fe.aspectRatio=D.aspectRatio);var Ot={onRenderSurfaceReady:function(Ft,dt){xe.setupUi(Ft,dt,D),xe.isScanning=!0,xe.foreverScan(D,A,y)}};Je.failIfNotSupported().then(function(Ft){Ft.create(Pe).then(function(dt){return dt.render(x.element,Fe,Ot).then(function(Dt){xe.renderedCamera=Dt,Ie.execute(),Y(null)}).catch(function(Dt){Ie.cancel(),Me(Dt)})}).catch(function(dt){Ie.cancel(),Me(ht.errorGettingUserMedia(dt))})}).catch(function(Ft){Ie.cancel(),Me(ht.cameraStreamingNotSupported())})})},d.prototype.pause=function(h){if(!this.stateManagerProxy.isStrictlyScanning())throw"Cannot pause, scanner is not scanning.";this.stateManagerProxy.directTransition(k.PAUSED),this.showPausedState(),(We(h)||!0!==h)&&(h=!1),h&&this.renderedCamera&&this.renderedCamera.pause()},d.prototype.resume=function(){if(!this.stateManagerProxy.isPaused())throw"Cannot result, scanner is not paused.";if(!this.renderedCamera)throw"renderedCamera doesn't exist while trying resume()";var h=this,f=function(){h.stateManagerProxy.directTransition(k.SCANNING),h.hidePausedState()};this.renderedCamera.isPaused()?this.renderedCamera.resume(function(){f()}):f()},d.prototype.getState=function(){return this.stateManagerProxy.getState()},d.prototype.stop=function(){var h=this;if(!this.stateManagerProxy.isScanning())throw"Cannot stop, scanner is not running or paused.";var f=this.stateManagerProxy.startTransition(k.NOT_STARTED);this.shouldScan=!1,this.foreverScanTimeout&&clearTimeout(this.foreverScanTimeout);var w=this;return this.renderedCamera.close().then(function(){return w.renderedCamera=null,w.element&&(w.element.removeChild(w.
vendor: 11,270 bytes, line 1
1canvasElement),w.canvasElement=null),function(){if(h.element){var x=document.getElementById(se.SHADED_REGION_ELEMENT_ID);x&&h.element.removeChild(x)}}(),w.qrRegion&&(w.qrRegion=null),w.context&&(w.context=null),f.execute(),w.hidePausedState(),w.isScanning=!1,Promise.resolve()})},d.prototype.scanFile=function(h,f){return this.scanFileV2(h,f).then(function(A){return A.decodedText})},d.prototype.scanFileV2=function(h,f){var A=this;if(!(h&&h instanceof File))throw"imageFile argument is mandatory and should be instance of File. Use 'event.target.files[0]'.";if(We(f)&&(f=!0),!this.stateManagerProxy.canScanFile())throw"Cannot start file scan - ongoing camera scan";return new Promise(function(w,x){A.possiblyCloseLastScanImageFile(),A.clearElement(),A.lastScanImageFile=URL.createObjectURL(h);var y=new Image;y.onload=function(){var D=y.width,F=y.height,C=document.getElementById(A.elementId),v=C.clientWidth?C.clientWidth:se.DEFAULT_WIDTH,G=Math.max(C.clientHeight?C.clientHeight:F,se.FILE_SCAN_MIN_HEIGHT),xe=A.computeCanvasDrawConfig(D,F,v,G);if(f){var Ie=A.createCanvasElement(v,G,"qr-canvas-visible");Ie.style.display="inline-block",C.appendChild(Ie);var Y=Ie.getContext("2d");if(!Y)throw"Unable to get 2d context from canvas";Y.canvas.width=v,Y.canvas.height=G,Y.drawImage(y,0,0,D,F,xe.x,xe.y,xe.width,xe.height)}var Me=se.FILE_SCAN_HIDDEN_CANVAS_PADDING,Pe=Math.max(y.width,xe.width),Fe=Math.max(y.height,xe.height),Ot=Pe+2*Me,Ft=Fe+2*Me,dt=A.createCanvasElement(Ot,Ft);C.appendChild(dt);var Dt=dt.getContext("2d");if(!Dt)throw"Unable to get 2d context from canvas";Dt.canvas.width=Ot,Dt.canvas.height=Ft,Dt.drawImage(y,0,0,D,F,Me,Me,Pe,Fe);try{A.qrcode.decodeRobustlyAsync(dt).then(function(un){w(Ae.createFromQrcodeResult(un))}).catch(x)}catch(un){x("QR code parse error, error = ".concat(un))}},y.onerror=x,y.onabort=x,y.onstalled=x,y.onsuspend=x,y.src=URL.createObjectURL(h)})},d.prototype.clear=function(){this.clearElement()},d.getCameras=function(){return H.retrieve()},d.prototype.getRunningTrackCapabilities=function(){return this.getRenderedCameraOrFail().getRunningTrackCapabilities()},d.prototype.getRunningTrackSettings=function(){return this.getRenderedCameraOrFail().getRunningTrackSettings()},d.prototype.getRunningTrackCameraCapabilities=function(){return this.getRenderedCameraOrFail().getCapabilities()},d.prototype.applyVideoConstraints=function(h){if(!h)throw"videoConstaints is required argument.";if(!ie.isMediaStreamConstraintsValid(h,this.logger))throw"invalid videoConstaints passed, check logs for more details";return this.getRenderedCameraOrFail().applyVideoConstraints(h)},d.prototype.getRenderedCameraOrFail=function(){if(null==this.renderedCamera)throw"Scanning is not in running state, call this API only when QR code scanning using camera is in running state.";return this.renderedCamera},d.prototype.getSupportedFormats=function(h){if(!h||"boolean"==typeof h||!h.formatsToSupport)return[T.QR_CODE,T.AZTEC,T.CODABAR,T.CODE_39,T.CODE_93,T.CODE_128,T.DATA_MATRIX,T.MAXICODE,T.ITF,T.EAN_13,T.EAN_8,T.PDF_417,T.RSS_14,T.RSS_EXPANDED,T.UPC_A,T.UPC_E,T.UPC_EAN_EXTENSION];if(!Array.isArray(h.formatsToSupport))throw"configOrVerbosityFlag.formatsToSupport should be undefined or an array.";if(0===h.formatsToSupport.length)throw"Atleast 1 formatsToSupport is needed.";for(var A=[],w=0,x=h.formatsToSupport;w<x.length;w++){var y=x[w];ut(y)?A.push(y):this.logger.warn("Invalid format: ".concat(y," passed in config, ignoring."))}if(0===A.length)throw"None of formatsToSupport match supported values.";return A},d.prototype.getUseBarCodeDetectorIfSupported=function(h){if(We(h))return!0;if(!We(h.useBarCodeDetectorIfSupported))return!1!==h.useBarCodeDetectorIfSupported;if(We(h.experimentalFeatures))return!0;var f=h.experimentalFeatures;return!!We(f.useBarCodeDetectorIfSupported)||!1!==f.useBarCodeDetectorIfSupported},d.prototype.validateQrboxSize=function(h,f,A){var x=A.qrbox;this.validateQrboxConfig(x);var C,y=this.toQrdimensions(h,f,x),D=function(C){if(C<se.MIN_QR_BOX_SIZE)throw"minimum size of 'config.qrbox' dimension value is"+" ".concat(se.MIN_QR_BOX_SIZE,"px.")};D(y.width),D(y.height),y.width=((C=y.width)>h&&(this.logger.warn("`qrbox.width` or `qrbox` is larger than the width of the root element. The width will be truncated to the width of root element."),C=h),C)},d.prototype.validateQrboxConfig=function(h){if("number"!=typeof h&&"function"!=typeof h&&(void 0===h.width||void 0===h.height))throw"Invalid instance of QrDimensions passed for 'config.qrbox'. Both 'width' and 'height' should be set."},d.prototype.toQrdimensions=function(h,f,A){if("number"==typeof A)return{width:A,height:A};if("function"==typeof A)try{return A(h,f)}catch(w){throw new Error("qrbox config was passed as a function but it failed with unknown error"+w)}return A},d.prototype.setupUi=function(h,f,A){A.isShadedBoxEnabled()&&this.validateQrboxSize(h,f,A);var w=We(A.qrbox)?{width:h,height:f}:A.qrbox;this.validateQrboxConfig(w);var x=this.toQrdimensions(h,f,w);x.height>f&&this.logger.warn("[Html5Qrcode] config.qrbox has height that isgreater than the height of the video stream. Shading will be ignored");var y=A.isShadedBoxEnabled()&&x.height<=f,D={x:0,y:0,width:h,height:f},F=y?this.getShadedRegionBounds(h,f,x):D,C=this.createCanvasElement(F.width,F.height),G=C.getContext("2d",{willReadFrequently:!0});G.canvas.width=F.width,G.canvas.height=F.height,this.element.append(C),y&&this.possiblyInsertShadingElement(this.element,h,f,x),this.createScannerPausedUiElement(this.element),this.qrRegion=F,this.context=G,this.canvasElement=C},d.prototype.createScannerPausedUiElement=function(h){var f=document.createElement("div");f.innerText=ht.scannerPaused(),f.style.display="none",f.style.position="absolute",f.style.top="0px",f.style.zIndex="1",f.style.background="rgba(9, 9, 9, 0.46)",f.style.color="#FFECEC",f.style.textAlign="center",f.style.width="100%",h.appendChild(f),this.scannerPausedUiElement=f},d.prototype.scanContext=function(h,f){var A=this;return this.stateManagerProxy.isPaused()?Promise.resolve(!1):this.qrcode.decodeAsync(this.canvasElement).then(function(w){return h(w.text,Ae.createFromQrcodeResult(w)),A.possiblyUpdateShaders(!0),!0}).catch(function(w){A.possiblyUpdateShaders(!1);var x=ht.codeParseError(w);return f(x,Qe.createFrom(x)),!1})},d.prototype.foreverScan=function(h,f,A){var w=this;if(this.shouldScan&&this.renderedCamera){var x=this.renderedCamera.getSurface(),y=x.videoWidth/x.clientWidth,D=x.videoHeight/x.clientHeight;if(!this.qrRegion)throw"qrRegion undefined when localMediaStream is ready.";this.context.drawImage(x,this.qrRegion.x*y,this.qrRegion.y*D,this.qrRegion.width*y,this.qrRegion.height*D,0,0,this.qrRegion.width,this.qrRegion.height);var xe=function(){w.foreverScanTimeout=setTimeout(function(){w.foreverScan(h,f,A)},w.getTimeoutFps(h.fps))};this.scanContext(f,A).then(function(Ie){Ie||!0===h.disableFlip?xe():(w.context.translate(w.context.canvas.width,0),w.context.scale(-1,1),w.scanContext(f,A).finally(function(){xe()}))}).catch(function(Ie){w.logger.logError("Error happend while scanning context",Ie),xe()})}},d.prototype.createVideoConstraints=function(h){if("string"==typeof h)return{deviceId:{exact:h}};if("object"==typeof h){var f="facingMode",A="deviceId",w={user:!0,environment:!0},x="exact",y=function(Y){if(Y in w)return!0;throw"config has invalid 'facingMode' value = "+"'".concat(Y,"'")},D=Object.keys(h);if(1!==D.length)throw"'cameraIdOrConfig' object should have exactly 1 key,"+" if passed as an object, found ".concat(D.length," keys");var F=Object.keys(h)[0];if(F!==f&&F!==A)throw"Only '".concat(f,"' and '").concat(A,"' ")+" are supported for 'cameraIdOrConfig'";if(F!==f){var G=h.deviceId;if("string"==typeof G)return{deviceId:G};if("object"==typeof G){if(x in G)return{deviceId:{exact:G["".concat(x)]}};throw"'deviceId' should be string or object with"+" ".concat(x," as key.")}throw"Invalid type of 'deviceId' = ".concat(typeof G)}var C=h.facingMode;if("string"==typeof C){if(y(C))return{facingMode:C}}else{if("object"!=typeof C)throw"Invalid type of 'facingMode' = ".concat(typeof C);if(!(x in C))throw"'facingMode' should be string or object with"+" ".concat(x," as key.");if(y(C["".concat(x)]))return{facingMode:{exact:C["".concat(x)]}}}}throw"Invalid type of 'cameraIdOrConfig' = ".concat(typeof h)},d.prototype.computeCanvasDrawConfig=function(h,f,A,w){if(h<=A&&f<=w)return{x:(A-h)/2,y:(w-f)/2,width:h,height:f};var D=h,F=f;return h>A&&(f*=A/h,h=A),f>w&&(h*=w/f,f=w),this.logger.log("Image downsampled from "+"".concat(D,"X").concat(F)+" to ".concat(h,"X").concat(f,".")),this.computeCanvasDrawConfig(h,f,A,w)},d.prototype.clearElement=function(){if(this.stateManagerProxy.isScanning())throw"Cannot clear while scan is ongoing, close it first.";var h=document.getElementById(this.elementId);h&&(h.innerHTML="")},d.prototype.possiblyUpdateShaders=function(h){this.qrMatch!==h&&(this.hasBorderShaders&&this.borderShaders&&this.borderShaders.length&&this.borderShaders.forEach(function(f){f.style.backgroundColor=h?se.BORDER_SHADER_MATCH_COLOR:se.BORDER_SHADER_DEFAULT_COLOR}),this.qrMatch=h)},d.prototype.possiblyCloseLastScanImageFile=function(){this.lastScanImageFile&&(URL.revokeObjectURL(this.lastScanImageFile),this.lastScanImageFile=null)},d.prototype.createCanvasElement=function(h,f,A){var w=h,x=f,y=document.createElement("canvas");return y.style.width="".concat(w,"px"),y.style.height="".concat(x,"px"),y.style.display="none",y.id=We(A)?"qr-canvas":A,y},d.prototype.getShadedRegionBounds=function(h,f,A){if(A.width>h||A.height>f)throw"'config.qrbox' dimensions should not be greater than the dimensions of the root HTML element.";return{x:(h-A.width)/2,y:(f-A.height)/2,width:A.width,height:A.height}},d.prototype.possiblyInsertShadingElement=function(h,f,A,w){if(!(f-w.width<1||A-w.height<1)){var x=document.createElement("div");x.style.position="absolute";var y=(f-w.width)/2,D=(A-w.height)/2;if(x.style.borderLeft="".concat(y,"px solid rgba(0, 0, 0, 0.48)"),x.style.borderRight="".concat(y,"px solid rgba(0, 0, 0, 0.48)"),x.style.borderTop="".concat(D,"px solid rgba(0, 0, 0, 0.48)"),x.style.borderBottom="".concat(D,"px solid rgba(0, 0, 0, 0.48)"),x.style.boxSizing="border-box",x.style.top="0px",x.style.bottom="0px",x.style.left="0px",x.style.right="0px",x.id="".concat(se.SHADED_REGION_ELEMENT_ID),f-w.width<11||A-w.height<11)this.hasBorderShaders=!1;else{this.insertShaderBorders(x,40,5,-5,null,0,!0),this.insertShaderBorders(x,40,5,-5,null,0,!1),this.insertShaderBorders(x,40,5,null,-5,0,!0),this.insertShaderBorders(x,40,5,null,-5,0,!1),this.insertShaderBorders(x,5,45,-5,null,-5,!0),this.insertShaderBorders(x,5,45,null,-5,-5,!0),this.insertShaderBorders(x,5,45,-5,null,-5,!1),this.insertShaderBorders(x,5,45,null,-5,-5,!1),this.hasBorderShaders=!0}h.append(x)}},d.prototype.insertShaderBorders=function(h,f,A,w,x,y,D){var F=document.createElement("div");F.style.position="absolute",F.style.backgroundColor=se.BORDER_SHADER_DEFAULT_COLOR,F.style.width="".concat(f,"px"),F.style.height="".concat(A,"px"),null!==w&&(F.style.top="".concat(w,"px")),null!==x&&(F.style.bottom="".concat(x,"px")),D?F.style.left="".concat(y,"px"):F.style.right="".concat(y,"px"),this.borderShaders||(this.borderShaders=[]),this.borderShaders.push(F),h.appendChild(F)}
1,d.prototype.showPausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="block"},d.prototype.hidePausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="none"},d.prototype.getTimeoutFps=function(h){return 1e3/h},d}(),Pt="data:image/svg+xml;base64,",Ke=Pt+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNzEuNjQzIDM3MS42NDMiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDM3MS42NDMgMzcxLjY0MyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZD0iTTEwNS4wODQgMzguMjcxaDE2My43Njh2MjBIMTA1LjA4NHoiLz48cGF0aCBkPSJNMzExLjU5NiAxOTAuMTg5Yy03LjQ0MS05LjM0Ny0xOC40MDMtMTYuMjA2LTMyLjc0My0yMC41MjJWMzBjMC0xNi41NDItMTMuNDU4LTMwLTMwLTMwSDEyNS4wODRjLTE2LjU0MiAwLTMwIDEzLjQ1OC0zMCAzMHYxMjAuMTQzaC04LjI5NmMtMTYuNTQyIDAtMzAgMTMuNDU4LTMwIDMwdjEuMzMzYTI5LjgwNCAyOS44MDQgMCAwIDAgNC42MDMgMTUuOTM5Yy03LjM0IDUuNDc0LTEyLjEwMyAxNC4yMjEtMTIuMTAzIDI0LjA2MXYxLjMzM2MwIDkuODQgNC43NjMgMTguNTg3IDEyLjEwMyAyNC4wNjJhMjkuODEgMjkuODEgMCAwIDAtNC42MDMgMTUuOTM4djEuMzMzYzAgMTYuNTQyIDEzLjQ1OCAzMCAzMCAzMGg4LjMyNGMuNDI3IDExLjYzMSA3LjUwMyAyMS41ODcgMTcuNTM0IDI2LjE3Ny45MzEgMTAuNTAzIDQuMDg0IDMwLjE4NyAxNC43NjggNDUuNTM3YTkuOTg4IDkuOTg4IDAgMCAwIDguMjE2IDQuMjg4IDkuOTU4IDkuOTU4IDAgMCAwIDUuNzA0LTEuNzkzYzQuNTMzLTMuMTU1IDUuNjUtOS4zODggMi40OTUtMTMuOTIxLTYuNzk4LTkuNzY3LTkuNjAyLTIyLjYwOC0xMC43Ni0zMS40aDgyLjY4NWMuMjcyLjQxNC41NDUuODE4LjgxNSAxLjIxIDMuMTQyIDQuNTQxIDkuMzcyIDUuNjc5IDEzLjkxMyAyLjUzNCA0LjU0Mi0zLjE0MiA1LjY3Ny05LjM3MSAyLjUzNS0xMy45MTMtMTEuOTE5LTE3LjIyOS04Ljc4Ny0zNS44ODQgOS41ODEtNTcuMDEyIDMuMDY3LTIuNjUyIDEyLjMwNy0xMS43MzIgMTEuMjE3LTI0LjAzMy0uODI4LTkuMzQzLTcuMTA5LTE3LjE5NC0xOC42NjktMjMuMzM3YTkuODU3IDkuODU3IDAgMCAwLTEuMDYxLS40ODZjLS40NjYtLjE4Mi0xMS40MDMtNC41NzktOS43NDEtMTUuNzA2IDEuMDA3LTYuNzM3IDE0Ljc2OC04LjI3MyAyMy43NjYtNy42NjYgMjMuMTU2IDEuNTY5IDM5LjY5OCA3LjgwMyA0Ny44MzYgMTguMDI2IDUuNzUyIDcuMjI1IDcuNjA3IDE2LjYyMyA1LjY3MyAyOC43MzMtLjQxMyAyLjU4NS0uODI0IDUuMjQxLTEuMjQ1IDcuOTU5LTUuNzU2IDM3LjE5NC0xMi45MTkgODMuNDgzLTQ5Ljg3IDExNC42NjEtNC4yMjEgMy41NjEtNC43NTYgOS44Ny0xLjE5NCAxNC4wOTJhOS45OCA5Ljk4IDAgMCAwIDcuNjQ4IDMuNTUxIDkuOTU1IDkuOTU1IDAgMCAwIDYuNDQ0LTIuMzU4YzQyLjY3Mi0zNi4wMDUgNTAuODAyLTg4LjUzMyA1Ni43MzctMTI2Ljg4OC40MTUtMi42ODQuODIxLTUuMzA5IDEuMjI5LTcuODYzIDIuODM0LTE3LjcyMS0uNDU1LTMyLjY0MS05Ljc3Mi00NC4zNDV6bS0yMzIuMzA4IDQyLjYyYy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi0xLjMzM2MwLTUuNTE0IDQuNDg2LTEwIDEwLTEwaDE1djIxLjMzM2gtMTV6bS0yLjUtNTIuNjY2YzAtNS41MTQgNC40ODYtMTAgMTAtMTBoNy41djIxLjMzM2gtNy41Yy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi0xLjMzM3ptMTcuNSA5My45OTloLTcuNWMtNS41MTQgMC0xMC00LjQ4Ni0xMC0xMHYtMS4zMzNjMC01LjUxNCA0LjQ4Ni0xMCAxMC0xMGg3LjV2MjEuMzMzem0zMC43OTYgMjguODg3Yy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi04LjI3MWg5MS40NTdjLS44NTEgNi42NjgtLjQzNyAxMi43ODcuNzMxIDE4LjI3MWgtODIuMTg4em03OS40ODItMTEzLjY5OGMtMy4xMjQgMjAuOTA2IDEyLjQyNyAzMy4xODQgMjEuNjI1IDM3LjA0IDUuNDQxIDIuOTY4IDcuNTUxIDUuNjQ3IDcuNzAxIDcuMTg4LjIxIDIuMTUtMi41NTMgNS42ODQtNC40NzcgNy4yNTEtLjQ4Mi4zNzgtLjkyOS44LTEuMzM1IDEuMjYxLTYuOTg3IDcuOTM2LTExLjk4MiAxNS41Mi0xNS40MzIgMjIuNjg4aC05Ny41NjRWMzBjMC01LjUxNCA0LjQ4Ni0xMCAxMC0xMGgxMjMuNzY5YzUuNTE0IDAgMTAgNC40ODYgMTAgMTB2MTM1LjU3OWMtMy4wMzItLjM4MS02LjE1LS42OTQtOS4zODktLjkxNC0yNS4xNTktMS42OTQtNDIuMzcgNy43NDgtNDQuODk4IDI0LjY2NnoiLz48cGF0aCBkPSJNMTc5LjEyOSA4My4xNjdoLTI0LjA2YTUgNSAwIDAgMC01IDV2MjQuMDYxYTUgNSAwIDAgMCA1IDVoMjQuMDZhNSA1IDAgMCAwIDUtNVY4OC4xNjdhNSA1IDAgMCAwLTUtNXpNMTcyLjYyOSAxNDIuODZoLTEyLjU2VjEzMC44YTUgNSAwIDEgMC0xMCAwdjE3LjA2MWE1IDUgMCAwIDAgNSA1aDE3LjU2YTUgNSAwIDEgMCAwLTEwLjAwMXpNMjE2LjU2OCA4My4xNjdoLTI0LjA2YTUgNSAwIDAgMC01IDV2MjQuMDYxYTUgNSAwIDAgMCA1IDVoMjQuMDZhNSA1IDAgMCAwIDUtNVY4OC4xNjdhNSA1IDAgMCAwLTUtNXptLTUgMjQuMDYxaC0xNC4wNlY5My4xNjdoMTQuMDZ2MTQuMDYxek0yMTEuNjY5IDEyNS45MzZIMTk3LjQxYTUgNSAwIDAgMC01IDV2MTQuMjU3YTUgNSAwIDAgMCA1IDVoMTQuMjU5YTUgNSAwIDAgMCA1LTV2LTE0LjI1N2E1IDUgMCAwIDAtNS01eiIvPjwvc3ZnPg==",on=Pt+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1OS4wMTggNTkuMDE4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1OS4wMTggNTkuMDE4IiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJtNTguNzQxIDU0LjgwOS01Ljk2OS02LjI0NGExMC43NCAxMC43NCAwIDAgMCAyLjgyLTcuMjVjMC01Ljk1My00Ljg0My0xMC43OTYtMTAuNzk2LTEwLjc5NlMzNCAzNS4zNjEgMzQgNDEuMzE0IDM4Ljg0MyA1Mi4xMSA0NC43OTYgNTIuMTFjMi40NDEgMCA0LjY4OC0uODI0IDYuNDk5LTIuMTk2bDYuMDAxIDYuMjc3YS45OTguOTk4IDAgMCAwIDEuNDE0LjAzMiAxI
1DEgMCAwIDAgLjAzMS0xLjQxNHpNMzYgNDEuMzE0YzAtNC44NSAzLjk0Ni04Ljc5NiA4Ljc5Ni04Ljc5NnM4Ljc5NiAzLjk0NiA4Ljc5NiA4Ljc5Ni0zLjk0NiA4Ljc5Ni04Ljc5NiA4Ljc5NlMzNiA0Ni4xNjQgMzYgNDEuMzE0ek0xMC40MzEgMTYuMDg4YzAgMy4wNyAyLjQ5OCA1LjU2OCA1LjU2OSA1LjU2OHM1LjU2OS0yLjQ5OCA1LjU2OS01LjU2OGMwLTMuMDcxLTIuNDk4LTUuNTY5LTUuNTY5LTUuNTY5cy01LjU2OSAyLjQ5OC01LjU2OSA1LjU2OXptOS4xMzggMGMwIDEuOTY4LTEuNjAyIDMuNTY4LTMuNTY5IDMuNTY4cy0zLjU2OS0xLjYwMS0zLjU2OS0zLjU2OCAxLjYwMi0zLjU2OSAzLjU2OS0zLjU2OSAzLjU2OSAxLjYwMSAzLjU2OSAzLjU2OXoiLz48cGF0aCBkPSJtMzAuODgyIDI4Ljk4NyA5LjE4LTEwLjA1NCAxMS4yNjIgMTAuMzIzYTEgMSAwIDAgMCAxLjM1MS0xLjQ3NWwtMTItMTFhMSAxIDAgMCAwLTEuNDE0LjA2M2wtOS43OTQgMTAuNzI3LTQuNzQzLTQuNzQzYTEuMDAzIDEuMDAzIDAgMCAwLTEuMzY4LS4wNDRMNi4zMzkgMzcuNzY4YTEgMSAwIDEgMCAxLjMyMiAxLjUwMWwxNi4zMTMtMTQuMzYyIDcuMzE5IDcuMzE4YS45OTkuOTk5IDAgMSAwIDEuNDE0LTEuNDE0bC0xLjgyNS0xLjgyNHoiLz48cGF0aCBkPSJNMzAgNDYuNTE4SDJ2LTQyaDU0djI4YTEgMSAwIDEgMCAyIDB2LTI5YTEgMSAwIDAgMC0xLTFIMWExIDEgMCAwIDAtMSAxdjQ0YTEgMSAwIDAgMCAxIDFoMjlhMSAxIDAgMSAwIDAtMnoiLz48L3N2Zz4=",ge=Pt+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NjAgNDYwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0NjAgNDYwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNMjMwIDBDMTAyLjk3NSAwIDAgMTAyLjk3NSAwIDIzMHMxMDIuOTc1IDIzMCAyMzAgMjMwIDIzMC0xMDIuOTc0IDIzMC0yMzBTMzU3LjAyNSAwIDIzMCAwem0zOC4zMzMgMzc3LjM2YzAgOC42NzYtNy4wMzQgMTUuNzEtMTUuNzEgMTUuNzFoLTQzLjEwMWMtOC42NzYgMC0xNS43MS03LjAzNC0xNS43MS0xNS43MVYyMDIuNDc3YzAtOC42NzYgNy4wMzMtMTUuNzEgMTUuNzEtMTUuNzFoNDMuMTAxYzguNjc2IDAgMTUuNzEgNy4wMzMgMTUuNzEgMTUuNzFWMzc3LjM2ek0yMzAgMTU3Yy0yMS41MzkgMC0zOS0xNy40NjEtMzktMzlzMTcuNDYxLTM5IDM5LTM5IDM5IDE3LjQ2MSAzOSAzOS0xNy40NjEgMzktMzkgMzl6Ii8+PC9zdmc+",K=function(){function d(){}return d.createDefault=function(){return{hasPermission:!1,lastUsedCameraId:null}},d}(),qt=function(){function d(){this.data=K.createDefault();var h=localStorage.getItem(d.LOCAL_STORAGE_KEY);h?this.data=JSON.parse(h):this.reset()}return d.prototype.hasCameraPermissions=function(){return this.data.hasPermission},d.prototype.getLastUsedCameraId=function(){return this.data.lastUsedCameraId},d.prototype.setHasPermission=function(h){this.data.hasPermission=h,this.flush()},d.prototype.setLastUsedCameraId=function(h){this.data.lastUsedCameraId=h,this.flush()},d.prototype.resetLastUsedCameraId=function(){this.data.lastUsedCameraId=null,this.flush()},d.prototype.reset=function(){this.data=K.createDefault(),this.flush()},d.prototype.flush=function(){localStorage.setItem(d.LOCAL_STORAGE_KEY,JSON.stringify(this.data))},d.LOCAL_STORAGE_KEY="HTML5_QRCODE_DATA",d}(),pn=function(){function d(){this.infoDiv=document.createElement("div")}return d.prototype.renderInto=function(h){this.infoDiv.style.position="absolute",this.infoDiv.style.top="10px",this.infoDiv.style.right="10px",this.infoDiv.style.zIndex="2",this.infoDiv.style.display="none",this.infoDiv.style.padding="5pt",this.infoDiv.style.border="1px solid #171717",this.infoDiv.style.fontSize="10pt",this.infoDiv.style.background="rgb(0 0 0 / 69%)",this.infoDiv.style.borderRadius="5px",this.infoDiv.style.textAlign="center",this.infoDiv.style.fontWeight="400",this.infoDiv.style.color="white",this.infoDiv.innerText=De.poweredBy();var f=document.createElement("a");f.innerText="ScanApp",f.href="https://scanapp.org",f.target="new",f.style.color="white",this.infoDiv.appendChild(f);var A=document.createElement("br"),w=document.createElement("br");this.infoDiv.appendChild(A),this.infoDiv.appendChild(w);var x=document.createElement("a");x.innerText=De.reportIssues(),x.href="https://github.com/mebjas/html5-qrcode/issues",x.target="new",x.style.color="white",this.infoDiv.appendChild(x),h.appendChild(this.infoDiv)},d.prototype.show=function(){this.infoDiv.style.display="block"},d.prototype.hide=function(){this.infoDiv.style.display="none"},d}(),Jt=function(){function d(h,f){this.isShowingInfoIcon=!0,this.onTapIn=h,this.onTapOut=f,this.infoIcon=document.createElement("img")}return d.prototype.renderInto=function(h){var f=this;this.infoIcon.alt="Info icon",this.infoIcon.src=ge,this.infoIcon.style.position="absolute",this.infoIcon.style.top="4px",this.infoIcon.style.right="4px",this.infoIcon.style.opacity="0.6",this.infoIcon.style.cursor="pointer",this.infoIcon.style.zIndex="2",this.infoIcon.style.width="16px",this.infoIcon.style.height="16px",this.infoIcon.onmouseover=function(A){return f.onHoverIn()},this.infoIcon.onmouseout=function(A){return f.onHoverOut()},this.infoIcon.onclick=function(A){return f.onClick()},h.appendChild(this.infoIcon)},d.prototype.onHoverIn=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="1")},d.prototype.onHoverOut=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="0.6")},d.prototype.onClick=function(){this.isShowingInfoIcon?(this.isShowingInfoIcon=!1,this.onTapIn(),this.infoIcon.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAQgAAAEIBarqQRAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAE1SURBVDiNfdI7S0NBEAXgLya1otFgpbYSbISAgpXYi6CmiH9KCAiChaVga6OiWPgfRDQ+0itaGVNosXtluWwcuMzePfM4M3sq8lbHBubwg1dc4m1E/J/N4ghDPOIsfk/4xiEao5KX0McFljN4C9d4QTPXuY99jP3DsIoDPGM6BY5i5yI5R7O4q+ImFkJY2DCh3cAH2klyB+9J1xUMMAG7eCh1a+Mr+k48b5diXrFVwwLuS+BJ9MfR7+G0FHOHhTHhnXNWS87VDF4pcnfQK4Ep7XScNLmPTZgURNKKYENYWDpzW1BhscS1WHS8CDgURFJQrWcoF3c13KKbgg1BYQfy8xZWEzTTw1QZbAoKu8FqJnktdu5hcVSHmchiILzzuaDQvjBzV2m8yohCE1jHfPx/xhU+y4G/D75ELlRJsSYAAAAASUVORK5CYII=",this.infoIcon.style.opacity="1"):(this.isShowingInfoIcon=!0,this.onTapOut(),this.infoIcon.src=ge,this.infoIcon.style.opacity="0.6")},d}(),an=function(){function d(){var h=this;this.infoDiv=new pn,this.infoIcon=new Jt(function(){h.infoDiv.show()},function(){h.infoDiv.hide()})}return d.prototype.renderInto=function(h){this.infoDiv.renderInto(h),this.infoIcon.renderInto(h)},d}(),Mt=function(){function d(){}return d.hasPermissions=function(){return function(d,h,f,A){return new(f||(f=Promise))(function(x,y){function D(v){try{C(A.next(v))}catch(G){y(G)}}function F(v){try{C(A.throw(v))}catch(G){y(G)}}function C(v){v.done?x(v.value):function w(x){return x instanceof f?x:new f(function(y){y(x)})}(v.value).then(D,F)}C((A=A.apply(d,h||[])).next())})}(this,void 0,void 0,function(){var h,f,A,w;return function(d,h){var A,w,x,y,f={label:0,sent:function(){if(1&x[0])throw x[1];return x[1]},trys:[],ops:[]};return y={next:D(0),throw:D(1),return:D(2)},"function"==typeof Symbol&&(y[Symbol.iterator]=function(){return this}),y;function D(C){return function(v){return function F(C){if(A)throw new TypeError("Generator is already executing.");for(;y&&(y=0,C[0]&&(f=0)),f;)try{if(A=1,w&&(x=2&C[0]?w.return:C[0]?w.throw||((x=w.return)&&x.call(w),0):w.next)&&!(x=x.call(w,C[1])).done)return x;switch(w=0,x&&(C=[2&C[0],x.value]),C[0]){case 0:case 1:x=C;break;case 4:return f.label++,{value:C[1],done:!1};case 5:f.label++,w=C[1],C=[0];continue;case 7:C=f.ops.pop(),f.trys.pop();continue;default:if(!(x=(x=f.trys).length>0&&x[x.length-1])&&(6===C[0]||2===C[0])){f=0;continue}if(3===C[0]&&(!x||C[1]>x[0]&&C[1]<x[3])){f.label=C[1];break}if(6===C[0]&&f.label<x[1]){f.label=x[1],x=C;break}if(x&&f.label<x[2]){f.label=x[2],f.ops.push(C);break}x[2]&&f.ops.pop(),f.trys.pop();continue}
1C=h.call(d,f)}catch(v){C=[6,v],w=0}finally{A=x=0}if(5&C[0])throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}([C,v])}}}(this,function(x){switch(x.label){case 0:return[4,navigator.mediaDevices.enumerateDevices()];case 1:for(h=x.sent(),f=0,A=h;f<A.length;f++)if("videoinput"===(w=A[f]).kind&&w.label)return[2,!0];return[2,!1]}})})},d}(),Ue=function(){function d(h){this.supportedScanTypes=this.validateAndReturnScanTypes(h)}return d.prototype.getDefaultScanType=function(){return this.supportedScanTypes[0]},d.prototype.hasMoreThanOneScanType=function(){return this.supportedScanTypes.length>1},d.prototype.isCameraScanRequired=function(){for(var h=0,f=this.supportedScanTypes;h<f.length;h++)if(d.isCameraScanType(f[h]))return!0;return!1},d.isCameraScanType=function(h){return h===tt.SCAN_TYPE_CAMERA},d.isFileScanType=function(h){return h===tt.SCAN_TYPE_FILE},d.prototype.validateAndReturnScanTypes=function(h){if(!h||0===h.length)return He.DEFAULT_SUPPORTED_SCAN_TYPE;var f=He.DEFAULT_SUPPORTED_SCAN_TYPE.length;if(h.length>f)throw"Max ".concat(f," values expected for ")+"supportedScanTypes";for(var A=0,w=h;A<w.length;A++){var x=w[A];if(!He.DEFAULT_SUPPORTED_SCAN_TYPE.includes(x))throw"Unsupported scan type ".concat(x)}return h},d}(),ct=function(){function d(){}return d.ALL_ELEMENT_CLASS="html5-qrcode-element",d.CAMERA_PERMISSION_BUTTON_ID="html5-qrcode-button-camera-permission",d.CAMERA_START_BUTTON_ID="html5-qrcode-button-camera-start",d.CAMERA_STOP_BUTTON_ID="html5-qrcode-button-camera-stop",d.TORCH_BUTTON_ID="html5-qrcode-button-torch",d.CAMERA_SELECTION_SELECT_ID="html5-qrcode-select-camera",d.FILE_SELECTION_BUTTON_ID="html5-qrcode-button-file-selection",d.ZOOM_SLIDER_ID="html5-qrcode-input-range-zoom",d.SCAN_TYPE_CHANGE_ANCHOR_ID="html5-qrcode-anchor-scan-type-change",d.TORCH_BUTTON_CLASS_TORCH_ON="html5-qrcode-button-torch-on",d.TORCH_BUTTON_CLASS_TORCH_OFF="html5-qrcode-button-torch-off",d}(),ft=function(){function d(){}return d.createElement=function(h,f){var A=document.createElement(h);return A.id=f,A.classList.add(ct.ALL_ELEMENT_CLASS),"button"===h&&A.setAttribute("type","button"),A},d}(),Cn=function(d,h,f,A){return new(f||(f=Promise))(function(x,y){function D(v){try{C(A.next(v))}catch(G){y(G)}}function F(v){try{C(A.throw(v))}catch(G){y(G)}}function C(v){v.done?x(v.value):function w(x){return x instanceof f?x:new f(function(y){y(x)})}(v.value).then(D,F)}C((A=A.apply(d,h||[])).next())})},Ve=function(d,h){var A,w,x,y,f={label:0,sent:function(){if(1&x[0])throw x[1];return x[1]},trys:[],ops:[]};return y={next:D(0),throw:D(1),return:D(2)},"function"==typeof Symbol&&(y[Symbol.iterator]=function(){return this}),y;function D(C){return function(v){return function F(C){if(A)throw new TypeError("Generator is already executing.");for(;y&&(y=0,C[0]&&(f=0)),f;)try{if(A=1,w&&(x=2&C[0]?w.return:C[0]?w.throw||((x=w.return)&&x.call(w),0):w.next)&&!(x=x.call(w,C[1])).done)return x;switch(w=0,x&&(C=[2&C[0],x.value]),C[0]){case 0:case 1:x=C;break;case 4:return f.label++,{value:C[1],done:!1};case 5:f.label++,w=C[1],C=[0];continue;case 7:C=f.ops.pop(),f.trys.pop();continue;default:if(!(x=(x=f.trys).length>0&&x[x.length-1])&&(6===C[0]||2===C[0])){f=0;continue}if(3===C[0]&&(!x||C[1]>x[0]&&C[1]<x[3])){f.label=C[1];break}if(6===C[0]&&f.label<x[1]){f.label=x[1],x=C;break}if(x&&f.label<x[2]){f.label=x[2],f.ops.push(C);break}x[2]&&f.ops.pop(),f.trys.pop();continue}C=h.call(d,f)}catch(v){C=[6,v],w=0}finally{A=x=0}if(5&C[0])throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}([C,v])}}},W=function(){function d(h,f,A){this.isTorchOn=!1,this.torchCapability=h,this.buttonController=f,this.onTorchActionFailureCallback=A}return d.prototype.isTorchEnabled=function(){return this.isTorchOn},d.prototype.flipState=function(){return Cn(this,void 0,void 0,function(){var h,f;return Ve(this,function(A){switch(A.label){case 0:this.buttonController.disable(),h=!this.isTorchOn,A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this.torchCapability.apply(h)];case 2:return A.sent(),this.updateUiBasedOnLatestSettings(this.torchCapability.value(),h),[3,4];
1case 3:return f=A.sent(),this.propagateFailure(h,f),this.buttonController.enable(),[3,4];case 4:return[2]}})})},d.prototype.updateUiBasedOnLatestSettings=function(h,f){h===f?(this.buttonController.setText(f?he.torchOffButton():he.torchOnButton()),this.isTorchOn=f):this.propagateFailure(f),this.buttonController.enable()},d.prototype.propagateFailure=function(h,f){var A=h?he.torchOnFailedMessage():he.torchOffFailedMessage();f&&(A+="; Error = "+f),this.onTorchActionFailureCallback(A)},d.prototype.reset=function(){this.isTorchOn=!1},d}(),cn=function(){function d(h,f){this.onTorchActionFailureCallback=f,this.torchButton=ft.createElement("button",ct.TORCH_BUTTON_ID),this.torchController=new W(h,this,f)}return d.prototype.render=function(h,f){var A=this;this.torchButton.innerText=he.torchOnButton(),this.torchButton.style.display=f.display,this.torchButton.style.marginLeft=f.marginLeft;var w=this;this.torchButton.addEventListener("click",function(x){return Cn(A,void 0,void 0,function(){return Ve(this,function(y){switch(y.label){case 0:return[4,w.torchController.flipState()];case 1:return y.sent(),w.torchController.isTorchEnabled()?(w.torchButton.classList.remove(ct.TORCH_BUTTON_CLASS_TORCH_OFF),w.torchButton.classList.add(ct.TORCH_BUTTON_CLASS_TORCH_ON)):(w.torchButton.classList.remove(ct.TORCH_BUTTON_CLASS_TORCH_ON),w.torchButton.classList.add(ct.TORCH_BUTTON_CLASS_TORCH_OFF)),[2]}})})}),h.appendChild(this.torchButton)},d.prototype.updateTorchCapability=function(h){this.torchController=new W(h,this,this.onTorchActionFailureCallback)},d.prototype.getTorchButton=function(){return this.torchButton},d.prototype.hide=function(){this.torchButton.style.display="none"},d.prototype.show=function(){this.torchButton.style.display="inline-block"},d.prototype.disable=function(){this.torchButton.disabled=!0},d.prototype.enable=function(){this.torchButton.disabled=!1},d.prototype.setText=function(h){this.torchButton.innerText=h},d.prototype.reset=function(){this.torchButton.innerText=he.torchOnButton(),this.torchController.reset()},d.create=function(h,f,A,w){var x=new d(f,w);return x.render(h,A),x},d}(),be=function(){function d(h,f,A){this.fileBasedScanRegion=this.createFileBasedScanRegion(),this.fileBasedScanRegion.style.display=f?"block":"none",h.appendChild(this.fileBasedScanRegion);var w=document.createElement("label");w.setAttribute("for",this.getFileScanInputId()),w.style.display="inline-block",this.fileBasedScanRegion.appendChild(w),this.fileSelectionButton=ft.createElement("button",ct.FILE_SELECTION_BUTTON_ID),this.setInitialValueToButton(),this.fileSelectionButton.addEventListener("click",function(D){w.click()}),w.append(this.fileSelectionButton),this.fileScanInput=ft.createElement("input",this.getFileScanInputId()),this.fileScanInput.type="file",this.fileScanInput.accept="image/*",this.fileScanInput.style.display="none",w.appendChild(this.fileScanInput);var x=this;this.fileScanInput.addEventListener("change",function(D){if(null!=D&&null!=D.target){var F=D.target;if(!F.files||0!==F.files.length){var v=F.files[0];x.setImageNameToButton(v.name),A(v)}}});var y=this.createDragAndDropMessage();this.fileBasedScanRegion.appendChild(y),this.fileBasedScanRegion.addEventListener("dragenter",function(D){x.fileBasedScanRegion.style.border=x.fileBasedScanRegionActiveBorder(),D.stopPropagation(),D.preventDefault()}),this.fileBasedScanRegion.addEventListener("dragleave",function(D){x.fileBasedScanRegion.style.border=x.fileBasedScanRegionDefaultBorder(),D.stopPropagation(),D.preventDefault()}),this.fileBasedScanRegion.addEventListener("dragover",function(D){x.fileBasedScanRegion.style.border=x.fileBasedScanRegionActiveBorder(),D.stopPropagation(),D.preventDefault()}),this.fileBasedScanRegion.addEventListener("drop",function(D){D.stopPropagation(),D.preventDefault(),x.fileBasedScanRegion.style.border=x.fileBasedScanRegionDefaultBorder();var F=D.dataTransfer;if(F){var C=F.files;if(!C||0===C.length)return;for(var v=!1,G=0;G<C.length;++G){var xe=C.item(G);if(xe&&xe.type.match(/image.*/)){v=!0,x.setImageNameToButton(xe.name),A(xe),y.innerText=he.dragAndDropMessage();break}}v||(y.innerText=he.dragAndDropMessageOnlyImages())}})}return d.prototype.hide=function(){this.fileBasedScanRegion.style.display="none",this.fileScanInput.disabled=!0},d.prototype.show=function(){this.fileBasedScanRegion.style.display="block",this.fileScanInput.disabled=!1},d.prototype.isShowing=function(){return"block"===this.fileBasedScanRegion.style.display},d.prototype.resetValue=function(){this.fileScanInput.value="",this.setInitialValueToButton()},d.prototype.createFileBasedScanRegion=function(){var h=document.createElement("div");return h.style.textAlign="center",h.style.margin="auto",h.style.width="80%",h.style.maxWidth="600px",h.style.border=this.fileBasedScanRegionDefaultBorder(),h.style.padding="10px",h.style.marginBottom="10px",h},d.prototype.fileBasedScanRegionDefaultBorder=function(){return"6px dashed #ebebeb"},d.prototype.fileBasedScanRegionActiveBorder=function(){return"6px dashed rgb(153 151 151)"},d.prototype.createDragAndDropMessage=function(){var h=document.createElement("div");return h.innerText=he.dragAndDropMessage(),h.style.fontWeight="400",h},d.prototype.setImageNameToButton=function(h){if(h.length>20){var A=h.substring(0,8),w=h.length,x=h.substring(w-8,w);h="".concat(A,"....").concat(x)}var y=he.fileSelectionChooseAnother()+" - "+h;this.fileSelectionButton.innerText=y}
1,d.prototype.setInitialValueToButton=function(){var h=he.fileSelectionChooseImage()+" - "+he.fileSelectionNoImageSelected();this.fileSelectionButton.innerText=h},d.prototype.getFileScanInputId=function(){return"html5-qrcode-private-filescan-input"},d.create=function(h,f,A){return new d(h,f,A)},d}(),ze=function(){function d(h){this.selectElement=ft.createElement("select",ct.CAMERA_SELECTION_SELECT_ID),this.cameras=h,this.options=[]}return d.prototype.render=function(h){var f=document.createElement("span");f.style.marginRight="10px";var A=this.cameras.length;if(0===A)throw new Error("No cameras found");if(1===A)f.style.display="none";else{var w=he.selectCamera();f.innerText="".concat(w," (").concat(this.cameras.length,") ")}for(var x=1,y=0,D=this.cameras;y<D.length;y++){var F=D[y],C=F.id,v=null==F.label?C:F.label;(!v||""===v)&&(v=[he.anonymousCameraPrefix(),x++].join(" "));var G=document.createElement("option");G.value=C,G.innerText=v,this.options.push(G),this.selectElement.appendChild(G)}f.appendChild(this.selectElement),h.appendChild(f)},d.prototype.disable=function(){this.selectElement.disabled=!0},d.prototype.isDisabled=function(){return!0===this.selectElement.disabled},d.prototype.enable=function(){this.selectElement.disabled=!1},d.prototype.getValue=function(){return this.selectElement.value},d.prototype.hasValue=function(h){for(var f=0,A=this.options;f<A.length;f++)if(A[f].value===h)return!0;return!1},d.prototype.setValue=function(h){if(!this.hasValue(h))throw new Error("".concat(h," is not present in the camera list."));this.selectElement.value=h},d.prototype.hasSingleItem=function(){return 1===this.cameras.length},d.prototype.numCameras=function(){return this.cameras.length},d.create=function(h,f){var A=new d(f);return A.render(h),A},d}(),Gt=function(){function d(){this.onChangeCallback=null,this.zoomElementContainer=document.createElement("div"),this.rangeInput=ft.createElement("input",ct.ZOOM_SLIDER_ID),this.rangeInput.type="range",this.rangeText=document.createElement("span"),this.rangeInput.min="1",this.rangeInput.max="5",this.rangeInput.value="1",this.rangeInput.step="0.1"}return d.prototype.render=function(h,f){this.zoomElementContainer.style.display=f?"block":"none",this.zoomElementContainer.style.padding="5px 10px",this.zoomElementContainer.style.textAlign="center",h.appendChild(this.zoomElementContainer),this.rangeInput.style.display="inline-block",this.rangeInput.style.width="50%",this.rangeInput.style.height="5px",this.rangeInput.style.background="#d3d3d3",this.rangeInput.style.outline="none",this.rangeInput.style.opacity="0.7";var A=he.zoom();this.rangeText.innerText="".concat(this.rangeInput.value,"x ").concat(A),this.rangeText.style.marginRight="10px";var w=this;this.rangeInput.addEventListener("input",function(){return w.onValueChange()}),this.rangeInput.addEventListener("change",function(){return w.onValueChange()}),this.zoomElementContainer.appendChild(this.rangeInput),this.zoomElementContainer.appendChild(this.rangeText)},d.prototype.onValueChange=function(){var h=he.zoom();this.rangeText.innerText="".concat(this.rangeInput.value,"x ").concat(h),this.onChangeCallback&&this.onChangeCallback(parseFloat(this.rangeInput.value))},d.prototype.setValues=function(h,f,A,w){this.rangeInput.min=h.toString(),this.rangeInput.max=f.toString(),this.rangeInput.step=w.toString(),this.rangeInput.value=A.toString(),this.onValueChange()},d.prototype.show=function(){this.zoomElementContainer.style.display="block"},d.prototype.hide=function(){this.zoomElementContainer.style.display="none"},d.prototype.setOnCameraZoomValueChangeCallback=function(h){this.onChangeCallback=h},d.prototype.removeOnCameraZoomValueChangeCallback=function(){this.onChangeCallback=null},d.create=function(h,f){var A=new d;return A.render(h,f),A},d}(),nt=(()=>(function(d){d[d.STATUS_DEFAULT=0]="STATUS_DEFAULT",d[d.STATUS_SUCCESS=1]="STATUS_SUCCESS",d[d.STATUS_WARNING=2]="STATUS_WARNING",d[d.STATUS_REQUESTING_PERMISSION=3]="STATUS_REQUESTING_PERMISSION"}(nt||(nt={})),nt))();!function(){function d(h,f,A){if(this.lastMatchFound=null,this.cameraScanImage=null,this.fileScanImage=null,this.fileSelectionUi=null,this.elementId=h,this.config=this.createConfig(f),this.verbose=!0===A,!document.getElementById(h))throw"HTML Element with id=".concat(h," not found");
1this.scanTypeSelector=new Ue(this.config.supportedScanTypes),this.currentScanType=this.scanTypeSelector.getDefaultScanType(),this.sectionSwapAllowed=!0,this.logger=new Ce(this.verbose),this.persistedDataManager=new qt,!0!==f.rememberLastUsedCamera&&this.persistedDataManager.reset()}d.prototype.render=function(h,f){var A=this;this.lastMatchFound=null,this.qrCodeSuccessCallback=function(x,y){if(h)h(x,y);else{if(A.lastMatchFound===x)return;A.lastMatchFound=x,A.setHeaderMessage(he.lastMatch(x),nt.STATUS_SUCCESS)}},this.qrCodeErrorCallback=function(x,y){f&&f(x,y)};var w=document.getElementById(this.elementId);if(!w)throw"HTML Element with id=".concat(this.elementId," not found");w.innerHTML="",this.createBasicLayout(w),this.html5Qrcode=new wt(this.getScanRegionId(),function Ee(d,h){return{formatsToSupport:d.formatsToSupport,useBarCodeDetectorIfSupported:d.useBarCodeDetectorIfSupported,experimentalFeatures:d.experimentalFeatures,verbose:h}}(this.config,this.verbose))},d.prototype.pause=function(h){(We(h)||!0!==h)&&(h=!1),this.getHtml5QrcodeOrFail().pause(h)},d.prototype.resume=function(){this.getHtml5QrcodeOrFail().resume()},d.prototype.getState=function(){return this.getHtml5QrcodeOrFail().getState()},d.prototype.clear=function(){var h=this,f=function(){var A=document.getElementById(h.elementId);A&&(A.innerHTML="",h.resetBasicLayout(A))};return this.html5Qrcode?new Promise(function(A,w){h.html5Qrcode?h.html5Qrcode.isScanning?h.html5Qrcode.stop().then(function(x){h.html5Qrcode?(h.html5Qrcode.clear(),f(),A()):A()}).catch(function(x){h.verbose&&h.logger.logError("Unable to stop qrcode scanner",x),w(x)}):(h.html5Qrcode.clear(),f(),A()):A()}):Promise.resolve()},d.prototype.getRunningTrackCapabilities=function(){return this.getHtml5QrcodeOrFail().getRunningTrackCapabilities()},d.prototype.getRunningTrackSettings=function(){return this.getHtml5QrcodeOrFail().getRunningTrackSettings()},d.prototype.applyVideoConstraints=function(h){return this.getHtml5QrcodeOrFail().applyVideoConstraints(h)},d.prototype.getHtml5QrcodeOrFail=function(){if(!this.html5Qrcode)throw"Code scanner not initialized.";return this.html5Qrcode},d.prototype.createConfig=function(h){return h?(h.fps||(h.fps=He.SCAN_DEFAULT_FPS),h.rememberLastUsedCamera!==!He.DEFAULT_REMEMBER_LAST_CAMERA_USED&&(h.rememberLastUsedCamera=He.DEFAULT_REMEMBER_LAST_CAMERA_USED),h.supportedScanTypes||(h.supportedScanTypes=He.DEFAULT_SUPPORTED_SCAN_TYPE),h):{fps:He.SCAN_DEFAULT_FPS,rememberLastUsedCamera:He.DEFAULT_REMEMBER_LAST_CAMERA_USED,supportedScanTypes:He.DEFAULT_SUPPORTED_SCAN_TYPE}},d.prototype.createBasicLayout=function(h){h.style.position="relative",h.style.padding="0px",h.style.border="1px solid silver",this.createHeader(h);var f=document.createElement("div"),A=this.getScanRegionId();f.id=A,f.style.width="100%",f.style.minHeight="100px",f.style.textAlign="center",h.appendChild(f),Ue.isCameraScanType(this.currentScanType)?this.insertCameraScanImageToScanRegion():this.insertFileScanImageToScanRegion();var w=document.createElement("div"),x=this.getDashboardId();w.id=x,w.style.width="100%",h.appendChild(w),this.setupInitialDashboard(w)},d.prototype.resetBasicLayout=function(h){h.style.border="none"},d.prototype.setupInitialDashboard=function(h){this.createSection(h),this.createSectionControlPanel(),this.scanTypeSelector.hasMoreThanOneScanType()&&this.createSectionSwap()},d.prototype.createHeader=function(h){var f=document.createElement("div");f.style.textAlign="left",f.style.margin="0px",h.appendChild(f),(new an).renderInto(f);var w=document.createElement("div");w.id=this.getHeaderMessageContainerId(),w.style.display="none",w.style.textAlign="center",w.style.fontSize="14px",w.style.padding="2px 10px",w.style.margin="4px",w.style.borderTop="1px solid #f6f6f6",f.appendChild(w)},d.prototype.createSection=function(h){var f=document.createElement("div");f.id=this.getDashboardSectionId(),f.style.width="100%",f.style.padding="10px 0px 10px 0px",f.style.textAlign="left",h.appendChild(f)},d.prototype.createCameraListUi=function(h,f,A){var w=this;w.showHideScanTypeSwapLink(!1),w.setHeaderMessage(he.cameraPermissionRequesting());var x=function(){A||w.createPermissionButton(h,f)};wt.getCameras().then(function(y){w.persistedDataManager.setHasPermission(!0),w.showHideScanTypeSwapLink(!0),w.resetHeaderMessage(),y&&y.length>0?(h.removeChild(f),w.renderCameraSelection(y)):(w.setHeaderMessage(he.noCameraFound(),nt.STATUS_WARNING),x())}).catch(function(y){w.persistedDataManager.setHasPermission(!1),A?A.disabled=!1:x(),w.setHeaderMessage(y,nt.STATUS_WARNING),w.showHideScanTypeSwapLink(!0)})},d.prototype.createPermissionButton=function(h,f){var A=this,w=ft.createElement("button",this.getCameraPermissionButtonId());w.innerText=he.cameraPermissionTitle(),w.addEventListener("click",function(){w.disabled=!0,A.createCameraListUi(h,f,w)}),f.appendChild(w)},d.prototype.createPermissionsUi=function(h,f){var A=this;Ue.isCameraScanType(this.currentScanType)&&this.persistedDataManager.hasCameraPermissions()?Mt.hasPermissions().then(function(w){
1w?A.createCameraListUi(h,f):(A.persistedDataManager.setHasPermission(!1),A.createPermissionButton(h,f))}).catch(function(w){A.persistedDataManager.setHasPermission(!1),A.createPermissionButton(h,f)}):this.createPermissionButton(h,f)},d.prototype.createSectionControlPanel=function(){var h=document.getElementById(this.getDashboardSectionId()),f=document.createElement("div");h.appendChild(f);var A=document.createElement("div");A.id=this.getDashboardSectionCameraScanRegionId(),A.style.display=Ue.isCameraScanType(this.currentScanType)?"block":"none",f.appendChild(A);var w=document.createElement("div");w.style.textAlign="center",A.appendChild(w),this.scanTypeSelector.isCameraScanRequired()&&this.createPermissionsUi(A,w),this.renderFileScanUi(f)},d.prototype.renderFileScanUi=function(h){var f=Ue.isFileScanType(this.currentScanType),A=this;this.fileSelectionUi=be.create(h,f,function(x){if(!A.html5Qrcode)throw"html5Qrcode not defined";Ue.isFileScanType(A.currentScanType)&&(A.setHeaderMessage(he.loadingImage()),A.html5Qrcode.scanFileV2(x,!0).then(function(y){A.resetHeaderMessage(),A.qrCodeSuccessCallback(y.decodedText,y)}).catch(function(y){A.setHeaderMessage(y,nt.STATUS_WARNING),A.qrCodeErrorCallback(y,Qe.createFrom(y))}))})},d.prototype.renderCameraSelection=function(h){var f=this,A=this,w=document.getElementById(this.getDashboardSectionCameraScanRegionId());w.style.textAlign="center";var x=Gt.create(w,!1),D=ze.create(w,h),F=document.createElement("span"),C=ft.createElement("button",ct.CAMERA_START_BUTTON_ID);C.innerText=he.scanButtonStartScanningText(),F.appendChild(C);var G,v=ft.createElement("button",ct.CAMERA_STOP_BUTTON_ID);v.innerText=he.scanButtonStopScanningText(),v.style.display="none",v.disabled=!0,F.appendChild(v),w.appendChild(F);var Ie=function(Me){Me||(C.style.display="none"),C.innerText=he.scanButtonStartScanningText(),C.style.opacity="1",C.disabled=!1,Me&&(C.style.display="inline-block")};if(C.addEventListener("click",function(Me){C.innerText=he.scanButtonScanningStarting(),D.disable(),C.disabled=!0,C.style.opacity="0.5",f.scanTypeSelector.hasMoreThanOneScanType()&&A.showHideScanTypeSwapLink(!1),A.resetHeaderMessage();var Pe=D.getValue();A.persistedDataManager.setLastUsedCameraId(Pe),A.html5Qrcode.start(Pe,function En(d){return{fps:d.fps,qrbox:d.qrbox,aspectRatio:d.aspectRatio,disableFlip:d.disableFlip,videoConstraints:d.videoConstraints}}(A.config),A.qrCodeSuccessCallback,A.qrCodeErrorCallback).then(function(Fe){v.disabled=!1,v.style.display="inline-block",Ie(!1);var Ot=A.html5Qrcode.getRunningTrackCameraCapabilities();!0===f.config.showTorchButtonIfSupported&&function(Me){Me.torchFeature().isSupported()?(G?G.updateTorchCapability(Me.torchFeature()):G=cn.create(F,Me.torchFeature(),{display:"none",marginLeft:"5px"},function(Pe){A.setHeaderMessage(Pe,nt.STATUS_WARNING)}),G.show()):G&&G.hide()}(Ot),!0===f.config.showZoomSliderIfSupported&&function(Me){var Pe=Me.zoomFeature();if(Pe.isSupported()){x.setOnCameraZoomValueChangeCallback(function(Ot){Pe.apply(Ot)});var Fe=1;f.config.defaultZoomValueIfSupported&&(Fe=f.config.defaultZoomValueIfSupported),Fe=function we(d,h,f){return d>f?f:d<h?h:d}(Fe,Pe.min(),Pe.max()),x.setValues(Pe.min(),Pe.max(),Fe,Pe.step()),x.show()}}(Ot)}).catch(function(Fe){A.showHideScanTypeSwapLink(!0),D.enable(),Ie(!0),A.setHeaderMessage(Fe,nt.STATUS_WARNING)})}),D.hasSingleItem()&&C.click(),v.addEventListener("click",function(Me){if(!A.html5Qrcode)throw"html5Qrcode not defined";v.disabled=!0,A.html5Qrcode.stop().then(function(Pe){f.scanTypeSelector.hasMoreThanOneScanType()&&A.showHideScanTypeSwapLink(!0),D.enable(),C.disabled=!1,v.style.display="none",C.style.display="inline-block",G&&(G.reset(),G.hide()),x.removeOnCameraZoomValueChangeCallback(),x.hide(),A.insertCameraScanImageToScanRegion()}).catch(function(Pe){v.disabled=!1,A.setHeaderMessage(Pe,nt.STATUS_WARNING)})}),A.persistedDataManager.getLastUsedCameraId()){var Y=A.persistedDataManager.getLastUsedCameraId();D.hasValue(Y)?(D.setValue(Y),C.click()):A.persistedDataManager.resetLastUsedCameraId()}},d.prototype.createSectionSwap=function(){var h=this,f=he.textIfCameraScanSelected(),A=he.textIfFileScanSelected(),w=document.getElementById(this.getDashboardSectionId()),x=document.createElement("div");x.style.textAlign="center";var y=ft.createElement("span",this.getDashboardSectionSwapLinkId());y.style.textDecoration="underline",y.style.cursor="pointer",y.innerText=Ue.isCameraScanType(this.currentScanType)?f:A,y.addEventListener("click",function(){h.sectionSwapAllowed?(h.resetHeaderMessage(),h.fileSelectionUi.resetValue(),h.sectionSwapAllowed=!1,Ue.isCameraScanType(h.currentScanType)?(h.clearScanRegion(),h.getCameraScanRegion().style.display="none",h.fileSelectionUi.show(),y.innerText=A,h.currentScanType=tt.SCAN_TYPE_FILE,h.insertFileScanImageToScanRegion()):(h.clearScanRegion(),h.getCameraScanRegion().style.display="block",h.fileSelectionUi.hide(),y.innerText=f,h.currentScanType=tt.SCAN_TYPE_CAMERA,h.insertCameraScanImageToScanRegion(),h.startCameraScanIfPermissionExistsOnSwap()),h.sectionSwapAllowed=!0):h.verbose&&h.logger.logError("Section swap called when not allowed")}),x.appendChild(y),w.appendChild(x)},d.prototype.startCameraScanIfPermissionExistsOnSwap=function(){var h=this,f=this;this.persistedDataManager.hasCameraPermissions()&&Mt.hasPermissions().then(function(A){if(A){var w=document.getElementById(f.getCameraPermissionButtonId());if(!w)throw h.logger.logError("Permission button not found, fail;"),"Permission button not found";w.click()}else f.persistedDataManager.setHasPermission(!1)}).catch(function(A){f.persistedDataManager.setHasPermission(!1)})},d.prototype.resetHeaderMessage=function(){document.getElementById(this.getHeaderMessageContainerId()).style.display="none"},d.prototype.setHeaderMessage=function(h,f){f||(f=nt.STATUS_DEFAULT);var A=this.getHeaderMessageDiv();switch(A.innerText=h,A.style.display="block",f){case nt.STATUS_SUCCESS:A.style.background="rgba(106, 175, 80, 0.26)",A.style.color="#477735";break;case nt.STATUS_WARNING:A.style.background="rgba(203, 36, 49, 0.14)",A.style.color="#cb2431";break;default:A.style.background="rgba(0, 0, 0, 0)",A.style.color="rgb(17, 17, 17)"}},d.prototype.showHideScanTypeSwapLink=function(h){this.scanTypeSelector.hasMoreThanOneScanType()&&(!0!==h&&(h=!1),this.sectionSwapAllowed=h,this.getDashboardSectionSwapLink().style.display=h?"inline-block":"none")},d.prototype.insertCameraScanImageToScanRegion=function(){var h=this,f=document.getElementById(this.getScanRegionId());if(this.cameraScanImage)return f.innerHTML="<br>",void f.appendChild(this.cameraScanImage);this.cameraScanImage=new Image,this.cameraScanImage.onload=function(A){f.innerHTML="<br>",f.appendChild(h.cameraScanImage)},this.cameraScanImage.width=64,this.cameraScanImage.style.opacity="0.8",this.cameraScanImage.src=Ke,this.cameraScanImage.alt=he.cameraScanAltText()},d.prototype.insertFileScanImageToScanRegion=function(){var h=this,f=document.getElementById(this.getScanRegionId());if(this.fileScanImage)return f.innerHTML="<br>",void f.appendChild(this.fileScanImage);this.fileScanImage=new Image,this.fileScanImage.onload=function(A){f.innerHTML="<br>",f.appendChild(h.fileScanImage)},this.fileScanImage.width=64,this.fileScanImage.style.opacity="0.8",this.fileScanImage.src=on,this.fileScanImage.alt=he.fileScanAltText()},d.prototype.clearScanRegion=function(){document.getElementById(this.getScanRegionId()).innerHTML=""},d.prototype.getDashboardSectionId=function(){return"".concat(this.elementId,"__dashboard_section")},d.prototype.getDashboardSectionCameraScanRegionId=function(){return"".concat(this.elementId,"__dashboard_section_csr")},d.prototype.getDashboardSectionSwapLinkId=function(){return ct.SCAN_TYPE_CHANGE_ANCHOR_ID},d.prototype.getScanRegionId=function(){return"".concat(this.elementId,"__scan_regi
1on")},d.prototype.getDashboardId=function(){return"".concat(this.elementId,"__dashboard")},d.prototype.getHeaderMessageContainerId=function(){return"".concat(this.elementId,"__header_message")},d.prototype.getCameraPermissionButtonId=function(){return ct.CAMERA_PERMISSION_BUTTON_ID},d.prototype.getCameraScanRegion=function(){return document.getElementById(this.getDashboardSectionCameraScanRegionId())},d.prototype.getDashboardSectionSwapLink=function(){return document.getElementById(this.getDashboardSectionSwapLinkId())},d.prototype.getHeaderMessageDiv=function(){return document.getElementById(this.getHeaderMessageContainerId())}}()},52:function(Zt,pt){!function(M){"use strict";function T(l){return null==l}var j=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,e){l.__proto__=e}||function(l,e){for(var t in e)e.hasOwnProperty(t)&&(l[t]=e[t])};var He=function(l){function e(t){var n=this.constructor,r=l.call(this,t)||this;return Object.defineProperty(r,"name",{value:n.name,enumerable:!1}),function ut(l,e){var t=Object.setPrototypeOf;t?t(l,e):l.__proto__=e}(r,n.prototype),function tt(l,e){void 0===e&&(e=l.constructor);var t=Error.captureStackTrace;t&&t(l,e)}(r),r}return function rt(l,e){function t(){this.constructor=l}j(l,e),l.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}(e,l),e}(Error);let de=(()=>{class l extends He{constructor(t){super(t),this.message=t}getKind(){return this.constructor.kind}}return l.kind="Exception",l})(),Ae=(()=>{class l extends de{}return l.kind="ArgumentException",l})(),Z=(()=>{class l extends de{}return l.kind="IllegalArgumentException",l})();class Qe{constructor(e){if(this.binarizer=e,null===e)throw new Z("Binarizer must be non-null.")}getWidth(){return this.binarizer.getWidth()}getHeight(){return this.binarizer.getHeight()}getBlackRow(e,t){return this.binarizer.getBlackRow(e,t)}getBlackMatrix(){return null==this.matrix&&(this.matrix=this.binarizer.getBlackMatrix()),this.matrix}isCropSupported(){return this.binarizer.getLuminanceSource().isCropSupported()}crop(e,t,n,r){const i=this.binarizer.getLuminanceSource().crop(e,t,n,r);return new Qe(this.binarizer.createBinarizer(i))}isRotateSupported(){return this.binarizer.getLuminanceSource().isRotateSupported()}rotateCounterClockwise(){const e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new Qe(this.binarizer.createBinarizer(e))}rotateCounterClockwise45(){const e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new Qe(this.binarizer.createBinarizer(e))}toString(){try{return this.getBlackMatrix().toString()}catch{return""}}}let Ce=(()=>{class l extends de{static getChecksumInstance(){return new l}}return l.kind="ChecksumException",l})();class We{constructor(e){this.source=e}getLuminanceSource(){return this.source}getWidth(){return this.source.getWidth()}getHeight(){return this.source.getHeight()}}class we{static arraycopy(e,t,n,r,i){for(;i--;)n[r++]=e[t++]}static currentTimeMillis(){return Date.now()}}let ht=(()=>{class l extends de{}return l.kind="IndexOutOfBoundsException",l})(),he=(()=>{class l extends ht{constructor(t,n){super(n),this.index=t,this.message=n}}return l.kind="ArrayIndexOutOfBoundsException",l})();class De{static fill(e,t){for(let n=0,r=e.length;n<r;n++)e[n]=t}static fillWithin(e,t,n,r){De.rangeCheck(e.length,t,n);for(let i=t;i<n;i++)e[i]=r}static rangeCheck(e,t,n){if(t>n)throw new Z("fromIndex("+t+") > toIndex("+n+")");if(t<0)throw new he(t);if(n>e)throw new he(n)}static asList(...e){return e}static create(e,t,n){return Array.from({length:e}).map(i=>Array.from({length:t}).fill(n))}static createInt32Array(e,t,n){return Array.from({length:e}).map(i=>Int32Array.from({length:t}).fill(n))}static equals(e,t){if(!(e&&t&&e.length&&t.length&&e.length===t.length))return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}static hashCode(e){if(null===e)return 0;let t=1;for(const n of e)t=31*t+n;return t}static fillUint8Array(e,t){for(let n=0;n!==e.length;n++)e[n]=t}static copyOf(e,t){return e.slice(0,t)}static copyOfUint8Array(e,t){if(e.length<=t){const n=new Uint8Array(t);return n.set(e),n}return e.slice(0,t)}static copyOfRange(e,t,n){const r=n-t,i=new Int32Array(r);return we.arraycopy(e,t,i,0,r),i}
1static binarySearch(e,t,n){void 0===n&&(n=De.numberComparator);let r=0,i=e.length-1;for(;r<=i;){const s=i+r>>1,o=n(t,e[s]);if(o>0)r=s+1;else{if(!(o<0))return s;i=s-1}}return-r-1}static numberComparator(e,t){return e-t}}class ie{static numberOfTrailingZeros(e){let t;if(0===e)return 32;let n=31;return t=e<<16,0!==t&&(n-=16,e=t),t=e<<8,0!==t&&(n-=8,e=t),t=e<<4,0!==t&&(n-=4,e=t),t=e<<2,0!==t&&(n-=2,e=t),n-(e<<1>>>31)}static numberOfLeadingZeros(e){if(0===e)return 32;let t=1;return e>>>16||(t+=16,e<<=16),e>>>24||(t+=8,e<<=8),e>>>28||(t+=4,e<<=4),e>>>30||(t+=2,e<<=2),t-=e>>>31,t}static toHexString(e){return e.toString(16)}static toBinaryString(e){return String(parseInt(String(e),2))}static bitCount(e){return e=(e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135,63&(e+=e>>>8)+(e>>>16)}static truncDivision(e,t){return Math.trunc(e/t)}static parseInt(e,t){return parseInt(e,t)}}ie.MIN_VALUE_32_BITS=-2147483648,ie.MAX_VALUE=Number.MAX_SAFE_INTEGER;class ${constructor(e,t){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=null==t?$.makeArray(e):t)}getSize(){return this.size}getSizeInBytes(){return Math.floor((this.size+7)/8)}ensureCapacity(e){if(e>32*this.bits.length){const t=$.makeArray(e);we.arraycopy(this.bits,0,t,0,this.bits.length),this.bits=t}}get(e){return 0!=(this.bits[Math.floor(e/32)]&1<<(31&e))}set(e){this.bits[Math.floor(e/32)]|=1<<(31&e)}flip(e){this.bits[Math.floor(e/32)]^=1<<(31&e)}getNextSet(e){const t=this.size;if(e>=t)return t;const n=this.bits;let r=Math.floor(e/32),i=n[r];i&=~((1<<(31&e))-1);const s=n.length;for(;0===i;){if(++r===s)return t;i=n[r]}const o=32*r+ie.numberOfTrailingZeros(i);return o>t?t:o}getNextUnset(e){const t=this.size;if(e>=t)return t;const n=this.bits;let r=Math.floor(e/32),i=~n[r];i&=~((1<<(31&e))-1);const s=n.length;for(;0===i;){if(++r===s)return t;i=~n[r]}const o=32*r+ie.numberOfTrailingZeros(i);return o>t?t:o}setBulk(e,t){this.bits[Math.floor(e/32)]=t}setRange(e,t){if(t<e||e<0||t>this.size)throw new Z;if(t===e)return;t--;const n=Math.floor(e/32),r=Math.floor(t/32),i=this.bits;for(let s=n;s<=r;s++)i[s]|=(2<<(s<r?31:31&t))-(1<<(s>n?0:31&e))}clear(){const e=this.bits.length,t=this.bits;for(let n=0;n<e;n++)t[n]=0}isRange(e,t,n){if(t<e||e<0||t>this.size)throw new Z;if(t===e)return!0;t--;const r=Math.floor(e/32),i=Math.floor(t/32),s=this.bits;for(let o=r;o<=i;o++){const u=(2<<(o<i?31:31&t))-(1<<(o>r?0:31&e))&4294967295;if((s[o]&u)!==(n?u:0))return!1}return!0}appendBit(e){this.ensureCapacity(this.size+1),e&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++}appendBits(e,t){if(t<0||t>32)throw new Z("Num bits must be between 0 and 32");this.ensureCapacity(this.size+t);for(let n=t;n>0;n--)this.appendBit(1==(e>>n-1&1))}appendBitArray(e){const t=e.size;this.ensureCapacity(this.size+t);for(let n=0;n<t;n++)this.appendBit(e.get(n))}xor(e){if(this.size!==e.size)throw new Z("Sizes don't match");const t=this.bits;for(let n=0,r=t.length;n<r;n++)t[n]^=e.bits[n]}toBytes(e,t,n,r){for(let i=0;i<r;i++){let s=0;for(let o=0;o<8;o++)this.get(e)&&(s|=1<<7-o),e++;t[n+i]=s}}getBitArray(){return this.bits}reverse(){const e=new Int32Array(this.bits.length),t=Math.floor((this.size-1)/32),n=t+1,r=this.bits;for(let i=0;i<n;i++){let s=r[i];s=s>>1&1431655765|(1431655765&s)<<1,s=s>>2&858993459|(858993459&s)<<2,s=s>>4&252645135|(252645135&s)<<4,s=s>>8&16711935|(16711935&s)<<8,s=s>>16&65535|(65535&s)<<16,e[t-i]=s}if(this.size!==32*n){const i=32*n-this.size;let s=e[0]>>>i;for(let o=1;o<n;o++){const a=e[o];s|=a<<32-i,e[o-1]=s,s=a>>>i}e[n-1]=s}this.bits=e}static makeArray(e){return new Int32Array(Math.floor((e+31)/32))}equals(e){return e instanceof $&&this.size===e.size&&De.equals(this.bits,e.bits)}hashCode(){return 31*this.size+De.hashCode(this.bits)}toString(){let e="";for(let t=0,n=this.size;t<n;t++)7&t||(e+=" "),e+=this.get(t)?"X":".";return e}clone(){return new $(this.size,this.bits.slice())}}var _t=(()=>{return(l=_t||(_t={}))[l.OTHER=0]="OTHER",l[l.PURE_BARCODE=1]="PURE_BARCODE",l[l.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",l[l.TRY_HARDER=3]="TRY_HARDER",l[l.CHARACTER_SET=4]="CHARACTER_SET",l[l.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",l[l.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",l[l.ASSUME_GS1=7]="ASSUME_GS1",l[l.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",l[l.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",l[l.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS",_t;var l})(),Se=_t;let P=(()=>{class l extends de{static getFormatInstance(){return new l}}return l.kind="FormatException",l})();var re=(()=>{return(l=re||(re={}))[l.Cp437=0]="Cp437",l[l.ISO8859_1=1]="ISO8859_1",l[l.ISO8859_2=2]="ISO8859_2",l[l.ISO8859_3=3]="ISO8859_3",l[l.ISO8859_4
1=4]="ISO8859_4",l[l.ISO8859_5=5]="ISO8859_5",l[l.ISO8859_6=6]="ISO8859_6",l[l.ISO8859_7=7]="ISO8859_7",l[l.ISO8859_8=8]="ISO8859_8",l[l.ISO8859_9=9]="ISO8859_9",l[l.ISO8859_10=10]="ISO8859_10",l[l.ISO8859_11=11]="ISO8859_11",l[l.ISO8859_13=12]="ISO8859_13",l[l.ISO8859_14=13]="ISO8859_14",l[l.ISO8859_15=14]="ISO8859_15",l[l.ISO8859_16=15]="ISO8859_16",l[l.SJIS=16]="SJIS",l[l.Cp1250=17]="Cp1250",l[l.Cp1251=18]="Cp1251",l[l.Cp1252=19]="Cp1252",l[l.Cp1256=20]="Cp1256",l[l.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",l[l.UTF8=22]="UTF8",l[l.ASCII=23]="ASCII",l[l.Big5=24]="Big5",l[l.GB18030=25]="GB18030",l[l.EUC_KR=26]="EUC_KR",re;var l})();class L{constructor(e,t,n,...r){this.valueIdentifier=e,this.name=n,this.values="number"==typeof t?Int32Array.from([t]):t,this.otherEncodingNames=r,L.VALUE_IDENTIFIER_TO_ECI.set(e,this),L.NAME_TO_ECI.set(n,this);const i=this.values;for(let s=0,o=i.length;s!==o;s++)L.VALUES_TO_ECI.set(i[s],this);for(const s of r)L.NAME_TO_ECI.set(s,this)}getValueIdentifier(){return this.valueIdentifier}getName(){return this.name}getValue(){return this.values[0]}static getCharacterSetECIByValue(e){if(e<0||e>=900)throw new P("incorect value");const t=L.VALUES_TO_ECI.get(e);if(void 0===t)throw new P("incorect value");return t}static getCharacterSetECIByName(e){const t=L.NAME_TO_ECI.get(e);if(void 0===t)throw new P("incorect value");return t}equals(e){if(!(e instanceof L))return!1;const t=e;return this.getName()===t.getName()}}L.VALUE_IDENTIFIER_TO_ECI=new Map,L.VALUES_TO_ECI=new Map,L.NAME_TO_ECI=new Map,L.Cp437=new L(re.Cp437,Int32Array.from([0,2]),"Cp437"),L.ISO8859_1=new L(re.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),L.ISO8859_2=new L(re.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),L.ISO8859_3=new L(re.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),L.ISO8859_4=new L(re.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),L.ISO8859_5=new L(re.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),L.ISO8859_6=new L(re.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),L.ISO8859_7=new L(re.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),L.ISO8859_8=new L(re.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),L.ISO8859_9=new L(re.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),L.ISO8859_10=new L(re.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),L.ISO8859_11=new L(re.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),L.ISO8859_13=new L(re.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),L.ISO8859_14=new L(re.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),L.ISO8859_15=new L(re.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),L.ISO8859_16=new L(re.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),L.SJIS=new L(re.SJIS,20,"SJIS","Shift_JIS"),L.Cp1250=new L(re.Cp1250,21,"Cp1250","windows-1250"),L.Cp1251=new L(re.Cp1251,22,"Cp1251","windows-1251"),L.Cp1252=new L(re.Cp1252,23,"Cp1252","windows-1252"),L.Cp1256=new L(re.Cp1256,24,"Cp1256","windows-1256"),L.UnicodeBigUnmarked=new L(re.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),L.UTF8=new L(re.UTF8,26,"UTF8","UTF-8"),L.ASCII=new L(re.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),L.Big5=new L(re.Big5,28,"Big5"),L.GB18030=new L(re.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),L.EUC_KR=new L(re.EUC_KR,30,"EUC_KR","EUC-KR");let Be=(()=>{class l extends de{}return l.kind="UnsupportedOperationException",l})();class Le{static decode(e,t){const n=this.encodingName(t);return this.customDecoder?this.customDecoder(e,n):typeof TextDecoder>"u"||this.shouldDecodeOnFallback(n)?this.decodeFallback(e,n):new TextDecoder(n).decode(e)}static shouldDecodeOnFallback(e){return!Le.isBrowser()&&"ISO-8859-1"===e}static encode(e,t){const n=this.encodingName(t);return this.customEncoder?this.customEncoder(e,n):typeof TextEncoder>"u"?this.encodeFallback(e):(new TextEncoder).encode(e)}static isBrowser(){return typeof window<"u"&&"[object Window]"==={}.toString.call(window)}static encodingName(e){return"string"==typeof e?e:e.getName()}static encodingCharacterSet(e){return e instanceof L?e:L.getCharacterSetECIByName(e)}static decodeFallback(e,t){const n=this.encodingCharacterSet(t);if(Le.isDecodeFallbackSupported(n)){let r="";for(let i=0,s=e.length;i<s;i++){let o=e[i].toString(16);o.length<2&&(o="0"+o),r+="%"+o}return decodeURIComponent(r)}if(n.equals(L.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Be(`Encoding ${this.encodingName(t)} not supported by fallback.`)}static isDecodeFallbackSupported(e){return e.equals(L.UTF8)||e.equals(L.ISO8859_1)||e.equals(L.ASCII)}static encodeFallback(e){const n=btoa(unescape(encodeURIComponent(e))).split(""),r=[];for(let i=0;i<n.length;
vendor: 9,690 bytes, line 1
1i++)r.push(n[i].charCodeAt(0));return new Uint8Array(r)}}class q{static castAsNonUtf8Char(e,t=null){const n=t?t.getName():this.ISO88591;return Le.decode(new Uint8Array([e]),n)}static guessEncoding(e,t){if(null!=t&&void 0!==t.get(Se.CHARACTER_SET))return t.get(Se.CHARACTER_SET).toString();const n=e.length;let r=!0,i=!0,s=!0,o=0,a=0,c=0,u=0,g=0,p=0,m=0,I=0,S=0,b=0,_=0;const z=e.length>3&&239===e[0]&&187===e[1]&&191===e[2];for(let X=0;X<n&&(r||i||s);X++){const B=255&e[X];s&&(o>0?128&B?o--:s=!1:128&B&&(64&B?(o++,32&B?(o++,16&B?(o++,8&B?s=!1:u++):c++):a++):s=!1)),r&&(B>127&&B<160?r=!1:B>159&&(B<192||215===B||247===B)&&_++),i&&(g>0?B<64||127===B||B>252?i=!1:g--:128===B||160===B||B>239?i=!1:B>160&&B<224?(p++,I=0,m++,m>S&&(S=m)):B>127?(g++,m=0,I++,I>b&&(b=I)):(m=0,I=0))}return s&&o>0&&(s=!1),i&&g>0&&(i=!1),s&&(z||a+c+u>0)?q.UTF8:i&&(q.ASSUME_SHIFT_JIS||S>=3||b>=3)?q.SHIFT_JIS:r&&i?2===S&&2===p||10*_>=n?q.SHIFT_JIS:q.ISO88591:r?q.ISO88591:i?q.SHIFT_JIS:s?q.UTF8:q.PLATFORM_DEFAULT_ENCODING}static format(e,...t){let n=-1;return e.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,function r(s,o,a,c,u,g){if("%%"===s)return"%";if(void 0===t[++n])return;s=c?parseInt(c.substr(1)):void 0;let m,p=u?parseInt(u.substr(1)):void 0;switch(g){case"s":m=t[n];break;case"c":m=t[n][0];break;case"f":m=parseFloat(t[n]).toFixed(s);break;case"p":m=parseFloat(t[n]).toPrecision(s);break;case"e":m=parseFloat(t[n]).toExponential(s);break;case"x":m=parseInt(t[n]).toString(p||16);break;case"d":m=parseFloat(parseInt(t[n],p||10).toPrecision(s)).toFixed(0)}m="object"==typeof m?JSON.stringify(m):(+m).toString(p);let I=parseInt(a),S=a&&a[0]+""=="0"?"0":" ";for(;m.length<I;)m=void 0!==o?m+S:S+m;return m})}static getBytes(e,t){return Le.encode(e,t)}static getCharCode(e,t=0){return e.charCodeAt(t)}static getCharAt(e){return String.fromCharCode(e)}}q.SHIFT_JIS=L.SJIS.getName(),q.GB2312="GB2312",q.ISO88591=L.ISO8859_1.getName(),q.EUC_JP="EUC_JP",q.UTF8=L.UTF8.getName(),q.PLATFORM_DEFAULT_ENCODING=q.UTF8,q.ASSUME_SHIFT_JIS=!1;class fe{constructor(e=""){this.value=e}enableDecoding(e){return this.encoding=e,this}append(e){return this.value+="string"==typeof e?e.toString():this.encoding?q.castAsNonUtf8Char(e,this.encoding):String.fromCharCode(e),this}appendChars(e,t,n){for(let r=t;t<t+n;r++)this.append(e[r]);return this}length(){return this.value.length}charAt(e){return this.value.charAt(e)}deleteCharAt(e){this.value=this.value.substr(0,e)+this.value.substring(e+1)}setCharAt(e,t){this.value=this.value.substr(0,e)+t+this.value.substr(e+1)}substring(e,t){return this.value.substring(e,t)}setLengthToZero(){this.value=""}toString(){return this.value}insert(e,t){this.value=this.value.substr(0,e)+t+this.value.substr(e+t.length)}}class _e{constructor(e,t,n,r){if(this.width=e,this.height=t,this.rowSize=n,this.bits=r,null==t&&(t=e),this.height=t,e<1||t<1)throw new Z("Both dimensions must be greater than 0");null==n&&(n=Math.floor((e+31)/32)),this.rowSize=n,null==r&&(this.bits=new Int32Array(this.rowSize*this.height))}static parseFromBooleanArray(e){const t=e.length,n=e[0].length,r=new _e(n,t);for(let i=0;i<t;i++){const s=e[i];for(let o=0;o<n;o++)s[o]&&r.set(o,i)}return r}static parseFromString(e,t,n){if(null===e)throw new Z("stringRepresentation cannot be null");const r=new Array(e.length);let i=0,s=0,o=-1,a=0,c=0;for(;c<e.length;)if("\n"===e.charAt(c)||"\r"===e.charAt(c)){if(i>s){if(-1===o)o=i-s;else if(i-s!==o)throw new Z("row lengths do not match");s=i,a++}c++}else if(e.substring(c,c+t.length)===t)c+=t.length,r[i]=!0,i++;else{if(e.substring(c,c+n.length)!==n)throw new Z("illegal character encountered: "+e.substring(c));c+=n.length,r[i]=!1,i++}if(i>s){if(-1===o)o=i-s;else if(i-s!==o)throw new Z("row lengths do not match");a++}const u=new _e(o,a);for(let g=0;g<i;g++)r[g]&&u.set(Math.floor(g%o),Math.floor(g/o));return u}get(e,t){const n=t*this.rowSize+Math.floor(e/32);return 0!=(this.bits[n]>>>(31&e)&1)}set(e,t){const n=t*this.rowSize+Math.floor(e/32);this.bits[n]|=1<<(31&e)&4294967295}unset(e,t){const n=t*this.rowSize+Math.floor(e/32);this.bits[n]&=~(1<<(31&e)&4294967295)}flip(e,t){const n=t*this.rowSize+Math.floor(e/32);this.bits[n]^=1<<(31&e)&4294967295}xor(e){if(this.width!==e.getWidth()||this.height!==e.getHeight()||this.rowSize!==e.getRowSize())throw new Z("input matrix dimensions do not match");const t=new $(Math.floor(this.width/32)+1),n=this.rowSize,r=this.bits;for(let i=0,s=this.height;i<s;i++){const o=i*n,a=e.getRow(i,t).getBitArray();for(let c=0;c<n;c++)r[o+c]^=a[c]}}clear(){const e=this.bits,t=e.length;for(let n=0;n<t;n++)e[n]=0}setRegion(e,t,n,r){if(t<0||e<0)throw new Z("Left and top must be nonnegative");if(r<1||n<1)throw new Z("Height and width must be at least 1");const i=e+n,s=t+r;if(s>this.height||i>this.width)throw new Z("The region must fit inside the matrix");const o=this.rowSize,a=this.bits;for(let c=t;c<s;c++){const u=c*o;for(let g=e;g<i;g++)a[u+Math.floor(g/32)]|=1<<(31&g)&4294967295}}getRow(e,t){null==t||t.getSize()<this.width?t=new $(this.width):t.clear();const n=this.rowSize,r=this.bits,i=e*n;for(let s=0;s<n;s++)t.setBulk(32*s,r[i+s]);return t}setRow(e,t){we.arraycopy(t.getBitArray(),0,this.bits,e*this.rowSize,this.rowSize)}rotate180(){const e=this.getWidth(),t=this.getHeight();let n=new $(e),r=new $(e);for(let i=0,s=Math.floor((t+1)/2);i<s;i++)n=this.getRow(i,n),r=this.getRow(t-1-i,r),n.reverse(),r.reverse(),this.setRow(i,r),this.setRow(t-1-i,n)}getEnclosingRectangle(){const t=this.height,n=this.rowSize,r=this.bits;let i=this.width,s=t,o=-1,a=-1;for(let c=0;c<t;c++)for(let u=0;u<n;u++){const g=r[c*n+u];if(0!==g){if(c<s&&(s=c),c>a&&(a=c),32*u<i){let p=0;for(;!(g<<31-p&4294967295);)p++;32*u+p<i&&(i=32*u+p)}if(32*u+31>o){let p=31;for(;!(g>>>p);)p--;32*u+p>o&&(o=32*u+p)}}}return o<i||a<s?null:Int32Array.from([i,s,o-i+1,a-s+1])}getTopLeftOnBit(){const e=this.rowSize,t=this.bits;let n=0;for(;n<t.length&&0===t[n];)n++;if(n===t.length)return null;const r=n/e;let i=n%e*32;const s=t[n];let o=0;for(;!(s<<31-o&4294967295);)o++;return i+=o,Int32Array.from([i,r])}getBottomRightOnBit(){const e=this.rowSize,t=this.bits;let n=t.length-1;for(;n>=0&&0===t[n];)n--;if(n<0)return null;const r=Math.floor(n/e);let i=32*Math.floor(n%e);const s=t[n];let o=31;for(;!(s>>>o);)o--;return i+=o,Int32Array.from([i,r])}getWidth(){return this.width}getHeight(){return this.height}getRowSize(){return this.rowSize}equals(e){return e instanceof _e&&this.width===e.width&&this.height===e.height&&this.rowSize===e.rowSize&&De.equals(this.bits,e.bits)}hashCode(){let e=this.width;return e=31*e+this.width,e=31*e+this.height,e=31*e+this.rowSize,e=31*e+De.hashCode(this.bits),e}toString(e="X ",t=" ",n="\n"){return this.buildToString(e,t,n)}buildToString(e,t,n){let r=new fe;for(let i=0,s=this.height;i<s;i++){for(let o=0,a=this.width;o<a;o++)r.append(this.get(o,i)?e:t);r.append(n)}return r.toString()}clone(){return new _e(this.width,this.height,this.rowSize,this.bits.slice())}}let R=(()=>{class l extends de{static getNotFoundInstance(){return new l}}return l.kind="NotFoundException",l})();class je extends We{constructor(e){super(e),this.luminances=je.EMPTY,this.buckets=new Int32Array(je.LUMINANCE_BUCKETS)}getBlackRow(e,t){const n=this.getLuminanceSource(),r=n.getWidth();null==t||t.getSize()<r?t=new $(r):t.clear(),this.initArrays(r);const i=n.getRow(e,this.luminances),s=this.buckets;for(let a=0;a<r;a++)s[(255&i[a])>>je.LUMINANCE_SHIFT]++;const o=je.estimateBlackPoint(s);if(r<3)for(let a=0;a<r;a++)(255&i[a])<o&&t.set(a);else{let a=255&i[0],c=255&i[1];for(let u=1;u<r-1;u++){const g=255&i[u+1];(4*c-a-g)/2<o&&t.set(u),a=c,c=g}}return t}getBlackMatrix(){const e=this.getLuminanceSource(),t=e.getWidth(),n=e.getHeight(),r=new _e(t,n);this.initArrays(t);const i=this.buckets;for(let a=1;a<5;a++){const c=Math.floor(n*a/5),u=e.getRow(c,this.luminances),g=Math.floor(4*t/5);for(let p=Math.floor(t/5);p<g;p++)i[(255&u[p])>>je.LUMINANCE_SHIFT]++}const s=je.estimateBlackPoint(i),o=e.getMatrix();for(let a=0;a<n;a++){const c=a*t;for(let u=0;u<t;u++)(255&o[c+u])<s&&r.set(u,a)}return r}createBinarizer(e){return new je(e)}initArrays(e){this.luminances.length<e&&(this.luminances=new Uint8ClampedArray(e));const t=this.buckets;for(let n=0;n<je.LUMINANCE_BUCKETS;n++)t[n]=0}static estimateBlackPoint(e){const t=e.length;let n=0,r=0,i=0;for(let u=0;u<t;u++)e[u]>i&&(r=u,i=e[u]),e[u]>n&&(n=e[u]);let s=0,o=0;for(let u=0;u<t;u++){const g=u-r,p=e[u]*g*g;p>o&&(s=u,o=p)}if(r>s){const u=r;r=s,s=u}if(s-r<=t/16)throw new R;let a=s-1,c=-1;for(let u=s-1;u>r;u--){const g=u-r,p=g*g*(s-u)*(n-e[u]);p>c&&(a=u,c=p)}return a<<je.LUMINANCE_SHIFT}}je.LUMINANCE_BITS=5,je.LUMINANCE_SHIFT=8-je.LUMINANCE_BITS,je.LUMINANCE_BUCKETS=1<<je.LUMINANCE_BITS,je.EMPTY=Uint8ClampedArray.from([0]);class oe extends je{constructor(e){super(e),this.matrix=null}getBlackMatrix(){if(null!==this.matrix)return this.matrix;const e=this.getLuminanceSource(),t=e.getWidth(),n=e.getHeight();if(t>=oe.MINIMUM_DIMENSION&&n>=oe.MINIMUM_DIMENSION){const r=e.getMatrix();let i=t>>oe.BLOCK_SIZE_POWER;t&oe.BLOCK_SIZE_MASK&&i++;let s=n>>oe.BLOCK_SIZE_POWER;n&oe.BLOCK_SIZE_MASK&&s++;const o=oe.calculateBlackPoints(r,i,s,t,n),a=new _e(t,n);oe.calculateThresholdForBlock(r,i,s,t,n,o,a),this.matrix=a}else this.matrix=super.getBlackMatrix();return this.matrix}createBinarizer(e){return new oe(e)}static calculateThresholdForBlock(e,t,n,r,i,s,o){const a=i-oe.BLOCK_SIZE,c=r-oe.BLOCK_SIZE;for(let u=0;u<n;u++){let g=u<<oe.BLOCK_SIZE_POWER;g>a&&(g=a);const p=oe.cap(u,2,n-3);for(let m=0;m<t;m++){let I=m<<oe.BLOCK_SIZE_POWER;I>c&&(I=c);const S=oe.cap(m,2,t-3);let b=0;for(let z=-2;z<=2;z++){const X=s[p+z];b+=X[S-2]+X[S-1]+X[S]+X[S+1]+X[S+2]}oe.thresholdBlock(e,I,g,b/25,r,o)}}}
vendor: 11,932 bytes, line 1
1static cap(e,t,n){return e<t?t:e>n?n:e}static thresholdBlock(e,t,n,r,i,s){for(let o=0,a=n*i+t;o<oe.BLOCK_SIZE;o++,a+=i)for(let c=0;c<oe.BLOCK_SIZE;c++)(255&e[a+c])<=r&&s.set(t+c,n+o)}static calculateBlackPoints(e,t,n,r,i){const s=i-oe.BLOCK_SIZE,o=r-oe.BLOCK_SIZE,a=new Array(n);for(let c=0;c<n;c++){a[c]=new Int32Array(t);let u=c<<oe.BLOCK_SIZE_POWER;u>s&&(u=s);for(let g=0;g<t;g++){let p=g<<oe.BLOCK_SIZE_POWER;p>o&&(p=o);let m=0,I=255,S=0;for(let _=0,z=u*r+p;_<oe.BLOCK_SIZE;_++,z+=r){for(let X=0;X<oe.BLOCK_SIZE;X++){const B=255&e[z+X];m+=B,B<I&&(I=B),B>S&&(S=B)}if(S-I>oe.MIN_DYNAMIC_RANGE)for(_++,z+=r;_<oe.BLOCK_SIZE;_++,z+=r)for(let X=0;X<oe.BLOCK_SIZE;X++)m+=255&e[z+X]}let b=m>>2*oe.BLOCK_SIZE_POWER;if(S-I<=oe.MIN_DYNAMIC_RANGE&&(b=I/2,c>0&&g>0)){const _=(a[c-1][g]+2*a[c][g-1]+a[c-1][g-1])/4;I<_&&(b=_)}a[c][g]=b}}return a}}oe.BLOCK_SIZE_POWER=3,oe.BLOCK_SIZE=1<<oe.BLOCK_SIZE_POWER,oe.BLOCK_SIZE_MASK=oe.BLOCK_SIZE-1,oe.MINIMUM_DIMENSION=5*oe.BLOCK_SIZE,oe.MIN_DYNAMIC_RANGE=24;class Lt{constructor(e,t){this.width=e,this.height=t}getWidth(){return this.width}getHeight(){return this.height}isCropSupported(){return!1}crop(e,t,n,r){throw new Be("This luminance source does not support cropping.")}isRotateSupported(){return!1}rotateCounterClockwise(){throw new Be("This luminance source does not support rotation by 90 degrees.")}rotateCounterClockwise45(){throw new Be("This luminance source does not support rotation by 45 degrees.")}toString(){const e=new Uint8ClampedArray(this.width);let t=new fe;for(let n=0;n<this.height;n++){const r=this.getRow(n,e);for(let i=0;i<this.width;i++){const s=255&r[i];let o;o=s<64?"#":s<128?"+":s<192?".":" ",t.append(o)}t.append("\n")}return t.toString()}}class It extends Lt{constructor(e){super(e.getWidth(),e.getHeight()),this.delegate=e}getRow(e,t){const n=this.delegate.getRow(e,t),r=this.getWidth();for(let i=0;i<r;i++)n[i]=255-(255&n[i]);return n}getMatrix(){const e=this.delegate.getMatrix(),t=this.getWidth()*this.getHeight(),n=new Uint8ClampedArray(t);for(let r=0;r<t;r++)n[r]=255-(255&e[r]);return n}isCropSupported(){return this.delegate.isCropSupported()}crop(e,t,n,r){return new It(this.delegate.crop(e,t,n,r))}isRotateSupported(){return this.delegate.isRotateSupported()}invert(){return this.delegate}rotateCounterClockwise(){return new It(this.delegate.rotateCounterClockwise())}rotateCounterClockwise45(){return new It(this.delegate.rotateCounterClockwise45())}}class Tt extends Lt{constructor(e){super(e.width,e.height),this.canvas=e,this.tempCanvasElement=null,this.buffer=Tt.makeBufferFromCanvasImageData(e)}static makeBufferFromCanvasImageData(e){const t=e.getContext("2d").getImageData(0,0,e.width,e.height);return Tt.toGrayscaleBuffer(t.data,e.width,e.height)}static toGrayscaleBuffer(e,t,n){const r=new Uint8ClampedArray(t*n);for(let i=0,s=0,o=e.length;i<o;i+=4,s++){let a;a=0===e[i+3]?255:306*e[i]+601*e[i+1]+117*e[i+2]+512>>10,r[s]=a}return r}getRow(e,t){if(e<0||e>=this.getHeight())throw new Z("Requested row is outside the image: "+e);const n=this.getWidth(),r=e*n;return null===t?t=this.buffer.slice(r,r+n):(t.length<n&&(t=new Uint8ClampedArray(n)),t.set(this.buffer.slice(r,r+n))),t}getMatrix(){return this.buffer}isCropSupported(){return!0}crop(e,t,n,r){return super.crop(e,t,n,r),this}isRotateSupported(){return!0}rotateCounterClockwise(){return this.rotate(-90),this}rotateCounterClockwise45(){return this.rotate(-45),this}getTempCanvasElement(){if(null===this.tempCanvasElement){const e=this.canvas.ownerDocument.createElement("canvas");e.width=this.canvas.width,e.height=this.canvas.height,this.tempCanvasElement=e}return this.tempCanvasElement}rotate(e){const t=this.getTempCanvasElement(),n=t.getContext("2d"),r=e*Tt.DEGREE_TO_RADIANS,i=this.canvas.width,s=this.canvas.height,o=Math.ceil(Math.abs(Math.cos(r))*i+Math.abs(Math.sin(r))*s),a=Math.ceil(Math.abs(Math.sin(r))*i+Math.abs(Math.cos(r))*s);return t.width=o,t.height=a,n.translate(o/2,a/2),n.rotate(r),n.drawImage(this.canvas,i/-2,s/-2),this.buffer=Tt.makeBufferFromCanvasImageData(t),this}invert(){return new It(this)}}Tt.DEGREE_TO_RADIANS=Math.PI/180;class Qt{constructor(e,t,n){this.deviceId=e,this.label=t,this.kind="videoinput",this.groupId=n||void 0}toJSON(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}}}var Ye=(globalThis||global||self||window?(globalThis||global||self||window||void 0).__awaiter:void 0)||function(l,e,t,n){return new(t||(t=Promise))(function(i,s){function o(u){try{c(n.next(u))}catch(g){s(g)}}function a(u){try{c(n.throw(u))}catch(g){s(g)}}function c(u){u.done?i(u.value):function r(i){return i instanceof t?i:new t(function(s){s(i)})}(u.value).then(o,a)}c((n=n.apply(l,e||[])).next())})};class St{constructor(e,t=500,n){this.reader=e,this.timeBetweenScansMillis=t,this._hints=n,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}get hasNavigator(){return typeof navigator<"u"}get isMediaDevicesSuported(){return this.hasNavigator&&!!navigator.mediaDevices}get canEnumerateDevices(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)}get timeBetweenDecodingAttempts(){return this._timeBetweenDecodingAttempts}set timeBetweenDecodingAttempts(e){this._timeBetweenDecodingAttempts=e<0?0:e}set hints(e){this._hints=e||null}get hints(){return this._hints}listVideoInputDevices(){return Ye(this,void 0,void 0,function*(){if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");const e=yield navigator.mediaDevices.enumerateDevices(),t=[];for(const n of e){const r="video"===n.kind?"videoinput":n.kind;"videoinput"===r&&t.push({deviceId:n.deviceId||n.id,label:n.label||`Video device ${t.length+1}`,kind:r,groupId:n.groupId})}return t})}getVideoInputDevices(){return Ye(this,void 0,void 0,function*(){return(yield this.listVideoInputDevices()).map(t=>new Qt(t.deviceId,t.label))})}findDeviceById(e){return Ye(this,void 0,void 0,function*(){const t=yield this.listVideoInputDevices();return t?t.find(n=>n.deviceId===e):null})}decodeFromInputVideoDevice(e,t){return Ye(this,void 0,void 0,function*(){return yield this.decodeOnceFromVideoDevice(e,t)})}decodeOnceFromVideoDevice(e,t){return Ye(this,void 0,void 0,function*(){let n;this.reset(),n=e?{deviceId:{exact:e}}:{facingMode:"environment"};const r={video:n};return yield this.decodeOnceFromConstraints(r,t)})}decodeOnceFromConstraints(e,t){return Ye(this,void 0,void 0,function*(){const n=yield navigator.mediaDevices.getUserMedia(e);return yield this.decodeOnceFromStream(n,t)})}decodeOnceFromStream(e,t){return Ye(this,void 0,void 0,function*(){this.reset();const n=yield this.attachStreamToVideo(e,t);return yield this.decodeOnce(n)})}decodeFromInputVideoDeviceContinuously(e,t,n){return Ye(this,void 0,void 0,function*(){return yield this.decodeFromVideoDevice(e,t,n)})}decodeFromVideoDevice(e,t,n){return Ye(this,void 0,void 0,function*(){let r;r=e?{deviceId:{exact:e}}:{facingMode:"environment"};const i={video:r};return yield this.decodeFromConstraints(i,t,n)})}decodeFromConstraints(e,t,n){return Ye(this,void 0,void 0,function*(){const r=yield navigator.mediaDevices.getUserMedia(e);return yield this.decodeFromStream(r,t,n)})}decodeFromStream(e,t,n){return Ye(this,void 0,void 0,function*(){this.reset();const r=yield this.attachStreamToVideo(e,t);return yield this.decodeContinuously(r,n)})}stopAsyncDecode(){this._stopAsyncDecode=!0}stopContinuousDecode(){this._stopContinuousDecode=!0}attachStreamToVideo(e,t){return Ye(this,void 0,void 0,function*(){const n=this.prepareVideoElement(t);return this.addVideoSource(n,e),this.videoElement=n,this.stream=e,yield this.playVideoOnLoadAsync(n),n})}playVideoOnLoadAsync(e){return new Promise((t,n)=>this.playVideoOnLoad(e,()=>t()))}playVideoOnLoad(e,t){this.videoEndedListener=()=>this.stopStreams(),this.videoCanPlayListener=()=>this.tryPlayVideo(e),e.addEventListener("ended",this.videoEndedListener),e.addEventListener("canplay",this.videoCanPlayListener),e.addEventListener("playing",t),this.tryPlayVideo(e)}isVideoPlaying(e){return e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2}tryPlayVideo(e){return Ye(this,void 0,void 0,function*(){if(this.isVideoPlaying(e))console.warn("Trying to play video that is already playing.");else try{yield e.play()}catch{console.warn("It was not possible to play the video.")}})}getMediaElement(e,t){const n=document.getElementById(e);if(!n)throw new Ae(`element with id '${e}' not found`);if(n.nodeName.toLowerCase()!==t.toLowerCase())throw new Ae(`element with id '${e}' must be an ${t} element`);return n}decodeFromImage(e,t){if(!e&&!t)throw new Ae("either imageElement with a src set or an url must be provided");return t&&!e?this.decodeFromImageUrl(t):this.decodeFromImageElement(e)}decodeFromVideo(e,t){if(!e&&!t)throw new Ae("Either an element with a src set or an URL must be provided");return t&&!e?this.decodeFromVideoUrl(t):this.decodeFromVideoElement(e)}decodeFromVideoContinuously(e,t,n){if(void 0===e&&void 0===t)throw new Ae("Either an element with a src set or an URL must be provided");return t&&!e?this.decodeFromVideoUrlContinuously(t,n):this.decodeFromVideoElementContinuously(e,n)}decodeFromImageElement(e){if(!e)throw new Ae("An image element must be provided.");this.reset();const t=this.prepareImageElement(e);let n;return this.imageElement=t,n=this.isImageLoaded(t)?this.decodeOnce(t,!1,!0):this._decodeOnLoadImage(t),n}decodeFromVideoElement(e){const t=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideo(t)}decodeFromVideoElementContinuously(e,t){const n=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideoContinuously(n,t)}_decodeFromVideoElementSetup(e){if(!e)throw new Ae("A video element must be provided.");this.reset();const t=this.prepareVideoElement(e);return this.videoElement=t,t}decodeFromImageUrl(e){if(!e)throw new Ae("An URL must be provided.");this.reset();const t=this.prepareImageElement();this.imageElement=t;const n=this._decodeOnLoadImage(t);return t.src=e,n}decodeFromVideoUrl(e){if(!e)throw new Ae("An URL must be provided.");this.reset();const t=this.prepareVideoElement(),n=this.decodeFromVideoElement(t);return t.src=e,n}decodeFromVideoUrlContinuously(e,t){if(!e)throw new Ae("An URL must be provided.");this.reset();const n=this.prepareVideoElement(),r=this.decodeFromVideoElementContinuously(n,t);return n.src=e,r}_decodeOnLoadImage(e){return new Promise((t,n)=>{this.imageLoadedListener=()=>this.decodeOnce(e,!1,!0).then(t,n),e.addEventListener("load",this.imageLoadedListener)})}_decodeOnLoadVideo(e){return Ye(this,void 0,void 0,function*(){return yield this.playVideoOnLoadAsync(e),yield this.decodeOnce(e)})}_decodeOnLoadVideoContinuously(e,t){return Ye(this,void 0,void 0,function*(){yield this.playVideoOnLoadAsync(e),this.decodeContinuously(e,t)})}isImageLoaded(e){return!(!e.complete||0===e.naturalWidth)}prepareImageElement(e){let t;return typeof e>"u"&&(t=document.createElement("img"),t.width=200,t.height=200),"string"==typeof e&&(t=this.getMediaElement(e,"img")),e instanceof HTMLImageElement&&(t=e),t}prepareVideoElement(e){let t;return!e&&typeof document<"u"&&(t=document.createElement("video"),t.width=200,t.height=200),"string"==typeof e&&(t=this.getMediaElement(e,"video")),e instanceof HTMLVideoElement&&(t=e),t.setAttribute("autoplay","true"),t.setAttribute("muted","true"),t.setAttribute("playsinline","true"),t}decodeOnce(e,t=!0,n=!0){this._stopAsyncDecode=!1;const r=(i,s)=>{if(this._stopAsyncDecode)return s(new R("Video stream has ended before any code could be detected.")),void(this._stopAsyncDecode=void 0);try{i(this.decode(e))}catch(o){if(t&&o instanceof R||(o instanceof Ce||o instanceof P)&&n)return setTimeout(r,this._timeBetweenDecodingAttempts,i,s);s(o)}};return new Promise((i,s)=>r(i,s))}decodeContinuously(e,t){this._stopContinuousDecode=!1;const n=()=>
1{if(this._stopContinuousDecode)this._stopContinuousDecode=void 0;else try{const r=this.decode(e);t(r,null),setTimeout(n,this.timeBetweenScansMillis)}catch(r){t(null,r),(r instanceof Ce||r instanceof P||r instanceof R)&&setTimeout(n,this._timeBetweenDecodingAttempts)}};n()}decode(e){const t=this.createBinaryBitmap(e);return this.decodeBitmap(t)}_isHTMLVideoElement(e){return 0!==e.videoWidth}drawFrameOnCanvas(e,t,n){t||(t={sx:0,sy:0,sWidth:e.videoWidth,sHeight:e.videoHeight,dx:0,dy:0,dWidth:e.videoWidth,dHeight:e.videoHeight}),n||(n=this.captureCanvasContext),n.drawImage(e,t.sx,t.sy,t.sWidth,t.sHeight,t.dx,t.dy,t.dWidth,t.dHeight)}drawImageOnCanvas(e,t,n=this.captureCanvasContext){t||(t={sx:0,sy:0,sWidth:e.naturalWidth,sHeight:e.naturalHeight,dx:0,dy:0,dWidth:e.naturalWidth,dHeight:e.naturalHeight}),n||(n=this.captureCanvasContext),n.drawImage(e,t.sx,t.sy,t.sWidth,t.sHeight,t.dx,t.dy,t.dWidth,t.dHeight)}createBinaryBitmap(e){this.getCaptureCanvasContext(e),this._isHTMLVideoElement(e)?this.drawFrameOnCanvas(e):this.drawImageOnCanvas(e);const n=this.getCaptureCanvas(e),r=new Tt(n),i=new oe(r);return new Qe(i)}getCaptureCanvasContext(e){if(!this.captureCanvasContext){const n=this.getCaptureCanvas(e).getContext("2d");this.captureCanvasContext=n}return this.captureCanvasContext}getCaptureCanvas(e){if(!this.captureCanvas){const t=this.createCaptureCanvas(e);this.captureCanvas=t}return this.captureCanvas}decodeBitmap(e){return this.reader.decode(e,this._hints)}createCaptureCanvas(e){if(typeof document>"u")return this._destroyCaptureCanvas(),null;const t=document.createElement("canvas");let n,r;return typeof e<"u"&&(e instanceof HTMLVideoElement?(n=e.videoWidth,r=e.videoHeight):e instanceof HTMLImageElement&&(n=e.naturalWidth||e.width,r=e.naturalHeight||e.height)),t.style.width=n+"px",t.style.height=r+"px",t.width=n,t.height=r,t}stopStreams(){this.stream&&(this.stream.getVideoTracks().forEach(e=>e.stop()),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()}reset(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()}_destroyVideoElement(){this.videoElement&&(typeof this.videoEndedListener<"u"&&this.videoElement.removeEventListener("ended",this.videoEndedListener),typeof this.videoPlayingEventListener<"u"&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),typeof this.videoCanPlayListener<"u"&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)}_destroyImageElement(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)}_destroyCaptureCanvas(){this.captureCanvasContext=void 0,this.captureCanvas=void 0}addVideoSource(e,t){try{e.srcObject=t}catch{e.src=URL.createObjectURL(t)}}cleanVideoSource(e){try{e.srcObject=null}catch{e.src=""}this.videoElement.removeAttribute("src")}}class Je{constructor(e,t,n=(null==t?0:8*t.length),r,i,s=we.currentTimeMillis()){this.text=e,this.rawBytes=t,this.numBits=n,this.resultPoints=r,this.format=i,this.timestamp=s,this.text=e,this.rawBytes=t,this.numBits=null==n?null==t?0:8*t.length:n,this.resultPoints=r,this.format=i,this.resultMetadata=null,this.timestamp=null==s?we.currentTimeMillis():s}getText(){return this.text}getRawBytes(){return this.rawBytes}getNumBits(){return this.numBits}getResultPoints(){return this.resultPoints}getBarcodeFormat(){return this.format}getResultMetadata(){return this.resultMetadata}putMetadata(e,t){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(e,t)}putAllMetadata(e){null!==e&&(this.resultMetadata=null===this.resultMetadata?e:new Map(e))}addResultPoints(e){const t=this.resultPoints;if(null===t)this.resultPoints=e;else if(null!==e&&e.length>0){const n=new Array(t.length+e.length);we.arraycopy(t,0,n,0,t.length),we.arraycopy(e,0,n,t.length,e.length),this.resultPoints=n}}getTimestamp(){return this.timestamp}toString(){return this.text}}var Q=(()=>{return(l=Q||(Q={}
vendor: 23,544 bytes, line 1
1))[l.AZTEC=0]="AZTEC",l[l.CODABAR=1]="CODABAR",l[l.CODE_39=2]="CODE_39",l[l.CODE_93=3]="CODE_93",l[l.CODE_128=4]="CODE_128",l[l.DATA_MATRIX=5]="DATA_MATRIX",l[l.EAN_8=6]="EAN_8",l[l.EAN_13=7]="EAN_13",l[l.ITF=8]="ITF",l[l.MAXICODE=9]="MAXICODE",l[l.PDF_417=10]="PDF_417",l[l.QR_CODE=11]="QR_CODE",l[l.RSS_14=12]="RSS_14",l[l.RSS_EXPANDED=13]="RSS_EXPANDED",l[l.UPC_A=14]="UPC_A",l[l.UPC_E=15]="UPC_E",l[l.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION",Q;var l})(),V=Q,H=(()=>{return(l=H||(H={}))[l.OTHER=0]="OTHER",l[l.ORIENTATION=1]="ORIENTATION",l[l.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",l[l.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",l[l.ISSUE_NUMBER=4]="ISSUE_NUMBER",l[l.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",l[l.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",l[l.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",l[l.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",l[l.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",l[l.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY",H;var l})(),k=H;class Xe{constructor(e,t,n,r,i=-1,s=-1){this.rawBytes=e,this.text=t,this.byteSegments=n,this.ecLevel=r,this.structuredAppendSequenceNumber=i,this.structuredAppendParity=s,this.numBits=null==e?0:8*e.length}getRawBytes(){return this.rawBytes}getNumBits(){return this.numBits}setNumBits(e){this.numBits=e}getText(){return this.text}getByteSegments(){return this.byteSegments}getECLevel(){return this.ecLevel}getErrorsCorrected(){return this.errorsCorrected}setErrorsCorrected(e){this.errorsCorrected=e}getErasures(){return this.erasures}setErasures(e){this.erasures=e}getOther(){return this.other}setOther(e){this.other=e}hasStructuredAppend(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0}getStructuredAppendParity(){return this.structuredAppendParity}getStructuredAppendSequenceNumber(){return this.structuredAppendSequenceNumber}}class yt{exp(e){return this.expTable[e]}log(e){if(0===e)throw new Z;return this.logTable[e]}static addOrSubtract(e,t){return e^t}}class at{constructor(e,t){if(0===t.length)throw new Z;this.field=e;const n=t.length;if(n>1&&0===t[0]){let r=1;for(;r<n&&0===t[r];)r++;r===n?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(n-r),we.arraycopy(t,r,this.coefficients,0,this.coefficients.length))}else this.coefficients=t}getCoefficients(){return this.coefficients}getDegree(){return this.coefficients.length-1}isZero(){return 0===this.coefficients[0]}getCoefficient(e){return this.coefficients[this.coefficients.length-1-e]}evaluateAt(e){if(0===e)return this.getCoefficient(0);const t=this.coefficients;let n;if(1===e){n=0;for(let s=0,o=t.length;s!==o;s++)n=yt.addOrSubtract(n,t[s]);return n}n=t[0];const r=t.length,i=this.field;for(let s=1;s<r;s++)n=yt.addOrSubtract(i.multiply(e,n),t[s]);return n}addOrSubtract(e){if(!this.field.equals(e.field))throw new Z("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;let t=this.coefficients,n=e.coefficients;if(t.length>n.length){const s=t;t=n,n=s}let r=new Int32Array(n.length);const i=n.length-t.length;we.arraycopy(n,0,r,0,i);for(let s=i;s<n.length;s++)r[s]=yt.addOrSubtract(t[s-i],n[s]);return new at(this.field,r)}multiply(e){if(!this.field.equals(e.field))throw new Z("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();const t=this.coefficients,n=t.length,r=e.coefficients,i=r.length,s=new Int32Array(n+i-1),o=this.field;for(let a=0;a<n;a++){const c=t[a];for(let u=0;u<i;u++)s[a+u]=yt.addOrSubtract(s[a+u],o.multiply(c,r[u]))}return new at(o,s)}multiplyScalar(e){if(0===e)return this.field.getZero();if(1===e)return this;const t=this.coefficients.length,n=this.field,r=new Int32Array(t),i=this.coefficients;for(let s=0;s<t;s++)r[s]=n.multiply(i[s],e);return new at(n,r)}multiplyByMonomial(e,t){if(e<0)throw new Z;if(0===t)return this.field.getZero();const n=this.coefficients,r=n.length,i=new Int32Array(r+e),s=this.field;for(let o=0;o<r;o++)i[o]=s.multiply(n[o],t);return new at(s,i)}divide(e){if(!this.field.equals(e.field))throw new Z("GenericGFPolys do not have same GenericGF field");if(e.isZero())throw new Z("Divide by 0");const t=this.field;let n=t.getZero(),r=this;const i=e.getCoefficient(e.getDegree()),s=t.inverse(i);for(;r.getDegree()>=e.getDegree()&&!r.isZero();){const o=r.getDegree()-e.getDegree(),a=t.multiply(r.getCoefficient(r.getDegree()),s),c=e.multiplyByMonomial(o,a),u=t.buildMonomial(o,a);n=n.addOrSubtract(u),r=r.addOrSubtract(c)}return[n,r]}toString(){let e="";for(let t=this.getDegree();t>=0;t--){let n=this.getCoefficient(t);if(0!==n){if(n<0?(e+=" - ",n=-n):e.length>0&&(e+=" + "),0===t||1!==n){const r=this.field.log(n);0===r?e+="1":1===r?e+="a":(e+="a^",e+=r)}0!==t&&(1===t?e+="x":(e+="x^",e+=t))}}return e}}let sn=(()=>{class l extends de{}return l.kind="ArithmeticException",l})();class se extends yt{constructor(e,t,n){super(),this.primitive=e,this.size=t,this.generatorBase=n;const r=new Int32Array(t);let i=1;for(let o=0;o<t;o++)r[o]=i,i*=2,i>=t&&(i^=e,i&=t-1);this.expTable=r;const s=new Int32Array(t);for(let o=0;o<t-1;o++)s[r[o]]=o;this.logTable=s,this.zero=new at(this,Int32Array.from([0])),this.one=new at(this,Int32Array.from([1]))}getZero(){return this.zero}getOne(){return this.one}buildMonomial(e,t){if(e<0)throw new Z;if(0===t)return this.zero;const n=new Int32Array(e+1);return n[0]=t,new at(this,n)}inverse(e){if(0===e)throw new sn;return this.expTable[this.size-this.logTable[e]-1]}multiply(e,t){return 0===e||0===t?0:this.expTable[(this.logTable[e]+this.logTable[t])%(this.size-1)]}getSize(){return this.size}getGeneratorBase(){return this.generatorBase}toString(){return"GF(0x"+ie.toHexString(this.primitive)+","+this.size+")"}equals(e){return e===this}}se.AZTEC_DATA_12=new se(4201,4096,1),se.AZTEC_DATA_10=new se(1033,1024,1),se.AZTEC_DATA_6=new se(67,64,1),se.AZTEC_PARAM=new se(19,16,1),se.QR_CODE_FIELD_256=new se(285,256,0),se.DATA_MATRIX_FIELD_256=new se(301,256,1),se.AZTEC_DATA_8=se.DATA_MATRIX_FIELD_256,se.MAXICODE_FIELD_64=se.AZTEC_DATA_6;let jt=(()=>{class l extends de{}return l.kind="ReedSolomonException",l})(),wt=(()=>{class l extends de{}return l.kind="IllegalStateException",l})();class Pt{constructor(e){this.field=e}decode(e,t){const n=this.field,r=new at(n,e),i=new Int32Array(t);let s=!0;for(let m=0;m<t;m++){const I=r.evaluateAt(n.exp(m+n.getGeneratorBase()));i[i.length-1-m]=I,0!==I&&(s=!1)}if(s)return;const o=new at(n,i),a=this.runEuclideanAlgorithm(n.buildMonomial(t,1),o,t),u=a[1],g=this.findErrorLocations(a[0]),p=this.findErrorMagnitudes(u,g);for(let m=0;m<g.length;m++){const I=e.length-1-n.log(g[m]);if(I<0)throw new jt("Bad error location");e[I]=se.addOrSubtract(e[I],p[m])}}runEuclideanAlgorithm(e,t,n){if(e.getDegree()<t.getDegree()){const m=e;e=t,t=m}const r=this.field;let i=e,s=t,o=r.getZero(),a=r.getOne();for(;s.getDegree()>=(n/2|0);){let m=i,I=o;if(i=s,o=a,i.isZero())throw new jt("r_{i-1} was zero");s=m;let S=r.getZero();const b=i.getCoefficient(i.getDegree()),_=r.inverse(b);for(;s.getDegree()>=i.getDegree()&&!s.isZero();){const z=s.getDegree()-i.getDegree(),X=r.multiply(s.getCoefficient(s.getDegree()),_);S=S.addOrSubtract(r.buildMonomial(z,X)),s=s.addOrSubtract(i.multiplyByMonomial(z,X))}if(a=S.multiply(o).addOrSubtract(I),s.getDegree()>=i.getDegree())throw new wt("Division algorithm failed to reduce polynomial?")}const c=a.getCoefficient(0);if(0===c)throw new jt("sigmaTilde(0) was zero");const u=r.inverse(c);return[a.multiplyScalar(u),s.multiplyScalar(u)]}findErrorLocations(e){const t=e.getDegree();if(1===t)return Int32Array.from([e.getCoefficient(1)]);const n=new Int32Array(t);let r=0;const i=this.field;for(let s=1;s<i.getSize()&&r<t;s++)0===e.evaluateAt(s)&&(n[r]=i.inverse(s),r++);if(r!==t)throw new jt("Error locator degree does not match number of roots");return n}findErrorMagnitudes(e,t){const n=t.length,r=new Int32Array(n),i=this.field;for(let s=0;s<n;s++){const o=i.inverse(t[s]);let a=1;for(let c=0;c<n;c++)if(s!==c){const u=i.multiply(t[c],o);a=i.multiply(a,1&u?-2&u:1|u)}r[s]=i.multiply(e.evaluateAt(o),i.inverse(a)),0!==i.getGeneratorBase()&&(r[s]=i.multiply(r[s],o))}return r}}var Ke=(()=>{return(l=Ke||(Ke={}))[l.UPPER=0]="UPPER",l[l.LOWER=1]="LOWER",l[l.MIXED=2]="MIXED",l[l.DIGIT=3]="DIGIT",l[l.PUNCT=4]="PUNCT",l[l.BINARY=5]="BINARY",Ke;var l})();let on=(()=>{class l{decode(t){this.ddata=t;let n=t.getBits(),r=this.extractBits(n),i=this.correctBits(r),s=l.convertBoolArrayToByteArray(i),o=l.getEncodedData(i),a=new Xe(s,o,null,null);return a.setNumBits(i.length),a}static highLevelDecode(t){return this.getEncodedData(t)}static getEncodedData(t){let n=t.length,r=Ke.UPPER,i=Ke.UPPER,s="",o=0;for(;o<n;)if(i===Ke.BINARY){if(n-o<5)break;let a=l.readCode(t,o,5);if(o+=5,0===a){if(n-o<11)break;a=l.readCode(t,o,11)+31,o+=11}for(let c=0;c<a;c++){if(n-o<8){o=n;break}const u=l.readCode(t,o,8);s+=q.castAsNonUtf8Char(u),o+=8}i=r}else{let a=i===Ke.DIGIT?4:5;if(n-o<a)break;let c=l.readCode(t,o,a);o+=a;let u=l.getCharacter(i,c);u.startsWith("CTRL_")?(r=i,i=l.getTable(u.charAt(5)),"L"===u.charAt(6)&&(r=i)):(s+=u,i=r)}return s}static getTable(t){switch(t){case"L":return Ke.LOWER;case"P":return Ke.PUNCT;case"M":return Ke.MIXED;case"D":return Ke.DIGIT;case"B":return Ke.BINARY;default:return Ke.UPPER}}static getCharacter(t,n){switch(t){case Ke.UPPER:return l.UPPER_TABLE[n];case Ke.LOWER:return l.LOWER_TABLE[n];case Ke.MIXED:return l.MIXED_TABLE[n];case Ke.PUNCT:return l.PUNCT_TABLE[n];case Ke.DIGIT:return l.DIGIT_TABLE[n];default:throw new wt("Bad table")}}correctBits(t){let n,r;this.ddata.getNbLayers()<=2?(r=6,n=se.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(r=8,n=se.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(r=10,n=se.AZTEC_DATA_10):(r=12,n=se.AZTEC_DATA_12);let i=this.ddata.getNbDatablocks(),s=t.length/r;if(s<i)throw new P;let o=t.length%r,a=new Int32Array(s);for(let m=0;m<s;m++,o+=r)a[m]=l.readCode(t,o,r);try{new Pt(n).decode(a,s-i)}catch(m){throw new P(m)}let c=(1<<r)-1,u=0;for(let m=0;m<i;m++){let I=a[m];if(0===I||I===c)throw new P;(1===I||I===c-1)&&u++}let g=new Array(i*r-u),p=0;for(let m=0;m<i;m++){let I=a[m];if(1===I||I===c-1)g.fill(I>1,p,p+r-1),p+=r-1;else for(let S=r-1;S>=0;--S)g[p++]=0!=(I&1<<S)}return g}extractBits(t){let n=this.ddata.isCompact(),r=this.ddata.getNbLayers(),i=(n?11:14)+4*r,s=new Int32Array(i),o=new Array(this.totalBitsInLayer(r,n));if(n)for(let a=0;a<s.length;a++)s[a]=a;else{let a=i+1+2*ie.truncDivision(ie.truncDivision(i,2)-1,15),c=i/2,u=ie.truncDivision(a,2);for(let g=0;g<c;g++){let p=g+ie.truncDivision(g,15);s[c-g-1]=u-p-1,s[c+g]=u+p+1}}for(let a=0,c=0;a<r;a++){let u=4*(r-a)+(n?9:12),g=2*a,p=i-1-g;for(let m=0;m<u;m++){let I=2*m;for(let S=0;S<2;S++)o[c+I+S]=t.get(s[g+S],s[g+m]),o[c+2*u+I+S]=t.get(s[g+m],s[p-S]),o[c+4*u+I+S]=t.get(s[p-S],s[p-m]),o[c+6*u+I+S]=t.get(s[p-m],s[g+S])}c+=8*u}return o}static readCode(t,n,r){let i=0;for(let s=n;s<n+r;s++)i<<=1,t[s]&&(i|=1);return i}static readByte(t,n){let r=t.length-n;return r>=8?l.readCode(t,n,8):l.readCode(t,n,r)<<8-r}static convertBoolArrayToByteArray(t){let n=new Uint8Array((t.length+7)/8);for(let r=0;r<n.length;r++)n[r]=l.readByte(t,8*r);return n}totalBitsInLayer(t,n){return((n?88:112)+16*t)*t}}return l.UPPER_TABLE=["CTRL_PS"," ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],l.LOWER_TABLE=["CTRL_PS"," ","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],l.MIXED_TABLE=["CTRL_PS"," ","\\1","\\2","\\3","\\4","\\5","\\6","\\7","\b","\t","\n","\\13","\f","\r","\\33","\\34","\\35","\\36","\\37","@","\\","^","_","`","|","~","\\177","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],l.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],l.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],l})();class ge{constructor(){}static round(e){return NaN===e?0:e<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:e>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e+(e<0?-.5:.5)|0}static distance(e,t,n,r){const i=e-n,s=t-r;return Math.sqrt(i*i+s*s)}static sum(e){let t=0;for(let n=0,r=e.length;n!==r;n++)t+=e[n];return t}}class Kt{static floatToIntBits(e){return e}}Kt.MAX_VALUE=Number.MAX_SAFE_INTEGER;class K{constructor(e,t){this.x=e,this.y=t}getX(){return this.x}getY(){return this.y}equals(e){return e instanceof K&&this.x===e.x&&this.y===e.y}hashCode(){return 31*Kt.floatToIntBits(this.x)+Kt.floatToIntBits(this.y)}toString(){return"("+this.x+","+this.y+")"}static orderBestPatterns(e){const t=this.distance(e[0],e[1]),n=this.distance(e[1],e[2]),r=this.distance(e[0],e[2]);let i,s,o;if(n>=t&&n>=r?(s=e[0],i=e[1],o=e[2]):r>=n&&r>=t?(s=e[1],i=e[0],o=e[2]):(s=e[2],i=e[0],o=e[1]),this.crossProductZ(i,s,o)<0){const a=i;i=o,o=a}e[0]=i,e[1]=s,e[2]=o}static distance(e,t){return ge.distance(e.x,e.y,t.x,t.y)}static crossProductZ(e,t,n){const r=t.x,i=t.y;return(n.x-r)*(e.y-i)-(n.y-i)*(e.x-r)}}class qt{constructor(e,t){this.bits=e,this.points=t}getBits(){return this.bits}getPoints(){return this.points}}class pn extends qt{constructor(e,t,n,r,i){super(e,t),this.compact=n,this.nbDatablocks=r,this.nbLayers=i}getNbLayers(){return this.nbLayers}getNbDatablocks(){return this.nbDatablocks}isCompact(){return this.compact}}let Jt=(()=>{class l{constructor(t,n,r,i){this.image=t,this.height=t.getHeight(),this.width=t.getWidth(),null==n&&(n=l.INIT_SIZE),null==r&&(r=t.getWidth()/2|0),null==i&&(i=t.getHeight()/2|0);const s=n/2|0;if(this.leftInit=r-s,this.rightInit=r+s,this.upInit=i-s,this.downInit=i+s,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new R}detect(){let t=this.leftInit,n=this.rightInit,r=this.upInit,i=this.downInit,s=!1,o=!0,a=!1,c=!1,u=!1,g=!1,p=!1;const m=this.width,I=this.height;for(;o;){o=!1;let S=!0;for(;(S||!c)&&n<m;)S=this.containsBlackPoint(r,i,n,!1),S?(n++,o=!0,c=!0):c||n++;if(n>=m){s=!0;break}let b=!0;for(;(b||!u)&&i<I;)b=this.containsBlackPoint(t,n,i,!0),b?(i++,o=!0,u=!0):u||i++;if(i>=I){s=!0;break}let _=!0;for(;(_||!g)&&t>=0;)_=this.containsBlackPoint(r,i,t,!1),_?(t--,o=!0,g=!0):g||t--;if(t<0){s=!0;break}let z=!0;for(;(z||!p)&&r>=0;)z=this.containsBlackPoint(t,n,r,!0),z?(r--,o=!0,p=!0):p||r--;if(r<0){s=!0;break}o&&(a=!0)}if(!s&&a){const S=n-t;let b=null;for(let B=1;null===b&&B<S;B++)b=this.getBlackPointOnSegment(t,i-B,t+B,i);if(null==b)throw new R;let _=null;for(let B=1;null===_&&B<S;B++)_=this.getBlackPointOnSegment(t,r+B,t+B,r);if(null==_)throw new R;let z=null;for(let B=1;null===z&&B<S;B++)z=this.getBlackPointOnSegment(n,r+B,n-B,r);if(null==z)throw new R;let X=null;for(let B=1;null===X&&B<S;B++)X=this.getBlackPointOnSegment(n,i-B,n-B,i);if(null==X)throw new R;return this.centerEdges(X,b,z,_)}throw new R}getBlackPointOnSegment(t,n,r,i){const s=ge.round(ge.distance(t,n,r,i)),o=(r-t)/s,a=(i-n)/s,c=this.image;for(let u=0;u<s;u++){const g=ge.round(t+u*o),p=ge.round(n+u*a);if(c.get(g,p))return new K(g,p)}return null}centerEdges(t,n,r,i){const s=t.getX(),o=t.getY(),a=n.getX(),c=n.getY(),u=r.getX(),g=r.getY(),p=i.getX(),m=i.getY(),I=l.CORR;return s<this.width/2?[new K(p-I,m+I),new K(a+I,c+I),new K(u-I,g-I),new K(s+I,o-I)]:[new K(p+I,m+I),new K(a+I,c-I),new K(u-I,g+I),new K(s-I,o-I)]}containsBlackPoint(t,n,r,i){const s=this.image;if(i){for(let o=t;o<=n;o++)if(s.get(o,r))return!0}else for(let o=t;o<=n;o++)if(s.get(r,o))return!0;return!1}}return l.INIT_SIZE=10,l.CORR=1,l})();class an{static checkAndNudgePoints(e,t){const n=e.getWidth(),r=e.getHeight();let i=!0;for(let s=0;s<t.length&&i;s+=2){const o=Math.floor(t[s]),a=Math.floor(t[s+1]);if(o<-1||o>n||a<-1||a>r)throw new R;i=!1,-1===o?(t[s]=0,i=!0):o===n&&(t[s]=n-1,i=!0),-1===a?(t[s+1]=0,i=!0):a===r&&(t[s+1]=r-1,i=!0)}i=!0;for(let s=t.length-2;s>=0&&i;s-=2){const o=Math.floor(t[s]),a=Math.floor(t[s+1]);if(o<-1||o>n||a<-1||a>r)throw new R;i=!1,-1===o?(t[s]=0,i=!0):o===n&&(t[s]=n-1,i=!0),-1===a?(t[s+1]=0,i=!0):a===r&&(t[s+1]=r-1,i=!0)}}}class Ct{constructor(e,t,n,r,i,s,o,a,c){this.a11=e,this.a21=t,this.a31=n,this.a12=r,this.a22=i,this.a32=s,this.a13=o,this.a23=a,this.a33=c}static quadrilateralToQuadrilateral(e,t,n,r,i,s,o,a,c,u,g,p,m,I,S,b){const _=Ct.quadrilateralToSquare(e,t,n,r,i,s,o,a);return Ct.squareToQuadrilateral(c,u,g,p,m,I,S,b).times(_)}transformPoints(e){const t=e.length,n=this.a11,r=this.a12,i=this.a13,s=this.a21,o=this.a22,a=this.a23,c=this.a31,u=this.a32,g=this.a33;for(let p=0;p<t;p+=2){const m=e[p],I=e[p+1],S=i*m+a*I+g;e[p]=(n*m+s*I+c)/S,e[p+1]=(r*m+o*I+u)/S}}transformPointsWithValues(e,t){const n=this.a11,r=this.a12,i=this.a13,s=this.a21,o=this.a22,a=this.a23,c=this.a31,u=this.a32,g=this.a33,p=e.length;for(let m=0;m<p;m++){const I=e[m],S=t[m],b=i*I+a*S+g;e[m]=(n*I+s*S+c)/b,t[m]=(r*I+o*S+u)/b}}static squareToQuadrilateral(e,t,n,r,i,s,o,a){const c=e-n+i-o,u=t-r+s-a;if(0===c&&0===u)return new Ct(n-e,i-n,e,r-t,s-r,t,0,0,1);{const g=n-i,p=o-i,m=r-s,I=a-s,S=g*I-p*m,b=(c*I-p*u)/S,_=(g*u-c*m)/S;return new Ct(n-e+b*n,o-e+_*o,e,r-t+b*r,a-t+_*a,t,b,_,1)}}static quadrilateralToSquare(e,t,n,r,i,s,o,a){return Ct.squareToQuadrilateral(e,t,n,r,i,s,o,a).buildAdjoint()}buildAdjoint(){return new Ct(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)}times(e){return new Ct(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)}}class wn extends an{sampleGrid(e,t,n,r,i,s,o,a,c,u,g,p,m,I,S,b,_,z,X){const B=Ct.quadrilateralToQuadrilateral(r,i,s,o,a,c,u,g,p,m,I,S,b,_,z,X);return this.sampleGridWithTransform(e,t,n,B)}sampleGridWithTransform(e,t,n,r){if(t<=0||n<=0)throw new R;const i=new _e(t,n),s=new Float32Array(2*t);for(let o=0;o<n;o++){const a=s.length,c=o+.5;for(let u=0;u<a;u+=2)s[u]=u/2+.5,s[u+1]=c;r.transformPoints(s),an.checkAndNudgePoints(e,s);try{for(let u=0;u<a;u+=2)e.get(Math.floor(s[u]),Math.floor(s[u+1]))&&i.set(u/2,o)}catch{throw new R}}return i}}class Mt{static setGridSampler(e){Mt.gridSampler=e}static getInstance(){return Mt.gridSampler}}Mt.gridSampler=new wn;class Ue{constructor(e,t){this.x=e,this.y=t}toResultPoint(){return new K(this.getX(),this.getY())}getX(){return this.x}getY(){return this.y}}class ct{constructor(e){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=e}detect(){return this.detectMirror(!1)}detectMirror(e){let t=this.getMatrixCenter(),n=this.getBullsEyeCorners(t);if(e){let s=n[0];n[0]=n[2],n[2]=s}this.extractParameters(n);let r=this.sampleGrid(this.image,n[this.shift%4],n[(this.shift+1)%4],n[(this.shift+2)%4],n[(this.shift+3)%4]),i=this.getMatrixCornerPoints(n);return new pn(r,i,this.compact,this.nbDataBlocks,this.nbLayers)}extractParameters(e){if(!(this.isValidPoint(e[0])&&this.isValidPoint(e[1])&&this.isValidPoint(e[2])&&this.isValidPoint(e[3])))throw new R;let t=2*this.nbCenterLayers,n=new Int32Array([this.sampleLine(e[0],e[1],t),this.sampleLine(e[1],e[2],t),this.sampleLine(e[2],e[3],t),this.sampleLine(e[3],e[0],t)]);this.shift=this.getRotation(n,t);let r=0;for(let s=0;s<4;s++){let o=n[(this.shift+s)%4];this.compact?(r<<=7,r+=o>>1&127):(r<<=10,r+=(o>>2&992)+(o>>1&31))}let i=this.getCorrectedParameterData(r,this.compact);this.compact?(this.nbLayers=1+(i>>6),this.nbDataBlocks=1+(63&i)):(this.nbLayers=1+(i>>11),this.nbDataBlocks=1+(2047&i))}getRotation(e,t){let n=0;e.forEach((r,i,s)=>{n=(r>>t-2<<1)+(1&r)+(n<<3)}),n=((1&n)<<11)+(n>>1);for(let r=0;r<4;r++)if(ie.bitCount(n^this.EXPECTED_CORNER_BITS[r])<=2)return r;throw new R}getCorrectedParameterData(e,t){let n,r;t?(n=7,r=2):(n=10,r=4);let i=n-r,s=new Int32Array(n);for(let a=n-1;a>=0;--a)s[a]=15&e,e>>=4;try{new Pt(se.AZTEC_PARAM).decode(s,i)}catch{throw new R}let o=0;for(let a=0;a<r;a++)o=(o<<4)+s[a];return o}getBullsEyeCorners(e){let t=e,n=e,r=e,i=e,s=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){let g=this.getFirstDifferent(t,s,1,-1),p=this.getFirstDifferent(n,s,1,1),m=this.getFirstDifferent(r,s,-1,1),I=this.getFirstDifferent(i,s,-1,-1);if(this.nbCenterLayers>2){let S=this.distancePoint(I,g)*this.nbCenterLayers/(this.distancePoint(i,t)*(this.nbCenterLayers+2));if(S<.75||S>1.25||!this.isWhiteOrBlackRectangle(g,p,m,I))break}t=g,n=p,r=m,i=I,s=!s}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new R;this.compact=5===this.nbCenterLayers;let o=new K(t.getX()+.5,t.getY()-.5),a=new K(n.getX()+.5,n.getY()+.5),c=new K(r.getX()-.5,r.getY()+.5),u=new K(i.getX()-.5,i.getY()-.5);return this.expandSquare([o,a,c,u],2*this.nbCenterLayers-3,2*this.nbCenterLayers)}getMatrixCenter(){let e,t,n,r;try{let o=new Jt(this.image).detect();e=o[0],t=o[1],n=o[2],r=o[3]}catch{let a=this.image.getWidth()/2,c=this.image.getHeight()/2;e=this.getFirstDifferent(new Ue(a+7,c-7),!1,1,-1).toResultPoint(),t=this.getFirstDifferent(new Ue(a+7,c+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Ue(a-7,c+7),!1,-1,1).toResultPoint(),r=this.getFirstDifferent(new Ue(a-7,c-7),!1,-1,-1).toResultPoint()}let i=ge.round((e.getX()+r.getX()+t.getX()+n.getX())/4),s=ge.round((e.getY()+r.getY()+t.getY()+n.getY())/4);try{let o=new Jt(this.image,15,i,s).detect();e=o[0],t=o[1],n=o[2],r=o[3]}catch{e=this.getFirstDifferent(new Ue(i+7,s-7),!1,1,-1).toResultPoint(),t=this.getFirstDifferent(new Ue(i+7,s+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Ue(i-7,s+7),!1,-1,1).toResultPoint(),r=this.getFirstDifferent(new Ue(i-7,s-7),!1,-1,-1).toResultPoint()}return i=ge.round((e.getX()+r.getX()+t.getX()+n.getX())/4),s=ge.round((e.getY()+r.getY()+t.getY()+n.getY())/4),new Ue(i,s)}getMatrixCornerPoints(e){return this.expandSquare(e,2*this.nbCenterLayers,this.getDimension())}sampleGrid(e,t,n,r,i){let s=Mt.getInstance(),o=this.getDimension(),a=o/2-this.nbCenterLayers,c=o/2+this.nbCenterLayers;return s.sampleGrid(e,o,o,a,a,c,a,c,c,a,c,t.getX(),t.getY(),n.getX(),n.getY(),r.getX(),r.getY(),i.getX(),i.getY())}sampleLine(e,t,n){let r=0,i=this.distanceResultPoint(e,t),s=i/n,o=e.getX(),a=e.getY(),c=s*(t.getX()-e.getX())/i,u=s*(t.getY()-e.getY())/i;for(let g=0;g<n;g++)this.image.get(ge.round(o+g*c),ge.round(a+g*u))&&(r|=1<<n-g-1);return r}isWhiteOrBlackRectangle(e,t,n,r){e=new Ue(e.getX()-3,e.getY()+3),t=new Ue(t.getX()-3,t.getY()-3),n=new Ue(n.getX()+3,n.getY()-3),r=new Ue(r.getX()+3,r.getY()+3);let s=this.getColor(r,e);if(0===s)return!1;let o=this.getColor(e,t);return o===s&&(o=this.getColor(t,n),o===s)&&(o=this.getColor(n,r),o===s)}getColor(e,t){let n=this.distancePoint(e,t),r=(t.getX()-e.getX())/n,i=(t.getY()-e.getY())/n,s=0,o=e.getX(),a=e.getY(),c=this.image.get(e.getX(),e.getY()),u=Math.ceil(n);for(let p=0;p<u;p++)o+=r,a+=i,this.image.get(ge.round(o),ge.round(a))!==c&&s++;let g=s/n;return g>.1&&g<.9?0:g<=.1===c?1:-1}getFirstDifferent(e,t,n,r){let i=e.getX()+n,s=e.getY()+r;for(;this.isValid(i,s)&&this.image.get(i,s)===t;)i+=n,s+=r;for(i-=n,s-=r;this.isValid(i,s)&&this.image.get(i,s)===t;)i+=n;for(i-=n;this.isValid(i,s)&&this.image.get(i,s)===t;)s+=r;return s-=r,new Ue(i,s)}
vendor: 4,116 bytes, line 1
1expandSquare(e,t,n){let r=n/(2*t),i=e[0].getX()-e[2].getX(),s=e[0].getY()-e[2].getY(),o=(e[0].getX()+e[2].getX())/2,a=(e[0].getY()+e[2].getY())/2,c=new K(o+r*i,a+r*s),u=new K(o-r*i,a-r*s);return i=e[1].getX()-e[3].getX(),s=e[1].getY()-e[3].getY(),o=(e[1].getX()+e[3].getX())/2,a=(e[1].getY()+e[3].getY())/2,[c,new K(o+r*i,a+r*s),u,new K(o-r*i,a-r*s)]}isValid(e,t){return e>=0&&e<this.image.getWidth()&&t>0&&t<this.image.getHeight()}isValidPoint(e){let t=ge.round(e.getX()),n=ge.round(e.getY());return this.isValid(t,n)}distancePoint(e,t){return ge.distance(e.getX(),e.getY(),t.getX(),t.getY())}distanceResultPoint(e,t){return ge.distance(e.getX(),e.getY(),t.getX(),t.getY())}getDimension(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(ie.truncDivision(this.nbLayers-4,8)+1)+15}}class ft{decode(e,t=null){let n=null,r=new ct(e.getBlackMatrix()),i=null,s=null;try{let u=r.detectMirror(!1);i=u.getPoints(),this.reportFoundResultPoints(t,i),s=(new on).decode(u)}catch(u){n=u}if(null==s)try{let u=r.detectMirror(!0);i=u.getPoints(),this.reportFoundResultPoints(t,i),s=(new on).decode(u)}catch(u){throw n??u}let o=new Je(s.getText(),s.getRawBytes(),s.getNumBits(),i,V.AZTEC,we.currentTimeMillis()),a=s.getByteSegments();null!=a&&o.putMetadata(k.BYTE_SEGMENTS,a);let c=s.getECLevel();return null!=c&&o.putMetadata(k.ERROR_CORRECTION_LEVEL,c),o}reportFoundResultPoints(e,t){if(null!=e){let n=e.get(Se.NEED_RESULT_POINT_CALLBACK);null!=n&&t.forEach((r,i,s)=>{n.foundPossibleResultPoint(r)})}}reset(){}}class Ve{decode(e,t){try{return this.doDecode(e,t)}catch{if(t&&!0===t.get(Se.TRY_HARDER)&&e.isRotateSupported()){const i=e.rotateCounterClockwise(),s=this.doDecode(i,t),o=s.getResultMetadata();let a=270;null!==o&&!0===o.get(k.ORIENTATION)&&(a+=o.get(k.ORIENTATION)%360),s.putMetadata(k.ORIENTATION,a);const c=s.getResultPoints();if(null!==c){const u=i.getHeight();for(let g=0;g<c.length;g++)c[g]=new K(u-c[g].getY()-1,c[g].getX())}return s}throw new R}}reset(){}doDecode(e,t){const n=e.getWidth(),r=e.getHeight();let i=new $(n);const s=t&&!0===t.get(Se.TRY_HARDER),o=Math.max(1,r>>(s?8:5));let a;a=s?r:15;const c=Math.trunc(r/2);for(let u=0;u<a;u++){const g=Math.trunc((u+1)/2),m=c+o*(0==(1&u)?g:-g);if(m<0||m>=r)break;try{i=e.getBlackRow(m,i)}catch{continue}for(let I=0;I<2;I++){if(1===I&&(i.reverse(),t&&!0===t.get(Se.NEED_RESULT_POINT_CALLBACK))){const S=new Map;t.forEach((b,_)=>S.set(_,b)),S.delete(Se.NEED_RESULT_POINT_CALLBACK),t=S}try{const S=this.decodeRow(m,i,t);if(1===I){S.putMetadata(k.ORIENTATION,180);const b=S.getResultPoints();null!==b&&(b[0]=new K(n-b[0].getX()-1,b[0].getY()),b[1]=new K(n-b[1].getX()-1,b[1].getY()))}return S}catch{}}}throw new R}static recordPattern(e,t,n){const r=n.length;for(let c=0;c<r;c++)n[c]=0;const i=e.getSize();if(t>=i)throw new R;let s=!e.get(t),o=0,a=t;for(;a<i;){if(e.get(a)!==s)n[o]++;else{if(++o===r)break;n[o]=1,s=!s}a++}if(o!==r&&(o!==r-1||a!==i))throw new R}static recordPatternInReverse(e,t,n){let r=n.length,i=e.get(t);for(;t>0&&r>=0;)e.get(--t)!==i&&(r--,i=!i);if(r>=0)throw new R;Ve.recordPattern(e,t+1,n)}static patternMatchVariance(e,t,n){const r=e.length;let i=0,s=0;for(let c=0;c<r;c++)i+=e[c],s+=t[c];if(i<s)return Number.POSITIVE_INFINITY;const o=i/s;n*=o;let a=0;for(let c=0;c<r;c++){const u=e[c],g=t[c]*o,p=u>g?u-g:g-u;if(p>n)return Number.POSITIVE_INFINITY;a+=p}return a/i}}class W extends Ve{static findStartPattern(e){const t=e.getSize(),n=e.getNextSet(0);let r=0,i=Int32Array.from([0,0,0,0,0,0]),s=n,o=!1;for(let c=n;c<t;c++)if(e.get(c)!==o)i[r]++;else{if(5===r){let u=W.MAX_AVG_VARIANCE,g=-1;for(let p=W.CODE_START_A;p<=W.CODE_START_C;p++){const m=Ve.patternMatchVariance(i,W.CODE_PATTERNS[p],W.MAX_INDIVIDUAL_VARIANCE);m<u&&(u=m,g=p)}if(g>=0&&e.isRange(Math.max(0,s-(c-s)/2),s,!1))return Int32Array.from([s,c,g]);s+=i[0]+i[1],i=i.slice(2,i.length-1),i[r-1]=0,i[r]=0,r--}else r++;i[r]=1,o=!o}throw new R}static decodeCode(e,t,n){Ve.recordPattern(e,n,t);let r=W.MAX_AVG_VARIANCE,i=-1;for(let s=0;s<W.CODE_PATTERNS.length;s++){const a=this.patternMatchVariance(t,W.CODE_PATTERNS[s],W.MAX_INDIVIDUAL_VARIA
1NCE);a<r&&(r=a,i=s)}if(i>=0)return i;throw new R}decodeRow(e,t,n){const r=n&&!0===n.get(Se.ASSUME_GS1),i=W.findStartPattern(t),s=i[2];let o=0;const a=new Uint8Array(20);let c;switch(a[o++]=s,s){case W.CODE_START_A:c=W.CODE_CODE_A;break;case W.CODE_START_B:c=W.CODE_CODE_B;break;case W.CODE_START_C:c=W.CODE_CODE_C;break;default:throw new P}let u=!1,g=!1,p="",m=i[0],I=i[1];const S=Int32Array.from([0,0,0,0,0,0]);let b=0,_=0,z=s,X=0,B=!0,ue=!1,ae=!1;for(;!u;){const rn=g;switch(g=!1,b=_,_=W.decodeCode(t,S,I),a[o++]=_,_!==W.CODE_STOP&&(B=!0),_!==W.CODE_STOP&&(X++,z+=X*_),m=I,I+=S.reduce((Ur,zr)=>Ur+zr,0),_){case W.CODE_START_A:case W.CODE_START_B:case W.CODE_START_C:throw new P}switch(c){case W.CODE_CODE_A:if(_<64)p+=String.fromCharCode(ae===ue?" ".charCodeAt(0)+_:" ".charCodeAt(0)+_+128),ae=!1;else if(_<96)p+=String.fromCharCode(ae===ue?_-64:_+64),ae=!1;else switch(_!==W.CODE_STOP&&(B=!1),_){case W.CODE_FNC_1:r&&(p+=0===p.length?"]C1":String.fromCharCode(29));break;case W.CODE_FNC_2:case W.CODE_FNC_3:break;case W.CODE_FNC_4_A:!ue&&ae?(ue=!0,ae=!1):ue&&ae?(ue=!1,ae=!1):ae=!0;break;case W.CODE_SHIFT:g=!0,c=W.CODE_CODE_B;break;case W.CODE_CODE_B:c=W.CODE_CODE_B;break;case W.CODE_CODE_C:c=W.CODE_CODE_C;break;case W.CODE_STOP:u=!0}break;case W.CODE_CODE_B:if(_<96)p+=String.fromCharCode(ae===ue?" ".charCodeAt(0)+_:" ".charCodeAt(0)+_+128),ae=!1;else switch(_!==W.CODE_STOP&&(B=!1),_){case W.CODE_FNC_1:r&&(p+=0===p.length?"]C1":String.fromCharCode(29));break;case W.CODE_FNC_2:case W.CODE_FNC_3:break;case W.CODE_FNC_4_B:!ue&&ae?(ue=!0,ae=!1):ue&&ae?(ue=!1,ae=!1):ae=!0;break;case W.CODE_SHIFT:g=!0,c=W.CODE_CODE_A;break;case W.CODE_CODE_A:c=W.CODE_CODE_A;break;case W.CODE_CODE_C:c=W.CODE_CODE_C;break;case W.CODE_STOP:u=!0}break;case W.CODE_CODE_C:if(_<100)_<10&&(p+="0"),p+=_;else switch(_!==W.CODE_STOP&&(B=!1),_){case W.CODE_FNC_1:r&&(p+=0===p.length?"]C1":String.fromCharCode(29));break;case W.CODE_CODE_A:c=W.CODE_CODE_A;break;case W.CODE_CODE_B:c=W.CODE_CODE_B;break;case W.CODE_STOP:u=!0}}rn&&(c=c===W.CODE_CODE_A?W.CODE_CODE_B:W.CODE_CODE_A)}const xt=I-m;if(I=t.getNextUnset(I),!t.isRange(I,Math.min(t.getSize(),I+(I-m)/2),!1))throw new R;if(z-=X*b,z%103!==b)throw new Ce;const Rt=p.length;if(0===Rt)throw new R;Rt>0&&B&&(p=p.substring(0,c===W.CODE_CODE_C?Rt-2:Rt-1));const At=(i[1]+i[0])/2,Oe=m+xt/2,ot=a.length,mt=new Uint8Array(ot);for(let rn=0;rn<ot;rn++)mt[rn]=a[rn];const nn=[new K(At,e),new K(Oe,e)];return new Je(p,mt,0,nn,V.CODE_128,(new Date).getTime())}}W.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],W.MAX_AVG_VARIANCE=.25,W.MAX_INDIVIDUAL_VARIA
vendor: 8,750 bytes, line 1
1NCE=.7,W.CODE_SHIFT=98,W.CODE_CODE_C=99,W.CODE_CODE_B=100,W.CODE_CODE_A=101,W.CODE_FNC_1=102,W.CODE_FNC_2=97,W.CODE_FNC_3=96,W.CODE_FNC_4_A=101,W.CODE_FNC_4_B=100,W.CODE_START_A=103,W.CODE_START_B=104,W.CODE_START_C=105,W.CODE_STOP=106;let cn=(()=>{class l extends Ve{constructor(t=!1,n=!1){super(),this.usingCheckDigit=t,this.extendedMode=n,this.decodeRowResult="",this.counters=new Int32Array(9)}decodeRow(t,n,r){let i=this.counters;i.fill(0),this.decodeRowResult="";let c,u,s=l.findAsteriskPattern(n,i),o=n.getNextSet(s[1]),a=n.getSize();do{l.recordPattern(n,o,i);let b=l.toNarrowWidePattern(i);if(b<0)throw new R;c=l.patternToChar(b),this.decodeRowResult+=c,u=o;for(let _ of i)o+=_;o=n.getNextSet(o)}while("*"!==c);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);let m,g=0;for(let b of i)g+=b;if(o!==a&&2*(o-u-g)<g)throw new R;if(this.usingCheckDigit){let b=this.decodeRowResult.length-1,_=0;for(let z=0;z<b;z++)_+=l.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(z));if(this.decodeRowResult.charAt(b)!==l.ALPHABET_STRING.charAt(_%43))throw new Ce;this.decodeRowResult=this.decodeRowResult.substring(0,b)}if(0===this.decodeRowResult.length)throw new R;m=this.extendedMode?l.decodeExtended(this.decodeRowResult):this.decodeRowResult;let S=u+g/2;return new Je(m,null,0,[new K((s[1]+s[0])/2,t),new K(S,t)],V.CODE_39,(new Date).getTime())}static findAsteriskPattern(t,n){let r=t.getSize(),i=t.getNextSet(0),s=0,o=i,a=!1,c=n.length;for(let u=i;u<r;u++)if(t.get(u)!==a)n[s]++;else{if(s===c-1){if(this.toNarrowWidePattern(n)===l.ASTERISK_ENCODING&&t.isRange(Math.max(0,o-Math.floor((u-o)/2)),o,!1))return[o,u];o+=n[0]+n[1],n.copyWithin(0,2,2+s-1),n[s-1]=0,n[s]=0,s--}else s++;n[s]=1,a=!a}throw new R}static toNarrowWidePattern(t){let i,n=t.length,r=0;do{let s=2147483647;for(let c of t)c<s&&c>r&&(s=c);r=s,i=0;let o=0,a=0;for(let c=0;c<n;c++){let u=t[c];u>r&&(a|=1<<n-1-c,i++,o+=u)}if(3===i){for(let c=0;c<n&&i>0;c++){let u=t[c];if(u>r&&(i--,2*u>=o))return-1}return a}}while(i>3);return-1}static patternToChar(t){for(let n=0;n<l.CHARACTER_ENCODINGS.length;n++)if(l.CHARACTER_ENCODINGS[n]===t)return l.ALPHABET_STRING.charAt(n);if(t===l.ASTERISK_ENCODING)return"*";throw new R}static decodeExtended(t){let n=t.length,r="";for(let i=0;i<n;i++){let s=t.charAt(i);if("+"===s||"$"===s||"%"===s||"/"===s){let o=t.charAt(i+1),a="\0";switch(s){case"+":if(!(o>="A"&&o<="Z"))throw new P;a=String.fromCharCode(o.charCodeAt(0)+32);break;case"$":if(!(o>="A"&&o<="Z"))throw new P;a=String.fromCharCode(o.charCodeAt(0)-64);break;case"%":if(o>="A"&&o<="E")a=String.fromCharCode(o.charCodeAt(0)-38);else if(o>="F"&&o<="J")a=String.fromCharCode(o.charCodeAt(0)-11);else if(o>="K"&&o<="O")a=String.fromCharCode(o.charCodeAt(0)+16);else if(o>="P"&&o<="T")a=String.fromCharCode(o.charCodeAt(0)+43);else if("U"===o)a="\0";else if("V"===o)a="@";else if("W"===o)a="`";else{if("X"!==o&&"Y"!==o&&"Z"!==o)throw new P;a="\x7f"}break;case"/":if(o>="A"&&o<="O")a=String.fromCharCode(o.charCodeAt(0)-32);else{if("Z"!==o)throw new P;a=":"}}r+=a,i++}else r+=s}return r}}return l.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",l.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],l.ASTERISK_ENCODING=148,l})();class be extends Ve{constructor(){super(...arguments),this.narrowLineWidth=-1}decodeRow(e,t,n){let r=this.decodeStart(t),i=this.decodeEnd(t),s=new fe;be.decodeMiddle(t,r[1],i[0],s);let o=s.toString(),a=null;null!=n&&(a=n.get(Se.ALLOWED_LENGTHS)),null==a&&(a=be.DEFAULT_ALLOWED_LENGTHS);let c=o.length,u=!1,g=0;for(let I of a){if(c===I){u=!0;break}I>g&&(g=I)}if(!u&&c>g&&(u=!0),!u)throw new P;const p=[new K(r[1],e),new K(i[0],e)];return new Je(o,null,0,p,V.ITF,(new Date).getTime())}static decodeMiddle(e,t,n,r){let i=new Int32Array(10),s=new Int32Array(5),o=new Int32Array(5);for(i.fill(0),s.fill(0),o.fill(0);t<n;){Ve.recordPattern(e,t,i);for(let c=0;c<5;c++){let u=2*c;s[c]=i[u],o[c]=i[u+1]}let a=be.decodeDigit(s);r.append(a.toString()),a=this.decodeDigit(o),r.append(a.toString()),i.forEach(function(c){t+=c})}}decodeStart(e){let t=be.skipWhiteSpace(e),n=be.findGuardPattern(e,t,be.START_PATTERN);return this.narrowLineWidth=(n[1]-n[0])/4,this.validateQuietZone(e,n[0]),n}validateQuietZone(e,t){let n=10*this.narrowLineWidth;n=n<t?n:t;for(let r=t-1;n>0&&r>=0&&!e.get(r);r--)n--;if(0!==n)throw new R}static skipWhiteSpace(e){const t=e.getSize(),n=e.getNextSet(0);if(n===t)throw new R;return n}decodeEnd(e){e.reverse();try{let n,t=be.skipWhiteSpace(e);try{n=be.findGuardPattern(e,t,be.END_PATTERN_REVERSED[0])}catch(i){i instanceof R&&(n=be.findGuardPattern(e,t,be.END_PATTERN_REVERSED[1]))}this.validateQuietZone(e,n[0]);let r=n[0];return n[0]=e.getSize()-n[1],n[1]=e.getSize()-r,n}finally{e.reverse()}}static findGuardPattern(e,t,n){let r=n.length,i=new Int32Array(r),s=e.getSize(),o=!1,a=0,c=t;i.fill(0);for(let u=t;u<s;u++)if(e.get(u)!==o)i[a]++;else{if(a===r-1){if(Ve.patternMatchVariance(i,n,be.MAX_INDIVIDUAL_VARIANCE)<be.MAX_AVG_VARIANCE)return[c,u];c+=i[0]+i[1],we.arraycopy(i,2,i,0,a-1),i[a-1]=0,i[a]=0,a--}else a++;i[a]=1,o=!o}throw new R}static decodeDigit(e){let t=be.MAX_AVG_VARIANCE,n=-1,r=be.PATTERNS.length;for(let i=0;i<r;i++){let o=Ve.patternMatchVariance(e,be.PATTERNS[i],be.MAX_INDIVIDUAL_VARIANCE);o<t?(t=o,n=i):o===t&&(n=-1)}if(n>=0)return n%10;throw new R}}be.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],be.MAX_AVG_VARIANCE=.38,be.MAX_INDIVIDUAL_VARIANCE=.5,be.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],be.START_PATTERN=Int32Array.from([1,1,1,1]),be.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])];class ze extends Ve{constructor(){super(...arguments),this.decodeRowStringBuffer=""}static findStartGuardPattern(e){let n,t=!1,r=0,i=Int32Array.from([0,0,0]);for(;!t;){i=Int32Array.from([0,0,0]),n=ze.findGuardPattern(e,r,!1,this.START_END_PATTERN,i);let s=n[0];r=n[1];let o=s-(r-s);o>=0&&(t=e.isRange(o,s,!1))}return n}static checkChecksum(e){return ze.checkStandardUPCEANChecksum(e)}static checkStandardUPCEANChecksum(e){let t=e.length;if(0===t)return!1;let n=parseInt(e.charAt(t-1),10);return ze.getStandardUPCEANChecksum(e.substring(0,t-1))===n}static getStandardUPCEANChecksum(e){let t=e.length,n=0;for(let r=t-1;r>=0;r-=2){let i=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0);if(i<0||i>9)throw new P;n+=i}n*=3;for(let r=t-2;r>=0;r-=2){let i=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0);if(i<0||i>9)throw new P;n+=i}return(1e3-n)%10}static decodeEnd(e,t){return ze.findGuardPattern(e,t,!1,ze.START_END_PATTERN,new Int32Array(ze.START_END_PATTERN.length).fill(0))}static findGuardPatternWithoutCounters(e,t,n,r){return this.findGuardPattern(e,t,n,r,new Int32Array(r.length))}static findGuardPattern(e,t,n,r,i){let s=e.getSize(),o=0,a=t=n?e.getNextUnset(t):e.getNextSet(t),c=r.length,u=n;for(let g=t;g<s;g++)if(e.get(g)!==u)i[o]++;else{if(o===c-1){if(Ve.patternMatchVariance(i,r,ze.MAX_INDIVIDUAL_VARIANCE)<ze.MAX_AVG_VARIANCE)return Int32Array.from([a,g]);a+=i[0]+i[1];let p=i.slice(2,i.length-1);for(let m=0;m<o-1;m++)i[m]=p[m];i[o-1]=0,i[o]=0,o--}else o++;i[o]=1,u=!u}throw new R}static decodeDigit(e,t,n,r){this.recordPattern(e,n,t);let i=this.MAX_AVG_VARIANCE,s=-1,o=r.length;for(let a=0;a<o;a++){let u=Ve.patternMatchVariance(t,r[a],ze.MAX_INDIVIDUAL_VARIANCE);u<i&&(i=u,s=a)}if(s>=0)return s;throw new R}}ze.MAX_AVG_VARIANCE=.48,ze.MAX_INDIVIDUAL_VARIANCE=.7,ze.START_END_PATTERN=Int32Array.from([1,1,1]),ze.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),ze.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),ze.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])];class Gt{constructor(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}decodeRow(e,t,n){let r=this.decodeRowStringBuffer,i=this.decodeMiddle(t,n,r),s=r.toString(),o=Gt.parseExtensionString(s),a=[new K((n[0]+n[1])/2,e),new
vendor: 4,450 bytes, line 1
1K(i,e)],c=new Je(s,null,0,a,V.UPC_EAN_EXTENSION,(new Date).getTime());return null!=o&&c.putAllMetadata(o),c}decodeMiddle(e,t,n){let r=this.decodeMiddleCounters;r[0]=0,r[1]=0,r[2]=0,r[3]=0;let i=e.getSize(),s=t[1],o=0;for(let c=0;c<5&&s<i;c++){let u=ze.decodeDigit(e,r,s,ze.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+u%10);for(let g of r)s+=g;u>=10&&(o|=1<<4-c),4!==c&&(s=e.getNextSet(s),s=e.getNextUnset(s))}if(5!==n.length)throw new R;let a=this.determineCheckDigit(o);if(Gt.extensionChecksum(n.toString())!==a)throw new R;return s}static extensionChecksum(e){let t=e.length,n=0;for(let r=t-2;r>=0;r-=2)n+=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0);n*=3;for(let r=t-1;r>=0;r-=2)n+=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0);return n*=3,n%10}determineCheckDigit(e){for(let t=0;t<10;t++)if(e===this.CHECK_DIGIT_ENCODINGS[t])return t;throw new R}static parseExtensionString(e){if(5!==e.length)return null;let t=Gt.parseExtension5String(e);return null==t?null:new Map([[k.SUGGESTED_PRICE,t]])}static parseExtension5String(e){let t;switch(e.charAt(0)){case"0":t="\xa3";break;case"5":t="$";break;case"9":switch(e){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}t="";break;default:t=""}let n=parseInt(e.substring(1)),i=n%100;return t+(n/100).toString()+"."+(i<10?"0"+i:i.toString())}}class nt{constructor(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}decodeRow(e,t,n){let r=this.decodeRowStringBuffer,i=this.decodeMiddle(t,n,r),s=r.toString(),o=nt.parseExtensionString(s),a=[new K((n[0]+n[1])/2,e),new K(i,e)],c=new Je(s,null,0,a,V.UPC_EAN_EXTENSION,(new Date).getTime());return null!=o&&c.putAllMetadata(o),c}decodeMiddle(e,t,n){let r=this.decodeMiddleCounters;r[0]=0,r[1]=0,r[2]=0,r[3]=0;let i=e.getSize(),s=t[1],o=0;for(let a=0;a<2&&s<i;a++){let c=ze.decodeDigit(e,r,s,ze.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+c%10);for(let u of r)s+=u;c>=10&&(o|=1<<1-a),1!==a&&(s=e.getNextSet(s),s=e.getNextUnset(s))}if(2!==n.length)throw new R;if(parseInt(n.toString())%4!==o)throw new R;return s}static parseExtensionString(e){return 2!==e.length?null:new Map([[k.ISSUE_NUMBER,parseInt(e)]])}}class En{static decodeRow(e,t,n){let r=ze.findGuardPattern(t,n,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new Gt).decodeRow(e,t,r)}catch{return(new nt).decodeRow(e,t,r)}}}En.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]);class Ee extends ze{constructor(){super(),this.decodeRowStringBuffer="",Ee.L_AND_G_PATTERNS=Ee.L_PATTERNS.map(e=>Int32Array.from(e));for(let e=10;e<20;e++){let t=Ee.L_PATTERNS[e-10],n=new Int32Array(t.length);for(let r=0;r<t.length;r++)n[r]=t[t.length-r-1];Ee.L_AND_G_PATTERNS[e]=n}}decodeRow(e,t,n){let r=Ee.findStartGuardPattern(t),i=null==n?null:n.get(Se.NEED_RESULT_POINT_CALLBACK);if(null!=i){const B=new K((r[0]+r[1])/2,e);i.foundPossibleResultPoint(B)}let s=this.decodeMiddle(t,r,this.decodeRowStringBuffer),o=s.rowOffset,a=s.resultString;if(null!=i){const B=new K(o,e);i.foundPossibleResultPoint(B)}let c=this.decodeEnd(t,o);if(null!=i){const B=new K((c[0]+c[1])/2,e);i.foundPossibleResultPoint(B)}let u=c[1],g=u+(u-c[0]);if(g>=t.getSize()||!t.isRange(u,g,!1))throw new R;let p=a.toString();if(p.length<8)throw new P;if(!Ee.checkChecksum(p))throw new Ce;let m=(r[1]+r[0])/2,I=(c[1]+c[0])/2,S=this.getBarcodeFormat(),b=[new K(m,e),new K(I,e)],_=new Je(p,null,0,b,S,(new Date).getTime()),z=0;try{let B=En.decodeRow(e,t,c[1]);_.putMetadata(k.UPC_EAN_EXTENSION,B.getText()),_.putAllMetadata(B.getResultMetadata()),_.addResultPoints(B.getResultPoints()),z=B.getText().length}catch{}let X=null==n?null:n.get(Se.ALLOWED_EAN_EXTENSIONS);if(null!=X){let B=!1;for(let ue in X)if(z.toString()===ue){B=!0;break}if(!B)throw new R}return _}decodeEnd(e,t){return Ee.findGuardPattern(e,t,!1,Ee.START_END_PATTERN,new Int32Array(Ee.START_END_PATTERN.length).fill(0))}static checkChecksum(e){return Ee.checkStandardUPCEANChecksum(e)}static checkStandardUPCEANChecksum(e){let t=e.length;if(0===t)return!1;let n=parseInt(e.charAt(t-1),10);return Ee.getStandardUPCEANChecksum(e.substring(0,t-1))===n}static getStandardUPCEANChecksum(e){let t=e.length,n=0;for(let r=t-1;r>=0;r-=2){let i=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0);if(i<0||i>9)throw new P;n+=i}n*=3;for(let r=t-2;r>=0;r-=2){let i=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0);if(i<0||i>9)throw new P;n+=i}return(1e3-n)%10}}let ln=(()=>
vendor: 5,720 bytes, line 1
1{class l extends Ee{constructor(){super(),this.decodeMiddleCounters=Int32Array.from([0,0,0,0])}decodeMiddle(t,n,r){let i=this.decodeMiddleCounters;i[0]=0,i[1]=0,i[2]=0,i[3]=0;let s=t.getSize(),o=n[1],a=0;for(let u=0;u<6&&o<s;u++){let g=Ee.decodeDigit(t,i,o,Ee.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+g%10);for(let p of i)o+=p;g>=10&&(a|=1<<5-u)}r=l.determineFirstDigit(r,a),o=Ee.findGuardPattern(t,o,!0,Ee.MIDDLE_PATTERN,new Int32Array(Ee.MIDDLE_PATTERN.length).fill(0))[1];for(let u=0;u<6&&o<s;u++){let g=Ee.decodeDigit(t,i,o,Ee.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+g);for(let p of i)o+=p}return{rowOffset:o,resultString:r}}getBarcodeFormat(){return V.EAN_13}static determineFirstDigit(t,n){for(let r=0;r<10;r++)if(n===this.FIRST_DIGIT_ENCODINGS[r])return String.fromCharCode("0".charCodeAt(0)+r)+t;throw new R}}return l.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],l})();class d extends Ee{constructor(){super(),this.decodeMiddleCounters=Int32Array.from([0,0,0,0])}decodeMiddle(e,t,n){const r=this.decodeMiddleCounters;r[0]=0,r[1]=0,r[2]=0,r[3]=0;let i=e.getSize(),s=t[1];for(let a=0;a<4&&s<i;a++){let c=Ee.decodeDigit(e,r,s,Ee.L_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+c);for(let u of r)s+=u}s=Ee.findGuardPattern(e,s,!0,Ee.MIDDLE_PATTERN,new Int32Array(Ee.MIDDLE_PATTERN.length).fill(0))[1];for(let a=0;a<4&&s<i;a++){let c=Ee.decodeDigit(e,r,s,Ee.L_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+c);for(let u of r)s+=u}return{rowOffset:s,resultString:n}}getBarcodeFormat(){return V.EAN_8}}class h extends Ee{constructor(){super(...arguments),this.ean13Reader=new ln}getBarcodeFormat(){return V.UPC_A}decode(e,t){return this.maybeReturnResult(this.ean13Reader.decode(e))}decodeRow(e,t,n){return this.maybeReturnResult(this.ean13Reader.decodeRow(e,t,n))}decodeMiddle(e,t,n){return this.ean13Reader.decodeMiddle(e,t,n)}maybeReturnResult(e){let t=e.getText();if("0"===t.charAt(0)){let n=new Je(t.substring(1),null,null,e.getResultPoints(),V.UPC_A);return null!=e.getResultMetadata()&&n.putAllMetadata(e.getResultMetadata()),n}throw new R}reset(){this.ean13Reader.reset()}}class f extends Ee{constructor(){super(),this.decodeMiddleCounters=new Int32Array(4)}decodeMiddle(e,t,n){const r=this.decodeMiddleCounters.map(c=>c);r[0]=0,r[1]=0,r[2]=0,r[3]=0;const i=e.getSize();let s=t[1],o=0;for(let c=0;c<6&&s<i;c++){const u=f.decodeDigit(e,r,s,f.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+u%10);for(let g of r)s+=g;u>=10&&(o|=1<<5-c)}return{rowOffset:s,resultString:f.determineNumSysAndCheckDigit(n,o)}}decodeEnd(e,t){return f.findGuardPatternWithoutCounters(e,t,!0,f.MIDDLE_END_PATTERN)}checkChecksum(e){return Ee.checkChecksum(f.convertUPCEtoUPCA(e))}static determineNumSysAndCheckDigit(e,t){for(let n=0;n<=1;n++)for(let r=0;r<10;r++)if(t===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[n][r])return String.fromCharCode("0".charCodeAt(0)+n)+e+String.fromCharCode("0".charCodeAt(0)+r);throw R.getNotFoundInstance()}getBarcodeFormat(){return V.UPC_E}static convertUPCEtoUPCA(e){const t=e.slice(1,7).split("").map(i=>i.charCodeAt(0)),n=new fe;n.append(e.charAt(0));let r=t[5];switch(r){case 0:case 1:case 2:n.appendChars(t,0,2),n.append(r),n.append("0000"),n.appendChars(t,2,3);break;case 3:n.appendChars(t,0,3),n.append("00000"),n.appendChars(t,3,2);break;case 4:n.appendChars(t,0,4),n.append("00000"),n.append(t[4]);break;default:n.appendChars(t,0,5),n.append("0000"),n.append(r)}return e.length>=8&&n.append(e.charAt(7)),n.toString()}}f.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),f.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,26])];class A extends Ve{constructor(e){super();let t=null==e?null:e.get(Se.POSSIBLE_FORMATS),n=[];T(t)?(n.push(new ln),n.push(new h),n.push(new d),n.push(new f)):(t.indexOf(V.EAN_13)>-1&&n.push(new ln),t.indexOf(V.UPC_A)>-1&&n.push(new h),t.indexOf(V.EAN_8)>-1&&n.push(new d),t.indexOf(V.UPC_E)>-1&&n.push(new f)),this.readers=n}decodeRow(e,t,n){for(let r of this.readers)try{const i=r.decodeRow(e,t,n),s=i.getBarcodeFormat()===V.EAN_13&&"0"===i.getText().charAt(0),o=null==n?null:n.get(Se.POSSIBLE_FORMATS),a=null==o||o.includes(V.UPC_A);if(s&&a){const c=i.getRawBytes(),u=new Je(i.getText().substring(1),c,c?c.length:null,i.getResultPoints(),V.UPC_A);return u.putAllMetadata(i.getResultMetadata()),u}return i}catch{}throw new R}reset(){for(let e of this.readers)e.reset()}}let w=(()=>{class l extends Ve{constructor(){super(),this.decodeFinderCounters=new Int32Array(4),this.dataCharacterCounters=new Int32Array(8),this.oddRoundingErrors=new Array(4),this.evenRoundingErrors=new Array(4),this.oddCounts=new Array(this.dataCharacterCounters.length/2),this.evenCounts=new Array(this.dataCharacterCounters.length/2)}getDecodeFinderCounters(){return this.decodeFinderCounters}getDataCharacterCounters(){return this.dataCharacterCounters}getOddRoundingErrors(){return this.oddRoundingErrors}getEvenRoundingErrors(){return this.evenRoundingErrors}getOddCounts(){return this.oddCounts}getEvenCounts(){return this.evenCounts}parseFinderValue(t,n){for(let r=0;r<n.length;r++)if(Ve.patternMatchVariance(t,n[r],l.MAX_INDIVIDUAL_VARIANCE)<l.MAX_AVG_VARIANCE)return r;throw new R}static count(t){return ge.sum(new Int32Array(t))}static increment(t,n){let r=0,i=n[0];for(let s=1;s<t.length;s++)n[s]>i&&(i=n[s],r=s);t[r]++}static decrement(t,n){let r=0,i=n[0];for(let s=1;s<t.length;s++)n[s]<i&&(i=n[s],r=s);t[r]--}static isFinderPattern(t){let n=t[0]+t[1],i=n/(n+t[2]+t[3]);if(i>=l.MIN_FINDER_PATTERN_RATIO&&i<=l.MAX_FINDER_PATTERN_RATIO){let s=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER;for(let a of t)a>o&&(o=a),a<s&&(s=a);return o<10*s}return!1}}
1return l.MAX_AVG_VARIANCE=.2,l.MAX_INDIVIDUAL_VARIANCE=.45,l.MIN_FINDER_PATTERN_RATIO=9.5/12,l.MAX_FINDER_PATTERN_RATIO=12.5/14,l})();class x{constructor(e,t){this.value=e,this.checksumPortion=t}getValue(){return this.value}getChecksumPortion(){return this.checksumPortion}toString(){return this.value+"("+this.checksumPortion+")"}equals(e){return e instanceof x&&this.value===e.value&&this.checksumPortion===e.checksumPortion}hashCode(){return this.value^this.checksumPortion}}class y{constructor(e,t,n,r,i){this.value=e,this.startEnd=t,this.value=e,this.startEnd=t,this.resultPoints=new Array,this.resultPoints.push(new K(n,i)),this.resultPoints.push(new K(r,i))}getValue(){return this.value}getStartEnd(){return this.startEnd}getResultPoints(){return this.resultPoints}equals(e){return e instanceof y&&this.value===e.value}hashCode(){return this.value}}class D{constructor(){}static getRSSvalue(e,t,n){let r=0;for(let a of e)r+=a;let i=0,s=0,o=e.length;for(let a=0;a<o-1;a++){let c;for(c=1,s|=1<<a;c<e[a];c++,s&=~(1<<a)){let u=D.combins(r-c-1,o-a-2);if(n&&0===s&&r-c-(o-a-1)>=o-a-1&&(u-=D.combins(r-c-(o-a),o-a-2)),o-a-1>1){let g=0;for(let p=r-c-(o-a-2);p>t;p--)g+=D.combins(r-c-p-1,o-a-3);u-=g*(o-1-a)}else r-c>t&&u--;i+=u}r-=c}return i}static combins(e,t){let n,r;e-t>t?(r=t,n=e-t):(r=e-t,n=t);let i=1,s=1;for(let o=e;o>n;o--)i*=o,s<=r&&(i/=s,s++);for(;s<=r;)i/=s,s++;return i}}class F{static buildBitArray(e){let t=2*e.length-1;null==e[e.length-1].getRightChar()&&(t-=1);let r=new $(12*t),i=0,o=e[0].getRightChar().getValue();for(let a=11;a>=0;--a)o&1<<a&&r.set(i),i++;for(let a=1;a<e.length;++a){let c=e[a],u=c.getLeftChar().getValue();for(let g=11;g>=0;--g)u&1<<g&&r.set(i),i++;if(null!=c.getRightChar()){let g=c.getRightChar().getValue();for(let p=11;p>=0;--p)g&1<<p&&r.set(i),i++}}return r}}class C{constructor(e,t){t?this.decodedInformation=null:(this.finished=e,this.decodedInformation=t)}getDecodedInformation(){return this.decodedInformation}isFinished(){return this.finished}}class v{constructor(e){this.newPosition=e}getNewPosition(){return this.newPosition}}let G=(()=>{class l extends v{constructor(t,n){super(t),this.value=n}getValue(){return this.value}isFNC1(){return this.value===l.FNC1}}return l.FNC1="$",l})();class xe extends v{constructor(e,t,n){super(e),n?(this.remaining=!0,this.remainingValue=this.remainingValue):(this.remaining=!1,this.remainingValue=0),this.newString=t}getNewString(){return this.newString}isRemaining(){return this.remaining}getRemainingValue(){return this.remainingValue}}let Ie=(()=>{class l extends v{constructor(t,n,r){if(super(t),n<0||n>10||r<0||r>10)throw new P;this.firstDigit=n,this.secondDigit=r}getFirstDigit(){return this.firstDigit}getSecondDigit(){return this.secondDigit}getValue(){return 10*this.firstDigit+this.secondDigit}isFirstDigitFNC1(){return this.firstDigit===l.FNC1}isSecondDigitFNC1(){return this.secondDigit===l.FNC1}isAnyFNC1(){return this.firstDigit===l.FNC1||this.secondDigit===l.FNC1}}return l.FNC1=10,l})();class Y{constructor(){}static parseFieldsInGeneralPurpose(e){if(!e)return null;if(e.length<2)throw new R;let t=e.substring(0,2);for(let i of Y.TWO_DIGIT_DATA_LENGTH)if(i[0]===t)return i[1]===Y.VARIABLE_LENGTH?Y.processVariableAI(2,i[2],e):Y.processFixedAI(2,i[1],e);if(e.length<3)throw new R;let n=e.substring(0,3);for(let i of Y.THREE_DIGIT_DATA_LENGTH)if(i[0]===n)return i[1]===Y.VARIABLE_LENGTH?Y.processVariableAI(3,i[2],e):Y.processFixedAI(3,i[1],e);for(let i of Y.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH)if(i[0]===n)return i[1]===Y.VARIABLE_LENGTH?Y.processVariableAI(4,i[2],e):Y.processFixedAI(4,i[1],e);if(e.length<4)throw new R;let r=e.substring(0,4);for(let i of Y.FOUR_DIGIT_DATA_LENGTH)if(i[0]===r)return i[1]===Y.VARIABLE_LENGTH?Y.processVariableAI(4,i[2],e):Y.processFixedAI(4,i[1],e);throw new R}
vendor: 9,261 bytes, line 1
1static processFixedAI(e,t,n){if(n.length<e)throw new R;let r=n.substring(0,e);if(n.length<e+t)throw new R;let i=n.substring(e,e+t),s=n.substring(e+t),o="("+r+")"+i,a=Y.parseFieldsInGeneralPurpose(s);return null==a?o:o+a}static processVariableAI(e,t,n){let i,r=n.substring(0,e);i=n.length<e+t?n.length:e+t;let s=n.substring(e,i),o=n.substring(i),a="("+r+")"+s,c=Y.parseFieldsInGeneralPurpose(o);return null==c?a:a+c}}Y.VARIABLE_LENGTH=[],Y.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",Y.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",Y.VARIABLE_LENGTH,20],["22",Y.VARIABLE_LENGTH,29],["30",Y.VARIABLE_LENGTH,8],["37",Y.VARIABLE_LENGTH,8],["90",Y.VARIABLE_LENGTH,30],["91",Y.VARIABLE_LENGTH,30],["92",Y.VARIABLE_LENGTH,30],["93",Y.VARIABLE_LENGTH,30],["94",Y.VARIABLE_LENGTH,30],["95",Y.VARIABLE_LENGTH,30],["96",Y.VARIABLE_LENGTH,30],["97",Y.VARIABLE_LENGTH,3],["98",Y.VARIABLE_LENGTH,30],["99",Y.VARIABLE_LENGTH,30]],Y.THREE_DIGIT_DATA_LENGTH=[["240",Y.VARIABLE_LENGTH,30],["241",Y.VARIABLE_LENGTH,30],["242",Y.VARIABLE_LENGTH,6],["250",Y.VARIABLE_LENGTH,30],["251",Y.VARIABLE_LENGTH,30],["253",Y.VARIABLE_LENGTH,17],["254",Y.VARIABLE_LENGTH,20],["400",Y.VARIABLE_LENGTH,30],["401",Y.VARIABLE_LENGTH,30],["402",17],["403",Y.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",Y.VARIABLE_LENGTH,20],["421",Y.VARIABLE_LENGTH,15],["422",3],["423",Y.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],Y.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",Y.VARIABLE_LENGTH,15],["391",Y.VARIABLE_LENGTH,18],["392",Y.VARIABLE_LENGTH,15],["393",Y.VARIABLE_LENGTH,18],["703",Y.VARIABLE_LENGTH,30]],Y.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",Y.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",Y.VARIABLE_LENGTH,20],["8003",Y.VARIABLE_LENGTH,30],["8004",Y.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",Y.VARIABLE_LENGTH,30],["8008",Y.VARIABLE_LENGTH,12],["8018",18],["8020",Y.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",Y.VARIABLE_LENGTH,70],["8200",Y.VARIABLE_LENGTH,70]];class Me{constructor(e){this.buffer=new fe,this.information=e}decodeAllCodes(e,t){let n=t,r=null;for(;;){let i=this.decodeGeneralPurposeField(n,r),s=Y.parseFieldsInGeneralPurpose(i.getNewString());if(null!=s&&e.append(s),r=i.isRemaining()?""+i.getRemainingValue():null,n===i.getNewPosition())break;n=i.getNewPosition()}return e.toString()}isStillNumeric(e){if(e+7>this.information.getSize())return e+4<=this.information.getSize();for(let t=e;t<e+3;++t)if(this.information.get(t))return!0;return this.information.get(e+3)}decodeNumeric(e){if(e+7>this.information.getSize()){let i=this.extractNumericValueFromBitArray(e,4);return new Ie(this.information.getSize(),0===i?Ie.FNC1:i-1,Ie.FNC1)}let t=this.extractNumericValueFromBitArray(e,7);return new Ie(e+7,(t-8)/11,(t-8)%11)}extractNumericValueFromBitArray(e,t){return Me.extractNumericValueFromBitArray(this.information,e,t)}static extractNumericValueFromBitArray(e,t,n){let r=0;for(let i=0;i<n;++i)e.get(t+i)&&(r|=1<<n-i-1);return r}decodeGeneralPurposeField(e,t){this.buffer.setLengthToZero(),null!=t&&this.buffer.append(t),this.current.setPosition(e);let n=this.parseBlocks();return null!=n&&n.isRemaining()?new xe(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()):new xe(this.current.getPosition(),this.buffer.toString())}parseBlocks(){let e,t;do{let n=this.current.getPosition();if(this.current.isAlpha()?(t=this.parseAlphaBlock(),e=t.isFinished()):this.current.isIsoIec646()?(t=this.parseIsoIec646Block(),e=t.isFinished()):(t=this.parseNumericBlock(),e=t.isFinished()),n===this.current.getPosition()&&!e)break}while(!e);return t.getDecodedInformation()}parseNumericBlock(){for(;this.isStillNumeric(this.current.getPosition());){let e=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFirstDigitFNC1()){let t;return t=e.isSecondDigitFNC1()?new xe(this.current.getPosition(),this.buffer.toString()):new xe(this.current.getPosition(),this.buffer.toString(),e.getSecondDigit()),new C(!0,t)}if(this.buffer.append(e.getFirstDigit()),e.isSecondDigitFNC1()){let t=new xe(this.current.getPosition(),this.buffer.toString());return new C(!0,t)}this.buffer.append(e.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new C(!1)}parseIsoIec646Block(){for(;this.isStillIsoIec646(this.current.getPosition());){let e=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){let t=new xe(this.current.getPosition(),this.buffer.toString());return new C(!0,t)}this.buffer.append(e.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new C(!1)}parseAlphaBlock(){for(;this.isStillAlpha(this.current.getPosition());){let e=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){let t=new xe(this.current.getPosition(),this.buffer.toString());return new C(!0,t)}this.buffer.append(e.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new C(!1)}isStillIsoIec646(e){if(e+5>this.information.getSize())return!1;let t=this.extractNumericValueFromBitArray(e,5);if(t>=5&&t<16)return!0;if(e+7>this.information.getSize())return!1;let n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<116)return!0;if(e+8>this.information.getSize())return!1;let r=this.extractNumericValueFromBitArray(e,8);return r>=232&&r<253}decodeIsoIec646(e){let t=this.extractNumericValueFromBitArray(e,5);if(15===t)return new G(e+5,G.FNC1);if(t>=5&&t<15)return new G(e+5,"0"+(t-5));let i,n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<90)return new G(e+7,""+(n+1));if(n>=90&&n<116)return new G(e+7,""+(n+7));switch(this.extractNumericValueFromBitArray(e,8)){case 232:i="!";break;case 233:i='"';break;case 234:i="%";break;case 235:i="&";break;case 236:i="'";break;case 237:i="(";break;case 238:i=")";break;case 239:i="*";break;case 240:i="+";break;case 241:i=",";break;case 242:i="-";break;case 243:i=".";break;case 244:i="/";break;case 245:i=":";break;case 246:i=";";break;case 247:i="<";break;case 248:i="=";break;case 249:i=">";break;case 250:i="?";break;case 251:i="_";break;case 252:i=" ";break;default:throw new P}return new G(e+8,i)}isStillAlpha(e){if(e+5>this.information.getSize())return!1;let t=this.extractNumericValueFromBitArray(e,5);if(t>=5&&t<16)return!0;if(e+6>this.information.getSize())return!1;let n=this.extractNumericValueFromBitArray(e,6);return n>=16&&n<63}decodeAlphanumeric(e){let t=this.extractNumericValueFromBitArray(e,5);if(15===t)return new G(e+5,G.FNC1);if(t>=5&&t<15)return new G(e+5,"0"+(t-5));let r,n=this.extractNumericValueFromBitArray(e,6);if(n>=32&&n<58)return new G(e+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new wt("Decoding invalid alphanumeric value: "+n)}return new G(e+6,r)}isAlphaTo646ToAlphaLatch(e){if(e+1>this.information.getSize())return!1;for(let t=0;t<5&&t+e<this.information.getSize();++t)if(2===t){if(!this.information.get(e+2))return!1}else if(this.information.get(e+t))return!1;return!0}isAlphaOr646ToNumericLatch(e){if(e+3>this.information.getSize())return!1;for(let t=e;t<e+3;++t)if(this.information.get(t))return!1;return!0}isNumericToAlphaNumericLatch(e){if(e+1>this.information.getSize())return!1;for(let t=0;t<4&&t+e<this.information.getSize();++t)if(this.information.get(e+t))return!1;return!0}}class Pe{constructor(e){this.information=e,this.generalDecoder=new Me(e)}getInformation(){return this.information}getGeneralDecoder(){return this.generalDecoder}}let Fe=(()=>{class l extends Pe{constructor(t){super(t)}encodeCompressedGtin(t,n){t.append("(01)");let r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,n,r)}encodeCompressedGtinWithoutAI(t,n,r){for(let i=0;i<4;++i){let s=this.getGeneralDecoder().extractNumericValueFromBitArray(n+10*i,10);s/100==0&&t.append("0"),s/10==0&&t.append("0"),t.append(s)}l.appendCheckDigit(t,r)}static appendCheckDigit(t,n){let r=0;for(let i=0;i<13;
1i++){let s=t.charAt(i+n).charCodeAt(0)-"0".charCodeAt(0);r+=1&i?s:3*s}r=10-r%10,10===r&&(r=0),t.append(r)}}return l.GTIN_SIZE=40,l})(),Ot=(()=>{class l extends Fe{constructor(t){super(t)}parseInformation(){let t=new fe;t.append("(01)");let n=t.length(),r=this.getGeneralDecoder().extractNumericValueFromBitArray(l.HEADER_SIZE,4);return t.append(r),this.encodeCompressedGtinWithoutAI(t,l.HEADER_SIZE+4,n),this.getGeneralDecoder().decodeAllCodes(t,l.HEADER_SIZE+44)}}return l.HEADER_SIZE=4,l})(),Ft=(()=>{class l extends Pe{constructor(t){super(t)}parseInformation(){let t=new fe;return this.getGeneralDecoder().decodeAllCodes(t,l.HEADER_SIZE)}}return l.HEADER_SIZE=5,l})();class dt extends Fe{constructor(e){super(e)}encodeCompressedWeight(e,t,n){let r=this.getGeneralDecoder().extractNumericValueFromBitArray(t,n);this.addWeightCode(e,r);let i=this.checkWeight(r),s=1e5;for(let o=0;o<5;++o)i/s==0&&e.append("0"),s/=10;e.append(i)}}let Dt=(()=>{class l extends dt{constructor(t){super(t)}parseInformation(){if(this.getInformation().getSize()!=l.HEADER_SIZE+dt.GTIN_SIZE+l.WEIGHT_SIZE)throw new R;let t=new fe;return this.encodeCompressedGtin(t,l.HEADER_SIZE),this.encodeCompressedWeight(t,l.HEADER_SIZE+dt.GTIN_SIZE,l.WEIGHT_SIZE),t.toString()}}return l.HEADER_SIZE=5,l.WEIGHT_SIZE=15,l})();class un extends Dt{constructor(e){super(e)}addWeightCode(e,t){e.append("(3103)")}checkWeight(e){return e}}class or extends Dt{constructor(e){super(e)}addWeightCode(e,t){e.append(t<1e4?"(3202)":"(3203)")}checkWeight(e){return e<1e4?e:e-1e4}}let ar=(()=>{class l extends Fe{constructor(t){super(t)}parseInformation(){if(this.getInformation().getSize()<l.HEADER_SIZE+Fe.GTIN_SIZE)throw new R;let t=new fe;this.encodeCompressedGtin(t,l.HEADER_SIZE);let n=this.getGeneralDecoder().extractNumericValueFromBitArray(l.HEADER_SIZE+Fe.GTIN_SIZE,l.LAST_DIGIT_SIZE);t.append("(392"),t.append(n),t.append(")");let r=this.getGeneralDecoder().decodeGeneralPurposeField(l.HEADER_SIZE+Fe.GTIN_SIZE+l.LAST_DIGIT_SIZE,null);return t.append(r.getNewString()),t.toString()}}return l.HEADER_SIZE=8,l.LAST_DIGIT_SIZE=2,l})(),cr=(()=>{class l extends Fe{constructor(t){super(t)}parseInformation(){if(this.getInformation().getSize()<l.HEADER_SIZE+Fe.GTIN_SIZE)throw new R;let t=new fe;this.encodeCompressedGtin(t,l.HEADER_SIZE);let n=this.getGeneralDecoder().extractNumericValueFromBitArray(l.HEADER_SIZE+Fe.GTIN_SIZE,l.LAST_DIGIT_SIZE);t.append("(393"),t.append(n),t.append(")");let r=this.getGeneralDecoder().extractNumericValueFromBitArray(l.HEADER_SIZE+Fe.GTIN_SIZE+l.LAST_DIGIT_SIZE,l.FIRST_THREE_DIGITS_SIZE);r/100==0&&t.append("0"),r/10==0&&t.append("0"),t.append(r);let i=this.getGeneralDecoder().decodeGeneralPurposeField(l.HEADER_SIZE+Fe.GTIN_SIZE+l.LAST_DIGIT_SIZE+l.FIRST_THREE_DIGITS_SIZE,null);return t.append(i.getNewString()),t.toString()}}return l.HEADER_SIZE=8,l.LAST_DIGIT_SIZE=2,l.FIRST_THREE_DIGITS_SIZE=10,l})(),kt=(()=>{class l extends dt{constructor(t,n,r){super(t),this.dateCode=r,this.firstAIdigits=n}parseInformation(){if(this.getInformation().getSize()!=l.HEADER_SIZE+l.GTIN_SIZE+l.WEIGHT_SIZE+l.DATE_SIZE)throw new R;let t=new fe;return this.encodeCompressedGtin(t,l.HEADER_SIZE),this.encodeCompressedWeight(t,l.HEADER_SIZE+l.GTIN_SIZE,l.WEIGHT_SIZE),this.encodeCompressedDate(t,l.HEADER_SIZE+l.GTIN_SIZE+l.WEIGHT_SIZE),t.toString()}encodeCompressedDate(t,n){let r=this.getGeneralDecoder().extractNumericValueFromBitArray(n,l.DATE_SIZE);if(38400==r)return;t.append("("),t.append(this.dateCode),t.append(")");let i=r%32;r/=32;let s=r%12+1;r/=12;let o=r;o/10==0&&t.append("0"),t.append(o),s/10==0&&t.append("0"),t.append(s),i/10==0&&t.append("0"),t.append(i)}addWeightCode(t,n){t.append("("),t.append(this.firstAIdigits),t.append(n/1e5),t.append(")")}checkWeight(t){return t%1e5}}return l.HEADER_SIZE=8,l.WEIGHT_SIZE=20,l.DATE_SIZE=16,l})();function jn(l){try{if(l.get(1))return new Ot(l);if(!l.get(2))return new Ft(l);switch(Me.extractNumericValueFromBitArray(l,1,4)){case 4:return new un(l);case 5:return new or(l)}switch(Me.extractNumericValueFromBitArray(l,1,5)){case 12:return new ar(l);case 13:return new cr(l)}switch(Me.extractNumericValueFromBitArray(l,1,7)){case 56:return new kt(l,"310","11");case 57:return new kt(l,"320","11");case 58:return new kt(l,"310","13");case 59:return new kt(l,"320","13");case 60:return new kt(l,"310","15");case 61:return new kt(l,"320","15");case 62:return new kt(l,"310","17");case 63:return new kt(l,"320","17")}
vendor: 33,937 bytes, line 1
1}catch(e){throw console.log(e),new wt("unknown decoder: "+l)}}class Ut{constructor(e,t,n,r){this.leftchar=e,this.rightchar=t,this.finderpattern=n,this.maybeLast=r}mayBeLast(){return this.maybeLast}getLeftChar(){return this.leftchar}getRightChar(){return this.rightchar}getFinderPattern(){return this.finderpattern}mustBeLast(){return null==this.rightchar}toString(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"}static equals(e,t){return e instanceof Ut&&Ut.equalsOrNull(e.leftchar,t.leftchar)&&Ut.equalsOrNull(e.rightchar,t.rightchar)&&Ut.equalsOrNull(e.finderpattern,t.finderpattern)}static equalsOrNull(e,t){return null===e?null===t:Ut.equals(e,t)}hashCode(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()}}class Mn{constructor(e,t,n){this.pairs=e,this.rowNumber=t,this.wasReversed=n}getPairs(){return this.pairs}getRowNumber(){return this.rowNumber}isReversed(){return this.wasReversed}isEquivalent(e){return this.checkEqualitity(this,e)}toString(){return"{ "+this.pairs+" }"}equals(e,t){return e instanceof Mn&&this.checkEqualitity(e,t)&&e.wasReversed===t.wasReversed}checkEqualitity(e,t){if(!e||!t)return;let n;return e.forEach((r,i)=>{t.forEach(s=>{r.getLeftChar().getValue()===s.getLeftChar().getValue()&&r.getRightChar().getValue()===s.getRightChar().getValue()&&r.getFinderPatter().getValue()===s.getFinderPatter().getValue()&&(n=!0)})}),n}}class U extends w{constructor(e){super(...arguments),this.pairs=new Array(U.MAX_PAIRS),this.rows=new Array,this.startEnd=[2],this.verbose=!0===e}decodeRow(e,t,n){this.pairs.length=0,this.startFromEven=!1;try{return U.constructResult(this.decodeRow2pairs(e,t))}catch(r){this.verbose&&console.log(r)}return this.pairs.length=0,this.startFromEven=!0,U.constructResult(this.decodeRow2pairs(e,t))}reset(){this.pairs.length=0,this.rows.length=0}decodeRow2pairs(e,t){let r,n=!1;for(;!n;)try{this.pairs.push(this.retrieveNextPair(t,this.pairs,e))}catch(i){if(i instanceof R){if(!this.pairs.length)throw new R;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(e,!1),r){let i=this.checkRowsBoolean(!1);if(null!=i||(i=this.checkRowsBoolean(!0),null!=i))return i}throw new R}checkRowsBoolean(e){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,e&&(this.rows=this.rows.reverse());let t=null;try{t=this.checkRows(new Array,0)}catch(n){this.verbose&&console.log(n)}return e&&(this.rows=this.rows.reverse()),t}checkRows(e,t){for(let n=t;n<this.rows.length;n++){let r=this.rows[n];this.pairs.length=0;for(let s of e)this.pairs.push(s.getPairs());if(this.pairs.push(r.getPairs()),!U.isValidSequence(this.pairs))continue;if(this.checkChecksum())return this.pairs;let i=new Array(e);i.push(r);try{return this.checkRows(i,n+1)}catch(s){this.verbose&&console.log(s)}}throw new R}static isValidSequence(e){for(let t of U.FINDER_PATTERN_SEQUENCES){if(e.length>t.length)continue;let n=!0;for(let r=0;r<e.length;r++)if(e[r].getFinderPattern().getValue()!=t[r]){n=!1;break}if(n)return!0}return!1}storeRow(e,t){let n=0,r=!1,i=!1;for(;n<this.rows.length;){let s=this.rows[n];if(s.getRowNumber()>e){i=s.isEquivalent(this.pairs);break}r=s.isEquivalent(this.pairs),n++}i||r||U.isPartialRow(this.pairs,this.rows)||(this.rows.push(n,new Mn(this.pairs,e,t)),this.removePartialRows(this.pairs,this.rows))}removePartialRows(e,t){for(let n of t)if(n.getPairs().length!==e.length)for(let r of n.getPairs())for(let i of e)if(Ut.equals(r,i))break}static isPartialRow(e,t){for(let n of t){let r=!0;for(let i of e){let s=!1;for(let o of n.getPairs())if(i.equals(o)){s=!0;break}if(!s){r=!1;break}}if(r)return!0}return!1}getRows(){return this.rows}static constructResult(e){let r=jn(F.buildBitArray(e)).parseInformation(),i=e[0].getFinderPattern().getResultPoints(),s=e[e.length-1].getFinderPattern().getResultPoints();return new Je(r,null,null,[i[0],i[1],s[0],s[1]],V.RSS_EXPANDED,null)}checkChecksum(){let e=this.pairs.get(0),t=e.getLeftChar(),n=e.getRightChar();if(null==n)return!1;let r=n.getChecksumPortion(),i=2;for(let o=1;o<this.pairs.size();++o){let a=this.pairs.get(o);r+=a.getLeftChar().getChecksumPortion(),i++;let c=a.getRightChar();null!=c&&(r+=c.getChecksumPortion(),i++)}return r%=211,211*(i-4)+r==t.getValue()}static getNextSecondBar(e,t){let n;return e.get(t)?(n=e.getNextUnset(t),n=e.getNextSet(n)):(n=e.getNextSet(t),n=e.getNextUnset(n)),n}retrieveNextPair(e,t,n){let r=t.length%2==0;this.startFromEven&&(r=!r);let i,s=!0,o=-1;do{this.findNextPair(e,t,o),i=this.parseFoundFinderPattern(e,n,r),null==i?o=U.getNextSecondBar(e,this.startEnd[0]):s=!1}while(s);let c,a=this.decodeDataCharacter(e,i,r,!0);if(!this.isEmptyPair(t)&&t[t.length-1].mustBeLast())throw new R;try{c=this.decodeDataCharacter(e,i,r,!1)}catch(u){c=null,this.verbose&&console.log(u)}return new Ut(a,c,i,!0)}isEmptyPair(e){return 0===e.length}findNextPair(e,t,n){let r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;let s,i=e.getSize();s=n>=0?n:this.isEmptyPair(t)?0:t[t.length-1].getFinderPattern().getStartEnd()[1];let o=t.length%2!=0;this.startFromEven&&(o=!o);let a=!1;for(;s<i&&(a=!e.get(s),a);)s++;let c=0,u=s;for(let g=s;g<i;g++)if(e.get(g)!=a)r[c]++;else{if(3==c){if(o&&U.reverseCounters(r),U.isFinderPattern(r))return this.startEnd[0]=u,void(this.startEnd[1]=g);o&&U.reverseCounters(r),u+=r[0]+r[1],r[0]=r[2],r[1]=r[3],r[2]=0,r[3]=0,c--}else c++;r[c]=1,a=!a}throw new R}static reverseCounters(e){let t=e.length;for(let n=0;n<t/2;++n){let r=e[n];e[n]=e[t-n-1],e[t-n-1]=r}}parseFoundFinderPattern(e,t,n){let r,i,s;if(n){let c=this.startEnd[0]-1;for(;c>=0&&!e.get(c);)c--;c++,r=this.startEnd[0]-c,i=c,s=this.startEnd[1]}else i=this.startEnd[0],s=e.getNextUnset(this.startEnd[1]+1),r=s-this.startEnd[1];let a,o=this.getDecodeFinderCounters();we.arraycopy(o,0,o,1,o.length-1),o[0]=r;try{a=this.parseFinderValue(o,U.FINDER_PATTERNS)}catch{return null}return new y(a,[i,s],i,s,t)}decodeDataCharacter(e,t,n,r){let i=this.getDataCharacterCounters();for(let Oe=0;Oe<i.length;Oe++)i[Oe]=0;if(r)U.recordPatternInReverse(e,t.getStartEnd()[0],i);else{U.recordPattern(e,t.getStartEnd()[1],i);for(let Oe=0,ot=i.length-1;Oe<ot;Oe++,ot--){let mt=i[Oe];i[Oe]=i[ot],i[ot]=mt}}let o=ge.sum(new Int32Array(i))/17,a=(t.getStartEnd()[1]-t.getStartEnd()[0])/15;if(Math.abs(o-a)/a>.3)throw new R;let c=this.getOddCounts(),u=this.getEvenCounts(),g=this.getOddRoundingErrors(),p=this.getEvenRoundingErrors();for(let Oe=0;Oe<i.length;Oe++){let ot=1*i[Oe]/o,mt=ot+.5;if(mt<1){if(ot<.3)throw new R;mt=1}else if(mt>8){if(ot>8.7)throw new R;mt=8}let nn=Oe/2;1&Oe?(u[nn]=mt,p[nn]=ot-mt):(c[nn]=mt,g[nn]=ot-mt)}this.adjustOddEvenCounts(17);let m=4*t.getValue()+(n?0:2)+(r?0:1)-1,I=0,S=0;for(let Oe=c.length-1;Oe>=0;Oe--)U.isNotA1left(t,n,r)&&(S+=c[Oe]*U.WEIGHTS[m][2*Oe]),I+=c[Oe];let b=0;for(let Oe=u.length-1;Oe>=0;Oe--)U.isNotA1left(t,n,r)&&(b+=u[Oe]*U.WEIGHTS[m][2*Oe+1]);let _=S+b;if(1&I||I>13||I<4)throw new R;let z=(13-I)/2,X=U.SYMBOL_WIDEST[z],B=9-X,ue=D.getRSSvalue(c,X,!0),ae=D.getRSSvalue(u,B,!1);return new x(ue*U.EVEN_TOTAL_SUBSET[z]+ae+U.GSUM[z],_)}static isNotA1left(e,t,n){return!(0==e.getValue()&&t&&n)}adjustOddEvenCounts(e){let t=ge.sum(new Int32Array(this.getOddCounts())),n=ge.sum(new Int32Array(this.getEvenCounts())),r=!1,i=!1;t>13?i=!0:t<4&&(r=!0);let s=!1,o=!1;n>13?o=!0:n<4&&(s=!0);let a=t+n-e,c=1==(1&t),u=0==(1&n);if(1==a)if(c){if(u)throw new R;i=!0}else{if(!u)throw new R;o=!0}else if(-1==a)if(c){if(u)throw new R;r=!0}else{if(!u)throw new R;s=!0}else{if(0!=a)throw new R;if(c){if(!u)throw new R;t<n?(r=!0,o=!0):(i=!0,s=!0)}else if(u)throw new R}if(r){if(i)throw new R;U.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&U.decrement(this.getOddCounts(),this.getOddRoundingErrors()),s){if(o)throw new R;U.increment(this.getEvenCounts(),this.getOddRoundingErrors())}o&&U.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())}}U.SYMBOL_WIDEST=[7,5,4,3,1],U.EVEN_TOTAL_SUBSET=[4,20,52,104,204],U.GSUM=[0,348,1388,2948,3988],U.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],U.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],U.FINDER_PAT_A=0,U.FINDER_PAT_B=1,U.FINDER_PAT_C=2,U.FINDER_PAT_D=3,U.FINDER_PAT_E=4,U.FINDER_PAT_F=5,U.FINDER_PATTERN_SEQUENCES=[[U.FINDER_PAT_A,U.FINDER_PAT_A],[U.FINDER_PAT_A,U.FINDER_PAT_B,U.FINDER_PAT_B],[U.FINDER_PAT_A,U.FINDER_PAT_C,U.FINDER_PAT_B,U.FINDER_PAT_D],[U.FINDER_PAT_A,U.FINDER_PAT_E,U.FINDER_PAT_B,U.FINDER_PAT_D,U.FINDER_PAT_C],[U.FINDER_PAT_A,U.FINDER_PAT_E,U.FINDER_PAT_B,U.FINDER_PAT_D,U.FINDER_PAT_D,U.FINDER_PAT_F],[U.FINDER_PAT_A,U.FINDER_PAT_E,U.FINDER_PAT_B,U.FINDER_PAT_D,U.FINDER_PAT_E,U.FINDER_PAT_F,U.FINDER_PAT_F],[U.FINDER_PAT_A,U.FINDER_PAT_A,U.FINDER_PAT_B,U.FINDER_PAT_B,U.FINDER_PAT_C,U.FINDER_PAT_C,U.FINDER_PAT_D,U.FINDER_PAT_D],[U.FINDER_PAT_A,U.FINDER_PAT_A,U.FINDER_PAT_B,U.FINDER_PAT_B,U.FINDER_PAT_C,U.FINDER_PAT_C,U.FINDER_PAT_D,U.FINDER_PAT_E,U.FINDER_PAT_E],[U.FINDER_PAT_A,U.FINDER_PAT_A,U.FINDER_PAT_B,U.FINDER_PAT_B,U.FINDER_PAT_C,U.FINDER_PAT_C,U.FINDER_PAT_D,U.FINDER_PAT_E,U.FINDER_PAT_F,U.FINDER_PAT_F],[U.FINDER_PAT_A,U.FINDER_PAT_A,U.FINDER_PAT_B,U.FINDER_PAT_B,U.FINDER_PAT_C,U.FINDER_PAT_D,U.FINDER_PAT_D,U.FINDER_PAT_E,U.FINDER_PAT_E,U.FINDER_PAT_F,U.FINDER_PAT_F]],U.MAX_PAIRS=11;class lr extends x{constructor(e,t,n){super(e,t),this.count=0,this.finderPattern=n}getFinderPattern(){return this.finderPattern}getCount(){return this.count}incrementCount(){this.count++}}class Ge extends w{constructor(){super(...arguments),this.possibleLeftPairs=[],this.possibleRightPairs=[]}decodeRow(e,t,n){const r=this.decodePair(t,!1,e,n);Ge.addOrTally(this.possibleLeftPairs,r),t.reverse();let i=this.decodePair(t,!0,e,n);Ge.addOrTally(this.possibleRightPairs,i),t.reverse();for(let s of this.possibleLeftPairs)if(s.getCount()>1)for(let o of this.possibleRightPairs)if(o.getCount()>1&&Ge.checkChecksum(s,o))return Ge.constructResult(s,o);throw new R}static addOrTally(e,t){if(null==t)return;let n=!1;for(let r of e)if(r.getValue()===t.getValue()){r.incrementCount(),n=!0;break}n||e.push(t)}reset(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0}static constructResult(e,t){let n=4537077*e.getValue()+t.getValue(),r=new String(n).toString(),i=new fe;for(let c=13-r.length;c>0;c--)i.append("0");i.append(r);let s=0;for(let c=0;c<13;c++){let u=i.charAt(c).charCodeAt(0)-"0".charCodeAt(0);s+=1&c?u:3*u}s=10-s%10,10===s&&(s=0),i.append(s.toString());let o=e.getFinderPattern().getResultPoints(),a=t.getFinderPattern().getResultPoints();return new Je(i.toString(),null,0,[o[0],o[1],a[0],a[1]],V.RSS_14,(new Date).getTime())}static checkChecksum(e,t){let n=(e.getChecksumPortion()+16*t.getChecksumPortion())%79,r=9*e.getFinderPattern().getValue()+t.getFinderPattern().getValue();return r>72&&r--,r>8&&r--,n===r}decodePair(e,t,n,r){try{let i=this.findFinderPattern(e,t),s=this.parseFoundFinderPattern(e,n,t,i),o=null==r?null:r.get(Se.NEED_RESULT_POINT_CALLBACK);if(null!=o){let u=(i[0]+i[1])/2;t&&(u=e.getSize()-1-u),o.foundPossibleResultPoint(new K(u,n))}let a=this.decodeDataCharacter(e,s,!0),c=this.decodeDataCharacter(e,s,!1);return new lr(1597*a.getValue()+c.getValue(),a.getChecksumPortion()+4*c.getChecksumPortion(),s)}catch{return null}}decodeDataCharacter(e,t,n){let r=this.getDataCharacterCounters();for(let b=0;b<r.length;b++)r[b]=0;if(n)Ve.recordPatternInReverse(e,t.getStartEnd()[0],r);else{Ve.recordPattern(e,t.getStartEnd()[1]+1,r);for(let b=0,_=r.length-1;b<_;b++,_--){let z=r[b];r[b]=r[_],r[_]=z}}let i=n?16:15,s=ge.sum(new Int32Array(r))/i,o=this.getOddCounts(),a=this.getEvenCounts(),c=this.getOddRoundingErrors(),u=this.getEvenRoundingErrors();for(let b=0;b<r.length;b++){let _=r[b]/s,z=Math.floor(_+.5);z<1?z=1:z>8&&(z=8);let X=Math.floor(b/2);1&b?(a[X]=z,u[X]=_-z):(o[X]=z,c[X]=_-z)}this.adjustOddEvenCounts(n,i);let g=0,p=0;for(let b=o.length-1;b>=0;b--)p*=9,p+=o[b],g+=o[b];let m=0,I=0;for(let b=a.length-1;b>=0;b--)m*=9,m+=a[b],I+=a[b];let S=p+3*m;if(n){if(1&g||g>12||g<4)throw new R;let b=(12-g)/2,_=Ge.OUTSIDE_ODD_WIDEST[b],z=9-_,X=D.getRSSvalue(o,_,!1),B=D.getRSSvalue(a,z,!0);return new x(X*Ge.OUTSIDE_EVEN_TOTAL_SUBSET[b]+B+Ge.OUTSIDE_GSUM[b],S)}{if(1&I||I>10||I<4)throw new R;let b=(10-I)/2,_=Ge.INSIDE_ODD_WIDEST[b],z=9-_,X=D.getRSSvalue(o,_,!0),B=D.getRSSvalue(a,z,!1);return new x(B*Ge.INSIDE_ODD_TOTAL_SUBSET[b]+X+Ge.INSIDE_GSUM[b],S)}}findFinderPattern(e,t){let n=this.getDecodeFinderCounters();n[0]=0,n[1]=0,n[2]=0,n[3]=0;let r=e.getSize(),i=!1,s=0;for(;s<r&&(i=!e.get(s),t!==i);)s++;let o=0,a=s;for(let c=s;c<r;c++)if(e.get(c)!==i)n[o]++;else{if(3===o){if(w.isFinderPattern(n))return[a,c];a+=n[0]+n[1],n[0]=n[2],n[1]=n[3],n[2]=0,n[3]=0,o--}else o++;n[o]=1,i=!i}throw new R}parseFoundFinderPattern(e,t,n,r){let i=e.get(r[0]),s=r[0]-1;for(;s>=0&&i!==e.get(s);)s--;s++;const o=r[0]-s,a=this.getDecodeFinderCounters(),c=new Int32Array(a.length);we.arraycopy(a,0,c,1,a.length-1),c[0]=o;const u=this.parseFinderValue(c,Ge.FINDER_PATTERNS);let g=s,p=r[1];return n&&(g=e.getSize()-1-g,p=e.getSize()-1-p),new y(u,[s,r[1]],g,p,t)}adjustOddEvenCounts(e,t){let n=ge.sum(new Int32Array(this.getOddCounts())),r=ge.sum(new Int32Array(this.getEvenCounts())),i=!1,s=!1,o=!1,a=!1;e?(n>12?s=!0:n<4&&(i=!0),r>12?a=!0:r<4&&(o=!0)):(n>11?s=!0:n<5&&(i=!0),r>10?a=!0:r<4&&(o=!0));let c=n+r-t,u=(1&n)==(e?1:0),g=1==(1&r);if(1===c)if(u){if(g)throw new R;s=!0}else{if(!g)throw new R;a=!0}else if(-1===c)if(u){if(g)throw new R;i=!0}else{if(!g)throw new R;o=!0}else{if(0!==c)throw new R;if(u){if(!g)throw new R;n<r?(i=!0,a=!0):(s=!0,o=!0)}else if(g)throw new R}if(i){if(s)throw new R;w.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(s&&w.decrement(this.getOddCounts(),this.getOddRoundingErrors()),o){if(a)throw new R;w.increment(this.getEvenCounts(),this.getOddRoundingErrors())}a&&w.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())}}Ge.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],Ge.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],Ge.OUTSIDE_GSUM=[0,161,961,2015,2715],Ge.INSIDE_GSUM=[0,336,1036,1516],Ge.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],Ge.INSIDE_ODD_WIDEST=[2,4,6,8],Ge.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])];class $t extends Ve{constructor(e,t){super(),this.readers=[],this.verbose=!0===t;const n=e?e.get(Se.POSSIBLE_FORMATS):null,r=e&&void 0!==e.get(Se.ASSUME_CODE_39_CHECK_DIGIT);n?((n.includes(V.EAN_13)||n.includes(V.UPC_A)||n.includes(V.EAN_8)||n.includes(V.UPC_E))&&this.readers.push(new A(e)),n.includes(V.CODE_39)&&this.readers.push(new cn(r)),n.includes(V.CODE_128)&&this.readers.push(new W),n.includes(V.ITF)&&this.readers.push(new be),n.includes(V.RSS_14)&&this.readers.push(new Ge),n.includes(V.RSS_EXPANDED)&&this.readers.push(new U(this.verbose))):(this.readers.push(new A(e)),this.readers.push(new cn),this.readers.push(new A(e)),this.readers.push(new W),this.readers.push(new be),this.readers.push(new Ge),this.readers.push(new U(this.verbose)))}decodeRow(e,t,n){for(let r=0;r<this.readers.length;r++)try{return this.readers[r].decodeRow(e,t,n)}catch{}throw new R}reset(){this.readers.forEach(e=>e.reset())}}class ye{constructor(e,t,n){this.ecCodewords=e,this.ecBlocks=[t],n&&this.ecBlocks.push(n)}getECCodewords(){return this.ecCodewords}getECBlocks(){return this.ecBlocks}}class Te{constructor(e,t){this.count=e,this.dataCodewords=t}getCount(){return this.count}getDataCodewords(){return this.dataCodewords}}class pe{constructor(e,t,n,r,i,s){this.versionNumber=e,this.symbolSizeRows=t,this.symbolSizeColumns=n,this.dataRegionSizeRows=r,this.dataRegionSizeColumns=i,this.ecBlocks=s;let o=0;const a=s.getECCodewords(),c=s.getECBlocks();for(let u of c)o+=u.getCount()*(u.getDataCodewords()+a);this.totalCodewords=o}getVersionNumber(){return this.versionNumber}getSymbolSizeRows(){return this.symbolSizeRows}getSymbolSizeColumns(){return this.symbolSizeColumns}getDataRegionSizeRows(){return this.dataRegionSizeRows}getDataRegionSizeColumns(){return this.dataRegionSizeColumns}getTotalCodewords(){return this.totalCodewords}getECBlocks(){return this.ecBlocks}static getVersionForDimensions(e,t){if(1&e||1&t)throw new P;for(let n of pe.VERSIONS)if(n.symbolSizeRows===e&&n.symbolSizeColumns===t)return n;throw new P}toString(){return""+this.versionNumber}static buildVersions(){return[new pe(1,10,10,8,8,new ye(5,new Te(1,3))),new pe(2,12,12,10,10,new ye(7,new Te(1,5))),new pe(3,14,14,12,12,new ye(10,new Te(1,8))),new pe(4,16,16,14,14,new ye(12,new Te(1,12))),new pe(5,18,18,16,16,new ye(14,new Te(1,18))),new pe(6,20,20,18,18,new ye(18,new Te(1,22))),new pe(7,22,22,20,20,new ye(20,new Te(1,30))),new pe(8,24,24,22,22,new ye(24,new Te(1,36))),new pe(9,26,26,24,24,new ye(28,new Te(1,44))),new pe(10,32,32,14,14,new ye(36,new Te(1,62))),new pe(11,36,36,16,16,new ye(42,new Te(1,86))),new pe(12,40,40,18,18,new ye(48,new Te(1,114))),new pe(13,44,44,20,20,new ye(56,new Te(1,144))),new pe(14,48,48,22,22,new ye(68,new Te(1,174))),new pe(15,52,52,24,24,new ye(42,new Te(2,102))),new pe(16,64,64,14,14,new ye(56,new Te(2,140))),new pe(17,72,72,16,16,new ye(36,new Te(4,92))),new pe(18,80,80,18,18,new ye(48,new Te(4,114))),new pe(19,88,88,20,20,new ye(56,new Te(4,144))),new pe(20,96,96,22,22,new ye(68,new Te(4,174))),new pe(21,104,104,24,24,new ye(56,new Te(6,136))),new pe(22,120,120,18,18,new ye(68,new Te(6,175))),new pe(23,132,132,20,20,new ye(62,new Te(8,163))),new pe(24,144,144,22,22,new ye(62,new Te(8,156),new Te(2,155))),new pe(25,8,18,6,16,new ye(7,new Te(1,5))),new pe(26,8,32,6,14,new ye(11,new Te(1,10))),new pe(27,12,26,10,24,new ye(14,new Te(1,16))),new pe(28,12,36,10,16,new ye(18,new Te(1,22))),new pe(29,16,36,14,16,new ye(24,new Te(1,32))),new pe(30,16,48,14,22,new ye(28,new Te(1,49)))]}}pe.VERSIONS=pe.buildVersions();class On{constructor(e){const t=e.getHeight();if(t<8||t>144||1&t)throw new P;this.version=On.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new _e(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}getVersion(){return this.version}static readVersion(e){const t=e.getHeight(),n=e.getWidth();return pe.getVersionForDimensions(t,n)}readCodewords(){const e=new Int8Array(this.version.getTotalCodewords());let t=0,n=4,r=0;const i=this.mappingBitMatrix.getHeight(),s=this.mappingBitMatrix.getWidth();let o=!1,a=!1,c=!1,u=!1;do{if(n!==i||0!==r||o)if(n===i-2&&0===r&&3&s&&!a)e[t++]=255&this.readCorner2(i,s),n-=2,r+=2,a=!0;else if(n!==i+4||2!==r||7&s||c)if(n!==i-2||0!==r||4!=(7&s)||u){do{n<i&&r>=0&&!this.readMappingMatrix.get(r,n)&&(e[t++]=255&this.readUtah(n,r,i,s)),n-=2,r+=2}while(n>=0&&r<s);n+=1,r+=3;do{n>=0&&r<s&&!this.readMappingMatrix.get(r,n)&&(e[t++]=255&this.readUtah(n,r,i,s)),n+=2,r-=2}while(n<i&&r>=0);n+=3,r+=1}else e[t++]=255&this.readCorner4(i,s),n-=2,r+=2,u=!0;else e[t++]=255&this.readCorner3(i,s),n-=2,r+=2,c=!0;else e[t++]=255&this.readCorner1(i,s),n-=2,r+=2,o=!0}while(n<i||r<s);if(t!==this.version.getTotalCodewords())throw new P;return e}readModule(e,t,n,r){return e<0&&(e+=n,t+=4-(n+4&7)),t<0&&(t+=r,e+=4-(r+4&7)),this.readMappingMatrix.set(t,e),this.mappingBitMatrix.get(t,e)}readUtah(e,t,n,r){let i=0;return this.readModule(e-2,t-2,n,r)&&(i|=1),i<<=1,this.readModule(e-2,t-1,n,r)&&(i|=1),i<<=1,this.readModule(e-1,t-2,n,r)&&(i|=1),i<<=1,this.readModule(e-1,t-1,n,r)&&(i|=1),i<<=1,this.readModule(e-1,t,n,r)&&(i|=1),i<<=1,this.readModule(e,t-2,n,r)&&(i|=1),i<<=1,this.readModule(e,t-1,n,r)&&(i|=1),i<<=1,this.readModule(e,t,n,r)&&(i|=1),i}readCorner1(e,t){let n=0;return this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,1,e,t)&&(n|=1),n<<=1,this.readModule(e-1,2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n<<=1,this.readModule(2,t-1,e,t)&&(n|=1),n<<=1,this.readModule(3,t-1,e,t)&&(n|=1),n}readCorner2(e,t){let n=0;return this.readModule(e-3,0,e,t)&&(n|=1),n<<=1,this.readModule(e-2,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(0,t-4,e,t)&&(n|=1),n<<=1,this.readModule(0,t-3,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n}readCorner3(e,t){let n=0;return this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,t-1,e,t)&&(n|=1),n<<=1,this.readModule(0,t-3,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-3,e,t)&&(n|=1),n<<=1,this.readModule(1,t-2,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n}readCorner4(e,t){let n=0;return this.readModule(e-3,0,e,t)&&(n|=1),n<<=1,this.readModule(e-2,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n<<=1,this.readModule(2,t-1,e,t)&&(n|=1),n<<=1,this.readModule(3,t-1,e,t)&&(n|=1),n}extractDataRegion(e){const t=this.version.getSymbolSizeRows(),n=this.version.getSymbolSizeColumns();if(e.getHeight()!==t)throw new Z("Dimension of bitMatrix must match the version size");const r=this.version.getDataRegionSizeRows(),i=this.version.getDataRegionSizeColumns(),s=t/r|0,o=n/i|0,u=new _e(o*i,s*r);for(let g=0;g<s;++g){const p=g*r;for(let m=0;m<o;++m){const I=m*i;for(let S=0;S<r;++S){const b=g*(r+2)+1+S,_=p+S;for(let z=0;z<i;++z)e.get(m*(i+2)+1+z,b)&&u.set(I+z,_)}}}return u}}class Dn{constructor(e,t){this.numDataCodewords=e,this.codewords=t}static getDataBlocks(e,t){const n=t.getECBlocks();let r=0;const i=n.getECBlocks();for(let S of i)r+=S.getCount();const s=new Array(r);let o=0;for(let S of i)for(let b=0;b<S.getCount();b++){const _=S.getDataCodewords(),z=n.getECCodewords()+_;s[o++]=new Dn(_,new Uint8Array(z))}const c=s[0].codewords.length-n.getECCodewords(),u=c-1;let g=0;for(let S=0;S<u;S++)for(let b=0;b<o;b++)s[b].codewords[S]=e[g++];const p=24===t.getVersionNumber(),m=p?8:o;for(let S=0;S<m;S++)s[S].codewords[c-1]=e[g++];const I=s[0].codewords.length;for(let S=c;S<I;S++)for(let b=0;b<o;b++){const _=p?(b+8)%o:b;s[_].codewords[p&&_>7?S-1:S]=e[g++]}if(g!==e.length)throw new Z;return s}getNumDataCodewords(){return this.numDataCodewords}getCodewords(){return this.codewords}}class Rn{constructor(e){this.bytes=e,this.byteOffset=0,this.bitOffset=0}getBitOffset(){return this.bitOffset}getByteOffset(){return this.byteOffset}readBits(e){if(e<1||e>32||e>this.available())throw new Z(""+e);let t=0,n=this.bitOffset,r=this.byteOffset;const i=this.bytes;if(n>0){const s=8-n,o=e<s?e:s,a=s-o;t=(i[r]&255>>8-o<<a)>>a,e-=o,n+=o,8===n&&(n=0,r++)}if(e>0){for(;e>=8;)t=t<<8|255&i[r],r++,e-=8;if(e>0){const s=8-e;t=t<<e|(i[r]&255>>s<<s)>>s,n+=e}}return this.bitOffset=n,this.byteOffset=r,t}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}var qe=(()=>{return(l=qe||(qe={}))[l.PAD_ENCODE=0]="PAD_ENCODE",l[l.ASCII_ENCODE=1]="ASCII_ENCODE",l[l.C40_ENCODE=2]="C40_ENCODE",l[l.TEXT_ENCODE=3]="TEXT_ENCODE",l[l.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",l[l.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",l[l.BASE256_ENCODE=6]="BASE256_ENCODE",qe;var l})();class zt{static decode(e){const t=new Rn(e),n=new fe,r=new fe,i=new Array;let s=qe.ASCII_ENCODE;do{if(s===qe.ASCII_ENCODE)s=this.decodeAsciiSegment(t,n,r);else{switch(s){case qe.C40_ENCODE:this.decodeC40Segment(t,n);break;case qe.TEXT_ENCODE:this.decodeTextSegment(t,n);break;case qe.ANSIX12_ENCODE:this.decodeAnsiX12Segment(t,n);break;case qe.EDIFACT_ENCODE:this.decodeEdifactSegment(t,n);break;case qe.BASE256_ENCODE:this.decodeBase256Segment(t,n,i);break;default:throw new P}s=qe.ASCII_ENCODE}}while(s!==qe.PAD_ENCODE&&t.available()>0);return r.length()>0&&n.append(r.toString()),new Xe(e,n.toString(),0===i.length?null:i,null)}static decodeAsciiSegment(e,t,n){let r=!1;do{let i=e.readBits(8);if(0===i)throw new P;if(i<=128)return r&&(i+=128),t.append(String.fromCharCode(i-1)),qe.ASCII_ENCODE;if(129===i)return qe.PAD_ENCODE;if(i<=229){const s=i-130;s<10&&t.append("0"),t.append(""+s)}else switch(i){case 230:return qe.C40_ENCODE;case 231:return qe.BASE256_ENCODE;case 232:t.append(String.fromCharCode(29));break;case 233:case 234:case 241:break;case 235:r=!0;break;case 236:t.append("[)>\x1e05\x1d"),n.insert(0,"\x1e\x04");break;case 237:t.append("[)>\x1e06\x1d"),n.insert(0,"\x1e\x04");break;case 238:return qe.ANSIX12_ENCODE;case 239:return qe.TEXT_ENCODE;case 240:return qe.EDIFACT_ENCODE;default:if(254!==i||0!==e.available())throw new P}}while(e.available()>0);return qe.ASCII_ENCODE}static decodeC40Segment(e,t){let n=!1;const r=[];let i=0;do{if(8===e.available())return;const s=e.readBits(8);if(254===s)return;this.parseTwoBytes(s,e.readBits(8),r);for(let o=0;o<3;o++){const a=r[o];switch(i){case 0:if(a<3)i=a+1;else{if(!(a<this.C40_BASIC_SET_CHARS.length))throw new P;{const c=this.C40_BASIC_SET_CHARS[a];n?(t.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):t.append(c)}}break;case 1:n?(t.append(String.fromCharCode(a+128)),n=!1):t.append(String.fromCharCode(a)),i=0;break;case 2:if(a<this.C40_SHIFT2_SET_CHARS.length){const c=this.C40_SHIFT2_SET_CHARS[a];n?(t.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):t.append(c)}else switch(a){case 27:t.append(String.fromCharCode(29));break;case 30:n=!0;break;default:throw new P}i=0;break;case 3:n?(t.append(String.fromCharCode(a+224)),n=!1):t.append(String.fromCharCode(a+96)),i=0;break;default:throw new P}}}while(e.available()>0)}static decodeTextSegment(e,t){let n=!1,r=[],i=0;do{if(8===e.available())return;const s=e.readBits(8);if(254===s)return;this.parseTwoBytes(s,e.readBits(8),r);for(let o=0;o<3;o++){const a=r[o];switch(i){case 0:if(a<3)i=a+1;else{if(!(a<this.TEXT_BASIC_SET_CHARS.length))throw new P;{const c=this.TEXT_BASIC_SET_CHARS[a];n?(t.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):t.append(c)}}break;case 1:n?(t.append(String.fromCharCode(a+128)),n=!1):t.append(String.fromCharCode(a)),i=0;break;case 2:if(a<this.TEXT_SHIFT2_SET_CHARS.length){const c=this.TEXT_SHIFT2_SET_CHARS[a];n?(t.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):t.append(c)}else switch(a){case 27:t.append(String.fromCharCode(29));break;case 30:n=!0;break;default:throw new P}i=0;break;case 3:if(!(a<this.TEXT_SHIFT3_SET_CHARS.length))throw new P;{const c=this.TEXT_SHIFT3_SET_CHARS[a];n?(t.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):t.append(c),i=0}break;default:throw new P}}}while(e.available()>0)}static decodeAnsiX12Segment(e,t){const n=[];do{if(8===e.available())return;const r=e.readBits(8);if(254===r)return;this.parseTwoBytes(r,e.readBits(8),n);for(let i=0;i<3;i++){const s=n[i];switch(s){case 0:t.append("\r");break;case 1:t.append("*");break;case 2:t.append(">");break;case 3:t.append(" ");break;default:if(s<14)t.append(String.fromCharCode(s+44));else{if(!(s<40))throw new P;t.append(String.fromCharCode(s+51))}}}}while(e.available()>0)}static parseTwoBytes(e,t,n){let r=(e<<8)+t-1,i=Math.floor(r/1600);n[0]=i,r-=1600*i,i=Math.floor(r/40),n[1]=i,n[2]=r-40*i}static decodeEdifactSegment(e,t){do{if(e.available()<=16)return;for(let n=0;n<4;n++){let r=e.readBits(6);if(31===r){const i=8-e.getBitOffset();return void(8!==i&&e.readBits(i))}32&r||(r|=64),t.append(String.fromCharCode(r))}}while(e.available()>0)}static decodeBase256Segment(e,t,n){let r=1+e.getByteOffset();const i=this.unrandomize255State(e.readBits(8),r++);let s;if(s=0===i?e.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(e.readBits(8),r++),s<0)throw new P;const o=new Uint8Array(s);for(let a=0;a<s;a++){if(e.available()<8)throw new P;o[a]=this.unrandomize255State(e.readBits(8),r++)}n.push(o);try{t.append(Le.decode(o,q.ISO88591))}catch(a){throw new wt("Platform does not support required encoding: "+a.message)}}static unrandomize255State(e,t){const r=e-(149*t%255+1);return r>=0?r:r+256}}zt.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],zt.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],zt.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],zt.TEXT_SHIFT2_SET_CHARS=zt.C40_SHIFT2_SET_CHARS,zt.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",String.fromCharCode(127)];class hr{constructor(){this.rsDecoder=new Pt(se.DATA_MATRIX_FIELD_256)}decode(e){const t=new On(e),n=t.getVersion(),r=t.readCodewords(),i=Dn.getDataBlocks(r,n);let s=0;for(let c of i)s+=c.getNumDataCodewords();const o=new Uint8Array(s),a=i.length;for(let c=0;c<a;c++){const u=i[c],g=u.getCodewords(),p=u.getNumDataCodewords();this.correctErrors(g,p);for(let m=0;m<p;m++)o[m*a+c]=g[m]}return zt.decode(o)}correctErrors(e,t){const n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-t)}catch{throw new Ce}for(let r=0;r<t;r++)e[r]=n[r]}}class Ze{constructor(e){this.image=e,this.rectangleDetector=new Jt(this.image)}detect(){const e=this.rectangleDetector.detect();let t=this.detectSolid1(e);if(t=this.detectSolid2(t),t[3]=this.correctTopRight(t),!t[3])throw new R;t=this.shiftToModuleCenter(t);const n=t[0],r=t[1],i=t[2],s=t[3];let o=this.transitionsBetween(n,s)+1,a=this.transitionsBetween(i,s)+1;1==(1&o)&&(o+=1),1==(1&a)&&(a+=1),4*o<7*a&&4*a<7*o&&(o=a=Math.max(o,a));let c=Ze.sampleGrid(this.image,n,r,i,s,o,a);return new qt(c,[n,r,i,s])}static shiftPoint(e,t,n){let r=(t.getX()-e.getX())/(n+1),i=(t.getY()-e.getY())/(n+1);return new K(e.getX()+r,e.getY()+i)}static moveAway(e,t,n){let r=e.getX(),i=e.getY();return r<t?r-=1:r+=1,i<n?i-=1:i+=1,new K(r,i)}detectSolid1(e){let t=e[0],n=e[1],r=e[3],i=e[2],s=this.transitionsBetween(t,n),o=this.transitionsBetween(n,r),a=this.transitionsBetween(r,i),c=this.transitionsBetween(i,t),u=s,g=[i,t,n,r];return u>o&&(u=o,g[0]=t,g[1]=n,g[2]=r,g[3]=i),u>a&&(u=a,g[0]=n,g[1]=r,g[2]=i,g[3]=t),u>c&&(g[0]=r,g[1]=i,g[2]=t,g[3]=n),g}detectSolid2(e){let t=e[0],n=e[1],r=e[2],i=e[3],s=this.transitionsBetween(t,i),o=Ze.shiftPoint(n,r,4*(s+1)),a=Ze.shiftPoint(r,n,4*(s+1));return this.transitionsBetween(o,t)<this.transitionsBetween(a,i)?(e[0]=t,e[1]=n,e[2]=r,e[3]=i):(e[0]=n,e[1]=r,e[2]=i,e[3]=t),e}correctTopRight(e){let t=e[0],n=e[1],r=e[2],i=e[3],s=this.transitionsBetween(t,i),o=this.transitionsBetween(n,i),a=Ze.shiftPoint(t,n,4*(o+1)),c=Ze.shiftPoint(r,n,4*(s+1));s=this.transitionsBetween(a,i),o=this.transitionsBetween(c,i);let u=new K(i.getX()+(r.getX()-n.getX())/(s+1),i.getY()+(r.getY()-n.getY())/(s+1)),g=new K(i.getX()+(t.getX()-n.getX())/(o+1),i.getY()+(t.getY()-n.getY())/(o+1));return this.isValid(u)?this.isValid(g)?this.transitionsBetween(a,u)+this.transitionsBetween(c,u)>this.transitionsBetween(a,g)+this.transitionsBetween(c,g)?u:g:u:this.isValid(g)?g:null}shiftToModuleCenter(e){let t=e[0],n=e[1],r=e[2],i=e[3],s=this.transitionsBetween(t,i)+1,o=this.transitionsBetween(r,i)+1,a=Ze.shiftPoint(t,n,4*o),c=Ze.shiftPoint(r,n,4*s);s=this.transitionsBetween(a,i)+1,o=this.transitionsBetween(c,i)+1,1==(1&s)&&(s+=1),1==(1&o)&&(o+=1);let p,m,u=(t.getX()+n.getX()+r.getX()+i.getX())/4,g=(t.getY()+n.getY()+r.getY()+i.getY())/4;return t=Ze.moveAway(t,u,g),n=Ze.moveAway(n,u,g),r=Ze.moveAway(r,u,g),i=Ze.moveAway(i,u,g),a=Ze.shiftPoint(t,n,4*o),a=Ze.shiftPoint(a,i,4*s),p=Ze.shiftPoint(n,t,4*o),p=Ze.shiftPoint(p,r,4*s),c=Ze.shiftPoint(r,i,4*o),c=Ze.shiftPoint(c,n,4*s),m=Ze.shiftPoint(i,r,4*o),m=Ze.shiftPoint(m,t,4*s),[a,p,c,m]}isValid(e){return e.getX()>=0&&e.getX()<this.image.getWidth()&&e.getY()>0&&e.getY()<this.image.getHeight()}static sampleGrid(e,t,n,r,i,s,o){return Mt.getInstance().sampleGrid(e,s,o,.5,.5,s-.5,.5,s-.5,o-.5,.5,o-.5,t.getX(),t.getY(),i.getX(),i.getY(),r.getX(),r.getY(),n.getX(),n.getY())}transitionsBetween(e,t){let n=Math.trunc(e.getX()),r=Math.trunc(e.getY()),i=Math.trunc(t.getX()),s=Math.trunc(t.getY()),o=Math.abs(s-r)>Math.abs(i-n);if(o){let S=n;n=r,r=S,S=i,i=s,s=S}let a=Math.abs(i-n),c=Math.abs(s-r),u=-a/2,g=r<s?1:-1,p=n<i?1:-1,m=0,I=this.image.get(o?r:n,o?n:r);for(let S=n,b=r;S!==i;S+=p){let _=this.image.get(o?b:S,o?S:b);if(_!==I&&(m++,I=_),u+=c,u>0){if(b===s)break;b+=g,u-=a}}return m}}let mn=(()=>{class l{constructor(){this.decoder=new hr}decode(t,n=null){let r,i;if(null!=n&&n.has(Se.PURE_BARCODE)){const u=l.extractPureBits(t.getBlackMatrix());r=this.decoder.decode(u),i=l.NO_POINTS}else{const u=new Ze(t.getBlackMatrix()).detect();r=this.decoder.decode(u.getBits()),i=u.getPoints()}const s=r.getRawBytes(),o=new Je(r.getText(),s,8*s.length,i,V.DATA_MATRIX,we.currentTimeMillis()),a=r.getByteSegments();null!=a&&o.putMetadata(k.BYTE_SEGMENTS,a);const c=r.getECLevel();return null!=c&&o.putMetadata(k.ERROR_CORRECTION_LEVEL,c),o}reset(){}static extractPureBits(t){const n=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==n||null==r)throw new R;const i=this.moduleSize(n,t);let s=n[1],a=n[0];const u=(r[0]-a+1)/i,g=(r[1]-s+1)/i;if(u<=0||g<=0)throw new R;const p=i/2;
vendor: 5,478 bytes, line 1
1s+=p,a+=p;const m=new _e(u,g);for(let I=0;I<g;I++){const S=s+I*i;for(let b=0;b<u;b++)t.get(a+b*i,S)&&m.set(b,I)}return m}static moduleSize(t,n){const r=n.getWidth();let i=t[0];const s=t[1];for(;i<r&&n.get(i,s);)i++;if(i===r)throw new R;const o=i-t[0];if(0===o)throw new R;return o}}return l.NO_POINTS=[],l})();var Yt=(()=>{return(l=Yt||(Yt={}))[l.L=0]="L",l[l.M=1]="M",l[l.Q=2]="Q",l[l.H=3]="H",Yt;var l})();class Re{constructor(e,t,n){this.value=e,this.stringValue=t,this.bits=n,Re.FOR_BITS.set(n,this),Re.FOR_VALUE.set(e,this)}getValue(){return this.value}getBits(){return this.bits}static fromString(e){switch(e){case"L":return Re.L;case"M":return Re.M;case"Q":return Re.Q;case"H":return Re.H;default:throw new Ae(e+"not available")}}toString(){return this.stringValue}equals(e){return e instanceof Re&&this.value===e.value}static forBits(e){if(e<0||e>=Re.FOR_BITS.size)throw new Z;return Re.FOR_BITS.get(e)}}Re.FOR_BITS=new Map,Re.FOR_VALUE=new Map,Re.L=new Re(Yt.L,"L",1),Re.M=new Re(Yt.M,"M",0),Re.Q=new Re(Yt.Q,"Q",3),Re.H=new Re(Yt.H,"H",2);class lt{constructor(e){this.errorCorrectionLevel=Re.forBits(e>>3&3),this.dataMask=7&e}static numBitsDiffering(e,t){return ie.bitCount(e^t)}static decodeFormatInformation(e,t){const n=lt.doDecodeFormatInformation(e,t);return null!==n?n:lt.doDecodeFormatInformation(e^lt.FORMAT_INFO_MASK_QR,t^lt.FORMAT_INFO_MASK_QR)}static doDecodeFormatInformation(e,t){let n=Number.MAX_SAFE_INTEGER,r=0;for(const i of lt.FORMAT_INFO_DECODE_LOOKUP){const s=i[0];if(s===e||s===t)return new lt(i[1]);let o=lt.numBitsDiffering(e,s);o<n&&(r=i[1],n=o),e!==t&&(o=lt.numBitsDiffering(t,s),o<n&&(r=i[1],n=o))}return n<=3?new lt(r):null}getErrorCorrectionLevel(){return this.errorCorrectionLevel}getDataMask(){return this.dataMask}hashCode(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask}equals(e){return e instanceof lt&&this.errorCorrectionLevel===e.errorCorrectionLevel&&this.dataMask===e.dataMask}}lt.FORMAT_INFO_MASK_QR=21522,lt.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])];class N{constructor(e,...t){this.ecCodewordsPerBlock=e,this.ecBlocks=t}getECCodewordsPerBlock(){return this.ecCodewordsPerBlock}getNumBlocks(){let e=0;const t=this.ecBlocks;for(const n of t)e+=n.getCount();return e}getTotalECCodewords(){return this.ecCodewordsPerBlock*this.getNumBlocks()}getECBlocks(){return this.ecBlocks}}class E{constructor(e,t){this.count=e,this.dataCodewords=t}getCount(){return this.count}getDataCodewords(){return this.dataCodewords}}class J{constructor(e,t,...n){this.versionNumber=e,this.alignmentPatternCenters=t,this.ecBlocks=n;let r=0;const i=n[0].getECCodewordsPerBlock(),s=n[0].getECBlocks();for(const o of s)r+=o.getCount()*(o.getDataCodewords()+i);this.totalCodewords=r}getVersionNumber(){return this.versionNumber}getAlignmentPatternCenters(){return this.alignmentPatternCenters}getTotalCodewords(){return this.totalCodewords}getDimensionForVersion(){return 17+4*this.versionNumber}getECBlocksForLevel(e){return this.ecBlocks[e.getValue()]}static getProvisionalVersionForDimension(e){if(e%4!=1)throw new P;try{return this.getVersionForNumber((e-17)/4)}catch{throw new P}}static getVersionForNumber(e){if(e<1||e>40)throw new Z;return J.VERSIONS[e-1]}static decodeVersionInformation(e){let t=Number.MAX_SAFE_INTEGER,n=0;for(let r=0;r<J.VERSION_DECODE_INFO.length;r++){const i=J.VERSION_DECODE_INFO[r];if(i===e)return J.getVersionForNumber(r+7);const s=lt.numBitsDiffering(e,i);s<t&&(n=r+7,t=s)}return t<=3?J.getVersionForNumber(n):null}buildFunctionPattern(){const e=this.getDimensionForVersion(),t=new _e(e);t.setRegion(0,0,9,9),t.setRegion(e-8,0,8,9),t.setRegion(0,e-8,9,8);const n=this.alignmentPatternCenters.length;for(let r=0;r<n;r++){const i=this.alignmentPatternCenters[r]-2;for(let s=0;s<n;s++)0===r&&(0===s||s===n-1)||r===n-1&&0===s||t.setRegion(this.alignmentPatternCenters[s]-2,i,5,5)}return t.setRegion(6,9,1,e-17),t.setRegion(9,6,e-17,1),this.versionNumber>6&&(t.setRegion(e-11,0,3,6),t.setRegion(0,e-11,6,3)),t}toString(){return""+this.versionNumber}}J.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]),J.VERSIONS=[new J(1,new Int32Array(0),new N(7,new E(1,19)),new N(10,new E(1,16)),new N(13,new E(1,13)),new N(17,new E(1,9))),new J(2,Int32Array.from([6,18]),new N(10,new E(1,34)),new N(16,new E(1,28)),new N(22,new E(1,22)),new N(28,new E(1,16))),new J(3,Int32Array.from([6,22]),new N(15,new E(1,55)),new N(26,new E(1,44)),new N(18,new E(2,17)
1),new N(22,new E(2,13))),new J(4,Int32Array.from([6,26]),new N(20,new E(1,80)),new N(18,new E(2,32)),new N(26,new E(2,24)),new N(16,new E(4,9))),new J(5,Int32Array.from([6,30]),new N(26,new E(1,108)),new N(24,new E(2,43)),new N(18,new E(2,15),new E(2,16)),new N(22,new E(2,11),new E(2,12))),new J(6,Int32Array.from([6,34]),new N(18,new E(2,68)),new N(16,new E(4,27)),new N(24,new E(4,19)),new N(28,new E(4,15))),new J(7,Int32Array.from([6,22,38]),new N(20,new E(2,78)),new N(18,new E(4,31)),new N(18,new E(2,14),new E(4,15)),new N(26,new E(4,13),new E(1,14))),new J(8,Int32Array.from([6,24,42]),new N(24,new E(2,97)),new N(22,new E(2,38),new E(2,39)),new N(22,new E(4,18),new E(2,19)),new N(26,new E(4,14),new E(2,15))),new J(9,Int32Array.from([6,26,46]),new N(30,new E(2,116)),new N(22,new E(3,36),new E(2,37)),new N(20,new E(4,16),new E(4,17)),new N(24,new E(4,12),new E(4,13))),new J(10,Int32Array.from([6,28,50]),new N(18,new E(2,68),new E(2,69)),new N(26,new E(4,43),new E(1,44)),new N(24,new E(6,19),new E(2,20)),new N(28,new E(6,15),new E(2,16))),new J(11,Int32Array.from([6,30,54]),new N(20,new E(4,81)),new N(30,new E(1,50),new E(4,51)),new N(28,new E(4,22),new E(4,23)),new N(24,new E(3,12),new E(8,13))),new J(12,Int32Array.from([6,32,58]),new N(24,new E(2,92),new E(2,93)),new N(22,new E(6,36),new E(2,37)),new N(26,new E(4,20),new E(6,21)),new N(28,new E(7,14),new E(4,15))),new J(13,Int32Array.from([6,34,62]),new N(26,new E(4,107)),new N(22,new E(8,37),new E(1,38)),new N(24,new E(8,20),new E(4,21)),new N(22,new E(12,11),new E(4,12))),new J(14,Int32Array.from([6,26,46,66]),new N(30,new E(3,115),new E(1,116)),new N(24,new E(4,40),new E(5,41)),new N(20,new E(11,16),new E(5,17)),new N(24,new E(11,12),new E(5,13))),new J(15,Int32Array.from([6,26,48,70]),new N(22,new E(5,87),new E(1,88)),new N(24,new E(5,41),new E(5,42)),new N(30,new E(5,24),new E(7,25)),new N(24,new E(11,12),new E(7,13))),new J(16,Int32Array.from([6,26,50,74]),new N(24,new E(5,98),new E(1,99)),new N(28,new E(7,45),new E(3,46)),new N(24,new E(15,19),new E(2,20)),new N(30,new E(3,15),new E(13,16))),new J(17,Int32Array.from([6,30,54,78]),new N(28,new E(1,107),new E(5,108)),new N(28,new E(10,46),new E(1,47)),new N(28,new E(1,22),new E(15,23)),new N(28,new E(2,14),new E(17,15))),new J(18,Int32Array.from([6,30,56,82]),new N(30,new E(5,120),new E(1,121)),new N(26,new E(9,43),new E(4,44)),new N(28,new E(17,22),new E(1,23)),new N(28,new E(2,14),new E(19,15))),new J(19,Int32Array.from([6,30,58,86]),new N(28,new E(3,113),new E(4,114)),new N(26,new E(3,44),new E(11,45)),new N(26,new E(17,21),new E(4,22)),new N(26,new E(9,13),new E(16,14))),new J(20,Int32Array.from([6,34,62,90]),new N(28,new E(3,107),new E(5,108)),new N(26,new E(3,41),new E(13,42)),new N(30,new E(15,24),new E(5,25)),new N(28,new E(15,15),new E(10,16))),new J(21,Int32Array.from([6,28,50,72,94]),new N(28,new E(4,116),new E(4,117)),new N(26,new E(17,42)),new N(28,new E(17,22),new E(6,23)),new N(30,new E(19,16),new E(6,17))),new J(22,Int32Array.from([6,26,50,74,98]),new N(28,new E(2,111),new E(7,112)),new N(28,new E(17,46)),new N(30,new E(7,24),new E(16,25)),new N(24,new E(34,13))),new J(23,Int32Array.from([6,30,54,78,102]),new N(30,new E(4,121),new E(5,122)),new N(28,new E(4,47),new E(14,48)),new N(30,new E(11,24),new E(14,25)),new N(30,new E(16,15),new E(14,16))),new J(24,Int32Array.from([6,28,54,80,106]),new N(30,new E(6,117),new E(4,118)),new N(28,new E(6,45),new E(14,46)),new N(30,new E(11,24),new E(16,25)),new N(30,new E(30,16),new E(2,17))),new J(25,Int32Array.from([6,32,58,84,110]),new N(26,new E(8,106),new E(4,107)),new N(28,new E(8,47),new E(13,48)),new N(30,new E(7,24),new E(22,25)),new N(30,new E(22,15),new E(13,16))),new J(26,Int32Array.from([6,30,58,86,114]),new N(28,new E(10,114),new E(2,115)),new N(28,new E(19,46),new E(4,47)),new N(28,new E(28,22),new E(6,23)),new N(30,new E(33,16),new E(4,17))),new J(27,Int32Array.from([6,34,62,90,118]),new N(30,new E(8,122),new E(4,123)),new N(28,new E(22,45),new E(3,46)),new N(30,new E(8,23),new E(26,24)),new N(30,new E(12,15),new E(28,16))),new J(28,Int32Array.from([6,26,50,74,98,122]),new N(30,new E(3,117),new E(10,118)),new N(28,new E(3,45),new E(23,46)),new N(30,new E(4,24),new E(31,25)),new N(30,new E(11,15),new E(31,16))),new J(29,Int32Array.from([6,30,54,78,102,126]),new N(30,new E(7,116),new E(7,117)),new N(28,new E(21,45),new E(7,46)),new N(30,new E(1,23),new E(37,24)),new N(30,new E(19,15),new E(26,16))),new J(30,Int32Array.from([6,26,52,78,104,130]),new N(30,new E(5,115),new E(10,116)),new N(28,new E(19,47),new E(10,48)),new N(30,new E(15,24),new E(25,25)),new N(30,new E(23,15),new E(25,16))),new J(31,Int32Array.from([6,30,56,82,108,134]),new N(30,new E(13,115),new E(3,116)),new N(28,new E(2,46),new E(29,47)),new N(30,new E(42,24),new E(1,25)),new N(30,new E(23,15),new E(28,16))),new J(32,Int32Array.from([6,34,60,86,112,138]),new N(30,new E(17,115)),new N(28,new E(10,46),new E(23,47)),new N(30,new E(10,24),new E(35,25)),new N(30,new E(19,15),new E(35,16))),new J(33,Int32Array.from([6,30,58,86,114,142]),new N(30,new E(17,115),new E(1,116)),new N(28,new E(14,46),new E(21,47)),new N(30,new E(29,24),new E(19,25)),new N(30,new E(11,15),new E(46,16))),new J(34,Int32Array.from([6,34,62,90,118,146]),new N(30,new E(13,115),new E(6,116)),new N(28,new E(14,46),new E(23,47)),new N(30,new E(44,24),new E(7,25)),new N(30,new E(59,16),new E(1,17))),new J(35,Int32Array.from([6,30,54,78,102,126,150]),new N(30,new E(12,121),new E(7,122)),new N(28,new E(12,47),new E(26,48)),new N(30,new E(39,24),new E(14,25)),new N(30,new E(22,15),new E(41,16))),new J(36,Int32Array.from([6,24,50,76,102,128,154]),new N(30,new E(6,121),new E(14,122)),new N(28,new E(6,47),new E(34,48)),new N(30,new E(46,24),new E(10,25)),new N(30,new E(2,15),new E(64,16))),new J(37,Int32Array.from([6,28,54,80,106,132,158]),new N(30,new E(17,122),new E(4,123)),new N(28,new E(29,46),new E(14,47)),new N(30,new E(49,24),new E(10,25)),new N(30,new E(24,15),new E(46,16))),new J(38,Int32Array.from([6,32,58,84,110,136,162]),new N(30,new E(4,122),new E(18,123)),new N(28,new E(13,46),new E(32,47)),new N(30,new E(48,24),new E(14,25)),new N(30,new E(42,15),new E(32,16))),new J(39,Int32Array.from([6,26,54,82,110,138,166]),new N(30,new E(20,117),new E(4,118)),new N(28,new E(40,47),new E(7,48)),new N(30,new E(43,24),new E(22,25)),new N(30,new E(10,15),new E(67,16))),new J(40,Int32Array.from([6,30,58,86,114,142,170]),new N(30,new E(19,118),new E(6,119)),new N(28,new E(18,47),new E(31,48)),new N(30,new E(34,24),new E(34,25)),new N(30,new E(20,15),new E(61,16)))];var $e=(()=>{return(l=$e||($e={}))[l.DATA_MASK_000=0]="DATA_MASK_000",l[l.DATA_MASK_001=1]="DATA_MASK_001",l[l.DATA_MASK_010=2]="DATA_MASK_010",l[l.DATA_MASK_011=3]="DATA_MASK_011",l[l.DATA_MASK_100=4]="DATA_MASK_100",l[l.DATA_MASK_101=5]="DATA_MASK_101",l[l.DATA_MASK_110=6]="DATA_MASK_110",l[l.DATA_MASK_111=7]="DATA_MASK_111",$e;var l})();class bt{constructor(e,t){this.value=e,this.isMasked=t}unmaskBitMatrix(e,t){for(let n=0;n<t;n++)for(let r=0;r<t;r++)this.isMasked(n,r)&&e.flip(r,n)}}bt.values=new Map([[$e.DATA_MASK_000,new bt($e.DATA_MASK_000,(l,e)=>0==(l+e&1))],[$e.DATA_MASK_001,new bt($e.DATA_MASK_001,(l,e)=>0==(1&l))],[$e.DATA_MASK_010,new bt($e.DATA_MASK_010,(l,e)=>e%3==0)],[$e.DATA_MASK_011,new bt($e.DATA_MASK_011,(l,e)=>(l+e)%3==0)],[$e.DATA_MASK_100,new bt($e.DATA_MASK_100,(l,e)=>0==(Math.floor(l/2)+Math.floor(e/3)&1))],[$e.DATA_MASK_101,new bt($e.DATA_MASK_101,(l,e)=>l*e%6==0)],[$e.DATA_MASK_110,new bt($e.DATA_MASK_110,(l,e)=>l*e%6<3)],[$e.DATA_MASK_111,new bt($e.DATA_MASK_111,(l,e)=>0==(l+e+l*e%3&1))]]);class dr{constructor(e){const t=e.getHeight();if(t<21||1!=(3&t))throw new P;this.bitMatrix=e}readFormatInformation(){if(null!=this.parsedFormatInfo)return this.parsedFormatInfo;let e=0;for(let i=0;i<6;i++)e=this.copyBit(i,8,e);e=this.copyBit(7,8,e),e=this.copyBit(8,8,e),e=this.copyBit(8,7,e);for(let i=5;i>=0;i--)e=this.copyBit(8,i,e);const t=this.bitMatrix.getHeight();let n=0;const r=t-7;for(let i=t-1;i>=r;i--)n=this.copyBit(8,i,n);for(let i=t-8;i<t;i++)n=this.copyBit(i,8,n);if(this.parsedFormatInfo=lt.decodeFormatInformation(e,n),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new P}readVersion(){if(null!=this.parsedVersion)return this.parsedVersion;const e=this.bitMatrix.getHeight(),t=Math.floor((e-17)/4);if(t<=6)return J.getVersionForNumber(t);let n=0;const r=e-11;for(let s=5;s>=0;s--)for(let o=e-9;o>=r;o--)n=this.copyBit(o,s,n);let i=J.decodeVersionInformation(n);if(null!==i&&i.getDimensionForVersion()===e)return this.parsedVersion=i,i;n=0;for(let s=5;s>=0;s--)for(let o=e-9;o>=r;o--)n=this.copyBit(s,o,n);if(i=J.decodeVersionInformation(n),null!==i&&i.getDimensionForVersion()===e)return this.parsedVersion=i,i;throw new P}copyBit(e,t,n){return(this.isMirror?this.bitMatrix.get(t,e):this.bitMatrix.get(e,t))?n<<1|1:n<<1}readCodewords(){const e=this.readFormatInformation(),t=this.readVersion(),n=bt.values.get(e.getDataMask()),r
vendor: 9,136 bytes, line 1
1=this.bitMatrix.getHeight();n.unmaskBitMatrix(this.bitMatrix,r);const i=t.buildFunctionPattern();let s=!0;const o=new Uint8Array(t.getTotalCodewords());let a=0,c=0,u=0;for(let g=r-1;g>0;g-=2){6===g&&g--;for(let p=0;p<r;p++){const m=s?r-1-p:p;for(let I=0;I<2;I++)i.get(g-I,m)||(u++,c<<=1,this.bitMatrix.get(g-I,m)&&(c|=1),8===u&&(o[a++]=c,u=0,c=0))}s=!s}if(a!==t.getTotalCodewords())throw new P;return o}remask(){if(null===this.parsedFormatInfo)return;const e=bt.values[this.parsedFormatInfo.getDataMask()],t=this.bitMatrix.getHeight();e.unmaskBitMatrix(this.bitMatrix,t)}setMirror(e){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=e}mirror(){const e=this.bitMatrix;for(let t=0,n=e.getWidth();t<n;t++)for(let r=t+1,i=e.getHeight();r<i;r++)e.get(t,r)!==e.get(r,t)&&(e.flip(r,t),e.flip(t,r))}}class vn{constructor(e,t){this.numDataCodewords=e,this.codewords=t}static getDataBlocks(e,t,n){if(e.length!==t.getTotalCodewords())throw new Z;const r=t.getECBlocksForLevel(n);let i=0;const s=r.getECBlocks();for(const I of s)i+=I.getCount();const o=new Array(i);let a=0;for(const I of s)for(let S=0;S<I.getCount();S++){const b=I.getDataCodewords(),_=r.getECCodewordsPerBlock()+b;o[a++]=new vn(b,new Uint8Array(_))}const c=o[0].codewords.length;let u=o.length-1;for(;u>=0&&o[u].codewords.length!==c;)u--;u++;const g=c-r.getECCodewordsPerBlock();let p=0;for(let I=0;I<g;I++)for(let S=0;S<a;S++)o[S].codewords[I]=e[p++];for(let I=u;I<a;I++)o[I].codewords[g]=e[p++];const m=o[0].codewords.length;for(let I=g;I<m;I++)for(let S=0;S<a;S++)o[S].codewords[S<u?I:I+1]=e[p++];return o}getNumDataCodewords(){return this.numDataCodewords}getCodewords(){return this.codewords}}var Et=(()=>{return(l=Et||(Et={}))[l.TERMINATOR=0]="TERMINATOR",l[l.NUMERIC=1]="NUMERIC",l[l.ALPHANUMERIC=2]="ALPHANUMERIC",l[l.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",l[l.BYTE=4]="BYTE",l[l.ECI=5]="ECI",l[l.KANJI=6]="KANJI",l[l.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",l[l.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",l[l.HANZI=9]="HANZI",Et;var l})();class ee{constructor(e,t,n,r){this.value=e,this.stringValue=t,this.characterCountBitsForVersions=n,this.bits=r,ee.FOR_BITS.set(r,this),ee.FOR_VALUE.set(e,this)}static forBits(e){const t=ee.FOR_BITS.get(e);if(void 0===t)throw new Z;return t}getCharacterCountBits(e){const t=e.getVersionNumber();let n;return n=t<=9?0:t<=26?1:2,this.characterCountBitsForVersions[n]}getValue(){return this.value}getBits(){return this.bits}equals(e){return e instanceof ee&&this.value===e.value}toString(){return this.stringValue}}ee.FOR_BITS=new Map,ee.FOR_VALUE=new Map,ee.TERMINATOR=new ee(Et.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),ee.NUMERIC=new ee(Et.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),ee.ALPHANUMERIC=new ee(Et.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),ee.STRUCTURED_APPEND=new ee(Et.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),ee.BYTE=new ee(Et.BYTE,"BYTE",Int32Array.from([8,16,16]),4),ee.ECI=new ee(Et.ECI,"ECI",Int32Array.from([0,0,0]),7),ee.KANJI=new ee(Et.KANJI,"KANJI",Int32Array.from([8,10,12]),8),ee.FNC1_FIRST_POSITION=new ee(Et.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),ee.FNC1_SECOND_POSITION=new ee(Et.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),ee.HANZI=new ee(Et.HANZI,"HANZI",Int32Array.from([8,10,12]),13);let Gn=(()=>{class l{static decode(t,n,r,i){const s=new Rn(t);let o=new fe;const a=new Array;let c=-1,u=-1;try{let m,g=null,p=!1;do{if(s.available()<4)m=ee.TERMINATOR;else{const I=s.readBits(4);m=ee.forBits(I)}switch(m){case ee.TERMINATOR:break;case ee.FNC1_FIRST_POSITION:case ee.FNC1_SECOND_POSITION:p=!0;break;case ee.STRUCTURED_APPEND:if(s.available()<16)throw new P;c=s.readBits(8),u=s.readBits(8);break;case ee.ECI:const I=l.parseECIValue(s);if(g=L.getCharacterSetECIByValue(I),null===g)throw new P;break;case ee.HANZI:const S=s.readBits(4),b=s.readBits(m.getCharacterCountBits(n));S===l.GB2312_SUBSET&&l.decodeHanziSegment(s,o,b);break;default:const _=s.readBits(m.getCharacterCountBits(n));switch(m){case ee.NUMERIC:l.decodeNumericSegment(s,o,_);break;case ee.ALPHANUMERIC:l.decodeAlphanumericSegment(s,o,_,p);break;case ee.BYTE:l.decodeByteSegment(s,o,_,g,a,i);break;case ee.KANJI:l.decodeKanjiSegment(s,o,_);break;default:throw new P}}}while(m!==ee.TERMINATOR)}catch{throw new P}return new Xe(t,o.toString(),0===a.length?null:a,null===r?null:r.toString(),c,u)}static decodeHanziSegment(t,n,r){if(13*r>t.available())throw new P;const i=new Uint8Array(2*r);let s=0;for(;r>0;){const o=t.readBits(13);let a=o/96<<8&4294967295|o%96;a+=a<959?41377:42657,i[s]=a>>8&255,i[s+1]=255&a,s+=2,r--}try{n.append(Le.decode(i,q.GB2312))}catch(o){throw new P(o)}}static decodeKanjiSegment(t,n,r){if(13*r>t.available())throw new P;const i=new Uint8Array(2*r);let s=0;for(;r>0;){const o=t.readBits(13);let a=o/192<<8&4294967295|o%192;a+=a<7936?33088:49472,i[s]=a>>8,i[s+1]=a,s+=2,r--}try{n.append(Le.decode(i,q.SHIFT_JIS))}catch(o){throw new P(o)}}static decodeByteSegment(t,n,r,i,s,o){if(8*r>t.available())throw new P;const a=new Uint8Array(r);for(let u=0;u<r;u++)a[u]=t.readBits(8);let c;c=null===i?q.guessEncoding(a,o):i.getName();try{n.append(Le.decode(a,c))}catch(u){throw new P(u)}s.push(a)}static toAlphaNumericChar(t){if(t>=l.ALPHANUMERIC_CHARS.length)throw new P;return l.ALPHANUMERIC_CHARS[t]}static decodeAlphanumericSegment(t,n,r,i){const s=n.length();for(;r>1;){if(t.available()<11)throw new P;const o=t.readBits(11);n.append(l.toAlphaNumericChar(Math.floor(o/45))),n.append(l.toAlphaNumericChar(o%45)),r-=2}if(1===r){if(t.available()<6)throw new P;n.append(l.toAlphaNumericChar(t.readBits(6)))}if(i)for(let o=s;o<n.length();o++)"%"===n.charAt(o)&&(o<n.length()-1&&"%"===n.charAt(o+1)?n.deleteCharAt(o+1):n.setCharAt(o,String.fromCharCode(29)))}static decodeNumericSegment(t,n,r){for(;r>=3;){if(t.available()<10)throw new P;const i=t.readBits(10);if(i>=1e3)throw new P;n.append(l.toAlphaNumericChar(Math.floor(i/100))),n.append(l.toAlphaNumericChar(Math.floor(i/10)%10)),n.append(l.toAlphaNumericChar(i%10)),r-=3}if(2===r){if(t.available()<7)throw new P;const i=t.readBits(7);if(i>=100)throw new P;n.append(l.toAlphaNumericChar(Math.floor(i/10))),n.append(l.toAlphaNumericChar(i%10))}else if(1===r){if(t.available()<4)throw new P;const i=t.readBits(4);if(i>=10)throw new P;n.append(l.toAlphaNumericChar(i))}}static parseECIValue(t){const n=t.readBits(8);if(!(128&n))return 127&n;if(128==(192&n))return(63&n)<<8&4294967295|t.readBits(8);if(192==(224&n))return(31&n)<<16&4294967295|t.readBits(16);throw new P}}return l.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",l.GB2312_SUBSET=1,l})();class Yn{constructor(e){this.mirrored=e}isMirrored(){return this.mirrored}applyMirroredCorrection(e){if(!this.mirrored||null===e||e.length<3)return;const t=e[0];e[0]=e[2],e[2]=t}}class gr{constructor(){this.rsDecoder=new Pt(se.QR_CODE_FIELD_256)}decodeBooleanArray(e,t){return this.decodeBitMatrix(_e.parseFromBooleanArray(e),t)}decodeBitMatrix(e,t){const n=new dr(e);let r=null;try{return this.decodeBitMatrixParser(n,t)}catch(i){r=i}try{n.remask(),n.setMirror(!0),n.readVersion(),n.readFormatInformation(),n.mirror();const i=this.decodeBitMatrixParser(n,t);return i.setOther(new Yn(!0)),i}catch(i){throw null!==r?r:i}}decodeBitMatrixParser(e,t){const n=e.readVersion(),r=e.readFormatInformation().getErrorCorrectionLevel(),i=e.readCodewords(),s=vn.getDataBlocks(i,n,r);let o=0;for(const u of s)o+=u.getNumDataCodewords();const a=new Uint8Array(o);let c=0;for(const u of s){const g=u.getCodewords(),p=u.getNumDataCodewords();this.correctErrors(g,p);for(let m=0;m<p;m++)a[c++]=g[m]}return Gn.decode(a,n,r,t)}correctErrors(e,t){const n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-t)}catch{throw new Ce}for(let r=0;r<t;r++)e[r]=n[r]}}class Bn extends K{constructor(e,t,n){super(e,t),this.estimatedModuleSize=n}aboutEquals(e,t,n){if(Math.abs(t-this.getY())<=e&&Math.abs(n-this.getX())<=e){const r=Math.abs(e-this.estimatedModuleSize);return r<=1||r<=this.estimatedModuleSize}return!1}combineEstimate(e,t,n){const r=(this.getX()+t)/2,i=(this.getY()+e)/2;return new Bn(r,i,(this.estimatedModuleSize+n)/2)}}class In{constructor(e,t,n,r,i,s,o){this.image=e,this.startX=t,this.startY=n,this.width=r,this.height=i,this.moduleSize=s,this.resultPointCallback=o,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}find(){const e=this.startX,t=this.height,r=e+this.width,i=this.startY+t/2,s=new Int32Array(3),o=this.image;for(let a=0;a<t;a++){const c=i+(1&a?-Math.floor((a+1)/2):Math.floor((a+1)/2));s[0]=0,s[1]=0,s[2]=0;let u=e;for(;u<r&&!o.get(u,c);)u++;let g=0;for(;u<r;){if(o.get(u,c))if(1===g)s[1]++;else if(2===g){if(this.foundPatternCross(s)){const p=this.handlePossibleCenter(s,c,u);if(null!==p)return p}s[0]=s[2],s[1]=1,s[2]=0,g=1}else s[++g]++;else 1===g&&g++,s[g]++;u++}if(this.foundPatternCross(s)){const p=this.handlePossibleCenter(s,c,r);if(null!==p)return p}}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new R}static centerFromEnd(e,t){return t-e[2]-e[1]/2}foundPatternCross(e){const t=this.moduleSize,n=t/2;
1for(let r=0;r<3;r++)if(Math.abs(t-e[r])>=n)return!1;return!0}crossCheckVertical(e,t,n,r){const i=this.image,s=i.getHeight(),o=this.crossCheckStateCount;o[0]=0,o[1]=0,o[2]=0;let a=e;for(;a>=0&&i.get(t,a)&&o[1]<=n;)o[1]++,a--;if(a<0||o[1]>n)return NaN;for(;a>=0&&!i.get(t,a)&&o[0]<=n;)o[0]++,a--;if(o[0]>n)return NaN;for(a=e+1;a<s&&i.get(t,a)&&o[1]<=n;)o[1]++,a++;if(a===s||o[1]>n)return NaN;for(;a<s&&!i.get(t,a)&&o[2]<=n;)o[2]++,a++;return o[2]>n||5*Math.abs(o[0]+o[1]+o[2]-r)>=2*r?NaN:this.foundPatternCross(o)?In.centerFromEnd(o,a):NaN}handlePossibleCenter(e,t,n){const r=e[0]+e[1]+e[2],i=In.centerFromEnd(e,n),s=this.crossCheckVertical(t,i,2*e[1],r);if(!isNaN(s)){const o=(e[0]+e[1]+e[2])/3;for(const c of this.possibleCenters)if(c.aboutEquals(o,s,i))return c.combineEstimate(s,i,o);const a=new Bn(i,s,o);this.possibleCenters.push(a),null!=this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(a)}return null}}class Ln extends K{constructor(e,t,n,r){super(e,t),this.estimatedModuleSize=n,this.count=r,void 0===r&&(this.count=1)}getEstimatedModuleSize(){return this.estimatedModuleSize}getCount(){return this.count}aboutEquals(e,t,n){if(Math.abs(t-this.getY())<=e&&Math.abs(n-this.getX())<=e){const r=Math.abs(e-this.estimatedModuleSize);return r<=1||r<=this.estimatedModuleSize}return!1}combineEstimate(e,t,n){const r=this.count+1,i=(this.count*this.getX()+t)/r,s=(this.count*this.getY()+e)/r;return new Ln(i,s,(this.count*this.estimatedModuleSize+n)/r,r)}}class xr{constructor(e){this.bottomLeft=e[0],this.topLeft=e[1],this.topRight=e[2]}getBottomLeft(){return this.bottomLeft}getTopLeft(){return this.topLeft}getTopRight(){return this.topRight}}let Ar=(()=>{class l{constructor(t,n){this.image=t,this.resultPointCallback=n,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=n}getImage(){return this.image}getPossibleCenters(){return this.possibleCenters}
vendor: 4,340 bytes, line 1
1find(t){const n=null!=t&&void 0!==t.get(Se.TRY_HARDER),r=null!=t&&void 0!==t.get(Se.PURE_BARCODE),i=this.image,s=i.getHeight(),o=i.getWidth();let a=Math.floor(3*s/(4*l.MAX_MODULES));(a<l.MIN_SKIP||n)&&(a=l.MIN_SKIP);let c=!1;const u=new Int32Array(5);for(let p=a-1;p<s&&!c;p+=a){u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0;let m=0;for(let I=0;I<o;I++)if(i.get(I,p))1==(1&m)&&m++,u[m]++;else if(1&m)u[m]++;else if(4===m)if(l.foundPatternCross(u)){if(!0!==this.handlePossibleCenter(u,p,I,r)){u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,m=3;continue}if(a=2,!0===this.hasSkipped)c=this.haveMultiplyConfirmedCenters();else{const b=this.findRowSkip();b>u[2]&&(p+=b-u[2]-a,I=o-1)}m=0,u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0}else u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,m=3;else u[++m]++;l.foundPatternCross(u)&&!0===this.handlePossibleCenter(u,p,o,r)&&(a=u[0],this.hasSkipped&&(c=this.haveMultiplyConfirmedCenters()))}const g=this.selectBestPatterns();return K.orderBestPatterns(g),new xr(g)}static centerFromEnd(t,n){return n-t[4]-t[3]-t[2]/2}static foundPatternCross(t){let n=0;for(let s=0;s<5;s++){const o=t[s];if(0===o)return!1;n+=o}if(n<7)return!1;const r=n/7,i=r/2;return Math.abs(r-t[0])<i&&Math.abs(r-t[1])<i&&Math.abs(3*r-t[2])<3*i&&Math.abs(r-t[3])<i&&Math.abs(r-t[4])<i}getCrossCheckStateCount(){const t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t}crossCheckDiagonal(t,n,r,i){const s=this.getCrossCheckStateCount();let o=0;const a=this.image;for(;t>=o&&n>=o&&a.get(n-o,t-o);)s[2]++,o++;if(t<o||n<o)return!1;for(;t>=o&&n>=o&&!a.get(n-o,t-o)&&s[1]<=r;)s[1]++,o++;if(t<o||n<o||s[1]>r)return!1;for(;t>=o&&n>=o&&a.get(n-o,t-o)&&s[0]<=r;)s[0]++,o++;if(s[0]>r)return!1;const c=a.getHeight(),u=a.getWidth();for(o=1;t+o<c&&n+o<u&&a.get(n+o,t+o);)s[2]++,o++;if(t+o>=c||n+o>=u)return!1;for(;t+o<c&&n+o<u&&!a.get(n+o,t+o)&&s[3]<r;)s[3]++,o++;if(t+o>=c||n+o>=u||s[3]>=r)return!1;for(;t+o<c&&n+o<u&&a.get(n+o,t+o)&&s[4]<r;)s[4]++,o++;return!(s[4]>=r)&&Math.abs(s[0]+s[1]+s[2]+s[3]+s[4]-i)<2*i&&l.foundPatternCross(s)}crossCheckVertical(t,n,r,i){const s=this.image,o=s.getHeight(),a=this.getCrossCheckStateCount();let c=t;for(;c>=0&&s.get(n,c);)a[2]++,c--;if(c<0)return NaN;for(;c>=0&&!s.get(n,c)&&a[1]<=r;)a[1]++,c--;if(c<0||a[1]>r)return NaN;for(;c>=0&&s.get(n,c)&&a[0]<=r;)a[0]++,c--;if(a[0]>r)return NaN;for(c=t+1;c<o&&s.get(n,c);)a[2]++,c++;if(c===o)return NaN;for(;c<o&&!s.get(n,c)&&a[3]<r;)a[3]++,c++;if(c===o||a[3]>=r)return NaN;for(;c<o&&s.get(n,c)&&a[4]<r;)a[4]++,c++;return a[4]>=r||5*Math.abs(a[0]+a[1]+a[2]+a[3]+a[4]-i)>=2*i?NaN:l.foundPatternCross(a)?l.centerFromEnd(a,c):NaN}crossCheckHorizontal(t,n,r,i){const s=this.image,o=s.getWidth(),a=this.getCrossCheckStateCount();let c=t;for(;c>=0&&s.get(c,n);)a[2]++,c--;if(c<0)return NaN;for(;c>=0&&!s.get(c,n)&&a[1]<=r;)a[1]++,c--;if(c<0||a[1]>r)return NaN;for(;c>=0&&s.get(c,n)&&a[0]<=r;)a[0]++,c--;if(a[0]>r)return NaN;for(c=t+1;c<o&&s.get(c,n);)a[2]++,c++;if(c===o)return NaN;for(;c<o&&!s.get(c,n)&&a[3]<r;)a[3]++,c++;if(c===o||a[3]>=r)return NaN;for(;c<o&&s.get(c,n)&&a[4]<r;)a[4]++,c++;return a[4]>=r||5*Math.abs(a[0]+a[1]+a[2]+a[3]+a[4]-i)>=i?NaN:l.foundPatternCross(a)?l.centerFromEnd(a,c):NaN}handlePossibleCenter(t,n,r,i){const s=t[0]+t[1]+t[2]+t[3]+t[4];let o=l.centerFromEnd(t,r),a=this.crossCheckVertical(n,Math.floor(o),t[2],s);if(!isNaN(a)&&(o=this.crossCheckHorizontal(Math.floor(o),Math.floor(a),t[2],s),!isNaN(o)&&(!i||this.crossCheckDiagonal(Math.floor(a),Math.floor(o),t[2],s)))){const c=s/7;let u=!1;const g=this.possibleCenters;for(let p=0,m=g.length;p<m;p++){const I=g[p];if(I.aboutEquals(c,a,o)){g[p]=I.combineEstimate(a,o,c),u=!0;break}}if(!u){const p=new Ln(o,a,c);g.push(p),null!=this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1}findRowSkip(){if(this.possibleCenters.length<=1)return 0;let n=null;for(const r of this.possibleCenters)if(r.getCount()>=l.CENTER_QUORUM){if(null!=n)return this.hasSkipped=!0,Math.floor((Math.abs(n.getX()-r.getX())-Math.abs(n.getY()-r.getY()))/2);n=r}return 0}haveMultiplyConfirmedCenters(){let t=0,n=0;const r=this.possibleCenters.length;for(const o of this.possibleCenters)o.getCount()>=l.CENTER_QUORUM&&(t++,n+=o.getEstimatedModuleSize());if(t<3)return!1;const i=n/r;let s=0;for(const o of this.possibleCenters)s+=Math.abs(o.getEstimatedModuleSize()-i);return s<=.05*n}
vendor: 4,991 bytes, line 1
1selectBestPatterns(){const t=this.possibleCenters.length;if(t<3)throw new R;const n=this.possibleCenters;let r;if(t>3){let i=0,s=0;for(const c of this.possibleCenters){const u=c.getEstimatedModuleSize();i+=u,s+=u*u}r=i/t;let o=Math.sqrt(s/t-r*r);n.sort((c,u)=>{const g=Math.abs(u.getEstimatedModuleSize()-r),p=Math.abs(c.getEstimatedModuleSize()-r);return g<p?-1:g>p?1:0});const a=Math.max(.2*r,o);for(let c=0;c<n.length&&n.length>3;c++)Math.abs(n[c].getEstimatedModuleSize()-r)>a&&(n.splice(c,1),c--)}if(n.length>3){let i=0;for(const s of n)i+=s.getEstimatedModuleSize();r=i/n.length,n.sort((s,o)=>{if(o.getCount()===s.getCount()){const a=Math.abs(o.getEstimatedModuleSize()-r),c=Math.abs(s.getEstimatedModuleSize()-r);return a<c?1:a>c?-1:0}return o.getCount()-s.getCount()}),n.splice(3)}return[n[0],n[1],n[2]]}}return l.CENTER_QUORUM=2,l.MIN_SKIP=3,l.MAX_MODULES=57,l})();class hn{constructor(e){this.image=e}getImage(){return this.image}getResultPointCallback(){return this.resultPointCallback}detect(e){this.resultPointCallback=null==e?null:e.get(Se.NEED_RESULT_POINT_CALLBACK);const n=new Ar(this.image,this.resultPointCallback).find(e);return this.processFinderPatternInfo(n)}processFinderPatternInfo(e){const t=e.getTopLeft(),n=e.getTopRight(),r=e.getBottomLeft(),i=this.calculateModuleSize(t,n,r);if(i<1)throw new R("No pattern found in proccess finder.");const s=hn.computeDimension(t,n,r,i),o=J.getProvisionalVersionForDimension(s),a=o.getDimensionForVersion()-7;let c=null;if(o.getAlignmentPatternCenters().length>0){const m=n.getX()-t.getX()+r.getX(),I=n.getY()-t.getY()+r.getY(),S=1-3/a,b=Math.floor(t.getX()+S*(m-t.getX())),_=Math.floor(t.getY()+S*(I-t.getY()));for(let z=4;z<=16;z<<=1)try{c=this.findAlignmentInRegion(i,b,_,z);break}catch(X){if(!(X instanceof R))throw X}}const u=hn.createTransform(t,n,r,c,s),g=hn.sampleGrid(this.image,u,s);let p;return p=null===c?[r,t,n]:[r,t,n,c],new qt(g,p)}static createTransform(e,t,n,r,i){const s=i-3.5;let o,a,c,u;return null!==r?(o=r.getX(),a=r.getY(),c=s-3,u=c):(o=t.getX()-e.getX()+n.getX(),a=t.getY()-e.getY()+n.getY(),c=s,u=s),Ct.quadrilateralToQuadrilateral(3.5,3.5,s,3.5,c,u,3.5,s,e.getX(),e.getY(),t.getX(),t.getY(),o,a,n.getX(),n.getY())}static sampleGrid(e,t,n){return Mt.getInstance().sampleGridWithTransform(e,n,n,t)}static computeDimension(e,t,n,r){const i=ge.round(K.distance(e,t)/r),s=ge.round(K.distance(e,n)/r);let o=Math.floor((i+s)/2)+7;switch(3&o){case 0:o++;break;case 2:o--;break;case 3:throw new R("Dimensions could be not found.")}return o}calculateModuleSize(e,t,n){return(this.calculateModuleSizeOneWay(e,t)+this.calculateModuleSizeOneWay(e,n))/2}calculateModuleSizeOneWay(e,t){const n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY())),r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY()));return isNaN(n)?r/7:isNaN(r)?n/7:(n+r)/14}sizeOfBlackWhiteBlackRunBothWays(e,t,n,r){let i=this.sizeOfBlackWhiteBlackRun(e,t,n,r),s=1,o=e-(n-e);o<0?(s=e/(e-o),o=0):o>=this.image.getWidth()&&(s=(this.image.getWidth()-1-e)/(o-e),o=this.image.getWidth()-1);let a=Math.floor(t-(r-t)*s);return s=1,a<0?(s=t/(t-a),a=0):a>=this.image.getHeight()&&(s=(this.image.getHeight()-1-t)/(a-t),a=this.image.getHeight()-1),o=Math.floor(e+(o-e)*s),i+=this.sizeOfBlackWhiteBlackRun(e,t,o,a),i-1}sizeOfBlackWhiteBlackRun(e,t,n,r){const i=Math.abs(r-t)>Math.abs(n-e);if(i){let m=e;e=t,t=m,m=n,n=r,r=m}const s=Math.abs(n-e),o=Math.abs(r-t);let a=-s/2;const c=e<n?1:-1,u=t<r?1:-1;let g=0;const p=n+c;for(let m=e,I=t;m!==p;m+=c){if(1===g===this.image.get(i?I:m,i?m:I)){if(2===g)return ge.distance(m,I,e,t);g++}if(a+=o,a>0){if(I===r)break;I+=u,a-=s}}return 2===g?ge.distance(n+c,r,e,t):NaN}findAlignmentInRegion(e,t,n,r){const i=Math.floor(r*e),s=Math.max(0,t-i),o=Math.min(this.image.getWidth()-1,t+i);if(o-s<3*e)throw new R("Alignment top exceeds estimated module size.");const a=Math.max(0,n-i),c=Math.min(this.image.getHeight()-1,n+i);if(c-a<3*e)throw new R("Alignment bottom exceeds estimated module size.");return new In(this.image,s,a,o-s,c-a,e,this.resultPointCallback).find()}}class Ht{constructor(){this.decoder=new gr}getDecoder(){return this.decoder}decode(e,t){let n,r;if(null!=t&&void 0!==t.get(Se.PURE_BARCODE)){const a=Ht.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(a,t),r=Ht.NO_POINTS}else{const a=new hn(e.getBlackMatrix()).detect(t);n=this.decoder.decodeBitMatrix(a.getBits(),t),r=a.getPoints()}n.getOther()instanceof Yn&&n.getOther().applyMirroredCorrection(r);const i=new Je(n.getText(),n.getRawBytes(),void 0,r,V.QR_CODE,void 0),s=n.getByteSegments();null!==s&&i.putMetadata(k.BYTE_SEGMENTS,s);const o=n.getECLevel();return null!==o&&i.putMetadata(k.ERROR_CORRECTION_LEVEL,o),n.hasStructuredAppend()&&(i.putMetadata(k.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),i.putMetadata(k.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())
vendor: 1,478 bytes, line 1
1),i}reset(){}static extractPureBits(e){const t=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(null===t||null===n)throw new R;const r=this.moduleSize(t,e);let i=t[1],s=n[1],o=t[0],a=n[0];if(o>=a||i>=s)throw new R;if(s-i!=a-o&&(a=o+(s-i),a>=e.getWidth()))throw new R;const c=Math.round((a-o+1)/r),u=Math.round((s-i+1)/r);if(c<=0||u<=0)throw new R;if(u!==c)throw new R;const g=Math.floor(r/2);i+=g,o+=g;const p=o+Math.floor((c-1)*r)-a;if(p>0){if(p>g)throw new R;o-=p}const m=i+Math.floor((u-1)*r)-s;if(m>0){if(m>g)throw new R;i-=m}const I=new _e(c,u);for(let S=0;S<u;S++){const b=i+Math.floor(S*r);for(let _=0;_<c;_++)e.get(o+Math.floor(_*r),b)&&I.set(_,S)}return I}static moduleSize(e,t){const n=t.getHeight(),r=t.getWidth();let i=e[0],s=e[1],o=!0,a=0;for(;i<r&&s<n;){if(o!==t.get(i,s)){if(5==++a)break;o=!o}i++,s++}if(i===r||s===n)throw new R;return(i-e[0])/7}}Ht.NO_POINTS=new Array;class ne{PDF417Common(){}static getBitCountSum(e){return ge.sum(e)}static toIntArray(e){if(null==e||!e.length)return ne.EMPTY_INT_ARRAY;const t=new Int32Array(e.length);let n=0;for(const r of e)t[n++]=r;return t}static getCodeword(e){const t=De.binarySearch(ne.SYMBOL_TABLE,262143&e);return t<0?-1:(ne.CODEWORD_TABLE[t]-1)%ne.NUMBER_OF_CODEWORDS}}ne.NUMBER_OF_CODEWORDS=929,ne.MAX_CODEWORDS_IN_BARCODE=ne.NUMBER_OF_CODEWORDS-1,ne.MIN_ROWS_IN_BARCODE=3,ne.MAX_ROWS_IN_BARCODE=90,ne.MODULES_IN_CODEWORD=17,ne.MODULES_IN_STOP_PATTERN=18,ne.BARS_IN_MODULE=8,ne.EMPTY_INT_ARRAY=new Int32Array([]),n
vendor: 18,273 bytes, line 1
1e.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),
1n
vendor: 12,868 bytes, line 1
1e.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]);class
vendor: 21,959 bytes, line 1
1pr{constructor(e,t){this.bits=e,this.points=t}getBits(){return this.bits}getPoints(){return this.points}}class ce{static detectMultiple(e,t,n){let r=e.getBlackMatrix(),i=ce.detect(n,r);return i.length||(r=r.clone(),r.rotate180(),i=ce.detect(n,r)),new pr(r,i)}static detect(e,t){const n=new Array;let r=0,i=0,s=!1;for(;r<t.getHeight();){const o=ce.findVertices(t,r,i);if(null!=o[0]||null!=o[3]){if(s=!0,n.push(o),!e)break;null!=o[2]?(i=Math.trunc(o[2].getX()),r=Math.trunc(o[2].getY())):(i=Math.trunc(o[4].getX()),r=Math.trunc(o[4].getY()))}else{if(!s)break;s=!1,i=0;for(const a of n)null!=a[1]&&(r=Math.trunc(Math.max(r,a[1].getY()))),null!=a[3]&&(r=Math.max(r,Math.trunc(a[3].getY())));r+=ce.ROW_STEP}}return n}static findVertices(e,t,n){const r=e.getHeight(),i=e.getWidth(),s=new Array(8);return ce.copyToResult(s,ce.findRowsWithPattern(e,r,i,t,n,ce.START_PATTERN),ce.INDEXES_START_PATTERN),null!=s[4]&&(n=Math.trunc(s[4].getX()),t=Math.trunc(s[4].getY())),ce.copyToResult(s,ce.findRowsWithPattern(e,r,i,t,n,ce.STOP_PATTERN),ce.INDEXES_STOP_PATTERN),s}static copyToResult(e,t,n){for(let r=0;r<n.length;r++)e[n[r]]=t[r]}static findRowsWithPattern(e,t,n,r,i,s){const o=new Array(4);let a=!1;const c=new Int32Array(s.length);for(;r<t;r+=ce.ROW_STEP){let g=ce.findGuardPattern(e,i,r,n,!1,s,c);if(null!=g){for(;r>0;){const p=ce.findGuardPattern(e,i,--r,n,!1,s,c);if(null==p){r++;break}g=p}o[0]=new K(g[0],r),o[1]=new K(g[1],r),a=!0;break}}let u=r+1;if(a){let g=0,p=Int32Array.from([Math.trunc(o[0].getX()),Math.trunc(o[1].getX())]);for(;u<t;u++){const m=ce.findGuardPattern(e,p[0],u,n,!1,s,c);if(null!=m&&Math.abs(p[0]-m[0])<ce.MAX_PATTERN_DRIFT&&Math.abs(p[1]-m[1])<ce.MAX_PATTERN_DRIFT)p=m,g=0;else{if(g>ce.SKIPPED_ROW_COUNT_MAX)break;g++}}u-=g+1,o[2]=new K(p[0],u),o[3]=new K(p[1],u)}return u-r<ce.BARCODE_MIN_HEIGHT&&De.fill(o,null),o}static findGuardPattern(e,t,n,r,i,s,o){De.fillWithin(o,0,o.length,0);let a=t,c=0;for(;e.get(a,n)&&a>0&&c++<ce.MAX_PIXEL_DRIFT;)a--;let u=a,g=0,p=s.length;for(let m=i;u<r;u++)if(e.get(u,n)!==m)o[g]++;else{if(g===p-1){if(ce.patternMatchVariance(o,s,ce.MAX_INDIVIDUAL_VARIANCE)<ce.MAX_AVG_VARIANCE)return new Int32Array([a,u]);a+=o[0]+o[1],we.arraycopy(o,2,o,0,g-1),o[g-1]=0,o[g]=0,g--}else g++;o[g]=1,m=!m}return g===p-1&&ce.patternMatchVariance(o,s,ce.MAX_INDIVIDUAL_VARIANCE)<ce.MAX_AVG_VARIANCE?new Int32Array([a,u-1]):null}static patternMatchVariance(e,t,n){let r=e.length,i=0,s=0;for(let c=0;c<r;c++)i+=e[c],s+=t[c];if(i<s)return 1/0;let o=i/s;n*=o;let a=0;for(let c=0;c<r;c++){let u=e[c],g=t[c]*o,p=u>g?u-g:g-u;if(p>n)return 1/0;a+=p}return a/i}}ce.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),ce.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),ce.MAX_AVG_VARIANCE=.42,ce.MAX_INDIVIDUAL_VARIANCE=.8,ce.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),ce.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),ce.MAX_PIXEL_DRIFT=3,ce.MAX_PATTERN_DRIFT=5,ce.SKIPPED_ROW_COUNT_MAX=25,ce.ROW_STEP=5,ce.BARCODE_MIN_HEIGHT=10;class it{constructor(e,t){if(0===t.length)throw new Z;this.field=e;let n=t.length;if(n>1&&0===t[0]){let r=1;for(;r<n&&0===t[r];)r++;r===n?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(n-r),we.arraycopy(t,r,this.coefficients,0,this.coefficients.length))}else this.coefficients=t}getCoefficients(){return this.coefficients}getDegree(){return this.coefficients.length-1}isZero(){return 0===this.coefficients[0]}getCoefficient(e){return this.coefficients[this.coefficients.length-1-e]}evaluateAt(e){if(0===e)return this.getCoefficient(0);if(1===e){let r=0;for(let i of this.coefficients)r=this.field.add(r,i);return r}let t=this.coefficients[0],n=this.coefficients.length;for(let r=1;r<n;r++)t=this.field.add(this.field.multiply(e,t),this.coefficients[r]);return t}add(e){if(!this.field.equals(e.field))throw new Z("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;let t=this.coefficients,n=e.coefficients;if(t.length>n.length){let s=t;t=n,n=s}let r=new Int32Array(n.length),i=n.length-t.length;we.arraycopy(n,0,r,0,i);for(let s=i;s<n.length;s++)r[s]=this.field.add(t[s-i],n[s]);return new it(this.field,r)}subtract(e){if(!this.field.equals(e.field))throw new Z("ModulusPolys do not have same ModulusGF field");return e.isZero()?this:this.add(e.negative())}multiply(e){return e instanceof it?this.multiplyOther(e):this.multiplyScalar(e)}multiplyOther(e){if(!this.field.equals(e.field))throw new Z("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new it(this.field,new Int32Array([0]));let t=this.coefficients,n=t.length,r=e.coefficients,i=r.length,s=new Int32Array(n+i-1);for(let o=0;o<n;o++){let a=t[o];for(let c=0;c<i;c++)s[o+c]=this.field.add(s[o+c],this.field.multiply(a,r[c]))}return new it(this.field,s)}negative(){let e=this.coefficients.length,t=new Int32Array(e);for(let n=0;n<e;n++)t[n]=this.field.subtract(0,this.coefficients[n]);return new it(this.field,t)}multiplyScalar(e){if(0===e)return new it(this.field,new Int32Array([0]));if(1===e)return this;let t=this.coefficients.length,n=new Int32Array(t);for(let r=0;r<t;r++)n[r]=this.field.multiply(this.coefficients[r],e);return new it(this.field,n)}multiplyByMonomial(e,t){if(e<0)throw new Z;if(0===t)return new it(this.field,new Int32Array([0]));let n=this.coefficients.length,r=new Int32Array(n+e);for(let i=0;i<n;i++)r[i]=this.field.multiply(this.coefficients[i],t);return new it(this.field,r)}toString(){let e=new fe;for(let t=this.getDegree();t>=0;t--){let n=this.getCoefficient(t);0!==n&&(n<0?(e.append(" - "),n=-n):e.length()>0&&e.append(" + "),(0===t||1!==n)&&e.append(n),0!==t&&(1===t?e.append("x"):(e.append("x^"),e.append(t))))}return e.toString()}}class wr{add(e,t){return(e+t)%this.modulus}subtract(e,t){return(this.modulus+e-t)%this.modulus}exp(e){return this.expTable[e]}log(e){if(0===e)throw new Z;return this.logTable[e]}inverse(e){if(0===e)throw new sn;return this.expTable[this.modulus-this.logTable[e]-1]}multiply(e,t){return 0===e||0===t?0:this.expTable[(this.logTable[e]+this.logTable[t])%(this.modulus-1)]}getSize(){return this.modulus}equals(e){return e===this}}class Pn extends wr{constructor(e,t){super(),this.modulus=e,this.expTable=new Int32Array(e),this.logTable=new Int32Array(e);let n=1;for(let r=0;r<e;r++)this.expTable[r]=n,n=n*t%e;for(let r=0;r<e-1;r++)this.logTable[this.expTable[r]]=r;this.zero=new it(this,new Int32Array([0])),this.one=new it(this,new Int32Array([1]))}getZero(){return this.zero}getOne(){return this.one}buildMonomial(e,t){if(e<0)throw new Z;if(0===t)return this.zero;let n=new Int32Array(e+1);return n[0]=t,new it(this,n)}}Pn.PDF417_GF=new Pn(ne.NUMBER_OF_CODEWORDS,3);class Xn{constructor(){this.field=Pn.PDF417_GF}decode(e,t,n){let r=new it(this.field,e),i=new Int32Array(t),s=!1;for(let I=t;I>0;I--){let S=r.evaluateAt(this.field.exp(I));i[t-I]=S,0!==S&&(s=!0)}if(!s)return 0;let o=this.field.getOne();if(null!=n)for(const I of n){let S=this.field.exp(e.length-1-I),b=new it(this.field,new Int32Array([this.field.subtract(0,S),1]));o=o.multiply(b)}let a=new it(this.field,i),c=this.runEuclideanAlgorithm(this.field.buildMonomial(t,1),a,t),u=c[0],g=c[1],p=this.findErrorLocations(u),m=this.findErrorMagnitudes(g,u,p);for(let I=0;I<p.length;I++){let S=e.length-1-this.field.log(p[I]);if(S<0)throw Ce.getChecksumInstance();e[S]=this.field.subtract(e[S],m[I])}return p.length}runEuclideanAlgorithm(e,t,n){if(e.getDegree()<t.getDegree()){let p=e;e=t,t=p}let r=e,i=t,s=this.field.getZero(),o=this.field.getOne();for(;i.getDegree()>=Math.round(n/2);){let p=r,m=s;if(r=i,s=o,r.isZero())throw Ce.getChecksumInstance();i=p;let I=this.field.getZero(),S=r.getCoefficient(r.getDegree()),b=this.field.inverse(S);for(;i.getDegree()>=r.getDegree()&&!i.isZero();){let _=i.getDegree()-r.getDegree(),z=this.field.multiply(i.getCoefficient(i.getDegree()),b);I=I.add(this.field.buildMonomial(_,z)),i=i.subtract(r.multiplyByMonomial(_,z))}o=I.multiply(s).subtract(m).negative()}let a=o.getCoefficient(0);if(0===a)throw Ce.getChecksumInstance();let c=this.field.inverse(a);return[o.multiply(c),i.multiply(c)]}findErrorLocations(e){let t=e.getDegree(),n=new Int32Array(t),r=0;for(let i=1;i<this.field.getSize()&&r<t;i++)0===e.evaluateAt(i)&&(n[r]=this.field.inverse(i),r++);if(r!==t)throw Ce.getChecksumInstance();return n}findErrorMagnitudes(e,t,n){let r=t.getDegree(),i=new Int32Array(r);for(let c=1;c<=r;c++)i[r-c]=this.field.multiply(c,t.getCoefficient(c));let s=new it(this.field,i),o=n.length,a=new Int32Array(o);for(let c=0;c<o;c++){let u=this.field.inverse(n[c]),g=this.field.subtract(0,e.evaluateAt(u)),p=this.field.inverse(s.evaluateAt(u));a[c]=this.field.multiply(g,p)}return a}}class Xt{constructor(e,t,n,r,i){e instanceof Xt?this.constructor_2(e):this.constructor_1(e,t,n,r,i)}constructor_1(e,t,n,r,i){const s=null==t||null==n,o=null==r||null==i;if(s&&o)throw new R;s?(t=new K(0,r.getY()),n=new K(0,i.getY())):o&&(r=new K(e.getWidth()-1,t.getY()),i=new K(e.getWidth()-1,n.getY())),this.image=e,this.topLeft=t,this.bottomLeft=n,this.topRight=r,this.bottomRight=i,this.minX=Math.trunc(Math.min(t.getX(),n.getX())),this.maxX=Math.trunc(Math.max(r.getX(),i.getX())),this.minY=Math.trunc(Math.min(t.getY(),r.getY())),this.maxY=Math.trunc(Math.max(n.getY(),i.getY()))}constructor_2(e){this.image=e.image,this.topLeft=e.getTopLeft(),this.bottomLeft=e.getBottomLeft(),this.topRight=e.getTopRight(),this.bottomRight=e.getBottomRight(),this.minX=e.getMinX(),this.maxX=e.getMaxX(),this.minY=e.getMinY(),this.maxY=e.getMaxY()}static merge(e,t){return null==e?t:null==t?e:new Xt(e.image,e.topLeft,e.bottomLeft,t.topRight,t.bottomRight)}addMissingRows(e,t,n){let r=this.topLeft,i=this.bottomLeft,s=this.topRight,o=this.bottomRight;if(e>0){let a=n?this.topLeft:this.topRight,c=Math.trunc(a.getY()-e);c<0&&(c=0);let u=new K(a.getX(),c);n?r=u:s=u}if(t>0){let a=n?this.bottomLeft:this.bottomRight,c=Math.trunc(a.getY()+t);c>=this.image.getHeight()&&(c=this.image.getHeight()-1);let u=new K(a.getX(),c);n?i=u:o=u}return new Xt(this.image,r,i,s,o)}getMinX(){return this.minX}getMaxX(){return this.maxX}getMinY(){return this.minY}getMaxY(){return this.maxY}getTopLeft(){return this.topLeft}getTopRight(){return this.topRight}getBottomLeft(){return this.bottomLeft}getBottomRight(){return this.bottomRight}}class Cr{constructor(e,t,n,r){this.columnCount=e,this.errorCorrectionLevel=r,this.rowCountUpperPart=t,this.rowCountLowerPart=n,this.rowCount=t+n}getColumnCount(){return this.columnCount}getErrorCorrectionLevel(){return this.errorCorrectionLevel}getRowCount(){return this.rowCount}getRowCountUpperPart(){return this.rowCountUpperPart}getRowCountLowerPart(){return this.rowCountLowerPart}}class fn{constructor(){this.buffer=""}static form(e,t){let n=-1;return e.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,function r(s,o,a,c,u,g){if("%%"===s)return"%";if(void 0===t[++n])return;s=c?parseInt(c.substr(1)):void 0;let m,p=u?parseInt(u.substr(1)):void 0;switch(g){case"s":m=t[n];break;case"c":m=t[n][0];break;case"f":m=parseFloat(t[n]).toFixed(s);break;case"p":m=parseFloat(t[n]).toPrecision(s);break;case"e":m=parseFloat(t[n]).toExponential(s);break;case"x":m=parseInt(t[n]).toString(p||16);break;case"d":m=parseFloat(parseInt(t[n],p||10).toPrecision(s)).toFixed(0)}m="object"==typeof m?JSON.stringify(m):(+m).toString(p);let I=parseInt(a),S=a&&a[0]+""=="0"?"0":" ";for(;m.length<I;)m=void 0!==o?m+S:S+m;return m})}format(e,...t){this.buffer+=fn.form(e,t)}toString(){return this.buffer}}let Zn=(()=>{class l{constructor(t){this.boundingBox=new Xt(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}getCodewordNearby(t){let n=this.getCodeword(t);if(null!=n)return n;for(let r=1;r<l.MAX_NEARBY_DISTANCE;r++){let i=this.imageRowToCodewordIndex(t)-r;if(i>=0&&(n=this.codewords[i],null!=n)||(i=this.imageRowToCodewordIndex(t)+r,i<this.codewords.length&&(n=this.codewords[i],null!=n)))return n}return null}imageRowToCodewordIndex(t){return t-this.boundingBox.getMinY()}setCodeword(t,n){this.codewords[this.imageRowToCodewordIndex(t)]=n}getCodeword(t){return this.codewords[this.imageRowToCodewordIndex(t)]}getBoundingBox(){return this.boundingBox}getCodewords(){return this.codewords}toString(){const t=new fn;let n=0;for(const r of this.codewords)null!=r?t.format("%3d: %3d|%3d%n",n++,r.getRowNumber(),r.getValue()):t.format("%3d: | %n",n++);return t.toString()}}return l.MAX_NEARBY_DISTANCE=5,l})();class dn{constructor(){this.values=new Map}setValue(e){e=Math.trunc(e);let t=this.values.get(e);null==t&&(t=0),t++,this.values.set(e,t)}getValue(){let e=-1,t=new Array;for(const[n,r]of this.values.entries()){const i={getKey:()=>n,getValue:()=>r};i.getValue()>e?(e=i.getValue(),t=[],t.push(i.getKey())):i.getValue()===e&&t.push(i.getKey())}return ne.toIntArray(t)}getConfidence(e){return this.values.get(e)}}class Qn extends Zn{constructor(e,t){super(e),this._isLeft=t}setRowNumbers(){for(let e of this.getCodewords())e?.setRowNumberAsRowIndicatorColumn()}adjustCompleteIndicatorColumnRowNumbers(e){let t=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(t,e);let n=this.getBoundingBox(),r=this._isLeft?n.getTopLeft():n.getTopRight(),i=this._isLeft?n.getBottomLeft():n.getBottomRight(),s=this.imageRowToCodewordIndex(Math.trunc(r.getY())),o=this.imageRowToCodewordIndex(Math.trunc(i.getY())),a=-1,c=1,u=0;for(let g=s;g<o;g++){if(null==t[g])continue;let p=t[g],m=p.getRowNumber()-a;if(0===m)u++;else if(1===m)c=Math.max(c,u),u=1,a=p.getRowNumber();else if(m<0||p.getRowNumber()>=e.getRowCount()||m>g)t[g]=null;else{let I;I=c>2?(c-2)*m:m;let S=I>=g;for(let b=1;b<=I&&!S;b++)S=null!=t[g-b];S?t[g]=null:(a=p.getRowNumber(),u=1)}}}getRowHeights(){let e=this.getBarcodeMetadata();if(null==e)return null;this.adjustIncompleteIndicatorColumnRowNumbers(e);let t=new Int32Array(e.getRowCount());for(let n of this.getCodewords())if(null!=n){let r=n.getRowNumber();if(r>=t.length)continue;t[r]++}return t}adjustIncompleteIndicatorColumnRowNumbers(e){let t=this.getBoundingBox(),n=this._isLeft?t.getTopLeft():t.getTopRight(),r=this._isLeft?t.getBottomLeft():t.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),s=this.imageRowToCodewordIndex(Math.trunc(r.getY())),o=this.getCodewords(),a=-1;for(let c=i;c<s;c++){if(null==o[c])continue;let u=o[c];u.setRowNumberAsRowIndicatorColumn();let g=u.getRowNumber()-a;0===g||(1===g?a=u.getRowNumber():u.getRowNumber()>=e.getRowCount()?o[c]=null:a=u.getRowNumber())}}getBarcodeMetadata(){let e=this.getCodewords(),t=new dn,n=new dn,r=new dn,i=new dn;for(let o of e){if(null==o)continue;o.setRowNumberAsRowIndicatorColumn();let a=o.getValue()%30,c=o.getRowNumber();switch(this._isLeft||(c+=2),c%3){case 0:n.setValue(3*a+1);break;case 1:i.setValue(a/3),r.setValue(a%3);break;case 2:t.setValue(a+1)}}if(0===t.getValue().length||0===n.getValue().length||0===r.getValue().length||0===i.getValue().length||t.getValue()[0]<1||n.getValue()[0]+r.getValue()[0]<ne.MIN_ROWS_IN_BARCODE||n.getValue()[0]+r.getValue()[0]>ne.MAX_ROWS_IN_BARCODE)return null;let s=new Cr(t.getValue()[0],n.getValue()[0],r.getValue()[0],i.getValue()[0]);return this.removeIncorrectCodewords(e,s),s}removeIncorrectCodewords(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(null==e[n])continue;let i=r.getValue()%30,s=r.getRowNumber();if(s>t.getRowCount())e[n]=null;else switch(this._isLeft||(s+=2),s%3){case 0:3*i+1!==t.getRowCountUpperPart()&&(e[n]=null);break;case 1:(Math.trunc(i/3)!==t.getErrorCorrectionLevel()||i%3!==t.getRowCountLowerPart())&&(e[n]=null);break;case 2:i+1!==t.getColumnCount()&&(e[n]=null)}}}isLeft(){return this._isLeft}toString(){return"IsLeft: "+this._isLeft+"\n"+super.toString()}}class gn{constructor(e,t){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=e,this.barcodeColumnCount=e.getColumnCount(),this.boundingBox=t,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}getDetectionResultColumns(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);let t,e=ne.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e<t);return this.detectionResultColumns}adjustIndicatorColumnRowNumbers(e){e?.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)}adjustRowNumbersAndGetCount(){let e=this.adjustRowNumbersByRow();if(0===e)return 0;for(let t=1;t<this.barcodeColumnCount+1;t++){let n=this.detectionResultColumns[t].getCodewords();for(let r=0;r<n.length;r++)null!=n[r]&&(n[r].hasValidRowNumber()||this.adjustRowNumbers(t,r,n))}return e}adjustRowNumbersByRow(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()}adjustRowNumbersFromBothRI(){if(null==this.detectionResultColumns[0]||null==this.detectionResultColumns[this.barcodeColumnCount+1])return;let e=this.detectionResultColumns[0].getCodewords(),t=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords();for(let n=0;n<e.length;n++)if(null!=e[n]&&null!=t[n]&&e[n].getRowNumber()===t[n].getRowNumber())for(let r=1;r<=this.barcodeColumnCount;r++){let i=this.detectionResultColumns[r].getCodewords()[n];null!=i&&(i.setRowNumber(e[n].getRowNumber()),i.hasValidRowNumber()||(this.detectionResultColumns[r].getCodewords()[n]=null))}}adjustRowNumbersFromRRI(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;let e=0,t=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords();for(let n=0;n<t.length;n++){if(null==t[n])continue;let r=t[n].getRowNumber(),i=0;for(let s=this.barcodeColumnCount+1;s>0&&i<this.ADJUST_ROW_NUMBER_SKIP;s--){let o=this.detectionResultColumns[s].getCodewords()[n];null!=o&&(i=gn.adjustRowNumberIfValid(r,i,o),o.hasValidRowNumber()||e++)}}return e}adjustRowNumbersFromLRI(){if(null==this.detectionResultColumns[0])return 0;let e=0,t=this.detectionResultColumns[0].getCodewords();for(let n=0;n<t.length;n++){if(null==t[n])continue;let r=t[n].getRowNumber(),i=0;for(let s=1;s<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;s++){let o=this.detectionResultColumns[s].getCodewords()[n];null!=o&&(i=gn.adjustRowNumberIfValid(r,i,o),o.hasValidRowNumber()||e++)}}return e}static adjustRowNumberIfValid(e,t,n){return null==n||n.hasValidRowNumber()||(n.isValidRowNumber(e)?(n.setRowNumber(e),t=0):++t),t}adjustRowNumbers(e,t,n){if(!this.detectionResultColumns[e-1])return;let r=n[t],i=this.detectionResultColumns[e-1].getCodewords(),s=i;null!=this.detectionResultColumns[e+1]&&(s=this.detectionResultColumns[e+1].getCodewords());let o=new Array(14);o[2]=i[t],o[3]=s[t],t>0&&(o[0]=n[t-1],o[4]=i[t-1],o[5]=s[t-1]),t>1&&(o[8]=n[t-2],o[10]=i[t-2],o[11]=s[t-2]),t<n.length-1&&(o[1]=n[t+1],o[6]=i[t+1],o[7]=s[t+1]),t<n.length-2&&(o[9]=n[t+2],o[12]=i[t+2],o[13]=s[t+2]);for(let a of o)if(gn.adjustRowNumber(r,a))return}static adjustRowNumber(e,t){return!(null==t||!t.hasValidRowNumber()||t.getBucket()!==e.getBucket()||(e.setRowNumber(t.getRowNumber()),0))}getBarcodeColumnCount(){return this.barcodeColumnCount}getBarcodeRowCount(){return this.barcodeMetadata.getRowCount()}getBarcodeECLevel(){return this.barcodeMetadata.getErrorCorrectionLevel()}setBoundingBox(e){this.boundingBox=e}getBoundingBox(){return this.boundingBox}setDetectionResultColumn(e,t){this.detectionResultColumns[e]=t}getDetectionResultColumn(e){return this.detectionResultColumns[e]}toString(){let e=this.detectionResultColumns[0];null==e&&(e=this.detectionResultColumns[this.barcodeColumnCount+1]);let t=new fn;for(let n=0;n<e.getCodewords().length;n++){t.format("CW %3d:",n);for(let r=0;r<this.barcodeColumnCount+2;r++){if(null==this.detectionResultColumns[r]){t.format(" | ");continue}let i=this.detectionResultColumns[r].getCodewords()[n];null!=i?t.format(" %3d|%3d",i.getRowNumber(),i.getValue()):t.format(" | ")}t.format("%n")}return t.toString()}}let Er=(()=>{class l{constructor(t,n,r,i){this.rowNumber=l.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(t),this.endX=Math.trunc(n),this.bucket=Math.trunc(r),this.value=Math.trunc(i)}hasValidRowNumber(){return this.isValidRowNumber(this.rowNumber)}isValidRowNumber(t){return t!==l.BARCODE_ROW_UNKNOWN&&this.bucket===t%3*3}setRowNumberAsRowIndicatorColumn(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))}getWidth(){return this.endX-this.startX}getStartX(){return this.startX}getEndX(){return this.endX}getBucket(){return this.bucket}getValue(){return this.value}getRowNumber(){return this.rowNumber}setRowNumber(t){this.rowNumber=t}toString(){return this.rowNumber+"|"+this.value}}return l.BARCODE_ROW_UNKNOWN=-1,l})();class gt{static initialize(){for(let e=0;e<ne.SYMBOL_TABLE.length;e++){let t=ne.SYMBOL_TABLE[e],n=1&t;for(let r=0;r<ne.BARS_IN_MODULE;r++){let i=0;for(;(1&t)===n;)i+=1,t>>=1;n=1&t,gt.RATIOS_TABLE[e]||(gt.RATIOS_TABLE[e]=new Array(ne.BARS_IN_MODULE)),gt.RATIOS_TABLE[e][ne.BARS_IN_MODULE-r-1]=Math.fround(i/ne.MODULES_IN_CODEWORD)}}this.bSymbolTableReady=!0}static getDecodedValue(e){let t=gt.getDecodedCodewordValue(gt.sampleBitCounts(e));return-1!==t?t:gt.getClosestDecodedValue(e)}static sampleBitCounts(e){let t=ge.sum(e),n=new Int32Array(ne.BARS_IN_MODULE),r=0,i=0;for(let s=0;s<ne.MODULES_IN_CODEWORD;s++)i+e[r]<=t/(2*ne.MODULES_IN_CODEWORD)+s*t/ne.MODULES_IN_CODEWORD&&(i+=e[r],r++),n[r]++;return n}static getDecodedCodewordValue(e){let t=gt.getBitValue(e);return-1===ne.getCodeword(t)?-1:t}static getBitValue(e){let t=0;for(let n=0;n<e.length;n++)for(let r=0;r<e[n];r++)t=t<<1|(n%2==0?1:0);return Math.trunc(t)}static getClosestDecodedValue(e){let t=ge.sum(e),n=new Array(ne.BARS_IN_MODULE);if(t>1)for(let s=0;s<n.length;s++)n[s]=Math.fround(e[s]/t);let r=Kt.MAX_VALUE,i=-1;this.bSymbolTableReady||gt.initialize();for(let s=0;s<gt.RATIOS_TABLE.length;s++){let o=0,a=gt.RATIOS_TABLE[s];for(let c=0;c<ne.BARS_IN_MODULE;c++){let u=Math.fround(a[c]-n[c]);if(o+=Math.fround(u*u),o>=r)break}o<r&&(r=o,i=ne.SYMBOL_TABLE[s])}return i}}gt.bSymbolTableReady=!1,gt.RATIOS_TABLE=new Array(ne.SYMBOL_TABLE.length).map(l
vendor: 16,420 bytes, line 1
1=>new Array(ne.BARS_IN_MODULE));class Kn{constructor(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}getSegmentIndex(){return this.segmentIndex}setSegmentIndex(e){this.segmentIndex=e}getFileId(){return this.fileId}setFileId(e){this.fileId=e}getOptionalData(){return this.optionalData}setOptionalData(e){this.optionalData=e}isLastSegment(){return this.lastSegment}setLastSegment(e){this.lastSegment=e}getSegmentCount(){return this.segmentCount}setSegmentCount(e){this.segmentCount=e}getSender(){return this.sender||null}setSender(e){this.sender=e}getAddressee(){return this.addressee||null}setAddressee(e){this.addressee=e}getFileName(){return this.fileName}setFileName(e){this.fileName=e}getFileSize(){return this.fileSize}setFileSize(e){this.fileSize=e}getChecksum(){return this.checksum}setChecksum(e){this.checksum=e}getTimestamp(){return this.timestamp}setTimestamp(e){this.timestamp=e}}class qn{static parseLong(e,t){return parseInt(e,t)}}let mr=(()=>{class l extends de{}return l.kind="NullPointerException",l})();class Ir{writeBytes(e){this.writeBytesOffset(e,0,e.length)}writeBytesOffset(e,t,n){if(null==e)throw new mr;if(t<0||t>e.length||n<0||t+n>e.length||t+n<0)throw new ht;if(0!==n)for(let r=0;r<n;r++)this.write(e[t+r])}flush(){}close(){}}class Tr extends de{}class Sr extends Ir{constructor(e=32){if(super(),this.count=0,e<0)throw new Z("Negative initial size: "+e);this.buf=new Uint8Array(e)}ensureCapacity(e){e-this.buf.length>0&&this.grow(e)}grow(e){let n=this.buf.length<<1;if(n-e<0&&(n=e),n<0){if(e<0)throw new Tr;n=ie.MAX_VALUE}this.buf=De.copyOfUint8Array(this.buf,n)}write(e){this.ensureCapacity(this.count+1),this.buf[this.count]=e,this.count+=1}writeBytesOffset(e,t,n){if(t<0||t>e.length||n<0||t+n-e.length>0)throw new ht;this.ensureCapacity(this.count+n),we.arraycopy(e,t,this.buf,this.count,n),this.count+=n}writeTo(e){e.writeBytesOffset(this.buf,0,this.count)}reset(){this.count=0}toByteArray(){return De.copyOfUint8Array(this.buf,this.count)}size(){return this.count}toString(e){return e?"string"==typeof e?this.toString_string(e):this.toString_number(e):this.toString_void()}toString_void(){return new String(this.buf).toString()}toString_string(e){return new String(this.buf).toString()}toString_number(e){return new String(this.buf).toString()}close(){}}var Ne=(()=>{return(l=Ne||(Ne={}))[l.ALPHA=0]="ALPHA",l[l.LOWER=1]="LOWER",l[l.MIXED=2]="MIXED",l[l.PUNCT=3]="PUNCT",l[l.ALPHA_SHIFT=4]="ALPHA_SHIFT",l[l.PUNCT_SHIFT=5]="PUNCT_SHIFT",Ne;var l})();function Jn(){if(typeof window<"u")return window.BigInt||null;if(typeof global<"u")return global.BigInt||null;if(typeof self<"u")return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}let Tn;function Vt(l){if(typeof Tn>"u"&&(Tn=Jn()),null===Tn)throw new Error("BigInt is not supported!");return Tn(l)}class O{static decode(e,t){let n=new fe(""),r=L.ISO8859_1;n.enableDecoding(r);let i=1,s=e[i++],o=new Kn;for(;i<e[0];){switch(s){case O.TEXT_COMPACTION_MODE_LATCH:i=O.textCompaction(e,i,n);break;case O.BYTE_COMPACTION_MODE_LATCH:case O.BYTE_COMPACTION_MODE_LATCH_6:i=O.byteCompaction(s,e,r,i,n);break;case O.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[i++]);break;case O.NUMERIC_COMPACTION_MODE_LATCH:i=O.numericCompaction(e,i,n);break;case O.ECI_CHARSET:L.getCharacterSetECIByValue(e[i++]);break;case O.ECI_GENERAL_PURPOSE:i+=2;break;case O.ECI_USER_DEFINED:i++;break;case O.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=O.decodeMacroBlock(e,i,o);break;case O.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case O.MACRO_PDF417_TERMINATOR:throw new P;default:i--,i=O.textCompaction(e,i,n)}if(!(i<e.length))throw P.getFormatInstance();s=e[i++]}if(0===n.length())throw P.getFormatInstance();let a=new Xe(null,n.toString(),null,t);return a.setOther(o),a}static decodeMacroBlock(e,t,n){if(t+O.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw P.getFormatInstance();let r=new Int32Array(O.NUMBER_OF_SEQUENCE_CODEWORDS);for(let o=0;o<O.NUMBER_OF_SEQUENCE_CODEWORDS;o++,t++)r[o]=e[t];n.setSegmentIndex(ie.parseInt(O.decodeBase900toBase10(r,O.NUMBER_OF_SEQUENCE_CODEWORDS)));let i=new fe;t=O.textCompaction(e,t,i),n.setFileId(i.toString());let s=-1;for(e[t]===O.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=t+1);t<e[0];)switch(e[t]){case O.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e[++t]){case O.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:let o=new fe;t=O.textCompaction(e,t+1,o),n.setFileName(o.toString());break;case O.MACRO_PDF417_OPTIONAL_FIELD_SENDER:let a=new fe;t=O.textCompaction(e,t+1,a),n.setSender(a.toString());break;case O.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:let c=new fe;t=O.textCompaction(e,t+1,c),n.setAddressee(c.toString());break;case O.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:let u=new fe;t=O.numericCompaction(e,t+1,u),n.setSegmentCount(ie.parseInt(u.toString()));break;case O.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:let g=new fe;t=O.numericCompaction(e,t+1,g),n.setTimestamp(qn.parseLong(g.toString()));break;case O.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:let p=new fe;t=O.numericCompaction(e,t+1,p),n.setChecksum(ie.parseInt(p.toString()));break;case O.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:let m=new fe;t=O.numericCompaction(e,t+1,m),n.setFileSize(qn.parseLong(m.toString()));break;default:throw P.getFormatInstance()}break;case O.MACRO_PDF417_TERMINATOR:t++,n.setLastSegment(!0);break;default:throw P.getFormatInstance()}if(-1!==s){let o=t-s;n.isLastSegment()&&o--,n.setOptionalData(De.copyOfRange(e,s,s+o))}return t}static textCompaction(e,t,n){let r=new Int32Array(2*(e[0]-t)),i=new Int32Array(2*(e[0]-t)),s=0,o=!1;for(;t<e[0]&&!o;){let a=e[t++];if(a<O.TEXT_COMPACTION_MODE_LATCH)r[s]=a/30,r[s+1]=a%30,s+=2;else switch(a){case O.TEXT_COMPACTION_MODE_LATCH:r[s++]=O.TEXT_COMPACTION_MODE_LATCH;break;case O.BYTE_COMPACTION_MODE_LATCH:case O.BYTE_COMPACTION_MODE_LATCH_6:case O.NUMERIC_COMPACTION_MODE_LATCH:case O.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case O.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case O.MACRO_PDF417_TERMINATOR:t--,o=!0;break;case O.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:r[s]=O.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,a=e[t++],i[s]=a,s++}}return O.decodeTextCompaction(r,i,s,n),t}static decodeTextCompaction(e,t,n,r){let i=Ne.ALPHA,s=Ne.ALPHA,o=0;for(;o<n;){let a=e[o],c="";switch(i){case Ne.ALPHA:if(a<26)c=String.fromCharCode(65+a);else switch(a){case 26:c=" ";break;case O.LL:i=Ne.LOWER;break;case O.ML:i=Ne.MIXED;break;case O.PS:s=i,i=Ne.PUNCT_SHIFT;break;case O.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:r.append(t[o]);break;case O.TEXT_COMPACTION_MODE_LATCH:i=Ne.ALPHA}break;case Ne.LOWER:if(a<26)c=String.fromCharCode(97+a);else switch(a){case 26:c=" ";break;case O.AS:s=i,i=Ne.ALPHA_SHIFT;break;case O.ML:i=Ne.MIXED;break;case O.PS:s=i,i=Ne.PUNCT_SHIFT;break;case O.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:r.append(t[o]);break;case O.TEXT_COMPACTION_MODE_LATCH:i=Ne.ALPHA}break;case Ne.MIXED:if(a<O.PL)c=O.MIXED_CHARS[a];else switch(a){case O.PL:i=Ne.PUNCT;break;case 26:c=" ";break;case O.LL:i=Ne.LOWER;break;case O.AL:i=Ne.ALPHA;break;case O.PS:s=i,i=Ne.PUNCT_SHIFT;break;case O.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:r.append(t[o]);break;case O.TEXT_COMPACTION_MODE_LATCH:i=Ne.ALPHA}break;case Ne.PUNCT:if(a<O.PAL)c=O.PUNCT_CHARS[a];else switch(a){case O.PAL:i=Ne.ALPHA;break;case O.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:r.append(t[o]);break;case O.TEXT_COMPACTION_MODE_LATCH:i=Ne.ALPHA}break;case Ne.ALPHA_SHIFT:if(i=s,a<26)c=String.fromCharCode(65+a);else switch(a){case 26:c=" ";break;case O.TEXT_COMPACTION_MODE_LATCH:i=Ne.ALPHA}break;case Ne.PUNCT_SHIFT:if(i=s,a<O.PAL)c=O.PUNCT_CHARS[a];else switch(a){case O.PAL:i=Ne.ALPHA;break;case O.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:r.append(t[o]);break;case O.TEXT_COMPACTION_MODE_LATCH:i=Ne.ALPHA}}""!==c&&r.append(c),o++}}static byteCompaction(e,t,n,r,i){let s=new Sr,o=0,a=0,c=!1;switch(e){case O.BYTE_COMPACTION_MODE_LATCH:let u=new Int32Array(6),g=t[r++];for(;r<t[0]&&!c;)switch(u[o++]=g,a=900*a+g,g=t[r++],g){case O.TEXT_COMPACTION_MODE_LATCH:case O.BYTE_COMPACTION_MODE_LATCH:case O.NUMERIC_COMPACTION_MODE_LATCH:case O.BYTE_COMPACTION_MODE_LATCH_6:case O.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case O.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case O.MACRO_PDF417_TERMINATOR:r--,c=!0;break;default:if(o%5==0&&o>0){for(let p=0;p<6;++p)s.write(Number(Vt(a)>>Vt(8*(5-p))));a=0,o=0}}r===t[0]&&g<O.TEXT_COMPACTION_MODE_LATCH&&(u[o++]=g);for(let p=0;p<o;p++)s.write(u[p]);break;case O.BYTE_COMPACTION_MODE_LATCH_6:for(;r<t[0]&&!c;){let p=t[r++];if(p<O.TEXT_COMPACTION_MODE_LATCH)o++,a=900*a+p;else switch(p){case O.TEXT_COMPACTION_MODE_LATCH:case O.BYTE_COMPACTION_MODE_LATCH:case O.NUMERIC_COMPACTION_MODE_LATCH:case O.BYTE_COMPACTION_MODE_LATCH_6:case O.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case O.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case O.MACRO_PDF417_TERMINATOR:r--,c=!0}if(o%5==0&&o>0){for(let m=0;m<6;++m)s.write(Number(Vt(a)>>Vt(8*(5-m))));a=0,o=0}}}return i.append(Le.decode(s.toByteArray(),n)),r}static numericCompaction(e,t,n){let r=0,i=!1,s=new Int32Array(O.MAX_NUMERIC_CODEWORDS);for(;t<e[0]&&!i;){let o=e[t++];if(t===e[0]&&(i=!0),o<O.TEXT_COMPACTION_MODE_LATCH)s[r]=o,r++;else switch(o){case O.TEXT_COMPACTION_MODE_LATCH:case O.BYTE_COMPACTION_MODE_LATCH:case O.BYTE_COMPACTION_MODE_LATCH_6:case O.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case O.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case O.MACRO_PDF417_TERMINATOR:t--,i=!0}(r%O.MAX_NUMERIC_CODEWORDS==0||o===O.NUMERIC_COMPACTION_MODE_LATCH||i)&&r>0&&(n.append(O.decodeBase900toBase10(s,r)),r=0)}return t}static decodeBase900toBase10(e,t){let n=Vt(0);for(let i=0;i<t;i++)n+=O.EXP900[t-i-1]*Vt(e[i]);let r=n.toString();if("1"!==r.charAt(0))throw new P;return r.substring(1)}}O.TEXT_COMPACTION_MODE_LATCH=900,O.BYTE_COMPACTION_MODE_LATCH=901,O.NUMERIC_COMPACTION_MODE_LATCH=902,O.BYTE_COMPACTION_MODE_LATCH_6=924,O.ECI_USER_DEFINED=925,O.ECI_GENERAL_PURPOSE=926,O.ECI_CHARSET=927,O.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,O.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,O.MACRO_PDF417_TERMINATOR=922,O.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,O.MAX_NUMERIC_CODEWORDS=15,O.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,O.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,O.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,O.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,O.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,O.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,O.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,O.PL=25,O.LL=27,O.AS=27,O.ML=28,O.AL=28,O.PS=29,O.PAL=29,O.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",O.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",O.EXP900=Jn()?function yr(){let l=[];l[0]=Vt(1);let e=Vt(900);l[1]=e;for(let t=2;t<16;t++)l[t]=l[t-1]*e;return l}():[],O.NUMBER_OF_SEQUENCE_CODEWORDS=2;class le{constructor(){}static decode(e,t,n,r,i,s,o){let g,a=new Xt(e,t,n,r,i),c=null,u=null;for(let I=!0;;I=!1){if(null!=t&&(c=le.getRowIndicatorColumn(e,a,t,!0,s,o)),null!=r&&(u=le.getRowIndicatorColumn(e,a,r,!1,s,o)),g=le.merge(c,u),null==g)throw R.getNotFoundInstance();let S=g.getBoundingBox();if(!I||null==S||!(S.getMinY()<a.getMinY()||S.getMaxY()>a.getMaxY()))break;a=S}g.setBoundingBox(a);let p=g.getBarcodeColumnCount()+1;g.setDetectionResultColumn(0,c),g.setDetectionResultColumn(p,u);let m=null!=c;for(let I=1;I<=p;I++){let b,S=m?I:p-I;if(void 0!==g.getDetectionResultColumn(S))continue;b=0===S||S===p?new Qn(a,0===S):new Zn(a),g.setDetectionResultColumn(S,b);let _=-1,z=_;for(let X=a.getMinY();X<=a.getMaxY();X++){if(_=le.getStartColumn(g,S,X,m),_<0||_>a.getMaxX()){if(-1===z)continue;_=z}let B=le.detectCodeword(e,a.getMinX(),a.getMaxX(),m,_,X,s,o);null!=B&&(b.setCodeword(X,B),z=_,s=Math.min(s,B.getWidth()),o=Math.max(o,B.getWidth()))}}return le.createDecoderResult(g)}static merge(e,t){if(null==e&&null==t)return null;let n=le.getBarcodeMetadata(e,t);if(null==n)return null;let r=Xt.merge(le.adjustBoundingBox(e),le.adjustBoundingBox(t));return new gn(n,r)}static adjustBoundingBox(e){if(null==e)return null;let t=e.getRowHeights();if(null==t)return null;let n=le.getMax(t),r=0;for(let o of t)if(r+=n-o,o>0)break;let i=e.getCodewords();for(let o=0;r>0&&null==i[o];o++)r--;let s=0;for(let o=t.length-1;o>=0&&(s+=n-t[o],!(t[o]>0));o--);for(let o=i.length-1;s>0&&null==i[o];o--)s--;return e.getBoundingBox().addMissingRows(r,s,e.isLeft())}static getMax(e){let t=-1;for(let n of e)t=Math.max(t,n);return t}static getBarcodeMetadata(e,t){let n,r;return null==e||null==(n=e.getBarcodeMetadata())?null==t?null:t.getBarcodeMetadata():null==t||null==(r=t.getBarcodeMetadata())?n:n.getColumnCount()!==r.getColumnCount()&&n.getErrorCorrectionLevel()!==r.getErrorCorrectionLevel()&&n.getRowCount()!==r.getRowCount()?null:n}static getRowIndicatorColumn(e,t,n,r,i,s){let o=new Qn(t,r);for(let a=0;a<2;a++){let c=0===a?1:-1,u=Math.trunc(Math.trunc(n.getX()));for(let g=Math.trunc(Math.trunc(n.getY()));g<=t.getMaxY()&&g>=t.getMinY();g+=c){let p=le.detectCodeword(e,0,e.getWidth(),r,u,g,i,s);null!=p&&(o.setCodeword(g,p),u=r?p.getStartX():p.getEndX())}}return o}static adjustCodewordCount(e,t){let n=t[0][1],r=n.getValue(),i=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-le.getNumberOfECCodeWords(e.getBarcodeECLevel());if(0===r.length){if(i<1||i>ne.MAX_CODEWORDS_IN_BARCODE)throw R.getNotFoundInstance();n.setValue(i)}else r[0]!==i&&n.setValue(i)}static createDecoderResult(e){let t=le.createBarcodeMatrix(e);le.adjustCodewordCount(e,t);let n=new Array,r=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),i=[],s=new Array;for(let a=0;a<e.getBarcodeRowCount();a++)for(let c=0;c<e.getBarcodeColumnCount();c++){let u=t[a][c+1].getValue(),g=a*e.getBarcodeColumnCount()+c;0===u.length?n.push(g):1===u.length?r[g]=u[0]:(s.push(g),i.push(u))}let o=new Array(i.length);for(let a=0;a<o.length;a++)o[a]=i[a];return le.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),r,ne.toIntArray(n),ne.toIntArray(s),o)}static createDecoderResultFromAmbiguousValues(e,t,n,r,i){let s=new Int32Array(r.length),o=100;for(;o-- >0;){for(let a=0;a<s.length;a++)t[r[a]]=i[a][s[a]];try{return le.decodeCodewords(t,e,n)}catch(a){if(!(a instanceof Ce))throw a}if(0===s.length)throw Ce.getChecksumInstance();for(let a=0;a<s.length;a++){if(s[a]<i[a].length-1){s[a]++;break}if(s[a]=0,a===s.length-1)throw Ce.getChecksumInstance()}}throw Ce.getChecksumInstance()}static createBarcodeMatrix(e){let t=Array.from({length:e.getBarcodeRowCount()},()=>new Array(e.getBarcodeColumnCount()+2));for(let r=0;r<t.length;r++)for(let i=0;i<t[r].length;i++)t[r][i]=new dn;let n=0;for(let r of e.getDetectionResultColumns()){if(null!=r)for(let i of r.getCodewords())if(null!=i){let s=i.getRowNumber();if(s>=0){if(s>=t.length)continue;t[s][n].setValue(i.getValue())}}n++}return t}static isValidBarcodeColumn(e,t){return t>=0&&t<=e.getBarcodeColumnCount()+1}static getStartColumn(e,t,n,r){let i=r?1:-1,s=null;if(le.isValidBarcodeColumn(e,t-i)&&(s=e.getDetectionResultColumn(t-i).getCodeword(n)),null!=s)return r?s.getEndX():s.getStartX();if(s=e.getDetectionResultColumn(t).getCodewordNearby(n),null!=s)return r?s.getStartX():s.getEndX();if(le.isValidBarcodeColumn(e,t-i)&&(s=e.getDetectionResultColumn(t-i).getCodewordNearby(n)),null!=s)return r?s.getEndX():s.getStartX();let o=0;for(;le.isValidBarcodeColumn(e,t-i);){t-=i;for(let a of e.getDetectionResultColumn(t).getCodewords())if(null!=a)return(r?a.getEndX():a.getStartX())+i*o*(a.getEndX()-a.getStartX());o++}return r?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()}static detectCodeword(e,t,n,r,i,s,o,a){i=le.adjustCodewordStartColumn(e,t,n,r,i,s);let c=le.getModuleBitCount(e,t,n,r,i,s);if(null==c)return null;let u,g=ge.sum(c);if(r)u=i+g;else{for(let I=0;I<c.length/2;I++){let S=c[I];c[I]=c[c.length-1-I],c[c.length-1-I]=S}u=i,i=u-g}if(!le.checkCodewordSkew(g,o,a))return null;let p=gt.getDecodedValue(c),m=ne.getCodeword(p);return-1===m?null:new Er(i,u,le.getCodewordBucketNumber(p),m)}static getModuleBitCount(e,t,n,r,i,s){let o=i,a=new Int32Array(8),c=0,u=r?1:-1,g=r;for(;(r?o<n:o>=t)&&c<a.length;)e.get(o,s)===g?(a[c]++,o+=u):(c++,g=!g);return c===a.length||o===(r?n:t)&&c===a.length-1?a:null}static getNumberOfECCodeWords(e){return 2<<e}static adjustCodewordStartColumn(e,t,n,r,i,s){let o=i,a=r?-1:1;for(let c=0;c<2;c++){for(;(r?o>=t:o<n)&&r===e.get(o,s);){if(Math.abs(i-o)>le.CODEWORD_SKEW_SIZE)return i;o+=a}a=-a,r=!r}return o}static checkCodewordSkew(e,t,n){return t-le.CODEWORD_SKEW_SIZE<=e&&e<=n+le.CODEWORD_SKEW_SIZE}static decodeCodewords(e,t,n){if(0===e.length)throw P.getFormatInstance();let r=1<<t+1,i=le.correctErrors(e,n,r);le.verifyCodewordCount(e,r);let s=O.decode(e,""+t);return s.setErrorsCorrected(i),s.setErasures(n.length),s}
1static correctErrors(e,t,n){if(null!=t&&t.length>n/2+le.MAX_ERRORS||n<0||n>le.MAX_EC_CODEWORDS)throw Ce.getChecksumInstance();return le.errorCorrection.decode(e,n,t)}static verifyCodewordCount(e,t){if(e.length<4)throw P.getFormatInstance();let n=e[0];if(n>e.length)throw P.getFormatInstance();if(0===n){if(!(t<e.length))throw P.getFormatInstance();e[0]=e.length-t}}static getBitCountForCodeword(e){let t=new Int32Array(8),n=0,r=t.length-1;for(;!((1&e)!==n&&(n=1&e,r--,r<0));)t[r]++,e>>=1;return t}static getCodewordBucketNumber(e){return e instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(e):this.getCodewordBucketNumber_number(e)}static getCodewordBucketNumber_number(e){return le.getCodewordBucketNumber(le.getBitCountForCodeword(e))}static getCodewordBucketNumber_Int32Array(e){return(e[0]-e[2]+e[4]-e[6]+9)%9}static toString(e){let t=new fn;for(let n=0;n<e.length;n++){t.format("Row %2d: ",n);for(let r=0;r<e[n].length;r++){let i=e[n][r];0===i.getValue().length?t.format(" ",null):t.format("%4d(%2d)",i.getValue()[0],i.getConfidence(i.getValue()[0]))}t.format("%n")}return t.toString()}}le.CODEWORD_SKEW_SIZE=2,le.MAX_ERRORS=3,le.MAX_EC_CODEWORDS=512,le.errorCorrection=new Xn;class st{decode(e,t=null){let n=st.decode(e,t,!1);if(null==n||0===n.length||null==n[0])throw R.getNotFoundInstance();return n[0]}decodeMultiple(e,t=null){try{return st.decode(e,t,!0)}catch(n){throw n instanceof P||n instanceof Ce?R.getNotFoundInstance():n}}static decode(e,t,n){const r=new Array,i=ce.detectMultiple(e,t,n);for(const s of i.getPoints()){const o=le.decode(i.getBits(),s[4],s[5],s[6],s[7],st.getMinCodewordWidth(s),st.getMaxCodewordWidth(s)),a=new Je(o.getText(),o.getRawBytes(),void 0,s,V.PDF_417);a.putMetadata(k.ERROR_CORRECTION_LEVEL,o.getECLevel());const c=o.getOther();null!=c&&a.putMetadata(k.PDF417_EXTRA_METADATA,c),r.push(a)}return r.map(s=>s)}static getMaxWidth(e,t){return null==e||null==t?0:Math.trunc(Math.abs(e.getX()-t.getX()))}static getMinWidth(e,t){return null==e||null==t?ie.MAX_VALUE:Math.trunc(Math.abs(e.getX()-t.getX()))}static getMaxCodewordWidth(e){return Math.floor(Math.max(Math.max(st.getMaxWidth(e[0],e[4]),st.getMaxWidth(e[6],e[2])*ne.MODULES_IN_CODEWORD/ne.MODULES_IN_STOP_PATTERN),Math.max(st.getMaxWidth(e[1],e[5]),st.getMaxWidth(e[7],e[3])*ne.MODULES_IN_CODEWORD/ne.MODULES_IN_STOP_PATTERN)))}static getMinCodewordWidth(e){return Math.floor(Math.min(Math.min(st.getMinWidth(e[0],e[4]),st.getMinWidth(e[6],e[2])*ne.MODULES_IN_CODEWORD/ne.MODULES_IN_STOP_PATTERN),Math.min(st.getMinWidth(e[1],e[5]),st.getMinWidth(e[7],e[3])*ne.MODULES_IN_CODEWORD/ne.MODULES_IN_STOP_PATTERN)))}reset(){}}let Fn=(()=>{class l extends de{}return l.kind="ReaderException",l})();class $n{constructor(e,t){this.verbose=!0===e,t&&this.setHints(t)}decode(e,t){return t&&this.setHints(t),this.decodeInternal(e)}decodeWithState(e){return null==this.readers&&this.setHints(null),this.decodeInternal(e)}setHints(e){this.hints=e;const t=!T(e)&&!0===e.get(Se.TRY_HARDER),n=T(e)?null:e.get(Se.POSSIBLE_FORMATS),r=new Array;if(!T(n)){const i=n.some(s=>s===V.UPC_A||s===V.UPC_E||s===V.EAN_13||s===V.EAN_8||s===V.CODABAR||s===V.CODE_39||s===V.CODE_93||s===V.CODE_128||s===V.ITF||s===V.RSS_14||s===V.RSS_EXPANDED);i&&!t&&r.push(new $t(e,this.verbose)),n.includes(V.QR_CODE)&&r.push(new Ht),n.includes(V.DATA_MATRIX)&&r.push(new mn),n.includes(V.AZTEC)&&r.push(new ft),n.includes(V.PDF_417)&&r.push(new st),i&&t&&r.push(new $t(e,this.verbose))}0===r.length&&(t||r.push(new $t(e,this.verbose)),r.push(new Ht),r.push(new mn),r.push(new ft),r.push(new st),t&&r.push(new $t(e,this.verbose))),this.readers=r}reset(){if(null!==this.readers)for(const e of this.readers)e.reset()}decodeInternal(e){if(null===this.readers)throw new Fn("No readers where selected, nothing can be read.");for(const t of this.readers)try{return t.decode(e,this.hints)}catch(n){if(n instanceof Fn)continue}throw new R("No MultiFormat Readers were able to detect the code.")}}var Sn=(()=>{return(l=Sn||(Sn={}))[l.ERROR_CORRECTION=0]="ERROR_CORRECTION",l[l.CHARACTER_SET=1]="CHARACTER_SET",l[l.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",l[l.MIN_SIZE=3]="MIN_SIZE",l[l.MAX_SIZE=4]="MAX_SIZE",l[l.MARGIN=5]="MARGIN",l[l.PDF417_COMPACT=6]="PDF417_COMPACT",l[l.PDF417_COMPACTION=7]="PDF417_COMPACTION",l[l.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",l[l.AZTEC_LAYERS=9]="AZTEC_LAYERS",l[l.QR_VERSION=10]="QR_VERSION",Sn;var l})(),et=Sn;class kn{constructor(e){this.field=e,this.cachedGenerators=[],this.cachedGenerators.push(new at(e,Int32Array.from([1])))}buildGenerator(e){const t=this.cachedGenerators;if(e>=t.length){let n=t[t.length-1];const r=this.field;for(let i=t.length;i<=e;i++){const s=n.multiply(new at(r,Int32Array.from([1,r.exp(i-1+r.getGeneratorBase())])));t.push(s),n=s}}return t[e]}encode(e,t){if(0===t)throw new Z("No error correction bytes");const n=e.length-t;if(n<=0)throw new Z("No data bytes provided");const r=this.buildGenerator(t),i=new Int32Array(n);we.arraycopy(e,0,i,0,n);let s=new at(this.field,i);s=s.multiplyByMonomial(t,1);const a=s.divide(r)[1].getCoefficients(),c=t-a.length;for(let u=0;u<c;u++)e[n+u]=0;we.arraycopy(a,0,e,n+c,a.length)}}let en=(()=>{class l{constructor(){}static applyMaskPenaltyRule1(t){return l.applyMaskPenaltyRule1Internal(t,!0)+l.applyM
1askPenaltyRule1Internal(t,!1)}static applyMaskPenaltyRule2(t){let n=0;const r=t.getArray(),i=t.getWidth(),s=t.getHeight();for(let o=0;o<s-1;o++){const a=r[o];for(let c=0;c<i-1;c++){const u=a[c];u===a[c+1]&&u===r[o+1][c]&&u===r[o+1][c+1]&&n++}}return l.N2*n}static applyMaskPenaltyRule3(t){let n=0;const r=t.getArray(),i=t.getWidth(),s=t.getHeight();for(let o=0;o<s;o++)for(let a=0;a<i;a++){const c=r[o];a+6<i&&1===c[a]&&0===c[a+1]&&1===c[a+2]&&1===c[a+3]&&1===c[a+4]&&0===c[a+5]&&1===c[a+6]&&(l.isWhiteHorizontal(c,a-4,a)||l.isWhiteHorizontal(c,a+7,a+11))&&n++,o+6<s&&1===r[o][a]&&0===r[o+1][a]&&1===r[o+2][a]&&1===r[o+3][a]&&1===r[o+4][a]&&0===r[o+5][a]&&1===r[o+6][a]&&(l.isWhiteVertical(r,a,o-4,o)||l.isWhiteVertical(r,a,o+7,o+11))&&n++}return n*l.N3}static isWhiteHorizontal(t,n,r){n=Math.max(n,0),r=Math.min(r,t.length);for(let i=n;i<r;i++)if(1===t[i])return!1;return!0}static isWhiteVertical(t,n,r,i){r=Math.max(r,0),i=Math.min(i,t.length);for(let s=r;s<i;s++)if(1===t[s][n])return!1;return!0}static applyMaskPenaltyRule4(t){let n=0;const r=t.getArray(),i=t.getWidth(),s=t.getHeight();for(let c=0;c<s;c++){const u=r[c];for(let g=0;g<i;g++)1===u[g]&&n++}const o=t.getHeight()*t.getWidth();return Math.floor(10*Math.abs(2*n-o)/o)*l.N4}static getDataMaskBit(t,n,r){let i,s;switch(t){case 0:i=r+n&1;break;case 1:i=1&r;break;case 2:i=n%3;break;case 3:i=(r+n)%3;break;case 4:i=Math.floor(r/2)+Math.floor(n/3)&1;break;case 5:s=r*n,i=(1&s)+s%3;break;case 6:s=r*n,i=(1&s)+s%3&1;break;case 7:s=r*n,i=s%3+(r+n&1)&1;break;default:throw new Z("Invalid mask pattern: "+t)}return 0===i}static applyMaskPenaltyRule1Internal(t,n){let r=0;const i=n?t.getHeight():t.getWidth(),s=n?t.getWidth():t.getHeight(),o=t.getArray();for(let a=0;a<i;a++){let c=0,u=-1;for(let g=0;g<s;g++){const p=n?o[a][g]:o[g][a];p===u?c++:(c>=5&&(r+=l.N1+(c-5)),c=1,u=p)}c>=5&&(r+=l.N1+(c-5))}return r}}return l.N1=3,l.N2=3,l.N3=40,l.N4=10,l})();class yn{constructor(e,t){this.width=e,this.height=t;const n=new Array(t);for(let r=0;r!==t;r++)n[r]=new Uint8Array(e);this.bytes=n}getHeight(){return this.height}getWidth(){return this.width}get(e,t){return this.bytes[t][e]}getArray(){return this.bytes}setNumber(e,t,n){this.bytes[t][e]=n}setBoolean(e,t,n){this.bytes[t][e]=n?1:0}clear(e){for(const t of this.bytes)De.fill(t,e)}equals(e){if(!(e instanceof yn))return!1;const t=e;if(this.width!==t.width||this.height!==t.height)return!1;for(let n=0,r=this.height;n<r;++n){const i=this.bytes[n],s=t.bytes[n];for(let o=0,a=this.width;o<a;++o)if(i[o]!==s[o])return!1}return!0}toString(){const e=new fe;for(let t=0,n=this.height;t<n;++t){const r=this.bytes[t];for(let i=0,s=this.width;i<s;++i)switch(r[i]){case 0:e.append(" 0");break;case 1:e.append(" 1");break;default:e.append(" ")}e.append("\n")}return e.toString()}}let bn=(()=>{class l{constructor(){this.maskPattern=-1}getMode(){return this.mode}getECLevel(){return this.ecLevel}getVersion(){return this.version}getMaskPattern(){return this.maskPattern}getMatrix(){return this.matrix}toString(){const t=new fe;return t.append("<<\n"),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append("\n ecLevel: "),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append("\n version: "),t.append(this.version?this.version.toString():"null"),t.append("\n maskPattern: "),t.append(this.maskPattern.toString()),this.matrix?(t.append("\n matrix:\n"),t.append(this.matrix.toString())):t.append("\n matrix: null\n"),t.append(">>\n"),t.toString()}setMode(t){this.mode=t}setECLevel(t){this.ecLevel=t}setVersion(t){this.version=t}setMaskPattern(t){this.maskPattern=t}setMatrix(t){this.matrix=t}static isValidMaskPattern(t){return t>=0&&t<l.NUM_MASK_PATTERNS}}return l.NUM_MASK_PATTERNS=8,l})(),ve=(()=>{class l extends de{}return l.kind="WriterException",l})();class te{constructor(){}static clearMatrix(e){e.clear(255)}static buildMatrix(e,t,n,r,i){te.clearMatrix(i),te.embedBasicPatterns(n,i),te.embedTypeInfo(t,r,i),te.maybeEmbedVersionInfo(n,i),te.embedDataBits(e,r,i)}static embedBasicPatterns(e,t){te.embedPositionDetectionPatternsAndSeparators(t),te.embedDarkDotAtLeftBottomCorner(t),te.maybeEmbedPositionAdjustmentPatterns(e,t),te.embedTimingPatterns(t)}static embedTypeInfo(e,t,n){const r=new $;te.makeTypeInfoBits(e,t,r);for(let i=0,s=r.getSize();i<s;++i){const o=r.get(r.getSize()-1-i),a=te.TYPE_INFO_COORDINATES[i];if(n.setBoolean(a[0],a[1],o),i<8){const g=n.getWidth()-i-1;n.setBoolean(g,8,o)}else{const p=n.getHeight()-7+(i-8);n.setBoolean(8,p,o)}}}
vendor: 7,939 bytes, line 1
1static maybeEmbedVersionInfo(e,t){if(e.getVersionNumber()<7)return;const n=new $;te.makeVersionInfoBits(e,n);let r=17;for(let i=0;i<6;++i)for(let s=0;s<3;++s){const o=n.get(r);r--,t.setBoolean(i,t.getHeight()-11+s,o),t.setBoolean(t.getHeight()-11+s,i,o)}}static embedDataBits(e,t,n){let r=0,i=-1,s=n.getWidth()-1,o=n.getHeight()-1;for(;s>0;){for(6===s&&(s-=1);o>=0&&o<n.getHeight();){for(let a=0;a<2;++a){const c=s-a;if(!te.isEmpty(n.get(c,o)))continue;let u;r<e.getSize()?(u=e.get(r),++r):u=!1,255!==t&&en.getDataMaskBit(t,c,o)&&(u=!u),n.setBoolean(c,o,u)}o+=i}i=-i,o+=i,s-=2}if(r!==e.getSize())throw new ve("Not all bits consumed: "+r+"/"+e.getSize())}static findMSBSet(e){return 32-ie.numberOfLeadingZeros(e)}static calculateBCHCode(e,t){if(0===t)throw new Z("0 polynomial");const n=te.findMSBSet(t);for(e<<=n-1;te.findMSBSet(e)>=n;)e^=t<<te.findMSBSet(e)-n;return e}static makeTypeInfoBits(e,t,n){if(!bn.isValidMaskPattern(t))throw new ve("Invalid mask pattern");const r=e.getBits()<<3|t;n.appendBits(r,5);const i=te.calculateBCHCode(r,te.TYPE_INFO_POLY);n.appendBits(i,10);const s=new $;if(s.appendBits(te.TYPE_INFO_MASK_PATTERN,15),n.xor(s),15!==n.getSize())throw new ve("should not happen but we got: "+n.getSize())}static makeVersionInfoBits(e,t){t.appendBits(e.getVersionNumber(),6);const n=te.calculateBCHCode(e.getVersionNumber(),te.VERSION_INFO_POLY);if(t.appendBits(n,12),18!==t.getSize())throw new ve("should not happen but we got: "+t.getSize())}static isEmpty(e){return 255===e}static embedTimingPatterns(e){for(let t=8;t<e.getWidth()-8;++t){const n=(t+1)%2;te.isEmpty(e.get(t,6))&&e.setNumber(t,6,n),te.isEmpty(e.get(6,t))&&e.setNumber(6,t,n)}}static embedDarkDotAtLeftBottomCorner(e){if(0===e.get(8,e.getHeight()-8))throw new ve;e.setNumber(8,e.getHeight()-8,1)}static embedHorizontalSeparationPattern(e,t,n){for(let r=0;r<8;++r){if(!te.isEmpty(n.get(e+r,t)))throw new ve;n.setNumber(e+r,t,0)}}static embedVerticalSeparationPattern(e,t,n){for(let r=0;r<7;++r){if(!te.isEmpty(n.get(e,t+r)))throw new ve;n.setNumber(e,t+r,0)}}static embedPositionAdjustmentPattern(e,t,n){for(let r=0;r<5;++r){const i=te.POSITION_ADJUSTMENT_PATTERN[r];for(let s=0;s<5;++s)n.setNumber(e+s,t+r,i[s])}}static embedPositionDetectionPattern(e,t,n){for(let r=0;r<7;++r){const i=te.POSITION_DETECTION_PATTERN[r];for(let s=0;s<7;++s)n.setNumber(e+s,t+r,i[s])}}static embedPositionDetectionPatternsAndSeparators(e){const t=te.POSITION_DETECTION_PATTERN[0].length;te.embedPositionDetectionPattern(0,0,e),te.embedPositionDetectionPattern(e.getWidth()-t,0,e),te.embedPositionDetectionPattern(0,e.getWidth()-t,e);te.embedHorizontalSeparationPattern(0,7,e),te.embedHorizontalSeparationPattern(e.getWidth()-8,7,e),te.embedHorizontalSeparationPattern(0,e.getWidth()-8,e);te.embedVerticalSeparationPattern(7,0,e),te.embedVerticalSeparationPattern(e.getHeight()-7-1,0,e),te.embedVerticalSeparationPattern(7,e.getHeight()-7,e)}static maybeEmbedPositionAdjustmentPatterns(e,t){if(e.getVersionNumber()<2)return;const n=e.getVersionNumber()-1,r=te.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n];for(let i=0,s=r.length;i!==s;i++){const o=r[i];if(o>=0)for(let a=0;a!==s;a++){const c=r[a];c>=0&&te.isEmpty(t.get(c,o))&&te.embedPositionAdjustmentPattern(c-2,o-2,t)}}}}te.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),te.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),te.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),te.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),te.VERSION_INFO_POLY=7973,te.TYPE_INFO_POLY=1335,te.TYPE_INFO_MASK_PATTERN=21522;class Mr{constructor(e,t){this.dataBytes=e,this.errorCorrectionBytes=t}getDataBytes(){return this.dataBytes}getErrorCorrectionBytes(){return this.errorCorrectionBytes}}class ke{constructor(){}static calculateMaskPenalty(e){return en.applyMaskPenaltyRule1(e)+en.applyMaskPenaltyRule2(e)+en.applyMaskPenaltyRule3(e)+en.applyMaskPenaltyRule4(e)}static encode(e,t,n=null){let r=ke.DEFAULT_BYTE_MODE_ENCODING;const i=null!==n&&void 0!==n.get(et.CHARACTER_SET);i&&(r=n.get(et.CHARACTER_SET).toString());const s=this.chooseMode(e,r),o=new $;if(s===ee.BYTE&&(i||ke.DEFAULT_BYTE_MODE_ENCODING!==r)){const X=L.getCharacterSetECIByName(r);void 0!==X&&this.appendECI(X,o)}this.appendModeInfo(s,o);const a=new $;let c;if(this.appendBytes(e,s,a,r),null!==n&&void 0!==n.get(et.QR_VERSION)){const X=Number.parseInt(n.get(et.QR_VERSION).toString(),10);c=J.getVersionForNumber(X);const B=this.calculateBitsNeeded(s,o,a,c);if(!this.willFit(B,c,t))throw new ve("Data too big for requested version")}else c=this.recommendVersion(t,s,o,a);const u=new $;u.appendBitArray(o);const g=s===ee.BYTE?a.getSizeInBytes():e.length;this.appendLengthInfo(g,c,s,u),u.appendBitArray(a);const p=c.getECBlocksForLevel(t),m=c.getTotalCodewords()-p.getTotalECCodewords();this.terminateBits(m,u);const I=this.interleaveWithECBytes(u,c.getTotalCodewords(),m,p.getNumBlocks()),S=new bn;S.setECLevel(t),S.setMode(s),S.setVersion(c);const b=c.getDimensionForVersion(),_=new yn(b,b),z=this.chooseMaskPattern(I,t,c,_);return S.setMaskPattern(z),te.buildMatrix(I,t,c,z,_),S.setMatrix(_),S}static recommendVersion(e,t,n,r){const i=this.calculateBitsNeeded(t,n,r,J.getVersionForNumber(1)),s=this.chooseVersion(i,e),o=this.calculateBitsNeeded(t,n,r,s);return this.chooseVersion(o,e)}static calculateBitsNeeded(e,t,n,r){return t.getSize()+e.getCharacterCountBits(r)+n.getSize()}static getAlphanumericCode(e){return e<ke.ALPHANUMERIC_TABLE.length?ke.ALPHANUMERIC_TABLE[e]:-1}static chooseMode(e,t=null){if(L.SJIS.getName()===t&&this.isOnlyDoubleByteKanji(e))return ee.KANJI;let n=!1,r=!1;for(let i=0,s=e.length;i<s;++i){const o=e.charAt(i);if(ke.isDigit(o))n=!0;
vendor: 8,682 bytes, line 1
1else{if(-1===this.getAlphanumericCode(o.charCodeAt(0)))return ee.BYTE;r=!0}}return r?ee.ALPHANUMERIC:n?ee.NUMERIC:ee.BYTE}static isOnlyDoubleByteKanji(e){let t;try{t=Le.encode(e,L.SJIS)}catch{return!1}const n=t.length;if(n%2!=0)return!1;for(let r=0;r<n;r+=2){const i=255&t[r];if((i<129||i>159)&&(i<224||i>235))return!1}return!0}static chooseMaskPattern(e,t,n,r){let i=Number.MAX_SAFE_INTEGER,s=-1;for(let o=0;o<bn.NUM_MASK_PATTERNS;o++){te.buildMatrix(e,t,n,o,r);let a=this.calculateMaskPenalty(r);a<i&&(i=a,s=o)}return s}static chooseVersion(e,t){for(let n=1;n<=40;n++){const r=J.getVersionForNumber(n);if(ke.willFit(e,r,t))return r}throw new ve("Data too big")}static willFit(e,t,n){return t.getTotalCodewords()-t.getECBlocksForLevel(n).getTotalECCodewords()>=(e+7)/8}static terminateBits(e,t){const n=8*e;if(t.getSize()>n)throw new ve("data bits cannot fit in the QR Code"+t.getSize()+" > "+n);for(let s=0;s<4&&t.getSize()<n;++s)t.appendBit(!1);const r=7&t.getSize();if(r>0)for(let s=r;s<8;s++)t.appendBit(!1);const i=e-t.getSizeInBytes();for(let s=0;s<i;++s)t.appendBits(1&s?17:236,8);if(t.getSize()!==n)throw new ve("Bits size does not equal capacity")}static getNumDataBytesAndNumECBytesForBlockID(e,t,n,r,i,s){if(r>=n)throw new ve("Block ID too large");const o=e%n,a=n-o,c=Math.floor(e/n),u=c+1,g=Math.floor(t/n),p=g+1,m=c-g,I=u-p;if(m!==I)throw new ve("EC bytes mismatch");if(n!==a+o)throw new ve("RS blocks mismatch");if(e!==(g+m)*a+(p+I)*o)throw new ve("Total bytes mismatch");r<a?(i[0]=g,s[0]=m):(i[0]=p,s[0]=I)}static interleaveWithECBytes(e,t,n,r){if(e.getSizeInBytes()!==n)throw new ve("Number of bits and data bytes does not match");let i=0,s=0,o=0;const a=new Array;for(let u=0;u<r;++u){const g=new Int32Array(1),p=new Int32Array(1);ke.getNumDataBytesAndNumECBytesForBlockID(t,n,r,u,g,p);const m=g[0],I=new Uint8Array(m);e.toBytes(8*i,I,0,m);const S=ke.generateECBytes(I,p[0]);a.push(new Mr(I,S)),s=Math.max(s,m),o=Math.max(o,S.length),i+=g[0]}if(n!==i)throw new ve("Data bytes does not match offset");const c=new $;for(let u=0;u<s;++u)for(const g of a){const p=g.getDataBytes();u<p.length&&c.appendBits(p[u],8)}for(let u=0;u<o;++u)for(const g of a){const p=g.getErrorCorrectionBytes();u<p.length&&c.appendBits(p[u],8)}if(t!==c.getSizeInBytes())throw new ve("Interleaving error: "+t+" and "+c.getSizeInBytes()+" differ.");return c}static generateECBytes(e,t){const n=e.length,r=new Int32Array(n+t);for(let s=0;s<n;s++)r[s]=255&e[s];new kn(se.QR_CODE_FIELD_256).encode(r,t);const i=new Uint8Array(t);for(let s=0;s<t;s++)i[s]=r[n+s];return i}static appendModeInfo(e,t){t.appendBits(e.getBits(),4)}static appendLengthInfo(e,t,n,r){const i=n.getCharacterCountBits(t);if(e>=1<<i)throw new ve(e+" is bigger than "+((1<<i)-1));r.appendBits(e,i)}static appendBytes(e,t,n,r){switch(t){case ee.NUMERIC:ke.appendNumericBytes(e,n);break;case ee.ALPHANUMERIC:ke.appendAlphanumericBytes(e,n);break;case ee.BYTE:ke.append8BitBytes(e,n,r);break;case ee.KANJI:ke.appendKanjiBytes(e,n);break;default:throw new ve("Invalid mode: "+t)}}static getDigit(e){return e.charCodeAt(0)-48}static isDigit(e){const t=ke.getDigit(e);return t>=0&&t<=9}static appendNumericBytes(e,t){const n=e.length;let r=0;for(;r<n;){const i=ke.getDigit(e.charAt(r));if(r+2<n){const s=ke.getDigit(e.charAt(r+1)),o=ke.getDigit(e.charAt(r+2));t.appendBits(100*i+10*s+o,10),r+=3}else if(r+1<n){const s=ke.getDigit(e.charAt(r+1));t.appendBits(10*i+s,7),r+=2}else t.appendBits(i,4),r++}}static appendAlphanumericBytes(e,t){const n=e.length;let r=0;for(;r<n;){const i=ke.getAlphanumericCode(e.charCodeAt(r));if(-1===i)throw new ve;if(r+1<n){const s=ke.getAlphanumericCode(e.charCodeAt(r+1));if(-1===s)throw new ve;t.appendBits(45*i+s,11),r+=2}else t.appendBits(i,6),r++}}static append8BitBytes(e,t,n){let r;try{r=Le.encode(e,n)}catch(i){throw new ve(i)}for(let i=0,s=r.length;i!==s;i++)t.appendBits(r[i],8)}static appendKanjiBytes(e,t){let n;try{n=Le.encode(e,L.SJIS)}catch(i){throw new ve(i)}const r=n.length;for(let i=0;i<r;i+=2){const a=(255&n[i])<<8&4294967295|255&n[i+1];let c=-1;if(a>=33088&&a<=40956?c=a-33088:a>=57408&&a<=60351&&(c=a-49472),-1===c)throw new ve("Invalid byte sequence");t.appendBits(192*(c>>8)+(255&c),13)}}static appendECI(e,t){t.appendBits(ee.ECI.getBits(),4),t.appendBits(e.getValue(),8)}}ke.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),ke.DEFAULT_BYTE_MODE_ENCODING=L.UTF8.getName();let Or=(()=>{class l{write(t,n,r,i=null){if(0===t.length)throw new Z("Found empty contents");if(n<0||r<0)throw new Z("Requested dimensions are too small: "+n+"x"+r);let s=Re.L,o=l.QUIET_ZONE_SIZE;null!==i&&(void 0!==i.get(et.ERROR_CORRECTION)&&(s=Re.fromString(i.get(et.ERROR_CORRECTION).toString())),void 0!==i.get(et.MARGIN)&&(o=Number.parseInt(i.get(et.MARGIN).toString(),10)));const a=ke.encode(t,s,i);return this.renderResult(a,n,r,o)}writeToDom(t,n,r,i,s=null){"string"==typeof t&&(t=document.querySelector(t));const o=this.write(n,r,i,s);t&&t.appendChild(o)}renderResult(t,n,r,i){const s=t.getMatrix();if(null===s)throw new wt;const o=s.getWidth(),a=s.getHeight(),c=o+2*i,u=a+2*i,g=Math.max(n,c),p=Math.max(r,u),m=Math.min(Math.floor(g/c),Math.floor(p/u)),I=Math.floor((g-o*m)/2),S=Math.floor((p-a*m)/2),b=this.createSVGElement(g,p);for(let _=0,z=S;_<a;_++,z+=m)for(let X=0,B=I;X<o;X++,B+=m)if(1===s.get(X,_)){const ue=this.createSvgRectElement(B,z,m,m);b.appendChild(ue)}return b}createSVGElement(t,n){const r=document.createElementNS(l.SVG_NS,"svg");return r.setAttributeNS(null,"height",t.toString()),r.setAttributeNS(null,"width",n.toString()),r}createSvgRectElement(t,n,r,i){const s=document.createElementNS(l.SVG_NS,"rect");return s.setAttributeNS(null,"x",t.toString()),s.setAttributeNS(null,"y",n.toString()),s.setAttributeNS(null,"height",r.toString()),s.setAttributeNS(null,"width",i.toString()),s.setAttributeNS(null,"fill","#000000"),s}}return l.QUIET_ZONE_SIZE=4,l.SVG_NS="http://www.w3.org/2000/svg",l})(),er=(()=>{class l{encode(t,n,r,i,s){if(0===t.length)throw new Z("Found empty contents");if(n!==V.QR_CODE)throw new Z("Can only encode QR_CODE, but got "+n);if(r<0||i<0)throw new Z(`Requested dimensions are too small: ${r}x${i}`);let o=Re.L,a=l.QUIET_ZONE_SIZE;null!==s&&(void 0!==s.get(et.ERROR_CORRECTION)&&(o=Re.fromString(s.get(et.ERROR_CORRECTION).toString())),void 0!==s.get(et.MARGIN)&&(a=Number.parseInt(s.get(et.MARGIN).toString(),10)));const c=ke.encode(t,o,s);return l.renderResult(c,r,i,a)}static renderResult(t,n,r,i){const s=t.getMatrix();if(null===s)throw new wt;const o=s.getWidth(),a=s.getHeight(),c=o+2*i,u=a+2*i,g=Math.max(n,c),p=Math.max(r,u),m=Math.min(Math.floor(g/c),Math.floor(p/u)),I=Math.floor((g-o*m)/2),S=Math.floor((p-a*m)/2),b=new _e(g,p);for(let _=0,z=S;_<a;_++,z+=m)for(let X=0,B=I;X<o;X++,B+=m)1===s.get(X,_)&&b.setRegion(B,z,m,m);return b}}return l.QUIET_ZONE_SIZE=4,l})();let Rr=(()=>{class l extends Lt{constructor(t,n,r,i,s,o,a,c){if(super(o,a),this.yuvData=t,this.dataWidth=n,this.dataHeight=r,this.left=i,this.top=s,i+o>n||s+a>r)throw new Z("Crop rectangle does not fit within image data.");c&&this.reverseHorizontal(o,a)}getRow(t,n){if(t<0||t>=this.getHeight())throw new Z("Requested row is outside the image: "+t);const r=this.getWidth();return(null==n||n.length<r)&&(n=new Uint8ClampedArray(r)),we.arraycopy(this.yuvData,(t+this.top)*this.dataWidth+this.left,n,0,r),n}getMatrix(){const t=this.getWidth(),n=this.getHeight();if(t===this.dataWidth&&n===this.dataHeight)return this.yuvData;const r=t*n,i=new Uint8ClampedArray(r);let s=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return we.arraycopy(this.yuvData,s,i,0,r),i;for(let o=0;o<n;o++)we.arraycopy(this.yuvData,s,i,o*t,t),s+=this.dataWidth;return i}isCropSupported(){return!0}crop(t,n,r,i){return new l(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+n,r,i,!1)}renderThumbnail(){const t=this.getWidth()/l.THUMBNAIL_SCALE_FACTOR,n=this.getHeight()/l.THUMBNAIL_SCALE_FACTOR,r=new Int32Array(t*n),i=this.yuvData;let s=this.top*this.dataWidth+this.left;for(let o=0;o<n;o++){const a=o*t;for(let c=0;c<t;c++)r[a+c]=4278190080|65793*(255&i[s+c*l.THUMBNAIL_SCALE_FACTOR]);s+=this.dataWidth*l.THUMBNAIL_SCALE_FACTOR}return r}getThumbnailWidth(){return this.getWidth()/l.THUMBNAIL_SCALE_FACTOR}getThumbnailHeight(){return this.getHeight()/l.THUMBNAIL_SCALE_FACTOR}reverseHorizontal(t,n){const r=this.yuvData;for(let i=0,s=this.top*this.dataWidth+this.left;i<n;i++,s+=this.dataWidth){const o=s+t/2;
1for(let a=s,c=s+t-1;a<o;a++,c--){const u=r[a];r[a]=r[c],r[c]=u}}}invert(){return new It(this)}}return l.THUMBNAIL_SCALE_FACTOR=2,l})();class Un extends Lt{constructor(e,t,n,r,i,s,o){if(super(t,n),this.dataWidth=r,this.dataHeight=i,this.left=s,this.top=o,4===e.BYTES_PER_ELEMENT){const a=t*n,c=new Uint8ClampedArray(a);for(let u=0;u<a;u++){const g=e[u];c[u]=((g>>16&255)+(g>>7&510)+(255&g))/4&255}this.luminances=c}else this.luminances=e;if(void 0===r&&(this.dataWidth=t),void 0===i&&(this.dataHeight=n),void 0===s&&(this.left=0),void 0===o&&(this.top=0),this.left+t>this.dataWidth||this.top+n>this.dataHeight)throw new Z("Crop rectangle does not fit within image data.")}getRow(e,t){if(e<0||e>=this.getHeight())throw new Z("Requested row is outside the image: "+e);const n=this.getWidth();return(null==t||t.length<n)&&(t=new Uint8ClampedArray(n)),we.arraycopy(this.luminances,(e+this.top)*this.dataWidth+this.left,t,0,n),t}getMatrix(){const e=this.getWidth(),t=this.getHeight();if(e===this.dataWidth&&t===this.dataHeight)return this.luminances;const n=e*t,r=new Uint8ClampedArray(n);let i=this.top*this.dataWidth+this.left;if(e===this.dataWidth)return we.arraycopy(this.luminances,i,r,0,n),r;for(let s=0;s<t;s++)we.arraycopy(this.luminances,i,r,s*e,e),i+=this.dataWidth;return r}isCropSupported(){return!0}crop(e,t,n,r){return new Un(this.luminances,n,r,this.dataWidth,this.dataHeight,this.left+e,this.top+t)}invert(){return new It(this)}}class tr extends L{static forName(e){return this.getCharacterSetECIByName(e)}}class zn{}zn.ISO_8859_1=L.ISO8859_1;class nr{isCompact(){return this.compact}setCompact(e){this.compact=e}getSize(){return this.size}setSize(e){this.size=e}getLayers(){return this.layers}setLayers(e){this.layers=e}getCodeWords(){return this.codeWords}setCodeWords(e){this.codeWords=e}getMatrix(){return this.matrix}setMatrix(e){this.matrix=e}}class rr{static singletonList(e){return[e]}static min(e,t){return e.sort(t)[0]}}class vr{constructor(e){this.previous=e}getPrevious(){return this.previous}}class tn extends vr{constructor(e,t,n){super(e),this.value=t,this.bitCount=n}appendTo(e,t){e.appendBits(this.value,this.bitCount)}add(e,t){return new tn(this,e,t)}addBinaryShift(e,t){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new tn(this,e,t)}toString(){let e=this.value&(1<<this.bitCount)-1;return e|=1<<this.bitCount,"<"+ie.toBinaryString(e|1<<this.bitCount).substring(1)+">"}}class Hn extends tn{constructor(e,t,n){super(e,0,0),this.binaryShiftStart=t,this.binaryShiftByteCount=n}appendTo(e,t){for(let n=0;n<this.binaryShiftByteCount;n++)(0===n||31===n&&this.binaryShiftByteCount<=62)&&(e.appendBits(31,5),this.binaryShiftByteCount>62?e.appendBits(this.binaryShiftByteCount-31,16):e.appendBits(0===n?Math.min(this.binaryShiftByteCount,31):this.binaryShiftByteCount-31,5)),e.appendBits(t[this.binaryShiftStart+n],8)}addBinaryShift(e,t){return new Hn(this,e,t)}toString(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}function xn(l,e,t){return new tn(l,e,t)}const Lr=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],Wt=0,Nn=1,Nt=2,ir=3,vt=4,Pr=new tn(null,0,0),Vn=[Int32Array.from([0,327708,327710,327709,656318]),Int32Array.from([590318,0,327710,327709,656318]),Int32Array.from([262158,590300,0,590301,932798]),Int32Array.from([327709,327708,656318,0,327710]),Int32Array.from([327711,65638
vendor: 9,377 bytes, line 1
10,656382,656381,0])];const sr=function Fr(l){for(let e of l)De.fill(e,-1);return l[Wt][vt]=0,l[Nn][vt]=0,l[Nn][Wt]=28,l[ir][vt]=0,l[Nt][vt]=0,l[Nt][Wt]=15,l}(De.createInt32Array(6,6));class Bt{constructor(e,t,n,r){this.token=e,this.mode=t,this.binaryShiftByteCount=n,this.bitCount=r}getMode(){return this.mode}getToken(){return this.token}getBinaryShiftByteCount(){return this.binaryShiftByteCount}getBitCount(){return this.bitCount}latchAndAppend(e,t){let n=this.bitCount,r=this.token;if(e!==this.mode){let s=Vn[this.mode][e];r=xn(r,65535&s,s>>16),n+=s>>16}let i=e===Nt?4:5;return r=xn(r,t,i),new Bt(r,e,0,n+i)}shiftAndAppend(e,t){let n=this.token,r=this.mode===Nt?4:5;return n=xn(n,sr[this.mode][e],r),n=xn(n,t,5),new Bt(n,this.mode,0,this.bitCount+r+5)}addBinaryShiftChar(e){let t=this.token,n=this.mode,r=this.bitCount;if(this.mode===vt||this.mode===Nt){let o=Vn[n][Wt];t=xn(t,65535&o,o>>16),r+=o>>16,n=Wt}let s=new Bt(t,n,this.binaryShiftByteCount+1,r+(0===this.binaryShiftByteCount||31===this.binaryShiftByteCount?18:62===this.binaryShiftByteCount?9:8));return 2078===s.binaryShiftByteCount&&(s=s.endBinaryShift(e+1)),s}endBinaryShift(e){if(0===this.binaryShiftByteCount)return this;let t=this.token;return t=function Br(l,e,t){return new Hn(l,e,t)}(t,e-this.binaryShiftByteCount,this.binaryShiftByteCount),new Bt(t,this.mode,0,this.bitCount)}isBetterThanOrEqualTo(e){let t=this.bitCount+(Vn[this.mode][e.mode]>>16);return this.binaryShiftByteCount<e.binaryShiftByteCount?t+=Bt.calculateBinaryShiftCost(e)-Bt.calculateBinaryShiftCost(this):this.binaryShiftByteCount>e.binaryShiftByteCount&&e.binaryShiftByteCount>0&&(t+=10),t<=e.bitCount}toBitArray(e){let t=[];for(let r=this.endBinaryShift(e.length).token;null!==r;r=r.getPrevious())t.unshift(r);let n=new $;for(const r of t)r.appendTo(n,e);return n}toString(){return q.format("%s bits=%d bytes=%d",Lr[this.mode],this.bitCount,this.binaryShiftByteCount)}static calculateBinaryShiftCost(e){return e.binaryShiftByteCount>62?21:e.binaryShiftByteCount>31?20:e.binaryShiftByteCount>0?10:0}}Bt.INITIAL_STATE=new Bt(Pr,Wt,0,0);const Wn=function kr(l){const e=q.getCharCode(" "),t=q.getCharCode("."),n=q.getCharCode(",");l[Wt][e]=1;const r=q.getCharCode("Z"),i=q.getCharCode("A");for(let p=i;p<=r;p++)l[Wt][p]=p-i+2;l[Nn][e]=1;const s=q.getCharCode("z"),o=q.getCharCode("a");for(let p=o;p<=s;p++)l[Nn][p]=p-o+2;l[Nt][e]=1;const a=q.getCharCode("9"),c=q.getCharCode("0");for(let p=c;p<=a;p++)l[Nt][p]=p-c+2;l[Nt][n]=12,l[Nt][t]=13;const u=["\0"," ","\x01","\x02","\x03","\x04","\x05","\x06","\x07","\b","\t","\n","\v","\f","\r","\x1b","\x1c","\x1d","\x1e","\x1f","@","\\","^","_","`","|","~","\x7f"];for(let p=0;p<u.length;p++)l[ir][q.getCharCode(u[p])]=p;const g=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(let p=0;p<g.length;p++)q.getCharCode(g[p])>0&&(l[vt][q.getCharCode(g[p])]=p);return l}(De.createInt32Array(5,256));class An{constructor(e){this.text=e}encode(){const e=q.getCharCode(" "),t=q.getCharCode("\n");let n=rr.singletonList(Bt.INITIAL_STATE);for(let i=0;i<this.text.length;i++){let s,o=i+1<this.text.length?this.text[i+1]:0;switch(this.text[i]){case q.getCharCode("\r"):s=o===t?2:0;break;case q.getCharCode("."):s=o===e?3:0;break;case q.getCharCode(","):s=o===e?4:0;break;case q.getCharCode(":"):s=o===e?5:0;break;default:s=0}s>0?(n=An.updateStateListForPair(n,i,s),i++):n=this.updateStateListForChar(n,i)}return rr.min(n,(i,s)=>i.getBitCount()-s.getBitCount()).toBitArray(this.text)}updateStateListForChar(e,t){const n=[];for(let r of e)this.updateStateForChar(r,t,n);return An.simplifyStates(n)}updateStateForChar(e,t,n){let r=255&this.text[t],i=Wn[e.getMode()][r]>0,s=null;for(let o=0;o<=vt;o++){let a=Wn[o][r];if(a>0){if(null==s&&(s=e.endBinaryShift(t)),!i||o===e.getMode()||o===Nt){const c=s.latchAndAppend(o,a);n.push(c)}if(!i&&sr[e.getMode()][o]>=0){const c=s.shiftAndAppend(o,a);n.push(c)}}}if(e.getBinaryShiftByteCount()>0||0===Wn[e.getMode()][r]){let o=e.addBinaryShiftChar(t);n.push(o)}}static updateStateListForPair(e,t,n){const r=[];for(let i of e)this.updateStateForPair(i,t,n,r);return this.simplifyStates(r)}static updateStateForPair(e,t,n,r){let i=e.endBinaryShift(t);if(r.push(i.latchAndAppend(vt,n)),e.getMode()!==vt&&r.push(i.shiftAndAppend(vt,n)),3===n||4===n){let s=i.latchAndAppend(Nt,16-n).latchAndAppend(Nt,1);r.push(s)}if(e.getBinaryShiftByteCount()>0){let s=e.addBinaryShiftChar(t).addBinaryShiftChar(t+1);r.push(s)}}static simplifyStates(e){let t=[];for(const n of e){let r=!0;for(const i of t){if(i.isBetterThanOrEqualTo(n)){r=!1;break}n.isBetterThanOrEqualTo(i)&&(t=t.filter(s=>s!==i))}r&&t.push(n)}return t}}class me{constructor(){}static encodeBytes(e){return me.encode(e,me.DEFAULT_EC_PERCENT,me.DEFAULT_AZTEC_LAYERS)}static encode(e,t,n){let o,a,c,u,g,r=new An(e).encode(),i=ie.truncDivision(r.getSize()*t,100)+11,s=r.getSize()+i;if(n!==me.DEFAULT_AZTEC_LAYERS){if(o=n<0,a=Math.abs(n),a>(o?me.MAX_NB_BITS_COMPACT:me.MAX_NB_BITS))throw new Z(q.format("Illegal value %s for layers",n));c=me.totalBitsInLayer(a,o),u=me.WORD_SIZE[a];let B=c-c%u;if(g=me.stuffBits(r,u),g.getSize()+i>B)throw new Z("Data to large for user specified layer");if(o&&g.getSize()>64*u)throw new Z("Data to large for user specified layer")}else{u=0,g=null;for(let B=0;;B++){if(B>me.MAX_NB_BITS)throw new Z("Data too large for an Aztec code");if(o=B<=3,a=o?B+1:B,c=me.totalBitsInLayer(a,o),s>c)continue;(null==g||u!==me.WORD_SIZE[a])&&(u=me.WORD_SIZE[a],g=me.stuffBits(r,u));let ue=c-c%u;if(!(o&&g.getSize()>64*u)&&g.getSize()+i<=ue)break}}let _,p=me.generateCheckWords(g,c,u),m=g.getSize()/u,I=me.generateModeMessage(o,a,m),S=(o?11:14)+4*a,b=new Int32Array(S);if(o){_=S;for(let B=0;B<b.length;B++)b[B]=B}else{_=S+1+2*ie.truncDivision(ie.truncDivision(S,2)-1,15);let B=ie.truncDivision(S,2),ue=ie.truncDivision(_,2);for(let ae=0;ae<B;ae++){let xt=ae+ie.truncDivision(ae,15);b[B-ae-1]=ue-xt-1,b[B+ae]=ue+xt+1}}let z=new _e(_);for(let B=0,ue=0;B<a;B++){let ae=4*(a-B)+(o?9:12);for(let xt=0;xt<ae;xt++){let Rt=2*xt;for(let At=0;At<2;At++)p.get(ue+Rt+At)&&z.set(b[2*B+At],b[2*B+xt]),p.get(ue+2*ae+Rt+At)&&z.set(b[2*B+xt],b[S-1-2*B-At]),p.get(ue+4*ae+Rt+At)&&z.set(b[S-1-2*B-At],b[S-1-2*B-xt]),p.get(ue+6*ae+Rt+At)&&z.set(b[S-1-2*B-xt],b[2*B+At])}ue+=8*ae}if(me.drawModeMessage(z,o,_,I),o)me.drawBullsEye(z,ie.truncDivision(_,2),5);else{me.drawBullsEye(z,ie.truncDivision(_,2),7);for(let B=0,ue=0;B<ie.truncDivision(S,2)-1;B+=15,ue+=16)for(let ae=1&ie.truncDivision(_,2);ae<_;ae+=2)z.set(ie.truncDivision(_,2)-ue,ae),z.set(ie.truncDivision(_,2)+ue,ae),z.set(ae,ie.truncDivision(_,2)-ue),z.set(ae,ie.truncDivision(_,2)+ue)}let X=new nr;return X.setCompact(o),X.setSize(_),X.setLayers(a),X.setCodeWords(m),X.setMatrix(z),X}static drawBullsEye(e,t,n){for(let r=0;r<n;r+=2)for(let i=t-r;i<=t+r;i++)e.set(i,t-r),e.set(i,t+r),e.set(t-r,i),e.set(t+r,i);e.set(t-n,t-n),e.set(t-n+1,t-n),e.set(t-n,t-n+1),e.set(t+n,t-n),e.set(t+n,t-n+1),e.set(t+n,t+n-1)}static generateModeMessage(e,t,n){let r=new $;return e?(r.appendBits(t-1,2),r.appendBits(n-1,6),r=me.generateCheckWords(r,28,4)):(r.appendBits(t-1,5),r.appendBits(n-1,11),r=me.generateCheckWords(r,40,4)),r}static drawModeMessage(e,t,n,r){let i=ie.truncDivision(n,2);if(t)for(let s=0;s<7;s++){let o=i-3+s;r.get(s)&&e.set(o,i-5),r.get(s+7)&&e.set(i+5,o),r.get(20-s)&&e.set(o,i+5),r.get(27-s)&&e.set(i-5,o)}else for(let s=0;s<10;s++){let o=i-5+s+ie.truncDivision(s,5);r.get(s)&&e.set(o,i-7),r.get(s+10)&&e.set(i+7,o),r.get(29-s)&&e.set(o,i+7),r.get(39-s)&&e.set(i-7,o)}}static generateCheckWords(e,t,n){let r=e.getSize()/n,i=new kn(me.getGF(n)),s=ie.truncDivision(t,n),o=me.bitsToWords(e,n,s);i.encode(o,s-r);let a=t%n,c=new $;c.appendBits(0,a);for(const u of Array.from(o))c.appendBits(u,n);return c}static bitsToWords(e,t,n){let i,s,r=new Int32Array(n);for(i=0,s=e.getSize()/t;i<s;i++){let o=0;for(let a=0;a<t;a++)o|=e.get(i*t+a)?1<<t-a-1:0;r[i]=o}return r}static getGF(e){switch(e){case 4:return se.AZTEC_PARAM;case 6:return se.AZTEC_DATA_6;case 8:return se.AZTEC_DATA_8;case 10:return se.AZTEC_DATA_10;case 12:return se.AZTEC_DATA_12;default:throw new Z("Unsupported word size "+e)}}static stuffBits(e,t){let n=new $,r=e.getSize(),i=(1<<t)-2;for(let s=0;s<r;s+=t){let o=0;for(let a=0;a<t;a++)(s+a>=r||e.get(s+a))&&(o|=1<<t-1-a);(o&i)===i?(n.appendBits(o&i,t),s--):o&i?n.appendBits(o,t):(n.appendBits(1|o,t),s--)}return n}static totalBitsInLayer(e,t){return((t?88:112)+16*e)*e}}me.DEFAULT_EC_PERCENT=33,me.DEFAULT_AZTEC_LAYERS=0,me.MAX_NB_BITS=32,me.MAX_NB_BITS_COMPACT=4,me.WORD_SIZE=Int32Array.from([4,6,6,8,8,8,8,8,8,10,10,10,10,10,10,10,10,10,10,10,10,10,10,12,12,12,12,12,12,12,12,12,12]);class _n{encode(e,t,n,r){return this.encodeWithHints(e,t,n,r,null)}encodeWithHints(e,t,n,r,i){let s=zn.ISO_8859_1,o=me.DEFAULT_EC_PERCENT,a=me.DEFAULT_AZTEC_LAYERS;return null!=i&&(i.has(et.CHARACTER_SET)&&(s=tr.forName(i.get(et.CHARACTER_SET).toString())),i.has(et.ERROR_CORRECTION)&&(o=ie.parseInt(i.get(et.ERROR_CORRECTION).toString())),i.has(et.AZTEC_LAYERS)&&(a=ie.parseInt(i.get(et.AZTEC_LAYERS).toString()))),_n.encodeLayers(e,t,n,r,s,o,a)}static encodeLayers(e,t,n,r,i,s,o){if(t!==V.AZTEC)throw new Z("Can only encode AZTEC, but got "+t);let a=me.encode(q.getBytes(e,i),s,o);return _n.renderResult(a,n,r)}static renderResult(e,t,n){let r=e.getMatrix();if(null==r)throw new wt;
1let i=r.getWidth(),s=r.getHeight(),o=Math.max(t,i),a=Math.max(n,s),c=Math.min(o/i,a/s),u=(o-i*c)/2,g=(a-s*c)/2,p=new _e(o,a);for(let m=0,I=g;m<s;m++,I+=c)for(let S=0,b=u;S<i;S++,b+=c)r.get(S,m)&&p.setRegion(b,I,c,c);return p}}M.AbstractExpandedDecoder=Pe,M.ArgumentException=Ae,M.ArithmeticException=sn,M.AztecCode=nr,M.AztecCodeReader=ft,M.AztecCodeWriter=_n,M.AztecDecoder=on,M.AztecDetector=ct,M.AztecDetectorResult=pn,M.AztecEncoder=me,M.AztecHighLevelEncoder=An,M.AztecPoint=Ue,M.BarcodeFormat=V,M.Binarizer=We,M.BinaryBitmap=Qe,M.BitArray=$,M.BitMatrix=_e,M.BitSource=Rn,M.BrowserAztecCodeReader=class Cn extends St{constructor(e=500){super(new ft,e)}},M.BrowserBarcodeReader=class ur extends St{constructor(e=500,t){super(new $t(t),e,t)}},M.BrowserCodeReader=St,M.BrowserDatamatrixCodeReader=class fr extends St{constructor(e=500){super(new mn,e)}},M.BrowserMultiFormatReader=class br extends St{constructor(e=null,t=500){const n=new $n;n.setHints(e),super(n,t)}decodeBitmap(e){return this.reader.decodeWithState(e)}},M.BrowserPDF417Reader=class Nr extends St{constructor(e=500){super(new st,e)}},M.BrowserQRCodeReader=class _r extends St{constructor(e=500){super(new Ht,e)}},M.BrowserQRCodeSvgWriter=Or,M.CharacterSetECI=L,M.ChecksumException=Ce,M.Code128Reader=W,M.Code39Reader=cn,M.DataMatrixDecodedBitStreamParser=zt,M.DataMatrixReader=mn,M.DecodeHintType=Se,M.DecoderResult=Xe,M.DefaultGridSampler=wn,M.DetectorResult=qt,M.EAN13Reader=ln,M.EncodeHintType=et,M.Exception=de,M.FormatException=P,M.GenericGF=se,M.GenericGFPoly=at,M.GlobalHistogramBinarizer=je,M.GridSampler=an,M.GridSamplerInstance=Mt,M.HTMLCanvasElementLuminanceSource=Tt,M.HybridBinarizer=oe,M.ITFReader=be,M.IllegalArgumentException=Z,M.IllegalStateException=wt,M.InvertedLuminanceSource=It,M.LuminanceSource=Lt,M.MathUtils=ge,M.MultiFormatOneDReader=$t,M.MultiFormatReader=$n,M.MultiFormatWriter=class Dr{encode(e,t,n,r,i){let s;if(t!==V.QR_CODE)throw new Z("No encoder available for format "+t);return s=new er,s.encode(e,t,n,r,i)}},M.NotFoundException=R,M.OneDReader=Ve,M.PDF417DecodedBitStreamParser=O,M.PDF417DecoderErrorCorrection=Xn,M.PDF417Reader=st,M.PDF417ResultMetadata=Kn,M.PerspectiveTransform=Ct,M.PlanarYUVLuminanceSource=Rr,M.QRCodeByteMatrix=yn,M.QRCodeDataMask=bt,M.QRCodeDecodedBitStreamParser=Gn,M.QRCodeDecoderErrorCorrectionLevel=Re,M.QRCodeDecoderFormatInformation=lt,M.QRCodeEncoder=ke,M.QRCodeEncoderQRCode=bn,M.QRCodeMaskUtil=en,M.QRCodeMatrixUtil=te,M.QRCodeMode=ee,M.QRCodeReader=Ht,M.QRCodeVersion=J,M.QRCodeWriter=er,M.RGBLuminanceSource=Un,M.RSS14Reader=Ge,M.RSSExpandedReader=U,M.ReaderException=Fn,M.ReedSolomonDecoder=Pt,M.ReedSolomonEncoder=kn,M.ReedSolomonException=jt,M.Result=Je,M.ResultMetadataType=k,M.ResultPoint=K,M.StringUtils=q,M.UnsupportedOperationException=Be,M.VideoInputDevice=Qt,M.WhiteRectangleDetector=Jt,M.WriterException=ve,M.ZXingArrays=De,M.ZXingCharset=tr,M.ZXingInteger=ie,M.ZXingStandardCharsets=zn,M.ZXingStringBuilder=fe,M.ZXingStringEncoding=Le,M.ZXingSystem=we,M.createAbstractExpandedDecoder=jn,Object.defineProperty(M,"__esModule",{value:!0})}(pt)},7773:(Zt,pt,M)=>{"use strict";M.d(pt,{$6:()=>Se,lU:()=>$});var T=M(2321),j=M(2560),rt=M(7231),ut=M(7981),tt=M(4157),He=M(3923),de=M(6982),Ae=M(2867),Z=M(4666),Qe=M(5895),Ce=M(1586),We=M(8506);function we(P,re){if(1&P&&(j.ynx(0),j._uU(1),j.BQk()),2&P){const L=j.oxw(3);j.xp6(1),j.Oqu(L.nzTitle)}}function ht(P,re){if(1&P&&(j.TgZ(0,"div",10),j.YNc(1,we,2,1,"ng-container",9),j.qZA()),2&P){const L=j.oxw(2);j.xp6(1),j.Q6J("nzStringTemplateOutlet",L.nzTitle)}}function he(P,re){if(1&P&&(j.ynx(0),j._uU(1),j.BQk()),2&P){const L=j.oxw(2);j.xp6(1),j.Oqu(L.nzContent)}}function De(P,re){if(1&P&&(j.TgZ(0,"div",2)(1,"div",3)(2,"div",4),j._UZ(3,"span",5),j.qZA(),j.TgZ(4,"div",6)(5,"div"),j.YNc(6,ht,2,1,"div",7),j.TgZ(7,"div",8),j.YNc(8,he,2,1,"ng-container",9),j.qZA()()()()()),2&P){const L=j.oxw();j.ekj("ant-popover-rtl","rtl"===L.dir),j.Q6J("ngClass",L._classMap)("ngStyle",L.nzOverlayStyle)("@.disabled",!(null==L.noAnimation||!L.noAnimation.nzNoAnimation))("nzNoAnimation",null==L.noAnimation?null:L.noAnimation.nzNoAnimation)("@zoomBigMotion","active"),j.xp6(6),j.Q6J("ngIf",L.nzTitle),j.xp6(2),j.Q6J("nzStringTemplateOutlet",L.nzContent)}}let $=(()=>{class P extends He.Mg{constructor(L,Be,Le,q,fe,_e){super(L,Be,Le,q,fe,_e),this._nzModuleName="popover",this.trigger="hover",this.placement="top",this.nzPopoverBackdrop=!1,this.visibleChange=new j.vpe,this.componentRef=this.hostView.createComponent(_t)}getProxyPropertyMap(){return{nzPopoverBackdrop:["nzBackdrop",()=>this.nzPopoverBackdrop],...super.getProxyPropertyMap()}}}return P.\u0275fac=function(L){return new(L||P)(j.Y36(j.SBq),j.Y36(j.s_b),j.Y36(j._Vd),j.Y36(j.Qsj),j.Y36(de.P,9),j.Y36(ut.jY))},P.\u0275dir=j.lG2({type:P,selectors:[["","nz-popover",""]],hostVars:2,hostBindings:function(L,Be){2&L&&j.e
1kj("ant-popover-open",Be.visible)},inputs:{arrowPointAtCenter:["nzPopoverArrowPointAtCenter","arrowPointAtCenter"],title:["nzPopoverTitle","title"],content:["nzPopoverContent","content"],directiveTitle:["nz-popover","directiveTitle"],trigger:["nzPopoverTrigger","trigger"],placement:["nzPopoverPlacement","placement"],origin:["nzPopoverOrigin","origin"],visible:["nzPopoverVisible","visible"],mouseEnterDelay:["nzPopoverMouseEnterDelay","mouseEnterDelay"],mouseLeaveDelay:["nzPopoverMouseLeaveDelay","mouseLeaveDelay"],overlayClassName:["nzPopoverOverlayClassName","overlayClassName"],overlayStyle:["nzPopoverOverlayStyle","overlayStyle"],nzPopoverBackdrop:"nzPopoverBackdrop"},outputs:{visibleChange:"nzPopoverVisibleChange"},exportAs:["nzPopover"],features:[j.qOj]}),(0,T.gn)([(0,tt.yF)()],P.prototype,"arrowPointAtCenter",void 0),(0,T.gn)([(0,ut.oS)()],P.prototype,"nzPopoverBackdrop",void 0),P})(),_t=(()=>{class P extends He.XK{constructor(L,Be,Le){super(L,Be,Le),this._prefix="ant-popover"}get hasBackdrop(){return"click"===this.nzTrigger&&this.nzBackdrop}isEmpty(){return(0,He.pu)(this.nzTitle)&&(0,He.pu)(this.nzContent)}}return P.\u0275fac=function(L){return new(L||P)(j.Y36(j.sBO),j.Y36(Ae.Is,8),j.Y36(de.P,9))},P.\u0275cmp=j.Xpm({type:P,selectors:[["nz-popover"]],exportAs:["nzPopoverComponent"],features:[j.qOj],decls:2,vars:6,consts:[["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayOpen","cdkConnectedOverlayPush","nzArrowPointAtCenter","overlayOutsideClick","detach","positionChange"],["overlay","cdkConnectedOverlay"],[1,"ant-popover",3,"ngClass","ngStyle","nzNoAnimation"],[1,"ant-popover-content"],[1,"ant-popover-arrow"],[1,"ant-popover-arrow-content"],["role","tooltip",1,"ant-popover-inner"],["class","ant-popover-title",4,"ngIf"],[1,"ant-popover-inner-content"],[4,"nzStringTemplateOutlet"],[1,"ant-popover-title"]],template:function(L,Be){1&L&&(j.YNc(0,De,9,9,"ng-template",0,1,j.W1O),j.NdJ("overlayOutsideClick",function(q){return Be.onClickOutside(q)})("detach",function(){return Be.hide()})("positionChange",function(q){return Be.onPositionChange(q)})),2&L&&j.Q6J("cdkConnectedOverlayHasBackdrop",Be.hasBackdrop)("cdkConnectedOverlayOrigin",Be.origin)("cdkConnectedOverlayPositions",Be._positions)("cdkConnectedOverlayOpen",Be._visible)("cdkConnectedOverlayPush",!0)("nzArrowPointAtCenter",Be.nzArrowPointAtCenter)},dependencies:[Z.mk,Z.O5,Z.PC,Qe.pI,Ce.f,We.hQ,de.P],encapsulation:2,data:{animation:[rt.$C]},changeDetection:0}),P})(),Se=(()=>{class P{}return P.\u0275fac=function(L){return new(L||P)},P.\u0275mod=j.oAB({type:P}),P.\u0275inj=j.cJS({imports:[Ae.vT,Z.ez,Qe.U8,Ce.T,We.e4,de.g,He.cg]}),P})()},6952:(Zt,pt,M)=>{"use strict";M.d(pt,{$W:()=>Ye,N6:()=>Je,iy:()=>St});var T=M(2560),j=M(253),rt=M(3280),ut=M(7714),tt=M(6646),He=M(116),de=M(8951),Ae=M(4874),Z=M(4194),Qe=M(4157),Ce=M(2321),We=M(4666),we=M(1152),ht=M(1586),he=M(8412),De=M(2867);const ie=["processDotTemplate"],$=["itemContainer"];function _t(Q,V){1&Q&&T._UZ(0,"div",10)}function Se(Q,V){if(1&Q&&(T.TgZ(0,"div",13),T._UZ(1,"nz-progress",14),T.qZA()),2&Q){const H=T.oxw(2);T.xp6(1),T.Q6J("nzPercent",H.nzPercentage)("nzWidth","small"===H.nzSize?32:40)("nzFormat",H.nullProcessFormat)("nzStrokeWidth",4)}}function P(Q,V){1&Q&&(T.TgZ(0,"span",15),T._UZ(1,"span",16),T.qZA())}function re(Q,V){1&Q&&(T.TgZ(0,"span",15),T._UZ(1,"span",17),T.qZA())}function L(Q,V){if(1&Q&&(T.TgZ(0,"span",15),T._uU(1),T.qZA()),2&Q){const H=T.oxw(2);T.xp6(1),T.hij(" ",H.index+1," ")}}function Be(Q,V){if(1&Q&&(T.ynx(0),T._UZ(1,"span",18),T.BQk()),2&Q){const H=V.$implicit,k=T.oxw(3);T.xp6(1),T.Q6J("nzType",!k.oldAPIIcon&&H)("ngClass",k.oldAPIIcon&&H)}}function Le(Q,V){if(1&Q&&(T.TgZ(0,"span",15),T.YNc(1,Be,2,2,"ng-container",7),T.qZA()),2&Q){const H=T.oxw(2);T.xp6(1),T.Q6J("nzStringTemplateOutlet",H.nzIcon)}}function q(Q,V){if(1&Q&&(T.YNc(0,Se,2,4,"div",11),T.YNc(1,P,2,0,"span",12),T.YNc(2,re,2,0,"span",12),T.YNc(3,L,2,1,"span",12),T.YNc(4,Le,2,1,"span",12)),2&Q){const H=T.oxw();T.Q6J("ngIf",H.showProgress),T.xp6(1),T.Q6J("ngIf","finish"===H.nzStatus&&!H.nzIcon),T.xp6(1),T.Q6J("ngIf","error"===H.nzStatus),T.xp6(1),T.Q6J("ngIf",("process"===H.nzStatus||"wait"===H.nzStatus)&&!H.nzIcon),T.xp6(1),T.Q6J("ngIf",H.nzIcon)}}function fe(Q,V){1&Q&&T._UZ(0,"span",21)}function _e(Q,V){}const R=function(Q,V,H){return{$implicit:Q,status:V,index:H}};function je(Q,V){if(1&Q&&(T.TgZ(0,"span",15),T.YNc(1,fe,1,0,"ng-template",null,19,T.W1O),T.YNc(3,_e,0,0,"ng-template",20),T.qZA()),2&Q){const H=T.MAs(2),k=T.oxw();T.xp6(3),T.Q6J("ngTemplateOutlet",k.customProcessTemplate||H)("ngTemplateOutletContext",T.kEZ(2,R,H,k.nzStatus,k.index))}}function oe(Q,V){if(1&Q&&(T.ynx(0),T._uU(1),T.BQk()),2&Q){const H=T.oxw();T.xp6(1),T.Oqu(H.nzTitle)}}function Lt(Q,V){if(1&Q&&(T.ynx(0),T._uU(1),T.BQk()),2&Q){const H=T.oxw(2);T.xp6(1),T.Oqu(H.nzSubtitle)}}function It(Q,V){if(1&Q&&(T.TgZ(0,"div",22),T.YNc(1,Lt,2,1,"ng-container",7),T.qZA()),2&Q){const H=T.oxw();T.xp6(1),T.Q6J("nzStringTemplateOutlet",H.nzSubtitle)}}function Tt(Q,V){if(1&Q&&(T.ynx(0),T._uU(1),T.BQk()),2&Q){const H=T.oxw();T.xp6(1),T.Oqu(H.nzDescription)}}const Qt=["*"];let Ye=(()=>{class Q{constructor(H,k,Xe){this.cdr=H,this.ngZone=k,this.destroy$=Xe,this.nzDisabled=!1,this.nzPercentage=null,this.nzSize="default",this.isCu
1stomStatus=!1,this._status="wait",this.oldAPIIcon=!0,this.direction="horizontal",this.index=0,this.last=!1,this.outStatus="process",this.showProcessDot=!1,this.clickable=!1,this.clickOutsideAngular$=new j.x,this.nullProcessFormat=()=>null,this._currentIndex=0}get nzStatus(){return this._status}set nzStatus(H){this._status=H,this.isCustomStatus=!0}get nzIcon(){return this._icon}set nzIcon(H){H instanceof T.Rgc||(this.oldAPIIcon="string"==typeof H&&H.indexOf("anticon")>-1),this._icon=H}get showProgress(){return null!==this.nzPercentage&&!this.nzIcon&&"process"===this.nzStatus&&this.nzPercentage>=0&&this.nzPercentage<=100}get currentIndex(){return this._currentIndex}set currentIndex(H){this._currentIndex=H,this.isCustomStatus||(this._status=H>this.index?"finish":H===this.index?this.outStatus||"":"wait")}ngOnInit(){this.ngZone.runOutsideAngular(()=>(0,rt.R)(this.itemContainer.nativeElement,"click").pipe((0,He.h)(()=>this.clickable&&this.currentIndex!==this.index&&!this.nzDisabled),(0,de.R)(this.destroy$)).subscribe(()=>{this.clickOutsideAngular$.next(this.index)}))}enable(){this.nzDisabled=!1,this.cdr.markForCheck()}disable(){this.nzDisabled=!0,this.cdr.markForCheck()}markForCheck(){this.cdr.markForCheck()}}return Q.\u0275fac=function(H){return new(H||Q)(T.Y36(T.sBO),T.Y36(T.R0b),T.Y36(Z.kn))},Q.\u0275cmp=T.Xpm({type:Q,selectors:[["nz-step"]],viewQuery:function(H,k){if(1&H&&(T.Gf(ie,5),T.Gf($,7)),2&H){let Xe;T.iGM(Xe=T.CRH())&&(k.processDotTemplate=Xe.first),T.iGM(Xe=T.CRH())&&(k.itemContainer=Xe.first)}},hostAttrs:[1,"ant-steps-item"],hostVars:16,hostBindings:function(H,k){2&H&&T.ekj("ant-steps-item-wait","wait"===k.nzStatus)("ant-steps-item-process","process"===k.nzStatus)("ant-steps-item-finish","finish"===k.nzStatus)("ant-steps-item-error","error"===k.nzStatus)("ant-steps-item-active",k.currentIndex===k.index)("ant-steps-item-disabled",k.nzDisabled)("ant-steps-item-custom",!!k.nzIcon)("ant-steps-next-error","error"===k.outStatus&&k.currentIndex===k.index+1)},inputs:{nzTitle:"nzTitle",nzSubtitle:"nzSubtitle",nzDescription:"nzDescription",nzDisabled:"nzDisabled",nzPercentage:"nzPercentage",nzSize:"nzSize",nzStatus:"nzStatus",nzIcon:"nzIcon"},exportAs:["nzStep"],features:[T._Bn([Z.kn])],decls:12,vars:8,consts:[[1,"ant-steps-item-container",3,"tabindex"],["itemContainer",""],["class","ant-steps-item-tail",4,"ngIf"],[1,"ant-steps-item-icon"],[3,"ngIf"],[1,"ant-steps-item-content"],[1,"ant-steps-item-title"],[4,"nzStringTemplateOutlet"],["class","ant-steps-item-subtitle",4,"ngIf"],[1,"ant-steps-item-description"],[1,"ant-steps-item-tail"],["class","ant-steps-progress-icon",4,"ngIf"],["class","ant-steps-icon",4,"ngIf"],[1,"ant-steps-progress-icon"],["nzType","circle",3,"nzPercent","nzWidth","nzFormat","nzStrokeWidth"],[1,"ant-steps-icon"],["nz-icon","","nzType","check"],["nz-icon","","nzType","close"],["nz-icon","",3,"nzType","ngClass"],["processDotTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ant-steps-icon-dot"],[1,"ant-steps-item-subtitle"]],template:function(H,k){1&H&&(T.TgZ(0,"div",0,1),T.YNc(2,_t,1,0,"div",2),T.TgZ(3,"div",3),T.YNc(4,q,5,5,"ng-template",4),T.YNc(5,je,4,6,"ng-template",4),T.qZA(),T.TgZ(6,"div",5)(7,"div",6),T.YNc(8,oe,2,1,"ng-container",7),T.YNc(9,It,2,1,"div",8),T.qZA(),T.TgZ(10,"div",9),T.YNc(11,Tt,2,1,"ng-container",7),T.qZA()()()),2&H&&(T.Q6J("tabindex",k.clickable&&!k.nzDisabled?0:null),T.uIk("role",k.clickable&&!k.nzDisabled?"button":null),T.xp6(2),T.Q6J("ngIf",!0!==k.last),T.xp6(2),T.Q6J("ngIf",!k.showProcessDot),T.xp6(1),T.Q6J("ngIf",k.showProcessDot),T.xp6(3),T.Q6J("nzStringTemplateOutlet",k.nzTitle),T.xp6(1),T.Q6J("ngIf",k.nzSubtitle),T.xp6(2),T.Q6J("nzStringTemplateOutlet",k.nzDescription))},dependencies:[We.mk,We.O5,We.tP,we.Ls,ht.f,he.M],encapsulation:2,changeDetection:0}),(0,Ce.gn)([(0,Qe.yF)()],Q.prototype,"nzDisabled",void 0),Q})(),St=(()=>{class Q{constructor(H,k,Xe,yt){this.ngZone=H,this.cdr=k,this.directionality=Xe,this.destroy$=yt,this.nzCurrent=0,this.nzDirection="horizontal",this.nzLabelPlacement="horizontal",this.nzType="default",this.nzSize="default",this.nzStartIndex=0,this.nzStatus="process",this.nzIndexChange=new T.vpe,this.indexChangeSubscription=ut.w0.EMPTY,this.showProcessDot=!1,this.showProgress=!1,this.dir="ltr"}set nzProgressDot(H){H instanceof T.Rgc?(this.showProcessDot=!0,this.customProcessDotTemplate=H):this.showProcessDot=(0,Qe.sw)(H),this.updateChildrenSteps()}ngOnChanges(H){(H.nzStartIndex||H.nzDirection||H.nzStatus||H.nzCurrent||H.nzSize)&&this.updateChildrenSteps()}ngOnInit(){this.directionality.change?.pipe((0,de.R)(this.destroy$)).subscribe(H=>{this.dir=H,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.updateChildrenSteps()}ngAfterContentInit(){this.steps&&this.steps.changes.pipe((0,Ae.O)(null),(0,de.R)(this.destroy$)).subscribe(()=>{this.updateHostProgressClass(),this.updateChildrenSteps()})}updateHostProgressClass(){this.steps&&!this.showProcessDot&&(this.showProgress=!!this.steps.toArray().find(H=>null!==H.nzPercentage))}updateChildrenSteps(){if(this.steps){const H=this.steps.length;
1this.steps.toArray().forEach((k,Xe)=>{Promise.resolve().then(()=>{k.nzSize=this.nzSize,k.outStatus=this.nzStatus,k.showProcessDot=this.showProcessDot,this.customProcessDotTemplate&&(k.customProcessTemplate=this.customProcessDotTemplate),k.clickable=this.nzIndexChange.observers.length>0,k.direction=this.nzDirection,k.index=Xe+this.nzStartIndex,k.currentIndex=this.nzCurrent,k.last=H===Xe+1,k.markForCheck()})}),this.indexChangeSubscription.unsubscribe(),this.indexChangeSubscription=(0,tt.T)(...this.steps.map(k=>k.clickOutsideAngular$)).pipe((0,de.R)(this.destroy$)).subscribe(k=>{this.nzIndexChange.observers.length&&this.ngZone.run(()=>this.nzIndexChange.emit(k))})}}}return Q.\u0275fac=function(H){return new(H||Q)(T.Y36(T.R0b),T.Y36(T.sBO),T.Y36(De.Is,8),T.Y36(Z.kn))},Q.\u0275cmp=T.Xpm({type:Q,selectors:[["nz-steps"]],contentQueries:function(H,k,Xe){if(1&H&&T.Suo(Xe,Ye,4),2&H){let yt;T.iGM(yt=T.CRH())&&(k.steps=yt)}},hostAttrs:[1,"ant-steps"],hostVars:18,hostBindings:function(H,k){2&H&&T.ekj("ant-steps-horizontal","horizontal"===k.nzDirection)("ant-steps-vertical","vertical"===k.nzDirection)("ant-steps-label-horizontal","horizontal"===k.nzDirection)("ant-steps-label-vertical",(k.showProcessDot||"vertical"===k.nzLabelPlacement)&&"horizontal"===k.nzDirection)("ant-steps-dot",k.showProcessDot)("ant-steps-small","small"===k.nzSize)("ant-steps-navigation","navigation"===k.nzType)("ant-steps-rtl","rtl"===k.dir)("ant-steps-with-progress",k.showProgress)},inputs:{nzCurrent:"nzCurrent",nzDirection:"nzDirection",nzLabelPlacement:"nzLabelPlacement",nzType:"nzType",nzSize:"nzSize",nzStartIndex:"nzStartIndex",nzStatus:"nzStatus",nzProgressDot:"nzProgressDot"},outputs:{nzIndexChange:"nzIndexChange"},exportAs:["nzSteps"],features:[T._Bn([Z.kn]),T.TTD],ngContentSelectors:Qt,decls:1,vars:0,template:function(H,k){1&H&&(T.F$t(),T.Hsn(0))},encapsulation:2,changeDetection:0}),Q})(),Je=(()=>{class Q{}return Q.\u0275fac=function(H){return new(H||Q)},Q.\u0275mod=T.oAB({type:Q}),Q.\u0275inj=T.cJS({imports:[De.vT,We.ez,we.PV,ht.T,he.W]}),Q})()}}]); 2//# sourceMappingURL=1909.375a634ae88a8138.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.