1"use strict";(self.webpackChunkcommudle_admin=self.webpackChunkcommudle_admin||[]).push([[9317],{9277:(Mt,Je,$)=>{$.d(Je,{t:()=>ue});var I=$(23214),_=$(98434),z=$(69262),Be=$(14481),V=$(20060);function Pe(ee,De){if(1&ee&&I.nrm(0,"fa-icon",8),2&ee){const xe=I.XpG();I.Y8G("icon",xe.faIcon)}}function ut(ee,De){if(1&ee&&I.nrm(0,"nb-icon",8),2&ee){const xe=I.XpG();I.Y8G("icon",xe.nbIcon)}}let ue=(()=>{class ee{constructor(){this.buttonText="Setup Now"}ngOnInit(){}static{this.\u0275fac=function(J){return new(J||ee)}}static{this.\u0275cmp=I.VBU({type:ee,selectors:[["commudle-next-step-card"]],inputs:{routerLink:"routerLink",headingText:"headingText",subHeadingText:"subHeadingText",faIcon:"faIcon",nbIcon:"nbIcon",buttonText:"buttonText"},standalone:!1,decls:14,vars:6,consts:[[1,"text"],[1,"icon"],[3,"icon",4,"ngIf"],[1,"heading"],[1,"sub-heading"],[1,"button"],[3,"routerLink"],["nbButton","","status","primary","fullWidth","","size","small"],[3,"icon"]],template:function(J,ce){1&J&&(I.j41(0,"nb-card")(1,"nb-card-body")(2,"div",0)(3,"div",1),I.DNE(4,Pe,1,1,"fa-icon",2)(5,ut,1,1,"nb-icon",2),I.k0s(),I.j41(6,"div",3),I.EFF(7),I.k0s(),I.j41(8,"div",4),I.EFF(9),I.k0s()(),I.j41(10,"div",5)(11,"a",6)(12,"button",7),I.EFF(13),I.k0s()()()()()),2&J&&(I.R7$(4),I.Y8G("ngIf",ce.faIcon),I.R7$(),I.Y8G("ngIf",ce.nbIcon),I.R7$(2),I.JRh(ce.headingText),I.R7$(2),I.JRh(ce.subHeadingText),I.R7$(2),I.Y8G("routerLink",ce.routerLink),I.R7$(2),I.SpI(" ",ce.buttonText," "))},dependencies:[_.bT,z.Wk,Be.YP2,Be.tHu,Be.SrT,Be.KH5,V.aY],styles:["nb-card[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:.5rem;margin-bottom:.5rem;height:196px;width:248px}@media (min-width: 768px){nb-card[_ngcontent-%COMP%]{margin-top:1rem;margin-bottom:1rem}}nb-card[_ngcontent-%COMP%] nb-card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;padding:.75rem;text-align:center}nb-card[_ngcontent-%COMP%] nb-card-body[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin-bottom:1rem;font-size:1.5rem;line-height:2rem}nb-card[_ngcontent-%COMP%] nb-card-body[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], nb-card[_ngcontent-%COMP%] nb-card-body[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] nb-icon[_ngcontent-%COMP%]{--tw-text-opacity: 1;color:rgb(51 102 255 / var(--tw-text-opacity, 1))}nb-card[_ngcontent-%COMP%] nb-card-body[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] nb-icon[_ngcontent-%COMP%]{font-size:1.875rem;line-height:2.25rem}nb-card[_ngcontent-%COMP%] nb-card-body[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:600;color:var(--color-yankees-blue)}nb-card[_ngcontent-%COMP%] nb-card-body[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] .sub-heading[_ngcontent-%COMP%]{font-size:.75rem;line-height:1rem;font-weight:400;color:var(--color-yankees-blue)}"]})}}return ee})()},24806:(Mt,Je,$)=>{$.d(Je,{Y:()=>V});var I=$(71027),_=$(55553),z=$(23214),Be=$(73165);let V=(()=>{class Pe{constructor(ue,ee){this.http=ue,this.apiRoutesService=ee}resolve(ue,ee){return this.http.get(this.apiRoutesService.getRoute(_.Q.ALL_QUESTION_TYPES))}static{this.\u0275fac=function(ee){return new(ee||Pe)(z.KVO(Be.Qq),z.KVO(I.Y))}}static{this.\u0275prov=z.jDH({token:Pe,factory:Pe.\u0275fac,providedIn:"root"})}}return Pe})()},39539:(Mt,Je,$)=>{$.d(Je,{w:()=>y});var I=$(81391),_=$(23214),z=$(89417),Be=$(76800),V=$(45383),Pe=$(82340),ut=$(9539),ue=$(5964),ee=$(96354),De=$(98426),xe=$(14481),J=$(98434),ce=$(93630),ft=$(60557),X=$(16042);const ke=["cdkDrag"],gt=["choiceInput"],Rt=w=>({"center-layout":w}),Et=w=>({"!com-cursor-not-allowed":w}),Ie=w=>({disable:w}),At=()=>[4,5];function Nt(w,T){if(1&w){const M=_.RV6();_.j41(0,"div")(1,"button",13),_.bIt("click",function(){_.eBV(M);const R=_.XpG(2);return _.Njj(R.cloneCommunityDataForm())}),_.EFF(2," Clone this form "),_.k0s()()}}function Ot(w,T){if(1&w&&(_.j41(0,"nb-card")(1,"nb-card-header")(2,"h3"),_.EFF(3,"Edit Form"),_.k0s(),_.nrm(4,"commudle-alert",12),_.DNE(
15,Nt,3,0,"div",2),_.k0s()()),2&w){const M=_.XpG();_.R7$(4),_.Y8G("error",!0),_.R7$(),_.Y8G("ngIf","Kommunity"===(null==M.dataForm?null:M.dataForm.parent_type))}}function le(w,T){1&w&&(_.j41(0,"span"),_.nrm(1,"commudle-alert",18),_.k0s()),2&w&&(_.R7$(),_.Y8G("errorMessage","Required Field")("error",!0))}function St(w,T){if(1&w&&(_.j41(0,"div",14)(1,"div")(2,"label",15),_.EFF(3," Form Name "),_.j41(4,"span",16),_.EFF(5,"*"),_.k0s(),_.nrm(6,"input",17),_.k0s(),_.DNE(7,le,2,2,"span",2),_.k0s()()),2&w){const M=_.XpG();_.R7$(7),_.Y8G("ngIf",M.editDataForm.get("data_form").get("name").touched&&M.editDataForm.get("data_form").get("name").invalid&&M.editDataForm.get("data_form").get("name").errors.required)}}function Bt(w,T){if(1&w&&(_.j41(0,"div",14)(1,"div",19)(2,"label",15),_.EFF(3," Description "),_.nrm(4,"editor",20),_.k0s()()()),2&w){const M=_.XpG();_.R7$(4),_.Y8G("init",M.tinyMCE)}}function dt(w,T){1&w&&_.nrm(0,"div",55)}function Ft(w,T){1&w&&(_.j41(0,"span",16),_.EFF(1,"*"),_.k0s())}function W(w,T){if(1&w&&(_.j41(0,"div",56)(1,"nb-card",57)(2,"nb-card-header",58)(3,"button",27),_.nrm(4,"nb-icon",28),_.k0s()(),_.j41(5,"nb-card-body",29)(6,"div",59)(7,"label"),_.EFF(8),_.DNE(9,Ft,2,0,"span",31),_.nrm(10,"input",60),_.k0s()()()()()),2&w){const M=_.XpG(),F=M.$implicit,R=M.index;_.R7$(),_.Y8G("formGroupName",R),_.R7$(7),_.SpI(" Question ",R+1," "),_.R7$(),_.Y8G("ngIf",F.get("required").value)}}function ve(w,T){1&w&&(_.j41(0,"span",16),_.EFF(1,"*"),_.k0s())}function H(w,T){1&w&&(_.j41(0,"div",61),_.nrm(1,"commudle-alert",62),_.k0s()),2&w&&(_.R7$(),_.Y8G("info",!0))}function oe(w,T){1&w&&(_.j41(0,"span"),_.nrm(1,"commudle-alert",18),_.k0s()),2&w&&(_.R7$(),_.Y8G("errorMessage","Required Field")("error",!0))}function te(w,T){if(1&w&&(_.j41(0,"div",63),_.nrm(1,"editor",20),_.k0s()),2&w){const M=_.XpG(2);_.R7$(),_.Y8G("init",M.tinyMCE)}}function lt(w,T){if(1&w&&(_.j41(0,"option",64),_.EFF(1),_.nI1(2,"capitalizeAndRemoveUnderscore"),_.k0s()),2&w){const M=T.$implicit;_.Y8G("ngValue",M.id),_.R7$(),_.SpI(" ",_.bMT(2,2,M.name)," ")}}function Q(w,T){1&w&&(_.j41(0,"span"),_.nrm(1,"commudle-alert",18),_.k0s()),2&w&&(_.R7$(),_.Y8G("errorMessage","Required Field")("error",!0))}function et(w,T){1&w&&(_.j41(0,"span"),_.nrm(1,"commudle-alert",18),_.k0s()),2&w&&(_.R7$(),_.Y8G("errorMessage","Required Field")("error",!0))}function Ae(w,T){if(1&w){const M=_.RV6();_.j41(0,"div",67)(1,"div",68)(2,"div",69),_.nrm(3,"input",70,0),_.j41(5,"div",71)(6,"nb-icon",72),_.bIt("click",function(){const R=_.eBV(M).index,k=_.XpG(2).index,ie=_.XpG();return _.Njj(ie.removeQuestionChoiceButtonClick(k,R))}),_.k0s()()(),_.DNE(7,et,2,2,"span",2),_.k0s()()}if(2&w){const M=T.$implicit,F=T.index,R=_.XpG(2).index;_.R7$(2),_.Y8G("formGroupName",F),_.R7$(),_.Mz_("placeholder","Choice ",F+1,""),_.Y8G("readonly",M.value.has_responses),_.BMQ("data-qi",R),_.R7$(4),_.Y8G("ngIf",M.get("title").touched&&M.get("title").invalid&&M.get("title").errors.required)}}function E(w,T){if(1&w){const M=_.RV6();_.j41(0,"div"),_.DNE(1,Ae,8,6,"div",65),_.j41(2,"button",66),_.bIt("click",function(){_.eBV(M);const R=_.XpG().index,k=_.XpG();return _.Njj(k.addQuestionChoiceButtonClick(R))}),_.nrm(3,"nb-icon",10),_.EFF(4," \xa0 Add Choice "),_.k0s()()}if(2&w){const M=_.XpG().$implicit;_.R7$(),_.Y8G("ngForOf",M.controls.question_choices.controls)}}function x(w,T){if(1&w){const M=_.RV6();_.j41(0,"button",73),_.bIt("click",function(){_.eBV(M);const R=_.XpG().index,k=_.XpG();return _.Njj(k.removeQuestionButtonClick(R))}),_.nrm(1,"nb-icon",74),_.EFF(2," Delete "),_.k0s()}}function v(w,T){if(1&w){const M=_.RV6();_.j41(0,"div",21),_.DNE(1,dt,1,0,"div",22)(2,W,11,3,"div",23),_.j41(3,"div",24)(4,"nb-card",25)(5,"nb-card-header",26)(6,"button",27),_.nrm(7,"nb-icon",28),_.k0s()(),_.j41(8,"nb-card-body",29)(9,"div")(10,"div",30)(11,"div")(12,"label"),_.EFF(13),_.DNE(14,ve,2,0,"span",31),_.nrm(15,"input",32),_.k0s(),_.DNE(16,H,2,1,"div",33)(17,oe,2,2,"span",2),_.k0s()(),_.DNE(18,te,2,1,"div",34),_.j41(19,"div",35)(20,"button",36),_.bIt("click",function(){const R=_.eBV(M).index,k=_.XpG();return _.Njj(k.toggleDescriptionField(R))}),_.nrm(21,"nb-icon",37),_.EFF(22),_.k0s(),_.j41(23,"div",38)(24,"div",39),_.nrm(25,"nb-icon",40),_.j41(26,"select",41),_.bIt("change",function(R){const k=_.eBV(M).index,ie=_.XpG();return _.Njj(ie.questionTypeChange(R,k))}),_.DNE(27,lt,3,4,"option",42),_.k0s()(),_.DNE(28,Q,2,2,"span",2),_.k0s()(),_.DNE(29,E,5,1,"div",2),_.k0s(),_.j41(30,"div",43)(31,"div",44)(32,"button",45),_.bIt("click",function(){const R=_.eBV(M).index,k=_.XpG();return _.Njj(k.addQuestionButtonClick(R+1))}),_.nrm(33,"nb-icon",46),_.EFF(34," \xa0 "),_.j41(35,"span"),_.EFF(36,"Add Question Below"),_.k0s()(),_.j41(37,"div",47)(38,"nb-checkbox",48)(39,"span",49),_.EFF(40,"Required"),_.k0s()(),_.j41(41,"nb-checkbox",50)(42,"span",49),_.EFF(43,"Disable this question "),_.k0s()()()(),_.DNE(44,x,3,0,"button",51),_.j41(45,"div",52)(46,"button",53),_.bIt("click",function(){const R=_.eBV(M).index,k=_.XpG();return _.Njj(k.setContextIndex(R))}),_.nrm(47,"nb-icon",54),_.k0s()()()()()()()}if(2&w){let M,F,R;const k=T.$implicit,ie=T.index,ae=_.XpG();_.R7$(4),_.Y8G("formGroupName",ie),_.R7$(9),_.SpI(" Question ",ie+1," "),_.R7$(),_.Y8G("ngIf",k.get("required").value),_.R7$(),_.Y8G("readonly",k.get("has_responses").value),_.R7$(),_.Y8G("ngIf",k.get("has_responses").value),_.R7$(),_.Y8G("ngIf",k.get("title").touched&&k.get("title").invalid&&k.get("title").errors.required),_.R7$(),_.Y8G("ngIf",null==k||null==(M=k.get("show_description"))?null:M.value),_.R7$(3),_.Y8G("icon",null!=k&&null!=(F=k.get("show_description"))&&F.value?"close-outline":"plus-outline"),_.R7$(),_.SpI(" ",null!=k&&null!=(R=k.get("show_description"))&&R.value?"Remove Description":"Add Description"," "),_.R7$(2),_.Y8G("ngClass",_.eq3(18,Et,k.get("has_responses").value)),_.R7$(2),_.Y8G("ngClass",_.eq3(20,Ie,k.get("has_responses").value)),_.R7$(),_.Y8G("ngForOf",ae.questionTypes),_.R7$(),_.Y8G("ngIf",k.get("question_type_id").invalid&&k.get("question_type_id").errors.required),_.R7$(),_.Y8G("ngIf",_.lJ4(22,At).includes(k.get("question_type_id").value)),_.R7$(15),_.Y8G("ngIf",!k.get("has_responses").value),_.R7$(2),_.Mz_("nbContextMenuTag","data-form-question-context-menu-",ie,""),_.Y8G("nbContextMenu",ae.menuItem)}}function g(w,T){if(1&w){const M=_.RV6();_.j41(0,"div",75)(1,"button",76),_.bIt("click",function(){_.eBV(M);const R=_.XpG();return _.Njj(R.updateDataForm())}),_.EFF(2),_.k0s()()}if(2&w){const M=_.XpG();_.R7$(2),_.SpI(" ",M.submitButtonText()," ")}}let y=(()=>{class w{constructor(M,F,R,k,ie,ae,me){this.dataFormsService=M,this.activatedRoute=F,this.fb=R,this.toastLogService=k,this.router=ie,this.seoService=ae,this.NbmenuService=me,this.showNameDescriptionFiled=!0,this.centerLayout=!0,this.showSubmitButton=!0,this.showDescriptionField=!0,this.showNameField=!0,this.updateFormDataEvent=new _.bkB,this.faTrashAlt=V.BeE,this.faPlus=V.QLR,this.questionContextMenuIndex=-1,this.questionDescription=[],this.menuItem=[{title:"Add Question Below",icon:"plus-circle-outline"},{title:"Delete Question",icon:"trash-outline"}],this.tinyMCE={placeholder:"(Optional)",min_height:100,menubar:!1,convert_urls:!1,statusbar:!1,toolbar:!1,plugins:["autoresize"],content_style:"@import url('https://fonts.googleapis.com/css?family=Inter'); body {font-family: 'Inter'; font-size: 16px !important;}",license_key:"gpl"}}get questions(){return this.editDataForm.get("data_form").get("questions")}get question_choices(){return this.fb.group({title:["",z.k0.required]})}
1ngOnInit(){this.seoService.noIndex(!0),this.questionDescription[0]=!1,this.handleContextMenu(),this.activatedRoute.data.subscribe(M=>{this.questionTypes=M.questionTypes.question_types}),this.editDataForm=this.fb.group({data_form:this.fb.group({id:[""],name:["",z.k0.required],description:[""],questions:this.fb.array([])})})}ngOnDestroy(){this.seoService.noIndex(!1)}ngOnChanges(){this.dataFormsService.getDataFormDetails(this.dataFormId).subscribe(M=>{this.dataForm=M,this.seoService.setTitle(`Edit ${this.dataForm.name} Form`),this.fillExistingDataForm()})}drop(M){(0,I.HD)(this.editDataForm.controls.data_form.controls.questions.controls,M.previousIndex,M.currentIndex)}initQuestion(){return this.fb.group({question_type_id:[1,z.k0.required],title:["",z.k0.required],description:[""],required:[!1],disabled:[!1],has_responses:[!1],question_choices:this.fb.array([]),show_description:[!1]})}initQuestionChoice(){return this.fb.group({id:[""],title:["",z.k0.required],has_responses:[!1]})}addQuestionButtonClick(M){this.editDataForm.get("data_form").get("questions").insert(M,this.initQuestion()),this.questionDescription[M]=!1}addQuestionChoiceButtonClick(M){this.editDataForm.get("data_form").get("questions").controls[M].get("question_choices").push(this.initQuestionChoice()),setTimeout(()=>{const k=this.choiceInputs.toArray().filter(ie=>ie.nativeElement.dataset.qi===String(M)).pop();k?.nativeElement.scrollIntoView({block:"nearest"}),k?.nativeElement.focus({preventScroll:!0})},0)}removeQuestionButtonClick(M){this.editDataForm.get("data_form").get("questions").removeAt(M),this.questionDescription.splice(M,M+1)}removeQuestionChoiceButtonClick(M,F){this.editDataForm.get("data_form").get("questions").controls[M].get("question_choices").removeAt(F)}questionTypeChange(M,F){if(![4,5].includes(M.target.value)){const R=this.editDataForm.get("data_form").get("questions").controls[F].get("question_choices").length;for(let k=0;k<R;k++)this.editDataForm.get("data_form").get("questions").controls[F].get("question_choices").removeAt(0)}}submitButtonText(){return this.editDataForm.valid?"Save":"Form Is Incomplete"}fillExistingDataForm(){this.editDataForm.get("data_form").patchValue({id:this.dataForm.id,name:this.dataForm.name,description:this.dataForm.description}),this.editDataForm.get("data_form").setControl("questions",this.setDataFormQuestions(this.dataForm.questions))}setDataFormQuestions(M){const F=new z.Yp([]);return M.forEach(R=>{const k=this.fb.group({id:R.id,question_type_id:[{value:R.question_type_id,disabled:R.has_responses}],title:[R.title],description:[R.description],required:[R.required],disabled:[R.disabled],has_responses:R.has_responses,question_choices:this.fb.array([this.initQuestionChoice()]),show_description:[!!R.description]});k.setControl("question_choices",this.setQuestionChoices(R.question_choices)),F.push(k)}),F}setQuestionChoices(M){const F=new z.Yp([]);return M.forEach(R=>{F.push(this.fb.group({id:[R.id],title:[R.title],has_responses:R.has_responses}))}),F}updateDataForm(){this.editDataForm.invalid?this.editDataForm.markAllAsTouched():this.updateFormDataEvent.emit(this.editDataForm.getRawValue().data_form)}cloneCommunityDataForm(){this.dataFormsService.cloneCommunityForm(this.dataForm.id).subscribe(M=>{this.router.navigate(["/forms",M.id,"edit"]),this.toastLogService.successDialog("Form Cloned!")})}toggleDescriptionField(M){const R=this.editDataForm.get("data_form").get("questions").at(M),k=R?.get("show_description")?.value;R.patchValue({show_description:!k})}setContextIndex(M){this.questionContextMenuIndex=M}handleContextMenu(){this.NbmenuService.onItemClick().pipe((0,ue.p)(({tag:M})=>M===`data-form-question-context-menu-${this.questionContextMenuIndex}`),(0,ee.T)(({item:M})=>M)).subscribe(M=>{switch(M.title){case"Add Question Below":this.addQuestionButtonClick(this.questionContextMenuIndex+1);break;case"Delete Question":this.removeQuestionButtonClick(this.questionContextMenuIndex)}})}static{this.\u0275fac=function(F){return new(F||w)(_.rXU(Pe.x),_.rXU(De.nX),_.rXU(z.ok),_.rXU(ut.w),_.rXU(De.Ix),_.rXU(Be.B2),_.rXU(xe.BgA))}}static{this.\u0275cmp=_.VBU({type:w,selectors:[["commudle-edit-d
1ata-form"]],viewQuery:function(F,R){if(1&F&&(_.GBs(ke,5),_.GBs(gt,5)),2&F){let k;_.mGM(k=_.lsd())&&(R.cdkDrag=k.first),_.mGM(k=_.lsd())&&(R.choiceInputs=k)}},inputs:{dataFormId:"dataFormId",showNameDescriptionFiled:"showNameDescriptionFiled",centerLayout:"centerLayout",showSubmitButton:"showSubmitButton",showDescriptionField:"showDescriptionField",showNameField:"showNameField"},outputs:{updateFormDataEvent:"updateFormDataEvent"},standalone:!1,features:[_.OA$],decls:15,vars:9,consts:[["choiceInput",""],[1,"data-form-container",3,"ngClass"],[4,"ngIf"],[1,"edit-data-form",3,"formGroup"],["formGroupName","data_form"],[1,"card-body"],["role","group",4,"ngIf"],["cdkDropList","",3,"cdkDropListDropped"],["cdkDrag","",4,"ngFor","ngForOf"],["nbButton","","size","medium","status","primary",1,"add-question-button",3,"click"],["icon","plus-outline"],["class","submit-button",4,"ngIf"],["errorMessage","Some questions might be uneditable because this form has responses",3,"error"],["nbButton","","outline","","size","medium","status","info",1,"clone-form-button",3,"click"],["role","group"],["fullWidth",""],[1,"required-question"],["formControlName","name","fullWidth","","nbInput","","placeholder","Title","type","text"],[3,"errorMessage","error"],[1,"description"],["formControlName","description",1,"editor",3,"init"],["cdkDrag",""],["class","custom-placeholder",4,"cdkDragPlaceholder"],["class","custom-preview","formArrayName","questions",4,"cdkDragPreview"],["formArrayName","questions"],[1,"questions-form-section",3,"formGroupName"],["cdkDragHandle","",1,"drag-button"],["ghost","","nbButton","","size","small"],["icon","move-outline"],[1,"questions-form-section-body"],[1,"question-container"],["class","required-question",4,"ngIf"],["formControlName","title","fullWidth","","nbInput","","placeholder","Title*","required","","type","text",3,"readonly"],["class","has-response-info",4,"ngIf"],["class","description-textbox",4,"ngIf"],[1,"field"],["outline","","size","small","status","basic","nbButton","",1,"add-description-button",3,"click"],[3,"icon"],[1,"question-settings"],[1,"dropdown",3,"ngClass"],["icon","question-mark-circle-outline","nbPrefix",""],["formControlName","question_type_id",1,"com-border-0",3,"change","ngClass"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"question-form-footer"],[1,"required-below"],["ghost","","nbButton","","size","small",1,"footer-icons","add-question-footer",3,"click"],["icon","plus-circle-outline","status","basic",1,"footer-icons"],[1,"toggles"],["formControlName","required","labelPosition","right","size","tiny",1,"toggle"],[1,"required-text"],["formControlName","disabled","labelPosition","right","size","tiny",1,"toggle"],["class","footer-icons delete-question-footer","ghost","","nbButton","","size","small","status","danger",3,"click",4,"ngIf"],[1,"context-menu"],["nbButton","",1,"context-menu",3,"click","nbContextMenu","nbContextMenuTag"],["icon","more-vertical-outline",1,"com-mb-8"],[1,"custom-placeholder"],["formArrayName","questions",1,"custom-preview"],[1,"questions-form-section","com-w-80","md:com-w-500px",3,"formGroupName"],[1,"com-p-0","com-flex","com-justify-center"],[1,"custom-question-container"],["formControlName","title","fullWidth","","nbInput","","placeholder","Title","required","","type","text","size","medium"],[1,"has-response-info"],["message"," This question cannot be edited because it already has responses, however you can disable it if\n needed.",3,"info"],[1,"description-textbox"],[3,"ngValue"],["class","choices-container","formArrayName","question_choices",4,"ngFor","ngForOf"],["hero","","nbButton","","size","tiny","status","primary",1,"add-choice-button",3,"click"],["formArrayName","question_choices",1,"choices-container"],[1,"choice-container"],[1,"required-choice",3,"formGroupName"],["formControlName","title","nbInput","","required","","type","text",3,"readonly","placeholder"],[1,"close-circle-outline"],["icon","close-circle-outline",1,"required-cross",3,"click"],["ghost","","nbButton","","size","small","status","danger",1,"footer-icons","delete-question-footer",3,"click"],["icon","trash-outline","status","danger"],[1,"submit-button"],["shape","semi-round","fullWidth","","nbButton","","size","medium","status","primary","type","submit",3,"click"]],template:function(F,R){1&F&&(_.j41(0,"div",1),_.DNE(1,Ot,6,2,"nb-card",2),_.j41(2,"form",3)(3,"div",4)(4,"nb-card")(5,"nb-card-body",5),_.DNE(6,St,8,1,"div",6)(7,Bt,5,1,"div",6),_.k0s()(),_.j41(8,"div",7),_.bIt("cdkDropListDropped",function(ie){return R.drop(ie)}),_.DNE(9,v,48,23,"div",8),_.j41(10,"div")(11,"button",9),_.bIt("click",function(){return R.addQuestionButtonClick(R.editDataForm.controls.data_form.controls.questions.controls.length+1)}),_.nrm(12,"nb-icon",10),_.EFF(13," Add Question "),_.k0s()()(),_.DNE(14,g,3,1,"div",11),_.k0s()()()),2&F&&(_.Y8G("ngClass",_.eq3(7,Rt,R.centerLayout)),_.R7$(),_.Y8G("ngIf",R.showNameDescriptionFiled),_.R7$(),_.Y8G("formGroup",R.editDataForm),_.R7$(4),_.Y8G("ngIf",R.showNameField),_.R7$(),_.Y8G("ngIf",R.showDescriptionField),_.R7$(2),_.Y8G("ngForOf",R.editDataForm.controls.data_form.controls.questions.controls),_.R7$(5),_.Y8G("ngIf",R.showSubmitButton))},dependencies:[J.YU,J.Sq,J.bT,z.qT,z.xH,z.y7,z.me,z.wz,z.BC,z.cb,z.YS,z.j4,z.JD,z.$R,z.v8,xe.YP2,xe.tHu,xe.i6h,xe.SrT,xe.KH5,xe.zJv,xe.DMy,xe.IEe,xe.yUn,I.O7,I.T1,I.Fb,I.r0,I.EM,ce.xn,ft.C,X.I],styles:["[_nghost-%COMP%] .clone-form-button[_ngcontent-%COMP%]{margin-top:1rem}[_nghost-%COMP%] .required-question[_ngcontent-%COMP%]{margin-left:2px;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}[_nghost-%COMP%] div.data-form-container.center-layout[_ngcontent-%COMP%]{max-width:920px;margin:0 auto}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .submit-button[_ngcontent-%COMP%]{margin-left:.5rem;margin-right:.5rem}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{padding:1rem}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:0}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] label[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{margin-top:.5rem}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:1rem;line-height:1.5rem;font-weight:500;color:var(--color-yankees-blue)}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border-radius:.5rem;background-color:var(--color-Ghost-White);font-size:.875rem;line-height:1.25rem;font-weight:500;color:var(--color-gray-500)}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .data-form-question-choices-container[_ngcontent-%COMP%]{margin-bottom:0}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .add-question-button[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:1rem;border-radius:10px;--tw-border-opacity: 1;border-color:rgb(51 102 255 / var(--tw-border-opacity, 1));background-color:var(--color-white);font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(51 102 255 / var(--tw-text-opacity, 1))}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .custom-placeholder[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1);min-height:120px;min-width:100%;border-radius:.75rem;border-width:0px;--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .question-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-start;font-size:1.125rem;line-height:1.75rem;font-weight:500}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .question-container[_ngcontent-%COMP%] .required-question[_ngcontent-%COMP%]{margin-left:2px;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .question-container[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{margin-bottom:0;margin-top:.25rem}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .question-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:0}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .question-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:1.125rem;line-height:1.75rem;font-weight:500}[_nghost-%COMP%] div.data-form-container[_ngcontent-%COMP%] .question-container[_ngcontent-%COMP%] .description-textbox[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .drag-button[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:0}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .drag-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:move}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%]{margin-top:3rem;display:flex;align-items:center;justify-content:space-between}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not([hidden]) ~ [_ngcontent-%COMP%]:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%]{vertical-align:middle}@media (min-width: 640px){[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%]{flex-direction:column}}@media (min-width: 768px){[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%]{flex-direction:row}}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] .add-question-footer[_ngcontent-%COMP%]{padding-left:1px;padding-right:1rem;font-size:.875rem;line-height:1.25rem;font-weight:400;color:var(--color-gray-900)}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] .add-question-footer[_ngcontent-%COMP%] nb-icon[_ngcontent-%COMP%]{height:1.25rem;width:1.25rem;color:var(--color-gray-500)}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:block;padding-left:0;font-size:.875rem;line-height:1.25rem;font-weight:500}@media (min-width: 768px){[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{margin-left:-.5rem;display:flex;padding-left:1rem}}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--color-black)}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] .delete-question-footer[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(255 61 113 / var(--tw-text-opacity, 1))}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] .delete-question-footer[_ngcontent-%COMP%] nb-icon[_ngcontent-%COMP%]{height:1.25rem;width:1.25rem}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] nb-card-body[_ngcontent-%COMP%]{padding:1rem}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] .context-menu[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}@media (min-width: 768px){[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] .context-menu[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%] .questions-form-section[_ngcontent-%COMP%] .question-form-footer[_ngcontent-%COMP%] .context-menu[_ngcontent-%COMP%] .context-button[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.has-response-info[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:.5rem}.field[_ngcontent-%COMP%]{margin-top:1rem;display:flex;align-items:center;column-gap:1rem}.field[_ngcontent-%COMP%] .add-description-button[_ngcontent-%COMP%]{display:none;border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--color-bright-gray);background-color:var(--color-white);font-size:.875rem;line-height:1.25rem;font-weight:500;color:var(--color-yankees-blue)}@media (min-width: 768px){.field[_ngcontent-%COMP%] .add-description-button[_ngcontent-%COMP%]{display:flex}}.field[_ngcontent-%COMP%] .add-description-button[_ngcontent-%COMP%] nb-icon[_ngcontent-%COMP%]{margin-right:.25rem;height:1rem;width:1rem}.field[_ngcontent-%COMP%] .question-settings[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:flex-start}@media (min-width: 768px){.field[_ngcontent-%COMP%] .question-settings[_ngcontent-%COMP%]{width:auto}}.field[_ngcontent-%COMP%] .question-settings[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%]{position:relative;display:flex;height:2rem;width:100%;cursor:pointer;align-items:center;border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--color-bright-gray);background-color:var(--color-white);padding:.75rem;color:var(--color-yankees-blue)}@media (min-width: 768px){.field[_ngcontent-%COMP%] .question-settings[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%]{width:172px}}.field[_ngcontent-%COMP%] .question-settings[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%] nb-icon[_ngcontent-%COMP%]{pointer-events:none;position:relative;z-index:10;margin-right:.25rem;height:1rem;width:1rem}.field[_ngcontent-%COMP%] .question-settings[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;cursor:pointer;border-radius:.5rem;border-width:0px;background-color:var(--color-white);padding-left:2rem;font-size:.875rem;line-height:1.25rem;font-weight:500;color:var(--color-yankees-blue)}@media (min-width: 768px){.field[_ngcontent-%COMP%] .question-settings[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:auto}}.field[_ngcontent-%COMP%] .question-settings[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%] select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem;color:var(--color-yankees-blue)}.field[_ngcontent-%COMP%] .question-settings[_ngcontent-%COMP%] .dropdown[_ngcontent-%COMP%] .disable[_ngcontent-%COMP%]{pointer-events:none;cursor:none}.required-question[_ngcontent-%COMP%]{margin-left:2px;font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 61 113 / var(--tw-text-opacity, 1))}.required-choice[_ngcontent-%COMP%]{display:flex;align-items:center}.required-cross[_ngcontent-%COMP%]{margin-left:.5rem}.required-below[_ngcontent-%COMP%]{display:flex;vertical-align:middle}.add-choice-button[_ngcontent-%COMP%]{margin-top:.75rem}.toggles[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding-left:0}@media (min-width: 768px){.toggles[_ngcontent-%COMP%]{padding-left:1rem}}.footer-icons[_ngcontent-%COMP%]{display:none}@media (min-width: 768px){.footer-icons[_ngcontent-%COMP%]{display:flex}}.choices-container[_ngcontent-%COMP%]{margin-top:1.25rem;display:flex;flex-direction:column;justify-content:flex-start;font-size:1.25rem;line-height:1.75rem;font-weight:600}.choices-container[_ngcontent-%COMP%] .choice-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.choices-container[_ngcontent-%COMP%] .choice-container[_ngcontent-%COMP%] nb-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1.5rem}.edit-data-form[_ngcontent-%COMP%] nb-card[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:1rem;margin-bottom:1rem}.required-text[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem;font
1-weight:400;color:var(--color-gray-900)}.questions-form-section-body[_ngcontent-%COMP%]{padding:1rem}"]})}}return w})()},59099:(Mt,Je,$)=>{$.d(Je,{u:()=>Ft});var I=$(23214),_=$(98434),z=$(20060),Be=$(45383);const V=[[["","slot","expanded-content"]]],Pe=["[slot=expanded-content]"],ut=W=>({column:W}),ue=()=>[],ee=(W,ve,H)=>({row:W,column:ve,value:H}),De=(W,ve)=>ve.key,xe=(W,ve)=>ve.id;function J(W,ve){1&W&&I.eu8(0)}function ce(W,ve){if(1&W&&I.DNE(0,J,1,0,"ng-container",10),2&W){const H=I.XpG().$implicit;I.Y8G("ngTemplateOutlet",H.headerTemplate)("ngTemplateOutletContext",I.eq3(2,ut,H))}}function ft(W,ve){if(1&W&&(I.j41(0,"div"),I.nrm(1,"fa-icon",12),I.k0s()),2&W){const H=I.XpG(3);I.R7$(),I.Y8G("icon",H.icons.faPieChart)}}function X(W,ve){if(1&W&&(I.j41(0,"div",8)(1,"div",11)(2,"p"),I.EFF(3),I.k0s(),I.DNE(4,ft,2,1,"div"),I.k0s()()),2&W){const H=I.XpG().$implicit;I.R7$(3),I.JRh(H.title),I.R7$(),I.vxM(H.filterable?4:-1)}}function ke(W,ve){if(1&W){const H=I.RV6();I.j41(0,"div",13),I.bIt("mousedown",function(te){I.eBV(H);const lt=I.XpG().$implicit,Q=I.XpG();return I.Njj(Q.startResize(te,lt.key))}),I.k0s()}}function gt(W,ve){if(1&W&&(I.j41(0,"th",7),I.DNE(1,ce,1,4,"ng-container")(2,X,5,2,"div",8)(3,ke,1,0,"div",9),I.k0s()),2&W){const H=ve.$implicit,oe=I.XpG();I.xc7("width",H.width),I.AVh("frozen-column",H.frozen&&oe.config.frozenColumns),I.BMQ("data-column",H.key),I.R7$(),I.vxM(H.headerTemplate?1:2),I.R7$(2),I.vxM(H.resizable&&oe.config.resizableColumns?3:-1)}}function Rt(W,ve){1&W&&I.nrm(0,"div")}function Et(W,ve){if(1&W&&(I.j41(0,"tr",5)(1,"td",14)(2,"div",15)(3,"div",16)(4,"div",17),I.DNE(5,Rt,1,0,"div",18),I.k0s()(),I.j41(6,"p"),I.EFF(7),I.k0s()()()()),2&W){const H=I.XpG();I.R7$(),I.BMQ("colspan",H.getColumnCount()),I.R7$(4),I.Y8G("ngForOf",I.lJ4(3,ue).constructor(5)),I.R7$(2),I.JRh(H.config.loadingMessage||"Loading...")}}function Ie(W,ve){if(1&W&&(I.j41(0,"tr",6)(1,"td",19)(2,"p"),I.EFF(3),I.k0s()()()),2&W){const H=I.XpG();I.R7$(),I.BMQ("colspan",H.getColumnCount()),I.R7$(2),I.JRh(H.config.emptyMessage||"No entries found")}}function At(W,ve){1&W&&I.eu8(0)}function Nt(W,ve){if(1&W&&I.DNE(0,At,1,0,"ng-container",10),2&W){const H=I.XpG().$implicit,oe=I.XpG().$implicit,te=I.XpG(2);I.Y8G("ngTemplateOutlet",H.cellTemplate)("ngTemplateOutletContext",I.sMw(2,ee,oe,H,te.getCellValue(oe,H)))}}function Ot(W,ve){if(1&W&&(I.j41(0,"div",23)(1,"p"),I.EFF(2),I.k0s()()),2&W){const H=I.XpG().$implicit,oe=I.XpG().$implicit,te=I.XpG(2);I.R7$(2),I.JRh(te.getCellValue(oe,H))}}function le(W,ve){if(1&W&&(I.j41(0,"td"),I.DNE(1,Nt,1,6,"ng-container")(2,Ot,3,1,"div",23),I.k0s()),2&W){const H=ve.$implicit,oe=ve.$index,te=I.XpG(3);I.AVh("frozen-column",H.frozen&&te.config.frozenColumns)("frozen-shadow",H.frozen&&te.config.frozenColumns&&0===oe)("no-padding",H.noPadding||te.config.noCellPadding)("border-right","right"===te.config.cellBorders)("border-bottom","bottom"===te.config.cellBorders)("border-right-bottom","both"===te.config.cellBorders),I.BMQ("data-column",H.key),I.R7$(),I.vxM(H.cellTemplate?1:2)}}function St(W,ve){if(1&W&&(I.j41(0,"tr",22)(1,"td",24)(2,"div",25),I.SdG(3),I.k0s()()()),2&W){const H=I.XpG(3);I.R7$(),I.BMQ("colspan",H.getColumnCount())}}function Bt(W,ve){if(1&W&&(I.j41(0,"tr",20),I.Z7z(1,le,3,14,"td",21,De),I.k0s(),I.DNE(3,St,4,1,"tr",22)),2&W){const H=ve.$implicit,oe=I.XpG(2);I.AVh("expanded",oe.isRowExpanded(H.id)),I.R7$(),I.Dyx(oe.columns),I.R7$(2),I.vxM(oe.config.expandableRows&&oe.isRowExpanded(H.id)?3:-1)}}function dt(W,ve){if(1&W&&I.Z7z(0,Bt,4,3,null,null,xe),2&W){const H=I.XpG();I.Dyx(H.rows)}}let Ft=(()=>{class W{constructor(){this.columns=[],this.rows=[],this.config={},this.isLoading=!1,this.rowExpand=new I.bkB,this.columnResize=new I.bkB,this.icons={faPieChart:Be.EMU},this.expandedRows=new Set,this.isResizing=!1,this.resizingColumn="",this.defaultConfig={expandableRows:!1,resizableColumns:!0,frozenColumns:!0,emptyMessage:"No entries found",loadingMessage:"Loading...",noCellPadding:!1,cellBorders:"none"}}ngOnInit(){this.config={...this.defaultConfig,...this.config}}toggleExpandRow(H){this.expandedRows.has(H.id)?this.expandedRows.delete(H.id):this.expandedRows.add(H.id),this.rowExpand.emit(H)}isRowExpanded(H){return this.expandedRows.has(H)}startResize(H,oe){if(!this.config.resizableColumns)return;H.preventDefault(),H.stopPropagation(),this.isResizing=!0,this.resizingColumn=oe;const te=H.clientX,et=H.target.closest("th").offsetWidth,Ae=x=>{const g=Math.max(100,et+(x.clientX-te));this.updateColumnWidth(oe,g),this.columnResize.emit({column:oe,width:g})},E=()=>{this.isResizing=!1,this.resizingColumn="",document.removeEventListener("mousemove",Ae),document.removeEventListener("mouseup",E)};document.addEventListener("mousemove",Ae),document.addEventListener("mouseup",E)}updateColumnWidth(H,oe){const te=document.querySelector(`th[data-column="${H}"]`);te&&(te.style.width=`${oe}px`,te.style.minWidth=`${oe}px`,te.style.maxWidth=`${oe}px`),document.querySelectorAll(`td[data-column="${H}"]`).forEach(et=>{et.style.width=`${oe}px`,et.style.minWidth=`${oe}px`,et.style.maxWidth=`${oe}px`});const Q=this.columns.find(et=>et.key===H);Q&&(Q.width=`${oe}px`)}getColumnCount(){return this.columns.length}getCellValue(H,oe){return H[oe.key]||""}ngOnDestroy(){this.isResizing&&(this.isResizing=!1,this.resizingColumn="")}static{this.\u0275fac=function(oe){return new(oe||W)}}static{this.\u0275cmp=I.VBU({type:W,selectors:[["commudle-data-table"]],inputs:{columns:"columns",rows:"rows",config:"config",isLoading:"isLoading"},outputs:{rowExpand:"rowExpand",columnResize:"columnResize"},ngContentSelectors:Pe,decls:10,vars:3,consts:[[1,"custom-table-wrapper"],[1,"custom-data-table"],[1,"table-header"],[1,"resizable-column",3,"frozen-column","width"],[1,"table-body"],[1,"loading-row"],[1,"empty-row"],[1,"resizable-column"],[1,"header-column-template"],[1,"resize-handle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"com-flex","com-gap-3","com-items-center"],[3,"icon"],[1,"resize-handle",3,"mousedown"],[1,"loading-cell"],[1,"loading-indicator"],[1,"loading"],[1,"spinner"],[4,"ngFor","ngForOf"],[1,"empty-cell"],[1,"table-row"],[3,"frozen-column","frozen-sha
1dow","no-padding","border-right","border-bottom","border-right-bottom"],[1,"expanded-row"],[1,"row-cell"],[1,"expanded-content"],[1,"expanded-details"]],template:function(oe,te){1&oe&&(I.NAR(V),I.j41(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),I.Z7z(4,gt,4,7,"th",3,De),I.k0s()(),I.j41(6,"tbody",4),I.DNE(7,Et,8,4,"tr",5)(8,Ie,4,2,"tr",6)(9,dt,2,0),I.k0s()()()),2&oe&&(I.R7$(),I.AVh("resizing",te.isResizing),I.R7$(3),I.Dyx(te.columns),I.R7$(3),I.vxM(te.isLoading?7:0===te.rows.length?8:9))},dependencies:[_.MD,_.Sq,_.T3,z.dX,z.aY],styles:['@charset "UTF-8";[_nghost-%COMP%]{position:relative;height:100%;overflow:hidden}@media screen and (max-width: 800px){[_nghost-%COMP%] .desktop-hidden[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .mobile-hidden[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .view-mobile-response[_ngcontent-%COMP%]{margin-top:.5rem;display:block}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th.frozen-column[_ngcontent-%COMP%]{position:static;background-color:var(--color-gray-50);
1min-width:200px}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td.frozen-column[_ngcontent-%COMP%]{position:static;z-index:20;background-color:var(--color-white);min-width:200px}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td.frozen-shadow[_ngcontent-%COMP%]{box-shadow:none;border-right:none}}@media screen and (min-width: 800px){[_nghost-%COMP%] .desktop-hidden[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .mobile-hidden[_ngcontent-%COMP%]{display:block}}[_nghost-%COMP%] .loading-indicator[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center}[_nghost-%COMP%] .loading-indicator[_ngcontent-%COMP%] -shadowcsshost{display:block;text-align:center}[_nghost-%COMP%] .loading-indicator[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{display:block;text-align:center}[_nghost-%COMP%] .loading-indicator[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{height:40px}[_nghost-%COMP%] .loading-indicator[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_stretch-delay 1.2s infinite ease-in-out;background-color:#5c6972;display:inline-block;height:100%;margin:0 1px;width:4px}[_nghost-%COMP%] .loading-indicator[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(2){animation-delay:-1.1s}[_nghost-%COMP%] .loading-indicator[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(3){animation-delay:-1s}[_nghost-%COMP%] .loading-indicator[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(4){animation-delay:-.9s}[_nghost-%COMP%] .loading-indicator[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(5){animation-delay:-.8s}@keyframes _ngcontent-%COMP%_stretch-delay{0%,40%,to{transform:scaleY(.4)}20%{transform:scaleY(1)}}[_nghost-%COMP%] .loading-indicator[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--color-gray-600)}[_nghost-%COMP%] .empty-message[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center;justify-content:center}[_nghost-%COMP%] .empty-message[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:1.125rem;line-height:1.75rem;color:var(--color-gray-600)}[_nghost-%COMP%] .custom-table-wrapper[_ngcontent-%COMP%]{position:relative;height:100%;overflow:auto;min-height:400px}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;background-color:var(--color-white);border-spacing:0;table-layout:fixed}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%]{position:sticky;top:0;z-index:20;background-color:var(--color-white);--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
1--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));background-color:var(--color-gray-50);padding:1rem;text-align:left;font-weight:500;color:var(--color-gray-700);min-width:200px;position:relative}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th.frozen-column[_ngcontent-%COMP%]{position:sticky;left:0;z-index:30;background-color:var(--color-gray-50);min-width:360px}@media screen and (max-width: 800px){[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th.frozen-column[_ngcontent-%COMP%]{position:static;min-width:200px}}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th.frozen-shadow[_ngcontent-%COMP%]{border-width:0px;border-right-width:1px;border-style:solid;border-color:var(--color-bright-gray)}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] .loading-row[_ngcontent-%COMP%] .loading-cell[_ngcontent-%COMP%]{padding:0;padding-top:5rem;padding-bottom:5rem;vertical-align:middle}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] .empty-row[_ngcontent-%COMP%]:hover{background-color:transparent}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] .empty-row[_ngcontent-%COMP%] .empty-cell[_ngcontent-%COMP%]{padding:0;padding-top:5rem;padding-bottom:5rem;text-align:center;vertical-align:middle}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] .empty-row[_ngcontent-%COMP%] .empty-cell[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1rem;line-height:1.5rem;color:var(--color-gray-600)}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom-width:1px;border-color:var(--color-gray-100)}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:var(--color-gray-50)}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr.expanded[_ngcontent-%COMP%]{background-color:var(--color-blue-50)}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom-width:1px;border-color:var(--color-gray-100);padding:1rem;vertical-align:top;
1min-width:200px;max-height:120px;overflow-y:auto;position:relative}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.no-padding[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.border-right[_ngcontent-%COMP%]{border-width:0px;border-right-width:1px;border-style:solid;border-color:var(--color-bright-gray)}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.border-bottom[_ngcontent-%COMP%]{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--color-bright-gray)}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.border-right-bottom[_ngcontent-%COMP%]{border-width:0px;border-right-width:1px;border-bottom-width:1px;border-style:solid;border-color:var(--color-bright-gray)}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.frozen-column[_ngcontent-%COMP%]{position:sticky;left:0;z-index:20;background-color:var(--color-white);min-width:360px}@media screen and (max-width: 800px){[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.frozen-column[_ngcontent-%COMP%]{position:static;
1min-width:200px}}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.frozen-shadow[_ngcontent-%COMP%]{box-shadow:2px 0 8px #00000026;border-right:2px solid #e5e7eb}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.expand-cell[_ngcontent-%COMP%]{width:auto;min-width:auto}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] .expanded-row[_ngcontent-%COMP%]{background-color:var(--color-blue-50)}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] .expanded-row[_ngcontent-%COMP%] .expanded-content[_ngcontent-%COMP%]{padding:1.5rem}[_nghost-%COMP%] .custom-data-table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] .expanded-row[_ngcontent-%COMP%] .expanded-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}[_nghost-%COMP%] .header-column-template[_ngcontent-%COMP%] .registration-status-filter[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap}[_nghost-%COMP%] .header-column-template[_ngcontent-%COMP%] .registration-status-filter[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{cursor:pointer;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:.25rem}[_nghost-%COMP%] .header-column-template[_ngcontent-%COMP%] .registration-status-filter[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:.75rem;line-height:1rem}[_nghost-%COMP%] .row-cell[_ngcontent-%COMP%]{white-space:normal}[_nghost-%COMP%] .row-cell[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0;font-size:.875rem;line-height:1.25rem}[_nghost-%COMP%] .datatable-icon-right[_ngcontent-%COMP%]:before{content:"\\25b6";margin-right:.5rem;color:var(--color-gray-500)}[_nghost-%COMP%] .datatable-icon-down[_ngcontent-%COMP%]:before{content:"\\25bc";margin-right:.5rem;color:var(--color-gray-500)}[_nghost-%COMP%] .view-mobile-response[_ngcontent-%COMP%]{cursor:pointer;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}[_nghost-%COMP%] .clickable[_ngcontent-%COMP%]{cursor:pointer;--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1));text-decoration-line:underline}[_nghost-%COMP%] .resizable-column[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%] .resizable-column[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%]{z-index:20;cursor:col-resize}[_nghost-%COMP%] .resizable-column[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%]:after{content:"";position:absolute;top:50%;right:1px;height:1.25rem;width:.125rem;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-bg-opacity: 1;background-color:rgb(51 102 255 / var(--tw-bg-opacity, 1))}[_nghost-%COMP%] .resizable-column[_ngcontent-%COMP%]:not(:first-child){vertical-align:baseline}[_nghost-%COMP%] .resizing[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}[_nghost-%COMP%] .resizing[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%]{background:#007bff;opacity:.8}fa-icon[_ngcontent-%COMP%]{color:var(--color-gray-500)}'],changeDetection:0})}}return W})()},81314:(Mt,Je,$)=>{$.d(Je,{M:()=>et,x:()=>Ae});var I=$(10467),_=$(98434),z=$(23214),Be=$(89417),V=$(99764),Pe=function(){var E=function(x,v){return(E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(g[w]=y[w])})(x,v)};return function(x,v){if("function"!=typeof v&&null!==v)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function g(){this.constructor=x}E(x,v),x.prototype=null===v?Object.create(v):(g.prototype=v.prototype,new g)}}(),ut=function(E){function x(v){var g=E.call(this,v.width,v.height)||this;return g.canvas=v,g.tempCanvasElement=null,g.buffer=x.makeBufferFromCanvasImageData(v),g}return Pe(x,E),x.makeBufferFromCanvasImageData=function(v){var g;
1try{g=v.getContext("2d",{willReadFrequently:!0})}catch{g=v.getContext("2d")}if(!g)throw new Error("Couldn't get canvas context.");var y=g.getImageData(0,0,v.width,v.height);return x.toGrayscaleBuffer(y.data,v.width,v.height)},x.toGrayscaleBuffer=function(v,g,y){for(var w=new Uint8ClampedArray(g*y),T=0,M=0,F=v.length;T<F;T+=4,M++){w[M]=0===v[T+3]?255:306*v[T]+601*v[T+1]+117*v[T+2]+512>>10}return w},x.prototype.getRow=function(v,g){if(v<0||v>=this.getHeight())throw new V.IllegalArgumentException("Requested row is outside the image: "+v);var y=this.getWidth(),w=v*y;return null===g?g=this.buffer.slice(w,w+y):(g.length<y&&(g=new Uint8ClampedArray(y)),g.set(this.buffer.slice(w,w+y))),g},x.prototype.getMatrix=function(){return this.buffer},x.prototype.isCropSupported=function(){return!0},x.prototype.crop=function(v,g,y,w){return E.prototype.crop.call(this,v,g,y,w),this},x.prototype.isRotateSupported=function(){return!0},x.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},x.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},x.prototype.invert=function(){return new V.InvertedLuminanceSource(this)},x.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var v=this.canvas.ownerDocument.createElement("canvas");v.width=this.canvas.width,v.height=this.canvas.height,this.tempCanvasElement=v}return this.tempCanvasElement},x.prototype.rotate=function(v){var g=this.getTempCanvasElement();if(!g)throw new Error("Could not create a Canvas element.");var y=v*x.DEGREE_TO_RADIANS,w=this.canvas.width,T=this.canvas.height,M=Math.ceil(Math.abs(Math.cos(y))*w+Math.abs(Math.sin(y))*T),F=Math.ceil(Math.abs(Math.sin(y))*w+Math.abs(Math.cos(y))*T);g.width=M,g.height=F;var R=g.getContext("2d");if(!R)throw new Error("Could not create a Canvas Context element.");return R.translate(M/2,F/2),R.rotate(y),R.drawImage(this.canvas,w/-2,T/-2),this.buffer=x.makeBufferFromCanvasImageData(g),this},x.DEGREE_TO_RADIANS=Math.PI/180,x}(V.LuminanceSource);function ue(){return typeof navigator<"u"}var E,xe=function(){return xe=Object.assign||function(E){for(var x,v=1,g=arguments.length;v<g;v++)for(var y in x=arguments[v])Object.prototype.hasOwnProperty.call(x,y)&&(E[y]=x[y]);return E},xe.apply(this,arguments)},J=function(E,x,v,g){return new(v||(v=Promise))(function(w,T){function M(k){try{R(g.next(k))}catch(ie){T(ie)}}function F(k){try{R(g.throw(k))}catch(ie){T(ie)}}function R(k){k.done?w(k.value):function y(w){return w instanceof v?w:new v(function(T){T(w)})}(k.value).then(M,F)}R((g=g.apply(E,x||[])).next())})},ce=function(E,x){var g,y,w,T,v={label:0,sent:function(){if(1&w[0])throw w[1];return w[1]},trys:[],ops:[]};return T={next:M(0),throw:M(1),return:M(2)},"function"==typeof Symbol&&(T[Symbol.iterator]=function(){return this}),T;function M(R){return function(k){return function F(R){if(g)throw new TypeError("Generator is already executing.");for(;v;)try{if(g=1,y&&(w=2&R[0]?y.return:R[0]?y.throw||((w=y.return)&&w.call(y),0):y.next)&&!(w=w.call(y,R[1])).done)return w;switch(y=0,w&&(R=[2&R[0],w.value]),R[0]){case 0:case 1:w=R;break;case 4:return v.label++,{value:R[1],done:!1};case 5:v.label++,y=R[1],R=[0];continue;case 7:R=v.ops.pop(),v.trys.pop();continue;default:if(!(w=(w=v.trys).length>0&&w[w.length-1])&&(6===R[0]||2===R[0])){v=0;continue}if(3===R[0]&&(!w||R[1]>w[0]&&R[1]<w[3])){v.label=R[1];break}if(6===R[0]&&v.label<w[1]){v.label=w[1],w=R;break}if(w&&v.label<w[2]){v.label=w[2],v.ops.push(R);break}w[2]&&v.ops.pop(),v.trys.pop();continue}R=x.call(E,v)}catch(k){R=[6,k],y=0}finally{g=w=0}if(5&R[0])throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}([R,k])}}},ft=function(E){var x="function"==typeof Symbol&&Symbol.iterator,v=x&&E[x],g=0;if(v)return v.call(E);if(E&&"number"==typeof E.length)return{next:function(){return E&&g>=E.length&&(E=void 0),{value:E&&E[g++],done:!E}}};throw new TypeError(x?"Object is not iterable.":"Symbol.iterator is not defined.")},X={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},ke=function(){function E(x,v,g){void 0===v&&(v=new Map),void 0===g&&(g={}),this.reader=x,this.hints=v,this.options=xe(xe({},X),g)}return Object.defineProperty(E.prototype,"possibleFormats",{set:function(x){this.hints.set(V.DecodeHintType.POSSIBLE_FORMATS,x)}
1,enumerable:!1,configurable:!0}),E.addVideoSource=function(x,v){try{x.srcObject=v}catch{console.error("got interrupted by new loading request")}},E.mediaStreamSetTorch=function(x,v){return J(this,void 0,void 0,function(){return ce(this,function(g){switch(g.label){case 0:return[4,x.applyConstraints({advanced:[{fillLightMode:v?"flash":"off",torch:!!v}]})];case 1:return g.sent(),[2]}})})},E.mediaStreamIsTorchCompatible=function(x){var v,g,y=x.getVideoTracks();try{for(var w=ft(y),T=w.next();!T.done;T=w.next())if(E.mediaStreamIsTorchCompatibleTrack(T.value))return!0}catch(F){v={error:F}}finally{try{T&&!T.done&&(g=w.return)&&g.call(w)}finally{if(v)throw v.error}}return!1},E.mediaStreamIsTorchCompatibleTrack=function(x){try{return"torch"in x.getCapabilities()}catch(g){return console.error(g),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},E.isVideoPlaying=function(x){return x.currentTime>0&&!x.paused&&x.readyState>2},E.getMediaElement=function(x,v){var g=document.getElementById(x);if(!g)throw new V.ArgumentException("element with id '".concat(x,"' not found"));if(g.nodeName.toLowerCase()!==v.toLowerCase())throw new V.ArgumentException("element with id '".concat(x,"' must be an ").concat(v," element"));return g},E.createVideoElement=function(x){if(x instanceof HTMLVideoElement)return x;if("string"==typeof x)return E.getMediaElement(x,"video");if(!x&&typeof document<"u"){var v=document.createElement("video");return v.width=200,v.height=200,v}throw new Error("Couldn't get videoElement from videoSource!")},E.prepareImageElement=function(x){if(x instanceof HTMLImageElement)return x;if("string"==typeof x)return E.getMediaElement(x,"img");if(typeof x>"u"){var v=document.createElement("img");return v.width=200,v.height=200,v}throw new Error("Couldn't get imageElement from imageSource!")},E.prepareVideoElement=function(x){var v=E.createVideoElement(x);return v.setAttribute("autoplay","true"),v.setAttribute("muted","true"),v.setAttribute("playsinline","true"),v},E.isImageLoaded=function(x){return!(!x.complete||0===x.naturalWidth)},E.createBinaryBitmapFromCanvas=function(x){var v=new ut(x),g=new V.HybridBinarizer(v);return new V.BinaryBitmap(g)},E.drawImageOnCanvas=function(x,v){x.drawImage(v,0,0)},E.getMediaElementDimensions=function(x){if(x instanceof HTMLVideoElement)return{height:x.videoHeight,width:x.videoWidth};if(x instanceof HTMLImageElement)return{height:x.naturalHeight||x.height,width:x.naturalWidth||x.width};throw new Error("Couldn't find the Source's dimensions!")},E.createCaptureCanvas=function(x){if(!x)throw new V.ArgumentException("Cannot create a capture canvas without a media element.");if(typeof document>"u")throw new Error('The page "Document" is undefined, make sure you\'re running in a browser.');var v=document.createElement("canvas"),g=E.getMediaElementDimensions(x),y=g.width,w=g.height;return v.style.width=y+"px",v.style.height=w+"px",v.width=y,v.height=w,v},E.tryPlayVideo=function(x){return J(this,void 0,void 0,function(){var v;return ce(this,function(g){switch(g.label){case 0:if(x?.ended)return console.error("Trying to play video that has ended."),[2,!1];if(E.isVideoPlaying(x))return console.warn("Trying to play video that is already playing."),[2,!0];g.label=1;case 1:return g.trys.push([1,3,,4]),[4,x.play()];case 2:return g.sent(),[2,!0];case 3:return v=g.sent(),console.warn("It was not possible to play the video.",v),[2,!1];case 4:return[2]}})})},E.createCanvasFromMediaElement=function(x){var v=E.createCaptureCanvas(x),g=v.getContext("2d");if(!g)throw new Error("Couldn't find Canvas 2D Context.");return E.drawImageOnCanvas(g,x),v},E.createBinaryBitmapFromMediaElem=function(x){var v=E.createCanvasFromMediaElement(x);return E.createBinaryBitmapFromCanvas(v)},E.destroyImageElement=function(x){x.src="",x.removeAttribute("src"),x=void 0},E.listVideoInputDevices=function(){return J(this,void 0,void 0,function(){var x,v,g,y,w,T,M,F,ie,ae;return ce(this,function(me){switch(me.label){case 0:if(!ue())throw new Error("Can't enumerate devices, navigator is not present.");if(!function De(){return!(!function ee(){return ue()&&!!navigator.mediaDevices}()||!navigator.mediaDevices.enumerateDevices)}())throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:x=me.sent(),v=[];try{for(g=ft(x),y=g.next();!y.done;y=g.next())"videoinput"===(T="video"===(w=y.value).kind?"videoinput":w.kind)&&(M=w.deviceId||w.id,F=w.label||"Video device ".concat(v.length+1),v.push({deviceId:M,label:F,kind:T,groupId:w.groupId}))}catch(tt){ie={error:tt}}finally{try{y&&!y.done&&(ae=g.return)&&ae.call(g)}finally{if(ie)throw ie.error}}return[2,v]}})})},E.findDeviceById=function(x){return J(this,void 0,void 0,function(){var v;return ce(this,function(g){switch(g.label){case 0:return[4,E.listVideoInputDevices()];case 1:return(v=g.sent())?[2,v.find(function(y){return y.deviceId===x})]:[2]}})})},E.cleanVideoSource=function(x){if(x){try{x.srcObject=null}catch{x.src=""}x&&x.removeAttribute("src")}},E.releaseAllStreams=function(){0!==E.streamTracker.length&&E.streamTracker.forEach(function(x){x.getTracks().forEac
1h(function(v){return v.stop()})}),E.streamTracker=[]},E.playVideoOnLoadAsync=function(x,v){return J(this,void 0,void 0,function(){return ce(this,function(y){switch(y.label){case 0:return[4,E.tryPlayVideo(x)];case 1:return y.sent()?[2,!0]:[2,new Promise(function(w,T){var M=setTimeout(function(){E.isVideoPlaying(x)||(T(!1),x.removeEventListener("canplay",F))},v),F=function(){E.tryPlayVideo(x).then(function(R){clearTimeout(M),x.removeEventListener("canplay",F),w(R)})};x.addEventListener("canplay",F)})]}})})},E.attachStreamToVideo=function(x,v,g){return void 0===g&&(g=5e3),J(this,void 0,void 0,function(){var y;return ce(this,function(w){switch(w.label){case 0:return y=E.prepareVideoElement(v),E.addVideoSource(y,x),[4,E.playVideoOnLoadAsync(y,g)];case 1:return w.sent(),[2,y]}})})},E._waitImageLoad=function(x){return new Promise(function(v,g){var w=setTimeout(function(){E.isImageLoaded(x)||(x.removeEventListener("load",T),g())},1e4),T=function(){clearTimeout(w),x.removeEventListener("load",T),v()};x.addEventListener("load",T)})},E.checkCallbackFnOrThrow=function(x){if(!x)throw new V.ArgumentException("`callbackFn` is a required parameter, you cannot capture results without it.")},E.disposeMediaStream=function(x){x.getVideoTracks().forEach(function(v){return v.stop()}),x=void 0},E.prototype.decode=function(x){var v=E.createCanvasFromMediaElement(x);return this.decodeFromCanvas(v)},E.prototype.decodeBitmap=function(x){return this.reader.decode(x,this.hints)},E.prototype.decodeFromCanvas=function(x){var v=E.createBinaryBitmapFromCanvas(x);return this.decodeBitmap(v)},E.prototype.decodeFromImageElement=function(x){return J(this,void 0,void 0,function(){var v;return ce(this,function(g){switch(g.label){case 0:if(!x)throw new V.ArgumentException("An image element must be provided.");return v=E.prepareImageElement(x),[4,this._decodeOnLoadImage(v)];case 1:return[2,g.sent()]}})})},E.prototype.decodeFromImageUrl=function(x){return J(this,void 0,void 0,function(){var v;return ce(this,function(g){switch(g.label){case 0:if(!x)throw new V.ArgumentException("An URL must be provided.");(v=E.prepareImageElement()).src=x,g.label=1;case 1:return g.trys.push([1,,3,4]),[4,this.decodeFromImageElement(v)];case 2:return[2,g.sent()];case 3:return E.destroyImageElement(v),[7];case 4:return[2]}})})},E.prototype.decodeFromConstraints=function(x,v,g){return J(this,void 0,void 0,function(){var y,w;return ce(this,function(T){switch(T.label){case 0:return E.checkCallbackFnOrThrow(g),[4,this.getUserMedia(x)];case 1:y=T.sent(),T.label=2;case 2:return T.trys.push([2,4,,5]),[4,this.decodeFromStream(y,v,g)];case 3:return[2,T.sent()];case 4:throw w=T.sent(),E.disposeMediaStream(y),w;case 5:return[2]}})})},E.prototype.decodeFromStream=function(x,v,g){return J(this,void 0,void 0,function(){var w,M,F,R,ie,ae,me=this;return ce(this,function(tt){switch(tt.label){case 0:return E.checkCallbackFnOrThrow(g),[4,E.attachStreamToVideo(x,v,this.options.tryPlayVideoTimeout)];case 1:return w=tt.sent(),M=this.scan(w,g,function(){E.disposeMediaStream(x),E.cleanVideoSource(w)}),F=x.getVideoTracks(),R=xe(xe({},M),{stop:function(){M.stop()},streamVideoConstraintsApply:function(q,Xe){return J(this,void 0,void 0,function(){var K,Ze,we,Lt,N,Jt;return ce(this,function(vt){switch(vt.label){case 0:K=Xe?F.filter(Xe):F,vt.label=1;case 1:vt.trys.push([1,6,7,8]),Ze=ft(K),we=Ze.next(),vt.label=2;case 2:return we.done?[3,5]:[4,we.value.applyConstraints(q)];case 3:vt.sent(),vt.label=4;case 4:return we=Ze.next(),[3,2];case 5:return[3,8];case 6:return Lt=vt.sent(),N={error:Lt},[3,8];case 7:try{we&&!we.done&&(Jt=Ze.return)&&Jt.call(Ze)}finally{if(N)throw N.error}return[7];case 8:return[2]}})})},streamVideoConstraintsGet:function(q){return F.find(q).getConstraints()},streamVideoSettingsGet:function(q){return F.find(q).getSettings()},streamVideoCapabilitiesGet:function(q){return F.find(q).getCapabilities()}}),E.mediaStreamIsTorchCompatible(x)&&(ie=F?.find(function(q){return E.mediaStreamIsTorchCompatibleTrack(q)}),R.switchTorch=ae=function(q){return J(me,void 0,void 0,function(){return ce(this,function(Xe){switch(Xe.label){case 0:return[4,E.mediaStreamSetTorch(ie,q)];case 1:return Xe.sent(),[2]}})})},R.stop=function(){return J(me,void 0,void 0,function(){return ce(this,function(q){switch(q.label){case 0:return M.stop(),[4,ae(!1)];case 1:return q.sent(),[2]}})})}),[2,R]}})})},E.prototype.decodeFromVideoDevice=function(x,v,g){return J(this,void 0,void 0,function(){return ce(this,function(T){switch(T.label){case 0:return E.checkCallbackFnOrThrow(g),[4,this.decodeFromConstraints({video:x?{deviceId:{exact:x}}:{facingMode:"environment"}},v,g)];case 1:return[2,T.sent()]}})})},E.prototype.decodeFromVideoElement=function(x,v){return J(this,void 0,void 0,function(){var g;return ce(this,function(w){switch(w.label){case 0:if(E.checkCallbackFnOrThrow(v),!x)throw new V.ArgumentException("A video element must be provided.");return g=E.prepareVideoElement(x),[4,E.playVideoOnLoadAsync(g,this.options.tryPlayVideoTimeout)];case 1:return w.sent(),[2,this.scan(g,v)]}})})},E.prototype.decodeFromVideoUrl=function(x,v){return J(this,void 0,void 0,function(){var g,y;return ce(this,function(M){switch(M.label){case 0:if(E.checkCallbackFnOrThrow(v),!x)throw new V.ArgumentException("An URL must be provided.");return(g=E.prepareVideoElement()).src=x,y=function(){E.cleanVideoSource(g)},[4,E.playVideoOnLoadAsync(g,this.options.tryPlayVideoTimeout)];case 1:return M.sent(),[2,this.scan(g,v,y)]}})})},E.prototype.decodeOnceFromConstraints=function(x,v){return J(this,void 0,void 0,function(){var g;return ce(this,function(y){switch(y.label){case 0:return[4,this.getUserMedia(x)];case 1:return g=y.sent(),[4,this.decodeOnceFromStream(g,v)];case 2:return[2,y.sent()]}})})},E.prototype.decodeOnceFromStream=function(x,v){return J(this,void 0,void 0,function(){var g,y;return ce(this,function(T){switch(T.label){case 0:return g=!!v,[4,E.attachStreamToVideo(x,v)];case 1:y=T.sent(),T.label=2;case 2:return T.trys.push([2,,4,5]),[4,this.scanOneResult(y)];case 3:return[2,T.sent()];case 4:return g||E.cleanVideoSource(y),[7];case 5:return[2]}})})},E.prototype.decodeOnceFromVideoDevice=function(x,v){return J(this,void 0,void 0,function(){return ce(this,function(w){switch(w.label){case 0:return[4,this.decodeOnceFromConstraints({video:x?{deviceId:{exact:x}}:{facingMode:"environment"}},v)];case 1:return[2,w.sent()]}})})},E.prototype.decodeOnceFromVideoElement=function(x){return J(this,void 0,void 0,function(){var v;return ce(this,function(y){switch(y.label){case 0:if(!x)throw new V.ArgumentException("A video element must be provided.");return v=E.prepareVideoElement(x),[4,E.playVideoOnLoadAsync(v,this.options.tryPlayVideoTimeout)];case 1:return y.sent(),[4,this.scanOneResult(v)];case 2:return[2,y.sent()]}})})},E.prototype.decodeOnceFromVideoUrl=function(x){return J(this,void 0,void 0,function(){var v,g;return ce(this,function(y){switch(y.label){case 0:if(!x)throw new V.ArgumentException("An URL must be provided.");(v=E.prepareVideoElement()).src=x,g=this.decodeOnceFromVideoElement(v),y.label=1;case 1:return y.trys.push([1,,3,4]),[4,g];case 2:return[2,y.sent()];case 3:return E.cleanVideoSource(v),[7];case 4:return[2]}})})},E.prototype.scanOneResult=function(x,v,g,y){var w=this;return void 0===v&&(v=!0),void 0===g&&(g=!0),void 0===y&&(y=!0),new Promise(function(T,M){w.scan(x,function(F,R,k){if(F)return T(F),void k.stop();if(R){if(R instanceof V.NotFoundException&&v||R instanceof V.ChecksumException&&g||R instanceof V.FormatException&&y)return;k.stop(),M(R)}})})},E.prototype.scan=function(x,v,g){var y=this;E.checkCallbackFnOrThrow(v);var T,w=E.createCaptureCanvas(x);try{T=w.getContext("2d",{willReadFrequently:!0})}catch{T=w.getContext("2d")}if(!T)throw new Error("Couldn't create canvas for visual element scan.");var R,M=function(){T=void 0,w=void 0},F=!1,ie={stop:function(){F=!0,clearTimeout(R),M(),g&&g()}},ae=function(){if(!F)try{E.drawImageOnCanvas(T,x);var me=y.decodeFromCanvas(w);v(me,void 0,ie),R=setTimeout(ae,y.options.delayBetweenScanSuccess)}catch(K){if(v(void 0,K,ie),K instanceof V.ChecksumException||K instanceof V.FormatException||K instanceof V.NotFoundException)return void(R=setTimeout(ae,y.options.delayBetweenScanAttempts));M(),g&&g(K)}};return ae(),ie},E.prototype._decodeOnLoadImage=function(x){return J(this,void 0,void 0,function(){return ce(this,function(g){switch(g.label){case 0:return E.isImageLoaded(x)?[3,2]:[4,E._waitImageLoad(x)];case 1:g.sent(),g.label=2;case 2:return[2,this.decode(x)]}})})},E.prototype.getUserMedia=function(x){return J(this,void 0,void 0,function(){var v;return ce(this,function(g){switch(g.label){case 0:return[4,navigator.mediaDevices.getUserMedia(x)];case 1:return v=g.sent(),E.streamTracker.push(v),[2,v]}})})},E.streamTracker=[],E}
1(),gt=function(){var E=function(x,v){return(E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(g[w]=y[w])})(x,v)};return function(x,v){if("function"!=typeof v&&null!==v)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function g(){this.constructor=x}E(x,v),x.prototype=null===v?Object.create(v):(g.prototype=v.prototype,new g)}}(),Et=(gt(function x(v,g){return E.call(this,new V.AztecCodeReader,v,g)||this},E=ke),function(){var E=function(x,v){return(E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(g[w]=y[w])})(x,v)};return function(x,v){if("function"!=typeof v&&null!==v)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function g(){this.constructor=x}E(x,v),x.prototype=null===v?Object.create(v):(g.prototype=v.prototype,new g)}}()),At=(function(E){Et(function x(v,g){return E.call(this,new V.MultiFormatOneDReader(v),v,g)||this},E)}(ke),function(){var E=function(x,v){return(E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(g[w]=y[w])})(x,v)};return function(x,v){if("function"!=typeof v&&null!==v)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function g(){this.constructor=x}E(x,v),x.prototype=null===v?Object.create(v):(g.prototype=v.prototype,new g)}}()),Ot=(function(E){At(function x(v,g){return E.call(this,new V.DataMatrixReader,v,g)||this},E)}(ke),function(){var E=function(x,v){return(E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(g[w]=y[w])})(x,v)};return function(x,v){if("function"!=typeof v&&null!==v)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function g(){this.constructor=x}E(x,v),x.prototype=null===v?Object.create(v):(g.prototype=v.prototype,new g)}}()),le=function(E){function x(v,g){var y=this,w=new V.MultiFormatReader;return w.setHints(v),(y=E.call(this,w,v,g)||this).reader=w,y}return Ot(x,E),Object.defineProperty(x.prototype,"possibleFormats",{set:function(v){this.hints.set(V.DecodeHintType.POSSIBLE_FORMATS,v),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),x.prototype.decodeBitmap=function(v){return this.reader.decodeWithState(v)},x.prototype.setHints=function(v){this.hints=v,this.reader.setHints(this.hints)},x}(ke),St=function(){var E=function(x,v){return(E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(g[w]=y[w])})(x,v)};return function(x,v){if("function"!=typeof v&&null!==v)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function g(){this.constructor=x}E(x,v),x.prototype=null===v?Object.create(v):(g.prototype=v.prototype,new g)}}(),dt=(function(E){St(function x(v,g){return E.call(this,new V.PDF417Reader,v,g)||this},E)}(ke),function(){var E=function(x,v){return(E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(g[w]=y[w])})(x,v)};return function(x,v){if("function"!=typeof v&&null!==v)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function g(){this.constructor=x}E(x,v),x.prototype=null===v?Object.create(v):(g.prototype=v.prototype,new g)}}()),W=(function(E){dt(function x(v,g){return E.call(this,new V.QRCodeReader,v,g)||this},E)}(ke),"http://www.w3.org/2000/svg"),H=(function(){function E(x){if("string"==typeof x){var v=document.getElementById(x);if(!v)throw new Error("Could not find a Container element with '".concat(x,"'."));this.containerElement=v}else this.containerElement=x}E.prototype.write=function(x,v,g,y){if(0===x.length)throw new V.IllegalArgumentException("Found empty contents");if(v<0||g<0)throw new V.IllegalArgumentException("Requested dimensions are too small: "+v+"x"+g);var w=y&&void 0!==y.get(V.EncodeHintType.MARGIN)?Number.parseInt(y.get(V.EncodeHintType.MARGIN).toString(),10):E.QUIET_ZONE_SIZE,T=this.encode(y,x);return this.renderResult(T,v,g,w)},E.prototype.createSVGElement=function(x,v){var g=document.createElementNS(E.SVG_NS,"svg");return g.setAttributeNS(W,"width",v.toString()),g.setAttributeNS(W,"height",x.toString()),g},E.prototype.createSvgPathPlaceholderElement=function(x,v){var g=document.createElementNS(E.SVG_NS,"path");return g.setAttributeNS(W,"d","M0 0h".concat(x,"v").concat(v,"H0z")),g.setAttributeNS(W,"fill","none"),g},E.prototype.createSvgRectElement=function(x,v,g,y){var w=document.createElementNS(E.SVG_NS,"rect");return w.setAttributeNS(W,"x",x.toString()),w.setAttributeNS(W,"y",v.toString()),w.setAttributeNS(W,"height",g.toString()),w.setAttributeNS(W,"width",y.toString()),w.setAttributeNS(W,"fill","#000000"),w},E.prototype.encode=function(x,v){var g=V.QRCodeDecoderErrorCorrectionLevel.L;
1if(x&&void 0!==x.get(V.EncodeHintType.ERROR_CORRECTION)){var y=x.get(V.EncodeHintType.ERROR_CORRECTION).toString();g=V.QRCodeDecoderErrorCorrectionLevel.fromString(y)}return V.QRCodeEncoder.encode(v,g,x)},E.prototype.renderResult=function(x,v,g,y){var w=x.getMatrix();if(null===w)throw new V.IllegalStateException;var T=w.getWidth(),M=w.getHeight(),F=T+2*y,R=M+2*y,k=Math.max(v,F),ie=Math.max(g,R),ae=Math.min(Math.floor(k/F),Math.floor(ie/R)),me=Math.floor((k-T*ae)/2),tt=Math.floor((ie-M*ae)/2),q=this.createSVGElement(k,ie),Xe=this.createSvgPathPlaceholderElement(v,g);q.appendChild(Xe),this.containerElement.appendChild(q);for(var K=0,Ze=tt;K<M;K++,Ze+=ae)for(var we=0,ht=me;we<T;we++,ht+=ae)if(1===w.get(we,K)){var Lt=this.createSvgRectElement(ht,Ze,ae,ae);q.appendChild(Lt)}return q},E.QUIET_ZONE_SIZE=4,E.SVG_NS="http://www.w3.org/2000/svg"}(),"http://www.w3.org/2000/svg"),te=(function(){function E(){}E.prototype.write=function(x,v,g,y){if(0===x.length)throw new V.IllegalArgumentException("Found empty contents");if(v<0||g<0)throw new V.IllegalArgumentException("Requested dimensions are too small: "+v+"x"+g);var w=V.QRCodeDecoderErrorCorrectionLevel.L,T=E.QUIET_ZONE_SIZE;if(y){if(void 0!==y.get(V.EncodeHintType.ERROR_CORRECTION)){var M=y.get(V.EncodeHintType.ERROR_CORRECTION).toString();w=V.QRCodeDecoderErrorCorrectionLevel.fromString(M)}void 0!==y.get(V.EncodeHintType.MARGIN)&&(T=Number.parseInt(y.get(V.EncodeHintType.MARGIN).toString(),10))}var F=V.QRCodeEncoder.encode(x,w,y);return this.renderResult(F,v,g,T)},E.prototype.writeToDom=function(x,v,g,y,w){if("string"==typeof x){var T=document.querySelector(x);if(!T)throw new Error("Could no find the target HTML element.");x=T}var M=this.write(v,g,y,w);x instanceof HTMLElement&&x.appendChild(M)},E.prototype.renderResult=function(x,v,g,y){var w=x.getMatrix();if(null===w)throw new V.IllegalStateException;for(var T=w.getWidth(),M=w.getHeight(),F=T+2*y,R=M+2*y,k=Math.max(v,F),ie=Math.max(g,R),ae=Math.min(Math.floor(k/F),Math.floor(ie/R)),me=Math.floor((k-T*ae)/2),tt=Math.floor((ie-M*ae)/2),q=this.createSVGElement(k,ie),Xe=0,K=tt;Xe<M;Xe++,K+=ae)for(var Ze=0,we=me;Ze<T;Ze++,we+=ae)if(1===w.get(Ze,Xe)){var ht=this.createSvgRectElement(we,K,ae,ae);q.appendChild(ht)}return q},E.prototype.createSVGElement=function(x,v){var g=document.createElementNS(H,"svg"),y=x.toString(),w=v.toString();return g.setAttribute("height",w),g.setAttribute("width",y),g.setAttribute("viewBox","0 0 "+y+" "+w),g},E.prototype.createSvgRectElement=function(x,v,g,y){var w=document.createElementNS(H,"rect");return w.setAttribute("x",x.toString()),w.setAttribute("y",v.toString()),w.setAttribute("height",g.toString()),w.setAttribute("width",y.toString()),w.setAttribute("fill","#000000"),w},E.QUIET_ZONE_SIZE=4}(),$(84412));const lt=["preview"];class Q extends le{getScannerControls(){if(!this.scannerControls)throw new Error("No scanning is running at the time.");return this.scannerControls}scanFromDeviceObservable(x,v){var g=this;return(0,I.A)(function*(){const y=new te.t({});let w;try{w=yield g.decodeFromVideoDevice(x,v,(T,M)=>{if(!M)return void y.next({result:T});const F=M.name;F===V.NotFoundException.name||F===V.ChecksumException.name||F===V.FormatException.name||M.message.includes("No MultiFormat Readers were able to detect the code.")?y.next({error:M}):(y.error(M),g.scannerControls.stop(),g.scannerControls=void 0)}),g.scannerControls={...w,stop(){w.stop(),y.complete()}}}catch(T){y.error(T),g.scannerControls?.stop(),g.scannerControls=void 0}return y.asObservable()})()}}let et=(()=>{class E{get codeReader(){return this._codeReader}set device(v){this._ready?this.isAutostarting?console.warn("Avoid setting a device during auto-start."):this.isCurrentDevice(v)?console.warn("Setting the same device is not allowed."):this.hasPermission?this.setDevice(v):console.warn("Permissions not set yet, waiting for them to be set to apply device change."):this._devicePreStart=v}get device(){return this._device}get formats(){return this.hints.get(V.DecodeHintType.POSSIBLE_FORMATS)}set formats(v){if("string"==typeof v)throw new Error("Invalid formats, make sure the [formats] input is a binding.");const g=v.map(w=>this.getBarcodeFormatOrFail(w)),y=this.hints;y.set(V.DecodeHintType.POSSIBLE_FORMATS,g),this.hints=y}get hints(){return this._hints}
1set hints(v){this._hints=v,this.codeReader?.setHints(this._hints)}set videoConstraints(v){const g=this.codeReader?.getScannerControls();g&&g?.streamVideoConstraintsApply(v)}set isAutostarting(v){this._isAutostarting=v,this.autostarting.next(v)}get isAutostarting(){return this._isAutostarting}set torch(v){try{this.getCodeReader().getScannerControls().switchTorch(v)}catch{}}set enable(v){this._enabled!==!!v&&(this._enabled=!!v,this._enabled?this.device?this.scanFromDevice(this.device.deviceId):this.init():(this.reset(),Q.releaseAllStreams()))}get enabled(){return this._enabled}get tryHarder(){return this.hints.get(V.DecodeHintType.TRY_HARDER)}set tryHarder(v){const g=this.hints;v?g.set(V.DecodeHintType.TRY_HARDER,!0):g.delete(V.DecodeHintType.TRY_HARDER),this.hints=g}constructor(){this.timeBetweenScans=500,this.delayBetweenScanSuccess=500,this.previewFitMode="cover",this.poster="",this._ready=!1,this.autostarted=new z.bkB,this.autostarting=new z.bkB,this.torchCompatible=new z.bkB(!1),this.scanSuccess=new z.bkB,this.scanFailure=new z.bkB,this.scanError=new z.bkB,this.scanComplete=new z.bkB,this.camerasFound=new z.bkB,this.camerasNotFound=new z.bkB,this.permissionResponse=new z.bkB(!0),this.hasDevices=new z.bkB,this.deviceChange=new z.bkB,this._enabled=!0,this._hints=new Map,this.autofocusEnabled=!0,this.autostart=!0,this.formats=[V.BarcodeFormat.QR_CODE],this.hasNavigator=typeof navigator<"u",this.isMediaDevicesSupported=this.hasNavigator&&!!navigator.mediaDevices}askForPermission(){var v=this;return(0,I.A)(function*(){if(!v.hasNavigator)return console.error("@zxing/ngx-scanner","Can't ask permission, navigator is not present."),v.setPermission(null),v.hasPermission;if(!v.isMediaDevicesSupported)return console.error("@zxing/ngx-scanner","Can't get user media, this is not supported."),v.setPermission(null),v.hasPermission;let g,y;try{g=yield v.getAnyVideoDevice(),y=!!g}catch(w){return v.handlePermissionException(w)}finally{v.terminateStream(g)}return v.setPermission(y),y})()}getAnyVideoDevice(){return navigator.mediaDevices.getUserMedia({video:!0})}terminateStream(v){v&&v.getTracks().forEach(g=>g.stop()),v=void 0}init(){var v=this;return(0,I.A)(function*(){if(!v.autostart)return console.warn("Feature 'autostart' disabled. Permissions and devices recovery has to be run manually."),v.initAutostartOff(),void(v._ready=!0);yield v.initAutostartOn(),v._ready=!0})()}initAutostartOff(){this.isAutostarting=!1,this.updateVideoInputDevices(),this._device&&this._devicePreStart&&this.setDevice(this._devicePreStart)}initAutostartOn(){var v=this;return(0,I.A)(function*(){let g;v.isAutostarting=!0;try{g=yield v.askForPermission()}catch(y){return void console.error("Exception occurred while asking for permission:",y)}if(g){const y=yield v.updateVideoInputDevices();yield v.autostartScanner([...y])}v.isAutostarting=!1,v.autostarted.next()})()}isCurrentDevice(v){return v?.deviceId===this._device?.deviceId}ngOnDestroy(){this.reset(),ke.cleanVideoSource(this.previewElemRef.nativeElement),Q.releaseAllStreams()}ngOnInit(){this.init()}scanStop(){this._scanSubscription&&(this.codeReader?.getScannerControls().stop(),this._scanSubscription?.unsubscribe(),this._scanSubscription=void 0)}scanStart(){if(this._scanSubscription)throw new Error("There is already a scan process running.");if(!this._device)throw new Error("No device defined, cannot start scan, please define a device.");this.scanFromDevice(this._device.deviceId)}restart(){this._codeReader=void 0;const v=this._reset();v&&(this.device=v)}updateVideoInputDevices(){var v=this;return(0,I.A)(function*(){const g=(yield ke.listVideoInputDevices())||[],y=g&&g.length>0;return v.hasDevices.next(y),v.camerasFound.next([...g]),y||v.camerasNotFound.next(null),g})()}autostartScanner(v){var g=this;return(0,I.A)(function*(){const w=v.find(({label:T})=>/back|tr\xe1s|rear|traseira|environment|ambiente/gi.test(T))||v.pop();if(!w)throw new Error("Impossible to autostart, no input devices available.");yield g.setDevice(w),g.deviceChange.next(w)})()}dispatchScanSuccess(v){this.scanSuccess.next(v.getText())}dispatchScanFailure(v){this.scanFailure.next(v)}
1dispatchScanError(v){this.scanError.observed||(console.error(`zxing scanner component: ${v.name}`,v),console.warn("Use the `(scanError)` property to handle errors like this!")),this.scanError.next(v)}dispatchScanComplete(v){this.scanComplete.next(v)}handlePermissionException(v){let g;switch(console.error("@zxing/ngx-scanner","Error when asking for permission.",v),v.name){case"NotSupportedError":console.warn("@zxing/ngx-scanner",v.message),g=null,this.hasDevices.next(null);break;case"NotAllowedError":console.warn("@zxing/ngx-scanner",v.message),g=!1,this.hasDevices.next(!0);break;case"NotFoundError":console.warn("@zxing/ngx-scanner",v.message),g=null,this.hasDevices.next(!1),this.camerasNotFound.next(v);break;case"NotReadableError":console.warn("@zxing/ngx-scanner","Couldn't read the device(s)'s stream, it's probably in use by another app."),g=null,this.hasDevices.next(!1),this.camerasNotFound.next(v);break;case"AbortError":console.warn("@zxing/ngx-scanner","It seems that the required permissions have been granted, but something else failed",v),g=!0,this.hasDevices.next(null),this.camerasNotFound.next(v);break;default:console.warn("@zxing/ngx-scanner","I was not able to define if I have permissions for camera or not.",v),g=null}return this.setPermission(g),this.permissionResponse.error(v),g}getBarcodeFormatOrFail(v){return"string"==typeof v?V.BarcodeFormat[v.trim().toUpperCase()]:v}getCodeReader(){return this._codeReader||(this._codeReader=new Q(this.hints,{delayBetweenScanAttempts:this.timeBetweenScans,delayBetweenScanSuccess:this.delayBetweenScanSuccess})),this._codeReader}scanFromDevice(v){var g=this;return(0,I.A)(function*(){const y=g.previewElemRef.nativeElement,w=g.getCodeReader(),T=yield w.scanFromDeviceObservable(v,y);if(!T)throw new Error("Undefined decoding stream, aborting.");if(g._scanSubscription=T.subscribe(ae=>g._onDecodeResult(ae.result,ae.error),ae=>g._onDecodeError(ae),()=>{}),g._scanSubscription.closed)return;const ie=typeof w.getScannerControls().switchTorch<"u";g.torchCompatible.next(ie)})()}_onDecodeError(v){this.dispatchScanError(v)}_onDecodeResult(v,g){v?this.dispatchScanSuccess(v):this.dispatchScanFailure(g),this.dispatchScanComplete(v)}_reset(){if(!this._codeReader)return;this.scanStop();try{ke.cleanVideoSource(this.previewElemRef.nativeElement)}catch{}try{ke.releaseAllStreams()}catch{}this._codeReader=void 0;const v=this._device;return this.device=void 0,v}reset(){this._reset(),this.deviceChange.emit(null)}setDevice(v){var g=this;return(0,I.A)(function*(){g.scanStop(),g._device=v||void 0,g._device||ke.cleanVideoSource(g.previewElemRef.nativeElement),g._enabled&&v&&(yield g.scanFromDevice(v.deviceId))})()}setPermission(v){this.hasPermission=v,this.permissionResponse.next(v)}static{this.\u0275fac=function(g){return new(g||E)}}static{this.\u0275cmp=z.VBU({type:E,selectors:[["zxing-scanner"]],viewQuery:function(g,y){if(1&g&&z.GBs(lt,7),2&g){let w;z.mGM(w=z.lsd())&&(y.previewElemRef=w.first)}},inputs:{autofocusEnabled:"autofocusEnabled",timeBetweenScans:"timeBetweenScans",delayBetweenScanSuccess:"delayBetweenScanSuccess",autostart:"autostart",previewFitMode:"previewFitMode",poster:"poster",device:"device",formats:"formats",videoConstraints:"videoConstraints",torch:"torch",enable:"enable",tryHarder:"tryHarder"},outputs:{autostarted:"autostarted",autostarting:"autostarting",torchCompatible:"torchCompatible",scanSuccess:"scanSuccess",scanFailure:"scanFailure",scanError:"scanError",scanComplete:"scanComplete",camerasFound:"camerasFound",camerasNotFound:"camerasNotFound",permissionResponse:"permissionResponse",hasDevices:"hasDevices",deviceChange:"deviceChange"},standalone:!1,decls:6,vars:3,consts:[["preview",""],[3,"poster"]],template:function(g,y){1&g&&(z.j41(0,"video",1,0)(2,"p"),z.EFF(3," Your browser does not support this feature, please try to upgrade it. "),z.k0s(),z.j41(4,"p"),z.EFF(5," Seu navegador n\xe3o suporta este recurso, por favor tente atualiz\xe1-lo. "),z.k0s()()),2&g&&(z.xc7("object-fit",y.previewFitMode),z.Y8G("poster",y.poster,z.B4B))},styles:["[_nghost-%COMP%]{display:block}video[_ngcontent-%COMP%]{width:100%;height:auto;object-fit:contain}"],changeDetection:0})}}return E})(),Ae=(()=>{class E{static{this.\u0275fac=function(g){return new(g||E)}}static{this.\u0275mod=z.$C({type:E})}static{this.\u0275inj=z.G2t({imports:[_.MD,Be.YN]})}}return E})()},82340:(Mt,Je,$)=>{$.d(Je,{x:()=>V});
1var I=$(73165),_=$(71027),z=$(55553),Be=$(23214);let V=(()=>{class Pe{constructor(ue,ee){this.http=ue,this.apiRoutesService=ee}getCommunityDataForms(ue,ee,De,xe){let J=(new I.Nl).set("community_id",ue).set("page",ee).set("count",De);return xe&&(J=J.set("query",xe)),this.http.get(this.apiRoutesService.getRoute(z.Q.COMMUNITY_DATA_FORMS),{params:J})}IndexByParent(ue){const ee=(new I.Nl).set("community_id",ue);return this.http.get(this.apiRoutesService.getRoute(z.Q.INDEX_BY_PARENT),{params:ee})}getDataFormDetails(ue){const ee=(new I.Nl).set("data_form_id",ue);return this.http.get(this.apiRoutesService.getRoute(z.Q.GET_DATA_FORM),{params:ee})}getDataFormList(ue,ee){let De=new I.Nl;switch(ee){case"Kommunity":De=De.set("community_id",ue);break;case"CommunityGroup":De=De.set("community_group_id",ue)}return this.http.get(this.apiRoutesService.getRoute(z.Q.LIST),{params:De})}updateDataForm(ue){return this.http.put(this.apiRoutesService.getRoute(z.Q.UPDATE_DATA_FORM),{data_form:ue,data_form_id:ue.id})}createDataForm(ue,ee,De){return this.http.post(this.apiRoutesService.getRoute(z.Q.CREATE_DATA_FORM),{data_form:ue,parent_id:ee,parent_type:De})}cloneCommunityForm(ue){return this.http.post(this.apiRoutesService.getRoute(z.Q.CLONE_COMMUNITY_DATA_FORM),{data_form_id:ue})}static{this.\u0275fac=function(ee){return new(ee||Pe)(Be.KVO(I.Qq),Be.KVO(_.Y))}}static{this.\u0275prov=Be.jDH({token:Pe,factory:Pe.\u0275fac,providedIn:"root"})}}return Pe})()},99764:(Mt,Je,$)=>{$.d(Je,{ArgumentException:()=>J,AztecCodeReader:()=>ir,BarcodeFormat:()=>Z,BinaryBitmap:()=>gt,ChecksumException:()=>Ie,DataMatrixReader:()=>ur,DecodeHintType:()=>x,EncodeHintType:()=>ye,FormatException:()=>y,HybridBinarizer:()=>jr,IllegalArgumentException:()=>X,IllegalStateException:()=>pt,InvertedLuminanceSource:()=>er,LuminanceSource:()=>zt,MultiFormatOneDReader:()=>Ht,MultiFormatReader:()=>Dn,NotFoundException:()=>N,PDF417Reader:()=>lr,QRCodeDecoderErrorCorrectionLevel:()=>Wt,QRCodeEncoder:()=>Rr,QRCodeReader:()=>fr});var z=function(){var r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a])})(t,n)};return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),Be=function(r){function e(t,n){var i=this.constructor,o=r.call(this,t,n)||this;return Object.defineProperty(o,"name",{value:i.name,enumerable:!1,configurable:!0}),function I(r,e){var t=Object.setPrototypeOf;t?t(r,e):r.__proto__=e}(o,i.prototype),function _(r,e){void 0===e&&(e=r.constructor);var t=Error.captureStackTrace;t&&t(r,e)}(o),o}return z(e,r),e}(Error),ut=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const ee=function(r){function e(t){void 0===t&&(t=void 0);var n=r.call(this,t)||this;return n.message=t,n}return ut(e,r),e.prototype.getKind=function(){return this.constructor.kind},e.kind="Exception",e}(Be);var De=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const J=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return De(e,r),e.kind="ArgumentException",e}(ee);var ce=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const X=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return ce(e,r),e.kind="IllegalArgumentException",e}(ee),gt=function(){function r(e){if(this.binarizer=e,null===e)throw new X("Binarizer must be non-null.")}return r.prototype.getWidth=function(){return this.binarizer.getWidth()},r.prototype.getHeight=function(){return this.binarizer.getHeight()},r.prototype.getBlackRow=function(e,t){return this.binarizer.getBlackRow(e,t)},r.prototype.getBlackMatrix=function(){return null==this.matrix&&(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},r.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},r.prototype.crop=function(e,t,n,i){var o=this.binarizer.getLuminanceSource().crop(e,t,n,i);return new r(this.binarizer.createBinarizer(o))},r.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},r.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new r(this.binarizer.createBinarizer(e))},r.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new r(this.binarizer.createBinarizer(e))},r.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch{return""}},r}();var Rt=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Ie=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return Rt(e,r),e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(ee),Nt=function(){function r(e){this.source=e}return r.prototype.getLuminanceSource=function(){return this.source},r.prototype.getWidth=function(){return this.source.getWidth()},r.prototype.getHeight=function(){return this.source.getHeight()},r}(),le=function(){function r(){}return r.arraycopy=function(e,t,n,i,o){for(;o--;)n[i++]=e[t++]},r.currentTimeMillis=function(){return Date.now()},r}();var St=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const dt=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return St(e,r),e.kind="IndexOutOfBoundsException",e}(ee);var Ft=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const ve=function(r){function e(t,n){void 0===t&&(t=void 0),void 0===n&&(n=void 0);var i=r.call(this,n)||this;return i.index=t,i.message=n,i}return Ft(e,r),e.kind="ArrayIndexOutOfBoundsException",e}(dt),te=function(){function r(){}return r.fill=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n]=t},r.fillWithin=function(e,t,n,i){r.rangeCheck(e.length,t,n);for(var o=t;o<n;o++)e[o]=i},r.rangeCheck=function(e,t,n){if(t>n)throw new X("fromIndex("+t+") > toIndex("+n+")");if(t<0)throw new ve(t);if(n>e)throw new ve(n)},r.asList=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e},r.create=function(e,t,n){return Array.from({length:e}).map(function(o){return Array.from({length:t}).fill(n)})},r.createInt32Array=function(e,t,n){return Array.from({length:e}).map(function(o){return Int32Array.from({length:t}).fill(n)})},r.equals=function(e,t){if(!(e&&t&&e.length&&t.length&&e.length===t.length))return!1;for(var n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0},r.hashCode=function(e){var t,n;if(null===e)return 0;var i=1;try{for(var o=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),a=o.next();!a.done;a=o.next())i=31*i+a.value}catch(c){t={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i},r.fillUint8Array=function(e,t){for(var n=0;n!==e.length;n++)e[n]=t},r.copyOf=function(e,t){return e.slice(0,t)},r.copyOfUint8Array=function(e,t){if(e.length<=t){var n=new Uint8Array(t);return n.set(e),n}return e.slice(0,t)},r.copyOfRange=function(e,t,n){var i=n-t,o=new Int32Array(i);return le.arraycopy(e,t,o,0,i),o},r.binarySearch=function(e,t,n){void 0===n&&(n=r.numberComparator);for(var i=0,o=e.length-1;i<=o;){var a=o+i>>1,s=n(t,e[a]);if(s>0)i=a+1;else{if(!(s<0))return a;o=a-1}}return-i-1},r.numberComparator=function(e,t){return e-t},r}(),Q=function(){function r(){}return r.numberOfTrailingZeros=function(e){var t;if(0===e)return 32;var n=31;return 0!=(t=e<<16)&&(n-=16,e=t),0!=(t=e<<8)&&(n-=8,e=t),0!=(t=e<<4)&&(n-=4,e=t),0!=(t=e<<2)&&(n-=2,e=t),n-(e<<1>>>31)},r.numberOfLeadingZeros=function(e){if(0===e)return 32;var t=1;return e>>>16||(t+=16,e<<=16),e>>>
124||(t+=8,e<<=8),e>>>28||(t+=4,e<<=4),e>>>30||(t+=2,e<<=2),t-(e>>>31)},r.toHexString=function(e){return e.toString(16)},r.toBinaryString=function(e){return String(parseInt(String(e),2))},r.bitCount=function(e){return e=(e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135,63&(e+=e>>>8)+(e>>>16)},r.truncDivision=function(e,t){return Math.trunc(e/t)},r.parseInt=function(e,t){return void 0===t&&(t=void 0),parseInt(e,t)},r.MIN_VALUE_32_BITS=-2147483648,r.MAX_VALUE=Number.MAX_SAFE_INTEGER,r}(),Ae=function(){function r(e,t){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=null==t?r.makeArray(e):t)}return r.prototype.getSize=function(){return this.size},r.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},r.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var t=r.makeArray(e);le.arraycopy(this.bits,0,t,0,this.bits.length),this.bits=t}},r.prototype.get=function(e){return!!(this.bits[Math.floor(e/32)]&1<<(31&e))},r.prototype.set=function(e){this.bits[Math.floor(e/32)]|=1<<(31&e)},r.prototype.flip=function(e){this.bits[Math.floor(e/32)]^=1<<(31&e)},r.prototype.getNextSet=function(e){var t=this.size;if(e>=t)return t;var n=this.bits,i=Math.floor(e/32),o=n[i];o&=~((1<<(31&e))-1);for(var a=n.length;0===o;){if(++i===a)return t;o=n[i]}var s=32*i+Q.numberOfTrailingZeros(o);return s>t?t:s},r.prototype.getNextUnset=function(e){var t=this.size;if(e>=t)return t;var n=this.bits,i=Math.floor(e/32),o=~n[i];o&=~((1<<(31&e))-1);for(var a=n.length;0===o;){if(++i===a)return t;o=~n[i]}var s=32*i+Q.numberOfTrailingZeros(o);return s>t?t:s},r.prototype.setBulk=function(e,t){this.bits[Math.floor(e/32)]=t},r.prototype.setRange=function(e,t){if(t<e||e<0||t>this.size)throw new X;if(t!==e){t--;for(var n=Math.floor(e/32),i=Math.floor(t/32),o=this.bits,a=n;a<=i;a++)o[a]|=(2<<(a<i?31:31&t))-(1<<(a>n?0:31&e))}},r.prototype.clear=function(){for(var e=this.bits.length,t=this.bits,n=0;n<e;n++)t[n]=0},r.prototype.isRange=function(e,t,n){if(t<e||e<0||t>this.size)throw new X;if(t===e)return!0;t--;for(var i=Math.floor(e/32),o=Math.floor(t/32),a=this.bits,s=i;s<=o;s++){var f=(2<<(s<o?31:31&t))-(1<<(s>i?0:31&e))&4294967295;if((a[s]&f)!==(n?f:0))return!1}return!0},r.prototype.appendBit=function(e){this.ensureCapacity(this.size+1),e&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},r.prototype.appendBits=function(e,t){if(t<0||t>32)throw new X("Num bits must be between 0 and 32");this.ensureCapacity(this.size+t);for(var n=t;n>0;n--)this.appendBit(1==(e>>n-1&1))},r.prototype.appendBitArray=function(e){var t=e.size;this.ensureCapacity(this.size+t);for(var n=0;n<t;n++)this.appendBit(e.get(n))},r.prototype.xor=function(e){if(this.size!==e.size)throw new X("Sizes don't match");for(var t=this.bits,n=0,i=t.length;n<i;n++)t[n]^=e.bits[n]},r.prototype.toBytes=function(e,t,n,i){for(var o=0;o<i;o++){for(var a=0,s=0;s<8;s++)this.get(e)&&(a|=1<<7-s),e++;t[n+o]=a}},r.prototype.getBitArray=function(){return this.bits},r.prototype.reverse=function(){for(var e=new Int32Array(this.bits.length),t=Math.floor((this.size-1)/32),n=t+1,i=this.bits,o=0;o<n;o++){var a=i[o];e[t-o]=a=(a=(a=(a=(a=a>>1&1431655765|(1431655765&a)<<1)>>2&858993459|(858993459&a)<<2)>>4&252645135|(252645135&a)<<4)>>8&16711935|(16711935&a)<<8)>>16&65535|(65535&a)<<16}if(this.size!==32*n){var s=32*n-this.size,c=e[0]>>>s;for(o=1;o<n;o++){var u=e[o];e[o-1]=c|=u<<32-s,c=u>>>s}e[n-1]=c}this.bits=e},r.makeArray=function(e){return new Int32Array(Math.floor((e+31)/32))},r.prototype.equals=function(e){return e instanceof r&&(this.size===e.size&&te.equals(this.bits,e.bits))},r.prototype.hashCode=function(){return 31*this.size+te.hashCode(this.bits)},r.prototype.toString=function(){for(var e="",t=0,n=this.size;t<n;t++)!(7&t)&&(e+=" "),e+=this.get(t)?"X":".";return e},r.prototype.clone=function(){return new r(this.size,this.bits.slice())},r.prototype.toArray=function(){for(var e=[],t=0,n=this.size;t<n;t++)e.push(this.get(t));return e},r}();var E=function(r){return r[r.OTHER=0]="OTHER",r[r.PURE_BARCODE=1]="PURE_BARCODE",r[r.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",r[r.TRY_HARDER=3]="TRY_HARDER",r[r.CHARACTER_SET=4]="CHARACTER_SET",r[r.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",r[r.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",r[r.ENABLE_CODE_39_EXTENDED_MODE=7]="ENABLE_CODE_39_EXTENDED_MODE",r[r.ASSUME_GS1=8]="ASSUME_GS1",r[r.RETURN_CODABAR_START_END=9]="RETURN_CODABAR_START_END",r[r.NEED_RESULT_POINT_CALLBACK=10]="NEED_RESULT_POINT_CALLBACK",r[r.ALLOWED_EAN_EXTENSIONS=11]="ALLOWED_EAN_EXTENSIONS",r}(E||{});const x=E;var v=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const y=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return v(e,r),e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(ee);var T=function(r){return r[r.Cp437=0]="Cp437",r[r.ISO8859_1=1]="ISO8859_1",r[r.ISO8859_2=2]="ISO8859_2",r[r.ISO8859_3=3]="ISO8859_3",r[r.ISO8859_4
1=4]="ISO8859_4",r[r.ISO8859_5=5]="ISO8859_5",r[r.ISO8859_6=6]="ISO8859_6",r[r.ISO8859_7=7]="ISO8859_7",r[r.ISO8859_8=8]="ISO8859_8",r[r.ISO8859_9=9]="ISO8859_9",r[r.ISO8859_10=10]="ISO8859_10",r[r.ISO8859_11=11]="ISO8859_11",r[r.ISO8859_13=12]="ISO8859_13",r[r.ISO8859_14=13]="ISO8859_14",r[r.ISO8859_15=14]="ISO8859_15",r[r.ISO8859_16=15]="ISO8859_16",r[r.SJIS=16]="SJIS",r[r.Cp1250=17]="Cp1250",r[r.Cp1251=18]="Cp1251",r[r.Cp1252=19]="Cp1252",r[r.Cp1256=20]="Cp1256",r[r.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",r[r.UTF8=22]="UTF8",r[r.ASCII=23]="ASCII",r[r.Big5=24]="Big5",r[r.GB18030=25]="GB18030",r[r.EUC_KR=26]="EUC_KR",r}(T||{});const F=function(){function r(e,t,n){for(var i,o,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,this.values="number"==typeof t?Int32Array.from([t]):t,this.otherEncodingNames=a,r.VALUE_IDENTIFIER_TO_ECI.set(e,this),r.NAME_TO_ECI.set(n,this);for(var c=this.values,u=0,f=c.length;u!==f;u++)r.VALUES_TO_ECI.set(c[u],this);try{for(var l=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(a),h=l.next();!h.done;h=l.next())r.NAME_TO_ECI.set(h.value,this)}catch(C){i={error:C}}finally{try{h&&!h.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}return r.prototype.getValueIdentifier=function(){return this.valueIdentifier},r.prototype.getName=function(){return this.name},r.prototype.getValue=function(){return this.values[0]},r.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new y("incorect value");var t=r.VALUES_TO_ECI.get(e);if(void 0===t)throw new y("incorect value");return t},r.getCharacterSetECIByName=function(e){var t=r.NAME_TO_ECI.get(e);if(void 0===t)throw new y("incorect value");return t},r.prototype.equals=function(e){if(!(e instanceof r))return!1;var t=e;return this.getName()===t.getName()},r.VALUE_IDENTIFIER_TO_ECI=new Map,r.VALUES_TO_ECI=new Map,r.NAME_TO_ECI=new Map,r.Cp437=new r(T.Cp437,Int32Array.from([0,2]),"Cp437"),r.ISO8859_1=new r(T.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),r.ISO8859_2=new r(T.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),r.ISO8859_3=new r(T.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),r.ISO8859_4=new r(T.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),r.ISO8859_5=new r(T.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),r.ISO8859_6=new r(T.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),r.ISO8859_7=new r(T.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),r.ISO8859_8=new r(T.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),r.ISO8859_9=new r(T.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),r.ISO8859_10=new r(T.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),r.ISO8859_11=new r(T.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),r.ISO8859_13=new r(T.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),r.ISO8859_14=new r(T.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),r.ISO8859_15=new r(T.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),r.ISO8859_16=new r(T.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),r.SJIS=new r(T.SJIS,20,"SJIS","Shift_JIS"),r.Cp1250=new r(T.Cp1250,21,"Cp1250","windows-1250"),r.Cp1251=new r(T.Cp1251,22,"Cp1251","windows-1251"),r.Cp1252=new r(T.Cp1252,23,"Cp1252","windows-1252"),r.Cp1256=new r(T.Cp1256,24,"Cp1256","windows-1256"),r.UnicodeBigUnmarked=new r(T.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),r.UTF8=new r(T.UTF8,26,"UTF8","UTF-8"),r.ASCII=new r(T.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),r.Big5=new r(T.Big5,28,"Big5"),r.GB18030=new r(T.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),r.EUC_KR=new r(T.EUC_KR,30,"EUC_KR","EUC-KR"),r}();var R=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const ie=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return R(e,r),e.kind="UnsupportedOperationException",e}(ee),me=function(){function r(){}return r.decode=function(e,t){var n=this.encodingName(t);return this.customDecoder?this.customDecoder(e,n):typeof TextDecoder>"u"||this.shouldDecodeOnFallback(n)?this.decodeFallback(e,n):new TextDecoder(n).decode(e)},r.shouldDecodeOnFallback=function(e){return!r.isBrowser()&&"ISO-8859-1"===e},r.encode=function(e,t){var n=this.encodingName(t);return this.customEncoder?this.customEncoder(e,n):typeof TextEncoder>"u"?this.encodeFallback(e):(new TextEncoder).encode(e)},r.isBrowser=function(){return typeof window<"u"&&"[object Window]"==={}.toString.call(window)},r.encodingName=function(e){return"string"==typeof e?e:e.getName()},r.encodingCharacterSet=function(e){return e instanceof F?e:F.getCharacterSetECIByName(e)},r.decodeFallback=function(e,t){var n=this.encodingCharacterSet(t);if(r.isDecodeFallbackSupported(n)){for(var i="",o=0,a=e.length;o<a;o++){var s=e[o].toString(16);s.length<2&&(s="0"+s),i+="%"+s}return decodeURIComponent(i)}if(n.equals(F.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new ie("Encoding "+this.encodingName(t)+" not supported by fallback.")},r.isDecodeFallbackSupported=function(e){return e.equals(F.UTF8)||e.equals(F.ISO8859_1)||e.equals(F.ASCII)},r.encodeFallback=function(e){for(var n=btoa(unescape(encodeURIComponent(e))).split(""),i=[],o=0;o<n.length;
1o++)i.push(n[o].charCodeAt(0));return new Uint8Array(i)},r}(),q=function(){function r(){}return r.castAsNonUtf8Char=function(e,t){void 0===t&&(t=null);var n=t?t.getName():this.ISO88591;return me.decode(new Uint8Array([e]),n)},r.guessEncoding=function(e,t){if(null!=t&&void 0!==t.get(x.CHARACTER_SET))return t.get(x.CHARACTER_SET).toString();for(var n=e.length,i=!0,o=!0,a=!0,s=0,c=0,u=0,f=0,d=0,l=0,h=0,p=0,C=0,A=0,S=0,O=e.length>3&&239===e[0]&&187===e[1]&&191===e[2],D=0;D<n&&(i||o||a);D++){var P=255&e[D];a&&(s>0?128&P?s--:a=!1:!!(128&P)&&(64&P?(s++,32&P?(s++,16&P?(s++,8&P?a=!1:f++):u++):c++):a=!1)),i&&(P>127&&P<160?i=!1:P>159&&(P<192||215===P||247===P)&&S++),o&&(d>0?P<64||127===P||P>252?o=!1:d--:128===P||160===P||P>239?o=!1:P>160&&P<224?(l++,p=0,++h>C&&(C=h)):P>127?(d++,h=0,++p>A&&(A=p)):(h=0,p=0))}return a&&s>0&&(a=!1),o&&d>0&&(o=!1),a&&(O||c+u+f>0)?r.UTF8:o&&(r.ASSUME_SHIFT_JIS||C>=3||A>=3)?r.SHIFT_JIS:i&&o?2===C&&2===l||10*S>=n?r.SHIFT_JIS:r.ISO88591:i?r.ISO88591:o?r.SHIFT_JIS:a?r.UTF8:r.PLATFORM_DEFAULT_ENCODING},r.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=-1;return e.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,function o(s,c,u,f,d,l){if("%%"===s)return"%";if(void 0!==t[++i]){s=f?parseInt(f.substr(1)):void 0;var p,h=d?parseInt(d.substr(1)):void 0;switch(l){case"s":p=t[i];break;case"c":p=t[i][0];break;case"f":p=parseFloat(t[i]).toFixed(s);break;case"p":p=parseFloat(t[i]).toPrecision(s);break;case"e":p=parseFloat(t[i]).toExponential(s);break;case"x":p=parseInt(t[i]).toString(h||16);break;case"d":p=parseFloat(parseInt(t[i],h||10).toPrecision(s)).toFixed(0)}p="object"==typeof p?JSON.stringify(p):(+p).toString(h);for(var C=parseInt(u),A=u&&u[0]+""=="0"?"0":" ";p.length<C;)p=void 0!==c?p+A:A+p;return p}})},r.getBytes=function(e,t){return me.encode(e,t)},r.getCharCode=function(e,t){return void 0===t&&(t=0),e.charCodeAt(t)},r.getCharAt=function(e){return String.fromCharCode(e)},r.SHIFT_JIS=F.SJIS.getName(),r.GB2312="GB2312",r.ISO88591=F.ISO8859_1.getName(),r.EUC_JP="EUC_JP",r.UTF8=F.UTF8.getName(),r.PLATFORM_DEFAULT_ENCODING=r.UTF8,r.ASSUME_SHIFT_JIS=!1,r}(),K=function(){function r(e){void 0===e&&(e=""),this.value=e}return r.prototype.enableDecoding=function(e){return this.encoding=e,this},r.prototype.append=function(e){return this.value+="string"==typeof e?e.toString():this.encoding?q.castAsNonUtf8Char(e,this.encoding):String.fromCharCode(e),this},r.prototype.appendChars=function(e,t,n){for(var i=t;t<t+n;i++)this.append(e[i]);return this},r.prototype.length=function(){return this.value.length},r.prototype.charAt=function(e){return this.value.charAt(e)},r.prototype.deleteCharAt=function(e){this.value=this.value.substr(0,e)+this.value.substring(e+1)},r.prototype.setCharAt=function(e,t){this.value=this.value.substr(0,e)+t+this.value.substr(e+1)},r.prototype.substring=function(e,t){return this.value.substring(e,t)},r.prototype.setLengthToZero=function(){this.value=""},r.prototype.toString=function(){return this.value},r.prototype.insert=function(e,t){this.value=this.value.substring(0,e)+t+this.value.substring(e)},r}(),we=function(){function r(e,t,n,i){if(this.width=e,this.height=t,this.rowSize=n,this.bits=i,null==t&&(t=e),this.height=t,e<1||t<1)throw new X("Both dimensions must be greater than 0");null==n&&(n=Math.floor((e+31)/32)),this.rowSize=n,null==i&&(this.bits=new Int32Array(this.rowSize*this.height))}return r.parseFromBooleanArray=function(e){for(var t=e.length,n=e[0].length,i=new r(n,t),o=0;o<t;o++)for(var a=e[o],s=0;s<n;s++)a[s]&&i.set(s,o);return i},r.parseFromString=function(e,t,n){if(null===e)throw new X("stringRepresentation cannot be null");for(var i=new Array(e.length),o=0,a=0,s=-1,c=0,u=0;u<e.length;)if("\n"===e.charAt(u)||"\r"===e.charAt(u)){if(o>a){if(-1===s)s=o-a;else if(o-a!==s)throw new X("row lengths do not match");a=o,c++}u++}else if(e.substring(u,u+t.length)===t)u+=t.length,i[o]=!0,o++;else{if(e.substring(u,u+n.length)!==n)throw new X("illegal character encountered: "+e.substring(u));u+=n.length,i[o]=!1,o++}if(o>a){if(-1===s)s=o-a;else if(o-a!==s)throw new X("row lengths do not match");c++}for(var f=new r(s,c),d=0;d<o;d++)i[d]&&f.set(Math.floor(d%s),Math.floor(d/s));return f},r.prototype.get=function(e,t){var n=t*this.rowSize+Math.floor(e/32);return!!(this.bits[n]>>>(31&e)&1)},r.prototype.set=function(e,t){var n=t*this.rowSize+Math.floor(e/32);this.bits[n]|=1<<(31&e)&4294967295},r.prototype.unset=function(e,t){var n=t*this.rowSize+Math.floor(e/32);this.bits[n]&=~(1<<(31&e)&4294967295)},r.prototype.flip=function(e,t){var n=t*this.rowSize+Math.floor(e/32);this.bits[n]^=1<<(31&e)&4294967295},r.prototype.xor=function(e){if(this.width!==e.getWidth()||this.height!==e.getHeight()||this.rowSize!==e.getRowSize())throw new X("input matrix dimensions do not match");for(var t=new Ae(Math.floor(this.width/32)+1),n=this.rowSize,i=this.bits,o=0,a=this.height;o<a;o++)for(var s=o*n,c=e.getRow(o,t).getBitArray(),u=0;u<n;u++)i[s+u]^=c[u]},r.prototype.clear=function(){for(var e=this.bits,t=e.length,n=0;n<t;n++)e[n]=0},r.prototype.setRegion=function(e,t,n,i){if(t<0||e<0)throw new X("Left and top must be nonnegative");if(i<1||n<1)throw new X("Height and width must be at least 1");var o=e+n,a=t+i;if(a>this.height||o>this.width)throw new X("The region must fit inside the matrix");for(var s=this.rowSize,c=this.bits,u=t;u<a;u++)for(var f=u*s,d=e;d<o;d++)c[f+Math.floor(d/32)]|=1<<(31&d)&4294967295},r.prototype.getRow=function(e,t){null==t||t.getSize()<this.width?t=new Ae(this.width):t.clear();for(var n=this.rowSize,i=this.bits,o=e*n,a=0;a<n;a++)t.setBulk(32*a,i[o+a]);return t},r.prototype.setRow=function(e,t){le.arraycopy(t.getBitArray(),0,this.bits,e*this.rowSize,this.rowSize)},r.prototype.rotate180=function(){for(var e=this.getWidth(),t=this.getHeight(),n=new Ae(e),i=new Ae(e),o=0,a=Math.floor((t+1)/2);o<a;o++)n=this.getRow(o,n),i=this.getRow(t-1-o,i),n.reverse(),i.reverse(),this.setRow(o,i),this.setRow(t-1-o,n)},r.prototype.getEnclosingRectangle=function(){for(var t=this.height,n=this.rowSize,i=this.bits,o=this.width,a=t,s=-1,c=-1,u=0;u<t;u++)for(var f=0;f<n;f++){var d=i[u*n+f];if(0!==d){if(u<a&&(a=u),u>c&&(c=u),32*f<o){for(var l=0;!(d<<31-l&4294967295);)l++;32*f+l<o&&(o=32*f+l)}if(32*f+31>s){for(l=31;!(d>>>l);)l--;32*f+l>s&&(s=32*f+l)}}}return s<o||c<a?null:Int32Array.from([o,a,s-o+1,c-a+1])},r.prototype.getTopLeftOnBit=function(){for(var e=this.rowSize,t=this.bits,n=0;n<t.length&&0===t[n];)n++;if(n===t.length)return null;for(var i=n/e,o=n%e*32,a=t[n],s=0;!(a<<31-s&4294967295);)s++;return Int32Array.from([o+=s,i])},r.prototype.getBottomRightOnBit=function(){for(var e=this.rowSize,t=this.bits,n=t.length-1;n>=0&&0===t[n];)n--;if(n<0)return null;for(var i=Math.floor(n/e),o=32*Math.floor(n%e),a=t[n],s=31;!(a>>>s);)s--;return Int32Array.from([o+=s,i])},r.prototype.getWidth=function(){return this.width},r.prototype.getHeight=function(){return this.height},r.prototype.getRowSize=function(){return this.rowSize},r.prototype.equals=function(e){return e instanceof r&&(this.width===e.width&&this.height===e.height&&this.rowSize===e.rowSize&&te.equals(this.bits,e.bits))},r.prototype.hashCode=function(){var e=this.width;
1return 31*(e=31*(e=31*(e=31*e+this.width)+this.height)+this.rowSize)+te.hashCode(this.bits)},r.prototype.toString=function(e,t,n){return void 0===e&&(e="X "),void 0===t&&(t=" "),void 0===n&&(n="\n"),this.buildToString(e,t,n)},r.prototype.buildToString=function(e,t,n){for(var i=new K,o=0,a=this.height;o<a;o++){for(var s=0,c=this.width;s<c;s++)i.append(this.get(s,o)?e:t);i.append(n)}return i.toString()},r.prototype.clone=function(){return new r(this.width,this.height,this.rowSize,this.bits.slice())},r}();var ht=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const N=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return ht(e,r),e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(ee);var Jt=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const jn=function(r){function e(t){var n=r.call(this,t)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return Jt(e,r),e.prototype.getBlackRow=function(t,n){var i=this.getLuminanceSource(),o=i.getWidth();null==n||n.getSize()<o?n=new Ae(o):n.clear(),this.initArrays(o);for(var a=i.getRow(t,this.luminances),s=this.buckets,c=0;c<o;c++)s[(255&a[c])>>e.LUMINANCE_SHIFT]++;var u=e.estimateBlackPoint(s);if(o<3)for(c=0;c<o;c++)(255&a[c])<u&&n.set(c);else{var f=255&a[0],d=255&a[1];for(c=1;c<o-1;c++){var l=255&a[c+1];(4*d-f-l)/2<u&&n.set(c),f=d,d=l}}return n},e.prototype.getBlackMatrix=function(){var t=this.getLuminanceSource(),n=t.getWidth(),i=t.getHeight(),o=new we(n,i);this.initArrays(n);for(var a=this.buckets,s=1;s<5;s++)for(var c=Math.floor(i*s/5),u=t.getRow(c,this.luminances),f=Math.floor(4*n/5),d=Math.floor(n/5);d<f;d++)a[(255&u[d])>>e.LUMINANCE_SHIFT]++;var h=e.estimateBlackPoint(a),p=t.getMatrix();for(s=0;s<i;s++){var C=s*n;for(d=0;d<n;d++)(255&p[C+d])<h&&o.set(d,s)}return o},e.prototype.createBinarizer=function(t){return new e(t)},e.prototype.initArrays=function(t){this.luminances.length<t&&(this.luminances=new Uint8ClampedArray(t));for(var n=this.buckets,i=0;i<e.LUMINANCE_BUCKETS;i++)n[i]=0},e.estimateBlackPoint=function(t){for(var n=t.length,i=0,o=0,a=0,s=0;s<n;s++)t[s]>a&&(o=s,a=t[s]),t[s]>i&&(i=t[s]);var c=0,u=0;for(s=0;s<n;s++){var f=s-o;(d=t[s]*f*f)>u&&(c=s,u=d)}if(o>c){var l=o;o=c,c=l}if(c-o<=n/16)throw new N;var h=c-1,p=-1;for(s=c-1;s>o;s--){var d,C=s-o;(d=C*C*(c-s)*(i-t[s]))>p&&(h=s,p=d)}return h<<e.LUMINANCE_SHIFT},e.LUMINANCE_SHIFT=8-(e.LUMINANCE_BITS=5),e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(Nt);var Yn=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const jr=function(r){function e(t){var n=r.call(this,t)||this;return n.matrix=null,n}return Yn(e,r),e.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var t=this.getLuminanceSource(),n=t.getWidth(),i=t.getHeight();if(n>=e.MINIMUM_DIMENSION&&i>=e.MINIMUM_DIMENSION){var o=t.getMatrix(),a=n>>e.BLOCK_SIZE_POWER;n&e.BLOCK_SIZE_MASK&&a++;var s=i>>e.BLOCK_SIZE_POWER;i&e.BLOCK_SIZE_MASK&&s++;var c=e.calculateBlackPoints(o,a,s,n,i),u=new we(n,i);e.calculateThresholdForBlock(o,a,s,n,i,c,u),this.matrix=u}else this.matrix=r.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(t){return new e(t)},e.calculateThresholdForBlock=function(t,n,i,o,a,s,c){for(var u=a-e.BLOCK_SIZE,f=o-e.BLOCK_SIZE,d=0;d<i;d++){var l=d<<e.BLOCK_SIZE_POWER;l>u&&(l=u);for(var h=e.cap(d,2,i-3),p=0;p<n;p++){var C=p<<e.BLOCK_SIZE_POWER;C>f&&(C=f);for(var A=e.cap(p,2,n-3),S=0,O=-2;O<=2;O++){var D=s[h+O];S+=D[A-2]+D[A-1]+D[A]+D[A+1]+D[A+2]}e.thresholdBlock(t,C,l,S/25,o,c)}}},e.cap=function(t,n,i){return t<n?n:t>i?i:t},e.thresholdBlock=function(t,n,i,o,a,s){for(var c=0,u=i*a+n;c<e.BLOCK_SIZE;c++,u+=a)for(var f=0;f<e.BLOCK_SIZE;f++)(255&t[u+f])<=o&&s.set(n+f,i+c)},e.calculateBlackPoints=function(t,n,i,o,a){for(var s=a-e.BLOCK_SIZE,c=o-e.BLOCK_SIZE,u=new Array(i),f=0;f<i;f++){u[f]=new Int32Array(n);var d=f<<e.BLOCK_SIZE_POWER;d>s&&(d=s);for(var l=0;l<n;l++){var h=l<<e.BLOCK_SIZE_POWER;h>c&&(h=c);for(var p=0,C=255,A=0,S=0,O=d*o+h;S<e.BLOCK_SIZE;S++,O+=o){for(var D=0;D<e.BLOCK_SIZE;D++){var P=255&t[O+D];p+=P,P<C&&(C=P),P>A&&(A=P)}if(A-C>e.MIN_DYNAMIC_RANGE)for(S++,O+=o;S<e.BLOCK_SIZE;S++,O+=o)for(D=0;D<e.BLOCK_SIZE;D++)p+=255&t[O+D]}var B=p>>2*e.BLOCK_SIZE_POWER;if(A-C<=e.MIN_DYNAMIC_RANGE&&(B=C/2,f>0&&l>0)){var L=(u[f-1][l]+2*u[f][l-1]+u[f-1][l-1])/4;C<L&&(B=L)}u[f][l]=B}}return u},e.BLOCK_SIZE_MASK=(e.BLOCK_SIZE=1<<(e.BLOCK_SIZE_POWER=3))-1,e.MINIMUM_DIMENSION=5*e.BLOCK_SIZE,e.MIN_DYNAMIC_RANGE=24,e}(jn),zt=function(){function r(e,t){this.width=e,this.height=t}return r.prototype.getWidth=function(){return this.width},r.prototype.getHeight=function(){return this.height},r.prototype.isCropSupported=function(){return!1},r.prototype.crop=function(e,t,n,i){throw new ie("This luminance source does not support cropping.")},r.prototype.isRotateSupported=function(){return!1},r.prototype.rotateCounterClockwise=function(){throw new ie("This luminance source does not support rotation by 90 degrees.")},r.prototype.rotateCounterClockwise45=function(){throw new ie("This luminance source does not support rotation by 45 degrees.")},r.prototype.toString=function(){for(var e=new Uint8ClampedArray(this.width),t=new K,n=0;n<this.height;n++){for(var i=this.getRow(n,e),o=0;o<this.width;o++){var a=255&i[o];t.append(a<64?"#":a<128?"+":a<192?".":" ")}t.append("\n")}return t.toString()},r}();var Kn=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const er=function(r){function e(t){var n=r.call(this,t.getWidth(),t.getHeight())||this;return n.delegate=t,n}return Kn(e,r),e.prototype.getRow=function(t,n){for(var i=this.delegate.getRow(t,n),o=this.getWidth(),a=0;a<o;a++)i[a]=255-(255&i[a]);return i},e.prototype.getMatrix=function(){for(var t=this.delegate.getMatrix(),n=this.getWidth()*this.getHeight(),i=new Uint8ClampedArray(n),o=0;o<n;o++)i[o]=255-(255&t[o]);return i},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(t,n,i,o){return new e(this.delegate.crop(t,n,i,o))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}(zt);var $n=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),Jn=function(r){function e(t,n){void 0===n&&(n=!1);var i=r.call(this,t.width,t.height)||this;return i.canvas=t,i.tempCanvasElement=null,i.buffer=e.makeBufferFromCanvasImageData(t,n),i}return $n(e,r),e.makeBufferFromCanvasImageData=function(t,n){void 0===n&&(n=!1);var i=t.getContext("2d").getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(i.data,t.width,t.height,n)},e.toGrayscaleBuffer=function(t,n,i,o){void 0===o&&(o=!1);var a=new Uint8ClampedArray(n*i);if((e.FRAME_INDEX=!e.FRAME_INDEX)||!o)for(var s=0,c=0,u=t.length;s<u;s+=4,c++){a[c]=0===t[s+3]?255:306*t[s]+601*t[s+1]+117*t[s+2]+512>>10}else{s=0,c=0;for(var C=t.length;s<C;s+=4,c++)a[c]=255-(0===t[s+3]?255:306*t[s]+601*t[s+1]+117*t[s+2]+512>>10)}return a},e.prototype.getRow=function(t,n){if(t<0||t>=this.getHeight())throw new X("Requested row is outside the image: "+t);var i=this.getWidth(),o=t*i;return null===n?n=this.buffer.slice(o,o+i):(n.length<i&&(n=new Uint8ClampedArray(i)),n.set(this.buffer.slice(o,o+i))),n},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,n,i,o){return r.prototype.crop.call(this,t,n,i,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var n=this.getTempCanvasElement(),i=n.getContext("2d"),o=t*e.DEGREE_TO_RADIANS,a=this.canvas.width,s=this.canvas.height,c=Math.ceil(Math.abs(Math.cos(o))*a+Math.abs(Math.sin(o))*s),u=Math.ceil(Math.abs(Math.sin(o))*a+Math.abs(Math.cos(o))*s);return n.width=c,n.height=u,i.translate(c/2,u/2),i.rotate(o),i.drawImage(this.canvas,a/-2,s/-2),this.buffer=e.makeBufferFromCanvasImageData(n),this},e.prototype.invert=function(){return new er(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e.FRAME_INDEX=!0,e}(zt),ei=function(){function r(e,t,n){this.deviceId=e,this.label=t,this.kind="videoinput",this.groupId=n||void 0}return r.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},r}(),je=function(r,e,t,n){return new(t||(t=Promise))(function(o,a){function s(f){try{u(n.next(f))}catch(d){a(d)}}function c(f){try{u(n.throw(f))}catch(d){a(d)}}function u(f){f.done?o(f.value):function i(o){return o instanceof t?o:new t(function(a){a(o)})}(f.value).then(s,c)}u((n=n.apply(r,e||[])).next())})},Ye=function(r,e){var n,i,o,a,t={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return function c(u){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(o=2&u[0]?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(!(o=(o=t.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){t=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){t.label=u[1];break}if(6===u[0]&&t.label<o[1]){t.label=o[1],o=u;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(u);break}o[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(r,t)}catch(f){u=[6,f],i=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,f])}}},kt=function(){function r(e,t,n){void 0===t&&(t=500),this.reader=e,this.timeBetweenScansMillis=t,this._hints=n,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(r.prototype,"hasNavigator",{get:function(){return typeof navigator<"u"}
1,enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(e){this._timeBetweenDecodingAttempts=e<0?0:e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hints",{get:function(){return this._hints},set:function(e){this._hints=e||null},enumerable:!1,configurable:!0}),r.prototype.listVideoInputDevices=function(){return je(this,void 0,void 0,function(){var e,t,n,i,o,a,d,l;return Ye(this,function(h){switch(h.label){case 0: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.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:e=h.sent(),t=[];try{for(n=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),i=n.next();!i.done;i=n.next())"videoinput"===(a="video"===(o=i.value).kind?"videoinput":o.kind)&&t.push({deviceId:o.deviceId||o.id,label:o.label||"Video device "+(t.length+1),kind:a,groupId:o.groupId})}catch(p){d={error:p}}finally{try{i&&!i.done&&(l=n.return)&&l.call(n)}finally{if(d)throw d.error}}return[2,t]}})})},r.prototype.getVideoInputDevices=function(){return je(this,void 0,void 0,function(){return Ye(this,function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map(function(n){return new ei(n.deviceId,n.label)})]}})})},r.prototype.findDeviceById=function(e){return je(this,void 0,void 0,function(){var t;return Ye(this,function(n){switch(n.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(t=n.sent())?[2,t.find(function(i){return i.deviceId===e})]:[2,null]}})})},r.prototype.decodeFromInputVideoDevice=function(e,t){return je(this,void 0,void 0,function(){return Ye(this,function(n){switch(n.label){case 0:return[4,this.decodeOnceFromVideoDevice(e,t)];case 1:return[2,n.sent()]}})})},r.prototype.decodeOnceFromVideoDevice=function(e,t){return je(this,void 0,void 0,function(){return Ye(this,function(o){switch(o.label){case 0:return this.reset(),[4,this.decodeOnceFromConstraints({video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},t)];case 1:return[2,o.sent()]}})})},r.prototype.decodeOnceFromConstraints=function(e,t){return je(this,void 0,void 0,function(){var n;return Ye(this,function(i){switch(i.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return n=i.sent(),[4,this.decodeOnceFromStream(n,t)];case 2:return[2,i.sent()]}})})},r.prototype.decodeOnceFromStream=function(e,t){return je(this,void 0,void 0,function(){var n;return Ye(this,function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,t)];case 1:return n=o.sent(),[4,this.decodeOnce(n)];case 2:return[2,o.sent()]}})})},r.prototype.decodeFromInputVideoDeviceContinuously=function(e,t,n){return je(this,void 0,void 0,function(){return Ye(this,function(i){switch(i.label){case 0:return[4,this.decodeFromVideoDevice(e,t,n)];case 1:return[2,i.sent()]}})})},r.prototype.decodeFromVideoDevice=function(e,t,n){return je(this,void 0,void 0,function(){return Ye(this,function(a){switch(a.label){case 0:return[4,this.decodeFromConstraints({video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},t,n)];case 1:return[2,a.sent()]}})})},r.prototype.decodeFromConstraints=function(e,t,n){return je(this,void 0,void 0,function(){var i;return Ye(this,function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return i=o.sent(),[4,this.decodeFromStream(i,t,n)];case 2:return[2,o.sent()]}})})},r.prototype.decodeFromStream=function(e,t,n){return je(this,void 0,void 0,function(){var i;return Ye(this,function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,t)];case 1:return i=o.sent(),[4,this.decodeContinuously(i,n)];case 2:return[2,o.sent()]}})})},r.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},r.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},r.prototype.attachStreamToVideo=function(e,t){return je(this,void 0,void 0,function(){var n;return Ye(this,function(i){switch(i.label){case 0:return n=this.prepareVideoElement(t),this.addVideoSource(n,e),this.videoElement=n,this.stream=e,[4,this.playVideoOnLoadAsync(n)];case 1:return i.sent(),[2,n]}})})},r.prototype.playVideoOnLoadAsync=function(e){var t=this;return new Promise(function(n,i){return t.playVideoOnLoad(e,function(){return n()})})},r.prototype.playVideoOnLoad=function(e,t){var n=this;this.videoEndedListener=function(){return n.stopStreams()},this.videoCanPlayListener=function(){return n.tryPlayVideo(e)},e.addEventListener("ended",this.videoEndedListener),e.addEventListener("canplay",this.videoCanPlayListener),e.addEventListener("playing",t),this.tryPlayVideo(e)},r.prototype.isVideoPlaying=function(e){return e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2},r.prototype.tryPlayVideo=function(e){return je(this,void 0,void 0,function(){return Ye(this,function(n){switch(n.label){case 0:if(this.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.play()];case 2:return n.sent(),[3,4];case 3:return n.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}})})},r.prototype.getMediaElement=function(e,t){var n=document.getElementById(e);if(!n)throw new J("element with id '"+e+"' not found");if(n.nodeName.toLowerCase()!==t.toLowerCase())throw new J("element with id '"+e+"' must be an "+t+" element");return n},r.prototype.decodeFromImage=function(e,t){if(!e&&!t)throw new J("either imageElement with a src set or an url must be provided");return t&&!e?this.decodeFromImageUrl(t):this.decodeFromImageElement(e)},r.prototype.decodeFromVideo=function(e,t){if(!e&&!t)throw new J("Either an element with a src set or an URL must be provided");return t&&!e?this.decodeFromVideoUrl(t):this.decodeFromVideoElement(e)},r.prototype.decodeFromVideoContinuously=function(e,t,n){if(void 0===e&&void 0===t)throw new J("Either an element with a src set or an URL must be provided");return t&&!e?this.decodeFromVideoUrlContinuously(t,n):this.decodeFromVideoElementContinuously(e,n)},r.prototype.decodeFromImageElement=function(e){if(!e)throw new J("An image element must be provided.");this.reset();var t=this.prepareImageElement(e);return this.imageElement=t,this.isImageLoaded(t)?this.decodeOnce(t,!1,!0):this._decodeOnLoadImage(t)},r.prototype.decodeFromVideoElement=function(e){var t=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideo(t)},r.prototype.decodeFromVideoElementContinuously=function(e,t){var n=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideoContinuously(n,t)},r.prototype._decodeFromVideoElementSetup=function(e){if(!e)throw new J("A video element must be provided.");this.reset();var t=this.prepareVideoElement(e);return this.videoElement=t,t},r.prototype.decodeFromImageUrl=function(e){if(!e)throw new J("An URL must be provided.");this.reset();var t=this.prepareImageElement();this.imageElement=t;var n=this._decodeOnLoadImage(t);return t.src=e,n},r.prototype.decodeFromVideoUrl=function(e){if(!e)throw new J("An URL must be provided.");this.reset();var t=this.prepareVideoElement(),n=this.decodeFromVideoElement(t);return t.src=e,n},r.prototype.decodeFromVideoUrlContinuously=function(e,t){if(!e)throw new J("An URL must be provided.");this.reset();var n=this.prepareVideoElement(),i=this.decodeFromVideoElementContinuously(n,t);return n.src=e,i},r.prototype._decodeOnLoadImage=function(e){var t=this;return new Promise(function(n,i){t.imageLoadedListener=function(){return t.decodeOnce(e,!1,!0).then(n,i)},e.addEventListener("load",t.imageLoadedListener)})},r.prototype._decodeOnLoadVideo=function(e){return je(this,void 0,void 0,function(){return Ye(this,function(t){switch(t.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return t.sent(),[4,this.decodeOnce(e)];case 2:return[2,t.sent()]}})})},r.prototype._decodeOnLoadVideoContinuously=function(e,t){return je(this,void 0,void 0,function(){return Ye(this,function(n){switch(n.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return n.sent(),this.decodeContinuously(e,t),[2]}})})},r.prototype.isImageLoaded=function(e){return!(!e.complete||0===e.naturalWi
1dth)},r.prototype.prepareImageElement=function(e){var t;return typeof e>"u"&&((t=document.createElement("img")).width=200,t.height=200),"string"==typeof e&&(t=this.getMediaElement(e,"img")),e instanceof HTMLImageElement&&(t=e),t},r.prototype.prepareVideoElement=function(e){var t;return!e&&typeof document<"u"&&((t=document.createElement("video")).width=200,t.height=200),"string"==typeof e&&(t=this.getMediaElement(e,"video")),e instanceof HTMLVideoElement&&(t=e),t.setAttribute("autoplay","true"),t.setAttribute("muted","true"),t.setAttribute("playsinline","true"),t},r.prototype.decodeOnce=function(e,t,n){var i=this;void 0===t&&(t=!0),void 0===n&&(n=!0),this._stopAsyncDecode=!1;var o=function(a,s){if(i._stopAsyncDecode)return s(new N("Video stream has ended before any code could be detected.")),void(i._stopAsyncDecode=void 0);try{a(i.decode(e))}catch(l){if(t&&l instanceof N||(l instanceof Ie||l instanceof y)&&n)return setTimeout(o,i._timeBetweenDecodingAttempts,a,s);s(l)}};return new Promise(function(a,s){return o(a,s)})},r.prototype.decodeContinuously=function(e,t){var n=this;this._stopContinuousDecode=!1;var i=function(){if(n._stopContinuousDecode)n._stopContinuousDecode=void 0;else try{var o=n.decode(e);t(o,null),setTimeout(i,n.timeBetweenScansMillis)}catch(c){t(null,c),(c instanceof Ie||c instanceof y||c instanceof N)&&setTimeout(i,n._timeBetweenDecodingAttempts)}};i()},r.prototype.decode=function(e){var t=this.createBinaryBitmap(e);return this.decodeBitmap(t)},r.prototype.createBinaryBitmap=function(e){this.getCaptureCanvasContext(e);var n=!1;e instanceof HTMLVideoElement?(this.drawFrameOnCanvas(e),n=!0):this.drawImageOnCanvas(e);var i=this.getCaptureCanvas(e),o=new Jn(i,n),a=new jr(o);return new gt(a)},r.prototype.getCaptureCanvasContext=function(e){if(!this.captureCanvasContext){var t=this.getCaptureCanvas(e),n=void 0;try{n=t.getContext("2d",{willReadFrequently:!0})}catch{n=t.getContext("2d")}this.captureCanvasContext=n}return this.captureCanvasContext},r.prototype.getCaptureCanvas=function(e){if(!this.captureCanvas){var t=this.createCaptureCanvas(e);this.captureCanvas=t}return this.captureCanvas},r.prototype.drawFrameOnCanvas=function(e,t,n){void 0===t&&(t={sx:0,sy:0,sWidth:e.videoWidth,sHeight:e.videoHeight,dx:0,dy:0,dWidth:e.videoWidth,dHeight:e.videoHeight}),void 0===n&&(n=this.captureCanvasContext),n.drawImage(e,t.sx,t.sy,t.sWidth,t.sHeight,t.dx,t.dy,t.dWidth,t.dHeight)},r.prototype.drawImageOnCanvas=function(e,t,n){void 0===t&&(t={sx:0,sy:0,sWidth:e.naturalWidth,sHeight:e.naturalHeight,dx:0,dy:0,dWidth:e.naturalWidth,dHeight:e.naturalHeight}),void 0===n&&(n=this.captureCanvasContext),n.drawImage(e,t.sx,t.sy,t.sWidth,t.sHeight,t.dx,t.dy,t.dWidth,t.dHeight)},r.prototype.decodeBitmap=function(e){return this.reader.decode(e,this._hints)},r.prototype.createCaptureCanvas=function(e){if(typeof document>"u")return this._destroyCaptureCanvas(),null;var n,i,t=document.createElement("canvas");return typeof e<"u"&&(e instanceof HTMLVideoElement?(n=e.videoWidth,i=e.videoHeight):e instanceof HTMLImageElement&&(n=e.naturalWidth||e.width,i=e.naturalHeight||e.height)),t.style.width=n+"px",t.style.height=i+"px",t.width=n,t.height=i,t},r.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach(function(e){return e.stop()}),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},r.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},r.prototype._destroyVideoElement=function(){this.videoElement&&(typeof this.videoEndedListener<"u"&&this.videoElement.removeEventListener("ended",this.videoEndedListener),typeof this.videoPlayingEventListener<"u"&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),typeof this.videoCanPlayListener<"u"&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},r.prototype._destroyImageElement=function(){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)},r.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},r.prototype.addVideoSource=function(e,t){try{e.srcObject=t}catch{e.src=URL.createObjectURL(t)}},r.prototype.cleanVideoSource=function(e){try{e.srcObject=null}catch{e.src=""}this.videoElement.removeAttribute("src")},r}();const He=function(){function r(e,t,n,i,o,a){void 0===n&&(n=null==t?0:8*t.length),void 0===a&&(a=le.currentTimeMillis()),this.text=e,this.rawBytes=t,this.numBits=n,this.resultPoints=i,this.format=o,this.timestamp=a,this.text=e,this.rawBytes=t,this.numBits=null==n?null==t?0:8*t.length:n,this.resultPoints=i,this.format=o,this.resultMetadata=null,this.timestamp=null==a?le.currentTimeMillis():a}return r.prototype.getText=function(){return this.text},r.prototype.getRawBytes=function(){return this.rawBytes},r.prototype.getNumBits=function(){return this.numBits},r.prototype.getResultPoints=function(){return this.resultPoints},r.prototype.getBarcodeFormat=function(){return this.format},r.prototype.getResultMetadata=function(){return this.resultMetadata},r.prototype.putMetadata=function(e,t){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(e,t)},r.prototype.putAllMetadata=function(e){null!==e&&(this.resultMetadata=null===this.resultMetadata?e:new Map(e))},r.prototype.addResultPoints=function(e){var t=this.resultPoints;if(null===t)this.resultPoints=e;else if(null!==e&&e.length>0){var n=new Array(t.length+e.length);le.arraycopy(t,0,n,0,t.length),le.arraycopy(e,0,n,t.length,e.length),this.resultPoints=n}},r.prototype.getTimestamp=function(){return this.timestamp},r.prototype.toString=function(){return this.text},r}();
1var Yr=function(r){return r[r.AZTEC=0]="AZTEC",r[r.CODABAR=1]="CODABAR",r[r.CODE_39=2]="CODE_39",r[r.CODE_93=3]="CODE_93",r[r.CODE_128=4]="CODE_128",r[r.DATA_MATRIX=5]="DATA_MATRIX",r[r.EAN_8=6]="EAN_8",r[r.EAN_13=7]="EAN_13",r[r.ITF=8]="ITF",r[r.MAXICODE=9]="MAXICODE",r[r.PDF_417=10]="PDF_417",r[r.QR_CODE=11]="QR_CODE",r[r.RSS_14=12]="RSS_14",r[r.RSS_EXPANDED=13]="RSS_EXPANDED",r[r.UPC_A=14]="UPC_A",r[r.UPC_E=15]="UPC_E",r[r.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION",r}(Yr||{});const Z=Yr;var qr=function(r){return r[r.OTHER=0]="OTHER",r[r.ORIENTATION=1]="ORIENTATION",r[r.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",r[r.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",r[r.ISSUE_NUMBER=4]="ISSUE_NUMBER",r[r.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",r[r.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",r[r.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",r[r.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",r[r.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",r[r.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY",r}(qr||{});const Ue=qr,tr=function(){function r(e,t,n,i,o,a){void 0===o&&(o=-1),void 0===a&&(a=-1),this.rawBytes=e,this.text=t,this.byteSegments=n,this.ecLevel=i,this.structuredAppendSequenceNumber=o,this.structuredAppendParity=a,this.numBits=null==e?0:8*e.length}return r.prototype.getRawBytes=function(){return this.rawBytes},r.prototype.getNumBits=function(){return this.numBits},r.prototype.setNumBits=function(e){this.numBits=e},r.prototype.getText=function(){return this.text},r.prototype.getByteSegments=function(){return this.byteSegments},r.prototype.getECLevel=function(){return this.ecLevel},r.prototype.getErrorsCorrected=function(){return this.errorsCorrected},r.prototype.setErrorsCorrected=function(e){this.errorsCorrected=e},r.prototype.getErasures=function(){return this.erasures},r.prototype.setErasures=function(e){this.erasures=e},r.prototype.getOther=function(){return this.other},r.prototype.setOther=function(e){this.other=e},r.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},r.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},r.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},r}(),Xt=function(){function r(){}return r.prototype.exp=function(e){return this.expTable[e]},r.prototype.log=function(e){if(0===e)throw new X;return this.logTable[e]},r.addOrSubtract=function(e,t){return e^t},r}(),xt=function(){function r(e,t){if(0===t.length)throw new X;this.field=e;var n=t.length;if(n>1&&0===t[0]){for(var i=1;i<n&&0===t[i];)i++;i===n?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(n-i),le.arraycopy(t,i,this.coefficients,0,this.coefficients.length))}else this.coefficients=t}return r.prototype.getCoefficients=function(){return this.coefficients},r.prototype.getDegree=function(){return this.coefficients.length-1},r.prototype.isZero=function(){return 0===this.coefficients[0]},r.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},r.prototype.evaluateAt=function(e){if(0===e)return this.getCoefficient(0);var n,t=this.coefficients;if(1===e){n=0;for(var i=0,o=t.length;i!==o;i++)n=Xt.addOrSubtract(n,t[i]);return n}n=t[0];var s=t.length,c=this.field;for(i=1;i<s;i++)n=Xt.addOrSubtract(c.multiply(e,n),t[i]);return n},r.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new X("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var t=this.coefficients,n=e.coefficients;if(t.length>n.length){var i=t;t=n,n=i}var o=new Int32Array(n.length),a=n.length-t.length;le.arraycopy(n,0,o,0,a);for(var s=a;s<n.length;s++)o[s]=Xt.addOrSubtract(t[s-a],n[s]);return new r(this.field,o)},r.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new X("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var t=this.coefficients,n=t.length,i=e.coefficients,o=i.length,a=new Int32Array(n+o-1),s=this.field,c=0;c<n;c++)for(var u=t[c],f=0;f<o;f++)a[c+f]=Xt.addOrSubtract(a[c+f],s.multiply(u,i[f]));return new r(s,a)},r.prototype.multiplyScalar=function(e){if(0===e)return this.field.getZero();if(1===e)return this;for(var t=this.coefficients.length,n=this.field,i=new Int32Array(t),o=this.coefficients,a=0;a<t;a++)i[a]=n.multiply(o[a],e);return new r(n,i)},r.prototype.multiplyByMonomial=function(e,t){if(e<0)throw new X;if(0===t)return this.field.getZero();for(var n=this.coefficients,i=n.length,o=new Int32Array(i+e),a=this.field,s=0;s<i;s++)o[s]=a.multiply(n[s],t);return new r(a,o)},r.prototype.divide=function(e){if(!this.field.equals(e.field))throw new X("GenericGFPolys do n
1ot have same GenericGF field");if(e.isZero())throw new X("Divide by 0");for(var t=this.field,n=t.getZero(),i=this,o=e.getCoefficient(e.getDegree()),a=t.inverse(o);i.getDegree()>=e.getDegree()&&!i.isZero();){var s=i.getDegree()-e.getDegree(),c=t.multiply(i.getCoefficient(i.getDegree()),a),u=e.multiplyByMonomial(s,c),f=t.buildMonomial(s,c);n=n.addOrSubtract(f),i=i.addOrSubtract(u)}return[n,i]},r.prototype.toString=function(){for(var e="",t=this.getDegree();t>=0;t--){var n=this.getCoefficient(t);if(0!==n){if(n<0?(e+=" - ",n=-n):e.length>0&&(e+=" + "),0===t||1!==n){var i=this.field.log(n);0===i?e+="1":1===i?e+="a":(e+="a^",e+=i)}0!==t&&(1===t?e+="x":(e+="x^",e+=t))}}return e},r}();var ai=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Zr=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return ai(e,r),e.kind="ArithmeticException",e}(ee);var ci=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Ke=function(r){function e(t,n,i){var o=r.call(this)||this;o.primitive=t,o.size=n,o.generatorBase=i;for(var a=new Int32Array(n),s=1,c=0;c<n;c++)a[c]=s,(s*=2)>=n&&(s^=t,s&=n-1);o.expTable=a;var u=new Int32Array(n);for(c=0;c<n-1;c++)u[a[c]]=c;return o.logTable=u,o.zero=new xt(o,Int32Array.from([0])),o.one=new xt(o,Int32Array.from([1])),o}return ci(e,r),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,n){if(t<0)throw new X;if(0===n)return this.zero;var i=new Int32Array(t+1);return i[0]=n,new xt(this,i)},e.prototype.inverse=function(t){if(0===t)throw new Zr;return this.expTable[this.size-this.logTable[t]-1]},e.prototype.multiply=function(t,n){return 0===t||0===n?0:this.expTable[(this.logTable[t]+this.logTable[n])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+Q.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(t){return t===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e}(Xt);var fi=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const rr=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return fi(e,r),e.kind="ReedSolomonException",e}(ee);var li=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const pt=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return li(e,r),e.kind="IllegalStateException",e}(ee),nr=function(){function r(e){this.field=e}return r.prototype.decode=function(e,t){for(var n=this.field,i=new xt(n,e),o=new Int32Array(t),a=!0,s=0;s<t;s++){var c=i.evaluateAt(n.exp(s+n.getGeneratorBase()));o[o.length-1-s]=c,0!==c&&(a=!1)}if(!a){var u=new xt(n,o),f=this.runEuclideanAlgorithm(n.buildMonomial(t,1),u,t),l=f[1],h=this.findErrorLocations(f[0]),p=this.findErrorMagnitudes(l,h);for(s=0;s<h.length;s++){var C=e.length-1-n.log(h[s]);if(C<0)throw new rr("Bad error location");e[C]=Ke.addOrSubtract(e[C],p[s])}}},r.prototype.runEuclideanAlgorithm=function(e,t,n){if(e.getDegree()<t.getDegree()){var i=e;e=t,t=i}for(var o=this.field,a=e,s=t,c=o.getZero(),u=o.getOne();s.getDegree()>=(n/2|0);){var f=a,d=c;if(c=u,(a=s).isZero())throw new rr("r_{i-1} was zero");s=f;for(var l=o.getZero(),h=a.getCoefficient(a.getDegree()),p=o.inverse(h);s.getDegree()>=a.getDegree()&&!s.isZero();){var C=s.getDegree()-a.getDegree(),A=o.multiply(s.getCoefficient(s.getDegree()),p);l=l.addOrSubtract(o.buildMonomial(C,A)),s=s.addOrSubtract(a.multiplyByMonomial(C,A))}if(u=l.multiply(c).addOrSubtract(d),s.getDegree()>=a.getDegree())throw new pt("Division algorithm failed to reduce polynomial?")}var S=u.getCoefficient(0);if(0===S)throw new rr("sigmaTilde(0) was zero");var O=o.inverse(S);return[u.multiplyScalar(O),s.multiplyScalar(O)]},r.prototype.findErrorLocations=function(e){var t=e.getDegree();if(1===t)return Int32Array.from([e.getCoefficient(1)]);for(var n=new Int32Array(t),i=0,o=this.field,a=1;a<o.getSize()&&i<t;a++)0===e.evaluateAt(a)&&(n[i]=o.inverse(a),i++);if(i!==t)throw new rr("Error locator degree does not match number of roots");return n},r.prototype.findErrorMagnitudes=function(e,t){for(var n=t.length,i=new Int32Array(n),o=this.field,a=0;a<n;a++){for(var s=o.inverse(t[a]),c=1,u=0;u<n;u++)if(a!==u){var f=o.multiply(t[u],s);c=o.multiply(c,1&f?-2&f:1|f)}i[a]=o.multiply(e.evaluateAt(s),o.inverse(c)),0!==o.getGeneratorBase()&&(i[a]=o.multiply(i[a],s))}return i},r}();var We=function(r){return r[r.UPPER=0]="UPPER",r[r.LOWER=1]="LOWER",r[r.MIXED=2]="MIXED",r[r.DIGIT=3]="DIGIT",r[r.PUNCT=4]="PUNCT",r[r.BINARY=5]="BINARY",r}(We||{});const Kr=function(){function r(){}return r.prototype.decode=function(e){this.ddata=e;var t=e.getBits(),n=this.extractBits(t),i=this.correctBits(n),o=r.convertBoolArrayToByteArray(i),a=r.getEncodedData(i),s=new tr(o,a,null,
1null);return s.setNumBits(i.length),s},r.highLevelDecode=function(e){return this.getEncodedData(e)},r.getEncodedData=function(e){for(var t=e.length,n=We.UPPER,i=We.UPPER,o="",a=0;a<t;)if(i===We.BINARY){if(t-a<5)break;var s=r.readCode(e,a,5);if(a+=5,0===s){if(t-a<11)break;s=r.readCode(e,a,11)+31,a+=11}for(var c=0;c<s;c++){if(t-a<8){a=t;break}var u=r.readCode(e,a,8);o+=q.castAsNonUtf8Char(u),a+=8}i=n}else{var f=i===We.DIGIT?4:5;if(t-a<f)break;u=r.readCode(e,a,f),a+=f;var d=r.getCharacter(i,u);d.startsWith("CTRL_")?(n=i,i=r.getTable(d.charAt(5)),"L"===d.charAt(6)&&(n=i)):(o+=d,i=n)}return o},r.getTable=function(e){switch(e){case"L":return We.LOWER;case"P":return We.PUNCT;case"M":return We.MIXED;case"D":return We.DIGIT;case"B":return We.BINARY;default:return We.UPPER}},r.getCharacter=function(e,t){switch(e){case We.UPPER:return r.UPPER_TABLE[t];case We.LOWER:return r.LOWER_TABLE[t];case We.MIXED:return r.MIXED_TABLE[t];case We.PUNCT:return r.PUNCT_TABLE[t];case We.DIGIT:return r.DIGIT_TABLE[t];default:throw new pt("Bad table")}},r.prototype.correctBits=function(e){var t,n;this.ddata.getNbLayers()<=2?(n=6,t=Ke.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,t=Ke.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,t=Ke.AZTEC_DATA_10):(n=12,t=Ke.AZTEC_DATA_12);var i=this.ddata.getNbDatablocks(),o=e.length/n;if(o<i)throw new y;for(var a=e.length%n,s=new Int32Array(o),c=0;c<o;c++,a+=n)s[c]=r.readCode(e,a,n);try{new nr(t).decode(s,o-i)}catch(A){throw new y(A)}var f=(1<<n)-1,d=0;for(c=0;c<i;c++){if(0===(l=s[c])||l===f)throw new y;(1===l||l===f-1)&&d++}var h=new Array(i*n-d),p=0;for(c=0;c<i;c++){var l;if(1===(l=s[c])||l===f-1)h.fill(l>1,p,p+n-1),p+=n-1;else for(var C=n-1;C>=0;--C)h[p++]=!!(l&1<<C)}return h},r.prototype.extractBits=function(e){var t=this.ddata.isCompact(),n=this.ddata.getNbLayers(),i=(t?11:14)+4*n,o=new Int32Array(i),a=new Array(this.totalBitsInLayer(n,t));if(t)for(var s=0;s<o.length;s++)o[s]=s;else{var c=i+1+2*Q.truncDivision(Q.truncDivision(i,2)-1,15),u=i/2,f=Q.truncDivision(c,2);for(s=0;s<u;s++){var d=s+Q.truncDivision(s,15);o[u-s-1]=f-d-1,o[u+s]=f+d+1}}s=0;for(var l=0;s<n;s++){for(var h=4*(n-s)+(t?9:12),p=2*s,C=i-1-p,A=0;A<h;A++)for(var S=2*A,O=0;O<2;O++)a[l+S+O]=e.get(o[p+O],o[p+A]),a[l+2*h+S+O]=e.get(o[p+A],o[C-O]),a[l+4*h+S+O]=e.get(o[C-O],o[C-A]),a[l+6*h+S+O]=e.get(o[C-A],o[p+O]);l+=8*h}return a},r.readCode=function(e,t,n){for(var i=0,o=t;o<t+n;o++)i<<=1,e[o]&&(i|=1);return i},r.readByte=function(e,t){var n=e.length-t;return n>=8?r.readCode(e,t,8):r.readCode(e,t,n)<<8-n},r.convertBoolArrayToByteArray=function(e){for(var t=new Uint8Array((e.length+7)/8),n=0;n<t.length;n++)t[n]=r.readByte(e,8*n);return t},r.prototype.totalBitsInLayer=function(e,t){return((t?88:112)+16*e)*e},r.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"],r.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"],r.MIXED_TABLE=["CTRL_PS"," ","\x01","\x02","\x03","\x04","\x05","\x06","\x07","\b","\t","\n","\v","\f","\r","\x1b","\x1c","\x1d","\x1e","\x1f","@","\\","^","_","`","|","~","\x7f","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],r.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],r.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],r}(),he=function(){function r(){}return r.round=function(e){return isNaN(e)?0:e<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:e>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e+(e<0?-.5:.5)|0},r.distance=function(e,t,n,i){var o=e-n,a=t-i;return Math.sqrt(o*o+a*a)},r.sum=function(e){for(var t=0,n=0,i=e.length;n!==i;n++)t+=e[n];return t},r}(),yr=function(){function r(){}return r.floatToIntBits=function(e){return e},r.MAX_VALUE=Number.MAX_SAFE_INTEGER,r}(),j=function(){function r(e,t){this.x=e,this.y=t}return r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.equals=function(e){return e instanceof r&&(this.x===e.x&&this.y===e.y)}
1,r.prototype.hashCode=function(){return 31*yr.floatToIntBits(this.x)+yr.floatToIntBits(this.y)},r.prototype.toString=function(){return"("+this.x+","+this.y+")"},r.orderBestPatterns=function(e){var o,a,s,t=this.distance(e[0],e[1]),n=this.distance(e[1],e[2]),i=this.distance(e[0],e[2]);if(n>=t&&n>=i?(a=e[0],o=e[1],s=e[2]):i>=n&&i>=t?(a=e[1],o=e[0],s=e[2]):(a=e[2],o=e[0],s=e[1]),this.crossProductZ(o,a,s)<0){var c=o;o=s,s=c}e[0]=o,e[1]=a,e[2]=s},r.distance=function(e,t){return he.distance(e.x,e.y,t.x,t.y)},r.crossProductZ=function(e,t,n){var i=t.x,o=t.y;return(n.x-i)*(e.y-o)-(n.y-o)*(e.x-i)},r}(),mr=function(){function r(e,t){this.bits=e,this.points=t}return r.prototype.getBits=function(){return this.bits},r.prototype.getPoints=function(){return this.points},r}();var mi=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const wi=function(r){function e(t,n,i,o,a){var s=r.call(this,t,n)||this;return s.compact=i,s.nbDatablocks=o,s.nbLayers=a,s}return mi(e,r),e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(mr),Cr=function(){function r(e,t,n,i){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),null==t&&(t=r.INIT_SIZE),null==n&&(n=e.getWidth()/2|0),null==i&&(i=e.getHeight()/2|0);var o=t/2|0;if(this.leftInit=n-o,this.rightInit=n+o,this.upInit=i-o,this.downInit=i+o,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new N}return r.prototype.detect=function(){for(var e=this.leftInit,t=this.rightInit,n=this.upInit,i=this.downInit,o=!1,a=!0,s=!1,c=!1,u=!1,f=!1,d=!1,l=this.width,h=this.height;a;){a=!1;for(var p=!0;(p||!c)&&t<l;)(p=this.containsBlackPoint(n,i,t,!1))?(t++,a=!0,c=!0):c||t++;if(t>=l){o=!0;break}for(var C=!0;(C||!u)&&i<h;)(C=this.containsBlackPoint(e,t,i,!0))?(i++,a=!0,u=!0):u||i++;if(i>=h){o=!0;break}for(var A=!0;(A||!f)&&e>=0;)(A=this.containsBlackPoint(n,i,e,!1))?(e--,a=!0,f=!0):f||e--;if(e<0){o=!0;break}for(var S=!0;(S||!d)&&n>=0;)(S=this.containsBlackPoint(e,t,n,!0))?(n--,a=!0,d=!0):d||n--;if(n<0){o=!0;break}a&&(s=!0)}if(!o&&s){for(var O=t-e,D=null,P=1;null===D&&P<O;P++)D=this.getBlackPointOnSegment(e,i-P,e+P,i);if(null==D)throw new N;var B=null;for(P=1;null===B&&P<O;P++)B=this.getBlackPointOnSegment(e,n+P,e+P,n);if(null==B)throw new N;var L=null;for(P=1;null===L&&P<O;P++)L=this.getBlackPointOnSegment(t,n+P,t-P,n);if(null==L)throw new N;var U=null;for(P=1;null===U&&P<O;P++)U=this.getBlackPointOnSegment(t,i-P,t-P,i);if(null==U)throw new N;return this.centerEdges(U,D,L,B)}throw new N},r.prototype.getBlackPointOnSegment=function(e,t,n,i){for(var o=he.round(he.distance(e,t,n,i)),a=(n-e)/o,s=(i-t)/o,c=this.image,u=0;u<o;u++){var f=he.round(e+u*a),d=he.round(t+u*s);if(c.get(f,d))return new j(f,d)}return null},r.prototype.centerEdges=function(e,t,n,i){var o=e.getX(),a=e.getY(),s=t.getX(),c=t.getY(),u=n.getX(),f=n.getY(),d=i.getX(),l=i.getY(),h=r.CORR;return o<this.width/2?[new j(d-h,l+h),new j(s+h,c+h),new j(u-h,f-h),new j(o+h,a-h)]:[new j(d+h,l+h),new j(s+h,c-h),new j(u-h,f+h),new j(o-h,a-h)]},r.prototype.containsBlackPoint=function(e,t,n,i){var o=this.image;if(i){for(var a=e;a<=t;a++)if(o.get(a,n))return!0}else for(var s=e;s<=t;s++)if(o.get(n,s))return!0;return!1},r.INIT_SIZE=10,r.CORR=1,r}(),Qr=function(){function r(){}return r.checkAndNudgePoints=function(e,t){for(var n=e.getWidth(),i=e.getHeight(),o=!0,a=0;a<t.length&&o;a+=2){var s=Math.floor(t[a]),c=Math.floor(t[a+1]);if(s<-1||s>n||c<-1||c>i)throw new N;o=!1,-1===s?(t[a]=0,o=!0):s===n&&(t[a]=n-1,o=!0),-1===c?(t[a+1]=0,o=!0):c===i&&(t[a+1]=i-1,o=!0)}for(o=!0,a=t.length-2;a>=0&&o;a-=2){if(s=Math.floor(t[a]),c=Math.floor(t[a+1]),s<-1||s>n||c<-1||c>i)throw new N;o=!1,-1===s?(t[a]=0,o=!0):s===n&&(t[a]=n-1,o=!0),-1===c?(t[a+1]=0,o=!0):c===i&&(t[a+1]=i-1,o=!0)}},r}(),$r=function(){function r(e,t,n,i,o,a,s,c,u){this.a11=e,this.a21=t,this.a31=n,this.a12=i,this.a22=o,this.a32=a,this.a13=s,this.a23=c,this.a33=u}return r.quadrilateralToQuadrilateral=function(e,t,n,i,o,a,s,c,u,f,d,l,h,p,C,A){var S=r.quadrilateralToSquare(e,t,n,i,o,a,s,c);return r.squareToQuadrilateral(u,f,d,l,h,p,C,A).times(S)},r.prototype.transformPoints=function(e){for(var t=e.length,n=this.a11,i=this.a12,o=this.a13,a=this.a21,s=this.a22,c=this.a23,u=this.a31,f=this.a32,d=this.a33,l=0;l<t;
1l+=2){var h=e[l],p=e[l+1],C=o*h+c*p+d;e[l]=(n*h+a*p+u)/C,e[l+1]=(i*h+s*p+f)/C}},r.prototype.transformPointsWithValues=function(e,t){for(var n=this.a11,i=this.a12,o=this.a13,a=this.a21,s=this.a22,c=this.a23,u=this.a31,f=this.a32,d=this.a33,l=e.length,h=0;h<l;h++){var p=e[h],C=t[h],A=o*p+c*C+d;e[h]=(n*p+a*C+u)/A,t[h]=(i*p+s*C+f)/A}},r.squareToQuadrilateral=function(e,t,n,i,o,a,s,c){var u=e-n+o-s,f=t-i+a-c;if(0===u&&0===f)return new r(n-e,o-n,e,i-t,a-i,t,0,0,1);var d=n-o,l=s-o,h=i-a,p=c-a,C=d*p-l*h,A=(u*p-l*f)/C,S=(d*f-u*h)/C;return new r(n-e+A*n,s-e+S*s,e,i-t+A*i,c-t+S*c,t,A,S,1)},r.quadrilateralToSquare=function(e,t,n,i,o,a,s,c){return r.squareToQuadrilateral(e,t,n,i,o,a,s,c).buildAdjoint()},r.prototype.buildAdjoint=function(){return new r(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)},r.prototype.times=function(e){return new r(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},r}();var Si=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const bi=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return Si(e,r),e.prototype.sampleGrid=function(t,n,i,o,a,s,c,u,f,d,l,h,p,C,A,S,O,D,P){var B=$r.quadrilateralToQuadrilateral(o,a,s,c,u,f,d,l,h,p,C,A,S,O,D,P);return this.sampleGridWithTransform(t,n,i,B)},e.prototype.sampleGridWithTransform=function(t,n,i,o){if(n<=0||i<=0)throw new N;for(var a=new we(n,i),s=new Float32Array(2*n),c=0;c<i;c++){for(var u=s.length,f=c+.5,d=0;d<u;d+=2)s[d]=d/2+.5,s[d+1]=f;o.transformPoints(s),Qr.checkAndNudgePoints(t,s);try{for(d=0;d<u;d+=2)t.get(Math.floor(s[d]),Math.floor(s[d+1]))&&a.set(d/2,c)}catch{throw new N}}return a},e}(Qr),wr=function(){function r(){}return r.setGridSampler=function(e){r.gridSampler=e},r.getInstance=function(){return r.gridSampler},r.gridSampler=new bi,r}();var Qe=function(){function r(e,t){this.x=e,this.y=t}return r.prototype.toResultPoint=function(){return new j(this.getX(),this.getY())},r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r}();const Pi=function(){function r(e){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=e}return r.prototype.detect=function(){return this.detectMirror(!1)},r.prototype.detectMirror=function(e){var t=this.getMatrixCenter(),n=this.getBullsEyeCorners(t);if(e){var i=n[0];n[0]=n[2],n[2]=i}this.extractParameters(n);var o=this.sampleGrid(this.image,n[this.shift%4],n[(this.shift+1)%4],n[(this.shift+2)%4],n[(this.shift+3)%4]),a=this.getMatrixCornerPoints(n);return new wi(o,a,this.compact,this.nbDataBlocks,this.nbLayers)},r.prototype.extractParameters=function(e){if(!(this.isValidPoint(e[0])&&this.isValidPoint(e[1])&&this.isValidPoint(e[2])&&this.isValidPoint(e[3])))throw new N;var t=2*this.nbCenterLayers,n=new Int32Array([this.sampleLine(e[0],e[1],t),this.sampleLine(e[1],e[2],t),this.sampleLine(e[2],e[3],t),this.sampleLine(e[3],e[0],t)]);this.shift=this.getRotation(n,t);for(var i=0,o=0;o<4;o++){var a=n[(this.shift+o)%4];this.compact?(i<<=7,i+=a>>1&127):(i<<=10,i+=(a>>2&992)+(a>>1&31))}var s=this.getCorrectedParameterData(i,this.compact);this.compact?(this.nbLayers=1+(s>>6),this.nbDataBlocks=1+(63&s)):(this.nbLayers=1+(s>>11),this.nbDataBlocks=1+(2047&s))},r.prototype.getRotation=function(e,t){var n=0;e.forEach(function(o,a,s){n=(o>>t-2<<1)+(1&o)+(n<<3)}),n=((1&n)<<11)+(n>>1);for(var i=0;i<4;i++)if(Q.bitCount(n^this.EXPECTED_CORNER_BITS[i])<=2)return i;throw new N},r.prototype.getCorrectedParameterData=function(e,t){var n,i;t?(n=7,i=2):(n=10,i=4);for(var o=n-i,a=new Int32Array(n),s=n-1;s>=0;--s)a[s]=15&e,e>>=4;try{new nr(Ke.AZTEC_PARAM).decode(a,o)}catch{throw new N}var u=0;for(s=0;s<i;s++)u=(u<<4)+a[s];return u},r.prototype.getBullsEyeCorners=function(e){var t=e,n=e,i=e,o=e,a=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var s=this.getFirstDifferent(t,a,1,-1),c=this.getFirstDifferent(n,a,1,1),u=this.getFirstDifferent(i,a,-1,1),f=this.getFirstDifferent(o,a,-1,-1);if(this.nbCenterLayers>2){var d=this.distancePoint(f,s)*this.nbCenterLayers/(this.distancePoint(o,t)*(this.nbCenterLayers+2));if(d<.75||d>1.25||!this.isWhiteOrBlackRectangle(s,c,u,f))break}t=s,n=c,i=u,o=f,a=!a}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new N;this.compact=5===this.nbCenterLayers;var l=new j(t.getX()+.5,t.getY()-.5),h=new j(n.getX()+.5,n.getY()+.5),p=new j(i.getX()-.5,i.getY()+.5),C=new j(o.getX()-.5,o.getY()-.5);return this.expandSquare([l,h,p,C],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},r.prototype.getMatrixCenter=function(){var e,t,n,i;try{e=(o=new Cr(this.image).detect())[0],t=o[1],n=o[2],i=o[3]}catch{var a=this.image.getWidth()/2,s=this.image.getHeight()/2;e=this.getFirstDifferent(new Qe(a+7,s-7),!1,1,-1).toResultPoint(),t=this.getFirstDifferent(new Qe(a+7,s+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Qe(a-7,s+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Qe(a-7,s-7),!1,-1,-1).toResultPoint()}var c=he.round((e.getX()+i.getX()+t.getX()+n.getX())/4),u=he.round((e.getY()+i.getY()+t.getY()+n.getY())/4);try{var o;e=(o=new Cr(this.image,15,c,u).detect())[0],t=o[1],n=o[2],i=o[3]}catch{e=this.getFirstDifferent(new Qe(c+7,u-7),!1,1,-1).toResultPoint(),t=this.getFirstDifferent(new Qe(c+7,u+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Qe(c-7,u+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Qe(c-7,u-7),!1,-1,-1).toResultPoint()}return c=he.round((e.getX()+i.getX()+t.getX()+n.getX())/4),u=he.round((e.getY()+i.getY()+t.getY()+n.getY())/4),new Qe(c,u)},r.prototype.getMatrixCornerPoints=function(e){return this.expandSquare(e,2*this.nbCenterLayers,this.getDimension())},r.prototype.sampleGrid=function(e,t,n,i,o){var a=wr.getInstance(),s=this.getDimension(),c=s/2-this.nbCenterLayers,u=s/2+this.nbCenterLayers;return a.sampleGrid(e,s,s,c,c,u,c,u,u,c,u,t.getX(),t.getY(),n.getX(),n.getY(),i.getX(),i.getY(),o.getX(),o.getY())},r.prototype.sampleLine=function(e,t,n){for(var i=0,o=this.distanceResultPoint(e,t),a=o/n,s=e.getX(),c=e.getY(),u=a*(t.getX()-e.getX())/o,f=a*(t.getY()-e.getY())/o,d=0;d<n;d++)this.image.get(he.round(s+d*u),he.round(c+d*f))&&(i|=1<<n-d-1);return i},r.prototype.isWhiteOrBlackRectangle=function(e,t,n,i){e=new Qe(e.getX()-3,e.getY()+3),t=new Qe(t.getX()-3,t.getY()-3),n=new Qe(n.getX()+3,n.getY()-3),i=new Qe(i.getX()+3,i.getY()+3);var a=this.getColor(i,e);if(0===a)return!1;var s=this.getColor(e,t);return s===a&&(s=this.getColor(t,n))===a&&(s=this.getColor(n,i))===a},r.prototype.getColor=function(e,t){for(var n=this.distancePoint(e,t),i=(t.getX()-e.getX())/n,o=(t.getY()-e.getY())/n,a=0,s=e.getX(),c=e.getY(),u=this.image.get(e.getX(),e.getY()),f=Math.ceil(n),d=0;d<f;d++)c+=o,this.image.get(he.round(s+=i),he.round(c))!==u&&a++;var l=a/n;return l>.1&&l<.9?0:l<=.1===u?1:-1},r.prototype.getFirstDifferent=function(e,t,n,i){for(var o=e.getX()+n,a=e.getY()+i;this.isValid(o,a)&&this.image.get(o,a)===t;)o+=n,a+=i;for(o-=n,a-=i;this.isValid(o,a)&&this.image.get(o,a)===t;)o+=n;for(o-=n;this.isValid(o,a)&&this.image.get(o,a)===t;)a+=i;return new Qe(o,a-=i)},r.prototype.expandSquare=function(e,t,n){var i=n/(2*t),o=e[0].getX()-e[2].getX(),a=e[0].getY()-e[2].getY(),s=(e[0].getX()+e[2].getX())/2,c=(e[0].getY()+e[2].getY())/2,u=new j(s+i*o,c+i*a),f=new j(s-i*o,c-i*a);return o=e[1].getX()-e[3].getX(),a=e[1].getY()-e[3].getY(),s=(e[1].getX()+e[3].getX())/2,c=(e[1].getY()+e[3].getY())/2,[u,new j(s+i*o,c+i*a),f,new j(s-i*o,c-i*a)]},r.prototype.isValid=function(e,t){return e>=0&&e<this.image.getWidth()&&t>0&&t<this.image.getHeight()},r.prototype.isValidPoint=function(e){var t=he.round(e.getX()),n=he.round(e.getY());return this.isValid(t,n)},r.prototype.distancePoint=function(e,t){return he.distance(e.getX(),e.getY(),t.getX(),t.getY())},r.prototype.distanceResultPoint=function(e,t){return he.distance(e.getX(),e.getY(),t.getX(),t.getY())},r.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(Q.truncDivision(this.nbLayers-4,8)+1)+15},r}(),ir=function(){function r(){}return r.prototype.decode=function(e,t){void 0===t&&(t=null);var n=null,i=new Pi(e.getBlackMatrix()),o=null,a=null;try{o=(s=i.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(t,o),a=(new Kr).decode(s)}catch(d){n=d}if(null==a)try{var s;o=(s=i.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(t,o),a=(new Kr).decode(s)}catch(d){throw n??d}var c=new He(a.getText(),a.getRawBytes(),a.getNumBits(),o,Z.AZTEC,le.currentTimeMillis()),u=a.getByteSegments();null!=u&&c.putMetadata(Ue.BYTE_SEGMENTS,u);var f=a.getECLevel();return null!=f&&c.putMetadata(Ue.ERROR_CORRECTION_LEVEL,f),c},r.prototype.reportFoundResultPoints=function(e,t){if(null!=e){var n=e.get(x.NEED_RESULT_POINT_CALLBACK);null!=n&&t.forEach(function(i,o,a){n.foundPossibleResultPoint(i)})}},r.prototype.reset=function(){},r}();var r,Ri=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();Ri(function e(t){return void 0===t&&(t=500),r.call(this,new ir,t)||this}
1,r=kt);const Me=function(){function r(){}return r.prototype.decode=function(e,t){try{return this.doDecode(e,t)}catch{if(t&&!0===t.get(x.TRY_HARDER)&&e.isRotateSupported()){var i=e.rotateCounterClockwise(),o=this.doDecode(i,t),a=o.getResultMetadata(),s=270;null!==a&&!0===a.get(Ue.ORIENTATION)&&(s+=a.get(Ue.ORIENTATION)%360),o.putMetadata(Ue.ORIENTATION,s);var c=o.getResultPoints();if(null!==c)for(var u=i.getHeight(),f=0;f<c.length;f++)c[f]=new j(u-c[f].getY()-1,c[f].getX());return o}throw new N}},r.prototype.reset=function(){},r.prototype.doDecode=function(e,t){var c,n=e.getWidth(),i=e.getHeight(),o=new Ae(n),a=t&&!0===t.get(x.TRY_HARDER),s=Math.max(1,i>>(a?8:5));c=a?i:15;for(var u=Math.trunc(i/2),f=0;f<c;f++){var d=Math.trunc((f+1)/2),h=u+s*(1&f?-d:d);if(h<0||h>=i)break;try{o=e.getBlackRow(h,o)}catch{continue}for(var p=function(O){if(1===O&&(o.reverse(),t&&!0===t.get(x.NEED_RESULT_POINT_CALLBACK))){var D=new Map;t.forEach(function(L,U){return D.set(U,L)}),D.delete(x.NEED_RESULT_POINT_CALLBACK),t=D}try{var P=C.decodeRow(h,o,t);if(1===O){P.putMetadata(Ue.ORIENTATION,180);var B=P.getResultPoints();null!==B&&(B[0]=new j(n-B[0].getX()-1,B[0].getY()),B[1]=new j(n-B[1].getX()-1,B[1].getY()))}return{value:P}}catch{}},C=this,A=0;A<2;A++){var S=p(A);if("object"==typeof S)return S.value}}throw new N},r.recordPattern=function(e,t,n){for(var i=n.length,o=0;o<i;o++)n[o]=0;var a=e.getSize();if(t>=a)throw new N;for(var s=!e.get(t),c=0,u=t;u<a;){if(e.get(u)!==s)n[c]++;else{if(++c===i)break;n[c]=1,s=!s}u++}if(c!==i&&(c!==i-1||u!==a))throw new N},r.recordPatternInReverse=function(e,t,n){for(var i=n.length,o=e.get(t);t>0&&i>=0;)e.get(--t)!==o&&(i--,o=!o);if(i>=0)throw new N;r.recordPattern(e,t+1,n)},r.patternMatchVariance=function(e,t,n){for(var i=e.length,o=0,a=0,s=0;s<i;s++)o+=e[s],a+=t[s];if(o<a)return Number.POSITIVE_INFINITY;var c=o/a;n*=c;for(var u=0,f=0;f<i;f++){var d=e[f],l=t[f]*c,h=d>l?d-l:l-d;if(h>n)return Number.POSITIVE_INFINITY;u+=h}return u/o},r}();var Bi=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Jr=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return Bi(e,r),e.findStartPattern=function(t){for(var n=t.getSize(),i=t.getNextSet(0),o=0,a=Int32Array.from([0,0,0,0,0,0]),s=i,c=!1,f=i;f<n;f++)if(t.get(f)!==c)a[o]++;else{if(5===o){for(var d=e.MAX_AVG_VARIANCE,l=-1,h=e.CODE_START_A;h<=e.CODE_START_C;h++){var p=Me.patternMatchVariance(a,e.CODE_PATTERNS[h],e.MAX_INDIVIDUAL_VARIANCE);p<d&&(d=p,l=h)}if(l>=0&&t.isRange(Math.max(0,s-(f-s)/2),s,!1))return Int32Array.from([s,f,l]);s+=a[0]+a[1],(a=a.slice(2,a.length))[o-1]=0,a[o]=0,o--}else o++;a[o]=1,c=!c}throw new N},e.decodeCode=function(t,n,i){Me.recordPattern(t,i,n);for(var o=e.MAX_AVG_VARIANCE,a=-1,s=0;s<e.CODE_PATTERNS.length;s++){var u=this.patternMatchVariance(n,e.CODE_PATTERNS[s],e.MAX_INDIVIDUAL_VARIANCE);u<o&&(o=u,a=s)}if(a>=0)return a;throw new N},e.prototype.decodeRow=function(t,n,i){var f,o=i&&!0===i.get(x.ASSUME_GS1),a=e.findStartPattern(n),s=a[2],c=0,u=new Uint8Array(20);switch(u[c++]=s,s){case e.CODE_START_A:f=e.CODE_CODE_A;break;case e.CODE_START_B:f=e.CODE_CODE_B;break;case e.CODE_START_C:f=e.CODE_CODE_C;break;default:throw new y}for(var d=!1,l=!1,h="",p=a[0],C=a[1],A=Int32Array.from([0,0,0,0,0,0]),S=0,O=0,D=s,P=0,B=!0,L=!1,U=!1;!d;){var Y=l;switch(l=!1,S=O,O=e.decodeCode(n,A,C),u[c++]=O,O!==e.CODE_STOP&&(B=!0),O!==e.CODE_STOP&&(D+=++P*O),p=C,C+=A.reduce(function(zr,Xr){return zr+Xr},0),O){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new y}switch(f){case e.CODE_CODE_A:if(O<64)h+=String.fromCharCode(U===L?32+O:32+O+128),U=!1;else if(O<96)h+=String.fromCharCode(U===L?O-64:O+64),U=!1;else switch(O!==e.CODE_STOP&&(B=!1),O){case e.CODE_FNC_1:o&&(h+=0===h.length?"]C1":"\x1d");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!L&&U?(L=!0,U=!1):L&&U?(L=!1,U=!1):U=!0;break;case e.CODE_SHIFT:l=!0,f=e.CODE_CODE_B;break;case e.CODE_CODE_B:f=e.CODE_CODE_B;break;case e.CODE_CODE_C:f=e.CODE_CODE_C;break;case e.CODE_STOP:d=!0}break;case e.CODE_CODE_B:if(O<96)h+=String.fromCharCode(U===L?32+O:32+O+128),U=!1;else switch(O!==e.CODE_STOP&&(B=!1),O){case e.CODE_FNC_1:o&&(h+=0===h.length?"]C1":"\x1d");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!L&&U?(L=!0,U=!1):L&&U?(L=!1,U=!1):U=!0;break;case e.CODE_SHIFT:l=!0,f=e.CODE_CODE_A;break;case e.CODE_CODE_A:f=e.CODE_CODE_A;break;case e.CODE_CODE_C:f=e.CODE_CODE_C;break;case e.CODE_STOP:d=!0}break;case e.CODE_CODE_C:if(O<100)O<10&&(h+="0"),h+=O;else switch(O!==e.CODE_STOP&&(B=!1),O){case e.CODE_FNC_1:o&&(h+=0===h.length?"]C1":"\x1d");break;case e.CODE_CODE_A:f=e.CODE_CODE_A;break;case e.CODE_CODE_B:f=e.CODE_CODE_B;break;case e.CODE_STOP:d=!0}}Y&&(f=f===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var ne=C-p;if(C=n.getNextUnset(C),!n.isRange(C,Math.min(n.getSize(),C+(C-p)/2),!1))throw new N;if((D-=P*S)%103!==S)throw new Ie;var re=h.length;if(0===re)throw new N;re>0&&B&&(h=h.substring(0,f===e.CODE_CODE_C?re-2:re-1));for(var Te=(a[1]+a[0])/2,de=p+ne/2,be=u.length,it=new Uint8Array(be),wt=0;wt<be;wt++)it[wt]=u[wt];var Wr=[new j(Te,t),new j(de,t)];return new He(h,it,0,Wr,Z.CODE_128,(new Date).getTime())},e.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])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIA
1NCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e}(Me);var Li=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),Er=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const en=function(r){function e(t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=r.call(this)||this;return i.usingCheckDigit=t,i.extendedMode=n,i.decodeRowResult="",i.counters=new Int32Array(9),i}return Li(e,r),e.prototype.decodeRow=function(t,n,i){var o,a,s,c,u=this.counters;u.fill(0),this.decodeRowResult="";var h,p,f=e.findAsteriskPattern(n,u),d=n.getNextSet(f[1]),l=n.getSize();do{e.recordPattern(n,d,u);var C=e.toNarrowWidePattern(u);if(C<0)throw new N;h=e.patternToChar(C),this.decodeRowResult+=h,p=d;try{for(var A=(o=void 0,Er(u)),S=A.next();!S.done;S=A.next())d+=S.value}catch(be){o={error:be}}finally{try{S&&!S.done&&(a=A.return)&&a.call(A)}finally{if(o)throw o.error}}d=n.getNextSet(d)}while("*"!==h);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var re,D=0;try{for(var P=Er(u),B=P.next();!B.done;B=P.next())D+=B.value}catch(be){s={error:be}}finally{try{B&&!B.done&&(c=P.return)&&c.call(P)}finally{if(s)throw s.error}}if(d!==l&&2*(d-p-D)<D)throw new N;if(this.usingCheckDigit){for(var U=this.decodeRowResult.length-1,Y=0,ne=0;ne<U;ne++)Y+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(ne));if(this.decodeRowResult.charAt(U)!==e.ALPHABET_STRING.charAt(Y%43))throw new Ie;this.decodeRowResult=this.decodeRowResult.substring(0,U)}if(0===this.decodeRowResult.length)throw new N;re=this.extendedMode?e.decodeExtended(this.decodeRowResult):this.decodeRowResult;var de=p+D/2;return new He(re,null,0,[new j((f[1]+f[0])/2,t),new j(de,t)],Z.CODE_39,(new Date).getTime())},e.findAsteriskPattern=function(t,n){for(var i=t.getSize(),o=t.getNextSet(0),a=0,s=o,c=!1,u=n.length,f=o;f<i;f++)if(t.get(f)!==c)n[a]++;else{if(a===u-1){if(this.toNarrowWidePattern(n)===e.ASTERISK_ENCODING&&t.isRange(Math.max(0,s-Math.floor((f-s)/2)),s,!1))return[s,f];s+=n[0]+n[1],n.copyWithin(0,2,2+a-1),n[a-1]=0,n[a]=0,a--}else a++;n[a]=1,c=!c}throw new N},e.toNarrowWidePattern=function(t){var n,i,s,o=t.length,a=0;do{var c=2147483647;try{for(var u=(n=void 0,Er(t)),f=u.next();!f.done;f=u.next())(d=f.value)<c&&d>a&&(c=d)}catch(C){n={error:C}}finally{try{f&&!f.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}a=c,s=0;for(var l=0,h=0,p=0;p<o;p++)(d=t[p])>a&&(h|=1<<o-1-p,s++,l+=d);if(3===s){for(p=0;p<o&&s>0;p++){var d;if((d=t[p])>a&&(s--,2*d>=l))return-1}return h}}while(s>3);return-1},e.patternToChar=function(t){for(var n=0;n<e.CHARACTER_ENCODINGS.length;n++)if(e.CHARACTER_ENCODINGS[n]===t)return e.ALPHABET_STRING.charAt(n);if(t===e.ASTERISK_ENCODING)return"*";throw new N},e.decodeExtended=function(t){for(var n=t.length,i="",o=0;o<n;o++){var a=t.charAt(o);if("+"===a||"$"===a||"%"===a||"/"===a){var s=t.charAt(o+1),c="\0";switch(a){case"+":if(!(s>="A"&&s<="Z"))throw new y;c=String.fromCharCode(s.charCodeAt(0)+32);break;case"$":if(!(s>="A"&&s<="Z"))throw new y;c=String.fromCharCode(s.charCodeAt(0)-64);break;case"%":if(s>="A"&&s<="E")c=String.fromCharCode(s.charCodeAt(0)-38);else if(s>="F"&&s<="J")c=String.fromCharCode(s.charCodeAt(0)-11);else if(s>="K"&&s<="O")c=String.fromCharCode(s.charCodeAt(0)+16);else if(s>="P"&&s<="T")c=String.fromCharCode(s.charCodeAt(0)+43);else if("U"===s)c="\0";else if("V"===s)c="@";else if("W"===s)c="`";else{if("X"!==s&&"Y"!==s&&"Z"!==s)throw new y;c="\x7f"}break;case"/":if(s>="A"&&s<="O")c=String.fromCharCode(s.charCodeAt(0)-32);else{if("Z"!==s)throw new y;c=":"}}i+=c,o++}else i+=a}return i},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.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],e.ASTERISK_ENCODING=148,e}(Me);var Ui=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ar=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const tn=function(r){function e(){var t=r.call(this)||this;return t.decodeRowResult="",t.counters=new Int32Array(6),t}return Ui(e,r),e.prototype.decodeRow=function(t,n,i){var o,a,s,c,h,p,u=this.findAsteriskPattern(n),f=n.getNextSet(u[1]),d=n.get
1Size(),l=this.counters;l.fill(0),this.decodeRowResult="";do{e.recordPattern(n,f,l);var C=this.toPattern(l);if(C<0)throw new N;h=this.patternToChar(C),this.decodeRowResult+=h,p=f;try{for(var A=(o=void 0,Ar(l)),S=A.next();!S.done;S=A.next())f+=S.value}catch(ne){o={error:ne}}finally{try{S&&!S.done&&(a=A.return)&&a.call(A)}finally{if(o)throw o.error}}f=n.getNextSet(f)}while("*"!==h);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var D=0;try{for(var P=Ar(l),B=P.next();!B.done;B=P.next())D+=B.value}catch(ne){s={error:ne}}finally{try{B&&!B.done&&(c=P.return)&&c.call(P)}finally{if(s)throw s.error}}if(f===d||!n.get(f))throw new N;if(this.decodeRowResult.length<2)throw new N;this.checkChecksums(this.decodeRowResult),this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-2);var L=this.decodeExtended(this.decodeRowResult),Y=p+D/2;return new He(L,null,0,[new j((u[1]+u[0])/2,t),new j(Y,t)],Z.CODE_93,(new Date).getTime())},e.prototype.findAsteriskPattern=function(t){var n=t.getSize(),i=t.getNextSet(0);this.counters.fill(0);for(var o=this.counters,a=i,s=!1,c=o.length,u=0,f=i;f<n;f++)if(t.get(f)!==s)o[u]++;else{if(u===c-1){if(this.toPattern(o)===e.ASTERISK_ENCODING)return new Int32Array([a,f]);a+=o[0]+o[1],o.copyWithin(0,2,2+u-1),o[u-1]=0,o[u]=0,u--}else u++;o[u]=1,s=!s}throw new N},e.prototype.toPattern=function(t){var n,i,o=0;try{for(var a=Ar(t),s=a.next();!s.done;s=a.next())o+=s.value}catch(p){n={error:p}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}for(var u=0,f=t.length,d=0;d<f;d++){var l=Math.round(9*t[d]/o);if(l<1||l>4)return-1;if(1&d)u<<=l;else for(var h=0;h<l;h++)u=u<<1|1}return u},e.prototype.patternToChar=function(t){for(var n=0;n<e.CHARACTER_ENCODINGS.length;n++)if(e.CHARACTER_ENCODINGS[n]===t)return e.ALPHABET_STRING.charAt(n);throw new N},e.prototype.decodeExtended=function(t){for(var n=t.length,i="",o=0;o<n;o++){var a=t.charAt(o);if(a>="a"&&a<="d"){if(o>=n-1)throw new y;var s=t.charAt(o+1),c="\0";switch(a){case"d":if(!(s>="A"&&s<="Z"))throw new y;c=String.fromCharCode(s.charCodeAt(0)+32);break;case"a":if(!(s>="A"&&s<="Z"))throw new y;c=String.fromCharCode(s.charCodeAt(0)-64);break;case"b":if(s>="A"&&s<="E")c=String.fromCharCode(s.charCodeAt(0)-38);else if(s>="F"&&s<="J")c=String.fromCharCode(s.charCodeAt(0)-11);else if(s>="K"&&s<="O")c=String.fromCharCode(s.charCodeAt(0)+16);else if(s>="P"&&s<="T")c=String.fromCharCode(s.charCodeAt(0)+43);else if("U"===s)c="\0";else if("V"===s)c="@";else if("W"===s)c="`";else{if(!(s>="X"&&s<="Z"))throw new y;c="\x7f"}break;case"c":if(s>="A"&&s<="O")c=String.fromCharCode(s.charCodeAt(0)-32);else{if("Z"!==s)throw new y;c=":"}}i+=c,o++}else i+=a}return i},e.prototype.checkChecksums=function(t){var n=t.length;this.checkOneChecksum(t,n-2,20),this.checkOneChecksum(t,n-1,15)},e.prototype.checkOneChecksum=function(t,n,i){for(var o=1,a=0,s=n-1;s>=0;s--)a+=o*e.ALPHABET_STRING.indexOf(t.charAt(s)),++o>i&&(o=1);if(t.charAt(n)!==e.ALPHABET_STRING[a%47])throw new Ie},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*",e.ASTERISK_ENCODING=(e.CHARACTER_ENCODINGS=[276,328,324,322,296,292,290,336,274,266,424,420,418,404,402,394,360,356,354,308,282,344,332,326,300,278,436,434,428,422,406,410,364,358,310,314,302,468,466,458,366,374,430,294,474,470,306,350])[47],e}(Me);var Vi=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const rn=function(r){function e(){var t=null!==r&&r.apply(this,arguments)||this;return t.narrowLineWidth=-1,t}return Vi(e,r),e.prototype.decodeRow=function(t,n,i){var o,a,s=this.decodeStart(n),c=this.decodeEnd(n),u=new K;e.decodeMiddle(n,s[1],c[0],u);var f=u.toString(),d=null;null!=i&&(d=i.get(x.ALLOWED_LENGTHS)),null==d&&(d=e.DEFAULT_ALLOWED_LENGTHS);var l=f.length,h=!1,p=0;try{for(var C=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),A=C.next();!A.done;A=C.next()){var S=A.value;if(l===S){h=!0;break}S>p&&(p=S)}}catch(P){o={error:P}}finally{try{A&&!A.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}if(!h&&l>p&&(h=!0),!h)throw new y;var O=[new j(s[1],t),new j(c[0],t)];return new He(f,null,0,O,Z.ITF,(new Date).getTime())},e.decodeMiddle=function(t,n,i,o){var a=new Int32Array(10),s=new Int32Array(5),c=new Int32Array(5);for(a.fill(0),s.fill(0),c.fill(0);n<i;){Me.recordPattern(t,n,a);for(var u=0;u<5;u++){var f=2*u;
1s[u]=a[f],c[u]=a[f+1]}var d=e.decodeDigit(s);o.append(d.toString()),d=this.decodeDigit(c),o.append(d.toString()),a.forEach(function(l){n+=l})}},e.prototype.decodeStart=function(t){var n=e.skipWhiteSpace(t),i=e.findGuardPattern(t,n,e.START_PATTERN);return this.narrowLineWidth=(i[1]-i[0])/4,this.validateQuietZone(t,i[0]),i},e.prototype.validateQuietZone=function(t,n){var i=10*this.narrowLineWidth;i=i<n?i:n;for(var o=n-1;i>0&&o>=0&&!t.get(o);o--)i--;if(0!==i)throw new N},e.skipWhiteSpace=function(t){var n=t.getSize(),i=t.getNextSet(0);if(i===n)throw new N;return i},e.prototype.decodeEnd=function(t){t.reverse();try{var n=e.skipWhiteSpace(t),i=void 0;try{i=e.findGuardPattern(t,n,e.END_PATTERN_REVERSED[0])}catch(a){a instanceof N&&(i=e.findGuardPattern(t,n,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,i[0]);var o=i[0];return i[0]=t.getSize()-i[1],i[1]=t.getSize()-o,i}finally{t.reverse()}},e.findGuardPattern=function(t,n,i){var o=i.length,a=new Int32Array(o),s=t.getSize(),c=!1,u=0,f=n;a.fill(0);for(var d=n;d<s;d++)if(t.get(d)!==c)a[u]++;else{if(u===o-1){if(Me.patternMatchVariance(a,i,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[f,d];f+=a[0]+a[1],le.arraycopy(a,2,a,0,u-1),a[u-1]=0,a[u]=0,u--}else u++;a[u]=1,c=!c}throw new N},e.decodeDigit=function(t){for(var n=e.MAX_AVG_VARIANCE,i=-1,o=e.PATTERNS.length,a=0;a<o;a++){var c=Me.patternMatchVariance(t,e.PATTERNS[a],e.MAX_INDIVIDUAL_VARIANCE);c<n?(n=c,i=a):c===n&&(i=-1)}if(i>=0)return i%10;throw new N},e.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])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e}(Me);var zi=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Ut=function(r){function e(){var t=null!==r&&r.apply(this,arguments)||this;return t.decodeRowStringBuffer="",t}return zi(e,r),e.findStartGuardPattern=function(t){for(var i,n=!1,o=0,a=Int32Array.from([0,0,0]);!n;){a=Int32Array.from([0,0,0]);var s=(i=e.findGuardPattern(t,o,!1,this.START_END_PATTERN,a))[0],c=s-((o=i[1])-s);c>=0&&(n=t.isRange(c,s,!1))}return i},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var n=t.length;if(0===n)return!1;var i=parseInt(t.charAt(n-1),10);return e.getStandardUPCEANChecksum(t.substring(0,n-1))===i},e.getStandardUPCEANChecksum=function(t){for(var n=t.length,i=0,o=n-1;o>=0;o-=2){if((a=t.charAt(o).charCodeAt(0)-48)<0||a>9)throw new y;i+=a}for(i*=3,o=n-2;o>=0;o-=2){var a;if((a=t.charAt(o).charCodeAt(0)-48)<0||a>9)throw new y;i+=a}return(1e3-i)%10},e.decodeEnd=function(t,n){return e.findGuardPattern(t,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(t,n,i,o){return this.findGuardPattern(t,n,i,o,new Int32Array(o.length))},e.findGuardPattern=function(t,n,i,o,a){for(var s=t.getSize(),c=0,u=n=i?t.getNextUnset(n):t.getNextSet(n),f=o.length,d=i,l=n;l<s;l++)if(t.get(l)!==d)a[c]++;else{if(c===f-1){if(Me.patternMatchVariance(a,o,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([u,l]);u+=a[0]+a[1];for(var h=a.slice(2,a.length),p=0;p<c-1;p++)a[p]=h[p];a[c-1]=0,a[c]=0,c--}else c++;a[c]=1,d=!d}throw new N},e.decodeDigit=function(t,n,i,o){this.recordPattern(t,i,n);for(var a=this.MAX_AVG_VARIANCE,s=-1,c=o.length,u=0;u<c;u++){var d=Me.patternMatchVariance(n,o[u],e.MAX_INDIVIDUAL_VARIA
1NCE);d<a&&(a=d,s=u)}if(s>=0)return s;throw new N},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.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])],e}(Me);var ji=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const qi=function(){function r(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return r.prototype.decodeRow=function(e,t,n){var i=this.decodeRowStringBuffer,o=this.decodeMiddle(t,n,i),a=i.toString(),s=r.parseExtensionString(a),c=[new j((n[0]+n[1])/2,e),new j(o,e)],u=new He(a,null,0,c,Z.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&u.putAllMetadata(s),u},r.prototype.decodeMiddle=function(e,t,n){var i,o,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),c=t[1],u=0,f=0;f<5&&c<s;f++){var d=Ut.decodeDigit(e,a,c,Ut.L_AND_G_PATTERNS);n+=String.fromCharCode(48+d%10);try{for(var l=(i=void 0,ji(a)),h=l.next();!h.done;h=l.next())c+=h.value}catch(A){i={error:A}}finally{try{h&&!h.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}d>=10&&(u|=1<<4-f),4!==f&&(c=e.getNextSet(c),c=e.getNextUnset(c))}if(5!==n.length)throw new N;var C=this.determineCheckDigit(u);if(r.extensionChecksum(n.toString())!==C)throw new N;return c},r.extensionChecksum=function(e){for(var t=e.length,n=0,i=t-2;i>=0;i-=2)n+=e.charAt(i).charCodeAt(0)-48;for(n*=3,i=t-1;i>=0;i-=2)n+=e.charAt(i).charCodeAt(0)-48;return(n*=3)%10},r.prototype.determineCheckDigit=function(e){for(var t=0;t<10;t++)if(e===this.CHECK_DIGIT_ENCODINGS[t])return t;throw new N},r.parseExtensionString=function(e){if(5!==e.length)return null;var t=r.parseExtension5String(e);return null==t?null:new Map([[Ue.SUGGESTED_PRICE,t]])},r.parseExtension5String=function(e){var t;switch(e.charAt(0)){case"0":t="\xa3";break;case"5":t="$";break;case"9":switch(e){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}t="";break;default:t=""}var n=parseInt(e.substring(1)),o=n%100;return t+(n/100).toString()+"."+(o<10?"0"+o:o.toString())},r}();var Zi=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const Qi=function(){function r(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return r.prototype.decodeRow=function(e,t,n){var i=this.decodeRowStringBuffer,o=this.decodeMiddle(t,n,i),a=i.toString(),s=r.parseExtensionString(a),c=[new j((n[0]+n[1])/2,e),new j(o,e)],u=new He(a,null,0,c,Z.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&u.putAllMetadata(s),u},r.prototype.decodeMiddle=function(e,t,n){var i,o,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),c=t[1],u=0,f=0;f<2&&c<s;f++){var d=Ut.decodeDigit(e,a,c,Ut.L_AND_G_PATTERNS);n+=String.fromCharCode(48+d%10);try{for(var l=(i=void 0,Zi(a)),h=l.next();!h.done;h=l.next())c+=h.value}catch(C){i={error:C}}finally{try{h&&!h.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}d>=10&&(u|=1<<1-f),1!==f&&(c=e.getNextSet(c),c=e.getNextUnset(c))}if(2!==n.length)throw new N;if(parseInt(n.toString())%4!==u)throw new N;return c},r.parseExtensionString=function(e){return 2!==e.length?null:new Map([[Ue.ISSUE_NUMBER,parseInt(e)]])},r}(),Ji=function(){function r(){}return r.decodeRow=function(e,t,n){var i=Ut.findGuardPattern(t,n,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new qi).decodeRow(e,t,i)}catch{return(new Qi).decodeRow(e,t,i)}},r.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),r}();var eo=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Re=function(r){function e(){var t=r.call(this)||this;t.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map(function(s){return Int32Array.from(s)});for(var n=10;n<20;n++){for(var i=e.L_PATTERNS[n-10],o=new Int32Array(i.length),a=0;a<i.length;a++)o[a]=i[i.length-a-1];e.L_AND_G_PATTERNS[n]=o}return t}return eo(e,r),e.prototype.decodeRow=function(t,n,i){var o=e.findStartGuardPattern(n),a=null==i?null:i.get(x.NEED_RESULT_POINT_CALLBACK);if(null!=a){var s=new j((o[0]+o[1])/2,t);a.foundPossibleResultPoint(s)}var c=this.decodeMiddle(n,o,this.decodeRowStringBuffer),u=c.rowOffset,f=c.resultString;if(null!=a){var d=new j(u,t);a.foundPossibleResultPoint(d)}var l=e.decodeEnd(n,u);
1if(null!=a){var h=new j((l[0]+l[1])/2,t);a.foundPossibleResultPoint(h)}var p=l[1],C=p+(p-l[0]);if(C>=n.getSize()||!n.isRange(p,C,!1))throw new N;var A=f.toString();if(A.length<8)throw new y;if(!e.checkChecksum(A))throw new Ie;var S=(o[1]+o[0])/2,O=(l[1]+l[0])/2,D=this.getBarcodeFormat(),P=[new j(S,t),new j(O,t)],B=new He(A,null,0,P,D,(new Date).getTime()),L=0;try{var U=Ji.decodeRow(t,n,l[1]);B.putMetadata(Ue.UPC_EAN_EXTENSION,U.getText()),B.putAllMetadata(U.getResultMetadata()),B.addResultPoints(U.getResultPoints()),L=U.getText().length}catch{}var Y=null==i?null:i.get(x.ALLOWED_EAN_EXTENSIONS);if(null!=Y){var ne=!1;for(var re in Y)if(L.toString()===re){ne=!0;break}if(!ne)throw new N}return B},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var n=t.length;if(0===n)return!1;var i=parseInt(t.charAt(n-1),10);return e.getStandardUPCEANChecksum(t.substring(0,n-1))===i},e.getStandardUPCEANChecksum=function(t){for(var n=t.length,i=0,o=n-1;o>=0;o-=2){if((a=t.charAt(o).charCodeAt(0)-48)<0||a>9)throw new y;i+=a}for(i*=3,o=n-2;o>=0;o-=2){var a;if((a=t.charAt(o).charCodeAt(0)-48)<0||a>9)throw new y;i+=a}return(1e3-i)%10},e.decodeEnd=function(t,n){return e.findGuardPattern(t,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(Ut);var ro=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),nn=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const Or=function(r){function e(){var t=r.call(this)||this;return t.decodeMiddleCounters=Int32Array.from([0,0,0,0]),t}return ro(e,r),e.prototype.decodeMiddle=function(t,n,i){var o,a,s,c,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var f=t.getSize(),d=n[1],l=0,h=0;h<6&&d<f;h++){var p=Re.decodeDigit(t,u,d,Re.L_AND_G_PATTERNS);i+=String.fromCharCode(48+p%10);try{for(var C=(o=void 0,nn(u)),A=C.next();!A.done;A=C.next())d+=A.value}catch(B){o={error:B}}finally{try{A&&!A.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}p>=10&&(l|=1<<5-h)}for(i=e.determineFirstDigit(i,l),d=Re.findGuardPattern(t,d,!0,Re.MIDDLE_PATTERN,new Int32Array(Re.MIDDLE_PATTERN.length).fill(0))[1],h=0;h<6&&d<f;h++){p=Re.decodeDigit(t,u,d,Re.L_PATTERNS),i+=String.fromCharCode(48+p);try{for(var D=(s=void 0,nn(u)),P=D.next();!P.done;P=D.next())d+=P.value}catch(U){s={error:U}}finally{try{P&&!P.done&&(c=D.return)&&c.call(D)}finally{if(s)throw s.error}}}return{rowOffset:d,resultString:i}},e.prototype.getBarcodeFormat=function(){return Z.EAN_13},e.determineFirstDigit=function(t,n){for(var i=0;i<10;i++)if(n===this.FIRST_DIGIT_ENCODINGS[i])return String.fromCharCode(48+i)+t;throw new N},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(Re);var io=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),on=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const an=function(r){function e(){var t=r.call(this)||this;return t.decodeMiddleCounters=Int32Array.from([0,0,0,0]),t}return io(e,r),e.prototype.decodeMiddle=function(t,n,i){var o,a,s,c,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var f=t.getSize(),d=n[1],l=0;l<4&&d<f;l++){var h=Re.decodeDigit(t,u,d,Re.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var p=(o=void 0,on(u)),C=p.next();!C.done;C=p.next())d+=C.value}catch(P){o={error:P}}finally{try{C&&!C.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}}for(d=Re.findGuardPattern(t,d,!0,Re.MIDDLE_PATTERN,new Int32Array(Re.MIDDLE_PATTERN.length).fill(0))[1],l=0;l<4&&d<f;l++){h=Re.decodeDigit(t,u,d,Re.L_PATTERNS),i+=String.fromCharCode(48+h);try{for(var O=(s=void 0,on(u)),D=O.next();!D.done;D=O.next())d+=D.value}catch(L){s={error:L}}finally{try{D&&!D.done&&(c=O.return)&&c.call(O)}finally{if(s)throw s.error}}}return{rowOffset:d,resultString:i}},e.prototype.getBarcodeFormat=function(){return Z.EAN_8},e}(Re);var ao=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const sn=function(r){function e(){var t=null!==r&&r.apply(this,arguments)||this;return t.ean13Reader=new Or,t}return ao(e,r),e.prototype.getBarcodeFormat=function(){return Z.UPC_A},e.prototype.decode=function(t,n){return this.maybeReturnResult(this.ean13Reader.decode(t))},e.prototype.decodeRow=function(t,n,i){return this.maybeReturnResult(this.ean13Reader.decodeRow(t,n,i))},e.prototype.decodeMiddle=function(t,n,i){return this.ean13Reader.decodeMiddle(t,n,i)},e.prototype.maybeReturnResult=function(t){var n=t.getText();if("0"===n.charAt(0)){var i=new He(n.substring(1),null,null,t.getResultPoints(),Z.UPC_A);return null!=t.getResultMetadata()&&i.putAllMetadata(t.getResultMetadata()),i}throw new N},e.prototype.reset=function(){this.ean13Reader.reset()},e}(Re);var co=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),uo=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const cn=function(r){function e(){var t=r.call(this)||this;return t.decodeMiddleCounters=new Int32Array(4),t}return co(e,r),e.prototype.decodeMiddle=function(t,n,i){var o,a,s=this.decodeMiddleCounters.map(function(A){return A});s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var c=t.getSize(),u=n[1],f=0,d=0;d<6&&u<c;d++){var l=e.decodeDigit(t,s,u,e.L_AND_G_PATTERNS);i+=String.fromCharCode(48+l%10);try{for(var h=(o=void 0,uo(s)),p=h.next();!p.done;p=h.next())u+=p.value}catch(A){o={error:A}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}l>=10&&(f|=1<<5-d)}return e.determineNumSysAndCheckDigit(new K(i),f),u},e.prototype.decodeEnd=function(t,n){return e.findGuardPatternWithoutCounters(t,n,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(t){return Re.checkChecksum(e.convertUPCEtoUPCA(t))},e.determineNumSysAndCheckDigit=function(t,n){for(var i=0;i<=1;i++)for(var o=0;o<10;o++)if(n===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[i][o])return t.insert(0,"0"+i),void t.append("0"+o);throw N.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return Z.UPC_E},e.convertUPCEtoUPCA=function(t){var n=t.slice(1,7).split("").map(function(a){return a.charCodeAt(0)}),i=new K;i.append(t.charAt(0));var o=n[5];switch(o){case 0:case 1:case 2:i.appendChars(n,0,2),i.append(o),i.append("0000"),i.appendChars(n,2,3);break;case 3:i.appendChars(n,0,3),i.append("00000"),i.appendChars(n,3,2);break;case 4:i.appendChars(n,0,4),i.append("00000"),i.append(n[4]);break;default:i.appendChars(n,0,5),i.append("0000"),i.append(o)}return t.length>=8&&i.append(t.charAt(7)),i.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.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,1])],e}(Re);var lo=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),un=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const Sr=function(r){function e(t){var n=r.call(this)||this,i=null==t?null:t.get(x.POSSIBLE_FORMATS),o=[];return null!=i&&(i.indexOf(Z.EAN_13)>-1&&o.push(new Or),i.indexOf(Z.UPC_A)>-1&&o.push(new sn),i.indexOf(Z.EAN_8)>-1&&o.push(new an),i.indexOf(Z.UPC_E)>-1&&o.push(new cn)),0===o.length&&(o.push(new Or),o.push(new sn),o.push(new an),o.push(new cn)),n.readers=o,n}return lo(e,r),e.prototype.decodeRow=function(t,n,i){var o,a;try{for(var s=un(this.readers),c=s.next();!c.done;c=s.next()){var u=c.value;try{var f=u.decodeRow(t,n,i),d=f.getBarcodeFormat()===Z.EAN_13&&"0"===f.getText().charAt(0),l=null==i?null:i.get(x.POSSIBLE_FORMATS),h=null==l||l.includes(Z.UPC_A);if(d&&h){var p=f.getRawBytes(),C=new He(f.getText().substring(1),p,p?p.length:null,f.getResultPoints(),Z.UPC_A);return C.putAllMetadata(f.getResultMetadata()),C}return f}catch{}}}catch(A){o={error:A}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}throw new N},e.prototype.reset=function(){var t,n;try{for(var i=un(this.readers),o=i.next();!o.done;o=i.next())o.value.reset()}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e}(Me);var vo=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const go=function(r){function e(){var t=null!==r&&r.apply(this,arguments)||this;return t.CODA_BAR_CHAR_SET={nnnnnww:"0",nnnnwwn:"1",nnnwnnw:"2",wwnnnnn:"3",nnwnnwn:"4",wnnnnwn:"5",nwnnnnw:"6",nwnnwnn:"7",nwwnnnn:"8",wnnwnnn:"9",nnnwwnn:"-",nnwwnnn:"$",wnnnwnw:":",wnwnnnw:"/",wnwnwnn:".",nnwwwww:"+",nnwwnwn:"A",nwnwnnw:"B",nnnwnww:"C",nnnwwwn:"D"},t}return vo(e,r),e.prototype.decodeRow=function(t,n,i){var o=this.getValidRowData(n);if(!o)throw new N;var a=this.codaBarDecodeRow(o.row);if(!a)throw new N;return new He(a,null,0,[new j(o.left,t),new j(o.right,t)],Z.CODABAR,(new Date).getTime())},e.prototype.getValidRowData=function(t){var n=t.toArray(),i=n.indexOf(!0);if(-1===i)return null;var o=n.lastIndexOf(!0);if(o<=i)return null;for(var a=[],s=(n=n.slice(i,o+1))[0],c=1,u=1;u<n.length;u++)n[u]===s?c++:(s=n[u],a.push(c),c=1);return a.push(c),a.length<23&&(a.length+1)%8!=0?null:{row:a,left:i,right:o}},e.prototype.codaBarDecodeRow=function(t){for(var n=[],i=Math.ceil(t.reduce(function(c,u){return(c+u)/2},0));t.length>0;){var a=t.splice(0,8).splice(0,7).map(function(c){return c<i?"n":"w"}).join("");if(void 0===this.CODA_BAR_CHAR_SET[a])return null;n.push(this.CODA_BAR_CHAR_SET[a])}var s=n.join("");return this.validCodaBarString(s)?s:null},e.prototype.validCodaBarString=function(t){return/^[A-D].{1,}[A-D]$/.test(t)},e}(Me);var xo=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const It=function(r){function e(){var t=r.call(this)||this;return t.decodeFinderCounters=new Int32Array(4),t.dataCharacterCounters=new Int32Array(8),t.oddRoundingErrors=new Array(4),t.evenRoundingErrors=new Array(4),t.oddCounts=new Array(t.dataCharacterCounters.length/2),t.evenCounts=new Array(t.dataCharacterCounters.length/2),t}return xo(e,r),e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(t,n){for(var i=0;i<n.length;
1i++)if(Me.patternMatchVariance(t,n[i],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return i;throw new N},e.count=function(t){return he.sum(new Int32Array(t))},e.increment=function(t,n){for(var i=0,o=n[0],a=1;a<t.length;a++)n[a]>o&&(o=n[a],i=a);t[i]++},e.decrement=function(t,n){for(var i=0,o=n[0],a=1;a<t.length;a++)n[a]<o&&(o=n[a],i=a);t[i]--},e.isFinderPattern=function(t){var n,i,o=t[0]+t[1],s=o/(o+t[2]+t[3]);if(s>=e.MIN_FINDER_PATTERN_RATIO&&s<=e.MAX_FINDER_PATTERN_RATIO){var c=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;try{for(var f=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),d=f.next();!d.done;d=f.next()){var l=d.value;l>u&&(u=l),l<c&&(c=l)}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return u<10*c}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e}(Me),or=function(){function r(e,t){this.value=e,this.checksumPortion=t}return r.prototype.getValue=function(){return this.value},r.prototype.getChecksumPortion=function(){return this.checksumPortion},r.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},r.prototype.equals=function(e){return e instanceof r&&(this.value===e.value&&this.checksumPortion===e.checksumPortion)},r.prototype.hashCode=function(){return this.value^this.checksumPortion},r}(),fn=function(){function r(e,t,n,i,o){this.value=e,this.startEnd=t,this.value=e,this.startEnd=t,this.resultPoints=new Array,this.resultPoints.push(new j(n,o)),this.resultPoints.push(new j(i,o))}return r.prototype.getValue=function(){return this.value},r.prototype.getStartEnd=function(){return this.startEnd},r.prototype.getResultPoints=function(){return this.resultPoints},r.prototype.equals=function(e){return e instanceof r&&this.value===e.value},r.prototype.hashCode=function(){return this.value},r}(),Gt=function(){function r(){}return r.getRSSvalue=function(e,t,n){var i,o,a=0;try{for(var s=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),c=s.next();!c.done;c=s.next())a+=c.value}catch(O){i={error:O}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}for(var f=0,d=0,l=e.length,h=0;h<l-1;h++){var p=void 0;for(p=1,d|=1<<h;p<e[h];p++,d&=~(1<<h)){var C=r.combins(a-p-1,l-h-2);if(n&&0===d&&a-p-(l-h-1)>=l-h-1&&(C-=r.combins(a-p-(l-h),l-h-2)),l-h-1>1){for(var A=0,S=a-p-(l-h-2);S>t;S--)A+=r.combins(a-p-S-1,l-h-3);C-=A*(l-1-h)}else a-p>t&&C--;f+=C}a-=p}return f},r.combins=function(e,t){var n,i;e-t>t?(i=t,n=e-t):(i=e-t,n=t);for(var o=1,a=1,s=e;s>n;s--)o*=s,a<=i&&(o/=a,a++);for(;a<=i;)o/=a,a++;return o},r}(),Oo=function(){function r(){}return r.buildBitArray=function(e){var t=2*e.length-1;null==e[e.length-1].getRightChar()&&(t-=1);for(var i=new Ae(12*t),o=0,s=e[0].getRightChar().getValue(),c=11;c>=0;--c)!!(s&1<<c)&&i.set(o),o++;for(c=1;c<e.length;++c){for(var u=e[c],f=u.getLeftChar().getValue(),d=11;d>=0;--d)!!(f&1<<d)&&i.set(o),o++;if(null!==u.getRightChar()){var l=u.getRightChar().getValue();for(d=11;d>=0;--d)!!(l&1<<d)&&i.set(o),o++}}return i},r}(),bt=function(){function r(e,t){t?this.decodedInformation=null:(this.finished=e,this.decodedInformation=t)}return r.prototype.getDecodedInformation=function(){return this.decodedInformation},r.prototype.isFinished=function(){return this.finished},r}(),Ir=function(){function r(e){this.newPosition=e}return r.prototype.getNewPosition=function(){return this.newPosition},r}();var bo=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const ot=function(r){function e(t,n){var i=r.call(this,t)||this;return i.value=n,i}return bo(e,r),e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(Ir);var To=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Dt=function(r){function e(t,n,i){var o=r.call(this,t)||this;return i?(o.remaining=!0,o.remainingValue=o.remainingValue):(o.remaining=!1,o.remainingValue=0),o.newString=n,o}return To(e,r),e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(Ir);var Mo=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Vt=function(r){function e(t,n,i){var o=r.call(this,t)||this;if(n<0||n>10||i<0||i>10)throw new y;return o.firstDigit=n,o.secondDigit=i,o}return Mo(e,r),e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(Ir);var ar=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const Bo=function(){function r(){}return r.parseFieldsInGeneralPurpose=function(e){var t,n,i,o,a,s,c,u;if(!e)return null;if(e.length<2)throw new N;var f=e.substring(0,2);try{for(var d=ar(r.TWO_DIGIT_DATA_LENGTH),l=d.next();!l.done;l=d.next())if((h=l.value)[0]===f)return h[1]===r.VARIABLE_LENGTH?r.processVariableAI(2,h[2],e):r.process
1FixedAI(2,h[1],e)}catch(L){t={error:L}}finally{try{l&&!l.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}if(e.length<3)throw new N;var p=e.substring(0,3);try{for(var C=ar(r.THREE_DIGIT_DATA_LENGTH),A=C.next();!A.done;A=C.next())if((h=A.value)[0]===p)return h[1]===r.VARIABLE_LENGTH?r.processVariableAI(3,h[2],e):r.processFixedAI(3,h[1],e)}catch(L){i={error:L}}finally{try{A&&!A.done&&(o=C.return)&&o.call(C)}finally{if(i)throw i.error}}try{for(var S=ar(r.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),O=S.next();!O.done;O=S.next())if((h=O.value)[0]===p)return h[1]===r.VARIABLE_LENGTH?r.processVariableAI(4,h[2],e):r.processFixedAI(4,h[1],e)}catch(L){a={error:L}}finally{try{O&&!O.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}if(e.length<4)throw new N;var D=e.substring(0,4);try{for(var P=ar(r.FOUR_DIGIT_DATA_LENGTH),B=P.next();!B.done;B=P.next()){var h;if((h=B.value)[0]===D)return h[1]===r.VARIABLE_LENGTH?r.processVariableAI(4,h[2],e):r.processFixedAI(4,h[1],e)}}catch(L){c={error:L}}finally{try{B&&!B.done&&(u=P.return)&&u.call(P)}finally{if(c)throw c.error}}throw new N},r.processFixedAI=function(e,t,n){if(n.length<e)throw new N;var i=n.substring(0,e);if(n.length<e+t)throw new N;var o=n.substring(e,e+t),a=n.substring(e+t),s="("+i+")"+o,c=r.parseFieldsInGeneralPurpose(a);return null==c?s:s+c},r.processVariableAI=function(e,t,n){var o,i=n.substring(0,e),a=n.substring(e,o=n.length<e+t?n.length:e+t),s=n.substring(o),c="("+i+")"+a,u=r.parseFieldsInGeneralPurpose(s);return null==u?c:c+u},r.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",r.VARIABLE_LENGTH=[],20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",r.VARIABLE_LENGTH,20],["22",r.VARIABLE_LENGTH,29],["30",r.VARIABLE_LENGTH,8],["37",r.VARIABLE_LENGTH,8],["90",r.VARIABLE_LENGTH,30],["91",r.VARIABLE_LENGTH,30],["92",r.VARIABLE_LENGTH,30],["93",r.VARIABLE_LENGTH,30],["94",r.VARIABLE_LENGTH,30],["95",r.VARIABLE_LENGTH,30],["96",r.VARIABLE_LENGTH,30],["97",r.VARIABLE_LENGTH,3],["98",r.VARIABLE_LENGTH,30],["99",r.VARIABLE_LENGTH,30]],r.THREE_DIGIT_DATA_LENGTH=[["240",r.VARIABLE_LENGTH,30],["241",r.VARIABLE_LENGTH,30],["242",r.VARIABLE_LENGTH,6],["250",r.VARIABLE_LENGTH,30],["251",r.VARIABLE_LENGTH,30],["253",r.VARIABLE_LENGTH,17],["254",r.VARIABLE_LENGTH,20],["400",r.VARIABLE_LENGTH,30],["401",r.VARIABLE_LENGTH,30],["402",17],["403",r.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",r.VARIABLE_LENGTH,20],["421",r.VARIABLE_LENGTH,15],["422",3],["423",r.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],r.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",r.VARIABLE_LENGTH,15],["391",r.VARIABLE_LENGTH,18],["392",r.VARIABLE_LENGTH,15],["393",r.VARIABLE_LENGTH,18],["703",r.VARIABLE_LENGTH,30]],r.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",r.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",r.VARIABLE_LENGTH,20],["8003",r.VARIABLE_LENGTH,30],["8004",r.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",r.VARIABLE_LENGTH,30],["8008",r.VARIABLE_LENGTH,12],["8018",18],["8020",r.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",r.VARIABLE_LENGTH,70],["8200",r.VARIABLE_LENGTH,70]],r}(),sr=function(){function r(e){this.buffer=new K,this.information=e}return r.prototype.decodeAllCodes=function(e,t){for(var n=t,i=null;;){var o=this.decodeGeneralPurposeField(n,i),a=Bo.parseFieldsInGeneralPurpose(o.getNewString());if(null!=a&&e.append(a),i=o.isRemaining()?""+o.getRemainingValue():null,n===o.getNewPosition())break;n=o.getNewPosition()}return e.toString()},r.prototype.isStillNumeric=function(e){if(e+7>this.information.getSize())return e+4<=this.information.getSize();for(var t=e;t<e+3;++t)if(this.information.get(t))return!0;return this.information.get(e+3)},r.prototype.decodeNumeric=function(e){if(e+7>this.information.getSize()){var t=this.extractNumericValueFromBitArray(e,4);return new Vt(this.information.getSize(),0===t?Vt.FNC1:t-1,Vt.FNC1)}var n=this.extractNumericValueFromBitArray(e,7);return new Vt(e+7,(n-8)/11,(n-8)%11)},r.prototype.extractNumericValueFromBitArray=function(e,t){return r.extractNumericValueFromBitArray(this.information,e,t)},r.extractNumericValueFromBitArray=function(e,t,n){for(var i=0,o=0;o<n;++o)e.get(t+o)&&(i|=1<<n-o-1);return i},r.prototype.decodeGeneralPurposeField=function(e,t){this.buffer.setLengthToZero(),null!=t&&this.buffer.append(t),this.current.setPosition(e);var n=this.parseBlocks();return null!=n&&n.isRemaining()?new Dt(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()):new Dt(this.current.getPosition(),this.buffer.toString())},r.prototype.parseBlocks=function(){var e,t;do{var n=this.current.getPosition();if(e=this.current.isAlpha()?(t=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(t=this.parseIsoIec646Block()).isFinished():(t=this.parseNumericBlock()).isFinished(),n===this.current.getPosition()&&
1!e)break}while(!e);return t.getDecodedInformation()},r.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var e=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFirstDigitFNC1()){var t=void 0;return t=e.isSecondDigitFNC1()?new Dt(this.current.getPosition(),this.buffer.toString()):new Dt(this.current.getPosition(),this.buffer.toString(),e.getSecondDigit()),new bt(!0,t)}if(this.buffer.append(e.getFirstDigit()),e.isSecondDigitFNC1())return t=new Dt(this.current.getPosition(),this.buffer.toString()),new bt(!0,t);this.buffer.append(e.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new bt(!1)},r.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var e=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var t=new Dt(this.current.getPosition(),this.buffer.toString());return new bt(!0,t)}this.buffer.append(e.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new bt(!1)},r.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var e=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var t=new Dt(this.current.getPosition(),this.buffer.toString());return new bt(!0,t)}this.buffer.append(e.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new bt(!1)},r.prototype.isStillIsoIec646=function(e){if(e+5>this.information.getSize())return!1;var t=this.extractNumericValueFromBitArray(e,5);if(t>=5&&t<16)return!0;if(e+7>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<116)return!0;if(e+8>this.information.getSize())return!1;var i=this.extractNumericValueFromBitArray(e,8);return i>=232&&i<253},r.prototype.decodeIsoIec646=function(e){var t=this.extractNumericValueFromBitArray(e,5);if(15===t)return new ot(e+5,ot.FNC1);if(t>=5&&t<15)return new ot(e+5,"0"+(t-5));var o,n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<90)return new ot(e+7,""+(n+1));if(n>=90&&n<116)return new ot(e+7,""+(n+7));switch(this.extractNumericValueFromBitArray(e,8)){case 232:o="!";break;case 233:o='"';break;case 234:o="%";break;case 235:o="&";break;case 236:o="'";break;case 237:o="(";break;case 238:o=")";break;case 239:o="*";break;case 240:o="+";break;case 241:o=",";break;case 242:o="-";break;case 243:o=".";break;case 244:o="/";break;case 245:o=":";break;case 246:o=";";break;case 247:o="<";break;case 248:o="=";break;case 249:o=">";break;case 250:o="?";break;case 251:o="_";break;case 252:o=" ";break;default:throw new y}return new ot(e+8,o)},r.prototype.isStillAlpha=function(e){if(e+5>this.information.getSize())return!1;var t=this.extractNumericValueFromBitArray(e,5);if(t>=5&&t<16)return!0;if(e+6>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,6);return n>=16&&n<63},r.prototype.decodeAlphanumeric=function(e){var t=this.extractNumericValueFromBitArray(e,5);if(15===t)return new ot(e+5,ot.FNC1);if(t>=5&&t<15)return new ot(e+5,"0"+(t-5));var i,n=this.extractNumericValueFromBitArray(e,6);if(n>=32&&n<58)return new ot(e+6,""+(n+33));switch(n){case 58:i="*";break;case 59:i=",";break;case 60:i="-";break;case 61:i=".";break;case 62:i="/";break;default:throw new pt("Decoding invalid alphanumeric value: "+n)}return new ot(e+6,i)},r.prototype.isAlphaTo646ToAlphaLatch=function(e){if(e+1>this.information.getSize())return!1;for(var t=0;t<5&&t+e<this.information.getSize();++t)if(2===t){if(!this.information.get(e+2))return!1}else if(this.information.get(e+t))return!1;return!0},r.prototype.isAlphaOr646ToNumericLatch=function(e){if(e+3>this.information.getSize())return!1;for(var t=e;t<e+3;++t)if(this.information.get(t))return!1;return!0},r.prototype.isNumericToAlphaNumericLatch=function(e){if(e+1>this.information.getSize())return!1;for(var t=0;t<4&&t+e<this.information.getSize();++t)if(this.information.get(e+t))return!1;return!0},r}(),dn=function(){function r(e){this.information=e,this.generalDecoder=new sr(e)}return r.prototype.getInformation=function(){return this.information},r.prototype.getGeneralDecoder=function(){return this.generalDecoder},r}();var ko=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const at=function(r){function e(t){return r.call(this,t)||this}return ko(e,r),e.prototype.encodeCompressedGtin=function(t,n){t.append("(01)");var i=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,n,i)},e.prototype.encodeCompressedGtinWithoutAI=function(t,n,i){for(var o=0;o<4;++o){var a=this.getGeneralDecoder().extractNumericValueFromBitArray(n+10*o,10);a/100==0&&t.append("0"),a/10==0&&t.append("0"),t.append(a)}e.appendCheckDigit(t,i)},e.appendCheckDigit=function(t,n){for(var i=0,o=0;o<13;
1o++){var a=t.charAt(o+n).charCodeAt(0)-48;i+=1&o?a:3*a}10==(i=10-i%10)&&(i=0),t.append(i)},e.GTIN_SIZE=40,e}(dn);var Go=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Ho=function(r){function e(t){return r.call(this,t)||this}return Go(e,r),e.prototype.parseInformation=function(){var t=new K;t.append("(01)");var n=t.length(),i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return t.append(i),this.encodeCompressedGtinWithoutAI(t,e.HEADER_SIZE+4,n),this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}(at);var Wo=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Xo=function(r){function e(t){return r.call(this,t)||this}return Wo(e,r),e.prototype.parseInformation=function(){var t=new K;return this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(dn);var jo=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const cr=function(r){function e(t){return r.call(this,t)||this}return jo(e,r),e.prototype.encodeCompressedWeight=function(t,n,i){var o=this.getGeneralDecoder().extractNumericValueFromBitArray(n,i);this.addWeightCode(t,o);for(var a=this.checkWeight(o),s=1e5,c=0;c<5;++c)a/s==0&&t.append("0"),s/=10;t.append(a)},e}(at);var qo=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const ln=function(r){function e(t){return r.call(this,t)||this}return qo(e,r),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+cr.GTIN_SIZE+e.WEIGHT_SIZE)throw new N;var t=new K;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+cr.GTIN_SIZE,e.WEIGHT_SIZE),t.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(cr);var Ko=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const $o=function(r){function e(t){return r.call(this,t)||this}return Ko(e,r),e.prototype.addWeightCode=function(t,n){t.append("(3103)")},e.prototype.checkWeight=function(t){return t},e}(ln);var Jo=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const ta=function(r){function e(t){return r.call(this,t)||this}return Jo(e,r),e.prototype.addWeightCode=function(t,n){t.append(n<1e4?"(3202)":"(3203)")},e.prototype.checkWeight=function(t){return t<1e4?t:t-1e4},e}(ln);var ra=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const ia=function(r){function e(t){return r.call(this,t)||this}return ra(e,r),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+at.GTIN_SIZE)throw new N;var t=new K;this.encodeCompressedGtin(t,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+at.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(392"),t.append(n),t.append(")");var i=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+at.GTIN_SIZE+e.LA
1ST_DIGIT_SIZE,null);return t.append(i.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}(at);var oa=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const sa=function(r){function e(t){return r.call(this,t)||this}return oa(e,r),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+at.GTIN_SIZE)throw new N;var t=new K;this.encodeCompressedGtin(t,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+at.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(393"),t.append(n),t.append(")");var i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+at.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);i/100==0&&t.append("0"),i/10==0&&t.append("0"),t.append(i);var o=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+at.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return t.append(o.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}(at);var ca=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const _t=function(r){function e(t,n,i){var o=r.call(this,t)||this;
1return o.dateCode=i,o.firstAIdigits=n,o}return ca(e,r),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new N;var t=new K;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(t,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),t.toString()},e.prototype.encodeCompressedDate=function(t,n){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(n,e.DATE_SIZE);if(38400!==i){t.append("("),t.append(this.dateCode),t.append(")");var o=i%32,a=(i/=32)%12+1,s=i/=12;s/10==0&&t.append("0"),t.append(s),a/10==0&&t.append("0"),t.append(a),o/10==0&&t.append("0"),t.append(o)}},e.prototype.addWeightCode=function(t,n){t.append("("),t.append(this.firstAIdigits),t.append(n/1e5),t.append(")")},e.prototype.checkWeight=function(t){return t%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(cr),hn=function(){function r(e,t,n,i){this.leftchar=e,this.rightchar=t,this.finderpattern=n,this.maybeLast=i}return r.prototype.mayBeLast=function(){return this.maybeLast},r.prototype.getLeftChar=function(){return this.leftchar},r.prototype.getRightChar=function(){return this.rightchar},r.prototype.getFinderPattern=function(){return this.finderpattern},r.prototype.mustBeLast=function(){return null==this.rightchar},r.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"},r.equals=function(e,t){return e instanceof r&&r.equalsOrNull(e.leftchar,t.leftchar)&&r.equalsOrNull(e.rightchar,t.rightchar)&&r.equalsOrNull(e.finderpattern,t.finderpattern)},r.equalsOrNull=function(e,t){return null===e?null===t:r.equals(e,t)},r.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},r}(),ha=function(){function r(e,t,n){this.pairs=e,this.rowNumber=t,this.wasReversed=n}return r.prototype.getPairs=function(){return this.pairs},r.prototype.getRowNumber=function(){return this.rowNumber},r.prototype.isReversed=function(){return this.wasReversed},r.prototype.isEquivalent=function(e){return this.checkEqualitity(this,e)},r.prototype.toString=function(){return"{ "+this.pairs+" }"},r.prototype.equals=function(e,t){return e instanceof r&&this.checkEqualitity(e,t)&&e.wasReversed===t.wasReversed},r.prototype.checkEqualitity=function(e,t){var n;if(e&&t)return e.forEach(function(i,o){t.forEach(function(a){i.getLeftChar().getValue()===a.getLeftChar().getValue()&&i.getRightChar().getValue()===a.getRightChar().getValue()&&i.getFinderPatter().getValue()===a.getFinderPatter().getValue()&&(n=!0)})}),n},r}();var va=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),yt=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const ga=function(r){function e(){var t=null!==r&&r.apply(this,arguments)||this;return t.pairs=new Array(e.MAX_PAIRS),t.rows=new Array,t.startEnd=[2],t}return va(e,r),e.prototype.decodeRow=function(t,n,i){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(t,n))}catch{}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(t,n))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(t,n){for(var i=!1;!i;)try{this.pairs.push(this.retrieveNextPair(n,this.pairs,t))}catch(s){if(s instanceof N){if(!this.pairs.length)throw new N;i=!0}}if(this.checkChecksum())return this.pairs;var o;if(o=!!this.rows.length,this.storeRow(t,!1),o){var a=this.checkRowsBoolean(!1);if(null!=a||null!=(a=this.checkRowsBoolean(!0)))return a}throw new N},e.prototype.checkRowsBoolean=function(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());var n=null;try{n=this.checkRows(new Array,0)}catch(i){console.log(i)}return t&&(this.rows=this.rows.reverse()),n},e.prototype.checkRows=function(t,n){for(var i,o,a=n;a<this.rows.length;a++){var s=this.rows[a];this.pairs.length=0;try{for(var c=(i=void 0,yt(t)),u=c.next();!u.done;u=c.next())this.pairs.push(u.value.getPairs())}catch(l){i={error:l}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}
1if(this.pairs.push(s.getPairs()),e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var d=new Array(t);d.push(s);try{return this.checkRows(d,a+1)}catch(l){console.log(l)}}}throw new N},e.isValidSequence=function(t){var n,i;try{for(var o=yt(e.FINDER_PATTERN_SEQUENCES),a=o.next();!a.done;a=o.next()){var s=a.value;if(!(t.length>s.length)){for(var c=!0,u=0;u<t.length;u++)if(t[u].getFinderPattern().getValue()!==s[u]){c=!1;break}if(c)return!0}}}catch(f){n={error:f}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!1},e.prototype.storeRow=function(t,n){for(var i=0,o=!1,a=!1;i<this.rows.length;){var s=this.rows[i];if(s.getRowNumber()>t){a=s.isEquivalent(this.pairs);break}o=s.isEquivalent(this.pairs),i++}a||o||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(i,new ha(this.pairs,t,n)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(t,n){var i,o,a,s,c,u;try{for(var f=yt(n),d=f.next();!d.done;d=f.next()){var l=d.value;if(l.getPairs().length!==t.length)try{for(var p=(a=void 0,yt(l.getPairs())),C=p.next();!C.done;C=p.next()){var A=C.value;try{for(var O=(c=void 0,yt(t)),D=O.next();!D.done;D=O.next())if(hn.equals(A,D.value)){0;break}}catch(B){c={error:B}}finally{try{D&&!D.done&&(u=O.return)&&u.call(O)}finally{if(c)throw c.error}}}}catch(B){a={error:B}}finally{try{C&&!C.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}}}catch(B){i={error:B}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}},e.isPartialRow=function(t,n){var i,o,a,s,c,u;try{for(var f=yt(n),d=f.next();!d.done;d=f.next()){var l=d.value,h=!0;try{for(var p=(a=void 0,yt(t)),C=p.next();!C.done;C=p.next()){var A=C.value,S=!1;try{for(var O=(c=void 0,yt(l.getPairs())),D=O.next();!D.done;D=O.next())if(A.equals(D.value)){S=!0;break}}catch(B){c={error:B}}finally{try{D&&!D.done&&(u=O.return)&&u.call(O)}finally{if(c)throw c.error}}if(!S){h=!1;break}}}catch(B){a={error:B}}finally{try{C&&!C.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}if(h)return!0}}catch(B){i={error:B}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(t){var i=function fa(r){try{if(r.get(1))return new Ho(r);if(!r.get(2))return new Xo(r);switch(sr.extractNumericValueFromBitArray(r,1,4)){case 4:return new $o(r);case 5:return new ta(r)}switch(sr.extractNumericValueFromBitArray(r,1,5)){case 12:return new ia(r);case 13:return new sa(r)}switch(sr.extractNumericValueFromBitArray(r,1,7)){case 56:return new _t(r,"310","11");case 57:return new _t(r,"320","11");case 58:return new _t(r,"310","13");case 59:return new _t(r,"320","13");case 60:return new _t(r,"310","15");case 61:return new _t(r,"320","15");case 62:return new _t(r,"310","17");case 63:return new _t(r,"320","17")}}catch(i){throw console.log(i),new pt("unknown decoder: "+r)}}(Oo.buildBitArray(t)),o=i.parseInformation(),a=t[0].getFinderPattern().getResultPoints(),s=t[t.length-1].getFinderPattern().getResultPoints();return new He(o,null,null,[a[0],a[1],s[0],s[1]],Z.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var t=this.pairs.get(0),n=t.getLeftChar(),i=t.getRightChar();if(null===i)return!1;for(var o=i.getChecksumPortion(),a=2,s=1;s<this.pairs.size();++s){var c=this.pairs.get(s);o+=c.getLeftChar().getChecksumPortion(),a++;var u=c.getRightChar();null!=u&&(o+=u.getChecksumPortion(),a++)}return 211*(a-4)+(o%=211)===n.getValue()},e.getNextSecondBar=function(t,n){var i;return t.get(n)?(i=t.getNextUnset(n),i=t.getNextSet(i)):(i=t.getNextSet(n),i=t.getNextUnset(i)),i},e.prototype.retrieveNextPair=function(t,n,i){var o=n.length%2==0;this.startFromEven&&(o=!o);var a,s=!0,c=-1;do{this.findNextPair(t,n,c),null===(a=this.parseFoundFinderPattern(t,i,o))?c=e.getNextSecondBar(t,this.startEnd[0]):s=!1}while(s);var f,u=this.decodeDataCharacter(t,a,o,!0);if(!this.isEmptyPair(n)&&n[n.length-1].mustBeLast())throw new N;try{f=this.decodeDataCharacter(t,a,o,!1)}catch(d){f=null,console.log(d)}return new hn(u,f,a,!0)},e.prototype.isEmptyPair=function(t){return 0===t.length},e.prototype.findNextPair=function(t,n,i){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;var s,a=t.getSize();s=i>=0?i:this.isEmptyPair(n)?0:n[n.length-1].getFinderPattern().getStartEnd()[1];var u=n.length%2!=0;this.startFromEven&&(u=!u);for(var f=!1;s<a&&(f=!t.get(s));)s++;for(var d=0,l=s,h=s;h<a;h++)if(t.get(h)!==f)o[d]++;else{if(3===d){if(u&&e.reverseCounters(o),e.isFinderPattern(o))return this.startEnd[0]=l,void(this.startEnd[1]=h);u&&e.reverseCounters(o),l+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,d--}else d++;o[d]=1,f=!f}throw new N},e.reverseCounters=function(t){for(var n=t.length,i=0;i<n/2;++i){var o=t[i];t[i]=t[n-i-1],t[n-i-1]=o}},e.prototype.parseFoundFinderPattern=function(t,n,i){var o,a,s;if(i){for(var c=this.startEnd[0]-1;c>=0&&!t.get(c);)c--;c++,o=this.startEnd[0]-c,a=c,s=this.startEnd[1]}else a=this.startEnd[0],o=(s=t.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var f,u=this.getDecodeFinderCounters();le.arraycopy(u,0,u,1,u.length-1),u[0]=o;try{f=this.parseFinderValue(u,e.FINDER_PATTERNS)}catch{return null}return new fn(f,[a,s],a,s,n)},e.prototype.decodeDataCharacter=function(t,n,i,o){for(var a=this.getDataCharacterCounters(),s=0;s<a.length;s++)a[s]=0;if(o)e.recordPatternInReverse(t,n.getStartEnd()[0],a);else{e.recordPattern(t,n.getStartEnd()[1],a);for(var c=0,u=a.length-1;c<u;c++,u--){var f=a[c];a[c]=a[u],a[u]=f}}var l=he.sum(new Int32Array(a))/17,h=(n.getStartEnd()[1]-n.getStartEnd()[0])/15;if(Math.abs(l-h)/h>.3)throw new N;var p=this.getOddCounts(),C=this.getEvenCounts(),A=this.getOddRoundingErrors(),S=this.getEvenRoundingErrors();for(c=0;c<a.length;c++){var O=1*a[c]/l,D=O+.5;if(D<1){if(O<.3)throw new N;D=1}else if(D>8){if(O>8.7)throw new N;D=8}var P=c/2;1&c?(C[P]=D,S[P]=O-D):(p[P]=D,A[P]=O-D)}this.adjustOddEvenCounts(17);var B=4*n.getValue()+(i?0:2)+(o?0:1)-1,L=0,U=0;for(c=p.length-1;c>=0;c--)e.isNotA1left(n,i,o)&&(U+=p[c]*e.WEIGHTS[B][2*c]),L+=p[c];var ne=0;for(c=C.length-1;c>=0;c--)e.isNotA1left(n,i,o)&&(ne+=C[c]*e.WEIGHTS[B][2*c+1]);var re=U+ne;if(1&L||L>13||L<4)throw new N;var Te=(13-L)/2,de=e.SYMBOL_WIDEST[Te],be=9-de,it=Gt.getRSSvalue(p,de,!0),wt=Gt.getRSSvalue(C,be,!1);return new or(it*e.EVEN_TOTAL_SUBSET[Te]+wt+e.GSUM[Te],re)},e.isNotA1left=function(t,n,i){return!(0===t.getValue()&&n&&i)},e.prototype.adjustOddEvenCounts=function(t){var n=he.sum(new Int32Array(this.getOddCounts())),i=he.sum(new Int32Array(this.getEvenCounts())),o=!1,a=!1;n>13?a=!0:n<4&&(o=!0);var s=!1,c=!1;i>13?c=!0:i<4&&(s=!0);
1var u=n+i-t,f=!(1&~n),d=!(1&i);if(1===u)if(f){if(d)throw new N;a=!0}else{if(!d)throw new N;c=!0}else if(-1===u)if(f){if(d)throw new N;o=!0}else{if(!d)throw new N;s=!0}else{if(0!==u)throw new N;if(f){if(!d)throw new N;n<i?(o=!0,c=!0):(a=!0,s=!0)}else if(d)throw new N}if(o){if(a)throw new N;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(a&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),s){if(c)throw new N;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}c&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.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])],e.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]],e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A=0,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B=1,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C=2,e.FINDER_PAT_B,e.FINDER_PAT_D=3],[e.FINDER_PAT_A,e.FINDER_PAT_E=4,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F=5],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e}(It);var xa=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const ya=function(r){function e(t,n,i){var o=r.call(this,t,n)||this;return o.count=0,o.finderPattern=i,o}return xa(e,r),e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(or);var ma=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),br=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const vn=function(r){function e(){var t=null!==r&&r.apply(this,arguments)||this;return t.possibleLeftPairs=[],t.possibleRightPairs=[],t}return ma(e,r),e.prototype.decodeRow=function(t,n,i){var o,a,s,c,u=this.decodePair(n,!1,t,i);e.addOrTally(this.possibleLeftPairs,u),n.reverse();var f=this.decodePair(n,!0,t,i);e.addOrTally(this.possibleRightPairs,f),n.reverse();try{for(var d=br(this.possibleLeftPairs),l=d.next();!l.done;l=d.next()){var h=l.value;if(h.getCount()>1)try{for(var p=(s=void 0,br(this.possibleRightPairs)),C=p.next();!C.done;C=p.next()){var A=C.value;if(A.getCount()>1&&e.checkChecksum(h,A))return e.constructResult(h,A)}}catch(S){s={error:S}}finally{try{C&&!C.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}}}catch(S){o={error:S}}
1finally{try{l&&!l.done&&(a=d.return)&&a.call(d)}finally{if(o)throw o.error}}throw new N},e.addOrTally=function(t,n){var i,o;if(null!=n){var a=!1;try{for(var s=br(t),c=s.next();!c.done;c=s.next()){var u=c.value;if(u.getValue()===n.getValue()){u.incrementCount(),a=!0;break}}}catch(f){i={error:f}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}a||t.push(n)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(t,n){for(var i=4537077*t.getValue()+n.getValue(),o=new String(i).toString(),a=new K,s=13-o.length;s>0;s--)a.append("0");a.append(o);var c=0;for(s=0;s<13;s++){var u=a.charAt(s).charCodeAt(0)-48;c+=1&s?u:3*u}10==(c=10-c%10)&&(c=0),a.append(c.toString());var f=t.getFinderPattern().getResultPoints(),d=n.getFinderPattern().getResultPoints();return new He(a.toString(),null,0,[f[0],f[1],d[0],d[1]],Z.RSS_14,(new Date).getTime())},e.checkChecksum=function(t,n){var i=(t.getChecksumPortion()+16*n.getChecksumPortion())%79,o=9*t.getFinderPattern().getValue()+n.getFinderPattern().getValue();return o>72&&o--,o>8&&o--,i===o},e.prototype.decodePair=function(t,n,i,o){try{var a=this.findFinderPattern(t,n),s=this.parseFoundFinderPattern(t,i,n,a),c=null==o?null:o.get(x.NEED_RESULT_POINT_CALLBACK);if(null!=c){var u=(a[0]+a[1])/2;n&&(u=t.getSize()-1-u),c.foundPossibleResultPoint(new j(u,i))}var f=this.decodeDataCharacter(t,s,!0),d=this.decodeDataCharacter(t,s,!1);return new ya(1597*f.getValue()+d.getValue(),f.getChecksumPortion()+4*d.getChecksumPortion(),s)}catch{return null}},e.prototype.decodeDataCharacter=function(t,n,i){for(var o=this.getDataCharacterCounters(),a=0;a<o.length;a++)o[a]=0;if(i)Me.recordPatternInReverse(t,n.getStartEnd()[0],o);else{Me.recordPattern(t,n.getStartEnd()[1]+1,o);for(var s=0,c=o.length-1;s<c;s++,c--){var u=o[s];o[s]=o[c],o[c]=u}}var f=i?16:15,d=he.sum(new Int32Array(o))/f,l=this.getOddCounts(),h=this.getEvenCounts(),p=this.getOddRoundingErrors(),C=this.getEvenRoundingErrors();for(s=0;s<o.length;s++){var A=o[s]/d,S=Math.floor(A+.5);S<1?S=1:S>8&&(S=8);var O=Math.floor(s/2);1&s?(h[O]=S,C[O]=A-S):(l[O]=S,p[O]=A-S)}this.adjustOddEvenCounts(i,f);var D=0,P=0;for(s=l.length-1;s>=0;s--)P*=9,P+=l[s],D+=l[s];var B=0,L=0;for(s=h.length-1;s>=0;s--)B*=9,B+=h[s],L+=h[s];var Y,ne,U=P+3*B;if(i){if(1&D||D>12||D<4)throw new N;var re=9-(ne=e.OUTSIDE_ODD_WIDEST[Y=(12-D)/2]),Te=Gt.getRSSvalue(l,ne,!1),de=Gt.getRSSvalue(h,re,!0);return new or(Te*e.OUTSIDE_EVEN_TOTAL_SUBSET[Y]+de+e.OUTSIDE_GSUM[Y],U)}if(1&L||L>10||L<4)throw new N;return re=9-(ne=e.INSIDE_ODD_WIDEST[Y=(10-L)/2]),Te=Gt.getRSSvalue(l,ne,!0),de=Gt.getRSSvalue(h,re,!1),new or(de*e.INSIDE_ODD_TOTAL_SUBSET[Y]+Te+e.INSIDE_GSUM[Y],U)},e.prototype.findFinderPattern=function(t,n){var i=this.getDecodeFinderCounters();i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var o=t.getSize(),a=!1,s=0;s<o&&n!==(a=!t.get(s));)s++;for(var c=0,u=s,f=s;f<o;f++)if(t.get(f)!==a)i[c]++;else{if(3===c){if(It.isFinderPattern(i))return[u,f];u+=i[0]+i[1],i[0]=i[2],i[1]=i[3],i[2]=0,i[3]=0,c--}else c++;i[c]=1,a=!a}throw new N},e.prototype.parseFoundFinderPattern=function(t,n,i,o){for(var a=t.get(o[0]),s=o[0]-1;s>=0&&a!==t.get(s);)s--;s++;var c=o[0]-s,u=this.getDecodeFinderCounters(),f=new Int32Array(u.length);le.arraycopy(u,0,f,1,u.length-1),f[0]=c;var d=this.parseFinderValue(f,e.FINDER_PATTERNS),l=s,h=o[1];return i&&(l=t.getSize()-1-l,h=t.getSize()-1-h),new fn(d,[s,o[1]],l,h,n)},e.prototype.adjustOddEvenCounts=function(t,n){var i=he.sum(new Int32Array(this.getOddCounts())),o=he.sum(new Int32Array(this.getEvenCounts())),a=!1,s=!1,c=!1,u=!1;t?(i>12?s=!0:i<4&&(a=!0),o>12?u=!0:o<4&&(c=!0)):(i>11?s=!0:i<5&&(a=!0),o>10?u=!0:o<4&&(c=!0));var f=i+o-n,d=(1&i)==(t?1:0),l=!(1&~o);if(1===f)if(d){if(l)throw new N;s=!0}else{if(!l)throw new N;u=!0}else if(-1===f)if(d){if(l)throw new N;a=!0}else{if(!l)throw new N;c=!0}else{if(0!==f)throw new N;if(d){if(!l)throw new N;i<o?(a=!0,u=!0):(s=!0,c=!0)}else if(l)throw new N}if(a){if(s)throw new N;It.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(s&&It.decrement(this.getOddCounts(),this.getOddRoundingErrors()),c){if(u)throw new N;It.increment(this.getEvenCounts(),this.getOddRoundingErrors())}
1u&&It.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.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])],e}(It);var wa=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Ht=function(r){function e(t){var n=r.call(this)||this;n.readers=[];var i=t?t.get(x.POSSIBLE_FORMATS):null,o=t&&void 0!==t.get(x.ASSUME_CODE_39_CHECK_DIGIT),a=t&&void 0!==t.get(x.ENABLE_CODE_39_EXTENDED_MODE);return i&&((i.includes(Z.EAN_13)||i.includes(Z.UPC_A)||i.includes(Z.EAN_8)||i.includes(Z.UPC_E))&&n.readers.push(new Sr(t)),i.includes(Z.CODE_39)&&n.readers.push(new en(o,a)),i.includes(Z.CODE_93)&&n.readers.push(new tn),i.includes(Z.CODE_128)&&n.readers.push(new Jr),i.includes(Z.ITF)&&n.readers.push(new rn),i.includes(Z.CODABAR)&&n.readers.push(new go),i.includes(Z.RSS_14)&&n.readers.push(new vn),i.includes(Z.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),n.readers.push(new ga))),0===n.readers.length&&(n.readers.push(new Sr(t)),n.readers.push(new en),n.readers.push(new tn),n.readers.push(new Sr(t)),n.readers.push(new Jr),n.readers.push(new rn),n.readers.push(new vn)),n}return wa(e,r),e.prototype.decodeRow=function(t,n,i){for(var o=0;o<this.readers.length;o++)try{return this.readers[o].decodeRow(t,n,i)}catch{}throw new N},e.prototype.reset=function(){this.readers.forEach(function(t){return t.reset()})},e}(Me);var Aa=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),pn=(function(r){Aa(function e(t,n){return void 0===t&&(t=500),r.call(this,new Ht(n),t,n)||this},r)}(kt),function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}),_e=function(){function r(e,t,n){this.ecCodewords=e,this.ecBlocks=[t],n&&this.ecBlocks.push(n)}return r.prototype.getECCodewords=function(){return this.ecCodewords},r.prototype.getECBlocks=function(){return this.ecBlocks},r}(),pe=function(){function r(e,t){this.count=e,this.dataCodewords=t}return r.prototype.getCount=function(){return this.count},r.prototype.getDataCodewords=function(){return this.dataCodewords},r}();const Sa=function(){function r(e,t,n,i,o,a){var s,c;this.versionNumber=e,this.symbolSizeRows=t,this.symbolSizeColumns=n,this.dataRegionSizeRows=i,this.dataRegionSizeColumns=o,this.ecBlocks=a;var u=0,f=a.getECCodewords(),d=a.getECBlocks();try{for(var l=pn(d),h=l.next();!h.done;h=l.next()){var p=h.value;u+=p.getCount()*(p.getDataCodewords()+f)}}catch(C){s={error:C}}finally{try{h&&!h.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}this.totalCodewords=u}return r.prototype.getVersionNumber=function(){return this.versionNumber},r.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},r.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},r.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},r.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},r.prototype.getTotalCodewords=function(){return this.totalCodewords},r.prototype.getECBlocks=function(){return this.ecBlocks},r.getVersionForDimensions=function(e,t){var n,i;if(1&e||1&t)throw new y;try{for(var o=pn(r.VERSIONS),a=o.next();!a.done;a=o.next()){var s=a.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===t)return s}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}throw new y},r.prototype.toString=function(){return""+this.versionNumber},r.buildVersions=function(){return[new r(1,10,10,8,8,new _e(5,new pe(1,3))),new r(2,12,12,10,10,new _e(7,new pe(1,5))),new r(3,14,14,12,12,new _e(10,new pe(1,8))),new r(4,16,16,14,14,new _e(12,new pe(1,12))),new r(5,18,18,16,16,new _e(14,new pe(1,18))),new r(6,20,20,18,18,new _e(18,new pe(1,22))),new r(7,22,22,20,20,new _e(20,new pe(1,30))),new r(8,24,24,22,22,new _e(24,new pe(1,36))),new r(9,26,26,24,24,new _e(28,new pe(1,44))),new r(10,32,32,14,14,new _e(36,new pe(1,62))),new r(11,36,36,16,16,new _e(42,new pe(1,86))),new r(12,40,40,18,18,new _e(48,new pe(1,114))),new r(13,44,44,20,20,new _e(56,new pe(1,144))),new r(14,48,48,22,22,new _e(68,new pe(1,174))),new r(15,52,52,24,24,new _e(42,new pe(2,102))),new r(16,64,64,14,14,new _e(56,new pe(2,140))),new r(17,72,72,16,16,new _e(36,new pe(4,92))),new r(18,80,80,18,18,new _e(48,new pe(4,114))),new r(19,88,88,20,20,new _e(56,new pe(4,144))),new r(20,96,96,22,22,new _e(68,new pe(4,174))),new r(21,104,104,24,24,new _e(56,new pe(6,136))),new r(22,120,120,18,18,new _e(68,new pe(6,175))),new r(23,132,132,20,20,new _e(62,new pe(8,163))),new r(24,144,144,22,22,new _e(62,new pe(8,156),new pe(2,155))),new r(25,8,18,6,16,new _e(7,new pe(1,5))),new r(26,8,32,6,14,new _e(11,new pe(1,10))),new r(27,12,26,10,24,new _e(14,new pe(1,16))),new r(28,12,36,10,16,new _e(18,new pe(1,22))),new r(29,16,36,14,16,new _e(24,new pe(1,32))),new r(30,16,48,14,22,new _e(28,new pe(1,49)))]},r.VERSIONS=r.buildVersions(),r}(),ba=function(){function r(e){var t=e.getHeight();if(t<8||t>144||1&t)throw new y;this.version=r.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new we(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return r.prototype.getVersion=function(){return this.version},r.readVersion=function(e){var t=e.getHeight(),n=e.getWidth();return Sa.getVersionForDimensions(t,n)},r.prototype.readCodewords=function(){var e=new Int8Array(this.version.getTotalCodewords()),t=0,n=4,i=0,o=this.mappingBitMatrix.getHeight(),a=this.mappingBitMatrix.getWidth(),s=!1,c=!1,u=!1,f=!1;
1do{if(n!==o||0!==i||s)if(n===o-2&&0===i&&3&a&&!c)e[t++]=255&this.readCorner2(o,a),n-=2,i+=2,c=!0;else if(n!==o+4||2!==i||7&a||u)if(n!==o-2||0!==i||4!=(7&a)||f){do{n<o&&i>=0&&!this.readMappingMatrix.get(i,n)&&(e[t++]=255&this.readUtah(n,i,o,a)),n-=2,i+=2}while(n>=0&&i<a);n+=1,i+=3;do{n>=0&&i<a&&!this.readMappingMatrix.get(i,n)&&(e[t++]=255&this.readUtah(n,i,o,a)),n+=2,i-=2}while(n<o&&i>=0);n+=3,i+=1}else e[t++]=255&this.readCorner4(o,a),n-=2,i+=2,f=!0;else e[t++]=255&this.readCorner3(o,a),n-=2,i+=2,u=!0;else e[t++]=255&this.readCorner1(o,a),n-=2,i+=2,s=!0}while(n<o||i<a);if(t!==this.version.getTotalCodewords())throw new y;return e},r.prototype.readModule=function(e,t,n,i){return e<0&&(e+=n,t+=4-(n+4&7)),t<0&&(t+=i,e+=4-(i+4&7)),this.readMappingMatrix.set(t,e),this.mappingBitMatrix.get(t,e)},r.prototype.readUtah=function(e,t,n,i){var o=0;return this.readModule(e-2,t-2,n,i)&&(o|=1),o<<=1,this.readModule(e-2,t-1,n,i)&&(o|=1),o<<=1,this.readModule(e-1,t-2,n,i)&&(o|=1),o<<=1,this.readModule(e-1,t-1,n,i)&&(o|=1),o<<=1,this.readModule(e-1,t,n,i)&&(o|=1),o<<=1,this.readModule(e,t-2,n,i)&&(o|=1),o<<=1,this.readModule(e,t-1,n,i)&&(o|=1),o<<=1,this.readModule(e,t,n,i)&&(o|=1),o},r.prototype.readCorner1=function(e,t){var n=0;return this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,1,e,t)&&(n|=1),n<<=1,this.readModule(e-1,2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n<<=1,this.readModule(2,t-1,e,t)&&(n|=1),n<<=1,this.readModule(3,t-1,e,t)&&(n|=1),n},r.prototype.readCorner2=function(e,t){var n=0;return this.readModule(e-3,0,e,t)&&(n|=1),n<<=1,this.readModule(e-2,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(0,t-4,e,t)&&(n|=1),n<<=1,this.readModule(0,t-3,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n},r.prototype.readCorner3=function(e,t){var n=0;return this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,t-1,e,t)&&(n|=1),n<<=1,this.readModule(0,t-3,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-3,e,t)&&(n|=1),n<<=1,this.readModule(1,t-2,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n},r.prototype.readCorner4=function(e,t){var n=0;return this.readModule(e-3,0,e,t)&&(n|=1),n<<=1,this.readModule(e-2,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n<<=1,this.readModule(2,t-1,e,t)&&(n|=1),n<<=1,this.readModule(3,t-1,e,t)&&(n|=1),n},r.prototype.extractDataRegion=function(e){var t=this.version.getSymbolSizeRows(),n=this.version.getSymbolSizeColumns();if(e.getHeight()!==t)throw new X("Dimension of bitMatrix must match the version size");for(var i=this.version.getDataRegionSizeRows(),o=this.version.getDataRegionSizeColumns(),a=t/i|0,s=n/o|0,f=new we(s*o,a*i),d=0;d<a;++d)for(var l=d*i,h=0;h<s;++h)for(var p=h*o,C=0;C<i;++C)for(var A=d*(i+2)+1+C,S=l+C,O=0;O<o;++O)e.get(h*(o+2)+1+O,A)&&f.set(p+O,S);return f},r}();var gn=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const Ta=function(){function r(e,t){this.numDataCodewords=e,this.codewords=t}return r.getDataBlocks=function(e,t){var n,i,o,a,s=t.getECBlocks(),c=0,u=s.getECBlocks();try{for(var f=gn(u),d=f.next();!d.done;d=f.next())c+=(l=d.value).getCount()}catch(it){n={error:it}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}var h=new Array(c),p=0;try{for(var C=gn(u),A=C.next();!A.done;A=C.next())for(var l=A.value,S=0;S<l.getCount();S++){var O=l.getDataCodewords(),D=s.getECCodewords()+O;h[p++]=new r(O,new Uint8Array(D))}}catch(it){o={error:it}}finally{try{A&&!A.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}var B=h[0].codewords.length-s.getECCodewords(),L=B-1,U=0;for(S=0;S<L;S++)for(var Y=0;Y<p;Y++)h[Y].codewords[S]=e[U++];var ne=24===t.getVersionNumber(),re=ne?8:p;for(Y=0;Y<re;Y++)h[Y].codewords[B-1]=e[U++];var Te=h[0].codewords.length;for(S=B;S<Te;S++)for(Y=0;Y<p;Y++){var de=ne?(Y+8)%p:Y;h[de].codewords[ne&&de>7?S-1:S]=e[U++]}if(U!==e.length)throw new X;return h},r.prototype.getNumDataCodewords=function(){return this.numDataCodewords}
1,r.prototype.getCodewords=function(){return this.codewords},r}(),xn=function(){function r(e){this.bytes=e,this.byteOffset=0,this.bitOffset=0}return r.prototype.getBitOffset=function(){return this.bitOffset},r.prototype.getByteOffset=function(){return this.byteOffset},r.prototype.readBits=function(e){if(e<1||e>32||e>this.available())throw new X(""+e);var t=0,n=this.bitOffset,i=this.byteOffset,o=this.bytes;if(n>0){var a=8-n,s=e<a?e:a;t=(o[i]&255>>8-s<<(c=a-s))>>c,e-=s,8===(n+=s)&&(n=0,i++)}if(e>0){for(;e>=8;)t=t<<8|255&o[i],i++,e-=8;var c;e>0&&(t=t<<e|(o[i]&255>>(c=8-e)<<c)>>c,n+=e)}return this.bitOffset=n,this.byteOffset=i,t},r.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},r}();var Fe=function(r){return r[r.PAD_ENCODE=0]="PAD_ENCODE",r[r.ASCII_ENCODE=1]="ASCII_ENCODE",r[r.C40_ENCODE=2]="C40_ENCODE",r[r.TEXT_ENCODE=3]="TEXT_ENCODE",r[r.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",r[r.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",r[r.BASE256_ENCODE=6]="BASE256_ENCODE",r}(Fe||{});const Ra=function(){function r(){}return r.decode=function(e){var t=new xn(e),n=new K,i=new K,o=new Array,a=Fe.ASCII_ENCODE;do{if(a===Fe.ASCII_ENCODE)a=this.decodeAsciiSegment(t,n,i);else{switch(a){case Fe.C40_ENCODE:this.decodeC40Segment(t,n);break;case Fe.TEXT_ENCODE:this.decodeTextSegment(t,n);break;case Fe.ANSIX12_ENCODE:this.decodeAnsiX12Segment(t,n);break;case Fe.EDIFACT_ENCODE:this.decodeEdifactSegment(t,n);break;case Fe.BASE256_ENCODE:this.decodeBase256Segment(t,n,o);break;default:throw new y}a=Fe.ASCII_ENCODE}}while(a!==Fe.PAD_ENCODE&&t.available()>0);return i.length()>0&&n.append(i.toString()),new tr(e,n.toString(),0===o.length?null:o,null)},r.decodeAsciiSegment=function(e,t,n){var i=!1;do{var o=e.readBits(8);if(0===o)throw new y;if(o<=128)return i&&(o+=128),t.append(String.fromCharCode(o-1)),Fe.ASCII_ENCODE;if(129===o)return Fe.PAD_ENCODE;if(o<=229){var a=o-130;a<10&&t.append("0"),t.append(""+a)}else switch(o){case 230:return Fe.C40_ENCODE;case 231:return Fe.BASE256_ENCODE;case 232:t.append("\x1d");break;case 233:case 234:case 241:break;case 235:i=!0;break;case 236:t.append("[)>\x1e05\x1d"),n.insert(0,"\x1e\x04");break;case 237:t.append("[)>\x1e06\x1d"),n.insert(0,"\x1e\x04");break;case 238:return Fe.ANSIX12_ENCODE;case 239:return Fe.TEXT_ENCODE;case 240:return Fe.EDIFACT_ENCODE;default:if(254!==o||0!==e.available())throw new y}}while(e.available()>0);return Fe.ASCII_ENCODE},r.decodeC40Segment=function(e,t){var n=!1,i=[],o=0;do{if(8===e.available())return;var a=e.readBits(8);if(254===a)return;this.parseTwoBytes(a,e.readBits(8),i);for(var s=0;s<3;s++){var c=i[s];switch(o){case 0:if(c<3)o=c+1;else{if(!(c<this.C40_BASIC_SET_CHARS.length))throw new y;var u=this.C40_BASIC_SET_CHARS[c];n?(t.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):t.append(u)}break;case 1:n?(t.append(String.fromCharCode(c+128)),n=!1):t.append(String.fromCharCode(c)),o=0;break;case 2:if(c<this.C40_SHIFT2_SET_CHARS.length)u=this.C40_SHIFT2_SET_CHARS[c],n?(t.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):t.append(u);else switch(c){case 27:t.append("\x1d");break;case 30:n=!0;break;default:throw new y}o=0;break;case 3:n?(t.append(String.fromCharCode(c+224)),n=!1):t.append(String.fromCharCode(c+96)),o=0;break;default:throw new y}}}while(e.available()>0)},r.decodeTextSegment=function(e,t){var n=!1,i=[],o=0;do{if(8===e.available())return;var a=e.readBits(8);if(254===a)return;this.parseTwoBytes(a,e.readBits(8),i);for(var s=0;s<3;s++){var c=i[s];switch(o){case 0:if(c<3)o=c+1;else{if(!(c<this.TEXT_BASIC_SET_CHARS.length))throw new y;var u=this.TEXT_BASIC_SET_CHARS[c];n?(t.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):t.append(u)}break;case 1:n?(t.append(String.fromCharCode(c+128)),n=!1):t.append(String.fromCharCode(c)),o=0;break;case 2:if(c<this.TEXT_SHIFT2_SET_CHARS.length)u=this.TEXT_SHIFT2_SET_CHARS[c],n?(t.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):t.append(u);else switch(c){case 27:t.append("\x1d");break;case 30:n=!0;break;default:throw new y}o=0;break;case 3:if(!(c<this.TEXT_SHIFT3_SET_CHARS.length))throw new y;u=this.TEXT_SHIFT3_SET_CHARS[c],n?(t.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):t.append(u),o=0;break;default:throw new y}}}while(e.available()>0)},r.decodeAnsiX12Segment=function(e,t){var n=[];do{if(8===e.available())return;var i=e.readBits(8);if(254===i)return;this.parseTwoBytes(i,e.readBits(8),n);for(var o=0;o<3;o++){var a=n[o];switch(a){case 0:t.append("\r");break;case 1:t.append("*");break;case 2:t.append(">");break;case 3:t.append(" ");break;default:if(a<14)t.append(String.fromCharCode(a+44));else{if(!(a<40))throw new y;t.append(String.fromCharCode(a+51))}}}}while(e.available()>0)},r.parseTwoBytes=function(e,t,n){var i=(e<<8)+t-1,o=Math.floor(i/1600);n[0]=o,i-=1600*o,o=Math.floor(i/40),n[1]=o,n[2]=i-40*o},r.decodeEdifactSegment=function(e,t){do{if(e.available()<=16)return;for(var n=0;n<4;n++){var i=e.readBits(6);if(31===i){var o=8-e.getBitOffset();return void(8!==o&&e.readBits(o))}!(32&i)&&(i|=64),t.append(String.fromCharCode(i))}}while(e.available()>0)},r.decodeBase256Segment=function(e,t,n){var a,i=1+e.getByteOffset(),o=this.unrandomize255State(e.readBits(8),i++);if((a=0===o?e.available()/8|0:o<250?o:250*(o-249)+this.unrandomize255State(e.readBits(8),i++))<0)throw new y;for(var s=new Uint8Array(a),c=0;c<a;c++){if(e.available()<8)throw new y;s[c]=this.unrandomize255State(e.readBits(8),i++)}n.push(s);try{t.append(me.decode(s,q.ISO88591))}catch(u){throw new pt("Platform does not support required encoding: "+u.message)}},r.unrandomize255State=function(e,t){var i=e-(149*t%255+1);return i>=0?i:i+256},r.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"],r.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],r.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"],r.TEXT_SHIFT2_SET_CHARS=r.C40_SHIFT2_SET_CHARS,r.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","{","|","}","~","\x7f"],r}(),Fa=function(){function r(){this.rsDecoder=new nr(Ke.DATA_MATRIX_FIELD_256)}return r.prototype.decode=function(e){var t,n,i=new ba(e),o=i.getVersion(),a=i.readCodewords(),s=Ta.getDataBlocks(a,o),c=0;try{for(var u=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(s),f=u.next();!f.done;f=u.next())c+=f.value.getNumDataCodewords()}catch(D){t={error:D}}finally{try{f&&!f.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}for(var l=new Uint8Array(c),h=s.length,p=0;p<h;p++){var C=s[p],A=C.getCodewords(),S=C.getNumDataCodewords();this.correctErrors(A,S);for(var O=0;O<S;O++)l[O*h+p]=A[O]}return Ra.decode(l)},r.prototype.correctErrors=function(e,t){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-t)}catch{throw new Ie}for(var i=0;i<t;i++)e[i]=n[i]},r}(),ka=function(){function r(e){this.image=e,this.rectangleDetector=new Cr(this.image)}return r.prototype.detect=function(){var e=this.rectangleDetector.detect(),t=this.detectSolid1(e);if((t=this.detectSolid2(t))[3]=this.correctTopRight(t),!t[3])throw new N;var n=(t=this.shiftToModuleCenter(t))[0],i=t[1],o=t[2],a=t[3],s=this.transitionsBetween(n,a)+1,c=this.transitionsBetween(o,a)+1;!(1&~s)&&(s+=1),!(1&~c)&&(c+=1),4*s<7*c&&4*c<7*s&&(s=c=Math.max(s,c));var u=r.sampleGrid(this.image,n,i,o,a,s,c);return new mr(u,[n,i,o,a])},r.shiftPoint=function(e,t,n){var i=(t.getX()-e.getX())/(n+1),o=(t.getY()-e.getY())/(n+1);return new j(e.getX()+i,e.getY()+o)},r.moveAway=function(e,t,n){var i=e.getX(),o=e.getY();return i<t?i-=1:i+=1,o<n?o-=1:o+=1,new j(i,o)},r.prototype.detectSolid1=function(e){var t=e[0],n=e[1],i=e[3],o=e[2],a=this.transitionsBetween(t,n),s=this.transitionsBetween(n,i),c=this.transitionsBetween(i,o),u=this.transitionsBetween(o,t),f=a,d=[o,t,n,i];return f>s&&(f=s,d[0]=t,d[1]=n,d[2]=i,d[3]=o),f>c&&(f=c,d[0]=n,d[1]=i,d[2]=o,d[3]=t),f>u&&(d[0]=i,d[1]=o,d[2]=t,d[3]=n),d},r.prototype.detectSolid2=function(e){var t=e[0],n=e[1],i=e[2],o=e[3],a=this.transitionsBetween(t,o),s=r.shiftPoint(n,i,4*(a+1)),c=r.shiftPoint(i,n,4*(a+1));return this.transitionsBetween(s,t)<this.transitionsBetween(c,o)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o):(e[0]=n,e[1]=i,e[2]=o,e[3]=t),e},r.prototype.correctTopRight=function(e){var t=e[0],n=e[1],i=e[2],o=e[3],a=this.transitionsBetween(t,o),s=this.transitionsBetween(n,o),c=r.shiftPoint(t,n,4*(s+1)),u=r.shiftPoint(i,n,4*(a+1));a=this.transitionsBetween(c,o),s=this.transitionsBetween(u,o);var f=new j(o.getX()+(i.getX()-n.getX())/(a+1),o.getY()+(i.getY()-n.getY())/(a+1)),d=new j(o.getX()+(t.getX()-n.getX())/(s+1),o.getY()+(t.getY()-n.getY())/(s+1));return this.isValid(f)?this.isValid(d)?this.transitionsBetween(c,f)+this.transitionsBetween(u,f)>this.transitionsBetween(c,d)+this.transitionsBetween(u,d)?f:d:f:this.isValid(d)?d:null},r.prototype.shiftToModuleCenter=function(e){var t=e[0],n=e[1],i=e[2],o=e[3],a=this.transitionsBetween(t,o)+1,s=this.transitionsBetween(i,o)+1,c=r.shiftPoint(t,n,4*s),u=r.shiftPoint(i,n,4*a);!(1&~(a=this.transitionsBetween(c,o)+1))&&(a+=1),!(1&~(s=this.transitionsBetween(u,o)+1))&&(s+=1);var l,h,f=(t.getX()+n.getX()+i.getX()+o.getX())/4,d=(t.getY()+n.getY()+i.getY()+o.getY())/4;return t=r.moveAway(t,f,d),n=r.moveAway(n,f,d),i=r.moveAway(i,f,d),o=r.moveAway(o,f,d),c=r.shiftPoint(t,n,4*s),c=r.shiftPoint(c,o,4*a),l=r.shiftPoint(n,t,4*s),l=r.shiftPoint(l,i,4*a),u=r.shiftPoint(i,o,4*s),u=r.shiftPoint(u,n,4*a),h=r.shiftPoint(o,i,4*s),[c,l,u,h=r.shiftPoint(h,t,4*a)]},r.prototype.isValid=function(e){return e.getX()>=0&&e.getX()<this.image.getWidth()&&e.getY()>0&&e.getY()<this.image.getHeight()},r.sampleGrid=function(e,t,n,i,o,a,s){return wr.getInstance().sampleGrid(e,a,s,.5,.5,a-.5,.5,a-.5,s-.5,.5,s-.5,t.getX(),t.getY(),o.getX(),o.getY(),i.getX(),i.getY(),n.getX(),n.getY())},r.prototype.transitionsBetween=function(e,t){var n=Math.trunc(e.getX()),i=Math.trunc(e.getY()),o=Math.trunc(t.getX()),a=Math.trunc(t.getY()),s=Math.abs(a-i)>Math.abs(o-n);if(s){var c=n;n=i,i=c,c=o,o=a,a=c}for(var u=Math.abs(o-n),f=Math.abs(a-i),d=-u/2,l=i<a?1:-1,h=n<o?1:-1,p=0,C=this.image.get(s?i:n,s?n:i),A=n,S=i;A!==o;A+=h){var O=this.image.get(s?S:A,s?A:S);if(O!==C&&(p++,C=O),(d+=f)>
10){if(S===a)break;S+=l,d-=u}}return p},r}(),ur=function(){function r(){this.decoder=new Fa}return r.prototype.decode=function(e,t){var n,i;if(void 0===t&&(t=null),null!=t&&t.has(x.PURE_BARCODE)){var o=r.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(o),i=r.NO_POINTS}else{var a=new ka(e.getBlackMatrix()).detect();n=this.decoder.decode(a.getBits()),i=a.getPoints()}var s=n.getRawBytes(),c=new He(n.getText(),s,8*s.length,i,Z.DATA_MATRIX,le.currentTimeMillis()),u=n.getByteSegments();null!=u&&c.putMetadata(Ue.BYTE_SEGMENTS,u);var f=n.getECLevel();return null!=f&&c.putMetadata(Ue.ERROR_CORRECTION_LEVEL,f),c},r.prototype.reset=function(){},r.extractPureBits=function(e){var t=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(null==t||null==n)throw new N;var i=this.moduleSize(t,e),o=t[1],s=t[0],u=(n[0]-s+1)/i,f=(n[1]-o+1)/i;if(u<=0||f<=0)throw new N;var d=i/2;o+=d,s+=d;for(var l=new we(u,f),h=0;h<f;h++)for(var p=o+h*i,C=0;C<u;C++)e.get(s+C*i,p)&&l.set(C,h);return l},r.moduleSize=function(e,t){for(var n=t.getWidth(),i=e[0],o=e[1];i<n&&t.get(i,o);)i++;if(i===n)throw new N;var a=i-e[0];if(0===a)throw new N;return a},r.NO_POINTS=[],r}();var Ga=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),jt=(function(r){Ga(function e(t){return void 0===t&&(t=500),r.call(this,new ur,t)||this},r)}(kt),function(r){return r[r.L=0]="L",r[r.M=1]="M",r[r.Q=2]="Q",r[r.H=3]="H",r}(jt||{}));const Wt=function(){function r(e,t,n){this.value=e,this.stringValue=t,this.bits=n,r.FOR_BITS.set(n,this),r.FOR_VALUE.set(e,this)}return r.prototype.getValue=function(){return this.value},r.prototype.getBits=function(){return this.bits},r.fromString=function(e){switch(e){case"L":return r.L;case"M":return r.M;case"Q":return r.Q;case"H":return r.H;default:throw new J(e+"not available")}},r.prototype.toString=function(){return this.stringValue},r.prototype.equals=function(e){return e instanceof r&&this.value===e.value},r.forBits=function(e){if(e<0||e>=r.FOR_BITS.size)throw new X;return r.FOR_BITS.get(e)},r.FOR_BITS=new Map,r.FOR_VALUE=new Map,r.L=new r(jt.L,"L",1),r.M=new r(jt.M,"M",0),r.Q=new r(jt.Q,"Q",3),r.H=new r(jt.H,"H",2),r}(),_n=function(){function r(e){this.errorCorrectionLevel=Wt.forBits(e>>3&3),this.dataMask=7&e}return r.numBitsDiffering=function(e,t){return Q.bitCount(e^t)},r.decodeFormatInformation=function(e,t){var n=r.doDecodeFormatInformation(e,t);return null!==n?n:r.doDecodeFormatInformation(e^r.FORMAT_INFO_MASK_QR,t^r.FORMAT_INFO_MASK_QR)},r.doDecodeFormatInformation=function(e,t){var n,i,o=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r.FORMAT_INFO_DECODE_LOOKUP),c=s.next();!c.done;c=s.next()){var u=c.value,f=u[0];if(f===e||f===t)return new r(u[1]);var d=r.numBitsDiffering(e,f);d<o&&(a=u[1],o=d),e!==t&&(d=r.numBitsDiffering(t,f))<o&&(a=u[1],o=d)}}catch(l){n={error:l}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o<=3?new r(a):null},r.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},r.prototype.getDataMask=function(){return this.dataMask},r.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},r.prototype.equals=function(e){return e instanceof r&&(this.errorCorrectionLevel===e.errorCorrectionLevel&&this.dataMask===e.dataMask)},r.FORMAT_INFO_MASK_QR=21522,r.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])],r}(),b=function(){function r(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.ecCodewordsPerBlock=e,this.ecBlocks=t}return r.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},r.prototype.getNumBlocks=function(){var e,t,n=0,i=this.ecBlocks;try{for(var o=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(i),a=o.next();!a.done;a=o.next())n+=a.value.getCount()}catch(c){e={error:c}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},r.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},r.prototype.getECBlocks=function(){return this.ecBlocks},r}(),m=function(){function r(e,t){this.count=e,this.dataCodewords=t}return r.prototype.getCount=function(){return this.count},r.prototype.getDataCodewords=function(){return this.dataCodewords},r}(),Tt=function(){function r(e,t){for(var n,i,o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];this.versionNumber=e,this.alignmentPatternCenters=t,this.ecBlocks=o;var s=0,c=o[0].getECCodewordsPerBlock(),u=o[0].getECBlocks();try{for(var f=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(u),d=f.next();!d.done;d=f.next()){var l=d.value;s+=l.getCount()*(l.getDataCodewords()+c)}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}this.totalCodewords=s}return r.prototype.getVersionNumber=function(){return this.versionNumber},r.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},r.prototype.getTotalCodewords=function(){return this.totalCodewords},r.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},r.prototype.getECBlocksForLevel=function(e){return this.ecBlocks[e.getValue()]},r.getProvisionalVersionForDimension=function(e){if(e%4!=1)throw new y;try{return this.getVersionForNumber((e-17)/4)}catch{throw new y}},r.getVersionForNumber=function(e){if(e<1||e>40)throw new X;return r.VERSIONS[e-1]},r.decodeVersionInformation=function(e){for(var t=Number.MAX_SAFE_INTEGER,n=0,i=0;i<r.VERSION_DECODE_INFO.length;i++){var o=r.VERSION_DECODE_INFO[i];if(o===e)return r.getVersionForNumber(i+7);var a=_n.numBitsDiffering(e,o);
1a<t&&(n=i+7,t=a)}return t<=3?r.getVersionForNumber(n):null},r.prototype.buildFunctionPattern=function(){var e=this.getDimensionForVersion(),t=new we(e);t.setRegion(0,0,9,9),t.setRegion(e-8,0,8,9),t.setRegion(0,e-8,9,8);for(var n=this.alignmentPatternCenters.length,i=0;i<n;i++)for(var o=this.alignmentPatternCenters[i]-2,a=0;a<n;a++)0===i&&(0===a||a===n-1)||i===n-1&&0===a||t.setRegion(this.alignmentPatternCenters[a]-2,o,5,5);return t.setRegion(6,9,1,e-17),t.setRegion(9,6,e-17,1),this.versionNumber>6&&(t.setRegion(e-11,0,3,6),t.setRegion(0,e-11,6,3)),t},r.prototype.toString=function(){return""+this.versionNumber},r.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]),r.VERSIONS=[new r(1,new Int32Array(0),new b(7,new m(1,19)),new b(10,new m(1,16)),new b(13,new m(1,13)),new b(17,new m(1,9))),new r(2,Int32Array.from([6,18]),new b(10,new m(1,34)),new b(16,new m(1,28)),new b(22,new m(1,22)),new b(28,new m
1(1,16))),new r(3,Int32Array.from([6,22]),new b(15,new m(1,55)),new b(26,new m(1,44)),new b(18,new m(2,17)),new b(22,new m(2,13))),new r(4,Int32Array.from([6,26]),new b(20,new m(1,80)),new b(18,new m(2,32)),new b(26,new m(2,24)),new b(16,new m(4,9))),new r(5,Int32Array.from([6,30]),new b(26,new m(1,108)),new b(24,new m(2,43)),new b(18,new m(2,15),new m(2,16)),new b(22,new m(2,11),new m(2,12))),new r(6,Int32Array.from([6,34]),new b(18,new m(2,68)),new b(16,new m(4,27)),new b(24,new m(4,19)),new b(28,new m(4,15))),new r(7,Int32Array.from([6,22,38]),new b(20,new m(2,78)),new b(18,new m(4,31)),new b(18,new m(2,14),new m(4,15)),new b(26,new m(4,13),new m(1,14))),new r(8,Int32Array.from([6,24,42]),new b(24,new m(2,97)),new b(22,new m(2,38),new m(2,39)),new b(22,new m(4,18),new m(2,19)),new b(26,new m(4,14),new m(2,15))),new r(9,Int32Array.from([6,26,46]),new b(30,new m(2,116)),new b(22,new m(3,36),new m(2,37)),new b(20,new m(4,16),new m(4,17)),new b(24,new m(4,12),new m(4,13))),new r(10,Int32Array.from([6,28,50]),new b(18,new m(2,68),new m(2,69)),new b(26,new m(4,43),new m(1,44)),new b(24,new m(6,19),new m(2,20)),new b(28,new m
1(6,15),new m(2,16))),new r(11,Int32Array.from([6,30,54]),new b(20,new m(4,81)),new b(30,new m(1,50),new m(4,51)),new b(28,new m(4,22),new m(4,23)),new b(24,new m(3,12),new m(8,13))),new r(12,Int32Array.from([6,32,58]),new b(24,new m(2,92),new m(2,93)),new b(22,new m(6,36),new m(2,37)),new b(26,new m(4,20),new m(6,21)),new b(28,new m(7,14),new m(4,15))),new r(13,Int32Array.from([6,34,62]),new b(26,new m(4,107)),new b(22,new m(8,37),new m(1,38)),new b(24,new m(8,20),new m(4,21)),new b(22,new m(12,11),new m(4,12))),new r(14,Int32Array.from([6,26,46,66]),new b(30,new m(3,115),new m(1,116)),new b(24,new m(4,40),new m(5,41)),new b(20,new m(11,16),new m(5,17)),new b(24,new m(11,12),new m(5,13))),new r(15,Int32Array.from([6,26,48,70]),new b(22,new m(5,87),new m(1,88)),new b(24,new m(5,41),new m(5,42)),new b(30,new m(5,24),new m(7,25)),new b(24,new m(11,12),new m(7,13))),new r(16,Int32Array.from([6,26,50,74]),new b(24,new m(5,98),new m(1,99)),new b(28,new m(7,45),new m(3,46)),new b(24,new m(15,19),new m(2,20)),new b(30,new m(3,15),new m(13,16))),new r(17,Int32Array.from([6,30,54,78]),new b(28,new m
1(1,107),new m(5,108)),new b(28,new m(10,46),new m(1,47)),new b(28,new m(1,22),new m(15,23)),new b(28,new m(2,14),new m(17,15))),new r(18,Int32Array.from([6,30,56,82]),new b(30,new m(5,120),new m(1,121)),new b(26,new m(9,43),new m(4,44)),new b(28,new m(17,22),new m(1,23)),new b(28,new m(2,14),new m(19,15))),new r(19,Int32Array.from([6,30,58,86]),new b(28,new m(3,113),new m(4,114)),new b(26,new m(3,44),new m(11,45)),new b(26,new m(17,21),new m(4,22)),new b(26,new m(9,13),new m(16,14))),new r(20,Int32Array.from([6,34,62,90]),new b(28,new m(3,107),new m(5,108)),new b(26,new m(3,41),new m(13,42)),new b(30,new m(15,24),new m(5,25)),new b(28,new m(15,15),new m(10,16))),new r(21,Int32Array.from([6,28,50,72,94]),new b(28,new m(4,116),new m(4,117)),new b(26,new m(17,42)),new b(28,new m(17,22),new m(6,23)),new b(30,new m(19,16),new m(6,17))),new r(22,Int32Array.from([6,26,50,74,98]),new b(28,new m(2,111),new m(7,112)),new b(28,new m(17,46)),new b(30,new m(7,24),new m(16,25)),new b(24,new m(34,13))),new r(23,Int32Array.from([6,30,54,78,102]),new b(30,new m(4,121),new m(5,122)),new b(28,new m
1(4,47),new m(14,48)),new b(30,new m(11,24),new m(14,25)),new b(30,new m(16,15),new m(14,16))),new r(24,Int32Array.from([6,28,54,80,106]),new b(30,new m(6,117),new m(4,118)),new b(28,new m(6,45),new m(14,46)),new b(30,new m(11,24),new m(16,25)),new b(30,new m(30,16),new m(2,17))),new r(25,Int32Array.from([6,32,58,84,110]),new b(26,new m(8,106),new m(4,107)),new b(28,new m(8,47),new m(13,48)),new b(30,new m(7,24),new m(22,25)),new b(30,new m(22,15),new m(13,16))),new r(26,Int32Array.from([6,30,58,86,114]),new b(28,new m(10,114),new m(2,115)),new b(28,new m(19,46),new m(4,47)),new b(28,new m(28,22),new m(6,23)),new b(30,new m(33,16),new m(4,17))),new r(27,Int32Array.from([6,34,62,90,118]),new b(30,new m(8,122),new m(4,123)),new b(28,new m(22,45),new m(3,46)),new b(30,new m(8,23),new m(26,24)),new b(30,new m(12,15),new m(28,16))),new r(28,Int32Array.from([6,26,50,74,98,122]),new b(30,new m(3,117),new m(10,118)),new b(28,new m(3,45),new m(23,46)),new b(30,new m(4,24),new m(31,25)),new b(30,new m(11,15),new m(31,16))),new r(29,Int32Array.from([6,30,54,78,102,126]),new b(30,new m(7,116),new m(7,117)),new b(28,new m
1(21,45),new m(7,46)),new b(30,new m(1,23),new m(37,24)),new b(30,new m(19,15),new m(26,16))),new r(30,Int32Array.from([6,26,52,78,104,130]),new b(30,new m(5,115),new m(10,116)),new b(28,new m(19,47),new m(10,48)),new b(30,new m(15,24),new m(25,25)),new b(30,new m(23,15),new m(25,16))),new r(31,Int32Array.from([6,30,56,82,108,134]),new b(30,new m(13,115),new m(3,116)),new b(28,new m(2,46),new m(29,47)),new b(30,new m(42,24),new m(1,25)),new b(30,new m(23,15),new m(28,16))),new r(32,Int32Array.from([6,34,60,86,112,138]),new b(30,new m(17,115)),new b(28,new m(10,46),new m(23,47)),new b(30,new m(10,24),new m(35,25)),new b(30,new m(19,15),new m(35,16))),new r(33,Int32Array.from([6,30,58,86,114,142]),new b(30,new m(17,115),new m(1,116)),new b(28,new m(14,46),new m(21,47)),new b(30,new m(29,24),new m(19,25)),new b(30,new m(11,15),new m(46,16))),new r(34,Int32Array.from([6,34,62,90,118,146]),new b(30,new m(13,115),new m(6,116)),new b(28,new m(14,46),new m(23,47)),new b(30,new m(44,24),new m(7,25)),new b(30,new m(59,16),new m(1,17))),new r(35,Int32Array.from([6,30,54,78,102,126,150]),new b(30,new m(12,121),new m(7,122)),new b(28,new m
1(12,47),new m(26,48)),new b(30,new m(39,24),new m(14,25)),new b(30,new m(22,15),new m(41,16))),new r(36,Int32Array.from([6,24,50,76,102,128,154]),new b(30,new m(6,121),new m(14,122)),new b(28,new m(6,47),new m(34,48)),new b(30,new m(46,24),new m(10,25)),new b(30,new m(2,15),new m(64,16))),new r(37,Int32Array.from([6,28,54,80,106,132,158]),new b(30,new m(17,122),new m(4,123)),new b(28,new m(29,46),new m(14,47)),new b(30,new m(49,24),new m(10,25)),new b(30,new m(24,15),new m(46,16))),new r(38,Int32Array.from([6,32,58,84,110,136,162]),new b(30,new m(4,122),new m(18,123)),new b(28,new m(13,46),new m(32,47)),new b(30,new m(48,24),new m(14,25)),new b(30,new m(42,15),new m(32,16))),new r(39,Int32Array.from([6,26,54,82,110,138,166]),new b(30,new m(20,117),new m(4,118)),new b(28,new m(40,47),new m(7,48)),new b(30,new m(43,24),new m(22,25)),new b(30,new m(10,15),new m(67,16))),new r(40,Int32Array.from([6,30,58,86,114,142,170]),new b(30,new m(19,118),new m(6,119)),new b(28,new m(18,47),new m(31,48)),new b(30,new m(34,24),new m(34,25)),new b(30,new m(20,15),new m(61,16)))],r}();var Ge=function(r){return r[r.DATA_MASK_000=0]="DATA_MASK_000",r[r.DATA_MASK_001=1]="DATA_MASK_001",r[r.DATA_MASK_010=2]="DATA_MASK_010",r[r.DATA_MASK_011=3]="DATA_MASK_011",r[r.DATA_MASK_100=4]="DATA_MASK_100",r[r.DATA_MASK_101=5]="DATA_MASK_101",r[r.DATA_MASK_110=6]="DATA_MASK_110",r[r.DATA_MASK_111=7]="DATA_MASK_111",r}(Ge||{});const yn=function(){function r(e,t){this.value=e,this.isMasked=t}return r.prototype.unmaskBitMatrix=function(e,t){for(var n=0;n<t;n++)for(var i=0;i<t;i++)this.isMasked(n,i)&&e.flip(i,n)},r.values=new Map([[Ge.DATA_MASK_000,new r(Ge.DATA_MASK_000,function(e,t){return!(e+t&1)})],[Ge.DATA_MASK_001,new r(Ge.DATA_MASK_001,function(e,t){return!(1&e)})],[Ge.DATA_MASK_010,new r(Ge.DATA_MASK_010,function(e,t){return t%3==0})],[Ge.DATA_MASK_011,new r(Ge.DATA_MASK_011,function(e,t){return(e+t)%3==0})],[Ge.DATA_MASK_100,new r(Ge.DATA_MASK_100,function(e,t){return!(Math.floor(e/2)+Math.floor(t/3)&1)})],[Ge.DATA_MASK_101,new r(Ge.DATA_MASK_101,function(e,t){return e*t%6==0})],[Ge.DATA_MASK_110,new r(Ge.DATA_MASK_110,function(e,t){return e*t%6<3})],[Ge.DATA_MASK_111,new r(Ge.DATA_MASK_111,function(e,t){return!(e+t+e*t%3&1)})]]),r}(),Qa=function(){function r(e){var t=e.getHeight();if(t<21||1!=(3&t))throw new y;this.bitMatrix=e}return r.prototype.readFormatInformation=function(){if(null!=this.parsedFormatInfo)return this.parsedFormatInfo;for(var e=0,t=0;t<6;t++)e=this.copyBit(t,8,e);e=this.copyBit(7,8,e),e=this.copyBit(8,8,e),e=this.copyBit(8,7,e);for(var n=5;n>=0;n--)e=this.copyBit(8,n,e);var i=this.bitMatrix.getHeight(),o=0,a=i-7;for(n=i-1;n>=a;n--)o=this.copyBit(8,n,o);for(t=i-8;t<i;t++)o=this.copyBit(t,8,o);if(this.parsedFormatInfo=_n.decodeFormatInformation(e,o),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new y},r.prototype.readVersion=function(){if(null!=this.parsedVersion)return this.parsedVersion;var e=this.bitMatrix.getHeight(),t=Math.floor((e-17)/4);if(t<=6)return Tt.getVersionForNumber(t);for(var n=0,i=e-11,o=5;o>=0;o--)for(var a=e-9;a>=i;a--)n=this.copyBit(a,o,n);var s=Tt.decodeVersionInformation(n);if(null!==s&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;for(n=0,a=5;a>=0;a--)for(o=e-9;o>=i;o--)n=this.copyBit(a,o,n);if(null!==(s=Tt.decodeVersionInformation(n))&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;throw new y},r.prototype.copyBit=function(e,t,n){return(this.isMirror?this.bitMatrix.get(t,e):this.bitMatrix.get(e,t))?n<<1|1:n<<1},r.prototype.readCodewords=function(){var e=this.readFormatInformation(),t=this.readVersion(),n=yn.values.get(e.getDataMask()),i=this.bitMatrix.getHeight();n.unmaskBitMatrix(this.bitMatrix,i);for(var o=t.buildFunctionPattern(),a=!0,s=new Uint8Array(t.getTotalCodewords()),c=0,u=0,f=0,d=i-1;d>0;d-=2){6===d&&d--;for(var l=0;l<i;l++)for(var h=a?i-1-l:l,p=0;p<2;p++)o.get(d-p,h)||(f++,u<<=1,this.bitMatrix.get(d-p,h)&&(u|=1),8===f&&(s[c++]=u,f=0,u=0));a=!a}if(c!==t.getTotalCodewords())throw new y;return s},r.prototype.remask=function(){if(null!==this.parsedFormatInfo){var e=yn.values.get(this.parsedFormatInfo.getDataMask()),t=this.bitMatrix.getHeight();e.unmaskBitMatrix(this.bitMatrix,t)}},r.prototype.setMirror=function(e){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=e},r.prototype.mirror=function(){for(var e=this.bitMatrix,t=0,n=e.getWidth();t<n;t++)for(var i=t+1,o=e.getHeight();i<o;i++)e.get(t,i)!==e.get(i,t)&&(e.flip(i,t),e.flip(t,i))},r}();var mn=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const Ja=function(){function r(e,t){this.numDataCodewords=e,this.co
1dewords=t}return r.getDataBlocks=function(e,t,n){var i,o,a,s;if(e.length!==t.getTotalCodewords())throw new X;var c=t.getECBlocksForLevel(n),u=0,f=c.getECBlocks();try{for(var d=mn(f),l=d.next();!l.done;l=d.next())u+=(h=l.value).getCount()}catch(be){i={error:be}}finally{try{l&&!l.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}var p=new Array(u),C=0;try{for(var A=mn(f),S=A.next();!S.done;S=A.next())for(var h=S.value,O=0;O<h.getCount();O++){var D=h.getDataCodewords(),P=c.getECCodewordsPerBlock()+D;p[C++]=new r(D,new Uint8Array(P))}}catch(be){a={error:be}}finally{try{S&&!S.done&&(s=A.return)&&s.call(A)}finally{if(a)throw a.error}}for(var B=p[0].codewords.length,L=p.length-1;L>=0&&p[L].codewords.length!==B;)L--;L++;var Y=B-c.getECCodewordsPerBlock(),ne=0;for(O=0;O<Y;O++)for(var re=0;re<C;re++)p[re].codewords[O]=e[ne++];for(re=L;re<C;re++)p[re].codewords[Y]=e[ne++];var Te=p[0].codewords.length;for(O=Y;O<Te;O++)for(re=0;re<C;re++)p[re].codewords[re<L?O:O+1]=e[ne++];return p},r.prototype.getNumDataCodewords=function(){return this.numDataCodewords},r.prototype.getCodewords=function(){return this.codewords},r}();var st=function(r){return r[r.TERMINATOR=0]="TERMINATOR",r[r.NUMERIC=1]="NUMERIC",r[r.ALPHANUMERIC=2]="ALPHANUMERIC",r[r.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",r[r.BYTE=4]="BYTE",r[r.ECI=5]="ECI",r[r.KANJI=6]="KANJI",r[r.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",r[r.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",r[r.HANZI=9]="HANZI",r}(st||{});const Oe=function(){function r(e,t,n,i){this.value=e,this.stringValue=t,this.characterCountBitsForVersions=n,this.bits=i,r.FOR_BITS.set(i,this),r.FOR_VALUE.set(e,this)}return r.forBits=function(e){var t=r.FOR_BITS.get(e);if(void 0===t)throw new X;return t},r.prototype.getCharacterCountBits=function(e){var t=e.getVersionNumber();return this.characterCountBitsForVersions[t<=9?0:t<=26?1:2]},r.prototype.getValue=function(){return this.value},r.prototype.getBits=function(){return this.bits},r.prototype.equals=function(e){return e instanceof r&&this.value===e.value},r.prototype.toString=function(){return this.stringValue},r.FOR_BITS=new Map,r.FOR_VALUE=new Map,r.TERMINATOR=new r(st.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),r.NUMERIC=new r(st.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),r.ALPHANUMERIC=new r(st.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),r.STRUCTURED_APPEND=new r(st.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),r.BYTE=new r(st.BYTE,"BYTE",Int32Array.from([8,16,16]),4),r.ECI=new r(st.ECI,"ECI",Int32Array.from([0,0,0]),7),r.KANJI=new r(st.KANJI,"KANJI",Int32Array.from([8,10,12]),8),r.FNC1_FIRST_POSITION=new r(st.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),r.FNC1_SECOND_POSITION=new r(st.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),r.HANZI=new r(st.HANZI,"HANZI",Int32Array.from([8,10,12]),13),r}(),rs=function(){function r(){}return r.decode=function(e,t,n,i){var o=new xn(e),a=new K,s=new Array,c=-1,u=-1;try{var f=null,d=!1,l=void 0;do{if(o.available()<4)l=Oe.TERMINATOR;else{var h=o.readBits(4);l=Oe.forBits(h)}switch(l){case Oe.TERMINATOR:break;case Oe.FNC1_FIRST_POSITION:case Oe.FNC1_SECOND_POSITION:d=!0;break;case Oe.STRUCTURED_APPEND:if(o.available()<16)throw new y;c=o.readBits(8),u=o.readBits(8);break;case Oe.ECI:var p=r.parseECIValue(o);if(null===(f=F.getCharacterSetECIByValue(p)))throw new y;break;case Oe.HANZI:var C=o.readBits(4),A=o.readBits(l.getCharacterCountBits(t));C===r.GB2312_SUBSET&&r.decodeHanziSegment(o,a,A);break;default:var S=o.readBits(l.getCharacterCountBits(t));switch(l){case Oe.NUMERIC:r.decodeNumericSegment(o,a,S);break;case Oe.ALPHANUMERIC:r.decodeAlphanumericSegment(o,a,S,d);break;case Oe.BYTE:r.decodeByteSegment(o,a,S,f,s,i);break;case Oe.KANJI:r.decodeKanjiSegment(o,a,S);break;default:throw new y}}}while(l!==Oe.TERMINATOR)}catch{throw new y}return new tr(e,a.toString(),0===s.length?null:s,null===n?null:n.toString(),c,u)},r.decodeHanziSegment=function(e,t,n){if(13*n>e.available())throw new y;for(var i=new Uint8Array(2*n),o=0;n>0;){var a=e.readBits(13),s=a/96<<8&4294967295|a%96;i[o]=(s+=s<959?41377:42657)>>8&255,i[o+1]=255&s,o+=2,n--}try{t.append(me.decode(i,q.GB2312))}catch(c){throw new y(c)}},r.decodeKanjiSegment=function(e,t,n){if(13*n>e.available())throw new y;for(var i=new Uint8Array(2*n),o=0;n>0;){var a=e.readBits(13),s=a/192<<8&4294967295|a%192;i[o]=(s+=s<7936?33088:49472)>>8,i[o+1]=s,o+=2,n--}try{t.append(me.decode(i,q.SHIFT_JIS))}catch(c){throw new y(c)}},r.decodeByteSegment=function(e,t,n,i,o,a){if(8*n>e.available())throw new y;for(var s=new Uint8Array(n),c=0;c<n;c++)s[c]=e.readBits(8);var u;u=null===i?q.guessEncoding(s,a):i.getName();try{t.append(me.decode(s,u))}catch(f){throw new y(f)}o.push(s)},r.toAlphaNumericChar=function(e){if(e>=r.ALPHANUMERIC_CHARS.length)throw new y;return r.ALPHANUMERIC_CHARS[e]},r.decodeAlphanumericSegment=function(e,t,n,i){for(var o=t.length();n>1;){if(e.available()<11)throw new y;var a=e.readBits(11);t.append(r.toAlphaNumericChar(Math.floor(a/45))),t.append(r.toAlphaNumericChar(a%45)),n-=2}if(1===n){if(e.available()<6)throw new y;t.append(r.toAlphaNumericChar(e.readBits(6)))}if(i)for(var s=o;s<t.length();s++)"%"===t.charAt(s)&&(s<t.length()-1&&"%"===t.charAt(s+1)?t.deleteCharAt(s+1):t.setCharAt(s,"\x1d"))},r.decodeNumericSegment=function(e,t,n){for(;n>=3;){if(e.available()<10)throw new y;var i=e.readBits(10);if(i>=1e3)throw new y;t.append(r.toAlphaNumericChar(Math.floor(i/100))),t.append(r.toAlphaNumericChar(Math.floor(i/10)%10)),t.append(r.toAlphaNumericChar(i%10)),n-=3}if(2===n){if(e.available()<7)throw new y;var o=e.readBits(7);if(o>=100)throw new y;t.append(r.toAlphaNumericChar(Math.floor(o/10))),t.append(r.toAlphaNumericChar(o%10))}else if(1===n){if(e.available()<4)throw new y;var a=e.readBits(4);if(a>=10)throw new y;t.append(r.toAlphaNumericChar(a))}},r.parseECIValue=function(e){var t=e.readBits(8);if(!(128&t))return 127&t;if(128==(192&t))return(63&t)<<8&4294967295|e.readBits(8);if(192==(224&t))return(31&t)<<16&4294967295|e.readBits(16);throw new y},r.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",r.GB2312_SUBSET=1,r}(),Cn=function(){function r(e){this.mirrored=e}return r.prototype.isMirrored=function(){return this.mirrored},r.prototype.applyMirroredCorrection=function(e){if(this.mirrored&&null!==e&&!(e.length<3)){var t=e[0];e[0]=e[2],e[2]=t}},r}();var wn=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const os=function(){function r(){this.rsDecoder=new nr(Ke.QR_CODE_FIELD_256)}return r.prototype.decodeBooleanArray=function(e,t){return this.decodeBitMatrix(we.parseFromBooleanArray(e),t)},r.prototype.decodeBitMatrix=function(e,t){var n=new Qa(e),i=null;try{return this.decodeBitMatrixParser(n,t)}catch(a){i=a}try{n.remask(),n.setMirror(!0),n.readVersion(),n.readFormatInformation(),n.mirror();var o=this.decodeBitMatrixParser(n,t);return o.setOther(new Cn(!0)),o}catch(a){throw null!==i?i:a}},r.prototype.decodeBitMatrixParser=function(e,t){var n,i,o,a,s=e.readVersion(),c=e.readFormatInformation().getErrorCorrectionLevel(),u=e.readCodewords(),f=Ja.getDataBlocks(u,s,c),d=0;try{for(var l=wn(f),h=l.next();!h.done;h=l.next())d+=(p=h.value).getNumDataCodewords()}catch(L){n={error:L}}finally{try{h&&!h.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}var C=new Uint8Array(d),A=0;try{for(var S=wn(f),O=S.next();!O.done;O=S.next()){var p,D=(p=O.value).getCodewords(),P=p.getNumDataCodewords();this.correctErrors(D,P);for(var B=0;B<P;B++)C[A++]=D[B]}}catch(L){o={error:L}}finally{try{O&&!O.done&&(a=S.return)&&a.call(S)}finally{if(o)throw o.error}}return rs.decode(C,s,c,t)},r.prototype.correctErrors=function(e,t){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-t)}catch{throw new Ie}for(var i=0;i<t;i++)e[i]=n[i]},r}();var as=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const cs=function(r){function e(t,n,i){var o=r.call(this,t,n)||this;return o.estimatedModuleSize=i,o}return as(e,r),e.prototype.aboutEquals=function(t,n,i){if(Math.abs(n-this.getY())<=t&&Math.abs(i-this.getX())<=t){var o=Math.abs(t-this.estimatedModuleSize);return o<=1||o<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,n,i){return new e((this.getX()+n)/2,(this.getY()+t)/2,(this.estimatedModuleSize+i)/2)},e}(j),ds=function(){function r(e,t,n,i,o,a,s){this.image=e,this.startX=t,this.startY=n,this.width=i,this.height=o,this.moduleSize=a,this.resultPointCallback=s,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return r.prototype.find=function(){for(var e=this.startX,t=this.height,i=e+this.width,o=this.startY+t/2,a=new Int32Array(3),s=this.image,c=0;c<t;c++){var u=o+(1&c?-Math.floor((c+1)/2):Math.floor((c+1)/2));a[0]=0,a[1]=0,a[2]=0;for(var f=e;f<i&&!s.get(f,u);
1)f++;for(var d=0;f<i;){if(s.get(f,u))if(1===d)a[1]++;else if(2===d){var l;if(this.foundPatternCross(a)&&null!==(l=this.handlePossibleCenter(a,u,f)))return l;a[0]=a[2],a[1]=1,a[2]=0,d=1}else a[++d]++;else 1===d&&d++,a[d]++;f++}if(this.foundPatternCross(a)&&null!==(l=this.handlePossibleCenter(a,u,i)))return l}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new N},r.centerFromEnd=function(e,t){return t-e[2]-e[1]/2},r.prototype.foundPatternCross=function(e){for(var t=this.moduleSize,n=t/2,i=0;i<3;i++)if(Math.abs(t-e[i])>=n)return!1;return!0},r.prototype.crossCheckVertical=function(e,t,n,i){var o=this.image,a=o.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var c=e;c>=0&&o.get(t,c)&&s[1]<=n;)s[1]++,c--;if(c<0||s[1]>n)return NaN;for(;c>=0&&!o.get(t,c)&&s[0]<=n;)s[0]++,c--;if(s[0]>n)return NaN;for(c=e+1;c<a&&o.get(t,c)&&s[1]<=n;)s[1]++,c++;if(c===a||s[1]>n)return NaN;for(;c<a&&!o.get(t,c)&&s[2]<=n;)s[2]++,c++;return s[2]>n||5*Math.abs(s[0]+s[1]+s[2]-i)>=2*i?NaN:this.foundPatternCross(s)?r.centerFromEnd(s,c):NaN},r.prototype.handlePossibleCenter=function(e,t,n){var i,o,a=e[0]+e[1]+e[2],s=r.centerFromEnd(e,n),c=this.crossCheckVertical(t,s,2*e[1],a);if(!isNaN(c)){var u=(e[0]+e[1]+e[2])/3;try{for(var f=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.possibleCenters),d=f.next();!d.done;d=f.next()){var l=d.value;if(l.aboutEquals(u,c,s))return l.combineEstimate(c,s,u)}}catch(p){i={error:p}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}var h=new cs(s,c,u);this.possibleCenters.push(h),null!=this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(h)}return null},r}();var ls=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const vs=function(r){function e(t,n,i,o){var a=r.call(this,t,n)||this;return a.estimatedModuleSize=i,a.count=o,void 0===o&&(a.count=1),a}return ls(e,r),e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(t,n,i){if(Math.abs(n-this.getY())<=t&&Math.abs(i-this.getX())<=t){var o=Math.abs(t-this.estimatedModuleSize);return o<=1||o<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,n,i){var o=this.count+1;return new e((this.count*this.getX()+n)/o,(this.count*this.getY()+t)/o,(this.count*this.estimatedModuleSize+i)/o,o)},e}(j),gs=function(){function r(e){this.bottomLeft=e[0],this.topLeft=e[1],this.topRight=e[2]}return r.prototype.getBottomLeft=function(){return this.bottomLeft},r.prototype.getTopLeft=function(){return this.topLeft},r.prototype.getTopRight=function(){return this.topRight},r}();var Yt=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const _s=function(){function r(e,t){this.image=e,this.resultPointCallback=t,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=t}return r.prototype.getImage=function(){return this.image},r.prototype.getPossibleCenters=function(){return this.possibleCenters},r.prototype.find=function(e){var t=null!=e&&void 0!==e.get(x.TRY_HARDER),n=null!=e&&void 0!==e.get(x.PURE_BARCODE),i=this.image,o=i.getHeight(),a=i.getWidth(),s=Math.floor(3*o/(4*r.MAX_MODULES));(s<r.MIN_SKIP||t)&&(s=r.MIN_SKIP);for(var c=!1,u=new Int32Array(5),f=s-1;f<o&&!c;f+=s){u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0;for(var d=0,l=0;l<a;l++)if(i.get(l,f))!(1&~d)&&d++,u[d]++;else if(1&d)u[d]++;else if(4===d)if(r.foundPatternCross(u)){if(!0!==this.handlePossibleCenter(u,f,l,n)){u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,d=3;continue}if(s=2,!0===this.hasSkipped)c=this.haveMultiplyConfirmedCenters();else{var p=this.findRowSkip();p>u[2]&&(f+=p-u[2]-s,l=a-1)}d=0,u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0}else u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,d=3;else u[++d]++;r.foundPatternCross(u)&&!0===this.handlePossibleCenter(u,f,a,n)&&(s=u[0],this.hasSkipped&&(c=this.haveMultiplyConfirmedCenters()))}var C=this.selectBestPatterns();return j.orderBestPatterns(C),new gs(C)},r.centerFromEnd=function(e,t){return t-e[4]-e[3]-e[2]/2},r.foundPatternCross=function(e){for(var t=0,n=0;n<5;n++){var i=e[n];if(0===i)return!1;t+=i}if(t<7)return!1;var o=t/7,a=o/2;return Math.abs(o-e[0])<a&&Math.abs(o-e[1])<a&&Math.abs(3*o-e[2])<3*a&&Math.abs(o-e[3])<a&&Math.abs(o-e[4])<a},r.prototype.getCrossCheckStateCount=function(){var e=this.crossCheckStateCount;return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e},r.prototype.crossCheckDiagonal=function(e,t,n,i){for(var o=this.getCrossCheckStateCount(),a=0,s=this.image;e>=a&&t>=a&&s.get(t-a,e-a);)o[2]++,a++;if(e<a||t<a)return!1;for(;e>=a&&t>=a&&!s.get(t-a,e-a)&&o[1]<=n;)o[1]++,a++;if(e<a||t<a||o[1]>n)return!1;for(;e>=a&&t>=a&&s.get(t-a,e-a)&&o[0]<=n;)o[0]++,a++;if(o[0]>n)return!1;var c=s.getHeight(),u=s.getWidth();for(a=1;
1e+a<c&&t+a<u&&s.get(t+a,e+a);)o[2]++,a++;if(e+a>=c||t+a>=u)return!1;for(;e+a<c&&t+a<u&&!s.get(t+a,e+a)&&o[3]<n;)o[3]++,a++;if(e+a>=c||t+a>=u||o[3]>=n)return!1;for(;e+a<c&&t+a<u&&s.get(t+a,e+a)&&o[4]<n;)o[4]++,a++;return!(o[4]>=n)&&Math.abs(o[0]+o[1]+o[2]+o[3]+o[4]-i)<2*i&&r.foundPatternCross(o)},r.prototype.crossCheckVertical=function(e,t,n,i){for(var o=this.image,a=o.getHeight(),s=this.getCrossCheckStateCount(),c=e;c>=0&&o.get(t,c);)s[2]++,c--;if(c<0)return NaN;for(;c>=0&&!o.get(t,c)&&s[1]<=n;)s[1]++,c--;if(c<0||s[1]>n)return NaN;for(;c>=0&&o.get(t,c)&&s[0]<=n;)s[0]++,c--;if(s[0]>n)return NaN;for(c=e+1;c<a&&o.get(t,c);)s[2]++,c++;if(c===a)return NaN;for(;c<a&&!o.get(t,c)&&s[3]<n;)s[3]++,c++;if(c===a||s[3]>=n)return NaN;for(;c<a&&o.get(t,c)&&s[4]<n;)s[4]++,c++;return s[4]>=n||5*Math.abs(s[0]+s[1]+s[2]+s[3]+s[4]-i)>=2*i?NaN:r.foundPatternCross(s)?r.centerFromEnd(s,c):NaN},r.prototype.crossCheckHorizontal=function(e,t,n,i){for(var o=this.image,a=o.getWidth(),s=this.getCrossCheckStateCount(),c=e;c>=0&&o.get(c,t);)s[2]++,c--;if(c<0)return NaN;for(;c>=0&&!o.get(c,t)&&s[1]<=n;)s[1]++,c--;if(c<0||s[1]>n)return NaN;for(;c>=0&&o.get(c,t)&&s[0]<=n;)s[0]++,c--;if(s[0]>n)return NaN;for(c=e+1;c<a&&o.get(c,t);)s[2]++,c++;if(c===a)return NaN;for(;c<a&&!o.get(c,t)&&s[3]<n;)s[3]++,c++;if(c===a||s[3]>=n)return NaN;for(;c<a&&o.get(c,t)&&s[4]<n;)s[4]++,c++;return s[4]>=n||5*Math.abs(s[0]+s[1]+s[2]+s[3]+s[4]-i)>=i?NaN:r.foundPatternCross(s)?r.centerFromEnd(s,c):NaN},r.prototype.handlePossibleCenter=function(e,t,n,i){var o=e[0]+e[1]+e[2]+e[3]+e[4],a=r.centerFromEnd(e,n),s=this.crossCheckVertical(t,Math.floor(a),e[2],o);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),e[2],o),!isNaN(a)&&(!i||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),e[2],o)))){for(var c=o/7,u=!1,f=this.possibleCenters,d=0,l=f.length;d<l;d++){var h=f[d];if(h.aboutEquals(c,s,a)){f[d]=h.combineEstimate(s,a,c),u=!0;break}}if(!u){var p=new vs(a,s,c);f.push(p),null!=this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},r.prototype.findRowSkip=function(){var e,t;if(this.possibleCenters.length<=1)return 0;var i=null;try{for(var o=Yt(this.possibleCenters),a=o.next();!a.done;a=o.next()){var s=a.value;if(s.getCount()>=r.CENTER_QUORUM){if(null!=i)return this.hasSkipped=!0,Math.floor((Math.abs(i.getX()-s.getX())-Math.abs(i.getY()-s.getY()))/2);i=s}}}catch(c){e={error:c}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return 0},r.prototype.haveMultiplyConfirmedCenters=function(){var e,t,n,i,o=0,a=0,s=this.possibleCenters.length;try{for(var c=Yt(this.possibleCenters),u=c.next();!u.done;u=c.next())(f=u.value).getCount()>=r.CENTER_QUORUM&&(o++,a+=f.getEstimatedModuleSize())}catch(C){e={error:C}}finally{try{u&&!u.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}if(o<3)return!1;var d=a/s,l=0;try{for(var h=Yt(this.possibleCenters),p=h.next();!p.done;p=h.next()){var f=p.value;l+=Math.abs(f.getEstimatedModuleSize()-d)}}catch(C){n={error:C}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}return l<=.05*a},r.prototype.selectBestPatterns=function(){var e,t,n,i,o=this.possibleCenters.length;if(o<3)throw new N;var s,a=this.possibleCenters;if(o>3){var c=0,u=0;try{for(var f=Yt(this.possibleCenters),d=f.next();!d.done;d=f.next()){var h=d.value.getEstimatedModuleSize();c+=h,u+=h*h}}catch(B){e={error:B}}finally{try{d&&!d.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}s=c/o;var p=Math.sqrt(u/o-s*s);a.sort(function(B,L){var U=Math.abs(L.getEstimatedModuleSize()-s),Y=Math.abs(B.getEstimatedModuleSize()-s);return U<Y?-1:U>Y?1:0});for(var C=Math.max(.2*s,p),A=0;A<a.length&&a.length>3;A++)Math.abs(a[A].getEstimatedModuleSize()-s)>C&&(a.splice(A,1),A--)}if(a.length>3){c=0;try{for(var O=Yt(a),D=O.next();!D.done;D=O.next())c+=D.value.getEstimatedModuleSize()}catch(L){n={error:L}}finally{try{D&&!D.done&&(i=O.return)&&i.call(O)}finally{if(n)throw n.error}}s=c/a.length,a.sort(function(L,U){if(U.getCount()===L.getCount()){var Y=Math.abs(U.getEstimatedModuleSize()-s),ne=Math.abs(L.getEstimatedModuleSize()-s);return Y<ne?1:Y>ne?-1:0}return U.getCount()-L.getCount()}),a.splice(3)}return[a[0],a[1],a[2]]},r.CENTER_QUORUM=2,r.MIN_SKIP=3,r.MAX_MODULES=57,r}(),ms=function(){function r(e){this.image=e}return r.prototype.getImage=function(){return this.image},r.prototype.getResultPointCallback=function(){return this.resultPointCallback},r.prototype.detect=function(e){this.resultPointCallback=null==e?null:e.get(x.NEED_RESULT_POINT_CALLBACK);var n=new _s(this.image,this.resultPointCallback).find(e);return this.processFinderPatternInfo(n)}
1,r.prototype.processFinderPatternInfo=function(e){var t=e.getTopLeft(),n=e.getTopRight(),i=e.getBottomLeft(),o=this.calculateModuleSize(t,n,i);if(o<1)throw new N("No pattern found in proccess finder.");var a=r.computeDimension(t,n,i,o),s=Tt.getProvisionalVersionForDimension(a),c=s.getDimensionForVersion()-7,u=null;if(s.getAlignmentPatternCenters().length>0)for(var f=n.getX()-t.getX()+i.getX(),d=n.getY()-t.getY()+i.getY(),l=1-3/c,h=Math.floor(t.getX()+l*(f-t.getX())),p=Math.floor(t.getY()+l*(d-t.getY())),C=4;C<=16;C<<=1)try{u=this.findAlignmentInRegion(o,h,p,C);break}catch(D){if(!(D instanceof N))throw D}var A=r.createTransform(t,n,i,u,a),S=r.sampleGrid(this.image,A,a);return new mr(S,null===u?[i,t,n]:[i,t,n,u])},r.createTransform=function(e,t,n,i,o){var s,c,u,f,a=o-3.5;return null!==i?(s=i.getX(),c=i.getY(),f=u=a-3):(s=t.getX()-e.getX()+n.getX(),c=t.getY()-e.getY()+n.getY(),u=a,f=a),$r.quadrilateralToQuadrilateral(3.5,3.5,a,3.5,u,f,3.5,a,e.getX(),e.getY(),t.getX(),t.getY(),s,c,n.getX(),n.getY())},r.sampleGrid=function(e,t,n){return wr.getInstance().sampleGridWithTransform(e,n,n,t)},r.computeDimension=function(e,t,n,i){var o=he.round(j.distance(e,t)/i),a=he.round(j.distance(e,n)/i),s=Math.floor((o+a)/2)+7;switch(3&s){case 0:s++;break;case 2:s--;break;case 3:throw new N("Dimensions could be not found.")}return s},r.prototype.calculateModuleSize=function(e,t,n){return(this.calculateModuleSizeOneWay(e,t)+this.calculateModuleSizeOneWay(e,n))/2},r.prototype.calculateModuleSizeOneWay=function(e,t){var n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY())),i=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY()));return isNaN(n)?i/7:isNaN(i)?n/7:(n+i)/14},r.prototype.sizeOfBlackWhiteBlackRunBothWays=function(e,t,n,i){var o=this.sizeOfBlackWhiteBlackRun(e,t,n,i),a=1,s=e-(n-e);s<0?(a=e/(e-s),s=0):s>=this.image.getWidth()&&(a=(this.image.getWidth()-1-e)/(s-e),s=this.image.getWidth()-1);var c=Math.floor(t-(i-t)*a);return a=1,c<0?(a=t/(t-c),c=0):c>=this.image.getHeight()&&(a=(this.image.getHeight()-1-t)/(c-t),c=this.image.getHeight()-1),s=Math.floor(e+(s-e)*a),(o+=this.sizeOfBlackWhiteBlackRun(e,t,s,c))-1},r.prototype.sizeOfBlackWhiteBlackRun=function(e,t,n,i){var o=Math.abs(i-t)>Math.abs(n-e);if(o){var a=e;e=t,t=a,a=n,n=i,i=a}for(var s=Math.abs(n-e),c=Math.abs(i-t),u=-s/2,f=e<n?1:-1,d=t<i?1:-1,l=0,h=n+f,p=e,C=t;p!==h;p+=f){if(1===l===this.image.get(o?C:p,o?p:C)){if(2===l)return he.distance(p,C,e,t);l++}if((u+=c)>0){if(C===i)break;C+=d,u-=s}}return 2===l?he.distance(n+f,i,e,t):NaN},r.prototype.findAlignmentInRegion=function(e,t,n,i){var o=Math.floor(i*e),a=Math.max(0,t-o),s=Math.min(this.image.getWidth()-1,t+o);if(s-a<3*e)throw new N("Alignment top exceeds estimated module size.");var c=Math.max(0,n-o),u=Math.min(this.image.getHeight()-1,n+o);if(u-c<3*e)throw new N("Alignment bottom exceeds estimated module size.");return new ds(this.image,a,c,s-a,u-c,e,this.resultPointCallback).find()},r}(),fr=function(){function r(){this.decoder=new os}return r.prototype.getDecoder=function(){return this.decoder},r.prototype.decode=function(e,t){var n,i;if(null!=t&&void 0!==t.get(x.PURE_BARCODE)){var o=r.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(o,t),i=r.NO_POINTS}else{var a=new ms(e.getBlackMatrix()).detect(t);n=this.decoder.decodeBitMatrix(a.getBits(),t),i=a.getPoints()}n.getOther()instanceof Cn&&n.getOther().applyMirroredCorrection(i);var s=new He(n.getText(),n.getRawBytes(),void 0,i,Z.QR_CODE,void 0),c=n.getByteSegments();null!==c&&s.putMetadata(Ue.BYTE_SEGMENTS,c);var u=n.getECLevel();return null!==u&&s.putMetadata(Ue.ERROR_CORRECTION_LEVEL,u),n.hasStructuredAppend()&&(s.putMetadata(Ue.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(Ue.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},r.prototype.reset=function(){},r.extractPureBits=function(e){var t=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(null===t||null===n)throw new N;var i=this.moduleSize(t,e),o=t[1],a=n[1],s=t[0],c=n[0];if(s>=c||o>=a)throw new N;if(a-o!=c-s&&(c=s+(a-o))>=e.getWidth())throw new N;var u=Math.round((c-s+1)/i),f=Math.round((a-o+1)/i);if(u<=0||f<=0)throw new N;if(f!==u)throw new N;var d=Math.floor(i/2);o+=d;var l=(s+=d)+Math.floor((u-1)*i)-c;if(l>0){if(l>d)throw new N;s-=l}var h=o+Math.floor((f-1)*i)-a;if(h>0){if(h>d)throw new N;o-=h}for(var p=new we(u,f),C=0;C<f;C++)for(var A=o+Math.floor(C*i),S=0;S<u;S++)e.get(s+Math.floor(S*i),A)&&p.set(S,C);return p},r.moduleSize=function(e,t){for(var n=t.getHeight(),i=t.getWidth(),o=e[0],a=e[1],s=!0,c=0;o<i&&a<n;){if(s!==t.get(o,a)){if(5==++c)break;s=!s}o++,a++}if(o===i||a===n)throw new N;return(o-e[0])/7},r.NO_POINTS=new Array,r}(),fe=function(){function r(){}return r.prototype.PDF417Common=function(){},r.getBitCountSum=function(e){return he.sum(e)},r.toIntArray=function(e){var t,n;if(null==e||!e.length)return r.EMPTY_INT_ARRAY;var i=new Int32Array(e.length),o=0;try{for(var a=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),s=a.next();!s.done;s=a.next())i[o++]=s.value}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},r.getCodeword=function(e){var t=te.binarySearch(r.SYMBOL_TABLE,262143&e);return t<0?-1:(r.CODEWORD_TABLE[t]-1)%r.NUMBER_OF_CODEWORDS},r.MAX_CODEWORDS_IN_BARCODE=(r.NUMBER_OF_CODEWORDS=929)-1,r.MIN_ROWS_IN_BARCODE=3,r.MAX_ROWS_IN_BARCODE=90,r.MODULES_IN_CODEWORD=17,r.MODULES_IN_STOP_PATTERN=18,r.BARS_IN_MODULE=8,r.EMPTY_INT_ARRAY=new Int32Array([]),r
vendor: 18,272 bytes, line 1
1.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]),
1r
vendor: 12,860 bytes, line 1
1.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])
1,r}(),Os=function(){function r(e,t){this.bits=e,this.points=t}return r.prototype.getBits=function(){return this.bits},r.prototype.getPoints=function(){return this.points},r}();var Ss=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const bs=function(){function r(){}return r.detectMultiple=function(e,t,n){var i=e.getBlackMatrix(),o=r.detect(n,i);return o.length||((i=i.clone()).rotate180(),o=r.detect(n,i)),new Os(i,o)},r.detect=function(e,t){for(var n,i,o=new Array,a=0,s=0,c=!1;a<t.getHeight();){var u=r.findVertices(t,a,s);if(null!=u[0]||null!=u[3]){if(c=!0,o.push(u),!e)break;null!=u[2]?(s=Math.trunc(u[2].getX()),a=Math.trunc(u[2].getY())):(s=Math.trunc(u[4].getX()),a=Math.trunc(u[4].getY()))}else{if(!c)break;c=!1,s=0;try{for(var f=(n=void 0,Ss(o)),d=f.next();!d.done;d=f.next()){var l=d.value;null!=l[1]&&(a=Math.trunc(Math.max(a,l[1].getY()))),null!=l[3]&&(a=Math.max(a,Math.trunc(l[3].getY())))}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}a+=r.ROW_STEP}}return o},r.findVertices=function(e,t,n){var i=e.getHeight(),o=e.getWidth(),a=new Array(8);return r.copyToResult(a,r.findRowsWithPattern(e,i,o,t,n,r.START_PATTERN),r.INDEXES_START_PATTERN),null!=a[4]&&(n=Math.trunc(a[4].getX()),t=Math.trunc(a[4].getY())),r.copyToResult(a,r.findRowsWithPattern(e,i,o,t,n,r.STOP_PATTERN),r.INDEXES_STOP_PATTERN),a},r.copyToResult=function(e,t,n){for(var i=0;i<n.length;i++)e[n[i]]=t[i]},r.findRowsWithPattern=function(e,t,n,i,o,a){for(var s=new Array(4),c=!1,u=new Int32Array(a.length);i<t;i+=r.ROW_STEP)if(null!=(f=r.findGuardPattern(e,o,i,n,!1,a,u))){for(;i>0;){if(null==(d=r.findGuardPattern(e,o,--i,n,!1,a,u))){i++;break}f=d}s[0]=new j(f[0],i),s[1]=new j(f[1],i),c=!0;break}var l=i+1;if(c){for(var h=0,d=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);l<t;l++){var f;if(null!=(f=r.findGuardPattern(e,d[0],l,n,!1,a,u))&&Math.abs(d[0]-f[0])<r.MAX_PATTERN_DRIFT&&Math.abs(d[1]-f[1])<r.MAX_PATTERN_DRIFT)d=f,h=0;else{if(h>r.SKIPPED_ROW_COUNT_MAX)break;h++}}s[2]=new j(d[0],l-=h+1),s[3]=new j(d[1],l)}return l-i<r.BARCODE_MIN_HEIGHT&&te.fill(s,null),s},r.findGuardPattern=function(e,t,n,i,o,a,s){te.fillWithin(s,0,s.length,0);for(var c=t,u=0;e.get(c,n)&&c>0&&u++<r.MAX_PIXEL_DRIFT;)c--;for(var f=c,d=0,l=a.length,h=o;f<i;f++)if(e.get(f,n)!==h)s[d]++;else{if(d===l-1){if(r.patternMatchVariance(s,a,r.MAX_INDIVIDUAL_VARIANCE)<r.MAX_AVG_VARIANCE)return new Int32Array([c,f]);c+=s[0]+s[1],le.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,h=!h}return d===l-1&&r.patternMatchVariance(s,a,r.MAX_INDIVIDUAL_VARIANCE)<r.MAX_AVG_VARIANCE?new Int32Array([c,f-1]):null},r.patternMatchVariance=function(e,t,n){for(var i=e.length,o=0,a=0,s=0;s<i;s++)o+=e[s],a+=t[s];if(o<a)return 1/0;var c=o/a;n*=c;for(var u=0,f=0;f<i;f++){var d=e[f],l=t[f]*c,h=d>l?d-l:l-d;if(h>n)return 1/0;u+=h}return u/o},r.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),r.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),r.MAX_AVG_VARIANCE=.42,r.MAX_INDIVIDUAL_VARIANCE=.8,r.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),r.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),r.MAX_PIXEL_DRIFT=3,r.MAX_PATTERN_DRIFT=5,r.SKIPPED_ROW_COUNT_MAX=25,r.ROW_STEP=5,r.BARCODE_MIN_HEIGHT=10,r}(),Pt=function(){function r(e,t){if(0===t.length)throw new X;this.field=e;var n=t.length;if(n>1&&0===t[0]){for(var i=1;i<n&&0===t[i];)i++;i===n?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(n-i),le.arraycopy(t,i,this.coefficients,0,this.coefficients.length))}else this.coefficients=t}return r.prototype.getCoefficients=function(){return this.coefficients},r.prototype.getDegree=function(){return this.coefficients.length-1},r.prototype.isZero=function(){return 0===this.coefficients[0]},r.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},r.prototype.evaluateAt=function(e){var t,n;if(0===e)return this.getCoefficient(0);if(1===e){var i=0;try{for(var o=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.coefficients),a=o.next();!a.done;a=o.next())i=this.field.add(i,a.value)}catch(d){t={error:d}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}for(var c=this.coefficients[0],u=this.coefficients.length,f=1;f<u;f++)c=this.field.add(this.field.multiply(e,c),this.coefficients[f]);return c},r.prototype.add=function(e){if(!this.field.equals(e.field))throw new X("ModulusPolys do n
1ot have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var t=this.coefficients,n=e.coefficients;if(t.length>n.length){var i=t;t=n,n=i}var o=new Int32Array(n.length),a=n.length-t.length;le.arraycopy(n,0,o,0,a);for(var s=a;s<n.length;s++)o[s]=this.field.add(t[s-a],n[s]);return new r(this.field,o)},r.prototype.subtract=function(e){if(!this.field.equals(e.field))throw new X("ModulusPolys do not have same ModulusGF field");return e.isZero()?this:this.add(e.negative())},r.prototype.multiply=function(e){return e instanceof r?this.multiplyOther(e):this.multiplyScalar(e)},r.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new X("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new r(this.field,new Int32Array([0]));for(var t=this.coefficients,n=t.length,i=e.coefficients,o=i.length,a=new Int32Array(n+o-1),s=0;s<n;s++)for(var c=t[s],u=0;u<o;u++)a[s+u]=this.field.add(a[s+u],this.field.multiply(c,i[u]));return new r(this.field,a)},r.prototype.negative=function(){for(var e=this.coefficients.length,t=new Int32Array(e),n=0;n<e;n++)t[n]=this.field.subtract(0,this.coefficients[n]);return new r(this.field,t)},r.prototype.multiplyScalar=function(e){if(0===e)return new r(this.field,new Int32Array([0]));if(1===e)return this;for(var t=this.coefficients.length,n=new Int32Array(t),i=0;i<t;i++)n[i]=this.field.multiply(this.coefficients[i],e);return new r(this.field,n)},r.prototype.multiplyByMonomial=function(e,t){if(e<0)throw new X;if(0===t)return new r(this.field,new Int32Array([0]));for(var n=this.coefficients.length,i=new Int32Array(n+e),o=0;o<n;o++)i[o]=this.field.multiply(this.coefficients[o],t);return new r(this.field,i)},r.prototype.toString=function(){for(var e=new K,t=this.getDegree();t>=0;t--){var n=this.getCoefficient(t);0!==n&&(n<0?(e.append(" - "),n=-n):e.length()>0&&e.append(" + "),(0===t||1!==n)&&e.append(n),0!==t&&(1===t?e.append("x"):(e.append("x^"),e.append(t))))}return e.toString()},r}(),Ms=function(){function r(){}return r.prototype.add=function(e,t){return(e+t)%this.modulus},r.prototype.subtract=function(e,t){return(this.modulus+e-t)%this.modulus},r.prototype.exp=function(e){return this.expTable[e]},r.prototype.log=function(e){if(0===e)throw new X;return this.logTable[e]},r.prototype.inverse=function(e){if(0===e)throw new Zr;return this.expTable[this.modulus-this.logTable[e]-1]},r.prototype.multiply=function(e,t){return 0===e||0===t?0:this.expTable[(this.logTable[e]+this.logTable[t])%(this.modulus-1)]},r.prototype.getSize=function(){return this.modulus},r.prototype.equals=function(e){return e===this},r}();var Rs=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Bs=function(r){function e(t,n){var i=r.call(this)||this;i.modulus=t,i.expTable=new Int32Array(t),i.logTable=new Int32Array(t);for(var o=1,a=0;a<t;a++)i.expTable[a]=o,o=o*n%t;for(a=0;a<t-1;a++)i.logTable[i.expTable[a]]=a;return i.zero=new Pt(i,new Int32Array([0])),i.one=new Pt(i,new Int32Array([1])),i}return Rs(e,r),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,n){if(t<0)throw new X;if(0===n)return this.zero;var i=new Int32Array(t+1);return i[0]=n,new Pt(this,i)},e.PDF417_GF=new e(fe.NUMBER_OF_CODEWORDS,3),e}(Ms),ks=function(){function r(){this.field=Bs.PDF417_GF}return r.prototype.decode=function(e,t,n){for(var i,o,a=new Pt(this.field,e),s=new Int32Array(t),c=!1,u=t;u>0;u--){var f=a.evaluateAt(this.field.exp(u));s[t-u]=f,0!==f&&(c=!0)}if(!c)return 0;var d=this.field.getOne();if(null!=n)try{for(var l=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),h=l.next();!h.done;h=l.next()){var C=this.field.exp(e.length-1-h.value),A=new Pt(this.field,new Int32Array([this.field.subtract(0,C),1]));d=d.multiply(A)}}catch(Y){i={error:Y}}
1finally{try{h&&!h.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}var S=new Pt(this.field,s),O=this.runEuclideanAlgorithm(this.field.buildMonomial(t,1),S,t),D=O[0],P=O[1],B=this.findErrorLocations(D),L=this.findErrorMagnitudes(P,D,B);for(u=0;u<B.length;u++){var U=e.length-1-this.field.log(B[u]);if(U<0)throw Ie.getChecksumInstance();e[U]=this.field.subtract(e[U],L[u])}return B.length},r.prototype.runEuclideanAlgorithm=function(e,t,n){if(e.getDegree()<t.getDegree()){var i=e;e=t,t=i}for(var o=e,a=t,s=this.field.getZero(),c=this.field.getOne();a.getDegree()>=Math.round(n/2);){var u=o,f=s;if(s=c,(o=a).isZero())throw Ie.getChecksumInstance();a=u;for(var d=this.field.getZero(),l=o.getCoefficient(o.getDegree()),h=this.field.inverse(l);a.getDegree()>=o.getDegree()&&!a.isZero();){var p=a.getDegree()-o.getDegree(),C=this.field.multiply(a.getCoefficient(a.getDegree()),h);d=d.add(this.field.buildMonomial(p,C)),a=a.subtract(o.multiplyByMonomial(p,C))}c=d.multiply(s).subtract(f).negative()}var A=c.getCoefficient(0);if(0===A)throw Ie.getChecksumInstance();var S=this.field.inverse(A);return[c.multiply(S),a.multiply(S)]},r.prototype.findErrorLocations=function(e){for(var t=e.getDegree(),n=new Int32Array(t),i=0,o=1;o<this.field.getSize()&&i<t;o++)0===e.evaluateAt(o)&&(n[i]=this.field.inverse(o),i++);if(i!==t)throw Ie.getChecksumInstance();return n},r.prototype.findErrorMagnitudes=function(e,t,n){for(var i=t.getDegree(),o=new Int32Array(i),a=1;a<=i;a++)o[i-a]=this.field.multiply(a,t.getCoefficient(a));var s=new Pt(this.field,o),c=n.length,u=new Int32Array(c);for(a=0;a<c;a++){var f=this.field.inverse(n[a]),d=this.field.subtract(0,e.evaluateAt(f)),l=this.field.inverse(s.evaluateAt(f));u[a]=this.field.multiply(d,l)}return u},r}(),Dr=function(){function r(e,t,n,i,o){e instanceof r?this.constructor_2(e):this.constructor_1(e,t,n,i,o)}return r.prototype.constructor_1=function(e,t,n,i,o){var a=null==t||null==n,s=null==i||null==o;if(a&&s)throw new N;a?(t=new j(0,i.getY()),n=new j(0,o.getY())):s&&(i=new j(e.getWidth()-1,t.getY()),o=new j(e.getWidth()-1,n.getY())),this.image=e,this.topLeft=t,this.bottomLeft=n,this.topRight=i,this.bottomRight=o,this.minX=Math.trunc(Math.min(t.getX(),n.getX())),this.maxX=Math.trunc(Math.max(i.getX(),o.getX())),this.minY=Math.trunc(Math.min(t.getY(),i.getY())),this.maxY=Math.trunc(Math.max(n.getY(),o.getY()))},r.prototype.constructor_2=function(e){this.image=e.image,this.topLeft=e.getTopLeft(),this.bottomLeft=e.getBottomLeft(),this.topRight=e.getTopRight(),this.bottomRight=e.getBottomRight(),this.minX=e.getMinX(),this.maxX=e.getMaxX(),this.minY=e.getMinY(),this.maxY=e.getMaxY()},r.merge=function(e,t){return null==e?t:null==t?e:new r(e.image,e.topLeft,e.bottomLeft,t.topRight,t.bottomRight)},r.prototype.addMissingRows=function(e,t,n){var i=this.topLeft,o=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(e>0){var c=n?this.topLeft:this.topRight,u=Math.trunc(c.getY()-e);u<0&&(u=0);var f=new j(c.getX(),u);n?i=f:a=f}if(t>0){var d=n?this.bottomLeft:this.bottomRight,l=Math.trunc(d.getY()+t);l>=this.image.getHeight()&&(l=this.image.getHeight()-1);var h=new j(d.getX(),l);n?o=h:s=h}return new r(this.image,i,o,a,s)},r.prototype.getMinX=function(){return this.minX},r.prototype.getMaxX=function(){return this.maxX},r.prototype.getMinY=function(){return this.minY},r.prototype.getMaxY=function(){return this.maxY},r.prototype.getTopLeft=function(){return this.topLeft},r.prototype.getTopRight=function(){return this.topRight},r.prototype.getBottomLeft=function(){return this.bottomLeft},r.prototype.getBottomRight=function(){return this.bottomRight},r}(),Vs=function(){function r(e,t,n,i){this.columnCount=e,this.errorCorrectionLevel=i,this.rowCountUpperPart=t,this.rowCountLowerPart=n,this.rowCount=t+n}return r.prototype.getColumnCount=function(){return this.columnCount},r.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},r.prototype.getRowCount=function(){return this.rowCount},r.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},r.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},r}(),Tr=function(){function r(){this.buffer=""}return r.form=function(e,t){var n=-1;return e.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,function i(a,s,c,u,f,d){if("%%"===a)return"%";if(void 0!==t[++n]){a=u?parseInt(u.substr(1)):void 0;var h,l=f?parseInt(f.substr(1)):void 0;switch(d){case"s":h=t[n];break;case"c":h=t[n][0];break;case"f":h=parseFloat(t[n]).toFixed(a);break;case"p":h=parseFloat(t[n]).toPrecision(a);break;case"e":h=parseFloat(t[n]).toExponential(a);break;case"x":h=parseInt(t[n]).toString(l||16);break;case"d":h=parseFloat(parseInt(t[n],l||10).toPrecision(a)).toFixed(0)}h="object"==typeof h?JSON.stringify(h):(+h).toString(l);for(var p=parseInt(c),C=c&&c[0]+""=="0"?"0":" ";h.length<p;)h=void 0!==s?h+C:C+h;return h}})},r.prototype.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.buffer+=r.form(e,t)},r.prototype.toString=function(){return this.buffer},r}(),En=function(){function r(e){this.boundingBox=new Dr(e),this.codewords=new Array(e.getMaxY()-e.getMinY()+1)}return r.prototype.getCodewordNearby=function(e){var t=this.getCodeword(e);if(null!=t)return t;for(var n=1;n<r.MAX_NEARBY_DISTANCE;n++){var i=this.imageRowToCodewordIndex(e)-n;if(i>=0&&null!=(t=this.codewords[i])||(i=this.imageRowToCodewordIndex(e)+n)<this.codewords.length&&null!=(t=this.codewords[i]))return t}return null},r.prototype.imageRowToCodewordIndex=function(e){return e-this.boundingBox.getMinY()}
1,r.prototype.setCodeword=function(e,t){this.codewords[this.imageRowToCodewordIndex(e)]=t},r.prototype.getCodeword=function(e){return this.codewords[this.imageRowToCodewordIndex(e)]},r.prototype.getBoundingBox=function(){return this.boundingBox},r.prototype.getCodewords=function(){return this.codewords},r.prototype.toString=function(){var e,t,n=new Tr,i=0;try{for(var o=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.codewords),a=o.next();!a.done;a=o.next()){var s=a.value;null!=s?n.format("%3d: %3d|%3d%n",i++,s.getRowNumber(),s.getValue()):n.format("%3d: | %n",i++)}}catch(c){e={error:c}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n.toString()},r.MAX_NEARBY_DISTANCE=5,r}();var js=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var i,a,n=t.call(r),o=[];try{for(;(void 0===e||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o};const qt=function(){function r(){this.values=new Map}return r.prototype.setValue=function(e){e=Math.trunc(e);var t=this.values.get(e);null==t&&(t=0),t++,this.values.set(e,t)},r.prototype.getValue=function(){var e,t,n=-1,i=new Array,o=function(d,l){var h_getKey=function(){return d},h_getValue=function(){return l};h_getValue()>n?(n=h_getValue(),(i=[]).push(h_getKey())):h_getValue()===n&&i.push(h_getKey())};try{for(var a=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.values.entries()),s=a.next();!s.done;s=a.next()){var c=js(s.value,2);o(c[0],c[1])}}catch(d){e={error:d}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return fe.toIntArray(i)},r.prototype.getConfidence=function(e){return this.values.get(e)},r}();var qs=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),Pr=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const An=function(r){function e(t,n){var i=r.call(this,t)||this;return i._isLeft=n,i}return qs(e,r),e.prototype.setRowNumbers=function(){var t,n;try{for(var i=Pr(this.getCodewords()),o=i.next();!o.done;o=i.next()){var a=o.value;a?.setRowNumberAsRowIndicatorColumn()}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(t){var n=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(n,t);for(var i=this.getBoundingBox(),o=this._isLeft?i.getTopLeft():i.getTopRight(),a=this._isLeft?i.getBottomLeft():i.getBottomRight(),s=this.imageRowToCodewordIndex(Math.trunc(o.getY())),c=this.imageRowToCodewordIndex(Math.trunc(a.getY())),u=-1,f=1,d=0,l=s;l<c;l++)if(null!=n[l]){var h=n[l],p=h.getRowNumber()-u;if(0===p)d++;else if(1===p)f=Math.max(f,d),d=1,u=h.getRowNumber();else if(p<0||h.getRowNumber()>=t.getRowCount()||p>l)n[l]=null;else{for(var C,A=(C=f>2?(f-2)*p:p)>=l,S=1;S<=C&&!A;S++)A=null!=n[l-S];A?n[l]=null:(u=h.getRowNumber(),d=1)}}},e.prototype.getRowHeights=function(){var t,n,i=this.getBarcodeMetadata();if(null==i)return null;this.adjustIncompleteIndicatorColumnRowNumbers(i);var o=new Int32Array(i.getRowCount());try{for(var a=Pr(this.getCodewords()),s=a.next();!s.done;s=a.next()){var c=s.value;if(null!=c){var u=c.getRowNumber();if(u>=o.length)continue;o[u]++}}}catch(f){t={error:f}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(t){for(var n=this.getBoundingBox(),i=this._isLeft?n.getTopLeft():n.getTopRight(),o=this._isLeft?n.getBottomLeft():n.getBottomRight(),a=this.imageRowToCodewordIndex(Math.trunc(i.getY())),s=this.imageRowToCodewordIndex(Math.trunc(o.getY())),c=this.getCodewords(),u=-1,f=1,d=0,l=a;l<s;l++)if(null!=c[l]){var h=c[l];h.setRowNumberAsRowIndicatorColumn();var p=h.getRowNumber()-u;0===p?d++:1===p?(f=Math.max(f,d),d=1,u=h.getRowNumber()):h.getRowNumber()>=t.getRowCount()?c[l]=null:(u=h.getRowNumber(),d=1)}},e.prototype.getBarcodeMetadata=function(){var t,n,i=this.getCodewords(),o=new qt,a=new qt,s=new qt,c=new qt;try{for(var u=Pr(i),f=u.next();!f.done;f=u.next()){var d=f.value;if(null!=d){d.setRowNumberAsRowIndicatorColumn();var l=d.getValue()%30,h=d.getRowNumber();switch(this._isLeft||(h+=2),h%3){case 0:a.setValue(3*l+1);break;case 1:c.setValue(l/3),s.setValue(l%3);break;case 2:o.setValue(l+1)}}}}catch(C){t={error:C}}finally{try{f&&!f.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}if(0===o.getValue().length||0===a.getValue().length||0===s.getValue().length||0===c.getValue().length||o.getValue()[0]<1||a.getValue()[0]+s.getValue()[0]<fe.MIN_ROWS_IN_BARCODE||a.getValue()[0]+s.getValue()[0]>fe.MAX_ROWS_IN_BARCODE)return null;var p=new Vs(o.getValue()[0],a.getValue()[0],s.getValue()[0],c.getValue()[0]);return this.removeIncorrectCodewords(i,p),p},e.prototype.removeIncorrectCodewords=function(t,n){for(var i=0;i<t.length;i++){var o=t[i];if(null!=t[i]){var a=o.getValue()%30,s=o.getRowNumber();if(s>n.getRowCount()){t[i]=null;continue}switch(this._isLeft||(s+=2),s%3){case 0:3*a+1!==n.getRowCountUpperPart()&&(t[i]=null);break;case 1:(Math.trunc(a/3)!==n.getErrorCorrectionLevel()||a%3!==n.getRowCountLowerPart())&&(t[i]=null);break;case 2:a+1!==n.getColumnCount()&&(t[i]=null)}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+r.prototype.toString.call(this)},e}(En),$s=function(){function r(e,t){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=e,this.barcodeColumnCount=e.getColumnCount(),this.boundingBox=t,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return r.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var t,e=fe.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e<t);return this.detectionResultColumns},r.prototype.adjustIndicatorColumnRowNumbers=function(e){e?.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},r.prototype.adjustRowNumbersAndGetCount=function(){var e=this.adjustRowNumbersByRow();if(0===e)return 0;for(var t=1;t<this.barcodeColumnCount+1;t++)for(var n=this.detectionResultColumns[t].getCodewords(),i=0;i<n.length;i++)null!=n[i]&&(n[i].hasValidRowNumber()||this.adjustRowNumbers(t,i,n));return e},r.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},r.prototype.adjustRowNumbersFromBothRI=function(){if(null!=this.detectionResultColumns[0]&&null!=this.detectionResultColumns[this.barcodeColumnCount+1])for(var e=this.detectionResultColumns[0].getCodewords(),t=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<e.length;n++)if(null!=e[n]&&null!=t[n]&&e[n].getRowNumber()===t[n].getRowNumber())for(var i=1;i<=this.barcodeColumnCount;i++){var o=this.detectionResultColumns[i].getCodewords()[n];null!=o&&(o.setRowNumber(e[n].getRowNumber()),o.hasValidRowNumber()||(this.detectionResultColumns[i].getCodewords()[n]=null))}},r.prototype.adjustRowNumbersFromRRI=function(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;for(var e=0,t=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<t.length;n++)if(null!=t[n])for(var i=t[n].getRowNumber(),o=0,a=this.barcodeColumnCount+1;a>0&&o<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(o=r.adjustRowNumberIfValid(i,o,s),s.hasValidRowNumber()||e++)}return e},r.prototype.adjustRowNumbersFromLRI=function(){if(null==this.detectionResultColumns[0])return 0;for(var e=0,t=this.detectionResultColumns[0].getCodewords(),n=0;n<t.length;n++)if(null!=t[n])for(var i=t[n].getRowNumber(),o=0,a=1;a<this.barcodeColumnCount+1&&o<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(o=r.adjustRowNumberIfValid(i,o,s),s.hasValidRowNumber()||e++)}return e},r.adjustRowNumberIfValid=function(e,t,n){return null==n||n.hasValidRowNumber()||(n.isValidRowNumber(e)?(n.setRowNumber(e),t=0):++t),t},r.prototype.adjustRowNumbers=function(e,t,n){var i,o;if(null!=this.detectionResultColumns[e-1]){var a=n[t],s=this.detectionResultColumns[e-1].getCodewords(),c=s;null!=this.detectionResultColumns[e+1]&&(c=this.detectionResultColumns[e+1].getCodewords());var u=new Array(14);u[2]=s[t],u[3]=c[t],t>0&&(u[0]=n[t-1],u[4]=s[t-1],u[5]=c[t-1]),t>1&&(u[8]=n[t-2],u[10]=s[t-2],u[11]=c[t-2]),t<n.length-1&&(u[1]=n[t+1],u[6]=s[t+1],u[7]=c[t+1]),t<n.length-2&&(u[9]=n[t+2],u[12]=s[t+2],u[13]=c[t+2]);try{for(var f=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(u),d=f.next();!d.done;d=f.next())if(r.adjustRowNumber(a,d.value))return}catch(h){i={error:h}}
1finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}},r.adjustRowNumber=function(e,t){return!(null==t||!t.hasValidRowNumber()||t.getBucket()!==e.getBucket()||(e.setRowNumber(t.getRowNumber()),0))},r.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},r.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},r.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},r.prototype.setBoundingBox=function(e){this.boundingBox=e},r.prototype.getBoundingBox=function(){return this.boundingBox},r.prototype.setDetectionResultColumn=function(e,t){this.detectionResultColumns[e]=t},r.prototype.getDetectionResultColumn=function(e){return this.detectionResultColumns[e]},r.prototype.toString=function(){var e=this.detectionResultColumns[0];null==e&&(e=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var t=new Tr,n=0;n<e.getCodewords().length;n++){t.format("CW %3d:",n);for(var i=0;i<this.barcodeColumnCount+2;i++)if(null!=this.detectionResultColumns[i]){var o=this.detectionResultColumns[i].getCodewords()[n];null!=o?t.format(" %3d|%3d",o.getRowNumber(),o.getValue()):t.format(" | ")}else t.format(" | ");t.format("%n")}return t.toString()},r}(),ec=function(){function r(e,t,n,i){this.rowNumber=r.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(t),this.bucket=Math.trunc(n),this.value=Math.trunc(i)}return r.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},r.prototype.isValidRowNumber=function(e){return e!==r.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},r.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},r.prototype.getWidth=function(){return this.endX-this.startX},r.prototype.getStartX=function(){return this.startX},r.prototype.getEndX=function(){return this.endX},r.prototype.getBucket=function(){return this.bucket},r.prototype.getValue=function(){return this.value},r.prototype.getRowNumber=function(){return this.rowNumber},r.prototype.setRowNumber=function(e){this.rowNumber=e},r.prototype.toString=function(){return this.rowNumber+"|"+this.value},r.BARCODE_ROW_UNKNOWN=-1,r}(),rc=function(){function r(){}return r.initialize=function(){for(var e=0;e<fe.SYMBOL_TABLE.length;e++)for(var t=fe.SYMBOL_TABLE[e],n=1&t,i=0;i<fe.BARS_IN_MODULE;i++){for(var o=0;(1&t)===n;)o+=1,t>>=1;n=1&t,r.RATIOS_TABLE[e]||(r.RATIOS_TABLE[e]=new Array(fe.BARS_IN_MODULE)),r.RATIOS_TABLE[e][fe.BARS_IN_MODULE-i-1]=Math.fround(o/fe.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},r.getDecodedValue=function(e){var t=r.getDecodedCodewordValue(r.sampleBitCounts(e));return-1!==t?t:r.getClosestDecodedValue(e)},r.sampleBitCounts=function(e){for(var t=he.sum(e),n=new Int32Array(fe.BARS_IN_MODULE),i=0,o=0,a=0;a<fe.MODULES_IN_CODEWORD;a++)o+e[i]<=t/(2*fe.MODULES_IN_CODEWORD)+a*t/fe.MODULES_IN_CODEWORD&&(o+=e[i],i++),n[i]++;return n},r.getDecodedCodewordValue=function(e){var t=r.getBitValue(e);return-1===fe.getCodeword(t)?-1:t},r.getBitValue=function(e){for(var t=0,n=0;n<e.length;n++)for(var i=0;i<e[n];i++)t=t<<1|(n%2==0?1:0);return Math.trunc(t)},r.getClosestDecodedValue=function(e){var t=he.sum(e),n=new Array(fe.BARS_IN_MODULE);if(t>1)for(var i=0;i<n.length;
1i++)n[i]=Math.fround(e[i]/t);var o=yr.MAX_VALUE,a=-1;this.bSymbolTableReady||r.initialize();for(var s=0;s<r.RATIOS_TABLE.length;s++){for(var c=0,u=r.RATIOS_TABLE[s],f=0;f<fe.BARS_IN_MODULE;f++){var d=Math.fround(u[f]-n[f]);if((c+=Math.fround(d*d))>=o)break}c<o&&(o=c,a=fe.SYMBOL_TABLE[s])}return a},r.bSymbolTableReady=!1,r.RATIOS_TABLE=new Array(fe.SYMBOL_TABLE.length).map(function(e){return new Array(fe.BARS_IN_MODULE)}),r}(),ic=function(){function r(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return r.prototype.getSegmentIndex=function(){return this.segmentIndex},r.prototype.setSegmentIndex=function(e){this.segmentIndex=e},r.prototype.getFileId=function(){return this.fileId},r.prototype.setFileId=function(e){this.fileId=e},r.prototype.getOptionalData=function(){return this.optionalData},r.prototype.setOptionalData=function(e){this.optionalData=e},r.prototype.isLastSegment=function(){return this.lastSegment},r.prototype.setLastSegment=function(e){this.lastSegment=e},r.prototype.getSegmentCount=function(){return this.segmentCount},r.prototype.setSegmentCount=function(e){this.segmentCount=e},r.prototype.getSender=function(){return this.sender||null},r.prototype.setSender=function(e){this.sender=e},r.prototype.getAddressee=function(){return this.addressee||null},r.prototype.setAddressee=function(e){this.addressee=e},r.prototype.getFileName=function(){return this.fileName},r.prototype.setFileName=function(e){this.fileName=e},r.prototype.getFileSize=function(){return this.fileSize},r.prototype.setFileSize=function(e){this.fileSize=e},r.prototype.getChecksum=function(){return this.checksum},r.prototype.setChecksum=function(e){this.checksum=e},r.prototype.getTimestamp=function(){return this.timestamp},r.prototype.setTimestamp=function(e){this.timestamp=e},r}(),On=function(){function r(){}return r.parseLong=function(e,t){return void 0===t&&(t=void 0),parseInt(e,t)},r}();var ac=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const cc=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return ac(e,r),e.kind="NullPointerException",e}(ee),fc=function(){function r(){}return r.prototype.writeBytes=function(e){this.writeBytesOffset(e,0,e.length)},r.prototype.writeBytesOffset=function(e,t,n){if(null==e)throw new cc;if(t<0||t>e.length||n<0||t+n>e.length||t+n<0)throw new dt;if(0!==n)for(var i=0;i<n;i++)this.write(e[t+i])},r.prototype.flush=function(){},r.prototype.close=function(){},r}();var dc=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const hc=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return dc(e,r),e}(ee);var vc=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const gc=function(r){function e(t){void 0===t&&(t=32);var n=r.call(this)||this;if(n.count=0,t<0)throw new X("Negative initial size: "+t);return n.buf=new Uint8Array(t),n}return vc(e,r),e.prototype.ensureCapacity=function(t){t-this.buf.length>0&&this.grow(t)},e.prototype.grow=function(t){var i=this.buf.length<<1;if(i-t<0&&(i=t),i<0){if(t<0)throw new hc;i=Q.MAX_VALUE}this.buf=te.copyOfUint8Array(this.buf,i)},e.prototype.write=function(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1},e.prototype.writeBytesOffset=function(t,n,i){if(n<0||n>t.length||i<0||n+i-t.length>0)throw new dt;this.ensureCapacity(this.count+i),le.arraycopy(t,n,this.buf,this.count,i),this.count+=i},e.prototype.writeTo=function(t){t.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return te.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(t){return new String(this.buf).toString()},e.prototype.toString_number=function(t){return new String(this.buf).toString()},e.prototype.close=function(){},e}(fc);var dr,Ee=function(r){return r[r.ALPHA=0]="ALPHA",r[r.LOWER=1]="LOWER",r[r.MIXED=2]="MIXED",r[r.PUNCT=3]="PUNCT",r[r.ALPHA_SHIFT=4]="ALPHA_SHIFT",r[r.PUNCT_SHIFT=5]="PUNCT_SHIFT",r}(Ee||{});function Sn(){if(typeof window<"u")return window.BigInt||null;if(typeof global<"u")return global.BigInt||null;if(typeof self<"u")return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function mt(r){if(typeof dr>"u"&&(dr=Sn()),null===dr)throw new Error("BigInt is not supported!");return dr(r)}const yc=function(){function r(){}return r.decode=function(e,t){var n=new K(""),i=F.ISO8859_1;n.enableDecoding(i);for(var o=1,a=e[o++],s=new ic;o<e[0];){switch(a){case r.TEXT_COMPACTION_MODE_LATCH:o=r.textCompaction(e,o,n);break;case r.BYTE_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH_6:o=r.byteCompaction(a,e,i,o,n);break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[o++]);break;case r.NUMERIC_COMPACTION_MODE_LATCH:o=r.numericCompaction(e,o,n);break;case r.ECI_CHARSET:F.getCharacterSetECIByValue(e[o++]);break;case r.ECI_GENERAL_PURPOSE:o+=2;break;case r.ECI_USER_DEFINED:o++;break;case r.BEGIN_MACRO_PDF417_CONTROL_BLOCK:o=r.decodeMacroBlock(e,o,s);break;case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case r.MACRO_PDF417_TERMINATOR:throw new y;default:o--,o=r.textCompaction(e,o,n)}if(!(o<e.length))throw y.getFormatInstance();a=e[o++]}if(0===n.length())throw y.getFormatInstance();var u=new tr(null,n.toString(),null,t);return u.setOther(s),u},r.decodeMacroBlock=function(e,t,n){if(t+r.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw y.getFormatInstance();for(var i=new Int32Array(r.NUMBER_OF_SEQUENCE_CODEWORDS),o=0;o<r.NUMBER_OF_SEQUENCE_CODEWORDS;o++,t++)i[o]=e[t];n.setSegmentIndex(Q.parseInt(r.decodeBase900toBase10(i,r.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new K;t=r.textCompaction(e,t,a),n.setFileId(a.toString());var s=-1;for(e[t]===r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=t+1);t<e[0];)switch(e[t]){case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e[++t]){case r.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var c=new K;t=r.textCompaction(e,t+1,c),n.setFileName(c.toString());break;case r.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var u=new K;t=r.textCompaction(e,t+1,u),n.setSender(u.toString());break;case r.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var f=new K;t=r.textCompaction(e,t+1,f),n.setAddressee(f.toString());break;case r.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new K;t=r.numericCompaction(e,t+1,d),n.setSegmentCount(Q.parseInt(d.toString()));break;case r.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var l=new K;t=r.numericCompaction(e,t+1,l),n.setTimestamp(On.parseLong(l.toString()));break;case r.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var h=new K;t=r.numericCompaction(e,t+1,h),n.setChecksum(Q.parseInt(h.toString()));break;case r.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new K;t=r.numericCompaction(e,t+1,p),n.setFileSize(On.parseLong(p.toString()));break;default:throw y.getFormatInstance()}break;case r.MACRO_PDF417_TERMINATOR:t++,n.setLastSegment(!0);break;default:throw y.getFormatInstance()}if(-1!==s){var C=t-s;n.isLastSegment()&&C--,n.setOptionalData(te.copyOfRange(e,s,s+C))}return t},r.textCompaction=function(e,t,n){for(var i=new Int32Array(2*(e[0]-t)),o=new Int32Array(2*(e[0]-t)),a=0,s=!1;t<e[0]&&!s;){var c=e[t++];if(c<r.TEXT_COMPACTION_MODE_LATCH)i[a]=c/30,i[a+1]=c%30,a+=2;else switch(c){case r.TEXT_COMPACTION_MODE_LATCH:i[a++]=r.TEXT_COMPACTION_MODE_LATCH;break;case r.BYTE_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH_6:case r.NUMERIC_COMPACTION_MODE_LATCH:case r.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case r.MACRO_PDF417_TERMINATOR:t--,s=!0;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i[a]=r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,c=e[t++],o[a]=c,a++}}return r.decodeTextCompaction(i,o,a,n),t},r.decodeTextCompaction=function(e,t,n,i){for(var o=Ee.ALPHA,a=Ee.ALPHA,s=0;s<n;){var c=e[s],u="";switch(o){case Ee.ALPHA:if(c<26)u=String.fromCharCode(65+c);else switch(c){case 26:u=" ";break;case r.LL:o=Ee.LOWER;break;case r.ML:o=Ee.MIXED;break;case r.PS:a=o,o=Ee.PUNCT_SHIFT;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(t[s]);break;case r.TEXT_COMPACTION_MODE_LATCH:o=Ee.ALPHA}break;case Ee.LOWER:if(c<26)u=String.fromCharCode(97+c);else switch(c){case 26:u=" ";break;case r.AS:a=o,o=Ee.ALPHA_SHIFT;break;case r.ML:o=Ee.MIXED;break;case r.PS:a=o,o=Ee.PUNCT_SHIFT;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(t[s]);break;case r.TEXT_COMPACTION_MODE_LATCH:o=Ee.ALPHA}break;case Ee.MIXED:if(c<r.PL)u=r.MIXED_CHARS[c];else switch(c){case r.PL:o=Ee.PUNCT;break;case 26:u=" ";break;case r.LL:o=Ee.LOWER;break;case r.AL:o=Ee.ALPHA;break;case r.PS:a=o,o=Ee.PUNCT_SHIFT;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(t[s]);break;case r.TEXT_COMPACTION_MODE_LATCH:o=Ee.ALPHA}break;case Ee.PUNCT:if(c<r.PAL)u=r.PUNCT_CHARS[c];else switch(c){case r.PAL:o=Ee.ALPHA;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(t[s]);break;case r.TEXT_COMPACTION_MODE_LATCH:o=Ee.ALPHA}break;case Ee.ALPHA_SHIFT:if(o=a,c<26)u=String.fromCharCode(65+c);else switch(c){case 26:u=" ";break;case r.TEXT_COMPACTION_MODE_LATCH:o=Ee.ALPHA}break;case Ee.PUNCT_SHIFT:if(o=a,c<r.PAL)u=r.PUNCT_CHARS[c];else switch(c){case r.PAL:o=Ee.ALPHA;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(t[s]);break;case r.TEXT_COMPACTION_MODE_LATCH:o=Ee.ALPHA}}""!==u&&i.append(u),s++}},r.byteCompaction=function(e,t,n,i,o){var a=new gc,s=0,c=0,u=!1;switch(e){case r.BYTE_COMPACTION_MODE_LATCH:for(var f=new Int32Array(6),d=t[i++];i<t[0]&&!u;)switch(f[s++]=d,c=900*c+d,d=t[i++],d){case r.TEXT_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH:case r.NUMERIC_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH_6:case r.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case r.MACRO_PDF417_TERMINATOR:i--,u=!0;break;default:if(s%5==0&&s>0){for(var l=0;l<6;++l)a.write(Number(mt(c)>>mt(8*(5-l))));c=0,s=0}}i===t[0]&&d<r.TEXT_COMPACTION_MODE_LATCH&&(f[s++]=d);for(var h=0;h<s;h++)a.write(f[h]);break;case r.BYTE_COMPACTION_MODE_LATCH_6:for(;i<t[0]&&!u;){var p=t[i++];
1if(p<r.TEXT_COMPACTION_MODE_LATCH)s++,c=900*c+p;else switch(p){case r.TEXT_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH:case r.NUMERIC_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH_6:case r.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case r.MACRO_PDF417_TERMINATOR:i--,u=!0}if(s%5==0&&s>0){for(l=0;l<6;++l)a.write(Number(mt(c)>>mt(8*(5-l))));c=0,s=0}}}return o.append(me.decode(a.toByteArray(),n)),i},r.numericCompaction=function(e,t,n){for(var i=0,o=!1,a=new Int32Array(r.MAX_NUMERIC_CODEWORDS);t<e[0]&&!o;){var s=e[t++];if(t===e[0]&&(o=!0),s<r.TEXT_COMPACTION_MODE_LATCH)a[i]=s,i++;else switch(s){case r.TEXT_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH_6:case r.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case r.MACRO_PDF417_TERMINATOR:t--,o=!0}(i%r.MAX_NUMERIC_CODEWORDS==0||s===r.NUMERIC_COMPACTION_MODE_LATCH||o)&&i>0&&(n.append(r.decodeBase900toBase10(a,i)),i=0)}return t},r.decodeBase900toBase10=function(e,t){for(var n=mt(0),i=0;i<t;i++)n+=r.EXP900[t-i-1]*mt(e[i]);var o=n.toString();if("1"!==o.charAt(0))throw new y;return o.substring(1)},r.TEXT_COMPACTION_MODE_LATCH=900,r.BYTE_COMPACTION_MODE_LATCH=901,r.NUMERIC_COMPACTION_MODE_LATCH=902,r.BYTE_COMPACTION_MODE_LATCH_6=924,r.ECI_USER_DEFINED=925,r.ECI_GENERAL_PURPOSE=926,r.ECI_CHARSET=927,r.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,r.MACRO_PDF417_TERMINATOR=922,r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,r.MAX_NUMERIC_CODEWORDS=15,r.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,r.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,r.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,r.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,r.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,r.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,r.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,r.PL=25,r.LL=27,r.AS=27,r.ML=28,r.AL=28,r.PS=29,r.PAL=29,r.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",r.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",r.EXP900=Sn()?function xc(){var r=[];r[0]=mt(1);var e=mt(900);r[1]=e;for(var t=2;t<16;t++)r[t]=r[t-1]*e;return r}():[],r.NUMBER_OF_SEQUENCE_CODEWORDS=2,r}();var Zt=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const Cc=function(){function r(){}return r.decode=function(e,t,n,i,o,a,s){for(var d,c=new Dr(e,t,n,i,o),u=null,f=null,l=!0;;l=!1){if(null!=t&&(u=r.getRowIndicatorColumn(e,c,t,!0,a,s)),null!=i&&(f=r.getRowIndicatorColumn(e,c,i,!1,a,s)),null==(d=r.merge(u,f)))throw N.getNotFoundInstance();var h=d.getBoundingBox();if(!l||null==h||!(h.getMinY()<c.getMinY()||h.getMaxY()>c.getMaxY()))break;c=h}d.setBoundingBox(c);var p=d.getBarcodeColumnCount()+1;d.setDetectionResultColumn(0,u),d.setDetectionResultColumn(p,f);for(var C=null!=u,A=1;A<=p;A++){var S=C?A:p-A;if(void 0===d.getDetectionResultColumn(S)){var O=void 0;O=0===S||S===p?new An(c,0===S):new En(c),d.setDetectionResultColumn(S,O);for(var D=-1,P=D,B=c.getMinY();B<=c.getMaxY();B++){if((D=r.getStartColumn(d,S,B,C))<0||D>c.getMaxX()){if(-1===P)continue;D=P}var L=r.detectCodeword(e,c.getMinX(),c.getMaxX(),C,D,B,a,s);null!=L&&(O.setCodeword(B,L),P=D,a=Math.min(a,L.getWidth()),s=Math.max(s,L.getWidth()))}}}return r.createDecoderResult(d)},r.merge=function(e,t){if(null==e&&null==t)return null;var n=r.getBarcodeMetadata(e,t);if(null==n)return null;var i=Dr.merge(r.adjustBoundingBox(e),r.adjustBoundingBox(t));return new $s(n,i)},r.adjustBoundingBox=function(e){var t,n;if(null==e)return null;var i=e.getRowHeights();if(null==i)return null;var o=r.getMax(i),a=0;try{for(var s=Zt(i),c=s.next();!c.done;c=s.next()){var u=c.value;if(a+=o-u,u>0)break}}catch(h){t={error:h}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}for(var f=e.getCodewords(),d=0;a>0&&null==f[d];d++)a--;var l=0;for(d=i.length-1;d>=0&&(l+=o-i[d],!(i[d]>0));d--);for(d=f.length-1;l>0&&null==f[d];d--)l--;return e.getBoundingBox().addMissingRows(a,l,e.isLeft())},r.getMax=function(e){var t,n,i=-1;try{for(var o=Zt(e),a=o.next();!a.done;a=o.next())i=Math.max(i,a.value)}catch(c){t={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i},r.getBarcodeMetadata=function(e,t){var n,i;return null==e||null==(n=e.getBarcodeMetadata())?null==t?null:t.getBarcodeMetadata():null==t||null==(i=t.getBarcodeMetadata())?n:n.getColumnCount()!==i.getColumnCount()&&n.getErrorCorrectionLevel()!==i.getErrorCorrectionLevel()&&n.getRowCount()!==i.getRowCount()?null:n},r.getRowIndicatorColumn=function(e,t,n,i,o,a){for(var s=new An(t,i),c=0;c<2;c++)for(var u=0===c?1:-1,f=Math.trunc(Math.trunc(n.getX())),d=Math.trunc(Math.trunc(n.getY()));d<=t.getMaxY()&&d>=t.getMinY();d+=u){var l=r.detectCodeword(e,0,e.getWidth(),i,f,d,o,a);null!=l&&(s.setCodeword(d,l),f=i?l.getStartX():l.getEndX())}return s},r.adjustCodewordCount=function(e,t){var n=t[0][1],i=n.getValue(),o=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-r.getNumberOfECCodeWords(e.getBarcodeECLevel());if(0===i.length){if(o<1||o>fe.MAX_CODEWORDS_IN_BARCODE)throw N.getNotFoundInstance();n.setValue(o)}else i[0]!==o&&n.setValue(o)},r.createDecoderResult=function(e){var t=r.createBarcodeMatrix(e);r.adjustCodewordCount(e,t);for(var n=new Array,i=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),o=[],a=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var c=0;c<e.getBarcodeColumnCount();c++){var u=t[s][c+1].getValue(),f=s*e.getBarcodeColumnCount()+c;
10===u.length?n.push(f):1===u.length?i[f]=u[0]:(a.push(f),o.push(u))}for(var d=new Array(o.length),l=0;l<d.length;l++)d[l]=o[l];return r.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),i,fe.toIntArray(n),fe.toIntArray(a),d)},r.createDecoderResultFromAmbiguousValues=function(e,t,n,i,o){for(var a=new Int32Array(i.length),s=100;s-- >0;){for(var c=0;c<a.length;c++)t[i[c]]=o[c][a[c]];try{return r.decodeCodewords(t,e,n)}catch(f){if(!(f instanceof Ie))throw f}if(0===a.length)throw Ie.getChecksumInstance();for(c=0;c<a.length;c++){if(a[c]<o[c].length-1){a[c]++;break}if(a[c]=0,c===a.length-1)throw Ie.getChecksumInstance()}}throw Ie.getChecksumInstance()},r.createBarcodeMatrix=function(e){for(var t,n,i,o,a=Array.from({length:e.getBarcodeRowCount()},function(){return new Array(e.getBarcodeColumnCount()+2)}),s=0;s<a.length;s++)for(var c=0;c<a[s].length;c++)a[s][c]=new qt;var u=0;try{for(var f=Zt(e.getDetectionResultColumns()),d=f.next();!d.done;d=f.next()){var l=d.value;if(null!=l)try{for(var h=(i=void 0,Zt(l.getCodewords())),p=h.next();!p.done;p=h.next()){var C=p.value;if(null!=C){var A=C.getRowNumber();if(A>=0){if(A>=a.length)continue;a[A][u].setValue(C.getValue())}}}}catch(S){i={error:S}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}u++}}catch(S){t={error:S}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}return a},r.isValidBarcodeColumn=function(e,t){return t>=0&&t<=e.getBarcodeColumnCount()+1},r.getStartColumn=function(e,t,n,i){var o,a,s=i?1:-1,c=null;if(r.isValidBarcodeColumn(e,t-s)&&(c=e.getDetectionResultColumn(t-s).getCodeword(n)),null!=c)return i?c.getEndX():c.getStartX();if(null!=(c=e.getDetectionResultColumn(t).getCodewordNearby(n)))return i?c.getStartX():c.getEndX();if(r.isValidBarcodeColumn(e,t-s)&&(c=e.getDetectionResultColumn(t-s).getCodewordNearby(n)),null!=c)return i?c.getEndX():c.getStartX();for(var u=0;r.isValidBarcodeColumn(e,t-s);){t-=s;try{for(var f=(o=void 0,Zt(e.getDetectionResultColumn(t).getCodewords())),d=f.next();!d.done;d=f.next()){var l=d.value;if(null!=l)return(i?l.getEndX():l.getStartX())+s*u*(l.getEndX()-l.getStartX())}}catch(h){o={error:h}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}u++}return i?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},r.detectCodeword=function(e,t,n,i,o,a,s,c){o=r.adjustCodewordStartColumn(e,t,n,i,o,a);var u=r.getModuleBitCount(e,t,n,i,o,a);if(null==u)return null;var f,d=he.sum(u);if(i)f=o+d;else{for(var l=0;l<u.length/2;l++){var h=u[l];u[l]=u[u.length-1-l],u[u.length-1-l]=h}o=(f=o)-d}if(!r.checkCodewordSkew(d,s,c))return null;var p=rc.getDecodedValue(u),C=fe.getCodeword(p);return-1===C?null:new ec(o,f,r.getCodewordBucketNumber(p),C)},r.getModuleBitCount=function(e,t,n,i,o,a){for(var s=o,c=new Int32Array(8),u=0,f=i?1:-1,d=i;(i?s<n:s>=t)&&u<c.length;)e.get(s,a)===d?(c[u]++,s+=f):(u++,d=!d);return u===c.length||s===(i?n:t)&&u===c.length-1?c:null},r.getNumberOfECCodeWords=function(e){return 2<<e},r.adjustCodewordStartColumn=function(e,t,n,i,o,a){for(var s=o,c=i?-1:1,u=0;u<2;u++){for(;(i?s>=t:s<n)&&i===e.get(s,a);){if(Math.abs(o-s)>r.CODEWORD_SKEW_SIZE)return o;s+=c}c=-c,i=!i}return s},r.checkCodewordSkew=function(e,t,n){return t-r.CODEWORD_SKEW_SIZE<=e&&e<=n+r.CODEWORD_SKEW_SIZE},r.decodeCodewords=function(e,t,n){if(0===e.length)throw y.getFormatInstance();var i=1<<t+1,o=r.correctErrors(e,n,i);r.verifyCodewordCount(e,i);var a=yc.decode(e,""+t);return a.setErrorsCorrected(o),a.setErasures(n.length),a},r.correctErrors=function(e,t,n){if(null!=t&&t.length>n/2+r.MAX_ERRORS||n<0||n>r.MAX_EC_CODEWORDS)throw Ie.getChecksumInstance();return r.errorCorrection.decode(e,n,t)},r.verifyCodewordCount=function(e,t){if(e.length<4)throw y.getFormatInstance();var n=e[0];if(n>e.length)throw y.getFormatInstance();if(0===n){if(!(t<e.length))throw y.getFormatInstance();e[0]=e.length-t}},r.getBitCountForCodeword=function(e){for(var t=new Int32Array(8),n=0,i=t.length-1;!((1&e)!==n&&(n=1&e,i--,i<0));)t[i]++,e>>=1;return t},r.getCodewordBucketNumber=function(e){return e instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(e):this.getCodewordBucketNumber_number(e)},r.getCodewordBucketNumber_number=function(e){return r.getCodewordBucketNumber(r.getBitCountForCodeword(e))},r.getCodewordBucketNumber_Int32Array=function(e){return(e[0]-e[2]+e[4]-e[6]+9)%9},r.toString=function(e){for(var t=new Tr,n=0;n<e.length;n++){t.format("Row %2d: ",n);for(var i=0;i<e[n].length;i++){var o=e[n][i];0===o.getValue().length?t.format(" ",null):t.format("%4d(%2d)",o.getValue()[0],o.getConfidence(o.getValue()[0]))}t.format("%n")}return t.toString()},r.CODEWORD_SKEW_SIZE=2,r.MAX_ERRORS=3,r.MAX_EC_CODEWORDS=512,r.errorCorrection=new ks,r}(),lr=function(){function r(){}return r.prototype.decode=function(e,t){void 0===t&&(t=null);var n=r.decode(e,t,!1);if(null==n||0===n.length||null==n[0])throw N.getNotFoundInstance();return n[0]},r.prototype.decodeMultiple=function(e,t){void 0===t&&(t=null);try{return r.decode(e,t,!0)}catch(n){throw n instanceof y||n instanceof Ie?N.getNotFoundInstance():n}},r.decode=function(e,t,n){var i,o,a=new Array,s=bs.detectMultiple(e,t,n);try{for(var c=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(s.getPoints()),u=c.next();!u.done;u=c.next()){var f=u.value,d=Cc.decode(s.getBits(),f[4],f[5],f[6],f[7],r.getMinCodewordWidth(f),r.getMaxCodew
1ordWidth(f)),l=new He(d.getText(),d.getRawBytes(),void 0,f,Z.PDF_417);l.putMetadata(Ue.ERROR_CORRECTION_LEVEL,d.getECLevel());var h=d.getOther();null!=h&&l.putMetadata(Ue.PDF417_EXTRA_METADATA,h),a.push(l)}}catch(p){i={error:p}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return a.map(function(p){return p})},r.getMaxWidth=function(e,t){return null==e||null==t?0:Math.trunc(Math.abs(e.getX()-t.getX()))},r.getMinWidth=function(e,t){return null==e||null==t?Q.MAX_VALUE:Math.trunc(Math.abs(e.getX()-t.getX()))},r.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(r.getMaxWidth(e[0],e[4]),r.getMaxWidth(e[6],e[2])*fe.MODULES_IN_CODEWORD/fe.MODULES_IN_STOP_PATTERN),Math.max(r.getMaxWidth(e[1],e[5]),r.getMaxWidth(e[7],e[3])*fe.MODULES_IN_CODEWORD/fe.MODULES_IN_STOP_PATTERN)))},r.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(r.getMinWidth(e[0],e[4]),r.getMinWidth(e[6],e[2])*fe.MODULES_IN_CODEWORD/fe.MODULES_IN_STOP_PATTERN),Math.min(r.getMinWidth(e[1],e[5]),r.getMinWidth(e[7],e[3])*fe.MODULES_IN_CODEWORD/fe.MODULES_IN_STOP_PATTERN)))},r.prototype.reset=function(){},r}();var Ac=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const In=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return Ac(e,r),e.kind="ReaderException",e}(ee);var bn=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const Dn=function(){function r(){}return r.prototype.decode=function(e,t){return this.setHints(t),this.decodeInternal(e)},r.prototype.decodeWithState=function(e){return null==this.readers&&this.setHints(null),this.decodeInternal(e)},r.prototype.setHints=function(e){this.hints=e;var t=null!=e&&void 0!==e.get(x.TRY_HARDER),n=null==e?null:e.get(x.POSSIBLE_FORMATS),i=new Array;if(null!=n){var o=n.some(function(a){return a===Z.UPC_A||a===Z.UPC_E||a===Z.EAN_13||a===Z.EAN_8||a===Z.CODABAR||a===Z.CODE_39||a===Z.CODE_93||a===Z.CODE_128||a===Z.ITF||a===Z.RSS_14||a===Z.RSS_EXPANDED});o&&!t&&i.push(new Ht(e)),n.includes(Z.QR_CODE)&&i.push(new fr),n.includes(Z.DATA_MATRIX)&&i.push(new ur),n.includes(Z.AZTEC)&&i.push(new ir),n.includes(Z.PDF_417)&&i.push(new lr),o&&t&&i.push(new Ht(e))}0===i.length&&(t||i.push(new Ht(e)),i.push(new fr),i.push(new ur),i.push(new ir),i.push(new lr),t&&i.push(new Ht(e))),this.readers=i},r.prototype.reset=function(){var e,t;if(null!==this.readers)try{for(var n=bn(this.readers),i=n.next();!i.done;i=n.next())i.value.reset()}catch(a){e={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},r.prototype.decodeInternal=function(e){var t,n;if(null===this.readers)throw new In("No readers where selected, nothing can be read.");try{for(var i=bn(this.readers),o=i.next();!o.done;o=i.next()){var a=o.value;try{return a.decode(e,this.hints)}catch(s){if(s instanceof In)continue}}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}throw new N("No MultiFormat Readers were able to detect the code.")},r}();var Ic=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),bc=(function(r){function e(t,n){void 0===t&&(t=null),void 0===n&&(n=500);var o=new Dn;return o.setHints(t),r.call(this,o,n)||this}Ic(e,r),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)}}(kt),function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}()),Dc=(function(r){bc(function e(t){return void 0===t&&(t=500),r.call(this,new lr,t)||this},r)}(kt),function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}()),Tn=(function(r){Dc(function e(t){return void 0===t&&(t=500),r.call(this,new fr,t)||this},r)}(kt),function(r){return r[r.ERROR_CORRECTION=0]="ERROR_CORRECTION",r[r.CHARACTER_SET=1]="CHARACTER_SET",r[r.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",r[r.DATA_MATRIX_COMPACT=3]="DATA_MATRIX_COMPACT",r[r.MIN_SIZE=4]="MIN_SIZE",r[r.MAX_SIZE=5]="MAX_SIZE",r[r.MARGIN=6]="MARGIN",r[r.PDF417_COMPACT=7]="PDF417_COMPACT",r[r.PDF417_COMPACTION=8]="PDF417_COMPACTION",r[r.PDF417_DIMENSIONS=9]="PDF417_DIMENSIONS",r[r.AZTEC_LAYERS=10]="AZT
1EC_LAYERS",r[r.QR_VERSION=11]="QR_VERSION",r[r.GS1_FORMAT=12]="GS1_FORMAT",r[r.FORCE_C40=13]="FORCE_C40",r}(Tn||{}));const ye=Tn,Pn=function(){function r(e){this.field=e,this.cachedGenerators=[],this.cachedGenerators.push(new xt(e,Int32Array.from([1])))}return r.prototype.buildGenerator=function(e){var t=this.cachedGenerators;if(e>=t.length)for(var n=t[t.length-1],i=this.field,o=t.length;o<=e;o++){var a=n.multiply(new xt(i,Int32Array.from([1,i.exp(o-1+i.getGeneratorBase())])));t.push(a),n=a}return t[e]},r.prototype.encode=function(e,t){if(0===t)throw new X("No error correction bytes");var n=e.length-t;if(n<=0)throw new X("No data bytes provided");var i=this.buildGenerator(t),o=new Int32Array(n);le.arraycopy(e,0,o,0,n);for(var a=new xt(this.field,o),c=(a=a.multiplyByMonomial(t,1)).divide(i)[1].getCoefficients(),u=t-c.length,f=0;f<u;f++)e[n+f]=0;le.arraycopy(c,0,e,n+u,c.length)},r}(),Kt=function(){function r(){}return r.applyMaskPenaltyRule1=function(e){return r.applyMaskPenaltyRule1Internal(e,!0)+r.applyMaskPenaltyRule1Internal(e,!1)},r.applyMaskPenaltyRule2=function(e){for(var t=0,n=e.getArray(),i=e.getWidth(),o=e.getHeight(),a=0;a<o-1;a++)for(var s=n[a],c=0;c<i-1;c++){var u=s[c];u===s[c+1]&&u===n[a+1][c]&&u===n[a+1][c+1]&&t++}return r.N2*t},r.applyMaskPenaltyRule3=function(e){for(var t=0,n=e.getArray(),i=e.getWidth(),o=e.getHeight(),a=0;a<o;a++)for(var s=0;s<i;s++){var c=n[a];s+6<i&&1===c[s]&&0===c[s+1]&&1===c[s+2]&&1===c[s+3]&&1===c[s+4]&&0===c[s+5]&&1===c[s+6]&&(r.isWhiteHorizontal(c,s-4,s)||r.isWhiteHorizontal(c,s+7,s+11))&&t++,a+6<o&&1===n[a][s]&&0===n[a+1][s]&&1===n[a+2][s]&&1===n[a+3][s]&&1===n[a+4][s]&&0===n[a+5][s]&&1===n[a+6][s]&&(r.isWhiteVertical(n,s,a-4,a)||r.isWhiteVertical(n,s,a+7,a+11))&&t++}return t*r.N3},r.isWhiteHorizontal=function(e,t,n){t=Math.max(t,0),n=Math.min(n,e.length);for(var i=t;i<n;i++)if(1===e[i])return!1;return!0},r.isWhiteVertical=function(e,t,n,i){n=Math.max(n,0),i=Math.min(i,e.length);for(var o=n;o<i;o++)if(1===e[o][t])return!1;return!0},r.applyMaskPenaltyRule4=function(e){for(var t=0,n=e.getArray(),i=e.getWidth(),o=e.getHeight(),a=0;a<o;a++)for(var s=n[a],c=0;c<i;c++)1===s[c]&&t++;var u=e.getHeight()*e.getWidth();return Math.floor(10*Math.abs(2*t-u)/u)*r.N4},r.getDataMaskBit=function(e,t,n){var i,o;switch(e){case 0:i=n+t&1;break;case 1:i=1&n;break;case 2:i=t%3;break;case 3:i=(n+t)%3;break;case 4:i=Math.floor(n/2)+Math.floor(t/3)&1;break;case 5:i=(1&(o=n*t))+o%3;break;case 6:i=(1&(o=n*t))+o%3&1;break;case 7:i=(o=n*t)%3+(n+t&1)&1;break;default:throw new X("Invalid mask pattern: "+e)}return 0===i},r.applyMaskPenaltyRule1Internal=function(e,t){for(var n=0,i=t?e.getHeight():e.getWidth(),o=t?e.getWidth():e.getHeight(),a=e.getArray(),s=0;s<i;s++){for(var c=0,u=-1,f=0;f<o;f++){var d=t?a[s][f]:a[f][s];d===u?c++:(c>=5&&(n+=r.N1+(c-5)),c=1,u=d)}c>=5&&(n+=r.N1+(c-5))}return n},r.N1=3,r.N2=3,r.N3=40,r.N4=10,r}(),Mn=function(){function r(e,t){this.width=e,this.height=t;for(var n=new Array(t),i=0;i!==t;i++)n[i]=new Uint8Array(e);this.bytes=n}return r.prototype.getHeight=function(){return this.height},r.prototype.getWidth=function(){return this.width},r.prototype.get=function(e,t){return this.bytes[t][e]},r.prototype.getArray=function(){return this.bytes},r.prototype.setNumber=function(e,t,n){this.bytes[t][e]=n},r.prototype.setBoolean=function(e,t,n){this.bytes[t][e]=n?1:0},r.prototype.clear=function(e){var t,n;try{for(var i=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.bytes),o=i.next();!o.done;o=i.next())te.fill(o.value,e)}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},r.prototype.equals=function(e){if(!(e instanceof r))return!1;var t=e;if(this.width!==t.width||this.height!==t.height)return!1;for(var n=0,i=this.height;n<i;++n)for(var o=this.bytes[n],a=t.bytes[n],s=0,c=this.width;s<c;++s)if(o[s]!==a[s])return!1;return!0},r.prototype.toString=function(){for(var e=new K,t=0,n=this.height;t<n;++t){for(var i=this.bytes[t],o=0,a=this.width;o<a;++o)switch(i[o]){case 0:e.append(" 0");break;case 1:e.append(" 1");break;default:e.append(" ")}e.append("\n")}return e.toString()},r}(),Mr=function(){function r(){this.maskPattern=-1}return r.prototype.getMode=function(){return this.mode},r.prototype.getECLevel=function(){return this.ecLevel},r.prototype.getVersion=function(){return this.version},r.prototype.getMaskPattern=function(){return this.maskPattern},r.prototype.getMatrix=function(){return this.matrix},r.prototype.toString=function(){var e=new K;
1return e.append("<<\n"),e.append(" mode: "),e.append(this.mode?this.mode.toString():"null"),e.append("\n ecLevel: "),e.append(this.ecLevel?this.ecLevel.toString():"null"),e.append("\n version: "),e.append(this.version?this.version.toString():"null"),e.append("\n maskPattern: "),e.append(this.maskPattern.toString()),this.matrix?(e.append("\n matrix:\n"),e.append(this.matrix.toString())):e.append("\n matrix: null\n"),e.append(">>\n"),e.toString()},r.prototype.setMode=function(e){this.mode=e},r.prototype.setECLevel=function(e){this.ecLevel=e},r.prototype.setVersion=function(e){this.version=e},r.prototype.setMaskPattern=function(e){this.maskPattern=e},r.prototype.setMatrix=function(e){this.matrix=e},r.isValidMaskPattern=function(e){return e>=0&&e<r.NUM_MASK_PATTERNS},r.NUM_MASK_PATTERNS=8,r}();var Bc=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Se=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return Bc(e,r),e.kind="WriterException",e}(ee),Rn=function(){function r(){}return r.clearMatrix=function(e){e.clear(255)},r.buildMatrix=function(e,t,n,i,o){r.clearMatrix(o),r.embedBasicPatterns(n,o),r.embedTypeInfo(t,i,o),r.maybeEmbedVersionInfo(n,o),r.embedDataBits(e,i,o)},r.embedBasicPatterns=function(e,t){r.embedPositionDetectionPatternsAndSeparators(t),r.embedDarkDotAtLeftBottomCorner(t),r.maybeEmbedPositionAdjustmentPatterns(e,t),r.embedTimingPatterns(t)},r.embedTypeInfo=function(e,t,n){var i=new Ae;r.makeTypeInfoBits(e,t,i);for(var o=0,a=i.getSize();o<a;++o){var s=i.get(i.getSize()-1-o),c=r.TYPE_INFO_COORDINATES[o];if(n.setBoolean(c[0],c[1],s),o<8){var d=n.getWidth()-o-1;n.setBoolean(d,l=8,s)}else{d=8;var l=n.getHeight()-7+(o-8);n.setBoolean(d,l,s)}}},r.maybeEmbedVersionInfo=function(e,t){if(!(e.getVersionNumber()<7)){var n=new Ae;r.makeVersionInfoBits(e,n);for(var i=17,o=0;o<6;++o)for(var a=0;a<3;++a){var s=n.get(i);i--,t.setBoolean(o,t.getHeight()-11+a,s),t.setBoolean(t.getHeight()-11+a,o,s)}}},r.embedDataBits=function(e,t,n){for(var i=0,o=-1,a=n.getWidth()-1,s=n.getHeight()-1;a>0;){for(6===a&&(a-=1);s>=0&&s<n.getHeight();){for(var c=0;c<2;++c){var u=a-c;if(r.isEmpty(n.get(u,s))){var f=void 0;i<e.getSize()?(f=e.get(i),++i):f=!1,255!==t&&Kt.getDataMaskBit(t,u,s)&&(f=!f),n.setBoolean(u,s,f)}}s+=o}s+=o=-o,a-=2}if(i!==e.getSize())throw new Se("Not all bits consumed: "+i+"/"+e.getSize())},r.findMSBSet=function(e){return 32-Q.numberOfLeadingZeros(e)},r.calculateBCHCode=function(e,t){if(0===t)throw new X("0 polynomial");var n=r.findMSBSet(t);for(e<<=n-1;r.findMSBSet(e)>=n;)e^=t<<r.findMSBSet(e)-n;return e},r.makeTypeInfoBits=function(e,t,n){if(!Mr.isValidMaskPattern(t))throw new Se("Invalid mask pattern");var i=e.getBits()<<3|t;n.appendBits(i,5);var o=r.calculateBCHCode(i,r.TYPE_INFO_POLY);n.appendBits(o,10);var a=new Ae;if(a.appendBits(r.TYPE_INFO_MASK_PATTERN,15),n.xor(a),15!==n.getSize())throw new Se("should not happen but we got: "+n.getSize())},r.makeVersionInfoBits=function(e,t){t.appendBits(e.getVersionNumber(),6);var n=r.calculateBCHCode(e.getVersionNumber(),r.VERSION_INFO_POLY);if(t.appendBits(n,12),18!==t.getSize())throw new Se("should not happen but we got: "+t.getSize())},r.isEmpty=function(e){return 255===e},r.embedTimingPatterns=function(e){for(var t=8;t<e.getWidth()-8;++t){var n=(t+1)%2;r.isEmpty(e.get(t,6))&&e.setNumber(t,6,n),r.isEmpty(e.get(6,t))&&e.setNumber(6,t,n)}},r.embedDarkDotAtLeftBottomCorner=function(e){if(0===e.get(8,e.getHeight()-8))throw new Se;e.setNumber(8,e.getHeight()-8,1)},r.embedHorizontalSeparationPattern=function(e,t,n){for(var i=0;i<8;++i){if(!r.isEmpty(n.get(e+i,t)))throw new Se;n.setNumber(e+i,t,0)}},r.embedVerticalSeparationPattern=function(e,t,n){for(var i=0;i<7;++i){if(!r.isEmpty(n.get(e,t+i)))throw new Se;n.setNumber(e,t+i,0)}},r.embedPositionAdjustmentPattern=function(e,t,n){for(var i=0;i<5;++i)for(var o=r.POSITION_ADJUSTMENT_PATTERN[i],a=0;a<5;
1++a)n.setNumber(e+a,t+i,o[a])},r.embedPositionDetectionPattern=function(e,t,n){for(var i=0;i<7;++i)for(var o=r.POSITION_DETECTION_PATTERN[i],a=0;a<7;++a)n.setNumber(e+a,t+i,o[a])},r.embedPositionDetectionPatternsAndSeparators=function(e){var t=r.POSITION_DETECTION_PATTERN[0].length;r.embedPositionDetectionPattern(0,0,e),r.embedPositionDetectionPattern(e.getWidth()-t,0,e),r.embedPositionDetectionPattern(0,e.getWidth()-t,e),r.embedHorizontalSeparationPattern(0,7,e),r.embedHorizontalSeparationPattern(e.getWidth()-8,7,e),r.embedHorizontalSeparationPattern(0,e.getWidth()-8,e),r.embedVerticalSeparationPattern(7,0,e),r.embedVerticalSeparationPattern(e.getHeight()-7-1,0,e),r.embedVerticalSeparationPattern(7,e.getHeight()-7,e)},r.maybeEmbedPositionAdjustmentPatterns=function(e,t){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,i=r.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],o=0,a=i.length;o!==a;o++){var s=i[o];if(s>=0)for(var c=0;c!==a;c++){var u=i[c];u>=0&&r.isEmpty(t.get(u,s))&&r.embedPositionAdjustmentPattern(u-2,s-2,t)}}},r.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])]),r.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])]),r.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])]),r.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])]),r.VERSION_INFO_POLY=7973,r.TYPE_INFO_POLY=1335,r.TYPE_INFO_MASK_PATTERN=21522,r}(),Uc=function(){function r(e,t){this.dataBytes=e,this.errorCorrectionBytes=t}return r.prototype.getDataBytes=function(){return this.dataBytes},r.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},r}();var Nn=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const Rr=function(){function r(){}return r.calculateMaskPenalty=function(e){return Kt.applyMaskPenaltyRule1(e)+Kt.applyMaskPenaltyRule2(e)+Kt.applyMaskPenaltyRule3(e)+Kt.applyMaskPenaltyRule4(e)},r.encode=function(e,t,n){void 0===n&&(n=null);var i=r.DEFAULT_BYTE_MODE_ENCODING,o=null!==n&&void 0!==n.get(ye.CHARACTER_SET);o&&(i=n.get(ye.CHARACTER_SET).toString());var a=this.chooseMode(e,i),s=new Ae;if(a===Oe.BYTE&&(o||r.DEFAULT_BYTE_MODE_ENCODING!==i)){var c=F.getCharacterSetECIByName(i);void 0!==c&&this.appendECI(c,s)}this.appendModeInfo(a,s);var f,u=new Ae;if(this.appendBytes(e,a,u,i),null!==n&&void 0!==n.get(ye.QR_VERSION)){var d=Number.parseInt(n.get(ye.QR_VERSION).toString(),10);f=Tt.getVersionForNumber(d);var l=this.calculateBitsNeeded(a,s,u,f);if(!this.willFit(l,f,t))throw new Se("Data too big for requested version")}else f=this.recommendVersion(t,a,s,u);var h=new Ae;h.appendBitArray(s);var p=a===Oe.BYTE?u.getSizeInBytes():e.length;this.appendLengthInfo(p,f,a,h),h.appendBitArray(u);var C=f.getECBlocksForLevel(t),A=f.getTotalCodewords()-C.getTotalECCodewords();this.terminateBits(A,h);var S=this.interleaveWithECBytes(h,f.getTotalCodewords(),A,C.getNumBlocks()),O=new Mr;O.setECLevel(t),O.setMode(a),O.setVersion(f);var D=f.getDimensionForVersion(),P=new Mn(D,D),B=this.chooseMaskPattern(S,t,f,P);
1return O.setMaskPattern(B),Rn.buildMatrix(S,t,f,B,P),O.setMatrix(P),O},r.recommendVersion=function(e,t,n,i){var o=this.calculateBitsNeeded(t,n,i,Tt.getVersionForNumber(1)),a=this.chooseVersion(o,e),s=this.calculateBitsNeeded(t,n,i,a);return this.chooseVersion(s,e)},r.calculateBitsNeeded=function(e,t,n,i){return t.getSize()+e.getCharacterCountBits(i)+n.getSize()},r.getAlphanumericCode=function(e){return e<r.ALPHANUMERIC_TABLE.length?r.ALPHANUMERIC_TABLE[e]:-1},r.chooseMode=function(e,t){if(void 0===t&&(t=null),F.SJIS.getName()===t&&this.isOnlyDoubleByteKanji(e))return Oe.KANJI;for(var n=!1,i=!1,o=0,a=e.length;o<a;++o){var s=e.charAt(o);if(r.isDigit(s))n=!0;else{if(-1===this.getAlphanumericCode(s.charCodeAt(0)))return Oe.BYTE;i=!0}}return i?Oe.ALPHANUMERIC:n?Oe.NUMERIC:Oe.BYTE},r.isOnlyDoubleByteKanji=function(e){var t;try{t=me.encode(e,F.SJIS)}catch{return!1}var n=t.length;if(n%2!=0)return!1;for(var i=0;i<n;i+=2){var o=255&t[i];if((o<129||o>159)&&(o<224||o>235))return!1}return!0},r.chooseMaskPattern=function(e,t,n,i){for(var o=Number.MAX_SAFE_INTEGER,a=-1,s=0;s<Mr.NUM_MASK_PATTERNS;s++){Rn.buildMatrix(e,t,n,s,i);var c=this.calculateMaskPenalty(i);c<o&&(o=c,a=s)}return a},r.chooseVersion=function(e,t){for(var n=1;n<=40;n++){var i=Tt.getVersionForNumber(n);if(r.willFit(e,i,t))return i}throw new Se("Data too big")},r.willFit=function(e,t,n){return t.getTotalCodewords()-t.getECBlocksForLevel(n).getTotalECCodewords()>=(e+7)/8},r.terminateBits=function(e,t){var n=8*e;if(t.getSize()>n)throw new Se("data bits cannot fit in the QR Code"+t.getSize()+" > "+n);for(var i=0;i<4&&t.getSize()<n;++i)t.appendBit(!1);var o=7&t.getSize();if(o>0)for(i=o;i<8;i++)t.appendBit(!1);var a=e-t.getSizeInBytes();for(i=0;i<a;++i)t.appendBits(1&i?17:236,8);if(t.getSize()!==n)throw new Se("Bits size does not equal capacity")},r.getNumDataBytesAndNumECBytesForBlockID=function(e,t,n,i,o,a){if(i>=n)throw new Se("Block ID too large");var s=e%n,c=n-s,u=Math.floor(e/n),f=u+1,d=Math.floor(t/n),l=d+1,h=u-d,p=f-l;if(h!==p)throw new Se("EC bytes mismatch");if(n!==c+s)throw new Se("RS blocks mismatch");if(e!==(d+h)*c+(l+p)*s)throw new Se("Total bytes mismatch");i<c?(o[0]=d,a[0]=h):(o[0]=l,a[0]=p)},r.interleaveWithECBytes=function(e,t,n,i){var o,a,s,c;if(e.getSizeInBytes()!==n)throw new Se("Number of bits and data bytes does not match");for(var u=0,f=0,d=0,l=new Array,h=0;h<i;++h){var p=new Int32Array(1),C=new Int32Array(1);r.getNumDataBytesAndNumECBytesForBlockID(t,n,i,h,p,C);var A=p[0],S=new Uint8Array(A);e.toBytes(8*u,S,0,A);var O=r.generateECBytes(S,C[0]);l.push(new Uc(S,O)),f=Math.max(f,A),d=Math.max(d,O.length),u+=p[0]}if(n!==u)throw new Se("Data bytes does not match offset");var D=new Ae;for(h=0;h<f;++h)try{for(var P=(o=void 0,Nn(l)),B=P.next();!B.done;B=P.next())h<(S=B.value.getDataBytes()).length&&D.appendBits(S[h],8)}catch(re){o={error:re}}finally{try{B&&!B.done&&(a=P.return)&&a.call(P)}finally{if(o)throw o.error}}for(h=0;h<d;++h)try{for(var U=(s=void 0,Nn(l)),Y=U.next();!Y.done;Y=U.next())h<(O=Y.value.getErrorCorrectionBytes()).length&&D.appendBits(O[h],8)}catch(re){s={error:re}}finally{try{Y&&!Y.done&&(c=U.return)&&c.call(U)}finally{if(s)throw s.error}}if(t!==D.getSizeInBytes())throw new Se("Interleaving error: "+t+" and "+D.getSizeInBytes()+" differ.");return D},r.generateECBytes=function(e,t){for(var n=e.length,i=new Int32Array(n+t),o=0;o<n;o++)i[o]=255&e[o];new Pn(Ke.QR_CODE_FIELD_256).encode(i,t);var a=new Uint8Array(t);for(o=0;o<t;o++)a[o]=i[n+o];return a},r.appendModeInfo=function(e,t){t.appendBits(e.getBits(),4)},r.appendLengthInfo=function(e,t,n,i){var o=n.getCharacterCountBits(t);if(e>=1<<o)throw new Se(e+" is bigger than "+((1<<o)-1));i.appendBits(e,o)},r.appendBytes=function(e,t,n,i){switch(t){case Oe.NUMERIC:r.appendNumericBytes(e,n);break;case Oe.ALPHANUMERIC:r.appendAlphanumericBytes(e,n);break;case Oe.BYTE:r.append8BitBytes(e,n,i);break;case Oe.KANJI:r.appendKanjiBytes(e,n);break;default:throw new Se("Invalid mode: "+t)}},r.getDigit=function(e){return e.charCodeAt(0)-48},r.isDigit=function(e){var t=r.getDigit(e);return t>=0&&t<=9},r.appendNumericBytes=function(e,t){for(var n=e.length,i=0;i<n;){var o=r.getDigit(e.charAt(i));if(i+2<n){var a=r.getDigit(e.charAt(i+1)),s=r.getDigit(e.charAt(i+2));t.appendBits(100*o+10*a+s,10),i+=3}else i+1<n?(a=r.getDigit(e.charAt(i+1)),t.appendBits(10*o+a,7),i+=2):(t.appendBits(o,4),i++)}},r.appendAlphanumericBytes=function(e,t){for(var n=e.length,i=0;i<n;){var o=r.getAlphanumericCode(e.charCodeAt(i));if(-1===o)throw new Se;if(i+1<n){var a=r.getAlphanumericCode(e.charCodeAt(i+1));if(-1===a)throw new Se;t.appendBits(45*o+a,11),i+=2}else t.appendBits(o,6),i++}},r.append8BitBytes=function(e,t,n){var i;try{i=me.encode(e,n)}catch(c){throw new Se(c)}for(var o=0,a=i.length;o!==a;o++)t.appendBits(i[o],8)},r.appendKanjiBytes=function(e,t){var n;try{n=me.encode(e,F.SJIS)}catch(d){throw new Se(d)}for(var i=n.length,o=0;o<i;o+=2){var c=(255&n[o])<<8&4294967295|255&n[o+1],u=-1;if(c>=33088&&c<=40956?u=c-33088:c>=57408&&c<=60351&&(u=c-49472),-1===u)throw new Se("Invalid byte sequence");t.appendBits(192*(u>>8)+(255&u),13)}},r.appendECI=function(e,t){t.appendBits(Oe.ECI.getBits(),4),t.appendBits(e.getValue(),8)},r.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]),r.DEFAULT_BYTE_MODE_ENCODING=F.UTF8.getName(),r}();!function(){function r(){}r.prototype.write=function(e,t,n,i){if(void 0===i&&(i=null),0===e.length)throw new X("Found empty contents");if(t<0||n<0)throw new X("Requested dimensions are too small: "+t+"x"+n);var o=Wt.L,a=r.QUIET_ZONE_SIZE;null!==i&&(void 0!==i.get(ye.ERROR_CORRECTION)&&(o=Wt.fromString(i.get(ye.ERROR_CORRECTION).toString())),void 0!==i.get(ye.MARGIN)&&(a=Number.parseInt(i.get(ye.MARGIN).toString(),10)));var s=Rr.encode(e,o,i);return this.renderResult(s,t,n,a)},r.prototype.writeToDom=function(e,t,n,i,o){void 0===o&&(o=null),"string"==typeof e&&(e=document.querySelector(e));var a=this.write(t,n,i,o);e&&e.appendChild(a)},r.prototype.renderResult=function(e,t,n,i){var o=e.getMatrix();if(null===o)throw new pt;for(var a=o.getWidth(),s=o.getHeight(),c=a+2*i,u=s+2*i,f=Math.max(t,c),d=Math.max(n,u),l=Math.min(Math.floor(f/c),Math.floor(d/u)),h=Math.floor((f-a*l)/2),p=Math.floor((d-s*l)/2),C=this.createSVGElement(f,d),A=0,S=p;A<s;A++,S+=l)for(var O=0,D=h;O<a;O++,D+=l)if(1===o.get(O,A)){var P=this.createSvgRectElement(D,S,l,l);C.appendChild(P)}return C},r.prototype.createSVGElement=function(e,t){var n=document.createElementNS(r.SVG_NS,"svg");return n.setAttributeNS(null,"height",e.toString()),n.setAttributeNS(null,"width",t.toString()),n},r.prototype.createSvgRectElement=function(e,t,n,i){var o=document.createElementNS(r.SVG_NS,"rect");return o.setAttributeNS(null,"x",e.toString()),o.setAttributeNS(null,"y",t.toString()),o.setAttributeNS(null,"height",n.toString()),o.setAttributeNS(null,"width",i.toString()),o.setAttributeNS(null,"fill","#000000"),o},r.QUIET_ZONE_SIZE=4,r.SVG_NS="http://www.w3.org/2000/svg"}();!function(){function r(){}r.prototype.encode=function(e,t,n,i,o){if(0===e.length)throw new X("Found empty contents");if(t!==Z.QR_CODE)throw new X("Can only encode QR_CODE, but got "+t);if(n<0||i<0)throw new X("Requested dimensions are too small: "+n+"x"+i);var a=Wt.L,s=r.QUIET_ZONE_SIZE;null!==o&&(void 0!==o.get(ye.ERROR_CORRECTION)&&(a=Wt.fromString(o.get(ye.ERROR_CORRECTION).toString())),void 0!==o.get(ye.MARGIN)&&(s=Number.parseInt(o.get(ye.MARGIN).toString(),10)));var c=Rr.encode(e,a,o);return r.renderResult(c,n,i,s)},r.renderResult=function(e,t,n,i){var o=e.getMatrix();if(null===o)throw new pt;for(var a=o.getWidth(),s=o.getHeight(),c=a+2*i,u=s+2*i,f=Math.max(t,c),d=Math.max(n,u),l=Math.min(Math.floor(f/c),Math.floor(d/u)),h=Math.floor((f-a*l)/2),p=Math.floor((d-s*l)/2),C=new we(f,d),A=0,S=p;A<s;A++,S+=l)for(var O=0,D=h;O<a;O++,D+=l)1===o.get(O,A)&&C.setRegion(D,S,l,l);return C},r.QUIET_ZONE_SIZE=4}();var Wc=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();!function(r){function e(t,n,i,o,a,s,c,u){var f=r.call(this,s,c)||this;if(f.yuvData=t,f.dataWidth=n,f.dataHeight=i,f.left=o,f.top=a,o+s>n||a+c>i)throw new X("Crop rectangle does not fit within image data.");return u&&f.reverseHorizontal(s,c),f}Wc(e,r),e.prototype.getRow=function(t,n){if(t<0||t>=this.getHeight())throw new X("Requested row is outside the image: "+t);var i=this.getWidth();return(null==n||n.length<i)&&(n=new Uint8ClampedArray(i)),le.arraycopy(this.yuvData,(t+this.top)*this.dataWidth+this.left,n,0,i),n},e.prototype.getMatrix=function(){var t=this.getWidth(),n=this.getHeight();if(t===this.dataWidth&&n===this.dataHeight)return this.yuvData;var i=t*n,o=new Uint8ClampedArray(i),a=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return le.arraycopy(this.yuvData,a,o,0,i),o;for(var s=0;s<n;s++)le.arraycopy(this.yuvData,a,o,s*t,t),a+=this.dataWidth;return o},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,n,i,o){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+n,i,o,!1)},e.prototype.renderThumbnail=function(){for(var t=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,n=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,i=new Int32Array(t*n),o=this.yuvData,a=this.top*this.dataWidth+this.left,s=0;s<n;s++){for(var c=s*t,u=0;u<t;u++)i[c+u]=4278190080|65793*(255&o[a+u*e.THUMBNAIL_SCALE_FACTOR]);a+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return i},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(t,n){for(var i=this.yuvData,o=0,a=this.top*this.dataWidth+this.left;o<n;o++,a+=this.dataWidth)for(var s=a+t/2,c=a,u=a+t-1;c<s;c++,u--){var f=i[c];i[c]=i[u],i[u]=f}},e.prototype.invert=function(){return new er(this)},e.THUMBNAIL_SCALE_FACTOR=2}(zt);var zc=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();!function(r){function e(t,n,i,o,a,s,c){var u=r.call(this,n,i)||this;if(u.dataWidth=o,u.dataHeight=a,u.left=s,u.top=c,4===t.BYTES_PER_ELEMENT){for(var f=n*i,d=new Uint8ClampedArray(f),l=0;l<f;l++){var h=t[l];d[l]=((h>>16&255)+(h>>7&510)+(255&h))/4&255}u.luminances=d}else u.luminances=t;if(void 0===o&&(u.dataWidth=n),void 0===a&&(u.dataHeight=i),void 0===s&&(u.left=0),void 0===c&&(u.top=0),u.left+n>u.dataWidth||u.top+i>
1u.dataHeight)throw new X("Crop rectangle does not fit within image data.");return u}zc(e,r),e.prototype.getRow=function(t,n){if(t<0||t>=this.getHeight())throw new X("Requested row is outside the image: "+t);var i=this.getWidth();return(null==n||n.length<i)&&(n=new Uint8ClampedArray(i)),le.arraycopy(this.luminances,(t+this.top)*this.dataWidth+this.left,n,0,i),n},e.prototype.getMatrix=function(){var t=this.getWidth(),n=this.getHeight();if(t===this.dataWidth&&n===this.dataHeight)return this.luminances;var i=t*n,o=new Uint8ClampedArray(i),a=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return le.arraycopy(this.luminances,a,o,0,i),o;for(var s=0;s<n;s++)le.arraycopy(this.luminances,a,o,s*t,t),a+=this.dataWidth;return o},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,n,i,o){return new e(this.luminances,i,o,this.dataWidth,this.dataHeight,this.left+t,this.top+n)},e.prototype.invert=function(){return new er(this)}}(zt);var Xc=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Nr=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return Xc(e,r),e.forName=function(t){return this.getCharacterSetECIByName(t)},e}(F),Bn=function(){function r(){}return r.ISO_8859_1=F.ISO8859_1,r}(),Zc=function(){function r(e,t,n){this.codewords=e,this.numcols=t,this.numrows=n,this.bits=new Uint8Array(t*n),te.fill(this.bits,2)}return r.prototype.getNumrows=function(){return this.numrows},r.prototype.getNumcols=function(){return this.numcols},r.prototype.getBits=function(){return this.bits},r.prototype.getBit=function(e,t){return 1===this.bits[t*this.numcols+e]},r.prototype.setBit=function(e,t,n){this.bits[t*this.numcols+e]=n?1:0},r.prototype.noBit=function(e,t){return 2===this.bits[t*this.numcols+e]},r.prototype.place=function(){var e=0,t=4,n=0;do{t===this.numrows&&0===n&&this.corner1(e++),t===this.numrows-2&&0===n&&this.numcols%4!=0&&this.corner2(e++),t===this.numrows-2&&0===n&&this.numcols%8==4&&this.corner3(e++),t===this.numrows+4&&2===n&&this.numcols%8==0&&this.corner4(e++);do{t<this.numrows&&n>=0&&this.noBit(n,t)&&this.utah(t,n,e++),t-=2,n+=2}while(t>=0&&n<this.numcols);t++,n+=3;do{t>=0&&n<this.numcols&&this.noBit(n,t)&&this.utah(t,n,e++),t+=2,n-=2}while(t<this.numrows&&n>=0);t+=3,n++}while(t<this.numrows||n<this.numcols);this.noBit(this.numcols-1,this.numrows-1)&&(this.setBit(this.numcols-1,this.numrows-1,!0),this.setBit(this.numcols-2,this.numrows-2,!0))},r.prototype.module=function(e,t,n,i){e<0&&(e+=this.numrows,t+=4-(this.numrows+4)%8),t<0&&(t+=this.numcols,e+=4-(this.numcols+4)%8);var o=this.codewords.charCodeAt(n);this.setBit(t,e,0!=(o&=1<<8-i))},r.prototype.utah=function(e,t,n){this.module(e-2,t-2,n,1),this.module(e-2,t-1,n,2),this.module(e-1,t-2,n,3),this.module(e-1,t-1,n,4),this.module(e-1,t,n,5),this.module(e,t-2,n,6),this.module(e,t-1,n,7),this.module(e,t,n,8)},r.prototype.corner1=function(e){this.module(this.numrows-1,0,e,1),this.module(this.numrows-1,1,e,2),this.module(this.numrows-1,2,e,3),this.module(0,this.numcols-2,e,4),this.module(0,this.numcols-1,e,5),this.module(1,this.numcols-1,e,6),this.module(2,this.numcols-1,e,7),this.module(3,this.numcols-1,e,8)},r.prototype.corner2=function(e){this.module(this.numrows-3,0,e,1),this.module(this.numrows-2,0,e,2),this.module(this.numrows-1,0,e,3),this.module(0,this.numcols-4,e,4),this.module(0,this.numcols-3,e,5),this.module(0,this.numcols-2,e,6),this.module(0,this.numcols-1,e,7),this.module(1,this.numcols-1,e,8)},r.prototype.corner3=function(e){this.module(this.numrows-3,0,e,1),this.module(this.numrows-2,0,e,2),this.module(this.numrows-1,0,e,3),this.module(0,this.numcols-2,e,4),this.module(0,this.numcols-1,e,5),this.module(1,this.numcols-1,e,6),this.module(2,this.numcols-1,e,7),this.module(3,this.numcols-1,e,8)},r.prototype.corner4=function(e){this.module(this.numrows-1,0,e,1),this.module(this.numrows-1,this.numcols-1,e,2),this.module(0,this.numcols-3,e,3),this.module(0,this.numcols-2,e,4),this.module(0,this.numcols-1,e,5),this.module(1,this.numcols-3,e,6),this.module(1,this.numcols-2,e,7),this.module(1,this.numcols-1,e,8)},r}();
1var Br,Fn=[5,7,10,11,12,14,18,20,24,28,36,42,48,56,62,68],Kc=[[228,48,15,111,62],[23,68,144,134,240,92,254],[28,24,185,166,223,248,116,255,110,61],[175,138,205,12,194,168,39,245,60,97,120],[41,153,158,91,61,42,142,213,97,178,100,242],[156,97,192,252,95,9,157,119,138,45,18,186,83,185],[83,195,100,39,188,75,66,61,241,213,109,129,94,254,225,48,90,188],[15,195,244,9,233,71,168,2,188,160,153,145,253,79,108,82,27,174,186,172],[52,190,88,205,109,39,176,21,155,197,251,223,155,21,5,172,254,124,12,181,184,96,50,193],[211,231,43,97,71,96,103,174,37,151,170,53,75,34,249,121,17,138,110,213,141,136,120,151,233,168,93,255],[245,127,242,218,130,250,162,181,102,120,84,179,220,251,80,182,229,18,2,4,68,33,101,137,95,119,115,44,175,184,59,25,225,98,81,112],[77,193,137,31,19,38,22,153,247,105,122,2,245,133,242,8,175,95,100,9,167,105,214,111,57,121,21,1,253,57,54,101,248,202,69,50,150,177,226,5,9,5],[245,132,172,223,96,32,117,22,238,133,238,231,205,188,237,87,191,106,16,147,118,23,37,90,170,205,131,88,120,100,66,138,186,240,82,44,176,87,187,147,160,175,69,213,92,253,225,19],[175,9,223,238,12,17,220,208,100,29,175,170,230,192,215,235,150,159,36,223,38,200,132,54,228,146,218,234,117,203,29,232,144,238,22,150,201,117,62,207,164,13,137,245,127,67,247,28,155,43,203,107,233,53,143,46],[242,93,169,50,144,210,39,118,202,188,201,189,143,108,196,37,185,112,134,230,245,63,197,190,250,106,185,221,175,64,114,71,161,44,147,6,27,218,51,63,87,10,40,130,188,17,163,31,176,170,4,107,232,7,94,166,224,124,86,47,11,204],[220,228,173,89,251,149,159,56,89,33,147,244,154,36,73,127,213,136,248,180,234,197,158,177,68,122,93,213,15,160,227,236,66,139,153,185,202,167,179,25,220,232,96,210,231,136,223,239,181,241,59,52,172,25,49,232,211,189,64,54,108,153,132,63,96,103,82,186]],hr=(Br=function(r,e){for(var t=1,n=0;n<255;n++)e[n]=t,r[t]=n,(t*=2)>=256&&(t^=301);return{LOG:r,ALOG:e}}([],[])).LOG,Ln=Br.ALOG,vr="[)>\x1e05\x1d",pr="[)>\x1e06\x1d";const u1=function(){function r(){}return r.encodeECC200=function(e,t){if(e.length!==t.getDataCapacity())throw new Error("The number of codewords does not match the selected symbol");var n=new K;n.append(e);var i=t.getInterleavedBlockCount();if(1===i){var o=this.createECCBlock(e,t.getErrorCodewords());n.append(o)}else{for(var a=[],s=[],c=0;c<i;c++)a[c]=t.getDataLengthForInterleavedBlock(c+1),s[c]=t.getErrorLengthForInterleavedBlock(c+1);for(var u=0;u<i;u++){for(var f=new K,d=u;d<t.getDataCapacity();d+=i)f.append(e.charAt(d));o=this.createECCBlock(f.toString(),s[u]);for(var l=0,h=u;h<s[u]*i;h+=i)n.setCharAt(t.getDataCapacity()+h,o.charAt(l++))}}return n.toString()},r.createECCBlock=function(e,t){for(var n=-1,i=0;i<Fn.length;i++)if(Fn[i]===t){n=i;break}if(n<0)throw new Error("Illegal number of error correction codewords specified: "+t);var o=Kc[n],a=[];for(i=0;i<t;i++)a[i]=0;for(i=0;i<e.length;i++){for(var s=a[t-1]^e.charAt(i).charCodeAt(0),c=t-1;c>0;c--)a[c]=0!==s&&0!==o[c]?a[c-1]^Ln[(hr[s]+hr[o[c]])%255]:a[c-1];a[0]=0!==s&&0!==o[0]?Ln[(hr[s]+hr[o[0]])%255]:0}var u=[];for(i=0;i<t;i++)u[i]=a[t-i-1];return u.map(function(f){return String.fromCharCode(f)}).join("")},r}();var f1=function(){function r(){}return r.prototype.getEncodingMode=function(){return 0},r.prototype.encode=function(e){if(se.determineConsecutiveDigitCount(e.getMessage(),e.pos)>=2)e.writeCodeword(this.encodeASCIIDigits(e.getMessage().charCodeAt(e.pos),e.getMessage().charCodeAt(e.pos+1))),e.pos+=2;else{var n=e.getCurrentChar(),i=se.lookAheadTest(e.getMessage(),e.pos,this.getEncodingMode());if(i!==this.getEncodingMode())switch(i){case 5:return e.writeCodeword(231),void e.signalEncoderChange(5);case 1:return e.writeCodeword(230),void e.signalEncoderChange(1);case 3:e.writeCodeword(238),e.signalEncoderChange(3);break;case 2:e.writeCodeword(239),e.signalEncoderChange(2);break;case 4:e.writeCodeword(240),e.signalEncoderChange(4);break;default:throw new Error("Illegal mode: "+i)}else se.isExtendedASCII(n)?(e.writeCodeword(235),e.writeCodeword(n-128+1),e.pos++):(e.writeCodeword(n+1),e.pos++)}},r.prototype.encodeASCIIDigits=function(e,t){if(se.isDigit(e)&&se.isDigit(t))return 10*(e-48)+(t-48)+130;throw new Error("not digits: "+e+t)},r}(),d1=function(){function r(){}return r.prototype.getEncodingMode=function(){return 5},r.prototype.encode=function(e){var t=new K;for(t.append(0);e.hasMoreCharacters();){var n=e.getCurrentChar();if(t.append(n),e.pos++,se.lookAheadTest(e.getMessage(),e.pos,this.getEncodingMode())!==this.getEncodingMode()){e.signalEncoderChange(0);break}}var o=t.length()-1,s=e.getCodewordCount()+o+1;e.updateSymbolInfo(s);var c=e.getSymbolInfo().getDataCapacity()-s>0;if(e.hasMoreCharacters()||c)if(o<=249)t.setCharAt(0,q.getCharAt(o));else{if(!(o<=1555))throw new Error("Message length not in valid ranges: "+o);t.setCharAt(0,q.getCharAt(Math.floor(o/250)+249)),t.insert(1,q.getCharAt(o%250))}var u=0;for(n=t.length();u<n;u++)e.writeCodeword(this.randomize255State(t.charAt(u).charCodeAt(0),e.getCodewordCount()+1))},r.prototype.randomize255State=function(e,t){var i=e+(149*t%255+1);return i<=255?i:i-256},r}(),Lr=function(){function r(){}return r.prototype.getEncodingMode=function(){return 1},r.prototype.encodeMaximal=function(e){for(var t=new K,n=0,i=e.pos,o=0;e.hasMoreCharacters();){var a=e.getCurrentChar();e.pos++,n=this.encodeChar(a,t),t.length()%3==0&&(i=e.pos,o=t.length())}if(o!==t.length()){var s=Math.floor(t.length()/3*2),c=Math.floor(e.getCodewordCount()+s+1);e.updateSymbolInfo(c);var u=e.getSymbolInfo().getDataCapacity()-c,f=Math.floor(t.length()%3);(2===f&&2!==u||1===f&&(n>3||1!==u))&&(e.pos=i)}t.length()>0&&e.writeCodeword(230),this.handleEOD(e,t)},r.prototype.encode=function(e){for(var t=new K;e.hasMoreCharacters();){var n=e.getCurrentChar();e.pos++;var i=this.encodeChar(n,t),o=2*Math.floor(t.length()/3),a=e.getCodewordCount()+o;e.updateSymbolInfo(a);var s=e.getSymbolInfo().getDataCapacity()-a;if(!e.hasMoreCharacters()){var c=new K;for(t.length()%3==2&&2!==s&&(i=this.backtrackOneCharacter(e,t,c,i));t.length()%3==1&&(i>3||1!==s);)i=this.backtrackOneCharacter(e,t,c,i);break}if(t.length()%3==0&&se.lookAheadTest(e.getMessage(),e.pos,this.getEncodingMode())!==this.getEncodingMode()){e.signalEncoderChange(0);break}}this.handleEOD(e,t)},r.prototype.backtrackOneCharacter=function(e,t,n,i){var o=t.length(),a=t.toString().substring(0,o-i);t.setLengthToZero(),t.append(a),e.pos--;var s=e.getCurrentChar();return i=this.encodeChar(s,n),e.resetSymbolInfo(),i},r.prototype.writeNextTriplet=function(e,t){e.writeCodewords(this.encodeToCodewords(t.toString()));var n=t.toString().substring(3);t.setLengthToZero(),t.append(n)},r.prototype.handleEOD=function(e,t){var n=Math.floor(t.length()/3*2),i=t.length()%3,o=e.getCodewordCount()+n;e.updateSymbolInfo(o);var a=e.getSymbolInfo().getDataCapacity()-o;if(2===i){for(t.append("\0");t.length()>=3;)this.writeNextTriplet(e,t);e.hasMoreCharacters()&&e.writeCodeword(254)}else if(1===a&&1===i){for(;t.length()>=3;)this.writeNextTriplet(e,t);e.hasMoreCharacters()&&e.writeCodeword(254),e.pos--}else{if(0!==i)throw new Error("Unexpected case. Please report!");for(;t.length()>=3;)this.writeNextTriplet(e,t);(a>0||e.hasMoreCharacters())&&e.writeCodeword(254)}e.signalEncoderChange(0)},r.prototype.encodeChar=function(e,t){return 32===e?(t.append(3),1):e>=48&&e<=57?(t.append(e-48+4),1):e>=65&&e<=90?(t.append(e-65+14),1):e<32?(t.append(0),t.append(e),2):e<=47?(t.append(1),t.append(e-33),2):e<=64?(t.append(1),t.append(e-58+15),2):e<=95?(t.append(1),t.append(e-91+22),2):e<=127?(t.append(2),t.append(e-96),2):(t.append("1\x1e"),2+this.encodeChar(e-128,t))},r.prototype.encodeToCodewords=function(e){var t=1600*e.charCodeAt(0)+40*e.charCodeAt(1)+e.charCodeAt(2)+1,n=t/256,i=t%256,o=new K;return o.append(n),o.append(i),o.toString()},r}(),l1=function(){function r(){}return r.prototype.getEncodingMode=function(){return 4},r.prototype.encode=function(e){for(var t=new K;e.hasMoreCharacters();){var n=e.getCurrentChar();if(this.encodeChar(n,t),e.pos++,t.length()>=4){e.writeCodewords(this.encodeToCodewords(t.toString()));var o=t.toString().substring(4);if(t.setLengthToZero(),t.append(o),se.lookAheadTest(e.getMessage(),e.pos,this.getEncodingMode())!==this.getEncodingMode()){e.signalEncoderChange(0);break}}}t.append(q.getCharAt(31)),this.handleEOD(e,t)},r.prototype.handleEOD=function(e,t){try{var n=t.length();if(0===n)return;if(1===n){e.updateSymbolInfo();var i=e.getSymbolInfo().getDataCapacity()-e.getCodewordCount(),o=e.getRemainingCharacters();if(o>i&&(e.updateSymbolInfo(e.getCodewordCount()+1),i=e.getSymbolInfo().getDataCapacity()-e.getCodewordCount()),o<=i&&i<=2)return}if(n>4)throw new Error("Count must not exceed 4");var a=n-1,s=this.encodeToCodewords(t.toString()),u=!e.hasMoreCharacters()&&a<=2;a<=2&&(e.updateSymbolInfo(e.getCodewordCount()+a),(i=e.getSymbolInfo().getDataCapacity()-e.getCodewordCount())>=3&&(u=!1,e.updateSymbolInfo(e.getCodewordCount()+s.length))),u?(e.resetSymbolInfo(),e.pos-=a):e.writeCodewords(s)}
1finally{e.signalEncoderChange(0)}},r.prototype.encodeChar=function(e,t){e>=32&&e<=63?t.append(e):e>=64&&e<=94?t.append(q.getCharAt(e-64)):se.illegalCharacter(q.getCharAt(e))},r.prototype.encodeToCodewords=function(e){var t=e.length;if(0===t)throw new Error("StringBuilder must not be empty");var s=(e.charAt(0).charCodeAt(0)<<18)+((t>=2?e.charAt(1).charCodeAt(0):0)<<12)+((t>=3?e.charAt(2).charCodeAt(0):0)<<6)+(t>=4?e.charAt(3).charCodeAt(0):0),c=s>>16&255,u=s>>8&255,f=255&s,d=new K;return d.append(c),t>=2&&d.append(u),t>=3&&d.append(f),d.toString()},r}(),h1=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),ge=function(){function r(e,t,n,i,o,a,s,c){void 0===s&&(s=0),void 0===c&&(c=0),this.rectangular=e,this.dataCapacity=t,this.errorCodewords=n,this.matrixWidth=i,this.matrixHeight=o,this.dataRegions=a,this.rsBlockData=s,this.rsBlockError=c}return r.lookup=function(e,t,n,i,o){var a,s;void 0===t&&(t=0),void 0===n&&(n=null),void 0===i&&(i=null),void 0===o&&(o=!0);try{for(var c=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(g1),u=c.next();!u.done;u=c.next()){var f=u.value;if((1!==t||!f.rectangular)&&(2!==t||f.rectangular)&&(null==n||!(f.getSymbolWidth()<n.getWidth()||f.getSymbolHeight()<n.getHeight()))&&(null==i||!(f.getSymbolWidth()>i.getWidth()||f.getSymbolHeight()>i.getHeight()))&&e<=f.dataCapacity)return f}}catch(d){a={error:d}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(a)throw a.error}}if(o)throw new Error("Can't find a symbol arrangement that matches the message. Data codewords: "+e);return null},r.prototype.getHorizontalDataRegions=function(){switch(this.dataRegions){case 1:return 1;case 2:case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},r.prototype.getVerticalDataRegions=function(){switch(this.dataRegions){case 1:case 2:return 1;case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},r.prototype.getSymbolDataWidth=function(){return this.getHorizontalDataRegions()*this.matrixWidth},r.prototype.getSymbolDataHeight=function(){return this.getVerticalDataRegions()*this.matrixHeight},r.prototype.getSymbolWidth=function(){return this.getSymbolDataWidth()+2*this.getHorizontalDataRegions()},r.prototype.getSymbolHeight=function(){return this.getSymbolDataHeight()+2*this.getVerticalDataRegions()},r.prototype.getCodewordCount=function(){return this.dataCapacity+this.errorCodewords},r.prototype.getInterleavedBlockCount=function(){return this.rsBlockData?this.dataCapacity/this.rsBlockData:1},r.prototype.getDataCapacity=function(){return this.dataCapacity},r.prototype.getErrorCodewords=function(){return this.errorCodewords},r.prototype.getDataLengthForInterleavedBlock=function(e){return this.rsBlockData},r.prototype.getErrorLengthForInterleavedBlock=function(e){return this.rsBlockError},r}();const Gn=ge;var p1=function(r){function e(){return r.call(this,!1,1558,620,22,22,36,-1,62)||this}return h1(e,r),e.prototype.getInterleavedBlockCount=function(){return 10},e.prototype.getDataLengthForInterleavedBlock=function(t){return t<=8?156:155},e}(ge),g1=[new ge(!1,3,5,8,8,1),new ge(!1,5,7,10,10,1),new ge(!0,5,7,16,6,1),new ge(!1,8,10,12,12,1),new ge(!0,10,11,14,6,2),new ge(!1,12,12,14,14,1),new ge(!0,16,14,24,10,1),new ge(!1,18,14,16,16,1),new ge(!1,22,18,18,18,1),new ge(!0,22,18,16,10,2),new ge(!1,30,20,20,20,1),new ge(!0,32,24,16,14,2),new ge(!1,36,24,22,22,1),new ge(!1,44,28,24,24,1),new ge(!0,49,28,22,14,2),new ge(!1,62,36,14,14,4),new ge(!1,86,42,16,16,4),new ge(!1,114,48,18,18,4),new ge(!1,144,56,20,20,4),new ge(!1,174,68,22,22,4),new ge(!1,204,84,24,24,4,102,42),new ge(!1,280,112,14,14,16,140,56),new ge(!1,368,144,16,16,16,92,36),new ge(!1,456,192,18,18,16,114,48),new ge(!1,576,224,20,20,16,144,56),new ge(!1,696,272,22,22,16,174,68),new ge(!1,816,336,24,24,16,136,56),new ge(!1,1050,408,18,18,36,175,68),new ge(!1,1304,496,20,20,36,163,62),new p1],x1=function(){function r(e){this.msg=e,this.pos=0,this.skipAtEnd=0;
1for(var t=e.split("").map(function(s){return s.charCodeAt(0)}),n=new K,i=0,o=t.length;i<o;i++){var a=String.fromCharCode(255&t[i]);if("?"===a&&"?"!==e.charAt(i))throw new Error("Message contains characters outside ISO-8859-1 encoding.");n.append(a)}this.msg=n.toString(),this.shape=0,this.codewords=new K,this.newEncoding=-1}return r.prototype.setSymbolShape=function(e){this.shape=e},r.prototype.setSizeConstraints=function(e,t){this.minSize=e,this.maxSize=t},r.prototype.getMessage=function(){return this.msg},r.prototype.setSkipAtEnd=function(e){this.skipAtEnd=e},r.prototype.getCurrentChar=function(){return this.msg.charCodeAt(this.pos)},r.prototype.getCurrent=function(){return this.msg.charCodeAt(this.pos)},r.prototype.getCodewords=function(){return this.codewords},r.prototype.writeCodewords=function(e){this.codewords.append(e)},r.prototype.writeCodeword=function(e){this.codewords.append(e)},r.prototype.getCodewordCount=function(){return this.codewords.length()},r.prototype.getNewEncoding=function(){return this.newEncoding},r.prototype.signalEncoderChange=function(e){this.newEncoding=e},r.prototype.resetEncoderSignal=function(){this.newEncoding=-1},r.prototype.hasMoreCharacters=function(){return this.pos<this.getTotalMessageCharCount()},r.prototype.getTotalMessageCharCount=function(){return this.msg.length-this.skipAtEnd},r.prototype.getRemainingCharacters=function(){return this.getTotalMessageCharCount()-this.pos},r.prototype.getSymbolInfo=function(){return this.symbolInfo},r.prototype.updateSymbolInfo=function(e){void 0===e&&(e=this.getCodewordCount()),(null==this.symbolInfo||e>this.symbolInfo.getDataCapacity())&&(this.symbolInfo=Gn.lookup(e,this.shape,this.minSize,this.maxSize,!0))},r.prototype.resetSymbolInfo=function(){this.symbolInfo=null},r}(),_1=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),y1=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return _1(e,r),e.prototype.getEncodingMode=function(){return 3},e.prototype.encode=function(t){for(var n=new K;t.hasMoreCharacters();){var i=t.getCurrentChar();if(t.pos++,this.encodeChar(i,n),n.length()%3==0&&(this.writeNextTriplet(t,n),se.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode())){t.signalEncoderChange(0);break}}this.handleEOD(t,n)},e.prototype.encodeChar=function(t,n){switch(t){case 13:n.append(0);break;case 42:n.append(1);break;case 62:n.append(2);break;case 32:n.append(3);break;default:t>=48&&t<=57?n.append(t-48+4):t>=65&&t<=90?n.append(t-65+14):se.illegalCharacter(q.getCharAt(t))}return 1},e.prototype.handleEOD=function(t,n){t.updateSymbolInfo();var i=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),o=n.length();t.pos-=o,(t.getRemainingCharacters()>1||i>1||t.getRemainingCharacters()!==i)&&t.writeCodeword(254),t.getNewEncoding()<0&&t.signalEncoderChange(0)},e}(Lr),m1=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),C1=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return m1(e,r),e.prototype.getEncodingMode=function(){return 2},e.prototype.encodeChar=function(t,n){return 32===t?(n.append(3),1):t>=48&&t<=57?(n.append(t-48+4),1):t>=97&&t<=122?(n.append(t-97+14),1):t<32?(n.append(0),n.append(t),2):t<=47?(n.append(1),n.append(t-33),2):t<=64?(n.append(1),n.append(t-58+15),2):t>=91&&t<=95?(n.append(1),n.append(t-91+22),2):96===t?(n.append(2),n.append(0),2):t<=90?(n.append(2),n.append(t-65+1),2):t<=127?(n.append(2),n.append(t-123+27),2):(n.append("1\x1e"),2+this.encodeChar(t-128,n))},e}(Lr);const se=function(){function r(){}return r.randomize253State=function(e){var n=149*e%253+1+129;return n<=254?n:n-254},r.encodeHighLevel=function(e,t,n,i,o){void 0===t&&(t=0),void 0===n&&(n=null),void 0===i&&(i=null),void 0===o&&(o=!1);var a=new Lr,s=[new f1,a,new C1,new y1,new l1,new d1],c=new x1(e);c.setSymbolShape(t),c.setSizeConstraints(n,i),e.startsWith(vr)&&e.endsWith("\x1e\x04")?(c.writeCodeword(236),c.setSkipAtEnd(2),c.pos+=7):e.startsWith(pr)&&e.endsWith("\x1e\x04")&&(c.writeCodeword(237),c.setSkipAtEnd(2),c.pos+=7);var u=0;for(o&&(a.encodeMaximal(c),u=c.getNewEncoding(),c.resetEncoderSignal());c.hasMoreCharacters();)s[u].encode(c),c.getNewEncoding()>=0&&(u=c.getNewEncoding(),c.resetEncoderSignal());var f=c.getCodewordCount();c.updateSymbolInfo();var d=c.getSymbolInfo().getDataCapacity();f<d&&0!==u&&5!==u&&4!==u&&c.writeCodeword("\xfe");var l=c.getCodewords();for(l.length()<d&&l.append(129);l.length()<d;)l.append(this.randomize253State(l.length()+1));return c.getCodewords().toString()},r.lookAheadTest=function(e,t,n){var i=this.lookAheadTestIntern(e,t,n);if(3===n&&3===i){for(var o=Math.min(t+3,e.length),a=t;a<o;a++)if(!this.isNativeX12(e.charCodeAt(a)))return 0}else if(4===n&&4===i)for(o=Math.min(t+4,e.length),a=t;a<o;a++)if(!this.isNativeEDIFACT(e.charCodeAt(a)))return 0;return i},r.lookAheadTestIntern=function(e,t,n){if(t>=e.length)return n;var i;0===n?i=[0,1,1,1,1,1.25]:(i=[1,2,2,2,2,2.25])[n]=0;for(var o=0,a=new Uint8Array(6),s=[];;){if(t+o===e.length){te.fill(a,0),te.fill(s,0);var c=this.findMinimums(i,s,Q.MAX_VALUE,a),u=this.getMinimumCount(a);if(s[0]===c)return 0;if(1===u){if(a[5]>0)return 5;if(a[4]>0)return 4;if(a[2]>0)return 2;if(a[3]>0)return 3}return 1}var f=e.charCodeAt(t+o);if(o++,this.isDigit(f)?i[0]+=.5:this.isExtendedASCII(f)?(i[0]=Math.ceil(i[0]),i[0]+=2):(i[0]=Math.ceil(i[0]),i[0]++),this.isNativeC40(f)?i[1]+=2/3:this.isExtendedASCII(f)?i[1]+=8/3:i[1]+=4/3,this.isNativeText(f)?i[2]+=2/3:this.isExtendedASCII(f)?i[2]+=8/3:i[2]+=4/3,this.isNativeX12(f)?i[3]+=2/3:this.isExtendedASCII(f)?i[3]+=13/3:i[3]+=10/3,this.isNativeEDIFACT(f)?i[4]+=3/4:this.isExtendedASCII(f)?i[4]+=4.25:i[4]+=3.25,this.isSpecialB256(f)?i[5]+=4:i[5]++,o>=4){if(te.fill(a,0),te.fill(s,0),this.findMinimums(i,s,Q.MAX_VALUE,a),s[0]<this.min(s[5],s[1],s[2],s[3],s[4]))return 0;if(s[5]<s[0]||s[5]+1<this.min(s[1],s[2],s[3],s[4]))return 5;if(s[4]+1<this.min(s[5],s[1],s[2],s[3],s[0]))return 4;if(s[2]+1<this.min(s[5],s[1],s[4],s[3],s[0]))return 2;if(s[3]+1<this.min(s[5],s[1],s[4],s[2],s[0]))return 3;if(s[1]+1<this.min(s[0],s[5],s[4],s[2])){if(s[1]<s[3])return 1;if(s[1]===s[3]){for(var d=t+o+1;d<e.length;){var l=e.charCodeAt(d);if(this.isX12TermSep(l))return 3;if(!this.isNativeX12(l))break;d++}return 1}}}}},r.min=function(e,t,n,i,o){var a=Math.min(e,Math.min(t,Math.min(n,i)));return void 0===o?a:Math.min(a,o)},r.findMinimums=function(e,t,n,i){for(var o=0;o<6;o++){var a=t[o]=Math.ceil(e[o]);n>a&&(n=a,te.fill(i,0)),n===a&&(i[o]=i[o]+1)}return n},r.getMinimumCount=function(e){for(var t=0,n=0;n<6;n++)t+=e[n];return t||0},r.isDigit=function(e){return e>=48&&e<=57},r.isExtendedASCII=function(e){return e>=128&&e<=255},r.isNativeC40=function(e){return 32===e||e>=48&&e<=57||e>=65&&e<=90},r.isNativeText=function(e){return 32===e||e>=48&&e<=57||e>=97&&e<=122},r.isNativeX12=function(e){return this.isX12TermSep(e)||32===e||e>=48&&e<=57||e>=65&&e<=90},r.isX12TermSep=function(e){return 13===e||42===e||62===e},r.isNativeEDIFACT=function(e){return e>=32&&e<=94},r.isSpecialB256=function(e){return!1},r.determineConsecutiveDigitCount=function(e,t){void 0===t&&(t=0);for(var n=e.length,i=t;i<n&&this.isDigit(e.charCodeAt(i));)i++;return i-t},r.illegalCharacter=function(e){var t=Q.toHexString(e.charCodeAt(0));throw t="0000".substring(0,4-t.length)+t,new Error("Illegal character: "+e+" (0x"+t+")")},r}();var kr=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vn=function(){function r(e){this.charset=e,this.name=e.name}return r.prototype.canEncode=function(e){try{return null!=me.encode(e,this.charset)}catch{return!1}},r}(),E1=function(){function r(e,t,n){var i,o,a,s,c,u;this.ENCODERS=["IBM437","ISO-8859-2","ISO-8859-3","ISO-8859-4","ISO-8859-5","ISO-8859-6","ISO-8859-7","ISO-8859-8","ISO-8859-9","ISO-8859-10","ISO-8859-11","ISO-8859-13","ISO-8859-14","ISO-8859-15","ISO-8859-16","windows-1250","windows-1251","windows-1252","
1windows-1256","Shift_JIS"].map(function(ne){return new Vn(Nr.forName(ne))}),this.encoders=[];var f=[];f.push(new Vn(Bn.ISO_8859_1));for(var d=null!=t&&t.name.startsWith("UTF"),l=0;l<e.length;l++){var h=!1;try{for(var p=(i=void 0,kr(f)),C=p.next();!C.done;C=p.next()){var A=C.value,S=e.charAt(l);if(S.charCodeAt(0)===n||A.canEncode(S)){h=!0;break}}}catch(ne){i={error:ne}}finally{try{C&&!C.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}if(!h)try{for(var D=(a=void 0,kr(this.ENCODERS)),P=D.next();!P.done;P=D.next())if((A=P.value).canEncode(e.charAt(l))){f.push(A),h=!0;break}}catch(ne){a={error:ne}}finally{try{P&&!P.done&&(s=D.return)&&s.call(D)}finally{if(a)throw a.error}}h||(d=!0)}if(1!==f.length||d){this.encoders=[];var B=0;try{for(var L=kr(f),U=L.next();!U.done;U=L.next())this.encoders[B++]=A=U.value}catch(ne){c={error:ne}}finally{try{U&&!U.done&&(u=L.return)&&u.call(L)}finally{if(c)throw c.error}}}else this.encoders=[f[0]];var Y=-1;if(null!=t)for(l=0;l<this.encoders.length;l++)if(null!=this.encoders[l]&&t.name===this.encoders[l].name){Y=l;break}this.priorityEncoderIndex=Y}return r.prototype.length=function(){return this.encoders.length},r.prototype.getCharsetName=function(e){if(!(e<this.length()))throw new Error("index must be less than length");return this.encoders[e].name},r.prototype.getCharset=function(e){if(!(e<this.length()))throw new Error("index must be less than length");return this.encoders[e].charset},r.prototype.getECIValue=function(e){return this.encoders[e].charset.getValueIdentifier()},r.prototype.getPriorityEncoderIndex=function(){return this.priorityEncoderIndex},r.prototype.canEncode=function(e,t){if(!(t<this.length()))throw new Error("index must be less than length");return!0},r.prototype.encode=function(e,t){if(!(t<this.length()))throw new Error("index must be less than length");return me.encode(q.getCharAt(e),this.encoders[t].name)},r}(),O1=function(){function r(e,t,n){this.fnc1=n;var i=new E1(e,t,n);if(1===i.length())for(var o=0;o<this.bytes.length;o++){var a=e.charAt(o).charCodeAt(0);this.bytes[o]=a===n?1e3:a}else this.bytes=this.encodeMinimally(e,i,n)}return r.prototype.getFNC1Character=function(){return this.fnc1},r.prototype.length=function(){return this.bytes.length},r.prototype.haveNCharacters=function(e,t){if(e+t-1>=this.bytes.length)return!1;for(var n=0;n<t;n++)if(this.isECI(e+n))return!1;return!0},r.prototype.charAt=function(e){if(e<0||e>=this.length())throw new Error(""+e);if(this.isECI(e))throw new Error("value at "+e+" is not a character but an ECI");return this.isFNC1(e)?this.fnc1:this.bytes[e]},r.prototype.subSequence=function(e,t){if(e<0||e>t||t>this.length())throw new Error(""+e);for(var n=new K,i=e;i<t;i++){if(this.isECI(i))throw new Error("value at "+i+" is not a character but an ECI");n.append(this.charAt(i))}return n.toString()},r.prototype.isECI=function(e){if(e<0||e>=this.length())throw new Error(""+e);return this.bytes[e]>255&&this.bytes[e]<=999},r.prototype.isFNC1=function(e){if(e<0||e>=this.length())throw new Error(""+e);return 1e3===this.bytes[e]},r.prototype.getECIValue=function(e){if(e<0||e>=this.length())throw new Error(""+e);if(!this.isECI(e))throw new Error("value at "+e+" is not an ECI but a character");return this.bytes[e]-256},r.prototype.addEdge=function(e,t,n){(null==e[t][n.encoderIndex]||e[t][n.encoderIndex].cachedTotalSize>n.cachedTotalSize)&&(e[t][n.encoderIndex]=n)},r.prototype.addEdges=function(e,t,n,i,o,a){var s=e.charAt(i).charCodeAt(0),c=0,u=t.length();t.getPriorityEncoderIndex()>=0&&(s===a||t.canEncode(s,t.getPriorityEncoderIndex()))&&(u=(c=t.getPriorityEncoderIndex())+1);for(var f=c;f<u;f++)(s===a||t.canEncode(s,f))&&this.addEdge(n,i+1,new Hn(s,t,f,o,a))},r.prototype.encodeMinimally=function(e,t,n){var i=e.length,o=new(Hn[i+1][t.length()]);this.addEdges(e,t,o,0,null,n);for(var a=1;a<=i;a++){for(var s=0;s<t.length();s++)null!=o[a][s]&&a<i&&this.addEdges(e,t,o,a,o[a][s],n);for(s=0;s<t.length();s++)o[a-1][s]=null}var c=-1,u=Q.MAX_VALUE;for(s=0;s<t.length();s++)if(null!=o[i][s]){var f=o[i][s];f.cachedTotalSize<u&&(u=f.cachedTotalSize,c=s)}if(c<0)throw new Error('Failed to encode "'+e+'"');for(var d=[],l=o[i][c];null!=l;){if(l.isFNC1())d.unshift(1e3);else{var h=t.encode(l.c,l.encoderIndex);for(a=h.length-1;a>=0;a--)d.unshift(255&h[a])}(null===l.previous?0:l.previous.encoderIndex)!==l.encoderIndex&&d.unshift(256+t.getECIValue(l.encoderIndex)),l=l.previous}var C=[];for(a=0;a<C.length;a++)C[a]=d[a];return C},r}(),Hn=function(){function r(e,t,n,i,o){this.c=e,this.encoderSet=t,this.encoderIndex=n,this.previous=i,this.fnc1=o,this.c=e===o?1e3:e;var a=this.isFNC1()?1:t.encode(e,n).length;(null===i?0:i.encoderIndex)!==n&&(a+=3),null!=i&&(a+=i.cachedTotalSize),this.cachedTotalSize=a}return r.prototype.isFNC1=function(){return 1e3===this.c},r}(),S1=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),Qt=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},I1=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var i,a,n=t.call(r),o=[];try{for(;(void 0===e||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return o},G=function(r){return r[r.ASCII=0]="ASCII",r[r.C40=1]="C40",r[r.TEXT=2]="TEXT",r[r.X12=3]="X12",r[r.EDF=4]="EDF",r[r.B256=5]="B256",r}(G||{}),D1=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],$e=function(){function r(){}return r.isExtendedASCII=function(e,t){return e!==t&&e>=128&&e<=255},r.isInC40Shift1Set=function(e){return e<=31},r.isInC40Shift2Set=function(e,t){var n,i;try{for(var o=Qt(D1),a=o.next();!a.done;a=o.next())if(a.value.charCodeAt(0)===e)return!0}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e===t},r.isInTextShift1Set=function(e){return this.isInC40Shift1Set(e)},r.isInTextShift2Set=function(e,t){return this.isInC40Shift2Set(e,t)},r.encodeHighLevel=function(e,t,n,i){void 0===t&&(t=null),void 0===n&&(n=-1),void 0===i&&(i=0);var o=0;return e.startsWith(vr)&&e.endsWith("\x1e\x04")?(o=5,e=e.substring(7,e.length-2)):e.startsWith(pr)&&e.endsWith("\x1e\x04")&&(o=6,e=e.substring(7,e.length-2)),decodeURIComponent(escape(String.fromCharCode.apply(String,function(){for(var r=[],e=0;e<arguments.length;e++)r=r.concat(I1(arguments[e]));return r}(this.encode(e,t,n,i,o)))))},r.encode=function(e,t,n,i,o){return this.encodeMinimally(new P1(e,t,n,i,o)).getBytes()},r.addEdge=function(e,t){var n=t.fromPosition+t.characterLength;(null===e[n][t.getEndMode()]||e[n][t.getEndMode()].cachedTotalSize>t.cachedTotalSize)&&(e[n][t.getEndMode()]=t)},r.getNumberOfC40Words=function(e,t,n,i){for(var o=0,a=t;a<e.length();a++){if(e.isECI(a))return i[0]=0,0;var s=e.charAt(a);if(n&&se.isNativeC40(s)||!n&&se.isNativeText(s))o++;else if(r.isExtendedASCII(s,e.getFNC1Character())){var c=255&s;c>=128&&(n&&se.isNativeC40(c-128)||!n&&se.isNativeText(c-128))?o+=3:o+=4}else o+=2;if(o%3==0||(o-2)%3==0&&a+1===e.length())return i[0]=a-t+1,Math.ceil(o/3)}return i[0]=0,0},r.addEdges=function(e,t,n,i){var o,a;if(e.isECI(n))this.addEdge(t,new rt(e,G.ASCII,n,1,i));else{var h,s=e.charAt(n);if(null===i||i.getEndMode()!==G.EDF){se.isDigit(s)&&e.haveNCharacters(n,2)&&se.isDigit(e.charAt(n+1))?this.addEdge(t,new rt(e,G.ASCII,n,2,i)):this.addEdge(t,new rt(e,G.ASCII,n,1,i));var c=[G.C40,G.TEXT];try{for(var u=Qt(c),f=u.next();!f.done;f=u.next()){var d=f.value,l=[];r.getNumberOfC40Words(e,n,d===G.C40,l)>0&&this.addEdge(t,new rt(e,d,n,l[0],i))}}catch(C){o={error:C}}finally{try{f&&!f.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}e.haveNCharacters(n,3)&&se.isNativeX12(e.charAt(n))&&se.isNativeX12(e.charAt(n+1))&&se.isNativeX12(e.charAt(n+2))&&this.addEdge(t,new rt(e,G.X12,n,3,i)),this.addEdge(t,new rt(e,G.B256,n,1,i))}for(h=0;h<3;h++){var p=n+h;if(!e.haveNCharacters(p,1)||!se.isNativeEDIFACT(e.charAt(p)))break;this.addEdge(t,new rt(e,G.EDF,n,h+1,i))}3===h&&e.haveNCharacters(n,4)&&se.isNativeEDIFACT(e.charAt(n+3))&&this.addEdge(t,new rt(e,G.EDF,n,4,i))}},r.encodeMinimally=function(e){var t=e.length(),n=Array(t+1).fill(null).map(function(){return Array(6).fill(0)});this.addEdges(e,n,0,null);for(var i=1;i<=t;i++){for(var o=0;o<6;o++)null!==n[i][o]&&i<t&&this.addEdges(e,n,i,n[i][o]);for(o=0;o<6;o++)n[i-1][o]=null}var a=-1,s=Q.MAX_VALUE;for(o=0;o<6;o++)if(null!==n[t][o]){var c=n[t][o],u=o>=1&&o<=3?c.cachedTotalSize+1:c.cachedTotalSize;u<s&&(s=u,a=o)}if(a<0)throw new Error('Failed to encode "'+e+'"');return new T1(n[t][a])},r}(),T1=function(){function r(e){var t=e.input,n=0,i=[],o=[],a=[];(e.mode===G.C40||e.mode===G.TEXT||e.mode===G.X12)&&e.getEndMode()!==G.ASCII&&
1(n+=this.prepend(rt.getBytes(254),i));for(var s=e;null!==s;)n+=this.prepend(s.getDataBytes(),i),(null===s.previous||s.getPreviousStartMode()!==s.getMode())&&(s.getMode()===G.B256&&(n<=249?(i.unshift(n),n++):(i.unshift(n%250),i.unshift(n/250+249),n+=2),o.push(i.length),a.push(n)),this.prepend(s.getLatchBytes(),i),n=0),s=s.previous;5===t.getMacroId()?n+=this.prepend(rt.getBytes(236),i):6===t.getMacroId()&&(n+=this.prepend(rt.getBytes(237),i)),t.getFNC1Character()>0&&(n+=this.prepend(rt.getBytes(232),i));for(var c=0;c<o.length;c++)this.applyRandomPattern(i,i.length-o[c],a[c]);var u=e.getMinSymbolSize(i.length);for(i.length<u&&i.push(129);i.length<u;)i.push(this.randomize253State(i.length+1));for(this.bytes=new Uint8Array(i.length),c=0;c<this.bytes.length;c++)this.bytes[c]=i[c]}return r.prototype.prepend=function(e,t){for(var n=e.length-1;n>=0;n--)t.unshift(e[n]);return e.length},r.prototype.randomize253State=function(e){var n=149*e%253+1+129;return n<=254?n:n-254},r.prototype.applyRandomPattern=function(e,t,n){for(var i=0;i<n;i++){var o=t+i,c=149*(o+1)%255+1+(255&e[o]);e[o]=c<=255?c:c-256}},r.prototype.getBytes=function(){return this.bytes},r}(),rt=function(){function r(e,t,n,i,o){if(this.input=e,this.mode=t,this.fromPosition=n,this.characterLength=i,this.previous=o,this.allCodewordCapacities=[3,5,8,10,12,16,18,22,30,32,36,44,49,62,86,114,144,174,204,280,368,456,576,696,816,1050,1304,1558],this.squareCodewordCapacities=[3,5,8,12,18,22,30,36,44,62,86,114,144,174,204,280,368,456,576,696,816,1050,1304,1558],this.rectangularCodewordCapacities=[5,10,16,33,32,49],!(n+i<=e.length()))throw new Error("Invalid edge");var a=null!==o?o.cachedTotalSize:0,s=this.getPreviousMode();switch(t){case G.ASCII:a++,(e.isECI(n)||$e.isExtendedASCII(e.charAt(n),e.getFNC1Character()))&&a++,(s===G.C40||s===G.TEXT||s===G.X12)&&a++;break;case G.B256:a++,(s!==G.B256||250===this.getB256Size())&&a++,s===G.ASCII?a++:(s===G.C40||s===G.TEXT||s===G.X12)&&(a+=2);break;case G.C40:case G.TEXT:case G.X12:a+=t===G.X12?2:2*$e.getNumberOfC40Words(e,n,t===G.C40,[]),s===G.ASCII||s===G.B256?a++:s!==t&&(s===G.C40||s===G.TEXT||s===G.X12)&&(a+=2);break;case G.EDF:a+=3,s===G.ASCII||s===G.B256?a++:(s===G.C40||s===G.TEXT||s===G.X12)&&(a+=2)}this.cachedTotalSize=a}return r.prototype.getB256Size=function(){for(var e=0,t=this;null!==t&&t.mode===G.B256&&e<=250;)e++,t=t.previous;return e},r.prototype.getPreviousStartMode=function(){return null===this.previous?G.ASCII:this.previous.mode},r.prototype.getPreviousMode=function(){return null===this.previous?G.ASCII:this.previous.getEndMode()},r.prototype.getEndMode=function(){if(this.mode===G.EDF){if(this.characterLength<4)return G.ASCII;if((e=this.getLastASCII())>0&&this.getCodewordsRemaining(this.cachedTotalSize+e)<=2-e)return G.ASCII}if(this.mode===G.C40||this.mode===G.TEXT||this.mode===G.X12){if(this.fromPosition+this.characterLength>=this.input.length()&&0===this.getCodewordsRemaining(this.cachedTotalSize))return G.ASCII;var e;if(1===(e=this.getLastASCII())&&0===this.getCodewordsRemaining(this.cachedTotalSize+1))return G.ASCII}return this.mode},r.prototype.getMode=function(){return this.mode},r.prototype.getLastASCII=function(){var e=this.input.length(),t=this.fromPosition+this.characterLength;return e-t>4||t>=e?0:e-t==1?$e.isExtendedASCII(this.input.charAt(t),this.input.getFNC1Character())?0:1:e-t==2?$e.isExtendedASCII(this.input.charAt(t),this.input.getFNC1Character())||$e.isExtendedASCII(this.input.charAt(t+1),this.input.getFNC1Character())?0:se.isDigit(this.input.charAt(t))&&se.isDigit(this.input.charAt(t+1))?1:2:e-t==3?se.isDigit(this.input.charAt(t))&&se.isDigit(this.input.charAt(t+1))&&!$e.isExtendedASCII(this.input.charAt(t+2),this.input.getFNC1Character())||se.isDigit(this.input.charAt(t+1))&&se.isDigit(this.input.charAt(t+2))&&!$e.isExtendedASCII(this.input.charAt(t),this.input.getFNC1Character())?2:0:se.isDigit(this.input.charAt(t))&&se.isDigit(this.input.charAt(t+1))&&se.isDigit(this.input.charAt(t+2))&&se.isDigit(this.input.charAt(t+3))?2:0},r.prototype.getMinSymbolSize=function(e){var t,n,i,o,a,s;switch(this.input.getShapeHint()){case 1:try{for(var c=Qt(this.squareCodewordCapacities),u=c.next();!u.done;u=c.next())if((f=u.value)>=e)return f}catch(C){t={error:C}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}break;case 2:try{for(var d=Qt(this.rectangularCodewordCapacities),l=d.next();!l.done;l=d.next())if((f=l.value)>=e)return f}catch(C){i={error:C}}
1finally{try{l&&!l.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}try{for(var h=Qt(this.allCodewordCapacities),p=h.next();!p.done;p=h.next()){var f;if((f=p.value)>=e)return f}}catch(C){a={error:C}}finally{try{p&&!p.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}return this.allCodewordCapacities[this.allCodewordCapacities.length-1]},r.prototype.getCodewordsRemaining=function(e){return this.getMinSymbolSize(e)-e},r.getBytes=function(e,t){var n=new Uint8Array(t?2:1);return n[0]=e,t&&(n[1]=t),n},r.prototype.setC40Word=function(e,t,n,i,o){var a=1600*(255&n)+40*(255&i)+(255&o)+1;e[t]=a/256,e[t+1]=a%256},r.prototype.getX12Value=function(e){return 13===e?0:42===e?1:62===e?2:32===e?3:e>=48&&e<=57?e-44:e>=65&&e<=90?e-51:e},r.prototype.getX12Words=function(){if(this.characterLength%3!=0)throw new Error("X12 words must be a multiple of 3");for(var e=new Uint8Array(this.characterLength/3*2),t=0;t<e.length;t+=2)this.setC40Word(e,t,this.getX12Value(this.input.charAt(this.fromPosition+t/2*3)),this.getX12Value(this.input.charAt(this.fromPosition+t/2*3+1)),this.getX12Value(this.input.charAt(this.fromPosition+t/2*3+2)));return e},r.prototype.getShiftValue=function(e,t,n){return t&&$e.isInC40Shift1Set(e)||!t&&$e.isInTextShift1Set(e)?0:t&&$e.isInC40Shift2Set(e,n)||!t&&$e.isInTextShift2Set(e,n)?1:2},r.prototype.getC40Value=function(e,t,n,i){if(n===i){if(2!==t)throw new Error("FNC1 cannot be used in C40 shift 2");return 27}return e?n<=31?n:32===n?3:n<=47?n-33:n<=57?n-44:n<=64?n-43:n<=90?n-51:n<=95?n-69:n<=127?n-96:n:0===n?0:0===t&&n<=3?n-1:1===t&&n<=31?n:32===n?3:n>=33&&n<=47?n-33:n>=48&&n<=57?n-44:n>=58&&n<=64?n-43:n>=65&&n<=90?n-64:n>=91&&n<=95?n-69:96===n?0:n>=97&&n<=122?n-83:n>=123&&n<=127?n-96:n},r.prototype.getC40Words=function(e,t){for(var n=[],i=0;i<this.characterLength;i++){var o=this.input.charAt(this.fromPosition+i);if(e&&se.isNativeC40(o)||!e&&se.isNativeText(o))n.push(this.getC40Value(e,0,o,t));else if($e.isExtendedASCII(o,t)){var s=(255&o)-128;if(e&&se.isNativeC40(s)||!e&&se.isNativeText(s))n.push(1),n.push(30),n.push(this.getC40Value(e,0,s,t));else{n.push(1),n.push(30);var a=this.getShiftValue(s,e,t);n.push(a),n.push(this.getC40Value(e,a,s,t))}}else a=this.getShiftValue(o,e,t),n.push(a),n.push(this.getC40Value(e,a,o,t))}if(n.length%3!=0){if((n.length-2)%3!=0||this.fromPosition+this.characterLength!==this.input.length())throw new Error("C40 words must be a multiple of 3");n.push(0)}var c=new Uint8Array(n.length/3*2),u=0;for(i=0;i<n.length;i+=3)this.setC40Word(c,u,255&n[i],255&n[i+1],255&n[i+2]),u+=2;return c},r.prototype.getEDFBytes=function(){for(var e=Math.ceil(this.characterLength/4),t=new Uint8Array(3*e),n=this.fromPosition,i=Math.min(this.fromPosition+this.characterLength-1,this.input.length()-1),o=0;o<e;o+=3){for(var a=[],s=0;s<4;s++)a[s]=n<=i?63&this.input.charAt(n++):n===i+1?31:0;var c=a[0]<<18;c|=a[1]<<12,c|=a[2]<<6,t[o]=(c|=a[3])>>16&255,t[o+1]=c>>8&255,t[o+2]=255&c}return t},r.prototype.getLatchBytes=function(){switch(this.getPreviousMode()){case G.ASCII:case G.B256:switch(this.mode){case G.B256:return r.getBytes(231);case G.C40:return r.getBytes(230);case G.TEXT:return r.getBytes(239);case G.X12:return r.getBytes(238);case G.EDF:return r.getBytes(240)}break;case G.C40:case G.TEXT:case G.X12:if(this.mode!==this.getPreviousMode())switch(this.mode){case G.ASCII:return r.getBytes(254);case G.B256:return r.getBytes(254,231);case G.C40:return r.getBytes(254,230);case G.TEXT:return r.getBytes(254,239);case G.X12:return r.getBytes(254,238);case G.EDF:return r.getBytes(254,240)}break;case G.EDF:if(this.mode!==G.EDF)throw new Error("Cannot switch from EDF to "+this.mode)}return new Uint8Array(0)},r.prototype.getDataBytes=function(){switch(this.mode){case G.ASCII:return this.input.isECI(this.fromPosition)?r.getBytes(241,this.input.getECIValue(this.fromPosition)+1):$e.isExtendedASCII(this.input.charAt(this.fromPosition),this.input.getFNC1Character())?r.getBytes(235,this.input.charAt(this.fromPosition)-127):2===this.characterLength?r.getBytes(10*this.input.charAt(this.fromPosition)+this.input.charAt(this.fromPosition+1)+130):this.input.isFNC1(this.fromPosition)?r.getBytes(232):r.getBytes(this.input.charAt(this.fromPosition)+1);case G.B256:return r.getBytes(this.input.charAt(this.fromPosition));case G.C40:return this.getC40Words(!0,this.input.getFNC1Character());case G.TEXT:return this.getC40Words(!1,this.input.getFNC1Character());case G.X12:return this.getX12Words();case G.EDF:return this.getEDFBytes()}},r}(),P1=function(r){function e(t,n,i,o,a){var s=r.call(this,t,n,i)||this;return s.shape=o,s.macroId=a,s}return S1(e,r),e.prototype.getMacroId=function(){return this.macroId},e.prototype.getShapeHint=function(){return this.shape},e}(O1);!function(){function r(){}r.prototype.encode=function(e,t,n,i,o){if(void 0===o&&(o=null),""===e.trim())throw new Error("Found empty contents");if(t!==Z.DATA_MATRIX)throw new Error("Can only encode DATA_MATRIX, but got "+t);if(n<0||i<0)throw new Error("Requested dimensions can't be negative: "+n+"x"+i);var l,a=0,s=null,c=null;if(null!=o){var u=o.get(ye.DATA_MATRIX_SHAPE);null!=u&&(a=u);var f=o.get(ye.MIN_SIZE);null!=f&&(s=f);var d=o.get(ye.MAX_SIZE);null!=d&&(c=d)}if(null!=o&&o.has(ye.DATA_MATRIX_COMPACT)&&o.get(ye.DATA_MATRIX_COMPACT).toString()){var p=o.has(ye.GS1_FORMAT)&&!!o.get(ye.GS1_FORMAT).toString(),C=null;o.has(ye.CHARACTER_SET)&&(C=Nr.forName(o.get(ye.CHARACTER_SET).toString())),l=$e.encodeHighLevel(e,C,p?29:-1,a)}else{var S=null!=o&&o.has(ye.FORCE_C40)&&!!o.get(ye.FORCE_C40).toString();l=se.encodeHighLevel(e,a,s,c,S)}var O=Gn.lookup(l.length,a,s,c,!0),D=u1.encodeECC200(l,O),P=new Zc(D,O.getSymbolDataWidth(),O.getSymbolDataHeight());return P.place(),this.encodeLowLevel(P,O,n,i)},r.prototype.encodeLowLevel=function(e,t,n,i){for(var o=t.getSymbolDataWidth(),a=t.getSymbolDataHeight(),s=new Mn(t.getSymbolWi
1dth(),t.getSymbolHeight()),c=0,u=0;u<a;u++){var f=void 0;if(u%t.matrixHeight==0){f=0;for(var d=0;d<t.getSymbolWidth();d++)s.setBoolean(f,c,d%2==0),f++;c++}for(f=0,d=0;d<o;d++)d%t.matrixWidth==0&&(s.setBoolean(f,c,!0),f++),s.setBoolean(f,c,e.getBit(d,u)),f++,d%t.matrixWidth==t.matrixWidth-1&&(s.setBoolean(f,c,u%2==0),f++);if(c++,u%t.matrixHeight==t.matrixHeight-1){for(f=0,d=0;d<t.getSymbolWidth();d++)s.setBoolean(f,c,!0),f++;c++}}return this.convertByteMatrixToBitMatrix(s,n,i)},r.prototype.convertByteMatrixToBitMatrix=function(e,t,n){var d,i=e.getWidth(),o=e.getHeight(),a=Math.max(t,i),s=Math.max(n,o),c=Math.min(a/i,s/o),u=(a-i*c)/2,f=(s-o*c)/2;n<o||t<i?(u=0,f=0,d=new we(i,o)):d=new we(t,n),d.clear();for(var l=0,h=f;l<o;l++,h+=c)for(var p=0,C=u;p<i;p++,C+=c)1===e.get(p,l)&&d.setRegion(C,h,c,c);return d}}();const R1=function(){function r(){}return r.prototype.isCompact=function(){return this.compact},r.prototype.setCompact=function(e){this.compact=e},r.prototype.getSize=function(){return this.size},r.prototype.setSize=function(e){this.size=e},r.prototype.getLayers=function(){return this.layers},r.prototype.setLayers=function(e){this.layers=e},r.prototype.getCodeWords=function(){return this.codeWords},r.prototype.setCodeWords=function(e){this.codeWords=e},r.prototype.getMatrix=function(){return this.matrix}
1,r.prototype.setMatrix=function(e){this.matrix=e},r}(),Wn=function(){function r(){}return r.singletonList=function(e){return[e]},r.min=function(e,t){return e.sort(t)[0]},r}(),F1=function(){function r(e){this.previous=e}return r.prototype.getPrevious=function(){return this.previous},r}();var L1=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const Ur=function(r){function e(t,n,i){var o=r.call(this,t)||this;return o.value=n,o.bitCount=i,o}return L1(e,r),e.prototype.appendTo=function(t,n){t.appendBits(this.value,this.bitCount)},e.prototype.add=function(t,n){return new e(this,t,n)},e.prototype.addBinaryShift=function(t,n){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,t,n)},e.prototype.toString=function(){var t=this.value&(1<<this.bitCount)-1;return"<"+Q.toBinaryString((t|=1<<this.bitCount)|1<<this.bitCount).substring(1)+">"},e}(F1);var U1=function(){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])})(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();const V1=function(r){function e(t,n,i){var o=r.call(this,t,0,0)||this;return o.binaryShiftStart=n,o.binaryShiftByteCount=i,o}return U1(e,r),e.prototype.appendTo=function(t,n){for(var i=0;i<this.binaryShiftByteCount;i++)(0===i||31===i&&this.binaryShiftByteCount<=62)&&(t.appendBits(31,5),this.binaryShiftByteCount>62?t.appendBits(this.binaryShiftByteCount-31,16):t.appendBits(0===i?Math.min(this.binaryShiftByteCount,31):this.binaryShiftByteCount-31,5)),t.appendBits(n[this.binaryShiftStart+i],8)},e.prototype.addBinaryShift=function(t,n){return new e(this,t,n)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"},e}(Ur);function $t(r,e,t){return new Ur(r,e,t)}var W1=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],z1=new Ur(null,0,0),Gr=[Int32Array.from([0,327708,327710,327709,656318]),Int32Array.from([590318,0,327710,327709,656318]),Int32Array.from([262158,590300,0,590301,932798]),Int32Array.from([327709,327708,656318,0,327710]),Int32Array.from([327711,65638
10,656382,656381,0])],Xn=function j1(r){var e,t;try{for(var n=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=n.next();!i.done;i=n.next())te.fill(i.value,-1)}catch(a){e={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r[0][4]=0,r[1][4]=0,r[1][0]=28,r[3][4]=0,r[2][4]=0,r[2][0]=15,r}(te.createInt32Array(6,6));const Z1=function(){function r(e,t,n,i){this.token=e,this.mode=t,this.binaryShiftByteCount=n,this.bitCount=i}return r.prototype.getMode=function(){return this.mode},r.prototype.getToken=function(){return this.token},r.prototype.getBinaryShiftByteCount=function(){return this.binaryShiftByteCount},r.prototype.getBitCount=function(){return this.bitCount},r.prototype.latchAndAppend=function(e,t){var n=this.bitCount,i=this.token;if(e!==this.mode){var o=Gr[this.mode][e];i=$t(i,65535&o,o>>16),n+=o>>16}var a=2===e?4:5;return new r(i=$t(i,t,a),e,0,n+a)},r.prototype.shiftAndAppend=function(e,t){var n=this.token,i=2===this.mode?4:5;return n=$t(n,Xn[this.mode][e],i),new r(n=$t(n,t,5),this.mode,0,this.bitCount+i+5)},r.prototype.addBinaryShiftChar=function(e){var t=this.token,n=this.mode,i=this.bitCount;if(4===this.mode||2===this.mode){var o=Gr[n][0];t=$t(t,65535&o,o>>16),i+=o>>16,n=0}var s=new r(t,n,this.binaryShiftByteCount+1,i+(0===this.binaryShiftByteCount||31===this.binaryShiftByteCount?18:62===this.binaryShiftByteCount?9:8));return 2078===s.binaryShiftByteCount&&(s=s.endBinaryShift(e+1)),s},r.prototype.endBinaryShift=function(e){if(0===this.binaryShiftByteCount)return this;var t=this.token;return t=function H1(r,e,t){return new V1(r,e,t)}(t,e-this.binaryShiftByteCount,this.binaryShiftByteCount),new r(t,this.mode,0,this.bitCount)},r.prototype.isBetterThanOrEqualTo=function(e){var t=this.bitCount+(Gr[this.mode][e.mode]>>16);return this.binaryShiftByteCount<e.binaryShiftByteCount?t+=r.calculateBinaryShiftCost(e)-r.calculateBinaryShiftCost(this):this.binaryShiftByteCount>e.binaryShiftByteCount&&e.binaryShiftByteCount>0&&(t+=10),t<=e.bitCount},r.prototype.toBitArray=function(e){for(var t,n,i=[],o=this.endBinaryShift(e.length).token;null!==o;o=o.getPrevious())i.unshift(o);var a=new Ae;try{for(var s=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(i),c=s.next();!c.done;c=s.next())c.value.appendTo(a,e)}catch(f){t={error:f}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a},r.prototype.toString=function(){return q.format("%s bits=%d bytes=%d",W1[this.mode],this.bitCount,this.binaryShiftByteCount)},r.calculateBinaryShiftCost=function(e){return e.binaryShiftByteCount>62?21:e.binaryShiftByteCount>31?20:e.binaryShiftByteCount>0?10:0},r.INITIAL_STATE=new r(z1,0,0,0),r}();var Vr=function K1(r){var e=q.getCharCode(" "),t=q.getCharCode("."),n=q.getCharCode(",");r[0][e]=1;for(var i=q.getCharCode("Z"),o=q.getCharCode("A"),a=o;a<=i;a++)r[0][a]=a-o+2;r[1][e]=1;var s=q.getCharCode("z"),c=q.getCharCode("a");for(a=c;a<=s;a++)r[1][a]=a-c+2;r[2][e]=1;var u=q.getCharCode("9"),f=q.getCharCode("0");for(a=f;a<=u;a++)r[2][a]=a-f+2;r[2][n]=12,r[2][t]=13;for(var d=["\0"," ","\x01","\x02","\x03","\x04","\x05","\x06","\x07","\b","\t","\n","\v","\f","\r","\x1b","\x1c","\x1d","\x1e","\x1f","@","\\","^","_","`","|","~","\x7f"],l=0;l<d.length;l++)r[3][q.getCharCode(d[l])]=l;var h=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(l=0;l<h.length;l++)q.getCharCode(h[l])>0&&(r[4][q.getCharCode(h[l])]=l);return r}(te.createInt32Array(5,256)),_r=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};const $1=function(){function r(e){this.text=e}return r.prototype.encode=function(){for(var e=q.getCharCode(" "),t=q.getCharCode("\n"),n=Wn.singletonList(Z1.INITIAL_STATE),i=0;i<this.text.length;i++){var o=void 0,a=i+1<this.text.length?this.text[i+1]:0;switch(this.text[i]){case q.getCharCode("\r"):o=a===t?2:0;break;case q.getCharCode("."):o=a===e?3:0;break;case q.getCharCode(","):o=a===e?4:0;break;case q.getCharCode(":"):o=a===e?5:0;break;default:o=0}o>0?(n=r.updateStateListForPair(n,i,o),i++):n=this.updateStateListForChar(n,i)}return Wn.min(n,function(c,u){return c.getBitCount()-u.getBitCount()}).toBitArray(this.text)},r.prototype.updateStateListForChar=function(e,t){var n,i,o=[];try{for(var a=_r(e),s=a.next();!s.done;s=a.next())this.updateStateForChar(s.value,t,o)}catch(u){n={error:u}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return r.simplifyStates(o)},r.prototype.updateStateForChar=function(e,t,n){for(var i=255&this.text[t],o=Vr[e.getMode()][i]>0,a=null,s=0;s<=4;s++){var c=Vr[s][i];if(c>0){if(null==a&&(a=e.endBinaryShift(t)),!o||s===e.getMode()||2===s){var u=a.latchAndAppend(s,c);n.push(u)}if(!o&&Xn[e.getMode()][s]>=0){var f=a.shiftAndAppend(s,c);n.push(f)}}}if(e.getBinaryShiftByteCount()>0||0===Vr[e.getMode()][i]){var d=e.addBinaryShiftChar(t);n.push(d)}},r.updateStateListForPair=function(e,t,n){var i,o,a=[];try{for(var s=_r(e),c=s.next();!c.done;c=s.next())this.updateStateForPair(c.value,t,n,a)}catch(f){i={error:f}}
1finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return this.simplifyStates(a)},r.updateStateForPair=function(e,t,n,i){var o=e.endBinaryShift(t);if(i.push(o.latchAndAppend(4,n)),4!==e.getMode()&&i.push(o.shiftAndAppend(4,n)),3===n||4===n){var a=o.latchAndAppend(2,16-n).latchAndAppend(2,1);i.push(a)}if(e.getBinaryShiftByteCount()>0){var s=e.addBinaryShiftChar(t).addBinaryShiftChar(t+1);i.push(s)}},r.simplifyStates=function(e){var t,n,i,o,a=[];try{for(var s=_r(e),c=s.next();!c.done;c=s.next()){var u=c.value,f=!0,d=function(A){if(A.isBetterThanOrEqualTo(u))return f=!1,"break";u.isBetterThanOrEqualTo(A)&&(a=a.filter(function(S){return S!==A}))};try{for(var l=(i=void 0,_r(a)),h=l.next();!h.done&&"break"!==d(h.value);h=l.next());}catch(A){i={error:A}}finally{try{h&&!h.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}f&&a.push(u)}}catch(A){t={error:A}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a},r}(),Hr=function(){function r(){}return r.encodeBytes=function(e){return r.encode(e,r.DEFAULT_EC_PERCENT,r.DEFAULT_AZTEC_LAYERS)},r.encode=function(e,t,n){var s,c,u,f,d,i=new $1(e).encode(),o=Q.truncDivision(i.getSize()*t,100)+11,a=i.getSize()+o;if(n!==r.DEFAULT_AZTEC_LAYERS){if(s=n<0,(c=Math.abs(n))>(s?r.MAX_NB_BITS_COMPACT:r.MAX_NB_BITS))throw new X(q.format("Illegal value %s for layers",n));var l=(u=r.totalBitsInLayer(c,s))-u%(f=r.WORD_SIZE[c]);if((d=r.stuffBits(i,f)).getSize()+o>l)throw new X("Data to large for user specified layer");if(s&&d.getSize()>64*f)throw new X("Data to large for user specified layer")}else{f=0,d=null;for(var h=0;;h++){if(h>r.MAX_NB_BITS)throw new X("Data too large for an Aztec code");if(!(a>(u=r.totalBitsInLayer(c=(s=h<=3)?h+1:h,s)))&&((null==d||f!==r.WORD_SIZE[c])&&(d=r.stuffBits(i,f=r.WORD_SIZE[c])),l=u-u%f,!(s&&d.getSize()>64*f)&&d.getSize()+o<=l))break}}var D,p=r.generateCheckWords(d,u,f),C=d.getSize()/f,A=r.generateModeMessage(s,c,C),S=(s?11:14)+4*c,O=new Int32Array(S);if(s)for(D=S,h=0;h<O.length;h++)O[h]=h;else{D=S+1+2*Q.truncDivision(Q.truncDivision(S,2)-1,15);var P=Q.truncDivision(S,2),B=Q.truncDivision(D,2);for(h=0;h<P;h++){var L=h+Q.truncDivision(h,15);O[P-h-1]=B-L-1,O[P+h]=B+L+1}}for(var U=new we(D),Y=(h=0,0);h<c;h++){for(var ne=4*(c-h)+(s?9:12),re=0;re<ne;re++)for(var Te=2*re,de=0;de<2;de++)p.get(Y+Te+de)&&U.set(O[2*h+de],O[2*h+re]),p.get(Y+2*ne+Te+de)&&U.set(O[2*h+re],O[S-1-2*h-de]),p.get(Y+4*ne+Te+de)&&U.set(O[S-1-2*h-de],O[S-1-2*h-re]),p.get(Y+6*ne+Te+de)&&U.set(O[S-1-2*h-re],O[2*h+de]);Y+=8*ne}if(r.drawModeMessage(U,s,D,A),s)r.drawBullsEye(U,Q.truncDivision(D,2),5);else for(r.drawBullsEye(U,Q.truncDivision(D,2),7),h=0,re=0;h<Q.truncDivision(S,2)-1;h+=15,re+=16)for(de=1&Q.truncDivision(D,2);de<D;de+=2)U.set(Q.truncDivision(D,2)-re,de),U.set(Q.truncDivision(D,2)+re,de),U.set(de,Q.truncDivision(D,2)-re),U.set(de,Q.truncDivision(D,2)+re);var be=new R1;return be.setCompact(s),be.setSize(D),be.setLayers(c),be.setCodeWords(C),be.setMatrix(U),be},r.drawBullsEye=function(e,t,n){for(var i=0;i<n;i+=2)for(var o=t-i;o<=t+i;o++)e.set(o,t-i),e.set(o,t+i),e.set(t-i,o),e.set(t+i,o);e.set(t-n,t-n),e.set(t-n+1,t-n),e.set(t-n,t-n+1),e.set(t+n,t-n),e.set(t+n,t-n+1),e.set(t+n,t+n-1)},r.generateModeMessage=function(e,t,n){var i=new Ae;return e?(i.appendBits(t-1,2),i.appendBits(n-1,6),i=r.generateCheckWords(i,28,4)):(i.appendBits(t-1,5),i.appendBits(n-1,11),i=r.generateCheckWords(i,40,4)),i},r.drawModeMessage=function(e,t,n,i){var o=Q.truncDivision(n,2);if(t)for(var a=0;a<7;a++){var s=o-3+a;i.get(a)&&e.set(s,o-5),i.get(a+7)&&e.set(o+5,s),i.get(20-a)&&e.set(s,o+5),i.get(27-a)&&e.set(o-5,s)}else for(a=0;a<10;a++)s=o-5+a+Q.truncDivision(a,5),i.get(a)&&e.set(s,o-7),i.get(a+10)&&e.set(o+7,s),i.get(29-a)&&e.set(s,o+7),i.get(39-a)&&e.set(o-7,s)},r.generateCheckWords=function(e,t,n){var i,o,a=e.getSize()/n,s=new Pn(r.getGF(n)),c=Q.truncDivision(t,n),u=r.bitsToWords(e,n,c);s.encode(u,c-a);var f=t%n,d=new Ae;d.appendBits(0,f);try{for(var l=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(Array.from(u)),h=l.next();!h.done;h=l.next())d.appendBits(h.value,n)}catch(C){i={error:C}}
1finally{try{h&&!h.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return d},r.bitsToWords=function(e,t,n){var o,a,i=new Int32Array(n);for(o=0,a=e.getSize()/t;o<a;o++){for(var s=0,c=0;c<t;c++)s|=e.get(o*t+c)?1<<t-c-1:0;i[o]=s}return i},r.getGF=function(e){switch(e){case 4:return Ke.AZTEC_PARAM;case 6:return Ke.AZTEC_DATA_6;case 8:return Ke.AZTEC_DATA_8;case 10:return Ke.AZTEC_DATA_10;case 12:return Ke.AZTEC_DATA_12;default:throw new X("Unsupported word size "+e)}},r.stuffBits=function(e,t){for(var n=new Ae,i=e.getSize(),o=(1<<t)-2,a=0;a<i;a+=t){for(var s=0,c=0;c<t;c++)(a+c>=i||e.get(a+c))&&(s|=1<<t-1-c);(s&o)===o?(n.appendBits(s&o,t),a--):s&o?n.appendBits(s,t):(n.appendBits(1|s,t),a--)}return n},r.totalBitsInLayer=function(e,t){return((t?88:112)+16*e)*e},r.DEFAULT_EC_PERCENT=33,r.DEFAULT_AZTEC_LAYERS=0,r.MAX_NB_BITS=32,r.MAX_NB_BITS_COMPACT=4,r.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]),r}();!function(){function r(){}r.prototype.encode=function(e,t,n,i){return this.encodeWithHints(e,t,n,i,null)},r.prototype.encodeWithHints=function(e,t,n,i,o){var a=Bn.ISO_8859_1,s=Hr.DEFAULT_EC_PERCENT,c=Hr.DEFAULT_AZTEC_LAYERS;return null!=o&&(o.has(ye.CHARACTER_SET)&&(a=Nr.forName(o.get(ye.CHARACTER_SET).toString())),o.has(ye.ERROR_CORRECTION)&&(s=Q.parseInt(o.get(ye.ERROR_CORRECTION).toString())),o.has(ye.AZTEC_LAYERS)&&(c=Q.parseInt(o.get(ye.AZTEC_LAYERS).toString()))),r.encodeLayers(e,t,n,i,a,s,c)},r.encodeLayers=function(e,t,n,i,o,a,s){if(t!==Z.AZTEC)throw new X("Can only encode AZTEC, but got "+t);var c=Hr.encode(q.getBytes(e,o),a,s);return r.renderResult(c,n,i)},r.renderResult=function(e,t,n){var i=e.getMatrix();if(null==i)throw new pt;for(var o=i.getWidth(),a=i.getHeight(),s=Math.max(t,o),c=Math.max(n,a),u=Math.min(s/o,c/a),f=(s-o*u)/2,d=(c-a*u)/2,l=new we(s,c),h=0,p=d;h<a;h++,p+=u)for(var C=0,A=f;C<o;C++,A+=u)i.get(C,h)&&l.setRegion(A,p,u,u);return l}}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.