chunk-81a47c5e.3184bb30.js 554 KB

123
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-81a47c5e"],{"06c5":function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("fb6a"),r("d3b7"),r("25f0"),r("b0c0"),r("a630"),r("3ca3"),r("ac1f"),r("00b4");var n=r("6b75");function i(t,e){if(t){if("string"===typeof t)return Object(n["a"])(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n["a"])(t,e):void 0}}},2909:function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r("6b75");function i(t){if(Array.isArray(t))return Object(n["a"])(t)}r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("a630");function o(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}var a=r("06c5");r("d9e2");function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t){return i(t)||o(t)||Object(a["a"])(t)||s()}},3835:function(t,e,r){"use strict";function n(t){if(Array.isArray(t))return t}r.d(e,"a",(function(){return s}));r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("14d9");function i(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){u=!0,i=t}finally{try{if(!c&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(u)throw i}}return s}}var o=r("06c5");r("d9e2");function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){return n(t)||i(t,e)||Object(o["a"])(t,e)||a()}},"6b75":function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}r.d(e,"a",(function(){return n}))},7037:function(t,e,r){function n(e){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports["default"]=t.exports,n(e)}r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),t.exports=n,t.exports.__esModule=!0,t.exports["default"]=t.exports},"784e":function(t,e,r){"use strict";var n;r.d(e,"a",(function(){return K})),function(t){t[t["QR_CODE"]=0]="QR_CODE",t[t["AZTEC"]=1]="AZTEC",t[t["CODABAR"]=2]="CODABAR",t[t["CODE_39"]=3]="CODE_39",t[t["CODE_93"]=4]="CODE_93",t[t["CODE_128"]=5]="CODE_128",t[t["DATA_MATRIX"]=6]="DATA_MATRIX",t[t["MAXICODE"]=7]="MAXICODE",t[t["ITF"]=8]="ITF",t[t["EAN_13"]=9]="EAN_13",t[t["EAN_8"]=10]="EAN_8",t[t["PDF_417"]=11]="PDF_417",t[t["RSS_14"]=12]="RSS_14",t[t["RSS_EXPANDED"]=13]="RSS_EXPANDED",t[t["UPC_A"]=14]="UPC_A",t[t["UPC_E"]=15]="UPC_E",t[t["UPC_EAN_EXTENSION"]=16]="UPC_EAN_EXTENSION"}(n||(n={}));var i,o,a=new Map([[n.QR_CODE,"QR_CODE"],[n.AZTEC,"AZTEC"],[n.CODABAR,"CODABAR"],[n.CODE_39,"CODE_39"],[n.CODE_93,"CODE_93"],[n.CODE_128,"CODE_128"],[n.DATA_MATRIX,"DATA_MATRIX"],[n.MAXICODE,"MAXICODE"],[n.ITF,"ITF"],[n.EAN_13,"EAN_13"],[n.EAN_8,"EAN_8"],[n.PDF_417,"PDF_417"],[n.RSS_14,"RSS_14"],[n.RSS_EXPANDED,"RSS_EXPANDED"],[n.UPC_A,"UPC_A"],[n.UPC_E,"UPC_E"],[n.UPC_EAN_EXTENSION,"UPC_EAN_EXTENSION"]]);function s(t){return Object.values(n).includes(t)}(function(t){t[t["UNKNOWN"]=0]="UNKNOWN",t[t["URL"]=1]="URL"})(i||(i={})),function(t){t[t["SCAN_TYPE_CAMERA"]=0]="SCAN_TYPE_CAMERA",t[t["SCAN_TYPE_FILE"]=1]="SCAN_TYPE_FILE"}(o||(o={}));var c,u=function(){function t(){}return t.GITHUB_PROJECT_URL="https://github.com/mebjas/html5-qrcode",t.SCAN_DEFAULT_FPS=2,t.DEFAULT_DISABLE_FLIP=!1,t.DEFAULT_REMEMBER_LAST_CAMERA_USED=!0,t.DEFAULT_SUPPORTED_SCAN_TYPE=[o.SCAN_TYPE_CAMERA,o.SCAN_TYPE_FILE],t}(),l=function(){function t(t,e){this.format=t,this.formatName=e}return t.prototype.toString=function(){return this.formatName},t.create=function(e){if(!a.has(e))throw"".concat(e," not in html5QrcodeSupportedFormatsTextMap");return new t(e,a.get(e))},t}(),h=function(){function t(){}return t.createFromText=function(t){var e={text:t};return{decodedText:t,result:e}},t.createFromQrcodeResult=function(t){return{decodedText:t.text,result:t}},t}();(function(t){t[t["UNKWOWN_ERROR"]=0]="UNKWOWN_ERROR",t[t["IMPLEMENTATION_ERROR"]=1]="IMPLEMENTATION_ERROR",t[t["NO_CODE_FOUND_ERROR"]=2]="NO_CODE_FOUND_ERROR"})(c||(c={}));var d=function(){function t(){}return t.createFrom=function(t){return{errorMessage:t,type:c.UNKWOWN_ERROR}},t}(),f=function(){function t(t){this.verbose=t}return t.prototype.log=function(t){this.verbose&&console.log(t)},t.prototype.warn=function(t){this.verbose&&console.warn(t)},t.prototype.logError=function(t,e){(this.verbose||!0===e)&&console.error(t)},t.prototype.logErrors=function(t){if(0===t.length)throw"Logger#logError called without arguments";this.verbose&&console.error(t)},t}();function g(t){return"undefined"===typeof t||null===t}function p(t,e,r){return t>r?r:t<e?e:t}var m,w=function(){function t(){}return t.codeParseError=function(t){return"QR code parse error, error = ".concat(t)},t.errorGettingUserMedia=function(t){return"Error getting userMedia, error = ".concat(t)},t.onlyDeviceSupportedError=function(){return"The device doesn't support navigator.mediaDevices , only supported cameraIdOrConfig in this case is deviceId parameter (string)."},t.cameraStreamingNotSupported=function(){return"Camera streaming not supported by the browser."},t.unableToQuerySupportedDevices=function(){return"Unable to query supported devices, unknown error."},t.insecureContextCameraQueryError=function(){return"Camera access is only supported in secure context like https or localhost."},t.scannerPaused=function(){return"Scanner paused"},t}(),y=function(){function t(){}return t.scanningStatus=function(){return"Scanning"},t.idleStatus=function(){return"Idle"},t.errorStatus=function(){return"Error"},t.permissionStatus=function(){return"Permission"},t.noCameraFoundErrorStatus=function(){return"No Cameras"},t.lastMatch=function(t){return"Last Match: ".concat(t)},t.codeScannerTitle=function(){return"Code Scanner"},t.cameraPermissionTitle=function(){return"Request Camera Permissions"},t.cameraPermissionRequesting=function(){return"Requesting camera permissions..."},t.noCameraFound=function(){return"No camera found"},t.scanButtonStopScanningText=function(){return"Stop Scanning"},t.scanButtonStartScanningText=function(){return"Start Scanning"},t.torchOnButton=function(){return"Switch On Torch"},t.torchOffButton=function(){return"Switch Off Torch"},t.torchOnFailedMessage=function(){return"Failed to turn on torch"},t.torchOffFailedMessage=function(){return"Failed to turn off torch"},t.scanButtonScanningStarting=function(){return"Launching Camera..."},t.textIfCameraScanSelected=function(){return"Scan an Image File"},t.textIfFileScanSelected=function(){return"Scan using camera directly"},t.selectCamera=function(){return"Select Camera"},t.fileSelectionChooseImage=function(){return"Choose Image"},t.fileSelectionChooseAnother=function(){return"Choose Another"},t.fileSelectionNoImageSelected=function(){return"No image choosen"},t.anonymousCameraPrefix=function(){return"Anonymous Camera"},t.dragAndDropMessage=function(){return"Or drop an image to scan"},t.dragAndDropMessageOnlyImages=function(){return"Or drop an image to scan (other files not supported)"},t.zoom=function(){return"zoom"},t.loadingImage=function(){return"Loading image..."},t.cameraScanAltText=function(){return"Camera based scan"},t.fileScanAltText=function(){return"Fule based scan"},t}(),E=function(){function t(){}return t.poweredBy=function(){return"Powered by "},t.reportIssues=function(){return"Report issues"},t}(),C=function(){function t(){}return t.isMediaStreamConstraintsValid=function(t,e){if("object"!==typeof t){var r=typeof t;return e.logError("videoConstraints should be of type object, the "+"object passed is of type ".concat(r,"."),!0),!1}for(var n=["autoGainControl","channelCount","echoCancellation","latency","noiseSuppression","sampleRate","sampleSize","volume"],i=new Set(n),o=Object.keys(t),a=0,s=o;a<s.length;a++){var c=s[a];if(i.has(c))return e.logError("".concat(c," is not supported videoConstaints."),!0),!1}return!0},t}(),A=r("f3a6"),S=function(){function t(t,e,r){if(this.formatMap=new Map([[n.QR_CODE,A["BarcodeFormat"].QR_CODE],[n.AZTEC,A["BarcodeFormat"].AZTEC],[n.CODABAR,A["BarcodeFormat"].CODABAR],[n.CODE_39,A["BarcodeFormat"].CODE_39],[n.CODE_93,A["BarcodeFormat"].CODE_93],[n.CODE_128,A["BarcodeFormat"].CODE_128],[n.DATA_MATRIX,A["BarcodeFormat"].DATA_MATRIX],[n.MAXICODE,A["BarcodeFormat"].MAXICODE],[n.ITF,A["BarcodeFormat"].ITF],[n.EAN_13,A["BarcodeFormat"].EAN_13],[n.EAN_8,A["BarcodeFormat"].EAN_8],[n.PDF_417,A["BarcodeFormat"].PDF_417],[n.RSS_14,A["BarcodeFormat"].RSS_14],[n.RSS_EXPANDED,A["BarcodeFormat"].RSS_EXPANDED],[n.UPC_A,A["BarcodeFormat"].UPC_A],[n.UPC_E,A["BarcodeFormat"].UPC_E],[n.UPC_EAN_EXTENSION,A["BarcodeFormat"].UPC_EAN_EXTENSION]]),this.reverseFormatMap=this.createReverseFormatMap(),!A)throw"Use html5qrcode.min.js without edit, ZXing not found.";this.verbose=e,this.logger=r;var i=this.createZXingFormats(t),o=new Map;o.set(A["DecodeHintType"].POSSIBLE_FORMATS,i),o.set(A["DecodeHintType"].TRY_HARDER,!1),this.hints=o}return t.prototype.decodeAsync=function(t){var e=this;return new Promise((function(r,n){try{r(e.decode(t))}catch(i){n(i)}}))},t.prototype.decode=function(t){var e=new A["MultiFormatReader"](this.verbose,this.hints),r=new A["HTMLCanvasElementLuminanceSource"](t),n=new A["BinaryBitmap"](new A["HybridBinarizer"](r)),i=e.decode(n);return{text:i.text,format:l.create(this.toHtml5QrcodeSupportedFormats(i.format)),debugData:this.createDebugData()}},t.prototype.createReverseFormatMap=function(){var t=new Map;return this.formatMap.forEach((function(e,r,n){t.set(e,r)})),t},t.prototype.toHtml5QrcodeSupportedFormats=function(t){if(!this.reverseFormatMap.has(t))throw"reverseFormatMap doesn't have ".concat(t);return this.reverseFormatMap.get(t)},t.prototype.createZXingFormats=function(t){for(var e=[],r=0,n=t;r<n.length;r++){var i=n[r];this.formatMap.has(i)?e.push(this.formatMap.get(i)):this.logger.logError("".concat(i," is not supported by")+"ZXingHtml5QrcodeShim")}return e},t.prototype.createDebugData=function(){return{decoderName:"zxing-js"}},t}(),v=function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(e){o(e)}}function s(t){try{c(n["throw"](t))}catch(e){o(e)}}function c(t){t.done?r(t.value):i(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},b=function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(a=0)),a)try{if(r=1,n&&(i=2&s[0]?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(c){s=[6,c],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},I=function(){function t(e,r,i){if(this.formatMap=new Map([[n.QR_CODE,"qr_code"],[n.AZTEC,"aztec"],[n.CODABAR,"codabar"],[n.CODE_39,"code_39"],[n.CODE_93,"code_93"],[n.CODE_128,"code_128"],[n.DATA_MATRIX,"data_matrix"],[n.ITF,"itf"],[n.EAN_13,"ean_13"],[n.EAN_8,"ean_8"],[n.PDF_417,"pdf417"],[n.UPC_A,"upc_a"],[n.UPC_E,"upc_e"]]),this.reverseFormatMap=this.createReverseFormatMap(),!t.isSupported())throw"Use html5qrcode.min.js without edit, Use BarcodeDetectorDelegate only if it isSupported();";this.verbose=r,this.logger=i;var o=this.createBarcodeDetectorFormats(e);if(this.detector=new BarcodeDetector(o),!this.detector)throw"BarcodeDetector detector not supported"}return t.isSupported=function(){if(!("BarcodeDetector"in window))return!1;var t=new BarcodeDetector({formats:["qr_code"]});return"undefined"!==typeof t},t.prototype.decodeAsync=function(t){return v(this,void 0,void 0,(function(){var e,r;return b(this,(function(n){switch(n.label){case 0:return[4,this.detector.detect(t)];case 1:if(e=n.sent(),!e||0===e.length)throw"No barcode or QR code detected.";return r=this.selectLargestBarcode(e),[2,{text:r.rawValue,format:l.create(this.toHtml5QrcodeSupportedFormats(r.format)),debugData:this.createDebugData()}]}}))}))},t.prototype.selectLargestBarcode=function(t){for(var e=null,r=0,n=0,i=t;n<i.length;n++){var o=i[n],a=o.boundingBox.width*o.boundingBox.height;a>r&&(r=a,e=o)}if(!e)throw"No largest barcode found";return e},t.prototype.createBarcodeDetectorFormats=function(t){for(var e=[],r=0,n=t;r<n.length;r++){var i=n[r];this.formatMap.has(i)?e.push(this.formatMap.get(i)):this.logger.warn("".concat(i," is not supported by")+"BarcodeDetectorDelegate")}return{formats:e}},t.prototype.toHtml5QrcodeSupportedFormats=function(t){if(!this.reverseFormatMap.has(t))throw"reverseFormatMap doesn't have ".concat(t);return this.reverseFormatMap.get(t)},t.prototype.createReverseFormatMap=function(){var t=new Map;return this.formatMap.forEach((function(e,r,n){t.set(e,r)})),t},t.prototype.createDebugData=function(){return{decoderName:"BarcodeDetector"}},t}(),_=function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(e){o(e)}}function s(t){try{c(n["throw"](t))}catch(e){o(e)}}function c(t){t.done?r(t.value):i(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},T=function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(a=0)),a)try{if(r=1,n&&(i=2&s[0]?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(c){s=[6,c],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},R=function(){function t(t,e,r,n){this.EXECUTIONS_TO_REPORT_PERFORMANCE=100,this.executions=0,this.executionResults=[],this.wasPrimaryDecoderUsedInLastDecode=!1,this.verbose=r,e&&I.isSupported()?(this.primaryDecoder=new I(t,r,n),this.secondaryDecoder=new S(t,r,n)):this.primaryDecoder=new S(t,r,n)}return t.prototype.decodeAsync=function(t){return _(this,void 0,void 0,(function(){var e;return T(this,(function(r){switch(r.label){case 0:e=performance.now(),r.label=1;case 1:return r.trys.push([1,,3,4]),[4,this.getDecoder().decodeAsync(t)];case 2:return[2,r.sent()];case 3:return this.possiblyLogPerformance(e),[7];case 4:return[2]}}))}))},t.prototype.decodeRobustlyAsync=function(t){return _(this,void 0,void 0,(function(){var e,r;return T(this,(function(n){switch(n.label){case 0:e=performance.now(),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,this.primaryDecoder.decodeAsync(t)];case 2:return[2,n.sent()];case 3:if(r=n.sent(),this.secondaryDecoder)return[2,this.secondaryDecoder.decodeAsync(t)];throw r;case 4:return this.possiblyLogPerformance(e),[7];case 5:return[2]}}))}))},t.prototype.getDecoder=function(){return this.secondaryDecoder?!1===this.wasPrimaryDecoderUsedInLastDecode?(this.wasPrimaryDecoderUsedInLastDecode=!0,this.primaryDecoder):(this.wasPrimaryDecoderUsedInLastDecode=!1,this.secondaryDecoder):this.primaryDecoder},t.prototype.possiblyLogPerformance=function(t){if(this.verbose){var e=performance.now()-t;this.executionResults.push(e),this.executions++,this.possiblyFlushPerformanceReport()}},t.prototype.possiblyFlushPerformanceReport=function(){if(!(this.executions<this.EXECUTIONS_TO_REPORT_PERFORMANCE)){for(var t=0,e=0,r=this.executionResults;e<r.length;e++){var n=r[e];t+=n}var i=t/this.executionResults.length;console.log("".concat(i," ms for ").concat(this.executionResults.length," last runs.")),this.executions=0,this.executionResults=[]}},t}(),D=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),O=function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(e){o(e)}}function s(t){try{c(n["throw"](t))}catch(e){o(e)}}function c(t){t.done?r(t.value):i(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},N=function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(a=0)),a)try{if(r=1,n&&(i=2&s[0]?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(c){s=[6,c],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},M=function(){function t(t,e){this.name=t,this.track=e}return t.prototype.isSupported=function(){return!!this.track.getCapabilities&&this.name in this.track.getCapabilities()},t.prototype.apply=function(t){var e={};e[this.name]=t;var r={advanced:[e]};return this.track.applyConstraints(r)},t.prototype.value=function(){var t=this.track.getSettings();if(this.name in t){var e=t[this.name];return e}return null},t}(),P=function(t){function e(e,r){return t.call(this,e,r)||this}return D(e,t),e.prototype.min=function(){return this.getCapabilities().min},e.prototype.max=function(){return this.getCapabilities().max},e.prototype.step=function(){return this.getCapabilities().step},e.prototype.apply=function(t){var e={};e[this.name]=t;var r={advanced:[e]};return this.track.applyConstraints(r)},e.prototype.getCapabilities=function(){this.failIfNotSupported();var t=this.track.getCapabilities(),e=t[this.name];return{min:e.min,max:e.max,step:e.step}},e.prototype.failIfNotSupported=function(){if(!this.isSupported())throw new Error("".concat(this.name," capability not supported"))},e}(M),L=function(t){function e(e){return t.call(this,"zoom",e)||this}return D(e,t),e}(P),x=function(t){function e(e){return t.call(this,"torch",e)||this}return D(e,t),e}(M),B=function(){function t(t){this.track=t}return t.prototype.zoomFeature=function(){return new L(this.track)},t.prototype.torchFeature=function(){return new x(this.track)},t}(),k=function(){function t(t,e,r){this.isClosed=!1,this.parentElement=t,this.mediaStream=e,this.callbacks=r,this.surface=this.createVideoElement(this.parentElement.clientWidth),t.append(this.surface)}return t.prototype.createVideoElement=function(t){var e=document.createElement("video");return e.style.width="".concat(t,"px"),e.style.display="block",e.muted=!0,e.setAttribute("muted","true"),e.playsInline=!0,e},t.prototype.setupSurface=function(){var t=this;this.surface.onabort=function(){throw"RenderedCameraImpl video surface onabort() called"},this.surface.onerror=function(){throw"RenderedCameraImpl video surface onerror() called"};var e=function(){var r=t.surface.clientWidth,n=t.surface.clientHeight;t.callbacks.onRenderSurfaceReady(r,n),t.surface.removeEventListener("playing",e)};this.surface.addEventListener("playing",e),this.surface.srcObject=this.mediaStream,this.surface.play()},t.create=function(e,r,n,i){return O(this,void 0,void 0,(function(){var o,a;return N(this,(function(s){switch(s.label){case 0:return o=new t(e,r,i),n.aspectRatio?(a={aspectRatio:n.aspectRatio},[4,o.getFirstTrackOrFail().applyConstraints(a)]):[3,2];case 1:s.sent(),s.label=2;case 2:return o.setupSurface(),[2,o]}}))}))},t.prototype.failIfClosed=function(){if(this.isClosed)throw"The RenderedCamera has already been closed."},t.prototype.getFirstTrackOrFail=function(){if(this.failIfClosed(),0===this.mediaStream.getVideoTracks().length)throw"No video tracks found";return this.mediaStream.getVideoTracks()[0]},t.prototype.pause=function(){this.failIfClosed(),this.surface.pause()},t.prototype.resume=function(t){this.failIfClosed();var e=this,r=function(){setTimeout(t,200),e.surface.removeEventListener("playing",r)};this.surface.addEventListener("playing",r),this.surface.play()},t.prototype.isPaused=function(){return this.failIfClosed(),this.surface.paused},t.prototype.getSurface=function(){return this.failIfClosed(),this.surface},t.prototype.getRunningTrackCapabilities=function(){return this.getFirstTrackOrFail().getCapabilities()},t.prototype.getRunningTrackSettings=function(){return this.getFirstTrackOrFail().getSettings()},t.prototype.applyVideoConstraints=function(t){return O(this,void 0,void 0,(function(){return N(this,(function(e){if("aspectRatio"in t)throw"Changing 'aspectRatio' in run-time is not yet supported.";return[2,this.getFirstTrackOrFail().applyConstraints(t)]}))}))},t.prototype.close=function(){if(this.isClosed)return Promise.resolve();var t=this;return new Promise((function(e,r){var n=t.mediaStream.getVideoTracks(),i=n.length,o=0;t.mediaStream.getVideoTracks().forEach((function(r){t.mediaStream.removeTrack(r),r.stop(),++o,o>=i&&(t.isClosed=!0,t.parentElement.removeChild(t.surface),e())}))}))},t.prototype.getCapabilities=function(){return new B(this.getFirstTrackOrFail())},t}(),F=function(){function t(t){this.mediaStream=t}return t.prototype.render=function(t,e,r){return O(this,void 0,void 0,(function(){return N(this,(function(n){return[2,k.create(t,this.mediaStream,e,r)]}))}))},t.create=function(e){return O(this,void 0,void 0,(function(){var r,n;return N(this,(function(i){switch(i.label){case 0:if(!navigator.mediaDevices)throw"navigator.mediaDevices not supported";return r={audio:!1,video:e},[4,navigator.mediaDevices.getUserMedia(r)];case 1:return n=i.sent(),[2,new t(n)]}}))}))},t}(),U=function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(e){o(e)}}function s(t){try{c(n["throw"](t))}catch(e){o(e)}}function c(t){t.done?r(t.value):i(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},j=function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(a=0)),a)try{if(r=1,n&&(i=2&s[0]?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(c){s=[6,c],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},H=function(){function t(){}return t.failIfNotSupported=function(){return U(this,void 0,void 0,(function(){return j(this,(function(e){if(!navigator.mediaDevices)throw"navigator.mediaDevices not supported";return[2,new t]}))}))},t.prototype.create=function(t){return U(this,void 0,void 0,(function(){return j(this,(function(e){return[2,F.create(t)]}))}))},t}(),V=function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(e){o(e)}}function s(t){try{c(n["throw"](t))}catch(e){o(e)}}function c(t){t.done?r(t.value):i(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},z=function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(a=0)),a)try{if(r=1,n&&(i=2&s[0]?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(c){s=[6,c],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},W=function(){function t(){}return t.retrieve=function(){if(navigator.mediaDevices)return t.getCamerasFromMediaDevices();var e=MediaStreamTrack;return MediaStreamTrack&&e.getSources?t.getCamerasFromMediaStreamTrack():t.rejectWithError()},t.rejectWithError=function(){var e=w.unableToQuerySupportedDevices();return t.isHttpsOrLocalhost()||(e=w.insecureContextCameraQueryError()),Promise.reject(e)},t.isHttpsOrLocalhost=function(){if("https:"===location.protocol)return!0;var t=location.host.split(":")[0];return"127.0.0.1"===t||"localhost"===t},t.getCamerasFromMediaDevices=function(){return V(this,void 0,void 0,(function(){var t,e,r,n,i,o,a;return z(this,(function(s){switch(s.label){case 0:return t=function(t){for(var e=t.getVideoTracks(),r=0,n=e;r<n.length;r++){var i=n[r];i.enabled=!1,i.stop(),t.removeTrack(i)}},[4,navigator.mediaDevices.getUserMedia({audio:!1,video:!0})];case 1:return e=s.sent(),[4,navigator.mediaDevices.enumerateDevices()];case 2:for(r=s.sent(),n=[],i=0,o=r;i<o.length;i++)a=o[i],"videoinput"===a.kind&&n.push({id:a.deviceId,label:a.label});return t(e),[2,n]}}))}))},t.getCamerasFromMediaStreamTrack=function(){return new Promise((function(t,e){var r=function(e){for(var r=[],n=0,i=e;n<i.length;n++){var o=i[n];"video"===o.kind&&r.push({id:o.id,label:o.label})}t(r)},n=MediaStreamTrack;n.getSources(r)}))},t}();(function(t){t[t["UNKNOWN"]=0]="UNKNOWN",t[t["NOT_STARTED"]=1]="NOT_STARTED",t[t["SCANNING"]=2]="SCANNING",t[t["PAUSED"]=3]="PAUSED"})(m||(m={}));var G,Y=function(){function t(){this.state=m.NOT_STARTED,this.onGoingTransactionNewState=m.UNKNOWN}return t.prototype.directTransition=function(t){this.failIfTransitionOngoing(),this.validateTransition(t),this.state=t},t.prototype.startTransition=function(t){return this.failIfTransitionOngoing(),this.validateTransition(t),this.onGoingTransactionNewState=t,this},t.prototype.execute=function(){if(this.onGoingTransactionNewState===m.UNKNOWN)throw"Transaction is already cancelled, cannot execute().";var t=this.onGoingTransactionNewState;this.onGoingTransactionNewState=m.UNKNOWN,this.directTransition(t)},t.prototype.cancel=function(){if(this.onGoingTransactionNewState===m.UNKNOWN)throw"Transaction is already cancelled, cannot cancel().";this.onGoingTransactionNewState=m.UNKNOWN},t.prototype.getState=function(){return this.state},t.prototype.failIfTransitionOngoing=function(){if(this.onGoingTransactionNewState!==m.UNKNOWN)throw"Cannot transition to a new state, already under transition"},t.prototype.validateTransition=function(t){switch(this.state){case m.UNKNOWN:throw"Transition from unknown is not allowed";case m.NOT_STARTED:this.failIfNewStateIs(t,[m.PAUSED]);break;case m.SCANNING:break;case m.PAUSED:break}},t.prototype.failIfNewStateIs=function(t,e){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(t===i)throw"Cannot transition from ".concat(this.state," to ").concat(t)}},t}(),X=function(){function t(t){this.stateManager=t}return t.prototype.startTransition=function(t){return this.stateManager.startTransition(t)},t.prototype.directTransition=function(t){this.stateManager.directTransition(t)},t.prototype.getState=function(){return this.stateManager.getState()},t.prototype.canScanFile=function(){return this.stateManager.getState()===m.NOT_STARTED},t.prototype.isScanning=function(){return this.stateManager.getState()!==m.NOT_STARTED},t.prototype.isStrictlyScanning=function(){return this.stateManager.getState()===m.SCANNING},t.prototype.isPaused=function(){return this.stateManager.getState()===m.PAUSED},t}(),$=function(){function t(){}return t.create=function(){return new X(new Y)},t}(),Z=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Z(e,t),e.DEFAULT_WIDTH=300,e.DEFAULT_WIDTH_OFFSET=2,e.FILE_SCAN_MIN_HEIGHT=300,e.FILE_SCAN_HIDDEN_CANVAS_PADDING=100,e.MIN_QR_BOX_SIZE=50,e.SHADED_LEFT=1,e.SHADED_RIGHT=2,e.SHADED_TOP=3,e.SHADED_BOTTOM=4,e.SHADED_REGION_ELEMENT_ID="qr-shaded-region",e.VERBOSE=!1,e.BORDER_SHADER_DEFAULT_COLOR="#ffffff",e.BORDER_SHADER_MATCH_COLOR="rgb(90, 193, 56)",e}(u),q=function(){function t(t,e){this.logger=e,this.fps=Q.SCAN_DEFAULT_FPS,t?(t.fps&&(this.fps=t.fps),this.disableFlip=!0===t.disableFlip,this.qrbox=t.qrbox,this.aspectRatio=t.aspectRatio,this.videoConstraints=t.videoConstraints):this.disableFlip=Q.DEFAULT_DISABLE_FLIP}return t.prototype.isMediaStreamConstraintsValid=function(){return this.videoConstraints?C.isMediaStreamConstraintsValid(this.videoConstraints,this.logger):(this.logger.logError("Empty videoConstraints",!0),!1)},t.prototype.isShadedBoxEnabled=function(){return!g(this.qrbox)},t.create=function(e,r){return new t(e,r)},t}(),K=function(){function t(t,e){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(t))throw"HTML Element with id=".concat(t," not found");var r;this.elementId=t,this.verbose=!1,"boolean"==typeof e?this.verbose=!0===e:e&&(r=e,this.verbose=!0===r.verbose,r.experimentalFeatures),this.logger=new f(this.verbose),this.qrcode=new R(this.getSupportedFormats(e),this.getUseBarCodeDetectorIfSupported(r),this.verbose,this.logger),this.foreverScanTimeout,this.shouldScan=!0,this.stateManagerProxy=$.create()}return t.prototype.start=function(t,e,r,n){var i,o=this;if(!t)throw"cameraIdOrConfig is required";if(!r||"function"!=typeof r)throw"qrCodeSuccessCallback is required and should be a function.";i=n||(this.verbose?this.logger.log:function(){});var a=q.create(e,this.logger);this.clearElement();var s=!1;a.videoConstraints&&(a.isMediaStreamConstraintsValid()?s=!0:this.logger.logError("'videoConstraints' is not valid 'MediaStreamConstraints, it will be ignored.'",!0));var c=s,u=document.getElementById(this.elementId);u.clientWidth?u.clientWidth:Q.DEFAULT_WIDTH;u.style.position="relative",this.shouldScan=!0,this.element=u;var l=this,h=this.stateManagerProxy.startTransition(m.SCANNING);return new Promise((function(e,n){var s=c?a.videoConstraints:l.createVideoConstraints(t);if(!s)return h.cancel(),void n("videoConstraints should be defined");var u={};c&&!a.aspectRatio||(u.aspectRatio=a.aspectRatio);var d={onRenderSurfaceReady:function(t,e){l.setupUi(t,e,a),l.isScanning=!0,l.foreverScan(a,r,i)}};H.failIfNotSupported().then((function(t){t.create(s).then((function(t){return t.render(o.element,u,d).then((function(t){l.renderedCamera=t,h.execute(),e(null)})).catch((function(t){h.cancel(),n(t)}))})).catch((function(t){h.cancel(),n(w.errorGettingUserMedia(t))}))})).catch((function(t){h.cancel(),n(w.cameraStreamingNotSupported())}))}))},t.prototype.pause=function(t){if(!this.stateManagerProxy.isStrictlyScanning())throw"Cannot pause, scanner is not scanning.";this.stateManagerProxy.directTransition(m.PAUSED),this.showPausedState(),(g(t)||!0!==t)&&(t=!1),t&&this.renderedCamera&&this.renderedCamera.pause()},t.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 t=this,e=function(){t.stateManagerProxy.directTransition(m.SCANNING),t.hidePausedState()};this.renderedCamera.isPaused()?this.renderedCamera.resume((function(){e()})):e()},t.prototype.getState=function(){return this.stateManagerProxy.getState()},t.prototype.stop=function(){var t=this;if(!this.stateManagerProxy.isScanning())throw"Cannot stop, scanner is not running or paused.";var e=this.stateManagerProxy.startTransition(m.NOT_STARTED);this.shouldScan=!1,this.foreverScanTimeout&&clearTimeout(this.foreverScanTimeout);var r=function(){if(t.element){var e=document.getElementById(Q.SHADED_REGION_ELEMENT_ID);e&&t.element.removeChild(e)}},n=this;return this.renderedCamera.close().then((function(){return n.renderedCamera=null,n.element&&(n.element.removeChild(n.canvasElement),n.canvasElement=null),r(),n.qrRegion&&(n.qrRegion=null),n.context&&(n.context=null),e.execute(),n.hidePausedState(),n.isScanning=!1,Promise.resolve()}))},t.prototype.scanFile=function(t,e){return this.scanFileV2(t,e).then((function(t){return t.decodedText}))},t.prototype.scanFileV2=function(t,e){var r=this;if(!t||!(t instanceof File))throw"imageFile argument is mandatory and should be instance of File. Use 'event.target.files[0]'.";if(g(e)&&(e=!0),!this.stateManagerProxy.canScanFile())throw"Cannot start file scan - ongoing camera scan";return new Promise((function(n,i){r.possiblyCloseLastScanImageFile(),r.clearElement(),r.lastScanImageFile=URL.createObjectURL(t);var o=new Image;o.onload=function(){var t=o.width,a=o.height,s=document.getElementById(r.elementId),c=s.clientWidth?s.clientWidth:Q.DEFAULT_WIDTH,u=Math.max(s.clientHeight?s.clientHeight:a,Q.FILE_SCAN_MIN_HEIGHT),l=r.computeCanvasDrawConfig(t,a,c,u);if(e){var d=r.createCanvasElement(c,u,"qr-canvas-visible");d.style.display="inline-block",s.appendChild(d);var f=d.getContext("2d");if(!f)throw"Unable to get 2d context from canvas";f.canvas.width=c,f.canvas.height=u,f.drawImage(o,0,0,t,a,l.x,l.y,l.width,l.height)}var g=Q.FILE_SCAN_HIDDEN_CANVAS_PADDING,p=Math.max(o.width,l.width),m=Math.max(o.height,l.height),w=p+2*g,y=m+2*g,E=r.createCanvasElement(w,y);s.appendChild(E);var C=E.getContext("2d");if(!C)throw"Unable to get 2d context from canvas";C.canvas.width=w,C.canvas.height=y,C.drawImage(o,0,0,t,a,g,g,p,m);try{r.qrcode.decodeRobustlyAsync(E).then((function(t){n(h.createFromQrcodeResult(t))})).catch(i)}catch(A){i("QR code parse error, error = ".concat(A))}},o.onerror=i,o.onabort=i,o.onstalled=i,o.onsuspend=i,o.src=URL.createObjectURL(t)}))},t.prototype.clear=function(){this.clearElement()},t.getCameras=function(){return W.retrieve()},t.prototype.getRunningTrackCapabilities=function(){return this.getRenderedCameraOrFail().getRunningTrackCapabilities()},t.prototype.getRunningTrackSettings=function(){return this.getRenderedCameraOrFail().getRunningTrackSettings()},t.prototype.getRunningTrackCameraCapabilities=function(){return this.getRenderedCameraOrFail().getCapabilities()},t.prototype.applyVideoConstraints=function(t){if(!t)throw"videoConstaints is required argument.";if(!C.isMediaStreamConstraintsValid(t,this.logger))throw"invalid videoConstaints passed, check logs for more details";return this.getRenderedCameraOrFail().applyVideoConstraints(t)},t.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},t.prototype.getSupportedFormats=function(t){var e=[n.QR_CODE,n.AZTEC,n.CODABAR,n.CODE_39,n.CODE_93,n.CODE_128,n.DATA_MATRIX,n.MAXICODE,n.ITF,n.EAN_13,n.EAN_8,n.PDF_417,n.RSS_14,n.RSS_EXPANDED,n.UPC_A,n.UPC_E,n.UPC_EAN_EXTENSION];if(!t||"boolean"==typeof t)return e;if(!t.formatsToSupport)return e;if(!Array.isArray(t.formatsToSupport))throw"configOrVerbosityFlag.formatsToSupport should be undefined or an array.";if(0===t.formatsToSupport.length)throw"Atleast 1 formatsToSupport is needed.";for(var r=[],i=0,o=t.formatsToSupport;i<o.length;i++){var a=o[i];s(a)?r.push(a):this.logger.warn("Invalid format: ".concat(a," passed in config, ignoring."))}if(0===r.length)throw"None of formatsToSupport match supported values.";return r},t.prototype.getUseBarCodeDetectorIfSupported=function(t){if(g(t))return!0;if(!g(t.useBarCodeDetectorIfSupported))return!1!==t.useBarCodeDetectorIfSupported;if(g(t.experimentalFeatures))return!0;var e=t.experimentalFeatures;return!!g(e.useBarCodeDetectorIfSupported)||!1!==e.useBarCodeDetectorIfSupported},t.prototype.validateQrboxSize=function(t,e,r){var n=this,i=r.qrbox;this.validateQrboxConfig(i);var o=this.toQrdimensions(t,e,i),a=function(t){if(t<Q.MIN_QR_BOX_SIZE)throw"minimum size of 'config.qrbox' dimension value is"+" ".concat(Q.MIN_QR_BOX_SIZE,"px.")},s=function(e){return e>t&&(n.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."),e=t),e};a(o.width),a(o.height),o.width=s(o.width)},t.prototype.validateQrboxConfig=function(t){if("number"!==typeof t&&"function"!==typeof t&&(void 0===t.width||void 0===t.height))throw"Invalid instance of QrDimensions passed for 'config.qrbox'. Both 'width' and 'height' should be set."},t.prototype.toQrdimensions=function(t,e,r){if("number"===typeof r)return{width:r,height:r};if("function"===typeof r)try{return r(t,e)}catch(n){throw new Error("qrbox config was passed as a function but it failed with unknown error"+n)}return r},t.prototype.setupUi=function(t,e,r){r.isShadedBoxEnabled()&&this.validateQrboxSize(t,e,r);var n=g(r.qrbox)?{width:t,height:e}:r.qrbox;this.validateQrboxConfig(n);var i=this.toQrdimensions(t,e,n);i.height>e&&this.logger.warn("[Html5Qrcode] config.qrbox has height that isgreater than the height of the video stream. Shading will be ignored");var o=r.isShadedBoxEnabled()&&i.height<=e,a={x:0,y:0,width:t,height:e},s=o?this.getShadedRegionBounds(t,e,i):a,c=this.createCanvasElement(s.width,s.height),u={willReadFrequently:!0},l=c.getContext("2d",u);l.canvas.width=s.width,l.canvas.height=s.height,this.element.append(c),o&&this.possiblyInsertShadingElement(this.element,t,e,i),this.createScannerPausedUiElement(this.element),this.qrRegion=s,this.context=l,this.canvasElement=c},t.prototype.createScannerPausedUiElement=function(t){var e=document.createElement("div");e.innerText=w.scannerPaused(),e.style.display="none",e.style.position="absolute",e.style.top="0px",e.style.zIndex="1",e.style.background="rgba(9, 9, 9, 0.46)",e.style.color="#FFECEC",e.style.textAlign="center",e.style.width="100%",t.appendChild(e),this.scannerPausedUiElement=e},t.prototype.scanContext=function(t,e){var r=this;return this.stateManagerProxy.isPaused()?Promise.resolve(!1):this.qrcode.decodeAsync(this.canvasElement).then((function(e){return t(e.text,h.createFromQrcodeResult(e)),r.possiblyUpdateShaders(!0),!0})).catch((function(t){r.possiblyUpdateShaders(!1);var n=w.codeParseError(t);return e(n,d.createFrom(n)),!1}))},t.prototype.foreverScan=function(t,e,r){var n=this;if(this.shouldScan&&this.renderedCamera){var i=this.renderedCamera.getSurface(),o=i.videoWidth/i.clientWidth,a=i.videoHeight/i.clientHeight;if(!this.qrRegion)throw"qrRegion undefined when localMediaStream is ready.";var s=this.qrRegion.width*o,c=this.qrRegion.height*a,u=this.qrRegion.x*o,l=this.qrRegion.y*a;this.context.drawImage(i,u,l,s,c,0,0,this.qrRegion.width,this.qrRegion.height);var h=function(){n.foreverScanTimeout=setTimeout((function(){n.foreverScan(t,e,r)}),n.getTimeoutFps(t.fps))};this.scanContext(e,r).then((function(i){i||!0===t.disableFlip?h():(n.context.translate(n.context.canvas.width,0),n.context.scale(-1,1),n.scanContext(e,r).finally((function(){h()})))})).catch((function(t){n.logger.logError("Error happend while scanning context",t),h()}))}},t.prototype.createVideoConstraints=function(t){if("string"==typeof t)return{deviceId:{exact:t}};if("object"==typeof t){var e="facingMode",r="deviceId",n={user:!0,environment:!0},i="exact",o=function(t){if(t in n)return!0;throw"config has invalid 'facingMode' value = "+"'".concat(t,"'")},a=Object.keys(t);if(1!==a.length)throw"'cameraIdOrConfig' object should have exactly 1 key,"+" if passed as an object, found ".concat(a.length," keys");var s=Object.keys(t)[0];if(s!==e&&s!==r)throw"Only '".concat(e,"' and '").concat(r,"' ")+" are supported for 'cameraIdOrConfig'";if(s!==e){var c=t.deviceId;if("string"==typeof c)return{deviceId:c};if("object"==typeof c){if(i in c)return{deviceId:{exact:c["".concat(i)]}};throw"'deviceId' should be string or object with"+" ".concat(i," as key.")}var u=typeof c;throw"Invalid type of 'deviceId' = ".concat(u)}var l=t.facingMode;if("string"==typeof l){if(o(l))return{facingMode:l}}else{if("object"!=typeof l){var h=typeof l;throw"Invalid type of 'facingMode' = ".concat(h)}if(!(i in l))throw"'facingMode' should be string or object with"+" ".concat(i," as key.");if(o(l["".concat(i)]))return{facingMode:{exact:l["".concat(i)]}}}}var d=typeof t;throw"Invalid type of 'cameraIdOrConfig' = ".concat(d)},t.prototype.computeCanvasDrawConfig=function(t,e,r,n){if(t<=r&&e<=n){var i=(r-t)/2,o=(n-e)/2;return{x:i,y:o,width:t,height:e}}var a=t,s=e;return t>r&&(e*=r/t,t=r),e>n&&(t*=n/e,e=n),this.logger.log("Image downsampled from "+"".concat(a,"X").concat(s)+" to ".concat(t,"X").concat(e,".")),this.computeCanvasDrawConfig(t,e,r,n)},t.prototype.clearElement=function(){if(this.stateManagerProxy.isScanning())throw"Cannot clear while scan is ongoing, close it first.";var t=document.getElementById(this.elementId);t&&(t.innerHTML="")},t.prototype.possiblyUpdateShaders=function(t){this.qrMatch!==t&&(this.hasBorderShaders&&this.borderShaders&&this.borderShaders.length&&this.borderShaders.forEach((function(e){e.style.backgroundColor=t?Q.BORDER_SHADER_MATCH_COLOR:Q.BORDER_SHADER_DEFAULT_COLOR})),this.qrMatch=t)},t.prototype.possiblyCloseLastScanImageFile=function(){this.lastScanImageFile&&(URL.revokeObjectURL(this.lastScanImageFile),this.lastScanImageFile=null)},t.prototype.createCanvasElement=function(t,e,r){var n=t,i=e,o=document.createElement("canvas");return o.style.width="".concat(n,"px"),o.style.height="".concat(i,"px"),o.style.display="none",o.id=g(r)?"qr-canvas":r,o},t.prototype.getShadedRegionBounds=function(t,e,r){if(r.width>t||r.height>e)throw"'config.qrbox' dimensions should not be greater than the dimensions of the root HTML element.";return{x:(t-r.width)/2,y:(e-r.height)/2,width:r.width,height:r.height}},t.prototype.possiblyInsertShadingElement=function(t,e,r,n){if(!(e-n.width<1||r-n.height<1)){var i=document.createElement("div");i.style.position="absolute";var o=(e-n.width)/2,a=(r-n.height)/2;if(i.style.borderLeft="".concat(o,"px solid rgba(0, 0, 0, 0.48)"),i.style.borderRight="".concat(o,"px solid rgba(0, 0, 0, 0.48)"),i.style.borderTop="".concat(a,"px solid rgba(0, 0, 0, 0.48)"),i.style.borderBottom="".concat(a,"px solid rgba(0, 0, 0, 0.48)"),i.style.boxSizing="border-box",i.style.top="0px",i.style.bottom="0px",i.style.left="0px",i.style.right="0px",i.id="".concat(Q.SHADED_REGION_ELEMENT_ID),e-n.width<11||r-n.height<11)this.hasBorderShaders=!1;else{var s=5,c=40;this.insertShaderBorders(i,c,s,-s,null,0,!0),this.insertShaderBorders(i,c,s,-s,null,0,!1),this.insertShaderBorders(i,c,s,null,-s,0,!0),this.insertShaderBorders(i,c,s,null,-s,0,!1),this.insertShaderBorders(i,s,c+s,-s,null,-s,!0),this.insertShaderBorders(i,s,c+s,null,-s,-s,!0),this.insertShaderBorders(i,s,c+s,-s,null,-s,!1),this.insertShaderBorders(i,s,c+s,null,-s,-s,!1),this.hasBorderShaders=!0}t.append(i)}},t.prototype.insertShaderBorders=function(t,e,r,n,i,o,a){var s=document.createElement("div");s.style.position="absolute",s.style.backgroundColor=Q.BORDER_SHADER_DEFAULT_COLOR,s.style.width="".concat(e,"px"),s.style.height="".concat(r,"px"),null!==n&&(s.style.top="".concat(n,"px")),null!==i&&(s.style.bottom="".concat(i,"px")),a?s.style.left="".concat(o,"px"):s.style.right="".concat(o,"px"),this.borderShaders||(this.borderShaders=[]),this.borderShaders.push(s),t.appendChild(s)},t.prototype.showPausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="block"},t.prototype.hidePausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="none"},t.prototype.getTimeoutFps=function(t){return 1e3/t},t}(),J="data:image/svg+xml;base64,",tt=J+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNzEuNjQzIDM3MS42NDMiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDM3MS42NDMgMzcxLjY0MyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZD0iTTEwNS4wODQgMzguMjcxaDE2My43Njh2MjBIMTA1LjA4NHoiLz48cGF0aCBkPSJNMzExLjU5NiAxOTAuMTg5Yy03LjQ0MS05LjM0Ny0xOC40MDMtMTYuMjA2LTMyLjc0My0yMC41MjJWMzBjMC0xNi41NDItMTMuNDU4LTMwLTMwLTMwSDEyNS4wODRjLTE2LjU0MiAwLTMwIDEzLjQ1OC0zMCAzMHYxMjAuMTQzaC04LjI5NmMtMTYuNTQyIDAtMzAgMTMuNDU4LTMwIDMwdjEuMzMzYTI5LjgwNCAyOS44MDQgMCAwIDAgNC42MDMgMTUuOTM5Yy03LjM0IDUuNDc0LTEyLjEwMyAxNC4yMjEtMTIuMTAzIDI0LjA2MXYxLjMzM2MwIDkuODQgNC43NjMgMTguNTg3IDEyLjEwMyAyNC4wNjJhMjkuODEgMjkuODEgMCAwIDAtNC42MDMgMTUuOTM4djEuMzMzYzAgMTYuNTQyIDEzLjQ1OCAzMCAzMCAzMGg4LjMyNGMuNDI3IDExLjYzMSA3LjUwMyAyMS41ODcgMTcuNTM0IDI2LjE3Ny45MzEgMTAuNTAzIDQuMDg0IDMwLjE4NyAxNC43NjggNDUuNTM3YTkuOTg4IDkuOTg4IDAgMCAwIDguMjE2IDQuMjg4IDkuOTU4IDkuOTU4IDAgMCAwIDUuNzA0LTEuNzkzYzQuNTMzLTMuMTU1IDUuNjUtOS4zODggMi40OTUtMTMuOTIxLTYuNzk4LTkuNzY3LTkuNjAyLTIyLjYwOC0xMC43Ni0zMS40aDgyLjY4NWMuMjcyLjQxNC41NDUuODE4LjgxNSAxLjIxIDMuMTQyIDQuNTQxIDkuMzcyIDUuNjc5IDEzLjkxMyAyLjUzNCA0LjU0Mi0zLjE0MiA1LjY3Ny05LjM3MSAyLjUzNS0xMy45MTMtMTEuOTE5LTE3LjIyOS04Ljc4Ny0zNS44ODQgOS41ODEtNTcuMDEyIDMuMDY3LTIuNjUyIDEyLjMwNy0xMS43MzIgMTEuMjE3LTI0LjAzMy0uODI4LTkuMzQzLTcuMTA5LTE3LjE5NC0xOC42NjktMjMuMzM3YTkuODU3IDkuODU3IDAgMCAwLTEuMDYxLS40ODZjLS40NjYtLjE4Mi0xMS40MDMtNC41NzktOS43NDEtMTUuNzA2IDEuMDA3LTYuNzM3IDE0Ljc2OC04LjI3MyAyMy43NjYtNy42NjYgMjMuMTU2IDEuNTY5IDM5LjY5OCA3LjgwMyA0Ny44MzYgMTguMDI2IDUuNzUyIDcuMjI1IDcuNjA3IDE2LjYyMyA1LjY3MyAyOC43MzMtLjQxMyAyLjU4NS0uODI0IDUuMjQxLTEuMjQ1IDcuOTU5LTUuNzU2IDM3LjE5NC0xMi45MTkgODMuNDgzLTQ5Ljg3IDExNC42NjEtNC4yMjEgMy41NjEtNC43NTYgOS44Ny0xLjE5NCAxNC4wOTJhOS45OCA5Ljk4IDAgMCAwIDcuNjQ4IDMuNTUxIDkuOTU1IDkuOTU1IDAgMCAwIDYuNDQ0LTIuMzU4YzQyLjY3Mi0zNi4wMDUgNTAuODAyLTg4LjUzMyA1Ni43MzctMTI2Ljg4OC40MTUtMi42ODQuODIxLTUuMzA5IDEuMjI5LTcuODYzIDIuODM0LTE3LjcyMS0uNDU1LTMyLjY0MS05Ljc3Mi00NC4zNDV6bS0yMzIuMzA4IDQyLjYyYy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi0xLjMzM2MwLTUuNTE0IDQuNDg2LTEwIDEwLTEwaDE1djIxLjMzM2gtMTV6bS0yLjUtNTIuNjY2YzAtNS41MTQgNC40ODYtMTAgMTAtMTBoNy41djIxLjMzM2gtNy41Yy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi0xLjMzM3ptMTcuNSA5My45OTloLTcuNWMtNS41MTQgMC0xMC00LjQ4Ni0xMC0xMHYtMS4zMzNjMC01LjUxNCA0LjQ4Ni0xMCAxMC0xMGg3LjV2MjEuMzMzem0zMC43OTYgMjguODg3Yy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi04LjI3MWg5MS40NTdjLS44NTEgNi42NjgtLjQzNyAxMi43ODcuNzMxIDE4LjI3MWgtODIuMTg4em03OS40ODItMTEzLjY5OGMtMy4xMjQgMjAuOTA2IDEyLjQyNyAzMy4xODQgMjEuNjI1IDM3LjA0IDUuNDQxIDIuOTY4IDcuNTUxIDUuNjQ3IDcuNzAxIDcuMTg4LjIxIDIuMTUtMi41NTMgNS42ODQtNC40NzcgNy4yNTEtLjQ4Mi4zNzgtLjkyOS44LTEuMzM1IDEuMjYxLTYuOTg3IDcuOTM2LTExLjk4MiAxNS41Mi0xNS40MzIgMjIuNjg4aC05Ny41NjRWMzBjMC01LjUxNCA0LjQ4Ni0xMCAxMC0xMGgxMjMuNzY5YzUuNTE0IDAgMTAgNC40ODYgMTAgMTB2MTM1LjU3OWMtMy4wMzItLjM4MS02LjE1LS42OTQtOS4zODktLjkxNC0yNS4xNTktMS42OTQtNDIuMzcgNy43NDgtNDQuODk4IDI0LjY2NnoiLz48cGF0aCBkPSJNMTc5LjEyOSA4My4xNjdoLTI0LjA2YTUgNSAwIDAgMC01IDV2MjQuMDYxYTUgNSAwIDAgMCA1IDVoMjQuMDZhNSA1IDAgMCAwIDUtNVY4OC4xNjdhNSA1IDAgMCAwLTUtNXpNMTcyLjYyOSAxNDIuODZoLTEyLjU2VjEzMC44YTUgNSAwIDEgMC0xMCAwdjE3LjA2MWE1IDUgMCAwIDAgNSA1aDE3LjU2YTUgNSAwIDEgMCAwLTEwLjAwMXpNMjE2LjU2OCA4My4xNjdoLTI0LjA2YTUgNSAwIDAgMC01IDV2MjQuMDYxYTUgNSAwIDAgMCA1IDVoMjQuMDZhNSA1IDAgMCAwIDUtNVY4OC4xNjdhNSA1IDAgMCAwLTUtNXptLTUgMjQuMDYxaC0xNC4wNlY5My4xNjdoMTQuMDZ2MTQuMDYxek0yMTEuNjY5IDEyNS45MzZIMTk3LjQxYTUgNSAwIDAgMC01IDV2MTQuMjU3YTUgNSAwIDAgMCA1IDVoMTQuMjU5YTUgNSAwIDAgMCA1LTV2LTE0LjI1N2E1IDUgMCAwIDAtNS01eiIvPjwvc3ZnPg==",et=J+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1OS4wMTggNTkuMDE4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1OS4wMTggNTkuMDE4IiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJtNTguNzQxIDU0LjgwOS01Ljk2OS02LjI0NGExMC43NCAxMC43NCAwIDAgMCAyLjgyLTcuMjVjMC01Ljk1My00Ljg0My0xMC43OTYtMTAuNzk2LTEwLjc5NlMzNCAzNS4zNjEgMzQgNDEuMzE0IDM4Ljg0MyA1Mi4xMSA0NC43OTYgNTIuMTFjMi40NDEgMCA0LjY4OC0uODI0IDYuNDk5LTIuMTk2bDYuMDAxIDYuMjc3YS45OTguOTk4IDAgMCAwIDEuNDE0LjAzMiAxIDEgMCAwIDAgLjAzMS0xLjQxNHpNMzYgNDEuMzE0YzAtNC44NSAzLjk0Ni04Ljc5NiA4Ljc5Ni04Ljc5NnM4Ljc5NiAzLjk0NiA4Ljc5NiA4Ljc5Ni0zLjk0NiA4Ljc5Ni04Ljc5NiA4Ljc5NlMzNiA0Ni4xNjQgMzYgNDEuMzE0ek0xMC40MzEgMTYuMDg4YzAgMy4wNyAyLjQ5OCA1LjU2OCA1LjU2OSA1LjU2OHM1LjU2OS0yLjQ5OCA1LjU2OS01LjU2OGMwLTMuMDcxLTIuNDk4LTUuNTY5LTUuNTY5LTUuNTY5cy01LjU2OSAyLjQ5OC01LjU2OSA1LjU2OXptOS4xMzggMGMwIDEuOTY4LTEuNjAyIDMuNTY4LTMuNTY5IDMuNTY4cy0zLjU2OS0xLjYwMS0zLjU2OS0zLjU2OCAxLjYwMi0zLjU2OSAzLjU2OS0zLjU2OSAzLjU2OSAxLjYwMSAzLjU2OSAzLjU2OXoiLz48cGF0aCBkPSJtMzAuODgyIDI4Ljk4NyA5LjE4LTEwLjA1NCAxMS4yNjIgMTAuMzIzYTEgMSAwIDAgMCAxLjM1MS0xLjQ3NWwtMTItMTFhMSAxIDAgMCAwLTEuNDE0LjA2M2wtOS43OTQgMTAuNzI3LTQuNzQzLTQuNzQzYTEuMDAzIDEuMDAzIDAgMCAwLTEuMzY4LS4wNDRMNi4zMzkgMzcuNzY4YTEgMSAwIDEgMCAxLjMyMiAxLjUwMWwxNi4zMTMtMTQuMzYyIDcuMzE5IDcuMzE4YS45OTkuOTk5IDAgMSAwIDEuNDE0LTEuNDE0bC0xLjgyNS0xLjgyNHoiLz48cGF0aCBkPSJNMzAgNDYuNTE4SDJ2LTQyaDU0djI4YTEgMSAwIDEgMCAyIDB2LTI5YTEgMSAwIDAgMC0xLTFIMWExIDEgMCAwIDAtMSAxdjQ0YTEgMSAwIDAgMCAxIDFoMjlhMSAxIDAgMSAwIDAtMnoiLz48L3N2Zz4=",rt=J+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NjAgNDYwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0NjAgNDYwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNMjMwIDBDMTAyLjk3NSAwIDAgMTAyLjk3NSAwIDIzMHMxMDIuOTc1IDIzMCAyMzAgMjMwIDIzMC0xMDIuOTc0IDIzMC0yMzBTMzU3LjAyNSAwIDIzMCAwem0zOC4zMzMgMzc3LjM2YzAgOC42NzYtNy4wMzQgMTUuNzEtMTUuNzEgMTUuNzFoLTQzLjEwMWMtOC42NzYgMC0xNS43MS03LjAzNC0xNS43MS0xNS43MVYyMDIuNDc3YzAtOC42NzYgNy4wMzMtMTUuNzEgMTUuNzEtMTUuNzFoNDMuMTAxYzguNjc2IDAgMTUuNzEgNy4wMzMgMTUuNzEgMTUuNzFWMzc3LjM2ek0yMzAgMTU3Yy0yMS41MzkgMC0zOS0xNy40NjEtMzktMzlzMTcuNDYxLTM5IDM5LTM5IDM5IDE3LjQ2MSAzOSAzOS0xNy40NjEgMzktMzkgMzl6Ii8+PC9zdmc+",nt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAQgAAAEIBarqQRAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAE1SURBVDiNfdI7S0NBEAXgLya1otFgpbYSbISAgpXYi6CmiH9KCAiChaVga6OiWPgfRDQ+0itaGVNosXtluWwcuMzePfM4M3sq8lbHBubwg1dc4m1E/J/N4ghDPOIsfk/4xiEao5KX0McFljN4C9d4QTPXuY99jP3DsIoDPGM6BY5i5yI5R7O4q+ImFkJY2DCh3cAH2klyB+9J1xUMMAG7eCh1a+Mr+k48b5diXrFVwwLuS+BJ9MfR7+G0FHOHhTHhnXNWS87VDF4pcnfQK4Ep7XScNLmPTZgURNKKYENYWDpzW1BhscS1WHS8CDgURFJQrWcoF3c13KKbgg1BYQfy8xZWEzTTw1QZbAoKu8FqJnktdu5hcVSHmchiILzzuaDQvjBzV2m8yohCE1jHfPx/xhU+y4G/D75ELlRJsSYAAAAASUVORK5CYII=",it=function(){function t(){}return t.createDefault=function(){return{hasPermission:!1,lastUsedCameraId:null}},t}(),ot=function(){function t(){this.data=it.createDefault();var e=localStorage.getItem(t.LOCAL_STORAGE_KEY);e?this.data=JSON.parse(e):this.reset()}return t.prototype.hasCameraPermissions=function(){return this.data.hasPermission},t.prototype.getLastUsedCameraId=function(){return this.data.lastUsedCameraId},t.prototype.setHasPermission=function(t){this.data.hasPermission=t,this.flush()},t.prototype.setLastUsedCameraId=function(t){this.data.lastUsedCameraId=t,this.flush()},t.prototype.resetLastUsedCameraId=function(){this.data.lastUsedCameraId=null,this.flush()},t.prototype.reset=function(){this.data=it.createDefault(),this.flush()},t.prototype.flush=function(){localStorage.setItem(t.LOCAL_STORAGE_KEY,JSON.stringify(this.data))},t.LOCAL_STORAGE_KEY="HTML5_QRCODE_DATA",t}(),at=function(){function t(){this.infoDiv=document.createElement("div")}return t.prototype.renderInto=function(t){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=E.poweredBy();var e=document.createElement("a");e.innerText="ScanApp",e.href="https://scanapp.org",e.target="new",e.style.color="white",this.infoDiv.appendChild(e);var r=document.createElement("br"),n=document.createElement("br");this.infoDiv.appendChild(r),this.infoDiv.appendChild(n);var i=document.createElement("a");i.innerText=E.reportIssues(),i.href="https://github.com/mebjas/html5-qrcode/issues",i.target="new",i.style.color="white",this.infoDiv.appendChild(i),t.appendChild(this.infoDiv)},t.prototype.show=function(){this.infoDiv.style.display="block"},t.prototype.hide=function(){this.infoDiv.style.display="none"},t}(),st=function(){function t(t,e){this.isShowingInfoIcon=!0,this.onTapIn=t,this.onTapOut=e,this.infoIcon=document.createElement("img")}return t.prototype.renderInto=function(t){var e=this;this.infoIcon.alt="Info icon",this.infoIcon.src=rt,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(t){return e.onHoverIn()},this.infoIcon.onmouseout=function(t){return e.onHoverOut()},this.infoIcon.onclick=function(t){return e.onClick()},t.appendChild(this.infoIcon)},t.prototype.onHoverIn=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="1")},t.prototype.onHoverOut=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="0.6")},t.prototype.onClick=function(){this.isShowingInfoIcon?(this.isShowingInfoIcon=!1,this.onTapIn(),this.infoIcon.src=nt,this.infoIcon.style.opacity="1"):(this.isShowingInfoIcon=!0,this.onTapOut(),this.infoIcon.src=rt,this.infoIcon.style.opacity="0.6")},t}(),ct=function(){function t(){var t=this;this.infoDiv=new at,this.infoIcon=new st((function(){t.infoDiv.show()}),(function(){t.infoDiv.hide()}))}return t.prototype.renderInto=function(t){this.infoDiv.renderInto(t),this.infoIcon.renderInto(t)},t}(),ut=function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(e){o(e)}}function s(t){try{c(n["throw"](t))}catch(e){o(e)}}function c(t){t.done?r(t.value):i(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},lt=function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(a=0)),a)try{if(r=1,n&&(i=2&s[0]?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(c){s=[6,c],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},ht=function(){function t(){}return t.hasPermissions=function(){return ut(this,void 0,void 0,(function(){var t,e,r,n;return lt(this,(function(i){switch(i.label){case 0:return[4,navigator.mediaDevices.enumerateDevices()];case 1:for(t=i.sent(),e=0,r=t;e<r.length;e++)if(n=r[e],"videoinput"===n.kind&&n.label)return[2,!0];return[2,!1]}}))}))},t}(),dt=function(){function t(t){this.supportedScanTypes=this.validateAndReturnScanTypes(t)}return t.prototype.getDefaultScanType=function(){return this.supportedScanTypes[0]},t.prototype.hasMoreThanOneScanType=function(){return this.supportedScanTypes.length>1},t.prototype.isCameraScanRequired=function(){for(var e=0,r=this.supportedScanTypes;e<r.length;e++){var n=r[e];if(t.isCameraScanType(n))return!0}return!1},t.isCameraScanType=function(t){return t===o.SCAN_TYPE_CAMERA},t.isFileScanType=function(t){return t===o.SCAN_TYPE_FILE},t.prototype.validateAndReturnScanTypes=function(t){if(!t||0===t.length)return u.DEFAULT_SUPPORTED_SCAN_TYPE;var e=u.DEFAULT_SUPPORTED_SCAN_TYPE.length;if(t.length>e)throw"Max ".concat(e," values expected for ")+"supportedScanTypes";for(var r=0,n=t;r<n.length;r++){var i=n[r];if(!u.DEFAULT_SUPPORTED_SCAN_TYPE.includes(i))throw"Unsupported scan type ".concat(i)}return t},t}(),ft=function(){function t(){}return t.ALL_ELEMENT_CLASS="html5-qrcode-element",t.CAMERA_PERMISSION_BUTTON_ID="html5-qrcode-button-camera-permission",t.CAMERA_START_BUTTON_ID="html5-qrcode-button-camera-start",t.CAMERA_STOP_BUTTON_ID="html5-qrcode-button-camera-stop",t.TORCH_BUTTON_ID="html5-qrcode-button-torch",t.CAMERA_SELECTION_SELECT_ID="html5-qrcode-select-camera",t.FILE_SELECTION_BUTTON_ID="html5-qrcode-button-file-selection",t.ZOOM_SLIDER_ID="html5-qrcode-input-range-zoom",t.SCAN_TYPE_CHANGE_ANCHOR_ID="html5-qrcode-anchor-scan-type-change",t.TORCH_BUTTON_CLASS_TORCH_ON="html5-qrcode-button-torch-on",t.TORCH_BUTTON_CLASS_TORCH_OFF="html5-qrcode-button-torch-off",t}(),gt=function(){function t(){}return t.createElement=function(t,e){var r=document.createElement(t);return r.id=e,r.classList.add(ft.ALL_ELEMENT_CLASS),"button"===t&&r.setAttribute("type","button"),r},t}(),pt=function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(e){o(e)}}function s(t){try{c(n["throw"](t))}catch(e){o(e)}}function c(t){t.done?r(t.value):i(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))},mt=function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(a=0)),a)try{if(r=1,n&&(i=2&s[0]?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(c){s=[6,c],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},wt=function(){function t(t,e,r){this.isTorchOn=!1,this.torchCapability=t,this.buttonController=e,this.onTorchActionFailureCallback=r}return t.prototype.isTorchEnabled=function(){return this.isTorchOn},t.prototype.flipState=function(){return pt(this,void 0,void 0,(function(){var t,e;return mt(this,(function(r){switch(r.label){case 0:this.buttonController.disable(),t=!this.isTorchOn,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.torchCapability.apply(t)];case 2:return r.sent(),this.updateUiBasedOnLatestSettings(this.torchCapability.value(),t),[3,4];case 3:return e=r.sent(),this.propagateFailure(t,e),this.buttonController.enable(),[3,4];case 4:return[2]}}))}))},t.prototype.updateUiBasedOnLatestSettings=function(t,e){t===e?(this.buttonController.setText(e?y.torchOffButton():y.torchOnButton()),this.isTorchOn=e):this.propagateFailure(e),this.buttonController.enable()},t.prototype.propagateFailure=function(t,e){var r=t?y.torchOnFailedMessage():y.torchOffFailedMessage();e&&(r+="; Error = "+e),this.onTorchActionFailureCallback(r)},t.prototype.reset=function(){this.isTorchOn=!1},t}(),yt=function(){function t(t,e){this.onTorchActionFailureCallback=e,this.torchButton=gt.createElement("button",ft.TORCH_BUTTON_ID),this.torchController=new wt(t,this,e)}return t.prototype.render=function(t,e){var r=this;this.torchButton.innerText=y.torchOnButton(),this.torchButton.style.display=e.display,this.torchButton.style.marginLeft=e.marginLeft;var n=this;this.torchButton.addEventListener("click",(function(t){return pt(r,void 0,void 0,(function(){return mt(this,(function(t){switch(t.label){case 0:return[4,n.torchController.flipState()];case 1:return t.sent(),n.torchController.isTorchEnabled()?(n.torchButton.classList.remove(ft.TORCH_BUTTON_CLASS_TORCH_OFF),n.torchButton.classList.add(ft.TORCH_BUTTON_CLASS_TORCH_ON)):(n.torchButton.classList.remove(ft.TORCH_BUTTON_CLASS_TORCH_ON),n.torchButton.classList.add(ft.TORCH_BUTTON_CLASS_TORCH_OFF)),[2]}}))}))})),t.appendChild(this.torchButton)},t.prototype.updateTorchCapability=function(t){this.torchController=new wt(t,this,this.onTorchActionFailureCallback)},t.prototype.getTorchButton=function(){return this.torchButton},t.prototype.hide=function(){this.torchButton.style.display="none"},t.prototype.show=function(){this.torchButton.style.display="inline-block"},t.prototype.disable=function(){this.torchButton.disabled=!0},t.prototype.enable=function(){this.torchButton.disabled=!1},t.prototype.setText=function(t){this.torchButton.innerText=t},t.prototype.reset=function(){this.torchButton.innerText=y.torchOnButton(),this.torchController.reset()},t.create=function(e,r,n,i){var o=new t(r,i);return o.render(e,n),o},t}(),Et=function(){function t(t,e,r){this.fileBasedScanRegion=this.createFileBasedScanRegion(),this.fileBasedScanRegion.style.display=e?"block":"none",t.appendChild(this.fileBasedScanRegion);var n=document.createElement("label");n.setAttribute("for",this.getFileScanInputId()),n.style.display="inline-block",this.fileBasedScanRegion.appendChild(n),this.fileSelectionButton=gt.createElement("button",ft.FILE_SELECTION_BUTTON_ID),this.setInitialValueToButton(),this.fileSelectionButton.addEventListener("click",(function(t){n.click()})),n.append(this.fileSelectionButton),this.fileScanInput=gt.createElement("input",this.getFileScanInputId()),this.fileScanInput.type="file",this.fileScanInput.accept="image/*",this.fileScanInput.style.display="none",n.appendChild(this.fileScanInput);var i=this;this.fileScanInput.addEventListener("change",(function(t){if(null!=t&&null!=t.target){var e=t.target;if(!e.files||0!==e.files.length){var n=e.files,o=n[0],a=o.name;i.setImageNameToButton(a),r(o)}}}));var o=this.createDragAndDropMessage();this.fileBasedScanRegion.appendChild(o),this.fileBasedScanRegion.addEventListener("dragenter",(function(t){i.fileBasedScanRegion.style.border=i.fileBasedScanRegionActiveBorder(),t.stopPropagation(),t.preventDefault()})),this.fileBasedScanRegion.addEventListener("dragleave",(function(t){i.fileBasedScanRegion.style.border=i.fileBasedScanRegionDefaultBorder(),t.stopPropagation(),t.preventDefault()})),this.fileBasedScanRegion.addEventListener("dragover",(function(t){i.fileBasedScanRegion.style.border=i.fileBasedScanRegionActiveBorder(),t.stopPropagation(),t.preventDefault()})),this.fileBasedScanRegion.addEventListener("drop",(function(t){t.stopPropagation(),t.preventDefault(),i.fileBasedScanRegion.style.border=i.fileBasedScanRegionDefaultBorder();var e=t.dataTransfer;if(e){var n=e.files;if(!n||0===n.length)return;for(var a=!1,s=0;s<n.length;++s){var c=n.item(s);if(c){var u=/image.*/;if(c.type.match(u)){a=!0;var l=c.name;i.setImageNameToButton(l),r(c),o.innerText=y.dragAndDropMessage();break}}}a||(o.innerText=y.dragAndDropMessageOnlyImages())}}))}return t.prototype.hide=function(){this.fileBasedScanRegion.style.display="none",this.fileScanInput.disabled=!0},t.prototype.show=function(){this.fileBasedScanRegion.style.display="block",this.fileScanInput.disabled=!1},t.prototype.isShowing=function(){return"block"===this.fileBasedScanRegion.style.display},t.prototype.resetValue=function(){this.fileScanInput.value="",this.setInitialValueToButton()},t.prototype.createFileBasedScanRegion=function(){var t=document.createElement("div");return t.style.textAlign="center",t.style.margin="auto",t.style.width="80%",t.style.maxWidth="600px",t.style.border=this.fileBasedScanRegionDefaultBorder(),t.style.padding="10px",t.style.marginBottom="10px",t},t.prototype.fileBasedScanRegionDefaultBorder=function(){return"6px dashed #ebebeb"},t.prototype.fileBasedScanRegionActiveBorder=function(){return"6px dashed rgb(153 151 151)"},t.prototype.createDragAndDropMessage=function(){var t=document.createElement("div");return t.innerText=y.dragAndDropMessage(),t.style.fontWeight="400",t},t.prototype.setImageNameToButton=function(t){var e=20;if(t.length>e){var r=t.substring(0,8),n=t.length,i=t.substring(n-8,n);t="".concat(r,"....").concat(i)}var o=y.fileSelectionChooseAnother()+" - "+t;this.fileSelectionButton.innerText=o},t.prototype.setInitialValueToButton=function(){var t=y.fileSelectionChooseImage()+" - "+y.fileSelectionNoImageSelected();this.fileSelectionButton.innerText=t},t.prototype.getFileScanInputId=function(){return"html5-qrcode-private-filescan-input"},t.create=function(e,r,n){var i=new t(e,r,n);return i},t}(),Ct=function(){function t(t){this.selectElement=gt.createElement("select",ft.CAMERA_SELECTION_SELECT_ID),this.cameras=t,this.options=[]}return t.prototype.render=function(t){var e=document.createElement("span");e.style.marginRight="10px";var r=this.cameras.length;if(0===r)throw new Error("No cameras found");if(1===r)e.style.display="none";else{var n=y.selectCamera();e.innerText="".concat(n," (").concat(this.cameras.length,") ")}for(var i=1,o=0,a=this.cameras;o<a.length;o++){var s=a[o],c=s.id,u=null==s.label?c:s.label;u&&""!==u||(u=[y.anonymousCameraPrefix(),i++].join(" "));var l=document.createElement("option");l.value=c,l.innerText=u,this.options.push(l),this.selectElement.appendChild(l)}e.appendChild(this.selectElement),t.appendChild(e)},t.prototype.disable=function(){this.selectElement.disabled=!0},t.prototype.isDisabled=function(){return!0===this.selectElement.disabled},t.prototype.enable=function(){this.selectElement.disabled=!1},t.prototype.getValue=function(){return this.selectElement.value},t.prototype.hasValue=function(t){for(var e=0,r=this.options;e<r.length;e++){var n=r[e];if(n.value===t)return!0}return!1},t.prototype.setValue=function(t){if(!this.hasValue(t))throw new Error("".concat(t," is not present in the camera list."));this.selectElement.value=t},t.prototype.hasSingleItem=function(){return 1===this.cameras.length},t.prototype.numCameras=function(){return this.cameras.length},t.create=function(e,r){var n=new t(r);return n.render(e),n},t}(),At=function(){function t(){this.onChangeCallback=null,this.zoomElementContainer=document.createElement("div"),this.rangeInput=gt.createElement("input",ft.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 t.prototype.render=function(t,e){this.zoomElementContainer.style.display=e?"block":"none",this.zoomElementContainer.style.padding="5px 10px",this.zoomElementContainer.style.textAlign="center",t.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 r=y.zoom();this.rangeText.innerText="".concat(this.rangeInput.value,"x ").concat(r),this.rangeText.style.marginRight="10px";var n=this;this.rangeInput.addEventListener("input",(function(){return n.onValueChange()})),this.rangeInput.addEventListener("change",(function(){return n.onValueChange()})),this.zoomElementContainer.appendChild(this.rangeInput),this.zoomElementContainer.appendChild(this.rangeText)},t.prototype.onValueChange=function(){var t=y.zoom();this.rangeText.innerText="".concat(this.rangeInput.value,"x ").concat(t),this.onChangeCallback&&this.onChangeCallback(parseFloat(this.rangeInput.value))},t.prototype.setValues=function(t,e,r,n){this.rangeInput.min=t.toString(),this.rangeInput.max=e.toString(),this.rangeInput.step=n.toString(),this.rangeInput.value=r.toString(),this.onValueChange()},t.prototype.show=function(){this.zoomElementContainer.style.display="block"},t.prototype.hide=function(){this.zoomElementContainer.style.display="none"},t.prototype.setOnCameraZoomValueChangeCallback=function(t){this.onChangeCallback=t},t.prototype.removeOnCameraZoomValueChangeCallback=function(){this.onChangeCallback=null},t.create=function(e,r){var n=new t;return n.render(e,r),n},t}();function St(t){return{fps:t.fps,qrbox:t.qrbox,aspectRatio:t.aspectRatio,disableFlip:t.disableFlip,videoConstraints:t.videoConstraints}}function vt(t,e){return{formatsToSupport:t.formatsToSupport,useBarCodeDetectorIfSupported:t.useBarCodeDetectorIfSupported,experimentalFeatures:t.experimentalFeatures,verbose:e}}(function(t){t[t["STATUS_DEFAULT"]=0]="STATUS_DEFAULT",t[t["STATUS_SUCCESS"]=1]="STATUS_SUCCESS",t[t["STATUS_WARNING"]=2]="STATUS_WARNING",t[t["STATUS_REQUESTING_PERMISSION"]=3]="STATUS_REQUESTING_PERMISSION"})(G||(G={}));(function(){function t(t,e,r){if(this.lastMatchFound=null,this.cameraScanImage=null,this.fileScanImage=null,this.fileSelectionUi=null,this.elementId=t,this.config=this.createConfig(e),this.verbose=!0===r,!document.getElementById(t))throw"HTML Element with id=".concat(t," not found");this.scanTypeSelector=new dt(this.config.supportedScanTypes),this.currentScanType=this.scanTypeSelector.getDefaultScanType(),this.sectionSwapAllowed=!0,this.logger=new f(this.verbose),this.persistedDataManager=new ot,!0!==e.rememberLastUsedCamera&&this.persistedDataManager.reset()}t.prototype.render=function(t,e){var r=this;this.lastMatchFound=null,this.qrCodeSuccessCallback=function(e,n){if(t)t(e,n);else{if(r.lastMatchFound===e)return;r.lastMatchFound=e,r.setHeaderMessage(y.lastMatch(e),G.STATUS_SUCCESS)}},this.qrCodeErrorCallback=function(t,r){e&&e(t,r)};var n=document.getElementById(this.elementId);if(!n)throw"HTML Element with id=".concat(this.elementId," not found");n.innerHTML="",this.createBasicLayout(n),this.html5Qrcode=new K(this.getScanRegionId(),vt(this.config,this.verbose))},t.prototype.pause=function(t){(g(t)||!0!==t)&&(t=!1),this.getHtml5QrcodeOrFail().pause(t)},t.prototype.resume=function(){this.getHtml5QrcodeOrFail().resume()},t.prototype.getState=function(){return this.getHtml5QrcodeOrFail().getState()},t.prototype.clear=function(){var t=this,e=function(){var e=document.getElementById(t.elementId);e&&(e.innerHTML="",t.resetBasicLayout(e))};return this.html5Qrcode?new Promise((function(r,n){t.html5Qrcode?t.html5Qrcode.isScanning?t.html5Qrcode.stop().then((function(n){t.html5Qrcode?(t.html5Qrcode.clear(),e(),r()):r()})).catch((function(e){t.verbose&&t.logger.logError("Unable to stop qrcode scanner",e),n(e)})):(t.html5Qrcode.clear(),e(),r()):r()})):Promise.resolve()},t.prototype.getRunningTrackCapabilities=function(){return this.getHtml5QrcodeOrFail().getRunningTrackCapabilities()},t.prototype.getRunningTrackSettings=function(){return this.getHtml5QrcodeOrFail().getRunningTrackSettings()},t.prototype.applyVideoConstraints=function(t){return this.getHtml5QrcodeOrFail().applyVideoConstraints(t)},t.prototype.getHtml5QrcodeOrFail=function(){if(!this.html5Qrcode)throw"Code scanner not initialized.";return this.html5Qrcode},t.prototype.createConfig=function(t){return t?(t.fps||(t.fps=u.SCAN_DEFAULT_FPS),t.rememberLastUsedCamera!==!u.DEFAULT_REMEMBER_LAST_CAMERA_USED&&(t.rememberLastUsedCamera=u.DEFAULT_REMEMBER_LAST_CAMERA_USED),t.supportedScanTypes||(t.supportedScanTypes=u.DEFAULT_SUPPORTED_SCAN_TYPE),t):{fps:u.SCAN_DEFAULT_FPS,rememberLastUsedCamera:u.DEFAULT_REMEMBER_LAST_CAMERA_USED,supportedScanTypes:u.DEFAULT_SUPPORTED_SCAN_TYPE}},t.prototype.createBasicLayout=function(t){t.style.position="relative",t.style.padding="0px",t.style.border="1px solid silver",this.createHeader(t);var e=document.createElement("div"),r=this.getScanRegionId();e.id=r,e.style.width="100%",e.style.minHeight="100px",e.style.textAlign="center",t.appendChild(e),dt.isCameraScanType(this.currentScanType)?this.insertCameraScanImageToScanRegion():this.insertFileScanImageToScanRegion();var n=document.createElement("div"),i=this.getDashboardId();n.id=i,n.style.width="100%",t.appendChild(n),this.setupInitialDashboard(n)},t.prototype.resetBasicLayout=function(t){t.style.border="none"},t.prototype.setupInitialDashboard=function(t){this.createSection(t),this.createSectionControlPanel(),this.scanTypeSelector.hasMoreThanOneScanType()&&this.createSectionSwap()},t.prototype.createHeader=function(t){var e=document.createElement("div");e.style.textAlign="left",e.style.margin="0px",t.appendChild(e);var r=new ct;r.renderInto(e);var n=document.createElement("div");n.id=this.getHeaderMessageContainerId(),n.style.display="none",n.style.textAlign="center",n.style.fontSize="14px",n.style.padding="2px 10px",n.style.margin="4px",n.style.borderTop="1px solid #f6f6f6",e.appendChild(n)},t.prototype.createSection=function(t){var e=document.createElement("div");e.id=this.getDashboardSectionId(),e.style.width="100%",e.style.padding="10px 0px 10px 0px",e.style.textAlign="left",t.appendChild(e)},t.prototype.createCameraListUi=function(t,e,r){var n=this;n.showHideScanTypeSwapLink(!1),n.setHeaderMessage(y.cameraPermissionRequesting());var i=function(){r||n.createPermissionButton(t,e)};K.getCameras().then((function(r){n.persistedDataManager.setHasPermission(!0),n.showHideScanTypeSwapLink(!0),n.resetHeaderMessage(),r&&r.length>0?(t.removeChild(e),n.renderCameraSelection(r)):(n.setHeaderMessage(y.noCameraFound(),G.STATUS_WARNING),i())})).catch((function(t){n.persistedDataManager.setHasPermission(!1),r?r.disabled=!1:i(),n.setHeaderMessage(t,G.STATUS_WARNING),n.showHideScanTypeSwapLink(!0)}))},t.prototype.createPermissionButton=function(t,e){var r=this,n=gt.createElement("button",this.getCameraPermissionButtonId());n.innerText=y.cameraPermissionTitle(),n.addEventListener("click",(function(){n.disabled=!0,r.createCameraListUi(t,e,n)})),e.appendChild(n)},t.prototype.createPermissionsUi=function(t,e){var r=this;dt.isCameraScanType(this.currentScanType)&&this.persistedDataManager.hasCameraPermissions()?ht.hasPermissions().then((function(n){n?r.createCameraListUi(t,e):(r.persistedDataManager.setHasPermission(!1),r.createPermissionButton(t,e))})).catch((function(n){r.persistedDataManager.setHasPermission(!1),r.createPermissionButton(t,e)})):this.createPermissionButton(t,e)},t.prototype.createSectionControlPanel=function(){var t=document.getElementById(this.getDashboardSectionId()),e=document.createElement("div");t.appendChild(e);var r=document.createElement("div");r.id=this.getDashboardSectionCameraScanRegionId(),r.style.display=dt.isCameraScanType(this.currentScanType)?"block":"none",e.appendChild(r);var n=document.createElement("div");n.style.textAlign="center",r.appendChild(n),this.scanTypeSelector.isCameraScanRequired()&&this.createPermissionsUi(r,n),this.renderFileScanUi(e)},t.prototype.renderFileScanUi=function(t){var e=dt.isFileScanType(this.currentScanType),r=this,n=function(t){if(!r.html5Qrcode)throw"html5Qrcode not defined";dt.isFileScanType(r.currentScanType)&&(r.setHeaderMessage(y.loadingImage()),r.html5Qrcode.scanFileV2(t,!0).then((function(t){r.resetHeaderMessage(),r.qrCodeSuccessCallback(t.decodedText,t)})).catch((function(t){r.setHeaderMessage(t,G.STATUS_WARNING),r.qrCodeErrorCallback(t,d.createFrom(t))})))};this.fileSelectionUi=Et.create(t,e,n)},t.prototype.renderCameraSelection=function(t){var e=this,r=this,n=document.getElementById(this.getDashboardSectionCameraScanRegionId());n.style.textAlign="center";var i=At.create(n,!1),o=function(t){var r=t.zoomFeature();if(r.isSupported()){i.setOnCameraZoomValueChangeCallback((function(t){r.apply(t)}));var n=1;e.config.defaultZoomValueIfSupported&&(n=e.config.defaultZoomValueIfSupported),n=p(n,r.min(),r.max()),i.setValues(r.min(),r.max(),n,r.step()),i.show()}},a=Ct.create(n,t),s=document.createElement("span"),c=gt.createElement("button",ft.CAMERA_START_BUTTON_ID);c.innerText=y.scanButtonStartScanningText(),s.appendChild(c);var u,l=gt.createElement("button",ft.CAMERA_STOP_BUTTON_ID);l.innerText=y.scanButtonStopScanningText(),l.style.display="none",l.disabled=!0,s.appendChild(l);var h=function(t){t.torchFeature().isSupported()?(u?u.updateTorchCapability(t.torchFeature()):u=yt.create(s,t.torchFeature(),{display:"none",marginLeft:"5px"},(function(t){r.setHeaderMessage(t,G.STATUS_WARNING)})),u.show()):u&&u.hide()};n.appendChild(s);var d=function(t){t||(c.style.display="none"),c.innerText=y.scanButtonStartScanningText(),c.style.opacity="1",c.disabled=!1,t&&(c.style.display="inline-block")};if(c.addEventListener("click",(function(t){c.innerText=y.scanButtonScanningStarting(),a.disable(),c.disabled=!0,c.style.opacity="0.5",e.scanTypeSelector.hasMoreThanOneScanType()&&r.showHideScanTypeSwapLink(!1),r.resetHeaderMessage();var n=a.getValue();r.persistedDataManager.setLastUsedCameraId(n),r.html5Qrcode.start(n,St(r.config),r.qrCodeSuccessCallback,r.qrCodeErrorCallback).then((function(t){l.disabled=!1,l.style.display="inline-block",d(!1);var n=r.html5Qrcode.getRunningTrackCameraCapabilities();!0===e.config.showTorchButtonIfSupported&&h(n),!0===e.config.showZoomSliderIfSupported&&o(n)})).catch((function(t){r.showHideScanTypeSwapLink(!0),a.enable(),d(!0),r.setHeaderMessage(t,G.STATUS_WARNING)}))})),a.hasSingleItem()&&c.click(),l.addEventListener("click",(function(t){if(!r.html5Qrcode)throw"html5Qrcode not defined";l.disabled=!0,r.html5Qrcode.stop().then((function(t){e.scanTypeSelector.hasMoreThanOneScanType()&&r.showHideScanTypeSwapLink(!0),a.enable(),c.disabled=!1,l.style.display="none",c.style.display="inline-block",u&&(u.reset(),u.hide()),i.removeOnCameraZoomValueChangeCallback(),i.hide(),r.insertCameraScanImageToScanRegion()})).catch((function(t){l.disabled=!1,r.setHeaderMessage(t,G.STATUS_WARNING)}))})),r.persistedDataManager.getLastUsedCameraId()){var f=r.persistedDataManager.getLastUsedCameraId();a.hasValue(f)?(a.setValue(f),c.click()):r.persistedDataManager.resetLastUsedCameraId()}},t.prototype.createSectionSwap=function(){var t=this,e=y.textIfCameraScanSelected(),r=y.textIfFileScanSelected(),n=document.getElementById(this.getDashboardSectionId()),i=document.createElement("div");i.style.textAlign="center";var a=gt.createElement("span",this.getDashboardSectionSwapLinkId());a.style.textDecoration="underline",a.style.cursor="pointer",a.innerText=dt.isCameraScanType(this.currentScanType)?e:r,a.addEventListener("click",(function(){t.sectionSwapAllowed?(t.resetHeaderMessage(),t.fileSelectionUi.resetValue(),t.sectionSwapAllowed=!1,dt.isCameraScanType(t.currentScanType)?(t.clearScanRegion(),t.getCameraScanRegion().style.display="none",t.fileSelectionUi.show(),a.innerText=r,t.currentScanType=o.SCAN_TYPE_FILE,t.insertFileScanImageToScanRegion()):(t.clearScanRegion(),t.getCameraScanRegion().style.display="block",t.fileSelectionUi.hide(),a.innerText=e,t.currentScanType=o.SCAN_TYPE_CAMERA,t.insertCameraScanImageToScanRegion(),t.startCameraScanIfPermissionExistsOnSwap()),t.sectionSwapAllowed=!0):t.verbose&&t.logger.logError("Section swap called when not allowed")})),i.appendChild(a),n.appendChild(i)},t.prototype.startCameraScanIfPermissionExistsOnSwap=function(){var t=this,e=this;this.persistedDataManager.hasCameraPermissions()&&ht.hasPermissions().then((function(r){if(r){var n=document.getElementById(e.getCameraPermissionButtonId());if(!n)throw t.logger.logError("Permission button not found, fail;"),"Permission button not found";n.click()}else e.persistedDataManager.setHasPermission(!1)})).catch((function(t){e.persistedDataManager.setHasPermission(!1)}))},t.prototype.resetHeaderMessage=function(){var t=document.getElementById(this.getHeaderMessageContainerId());t.style.display="none"},t.prototype.setHeaderMessage=function(t,e){e||(e=G.STATUS_DEFAULT);var r=this.getHeaderMessageDiv();switch(r.innerText=t,r.style.display="block",e){case G.STATUS_SUCCESS:r.style.background="rgba(106, 175, 80, 0.26)",r.style.color="#477735";break;case G.STATUS_WARNING:r.style.background="rgba(203, 36, 49, 0.14)",r.style.color="#cb2431";break;case G.STATUS_DEFAULT:default:r.style.background="rgba(0, 0, 0, 0)",r.style.color="rgb(17, 17, 17)";break}},t.prototype.showHideScanTypeSwapLink=function(t){this.scanTypeSelector.hasMoreThanOneScanType()&&(!0!==t&&(t=!1),this.sectionSwapAllowed=t,this.getDashboardSectionSwapLink().style.display=t?"inline-block":"none")},t.prototype.insertCameraScanImageToScanRegion=function(){var t=this,e=document.getElementById(this.getScanRegionId());if(this.cameraScanImage)return e.innerHTML="<br>",void e.appendChild(this.cameraScanImage);this.cameraScanImage=new Image,this.cameraScanImage.onload=function(r){e.innerHTML="<br>",e.appendChild(t.cameraScanImage)},this.cameraScanImage.width=64,this.cameraScanImage.style.opacity="0.8",this.cameraScanImage.src=tt,this.cameraScanImage.alt=y.cameraScanAltText()},t.prototype.insertFileScanImageToScanRegion=function(){var t=this,e=document.getElementById(this.getScanRegionId());if(this.fileScanImage)return e.innerHTML="<br>",void e.appendChild(this.fileScanImage);this.fileScanImage=new Image,this.fileScanImage.onload=function(r){e.innerHTML="<br>",e.appendChild(t.fileScanImage)},this.fileScanImage.width=64,this.fileScanImage.style.opacity="0.8",this.fileScanImage.src=et,this.fileScanImage.alt=y.fileScanAltText()},t.prototype.clearScanRegion=function(){var t=document.getElementById(this.getScanRegionId());t.innerHTML=""},t.prototype.getDashboardSectionId=function(){return"".concat(this.elementId,"__dashboard_section")},t.prototype.getDashboardSectionCameraScanRegionId=function(){return"".concat(this.elementId,"__dashboard_section_csr")},t.prototype.getDashboardSectionSwapLinkId=function(){return ft.SCAN_TYPE_CHANGE_ANCHOR_ID},t.prototype.getScanRegionId=function(){return"".concat(this.elementId,"__scan_region")},t.prototype.getDashboardId=function(){return"".concat(this.elementId,"__dashboard")},t.prototype.getHeaderMessageContainerId=function(){return"".concat(this.elementId,"__header_message")},t.prototype.getCameraPermissionButtonId=function(){return ft.CAMERA_PERMISSION_BUTTON_ID},t.prototype.getCameraScanRegion=function(){return document.getElementById(this.getDashboardSectionCameraScanRegionId())},t.prototype.getDashboardSectionSwapLink=function(){return document.getElementById(this.getDashboardSectionSwapLinkId())},t.prototype.getHeaderMessageDiv=function(){return document.getElementById(this.getHeaderMessageContainerId())}})()},bb6f:function(t,e,r){t.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="fb15")}({"00b4":function(t,e,r){"use strict";r("ac1f");var n=r("23e7"),i=r("c65b"),o=r("1626"),a=r("825a"),s=r("577e"),c=function(){var t=!1,e=/[ac]/;return e.exec=function(){return t=!0,/./.exec.apply(this,arguments)},!0===e.test("abc")&&t}(),u=/./.test;n({target:"RegExp",proto:!0,forced:!c},{test:function(t){var e=a(this),r=s(t),n=e.exec;if(!o(n))return i(u,e,r);var c=i(n,e,r);return null!==c&&(a(c),!0)}})},"00ee":function(t,e,r){"use strict";var n=r("b622"),i=n("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},"01b4":function(t,e,r){"use strict";var n=function(){this.head=null,this.tail=null};n.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return null===e&&(this.tail=null),t.item}}},t.exports=n},"0366":function(t,e,r){"use strict";var n=r("4625"),i=r("59ed"),o=r("40d5"),a=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?a(t,e):function(){return t.apply(e,arguments)}}},"04f8":function(t,e,r){"use strict";var n=r("2d00"),i=r("d039"),o=r("da84"),a=o.String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},"0538":function(t,e,r){"use strict";var n=r("e330"),i=r("59ed"),o=r("861d"),a=r("1a2d"),s=r("f36a"),c=r("40d5"),u=Function,l=n([].concat),h=n([].join),d={},f=function(t,e,r){if(!a(d,e)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";d[e]=u("C,a","return new C("+h(n,",")+")")}return d[e](t,r)};t.exports=c?u.bind:function(t){var e=i(this),r=e.prototype,n=s(arguments,1),a=function(){var r=l(n,s(arguments));return this instanceof a?f(e,r.length,r):e.apply(t,r)};return o(r)&&(a.prototype=r),a}},"057f":function(t,e,r){"use strict";var n=r("c6b6"),i=r("fc6a"),o=r("241c").f,a=r("f36a"),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(e){return a(s)}};t.exports.f=function(t){return s&&"Window"===n(t)?c(t):o(i(t))}},"06c5":function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("a630"),r("fb6a"),r("b0c0"),r("d3b7"),r("ac1f"),r("00b4"),r("25f0"),r("3ca3");var n=r("6b75");function i(t,e){if(t){if("string"===typeof t)return Object(n["a"])(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n["a"])(t,e):void 0}}},"06cf":function(t,e,r){"use strict";var n=r("83ab"),i=r("c65b"),o=r("d1e7"),a=r("5c6c"),s=r("fc6a"),c=r("a04b"),u=r("1a2d"),l=r("0cfb"),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=s(t),e=c(e),l)try{return h(t,e)}catch(r){}if(u(t,e))return a(!i(o.f,t,e),t[e])}},"07fa":function(t,e,r){"use strict";var n=r("50c4");t.exports=function(t){return n(t.length)}},"083a":function(t,e,r){"use strict";var n=r("0d51"),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw new i("Cannot delete property "+n(e)+" of "+n(t))}},"0b42":function(t,e,r){"use strict";var n=r("e8b5"),i=r("68ee"),o=r("861d"),a=r("b622"),s=a("species"),c=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,i(e)&&(e===c||n(e.prototype))?e=void 0:o(e)&&(e=e[s],null===e&&(e=void 0))),void 0===e?c:e}},"0b43":function(t,e,r){"use strict";var n=r("04f8");t.exports=n&&!!Symbol["for"]&&!!Symbol.keyFor},"0c47":function(t,e,r){"use strict";var n=r("da84"),i=r("d44e");i(n.JSON,"JSON",!0)},"0cfb":function(t,e,r){"use strict";var n=r("83ab"),i=r("d039"),o=r("cc12");t.exports=!n&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"0d0e":function(t,e,r){"use strict";var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"qrcode-stream-wrapper"},[e("video",{ref:"video",staticClass:"qrcode-stream-camera",class:{"qrcode-stream-camera--hidden":!t.shouldScan},attrs:{autoplay:"",muted:"",playsinline:""},domProps:{muted:!0}}),e("canvas",{directives:[{name:"show",rawName:"v-show",value:!t.shouldScan,expression:"!shouldScan"}],ref:"pauseFrame",staticClass:"qrcode-stream-camera"}),e("canvas",{ref:"trackingLayer",staticClass:"qrcode-stream-overlay"}),e("div",{staticClass:"qrcode-stream-overlay"},[t._t("default")],2)])},i=[],o=(r("a4d3"),r("4de4"),r("14d9"),r("e439"),r("dbb4"),r("b64b"),r("d3b7"),r("159b"),r("a38e"));function a(t,e,r){return e=Object(o["a"])(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var u=r("c7eb"),l=r("1da1"),h=(r("caad"),r("d81d"),r("e6cf"),r("a180")),d=r("3835"),f=r("d4ec"),g=r("bee2"),p=(r("e260"),r("2532"),r("3ca3"),r("ddb0"),r("2b3d"),r("bf19"),r("9861"),r("88a7"),r("271a"),r("5494"),r("1cc0")),m=r("c036"),w=r("53ca"),y=(r("99af"),r("7db0"),r("fb6a"),r("b0c0"),r("e9c4"),r("0eb6"),r("b7ef"),r("8bd4"),r("d9e2"),r("13d5"),r("4ec9"),r("cca6"),r("ac1f"),r("25f0"),r("8a79"),r("466d"),!0),E=!0;function C(t,e,r){var n=t.match(e);return n&&n.length>=r&&parseInt(n[r],10)}function A(){if("object"===("undefined"===typeof window?"undefined":Object(w["a"])(window))){if(y)return;"undefined"!==typeof console&&"function"===typeof console.log&&console.log.apply(console,arguments)}}function S(t,e){E&&console.warn(t+" is deprecated, please use "+e+" instead.")}function v(t){var e={browser:null,version:null};if("undefined"===typeof t||!t.navigator)return e.browser="Not a browser.",e;var r=t.navigator;if(r.mozGetUserMedia)e.browser="firefox",e.version=C(r.userAgent,/Firefox\/(\d+)\./,1);else if(r.webkitGetUserMedia||!1===t.isSecureContext&&t.webkitRTCPeerConnection&&!t.RTCIceGatherer)e.browser="chrome",e.version=C(r.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.mediaDevices&&r.userAgent.match(/Edge\/(\d+).(\d+)$/))e.browser="edge",e.version=C(r.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!t.RTCPeerConnection||!r.userAgent.match(/AppleWebKit\/(\d+)\./))return e.browser="Not a supported browser.",e;e.browser="safari",e.version=C(r.userAgent,/AppleWebKit\/(\d+)\./,1),e.supportsUnifiedPlan=t.RTCRtpTransceiver&&"currentDirection"in t.RTCRtpTransceiver.prototype}return e}function b(t){return"[object Object]"===Object.prototype.toString.call(t)}function I(t){return b(t)?Object.keys(t).reduce((function(e,r){var n=b(t[r]),i=n?I(t[r]):t[r],o=n&&!Object.keys(i).length;return void 0===i||o?e:Object.assign(e,a({},r,i))}),{}):t}var _=A;function T(t){var e=t&&t.navigator;if(e.mediaDevices){var r=v(t),n=function(t){if("object"!==Object(w["a"])(t)||t.mandatory||t.optional)return t;var e={};return Object.keys(t).forEach((function(r){if("require"!==r&&"advanced"!==r&&"mediaSource"!==r){var n="object"===Object(w["a"])(t[r])?t[r]:{ideal:t[r]};void 0!==n.exact&&"number"===typeof n.exact&&(n.min=n.max=n.exact);var i=function(t,e){return t?t+e.charAt(0).toUpperCase()+e.slice(1):"deviceId"===e?"sourceId":e};if(void 0!==n.ideal){e.optional=e.optional||[];var o={};"number"===typeof n.ideal?(o[i("min",r)]=n.ideal,e.optional.push(o),o={},o[i("max",r)]=n.ideal,e.optional.push(o)):(o[i("",r)]=n.ideal,e.optional.push(o))}void 0!==n.exact&&"number"!==typeof n.exact?(e.mandatory=e.mandatory||{},e.mandatory[i("",r)]=n.exact):["min","max"].forEach((function(t){void 0!==n[t]&&(e.mandatory=e.mandatory||{},e.mandatory[i(t,r)]=n[t])}))}})),t.advanced&&(e.optional=(e.optional||[]).concat(t.advanced)),e},i=function(t,i){if(r.version>=61)return i(t);if(t=JSON.parse(JSON.stringify(t)),t&&"object"===Object(w["a"])(t.audio)){var o=function(t,e,r){e in t&&!(r in t)&&(t[r]=t[e],delete t[e])};t=JSON.parse(JSON.stringify(t)),o(t.audio,"autoGainControl","googAutoGainControl"),o(t.audio,"noiseSuppression","googNoiseSuppression"),t.audio=n(t.audio)}if(t&&"object"===Object(w["a"])(t.video)){var a=t.video.facingMode;a=a&&("object"===Object(w["a"])(a)?a:{ideal:a});var s,c=r.version<66;if(a&&("user"===a.exact||"environment"===a.exact||"user"===a.ideal||"environment"===a.ideal)&&(!e.mediaDevices.getSupportedConstraints||!e.mediaDevices.getSupportedConstraints().facingMode||c))if(delete t.video.facingMode,"environment"===a.exact||"environment"===a.ideal?s=["back","rear"]:"user"!==a.exact&&"user"!==a.ideal||(s=["front"]),s)return e.mediaDevices.enumerateDevices().then((function(e){e=e.filter((function(t){return"videoinput"===t.kind}));var r=e.find((function(t){return s.some((function(e){return t.label.toLowerCase().includes(e)}))}));return!r&&e.length&&s.includes("back")&&(r=e[e.length-1]),r&&(t.video.deviceId=a.exact?{exact:r.deviceId}:{ideal:r.deviceId}),t.video=n(t.video),_("chrome: "+JSON.stringify(t)),i(t)}));t.video=n(t.video)}return _("chrome: "+JSON.stringify(t)),i(t)},o=function(t){return r.version>=64?t:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[t.name]||t.name,message:t.message,constraint:t.constraint||t.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},a=function(t,r,n){i(t,(function(t){e.webkitGetUserMedia(t,r,(function(t){n&&n(o(t))}))}))};if(e.getUserMedia=a.bind(e),e.mediaDevices.getUserMedia){var s=e.mediaDevices.getUserMedia.bind(e.mediaDevices);e.mediaDevices.getUserMedia=function(t){return i(t,(function(t){return s(t).then((function(e){if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach((function(t){t.stop()})),new DOMException("","NotFoundError");return e}),(function(t){return Promise.reject(o(t))}))}))}}}}function R(t){var e=t&&t.navigator,r=function(t){return{name:{PermissionDeniedError:"NotAllowedError"}[t.name]||t.name,message:t.message,constraint:t.constraint,toString:function(){return this.name}}},n=e.mediaDevices.getUserMedia.bind(e.mediaDevices);e.mediaDevices.getUserMedia=function(t){return n(t).catch((function(t){return Promise.reject(r(t))}))}}function D(t){var e=v(t),r=t&&t.navigator,n=t&&t.MediaStreamTrack;if(r.getUserMedia=function(t,e,n){S("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),r.mediaDevices.getUserMedia(t).then(e,n)},!(e.version>55&&"autoGainControl"in r.mediaDevices.getSupportedConstraints())){var i=function(t,e,r){e in t&&!(r in t)&&(t[r]=t[e],delete t[e])},o=r.mediaDevices.getUserMedia.bind(r.mediaDevices);if(r.mediaDevices.getUserMedia=function(t){return"object"===Object(w["a"])(t)&&"object"===Object(w["a"])(t.audio)&&(t=JSON.parse(JSON.stringify(t)),i(t.audio,"autoGainControl","mozAutoGainControl"),i(t.audio,"noiseSuppression","mozNoiseSuppression")),o(t)},n&&n.prototype.getSettings){var a=n.prototype.getSettings;n.prototype.getSettings=function(){var t=a.apply(this,arguments);return i(t,"mozAutoGainControl","autoGainControl"),i(t,"mozNoiseSuppression","noiseSuppression"),t}}if(n&&n.prototype.applyConstraints){var s=n.prototype.applyConstraints;n.prototype.applyConstraints=function(t){return"audio"===this.kind&&"object"===Object(w["a"])(t)&&(t=JSON.parse(JSON.stringify(t)),i(t,"autoGainControl","mozAutoGainControl"),i(t,"noiseSuppression","mozNoiseSuppression")),s.apply(this,[t])}}}}r("a434");function O(t){var e=t&&t.navigator;if(e.mediaDevices&&e.mediaDevices.getUserMedia){var r=e.mediaDevices,n=r.getUserMedia.bind(r);e.mediaDevices.getUserMedia=function(t){return n(N(t))}}!e.getUserMedia&&e.mediaDevices&&e.mediaDevices.getUserMedia&&(e.getUserMedia=function(t,r,n){e.mediaDevices.getUserMedia(t).then(r,n)}.bind(e))}function N(t){return t&&void 0!==t.video?Object.assign({},t,{video:I(t.video)}):t}var M=function(t){var e=!1,r=void 0;return function(){return e||(r=t.apply(void 0,arguments),e=!0),r}},P=M((function(){var t=v(window),e=t.browser;switch(e){case"chrome":T(window);break;case"firefox":D(window);break;case"edge":R(window);break;case"safari":O(window);break;default:throw new p["c"]}})),L=function(){function t(e,r){Object(f["a"])(this,t),this.videoEl=e,this.stream=r}return Object(g["a"])(t,[{key:"stop",value:function(){var t=this;this.videoEl.srcObject=null,this.stream.getTracks().forEach((function(e){t.stream.removeTrack(e),e.stop()}))}},{key:"getCapabilities",value:function(){var t,e,r=this.stream.getVideoTracks(),n=Object(d["a"])(r,1),i=n[0];return null!==(t=null===i||void 0===i||null===(e=i.getCapabilities)||void 0===e?void 0:e.call(i))&&void 0!==t?t:{}}}])}(),x=function(){var t=Object(l["a"])(Object(u["a"])().mark((function t(e){var r,n,i,o;return Object(u["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=["OBS Virtual Camera","OBS-Camera","Desk View Camera","Schreibtischansicht-Kamera","Caméra Desk View","Fotocamera di Panoramica Scrivania","Rückseitige Ultra-Weitwinkelkamera","Rückseitige Telefotokamera","Rückseitige Dual-Weitwinkelkamera","Rückseitige Triple-Kamera","Back Dual Wide Camera","Back Triple Camera","Back Ultra Wide Camera","Zadní ultra širokoúhlý fotoaparát","Stolní kamera","Ultrabrede camera aan voorzijde","Front Ultra Wide Camera"],t.next=3,navigator.mediaDevices.enumerateDevices();case 3:if(n=t.sent.filter((function(t){var e=t.kind;return"videoinput"===e})).filter((function(t){var e=t.label;return!r.includes(e)})).filter((function(t){var e=t.label;return!e.includes("infrared")})),!(n.length>2)){t.next=16;break}i=n[0],o=n[n.length-1],t.t0=e,t.next="auto"===t.t0?10:"rear"===t.t0?11:"front"===t.t0?12:13;break;case 10:return t.abrupt("return",{deviceId:{exact:o.deviceId}});case 11:return t.abrupt("return",{deviceId:{exact:o.deviceId}});case 12:return t.abrupt("return",{deviceId:{exact:i.deviceId}});case 13:return t.abrupt("return",void 0);case 14:t.next=23;break;case 16:t.t1=e,t.next="auto"===t.t1?19:"rear"===t.t1?20:"front"===t.t1?21:22;break;case 19:return t.abrupt("return",{facingMode:{ideal:"environment"}});case 20:return t.abrupt("return",{facingMode:{exact:"environment"}});case 21:return t.abrupt("return",{facingMode:{exact:"user"}});case 22:return t.abrupt("return",void 0);case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),B=function(t,e){return k.apply(this,arguments)};function k(){return k=Object(l["a"])(Object(u["a"])().mark((function t(e,r){var n,i,o,a,s,l,h,f,g;return Object(u["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=r.camera,o=r.torch,!0===window.isSecureContext){t.next=3;break}throw new p["b"];case 3:if(void 0!==(null===(n=navigator)||void 0===n||null===(n=n.mediaDevices)||void 0===n?void 0:n.getUserMedia)){t.next=5;break}throw new p["c"];case 5:return t.next=7,P();case 7:return t.t0=c,t.t1={width:{min:360,ideal:640,max:1920},height:{min:240,ideal:480,max:1080}},t.next=11,x(i);case 11:return t.t2=t.sent,t.t3=(0,t.t0)(t.t1,t.t2),a={audio:!1,video:t.t3},t.next=16,navigator.mediaDevices.getUserMedia(a);case 16:return s=t.sent,void 0!==e.srcObject?e.srcObject=s:void 0!==e.mozSrcObject?e.mozSrcObject=s:window.URL.createObjectURL?e.src=window.URL.createObjectURL(s):window.webkitURL?e.src=window.webkitURL.createObjectURL(s):e.src=s,t.next=20,Object(m["a"])(e,"loadeddata");case 20:return t.next=22,Object(m["b"])(500);case 22:return o&&(l=s.getVideoTracks(),h=Object(d["a"])(l,1),f=h[0],g=f.getCapabilities(),g.torch?f.applyConstraints({advanced:[{torch:!0}]}):console.warn("device does not support torch capability")),t.abrupt("return",new L(e,s));case 24:case"end":return t.stop()}}),t)}))),k.apply(this,arguments)}var F=r("b3af"),U={name:"qrcode-stream",mixins:[F["a"]],props:{camera:{type:String,default:"auto",validator:function(t){return["auto","rear","front","off"].includes(t)}},torch:{type:Boolean,default:!1},track:{type:Function},formats:{type:Array,default:function(){return["qr_code"]}}},data:function(){return{cameraInstance:null,destroyed:!1}},computed:{shouldStream:function(){return!1===this.destroyed&&"off"!==this.camera},shouldScan:function(){return!0===this.shouldStream&&null!==this.cameraInstance},scanInterval:function(){return void 0===this.track?500:40}},watch:{shouldStream:function(t){if(!t){var e=this.$refs.pauseFrame,r=e.getContext("2d"),n=this.$refs.video;e.width=n.videoWidth,e.height=n.videoHeight,r.drawImage(n,0,0,n.videoWidth,n.videoHeight)}},shouldScan:function(t){t&&(this.clearCanvas(this.$refs.pauseFrame),this.clearCanvas(this.$refs.trackingLayer),this.startScanning())},torch:function(){this.init()},camera:function(){this.init()}},mounted:function(){this.init()},beforeDestroy:function(){this.beforeResetCamera(),this.destroyed=!0},methods:{init:function(){var t=this,e=Object(l["a"])(Object(u["a"])().mark((function e(){var r;return Object(u["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.beforeResetCamera(),"off"!==t.camera){e.next=6;break}return t.cameraInstance=null,e.abrupt("return",{capabilities:{}});case 6:return e.next=8,B(t.$refs.video,{camera:t.camera,torch:t.torch});case 8:return t.cameraInstance=e.sent,r=t.cameraInstance.getCapabilities(),t.destroyed&&t.cameraInstance.stop(),e.abrupt("return",{capabilities:r});case 12:case"end":return e.stop()}}),e)})))();this.$emit("init",e)},startScanning:function(){var t=this,e=function(e){t.onDetect(Promise.resolve(e))};Object(h["a"])(this.$refs.video,{detectHandler:e,locateHandler:this.onLocate,minDelay:this.scanInterval,formats:this.formats})},beforeResetCamera:function(){null!==this.cameraInstance&&(this.cameraInstance.stop(),this.cameraInstance=null)},onLocate:function(t){var e=this.$refs.trackingLayer,r=this.$refs.video;if(void 0!==e)if(t.length>0&&void 0!==this.track&&void 0!==r){var n=r.offsetWidth,i=r.offsetHeight,o=r.videoWidth,a=r.videoHeight,s=Math.max(n/o,i/a),u=o*s,l=a*s,h=u/o,d=l/a,f=(n-u)/2,g=(i-l)/2,p=function(t){var e=t.x,r=t.y;return{x:Math.floor(e*h),y:Math.floor(r*d)}},m=function(t){var e=t.x,r=t.y;return{x:Math.floor(e+f),y:Math.floor(r+g)}},w=t.map((function(t){var e=t.boundingBox,r=t.cornerPoints,n=m(p({x:e.x,y:e.y})),i=n.x,o=n.y,a=p({x:e.width,y:e.height}),s=a.x,u=a.y;return c(c({},t),{},{cornerPoints:r.map((function(t){return m(p(t))})),boundingBox:DOMRectReadOnly.fromRect({x:i,y:o,width:s,height:u})})}));e.width=r.offsetWidth,e.height=r.offsetHeight;var y=e.getContext("2d");this.track(w,y)}else this.clearCanvas(e)},repaintTrackingLayer:function(t,e,r){var n=this,i=e.getContext("2d");window.requestAnimationFrame((function(){e.width=displayWidth,e.height=displayHeight,n.trackRepaintFunction(coordinatesAdjusted,i)}))},clearCanvas:function(t){var e=t.getContext("2d");e.clearRect(0,0,t.width,t.height)}}},j=U,H=(r("e848"),r("2877")),V=Object(H["a"])(j,n,i,!1,null,"0ee88866",null);e["a"]=V.exports},"0d26":function(t,e,r){"use strict";var n=r("e330"),i=Error,o=n("".replace),a=function(t){return String(new i(t).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,c=s.test(a);t.exports=function(t,e){if(c&&"string"==typeof t&&!i.prepareStackTrace)while(e--)t=o(t,s,"");return t}},"0d51":function(t,e,r){"use strict";var n=String;t.exports=function(t){try{return n(t)}catch(e){return"Object"}}},"0eb6":function(t,e,r){"use strict";var n=r("23e7"),i=r("7c37"),o=r("d066"),a=r("d039"),s=r("7c73"),c=r("5c6c"),u=r("9bf2").f,l=r("cb2d"),h=r("edd0"),d=r("1a2d"),f=r("19aa"),g=r("825a"),p=r("aa1f"),m=r("e391"),w=r("cf98"),y=r("0d26"),E=r("69f3"),C=r("83ab"),A=r("c430"),S="DOMException",v="DATA_CLONE_ERR",b=o("Error"),I=o(S)||function(){try{var t=o("MessageChannel")||i("worker_threads").MessageChannel;(new t).port1.postMessage(new WeakMap)}catch(e){if(e.name===v&&25===e.code)return e.constructor}}(),_=I&&I.prototype,T=b.prototype,R=E.set,D=E.getterFor(S),O="stack"in new b(S),N=function(t){return d(w,t)&&w[t].m?w[t].c:0},M=function(){f(this,P);var t=arguments.length,e=m(t<1?void 0:arguments[0]),r=m(t<2?void 0:arguments[1],"Error"),n=N(r);if(R(this,{type:S,name:r,message:e,code:n}),C||(this.name=r,this.message=e,this.code=n),O){var i=new b(e);i.name=S,u(this,"stack",c(1,y(i.stack,1)))}},P=M.prototype=s(T),L=function(t){return{enumerable:!0,configurable:!0,get:t}},x=function(t){return L((function(){return D(this)[t]}))};C&&(h(P,"code",x("code")),h(P,"message",x("message")),h(P,"name",x("name"))),u(P,"constructor",c(1,M));var B=a((function(){return!(new I instanceof b)})),k=B||a((function(){return T.toString!==p||"2: 1"!==String(new I(1,2))})),F=B||a((function(){return 25!==new I(1,"DataCloneError").code})),U=B||25!==I[v]||25!==_[v],j=A?k||F||U:B;n({global:!0,constructor:!0,forced:j},{DOMException:j?M:I});var H=o(S),V=H.prototype;for(var z in k&&(A||I===H)&&l(V,"toString",p),F&&C&&I===H&&h(V,"code",L((function(){return N(g(this).name)}))),w)if(d(w,z)){var W=w[z],G=W.s,Y=c(6,W.c);d(H,G)||u(H,G,Y),d(V,G)||u(V,G,Y)}},"107c":function(t,e,r){"use strict";var n=r("d039"),i=r("da84"),o=i.RegExp;t.exports=n((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},"131a":function(t,e,r){"use strict";var n=r("23e7"),i=r("d2bb");n({target:"Object",stat:!0},{setPrototypeOf:i})},"13d2":function(t,e,r){"use strict";var n=r("e330"),i=r("d039"),o=r("1626"),a=r("1a2d"),s=r("83ab"),c=r("5e77").CONFIGURABLE,u=r("8925"),l=r("69f3"),h=l.enforce,d=l.get,f=String,g=Object.defineProperty,p=n("".slice),m=n("".replace),w=n([].join),y=s&&!i((function(){return 8!==g((function(){}),"length",{value:8}).length})),E=String(String).split("String"),C=t.exports=function(t,e,r){"Symbol("===p(f(e),0,7)&&(e="["+m(f(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||c&&t.name!==e)&&(s?g(t,"name",{value:e,configurable:!0}):t.name=e),y&&r&&a(r,"arity")&&t.length!==r.arity&&g(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var n=h(t);return a(n,"source")||(n.source=w(E,"string"==typeof e?e:"")),t};Function.prototype.toString=C((function(){return o(this)&&d(this).source||u(this)}),"toString")},"13d5":function(t,e,r){"use strict";var n=r("23e7"),i=r("d58f").left,o=r("a640"),a=r("2d00"),s=r("605d"),c=!s&&a>79&&a<83,u=c||!o("reduce");n({target:"Array",proto:!0,forced:u},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},"14c3":function(t,e,r){"use strict";var n=r("c65b"),i=r("825a"),o=r("1626"),a=r("c6b6"),s=r("9263"),c=TypeError;t.exports=function(t,e){var r=t.exec;if(o(r)){var u=n(r,t,e);return null!==u&&i(u),u}if("RegExp"===a(t))return n(s,t,e);throw new c("RegExp#exec called on incompatible receiver")}},"14d9":function(t,e,r){"use strict";var n=r("23e7"),i=r("7b0b"),o=r("07fa"),a=r("3a34"),s=r("3511"),c=r("d039"),u=c((function(){return 4294967297!==[].push.call({length:4294967296},1)})),l=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},h=u||!l();n({target:"Array",proto:!0,arity:1,forced:h},{push:function(t){var e=i(this),r=o(e),n=arguments.length;s(r+n);for(var c=0;c<n;c++)e[r]=arguments[c],r++;return a(e,r),r}})},"14e5":function(t,e,r){"use strict";var n=r("23e7"),i=r("c65b"),o=r("59ed"),a=r("f069"),s=r("e667"),c=r("2266"),u=r("5eed");n({target:"Promise",stat:!0,forced:u},{all:function(t){var e=this,r=a.f(e),n=r.resolve,u=r.reject,l=s((function(){var r=o(e.resolve),a=[],s=0,l=1;c(t,(function(t){var o=s++,c=!1;l++,i(r,e,t).then((function(t){c||(c=!0,a[o]=t,--l||n(a))}),u)})),--l||n(a)}));return l.error&&u(l.value),r.promise}})},"157a":function(t,e,r){"use strict";var n=r("da84"),i=r("83ab"),o=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!i)return n[t];var e=o(n,t);return e&&e.value}},"159b":function(t,e,r){"use strict";var n=r("da84"),i=r("fdbc"),o=r("785a"),a=r("17c2"),s=r("9112"),c=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a)}catch(e){t.forEach=a}};for(var u in i)i[u]&&c(n[u]&&n[u].prototype);c(o)},1626:function(t,e,r){"use strict";var n="object"==typeof document&&document.all;t.exports="undefined"==typeof n&&void 0!==n?function(t){return"function"==typeof t||t===n}:function(t){return"function"==typeof t}},1787:function(t,e,r){"use strict";var n=r("861d");t.exports=function(t){return n(t)||null===t}},"17c2":function(t,e,r){"use strict";var n=r("b727").forEach,i=r("a640"),o=i("forEach");t.exports=o?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"19aa":function(t,e,r){"use strict";var n=r("3a9b"),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new i("Incorrect invocation")}},"1a2d":function(t,e,r){"use strict";var n=r("e330"),i=r("7b0b"),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},"1be4":function(t,e,r){"use strict";var n=r("d066");t.exports=n("document","documentElement")},"1c7e":function(t,e,r){"use strict";var n=r("b622"),i=n("iterator"),o=!1;try{var a=0,s={next:function(){return{done:!!a++}},return:function(){o=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(c){}t.exports=function(t,e){try{if(!e&&!o)return!1}catch(c){return!1}var r=!1;try{var n={};n[i]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(c){}return r}},"1cc0":function(t,e,r){"use strict";r.d(e,"a",(function(){return m})),r.d(e,"c",(function(){return w})),r.d(e,"b",(function(){return y}));var n=r("bee2"),i=r("d4ec");r("4ae1"),r("3410"),r("1f68"),r("131a");function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}r("d9e2");var s=r("53ca");function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t,e){if(e&&("object"===Object(s["a"])(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function l(t,e,r){return e=o(e),u(t,a()?Reflect.construct(e,r||[],o(t).constructor):e.apply(t,r))}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function d(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}r("e260"),r("4ec9"),r("d3b7"),r("3ca3"),r("ddb0"),r("25f0");function f(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"===typeof t}}r("14d9");function g(t,e,r){if(a())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var i=new(t.bind.apply(t,n));return r&&h(i,r.prototype),i}function p(t){var e="function"===typeof Map?new Map:void 0;return p=function(t){if(null===t||!f(t))return t;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return g(t,arguments,o(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,t)},p(t)}r("b0c0");var m=function(t){function e(){var t;return Object(i["a"])(this,e),t=l(this,e,["can't process cross-origin image"]),t.name="DropImageFetchError",t}return d(e,t),Object(n["a"])(e)}(p(Error)),w=function(t){function e(){var t;return Object(i["a"])(this,e),t=l(this,e,["this browser has no Stream API support"]),t.name="StreamApiNotSupportedError",t}return d(e,t),Object(n["a"])(e)}(p(Error)),y=function(t){function e(){var t;return Object(i["a"])(this,e),t=l(this,e,["camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."]),t.name="InsecureContextError",t}return d(e,t),Object(n["a"])(e)}(p(Error))},"1cdc":function(t,e,r){"use strict";var n=r("342f");t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},"1d80":function(t,e,r){"use strict";var n=r("7234"),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},"1da1":function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("d3b7"),r("e6cf");function n(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,c,"next",t)}function c(t){n(a,i,o,s,c,"throw",t)}s(void 0)}))}}},"1dde":function(t,e,r){"use strict";var n=r("d039"),i=r("b622"),o=r("2d00"),a=i("species");t.exports=function(t){return o>=51||!n((function(){var e=[],r=e.constructor={};return r[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"1f68":function(t,e,r){"use strict";var n=r("83ab"),i=r("edd0"),o=r("861d"),a=r("1787"),s=r("7b0b"),c=r("1d80"),u=Object.getPrototypeOf,l=Object.setPrototypeOf,h=Object.prototype,d="__proto__";if(n&&u&&l&&!(d in h))try{i(h,d,{configurable:!0,get:function(){return u(s(this))},set:function(t){var e=c(this);a(t)&&o(e)&&l(e,t)}})}catch(f){}},2266:function(t,e,r){"use strict";var n=r("0366"),i=r("c65b"),o=r("825a"),a=r("0d51"),s=r("e95a"),c=r("07fa"),u=r("3a9b"),l=r("9a1f"),h=r("35a1"),d=r("2a62"),f=TypeError,g=function(t,e){this.stopped=t,this.result=e},p=g.prototype;t.exports=function(t,e,r){var m,w,y,E,C,A,S,v=r&&r.that,b=!(!r||!r.AS_ENTRIES),I=!(!r||!r.IS_RECORD),_=!(!r||!r.IS_ITERATOR),T=!(!r||!r.INTERRUPTED),R=n(e,v),D=function(t){return m&&d(m,"normal",t),new g(!0,t)},O=function(t){return b?(o(t),T?R(t[0],t[1],D):R(t[0],t[1])):T?R(t,D):R(t)};if(I)m=t.iterator;else if(_)m=t;else{if(w=h(t),!w)throw new f(a(t)+" is not iterable");if(s(w)){for(y=0,E=c(t);E>y;y++)if(C=O(t[y]),C&&u(p,C))return C;return new g(!1)}m=l(t,w)}A=I?t.next:m.next;while(!(S=i(A,m)).done){try{C=O(S.value)}catch(N){d(m,"throw",N)}if("object"==typeof C&&C&&u(p,C))return C}return new g(!1)}},"23cb":function(t,e,r){"use strict";var n=r("5926"),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},"23dc":function(t,e,r){"use strict";var n=r("d44e");n(Math,"Math",!0)},"23e7":function(t,e,r){"use strict";var n=r("da84"),i=r("06cf").f,o=r("9112"),a=r("cb2d"),s=r("6374"),c=r("e893"),u=r("94ca");t.exports=function(t,e){var r,l,h,d,f,g,p=t.target,m=t.global,w=t.stat;if(l=m?n:w?n[p]||s(p,{}):n[p]&&n[p].prototype,l)for(h in e){if(f=e[h],t.dontCallGetSet?(g=i(l,h),d=g&&g.value):d=l[h],r=u(m?h:p+(w?".":"#")+h,t.forced),!r&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(t.sham||d&&d.sham)&&o(f,"sham",!0),a(l,h,f,t)}}},"241c":function(t,e,r){"use strict";var n=r("ca84"),i=r("7839"),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},"24fb":function(t,e,r){"use strict";function n(t,e){var r=t[1]||"",n=t[3];if(!n)return r;if(e&&"function"===typeof btoa){var o=i(n),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}function i(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(r," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=n(e,t);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"===typeof t&&(t=[[null,t,""]]);var i={};if(n)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);n&&i[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),e.push(c))}},e}},2532:function(t,e,r){"use strict";var n=r("23e7"),i=r("e330"),o=r("5a34"),a=r("1d80"),s=r("577e"),c=r("ab13"),u=i("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~u(s(a(this)),s(o(t)),arguments.length>1?arguments[1]:void 0)}})},"25f0":function(t,e,r){"use strict";var n=r("5e77").PROPER,i=r("cb2d"),o=r("825a"),a=r("577e"),s=r("d039"),c=r("90d8"),u="toString",l=RegExp.prototype,h=l[u],d=s((function(){return"/a/b"!==h.call({source:"a",flags:"b"})})),f=n&&h.name!==u;(d||f)&&i(l,u,(function(){var t=o(this),e=a(t.source),r=a(c(t));return"/"+e+"/"+r}),{unsafe:!0})},2626:function(t,e,r){"use strict";var n=r("d066"),i=r("edd0"),o=r("b622"),a=r("83ab"),s=o("species");t.exports=function(t){var e=n(t);a&&e&&!e[s]&&i(e,s,{configurable:!0,get:function(){return this}})}},"271a":function(t,e,r){"use strict";var n=r("cb2d"),i=r("e330"),o=r("577e"),a=r("d6d6"),s=URLSearchParams,c=s.prototype,u=i(c.getAll),l=i(c.has),h=new s("a=1");!h.has("a",2)&&h.has("a",void 0)||n(c,"has",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=u(this,t);a(e,1);var i=o(r),s=0;while(s<n.length)if(n[s++]===i)return!0;return!1}),{enumerable:!0,unsafe:!0})},2877:function(t,e,r){"use strict";function n(t,e,r,n,i,o,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}r.d(e,"a",(function(){return n}))},2909:function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r("6b75");function i(t){if(Array.isArray(t))return Object(n["a"])(t)}r("a4d3"),r("e01a"),r("d28b"),r("a630"),r("e260"),r("d3b7"),r("3ca3"),r("ddb0");function o(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}var a=r("06c5");r("d9e2");function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t){return i(t)||o(t)||Object(a["a"])(t)||s()}},"2a62":function(t,e,r){"use strict";var n=r("c65b"),i=r("825a"),o=r("dc4a");t.exports=function(t,e,r){var a,s;i(t);try{if(a=o(t,"return"),!a){if("throw"===e)throw r;return r}a=n(a,t)}catch(c){s=!0,a=c}if("throw"===e)throw r;if(s)throw a;return i(a),r}},"2b3d":function(t,e,r){"use strict";r("4002")},"2ba4":function(t,e,r){"use strict";var n=r("40d5"),i=Function.prototype,o=i.apply,a=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(o):function(){return a.apply(o,arguments)})},"2ca0":function(t,e,r){"use strict";var n=r("23e7"),i=r("4625"),o=r("06cf").f,a=r("50c4"),s=r("577e"),c=r("5a34"),u=r("1d80"),l=r("ab13"),h=r("c430"),d=i("".slice),f=Math.min,g=l("startsWith"),p=!h&&!g&&!!function(){var t=o(String.prototype,"startsWith");return t&&!t.writable}();n({target:"String",proto:!0,forced:!p&&!g},{startsWith:function(t){var e=s(u(this));c(t);var r=a(f(arguments.length>1?arguments[1]:void 0,e.length)),n=s(t);return d(e,r,r+n.length)===n}})},"2cf4":function(t,e,r){"use strict";var n,i,o,a,s=r("da84"),c=r("2ba4"),u=r("0366"),l=r("1626"),h=r("1a2d"),d=r("d039"),f=r("1be4"),g=r("f36a"),p=r("cc12"),m=r("d6d6"),w=r("1cdc"),y=r("605d"),E=s.setImmediate,C=s.clearImmediate,A=s.process,S=s.Dispatch,v=s.Function,b=s.MessageChannel,I=s.String,_=0,T={},R="onreadystatechange";d((function(){n=s.location}));var D=function(t){if(h(T,t)){var e=T[t];delete T[t],e()}},O=function(t){return function(){D(t)}},N=function(t){D(t.data)},M=function(t){s.postMessage(I(t),n.protocol+"//"+n.host)};E&&C||(E=function(t){m(arguments.length,1);var e=l(t)?t:v(t),r=g(arguments,1);return T[++_]=function(){c(e,void 0,r)},i(_),_},C=function(t){delete T[t]},y?i=function(t){A.nextTick(O(t))}:S&&S.now?i=function(t){S.now(O(t))}:b&&!w?(o=new b,a=o.port2,o.port1.onmessage=N,i=u(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!d(M)?(i=M,s.addEventListener("message",N,!1)):i=R in p("script")?function(t){f.appendChild(p("script"))[R]=function(){f.removeChild(this),D(t)}}:function(t){setTimeout(O(t),0)}),t.exports={set:E,clear:C}},"2d00":function(t,e,r){"use strict";var n,i,o=r("da84"),a=r("342f"),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(n=l.split("."),i=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(n=a.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/),n&&(i=+n[1]))),t.exports=i},3410:function(t,e,r){"use strict";var n=r("23e7"),i=r("d039"),o=r("7b0b"),a=r("e163"),s=r("e177"),c=i((function(){a(1)}));n({target:"Object",stat:!0,forced:c,sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},"342f":function(t,e,r){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3511:function(t,e,r){"use strict";var n=TypeError,i=9007199254740991;t.exports=function(t){if(t>i)throw n("Maximum allowed index exceeded");return t}},3529:function(t,e,r){"use strict";var n=r("23e7"),i=r("c65b"),o=r("59ed"),a=r("f069"),s=r("e667"),c=r("2266"),u=r("5eed");n({target:"Promise",stat:!0,forced:u},{race:function(t){var e=this,r=a.f(e),n=r.reject,u=s((function(){var a=o(e.resolve);c(t,(function(t){i(a,e,t).then(r.resolve,n)}))}));return u.error&&n(u.value),r.promise}})},"35a1":function(t,e,r){"use strict";var n=r("f5df"),i=r("dc4a"),o=r("7234"),a=r("3f8c"),s=r("b622"),c=s("iterator");t.exports=function(t){if(!o(t))return i(t,c)||i(t,"@@iterator")||a[n(t)]}},"37e8":function(t,e,r){"use strict";var n=r("83ab"),i=r("aed9"),o=r("9bf2"),a=r("825a"),s=r("fc6a"),c=r("df75");e.f=n&&!i?Object.defineProperties:function(t,e){a(t);var r,n=s(e),i=c(e),u=i.length,l=0;while(u>l)o.f(t,r=i[l++],n[r]);return t}},3835:function(t,e,r){"use strict";function n(t){if(Array.isArray(t))return t}r.d(e,"a",(function(){return s}));r("a4d3"),r("e01a"),r("d28b"),r("e260"),r("14d9"),r("d3b7"),r("3ca3"),r("ddb0");function i(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){u=!0,i=t}finally{try{if(!c&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(u)throw i}}return s}}var o=r("06c5");r("d9e2");function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){return n(t)||i(t,e)||Object(o["a"])(t,e)||a()}},"3a34":function(t,e,r){"use strict";var n=r("83ab"),i=r("e8b5"),o=TypeError,a=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(i(t)&&!a(t,"length").writable)throw new o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},"3a9b":function(t,e,r){"use strict";var n=r("e330");t.exports=n({}.isPrototypeOf)},"3bbe":function(t,e,r){"use strict";var n=r("1787"),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o("Can't set "+i(t)+" as a prototype")}},"3ca3":function(t,e,r){"use strict";var n=r("6547").charAt,i=r("577e"),o=r("69f3"),a=r("c6d2"),s=r("4754"),c="String Iterator",u=o.set,l=o.getterFor(c);a(String,"String",(function(t){u(this,{type:c,string:i(t),index:0})}),(function(){var t,e=l(this),r=e.string,i=e.index;return i>=r.length?s(void 0,!0):(t=n(r,i),e.index+=t.length,s(t,!1))}))},"3f8c":function(t,e,r){"use strict";t.exports={}},4002:function(t,e,r){"use strict";r("3ca3");var n,i=r("23e7"),o=r("83ab"),a=r("f354"),s=r("da84"),c=r("0366"),u=r("e330"),l=r("cb2d"),h=r("edd0"),d=r("19aa"),f=r("1a2d"),g=r("60da"),p=r("4df4"),m=r("f36a"),w=r("6547").codeAt,y=r("5fb2"),E=r("577e"),C=r("d44e"),A=r("d6d6"),S=r("5352"),v=r("69f3"),b=v.set,I=v.getterFor("URL"),_=S.URLSearchParams,T=S.getState,R=s.URL,D=s.TypeError,O=s.parseInt,N=Math.floor,M=Math.pow,P=u("".charAt),L=u(/./.exec),x=u([].join),B=u(1..toString),k=u([].pop),F=u([].push),U=u("".replace),j=u([].shift),H=u("".split),V=u("".slice),z=u("".toLowerCase),W=u([].unshift),G="Invalid authority",Y="Invalid scheme",X="Invalid host",$="Invalid port",Z=/[a-z]/i,Q=/[\d+-.a-z]/i,q=/\d/,K=/^0x/i,J=/^[0-7]+$/,tt=/^\d+$/,et=/^[\da-f]+$/i,rt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nt=/[\0\t\n\r #/:<>?@[\\\]^|]/,it=/^[\u0000-\u0020]+/,ot=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,at=/[\t\n\r]/g,st=function(t){var e,r,n,i,o,a,s,c=H(t,".");if(c.length&&""===c[c.length-1]&&c.length--,e=c.length,e>4)return t;for(r=[],n=0;n<e;n++){if(i=c[n],""===i)return t;if(o=10,i.length>1&&"0"===P(i,0)&&(o=L(K,i)?16:8,i=V(i,8===o?1:2)),""===i)a=0;else{if(!L(10===o?tt:8===o?J:et,i))return t;a=O(i,o)}F(r,a)}for(n=0;n<e;n++)if(a=r[n],n===e-1){if(a>=M(256,5-e))return null}else if(a>255)return null;for(s=k(r),n=0;n<r.length;n++)s+=r[n]*M(256,3-n);return s},ct=function(t){var e,r,n,i,o,a,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,h=0,d=function(){return P(t,h)};if(":"===d()){if(":"!==P(t,1))return;h+=2,u++,l=u}while(d()){if(8===u)return;if(":"!==d()){e=r=0;while(r<4&&L(et,d()))e=16*e+O(d(),16),h++,r++;if("."===d()){if(0===r)return;if(h-=r,u>6)return;n=0;while(d()){if(i=null,n>0){if(!("."===d()&&n<4))return;h++}if(!L(q,d()))return;while(L(q,d())){if(o=O(d(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(i>255)return;h++}c[u]=256*c[u]+i,n++,2!==n&&4!==n||u++}if(4!==n)return;break}if(":"===d()){if(h++,!d())return}else if(d())return;c[u++]=e}else{if(null!==l)return;h++,u++,l=u}}if(null!==l){a=u-l,u=7;while(0!==u&&a>0)s=c[u],c[u--]=c[l+a-1],c[l+--a]=s}else if(8!==u)return;return c},ut=function(t){for(var e=null,r=1,n=null,i=0,o=0;o<8;o++)0!==t[o]?(i>r&&(e=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(e=n,r=i),e},lt=function(t){var e,r,n,i;if("number"==typeof t){for(e=[],r=0;r<4;r++)W(e,t%256),t=N(t/256);return x(e,".")}if("object"==typeof t){for(e="",n=ut(t),r=0;r<8;r++)i&&0===t[r]||(i&&(i=!1),n===r?(e+=r?":":"::",i=!0):(e+=B(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},ht={},dt=g({},ht,{" ":1,'"':1,"<":1,">":1,"`":1}),ft=g({},dt,{"#":1,"?":1,"{":1,"}":1}),gt=g({},ft,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),pt=function(t,e){var r=w(t,0);return r>32&&r<127&&!f(e,t)?t:encodeURIComponent(t)},mt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},wt=function(t,e){var r;return 2===t.length&&L(Z,P(t,0))&&(":"===(r=P(t,1))||!e&&"|"===r)},yt=function(t){var e;return t.length>1&&wt(V(t,0,2))&&(2===t.length||"/"===(e=P(t,2))||"\\"===e||"?"===e||"#"===e)},Et=function(t){return"."===t||"%2e"===z(t)},Ct=function(t){return t=z(t),".."===t||"%2e."===t||".%2e"===t||"%2e%2e"===t},At={},St={},vt={},bt={},It={},_t={},Tt={},Rt={},Dt={},Ot={},Nt={},Mt={},Pt={},Lt={},xt={},Bt={},kt={},Ft={},Ut={},jt={},Ht={},Vt=function(t,e,r){var n,i,o,a=E(t);if(e){if(i=this.parse(a),i)throw new D(i);this.searchParams=null}else{if(void 0!==r&&(n=new Vt(r,!0)),i=this.parse(a,null,n),i)throw new D(i);o=T(new _),o.bindURL(this),this.searchParams=o}};Vt.prototype={type:"URL",parse:function(t,e,r){var i,o,a,s,c=this,u=e||At,l=0,h="",d=!1,g=!1,w=!1;t=E(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=U(t,it,""),t=U(t,ot,"$1")),t=U(t,at,""),i=p(t);while(l<=i.length){switch(o=i[l],u){case At:if(!o||!L(Z,o)){if(e)return Y;u=vt;continue}h+=z(o),u=St;break;case St:if(o&&(L(Q,o)||"+"===o||"-"===o||"."===o))h+=z(o);else{if(":"!==o){if(e)return Y;h="",u=vt,l=0;continue}if(e&&(c.isSpecial()!==f(mt,h)||"file"===h&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=h,e)return void(c.isSpecial()&&mt[c.scheme]===c.port&&(c.port=null));h="","file"===c.scheme?u=Lt:c.isSpecial()&&r&&r.scheme===c.scheme?u=bt:c.isSpecial()?u=Rt:"/"===i[l+1]?(u=It,l++):(c.cannotBeABaseURL=!0,F(c.path,""),u=Ut)}break;case vt:if(!r||r.cannotBeABaseURL&&"#"!==o)return Y;if(r.cannotBeABaseURL&&"#"===o){c.scheme=r.scheme,c.path=m(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,u=Ht;break}u="file"===r.scheme?Lt:_t;continue;case bt:if("/"!==o||"/"!==i[l+1]){u=_t;continue}u=Dt,l++;break;case It:if("/"===o){u=Ot;break}u=Ft;continue;case _t:if(c.scheme=r.scheme,o===n)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.query=r.query;else if("/"===o||"\\"===o&&c.isSpecial())u=Tt;else if("?"===o)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.query="",u=jt;else{if("#"!==o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.path.length--,u=Ft;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=m(r.path),c.query=r.query,c.fragment="",u=Ht}break;case Tt:if(!c.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,u=Ft;continue}u=Ot}else u=Dt;break;case Rt:if(u=Dt,"/"!==o||"/"!==P(h,l+1))continue;l++;break;case Dt:if("/"!==o&&"\\"!==o){u=Ot;continue}break;case Ot:if("@"===o){d&&(h="%40"+h),d=!0,a=p(h);for(var y=0;y<a.length;y++){var C=a[y];if(":"!==C||w){var A=pt(C,gt);w?c.password+=A:c.username+=A}else w=!0}h=""}else if(o===n||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()){if(d&&""===h)return G;l-=p(h).length+1,h="",u=Nt}else h+=o;break;case Nt:case Mt:if(e&&"file"===c.scheme){u=Bt;continue}if(":"!==o||g){if(o===n||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()){if(c.isSpecial()&&""===h)return X;if(e&&""===h&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(h),s)return s;if(h="",u=kt,e)return;continue}"["===o?g=!0:"]"===o&&(g=!1),h+=o}else{if(""===h)return X;if(s=c.parseHost(h),s)return s;if(h="",u=Pt,e===Mt)return}break;case Pt:if(!L(q,o)){if(o===n||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()||e){if(""!==h){var S=O(h,10);if(S>65535)return $;c.port=c.isSpecial()&&S===mt[c.scheme]?null:S,h=""}if(e)return;u=kt;continue}return $}h+=o;break;case Lt:if(c.scheme="file","/"===o||"\\"===o)u=xt;else{if(!r||"file"!==r.scheme){u=Ft;continue}switch(o){case n:c.host=r.host,c.path=m(r.path),c.query=r.query;break;case"?":c.host=r.host,c.path=m(r.path),c.query="",u=jt;break;case"#":c.host=r.host,c.path=m(r.path),c.query=r.query,c.fragment="",u=Ht;break;default:yt(x(m(i,l),""))||(c.host=r.host,c.path=m(r.path),c.shortenPath()),u=Ft;continue}}break;case xt:if("/"===o||"\\"===o){u=Bt;break}r&&"file"===r.scheme&&!yt(x(m(i,l),""))&&(wt(r.path[0],!0)?F(c.path,r.path[0]):c.host=r.host),u=Ft;continue;case Bt:if(o===n||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&wt(h))u=Ft;else if(""===h){if(c.host="",e)return;u=kt}else{if(s=c.parseHost(h),s)return s;if("localhost"===c.host&&(c.host=""),e)return;h="",u=kt}continue}h+=o;break;case kt:if(c.isSpecial()){if(u=Ft,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==n&&(u=Ft,"/"!==o))continue}else c.fragment="",u=Ht;else c.query="",u=jt;break;case Ft:if(o===n||"/"===o||"\\"===o&&c.isSpecial()||!e&&("?"===o||"#"===o)){if(Ct(h)?(c.shortenPath(),"/"===o||"\\"===o&&c.isSpecial()||F(c.path,"")):Et(h)?"/"===o||"\\"===o&&c.isSpecial()||F(c.path,""):("file"===c.scheme&&!c.path.length&&wt(h)&&(c.host&&(c.host=""),h=P(h,0)+":"),F(c.path,h)),h="","file"===c.scheme&&(o===n||"?"===o||"#"===o))while(c.path.length>1&&""===c.path[0])j(c.path);"?"===o?(c.query="",u=jt):"#"===o&&(c.fragment="",u=Ht)}else h+=pt(o,ft);break;case Ut:"?"===o?(c.query="",u=jt):"#"===o?(c.fragment="",u=Ht):o!==n&&(c.path[0]+=pt(o,ht));break;case jt:e||"#"!==o?o!==n&&("'"===o&&c.isSpecial()?c.query+="%27":c.query+="#"===o?"%23":pt(o,ht)):(c.fragment="",u=Ht);break;case Ht:o!==n&&(c.fragment+=pt(o,dt));break}l++}},parseHost:function(t){var e,r,n;if("["===P(t,0)){if("]"!==P(t,t.length-1))return X;if(e=ct(V(t,1,-1)),!e)return X;this.host=e}else if(this.isSpecial()){if(t=y(t),L(rt,t))return X;if(e=st(t),null===e)return X;this.host=e}else{if(L(nt,t))return X;for(e="",r=p(t),n=0;n<r.length;n++)e+=pt(r[n],ht);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return f(mt,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"===this.scheme&&1===e&&wt(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,r=t.username,n=t.password,i=t.host,o=t.port,a=t.path,s=t.query,c=t.fragment,u=e+":";return null!==i?(u+="//",t.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=lt(i),null!==o&&(u+=":"+o)):"file"===e&&(u+="//"),u+=t.cannotBeABaseURL?a[0]:a.length?"/"+x(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(t){var e=this.parse(t);if(e)throw new D(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"===t)try{return new zt(t.path[0]).origin}catch(r){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+lt(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(E(t)+":",At)},getUsername:function(){return this.username},setUsername:function(t){var e=p(E(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<e.length;r++)this.username+=pt(e[r],gt)}},getPassword:function(){return this.password},setPassword:function(t){var e=p(E(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<e.length;r++)this.password+=pt(e[r],gt)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?lt(t):lt(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Nt)},getHostname:function(){var t=this.host;return null===t?"":lt(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Mt)},getPort:function(){var t=this.port;return null===t?"":E(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(t=E(t),""===t?this.port=null:this.parse(t,Pt))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+x(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,kt))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){t=E(t),""===t?this.query=null:("?"===P(t,0)&&(t=V(t,1)),this.query="",this.parse(t,jt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){t=E(t),""!==t?("#"===P(t,0)&&(t=V(t,1)),this.fragment="",this.parse(t,Ht)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var zt=function(t){var e=d(this,Wt),r=A(arguments.length,1)>1?arguments[1]:void 0,n=b(e,new Vt(t,!1,r));o||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},Wt=zt.prototype,Gt=function(t,e){return{get:function(){return I(this)[t]()},set:e&&function(t){return I(this)[e](t)},configurable:!0,enumerable:!0}};if(o&&(h(Wt,"href",Gt("serialize","setHref")),h(Wt,"origin",Gt("getOrigin")),h(Wt,"protocol",Gt("getProtocol","setProtocol")),h(Wt,"username",Gt("getUsername","setUsername")),h(Wt,"password",Gt("getPassword","setPassword")),h(Wt,"host",Gt("getHost","setHost")),h(Wt,"hostname",Gt("getHostname","setHostname")),h(Wt,"port",Gt("getPort","setPort")),h(Wt,"pathname",Gt("getPathname","setPathname")),h(Wt,"search",Gt("getSearch","setSearch")),h(Wt,"searchParams",Gt("getSearchParams")),h(Wt,"hash",Gt("getHash","setHash"))),l(Wt,"toJSON",(function(){return I(this).serialize()}),{enumerable:!0}),l(Wt,"toString",(function(){return I(this).serialize()}),{enumerable:!0}),R){var Yt=R.createObjectURL,Xt=R.revokeObjectURL;Yt&&l(zt,"createObjectURL",c(Yt,R)),Xt&&l(zt,"revokeObjectURL",c(Xt,R))}C(zt,"URL"),i({global:!0,constructor:!0,forced:!a,sham:!o},{URL:zt})},"408a":function(t,e,r){"use strict";var n=r("e330");t.exports=n(1..valueOf)},"40d5":function(t,e,r){"use strict";var n=r("d039");t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},"428f":function(t,e,r){"use strict";var n=r("da84");t.exports=n},4362:function(t,e,r){e.nextTick=function(t){var e=Array.prototype.slice.call(arguments);e.shift(),setTimeout((function(){t.apply(null,e)}),0)},e.platform=e.arch=e.execPath=e.title="browser",e.pid=1,e.browser=!0,e.env={},e.argv=[],e.binding=function(t){throw new Error("No such module. (Possibly not yet loaded)")},function(){var t,n="/";e.cwd=function(){return n},e.chdir=function(e){t||(t=r("df7c")),n=t.resolve(e,n)}}(),e.exit=e.kill=e.umask=e.dlopen=e.uptime=e.memoryUsage=e.uvCounters=function(){},e.features={}},"44ad":function(t,e,r){"use strict";var n=r("e330"),i=r("d039"),o=r("c6b6"),a=Object,s=n("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?s(t,""):a(t)}:a},"44d2":function(t,e,r){"use strict";var n=r("b622"),i=r("7c73"),o=r("9bf2").f,a=n("unscopables"),s=Array.prototype;void 0===s[a]&&o(s,a,{configurable:!0,value:i(null)}),t.exports=function(t){s[a][t]=!0}},"44de":function(t,e,r){"use strict";t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(r){}}},"44e7":function(t,e,r){"use strict";var n=r("861d"),i=r("c6b6"),o=r("b622"),a=o("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[a])?!!e:"RegExp"===i(t))}},4625:function(t,e,r){"use strict";var n=r("c6b6"),i=r("e330");t.exports=function(t){if("Function"===n(t))return i(t)}},"466d":function(t,e,r){"use strict";var n=r("c65b"),i=r("d784"),o=r("825a"),a=r("7234"),s=r("50c4"),c=r("577e"),u=r("1d80"),l=r("dc4a"),h=r("8aa5"),d=r("14c3");i("match",(function(t,e,r){return[function(e){var r=u(this),i=a(e)?void 0:l(e,t);return i?n(i,e,r):new RegExp(e)[t](c(r))},function(t){var n=o(this),i=c(t),a=r(e,n,i);if(a.done)return a.value;if(!n.global)return d(n,i);var u=n.unicode;n.lastIndex=0;var l,f=[],g=0;while(null!==(l=d(n,i))){var p=c(l[0]);f[g]=p,""===p&&(n.lastIndex=h(i,s(n.lastIndex),u)),g++}return 0===g?null:f}]}))},4738:function(t,e,r){"use strict";var n=r("da84"),i=r("d256"),o=r("1626"),a=r("94ca"),s=r("8925"),c=r("b622"),u=r("6069"),l=r("6c59"),h=r("c430"),d=r("2d00"),f=i&&i.prototype,g=c("species"),p=!1,m=o(n.PromiseRejectionEvent),w=a("Promise",(function(){var t=s(i),e=t!==String(i);if(!e&&66===d)return!0;if(h&&(!f["catch"]||!f["finally"]))return!0;if(!d||d<51||!/native code/.test(t)){var r=new i((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))},o=r.constructor={};if(o[g]=n,p=r.then((function(){}))instanceof n,!p)return!0}return!e&&(u||l)&&!m}));t.exports={CONSTRUCTOR:w,REJECTION_EVENT:m,SUBCLASSING:p}},4754:function(t,e,r){"use strict";t.exports=function(t,e){return{value:t,done:e}}},4840:function(t,e,r){"use strict";var n=r("825a"),i=r("5087"),o=r("7234"),a=r("b622"),s=a("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||o(r=n(a)[s])?e:i(r)}},"485a":function(t,e,r){"use strict";var n=r("c65b"),i=r("1626"),o=r("861d"),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&i(r=t.toString)&&!o(s=n(r,t)))return s;if(i(r=t.valueOf)&&!o(s=n(r,t)))return s;if("string"!==e&&i(r=t.toString)&&!o(s=n(r,t)))return s;throw new a("Can't convert object to primitive value")}},"499e":function(t,e,r){"use strict";function n(t,e){for(var r=[],n={},i=0;i<e.length;i++){var o=e[i],a=o[0],s=o[1],c=o[2],u=o[3],l={id:t+":"+i,css:s,media:c,sourceMap:u};n[a]?n[a].parts.push(l):r.push(n[a]={id:a,parts:[l]})}return r}r.r(e),r.d(e,"default",(function(){return g}));var i="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,l=function(){},h=null,d="data-vue-ssr-id",f="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function g(t,e,r,i){u=r,h=i||{};var a=n(t,e);return p(a),function(e){for(var r=[],i=0;i<a.length;i++){var s=a[i],c=o[s.id];c.refs--,r.push(c)}e?(a=n(t,e),p(a)):a=[];for(i=0;i<r.length;i++){c=r[i];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete o[c.id]}}}}function p(t){for(var e=0;e<t.length;e++){var r=t[e],n=o[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(w(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var a=[];for(i=0;i<r.parts.length;i++)a.push(w(r.parts[i]));o[r.id]={id:r.id,refs:1,parts:a}}}}function m(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function w(t){var e,r,n=document.querySelector("style["+d+'~="'+t.id+'"]');if(n){if(u)return l;n.parentNode.removeChild(n)}if(f){var i=c++;n=s||(s=m()),e=E.bind(null,n,i,!1),r=E.bind(null,n,i,!0)}else n=m(),e=C.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}var y=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}();function E(t,e,r,n){var i=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function C(t,e){var r=e.css,n=e.media,i=e.sourceMap;if(n&&t.setAttribute("media",n),h.ssrId&&t.setAttribute(d,e.id),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},"4ae1":function(t,e,r){"use strict";var n=r("23e7"),i=r("d066"),o=r("2ba4"),a=r("0538"),s=r("5087"),c=r("825a"),u=r("861d"),l=r("7c73"),h=r("d039"),d=i("Reflect","construct"),f=Object.prototype,g=[].push,p=h((function(){function t(){}return!(d((function(){}),[],t)instanceof t)})),m=!h((function(){d((function(){}))})),w=p||m;n({target:"Reflect",stat:!0,forced:w,sham:w},{construct:function(t,e){s(t),c(e);var r=arguments.length<3?t:s(arguments[2]);if(m&&!p)return d(t,e,r);if(t===r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return o(g,n,e),new(o(a,t,n))}var i=r.prototype,h=l(u(i)?i:f),w=o(t,h,e);return u(w)?w:h}})},"4d64":function(t,e,r){"use strict";var n=r("fc6a"),i=r("23cb"),o=r("07fa"),a=function(t){return function(e,r,a){var s=n(e),c=o(s);if(0===c)return!t&&-1;var u,l=i(a,c);if(t&&r!==r){while(c>l)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((t||l in s)&&s[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"4de4":function(t,e,r){"use strict";var n=r("23e7"),i=r("b727").filter,o=r("1dde"),a=o("filter");n({target:"Array",proto:!0,forced:!a},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(t,e,r){"use strict";var n=r("0366"),i=r("c65b"),o=r("7b0b"),a=r("9bdd"),s=r("e95a"),c=r("68ee"),u=r("07fa"),l=r("8418"),h=r("9a1f"),d=r("35a1"),f=Array;t.exports=function(t){var e=o(t),r=c(this),g=arguments.length,p=g>1?arguments[1]:void 0,m=void 0!==p;m&&(p=n(p,g>2?arguments[2]:void 0));var w,y,E,C,A,S,v=d(e),b=0;if(!v||this===f&&s(v))for(w=u(e),y=r?new this(w):f(w);w>b;b++)S=m?p(e[b],b):e[b],l(y,b,S);else for(y=r?new this:[],C=h(e,v),A=C.next;!(E=i(A,C)).done;b++)S=m?a(C,p,[E.value,b],!0):E.value,l(y,b,S);return y.length=b,y}},"4ec9":function(t,e,r){"use strict";r("6f48")},"4fad":function(t,e,r){"use strict";var n=r("d039"),i=r("861d"),o=r("c6b6"),a=r("d86b"),s=Object.isExtensible,c=n((function(){s(1)}));t.exports=c||a?function(t){return!!i(t)&&((!a||"ArrayBuffer"!==o(t))&&(!s||s(t)))}:s},5087:function(t,e,r){"use strict";var n=r("68ee"),i=r("0d51"),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a constructor")}},"50c4":function(t,e,r){"use strict";var n=r("5926"),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},"51eb":function(t,e,r){"use strict";var n=r("825a"),i=r("485a"),o=TypeError;t.exports=function(t){if(n(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new o("Incorrect hint");return i(this,t)}},5352:function(t,e,r){"use strict";r("e260");var n=r("23e7"),i=r("da84"),o=r("157a"),a=r("c65b"),s=r("e330"),c=r("83ab"),u=r("f354"),l=r("cb2d"),h=r("edd0"),d=r("6964"),f=r("d44e"),g=r("dcc3"),p=r("69f3"),m=r("19aa"),w=r("1626"),y=r("1a2d"),E=r("0366"),C=r("f5df"),A=r("825a"),S=r("861d"),v=r("577e"),b=r("7c73"),I=r("5c6c"),_=r("9a1f"),T=r("35a1"),R=r("4754"),D=r("d6d6"),O=r("b622"),N=r("addb"),M=O("iterator"),P="URLSearchParams",L=P+"Iterator",x=p.set,B=p.getterFor(P),k=p.getterFor(L),F=o("fetch"),U=o("Request"),j=o("Headers"),H=U&&U.prototype,V=j&&j.prototype,z=i.RegExp,W=i.TypeError,G=i.decodeURIComponent,Y=i.encodeURIComponent,X=s("".charAt),$=s([].join),Z=s([].push),Q=s("".replace),q=s([].shift),K=s([].splice),J=s("".split),tt=s("".slice),et=/\+/g,rt=Array(4),nt=function(t){return rt[t-1]||(rt[t-1]=z("((?:%[\\da-f]{2}){"+t+"})","gi"))},it=function(t){try{return G(t)}catch(e){return t}},ot=function(t){var e=Q(t,et," "),r=4;try{return G(e)}catch(n){while(r)e=Q(e,nt(r--),it);return e}},at=/[!'()~]|%20/g,st={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ct=function(t){return st[t]},ut=function(t){return Q(Y(t),at,ct)},lt=g((function(t,e){x(this,{type:L,target:B(t).entries,index:0,kind:e})}),P,(function(){var t=k(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,R(void 0,!0);var n=e[r];switch(t.kind){case"keys":return R(n.key,!1);case"values":return R(n.value,!1)}return R([n.key,n.value],!1)}),!0),ht=function(t){this.entries=[],this.url=null,void 0!==t&&(S(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===X(t,0)?tt(t,1):t:v(t)))};ht.prototype={type:P,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,i,o,s,c,u=this.entries,l=T(t);if(l){e=_(t,l),r=e.next;while(!(n=a(r,e)).done){if(i=_(A(n.value)),o=i.next,(s=a(o,i)).done||(c=a(o,i)).done||!a(o,i).done)throw new W("Expected sequence with length 2");Z(u,{key:v(s.value),value:v(c.value)})}}else for(var h in t)y(t,h)&&Z(u,{key:h,value:v(t[h])})},parseQuery:function(t){if(t){var e,r,n=this.entries,i=J(t,"&"),o=0;while(o<i.length)e=i[o++],e.length&&(r=J(e,"="),Z(n,{key:ot(q(r)),value:ot($(r,"="))}))}},serialize:function(){var t,e=this.entries,r=[],n=0;while(n<e.length)t=e[n++],Z(r,ut(t.key)+"="+ut(t.value));return $(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var dt=function(){m(this,ft);var t=arguments.length>0?arguments[0]:void 0,e=x(this,new ht(t));c||(this.size=e.entries.length)},ft=dt.prototype;if(d(ft,{append:function(t,e){var r=B(this);D(arguments.length,2),Z(r.entries,{key:v(t),value:v(e)}),c||this.length++,r.updateURL()},delete:function(t){var e=B(this),r=D(arguments.length,1),n=e.entries,i=v(t),o=r<2?void 0:arguments[1],a=void 0===o?o:v(o),s=0;while(s<n.length){var u=n[s];if(u.key!==i||void 0!==a&&u.value!==a)s++;else if(K(n,s,1),void 0!==a)break}c||(this.size=n.length),e.updateURL()},get:function(t){var e=B(this).entries;D(arguments.length,1);for(var r=v(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){var e=B(this).entries;D(arguments.length,1);for(var r=v(t),n=[],i=0;i<e.length;i++)e[i].key===r&&Z(n,e[i].value);return n},has:function(t){var e=B(this).entries,r=D(arguments.length,1),n=v(t),i=r<2?void 0:arguments[1],o=void 0===i?i:v(i),a=0;while(a<e.length){var s=e[a++];if(s.key===n&&(void 0===o||s.value===o))return!0}return!1},set:function(t,e){var r=B(this);D(arguments.length,1);for(var n,i=r.entries,o=!1,a=v(t),s=v(e),u=0;u<i.length;u++)n=i[u],n.key===a&&(o?K(i,u--,1):(o=!0,n.value=s));o||Z(i,{key:a,value:s}),c||(this.size=i.length),r.updateURL()},sort:function(){var t=B(this);N(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){var e,r=B(this).entries,n=E(t,arguments.length>1?arguments[1]:void 0),i=0;while(i<r.length)e=r[i++],n(e.value,e.key,this)},keys:function(){return new lt(this,"keys")},values:function(){return new lt(this,"values")},entries:function(){return new lt(this,"entries")}},{enumerable:!0}),l(ft,M,ft.entries,{name:"entries"}),l(ft,"toString",(function(){return B(this).serialize()}),{enumerable:!0}),c&&h(ft,"size",{get:function(){return B(this).entries.length},configurable:!0,enumerable:!0}),f(dt,P),n({global:!0,constructor:!0,forced:!u},{URLSearchParams:dt}),!u&&w(j)){var gt=s(V.has),pt=s(V.set),mt=function(t){if(S(t)){var e,r=t.body;if(C(r)===P)return e=t.headers?new j(t.headers):new j,gt(e,"content-type")||pt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),b(t,{body:I(0,v(r)),headers:I(0,e)})}return t};if(w(F)&&n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return F(t,arguments.length>1?mt(arguments[1]):{})}}),w(U)){var wt=function(t){return m(this,H),new U(t,arguments.length>1?mt(arguments[1]):{})};H.constructor=wt,wt.prototype=H,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:wt})}}t.exports={URLSearchParams:dt,getState:B}},"53ca":function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));r("a4d3"),r("e01a"),r("d28b"),r("e260"),r("d3b7"),r("3ca3"),r("ddb0");function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}},5494:function(t,e,r){"use strict";var n=r("83ab"),i=r("e330"),o=r("edd0"),a=URLSearchParams.prototype,s=i(a.forEach);n&&!("size"in a)&&o(a,"size",{get:function(){var t=0;return s(this,(function(){t++})),t},configurable:!0,enumerable:!0})},5692:function(t,e,r){"use strict";var n=r("c6cd");t.exports=function(t,e){return n[t]||(n[t]=e||{})}},"56ef":function(t,e,r){"use strict";var n=r("d066"),i=r("e330"),o=r("241c"),a=r("7418"),s=r("825a"),c=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(s(t)),r=a.f;return r?c(e,r(t)):e}},"577e":function(t,e,r){"use strict";var n=r("f5df"),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},"57b9":function(t,e,r){"use strict";var n=r("c65b"),i=r("d066"),o=r("b622"),a=r("cb2d");t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,s=o("toPrimitive");e&&!e[s]&&a(e,s,(function(t){return n(r,this)}),{arity:1})}},5899:function(t,e,r){"use strict";t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(t,e,r){"use strict";var n=r("e330"),i=r("1d80"),o=r("577e"),a=r("5899"),s=n("".replace),c=RegExp("^["+a+"]+"),u=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(t){return function(e){var r=o(i(e));return 1&t&&(r=s(r,c,"")),2&t&&(r=s(r,u,"$1")),r}};t.exports={start:l(1),end:l(2),trim:l(3)}},5926:function(t,e,r){"use strict";var n=r("b42e");t.exports=function(t){var e=+t;return e!==e||0===e?0:n(e)}},"59ed":function(t,e,r){"use strict";var n=r("1626"),i=r("0d51"),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a function")}},"5a34":function(t,e,r){"use strict";var n=r("44e7"),i=TypeError;t.exports=function(t){if(n(t))throw new i("The method doesn't accept regular expressions");return t}},"5a47":function(t,e,r){"use strict";var n=r("23e7"),i=r("04f8"),o=r("d039"),a=r("7418"),s=r("7b0b"),c=!i||o((function(){a.f(1)}));n({target:"Object",stat:!0,forced:c},{getOwnPropertySymbols:function(t){var e=a.f;return e?e(s(t)):[]}})},"5c0b":function(t,e,r){"use strict";var n=function(){var t=this,e=t._self._c;return e("input",{attrs:{type:"file",name:"image",accept:"image/*",capture:"environment",multiple:""},on:{change:t.onChangeInput}})},i=[],o=r("2909"),a=(r("d81d"),r("d3b7"),r("159b"),r("a180")),s=r("b3af"),c={name:"qrcode-capture",props:{formats:{type:Array,default:function(){return["qr_code"]}}},mixins:[s["a"]],methods:{onChangeInput:function(t){var e=this,r=Object(o["a"])(t.target.files),n=r.map((function(t){return Object(a["b"])(t,e.formats)}));n.forEach(this.onDetect)}}},u=c,l=r("2877"),h=Object(l["a"])(u,n,i,!1,null,null,null);e["a"]=h.exports},"5c6c":function(t,e,r){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5e77":function(t,e,r){"use strict";var n=r("83ab"),i=r("1a2d"),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},"5e7e":function(t,e,r){"use strict";var n,i,o,a,s=r("23e7"),c=r("c430"),u=r("605d"),l=r("da84"),h=r("c65b"),d=r("cb2d"),f=r("d2bb"),g=r("d44e"),p=r("2626"),m=r("59ed"),w=r("1626"),y=r("861d"),E=r("19aa"),C=r("4840"),A=r("2cf4").set,S=r("b575"),v=r("44de"),b=r("e667"),I=r("01b4"),_=r("69f3"),T=r("d256"),R=r("4738"),D=r("f069"),O="Promise",N=R.CONSTRUCTOR,M=R.REJECTION_EVENT,P=R.SUBCLASSING,L=_.getterFor(O),x=_.set,B=T&&T.prototype,k=T,F=B,U=l.TypeError,j=l.document,H=l.process,V=D.f,z=V,W=!!(j&&j.createEvent&&l.dispatchEvent),G="unhandledrejection",Y="rejectionhandled",X=0,$=1,Z=2,Q=1,q=2,K=function(t){var e;return!(!y(t)||!w(e=t.then))&&e},J=function(t,e){var r,n,i,o=e.value,a=e.state===$,s=a?t.ok:t.fail,c=t.resolve,u=t.reject,l=t.domain;try{s?(a||(e.rejection===q&&it(e),e.rejection=Q),!0===s?r=o:(l&&l.enter(),r=s(o),l&&(l.exit(),i=!0)),r===t.promise?u(new U("Promise-chain cycle")):(n=K(r))?h(n,r,c,u):c(r)):u(o)}catch(d){l&&!i&&l.exit(),u(d)}},tt=function(t,e){t.notified||(t.notified=!0,S((function(){var r,n=t.reactions;while(r=n.get())J(r,t);t.notified=!1,e&&!t.rejection&&rt(t)})))},et=function(t,e,r){var n,i;W?(n=j.createEvent("Event"),n.promise=e,n.reason=r,n.initEvent(t,!1,!0),l.dispatchEvent(n)):n={promise:e,reason:r},!M&&(i=l["on"+t])?i(n):t===G&&v("Unhandled promise rejection",r)},rt=function(t){h(A,l,(function(){var e,r=t.facade,n=t.value,i=nt(t);if(i&&(e=b((function(){u?H.emit("unhandledRejection",n,r):et(G,r,n)})),t.rejection=u||nt(t)?q:Q,e.error))throw e.value}))},nt=function(t){return t.rejection!==Q&&!t.parent},it=function(t){h(A,l,(function(){var e=t.facade;u?H.emit("rejectionHandled",e):et(Y,e,t.value)}))},ot=function(t,e,r){return function(n){t(e,n,r)}},at=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=Z,tt(t,!0))},st=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new U("Promise can't be resolved itself");var n=K(e);n?S((function(){var r={done:!1};try{h(n,e,ot(st,r,t),ot(at,r,t))}catch(i){at(r,i,t)}})):(t.value=e,t.state=$,tt(t,!1))}catch(i){at({done:!1},i,t)}}};if(N&&(k=function(t){E(this,F),m(t),h(n,this);var e=L(this);try{t(ot(st,e),ot(at,e))}catch(r){at(e,r)}},F=k.prototype,n=function(t){x(this,{type:O,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:X,value:void 0})},n.prototype=d(F,"then",(function(t,e){var r=L(this),n=V(C(this,k));return r.parent=!0,n.ok=!w(t)||t,n.fail=w(e)&&e,n.domain=u?H.domain:void 0,r.state===X?r.reactions.add(n):S((function(){J(n,r)})),n.promise})),i=function(){var t=new n,e=L(t);this.promise=t,this.resolve=ot(st,e),this.reject=ot(at,e)},D.f=V=function(t){return t===k||t===o?new i(t):z(t)},!c&&w(T)&&B!==Object.prototype)){a=B.then,P||d(B,"then",(function(t,e){var r=this;return new k((function(t,e){h(a,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete B.constructor}catch(ct){}f&&f(B,F)}s({global:!0,constructor:!0,wrap:!0,forced:N},{Promise:k}),g(k,O,!1,!0),p(O)},"5eed":function(t,e,r){"use strict";var n=r("d256"),i=r("1c7e"),o=r("4738").CONSTRUCTOR;t.exports=o||!i((function(t){n.all(t).then(void 0,(function(){}))}))},"5fb2":function(t,e,r){"use strict";var n=r("e330"),i=2147483647,o=36,a=1,s=26,c=38,u=700,l=72,h=128,d="-",f=/[^\0-\u007E]/,g=/[.\u3002\uFF0E\uFF61]/g,p="Overflow: input needs wider integers to process",m=o-a,w=RangeError,y=n(g.exec),E=Math.floor,C=String.fromCharCode,A=n("".charCodeAt),S=n([].join),v=n([].push),b=n("".replace),I=n("".split),_=n("".toLowerCase),T=function(t){var e=[],r=0,n=t.length;while(r<n){var i=A(t,r++);if(i>=55296&&i<=56319&&r<n){var o=A(t,r++);56320===(64512&o)?v(e,((1023&i)<<10)+(1023&o)+65536):(v(e,i),r--)}else v(e,i)}return e},R=function(t){return t+22+75*(t<26)},D=function(t,e,r){var n=0;t=r?E(t/u):t>>1,t+=E(t/e);while(t>m*s>>1)t=E(t/m),n+=o;return E(n+(m+1)*t/(t+c))},O=function(t){var e=[];t=T(t);var r,n,c=t.length,u=h,f=0,g=l;for(r=0;r<t.length;r++)n=t[r],n<128&&v(e,C(n));var m=e.length,y=m;m&&v(e,d);while(y<c){var A=i;for(r=0;r<t.length;r++)n=t[r],n>=u&&n<A&&(A=n);var b=y+1;if(A-u>E((i-f)/b))throw new w(p);for(f+=(A-u)*b,u=A,r=0;r<t.length;r++){if(n=t[r],n<u&&++f>i)throw new w(p);if(n===u){var I=f,_=o;while(1){var O=_<=g?a:_>=g+s?s:_-g;if(I<O)break;var N=I-O,M=o-O;v(e,C(R(O+N%M))),I=E(N/M),_+=o}v(e,C(R(I))),g=D(f,b,y===m),f=0,y++}}f++,u++}return S(e,"")};t.exports=function(t){var e,r,n=[],i=I(b(_(t),g,"."),".");for(e=0;e<i.length;e++)r=i[e],v(n,y(f,r)?"xn--"+O(r):r);return S(n,".")}},"605d":function(t,e,r){"use strict";var n=r("da84"),i=r("c6b6");t.exports="process"===i(n.process)},6069:function(t,e,r){"use strict";var n=r("6c59"),i=r("605d");t.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},"60da":function(t,e,r){"use strict";var n=r("83ab"),i=r("e330"),o=r("c65b"),a=r("d039"),s=r("df75"),c=r("7418"),u=r("d1e7"),l=r("7b0b"),h=r("44ad"),d=Object.assign,f=Object.defineProperty,g=i([].concat);t.exports=!d||a((function(){if(n&&1!==d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach((function(t){e[t]=t})),7!==d({},t)[r]||s(d({},e)).join("")!==i}))?function(t,e){var r=l(t),i=arguments.length,a=1,d=c.f,f=u.f;while(i>a){var p,m=h(arguments[a++]),w=d?g(s(m),d(m)):s(m),y=w.length,E=0;while(y>E)p=w[E++],n&&!o(f,m,p)||(r[p]=m[p])}return r}:d},6374:function(t,e,r){"use strict";var n=r("da84"),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},6547:function(t,e,r){"use strict";var n=r("e330"),i=r("5926"),o=r("577e"),a=r("1d80"),s=n("".charAt),c=n("".charCodeAt),u=n("".slice),l=function(t){return function(e,r){var n,l,h=o(a(e)),d=i(r),f=h.length;return d<0||d>=f?t?"":void 0:(n=c(h,d),n<55296||n>56319||d+1===f||(l=c(h,d+1))<56320||l>57343?t?s(h,d):n:t?u(h,d,d+2):l-56320+(n-55296<<10)+65536)}};t.exports={codeAt:l(!1),charAt:l(!0)}},6566:function(t,e,r){"use strict";var n=r("7c73"),i=r("edd0"),o=r("6964"),a=r("0366"),s=r("19aa"),c=r("7234"),u=r("2266"),l=r("c6d2"),h=r("4754"),d=r("2626"),f=r("83ab"),g=r("f183").fastKey,p=r("69f3"),m=p.set,w=p.getterFor;t.exports={getConstructor:function(t,e,r,l){var h=t((function(t,i){s(t,d),m(t,{type:e,index:n(null),first:void 0,last:void 0,size:0}),f||(t.size=0),c(i)||u(i,t[l],{that:t,AS_ENTRIES:r})})),d=h.prototype,p=w(e),y=function(t,e,r){var n,i,o=p(t),a=E(t,e);return a?a.value=r:(o.last=a={index:i=g(e,!0),key:e,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=a),n&&(n.next=a),f?o.size++:t.size++,"F"!==i&&(o.index[i]=a)),t},E=function(t,e){var r,n=p(t),i=g(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key===e)return r};return o(d,{clear:function(){var t=this,e=p(t),r=e.first;while(r)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),r=r.next;e.first=e.last=void 0,e.index=n(null),f?e.size=0:t.size=0},delete:function(t){var e=this,r=p(e),n=E(e,t);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first===n&&(r.first=i),r.last===n&&(r.last=o),f?r.size--:e.size--}return!!n},forEach:function(t){var e,r=p(this),n=a(t,arguments.length>1?arguments[1]:void 0);while(e=e?e.next:r.first){n(e.value,e.key,this);while(e&&e.removed)e=e.previous}},has:function(t){return!!E(this,t)}}),o(d,r?{get:function(t){var e=E(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),f&&i(d,"size",{configurable:!0,get:function(){return p(this).size}}),h},setStrong:function(t,e,r){var n=e+" Iterator",i=w(e),o=w(n);l(t,e,(function(t,e){m(this,{type:n,target:t,state:i(t),kind:e,last:void 0})}),(function(){var t=o(this),e=t.kind,r=t.last;while(r&&r.removed)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?h("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=void 0,h(void 0,!0))}),r?"entries":"values",!r,!0),d(e)}}},"65f0":function(t,e,r){"use strict";var n=r("0b42");t.exports=function(t,e){return new(n(t))(0===e?0:e)}},"68ee":function(t,e,r){"use strict";var n=r("e330"),i=r("d039"),o=r("1626"),a=r("f5df"),s=r("d066"),c=r("8925"),u=function(){},l=s("Reflect","construct"),h=/^\s*(?:class|function)\b/,d=n(h.exec),f=!h.test(u),g=function(t){if(!o(t))return!1;try{return l(u,[],t),!0}catch(e){return!1}},p=function(t){if(!o(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!d(h,c(t))}catch(e){return!0}};p.sham=!0,t.exports=!l||i((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?p:g},6964:function(t,e,r){"use strict";var n=r("cb2d");t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},"69f3":function(t,e,r){"use strict";var n,i,o,a=r("cdce"),s=r("da84"),c=r("861d"),u=r("9112"),l=r("1a2d"),h=r("c6cd"),d=r("f772"),f=r("d012"),g="Object already initialized",p=s.TypeError,m=s.WeakMap,w=function(t){return o(t)?i(t):n(t,{})},y=function(t){return function(e){var r;if(!c(e)||(r=i(e)).type!==t)throw new p("Incompatible receiver, "+t+" required");return r}};if(a||h.state){var E=h.state||(h.state=new m);E.get=E.get,E.has=E.has,E.set=E.set,n=function(t,e){if(E.has(t))throw new p(g);return e.facade=t,E.set(t,e),e},i=function(t){return E.get(t)||{}},o=function(t){return E.has(t)}}else{var C=d("state");f[C]=!0,n=function(t,e){if(l(t,C))throw new p(g);return e.facade=t,u(t,C,e),e},i=function(t){return l(t,C)?t[C]:{}},o=function(t){return l(t,C)}}t.exports={set:n,get:i,has:o,enforce:w,getterFor:y}},"6b75":function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}r.d(e,"a",(function(){return n}))},"6c59":function(t,e,r){"use strict";t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},"6d61":function(t,e,r){"use strict";var n=r("23e7"),i=r("da84"),o=r("e330"),a=r("94ca"),s=r("cb2d"),c=r("f183"),u=r("2266"),l=r("19aa"),h=r("1626"),d=r("7234"),f=r("861d"),g=r("d039"),p=r("1c7e"),m=r("d44e"),w=r("7156");t.exports=function(t,e,r){var y=-1!==t.indexOf("Map"),E=-1!==t.indexOf("Weak"),C=y?"set":"add",A=i[t],S=A&&A.prototype,v=A,b={},I=function(t){var e=o(S[t]);s(S,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(E&&!f(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return E&&!f(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(E&&!f(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})},_=a(t,!h(A)||!(E||S.forEach&&!g((function(){(new A).entries().next()}))));if(_)v=r.getConstructor(e,t,y,C),c.enable();else if(a(t,!0)){var T=new v,R=T[C](E?{}:-0,1)!==T,D=g((function(){T.has(1)})),O=p((function(t){new A(t)})),N=!E&&g((function(){var t=new A,e=5;while(e--)t[C](e,e);return!t.has(-0)}));O||(v=e((function(t,e){l(t,S);var r=w(new A,t,v);return d(e)||u(e,r[C],{that:r,AS_ENTRIES:y}),r})),v.prototype=S,S.constructor=v),(D||N)&&(I("delete"),I("has"),y&&I("get")),(N||R)&&I(C),E&&S.clear&&delete S.clear}return b[t]=v,n({global:!0,constructor:!0,forced:v!==A},b),m(v,t),E||r.setStrong(v,t,y),v}},"6f19":function(t,e,r){"use strict";var n=r("9112"),i=r("0d26"),o=r("b980"),a=Error.captureStackTrace;t.exports=function(t,e,r,s){o&&(a?a(t,e):n(t,"stack",i(r,s)))}},"6f48":function(t,e,r){"use strict";var n=r("6d61"),i=r("6566");n("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},7149:function(t,e,r){"use strict";var n=r("23e7"),i=r("d066"),o=r("c430"),a=r("d256"),s=r("4738").CONSTRUCTOR,c=r("cdf9"),u=i("Promise"),l=o&&!s;n({target:"Promise",stat:!0,forced:o||s},{resolve:function(t){return c(l&&this===u?a:this,t)}})},7156:function(t,e,r){"use strict";var n=r("1626"),i=r("861d"),o=r("d2bb");t.exports=function(t,e,r){var a,s;return o&&n(a=e.constructor)&&a!==r&&i(s=a.prototype)&&s!==r.prototype&&o(t,s),t}},7234:function(t,e,r){"use strict";t.exports=function(t){return null===t||void 0===t}},7282:function(t,e,r){"use strict";var n=r("e330"),i=r("59ed");t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(o){}}},7418:function(t,e,r){"use strict";e.f=Object.getOwnPropertySymbols},7839:function(t,e,r){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"785a":function(t,e,r){"use strict";var n=r("cc12"),i=n("span").classList,o=i&&i.constructor&&i.constructor.prototype;t.exports=o===Object.prototype?void 0:o},"7a23":function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return rt}));var i=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},o=(t,e,r)=>(i(t,e,"read from private field"),r?r.call(t):e.get(t)),a=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},s=(t,e,r,n)=>(i(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);const c=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function u(t){return t.join("|")}function l(t){const e=h(t);let r=0,n=c.length-1;for(;r<=n;){const t=Math.floor((r+n)/2),i=c[t],o=h(i);if(o===e)return i;o<e?r=t+1:n=t-1}return"None"}function h(t){return t.toLowerCase().replace(/_-\[\]/g,"")}function d(t,e){return t.Binarizer[e]}function f(t,e){return t.CharacterSet[e]}const g=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function p(t){return g[t.value]}function m(t,e){return t.EanAddOnSymbol[e]}function w(t,e){return t.TextMode[e]}const y={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function E(t,e){return{...e,formats:u(e.formats),binarizer:d(t,e.binarizer),eanAddOnSymbol:m(t,e.eanAddOnSymbol),textMode:w(t,e.textMode),characterSet:f(t,e.characterSet)}}function C(t){return{...t,format:l(t.format),eccLevel:t.eccLevel,contentType:p(t.contentType)}}const A={locateFile:(t,e)=>{const r=t.match(/_(.+?)\.wasm$/);return r?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.4/dist/${r[1]}/${t}`:e+t}};let S=new WeakMap;function v(t,e){var r;const n=S.get(t);if(null!=n&&n.modulePromise&&(void 0===e||Object.is(e,n.moduleOverrides)))return n.modulePromise;const i=null!=(r=null!=e?e:null==n?void 0:n.moduleOverrides)?r:A,o=t({...i});return S.set(t,{moduleOverrides:i,modulePromise:o}),o}async function b(t,e,r=y){const n={...y,...r},i=await v(t),{size:o}=e,a=new Uint8Array(await e.arrayBuffer()),s=i._malloc(o);i.HEAPU8.set(a,s);const c=i.readBarcodesFromImage(s,o,E(i,n));i._free(s);const u=[];for(let l=0;l<c.size();++l)u.push(C(c.get(l)));return u}async function I(t,e,r=y){const n={...y,...r},i=await v(t),{data:o,width:a,height:s,data:{byteLength:c}}=e,u=i._malloc(c);i.HEAPU8.set(o,u);const l=i.readBarcodesFromPixmap(u,a,s,E(i,n));i._free(u);const h=[];for(let d=0;d<l.size();++d)h.push(C(l.get(d)));return h}y.formats;var _=(()=>{var e=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(r={}){var i,o,a=r;a.ready=new Promise((t,e)=>{i=t,o=e});var s=Object.assign({},a),c="./this.program",u="object"==typeof window,l=typeof Bun<"u",h="function"==typeof importScripts;"object"==typeof t&&"object"==typeof t.versions&&t.versions.node;var d,f="";function g(t){return a.locateFile?a.locateFile(t,f):f+t}(u||h||l)&&(h?f=self.location.href:typeof document<"u"&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=f.startsWith("blob:")?"":f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1),h&&(d=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}));var p,m=a.print||console.log.bind(console),w=a.printErr||console.error.bind(console);Object.assign(a,s),s=null,a.arguments&&a.arguments,a.thisProgram&&(c=a.thisProgram),a.quit&&a.quit,a.wasmBinary&&(p=a.wasmBinary),"object"!=typeof WebAssembly&&V("no native wasm support detected");var y,E,C,A,S,v,b,I,_,T=!1;function R(){var t=y.buffer;a.HEAP8=E=new Int8Array(t),a.HEAP16=A=new Int16Array(t),a.HEAPU8=C=new Uint8Array(t),a.HEAPU16=S=new Uint16Array(t),a.HEAP32=v=new Int32Array(t),a.HEAPU32=b=new Uint32Array(t),a.HEAPF32=I=new Float32Array(t),a.HEAPF64=_=new Float64Array(t)}var D=[],O=[],N=[];function M(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)x(a.preRun.shift());q(D)}function P(){q(O)}function L(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)k(a.postRun.shift());q(N)}function x(t){D.unshift(t)}function B(t){O.unshift(t)}function k(t){N.unshift(t)}var F=0,U=null;function j(t){var e;F++,null===(e=a.monitorRunDependencies)||void 0===e||e.call(a,F)}function H(t){var e;if(F--,null===(e=a.monitorRunDependencies)||void 0===e||e.call(a,F),0==F&&U){var r=U;U=null,r()}}function V(t){var e;null===(e=a.onAbort)||void 0===e||e.call(a,t),t="Aborted("+t+")",w(t),T=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw o(r),r}var z,W="data:application/octet-stream;base64,",G=t=>t.startsWith(W);function Y(t){if(t==z&&p)return new Uint8Array(p);if(d)return d(t);throw"both async and sync fetching of the wasm failed"}function X(t){return!p&&(u||h||l)&&"function"==typeof fetch?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw`failed to load wasm binary file at '${t}'`;return e.arrayBuffer()}).catch(()=>Y(t)):Promise.resolve().then(()=>Y(t))}function $(t,e,r){return X(t).then(t=>WebAssembly.instantiate(t,e)).then(r,t=>{w("failed to asynchronously prepare wasm: "+t),V(t)})}function Z(t,e,r,n){return t||"function"!=typeof WebAssembly.instantiateStreaming||G(e)||"function"!=typeof fetch?$(e,r,n):fetch(e,{credentials:"same-origin"}).then(t=>{var i=WebAssembly.instantiateStreaming(t,r);return i.then(n,(function(t){return w("wasm streaming compile failed: "+t),w("falling back to ArrayBuffer instantiation"),$(e,r,n)}))})}function Q(){var t={a:nn};function e(t,e){return on=t.exports,y=on.ma,R(),ge=on.qa,B(on.na),H(),on}function r(t){e(t.instance)}if(j(),a.instantiateWasm)try{return a.instantiateWasm(t,e)}catch(n){w("Module.instantiateWasm callback failed with error: "+n),o(n)}return Z(p,z,t,r).catch(o),{}}z="zxing_reader.wasm",G(z)||(z=g(z));var q=t=>{for(;t.length>0;)t.shift()(a)};a.noExitRuntime;var K=[],J=0,tt=t=>{var e=new nt(t);return e.get_caught()||(e.set_caught(!0),J--),e.set_rethrown(!1),K.push(e),gn(e.excPtr),e.get_exception_ptr()},et=0,rt=()=>{un(0,0);var t=K.pop();fn(t.excPtr),et=0};class nt{constructor(t){this.excPtr=t,this.ptr=t-24}set_type(t){b[this.ptr+4>>2]=t}get_type(){return b[this.ptr+4>>2]}set_destructor(t){b[this.ptr+8>>2]=t}get_destructor(){return b[this.ptr+8>>2]}set_caught(t){t=t?1:0,E[this.ptr+12]=t}get_caught(){return 0!=E[this.ptr+12]}set_rethrown(t){t=t?1:0,E[this.ptr+13]=t}get_rethrown(){return 0!=E[this.ptr+13]}init(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e)}set_adjusted_ptr(t){b[this.ptr+16>>2]=t}get_adjusted_ptr(){return b[this.ptr+16>>2]}get_exception_ptr(){var t=mn(this.get_type());if(t)return b[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var it=t=>{throw et||(et=t),et},ot=t=>{var e=et;if(!e)return ln(0),0;var r=new nt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return ln(0),e;for(var i in t){var o=t[i];if(0===o||o===n)break;var a=r.ptr+16;if(pn(o,n,a))return ln(o),e}return ln(n),e},at=()=>ot([]),st=t=>ot([t]),ct=(t,e)=>ot([t,e]),ut=()=>{var t=K.pop();t||V("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(K.push(t),t.set_rethrown(!0),t.set_caught(!1),J++),et=e,et},lt=(t,e,r)=>{var n=new nt(t);throw n.init(e,r),et=t,J++,et},ht=()=>J,dt={},ft=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function gt(t){return this.fromWireType(b[t>>2])}var pt,mt,wt,yt={},Et={},Ct={},At=t=>{throw new pt(t)},St=(t,e,r)=>{function n(e){var n=r(e);n.length!==t.length&&At("Mismatched type converter count");for(var i=0;i<t.length;++i)Dt(t[i],n[i])}t.forEach((function(t){Ct[t]=e}));var i=new Array(e.length),o=[],a=0;e.forEach((t,e)=>{Et.hasOwnProperty(t)?i[e]=Et[t]:(o.push(t),yt.hasOwnProperty(t)||(yt[t]=[]),yt[t].push(()=>{i[e]=Et[t],++a,a===o.length&&n(i)}))}),0===o.length&&n(i)},vt=t=>{var e=dt[t];delete dt[t];var r=e.rawConstructor,n=e.rawDestructor,i=e.fields,o=i.map(t=>t.getterReturnType).concat(i.map(t=>t.setterArgumentType));St([t],o,t=>{var o={};return i.forEach((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,c=e.getterContext,u=t[r+i.length],l=e.setter,h=e.setterContext;o[n]={read:t=>a.fromWireType(s(c,t)),write:(t,e)=>{var r=[];l(h,t,u.toWireType(r,e)),ft(r)}}}),[{name:e.name,fromWireType:t=>{var e={};for(var r in o)e[r]=o[r].read(t);return n(t),e},toWireType:(t,e)=>{for(var i in o)if(!(i in e))throw new TypeError(`Missing field: "${i}"`);var a=r();for(i in o)o[i].write(a,e[i]);return null!==t&&t.push(n,a),a},argPackAdvance:Nt,readValueFromPointer:gt,destructorFunction:n}]})},bt=(t,e,r,n,i)=>{},It=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);mt=t},_t=t=>{for(var e="",r=t;C[r];)e+=mt[C[r++]];return e},Tt=t=>{throw new wt(t)};function Rt(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=e.name;if(t||Tt(`type "${n}" must have a positive integer typeid pointer`),Et.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;Tt(`Cannot register type '${n}' twice`)}if(Et[t]=e,delete Ct[t],yt.hasOwnProperty(t)){var i=yt[t];delete yt[t],i.forEach(t=>t())}}function Dt(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Rt(t,e,r)}var Ot,Nt=8,Mt=(t,e,r,n)=>{e=_t(e),Dt(t,{name:e,fromWireType:function(t){return!!t},toWireType:function(t,e){return e?r:n},argPackAdvance:Nt,readValueFromPointer:function(t){return this.fromWireType(C[t])},destructorFunction:null})},Pt=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Lt=t=>{function e(t){return t.$$.ptrType.registeredClass.name}Tt(e(t)+" instance already deleted")},xt=!1,Bt=t=>{},kt=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Ft=t=>{t.count.value-=1;var e=0===t.count.value;e&&kt(t)},Ut=(t,e,r)=>{if(e===r)return t;if(void 0===r.baseClass)return null;var n=Ut(t,e,r.baseClass);return null===n?null:r.downcast(n)},jt={},Ht=()=>Object.keys(Xt).length,Vt=()=>{var t=[];for(var e in Xt)Xt.hasOwnProperty(e)&&t.push(Xt[e]);return t},zt=[],Wt=()=>{for(;zt.length;){var t=zt.pop();t.$$.deleteScheduled=!1,t.delete()}},Gt=t=>{Ot=t,zt.length&&Ot&&Ot(Wt)},Yt=()=>{a.getInheritedInstanceCount=Ht,a.getLiveInheritedInstances=Vt,a.flushPendingDeletes=Wt,a.setDelayFunction=Gt},Xt={},$t=(t,e)=>{for(void 0===e&&Tt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},Zt=(t,e)=>(e=$t(t,e),Xt[e]),Qt=(t,e)=>{(!e.ptrType||!e.ptr)&&At("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&At("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Kt(Object.create(t,{$$:{value:e,writable:!0}}))};function qt(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Zt(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function i(){return this.isSmartPointer?Qt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Qt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o,a=this.registeredClass.getActualType(e),s=jt[a];if(!s)return i.call(this);o=this.isConst?s.constPointerType:s.pointerType;var c=Ut(e,this.registeredClass,o.registeredClass);return null===c?i.call(this):this.isSmartPointer?Qt(o.registeredClass.instancePrototype,{ptrType:o,ptr:c,smartPtrType:this,smartPtr:t}):Qt(o.registeredClass.instancePrototype,{ptrType:o,ptr:c})}var Kt=t=>typeof FinalizationRegistry>"u"?(Kt=t=>t,t):(xt=new FinalizationRegistry(t=>{Ft(t.$$)}),Kt=t=>{var e=t.$$,r=!!e.smartPtr;if(r){var n={$$:e};xt.register(t,n,t)}return t},Bt=t=>xt.unregister(t),Kt(t)),Jt=()=>{Object.assign(te.prototype,{isAliasOf(t){if(!(this instanceof te)||!(t instanceof te))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,i=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return e===n&&r===i},clone(){if(this.$$.ptr||Lt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Kt(Object.create(Object.getPrototypeOf(this),{$$:{value:Pt(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Lt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Tt("Object already scheduled for deletion"),Bt(this),Ft(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Lt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Tt("Object already scheduled for deletion"),zt.push(this),1===zt.length&&Ot&&Ot(Wt),this.$$.deleteScheduled=!0,this}})};function te(){}var ee=(t,e)=>Object.defineProperty(e,"name",{value:t}),re=(t,e,r)=>{if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return t[e].overloadTable.hasOwnProperty(i.length)||Tt(`Function '${r}' called with an invalid number of arguments (${i.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[i.length].apply(this,i)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},ne=(t,e,r)=>{a.hasOwnProperty(t)?((void 0===r||void 0!==a[t].overloadTable&&void 0!==a[t].overloadTable[r])&&Tt(`Cannot register public name '${t}' twice`),re(a,t,t),a.hasOwnProperty(r)&&Tt(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),a[t].overloadTable[r]=e):(a[t]=e,void 0!==r&&(a[t].numArguments=r))},ie=48,oe=57,ae=t=>{if(void 0===t)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=ie&&e<=oe?"_"+t:t};function se(t,e,r,n,i,o,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}var ce=(t,e,r)=>{for(;e!==r;)e.upcast||Tt(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function ue(t,e){if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),0;e.$$||Tt(`Cannot pass "${Ge(e)}" as a ${this.name}`),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass,n=ce(e.$$.ptr,r,this.registeredClass);return n}function le(t,e){var r;if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;(!e||!e.$$)&&Tt(`Cannot pass "${Ge(e)}" as a ${this.name}`),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&Tt(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=ce(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&Tt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:Tt(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var i=e.clone();r=this.rawShare(r,Fe.toHandle(()=>i.delete())),null!==t&&t.push(this.rawDestructor,r)}break;default:Tt("Unsupporting sharing policy")}return r}function he(t,e){if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),0;e.$$||Tt(`Cannot pass "${Ge(e)}" as a ${this.name}`),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&Tt(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=ce(e.$$.ptr,r,this.registeredClass);return n}var de=()=>{Object.assign(fe.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){var e;null===(e=this.rawDestructor)||void 0===e||e.call(this,t)},argPackAdvance:Nt,readValueFromPointer:gt,fromWireType:qt})};function fe(t,e,r,n,i,o,a,s,c,u,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,i||void 0!==e.baseClass?this.toWireType=le:n?(this.toWireType=ue,this.destructorFunction=null):(this.toWireType=he,this.destructorFunction=null)}var ge,pe,me=(t,e,r)=>{a.hasOwnProperty(t)||At("Replacing nonexistant public symbol"),void 0!==a[t].overloadTable&&void 0!==r?a[t].overloadTable[r]=e:(a[t]=e,a[t].argCount=r)},we=(t,e,r)=>{var n=a["dynCall_"+t];return n(e,...r)},ye=[],Ee=t=>{var e=ye[t];return e||(t>=ye.length&&(ye.length=t+1),ye[t]=e=ge.get(t)),e},Ce=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(t.includes("j"))return we(t,e,r);var n=Ee(e)(...r);return n},Ae=(t,e)=>function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Ce(t,e,n)},Se=(t,e)=>{function r(){return t.includes("j")?Ae(t,e):Ee(e)}t=_t(t);var n=r();return"function"!=typeof n&&Tt(`unknown function pointer with signature ${t}: ${e}`),n},ve=(t,e)=>{var r=ee(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},be=t=>{var e=cn(t),r=_t(e);return an(e),r},Ie=(t,e)=>{var r=[],n={};function i(t){if(!n[t]&&!Et[t]){if(Ct[t])return void Ct[t].forEach(i);r.push(t),n[t]=!0}}throw e.forEach(i),new pe(t+": "+r.map(be).join([", "]))},_e=(t,e,r,n,i,o,a,s,c,u,l,h,d)=>{l=_t(l),o=Se(i,o),s&&(s=Se(a,s)),u&&(u=Se(c,u)),d=Se(h,d);var f=ae(l);ne(f,(function(){Ie(`Cannot construct ${l} due to unbound types`,[n])})),St([t,e,r],n?[n]:[],e=>{var r,i;e=e[0],n?(r=e.registeredClass,i=r.instancePrototype):i=te.prototype;var a=ee(l,(function(){if(Object.getPrototypeOf(this)!==c)throw new wt("Use 'new' to construct "+l);if(void 0===p.constructor_body)throw new wt(l+" has no accessible constructor");for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=p.constructor_body[e.length];if(void 0===n)throw new wt(`Tried to invoke ctor of ${l} with invalid number of parameters (${e.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return n.apply(this,e)})),c=Object.create(i,{constructor:{value:a}});a.prototype=c;var h,g,p=new se(l,a,c,d,r,o,s,u);p.baseClass&&(null!==(g=(h=p.baseClass).__derivedClasses)&&void 0!==g||(h.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var m=new fe(l,p,!0,!1,!1),w=new fe(l+"*",p,!1,!1,!1),y=new fe(l+" const*",p,!1,!0,!1);return jt[t]={pointerType:w,constPointerType:y},me(f,a),[m,w,y]})},Te=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(b[e+4*n>>2]);return r};function Re(t){for(var e=1;e<t.length;++e)if(null!==t[e]&&void 0===t[e].destructorFunction)return!0;return!1}function De(t,e,r,n,i,o){var a=e.length;a<2&&Tt("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=null!==e[1]&&null!==r,c=Re(e),u="void"!==e[0].name,l=a-2,h=new Array(l),d=[],f=[],g=function(){var r;arguments.length!==l&&Tt(`function ${t} called with ${arguments.length} arguments, expected ${l}`),f.length=0,d.length=s?2:1,d[0]=i,s&&(r=e[1].toWireType(f,this),d[1]=r);for(var o=0;o<l;++o)h[o]=e[o+2].toWireType(f,o<0||arguments.length<=o?void 0:arguments[o]),d.push(h[o]);var a=n(...d);function g(t){if(c)ft(f);else for(var n=s?1:2;n<e.length;n++){var i=1===n?r:h[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(i)}if(u)return e[0].fromWireType(t)}return g(a)};return ee(t,g)}var Oe=(t,e,r,n,i,o)=>{var a=Te(e,r);i=Se(n,i),St([],[t],t=>{t=t[0];var r="constructor "+t.name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new wt(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${t.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return t.registeredClass.constructor_body[e-1]=()=>{Ie(`Cannot construct ${t.name} due to unbound types`,a)},St([],a,n=>(n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=De(r,n,null,i,o),[])),[]})},Ne=t=>{t=t.trim();const e=t.indexOf("(");return-1!==e?t.substr(0,e):t},Me=(t,e,r,n,i,o,a,s,c)=>{var u=Te(r,n);e=_t(e),e=Ne(e),o=Se(i,o),St([],[t],t=>{t=t[0];var n=`${t.name}.${e}`;function i(){Ie(`Cannot call ${n} due to unbound types`,u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(i.argCount=r-2,i.className=t.name,c[e]=i):(re(c,e,n),c[e].overloadTable[r-2]=i),St([],u,i=>{var s=De(n,i,t,o,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]}),[]})},Pe=[],Le=[],xe=t=>{t>9&&0===--Le[t+1]&&(Le[t]=void 0,Pe.push(t))},Be=()=>Le.length/2-5-Pe.length,ke=()=>{Le.push(0,1,void 0,1,null,1,!0,1,!1,1),a.count_emval_handles=Be},Fe={toValue:t=>(t||Tt("Cannot use deleted val. handle = "+t),Le[t]),toHandle:t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=Pe.pop()||Le.length;return Le[e]=t,Le[e+1]=1,e}}}},Ue={name:"emscripten::val",fromWireType:t=>{var e=Fe.toValue(t);return xe(t),e},toWireType:(t,e)=>Fe.toHandle(e),argPackAdvance:Nt,readValueFromPointer:gt,destructorFunction:null},je=t=>Dt(t,Ue),He=(t,e,r)=>{switch(e){case 1:return r?function(t){return this.fromWireType(E[t])}:function(t){return this.fromWireType(C[t])};case 2:return r?function(t){return this.fromWireType(A[t>>1])}:function(t){return this.fromWireType(S[t>>1])};case 4:return r?function(t){return this.fromWireType(v[t>>2])}:function(t){return this.fromWireType(b[t>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Ve=(t,e,r,n)=>{function i(){}e=_t(e),i.values={},Dt(t,{name:e,constructor:i,fromWireType:function(t){return this.constructor.values[t]},toWireType:(t,e)=>e.value,argPackAdvance:Nt,readValueFromPointer:He(e,r,n),destructorFunction:null}),ne(e,i)},ze=(t,e)=>{var r=Et[t];return void 0===r&&Tt(`${e} has unknown type ${be(t)}`),r},We=(t,e,r)=>{var n=ze(t,"enum");e=_t(e);var i=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:ee(`${n.name}_${e}`,(function(){}))}});i.values[r]=o,i[e]=o},Ge=t=>{if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t},Ye=(t,e)=>{switch(e){case 4:return function(t){return this.fromWireType(I[t>>2])};case 8:return function(t){return this.fromWireType(_[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Xe=(t,e,r)=>{e=_t(e),Dt(t,{name:e,fromWireType:t=>t,toWireType:(t,e)=>e,argPackAdvance:Nt,readValueFromPointer:Ye(e,r),destructorFunction:null})},$e=(t,e,r,n,i,o,a)=>{var s=Te(e,r);t=_t(t),t=Ne(t),i=Se(n,i),ne(t,(function(){Ie(`Cannot call ${t} due to unbound types`,s)}),e-1),St([],s,r=>{var n=[r[0],null].concat(r.slice(1));return me(t,De(t,n,null,i,o),e-1),[]})},Ze=(t,e,r)=>{switch(e){case 1:return r?t=>E[t]:t=>C[t];case 2:return r?t=>A[t>>1]:t=>S[t>>1];case 4:return r?t=>v[t>>2]:t=>b[t>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Qe=(t,e,r,n,i)=>{e=_t(e);var o=t=>t;if(0===n){var a=32-8*r;o=t=>t<<a>>>a}var s,c=e.includes("unsigned"),u=(t,e)=>{};s=c?function(t,e){return u(e,this.name),e>>>0}:function(t,e){return u(e,this.name),e},Dt(t,{name:e,fromWireType:o,toWireType:s,argPackAdvance:Nt,readValueFromPointer:Ze(e,r,0!==n),destructorFunction:null})},qe=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],i=n[e];function o(t){var e=b[t>>2],r=b[t+4>>2];return new i(E.buffer,r,e)}r=_t(r),Dt(t,{name:r,fromWireType:o,argPackAdvance:Nt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ke=(t,e)=>{je(t)},Je=(t,e,r,n)=>{if(!(n>0))return 0;for(var i=r,o=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343){var c=t.charCodeAt(++a);s=65536+((1023&s)<<10)|1023&c}if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-i},tr=(t,e,r)=>Je(t,C,e,r),er=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},rr=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,nr=(t,e,r)=>{for(var n=e+r,i=e;t[i]&&!(i>=n);)++i;if(i-e>16&&t.buffer&&rr)return rr.decode(t.subarray(e,i));for(var o="";e<i;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var c=63&t[e++];if(a=224==(240&a)?(15&a)<<12|s<<6|c:(7&a)<<18|s<<12|c<<6|63&t[e++],a<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},ir=(t,e)=>t?nr(C,t,e):"",or=(t,e)=>{e=_t(e);var r="std::string"===e;Dt(t,{name:e,fromWireType(t){var e,n=b[t>>2],i=t+4;if(r)for(var o=i,a=0;a<=n;++a){var s=i+a;if(a==n||0==C[s]){var c=s-o,u=ir(o,c);void 0===e?e=u:(e+="\0",e+=u),o=s+1}}else{var l=new Array(n);for(a=0;a<n;++a)l[a]=String.fromCharCode(C[i+a]);e=l.join("")}return an(t),e},toWireType(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n,i="string"==typeof e;i||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||Tt("Cannot pass non-string to std::string"),n=r&&i?er(e):e.length;var o=sn(4+n+1),a=o+4;if(b[o>>2]=n,r&&i)tr(e,a,n+1);else if(i)for(var s=0;s<n;++s){var c=e.charCodeAt(s);c>255&&(an(a),Tt("String has UTF-16 code units that do not fit in 8 bits")),C[a+s]=c}else for(s=0;s<n;++s)C[a+s]=e[s];return null!==t&&t.push(an,o),o},argPackAdvance:Nt,readValueFromPointer:gt,destructorFunction(t){an(t)}})},ar=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,sr=(t,e)=>{for(var r=t,n=r>>1,i=n+e/2;!(n>=i)&&S[n];)++n;if(r=n<<1,r-t>32&&ar)return ar.decode(C.subarray(t,r));for(var o="",a=0;!(a>=e/2);++a){var s=A[t+2*a>>1];if(0==s)break;o+=String.fromCharCode(s)}return o},cr=(t,e,r)=>{var n;if(null!==(n=r)&&void 0!==n||(r=2147483647),r<2)return 0;r-=2;for(var i=e,o=r<2*t.length?r/2:t.length,a=0;a<o;++a){var s=t.charCodeAt(a);A[e>>1]=s,e+=2}return A[e>>1]=0,e-i},ur=t=>2*t.length,lr=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var i=v[t+4*r>>2];if(0==i)break;if(++r,i>=65536){var o=i-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(i)}return n},hr=(t,e,r)=>{var n;if(null!==(n=r)&&void 0!==n||(r=2147483647),r<4)return 0;for(var i=e,o=i+r-4,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343){var c=t.charCodeAt(++a);s=65536+((1023&s)<<10)|1023&c}if(v[e>>2]=s,e+=4,e+4>o)break}return v[e>>2]=0,e-i},dr=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},fr=(t,e,r)=>{var n,i,o,a;r=_t(r),2===e?(n=sr,i=cr,a=ur,o=t=>S[t>>1]):4===e&&(n=lr,i=hr,a=dr,o=t=>b[t>>2]),Dt(t,{name:r,fromWireType:t=>{for(var r,i=b[t>>2],a=t+4,s=0;s<=i;++s){var c=t+4+s*e;if(s==i||0==o(c)){var u=c-a,l=n(a,u);void 0===r?r=l:(r+="\0",r+=l),a=c+e}}return an(t),r},toWireType:(t,n)=>{"string"!=typeof n&&Tt("Cannot pass non-string to C++ string type "+r);var o=a(n),s=sn(4+o+e);return b[s>>2]=o/e,i(n,s+4,o+e),null!==t&&t.push(an,s),s},argPackAdvance:Nt,readValueFromPointer:gt,destructorFunction(t){an(t)}})},gr=(t,e,r,n,i,o)=>{dt[t]={name:_t(e),rawConstructor:Se(r,n),rawDestructor:Se(i,o),fields:[]}},pr=(t,e,r,n,i,o,a,s,c,u)=>{dt[t].fields.push({fieldName:_t(e),getterReturnType:r,getter:Se(n,i),getterContext:o,setterArgumentType:a,setter:Se(s,c),setterContext:u})},mr=(t,e)=>{e=_t(e),Dt(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(t,e)=>{}})},wr=[],yr=(t,e,r,n)=>(t=wr[t],e=Fe.toValue(e),t(null,e,r,n)),Er={},Cr=t=>{var e=Er[t];return void 0===e?_t(t):e},Ar=()=>{if("object"==typeof globalThis)return globalThis;function t(t){t.$$$embind_global$$$=t;var e="object"==typeof $$$embind_global$$$&&t.$$$embind_global$$$==t;return e||delete t.$$$embind_global$$$,e}if("object"==typeof $$$embind_global$$$||("object"==typeof n&&t(n)?$$$embind_global$$$=n:"object"==typeof self&&t(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$))return $$$embind_global$$$;throw Error("unable to get global object.")},Sr=t=>0===t?Fe.toHandle(Ar()):(t=Cr(t),Fe.toHandle(Ar()[t])),vr=t=>{var e=wr.length;return wr.push(t),e},br=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=ze(b[e+4*n>>2],"parameter "+n);return r},Ir=Reflect.construct,_r=(t,e,r)=>{var n=[],i=t.toWireType(n,r);return n.length&&(b[e>>2]=Fe.toHandle(n)),i},Tr=(t,e,r)=>{var n=br(t,e),i=n.shift();t--;var o=new Array(t),a=(e,a,s,c)=>{for(var u=0,l=0;l<t;++l)o[l]=n[l].readValueFromPointer(c+u),u+=n[l].argPackAdvance;var h=1===r?Ir(a,o):a.apply(e,o);return _r(i,s,h)},s=`methodCaller<(${n.map(t=>t.name).join(", ")}) => ${i.name}>`;return vr(ee(s,a))},Rr=t=>{t>9&&(Le[t+1]+=1)},Dr=t=>{var e=Fe.toValue(t);ft(e),xe(t)},Or=(t,e)=>{t=ze(t,"_emval_take_value");var r=t.readValueFromPointer(e);return Fe.toHandle(r)},Nr=()=>{V("")},Mr=(t,e,r)=>C.copyWithin(t,e,e+r),Pr=()=>2147483648,Lr=t=>{var e=y.buffer,r=(t-e.byteLength+65535)/65536;try{return y.grow(r),R(),1}catch{}},xr=t=>{var e=C.length;t>>>=0;var r=Pr();if(t>r)return!1;for(var n=(t,e)=>t+(e-t%e)%e,i=1;i<=4;i*=2){var o=e*(1+.2/i);o=Math.min(o,t+100663296);var a=Math.min(r,n(Math.max(t,o),65536)),s=Lr(a);if(s)return!0}return!1},Br={},kr=()=>c||"./this.program",Fr=()=>{if(!Fr.strings){var t=("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:kr()};for(var r in Br)void 0===Br[r]?delete e[r]:e[r]=Br[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Fr.strings=n}return Fr.strings},Ur=(t,e)=>{for(var r=0;r<t.length;++r)E[e++]=t.charCodeAt(r);E[e]=0},jr=(t,e)=>{var r=0;return Fr().forEach((n,i)=>{var o=e+r;b[t+4*i>>2]=o,Ur(n,o),r+=n.length+1}),0},Hr=(t,e)=>{var r=Fr();b[t>>2]=r.length;var n=0;return r.forEach(t=>n+=t.length+1),b[e>>2]=n,0},Vr=t=>52;function zr(t,e,r,n,i){return 70}var Wr=[null,[],[]],Gr=(t,e)=>{var r=Wr[t];0===e||10===e?((1===t?m:w)(nr(r,0)),r.length=0):r.push(e)},Yr=(t,e,r,n)=>{for(var i=0,o=0;o<r;o++){var a=b[e>>2],s=b[e+4>>2];e+=8;for(var c=0;c<s;c++)Gr(t,C[a+c]);i+=s}return b[n>>2]=i,0},Xr=t=>t,$r=t=>t%4===0&&(t%100!==0||t%400===0),Zr=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Qr=[31,29,31,30,31,30,31,31,30,31,30,31],qr=[31,28,31,30,31,30,31,31,30,31,30,31],Kr=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=$r(r.getFullYear()),i=r.getMonth(),o=(n?Qr:qr)[i];if(!(e>o-r.getDate()))return r.setDate(r.getDate()+e),r;e-=o-r.getDate()+1,r.setDate(1),i<11?r.setMonth(i+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r};function Jr(t,e,r){var n=r>0?r:er(t)+1,i=new Array(n),o=Je(t,i,0,i.length);return e&&(i.length=o),i}var tn=(t,e)=>{E.set(t,e)},en=(t,e,r,n)=>{var i=b[n+40>>2],o={tm_sec:v[n>>2],tm_min:v[n+4>>2],tm_hour:v[n+8>>2],tm_mday:v[n+12>>2],tm_mon:v[n+16>>2],tm_year:v[n+20>>2],tm_wday:v[n+24>>2],tm_yday:v[n+28>>2],tm_isdst:v[n+32>>2],tm_gmtoff:v[n+36>>2],tm_zone:i?ir(i):""},a=ir(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in s)a=a.replace(new RegExp(c,"g"),s[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(t,e,r){for(var n="number"==typeof t?t.toString():t||"";n.length<e;)n=r[0]+n;return n}function d(t,e){return h(t,e,"0")}function f(t,e){function r(t){return t<0?-1:t>0?1:0}var n;return 0===(n=r(t.getFullYear()-e.getFullYear()))&&0===(n=r(t.getMonth()-e.getMonth()))&&(n=r(t.getDate()-e.getDate())),n}function g(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function p(t){var e=Kr(new Date(t.tm_year+1900,0,1),t.tm_yday),r=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),i=g(r),o=g(n);return f(i,e)<=0?f(o,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var m={"%a":t=>u[t.tm_wday].substring(0,3),"%A":t=>u[t.tm_wday],"%b":t=>l[t.tm_mon].substring(0,3),"%B":t=>l[t.tm_mon],"%C":t=>{var e=t.tm_year+1900;return d(e/100|0,2)},"%d":t=>d(t.tm_mday,2),"%e":t=>h(t.tm_mday,2," "),"%g":t=>p(t).toString().substring(2),"%G":p,"%H":t=>d(t.tm_hour,2),"%I":t=>{var e=t.tm_hour;return 0==e?e=12:e>12&&(e-=12),d(e,2)},"%j":t=>d(t.tm_mday+Zr($r(t.tm_year+1900)?Qr:qr,t.tm_mon-1),3),"%m":t=>d(t.tm_mon+1,2),"%M":t=>d(t.tm_min,2),"%n":()=>"\n","%p":t=>t.tm_hour>=0&&t.tm_hour<12?"AM":"PM","%S":t=>d(t.tm_sec,2),"%t":()=>"\t","%u":t=>t.tm_wday||7,"%U":t=>{var e=t.tm_yday+7-t.tm_wday;return d(Math.floor(e/7),2)},"%V":t=>{var e=Math.floor((t.tm_yday+7-(t.tm_wday+6)%7)/7);if((t.tm_wday+371-t.tm_yday-2)%7<=2&&e++,e){if(53==e){var r=(t.tm_wday+371-t.tm_yday)%7;4!=r&&(3!=r||!$r(t.tm_year))&&(e=1)}}else{e=52;var n=(t.tm_wday+7-t.tm_yday-1)%7;(4==n||5==n&&$r(t.tm_year%400-1))&&e++}return d(e,2)},"%w":t=>t.tm_wday,"%W":t=>{var e=t.tm_yday+7-(t.tm_wday+6)%7;return d(Math.floor(e/7),2)},"%y":t=>(t.tm_year+1900).toString().substring(2),"%Y":t=>t.tm_year+1900,"%z":t=>{var e=t.tm_gmtoff,r=e>=0;return e=Math.abs(e)/60,e=e/60*100+e%60,(r?"+":"-")+("0000"+e).slice(-4)},"%Z":t=>t.tm_zone,"%%":()=>"%"};for(var c in a=a.replace(/%%/g,"\0\0"),m)a.includes(c)&&(a=a.replace(new RegExp(c,"g"),m[c](o)));a=a.replace(/\0\0/g,"%");var w=Jr(a,!1);return w.length>e?0:(tn(w,t),w.length-1)},rn=(t,e,r,n,i)=>en(t,e,r,n);pt=a.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},It(),wt=a.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Jt(),Yt(),de(),pe=a.UnboundTypeError=ve(Error,"UnboundTypeError"),ke();var nn={s:tt,u:rt,b:at,g:st,q:ct,K:ut,f:lt,Y:ht,d:it,ha:vt,U:bt,ba:Mt,fa:_e,ea:Oe,w:Me,aa:je,x:Ve,h:We,O:Xe,P:$e,t:Qe,o:qe,ga:Ke,N:or,C:fr,A:gr,ia:pr,ca:mr,E:yr,ka:xe,la:Sr,M:Tr,Q:Rr,R:Dr,da:Or,B:Nr,$:Mr,Z:xr,W:jr,X:Hr,_:Vr,T:zr,L:Yr,F:Ln,D:vn,G:Pn,m:xn,a:En,e:In,p:Sn,k:Mn,I:On,v:Rn,H:Nn,z:kn,S:Un,l:_n,j:bn,c:An,n:Cn,J:Dn,r:Bn,i:Tn,y:Fn,ja:Xr,V:rn},on=Q(),an=a._free=t=>(an=a._free=on.oa)(t),sn=a._malloc=t=>(sn=a._malloc=on.pa)(t),cn=t=>(cn=on.ra)(t),un=(t,e)=>(un=on.sa)(t,e),ln=t=>(ln=on.ta)(t),hn=()=>(hn=on.ua)(),dn=t=>(dn=on.va)(t),fn=t=>(fn=on.wa)(t),gn=t=>(gn=on.xa)(t),pn=(t,e,r)=>(pn=on.ya)(t,e,r),mn=t=>(mn=on.za)(t);a.dynCall_viijii=(t,e,r,n,i,o,s)=>(a.dynCall_viijii=on.Aa)(t,e,r,n,i,o,s),a.dynCall_jiji=(t,e,r,n,i)=>(a.dynCall_jiji=on.Ba)(t,e,r,n,i);var wn,yn=a.dynCall_jiiii=(t,e,r,n,i)=>(yn=a.dynCall_jiiii=on.Ca)(t,e,r,n,i);function En(t,e){var r=hn();try{return Ee(t)(e)}catch(n){if(dn(r),n!==n+0)throw n;un(1,0)}}function Cn(t,e,r,n){var i=hn();try{Ee(t)(e,r,n)}catch(o){if(dn(i),o!==o+0)throw o;un(1,0)}}function An(t,e,r){var n=hn();try{Ee(t)(e,r)}catch(i){if(dn(n),i!==i+0)throw i;un(1,0)}}function Sn(t,e,r,n){var i=hn();try{return Ee(t)(e,r,n)}catch(o){if(dn(i),o!==o+0)throw o;un(1,0)}}function vn(t,e,r,n,i){var o=hn();try{return Ee(t)(e,r,n,i)}catch(a){if(dn(o),a!==a+0)throw a;un(1,0)}}function bn(t,e){var r=hn();try{Ee(t)(e)}catch(n){if(dn(r),n!==n+0)throw n;un(1,0)}}function In(t,e,r){var n=hn();try{return Ee(t)(e,r)}catch(i){if(dn(n),i!==i+0)throw i;un(1,0)}}function _n(t){var e=hn();try{Ee(t)()}catch(r){if(dn(e),r!==r+0)throw r;un(1,0)}}function Tn(t,e,r,n,i,o,a,s,c,u,l){var h=hn();try{Ee(t)(e,r,n,i,o,a,s,c,u,l)}catch(d){if(dn(h),d!==d+0)throw d;un(1,0)}}function Rn(t,e,r,n,i,o,a){var s=hn();try{return Ee(t)(e,r,n,i,o,a)}catch(c){if(dn(s),c!==c+0)throw c;un(1,0)}}function Dn(t,e,r,n,i){var o=hn();try{Ee(t)(e,r,n,i)}catch(a){if(dn(o),a!==a+0)throw a;un(1,0)}}function On(t,e,r,n,i,o){var a=hn();try{return Ee(t)(e,r,n,i,o)}catch(s){if(dn(a),s!==s+0)throw s;un(1,0)}}function Nn(t,e,r,n,i,o,a,s){var c=hn();try{return Ee(t)(e,r,n,i,o,a,s)}catch(u){if(dn(c),u!==u+0)throw u;un(1,0)}}function Mn(t,e,r,n,i){var o=hn();try{return Ee(t)(e,r,n,i)}catch(a){if(dn(o),a!==a+0)throw a;un(1,0)}}function Pn(t,e,r,n){var i=hn();try{return Ee(t)(e,r,n)}catch(o){if(dn(i),o!==o+0)throw o;un(1,0)}}function Ln(t,e,r,n){var i=hn();try{return Ee(t)(e,r,n)}catch(o){if(dn(i),o!==o+0)throw o;un(1,0)}}function xn(t){var e=hn();try{return Ee(t)()}catch(r){if(dn(e),r!==r+0)throw r;un(1,0)}}function Bn(t,e,r,n,i,o,a,s){var c=hn();try{Ee(t)(e,r,n,i,o,a,s)}catch(u){if(dn(c),u!==u+0)throw u;un(1,0)}}function kn(t,e,r,n,i,o,a,s,c,u,l,h){var d=hn();try{return Ee(t)(e,r,n,i,o,a,s,c,u,l,h)}catch(f){if(dn(d),f!==f+0)throw f;un(1,0)}}function Fn(t,e,r,n,i,o,a,s,c,u,l,h,d,f,g,p){var m=hn();try{Ee(t)(e,r,n,i,o,a,s,c,u,l,h,d,f,g,p)}catch(w){if(dn(m),w!==w+0)throw w;un(1,0)}}function Un(t,e,r,n,i){var o=hn();try{return yn(t,e,r,n,i)}catch(a){if(dn(o),a!==a+0)throw a;un(1,0)}}function jn(){function t(){wn||(wn=!0,a.calledRun=!0,!T&&(P(),i(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),L()))}F>0||(M(),F>0)||(a.setStatus?(a.setStatus("Running..."),setTimeout((function(){setTimeout((function(){a.setStatus("")}),1),t()}),1)):t())}if(a.dynCall_iiiiij=(t,e,r,n,i,o,s)=>(a.dynCall_iiiiij=on.Da)(t,e,r,n,i,o,s),a.dynCall_iiiiijj=(t,e,r,n,i,o,s,c,u)=>(a.dynCall_iiiiijj=on.Ea)(t,e,r,n,i,o,s,c,u),a.dynCall_iiiiiijj=(t,e,r,n,i,o,s,c,u,l)=>(a.dynCall_iiiiiijj=on.Fa)(t,e,r,n,i,o,s,c,u,l),U=function t(){wn||jn(),wn||(U=t)},a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return jn(),r.ready}})();function T(t){return v(_,t)}async function R(t,e){return b(_,t,e)}async function D(t,e){return I(_,t,e)}const O=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],N=[...O,["unknown"]].map(t=>t[0]),M=new Map(O);function P(t){for(const[e,r]of M)if(t===r)return e;return"unknown"}function L(t){if(x(t))return{width:t.naturalWidth,height:t.naturalHeight};if(B(t))return{width:t.width.baseVal.value,height:t.height.baseVal.value};if(k(t))return{width:t.videoWidth,height:t.videoHeight};if(U(t))return{width:t.width,height:t.height};if(H(t))return{width:t.displayWidth,height:t.displayHeight};if(F(t))return{width:t.width,height:t.height};if(j(t))return{width:t.width,height:t.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function x(t){try{return t instanceof HTMLImageElement}catch{return!1}}function B(t){try{return t instanceof SVGImageElement}catch{return!1}}function k(t){try{return t instanceof HTMLVideoElement}catch{return!1}}function F(t){try{return t instanceof HTMLCanvasElement}catch{return!1}}function U(t){try{return t instanceof ImageBitmap}catch{return!1}}function j(t){try{return t instanceof OffscreenCanvas}catch{return!1}}function H(t){try{return t instanceof VideoFrame}catch{return!1}}function V(t){try{return t instanceof Blob}catch{return!1}}function z(t){try{return t instanceof ImageData}catch{return!1}}function W(t,e){try{const r=new OffscreenCanvas(t,e);if(r.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return r;throw void 0}catch{const r=document.createElement("canvas");return r.width=t,r.height=e,r}}async function G(t){if(x(t)&&!await Z(t))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(B(t)&&!await Q(t))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(H(t)&&q(t))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(k(t)&&(0===t.readyState||1===t.readyState))throw new DOMException("Invalid element or state.","InvalidStateError");if(U(t)&&J(t))throw new DOMException("The image source is detached.","InvalidStateError");const{width:e,height:r}=L(t);if(0===e||0===r)return null;const n=W(e,r).getContext("2d");n.drawImage(t,0,0);try{return n.getImageData(0,0,e,r)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Y(t){let e;try{if(globalThis.createImageBitmap)e=await createImageBitmap(t);else{if(!globalThis.Image)return t;{e=new Image;let r="";try{r=URL.createObjectURL(t),e.src=r,await e.decode()}finally{URL.revokeObjectURL(r)}}}}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await G(e)}function X(t){const{width:e,height:r}=t;if(0===e||0===r)return null;const n=t.getContext("2d");try{return n.getImageData(0,0,e,r)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function $(t){if(V(t))return await Y(t);if(z(t)){if(K(t))throw new DOMException("The image data has been detached.","InvalidStateError");return t}return F(t)||j(t)?X(t):await G(t)}async function Z(t){try{return await t.decode(),!0}catch{return!1}}async function Q(t){var e;try{return await(null==(e=t.decode)?void 0:e.call(t)),!0}catch{return!1}}function q(t){return null===t.format}function K(t){return 0===t.data.buffer.byteLength}function J(t){return 0===t.width&&0===t.height}function tt(t,e){return t instanceof DOMException?new DOMException(`${e}: ${t.message}`,t.name):t instanceof Error?new t.constructor(`${e}: ${t.message}`):new Error(`${e}: ${t}`)}var et;class rt extends EventTarget{constructor(t={}){var e;super(),a(this,et,void 0);try{const r=null==(e=null==t?void 0:t.formats)?void 0:e.filter(t=>"unknown"!==t);if(0===(null==r?void 0:r.length))throw new TypeError("Hint option provided, but is empty.");for(const t of null!=r?r:[])if(!M.has(t))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${t}' is not a valid enum value of type BarcodeFormat.`);s(this,et,null!=r?r:[]),T().then(t=>{this.dispatchEvent(new CustomEvent("load",{detail:t}))}).catch(t=>{this.dispatchEvent(new CustomEvent("error",{detail:t}))})}catch(r){throw tt(r,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return N.filter(t=>"unknown"!==t)}async detect(t){try{const r=await $(t);if(null===r)return[];let n;try{n=V(r)?await R(r,{tryHarder:!0,formats:o(this,et).map(t=>M.get(t))}):await D(r,{tryHarder:!0,formats:o(this,et).map(t=>M.get(t))})}catch(e){throw console.error(e),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return n.map(t=>{const{topLeft:{x:e,y:r},topRight:{x:n,y:i},bottomLeft:{x:o,y:a},bottomRight:{x:s,y:c}}=t.position,u=Math.min(e,n,o,s),l=Math.min(r,i,a,c),h=Math.max(e,n,o,s),d=Math.max(r,i,a,c);return{boundingBox:new DOMRectReadOnly(u,l,h-u,d-l),rawValue:t.text,format:P(t.format),cornerPoints:[{x:e,y:r},{x:n,y:i},{x:s,y:c},{x:o,y:a}]}})}catch(r){throw tt(r,"Failed to execute 'detect' on 'BarcodeDetector'")}}}et=new WeakMap}).call(this,r("4362"),r("c8ba"))},"7b0b":function(t,e,r){"use strict";var n=r("1d80"),i=Object;t.exports=function(t){return i(n(t))}},"7c37":function(t,e,r){"use strict";var n=r("605d");t.exports=function(t){try{if(n)return Function('return require("'+t+'")')()}catch(e){}}},"7c73":function(t,e,r){"use strict";var n,i=r("825a"),o=r("37e8"),a=r("7839"),s=r("d012"),c=r("1be4"),u=r("cc12"),l=r("f772"),h=">",d="<",f="prototype",g="script",p=l("IE_PROTO"),m=function(){},w=function(t){return d+g+h+t+d+"/"+g+h},y=function(t){t.write(w("")),t.close();var e=t.parentWindow.Object;return t=null,e},E=function(){var t,e=u("iframe"),r="java"+g+":";return e.style.display="none",c.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(w("document.F=Object")),t.close(),t.F},C=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}C="undefined"!=typeof document?document.domain&&n?y(n):E():y(n);var t=a.length;while(t--)delete C[f][a[t]];return C()};s[p]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(m[f]=i(t),r=new m,m[f]=null,r[p]=t):r=C(),void 0===e?r:o.f(r,e)}},"7db0":function(t,e,r){"use strict";var n=r("23e7"),i=r("b727").find,o=r("44d2"),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(a)},8172:function(t,e,r){"use strict";var n=r("e065"),i=r("57b9");n("toPrimitive"),i()},"825a":function(t,e,r){"use strict";var n=r("861d"),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not an object")}},"83ab":function(t,e,r){"use strict";var n=r("d039");t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,r){"use strict";var n=r("83ab"),i=r("9bf2"),o=r("5c6c");t.exports=function(t,e,r){n?i.f(t,e,o(0,r)):t[e]=r}},"861d":function(t,e,r){"use strict";var n=r("1626");t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},8875:function(t,e,r){var n,i,o;(function(r,a){i=[],n=a,o="function"===typeof n?n.apply(e,i):n,void 0===o||(t.exports=o)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(f){var r,n,i,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,s=o.exec(f.stack)||a.exec(f.stack),c=s&&s[1]||!1,u=s&&s[2]||!1,l=document.location.href.replace(document.location.hash,""),h=document.getElementsByTagName("script");c===l&&(r=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(u-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=r.replace(n,"$1").trim());for(var d=0;d<h.length;d++){if("interactive"===h[d].readyState)return h[d];if(h[d].src===c)return h[d];if(c===l&&h[d].innerHTML&&h[d].innerHTML.trim()===i)return h[d]}return null}}return t}))},"88a7":function(t,e,r){"use strict";var n=r("cb2d"),i=r("e330"),o=r("577e"),a=r("d6d6"),s=URLSearchParams,c=s.prototype,u=i(c.append),l=i(c["delete"]),h=i(c.forEach),d=i([].push),f=new s("a=1&a=2&b=3");f["delete"]("a",1),f["delete"]("b",void 0),f+""!=="a=2"&&n(c,"delete",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=[];h(this,(function(t,e){d(n,{key:e,value:t})})),a(e,1);var i,s=o(t),c=o(r),f=0,g=0,p=!1,m=n.length;while(f<m)i=n[f++],p||i.key===s?(p=!0,l(this,i.key)):g++;while(g<m)i=n[g++],i.key===s&&i.value===c||u(this,i.key,i.value)}),{enumerable:!0,unsafe:!0})},8925:function(t,e,r){"use strict";var n=r("e330"),i=r("1626"),o=r("c6cd"),a=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return a(t)}),t.exports=o.inspectSource},"89d0":function(t,e,r){"use strict";r.d(e,"a",(function(){return n["a"]}));var n=r("7a23");null!=globalThis.BarcodeDetector||(globalThis.BarcodeDetector=n["a"])},"8a79":function(t,e,r){"use strict";var n=r("23e7"),i=r("4625"),o=r("06cf").f,a=r("50c4"),s=r("577e"),c=r("5a34"),u=r("1d80"),l=r("ab13"),h=r("c430"),d=i("".slice),f=Math.min,g=l("endsWith"),p=!h&&!g&&!!function(){var t=o(String.prototype,"endsWith");return t&&!t.writable}();n({target:"String",proto:!0,forced:!p&&!g},{endsWith:function(t){var e=s(u(this));c(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,i=void 0===r?n:f(a(r),n),o=s(t);return d(e,i-o.length,i)===o}})},"8aa5":function(t,e,r){"use strict";var n=r("6547").charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},"8bd4":function(t,e,r){"use strict";var n=r("d066"),i=r("d44e"),o="DOMException";i(n(o),o)},"90d8":function(t,e,r){"use strict";var n=r("c65b"),i=r("1a2d"),o=r("3a9b"),a=r("ad6d"),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||i(t,"flags")||!o(s,t)?e:n(a,t)}},"90e3":function(t,e,r){"use strict";var n=r("e330"),i=0,o=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36)}},9112:function(t,e,r){"use strict";var n=r("83ab"),i=r("9bf2"),o=r("5c6c");t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},9263:function(t,e,r){"use strict";var n=r("c65b"),i=r("e330"),o=r("577e"),a=r("ad6d"),s=r("9f7f"),c=r("5692"),u=r("7c73"),l=r("69f3").get,h=r("fce3"),d=r("107c"),f=c("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,p=g,m=i("".charAt),w=i("".indexOf),y=i("".replace),E=i("".slice),C=function(){var t=/a/,e=/b*/g;return n(g,t,"a"),n(g,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),A=s.BROKEN_CARET,S=void 0!==/()??/.exec("")[1],v=C||S||A||h||d;v&&(p=function(t){var e,r,i,s,c,h,d,v=this,b=l(v),I=o(t),_=b.raw;if(_)return _.lastIndex=v.lastIndex,e=n(p,_,I),v.lastIndex=_.lastIndex,e;var T=b.groups,R=A&&v.sticky,D=n(a,v),O=v.source,N=0,M=I;if(R&&(D=y(D,"y",""),-1===w(D,"g")&&(D+="g"),M=E(I,v.lastIndex),v.lastIndex>0&&(!v.multiline||v.multiline&&"\n"!==m(I,v.lastIndex-1))&&(O="(?: "+O+")",M=" "+M,N++),r=new RegExp("^(?:"+O+")",D)),S&&(r=new RegExp("^"+O+"$(?!\\s)",D)),C&&(i=v.lastIndex),s=n(g,R?r:v,M),R?s?(s.input=E(s.input,N),s[0]=E(s[0],N),s.index=v.lastIndex,v.lastIndex+=s[0].length):v.lastIndex=0:C&&s&&(v.lastIndex=v.global?s.index+s[0].length:i),S&&s&&s.length>1&&n(f,s[0],r,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)})),s&&T)for(s.groups=h=u(null),c=0;c<T.length;c++)d=T[c],h[d[0]]=s[d[1]];return s}),t.exports=p},9436:function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,".qrcode-stream-wrapper[data-v-0ee88866]{width:100%;height:100%;position:relative;z-index:0}.qrcode-stream-overlay[data-v-0ee88866]{width:100%;height:100%;position:absolute;top:0;left:0}.qrcode-stream-camera[data-v-0ee88866]{width:100%;height:100%;display:block;-o-object-fit:cover;object-fit:cover}.qrcode-stream-camera--hidden[data-v-0ee88866]{visibility:hidden;position:absolute}",""]),t.exports=e},"944a":function(t,e,r){"use strict";var n=r("d066"),i=r("e065"),o=r("d44e");i("toStringTag"),o(n("Symbol"),"Symbol")},9464:function(t,e,r){var n=r("9436");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=r("499e").default;i("f30ec7b0",n,!0,{sourceMap:!1,shadowMode:!1})},"94ca":function(t,e,r){"use strict";var n=r("d039"),i=r("1626"),o=/#|\.prototype\./,a=function(t,e){var r=c[s(t)];return r===l||r!==u&&(i(e)?n(e):!!e)},s=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},9861:function(t,e,r){"use strict";r("5352")},"99af":function(t,e,r){"use strict";var n=r("23e7"),i=r("d039"),o=r("e8b5"),a=r("861d"),s=r("7b0b"),c=r("07fa"),u=r("3511"),l=r("8418"),h=r("65f0"),d=r("1dde"),f=r("b622"),g=r("2d00"),p=f("isConcatSpreadable"),m=g>=51||!i((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),w=function(t){if(!a(t))return!1;var e=t[p];return void 0!==e?!!e:o(t)},y=!m||!d("concat");n({target:"Array",proto:!0,arity:1,forced:y},{concat:function(t){var e,r,n,i,o,a=s(this),d=h(a,0),f=0;for(e=-1,n=arguments.length;e<n;e++)if(o=-1===e?a:arguments[e],w(o))for(i=c(o),u(f+i),r=0;r<i;r++,f++)r in o&&l(d,f,o[r]);else u(f+1),l(d,f++,o);return d.length=f,d}})},"9a1f":function(t,e,r){"use strict";var n=r("c65b"),i=r("59ed"),o=r("825a"),a=r("0d51"),s=r("35a1"),c=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(i(r))return o(n(r,t));throw new c(a(t)+" is not iterable")}},"9bdd":function(t,e,r){"use strict";var n=r("825a"),i=r("2a62");t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(a){i(t,"throw",a)}}},"9bf2":function(t,e,r){"use strict";var n=r("83ab"),i=r("0cfb"),o=r("aed9"),a=r("825a"),s=r("a04b"),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",f="writable";e.f=n?o?function(t,e,r){if(a(t),e=s(e),a(r),"function"===typeof t&&"prototype"===e&&"value"in r&&f in r&&!r[f]){var n=l(t,e);n&&n[f]&&(t[e]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:h in r?r[h]:n[h],writable:!1})}return u(t,e,r)}:u:function(t,e,r){if(a(t),e=s(e),a(r),i)try{return u(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},"9f7f":function(t,e,r){"use strict";var n=r("d039"),i=r("da84"),o=i.RegExp,a=n((function(){var t=o("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),s=a||n((function(){return!o("a","y").sticky})),c=a||n((function(){var t=o("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:c,MISSED_STICKY:s,UNSUPPORTED_Y:a}},a04b:function(t,e,r){"use strict";var n=r("c04e"),i=r("d9b5");t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},a180:function(t,e,r){"use strict";r.d(e,"a",(function(){return l})),r.d(e,"b",(function(){return d})),r.d(e,"c",(function(){return f}));var n=r("c7eb"),i=r("1da1"),o=r("3835"),a=(r("caad"),r("2532"),r("2ca0"),r("89d0")),s=r("1cc0"),c=r("c036"),u=function(t){if(t.length>0){var e=Object(o["a"])(t,1),r=e[0],n=Object(o["a"])(r.cornerPoints,4),i=n[0],a=n[1],s=n[2],c=n[3];return{content:r.rawValue,location:{topLeftCorner:i,topRightCorner:a,bottomRightCorner:s,bottomLeftCorner:c,topLeftFinderPattern:{},topRightFinderPattern:{},bottomLeftFinderPattern:{}},imageData:null}}return{content:null,location:null,imageData:null}},l=function(t,e){var r=e.detectHandler,o=e.locateHandler,s=e.minDelay,c=e.formats,l=new a["a"]({formats:c}),h=function e(a){return function(){var c=Object(i["a"])(Object(n["a"])().mark((function i(c){var h,d,f,g,p,m,w,y;return Object(n["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!(t.readyState>1)){n.next=13;break}if(h=a.lastScanned,d=a.contentBefore,f=a.locationBefore,!(c-h>=s)){n.next=12;break}return n.next=5,l.detect(t);case 5:g=n.sent,p=u(g),m=p.content,w=p.location,y=p.imageData,null!==m&&m!==d&&r({content:m,location:w,imageData:y}),null===w&&null===f||o(g),window.requestAnimationFrame(e({lastScanned:c,contentBefore:null!==m&&void 0!==m?m:d,locationBefore:w})),n.next=13;break;case 12:window.requestAnimationFrame(e(a));case 13:case"end":return n.stop()}}),i)})));return function(t){return c.apply(this,arguments)}}()};h({contentBefore:null,locationBefore:null,lastScanned:performance.now()})()},h=function(){var t=Object(i["a"])(Object(n["a"])().mark((function t(e){var r;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.startsWith("http")||!1!==e.includes(location.host)){t.next=2;break}throw new s["a"];case 2:return r=document.createElement("img"),r.src=e,t.next=6,Object(c["a"])(r,"load");case 6:return t.abrupt("return",r);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),d=function(){var t=Object(i["a"])(Object(n["a"])().mark((function t(e,r){var i,o;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=new a["a"]({formats:r}),t.next=3,i.detect(e);case 3:return o=t.sent,t.abrupt("return",u(o));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),f=function(){var t=Object(i["a"])(Object(n["a"])().mark((function t(e,r){var i,o,s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=new a["a"]({formats:r}),t.next=3,h(e);case 3:return o=t.sent,t.next=6,i.detect(o);case 6:return s=t.sent,t.abrupt("return",u(s));case 8:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()},a38e:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r("53ca");r("8172"),r("d9e2"),r("efec"),r("a9e3");function i(t,e){if("object"!=Object(n["a"])(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=Object(n["a"])(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function o(t){var e=i(t,"string");return"symbol"==Object(n["a"])(e)?e:e+""}},a434:function(t,e,r){"use strict";var n=r("23e7"),i=r("7b0b"),o=r("23cb"),a=r("5926"),s=r("07fa"),c=r("3a34"),u=r("3511"),l=r("65f0"),h=r("8418"),d=r("083a"),f=r("1dde"),g=f("splice"),p=Math.max,m=Math.min;n({target:"Array",proto:!0,forced:!g},{splice:function(t,e){var r,n,f,g,w,y,E=i(this),C=s(E),A=o(t,C),S=arguments.length;for(0===S?r=n=0:1===S?(r=0,n=C-A):(r=S-2,n=m(p(a(e),0),C-A)),u(C+r-n),f=l(E,n),g=0;g<n;g++)w=A+g,w in E&&h(f,g,E[w]);if(f.length=n,r<n){for(g=A;g<C-n;g++)w=g+n,y=g+r,w in E?E[y]=E[w]:d(E,y);for(g=C;g>C-n+r;g--)d(E,g-1)}else if(r>n)for(g=C-n;g>A;g--)w=g+n-1,y=g+r-1,w in E?E[y]=E[w]:d(E,y);for(g=0;g<r;g++)E[g+A]=arguments[g+2];return c(E,C-n+r),f}})},a4b4:function(t,e,r){"use strict";var n=r("342f");t.exports=/web0s(?!.*chrome)/i.test(n)},a4d3:function(t,e,r){"use strict";r("d9f5"),r("b4f8"),r("c513"),r("e9c4"),r("5a47")},a630:function(t,e,r){"use strict";var n=r("23e7"),i=r("4df4"),o=r("1c7e"),a=!o((function(t){Array.from(t)}));n({target:"Array",stat:!0,forced:a},{from:i})},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},a9e3:function(t,e,r){"use strict";var n=r("23e7"),i=r("c430"),o=r("83ab"),a=r("da84"),s=r("428f"),c=r("e330"),u=r("94ca"),l=r("1a2d"),h=r("7156"),d=r("3a9b"),f=r("d9b5"),g=r("c04e"),p=r("d039"),m=r("241c").f,w=r("06cf").f,y=r("9bf2").f,E=r("408a"),C=r("58a8").trim,A="Number",S=a[A],v=s[A],b=S.prototype,I=a.TypeError,_=c("".slice),T=c("".charCodeAt),R=function(t){var e=g(t,"number");return"bigint"==typeof e?e:D(e)},D=function(t){var e,r,n,i,o,a,s,c,u=g(t,"number");if(f(u))throw new I("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=C(u),e=T(u,0),43===e||45===e){if(r=T(u,2),88===r||120===r)return NaN}else if(48===e){switch(T(u,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+u}for(o=_(u,2),a=o.length,s=0;s<a;s++)if(c=T(o,s),c<48||c>i)return NaN;return parseInt(o,n)}return+u},O=u(A,!S(" 0o1")||!S("0b1")||S("+0x1")),N=function(t){return d(b,t)&&p((function(){E(t)}))},M=function(t){var e=arguments.length<1?0:S(R(t));return N(this)?h(Object(e),this,M):e};M.prototype=b,O&&!i&&(b.constructor=M),n({global:!0,constructor:!0,wrap:!0,forced:O},{Number:M});var P=function(t,e){for(var r,n=o?m(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;n.length>i;i++)l(e,r=n[i])&&!l(t,r)&&y(t,r,w(e,r))};i&&v&&P(s[A],v),(O||i)&&P(s[A],S)},aa1f:function(t,e,r){"use strict";var n=r("83ab"),i=r("d039"),o=r("825a"),a=r("e391"),s=Error.prototype.toString,c=i((function(){if(n){var t=Object.create(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==s.call(t))return!0}return"2: 1"!==s.call({message:1,name:2})||"Error"!==s.call({})}));t.exports=c?function(){var t=o(this),e=a(t.name,"Error"),r=a(t.message);return e?r?e+": "+r:e:r}:s},ab13:function(t,e,r){"use strict";var n=r("b622"),i=n("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[i]=!1,"/./"[t](e)}catch(n){}}return!1}},ab36:function(t,e,r){"use strict";var n=r("861d"),i=r("9112");t.exports=function(t,e){n(e)&&"cause"in e&&i(t,"cause",e.cause)}},ac1f:function(t,e,r){"use strict";var n=r("23e7"),i=r("9263");n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},ad6d:function(t,e,r){"use strict";var n=r("825a");t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},addb:function(t,e,r){"use strict";var n=r("f36a"),i=Math.floor,o=function(t,e){var r=t.length;if(r<8){var a,s,c=1;while(c<r){s=c,a=t[c];while(s&&e(t[s-1],a)>0)t[s]=t[--s];s!==c++&&(t[s]=a)}}else{var u=i(r/2),l=o(n(t,0,u),e),h=o(n(t,u),e),d=l.length,f=h.length,g=0,p=0;while(g<d||p<f)t[g+p]=g<d&&p<f?e(l[g],h[p])<=0?l[g++]:h[p++]:g<d?l[g++]:h[p++]}return t};t.exports=o},ae93:function(t,e,r){"use strict";var n,i,o,a=r("d039"),s=r("1626"),c=r("861d"),u=r("7c73"),l=r("e163"),h=r("cb2d"),d=r("b622"),f=r("c430"),g=d("iterator"),p=!1;[].keys&&(o=[].keys(),"next"in o?(i=l(l(o)),i!==Object.prototype&&(n=i)):p=!0);var m=!c(n)||a((function(){var t={};return n[g].call(t)!==t}));m?n={}:f&&(n=u(n)),s(n[g])||h(n,g,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},aeb0:function(t,e,r){"use strict";var n=r("9bf2").f;t.exports=function(t,e,r){r in t||n(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})}},aed9:function(t,e,r){"use strict";var n=r("83ab"),i=r("d039");t.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},b041:function(t,e,r){"use strict";var n=r("00ee"),i=r("f5df");t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},b0c0:function(t,e,r){"use strict";var n=r("83ab"),i=r("5e77").EXISTS,o=r("e330"),a=r("edd0"),s=Function.prototype,c=o(s.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(u.exec),h="name";n&&!i&&a(s,h,{configurable:!0,get:function(){try{return l(u,c(this))[1]}catch(t){return""}}})},b3af:function(t,e,r){"use strict";var n,i,o=r("c7eb"),a=r("1da1"),s=r("89d0"),c={beforeMount:function(){window.BarcodeDetector=s["default"]},methods:{onDetect:function(t){var e=this;return Object(a["a"])(Object(o["a"])().mark((function r(){var n,i;return Object(o["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return e.$emit("detect",t),r.prev=1,r.next=4,t;case 4:n=r.sent,i=n.content,null!==i&&e.$emit("decode",i),r.next=11;break;case 9:r.prev=9,r.t0=r["catch"](1);case 11:case"end":return r.stop()}}),r,null,[[1,9]])})))()}}},u=c,l=r("2877"),h=Object(l["a"])(u,n,i,!1,null,null,null);e["a"]=h.exports},b42e:function(t,e,r){"use strict";var n=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?i:n)(e)}},b4f8:function(t,e,r){"use strict";var n=r("23e7"),i=r("d066"),o=r("1a2d"),a=r("577e"),s=r("5692"),c=r("0b43"),u=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=a(t);if(o(u,e))return u[e];var r=i("Symbol")(e);return u[e]=r,l[r]=e,r}})},b575:function(t,e,r){"use strict";var n,i,o,a,s,c=r("da84"),u=r("157a"),l=r("0366"),h=r("2cf4").set,d=r("01b4"),f=r("1cdc"),g=r("d4c3"),p=r("a4b4"),m=r("605d"),w=c.MutationObserver||c.WebKitMutationObserver,y=c.document,E=c.process,C=c.Promise,A=u("queueMicrotask");if(!A){var S=new d,v=function(){var t,e;m&&(t=E.domain)&&t.exit();while(e=S.get())try{e()}catch(r){throw S.head&&n(),r}t&&t.enter()};f||m||p||!w||!y?!g&&C&&C.resolve?(a=C.resolve(void 0),a.constructor=C,s=l(a.then,a),n=function(){s(v)}):m?n=function(){E.nextTick(v)}:(h=l(h,c),n=function(){h(v)}):(i=!0,o=y.createTextNode(""),new w(v).observe(o,{characterData:!0}),n=function(){o.data=i=!i}),A=function(t){S.head||n(),S.add(t)}}t.exports=A},b622:function(t,e,r){"use strict";var n=r("da84"),i=r("5692"),o=r("1a2d"),a=r("90e3"),s=r("04f8"),c=r("fdbf"),u=n.Symbol,l=i("wks"),h=c?u["for"]||u:u&&u.withoutSetter||a;t.exports=function(t){return o(l,t)||(l[t]=s&&o(u,t)?u[t]:h("Symbol."+t)),l[t]}},b635:function(t,e,r){"use strict";(function(t){r.d(e,"e",(function(){return a}));var n=r("0d0e");r.d(e,"c",(function(){return n["a"]}));var i=r("5c0b");r.d(e,"a",(function(){return i["a"]}));var o=r("fe6b");function a(t){t.component("qrcode-stream",n["a"]),t.component("qrcode-capture",i["a"]),t.component("qrcode-drop-zone",o["a"])}r.d(e,"b",(function(){return o["a"]}));var s={install:a};e["d"]=s;var c=null;"undefined"!==typeof window?c=window.Vue:"undefined"!==typeof t&&(c=t.Vue),c&&c.use(s)}).call(this,r("c8ba"))},b636:function(t,e,r){"use strict";var n=r("e065");n("asyncIterator")},b64b:function(t,e,r){"use strict";var n=r("23e7"),i=r("7b0b"),o=r("df75"),a=r("d039"),s=a((function(){o(1)}));n({target:"Object",stat:!0,forced:s},{keys:function(t){return o(i(t))}})},b727:function(t,e,r){"use strict";var n=r("0366"),i=r("e330"),o=r("44ad"),a=r("7b0b"),s=r("07fa"),c=r("65f0"),u=i([].push),l=function(t){var e=1===t,r=2===t,i=3===t,l=4===t,h=6===t,d=7===t,f=5===t||h;return function(g,p,m,w){for(var y,E,C=a(g),A=o(C),S=s(A),v=n(p,m),b=0,I=w||c,_=e?I(g,S):r||d?I(g,0):void 0;S>b;b++)if((f||b in A)&&(y=A[b],E=v(y,b,C),t))if(e)_[b]=E;else if(E)switch(t){case 3:return!0;case 5:return y;case 6:return b;case 2:u(_,y)}else switch(t){case 4:return!1;case 7:u(_,y)}return h?-1:i||l?l:_}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},b7ef:function(t,e,r){"use strict";var n=r("23e7"),i=r("da84"),o=r("d066"),a=r("5c6c"),s=r("9bf2").f,c=r("1a2d"),u=r("19aa"),l=r("7156"),h=r("e391"),d=r("cf98"),f=r("0d26"),g=r("83ab"),p=r("c430"),m="DOMException",w=o("Error"),y=o(m),E=function(){u(this,C);var t=arguments.length,e=h(t<1?void 0:arguments[0]),r=h(t<2?void 0:arguments[1],"Error"),n=new y(e,r),i=new w(e);return i.name=m,s(n,"stack",a(1,f(i.stack,1))),l(n,this,E),n},C=E.prototype=y.prototype,A="stack"in new w(m),S="stack"in new y(1,2),v=y&&g&&Object.getOwnPropertyDescriptor(i,m),b=!!v&&!(v.writable&&v.configurable),I=A&&!b&&!S;n({global:!0,constructor:!0,forced:p||I},{DOMException:I?E:y});var _=o(m),T=_.prototype;if(T.constructor!==_)for(var R in p||s(T,"constructor",a(1,_)),d)if(c(d,R)){var D=d[R],O=D.s;c(_,O)||s(_,O,a(6,D.c))}},b980:function(t,e,r){"use strict";var n=r("d039"),i=r("5c6c");t.exports=!n((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},bb2f:function(t,e,r){"use strict";var n=r("d039");t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},bee2:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r("a38e");function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Object(n["a"])(i.key),i)}}function o(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}},bf19:function(t,e,r){"use strict";var n=r("23e7"),i=r("c65b");n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},c036:function(t,e,r){"use strict";function n(t,e,r){var n,i;void 0===r&&(r="error");var o=new Promise((function(t,e){n=t,i=e}));return t.addEventListener(e,n),t.addEventListener(r,i),o.finally((function(){t.removeEventListener(e,n),t.removeEventListener(r,i)})),o}function i(t){return new Promise((function(e){return setTimeout(e,t)}))}r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i}))},c04e:function(t,e,r){"use strict";var n=r("c65b"),i=r("861d"),o=r("d9b5"),a=r("dc4a"),s=r("485a"),c=r("b622"),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,c=a(t,l);if(c){if(void 0===e&&(e="default"),r=n(c,t,e),!i(r)||o(r))return r;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},c430:function(t,e,r){"use strict";t.exports=!1},c513:function(t,e,r){"use strict";var n=r("23e7"),i=r("1a2d"),o=r("d9b5"),a=r("0d51"),s=r("5692"),c=r("0b43"),u=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{keyFor:function(t){if(!o(t))throw new TypeError(a(t)+" is not a symbol");if(i(u,t))return u[t]}})},c65b:function(t,e,r){"use strict";var n=r("40d5"),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},c6b6:function(t,e,r){"use strict";var n=r("e330"),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},c6cd:function(t,e,r){"use strict";var n=r("c430"),i=r("da84"),o=r("6374"),a="__core-js_shared__",s=t.exports=i[a]||o(a,{});(s.versions||(s.versions=[])).push({version:"3.36.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"})},c6d2:function(t,e,r){"use strict";var n=r("23e7"),i=r("c65b"),o=r("c430"),a=r("5e77"),s=r("1626"),c=r("dcc3"),u=r("e163"),l=r("d2bb"),h=r("d44e"),d=r("9112"),f=r("cb2d"),g=r("b622"),p=r("3f8c"),m=r("ae93"),w=a.PROPER,y=a.CONFIGURABLE,E=m.IteratorPrototype,C=m.BUGGY_SAFARI_ITERATORS,A=g("iterator"),S="keys",v="values",b="entries",I=function(){return this};t.exports=function(t,e,r,a,g,m,_){c(r,e,a);var T,R,D,O=function(t){if(t===g&&x)return x;if(!C&&t&&t in P)return P[t];switch(t){case S:return function(){return new r(this,t)};case v:return function(){return new r(this,t)};case b:return function(){return new r(this,t)}}return function(){return new r(this)}},N=e+" Iterator",M=!1,P=t.prototype,L=P[A]||P["@@iterator"]||g&&P[g],x=!C&&L||O(g),B="Array"===e&&P.entries||L;if(B&&(T=u(B.call(new t)),T!==Object.prototype&&T.next&&(o||u(T)===E||(l?l(T,E):s(T[A])||f(T,A,I)),h(T,N,!0,!0),o&&(p[N]=I))),w&&g===v&&L&&L.name!==v&&(!o&&y?d(P,"name",v):(M=!0,x=function(){return i(L,this)})),g)if(R={values:O(v),keys:m?x:O(S),entries:O(b)},_)for(D in R)(C||M||!(D in P))&&f(P,D,R[D]);else n({target:e,proto:!0,forced:C||M},R);return o&&!_||P[A]===x||f(P,A,x,{name:g}),p[e]=x,R}},c7eb:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("a4d3"),r("e01a"),r("b636"),r("d28b"),r("944a"),r("d9e2"),r("e260"),r("14d9"),r("fb6a"),r("b0c0"),r("0c47"),r("23dc"),r("3410"),r("1f68"),r("131a"),r("d3b7"),r("e6cf"),r("3ca3"),r("159b"),r("ddb0");var n=r("53ca");function i(){
  2. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  3. i=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var i=e&&e.prototype instanceof E?e:E,o=Object.create(i.prototype),s=new M(n||[]);return a(o,"_invoke",{value:R(t,r,s)}),o}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var g="suspendedStart",p="suspendedYield",m="executing",w="completed",y={};function E(){}function C(){}function A(){}var S={};h(S,c,(function(){return this}));var v=Object.getPrototypeOf,b=v&&v(v(P([])));b&&b!==r&&o.call(b,c)&&(S=b);var I=A.prototype=E.prototype=Object.create(S);function _(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,a,s,c){var u=f(t[i],t,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==Object(n["a"])(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}})}function R(e,r,n){var i=g;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===w){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var c=D(s,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===g)throw i=w,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var u=f(e,r,n);if("normal"===u.type){if(i=n.done?w:p,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=w,n.method="throw",n.arg=u.arg)}}}function D(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,D(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(Object(n["a"])(e)+" is not iterable")}return C.prototype=A,a(I,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:C,configurable:!0}),C.displayName=h(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,h(t,l,"GeneratorFunction")),t.prototype=Object.create(I),t},e.awrap=function(t){return{__await:t}},_(T.prototype),h(T.prototype,u,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new T(d(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(I),h(I,l,"Generator"),h(I,c,(function(){return this})),h(I,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;N(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}},c8ba:function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}t.exports=r},ca84:function(t,e,r){"use strict";var n=r("e330"),i=r("1a2d"),o=r("fc6a"),a=r("4d64").indexOf,s=r("d012"),c=n([].push);t.exports=function(t,e){var r,n=o(t),u=0,l=[];for(r in n)!i(s,r)&&i(n,r)&&c(l,r);while(e.length>u)i(n,r=e[u++])&&(~a(l,r)||c(l,r));return l}},caad:function(t,e,r){"use strict";var n=r("23e7"),i=r("4d64").includes,o=r("d039"),a=r("44d2"),s=o((function(){return!Array(1).includes()}));n({target:"Array",proto:!0,forced:s},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},cb2d:function(t,e,r){"use strict";var n=r("1626"),i=r("9bf2"),o=r("13d2"),a=r("6374");t.exports=function(t,e,r,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:e;if(n(r)&&o(r,u,s),s.global)c?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(c=!0):delete t[e]}catch(l){}c?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},cc12:function(t,e,r){"use strict";var n=r("da84"),i=r("861d"),o=n.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},cc98:function(t,e,r){"use strict";var n=r("23e7"),i=r("c430"),o=r("4738").CONSTRUCTOR,a=r("d256"),s=r("d066"),c=r("1626"),u=r("cb2d"),l=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&c(a)){var h=s("Promise").prototype["catch"];l["catch"]!==h&&u(l,"catch",h,{unsafe:!0})}},cca6:function(t,e,r){"use strict";var n=r("23e7"),i=r("60da");n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},cdce:function(t,e,r){"use strict";var n=r("da84"),i=r("1626"),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},cdf9:function(t,e,r){"use strict";var n=r("825a"),i=r("861d"),o=r("f069");t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t),a=r.resolve;return a(e),r.promise}},cf98:function(t,e,r){"use strict";t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},d012:function(t,e,r){"use strict";t.exports={}},d039:function(t,e,r){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,r){"use strict";var n=r("da84"),i=r("1626"),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},d1e7:function(t,e,r){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!n.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},d256:function(t,e,r){"use strict";var n=r("da84");t.exports=n.Promise},d28b:function(t,e,r){"use strict";var n=r("e065");n("iterator")},d2bb:function(t,e,r){"use strict";var n=r("7282"),i=r("861d"),o=r("1d80"),a=r("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{t=n(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch(s){}return function(r,n){return o(r),a(n),i(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0)},d3b7:function(t,e,r){"use strict";var n=r("00ee"),i=r("cb2d"),o=r("b041");n||i(Object.prototype,"toString",o,{unsafe:!0})},d44e:function(t,e,r){"use strict";var n=r("9bf2").f,i=r("1a2d"),o=r("b622"),a=o("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,a)&&n(t,a,{configurable:!0,value:e})}},d4c3:function(t,e,r){"use strict";var n=r("342f");t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},d4ec:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));r("d9e2");function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},d58f:function(t,e,r){"use strict";var n=r("59ed"),i=r("7b0b"),o=r("44ad"),a=r("07fa"),s=TypeError,c="Reduce of empty array with no initial value",u=function(t){return function(e,r,u,l){var h=i(e),d=o(h),f=a(h);if(n(r),0===f&&u<2)throw new s(c);var g=t?f-1:0,p=t?-1:1;if(u<2)while(1){if(g in d){l=d[g],g+=p;break}if(g+=p,t?g<0:f<=g)throw new s(c)}for(;t?g>=0:f>g;g+=p)g in d&&(l=r(l,d[g],g,h));return l}};t.exports={left:u(!1),right:u(!0)}},d6d6:function(t,e,r){"use strict";var n=TypeError;t.exports=function(t,e){if(t<e)throw new n("Not enough arguments");return t}},d784:function(t,e,r){"use strict";r("ac1f");var n=r("c65b"),i=r("cb2d"),o=r("9263"),a=r("d039"),s=r("b622"),c=r("9112"),u=s("species"),l=RegExp.prototype;t.exports=function(t,e,r,h){var d=s(t),f=!a((function(){var e={};return e[d]=function(){return 7},7!==""[t](e)})),g=f&&!a((function(){var e=!1,r=/a/;return"split"===t&&(r={},r.constructor={},r.constructor[u]=function(){return r},r.flags="",r[d]=/./[d]),r.exec=function(){return e=!0,null},r[d](""),!e}));if(!f||!g||r){var p=/./[d],m=e(d,""[t],(function(t,e,r,i,a){var s=e.exec;return s===o||s===l.exec?f&&!a?{done:!0,value:n(p,e,r,i)}:{done:!0,value:n(t,r,e,i)}:{done:!1}}));i(String.prototype,t,m[0]),i(l,d,m[1])}h&&c(l[d],"sham",!0)}},d81d:function(t,e,r){"use strict";var n=r("23e7"),i=r("b727").map,o=r("1dde"),a=o("map");n({target:"Array",proto:!0,forced:!a},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},d86b:function(t,e,r){"use strict";var n=r("d039");t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},d9b5:function(t,e,r){"use strict";var n=r("d066"),i=r("1626"),o=r("3a9b"),a=r("fdbf"),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&o(e.prototype,s(t))}},d9e2:function(t,e,r){"use strict";var n=r("23e7"),i=r("da84"),o=r("2ba4"),a=r("e5cb"),s="WebAssembly",c=i[s],u=7!==new Error("e",{cause:7}).cause,l=function(t,e){var r={};r[t]=a(t,e,u),n({global:!0,constructor:!0,arity:1,forced:u},r)},h=function(t,e){if(c&&c[t]){var r={};r[t]=a(s+"."+t,e,u),n({target:s,stat:!0,constructor:!0,arity:1,forced:u},r)}};l("Error",(function(t){return function(e){return o(t,this,arguments)}})),l("EvalError",(function(t){return function(e){return o(t,this,arguments)}})),l("RangeError",(function(t){return function(e){return o(t,this,arguments)}})),l("ReferenceError",(function(t){return function(e){return o(t,this,arguments)}})),l("SyntaxError",(function(t){return function(e){return o(t,this,arguments)}})),l("TypeError",(function(t){return function(e){return o(t,this,arguments)}})),l("URIError",(function(t){return function(e){return o(t,this,arguments)}})),h("CompileError",(function(t){return function(e){return o(t,this,arguments)}})),h("LinkError",(function(t){return function(e){return o(t,this,arguments)}})),h("RuntimeError",(function(t){return function(e){return o(t,this,arguments)}}))},d9f5:function(t,e,r){"use strict";var n=r("23e7"),i=r("da84"),o=r("c65b"),a=r("e330"),s=r("c430"),c=r("83ab"),u=r("04f8"),l=r("d039"),h=r("1a2d"),d=r("3a9b"),f=r("825a"),g=r("fc6a"),p=r("a04b"),m=r("577e"),w=r("5c6c"),y=r("7c73"),E=r("df75"),C=r("241c"),A=r("057f"),S=r("7418"),v=r("06cf"),b=r("9bf2"),I=r("37e8"),_=r("d1e7"),T=r("cb2d"),R=r("edd0"),D=r("5692"),O=r("f772"),N=r("d012"),M=r("90e3"),P=r("b622"),L=r("e538"),x=r("e065"),B=r("57b9"),k=r("d44e"),F=r("69f3"),U=r("b727").forEach,j=O("hidden"),H="Symbol",V="prototype",z=F.set,W=F.getterFor(H),G=Object[V],Y=i.Symbol,X=Y&&Y[V],$=i.RangeError,Z=i.TypeError,Q=i.QObject,q=v.f,K=b.f,J=A.f,tt=_.f,et=a([].push),rt=D("symbols"),nt=D("op-symbols"),it=D("wks"),ot=!Q||!Q[V]||!Q[V].findChild,at=function(t,e,r){var n=q(G,e);n&&delete G[e],K(t,e,r),n&&t!==G&&K(G,e,n)},st=c&&l((function(){return 7!==y(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?at:K,ct=function(t,e){var r=rt[t]=y(X);return z(r,{type:H,tag:t,description:e}),c||(r.description=e),r},ut=function(t,e,r){t===G&&ut(nt,e,r),f(t);var n=p(e);return f(r),h(rt,n)?(r.enumerable?(h(t,j)&&t[j][n]&&(t[j][n]=!1),r=y(r,{enumerable:w(0,!1)})):(h(t,j)||K(t,j,w(1,y(null))),t[j][n]=!0),st(t,n,r)):K(t,n,r)},lt=function(t,e){f(t);var r=g(e),n=E(r).concat(pt(r));return U(n,(function(e){c&&!o(dt,r,e)||ut(t,e,r[e])})),t},ht=function(t,e){return void 0===e?y(t):lt(y(t),e)},dt=function(t){var e=p(t),r=o(tt,this,e);return!(this===G&&h(rt,e)&&!h(nt,e))&&(!(r||!h(this,e)||!h(rt,e)||h(this,j)&&this[j][e])||r)},ft=function(t,e){var r=g(t),n=p(e);if(r!==G||!h(rt,n)||h(nt,n)){var i=q(r,n);return!i||!h(rt,n)||h(r,j)&&r[j][n]||(i.enumerable=!0),i}},gt=function(t){var e=J(g(t)),r=[];return U(e,(function(t){h(rt,t)||h(N,t)||et(r,t)})),r},pt=function(t){var e=t===G,r=J(e?nt:g(t)),n=[];return U(r,(function(t){!h(rt,t)||e&&!h(G,t)||et(n,rt[t])})),n};u||(Y=function(){if(d(X,this))throw new Z("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,e=M(t),r=function(t){var n=void 0===this?i:this;n===G&&o(r,nt,t),h(n,j)&&h(n[j],e)&&(n[j][e]=!1);var a=w(1,t);try{st(n,e,a)}catch(s){if(!(s instanceof $))throw s;at(n,e,a)}};return c&&ot&&st(G,e,{configurable:!0,set:r}),ct(e,t)},X=Y[V],T(X,"toString",(function(){return W(this).tag})),T(Y,"withoutSetter",(function(t){return ct(M(t),t)})),_.f=dt,b.f=ut,I.f=lt,v.f=ft,C.f=A.f=gt,S.f=pt,L.f=function(t){return ct(P(t),t)},c&&(R(X,"description",{configurable:!0,get:function(){return W(this).description}}),s||T(G,"propertyIsEnumerable",dt,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:Y}),U(E(it),(function(t){x(t)})),n({target:H,stat:!0,forced:!u},{useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),n({target:"Object",stat:!0,forced:!u,sham:!c},{create:ht,defineProperty:ut,defineProperties:lt,getOwnPropertyDescriptor:ft}),n({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:gt}),B(),k(Y,H),N[j]=!0},da84:function(t,e,r){"use strict";(function(e){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()}).call(this,r("c8ba"))},dbb4:function(t,e,r){"use strict";var n=r("23e7"),i=r("83ab"),o=r("56ef"),a=r("fc6a"),s=r("06cf"),c=r("8418");n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){var e,r,n=a(t),i=s.f,u=o(n),l={},h=0;while(u.length>h)r=i(n,e=u[h++]),void 0!==r&&c(l,e,r);return l}})},dc4a:function(t,e,r){"use strict";var n=r("59ed"),i=r("7234");t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},dcc3:function(t,e,r){"use strict";var n=r("ae93").IteratorPrototype,i=r("7c73"),o=r("5c6c"),a=r("d44e"),s=r("3f8c"),c=function(){return this};t.exports=function(t,e,r,u){var l=e+" Iterator";return t.prototype=i(n,{next:o(+!u,r)}),a(t,l,!1,!0),s[l]=c,t}},ddb0:function(t,e,r){"use strict";var n=r("da84"),i=r("fdbc"),o=r("785a"),a=r("e260"),s=r("9112"),c=r("d44e"),u=r("b622"),l=u("iterator"),h=a.values,d=function(t,e){if(t){if(t[l]!==h)try{s(t,l,h)}catch(n){t[l]=h}if(c(t,e,!0),i[e])for(var r in a)if(t[r]!==a[r])try{s(t,r,a[r])}catch(n){t[r]=a[r]}}};for(var f in i)d(n[f]&&n[f].prototype,f);d(o,"DOMTokenList")},df75:function(t,e,r){"use strict";var n=r("ca84"),i=r("7839");t.exports=Object.keys||function(t){return n(t,i)}},df7c:function(t,e,r){(function(t){function r(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t){"string"!==typeof t&&(t+="");var e,r=0,n=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){r=e+1;break}}else-1===n&&(i=!1,n=e+1);return-1===n?"":t.slice(r,n)}function i(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}e.resolve=function(){for(var e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,n="/"===a.charAt(0))}return e=r(i(e.split("/"),(function(t){return!!t})),!n).join("/"),(n?"/":"")+e||"."},e.normalize=function(t){var n=e.isAbsolute(t),a="/"===o(t,-1);return t=r(i(t.split("/"),(function(t){return!!t})),!n).join("/"),t||n||(t="."),t&&a&&(t+="/"),(n?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(i(t,(function(t,e){if("string"!==typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,r){function n(t){for(var e=0;e<t.length;e++)if(""!==t[e])break;for(var r=t.length-1;r>=0;r--)if(""!==t[r])break;return e>r?[]:t.slice(e,r-e+1)}t=e.resolve(t).substr(1),r=e.resolve(r).substr(1);for(var i=n(t.split("/")),o=n(r.split("/")),a=Math.min(i.length,o.length),s=a,c=0;c<a;c++)if(i[c]!==o[c]){s=c;break}var u=[];for(c=s;c<i.length;c++)u.push("..");return u=u.concat(o.slice(s)),u.join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!==typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,i=!0,o=t.length-1;o>=1;--o)if(e=t.charCodeAt(o),47===e){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},e.basename=function(t,e){var r=n(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){"string"!==typeof t&&(t+="");for(var e=-1,r=0,n=-1,i=!0,o=0,a=t.length-1;a>=0;--a){var s=t.charCodeAt(a);if(47!==s)-1===n&&(i=!1,n=a+1),46===s?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){r=a+1;break}}return-1===e||-1===n||0===o||1===o&&e===n-1&&e===r+1?"":t.slice(e,n)};var o="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,r("4362"))},e01a:function(t,e,r){"use strict";var n=r("23e7"),i=r("83ab"),o=r("da84"),a=r("e330"),s=r("1a2d"),c=r("1626"),u=r("3a9b"),l=r("577e"),h=r("edd0"),d=r("e893"),f=o.Symbol,g=f&&f.prototype;if(i&&c(f)&&(!("description"in g)||void 0!==f().description)){var p={},m=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=u(g,this)?new f(t):void 0===t?f():f(t);return""===t&&(p[e]=!0),e};d(m,f),m.prototype=g,g.constructor=m;var w="Symbol(description detection)"===String(f("description detection")),y=a(g.valueOf),E=a(g.toString),C=/^Symbol\((.*)\)[^)]+$/,A=a("".replace),S=a("".slice);h(g,"description",{configurable:!0,get:function(){var t=y(this);if(s(p,t))return"";var e=E(t),r=w?S(e,7,-1):A(e,C,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:m})}},e065:function(t,e,r){"use strict";var n=r("428f"),i=r("1a2d"),o=r("e538"),a=r("9bf2").f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},e163:function(t,e,r){"use strict";var n=r("1a2d"),i=r("1626"),o=r("7b0b"),a=r("f772"),s=r("e177"),c=a("IE_PROTO"),u=Object,l=u.prototype;t.exports=s?u.getPrototypeOf:function(t){var e=o(t);if(n(e,c))return e[c];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof u?l:null}},e177:function(t,e,r){"use strict";var n=r("d039");t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,r){"use strict";var n=r("fc6a"),i=r("44d2"),o=r("3f8c"),a=r("69f3"),s=r("9bf2").f,c=r("c6d2"),u=r("4754"),l=r("c430"),h=r("83ab"),d="Array Iterator",f=a.set,g=a.getterFor(d);t.exports=c(Array,"Array",(function(t,e){f(this,{type:d,target:n(t),index:0,kind:e})}),(function(){var t=g(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,u(void 0,!0);switch(t.kind){case"keys":return u(r,!1);case"values":return u(e[r],!1)}return u([r,e[r]],!1)}),"values");var p=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&h&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(m){}},e267:function(t,e,r){"use strict";var n=r("e330"),i=r("e8b5"),o=r("1626"),a=r("c6b6"),s=r("577e"),c=n([].push);t.exports=function(t){if(o(t))return t;if(i(t)){for(var e=t.length,r=[],n=0;n<e;n++){var u=t[n];"string"==typeof u?c(r,u):"number"!=typeof u&&"Number"!==a(u)&&"String"!==a(u)||c(r,s(u))}var l=r.length,h=!0;return function(t,e){if(h)return h=!1,e;if(i(this))return e;for(var n=0;n<l;n++)if(r[n]===t)return e}}}},e330:function(t,e,r){"use strict";var n=r("40d5"),i=Function.prototype,o=i.call,a=n&&i.bind.bind(o,o);t.exports=n?a:function(t){return function(){return o.apply(t,arguments)}}},e391:function(t,e,r){"use strict";var n=r("577e");t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},e439:function(t,e,r){"use strict";var n=r("23e7"),i=r("d039"),o=r("fc6a"),a=r("06cf").f,s=r("83ab"),c=!s||i((function(){a(1)}));n({target:"Object",stat:!0,forced:c,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},e538:function(t,e,r){"use strict";var n=r("b622");e.f=n},e5cb:function(t,e,r){"use strict";var n=r("d066"),i=r("1a2d"),o=r("9112"),a=r("3a9b"),s=r("d2bb"),c=r("e893"),u=r("aeb0"),l=r("7156"),h=r("e391"),d=r("ab36"),f=r("6f19"),g=r("83ab"),p=r("c430");t.exports=function(t,e,r,m){var w="stackTraceLimit",y=m?2:1,E=t.split("."),C=E[E.length-1],A=n.apply(null,E);if(A){var S=A.prototype;if(!p&&i(S,"cause")&&delete S.cause,!r)return A;var v=n("Error"),b=e((function(t,e){var r=h(m?e:t,void 0),n=m?new A(t):new A;return void 0!==r&&o(n,"message",r),f(n,b,n.stack,2),this&&a(S,this)&&l(n,this,b),arguments.length>y&&d(n,arguments[y]),n}));if(b.prototype=S,"Error"!==C?s?s(b,v):c(b,v,{name:!0}):g&&w in A&&(u(b,A,w),u(b,A,"prepareStackTrace")),c(b,A),!p)try{S.name!==C&&o(S,"name",C),S.constructor=b}catch(I){}return b}}},e667:function(t,e,r){"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},e6cf:function(t,e,r){"use strict";r("5e7e"),r("14e5"),r("cc98"),r("3529"),r("f22b"),r("7149")},e848:function(t,e,r){"use strict";r("9464")},e893:function(t,e,r){"use strict";var n=r("1a2d"),i=r("56ef"),o=r("06cf"),a=r("9bf2");t.exports=function(t,e,r){for(var s=i(e),c=a.f,u=o.f,l=0;l<s.length;l++){var h=s[l];n(t,h)||r&&n(r,h)||c(t,h,u(e,h))}}},e8b5:function(t,e,r){"use strict";var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"===n(t)}},e95a:function(t,e,r){"use strict";var n=r("b622"),i=r("3f8c"),o=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},e9c4:function(t,e,r){"use strict";var n=r("23e7"),i=r("d066"),o=r("2ba4"),a=r("c65b"),s=r("e330"),c=r("d039"),u=r("1626"),l=r("d9b5"),h=r("f36a"),d=r("e267"),f=r("04f8"),g=String,p=i("JSON","stringify"),m=s(/./.exec),w=s("".charAt),y=s("".charCodeAt),E=s("".replace),C=s(1..toString),A=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,v=/^[\uDC00-\uDFFF]$/,b=!f||c((function(){var t=i("Symbol")("stringify detection");return"[null]"!==p([t])||"{}"!==p({a:t})||"{}"!==p(Object(t))})),I=c((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),_=function(t,e){var r=h(arguments),n=d(e);if(u(n)||void 0!==t&&!l(t))return r[1]=function(t,e){if(u(n)&&(e=a(n,this,g(t),e)),!l(e))return e},o(p,null,r)},T=function(t,e,r){var n=w(r,e-1),i=w(r,e+1);return m(S,t)&&!m(v,i)||m(v,t)&&!m(S,n)?"\\u"+C(y(t,0),16):t};p&&n({target:"JSON",stat:!0,arity:3,forced:b||I},{stringify:function(t,e,r){var n=h(arguments),i=o(b?_:p,null,n);return I&&"string"==typeof i?E(i,A,T):i}})},edd0:function(t,e,r){"use strict";var n=r("13d2"),i=r("9bf2");t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},efec:function(t,e,r){"use strict";var n=r("1a2d"),i=r("cb2d"),o=r("51eb"),a=r("b622"),s=a("toPrimitive"),c=Date.prototype;n(c,s)||i(c,s,o)},f069:function(t,e,r){"use strict";var n=r("59ed"),i=TypeError,o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new i("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},f183:function(t,e,r){"use strict";var n=r("23e7"),i=r("e330"),o=r("d012"),a=r("861d"),s=r("1a2d"),c=r("9bf2").f,u=r("241c"),l=r("057f"),h=r("4fad"),d=r("90e3"),f=r("bb2f"),g=!1,p=d("meta"),m=0,w=function(t){c(t,p,{value:{objectID:"O"+m++,weakData:{}}})},y=function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,p)){if(!h(t))return"F";if(!e)return"E";w(t)}return t[p].objectID},E=function(t,e){if(!s(t,p)){if(!h(t))return!0;if(!e)return!1;w(t)}return t[p].weakData},C=function(t){return f&&g&&h(t)&&!s(t,p)&&w(t),t},A=function(){S.enable=function(){},g=!0;var t=u.f,e=i([].splice),r={};r[p]=1,t(r).length&&(u.f=function(r){for(var n=t(r),i=0,o=n.length;i<o;i++)if(n[i]===p){e(n,i,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},S=t.exports={enable:A,fastKey:y,getWeakData:E,onFreeze:C};o[p]=!0},f22b:function(t,e,r){"use strict";var n=r("23e7"),i=r("f069"),o=r("4738").CONSTRUCTOR;n({target:"Promise",stat:!0,forced:o},{reject:function(t){var e=i.f(this),r=e.reject;return r(t),e.promise}})},f354:function(t,e,r){"use strict";var n=r("d039"),i=r("b622"),o=r("83ab"),a=r("c430"),s=i("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return t.pathname="c%20d",e.forEach((function(t,r){e["delete"]("b"),n+=r+t})),r["delete"]("a",2),r["delete"]("b",void 0),a&&(!t.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!e.size&&(a||!o)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},f36a:function(t,e,r){"use strict";var n=r("e330");t.exports=n([].slice)},f5df:function(t,e,r){"use strict";var n=r("00ee"),i=r("1626"),o=r("c6b6"),a=r("b622"),s=a("toStringTag"),c=Object,u="Arguments"===o(function(){return arguments}()),l=function(t,e){try{return t[e]}catch(r){}};t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=l(e=c(t),s))?r:u?o(e):"Object"===(n=o(e))&&i(e.callee)?"Arguments":n}},f772:function(t,e,r){"use strict";var n=r("5692"),i=r("90e3"),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},fb15:function(t,e,r){"use strict";if(r.r(e),r.d(e,"install",(function(){return a["e"]})),r.d(e,"QrcodeStream",(function(){return a["c"]})),r.d(e,"QrcodeCapture",(function(){return a["a"]})),r.d(e,"QrcodeDropZone",(function(){return a["b"]})),"undefined"!==typeof window){var n=window.document.currentScript,i=r("8875");n=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var o=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(r.p=o[1])}var a=r("b635");e["default"]=a["d"]},fb6a:function(t,e,r){"use strict";var n=r("23e7"),i=r("e8b5"),o=r("68ee"),a=r("861d"),s=r("23cb"),c=r("07fa"),u=r("fc6a"),l=r("8418"),h=r("b622"),d=r("1dde"),f=r("f36a"),g=d("slice"),p=h("species"),m=Array,w=Math.max;n({target:"Array",proto:!0,forced:!g},{slice:function(t,e){var r,n,h,d=u(this),g=c(d),y=s(t,g),E=s(void 0===e?g:e,g);if(i(d)&&(r=d.constructor,o(r)&&(r===m||i(r.prototype))?r=void 0:a(r)&&(r=r[p],null===r&&(r=void 0)),r===m||void 0===r))return f(d,y,E);for(n=new(void 0===r?m:r)(w(E-y,0)),h=0;y<E;y++,h++)y in d&&l(n,h,d[y]);return n.length=h,n}})},fc6a:function(t,e,r){"use strict";var n=r("44ad"),i=r("1d80");t.exports=function(t){return n(i(t))}},fce3:function(t,e,r){"use strict";var n=r("d039"),i=r("da84"),o=i.RegExp;t.exports=n((function(){var t=o(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},fdbc:function(t,e,r){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,r){"use strict";var n=r("04f8");t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fe6b:function(t,e,r){"use strict";var n=function(){var t=this,e=t._self._c;return e("div",{on:{drop:function(e){return e.preventDefault(),e.stopPropagation(),t.onDrop.apply(null,arguments)},dragenter:function(e){return e.preventDefault(),e.stopPropagation(),t.onDragOver(!0)},dragleave:function(e){return e.preventDefault(),e.stopPropagation(),t.onDragOver(!1)},dragover:function(t){t.preventDefault(),t.stopPropagation()}}},[t._t("default")],2)},i=[],o=r("2909"),a=(r("d3b7"),r("159b"),r("a180")),s=r("b3af"),c={name:"qrcode-drop-zone",props:{formats:{type:Array,default:function(){return["qr_code"]}}},mixins:[s["a"]],methods:{onDragOver:function(t){this.$emit("dragover",t)},onDrop:function(t){var e=this,r=t.dataTransfer;this.onDragOver(!1);var n=Object(o["a"])(r.files),i=r.getData("text/uri-list");n.forEach((function(t){e.onDetect(Object(a["b"])(t,e.formats))})),""!==i&&this.onDetect(Object(a["c"])(i,this.formats))}}},u=c,l=r("2877"),h=Object(l["a"])(u,n,i,!1,null,null,null);e["a"]=h.exports}})},f3a6:function(t,e,r){(function(t){(function(t,r){r(e)})(0,(function(e){"use strict";function r(t){return null===t||void 0===t}var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function o(t,e){var r=Object.setPrototypeOf;r?r(t,e):t.__proto__=e}function a(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}var s,c=function(t){function e(e){var r=this.constructor,n=t.call(this,e)||this;return Object.defineProperty(n,"name",{value:r.name,enumerable:!1}),o(n,r.prototype),a(n),n}return i(e,t),e}(Error);class u extends c{constructor(t){super(t),this.message=t}getKind(){const t=this.constructor;return t.kind}}u.kind="Exception";class l extends u{}l.kind="ArgumentException";class h extends u{}h.kind="IllegalArgumentException";class d{constructor(t){if(this.binarizer=t,null===t)throw new h("Binarizer must be non-null.")}getWidth(){return this.binarizer.getWidth()}getHeight(){return this.binarizer.getHeight()}getBlackRow(t,e){return this.binarizer.getBlackRow(t,e)}getBlackMatrix(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix}isCropSupported(){return this.binarizer.getLuminanceSource().isCropSupported()}crop(t,e,r,n){const i=this.binarizer.getLuminanceSource().crop(t,e,r,n);return new d(this.binarizer.createBinarizer(i))}isRotateSupported(){return this.binarizer.getLuminanceSource().isRotateSupported()}rotateCounterClockwise(){const t=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new d(this.binarizer.createBinarizer(t))}rotateCounterClockwise45(){const t=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new d(this.binarizer.createBinarizer(t))}toString(){try{return this.getBlackMatrix().toString()}catch(t){return""}}}class f extends u{static getChecksumInstance(){return new f}}f.kind="ChecksumException";class g{constructor(t){this.source=t}getLuminanceSource(){return this.source}getWidth(){return this.source.getWidth()}getHeight(){return this.source.getHeight()}}class p{static arraycopy(t,e,r,n,i){while(i--)r[n++]=t[e++]}static currentTimeMillis(){return Date.now()}}class m extends u{}m.kind="IndexOutOfBoundsException";class w extends m{constructor(t,e){super(e),this.index=t,this.message=e}}w.kind="ArrayIndexOutOfBoundsException";class y{static fill(t,e){for(let r=0,n=t.length;r<n;r++)t[r]=e}static fillWithin(t,e,r,n){y.rangeCheck(t.length,e,r);for(let i=e;i<r;i++)t[i]=n}static rangeCheck(t,e,r){if(e>r)throw new h("fromIndex("+e+") > toIndex("+r+")");if(e<0)throw new w(e);if(r>t)throw new w(r)}static asList(...t){return t}static create(t,e,r){let n=Array.from({length:t});return n.map(t=>Array.from({length:e}).fill(r))}static createInt32Array(t,e,r){let n=Array.from({length:t});return n.map(t=>Int32Array.from({length:e}).fill(r))}static equals(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(let r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}static hashCode(t){if(null===t)return 0;let e=1;for(const r of t)e=31*e+r;return e}static fillUint8Array(t,e){for(let r=0;r!==t.length;r++)t[r]=e}static copyOf(t,e){return t.slice(0,e)}static copyOfUint8Array(t,e){if(t.length<=e){const r=new Uint8Array(e);return r.set(t),r}return t.slice(0,e)}static copyOfRange(t,e,r){const n=r-e,i=new Int32Array(n);return p.arraycopy(t,e,i,0,n),i}static binarySearch(t,e,r){void 0===r&&(r=y.numberComparator);let n=0,i=t.length-1;while(n<=i){const o=i+n>>1,a=r(e,t[o]);if(a>0)n=o+1;else{if(!(a<0))return o;i=o-1}}return-n-1}static numberComparator(t,e){return t-e}}class E{static numberOfTrailingZeros(t){let e;if(0===t)return 32;let r=31;return e=t<<16,0!==e&&(r-=16,t=e),e=t<<8,0!==e&&(r-=8,t=e),e=t<<4,0!==e&&(r-=4,t=e),e=t<<2,0!==e&&(r-=2,t=e),r-(t<<1>>>31)}static numberOfLeadingZeros(t){if(0===t)return 32;let e=1;return t>>>16===0&&(e+=16,t<<=16),t>>>24===0&&(e+=8,t<<=8),t>>>28===0&&(e+=4,t<<=4),t>>>30===0&&(e+=2,t<<=2),e-=t>>>31,e}static toHexString(t){return t.toString(16)}static toBinaryString(t){return String(parseInt(String(t),2))}static bitCount(t){return t-=t>>>1&1431655765,t=(858993459&t)+(t>>>2&858993459),t=t+(t>>>4)&252645135,t+=t>>>8,t+=t>>>16,63&t}static truncDivision(t,e){return Math.trunc(t/e)}static parseInt(t,e){return parseInt(t,e)}}E.MIN_VALUE_32_BITS=-2147483648,E.MAX_VALUE=Number.MAX_SAFE_INTEGER;class C{constructor(t,e){void 0===t?(this.size=0,this.bits=new Int32Array(1)):(this.size=t,this.bits=void 0===e||null===e?C.makeArray(t):e)}getSize(){return this.size}getSizeInBytes(){return Math.floor((this.size+7)/8)}ensureCapacity(t){if(t>32*this.bits.length){const e=C.makeArray(t);p.arraycopy(this.bits,0,e,0,this.bits.length),this.bits=e}}get(t){return 0!==(this.bits[Math.floor(t/32)]&1<<(31&t))}set(t){this.bits[Math.floor(t/32)]|=1<<(31&t)}flip(t){this.bits[Math.floor(t/32)]^=1<<(31&t)}getNextSet(t){const e=this.size;if(t>=e)return e;const r=this.bits;let n=Math.floor(t/32),i=r[n];i&=~((1<<(31&t))-1);const o=r.length;while(0===i){if(++n===o)return e;i=r[n]}const a=32*n+E.numberOfTrailingZeros(i);return a>e?e:a}getNextUnset(t){const e=this.size;if(t>=e)return e;const r=this.bits;let n=Math.floor(t/32),i=~r[n];i&=~((1<<(31&t))-1);const o=r.length;while(0===i){if(++n===o)return e;i=~r[n]}const a=32*n+E.numberOfTrailingZeros(i);return a>e?e:a}setBulk(t,e){this.bits[Math.floor(t/32)]=e}setRange(t,e){if(e<t||t<0||e>this.size)throw new h;if(e===t)return;e--;const r=Math.floor(t/32),n=Math.floor(e/32),i=this.bits;for(let o=r;o<=n;o++){const a=o>r?0:31&t,s=o<n?31:31&e,c=(2<<s)-(1<<a);i[o]|=c}}clear(){const t=this.bits.length,e=this.bits;for(let r=0;r<t;r++)e[r]=0}isRange(t,e,r){if(e<t||t<0||e>this.size)throw new h;if(e===t)return!0;e--;const n=Math.floor(t/32),i=Math.floor(e/32),o=this.bits;for(let a=n;a<=i;a++){const s=a>n?0:31&t,c=a<i?31:31&e,u=(2<<c)-(1<<s)&4294967295;if((o[a]&u)!==(r?u:0))return!1}return!0}appendBit(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++}appendBits(t,e){if(e<0||e>32)throw new h("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(let r=e;r>0;r--)this.appendBit(1===(t>>r-1&1))}appendBitArray(t){const e=t.size;this.ensureCapacity(this.size+e);for(let r=0;r<e;r++)this.appendBit(t.get(r))}xor(t){if(this.size!==t.size)throw new h("Sizes don't match");const e=this.bits;for(let r=0,n=e.length;r<n;r++)e[r]^=t.bits[r]}toBytes(t,e,r,n){for(let i=0;i<n;i++){let n=0;for(let e=0;e<8;e++)this.get(t)&&(n|=1<<7-e),t++;e[r+i]=n}}getBitArray(){return this.bits}reverse(){const t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),r=e+1,n=this.bits;for(let i=0;i<r;i++){let r=n[i];r=r>>1&1431655765|(1431655765&r)<<1,r=r>>2&858993459|(858993459&r)<<2,r=r>>4&252645135|(252645135&r)<<4,r=r>>8&16711935|(16711935&r)<<8,r=r>>16&65535|(65535&r)<<16,t[e-i]=r}if(this.size!==32*r){const e=32*r-this.size;let n=t[0]>>>e;for(let i=1;i<r;i++){const r=t[i];n|=r<<32-e,t[i-1]=n,n=r>>>e}t[r-1]=n}this.bits=t}static makeArray(t){return new Int32Array(Math.floor((t+31)/32))}equals(t){if(!(t instanceof C))return!1;const e=t;return this.size===e.size&&y.equals(this.bits,e.bits)}hashCode(){return 31*this.size+y.hashCode(this.bits)}toString(){let t="";for(let e=0,r=this.size;e<r;e++)0===(7&e)&&(t+=" "),t+=this.get(e)?"X":".";return t}clone(){return new C(this.size,this.bits.slice())}}(function(t){t[t["OTHER"]=0]="OTHER",t[t["PURE_BARCODE"]=1]="PURE_BARCODE",t[t["POSSIBLE_FORMATS"]=2]="POSSIBLE_FORMATS",t[t["TRY_HARDER"]=3]="TRY_HARDER",t[t["CHARACTER_SET"]=4]="CHARACTER_SET",t[t["ALLOWED_LENGTHS"]=5]="ALLOWED_LENGTHS",t[t["ASSUME_CODE_39_CHECK_DIGIT"]=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t["ASSUME_GS1"]=7]="ASSUME_GS1",t[t["RETURN_CODABAR_START_END"]=8]="RETURN_CODABAR_START_END",t[t["NEED_RESULT_POINT_CALLBACK"]=9]="NEED_RESULT_POINT_CALLBACK",t[t["ALLOWED_EAN_EXTENSIONS"]=10]="ALLOWED_EAN_EXTENSIONS"})(s||(s={}));var A,S=s;class v extends u{static getFormatInstance(){return new v}}v.kind="FormatException",function(t){t[t["Cp437"]=0]="Cp437",t[t["ISO8859_1"]=1]="ISO8859_1",t[t["ISO8859_2"]=2]="ISO8859_2",t[t["ISO8859_3"]=3]="ISO8859_3",t[t["ISO8859_4"]=4]="ISO8859_4",t[t["ISO8859_5"]=5]="ISO8859_5",t[t["ISO8859_6"]=6]="ISO8859_6",t[t["ISO8859_7"]=7]="ISO8859_7",t[t["ISO8859_8"]=8]="ISO8859_8",t[t["ISO8859_9"]=9]="ISO8859_9",t[t["ISO8859_10"]=10]="ISO8859_10",t[t["ISO8859_11"]=11]="ISO8859_11",t[t["ISO8859_13"]=12]="ISO8859_13",t[t["ISO8859_14"]=13]="ISO8859_14",t[t["ISO8859_15"]=14]="ISO8859_15",t[t["ISO8859_16"]=15]="ISO8859_16",t[t["SJIS"]=16]="SJIS",t[t["Cp1250"]=17]="Cp1250",t[t["Cp1251"]=18]="Cp1251",t[t["Cp1252"]=19]="Cp1252",t[t["Cp1256"]=20]="Cp1256",t[t["UnicodeBigUnmarked"]=21]="UnicodeBigUnmarked",t[t["UTF8"]=22]="UTF8",t[t["ASCII"]=23]="ASCII",t[t["Big5"]=24]="Big5",t[t["GB18030"]=25]="GB18030",t[t["EUC_KR"]=26]="EUC_KR"}(A||(A={}));class b{constructor(t,e,r,...n){this.valueIdentifier=t,this.name=r,this.values="number"===typeof e?Int32Array.from([e]):e,this.otherEncodingNames=n,b.VALUE_IDENTIFIER_TO_ECI.set(t,this),b.NAME_TO_ECI.set(r,this);const i=this.values;for(let o=0,a=i.length;o!==a;o++){const t=i[o];b.VALUES_TO_ECI.set(t,this)}for(const o of n)b.NAME_TO_ECI.set(o,this)}getValueIdentifier(){return this.valueIdentifier}getName(){return this.name}getValue(){return this.values[0]}static getCharacterSetECIByValue(t){if(t<0||t>=900)throw new v("incorect value");const e=b.VALUES_TO_ECI.get(t);if(void 0===e)throw new v("incorect value");return e}static getCharacterSetECIByName(t){const e=b.NAME_TO_ECI.get(t);if(void 0===e)throw new v("incorect value");return e}equals(t){if(!(t instanceof b))return!1;const e=t;return this.getName()===e.getName()}}b.VALUE_IDENTIFIER_TO_ECI=new Map,b.VALUES_TO_ECI=new Map,b.NAME_TO_ECI=new Map,b.Cp437=new b(A.Cp437,Int32Array.from([0,2]),"Cp437"),b.ISO8859_1=new b(A.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),b.ISO8859_2=new b(A.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),b.ISO8859_3=new b(A.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),b.ISO8859_4=new b(A.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),b.ISO8859_5=new b(A.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),b.ISO8859_6=new b(A.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),b.ISO8859_7=new b(A.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),b.ISO8859_8=new b(A.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),b.ISO8859_9=new b(A.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),b.ISO8859_10=new b(A.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),b.ISO8859_11=new b(A.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),b.ISO8859_13=new b(A.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),b.ISO8859_14=new b(A.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),b.ISO8859_15=new b(A.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),b.ISO8859_16=new b(A.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),b.SJIS=new b(A.SJIS,20,"SJIS","Shift_JIS"),b.Cp1250=new b(A.Cp1250,21,"Cp1250","windows-1250"),b.Cp1251=new b(A.Cp1251,22,"Cp1251","windows-1251"),b.Cp1252=new b(A.Cp1252,23,"Cp1252","windows-1252"),b.Cp1256=new b(A.Cp1256,24,"Cp1256","windows-1256"),b.UnicodeBigUnmarked=new b(A.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),b.UTF8=new b(A.UTF8,26,"UTF8","UTF-8"),b.ASCII=new b(A.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),b.Big5=new b(A.Big5,28,"Big5"),b.GB18030=new b(A.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),b.EUC_KR=new b(A.EUC_KR,30,"EUC_KR","EUC-KR");class I extends u{}I.kind="UnsupportedOperationException";class _{static decode(t,e){const r=this.encodingName(e);return this.customDecoder?this.customDecoder(t,r):"undefined"===typeof TextDecoder||this.shouldDecodeOnFallback(r)?this.decodeFallback(t,r):new TextDecoder(r).decode(t)}static shouldDecodeOnFallback(t){return!_.isBrowser()&&"ISO-8859-1"===t}static encode(t,e){const r=this.encodingName(e);return this.customEncoder?this.customEncoder(t,r):"undefined"===typeof TextEncoder?this.encodeFallback(t):(new TextEncoder).encode(t)}static isBrowser(){return"undefined"!==typeof window&&"[object Window]"==={}.toString.call(window)}static encodingName(t){return"string"===typeof t?t:t.getName()}static encodingCharacterSet(t){return t instanceof b?t:b.getCharacterSetECIByName(t)}static decodeFallback(t,e){const r=this.encodingCharacterSet(e);if(_.isDecodeFallbackSupported(r)){let e="";for(let r=0,n=t.length;r<n;r++){let n=t[r].toString(16);n.length<2&&(n="0"+n),e+="%"+n}return decodeURIComponent(e)}if(r.equals(b.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(t.buffer));throw new I(`Encoding ${this.encodingName(e)} not supported by fallback.`)}static isDecodeFallbackSupported(t){return t.equals(b.UTF8)||t.equals(b.ISO8859_1)||t.equals(b.ASCII)}static encodeFallback(t){const e=btoa(unescape(encodeURIComponent(t))),r=e.split(""),n=[];for(let i=0;i<r.length;i++)n.push(r[i].charCodeAt(0));return new Uint8Array(n)}}class T{static castAsNonUtf8Char(t,e=null){const r=e?e.getName():this.ISO88591;return _.decode(new Uint8Array([t]),r)}static guessEncoding(t,e){if(null!==e&&void 0!==e&&void 0!==e.get(S.CHARACTER_SET))return e.get(S.CHARACTER_SET).toString();const r=t.length;let n=!0,i=!0,o=!0,a=0,s=0,c=0,u=0,l=0,h=0,d=0,f=0,g=0,p=0,m=0;const w=t.length>3&&239===t[0]&&187===t[1]&&191===t[2];for(let y=0;y<r&&(n||i||o);y++){const e=255&t[y];o&&(a>0?0===(128&e)?o=!1:a--:0!==(128&e)&&(0===(64&e)?o=!1:(a++,0===(32&e)?s++:(a++,0===(16&e)?c++:(a++,0===(8&e)?u++:o=!1))))),n&&(e>127&&e<160?n=!1:e>159&&(e<192||215===e||247===e)&&m++),i&&(l>0?e<64||127===e||e>252?i=!1:l--:128===e||160===e||e>239?i=!1:e>160&&e<224?(h++,f=0,d++,d>g&&(g=d)):e>127?(l++,d=0,f++,f>p&&(p=f)):(d=0,f=0))}return o&&a>0&&(o=!1),i&&l>0&&(i=!1),o&&(w||s+c+u>0)?T.UTF8:i&&(T.ASSUME_SHIFT_JIS||g>=3||p>=3)?T.SHIFT_JIS:n&&i?2===g&&2===h||10*m>=r?T.SHIFT_JIS:T.ISO88591:n?T.ISO88591:i?T.SHIFT_JIS:o?T.UTF8:T.PLATFORM_DEFAULT_ENCODING}static format(t,...e){let r=-1;function n(t,n,i,o,a,s){if("%%"===t)return"%";if(void 0===e[++r])return;t=o?parseInt(o.substr(1)):void 0;let c,u=a?parseInt(a.substr(1)):void 0;switch(s){case"s":c=e[r];break;case"c":c=e[r][0];break;case"f":c=parseFloat(e[r]).toFixed(t);break;case"p":c=parseFloat(e[r]).toPrecision(t);break;case"e":c=parseFloat(e[r]).toExponential(t);break;case"x":c=parseInt(e[r]).toString(u||16);break;case"d":c=parseFloat(parseInt(e[r],u||10).toPrecision(t)).toFixed(0);break}c="object"===typeof c?JSON.stringify(c):(+c).toString(u);let l=parseInt(i),h=i&&i[0]+""==="0"?"0":" ";while(c.length<l)c=void 0!==n?c+h:h+c;return c}let i=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return t.replace(i,n)}static getBytes(t,e){return _.encode(t,e)}static getCharCode(t,e=0){return t.charCodeAt(e)}static getCharAt(t){return String.fromCharCode(t)}}T.SHIFT_JIS=b.SJIS.getName(),T.GB2312="GB2312",T.ISO88591=b.ISO8859_1.getName(),T.EUC_JP="EUC_JP",T.UTF8=b.UTF8.getName(),T.PLATFORM_DEFAULT_ENCODING=T.UTF8,T.ASSUME_SHIFT_JIS=!1;class R{constructor(t=""){this.value=t}enableDecoding(t){return this.encoding=t,this}append(t){return"string"===typeof t?this.value+=t.toString():this.encoding?this.value+=T.castAsNonUtf8Char(t,this.encoding):this.value+=String.fromCharCode(t),this}appendChars(t,e,r){for(let n=e;e<e+r;n++)this.append(t[n]);return this}length(){return this.value.length}charAt(t){return this.value.charAt(t)}deleteCharAt(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)}setCharAt(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)}substring(t,e){return this.value.substring(t,e)}setLengthToZero(){this.value=""}toString(){return this.value}insert(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+e.length)}}class D{constructor(t,e,r,n){if(this.width=t,this.height=e,this.rowSize=r,this.bits=n,void 0!==e&&null!==e||(e=t),this.height=e,t<1||e<1)throw new h("Both dimensions must be greater than 0");void 0!==r&&null!==r||(r=Math.floor((t+31)/32)),this.rowSize=r,void 0!==n&&null!==n||(this.bits=new Int32Array(this.rowSize*this.height))}static parseFromBooleanArray(t){const e=t.length,r=t[0].length,n=new D(r,e);for(let i=0;i<e;i++){const e=t[i];for(let t=0;t<r;t++)e[t]&&n.set(t,i)}return n}static parseFromString(t,e,r){if(null===t)throw new h("stringRepresentation cannot be null");const n=new Array(t.length);let i=0,o=0,a=-1,s=0,c=0;while(c<t.length)if("\n"===t.charAt(c)||"\r"===t.charAt(c)){if(i>o){if(-1===a)a=i-o;else if(i-o!==a)throw new h("row lengths do not match");o=i,s++}c++}else if(t.substring(c,c+e.length)===e)c+=e.length,n[i]=!0,i++;else{if(t.substring(c,c+r.length)!==r)throw new h("illegal character encountered: "+t.substring(c));c+=r.length,n[i]=!1,i++}if(i>o){if(-1===a)a=i-o;else if(i-o!==a)throw new h("row lengths do not match");s++}const u=new D(a,s);for(let l=0;l<i;l++)n[l]&&u.set(Math.floor(l%a),Math.floor(l/a));return u}get(t,e){const r=e*this.rowSize+Math.floor(t/32);return 0!==(this.bits[r]>>>(31&t)&1)}set(t,e){const r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295}unset(t,e){const r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)}flip(t,e){const r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295}xor(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new h("input matrix dimensions do not match");const e=new C(Math.floor(this.width/32)+1),r=this.rowSize,n=this.bits;for(let i=0,o=this.height;i<o;i++){const o=i*r,a=t.getRow(i,e).getBitArray();for(let t=0;t<r;t++)n[o+t]^=a[t]}}clear(){const t=this.bits,e=t.length;for(let r=0;r<e;r++)t[r]=0}setRegion(t,e,r,n){if(e<0||t<0)throw new h("Left and top must be nonnegative");if(n<1||r<1)throw new h("Height and width must be at least 1");const i=t+r,o=e+n;if(o>this.height||i>this.width)throw new h("The region must fit inside the matrix");const a=this.rowSize,s=this.bits;for(let c=e;c<o;c++){const e=c*a;for(let r=t;r<i;r++)s[e+Math.floor(r/32)]|=1<<(31&r)&4294967295}}getRow(t,e){null===e||void 0===e||e.getSize()<this.width?e=new C(this.width):e.clear();const r=this.rowSize,n=this.bits,i=t*r;for(let o=0;o<r;o++)e.setBulk(32*o,n[i+o]);return e}setRow(t,e){p.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)}rotate180(){const t=this.getWidth(),e=this.getHeight();let r=new C(t),n=new C(t);for(let i=0,o=Math.floor((e+1)/2);i<o;i++)r=this.getRow(i,r),n=this.getRow(e-1-i,n),r.reverse(),n.reverse(),this.setRow(i,n),this.setRow(e-1-i,r)}getEnclosingRectangle(){const t=this.width,e=this.height,r=this.rowSize,n=this.bits;let i=t,o=e,a=-1,s=-1;for(let c=0;c<e;c++)for(let t=0;t<r;t++){const e=n[c*r+t];if(0!==e){if(c<o&&(o=c),c>s&&(s=c),32*t<i){let r=0;while(0===(e<<31-r&4294967295))r++;32*t+r<i&&(i=32*t+r)}if(32*t+31>a){let r=31;while(e>>>r===0)r--;32*t+r>a&&(a=32*t+r)}}}return a<i||s<o?null:Int32Array.from([i,o,a-i+1,s-o+1])}getTopLeftOnBit(){const t=this.rowSize,e=this.bits;let r=0;while(r<e.length&&0===e[r])r++;if(r===e.length)return null;const n=r/t;let i=r%t*32;const o=e[r];let a=0;while(0===(o<<31-a&4294967295))a++;return i+=a,Int32Array.from([i,n])}getBottomRightOnBit(){const t=this.rowSize,e=this.bits;let r=e.length-1;while(r>=0&&0===e[r])r--;if(r<0)return null;const n=Math.floor(r/t);let i=32*Math.floor(r%t);const o=e[r];let a=31;while(o>>>a===0)a--;return i+=a,Int32Array.from([i,n])}getWidth(){return this.width}getHeight(){return this.height}getRowSize(){return this.rowSize}equals(t){if(!(t instanceof D))return!1;const e=t;return this.width===e.width&&this.height===e.height&&this.rowSize===e.rowSize&&y.equals(this.bits,e.bits)}hashCode(){let t=this.width;return t=31*t+this.width,t=31*t+this.height,t=31*t+this.rowSize,t=31*t+y.hashCode(this.bits),t}toString(t="X ",e=" ",r="\n"){return this.buildToString(t,e,r)}buildToString(t,e,r){let n=new R;for(let i=0,o=this.height;i<o;i++){for(let r=0,o=this.width;r<o;r++)n.append(this.get(r,i)?t:e);n.append(r)}return n.toString()}clone(){return new D(this.width,this.height,this.rowSize,this.bits.slice())}}class O extends u{static getNotFoundInstance(){return new O}}O.kind="NotFoundException";class N extends g{constructor(t){super(t),this.luminances=N.EMPTY,this.buckets=new Int32Array(N.LUMINANCE_BUCKETS)}getBlackRow(t,e){const r=this.getLuminanceSource(),n=r.getWidth();void 0===e||null===e||e.getSize()<n?e=new C(n):e.clear(),this.initArrays(n);const i=r.getRow(t,this.luminances),o=this.buckets;for(let s=0;s<n;s++)o[(255&i[s])>>N.LUMINANCE_SHIFT]++;const a=N.estimateBlackPoint(o);if(n<3)for(let s=0;s<n;s++)(255&i[s])<a&&e.set(s);else{let t=255&i[0],r=255&i[1];for(let o=1;o<n-1;o++){const n=255&i[o+1];(4*r-t-n)/2<a&&e.set(o),t=r,r=n}}return e}getBlackMatrix(){const t=this.getLuminanceSource(),e=t.getWidth(),r=t.getHeight(),n=new D(e,r);this.initArrays(e);const i=this.buckets;for(let s=1;s<5;s++){const n=Math.floor(r*s/5),o=t.getRow(n,this.luminances),a=Math.floor(4*e/5);for(let t=Math.floor(e/5);t<a;t++){const e=255&o[t];i[e>>N.LUMINANCE_SHIFT]++}}const o=N.estimateBlackPoint(i),a=t.getMatrix();for(let s=0;s<r;s++){const t=s*e;for(let r=0;r<e;r++){const e=255&a[t+r];e<o&&n.set(r,s)}}return n}createBinarizer(t){return new N(t)}initArrays(t){this.luminances.length<t&&(this.luminances=new Uint8ClampedArray(t));const e=this.buckets;for(let r=0;r<N.LUMINANCE_BUCKETS;r++)e[r]=0}static estimateBlackPoint(t){const e=t.length;let r=0,n=0,i=0;for(let u=0;u<e;u++)t[u]>i&&(n=u,i=t[u]),t[u]>r&&(r=t[u]);let o=0,a=0;for(let u=0;u<e;u++){const e=u-n,r=t[u]*e*e;r>a&&(o=u,a=r)}if(n>o){const t=n;n=o,o=t}if(o-n<=e/16)throw new O;let s=o-1,c=-1;for(let u=o-1;u>n;u--){const e=u-n,i=e*e*(o-u)*(r-t[u]);i>c&&(s=u,c=i)}return s<<N.LUMINANCE_SHIFT}}N.LUMINANCE_BITS=5,N.LUMINANCE_SHIFT=8-N.LUMINANCE_BITS,N.LUMINANCE_BUCKETS=1<<N.LUMINANCE_BITS,N.EMPTY=Uint8ClampedArray.from([0]);class M extends N{constructor(t){super(t),this.matrix=null}getBlackMatrix(){if(null!==this.matrix)return this.matrix;const t=this.getLuminanceSource(),e=t.getWidth(),r=t.getHeight();if(e>=M.MINIMUM_DIMENSION&&r>=M.MINIMUM_DIMENSION){const n=t.getMatrix();let i=e>>M.BLOCK_SIZE_POWER;0!==(e&M.BLOCK_SIZE_MASK)&&i++;let o=r>>M.BLOCK_SIZE_POWER;0!==(r&M.BLOCK_SIZE_MASK)&&o++;const a=M.calculateBlackPoints(n,i,o,e,r),s=new D(e,r);M.calculateThresholdForBlock(n,i,o,e,r,a,s),this.matrix=s}else this.matrix=super.getBlackMatrix();return this.matrix}createBinarizer(t){return new M(t)}static calculateThresholdForBlock(t,e,r,n,i,o,a){const s=i-M.BLOCK_SIZE,c=n-M.BLOCK_SIZE;for(let u=0;u<r;u++){let i=u<<M.BLOCK_SIZE_POWER;i>s&&(i=s);const l=M.cap(u,2,r-3);for(let r=0;r<e;r++){let s=r<<M.BLOCK_SIZE_POWER;s>c&&(s=c);const u=M.cap(r,2,e-3);let h=0;for(let t=-2;t<=2;t++){const e=o[l+t];h+=e[u-2]+e[u-1]+e[u]+e[u+1]+e[u+2]}const d=h/25;M.thresholdBlock(t,s,i,d,n,a)}}}static cap(t,e,r){return t<e?e:t>r?r:t}static thresholdBlock(t,e,r,n,i,o){for(let a=0,s=r*i+e;a<M.BLOCK_SIZE;a++,s+=i)for(let i=0;i<M.BLOCK_SIZE;i++)(255&t[s+i])<=n&&o.set(e+i,r+a)}static calculateBlackPoints(t,e,r,n,i){const o=i-M.BLOCK_SIZE,a=n-M.BLOCK_SIZE,s=new Array(r);for(let c=0;c<r;c++){s[c]=new Int32Array(e);let r=c<<M.BLOCK_SIZE_POWER;r>o&&(r=o);for(let i=0;i<e;i++){let e=i<<M.BLOCK_SIZE_POWER;e>a&&(e=a);let o=0,u=255,l=0;for(let i=0,a=r*n+e;i<M.BLOCK_SIZE;i++,a+=n){for(let e=0;e<M.BLOCK_SIZE;e++){const r=255&t[a+e];o+=r,r<u&&(u=r),r>l&&(l=r)}if(l-u>M.MIN_DYNAMIC_RANGE)for(i++,a+=n;i<M.BLOCK_SIZE;i++,a+=n)for(let e=0;e<M.BLOCK_SIZE;e++)o+=255&t[a+e]}let h=o>>2*M.BLOCK_SIZE_POWER;if(l-u<=M.MIN_DYNAMIC_RANGE&&(h=u/2,c>0&&i>0)){const t=(s[c-1][i]+2*s[c][i-1]+s[c-1][i-1])/4;u<t&&(h=t)}s[c][i]=h}}return s}}M.BLOCK_SIZE_POWER=3,M.BLOCK_SIZE=1<<M.BLOCK_SIZE_POWER,M.BLOCK_SIZE_MASK=M.BLOCK_SIZE-1,M.MINIMUM_DIMENSION=5*M.BLOCK_SIZE,M.MIN_DYNAMIC_RANGE=24;class P{constructor(t,e){this.width=t,this.height=e}getWidth(){return this.width}getHeight(){return this.height}isCropSupported(){return!1}crop(t,e,r,n){throw new I("This luminance source does not support cropping.")}isRotateSupported(){return!1}rotateCounterClockwise(){throw new I("This luminance source does not support rotation by 90 degrees.")}rotateCounterClockwise45(){throw new I("This luminance source does not support rotation by 45 degrees.")}toString(){const t=new Uint8ClampedArray(this.width);let e=new R;for(let r=0;r<this.height;r++){const n=this.getRow(r,t);for(let t=0;t<this.width;t++){const r=255&n[t];let i;i=r<64?"#":r<128?"+":r<192?".":" ",e.append(i)}e.append("\n")}return e.toString()}}class L extends P{constructor(t){super(t.getWidth(),t.getHeight()),this.delegate=t}getRow(t,e){const r=this.delegate.getRow(t,e),n=this.getWidth();for(let i=0;i<n;i++)r[i]=255-(255&r[i]);return r}getMatrix(){const t=this.delegate.getMatrix(),e=this.getWidth()*this.getHeight(),r=new Uint8ClampedArray(e);for(let n=0;n<e;n++)r[n]=255-(255&t[n]);return r}isCropSupported(){return this.delegate.isCropSupported()}crop(t,e,r,n){return new L(this.delegate.crop(t,e,r,n))}isRotateSupported(){return this.delegate.isRotateSupported()}invert(){return this.delegate}rotateCounterClockwise(){return new L(this.delegate.rotateCounterClockwise())}rotateCounterClockwise45(){return new L(this.delegate.rotateCounterClockwise45())}}class x extends P{constructor(t){super(t.width,t.height),this.canvas=t,this.tempCanvasElement=null,this.buffer=x.makeBufferFromCanvasImageData(t)}static makeBufferFromCanvasImageData(t){const e=t.getContext("2d").getImageData(0,0,t.width,t.height);return x.toGrayscaleBuffer(e.data,t.width,t.height)}static toGrayscaleBuffer(t,e,r){const n=new Uint8ClampedArray(e*r);for(let i=0,o=0,a=t.length;i<a;i+=4,o++){let e;const r=t[i+3];if(0===r)e=255;else{const r=t[i],n=t[i+1],o=t[i+2];e=306*r+601*n+117*o+512>>10}n[o]=e}return n}getRow(t,e){if(t<0||t>=this.getHeight())throw new h("Requested row is outside the image: "+t);const r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e}getMatrix(){return this.buffer}isCropSupported(){return!0}crop(t,e,r,n){return super.crop(t,e,r,n),this}isRotateSupported(){return!0}rotateCounterClockwise(){return this.rotate(-90),this}rotateCounterClockwise45(){return this.rotate(-45),this}getTempCanvasElement(){if(null===this.tempCanvasElement){const t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement}rotate(t){const e=this.getTempCanvasElement(),r=e.getContext("2d"),n=t*x.DEGREE_TO_RADIANS,i=this.canvas.width,o=this.canvas.height,a=Math.ceil(Math.abs(Math.cos(n))*i+Math.abs(Math.sin(n))*o),s=Math.ceil(Math.abs(Math.sin(n))*i+Math.abs(Math.cos(n))*o);return e.width=a,e.height=s,r.translate(a/2,s/2),r.rotate(n),r.drawImage(this.canvas,i/-2,o/-2),this.buffer=x.makeBufferFromCanvasImageData(e),this}invert(){return new L(this)}}x.DEGREE_TO_RADIANS=Math.PI/180;class B{constructor(t,e,r){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=r||void 0}toJSON(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}}}var k,F=(globalThis||t||self||window?(globalThis||t||self||window||void 0).__awaiter:void 0)||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(e){o(e)}}function s(t){try{c(n["throw"](t))}catch(e){o(e)}}function c(t){t.done?r(t.value):i(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))};class U{constructor(t,e=500,r){this.reader=t,this.timeBetweenScansMillis=e,this._hints=r,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}get hasNavigator(){return"undefined"!==typeof navigator}get isMediaDevicesSuported(){return this.hasNavigator&&!!navigator.mediaDevices}get canEnumerateDevices(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)}get timeBetweenDecodingAttempts(){return this._timeBetweenDecodingAttempts}set timeBetweenDecodingAttempts(t){this._timeBetweenDecodingAttempts=t<0?0:t}set hints(t){this._hints=t||null}get hints(){return this._hints}listVideoInputDevices(){return F(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 t=yield navigator.mediaDevices.enumerateDevices(),e=[];for(const r of t){const t="video"===r.kind?"videoinput":r.kind;if("videoinput"!==t)continue;const n=r.deviceId||r.id,i=r.label||"Video device "+(e.length+1),o=r.groupId,a={deviceId:n,label:i,kind:t,groupId:o};e.push(a)}return e}))}getVideoInputDevices(){return F(this,void 0,void 0,(function*(){const t=yield this.listVideoInputDevices();return t.map(t=>new B(t.deviceId,t.label))}))}findDeviceById(t){return F(this,void 0,void 0,(function*(){const e=yield this.listVideoInputDevices();return e?e.find(e=>e.deviceId===t):null}))}decodeFromInputVideoDevice(t,e){return F(this,void 0,void 0,(function*(){return yield this.decodeOnceFromVideoDevice(t,e)}))}decodeOnceFromVideoDevice(t,e){return F(this,void 0,void 0,(function*(){let r;this.reset(),r=t?{deviceId:{exact:t}}:{facingMode:"environment"};const n={video:r};return yield this.decodeOnceFromConstraints(n,e)}))}decodeOnceFromConstraints(t,e){return F(this,void 0,void 0,(function*(){const r=yield navigator.mediaDevices.getUserMedia(t);return yield this.decodeOnceFromStream(r,e)}))}decodeOnceFromStream(t,e){return F(this,void 0,void 0,(function*(){this.reset();const r=yield this.attachStreamToVideo(t,e),n=yield this.decodeOnce(r);return n}))}decodeFromInputVideoDeviceContinuously(t,e,r){return F(this,void 0,void 0,(function*(){return yield this.decodeFromVideoDevice(t,e,r)}))}decodeFromVideoDevice(t,e,r){return F(this,void 0,void 0,(function*(){let n;n=t?{deviceId:{exact:t}}:{facingMode:"environment"};const i={video:n};return yield this.decodeFromConstraints(i,e,r)}))}decodeFromConstraints(t,e,r){return F(this,void 0,void 0,(function*(){const n=yield navigator.mediaDevices.getUserMedia(t);return yield this.decodeFromStream(n,e,r)}))}decodeFromStream(t,e,r){return F(this,void 0,void 0,(function*(){this.reset();const n=yield this.attachStreamToVideo(t,e);return yield this.decodeContinuously(n,r)}))}stopAsyncDecode(){this._stopAsyncDecode=!0}stopContinuousDecode(){this._stopContinuousDecode=!0}attachStreamToVideo(t,e){return F(this,void 0,void 0,(function*(){const r=this.prepareVideoElement(e);return this.addVideoSource(r,t),this.videoElement=r,this.stream=t,yield this.playVideoOnLoadAsync(r),r}))}playVideoOnLoadAsync(t){return new Promise((e,r)=>this.playVideoOnLoad(t,()=>e()))}playVideoOnLoad(t,e){this.videoEndedListener=()=>this.stopStreams(),this.videoCanPlayListener=()=>this.tryPlayVideo(t),t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)}isVideoPlaying(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2}tryPlayVideo(t){return F(this,void 0,void 0,(function*(){if(this.isVideoPlaying(t))console.warn("Trying to play video that is already playing.");else try{yield t.play()}catch(e){console.warn("It was not possible to play the video.")}}))}getMediaElement(t,e){const r=document.getElementById(t);if(!r)throw new l(`element with id '${t}' not found`);if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new l(`element with id '${t}' must be an ${e} element`);return r}decodeFromImage(t,e){if(!t&&!e)throw new l("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)}decodeFromVideo(t,e){if(!t&&!e)throw new l("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)}decodeFromVideoContinuously(t,e,r){if(void 0===t&&void 0===e)throw new l("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)}decodeFromImageElement(t){if(!t)throw new l("An image element must be provided.");this.reset();const e=this.prepareImageElement(t);let r;return this.imageElement=e,r=this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e),r}decodeFromVideoElement(t){const e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)}decodeFromVideoElementContinuously(t,e){const r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)}_decodeFromVideoElementSetup(t){if(!t)throw new l("A video element must be provided.");this.reset();const e=this.prepareVideoElement(t);return this.videoElement=e,e}decodeFromImageUrl(t){if(!t)throw new l("An URL must be provided.");this.reset();const e=this.prepareImageElement();this.imageElement=e;const r=this._decodeOnLoadImage(e);return e.src=t,r}decodeFromVideoUrl(t){if(!t)throw new l("An URL must be provided.");this.reset();const e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r}decodeFromVideoUrlContinuously(t,e){if(!t)throw new l("An URL must be provided.");this.reset();const r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n}_decodeOnLoadImage(t){return new Promise((e,r)=>{this.imageLoadedListener=()=>this.decodeOnce(t,!1,!0).then(e,r),t.addEventListener("load",this.imageLoadedListener)})}_decodeOnLoadVideo(t){return F(this,void 0,void 0,(function*(){return yield this.playVideoOnLoadAsync(t),yield this.decodeOnce(t)}))}_decodeOnLoadVideoContinuously(t,e){return F(this,void 0,void 0,(function*(){yield this.playVideoOnLoadAsync(t),this.decodeContinuously(t,e)}))}isImageLoaded(t){return!!t.complete&&0!==t.naturalWidth}prepareImageElement(t){let e;return"undefined"===typeof t&&(e=document.createElement("img"),e.width=200,e.height=200),"string"===typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e}prepareVideoElement(t){let e;return t||"undefined"===typeof document||(e=document.createElement("video"),e.width=200,e.height=200),"string"===typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e}decodeOnce(t,e=!0,r=!0){this._stopAsyncDecode=!1;const n=(i,o)=>{if(this._stopAsyncDecode)return o(new O("Video stream has ended before any code could be detected.")),void(this._stopAsyncDecode=void 0);try{const e=this.decode(t);i(e)}catch(a){const t=e&&a instanceof O,s=a instanceof f||a instanceof v,c=s&&r;if(t||c)return setTimeout(n,this._timeBetweenDecodingAttempts,i,o);o(a)}};return new Promise((t,e)=>n(t,e))}decodeContinuously(t,e){this._stopContinuousDecode=!1;const r=()=>{if(this._stopContinuousDecode)this._stopContinuousDecode=void 0;else try{const n=this.decode(t);e(n,null),setTimeout(r,this.timeBetweenScansMillis)}catch(n){e(null,n);const t=n instanceof f||n instanceof v,i=n instanceof O;(t||i)&&setTimeout(r,this._timeBetweenDecodingAttempts)}};r()}decode(t){const e=this.createBinaryBitmap(t);return this.decodeBitmap(e)}_isHTMLVideoElement(t){const e=t;return 0!==e.videoWidth}drawFrameOnCanvas(t,e,r){e||(e={sx:0,sy:0,sWidth:t.videoWidth,sHeight:t.videoHeight,dx:0,dy:0,dWidth:t.videoWidth,dHeight:t.videoHeight}),r||(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)}drawImageOnCanvas(t,e,r=this.captureCanvasContext){e||(e={sx:0,sy:0,sWidth:t.naturalWidth,sHeight:t.naturalHeight,dx:0,dy:0,dWidth:t.naturalWidth,dHeight:t.naturalHeight}),r||(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)}createBinaryBitmap(t){this.getCaptureCanvasContext(t);this._isHTMLVideoElement(t)?this.drawFrameOnCanvas(t):this.drawImageOnCanvas(t);const e=this.getCaptureCanvas(t),r=new x(e),n=new M(r);return new d(n)}getCaptureCanvasContext(t){if(!this.captureCanvasContext){const e=this.getCaptureCanvas(t),r=e.getContext("2d");this.captureCanvasContext=r}return this.captureCanvasContext}getCaptureCanvas(t){if(!this.captureCanvas){const e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas}decodeBitmap(t){return this.reader.decode(t,this._hints)}createCaptureCanvas(t){if("undefined"===typeof document)return this._destroyCaptureCanvas(),null;const e=document.createElement("canvas");let r,n;return"undefined"!==typeof t&&(t instanceof HTMLVideoElement?(r=t.videoWidth,n=t.videoHeight):t instanceof HTMLImageElement&&(r=t.naturalWidth||t.width,n=t.naturalHeight||t.height)),e.style.width=r+"px",e.style.height=n+"px",e.width=r,e.height=n,e}stopStreams(){this.stream&&(this.stream.getVideoTracks().forEach(t=>t.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&&("undefined"!==typeof this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),"undefined"!==typeof this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),"undefined"!==typeof this.videoCanPlayListener&&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(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}}cleanVideoSource(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")}}class j{constructor(t,e,r=(null==e?0:8*e.length),n,i,o=p.currentTimeMillis()){this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=i,this.timestamp=o,this.text=t,this.rawBytes=e,this.numBits=void 0===r||null===r?null===e||void 0===e?0:8*e.length:r,this.resultPoints=n,this.format=i,this.resultMetadata=null,this.timestamp=void 0===o||null===o?p.currentTimeMillis():o}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(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)}putAllMetadata(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))}addResultPoints(t){const e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){const r=new Array(e.length+t.length);p.arraycopy(e,0,r,0,e.length),p.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}}getTimestamp(){return this.timestamp}toString(){return this.text}}(function(t){t[t["AZTEC"]=0]="AZTEC",t[t["CODABAR"]=1]="CODABAR",t[t["CODE_39"]=2]="CODE_39",t[t["CODE_93"]=3]="CODE_93",t[t["CODE_128"]=4]="CODE_128",t[t["DATA_MATRIX"]=5]="DATA_MATRIX",t[t["EAN_8"]=6]="EAN_8",t[t["EAN_13"]=7]="EAN_13",t[t["ITF"]=8]="ITF",t[t["MAXICODE"]=9]="MAXICODE",t[t["PDF_417"]=10]="PDF_417",t[t["QR_CODE"]=11]="QR_CODE",t[t["RSS_14"]=12]="RSS_14",t[t["RSS_EXPANDED"]=13]="RSS_EXPANDED",t[t["UPC_A"]=14]="UPC_A",t[t["UPC_E"]=15]="UPC_E",t[t["UPC_EAN_EXTENSION"]=16]="UPC_EAN_EXTENSION"})(k||(k={}));var H,V=k;(function(t){t[t["OTHER"]=0]="OTHER",t[t["ORIENTATION"]=1]="ORIENTATION",t[t["BYTE_SEGMENTS"]=2]="BYTE_SEGMENTS",t[t["ERROR_CORRECTION_LEVEL"]=3]="ERROR_CORRECTION_LEVEL",t[t["ISSUE_NUMBER"]=4]="ISSUE_NUMBER",t[t["SUGGESTED_PRICE"]=5]="SUGGESTED_PRICE",t[t["POSSIBLE_COUNTRY"]=6]="POSSIBLE_COUNTRY",t[t["UPC_EAN_EXTENSION"]=7]="UPC_EAN_EXTENSION",t[t["PDF417_EXTRA_METADATA"]=8]="PDF417_EXTRA_METADATA",t[t["STRUCTURED_APPEND_SEQUENCE"]=9]="STRUCTURED_APPEND_SEQUENCE",t[t["STRUCTURED_APPEND_PARITY"]=10]="STRUCTURED_APPEND_PARITY"})(H||(H={}));var z,W,G,Y,X,$,Z=H;class Q{constructor(t,e,r,n,i=-1,o=-1){this.rawBytes=t,this.text=e,this.byteSegments=r,this.ecLevel=n,this.structuredAppendSequenceNumber=i,this.structuredAppendParity=o,this.numBits=void 0===t||null===t?0:8*t.length}getRawBytes(){return this.rawBytes}getNumBits(){return this.numBits}setNumBits(t){this.numBits=t}getText(){return this.text}getByteSegments(){return this.byteSegments}getECLevel(){return this.ecLevel}getErrorsCorrected(){return this.errorsCorrected}setErrorsCorrected(t){this.errorsCorrected=t}getErasures(){return this.erasures}setErasures(t){this.erasures=t}getOther(){return this.other}setOther(t){this.other=t}hasStructuredAppend(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0}getStructuredAppendParity(){return this.structuredAppendParity}getStructuredAppendSequenceNumber(){return this.structuredAppendSequenceNumber}}class q{exp(t){return this.expTable[t]}log(t){if(0===t)throw new h;return this.logTable[t]}static addOrSubtract(t,e){return t^e}}class K{constructor(t,e){if(0===e.length)throw new h;this.field=t;const r=e.length;if(r>1&&0===e[0]){let t=1;while(t<r&&0===e[t])t++;t===r?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(r-t),p.arraycopy(e,t,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}getCoefficients(){return this.coefficients}getDegree(){return this.coefficients.length-1}isZero(){return 0===this.coefficients[0]}getCoefficient(t){return this.coefficients[this.coefficients.length-1-t]}evaluateAt(t){if(0===t)return this.getCoefficient(0);const e=this.coefficients;let r;if(1===t){r=0;for(let t=0,n=e.length;t!==n;t++){const n=e[t];r=q.addOrSubtract(r,n)}return r}r=e[0];const n=e.length,i=this.field;for(let o=1;o<n;o++)r=q.addOrSubtract(i.multiply(t,r),e[o]);return r}addOrSubtract(t){if(!this.field.equals(t.field))throw new h("GenericGFPolys do not have same GenericGF field");if(this.isZero())return t;if(t.isZero())return this;let e=this.coefficients,r=t.coefficients;if(e.length>r.length){const t=e;e=r,r=t}let n=new Int32Array(r.length);const i=r.length-e.length;p.arraycopy(r,0,n,0,i);for(let o=i;o<r.length;o++)n[o]=q.addOrSubtract(e[o-i],r[o]);return new K(this.field,n)}multiply(t){if(!this.field.equals(t.field))throw new h("GenericGFPolys do not have same GenericGF field");if(this.isZero()||t.isZero())return this.field.getZero();const e=this.coefficients,r=e.length,n=t.coefficients,i=n.length,o=new Int32Array(r+i-1),a=this.field;for(let s=0;s<r;s++){const t=e[s];for(let e=0;e<i;e++)o[s+e]=q.addOrSubtract(o[s+e],a.multiply(t,n[e]))}return new K(a,o)}multiplyScalar(t){if(0===t)return this.field.getZero();if(1===t)return this;const e=this.coefficients.length,r=this.field,n=new Int32Array(e),i=this.coefficients;for(let o=0;o<e;o++)n[o]=r.multiply(i[o],t);return new K(r,n)}multiplyByMonomial(t,e){if(t<0)throw new h;if(0===e)return this.field.getZero();const r=this.coefficients,n=r.length,i=new Int32Array(n+t),o=this.field;for(let a=0;a<n;a++)i[a]=o.multiply(r[a],e);return new K(o,i)}divide(t){if(!this.field.equals(t.field))throw new h("GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new h("Divide by 0");const e=this.field;let r=e.getZero(),n=this;const i=t.getCoefficient(t.getDegree()),o=e.inverse(i);while(n.getDegree()>=t.getDegree()&&!n.isZero()){const i=n.getDegree()-t.getDegree(),a=e.multiply(n.getCoefficient(n.getDegree()),o),s=t.multiplyByMonomial(i,a),c=e.buildMonomial(i,a);r=r.addOrSubtract(c),n=n.addOrSubtract(s)}return[r,n]}toString(){let t="";for(let e=this.getDegree();e>=0;e--){let r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):t.length>0&&(t+=" + "),0===e||1!==r){const e=this.field.log(r);0===e?t+="1":1===e?t+="a":(t+="a^",t+=e)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t}}class J extends u{}J.kind="ArithmeticException";class tt extends q{constructor(t,e,r){super(),this.primitive=t,this.size=e,this.generatorBase=r;const n=new Int32Array(e);let i=1;for(let a=0;a<e;a++)n[a]=i,i*=2,i>=e&&(i^=t,i&=e-1);this.expTable=n;const o=new Int32Array(e);for(let a=0;a<e-1;a++)o[n[a]]=a;this.logTable=o,this.zero=new K(this,Int32Array.from([0])),this.one=new K(this,Int32Array.from([1]))}getZero(){return this.zero}getOne(){return this.one}buildMonomial(t,e){if(t<0)throw new h;if(0===e)return this.zero;const r=new Int32Array(t+1);return r[0]=e,new K(this,r)}inverse(t){if(0===t)throw new J;return this.expTable[this.size-this.logTable[t]-1]}multiply(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]}getSize(){return this.size}getGeneratorBase(){return this.generatorBase}toString(){return"GF(0x"+E.toHexString(this.primitive)+","+this.size+")"}equals(t){return t===this}}tt.AZTEC_DATA_12=new tt(4201,4096,1),tt.AZTEC_DATA_10=new tt(1033,1024,1),tt.AZTEC_DATA_6=new tt(67,64,1),tt.AZTEC_PARAM=new tt(19,16,1),tt.QR_CODE_FIELD_256=new tt(285,256,0),tt.DATA_MATRIX_FIELD_256=new tt(301,256,1),tt.AZTEC_DATA_8=tt.DATA_MATRIX_FIELD_256,tt.MAXICODE_FIELD_64=tt.AZTEC_DATA_6;class et extends u{}et.kind="ReedSolomonException";class rt extends u{}rt.kind="IllegalStateException";class nt{constructor(t){this.field=t}decode(t,e){const r=this.field,n=new K(r,t),i=new Int32Array(e);let o=!0;for(let d=0;d<e;d++){const t=n.evaluateAt(r.exp(d+r.getGeneratorBase()));i[i.length-1-d]=t,0!==t&&(o=!1)}if(o)return;const a=new K(r,i),s=this.runEuclideanAlgorithm(r.buildMonomial(e,1),a,e),c=s[0],u=s[1],l=this.findErrorLocations(c),h=this.findErrorMagnitudes(u,l);for(let d=0;d<l.length;d++){const e=t.length-1-r.log(l[d]);if(e<0)throw new et("Bad error location");t[e]=tt.addOrSubtract(t[e],h[d])}}runEuclideanAlgorithm(t,e,r){if(t.getDegree()<e.getDegree()){const r=t;t=e,e=r}const n=this.field;let i=t,o=e,a=n.getZero(),s=n.getOne();while(o.getDegree()>=(r/2|0)){let t=i,e=a;if(i=o,a=s,i.isZero())throw new et("r_{i-1} was zero");o=t;let r=n.getZero();const c=i.getCoefficient(i.getDegree()),u=n.inverse(c);while(o.getDegree()>=i.getDegree()&&!o.isZero()){const t=o.getDegree()-i.getDegree(),e=n.multiply(o.getCoefficient(o.getDegree()),u);r=r.addOrSubtract(n.buildMonomial(t,e)),o=o.addOrSubtract(i.multiplyByMonomial(t,e))}if(s=r.multiply(a).addOrSubtract(e),o.getDegree()>=i.getDegree())throw new rt("Division algorithm failed to reduce polynomial?")}const c=s.getCoefficient(0);if(0===c)throw new et("sigmaTilde(0) was zero");const u=n.inverse(c),l=s.multiplyScalar(u),h=o.multiplyScalar(u);return[l,h]}findErrorLocations(t){const e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);const r=new Int32Array(e);let n=0;const i=this.field;for(let o=1;o<i.getSize()&&n<e;o++)0===t.evaluateAt(o)&&(r[n]=i.inverse(o),n++);if(n!==e)throw new et("Error locator degree does not match number of roots");return r}findErrorMagnitudes(t,e){const r=e.length,n=new Int32Array(r),i=this.field;for(let o=0;o<r;o++){const a=i.inverse(e[o]);let s=1;for(let t=0;t<r;t++)if(o!==t){const r=i.multiply(e[t],a),n=0===(1&r)?1|r:-2&r;s=i.multiply(s,n)}n[o]=i.multiply(t.evaluateAt(a),i.inverse(s)),0!==i.getGeneratorBase()&&(n[o]=i.multiply(n[o],a))}return n}}(function(t){t[t["UPPER"]=0]="UPPER",t[t["LOWER"]=1]="LOWER",t[t["MIXED"]=2]="MIXED",t[t["DIGIT"]=3]="DIGIT",t[t["PUNCT"]=4]="PUNCT",t[t["BINARY"]=5]="BINARY"})(z||(z={}));class it{decode(t){this.ddata=t;let e=t.getBits(),r=this.extractBits(e),n=this.correctBits(r),i=it.convertBoolArrayToByteArray(n),o=it.getEncodedData(n),a=new Q(i,o,null,null);return a.setNumBits(n.length),a}static highLevelDecode(t){return this.getEncodedData(t)}static getEncodedData(t){let e=t.length,r=z.UPPER,n=z.UPPER,i="",o=0;while(o<e)if(n===z.BINARY){if(e-o<5)break;let a=it.readCode(t,o,5);if(o+=5,0===a){if(e-o<11)break;a=it.readCode(t,o,11)+31,o+=11}for(let r=0;r<a;r++){if(e-o<8){o=e;break}const r=it.readCode(t,o,8);i+=T.castAsNonUtf8Char(r),o+=8}n=r}else{let a=n===z.DIGIT?4:5;if(e-o<a)break;let s=it.readCode(t,o,a);o+=a;let c=it.getCharacter(n,s);c.startsWith("CTRL_")?(r=n,n=it.getTable(c.charAt(5)),"L"===c.charAt(6)&&(r=n)):(i+=c,n=r)}return i}static getTable(t){switch(t){case"L":return z.LOWER;case"P":return z.PUNCT;case"M":return z.MIXED;case"D":return z.DIGIT;case"B":return z.BINARY;case"U":default:return z.UPPER}}static getCharacter(t,e){switch(t){case z.UPPER:return it.UPPER_TABLE[e];case z.LOWER:return it.LOWER_TABLE[e];case z.MIXED:return it.MIXED_TABLE[e];case z.PUNCT:return it.PUNCT_TABLE[e];case z.DIGIT:return it.DIGIT_TABLE[e];default:throw new rt("Bad table")}}correctBits(t){let e,r;this.ddata.getNbLayers()<=2?(r=6,e=tt.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(r=8,e=tt.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(r=10,e=tt.AZTEC_DATA_10):(r=12,e=tt.AZTEC_DATA_12);let n=this.ddata.getNbDatablocks(),i=t.length/r;if(i<n)throw new v;let o=t.length%r,a=new Int32Array(i);for(let d=0;d<i;d++,o+=r)a[d]=it.readCode(t,o,r);try{let t=new nt(e);t.decode(a,i-n)}catch(h){throw new v(h)}let s=(1<<r)-1,c=0;for(let d=0;d<n;d++){let t=a[d];if(0===t||t===s)throw new v;1!==t&&t!==s-1||c++}let u=new Array(n*r-c),l=0;for(let d=0;d<n;d++){let t=a[d];if(1===t||t===s-1)u.fill(t>1,l,l+r-1),l+=r-1;else for(let e=r-1;e>=0;--e)u[l++]=0!==(t&1<<e)}return u}extractBits(t){let e=this.ddata.isCompact(),r=this.ddata.getNbLayers(),n=(e?11:14)+4*r,i=new Int32Array(n),o=new Array(this.totalBitsInLayer(r,e));if(e)for(let a=0;a<i.length;a++)i[a]=a;else{let t=n+1+2*E.truncDivision(E.truncDivision(n,2)-1,15),e=n/2,r=E.truncDivision(t,2);for(let n=0;n<e;n++){let t=n+E.truncDivision(n,15);i[e-n-1]=r-t-1,i[e+n]=r+t+1}}for(let a=0,s=0;a<r;a++){let c=4*(r-a)+(e?9:12),u=2*a,l=n-1-u;for(let e=0;e<c;e++){let r=2*e;for(let n=0;n<2;n++)o[s+r+n]=t.get(i[u+n],i[u+e]),o[s+2*c+r+n]=t.get(i[u+e],i[l-n]),o[s+4*c+r+n]=t.get(i[l-n],i[l-e]),o[s+6*c+r+n]=t.get(i[l-e],i[u+n])}s+=8*c}return o}static readCode(t,e,r){let n=0;for(let i=e;i<e+r;i++)n<<=1,t[i]&&(n|=1);return n}static readByte(t,e){let r=t.length-e;return r>=8?it.readCode(t,e,8):it.readCode(t,e,r)<<8-r}static convertBoolArrayToByteArray(t){let e=new Uint8Array((t.length+7)/8);for(let r=0;r<e.length;r++)e[r]=it.readByte(t,8*r);return e}totalBitsInLayer(t,e){return((e?88:112)+16*t)*t}}it.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"],it.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"],it.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"],it.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],it.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"];class ot{constructor(){}static round(t){return NaN===t?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0}static distance(t,e,r,n){const i=t-r,o=e-n;return Math.sqrt(i*i+o*o)}static sum(t){let e=0;for(let r=0,n=t.length;r!==n;r++){const n=t[r];e+=n}return e}}class at{static floatToIntBits(t){return t}}at.MAX_VALUE=Number.MAX_SAFE_INTEGER;class st{constructor(t,e){this.x=t,this.y=e}getX(){return this.x}getY(){return this.y}equals(t){if(t instanceof st){const e=t;return this.x===e.x&&this.y===e.y}return!1}hashCode(){return 31*at.floatToIntBits(this.x)+at.floatToIntBits(this.y)}toString(){return"("+this.x+","+this.y+")"}static orderBestPatterns(t){const e=this.distance(t[0],t[1]),r=this.distance(t[1],t[2]),n=this.distance(t[0],t[2]);let i,o,a;if(r>=e&&r>=n?(o=t[0],i=t[1],a=t[2]):n>=r&&n>=e?(o=t[1],i=t[0],a=t[2]):(o=t[2],i=t[0],a=t[1]),this.crossProductZ(i,o,a)<0){const t=i;i=a,a=t}t[0]=i,t[1]=o,t[2]=a}static distance(t,e){return ot.distance(t.x,t.y,e.x,e.y)}static crossProductZ(t,e,r){const n=e.x,i=e.y;return(r.x-n)*(t.y-i)-(r.y-i)*(t.x-n)}}class ct{constructor(t,e){this.bits=t,this.points=e}getBits(){return this.bits}getPoints(){return this.points}}class ut extends ct{constructor(t,e,r,n,i){super(t,e),this.compact=r,this.nbDatablocks=n,this.nbLayers=i}getNbLayers(){return this.nbLayers}getNbDatablocks(){return this.nbDatablocks}isCompact(){return this.compact}}class lt{constructor(t,e,r,n){this.image=t,this.height=t.getHeight(),this.width=t.getWidth(),void 0!==e&&null!==e||(e=lt.INIT_SIZE),void 0!==r&&null!==r||(r=t.getWidth()/2|0),void 0!==n&&null!==n||(n=t.getHeight()/2|0);const i=e/2|0;if(this.leftInit=r-i,this.rightInit=r+i,this.upInit=n-i,this.downInit=n+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new O}detect(){let t=this.leftInit,e=this.rightInit,r=this.upInit,n=this.downInit,i=!1,o=!0,a=!1,s=!1,c=!1,u=!1,l=!1;const h=this.width,d=this.height;while(o){o=!1;let f=!0;while((f||!s)&&e<h)f=this.containsBlackPoint(r,n,e,!1),f?(e++,o=!0,s=!0):s||e++;if(e>=h){i=!0;break}let g=!0;while((g||!c)&&n<d)g=this.containsBlackPoint(t,e,n,!0),g?(n++,o=!0,c=!0):c||n++;if(n>=d){i=!0;break}let p=!0;while((p||!u)&&t>=0)p=this.containsBlackPoint(r,n,t,!1),p?(t--,o=!0,u=!0):u||t--;if(t<0){i=!0;break}let m=!0;while((m||!l)&&r>=0)m=this.containsBlackPoint(t,e,r,!0),m?(r--,o=!0,l=!0):l||r--;if(r<0){i=!0;break}o&&(a=!0)}if(!i&&a){const i=e-t;let o=null;for(let e=1;null===o&&e<i;e++)o=this.getBlackPointOnSegment(t,n-e,t+e,n);if(null==o)throw new O;let a=null;for(let e=1;null===a&&e<i;e++)a=this.getBlackPointOnSegment(t,r+e,t+e,r);if(null==a)throw new O;let s=null;for(let t=1;null===s&&t<i;t++)s=this.getBlackPointOnSegment(e,r+t,e-t,r);if(null==s)throw new O;let c=null;for(let t=1;null===c&&t<i;t++)c=this.getBlackPointOnSegment(e,n-t,e-t,n);if(null==c)throw new O;return this.centerEdges(c,o,s,a)}throw new O}getBlackPointOnSegment(t,e,r,n){const i=ot.round(ot.distance(t,e,r,n)),o=(r-t)/i,a=(n-e)/i,s=this.image;for(let c=0;c<i;c++){const r=ot.round(t+c*o),n=ot.round(e+c*a);if(s.get(r,n))return new st(r,n)}return null}centerEdges(t,e,r,n){const i=t.getX(),o=t.getY(),a=e.getX(),s=e.getY(),c=r.getX(),u=r.getY(),l=n.getX(),h=n.getY(),d=lt.CORR;return i<this.width/2?[new st(l-d,h+d),new st(a+d,s+d),new st(c-d,u-d),new st(i+d,o-d)]:[new st(l+d,h+d),new st(a+d,s-d),new st(c-d,u+d),new st(i-d,o-d)]}containsBlackPoint(t,e,r,n){const i=this.image;if(n){for(let o=t;o<=e;o++)if(i.get(o,r))return!0}else for(let o=t;o<=e;o++)if(i.get(r,o))return!0;return!1}}lt.INIT_SIZE=10,lt.CORR=1;class ht{static checkAndNudgePoints(t,e){const r=t.getWidth(),n=t.getHeight();let i=!0;for(let o=0;o<e.length&&i;o+=2){const t=Math.floor(e[o]),a=Math.floor(e[o+1]);if(t<-1||t>r||a<-1||a>n)throw new O;i=!1,-1===t?(e[o]=0,i=!0):t===r&&(e[o]=r-1,i=!0),-1===a?(e[o+1]=0,i=!0):a===n&&(e[o+1]=n-1,i=!0)}i=!0;for(let o=e.length-2;o>=0&&i;o-=2){const t=Math.floor(e[o]),a=Math.floor(e[o+1]);if(t<-1||t>r||a<-1||a>n)throw new O;i=!1,-1===t?(e[o]=0,i=!0):t===r&&(e[o]=r-1,i=!0),-1===a?(e[o+1]=0,i=!0):a===n&&(e[o+1]=n-1,i=!0)}}}class dt{constructor(t,e,r,n,i,o,a,s,c){this.a11=t,this.a21=e,this.a31=r,this.a12=n,this.a22=i,this.a32=o,this.a13=a,this.a23=s,this.a33=c}static quadrilateralToQuadrilateral(t,e,r,n,i,o,a,s,c,u,l,h,d,f,g,p){const m=dt.quadrilateralToSquare(t,e,r,n,i,o,a,s),w=dt.squareToQuadrilateral(c,u,l,h,d,f,g,p);return w.times(m)}transformPoints(t){const e=t.length,r=this.a11,n=this.a12,i=this.a13,o=this.a21,a=this.a22,s=this.a23,c=this.a31,u=this.a32,l=this.a33;for(let h=0;h<e;h+=2){const e=t[h],d=t[h+1],f=i*e+s*d+l;t[h]=(r*e+o*d+c)/f,t[h+1]=(n*e+a*d+u)/f}}transformPointsWithValues(t,e){const r=this.a11,n=this.a12,i=this.a13,o=this.a21,a=this.a22,s=this.a23,c=this.a31,u=this.a32,l=this.a33,h=t.length;for(let d=0;d<h;d++){const h=t[d],f=e[d],g=i*h+s*f+l;t[d]=(r*h+o*f+c)/g,e[d]=(n*h+a*f+u)/g}}static squareToQuadrilateral(t,e,r,n,i,o,a,s){const c=t-r+i-a,u=e-n+o-s;if(0===c&&0===u)return new dt(r-t,i-r,t,n-e,o-n,e,0,0,1);{const l=r-i,h=a-i,d=n-o,f=s-o,g=l*f-h*d,p=(c*f-h*u)/g,m=(l*u-c*d)/g;return new dt(r-t+p*r,a-t+m*a,t,n-e+p*n,s-e+m*s,e,p,m,1)}}static quadrilateralToSquare(t,e,r,n,i,o,a,s){return dt.squareToQuadrilateral(t,e,r,n,i,o,a,s).buildAdjoint()}buildAdjoint(){return new dt(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(t){return new dt(this.a11*t.a11+this.a21*t.a12+this.a31*t.a13,this.a11*t.a21+this.a21*t.a22+this.a31*t.a23,this.a11*t.a31+this.a21*t.a32+this.a31*t.a33,this.a12*t.a11+this.a22*t.a12+this.a32*t.a13,this.a12*t.a21+this.a22*t.a22+this.a32*t.a23,this.a12*t.a31+this.a22*t.a32+this.a32*t.a33,this.a13*t.a11+this.a23*t.a12+this.a33*t.a13,this.a13*t.a21+this.a23*t.a22+this.a33*t.a23,this.a13*t.a31+this.a23*t.a32+this.a33*t.a33)}}class ft extends ht{sampleGrid(t,e,r,n,i,o,a,s,c,u,l,h,d,f,g,p,m,w,y){const E=dt.quadrilateralToQuadrilateral(n,i,o,a,s,c,u,l,h,d,f,g,p,m,w,y);return this.sampleGridWithTransform(t,e,r,E)}sampleGridWithTransform(t,e,r,n){if(e<=0||r<=0)throw new O;const i=new D(e,r),o=new Float32Array(2*e);for(let s=0;s<r;s++){const e=o.length,r=s+.5;for(let t=0;t<e;t+=2)o[t]=t/2+.5,o[t+1]=r;n.transformPoints(o),ht.checkAndNudgePoints(t,o);try{for(let r=0;r<e;r+=2)t.get(Math.floor(o[r]),Math.floor(o[r+1]))&&i.set(r/2,s)}catch(a){throw new O}}return i}}class gt{static setGridSampler(t){gt.gridSampler=t}static getInstance(){return gt.gridSampler}}gt.gridSampler=new ft;class pt{constructor(t,e){this.x=t,this.y=e}toResultPoint(){return new st(this.getX(),this.getY())}getX(){return this.x}getY(){return this.y}}class mt{constructor(t){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=t}detect(){return this.detectMirror(!1)}detectMirror(t){let e=this.getMatrixCenter(),r=this.getBullsEyeCorners(e);if(t){let t=r[0];r[0]=r[2],r[2]=t}this.extractParameters(r);let n=this.sampleGrid(this.image,r[this.shift%4],r[(this.shift+1)%4],r[(this.shift+2)%4],r[(this.shift+3)%4]),i=this.getMatrixCornerPoints(r);return new ut(n,i,this.compact,this.nbDataBlocks,this.nbLayers)}extractParameters(t){if(!this.isValidPoint(t[0])||!this.isValidPoint(t[1])||!this.isValidPoint(t[2])||!this.isValidPoint(t[3]))throw new O;let e=2*this.nbCenterLayers,r=new Int32Array([this.sampleLine(t[0],t[1],e),this.sampleLine(t[1],t[2],e),this.sampleLine(t[2],t[3],e),this.sampleLine(t[3],t[0],e)]);this.shift=this.getRotation(r,e);let n=0;for(let o=0;o<4;o++){let t=r[(this.shift+o)%4];this.compact?(n<<=7,n+=t>>1&127):(n<<=10,n+=(t>>2&992)+(t>>1&31))}let i=this.getCorrectedParameterData(n,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(t,e){let r=0;t.forEach((t,n,i)=>{let o=(t>>e-2<<1)+(1&t);r=(r<<3)+o}),r=((1&r)<<11)+(r>>1);for(let n=0;n<4;n++)if(E.bitCount(r^this.EXPECTED_CORNER_BITS[n])<=2)return n;throw new O}getCorrectedParameterData(t,e){let r,n;e?(r=7,n=2):(r=10,n=4);let i=r-n,o=new Int32Array(r);for(let c=r-1;c>=0;--c)o[c]=15&t,t>>=4;try{let t=new nt(tt.AZTEC_PARAM);t.decode(o,i)}catch(s){throw new O}let a=0;for(let c=0;c<n;c++)a=(a<<4)+o[c];return a}getBullsEyeCorners(t){let e=t,r=t,n=t,i=t,o=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){let t=this.getFirstDifferent(e,o,1,-1),a=this.getFirstDifferent(r,o,1,1),s=this.getFirstDifferent(n,o,-1,1),c=this.getFirstDifferent(i,o,-1,-1);if(this.nbCenterLayers>2){let r=this.distancePoint(c,t)*this.nbCenterLayers/(this.distancePoint(i,e)*(this.nbCenterLayers+2));if(r<.75||r>1.25||!this.isWhiteOrBlackRectangle(t,a,s,c))break}e=t,r=a,n=s,i=c,o=!o}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new O;this.compact=5===this.nbCenterLayers;let a=new st(e.getX()+.5,e.getY()-.5),s=new st(r.getX()+.5,r.getY()+.5),c=new st(n.getX()-.5,n.getY()+.5),u=new st(i.getX()-.5,i.getY()-.5);return this.expandSquare([a,s,c,u],2*this.nbCenterLayers-3,2*this.nbCenterLayers)}getMatrixCenter(){let t,e,r,n;try{let i=new lt(this.image).detect();t=i[0],e=i[1],r=i[2],n=i[3]}catch(a){let i=this.image.getWidth()/2,o=this.image.getHeight()/2;t=this.getFirstDifferent(new pt(i+7,o-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new pt(i+7,o+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new pt(i-7,o+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new pt(i-7,o-7),!1,-1,-1).toResultPoint()}let i=ot.round((t.getX()+n.getX()+e.getX()+r.getX())/4),o=ot.round((t.getY()+n.getY()+e.getY()+r.getY())/4);try{let a=new lt(this.image,15,i,o).detect();t=a[0],e=a[1],r=a[2],n=a[3]}catch(a){t=this.getFirstDifferent(new pt(i+7,o-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new pt(i+7,o+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new pt(i-7,o+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new pt(i-7,o-7),!1,-1,-1).toResultPoint()}return i=ot.round((t.getX()+n.getX()+e.getX()+r.getX())/4),o=ot.round((t.getY()+n.getY()+e.getY()+r.getY())/4),new pt(i,o)}getMatrixCornerPoints(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())}sampleGrid(t,e,r,n,i){let o=gt.getInstance(),a=this.getDimension(),s=a/2-this.nbCenterLayers,c=a/2+this.nbCenterLayers;return o.sampleGrid(t,a,a,s,s,c,s,c,c,s,c,e.getX(),e.getY(),r.getX(),r.getY(),n.getX(),n.getY(),i.getX(),i.getY())}sampleLine(t,e,r){let n=0,i=this.distanceResultPoint(t,e),o=i/r,a=t.getX(),s=t.getY(),c=o*(e.getX()-t.getX())/i,u=o*(e.getY()-t.getY())/i;for(let l=0;l<r;l++)this.image.get(ot.round(a+l*c),ot.round(s+l*u))&&(n|=1<<r-l-1);return n}isWhiteOrBlackRectangle(t,e,r,n){let i=3;t=new pt(t.getX()-i,t.getY()+i),e=new pt(e.getX()-i,e.getY()-i),r=new pt(r.getX()+i,r.getY()-i),n=new pt(n.getX()+i,n.getY()+i);let o=this.getColor(n,t);if(0===o)return!1;let a=this.getColor(t,e);return a===o&&(a=this.getColor(e,r),a===o&&(a=this.getColor(r,n),a===o))}getColor(t,e){let r=this.distancePoint(t,e),n=(e.getX()-t.getX())/r,i=(e.getY()-t.getY())/r,o=0,a=t.getX(),s=t.getY(),c=this.image.get(t.getX(),t.getY()),u=Math.ceil(r);for(let h=0;h<u;h++)a+=n,s+=i,this.image.get(ot.round(a),ot.round(s))!==c&&o++;let l=o/r;return l>.1&&l<.9?0:l<=.1===c?1:-1}getFirstDifferent(t,e,r,n){let i=t.getX()+r,o=t.getY()+n;while(this.isValid(i,o)&&this.image.get(i,o)===e)i+=r,o+=n;i-=r,o-=n;while(this.isValid(i,o)&&this.image.get(i,o)===e)i+=r;i-=r;while(this.isValid(i,o)&&this.image.get(i,o)===e)o+=n;return o-=n,new pt(i,o)}expandSquare(t,e,r){let n=r/(2*e),i=t[0].getX()-t[2].getX(),o=t[0].getY()-t[2].getY(),a=(t[0].getX()+t[2].getX())/2,s=(t[0].getY()+t[2].getY())/2,c=new st(a+n*i,s+n*o),u=new st(a-n*i,s-n*o);i=t[1].getX()-t[3].getX(),o=t[1].getY()-t[3].getY(),a=(t[1].getX()+t[3].getX())/2,s=(t[1].getY()+t[3].getY())/2;let l=new st(a+n*i,s+n*o),h=new st(a-n*i,s-n*o),d=[c,l,u,h];return d}isValid(t,e){return t>=0&&t<this.image.getWidth()&&e>0&&e<this.image.getHeight()}isValidPoint(t){let e=ot.round(t.getX()),r=ot.round(t.getY());return this.isValid(e,r)}distancePoint(t,e){return ot.distance(t.getX(),t.getY(),e.getX(),e.getY())}distanceResultPoint(t,e){return ot.distance(t.getX(),t.getY(),e.getX(),e.getY())}getDimension(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(E.truncDivision(this.nbLayers-4,8)+1)+15}}class wt{decode(t,e=null){let r=null,n=new mt(t.getBlackMatrix()),i=null,o=null;try{let t=n.detectMirror(!1);i=t.getPoints(),this.reportFoundResultPoints(e,i),o=(new it).decode(t)}catch(u){r=u}if(null==o)try{let t=n.detectMirror(!0);i=t.getPoints(),this.reportFoundResultPoints(e,i),o=(new it).decode(t)}catch(u){if(null!=r)throw r;throw u}let a=new j(o.getText(),o.getRawBytes(),o.getNumBits(),i,V.AZTEC,p.currentTimeMillis()),s=o.getByteSegments();null!=s&&a.putMetadata(Z.BYTE_SEGMENTS,s);let c=o.getECLevel();return null!=c&&a.putMetadata(Z.ERROR_CORRECTION_LEVEL,c),a}reportFoundResultPoints(t,e){if(null!=t){let r=t.get(S.NEED_RESULT_POINT_CALLBACK);null!=r&&e.forEach((t,e,n)=>{r.foundPossibleResultPoint(t)})}}reset(){}}class yt extends U{constructor(t=500){super(new wt,t)}}class Et{decode(t,e){try{return this.doDecode(t,e)}catch(r){const n=e&&!0===e.get(S.TRY_HARDER);if(n&&t.isRotateSupported()){const r=t.rotateCounterClockwise(),n=this.doDecode(r,e),i=n.getResultMetadata();let o=270;null!==i&&!0===i.get(Z.ORIENTATION)&&(o+=i.get(Z.ORIENTATION)%360),n.putMetadata(Z.ORIENTATION,o);const a=n.getResultPoints();if(null!==a){const t=r.getHeight();for(let e=0;e<a.length;e++)a[e]=new st(t-a[e].getY()-1,a[e].getX())}return n}throw new O}}reset(){}doDecode(t,e){const r=t.getWidth(),n=t.getHeight();let i=new C(r);const o=e&&!0===e.get(S.TRY_HARDER),a=Math.max(1,n>>(o?8:5));let s;s=o?n:15;const c=Math.trunc(n/2);for(let h=0;h<s;h++){const o=Math.trunc((h+1)/2),s=0===(1&h),d=c+a*(s?o:-o);if(d<0||d>=n)break;try{i=t.getBlackRow(d,i)}catch(u){continue}for(let t=0;t<2;t++){if(1===t&&(i.reverse(),e&&!0===e.get(S.NEED_RESULT_POINT_CALLBACK))){const t=new Map;e.forEach((e,r)=>t.set(r,e)),t.delete(S.NEED_RESULT_POINT_CALLBACK),e=t}try{const n=this.decodeRow(d,i,e);if(1===t){n.putMetadata(Z.ORIENTATION,180);const t=n.getResultPoints();null!==t&&(t[0]=new st(r-t[0].getX()-1,t[0].getY()),t[1]=new st(r-t[1].getX()-1,t[1].getY()))}return n}catch(l){}}}throw new O}static recordPattern(t,e,r){const n=r.length;for(let c=0;c<n;c++)r[c]=0;const i=t.getSize();if(e>=i)throw new O;let o=!t.get(e),a=0,s=e;while(s<i){if(t.get(s)!==o)r[a]++;else{if(++a===n)break;r[a]=1,o=!o}s++}if(a!==n&&(a!==n-1||s!==i))throw new O}static recordPatternInReverse(t,e,r){let n=r.length,i=t.get(e);while(e>0&&n>=0)t.get(--e)!==i&&(n--,i=!i);if(n>=0)throw new O;Et.recordPattern(t,e+1,r)}static patternMatchVariance(t,e,r){const n=t.length;let i=0,o=0;for(let c=0;c<n;c++)i+=t[c],o+=e[c];if(i<o)return Number.POSITIVE_INFINITY;const a=i/o;r*=a;let s=0;for(let c=0;c<n;c++){const n=t[c],i=e[c]*a,o=n>i?n-i:i-n;if(o>r)return Number.POSITIVE_INFINITY;s+=o}return s/i}}class Ct extends Et{static findStartPattern(t){const e=t.getSize(),r=t.getNextSet(0);let n=0,i=Int32Array.from([0,0,0,0,0,0]),o=r,a=!1;const s=6;for(let c=r;c<e;c++)if(t.get(c)!==a)i[n]++;else{if(n===s-1){let e=Ct.MAX_AVG_VARIANCE,r=-1;for(let t=Ct.CODE_START_A;t<=Ct.CODE_START_C;t++){const n=Et.patternMatchVariance(i,Ct.CODE_PATTERNS[t],Ct.MAX_INDIVIDUAL_VARIANCE);n<e&&(e=n,r=t)}if(r>=0&&t.isRange(Math.max(0,o-(c-o)/2),o,!1))return Int32Array.from([o,c,r]);o+=i[0]+i[1],i=i.slice(2,i.length-1),i[n-1]=0,i[n]=0,n--}else n++;i[n]=1,a=!a}throw new O}static decodeCode(t,e,r){Et.recordPattern(t,r,e);let n=Ct.MAX_AVG_VARIANCE,i=-1;for(let o=0;o<Ct.CODE_PATTERNS.length;o++){const t=Ct.CODE_PATTERNS[o],r=this.patternMatchVariance(e,t,Ct.MAX_INDIVIDUAL_VARIANCE);r<n&&(n=r,i=o)}if(i>=0)return i;throw new O}decodeRow(t,e,r){const n=r&&!0===r.get(S.ASSUME_GS1),i=Ct.findStartPattern(e),o=i[2];let a=0;const s=new Uint8Array(20);let c;switch(s[a++]=o,o){case Ct.CODE_START_A:c=Ct.CODE_CODE_A;break;case Ct.CODE_START_B:c=Ct.CODE_CODE_B;break;case Ct.CODE_START_C:c=Ct.CODE_CODE_C;break;default:throw new v}let u=!1,l=!1,h="",d=i[0],g=i[1];const p=Int32Array.from([0,0,0,0,0,0]);let m=0,w=0,y=o,E=0,C=!0,A=!1,b=!1;while(!u){const t=l;switch(l=!1,m=w,w=Ct.decodeCode(e,p,g),s[a++]=w,w!==Ct.CODE_STOP&&(C=!0),w!==Ct.CODE_STOP&&(E++,y+=E*w),d=g,g+=p.reduce((t,e)=>t+e,0),w){case Ct.CODE_START_A:case Ct.CODE_START_B:case Ct.CODE_START_C:throw new v}switch(c){case Ct.CODE_CODE_A:if(w<64)h+=b===A?String.fromCharCode(" ".charCodeAt(0)+w):String.fromCharCode(" ".charCodeAt(0)+w+128),b=!1;else if(w<96)h+=b===A?String.fromCharCode(w-64):String.fromCharCode(w+64),b=!1;else switch(w!==Ct.CODE_STOP&&(C=!1),w){case Ct.CODE_FNC_1:n&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case Ct.CODE_FNC_2:case Ct.CODE_FNC_3:break;case Ct.CODE_FNC_4_A:!A&&b?(A=!0,b=!1):A&&b?(A=!1,b=!1):b=!0;break;case Ct.CODE_SHIFT:l=!0,c=Ct.CODE_CODE_B;break;case Ct.CODE_CODE_B:c=Ct.CODE_CODE_B;break;case Ct.CODE_CODE_C:c=Ct.CODE_CODE_C;break;case Ct.CODE_STOP:u=!0;break}break;case Ct.CODE_CODE_B:if(w<96)h+=b===A?String.fromCharCode(" ".charCodeAt(0)+w):String.fromCharCode(" ".charCodeAt(0)+w+128),b=!1;else switch(w!==Ct.CODE_STOP&&(C=!1),w){case Ct.CODE_FNC_1:n&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case Ct.CODE_FNC_2:case Ct.CODE_FNC_3:break;case Ct.CODE_FNC_4_B:!A&&b?(A=!0,b=!1):A&&b?(A=!1,b=!1):b=!0;break;case Ct.CODE_SHIFT:l=!0,c=Ct.CODE_CODE_A;break;case Ct.CODE_CODE_A:c=Ct.CODE_CODE_A;break;case Ct.CODE_CODE_C:c=Ct.CODE_CODE_C;break;case Ct.CODE_STOP:u=!0;break}break;case Ct.CODE_CODE_C:if(w<100)w<10&&(h+="0"),h+=w;else switch(w!==Ct.CODE_STOP&&(C=!1),w){case Ct.CODE_FNC_1:n&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case Ct.CODE_CODE_A:c=Ct.CODE_CODE_A;break;case Ct.CODE_CODE_B:c=Ct.CODE_CODE_B;break;case Ct.CODE_STOP:u=!0;break}break}t&&(c=c===Ct.CODE_CODE_A?Ct.CODE_CODE_B:Ct.CODE_CODE_A)}const I=g-d;if(g=e.getNextUnset(g),!e.isRange(g,Math.min(e.getSize(),g+(g-d)/2),!1))throw new O;if(y-=E*m,y%103!==m)throw new f;const _=h.length;if(0===_)throw new O;_>0&&C&&(h=c===Ct.CODE_CODE_C?h.substring(0,_-2):h.substring(0,_-1));const T=(i[1]+i[0])/2,R=d+I/2,D=s.length,N=new Uint8Array(D);for(let f=0;f<D;f++)N[f]=s[f];const M=[new st(T,t),new st(R,t)];return new j(h,N,0,M,V.CODE_128,(new Date).getTime())}}Ct.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])],Ct.MAX_AVG_VARIANCE=.25,Ct.MAX_INDIVIDUAL_VARIANCE=.7,Ct.CODE_SHIFT=98,Ct.CODE_CODE_C=99,Ct.CODE_CODE_B=100,Ct.CODE_CODE_A=101,Ct.CODE_FNC_1=102,Ct.CODE_FNC_2=97,Ct.CODE_FNC_3=96,Ct.CODE_FNC_4_A=101,Ct.CODE_FNC_4_B=100,Ct.CODE_START_A=103,Ct.CODE_START_B=104,Ct.CODE_START_C=105,Ct.CODE_STOP=106;class At extends Et{constructor(t=!1,e=!1){super(),this.usingCheckDigit=t,this.extendedMode=e,this.decodeRowResult="",this.counters=new Int32Array(9)}decodeRow(t,e,r){let n=this.counters;n.fill(0),this.decodeRowResult="";let i,o,a=At.findAsteriskPattern(e,n),s=e.getNextSet(a[1]),c=e.getSize();do{At.recordPattern(e,s,n);let t=At.toNarrowWidePattern(n);if(t<0)throw new O;i=At.patternToChar(t),this.decodeRowResult+=i,o=s;for(let e of n)s+=e;s=e.getNextSet(s)}while("*"!==i);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);let u=0;for(let f of n)u+=f;let l,h=s-o-u;if(s!==c&&2*h<u)throw new O;if(this.usingCheckDigit){let t=this.decodeRowResult.length-1,e=0;for(let r=0;r<t;r++)e+=At.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(r));if(this.decodeRowResult.charAt(t)!==At.ALPHABET_STRING.charAt(e%43))throw new f;this.decodeRowResult=this.decodeRowResult.substring(0,t)}if(0===this.decodeRowResult.length)throw new O;l=this.extendedMode?At.decodeExtended(this.decodeRowResult):this.decodeRowResult;let d=(a[1]+a[0])/2,g=o+u/2;return new j(l,null,0,[new st(d,t),new st(g,t)],V.CODE_39,(new Date).getTime())}static findAsteriskPattern(t,e){let r=t.getSize(),n=t.getNextSet(0),i=0,o=n,a=!1,s=e.length;for(let c=n;c<r;c++)if(t.get(c)!==a)e[i]++;else{if(i===s-1){if(this.toNarrowWidePattern(e)===At.ASTERISK_ENCODING&&t.isRange(Math.max(0,o-Math.floor((c-o)/2)),o,!1))return[o,c];o+=e[0]+e[1],e.copyWithin(0,2,2+i-1),e[i-1]=0,e[i]=0,i--}else i++;e[i]=1,a=!a}throw new O}static toNarrowWidePattern(t){let e,r=t.length,n=0;do{let i=2147483647;for(let e of t)e<i&&e>n&&(i=e);n=i,e=0;let o=0,a=0;for(let s=0;s<r;s++){let i=t[s];i>n&&(a|=1<<r-1-s,e++,o+=i)}if(3===e){for(let i=0;i<r&&e>0;i++){let r=t[i];if(r>n&&(e--,2*r>=o))return-1}return a}}while(e>3);return-1}static patternToChar(t){for(let e=0;e<At.CHARACTER_ENCODINGS.length;e++)if(At.CHARACTER_ENCODINGS[e]===t)return At.ALPHABET_STRING.charAt(e);if(t===At.ASTERISK_ENCODING)return"*";throw new O}static decodeExtended(t){let e=t.length,r="";for(let n=0;n<e;n++){let e=t.charAt(n);if("+"===e||"$"===e||"%"===e||"/"===e){let i=t.charAt(n+1),o="\0";switch(e){case"+":if(!(i>="A"&&i<="Z"))throw new v;o=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new v;o=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")o=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")o=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")o=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")o=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)o="\0";else if("V"===i)o="@";else if("W"===i)o="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new v;o=""}break;case"/":if(i>="A"&&i<="O")o=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new v;o=":"}break}r+=o,n++}else r+=e}return r}}At.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",At.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],At.ASTERISK_ENCODING=148;class St extends Et{constructor(){super(...arguments),this.narrowLineWidth=-1}decodeRow(t,e,r){let n=this.decodeStart(e),i=this.decodeEnd(e),o=new R;St.decodeMiddle(e,n[1],i[0],o);let a=o.toString(),s=null;null!=r&&(s=r.get(S.ALLOWED_LENGTHS)),null==s&&(s=St.DEFAULT_ALLOWED_LENGTHS);let c=a.length,u=!1,l=0;for(let f of s){if(c===f){u=!0;break}f>l&&(l=f)}if(!u&&c>l&&(u=!0),!u)throw new v;const h=[new st(n[1],t),new st(i[0],t)];let d=new j(a,null,0,h,V.ITF,(new Date).getTime());return d}static decodeMiddle(t,e,r,n){let i=new Int32Array(10),o=new Int32Array(5),a=new Int32Array(5);i.fill(0),o.fill(0),a.fill(0);while(e<r){Et.recordPattern(t,e,i);for(let t=0;t<5;t++){let e=2*t;o[t]=i[e],a[t]=i[e+1]}let r=St.decodeDigit(o);n.append(r.toString()),r=this.decodeDigit(a),n.append(r.toString()),i.forEach((function(t){e+=t}))}}decodeStart(t){let e=St.skipWhiteSpace(t),r=St.findGuardPattern(t,e,St.START_PATTERN);return this.narrowLineWidth=(r[1]-r[0])/4,this.validateQuietZone(t,r[0]),r}validateQuietZone(t,e){let r=10*this.narrowLineWidth;r=r<e?r:e;for(let n=e-1;r>0&&n>=0;n--){if(t.get(n))break;r--}if(0!==r)throw new O}static skipWhiteSpace(t){const e=t.getSize(),r=t.getNextSet(0);if(r===e)throw new O;return r}decodeEnd(t){t.reverse();try{let r,n=St.skipWhiteSpace(t);try{r=St.findGuardPattern(t,n,St.END_PATTERN_REVERSED[0])}catch(e){e instanceof O&&(r=St.findGuardPattern(t,n,St.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,r[0]);let i=r[0];return r[0]=t.getSize()-r[1],r[1]=t.getSize()-i,r}finally{t.reverse()}}static findGuardPattern(t,e,r){let n=r.length,i=new Int32Array(n),o=t.getSize(),a=!1,s=0,c=e;i.fill(0);for(let u=e;u<o;u++)if(t.get(u)!==a)i[s]++;else{if(s===n-1){if(Et.patternMatchVariance(i,r,St.MAX_INDIVIDUAL_VARIANCE)<St.MAX_AVG_VARIANCE)return[c,u];c+=i[0]+i[1],p.arraycopy(i,2,i,0,s-1),i[s-1]=0,i[s]=0,s--}else s++;i[s]=1,a=!a}throw new O}static decodeDigit(t){let e=St.MAX_AVG_VARIANCE,r=-1,n=St.PATTERNS.length;for(let i=0;i<n;i++){let n=St.PATTERNS[i],o=Et.patternMatchVariance(t,n,St.MAX_INDIVIDUAL_VARIANCE);o<e?(e=o,r=i):o===e&&(r=-1)}if(r>=0)return r%10;throw new O}}St.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])],St.MAX_AVG_VARIANCE=.38,St.MAX_INDIVIDUAL_VARIANCE=.5,St.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],St.START_PATTERN=Int32Array.from([1,1,1,1]),St.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])];class vt extends Et{constructor(){super(...arguments),this.decodeRowStringBuffer=""}static findStartGuardPattern(t){let e,r=!1,n=0,i=Int32Array.from([0,0,0]);while(!r){i=Int32Array.from([0,0,0]),e=vt.findGuardPattern(t,n,!1,this.START_END_PATTERN,i);let o=e[0];n=e[1];let a=o-(n-o);a>=0&&(r=t.isRange(a,o,!1))}return e}static checkChecksum(t){return vt.checkStandardUPCEANChecksum(t)}static checkStandardUPCEANChecksum(t){let e=t.length;if(0===e)return!1;let r=parseInt(t.charAt(e-1),10);return vt.getStandardUPCEANChecksum(t.substring(0,e-1))===r}static getStandardUPCEANChecksum(t){let e=t.length,r=0;for(let n=e-1;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new v;r+=e}r*=3;for(let n=e-2;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new v;r+=e}return(1e3-r)%10}static decodeEnd(t,e){return vt.findGuardPattern(t,e,!1,vt.START_END_PATTERN,new Int32Array(vt.START_END_PATTERN.length).fill(0))}static findGuardPatternWithoutCounters(t,e,r,n){return this.findGuardPattern(t,e,r,n,new Int32Array(n.length))}static findGuardPattern(t,e,r,n,i){let o=t.getSize();e=r?t.getNextUnset(e):t.getNextSet(e);let a=0,s=e,c=n.length,u=r;for(let l=e;l<o;l++)if(t.get(l)!==u)i[a]++;else{if(a===c-1){if(Et.patternMatchVariance(i,n,vt.MAX_INDIVIDUAL_VARIANCE)<vt.MAX_AVG_VARIANCE)return Int32Array.from([s,l]);s+=i[0]+i[1];let t=i.slice(2,i.length-1);for(let e=0;e<a-1;e++)i[e]=t[e];i[a-1]=0,i[a]=0,a--}else a++;i[a]=1,u=!u}throw new O}static decodeDigit(t,e,r,n){this.recordPattern(t,r,e);let i=this.MAX_AVG_VARIANCE,o=-1,a=n.length;for(let s=0;s<a;s++){let t=n[s],r=Et.patternMatchVariance(e,t,vt.MAX_INDIVIDUAL_VARIANCE);r<i&&(i=r,o=s)}if(o>=0)return o;throw new O}}vt.MAX_AVG_VARIANCE=.48,vt.MAX_INDIVIDUAL_VARIANCE=.7,vt.START_END_PATTERN=Int32Array.from([1,1,1]),vt.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),vt.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),vt.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 bt{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(t,e,r){let n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),o=n.toString(),a=bt.parseExtensionString(o),s=[new st((r[0]+r[1])/2,t),new st(i,t)],c=new j(o,null,0,s,V.UPC_EAN_EXTENSION,(new Date).getTime());return null!=a&&c.putAllMetadata(a),c}decodeMiddle(t,e,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=t.getSize(),o=e[1],a=0;for(let c=0;c<5&&o<i;c++){let e=vt.decodeDigit(t,n,o,vt.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+e%10);for(let t of n)o+=t;e>=10&&(a|=1<<4-c),4!==c&&(o=t.getNextSet(o),o=t.getNextUnset(o))}if(5!==r.length)throw new O;let s=this.determineCheckDigit(a);if(bt.extensionChecksum(r.toString())!==s)throw new O;return o}static extensionChecksum(t){let e=t.length,r=0;for(let n=e-2;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);r*=3;for(let n=e-1;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);return r*=3,r%10}determineCheckDigit(t){for(let e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new O}static parseExtensionString(t){if(5!==t.length)return null;let e=bt.parseExtension5String(t);return null==e?null:new Map([[Z.SUGGESTED_PRICE,e]])}static parseExtension5String(t){let e;switch(t.charAt(0)){case"0":e="£";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e="";break}let r=parseInt(t.substring(1)),n=(r/100).toString(),i=r%100,o=i<10?"0"+i:i.toString();return e+n+"."+o}}class It{constructor(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}decodeRow(t,e,r){let n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),o=n.toString(),a=It.parseExtensionString(o),s=[new st((r[0]+r[1])/2,t),new st(i,t)],c=new j(o,null,0,s,V.UPC_EAN_EXTENSION,(new Date).getTime());return null!=a&&c.putAllMetadata(a),c}decodeMiddle(t,e,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=t.getSize(),o=e[1],a=0;for(let s=0;s<2&&o<i;s++){let e=vt.decodeDigit(t,n,o,vt.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+e%10);for(let t of n)o+=t;e>=10&&(a|=1<<1-s),1!==s&&(o=t.getNextSet(o),o=t.getNextUnset(o))}if(2!==r.length)throw new O;if(parseInt(r.toString())%4!==a)throw new O;return o}static parseExtensionString(t){return 2!==t.length?null:new Map([[Z.ISSUE_NUMBER,parseInt(t)]])}}class _t{static decodeRow(t,e,r){let n=vt.findGuardPattern(e,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{let r=new bt;return r.decodeRow(t,e,n)}catch(i){let r=new It;return r.decodeRow(t,e,n)}}}_t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]);class Tt extends vt{constructor(){super(),this.decodeRowStringBuffer="",Tt.L_AND_G_PATTERNS=Tt.L_PATTERNS.map(t=>Int32Array.from(t));for(let t=10;t<20;t++){let e=Tt.L_PATTERNS[t-10],r=new Int32Array(e.length);for(let t=0;t<e.length;t++)r[t]=e[e.length-t-1];Tt.L_AND_G_PATTERNS[t]=r}}decodeRow(t,e,r){let n=Tt.findStartGuardPattern(e),i=null==r?null:r.get(S.NEED_RESULT_POINT_CALLBACK);if(null!=i){const e=new st((n[0]+n[1])/2,t);i.foundPossibleResultPoint(e)}let o=this.decodeMiddle(e,n,this.decodeRowStringBuffer),a=o.rowOffset,s=o.resultString;if(null!=i){const e=new st(a,t);i.foundPossibleResultPoint(e)}let c=this.decodeEnd(e,a);if(null!=i){const e=new st((c[0]+c[1])/2,t);i.foundPossibleResultPoint(e)}let u=c[1],l=u+(u-c[0]);if(l>=e.getSize()||!e.isRange(u,l,!1))throw new O;let h=s.toString();if(h.length<8)throw new v;if(!Tt.checkChecksum(h))throw new f;let d=(n[1]+n[0])/2,g=(c[1]+c[0])/2,p=this.getBarcodeFormat(),m=[new st(d,t),new st(g,t)],w=new j(h,null,0,m,p,(new Date).getTime()),y=0;try{let r=_t.decodeRow(t,e,c[1]);w.putMetadata(Z.UPC_EAN_EXTENSION,r.getText()),w.putAllMetadata(r.getResultMetadata()),w.addResultPoints(r.getResultPoints()),y=r.getText().length}catch(C){}let E=null==r?null:r.get(S.ALLOWED_EAN_EXTENSIONS);if(null!=E){let t=!1;for(let e in E)if(y.toString()===e){t=!0;break}if(!t)throw new O}return w}decodeEnd(t,e){return Tt.findGuardPattern(t,e,!1,Tt.START_END_PATTERN,new Int32Array(Tt.START_END_PATTERN.length).fill(0))}static checkChecksum(t){return Tt.checkStandardUPCEANChecksum(t)}static checkStandardUPCEANChecksum(t){let e=t.length;if(0===e)return!1;let r=parseInt(t.charAt(e-1),10);return Tt.getStandardUPCEANChecksum(t.substring(0,e-1))===r}static getStandardUPCEANChecksum(t){let e=t.length,r=0;for(let n=e-1;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new v;r+=e}r*=3;for(let n=e-2;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new v;r+=e}return(1e3-r)%10}}class Rt extends Tt{constructor(){super(),this.decodeMiddleCounters=Int32Array.from([0,0,0,0])}decodeMiddle(t,e,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=t.getSize(),o=e[1],a=0;for(let c=0;c<6&&o<i;c++){let e=Tt.decodeDigit(t,n,o,Tt.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+e%10);for(let t of n)o+=t;e>=10&&(a|=1<<5-c)}r=Rt.determineFirstDigit(r,a);let s=Tt.findGuardPattern(t,o,!0,Tt.MIDDLE_PATTERN,new Int32Array(Tt.MIDDLE_PATTERN.length).fill(0));o=s[1];for(let c=0;c<6&&o<i;c++){let e=Tt.decodeDigit(t,n,o,Tt.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+e);for(let t of n)o+=t}return{rowOffset:o,resultString:r}}getBarcodeFormat(){return V.EAN_13}static determineFirstDigit(t,e){for(let r=0;r<10;r++)if(e===this.FIRST_DIGIT_ENCODINGS[r])return t=String.fromCharCode("0".charCodeAt(0)+r)+t,t;throw new O}}Rt.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26];class Dt extends Tt{constructor(){super(),this.decodeMiddleCounters=Int32Array.from([0,0,0,0])}decodeMiddle(t,e,r){const n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=t.getSize(),o=e[1];for(let s=0;s<4&&o<i;s++){let e=Tt.decodeDigit(t,n,o,Tt.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+e);for(let t of n)o+=t}let a=Tt.findGuardPattern(t,o,!0,Tt.MIDDLE_PATTERN,new Int32Array(Tt.MIDDLE_PATTERN.length).fill(0));o=a[1];for(let s=0;s<4&&o<i;s++){let e=Tt.decodeDigit(t,n,o,Tt.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+e);for(let t of n)o+=t}return{rowOffset:o,resultString:r}}getBarcodeFormat(){return V.EAN_8}}class Ot extends Tt{constructor(){super(...arguments),this.ean13Reader=new Rt}getBarcodeFormat(){return V.UPC_A}decode(t,e){return this.maybeReturnResult(this.ean13Reader.decode(t))}decodeRow(t,e,r){return this.maybeReturnResult(this.ean13Reader.decodeRow(t,e,r))}decodeMiddle(t,e,r){return this.ean13Reader.decodeMiddle(t,e,r)}maybeReturnResult(t){let e=t.getText();if("0"===e.charAt(0)){let r=new j(e.substring(1),null,null,t.getResultPoints(),V.UPC_A);return null!=t.getResultMetadata()&&r.putAllMetadata(t.getResultMetadata()),r}throw new O}reset(){this.ean13Reader.reset()}}class Nt extends Tt{constructor(){super(),this.decodeMiddleCounters=new Int32Array(4)}decodeMiddle(t,e,r){const n=this.decodeMiddleCounters.map(t=>t);n[0]=0,n[1]=0,n[2]=0,n[3]=0;const i=t.getSize();let o=e[1],a=0;for(let c=0;c<6&&o<i;c++){const e=Nt.decodeDigit(t,n,o,Nt.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+e%10);for(let t of n)o+=t;e>=10&&(a|=1<<5-c)}let s=Nt.determineNumSysAndCheckDigit(r,a);return{rowOffset:o,resultString:s}}decodeEnd(t,e){return Nt.findGuardPatternWithoutCounters(t,e,!0,Nt.MIDDLE_END_PATTERN)}checkChecksum(t){return Tt.checkChecksum(Nt.convertUPCEtoUPCA(t))}static determineNumSysAndCheckDigit(t,e){for(let r=0;r<=1;r++)for(let n=0;n<10;n++)if(e===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[r][n]){let e=String.fromCharCode("0".charCodeAt(0)+r),i=String.fromCharCode("0".charCodeAt(0)+n);return e+t+i}throw O.getNotFoundInstance()}getBarcodeFormat(){return V.UPC_E}static convertUPCEtoUPCA(t){const e=t.slice(1,7).split("").map(t=>t.charCodeAt(0)),r=new R;r.append(t.charAt(0));let n=e[5];switch(n){case 0:case 1:case 2:r.appendChars(e,0,2),r.append(n),r.append("0000"),r.appendChars(e,2,3);break;case 3:r.appendChars(e,0,3),r.append("00000"),r.appendChars(e,3,2);break;case 4:r.appendChars(e,0,4),r.append("00000"),r.append(e[4]);break;default:r.appendChars(e,0,5),r.append("0000"),r.append(n);break}return t.length>=8&&r.append(t.charAt(7)),r.toString()}}Nt.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),Nt.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 Mt extends Et{constructor(t){super();let e=null==t?null:t.get(S.POSSIBLE_FORMATS),n=[];r(e)?(n.push(new Rt),n.push(new Ot),n.push(new Dt),n.push(new Nt)):(e.indexOf(V.EAN_13)>-1&&n.push(new Rt),e.indexOf(V.UPC_A)>-1&&n.push(new Ot),e.indexOf(V.EAN_8)>-1&&n.push(new Dt),e.indexOf(V.UPC_E)>-1&&n.push(new Nt)),this.readers=n}decodeRow(t,e,r){for(let i of this.readers)try{const n=i.decodeRow(t,e,r),o=n.getBarcodeFormat()===V.EAN_13&&"0"===n.getText().charAt(0),a=null==r?null:r.get(S.POSSIBLE_FORMATS),s=null==a||a.includes(V.UPC_A);if(o&&s){const t=n.getRawBytes(),e=new j(n.getText().substring(1),t,t?t.length:null,n.getResultPoints(),V.UPC_A);return e.putAllMetadata(n.getResultMetadata()),e}return n}catch(n){}throw new O}reset(){for(let t of this.readers)t.reset()}}class Pt extends Et{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,e){for(let r=0;r<e.length;r++)if(Et.patternMatchVariance(t,e[r],Pt.MAX_INDIVIDUAL_VARIANCE)<Pt.MAX_AVG_VARIANCE)return r;throw new O}static count(t){return ot.sum(new Int32Array(t))}static increment(t,e){let r=0,n=e[0];for(let i=1;i<t.length;i++)e[i]>n&&(n=e[i],r=i);t[r]++}static decrement(t,e){let r=0,n=e[0];for(let i=1;i<t.length;i++)e[i]<n&&(n=e[i],r=i);t[r]--}static isFinderPattern(t){let e=t[0]+t[1],r=e+t[2]+t[3],n=e/r;if(n>=Pt.MIN_FINDER_PATTERN_RATIO&&n<=Pt.MAX_FINDER_PATTERN_RATIO){let e=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;for(let n of t)n>r&&(r=n),n<e&&(e=n);return r<10*e}return!1}}Pt.MAX_AVG_VARIANCE=.2,Pt.MAX_INDIVIDUAL_VARIANCE=.45,Pt.MIN_FINDER_PATTERN_RATIO=9.5/12,Pt.MAX_FINDER_PATTERN_RATIO=12.5/14;class Lt{constructor(t,e){this.value=t,this.checksumPortion=e}getValue(){return this.value}getChecksumPortion(){return this.checksumPortion}toString(){return this.value+"("+this.checksumPortion+")"}equals(t){if(!(t instanceof Lt))return!1;const e=t;return this.value===e.value&&this.checksumPortion===e.checksumPortion}hashCode(){return this.value^this.checksumPortion}}class xt{constructor(t,e,r,n,i){this.value=t,this.startEnd=e,this.value=t,this.startEnd=e,this.resultPoints=new Array,this.resultPoints.push(new st(r,i)),this.resultPoints.push(new st(n,i))}getValue(){return this.value}getStartEnd(){return this.startEnd}getResultPoints(){return this.resultPoints}equals(t){if(!(t instanceof xt))return!1;const e=t;return this.value===e.value}hashCode(){return this.value}}class Bt{constructor(){}static getRSSvalue(t,e,r){let n=0;for(let s of t)n+=s;let i=0,o=0,a=t.length;for(let s=0;s<a-1;s++){let c;for(c=1,o|=1<<s;c<t[s];c++,o&=~(1<<s)){let t=Bt.combins(n-c-1,a-s-2);if(r&&0===o&&n-c-(a-s-1)>=a-s-1&&(t-=Bt.combins(n-c-(a-s),a-s-2)),a-s-1>1){let r=0;for(let t=n-c-(a-s-2);t>e;t--)r+=Bt.combins(n-c-t-1,a-s-3);t-=r*(a-1-s)}else n-c>e&&t--;i+=t}n-=c}return i}static combins(t,e){let r,n;t-e>e?(n=e,r=t-e):(n=t-e,r=e);let i=1,o=1;for(let a=t;a>r;a--)i*=a,o<=n&&(i/=o,o++);while(o<=n)i/=o,o++;return i}}class kt{static buildBitArray(t){let e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);let r=12*e,n=new C(r),i=0,o=t[0],a=o.getRightChar().getValue();for(let s=11;s>=0;--s)0!=(a&1<<s)&&n.set(i),i++;for(let s=1;s<t.length;++s){let e=t[s],r=e.getLeftChar().getValue();for(let t=11;t>=0;--t)0!=(r&1<<t)&&n.set(i),i++;if(null!=e.getRightChar()){let t=e.getRightChar().getValue();for(let e=11;e>=0;--e)0!=(t&1<<e)&&n.set(i),i++}}return n}}class Ft{constructor(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}getDecodedInformation(){return this.decodedInformation}isFinished(){return this.finished}}class Ut{constructor(t){this.newPosition=t}getNewPosition(){return this.newPosition}}class jt extends Ut{constructor(t,e){super(t),this.value=e}getValue(){return this.value}isFNC1(){return this.value===jt.FNC1}}jt.FNC1="$";class Ht extends Ut{constructor(t,e,r){super(t),r?(this.remaining=!0,this.remainingValue=this.remainingValue):(this.remaining=!1,this.remainingValue=0),this.newString=e}getNewString(){return this.newString}isRemaining(){return this.remaining}getRemainingValue(){return this.remainingValue}}class Vt extends Ut{constructor(t,e,r){if(super(t),e<0||e>10||r<0||r>10)throw new v;this.firstDigit=e,this.secondDigit=r}getFirstDigit(){return this.firstDigit}getSecondDigit(){return this.secondDigit}getValue(){return 10*this.firstDigit+this.secondDigit}isFirstDigitFNC1(){return this.firstDigit===Vt.FNC1}isSecondDigitFNC1(){return this.secondDigit===Vt.FNC1}isAnyFNC1(){return this.firstDigit===Vt.FNC1||this.secondDigit===Vt.FNC1}}Vt.FNC1=10;class zt{constructor(){}static parseFieldsInGeneralPurpose(t){if(!t)return null;if(t.length<2)throw new O;let e=t.substring(0,2);for(let i of zt.TWO_DIGIT_DATA_LENGTH)if(i[0]===e)return i[1]===zt.VARIABLE_LENGTH?zt.processVariableAI(2,i[2],t):zt.processFixedAI(2,i[1],t);if(t.length<3)throw new O;let r=t.substring(0,3);for(let i of zt.THREE_DIGIT_DATA_LENGTH)if(i[0]===r)return i[1]===zt.VARIABLE_LENGTH?zt.processVariableAI(3,i[2],t):zt.processFixedAI(3,i[1],t);for(let i of zt.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH)if(i[0]===r)return i[1]===zt.VARIABLE_LENGTH?zt.processVariableAI(4,i[2],t):zt.processFixedAI(4,i[1],t);if(t.length<4)throw new O;let n=t.substring(0,4);for(let i of zt.FOUR_DIGIT_DATA_LENGTH)if(i[0]===n)return i[1]===zt.VARIABLE_LENGTH?zt.processVariableAI(4,i[2],t):zt.processFixedAI(4,i[1],t);throw new O}static processFixedAI(t,e,r){if(r.length<t)throw new O;let n=r.substring(0,t);if(r.length<t+e)throw new O;let i=r.substring(t,t+e),o=r.substring(t+e),a="("+n+")"+i,s=zt.parseFieldsInGeneralPurpose(o);return null==s?a:a+s}static processVariableAI(t,e,r){let n,i=r.substring(0,t);n=r.length<t+e?r.length:t+e;let o=r.substring(t,n),a=r.substring(n),s="("+i+")"+o,c=zt.parseFieldsInGeneralPurpose(a);return null==c?s:s+c}}zt.VARIABLE_LENGTH=[],zt.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",zt.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",zt.VARIABLE_LENGTH,20],["22",zt.VARIABLE_LENGTH,29],["30",zt.VARIABLE_LENGTH,8],["37",zt.VARIABLE_LENGTH,8],["90",zt.VARIABLE_LENGTH,30],["91",zt.VARIABLE_LENGTH,30],["92",zt.VARIABLE_LENGTH,30],["93",zt.VARIABLE_LENGTH,30],["94",zt.VARIABLE_LENGTH,30],["95",zt.VARIABLE_LENGTH,30],["96",zt.VARIABLE_LENGTH,30],["97",zt.VARIABLE_LENGTH,3],["98",zt.VARIABLE_LENGTH,30],["99",zt.VARIABLE_LENGTH,30]],zt.THREE_DIGIT_DATA_LENGTH=[["240",zt.VARIABLE_LENGTH,30],["241",zt.VARIABLE_LENGTH,30],["242",zt.VARIABLE_LENGTH,6],["250",zt.VARIABLE_LENGTH,30],["251",zt.VARIABLE_LENGTH,30],["253",zt.VARIABLE_LENGTH,17],["254",zt.VARIABLE_LENGTH,20],["400",zt.VARIABLE_LENGTH,30],["401",zt.VARIABLE_LENGTH,30],["402",17],["403",zt.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",zt.VARIABLE_LENGTH,20],["421",zt.VARIABLE_LENGTH,15],["422",3],["423",zt.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],zt.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",zt.VARIABLE_LENGTH,15],["391",zt.VARIABLE_LENGTH,18],["392",zt.VARIABLE_LENGTH,15],["393",zt.VARIABLE_LENGTH,18],["703",zt.VARIABLE_LENGTH,30]],zt.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",zt.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",zt.VARIABLE_LENGTH,20],["8003",zt.VARIABLE_LENGTH,30],["8004",zt.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",zt.VARIABLE_LENGTH,30],["8008",zt.VARIABLE_LENGTH,12],["8018",18],["8020",zt.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",zt.VARIABLE_LENGTH,70],["8200",zt.VARIABLE_LENGTH,70]];class Wt{constructor(t){this.buffer=new R,this.information=t}decodeAllCodes(t,e){let r=e,n=null;do{let e=this.decodeGeneralPurposeField(r,n),i=zt.parseFieldsInGeneralPurpose(e.getNewString());if(null!=i&&t.append(i),n=e.isRemaining()?""+e.getRemainingValue():null,r===e.getNewPosition())break;r=e.getNewPosition()}while(1);return t.toString()}isStillNumeric(t){if(t+7>this.information.getSize())return t+4<=this.information.getSize();for(let e=t;e<t+3;++e)if(this.information.get(e))return!0;return this.information.get(t+3)}decodeNumeric(t){if(t+7>this.information.getSize()){let e=this.extractNumericValueFromBitArray(t,4);return new Vt(this.information.getSize(),0===e?Vt.FNC1:e-1,Vt.FNC1)}let e=this.extractNumericValueFromBitArray(t,7),r=(e-8)/11,n=(e-8)%11;return new Vt(t+7,r,n)}extractNumericValueFromBitArray(t,e){return Wt.extractNumericValueFromBitArray(this.information,t,e)}static extractNumericValueFromBitArray(t,e,r){let n=0;for(let i=0;i<r;++i)t.get(e+i)&&(n|=1<<r-i-1);return n}decodeGeneralPurposeField(t,e){this.buffer.setLengthToZero(),null!=e&&this.buffer.append(e),this.current.setPosition(t);let r=this.parseBlocks();return null!=r&&r.isRemaining()?new Ht(this.current.getPosition(),this.buffer.toString(),r.getRemainingValue()):new Ht(this.current.getPosition(),this.buffer.toString())}parseBlocks(){let t,e;do{let r=this.current.getPosition();this.current.isAlpha()?(e=this.parseAlphaBlock(),t=e.isFinished()):this.current.isIsoIec646()?(e=this.parseIsoIec646Block(),t=e.isFinished()):(e=this.parseNumericBlock(),t=e.isFinished());let n=r!==this.current.getPosition();if(!n&&!t)break}while(!t);return e.getDecodedInformation()}parseNumericBlock(){while(this.isStillNumeric(this.current.getPosition())){let t=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFirstDigitFNC1()){let e;return e=t.isSecondDigitFNC1()?new Ht(this.current.getPosition(),this.buffer.toString()):new Ht(this.current.getPosition(),this.buffer.toString(),t.getSecondDigit()),new Ft(!0,e)}if(this.buffer.append(t.getFirstDigit()),t.isSecondDigitFNC1()){let t=new Ht(this.current.getPosition(),this.buffer.toString());return new Ft(!0,t)}this.buffer.append(t.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new Ft(!1)}parseIsoIec646Block(){while(this.isStillIsoIec646(this.current.getPosition())){let t=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){let t=new Ht(this.current.getPosition(),this.buffer.toString());return new Ft(!0,t)}this.buffer.append(t.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 Ft(!1)}parseAlphaBlock(){while(this.isStillAlpha(this.current.getPosition())){let t=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){let t=new Ht(this.current.getPosition(),this.buffer.toString());return new Ft(!0,t)}this.buffer.append(t.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 Ft(!1)}isStillIsoIec646(t){if(t+5>this.information.getSize())return!1;let e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+7>this.information.getSize())return!1;let r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<116)return!0;if(t+8>this.information.getSize())return!1;let n=this.extractNumericValueFromBitArray(t,8);return n>=232&&n<253}decodeIsoIec646(t){let e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new jt(t+5,jt.FNC1);if(e>=5&&e<15)return new jt(t+5,"0"+(e-5));let r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<90)return new jt(t+7,""+(r+1));if(r>=90&&r<116)return new jt(t+7,""+(r+7));let n,i=this.extractNumericValueFromBitArray(t,8);switch(i){case 232:n="!";break;case 233:n='"';break;case 234:n="%";break;case 235:n="&";break;case 236:n="'";break;case 237:n="(";break;case 238:n=")";break;case 239:n="*";break;case 240:n="+";break;case 241:n=",";break;case 242:n="-";break;case 243:n=".";break;case 244:n="/";break;case 245:n=":";break;case 246:n=";";break;case 247:n="<";break;case 248:n="=";break;case 249:n=">";break;case 250:n="?";break;case 251:n="_";break;case 252:n=" ";break;default:throw new v}return new jt(t+8,n)}isStillAlpha(t){if(t+5>this.information.getSize())return!1;let e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+6>this.information.getSize())return!1;let r=this.extractNumericValueFromBitArray(t,6);return r>=16&&r<63}decodeAlphanumeric(t){let e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new jt(t+5,jt.FNC1);if(e>=5&&e<15)return new jt(t+5,"0"+(e-5));let r,n=this.extractNumericValueFromBitArray(t,6);if(n>=32&&n<58)return new jt(t+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 rt("Decoding invalid alphanumeric value: "+n)}return new jt(t+6,r)}isAlphaTo646ToAlphaLatch(t){if(t+1>this.information.getSize())return!1;for(let e=0;e<5&&e+t<this.information.getSize();++e)if(2===e){if(!this.information.get(t+2))return!1}else if(this.information.get(t+e))return!1;return!0}isAlphaOr646ToNumericLatch(t){if(t+3>this.information.getSize())return!1;for(let e=t;e<t+3;++e)if(this.information.get(e))return!1;return!0}isNumericToAlphaNumericLatch(t){if(t+1>this.information.getSize())return!1;for(let e=0;e<4&&e+t<this.information.getSize();++e)if(this.information.get(t+e))return!1;return!0}}class Gt{constructor(t){this.information=t,this.generalDecoder=new Wt(t)}getInformation(){return this.information}getGeneralDecoder(){return this.generalDecoder}}class Yt extends Gt{constructor(t){super(t)}encodeCompressedGtin(t,e){t.append("(01)");let r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,r)}encodeCompressedGtinWithoutAI(t,e,r){for(let n=0;n<4;++n){let r=this.getGeneralDecoder().extractNumericValueFromBitArray(e+10*n,10);r/100===0&&t.append("0"),r/10===0&&t.append("0"),t.append(r)}Yt.appendCheckDigit(t,r)}static appendCheckDigit(t,e){let r=0;for(let n=0;n<13;n++){let i=t.charAt(n+e).charCodeAt(0)-"0".charCodeAt(0);r+=0===(1&n)?3*i:i}r=10-r%10,10===r&&(r=0),t.append(r)}}Yt.GTIN_SIZE=40;class Xt extends Yt{constructor(t){super(t)}parseInformation(){let t=new R;t.append("(01)");let e=t.length(),r=this.getGeneralDecoder().extractNumericValueFromBitArray(Xt.HEADER_SIZE,4);return t.append(r),this.encodeCompressedGtinWithoutAI(t,Xt.HEADER_SIZE+4,e),this.getGeneralDecoder().decodeAllCodes(t,Xt.HEADER_SIZE+44)}}Xt.HEADER_SIZE=4;class $t extends Gt{constructor(t){super(t)}parseInformation(){let t=new R;return this.getGeneralDecoder().decodeAllCodes(t,$t.HEADER_SIZE)}}$t.HEADER_SIZE=5;class Zt extends Yt{constructor(t){super(t)}encodeCompressedWeight(t,e,r){let n=this.getGeneralDecoder().extractNumericValueFromBitArray(e,r);this.addWeightCode(t,n);let i=this.checkWeight(n),o=1e5;for(let a=0;a<5;++a)i/o===0&&t.append("0"),o/=10;t.append(i)}}class Qt extends Zt{constructor(t){super(t)}parseInformation(){if(this.getInformation().getSize()!=Qt.HEADER_SIZE+Zt.GTIN_SIZE+Qt.WEIGHT_SIZE)throw new O;let t=new R;return this.encodeCompressedGtin(t,Qt.HEADER_SIZE),this.encodeCompressedWeight(t,Qt.HEADER_SIZE+Zt.GTIN_SIZE,Qt.WEIGHT_SIZE),t.toString()}}Qt.HEADER_SIZE=5,Qt.WEIGHT_SIZE=15;class qt extends Qt{constructor(t){super(t)}addWeightCode(t,e){t.append("(3103)")}checkWeight(t){return t}}class Kt extends Qt{constructor(t){super(t)}addWeightCode(t,e){e<1e4?t.append("(3202)"):t.append("(3203)")}checkWeight(t){return t<1e4?t:t-1e4}}class Jt extends Yt{constructor(t){super(t)}parseInformation(){if(this.getInformation().getSize()<Jt.HEADER_SIZE+Yt.GTIN_SIZE)throw new O;let t=new R;this.encodeCompressedGtin(t,Jt.HEADER_SIZE);let e=this.getGeneralDecoder().extractNumericValueFromBitArray(Jt.HEADER_SIZE+Yt.GTIN_SIZE,Jt.LAST_DIGIT_SIZE);t.append("(392"),t.append(e),t.append(")");let r=this.getGeneralDecoder().decodeGeneralPurposeField(Jt.HEADER_SIZE+Yt.GTIN_SIZE+Jt.LAST_DIGIT_SIZE,null);return t.append(r.getNewString()),t.toString()}}Jt.HEADER_SIZE=8,Jt.LAST_DIGIT_SIZE=2;class te extends Yt{constructor(t){super(t)}parseInformation(){if(this.getInformation().getSize()<te.HEADER_SIZE+Yt.GTIN_SIZE)throw new O;let t=new R;this.encodeCompressedGtin(t,te.HEADER_SIZE);let e=this.getGeneralDecoder().extractNumericValueFromBitArray(te.HEADER_SIZE+Yt.GTIN_SIZE,te.LAST_DIGIT_SIZE);t.append("(393"),t.append(e),t.append(")");let r=this.getGeneralDecoder().extractNumericValueFromBitArray(te.HEADER_SIZE+Yt.GTIN_SIZE+te.LAST_DIGIT_SIZE,te.FIRST_THREE_DIGITS_SIZE);r/100==0&&t.append("0"),r/10==0&&t.append("0"),t.append(r);let n=this.getGeneralDecoder().decodeGeneralPurposeField(te.HEADER_SIZE+Yt.GTIN_SIZE+te.LAST_DIGIT_SIZE+te.FIRST_THREE_DIGITS_SIZE,null);return t.append(n.getNewString()),t.toString()}}te.HEADER_SIZE=8,te.LAST_DIGIT_SIZE=2,te.FIRST_THREE_DIGITS_SIZE=10;class ee extends Zt{constructor(t,e,r){super(t),this.dateCode=r,this.firstAIdigits=e}parseInformation(){if(this.getInformation().getSize()!=ee.HEADER_SIZE+ee.GTIN_SIZE+ee.WEIGHT_SIZE+ee.DATE_SIZE)throw new O;let t=new R;return this.encodeCompressedGtin(t,ee.HEADER_SIZE),this.encodeCompressedWeight(t,ee.HEADER_SIZE+ee.GTIN_SIZE,ee.WEIGHT_SIZE),this.encodeCompressedDate(t,ee.HEADER_SIZE+ee.GTIN_SIZE+ee.WEIGHT_SIZE),t.toString()}encodeCompressedDate(t,e){let r=this.getGeneralDecoder().extractNumericValueFromBitArray(e,ee.DATE_SIZE);if(38400==r)return;t.append("("),t.append(this.dateCode),t.append(")");let n=r%32;r/=32;let i=r%12+1;r/=12;let o=r;o/10==0&&t.append("0"),t.append(o),i/10==0&&t.append("0"),t.append(i),n/10==0&&t.append("0"),t.append(n)}addWeightCode(t,e){t.append("("),t.append(this.firstAIdigits),t.append(e/1e5),t.append(")")}checkWeight(t){return t%1e5}}function re(t){try{if(t.get(1))return new Xt(t);if(!t.get(2))return new $t(t);let e=Wt.extractNumericValueFromBitArray(t,1,4);switch(e){case 4:return new qt(t);case 5:return new Kt(t)}let r=Wt.extractNumericValueFromBitArray(t,1,5);switch(r){case 12:return new Jt(t);case 13:return new te(t)}let n=Wt.extractNumericValueFromBitArray(t,1,7);switch(n){case 56:return new ee(t,"310","11");case 57:return new ee(t,"320","11");case 58:return new ee(t,"310","13");case 59:return new ee(t,"320","13");case 60:return new ee(t,"310","15");case 61:return new ee(t,"320","15");case 62:return new ee(t,"310","17");case 63:return new ee(t,"320","17")}}catch(e){throw console.log(e),new rt("unknown decoder: "+t)}}ee.HEADER_SIZE=8,ee.WEIGHT_SIZE=20,ee.DATE_SIZE=16;class ne{constructor(t,e,r,n){this.leftchar=t,this.rightchar=e,this.finderpattern=r,this.maybeLast=n}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(t,e){return t instanceof ne&&(ne.equalsOrNull(t.leftchar,e.leftchar)&&ne.equalsOrNull(t.rightchar,e.rightchar)&&ne.equalsOrNull(t.finderpattern,e.finderpattern))}static equalsOrNull(t,e){return null===t?null===e:ne.equals(t,e)}hashCode(){let t=this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue();return t}}class ie{constructor(t,e,r){this.pairs=t,this.rowNumber=e,this.wasReversed=r}getPairs(){return this.pairs}getRowNumber(){return this.rowNumber}isReversed(){return this.wasReversed}isEquivalent(t){return this.checkEqualitity(this,t)}toString(){return"{ "+this.pairs+" }"}equals(t,e){return t instanceof ie&&(this.checkEqualitity(t,e)&&t.wasReversed===e.wasReversed)}checkEqualitity(t,e){if(!t||!e)return;let r;return t.forEach((t,n)=>{e.forEach(e=>{t.getLeftChar().getValue()===e.getLeftChar().getValue()&&t.getRightChar().getValue()===e.getRightChar().getValue()&&t.getFinderPatter().getValue()===e.getFinderPatter().getValue()&&(r=!0)})}),r}}class oe extends Pt{constructor(t){super(...arguments),this.pairs=new Array(oe.MAX_PAIRS),this.rows=new Array,this.startEnd=[2],this.verbose=!0===t}decodeRow(t,e,r){this.pairs.length=0,this.startFromEven=!1;try{return oe.constructResult(this.decodeRow2pairs(t,e))}catch(n){this.verbose&&console.log(n)}return this.pairs.length=0,this.startFromEven=!0,oe.constructResult(this.decodeRow2pairs(t,e))}reset(){this.pairs.length=0,this.rows.length=0}decodeRow2pairs(t,e){let r,n=!1;while(!n)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(i){if(i instanceof O){if(!this.pairs.length)throw new O;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){let t=this.checkRowsBoolean(!1);if(null!=t)return t;if(t=this.checkRowsBoolean(!0),null!=t)return t}throw new O}checkRowsBoolean(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());let e=null;try{e=this.checkRows(new Array,0)}catch(r){this.verbose&&console.log(r)}return t&&(this.rows=this.rows.reverse()),e}checkRows(t,e){for(let n=e;n<this.rows.length;n++){let e=this.rows[n];this.pairs.length=0;for(let r of t)this.pairs.push(r.getPairs());if(this.pairs.push(e.getPairs()),!oe.isValidSequence(this.pairs))continue;if(this.checkChecksum())return this.pairs;let i=new Array(t);i.push(e);try{return this.checkRows(i,n+1)}catch(r){this.verbose&&console.log(r)}}throw new O}static isValidSequence(t){for(let e of oe.FINDER_PATTERN_SEQUENCES){if(t.length>e.length)continue;let r=!0;for(let n=0;n<t.length;n++)if(t[n].getFinderPattern().getValue()!=e[n]){r=!1;break}if(r)return!0}return!1}storeRow(t,e){let r=0,n=!1,i=!1;while(r<this.rows.length){let e=this.rows[r];if(e.getRowNumber()>t){i=e.isEquivalent(this.pairs);break}n=e.isEquivalent(this.pairs),r++}i||n||oe.isPartialRow(this.pairs,this.rows)||(this.rows.push(r,new ie(this.pairs,t,e)),this.removePartialRows(this.pairs,this.rows))}removePartialRows(t,e){for(let r of e)if(r.getPairs().length!==t.length)for(let e of r.getPairs())for(let r of t)if(ne.equals(e,r))break}static isPartialRow(t,e){for(let r of e){let e=!0;for(let n of t){let t=!1;for(let e of r.getPairs())if(n.equals(e)){t=!0;break}if(!t){e=!1;break}}if(e)return!0}return!1}getRows(){return this.rows}static constructResult(t){let e=kt.buildBitArray(t),r=re(e),n=r.parseInformation(),i=t[0].getFinderPattern().getResultPoints(),o=t[t.length-1].getFinderPattern().getResultPoints(),a=[i[0],i[1],o[0],o[1]];return new j(n,null,null,a,V.RSS_EXPANDED,null)}checkChecksum(){let t=this.pairs.get(0),e=t.getLeftChar(),r=t.getRightChar();if(null==r)return!1;let n=r.getChecksumPortion(),i=2;for(let a=1;a<this.pairs.size();++a){let t=this.pairs.get(a);n+=t.getLeftChar().getChecksumPortion(),i++;let e=t.getRightChar();null!=e&&(n+=e.getChecksumPortion(),i++)}n%=211;let o=211*(i-4)+n;return o==e.getValue()}static getNextSecondBar(t,e){let r;return t.get(e)?(r=t.getNextUnset(e),r=t.getNextSet(r)):(r=t.getNextSet(e),r=t.getNextUnset(r)),r}retrieveNextPair(t,e,r){let n,i=e.length%2==0;this.startFromEven&&(i=!i);let o=!0,a=-1;do{this.findNextPair(t,e,a),n=this.parseFoundFinderPattern(t,r,i),null==n?a=oe.getNextSecondBar(t,this.startEnd[0]):o=!1}while(o);let s,c=this.decodeDataCharacter(t,n,i,!0);if(!this.isEmptyPair(e)&&e[e.length-1].mustBeLast())throw new O;try{s=this.decodeDataCharacter(t,n,i,!1)}catch(u){s=null,this.verbose&&console.log(u)}return new ne(c,s,n,!0)}isEmptyPair(t){return 0===t.length}findNextPair(t,e,r){let n=this.getDecodeFinderCounters();n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i,o=t.getSize();if(r>=0)i=r;else if(this.isEmptyPair(e))i=0;else{let t=e[e.length-1];i=t.getFinderPattern().getStartEnd()[1]}let a=e.length%2!=0;this.startFromEven&&(a=!a);let s=!1;while(i<o){if(s=!t.get(i),!s)break;i++}let c=0,u=i;for(let l=i;l<o;l++)if(t.get(l)!=s)n[c]++;else{if(3==c){if(a&&oe.reverseCounters(n),oe.isFinderPattern(n))return this.startEnd[0]=u,void(this.startEnd[1]=l);a&&oe.reverseCounters(n),u+=n[0]+n[1],n[0]=n[2],n[1]=n[3],n[2]=0,n[3]=0,c--}else c++;n[c]=1,s=!s}throw new O}static reverseCounters(t){let e=t.length;for(let r=0;r<e/2;++r){let n=t[r];t[r]=t[e-r-1],t[e-r-1]=n}}parseFoundFinderPattern(t,e,r){let n,i,o;if(r){let e=this.startEnd[0]-1;while(e>=0&&!t.get(e))e--;e++,n=this.startEnd[0]-e,i=e,o=this.startEnd[1]}else i=this.startEnd[0],o=t.getNextUnset(this.startEnd[1]+1),n=o-this.startEnd[1];let a,s=this.getDecodeFinderCounters();p.arraycopy(s,0,s,1,s.length-1),s[0]=n;try{a=this.parseFinderValue(s,oe.FINDER_PATTERNS)}catch(c){return null}return new xt(a,[i,o],i,o,e)}decodeDataCharacter(t,e,r,n){let i=this.getDataCharacterCounters();for(let I=0;I<i.length;I++)i[I]=0;if(n)oe.recordPatternInReverse(t,e.getStartEnd()[0],i);else{oe.recordPattern(t,e.getStartEnd()[1],i);for(let t=0,e=i.length-1;t<e;t++,e--){let r=i[t];i[t]=i[e],i[e]=r}}let o=17,a=ot.sum(new Int32Array(i))/o,s=(e.getStartEnd()[1]-e.getStartEnd()[0])/15;if(Math.abs(a-s)/s>.3)throw new O;let c=this.getOddCounts(),u=this.getEvenCounts(),l=this.getOddRoundingErrors(),h=this.getEvenRoundingErrors();for(let I=0;I<i.length;I++){let t=1*i[I]/a,e=t+.5;if(e<1){if(t<.3)throw new O;e=1}else if(e>8){if(t>8.7)throw new O;e=8}let r=I/2;0==(1&I)?(c[r]=e,l[r]=t-e):(u[r]=e,h[r]=t-e)}this.adjustOddEvenCounts(o);let d=4*e.getValue()+(r?0:2)+(n?0:1)-1,f=0,g=0;for(let I=c.length-1;I>=0;I--){if(oe.isNotA1left(e,r,n)){let t=oe.WEIGHTS[d][2*I];g+=c[I]*t}f+=c[I]}let p=0;for(let I=u.length-1;I>=0;I--)if(oe.isNotA1left(e,r,n)){let t=oe.WEIGHTS[d][2*I+1];p+=u[I]*t}let m=g+p;if(0!=(1&f)||f>13||f<4)throw new O;let w=(13-f)/2,y=oe.SYMBOL_WIDEST[w],E=9-y,C=Bt.getRSSvalue(c,y,!0),A=Bt.getRSSvalue(u,E,!1),S=oe.EVEN_TOTAL_SUBSET[w],v=oe.GSUM[w],b=C*S+A+v;return new Lt(b,m)}static isNotA1left(t,e,r){return!(0==t.getValue()&&e&&r)}adjustOddEvenCounts(t){let e=ot.sum(new Int32Array(this.getOddCounts())),r=ot.sum(new Int32Array(this.getEvenCounts())),n=!1,i=!1;e>13?i=!0:e<4&&(n=!0);let o=!1,a=!1;r>13?a=!0:r<4&&(o=!0);let s=e+r-t,c=1==(1&e),u=0==(1&r);if(1==s)if(c){if(u)throw new O;i=!0}else{if(!u)throw new O;a=!0}else if(-1==s)if(c){if(u)throw new O;n=!0}else{if(!u)throw new O;o=!0}else{if(0!=s)throw new O;if(c){if(!u)throw new O;e<r?(n=!0,a=!0):(i=!0,o=!0)}else if(u)throw new O}if(n){if(i)throw new O;oe.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&oe.decrement(this.getOddCounts(),this.getOddRoundingErrors()),o){if(a)throw new O;oe.increment(this.getEvenCounts(),this.getOddRoundingErrors())}a&&oe.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())}}oe.SYMBOL_WIDEST=[7,5,4,3,1],oe.EVEN_TOTAL_SUBSET=[4,20,52,104,204],oe.GSUM=[0,348,1388,2948,3988],oe.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])],oe.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]],oe.FINDER_PAT_A=0,oe.FINDER_PAT_B=1,oe.FINDER_PAT_C=2,oe.FINDER_PAT_D=3,oe.FINDER_PAT_E=4,oe.FINDER_PAT_F=5,oe.FINDER_PATTERN_SEQUENCES=[[oe.FINDER_PAT_A,oe.FINDER_PAT_A],[oe.FINDER_PAT_A,oe.FINDER_PAT_B,oe.FINDER_PAT_B],[oe.FINDER_PAT_A,oe.FINDER_PAT_C,oe.FINDER_PAT_B,oe.FINDER_PAT_D],[oe.FINDER_PAT_A,oe.FINDER_PAT_E,oe.FINDER_PAT_B,oe.FINDER_PAT_D,oe.FINDER_PAT_C],[oe.FINDER_PAT_A,oe.FINDER_PAT_E,oe.FINDER_PAT_B,oe.FINDER_PAT_D,oe.FINDER_PAT_D,oe.FINDER_PAT_F],[oe.FINDER_PAT_A,oe.FINDER_PAT_E,oe.FINDER_PAT_B,oe.FINDER_PAT_D,oe.FINDER_PAT_E,oe.FINDER_PAT_F,oe.FINDER_PAT_F],[oe.FINDER_PAT_A,oe.FINDER_PAT_A,oe.FINDER_PAT_B,oe.FINDER_PAT_B,oe.FINDER_PAT_C,oe.FINDER_PAT_C,oe.FINDER_PAT_D,oe.FINDER_PAT_D],[oe.FINDER_PAT_A,oe.FINDER_PAT_A,oe.FINDER_PAT_B,oe.FINDER_PAT_B,oe.FINDER_PAT_C,oe.FINDER_PAT_C,oe.FINDER_PAT_D,oe.FINDER_PAT_E,oe.FINDER_PAT_E],[oe.FINDER_PAT_A,oe.FINDER_PAT_A,oe.FINDER_PAT_B,oe.FINDER_PAT_B,oe.FINDER_PAT_C,oe.FINDER_PAT_C,oe.FINDER_PAT_D,oe.FINDER_PAT_E,oe.FINDER_PAT_F,oe.FINDER_PAT_F],[oe.FINDER_PAT_A,oe.FINDER_PAT_A,oe.FINDER_PAT_B,oe.FINDER_PAT_B,oe.FINDER_PAT_C,oe.FINDER_PAT_D,oe.FINDER_PAT_D,oe.FINDER_PAT_E,oe.FINDER_PAT_E,oe.FINDER_PAT_F,oe.FINDER_PAT_F]],oe.MAX_PAIRS=11;class ae extends Lt{constructor(t,e,r){super(t,e),this.count=0,this.finderPattern=r}getFinderPattern(){return this.finderPattern}getCount(){return this.count}incrementCount(){this.count++}}class se extends Pt{constructor(){super(...arguments),this.possibleLeftPairs=[],this.possibleRightPairs=[]}decodeRow(t,e,r){const n=this.decodePair(e,!1,t,r);se.addOrTally(this.possibleLeftPairs,n),e.reverse();let i=this.decodePair(e,!0,t,r);se.addOrTally(this.possibleRightPairs,i),e.reverse();for(let o of this.possibleLeftPairs)if(o.getCount()>1)for(let t of this.possibleRightPairs)if(t.getCount()>1&&se.checkChecksum(o,t))return se.constructResult(o,t);throw new O}static addOrTally(t,e){if(null==e)return;let r=!1;for(let n of t)if(n.getValue()===e.getValue()){n.incrementCount(),r=!0;break}r||t.push(e)}reset(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0}static constructResult(t,e){let r=4537077*t.getValue()+e.getValue(),n=new String(r).toString(),i=new R;for(let c=13-n.length;c>0;c--)i.append("0");i.append(n);let o=0;for(let c=0;c<13;c++){let t=i.charAt(c).charCodeAt(0)-"0".charCodeAt(0);o+=0===(1&c)?3*t:t}o=10-o%10,10===o&&(o=0),i.append(o.toString());let a=t.getFinderPattern().getResultPoints(),s=e.getFinderPattern().getResultPoints();return new j(i.toString(),null,0,[a[0],a[1],s[0],s[1]],V.RSS_14,(new Date).getTime())}static checkChecksum(t,e){let r=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,n=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return n>72&&n--,n>8&&n--,r===n}decodePair(t,e,r,n){try{let i=this.findFinderPattern(t,e),o=this.parseFoundFinderPattern(t,r,e,i),a=null==n?null:n.get(S.NEED_RESULT_POINT_CALLBACK);if(null!=a){let n=(i[0]+i[1])/2;e&&(n=t.getSize()-1-n),a.foundPossibleResultPoint(new st(n,r))}let s=this.decodeDataCharacter(t,o,!0),c=this.decodeDataCharacter(t,o,!1);return new ae(1597*s.getValue()+c.getValue(),s.getChecksumPortion()+4*c.getChecksumPortion(),o)}catch(i){return null}}decodeDataCharacter(t,e,r){let n=this.getDataCharacterCounters();for(let p=0;p<n.length;p++)n[p]=0;if(r)Et.recordPatternInReverse(t,e.getStartEnd()[0],n);else{Et.recordPattern(t,e.getStartEnd()[1]+1,n);for(let t=0,e=n.length-1;t<e;t++,e--){let r=n[t];n[t]=n[e],n[e]=r}}let i=r?16:15,o=ot.sum(new Int32Array(n))/i,a=this.getOddCounts(),s=this.getEvenCounts(),c=this.getOddRoundingErrors(),u=this.getEvenRoundingErrors();for(let p=0;p<n.length;p++){let t=n[p]/o,e=Math.floor(t+.5);e<1?e=1:e>8&&(e=8);let r=Math.floor(p/2);0===(1&p)?(a[r]=e,c[r]=t-e):(s[r]=e,u[r]=t-e)}this.adjustOddEvenCounts(r,i);let l=0,h=0;for(let p=a.length-1;p>=0;p--)h*=9,h+=a[p],l+=a[p];let d=0,f=0;for(let p=s.length-1;p>=0;p--)d*=9,d+=s[p],f+=s[p];let g=h+3*d;if(r){if(0!==(1&l)||l>12||l<4)throw new O;let t=(12-l)/2,e=se.OUTSIDE_ODD_WIDEST[t],r=9-e,n=Bt.getRSSvalue(a,e,!1),i=Bt.getRSSvalue(s,r,!0),o=se.OUTSIDE_EVEN_TOTAL_SUBSET[t],c=se.OUTSIDE_GSUM[t];return new Lt(n*o+i+c,g)}{if(0!==(1&f)||f>10||f<4)throw new O;let t=(10-f)/2,e=se.INSIDE_ODD_WIDEST[t],r=9-e,n=Bt.getRSSvalue(a,e,!0),i=Bt.getRSSvalue(s,r,!1),o=se.INSIDE_ODD_TOTAL_SUBSET[t],c=se.INSIDE_GSUM[t];return new Lt(i*o+n+c,g)}}findFinderPattern(t,e){let r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;let n=t.getSize(),i=!1,o=0;while(o<n){if(i=!t.get(o),e===i)break;o++}let a=0,s=o;for(let c=o;c<n;c++)if(t.get(c)!==i)r[a]++;else{if(3===a){if(Pt.isFinderPattern(r))return[s,c];s+=r[0]+r[1],r[0]=r[2],r[1]=r[3],r[2]=0,r[3]=0,a--}else a++;r[a]=1,i=!i}throw new O}parseFoundFinderPattern(t,e,r,n){let i=t.get(n[0]),o=n[0]-1;while(o>=0&&i!==t.get(o))o--;o++;const a=n[0]-o,s=this.getDecodeFinderCounters(),c=new Int32Array(s.length);p.arraycopy(s,0,c,1,s.length-1),c[0]=a;const u=this.parseFinderValue(c,se.FINDER_PATTERNS);let l=o,h=n[1];return r&&(l=t.getSize()-1-l,h=t.getSize()-1-h),new xt(u,[o,n[1]],l,h,e)}adjustOddEvenCounts(t,e){let r=ot.sum(new Int32Array(this.getOddCounts())),n=ot.sum(new Int32Array(this.getEvenCounts())),i=!1,o=!1,a=!1,s=!1;t?(r>12?o=!0:r<4&&(i=!0),n>12?s=!0:n<4&&(a=!0)):(r>11?o=!0:r<5&&(i=!0),n>10?s=!0:n<4&&(a=!0));let c=r+n-e,u=(1&r)===(t?1:0),l=1===(1&n);if(1===c)if(u){if(l)throw new O;o=!0}else{if(!l)throw new O;s=!0}else if(-1===c)if(u){if(l)throw new O;i=!0}else{if(!l)throw new O;a=!0}else{if(0!==c)throw new O;if(u){if(!l)throw new O;r<n?(i=!0,s=!0):(o=!0,a=!0)}else if(l)throw new O}if(i){if(o)throw new O;Pt.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(o&&Pt.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new O;Pt.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&Pt.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())}}se.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],se.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],se.OUTSIDE_GSUM=[0,161,961,2015,2715],se.INSIDE_GSUM=[0,336,1036,1516],se.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],se.INSIDE_ODD_WIDEST=[2,4,6,8],se.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 ce extends Et{constructor(t,e){super(),this.readers=[],this.verbose=!0===e;const r=t?t.get(S.POSSIBLE_FORMATS):null,n=t&&void 0!==t.get(S.ASSUME_CODE_39_CHECK_DIGIT);r?((r.includes(V.EAN_13)||r.includes(V.UPC_A)||r.includes(V.EAN_8)||r.includes(V.UPC_E))&&this.readers.push(new Mt(t)),r.includes(V.CODE_39)&&this.readers.push(new At(n)),r.includes(V.CODE_128)&&this.readers.push(new Ct),r.includes(V.ITF)&&this.readers.push(new St),r.includes(V.RSS_14)&&this.readers.push(new se),r.includes(V.RSS_EXPANDED)&&this.readers.push(new oe(this.verbose))):(this.readers.push(new Mt(t)),this.readers.push(new At),this.readers.push(new Mt(t)),this.readers.push(new Ct),this.readers.push(new St),this.readers.push(new se),this.readers.push(new oe(this.verbose)))}decodeRow(t,e,r){for(let i=0;i<this.readers.length;i++)try{return this.readers[i].decodeRow(t,e,r)}catch(n){}throw new O}reset(){this.readers.forEach(t=>t.reset())}}class ue extends U{constructor(t=500,e){super(new ce(e),t,e)}}class le{constructor(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}getECCodewords(){return this.ecCodewords}getECBlocks(){return this.ecBlocks}}class he{constructor(t,e){this.count=t,this.dataCodewords=e}getCount(){return this.count}getDataCodewords(){return this.dataCodewords}}class de{constructor(t,e,r,n,i,o){this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=n,this.dataRegionSizeColumns=i,this.ecBlocks=o;let a=0;const s=o.getECCodewords(),c=o.getECBlocks();for(let u of c)a+=u.getCount()*(u.getDataCodewords()+s);this.totalCodewords=a}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(t,e){if(0!==(1&t)||0!==(1&e))throw new v;for(let r of de.VERSIONS)if(r.symbolSizeRows===t&&r.symbolSizeColumns===e)return r;throw new v}toString(){return""+this.versionNumber}static buildVersions(){return[new de(1,10,10,8,8,new le(5,new he(1,3))),new de(2,12,12,10,10,new le(7,new he(1,5))),new de(3,14,14,12,12,new le(10,new he(1,8))),new de(4,16,16,14,14,new le(12,new he(1,12))),new de(5,18,18,16,16,new le(14,new he(1,18))),new de(6,20,20,18,18,new le(18,new he(1,22))),new de(7,22,22,20,20,new le(20,new he(1,30))),new de(8,24,24,22,22,new le(24,new he(1,36))),new de(9,26,26,24,24,new le(28,new he(1,44))),new de(10,32,32,14,14,new le(36,new he(1,62))),new de(11,36,36,16,16,new le(42,new he(1,86))),new de(12,40,40,18,18,new le(48,new he(1,114))),new de(13,44,44,20,20,new le(56,new he(1,144))),new de(14,48,48,22,22,new le(68,new he(1,174))),new de(15,52,52,24,24,new le(42,new he(2,102))),new de(16,64,64,14,14,new le(56,new he(2,140))),new de(17,72,72,16,16,new le(36,new he(4,92))),new de(18,80,80,18,18,new le(48,new he(4,114))),new de(19,88,88,20,20,new le(56,new he(4,144))),new de(20,96,96,22,22,new le(68,new he(4,174))),new de(21,104,104,24,24,new le(56,new he(6,136))),new de(22,120,120,18,18,new le(68,new he(6,175))),new de(23,132,132,20,20,new le(62,new he(8,163))),new de(24,144,144,22,22,new le(62,new he(8,156),new he(2,155))),new de(25,8,18,6,16,new le(7,new he(1,5))),new de(26,8,32,6,14,new le(11,new he(1,10))),new de(27,12,26,10,24,new le(14,new he(1,16))),new de(28,12,36,10,16,new le(18,new he(1,22))),new de(29,16,36,14,16,new le(24,new he(1,32))),new de(30,16,48,14,22,new le(28,new he(1,49)))]}}de.VERSIONS=de.buildVersions();class fe{constructor(t){const e=t.getHeight();if(e<8||e>144||0!==(1&e))throw new v;this.version=fe.readVersion(t),this.mappingBitMatrix=this.extractDataRegion(t),this.readMappingMatrix=new D(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}getVersion(){return this.version}static readVersion(t){const e=t.getHeight(),r=t.getWidth();return de.getVersionForDimensions(e,r)}readCodewords(){const t=new Int8Array(this.version.getTotalCodewords());let e=0,r=4,n=0;const i=this.mappingBitMatrix.getHeight(),o=this.mappingBitMatrix.getWidth();let a=!1,s=!1,c=!1,u=!1;do{if(r!==i||0!==n||a)if(r!==i-2||0!==n||0===(3&o)||s)if(r!==i+4||2!==n||0!==(7&o)||c)if(r!==i-2||0!==n||4!==(7&o)||u){do{r<i&&n>=0&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,i,o)),r-=2,n+=2}while(r>=0&&n<o);r+=1,n+=3;do{r>=0&&n<o&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,i,o)),r+=2,n-=2}while(r<i&&n>=0);r+=3,n+=1}else t[e++]=255&this.readCorner4(i,o),r-=2,n+=2,u=!0;else t[e++]=255&this.readCorner3(i,o),r-=2,n+=2,c=!0;else t[e++]=255&this.readCorner2(i,o),r-=2,n+=2,s=!0;else t[e++]=255&this.readCorner1(i,o),r-=2,n+=2,a=!0}while(r<i||n<o);if(e!==this.version.getTotalCodewords())throw new v;return t}readModule(t,e,r,n){return t<0&&(t+=r,e+=4-(r+4&7)),e<0&&(e+=n,t+=4-(n+4&7)),this.readMappingMatrix.set(e,t),this.mappingBitMatrix.get(e,t)}readUtah(t,e,r,n){let i=0;return this.readModule(t-2,e-2,r,n)&&(i|=1),i<<=1,this.readModule(t-2,e-1,r,n)&&(i|=1),i<<=1,this.readModule(t-1,e-2,r,n)&&(i|=1),i<<=1,this.readModule(t-1,e-1,r,n)&&(i|=1),i<<=1,this.readModule(t-1,e,r,n)&&(i|=1),i<<=1,this.readModule(t,e-2,r,n)&&(i|=1),i<<=1,this.readModule(t,e-1,r,n)&&(i|=1),i<<=1,this.readModule(t,e,r,n)&&(i|=1),i}readCorner1(t,e){let r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,1,t,e)&&(r|=1),r<<=1,this.readModule(t-1,2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r}readCorner2(t,e){let r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-4,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r}readCorner3(t,e){let r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-3,t,e)&&(r|=1),r<<=1,this.readModule(1,e-2,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r}readCorner4(t,e){let r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r}extractDataRegion(t){const e=this.version.getSymbolSizeRows(),r=this.version.getSymbolSizeColumns();if(t.getHeight()!==e)throw new h("Dimension of bitMatrix must match the version size");const n=this.version.getDataRegionSizeRows(),i=this.version.getDataRegionSizeColumns(),o=e/n|0,a=r/i|0,s=o*n,c=a*i,u=new D(c,s);for(let l=0;l<o;++l){const e=l*n;for(let r=0;r<a;++r){const o=r*i;for(let a=0;a<n;++a){const s=l*(n+2)+1+a,c=e+a;for(let e=0;e<i;++e){const n=r*(i+2)+1+e;if(t.get(n,s)){const t=o+e;u.set(t,c)}}}}}return u}}class ge{constructor(t,e){this.numDataCodewords=t,this.codewords=e}static getDataBlocks(t,e){const r=e.getECBlocks();let n=0;const i=r.getECBlocks();for(let h of i)n+=h.getCount();const o=new Array(n);let a=0;for(let h of i)for(let t=0;t<h.getCount();t++){const t=h.getDataCodewords(),e=r.getECCodewords()+t;o[a++]=new ge(t,new Uint8Array(e))}const s=o[0].codewords.length,c=s-r.getECCodewords(),u=c-1;let l=0;for(let h=0;h<u;h++)for(let e=0;e<a;e++)o[e].codewords[h]=t[l++];const d=24===e.getVersionNumber(),f=d?8:a;for(let h=0;h<f;h++)o[h].codewords[c-1]=t[l++];const g=o[0].codewords.length;for(let h=c;h<g;h++)for(let e=0;e<a;e++){const r=d?(e+8)%a:e,n=d&&r>7?h-1:h;o[r].codewords[n]=t[l++]}if(l!==t.length)throw new h;return o}getNumDataCodewords(){return this.numDataCodewords}getCodewords(){return this.codewords}}class pe{constructor(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}getBitOffset(){return this.bitOffset}getByteOffset(){return this.byteOffset}readBits(t){if(t<1||t>32||t>this.available())throw new h(""+t);let e=0,r=this.bitOffset,n=this.byteOffset;const i=this.bytes;if(r>0){const o=8-r,a=t<o?t:o,s=o-a,c=255>>8-a<<s;e=(i[n]&c)>>s,t-=a,r+=a,8===r&&(r=0,n++)}if(t>0){while(t>=8)e=e<<8|255&i[n],n++,t-=8;if(t>0){const o=8-t,a=255>>o<<o;e=e<<t|(i[n]&a)>>o,r+=t}}return this.bitOffset=r,this.byteOffset=n,e}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}(function(t){t[t["PAD_ENCODE"]=0]="PAD_ENCODE",t[t["ASCII_ENCODE"]=1]="ASCII_ENCODE",t[t["C40_ENCODE"]=2]="C40_ENCODE",t[t["TEXT_ENCODE"]=3]="TEXT_ENCODE",t[t["ANSIX12_ENCODE"]=4]="ANSIX12_ENCODE",t[t["EDIFACT_ENCODE"]=5]="EDIFACT_ENCODE",t[t["BASE256_ENCODE"]=6]="BASE256_ENCODE"})(W||(W={}));class me{static decode(t){const e=new pe(t),r=new R,n=new R,i=new Array;let o=W.ASCII_ENCODE;do{if(o===W.ASCII_ENCODE)o=this.decodeAsciiSegment(e,r,n);else{switch(o){case W.C40_ENCODE:this.decodeC40Segment(e,r);break;case W.TEXT_ENCODE:this.decodeTextSegment(e,r);break;case W.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,r);break;case W.EDIFACT_ENCODE:this.decodeEdifactSegment(e,r);break;case W.BASE256_ENCODE:this.decodeBase256Segment(e,r,i);break;default:throw new v}o=W.ASCII_ENCODE}}while(o!==W.PAD_ENCODE&&e.available()>0);return n.length()>0&&r.append(n.toString()),new Q(t,r.toString(),0===i.length?null:i,null)}static decodeAsciiSegment(t,e,r){let n=!1;do{let i=t.readBits(8);if(0===i)throw new v;if(i<=128)return n&&(i+=128),e.append(String.fromCharCode(i-1)),W.ASCII_ENCODE;if(129===i)return W.PAD_ENCODE;if(i<=229){const t=i-130;t<10&&e.append("0"),e.append(""+t)}else switch(i){case 230:return W.C40_ENCODE;case 231:return W.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:break;case 235:n=!0;break;case 236:e.append("[)>05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return W.ANSIX12_ENCODE;case 239:return W.TEXT_ENCODE;case 240:return W.EDIFACT_ENCODE;case 241:break;default:if(254!==i||0!==t.available())throw new v;break}}while(t.available()>0);return W.ASCII_ENCODE}static decodeC40Segment(t,e){let r=!1;const n=[];let i=0;do{if(8===t.available())return;const o=t.readBits(8);if(254===o)return;this.parseTwoBytes(o,t.readBits(8),n);for(let t=0;t<3;t++){const o=n[t];switch(i){case 0:if(o<3)i=o+1;else{if(!(o<this.C40_BASIC_SET_CHARS.length))throw new v;{const t=this.C40_BASIC_SET_CHARS[o];r?(e.append(String.fromCharCode(t.charCodeAt(0)+128)),r=!1):e.append(t)}}break;case 1:r?(e.append(String.fromCharCode(o+128)),r=!1):e.append(String.fromCharCode(o)),i=0;break;case 2:if(o<this.C40_SHIFT2_SET_CHARS.length){const t=this.C40_SHIFT2_SET_CHARS[o];r?(e.append(String.fromCharCode(t.charCodeAt(0)+128)),r=!1):e.append(t)}else switch(o){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new v}i=0;break;case 3:r?(e.append(String.fromCharCode(o+224)),r=!1):e.append(String.fromCharCode(o+96)),i=0;break;default:throw new v}}}while(t.available()>0)}static decodeTextSegment(t,e){let r=!1,n=[],i=0;do{if(8===t.available())return;const o=t.readBits(8);if(254===o)return;this.parseTwoBytes(o,t.readBits(8),n);for(let t=0;t<3;t++){const o=n[t];switch(i){case 0:if(o<3)i=o+1;else{if(!(o<this.TEXT_BASIC_SET_CHARS.length))throw new v;{const t=this.TEXT_BASIC_SET_CHARS[o];r?(e.append(String.fromCharCode(t.charCodeAt(0)+128)),r=!1):e.append(t)}}break;case 1:r?(e.append(String.fromCharCode(o+128)),r=!1):e.append(String.fromCharCode(o)),i=0;break;case 2:if(o<this.TEXT_SHIFT2_SET_CHARS.length){const t=this.TEXT_SHIFT2_SET_CHARS[o];r?(e.append(String.fromCharCode(t.charCodeAt(0)+128)),r=!1):e.append(t)}else switch(o){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new v}i=0;break;case 3:if(!(o<this.TEXT_SHIFT3_SET_CHARS.length))throw new v;{const t=this.TEXT_SHIFT3_SET_CHARS[o];r?(e.append(String.fromCharCode(t.charCodeAt(0)+128)),r=!1):e.append(t),i=0}break;default:throw new v}}}while(t.available()>0)}static decodeAnsiX12Segment(t,e){const r=[];do{if(8===t.available())return;const n=t.readBits(8);if(254===n)return;this.parseTwoBytes(n,t.readBits(8),r);for(let t=0;t<3;t++){const n=r[t];switch(n){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(n<14)e.append(String.fromCharCode(n+44));else{if(!(n<40))throw new v;e.append(String.fromCharCode(n+51))}break}}}while(t.available()>0)}static parseTwoBytes(t,e,r){let n=(t<<8)+e-1,i=Math.floor(n/1600);r[0]=i,n-=1600*i,i=Math.floor(n/40),r[1]=i,r[2]=n-40*i}static decodeEdifactSegment(t,e){do{if(t.available()<=16)return;for(let r=0;r<4;r++){let r=t.readBits(6);if(31===r){const e=8-t.getBitOffset();return void(8!==e&&t.readBits(e))}0===(32&r)&&(r|=64),e.append(String.fromCharCode(r))}}while(t.available()>0)}static decodeBase256Segment(t,e,r){let n=1+t.getByteOffset();const i=this.unrandomize255State(t.readBits(8),n++);let o;if(o=0===i?t.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(t.readBits(8),n++),o<0)throw new v;const a=new Uint8Array(o);for(let c=0;c<o;c++){if(t.available()<8)throw new v;a[c]=this.unrandomize255State(t.readBits(8),n++)}r.push(a);try{e.append(_.decode(a,T.ISO88591))}catch(s){throw new rt("Platform does not support required encoding: "+s.message)}}static unrandomize255State(t,e){const r=149*e%255+1,n=t-r;return n>=0?n:n+256}}me.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"],me.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],me.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"],me.TEXT_SHIFT2_SET_CHARS=me.C40_SHIFT2_SET_CHARS,me.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 we{constructor(){this.rsDecoder=new nt(tt.DATA_MATRIX_FIELD_256)}decode(t){const e=new fe(t),r=e.getVersion(),n=e.readCodewords(),i=ge.getDataBlocks(n,r);let o=0;for(let c of i)o+=c.getNumDataCodewords();const a=new Uint8Array(o),s=i.length;for(let c=0;c<s;c++){const t=i[c],e=t.getCodewords(),r=t.getNumDataCodewords();this.correctErrors(e,r);for(let n=0;n<r;n++)a[n*s+c]=e[n]}return me.decode(a)}correctErrors(t,e){const r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(n){throw new f}for(let i=0;i<e;i++)t[i]=r[i]}}class ye{constructor(t){this.image=t,this.rectangleDetector=new lt(this.image)}detect(){const t=this.rectangleDetector.detect();let e=this.detectSolid1(t);if(e=this.detectSolid2(e),e[3]=this.correctTopRight(e),!e[3])throw new O;e=this.shiftToModuleCenter(e);const r=e[0],n=e[1],i=e[2],o=e[3];let a=this.transitionsBetween(r,o)+1,s=this.transitionsBetween(i,o)+1;1===(1&a)&&(a+=1),1===(1&s)&&(s+=1),4*a<7*s&&4*s<7*a&&(a=s=Math.max(a,s));let c=ye.sampleGrid(this.image,r,n,i,o,a,s);return new ct(c,[r,n,i,o])}static shiftPoint(t,e,r){let n=(e.getX()-t.getX())/(r+1),i=(e.getY()-t.getY())/(r+1);return new st(t.getX()+n,t.getY()+i)}static moveAway(t,e,r){let n=t.getX(),i=t.getY();return n<e?n-=1:n+=1,i<r?i-=1:i+=1,new st(n,i)}detectSolid1(t){let e=t[0],r=t[1],n=t[3],i=t[2],o=this.transitionsBetween(e,r),a=this.transitionsBetween(r,n),s=this.transitionsBetween(n,i),c=this.transitionsBetween(i,e),u=o,l=[i,e,r,n];return u>a&&(u=a,l[0]=e,l[1]=r,l[2]=n,l[3]=i),u>s&&(u=s,l[0]=r,l[1]=n,l[2]=i,l[3]=e),u>c&&(l[0]=n,l[1]=i,l[2]=e,l[3]=r),l}detectSolid2(t){let e=t[0],r=t[1],n=t[2],i=t[3],o=this.transitionsBetween(e,i),a=ye.shiftPoint(r,n,4*(o+1)),s=ye.shiftPoint(n,r,4*(o+1)),c=this.transitionsBetween(a,e),u=this.transitionsBetween(s,i);return c<u?(t[0]=e,t[1]=r,t[2]=n,t[3]=i):(t[0]=r,t[1]=n,t[2]=i,t[3]=e),t}correctTopRight(t){let e=t[0],r=t[1],n=t[2],i=t[3],o=this.transitionsBetween(e,i),a=this.transitionsBetween(r,i),s=ye.shiftPoint(e,r,4*(a+1)),c=ye.shiftPoint(n,r,4*(o+1));o=this.transitionsBetween(s,i),a=this.transitionsBetween(c,i);let u=new st(i.getX()+(n.getX()-r.getX())/(o+1),i.getY()+(n.getY()-r.getY())/(o+1)),l=new st(i.getX()+(e.getX()-r.getX())/(a+1),i.getY()+(e.getY()-r.getY())/(a+1));if(!this.isValid(u))return this.isValid(l)?l:null;if(!this.isValid(l))return u;let h=this.transitionsBetween(s,u)+this.transitionsBetween(c,u),d=this.transitionsBetween(s,l)+this.transitionsBetween(c,l);return h>d?u:l}shiftToModuleCenter(t){let e=t[0],r=t[1],n=t[2],i=t[3],o=this.transitionsBetween(e,i)+1,a=this.transitionsBetween(n,i)+1,s=ye.shiftPoint(e,r,4*a),c=ye.shiftPoint(n,r,4*o);o=this.transitionsBetween(s,i)+1,a=this.transitionsBetween(c,i)+1,1===(1&o)&&(o+=1),1===(1&a)&&(a+=1);let u,l,h=(e.getX()+r.getX()+n.getX()+i.getX())/4,d=(e.getY()+r.getY()+n.getY()+i.getY())/4;return e=ye.moveAway(e,h,d),r=ye.moveAway(r,h,d),n=ye.moveAway(n,h,d),i=ye.moveAway(i,h,d),s=ye.shiftPoint(e,r,4*a),s=ye.shiftPoint(s,i,4*o),u=ye.shiftPoint(r,e,4*a),u=ye.shiftPoint(u,n,4*o),c=ye.shiftPoint(n,i,4*a),c=ye.shiftPoint(c,r,4*o),l=ye.shiftPoint(i,n,4*a),l=ye.shiftPoint(l,e,4*o),[s,u,c,l]}isValid(t){return t.getX()>=0&&t.getX()<this.image.getWidth()&&t.getY()>0&&t.getY()<this.image.getHeight()}static sampleGrid(t,e,r,n,i,o,a){const s=gt.getInstance();return s.sampleGrid(t,o,a,.5,.5,o-.5,.5,o-.5,a-.5,.5,a-.5,e.getX(),e.getY(),i.getX(),i.getY(),n.getX(),n.getY(),r.getX(),r.getY())}transitionsBetween(t,e){let r=Math.trunc(t.getX()),n=Math.trunc(t.getY()),i=Math.trunc(e.getX()),o=Math.trunc(e.getY()),a=Math.abs(o-n)>Math.abs(i-r);if(a){let t=r;r=n,n=t,t=i,i=o,o=t}let s=Math.abs(i-r),c=Math.abs(o-n),u=-s/2,l=n<o?1:-1,h=r<i?1:-1,d=0,f=this.image.get(a?n:r,a?r:n);for(let g=r,p=n;g!==i;g+=h){let t=this.image.get(a?p:g,a?g:p);if(t!==f&&(d++,f=t),u+=c,u>0){if(p===o)break;p+=l,u-=s}}return d}}class Ee{constructor(){this.decoder=new we}decode(t,e=null){let r,n;if(null!=e&&e.has(S.PURE_BARCODE)){const e=Ee.extractPureBits(t.getBlackMatrix());r=this.decoder.decode(e),n=Ee.NO_POINTS}else{const e=new ye(t.getBlackMatrix()).detect();r=this.decoder.decode(e.getBits()),n=e.getPoints()}const i=r.getRawBytes(),o=new j(r.getText(),i,8*i.length,n,V.DATA_MATRIX,p.currentTimeMillis()),a=r.getByteSegments();null!=a&&o.putMetadata(Z.BYTE_SEGMENTS,a);const s=r.getECLevel();return null!=s&&o.putMetadata(Z.ERROR_CORRECTION_LEVEL,s),o}reset(){}static extractPureBits(t){const e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==e||null==r)throw new O;const n=this.moduleSize(e,t);let i=e[1];const o=r[1];let a=e[0];const s=r[0],c=(s-a+1)/n,u=(o-i+1)/n;if(c<=0||u<=0)throw new O;const l=n/2;i+=l,a+=l;const h=new D(c,u);for(let d=0;d<u;d++){const e=i+d*n;for(let r=0;r<c;r++)t.get(a+r*n,e)&&h.set(r,d)}return h}static moduleSize(t,e){const r=e.getWidth();let n=t[0];const i=t[1];while(n<r&&e.get(n,i))n++;if(n===r)throw new O;const o=n-t[0];if(0===o)throw new O;return o}}Ee.NO_POINTS=[];class Ce extends U{constructor(t=500){super(new Ee,t)}}(function(t){t[t["L"]=0]="L",t[t["M"]=1]="M",t[t["Q"]=2]="Q",t[t["H"]=3]="H"})(G||(G={}));class Ae{constructor(t,e,r){this.value=t,this.stringValue=e,this.bits=r,Ae.FOR_BITS.set(r,this),Ae.FOR_VALUE.set(t,this)}getValue(){return this.value}getBits(){return this.bits}static fromString(t){switch(t){case"L":return Ae.L;case"M":return Ae.M;case"Q":return Ae.Q;case"H":return Ae.H;default:throw new l(t+"not available")}}toString(){return this.stringValue}equals(t){if(!(t instanceof Ae))return!1;const e=t;return this.value===e.value}static forBits(t){if(t<0||t>=Ae.FOR_BITS.size)throw new h;return Ae.FOR_BITS.get(t)}}Ae.FOR_BITS=new Map,Ae.FOR_VALUE=new Map,Ae.L=new Ae(G.L,"L",1),Ae.M=new Ae(G.M,"M",0),Ae.Q=new Ae(G.Q,"Q",3),Ae.H=new Ae(G.H,"H",2);class Se{constructor(t){this.errorCorrectionLevel=Ae.forBits(t>>3&3),this.dataMask=7&t}static numBitsDiffering(t,e){return E.bitCount(t^e)}static decodeFormatInformation(t,e){const r=Se.doDecodeFormatInformation(t,e);return null!==r?r:Se.doDecodeFormatInformation(t^Se.FORMAT_INFO_MASK_QR,e^Se.FORMAT_INFO_MASK_QR)}static doDecodeFormatInformation(t,e){let r=Number.MAX_SAFE_INTEGER,n=0;for(const i of Se.FORMAT_INFO_DECODE_LOOKUP){const o=i[0];if(o===t||o===e)return new Se(i[1]);let a=Se.numBitsDiffering(t,o);a<r&&(n=i[1],r=a),t!==e&&(a=Se.numBitsDiffering(e,o),a<r&&(n=i[1],r=a))}return r<=3?new Se(n):null}getErrorCorrectionLevel(){return this.errorCorrectionLevel}getDataMask(){return this.dataMask}hashCode(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask}equals(t){if(!(t instanceof Se))return!1;const e=t;return this.errorCorrectionLevel===e.errorCorrectionLevel&&this.dataMask===e.dataMask}}Se.FORMAT_INFO_MASK_QR=21522,Se.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 ve{constructor(t,...e){this.ecCodewordsPerBlock=t,this.ecBlocks=e}getECCodewordsPerBlock(){return this.ecCodewordsPerBlock}getNumBlocks(){let t=0;const e=this.ecBlocks;for(const r of e)t+=r.getCount();return t}getTotalECCodewords(){return this.ecCodewordsPerBlock*this.getNumBlocks()}getECBlocks(){return this.ecBlocks}}class be{constructor(t,e){this.count=t,this.dataCodewords=e}getCount(){return this.count}getDataCodewords(){return this.dataCodewords}}class Ie{constructor(t,e,...r){this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=r;let n=0;const i=r[0].getECCodewordsPerBlock(),o=r[0].getECBlocks();for(const a of o)n+=a.getCount()*(a.getDataCodewords()+i);this.totalCodewords=n}getVersionNumber(){return this.versionNumber}getAlignmentPatternCenters(){return this.alignmentPatternCenters}getTotalCodewords(){return this.totalCodewords}getDimensionForVersion(){return 17+4*this.versionNumber}getECBlocksForLevel(t){return this.ecBlocks[t.getValue()]}static getProvisionalVersionForDimension(t){if(t%4!==1)throw new v;try{return this.getVersionForNumber((t-17)/4)}catch(e){throw new v}}static getVersionForNumber(t){if(t<1||t>40)throw new h;return Ie.VERSIONS[t-1]}static decodeVersionInformation(t){let e=Number.MAX_SAFE_INTEGER,r=0;for(let n=0;n<Ie.VERSION_DECODE_INFO.length;n++){const i=Ie.VERSION_DECODE_INFO[n];if(i===t)return Ie.getVersionForNumber(n+7);const o=Se.numBitsDiffering(t,i);o<e&&(r=n+7,e=o)}return e<=3?Ie.getVersionForNumber(r):null}buildFunctionPattern(){const t=this.getDimensionForVersion(),e=new D(t);e.setRegion(0,0,9,9),e.setRegion(t-8,0,8,9),e.setRegion(0,t-8,9,8);const r=this.alignmentPatternCenters.length;for(let n=0;n<r;n++){const t=this.alignmentPatternCenters[n]-2;for(let i=0;i<r;i++)0===n&&(0===i||i===r-1)||n===r-1&&0===i||e.setRegion(this.alignmentPatternCenters[i]-2,t,5,5)}return e.setRegion(6,9,1,t-17),e.setRegion(9,6,t-17,1),this.versionNumber>6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e}toString(){return""+this.versionNumber}}Ie.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]),Ie.VERSIONS=[new Ie(1,new Int32Array(0),new ve(7,new be(1,19)),new ve(10,new be(1,16)),new ve(13,new be(1,13)),new ve(17,new be(1,9))),new Ie(2,Int32Array.from([6,18]),new ve(10,new be(1,34)),new ve(16,new be(1,28)),new ve(22,new be(1,22)),new ve(28,new be(1,16))),new Ie(3,Int32Array.from([6,22]),new ve(15,new be(1,55)),new ve(26,new be(1,44)),new ve(18,new be(2,17)),new ve(22,new be(2,13))),new Ie(4,Int32Array.from([6,26]),new ve(20,new be(1,80)),new ve(18,new be(2,32)),new ve(26,new be(2,24)),new ve(16,new be(4,9))),new Ie(5,Int32Array.from([6,30]),new ve(26,new be(1,108)),new ve(24,new be(2,43)),new ve(18,new be(2,15),new be(2,16)),new ve(22,new be(2,11),new be(2,12))),new Ie(6,Int32Array.from([6,34]),new ve(18,new be(2,68)),new ve(16,new be(4,27)),new ve(24,new be(4,19)),new ve(28,new be(4,15))),new Ie(7,Int32Array.from([6,22,38]),new ve(20,new be(2,78)),new ve(18,new be(4,31)),new ve(18,new be(2,14),new be(4,15)),new ve(26,new be(4,13),new be(1,14))),new Ie(8,Int32Array.from([6,24,42]),new ve(24,new be(2,97)),new ve(22,new be(2,38),new be(2,39)),new ve(22,new be(4,18),new be(2,19)),new ve(26,new be(4,14),new be(2,15))),new Ie(9,Int32Array.from([6,26,46]),new ve(30,new be(2,116)),new ve(22,new be(3,36),new be(2,37)),new ve(20,new be(4,16),new be(4,17)),new ve(24,new be(4,12),new be(4,13))),new Ie(10,Int32Array.from([6,28,50]),new ve(18,new be(2,68),new be(2,69)),new ve(26,new be(4,43),new be(1,44)),new ve(24,new be(6,19),new be(2,20)),new ve(28,new be(6,15),new be(2,16))),new Ie(11,Int32Array.from([6,30,54]),new ve(20,new be(4,81)),new ve(30,new be(1,50),new be(4,51)),new ve(28,new be(4,22),new be(4,23)),new ve(24,new be(3,12),new be(8,13))),new Ie(12,Int32Array.from([6,32,58]),new ve(24,new be(2,92),new be(2,93)),new ve(22,new be(6,36),new be(2,37)),new ve(26,new be(4,20),new be(6,21)),new ve(28,new be(7,14),new be(4,15))),new Ie(13,Int32Array.from([6,34,62]),new ve(26,new be(4,107)),new ve(22,new be(8,37),new be(1,38)),new ve(24,new be(8,20),new be(4,21)),new ve(22,new be(12,11),new be(4,12))),new Ie(14,Int32Array.from([6,26,46,66]),new ve(30,new be(3,115),new be(1,116)),new ve(24,new be(4,40),new be(5,41)),new ve(20,new be(11,16),new be(5,17)),new ve(24,new be(11,12),new be(5,13))),new Ie(15,Int32Array.from([6,26,48,70]),new ve(22,new be(5,87),new be(1,88)),new ve(24,new be(5,41),new be(5,42)),new ve(30,new be(5,24),new be(7,25)),new ve(24,new be(11,12),new be(7,13))),new Ie(16,Int32Array.from([6,26,50,74]),new ve(24,new be(5,98),new be(1,99)),new ve(28,new be(7,45),new be(3,46)),new ve(24,new be(15,19),new be(2,20)),new ve(30,new be(3,15),new be(13,16))),new Ie(17,Int32Array.from([6,30,54,78]),new ve(28,new be(1,107),new be(5,108)),new ve(28,new be(10,46),new be(1,47)),new ve(28,new be(1,22),new be(15,23)),new ve(28,new be(2,14),new be(17,15))),new Ie(18,Int32Array.from([6,30,56,82]),new ve(30,new be(5,120),new be(1,121)),new ve(26,new be(9,43),new be(4,44)),new ve(28,new be(17,22),new be(1,23)),new ve(28,new be(2,14),new be(19,15))),new Ie(19,Int32Array.from([6,30,58,86]),new ve(28,new be(3,113),new be(4,114)),new ve(26,new be(3,44),new be(11,45)),new ve(26,new be(17,21),new be(4,22)),new ve(26,new be(9,13),new be(16,14))),new Ie(20,Int32Array.from([6,34,62,90]),new ve(28,new be(3,107),new be(5,108)),new ve(26,new be(3,41),new be(13,42)),new ve(30,new be(15,24),new be(5,25)),new ve(28,new be(15,15),new be(10,16))),new Ie(21,Int32Array.from([6,28,50,72,94]),new ve(28,new be(4,116),new be(4,117)),new ve(26,new be(17,42)),new ve(28,new be(17,22),new be(6,23)),new ve(30,new be(19,16),new be(6,17))),new Ie(22,Int32Array.from([6,26,50,74,98]),new ve(28,new be(2,111),new be(7,112)),new ve(28,new be(17,46)),new ve(30,new be(7,24),new be(16,25)),new ve(24,new be(34,13))),new Ie(23,Int32Array.from([6,30,54,78,102]),new ve(30,new be(4,121),new be(5,122)),new ve(28,new be(4,47),new be(14,48)),new ve(30,new be(11,24),new be(14,25)),new ve(30,new be(16,15),new be(14,16))),new Ie(24,Int32Array.from([6,28,54,80,106]),new ve(30,new be(6,117),new be(4,118)),new ve(28,new be(6,45),new be(14,46)),new ve(30,new be(11,24),new be(16,25)),new ve(30,new be(30,16),new be(2,17))),new Ie(25,Int32Array.from([6,32,58,84,110]),new ve(26,new be(8,106),new be(4,107)),new ve(28,new be(8,47),new be(13,48)),new ve(30,new be(7,24),new be(22,25)),new ve(30,new be(22,15),new be(13,16))),new Ie(26,Int32Array.from([6,30,58,86,114]),new ve(28,new be(10,114),new be(2,115)),new ve(28,new be(19,46),new be(4,47)),new ve(28,new be(28,22),new be(6,23)),new ve(30,new be(33,16),new be(4,17))),new Ie(27,Int32Array.from([6,34,62,90,118]),new ve(30,new be(8,122),new be(4,123)),new ve(28,new be(22,45),new be(3,46)),new ve(30,new be(8,23),new be(26,24)),new ve(30,new be(12,15),new be(28,16))),new Ie(28,Int32Array.from([6,26,50,74,98,122]),new ve(30,new be(3,117),new be(10,118)),new ve(28,new be(3,45),new be(23,46)),new ve(30,new be(4,24),new be(31,25)),new ve(30,new be(11,15),new be(31,16))),new Ie(29,Int32Array.from([6,30,54,78,102,126]),new ve(30,new be(7,116),new be(7,117)),new ve(28,new be(21,45),new be(7,46)),new ve(30,new be(1,23),new be(37,24)),new ve(30,new be(19,15),new be(26,16))),new Ie(30,Int32Array.from([6,26,52,78,104,130]),new ve(30,new be(5,115),new be(10,116)),new ve(28,new be(19,47),new be(10,48)),new ve(30,new be(15,24),new be(25,25)),new ve(30,new be(23,15),new be(25,16))),new Ie(31,Int32Array.from([6,30,56,82,108,134]),new ve(30,new be(13,115),new be(3,116)),new ve(28,new be(2,46),new be(29,47)),new ve(30,new be(42,24),new be(1,25)),new ve(30,new be(23,15),new be(28,16))),new Ie(32,Int32Array.from([6,34,60,86,112,138]),new ve(30,new be(17,115)),new ve(28,new be(10,46),new be(23,47)),new ve(30,new be(10,24),new be(35,25)),new ve(30,new be(19,15),new be(35,16))),new Ie(33,Int32Array.from([6,30,58,86,114,142]),new ve(30,new be(17,115),new be(1,116)),new ve(28,new be(14,46),new be(21,47)),new ve(30,new be(29,24),new be(19,25)),new ve(30,new be(11,15),new be(46,16))),new Ie(34,Int32Array.from([6,34,62,90,118,146]),new ve(30,new be(13,115),new be(6,116)),new ve(28,new be(14,46),new be(23,47)),new ve(30,new be(44,24),new be(7,25)),new ve(30,new be(59,16),new be(1,17))),new Ie(35,Int32Array.from([6,30,54,78,102,126,150]),new ve(30,new be(12,121),new be(7,122)),new ve(28,new be(12,47),new be(26,48)),new ve(30,new be(39,24),new be(14,25)),new ve(30,new be(22,15),new be(41,16))),new Ie(36,Int32Array.from([6,24,50,76,102,128,154]),new ve(30,new be(6,121),new be(14,122)),new ve(28,new be(6,47),new be(34,48)),new ve(30,new be(46,24),new be(10,25)),new ve(30,new be(2,15),new be(64,16))),new Ie(37,Int32Array.from([6,28,54,80,106,132,158]),new ve(30,new be(17,122),new be(4,123)),new ve(28,new be(29,46),new be(14,47)),new ve(30,new be(49,24),new be(10,25)),new ve(30,new be(24,15),new be(46,16))),new Ie(38,Int32Array.from([6,32,58,84,110,136,162]),new ve(30,new be(4,122),new be(18,123)),new ve(28,new be(13,46),new be(32,47)),new ve(30,new be(48,24),new be(14,25)),new ve(30,new be(42,15),new be(32,16))),new Ie(39,Int32Array.from([6,26,54,82,110,138,166]),new ve(30,new be(20,117),new be(4,118)),new ve(28,new be(40,47),new be(7,48)),new ve(30,new be(43,24),new be(22,25)),new ve(30,new be(10,15),new be(67,16))),new Ie(40,Int32Array.from([6,30,58,86,114,142,170]),new ve(30,new be(19,118),new be(6,119)),new ve(28,new be(18,47),new be(31,48)),new ve(30,new be(34,24),new be(34,25)),new ve(30,new be(20,15),new be(61,16)))],function(t){t[t["DATA_MASK_000"]=0]="DATA_MASK_000",t[t["DATA_MASK_001"]=1]="DATA_MASK_001",t[t["DATA_MASK_010"]=2]="DATA_MASK_010",t[t["DATA_MASK_011"]=3]="DATA_MASK_011",t[t["DATA_MASK_100"]=4]="DATA_MASK_100",t[t["DATA_MASK_101"]=5]="DATA_MASK_101",t[t["DATA_MASK_110"]=6]="DATA_MASK_110",t[t["DATA_MASK_111"]=7]="DATA_MASK_111"}(Y||(Y={}));class _e{constructor(t,e){this.value=t,this.isMasked=e}unmaskBitMatrix(t,e){for(let r=0;r<e;r++)for(let n=0;n<e;n++)this.isMasked(r,n)&&t.flip(n,r)}}_e.values=new Map([[Y.DATA_MASK_000,new _e(Y.DATA_MASK_000,(t,e)=>0===(t+e&1))],[Y.DATA_MASK_001,new _e(Y.DATA_MASK_001,(t,e)=>0===(1&t))],[Y.DATA_MASK_010,new _e(Y.DATA_MASK_010,(t,e)=>e%3===0)],[Y.DATA_MASK_011,new _e(Y.DATA_MASK_011,(t,e)=>(t+e)%3===0)],[Y.DATA_MASK_100,new _e(Y.DATA_MASK_100,(t,e)=>0===(Math.floor(t/2)+Math.floor(e/3)&1))],[Y.DATA_MASK_101,new _e(Y.DATA_MASK_101,(t,e)=>t*e%6===0)],[Y.DATA_MASK_110,new _e(Y.DATA_MASK_110,(t,e)=>t*e%6<3)],[Y.DATA_MASK_111,new _e(Y.DATA_MASK_111,(t,e)=>0===(t+e+t*e%3&1))]]);class Te{constructor(t){const e=t.getHeight();if(e<21||1!==(3&e))throw new v;this.bitMatrix=t}readFormatInformation(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;let t=0;for(let i=0;i<6;i++)t=this.copyBit(i,8,t);t=this.copyBit(7,8,t),t=this.copyBit(8,8,t),t=this.copyBit(8,7,t);for(let i=5;i>=0;i--)t=this.copyBit(8,i,t);const e=this.bitMatrix.getHeight();let r=0;const n=e-7;for(let i=e-1;i>=n;i--)r=this.copyBit(8,i,r);for(let i=e-8;i<e;i++)r=this.copyBit(i,8,r);if(this.parsedFormatInfo=Se.decodeFormatInformation(t,r),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new v}readVersion(){if(null!==this.parsedVersion&&void 0!==this.parsedVersion)return this.parsedVersion;const t=this.bitMatrix.getHeight(),e=Math.floor((t-17)/4);if(e<=6)return Ie.getVersionForNumber(e);let r=0;const n=t-11;for(let o=5;o>=0;o--)for(let e=t-9;e>=n;e--)r=this.copyBit(e,o,r);let i=Ie.decodeVersionInformation(r);if(null!==i&&i.getDimensionForVersion()===t)return this.parsedVersion=i,i;r=0;for(let o=5;o>=0;o--)for(let e=t-9;e>=n;e--)r=this.copyBit(o,e,r);if(i=Ie.decodeVersionInformation(r),null!==i&&i.getDimensionForVersion()===t)return this.parsedVersion=i,i;throw new v}copyBit(t,e,r){const n=this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e);return n?r<<1|1:r<<1}readCodewords(){const t=this.readFormatInformation(),e=this.readVersion(),r=_e.values.get(t.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);const i=e.buildFunctionPattern();let o=!0;const a=new Uint8Array(e.getTotalCodewords());let s=0,c=0,u=0;for(let l=n-1;l>0;l-=2){6===l&&l--;for(let t=0;t<n;t++){const e=o?n-1-t:t;for(let t=0;t<2;t++)i.get(l-t,e)||(u++,c<<=1,this.bitMatrix.get(l-t,e)&&(c|=1),8===u&&(a[s++]=c,u=0,c=0))}o=!o}if(s!==e.getTotalCodewords())throw new v;return a}remask(){if(null===this.parsedFormatInfo)return;const t=_e.values[this.parsedFormatInfo.getDataMask()],e=this.bitMatrix.getHeight();t.unmaskBitMatrix(this.bitMatrix,e)}setMirror(t){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=t}mirror(){const t=this.bitMatrix;for(let e=0,r=t.getWidth();e<r;e++)for(let n=e+1,i=t.getHeight();n<i;n++)t.get(e,n)!==t.get(n,e)&&(t.flip(n,e),t.flip(e,n))}}class Re{constructor(t,e){this.numDataCodewords=t,this.codewords=e}static getDataBlocks(t,e,r){if(t.length!==e.getTotalCodewords())throw new h;const n=e.getECBlocksForLevel(r);let i=0;const o=n.getECBlocks();for(const h of o)i+=h.getCount();const a=new Array(i);let s=0;for(const h of o)for(let t=0;t<h.getCount();t++){const t=h.getDataCodewords(),e=n.getECCodewordsPerBlock()+t;a[s++]=new Re(t,new Uint8Array(e))}const c=a[0].codewords.length;let u=a.length-1;while(u>=0){const t=a[u].codewords.length;if(t===c)break;u--}u++;const l=c-n.getECCodewordsPerBlock();let d=0;for(let h=0;h<l;h++)for(let e=0;e<s;e++)a[e].codewords[h]=t[d++];for(let h=u;h<s;h++)a[h].codewords[l]=t[d++];const f=a[0].codewords.length;for(let h=l;h<f;h++)for(let e=0;e<s;e++){const r=e<u?h:h+1;a[e].codewords[r]=t[d++]}return a}getNumDataCodewords(){return this.numDataCodewords}getCodewords(){return this.codewords}}(function(t){t[t["TERMINATOR"]=0]="TERMINATOR",t[t["NUMERIC"]=1]="NUMERIC",t[t["ALPHANUMERIC"]=2]="ALPHANUMERIC",t[t["STRUCTURED_APPEND"]=3]="STRUCTURED_APPEND",t[t["BYTE"]=4]="BYTE",t[t["ECI"]=5]="ECI",t[t["KANJI"]=6]="KANJI",t[t["FNC1_FIRST_POSITION"]=7]="FNC1_FIRST_POSITION",t[t["FNC1_SECOND_POSITION"]=8]="FNC1_SECOND_POSITION",t[t["HANZI"]=9]="HANZI"})(X||(X={}));class De{constructor(t,e,r,n){this.value=t,this.stringValue=e,this.characterCountBitsForVersions=r,this.bits=n,De.FOR_BITS.set(n,this),De.FOR_VALUE.set(t,this)}static forBits(t){const e=De.FOR_BITS.get(t);if(void 0===e)throw new h;return e}getCharacterCountBits(t){const e=t.getVersionNumber();let r;return r=e<=9?0:e<=26?1:2,this.characterCountBitsForVersions[r]}getValue(){return this.value}getBits(){return this.bits}equals(t){if(!(t instanceof De))return!1;const e=t;return this.value===e.value}toString(){return this.stringValue}}De.FOR_BITS=new Map,De.FOR_VALUE=new Map,De.TERMINATOR=new De(X.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),De.NUMERIC=new De(X.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),De.ALPHANUMERIC=new De(X.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),De.STRUCTURED_APPEND=new De(X.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),De.BYTE=new De(X.BYTE,"BYTE",Int32Array.from([8,16,16]),4),De.ECI=new De(X.ECI,"ECI",Int32Array.from([0,0,0]),7),De.KANJI=new De(X.KANJI,"KANJI",Int32Array.from([8,10,12]),8),De.FNC1_FIRST_POSITION=new De(X.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),De.FNC1_SECOND_POSITION=new De(X.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),De.HANZI=new De(X.HANZI,"HANZI",Int32Array.from([8,10,12]),13);class Oe{static decode(t,e,r,n){const i=new pe(t);let o=new R;const a=new Array;let s=-1,c=-1;try{let t,r=null,u=!1;do{if(i.available()<4)t=De.TERMINATOR;else{const e=i.readBits(4);t=De.forBits(e)}switch(t){case De.TERMINATOR:break;case De.FNC1_FIRST_POSITION:case De.FNC1_SECOND_POSITION:u=!0;break;case De.STRUCTURED_APPEND:if(i.available()<16)throw new v;s=i.readBits(8),c=i.readBits(8);break;case De.ECI:const l=Oe.parseECIValue(i);if(r=b.getCharacterSetECIByValue(l),null===r)throw new v;break;case De.HANZI:const h=i.readBits(4),d=i.readBits(t.getCharacterCountBits(e));h===Oe.GB2312_SUBSET&&Oe.decodeHanziSegment(i,o,d);break;default:const f=i.readBits(t.getCharacterCountBits(e));switch(t){case De.NUMERIC:Oe.decodeNumericSegment(i,o,f);break;case De.ALPHANUMERIC:Oe.decodeAlphanumericSegment(i,o,f,u);break;case De.BYTE:Oe.decodeByteSegment(i,o,f,r,a,n);break;case De.KANJI:Oe.decodeKanjiSegment(i,o,f);break;default:throw new v}break}}while(t!==De.TERMINATOR)}catch(u){throw new v}return new Q(t,o.toString(),0===a.length?null:a,null===r?null:r.toString(),s,c)}static decodeHanziSegment(t,e,r){if(13*r>t.available())throw new v;const n=new Uint8Array(2*r);let i=0;while(r>0){const e=t.readBits(13);let o=e/96<<8&4294967295|e%96;o+=o<959?41377:42657,n[i]=o>>8&255,n[i+1]=255&o,i+=2,r--}try{e.append(_.decode(n,T.GB2312))}catch(o){throw new v(o)}}static decodeKanjiSegment(t,e,r){if(13*r>t.available())throw new v;const n=new Uint8Array(2*r);let i=0;while(r>0){const e=t.readBits(13);let o=e/192<<8&4294967295|e%192;o+=o<7936?33088:49472,n[i]=o>>8,n[i+1]=o,i+=2,r--}try{e.append(_.decode(n,T.SHIFT_JIS))}catch(o){throw new v(o)}}static decodeByteSegment(t,e,r,n,i,o){if(8*r>t.available())throw new v;const a=new Uint8Array(r);for(let u=0;u<r;u++)a[u]=t.readBits(8);let s;s=null===n?T.guessEncoding(a,o):n.getName();try{e.append(_.decode(a,s))}catch(c){throw new v(c)}i.push(a)}static toAlphaNumericChar(t){if(t>=Oe.ALPHANUMERIC_CHARS.length)throw new v;return Oe.ALPHANUMERIC_CHARS[t]}static decodeAlphanumericSegment(t,e,r,n){const i=e.length();while(r>1){if(t.available()<11)throw new v;const n=t.readBits(11);e.append(Oe.toAlphaNumericChar(Math.floor(n/45))),e.append(Oe.toAlphaNumericChar(n%45)),r-=2}if(1===r){if(t.available()<6)throw new v;e.append(Oe.toAlphaNumericChar(t.readBits(6)))}if(n)for(let o=i;o<e.length();o++)"%"===e.charAt(o)&&(o<e.length()-1&&"%"===e.charAt(o+1)?e.deleteCharAt(o+1):e.setCharAt(o,String.fromCharCode(29)))}static decodeNumericSegment(t,e,r){while(r>=3){if(t.available()<10)throw new v;const n=t.readBits(10);if(n>=1e3)throw new v;e.append(Oe.toAlphaNumericChar(Math.floor(n/100))),e.append(Oe.toAlphaNumericChar(Math.floor(n/10)%10)),e.append(Oe.toAlphaNumericChar(n%10)),r-=3}if(2===r){if(t.available()<7)throw new v;const r=t.readBits(7);if(r>=100)throw new v;e.append(Oe.toAlphaNumericChar(Math.floor(r/10))),e.append(Oe.toAlphaNumericChar(r%10))}else if(1===r){if(t.available()<4)throw new v;const r=t.readBits(4);if(r>=10)throw new v;e.append(Oe.toAlphaNumericChar(r))}}static parseECIValue(t){const e=t.readBits(8);if(0===(128&e))return 127&e;if(128===(192&e)){const r=t.readBits(8);return(63&e)<<8&4294967295|r}if(192===(224&e)){const r=t.readBits(16);return(31&e)<<16&4294967295|r}throw new v}}Oe.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Oe.GB2312_SUBSET=1;class Ne{constructor(t){this.mirrored=t}isMirrored(){return this.mirrored}applyMirroredCorrection(t){if(!this.mirrored||null===t||t.length<3)return;const e=t[0];t[0]=t[2],t[2]=e}}class Me{constructor(){this.rsDecoder=new nt(tt.QR_CODE_FIELD_256)}decodeBooleanArray(t,e){return this.decodeBitMatrix(D.parseFromBooleanArray(t),e)}decodeBitMatrix(t,e){const r=new Te(t);let n=null;try{return this.decodeBitMatrixParser(r,e)}catch(i){n=i}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();const t=this.decodeBitMatrixParser(r,e);return t.setOther(new Ne(!0)),t}catch(i){if(null!==n)throw n;throw i}}decodeBitMatrixParser(t,e){const r=t.readVersion(),n=t.readFormatInformation().getErrorCorrectionLevel(),i=t.readCodewords(),o=Re.getDataBlocks(i,r,n);let a=0;for(const u of o)a+=u.getNumDataCodewords();const s=new Uint8Array(a);let c=0;for(const u of o){const t=u.getCodewords(),e=u.getNumDataCodewords();this.correctErrors(t,e);for(let r=0;r<e;r++)s[c++]=t[r]}return Oe.decode(s,r,n,e)}correctErrors(t,e){const r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(n){throw new f}for(let i=0;i<e;i++)t[i]=r[i]}}class Pe extends st{constructor(t,e,r){super(t,e),this.estimatedModuleSize=r}aboutEquals(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){const e=Math.abs(t-this.estimatedModuleSize);return e<=1||e<=this.estimatedModuleSize}return!1}combineEstimate(t,e,r){const n=(this.getX()+e)/2,i=(this.getY()+t)/2,o=(this.estimatedModuleSize+r)/2;return new Pe(n,i,o)}}class Le{constructor(t,e,r,n,i,o,a){this.image=t,this.startX=e,this.startY=r,this.width=n,this.height=i,this.moduleSize=o,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}find(){const t=this.startX,e=this.height,r=this.width,n=t+r,i=this.startY+e/2,o=new Int32Array(3),a=this.image;for(let s=0;s<e;s++){const e=i+(0===(1&s)?Math.floor((s+1)/2):-Math.floor((s+1)/2));o[0]=0,o[1]=0,o[2]=0;let r=t;while(r<n&&!a.get(r,e))r++;let c=0;while(r<n){if(a.get(r,e))if(1===c)o[1]++;else if(2===c){if(this.foundPatternCross(o)){const t=this.handlePossibleCenter(o,e,r);if(null!==t)return t}o[0]=o[2],o[1]=1,o[2]=0,c=1}else o[++c]++;else 1===c&&c++,o[c]++;r++}if(this.foundPatternCross(o)){const t=this.handlePossibleCenter(o,e,n);if(null!==t)return t}}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new O}static centerFromEnd(t,e){return e-t[2]-t[1]/2}foundPatternCross(t){const e=this.moduleSize,r=e/2;for(let n=0;n<3;n++)if(Math.abs(e-t[n])>=r)return!1;return!0}crossCheckVertical(t,e,r,n){const i=this.image,o=i.getHeight(),a=this.crossCheckStateCount;a[0]=0,a[1]=0,a[2]=0;let s=t;while(s>=0&&i.get(e,s)&&a[1]<=r)a[1]++,s--;if(s<0||a[1]>r)return NaN;while(s>=0&&!i.get(e,s)&&a[0]<=r)a[0]++,s--;if(a[0]>r)return NaN;s=t+1;while(s<o&&i.get(e,s)&&a[1]<=r)a[1]++,s++;if(s===o||a[1]>r)return NaN;while(s<o&&!i.get(e,s)&&a[2]<=r)a[2]++,s++;if(a[2]>r)return NaN;const c=a[0]+a[1]+a[2];return 5*Math.abs(c-n)>=2*n?NaN:this.foundPatternCross(a)?Le.centerFromEnd(a,s):NaN}handlePossibleCenter(t,e,r){const n=t[0]+t[1]+t[2],i=Le.centerFromEnd(t,r),o=this.crossCheckVertical(e,i,2*t[1],n);if(!isNaN(o)){const e=(t[0]+t[1]+t[2])/3;for(const t of this.possibleCenters)if(t.aboutEquals(e,o,i))return t.combineEstimate(o,i,e);const r=new Pe(i,o,e);this.possibleCenters.push(r),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(r)}return null}}class xe extends st{constructor(t,e,r,n){super(t,e),this.estimatedModuleSize=r,this.count=n,void 0===n&&(this.count=1)}getEstimatedModuleSize(){return this.estimatedModuleSize}getCount(){return this.count}aboutEquals(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){const e=Math.abs(t-this.estimatedModuleSize);return e<=1||e<=this.estimatedModuleSize}return!1}combineEstimate(t,e,r){const n=this.count+1,i=(this.count*this.getX()+e)/n,o=(this.count*this.getY()+t)/n,a=(this.count*this.estimatedModuleSize+r)/n;return new xe(i,o,a,n)}}class Be{constructor(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}getBottomLeft(){return this.bottomLeft}getTopLeft(){return this.topLeft}getTopRight(){return this.topRight}}class ke{constructor(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}getImage(){return this.image}getPossibleCenters(){return this.possibleCenters}find(t){const e=null!==t&&void 0!==t&&void 0!==t.get(S.TRY_HARDER),r=null!==t&&void 0!==t&&void 0!==t.get(S.PURE_BARCODE),n=this.image,i=n.getHeight(),o=n.getWidth();let a=Math.floor(3*i/(4*ke.MAX_MODULES));(a<ke.MIN_SKIP||e)&&(a=ke.MIN_SKIP);let s=!1;const c=new Int32Array(5);for(let l=a-1;l<i&&!s;l+=a){c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0;let t=0;for(let e=0;e<o;e++)if(n.get(e,l))1===(1&t)&&t++,c[t]++;else if(0===(1&t))if(4===t)if(ke.foundPatternCross(c)){const n=this.handlePossibleCenter(c,l,e,r);if(!0!==n){c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,t=3;continue}if(a=2,!0===this.hasSkipped)s=this.haveMultiplyConfirmedCenters();else{const t=this.findRowSkip();t>c[2]&&(l+=t-c[2]-a,e=o-1)}t=0,c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,t=3;else c[++t]++;else c[t]++;if(ke.foundPatternCross(c)){const t=this.handlePossibleCenter(c,l,o,r);!0===t&&(a=c[0],this.hasSkipped&&(s=this.haveMultiplyConfirmedCenters()))}}const u=this.selectBestPatterns();return st.orderBestPatterns(u),new Be(u)}static centerFromEnd(t,e){return e-t[4]-t[3]-t[2]/2}static foundPatternCross(t){let e=0;for(let i=0;i<5;i++){const r=t[i];if(0===r)return!1;e+=r}if(e<7)return!1;const r=e/7,n=r/2;return Math.abs(r-t[0])<n&&Math.abs(r-t[1])<n&&Math.abs(3*r-t[2])<3*n&&Math.abs(r-t[3])<n&&Math.abs(r-t[4])<n}getCrossCheckStateCount(){const t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t}crossCheckDiagonal(t,e,r,n){const i=this.getCrossCheckStateCount();let o=0;const a=this.image;while(t>=o&&e>=o&&a.get(e-o,t-o))i[2]++,o++;if(t<o||e<o)return!1;while(t>=o&&e>=o&&!a.get(e-o,t-o)&&i[1]<=r)i[1]++,o++;if(t<o||e<o||i[1]>r)return!1;while(t>=o&&e>=o&&a.get(e-o,t-o)&&i[0]<=r)i[0]++,o++;if(i[0]>r)return!1;const s=a.getHeight(),c=a.getWidth();o=1;while(t+o<s&&e+o<c&&a.get(e+o,t+o))i[2]++,o++;if(t+o>=s||e+o>=c)return!1;while(t+o<s&&e+o<c&&!a.get(e+o,t+o)&&i[3]<r)i[3]++,o++;if(t+o>=s||e+o>=c||i[3]>=r)return!1;while(t+o<s&&e+o<c&&a.get(e+o,t+o)&&i[4]<r)i[4]++,o++;if(i[4]>=r)return!1;const u=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(u-n)<2*n&&ke.foundPatternCross(i)}crossCheckVertical(t,e,r,n){const i=this.image,o=i.getHeight(),a=this.getCrossCheckStateCount();let s=t;while(s>=0&&i.get(e,s))a[2]++,s--;if(s<0)return NaN;while(s>=0&&!i.get(e,s)&&a[1]<=r)a[1]++,s--;if(s<0||a[1]>r)return NaN;while(s>=0&&i.get(e,s)&&a[0]<=r)a[0]++,s--;if(a[0]>r)return NaN;s=t+1;while(s<o&&i.get(e,s))a[2]++,s++;if(s===o)return NaN;while(s<o&&!i.get(e,s)&&a[3]<r)a[3]++,s++;if(s===o||a[3]>=r)return NaN;while(s<o&&i.get(e,s)&&a[4]<r)a[4]++,s++;if(a[4]>=r)return NaN;const c=a[0]+a[1]+a[2]+a[3]+a[4];return 5*Math.abs(c-n)>=2*n?NaN:ke.foundPatternCross(a)?ke.centerFromEnd(a,s):NaN}crossCheckHorizontal(t,e,r,n){const i=this.image,o=i.getWidth(),a=this.getCrossCheckStateCount();let s=t;while(s>=0&&i.get(s,e))a[2]++,s--;if(s<0)return NaN;while(s>=0&&!i.get(s,e)&&a[1]<=r)a[1]++,s--;if(s<0||a[1]>r)return NaN;while(s>=0&&i.get(s,e)&&a[0]<=r)a[0]++,s--;if(a[0]>r)return NaN;s=t+1;while(s<o&&i.get(s,e))a[2]++,s++;if(s===o)return NaN;while(s<o&&!i.get(s,e)&&a[3]<r)a[3]++,s++;if(s===o||a[3]>=r)return NaN;while(s<o&&i.get(s,e)&&a[4]<r)a[4]++,s++;if(a[4]>=r)return NaN;const c=a[0]+a[1]+a[2]+a[3]+a[4];return 5*Math.abs(c-n)>=n?NaN:ke.foundPatternCross(a)?ke.centerFromEnd(a,s):NaN}handlePossibleCenter(t,e,r,n){const i=t[0]+t[1]+t[2]+t[3]+t[4];let o=ke.centerFromEnd(t,r),a=this.crossCheckVertical(e,Math.floor(o),t[2],i);if(!isNaN(a)&&(o=this.crossCheckHorizontal(Math.floor(o),Math.floor(a),t[2],i),!isNaN(o)&&(!n||this.crossCheckDiagonal(Math.floor(a),Math.floor(o),t[2],i)))){const t=i/7;let e=!1;const r=this.possibleCenters;for(let n=0,i=r.length;n<i;n++){const i=r[n];if(i.aboutEquals(t,a,o)){r[n]=i.combineEstimate(a,o,t),e=!0;break}}if(!e){const e=new xe(o,a,t);r.push(e),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(e)}return!0}return!1}findRowSkip(){const t=this.possibleCenters.length;if(t<=1)return 0;let e=null;for(const r of this.possibleCenters)if(r.getCount()>=ke.CENTER_QUORUM){if(null!=e)return this.hasSkipped=!0,Math.floor((Math.abs(e.getX()-r.getX())-Math.abs(e.getY()-r.getY()))/2);e=r}return 0}haveMultiplyConfirmedCenters(){let t=0,e=0;const r=this.possibleCenters.length;for(const o of this.possibleCenters)o.getCount()>=ke.CENTER_QUORUM&&(t++,e+=o.getEstimatedModuleSize());if(t<3)return!1;const n=e/r;let i=0;for(const o of this.possibleCenters)i+=Math.abs(o.getEstimatedModuleSize()-n);return i<=.05*e}selectBestPatterns(){const t=this.possibleCenters.length;if(t<3)throw new O;const e=this.possibleCenters;let r;if(t>3){let n=0,i=0;for(const t of this.possibleCenters){const e=t.getEstimatedModuleSize();n+=e,i+=e*e}r=n/t;let o=Math.sqrt(i/t-r*r);e.sort((t,e)=>{const n=Math.abs(e.getEstimatedModuleSize()-r),i=Math.abs(t.getEstimatedModuleSize()-r);return n<i?-1:n>i?1:0});const a=Math.max(.2*r,o);for(let t=0;t<e.length&&e.length>3;t++){const n=e[t];Math.abs(n.getEstimatedModuleSize()-r)>a&&(e.splice(t,1),t--)}}if(e.length>3){let t=0;for(const r of e)t+=r.getEstimatedModuleSize();r=t/e.length,e.sort((t,e)=>{if(e.getCount()===t.getCount()){const n=Math.abs(e.getEstimatedModuleSize()-r),i=Math.abs(t.getEstimatedModuleSize()-r);return n<i?1:n>i?-1:0}return e.getCount()-t.getCount()}),e.splice(3)}return[e[0],e[1],e[2]]}}ke.CENTER_QUORUM=2,ke.MIN_SKIP=3,ke.MAX_MODULES=57;class Fe{constructor(t){this.image=t}getImage(){return this.image}getResultPointCallback(){return this.resultPointCallback}detect(t){this.resultPointCallback=null===t||void 0===t?null:t.get(S.NEED_RESULT_POINT_CALLBACK);const e=new ke(this.image,this.resultPointCallback),r=e.find(t);return this.processFinderPatternInfo(r)}processFinderPatternInfo(t){const e=t.getTopLeft(),r=t.getTopRight(),n=t.getBottomLeft(),i=this.calculateModuleSize(e,r,n);if(i<1)throw new O("No pattern found in proccess finder.");const o=Fe.computeDimension(e,r,n,i),a=Ie.getProvisionalVersionForDimension(o),s=a.getDimensionForVersion()-7;let c=null;if(a.getAlignmentPatternCenters().length>0){const t=r.getX()-e.getX()+n.getX(),o=r.getY()-e.getY()+n.getY(),a=1-3/s,u=Math.floor(e.getX()+a*(t-e.getX())),l=Math.floor(e.getY()+a*(o-e.getY()));for(let e=4;e<=16;e<<=1)try{c=this.findAlignmentInRegion(i,u,l,e);break}catch(d){if(!(d instanceof O))throw d}}const u=Fe.createTransform(e,r,n,c,o),l=Fe.sampleGrid(this.image,u,o);let h;return h=null===c?[n,e,r]:[n,e,r,c],new ct(l,h)}static createTransform(t,e,r,n,i){const o=i-3.5;let a,s,c,u;return null!==n?(a=n.getX(),s=n.getY(),c=o-3,u=c):(a=e.getX()-t.getX()+r.getX(),s=e.getY()-t.getY()+r.getY(),c=o,u=o),dt.quadrilateralToQuadrilateral(3.5,3.5,o,3.5,c,u,3.5,o,t.getX(),t.getY(),e.getX(),e.getY(),a,s,r.getX(),r.getY())}static sampleGrid(t,e,r){const n=gt.getInstance();return n.sampleGridWithTransform(t,r,r,e)}static computeDimension(t,e,r,n){const i=ot.round(st.distance(t,e)/n),o=ot.round(st.distance(t,r)/n);let a=Math.floor((i+o)/2)+7;switch(3&a){case 0:a++;break;case 2:a--;break;case 3:throw new O("Dimensions could be not found.")}return a}calculateModuleSize(t,e,r){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,r))/2}calculateModuleSizeOneWay(t,e){const r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(r)?n/7:isNaN(n)?r/7:(r+n)/14}sizeOfBlackWhiteBlackRunBothWays(t,e,r,n){let i=this.sizeOfBlackWhiteBlackRun(t,e,r,n),o=1,a=t-(r-t);a<0?(o=t/(t-a),a=0):a>=this.image.getWidth()&&(o=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);let s=Math.floor(e-(n-e)*o);return o=1,s<0?(o=e/(e-s),s=0):s>=this.image.getHeight()&&(o=(this.image.getHeight()-1-e)/(s-e),s=this.image.getHeight()-1),a=Math.floor(t+(a-t)*o),i+=this.sizeOfBlackWhiteBlackRun(t,e,a,s),i-1}sizeOfBlackWhiteBlackRun(t,e,r,n){const i=Math.abs(n-e)>Math.abs(r-t);if(i){let i=t;t=e,e=i,i=r,r=n,n=i}const o=Math.abs(r-t),a=Math.abs(n-e);let s=-o/2;const c=t<r?1:-1,u=e<n?1:-1;let l=0;const h=r+c;for(let d=t,f=e;d!==h;d+=c){const r=i?f:d,c=i?d:f;if(1===l===this.image.get(r,c)){if(2===l)return ot.distance(d,f,t,e);l++}if(s+=a,s>0){if(f===n)break;f+=u,s-=o}}return 2===l?ot.distance(r+c,n,t,e):NaN}findAlignmentInRegion(t,e,r,n){const i=Math.floor(n*t),o=Math.max(0,e-i),a=Math.min(this.image.getWidth()-1,e+i);if(a-o<3*t)throw new O("Alignment top exceeds estimated module size.");const s=Math.max(0,r-i),c=Math.min(this.image.getHeight()-1,r+i);if(c-s<3*t)throw new O("Alignment bottom exceeds estimated module size.");const u=new Le(this.image,o,s,a-o,c-s,t,this.resultPointCallback);return u.find()}}class Ue{constructor(){this.decoder=new Me}getDecoder(){return this.decoder}decode(t,e){let r,n;if(void 0!==e&&null!==e&&void 0!==e.get(S.PURE_BARCODE)){const i=Ue.extractPureBits(t.getBlackMatrix());r=this.decoder.decodeBitMatrix(i,e),n=Ue.NO_POINTS}else{const i=new Fe(t.getBlackMatrix()).detect(e);r=this.decoder.decodeBitMatrix(i.getBits(),e),n=i.getPoints()}r.getOther()instanceof Ne&&r.getOther().applyMirroredCorrection(n);const i=new j(r.getText(),r.getRawBytes(),void 0,n,V.QR_CODE,void 0),o=r.getByteSegments();null!==o&&i.putMetadata(Z.BYTE_SEGMENTS,o);const a=r.getECLevel();return null!==a&&i.putMetadata(Z.ERROR_CORRECTION_LEVEL,a),r.hasStructuredAppend()&&(i.putMetadata(Z.STRUCTURED_APPEND_SEQUENCE,r.getStructuredAppendSequenceNumber()),i.putMetadata(Z.STRUCTURED_APPEND_PARITY,r.getStructuredAppendParity())),i}reset(){}static extractPureBits(t){const e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new O;const n=this.moduleSize(e,t);let i=e[1],o=r[1],a=e[0],s=r[0];if(a>=s||i>=o)throw new O;if(o-i!==s-a&&(s=a+(o-i),s>=t.getWidth()))throw new O;const c=Math.round((s-a+1)/n),u=Math.round((o-i+1)/n);if(c<=0||u<=0)throw new O;if(u!==c)throw new O;const l=Math.floor(n/2);i+=l,a+=l;const h=a+Math.floor((c-1)*n)-s;if(h>0){if(h>l)throw new O;a-=h}const d=i+Math.floor((u-1)*n)-o;if(d>0){if(d>l)throw new O;i-=d}const f=new D(c,u);for(let g=0;g<u;g++){const e=i+Math.floor(g*n);for(let r=0;r<c;r++)t.get(a+Math.floor(r*n),e)&&f.set(r,g)}return f}static moduleSize(t,e){const r=e.getHeight(),n=e.getWidth();let i=t[0],o=t[1],a=!0,s=0;while(i<n&&o<r){if(a!==e.get(i,o)){if(5===++s)break;a=!a}i++,o++}if(i===n||o===r)throw new O;return(i-t[0])/7}}Ue.NO_POINTS=new Array;class je{PDF417Common(){}static getBitCountSum(t){return ot.sum(t)}static toIntArray(t){if(null==t||!t.length)return je.EMPTY_INT_ARRAY;const e=new Int32Array(t.length);let r=0;for(const n of t)e[r++]=n;return e}static getCodeword(t){const e=y.binarySearch(je.SYMBOL_TABLE,262143&t);return e<0?-1:(je.CODEWORD_TABLE[e]-1)%je.NUMBER_OF_CODEWORDS}}je.NUMBER_OF_CODEWORDS=929,je.MAX_CODEWORDS_IN_BARCODE=je.NUMBER_OF_CODEWORDS-1,je.MIN_ROWS_IN_BARCODE=3,je.MAX_ROWS_IN_BARCODE=90,je.MODULES_IN_CODEWORD=17,je.MODULES_IN_STOP_PATTERN=18,je.BARS_IN_MODULE=8,je.EMPTY_INT_ARRAY=new Int32Array([]),je.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]),je.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 He{constructor(t,e){this.bits=t,this.points=e}getBits(){return this.bits}getPoints(){return this.points}}class Ve{static detectMultiple(t,e,r){let n=t.getBlackMatrix(),i=Ve.detect(r,n);return i.length||(n=n.clone(),n.rotate180(),i=Ve.detect(r,n)),new He(n,i)}static detect(t,e){const r=new Array;let n=0,i=0,o=!1;while(n<e.getHeight()){const a=Ve.findVertices(e,n,i);if(null!=a[0]||null!=a[3]){if(o=!0,r.push(a),!t)break;null!=a[2]?(i=Math.trunc(a[2].getX()),n=Math.trunc(a[2].getY())):(i=Math.trunc(a[4].getX()),n=Math.trunc(a[4].getY()))}else{if(!o)break;o=!1,i=0;for(const t of r)null!=t[1]&&(n=Math.trunc(Math.max(n,t[1].getY()))),null!=t[3]&&(n=Math.max(n,Math.trunc(t[3].getY())));n+=Ve.ROW_STEP}}return r}static findVertices(t,e,r){const n=t.getHeight(),i=t.getWidth(),o=new Array(8);return Ve.copyToResult(o,Ve.findRowsWithPattern(t,n,i,e,r,Ve.START_PATTERN),Ve.INDEXES_START_PATTERN),null!=o[4]&&(r=Math.trunc(o[4].getX()),e=Math.trunc(o[4].getY())),Ve.copyToResult(o,Ve.findRowsWithPattern(t,n,i,e,r,Ve.STOP_PATTERN),Ve.INDEXES_STOP_PATTERN),o}static copyToResult(t,e,r){for(let n=0;n<r.length;n++)t[r[n]]=e[n]}static findRowsWithPattern(t,e,r,n,i,o){const a=new Array(4);let s=!1;const c=new Int32Array(o.length);for(;n<e;n+=Ve.ROW_STEP){let e=Ve.findGuardPattern(t,i,n,r,!1,o,c);if(null!=e){while(n>0){const a=Ve.findGuardPattern(t,i,--n,r,!1,o,c);if(null==a){n++;break}e=a}a[0]=new st(e[0],n),a[1]=new st(e[1],n),s=!0;break}}let u=n+1;if(s){let n=0,i=Int32Array.from([Math.trunc(a[0].getX()),Math.trunc(a[1].getX())]);for(;u<e;u++){const e=Ve.findGuardPattern(t,i[0],u,r,!1,o,c);if(null!=e&&Math.abs(i[0]-e[0])<Ve.MAX_PATTERN_DRIFT&&Math.abs(i[1]-e[1])<Ve.MAX_PATTERN_DRIFT)i=e,n=0;else{if(n>Ve.SKIPPED_ROW_COUNT_MAX)break;n++}}u-=n+1,a[2]=new st(i[0],u),a[3]=new st(i[1],u)}return u-n<Ve.BARCODE_MIN_HEIGHT&&y.fill(a,null),a}static findGuardPattern(t,e,r,n,i,o,a){y.fillWithin(a,0,a.length,0);let s=e,c=0;while(t.get(s,r)&&s>0&&c++<Ve.MAX_PIXEL_DRIFT)s--;let u=s,l=0,h=o.length;for(let d=i;u<n;u++){let e=t.get(u,r);if(e!==d)a[l]++;else{if(l===h-1){if(Ve.patternMatchVariance(a,o,Ve.MAX_INDIVIDUAL_VARIANCE)<Ve.MAX_AVG_VARIANCE)return new Int32Array([s,u]);s+=a[0]+a[1],p.arraycopy(a,2,a,0,l-1),a[l-1]=0,a[l]=0,l--}else l++;a[l]=1,d=!d}}return l===h-1&&Ve.patternMatchVariance(a,o,Ve.MAX_INDIVIDUAL_VARIANCE)<Ve.MAX_AVG_VARIANCE?new Int32Array([s,u-1]):null}static patternMatchVariance(t,e,r){let n=t.length,i=0,o=0;for(let c=0;c<n;c++)i+=t[c],o+=e[c];if(i<o)return 1/0;let a=i/o;r*=a;let s=0;for(let c=0;c<n;c++){let n=t[c],i=e[c]*a,o=n>i?n-i:i-n;if(o>r)return 1/0;s+=o}return s/i}}Ve.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),Ve.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),Ve.MAX_AVG_VARIANCE=.42,Ve.MAX_INDIVIDUAL_VARIANCE=.8,Ve.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),Ve.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),Ve.MAX_PIXEL_DRIFT=3,Ve.MAX_PATTERN_DRIFT=5,Ve.SKIPPED_ROW_COUNT_MAX=25,Ve.ROW_STEP=5,Ve.BARCODE_MIN_HEIGHT=10;class ze{constructor(t,e){if(0===e.length)throw new h;this.field=t;let r=e.length;if(r>1&&0===e[0]){let t=1;while(t<r&&0===e[t])t++;t===r?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(r-t),p.arraycopy(e,t,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}getCoefficients(){return this.coefficients}getDegree(){return this.coefficients.length-1}isZero(){return 0===this.coefficients[0]}getCoefficient(t){return this.coefficients[this.coefficients.length-1-t]}evaluateAt(t){if(0===t)return this.getCoefficient(0);if(1===t){let t=0;for(let e of this.coefficients)t=this.field.add(t,e);return t}let e=this.coefficients[0],r=this.coefficients.length;for(let n=1;n<r;n++)e=this.field.add(this.field.multiply(t,e),this.coefficients[n]);return e}add(t){if(!this.field.equals(t.field))throw new h("ModulusPolys do not have same ModulusGF field");if(this.isZero())return t;if(t.isZero())return this;let e=this.coefficients,r=t.coefficients;if(e.length>r.length){let t=e;e=r,r=t}let n=new Int32Array(r.length),i=r.length-e.length;p.arraycopy(r,0,n,0,i);for(let o=i;o<r.length;o++)n[o]=this.field.add(e[o-i],r[o]);return new ze(this.field,n)}subtract(t){if(!this.field.equals(t.field))throw new h("ModulusPolys do not have same ModulusGF field");return t.isZero()?this:this.add(t.negative())}multiply(t){return t instanceof ze?this.multiplyOther(t):this.multiplyScalar(t)}multiplyOther(t){if(!this.field.equals(t.field))throw new h("ModulusPolys do not have same ModulusGF field");if(this.isZero()||t.isZero())return new ze(this.field,new Int32Array([0]));let e=this.coefficients,r=e.length,n=t.coefficients,i=n.length,o=new Int32Array(r+i-1);for(let a=0;a<r;a++){let t=e[a];for(let e=0;e<i;e++)o[a+e]=this.field.add(o[a+e],this.field.multiply(t,n[e]))}return new ze(this.field,o)}negative(){let t=this.coefficients.length,e=new Int32Array(t);for(let r=0;r<t;r++)e[r]=this.field.subtract(0,this.coefficients[r]);return new ze(this.field,e)}multiplyScalar(t){if(0===t)return new ze(this.field,new Int32Array([0]));if(1===t)return this;let e=this.coefficients.length,r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=this.field.multiply(this.coefficients[n],t);return new ze(this.field,r)}multiplyByMonomial(t,e){if(t<0)throw new h;if(0===e)return new ze(this.field,new Int32Array([0]));let r=this.coefficients.length,n=new Int32Array(r+t);for(let i=0;i<r;i++)n[i]=this.field.multiply(this.coefficients[i],e);return new ze(this.field,n)}toString(){let t=new R;for(let e=this.getDegree();e>=0;e--){let r=this.getCoefficient(e);0!==r&&(r<0?(t.append(" - "),r=-r):t.length()>0&&t.append(" + "),0!==e&&1===r||t.append(r),0!==e&&(1===e?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()}}class We{add(t,e){return(t+e)%this.modulus}subtract(t,e){return(this.modulus+t-e)%this.modulus}exp(t){return this.expTable[t]}log(t){if(0===t)throw new h;return this.logTable[t]}inverse(t){if(0===t)throw new J;return this.expTable[this.modulus-this.logTable[t]-1]}multiply(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]}getSize(){return this.modulus}equals(t){return t===this}}class Ge extends We{constructor(t,e){super(),this.modulus=t,this.expTable=new Int32Array(t),this.logTable=new Int32Array(t);let r=1;for(let n=0;n<t;n++)this.expTable[n]=r,r=r*e%t;for(let n=0;n<t-1;n++)this.logTable[this.expTable[n]]=n;this.zero=new ze(this,new Int32Array([0])),this.one=new ze(this,new Int32Array([1]))}getZero(){return this.zero}getOne(){return this.one}buildMonomial(t,e){if(t<0)throw new h;if(0===e)return this.zero;let r=new Int32Array(t+1);return r[0]=e,new ze(this,r)}}Ge.PDF417_GF=new Ge(je.NUMBER_OF_CODEWORDS,3);class Ye{constructor(){this.field=Ge.PDF417_GF}decode(t,e,r){let n=new ze(this.field,t),i=new Int32Array(e),o=!1;for(let f=e;f>0;f--){let t=n.evaluateAt(this.field.exp(f));i[e-f]=t,0!==t&&(o=!0)}if(!o)return 0;let a=this.field.getOne();if(null!=r)for(const f of r){let e=this.field.exp(t.length-1-f),r=new ze(this.field,new Int32Array([this.field.subtract(0,e),1]));a=a.multiply(r)}let s=new ze(this.field,i),c=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),s,e),u=c[0],l=c[1],h=this.findErrorLocations(u),d=this.findErrorMagnitudes(l,u,h);for(let g=0;g<h.length;g++){let e=t.length-1-this.field.log(h[g]);if(e<0)throw f.getChecksumInstance();t[e]=this.field.subtract(t[e],d[g])}return h.length}runEuclideanAlgorithm(t,e,r){if(t.getDegree()<e.getDegree()){let r=t;t=e,e=r}let n=t,i=e,o=this.field.getZero(),a=this.field.getOne();while(i.getDegree()>=Math.round(r/2)){let t=n,e=o;if(n=i,o=a,n.isZero())throw f.getChecksumInstance();i=t;let r=this.field.getZero(),s=n.getCoefficient(n.getDegree()),c=this.field.inverse(s);while(i.getDegree()>=n.getDegree()&&!i.isZero()){let t=i.getDegree()-n.getDegree(),e=this.field.multiply(i.getCoefficient(i.getDegree()),c);r=r.add(this.field.buildMonomial(t,e)),i=i.subtract(n.multiplyByMonomial(t,e))}a=r.multiply(o).subtract(e).negative()}let s=a.getCoefficient(0);if(0===s)throw f.getChecksumInstance();let c=this.field.inverse(s),u=a.multiply(c),l=i.multiply(c);return[u,l]}findErrorLocations(t){let e=t.getDegree(),r=new Int32Array(e),n=0;for(let i=1;i<this.field.getSize()&&n<e;i++)0===t.evaluateAt(i)&&(r[n]=this.field.inverse(i),n++);if(n!==e)throw f.getChecksumInstance();return r}findErrorMagnitudes(t,e,r){let n=e.getDegree(),i=new Int32Array(n);for(let c=1;c<=n;c++)i[n-c]=this.field.multiply(c,e.getCoefficient(c));let o=new ze(this.field,i),a=r.length,s=new Int32Array(a);for(let c=0;c<a;c++){let e=this.field.inverse(r[c]),n=this.field.subtract(0,t.evaluateAt(e)),i=this.field.inverse(o.evaluateAt(e));s[c]=this.field.multiply(n,i)}return s}}class Xe{constructor(t,e,r,n,i){t instanceof Xe?this.constructor_2(t):this.constructor_1(t,e,r,n,i)}constructor_1(t,e,r,n,i){const o=null==e||null==r,a=null==n||null==i;if(o&&a)throw new O;o?(e=new st(0,n.getY()),r=new st(0,i.getY())):a&&(n=new st(t.getWidth()-1,e.getY()),i=new st(t.getWidth()-1,r.getY())),this.image=t,this.topLeft=e,this.bottomLeft=r,this.topRight=n,this.bottomRight=i,this.minX=Math.trunc(Math.min(e.getX(),r.getX())),this.maxX=Math.trunc(Math.max(n.getX(),i.getX())),this.minY=Math.trunc(Math.min(e.getY(),n.getY())),this.maxY=Math.trunc(Math.max(r.getY(),i.getY()))}constructor_2(t){this.image=t.image,this.topLeft=t.getTopLeft(),this.bottomLeft=t.getBottomLeft(),this.topRight=t.getTopRight(),this.bottomRight=t.getBottomRight(),this.minX=t.getMinX(),this.maxX=t.getMaxX(),this.minY=t.getMinY(),this.maxY=t.getMaxY()}static merge(t,e){return null==t?e:null==e?t:new Xe(t.image,t.topLeft,t.bottomLeft,e.topRight,e.bottomRight)}addMissingRows(t,e,r){let n=this.topLeft,i=this.bottomLeft,o=this.topRight,a=this.bottomRight;if(t>0){let e=r?this.topLeft:this.topRight,i=Math.trunc(e.getY()-t);i<0&&(i=0);let a=new st(e.getX(),i);r?n=a:o=a}if(e>0){let t=r?this.bottomLeft:this.bottomRight,n=Math.trunc(t.getY()+e);n>=this.image.getHeight()&&(n=this.image.getHeight()-1);let o=new st(t.getX(),n);r?i=o:a=o}return new Xe(this.image,n,i,o,a)}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 $e{constructor(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}getColumnCount(){return this.columnCount}getErrorCorrectionLevel(){return this.errorCorrectionLevel}getRowCount(){return this.rowCount}getRowCountUpperPart(){return this.rowCountUpperPart}getRowCountLowerPart(){return this.rowCountLowerPart}}class Ze{constructor(){this.buffer=""}static form(t,e){let r=-1;function n(t,n,i,o,a,s){if("%%"===t)return"%";if(void 0===e[++r])return;t=o?parseInt(o.substr(1)):void 0;let c,u=a?parseInt(a.substr(1)):void 0;switch(s){case"s":c=e[r];break;case"c":c=e[r][0];break;case"f":c=parseFloat(e[r]).toFixed(t);break;case"p":c=parseFloat(e[r]).toPrecision(t);break;case"e":c=parseFloat(e[r]).toExponential(t);break;case"x":c=parseInt(e[r]).toString(u||16);break;case"d":c=parseFloat(parseInt(e[r],u||10).toPrecision(t)).toFixed(0);break}c="object"===typeof c?JSON.stringify(c):(+c).toString(u);let l=parseInt(i),h=i&&i[0]+""==="0"?"0":" ";while(c.length<l)c=void 0!==n?c+h:h+c;return c}let i=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return t.replace(i,n)}format(t,...e){this.buffer+=Ze.form(t,e)}toString(){return this.buffer}}class Qe{constructor(t){this.boundingBox=new Xe(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}getCodewordNearby(t){let e=this.getCodeword(t);if(null!=e)return e;for(let r=1;r<Qe.MAX_NEARBY_DISTANCE;r++){let n=this.imageRowToCodewordIndex(t)-r;if(n>=0&&(e=this.codewords[n],null!=e))return e;if(n=this.imageRowToCodewordIndex(t)+r,n<this.codewords.length&&(e=this.codewords[n],null!=e))return e}return null}imageRowToCodewordIndex(t){return t-this.boundingBox.getMinY()}setCodeword(t,e){this.codewords[this.imageRowToCodewordIndex(t)]=e}getCodeword(t){return this.codewords[this.imageRowToCodewordIndex(t)]}getBoundingBox(){return this.boundingBox}getCodewords(){return this.codewords}toString(){const t=new Ze;let e=0;for(const r of this.codewords)null!=r?t.format("%3d: %3d|%3d%n",e++,r.getRowNumber(),r.getValue()):t.format("%3d: | %n",e++);return t.toString()}}Qe.MAX_NEARBY_DISTANCE=5;class qe{constructor(){this.values=new Map}setValue(t){t=Math.trunc(t);let e=this.values.get(t);null==e&&(e=0),e++,this.values.set(t,e)}getValue(){let t=-1,e=new Array;for(const[r,n]of this.values.entries()){const i={getKey:()=>r,getValue:()=>n};i.getValue()>t?(t=i.getValue(),e=[],e.push(i.getKey())):i.getValue()===t&&e.push(i.getKey())}return je.toIntArray(e)}getConfidence(t){return this.values.get(t)}}class Ke extends Qe{constructor(t,e){super(t),this._isLeft=e}setRowNumbers(){for(let t of this.getCodewords())null!=t&&t.setRowNumberAsRowIndicatorColumn()}adjustCompleteIndicatorColumnRowNumbers(t){let e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);let r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),i=this._isLeft?r.getBottomLeft():r.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.imageRowToCodewordIndex(Math.trunc(i.getY())),s=-1,c=1,u=0;for(let l=o;l<a;l++){if(null==e[l])continue;let r=e[l],n=r.getRowNumber()-s;if(0===n)u++;else if(1===n)c=Math.max(c,u),u=1,s=r.getRowNumber();else if(n<0||r.getRowNumber()>=t.getRowCount()||n>l)e[l]=null;else{let t;t=c>2?(c-2)*n:n;let i=t>=l;for(let r=1;r<=t&&!i;r++)i=null!=e[l-r];i?e[l]=null:(s=r.getRowNumber(),u=1)}}}getRowHeights(){let t=this.getBarcodeMetadata();if(null==t)return null;this.adjustIncompleteIndicatorColumnRowNumbers(t);let e=new Int32Array(t.getRowCount());for(let r of this.getCodewords())if(null!=r){let t=r.getRowNumber();if(t>=e.length)continue;e[t]++}return e}adjustIncompleteIndicatorColumnRowNumbers(t){let e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(r.getY())),o=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.getCodewords(),s=-1;for(let c=i;c<o;c++){if(null==a[c])continue;let e=a[c];e.setRowNumberAsRowIndicatorColumn();let r=e.getRowNumber()-s;0===r||(1===r?s=e.getRowNumber():e.getRowNumber()>=t.getRowCount()?a[c]=null:s=e.getRowNumber())}}getBarcodeMetadata(){let t=this.getCodewords(),e=new qe,r=new qe,n=new qe,i=new qe;for(let a of t){if(null==a)continue;a.setRowNumberAsRowIndicatorColumn();let t=a.getValue()%30,o=a.getRowNumber();switch(this._isLeft||(o+=2),o%3){case 0:r.setValue(3*t+1);break;case 1:i.setValue(t/3),n.setValue(t%3);break;case 2:e.setValue(t+1);break}}if(0===e.getValue().length||0===r.getValue().length||0===n.getValue().length||0===i.getValue().length||e.getValue()[0]<1||r.getValue()[0]+n.getValue()[0]<je.MIN_ROWS_IN_BARCODE||r.getValue()[0]+n.getValue()[0]>je.MAX_ROWS_IN_BARCODE)return null;let o=new $e(e.getValue()[0],r.getValue()[0],n.getValue()[0],i.getValue()[0]);return this.removeIncorrectCodewords(t,o),o}removeIncorrectCodewords(t,e){for(let r=0;r<t.length;r++){let n=t[r];if(null==t[r])continue;let i=n.getValue()%30,o=n.getRowNumber();if(o>e.getRowCount())t[r]=null;else switch(this._isLeft||(o+=2),o%3){case 0:3*i+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(i/3)===e.getErrorCorrectionLevel()&&i%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:i+1!==e.getColumnCount()&&(t[r]=null);break}}}isLeft(){return this._isLeft}toString(){return"IsLeft: "+this._isLeft+"\n"+super.toString()}}class Je{constructor(t,e){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=t,this.barcodeColumnCount=t.getColumnCount(),this.boundingBox=e,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}getDetectionResultColumns(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);let t,e=je.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e<t);return this.detectionResultColumns}adjustIndicatorColumnRowNumbers(t){null!=t&&t.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)}adjustRowNumbersAndGetCount(){let t=this.adjustRowNumbersByRow();if(0===t)return 0;for(let e=1;e<this.barcodeColumnCount+1;e++){let t=this.detectionResultColumns[e].getCodewords();for(let r=0;r<t.length;r++)null!=t[r]&&(t[r].hasValidRowNumber()||this.adjustRowNumbers(e,r,t))}return t}adjustRowNumbersByRow(){this.adjustRowNumbersFromBothRI();let t=this.adjustRowNumbersFromLRI();return t+this.adjustRowNumbersFromRRI()}adjustRowNumbersFromBothRI(){if(null==this.detectionResultColumns[0]||null==this.detectionResultColumns[this.barcodeColumnCount+1])return;let t=this.detectionResultColumns[0].getCodewords(),e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords();for(let r=0;r<t.length;r++)if(null!=t[r]&&null!=e[r]&&t[r].getRowNumber()===e[r].getRowNumber())for(let e=1;e<=this.barcodeColumnCount;e++){let n=this.detectionResultColumns[e].getCodewords()[r];null!=n&&(n.setRowNumber(t[r].getRowNumber()),n.hasValidRowNumber()||(this.detectionResultColumns[e].getCodewords()[r]=null))}}adjustRowNumbersFromRRI(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;let t=0,e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords();for(let r=0;r<e.length;r++){if(null==e[r])continue;let n=e[r].getRowNumber(),i=0;for(let e=this.barcodeColumnCount+1;e>0&&i<this.ADJUST_ROW_NUMBER_SKIP;e--){let o=this.detectionResultColumns[e].getCodewords()[r];null!=o&&(i=Je.adjustRowNumberIfValid(n,i,o),o.hasValidRowNumber()||t++)}}return t}adjustRowNumbersFromLRI(){if(null==this.detectionResultColumns[0])return 0;let t=0,e=this.detectionResultColumns[0].getCodewords();for(let r=0;r<e.length;r++){if(null==e[r])continue;let n=e[r].getRowNumber(),i=0;for(let e=1;e<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;e++){let o=this.detectionResultColumns[e].getCodewords()[r];null!=o&&(i=Je.adjustRowNumberIfValid(n,i,o),o.hasValidRowNumber()||t++)}}return t}static adjustRowNumberIfValid(t,e,r){return null==r||r.hasValidRowNumber()||(r.isValidRowNumber(t)?(r.setRowNumber(t),e=0):++e),e}adjustRowNumbers(t,e,r){if(!this.detectionResultColumns[t-1])return;let n=r[e],i=this.detectionResultColumns[t-1].getCodewords(),o=i;null!=this.detectionResultColumns[t+1]&&(o=this.detectionResultColumns[t+1].getCodewords());let a=new Array(14);a[2]=i[e],a[3]=o[e],e>0&&(a[0]=r[e-1],a[4]=i[e-1],a[5]=o[e-1]),e>1&&(a[8]=r[e-2],a[10]=i[e-2],a[11]=o[e-2]),e<r.length-1&&(a[1]=r[e+1],a[6]=i[e+1],a[7]=o[e+1]),e<r.length-2&&(a[9]=r[e+2],a[12]=i[e+2],a[13]=o[e+2]);for(let s of a)if(Je.adjustRowNumber(n,s))return}static adjustRowNumber(t,e){return null!=e&&(!(!e.hasValidRowNumber()||e.getBucket()!==t.getBucket())&&(t.setRowNumber(e.getRowNumber()),!0))}getBarcodeColumnCount(){return this.barcodeColumnCount}getBarcodeRowCount(){return this.barcodeMetadata.getRowCount()}getBarcodeECLevel(){return this.barcodeMetadata.getErrorCorrectionLevel()}setBoundingBox(t){this.boundingBox=t}getBoundingBox(){return this.boundingBox}setDetectionResultColumn(t,e){this.detectionResultColumns[t]=e}getDetectionResultColumn(t){return this.detectionResultColumns[t]}toString(){let t=this.detectionResultColumns[0];null==t&&(t=this.detectionResultColumns[this.barcodeColumnCount+1]);let e=new Ze;for(let r=0;r<t.getCodewords().length;r++){e.format("CW %3d:",r);for(let t=0;t<this.barcodeColumnCount+2;t++){if(null==this.detectionResultColumns[t]){e.format(" | ");continue}let n=this.detectionResultColumns[t].getCodewords()[r];null!=n?e.format(" %3d|%3d",n.getRowNumber(),n.getValue()):e.format(" | ")}e.format("%n")}return e.toString()}}class tr{constructor(t,e,r,n){this.rowNumber=tr.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(t),this.endX=Math.trunc(e),this.bucket=Math.trunc(r),this.value=Math.trunc(n)}hasValidRowNumber(){return this.isValidRowNumber(this.rowNumber)}isValidRowNumber(t){return t!==tr.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}}tr.BARCODE_ROW_UNKNOWN=-1;class er{static initialize(){for(let t=0;t<je.SYMBOL_TABLE.length;t++){let e=je.SYMBOL_TABLE[t],r=1&e;for(let n=0;n<je.BARS_IN_MODULE;n++){let i=0;while((1&e)===r)i+=1,e>>=1;r=1&e,er.RATIOS_TABLE[t]||(er.RATIOS_TABLE[t]=new Array(je.BARS_IN_MODULE)),er.RATIOS_TABLE[t][je.BARS_IN_MODULE-n-1]=Math.fround(i/je.MODULES_IN_CODEWORD)}}this.bSymbolTableReady=!0}static getDecodedValue(t){let e=er.getDecodedCodewordValue(er.sampleBitCounts(t));return-1!==e?e:er.getClosestDecodedValue(t)}static sampleBitCounts(t){let e=ot.sum(t),r=new Int32Array(je.BARS_IN_MODULE),n=0,i=0;for(let o=0;o<je.MODULES_IN_CODEWORD;o++){let a=e/(2*je.MODULES_IN_CODEWORD)+o*e/je.MODULES_IN_CODEWORD;i+t[n]<=a&&(i+=t[n],n++),r[n]++}return r}static getDecodedCodewordValue(t){let e=er.getBitValue(t);return-1===je.getCodeword(e)?-1:e}static getBitValue(t){let e=0;for(let r=0;r<t.length;r++)for(let n=0;n<t[r];n++)e=e<<1|(r%2===0?1:0);return Math.trunc(e)}static getClosestDecodedValue(t){let e=ot.sum(t),r=new Array(je.BARS_IN_MODULE);if(e>1)for(let o=0;o<r.length;o++)r[o]=Math.fround(t[o]/e);let n=at.MAX_VALUE,i=-1;this.bSymbolTableReady||er.initialize();for(let o=0;o<er.RATIOS_TABLE.length;o++){let t=0,e=er.RATIOS_TABLE[o];for(let i=0;i<je.BARS_IN_MODULE;i++){let o=Math.fround(e[i]-r[i]);if(t+=Math.fround(o*o),t>=n)break}t<n&&(n=t,i=je.SYMBOL_TABLE[o])}return i}}er.bSymbolTableReady=!1,er.RATIOS_TABLE=new Array(je.SYMBOL_TABLE.length).map(t=>new Array(je.BARS_IN_MODULE));class rr{constructor(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}getSegmentIndex(){return this.segmentIndex}setSegmentIndex(t){this.segmentIndex=t}getFileId(){return this.fileId}setFileId(t){this.fileId=t}getOptionalData(){return this.optionalData}setOptionalData(t){this.optionalData=t}isLastSegment(){return this.lastSegment}setLastSegment(t){this.lastSegment=t}getSegmentCount(){return this.segmentCount}setSegmentCount(t){this.segmentCount=t}getSender(){return this.sender||null}setSender(t){this.sender=t}getAddressee(){return this.addressee||null}setAddressee(t){this.addressee=t}getFileName(){return this.fileName}setFileName(t){this.fileName=t}getFileSize(){return this.fileSize}setFileSize(t){this.fileSize=t}getChecksum(){return this.checksum}setChecksum(t){this.checksum=t}getTimestamp(){return this.timestamp}setTimestamp(t){this.timestamp=t}}class nr{static parseLong(t,e){return parseInt(t,e)}}class ir extends u{}ir.kind="NullPointerException";class or{writeBytes(t){this.writeBytesOffset(t,0,t.length)}writeBytesOffset(t,e,r){if(null==t)throw new ir;if(e<0||e>t.length||r<0||e+r>t.length||e+r<0)throw new m;if(0!==r)for(let n=0;n<r;n++)this.write(t[e+n])}flush(){}close(){}}class ar extends u{}class sr extends or{constructor(t=32){if(super(),this.count=0,t<0)throw new h("Negative initial size: "+t);this.buf=new Uint8Array(t)}ensureCapacity(t){t-this.buf.length>0&&this.grow(t)}grow(t){let e=this.buf.length,r=e<<1;if(r-t<0&&(r=t),r<0){if(t<0)throw new ar;r=E.MAX_VALUE}this.buf=y.copyOfUint8Array(this.buf,r)}write(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1}writeBytesOffset(t,e,r){if(e<0||e>t.length||r<0||e+r-t.length>0)throw new m;this.ensureCapacity(this.count+r),p.arraycopy(t,e,this.buf,this.count,r),this.count+=r}writeTo(t){t.writeBytesOffset(this.buf,0,this.count)}reset(){this.count=0}toByteArray(){return y.copyOfUint8Array(this.buf,this.count)}size(){return this.count}toString(t){return t?"string"===typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()}toString_void(){return new String(this.buf).toString()}toString_string(t){return new String(this.buf).toString()}toString_number(t){return new String(this.buf).toString()}close(){}}function cr(){if("undefined"!==typeof window)return window["BigInt"]||null;if("undefined"!==typeof t)return t["BigInt"]||null;if("undefined"!==typeof self)return self["BigInt"]||null;throw new Error("Can't search globals for BigInt!")}let ur;function lr(t){if("undefined"===typeof ur&&(ur=cr()),null===ur)throw new Error("BigInt is not supported!");return ur(t)}function hr(){let t=[];t[0]=lr(1);let e=lr(900);t[1]=e;for(let r=2;r<16;r++)t[r]=t[r-1]*e;return t}(function(t){t[t["ALPHA"]=0]="ALPHA",t[t["LOWER"]=1]="LOWER",t[t["MIXED"]=2]="MIXED",t[t["PUNCT"]=3]="PUNCT",t[t["ALPHA_SHIFT"]=4]="ALPHA_SHIFT",t[t["PUNCT_SHIFT"]=5]="PUNCT_SHIFT"})($||($={}));class dr{static decode(t,e){let r=new R(""),n=b.ISO8859_1;r.enableDecoding(n);let i=1,o=t[i++],a=new rr;while(i<t[0]){switch(o){case dr.TEXT_COMPACTION_MODE_LATCH:i=dr.textCompaction(t,i,r);break;case dr.BYTE_COMPACTION_MODE_LATCH:case dr.BYTE_COMPACTION_MODE_LATCH_6:i=dr.byteCompaction(o,t,n,i,r);break;case dr.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:r.append(t[i++]);break;case dr.NUMERIC_COMPACTION_MODE_LATCH:i=dr.numericCompaction(t,i,r);break;case dr.ECI_CHARSET:b.getCharacterSetECIByValue(t[i++]);break;case dr.ECI_GENERAL_PURPOSE:i+=2;break;case dr.ECI_USER_DEFINED:i++;break;case dr.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=dr.decodeMacroBlock(t,i,a);break;case dr.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case dr.MACRO_PDF417_TERMINATOR:throw new v;default:i--,i=dr.textCompaction(t,i,r);break}if(!(i<t.length))throw v.getFormatInstance();o=t[i++]}if(0===r.length())throw v.getFormatInstance();let s=new Q(null,r.toString(),null,e);return s.setOther(a),s}static decodeMacroBlock(t,e,r){if(e+dr.NUMBER_OF_SEQUENCE_CODEWORDS>t[0])throw v.getFormatInstance();let n=new Int32Array(dr.NUMBER_OF_SEQUENCE_CODEWORDS);for(let a=0;a<dr.NUMBER_OF_SEQUENCE_CODEWORDS;a++,e++)n[a]=t[e];r.setSegmentIndex(E.parseInt(dr.decodeBase900toBase10(n,dr.NUMBER_OF_SEQUENCE_CODEWORDS)));let i=new R;e=dr.textCompaction(t,e,i),r.setFileId(i.toString());let o=-1;t[e]===dr.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(o=e+1);while(e<t[0])switch(t[e]){case dr.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e++,t[e]){case dr.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:let n=new R;e=dr.textCompaction(t,e+1,n),r.setFileName(n.toString());break;case dr.MACRO_PDF417_OPTIONAL_FIELD_SENDER:let i=new R;e=dr.textCompaction(t,e+1,i),r.setSender(i.toString());break;case dr.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:let o=new R;e=dr.textCompaction(t,e+1,o),r.setAddressee(o.toString());break;case dr.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:let a=new R;e=dr.numericCompaction(t,e+1,a),r.setSegmentCount(E.parseInt(a.toString()));break;case dr.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:let s=new R;e=dr.numericCompaction(t,e+1,s),r.setTimestamp(nr.parseLong(s.toString()));break;case dr.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:let c=new R;e=dr.numericCompaction(t,e+1,c),r.setChecksum(E.parseInt(c.toString()));break;case dr.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:let u=new R;e=dr.numericCompaction(t,e+1,u),r.setFileSize(nr.parseLong(u.toString()));break;default:throw v.getFormatInstance()}break;case dr.MACRO_PDF417_TERMINATOR:e++,r.setLastSegment(!0);break;default:throw v.getFormatInstance()}if(-1!==o){let n=e-o;r.isLastSegment()&&n--,r.setOptionalData(y.copyOfRange(t,o,o+n))}return e}static textCompaction(t,e,r){let n=new Int32Array(2*(t[0]-e)),i=new Int32Array(2*(t[0]-e)),o=0,a=!1;while(e<t[0]&&!a){let r=t[e++];if(r<dr.TEXT_COMPACTION_MODE_LATCH)n[o]=r/30,n[o+1]=r%30,o+=2;else switch(r){case dr.TEXT_COMPACTION_MODE_LATCH:n[o++]=dr.TEXT_COMPACTION_MODE_LATCH;break;case dr.BYTE_COMPACTION_MODE_LATCH:case dr.BYTE_COMPACTION_MODE_LATCH_6:case dr.NUMERIC_COMPACTION_MODE_LATCH:case dr.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case dr.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case dr.MACRO_PDF417_TERMINATOR:e--,a=!0;break;case dr.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n[o]=dr.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,r=t[e++],i[o]=r,o++;break}}return dr.decodeTextCompaction(n,i,o,r),e}static decodeTextCompaction(t,e,r,n){let i=$.ALPHA,o=$.ALPHA,a=0;while(a<r){let r=t[a],s="";switch(i){case $.ALPHA:if(r<26)s=String.fromCharCode(65+r);else switch(r){case 26:s=" ";break;case dr.LL:i=$.LOWER;break;case dr.ML:i=$.MIXED;break;case dr.PS:o=i,i=$.PUNCT_SHIFT;break;case dr.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[a]);break;case dr.TEXT_COMPACTION_MODE_LATCH:i=$.ALPHA;break}break;case $.LOWER:if(r<26)s=String.fromCharCode(97+r);else switch(r){case 26:s=" ";break;case dr.AS:o=i,i=$.ALPHA_SHIFT;break;case dr.ML:i=$.MIXED;break;case dr.PS:o=i,i=$.PUNCT_SHIFT;break;case dr.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[a]);break;case dr.TEXT_COMPACTION_MODE_LATCH:i=$.ALPHA;break}break;case $.MIXED:if(r<dr.PL)s=dr.MIXED_CHARS[r];else switch(r){case dr.PL:i=$.PUNCT;break;case 26:s=" ";break;case dr.LL:i=$.LOWER;break;case dr.AL:i=$.ALPHA;break;case dr.PS:o=i,i=$.PUNCT_SHIFT;break;case dr.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[a]);break;case dr.TEXT_COMPACTION_MODE_LATCH:i=$.ALPHA;break}break;case $.PUNCT:if(r<dr.PAL)s=dr.PUNCT_CHARS[r];else switch(r){case dr.PAL:i=$.ALPHA;break;case dr.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[a]);break;case dr.TEXT_COMPACTION_MODE_LATCH:i=$.ALPHA;break}break;case $.ALPHA_SHIFT:if(i=o,r<26)s=String.fromCharCode(65+r);else switch(r){case 26:s=" ";break;case dr.TEXT_COMPACTION_MODE_LATCH:i=$.ALPHA;break}break;case $.PUNCT_SHIFT:if(i=o,r<dr.PAL)s=dr.PUNCT_CHARS[r];else switch(r){case dr.PAL:i=$.ALPHA;break;case dr.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[a]);break;case dr.TEXT_COMPACTION_MODE_LATCH:i=$.ALPHA;break}break}""!==s&&n.append(s),a++}}static byteCompaction(t,e,r,n,i){let o=new sr,a=0,s=0,c=!1;switch(t){case dr.BYTE_COMPACTION_MODE_LATCH:let t=new Int32Array(6),r=e[n++];while(n<e[0]&&!c)switch(t[a++]=r,s=900*s+r,r=e[n++],r){case dr.TEXT_COMPACTION_MODE_LATCH:case dr.BYTE_COMPACTION_MODE_LATCH:case dr.NUMERIC_COMPACTION_MODE_LATCH:case dr.BYTE_COMPACTION_MODE_LATCH_6:case dr.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case dr.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case dr.MACRO_PDF417_TERMINATOR:n--,c=!0;break;default:if(a%5===0&&a>0){for(let t=0;t<6;++t)o.write(Number(lr(s)>>lr(8*(5-t))));s=0,a=0}break}n===e[0]&&r<dr.TEXT_COMPACTION_MODE_LATCH&&(t[a++]=r);for(let e=0;e<a;e++)o.write(t[e]);break;case dr.BYTE_COMPACTION_MODE_LATCH_6:while(n<e[0]&&!c){let t=e[n++];if(t<dr.TEXT_COMPACTION_MODE_LATCH)a++,s=900*s+t;else switch(t){case dr.TEXT_COMPACTION_MODE_LATCH:case dr.BYTE_COMPACTION_MODE_LATCH:case dr.NUMERIC_COMPACTION_MODE_LATCH:case dr.BYTE_COMPACTION_MODE_LATCH_6:case dr.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case dr.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case dr.MACRO_PDF417_TERMINATOR:n--,c=!0;break}if(a%5===0&&a>0){for(let t=0;t<6;++t)o.write(Number(lr(s)>>lr(8*(5-t))));s=0,a=0}}break}return i.append(_.decode(o.toByteArray(),r)),n}static numericCompaction(t,e,r){let n=0,i=!1,o=new Int32Array(dr.MAX_NUMERIC_CODEWORDS);while(e<t[0]&&!i){let a=t[e++];if(e===t[0]&&(i=!0),a<dr.TEXT_COMPACTION_MODE_LATCH)o[n]=a,n++;else switch(a){case dr.TEXT_COMPACTION_MODE_LATCH:case dr.BYTE_COMPACTION_MODE_LATCH:case dr.BYTE_COMPACTION_MODE_LATCH_6:case dr.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case dr.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case dr.MACRO_PDF417_TERMINATOR:e--,i=!0;break}(n%dr.MAX_NUMERIC_CODEWORDS===0||a===dr.NUMERIC_COMPACTION_MODE_LATCH||i)&&n>0&&(r.append(dr.decodeBase900toBase10(o,n)),n=0)}return e}static decodeBase900toBase10(t,e){let r=lr(0);for(let i=0;i<e;i++)r+=dr.EXP900[e-i-1]*lr(t[i]);let n=r.toString();if("1"!==n.charAt(0))throw new v;return n.substring(1)}}dr.TEXT_COMPACTION_MODE_LATCH=900,dr.BYTE_COMPACTION_MODE_LATCH=901,dr.NUMERIC_COMPACTION_MODE_LATCH=902,dr.BYTE_COMPACTION_MODE_LATCH_6=924,dr.ECI_USER_DEFINED=925,dr.ECI_GENERAL_PURPOSE=926,dr.ECI_CHARSET=927,dr.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,dr.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,dr.MACRO_PDF417_TERMINATOR=922,dr.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,dr.MAX_NUMERIC_CODEWORDS=15,dr.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,dr.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,dr.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,dr.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,dr.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,dr.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,dr.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,dr.PL=25,dr.LL=27,dr.AS=27,dr.ML=28,dr.AL=28,dr.PS=29,dr.PAL=29,dr.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",dr.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",dr.EXP900=cr()?hr():[],dr.NUMBER_OF_SEQUENCE_CODEWORDS=2;class fr{constructor(){}static decode(t,e,r,n,i,o,a){let s,c=new Xe(t,e,r,n,i),u=null,l=null;for(let f=!0;;f=!1){if(null!=e&&(u=fr.getRowIndicatorColumn(t,c,e,!0,o,a)),null!=n&&(l=fr.getRowIndicatorColumn(t,c,n,!1,o,a)),s=fr.merge(u,l),null==s)throw O.getNotFoundInstance();let r=s.getBoundingBox();if(!f||null==r||!(r.getMinY()<c.getMinY()||r.getMaxY()>c.getMaxY()))break;c=r}s.setBoundingBox(c);let h=s.getBarcodeColumnCount()+1;s.setDetectionResultColumn(0,u),s.setDetectionResultColumn(h,l);let d=null!=u;for(let f=1;f<=h;f++){let e,r=d?f:h-f;if(void 0!==s.getDetectionResultColumn(r))continue;e=0===r||r===h?new Ke(c,0===r):new Qe(c),s.setDetectionResultColumn(r,e);let n=-1,i=n;for(let u=c.getMinY();u<=c.getMaxY();u++){if(n=fr.getStartColumn(s,r,u,d),n<0||n>c.getMaxX()){if(-1===i)continue;n=i}let l=fr.detectCodeword(t,c.getMinX(),c.getMaxX(),d,n,u,o,a);null!=l&&(e.setCodeword(u,l),i=n,o=Math.min(o,l.getWidth()),a=Math.max(a,l.getWidth()))}}return fr.createDecoderResult(s)}static merge(t,e){if(null==t&&null==e)return null;let r=fr.getBarcodeMetadata(t,e);if(null==r)return null;let n=Xe.merge(fr.adjustBoundingBox(t),fr.adjustBoundingBox(e));return new Je(r,n)}static adjustBoundingBox(t){if(null==t)return null;let e=t.getRowHeights();if(null==e)return null;let r=fr.getMax(e),n=0;for(let a of e)if(n+=r-a,a>0)break;let i=t.getCodewords();for(let a=0;n>0&&null==i[a];a++)n--;let o=0;for(let a=e.length-1;a>=0;a--)if(o+=r-e[a],e[a]>0)break;for(let a=i.length-1;o>0&&null==i[a];a--)o--;return t.getBoundingBox().addMissingRows(n,o,t.isLeft())}static getMax(t){let e=-1;for(let r of t)e=Math.max(e,r);return e}static getBarcodeMetadata(t,e){let r,n;return null==t||null==(r=t.getBarcodeMetadata())?null==e?null:e.getBarcodeMetadata():null==e||null==(n=e.getBarcodeMetadata())?r:r.getColumnCount()!==n.getColumnCount()&&r.getErrorCorrectionLevel()!==n.getErrorCorrectionLevel()&&r.getRowCount()!==n.getRowCount()?null:r}static getRowIndicatorColumn(t,e,r,n,i,o){let a=new Ke(e,n);for(let s=0;s<2;s++){let c=0===s?1:-1,u=Math.trunc(Math.trunc(r.getX()));for(let s=Math.trunc(Math.trunc(r.getY()));s<=e.getMaxY()&&s>=e.getMinY();s+=c){let e=fr.detectCodeword(t,0,t.getWidth(),n,u,s,i,o);null!=e&&(a.setCodeword(s,e),u=n?e.getStartX():e.getEndX())}}return a}static adjustCodewordCount(t,e){let r=e[0][1],n=r.getValue(),i=t.getBarcodeColumnCount()*t.getBarcodeRowCount()-fr.getNumberOfECCodeWords(t.getBarcodeECLevel());if(0===n.length){if(i<1||i>je.MAX_CODEWORDS_IN_BARCODE)throw O.getNotFoundInstance();r.setValue(i)}else n[0]!==i&&r.setValue(i)}static createDecoderResult(t){let e=fr.createBarcodeMatrix(t);fr.adjustCodewordCount(t,e);let r=new Array,n=new Int32Array(t.getBarcodeRowCount()*t.getBarcodeColumnCount()),i=[],o=new Array;for(let s=0;s<t.getBarcodeRowCount();s++)for(let a=0;a<t.getBarcodeColumnCount();a++){let c=e[s][a+1].getValue(),u=s*t.getBarcodeColumnCount()+a;0===c.length?r.push(u):1===c.length?n[u]=c[0]:(o.push(u),i.push(c))}let a=new Array(i.length);for(let s=0;s<a.length;s++)a[s]=i[s];return fr.createDecoderResultFromAmbiguousValues(t.getBarcodeECLevel(),n,je.toIntArray(r),je.toIntArray(o),a)}static createDecoderResultFromAmbiguousValues(t,e,r,n,i){let o=new Int32Array(n.length),a=100;while(a-- >0){for(let t=0;t<o.length;t++)e[n[t]]=i[t][o[t]];try{return fr.decodeCodewords(e,t,r)}catch(s){let t=s instanceof f;if(!t)throw s}if(0===o.length)throw f.getChecksumInstance();for(let t=0;t<o.length;t++){if(o[t]<i[t].length-1){o[t]++;break}if(o[t]=0,t===o.length-1)throw f.getChecksumInstance()}}throw f.getChecksumInstance()}static createBarcodeMatrix(t){let e=Array.from({length:t.getBarcodeRowCount()},()=>new Array(t.getBarcodeColumnCount()+2));for(let n=0;n<e.length;n++)for(let t=0;t<e[n].length;t++)e[n][t]=new qe;let r=0;for(let n of t.getDetectionResultColumns()){if(null!=n)for(let t of n.getCodewords())if(null!=t){let n=t.getRowNumber();if(n>=0){if(n>=e.length)continue;e[n][r].setValue(t.getValue())}}r++}return e}static isValidBarcodeColumn(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1}static getStartColumn(t,e,r,n){let i=n?1:-1,o=null;if(fr.isValidBarcodeColumn(t,e-i)&&(o=t.getDetectionResultColumn(e-i).getCodeword(r)),null!=o)return n?o.getEndX():o.getStartX();if(o=t.getDetectionResultColumn(e).getCodewordNearby(r),null!=o)return n?o.getStartX():o.getEndX();if(fr.isValidBarcodeColumn(t,e-i)&&(o=t.getDetectionResultColumn(e-i).getCodewordNearby(r)),null!=o)return n?o.getEndX():o.getStartX();let a=0;while(fr.isValidBarcodeColumn(t,e-i)){e-=i;for(let r of t.getDetectionResultColumn(e).getCodewords())if(null!=r)return(n?r.getEndX():r.getStartX())+i*a*(r.getEndX()-r.getStartX());a++}return n?t.getBoundingBox().getMinX():t.getBoundingBox().getMaxX()}static detectCodeword(t,e,r,n,i,o,a,s){i=fr.adjustCodewordStartColumn(t,e,r,n,i,o);let c,u=fr.getModuleBitCount(t,e,r,n,i,o);if(null==u)return null;let l=ot.sum(u);if(n)c=i+l;else{for(let t=0;t<u.length/2;t++){let e=u[t];u[t]=u[u.length-1-t],u[u.length-1-t]=e}c=i,i=c-l}if(!fr.checkCodewordSkew(l,a,s))return null;let h=er.getDecodedValue(u),d=je.getCodeword(h);return-1===d?null:new tr(i,c,fr.getCodewordBucketNumber(h),d)}static getModuleBitCount(t,e,r,n,i,o){let a=i,s=new Int32Array(8),c=0,u=n?1:-1,l=n;while((n?a<r:a>=e)&&c<s.length)t.get(a,o)===l?(s[c]++,a+=u):(c++,l=!l);return c===s.length||a===(n?r:e)&&c===s.length-1?s:null}static getNumberOfECCodeWords(t){return 2<<t}static adjustCodewordStartColumn(t,e,r,n,i,o){let a=i,s=n?-1:1;for(let c=0;c<2;c++){while((n?a>=e:a<r)&&n===t.get(a,o)){if(Math.abs(i-a)>fr.CODEWORD_SKEW_SIZE)return i;a+=s}s=-s,n=!n}return a}static checkCodewordSkew(t,e,r){return e-fr.CODEWORD_SKEW_SIZE<=t&&t<=r+fr.CODEWORD_SKEW_SIZE}static decodeCodewords(t,e,r){if(0===t.length)throw v.getFormatInstance();let n=1<<e+1,i=fr.correctErrors(t,r,n);fr.verifyCodewordCount(t,n);let o=dr.decode(t,""+e);return o.setErrorsCorrected(i),o.setErasures(r.length),o}static correctErrors(t,e,r){if(null!=e&&e.length>r/2+fr.MAX_ERRORS||r<0||r>fr.MAX_EC_CODEWORDS)throw f.getChecksumInstance();return fr.errorCorrection.decode(t,r,e)}static verifyCodewordCount(t,e){if(t.length<4)throw v.getFormatInstance();let r=t[0];if(r>t.length)throw v.getFormatInstance();if(0===r){if(!(e<t.length))throw v.getFormatInstance();t[0]=t.length-e}}static getBitCountForCodeword(t){let e=new Int32Array(8),r=0,n=e.length-1;while(1){if((1&t)!==r&&(r=1&t,n--,n<0))break;e[n]++,t>>=1}return e}static getCodewordBucketNumber(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)}static getCodewordBucketNumber_number(t){return fr.getCodewordBucketNumber(fr.getBitCountForCodeword(t))}static getCodewordBucketNumber_Int32Array(t){return(t[0]-t[2]+t[4]-t[6]+9)%9}static toString(t){let e=new Ze;for(let r=0;r<t.length;r++){e.format("Row %2d: ",r);for(let n=0;n<t[r].length;n++){let i=t[r][n];0===i.getValue().length?e.format(" ",null):e.format("%4d(%2d)",i.getValue()[0],i.getConfidence(i.getValue()[0]))}e.format("%n")}return e.toString()}}fr.CODEWORD_SKEW_SIZE=2,fr.MAX_ERRORS=3,fr.MAX_EC_CODEWORDS=512,fr.errorCorrection=new Ye;class gr{decode(t,e=null){let r=gr.decode(t,e,!1);if(null==r||0===r.length||null==r[0])throw O.getNotFoundInstance();return r[0]}decodeMultiple(t,e=null){try{return gr.decode(t,e,!0)}catch(r){if(r instanceof v||r instanceof f)throw O.getNotFoundInstance();throw r}}static decode(t,e,r){const n=new Array,i=Ve.detectMultiple(t,e,r);for(const o of i.getPoints()){const t=fr.decode(i.getBits(),o[4],o[5],o[6],o[7],gr.getMinCodewordWidth(o),gr.getMaxCodewordWidth(o)),e=new j(t.getText(),t.getRawBytes(),void 0,o,V.PDF_417);e.putMetadata(Z.ERROR_CORRECTION_LEVEL,t.getECLevel());const r=t.getOther();null!=r&&e.putMetadata(Z.PDF417_EXTRA_METADATA,r),n.push(e)}return n.map(t=>t)}static getMaxWidth(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))}static getMinWidth(t,e){return null==t||null==e?E.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))}static getMaxCodewordWidth(t){return Math.floor(Math.max(Math.max(gr.getMaxWidth(t[0],t[4]),gr.getMaxWidth(t[6],t[2])*je.MODULES_IN_CODEWORD/je.MODULES_IN_STOP_PATTERN),Math.max(gr.getMaxWidth(t[1],t[5]),gr.getMaxWidth(t[7],t[3])*je.MODULES_IN_CODEWORD/je.MODULES_IN_STOP_PATTERN)))}static getMinCodewordWidth(t){return Math.floor(Math.min(Math.min(gr.getMinWidth(t[0],t[4]),gr.getMinWidth(t[6],t[2])*je.MODULES_IN_CODEWORD/je.MODULES_IN_STOP_PATTERN),Math.min(gr.getMinWidth(t[1],t[5]),gr.getMinWidth(t[7],t[3])*je.MODULES_IN_CODEWORD/je.MODULES_IN_STOP_PATTERN)))}reset(){}}class pr extends u{}pr.kind="ReaderException";class mr{constructor(t,e){this.verbose=!0===t,e&&this.setHints(e)}decode(t,e){return e&&this.setHints(e),this.decodeInternal(t)}decodeWithState(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)}setHints(t){this.hints=t;const e=!r(t)&&!0===t.get(S.TRY_HARDER),n=r(t)?null:t.get(S.POSSIBLE_FORMATS),i=new Array;if(!r(n)){const r=n.some(t=>t===V.UPC_A||t===V.UPC_E||t===V.EAN_13||t===V.EAN_8||t===V.CODABAR||t===V.CODE_39||t===V.CODE_93||t===V.CODE_128||t===V.ITF||t===V.RSS_14||t===V.RSS_EXPANDED);r&&!e&&i.push(new ce(t,this.verbose)),n.includes(V.QR_CODE)&&i.push(new Ue),n.includes(V.DATA_MATRIX)&&i.push(new Ee),n.includes(V.AZTEC)&&i.push(new wt),n.includes(V.PDF_417)&&i.push(new gr),r&&e&&i.push(new ce(t,this.verbose))}0===i.length&&(e||i.push(new ce(t,this.verbose)),i.push(new Ue),i.push(new Ee),i.push(new wt),i.push(new gr),e&&i.push(new ce(t,this.verbose))),this.readers=i}reset(){if(null!==this.readers)for(const t of this.readers)t.reset()}decodeInternal(t){if(null===this.readers)throw new pr("No readers where selected, nothing can be read.");for(const r of this.readers)try{return r.decode(t,this.hints)}catch(e){if(e instanceof pr)continue}throw new O("No MultiFormat Readers were able to detect the code.")}}class wr extends U{constructor(t=null,e=500){const r=new mr;r.setHints(t),super(r,e)}decodeBitmap(t){return this.reader.decodeWithState(t)}}class yr extends U{constructor(t=500){super(new gr,t)}}class Er extends U{constructor(t=500){super(new Ue,t)}}var Cr;(function(t){t[t["ERROR_CORRECTION"]=0]="ERROR_CORRECTION",t[t["CHARACTER_SET"]=1]="CHARACTER_SET",t[t["DATA_MATRIX_SHAPE"]=2]="DATA_MATRIX_SHAPE",t[t["MIN_SIZE"]=3]="MIN_SIZE",t[t["MAX_SIZE"]=4]="MAX_SIZE",t[t["MARGIN"]=5]="MARGIN",t[t["PDF417_COMPACT"]=6]="PDF417_COMPACT",t[t["PDF417_COMPACTION"]=7]="PDF417_COMPACTION",t[t["PDF417_DIMENSIONS"]=8]="PDF417_DIMENSIONS",t[t["AZTEC_LAYERS"]=9]="AZTEC_LAYERS",t[t["QR_VERSION"]=10]="QR_VERSION"})(Cr||(Cr={}));var Ar=Cr;class Sr{constructor(t){this.field=t,this.cachedGenerators=[],this.cachedGenerators.push(new K(t,Int32Array.from([1])))}buildGenerator(t){const e=this.cachedGenerators;if(t>=e.length){let r=e[e.length-1];const n=this.field;for(let i=e.length;i<=t;i++){const t=r.multiply(new K(n,Int32Array.from([1,n.exp(i-1+n.getGeneratorBase())])));e.push(t),r=t}}return e[t]}encode(t,e){if(0===e)throw new h("No error correction bytes");const r=t.length-e;if(r<=0)throw new h("No data bytes provided");const n=this.buildGenerator(e),i=new Int32Array(r);p.arraycopy(t,0,i,0,r);let o=new K(this.field,i);o=o.multiplyByMonomial(e,1);const a=o.divide(n)[1],s=a.getCoefficients(),c=e-s.length;for(let u=0;u<c;u++)t[r+u]=0;p.arraycopy(s,0,t,r+c,s.length)}}class vr{constructor(){}static applyMaskPenaltyRule1(t){return vr.applyMaskPenaltyRule1Internal(t,!0)+vr.applyMaskPenaltyRule1Internal(t,!1)}static applyMaskPenaltyRule2(t){let e=0;const r=t.getArray(),n=t.getWidth(),i=t.getHeight();for(let o=0;o<i-1;o++){const t=r[o];for(let i=0;i<n-1;i++){const n=t[i];n===t[i+1]&&n===r[o+1][i]&&n===r[o+1][i+1]&&e++}}return vr.N2*e}static applyMaskPenaltyRule3(t){let e=0;const r=t.getArray(),n=t.getWidth(),i=t.getHeight();for(let o=0;o<i;o++)for(let t=0;t<n;t++){const a=r[o];t+6<n&&1===a[t]&&0===a[t+1]&&1===a[t+2]&&1===a[t+3]&&1===a[t+4]&&0===a[t+5]&&1===a[t+6]&&(vr.isWhiteHorizontal(a,t-4,t)||vr.isWhiteHorizontal(a,t+7,t+11))&&e++,o+6<i&&1===r[o][t]&&0===r[o+1][t]&&1===r[o+2][t]&&1===r[o+3][t]&&1===r[o+4][t]&&0===r[o+5][t]&&1===r[o+6][t]&&(vr.isWhiteVertical(r,t,o-4,o)||vr.isWhiteVertical(r,t,o+7,o+11))&&e++}return e*vr.N3}static isWhiteHorizontal(t,e,r){e=Math.max(e,0),r=Math.min(r,t.length);for(let n=e;n<r;n++)if(1===t[n])return!1;return!0}static isWhiteVertical(t,e,r,n){r=Math.max(r,0),n=Math.min(n,t.length);for(let i=r;i<n;i++)if(1===t[i][e])return!1;return!0}static applyMaskPenaltyRule4(t){let e=0;const r=t.getArray(),n=t.getWidth(),i=t.getHeight();for(let s=0;s<i;s++){const t=r[s];for(let r=0;r<n;r++)1===t[r]&&e++}const o=t.getHeight()*t.getWidth(),a=Math.floor(10*Math.abs(2*e-o)/o);return a*vr.N4}static getDataMaskBit(t,e,r){let n,i;switch(t){case 0:n=r+e&1;break;case 1:n=1&r;break;case 2:n=e%3;break;case 3:n=(r+e)%3;break;case 4:n=Math.floor(r/2)+Math.floor(e/3)&1;break;case 5:i=r*e,n=(1&i)+i%3;break;case 6:i=r*e,n=(1&i)+i%3&1;break;case 7:i=r*e,n=i%3+(r+e&1)&1;break;default:throw new h("Invalid mask pattern: "+t)}return 0===n}static applyMaskPenaltyRule1Internal(t,e){let r=0;const n=e?t.getHeight():t.getWidth(),i=e?t.getWidth():t.getHeight(),o=t.getArray();for(let a=0;a<n;a++){let t=0,n=-1;for(let s=0;s<i;s++){const i=e?o[a][s]:o[s][a];i===n?t++:(t>=5&&(r+=vr.N1+(t-5)),t=1,n=i)}t>=5&&(r+=vr.N1+(t-5))}return r}}vr.N1=3,vr.N2=3,vr.N3=40,vr.N4=10;class br{constructor(t,e){this.width=t,this.height=e;const r=new Array(e);for(let n=0;n!==e;n++)r[n]=new Uint8Array(t);this.bytes=r}getHeight(){return this.height}getWidth(){return this.width}get(t,e){return this.bytes[e][t]}getArray(){return this.bytes}setNumber(t,e,r){this.bytes[e][t]=r}setBoolean(t,e,r){this.bytes[e][t]=r?1:0}clear(t){for(const e of this.bytes)y.fill(e,t)}equals(t){if(!(t instanceof br))return!1;const e=t;if(this.width!==e.width)return!1;if(this.height!==e.height)return!1;for(let r=0,n=this.height;r<n;++r){const t=this.bytes[r],n=e.bytes[r];for(let e=0,r=this.width;e<r;++e)if(t[e]!==n[e])return!1}return!0}toString(){const t=new R;for(let e=0,r=this.height;e<r;++e){const r=this.bytes[e];for(let e=0,n=this.width;e<n;++e)switch(r[e]){case 0:t.append(" 0");break;case 1:t.append(" 1");break;default:t.append(" ");break}t.append("\n")}return t.toString()}}class Ir{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 R;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<Ir.NUM_MASK_PATTERNS}}Ir.NUM_MASK_PATTERNS=8;class _r extends u{}_r.kind="WriterException";class Tr{constructor(){}static clearMatrix(t){t.clear(255)}static buildMatrix(t,e,r,n,i){Tr.clearMatrix(i),Tr.embedBasicPatterns(r,i),Tr.embedTypeInfo(e,n,i),Tr.maybeEmbedVersionInfo(r,i),Tr.embedDataBits(t,n,i)}static embedBasicPatterns(t,e){Tr.embedPositionDetectionPatternsAndSeparators(e),Tr.embedDarkDotAtLeftBottomCorner(e),Tr.maybeEmbedPositionAdjustmentPatterns(t,e),Tr.embedTimingPatterns(e)}static embedTypeInfo(t,e,r){const n=new C;Tr.makeTypeInfoBits(t,e,n);for(let i=0,o=n.getSize();i<o;++i){const t=n.get(n.getSize()-1-i),e=Tr.TYPE_INFO_COORDINATES[i],o=e[0],a=e[1];if(r.setBoolean(o,a,t),i<8){const e=r.getWidth()-i-1,n=8;r.setBoolean(e,n,t)}else{const e=8,n=r.getHeight()-7+(i-8);r.setBoolean(e,n,t)}}}static maybeEmbedVersionInfo(t,e){if(t.getVersionNumber()<7)return;const r=new C;Tr.makeVersionInfoBits(t,r);let n=17;for(let i=0;i<6;++i)for(let t=0;t<3;++t){const o=r.get(n);n--,e.setBoolean(i,e.getHeight()-11+t,o),e.setBoolean(e.getHeight()-11+t,i,o)}}static embedDataBits(t,e,r){let n=0,i=-1,o=r.getWidth()-1,a=r.getHeight()-1;while(o>0){6===o&&(o-=1);while(a>=0&&a<r.getHeight()){for(let i=0;i<2;++i){const s=o-i;if(!Tr.isEmpty(r.get(s,a)))continue;let c;n<t.getSize()?(c=t.get(n),++n):c=!1,255!==e&&vr.getDataMaskBit(e,s,a)&&(c=!c),r.setBoolean(s,a,c)}a+=i}i=-i,a+=i,o-=2}if(n!==t.getSize())throw new _r("Not all bits consumed: "+n+"/"+t.getSize())}static findMSBSet(t){return 32-E.numberOfLeadingZeros(t)}static calculateBCHCode(t,e){if(0===e)throw new h("0 polynomial");const r=Tr.findMSBSet(e);t<<=r-1;while(Tr.findMSBSet(t)>=r)t^=e<<Tr.findMSBSet(t)-r;return t}static makeTypeInfoBits(t,e,r){if(!Ir.isValidMaskPattern(e))throw new _r("Invalid mask pattern");const n=t.getBits()<<3|e;r.appendBits(n,5);const i=Tr.calculateBCHCode(n,Tr.TYPE_INFO_POLY);r.appendBits(i,10);const o=new C;if(o.appendBits(Tr.TYPE_INFO_MASK_PATTERN,15),r.xor(o),15!==r.getSize())throw new _r("should not happen but we got: "+r.getSize())}static makeVersionInfoBits(t,e){e.appendBits(t.getVersionNumber(),6);const r=Tr.calculateBCHCode(t.getVersionNumber(),Tr.VERSION_INFO_POLY);if(e.appendBits(r,12),18!==e.getSize())throw new _r("should not happen but we got: "+e.getSize())}static isEmpty(t){return 255===t}static embedTimingPatterns(t){for(let e=8;e<t.getWidth()-8;++e){const r=(e+1)%2;Tr.isEmpty(t.get(e,6))&&t.setNumber(e,6,r),Tr.isEmpty(t.get(6,e))&&t.setNumber(6,e,r)}}static embedDarkDotAtLeftBottomCorner(t){if(0===t.get(8,t.getHeight()-8))throw new _r;t.setNumber(8,t.getHeight()-8,1)}static embedHorizontalSeparationPattern(t,e,r){for(let n=0;n<8;++n){if(!Tr.isEmpty(r.get(t+n,e)))throw new _r;r.setNumber(t+n,e,0)}}static embedVerticalSeparationPattern(t,e,r){for(let n=0;n<7;++n){if(!Tr.isEmpty(r.get(t,e+n)))throw new _r;r.setNumber(t,e+n,0)}}static embedPositionAdjustmentPattern(t,e,r){for(let n=0;n<5;++n){const i=Tr.POSITION_ADJUSTMENT_PATTERN[n];for(let o=0;o<5;++o)r.setNumber(t+o,e+n,i[o])}}static embedPositionDetectionPattern(t,e,r){for(let n=0;n<7;++n){const i=Tr.POSITION_DETECTION_PATTERN[n];for(let o=0;o<7;++o)r.setNumber(t+o,e+n,i[o])}}static embedPositionDetectionPatternsAndSeparators(t){const e=Tr.POSITION_DETECTION_PATTERN[0].length;Tr.embedPositionDetectionPattern(0,0,t),Tr.embedPositionDetectionPattern(t.getWidth()-e,0,t),Tr.embedPositionDetectionPattern(0,t.getWidth()-e,t);const r=8;Tr.embedHorizontalSeparationPattern(0,r-1,t),Tr.embedHorizontalSeparationPattern(t.getWidth()-r,r-1,t),Tr.embedHorizontalSeparationPattern(0,t.getWidth()-r,t);const n=7;Tr.embedVerticalSeparationPattern(n,0,t),Tr.embedVerticalSeparationPattern(t.getHeight()-n-1,0,t),Tr.embedVerticalSeparationPattern(n,t.getHeight()-n,t)}static maybeEmbedPositionAdjustmentPatterns(t,e){if(t.getVersionNumber()<2)return;const r=t.getVersionNumber()-1,n=Tr.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[r];for(let i=0,o=n.length;i!==o;i++){const t=n[i];if(t>=0)for(let r=0;r!==o;r++){const i=n[r];i>=0&&Tr.isEmpty(e.get(i,t))&&Tr.embedPositionAdjustmentPattern(i-2,t-2,e)}}}}Tr.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])]),Tr.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])]),Tr.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])]),Tr.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])]),Tr.VERSION_INFO_POLY=7973,Tr.TYPE_INFO_POLY=1335,Tr.TYPE_INFO_MASK_PATTERN=21522;class Rr{constructor(t,e){this.dataBytes=t,this.errorCorrectionBytes=e}getDataBytes(){return this.dataBytes}getErrorCorrectionBytes(){return this.errorCorrectionBytes}}class Dr{constructor(){}static calculateMaskPenalty(t){return vr.applyMaskPenaltyRule1(t)+vr.applyMaskPenaltyRule2(t)+vr.applyMaskPenaltyRule3(t)+vr.applyMaskPenaltyRule4(t)}static encode(t,e,r=null){let n=Dr.DEFAULT_BYTE_MODE_ENCODING;const i=null!==r&&void 0!==r.get(Ar.CHARACTER_SET);i&&(n=r.get(Ar.CHARACTER_SET).toString());const o=this.chooseMode(t,n),a=new C;if(o===De.BYTE&&(i||Dr.DEFAULT_BYTE_MODE_ENCODING!==n)){const t=b.getCharacterSetECIByName(n);void 0!==t&&this.appendECI(t,a)}this.appendModeInfo(o,a);const s=new C;let c;if(this.appendBytes(t,o,s,n),null!==r&&void 0!==r.get(Ar.QR_VERSION)){const t=Number.parseInt(r.get(Ar.QR_VERSION).toString(),10);c=Ie.getVersionForNumber(t);const n=this.calculateBitsNeeded(o,a,s,c);if(!this.willFit(n,c,e))throw new _r("Data too big for requested version")}else c=this.recommendVersion(e,o,a,s);const u=new C;u.appendBitArray(a);const l=o===De.BYTE?s.getSizeInBytes():t.length;this.appendLengthInfo(l,c,o,u),u.appendBitArray(s);const h=c.getECBlocksForLevel(e),d=c.getTotalCodewords()-h.getTotalECCodewords();this.terminateBits(d,u);const f=this.interleaveWithECBytes(u,c.getTotalCodewords(),d,h.getNumBlocks()),g=new Ir;g.setECLevel(e),g.setMode(o),g.setVersion(c);const p=c.getDimensionForVersion(),m=new br(p,p),w=this.chooseMaskPattern(f,e,c,m);return g.setMaskPattern(w),Tr.buildMatrix(f,e,c,w,m),g.setMatrix(m),g}static recommendVersion(t,e,r,n){const i=this.calculateBitsNeeded(e,r,n,Ie.getVersionForNumber(1)),o=this.chooseVersion(i,t),a=this.calculateBitsNeeded(e,r,n,o);return this.chooseVersion(a,t)}static calculateBitsNeeded(t,e,r,n){return e.getSize()+t.getCharacterCountBits(n)+r.getSize()}static getAlphanumericCode(t){return t<Dr.ALPHANUMERIC_TABLE.length?Dr.ALPHANUMERIC_TABLE[t]:-1}static chooseMode(t,e=null){if(b.SJIS.getName()===e&&this.isOnlyDoubleByteKanji(t))return De.KANJI;let r=!1,n=!1;for(let i=0,o=t.length;i<o;++i){const e=t.charAt(i);if(Dr.isDigit(e))r=!0;else{if(-1===this.getAlphanumericCode(e.charCodeAt(0)))return De.BYTE;n=!0}}return n?De.ALPHANUMERIC:r?De.NUMERIC:De.BYTE}static isOnlyDoubleByteKanji(t){let e;try{e=_.encode(t,b.SJIS)}catch(n){return!1}const r=e.length;if(r%2!==0)return!1;for(let i=0;i<r;i+=2){const t=255&e[i];if((t<129||t>159)&&(t<224||t>235))return!1}return!0}static chooseMaskPattern(t,e,r,n){let i=Number.MAX_SAFE_INTEGER,o=-1;for(let a=0;a<Ir.NUM_MASK_PATTERNS;a++){Tr.buildMatrix(t,e,r,a,n);let s=this.calculateMaskPenalty(n);s<i&&(i=s,o=a)}return o}static chooseVersion(t,e){for(let r=1;r<=40;r++){const n=Ie.getVersionForNumber(r);if(Dr.willFit(t,n,e))return n}throw new _r("Data too big")}static willFit(t,e,r){const n=e.getTotalCodewords(),i=e.getECBlocksForLevel(r),o=i.getTotalECCodewords(),a=n-o,s=(t+7)/8;return a>=s}static terminateBits(t,e){const r=8*t;if(e.getSize()>r)throw new _r("data bits cannot fit in the QR Code"+e.getSize()+" > "+r);for(let o=0;o<4&&e.getSize()<r;++o)e.appendBit(!1);const n=7&e.getSize();if(n>0)for(let o=n;o<8;o++)e.appendBit(!1);const i=t-e.getSizeInBytes();for(let o=0;o<i;++o)e.appendBits(0===(1&o)?236:17,8);if(e.getSize()!==r)throw new _r("Bits size does not equal capacity")}static getNumDataBytesAndNumECBytesForBlockID(t,e,r,n,i,o){if(n>=r)throw new _r("Block ID too large");const a=t%r,s=r-a,c=Math.floor(t/r),u=c+1,l=Math.floor(e/r),h=l+1,d=c-l,f=u-h;if(d!==f)throw new _r("EC bytes mismatch");if(r!==s+a)throw new _r("RS blocks mismatch");if(t!==(l+d)*s+(h+f)*a)throw new _r("Total bytes mismatch");n<s?(i[0]=l,o[0]=d):(i[0]=h,o[0]=f)}static interleaveWithECBytes(t,e,r,n){if(t.getSizeInBytes()!==r)throw new _r("Number of bits and data bytes does not match");let i=0,o=0,a=0;const s=new Array;for(let u=0;u<n;++u){const c=new Int32Array(1),l=new Int32Array(1);Dr.getNumDataBytesAndNumECBytesForBlockID(e,r,n,u,c,l);const h=c[0],d=new Uint8Array(h);t.toBytes(8*i,d,0,h);const f=Dr.generateECBytes(d,l[0]);s.push(new Rr(d,f)),o=Math.max(o,h),a=Math.max(a,f.length),i+=c[0]}if(r!==i)throw new _r("Data bytes does not match offset");const c=new C;for(let u=0;u<o;++u)for(const t of s){const e=t.getDataBytes();u<e.length&&c.appendBits(e[u],8)}for(let u=0;u<a;++u)for(const t of s){const e=t.getErrorCorrectionBytes();u<e.length&&c.appendBits(e[u],8)}if(e!==c.getSizeInBytes())throw new _r("Interleaving error: "+e+" and "+c.getSizeInBytes()+" differ.");return c}static generateECBytes(t,e){const r=t.length,n=new Int32Array(r+e);for(let o=0;o<r;o++)n[o]=255&t[o];new Sr(tt.QR_CODE_FIELD_256).encode(n,e);const i=new Uint8Array(e);for(let o=0;o<e;o++)i[o]=n[r+o];return i}static appendModeInfo(t,e){e.appendBits(t.getBits(),4)}static appendLengthInfo(t,e,r,n){const i=r.getCharacterCountBits(e);if(t>=1<<i)throw new _r(t+" is bigger than "+((1<<i)-1));n.appendBits(t,i)}static appendBytes(t,e,r,n){switch(e){case De.NUMERIC:Dr.appendNumericBytes(t,r);break;case De.ALPHANUMERIC:Dr.appendAlphanumericBytes(t,r);break;case De.BYTE:Dr.append8BitBytes(t,r,n);break;case De.KANJI:Dr.appendKanjiBytes(t,r);break;default:throw new _r("Invalid mode: "+e)}}static getDigit(t){return t.charCodeAt(0)-48}static isDigit(t){const e=Dr.getDigit(t);return e>=0&&e<=9}static appendNumericBytes(t,e){const r=t.length;let n=0;while(n<r){const i=Dr.getDigit(t.charAt(n));if(n+2<r){const r=Dr.getDigit(t.charAt(n+1)),o=Dr.getDigit(t.charAt(n+2));e.appendBits(100*i+10*r+o,10),n+=3}else if(n+1<r){const r=Dr.getDigit(t.charAt(n+1));e.appendBits(10*i+r,7),n+=2}else e.appendBits(i,4),n++}}static appendAlphanumericBytes(t,e){const r=t.length;let n=0;while(n<r){const i=Dr.getAlphanumericCode(t.charCodeAt(n));if(-1===i)throw new _r;if(n+1<r){const r=Dr.getAlphanumericCode(t.charCodeAt(n+1));if(-1===r)throw new _r;e.appendBits(45*i+r,11),n+=2}else e.appendBits(i,6),n++}}static append8BitBytes(t,e,r){let n;try{n=_.encode(t,r)}catch(i){throw new _r(i)}for(let o=0,a=n.length;o!==a;o++){const t=n[o];e.appendBits(t,8)}}static appendKanjiBytes(t,e){let r;try{r=_.encode(t,b.SJIS)}catch(i){throw new _r(i)}const n=r.length;for(let o=0;o<n;o+=2){const t=255&r[o],n=255&r[o+1],i=t<<8&4294967295|n;let a=-1;if(i>=33088&&i<=40956?a=i-33088:i>=57408&&i<=60351&&(a=i-49472),-1===a)throw new _r("Invalid byte sequence");const s=192*(a>>8)+(255&a);e.appendBits(s,13)}}static appendECI(t,e){e.appendBits(De.ECI.getBits(),4),e.appendBits(t.getValue(),8)}}Dr.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]),Dr.DEFAULT_BYTE_MODE_ENCODING=b.UTF8.getName();class Or{write(t,e,r,n=null){if(0===t.length)throw new h("Found empty contents");if(e<0||r<0)throw new h("Requested dimensions are too small: "+e+"x"+r);let i=Ae.L,o=Or.QUIET_ZONE_SIZE;null!==n&&(void 0!==n.get(Ar.ERROR_CORRECTION)&&(i=Ae.fromString(n.get(Ar.ERROR_CORRECTION).toString())),void 0!==n.get(Ar.MARGIN)&&(o=Number.parseInt(n.get(Ar.MARGIN).toString(),10)));const a=Dr.encode(t,i,n);return this.renderResult(a,e,r,o)}writeToDom(t,e,r,n,i=null){"string"===typeof t&&(t=document.querySelector(t));const o=this.write(e,r,n,i);t&&t.appendChild(o)}renderResult(t,e,r,n){const i=t.getMatrix();if(null===i)throw new rt;const o=i.getWidth(),a=i.getHeight(),s=o+2*n,c=a+2*n,u=Math.max(e,s),l=Math.max(r,c),h=Math.min(Math.floor(u/s),Math.floor(l/c)),d=Math.floor((u-o*h)/2),f=Math.floor((l-a*h)/2),g=this.createSVGElement(u,l);for(let p=0,m=f;p<a;p++,m+=h)for(let t=0,e=d;t<o;t++,e+=h)if(1===i.get(t,p)){const t=this.createSvgRectElement(e,m,h,h);g.appendChild(t)}return g}createSVGElement(t,e){const r=document.createElementNS(Or.SVG_NS,"svg");return r.setAttributeNS(null,"height",t.toString()),r.setAttributeNS(null,"width",e.toString()),r}createSvgRectElement(t,e,r,n){const i=document.createElementNS(Or.SVG_NS,"rect");return i.setAttributeNS(null,"x",t.toString()),i.setAttributeNS(null,"y",e.toString()),i.setAttributeNS(null,"height",r.toString()),i.setAttributeNS(null,"width",n.toString()),i.setAttributeNS(null,"fill","#000000"),i}}Or.QUIET_ZONE_SIZE=4,Or.SVG_NS="http://www.w3.org/2000/svg";class Nr{encode(t,e,r,n,i){if(0===t.length)throw new h("Found empty contents");if(e!==V.QR_CODE)throw new h("Can only encode QR_CODE, but got "+e);if(r<0||n<0)throw new h(`Requested dimensions are too small: ${r}x${n}`);let o=Ae.L,a=Nr.QUIET_ZONE_SIZE;null!==i&&(void 0!==i.get(Ar.ERROR_CORRECTION)&&(o=Ae.fromString(i.get(Ar.ERROR_CORRECTION).toString())),void 0!==i.get(Ar.MARGIN)&&(a=Number.parseInt(i.get(Ar.MARGIN).toString(),10)));const s=Dr.encode(t,o,i);return Nr.renderResult(s,r,n,a)}static renderResult(t,e,r,n){const i=t.getMatrix();if(null===i)throw new rt;const o=i.getWidth(),a=i.getHeight(),s=o+2*n,c=a+2*n,u=Math.max(e,s),l=Math.max(r,c),h=Math.min(Math.floor(u/s),Math.floor(l/c)),d=Math.floor((u-o*h)/2),f=Math.floor((l-a*h)/2),g=new D(u,l);for(let p=0,m=f;p<a;p++,m+=h)for(let t=0,e=d;t<o;t++,e+=h)1===i.get(t,p)&&g.setRegion(e,m,h,h);return g}}Nr.QUIET_ZONE_SIZE=4;class Mr{encode(t,e,r,n,i){let o;switch(e){case V.QR_CODE:o=new Nr;break;default:throw new h("No encoder available for format "+e)}return o.encode(t,e,r,n,i)}}class Pr extends P{constructor(t,e,r,n,i,o,a,s){if(super(o,a),this.yuvData=t,this.dataWidth=e,this.dataHeight=r,this.left=n,this.top=i,n+o>e||i+a>r)throw new h("Crop rectangle does not fit within image data.");s&&this.reverseHorizontal(o,a)}getRow(t,e){if(t<0||t>=this.getHeight())throw new h("Requested row is outside the image: "+t);const r=this.getWidth();(null===e||void 0===e||e.length<r)&&(e=new Uint8ClampedArray(r));const n=(t+this.top)*this.dataWidth+this.left;return p.arraycopy(this.yuvData,n,e,0,r),e}getMatrix(){const t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.yuvData;const r=t*e,n=new Uint8ClampedArray(r);let i=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return p.arraycopy(this.yuvData,i,n,0,r),n;for(let o=0;o<e;o++){const e=o*t;p.arraycopy(this.yuvData,i,n,e,t),i+=this.dataWidth}return n}isCropSupported(){return!0}crop(t,e,r,n){return new Pr(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+e,r,n,!1)}renderThumbnail(){const t=this.getWidth()/Pr.THUMBNAIL_SCALE_FACTOR,e=this.getHeight()/Pr.THUMBNAIL_SCALE_FACTOR,r=new Int32Array(t*e),n=this.yuvData;let i=this.top*this.dataWidth+this.left;for(let o=0;o<e;o++){const e=o*t;for(let o=0;o<t;o++){const t=255&n[i+o*Pr.THUMBNAIL_SCALE_FACTOR];r[e+o]=4278190080|65793*t}i+=this.dataWidth*Pr.THUMBNAIL_SCALE_FACTOR}return r}getThumbnailWidth(){return this.getWidth()/Pr.THUMBNAIL_SCALE_FACTOR}getThumbnailHeight(){return this.getHeight()/Pr.THUMBNAIL_SCALE_FACTOR}reverseHorizontal(t,e){const r=this.yuvData;for(let n=0,i=this.top*this.dataWidth+this.left;n<e;n++,i+=this.dataWidth){const e=i+t/2;for(let n=i,o=i+t-1;n<e;n++,o--){const t=r[n];r[n]=r[o],r[o]=t}}}invert(){return new L(this)}}Pr.THUMBNAIL_SCALE_FACTOR=2;class Lr extends P{constructor(t,e,r,n,i,o,a){if(super(e,r),this.dataWidth=n,this.dataHeight=i,this.left=o,this.top=a,4===t.BYTES_PER_ELEMENT){const n=e*r,i=new Uint8ClampedArray(n);for(let e=0;e<n;e++){const r=t[e],n=r>>16&255,o=r>>7&510,a=255&r;i[e]=(n+o+a)/4&255}this.luminances=i}else this.luminances=t;if(void 0===n&&(this.dataWidth=e),void 0===i&&(this.dataHeight=r),void 0===o&&(this.left=0),void 0===a&&(this.top=0),this.left+e>this.dataWidth||this.top+r>this.dataHeight)throw new h("Crop rectangle does not fit within image data.")}getRow(t,e){if(t<0||t>=this.getHeight())throw new h("Requested row is outside the image: "+t);const r=this.getWidth();(null===e||void 0===e||e.length<r)&&(e=new Uint8ClampedArray(r));const n=(t+this.top)*this.dataWidth+this.left;return p.arraycopy(this.luminances,n,e,0,r),e}getMatrix(){const t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.luminances;const r=t*e,n=new Uint8ClampedArray(r);let i=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return p.arraycopy(this.luminances,i,n,0,r),n;for(let o=0;o<e;o++){const e=o*t;p.arraycopy(this.luminances,i,n,e,t),i+=this.dataWidth}return n}isCropSupported(){return!0}crop(t,e,r,n){return new Lr(this.luminances,r,n,this.dataWidth,this.dataHeight,this.left+t,this.top+e)}invert(){return new L(this)}}class xr extends b{static forName(t){return this.getCharacterSetECIByName(t)}}class Br{}Br.ISO_8859_1=b.ISO8859_1;class kr{isCompact(){return this.compact}setCompact(t){this.compact=t}getSize(){return this.size}setSize(t){this.size=t}getLayers(){return this.layers}setLayers(t){this.layers=t}getCodeWords(){return this.codeWords}setCodeWords(t){this.codeWords=t}getMatrix(){return this.matrix}setMatrix(t){this.matrix=t}}class Fr{static singletonList(t){return[t]}static min(t,e){return t.sort(e)[0]}}class Ur{constructor(t){this.previous=t}getPrevious(){return this.previous}}class jr extends Ur{constructor(t,e,r){super(t),this.value=e,this.bitCount=r}appendTo(t,e){t.appendBits(this.value,this.bitCount)}add(t,e){return new jr(this,t,e)}addBinaryShift(t,e){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new jr(this,t,e)}toString(){let t=this.value&(1<<this.bitCount)-1;return t|=1<<this.bitCount,"<"+E.toBinaryString(t|1<<this.bitCount).substring(1)+">"}}class Hr extends jr{constructor(t,e,r){super(t,0,0),this.binaryShiftStart=e,this.binaryShiftByteCount=r}appendTo(t,e){for(let r=0;r<this.binaryShiftByteCount;r++)(0===r||31===r&&this.binaryShiftByteCount<=62)&&(t.appendBits(31,5),this.binaryShiftByteCount>62?t.appendBits(this.binaryShiftByteCount-31,16):0===r?t.appendBits(Math.min(this.binaryShiftByteCount,31),5):t.appendBits(this.binaryShiftByteCount-31,5)),t.appendBits(e[this.binaryShiftStart+r],8)}addBinaryShift(t,e){return new Hr(this,t,e)}toString(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}function Vr(t,e,r){return new Hr(t,e,r)}function zr(t,e,r){return new jr(t,e,r)}const Wr=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],Gr=0,Yr=1,Xr=2,$r=3,Zr=4,Qr=new jr(null,0,0),qr=[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,656380,656382,656381,0])];function Kr(t){for(let e of t)y.fill(e,-1);return t[Gr][Zr]=0,t[Yr][Zr]=0,t[Yr][Gr]=28,t[$r][Zr]=0,t[Xr][Zr]=0,t[Xr][Gr]=15,t}const Jr=Kr(y.createInt32Array(6,6));class tn{constructor(t,e,r,n){this.token=t,this.mode=e,this.binaryShiftByteCount=r,this.bitCount=n}getMode(){return this.mode}getToken(){return this.token}getBinaryShiftByteCount(){return this.binaryShiftByteCount}getBitCount(){return this.bitCount}latchAndAppend(t,e){let r=this.bitCount,n=this.token;if(t!==this.mode){let e=qr[this.mode][t];n=zr(n,65535&e,e>>16),r+=e>>16}let i=t===Xr?4:5;return n=zr(n,e,i),new tn(n,t,0,r+i)}shiftAndAppend(t,e){let r=this.token,n=this.mode===Xr?4:5;return r=zr(r,Jr[this.mode][t],n),r=zr(r,e,5),new tn(r,this.mode,0,this.bitCount+n+5)}addBinaryShiftChar(t){let e=this.token,r=this.mode,n=this.bitCount;if(this.mode===Zr||this.mode===Xr){let t=qr[r][Gr];e=zr(e,65535&t,t>>16),n+=t>>16,r=Gr}let i=0===this.binaryShiftByteCount||31===this.binaryShiftByteCount?18:62===this.binaryShiftByteCount?9:8,o=new tn(e,r,this.binaryShiftByteCount+1,n+i);return 2078===o.binaryShiftByteCount&&(o=o.endBinaryShift(t+1)),o}endBinaryShift(t){if(0===this.binaryShiftByteCount)return this;let e=this.token;return e=Vr(e,t-this.binaryShiftByteCount,this.binaryShiftByteCount),new tn(e,this.mode,0,this.bitCount)}isBetterThanOrEqualTo(t){let e=this.bitCount+(qr[this.mode][t.mode]>>16);return this.binaryShiftByteCount<t.binaryShiftByteCount?e+=tn.calculateBinaryShiftCost(t)-tn.calculateBinaryShiftCost(this):this.binaryShiftByteCount>t.binaryShiftByteCount&&t.binaryShiftByteCount>0&&(e+=10),e<=t.bitCount}toBitArray(t){let e=[];for(let n=this.endBinaryShift(t.length).token;null!==n;n=n.getPrevious())e.unshift(n);let r=new C;for(const n of e)n.appendTo(r,t);return r}toString(){return T.format("%s bits=%d bytes=%d",Wr[this.mode],this.bitCount,this.binaryShiftByteCount)}static calculateBinaryShiftCost(t){return t.binaryShiftByteCount>62?21:t.binaryShiftByteCount>31?20:t.binaryShiftByteCount>0?10:0}}function en(t){const e=T.getCharCode(" "),r=T.getCharCode("."),n=T.getCharCode(",");t[Gr][e]=1;const i=T.getCharCode("Z"),o=T.getCharCode("A");for(let d=o;d<=i;d++)t[Gr][d]=d-o+2;t[Yr][e]=1;const a=T.getCharCode("z"),s=T.getCharCode("a");for(let d=s;d<=a;d++)t[Yr][d]=d-s+2;t[Xr][e]=1;const c=T.getCharCode("9"),u=T.getCharCode("0");for(let d=u;d<=c;d++)t[Xr][d]=d-u+2;t[Xr][n]=12,t[Xr][r]=13;const l=["\0"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~",""];for(let d=0;d<l.length;d++)t[$r][T.getCharCode(l[d])]=d;const h=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(let d=0;d<h.length;d++)T.getCharCode(h[d])>0&&(t[Zr][T.getCharCode(h[d])]=d);return t}tn.INITIAL_STATE=new tn(Qr,Gr,0,0);const rn=en(y.createInt32Array(5,256));class nn{constructor(t){this.text=t}encode(){const t=T.getCharCode(" "),e=T.getCharCode("\n");let r=Fr.singletonList(tn.INITIAL_STATE);for(let i=0;i<this.text.length;i++){let n,o=i+1<this.text.length?this.text[i+1]:0;switch(this.text[i]){case T.getCharCode("\r"):n=o===e?2:0;break;case T.getCharCode("."):n=o===t?3:0;break;case T.getCharCode(","):n=o===t?4:0;break;case T.getCharCode(":"):n=o===t?5:0;break;default:n=0}n>0?(r=nn.updateStateListForPair(r,i,n),i++):r=this.updateStateListForChar(r,i)}const n=Fr.min(r,(t,e)=>t.getBitCount()-e.getBitCount());return n.toBitArray(this.text)}updateStateListForChar(t,e){const r=[];for(let n of t)this.updateStateForChar(n,e,r);return nn.simplifyStates(r)}updateStateForChar(t,e,r){let n=255&this.text[e],i=rn[t.getMode()][n]>0,o=null;for(let a=0;a<=Zr;a++){let s=rn[a][n];if(s>0){if(null==o&&(o=t.endBinaryShift(e)),!i||a===t.getMode()||a===Xr){const t=o.latchAndAppend(a,s);r.push(t)}if(!i&&Jr[t.getMode()][a]>=0){const t=o.shiftAndAppend(a,s);r.push(t)}}}if(t.getBinaryShiftByteCount()>0||0===rn[t.getMode()][n]){let n=t.addBinaryShiftChar(e);r.push(n)}}static updateStateListForPair(t,e,r){const n=[];for(let i of t)this.updateStateForPair(i,e,r,n);return this.simplifyStates(n)}static updateStateForPair(t,e,r,n){let i=t.endBinaryShift(e);if(n.push(i.latchAndAppend(Zr,r)),t.getMode()!==Zr&&n.push(i.shiftAndAppend(Zr,r)),3===r||4===r){let t=i.latchAndAppend(Xr,16-r).latchAndAppend(Xr,1);n.push(t)}if(t.getBinaryShiftByteCount()>0){let r=t.addBinaryShiftChar(e).addBinaryShiftChar(e+1);n.push(r)}}static simplifyStates(t){let e=[];for(const r of t){let t=!0;for(const n of e){if(n.isBetterThanOrEqualTo(r)){t=!1;break}r.isBetterThanOrEqualTo(n)&&(e=e.filter(t=>t!==n))}t&&e.push(r)}return e}}class on{constructor(){}static encodeBytes(t){return on.encode(t,on.DEFAULT_EC_PERCENT,on.DEFAULT_AZTEC_LAYERS)}static encode(t,e,r){let n,i,o,a,s,c=new nn(t).encode(),u=E.truncDivision(c.getSize()*e,100)+11,l=c.getSize()+u;if(r!==on.DEFAULT_AZTEC_LAYERS){if(n=r<0,i=Math.abs(r),i>(n?on.MAX_NB_BITS_COMPACT:on.MAX_NB_BITS))throw new h(T.format("Illegal value %s for layers",r));o=on.totalBitsInLayer(i,n),a=on.WORD_SIZE[i];let t=o-o%a;if(s=on.stuffBits(c,a),s.getSize()+u>t)throw new h("Data to large for user specified layer");if(n&&s.getSize()>64*a)throw new h("Data to large for user specified layer")}else{a=0,s=null;for(let t=0;;t++){if(t>on.MAX_NB_BITS)throw new h("Data too large for an Aztec code");if(n=t<=3,i=n?t+1:t,o=on.totalBitsInLayer(i,n),l>o)continue;null!=s&&a===on.WORD_SIZE[i]||(a=on.WORD_SIZE[i],s=on.stuffBits(c,a));let e=o-o%a;if(!(n&&s.getSize()>64*a)&&s.getSize()+u<=e)break}}let d,f=on.generateCheckWords(s,o,a),g=s.getSize()/a,p=on.generateModeMessage(n,i,g),m=(n?11:14)+4*i,w=new Int32Array(m);if(n){d=m;for(let t=0;t<w.length;t++)w[t]=t}else{d=m+1+2*E.truncDivision(E.truncDivision(m,2)-1,15);let t=E.truncDivision(m,2),e=E.truncDivision(d,2);for(let r=0;r<t;r++){let n=r+E.truncDivision(r,15);w[t-r-1]=e-n-1,w[t+r]=e+n+1}}let y=new D(d);for(let h=0,E=0;h<i;h++){let t=4*(i-h)+(n?9:12);for(let e=0;e<t;e++){let r=2*e;for(let n=0;n<2;n++)f.get(E+r+n)&&y.set(w[2*h+n],w[2*h+e]),f.get(E+2*t+r+n)&&y.set(w[2*h+e],w[m-1-2*h-n]),f.get(E+4*t+r+n)&&y.set(w[m-1-2*h-n],w[m-1-2*h-e]),f.get(E+6*t+r+n)&&y.set(w[m-1-2*h-e],w[2*h+n])}E+=8*t}if(on.drawModeMessage(y,n,d,p),n)on.drawBullsEye(y,E.truncDivision(d,2),5);else{on.drawBullsEye(y,E.truncDivision(d,2),7);for(let t=0,e=0;t<E.truncDivision(m,2)-1;t+=15,e+=16)for(let r=1&E.truncDivision(d,2);r<d;r+=2)y.set(E.truncDivision(d,2)-e,r),y.set(E.truncDivision(d,2)+e,r),y.set(r,E.truncDivision(d,2)-e),y.set(r,E.truncDivision(d,2)+e)}let C=new kr;return C.setCompact(n),C.setSize(d),C.setLayers(i),C.setCodeWords(g),C.setMatrix(y),C}static drawBullsEye(t,e,r){for(let n=0;n<r;n+=2)for(let r=e-n;r<=e+n;r++)t.set(r,e-n),t.set(r,e+n),t.set(e-n,r),t.set(e+n,r);t.set(e-r,e-r),t.set(e-r+1,e-r),t.set(e-r,e-r+1),t.set(e+r,e-r),t.set(e+r,e-r+1),t.set(e+r,e+r-1)}static generateModeMessage(t,e,r){let n=new C;return t?(n.appendBits(e-1,2),n.appendBits(r-1,6),n=on.generateCheckWords(n,28,4)):(n.appendBits(e-1,5),n.appendBits(r-1,11),n=on.generateCheckWords(n,40,4)),n}static drawModeMessage(t,e,r,n){let i=E.truncDivision(r,2);if(e)for(let o=0;o<7;o++){let e=i-3+o;n.get(o)&&t.set(e,i-5),n.get(o+7)&&t.set(i+5,e),n.get(20-o)&&t.set(e,i+5),n.get(27-o)&&t.set(i-5,e)}else for(let o=0;o<10;o++){let e=i-5+o+E.truncDivision(o,5);n.get(o)&&t.set(e,i-7),n.get(o+10)&&t.set(i+7,e),n.get(29-o)&&t.set(e,i+7),n.get(39-o)&&t.set(i-7,e)}}static generateCheckWords(t,e,r){let n=t.getSize()/r,i=new Sr(on.getGF(r)),o=E.truncDivision(e,r),a=on.bitsToWords(t,r,o);i.encode(a,o-n);let s=e%r,c=new C;c.appendBits(0,s);for(const u of Array.from(a))c.appendBits(u,r);return c}static bitsToWords(t,e,r){let n,i,o=new Int32Array(r);for(n=0,i=t.getSize()/e;n<i;n++){let r=0;for(let i=0;i<e;i++)r|=t.get(n*e+i)?1<<e-i-1:0;o[n]=r}return o}static getGF(t){switch(t){case 4:return tt.AZTEC_PARAM;case 6:return tt.AZTEC_DATA_6;case 8:return tt.AZTEC_DATA_8;case 10:return tt.AZTEC_DATA_10;case 12:return tt.AZTEC_DATA_12;default:throw new h("Unsupported word size "+t)}}static stuffBits(t,e){let r=new C,n=t.getSize(),i=(1<<e)-2;for(let o=0;o<n;o+=e){let a=0;for(let r=0;r<e;r++)(o+r>=n||t.get(o+r))&&(a|=1<<e-1-r);(a&i)===i?(r.appendBits(a&i,e),o--):0===(a&i)?(r.appendBits(1|a,e),o--):r.appendBits(a,e)}return r}static totalBitsInLayer(t,e){return((e?88:112)+16*t)*t}}on.DEFAULT_EC_PERCENT=33,on.DEFAULT_AZTEC_LAYERS=0,on.MAX_NB_BITS=32,on.MAX_NB_BITS_COMPACT=4,on.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 an{encode(t,e,r,n){return this.encodeWithHints(t,e,r,n,null)}encodeWithHints(t,e,r,n,i){let o=Br.ISO_8859_1,a=on.DEFAULT_EC_PERCENT,s=on.DEFAULT_AZTEC_LAYERS;return null!=i&&(i.has(Ar.CHARACTER_SET)&&(o=xr.forName(i.get(Ar.CHARACTER_SET).toString())),i.has(Ar.ERROR_CORRECTION)&&(a=E.parseInt(i.get(Ar.ERROR_CORRECTION).toString())),i.has(Ar.AZTEC_LAYERS)&&(s=E.parseInt(i.get(Ar.AZTEC_LAYERS).toString()))),an.encodeLayers(t,e,r,n,o,a,s)}static encodeLayers(t,e,r,n,i,o,a){if(e!==V.AZTEC)throw new h("Can only encode AZTEC, but got "+e);let s=on.encode(T.getBytes(t,i),o,a);return an.renderResult(s,r,n)}static renderResult(t,e,r){let n=t.getMatrix();if(null==n)throw new rt;let i=n.getWidth(),o=n.getHeight(),a=Math.max(e,i),s=Math.max(r,o),c=Math.min(a/i,s/o),u=(a-i*c)/2,l=(s-o*c)/2,h=new D(a,s);for(let d=0,f=l;d<o;d++,f+=c)for(let t=0,e=u;t<i;t++,e+=c)n.get(t,d)&&h.setRegion(e,f,c,c);return h}}e.AbstractExpandedDecoder=Gt,e.ArgumentException=l,e.ArithmeticException=J,e.AztecCode=kr,e.AztecCodeReader=wt,e.AztecCodeWriter=an,e.AztecDecoder=it,e.AztecDetector=mt,e.AztecDetectorResult=ut,e.AztecEncoder=on,e.AztecHighLevelEncoder=nn,e.AztecPoint=pt,e.BarcodeFormat=V,e.Binarizer=g,e.BinaryBitmap=d,e.BitArray=C,e.BitMatrix=D,e.BitSource=pe,e.BrowserAztecCodeReader=yt,e.BrowserBarcodeReader=ue,e.BrowserCodeReader=U,e.BrowserDatamatrixCodeReader=Ce,e.BrowserMultiFormatReader=wr,e.BrowserPDF417Reader=yr,e.BrowserQRCodeReader=Er,e.BrowserQRCodeSvgWriter=Or,e.CharacterSetECI=b,e.ChecksumException=f,e.Code128Reader=Ct,e.Code39Reader=At,e.DataMatrixDecodedBitStreamParser=me,e.DataMatrixReader=Ee,e.DecodeHintType=S,e.DecoderResult=Q,e.DefaultGridSampler=ft,e.DetectorResult=ct,e.EAN13Reader=Rt,e.EncodeHintType=Ar,e.Exception=u,e.FormatException=v,e.GenericGF=tt,e.GenericGFPoly=K,e.GlobalHistogramBinarizer=N,e.GridSampler=ht,e.GridSamplerInstance=gt,e.HTMLCanvasElementLuminanceSource=x,e.HybridBinarizer=M,e.ITFReader=St,e.IllegalArgumentException=h,e.IllegalStateException=rt,e.InvertedLuminanceSource=L,e.LuminanceSource=P,e.MathUtils=ot,e.MultiFormatOneDReader=ce,e.MultiFormatReader=mr,e.MultiFormatWriter=Mr,e.NotFoundException=O,e.OneDReader=Et,e.PDF417DecodedBitStreamParser=dr,e.PDF417DecoderErrorCorrection=Ye,e.PDF417Reader=gr,e.PDF417ResultMetadata=rr,e.PerspectiveTransform=dt,e.PlanarYUVLuminanceSource=Pr,e.QRCodeByteMatrix=br,e.QRCodeDataMask=_e,e.QRCodeDecodedBitStreamParser=Oe,e.QRCodeDecoderErrorCorrectionLevel=Ae,e.QRCodeDecoderFormatInformation=Se,e.QRCodeEncoder=Dr,e.QRCodeEncoderQRCode=Ir,e.QRCodeMaskUtil=vr,e.QRCodeMatrixUtil=Tr,e.QRCodeMode=De,e.QRCodeReader=Ue,e.QRCodeVersion=Ie,e.QRCodeWriter=Nr,e.RGBLuminanceSource=Lr,e.RSS14Reader=se,e.RSSExpandedReader=oe,e.ReaderException=pr,e.ReedSolomonDecoder=nt,e.ReedSolomonEncoder=Sr,e.ReedSolomonException=et,e.Result=j,e.ResultMetadataType=Z,e.ResultPoint=st,e.StringUtils=T,e.UnsupportedOperationException=I,e.VideoInputDevice=B,e.WhiteRectangleDetector=lt,e.WriterException=_r,e.ZXingArrays=y,e.ZXingCharset=xr,e.ZXingInteger=E,e.ZXingStandardCharsets=Br,e.ZXingStringBuilder=R,e.ZXingStringEncoding=_,e.ZXingSystem=p,e.createAbstractExpandedDecoder=re,Object.defineProperty(e,"__esModule",{value:!0})}))}).call(this,r("c8ba"))}}]);