1"use strict";(self.webpackChunkng_portal=self.webpackChunkng_portal||[]).push([[2950],{52950(Ce,te,c){c.d(te,{EhsCompanyEventModule:()=>Et});var V=c(49769),v=c(41838),I=c(88834),ne=c(71997),p=c(21518),H=c(9183),S=c(1843),P=c(52657),E=c(71608);const _={generateAndDownloadLocal:(0,E.Wp)("[EHS_REQ_NGRX] GENERATE_AND_DOWNLOAD"),generateAndDownloadQuestOrder:(0,E.Wp)("[EHS_REQ_NGRX] GENERATE_AND_DOWNLOAD_QUEST_ORDER")};var i=c(85802),j=c(95416),o=c(2505),A=c(76513),O=c(70571),Z=c(63544),Q=c(83032),G=c(73646),f=c(61676),R=c(11747),C=c(84572),M=c(7673),q=c(44437),b=c(88141),F=c(31397),h=c(96354),r=c(70152),y=c(5964),d=c(96697),N=c(99437),w=c(52259),X=c(61558);let z=(()=>{class s{actions$=(0,i.WQX)(R.En);userRegistrationNgrxFacade=(0,i.WQX)(Q.Sy);eventLocationNgrxFacade=(0,i.WQX)(A.dr);eventServiceNgrxFacade=(0,i.WQX)(O.zd);userNgrxFacade=(0,i.WQX)(Z.ZK);userResultsNgrx=(0,i.WQX)(X._e);insuranceProvidersNgrxFacade=(0,i.WQX)(w.Dd);userTestNgrxFacade=(0,i.WQX)(G.bp);ehsFingerstickReqService=(0,i.WQX)(f.FpZ);ehsBioReqService=(0,i.WQX)(f.s0c);ehsCovidReqService=(0,i.WQX)(f.hot);ehsFluReqService=(0,i.WQX)(f.LPj);ehsQuestLabReqService=(0,i.WQX)(f.nQN);mergePdfService=(0,i.WQX)(f.C3R);snackBar=(0,i.WQX)(j.UG);generateAndDownloadLocalEhsReq$=(0,R.EH)(()=>this.actions$.pipe((0,R.gp)(_.generateAndDownloadLocal.req),(0,b.M)(({payload:{userRegistration:e,loadUserRegistration:n}})=>n&&this.userRegistrationNgrxFacade.get(e)),(0,F.Z)(({payload:{userRegistration:e,loadEventService:n,loadEventLocation:a,loadUser:l}})=>(0,C.z)([this.userRegistrationNgrxFacade.loading$,this.userRegistrationNgrxFacade.get$(e).pipe((0,h.T)(m=>m&&(0,o.n12)(m)?m:void 0))]).pipe((0,r.B)(0),(0,y.p)(([m])=>!m),(0,d.s)(1),(0,h.T)(([,m])=>({userRegistration:m,loadEventService:n,loadEventLocation:a,loadUser:l})),(0,b.M)(()=>console.log("test in generateAndDownloadLocalEhsReq",{userRegistration:e,loadEventService:n,loadEventLocation:a,loadUser:l})))),(0,y.p)(({userRegistration:e})=>!!e),(0,b.M)(({userRegistration:e,loadEventService:n,loadEventLocation:a,loadUser:l})=>{e?.eventLocation&&a&&this.eventLocationNgrxFacade.get((0,o.OXZ)(e.eventLocation)),e&&n&&this.eventServiceNgrxFacade.getAsAdmin((0,o.OXZ)(e.eventService)),e&&l&&this.userNgrxFacade.get((0,o.OXZ)(e.user))}),(0,F.Z)(({userRegistration:e})=>(0,C.z)([(0,C.z)([this.eventLocationNgrxFacade.loading$,this.eventServiceNgrxFacade.loading$,this.userNgrxFacade.loading$]),(0,C.z)([e?.eventLocation?this.eventLocationNgrxFacade.get$((0,o.OXZ)(e.eventLocation)):(0,M.of)(void 0),e?.eventService?this.eventServiceNgrxFacade.get$((0,o.OXZ)(e?.eventService)):(0,M.of)(void 0),e?.user?this.userNgrxFacade.get$((0,o.OXZ)(e.user)):(0,M.of)(void 0),this.insuranceProvidersNgrxFacade.entitiesArray$,this.userTestNgrxFacade.entities$])]).pipe((0,r.B)(0),(0,y.p)(([[n,a,l]])=>!n&&!a&&!l),(0,d.s)(1),(0,h.T)(([,[n,a,l,m,T]])=>({userRegistration:e,eventLocation:n,eventService:a,user:l,insuranceProviders:m,userTests:T})))),(0,F.Z)(({userRegistration:e,eventLocation:n,eventService:a,user:l,insuranceProviders:m,userTests:T})=>{if(!(e&&n&&a&&l&&m?.length&&T))throw console.warn({userRegistration:e,eventLocation:n,eventService:a,user:l,insuranceProviders:m,userTests:T}),new Error("Missing params in ehs-reg-ngrx");const L=[];return e.screening&&L.push(e.labType===o.Rnf.EHS?this.ehsFingerstickReqService.generate({user:l,userRegistration:e,eventLocation:n,eventService:a}):this.ehsBioReqService.generate({eventLocation:n,eventService:a,insuranceProviders:m,user:l,userRegistration:e,userTests:T})),(0,o.qAA)(e)&&L.push(this.ehsCovidReqService.generate({eventLocation:n,user:l,userRegistration:e})),(0,o.maI)(e)&&L.push(this.ehsFluReqService.generate({eventLocation:n,eventService:a,userRegistrations:[{...e,user:l}],insuranceProviders:m})),(0,q.y)(...L).pipe((0,F.Z)(D=>this.mergePdfService.merge(D)),(0,b.M)(()=>this.snackBar.open("Starting Download","Ok")),(0,b.M)(D=>this.mergePdfService.downloadOnsite({pdfDocument:D,eventLocation:n,userRegistration:e,user:l})),(0,h.T)(()=>_.generateAndDownloadLocal.success()),(0,N.W)(D=>(console.error(D),this.snackBar.open("Oops, there was an error","Ok"),[_.generateAndDownloadLocal.failed()])),(0,d.s)(1))})));generateAndDownloadQuestOrder$=(0,R.EH)(()=>this.actions$.pipe((0,R.gp)(_.generateAndDownloadQuestOrder.req),(0,b.M)(({payload:{userRegistration:e}})=>this.userRegistrationNgrxFacade.get(e)),(0,F.Z)(({payload:{userRegistration:e}})=>(0,C.z)([this.userRegistrationNgrxFacade.loading$,this.userResultsNgrx.loading$,this.userRegistrationNgrxFacade.get$(e),this.userResultsNgrx.getByReg$(e)]).pipe((0,r.B)(0),(0,y.p)(([n,a])=>!n&&!a),(0,d.s)(1),(0,h.T)(([,,n,a])=>({userRegistration:n,userResult:a})))),(0,y.p)(({userRegistration:e,userResult:n})=>!!e&&(0,o.n12)(e)&&!!e.eventLocation&&!!n),(0,b.M)(({userRegistration:e})=>{(0,o.n12)(e)&&e?.eventLocation&&this.eventLocationNgrxFacade.get((0,o.OXZ)(e.eventLocation)),this.userNgrxFacade.get((0,o.OXZ)(e.user)),this.eventServiceNgrxFacade.getAsAdmin((0,o.OXZ)(e.eventService))}),(0,F.Z)(({userRegistration:e,userResult:n})=>(0,C.z)([(0,C.z)([this.eventLocationNgrxFacade.loading$,this.eventServiceNgrxFacade.loading$,this.userNgrxFacade.loading$,this.userTestNgrxFacade.loading$]),(0,C.z)([(0,o.n12)(e)&&e?.eventLocation?this.eventLocationNgrxFacade.get$((0,o.OXZ)(e.eventLocation)):(0,M.of)(void 0),e?.eventService?this.eventServiceNgrxFacade.get$((0,o.OXZ)(e?.eventService)):(0,M.of)(void 0),e?.user?this.userNgrxFacade.get$((0,o.OXZ)(e.user)):(0,M.of)(void 0),this.userTestNgrxFacade.entities$])]).pipe((0,r.B)(0),(0,y.p)(([[a,l,m,T]])=>!(a||l||m||T)),(0,d.s)(1),(0,h.T)(([,[a,l,m,T]])=>({userRegistration:e,userResult:n,eventLocation:a,eventService:l,user:m,userTests:T})))),(0,F.Z)(({userRegistration:e,userResult:n,eventLocation:a,eventService:l,user:m,userTests:T})=>
1{if(!(e&&n&&(0,o.n12)(e)&&a&&l&&m&&T))throw console.warn({userRegistration:e,userResult:n,eventLocation:a,eventService:l,user:m,userTests:T}),new Error("Missing params in ehs-reg-ngrx");const L={userRegistration:e,userResult:n,eventLocation:a,eventService:l,user:m,userTestMap:T};return this.ehsQuestLabReqService.generate(L).pipe((0,b.M)(()=>this.snackBar.open("Starting Download","Ok")),(0,b.M)(()=>this.ehsQuestLabReqService.generateAndDownload(L)),(0,h.T)(()=>_.generateAndDownloadQuestOrder.success()),(0,N.W)(D=>(console.error(D),this.snackBar.open("Oops, there was an error","Ok"),[_.generateAndDownloadQuestOrder.failed()])),(0,d.s)(1))})));static \u0275fac=function(n){return new(n||s)};static \u0275prov=i.jDH({token:s,factory:s.\u0275fac})}return s})();var u=c(59640);const oe="ehsReqNgrx",Te=(0,u.vy)({},(0,u.on)(_.generateAndDownloadLocal.req,s=>({...s,loading:!0})),(0,u.on)(_.generateAndDownloadLocal.success,s=>({...s,loading:!1})),(0,u.on)(_.generateAndDownloadLocal.failed,s=>({...s,loading:!1})),(0,u.on)(_.generateAndDownloadQuestOrder.req,s=>({...s,loading:!0})),(0,u.on)(_.generateAndDownloadQuestOrder.success,s=>({...s,loading:!1})),(0,u.on)(_.generateAndDownloadQuestOrder.failed,s=>({...s,loading:!1})));let re=(()=>{class s{store=(0,i.WQX)(u.il);loadingSelector=(0,u.Mz)((0,u.UX)(oe),e=>e.loading);loading$=this.store.pipe((0,u.Lt)(this.loadingSelector));generateAndDownloadLocal(e){const{userRegistration:n,loadUserReq:a,loadUserRegistration:l,loadEventLocation:m,loadEventService:T,loadUser:L}=e;this.store.dispatch(_.generateAndDownloadLocal.req({userRegistration:n,loadUserReq:a,loadUserRegistration:l,loadEventLocation:m,loadEventService:T,loadUser:L}))}generateAndDownloadQuestOrder(e){const{userRegistration:n}=e;this.store.dispatch(_.generateAndDownloadQuestOrder.req({userRegistration:n}))}static \u0275fac=function(n){return new(n||s)};static \u0275prov=i.jDH({token:s,factory:s.\u0275fac})}return s})();var t=c(35547);let $e=(()=>{class s{static \u0275fac=function(n){return new(n||s)};static \u0275mod=t.$C({type:s});static \u0275inj=i.G2t({providers:[re],imports:[V.MD,u.md.forFeature(oe,Te),R.Vm.forFeature([z]),f.k2n,j._T]})}return s})();var ce=c(81379);const $={setLoading:(0,u.VP)("[USER_VACCINATION_NGRX] SET_LOADING",(0,u.xk)()),setMany:(0,u.VP)("[USER_VACCINATION_NGRX] SET_MANY",(0,u.xk)()),update:(0,E.Wp)("[USER_VACCINATION_NGRX] UPDATE"),remove:(0,E.Wp)("[USER_VACCINATION_NGRX] REMOVE"),create:(0,E.Wp)("[USER_VACCINATION_NGRX] CREATE"),list:(0,E.Wp)("[USER_VACCINATION_NGRX] LIST")};var le=c(24615);let Fe=(()=>{class s{actions$=(0,i.WQX)(R.En);userVaccinationHttp=(0,i.WQX)(le.LM);snackBar=(0,i.WQX)(j.UG);confirmDialog=(0,i.WQX)(f.gW5);update$=(0,R.EH)(()=>this.actions$.pipe((0,R.gp)($.update.req),(0,F.Z)(({payload:e})=>this.userVaccinationHttp.update(e).pipe((0,h.T)(n=>$.update.success(n)),(0,N.W)(()=>[$.update.failed()])))));list$=(0,R.EH)(()=>this.actions$.pipe((0,R.gp)($.list.req),(0,F.Z)(({payload:e})=>this.userVaccinationHttp.listByLocationId(e.eventLocationId).pipe((0,h.T)(({userVaccinations:n})=>$.list.success({userVaccinations:n})),(0,N.W)(()=>[$.list.failed()])))));remove$=(0,R.EH)(()=>this.actions$.pipe((0,R.gp)($.remove.req),(0,F.Z)(({payload:{id:e}})=>this.confirmDialog.open({title:"Edit Arm",message:"You must fill in an arm for the vaccination"}).pipe((0,b.M)(()=>this.snackBar.open("Update vaccination arm","Ok"),()=>this.snackBar.open("Oops! Something went wrong with removing vaccination(s)","Ok")),(0,F.Z)(n=>n?this.userVaccinationHttp.removeUserVaccination({userRegistration:e}).pipe((0,h.T)(a=>$.remove.success({entity:a})),(0,N.W)(()=>[$.remove.failed()])):[])))));static \u0275fac=function(n){return new(n||s)};static \u0275prov=i.jDH({token:s,factory:s.\u0275fac})}return s})();var de=c(70746);const pe="userVaccinationNgrx",Y=(0,de.p)({selectId:E.Ge}),_e=(0,u.vy)(Y.getInitialState({}),(0,u.on)($.setLoading,(s,{loading:g})=>({...s,loading:g})),(0,u.on)($.setMany,(s,{entities:g})=>Y.upsertMany(g,s)),(0,u.on)($.list.req,s=>({...s,loading:!0})),(0,u.on)($.list.success,(s,{payload:{userVaccinations:g}})=>Y.upsertMany(g,{...s,loading:!1})),(0,u.on)($.list.failed,s=>({...s,loading:!1})),(0,u.on)($.remove.req,s=>({...s,loading:!0})),(0,u.on)($.remove.success,(s,{payload:{entity:g}})=>Y.removeOne((0,o.OXZ)(g),{...s,loading:!1})),(0,u.on)($.remove.failed,s=>({...s,loading:!1}))),ue=(0,u.UX)(pe),J=(0,E.aH)({featureSelector:ue}),Ie=(0,u.Mz)(J.entitiesArraySelector,s=>(0,o.avB)({entities:s,key:"userRegistration"})),Se=(0,u.Mz)(J.entitiesArraySelector,s=>s.reduce((g,e)=>(g[(0,o.OXZ)(e.user)]||(g[(0,o.OXZ)(e.user)]=[]),g[(0,o.OXZ)(e.user)].push(e),g),{})),be={...J,byRegSelectors:Ie,byUserSelector:Se,userTestsSelector:s=>(0,u.Mz)(J.entitiesArraySelector,g=>(g||[]).filter(({user:e})=>(0,o.OXZ)(e)===s))};let ge=(()=>
1{class s extends E.y6{constructor(){super((0,i.WQX)(u.il),ue)}byReg$=this.store.pipe((0,u.Lt)(be.byRegSelectors));removeUserVaccination(e){const{userRegistration:n}=e;this.store.dispatch($.remove.req({id:(0,o.gc2)((0,o.OXZ)(n))}))}setLoading(e){this.store.dispatch($.setLoading({loading:e}))}set(e){this.store.dispatch($.setMany({entities:e}))}list(e){this.store.dispatch($.list.req(e))}update({change:e,userRegistrationId:n}){this.get$(n).pipe((0,d.s)(1)).subscribe(a=>this.store.dispatch($.update.req({...a,...e})))}static \u0275fac=function(n){return new(n||s)};static \u0275prov=i.jDH({token:s,factory:s.\u0275fac})}return s})(),Ae=(()=>{class s{static \u0275fac=function(n){return new(n||s)};static \u0275mod=t.$C({type:s});static \u0275inj=i.G2t({providers:[ge],imports:[j._T,V.MD,u.md.forFeature(pe,_e),R.Vm.forFeature([Fe]),f.l5y]})}return s})();const x={list:(0,E.Wp)("[RACK_NGRX] LIST"),get:(0,E.Wp)("[RACK_NGRX] GET"),update:(0,E.Wp)("[RACK_NGRX] UPDATE"),create:(0,E.Wp)("[RACK_NGRX] CREATE"),clear:(0,u.VP)("[RACK_NGRX] CLEAR"),upsertOne:(0,u.VP)("[RACK_NGRX] UPSERT_ONE",(0,u.xk)())},he="RackNgrx",B=(0,de.p)({selectId:E.Ge}),Oe=(0,u.vy)(B.getInitialState({pageNumber:1}),(0,u.on)(x.upsertOne,(s,{rack:g})=>B.upsertOne(g,s)),(0,u.on)(x.get.req,s=>({...s,loading:!0})),(0,u.on)(x.get.success,(s,{payload:{entity:g}})=>B.upsertOne(g,{...s,loading:!1})),(0,u.on)(x.get.failed,s=>({...s,loading:!1})),(0,u.on)(x.list.req,s=>({...s,loading:!0})),(0,u.on)(x.list.success,(s,{payload:{racks:g}})=>B.setAll(g,{...s,loading:!1})),(0,u.on)(x.list.failed,s=>({...s,loading:!1})),(0,u.on)(x.clear,s=>B.removeAll(s)),(0,u.on)(x.create.req,s=>({...s,loading:!0})),(0,u.on)(x.create.success,(s,{payload:g})=>B.upsertOne(g,{...s,loading:!1})),(0,u.on)(x.create.failed,s=>({...s,loading:!1})),(0,u.on)(x.update.req,s=>({...s,loading:!0})),(0,u.on)(x.update.success,(s,{payload:g})=>B.upsertOne(g,{...s,loading:!1})),(0,u.on)(x.update.failed,s=>({...s,loading:!1})));var me=c(9403);const se=(0,u.UX)(he),ae=(0,E.aH)({featureSelector:se}),Le={...ae,...(0,E.bd)({entitiesArraySelector:ae.entitiesArraySelector,featureSelector:se}),currentSelector:(0,u.Mz)(ae.entitiesArraySelector,me.sV.adminUserSelector,(s,g)=>{if(s?.length&&g)return(s||[]).filter(e=>!e.released&&e.adminId===(0,o.OXZ)(g))||void 0})};let ve=(()=>{class s extends E.y6{constructor(){super((0,i.WQX)(u.il),se)}current$=this.store.select(Le.currentSelector);list(e){this.store.dispatch(x.list.req(e))}get(e){this.store.dispatch(x.get.req({eventLocationId:e}))}clear(){this.store.dispatch(x.clear())}upsertOne(e){this.store.dispatch(x.upsertOne({rack:e}))}update(e){this.store.dispatch(x.update.req({...e}))}create({eventLocation:e,eventService:n}){this.store.dispatch(x.create.req({eventLocation:e,eventService:n}))}static \u0275fac=function(n){return new(n||s)};static \u0275prov=i.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),Me=(()=>{class s{actions$=(0,i.WQX)(R.En);rackFacade=(0,i.WQX)(ve);rackHttp=(0,i.WQX)(le.qP);list$=(0,R.EH)(()=>this.actions$.pipe((0,R.gp)(x.list.req),(0,F.Z)(({payload:e})=>this.rackHttp.list(e).pipe((0,h.T)(({racks:n})=>x.list.success({racks:n})),(0,N.W)(()=>[x.list.failed()])))));get$=(0,R.EH)(()=>this.actions$.pipe((0,R.gp)(x.get.req),(0,F.Z)(({payload:e})=>this.rackHttp.get(e.eventLocationId).pipe((0,h.T)(n=>x.get.success({entity:n})),(0,N.W)(()=>[x.get.failed()])))));create$=(0,R.EH)(()=>this.actions$.pipe((0,R.gp)(x.create.req),(0,F.Z)(({payload:e})=>this.rackHttp.create(e).pipe((0,h.T)(n=>x.create.success(n)),(0,N.W)(()=>[x.create.failed()])))));update$=(0,R.EH)(()=>this.actions$.pipe((0,R.gp)(x.update.req),(0,F.Z)(({payload:e})=>this.rackHttp.update(e).pipe((0,h.T)(n=>x.update.success(n)),(0,N.W)(()=>[x.update.failed()])))));static \u0275fac=function(n){return new(n||s)};static \u0275prov=i.jDH({token:s,factory:s.\u0275fac})}return s})(),Xe=(()=>{class s{static \u0275fac=function(n){return new(n||s)};static \u0275mod=t.$C({type:s});static \u0275inj=i.G2t({imports:[V.MD,u.md.forFeature(he,Oe),R.Vm.forFeature([Me]),j._T]})}return s})();var ie=c(93049),De=c(10467),fe=c(37702),ke=c(67428),Ve=c(93207),W=c(53993),K=c(23294),je=c(14177),we=c(66484);const Ne={...(0,f.wvV)({selectQueryParam:E.am})};let Ge=(()=>{class s{store=(0,i.WQX)(u.il);filters$=this.store.pipe((0,u.Lt)(Ne.allFiltersSelector));search$=this.store.pipe((0,u.Lt)(Ne.searchSelector));matchesFilters(e){const{userRegistration:n,filters:a,rackMap:l}=e;return(0,o.n12)(n)?this.matchesOnsiteFilters({userRegistration:n,filters:a,rackMap:l}):(0,o.FDS)(n)?this.matchesOffsiteFilters({userRegistration:n,filters:a}):!!(0,o._AP)(n)&&this.matchesProviderHealthFilters({userRegistration:n,filters:a})}matchesOnsiteFilters(e){const{userRegistration:n,filters:a}=e,m=!a.eventDate||!o.rL3.isValidDate(a.eventDate)||a.eventDate===n.eventDate,T=!a.startDate||!o.rL3.isValidDate(a.startDate)||a.startDate<=n.eventDate,L=!a.endDate||!o.rL3.isValidDate(a.endDate)||a.endDate>=n.eventDate,D=!a.admin||n.reviewedBy===a.admin||n.releasedBy===a.admin,Ct=a.screeningFilter!==f.oI9.SCREENING||!!n.screening,Tt=a.screeningFilter!==f.oI9.FLU||!!n.vaccination?.vaccinationType?.length,$t=a.rack?(0,o.OXZ)(n.rackId||"")===(0,o.OXZ)(a.rack):D,xe=this.convertReleasedQueryToBoolean(a.released),Ft=xe?!!n.releasedAt:!1!==xe||!n.releasedAt,Ee=this.convertMailedRequestQueryToBoolean(a.mailedRequest);return m&&T&&L&&D&&$t&&Ft&&Ct&&Tt&&("boolean"!=typeof Ee||Ee===!!n.mailedReportRequest)}convertReleasedQueryToBoolean(e){return"boolean"==typeof e?e:"true"===e||"false"!==e&&void 0}matchesOffsiteFilters(e){return!0}matchesProviderHealthFilters(e){return!0}convertMailedRequestQueryToBoolean(e){return"boolean"==typeof e?e:"true"===e||e===f.Dc6.MAILED_REQUEST||"false"!==e&&e!==f.Dc6.NO_MAILED_REQUEST&&void 0}static \u0275fac=function(n){return new(n||s)};static \u0275prov=i.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();const Re={init:(0,u.VP)("[EHS_COMPANY_ONSITE] INIT"),initSuccess:(0,u.VP)("[EHS_COMPANY_ONSITE] INIT_SUCCESS"),initFailed:(0,u.VP)("[EHS_COMPANY_ONSITE] INIT_FAILED")};let Be=(()=>{class s{store=(0,i.WQX)(u.il);init(){this.store.dispatch(Re.init())}static \u0275fac=function(n){return new(n||s)};static \u0275prov=i.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var ye=c(25438),We=c(18226),Qe=c(80954),He=c(80848),Ze=c(32442),Ue=c(53670),ee=c(62302),Pe=c(43740),qe=c(5722),ze=c(5736),Ye=c(7456),Je=c(67274),Ke=c(67045);const et=(s,g)=>["/ehs/admin/company",s,"service",g],U=()=>[],k=()=>({}),tt=()=>["./walkin/search"];function nt(s,g){1&s&&(t.j41(0,"div",11),t.nrm(1,"mat-spinner",23),t.k0s())}function st(s,g){if(1&s){const e=t.RV6();t.j41(0,"ehs-gwapps-event",25,3),t.nI1(2,"async"),t.nI1(3,"async"),t.bIt("view",function(){const a=i.eBV(e),l=t.sdS(1);return i.Njj(l.store.viewAsJson(a))})("validate",function(){const a=i.eBV(e),l=t.sdS(1);return i.Njj(l.store.validateData({id:a._id,resource:"eventLocations"}))})("export",function(){i.eBV(e);const a=t.XpG(2);return i.Njj(a.exportToSheets())})("cancelEvent",function(a){i.eBV(e);const l=t.XpG(2);return i.Njj(l.handleCancelEvent(a))})("sendEventNotification",function(a){i.eBV(e);const l=t.XpG(2);return i.Njj(l.handleSendEventNotification(a))}),t.k0s()}if(2&s){const e=g,n=t.XpG(2);t.Y8G("eventLocation",e)("stats",(t.bMT(2,5,n.eventLocationRegStats$)||t.lJ4(9,k))[e._id+""])("hideAddress",!0)("canEditRate",!0===t.bMT(3,7,n.canEditRate$))("collapse",!1)}}function at(s,g){if(1&s&&(t.qex(0,12,2),t.nVh(2,st,4,10,"ehs-gwapps-event",24),t.nI1(3,"async"),t.bVm()),2&s){let e;const n=t.sdS(1);t.R7$(2),t.vxM((e=t.bMT(3,1,n.store.currentByRoute$))?2:-1,e)}}function it(s,g){if(1&s){const e=t.RV6();t.j41(0,"button",32),t.nI1(1,"async"),t.bIt("click",function(){i.eBV(e);const a=t.XpG(2);return i.Njj(a.handleMarkResulted())}),t.j41(2,"mat-icon",10),t.EFF(3,"star"),t.k0s(),t.j41(4,"span"),t.EFF(5,"Mark Resulted"),t.k0s()()}if(2&s){const e=t.XpG(2);t.Y8G("disabled",t.bMT(1,1,e.loading$))}}function ot(s,g){if(1&s){const e=t.RV6();t.j41(0,"button",33),t.nI1(1,"async"),t.bIt("click",function(){i.eBV(e);const a=t.XpG(2);return i.Njj(a.exportSelectedEhsReport())}),t.j41(2,"mat-icon",10),t.EFF(3,"add_to_drive"),t.k0s(),t.j41(4,"span"),t.EFF(5),t.nI1(6,"async"),t.k0s()()}if(2&s){const e=t.XpG(2);t.Y8G("disabled",!0===t.bMT(1,2,e.loading$)),t.R7$(5),t.SpI("Export EHS Results (",t.bMT(6,4,e.selectedLength$),")")}}function rt(s,g){if(1&s){const e=t.RV6();t.j41(0,"button",34),t.nI1(1,"async"),t.nI1(2,"async"),t.nI1(3,"async"),t.bIt("click",function(){i.eBV(e);const a=t.XpG(2);return i.Njj(a.downloadSelectedLabReqs())}),t.j41(4,"mat-icon",10),t.EFF(5,"download"),t.k0s(),t.j41(6,"span"),t.EFF(7),t.nI1(8,"async"),t.k0s()()}if(2&s){const e=t.XpG(2);t.Y8G("disabled",!0===t.bMT(1,4,e.downloadLabReqsDisabled$))("fxHide",!0===t.bMT(2,6,e.downloadLabReqsDisabled$))("title",t.bMT(3,8,e.downloadLabReqsDisabled$)?"Not all selected have reqs":"Download selected user-regs"),t.R7$(7),t.SpI("Download L
1ab Reqs (",t.bMT(8,10,e.selectedLength$),")")}}function ct(s,g){if(1&s){const e=t.RV6();t.j41(0,"button",34),t.nI1(1,"async"),t.nI1(2,"async"),t.nI1(3,"async"),t.bIt("click",function(){i.eBV(e);const a=t.XpG(2);return i.Njj(a.releaseSelected())}),t.j41(4,"mat-icon",10),t.EFF(5,"send"),t.k0s(),t.j41(6,"span"),t.EFF(7),t.nI1(8,"async"),t.k0s()()}if(2&s){const e=t.XpG(2);t.Y8G("disabled",t.bMT(1,4,e.releaseDisabled$))("fxHide",t.bMT(2,6,e.releaseDisabled$))("title",t.bMT(3,8,e.releaseDisabled$)?"Not all registrations selected have Results":"Release selected registrations for this event to the lab"),t.R7$(7),t.SpI("Release Selected To Lab (",t.bMT(8,10,e.selectedLength$),")")}}function lt(s,g){if(1&s){const e=t.RV6();t.j41(0,"button",26),t.nI1(1,"async"),t.nI1(2,"async"),t.bIt("click",function(){i.eBV(e);const a=t.XpG();return i.Njj(a.handleMarkNoShow())}),t.j41(3,"mat-icon",10),t.EFF(4,"no_accounts"),t.k0s(),t.j41(5,"span"),t.EFF(6,"Mark No Show"),t.k0s()(),t.nVh(7,it,6,3,"button",27),t.j41(8,"button",28),t.nI1(9,"async"),t.nI1(10,"async"),t.bIt("click",function(){i.eBV(e);const a=t.XpG();return i.Njj(a.handleVaccinationNoShow())}),t.j41(11,"mat-icon",10),t.EFF(12,"vaccines"),t.k0s(),t.j41(13,"span"),t.EFF(14,"Mark Vaccination No Show"),t.k0s()(),t.j41(15,"button",29),t.nI1(16,"async"),t.bIt("click",function(){i.eBV(e);const a=t.XpG();return i.Njj(a.handleMarkCompleted())}),t.j41(17,"mat-icon",10),t.EFF(18,"check"),t.k0s(),t.j41(19,"span"),t.EFF(20,"Mark Completed"),t.k0s()(),t.nVh(21,ot,7,6,"button",30),t.nI1(22,"async"),t.nVh(23,rt,9,12,"button",31),t.nI1(24,"async"),t.nVh(25,ct,9,12,"button",31),t.nI1(26,"async")}if(2&s){const e=t.XpG();t.Y8G("disabled",!0===t.bMT(1,9,e.loading$))("fxHide",t.bMT(2,11,e.noShowDisabled$)),t.R7$(7),t.vxM(e.showResultedButton?7:-1),t.R7$(),t.Y8G("disabled",t.bMT(9,13,e.loading$))("fxHide",t.bMT(10,15,e.vaccinationRemovalDisabled$)),t.R7$(7),t.Y8G("disabled",!0===t.bMT(16,17,e.loading$)),t.R7$(6),t.vxM(t.bMT(22,19,e.canExportToDrive$)?21:-1),t.R7$(2),t.vxM(t.bMT(24,21,e.showDownloadLabReq$)?23:-1),t.R7$(2),t.vxM(t.bMT(26,23,e.canReleaseToLab$)?25:-1)}}function dt(s,g){if(1&s){const e=t.RV6();t.j41(0,"button",35,4),t.nI1(2,"async"),t.bIt("click",function(){i.eBV(e);const a=t.sdS(1),l=t.XpG();return i.Njj(a.store.generateAndExportToDrive({request:{option:l.GcfPdfExportOptions.EHS_REPORT,eventServiceId:l.eventService}}))}),t.j41(3,"mat-icon",10),t.EFF(4,"add_to_drive"),t.k0s(),t.j41(5,"span"),t.EFF(6,"Export EHS Results"),t.k0s()(),t.j41(7,"button",36),t.bIt("click",function(){i.eBV(e);const a=t.XpG();return i.Njj(a.exportMissingResults())}),t.j41(8,"mat-icon",10),t.EFF(9,"add_to_drive"),t.k0s(),t.j41(10,"span"),t.EFF(11,"Export Missing Results"),t.k0s()()}if(2&s){const e=t.XpG();t.Y8G("disabled",!0===t.bMT(2,1,e.loading$))}}function pt(s,g){if(1&s){const e=t.RV6();t.j41(0,"button",37),t.bIt("click",function(){i.eBV(e);const a=t.XpG();return i.Njj(a.handleRack("end"))}),t.j41(1,"mat-icon",10),t.EFF(2,"playlist_add_check"),t.k0s(),t.EFF(3," End Rack "),t.k0s()}}function ut(s,g){if(1&s){const e=t.RV6();t.j41(0,"button",38),t.bIt("click",function(){i.eBV(e);const a=t.XpG();return i.Njj(a.handleRack("begin"))}),t.j41(1,"mat-icon",10),t.EFF(2,"playlist_add"),t.k0s(),t.EFF(3," Begin Rack "),t.k0s()}}function gt(s,g){1&s&&(t.j41(0,"div",11),t.nrm(1,"mat-spinner",23),t.k0s())}function ht(s,g){1&s&&t.nrm(0,"ehs-call-to-action",39)}function mt(s,g){if(1&s){const e=t.RV6();t.j41(0,"ehs-reg-table",41),t.nI1(1,"async"),t.nI1(2,"async"),t.nI1(3,"async"),t.nI1(4,"async"),t.nI1(5,"async"),t.nI1(6,"async"),t.nI1(7,"async"),t.nI1(8,"async"),t.nI1(9,"async"),t.nI1(10,"async"),t.nI1(11,"async"),t.nI1(12,"async"),t.nI1(13,"async"),t.bIt("toggleAll",function(){i.eBV(e);const a=t.XpG(3);return i.Njj(a.onToggleAll())})("actionChange",function(a){i.eBV(e);const l=t.XpG(3);return i.Njj(l.onActionChange(a))})("userVaccinationChange",function(a){i.eBV(e);const l=t.XpG(3);return i.Njj(l.onUserVaccinationChange(a))})("toggle",function(a){i.eBV(e),t.XpG(3);const l=t.sdS(13);return i.Njj(l.store.selectionToggle(a))})("refresh",function(){i.eBV(e);const a=t.XpG(3);return i.Njj(a.refresh())}),t.k0s()}if(2&s){const e=t.XpG(),n=t.XpG(2),a=t.sdS(13);t.Y8G("userRegistrations",e)("users",t.bMT(1,15,n.users$)||t.lJ4(41,k))("eventLocation",t.bMT(2,17,n.eventLocation$)||t.lJ4(42,k)
1)("eventService",t.bMT(3,19,n.eventService$)||void 0)("allAreSelected",t.bMT(4,21,n.allSelected$)||!1)("indeterminate",t.bMT(5,23,n.indeterminate$)||!1)("userResultsByRegId",t.bMT(6,25,n.userResults$)||t.lJ4(43,k))("userReqsByRegId",t.bMT(7,27,n.userReqs$)||t.lJ4(44,k))("adminUsers",t.bMT(8,29,n.adminUsersMap$)||t.lJ4(45,k))("userVaccsByRegId",t.bMT(9,31,n.userVaccs$)||t.lJ4(46,k))("company",n.company)("racks",t.bMT(10,33,n.racks$))("columns",t.bMT(11,35,n.columns$)||t.lJ4(47,U))("disabled",!0===t.bMT(12,37,n.loading$))("selected",t.bMT(13,39,a.store.selectedIds$)||t.lJ4(48,U))}}function vt(s,g){if(1&s&&(t.nVh(0,ht,1,0,"ehs-call-to-action",39),t.nVh(1,mt,14,49,"ehs-reg-table",40)),2&s){const e=g;t.vxM(e.length?-1:0),t.R7$(),t.vxM(e.length?1:-1)}}function ft(s,g){if(1&s&&(t.nVh(0,vt,2,2),t.nI1(1,"async")),2&s){let e;const n=t.XpG();t.vxM((e=t.bMT(1,1,n.userRegistrations$))?0:-1,e)}}function Nt(s,g){if(1&s&&(t.j41(0,"pre"),t.EFF(1),t.nI1(2,"async"),t.nI1(3,"json"),t.k0s()),2&s){const e=t.XpG();t.R7$(),t.SpI(" filters: ",t.bMT(3,3,t.bMT(2,1,e.filters$)),"\n ")}}const Rt=[{path:"",component:(()=>{class s{router=(0,i.WQX)(fe.Ix);route=(0,i.WQX)(fe.nX);ehsRegTableService=(0,i.WQX)(f.iNj);ehsRegFiltersFacade=(0,i.WQX)(Ge);adminCoreNgrx=(0,i.WQX)(me.Uj);ehsCompanyEventFacade=(0,i.WQX)(Be);userVaccinationNgrx=(0,i.WQX)(ge);userRegistrationNgrx=(0,i.WQX)(Q.Sy);eventServiceNgrx=(0,i.WQX)(O.zd);eventLocationNgrx=(0,i.WQX)(A.dr);userReqNgrx=(0,i.WQX)(ce.nP);userNgrx=(0,i.WQX)(Z.ZK);userResultsNgrx=(0,i.WQX)(X._e);companyNgrx=(0,i.WQX)(ke.nG);ehsReportNgrxFacade=(0,i.WQX)(P.I1);ehsQuestLabReqFacade=(0,i.WQX)(f.nQN);ehsReqNgrxFacade=(0,i.WQX)(re);adminGwNgrxFacade=(0,i.WQX)(S.ti);adminRackNgrx=(0,i.WQX)(ve);adminNotificationNgrx=(0,i.WQX)(ye.as);confirmDialog=(0,i.WQX)(f.gW5);redrawUserTestDialog=(0,i.WQX)(f.oPk);featureFlags=(0,i.WQX)(we.Q);debug=(0,i.WQX)(je.f,{optional:!0});GcfPdfExportOptions=o.T9c;showResultedButton=this.featureFlags?.showResultedButton;filters$=this.ehsRegFiltersFacade.filters$;userRegistrations=[];userTests={};userVaccs$=this.userVaccinationNgrx.byReg$;columns$=this.adminCoreNgrx.user$.pipe((0,W.E)(this.filters$),(0,h.T)(([e,n])=>e?this.ehsRegTableService.getOnsiteColumns({admin:e,reg:n.screeningFilter,vaccinationAction:n?.vaccinationAction}):[]));currentRack$=this.adminRackNgrx.current$.pipe((0,h.T)(e=>e?.find(n=>n?.eventLocationId===(0,o.OXZ)(this.eventLocation))));racks$=this.adminRackNgrx.entitiesArray$;loadingEventData$=(0,C.z)([this.eventServiceNgrx.loading$,this.eventLocationNgrx.loading$]).pipe((0,h.T)(e=>e.find(Boolean)));loading$=(0,C.z)([this.eventServiceNgrx.loading$,this.userVaccinationNgrx.loading$,this.userRegistrationNgrx.loading$,this.userReqNgrx.loading$,this.eventLocationNgrx.loading$]).pipe((0,h.T)(e=>e.find(Boolean)));eventService$=this.eventServiceNgrx.currentByRoute$.pipe((0,y.p)(e=>!!e),(0,h.T)(e=>e));search$=this.ehsRegFiltersFacade.search$;admins$=(0,C.z)([this.userRegistrationNgrx.entitiesArray$.pipe((0,h.T)(e=>e.filter(n=>(0,o.n12)(n)?n.eventLocation&&(0,o.OXZ)(n.eventLocation)===this.eventLocation:[!1])),(0,h.T)(e=>{const n=e.reduce((a,l)=>{const m=l.reviewedBy;return m?a.add((0,o.OXZ)(m)):a},new Set);return Array.from(n.values()).filter(a=>!!a)})),this.adminCoreNgrx.entities$]).pipe((0,h.T)(([e,n])=>e.map(a=>n[a])));adminUsersMap$=this.adminCoreNgrx.entities$;userRegistrations$=this.userRegistrationNgrx.searchFn$({users$:this.userNgrx.entities$,search$:this.search$,filterFn$:(0,C.z)([this.eventServiceNgrx.currentByRoute$,this.eventLocationNgrx.currentByRoute$,this.ehsRegFiltersFacade.filters$,this.currentRack$]).pipe((0,h.T)(([e,n,a,l])=>e&&n?m=>!((0,o.OXZ)(m?.eventService)!==(0,o.OXZ)(e)||!m||!(0,o.n12)(m)||[o.zvg.CANCELED].includes(m.status)||m.rackId&&l&&(0,o.OXZ)(l)!==(0,o.OXZ)(m.rackId||"")||!m?.eventLocation||(0,o.OXZ)(m?.eventLocation)!==(0,o.OXZ)(n))&&this.ehsRegFiltersFacade.matchesFilters({filters:a,userRegistration:m}):()=>!1))}).pipe((0,W.E)(this.ehsRegFiltersFacade.filters$),(0,h.T)(([e,n])=>(e||[]).sort((a,l)=>n&&n.screeningFilter!==f.oI9.SCREENING?n.screeningFilter===f.oI9.FLU&&(0,o.n12)(a)&&(0,o.n12)(l)?a.fluReviewedAt||l.fluReviewedAt?a.fluReviewedAt&&!l.fluReviewedAt||a.fluReviewedAt>l.fluReviewedAt?1:-1:a?.user?.lastName>l?.user?.lastName?1:-1:0:(0,o.n12)(a)&&(0,o.n12)(l)?a.reviewedAt||l.reviewedAt?a.reviewedAt&&!l.reviewedAt||a.reviewedAt>l.reviewedAt?1:-1:a?.user?.lastName>l?.user?.lastName?1:-1:0)));canExportToDrive$=this.adminCoreNgrx.adminScopes$.pipe((0,h.T)(e=>e.includes(o.iDm.EXPORT_PDF_REPORTS)));canExportRegsToDrive$=this.adminCoreNgrx.adminScopes$.pipe((0,h.T)(e=>e.includes(o.iDm.REG_EXPORT_FULL)));canReleaseToLab$=this.adminCoreNgrx.adminScopes$.pipe((0,h.T)(e=>e.includes(o.iDm.RELEASE_TO_LAB)));canEditRate$=this.adminCoreNgrx.adminScopes$.pipe((0,h.T)(e=>e.includes(o.iDm.CUSTOM_TIMES)));downloadLabReqsDisabled$=(0,C.z)([this.loading$,this.userRegistrationNgrx.selected$.pipe((0,h.T)(e=>e.every(n=>!!(0,o.n12)(n)&&!!n.userRequisition)))]).pipe((0,h.T)(([e,n])=>e||!n),(0,K.F)());noShowDisabled$=(0,C.z)([this.loading$,this.ehsRegFiltersFacade.filters$.pipe((0,h.T)(e=>e.screeningFilter===f.oI9.FLU&&e.screeningFilter)),this.userRegistrationNgrx.selected$.pipe((0,h.T)((e,n)=>e.every(a=>
1!!(0,o.n12)(a)&&(a.status===o.zvg.NO_SHOW||n))))]).pipe((0,h.T)(([e,n])=>e||n),(0,K.F)());vaccinationRemovalDisabled$=(0,C.z)([this.loading$,this.ehsRegFiltersFacade.filters$.pipe((0,h.T)(e=>e?.screeningFilter!==f.oI9.FLU&&e.screeningFilter)),this.userRegistrationNgrx.selected$.pipe((0,h.T)((e,n)=>(e||[]).every(a=>!!(0,o.n12)(a)&&(a.status===o.zvg.NO_SHOW||n))))]).pipe((0,h.T)(([e,n])=>e||n),(0,K.F)());showStartVaccination$=(0,C.z)([this.loading$,this.ehsRegFiltersFacade.filters$.pipe((0,h.T)(e=>e.screeningFilter!==f.oI9.FLU&&e.screeningFilter))]).pipe((0,h.T)(([e,n])=>e||n),(0,K.F)());showDownloadLabReq$=(0,C.z)([this.canExportToDrive$,this.eventServiceNgrx.currentByRoute$.pipe((0,h.T)(e=>e?o.wch.getSelectedService({eventService:e,serviceType:o.C00.ONSITE}):void 0),(0,h.T)(e=>!(!e||![o.Rnf.LAB_CORP,o.Rnf.QUEST].includes(e.labType))))]).pipe((0,h.T)(([e,n])=>e&&n));users$=this.userNgrx.entities$;userResults$=this.userResultsNgrx.byReg$;userVaccinations$=this.userVaccinationNgrx.byReg$;userReqs$=this.userReqNgrx.byReg$;eventLocationRegStats$=this.eventLocationNgrx.getStats$().pipe((0,y.p)(e=>!!e));allSelected$=(0,C.z)([this.userRegistrations$,this.userRegistrationNgrx.selectedIds$]).pipe((0,h.T)(([e,n])=>e.length&&n?.length&&e.length===n.length));releaseDisabled$=(0,C.z)([this.loading$,this.userRegistrationNgrx.selectedIds$,this.userResultsNgrx.byReg$]).pipe((0,h.T)(([e,n,a])=>e||!n||!n.length||!n.every(l=>a[(0,o.gc2)((0,o.OXZ)(l))])));indeterminate$=(0,C.z)([this.userRegistrations$,this.userRegistrationNgrx.selectedIds$]).pipe((0,h.T)(([e,n])=>e.length&&n?.length&&e.length!==n.length));selectedLength$=this.userRegistrationNgrx.selectedLength$;company=this.route?.snapshot?.params?.companyId;eventService=this.route?.snapshot?.params?.eventServiceId;eventLocation=this.route?.snapshot?.params?.eventLocationId;eventLocation$=this.eventLocationNgrx.get$(this.eventLocation);constructor(){this.eventServiceNgrx.getByCurrentRoute(),this.ehsCompanyEventFacade.init(),this.userVaccinationNgrx.list({eventLocationId:(0,o.OXZ)(this.eventLocation)}),this.userRegistrationNgrx.selectionClear(),this.adminCoreNgrx.list(),this.adminRackNgrx.get((0,o.OXZ)(this.eventLocation)),this.adminRackNgrx.list({eventLocationId:(0,o.OXZ)(this.eventLocation),released:void 0})}ngOnDestroy(){this.userRegistrationNgrx.selectionClear(),this.adminRackNgrx.clear()}refresh(){this.userRegistrationNgrx.selectionClear(),this.userRegistrationNgrx.listAsAdminForEventRoute({serviceType:o.C00.ONSITE,includeReq:!0,includeResult:!0,includeUser:!0,excludePdfs:!0})}onFiltersChange(e){this.router.navigate(["./"],{relativeTo:this.route,queryParams:e,queryParamsHandling:"merge"}),this.refresh()}onColumnChange(e){this.router.navigate(["./"],{relativeTo:this.route,queryParams:e,queryParamsHandling:"merge"})}exportToSheets(){this.confirmDialog.open({title:"Member List Export",message:"Are you sure you want to export this event registrations to Drive?"}).pipe((0,d.s)(1)).subscribe(e=>{e&&this.companyNgrx.exportUserRegistrations({events:[this.eventLocation],fullReport:!1,covidReport:!1})})}onToggleAll(){this.allSelected$.pipe((0,W.E)(this.userRegistrations$),(0,d.s)(1)).subscribe(([e,n])=>e?this.userRegistrationNgrx.selectionClear():this.userRegistrationNgrx.selectMany(n))}exportSelectedEhsReport(){this.userRegistrationNgrx.selectedIds$.pipe((0,d.s)(1)).subscribe(e=>this.ehsReportNgrxFacade.generateAndExportToDrive({request:{option:o.T9c.EHS_REPORT,userRegistrationIds:(e||[]).map(o.OXZ).map(o.gc2)}}))}exportMissingResults(){this.companyNgrx.exportMissingResults({eventServiceId:(0,o.OXZ)(this.eventService),eventLocationId:(0,o.OXZ)(this.eventLocation)})}exportSelectedLabReq(){this.userRegistrationNgrx.selectedIds$.pipe((0,d.s)(1)).subscribe(e=>this.userReqNgrx.generateAndExportLabReqToDrive({request:{option:o.T9c.LAB_REQ,userRegistrationIds:(e||[]).map(o.OXZ).map(o.gc2)}}))}downloadSelectedLabReqs(){(0,C.z)([(0,C.z)([this.userRegistrationNgrx.loading$,this.eventLocationNgrx.loading$]),(0,C.z)([this.userRegistrationNgrx.selectedIds$,this.eventLocationNgrx.get$(this.eventLocation)])]).pipe((0,y.p)(([e])=>!e.find(Boolean)),(0,d.s)(1),(0,h.T)(([,[e,n]])=>({userRegistrations:e,eventLocation:n}))).subscribe(({userRegistrations:e,eventLocation:n})=>this.userReqNgrx.generateAndDownloadLocalLabReqs({userRegistrations:(e||[]).map(o.OXZ).map(o.gc2),eventLocation:n}))}onActionChange({actionType:e,userRegistration:n}){switch(e){case"removeResult":this.removeResult(n);break;case"removeResultAndRegistration":this.removeResultAndRegistration(n);break;case"removeVaccination":this.removeVaccination(n);break;case"removeVaccinationAndRegistration":this.removeVaccinationAndRegistration(n);break;case"releaseToLab":this.releaseToLab(n);break;case"downloadReport":this.handleDownloadReport(n,"en");break;case"downloadReportEs":this.handleDownloadReport(n,"es");break;case"downloadLabPdf":this.handleDownloadLabPdf(n);break;case"downloadReq":this.handleDownloadReq(n);break;case"downloadRedrawReq":this.handleDownloadRedraw(n);break;case"downloadQuestOrder":this.downloadQuestOrder(n);break;case"viewRawResult":this.handleViewRawResult(n);break;case"viewRawRegistration":this.adminGwNgrxFacade.viewAsJson(n);break;case"redrawOrder":this.handleRedraw(n,this.userTests);break;default:return}}handleViewRawResult(e){this.userResultsNgrx.getByReg$((0,o.gc2)((0,o.OXZ)(e))).pipe((0,d.s)(1)).subscribe(n=>n&&this.adminGwNgrxFacade.viewAsJson(n))}releaseSelected(){this.userRegistrationNgrx.selected$.pipe((0,d.s)(1)).subscribe(e=>e&&this.userRegistrationNgrx.sendOrderToLab({userRegistrations:e}))}releaseToLab(e){this.userRegistrationNgrx.sendOrderToLab({userRegistrations:[e]})}removeResult(e){this.userResultsNgrx.removeUserResult({userRegistration:e})}removeVaccination(e){this.userVaccinationNgrx.removeUserVaccination({userRegistration:e})}removeResultAndRegistration(e){this.userRegistrationNgrx.remove(e)}removeVaccinationAndRegistration(e){this.userRegistrationNgrx.removeVaccinationAndRegistration(e)}handleDownloadReport(e,n){this.ehsReportNgrxFacade.generateAndDownload({userRegistration:e,language:n})}handleDownloadLabPdf(e){this.userResultsNgrx.getByReg$((0,o.gc2)((0,o.OXZ)(e))).pipe((0,d.s)(1)).subscribe(n=>this.userResultsNgrx.generateAndDownloadLocal({userResult:(0,o.OXZ)(n),loadUserResult:!0}))}downloadQuestOrder(e){this.ehsReqNgrxFacade.generateAndDownloadQuestOrder({userRegistration:(0,o.gc2)((0,o.OXZ)(e))})}handleDownloadReq(e){this.ehsReqNgrxFacade.generateAndDownloadLocal({userRegistration:(0,o.gc2)((0,o.OXZ)(e)),loadUserReq:!0,loadEventLocation:!1,loadEventService:!1,loadUserRegistration:!1})}handleDownloadRedraw(e){this.userReqNgrx.generateAndDownloadRedrawReq({userRegistration:(0,o.gc2)((0,o.OXZ)(e)),loadUserReq:!0})}handleRedraw(e,n){var a=this;return(0,De.A)(function*(){const l=a.redrawUserTestDialog.open({userTests:n,userRegistration:e}),m=yield(0,Ve.s)(l);m&&a.userRegistrationNgrx.updateRegistrationRedraw(m)})()}handleRack(e){"begin"===e?this.eventLocationNgrx.get$(this.eventLocation).pipe((0,d.s)(1),(0,W.E)(this.eventService$)).subscribe(([n,a])=>{this.adminRackNgrx.create({eventLocation:n,eventService:a})}):this.confirmDialog.open({title:"End Current Rack",message:"Are you sure you want to end the current rack?"}).pipe((0,d.s)(1),(0,W.E)(this.currentRack$)).subscribe(([n,a])=>{n&&a&&this.adminRackNgrx.update(a)})}handleSendEventNotification(e){this.adminNotificationNgrx.create({eventLocation:e})}handleMarkNoShow(){this.userRegistrationNgrx.selected$.pipe((0,d.s)(1),(0,W.E)(this.userResults$,this.userVaccinations$)).subscribe(([e,n])=>{const a=e.filter(l=>!n[(0,o.OXZ)(l)]&&l.status!==o.zvg.NO_SHOW);return a&&this.userRegistrationNgrx.markNoShow({userRegistrations:a})})}handleMarkResulted(){this.userRegistrationNgrx.selected$.pipe((0,d.s)(1)).subscribe(e=>e&&this.userRegistrationNgrx.markResulted({userRegistrations:e}))}handleVaccinationNoShow(){this.userRegistrationNgrx.selected$.pipe((0,d.s)(1)).subscribe(e=>this.userRegistrationNgrx.markVaccinationNoShow({userRegistrations:e})),this.refresh()}handleRemoveVaccination(){this.userRegistrationNgrx.selected$.pipe((0,d.s)(1),(0,W.E)(this.userResults$,this.userVaccinations$)).subscribe(([e,n])=>{const a=e.filter(l=>!n[(0,o.OXZ)(l)]);return a&&this.userRegistrationNgrx.removeVaccination({userRegistrations:a})})}handleMarkCompleted(){this.userRegistrationNgrx.selected$.pipe((0,d.s)(1)).subscribe(e=>{const n=e.filter(a=>a.status===o.zvg.NO_SHOW);return n&&this.userRegistrationNgrx.markCompleted({userRegistrations:n})})}onUserVaccinationChange(e){this.userVaccinationNgrx.update({change:e,userRegistrationId:(0,o.OXZ)(e?.userRegistration)})}handleCancelEvent(e){this.eventLocationNgrx.cancelEvent(e)}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=t.VBU({type:s,selectors:[["ehs-company-event"]],inputs:{userRegistrations:"userRegistrations",userTests:"userTests"},standalone:!1,decls:41,vars:39,consts:[["eventServiceProvider","eventServiceNgrx"],["userRegistrationProvider","userRegistrationNgrx"],["eventLocationProvider","eventLocationNgrx"],["adminGwProvi
1der","adminGwNgrx"],["ehsReportProvider","ehsReportNgrx"],["fxLayout","column","fxLayoutGap","8px",1,"padding"],["eventServiceNgrx","","titleIcon","medication","title","Onsite Registrations"],["optionalAction",""],["fxLayout","row","fxLayoutAlign","end","fxFlex",""],["mat-flat-button","","queryParamsHandling","preserve",3,"routerLink"],[1,"icon-small"],[1,"center-spinner","margin"],["eventLocationNgrx",""],["simple","true","userRegistrationNgrx",""],["fxLayout","row"],[3,"filtersKeyup","filtersChange","userVaccinationChange","refresh","columns","filters","admins","racks","eventLocation"],["fxLayout","row","fxLayout.lt-md","column","fxLayoutAlign","space-between center","fxLayoutAlign.lt-md","start start","fxLayoutGap","8px"],["fxLayout","row","fxLayoutAlign","start center","fxLayoutGap","8px"],["fxLayout","row","fxLayoutGap","8px"],["mat-flat-button","","color","accent","title","End a rack for result entry"],["mat-flat-button","","color","primary","title","Begin/End a rack for result entry"],["mat-flat-button","","color","primary","title","Open the walk-in form for this event",3,"routerLink"],["simple","true"],["diameter","50",1,"circle-center"],["adminGwNgrx","",3,"eventLocation","stats","hideAddress","canEditRate","collapse"],["adminGwNgrx","",3,"view","validate","export","cancelEvent","sendEventNotification","eventLocation","stats","hideAddress","canEditRate","collapse"],["mat-flat-button","","type","button","color","primary","title","Mark No Show",3,"click","disabled","fxHide"],["mat-flat-button","","type","button","color","primary","title","Mark No Show",3,"disabled"],["mat-flat-button","","type","button","color","primary","title","Remove Vaccination Registration",3,"click","disabled","fxHide"],["mat-flat-button","","type","button","color","primary","title","Mark Completed",3,"click","disabled"],["mat-flat-button","","type","button","color","primary","title","Export selected registrations to drive",3,"disabled"],["mat-flat-button","","type","button","color","primary",3,"disabled","fxHide","title"],["mat-flat-button","","type","button","color","primary","title","Mark No Show",3,"click","disabled"],["mat-flat-button","","type","button","color","primary","title","Export selected registrations to drive",3,"click","disabled"],["mat-flat-button","","type","button","color","primary",3,"click","disabled","fxHide","title"],["mat-flat-button","","type","button","color","primary","ehsReportNgrx","","title","Export all Reports for this event to the lab",3,"click","disabled"],["mat-flat-button","","type","button","color","primary","title","Export all Missing results",3,"click"],["mat-flat-button","","color","accent","title","End a rack for result entry",3,"click"],["mat-flat-button","","color","primary","title","Begin/End a rack for result entry",3,"click"],["icon","widgets","message","No Onsite Registrations for this event"],[3,"userRegistrations","users","eventLocation","eventService","allAreSelected","indeterminate","userResultsByRegId","userReqsByRegId","adminUsers","userVaccsByRegId","company","racks","columns","disabled","selected"],[3,"toggleAll","actionChange","userVaccinationChange","toggle","refresh","userRegistrations","users","eventLocation","eventService","allAreSelected","indeterminate","userResultsByRegId","userReqsByRegId","adminUsers","userVaccsByRegId","company","racks","columns","disabled","selected"]],template:function(n,a){if(1&n){const l=t.RV6();t.j41(0,"div",5)(1,"ehs-card",6,0),t.qex(3,7),t.j41(4,"div",8)(5,"a",9)(6,"mat-icon",10),t.EFF(7," arrow_back "),t.k0s(),t.EFF(8," Back "),t.k0s()(),t.bVm(),t.nVh(9,nt,2,0,"div",11),t.nI1(10,"async"),t.vZN(11,at,4,3,"ng-container",12),t.k0s(),t.j41(12,"ehs-card",13,1)(14,"span",14)(15,"ehs-reg-filters",15),t.nI1(16,"async"),t.nI1(17,"async"),t.nI1(18,"async"),t.nI1(19,"async"),t.nI1(20,"async"),t.bIt("filtersKeyup",function(T){return a.onFiltersChange(T)})("filtersChange",function(){i.eBV(l);const T=t.sdS(13);return i.Njj(T.store.selectionClear())})("userVaccinationChange",function(T){return a.onUserVaccinationChange(T)})("refresh",function(){return a.refresh()}),t.k0s()(),t.j41(21,"span",16)(22,"span",17),t.nVh(23,lt,27,25),t.nI1(24,"async"),t.vZN(25,dt,12,3),t.k0s(),t.j41(26,"span",17),t.nrm(27,"div",18),t.nVh(28,pt,4,0,"button",19),t.nI1(29,"async"),t.vZN(30,ut,4,0,"button",20),t.j41(31,"a",21)(32,"mat-icon",10),t.EFF(33,"add"),t.k0s(),t.j41(34,"span"),t.EFF(35,"Add Walk In"),t.k0s()()()()(),t.j41(36,"ehs-card",22),t.nVh(37,gt,2,0,"div",11),t.nI1(38,"async"),t.vZN(39,ft,2,3),t.k0s()(),t.nVh(40,Nt,4,5,"pre")}if(2&n){const l=t.sdS(13);t.R7$(5),t.Y8G("routerLink",t.l_i(30,et,a.company,a.eventService)),t.R7$(4),t.vxM(t.bMT(10,12,a.loadingEventData$)?9:11),t.R7$(6),t.Y8G("columns",t.bMT(16,14,a.columns$)||t.lJ4(33,U))("filters",t.bMT(17,16,a.filters$)||t.lJ4(34,k)
1)("admins",t.bMT(18,18,a.admins$)||t.lJ4(35,U))("racks",t.bMT(19,20,a.racks$)||t.lJ4(36,U))("eventLocation",t.bMT(20,22,a.eventLocation$)||t.lJ4(37,k)),t.R7$(8),t.vxM(t.bMT(24,24,l.store.hasSelected$)?23:25),t.R7$(5),t.vxM(t.bMT(29,26,a.currentRack$)?28:30),t.R7$(3),t.Y8G("routerLink",t.lJ4(38,tt)),t.R7$(6),t.vxM(t.bMT(38,28,a.loading$)?37:39),t.R7$(3),t.vxM(a.debug?40:-1)}},dependencies:[ie.Wk,We.F,Qe.l,He.m,Ze.P,Ue.e,ee.DJ,ee.BO,ee.sA,ee.UI,Pe.Om,H.LG,p.An,I.$z,qe.W,ze.y,Ye.b,Je.h,Ke.e,V.Jj,V.TG],styles:["mat-icon.icon-small[_ngcontent-%COMP%]{font-size:20px;height:20px;width:20px;line-height:20px;margin-right:5px}"],changeDetection:0})}return s})()}];let yt=(()=>{class s{static \u0275fac=function(n){return new(n||s)};static \u0275mod=t.$C({type:s});static \u0275inj=i.G2t({imports:[ie.iI.forChild(Rt),ie.iI]})}return s})(),xt=(()=>{class s{actions$=(0,i.WQX)(R.En);userRegistrationNgrx=(0,i.WQX)(Q.Sy);init$=(0,R.EH)(()=>this.actions$.pipe((0,R.gp)(Re.init),(0,b.M)(()=>{this.userRegistrationNgrx.listAsAdminForEventRoute({serviceType:o.C00.ONSITE,includeResult:!0,includeUser:!0,includeReq:!0,excludePdfs:!0})})),{dispatch:!1});static \u0275fac=function(n){return new(n||s)};static \u0275prov=i.jDH({token:s,factory:s.\u0275fac})}return s})();c(96661),c(82525),c(57123),c(93565);let Et=(()=>{class s{static \u0275fac=function(n){return new(n||s)};static \u0275mod=t.$C({type:s});static \u0275inj=i.G2t({imports:[V.MD,yt,f.YcI,R.Vm.forFeature([xt]),O.vG.forFeature(),A.tQ.forFeature(),Q.O7.forFeature(),X.Od,ce.jU,Z.BV.forFeature(),S.Hs,P.KJ,$e,Xe,ye.gM,Ae,v.YF,H.D6,p.m_,I.Hl,ne.w,f.FDO,f.csK,f.BCB,f.cU9,f.Inb,f.Ffw,f.l5y,f.Jjg,f.Glw]})}return s})()},25438(Ce,te,c){c.d(te,{as:()=>C,gM:()=>h});var V=c(49769),v=c(59640),I=c(71608),ne=c(70746);const p={list:(0,I.Wp)("[ADMIN_NOTIFICATION_NGRX] LIST"),get:(0,I.Wp)("[ADMIN_NOTIFICATION_NGRX] GET"),listByUser:(0,I.Wp)("[ADMIN_NOTIFICATION_NGRX] LIST_BY_USER"),listByCompany:(0,I.Wp)("[ADMIN_NOTIFICATION_NGRX] LIST_BY_COMPANY"),delete:(0,I.Wp)("[ADMIN_NOTIFICATION_NGRX] DELETE"),update:(0,I.Wp)("[ADMIN_NOTIFICATION_NGRX] UPDATE"),create:(0,I.Wp)("[ADMIN_NOTIFICATION_NGRX] CREATE"),loadMore:(0,I.Wp)("[ADMIN_NOTIFICATION_NGRX] LOAD_MORE"),setPageNumber:(0,v.VP)("[ADMIN_NOTIFICATION_NGRX] SET_PAGE_NUMBER",(0,v.xk)()),clear:(0,v.VP)("[ADMIN_NOTIFICATION_NGRX] CLEAR"),upsertOne:(0,v.VP)("[ADMIN_NOTIFICATION_NGRX] UPSERT_ONE",(0,v.xk)())},H="NotificationNgrx",S=(0,ne.p)({selectId:I.Ge}),P=(0,v.vy)(S.getInitialState({pageNumber:1}),(0,v.on)(p.upsertOne,(r,{notification:y})=>S.upsertOne(y,{...r})),(0,v.on)(p.get.req,r=>({...r,loading:!0})),(0,v.on)(p.get.success,(r,{payload:{entity:y}})=>S.upsertOne(y,{...r,loading:!1})),(0,v.on)(p.get.failed,r=>({...r,loading:!1})),(0,v.on)(p.list.req,r=>({...r,loading:!0})),(0,v.on)(p.list.success,(r,{payload:{notifications:y,hasNext:d}})=>S.setAll(y||[],{...r,hasNext:d,loading:!1})),(0,v.on)(p.list.failed,r=>({...r,loading:!1})),(0,v.on)(p.listByUser.req,r=>({...r,loading:!0})),(0,v.on)(p.listByUser.success,(r,{payload:{notifications:y}})=>S.setAll(y,{...r,loading:!1})),(0,v.on)(p.listByUser.failed,r=>({...r,loading:!1})),(0,v.on)(p.listByCompany.req,r=>({...r,loading:!0})),(0,v.on)(p.listByCompany.success,(r,{payload:{notifications:y}})=>S.setAll(y,{...r,loading:!1})),(0,v.on)(p.listByCompany.failed,r=>({...r,loading:!1})),(0,v.on)(p.loadMore.req,r=>({...r,loading:!0,pageNumber:r.pageNumber+1})),(0,v.on)(p.loadMore.success,(r,{payload:{notifications:y,hasNext:d}})=>S.upsertMany(y,{...r,hasNext:d,loading:!1})),(0,v.on)(p.loadMore.failed,r=>({...r,loading:!1})),(0,v.on)(p.setPageNumber,(r,{pageNumber:y})=>({...r,pageNumber:y})),(0,v.on)(p.clear,r=>S.removeAll(r)),(0,v.on)(p.update.req,r=>({...r,loading:!0})),(0,v.on)(p.update.success,(r,{payload:y})=>S.upsertOne(y,{...r,loading:!1})),(0,v.on)(p.update.failed,r=>({...r,loading:!1})),(0,v.on)(p.delete.req,r=>({...r,loading:!0})),(0,v.on)(p.delete.success,(r,{payload:y})=>S.removeMany(y,{...r,loading:!1})),(0,v.on)(p.delete.failed,r=>({...r,loading:!1})),(0,v.on)(p.create.req,r=>({...r,loading:!0})),(0,v.on)(p.create.success,(r,{payload:y})=>S.upsertMany(y,{...r,loading:!1})),(0,v.on)(p.create.failed,r=>({...r,loading:!1})),(0,v.on)(p.create.canceled,r=>({...r,loading:!1})));var E=c(85802),_=c(24615),i=c(11747),j=c(53993),o=c(31397),A=c(96354),O=c(99437),Z=c(88141),Q=c(91413);const G=(0,v.UX)(H),f=(0,I.aH)({featureSelector:G}),R={...f,...(0,I.bd)({entitiesArraySelector:f.entitiesArraySelector,featureSelector:G}),hasNextSelector:(0,v.Mz)(G,r=>!!r?.hasNext),pageNumberSelector:(0,v.Mz)(G,r=>r?.pageNumber||1),notificationsSelector:(0,v.Mz)(f.entitiesArraySelector,r=>(r||[]).sort((y,d)=>y.createdAt>d.createdAt?-1:y.createdAt<d.createdAt?1:0))};let C=(()=>{class r extends I.y6{actions$=(0,E.WQX)(i.En);hasNext$=this.store.select(R.hasNextSelector);pageNumber$=this.store.select(R.pageNumberSelector);list$=this.store.select(R.notificationsSelector);constructor(){super((0,E.WQX)(v.il),G)}list(d){this.store.dispatch(p.list.req(d))}listByUser(d){this.store.dispatch(p.listByUser.req({userId:d}))}listByCompany(d){this.store.dispatch(p.listByCompany.req({companyId:d}))}
1loadMore(d){this.store.dispatch(p.loadMore.req(d))}setPageNumber(d){this.store.dispatch(p.setPageNumber({pageNumber:d}))}clear(){this.store.dispatch(p.clear())}upsertOne(d){this.store.dispatch(p.upsertOne(d))}get(d){this.store.dispatch(p.get.req({id:d}))}delete(d){this.store.dispatch(p.delete.req({notifications:d}))}create({user:d,company:N,eventService:w,eventLocation:X}){if(d||X||N||w)return this.store.dispatch(p.create.req({user:d,eventLocation:X,company:N,eventService:w})),this.actions$.pipe((0,i.gp)(p.create.success,p.create.failed),(0,A.T)(z=>{if(z.type===p.create.failed.type)throw new Q.yz({});return z.payload}))}static \u0275fac=function(N){return new(N||r)};static \u0275prov=E.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var M=c(61676),q=c(95416);let b=(()=>{class r{actions$=(0,E.WQX)(i.En);snackBar=(0,E.WQX)(q.UG);notificationFacade=(0,E.WQX)(C);notificationHttp=(0,E.WQX)(_.v3);adminCreateNotificationDialog=(0,E.WQX)(M.ccn);list$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(p.list.req),(0,j.E)(this.notificationFacade.pageNumber$),(0,o.Z)(([{payload:d},N])=>this.notificationHttp.adminList({...d,pageNumber:N}).pipe((0,A.T)(({notifications:w,hasNext:X})=>p.list.success({notifications:w,hasNext:X})),(0,O.W)(()=>[p.list.failed()])))));listByUser$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(p.listByUser.req),(0,o.Z)(({payload:d})=>this.notificationHttp.adminListByUser(d.userId).pipe((0,A.T)(({notifications:N})=>p.listByUser.success({notifications:N})),(0,O.W)(()=>[p.listByUser.failed()])))));listByCompany$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(p.listByCompany.req),(0,o.Z)(({payload:d})=>this.notificationHttp.adminListByCompany(d.companyId).pipe((0,A.T)(({notifications:N})=>p.listByCompany.success({notifications:N})),(0,O.W)(()=>[p.listByCompany.failed()])))));get$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(p.get.req),(0,o.Z)(({payload:d})=>this.notificationHttp.get(d.id).pipe((0,A.T)(N=>p.get.success({entity:N})),(0,O.W)(()=>[p.get.failed()])))));loadMore$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(p.loadMore.req),(0,j.E)(this.notificationFacade.pageNumber$),(0,o.Z)(([{payload:d},N])=>this.notificationHttp.adminList({...d,pageNumber:N}).pipe((0,A.T)(({notifications:w,hasNext:X})=>p.loadMore.success({notifications:w,hasNext:X})),(0,O.W)(()=>[p.loadMore.failed()])))));update$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(p.update.req),(0,o.Z)(({payload:d})=>this.notificationHttp.update(d).pipe((0,A.T)(N=>p.update.success(N)),(0,O.W)(()=>[p.update.failed()])))));delete$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(p.delete.req),(0,o.Z)(({payload:d})=>this.notificationHttp.adminDelete(d.notifications).pipe((0,A.T)(()=>p.delete.success(d.notifications)),(0,O.W)(()=>[p.update.failed()])))));create$=(0,i.EH)(()=>this.actions$.pipe((0,i.gp)(p.create.req),(0,o.Z)(({payload:d})=>this.adminCreateNotificationDialog.open(d)),(0,o.Z)(d=>d?this.notificationHttp.adminCreate(d).pipe((0,Z.M)({next:()=>this.snackBar.open(`Notification "${d.subject}" has been sent.`,"Ok"),error:()=>this.snackBar.open("Oops! Something went wrong creating notification","Ok")}),(0,o.Z)(N=>[p.create.success(N)]),(0,O.W)(N=>[p.create.failed({error:N.error})])):[p.create.canceled()])));static \u0275fac=function(N){return new(N||r)};static \u0275prov=E.jDH({token:r,factory:r.\u0275fac})}return r})();var F=c(35547);let h=(()=>{class r{static \u0275fac=function(N){return new(N||r)};static \u0275mod=F.$C({type:r});static \u0275inj=E.G2t({imports:[V.MD,v.md.forFeature(H,P),i.Vm.forFeature([b]),q._T,M.Jjg,M.l5y]})}return r})()}}]);
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.