1"use strict";(self.webpackChunkacurovet=self.webpackChunkacurovet||[]).push([[1156],{265:(T,u,a)=>{a.d(u,{I:()=>y});var r=a(32881),t=a(89417),m=a(99213),f=a(7180),s=a(5380),E=a(85626),l=a(6704),d=a(9183),D=a(98107),C=a(31783),v=a(57829),I=a(96955),h=a(41360);const g=[m.m_,s.M,E.h,l.M,d.D6];let y=(()=>{class c{static{this.\u0275fac=function(B){return new(B||c)}}static{this.\u0275mod=h.$C({type:c})}static{this.\u0275inj=h.G2t({imports:[r.MD,f.Q8,t.X1,g,D.c,C.Y,v.o,I.pc]})}}return c})()},74854:(T,u,a)=>{a.d(u,{J:()=>k});var r=a(89417),t=a(41360),m=a(7180),f=a(29068),s=a(32881),E=a(99213),l=a(22928),d=a(5380),D=a(61396),C=a(85626),v=a(20466),I=a(22788),h=a(19458),g=a(96955);const y=[[["","slotPrefix",""]],[["","slotSuffix",""]],"*"],c=["[slotPrefix]","[slotSuffix]","*"],x=()=>[];function b(e,_){if(1&e){const n=t.RV6();t.qex(0),t.j41(1,"app-input",8),t.bIt("onBlur",function(){t.eBV(n);const i=t.XpG(3);return t.Njj(i.onBlurEvent())}),t.k0s(),t.bVm()}if(2&e){const n=t.XpG(2).$implicit,o=t.XpG();t.R7$(),t.Y8G("control",o._control)("disabled",o.prescriptionTypeCode.scripted===o.inventoryType)("label",o.showLabel&&n("Batch"))("placeholder",!o.showLabel&&n("Batch"))("requiredErrorMessage",n("Batch is required"))}}function B(e,_){if(1&e&&(t.qex(0),t.DNE(1,b,2,5,"ng-container",7),t.bVm()),2&e){t.XpG();const n=t.sdS(7),o=t.XpG();t.R7$(),t.Y8G("ngIf",!o.hideSelection)("ngIfElse",n)}}function R(e,_){if(1&e&&t.nrm(0,"mat-icon",18),2&e){const n=t.XpG(5);t.Y8G("matTooltipPosition",n.tooltipPosition)("matTooltip",n.tooltipText)}}function S(e,_){if(1&e&&(t.j41(0,"mat-label"),t.EFF(1),t.DNE(2,R,1,2,"mat-icon",17),t.k0s()),2&e){const n=t.XpG(3).$implicit,o=t.XpG();t.R7$(),t.SpI(" ",o.label||n("Batch")," "),t.R7$(),t.Y8G("ngIf",o.showTooltip)}}function M(e,_){if(1&e&&(t.j41(0,"mat-select-trigger"),t.EFF(1),t.k0s()),2&e){const n=t.XpG(4);t.R7$(),t.SpI(" ",null==n._control.value?null:n._control.value.batchNumber," ")}}function P(e,_){if(1&e&&(t.qex(0),t.j41(1,"div",21)(2,"div",22),t.EFF(3),t.k0s(),t.j41(4,"div",23)(5,"div",24),t.nrm(6,"app-icon",25),t.j41(7,"span"),t.EFF(8),t.k0s()(),t.j41(9,"div",24),t.nrm(10,"app-icon",26),t.j41(11,"span"),t.EFF(12),t.k0s()()()(),t.bVm()),2&e){const n=t.XpG().$implicit,o=t.XpG(5);t.R7$(),t.AVh("color-error-light",!n.totalAvailableStock&&o.inventoryType===o.prescriptionTypeCode.filled),t.R7$(2),t.JRh(n.batchNumber),t.R7$(3),t.Y8G("color","accent")("icon","price-square-outlined")("size","xs"),t.R7$(2),t.E5c("",n.clinicCurrencySymbol,"",n.sellingPrice," / ",null==n.stockKeepingUnit?null:n.stockKeepingUnit.label,""),t.R7$(2),t.Y8G("color","accent")("icon","inventory-box")("size","xs"),t.R7$(2),t.JRh(null!=n&&n.availableStockLabel?n.availableStockLabel:"-")}}function O(e,_){if(1&e&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&e){const n=t.XpG().$implicit;t.R7$(),t.JRh(n.batchNumber)}}function G(e,_){if(1&e){const n=t.RV6();t.j41(0,"mat-option",20),t.bIt("onSelectionChange",function(i){const p=t.eBV(n).$implicit,J=t.XpG(5);return t.Njj(J.onOptionSelectionChanged(i,p))}),t.DNE(1,P,13,13,"ng-container",7)(2,O,2,1,"ng-template",null,4,t.C5r),t.k0s()}if(2&e){const n=_.$implicit,o=t.sdS(3),i=t.XpG(5);t.Y8G("disabled",!n.totalAvailableStock&&!i.allowEmptyBatchSelection&&i.inventoryType===i.prescriptionTypeCode.filled)("value",n),t.R7$(),t.Y8G("ngIf",!i.isFilter)("ngIfElse",o)}}function w(e,_){if(1&e&&(t.qex(0),t.DNE(1,G,4,4,"mat-option",19),t.bVm()),2&e){const n=t.XpG(4);t.R7$(),t.Y8G("ngForOf",n.items)}}function L(e,_){if(1&e&&(t.j41(0,"mat-option",28),t.EFF(1),t.k0s()),2&e){const n=t.XpG(4).$implicit;t.R7$(),t.SpI(" ",n("No stock available")," ")}}function F(e,_){if(1&e&&t.DNE(0,L,2,1,"mat-option",27),2&e){const n=t.XpG(4);t.Y8G("ngIf",n.isInventoryBatch)}}function V(e,_){if(1&e&&(t.j41(0,"mat-hint",29)(1,"strong"),t.EFF(2),t.k0s()()),2&e){const n=t.XpG(4);t.R7$(2),t.JRh(n.hint)}}function j(e,_){if(1&e&&(t.j41(0,"mat-error"),t.EFF(1),t.k0s()),2&e){const n=t.XpG(4).$implicit,o=t.XpG();t.R7$(),t.SpI(" ",o.requiredMessage||n("This field is required")," ")}}function $(e,_){if(1&e&&(t.j41(0,"mat-error",16),t.DNE(1,j,2,1,"mat-error",10),t.k0s()),2&e){const n=t.XpG(4);t.R7$(),t.Y8G("ngIf",n._control.hasError("required"))}}function A(e,_){if(1&e){const n=t.RV6();t.qex(0),t.j41(1,"mat-form-field",9),t.DNE(2,S,3,2,"mat-label",10),t.j41(3,"div",11),t.SdG(4),t.k0s(),t.j41(5,"mat-select",12),t.bIt("opened",function(){t.eBV(n);const i=t.XpG(3);return t.Njj(i.onOpened())})("selectionChange",function(i){t.eBV(n);const p=t.XpG(3);return t.Njj(p.onSelectionChanged(i.value))}),t.DNE(6,M,2,1,"mat-select-trigger",10)(7,w,2,1,"ng-container",7)(8,F,1,1,"ng-template",null,3,t.C5r),t.k0s(),t.j41(10,"div",13),t.SdG(11,
11),t.k0s(),t.DNE(12,V,3,1,"mat-hint",14)(13,$,2,1,"mat-error",15),t.j41(14,"mat-error",16),t.SdG(15,2),t.k0s()(),t.bVm()}if(2&e){const n=t.sdS(9),o=t.XpG(2).$implicit,i=t.XpG();t.R7$(),t.Y8G("appearance",i.appearance||"outline")("ngClass",i.formFieldClass),t.R7$(),t.Y8G("ngIf",i.showLabel),t.R7$(3),t.Y8G("compareWith",i.compareWithObject)("disabled",i.disabled)("formControl",i._control)("panelClass","dynamic-min-width-batch-dropdown max-w-450px bordered-menu mat-option-table "+i.panelClass)("placeholder",i.placeholder||o("Select"))("required",i.isRequired),t.R7$(),t.Y8G("ngIf",!i.isFilter),t.R7$(),t.Y8G("ngIf",null==i.items?null:i.items.length)("ngIfElse",n),t.R7$(5),t.Y8G("ngIf",i.hint),t.R7$(),t.Y8G("ngIf",!i.hideValidationMessage&&(i._control.touched||i._control.dirty)&&i._control.invalid)}}function W(e,_){if(1&e&&t.DNE(0,A,16,14,"ng-container",7),2&e){t.XpG();const n=t.sdS(5),o=t.XpG();t.Y8G("ngIf",!o.isDropShip)("ngIfElse",n)}}function U(e,_){if(1&e&&(t.j41(0,"div",21)(1,"div",22),t.EFF(2),t.k0s(),t.j41(3,"div",23)(4,"div",24),t.nrm(5,"app-icon",25),t.j41(6,"span"),t.EFF(7),t.k0s()(),t.j41(8,"div",24),t.nrm(9,"app-icon",26),t.j41(10,"span"),t.EFF(11),t.k0s()()()()),2&e){const n=_.option,o=t.XpG(4);t.AVh("color-error-light",!(null!=n&&n.totalAvailableStock)&&o.inventoryType===o.prescriptionTypeCode.filled),t.R7$(2),t.JRh(null==n?null:n.batchNumber),t.R7$(3),t.Y8G("color","accent")("icon","price-square-outlined")("size","xs"),t.R7$(2),t.E5c("",null==n?null:n.clinicCurrencySymbol,"",null==n?null:n.sellingPrice," / ",null==n||null==n.stockKeepingUnit?null:n.stockKeepingUnit.label,""),t.R7$(2),t.Y8G("color","accent")("icon","inventory-box")("size","xs"),t.R7$(2),t.JRh(null!=n&&n.availableStockLabel?n.availableStockLabel:"-")}}function X(e,_){if(1&e){const n=t.RV6();t.j41(0,"app-type-to-search",31),t.bIt("onBlur",function(){t.eBV(n);const i=t.XpG(3);return t.Njj(i.onBlurEvent())})("optionSelected",function(i){t.eBV(n);const p=t.XpG(3);return t.Njj(p.onSelectionChanged(i))}),t.DNE(1,U,12,13,"ng-template",null,5,t.C5r),t.k0s()}if(2&e){const n=t.sdS(2),o=t.XpG(3);t.Y8G("autoMinWidth",!0)("controlLabel","Batch")("control",o._control)("customClass","dynamic-min-width-batch-dropdown max-w-450px mat-option-table")("disabled",o.disabled)("displayWithValue",o.getBatchNumber)("enableSearchForStatic",!0)("getSearchItemDisplayValue",o.getBatchNumber)("isRequired",o.isRequired)("isStatic",!0)("noDataPlaceHolder",null)("optionTemplate",n)("placeholder","Batch")("reloadData",o.reloadData)("showLabel",o.showLabel)("staticItems",o.items||t.lJ4(16,x))}}function K(e,_){if(1&e&&t.DNE(0,X,3,17,"app-type-to-search",30),2&e){t.XpG();const n=t.sdS(7),o=t.XpG();t.Y8G("ngIf",!o.hideSelection)("ngIfElse",n)}}function N(e,_){1&e&&(t.j41(0,"span",32),t.EFF(1,"-"),t.k0s())}function Y(e,_){if(1&e&&(t.qex(0),t.DNE(1,B,2,2,"ng-container",7)(2,W,1,2,"ng-template",null,0,t.C5r)(4,K,1,2,"ng-template",null,1,t.C5r)(6,N,2,0,"ng-template",null,2,t.C5r),t.bVm()),2&e){const n=t.sdS(3),o=t.XpG();t.R7$(),t.Y8G("ngIf",o.inventoryType===o.prescriptionTypeCode.scripted)("ngIfElse",n)}}let k=(()=>{class e{constructor(n){this.cdr=n,this.prescriptionTypeCode=f.Ev,this.items=[],this.allowEmptyBatchSelection=!1,this.showLabel=!0,this.reloadData=!1,this.hideSelection=!1,this.isDropShip=!1,this.isInventoryBatch=!0,this.isFilter=!1,this.isRequired=!1,this.hideValidationMessage=!1,this.hideRequiredMarker=!1,this.hint="",this.showTooltip=!1,this.tooltipPosition="below",this.disabled=!1,this.fetchData=!0,this.isEditable=!0,this.opened=new t.bkB,this.selectionChange=new t.bkB,this.optionSelectionChange=new t.bkB,this.onBlur=new t.bkB,this.isValueSelected=!1,this.compareWithObject=(o,i)=>!!o&&!!i&&o.batchNumber===i.batchNumber,this.getBatchNumber=o=>o&&o.batchNumber}set control(n){this._control=n}ngOnChanges(n){n.items&&!n.items?.firstChange&&(this.reloadData=!this.reloadData,this.cdr.detectChanges()),n.disabled&&this.formControlStateHandler(),n.isRequired&&!n.isRequired.firstChange&&(this.isRequired?this._control.setValidators(r.k0.required):this._control.removeValidators(r.k0.required),this._control.updateValueAndValidity({onlySelf:!0,emitEvent:!1})),n.inventoryType&&!n.inventoryType.firstChange&&(this._control.reset(),this.cdr.detectChanges())}formControlStateHandler(){this.disabled?this._control.disable():this._control.enable()}onOptionSelectionChanged(n,o){n.isUserInput&&this.optionSelectionChange.emit(o)}onSelectionChanged(n){n&&(this.isValueSelected=!0,this.onBlurEvent(),this.previousValue=n,this.selectionChange.emit(n))}onBlurEvent(){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.previousValue!==this._control.value?this.selectionChange.emit(this._control.value):this.isValueSelected=!1},200)}onOpened(){this.opened.emit()}static{this.\u0275fac=function(o){return new(o||e)(t.rXU(t.gRc))}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["app-inventory-batch-dropdown"]],inputs:{items:"items",allowEmptyBatchSelection:"allowEmptyBatchSelection",label:"label",showLabel:"showLabel",reloadData:"reloadData",hideSelection:"hideSelection",isDropShip:"isDropShip",inventoryType:"inventoryType",isInventoryBatch:"isInventoryBatch",isFilter:"isFilter",isRequired:"isRequired",requiredMessage:"requiredMessage",hideValidationMessage:"hideValidationMessage",hideRequiredMarker:"hideRequiredMarker",hint:"hint",placeholder:"placeholder",formFieldClass:"formFieldClass",appearance:"appearance",showTooltip:"showTooltip",tooltipText:"tooltipText",tooltipPosition:"tooltipPosition",disabled:"disabled",fetchData:"fetchData",isEditable:"isEditable",defaultValue:"defaultValue",panelClass:"panelClass",control:"control"},outputs:{opened:"opened",selectionChange:"selectionChange",optionSelectionChange:"optionSelectionChange",onBlur:"onBlur"},standalone:!1,features:[t.Jv_([{provide:m.Lt,useValue:"common"}]),t.OA$],ngContentSelectors:c,decls:1,vars:1,consts:[["showDropdown",""],["dropShipDropDown",""],["noSelection",""],["noDataFound",""],["filterView",""],["batchOptionsTemplate",""],[4,"transloco","translocoRead"],[4,"ngIf","ngIfElse"],[3,"onBlur","control","disabled","label","placeholder","requiredErrorMessage"],[1,"w-full",3,"appearance","ngClass"],[4,"ngIf"],["matPrefix",""],["disableOptionCentering","true",3,"opened","selectionChange","compareWith","disabled","formControl","panelClass","placeholder","required"],["matSuffix",""],["align","start",4,"ngIf"],["class","error-message",4,"ngIf"],[1,"error-message"],["color","primary","svgIcon","help",3,"matTooltipPosition","matTooltip",4,"ngIf"],["color","primary","svgIcon","help",3,"matTooltipPosition","matTooltip"],["style","height: unset",3,"disabled","value","onSelectionChange",4,"ngFor","ngForOf"],[2,"height","unset",3,"onSelectionChange","disabled","value"],[1,"batch-option-grid"],[1,"text-12px","font-bold","line-height-2"],["gdColumns","minmax(90px,120px) minmax(100px, auto)","gdGap","8px",1,"line-height-1"],[1,"flex","items-start","text-12px"],["iconClass","mr-important-4px","tooltip","Cost / Unit",1,"mt-2px",3,"color","icon","size"],["iconClass","mr-important-4px","tooltip","Stock Available",1,"mt-2px",3,"color","icon","size"],["disabled","",4,"ngIf"],["disabled",""],["align","start"],[3,"autoMinWidth","controlLabel","control","customClass","disabled","displayWithValue","enableSearchForStatic","getSearchItemDisplayValue","isRequired","isStatic","noDataPlaceHolder","optionTemplate","placeholder","reloadData","showLabel","staticItems","onBlur","optionSelected",4,"ngIf","ngIfElse"],[3,"onBlur","optionSelected","autoMinWidth","controlLabel","control","customClass","disabled","displayWithValue","enableSearchForStatic","getSearchItemDisplayValue","isRequired","isStatic","noDataPlaceHolder","optionTemplate","placeholder","reloadData","showLabel","staticItems"],[1,"flex","items-center","justify-center","mt-10px"]],template:function(o,i){1&o&&(t.NAR(y),t.DNE(0,Y,8,2,"ng-container",6)),2&o&&t.Y8G("translocoRead","common")},dependencies:[s.YU,s.Sq,s.bT,m.bA,r.BC,r.YS,r.l_,E.An,l.j,l.M,l.c,l.b,l.e,l.g,d.g,d.h,D.M,C.e,v.S,I.x,h.R,g.EK,g.BV],encapsulation:2,changeDetection:0})}}return e})()}}]);
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.