1import{A as gm,B as um,C as bs,D as fm,E as hm,F as _m,G as Cm,H as Sr,a as ps,b as zt,c as Gd,d as Kd,e as Yd,f as Xd,g as Zd,h as Jd,i as em,j as tm,k as im,l as nm,m as om,n as rm,o as ec,p as am,q as sm,r as lm,s as cm,t as ys,u as Ps,v as Ms,w as pm,x as dm,y as mm}from"./chunk-DGAGBLQ5.js";import{B as Vd,C as Wn,D as ds,E as wr,F as Nd,G as Ud,H as qd,I as zd,J as jd,K as Ni,L as Jl,M as ms,N as zo,O as gs,P as Wd,Q as Qd,R as us,S as Xt,T as fs,U as hs,V as Hd,W as _s,X as $d,Y as Ht,a as Za,b as Ja,c as es,d as os,e as rs,f as as,g as ss,h as Ti,j as No,k as ls,l as ki,m as De,n as Zl,o as jn,p as ci,q as Ld,r as Dd,s as vt,t as Uo,u as Bd,v as Rd,w as cs,x as It,y as Tt,z as qo}from"./chunk-ZAI73KCM.js";import"./chunk-4LMFJ3RQ.js";import{d as mt,e as St,o as zn}from"./chunk-JBQ3SQYQ.js";import{a as Cs,b as vs}from"./chunk-RXSTUEU6.js";import{A as rn,B as oe,C as qn,a as Rl,b as ve,c as ts,d as kd,e as Ad,f as et,g as Le,h as is,l as ke,m as Vi,n as Ed,o as Yl,p as co,q as ns,r as xr,s as Xl,u as Fd,w as Or}from"./chunk-IELZJEER.js";import{$ as Mi,$b as nt,$c as on,A as ee,Aa as oo,Ac as Da,Ad as Ii,B as at,Bc as nd,Bd as Hl,Cc as jl,Ce as Pd,D as Vp,Db as Pr,Dc as od,Dd as za,De as Kl,E as X,Ea as vr,Eb as Mr,Ec as Wl,Ed as ja,Ee as Md,F as Ne,Fa as Vl,Fb as Hp,Fe as bd,G as Np,Ga as Nl,Gb as $p,Gc as Ql,Ge as Ga,H as Gi,Hb as br,He as so,I as Ca,Ia as Ul,Id as sd,Ie as xd,Je as Xi,K as Ie,Kb as ai,Kc as Yt,Kd as ao,L as je,Lb as ka,Le as lo,M as va,Mb as Kp,Mc as Ba,Me as Ha,N as Tn,Ne as $a,O as Up,Oc as Gl,Od as ld,Oe as Od,P as tt,Pa as jp,Pc as wi,Pd as Ve,Pe as Ka,Qb as $i,Qc as Do,Qd as cd,Qe as wd,Rb as it,Rd as Vn,Re as Un,S as st,Sb as qt,Sc as Ct,Se as Ya,T as kn,Tb as T,Tc as Bn,Te as Sd,U as An,Ua as Sa,Ub as rt,Ue as Id,V as En,Vb as Ze,Vc as rd,Vd as pd,Ve as Td,W as ya,Wb as bt,We as Bo,X as Pa,Xb as si,Xd as dd,Xe as Ro,Y as We,Yb as bi,Ye as Vo,Z as Ma,Za as Ia,Zb as Yp,Zc as ro,Zd as Nn,Ze as Xa,_ as ko,_b as Fo,a as Tp,ab as ql,ac as Ln,ae as md,af as ti,b as So,ba as Nt,bc as Dn,be as gd,c as kp,ca as ba,cc as Aa,d as He,da as xa,db as Wp,dc as Ki,de as $l,e as ue,ea as Oa,ec as Lo,ed as Ra,f as F,fa as Ao,fc as Xp,fd as Rn,fe as ud,ga as j,gc as Zp,ge as fd,ha as Hi,hc as Jp,he as hd,i as Io,ia as wa,ic as Yi,id as Va,ie as _d,j as Pi,ja as B,jb as Fn,jc as xi,je as Cd,k as Fe,ka as Qe,kb as ei,kc as ed,kd as Na,la as Eo,lb as Qp,ma as Cr,mc as qe,md as ad,n as In,nb as Te,nc as td,o as Ap,ob as yr,oc as lt,p as Ep,pc as ct,pd as Ua,q as no,qb as zl,qc as Ea,qe as vd,r as Fp,rb as Ta,rc as Je,s as Lp,sa as Jt,sc as li,t as To,td as qa,te as Wa,u as Dp,ue as Qa,v as Bp,vb as Gp,vc as id,vd as Gt,w as Rp,wb as Ut,wc as Fa,wd as Ri,xa as qp,xd as Si,yc as Oi,za as zp,zb as Ue,zc as La,zd as U,ze as yd}from"./chunk-G7JQUX5M.js";import{$ as _p,$b as Y,$c as f,Ac as Bl,Bb as Ll,C as fp,Cb as Kt,Cc as se,D as Xe,Da as be,Dc as le,Ea as we,Eb as Mp,Ec as Lt,Ed as Ip,F as ut,Fc as S,Ga as yp,Gb as a,Gc as ga,H as ri,Hc as xp,I as Zn,Ia as ie,J as me,Ja as fe,K as xn,Kc as P,Lb as he,Ld as wo,Mb as Mt,Mc as g,O as re,Ob as ca,P as Jn,Pa as x,Pb as pa,Qa as O,Qb as Sn,Qc as ft,Qd as Qi,Rb as h,Rc as ht,Sc as _t,Tb as da,U as Ft,Ua as la,V as hp,W as bo,Wc as V,X as oa,Xb as w,Xc as Zt,Ya as Pp,Yb as Se,Yc as Z,Zb as xo,Zc as to,_ as ge,_b as bp,_c as Op,a as z,ad as b,b as Oe,ba as Pt,bc as C,bd as y,cd as Vt,d as ur,da as Cp,db as wn,dd as wp,e as af,eb as Ae,fa as vp,fd as ye,g as ia,gb as Bi,gd as Pe,ha as Wi,hd as Me,ia as ra,id as Oo,ja as aa,jd as ua,ka as sa,kc as ma,kd as fa,ld as wt,md as Sp,nb as Fl,nd as ha,oc as G,od as _r,p as na,pc as _e,pd as A,qc as Ce,qd as ce,ra as fr,rc as hr,rd as Dt,sd as _a,ta as eo,tc as Wt,td as d,ua as L,uc as Qt,ud as u,va as On,vc as p,vd as D,wc as s,wd as io,xa as ne,xc as l,y as jt,yc as v,yd as pe,z as yi,za as Re,zc as Dl}from"./chunk-GRSQHQHU.js";var Mm=af((kw,Os)=>{"use strict";var ws=["reload","identify","suppress","unsuppress","trigger","anonymous","on","once","off","track","reset","next","end","clean","destroy","theme","instance"],Pm=(n=null)=>{let e={};return ws.forEach(function(t){e[t]=function(...i){cf(t,i,n)}}),e},po,Ci=Pm(),ym=0,Ir={};ws.forEach(n=>{Ir[n]=[]});Ci.initialize=function(n,e={}){n&&(Ci.sdkV2=e.distro==="2.0",Ci[n]=Pm(n),!ym&&this.load(n,e),ym=1,Ci.sdkV2&&Ci.instance(z({token:n},e)))};Ci.clearQueue=function(){ws.forEach(n=>{Ir[n]=[]})};Ci.loaded=function(){return Ci.sdkV2?typeof window.userpilotV2SDKInitialization<"u":typeof window.userpilot<"u"};function lf(n,e){po=document.createElement("script"),po.setAttribute("src",n),e&&(po.setAttribute("integrity",e),po.setAttribute("crossorigin","anonymous")),document.getElementsByTagName("head")[0].appendChild(p
1o),ws.forEach(t=>{Ir[t].length>0&&Ir[t].forEach(i=>{Ci[t](...i.args||[])})})}Ci.load=function(n,e){if(typeof window>"u")return;e||(e={});let t=e.version,i=t?e.sri:"";e=z(z({},window.userpilotSettings),e),e.version=e.version||"v0",e.endpoint=e.endpoint||"api.userpilot.io/socket/",e.token=n,window.userpilotSettings=e;let o=e.domain?`https://${e.domain}/sdk/latest.js`:"https://js.userpilot.io/sdk/latest.js";i&&(o=e.domain?`https://${e.domain}/sdk/version/${t}/app.js`:`https://js.userpilot.io/sdk/version/${t}/app.js`),lf(o,i)};function cf(n,e,t){let i=()=>{if(n==="instance"){if(t)return console.warn("Instance method not supported, use Userpilot.instance({token: appToken}) instead"),!1;window.userpilot[n](...e)}else t?window.userpilot[t][n](...e):window.userpilot[n](...e)};Ci.loaded()?window.userpilotV2SDKInitialization?window.userpilotV2SDKInitialization.then(i):i():typeof po<"u"?po.addEventListener("load",function(){window.userpilotV2SDKInitialization?window.userpilotV2SDKInitialization.then(i):i()}):Ir[n].push({args:e})}typeof Os<"u"&&typeof Os.exports<"u"?Os.exports.Userpilot=Ci:window.Userpilot=Ci});var vm=ia(Rl());var xs=(()=>{let e=class e{constructor(i,o,r,c,m,_,M,I,k){this.router=i,this.zone=o,this.configService=r,this.signUpFactory=c,this.infoApiService=m,this.userApiService=_,this.userService=M,this.loginByTokenService=I,this.asyncStorageService=k,this.signUpTitle="Sign Up",this.genderList$=this.infoApiService.getPublicGenderList(),this.setSignUpServiceByStep("name")}goToCreate(){this.prepareFormData(),this.userApiService.checkUserPublic(this.signUpService.getSignUpRequest(this.signUpRequest)).subscribe(i=>{i.userExists?i.username?this.signUpForm.setErrors({username:!0}):this.signUpForm.setErrors({userExists:!0}):this.setSignUpServiceByStep("create")},i=>{Array.isArray(i.error?.form?.mobilePhone?.errors)&&this.signUpForm.setErrors({mobilePhone:!0}),Array.isArray(i.error?.form?.username?.errors)&&this.signUpForm.get("username").setErrors({api:i.error.form.username.errors[0]})})}isStepActive(i){return this.signUpService.isStepActive(i)}isErrorOnField(i){let o=this.signUpForm.get(i);return o?o.touched&&o.invalid:!1}isErrorInForm(){return Object.values(this.signUpForm.controls).some(({invalid:i})=>i)}isErrorPasswordMatch(){if(!this.isStepActive("login"))return!1;let i=this.signUpForm.get("password"),o=this.signUpForm.get("confirmPassword");return i.valid&&o.valid&&i.value!==o.value}isErrorPasswordMatchVisible(){if(!this.isErrorPasswordMatch())return!1;let i=this.signUpForm.get("password"),o=this.signUpForm.get("confirmPassword");return!!((i.touched||o.touched)&&this.signUpRequest?.password||i.touched&&o.touched&&!this.signUpRequest?.password)}isErrorUserExists(){return this.signUpForm.invalid&&!!this.signUpForm.getError("userExists")}isErrorUserName(){return this.signUpForm.invalid&&!!this.signUpForm.getError("username")}isErrorMobilePhone(){return this.signUpForm.invalid&&!!this.signUpForm.getError("mobilePhone")}goTo(i){this.prepareFormData(),this.setSignUpServiceByStep(i)}submitForm(){this.prepareFormData(),this.userApiService.createUserPublic(this.signUpService.getSignUpRequest(this.signUpRequest)).pipe(L(i=>this.loginByTokenService.login(i.token).pipe(L(o=>this.userService.processUserAfterLogin(o)),L(o=>this.userApiService.patchSecurityData(this.securityData).pipe(re(()=>({response:i,user:o}))))))).subscribe(({response:i,user:o})=>{this.setMessageWarning(),this.redirectTo(i.redirectTo,o.role)})}prepareFormData(){let i=this.signUpForm.value;i.securityQuestion!==void 0&&i.securityAnswer!==void 0&&(this.securityData={question:i.securityQuestion,answer:i.securityAnswer},delete i.securityQuestion,delete i.securityAnswer),this.signUpRequest=(0,vm.default)(this.signUpRequest?this.signUpRequest:{},i)}setSignUpServiceByStep(i){this.signUpService=this.signUpFactory.getSignUpServiceByStep(i),this.instanceOfSignUpDateRangeInterface(this.signUpService)&&(this.dateRange=this.signUpService.getDateRange()),this.createSignUpForm()}instanceOfSignUpDateRangeInterface(i){return"getDateRange"in i}createSignUpForm(){this.signUpForm=this.signUpService.createForm(this.signUpRequest,this.securityData)}phoneValidation(){this.infoApiService.publicPhoneValidation({phone:this.signUpForm.get("mobilePhone").value,region:"US",type:"mobile"}).subscribe(()=>this.goTo("login"),()=>this.signUpForm.get("mobilePhone").setErrors({mobilePhone:!0}))}redirectTo(i,o){let r=this.configService.getDefaultRoute(o);switch(i){case"scheduleAppointment":r="/user/appointment/create";break;case"addingProvider":r="/user/provider/connect";break}this.configService.getMobile().appName==="UnitedMD"&&(r="/user/unitedmd-schedule"),this.zone.run(()=>{this.router.navigateByUrl(r)})}setMessageWarning(){this.asyncStorageService.set("messagingWarning",!0).subscribe()}};e.\u0275fac=function(o){return new(o||e)(h(B),h(Mt),h(oe),h(ls),h($i),h(Ze),h(De),h(Na),h(si))},e.\u0275cmp=w({type:e,selectors:[["ng-component"]],standalone:!1,decls:0,vars:0,template:function(o,r){},encapsulation:2});let n=e;return n})();ri();var jo=ia(Mm());var Qn=(()=>{let e=class e{constructor(i,o,r){this.environmentConfig=i,this.router=o,this.clinicApiService=r}
1init(){jo.Userpilot.initialize(this.environmentConfig.userpilotToken),this.router.events.pipe(ge(i=>i instanceof Ao)).subscribe(()=>{jo.Userpilot.reload()})}identifyUser(i,o=!1){if(o){this.makeIdentifyCall(i,"");return}this.clinicApiService.getClinicInfoByToken().subscribe(r=>this.makeIdentifyCall(i,r.title))}makeIdentifyCall(i,o){jo.Userpilot.identify(i.memberId+"",{first_name:i.firstName,name:i.name,email:i.email,company:{id:i.primaryClinicId,name:o}});let r=window.LiveChatWidget;i.memberType!==Ue.CLINIC&&r&&(r.call("set_customer_name",i.name),r.call("set_customer_email",i.email))}showResourceCenter(){jo.Userpilot.trigger("resource_center:YZklUwsnXn")}trackQ2FreeTrialStarted(i){jo.Userpilot.track(e.Q2_FREE_TRIAL_STARTED_EVENT,{module_name:i})}};e.Q2_FREE_TRIAL_STARTED_EVENT="q2_free_trial_started",e.\u0275fac=function(o){return new(o||e)(ie("ENVIRONMENT_CONFIG"),ie(B),ie(Te))},e.\u0275prov=be({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function bm(n){return{all:n=n||new Map,on:function(e,t){var i=n.get(e);i?i.push(t):n.set(e,[t])},off:function(e,t){var i=n.get(e);i&&(t?i.splice(i.indexOf(t)>>>0,1):n.set(e,[]))},emit:function(e,t){var i=n.get(e);i&&i.slice().map(function(o){o(t)}),(i=n.get("*"))&&i.slice().map(function(o){o(e,t)})}}}function nc(n){return n==="state"?window.LiveChatWidget.get("state"):n==="chat"?window.LiveChatWidget.get("chat_data"):n==="customer"?window.LiveChatWidget.get("customer_data"):null}function xm(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,i)}return t}function pf(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?xm(Object(t),!0).forEach(function(i){df(n,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):xm(Object(t)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(t,i))})}return n}function df(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function mf(n,e){return gf(n)||uf(n,e)||ff(n,e)||hf()}function gf(n){if(Array.isArray(n))return n}function uf(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var i=[],o=!0,r=!1,c,m;try{for(t=t.call(n);!(o=(c=t.next()).done)&&(i.push(c.value),!(e&&i.length===e));o=!0);}catch(_){r=!0,m=_}finally{try{!o&&t.return!=null&&t.return()}finally{if(r)throw m}}return i}}function ff(n,e){if(n){if(typeof n=="string")return Om(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Om(n,e)}}function Om(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=n[t];return i}function hf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ic={current:null},wm={production:"https://cdn.livechatinc.com/tracking.js",labs:"https://cdn.labs.livechatinc.com/tracking.js",staging:"https://cdn.staging.livechatinc.com/tracking.js"},Sm={current:"production"};function _f(){var n,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"production";Sm.current=e;var t=Array.prototype.slice;function i(r){return o._h?o._h.apply(null,r):o._q.push(r)}var o={_q:[],_h:null,_v:"2.0",on:function(){i(["on",t.call(arguments)])},once:function(){i(["once",t.call(arguments)])},off:function(){i(["off",t.call(arguments)])},get:function(){if(!o._h)throw new Error("[LiveChatWidget] You can't use getters before load.");return i(["get",t.call(arguments)])},call:function(){i(["call",t.call(arguments)])},init:function(){var c,m=document.createElement("script");m.async=!0,m.type="text/javascript",m.src=(c=wm[Sm.current])!==null&&c!==void 0?c:wm.production,document.head.appendChild(m),ic.current=m}};return(n=ic.current)===null||n===void 0||n.remove(),window.LiveChatWidget=window.LiveChatWidget||o,ic}function Cf(n){var e=n.license,t=n.organizationId,i=n.group,o=n.chatBetweenGroups,r=n.sessionVariables,c=n.customIdentityProvi
2der;if(window.__lc=window.__lc||{},typeof t=="string"&&t.trim()!=="")window.__lc.organizationId=t;else if(typeof e=="string"&&e.trim()!=="")window.__lc.license=Number(e);else throw new Error("[LiveChatWidget] The license or organizationId property is required for initialization");typeof i<"u"&&(window.__lc.group=Number(i)),typeof o<"u"&&(window.__lc.chat_between_groups=!!o),r instanceof Object&&(window.__lc.params=Object.entries(r).map(function(m){var _=mf(m,2),M=_[0],I=_[1];return{name:M,value:I}})),typeof c=="function"&&(window.__lc.custom_identity_provider=c)}function pi(n,e){n==="off"&&typeof window.LiveChatWidget>"u"||(typeof e.onReady=="function"&&window.LiveChatWidget[n]("ready",e.onReady),typeof e.onAvailabilityChanged=="function"&&window.LiveChatWidget[n]("availability_changed",e.onAvailabilityChanged),typeof e.onVisibilityChanged=="function"&&window.LiveChatWidget[n]("visibility_changed",e.onVisibilityChanged),typeof e.onCustomerStatusChanged=="function"&&window.LiveChatWidget[n]("customer_status_changed",e.onCustomerStatusChanged),typeof e.onNewEvent=="function"&&window.LiveChatWidget[n]("new_event",e.onNewEvent),typeof e.onFormSubmitted=="function"&&window.LiveChatWidget[n]("form_submitted",e.onFormSubmitted),typeof e.onRatingSubmitted=="function"&&window.LiveChatWidget[n]("rating_submitted",e.onRatingSubmitted),typeof e.onGreetingDisplayed=="function"&&window.LiveChatWidget[n]("greeting_displayed",e.onGreetingDisplayed),typeof e.onGreetingHidden=="function"&&window.LiveChatWidget[n]("greeting_hidden",e.onGreetingHidden),typeof e.onRichMessageButtonClicked=="function"&&window.LiveChatWidget[n]("rich_message_button_clicked",e.onRichMessageButtonClicked))}function Im(n){typeof n.name=="string"&&window.LiveChatWidget.call("set_customer_name",n.name),typeof n.email=="string"&&window.LiveChatWidget.call("set_customer_email",n.email)}function Tm(n){n==="hidden"&&window.LiveChatWidget.call("hide"),n==="maximized"&&window.LiveChatWidget.call("maximize"),n==="minimized"&&window.LiveChatWidget.call("minimize")}var Tr=bm(),km=Tr.emit.bind(null);function kr(n){return Tr.on("init",n),"LiveChatWidget"in window&&n(),function(){Tr.off("init",n)}}function Ar(n){return Tr.on("destroy",n),function(){Tr.off("destroy",n)}}function Am(n){var e={isLoading:!1,desiredState:"unknown",currentEventHandlers:{onReady:n.onReady,onNewEvent:n.onNewEvent,onFormSubmitted:n.onFormSubmitted,onGreetingHidden:n.onGreetingHidden,onRatingSubmitted:n.onRatingSubmitted,onGreetingDisplayed:n.onGreetingDisplayed,onVisibilityChanged:n.onVisibilityChanged,onAvailabilityChanged:n.onAvailabilityChanged,onCustomerStatusChanged:n.onCustomerStatusChanged,onRichMessageButtonClicked:n.onRichMessageButtonClicked}},t=_f(n.env);return Cf(n),Tm(n.visibility),pi("on",e.currentEventHandlers),Im({name:n.customerName,email:n.customerEmail}),window.__lc.integration_name="@livechat/widget-core",{init:function(){var o=this;e.desiredState="loaded",!e.isLoading&&(window.LC_API=window.LC_API||{},window.LC_API.on_after_load=function(){e.isLoading=!1,e.desiredState==="destroyed"&&o.destroy(),e.desiredState="unknown"},km("init"),e.isLoading=!0,window.LiveChatWidget.init())},destroy:function(){var o;e.desiredState="destroyed",!e.isLoading&&(km("destroy"),(o=t.current)===null||o===void 0||o.remove(),window.LiveChatWidget.call("destroy"))},updateVisibility:function(o){Tm(o)},updateEventHandlers:function(o){pi("off",e.currentEventHandlers),pi("on",o),e.currentEventHandlers=pf({},o)},updateSessionVariables:function(o){o&&window.LiveChatWidget.call("update_session_variables",o)},hideGreeting:function(){window.LiveChatWidget.call("hide_greeting")},updateCustomerData:function(o){Im(o)}}}function Em(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,i)}return t}function Ss(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Em(Object(t),!0).forEach(function(i){J(n,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Em(Object(t)).forEac
2h(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(t,i))})}return n}function an(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Fm(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function sn(n,e,t){return e&&Fm(n.prototype,e),t&&Fm(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function J(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Lm(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&oc(n,e)}function Is(n){return Is=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Is(n)}function oc(n,e){return oc=Object.setPrototypeOf||function(i,o){return i.__proto__=o,i},oc(n,e)}function vf(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rc(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function yf(n,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rc(n)}function Dm(n){var e=vf();return function(){var i=Is(n),o;if(e){var r=Is(this).constructor;o=Reflect.construct(i,arguments,r)}else o=i.apply(this,arguments);return yf(this,o)}}var Wo=(function(){function n(e){var t=this;an(this,n),J(this,"zone",void 0),J(this,"onDestroy",void 0),J(this,"subject",new yi(!1)),this.zone=e;var i=function(){return t.setIsReady(!0)},o=kr(function(){pi("once",{onReady:i})}),r=Ar(function(){setTimeout(function(){return t.setIsReady(!1)},0)});this.onDestroy=function(){t.subject.complete(),t.subject.unsubscribe(),pi("off",{onReady:i}),o(),r()}}return sn(n,[{key:"setIsReady",value:function(t){var i=this;this.zone.run(function(){i.subject.next(t)})}},{key:"ngOnDestroy",value:function(){this.onDestroy()}}]),n})();J(Wo,"\u0275fac",function(e){return new(e||Wo)(ie(Mt))});J(Wo,"\u0275prov",be({token:Wo,factory:Wo.\u0275fac}));var Qo=(function(){function n(e){var t=this;an(this,n),J(this,"zone",void 0),J(this,"onDestroy",void 0),J(this,"subject",new yi(null)),this.zone=e;var i=function(M){var I=M.state;return t.setWidgetState(I)},o=function(M){var I=M.visibility,k=t.subject.getValue();t.setWidgetState(k&&Ss(Ss({},k),{},{visibility:I}))},r=function(M){var I=M.availability,k=t.subject.getValue();t.setWidgetState(k&&Ss(Ss({},k),{},{availability:I}))},c=kr(function(){pi("once",{onReady:i}),pi("on",{onVisibilityChanged:o,onAvailabilityChanged:r})}),m=Ar(function(){setTimeout(function(){return t.setWidgetState(null)},0)});this.onDestroy=function(){t.subject.complete(),t.subject.unsubscribe(),pi("off",{onReady:i,onVisibilityChanged:o,onAvailabilityChanged:r}),c(),m()}}return sn(n,[{key:"setWidgetState",value:function(t){var i=this;this.zone.run(function(){i.subject.next(t)})}},{key:"ngOnDestroy",value:function(){this.onDestroy()}}]),n})();J(Qo,"\u0275fac",function(e){return new(e||Qo)(ie(Mt))});J(Qo,"\u0275prov",be({token:Qo,factory:Qo.\u0275fac}));var mo=(function(){function n(e){var t=this;an(this,n),J(this,"zone",void 0),J(this,"onDestroy",void 0),J(this,"subject",new yi(null)),this.zone=e;var i=function(_){var M=_.customerData;return t.setCustomerData(M)},o=function(){return t.setCustomerData(nc("customer"))},r=kr(function(){pi("once",{onReady:i}),pi("on",{onCustomerStatusChanged:o})}),c=Ar(function(){setTimeout(function(){return t.setCustomerData(null)},0)});this.onDestroy=function(){t.subject.complete(),t.subject.unsubscribe(),pi("off",{onReady:i,onCustomerStatusChanged:o}),r(),c()}}return sn(n,[{key:"setCustomerData",value:function(t){var i=this;this.zone.run(function(){return i.subject.next(t)})}},{key:"ngOnDestroy",value:function(){this.onDestroy()}}]),n})();J(mo,"\u0275fac",function(e){return new(e||mo)(ie(Mt))});J(mo,"\u0275prov",be({token:mo,factory:mo.\u0275fac}));var Go=(function(){function n(e,t){var i=this;an(this,n),J(this,"zone",void 0),J(this,"onDestroy",void 0),J(this,"subject",new yi(null)),this.zone=e;var o=t.subject.subscribe(function(r){var c=r?.status;c==="chatting"?i.setChatData(nc("chat")):i.setChatData(null)});this.onDestroy=function(){i.subject.complete(),i.subject.unsubscribe(),o.unsubscribe()}}return sn(n,[{key:"setChatData",value:function(t){var i=this;this.zone.run(function(){i.subject.next(t)})}},{key:"ngOnDestroy",value:function(){this.onDestroy()}}]),n})();J(Go,"\u0275fac",function(e){return new(e||Go)(ie(Mt),ie(mo))});
2J(Go,"\u0275prov",be({token:Go,factory:Go.\u0275fac}));var Ho=(function(){function n(e){var t=this;an(this,n),J(this,"zone",void 0),J(this,"onDestroy",void 0),J(this,"subject",new yi(null)),this.zone=e;var i=function(_){return t.setGreeting(_)},o=function(){return t.setGreeting(null)},r=kr(function(){pi("on",{onGreetingDisplayed:i,onGreetingHidden:o})}),c=Ar(function(){setTimeout(function(){return t.setGreeting(null)},0)});this.onDestroy=function(){t.subject.complete(),t.subject.unsubscribe(),pi("off",{onGreetingDisplayed:i,onGreetingHidden:o}),r(),c()}}return sn(n,[{key:"setGreeting",value:function(t){var i=this;this.zone.run(function(){i.subject.next(t)})}},{key:"ngOnDestroy",value:function(){this.onDestroy()}}]),n})();J(Ho,"\u0275fac",function(e){return new(e||Ho)(ie(Mt))});J(Ho,"\u0275prov",be({token:Ho,factory:Ho.\u0275fac}));var $o=(function(){function n(e){an(this,n),J(this,"elementRef",void 0),J(this,"license",void 0),J(this,"organizationId",void 0),J(this,"group",void 0),J(this,"visibility",void 0),J(this,"customerName",void 0),J(this,"customerEmail",void 0),J(this,"sessionVariables",void 0),J(this,"chatBetweenGroups",void 0),J(this,"customIdentityProvider",void 0),J(this,"onReady",new he),J(this,"onNewEvent",new he),J(this,"onFormSubmitted",new he),J(this,"onRatingSubmitted",new he),J(this,"onGreetingHidden",new he),J(this,"onGreetingDisplayed",new he),J(this,"onVisibilityChanged",new he),J(this,"onCustomerStatusChanged",new he),J(this,"onRichMessageButtonClicked",new he),J(this,"onAvailabilityChanged",new he),J(this,"widget",null),this.elementRef=e}return sn(n,[{key:"ngOnInit",value:function(){this.setupWidget()}},{key:"ngOnChanges",value:function(t){var i=["license","organizationId","group","chatBetweenGroups"];if(i.some(function(_){var M;return t[_]!==void 0&&!((M=t[_])!==null&&M!==void 0&&M.isFirstChange())})){this.reinitialize();return}if(t.visibility!==void 0&&!t.visibility.isFirstChange()){var o;(o=this.widget)===null||o===void 0||o.updateVisibility(t.visibility.currentValue)}if(t.customerName!==void 0&&!t.customerName.isFirstChange()){var r;(r=this.widget)===null||r===void 0||r.updateCustomerData({name:t.customerName.currentValue})}if(t.customerEmail!==void 0&&!t.customerEmail.isFirstChange()){var c;(c=this.widget)===null||c===void 0||c.updateCustomerData({email:t.customerEmail.currentValue})}if(t.sessionVariables!==void 0&&!t.sessionVariables.isFirstChange()){var m;(m=this.widget)===null||m===void 0||m.updateSessionVariables(t.sessionVariables.currentValue)}}},{key:"ngOnDestroy",value:function(){var t;(t=this.widget)===null||t===void 0||t.destroy()}},{key:"setupWidget",value:function(){var t,i=this,o={group:this.group,license:this.license,organizationId:this.organizationId,visibility:this.visibility,customerName:this.customerName,customerEmail:this.customerEmail,sessionVariables:this.sessionVariables,chatBetweenGroups:this.chatBetweenGroups,customIdentityProvider:this.customIdentityProvider,env:(t=this.elementRef.nativeElement.getAttribute("env"))!==null&&t!==void 0?t:void 0,onReady:function(c){return i.onReady.emit(c)},onNewEvent:function(c){return i.onNewEvent.emit(c)},onFormSubmitted:function(c){return i.onFormSubmitted.emit(c)},onRatingSubmitted:function(c){return i.onRatingSubmitted.emit(c)},onGreetingHidden:function(c){return i.onGreetingHidden.emit(c)},onGreetingDisplayed:function(c){return i.onGreetingDisplayed.emit(c)},onVisibilityChanged:function(c){return i.onVisibilityChanged.emit(c)},onCustomerStatusChanged:function(c){return i.onCustomerStatusChanged.emit(c)},onRichMessageButtonClicked:function(c){return i.onRichMessageButtonClicked.emit(c)},onAvailabilityChanged:function(c){return i.onAvailabilityChanged.emit(c)}};this.widget=Am(o),window.__lc.integration_name="@livechat/widget-angular",this.product==="textapp"&&(window.__lc.product_name="text"),this.widget.init()}},{key:"reinitialize",value:function(){var t;(t=this.widget)===null||t===void 0||t.destroy(),this.setupWidget()}}]),n})();J($o,"\u0275fac",function(e){return new(e||$o)(h(Bi))});J($o,"\u0275dir",xo({type:$o,inputs:{license:"license",organizationId:"organizationId",group:"group",visibility:"visibility",customerName:"customerName",customerEmail:"customerEmail",sessionVariables:"sessionVariables",chatBetweenGroups:"chatBetweenGroups",customIdentityProvi
2der:"customIdentityProvider"},outputs:{onReady:"onReady",onNewEvent:"onNewEvent",onFormSubmitted:"onFormSubmitted",onRatingSubmitted:"onRatingSubmitted",onGreetingHidden:"onGreetingHidden",onGreetingDisplayed:"onGreetingDisplayed",onVisibilityChanged:"onVisibilityChanged",onCustomerStatusChanged:"onCustomerStatusChanged",onRichMessageButtonClicked:"onRichMessageButtonClicked",onAvailabilityChanged:"onAvailabilityChanged"},features:[wn]}));var go=(function(n){Lm(t,n);var e=Dm(t);function t(){var i;an(this,t);for(var o=arguments.length,r=new Array(o),c=0;c<o;c++)r[c]=arguments[c];return i=e.call.apply(e,[this].concat(r)),J(rc(i),"product","livechat"),i}return sn(t)})($o);J(go,"\u0275fac",(function(){var n;return function(t){return(n||(n=Ae(go)))(t||go)}})());J(go,"\u0275cmp",w({type:go,selectors:[["livechat-widget"]],features:[Y],decls:0,vars:0,template:function(e,t){},encapsulation:2}));var Er=(function(n){Lm(t,n);var e=Dm(t);function t(){var i;an(this,t);for(var o=arguments.length,r=new Array(o),c=0;c<o;c++)r[c]=arguments[c];return i=e.call.apply(e,[this].concat(r)),J(rc(i),"product","textapp"),i}return sn(t)})($o);J(Er,"\u0275fac",(function(){var n;return function(t){return(n||(n=Ae(Er)))(t||Er)}})());J(Er,"\u0275cmp",w({type:Er,selectors:[["text-widget"]],features:[Y],decls:0,vars:0,template:function(e,t){},encapsulation:2}));var uo=sn(function n(){an(this,n)});J(uo,"\u0275fac",function(e){return new(e||uo)});J(uo,"\u0275mod",Se({type:uo}));J(uo,"\u0275inj",we({providers:[Wo,Qo,mo,Go,Ho],imports:[[]]}));function bf(n,e){n&1&&v(0,"livechat-widget",1)}var ln,Ko=(ln=class{get disableAnimations(){return this.reducedMotionService.prefersReducedMotion()}constructor(e,t,i,o,r,c,m,_,M,I,k){this.router=e,this.location=t,this.simpleStorageService=i,this.authorizationService=o,this.mediatorService=r,this.configService=c,this.analyticsMobileService=m,this.brandConfigService=_,this.companyBrandingService=M,this.userpilotService=I,this.reducedMotionService=k,this.isCareManagerApp=this.configService.isCareManagerApp()}ngOnInit(){oa(1e3).pipe(ge(()=>this.simpleStorageService.get("appMode")==="selfCheckIn"||this.configService.isCheckInApp()),L(()=>this.authorizationService.logout())).subscribe(),this.mediatorService.listen("logOut").pipe(re(()=>this.configService.getDefaultRoute(Ut.GUEST)),ge(e=>e!==this.router.url),Le(this)).subscribe(e=>this.router.navigate([e])),this.analyticsMobileService.initAnalytics(),this.brandConfigService.setupBrandConfig(),this.shouldAppFlowBeSetToDefault()&&this.simpleStorageService.set("appFlow","default"),this.companyBrandingService.initBrandingData(),this.configService.isCareManagerApp()&&this.userpilotService.init()}shouldAppFlowBeSetToDefault(){return this.simpleStorageService.get("appFlow")==="check-in"?!["/user/questionnaire/","/user/task/"].some(e=>this.location.path().startsWith(e)):this.simpleStorageService.get("appFlow")!=="on-fly"}},ln.\u0275fac=function(t){return new(t||ln)(h(B),h(So),h(it),h(nt),h(bi),h(oe),h(jn),h(ci),h(Aa),h(Qn),h(za))},ln.\u0275cmp=w({type:ln,selectors:[["app-root"]],hostVars:1,hostBindings:function(t,i){t&2&&xp("@.disabled",i.disableAnimations)},standalone:!1,decls:2,vars:1,consts:[["license","19051694",4,"ngIf"],["license","19051694"]],template:function(t,i){t&1&&(v(0,"router-outlet"),C(1,bf,1,0,"livechat-widget",0)),t&2&&(a(),p("ngIf",i.isCareManagerApp))},dependencies:[F,Hi,go],encapsulation:2}),ln);Ko=Xe([et(),ut("design:paramtypes",[B,So,it,nt,bi,oe,jn,ci,Aa,Qn,za])],Ko);ri();var cn,Ts=(cn=class{constructor(e,t,i,o,r,c,m){this.router=e,this.loaderService=t,this.networkService=i,this.authorizationService=o,this.localStorage=r,this.activatedRoute=c,this.sideMenuService=m,this.matDialog=fe(Wp),this.isIdleCheckDisabled=this.getIsIdleCheckDisabled(this.activatedRoute.snapshot),this.networkService.isOnline$.pipe(Le(this)).subscribe(_=>this.isNetworkUp=_),this.router.events.pipe(ne(_=>{_ instanceof Oa?m.closeSideMenu():_ instanceof Ao&&(this.isIdleCheckDisabled=this.getIsIdleCheckDisabled(this.activatedRoute.snapshot))}),Le(this)).subscribe()}getIsIdleCheckDisabled(e){return!!e.firstChild?.data?.isIdleCheckDisabled}onUserIdleTimeUp(){this.matDialog.closeAll(),this.authorizationService.logout(!0).subscribe()}toggleMenu(){this.sideMenuService.isSideMenuOpen?this.sideMenuService.closeSideMenu():this.sideMenuService.openSideMenu()}get isLoadingInProgress(){return this.loaderService.isLoadingInProgress()}get isCheckInFlow(){return this.localStorage.get("appFlow")==="check-in"}},cn.\u0275fac=function(t){return new(t||cn)(h(B),h(Yi),h(xi),h(nt),h(it),h(j),h(vt))},cn.\u0275cmp=w({type:cn,selectors:[["ng-component"]],standalone:!1,decls:0,vars:0,template:function(t,i){},encapsulation:2}),cn);Ts=Xe([et(),ut("design:paramtypes",[B,Yi,xi,nt,it,j,vt])],Ts);var fo=(()=>{let e=class e{constructor(i,o){this.router=i,this.appConfig=o}isBrandingLogoAllowed(){return this.router.url.includes("/guest/forgot-password/")}};e.\u0275fac=function(o){return new(o||e)(h(B),h("APP_CONFIG"))},e.\u0275cmp=w({type:e,selectors:[["app-common-layout"]],standalone:!1,decls:3,vars:0,template:function(o,r){o&1&&v(0,"router-outlet")(1,"lib-loader")(2,"app-ajax-error")},dependencies:[Uo,Bo,Hi],encapsulation:2});let n=e;return n})();var Vm={logoStyle:'background-image: url("../../assets/img/logo-mcp.png"); height: 6rem; background-position: center;'};function xf(n,e){if(n&1&&v(0,"div",6),n&2){let t=g();to(t.landingPageConfig.logoStyle)}}function Of(n,e){if(n&1&&(s(0,"main"),v(1,"p",7),d(2,"translate"),l()),n&2){let t=g();a(),to(t.landingPageConfig.textStyle),p("innerHTML",u(2,3,t.landingPageConfig.text),Ll)}}function wf(n,e){n&1&&(s(0,"div",8)(1,"a",9),f(2),d(3,"translate"),l()()),n&2&&(a(2),b(u(3,1,"Sign up")))}var Nm=(()=>{let e=class e{constructor(i){this.activatedRoute=i,this.landingPageConfig=this.activatedRoute.snapshot.data.landingPageConfig||Vm}};e.\u0275fac=function(o){return new(o||e)(h(j))},e.\u0275cmp=w({type:e,selectors:[["app-landing"]],standalone:!1,decls:8,vars:10,consts:[[1,"landing-body"],[1,"content"],["class","logo-image",3,"style",4,"ngIf"],[4,"ngIf"],["routerLink","/guest/login",1,"login-btn",3,"innerHTML"],["class","sign-up",4,"ngIf"],[1,"logo-image"],[3,"innerHTML"],[1,"sign-up"],["routerLink","/guest/sign-up",1,"sign-up-btn"]
2],template:function(o,r){o&1&&(s(0,"div",0)(1,"div",1),C(2,xf,1,2,"div",2)(3,Of,3,5,"main",3),l(),s(4,"footer"),v(5,"a",4),d(6,"translate"),C(7,wf,4,3,"div",5),l()()),o&2&&(a(),to(r.landingPageConfig.imgStyle),a(),p("ngIf",r.landingPageConfig.logoStyle),a(),p("ngIf",r.landingPageConfig.text),a(2),to(r.landingPageConfig.btnStyle),p("innerHTML",u(6,8,"Log in"),Ll),a(2),p("ngIf",r.landingPageConfig.signUp))},dependencies:[Qe,F,T],styles:['.landing-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100%}.landing-body[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex:.9;display:flex;flex-direction:column;align-items:center;background-position:top;background-size:cover;background-image:url("./media/landing-mcp-GZBM6XU2.jpg")}.landing-body[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .logo-image[_ngcontent-%COMP%]{width:12rem;height:3rem;background-size:cover;margin-top:3rem}.landing-body[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] main[_ngcontent-%COMP%]{display:flex;flex:1;justify-content:center;align-items:flex-end;padding-bottom:1rem;width:90%}.landing-body[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] main[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:1.3rem;color:#fff;text-transform:uppercase;text-align:center;font-family:Roboto-bold,sans-serif;align-items:center;justify-content:center;line-height:2rem}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{display:flex;flex:.1;justify-content:center;align-items:center;flex-direction:column}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .login-btn[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.7rem;background-color:#064060;border-radius:50px;width:90%;box-sizing:border-box;font-family:Roboto-bold;align-items:center;cursor:pointer;text-transform:uppercase}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .login-btn[_ngcontent-%COMP%]:hover{opacity:.8}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .login-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .login-btn[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .login-btn[disabled][_ngcontent-%COMP%]{cursor:default}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .sign-up[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;padding-bottom:2rem;border-bottom:1px solid rgba(80,80,80,.15)}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .sign-up[_ngcontent-%COMP%] .sign-up-btn[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.7rem;background-color:#064060;border-radius:10px;width:90%;box-sizing:border-box;font-family:Roboto-bold;align-items:center;cursor:pointer;text-transform:uppercase;margin-top:1rem;background:none;border:1px solid #582c83;color:#582c83}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .sign-up[_ngcontent-%COMP%] .sign-up-btn[_ngcontent-%COMP%]:hover{opacity:.8}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .sign-up[_ngcontent-%COMP%] .sign-up-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .sign-up[_ngcontent-%COMP%] .sign-up-btn[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.landing-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .sign-up[_ngcontent-%COMP%] .sign-up-btn[disabled][_ngcontent-%COMP%]{cursor:default}']});let n=e;return n})();var Yo=(()=>{let e=class e{constructor(i){this.config=i,typeof window.PushNotification<"u"&&(this.push=window.PushNotification.init(i.notification))}registration(){let i=new jt;return this.push&&this.push.on("registration",o=>{i.next(o),i.complete()}),i}notification(){let i=new jt;return this.push&&this.push.on("notification",o=>{i.next(o)}),i}};e.\u0275fac=function(o){return new(o||e)(ie("CORDOVA_CONFIG"))},e.\u0275prov=be({token:e,factory:e.\u0275fac});let n=e;return n})();var Xo=(()=>{let e=class e{constructor(i){this.translateService=i,this.confirm=window.navigator.notification?this.cordovaConfirm:this.windowConfirm}isConfirmed$(i,o,r){return Zn(this.confirm(i,o,r)).pipe(re(c=>c===1))}windowConfirm(i,o,r){let c=confirm(i)?1:0;return Promise.resolve(c)}cordovaConfirm(i,o=this.translateService._(""),r=[this.translateService._("Yes"),this.translateService._("No")]){return new Promise(c=>window.navigator.notification.confirm(i,m=>c(m),o,r))}};e.\u0275fac=function(o){return new(o||e)(ie(qt))},e.\u0275prov=be({token:e,factory:e.\u0275fac});let n=e;return n})();var Um=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({providers:[Yo,Xo]});let n=e;return n})();var ks=(()=>{let e=class e{constructor(i){this.http=i}getUserDevice(i){return this.http.get(`/api/user/device?deviceIdentifier=${i}`)}createDeviceTicket(i){return this.http.post(`/api/user/device/${i}/ticket`,{}).pipe(re(({ticket:o})=>o))}createUserDevice(i){return this.http.post("/api/user/devices",i).pipe(re(({deviceId:o})=>o))}saveUserDevice(i,o){return this.http.put(`/api/user/devices/${i}`,o)}};e.\u0275fac=function(o){return new(o||e)(ie(Lp))},e.\u0275prov=be({token:e,factory:e.\u0275fac});let n=e;return n})();var Zo=(()=>{let e=class e{constructor(i,o,r){this.userService=i,this.asyncStorageService=o,this.deviceApiService=r}saveDeviceTicket(i){return this.asyncStorageService.get("loginData").pipe(ge(({isBiometricAllow:o})=>i&&o==="yes"),L(()=>this.deviceApiService.createDeviceTicket(i)),Pt(()=>me("")),L(o=>this.userService.saveLoginData("ticket",o)))}store(i){let o={device:{deviceToken:i.deviceToken,deviceIdentifier:i.deviceIdentifier,deviceType:String(i.deviceType).toLowerCase()}};this.deviceApiService.getUserDevice(i.deviceToken).pipe(L(r=>this.userService.saveLoginData("deviceId",r.deviceId).pipe(L(()=>this.deviceApiService.saveUserDevice(r.deviceId,o)))),Pt(r=>bo(()=>r instanceof Fp&&r.status===404,this.deviceApiService.createUserDevice(o),xn(r))),ge(Boolean),L(r=>this.userService.saveLoginData("deviceId",r).pipe(L(()=>this.saveDeviceTicket(r))))).subscribe()}};e.\u0275fac=function(o){return new(o||e)(ie(De),ie(si),ie(ks))},e.\u0275prov=be({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var zm={generalColor:"#064060",logoImgStyle:'height: 13rem; background-size: cover; background-image: url("/assets/img/logo-mcp.png");'};var Ge=(()=>{let e=class e{constructor(i,o){this.router=i,this.configService=o,this.isCareManagerApp=this.configService.getAppType()===rn.CARE_MANAGER}getUrl(i){return this.isCareManagerApp?`/provider/patient/${i}/appointments/create`:"/user/appointment/create"}goToProviderSelectPage(i,o={}){this.router.navigate([`${this.getUrl(i.patientId)}/providers`],z({queryParams:i},o))}goToConsultationTypeSelectPage(i,o={}){this.router.navigate([`${this.getUrl(i.patientId)}/consultation-types`],z({queryParams:i},o))}goToRecurringVisitListPage(i,o={}){this.router.navigate([`${this.getUrl(i.patientId)}/recurring-visit`],z({queryParams:i},o))}goToTimeSlotSelectPage(i){this.router.navigate([`${this.getUrl(i.patientId)}/time-slots`],{queryParams:i}
2)}goToConfirmationPage(i){let o=i.cancelAppointmentId?"confirm-reschedule":"confirm";this.router.navigate([`${this.getUrl(i.patientId)}/${o}`],{queryParams:i})}goToSummaryPage(i,o,r,c,m,_){this.router.navigate([`${this.getUrl(r)}/summary`],{queryParams:z({clinicUuid:i,appointmentId:o,patientId:r,startAt:c,failedStartAt:m},_&&{status:_})})}isAppointmentBookingRequired(i){return["clinicUuid","consultationTypeId","departmentId","doctorId","finishAt","startAt","appointmentComment"].every(r=>i[r])}};e.\u0275fac=function(o){return new(o||e)(ie(B),ie(oe))},e.\u0275prov=be({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function Tf(n,e){n&1&&(s(0,"span",13),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Please enter home or mobile phone number")," "))}function kf(n,e){if(n&1&&(s(0,"span",13),f(1),d(2,"translate"),l()),n&2){let t=g();a(),b(u(2,1,t.error.error.error))}}var As=(()=>{let e=class e{constructor(i,o,r){this.userService=i,this.oauth2=o,this.loginByUserPhoneService=r,this.twoFactorAuthCheck=new he,this.showLogin=new he,this.errorNotification=new he}ngOnInit(){this.errorNotification.emit()}submitForm({value:i}){this.loginByUserPhoneService.login(i.phone,this.oauth2.getTwoFactorAuthToken()).pipe(L(o=>this.userService.processUserAfterLogin(o))).subscribe(o=>this.twoFactorAuthCheck.emit(o))}};e.\u0275fac=function(o){return new(o||e)(h(De),h(Yp),h(ad))},e.\u0275cmp=w({type:e,selectors:[["app-two-factor-auth"]],inputs:{error:"error"},outputs:{twoFactorAuthCheck:"twoFactorAuthCheck",showLogin:"showLogin",errorNotification:"errorNotification"},standalone:!1,decls:30,vars:25,consts:[["f","ngForm"],[1,"two-factor-auth"],[1,"item","phone"],[1,"title"],[1,"description"],[3,"ngSubmit"],[1,"field"],["for","phone"],["type","tel","inputmode","numeric","autocomplete","tel-national","pattern","[0-9]*","ngModel","","required","","id","phone","name","phone",3,"placeholder"],["class","error","aria-live","polite","role","alert",4,"ngIf"],["id","footer",1,"footer"],["type","submit",1,"button",3,"disabled"],[1,"link","login-btn",3,"click"],["aria-live","polite","role","alert",1,"error"]],template:function(o,r){if(o&1){let c=S();s(0,"div",1)(1,"main")(2,"div",2)(3,"h1",3),f(4),d(5,"translate"),l(),s(6,"div",4),f(7),d(8,"translate"),l(),s(9,"form",5,0),P("ngSubmit",function(){x(c);let _=V(10);return O(r.submitForm(_))}),s(11,"div",6)(12,"label",7),f(13),d(14,"translate"),l(),v(15,"input",8),d(16,"translate"),C(17,Tf,3,3,"span",9)(18,kf,3,3,"span",9),l(),s(19,"div",10)(20,"button",11),f(21),d(22,"translate"),l(),s(23,"div",4),f(24),d(25,"translate"),l(),s(26,"div")(27,"button",12),P("click",function(){return x(c),O(r.showLogin.emit())}),f(28),d(29,"translate"),l()()()()()()()}if(o&2){let c=V(10);a(4),y(" ",u(5,11,"Please verify phone number")," "),a(3),y(" ",u(8,13,"For security reasons, please enter your home or mobile phone number.")," "),a(6),b(u(14,15,"Phone number:")),a(2),p("placeholder",wt(u(16,17,"Enter here..."))),a(2),p("ngIf",c.controls.phone&&!c.controls.phone.valid&&c.controls.phone.touched),a(),p("ngIf",r.error),a(2),p("disabled",!c.valid),a(),y(" ",u(22,19,"SUBMIT")," "),a(3),y(" ",u(25,21,"The phone number needs to match the one that is on file in your medical record at the clinic. If you can not get this to work, please contact the clinic and confirm the correct numbers are on file.")," "),a(4),y(" ",u(29,23,"Return to login page")," ")}},dependencies:[je,ee,X,Ne,We,Mi,Ie,Gi,F,T],styles:["[_nghost-%COMP%]{max-width:38.75rem;margin:auto;color:#505050}.two-factor-auth[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-content:space-between;padding:0;flex:1}.two-factor-auth[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;font-size:1.2rem;padding:2rem 1rem 1rem;line-height:1.5rem;color:#064060;font-family:Roboto-bold,sans-serif;text-align:center}.two-factor-auth[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{padding:1rem 2rem;text-align:center;line-height:1.2rem}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%]{display:flex;height:auto;flex-direction:column;justify-content:left;align-content:flex-start}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;flex-direction:column}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{flex-direction:column;justify-content:stretch;align-items:center;align-content:flex-start;padding:1rem 3rem}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:not(.error){width:100%;flex-direction:column}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-family:Roboto-medium,sans-serif;margin-bottom:.5rem;display:flex}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] #phone[_ngcontent-%COMP%]{padding:.625rem 1rem;border:1px solid #949494;border-radius:8px;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;text-indent:0;height:2.5rem;letter-spacing:.0325rem}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] #phone[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] #phone[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] #phone[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] #phone[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] #phone[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.two-factor-auth[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{display:flex;margin-top:.5rem}.two-factor-auth[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > .error[_ngcontent-%COMP%]{padding:0 1rem 1rem}.two-factor-auth[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > .error[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:1rem}.two-factor-auth[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:2rem!important;display:flex;justify-content:center;align-items:center;text-align:center;flex-direction:column}.two-factor-auth[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .login-btn[_ngcontent-%COMP%]{text-decoration:underline}.two-factor-auth[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.5rem;background-color:#064060;border-radius:8px;width:50%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;margin-bottom:1rem;height:2.5rem;font-size:.875rem;letter-spacing:.0275rem}.two-factor-auth[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{opacity:.8}.two-factor-auth[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.two-factor-auth[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.two-factor-auth[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[disabled][_ngcontent-%COMP%]{cursor:default}.two-factor-auth[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:disabled{opacity:.25;cursor:default}"]});let n=e;return n})();var Ef=()=>({name:"fingerprint",color:"#0D9DC5"}),Ff=()=>
2({name:"faceid",color:"#0D9DC5"});function Lf(n,e){if(n&1){let t=S();s(0,"app-two-factor-auth",2),P("errorNotification",function(){x(t);let o=g();return O(o.errorNotification())})("showLogin",function(){x(t);let o=g();return O(o.showLogin())})("twoFactorAuthCheck",function(o){x(t);let r=g();return O(r.onLogin(o))}),l()}if(n&2){let t=g();p("error",t.error)}}function Df(n,e){if(n&1&&v(0,"div",19),n&2){let t=g(2);to(t.loginPageConfig.logoImgStyle)}}function Bf(n,e){if(n&1&&(s(0,"div",20)(1,"span"),f(2),d(3,"translate"),l()()),n&2){let t=g(2);a(2),b(u(3,1,t.error.error.error_description))}}function Rf(n,e){n&1&&v(0,"lib-svg-icon",23),n&2&&p("params",A(1,Ef))}function Vf(n,e){n&1&&v(0,"lib-svg-icon",23),n&2&&p("params",A(1,Ff))}function Nf(n,e){if(n&1){let t=S();s(0,"div",21),P("click",function(){x(t);let o=g(2);return O(o.showAuthAlert())}),C(1,Rf,1,2,"lib-svg-icon",22)(2,Vf,1,2,"lib-svg-icon",22),l()}if(n&2){let t=g(2);a(),p("ngIf",t.isLoginByFingerprintAvailable()),a(),p("ngIf",t.isLoginByFaceIdAvailable())}}function Uf(n,e){n&1&&(s(0,"div",24)(1,"a",25),f(2),d(3,"translate"),l()()),n&2&&(a(2),b(u(3,1,"Sign up here")))}function qf(n,e){if(n&1){let t=S();s(0,"div",3)(1,"header"),C(2,Df,1,2,"div",4),l(),s(3,"main")(4,"form",5),P("ngSubmit",function(){x(t);let o=g();return O(o.loginHandler())}),s(5,"div",6)(6,"div",7)(7,"label",8),f(8),d(9,"translate"),l(),s(10,"div"),v(11,"input",9),l()(),s(12,"div",10)(13,"label",11),f(14),d(15,"translate"),l(),s(16,"div"),v(17,"input",12),l()(),C(18,Bf,4,3,"div",13),s(19,"div",14)(20,"button",15),f(21),d(22,"translate"),l(),C(23,Nf,3,2,"div",16),l()(),s(24,"div",17),v(25,"app-credential-recovery-link"),l(),C(26,Uf,4,3,"div",18),l()()()}if(n&2){let t=g();a(2),p("ngIf",t.loginPageConfig.logoImgStyle),a(2),p("formGroup",t.loginForm),a(2),Zt("border-color",t.loginPageConfig.generalColor),a(2),b(u(9,15,"USERNAME")),a(4),Zt("border-color",t.loginPageConfig.generalColor),a(2),b(u(15,17,"Password")),a(4),p("ngIf",t.error),a(2),Zt("border-color",t.loginPageConfig.generalColor),p("disabled",t.loginForm.pristine),a(),y(" ",u(22,19,"Log in")," "),a(2),p("ngIf",t.isBiometricAuthAvailable),a(3),p("ngIf",!t.loginPageConfig.hideSignUp)}}var Es=(()=>{let e=class e{constructor(i,o,r,c,m,_,M,I,k,R,N,W,K,Ee,Ke,ot,ze,Ye,ii,Bt,gt,yt,ni,oi){this.appointmentCreateNavigationService=i,this.fb=o,this.router=r,this.userService=c,this.deviceService=m,this.pushService=_,this.mobileDeviceService=M,this.configService=I,this.zone=k,this.asyncStorageService=R,this.simpleStorageService=N,this.errorService=W,this.authorizationService=K,this.logoutService=Ee,this.translateService=Ke,this.dialogsService=ot,this.activatedRoute=ze,this.appointmentApiService=Ye,this.userApiService=ii,this.loginByTicketService=Bt,this.loginByOauthTwoFactorService=gt,this.loginFactoryService=yt,this.providerChangePasswordService=ni,this.userpilotService=oi,this.twoFactorLoginErrorMessage="",this.twoFactorLoginSuccessMessage="",this.loginPageConfig=this.activatedRoute.snapshot.data.loginPageConfig||zm,this.CODE_SENT_MSG="Code has been sent",this.logoutService.logout(!0).subscribe(()=>{this.translateService.setDefaultValues(),this.translateService.initTranslationInfo(()=>{this.onTranslationsLoaded(this.translateService.getLanguage())})}),this.createLoginForm(),this.registerPushNotification(),this.defineAuthMode()}onTranslationsLoaded(i){}ngOnInit(){this.errorNotification()}ngOnDestroy(){this.errorSubscription?.unsubscribe()}showAuthAlert(){window.Fingerprint.show({clientId:"Biometric-verification",clientSecret:Math.random().toString(36).substring(2)},()=>{this.loginByTicket()},i=>{console.error(i)})}errorNotification(){this.errorService.initError(),this.errorSubscription?.unsubscribe(),this.errorSubscription=this.errorService.activeError.subscribe(i=>this.error=i)}login(){let{username:i,password:o}=this.loginForm.value,r=this.configService.getAppConfig().defaultAccessGrantType;this.loginFactoryService.getService(r).login(i,o).pipe(L(m=>this.userService.processUserAfterLogin(m))).subscribe(m=>this.handleTwoFactorAuth(m))}onTwoFactorLogin(i){this.resetTwoFactorLoginMessages(),this.loginByOauthTwoFactorService.login(this.userService.getTwoFactorLoginAuthCode(),i).pipe(L(o=>this.userService.processUserAfterLogin(o))).subscribe(o=>this.onLogin(o),o=>this.twoFactorLoginErrorMessage=o.error?.error||"")}showBiometricConfirmationDialog(){this.getBiometricAuthMessage$().pipe(L(i=>this.dialogsService.isConfirmed$(this.translateService._(i))),re(i=>i?"yes":"no"),L(i=>this.userService.saveLoginData("isBiometricAllow",i))).subscribe(()=>this.login())}onTwoFactorLoginCancel(){this.isTwoFactorLogin=!1,this.resetTwoFactorLoginMessages(),this.errorService.updateError(null)}onSendPinCode(){this.resetTwoFactorLoginMessages(),this.userApiService.sendPinCode(this.userService.getTwoFactorLoginAuthCode()).subscribe({next:()=>this.twoFactorLoginSuccessMessage=this.CODE_SENT_MSG,error:({status:i})=>{i===406&&this.login()}})}showLogin(){this.isTwoFactorAuth=!1}getLoginData(){return this.asyncStorageService.get("loginData")}loginByTicket(){this.getLoginData().pipe(ge(Boolean),L(({memberType:i,id:o,pushId:r,ticket:c})=>this.loginByTicketService.login(i,o,r,c,this.configService.getAppConfig().defaultAccessGrantType)),L(i=>this.userService.processUserAfterLogin(i))).subscribe(i=>this.handleTwoFactorAuth(i))}handleTwoFactorAuth(i){this.isTwoFactorLogin&&(this.twoFactorLoginSuccessMessage=this.CODE_SENT_MSG),this.isTwoFactorAuth=this.userService.getTwoFactorAuthToken(),this.zone.run(()=>{this.isTwoFactorLogin=this.userService.isTwoFactorLogin(),!(this.isTwoFactorAuth||this.isTwoFactorLogin)&&this.saveLoginData(i).subscribe(()=>this.onLogin(i))})}
2loginHandler(){this.loginForm.invalid||this.getLoginData().subscribe(i=>{(!i||!i.isBiometricAllow)&&this.authMode?this.showBiometricConfirmationDialog():this.login()})}onLogin(i){this.asyncStorageService.set("messagingWarning",!0).subscribe(),this.registerEvent&&this.mobileDeviceService.getDevice().subscribe(o=>{this.deviceService.store({deviceToken:this.registerEvent.registrationId,deviceIdentifier:o.uuid,deviceType:o.platform})}),this.getLoginData().pipe(L(o=>this.deviceService.saveDeviceTicket(o?.deviceId??0))).subscribe(),bo(()=>this.userService.isDefaultUserRoleUser(),this.userApiService.getUserActions({userId:i.id,action:od.LOGIN,type:Wl.BALANCE}),xn(null)).pipe(re(o=>o.some(({type:r})=>r===Wl.BALANCE)),Pt(()=>me(!1))).subscribe(o=>this.redirectUserOnLogin(i,o)),this.configService.isCareManagerApp()&&(this.userService.initProviderPermissions().subscribe(),this.userpilotService.identifyUser(i))}registerPushNotification(){this.pushService.registration().pipe(ne(i=>this.registerEvent=i),ge(Boolean),Wi(500),L(({registrationId:i})=>this.userService.saveLoginData("pushId",i))).subscribe()}createLoginForm(){this.loginForm=this.fb.group({username:["",at.required],password:["",at.required]})}getBiometricAuthMessage$(){let i=this.configService.getAppName();return Ft([this.mobileDeviceService.isIOSPlatform(),this.mobileDeviceService.isAndroidPlatform()]).pipe(re(([o,r])=>{let c;return o&&this.isLoginByFaceIdAvailable()?c=`Do you want to allow ${i} to use Face ID?`:o&&this.isLoginByFingerprintAvailable()?c=`Do you want to allow ${i} to use Touch ID?`:r&&this.isLoginByFaceIdAvailable()?c=`Do you want to allow ${i} to use facial recognition?`:r&&this.isLoginByFingerprintAvailable()?c=`Do you want to allow ${i} to use fingerprints?`:c=`Do you want to allow ${i} to use biometric login?`,c}))}isLoginByFaceIdAvailable(){return this.authMode==="face"}isLoginByFingerprintAvailable(){return["biometric","finger"].includes(this.authMode)}resetTwoFactorLoginMessages(){this.twoFactorLoginErrorMessage="",this.twoFactorLoginSuccessMessage=""}checkBiometricAuth(){this.getLoginData().subscribe(i=>{this.isBiometricAuthAvailable=this.authMode&&i&&i.id&&i.ticket&&i.isBiometricAllow==="yes",this.isBiometricAuthAvailable&&this.showAuthAlert()})}defineAuthMode(){window.Fingerprint&&window.Fingerprint.isAvailable(i=>{setTimeout(()=>{this.zone.run(()=>{this.authMode=i,this.checkBiometricAuth()})},300)},i=>{console.error(i)})}saveLoginData(i){return this.userService.saveLoginData("id",i.memberId).pipe(L(()=>this.userService.saveLoginData("memberType",i.memberType)),re(()=>i))}redirectUserOnLogin(i,o){this.userService.handleCommunicationLanguage(i).subscribe(()=>{let r=this.configService.getAppType();if(i&&(i.isResetPasswordRequired||i.isSecurityQuestionEmpty)&&r!==rn.CHECK_IN){i.memberType===Ue.DOCTOR&&this.providerChangePasswordService.setIfProviderShouldChangePassword(!0),this.router.navigate([i.role,"security"],{queryParams:this.activatedRoute.snapshot.queryParams});return}else i.memberType===Ue.DOCTOR&&this.providerChangePasswordService.setIfProviderShouldChangePassword(!1);let c=this.activatedRoute.snapshot.queryParams;this.appointmentCreateNavigationService.isAppointmentBookingRequired(c)?this.router.navigate([i.role,"appointment"],{queryParams:z({cameFrom:"login",userId:i.id,clinicUuid:c.clinicUuid,consultationTypeId:c.consultationTypeId,departmentId:c.departmentId,locationId:c.locationId,finishAt:c.finishAt,doctorId:c.doctorId,startAt:c.startAt,externalId:c.externalId,appointmentComment:c.appointmentComment},c.waitlist?{waitlist:c.waitlist}:{})}):r===rn.CHECK_IN?this.router.navigate([this.configService.getDefaultRoute(i.role)]):o?this.router.navigate([i.role,"outstanding-balance-list"],{queryParams:{cameFrom:"login"}}):c.urlAfterLogin&&c.urlAfterLogin.startsWith(`/${i.role}/`)?this.router.navigate([c.urlAfterLogin]):this.router.navigate([this.configService.getDefaultRoute(i.role)],{queryParams:{cameFrom:"login"}})})}};e.\u0275fac=function(o){return new(o||e)(h(Ge),h(Nt),h(B),h(De),h(Zo),h(Yo),h(Si),h(oe),h(Mt),h(si),h(it),h(Ii),h(nt),h(Fo),h(qt),h(Xo),h(j),h(Ct),h(Ze),h(Va),h(Ua),h(qa),h(Lo),h(Qn))},e.\u0275cmp=w({type:e,selectors:[["app-login"]],standalone:!1,decls:2,vars:2,consts:[[3,"error","errorNotification","showLogin","twoFactorAuthCheck",4,"ngIf"],["class","login-body",4,"ngIf"],[3,"errorNotification","showLogin","twoFactorAuthCheck","error"],[1,"login-body"],["class","login-image",3,"style",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"fields"],[1,"item"],["for","username-input",1,"form-label"],["type","text","id","username-input","autocomplete","username","formControlName","username",1,"login"],[1,"item","password"],["for","password-input",1,"form-label"],["type","password","formControlName","password","autocomplete","current-password","id","password-input",1,"password"],["class","error",4,"ngIf"],[1,"login-actions"],["type","submit",1,"login-btn",3,"disabled"],["class","login-identification",3,"click",4,"ngIf"],[1,"forgot-password"],["class","sign-up",4,"ngIf"],[1,"login-image"],[1,"error"],[1,"login-identification",3,"click"],[3,"params",4,"ngIf"],[3,"params"],[1,"sign-up"],["routerLink","/guest/sign-up"]],template:function(o,r){o&1&&C(0,Lf,1,1,"app-two-factor-auth",0)(1,qf,27,21,"div",1),o&2&&(p("ngIf",r.isTwoFactorAuth),a(),p("ngIf",!r.isTwoFactorAuth))},dependencies:[cs,je,ee,X,Ne,tt,st,Qe,F,U,As,T],styles:[".login-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100%}.login-body[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;flex:.1;justify-content:center;align-items:center;flex-direction:column;margin:2rem 0}.login-body[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .login-image[_ngcontent-%COMP%]{background-size:16rem;width:16rem;justify-content:center;background-position:center;display:flex;align-items:center;background-repeat:no-repeat;height:11rem}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%]{display:flex;flex:.7;justify-content:center;min-height:35vh;width:100%}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0 2rem;overflow:visible}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%]{width:100%}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{margin-top:.5rem;line-height:1rem}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid #0D9DC5;align-items:center;margin-top:1.5rem;width:100%;overflow:hidden;min-height:2rem}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{flex:1 0 40%;text-transform:uppercase;font-family:Roboto-bold,sans-serif;font-size:.8rem}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;border-radius:4px;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;text-align:right;border:none;padding:.5rem 0}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .forgot-password[_ngcontent-%COMP%], .login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .sign-up[_ngcontent-%COMP%]{line-height:1.2rem;text-align:center;display:flex;flex-direction:column;margin-top:1rem;font-size:.8rem}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .forgot-password[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .sign-up[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#505050}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .forgot-password[_ngcontent-%COMP%]{margin-top:auto}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .login-actions[_ngcontent-%COMP%]{width:100%;display:flex;margin-top:2rem}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .login-actions[_ngcontent-%COMP%] .login-identification[_ngcontent-%COMP%]{width:2rem;height:2rem;padding-left:1rem}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .login-actions[_ngcontent-%COMP%] .login-identification[_ngcontent-%COMP%] svg{color:#0d9dc5;width:2rem;height:2rem}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .login-actions[_ngcontent-%COMP%] .login-identification[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:2.1rem;height:2.1rem;min-width:2.1rem;min-height:2.1rem;background:none}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .login-btn[_ngcontent-%COMP%]{margin-bottom:1rem;display:flex;color:#fff;justify-content:center;padding:.5rem;background-color:#064060;border-radius:50px;width:100%;box-sizing:border-box;font-family:Roboto-bold;align-items:center;cursor:pointer;text-transform:uppercase;border:1px solid #0D9DC5;background:none;color:#505050;font-size:.8rem;min-height:2rem}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .login-btn[_ngcontent-%COMP%]:hover{opacity:.8}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .login-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .login-btn[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .login-btn[disabled][_ngcontent-%COMP%]{cursor:default}.login-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{display:flex;border-top:1px solid #e6e6e6;flex:.2;justify-content:center;align-items:center;font-size:.8rem}.login-body[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .sign-up[_ngcontent-%COMP%]{margin-left:5px}@media only screen and (min-width:768px){.login-body[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .item.password[_ngcontent-%COMP%]{margin-bottom:2rem}}"]});let n=e;return n})();var Fs=()=>({name:"arrow-left",color:"#ffffff"}),sc=()=>({name:"arrow-right",color:"#ffffff"}),Wf=(n,e)=>({"color-grey":n,"color-black":e});function Qf(n,e){n&1&&(s(0,"p",20),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"This field should be valid and 2 characters minimum")," "))}function Gf(n,e){n&1&&(s(0,"p",20),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"This field should be valid and 2 characters minimum")," "))}function Hf(n,e){if(n&1){let t=S();s(0,"div",4)(1,"h2",5),f(2),d(3,"translate"),l(),s(4,"form",6)(5,"div",7)(6,"label",8),f(7),d(8,"translate"),l(),v(9,"input",9),d(10,"translate"),l(),C(11,Qf,3,3,"p",10),s(12,"div",7)(13,"label",11),f(14),d(15,"translate"),l(),v(16,"input",12),d(17,"translate"),l(),C(18,Gf,3,3,"p",10),l(),s(19,"div",13)(20,"button",14)(21,"span",15),v(22,"lib-svg-icon",16),l(),s(23,"span",17),f(24),d(25,"translate"),l()(),s(26,"span",18),f(27," 1/4 "),l(),s(28,"button",19),P("click",function(){x(t);let o=g();return O(o.goTo("info"))}),f(29),d(30,"translate"),s(31,"span",15),v(32,"lib-svg-icon",16),l()()()()}if(n&2){let t=g();a(2),y(" ",u(3,15,"Please enter your name")," "),a(2),p("formGroup",t.signUpForm),a(3),b(u(8,17,"FIRST NAME:")),a(2),p("placeholder",wt(u(10,19,"
2Enter here..."))),a(2),p("ngIf",t.isErrorOnField("firstName")),a(3),b(u(15,21,"LAST NAME:")),a(2),p("placeholder",wt(u(17,23,"Enter here..."))),a(2),p("ngIf",t.isErrorOnField("lastName")),a(4),p("params",A(29,Fs)),a(2),b(u(25,25,"Back")),a(4),p("disabled",t.isErrorInForm()),a(),y(" ",u(30,27,"Next")," "),a(3),p("params",A(30,sc))}}function $f(n,e){n&1&&(s(0,"p",20),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"This field should not be empty. Please enter a valid email address")," "))}function Kf(n,e){n&1&&(s(0,"p",20),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"This field should not be empty. Please enter a valid mobile phone")," "))}function Yf(n,e){n&1&&(s(0,"div",20)(1,"span"),f(2),d(3,"translate"),l()()),n&2&&(a(2),b(u(3,1,"Please enter a valid mobile phone")))}function Xf(n,e){n&1&&(s(0,"p",20),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Please enter a valid Date of Birth")," "))}function Zf(n,e){if(n&1&&(s(0,"option",34),f(1),d(2,"translate"),l()),n&2){let t=e.$implicit;p("ngValue",t),a(),y(" ",u(2,2,t)," ")}}function Jf(n,e){n&1&&(s(0,"p",20),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"This field should be valid and not empty")," "))}function eh(n,e){if(n&1){let t=S();s(0,"div",21)(1,"h2",5),f(2),d(3,"translate"),l(),s(4,"form",6)(5,"div",7)(6,"label",22),f(7),d(8,"translate"),l(),v(9,"input",23),d(10,"translate"),l(),C(11,$f,3,3,"p",10),s(12,"div",7)(13,"label",24),f(14),d(15,"translate"),l(),v(16,"input",25),d(17,"translate"),l(),C(18,Kf,3,3,"p",10)(19,Yf,4,3,"div",10),s(20,"div",7)(21,"label",26),f(22),d(23,"translate"),l(),v(24,"input",27),l(),C(25,Xf,3,3,"p",10),s(26,"div",28)(27,"label",29),f(28),d(29,"translate"),l(),s(30,"select",30)(31,"option",31),f(32),d(33,"translate"),l(),C(34,Zf,3,4,"option",32),d(35,"async"),l()(),C(36,Jf,3,3,"p",10),l(),s(37,"div",13)(38,"button",33),P("click",function(){x(t);let o=g();return O(o.goTo("name"))}),s(39,"span",15),v(40,"lib-svg-icon",16),l(),s(41,"span",17),f(42),d(43,"translate"),l()(),s(44,"span",18),f(45," 2/4 "),l(),s(46,"button",19),P("click",function(){x(t);let o=g();return O(o.phoneValidation())}),f(47),d(48,"translate"),s(49,"span",15),v(50,"lib-svg-icon",16),l()()()()}if(n&2){let t=g();a(2),y(" ",u(3,29,"Enter your E-mail, Mobile Phone and Birth Date")," "),a(2),p("formGroup",t.signUpForm),a(3),b(u(8,31,"E-mail:")),a(2),p("placeholder",wt(u(10,33,"Enter here..."))),a(2),p("ngIf",t.isErrorOnField("email")),a(3),b(u(15,35,"Mobile Phone:")),a(2),p("placeholder",wt(u(17,37,"Enter here..."))),a(2),p("ngIf",t.isErrorOnField("mobilePhone")),a(),p("ngIf",t.isErrorMobilePhone()),a(3),b(u(23,39,"Birth Date:")),a(2),p("min",wt(t.dateRange.minDate))("max",wt(t.dateRange.maxDate)),a(),p("ngIf",t.isErrorOnField("birthdate")),a(3),b(u(29,41,"Legal Sex:")),a(2),p("ngClass",Dt(51,Wf,!t.signUpForm.get("gender").value,t.signUpForm.get("gender").value)),a(),p("ngValue",null)("selected",!0),a(),y(" ",u(33,43,"Select ")," "),a(2),p("ngForOf",u(35,45,t.genderList$)),a(2),p("ngIf",t.isErrorOnField("gender")),a(4),p("params",A(54,Fs)),a(2),b(u(43,47,"Back")),a(4),p("disabled",t.isErrorInForm()),a(),y(" ",u(48,49,"Next")," "),a(3),p("params",A(55,sc))}}function th(n,e){if(n&1&&(s(0,"p",20),f(1),d(2,"translate"),l()),n&2){let t,i=g(2);a(),y(" ",u(2,1,((t=i.signUpForm.get("username"))==null?null:t.getError("api"))||"This field should be valid and 6 characters minimum")," ")}}function ih(n,e){n&1&&(s(0,"p",20),v(1,"lib-password-complexity-error"),l())}function nh(n,e){n&1&&(s(0,"p",20),v(1,"lib-password-complexity-error"),l())}function oh(n,e){n&1&&(s(0,"p",20),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Password does not match the confirm password.")," "))}function rh(n,e){n&1&&(s(0,"div",20)(1,"span"),f(2),d(3,"translate"),s(4,"a",41),f(5),d(6,"translate"),l(),f(7,"."),l()()),n&2&&(a(2),y("",u(3,2,"This user already exists, please")," "),a(3),b(u(6,4,"click here to login")))}function ah(n,e){n&1&&(s(0,"div",20)(1,"span"),f(2),d(3,"translate"),l()()),n&2&&(a(2),b(u(3,1,"This username already exists, please choose another.")))}function sh(n,e){n&1&&(s(0,"div",20)(1,"span"),f(2),d(3,"translate"),l()()),n&2&&(a(2),b(u(3,1,"Please enter a valid mobile phone")))}function lh(n,e){if(n&1){let t=S();s(0,"div",21)(1,"h2",5),f(2),d(3,"translate"),l(),s(4,"form",6)(5,"div",7)(6,"label",35),f(7),d(8,"translate"),l(),v(9,"input",36),d(10,"translate"),l(),C(11,th,3,3,"p",10),s(12,"div",7)(13,"label",37),f(14),d(15,"translate"),l(),v(16,"input",38),d(17,"translate"),l(),C(18,ih,2,0,"p",10),v(19,"lib-password-complexity-info"),s(20,"div",7)(21,"label",39),f(22),d(23,"translate"),l(),v(24,"input",40),d(25,"translate"),l(),C(26,nh,2,0,"p",10)(27,oh,3,3,"p",10)(28,rh,8,6,"div",10)(29,a
2h,4,3,"div",10)(30,sh,4,3,"div",10),l(),s(31,"div",13)(32,"button",33),P("click",function(){x(t);let o=g();return O(o.goTo("info"))}),s(33,"span",15),v(34,"lib-svg-icon",16),l(),s(35,"span",17),f(36),d(37,"translate"),l()(),s(38,"span",18),f(39," 3/4 "),l(),s(40,"button",19),P("click",function(){x(t);let o=g();return O(o.goToCreate())}),f(41),d(42,"translate"),s(43,"span",15),v(44,"lib-svg-icon",16),l()()()()}if(n&2){let t=g();a(2),y(" ",u(3,23,"Set up a username and password")," "),a(2),p("formGroup",t.signUpForm),a(3),b(u(8,25,"Username:")),a(2),p("placeholder",wt(u(10,27,"Enter here..."))),a(2),p("ngIf",t.isErrorOnField("username")),a(3),b(u(15,29,"Password:")),a(2),p("placeholder",wt(u(17,31,"Enter here..."))),a(2),p("ngIf",t.isErrorOnField("password")),a(4),b(u(23,33,"Confirm password:")),a(2),p("placeholder",wt(u(25,35,"Enter here..."))),a(2),p("ngIf",t.isErrorOnField("confirmPassword")),a(),p("ngIf",t.isErrorPasswordMatchVisible()),a(),p("ngIf",t.isErrorUserExists()),a(),p("ngIf",t.isErrorUserName()),a(),p("ngIf",t.isErrorMobilePhone()),a(4),p("params",A(41,Fs)),a(2),b(u(37,37,"Back")),a(4),p("disabled",t.isErrorInForm()||t.isErrorPasswordMatch()),a(),y(" ",u(42,39,"Next")," "),a(3),p("params",A(42,sc))}}function ch(n,e){n&1&&(s(0,"p",20),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"This field should be valid and 4 characters minimum")," "))}function ph(n,e){n&1&&(s(0,"p",20),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"This field should be valid and 4 characters minimum")," "))}function dh(n,e){n&1&&(s(0,"div",20),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"You must agree to the terms and conditions before continue")," "))}function mh(n,e){if(n&1){let t=S();s(0,"button",50),P("click",function(){x(t);let o=g(2);return O(o.submitForm())}),f(1),d(2,"translate"),l()}if(n&2){let t=g(2);p("disabled",t.isErrorInForm()),a(),y(" ",u(2,2,"Submit")," ")}}function gh(n,e){if(n&1){let t=S();s(0,"div",42)(1,"h2",5),f(2),d(3,"translate"),l(),s(4,"form",6)(5,"div",7)(6,"label",43),f(7),d(8,"translate"),l(),v(9,"input",44),d(10,"translate"),l(),C(11,ch,3,3,"p",10),s(12,"div",7)(13,"label",45),f(14),d(15,"translate"),l(),v(16,"input",46),d(17,"translate"),l(),C(18,ph,3,3,"p",10),s(19,"div",47),v(20,"lib-terms-checkbox",48),C(21,dh,3,3,"div",10),l()(),s(22,"div",13)(23,"button",33),P("click",function(){x(t);let o=g();return O(o.goTo("login"))}),s(24,"span",15),v(25,"lib-svg-icon",16),l(),s(26,"span",17),f(27),d(28,"translate"),l()(),s(29,"span",18),f(30," 4/4 "),l(),C(31,mh,3,4,"button",49),l()()}if(n&2){let t=g();a(2),y(" ",u(3,14,"Set up a security question and answer")," "),a(2),p("formGroup",t.signUpForm),a(3),b(u(8,16,"Security question:")),a(2),p("placeholder",wt(u(10,18,"Enter here..."))),a(2),p("ngIf",t.isErrorOnField("securityQuestion")),a(3),b(u(15,20,"Security answer:")),a(2),p("placeholder",wt(u(17,22,"Enter here..."))),a(2),p("ngIf",t.isErrorOnField("securityAnswer")),a(3),p("ngIf",t.isErrorOnField("terms")),a(4),p("params",A(26,Fs)),a(2),b(u(28,24,"Back")),a(4),p("ngIf",t.isStepActive("create"))}}var Qm=(()=>{let e=class e extends xs{};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["ng-component"]],standalone:!1,features:[Y],decls:9,vars:7,consts:[[1,"sign-up"],["class","item name",4,"ngIf"],["class","item info",4,"ngIf"],["class","item create",4,"ngIf"],[1,"item","name"],[1,"description"],[3,"formGroup"],[1,"field"],["for","firstName"],["type","text","id","firstName","autocomplete","given-name","formControlName","firstName",3,"placeholder"],["class","error",4,"ngIf"],["for","lastName"],["type","text","id","lastName","autocomplete","family-name","formControlName","lastName",3,"placeholder"],["id","footer",1,"footer"],["routerLink","/guest/login",1,"back"],[1,"arrow"],[3,"params"],[1,"text"],[1,"pagination"],[1,"next",3,"click","disabled"],[1,"error"],[1,"item","info"],["for","email"],["type","email","id","email","autocomplete","email","formControlName","email",3,"placeholder"],["for","mobilePhone"],["type","tel","id","mobilePhone","autocomplete","tel-national","mask","(000)000-0000","formControlName","mobilePhone",3,"placeholder"],["for","birthdate"],["type","date","id","birthdate","autocomplete","bday","formControlName","birthdate",3,"min","max"],[1,"gender","field"],["for","gender"],["id","gender","formControlName","gender","autocomplete","sex",3,"ngClass"],[3,"ngValue","selected"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"back",3,"click"],[3,"ngValue"],["for","username"],["type","text","id","username","autocomplete","username","formControlName","username",3,"placeholder"],["for","password"],["type","password","id","password","autocomplete","new-password","formControlName","password",3,"placeholder"],["for","confirmPassword"],["type","password","id","confirmPassword","autocomplete","new-password","formControlName","confirmPassword",3,"placeholder"],["routerLink","/guest/login"],[1,"item","create"],["for","securityQuestion"],["type","text","id","securityQuestion","autocomplete","off","formControlName","securityQuestion",3,"placeholder"],["for","securityAnswer"],["type","text","id","securityAnswer","autocomplete","off","formControlName","securityAnswer",3,"placeholder"],[1,"terms"],["formControlName","terms"],["class","button",3,"disabled","click",4,"ngIf"],[1,"button",3,"click","disabled"]],template:function(o,r){o&1&&(s(0,"div",0)(1,"main")(2,"h1"),f(3),d(4,"translate"),l(),C(5,Hf,33,31,"div",1)(6,eh,51,56,"div",2)(7,lh,45,43,"div",2)(8,gh,32,27,"div",3),l()()),o&2&&(a(3),y(" ",u(4,5,r.signUpTitle)," "),a(2),p("ngIf",r.isStepActive("name")),a(),p("ngIf",r.isStepActive("info")),a(),p("ngIf",r.isStepActive("login")),a(),p("ngIf",r.isStepActive("create")))},dependencies:[je,An,En,ee,kn,X,Ne,tt,st,Vn,Vo,Xa,Qe,He,ue,F,U,No,T,Fe],styles:[".sign-up[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-content:space-between;padding:0;flex:1}.sign-up[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .sign-up[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;font-size:1.2rem;padding:2rem 0 1rem;line-height:1.5rem;color:#064060;font-family:Roboto-bold,sans-serif;text-align:center}.sign-up[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:1rem;padding:0 1rem;min-height:3rem}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%]{display:flex;height:auto;flex-direction:column;justify-content:left;align-content:flex-start}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .color-grey[_ngcontent-%COMP%]{color:#aaa}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .color-black[_ngcontent-%COMP%]{color:#000}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:visible}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{flex-direction:column;justify-content:stretch;align-items:center;align-content:flex-start;padding:1rem}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid #0D9DC5;align-items:center;margin-top:2.5rem;width:100%;overflow:hidden;min-height:2rem}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field.password[_ngcontent-%COMP%]{margin-bottom:3rem}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{flex:1 0 40%;text-transform:uppercase;font-family:Roboto-bold,sans-serif;font-size:.8rem;line-height:1rem}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;border-radius:4px;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;text-align:right;border:none;padding:.5rem 0;justify-content:flex-end}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button, .sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear, .sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring, .sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{direction:rtl}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{direction:ltr}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] lib-password-complexity-info[_ngcontent-%COMP%]{margin:1rem 0 -1rem}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{display:flex;margin-top:.5rem;line-height:1rem}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%], .sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[type=email][_ngcontent-%COMP%]{text-indent:0}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]{color:#000}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-date-and-time-value{text-align:right;color:#000}.sign-up[_ngcontent-%COMP%] main[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .terms[_ngcontent-%COMP%]{position:relative;margin-top:2rem!important}.sign-up[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > .error[_ngcontent-%COMP%]{padding:0 1rem 1rem}.sign-up[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] > .error[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:1rem}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:1rem;display:flex;justify-content:space-between;align-items:center}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%]{min-width:25%;text-align:center}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .back[_ngcontent-%COMP%], .sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .next[_ngcontent-%COMP%]{width:100%;background-color:#064060;display:flex;color:#fff;font-family:Roboto-bold,sans-serif;align-items:center;padding:.5rem;border-radius:4px}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .back[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .next[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{padding:0}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .back[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%], .sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .next[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{display:flex}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .back[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg, .sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .next[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:1rem;height:1rem;width:2rem;height:2rem}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .back[_ngcontent-%COMP%]:disabled, .sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .next[_ngcontent-%COMP%]:disabled{opacity:.6}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .back[_ngcontent-%COMP%]{background-color:#a7a7a7}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .next[_ngcontent-%COMP%]{justify-content:flex-end}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{justify-content:center;width:50%;box-sizing:border-box;font-family:Roboto-bold;cursor:pointer;min-height:3rem;width:100%;background-color:#064060;display:flex;color:#fff;font-family:Roboto-bold,sans-serif;align-items:center;padding:.5rem;border-radius:4px}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{opacity:.8}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[disabled][_ngcontent-%COMP%]{cursor:default}.sign-up[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:disabled{opacity:.5}"]});let n=e;return n})();var Dr=(function(n){return n.CONFIRMED="confirmed",n.RESCHEDULED="rescheduled",n})(Dr||{});var uh=()=>({name:"plus",color:"currentColor"}),fh=()=>({name:"ok",color:"currentColor"});function hh(n,e){if(n&1){let t=S();s(0,"button",3),P("click",function(){x(t);let o=g(3);return O(o.addToWaitlist())}),s(1,"span",4),v(2,"lib-svg-icon",5),l(),s(3,"span"),f(4),d(5,"translate"),l()()}if(n&2){let t=g(3);a(2),p("params",A(4,uh)),a(2),b(u(5,2,t.linkText))}}function _h(n,e){if(n&1&&(s(0,"div",6)(1,"span",4),v(2,"lib-svg-icon",5),l(),s(3,"span",7),f(4),d(5,"translate"),l()()),n&2){let t=g(3);a(2),p("params",A(4,fh)),a(2),y(" ",u(5,2,t.linkText)," ")}}function Ch(n,e){if(n&1&&(se(0),C(1,hh,6,5,"button",2)(2,_h,6,5,"ng-template",null,0,pe),le()),n&2){let t=V(3),i=g(2);a(),p("ngIf",!i.isInWaitlist)("ngIfElse",t)}}function vh(n,e){if(n&1&&(se(0),C(1,Ch,4,2,"ng-container",1),le()),n&2){let t=g();a(),p("ngIf",!t.isHidden)}}var Jo=(()=>{let e=class e{constructor(i,o,r){this.clinicPublicApiService=i,this.appointmentApiService=o,this.waitlistService=r,this.isProviderView=!1,this.linkText="JOIN WAITLIST",this.isHidden=!1}ngOnInit(){this.isWaitlistAvailable$=this.clinicPublicApiService.isClinicModuleActive(this.clinicUuid,ei.WAITLIST).pipe(L(i=>i?Ft([this.waitlistService.isConsultationTypeEnabled(this.clinicUuid,this.consultationTypeId),this.waitlistService.isWaitlistHiddenByPatientSource(this.clinicUuid)]).pipe(re(([o,r])=>o&&!r)):me(!1)))}ngOnChanges(){this.isHidden=lt.createDateAdapter(this.startAt).isSame(lt.createDateAdapter(),"day"),this.isProviderView?this.isInWaitlist?this.linkText="ADDED TO WAITLIST":this.linkText="ADD TO WAITLIST":this.isInWaitlist?this.linkText="JOINED WAITLIST":this.linkText="JOIN WAITLIST"}addToWaitlist(){this.appointmentApiService.addToWaitlist(this.clinicUuid,this.appointmentId).subscribe(()=>{this.isInWaitlist=!0,this.ngOnChanges()})}};e.\u0275fac=function(o){r
2eturn new(o||e)(h(Yt),h(Ct),h(ld))},e.\u0275cmp=w({type:e,selectors:[["lib-add-to-waitlist"]],inputs:{clinicUuid:"clinicUuid",appointmentId:"appointmentId",consultationTypeId:"consultationTypeId",startAt:"startAt",timezone:"timezone",isInWaitlist:"isInWaitlist",isProviderView:"isProviderView"},features:[wn],decls:2,vars:3,consts:[["addedToWaitlistTemplate",""],[4,"ngIf"],["class","link","type","button",3,"click",4,"ngIf","ngIfElse"],["type","button",1,"link",3,"click"],[1,"icon-background"],[3,"params"],[1,"on-waitlist-label"],["role","status","aria-atomic","true"]],template:function(o,r){o&1&&(C(0,vh,2,1,"ng-container",1),d(1,"async")),o&2&&p("ngIf",u(1,1,r.isWaitlistAvailable$))},dependencies:[In,F,U,Fe,T],styles:["[_nghost-%COMP%]{display:block}button[_ngcontent-%COMP%], .on-waitlist-label[_ngcontent-%COMP%]{font-size:.75rem;letter-spacing:.0275rem;display:flex;align-items:center;line-height:1}button[_ngcontent-%COMP%] .icon-background[_ngcontent-%COMP%], .on-waitlist-label[_ngcontent-%COMP%] .icon-background[_ngcontent-%COMP%]{background-color:#06406026;border-radius:50%;padding:5px;margin-right:5px}button[_ngcontent-%COMP%] .icon-background[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg, .on-waitlist-label[_ngcontent-%COMP%] .icon-background[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:1rem;height:1rem}.on-waitlist-label[_ngcontent-%COMP%]{color:#064060;font-family:Roboto-bold,sans-serif}.on-waitlist-label[_ngcontent-%COMP%] .icon-background[_ngcontent-%COMP%]{background-color:#00a85a26;color:#00a85a}"]});let n=e;return n})();var Ls=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["lib-appointment-provider-details"]],inputs:{appointment:"appointment"},decls:9,vars:4,consts:[[1,"icon-wrapper"],[3,"src"],[1,"main-details"],[1,"doctor-name"],[1,"appointment-location"],[1,"additional-info"]],template:function(o,r){o&1&&(s(0,"div",0),v(1,"lib-avatar-image",1),l(),s(2,"div",2)(3,"p",3),f(4),l(),s(5,"p",4),f(6),l(),s(7,"p",5),f(8),l()()),o&2&&(a(),p("src",r.appointment.doctorImage),a(3),b(r.appointment.doctorName),a(2),y(" ",r.appointment.locationName||r.appointment.departmentName," "),a(2),y(" ",r.appointment.consultationTypeTitle||r.appointment.clinicName," "))},dependencies:[ti,Ve],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row}.icon-wrapper[_ngcontent-%COMP%]{--avatar-image-size: 2.5rem;margin-right:.625rem}.main-details[_ngcontent-%COMP%]{flex:1;letter-spacing:.0325rem;font-size:1rem;line-height:1.25rem}.doctor-name[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.appointment-location[_ngcontent-%COMP%], .additional-info[_ngcontent-%COMP%]{margin-top:.25rem}"]});let n=e;return n})();var Ph=()=>({name:"location-outline",color:"#3C9F76"});function Mh(n,e){if(n&1&&(se(0),s(1,"div",1),v(2,"lib-svg-icon",2),l(),s(3,"div",3)(4,"p",4),f(5),d(6,"translate"),l(),v(7,"lib-address",5)(8,"lib-map-link",5),l(),le()),n&2){let t=e.ngIf;a(2),p("params",A(6,Ph)),a(3),y(" ",u(6,4,"Location and Contact Details")," "),a(2),p("address",t),a(),p("address",t)}}var Hm=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["lib-appointment-location-details"]],inputs:{appointment:"appointment"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"icon-wrapper"],[3,"params"],[1,"content-wrapper"],[1,"section-title"],[3,"address"]],template:function(o,r){o&1&&C(0,Mh,9,7,"ng-container",0),o&2&&p("ngIf",r.appointment.address)},dependencies:[In,F,ti,Pd,Md,Nn,U,T],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row}.icon-wrapper[_ngcontent-%COMP%]{width:2.5rem;margin-right:.625rem;justify-content:center;display:flex}.icon-wrapper[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{align-self:center}.icon-wrapper[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{overflow:visible;width:2rem;height:2.125rem}.content-wrapper[_ngcontent-%COMP%]{flex:1;letter-spacing:.0325rem;line-height:1.5rem;font-size:1rem;min-width:0}.content-wrapper[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}"]});let n=e;return n})();var xh=()=>({name:"attachment-light",color:"#3C9F76"}),Oh=()=>({name:"warning-triangle",color:"#3C9F76"});function wh(n,e){if(n&1&&(s(0,"li")(1,"a",10),d(2,"apiLink"),d(3,"async"),f(4),l()()),n&2){let t=e.$implicit;a(),p("href",wt(u(3,5,u(2,3,t.href))),Kt),a(3),y(" ",t.fileName," ")}}function Sh(n,e){if(n&1&&(s(0,"section",3)(1,"div",4),v(2,"lib-svg-icon",5),l(),s(3,"div",6)(4,"p",7),f(5),d(6,"translate"),l(),s(7,"div",8)(8,"ul"),C(9,wh,5,7,"li",9),l()()()()),n&2){let t=g();a(2),p("params",A(5,xh)),a(3),b(u(6,3,"Attachments")),a(4),p("ngForOf",t.appointment.attachments)}}function Ih(n,e){if(n&1&&(s(0,"section",11)(1,"div",4),v(2,"lib-svg-icon",5),l(),s(3,"div",6)(4,"p",7),f(5),d(6,"translate"),l(),s(7,"p"),f(8),l()()()),n&2){let t=g();a(2),p("params",A(5,Oh)),a(3),b(u(6,3,"Important")),a(3),b(t.appointment.consultationTypeMessage)}}function Th(n,e){if(n&1&&(s(0,"section",12),v(1,"lib-appointment-location-detail
2s",13),l()),n&2){let t=g();a(),p("appointment",t.appointment)}}var Ds=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["lib-appointment-extra-details"]],inputs:{appointment:"appointment"},decls:3,vars:3,consts:[["class","details-section attachments",4,"ngIf"],["class","details-section important",4,"ngIf"],["class","details-section address",4,"ngIf"],[1,"details-section","attachments"],[1,"icon-wrapper"],[3,"params"],[1,"content-wrapper"],[1,"section-title"],[1,"attachments"],[4,"ngFor","ngForOf"],["target","_blank",1,"link",3,"href"],[1,"details-section","important"],[1,"details-section","address"],[3,"appointment"]],template:function(o,r){o&1&&C(0,Sh,10,6,"section",0)(1,Ih,9,6,"section",1)(2,Th,2,1,"section",2),o&2&&(p("ngIf",r.appointment.attachments&&r.appointment.attachments.length>0),a(),p("ngIf",r.appointment.consultationTypeMessage),a(),p("ngIf",r.appointment.address))},dependencies:[In,ue,F,ti,Nn,U,Hm,Fe,Ea,T],styles:[".details-section[_ngcontent-%COMP%]{display:flex;margin-bottom:1.25rem}.details-section[_ngcontent-%COMP%]:last-child{margin-bottom:0}.details-section[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%]{width:2.5rem;margin-right:.625rem;justify-content:center;display:flex}.details-section[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{align-self:center}.details-section[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{overflow:visible}.details-section[_ngcontent-%COMP%] .content-wrapper[_ngcontent-%COMP%]{flex:1;letter-spacing:.0325rem;line-height:1.5rem;font-size:1rem;min-width:0}.details-section[_ngcontent-%COMP%] .content-wrapper[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.details-section.attachments[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:#064060;font-family:Roboto-bold,sans-serif}.details-section.attachments[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:1.875rem;height:1.825rem}.details-section.important[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{height:1.875rem;width:1.875rem}"]});let n=e;return n})();var Ah=()=>({name:"trash-new",color:"#949494"}),Eh=()=>({name:"checked-in-pre",color:"#00A85A"}),Fh=()=>({name:"heart",color:"#FF0013"}),Lh=()=>({name:"video-outline",color:"#3C9F76"});function Dh(n,e){if(n&1&&(se(0),s(1,"h1",8),f(2),d(3,"translate"),l(),s(4,"p",9),f(5),d(6,"translate"),l(),le()),n&2){let t=g(2);a(2),y(" ",u(3,2,"Visit"+(t.appointmentsStartAt.length>1?"s":"")+t.statusString)," "),a(3),y(" ",u(6,4,"Please find below a summary of your visit details")," ")}}function Bh(n,e){if(n&1&&(se(0),C(1,Dh,7,6,"ng-container",7),le()),n&2){let t=g();a(),p("ngIf",t.appointmentsStartAt)}}function Rh(n,e){n&1&&(s(0,"h1",8),f(1),d(2,"translate"),l(),s(3,"p",9),f(4),d(5,"translate"),l()),n&2&&(a(),b(u(2,2,"Visit details")),a(3),y(" ",u(5,4,"Please find below all the details for your upcoming visit")," "))}function Vh(n,e){if(n&1&&v(0,"lib-add-to-waitlist",18),n&2){let t=g(2);p("clinicUuid",t.appointment.clinicUuid)("appointmentId",t.appointment.id)("consultationTypeId",t.appointment.consultationTypeId)("startAt",t.appointment.startAt)("timezone",t.appointment.timezone)("isInWaitlist",t.appointment.isInWaitList)}}function Nh(n,e){if(n&1){let t=S();s(0,"div",20)(1,"button",21),d(2,"translate"),P("click",function(o){x(t);let r=g(3);return O(r.cancelAppointment(o))}),v(3,"lib-svg-icon",22),l()()}n&2&&(a(),G("aria-label",u(2,2,"Cancel appointment")),a(2),p("params",A(4,Ah)))}function Uh(n,e){if(n&1&&(se(0),C(1,Nh,4,5,"div",19),le()),n&2){let t=g(2);a(),p("ngIf",t.appointment.isCancellable&&t.appointment.canPatientCancel)}}function qh(n,e){if(n&1&&(s(0,"li",24),f(1),d(2,"applyTimezone"),d(3,"c4uDate"),l()),n&2){let t=g().$implicit,i=g(2);Z("failed",i.failedStartAt.includes(i.appointmentsStartAt[t])),a(),y(" ",D(3,6,D(2,3,i.appointmentsStartAt[t],i.appointment.timezone),"document_full")," ")}}function zh(n,e){if(n&1&&(se(0),C(1,qh,4,9,"li",23),le()),n&2){let t=e.$implicit,i=g(2);a(),p("ngIf",i.appointmentsStartAt[t])}}function jh(n,e){if(n&1){let t=S();
2s(0,"button",29),P("click",function(){x(t);let o=g(4);return O(o.doCheckIn())}),f(1),d(2,"translate"),l()}n&2&&(a(),y(" ",u(2,1,"COMPLETE TASKS")," "))}function Wh(n,e){n&1&&(s(0,"p",32),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"You are all set")," "))}function Qh(n,e){if(n&1&&(s(0,"span",30),v(1,"lib-svg-icon",22),C(2,Wh,3,3,"p",31),l()),n&2){let t=g(4);a(),p("params",A(2,Eh)),a(),p("ngIf",t.brandConfigService.isBrandQuickCheckIn())}}function Gh(n,e){if(n&1&&(s(0,"div",26),_e(1,jh,3,3,"button",27),d(2,"isPreCheckInWithUndoneTasks"),C(3,Qh,3,3,"span",28),d(4,"isPreCheckInWithAllTasksDone"),l()),n&2){let t=g(3);a(),Ce(t.isCheckInButtonVisible&&(!t.appointment.isPreCheckIn||u(2,2,t.appointment))?1:-1),a(2),p("ngIf",u(4,4,t.appointment))}}function Hh(n,e){if(n&1){let t=S();s(0,"section",34)(1,"div",35),v(2,"lib-svg-icon",22),l(),s(3,"div",12)(4,"p",36),f(5),d(6,"translate"),l(),s(7,"a",37),P("click",function(){x(t);let o=g(4);return O(o.goToDashboard())}),f(8),d(9,"translate"),l()()()}n&2&&(a(2),p("params",A(7,Fh)),a(3),y(" ",u(6,3,"Prepare for your visit")," "),a(3),b(u(9,5,"Click here to see your tasks")))}function $h(n,e){if(n&1&&C(0,Hh,10,8,"section",33),n&2){let t=g(3);p("ngIf",!t.appointment.isNewCheckIn)}}function Kh(n,e){if(n&1&&(se(0),C(1,Gh,5,6,"div",25)(2,$h,1,1,"ng-template",null,1,pe),le()),n&2){let t=V(3),i=g(2);a(),p("ngIf",i.appointment.isNewCheckIn)("ngIfElse",t)}}function Yh(n,e){if(n&1&&(s(0,"div",39),v(1,"lib-video-call",40),d(2,"translate"),l()),n&2){let t=g(3);a(),p("videoCallText",wt(u(2,4,"START VIDEO HERE")))("iconParams",A(6,Lh))("appointment",t.appointment)}}function Xh(n,e){if(n&1&&(se(0),C(1,Yh,3,7,"div",38),le()),n&2){let t=g(2);a(),p("ngIf",t.appointment.type==="video_call")}}function Zh(n,e){if(n&1&&(s(0,"div",10)(1,"section",11)(2,"div",12),v(3,"lib-appointment-provider-details",13),C(4,Vh,1,6,"lib-add-to-waitlist",14),l(),C(5,Uh,2,1,"ng-container",7),l(),v(6,"div",15),s(7,"ul",16),C(8,zh,2,1,"ng-container",17),l(),C(9,Kh,4,2,"ng-container",7),v(10,"lib-appointment-extra-details",13),C(11,Xh,2,1,"ng-container",7),l()),n&2){let t=g();a(3),p("appointment",t.appointment),a(),p("ngIf",!t.isProviderView&&!t.isQuickLinkApp),a(),p("ngIf",!t.isSummaryDetailsPage),a(3),p("libRepeat",t.appointmentsStartAt.length),a(),p("ngIf",!t.isSummaryDetailsPage||t.statusChangedTo==="confirmed"),a(),p("appointment",t.appointment),a(),p("ngIf",!t.isSummaryDetailsPage||t.statusChangedTo==="confirmed")}}function Jh(n,e){if(n&1){let t=S();s(0,"button",41),P("click",function(){x(t);let o=g();return O(o.viewAllAppointments())}),f(1),d(2,"translate"),l()}n&2&&(a(),y(" ",u(2,1,"VIEW ALL VISITS")," "))}function e_(n,e){if(n&1&&v(0,"lib-add-to-waitlist",42),n&2){let t=g();p("isProviderView",!0)("clinicUuid",t.appointment.clinicUuid)("appointmentId",t.appointment.id)("consultationTypeId",t.appointment.consultationTypeId)("startAt",t.appointment.startAt)("timezone",t.appointment.timezone)("isInWaitlist",!1)}}var cc=(()=>{let e=class e{constructor(i,o,r,c,m,_,M,I,k,R,N){this.appointmentApiService=i,this.clinicModuleActiveService=o,this.activatedRoute=r,this.route=c,this.modalWindowService=m,this.redirectTaskService=_,this.configService=M,this.router=I,this.brandConfigService=k,this.userService=R,this.checkInFlowService=N,this.queryParams=this.activatedRoute.snapshot.queryParams,this.isSummaryDetailsPage=!!this.activatedRoute.snapshot.data.isSummaryDetailsPage,this.appointmentsStartAt=null,this.failedStartAt=this.queryParams.failedStartAt?[this.queryParams.failedStartAt].flat(1):[],this.isProviderView=!1,this.isQuickLinkApp=this.configService.isQuicklinkApp(),this.statusChangedTo=this.queryParams.status,this.statusString=" scheduled!",this.isCheckInButtonVisible=!0}ngOnInit(){let i=this.isSummaryDetailsPage?this.queryParams.appointmentId:this.activatedRoute.snapshot.params.appointmentId;this.appointmentApiService.get(i).subscribe(o=>{this.appointment=o,this.appointmentsStartAt=this.queryParams.startAt||[o.startAt],this.queryParams.status==="rescheduled"?this.statusString=" rescheduled!":this.appointment.confirmationStatusChangedAt&&(this.statusString=" confirmed!"),this.loadCheckInButtonVisibility(o)}),this.isProviderView=this.userService.isDefaultUserRoleProvider()}loadCheckInButtonVisibility(i){let o=this.statusChangedTo===Dr.CONFIRMED;!i.isNewCheckIn||!i.clinicUuid||!o||this.clinicModuleActiveService.isModuleActive(i.clinicUuid,ei.HIDE_CHECK_IN_BUTTON_WITH_REBOOK).pipe(Pt(()=>me(!1))).subscribe(r=>this.isCheckInButtonVisible=!r)}doCheckIn(){this.checkInFlowService.startSingleAppointmentCheckIn(this.appointment)}cancelAppointment(i){i.stopPropagation(),this.modalWindowService.confirm("Are you sure you want to cancel this appointment?","Warning","YES, CANCEL","NO, GO BACK").pipe(ge(Boolean),L(()=>
2this.appointmentApiService.delete(this.appointment.id))).subscribe(()=>this.route.navigate(["/user/appointment"]))}goToDashboard(){this.redirectTaskService.clearCachedData(),this.redirectTaskService.setAppointmentId(this.appointment.id),this.route.navigate(["/user/task"])}viewAllAppointments(){let i=this.userService.isDefaultUserRoleUser()?"/user/appointment":`/provider/patient/${this.appointment.patientId}/appointments`;this.router.navigateByUrl(i)}};e.\u0275fac=function(o){return new(o||e)(h(Ct),h(yr),h(j),h(B),h(rt),h(mt),h(oe),h(B),h(ci),h(De),h(St))},e.\u0275cmp=w({type:e,selectors:[["app-appointment-details"]],standalone:!1,decls:7,vars:7,consts:[["commonDetailsPageHeaderTpl",""],["oldCheckInTpl",""],[1,"appointment-details-page"],[4,"ngIf","ngIfElse"],["class","appointment-details-container",4,"ngIf"],["libButton","","class","view-all-button","type","button",3,"click",4,"ngIf"],["class","provider-add-to-waitlist",3,"isProviderView","clinicUuid","appointmentId","consultationTypeId","startAt","timezone","isInWaitlist",4,"ngIf"],[4,"ngIf"],[1,"page-title"],[1,"page-description"],[1,"appointment-details-container"],[1,"details-section","appointment"],[1,"content-wrapper"],[3,"appointment"],[3,"clinicUuid","appointmentId","consultationTypeId","startAt","timezone","isInWaitlist",4,"ngIf"],[1,"separator-line"],[1,"appointment-date-list"],[4,"libRepeat"],[3,"clinicUuid","appointmentId","consultationTypeId","startAt","timezone","isInWaitlist"],["class","button-wrapper",4,"ngIf"],[1,"button-wrapper"],["type","button",1,"cancel-appointment-button",3,"click"],[3,"params"],["class","appointment-date",3,"failed",4,"ngIf"],[1,"appointment-date"],["class","new-check-in-actions",4,"ngIf","ngIfElse"],[1,"new-check-in-actions"],["libButton","","type","button",1,"start-checkin-button"],["class","pre-check-in-wrapper",4,"ngIf"],["libButton","","type","button",1,"start-checkin-button",3,"click"],[1,"pre-check-in-wrapper"],["class","message",4,"ngIf"],[1,"message"],["class","details-section tasks",4,"ngIf"],[1,"details-section","tasks"],[1,"icon-wrapper"],[1,"section-title"],[1,"link",3,"click"],["class","start-videocall-action",4,"ngIf"],[1,"start-videocall-action"],[3,"videoCallText","iconParams","appointment"],["libButton","","type","button",1,"view-all-button",3,"click"],[1,"provider-add-to-waitlist",3,"isProviderView","clinicUuid","appointmentId","consultationTypeId","startAt","timezone","isInWaitlist"]],template:function(o,r){if(o&1&&(s(0,"div",2),C(1,Bh,2,1,"ng-container",3)(2,Rh,6,6,"ng-template",null,0,pe)(4,Zh,12,7,"div",4)(5,Jh,3,3,"button",5)(6,e_,1,7,"lib-add-to-waitlist",6),l()),o&2){let c=V(3);Z("wrap",r.brandConfigService.isBrandQuickCheckIn()),a(),p("ngIf",r.isSummaryDetailsPage)("ngIfElse",c),a(3),p("ngIf",r.appointment),a(),p("ngIf",r.isSummaryDetailsPage&&r.appointment&&!r.statusChangedTo),a(),p("ngIf",r.appointment&&r.isProviderView)}},dependencies:[so,F,U,ve,Jo,Ls,Ds,ps,Je,ct,T,id,xd],styles:["[_nghost-%COMP%]{width:100%;height:100%;overflow:auto;display:flex;background-color:#80808014}.care-manager-common[_nghost-%COMP%] .view-all-button[_ngcontent-%COMP%]:not(:disabled):hover, .care-manager-common [_nghost-%COMP%] .view-all-button[_ngcontent-%COMP%]:not(:disabled):hover{opacity:.7}.appointment-details-page[_ngcontent-%COMP%]{width:100%;padding:1.25rem 1rem 3.5rem;overflow:auto}.quick-link-app[_nghost-%COMP%] .appointment-details-page[_ngcontent-%COMP%], .quick-link-app [_nghost-%COMP%] .appointment-details-page[_ngcontent-%COMP%]{overflow:initial;height:fit-content}.page-title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;font-size:1.125rem;line-height:1.375rem;letter-spacing:.0325rem;color:#064060;text-align:center}.page-description[_ngcontent-%COMP%]{color:#505050;margin:1rem 1.25rem 1.75rem;font-size:1rem;text-align:left;line-height:1.5rem}.appointment-date-list[_ngcontent-%COMP%]:not(:empty){margin-bottom:1.25rem}.appointment-date-list[_ngcontent-%COMP%]:not(:empty) + [_ngcontent-%COMP%]:not(.new-check-in-actions){margin-top:1rem}.appointment-date[_ngcontent-%COMP%]{line-height:1.125rem;font-size:1rem;font-family:Roboto-bold,sans-serif;letter-spacing:.0325rem;text-align:center}.appointment-date[_ngcontent-%COMP%] + .appointment-date[_ngcontent-%COMP%]{margin-top:.625rem}.appointment-date.failed[_ngcontent-%COMP%]{color:#de000d}.appointment-info-wrapper[_ngcontent-%COMP%]{display:flex}.button-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.button-wrapper[_ngcontent-%COMP%] .cancel-appointment-button[_ngcontent-%COMP%]{background:none;padding:.5rem;transform:translate(.5rem)}.button-wrapper[_ngcontent-%COMP%] .cancel-appointment-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:.875rem;height:1.125rem}.appointment-details-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:.75rem 1.25rem .25rem;border-radius:8px;background-color:#fff}.appointment-details-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%]{display:flex;margin-bottom:1.25rem}.appointment-details-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%]{width:2.5rem;margin-right:.625rem;justify-content:center;display:flex}.appointment-details-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{align-self:center}.appointment-details-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{overflow:visible}.appointment-details-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .content-wrapper[_ngcontent-%COMP%]{flex:1;letter-spacing:.0325rem;line-height:1.5rem;font-size:1rem;min-width:0}.appointment-details-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .content-wrapper[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.appointment-details-container[_ngcontent-%COMP%] .details-section.appointment[_ngcontent-%COMP%]{margin-bottom:1rem;justify-content:space-between}.appointment-details-container[_ngcontent-%COMP%] .details-section.appointment[_ngcontent-%COMP%] lib-add-to-waitlist[_ngcontent-%COMP%]{margin-top:.25rem;margin-left:3.125rem}.appointment-details-container[_ngcontent-%COMP%] .details-section.attachments[_ngcontent-%COMP%] .link[_ngcontent-%COMP%], .appointment-details-container[_ngcontent-%COMP%] .details-section.tasks[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:#064060;font-family:Roboto-bold,sans-serif}.appointment-details-container[_ngcontent-%COMP%] .details-section.tasks[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:2rem;height:2rem}.appointment-details-container[_ngcontent-%COMP%] .separator-line[_ngcontent-%COMP%]{width:calc(100% + 2.5rem);height:1px;background-color:#80808033;transform:translate(-1.25rem);margin-bottom:1rem}.appointment-details-container[_ngcontent-%COMP%] .new-check-in-actions[_ngcontent-%COMP%]{margin:0 auto 1.25rem}.appointment-details-container[_ngcontent-%COMP%] .new-check-in-actions[_ngcontent-%COMP%] .pre-check-in-wrapper[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:9rem;height:1.875rem}.appointment-details-container[_ngcontent-%COMP%] .new-check-in-actions[_ngcontent-%COMP%] .pre-check-in-wrapper[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{line-height:1.5rem;font-size:1.125rem;text-align:center;font-family:Roboto-bold,sans-serif;margin-top:.25rem;letter-spacing:.0275rem}.appointment-details-container[_ngcontent-%COMP%] .start-videocall-action[_ngcontent-%COMP%] lib-video-call[_ngcontent-%COMP%] a{width:auto}.appointment-details-container[_ngcontent-%COMP%] .start-videocall-action[_ngcontent-%COMP%] lib-video-call[_ngcontent-%COMP%] .icon{width:2.5rem;display:flex;justify-content:center}.appointment-details-container[_ngcontent-%COMP%] .start-videocall-action[_ngcontent-%COMP%] lib-video-call[_ngcontent-%COMP%] svg{max-height:1.875rem;width:1.875rem;height:1.875rem}.appointment-details-container[_ngcontent-%COMP%] .start-videocall-action[_ngcontent-%COMP%] lib-video-call[_ngcontent-%COMP%] .text{margin-left:.625rem;line-height:1.5rem;font-size:.875rem;font-family:Roboto-bold,sans-serif;color:#064060;letter-spacing:.0275rem}
2lib-appointment-extra-details[_ngcontent-%COMP%]{margin-bottom:1.25rem}.start-checkin-button[_ngcontent-%COMP%], .view-all-button[_ngcontent-%COMP%]{width:auto}.start-checkin-button[_ngcontent-%COMP%]{min-width:15rem;padding-left:1rem;padding-right:1rem}.view-all-button[_ngcontent-%COMP%]{width:15rem;margin:3.5rem auto 0}.provider-add-to-waitlist[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin:1.5rem auto 0}@media(min-width:700px){.appointment-details-page[_ngcontent-%COMP%], .appointment-details-container[_ngcontent-%COMP%]{padding-right:2.5rem;padding-left:2.5rem}.appointment-details-page[_ngcontent-%COMP%] .separator-line[_ngcontent-%COMP%], .appointment-details-container[_ngcontent-%COMP%] .separator-line[_ngcontent-%COMP%]{width:calc(100% + 5rem);transform:translate(-2.5rem)}.page-description[_ngcontent-%COMP%]{margin-left:1.25rem;margin-right:1.25rem}}"]});let n=e;return n})();function t_(n,e){if(n&1&&(s(0,"header")(1,"div",1),v(2,"lib-avatar-image",2),s(3,"div",3)(4,"p",4),f(5),l(),s(6,"p",5),f(7),l(),s(8,"p",6),f(9),l()()()()),n&2){let t=g();a(2),p("src",t.provider.image)("name",t.provider.firstName),a(3),b(t.provider.name),a(2),b(t.locationName||(t.department==null?null:t.department.name)),a(2),b(t.consultationType==null?null:t.consultationType.text)}}var er=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["app-appointment-create-provider-header"]],inputs:{provider:"provider",department:"department",locationName:"locationName",consultationType:"consultationType"},standalone:!1,decls:1,vars:1,consts:[[4,"ngIf"],[1,"appointment-data-container"],[1,"provider-image",3,"src","name"],[1,"appointment-data"],[1,"provider-name"],[1,"department-name"],[1,"consultation-type"]],template:function(o,r){o&1&&C(0,t_,10,5,"header",0),o&2&&p("ngIf",r.provider)},dependencies:[Ve,F],styles:["header[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid rgba(128,128,128,.2)}.appointment-data-container[_ngcontent-%COMP%]{display:flex;padding:1.25rem}.provider-image[_ngcontent-%COMP%]{--avatar-image-size: 2.5rem;margin-right:.625rem}.appointment-data[_ngcontent-%COMP%]{font-size:1rem;line-height:1.125;letter-spacing:.0325rem}.provider-name[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.department-name[_ngcontent-%COMP%], .consultation-type[_ngcontent-%COMP%]{margin-top:.25rem}@media only screen and (max-height:460px){.appointment-data-container[_ngcontent-%COMP%]{padding:.25rem}.appointment-data[_ngcontent-%COMP%]{font-size:.75rem}}"]});let n=e;return n})();function i_(n,e){if(n&1&&(s(0,"h4",6),f(1),d(2,"applyTimezone"),d(3,"c4uDate"),l()),n&2){let t=e.$implicit,i=g(2);a(),y(" ",D(3,4,D(2,1,i.appointmentsStartAt[t],i.department.timezone),"document_full")," ")}}function n_(n,e){if(n&1){let t=S();s(0,"form",7),P("ngSubmit",function(){x(t);let o=g(2);return O(o.confirmScheduling())}),s(1,"div",8)(2,"label",9),f(3),d(4,"translate"),l(),s(5,"div",10)(6,"textarea",11),P("focus",function(){x(t);let o=g(2);return O(o.isReasonFieldFocused=!0)})("blur",function(){x(t);let o=g(2);return O(o.isReasonFieldFocused=!1)}),f(7," "),l()(),s(8,"p",12),f(9),l()(),s(10,"button",13),f(11),d(12,"translate"),l()()}if(n&2){let t=g(2);p("formGroup",t.reasonForm),a(3),b(u(4,10,"Reason")),a(2),Z("has-error",!!t.reasonCommentControl.errors)("has-focus",t.isReasonFieldFocused),a(4),Vt(" ",t.reasonComment==null?null:t.reasonComment.length," / ",t.consultationType.commentLength," "),a(),p("disabled",!t.isReasonCommentValid()),a(),y(" ",u(12,12,"SCHEDULE NOW")," ")}}function o_(n,e){if(n&1&&(s(0,"div",2),C(1,i_,4,7,"h4",3),s(2,"p",4),f(3),d(4,"translate"),l(),C(5,n_,13,14,"form",5),l()),n&2){let t=g();a(),p("libRepeat",t.appointmentsStartAt.length),a(2),y(" ",u(4,3,"Please enter details about the reason for your visit")," "),a(2),p("ngIf",t.consultationType)}}var $m=(()=>{let e=class e{get reasonComment(){return this.reasonForm?.get("reasonComment").value}get reasonCommentControl(){return this.reasonForm.get("reasonComment")}constructor(i,o,r,c,m,_,M,I,k,R,N){this.activatedRoute=i,this.providerPublicApiService=o,this.clinicApiService=r,this.clinicPublicApiService=c,this.departmentApiService=m,this.appointmentCreateNavigationService=_,this.dateTimeService=M,this.appointmentApiService=I,this.userService=k,this.formBuilder=R,this.configService=N,this.queryParams=this.activatedRoute.snapshot.queryParams,this.isCareManagerApp=this.configService.isCareManagerApp(),this.appointmentsStartAt=[this.queryParams.startAt].flat(1),this.isReasonFieldFocused=!1}ngOnInit(){let{clinicUuid:i,providerId:o,consultationTypeId:r,departmentId:c,locationId:m}=this.queryParams;Ft([this.providerPublicApiService.getDoctorById(i,o,this.isCareManagerApp?{}:{usageType:"self_scheduling"}),this.departmentApiService.getDepartmentByUuid(i,c),this.clinicApiService.getConsultationTypeById(i,+r,z({providerId:o,departmentUuid:c},this.isCareManagerApp?{booking:"internal"}:{})),m?this.clinicPublicApiService.getLocationName(i,m,c):me("")]).subscribe(([_,M,I,k])=>{this.provider=_,this.department=M,this.consultationType=I,this.locationName=k,this.initReasonForm(I)})}initReasonForm(i){this.reasonForm=this.formBuilder.group({reasonComment:["",[at.maxLength(i.commentLength)]]})}isReasonCommentValid(){return(this.consultationType.isCommentRequired?this.reasonComment.trim().length:!0)&&this.reasonForm.valid}
2getCreateAppointmentParams(i,o,r){let{clinicUuid:c,departmentId:m,locationId:_,providerId:M,consultationTypeId:I,specialtyId:k,userId:R}=this.queryParams,N=this.dateTimeService.format(this.dateTimeService.getUtcDate(i),"iso8601offset"),W=this.dateTimeService.format(this.dateTimeService.getUtcDate(o),"iso8601offset"),K={clinicUuid:c,departmentUuid:m,providerId:M,consultationTypeId:I,startAt:N,finishAt:W,externalId:r,flexibleDayList:[]};return this.userService.isDefaultUserRoleProvider()?K.userId=R:K.source="self_scheduling",this.reasonComment.trim()&&(K.text=this.reasonComment),_&&(K.locationId=_),k&&(K.specialtyId=Number(k)),K}confirmScheduling(){this.isReasonCommentValid()&&(Array.isArray(this.queryParams.startAt)&&this.isCareManagerApp?this.clinicApiService.isClinicModuleActive(this.queryParams.clinicUuid,ei.RECURRING_VISIT).pipe(ge(Boolean)).subscribe(()=>this.scheduleMultipleAppointments()):this.scheduleSingleAppointment())}scheduleMultipleAppointments(){let{startAt:i,finishAt:o,externalId:r}=this.queryParams,c=i.map((m,_)=>this.appointmentApiService.create(this.getCreateAppointmentParams(m,o[_],r[_])).pipe(re(M=>({appointmentId:M,appointmentStartAt:m})),Pt(()=>me({appointmentId:-1,appointmentStartAt:m}))));Ft(c).subscribe(m=>{let _=m.find(({appointmentId:I})=>I>-1)?.appointmentId,M=m.filter(({appointmentId:I})=>I===-1).map(({appointmentStartAt:I})=>I);_&&this.appointmentCreateNavigationService.goToSummaryPage(this.queryParams.clinicUuid,_,+this.queryParams.patientId,i,M)})}scheduleSingleAppointment(){let{startAt:i,finishAt:o,externalId:r}=this.queryParams;this.appointmentApiService.create(this.getCreateAppointmentParams(i,o,r)).subscribe(c=>this.appointmentCreateNavigationService.goToSummaryPage(this.queryParams.clinicUuid,c,this.queryParams.patientId?+this.queryParams.patientId:0))}};e.\u0275fac=function(o){return new(o||e)(h(j),h(wi),h(Te),h(Yt),h(li),h(Ge),h(lt),h(Ct),h(De),h(Nt),h(oe))},e.\u0275cmp=w({type:e,selectors:[["app-appointment-create-confirm"]],standalone:!1,decls:2,vars:5,consts:[[3,"consultationType","department","locationName","provider"],["class","reason-form-container",4,"ngIf"],[1,"reason-form-container"],["class","appointment-date",4,"libRepeat"],[1,"reason-form-description"],[3,"formGroup","ngSubmit",4,"ngIf"],[1,"appointment-date"],[3,"ngSubmit","formGroup"],[1,"reason-field-card"],["for","reason-field",1,"reason-field-label"],[1,"reason-field-wrapper"],["id","reason-field","formControlName","reasonComment",1,"reason-field",3,"focus","blur"],[1,"reason-comment-length"],["libButton","","type","submit",1,"confirm-button",3,"disabled"]],template:function(o,r){o&1&&(v(0,"app-appointment-create-provider-header",0),C(1,o_,6,5,"div",1)),o&2&&(p("consultationType",r.consultationType)("department",r.department)("locationName",r.locationName)("provider",r.provider),a(),p("ngIf",r.department))},dependencies:[je,ee,X,Ne,tt,st,so,F,ve,er,Je,ct,T],styles:["[_nghost-%COMP%]{width:100%;height:100%;overflow:auto;display:flex;flex-direction:column;background-color:#8080801a}.care-manager-common[_nghost-%COMP%] .confirm-button[_ngcontent-%COMP%]:not(:disabled):hover, .care-manager-common [_nghost-%COMP%] .confirm-button[_ngcontent-%COMP%]:not(:disabled):hover{opacity:.7}.reason-form-container[_ngcontent-%COMP%]{flex:1;padding:.625rem 1rem}.appointment-date[_ngcontent-%COMP%]{margin-top:.625rem;line-height:1.25rem;font-family:Roboto-bold,sans-serif;letter-spacing:.0325rem;text-align:center}.reason-form-description[_ngcontent-%COMP%]{margin:1.5rem 1.25rem;line-height:1.5rem;letter-spacing:.015rem}.reason-field-card[_ngcontent-%COMP%]{padding:1.75rem 1.25rem 2.25rem;background:#fff;border-radius:8px;display:flex;flex-direction:column}.reason-field-label[_ngcontent-%COMP%], .reason-comment-length[_ngcontent-%COMP%]{font-size:.75rem;line-height:1.25rem;letter-spacing:.015rem}.reason-comment-length[_ngcontent-%COMP%]{text-align:right}.reason-field-wrapper[_ngcontent-%COMP%]{width:100%;display:flex;border:1px solid #949494;border-radius:8px;overflow:hidden}.reason-field-wrapper.has-focus[_ngcontent-%COMP%]{border-color:#505050;box-shadow:0 0 0 2px #2a7efb}.reason-field-wrapper.has-error[_ngcontent-%COMP%]{border-color:#de000d}.reason-field-wrapper.has-error[_ngcontent-%COMP%] + .reason-comment-length[_ngcontent-%COMP%]{color:#de000d}.reason-field[_ngcontent-%COMP%]{width:100%;height:calc(7.5rem - 2px);padding:.625rem;line-height:1.5rem;letter-spacing:.0325rem;border:none;border-radius:8px;box-sizing:border-box}.reason-field[_ngcontent-%COMP%]:focus{border:none;outline:none;box-shadow:none}.confirm-button[_ngcontent-%COMP%]{width:15rem;margin:4.5rem auto}@media(min-width:700px){.reason-form-container[_ngcontent-%COMP%]{padding:0 2.5rem}.reason-form-description[_ngcontent-%COMP%]{margin:1.5rem 2.5rem}.reason-field-card[_ngcontent-%COMP%]{padding:1.75rem 2.5rem 2.25rem}}"]});let n=e;return n})();var r_=()=>({name:"warning-triangle",color:"currentColor"}),tr=(()=>{let e=class e{get hostClasses(){return this.background?`background-${this.background}`:""}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["lib-appointment-type-message"]],hostVars:2,hostBindings:function(o,r){o&2&&Op(r.hostClasses)},inputs:{message:"message",background:"background"},decls:6,vars:6,consts:[[1,"field-label"],[3,"params"]],template:function(o,r){o&1&&(s(0,"h3",0),v(1,"lib-svg-icon",1),f(2),d(3,"translate"),l(),s(4,"p"),f(5),l()),o&2&&(a(),p("params",A(5,r_)),a(),y(" ",u(3,3,"Important"),` 3`),a(3),y(" ",r.message,` 4`))},dependencies:[ti,Nn,U,T],styles:["[_nghost-%COMP%]{display:block;border-radius:8px;padding:1rem;background:#fff;margin:auto;margin-top:1.25rem;font-size:.75rem;line-height:1;letter-spacing:.533px;overflow-wrap:anywhere}.background-grey[_nghost-%COMP%]{background:#0640600d}[_nghost-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{padding-right:.25rem}[_nghost-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:1.435rem;height:1.25rem}[_nghost-%COMP%] .field-label[_ngcontent-%COMP%]{display:flex;align-items:center;font-family:Roboto-bold,sans-serif;font-size:1rem;margin-top:0;margin-bottom:.625rem}"]});let n=e;return n})();var Ym=(n,e)=>e.uuid,a_=(n,e)=>e.id;function s_(n,e){if(n&1&&(s(0,"header")(1,"div",11),v(2,"lib-avatar-image",12),s(3,"p",13),f(4),l()()()),n&2){let t=e;a(2),p("src",t.image)("name",t.firstName),a(2),b(t.name)}}function l_(n,e){if(n&1&&(s(0,"option",5),f(1),d(2,"translate"),l()),n&2){let t=e.$implicit;p("ngValue",t.uuid),a(),y(" ",u(2,2,t.name)," ")}}function c_(n,e){if(n&1){let t=S();s(0,"h4",14),f(1),d(2,"translate"),l(),s(3,"label",2)(4,"select",15),P("ngModelChange",function(o){x(t);let r=g();return O(r.onLocationChange(o))}),s(5,"option",4),f(6),d(7,"translate"),l(),Wt(8,l_,3,4,"option",5,Ym),d(10,"async"),l()()}if(n&2){let t=g();a(),y(" ",u(2,3,"Location")," "),a(3),p("ngModel",t.selectedLocationUuid),a(2),b(u(7,5,"Location")),a(2),Qt(u(10,7,t.locationList$))}}function p_(n,e){if(n&1&&(s(0,"option",5),f(1),d(2,"translate"),l()),n&2){let t=e.$implicit;p("ngValue",t.uuid),a(),y(" ",u(2,2,t.name)," ")}}function d_(n,e){if(n&1){let t=S();s(0,"label",8)(1,"input",16),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.selectedConsultationTypeId,o)||(r.selectedConsultationTypeId=o),O(o)}),P("change",function(){let o=x(t).$implicit,r=g();return O(r.onConsultationTypeChange(o))}),l(),v(2,"span",17),s(3,"span",18),f(4),l()()}if(n&2){let t=e.$implicit,i=g();a(),p("value",t.id),ye("ngModel",i.selectedConsultationTypeId),a(3),b(t.text)}}function m_(n,e){if(n&1&&v(0,"lib-appointment-type-message",9),n&2){let t=g();p("message",t.consultationTypeMessage)}}var Xm=(()=>{let e=class e{constructor(i,o,r,c,m,_,M,I){this.activatedRoute=i,this.providerPublicApiService=o,this.clinicApiService=r,this.clinicPublicApiService=c,this.clinicModuleActiveService=m,this.appointmentCreateNavigationService=_,this.departmentApiService=M,this.configService=I,this.queryParams=this.activatedRoute.snapshot.queryParams,this.selectedDepartmentUuid$=new yi(this.queryParams.departmentId||""),this.selectedConsultationTypeId=null,this.selectedDepartmentUuid=this.queryParams.departmentId||"",this.selectedLocationUuid=this.queryParams.locationId||"",this.isCareManagerApp=this.configService.isCareManagerApp()}ngOnInit(){let{clinicUuid:i,providerId:o,visitTypeId:r,stateId:c}=this.queryParams;this.useLocations$=this.clinicModuleActiveService.isModuleActive(i,ei.USE_LOCATIONS).pipe(fr(1)),this.provider$
4=this.providerPublicApiService.getDoctorById(i,o,this.isCareManagerApp?{}:{usageType:"self_scheduling"}),this.consultationTypes$=this.selectedDepartmentUuid$.pipe(ra(),L(m=>this.clinicApiService.getClinicConsultationTypeList(i,Jt(z({providerId:o,visitTypeId:r,departmentUuid:m},this.isCareManagerApp?{booking:"internal"}:{}))))),this.locationList$=this.clinicPublicApiService.getLocationList(i,{onlyIntegrated:!0}).pipe(ne(m=>{m.length===1&&!this.selectedLocationUuid&&(this.selectedLocationUuid=m[0].uuid)})),this.departmentList$=this.departmentApiService.getDepartmentList(i,z({providerId:o,visitTypeId:r,onlyIntegrated:!0},this.isCareManagerApp?{}:{scheduling:!0})).pipe(re(m=>{let _=Number(c);return _&&(m=m.filter(({address:M})=>_===M.stateId)),m}),ne(m=>this.onDepartmentChange(m.length===1?m[0].uuid:this.selectedDepartmentUuid)))}onDepartmentChange(i){this.selectedDepartmentUuid!==i&&(this.selectedDepartmentUuid=i,this.selectedConsultationTypeId=null,this.consultationTypeMessage="",this.selectedDepartmentUuid$.next(i))}onLocationChange(i){this.selectedLocationUuid=i}onConsultationTypeChange(i){this.consultationTypeMessage="",i.isShowComment&&!this.isCareManagerApp&&(this.consultationTypeMessage=i.consultationTypeMessage)}selectConsultationType(){let{clinicUuid:i,patientId:o,providerId:r,userId:c,repeatPeriod:m,days:_,insuranceId:M,specialtyId:I}=this.queryParams,k=Jt({consultationTypeId:this.selectedConsultationTypeId,departmentId:this.selectedDepartmentUuid,locationId:this.selectedLocationUuid,clinicUuid:i,patientId:o,providerId:r,userId:c,insuranceId:M,specialtyId:I});m&&_?(k=Oe(z({},k),{repeatPeriod:m,days:_}),this.appointmentCreateNavigationService.goToRecurringVisitListPage(k,{queryParamsHandling:"merge"})):this.appointmentCreateNavigationService.goToTimeSlotSelectPage(k)}};e.\u0275fac=function(o){return new(o||e)(h(j),h(wi),h(Te),h(Yt),h(yr),h(Ge),h(li),h(oe))},e.\u0275cmp=w({type:e,selectors:[["app-consultation-type-list"]],standalone:!1,decls:29,vars:25,consts:[[1,"consultation-type-list-container"],["id","consultation-type-department-label",1,"consultation-type-list-title"],[1,"lib-select-wrapper"],["required","","aria-labelledby","consultation-type-department-label",1,"select",3,"ngModelChange","ngModel"],["value","","disabled",""],[3,"ngValue"],[1,"consultation-type-list-title"],[1,"consultation-type-list-radio-group"],[1,"consultation-type-item"],["background","grey",3,"message"],["libButton","","type","button",1,"confirm-button",3,"click","disabled"],[1,"appointment-data-container"],[1,"provider-image",3,"src","name"],[1,"provider-name"],["id","consultation-type-location-label",1,"consultation-type-list-title"],["required","","aria-labelledby","consultation-type-location-label",1,"select",3,"ngModelChange","ngModel"],["type","radio","name","reason",3,"ngModelChange","change","value","ngModel"],[1,"mark"],[1,"label"]],template:function(o,r){if(o&1){let c=S();Oo(0),d(1,"async"),_e(2,s_,5,3,"header"),d(3,"async"),s(4,"div",0),_e(5,c_,11,9),s(6,"h4",1),f(7),d(8,"translate"),l(),s(9,"label",2)(10,"select",3),P("ngModelChange",function(_){return x(c),O(r.onDepartmentChange(_))}),s(11,"option",4),f(12),d(13,"translate"),l(),Wt(14,p_,3,4,"option",5,Ym),d(16,"async"),l()(),s(17,"fieldset")(18,"legend",6),f(19),d(20,"translate"),l(),s(21,"div",7),Wt(22,d_,5,3,"label",8,a_),d(24,"async"),_e(25,m_,1,1,"lib-appointment-type-message",9),l()(),s(26,"button",10),P("click",function(){return x(c),O(r.selectConsultationType())}),f(27),d(28,"translate"),l()()}if(o&2){let c,m=u(1,9,r.useLocations$);a(2),Ce((c=u(3,11,r.provider$))?2:-1,c),a(3),Ce(m?5:-1),a(2),y(" ",u(8,13,"Department")," "),a(3),p("ngModel",r.selectedDepartmentUuid),a(2),b(u(13,15,"Department")),a(2),Qt(u(16,17,r.departmentList$)),a(5),y(" ",u(20,19,"Reason for visit")," "),a(3),Qt(u(24,21,r.consultationTypes$)),a(3),Ce(r.consultationTypeMessage?25:-1),a(),p("disabled",!r.selectedConsultationTypeId||!r.selectedDepartmentUuid||m&&!r.selectedLocationUuid),a(),y(" ",u(28,23,"CONFIRM")," ")}},dependencies:[An,En,ee,kn,Tn,X,We,Ie,Ve,ve,tr,T,Fe],styles:['[_nghost-%COMP%]{width:100%;height:100%;overflow:auto;display:flex;flex-direction:column;background-color:#8080801a}.care-manager-common[_nghost-%COMP%] .confirm-button[_ngcontent-%COMP%]:not(:disabled):hover, .care-manager-common [_nghost-%COMP%] .confirm-button[_ngcontent-%COMP%]:not(:disabled):hover{opacity:.7}header[_ngcontent-%COMP%]{background-color:#fff}.appointment-data-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding:1.25rem;border-bottom:1px solid rgba(128,128,128,.2)}.provider-image[_ngcontent-%COMP%]{--avatar-image-size: 2.5rem;margin-right:.625rem}
4.provider-name[_ngcontent-%COMP%]{font-size:1rem;line-height:1.125rem;letter-spacing:.0325rem;font-family:Roboto-bold,sans-serif}.department-name[_ngcontent-%COMP%]{margin-top:.25rem}.consultation-type-list-container[_ngcontent-%COMP%]{flex:1}.consultation-type-list-title[_ngcontent-%COMP%]{font-size:1.125rem;line-height:1.25rem;font-family:Roboto-bold,sans-serif;color:#064060;margin:1.5rem 0;text-align:center}legend[_ngcontent-%COMP%]{padding-top:1.5rem}.consultation-type-list-radio-group[_ngcontent-%COMP%]{background-color:#fff;border-radius:8px;padding:1.25rem;margin:0 1rem}.consultation-type-item[_ngcontent-%COMP%]{padding:.875rem 0;display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;justify-content:flex-start}.consultation-type-item[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.consultation-type-item[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{position:absolute;height:calc(1.25rem - 2px);width:calc(1.25rem - 2px);background-color:#fff;border:1px solid #949494;border-radius:50%;display:flex;align-items:center;justify-content:center}.consultation-type-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:1.8rem;white-space:nowrap}.consultation-type-item[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%], .consultation-type-item[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]{background-color:var(--branding-primary-color, #064060);border-color:var(--branding-primary-color, #064060)}.consultation-type-item[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.consultation-type-item[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .consultation-type-item[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.consultation-type-item[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{position:absolute;width:.5rem;height:.5rem;border-radius:50%;background:#fff}.consultation-type-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{line-height:1.25rem;margin-left:2.5rem;letter-spacing:.0325rem;white-space:initial}.confirm-button[_ngcontent-%COMP%]{width:15rem;margin:4.5rem auto}.lib-select-wrapper[_ngcontent-%COMP%]{display:block;margin:0 1rem}.lib-select-wrapper[_ngcontent-%COMP%] .select[_ngcontent-%COMP%]{color:#505050}.lib-select-wrapper[_ngcontent-%COMP%] .select[_ngcontent-%COMP%]:required:invalid{color:#a7a7a7}@media(min-width:700px){.lib-select-wrapper[_ngcontent-%COMP%], .consultation-type-list-radio-group[_ngcontent-%COMP%]{margin:0 2.5rem}}']});let n=e;return n})();var g_=()=>[],Zm=n=>({$implicit:n}),u_=(n,e)=>e.id;function f_(n,e){if(n&1){let t=S();s(0,"button",11),P("click",function(){x(t);let o=g(2).$implicit,r=g();return O(r.biographyClick.emit(o))}),f(1),d(2,"translate"),l()}n&2&&(a(),y(" ",u(2,1,"READ BIO")," "))}function h_(n,e){n&1&&Lt(0)}function __(n,e){if(n&1){let t=S();s(0,"button",12),P("click",function(){x(t);let o=g(2).$implicit,r=g();return O(r.scheduleClick.emit(o))}),f(1),d(2,"translate"),l()}n&2&&(a(),y(" ",u(2,1,"SCHEDULE NOW")," "))}function C_(n,e){if(n&1&&(s(0,"li",1),v(1,"lib-avatar-image",3),s(2,"div",4)(3,"div",5),v(4,"lib-avatar-image",6),s(5,"div")(6,"h2",7),f(7),l(),_e(8,f_,3,3,"button",8),l()(),C(9,h_,1,0,"ng-container",9),_e(10,__,3,3,"button",10),l()()),n&2){let t=g().$implicit,i=g(),o=V(3);a(),p("src",t.image)("name",t.firstName),a(3),p("src",t.image)("name",t.firstName),a(3),b(t.name),a(),Ce(t.hasBiography?8:-1),a(),p("ngTemplateOutlet",o)("ngTemplateOutletContext",ce(9,Zm,t)),a(),Ce(i.isSchedulingDisabled?-1:10)}}function v_(n,e){n&1&&Lt(0)}function y_(n,e){if(n&1){let t=S();s(0,"li",2)(1,"div",13),v(2,"lib-avatar-image",14),s(3,"h2",15),f(4),l()(),s(5,"div",4),C(6,v_,1,0,"ng-container",9),s(7,"button",12),P("click",function(){x(t);let o=g().$implicit,r=g();return O(r.scheduleClick.emit(o))}),f(8),d(9,"translate"),l()()()}if(n&2){let t=g().$implicit,i=g(),o=V(3);a(2),p("src",t.image)("name",t.firstName),a(2),b(t.name),a(2),p("ngTemplateOutlet",o)("ngTemplateOutletContext",ce(10,Zm,t)),a(),Z("right-aligned",!i.isAdvancedSchedulingActive),a(),y(" ",u(9,8,"SCHEDULE NOW")," ")}}function P_(n,e){if(n&1&&_e(0,C_,11,11,"li",1)(1,y_,10,12,"li",2),n&2){let t=g();Ce(t.application==="scheduling-plugin"?0:1)}}function M_(n,e){if(n&1&&(s(0,"span",18),f(1),d(2,"applyTimezone"),d(3,"c4uDate"),l()),n&2){let t=g().$implicit,i=g(2);a(),y(" ",t&&D(3,4,D(2,1,t.startAt,i),"todo_time")," ")}}function b_(n,e){if(n&1&&(_e(0,M_,4,7,"span",18),d(1,"applyTimezone"),d(2,"c4uDate")),n&2){let t=e.$implicit,i=g(),o=g();Ce(!t||i===D(2,4,D(1,1,t.startAt,o),"first_timeslot_date")?0:-1)}}function x_(n,e){if(n&1&&(s(0,"div")(1,"p",17),f(2),l(),Wt(3,b_,3,7,null,
4null,hr),l()),n&2){let t=g(2).$implicit;a(2),Vt(" ",t.department.name," - ",e," "),a(),Qt(t.timeslotList)}}function O_(n,e){if(n&1&&(_e(0,x_,5,2,"div"),d(1,"applyTimezone"),d(2,"c4uDate")),n&2){let t,i=g().$implicit,o=g(4);Ce((t=i.timeslotList.length&&(i.timeslotList[0]?D(2,4,D(1,1,i.timeslotList[0].startAt,e),"first_timeslot_date"):o.dateFrom))?0:-1,t)}}function w_(n,e){if(n&1&&_e(0,O_,3,7),n&2){let t,i=e.$implicit,o=g(4);Ce((t=i.department.timezone||o.clinicTimezone)?0:-1,t)}}function S_(n,e){if(n&1&&(s(0,"div",16),Wt(1,w_,1,1,null,null,hr),l()),n&2){g();let t=fa(0);a(),Qt(t)}}function I_(n,e){if(n&1&&(Oo(0),_e(1,S_,3,0,"div",16)),n&2){let t=g().$implicit,i=g(),o=ua(i.providerTimeslotMap==null?null:i.providerTimeslotMap.get(t.id));a(),Ce(o?1:-1)}}function T_(n,e){if(n&1&&_e(0,I_,2,2),n&2){let t=g();Ce(t.isAdvancedSchedulingActive&&!t.isSchedulingDisabled?0:-1)}}var Br=(()=>{let e=class e{constructor(){this.providerList=null,this.application="other",this.scheduleClick=new he,this.biographyClick=new he}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["lib-booking-provider-card-list"]],inputs:{providerList:"providerList",providerTimeslotMap:"providerTimeslotMap",clinicTimezone:"clinicTimezone",dateFrom:"dateFrom",isAdvancedSchedulingActive:"isAdvancedSchedulingActive",isSchedulingDisabled:"isSchedulingDisabled",application:"application"},outputs:{scheduleClick:"scheduleClick",biographyClick:"biographyClick"},decls:4,vars:1,consts:[["timeslots",""],[1,"provider-item"],[1,"provider"],[1,"image","desktop",3,"src","name"],[1,"scheduling"],[1,"personal"],[1,"image","mobile",3,"src","name"],[1,"name"],["type","button",1,"bio"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["libButton","","type","button",1,"schedule-button"],["type","button",1,"bio",3,"click"],["libButton","","type","button",1,"schedule-button",3,"click"],[1,"provider-data"],[1,"provider-image",3,"src","name"],[1,"provider-name"],[1,"time-slots"],[1,"date-and-department"],[1,"time-slot-time"]],template:function(o,r){o&1&&(Wt(0,P_,2,1,null,null,u_),C(2,T_,1,1,"ng-template",null,0,pe)),o&2&&Qt(r.providerList??A(0,g_))},dependencies:[Pi,Ve,ve,T,ct,Je],styles:["[_nghost-%COMP%]{display:contents}.provider-item[_ngcontent-%COMP%]{display:flex;padding:.625rem 1.113rem;overflow:hidden;border-radius:8px;background-color:#fff}.provider-item[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{margin-right:.625rem}.provider-item[_ngcontent-%COMP%] .image.desktop[_ngcontent-%COMP%]{display:none}.provider-item[_ngcontent-%COMP%] .scheduling[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.provider-item[_ngcontent-%COMP%] .personal[_ngcontent-%COMP%]{display:flex;align-items:center;padding-bottom:1rem}.provider-item[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{margin:0;font-family:Roboto-bold,sans-serif;font-size:1rem;letter-spacing:.0333333333rem}.provider-item[_ngcontent-%COMP%] .bio[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;color:#064060;font-size:.75rem;background:none}.provider-item[_ngcontent-%COMP%] .time-slots[_ngcontent-%COMP%]{font-size:.75rem;line-height:.875rem}.provider-item[_ngcontent-%COMP%] .date-and-department[_ngcontent-%COMP%]{letter-spacing:.0333333333rem}.provider-item[_ngcontent-%COMP%] .schedule-button[_ngcontent-%COMP%]{font-size:.75rem;padding:.75rem 1.4rem;margin-bottom:.28rem;width:11.25rem}.provider-item[_ngcontent-%COMP%] .time-slot-time[_ngcontent-%COMP%]{display:inline-block;min-width:5rem;min-height:2rem;padding:.625rem;margin:.35rem .28rem .835rem 0;color:var(--branding-primary-color);background-color:#80808014;letter-spacing:.027027027rem;border-radius:8px;font-family:Roboto-bold,sans-serif;text-align:center}.provider-item[_ngcontent-%COMP%] .time-slot-time[_ngcontent-%COMP%]:last-child{margin-right:0}@media only screen and (min-width:1020px){.provider-item[_ngcontent-%COMP%] .scheduling[_ngcontent-%COMP%]:has(.time-slots){padding-top:.5rem;justify-content:start}.provider-item[_ngcontent-%COMP%] .image.desktop[_ngcontent-%COMP%]{display:block}.provider-item[_ngcontent-%COMP%] .image.mobile[_ngcontent-%COMP%]{display:none}}.provider[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;align-items:flex-start;width:100%;padding:1.25rem;overflow:hidden;border-radius:8px;background-color:#fff}.provider[_ngcontent-%COMP%] + .provider[_ngcontent-%COMP%]{margin-top:.625rem}.provider[_ngcontent-%COMP%] .provider-data[_ngcontent-%COMP%]{display:flex;align-items:center;width:50%;padding-right:.5rem}.provider[_ngcontent-%COMP%] .provider-data[_ngcontent-%COMP%] .provider-image[_ngcontent-%COMP%]{--avatar-image-size: 2.5rem;margin-right:.625rem}.provider[_ngcontent-%COMP%] .provider-data[_ngcontent-%COMP%] .provider-name[_ng
4content-%COMP%]{margin:0;font-family:Roboto-bold,sans-serif;line-height:1.125rem;letter-spacing:.0325rem}.provider[_ngcontent-%COMP%] .scheduling[_ngcontent-%COMP%]{align-self:center;width:50%;min-width:16rem}.provider[_ngcontent-%COMP%] .schedule-button[_ngcontent-%COMP%], .provider[_ngcontent-%COMP%] .time-slot-time[_ngcontent-%COMP%]{font-size:.625rem;letter-spacing:.027027027rem;border-radius:8px;font-family:Roboto-bold,sans-serif;text-align:center}.provider[_ngcontent-%COMP%] .schedule-button[_ngcontent-%COMP%]{padding:.625rem 1.375rem;width:auto}.provider[_ngcontent-%COMP%] .schedule-button.right-aligned[_ngcontent-%COMP%]{margin-left:auto}.provider[_ngcontent-%COMP%] .time-slot-time[_ngcontent-%COMP%]{box-sizing:border-box;display:inline-block;min-width:5rem;min-height:2rem;padding:.625rem;margin:.35rem .28rem .835rem 0;color:var(--branding-primary-color);background-color:#80808014;font-size:.78rem}.provider[_ngcontent-%COMP%] .time-slot-time[_ngcontent-%COMP%]:last-child{margin-right:0}.provider[_ngcontent-%COMP%] .date-and-department[_ngcontent-%COMP%]{font-size:.6875rem;line-height:.75rem;letter-spacing:.0333333333rem}@media(max-width:700px){.provider[_ngcontent-%COMP%]{flex-direction:column}.provider[_ngcontent-%COMP%] .scheduling[_ngcontent-%COMP%]{align-self:flex-start;width:100%;margin-top:1rem}.provider[_ngcontent-%COMP%] .scheduling[_ngcontent-%COMP%] .schedule-button[_ngcontent-%COMP%]{margin-left:0}.provider[_ngcontent-%COMP%] .provider-data[_ngcontent-%COMP%]{width:100%}}"]});let n=e;return n})();var eg=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=w({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms} 5`],encapsulation:2,changeDetection:0})}return n})(),k_={passive:!0},tg=(()=>{class n{_platform=fe(vr);_ngZone=fe(Mt);_renderer=fe(pa).createRenderer(null,null);_styleLoader=fe(Ul);_monitoredElements=new Map;constructor(){}monitor(t){if(!this._platform.isBrowser)return fp;this._styleLoader.load(eg);let i=Nl(t),o=this._monitoredElements.get(i);if(o)return o.subject;let r=new jt,c="cdk-text-field-autofilled",m=M=>{M.animationName==="cdk-text-field-autofill-start"&&!i.classList.contains(c)?(i.classList.add(c),this._ngZone.run(()=>r.next({target:M.target,isAutofilled:!0}))):M.animationName==="cdk-text-field-autofill-end"&&i.classList.contains(c)&&(i.classList.remove(c),this._ngZone.run(()=>r.next({target:M.target,isAutofilled:!1})))},_=this._ngZone.runOutsideAngular(()=>(i.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(i,"animationstart",m,k_)));return this._monitoredElements.set(i,{subject:r,unlisten:_}),r}stopMonitoring(t){let i=Nl(t),o=this._monitoredElements.get(i);o&&(o.unlisten(),o.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((t,i)=>this.stopMonitoring(i))}static \u0275fac=function(i){return new(i||n)};static \u0275prov=be({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ig=(()=>{class n{_elementRef=fe(Bi);_platform=fe(vr);_ngZone=fe(Mt);_renderer=fe(Sn);_resizeEvents=new jt;_previousValue;_initialHeight;_destroyed=new jt;_listenerCleanups;_minRows;_maxRows;_enabled=!0;_previousMinRows=-1;_textareaElement;get minRows(){return this._minRows}set minRows(t){this._minRows=Vl(t),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(t){this._maxRows=Vl(t),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(t){this._enabled!==t&&((this._enabled=t)?this.resizeToFitContent(!0):this.reset())}get placeholder(){return this._textareaElement.placeholder}set placeholder(t){this._cachedPlaceholderHeight=void 0,t?this._textareaElement.setAttribute("placeholder",t):this._textareaElement.removeAttribute("placeholder"),this._cacheTextareaPlaceholderHeight()}_cachedLineHeight;_cachedPlaceholderHeight;_document=fe(la);_hasFocus;_isViewInited=!1;constructor(){fe(Ul).load(eg),this._textareaElement=this._elementRef.nativeElement}_setMinHeight(){let t=this.minRows&&this._cachedLineHeight?`${this.minRows*this._cachedLineHeight}px`:null;t&&(this._textareaElement.style.minHeight=t)}_setMaxHeight(){let t=this.maxRows&&this._cachedLineHeight?`${this.maxRows*this._cachedLineHeight}px`:null;t&&(this._textareaElement.style.maxHeight=t)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[this._renderer.listen("window","resize",()=>this._resizeEvents.next()),this._renderer.listen(this._textareaElement,"focus",this._handleFocusEvent),this._renderer.listen(this._textareaElement,"blur",this._handleFocusEvent)],this._resizeEvents.pipe(_p(16)).subscribe(()=>{this._cachedLineHeight=this._cachedPlaceholderHeight=void 0,this.resizeToFitContent(!0)})}),this._isViewInited=!0,this.resizeToFitContent(!0))}ngOnDestroy(){this._listenerCleanups?.forEach(t=>t()),this._resizeEvents.complete(),this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;let t=this._textareaElement.cloneNode(!1),i=t.style;t.rows=1,i.position="absolute",i.visibility="hidden",i.border="none",i.padding="0",i.height="",i.minHeight="",i.maxHeight="",i.top=i.bottom=i.left
5=i.right="auto",i.overflow="hidden",this._textareaElement.parentNode.appendChild(t),this._cachedLineHeight=t.clientHeight,t.remove(),this._setMinHeight(),this._setMaxHeight()}_measureScrollHeight(){let t=this._textareaElement,i=t.style.marginBottom||"",o=this._platform.FIREFOX,r=o&&this._hasFocus,c=o?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring";r&&(t.style.marginBottom=`${t.clientHeight}px`),t.classList.add(c);let m=t.scrollHeight-4;return t.classList.remove(c),r&&(t.style.marginBottom=i),m}_cacheTextareaPlaceholderHeight(){if(!this._isViewInited||this._cachedPlaceholderHeight!=null)return;if(!this.placeholder){this._cachedPlaceholderHeight=0;return}let t=this._textareaElement.value;this._textareaElement.value=this._textareaElement.placeholder,this._cachedPlaceholderHeight=this._measureScrollHeight(),this._textareaElement.value=t}_handleFocusEvent=t=>{this._hasFocus=t.type==="focus"};ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(t=!1){if(!this._enabled||(this._cacheTextareaLineHeight(),this._cacheTextareaPlaceholderHeight(),!this._cachedLineHeight))return;let i=this._elementRef.nativeElement,o=i.value;if(!t&&this._minRows===this._previousMinRows&&o===this._previousValue)return;let r=this._measureScrollHeight(),c=Math.max(r,this._cachedPlaceholderHeight||0);i.style.height=`${c}px`,this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame<"u"?requestAnimationFrame(()=>this._scrollToCaretPosition(i)):setTimeout(()=>this._scrollToCaretPosition(i))}),this._previousValue=o,this._previousMinRows=this._minRows}reset(){this._initialHeight!==void 0&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_scrollToCaretPosition(t){let{selectionStart:i,selectionEnd:o}=t;!this._destroyed.isStopped&&this._hasFocus&&t.setSelectionRange(i,o)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=xo({type:n,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(i,o){i&1&&P("input",function(){return o._noopInputHandler()})},inputs:{minRows:[0,"cdkAutosizeMinRows","minRows"],maxRows:[0,"cdkAutosizeMaxRows","maxRows"],enabled:[2,"cdkTextareaAutosize","enabled",Qi],placeholder:"placeholder"},exportAs:["cdkTextareaAutosize"]})}return n})(),Bs=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Se({type:n});static \u0275inj=we({})}return n})();var E_=["button","checkbox","file","hidden","image","radio","range","reset","submit"],F_=new yp("MAT_INPUT_CONFIG"),ng=(()=>{class n{_elementRef=fe(Bi);_platform=fe(vr);ngControl=fe(Vp,{optional:!0,self:!0});_autofillMonitor=fe(tg);_ngZone=fe(Mt);_formField=fe(gd,{optional:!0});_renderer=fe(Sn);_uid=fe(jp).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=fe(F_,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new jt;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(t){this._disabled=Sa(t),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(t){this._id=t||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(at.required)??!1}set required(t){this._required=Sa(t)}_required;get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea&&zl().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(t){this._errorStateTracker.matcher=t}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(t){t!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(t):this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=Sa(t)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(t){this._errorStateTracker.errorState=t}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(t=>zl().has(t));constructor(){let t=fe(Gi,{optional:!0}),i=fe(tt,{optional:!0}),o=fe(Cd),r=fe(vd,{optional:!0,self:!0}),c=this._elementRef.nativeElement,m=c.nodeName.toLowerCase();r?Pp(r.value)?this._signalBasedValueAccessor=r:this._inputValueAccessor=r:this._inputValueAccessor=c,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(c,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new ud(o,this.ngControl,i,t,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=m==="select",this._isTextarea=m==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=c.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&Ip(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(t){this._elementRef.nativeElement.focus(t)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(t){if(t!==this.focused){if(!this._isNativeSelect&&t&&this.disabled&&this.disabledInteractive){let i=this._elementRef.nativeElement;i.type==="number"?(i.type="text",i.setSelectionRange(0,0),i.type="number"):i.setSelectionRange(0,0)}this.focused=t,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_dirtyCheckPlaceholder(){let t=this._getPlaceholder();if(t!==this._previousPlaceholder){let i=this._elementRef.nativeElement;this._previousPlaceholder=t,t?i.setAttribute("placeholder",t):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){E_.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let t=this._elementRef.nativeElement,i=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&i&&i.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(t){let i=this._elementRef.nativeElement;
5t.length?i.setAttribute("aria-describedby",t.join(" ")):i.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let t=this._elementRef.nativeElement;return this._isNativeSelect&&(t.multiple||t.size>1)}_iOSKeyupListener=t=>{let i=t.target;!i.value&&i.selectionStart===0&&i.selectionEnd===0&&(i.setSelectionRange(1,1),i.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=xo({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(i,o){i&1&&P("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),i&2&&(ga("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),G("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),Z("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Qi]},exportAs:["matInput"],features:[ha([{provide:md,useExisting:n}]),wn]})}return n})(),og=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Se({type:n});static \u0275inj=we({imports:[ql,$l,$l,Bs,ql]})}return n})();var B_=n=>({name:n,color:"#949494"});function R_(n,e){if(n&1){let t=S();s(0,"button",8),P("click",function(){x(t);let o=g();return O(o.dateChange.emit(o.minDate))}),f(1),d(2,"translate"),l()}n&2&&(a(),y(" ",u(2,1,"RESET")," "))}var Rr=(()=>{let e=class e{constructor(){this.iconName="calendar-new",this.dateChange=new he}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["lib-booking-provider-list-calendar"]],inputs:{selectedDate:"selectedDate",minDate:"minDate",timezone:"timezone",iconName:"iconName"},outputs:{dateChange:"dateChange"},decls:19,vars:35,consts:[["picker",""],["type","button",1,"date-from",3,"click"],[1,"date"],["type","button",1,"reset-calendar-button"],["hidden","","matInput","",3,"ngModelChange","matDatepicker","min","ngModel"],["color","primary","panelClass","centered-datepicker","touchUi",""],["type","button",1,"datepicker-button",3,"click"],[1,"datepicker-icon",3,"params"],["type","button",1,"reset-calendar-button",3,"click"]],template:function(o,r){if(o&1){let c=S();s(0,"button",1),P("click",function(){x(c);let _=V(15);return O(_.open())}),f(1),d(2,"translate"),s(3,"span",2),f(4),d(5,"applyTimezone"),d(6,"c4uDate"),l()(),_e(7,R_,3,3,"button",3),d(8,"applyTimezone"),d(9,"c4uDate"),d(10,"applyTimezone"),d(11,"c4uDate"),s(12,"input",4),d(13,"translate"),P("ngModelChange",function(_){return x(c),O(r.dateChange.emit(_))}),l(),v(14,"mat-datepicker",5,0),s(16,"button",6),d(17,"translate"),P("click",function(){x(c);let _=V(15);return O(_.open())}),v(18,"lib-svg-icon",7),l()}if(o&2){let c=V(15);a(),y(" ",u(2,9,"From"),": "),a(3),b(D(6,14,D(5,11,r.selectedDate,r.timezone),"first_timeslot_date")),a(3),Ce(D(9,20,D(8,17,r.selectedDate,r.timezone),"first_timeslot_date")!==D(11,26,D(10,23,r.minDate,r.timezone),"first_timeslot_date")?7:-1),a(5),p("matDatepicker",c)("min",r.minDate)("ngModel",r.selectedDate),G("aria-label",u(13,29,"Open Calendar")),a(4),G("aria-label",u(17,31,"Open Calendar")),a(2),p("params",ce(33,B_,r.iconName))}},dependencies:[ba,ee,X,Ie,yd,Wa,Qa,og,ng,U,T,ct,Je],styles:["[_nghost-%COMP%]{display:contents}.date-from[_ngcontent-%COMP%]{background-color:transparent;color:#505050;margin-right:.675rem;font-size:.875rem;letter-spacing:.0333333333rem;cursor:pointer}.date-from[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{color:var(--branding-primary-color);font-family:Roboto-bold,sans-serif}.reset-calendar-button[_ngcontent-%COMP%]{padding:.5rem .375rem;margin-right:.875rem;background-color:transparent;color:#949494;font-family:Roboto-bold,sans-serif;font-size:.75rem;letter-spacing:.027027027rem;cursor:pointer}.datepicker-button[_ngcontent-%COMP%]{padding:0;border:0;background:none;cursor:pointer}.datepicker-icon[_ngcontent-%COMP%]{display:inline-block;padding:.375rem .375rem .25rem;border-radius:8px;background:#fff;cursor:pointer}"],changeDetection:0});let n=e;return n})();ri();var ag=(()=>{let e=class e{constructor(i,o,r){this.clinicPublicApiService=i,this.timeSlotApiService=o,this.dateTimeService=r}getFirstTimeslots(i,o,r,c,m,_=!1){if(!i||!o||!r||!c||!m)return null;let M=o.clinicUuid,I=[null,null,null];return m.pipe(L(k=>
5Ft([me(k),this.clinicPublicApiService.getConsultationTypeList(M,z(z({visitTypeId:r,providerId:i},k.length===1?{departmentId:k[0].uuid}:{}),_?{booking:"internal"}:{}))])),ge(([k,R])=>!!(k.length&&R.length)),L(([k,R])=>Jn([...R.map(N=>this.clinicPublicApiService.getConsultationTypeSettings(i,N.id).pipe(Pt(()=>me({bookingOpenDate:null,bookingCloseDate:null})))),c]).pipe(L(N=>{let W=R.map(ze=>ze.id),K=N[N.length-1],Ee=N.slice(0,-1),Ke=this.getCommonBookingDate(Ee,"bookingOpenDate",(ze,Ye)=>ze.isBefore(Ye)),ot=this.getCommonBookingDate(Ee,"bookingCloseDate",(ze,Ye)=>ze.isAfter(Ye));return Jn(k.map(ze=>{let Ye=ze.uuid,ii=ze.timezone||o.timezone,Bt=this.getStartDay(K,_?null:Ke),gt=this.getFinishDate(Bt,_?null:ot),yt=this.formatDate(Bt,ii),ni=this.formatDate(gt,ii),oi=Oe(z({clinicUuid:M,providerId:i},W.length===1?{consultationTypeId:W[0]}:{consultationTypeIds:W}),{departmentUuid:Ye,startAt:yt,finishAt:ni,count:3,source:"synced"});return(_?this.timeSlotApiService.getCommonList(oi):this.timeSlotApiService.getPublicList(oi)).pipe(eo(I),Pt(()=>me([])),re(Di=>({department:ze,timeslotList:Di.slice(0,3)})))}))}),eo(k.map(N=>({department:N,timeslotList:I}))))))}getCommonBookingDate(i,o,r){let c=null;for(let m of i){if(!m[o])return null;let _=lt.createDateAdapter(m[o]);(!c||r(_,lt.createDateAdapter(c)))&&(c=m[o])}return c}getStartDay(i,o){return this.dateTimeService.getLaterDate(lt.createDateAdapter(o),this.dateTimeService.getStartOfDay(i))}getFinishDate(i,o){let c=this.dateTimeService.addDays(i,14).startOf("day").subtract(1,"second");return o?this.dateTimeService.getEarlierDate(lt.createDateAdapter(o),c):c}formatDate(i,o){return this.dateTimeService.format(this.dateTimeService.applyTimezone(i,o).utc(),"iso8601offset")}};e.\u0275fac=function(o){return new(o||e)(ie(Yt),ie(ro),ie(lt))},e.\u0275prov=be({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var mn,Vr=(mn=class{constructor(){this.router=fe(B),this.activatedRoute=fe(j),this.clinicPublicApiService=fe(Yt),this.providerPublicApiService=fe(wi),this.modalWindowService=fe(rt),this.translateService=fe(qt),this.dateTimeService=fe(lt),this.firstTimeslotsService=fe(ag),this.cdr=fe(wo),this.initialQueryParams=this.activatedRoute.snapshot.queryParams,this.sortingInProgress=!1,this.timeslotsDestroy$=new jt,this.providerList=null,this.stateId=this.initialQueryParams.stateId||"",this.insuranceId=this.initialQueryParams.insuranceId||"",this.specialtyId=this.initialQueryParams.specialtyId||"",this.visitTypeId=this.initialQueryParams.visitTypeId||"",this.departmentUuid=this.initialQueryParams.departmentId||"",this.locationUuid=this.initialQueryParams.locationId||"",this.minDate=new Date,this.calendarDateSubject=new yi(this.minDate),this.calendarDate$=this.calendarDateSubject.asObservable(),this.providerTimeslots=new Map}ngOnInit(){this.clinicUuid=this.getClinicUuid(),this.isAdvancedSchedulingActive$=this.clinicPublicApiService.isClinicModuleActive(this.clinicUuid,ei.ADVANCED_SCHEDULING).pipe(fr(1)),this.clinicPublicApiService.getClinicByUuid(this.clinicUuid).subscribe(e=>this.clinic=e),this.getDepartmentUuid(this.departmentUuid,this.clinicUuid).pipe(ne(e=>this.departmentUuid=e),L(()=>this.loadFiltersData())).subscribe(()=>{this.onFiltersDataLoad()})}getDepartmentUuid(e,t){return!e||qp(e)?me(e):this.clinicPublicApiService.getDepartmentByUuid(e,t).pipe(re(({uuid:i})=>i),Pt(i=>(console.error(`Failed to resolve department identifier "${e}" for clinic "${t}"`,i),me(""))))}onFiltersDataLoad(){this.updateProviderList(this.makeQueryParams())}getProviderListQueryParams(e){return e}getDepartmentList(e){return this.clinicPublicApiService.getDepartmentList(this.clinicUuid,z({onlyIntegrated:!0,visitTypeId:this.visitTypeId},e?{}:{scheduling:!0}))}updateProviderList(e){if(!e){this.providerList=[];return}this.providerList=null;let o=e,{locationId:t}=o,i=ur(o,["locationId"]);this.providerPublicApiService.getDoctorsList(this.clinicUuid,this.getProviderListQueryParams(z({onlyIntegrated:!0},i))).subscribe(r=>this.onProviderListLoad(r))}onCalendarChange(e){let t=new Date(e),i=t.getMinutes()-t.getTimezoneOffset()+this.dateTimeService.getTimezoneOffset(this.clinic.timezone,t);t.setMinutes(i),this.calendarDateSubject.next(t)}loadTimeslots(e){this.providerTimeslots.clear(),this.timeslotsDestroy$.next(),!(!this.providerList?.length||!this.clinic||!this.visitTypeId)&&this.isAdvancedSchedulingActive$.pipe(vp(1),Le(this),On(this.timeslotsDestroy$)).subscribe(t=>{t&&this.providerList.forEach(i=>
5{this.loadTimeslotsForProvider(i.id,e)})})}getTimeslotDepartmentList(e,t){return this.clinicPublicApiService.getDepartmentList(this.clinicUuid,z({visitTypeId:this.visitTypeId,onlyIntegrated:!0,providerId:e},t?{}:{scheduling:!0}))}loadTimeslotsForProvider(e,t){let i=this.getTimeslotDepartmentList(e,t).pipe(re(r=>{let c=Number(this.stateId);return c&&(r=r.filter(({address:m})=>c===m.stateId)),this.departmentUuid?r.filter(({uuid:m})=>m===this.departmentUuid):r}),fr(1)),o=this.firstTimeslotsService.getFirstTimeslots(e,this.clinic,this.visitTypeId,this.calendarDate$,i,t);o&&o.pipe(Le(this),On(this.timeslotsDestroy$),aa(()=>{this.hasAvailableTimeslots(e)||this.moveProviderToEnd(e),this.cdr.markForCheck()})).subscribe({next:r=>{this.providerTimeslots.set(e,r),this.hasAvailableTimeslots(e)||this.moveProviderToEnd(e),this.cdr.markForCheck()}})}hasAvailableTimeslots(e){let t=this.providerTimeslots.get(e);return!t||t.length===0?!1:t.some(i=>i.timeslotList.length>0)}moveProviderToEnd(e){if(!this.providerList||this.sortingInProgress)return;this.sortingInProgress=!0;let t=this.providerList.findIndex(i=>i.id===e);if(t!==-1){let[i]=this.providerList.splice(t,1);this.providerList.push(i)}this.sortingInProgress=!1}onScheduleClick(e){this.isAppointmentSchedulingDisabled()?this.modalWindowService.info(this.createInfoMessage(this.getRequiredFilterLabels()),"Almost done!"):this.selectProvider(e)}createInfoMessage(e){let t=e.length===1?e[0]:e.slice(0,-1).join(", ")+` ${this.translateService._("and")} `+e[e.length-1];return this.translateService._("Please select")+" "+t+" "+this.translateService._("in the filter before scheduling the appointment")}toggleFilterList(){this.isFilterListOpen=!this.isFilterListOpen}},mn.\u0275fac=function(t){return new(t||mn)},mn.\u0275cmp=w({type:mn,selectors:[["ng-component"]],standalone:!1,decls:0,vars:0,template:function(t,i){},encapsulation:2}),mn);Vr=Xe([et()],Vr);ri();var Ji,Rs=(Ji=class extends Vr{constructor(){super(...arguments),this.schedulingFilters={insurances:[],specialties:[],visitTypes:[],departments:[],locations:[],states:[]}}loadFiltersData(){return this.loadSchedulingFilters().pipe(re(()=>!0))}loadSchedulingFilters(){return this.clinicPublicApiService.getSchedulingFilters(this.clinicUuid,this.buildFiltersRequest()).pipe(ne(e=>{this.schedulingFilters={insurances:e.insurances??[],specialties:e.specialties??[],visitTypes:e.visitTypes??[],departments:e.departments??[],locations:e.locations??[],states:e.states??[]}}))}buildFiltersRequest(){return{insuranceId:Number(this.insuranceId)||void 0,specialtyId:Number(this.specialtyId)||void 0,visitTypeId:Number(this.visitTypeId)||void 0,departmentId:this.departmentUuid||void 0,locationId:this.locationUuid||void 0,stateId:Number(this.stateId)||void 0}}onFilterChange(){this.providerList=null,this.loadSchedulingFilters().pipe(ne(()=>this.updateFiltersInUrl()),re(()=>this.makeQueryParams()),Le(this)).subscribe(e=>{this.updateProviderList(e),this.cdr.markForCheck()})}clearFilters(){this.stateId="",this.insuranceId="",this.specialtyId="",this.visitTypeId="",this.departmentUuid="",this.locationUuid="",this.onFilterChange()}get hasActiveFilters(){return!!(this.stateId||this.insuranceId||this.specialtyId||this.visitTypeId||this.departmentUuid||this.locationUuid)}get hasGreyedOutOptions(){return[this.schedulingFilters.states,this.schedulingFilters.insurances,this.schedulingFilters.specialties,this.schedulingFilters.visitTypes,this.schedulingFilters.departments,this.schedulingFilters.locations].some(e=>e.some(({available:t})=>!t))}getProviderListQueryParams(e){return Oe(z({},e),{usageType:"self_scheduling"})}getLocationIdForNavigation(){return this.locationUuid?this.locationUuid:this.schedulingFilters.locations.length===1?`${this.schedulingFilters.locations[0].id}`:""}makeQueryParams(){let e={insuranceId:this.insuranceId,specialtyId:this.specialtyId,visitTypeId:this.visitTypeId,locationId:this.locationUuid,internalBooking:0};if(this.stateId&&!this.departmentUuid){let t=this.schedulingFilters.departments.filter(({available:i})=>i).map(({id:i})=>i);if(!t.length)return;e.departments=t}else e.departmentId=this.departmentUuid;return Jt(e)}updateFiltersInUrl(){this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:Jt(Oe(z({},this.initialQueryParams),{stateId:this.stateId,insuranceId:this.insuranceId,specialtyId:this.specialtyId,visitTypeId:this.visitTypeId,departmentId:this.departmentUuid,locationId:this.locationUuid,patientId:this.initialQueryParams.patientId})),replaceUrl:!0})}isAppointmentSchedulingDisabled(){return!this.visitTypeId||this.schedulingFilters.states.length>1&&!this.stateId||!!this.schedulingFilters.insurances.length&&!this.insuranceId||!!this.schedulingFilters.specialties.length&&!this.specialtyId}getRequiredFilterLabels(){let e=[];return this.schedulingFilters.states.length>1&&!this.stateId&&e.push(this.translateService._("State")),this.schedulingFilters.insurances.length&&!this.insuranceId&&e.push(this.translateService._("Insurance")),this.schedulingFilters.specialties.length&&!this.specialtyId&&e.push(this.translateService._("Specialty")),this.visitTypeId||e.push(this.translateService._("Visit type")),e}},Ji.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ae(Ji)))(i||Ji)}})(),Ji.\u0275cmp=w({type:Ji,selectors:[["ng-component"]],standalone:!1,features:[Y],decls:0,vars:0,template:function(t,i){},encapsulation:2}),Ji);Rs=Xe([et()],Rs);var sg=(()=>{let e=class e{constructor(i){this.dateTimeService=i,this.calendarControl=new Ca(qe()),this.timeSlotMapDayList=[],this.MAX_LOADING_DAYS_DIFFERENCE=90,this.COLUMN_WIDTH_5=900,this.COLUMN_WIDTH_7=1200,this.MIN_TIME_SLOT_DAYS_COUNT=3,this.MAX_TIME_SLOT_DAYS_COUNT=7,this.loadingAttemptsCount=0,this.timeSlotsDestroy$=new jt}get maxDate(){return this.bookingCloseDate}getTimeSlotDaysCount(i=!0){let o=window.innerWidth;return o>=this.COLUMN_WIDTH_7?this.MAX_TIME_SLOT_DAYS_COUNT:o>=this.COLUMN_WIDTH_5?i?this.MAX_TIME_SLOT_DAYS_COUNT-2:this.MAX_TIME_SLOT_DAYS_COUNT:this.MIN_TIME_SLOT_DAYS_COUNT}loadPrevTimeSlots(){this.loadingAttemptsCount=0,this.cancelPendingTimeSlotSearch(),this.getPrevTimeSlotList().pipe(On(this.timeSlotsDestroy$)).subscribe(i=>{this.handleLoadedTimeSlotList(i)})}loadNextTimeSlots(){this.loadingAttemptsCount=0,this.cancelPendingTimeSlotSearch(),this.getNextTimeSlotList().pipe(On(this.timeSlotsDestroy$)).subscribe(i=>{this.handleLoadedTimeSlotList(i)})}onCalendarChange(i){this.loadingAttemptsCount=0,this.cancelPendingTimeSlotSearch(),this.updateTimeSlotPeriod(i.value),this.getTimeSlotList(this.startAt,this.finishAt,1).pipe(On(this.timeSlotsDestroy$)).subscribe(o=>{this.handleLoadedTimeSlotList(o)})}loadTimeSlots(){this.loadingAttemptsCount=0,this.cancelPendingTimeSlotSearch(),this.updateTimeSlotPeriod(qe().subtract(1,"d")),this.getTimeSlotList(this.startAt,this.finishAt,1).pipe(L(i=>{let o=this.getFirstTimeSlotStartAtAfterDate(i,qe(this.startAt));return o?(this.updateTimeSlotPeriod(qe(o)),this.getTimeSlotList(this.startAt,this.finishAt,1)):me(i)}),On(this.timeSlotsDestroy$)).subscribe(i=>{this.minDate=qe(this.startAt),this.handleLoadedTimeSlotList(i)})}cancelPendingTimeSlotSearch(){this.timeSlotsDestroy$.next()}handleLoadedTimeSlotList(i){this.isNoAvailability=!i.length,this.loadingAttemptsCount=0,this.timeSlotMap=this.getTimeSlotMap(i),this.timeSlotMapDayList=this.getTimeSlotMapDayList(this.timeSlotMap),this.isPrevArrowAvailable=this.timeSlotMapDayList.length&&qe(this.startAt).isAfter(this.minDate),this.isNextArrowAvailable=this.timeSlotMapDayList.length&&(!this.bookingCloseDate||qe(this.finishAt).isBefore(this.bookingCloseDate))}getTimeSlotMapDayList(i){return Object.keys(i).sort((o,r)=>o.localeCompare(r)).slice(0,this.timeSlotDaysCount)}getPrevTimeSlotList(i){let o=i||this.startAt,r=qe(o).subtract(1,"second"),c=qe(o).subtract(this.timeSlotDaysCount,"days");
5return c.isSame(qe(),"day")&&(c=this.dateTimeService.applyTimezone(qe(),this.timezone)),this.updateTimeSlotPeriod(c,r),this.getTimeSlotList(this.startAt,this.finishAt,-1)}getNextTimeSlotList(i){let o=i||this.finishAt,r=qe(o).add(1,"second"),c=qe(o).add(this.timeSlotDaysCount,"days");return this.updateTimeSlotPeriod(r,c),this.getTimeSlotList(this.startAt,this.finishAt,1)}getTimeSlotList(i,o,r){return this.loadingAttemptsCount++,this.timeSlotList$(i,o).pipe(L(c=>c.length?me(c):this.isNextOrPrevLoadingAvailable(r,qe(i),qe(o))?r===-1?this.getPrevTimeSlotList(i):this.getNextTimeSlotList(o):(this.isNoAvailability=!0,me([]))))}isNextOrPrevLoadingAvailable(i,o,r){return this.MAX_LOADING_DAYS_DIFFERENCE>this.loadingAttemptsCount*this.timeSlotDaysCount&&(i===-1&&o.isSameOrAfter(this.bookingOpenDate?this.bookingOpenDate:qe(),"day")||i===1&&(!this.bookingCloseDate||r.isSameOrBefore(this.bookingCloseDate,"day")))}updateTimeSlotPeriod(i,o){this.startAt=this.getStartAt(i),o||(o=this.dateTimeService.addDays(this.startAt,this.timeSlotDaysCount-1)),this.finishAt=this.getFinishAt(o),this.calendarControl.setValue(this.getDateInTimezone(qe(this.startAt)))}getFirstTimeSlotStartAtAfterDate(i,o){if(i.length){let[{startAt:r}]=i,c=this.calcStartAt(qe(r));if(qe(c).isAfter(o))return c}return null}getTimeSlotMap(i){let o={};for(let r of i){let c=this.dateTimeService.applyTimezone(qe(r.startAt),this.timezone),m=c.format("YYYY-MM-DD");o[m]||(o[m]={slots:[],dayName:c.format("ddd"),date:c.format("MMM DD")});let _=c.format(td.todo_time);o[m].slots.push({slotTime:_,slotData:r})}return this.adjustTimeSlotMap(o)}adjustTimeSlotMap(i){for(let o=0;o<this.timeSlotDaysCount;o++){let r=qe(this.startAt).add(o,"days").format("YYYY-MM-DD");i[r]||(i[r]={slots:[],dayName:qe(r).format("ddd"),date:qe(r).format("MMM DD")})}return i}getStartAt(i){let o=this.calcStartAt(i),r=this.bookingOpenDate;return r&&r.isSameOrAfter(qe(o))?this.formatIso8601(r):o}getFinishAt(i){let o=this.calcFinishAt(i),r=this.bookingCloseDate;return r&&qe(o).isSameOrAfter(r)?this.formatIso8601(r):o}calcStartAt(i){return this.formatIso8601(this.getDateInTimezone(i).startOf("day"))}calcFinishAt(i){return this.formatIso8601(this.getDateInTimezone(i).endOf("day"))}getDateInTimezone(i){return this.dateTimeService.applyTimezone(i,this.timezone)}formatIso8601(i){return this.dateTimeService.format(i.utc(),"iso8601offset")}};e.\u0275fac=function(o){return new(o||e)(h(lt))},e.\u0275cmp=w({type:e,selectors:[["ng-component"]],standalone:!1,decls:0,vars:0,template:function(o,r){},encapsulation:2});let n=e;return n})();var V_=()=>({name:"arrow-left-new",color:"#949494"}),N_=()=>({name:"arrow-right-new",color:"#949494"});function U_(n,e){if(n&1){let t=S();s(0,"button",10),d(1,"translate"),P("click",function(){x(t);let o=g(2);return O(o.selectPrevDoctor())}),v(2,"lib-svg-icon",11),l()}n&2&&(G("aria-label",u(1,2,"Previous Doctor")),a(2),p("params",A(4,V_)))}function q_(n,e){if(n&1){let t=S();s(0,"button",10),d(1,"translate"),P("click",function(){x(t);let o=g(2);return O(o.selectNextDoctor())}),v(2,"lib-svg-icon",11),l()}n&2&&(G("aria-label",u(1,2,"Next Doctor")),a(2),p("params",A(4,N_)))}function z_(n,e){if(n&1){let t=S();s(0,"div",0)(1,"div",1),f(2),d(3,"translate"),l(),s(4,"div",2)(5,"div",3),_e(6,U_,3,5,"button",4),l(),s(7,"div",5),v(8,"lib-avatar-image",6),s(9,"div",7),f(10),l(),s(11,"button",8),P("click",function(){x(t);let o=g();return O(o.moveToTimeSlotPage(o.doctorsList[o.doctorIdx].id))}),f(12),d(13,"translate"),l()(),s(14,"div",9),_e(15,q_,3,5,"button",4),l()()()}if(n&2){let t=g();a(2),b(u(3,7,"Other Providers")),a(4),Ce(t.doctorIdx>0?6:-1),a(2),p("src",t.doctorsList[t.doctorIdx].image)("name",t.doctorsList[t.doctorIdx].firstName),a(2),b(t.doctorsList[t.doctorIdx].name),a(2),b(u(13,9,"SCHEDULE")),a(3),Ce((t.doctorsList==null?null:t.doctorsList.length)>1&&t.doctorIdx+1<t.doctorsList.length?15:-1)}}var Vs=(()=>{let e=class e{constructor(){this.doctorSelected=new he,this.doctorIdx=0}ngOnChanges(i){i.doctorsList&&(this.doctorIdx=0)}moveToTimeSlotPage(i){this.doctorSelected.emit(i)}selectPrevDoctor(){this.doctorIdx--}selectNextDoctor(){this.doctorIdx++}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["lib-other-providers"]],inputs:{doctorsList:"doctorsList"},outputs:{doctorSelected:"doctorSelected"},features:[wn],decls:1,vars:1,consts:[[1,"other-providers"],[1,"title"],[1,"doctors"],[1,"prev-container"],["type","button",1,"arrow-button"],[1,"doctor-item"],[1,"image",3,"src","name"],[1,"doctor-name"],["libButton","","type","button",3,"click"],[1,"next-container"],["type","button",1,"arrow-button",3,"click"],[3,"params"]],template:function(o,r){o&1&&_e(0,z_,16,11,"div",0),o&2&&Ce((r.doctorsList==null?null:r.doctorsList.length)>0?0:-1)},dependencies:[Ve,ve,U,T],styles:[".other-providers[_ngcontent-%COMP%]{width:15rem;padding-top:1.25rem;-webkit-user-select:none;user-select:none}.doctors[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center}.doctor-item[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:center;overflow:hidden;padding-top:8px;padding-bottom:16px;background-color:#fff;border-radius:8px;margin:0 8px}.doctor-item[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{--avatar-image-size: 130px;--avatar-font-size: 2.5rem}
5.doctor-item[_ngcontent-%COMP%] .doctor-name[_ngcontent-%COMP%]{margin:1rem 1.375rem;font-family:Roboto-bold,sans-serif}.doctor-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:160px;font-size:12px;height:35px}.title[_ngcontent-%COMP%]{font-size:1.125rem;text-align:center;color:#064060;font-family:Roboto-bold,sans-serif;letter-spacing:.0325rem;padding-bottom:25px}.prev-container[_ngcontent-%COMP%], .next-container[_ngcontent-%COMP%]{width:10px}.arrow-button[_ngcontent-%COMP%]{background:none;cursor:pointer}"],changeDetection:0});let n=e;return n})();var W_=()=>({name:"filter-bars",color:"currentColor"}),Q_=()=>({name:"info",color:"currentColor"}),G_=()=>({name:"close",color:"currentColor"}),ir=(n,e)=>e.id;function H_(n,e){if(n&1&&(s(0,"option",15),f(1),d(2,"translate"),l()),n&2){let t=e.$implicit;p("value",t.id)("disabled",!t.available),a(),y(" ",u(2,3,t.name)," ")}}function $_(n,e){if(n&1){let t=S();s(0,"li")(1,"label",12),f(2),d(3,"translate"),l(),s(4,"select",13),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.stateId,o)||(r.stateId=o),O(o)}),P("change",function(){x(t);let o=g();return O(o.onFilterChange())}),s(5,"option",14),f(6),d(7,"translate"),l(),Wt(8,H_,3,5,"option",15,ir),l()()}if(n&2){let t=g();a(2),b(u(3,5,"State")),a(2),Z("empty",!t.stateId),ye("ngModel",t.stateId),a(2),b(u(7,7,"Select ")),a(2),Qt(t.schedulingFilters.states)}}function K_(n,e){if(n&1&&(s(0,"option",15),f(1),d(2,"translate"),l()),n&2){let t=e.$implicit;p("value",t.id)("disabled",!t.available),a(),y(" ",u(2,3,t.name)," ")}}function Y_(n,e){if(n&1){let t=S();s(0,"li")(1,"label",16),f(2),d(3,"translate"),l(),s(4,"select",17),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.insuranceId,o)||(r.insuranceId=o),O(o)}),P("change",function(){x(t);let o=g();return O(o.onFilterChange())}),s(5,"option",14),f(6),d(7,"translate"),l(),Wt(8,K_,3,5,"option",15,ir),l()()}if(n&2){let t=g();a(2),b(u(3,5,"Insurance")),a(2),Z("empty",!t.insuranceId),ye("ngModel",t.insuranceId),a(2),b(u(7,7,"Select ")),a(2),Qt(t.schedulingFilters.insurances)}}function X_(n,e){if(n&1&&(s(0,"option",15),f(1),d(2,"translate"),l()),n&2){let t=e.$implicit;p("value",t.id)("disabled",!t.available),a(),y(" ",u(2,3,t.name)," ")}}function Z_(n,e){if(n&1){let t=S();s(0,"li")(1,"label",18),f(2),d(3,"translate"),l(),s(4,"select",19),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.specialtyId,o)||(r.specialtyId=o),O(o)}),P("change",function(){x(t);let o=g();return O(o.onFilterChange())}),s(5,"option",14),f(6),d(7,"translate"),l(),Wt(8,X_,3,5,"option",15,ir),l()()}if(n&2){let t=g();a(2),b(u(3,5,"Specialty")),a(2),Z("empty",!t.specialtyId),ye("ngModel",t.specialtyId),a(2),b(u(7,7,"Select ")),a(2),Qt(t.schedulingFilters.specialties)}}function J_(n,e){if(n&1&&(s(0,"option",15),f(1),d(2,"translate"),l()),n&2){let t=e.$implicit;p("value",t.id)("disabled",!t.available),a(),y(" ",u(2,3,t.name)," ")}}function eC(n,e){if(n&1){let t=S();s(0,"li")(1,"label",20),f(2),d(3,"translate"),l(),s(4,"select",21),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.visitTypeId,o)||(r.visitTypeId=o),O(o)}),P("change",function(){x(t);let o=g();return O(o.onFilterChange())}),s(5,"option",14),f(6),d(7,"translate"),l(),Wt(8,J_,3,5,"option",15,ir),l()()}if(n&2){let t=g();a(2),b(u(3,5,"Visit Type")),a(2),Z("empty",!t.visitTypeId),ye("ngModel",t.visitTypeId),a(2),b(u(7,7,"Select ")),a(2),Qt(t.schedulingFilters.visitTypes)}}function tC(n,e){if(n&1&&(s(0,"option",15),f(1),d(2,"translate"),l()),n&2){let t=e.$implicit;p("value",t.id)("disabled",!t.available),a(),y(" ",u(2,3,t.name)," ")}}function iC(n,e){if(n&1){let t=S();s(0,"li")(1,"label",22),f(2),d(3,"translate"),l(),s(4,"select",23),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.locationUuid,o)||(r.locationUuid=o),O(o)}),P("change",function(){x(t);let o=g();return O(o.onFilterChange())}),s(5,"option",14),f(6),d(7,"translate"),l(),Wt(8,tC,3,5,"option",15,ir),l()()}if(n&2){let t=g();a(2),b(u(3,5,"Location")),a(2),Z("empty",!t.locationUuid),ye("ngModel",t.locationUuid),a(2),b(u(7,7,"Select ")),a(2),Qt(t.schedulingFilters.locations)}}function nC(n,e){if(n&1&&(s(0,"option",15),f(1),d(2,"translate"),l()),n&2){let t=e.$implicit;p("value",t.id)("disabled",!t.available),a(),y(" ",u(2,3,t.name)," ")}}function oC(n,e){if(n&1){let t=S();s(0,"li")(1,"label",24),f(2),d(3,"translate"),l(),s(4,"select",25),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.departmentUuid,o)||(r.departmentUuid=o),O(o)}),P("change",function(){x(t);let o=g();return O(o.onFilterChange())}),s(5,"option",14),f(6),d(7,"translate"),l(),Wt(8,nC,3,5,"option",15,ir),l(
5)()}if(n&2){let t=g();a(2),b(u(3,5,"Department")),a(2),Z("empty",!t.departmentUuid),ye("ngModel",t.departmentUuid),a(2),b(u(7,7,"Select ")),a(2),Qt(t.schedulingFilters.departments)}}function rC(n,e){n&1&&(s(0,"p",8),v(1,"lib-svg-icon",4),f(2),d(3,"translate"),l()),n&2&&(a(),p("params",A(4,Q_)),a(),y(" ",u(3,2,"Some filter options are greyed out because they don't apply to the selected filters.")," "))}function aC(n,e){if(n&1){let t=S();s(0,"button",26),P("click",function(){x(t);let o=g();return O(o.clearFilters())}),v(1,"lib-svg-icon",4),f(2),d(3,"translate"),l()}n&2&&(a(),p("params",A(4,G_)),a(),y(" ",u(3,2,"CLEAR")," "))}function sC(n,e){if(n&1){let t=S();s(0,"li",28)(1,"lib-booking-provider-list-calendar",29),d(2,"async"),P("dateChange",function(o){x(t);let r=g(3);return O(r.onCalendarChange(o))}),l()()}if(n&2){let t=g(3);a(),p("selectedDate",u(2,3,t.calendarDate$))("minDate",t.minDate)("timezone",t.clinic.timezone)}}function lC(n,e){if(n&1&&_e(0,sC,3,5,"li",28),n&2){let t=g(2);Ce(t.isAppointmentSchedulingDisabled()?-1:0)}}function cC(n,e){if(n&1){let t=S();s(0,"ul",11),_e(1,lC,1,1),s(2,"lib-booking-provider-card-list",27),P("scheduleClick",function(o){x(t);let r=g();return O(r.onScheduleClick(o))}),l()()}if(n&2){let t=g(),i=fa(19);a(),Ce(i?1:-1),a(),p("providerList",t.providerList)("providerTimeslotMap",t.providerTimeslots)("clinicTimezone",t.clinic.timezone)("dateFrom",e)("isAdvancedSchedulingActive",!!i)("isSchedulingDisabled",t.isAppointmentSchedulingDisabled())}}var lg=(()=>{let e=class e extends Rs{constructor(){super(...arguments),this.appointmentCreateNavigationService=fe(Ge),this.isFilterListOpen=!1}getClinicUuid(){return this.activatedRoute.snapshot.queryParams.clinicUuid}onFiltersDataLoad(){super.onFiltersDataLoad(),this.isFilterListOpen=!0}onProviderListLoad(i){this.providerList=i.filter(({permission:o})=>o.scheduling||o.groupScheduling),this.loadTimeslots(!1)}selectProvider({id:i}){let o=this.getLocationIdForNavigation(),r=!!this.schedulingFilters.locations.length&&!o,c=Jt({clinicUuid:this.clinicUuid,providerId:i,userId:this.initialQueryParams.userId,patientId:this.initialQueryParams.patientId,insuranceId:this.insuranceId,specialtyId:this.specialtyId,locationId:o});this.clinicPublicApiService.getProviderDepartmentAndConsultationTypeList({clinicUuid:this.clinicUuid,providerId:i,visitTypeId:this.visitTypeId,stateId:this.stateId,departmentUuid:this.departmentUuid},!1).subscribe(([m,_])=>{let M;m.length===1&&_.length===1&&!r?(c=Oe(z({},c),{consultationTypeId:_[0].id,departmentId:m[0]}),M=this.appointmentCreateNavigationService.goToTimeSlotSelectPage):(c=Oe(z({},c),{visitTypeId:this.visitTypeId,departmentId:this.departmentUuid,stateId:this.stateId}),M=this.appointmentCreateNavigationService.goToConsultationTypeSelectPage),M.call(this.appointmentCreateNavigationService,c)})}};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["lib-patient-booking-provider-list"]],standalone:!1,features:[Y],decls:26,vars:31,consts:[[1,"header"],[1,"filter-tabs"],["type","button",1,"filter-list-tab",3,"click"],[1,"filter-tab-label"],[3,"params"],[1,"filter-list-container"],[1,"filter-list"],[1,"filters-footer"],[1,"filters-warning"],["libButton","","variant","link","type","button",1,"clear-filters"],[1,"provider-list-wrapper"],[1,"provider-list"],["for","state-select",1,"select-label","required"],["id","state-select","required","",3,"ngModelChange","change","ngModel"],["value",""],[3,"value","disabled"],["for","insurance-select",1,"select-label","required"],["id","insurance-select","required","",3,"ngModelChange","change","ngModel"],["for","specialty-select",1,"select-label","required"],["id","specialty-select","required","",3,"ngModelChange","change","ngModel"],["for","visit-type-select",1,"select-label","required"],["id","visit-type-select","required","",3,"ngModelChange","change","ngModel"],["for","location-select",1,"select-label"],["id","location-select",3,"ngModelChange","change","ngModel"],["for","department-select",1,"select-label"],["id","department-select",3,"ngModelChange","change","ngModel"],["libButton","","variant","link","type","button",1,"clear-filters",3,"click"],[3,"scheduleClick","providerList","providerTimeslotMap","clinicTimezone","dateFrom","isAdvancedSchedulingActive","
5isSchedulingDisabled"],[1,"calendar"],[3,"dateChange","selectedDate","minDate","timezone"]],template:function(o,r){if(o&1){let c=S();s(0,"div",0)(1,"ul",1)(2,"li")(3,"button",2),P("click",function(){return x(c),O(r.toggleFilterList())}),s(4,"span",3),f(5),d(6,"translate"),l(),v(7,"lib-svg-icon",4),l()()(),s(8,"div",5)(9,"ul",6),_e(10,$_,10,9,"li"),_e(11,Y_,10,9,"li"),_e(12,Z_,10,9,"li"),_e(13,eC,10,9,"li"),_e(14,iC,10,9,"li"),_e(15,oC,10,9,"li"),l(),s(16,"div",7),_e(17,rC,4,5,"p",8),_e(18,aC,4,5,"button",9),l()()(),Oo(19),d(20,"async"),s(21,"section",10),_e(22,cC,3,7,"ul",11),d(23,"async"),d(24,"applyTimezone"),d(25,"c4uDate"),l()}if(o&2){let c;a(),Z("open",r.isFilterListOpen),a(2),Z("active",r.isFilterListOpen),a(2),b(u(6,17,"Filters")),a(2),p("params",A(30,W_)),a(),Z("open",r.isFilterListOpen),a(2),Ce(r.schedulingFilters.states.length>1?10:-1),a(),Ce(r.schedulingFilters.insurances.length?11:-1),a(),Ce(r.schedulingFilters.specialties.length?12:-1),a(),Ce(r.schedulingFilters.visitTypes.length?13:-1),a(),Ce(r.schedulingFilters.locations.length?14:-1),a(),Ce(r.schedulingFilters.departments.length?15:-1),a(2),Ce(r.hasGreyedOutOptions?17:-1),a(),Ce(r.hasActiveFilters?18:-1),a(),ua(u(20,19,r.isAdvancedSchedulingActive$)),a(3),Ce((c=r.clinic&&D(25,27,D(24,24,u(23,22,r.calendarDate$),r.clinic.timezone),"first_timeslot_date"))?22:-1,c)}},dependencies:[An,En,kn,X,We,Ie,U,ve,Rr,Br,Je,ct,T,Fe],styles:['[_nghost-%COMP%]{height:100%;width:100%;display:block;overflow:auto;background-color:#80808014;-webkit-transform:translate3d(0,0,0)}.care-manager-common[_nghost-%COMP%] .day[_ngcontent-%COMP%]:not(.selected):hover, .care-manager-common [_nghost-%COMP%] .day[_ngcontent-%COMP%]:not(.selected):hover{background-color:#80808014}.care-manager-common[_nghost-%COMP%] .day.selected[_ngcontent-%COMP%]:hover, .care-manager-common [_nghost-%COMP%] .day.selected[_ngcontent-%COMP%]:hover{opacity:.7}.header[_ngcontent-%COMP%]{background-color:#fff}.filter-list-container[_ngcontent-%COMP%]{max-height:0;width:100%;margin:0 auto;overflow:hidden;transition:max-height .5s;background-color:#fff;visibility:hidden}.filter-list-container.advanced[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding-bottom:.75rem}.filter-list-container.open[_ngcontent-%COMP%]{max-height:100rem;visibility:visible}.dropdown-icon[_ngcontent-%COMP%]{margin-left:.625rem}.dropdown-icon[_ngcontent-%COMP%] svg{height:1rem;width:1rem}.filter-list-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;font-size:1rem;letter-spacing:.0325rem;background:#fff;color:#064060;font-family:Roboto-bold,sans-serif;cursor:pointer;padding:.75rem;margin-bottom:.125rem;width:100%}.filter-list[_ngcontent-%COMP%]{padding:.625rem 1rem 1.75rem;width:100%;box-sizing:border-box}.filter-list.advanced[_ngcontent-%COMP%]{padding-bottom:.75rem}.filter-list.ng-dirty[_ngcontent-%COMP%] .error[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#de000d}.filter-list.ng-dirty[_ngcontent-%COMP%] .error[_ngcontent-%COMP%] lib-date-input[_ngcontent-%COMP%] label{color:#de000d}.filter-list.ng-dirty[_ngcontent-%COMP%] .error[_ngcontent-%COMP%] lib-date-input[_ngcontent-%COMP%] input{border-color:#de000d!important}.filter-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;flex-direction:column}.filter-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .select-label[_ngcontent-%COMP%]{line-height:1.25rem;font-size:.75rem;letter-spacing:.0125rem}.filter-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .select-label.required[_ngcontent-%COMP%]:after{content:" *"}.filter-list[_ngcontent-%COMP%] li.new-patients[_ngcontent-%COMP%]{flex-direction:row;justify-content:space-between;align-items:center;margin-top:1rem!important}.filter-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]{margin-top:.625rem}.filter-tabs[_ngcontent-%COMP%]{height:4rem;display:flex;background:#fff;box-shadow:0 0 #fff inset;transition:all .5s}.filter-tabs.open[_ngcontent-%COMP%]{box-shadow:0 -1px #50505040 inset}.filter-tabs.open[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(.active){opacity:.25}.filter-tabs.open[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(.active):hover{opacity:.7}.filter-tabs[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{flex:1;height:100%}.filter-tabs[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;background:none;color:#064060;cursor:pointer;position:relative;overflow:hidden;transition:all .3s;outline-offset:-2px}.filter-tabs[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:after{content:"";display:block;position:absolute;bottom:-4px;width:100%;height:4px;background-color:#064060;transition:all .3s;opacity:.25}.filter-tabs[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover .filter-tab-label[_ngcontent-%COMP%], .filter-tabs[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover lib-svg-icon[_ngcontent-%COMP%]{opacity:.7}.filter-tabs[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]:after{bottom:0;background-color:currentColor;opacity:1}.filter-tabs[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]:hover:after{opacity:.7}.filter-tabs[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button.filter-list-tab[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:1rem;height:1rem}.filter-tabs[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button.recurring-visit-tab[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:1.375rem;height:1rem}.filter-tabs[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .filter-tab-label[_ngcontent-%COMP%]{margin-right:.625rem;font-family:Roboto-bold,sans-serif;letter-spacing:.0325rem}.provider-list-wrapper[_ngcontent-%COMP%]{height:auto;padding:1.5rem 1rem}.provider-list[_ngcontent-%COMP%]{display:block}
5.calendar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;margin:.25rem auto .875rem;width:100%}@media(min-width:700px){.filter-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.625rem 1rem}.filter-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{width:calc(50% - .5rem)}.filter-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]{margin-top:0}.filter-list.advanced[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(2){margin-top:.75rem}}.recurring-appointments-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:0 1rem;background-color:#fff;letter-spacing:.0325rem;max-height:0;transition:max-height .5s;overflow:hidden}.recurring-appointments-wrapper.open[_ngcontent-%COMP%]{max-height:13.25rem}.repeat-period-container[_ngcontent-%COMP%]{margin-top:1.5rem}.filter-list[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .repeat-period-select[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,transparent 50%,#949494 50%),linear-gradient(135deg,#949494 50%,transparent 50%);background-position:calc(100% - 20px) calc(1em + 2px),calc(100% - 15px) calc(1em + 2px);background-size:5px 5px,5px 5px,1px 1.5em;background-repeat:no-repeat;appearance:none}.filter-list[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-expand, .repeat-period-select[_ngcontent-%COMP%]::-ms-expand{display:none}.filter-list[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .repeat-period-select[_ngcontent-%COMP%]{height:2.5rem;border:1px solid #505050;border-radius:8px;appearance:none;padding:0 2rem 0 1rem;line-height:2.5rem;color:#505050;background-position:calc(100% - 1rem) 50%,calc(100% - .625rem) 50%;background-size:.375rem .375rem,.375rem .375rem;text-overflow:ellipsis;background-color:#fff}.filter-list[_ngcontent-%COMP%] select.empty[_ngcontent-%COMP%], .repeat-period-select.empty[_ngcontent-%COMP%]{border-color:#949494}.repeat-period-select[_ngcontent-%COMP%]{margin:0 1rem;width:6rem}.days-container[_ngcontent-%COMP%]{margin-top:1.5rem}.days-list[_ngcontent-%COMP%]{display:flex;margin:1rem 0 3.5rem}.days-list[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus-visible + label[_ngcontent-%COMP%]{outline:solid 2px #2A7EFB}.day[_ngcontent-%COMP%]{height:2.25rem;width:2.25rem;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;color:#064060;background-color:transparent;font-family:Roboto-bold,sans-serif;letter-spacing:0;margin:0 .3125rem}.day.selected[_ngcontent-%COMP%]{background-color:#064060;color:#fff}.filter-list[_ngcontent-%COMP%]{padding-bottom:.25rem}.filters-footer[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;align-items:flex-start;gap:.25rem 1rem;min-height:1.5rem;padding:.125rem 1rem;background-color:#fff}.filters-warning[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;gap:.5rem;margin:0;font-size:.75rem;line-height:1.2;color:#de000d}.filters-warning[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{margin-top:.0625rem;--svg-size: .8125rem}.clear-filters[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0;padding:0;background-color:transparent;color:#064060;font-family:Roboto-bold,sans-serif;font-size:.75rem;letter-spacing:.0325rem;cursor:pointer}.clear-filters[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: .5rem}.filter-list[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:disabled{color:#949494}']});let n=e;return n})();ri();var dC=["timeSlotList"],mC=()=>({name:"schedule-error",color:"#064060"}),gC=()=>({name:"calendar-new",color:"#949494"}),cg=()=>({name:"arrow-left-new",color:"#949494"}),pg=()=>({name:"arrow-right-new",color:"#949494"});function uC(n,e){if(n&1&&(s(0,"div",9),v(1,"lib-appointment-type-message",10),l()),n&2){let t=g();a(),p("message",t.consultationType.consultationTypeMessage)}}function fC(n,e){if(n&1&&(s(0,"lib-error-page",7),v(1,"lib-svg-icon",11),l()),n&2){let t=g();p("description",t.errorMessage),a(),p("params",A(2,mC))}}function hC(n,e){if(n&1){let t=S();s(0,"button",25),d(1,"translate"),P("click",function(){x(t);let o=g(2);return O(o.loadPrevTimeSlots())}),v(2,"lib-svg-icon",17),l()}n&2&&(G("aria-label",u(1,2,"Previous Set")),a(2),p("params",A(4,cg)))}function _C(n,e){n&1&&v(0,"lib-svg-icon",17),n&2&&(Zt("opacity",0),p("params",A(3,cg)))}function CC(n,e){if(n&1){let t=S();s(0,"button",25),d(1,"translate"),P("click",function(){x(t);let o=g(2);return O(o.loadNextTimeSlots())}),v(2,"lib-svg-icon",17),l()}n&2&&(G("aria-label",u(1,2,"Next Set")),a(2),p("params",A(4,pg)))}function vC(n,e){n&1&&v(0,"lib-svg-icon",17),n&2&&(Zt("opacity",0),p("params",A(3,pg)))}function yC(n,e){if(n&1&&(s(0,"th")(1,"div",30)(2,"div"),f(3),l(),s(4,"div"),f(5),l()()()),n&2){let t=e.$implicit;a(3),b(t.dayName),a(2),b(t.formattedDate)}}function PC(n,e){if(n&1){let t=S();s(0,"button",32),P("click",function(){x(t);let o=g().$implicit,r=g(4);return O(r.selectTimeSlot(o==null?null:o.slotData))}),f(1),l()}
5if(n&2){let t=g(),i=t.$implicit,o=t.index,r=g().index,c=g(3);Z("focused-cell",o===c.focusedCell.dayIndex&&r===c.focusedCell.slotIndex),p("tabindex",o===c.focusedCell.dayIndex&&r===c.focusedCell.slotIndex?0:-1),G("aria-label",i.slotTime+", "+c.timeSlotMapDayList[o].dayName+", "+c.timeSlotMapDayList[o].date),a(),y(" ",i==null?null:i.slotTime," ")}}function MC(n,e){if(n&1&&(s(0,"td"),C(1,PC,2,5,"button",31),l()),n&2){let t=e.$implicit;a(),p("ngIf",t)}}function bC(n,e){if(n&1&&(s(0,"tr"),C(1,MC,2,1,"td",28),l()),n&2){let t=e.$implicit;a(),p("ngForOf",t)}}function xC(n,e){if(n&1){let t=S();s(0,"table",26),P("keydown",function(o){x(t);let r=g(2);return O(r.onKeydown(o))}),s(1,"thead",27)(2,"tr"),C(3,yC,6,2,"th",28),l()(),s(4,"tbody",29),C(5,bC,2,1,"tr",28),l()()}if(n&2){let t=g(2);a(3),p("ngForOf",t.timeSlotMapDayList),a(2),p("ngForOf",t.timeSlotRows)}}function OC(n,e){n&1&&(s(0,"div",33)(1,"div",13),f(2),d(3,"translate"),l(),s(4,"p"),f(5),d(6,"translate"),l(),s(7,"p"),f(8),d(9,"translate"),l()()),n&2&&(a(2),y(" ",u(3,3,"We are sorry ...")," "),a(3),b(u(6,5,"It looks like there is no availability for the criteria chosen.")),a(3),b(u(9,7,"Please contact our office to schedule an appointment.")))}function wC(n,e){if(n&1){let t=S();s(0,"lib-other-providers",34),P("doctorSelected",function(o){x(t);let r=g(2);return O(r.switchProvider(o))}),l()}if(n&2){let t=g(2);p("doctorsList",t.doctorsList)}}function SC(n,e){if(n&1){let t=S();s(0,"div",8)(1,"div",12,0)(3,"h2",13),f(4),d(5,"translate"),l(),s(6,"input",14),d(7,"translate"),P("dateChange",function(o){x(t);let r=g();return O(r.onCalendarChange(o))}),l(),v(8,"mat-datepicker",15,1),s(10,"button",16),d(11,"translate"),P("click",function(){x(t);let o=V(9);return O(o.open())}),v(12,"lib-svg-icon",17),l(),s(13,"div",18,2)(15,"div",19),C(16,hC,3,5,"button",20)(17,_C,1,4,"ng-template",null,3,pe),l(),s(19,"div",21),C(20,CC,3,5,"button",20)(21,vC,1,4,"ng-template",null,4,pe),l(),C(23,xC,6,2,"table",22),l(),C(24,OC,10,9,"div",23),l(),_e(25,wC,1,1,"lib-other-providers",24),l()}if(n&2){let t=V(9),i=V(18),o=V(22),r=g();a(3),Z("hidden",!r.timeSlotMapDayList.length),a(),y(" ",u(5,17,"Date and time")," "),a(2),p("matDatepicker",t)("formControl",r.calendarControl)("min",r.minDate)("max",r.maxDate),G("aria-label",u(7,19,"Open Calendar")),a(4),G("aria-label",u(11,21,"Open Calendar")),a(2),p("params",A(23,gC)),a(4),p("ngIf",r.isPrevArrowAvailable)("ngIfElse",i),a(4),p("ngIf",r.isNextArrowAvailable)("ngIfElse",o),a(3),p("ngIf",r.timeSlotMapDayList.length),a(),p("ngIf",r.isNoAvailability),a(),Ce(r.isRescheduling?-1:25)}}var gn,Ns=(gn=class extends sg{constructor(e,t,i,o,r,c,m,_,M,I,k){super(r),this.appointmentCreateNavigationService=e,this.configService=t,this.modalWindowService=i,this.activatedRoute=o,this.clinicApiService=c,this.clinicPublicApiService=m,this.departmentApiService=_,this.timeSlotApiService=M,this.providerPublicApiService=I,this.router=k,this.params={},this.focusedCell={dayIndex:0,slotIndex:0},this.timeSlotMapDayList=[],this.timeSlotRows=[],this.unavailableTimeSlotTimestampList=[],this.isCareManagerApp=this.configService.isCareManagerApp(),this.isRescheduling=this.activatedRoute.snapshot.queryParams.cancelAppointmentId!==void 0,this.doctorsList=[],this.timeSlotList$=(R,N)=>this.timeSlotApiService.getCommonList(Oe(z({startAt:R,finishAt:N,providerId:this.params.providerId,consultationTypeId:this.params.consultationTypeId,departmentUuid:this.params.departmentId},this.params.locationId?{locationId:this.params.locationId}:{}),{clinicUuid:this.params.clinicUuid,source:"synced"}))}ngAfterViewInit(){let e=hp(window,"resize").pipe(Cp(300),eo(window.innerWidth),re(()=>window.innerWidth),ra());Jn([e,this.activatedRoute.queryParams]).pipe(ne(([,t])=>{this.params={clinicUuid:t.clinicUuid,providerId:t.providerId,departmentId:t.departmentId,consultationTypeId:t.consultationTypeId,userId:t.userId},Object.keys(this.params).length===Object.keys(Jt(this.params)).length&&(t.locationId&&(this.params=Oe(z({},this.params),{locationId:t.locationId})),t.specialtyId&&(this.params=Oe(z({},this.params),{specialtyId:t.specialtyId})))}),L(()=>this.loadTimeSlotSettings()),Le(this)).subscribe({next:()=>this.loadTimeSlots(),error:()=>{this.errorMessage=this.activatedRoute.snapshot.queryParams.cancelAppointmentId?"This appointment cannot be rescheduled at this time. Please contact our office to reschedule":"This appointment cannot be scheduled at this time. Please contact our office to schedule"}})}loadTimeSlotSettings(){return Ft([this.clinicApiService.getClinicSettings(this.params.clinicUuid),this.providerPublicApiService.getDoctorById(this.params.clinicUuid,this.params.providerId,this.isCareManagerApp?{}:{usageType:"self_scheduling"}),this.clinicApiService.getConsultationTypeById(this.params.clinicUuid,this.params.consultationTypeId,z({providerId:this.params.providerId,departmentUuid:this.params.departmentId},this.isCareManagerApp?{booking:"internal"}:{})),this.departmentApiService.getDepartmentByUuid(this.params.clinicUuid,this.params.departmentId),this.clinicApiService.getConsultationTypeSettings(this.params.providerId,this.params.consultationTypeId),this.getOtherProvidersList(),this.params.locationId?this.clinicPublicApiService.getLocationName(this.params.clinicUuid,this.params.locationId,this.params.departmentId):me("")]).pipe(ne(([e,t,i,o,r,c,m])=>{this.clinic=e,this.provider=t,this.consultationType=i,this.department=o,this.locationName=m,this.timeSlotListParams={timeSlotDaysCount:this.getTimeSlotDaysCount(c.length>0),timezone:this.department?.timezone||this.clinic.timezone,bookingOpenDate:r.bookingOpenDate&&!this.isCareManagerApp?qe(r.bookingOpenDate):void 0,bookingCloseDate:r.bookingCloseDate&&!this.isCareManagerApp?qe(r.bookingCloseDate):void 0},this.doctorsList=c}
5),re(()=>{}))}onKeydown(e){let t=()=>{let _=this.focusedCell.slotIndex;for(;_--,!(_<0);)if(this.timeSlotRows[_][this.focusedCell.dayIndex]&&!this.unavailableTimeSlotTimestampList.includes(this.timeSlotRows[_][this.focusedCell.dayIndex].slotData.startTimestamp))break;return _>=0?_:-1},i=()=>{let _=this.focusedCell.slotIndex;for(;_++,!(_>=this.timeSlotRows.length||!this.timeSlotRows[_][this.focusedCell.dayIndex]||!this.unavailableTimeSlotTimestampList.includes(this.timeSlotRows[_][this.focusedCell.dayIndex].slotData.startTimestamp)););return _<this.timeSlotRows.length&&this.timeSlotRows[_][this.focusedCell.dayIndex]?_:-1},o,r,c=!1,m=!1;switch(e.key){case"ArrowUp":e.preventDefault(),o=t(),o>=0&&(c=!0,this.focusedCell.slotIndex=o);break;case"ArrowDown":e.preventDefault(),o=i(),o>=0&&(c=!0,this.focusedCell.slotIndex=o);break;case"ArrowRight":for(e.preventDefault(),r=this.focusedCell.dayIndex;r++,!(r>=this.timeSlotMapDayList.length||(m=this.timeSlotRows.some(_=>_[r]&&!this.unavailableTimeSlotTimestampList.includes(_[r].slotData.startTimestamp)),m)););if(!m||(this.focusedCell.dayIndex=r,c=!0,this.timeSlotRows[this.focusedCell.slotIndex][this.focusedCell.dayIndex]&&!this.unavailableTimeSlotTimestampList.includes(this.timeSlotRows[this.focusedCell.slotIndex][this.focusedCell.dayIndex].slotData.startTimestamp)))break;if(o=i(),o>=0){this.focusedCell.slotIndex=o;break}o=t(),o>=0&&(this.focusedCell.slotIndex=o);break;case"ArrowLeft":for(e.preventDefault(),r=this.focusedCell.dayIndex;r--,!(r<0||(m=this.timeSlotRows.some(_=>_[r]&&!this.unavailableTimeSlotTimestampList.includes(_[r].slotData.startTimestamp)),m)););if(!m||(this.focusedCell.dayIndex=r,c=!0,this.timeSlotRows[this.focusedCell.slotIndex][this.focusedCell.dayIndex]&&!this.unavailableTimeSlotTimestampList.includes(this.timeSlotRows[this.focusedCell.slotIndex][this.focusedCell.dayIndex].slotData.startTimestamp)))break;if(o=i(),o>=0){this.focusedCell.slotIndex=o;break}o=t(),o>=0&&(this.focusedCell.slotIndex=o);break}c&&setTimeout(()=>{let _=this.timeSlotListElement.nativeElement.querySelector(".focused-cell");_&&_.focus()})}get timeSlotDaysCount(){return this.timeSlotListParams.timeSlotDaysCount}get timezone(){return this.timeSlotListParams.timezone}get bookingOpenDate(){return this.timeSlotListParams?.bookingOpenDate}get bookingCloseDate(){return this.timeSlotListParams?.bookingCloseDate}selectTimeSlot(e){this.unavailableTimeSlotTimestampList.includes(e.startTimestamp)||this.timeSlotApiService.freezePublicTimeSlot({clinicUuid:this.params.clinicUuid,doctorId:this.params.providerId,consultationId:this.params.consultationTypeId,departmentUuid:this.params.departmentId,startAtTimestamp:e.startTimestamp}).subscribe({next:()=>this.navigateToBookingConfirmation(e),error:t=>this.handleFreezeError(t,e)})}getTimeSlotMapDayList(e){return super.getTimeSlotMapDayList(e).map(t=>({date:t,dayName:e[t].dayName,formattedDate:e[t].date}))}handleLoadedTimeSlotList(e){super.handleLoadedTimeSlotList(e),this.timeSlotRows=[];let t=Math.max(...Object.values(this.timeSlotMap).map(i=>i.slots.length));for(let i=0;i<t;i++)this.timeSlotRows[i]=this.timeSlotMapDayList.map(({date:o})=>this.timeSlotMap[o].slots[i])}handleFreezeError({error:e},{startTimestamp:t}){this.unavailableTimeSlotTimestampList=[...this.unavailableTimeSlotTimestampList,t],e?.errors?.length&&this.modalWindowService.info(e.errors[0].detail)}navigateToBookingConfirmation(e){let{patientId:t,cancelAppointmentId:i}=this.activatedRoute.snapshot.queryParams;this.appointmentCreateNavigationService.goToConfirmationPage(z(z(Oe(z({},this.params),{externalId:e.externalId,startAt:e.startAt,finishAt:e.finishAt,patientId:t}),e.locationUuid?{locationId:e.locationUuid}:{}),i&&{cancelAppointmentId:i}))}getOtherProvidersList(){return this.providerPublicApiService.getDoctorsList(this.params.clinicUuid,Jt(z({consultationTypeId:this.params.consultationTypeId,departmentId:this.params.departmentId,insuranceId:this.activatedRoute.snapshot.queryParams.insuranceId,specialtyId:this.activatedRoute.snapshot.queryParams.specialtyId,teamProviderId:this.params.providerId},this.isCareManagerApp?{}:{usageType:"self_scheduling"})))}switchProvider(e){this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:Oe(z({},this.activatedRoute.snapshot.queryParams),{providerId:e})})}},gn.\u0275fac=function(t){return new(t||gn)(h(Ge),h(oe),h(rt),h(j),h(lt),h(Te),h(Yt),h(li),h(ro),h(wi),h(B))},gn.\u0275cmp=w({type:gn,selectors:[["app-time-slot-list"]],viewQuery:function(t,i){if(t&1&&ft(dC,5),t&2){let o;ht(o=_t())&&(i.timeSlotListElement=o.first)}},standalone:!1,features:[ha([{provide:hd,useClass:kd,deps:[fd]},{provide:_d,useValue:Ad}]),Y],decls:4,vars:6,consts:[["timeSlotListWrapper",""],["picker",""],["t
5imeSlotList",""],["noPrevArrow",""],["noNextArrow",""],[3,"consultationType","department","locationName","provider"],["class","message-wrapper",4,"ngIf"],[3,"description"],[1,"schedule-wrapper"],[1,"message-wrapper"],[3,"message"],["page-icon-slot","",1,"error-page-icon",3,"params"],[1,"time-slot-list-wrapper"],[1,"time-slot-list-title"],["hidden","","matInput","",3,"dateChange","matDatepicker","formControl","min","max"],["color","primary","panelClass","centered-datepicker","touchUi",""],["type","button",1,"datepicker-icon",3,"click"],[3,"params"],[1,"time-slot-list-container"],[1,"prev-arrow"],["type","button",3,"click",4,"ngIf","ngIfElse"],[1,"next-arrow"],["class","time-slot-list-map",3,"keydown",4,"ngIf"],["class","no-availability",4,"ngIf"],[3,"doctorsList"],["type","button",3,"click"],[1,"time-slot-list-map",3,"keydown"],[1,"time-slot-list-map-header"],[4,"ngFor","ngForOf"],[1,"time-slot-list-map-body"],[1,"day"],["type","button","class","time-slot",3,"focused-cell","tabindex","click",4,"ngIf"],["type","button",1,"time-slot",3,"click","tabindex"],[1,"no-availability"],[3,"doctorSelected","doctorsList"]],template:function(t,i){t&1&&(v(0,"app-appointment-create-provider-header",5),C(1,uC,2,1,"div",6),_e(2,fC,2,3,"lib-error-page",7)(3,SC,26,24,"div",8)),t&2&&(p("consultationType",i.consultationType)("department",i.department)("locationName",i.locationName)("provider",i.provider),a(),p("ngIf",!i.isCareManagerApp&&i.consultationType&&i.consultationType.isShowComment&&i.consultationType.consultationTypeMessage),a(),Ce(i.errorMessage?2:3))},dependencies:[ee,X,Up,Wa,Qa,ue,F,U,tr,is,Vs,er,T],styles:["[_nghost-%COMP%]{height:100%;display:flex;flex-direction:column;width:100%;overflow:hidden;background-color:#8080801a}.care-manager-common[_nghost-%COMP%] .time-slot-list-container[_ngcontent-%COMP%], .care-manager-common [_nghost-%COMP%] .time-slot-list-container[_ngcontent-%COMP%]{margin-bottom:1rem}.care-manager-common[_nghost-%COMP%] .time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map-body[_ngcontent-%COMP%] .time-slot-list[_ngcontent-%COMP%] .time-slot[_ngcontent-%COMP%]:hover, .care-manager-common [_nghost-%COMP%] .time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map-body[_ngcontent-%COMP%] .time-slot-list[_ngcontent-%COMP%] .time-slot[_ngcontent-%COMP%]:hover{color:#fff;background-color:var(--branding-primary-color, #064060)}.message-wrapper[_ngcontent-%COMP%]{padding:0 2.1875rem}.schedule-wrapper[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap;overflow:auto;padding-bottom:1rem;column-gap:1rem}.time-slot-list-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;padding:1.25rem 0 0}.time-slot-list-wrapper[_ngcontent-%COMP%] .datepicker-icon[_ngcontent-%COMP%]{position:absolute;right:2.625rem;top:.75rem;margin-left:.5rem;background:#fff;padding:.375rem .625rem;border-radius:8px;cursor:pointer}.time-slot-list-title[_ngcontent-%COMP%]{margin:0;display:flex;justify-content:center;font-size:1.125rem;padding-bottom:1.5rem;line-height:1.375rem;color:#064060;font-family:Roboto-bold,sans-serif;letter-spacing:.0325rem}.time-slot-list-title.hidden[_ngcontent-%COMP%]{opacity:0}.time-slot-list-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center}.time-slot-list-container[_ngcontent-%COMP%] .prev-arrow[_ngcontent-%COMP%], .time-slot-list-container[_ngcontent-%COMP%] .next-arrow[_ngcontent-%COMP%]{padding-top:30px}.time-slot-list-container[_ngcontent-%COMP%] .prev-arrow[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .time-slot-list-container[_ngcontent-%COMP%] .next-arrow[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;background:none}.time-slot-list-container[_ngcontent-%COMP%] .prev-arrow[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%], .time-slot-list-container[_ngcontent-%COMP%] .next-arrow[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 16px}.time-slot-list-container[_ngcontent-%COMP%] .prev-arrow[_ngcontent-%COMP%]{padding-right:.5rem}.time-slot-list-container[_ngcontent-%COMP%] .next-arrow[_ngcontent-%COMP%]{padding-left:.5rem;order:1}.time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map[_ngcontent-%COMP%]{display:flex;flex-direction:column}.time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map[_ngcontent-%COMP%] thead[_ngcontent-%COMP%], .time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], .time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:block}.time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:0 5px 5px}.time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map-header[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]{font-size:16px;height:80px;width:96px;overflow:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;background-color:#fff;border-bottom-left-radius:8px;border-bottom-right-radius:8px;letter-spacing:.0325rem}.time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map-header[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:nowrap}.time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map-body[_ngcontent-%COMP%]{padding-top:2px}.time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{width:96px;padding:0 5px}.time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map-body[_ngcontent-%COMP%] .time-slot[_ngcontent-%COMP%]{justify-content:center;align-items:center;display:flex;cursor:pointer;height:35px;margin-bottom:5px;font-size:14px;font-family:Roboto-bold,sans-serif;color:var(--branding-primary-color, #064060);border-radius:8px;background-color:#fff;letter-spacing:.0275rem;width:100%}.no-availability[_ngcontent-%COMP%]{margin-top:2rem;text-align:center}.no-availability[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:1.5;letter-spacing:.033rem}lib-error-page[_ngcontent-%COMP%]{--error-page-background-color: #fff}.error-page-icon[_ngcontent-%COMP%]{margin:2rem auto 0;border-radius:50%;height:10.3125rem;width:10.3125rem;background-color:#f5f5f5;display:flex;justify-content:center;align-items:center}.error-page-icon[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 3.75rem;margin-left:10%}@media only screen and (max-width:440px){.time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map-header[_ngcontent-%COMP%] .day[_ngcontent-%COMP%], .time-slot-list-container[_ngcontent-%COMP%] .time-slot-list-map-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{width:75px}}@media only screen and (max-width:908px){.schedule-wrapper[_ngcontent-%COMP%]{column-gap:.25rem}}"]}),gn);Ns=Xe([et(),ut("design:paramtypes",[Ge,oe,rt,j,lt,Te,Yt,li,ro,wi,B])],Ns);var nr=[Tt.ACCOUNT_SETTINGS,Tt.DOCUMENTS,Tt.GRAPH,Tt.PROVIDERS,Tt.LANGUAGE,Tt.FAMILY];var TC=["contentContainer"],kC=["contentTemplate"],AC=n=>({"wrapper-menu-open":n});function EC(n,e){if(n&1){let t=S();s(0,"li")(1,"label",10)(2,"input",11),P("change",function(){let o=x(t).$implicit,r=g(2);return O(r.applyLanguage(o.isoCode))}),l(),s(3,"span",12),f(4,"\xA0"),l(),s(5,"strong",13),f(6),d(7,"translate"),l()()()}if(n&2){let t=e.$implicit,i=g(2);a(2),p("value",t.isoCode)("checked",i.isCurrentLanguage(t.isoCode)),a(4),b(u(7,3,t.title))}}function FC(n,e){if(n&1){let t=S();s(0,"div",3)(1,"header")(2,"app-my-care-plan-header",4),P("toggleMenu",function(){x(t);let o=g();return O(o.openMenu())}),l()(),s(3,"section",5)(4,"h1",6),f(5),d(6,"translate"),l(),s(7,"fieldset")(8,"legend",7),f(9),d(10,"translate"),l(),s(11,"ul",8),C(12,EC,8,5,"li",9),d(13,"async"),l()()()()}if(n&2){let t=g();p("ngClass",ce(10,AC,t.sideMenuService.isSideMenuOpen)),a(5),y(" ",u(6,4,"Language")," "),a(4),y(" ",u(10,6,"Language")," "),a(3),p("ngForOf",u(13,8,t.languageList$))}}var mg=(()=>{let e=class e{constructor(i,o,r,c,m,_,M,I,k){this.activatedRoute=i,this.router=o,this.currentUser=r,this.configService=c,this.userApiService=m,this.translateService=_,this.sideMenuService=M,this.quickLinkAppTypeService=I,this.infoApiService=k,this.sideMenuConfig=this.activatedRoute.snapshot.data.sideMenuConfig||nr,this.languageList$=this.infoApiService.getUiLanguageList(
5),this.onLanguageApplied=()=>{this.containerRef.clear(),this.containerRef.createEmbeddedView(this.templateRef)}}openMenu(){this.sideMenuService.openSideMenu(),this.configService.isQuicklinkApp()&&this.quickLinkAppTypeService.isMessagingApp()?this.router.navigate(["/user/message"]):this.quickLinkAppTypeService.isCareplanApp()?this.router.navigate(["/user/task-feed"]):this.router.navigate(["/user/appointment"])}applyLanguage(i){this.isCurrentLanguage(i)||(i?this.currentUser.getModel().pipe(L(o=>this.userApiService.patchCommunicationLanguage(o.id,i)),L(()=>this.translateService.applyLanguage(i))).subscribe(this.onLanguageApplied):this.translateService.applyLanguage(i).subscribe(this.onLanguageApplied))}isCurrentLanguage(i){return this.translateService.getLanguage()===i}toggleMenu(){this.sideMenuService.isSideMenuOpen?this.sideMenuService.closeSideMenu():this.sideMenuService.openSideMenu()}};e.\u0275fac=function(o){return new(o||e)(h(j),h(B),h(It),h(oe),h(Ze),h(qt),h(vt),h(Zl),h($i))},e.\u0275cmp=w({type:e,selectors:[["app-languages"]],viewQuery:function(o,r){if(o&1&&(ft(TC,5,da),ft(kC,5,ca)),o&2){let c;ht(c=_t())&&(r.containerRef=c.first),ht(c=_t())&&(r.templateRef=c.first)}},standalone:!1,decls:4,vars:1,consts:[["contentContainer",""],["contentTemplate",""],[3,"ngTemplateOutlet"],[1,"languages",3,"ngClass"],[3,"toggleMenu"],["aria-labelledby","language-title",1,"wrapper"],["id","language-title"],[1,"sr-only"],[1,"list"],[4,"ngFor","ngForOf"],[1,"radio-container"],["type","radio","name","language",3,"change","value","checked"],[1,"mark"],[1,"label"]],template:function(o,r){if(o&1&&(Lt(0,2,0),C(2,FC,14,12,"ng-template",null,1,pe)),o&2){let c=V(3);p("ngTemplateOutlet",c)}},dependencies:[qo,He,ue,Pi,T,Fe],styles:['.wrapper[_ngcontent-%COMP%]{width:100%;max-width:820px;margin-left:auto;margin-right:auto;box-sizing:border-box;padding:20px 35px;letter-spacing:.53px;font-size:16px}.wrapper[_ngcontent-%COMP%]:after{content:"";display:block;padding-bottom:50px}.wrapper[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px;color:#064060;font-family:Roboto-medium,sans-serif;text-align:center;padding:0 0 38px}label[_ngcontent-%COMP%]{display:block;font-size:12px;margin-bottom:4px}input[_ngcontent-%COMP%]{font-size:16px!important;min-height:32px!important}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}.list-content[_ngcontent-%COMP%]{display:flex;flex:1}.list-wrapper[_ngcontent-%COMP%]{display:flex;flex:1;width:100%}.element[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1rem;border-top:1px solid #e6e6e6;align-items:center;justify-content:space-between;color:#505050;font-size:.9rem;cursor:pointer;-webkit-overflow-scrolling:touch}.element[_ngcontent-%COMP%]:last-child, .element[_ngcontent-%COMP%] .last[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 .5rem;overflow:hidden;flex:1;line-height:1.3rem}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%], .element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:block}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{margin-bottom:.3rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;flex:.2;--avatar-image-size: 2rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg, .element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:2rem;height:2rem;min-width:1rem;min-height:1rem;background-size:2rem}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{color:#a7a7a7;display:flex;align-items:center;font-family:Roboto-medium,sans-serif}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:1.4rem;height:1.4rem}.wrapper-menu-open[_ngcontent-%COMP%]{transform:translate3d(-80%,0,0);position:absolute;z-index:2;width:100%;border-right:1px solid #e6e6e6}.app-menu-closed[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;right:0;z-index:-999}.app-menu-closed[_ngcontent-%COMP%] .menu-open[_ngcontent-%COMP%]{display:none}.menu-open[_ngcontent-%COMP%]{display:block;z-index:1}.cover[_ngcontent-%COMP%]{display:none;width:20%;height:100%;position:absolute;top:0;left:0;z-index:3}
5.cover-menu-open[_ngcontent-%COMP%]{display:block}.languages[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;align-items:center}.languages[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center}.languages[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:center;min-height:3.5rem;width:100%}.languages[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding-bottom:30px}.languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%]{display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;justify-content:flex-start;font-size:16px;font-weight:700;display:inline-flex}.languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{position:absolute;height:20px;width:20px;background-color:transparent;border:1px solid #949494;border-radius:50%;display:flex;align-items:center;justify-content:center}.languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:1.8rem;white-space:nowrap}.languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%], .languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]{background-color:var(--branding-primary-color);border-color:var(--branding-primary-color)}.languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{position:absolute;width:8px;height:8px;border-radius:50%;background:#fff}.languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{position:static}.languages[_ngcontent-%COMP%] .radio-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:19px}']});let n=e;return n})();var Us=()=>({standalone:!0});function LC(n,e){n&1&&(se(0),f(1),d(2,"translate"),le()),n&2&&(a(),y(" ",u(2,1,"Use 8 or more characters with a mix of letters, numbers & symbols")," "))}function DC(n,e){n&1&&(f(0),d(1,"translate")),n&2&&y(" ",u(1,1,"Please set a new password of a minimum of 8 characters.")," ")}function BC(n,e){if(n&1&&(s(0,"div")(1,"h1",7),f(2),d(3,"translate"),l(),s(4,"p",8),C(5,LC,3,3,"ng-container",9)(6,DC,2,3,"ng-template",null,0,pe),l()()),n&2){let t=V(7),i=g(2);a(2),b(u(3,3,"Choose new password")),a(3),p("ngIf",i.user.memberType===i.ParticipantTypeEnum.DOCTOR)("ngIfElse",t)}}function RC(n,e){if(n&1&&(s(0,"div",16),f(1),d(2,"translate"),l()),n&2){let t=g(3);a(),y(" ",u(2,1,t.passwordError)," ")}}function VC(n,e){if(n&1){let t=S();s(0,"div",10)(1,"label",11),f(2),d(3,"translate"),l(),s(4,"input",12),Me("ngModelChange",function(o){x(t);let r=g(2);return Pe(r.newPassword,o)||(r.newPassword=o),O(o)}),l(),v(5,"lib-password-complexity-info"),s(6,"label",13),f(7),d(8,"translate"),l(),s(9,"input",14),Me("ngModelChange",function(o){x(t);let r=g(2);return Pe(r.repeatPassword,o)||(r.repeatPassword=o),O(o)}),l(),C(10,RC,3,3,"div",15),l()}if(n&2){let t=g(2);a(2),b(u(3,7,"Password")),a(2),p("ngModelOptions",A(11,Us)),ye("ngModel",t.newPassword),a(3),b(u(8,9,"Confirm password")),a(2),p("ngModelOptions",A(12,Us)),ye("ngModel",t.repeatPassword),a(),p("ngIf",t.passwordError)}}function NC(n,e){if(n&1&&(s(0,"div",16),f(1),d(2,"translate"),l()),n&2){let t=g(3);a(),y(" ",u(2,1,t.securityError)," ")}}function UC(n,e){if(n&1){let t=S();s(0,"div",10)(1,"h1",17),f(2),d(3,"translate"),l(),s(4,"p"),f(5),d(6,"translate"),l(),s(7,"label",18),f(8),d(9,"translate"),l(),s(10,"input",19),Me("ngModelChange",function(o){x(t);let r=g(2);return Pe(r.securityQuestion,o)||(r.securityQuestion=o),O(o)}),l(),s(11,"label",20),f(12),d(13,"translate"),l(),s(14,"input",21),Me("ngModelChange",function(o){x(t);let r=g(2);return Pe(r.securityAnswer,o)||(r.securityAnswer=o),O(o)}),l(),C(15,NC,3,3,"div",15),l()}if(n&2){let t=g(2);a(2),y(" ",u(3,9,"Set a security question")," "),a(3),y(" ",u(6,11,"Set a security question and reply, e.g. My mother's maiden name or My first car")," "),a(3),b(u(9,13,"Security question")),a(2),p("ngModelOptions",A(17,Us)),ye("ngModel",t.securityQuestion),a(2),b(u(13,15,"Security answer")),a(2),p("ngModelOptions",A(18,Us)),ye("ngModel",t.securityAnswer),a(),p("ngIf",t.securityError)}}function qC(n,e){if(n&1){let t=S();s(0,"div",2),C(1,BC,8,5,"div",3),s(2,"form",4),d(3,"translate"),P("ngSubmit",function(){x(t);let o=g();return O(o.saveSecurityInfo())}),C(4,VC,11,13,"div",5)(5,UC,16,19,"div",5),s(6,"button",6),f(7),d(8,"translate"),l()()()}if(n&2){let t=g();a(),p("ngIf",t.user.isResetPasswordRequired),a(),G("aria-label",u(3,5,"Security")),a(2),p("ngIf",t.user.isResetPasswordRequired),a(),p("ngIf",t.user.isSecurityQuestionEmpty),a(2),y(" ",u(8,7,"Save")," ")}}var gg=(()=>{let e=class e{constructor(i,o,r,c,m,_,M,I,k){this.appointmentCreateNavigationService=i,this.userSecurityApiService=o,this.doctorRegistrationService=r,this.router=c,this.currentUser=m,this.errorService=_,this.activatedRoute=M,this.userStorageService=I,this.providerChangePasswordService=k,this.ParticipantTypeEnum=Ue}ngOnInit(){this.currentUser.getModel().subscribe(i=>this.user=i),this.errorService.initError()}saveSecurityInfo(){Ft([this.user.isResetPasswordRequired?this.updatePassword():me(!0),this.user.isSecurityQuestionEmpty?this.saveSecurityQuestion():me(!0)]).pipe(ge(([i,o])=>i&&o),ne(()=>{this.user.memberType===Ue.DOCTOR&&this.providerChangePasswordService.setIfProviderShouldChangePassword(!1)}),L(()=>this.userStorageService.setUser(this.user))).subscribe(()=>this.redirectToNeededPage())}redirectToNeededPage(){let i=this.activatedRoute.snapshot.queryParams;this.appointmentCreateNavigationService.isAppointmentBookingRequired(i)?this.router.navigate([this.user.role,"appointment"],{queryParams:z({cameFrom:`${this.user.role}/security`,userId:this.user.id},i)}):this.router.navigate([""])}updatePassword(){return this.passwordError=void 0,this.newPassword&&this.repeatPassword&&this.newPassword===this.repeatPassword?(this.user.memberType===Ue.DOCTOR?this.doctorRegistrationService.patchPassword(this.user.memberId,this.newPassword):this.userSecurityApiService.savePassword({newPassword:this.newPassword})).pipe(ne(()=>this.user.isResetPasswordRequired=!1),re(()=>!0),Pt(o=>(o?.error?.errors?.length>0&&(this.passwordError=o.error.errors[0]),me(!1)))):(this.passwordError="Passwords do not match",me(!1))}saveSecurityQuestion(){return this.securityError=void 0,this.securityQuestion&&!this.securityAnswer||!this.securityQuestion&&this.securityAnswer?(this.securityError="Both security question and reply should be provided",me(!1)):!this.securityQuestion&&!this.securityAnswer?me(!0):(this.user.memberType===Ue.DOCTOR?this.doctorRegistrationService.patchSecurityQuestion(this.user.memberId,this.securityQuestion,this.securityAnswer):this.userSecurityApiService.updateQuestion({question:this.securityQuestion,answer:this.securityAnswer})).pipe(ne(()=>this.user.isSecurityQuestionEmpty=!1),re(()=>!0),Pt(o=>(o?.error?.errors?.length>0&&(this.securityError=o.error.errors[0]),me(!1))))}};e.\u0275fac=function(o){return new(o||e)(h(Ge),h(rd),h(sd),h(B),h(It),h(Ii),h(j),h(ki),h(Lo))},e.\u0275cmp=w({type:e,selectors:[["app-user-security"]],standalone:!1,decls:1,vars:1,consts:[["isDefaultUserRoleUser",""],["class","login-body",4,"ngIf"],[1,"login-body"],[4,"ngIf"],[3,"ngSubmit"],["class","fields-wrapper",4,"ngIf"],["libButton","","type","submit",1,"login-btn"],[1,"title"],[1,"desc"],[4,"ngIf","ngIfElse"],[1,"fields-wrapper"],["for","new-password"],["id","new-password","autocomplete","new-password","minlength","1","maxlength","100","type","password","required","",1,"new-password",3,"ngModelChange","ngModelOptions","ngModel"],["for","confirm-password"],["id","confirm-password","autocomplete","new-password","minlength","6","maxlength","100","type","password","required","",3,"ngModelChange","ngModelOptions","ngModel"],["class","error","aria-live","polite","role","alert",4,"ngIf"],["aria-live","polite","role","alert",1,"error"],[1,"subtitle"],["for","security-question"],["id","security-question","minlength","1","maxlength","100","type","text",1,"security-question",3,"ngModelChange","ngModelOptions","ngModel"],["for","security-answer"],["id","security-answer","minlength","6","maxlength","100","type","password",3,"ngModelChange","ngModelOptions","ngModel"]],template:function(o,r){o&1&&C(0,qC,9,9,"div",1),o&2&&p("ngIf",r.user)},dependencies:[je,ee,X,Ne,We,Ma,ko,Ie,Gi,Vo,F,ve,T],styles:[".login-body[_ngcontent-%COMP%]{display:flex;flex:1;justify-content:center;flex-direction:column;margin:0 auto;align-items:center;height:fit-content;overflow-y:auto;max-width:22rem}.login-body[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{text-align:center;font-family:Roboto-bold,sans-serif;font-size:1.2rem;color:#064060;padding:2rem 0 1rem}.login-body[_ngcontent-%COMP%] h1.title[_ngcontent-%COMP%]{flex:.2;display:flex;align-items:center;justify-content:center}.login-body[_ngcontent-%COMP%] h1.subtitle[_ngcontent-%COMP%]{margin:1.5rem auto .7rem}.login-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 auto;text-align:center;width:90%;padding-bottom:1rem;line-height:1.3rem}.login-body[_ngcontent-%COMP%] p.desc[_ngcontent-%COMP%]{padding-bottom:3rem;line-height:1.3rem}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{flex:.8;display:flex;flex-direction:column;justify-content:center;align-items:center;width:80%}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .fields-wrapper[_ngcontent-%COMP%]{width:100%}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;line-height:1.5;font-size:.75em;text-align:left}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff;font-size:1rem;padding:.5rem 1rem}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input.new-password[_ngcontent-%COMP%], .login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] input.security-question[_ngcontent-%COMP%]{margin-bottom:.75rem}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{margin-top:.4rem;line-height:1rem}.login-body[_ngcontent-%COMP%] form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:2rem 0 1rem}"]});let n=e;return n})();var ug=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["app-general-layout"]],standalone:!1,decls:1,vars:0,template:function(o,r){o&1&&v(0,"router-outlet")},dependencies:[Hi],encapsulation:2});let n=e;return n})();var fg={path:"",redirectTo:"/guest/landing",pathMatch:"full"},hg={path:"",redirectTo:"/user/appointment",pathMatch:"full"},_g={path:"**",redirectTo:"/provider/appointment"};var Cg=[];var vg=n=>({"background-color":n}),yg=(()=>{let e=class e{constructor(i,o,r,c){this.activatedRoute=i,this.router=o,this.brandConfigService=r,this.forgotCredentialService=c,this.selectedUrl=null,this.colorLanding=this.brandConfigService.getAppBrandSetup().colorLanding}onBackClick(){this.router.navigate(["/guest/login"],{queryParams:this.activatedRoute.snapshot.queryParams})}onNextClick(){this.forgotCredentialService.selectedActivationChannel=null,this.router.navigate([this.selectedUrl],{queryParams:this.activatedRoute.snapshot.queryParams})}};e.\u0275fac=function(o){return new(o||e)(h(j),h(B),h(ci),h(Ln))},e.\u0275cmp=w({type:e,selectors:[["ng-component"]],standalone:!1,decls:22,vars:18,consts:[["passwordRadioButton",""],["usernameRadioButton",""],[1,"wrapper"],[1,"title"],[1,"field-radio-button"],["type","radio","name","credential","value","/guest/forgot-password","required","",3,"ngModelChange","ngModel"],[1,"mark",3,"ngStyle"],[1,"label"],["type","radio","name","credential","value","/guest/forgot-username",3,"ngModelChange","ngModel"],[3,"backCl
5ick","nextClick","disableNextButton"]],template:function(o,r){if(o&1){let c=S();s(0,"div",2)(1,"form")(2,"fieldset")(3,"legend",3),f(4),d(5,"translate"),l(),s(6,"div",4)(7,"label")(8,"input",5,0),Me("ngModelChange",function(_){return x(c),Pe(r.selectedUrl,_)||(r.selectedUrl=_),O(_)}),l(),v(10,"span",6),s(11,"strong",7),f(12),d(13,"translate"),l()(),s(14,"label")(15,"input",8,1),Me("ngModelChange",function(_){return x(c),Pe(r.selectedUrl,_)||(r.selectedUrl=_),O(_)}),l(),v(17,"span",6),s(18,"strong",7),f(19),d(20,"translate"),l()()()()(),s(21,"app-forgot-password-pagination",9),P("backClick",function(){return x(c),O(r.onBackClick())})("nextClick",function(){return x(c),O(r.onNextClick())}),l()()}if(o&2){let c=V(9),m=V(16);a(4),y(" ",u(5,8,"Please let us know how we can help you with your account:")," "),a(4),ye("ngModel",r.selectedUrl),a(2),p("ngStyle",ce(14,vg,c.checked?r.colorLanding:"transparent")),a(2),y(" ",u(13,10,"I forgot my password")," "),a(3),ye("ngModel",r.selectedUrl),a(2),p("ngStyle",ce(16,vg,m.checked?r.colorLanding:"transparent")),a(2),y(" ",u(20,12,"I forgot my username")," "),a(2),p("disableNextButton",!r.selectedUrl)}},dependencies:[Wn,je,ee,Tn,X,Ne,We,Ie,Gi,Io,T],styles:['[_nghost-%COMP%]{overflow:initial} app-forgot-password-channel{height:100%}.wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%}.wrapper[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{margin-bottom:1rem}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:1rem 0 2rem}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;justify-content:flex-start;margin-top:1.5rem}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{position:absolute;height:1.2rem;width:1.2rem;background-color:transparent;border:1px solid #949494;border-radius:50%;display:flex;align-items:center;justify-content:center}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:1.8rem;white-space:nowrap}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%], .wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]{background-color:#1b75bc;border-color:#1b75bc}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{position:absolute;width:.5rem;height:.5rem;border-radius:50%;background:#fff}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:3rem;display:flex;white-space:normal;line-height:normal}.wrapper[_ngcontent-%COMP%] .question-text[_ngcontent-%COMP%]{text-align:center;margin-bottom:.5rem}.wrapper[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center;line-height:1.5;text-align:center;justify-content:center}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid #8f288b;align-items:center;margin-top:1.5rem;width:100%;overflow:hidden;min-height:2rem}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;border-radius:4px;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border:none;padding:.5rem 0}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.wrapper[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{display:flex;margin-top:.5rem;line-height:1rem}'],changeDetection:0});let n=e;return n})();var Pg=(()=>{let e=class e{constructor(i,o,r,c,m){this.formBuilder=i,this.userApiService=o,this.forgotCredentialService=r,this.router=c,this.activatedRoute=m,this.form=this.formBuilder.group({firstName:[,at.required],lastName:[,at.required],birthDate:[,at.required]}),this.error=null,this.channelSelectStepUrl="../channel-step",this.sentUsernameUrl="../sent-info-step"}onBackClick(){this.router.navigate(["/guest/credential-recovery-select"],{queryParams:this.activatedRoute.snapshot.queryParams})}
5runForgotUsernameFlow(){this.form.invalid||this.userApiService.findUser(this.form.value).pipe(ne(i=>this.onUserFound(i)),ge(({email:i,phone:o})=>!i||!o),L(({id:i,email:o})=>this.userApiService.sendUsernamePublic(i,{channel:o?"email":"sms"}))).subscribe({next:()=>this.router.navigate([this.sentUsernameUrl],{relativeTo:this.activatedRoute,queryParams:this.activatedRoute.snapshot.queryParams}),error:({error:i})=>this.error=i?.errors&&(i.errors[0]?.detail||i.errors.join(", "))})}resetError(){this.error=null}onUserFound(i){this.forgotCredentialService.foundUserResponse=i,this.forgotCredentialService.changeChannelFormats(),i.email&&i.phone?this.router.navigate([this.channelSelectStepUrl],{relativeTo:this.activatedRoute,queryParams:this.activatedRoute.snapshot.queryParams}):this.forgotCredentialService.selectedActivationChannel={type:i.email?"email":"sms",value:i[i.email?"email":"phone"]}}};e.\u0275fac=function(o){return new(o||e)(h(Nt),h(Ze),h(Ln),h(B),h(j))},e.\u0275cmp=w({type:e,selectors:[["app-forgot-username-form-step"]],standalone:!1,decls:25,vars:19,consts:[[1,"title"],[1,"forgot-username-form",3,"input","ngSubmit","formGroup"],[1,"input-group"],[1,"text"],["type","text","autocomplete","given-name","formControlName","firstName","required","",1,"input",3,"libAutoFocus"],["type","text","autocomplete","family-name","formControlName","lastName","required","",1,"input"],["formControlName","birthDate","monthAutocomplete","bday-month","dayAutocomplete","bday-day","yearAutocomplete","bday-year",3,"hideLabels"],["role","alert",1,"error"],[3,"nextClick","backClick","disableNextButton"]],template:function(o,r){o&1&&(s(0,"div",0),f(1),d(2,"translate"),l(),s(3,"form",1),P("input",function(){return r.resetError()})("ngSubmit",function(){return r.runForgotUsernameFlow()}),s(4,"label",2)(5,"span",3),f(6),d(7,"translate"),l(),v(8,"input",4),l(),s(9,"label",2)(10,"span",3),f(11),d(12,"translate"),l(),v(13,"input",5),l(),s(14,"label",2)(15,"fieldset")(16,"legend"),f(17),d(18,"translate"),l(),v(19,"lib-date-input",6),l()()(),s(20,"p",7),f(21),d(22,"translate"),l(),s(23,"div")(24,"app-forgot-password-pagination",8),P("nextClick",function(){return r.runForgotUsernameFlow()})("backClick",function(){return r.onBackClick()}),l()()),o&2&&(a(),y(" ",u(2,9,"Complete the form below with your information"),` 6`),a(2),p("formGroup",r.form),a(3),b(u(7,11,"First Name")),a(2),p("libAutoFocus",!0),a(3),b(u(12,13,"Last Name")),a(6),y(" ",u(18,15,"Date of Birth")," "),a(2),p("hideLabels",!0),a(2),b(u(22,17,r.error)),a(3),p("disableNextButton",r.form.invalid))},dependencies:[Wn,je,ee,X,Ne,We,tt,st,Kl,oo,T],styles:["[_nghost-%COMP%]{display:block;overflow:initial}.title[_ngcontent-%COMP%]{text-align:center;line-height:24px;margin-bottom:50px}.input-group[_ngcontent-%COMP%]{display:block;margin-bottom:16px}.text[_ngcontent-%COMP%]{display:block;font-size:12px;margin-bottom:4px}legend[_ngcontent-%COMP%]{font-size:12px;position:absolute;margin:0 auto}.error[_ngcontent-%COMP%]{font-size:12px;text-align:center;margin-bottom:30px}.input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff;font-size:1rem}.input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.input.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.input[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}"]}
6);let n=e;return n})();var Mg=n=>({"background-color":n});function zC(n,e){if(n&1&&(s(0,"div",10),f(1),d(2,"translate"),l()),n&2){let t=g();a(),y(" ",u(2,1,t.error)," ")}}var bg=(()=>{let e=class e extends dd{constructor(i,o,r,c,m){super(i,o,r,c),this.brandConfigService=m,this.colorLanding=this.brandConfigService.getAppBrandSetup().colorLanding}};e.\u0275fac=function(o){return new(o||e)(h(B),h(j),h(Ln),h(Ze),h(ci))},e.\u0275cmp=w({type:e,selectors:[["app-forgot-username-select-channel"]],standalone:!1,features:[Y],decls:20,vars:20,consts:[[1,"wrapper"],[1,"title"],[3,"formGroup"],[1,"field-radio-button"],["type","radio","value","sms","formControlName","channel","name","channel","required",""],[1,"mark",3,"ngStyle"],[1,"label"],["type","radio","value","email","formControlName","channel","name","channel"],["class","error","role","alert",4,"ngIf"],[3,"backClick","nextClick","disableNextButton"],["role","alert",1,"error"]],template:function(o,r){o&1&&(s(0,"div",0)(1,"div",1),f(2),d(3,"translate"),l(),s(4,"form",2)(5,"div",3)(6,"label"),v(7,"input",4)(8,"span",5),s(9,"strong",6),f(10),d(11,"translate"),l()(),s(12,"label"),v(13,"input",7)(14,"span",5),s(15,"strong",6),f(16),d(17,"translate"),l()(),C(18,zC,3,3,"div",8),l()(),s(19,"app-forgot-password-pagination",9),P("backClick",function(){return r.onBackClick()})("nextClick",function(){return r.onNextClick()}),l()()),o&2&&(a(2),y(" ",u(3,10,"Choose how to receive your username.")," "),a(2),p("formGroup",r.form),a(4),p("ngStyle",ce(16,Mg,r.form.value.channel==="sms"?r.colorLanding:"transparent")),a(2),Vt(" ",u(11,12,"Text to:"),"\xA0",r.userResponse.phone," "),a(4),p("ngStyle",ce(18,Mg,r.form.value.channel==="email"?r.colorLanding:"transparent")),a(2),Vt(" ",u(17,14,"Email to:")," ",r.userResponse.email," "),a(2),p("ngIf",r.error),a(),p("disableNextButton",r.form.invalid))},dependencies:[Wn,je,ee,Tn,X,Ne,We,tt,st,F,Io,T],styles:['[_nghost-%COMP%]{overflow:initial} app-forgot-password-channel{height:100%}.wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%}.wrapper[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{margin-bottom:1rem}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:1rem 0 2rem}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;justify-content:flex-start;margin-top:1.5rem}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{position:absolute;height:1.2rem;width:1.2rem;background-color:transparent;border:1px solid #949494;border-radius:50%;display:flex;align-items:center;justify-content:center}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:1.8rem;white-space:nowrap}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%], .wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]{background-color:#1b75bc;border-color:#1b75bc}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{position:absolute;width:.5rem;height:.5rem;border-radius:50%;background:#fff}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:3rem;display:flex;white-space:normal;line-height:normal}.wrapper[_ngcontent-%COMP%] .question-text[_ngcontent-%COMP%]{text-align:center;margin-bottom:.5rem}.wrapper[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center;line-height:1.5;text-align:center;justify-content:center}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid #8f288b;align-items:center;margin-top:1.5rem;width:100%;overflow:hidden;min-height:2rem}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;border-radius:4px;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border:none;padding:.5rem 0}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.wrapper[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{display:flex;margin-top:.5rem;line-height:1rem}']});let n=e;return n})();var xg=n=>({"background-color":n});function jC(n,e){if(n&1&&(s(0,"div",10),f(1),d(2,"translate"),l()),n&2){let t=g();a(),y(" ",u(2,1,t.error)," ")}}var Og=(()=>{let e=class e extends pd{constructor(i,o,r,c,m){super(i,o,r,c),this.brandConfigService=m,this.colorLanding=this.brandConfigService.getAppBrandSetup().colorLanding}};e.\u0275fac=function(o){return new(o||e)(h(B),h(j),h(Ln),h(Ze),h(ci))},e.\u0275cmp=w({type:e,selectors:[["app-forgot-password-activation-channel"]],standalone:!1,features:[Y],decls:20,vars:20,consts:[[1,"wrapper"],[1,"title"],[3,"formGroup"],[1,"field-radio-button"],["type","radio","value","sms","formControlName","channel","name","channel","required",""],[1,"mark",3,"ngStyle"],[1,"label"],["type","radio","value","email","formControlName","channel","name","channel"],["class","error","role","alert",4,"ngIf"],[3,"backCl
6ick","nextClick","disableNextButton"],["role","alert",1,"error"]],template:function(o,r){o&1&&(s(0,"div",0)(1,"div",1),f(2),d(3,"translate"),l(),s(4,"form",2)(5,"div",3)(6,"label"),v(7,"input",4)(8,"span",5),s(9,"strong",6),f(10),d(11,"translate"),l()(),s(12,"label"),v(13,"input",7)(14,"span",5),s(15,"strong",6),f(16),d(17,"translate"),l()(),C(18,jC,3,3,"div",8),l()(),s(19,"app-forgot-password-pagination",9),P("backClick",function(){return r.onBackClick()})("nextClick",function(){return r.onNextClick()}),l()()),o&2&&(a(2),y(" ",u(3,10,"Looks like your account hasn't been activated yet. Would you like to receive your activation link by email or text?")," "),a(2),p("formGroup",r.form),a(4),p("ngStyle",ce(16,xg,r.form.value.channel==="sms"?r.colorLanding:"transparent")),a(2),Vt(" ",u(11,12,"Text to phone number"),"\xA0",r.userResponse.phone," "),a(4),p("ngStyle",ce(18,xg,r.form.value.channel==="email"?r.colorLanding:"transparent")),a(2),Vt(" ",u(17,14,"E-mail to")," ",r.userResponse.email," "),a(2),p("ngIf",r.error),a(),p("disableNextButton",r.form.invalid))},dependencies:[Wn,je,ee,Tn,X,Ne,We,tt,st,F,Io,T],styles:['[_nghost-%COMP%]{overflow:initial} app-forgot-password-channel{height:100%}.wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%}.wrapper[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{margin-bottom:1rem}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:1rem 0 2rem}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;justify-content:flex-start;margin-top:1.5rem}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{position:absolute;height:1.2rem;width:1.2rem;background-color:transparent;border:1px solid #949494;border-radius:50%;display:flex;align-items:center;justify-content:center}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:1.8rem;white-space:nowrap}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%], .wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]{background-color:#1b75bc;border-color:#1b75bc}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{position:absolute;width:.5rem;height:.5rem;border-radius:50%;background:#fff}.wrapper[_ngcontent-%COMP%] .field-radio-button[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:3rem;display:flex;white-space:normal;line-height:normal}.wrapper[_ngcontent-%COMP%] .question-text[_ngcontent-%COMP%]{text-align:center;margin-bottom:.5rem}.wrapper[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center;line-height:1.5;text-align:center;justify-content:center}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid #8f288b;align-items:center;margin-top:1.5rem;width:100%;overflow:hidden;min-height:2rem}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;border-radius:4px;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border:none;padding:.5rem 0}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.wrapper[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.wrapper[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{display:flex;margin-top:.5rem;line-height:1rem}']});let n=e;return n})();var wg=[{path:"forgot-password",component:wr,data:{title:"Forgot password"},children:[{path:"username-step",component:Nd,title:"Forgot Password | Step 1"}
6,{path:"security-question-step",component:Ud,canActivate:[Dn],title:"Forgot Password | Step 2"},{path:"receive-password-channel-step",component:qd,canActivate:[Dn],title:"Forgot Password | Step 3"},{path:"activation-link-channel-step",component:Og,canActivate:[Dn],title:"Forgot Password | Step 4"},{path:"sent-info-step",component:ds,canActivate:[Dn],title:"Forgot Password | Step 5"},{path:"**",redirectTo:"username-step"}]}];var qs=[{path:"credential-recovery-select",component:wr,children:[{path:"",component:yg}],data:{title:"How can we help?"},title:"Credential Recovery"},{path:"forgot-username",component:wr,children:[{path:"form-step",component:Pg,title:"Forgot Username | Step 1"},{path:"channel-step",component:bg,canActivate:[Dn],title:"Forgot Username | Step 2"},{path:"sent-info-step",component:ds,canActivate:[Dn],title:"Forgot Username | Step 3"},{path:"**",redirectTo:"form-step"}],data:{title:"Forgot username"}},...wg];var Sg=[{path:"",component:fo,children:[{path:"login",component:Es},{path:"landing",component:Nm},{path:"sign-up",component:Qm},...qs]}];var Ig={nutrition_sodium_potassium:{formVitalList:["potassium_intake","sodium_intake"]},nutrition_vitamins:{formVitalList:["vitamin_c","iron_intake","vitamin_a","calcium_intake"]},nutrition_carbs:{formVitalList:["sugars_intake","fiber"]},nutrition_fat:{formVitalList:["trans_fat_intake","monounsaturated_fat_intake","polyunsaturated_fat_intake","saturated_fat_intake"]},nutrition_energy:{formVitalList:["calories_intake","protein_intake","carbohydrates","fat_total"]},muscle:{formVitalList:["muscle"]},bone:{formVitalList:["bone"]},water:{formVitalList:["water"]},fat:{formVitalList:["fat"]},pain:{formVitalList:["pain"],limit:{pain:{min:0,max:10}}},calories_burned:{formVitalList:["calories_burned"]},distance:{formVitalList:["distance"]},stairs:{formVitalList:["stairs"]},steps:{formVitalList:["steps"]},calories:{formVitalList:["calories_intake","calories_burned"]},waist:{formVitalList:["waist"]},bmi:{formVitalList:["height","weight"]},weight:{formVitalList:["weight"]},temperature:{formVitalList:["temperature"]},oxygen_saturation:{formVitalList:["oxygen_saturation"]},peak_flow:{formVitalList:["peakflow_evening","peakflow_morning"]},exercise_cholesterol:{formVitalList:["cholesterol","steps"]},bmi_cholesterol:{formVitalList:["cholesterol"]},diet_cholesterol:{formVitalList:["cholesterol","saturated_fat_intake"]},triglyceride:{formVitalList:["triglyceride"]},ldl:{formVitalList:["ldl"]},hdl:{formVitalList:["hdl"]},total_cholesterol:{formVitalList:["cholesterol"]},pulse:{formVitalList:["pulse"]},blood_pressure:{formVitalList:["systolic_bp","diastolic_bp"]},insulin:{formVitalList:["blood_sugar","insulin"]},carbohydrates:{formVitalList:["blood_sugar","carbohydrates"]},blood_sugar:{formVitalList:["blood_sugar","blood_sugar_before_meal"]},exercise:{formVitalList:["blood_sugar","steps"]}};var WC=["#005A9C","#7A2E0B","#006B5B","#6A1B9A","#8A3B12","#1F4E79","#2E5E2A","#7B1E3B","#4A5568","#0F766E"],mi="#1E3A8A",At="#D97706",QC=[{color:"#1E3A8A",markerLineColor:"#FFFFFF",symbol:"circle"},{color:"#D97706",dashStyle:"ShortDash",markerLineColor:"#111827",symbol:"square"},{color:"#0F766E",dashStyle:"Dash",markerLineColor:"#FFFFFF",symbol:"diamond"},{color:"#7C2D12",dashStyle:"ShortDot",markerLineColor:"#FFFFFF",symbol:"triangle"}];function Ei(n,e="spline"){let t=QC[n];return Oe(z(z({color:t.color},t.dashStyle?{dashStyle:t.dashStyle}:{}),e==="areaspline"?{fillColor:t.color}:{}),{lineWidth:3,marker:{enabled:!0,fillColor:t.color,lineColor:t.markerLineColor,lineWidth:2,radius:5,symbol:t.symbol},type:e})}var Tg={default:{colors:WC,credits:{enabled:!1},exporting:{enabled:!1},title:{text:""},legend:{align:"center",verticalAlign:"bottom",enabled:!0,layout:"vertical",x:0,y:0},tooltip:{xDateFormat:"%B %e, %Y"},plotOptions:{series:{connectNulls:!0,states:{inactive:{enabled:!1,opacity:1}}}},xAxis:{dateTimeLabelFormats:{day:"%d"},tickInterval:864e5,title:{text:""},type:"datetime"},seriesDefaults:{type:"line"},yAxis:[],series:[]},nutrition_sodium_potassium:{series:{potassium_intake:{borderColor:mi,color:mi,type:"spline",yAxis:0,zIndex:1},sodium_intake:{borderColor:At,color:At,type:"spline",yAxis:0,zIndex:1}},yAxis:{potassium_intake:{index:0,min:0,max:5e3,opposite:0,tickAmount:12,tickInterval:500},sodium_intake:{index:1,min:0,max:5e3,opposite:0,tickAmount:12,tickInterval:500,labels:{enabled:!1}}}},nutrition_vitamins:{series:{vitamin_c:Oe(z({},Ei(0)),{yAxis:0,zIndex:1}),iron_intake:Oe(z({},Ei(1)),{yAxis:0,zIndex:1}),vitamin_a:Oe(z({},Ei(2)),{yAxis:0,zIndex:1}),calcium_intake:Oe(z({},Ei(3)),{yAxis:0,zIndex:1})},yAxis:{vitamin_c:{index:0,max:40,opposite:0,gridLineColor:"transparent",labels:{enabled:!1}},iron_intake:{index:1,max:20,opposite:0,gridLineColor:"transparent",labels:{enabled:!1}},vitamin_a:{index:2,max:80,min:0,opposite:0,tickAmount:5,tickInterval:20,labels:{enabled:!0}},calcium_intake:{index:3,max:1e7,min:0,opposite:0,gridLineColor:"transparent",labels:{enabled:!1}}}},nutrition_carbs:{series:{sugars_intake:{borderColor:mi,color:mi,type:"spline",yAxis:0,zIndex:1},fiber:{borderColor:At,color:At,type:"spline",yAxis:0,zIndex:1}},yAxis:{sugars_intake:{index:0,min:0,max:100,opposite:0,tickInterval:25},fiber:{index:1,min:0,max:100,opposite:1,tickInterval:25,gridLineColor:"transparent",labels:{enabled:!1}}}},nutrition_fat:{series:{trans_fat_intake:Oe(z({},Ei(0)),{yAxis:0,zIndex:1}),monounsaturated_fat_intake:Oe(z({},Ei(1)),{yAxis:0,zIndex:1}),polyunsaturated_fat_intake:Oe(z({},Ei(2)),{yAxis:0,zIndex:1}),saturated_fat_intake:Oe(z({},Ei(3)),{yAxis:0,zIndex:1})},yAxis:{trans_fat_intake:{index:0,max:400,opposite:0,min:0,tickInterval:5,gridLineColor:"transparent",labels:{enabled:!1}},monounsaturated_fat_intake:{index:1,max:40,min:0,opposite:1,tickInterval:5,gridLineColor:"transparent",labels:{enabled:!1}},polyunsaturated_fat_intake:{index:2,max:40,min:0,opposite:1,tickInterval:5,gridLineColor:"transparent",labels:{enabled:!1}},saturated_fat_intake:{index:3,max:40,min:0,opposite:0,tickInterval:5,labels:{enabled:!0}}}},nutrition_energy:{plotOptions:{areaspline:{lineWidth:1,stacking:"normal"}},series:{calories_intake:Oe(z({_symbolIndex:0,index:0,legendIndex:0},Ei(0)),{zIndex:2}),protein_intake:Oe(z({_symbolIndex:1,index:1,legendIndex:1},Ei(1,"areaspline")),{zIndex:1}),carbohydrates:Oe(z({_symbolIndex:2,index:2,legendIndex:2},Ei(2,"areaspline")),{zIndex:1}),fat_total:Oe(z({_symbolIndex:3,index:3,legendIndex:3},Ei(3,"areaspline")),{zIndex:1})},yAxis:{calories_intake:{index:0,opposite:0,min:0,max:2500,tickInterval:500,labels:{enabled:!0}},protein_intake:{index:1,opposite:1,gridLineColor:"transparent",labels:{enabled:!1}},carbohydrates:{index:2,opposite:0,gridLineColor:"transparent",labels:{enabled:!1}},fat_total:{index:3,opposite:1,gridLineColor:"transparent",labels:{enabled:!1}}}},muscle:{series:{muscle:{color:"#FE0197",type:"spline",yAxis:0,zIndex:5}},yAxis:{muscle:{index:0,min:0,max:75,opposite:0,tickAmount:5,tickInterval:25}}},bone:{series:{bone:{color:"#FE0197",type:"spline",yAxis:0,zIndex:5}},yAxis:{bone:{index:0,min:0,max:75,opposite:0,tickAmount:5,tickInterval:25}}},water:{series:{water:{color:"#FE0197",type:"spline",yAxis:0,zIndex:5}},yAxis:{water:{index:0,min:0,max:75,opposite:0,tickAmount:5,tickInterval:25}}},fat:{series:{fat:{color:"#FE0197",type:"spline",yAxis:0,zIndex:5}},yAxis:{fat:{index:0,min:0,max:75,opposite:0,tickAmount:5,tickInterval:25}}},pain:{chart:{plotBorderColor:"#000000",plotBorderWidth:2},series:{pain:{color:"#D730BB",type:"spline",yAxis:0,zIndex:5}},yAxis:{pain:{min:0,max:10,opposite:0,tickInterval:1,gridLineColor:"#333",plotBands:[{color:"#E5F3DE",from:0,to:3},{color:"#F5E7BF",from:3,to:6},{color:"#F6D9DF",from:6,to:10}],plotLines:[{color:"#000000",value:3,width:2,zIndex:4},{color:"#000000",value:6,width:2,zIndex:4}]}}}
6,calories_burned:{series:{calories_burned:{borderColor:"rgba(80,80,80,0.7)",color:"rgba(80,80,80,0.7)",type:"column",yAxis:0,zIndex:1}},yAxis:{calories_burned:{index:0,max:5e3,min:0,opposite:0,tickInterval:500,tickAmount:12}}},distance:{series:{distance:{borderColor:"rgba(80,80,80,0.7)",color:"rgba(80,80,80,0.7)",type:"column",yAxis:0,zIndex:1}},yAxis:{distance:{index:0,max:18,min:0,opposite:0,tickInterval:2,tickAmount:11}}},stairs:{series:{stairs:{borderColor:"rgba(80,80,80,0.7)",color:"rgba(80,80,80,0.7)",type:"column",yAxis:0,zIndex:1}},yAxis:{stairs:{index:0,max:550,min:0,opposite:0,tickInterval:50}}},steps:{series:{steps:{borderColor:"rgba(80,80,80,0.7)",color:"rgba(80,80,80,0.7)",type:"column",yAxis:0,zIndex:1}},yAxis:{steps:{index:0,max:2e3,min:0,opposite:0,tickInterval:4e3}}},calories:{series:{calories_intake:{borderColor:At,color:At,type:"column",yAxis:1,zIndex:1},calories_burned:{animation:"",color:mi,threshold:"100000",type:"area",yAxis:0,zIndex:6}},yAxis:{calories_intake:{index:1,max:4e3,min:0,opposite:0,tickAmount:10,tickInterval:500},calories_burned:{index:0,max:4e3,min:0,opposite:1,tickAmount:10,tickInterval:500,labels:{enabled:!1}}}},waist:{series:{waist:{color:"#FE0197",type:"spline",yAxis:0,zIndex:5}},yAxis:{waist:{index:0,opposite:0,max:45,min:0,tickAmount:11}}},bmi:{series:{bmi:{color:"#FE0197",type:"spline",yAxis:0,zIndex:5}},yAxis:{bmi:{index:0,opposite:0,max:35,min:15}}},weight:{series:{weight:{color:"#FE0197",type:"spline",yAxis:0,zIndex:5}},yAxis:{weight:{index:0,max:260,min:10,opposite:0,tickAmount:14,tickInterval:20}}},temperature:{series:{temperature:{color:"#FE0197",type:"spline",yAxis:0,zIndex:5}},yAxis:{temperature:{index:0,max:105,min:95,opposite:0,tickAmount:12,tickInterval:1}}},oxygen_saturation:{series:{oxygen_saturation:{color:"#FE0197",type:"spline",yAxis:0,zIndex:5}},yAxis:{oxygen_saturation:{index:0,min:0,max:75,opposite:0,tickAmount:5,tickInterval:25}}},peak_flow:{series:{peakflow_evening:{color:At,type:"spline",yAxis:0,zIndex:5},peakflow_morning:{color:mi,type:"spline",yAxis:1,zIndex:6}},yAxis:{peakflow_evening:{max:1400,min:200,opposite:1,gridLineColor:"transparent",labels:{enabled:!1}},peakflow_morning:{max:1400,min:200,opposite:0,tickAmount:5}}},exercise_cholesterol:{series:{cholesterol:{color:mi,type:"spline",yAxis:0,zIndex:5},steps:{borderColor:At,color:At,type:"column",yAxis:1,zIndex:1}},yAxis:{cholesterol:{index:0,max:400,min:0,opposite:0,tickAmount:12,tickInterval:40},steps:{gridLineColor:"transparent",index:1,max:2e3,opposite:1,tickInterval:2e3}}},bmi_cholesterol:{series:{cholesterol:{color:mi,type:"spline",yAxis:0,zIndex:5},bmi:{color:At,type:"spline",yAxis:1,zIndex:6}},yAxis:{cholesterol:{index:0,max:400,min:0,opposite:0,tickAmount:12,tickInterval:40},bmi:{gridLineColor:"transparent",index:1,opposite:1,max:36,min:16}}},diet_cholesterol:{series:{cholesterol:{color:mi,type:"spline",yAxis:0,zIndex:5,showInLegend:!1},saturated_fat_intake:{borderColor:At,color:At,type:"column",yAxis:1,zIndex:1}},yAxis:{cholesterol:{index:0,max:400,min:0,opposite:0,tickAmount:10,tickInterval:40},saturated_fat_intake:{gridLineColor:"transparent",index:1,max:80,opposite:1,tickInterval:5}}},triglyceride:{series:{triglyceride:{color:"rgb(83,119,205)",type:"spline",yAxis:0,zIndex:5}},yAxis:{triglyceride:{index:0,max:400,min:0,opposite:0,tickAmount:12,tickInterval:40}}},ldl:{series:{ldl:{color:"rgb(123,145,46)",type:"spline",yAxis:0,zIndex:5}},yAxis:{ldl:{index:0,max:200,min:0,opposite:0,tickAmount:12,tickInterval:20}}},hdl:{series:{hdl:{color:"rgb(179,119,205)",type:"spline",yAxis:0,zIndex:5}},yAxis:{hdl:{index:0,max:100,min:0,opposite:0,tickAmount:12,tickInterval:10}}},total_cholesterol:{series:{cholesterol:{color:"#FE0197",type:"spline",yAxis:0,zIndex:5}},yAxis:{cholesterol:{index:0,max:400,min:0,opposite:0,tickAmount:12,tickInterval:40}}},pulse:{series:{pulse:{color:"#FE0197",type:"spline",yAxis:0,zIndex:5}},yAxis:{pulse:{index:0,max:120,min:40,opposite:0,tickAmount:6,tickInterval:20}}},blood_pressure:{series:{diastolic_bp:{color:At,type:"spline",yAxis:0,zIndex:5},systolic_bp:{color:mi,type:"spline",yAxis:1,zIndex:6}},yAxis:{diastolic_bp:{index:0,max:180,min:40,opposite:0,tickAmount:9,tickInterval:20,zIndex:2},systolic_bp:{labels:{enabled:!1},index:1,max:180,min:40,opposite:0,tickAmount:9,tickInterval:20,zIndex:2}}},insulin:{series:{blood_sugar:{color:mi,type:"spline",yAxis:0,zIndex:5},insulin:{borderColor:At,color:At,type:"column",yAxis:1,zIndex:1}},yAxis:{blood_sugar:{index:0,max:220,min:20,opposite:!1,tickAmount:12,tickInterval:20},insulin:{index:1,max:20,min:0,opposite:1,tickAmount:12,tickInterval:2}}},carbohydrates:{series:{carbohydrates:{borderColor:At,color:At,type:"column",yAxis:1,zIndex:1},blood_sugar:{color:mi,type:"spline",yAxis:0,zIndex:5}},yAxis:{carbohydrates:{index:0,max:500,min:0,opposite:!0,tickAmount:12,tickInterval:50},blood_sugar:{index:1,max:220,min:20,opposite:!1,tickAmount:12,tickInterval:20}}},blood_sugar:{series:{blood_sugar_before_meal:{color:At,type:"spline",yAxis:0,zIndex:1},blood_sugar:{color:mi,type:"spline",yAxis:0,zIndex:5}},yAxis:{blood_sugar_before_meal:{index:0,max:220,min:20,opposite:!0,tickAmount:12,tickInterval:20},blood_sugar:{index:0,max:220,min:20,opposite:0,tickAmount:12,tickInterval:20}}},exercise:{series:{blood_sugar:{color:mi,type:"spline",yAxis:0,zIndex:5},steps:{borderColor:At,color:At,type:"column",yAxis:1,zIndex:1}},yAxis:{blood_sugar:{max:220,min:20,opposite:0,plotBands:[{tickAmount:12,tickInterval:20}]},steps:{gridLineColor:"transparent",index:1,max:2e3,opposite:1,tickInterval:2e3}}}};var kg={blood_sugar:{max:240,min:20,step:20},blood_sugar_before_meal:{max:240,min:20,step:20},bmi:{max:35,min:15,step:1},calories_burned:{max:4e3,min:0,step:500},calories_intake:{max:4e3,min:0,step:500},carbohydrates:{max:500,min:0,step:50},cholesterol:{max:400,min:0,step:40},default:{max:100,min:0,step:1},diastolic_bp:{max:200,min:40,step:20},distance:{max:20,min:0,step:2},fat_total:{max:112,min:0,step:16},fiber:{max:100,min:0,step:25},hdl:{max:100,min:0,step:1},insulin:{max:20,min:0,step:2},ldl:{max:200,min:0,step:20},monounsaturated_fat_intake:{max:40,min:0,step:5},oxygen_saturation:{max:100,min:0,step:25},pain:{max:9,min:0,step:1},peakflow_evening:{max:1400,min:200,step:50},peakflow_morning:{max:1400,min:200,step:50},polyunsaturated_fat_intake:{max:40,min:0,step:5},potassium_intake:{max:5e3,min:0,step:500},calcium:{max:100,min:0,step:25},iron_intake:{max:100,min:0,step:25},vitamin_a:{max:80,min:0,step:20},vitamin_b:{max:115,min:0,step:25},vitamin_c:{max:115,min:0,step:25},protein_intake:{max:112,min:0,step:16},pulse:{max:120,min:40,step:20},saturated_fat_intake:{max:40,min:0,step:5},fat:{max:100,min:0,step:25},sodium_intake:{max:5e3,min:0,step:500},stairs:{max:500,min:0,step:50},steps:{max:2e4,min:0,step:2e3},sugars_intake:{max:100,min:0,step:25},systolic_bp:{max:200,min:60,step:20},temperature:{max:105,min:95,step:1},time_asleep:{max:10,min:0,step:1},time_asleep_awoken:{max:10,min:0,step:1},time_asleep_deep:{max:10,min:0,step:1},time_asleep_restless:{max:10,min:0,step:1},trans_fat_intake:{max:20,min:0,step:5},triglyceride:{max:440,min:0,step:40},waist:{max:50,min:0,step:5},water:{max:100,min:0},weight:{max:260,min:10,step:20},bone:{max:100,min:0,step:25},muscle:{max:100,min:0,step:25},calcium_intake:{min:0,max:80,step:20},nutrition_energy:{min:0,max:20,step:5}};var Ag={portalMobileUrl:"https://mobile.my-care-plan.com",portalMobileClientId:70,isMetricSystem:!0,type:rn.MY_CARE_PLAN,route:{default:{guest:fg,user:hg,provider:_g},main:{guest:Sg,user:[],provider:Cg}}
6,roles:{user:Ut.USER,provider:Ut.PROVIDER,guest:Ut.GUEST},vital:{form:Ig,chart:{settings:Tg,interval:kg}},translations:{}};var Eg={defaultLocale:"en",defaultAccessGrantType:Gp.PASSWORD,defaultUserRole:Ut.USER,loader:{forceTimeout:6e4,excludedPatterns:[new RegExp("/api/clinics/[\\w-]+/appointments/waiting-room/statuses/"),new RegExp("/api/clinics/[\\w-]+/get-in-line"),new RegExp("/api/video/rooms/participants"),new RegExp("/api/video/rooms/\\d+/type/appointment/participants"),new RegExp("/api/user/devices/\\d+"),new RegExp("/api/messaging/appointments/\\d+"),new RegExp("/api/todos/users/\\d+/events"),new RegExp("/api/menu/clinics/\\d+/items/count"),new RegExp("/api/appointments/\\d+/external-video-call-url"),new RegExp("/api/providers/\\d+/consultation-types/\\d+/settings"),new RegExp("/public/providers/\\d+/consultation-types/\\d+/settings"),new RegExp("/public/time-slots"),new RegExp("/api/clinics/[\\w-]+/patient-navigation/patient-queue/departments/[\\w-]+/teams/[\\w-]+/count"),new RegExp("/api/users/\\d+/balance/appointments/\\d+"),new RegExp("/api/payment/clinics/[\\w-]+/patients/\\d+/transactions/copay/appointments/\\d+")]},defaultMinDateOfBirth:"1900-01-01",videoCallOptions:{width:1280,height:720},phoneLength:4,urls:{accessTokenUri:"/oauth/v2/token",refreshTokenUri:"/oauth/v2/token"},mobileScreenWidth:768};var Fg={notification:{android:{senderID:"1094502453961",sound:!0,vibrate:!0,forceShow:!0},ios:{alert:!0,badge:!0,sound:!0,categories:{todo:{yes:{callback:"app.accept",title:"Done",foreground:!0,destructive:!1},no:{callback:"app.reject",title:"Skip",foreground:!0,destructive:!1}},password:{yes:{callback:"app.accept",title:"Ok",foreground:!0,destructive:!1},no:{callback:"app.reject",title:"Reject",foreground:!0,destructive:!1}},message:{yes:{callback:"app.accept",title:"View",foreground:!0,destructive:!1},no:{callback:"app.reject",title:"Skip",foreground:!0,destructive:!1}}}},windows:{}}};var Ot={production:!0,app:Eg,mobile:Ag,cordova:Fg,serverUrl:"https://api.my-care-plan.com",clientIdentifier:"1_62g9syqyqao0o84404s88o84g0g00wo44skc4o0k88o488kkwk:1go6bm8adi80sowcsookkkk04kwgs8sosso0oo8s4wc8cs44gw",hcHost:"https://my-care-plan.com",proHost:"https://pro-landing.my-care-plan.com",providerAdminUrl:"https://admin.my-care-plan.com"};var ho=(()=>{let e=class e{constructor(){this.configService=fe(oe),this.currentUserService=fe(It),this.router=fe(B)}canActivate(i,o){return this.currentUserService.getRole().pipe(L(r=>me((i.data.allowedRoles||[]).includes(r)).pipe(ne(c=>{c||this.handleNotAllowed(r,i,o)}))))}handleNotAllowed(i,o,r){this.isDefaultRedirectUrlActive(i)||this.doDefaultRedirect(i,r)}isDefaultRedirectUrlActive(i){let o=this.configService.getDefaultRoute(i);return this.router.isActive(o,!0)}doDefaultRedirect(i,o){let r=this.configService.getDefaultRoute(i);this.router.navigate([r],{queryParams:i===Ut.GUEST?{urlAfterLogin:o.url}:{}})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=be({token:e,factory:e.\u0275fac});let n=e;return n})();var uc=[{path:Ot.mobile.roles.guest,data:{allowedRoles:[Ot.mobile.roles.guest]},canActivate:[ho],children:Ot.mobile.route.main.guest},{path:Ot.mobile.roles.user,data:{allowedRoles:[Ot.mobile.roles.user]},canActivate:[ho],children:Ot.mobile.route.main.user},{path:Ot.mobile.roles.provider,data:{allowedRoles:[Ot.mobile.roles.guest,Ot.mobile.roles.provider]},canActivate:[ho],children:Ot.mobile.route.main.provider},{path:"general",component:ug,canActivate:[ho],data:{allowedRoles:[Ot.mobile.roles.provider,Ot.mobile.roles.user,Ot.mobile.roles.guest]},children:[{path:"error-page",component:Vd,data:{message:"Page not found!"}}]},{path:"**",redirectTo:"/guest/landing"}];function Lg(n){return new Re(3e3,!1)}function GC(){return new Re(3100,!1)}function HC(){return new Re(3101,!1)}function $C(n){return new Re(3001,!1)}function KC(n){return new Re(3003,!1)}function YC(n){return new Re(3004,!1)}function Bg(n,e){return new Re(3005,!1)}function Rg(){return new Re(3006,!1)}function Vg(){return new Re(3007,!1)}function Ng(n,e){return new Re(3008,!1)}function Ug(n){return new Re(3002,!1)}function qg(n,e,t,i,o){return new Re(3010,!1)}function zg(){return new Re(3011,!1)}function jg(){return new Re(3012,!1)}function Wg(){return new Re(3200,!1)}function Qg(){return new Re(3202,!1)}function Gg(){return new Re(3013,!1)}function Hg(n){return new Re(3014,!1)}function $g(n){return new Re(3015,!1)}function Kg(n){return new Re(3016,!1)}function Yg(n,e){return new Re(3404,!1)}function XC(n){return new Re(3502,!1)}function Xg(n){return new Re(3503,!1)}function Zg(){return new Re(3300,!1)}function Jg(n){return new Re(3504,!1)}
vendor: 54,780 bytes, line 6
6function eu(n){return new Re(3301,!1)}function tu(n,e){return new Re(3302,!1)}function iu(n){return new Re(3303,!1)}function nu(n,e){return new Re(3400,!1)}function ou(n){return new Re(3401,!1)}function ru(n){return new Re(3402,!1)}function au(n,e){return new Re(3505,!1)}function un(n){switch(n.length){case 0:return new co;case 1:return n[0];default:return new ns(n)}}function Cc(n,e,t=new Map,i=new Map){let o=[],r=[],c=-1,m=null;if(e.forEach(_=>{let M=_.get("offset"),I=M==c,k=I&&m||new Map;_.forEach((R,N)=>{let W=N,K=R;if(N!=="offset")switch(W=n.normalizePropertyName(W,o),K){case xr:K=t.get(N);break;case Vi:K=i.get(N);break;default:K=n.normalizeStyleValue(N,W,K,o);break}k.set(W,K)}),I||r.push(k),m=k,c=M}),o.length)throw XC(o);return r}function zs(n,e,t,i){switch(e){case"start":n.onStart(()=>i(t&&fc(t,"start",n)));break;case"done":n.onDone(()=>i(t&&fc(t,"done",n)));break;case"destroy":n.onDestroy(()=>i(t&&fc(t,"destroy",n)));break}}function fc(n,e,t){let i=t.totalTime,o=!!t.disabled,r=js(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,i??n.totalTime,o),c=n._data;return c!=null&&(r._data=c),r}function js(n,e,t,i,o="",r=0,c){return{element:n,triggerName:e,fromState:t,toState:i,phaseName:o,totalTime:r,disabled:!!c}}function gi(n,e,t){let i=n.get(e);return i||n.set(e,i=t),i}function vc(n){let e=n.indexOf(":"),t=n.substring(1,e),i=n.slice(e+1);return[t,i]}var ZC=typeof document>"u"?null:document.documentElement;function Ws(n){let e=n.parentNode||n.host||null;return e===ZC?null:e}function JC(n){return n.substring(1,6)=="ebkit"}var _o=null,Dg=!1;function su(n){_o||(_o=ev()||{},Dg=_o.style?"WebkitAppearance"in _o.style:!1);let e=!0;return _o.style&&!JC(n)&&(e=n in _o.style,!e&&Dg&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in _o.style)),e}function ev(){return typeof document<"u"?document.body:null}function yc(n,e){for(;e;){if(e===n)return!0;e=Ws(e)}return!1}function Pc(n,e,t){if(t)return Array.from(n.querySelectorAll(e));let i=n.querySelector(e);return i?[i]:[]}var tv=1e3,Mc="{{",iv="}}",bc="ng-enter",Qs="ng-leave",Ur="ng-trigger",qr=".ng-trigger",xc="ng-animating",Gs=".ng-animating";function en(n){if(typeof n=="number")return n;let e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:hc(parseFloat(e[1]),e[2])}function hc(n,e){return e==="s"?n*tv:n}function zr(n,e,t){return n.hasOwnProperty("duration")?n:ov(n,e,t)}var nv=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function ov(n,e,t){let i,o=0,r="";if(typeof n=="string"){let c=n.match(nv);if(c===null)return e.push(Lg(n)),{duration:0,delay:0,easing:""};i=hc(parseFloat(c[1]),c[2]);let m=c[3];m!=null&&(o=hc(parseFloat(m),c[4]));let _=c[5];_&&(r=_)}else i=n;if(!t){let c=!1,m=e.length;i<0&&(e.push(GC()),c=!0),o<0&&(e.push(HC()),c=!0),c&&e.splice(m,0,Lg(n))}return{duration:i,delay:o,easing:r}}function lu(n){return n.length?n[0]instanceof Map?n:n.map(e=>new Map(Object.entries(e))):[]}function qi(n,e,t){e.forEach((i,o)=>{let r=Hs(o);t&&!t.has(o)&&t.set(o,n.style[r]),n.style[r]=i})}function Gn(n,e){e.forEach((t,i)=>{let o=Hs(i);n.style[o]=""})}function rr(n){return Array.isArray(n)?n.length==1?n[0]:Ed(n):n}function cu(n,e,t){let i=e.params||{},o=Oc(n);o.length&&o.forEach(r=>{i.hasOwnProperty(r)||t.push($C(r))})}var _c=new RegExp(`${Mc}\\s*(.+?)\\s*${iv}`,"g");function Oc(n){let e=[];if(typeof n=="string"){let t;for(;t=_c.exec(n);)e.push(t[1]);_c.lastIndex=0}return e}function ar(n,e,t){let i=`${n}`,o=i.replace(_c,(r,c)=>{let m=e[c];return m==null&&(t.push(KC(c)),m=""),m.toString()});return o==i?n:o}var rv=/-+([a-z0-9])/g;function Hs(n){return n.replace(rv,(...e)=>e[1].toUpperCase())}function pu(n,e){return n===0||e===0}function du(n,e,t){if(t.size&&e.length){let i=e[0],o=[];if(t.forEach((r,c)=>{i.has(c)||o.push(c),i.set(c,r)}),o.length)for(let r=1;r<e.length;r++){let c=e[r];o.forEach(m=>c.set(m,$s(n,m)))}}return e}function ui(n,e,t){switch(e.type){case ke.Trigger:return n.visitTrigger(e,t);case ke.State:return n.visitState(e,t);case ke.Transition:return n.visitTransition(e,t);case ke.Sequence:return n.visitSequence(e,t);case ke.Group:return n.visitGroup(e,t);case ke.Animate:return n.visitAnimate(e,t);case ke.Keyframes:return n.visitKeyframes(e,t);case ke.Style:return n.visitStyle(e,t);case ke.Reference:return n.visitReference(e,t);case ke.AnimateChild:return n.visitAnimateChild(e,t);case ke.AnimateRef:return n.visitAnimateRef(e,t);case ke.Query:return n.visitQuery(e,t);case ke.Stagger:return n.visitStagger(e,t);default:throw YC(e.type)}}function $s(n,e){return window.getComputedStyle(n)[e]}var zc=(()=>{class n{validateStyleProperty(t){return su(t)}containsElement(t,i){return yc(t,i)}getParentElement(t){return Ws(t)}query(t,i,o){return Pc(t,i,o)}computeStyle(t,i,o){return o||""}animate(t,i,o,r,c,m=[],_){return new co(o,r)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=be({token:n,factory:n.\u0275fac})}return n})(),vo=class{static NOOP=new zc},yo=class{};var av=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Js=class extends yo{normalizePropertyName(e,t){return Hs(e)}normalizeStyleValue(e,t,i,o){let r="",c=i.toString().trim();if(av.has(t)&&i!==0&&i!=="0")if(typeof i=="number")r="px";else{let m=i.match(/^[+-]?[\d\.]+([a-z]*)$/);m&&m[1].length==0&&o.push(Bg(e,i))}return c+r}};var el="*";function sv(n,e){let t=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(i=>lv(i,t,e)):t.push(n),t}function lv(n,e,t){if(n[0]==":"){let _=cv(n,t);if(typeof _=="function"){e.push(_);return}n=_}let i=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(i==null||i.length<4)return t.push($g(n)),e;let o=i[1],r=i[2],c=i[3];e.push(mu(o,c));let m=o==el&&c==el;r[0]=="<"&&!m&&e.push(mu(c,o))}function cv(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i)<parseFloat(t);default:return e.push(Kg(n)),"* => *"}}var Ks=new Set(["true","1"]),Ys=new Set(["false","0"]);function mu(n,e){let t=Ks.has(n)||Ys.has(n),i=Ks.has(e)||Ys.has(e);return(o,r)=>{let c=n==el||n==o,m=e==el||e==r;return!c&&t&&typeof o=="boolean"&&(c=o?Ks.has(n):Ys.has(n)),!m&&i&&typeof r=="boolean"&&(m=r?Ks.has(e):Ys.has(e)),c&&m}}var Mu=":self",pv=new RegExp(`s*${Mu}s*,?`,"g");function bu(n,e,t,i){return new Ac(n).build(e,t,i)}var gu="",Ac=class{_driver;constructor(e){this._driver=e}build(e,t,i){let o=new Ec(t);return this._resetContextStyleTimingState(o),ui(this,rr(e),o)}_resetContextStyleTimingState(e){e.currentQuerySelector=gu,e.collectedStyles=new Map,e.collectedStyles.set(gu,new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,o=t.depCount=0,r=[],c=[];return e.name.charAt(0)=="@"&&t.errors.push(Rg()),e.definitions.forEach(m=>{if(this._resetContextStyleTimingState(t),m.type==ke.State){let _=m,M=_.name;M.toString().split(/\s*,\s*/).forEach(I=>{_.name=I,r.push(this.visitState(_,t))}),_.name=M}else if(m.type==ke.Transition){let _=this.visitTransition(m,t);i+=_.queryCount,o+=_.depCount,c.push(_)}else t.errors.push(Vg())}),{type:ke.Trigger,name:e.name,states:r,transitions:c,queryCount:i,depCount:o,options:null}}visitState(e,t){let i=this.visitStyle(e.styles,t),o=e.options&&e.options.params||null;if(i.containsDynamicStyles){let r=new Set,c=o||{};i.styles.forEach(m=>{m instanceof Map&&m.forEach(_=>{Oc(_).forEach(M=>{c.hasOwnProperty(M)||r.add(M)})})}),r.size&&t.errors.push(Ng(e.name,[...r.values()]))}return{type:ke.State,name:e.name,style:i,options:o?{params:o}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let i=ui(this,rr(e.animation),t),o=sv(e.expr,t.errors);return{type:ke.Transition,matchers:o,animation:i,queryCount:t.queryCount,depCount:t.depCount,options:Co(e.options)}}visitSequence(e,t){return{type:ke.Sequence,steps:e.steps.map(i=>ui(this,i,t)),options:Co(e.options)}}visitGroup(e,t){let i=t.currentTime,o=0,r=e.steps.map(c=>{t.currentTime=i;let m=ui(this,c,t);return o=Math.max(o,t.currentTime),m});return t.currentTime=o,{type:ke.Group,steps:r,options:Co(e.options)}}visitAnimate(e,t){let i=uv(e.timings,t.errors);t.currentAnimateTimings=i;let o,r=e.styles?e.styles:Yl({});if(r.type==ke.Keyframes)o=this.visitKeyframes(r,t);else{let c=e.styles,m=!1;if(!c){m=!0;let M={};i.easing&&(M.easing=i.easing),c=Yl(M)}t.currentTime+=i.duration+i.delay;let _=this.visitStyle(c,t);_.isEmptyStep=m,o=_}return t.currentAnimateTimings=null,{type:ke.Animate,timings:i,style:o,options:null}}visitStyle(e,t){let i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){let i=[],o=Array.isArray(e.styles)?e.styles:[e.styles];for(let m of o)typeof m=="string"?m===Vi?i.push(m):t.errors.push(Ug(m)):i.push(new Map(Object.entries(m)));let r=!1,c=null;return i.forEach(m=>{if(m instanceof Map&&(m.has("easing")&&(c=m.get("easing"),m.delete("easing")),!r)){for(let _ of m.values())if(_.toString().indexOf(Mc)>=0){r=!0;break}}}),{type:ke.Style,styles:i,easing:c,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let i=t.currentAnimateTimings,o=t.currentTime,r=t.currentTime;i&&r>0&&(r-=i.duration+i.delay),e.styles.forEach(c=>{typeof c!="string"&&c.forEach((m,_)=>{let M=t.collectedStyles.get(t.currentQuerySelector),I=M.get(_),k=!0;I&&(r!=o&&r>=I.startTime&&o<=I.endTime&&(t.errors.push(qg(_,I.startTime,I.endTime,r,o)),k=!1),r=I.startTime),k&&M.set(_,{startTime:r,endTime:o}),t.options&&cu(m,t.options,t.errors)})})}visitKeyframes(e,t){let i={type:ke.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(zg()),i;let o=1,r=0,c=[],m=!1,_=!1,M=0,I=e.steps.map(Ke=>{let ot=this._makeStyleAst(Ke,t),ze=ot.offset!=null?ot.offset:gv(ot.styles),Ye=0;return ze!=null&&(r++,Ye=ot.offset=ze),_=_||Ye<0||Ye>1,m=m||Ye<M,M=Ye,c.push(Ye),ot});_&&t.errors.push(jg()),m&&t.errors.push(Wg());let k=e.steps.length,R=0;r>0&&r<k?t.errors.push(Qg()):r==0&&(R=o/(k-1));let N=k-1,W=t.currentTime,K=t.currentAnimateTimings,Ee=K.duration;return I.forEach((Ke,ot)=>{let ze=R>0?ot==N?1:R*ot:c[ot],Ye=ze*Ee;t.currentTime=W+K.delay+Ye,K.duration=Ye,this._validateStyleAst(Ke,t),Ke.offset=ze,i.styles.push(Ke)}),i}visitReference(e,t){return{type:ke.Reference,animation:ui(this,rr(e.animation),t),options:Co(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:ke.AnimateChild,options:Co(e.options)}}visitAnimateRef(e,t){return{type:ke.AnimateRef,animation:this.visitReference(e.animation,t),options:Co(e.options)}}visitQuery(e,t){let i=t.currentQuerySelector,o=e.options||{};t.queryCount++,t.currentQuery=e;let[r,c]=dv(e.selector);t.currentQuerySelector=i.length?i+" "+r:r,gi(t.collectedStyles,t.currentQuerySelector,new Map);let m=ui(this,rr(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:ke.Query,selector:r,limit:o.limit||0,optional:!!o.optional,includeSelf:c,animation:m,originalSelector:e.selector,options:Co(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Gg());let i=e.timings==="full"?{duration:0,delay:0,easing:"full"}:zr(e.timings,t.errors,!0);return{type:ke.Stagger,animation:ui(this,rr(e.animation),t),timings:i,options:null}}};function dv(n){let e=!!n.split(/\s*,\s*/).find(t=>t==Mu);return e&&(n=n.replace(pv,"")),n=n.replace(/@\*/g,qr).replace(/@\w+/g,t=>qr+"-"+t.slice(1)).replace(/:animating/g,Gs),[n,e]}function mv(n){return n?z({},n):null}var Ec=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function gv(n){if(typeof n=="string")return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){let i=t;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let t=n;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function uv(n,e){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=zr(n,e).duration;return wc(r,0,"")}let t=n;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=wc(0,0,"");return r.dynamic=!0,r.strValue=t,r}let o=zr(t,e);return wc(o.duration,o.delay,o.easing)}function Co(n){return n?(n=z({},n),n.params&&(n.params=mv(n.params))):n={},n}function wc(n,e,t){return{duration:n,delay:e,easing:t}}function jc(n,e,t,i,o,r,c=null,m=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:i,duration:o,delay:r,totalTime:o+r,easing:c,subTimeline:m}}var Wr=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},fv=1,hv=":enter",_v=new RegExp(hv,"g"),Cv=":leave",vv=new RegExp(Cv,"g");function xu(n,e,t,i,o,r=new Map,c=new Map,m,_,M=[]){return new Fc().buildKeyframes(n,e,t,i,o,r,c,m,_,M)}var Fc=class{buildKeyframes(e,t,i,o,r,c,m,_,M,I=[]){M=M||new Wr;let k=new Lc(e,t,M,o,r,I,[]);k.options=_;let R=_.delay?en(_.delay):0;k.currentTimeline.delayNextStep(R),k.currentTimeline.setStyles([c],null,k.errors,_),ui(this,i,k);let N=k.timelines.filter(W=>W.containsAnimation());if(N.length&&m.size){let W;for(let K=N.length-1;K>=0;K--){let Ee=N[K];if(Ee.element===t){W=Ee;break}}W&&!W.allowOnlyTimelineStyles()&&W.setStyles([m],null,k.errors,_)}return N.length?N.map(W=>W.buildKeyframes()):[jc(t,[],[],[],0,R,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let i=t.subInstructions.get(t.element);if(i){let o=t.createSubContext(e.options),r=t.currentTimeline.currentTime,c=this._visitSubInstructions(i,o,o.options);r!=c&&t.transformIntoNewTimeline(c)}t.previousNode=e}visitAnimateRef(e,t){let i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(let o of e){let r=o?.delay;if(r){let c=typeof r=="number"?r:en(ar(r,o?.params??{},t.errors));i.delayNextStep(c)}}}_visitSubInstructions(e,t,i){let r=t.currentTimeline.currentTime,c=i.duration!=null?en(i.duration):null,m=i.delay!=null?en(i.delay):null;return c!==0&&e.forEach(_=>{let M=t.appendInstructionToTimeline(_,c,m);r=Math.max(r,M.duration+M.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),ui(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let i=t.subContextCount,o=t,r=e.options;if(r&&(r.params||r.delay)&&(o=t.createSubContext(r),o.transformIntoNewTimeline(),r.delay!=null)){o.previousNode.type==ke.Style&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=tl);let c=en(r.delay);o.delayNextStep(c)}e.steps.length&&(e.steps.forEach(c=>ui(this,c,o)),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>i&&o.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let i=[],o=t.currentTimeline.currentTime,r=e.options&&e.options.delay?en(e.options.delay):0;e.steps.forEach(c=>{let m=t.createSubContext(e.options);r&&m.delayNextStep(r),ui(this,c,m),o=Math.max(o,m.currentTimeline.currentTime),i.push(m.currentTimeline)}),i.forEach(c=>t.currentTimeline.mergeTimelineCollectedStyles(c)),t.transformIntoNewTimeline(o),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let i=e.strValue,o=t.params?ar(i,t.params,t.errors):i;return zr(o,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let i=t.currentAnimateTimings=this._visitTiming(e.timings,t),o=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),o.snapshotCurrentStyles());let r=e.style;r.type==ke.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(i.duration),this.visitStyle(r,t),o.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let i=t.currentTimeline,o=t.currentAnimateTimings;!o&&i.hasCurrentStyleProperties()&&i.forwardFrame();let r=o&&o.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(r):i.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let i=t.currentAnimateTimings,o=t.currentTimeline.duration,r=i.duration,m=t.createSubContext().currentTimeline;m.easing=i.easing,e.styles.forEach(_=>{let M=_.offset||0;m.forwardTime(M*r),m.setStyles(_.styles,_.easing,t.errors,t.options),m.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(m),t.transformIntoNewTimeline(o+r),t.previousNode=e}visitQuery(e,t){let i=t.currentTimeline.currentTime,o=e.options||{},r=o.delay?en(o.delay):0;r&&(t.previousNode.type===ke.Style||i==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=tl);let c=i,m=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!o.optional,t.errors);t.currentQueryTotal=m.length;let _=null;m.forEach((M,I)=>{t.currentQueryIndex=I;let k=t.createSubContext(e.options,M);r&&k.delayNextStep(r),M===t.element&&(_=k.currentTimeline),ui(this,e.animation,k),k.currentTimeline.applyStylesToKeyframe();let R=k.currentTimeline.currentTime;c=Math.max(c,R)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(c),_&&(t.currentTimeline.mergeTimelineCollectedStyles(_),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let i=t.parentContext,o=t.currentTimeline,r=e.timings,c=Math.abs(r.duration),m=c*(t.currentQueryTotal-1),_=c*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":_=m-_;break;case"full":_=i.currentStaggerTime;break}let I=t.currentTimeline;_&&I.delayNextStep(_);let k=I.currentTime;ui(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=o.currentTime-k+(o.startTime-i.currentTimeline.startTime)}},tl={},Lc=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=tl;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,i,o,r,c,m,_){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=o,this._leaveClassName=r,this.errors=c,this.timelines=m,this.currentTimeline=_||new il(this._driver,t,0),m.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let i=e,o=this.options;i.duration!=null&&(o.duration=en(i.duration)),i.delay!=null&&(o.delay=en(i.delay));let r=i.params;if(r){let c=o.params;c||(c=this.options.params={}),Object.keys(r).forEach(m=>{(!t||!c.hasOwnProperty(m))&&(c[m]=ar(r[m],c,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let i=e.params={};Object.keys(t).forEach(o=>{i[o]=t[o]})}}return e}createSubContext(e=null,t,i){let o=t||this.element,r=new n(this._driver,o,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(o,i||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=tl,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){let o={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},r=new Dc(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,o,e.stretchStartingKeyframe);return this.timelines.push(r),o}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,o,r,c){let m=[];if(o&&m.push(this.element),e.length>0){e=e.replace(_v,"."+this._enterClassName),e=e.replace(vv,"."+this._leaveClassName);let _=i!=1,M=this._driver.query(this.element,e,_);i!==0&&(M=i<0?M.slice(M.length+i,M.length):M.slice(0,i)),m.push(...M)}return!r&&m.length==0&&c.push(Hg(t)),m}},il=class n{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,i,o){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=o,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new n(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=fv,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,i]of this._globalTimelineStyles)this._backFill.set(t,i||Vi),this._currentKeyframe.set(t,Vi);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,o){t&&this._previousKeyframe.set("easing",t);let r=o&&o.params||{},c=yv(e,this._globalTimelineStyles);for(let[m,_]of c){let M=ar(_,r,i);this._pendingStyles.set(m,M),this._localTimelineStyles.has(m)||this._backFill.set(m,this._globalTimelineStyles.get(m)??Vi),this._updateStyle(m,M)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,i)=>{let o=this._styleSummary.get(i);(!o||t.time>o.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,i=this._keyframes.size===1&&this.duration===0,o=[];this._keyframes.forEach((m,_)=>{let M=new Map([...this._backFill,...m]);M.forEach((I,k)=>{I===xr?e.add(k):I===Vi&&t.add(k)}),i||M.set("offset",_/this.duration),o.push(M)});let r=[...e.values()],c=[...t.values()];if(i){let m=o[0],_=new Map(m);m.set("offset",0),_.set("offset",1),o=[m,_]}return jc(this.element,o,r,c,this.duration,this.startTime,this.easing,!1)}},Dc=class extends il{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,i,o,r,c,m=!1){super(e,t,c.delay),this.keyframes=i,this.preStyleProps=o,this.postStyleProps=r,this._stretchStartingKeyframe=m,this.timings={duration:c.duration,delay:c.delay,easing:c.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:o}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],c=i+t,m=t/c,_=new Map(e[0]);_.set("offset",0),r.push(_);let M=new Map(e[0]);M.set("offset",uu(m)),r.push(M);let I=e.length-1;for(let k=1;k<=I;k++){let R=new Map(e[k]),N=R.get("offset"),W=t+N*i;R.set("offset",uu(W/c)),r.push(R)}i=c,t=0,o="",e=r}return jc(this.element,e,this.preStyleProps,this.postStyleProps,i,t,o,!0)}};function uu(n,e=3){let t=Math.pow(10,e-1);return Math.round(n*t)/t}function yv(n,e){let t=new Map,i;return n.forEach(o=>{if(o==="*"){i??=e.keys();for(let r of i)t.set(r,Vi)}else for(let[r,c]of o)t.set(r,c)}),t}function fu(n,e,t,i,o,r,c,m,_,M,I,k,R){return{type:0,element:n,triggerName:e,isRemovalTransition:o,fromState:t,fromStyles:r,toState:i,toStyles:c,timelines:m,queriedElements:_,preStyleProps:M,postStyleProps:I,totalTime:k,errors:R}}var Sc={},nl=class{_triggerName;ast;_stateStyles;constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,o){return Pv(this.ast.matchers,e,t,i,o)}buildStyles(e,t,i){let o=this._stateStyles.get("*");return e!==void 0&&(o=this._stateStyles.get(e?.toString())||o),o?o.buildStyles(t,i):new Map}build(e,t,i,o,r,c,m,_,M,I){let k=[],R=this.ast.options&&this.ast.options.params||Sc,N=m&&m.params||Sc,W=this.buildStyles(i,N,k),K=_&&_.params||Sc,Ee=this.buildStyles(o,K,k),Ke=new Set,ot=new Map,ze=new Map,Ye=o==="void",ii={params:Ou(K,R),delay:this.ast.options?.delay},Bt=I?[]:xu(e,t,this.ast.animation,r,c,W,Ee,ii,M,k),gt=0;return Bt.forEach(yt=>{gt=Math.max(yt.duration+yt.delay,gt)}),k.length?fu(t,this._triggerName,i,o,Ye,W,Ee,[],[],ot,ze,gt,k):(Bt.forEach(yt=>{let ni=yt.element,oi=gi(ot,ni,new Set);yt.preStyleProps.forEach(Di=>oi.add(Di));let mr=gi(ze,ni,new Set);yt.postStyleProps.forEach(Di=>mr.add(Di)),ni!==t&&Ke.add(ni)}),fu(t,this._triggerName,i,o,Ye,W,Ee,Bt,[...Ke.values()],ot,ze,gt))}};function Pv(n,e,t,i,o){return n.some(r=>r(e,t,i,o))}function Ou(n,e){let t=z({},e);return Object.entries(n).forEach(([i,o])=>{o!=null&&(t[i]=o)}),t}var Bc=class{styles;defaultParams;normalizer;constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){let i=new Map,o=Ou(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((c,m)=>{c&&(c=ar(c,o,t));let _=this.normalizer.normalizePropertyName(m,t);c=this.normalizer.normalizeStyleValue(m,_,c,t),i.set(m,c)})}),i}};function Mv(n,e,t){return new Rc(n,e,t)}var Rc=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,t.states.forEach(o=>{let r=o.options&&o.options.params||{};this.states.set(o.name,new Bc(o.style,r,i))}),hu(this.states,"true","1"),hu(this.states,"false","0"),t.transitions.forEach(o=>{this.transitionFactories.push(new nl(e,o,this.states))}),this.fallbackTransition=bv(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,o){return this.transitionFactories.find(c=>c.match(e,t,i,o))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}};function bv(n,e,t){let i=[(c,m)=>!0],o={type:ke.Sequence,steps:[],options:null},r={type:ke.Transition,animation:o,matchers:i,options:null,queryCount:0,depCount:0};return new nl(n,r,e)}function hu(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t))}var xv=new Wr,Vc=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i}register(e,t){let i=[],o=[],r=bu(this._driver,t,i,o);if(i.length)throw Xg(i);this._animations.set(e,r)}_buildPlayer(e,t,i){let o=e.element,r=Cc(this._normalizer,e.keyframes,t,i);return this._driver.animate(o,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){let o=[],r=this._animations.get(e),c,m=new Map;if(r?(c=xu(this._driver,t,r,bc,Qs,new Map,new Map,i,xv,o),c.forEach(I=>{let k=gi(m,I.element,new Map);I.postStyleProps.forEach(R=>k.set(R,null))})):(o.push(Zg()),c=[]),o.length)throw Jg(o);m.forEach((I,k)=>{I.forEach((R,N)=>{I.set(N,this._driver.computeStyle(k,N,Vi))})});let _=c.map(I=>{let k=m.get(I.element);return this._buildPlayer(I,new Map,k)}),M=un(_);return this._playersById.set(e,M),M.onDestroy(()=>this.destroy(e)),this.players.push(M),M}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw eu(e);return t}listen(e,t,i,o){let r=js(t,"","","");return zs(this._getPlayer(e),i,r,o),()=>{}}command(e,t,i,o){if(i=="register"){this.register(e,o[0]);return}if(i=="create"){let c=o[0]||{};this.create(e,t,c);return}let r=this._getPlayer(e);switch(i){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(o[0]));break;case"destroy":this.destroy(e);break}}},_u="ng-animate-queued",Ov=".ng-animate-queued",Ic="ng-animate-disabled",wv=".ng-animate-disabled",Sv="ng-star-inserted",Iv=".ng-star-inserted",Tv=[],wu={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},kv={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},zi="__ng_removed",Qr=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let i=e&&e.hasOwnProperty("value"),o=i?e.value:e;if(this.value=Ev(o),i){let r=e,{value:c}=r,m=ur(r,["value"]);this.options=m}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let i=this.options.params;Object.keys(t).forEach(o=>{i[o]==null&&(i[o]=t[o])})}}},jr="void",Tc=new Qr(jr),Nc=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this._hostClassName="ng-tns-"+e,Fi(t,this._hostClassName)}listen(e,t,i,o){if(!this._triggers.has(t))throw tu(i,t);if(i==null||i.length==0)throw iu(t);if(!Fv(i))throw nu(i,t);let r=gi(this._elementListeners,e,[]),c={name:t,phase:i,callback:o};r.push(c);let m=gi(this._engine.statesByElement,e,new Map);return m.has(t)||(Fi(e,Ur),Fi(e,Ur+"-"+t),m.set(t,Tc)),()=>{this._engine.afterFlush(()=>{let _=r.indexOf(c);_>=0&&r.splice(_,1),this._triggers.has(t)||m.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw ou(e);return t}trigger(e,t,i,o=!0){let r=this._getTrigger(t),c=new Gr(this.id,t,e),m=this._engine.statesByElement.get(e);m||(Fi(e,Ur),Fi(e,Ur+"-"+t),this._engine.statesByElement.set(e,m=new Map));let _=m.get(t),M=new Qr(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&_&&M.absorbOptions(_.options),m.set(t,M),_||(_=Tc),!(M.value===jr)&&_.value===M.value){if(!Bv(_.params,M.params)){let K=[],Ee=r.matchStyles(_.value,_.params,K),Ke=r.matchStyles(M.value,M.params,K);K.length?this._engine.reportError(K):this._engine.afterFlush(()=>{Gn(e,Ee),qi(e,Ke)})}return}let R=gi(this._engine.playersByElement,e,[]);R.forEach(K=>{K.namespaceId==this.id&&K.triggerName==t&&K.queued&&K.destroy()});let N=r.matchTransition(_.value,M.value,e,M.params),W=!1;if(!N){if(!o)return;N=r.fallbackTransition,W=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:N,fromState:_,toState:M,player:c,isFallbackTransition:W}),W||(Fi(e,_u),c.onStart(()=>{sr(e,_u)})),c.onDone(()=>{let K=this.players.indexOf(c);K>=0&&this.players.splice(K,1);let Ee=this._engine.playersByElement.get(e);if(Ee){let Ke=Ee.indexOf(c);Ke>=0&&Ee.splice(Ke,1)}}),this.players.push(c),R.push(c),c}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(o=>o.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let i=this._engine.driver.query(e,qr,!0);i.forEach(o=>{if(o[zi])return;let r=this._engine.fetchNamespacesByElement(o);r.size?r.forEach(c=>c.triggerLeaveAnimation(o,t,!1,!0)):this.clearElementCache(o)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(o=>this.clearElementCache(o)))}triggerLeaveAnimation(e,t,i,o){let r=this._engine.statesByElement.get(e),c=new Map;if(r){let m=[];if(r.forEach((_,M)=>{if(c.set(M,_.value),this._triggers.has(M)){let I=this.trigger(e,M,jr,o);I&&m.push(I)}}),m.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,c),i&&un(m).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){let o=new Set;t.forEach(r=>{let c=r.name;if(o.has(c))return;o.add(c);let _=this._triggers.get(c).fallbackTransition,M=i.get(c)||Tc,I=new Qr(jr),k=new Gr(this.id,c,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:c,transition:_,fromState:M,toState:I,player:k,isFallbackTransition:!0})})}}removeNode(e,t){let i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let o=!1;if(i.totalAnimations){let r=i.players.length?i.playersByQueriedElement.get(e):[];if(r&&r.length)o=!0;else{let c=e;for(;c=c.parentNode;)if(i.statesByElement.get(c)){o=!0;break}}}if(this.prepareLeaveAnimationListeners(e),o)i.markElementAsRemoved(this.id,e,!1,t);else{let r=e[zi];(!r||r===wu)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){Fi(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(i=>{let o=i.player;if(o.destroyed)return;let r=i.element,c=this._elementListeners.get(r);c&&c.forEach(m=>{if(m.name==i.triggerName){let _=js(r,i.triggerName,i.fromState.value,i.toState.value);_._data=e,zs(i.player,m.phase,_,m.callback)}}),o.markedForDestroy?this._engine.afterFlush(()=>{o.destroy()}):t.push(i)}),this._queue=[],t.sort((i,o)=>{let r=i.transition.ast.depCount,c=o.transition.ast.depCount;return r==0||c==0?r-c:this._engine.driver.containsElement(i.element,o.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Uc=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){let i=new Nc(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){let i=this._namespaceList,o=this.namespacesByHostElement;if(i.length-1>=0){let c=!1,m=this.driver.getParentElement(t);for(;m;){let _=o.get(m);if(_){let M=i.indexOf(_);i.splice(M+1,0,e),c=!0;break}m=this.driver.getParentElement(m)}c||i.unshift(e)}else i.push(e);return o.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let o=this._namespaceLookup[e];o&&o.register(t,i)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let i=this._fetchNamespace(e);this.namespacesByHostElement.delete(i.hostElement);let o=this._namespaceList.indexOf(i);o>=0&&this._namespaceList.splice(o,1),i.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,i=this.statesByElement.get(e);if(i){for(let o of i.values())if(o.namespaceId){let r=this._fetchNamespace(o.namespaceId);r&&t.add(r)}}return t}trigger(e,t,i,o){if(Xs(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,i,o),!0}return!1}insertNode(e,t,i,o){if(!Xs(t))return;let r=t[zi];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let c=this.collectedLeaveElements.indexOf(t);c>=0&&this.collectedLeaveElements.splice(c,1)}if(e){let c=this._fetchNamespace(e);c&&c.insertNode(t,i)}o&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Fi(e,Ic)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),sr(e,Ic))}removeNode(e,t,i){if(Xs(t)){let o=e?this._fetchNamespace(e):null;o?o.removeNode(t,i):this.markElementAsRemoved(e,t,!1,i);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,i)}else this._onRemovalComplete(t,i)}markElementAsRemoved(e,t,i,o,r){this.collectedLeaveElements.push(t),t[zi]={namespaceId:e,setForRemoval:o,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,i,o,r){return Xs(t)?this._fetchNamespace(e).listen(t,i,o,r):()=>{}}_buildInstruction(e,t,i,o,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,o,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,qr,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,Gs,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return un(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[zi];if(t&&t.setForRemoval){if(e[zi]=wu,t.namespaceId){this.destroyInnerAnimations(e);let i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(Ic)&&this.markElementAsDisabled(e,!1),this.driver.query(e,wv,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,o)=>this._balanceNamespaceList(i,o)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++){let o=this.collectedEnterElements[i];Fi(o,Sv)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let i=[];try{t=this._flushAnimations(i,e)}finally{for(let o=0;o<i.length;o++)i[o]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++){let o=this.collectedLeaveElements[i];this.processLeaveNode(o)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){let i=this._whenQuietFns;this._whenQuietFns=[],t.length?un(t).onDone(()=>{i.forEach(o=>o())}):i.forEach(o=>o())}}reportError(e){throw ru(e)}_flushAnimations(e,t){let i=new Wr,o=[],r=new Map,c=[],m=new Map,_=new Map,M=new Map,I=new Set;this.disabledNodes.forEach($=>{I.add($);let te=this.driver.query($,Ov,!0);for(let ae=0;ae<te.length;ae++)I.add(te[ae])});let k=this.bodyNode,R=Array.from(this.statesByElement.keys()),N=yu(R,this.collectedEnterElements),W=new Map,K=0;N.forEach(($,te)=>{let ae=bc+K++;W.set(te,ae),$.forEach(Be=>Fi(Be,ae))});let Ee=[],Ke=new Set,ot=new Set;for(let $=0;$<this.collectedLeaveElements.length;$++){let te=this.collectedLeaveElements[$],ae=te[zi];ae&&ae.setForRemoval&&(Ee.push(te),Ke.add(te),ae.hasAnimation?this.driver.query(te,Iv,!0).forEach(Be=>Ke.add(Be)):ot.add(te))}let ze=new Map,Ye=yu(R,Array.from(Ke));Ye.forEach(($,te)=>{let ae=Qs+K++;ze.set(te,ae),$.forEach(Be=>Fi(Be,ae))}),e.push(()=>{N.forEach(($,te)=>{let ae=W.get(te);$.forEach(Be=>sr(Be,ae))}),Ye.forEach(($,te)=>{let ae=ze.get(te);$.forEach(Be=>sr(Be,ae))}),Ee.forEach($=>{this.processLeaveNode($)})});let ii=[],Bt=[];for(let $=this._namespaceList.length-1;$>=0;$--)this._namespaceList[$].drainQueuedTransitions(t).forEach(ae=>{let Be=ae.player,Rt=ae.element;if(ii.push(Be),this.collectedEnterElements.length){let $t=Rt[zi];if($t&&$t.setForMove){if($t.previousTriggersValues&&$t.previousTriggersValues.has(ae.triggerName)){let Xn=$t.previousTriggersValues.get(ae.triggerName),vi=this.statesByElement.get(ae.element);if(vi&&vi.has(ae.triggerName)){let ta=vi.get(ae.triggerName);ta.value=Xn,vi.set(ae.triggerName,ta)}}Be.destroy();return}}let ji=!k||!this.driver.containsElement(k,Rt),_i=ze.get(Rt),bn=W.get(Rt),dt=this._buildInstruction(ae,i,bn,_i,ji);if(dt.errors&&dt.errors.length){Bt.push(dt);return}if(ji){Be.onStart(()=>Gn(Rt,dt.fromStyles)),Be.onDestroy(()=>qi(Rt,dt.toStyles)),o.push(Be);return}if(ae.isFallbackTransition){Be.onStart(()=>Gn(Rt,dt.fromStyles)),Be.onDestroy(()=>qi(Rt,dt.toStyles)),o.push(Be);return}let up=[];dt.timelines.forEach($t=>{$t.stretchStartingKeyframe=!0,this.disabledNodes.has($t.element)||up.push($t)}),dt.timelines=up,i.append(Rt,dt.timelines);let rf={instruction:dt,player:Be,element:Rt};c.push(rf),dt.queriedElements.forEach($t=>gi(m,$t,[]).push(Be)),dt.preStyleProps.forEach(($t,Xn)=>{if($t.size){let vi=_.get(Xn);vi||_.set(Xn,vi=new Set),$t.forEach((ta,El)=>vi.add(El))}}),dt.postStyleProps.forEach(($t,Xn)=>{let vi=M.get(Xn);vi||M.set(Xn,vi=new Set),$t.forEach((ta,El)=>vi.add(El))})});if(Bt.length){let $=[];Bt.forEach(te=>{$.push(au(te.triggerName,te.errors))}),ii.forEach(te=>te.destroy()),this.reportError($)}let gt=new Map,yt=new Map;c.forEach($=>{let te=$.element;i.has(te)&&(yt.set(te,te),this._beforeAnimationBuild($.player.namespaceId,$.instruction,gt))}),o.forEach($=>{let te=$.element;this._getPreviousPlayers(te,!1,$.namespaceId,$.triggerName,null).forEach(Be=>{gi(gt,te,[]).push(Be),Be.destroy()})});let ni=Ee.filter($=>Pu($,_,M)),oi=new Map;vu(oi,this.driver,ot,M,Vi).forEach($=>{Pu($,_,M)&&ni.push($)});let Di=new Map;N.forEach(($,te)=>{vu(Di,this.driver,new Set($),_,xr)}),ni.forEach($=>{let te=oi.get($),ae=Di.get($);oi.set($,new Map([...te?.entries()??[],...ae?.entries()??[]]))});let gr=[],ea=[],gp={};c.forEach($=>{let{element:te,player:ae,instruction:Be}=$;if(i.has(te)){if(I.has(te)){ae.onDestroy(()=>qi(te,Be.toStyles)),ae.disabled=!0,ae.overrideTotalTime(Be.totalTime),o.push(ae);return}let Rt=gp;if(yt.size>1){let _i=te,bn=[];for(;_i=_i.parentNode;){let dt=yt.get(_i);if(dt){Rt=dt;break}bn.push(_i)}bn.forEach(dt=>yt.set(dt,Rt))}let ji=this._buildAnimation(ae.namespaceId,Be,gt,r,Di,oi);if(ae.setRealPlayer(ji),Rt===gp)gr.push(ae);else{let _i=this.playersByElement.get(Rt);_i&&_i.length&&(ae.parentPlayer=un(_i)),o.push(ae)}}else Gn(te,Be.fromStyles),ae.onDestroy(()=>qi(te,Be.toStyles)),ea.push(ae),I.has(te)&&o.push(ae)}),ea.forEach($=>{let te=r.get($.element);if(te&&te.length){let ae=un(te);$.setRealPlayer(ae)}}),o.forEach($=>{$.parentPlayer?$.syncPlayerEvents($.parentPlayer):$.destroy()});for(let $=0;$<Ee.length;$++){let te=Ee[$],ae=te[zi];if(sr(te,Qs),ae&&ae.hasAnimation)continue;let Be=[];if(m.size){let ji=m.get(te);ji&&ji.length&&Be.push(...ji);let _i=this.driver.query(te,Gs,!0);for(let bn=0;bn<_i.length;bn++){let dt=m.get(_i[bn]);dt&&dt.length&&Be.push(...dt)}}let Rt=Be.filter(ji=>!ji.destroyed);Rt.length?Lv(this,te,Rt):this.processLeaveNode(te)}return Ee.length=0,gr.forEach($=>{this.players.push($),$.onDone(()=>{$.destroy();let te=this.players.indexOf($);this.players.splice(te,1)}),$.play()}),gr}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,o,r){let c=[];if(t){let m=this.playersByQueriedElement.get(e);m&&(c=m)}else{let m=this.playersByElement.get(e);if(m){let _=!r||r==jr;m.forEach(M=>{M.queued||!_&&M.triggerName!=o||c.push(M)})}}return(i||o)&&(c=c.filter(m=>!(i&&i!=m.namespaceId||o&&o!=m.triggerName))),c}_beforeAnimationBuild(e,t,i){let o=t.triggerName,r=t.element,c=t.isRemovalTransition?void 0:e,m=t.isRemovalTransition?void 0:o;for(let _ of t.timelines){let M=_.element,I=M!==r,k=gi(i,M,[]);this._getPreviousPlayers(M,I,c,m,t.toState).forEach(N=>{let W=N.getRealPlayer();W.beforeDestroy&&W.beforeDestroy(),N.destroy(),k.push(N)})}Gn(r,t.fromStyles)}_buildAnimation(e,t,i,o,r,c){let m=t.triggerName,_=t.element,M=[],I=new Set,k=new Set,R=t.timelines.map(W=>{let K=W.element;I.add(K);let Ee=K[zi];if(Ee&&Ee.removedBeforeQueried)return new co(W.duration,W.delay);let Ke=K!==_,ot=Dv((i.get(K)||Tv).map(gt=>gt.getRealPlayer())).filter(gt=>{let yt=gt;return yt.element?yt.element===K:!1}),ze=r.get(K),Ye=c.get(K),ii=Cc(this._normalizer,W.keyframes,ze,Ye),Bt=this._buildPlayer(W,ii,ot);if(W.subTimeline&&o&&k.add(K),Ke){let gt=new Gr(e,m,K);gt.setRealPlayer(Bt),M.push(gt)}return Bt});M.forEach(W=>{gi(this.playersByQueriedElement,W.element,[]).push(W),W.onDone(()=>Av(this.playersByQueriedElement,W.element,W))}),I.forEach(W=>Fi(W,xc));let N=un(R);return N.onDestroy(()=>{I.forEach(W=>sr(W,xc)),qi(_,t.toStyles)}),k.forEach(W=>{gi(o,W,[]).push(N)}),N}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new co(e.duration,e.delay)}},Gr=class{namespaceId;triggerName;element;_player=new co;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,i)=>{t.forEach(o=>zs(e,i,void 0,o))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){gi(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function Av(n,e,t){let i=n.get(e);if(i){if(i.length){let o=i.indexOf(t);i.splice(o,1)}i.length==0&&n.delete(e)}return i}function Ev(n){return n??null}function Xs(n){return n&&n.nodeType===1}function Fv(n){return n=="start"||n=="done"}function Cu(n,e){let t=n.style.display;return n.style.display=e??"none",t}function vu(n,e,t,i,o){let r=[];t.forEach(_=>r.push(Cu(_)));let c=[];i.forEach((_,M)=>{let I=new Map;_.forEach(k=>{let R=e.computeStyle(M,k,o);I.set(k,R),(!R||R.length==0)&&(M[zi]=kv,c.push(M))}),n.set(M,I)});let m=0;return t.forEach(_=>Cu(_,r[m++])),c}function yu(n,e){let t=new Map;if(n.forEach(m=>t.set(m,[])),e.length==0)return t;let i=1,o=new Set(e),r=new Map;function c(m){if(!m)return i;let _=r.get(m);if(_)return _;let M=m.parentNode;return t.has(M)?_=M:o.has(M)?_=i:_=c(M),r.set(m,_),_}return e.forEach(m=>{let _=c(m);_!==i&&t.get(_).push(m)}),t}function Fi(n,e){n.classList?.add(e)}function sr(n,e){n.classList?.remove(e)}function Lv(n,e,t){un(t).onDone(()=>n.processLeaveNode(e))}function Dv(n){let e=[];return Su(n,e),e}function Su(n,e){for(let t=0;t<n.length;t++){let i=n[t];i instanceof ns?Su(i.players,e):e.push(i)}}function Bv(n,e){let t=Object.keys(n),i=Object.keys(e);if(t.length!=i.length)return!1;for(let o=0;o<t.length;o++){let r=t[o];if(!e.hasOwnProperty(r)||n[r]!==e[r])return!1}return!0}function Pu(n,e,t){let i=t.get(n);if(!i)return!1;let o=e.get(n);return o?i.forEach(r=>o.add(r)):e.set(n,i),t.delete(n),!0}var lr=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,i){this._driver=t,this._normalizer=i,this._transitionEngine=new Uc(e.body,t,i),this._timelineEngine=new Vc(e.body,t,i),this._transitionEngine.onRemovalComplete=(o,r)=>this.onRemovalComplete(o,r)}registerTrigger(e,t,i,o,r){let c=e+"-"+o,m=this._triggerCache[c];if(!m){let _=[],M=[],I=bu(this._driver,r,_,M);if(_.length)throw Yg(o,_);m=Mv(o,I,this._normalizer),this._triggerCache[c]=m}this._transitionEngine.registerTrigger(t,o,m)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,o){this._transitionEngine.insertNode(e,t,i,o)}onRemove(e,t,i){this._transitionEngine.removeNode(e,t,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,o){if(i.charAt(0)=="@"){let[r,c]=vc(i),m=o;this._timelineEngine.command(r,t,c,m)}else this._transitionEngine.trigger(e,t,i,o)}listen(e,t,i,o,r){if(i.charAt(0)=="@"){let[c,m]=vc(i);return this._timelineEngine.listen(c,t,m,r)}return this._transitionEngine.listen(e,t,i,o,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function Rv(n,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=kc(e[0]),e.length>1&&(i=kc(e[e.length-1]))):e instanceof Map&&(t=kc(e)),t||i?new Vv(n,t,i):null}var Vv=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,i,o){this._element=t,this._startStyles=i,this._endStyles=o;let r=n.initialStylesByElement.get(t);r||n.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&qi(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(qi(this._element,this._initialStyles),this._endStyles&&(qi(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(Gn(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Gn(this._element,this._endStyles),this._endStyles=null),qi(this._element,this._initialStyles),this._state=3)}}return n})();function kc(n){let e=null;return n.forEach((t,i)=>{Nv(i)&&(e=e||new Map,e.set(i,t))}),e}function Nv(n){return n==="display"||n==="position"}var ol=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,i,o){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=o,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let e=this.keyframes,t=this._triggerWebAnimation(this.element,e,this.options);if(!t)return this._onFinish(),null;this.domPlayer=t,this._finalKeyframe=e.length?e[e.length-1]:new Map;let i=()=>this._onFinish();return t.addEventListener("finish",i),this.onDestroy(()=>{t.removeEventListener("finish",i)}),t}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(i=>{t.push(Object.fromEntries(i))}),t}_triggerWebAnimation(e,t,i){let o=this._convertKeyframesToObject(t);try{return e.animate(o,i)}catch{return null}}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){let e=this._buildPlayer();e&&(this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),e.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=e*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,o)=>{o!=="offset"&&e.set(o,this._finished?i:$s(this.element,o))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},rl=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return yc(e,t)}getParentElement(e){return Ws(e)}query(e,t,i){return Pc(e,t,i)}computeStyle(e,t,i){return $s(e,t)}animate(e,t,i,o,r,c=[]){let m=o==0?"both":"forwards",_={duration:i,delay:o,fill:m};r&&(_.easing=r);let M=new Map,I=c.filter(N=>N instanceof ol);pu(i,o)&&I.forEach(N=>{N.currentSnapshot.forEach((W,K)=>M.set(K,W))});let k=lu(t).map(N=>new Map(N));k=du(e,k,M);let R=Rv(e,k);return new ol(e,k,_,R)}};
6var Zs="@",Iu="@.disabled",al=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,i,o){this.namespaceId=e,this.delegate=t,this.engine=i,this._onDestroy=o}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,o=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,o)}removeChild(e,t,i,o){if(o){this.delegate.removeChild(e,t,i,o);return}this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,o){this.delegate.setAttribute(e,t,i,o)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,o){this.delegate.setStyle(e,t,i,o)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){t.charAt(0)==Zs&&t==Iu?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i,o){return this.delegate.listen(e,t,i,o)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},qc=class extends al{factory;constructor(e,t,i,o,r){super(t,i,o,r),this.factory=e,this.namespaceId=t}setProperty(e,t,i){t.charAt(0)==Zs?t.charAt(1)=="."&&t==Iu?(i=i===void 0?!0:!!i,this.disableAnimations(e,i)):this.engine.process(this.namespaceId,e,t.slice(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i,o){if(t.charAt(0)==Zs){let r=Uv(e),c=t.slice(1),m="";return c.charAt(0)!=Zs&&([c,m]=qv(c)),this.engine.listen(this.namespaceId,r,c,m,_=>{let M=_._data||-1;this.factory.scheduleListenerCallback(M,i,_)})}return this.delegate.listen(e,t,i,o)}};function Uv(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function qv(n){let e=n.indexOf("."),t=n.substring(0,e),i=n.slice(e+1);return[t,i]}var sl=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,i){this.delegate=e,this.engine=t,this._zone=i,t.onRemovalComplete=(o,r)=>{r?.removeChild(null,o)}}createRenderer(e,t){let o=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let M=this._rendererCache,I=M.get(o);if(!I){let k=()=>M.delete(o);I=new al("",o,this.engine,k),M.set(o,I)}return I}let r=t.id,c=t.id+"-"+this._currentId;this._currentId++,this.engine.register(c,e);let m=M=>{Array.isArray(M)?M.forEach(m):this.engine.registerTrigger(r,c,e,M.name,M)};return t.data.animation.forEach(m),new qc(this,c,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,i){if(e>=0&&e<this._microtaskId){this._zone.run(()=>t(i));return}let o=this._animationCallbacksBuffer;o.length==0&&queueMicrotask(()=>{this._zone.run(()=>{o.forEach(r=>{let[c,m]=r;c(m)}),this._animationCallbacksBuffer=[]})}),o.push([t,i])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};var jv=(()=>{class n extends lr{constructor(t,i,o){super(t,i,o)}ngOnDestroy(){this.flush()}static \u0275fac=function(i){return new(i||n)(ie(la),ie(vo),ie(yo))};static \u0275prov=be({token:n,factory:n.\u0275fac})}return n})();function Wv(){return new Js}function Qv(n,e,t){return new sl(n,e,t)}var ku=[{provide:yo,useFactory:Wv},{provide:lr,useClass:jv},{provide:pa,useFactory:Qv,deps:[Ap,lr,Mt]}],Gv=[{provide:vo,useClass:zc},{provide:Fl,useValue:"NoopAnimations"},...ku],Tu=[{provide:vo,useFactory:()=>new rl},{provide:Fl,useFactory:()=>"BrowserAnimations"},...ku],Au=(()=>{class n{static withConfig(t){return{ngModule:n,providers:t.disableAnimations?Gv:Tu}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Se({type:n});static \u0275inj=we({providers:Tu,imports:[no]})}return n})();var Hv=(n,e)=>e.some(t=>n instanceof t),Eu,Fu;function $v(){return Eu||(Eu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Kv(){return Fu||(Fu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Lu=new WeakMap,Qc=new WeakMap,Du=new WeakMap,Wc=new WeakMap,Hc=new WeakMap;function Yv(n){let e=new Promise((t,i)=>{let o=()=>{n.removeEventListener("success",r),n.removeEventListener("error",c)},r=()=>{t(tn(n.result)),o()},c=()=>{i(n.error),o()};n.addEventListener("success",r),n.addEventListener("error",c)});return e.then(t=>{t instanceof IDBCursor&&Lu.set(t,n)}).catch(()=>{}),Hc.set(e,n),e}function Xv(n){if(Qc.has(n))return;let e=new Promise((t,i)=>{let o=()=>{n.removeEventListener("complete",r),n.removeEventListener("error",c),n.removeEventListener("abort",c)},r=()=>{t(),o()},c=()=>{i(n.error||new DOMException("AbortError","AbortError")),o()};n.addEventListener("complete",r),n.addEventListener("error",c),n.addEventListener("abort",c)});Qc.set(n,e)}var Gc={get(n,e,t){if(n instanceof IDBTransaction){if(e==="done")return Qc.get(n);if(e==="objectStoreNames")return n.objectStoreNames||Du.get(n);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return tn(n[e])},set(n,e,t){return n[e]=t,!0},has(n,e){return n instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in n}};function Bu(n){Gc=n(Gc)}
6function Zv(n){return n===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){let i=n.call(ll(this),e,...t);return Du.set(i,e.sort?e.sort():[e]),tn(i)}:Kv().includes(n)?function(...e){return n.apply(ll(this),e),tn(Lu.get(this))}:function(...e){return tn(n.apply(ll(this),e))}}function Jv(n){return typeof n=="function"?Zv(n):(n instanceof IDBTransaction&&Xv(n),Hv(n,$v())?new Proxy(n,Gc):n)}function tn(n){if(n instanceof IDBRequest)return Yv(n);if(Wc.has(n))return Wc.get(n);let e=Jv(n);return e!==n&&(Wc.set(n,e),Hc.set(e,n)),e}var ll=n=>Hc.get(n);function Vu(n,e,{blocked:t,upgrade:i,blocking:o,terminated:r}={}){let c=indexedDB.open(n,e),m=tn(c);return i&&c.addEventListener("upgradeneeded",_=>{i(tn(c.result),_.oldVersion,_.newVersion,tn(c.transaction),_)}),t&&c.addEventListener("blocked",_=>t(_.oldVersion,_.newVersion,_)),m.then(_=>{r&&_.addEventListener("close",()=>r()),o&&_.addEventListener("versionchange",M=>o(M.oldVersion,M.newVersion,M))}).catch(()=>{}),m}var e1=["get","getKey","getAll","getAllKeys","count"],t1=["put","add","delete","clear"],$c=new Map;function Ru(n,e){if(!(n instanceof IDBDatabase&&!(e in n)&&typeof e=="string"))return;if($c.get(e))return $c.get(e);let t=e.replace(/FromIndex$/,""),i=e!==t,o=t1.includes(t);if(!(t in(i?IDBIndex:IDBObjectStore).prototype)||!(o||e1.includes(t)))return;let r=function(c,...m){return na(this,null,function*(){let _=this.transaction(c,o?"readwrite":"readonly"),M=_.store;return i&&(M=M.index(m.shift())),(yield Promise.all([M[t](...m),o&&_.done]))[0]})};return $c.set(e,r),r}Bu(n=>Oe(z({},n),{get:(e,t,i)=>Ru(e,t)||n.get(e,t,i),has:(e,t)=>!!Ru(e,t)||n.has(e,t)}));var Kc=(()=>{let e=class e{constructor(){this.DB_NAME="mobile-db",this.STORE_NAME="mobile-store"}connect(){return na(this,null,function*(){let{STORE_NAME:i}=this;this.db=yield Vu(this.DB_NAME,2,{upgrade(o){o.createObjectStore(i)}})})}set(i,o){return Zn(this.db.put(this.STORE_NAME,o,i))}get(i){return i?Zn(this.db.get(this.STORE_NAME,i)):me(void 0)}remove(i){return Zn(this.db.delete(this.STORE_NAME,i))}clear(){return Zn(this.db.clear(this.STORE_NAME))}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=be({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var Nu=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({providers:[Dp(Bp()),ki,ma(()=>(o=>()=>o.connect())(fe(Kc))()),{provide:si,useExisting:Kc},{provide:To,useClass:Jp,multi:!0},{provide:To,useClass:Xp,multi:!0},{provide:To,useClass:Zp,multi:!0},jd,zd,De,Zo,It,ks]});let n=e;return n})();var Et=(()=>{let e=class e{constructor(i){this.dataService=i,this.isConditionalFieldInvalid=o=>Array.isArray(o)?o.some(r=>this.isFieldInvalid(r)):this.isFieldInvalid(o),this.isFieldAnswerEmpty=o=>{let r=o.answer,c=Array.isArray(r)?!r.length:!r;return o.type===Pr.NUMERIC?c=r==null||r==="":!c&&o.type===Pr.DATE_PART&&(o.typeView===Mr.DATE_CALENDAR?c=!(r.year&&r.month&&r.day):c=!r.year||r.year&&r.day&&!r.month),c},this.isVariantDisabled=o=>!!o.isExcluded,this.isFieldInQuestion=(o,r)=>r.fieldList.some(c=>c.fieldId===o.fieldId),this.resetFieldAnswer=o=>{o.answer&&(o.answer=null)},this.isFieldTypeVariant=o=>o.type===Pr.VARIANT,this.getGroupListByForm=(o,r=!1)=>{let c=o?o.groupList||o:[];return r&&c.sort((m,_)=>m.order<_.order?-1:m.order>_.order?1:0),c}}isFormInvalid(i){return i.groupList.flatMap(({questionList:o})=>o).some(({fieldList:o})=>o.some(r=>this.isFieldInvalid(r)||this.hasFieldInvalidSubFields(r)))}hasFieldInvalidSubFields(i){return Array.isArray(i.answer)?i.variantList.filter(o=>this.isVariantInFieldAnswer(o,i.answer)).flatMap(({conditionalFieldList:o})=>o).some(this.isConditionalFieldInvalid):!1}isFieldInvalid(i){return i.invalid||i.required&&this.isFieldAnswerEmpty(i)}isFieldMultiAnswerAllowed(i){return i.multi||i.type===Pr.VARIANT&&i.typeView===Mr.CHECKBOX}isVariantInFieldAnswer(i,o){return o?.includes(i.id)&&!i.isExcluded}applyExcludingVariant(i,o,r){let c=this.isVariantInFieldAnswer(o,i.answer),m=o.excludingVariantList||[];i.variantList.forEach(_=>{if(!r.includes(_.id)&&m.includes(_.id)&&(_.isExcluded=c,c)){let M=i.answer.indexOf(_.id);M!==-1&&i.answer.splice(M,1),r.push(_.id)}})}forEachFieldVariant(i,o){this.isFieldTypeVariant(i)&&i.variantList.forEach(o)}refreshVariantListByField(i,o){let r=[];o?.isExcluded&&(o.isExcluded=!1,this.applyExcludingVariant(i,o,r)),this.forEachFieldVariant(i,c=>{this.applyExcludingVariant(i,c,r)})}refreshQuestionListByFieldAndForm(i,o){let r=[];this.forEachFieldVariant(i,c=>{this.refreshQuestionListByVariantFieldAndForm(c,i,o,!0,r)})}refreshQuestionListByVariantFieldAndForm(i,o,r,c=!0,m=[]){let _=this.isVariantInFieldAnswer(i,o.answer),M=i.excludingQuestionList||[],I=this.getGroupListByForm(r),k=!1;this.forEachQuestionInGroupList(I,R=>{!m.includes(R.id)&&M.includes(R.id)&&!this.isFieldInQuestion(o,R)&&(!k&&!R.isExcluded!=!_&&(k=!0),R.isExcluded=_,_&&m.push(R.id))}),k&&c&&this.dataService.updateForm(r)}
6forEachQuestionInGroupList(i,o){i.forEach(r=>{r.isDeleted||r.questionList.forEach(c=>{c.isDeleted||o(c)})})}refreshQuestionListByForm(i,o){let r=[];o||(o=this.getGroupListByForm(i)),this.forEachQuestionInGroupList(o,c=>{(c.fieldList||[]).forEach(m=>{this.forEachFieldVariant(m,_=>{this.refreshQuestionListByVariantFieldAndForm(_,m,i,!1,r)})})})}resetFieldExcludedVariants(i){let o=i.answer||[];this.forEachFieldVariant(i,r=>{if(r.isExcluded){let c=o.indexOf(r.id);c!==-1&&o.splice(c,1)}})}updateField(i,o=!1){if(o&&this.dataService.updateNextButtonStatus(!1),this.dataService.isNextButtonLocked()||this.dataService.updateNextButtonStatus(this.isFieldInvalid(i)),i.variantList&&i.variantList.length&&!this.dataService.isNextButtonLocked())e:for(let r of i.variantList){let c=r.conditionalFieldList;if(this.isVariantInFieldAnswer(r,i.answer)&&c&&c.length){if(Array.isArray(c[0])){for(let m of c)for(let _ of m)if(this.updateField(_),this.dataService.isNextButtonLocked())break e}else for(let m of c)if(this.updateField(m),this.dataService.isNextButtonLocked())break e}}}prepareFormForSave(i){this.forEachQuestionInGroupList(this.getGroupListByForm(i),o=>{let r=o.isExcluded?this.resetFieldAnswer:this.resetFieldExcludedVariants;(o.fieldList||[]).forEach(c=>{r.call(this,c)})})}selectPrimaryField(i){return i.find(o=>this.isFieldTypeVariant(o))??i[0]}};e.\u0275fac=function(o){return new(o||e)(ie(zt))},e.\u0275prov=be({token:e,factory:e.\u0275fac});let n=e;return n})();var Uu=(()=>{let e=class e{constructor(i,o,r,c,m,_,M,I,k,R){this.userStorageService=i,this.simpleStorageService=o,this.questionnaireDataService=r,this.userService=c,this.providerDataService=m,this.providerAppointmentDataService=_,this.demographicsTaskService=M,this.deviceService=I,this.threadService=k,this.patientDataService=R}clearData(i=!0){return this.demographicsTaskService.resetData(),this.simpleStorageService.clear(i),this.questionnaireDataService.clearForm(),this.questionnaireDataService.clearFormsStorage(),this.providerDataService.clearData(),this.providerAppointmentDataService.clearData(),this.threadService.clearData(),this.patientDataService.clearData(),Qp(),this.userStorageService.clearAll()}logout(i=!0){return this.deviceService.isCordovaApp()?this.userService.initUserLoginData().pipe(L(()=>this.clearData(i)),L(()=>this.userService.setUserLoginData())):this.clearData(i)}};e.\u0275fac=function(o){return new(o||e)(ie(ki),ie(it),ie(zt),ie(De),ie(Ni),ie(Wd),ie(Gd),ie(Si),ie(Gt),ie(Ri))},e.\u0275prov=be({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var Yc=(function(n){return n.PORTRAIT="portrait",n.LANDSCAPE="landscape",n})(Yc||{}),qu=(()=>{let e=class e{constructor(i){this.deviceService=i,this.screen={orientation:{}},this.initialOrientation=Yc.PORTRAIT}setLandscapeMode(){this.isOrientationChanged()||this.changeOrientation(Yc.LANDSCAPE,!1)}changeOrientation(i,o){this.deviceService.isAndroidPlatform().subscribe(r=>{r&&(this.screen=window.screen,this.screen&&this.screen.orientation&&this.screen.orientation.lock&&(this.screen.orientation.lock(i).then(()=>{o&&this.screen.orientation.unlock()},c=>console.log(c)),this.currentOrientation=i!==this.initialOrientation?i:void 0))})}isOrientationChanged(){return!!this.currentOrientation}restorePortraitMode(){this.isOrientationChanged()&&this.changeOrientation(this.initialOrientation,!0)}};e.\u0275fac=function(o){return new(o||e)(ie(Si))},e.\u0275prov=be({token:e,factory:e.\u0275fac});let n=e;return n})();var zu=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({providers:[{provide:"APP_CONFIG",useValue:Ot.app},{provide:"MOBILE_CONFIG",useValue:Ot.mobile},{provide:"CORDOVA_CONFIG",useValue:Ot.cordova},{provide:"ENVIRONMENT_CONFIG",useValue:Ot},{provide:To,useClass:ed,multi:!0},{provide:Fo,useExisting:Uu},ho,zt,Et,Rn,qu]});let n=e;return n})();var Xc=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({imports:[Ht,ti]});let n=e;return n})();var ju=(()=>{let e=class e{constructor(i,o){this.appointmentCreateNavigationService=i,this.currentUserService=o}selectClinic({clinicUuid:i},o=!1){this.currentUserService.getModel().subscribe(({id:r})=>{this.appointmentCreateNavigationService.goToProviderSelectPage({clinicUuid:i,userId:r},{replaceUrl:o})})}};e.\u0275fac=function(o){return new(o||e)(h(Ge),h(It))},e.\u0275cmp=w({type:e,selectors:[["app-appointment-create-clinic-select"]],standalone:!1,decls:4,vars:3,consts:[[3,"clinicSelect","onlyOneClinicLoaded"]],template:function(o,r){o&1&&(s(0,"app-header-title-update"),f(1),d(2,"translate"),l(),s(3,"app-clinic-list",0),P("clinicSelect",function(m){return r.selectClinic(m)})("onlyOneClinicLoaded",function(m){return r.selectClinic(m,!0)}),l()),o&2&&(a(),b(u(2,1,"Schedule appointment")))},dependencies:[Xt,fs,T],encapsulation:2});let n=e;return n})();ri();function n1(n,e){if(n&1&&(s(0,"p",5),f(1),d(2,"applyTimezone"),d(3,"c4uDate"),l()),n&2){let t=g();a(),y(" ",D(3,4,D(2,1,t.appointment.appointmentStartAt,t.appointment.timezone),"full")," ")}}var Wu=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["app-appointment-list-item"]],inputs:{appointment:"appointment"},standalone:!1,decls:7,vars:4,consts:[[1,"avatar",3,"src"],[1,"content"],["class","time",4,"ngIf"],[1,"title"],[1,"subtitle"],[1,"time"]],template:function(o,r){o&1&&(v(0,"lib-avatar-image",0),s(1,"div",1),C(2,n1,4,7,"p",2),s(3,"p",3),f(4),l(),s(5,"p",4),f(6),l()()),o&2&&(p("src",r.appointment.doctorImage),a(2),p("ngIf",r.appointment.appointmentStartAt),a(2),y(" ",r.appointment.doctorName," "),a(2),y(" ",r.appointment.appointmentTitle||r.appointment.clinicName," "))},dependencies:[Ve,F,Je,ct],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;align-items:center}
6.avatar[_ngcontent-%COMP%]{--avatar-image-size: 2.25rem}.content[_ngcontent-%COMP%]{flex:1;line-height:1.25rem;font-size:1rem;letter-spacing:.0125rem;color:#505050;padding:0 .5rem}.content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] + p[_ngcontent-%COMP%]{margin-top:.25rem}.content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}"]});let n=e;return n})();var s1=n=>({"choose-appointment-container":n}),l1=()=>({name:"schedule-plus",color:"#fff"}),c1=()=>({name:"trash-new",color:"#949494"}),p1=()=>({name:"checked-in-pre",color:"#00A85A"});function d1(n,e){if(n&1&&(s(0,"button",8)(1,"span",9),f(2),d(3,"translate"),l(),v(4,"lib-svg-icon",10),l()),n&2){let t=g(2);p("routerLink",t.newAppointmentRouterLink),a(2),b(u(3,3,"SCHEDULE")),a(2),p("params",A(5,l1))}}function m1(n,e){if(n&1&&(s(0,"div",5)(1,"p",6),f(2),d(3,"translate"),l(),C(4,d1,5,6,"button",7),d(5,"hasCompanyAccess"),d(6,"async"),l()),n&2){let t=g();a(2),y(" ",u(3,2,"You do not currently have any scheduled upcoming appointments.")," "),a(2),p("ngIf",!t.isQuickLinkApp&&u(6,6,u(5,4,t.AccessSettingEnum.APPOINTMENT_CREATE)))}}function g1(n,e){if(n&1){let t=S();s(0,"a",23),P("click",function(){x(t);let o=g().$implicit,r=g(3);return O(r.chooseAppointment(o))})("keydown.enter",function(){x(t);let o=g().$implicit,r=g(3);return O(r.chooseAppointment(o))}),v(1,"app-appointment-list-item",24),l()}if(n&2){let t=g().$implicit;a(),p("appointment",t)}}function u1(n,e){if(n&1){let t=S();s(0,"div",25)(1,"button",26),d(2,"translate"),P("click",function(){x(t);let o=g().$implicit,r=g(3);return O(r.cancelAppointment(o))}),v(3,"lib-svg-icon",27),l()()}n&2&&(a(),G("aria-label",u(2,2,"Cancel Appointment")),a(2),p("params",A(4,c1)))}function f1(n,e){if(n&1&&v(0,"lib-add-to-waitlist",28),n&2){let t=g().$implicit,i=g().$implicit;p("clinicUuid",i.clinicUuid)("appointmentId",t.appointmentId)("consultationTypeId",t.consultationTypeId)("startAt",t.appointmentStartAt)("timezone",t.timezone)("isInWaitlist",t.isInWaitList)}}function h1(n,e){if(n&1&&(s(0,"div",18)(1,"div",19),C(2,g1,2,1,"a",20)(3,u1,4,5,"div",21),l(),C(4,f1,1,6,"lib-add-to-waitlist",22),l()),n&2){let t=e.$implicit,i=g().$implicit,o=g(2);a(2),p("ngIf",t),a(),p("ngIf",i.isNewCheckIn&&!i.isCheckInFinished&&t.isCancellable&&t.canPatientCancel),a(),p("ngIf",!o.isQuickLinkApp)}}function _1(n,e){if(n&1){let t=S();s(0,"span",32)(1,"button",33),P("click",function(){x(t);let o=g(2).$implicit,r=g(2);return O(r.startCheckIn(o))}),f(2),d(3,"translate"),l()()}n&2&&(a(2),y(" ",u(3,1,"CHECK IN")," "))}function C1(n,e){n&1&&(s(0,"span",34),v(1,"lib-svg-icon",27),l()),n&2&&(a(),p("params",A(1,p1)))}function v1(n,e){if(n&1&&(s(0,"span",29),C(1,_1,4,3,"span",30)(2,C1,2,2,"span",31),l()),n&2){let t=g().$implicit;a(),p("ngIf",!t.isCheckInFinished),a(),p("ngIf",t.isCheckInFinished)}}function y1(n,e){if(n&1&&(s(0,"li"),C(1,h1,5,3,"div",16)(2,v1,3,2,"span",17),l()),n&2){let t=e.$implicit;a(),p("ngForOf",t.appointments),a(),p("ngIf",t.isNewCheckIn)}}function P1(n,e){if(n&1){let t=S();s(0,"div",35)(1,"a",36),P("click",function(){x(t);let o=g(2);return O(o.showAllTasks())}),f(2),d(3,"translate"),l()()}n&2&&(a(2),b(u(3,1,"See all tasks")))}function M1(n,e){if(n&1&&(s(0,"div",11)(1,"div",12)(2,"ul",13),C(3,y1,3,2,"li",14),l()(),C(4,P1,4,3,"div",15),l()),n&2){let t=g();a(3),p("ngForOf",t.groupedAppointmentList),a(),p("ngIf",t.parentComponent==="choose-appointment")}}function b1(n,e){if(n&1&&v(0,"lib-floating-button",37),n&2){let t=g(),i=V(1);p("isCollapsed",!i.value)("routerLink",t.newAppointmentRouterLink)}}var fn,cl=(fn=class{constructor(e,t,i,o,r,c,m,_,M,I,k,R,N,W){this.appointmentApiService=e,this.appointmentCreateNavigationService=t,this.router=i,this.redirectService=o,this.localStorage=r,this.configService=c,this.checkInFlowService=m,this.currentUserService=_,this.activatedRoute=M,this.userApiService=I,this.userService=k,this.modalWindowService=R,this.mediatorService=N,this.analyticsMobileService=W,this.newAppointmentRouterLink="/user/appointment/create",this.isQuickLinkApp=this.configService.isQuicklinkApp(),this.AccessSettingEnum=ai}ngOnInit(){this.queryParams=this.activatedRoute.snapshot.queryParams,this.loadAppointmentList().subscribe(()=>{this.appointmentCreateNavigationService.isAppointmentBookingRequired(this.queryParams)?this.connectUserToClinicAndBookAppointment(+this.queryParams.userId,this.queryParams.clinicUuid):this.redirectToCheckInLandingIfCameFromLogin()}),this.mediatorService.listen("refreshAppointmentList").pipe(Le(this),L(()=>this.loadAppointmentList())).subscribe()}loadAppointmentList(){return this.appointmentApiService.getAppointmentList().pipe(ne(e=>{this.appointmentList=e,this.groupedAppointmentList=this.checkInFlowService.getGroupedAppointmentList(e)}))}redirectToCheckInLandingIfCameFromLogin(){if(this.activatedRoute.snapshot.queryParams.cameFrom!=="login")return;let e=this.groupedAppointmentList.find(({isCheckInFinished:t,isNewCheckIn:i})=>!t&&i);e&&this.checkInFlowService.redirectToCheckInLanding(e)}connectUserToClinicAndBookAppointment(e,t){(e?me(e):this.currentUserService.getAccountData().pipe(re(({memberId:i})=>i))).pipe(L(i=>this.userApiService.createConnectionToClinic(i,t))).subscribe(()=>this.createAppointment())}createAppointment(){let e={clinicUuid:this.queryParams.clinicUuid,consultationTypeId:this.queryParams.consultationTypeId,departmentUuid:this.queryParams.departmentId,finishAt:this.queryParams.finishAt,flexibleDayList:[],providerId:this.queryParams.doctorId,startAt:this.queryParams.startAt,text:decodeURI(this.queryParams.appointmentComment),source:"self_scheduling"};this.queryParams.locationId&&(e.locationId=this.queryParams.locationId),this.queryParams.externalId&&(e.externalId=this.queryParams.externalId),this.queryParams.specialtyId&&(e.specialtyId=Number(this.queryParams.specialtyId));let t=this.appointmentApiService.create(e);this.queryParams.waitlist&&(t=this.appointmentApiService.createAndAddToWaitlist(e)),t.pipe(L(i=>
6this.analyticsMobileService.collectAppointmentCreatedAnalytics().pipe(re(()=>i)))).subscribe(i=>{this.router.navigateByUrl(`/${this.userService.getUserRole()}/appointment/${i}`)})}startCheckIn(e){this.appointmentApiService.startCheckIn([e.appointmentId]).pipe(aa(()=>this.checkInFlowService.goToCheckInFlowTasks(e))).subscribe()}isListEmpty(){return this.appointmentList&&this.appointmentList.length===0}isListNotEmpty(){return this.appointmentList&&this.appointmentList.length>0}filterList(e){return e.appointmentId>0}showAllTasks(){this.localStorage.remove("appointmentId"),this.router.navigate(["/user/task"])}chooseAppointment({appointmentId:e}){this.parentComponent==="choose-appointment"?(this.redirectService.clearCachedData(),this.redirectService.setAppointmentId(e),this.router.navigate(["/user/task"])):this.router.navigate(["/user/appointment/"+e])}cancelAppointment({appointmentId:e}){this.modalWindowService.confirm("Are you sure you want to cancel this appointment?","Warning","YES, CANCEL","NO, GO BACK").pipe(ge(Boolean),L(()=>this.appointmentApiService.delete(e)),L(()=>this.loadAppointmentList())).subscribe()}},fn.\u0275fac=function(t){return new(t||fn)(h(Ct),h(Ge),h(B),h(mt),h(it),h(oe),h(St),h(bt),h(j),h(Ze),h(De),h(rt),h(bi),h(jn))},fn.\u0275cmp=w({type:fn,selectors:[["app-appointment-list"]],inputs:{parentComponent:"parentComponent"},standalone:!1,decls:7,vars:10,consts:[["isAtTheTop","isAtThePosition"],["libIsAtThePosition","top",1,"appointment-list-container",3,"ngClass"],["class","no-appointments",4,"ngIf"],["class","list-wrapper clinic-list",4,"ngIf"],["iconName","schedule-plus","backgroundColor","#064060","text","SCHEDULE","tabindex","-1",3,"isCollapsed","routerLink",4,"ngIf"],[1,"no-appointments"],[1,"no-appointments-message"],["libButton","","class","schedule-appointment-button","type","button",3,"routerLink",4,"ngIf"],["libButton","","type","button",1,"schedule-appointment-button",3,"routerLink"],[1,"button-text"],[1,"button-icon",3,"params"],[1,"list-wrapper","clinic-list"],[1,"list-content"],[1,"list"],[4,"ngFor","ngForOf"],["class","see-all",4,"ngIf"],["class","appointment-row",4,"ngFor","ngForOf"],["class","new-check-in",4,"ngIf"],[1,"appointment-row"],[1,"appointment-details"],["class","element","tabindex","0",3,"click","keydown.enter",4,"ngIf"],["class","button-wrapper",4,"ngIf"],[3,"clinicUuid","appointmentId","consultationTypeId","startAt","timezone","isInWaitlist",4,"ngIf"],["tabindex","0",1,"element",3,"click","keydown.enter"],[3,"appointment"],[1,"button-wrapper"],["type","button",1,"cancel-appointment-button",3,"click"],[3,"params"],[3,"clinicUuid","appointmentId","consultationTypeId","startAt","timezone","isInWaitlist"],[1,"new-check-in"],["class","check-in-flow",4,"ngIf"],["class","check-in-flow completed",4,"ngIf"],[1,"check-in-flow"],["libButton","","type","button",1,"start-checkin-button",3,"click"],[1,"check-in-flow","completed"],[1,"see-all"],[3,"click"],["iconName","schedule-plus","backgroundColor","#064060","text","SCHEDULE","tabindex","-1",3,"isCollapsed","routerLink"]],template:function(t,i){t&1&&(s(0,"div",1,0),C(2,m1,7,8,"div",2)(3,M1,5,2,"div",3),l(),C(4,b1,1,2,"lib-floating-button",4),d(5,"hasCompanyAccess"),d(6,"async")),t&2&&(p("ngClass",ce(8,s1,i.parentComponent==="choose-appointment")),a(2),p("ngIf",i.isListEmpty()),a(),p("ngIf",i.isListNotEmpty()),a(),p("ngIf",i.isListNotEmpty()&&!i.isQuickLinkApp&&u(6,6,u(5,4,i.AccessSettingEnum.APPOINTMENT_CREATE))))},dependencies:[Ro,Ga,Qe,He,ue,F,U,ve,Jo,Wu,$a,T,Fe],styles:['[_nghost-%COMP%]{display:block;height:100%;position:relative}.appointment-list-container[_ngcontent-%COMP%]{height:100%;overflow:auto}.quick-link-app[_nghost-%COMP%] .appointment-list-container[_ngcontent-%COMP%], .quick-link-app [_nghost-%COMP%] .appointment-list-container[_ngcontent-%COMP%]{overflow:initial;height:fit-content}.list-wrapper[_ngcontent-%COMP%]{width:100%;flex-direction:column}.see-all[_ngcontent-%COMP%]{margin:2rem auto;text-align:center}.choose-appointment-container[_ngcontent-%COMP%] .no-appointments[_ngcontent-%COMP%]{display:none}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}.list-content[_ngcontent-%COMP%]{display:flex;flex:1}.list-wrapper[_ngcontent-%COMP%]{display:flex;flex:1;width:100%}.element[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1rem;border-top:1px solid #e6e6e6;align-items:center;justify-content:space-between;color:#505050;font-size:.9rem;cursor:pointer;-webkit-overflow-scrolling:touch}.element[_ngcontent-%COMP%]:last-child, .element[_ngcontent-%COMP%] .last[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 .5rem;overflow:hidden;flex:1;line-height:1.3rem}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%], .element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:block}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{margin-bottom:.3rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;flex:.2;--avatar-image-size: 2rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg, .element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:2rem;height:2rem;min-width:1rem;min-height:1rem;background-size:2rem}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{color:#a7a7a7;display:flex;align-items:center;font-family:Roboto-medium,sans-serif}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:1.4rem;height:1.4rem}.no-appointments[_ngcontent-%COMP%]{padding:1.25rem 2.25rem;height:100%;box-sizing:border-box;font-family:Roboto-regular,sans-serif}.no-appointments[_ngcontent-%COMP%] .no-appointments-message[_ngcontent-%COMP%]{color:#505050;text-align:left;padding:0;font-size:1rem;line-height:1.5rem;letter-spacing:.0125rem}.no-appointments[_ngcontent-%COMP%] .schedule-appointment-button[_ngcontent-%COMP%]{--svg-size: 1.75rem;width:15rem;border-radius:1.5rem;margin:3.5rem auto 0;height:3.125rem}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:1.25rem;position:relative}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .appointment-row[_ngcontent-%COMP%]{margin-bottom:1.125rem}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .appointment-details[_ngcontent-%COMP%]{display:flex}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{padding:0;border:none;font-family:Roboto-regular,sans-serif}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] lib-add-to-waitlist[_ngcontent-%COMP%]{margin-left:2.25rem;padding-left:.5rem;margin-top:.25rem}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .check-in-flow[_ngcontent-%COMP%]{display:flex;align-items:flex-end;justify-content:center}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .check-in-flow.completed[_ngcontent-%COMP%]{padding:0}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .check-in-flow.completed[_ngcontent-%COMP%] svg{width:9rem;height:2.5rem}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .check-in-flow[_ngcontent-%COMP%] .start-checkin-button[_ngcontent-%COMP%]{width:auto;padding:.75rem 1.375rem}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:1px}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:after{content:"";display:block;right:0;left:0;height:1px;background-color:#e6e6e6;position:absolute;bottom:-1px}.element[_ngcontent-%COMP%]{flex:1}.button-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.button-wrapper[_ngcontent-%COMP%] .cancel-appointment-button[_ngcontent-%COMP%]{cursor:pointer;background:none}.button-wrapper[_ngcontent-%COMP%] .cancel-appointment-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:.875rem;height:1.125rem}@media all and (min-width:700px){.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:1rem 2.5rem}.list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:after{right:2.5rem;left:2.5rem}}']}),fn);cl=Xe([et(),ut("design:paramtypes",[Ct,Ge,B,mt,it,oe,St,bt,j,Ze,De,rt,bi,jn])],cl);var Gu=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["ng-component"]],standalone:!1,decls:4,vars:3,template:function(o,r){o&1&&(s(0,"app-header-title-update"),f(1),d(2,"translate"),l(),v(3,"app-appointment-list")),o&2&&(a(),b(u(2,1,"My Appointments")))},dependencies:[Xt,cl,T],styles:["app-appointment-list[_ngcontent-%COMP%]{width:100%}"]});let n=e;return n})();function O1(n,e){if(n&1&&(s(0,"h4",7),f(1),d(2,"applyTimezone"),d(3,"c4uDate"),l()),n&2){let t=e.$implicit,i=g(2);a(),y(" ",D(3,4,D(2,1,i.appointmentsStartAt[t],i.department.timezone),"document_full")," ")}}function w1(n,e){if(n&1){let t=S();s(0,"div",2)(1,"div",3)(2,"p",4),f(3),d(4,"translate"),l(),C(5,O1,4,7,"h4",5),l(),s(6,"button",6),P("click",function(){x(t);let o=g();return O(o.rescheduleAppointment())}),f(7),d(8,"translate"),l()()}if(n&2){let t=g();a(3),y(" ",u(4,3,"Please confirm your new appointment date and time")," "),a(2),p("libRepeat",t.appointmentsStartAt.length),a(2),y(" ",u(8,5,"RESCHEDULE NOW")," ")}}var Hu=(()=>{let e=class e{constructor(i,o,r,c,m,_,M,I,k,R){this.activatedRoute=i,this.providerPublicApiService=o,this.clinicApiService=r,this.clinicPublicApiService=c,this.departmentApiService=m,this.appointmentCreateNavigationService=_,this.dateTimeService=M,this.appointmentApiService=I,this.userService=k,this.configService=R,this.queryParams=this.activatedRoute.snapshot.queryParams,this.isCareManagerApp=this.configService.isCareManagerApp(),this.appointmentsStartAt=[this.queryParams.startAt].flat(1)}ngOnInit(){let{clinicUuid:i,providerId:o,consultationTypeId:r,departmentId:c,locationId:m}=this.queryParams;Ft([this.providerPublicApiService.getDoctorById(i,o,this.isCareManagerApp?{}:{usageType:"self_scheduling"}),this.departmentApiService.getDepartmentByUuid(i,c),this.clinicApiService.getConsultationTypeById(i,+r,{providerId:o,departmentUuid:c}),m?this.clinicPublicApiService.getLocationName(i,m,c):me("")]).subscribe(([_,M,I,k])=>{this.provider=_,this.department=M,this.consultationType=I,this.locationName=k})}
6getRescheduleAppointmentParams(i,o,r){let{departmentId:c,locationId:m,providerId:_,consultationTypeId:M,userId:I}=this.queryParams,k=this.dateTimeService.format(this.dateTimeService.getUtcDate(i),"iso8601offset"),R=this.dateTimeService.format(this.dateTimeService.getUtcDate(o),"iso8601offset"),N={departmentUuid:c,providerId:_,consultationTypeId:M,startAt:k,finishAt:R,externalId:r};return this.userService.isDefaultUserRoleProvider()&&(N.userId=I),m&&(N.locationId=m),N}rescheduleAppointment(){let{startAt:i,finishAt:o,externalId:r,cancelAppointmentId:c}=this.queryParams;this.appointmentApiService.reschedule(this.queryParams.clinicUuid,c,this.getRescheduleAppointmentParams(i,o,r)).subscribe(m=>this.appointmentCreateNavigationService.goToSummaryPage(this.queryParams.clinicUuid,m,this.queryParams.patientId?+this.queryParams.patientId:0,null,null,Dr.RESCHEDULED))}};e.\u0275fac=function(o){return new(o||e)(h(j),h(wi),h(Te),h(Yt),h(li),h(Ge),h(lt),h(Ct),h(De),h(oe))},e.\u0275cmp=w({type:e,selectors:[["app-appointment-create-confirm-reschedule"]],standalone:!1,decls:2,vars:5,consts:[[3,"consultationType","department","locationName","provider"],["class","container",4,"ngIf"],[1,"container"],[1,"card"],[1,"description"],["class","appointment-date",4,"libRepeat"],["libButton","","type","button",1,"confirm-button",3,"click"],[1,"appointment-date"]],template:function(o,r){o&1&&(v(0,"app-appointment-create-provider-header",0),C(1,w1,9,7,"div",1)),o&2&&(p("consultationType",r.consultationType)("department",r.department)("locationName",r.locationName)("provider",r.provider),a(),p("ngIf",r.department))},dependencies:[so,F,ve,er,Je,ct,T],styles:["[_nghost-%COMP%]{width:100%;height:100%;overflow:auto;display:flex;flex-direction:column;background-color:#8080801a}.container[_ngcontent-%COMP%]{flex:1;padding:1.5rem 1rem}.appointment-date[_ngcontent-%COMP%]{margin-top:.625rem;line-height:1.25rem;font-family:Roboto-bold,sans-serif;letter-spacing:.0325rem;text-align:center}.description[_ngcontent-%COMP%]{line-height:1.5rem;letter-spacing:.015rem;margin-bottom:.5rem}.card[_ngcontent-%COMP%]{padding:2rem 1rem;background:#fff;border-radius:8px;display:flex;flex-direction:column;text-align:center;max-width:51.25rem;margin:auto}.confirm-button[_ngcontent-%COMP%]{width:15rem;margin:3rem auto}"]});let n=e;return n})();var Zc=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({imports:[Ht,Jo,tr,Ls,Ds,is,Vs,Rr,Br,ps]});let n=e;return n})();var $u={[Tt.ACCOUNT_SETTINGS]:{path:"/user/account-settings",iconName:"settings",title:"Settings"},[Tt.DOCUMENTS]:{path:"/user/documents",iconName:"documents",title:"Documents"},[Tt.GRAPH]:{path:"/user/vital/group",iconName:"graph",title:"Graphs"},[Tt.FAMILY]:{path:"/user/family",iconName:"family",title:"My Family"},[Tt.PROVIDERS]:{path:"/user/provider",iconName:"provider",title:"Clinics"},[Tt.LANGUAGE]:{path:"/user/single/languages",iconName:"language",title:"Language"},[Tt.OUTSTANDING_BALANCE]:{path:"/user/outstanding-balance-list",queryParams:{cameFrom:"login"}
6,iconName:"copay",title:"Outstanding Balance"},[Tt.SCHEDULE_APPOINTMENT]:{path:"/user/appointment/create",iconName:"plus",title:"Schedule appointment"},[Tt.VV_PORTAL]:{path:"https://9028.portal.athenahealth.com/",iconName:"folder",title:"Patient Portal",external:!0}};ri();var S1=n=>({"primary-family-member":n}),I1=()=>({name:"trash-new",color:"#949494"});function T1(n,e){n&1&&(s(0,"span",6),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"(You)")," "))}function k1(n,e){if(n&1){let t=S();s(0,"div")(1,"button",7),d(2,"translate"),P("click",function(o){x(t);let r=g();return O(r.deleteFamilyMember(o))}),v(3,"lib-svg-icon",8),l()()}n&2&&(a(),G("aria-label",u(2,2,"Delete")),a(2),p("params",A(4,I1)))}var Ku=(()=>{let e=class e{constructor(i,o){this.userFamilyService=i,this.cdr=o,this.isActiveFamilyMember=!1,this.isPrimaryFamilyMember=!1,this.canBeRemoved=!1,this.familyMemberSelect=new he(!0),this.familyMemberDelete=new he(!0)}ngOnInit(){this.isPrimaryFamilyMember&&this.familyMemberImage?this.userFamilyService.transformPrimaryUserImage(this.familyMemberImage).subscribe(i=>{this.familyMemberImageTransformed=i,this.cdr.markForCheck()}):this.familyMemberImageTransformed=this.familyMemberImage}deleteFamilyMember(i){i.stopPropagation(),this.familyMemberDelete.emit()}selectFamilyMember(){this.familyMemberSelect.emit()}};e.\u0275fac=function(o){return new(o||e)(h(Ti),h(wo))},e.\u0275cmp=w({type:e,selectors:[["app-family-list-item"]],inputs:{familyMemberName:"familyMemberName",familyMemberImage:"familyMemberImage",isActiveFamilyMember:"isActiveFamilyMember",isPrimaryFamilyMember:"isPrimaryFamilyMember",canBeRemoved:"canBeRemoved"},outputs:{familyMemberSelect:"familyMemberSelect",familyMemberDelete:"familyMemberDelete"},standalone:!1,decls:7,vars:8,consts:[["tabindex","0",1,"element",3,"click","ngClass"],[1,"icon"],[3,"src","name"],[1,"content"],["class","icon-wrapper",4,"ngIf"],[4,"ngIf"],[1,"icon-wrapper"],["type","button",1,"arrow",3,"click"],[3,"params"]],template:function(o,r){o&1&&(s(0,"a",0),P("click",function(){return r.selectFamilyMember()}),s(1,"span",1),v(2,"lib-avatar-image",2),l(),s(3,"span",3),f(4),l(),C(5,T1,3,3,"span",4),l(),C(6,k1,4,5,"div",5)),o&2&&(p("ngClass",ce(6,S1,r.isPrimaryFamilyMember)),a(2),p("src",r.familyMemberImageTransformed)("name",r.familyMemberName),a(2),b(r.familyMemberName),a(),p("ngIf",r.isPrimaryFamilyMember),a(),p("ngIf",!r.isPrimaryFamilyMember&&!r.isActiveFamilyMember&&r.canBeRemoved))},dependencies:[Ve,He,F,U,T],styles:[".element[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1rem;border-top:1px solid #e6e6e6;align-items:center;justify-content:space-between;color:#505050;font-size:.9rem;cursor:pointer;-webkit-overflow-scrolling:touch}.element[_ngcontent-%COMP%]:last-child, .element[_ngcontent-%COMP%] .last[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 .5rem;overflow:hidden;flex:1;line-height:1.3rem}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%], .element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:block}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{margin-bottom:.3rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;flex:.2;--avatar-image-size: 2rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg, .element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:2rem;height:2rem;min-width:1rem;min-height:1rem;background-size:2rem}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{color:#a7a7a7;display:flex;align-items:center;font-family:Roboto-medium,sans-serif}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:1.4rem;height:1.4rem}.element[_ngcontent-%COMP%]{font-size:inherit;padding:24px 16px}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{--avatar-image-size: 32px}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg{width:32px;height:32px}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:22px;height:22px}[_nghost-%COMP%]{display:flex;align-items:center}.icon[_ngcontent-%COMP%]{flex:none!important}.element[_ngcontent-%COMP%]{flex:1;padding:8px 0;border:none!important}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-family:Roboto-regular,sans-serif;font-weight:700}.element[_ngcontent-%COMP%] lib-avatar-image[_ngcontent-%COMP%]{--avatar-image-size: 38px}.element[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%]{justify-content:flex-end}.element[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:1.4rem;height:1.4rem}.primary-family-member[_ngcontent-%COMP%]{justify-content:left}.primary-family-member[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex:none}.arrow[_ngcontent-%COMP%]{background:none;cursor:pointer}.arrow[_ngcontent-%COMP%] svg{width:22px;height:22px}"],changeDetection:0});let n=e;return n})();var F1=()=>({name:"plus",color:"#064060"});function L1(n,e){if(n&1){let t=S();s(0,"li")(1,"app-family-list-item",9),d(2,"usePreferredName"),P("familyMemberSelect",function(){x(t);let o=g(2);return O(o.logoutFromMember(o.activeMember))}),l()()}if(n&2){let t=g(2);a(),p("familyMemberName",io(2,3,t.primaryUser.preferredName,t.primaryUser.firstName,t.primaryUser.name))("familyMemberImage",t.primaryUser.image)("isPrimaryFamilyMember",!0)}}function D1(n,e){if(n&1){let t=S();s(0,"app-family-list-item",11),d(1,"usePreferredName"),P("familyMemberSelect",function(){x(t);let o=g().$implicit,r=g(2);return O(r.loginAsMember(o))})("familyMemberDelete",function(){x(t);let o=g().$implicit,r=g(2);return O(r.onFamilyMemberDelete(o))}),l()}if(n&2){let t=g().$implicit,i=g(2);p("familyMemberName",io(1,4,t.preferredName,t.firstName,t.name))("familyMemberImage",t.image)("isActiveFamilyMember",i.activeMember.userId===t.userId)("canBeRemoved",i.primaryUser.id===i.activeMember.userId)}}function B1(n,e){if(n&1&&(s(0,"li"),C(1,D1,2,8,"app-family-list-item",10),l()),n&2){let t=e.$implicit,i=g(2);a(),p("ngIf",t.userId!==(i.activeMember==null?null:i.activeMember.userId)
6)}}function R1(n,e){if(n&1&&(s(0,"ul",6),C(1,L1,3,7,"li",7)(2,B1,2,1,"li",8),d(3,"trackByProp"),l()),n&2){let t=g();a(),p("ngIf",(t.primaryUser==null?null:t.primaryUser.id)!==(t.activeMember==null?null:t.activeMember.userId)),a(),p("ngForOf",t.memberList)("ngForTrackBy",u(3,3,"userId"))}}function V1(n,e){if(n&1){let t=S();s(0,"button",12),P("click",function(){x(t);let o=g();return O(o.addFamilyMember())}),s(1,"span",13),v(2,"lib-svg-icon",14),l(),s(3,"span",15),f(4),d(5,"translate"),l()()}n&2&&(a(2),p("params",A(4,F1)),a(2),b(u(5,2,"ADD FAMILY MEMBER")))}var hn,pl=(hn=class{constructor(e,t,i,o,r,c,m,_,M,I){this.configService=e,this.userFamilyService=t,this.currentUserService=i,this.redirectService=o,this.router=r,this.userService=c,this.userStorageService=m,this.modalWindowService=_,this.mediatorService=M,this.sideMenuService=I,this.switchFamilyMember=new he,this.memberList=[],this.isActionButtonVisible=!1,this.isFamilyLogin=!1,this.currentUserService.getModel().subscribe(k=>{this.currentUserId=k.id,this.loadList()}),this.userFamilyService.familyMemberConnectedSubject.pipe(Le(this)).subscribe(()=>this.loadList())}setActiveMember(e,t){this.activeMember={user:e,image:e.image,userId:e.id,name:e.name,memberType:t}}addFamilyMember(){this.sideMenuService.closeSideMenu(),this.router.navigate(["/user/family/connect"])}loadList(){this.userFamilyService.getPrimaryUser().pipe(ne(e=>this.primaryUser=e),L(e=>this.userFamilyService.isFamilyLogin().pipe(ne(t=>{this.isFamilyLogin=t,this.isActionButtonVisible=!this.isFamilyLogin&&this.configService.isMyCarePlanApp(),t||(this.setActiveMember(e,"owner"),this.userFamilyService.setPrimaryUser())}),L(()=>this.userFamilyService.getFamilyByUserId(e.id))))).subscribe(e=>{this.activeMember||(this.activeMember=e.find(({userId:t})=>t===this.currentUserId)),this.memberList=e})}onFamilyMemberDelete(e){this.modalWindowService.confirm("Should we remove this family member from your list?","Remove family member?","REMOVE","CANCEL").pipe(ge(Boolean),L(()=>this.userFamilyService.deleteFamilyMember(this.currentUserId,e.userId))).subscribe(()=>this.loadList())}loginAsMember(e){if(e.userId===this.activeMember.userId)return;let t=this.primaryUser.id===e.userId?"owner":e.memberType;this.userFamilyService.switchToFamily(e).pipe(ne(i=>{i.role=this.userService.getUserRole(),this.userService.randomizeUserImage(i,!0)}),L(i=>this.saveLoginData(i).pipe(L(()=>this.userStorageService.setUser(i)),re(()=>i)))).subscribe(i=>this.onUserSwitch(i,t))}logoutFromMember(e){e.userId!==this.primaryUser.id&&this.userFamilyService.switchToPrimary().pipe(ne(t=>{t.role=this.userService.getUserRole(),this.userService.randomizeUserImage(t,!0)}),L(t=>this.saveLoginData(t).pipe(L(()=>this.userStorageService.setUser(t)),L(()=>this.userStorageService.removeUser(e.userId,Ue.USER)),re(()=>t)))).subscribe(t=>this.onUserSwitch(t,"owner"))}onUserSwitch(e,t){this.switchFamilyMember.emit(),this.setActiveMember(e,t),this.redirectService.setCalendarParams(""),this.router.navigate([this.configService.getDefaultRoute(Ut.USER)]).then(()=>{this.mediatorService.emit("refreshAppointmentList")})}saveLoginData(e){return this.userService.saveLoginData("id",e.memberId).pipe(L(()=>this.userService.saveLoginData("memberType",e.memberType)))}},hn.\u0275fac=function(t){return new(t||hn)(h(oe),h(Ti),h(It),h(mt),h(B),h(De),h(ki),h(rt),h(bi),h(vt))},hn.\u0275cmp=w({type:hn,selectors:[["app-user-family-list"]],outputs:{switchFamilyMember:"switchFamilyMember"},standalone:!1,decls:9,vars:5,consts:[["role","group",1,"family-profiles-list"],[1,"list-wrapper"],[1,"title"],[1,"list-content"],["class","list",4,"ngIf"],["class","link",3,"click",4,"ngIf"],[1,"list"],[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"familyMemberSelect","familyMemberName","familyMemberImage","isPrimaryFamilyMember"],[3,"familyMemberName","familyMemberImage","isActiveFamilyMember","canBeRemoved","familyMemberSelect","familyMemberDelete",4,"ngIf"],[3,"familyMemberSelect","familyMemberDelete","familyMemberName","familyMemberImage","isActiveFamilyMember","canBeRemoved"],[1,"link",3,"click"],[1,"add-member-icon"],[3,"params"],[1,"text"]],template:function(t,i){t&1&&(s(0,"div",0)(1,"div",1)(2,"h2",2),f(3),d(4,"translate"),l(),s(5,"div",3),C(6,R1,4,5,"ul",4),l(),s(7,"div"),C(8,V1,6,5,"button",5),l()()()),t&2&&(a(3),b(u(4,3,"Family profiles")),a(3),p("ngIf",(i.memberList==null?null:i.memberList.length)>0),a(2),p("ngIf",i.isActionButtonVisible))},dependencies:[ue,F,U,Ku,La,T,Da],styles:[".list[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}.list-content[_ngcontent-%COMP%]{display:flex;flex:1}.list-wrapper[_ngcontent-%COMP%]{display:flex;flex:1;width:100%}[_nghost-%COMP%]{width:100%;display:block}.family-profiles-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;height:100%;width:100%}.list-wrapper[_ngcontent-%COMP%]{flex-direction:column;height:100%}.list-wrapper[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;color:#505050;align-items:center}.list-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:inline-flex;align-items:center}.list-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .add-member-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;background-color:#06406026;width:38px;height:38px;border-radius:50%;margin-right:.5rem}.list-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .add-member-icon[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:20px;height:20px}.list-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-size:14px;font-family:Roboto-bold,sans-serif;letter-spacing:.43px}.list-wrapper[_ngcontent-%COMP%] .list-content[_ngcontent-%COMP%]{flex:0;padding-top:16px;padding-bottom:20px}.list-wrapper[_ngcontent-%COMP%] .list-content[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{overflow:auto;padding:2px}"]}),hn);pl=Xe([et(),ut("design:paramtypes",[oe,Ti,It,mt,B,De,ki,rt,bi,vt])],pl);var Xu=(n,e)=>({iconName:n,title:e}),U1=n=>({name:n,color:"#064060"});function q1(n,e){n&1&&Lt(0)}function z1(n,e){if(n&1&&(s(0,"a",23),C(1,q1,1,0,"ng-container",24),l()),n&2){let t=g().$implicit;g(2);let i=V(19);p("href",t.path,Kt),a(),p("ngTemplateOutlet",i)("ngTemplateOutletContext",Dt(3,Xu,t.iconName,t.title))}}function j1(n,e){n&1&&Lt(0)}function W1(n,e){if(n&1){let t=S();s(0,"a",25),P("click",function(){x(t);let o=g(5);return O(o.sideMenuService.closeSideMenu())}),C(1,j1,1,0,"ng-container",24),l()}if(n&2){let t=g().$implicit;g(2);let i=V(19);p("routerLink",t.path)("queryParams",t.queryParams),a(),p("ngTemplateOutlet",i)("ngTemplateOutletContext",Dt(4,Xu,t.iconName,t.title))}}function Q1(n,e){if(n&1&&(s(0,"li",21),C(1,z1,2,6,"a",22)(2,W1,2,7,"ng-template",null,1,pe),l()),n&2){let t=e.$implicit,i=V(3);a(),p("ngIf",t.external)("ngIfElse",i)}}function G1(n,e){if(n&1&&(s(0,"ul",19),C(1,Q1,4,2,"li",20),l()),n&2){let t=g(3);a(),p("ngForOf",t.menuItemList)}}function H1(n,e){if(n&1&&(v(0,"lib-svg-icon",26),s(1,"span"),f(2),d(3,"translate"),l()),n&2){let t=e.iconName,i=e.title;p("params",ce(4,U1,t)),a(2),b(u(3,2,i))}}function $1(n,e){if(n&1){let t=S();s(0,"div",8)(1,"div",9)(2,"div",10),v(3,"lib-avatar-image",11),d(4,"usePreferredName"),l(),s(5,"div",12)(6,"div",13),f(7),d(8,"usePreferredName"),l(),s(9,"div",14),f(10),l(),s(11,"div",15)(12,"button",16),P("click",function(){x(t);let o=g(2);return O(o.logout())}),f(13),d(14,"translate"),l()()()(),s(15,"div",17),C(16,G1,2,1,"ul",18),d(17,"async"),l(),C(18,H1,4,6,"ng-template",null,0,pe),l()}if(n&2){let t=e.ngIf,i=g(2);a(3),p("src",t.image)("name",D(4,6,t.preferredName,t.firstName)),a(4),y(" ",io(8,9,t.preferredName,t.firstName,t.name)," "),a(3),b(t.email),a(3),y(" ",u(14,13,"LOG OUT")," "),a(3),p("ngIf",u(17,15,i.isOnline$))}}function K1(n,e){if(n&1){let t=S();s(0,"app-user-family-list",27),P("switchFamilyMember",function(){x(t);let o=g(2);return O(o.sideMenuService.closeSideMenu())}),l()}}function Y1(n,e){if(n&1&&(s(0,"section",3),d(1,"includes"),d(2,"translate"),C(3,$1,20,17,"div",4),d(4,"async"),s(5,"div",5)(6,"div",6),C(7,K1,1,0,"app-user-family-list",7),d(8,"includes"),l()()()),n&2){let t=g();Z("large",!D(1,5,t.sideMenuConfig,t.SideMenuItemEnum.FAMILY)&&t.sideMenuConfig.length<4),G("aria-label",u(2,8,"User Menu")),a(3),p("ngIf",u(4,10,t.accountData$)),a(4),p("ngIf",D(8,12,t.sideMenuConfig,t.SideMenuItemEnum.FAMILY))}}var ml=(()=>{let e=class e{constructor(i,o,r,c){this.currentUserService=i,this.networkService=o,this.authorizationService=r,this.sideMenuService=c,this.SideMenuItemEnum=Tt,this.accountData$=this.currentUserService.getVariableAccountData(),this.isOnline$=this.networkService.isOnline$,this.sideMenuConfig=nr,this.logoutHandler=new he,this.menuItemList=[]}ngOnInit(){this.menuItemList=this.sideMenuConfig.filter(i=>i!==Tt.FAMILY).map(i=>$u[i])}logout(){this.logoutHandler.observers.length>0?this.logoutHandler.emit():this.authorizationService.logout(!0).subscribe()}};e.\u0275fac=function(o){return new(o||e)(h(bt),h(xi),h(nt),h(vt))},e.\u0275cmp=w({type:e,selectors:[["app-my-care-plan-side-menu"]],inputs:{sideMenuConfig:"sideMenuConfig"},outputs:{logoutHandler:"logoutHandler"},standalone:!1,decls:1,vars:1,consts:[["menuItemTpl",""],["menuLinkTemplate",""],["class","main-wrapper",3,"large",4,"ngIf"],[1,"main-wrapper"],["class","top-wrapper",4,"ngIf"],[1,"bottom-wrapper"],[1,"max-width-wrapper"],[3,"switchFamilyMember",4,"ngIf"],[1,"top-wrapper"],[1,"user-data-wrapper"],[1,"picture"],[3,"src","name"],[1,"user-data"],[1,"user-name"],[1,"email"],[1,"log-out"],[1,"link",3,"click"],[1,"menu-wrapper"],["class","menu",4,"ngIf"],[1,"menu"],["class","menu-item",4,"ngFor","ngForOf"],[1,"menu-item"],["target","_blank",3,"href",4,"ngIf","ngIfElse"],["target","_blank",3,"href"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"click","routerLink","queryParams"],[3,"params"],[3,"switchFamilyMember"]],template:function(o,r){o&1&&C(0,Y1,9,15,"section",2),o&2&&p("ngIf",r.sideMenuService.isSideMenuOpen)},dependencies:[Ve,Qe,ue,F,Pi,U,pl,Xi,T,Da,Fe],styles:[".main-wrapper[_ngcontent-%COMP%]{margin-top:var(--header-height);height:calc(100% - var(--header-height) - var(--footer-height));overflow:auto;letter-spacing:.53px;font-size:16px}
6.main-wrapper[_ngcontent-%COMP%] .top-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;overflow:hidden}.user-data-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;flex:1;justify-content:center;padding-top:8px;margin:16px 0}.user-data-wrapper[_ngcontent-%COMP%] .picture[_ngcontent-%COMP%]{align-items:center;justify-content:center;margin-bottom:16px}.user-data-wrapper[_ngcontent-%COMP%] .user-data[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.user-data-wrapper[_ngcontent-%COMP%] .user-data[_ngcontent-%COMP%] .user-name[_ngcontent-%COMP%], .user-data-wrapper[_ngcontent-%COMP%] .user-data[_ngcontent-%COMP%] .email[_ngcontent-%COMP%], .user-data-wrapper[_ngcontent-%COMP%] .user-data[_ngcontent-%COMP%] .log-out[_ngcontent-%COMP%]{margin-bottom:8px}.user-data-wrapper[_ngcontent-%COMP%] .user-data[_ngcontent-%COMP%] .user-name[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.user-data-wrapper[_ngcontent-%COMP%] .user-data[_ngcontent-%COMP%] .log-out[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;font-size:14px;margin-top:8px}.user-data-wrapper[_ngcontent-%COMP%] lib-avatar-image[_ngcontent-%COMP%]{--avatar-image-size: 150px;--avatar-font-size: 3rem}.menu-wrapper[_ngcontent-%COMP%]{width:100%}.menu-wrapper[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;padding:0 16px}.menu-wrapper[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%]{box-sizing:border-box;flex-grow:1;width:33%;max-width:33%;padding:8px}.menu-wrapper[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#505050;align-items:center;flex-direction:column;display:flex}.menu-wrapper[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%] svg{width:32px;height:32px}.menu-wrapper[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;padding:8px 0 16px;justify-content:space-between;align-items:center;font-size:12px;font-family:Roboto-bold,sans-serif;text-align:center}.bottom-wrapper[_ngcontent-%COMP%]{border-top:1px solid #e6e6e6;padding:20px;display:flex;justify-content:center}.max-width-wrapper[_ngcontent-%COMP%]{width:100%;max-width:768px}@media only screen and (min-width:700px){.menu-wrapper[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%]{width:104px;flex-grow:0}}"]});let n=e;return n})();ri();var Ju=()=>({standalone:!0});function X1(n,e){n&1&&(s(0,"div",10),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"You can not connect yourself")," "))}var _n,gl=(_n=class{constructor(e,t,i,o){this.userFamilyService=e,this.historyService=t,this.router=i,this.sideMenuService=o}ngOnInit(){this.userFamilyService.getPrimaryUser().subscribe(e=>{this.primaryUserName=e.username})}submit(){this.userNameError=!1,this.primaryUserName.toUpperCase()===this.username.toUpperCase()?this.userNameError=!0:this.connect()}connect(){this.userFamilyService.connectFamily({username:this.username,rawPassword:this.password}).pipe(ge(Boolean)).subscribe(()=>{this.router.events.pipe(ge(e=>e instanceof Oa),Le(this)).subscribe(()=>this.sideMenuService.openSideMenu()),this.historyService.goBack()})}},_n.\u0275fac=function(t){return new(t||_n)(h(Ti),h(Rn),h(B),h(vt))},_n.\u0275cmp=w({type:_n,selectors:[["app-user-family-connect"]],standalone:!1,decls:26,vars:25,consts:[[1,"wrapper"],["id","connect-page-title"],["aria-labelledby","connect-page-title",3,"ngSubmit"],[1,"fields"],["for","username"],["id","username","type","text","autocomplete","username","minlength","1","maxlength","100",3,"ngModelChange","ngModel","ngModelOptions"],["for","password"],["id","password","type","password","autocomplete","current-password","minlength","6","maxlength","100",3,"ngModelChange","ngModel","ngModelOptions"],["class","error",4,"ngIf"],["libButton","","type","submit",1,"action-button"],[1,"error"]],template:function(t,i){t&1&&(s(0,"app-header-title-update"),f(1),d(2,"translate"),l(),s(3,"div",0)(4,"h1",1),f(5),d(6,"translate"),l(),s(7,"div"),f(8),d(9,"translate"),l(),s(10,"form",2),P("ngSubmit",function(){return i.submit()}),s(11,"div",3)(12,"div")(13,"label",4),f(14),d(15,"translate"),l(),s(16,"input",5),Me("ngModelChange",function(r){return Pe(i.username,r)||(i.username=r),r}),l()(),s(17,"div")(18,"label",6),f(19),d(20,"translate"),l(),s(21,"input",7),Me("ngModelChange",function(r){return Pe(i.password,r)||(i.password=r),r}),l()()(),C(22,X1,3,3,"div",8),s(23,"button",9),f(24),d(25,"translate"),l()()()),t&2&&(a(),y(" ",u(2,11,"My Family"),` 7`),a(4),y(" ",u(6,13,"Add family member")," "),a(3),y(" ",u(9,15,"Connect a family member to your account by entering their username and password")," "),a(6),b(u(15,17,"Username")),a(2),ye("ngModel",i.username),p("ngModelOptions",A(23,Ju)),a(3),b(u(20,19,"Password")),a(2),ye("ngModel",i.password),p("ngModelOptions",A(24,Ju)),a(),p("ngIf",i.userNameError),a(2),y(" ",u(25,21,"Connect")," "))}
7,dependencies:[Xt,je,ee,X,Ne,Ma,ko,Ie,Gi,F,ve,T],styles:['.wrapper[_ngcontent-%COMP%]{width:100%;max-width:820px;margin-left:auto;margin-right:auto;box-sizing:border-box;padding:20px 35px;letter-spacing:.53px;font-size:16px}.wrapper[_ngcontent-%COMP%]:after{content:"";display:block;padding-bottom:50px}.wrapper[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px;color:#064060;font-family:Roboto-medium,sans-serif;text-align:center;padding:0 0 38px}label[_ngcontent-%COMP%]{display:block;font-size:12px;margin-bottom:4px}input[_ngcontent-%COMP%]{font-size:16px!important;min-height:32px!important}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff;font-size:1rem}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}form[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}form[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{width:100%;padding-top:.5rem;font-size:.9rem}.fields[_ngcontent-%COMP%]{width:100%;padding-top:25px;display:grid;grid-template-columns:auto;gap:20px}.action-button[_ngcontent-%COMP%]{min-width:240px;width:auto;margin-top:55px}@media screen and (min-width:700px){.fields[_ngcontent-%COMP%]{grid-template-columns:auto auto}}']}),_n);gl=Xe([et(),ut("design:paramtypes",[Ti,Rn,B,vt])],gl);var Z1=()=>({name:"trash-new",color:"#505050"}),e0=(()=>{let e=class e{constructor(i,o,r){this.userApiService=i,this.currentUser=o,this.modalWindowService=r,this.deleted=new he(!0)}deleteConnectionToClinic(){this.modalWindowService.confirm("Are you sure you want to delete this clinic? All your data and communications with them will be permanently deleted.","Delete clinic","I UNDERSTAND","CANCEL").pipe(ge(Boolean),L(()=>this.currentUser.getModel()),L(i=>this.userApiService.deleteConnectionToClinic(i.id,this.clinic.clinicUuid))).subscribe(()=>this.deleted.emit(!0))}};e.\u0275fac=function(o){return new(o||e)(h(Ze),h(It),h(rt))},e.\u0275cmp=w({type:e,selectors:[["app-provider-list-item"]],inputs:{clinic:"clinic"},outputs:{deleted:"deleted"},standalone:!1,decls:10,vars:10,consts:[[1,"element"],[1,"icon"],[3,"src"],[1,"content",3,"id"],["type","button",1,"arrow",3,"click"],[3,"params"],[1,"sr-only",3,"id"]],template:function(o,r){o&1&&(s(0,"a",0)(1,"span",1),v(2,"lib-avatar-image",2),l(),s(3,"span",3),f(4),l(),s(5,"button",4),P("click",function(){return r.deleteConnectionToClinic()}),v(6,"lib-svg-icon",5),s(7,"span",6),f(8),d(9,"translate"),l()()()),o&2&&(a(2),p("src",r.clinic.image),a(),p("id",r.clinic.clinicUuid),a(),b(r.clinic.title),a(),G("aria-labelledby","delete-"+r.clinic.clinicUuid+" "+r.clinic.clinicUuid),a(),p("params",A(9,Z1)),a(),p("id","delete-"+r.clinic.clinicUuid),a(),b(u(9,7,"Delete")))},dependencies:[Ve,U,T],styles:[".element[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1rem;border-top:1px solid #e6e6e6;align-items:center;justify-content:space-between;color:#505050;font-size:.9rem;cursor:pointer;-webkit-overflow-scrolling:touch}.element[_ngcontent-%COMP%]:last-child, .element[_ngcontent-%COMP%] .last[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 .5rem;overflow:hidden;flex:1;line-height:1.3rem}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%], .element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:block}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{margin-bottom:.3rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;flex:.2;--avatar-image-size: 2rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg, .element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:2rem;height:2rem;min-width:1rem;min-height:1rem;background-size:2rem}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{color:#a7a7a7;display:flex;align-items:center;font-family:Roboto-medium,sans-serif}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:1.4rem;height:1.4rem}.element[_ngcontent-%COMP%]{font-size:inherit;padding:24px 16px}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{--avatar-image-size: 32px}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg{width:32px;height:32px}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:22px;height:22px}.element[_ngcontent-%COMP%]{border:none!important;padding:0 0 16px;cursor:auto}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0}.element[_ngcontent-%COMP%] lib-avatar-image[_ngcontent-%COMP%]{--avatar-image-size: 38px}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-weight:700}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{cursor:pointer;opacity:.6;background:none}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:hover{opacity:1}"]}
7);let n=e;return n})();var ey=()=>({name:"plus",color:"#064060"});function ty(n,e){n&1&&(s(0,"button",5),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Connect a clinic")," "))}function iy(n,e){if(n&1&&(s(0,"div",3)(1,"span"),f(2),d(3,"translate"),l(),C(4,ty,3,3,"button",4),l()),n&2){let t=g();a(2),b(u(3,2,"You don't have any clinics associated with your account")),a(2),p("ngIf",t.isActionButtonVisible)}}function ny(n,e){if(n&1){let t=S();s(0,"li")(1,"app-provider-list-item",11),P("deleted",function(){x(t);let o=g(2);return O(o.loadClinicList())}),l()()}if(n&2){let t=e.$implicit;a(),p("clinic",t)}}function oy(n,e){n&1&&(s(0,"a",12)(1,"span",13),v(2,"lib-svg-icon",14),l(),s(3,"span",15),f(4),d(5,"translate"),l()()),n&2&&(a(2),p("params",A(4,ey)),a(2),b(u(5,2,"ADD CLINIC")))}function ry(n,e){if(n&1&&(s(0,"div",6)(1,"div",7)(2,"ul",8),C(3,ny,2,1,"li",9),l()(),s(4,"div"),C(5,oy,6,5,"a",10),l()()),n&2){let t=g();a(3),p("ngForOf",t.clinicList),a(2),p("ngIf",t.isActionButtonVisible)}}var t0=(()=>{let e=class e{constructor(i,o){this.clinicApiService=i,this.configService=o,this.isActionButtonVisible=this.configService.isMyCarePlanApp(),this.loadClinicList()}isListEmpty(){return this.clinicList!==void 0&&this.clinicList.length===0}isListNotEmpty(){return this.clinicList!==void 0&&this.clinicList.length>0}loadClinicList(){this.clinicApiService.getClinicListByToken().subscribe(i=>this.clinicList=i)}};e.\u0275fac=function(o){return new(o||e)(h(Te),h(oe))},e.\u0275cmp=w({type:e,selectors:[["app-provider-list"]],standalone:!1,decls:9,vars:8,consts:[[1,"wrapper"],["class","no-data",4,"ngIf"],["class","list-wrapper clinic-list",4,"ngIf"],[1,"no-data"],["libButton","","class","action-button","type","button","routerLink","/user/provider/connect","routerLinkActive","active",4,"ngIf"],["libButton","","type","button","routerLink","/user/provider/connect","routerLinkActive","active",1,"action-button"],[1,"list-wrapper","clinic-list"],[1,"list-content"],[1,"list"],[4,"ngFor","ngForOf"],["class","add-link","routerLink","/user/provider/connect","routerLinkActive","active",4,"ngIf"],[3,"deleted","clinic"],["routerLink","/user/provider/connect","routerLinkActive","active",1,"add-link"],[1,"add-icon"],[3,"params"],[1,"text"]],template:function(o,r){o&1&&(s(0,"app-header-title-update"),f(1),d(2,"translate"),l(),s(3,"div",0)(4,"h1"),f(5),d(6,"translate"),l(),C(7,iy,5,4,"div",1)(8,ry,6,2,"div",2),l()),o&2&&(a(),y("",u(2,4,"My Providers")," "),a(4),y(" ",u(6,6,"Clinics")," "),a(2),p("ngIf",r.isListEmpty()),a(),p("ngIf",r.isListNotEmpty()))},dependencies:[Xt,Qe,Eo,ue,F,U,ve,e0,T],styles:['.wrapper[_ngcontent-%COMP%]{width:100%;max-width:820px;margin-left:auto;margin-right:auto;box-sizing:border-box;padding:20px 35px;letter-spacing:.53px;font-size:16px}.wrapper[_ngcontent-%COMP%]:after{content:"";display:block;padding-bottom:50px}.wrapper[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px;color:#064060;font-family:Roboto-medium,sans-serif;text-align:center;padding:0 0 38px}label[_ngcontent-%COMP%]{display:block;font-size:12px;margin-bottom:4px}input[_ngcontent-%COMP%]{font-size:16px!important;min-height:32px!important}.no-data[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;padding:0 5%;align-items:center;justify-content:center;background-color:#effcff;text-align:center;color:#064060;line-height:1.5rem;font-family:Roboto-bold,sans-serif;flex-direction:column;box-sizing:border-box}.no-data[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.5rem;margin-bottom:1rem}.no-data[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding:1rem}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}.list-content[_ngcontent-%COMP%]{display:flex;flex:1}.list-wrapper[_ngcontent-%COMP%]{display:flex;flex:1;width:100%}.no-data[_ngcontent-%COMP%]{height:initial;padding:2rem;justify-content:normal;font-family:Roboto-regular,sans-serif}.no-data[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#505050;text-align:left;font-size:16px;padding-bottom:2rem}.action-button[_ngcontent-%COMP%]{min-width:240px;width:auto;line-height:1}.list-wrapper[_ngcontent-%COMP%]{flex-direction:column}.add-link[_ngcontent-%COMP%]{margin-top:16px;display:inline-flex;align-items:center;font-family:Roboto-bold,sans-serif}.add-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;background-color:#06406026;width:38px;height:38px;border-radius:50%;margin-right:.5rem}.add-icon[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:20px;height:20px}']});let n=e;return n})();var ay=()=>({name:"plus",color:"#a7a7a7"}),i0=(()=>{let e=class e{constructor(i,o,r){this.currentUserService=i,this.router=o,this.userApiService=r}connectProvider(){this.currentUserService.getModel().pipe(L(i=>this.userApiService.createConnectionToClinic(i.id,this.clinic.clinicUuid))).subscribe(()=>{this.router.navigate(["/user/provider"])})}};e.\u0275fac=function(o){return new(o||e)(h(It),h(B),h(Ze))},e.\u0275cmp=w({type:e,selectors:[["app-provider-connect-item"]],inputs:{clinic:"clinic"},standalone:!1,decls:7,vars:5,consts:[["type","button",1,"element",3,"click"],[1,"icon"],[3,"src"],[1,"content",3,"id"],["aria-hidden","true",1,"arrow"],[3,"params"]],template:function(o,r){o&1&&(s(0,"button",0),P("click",function(){return r.connectProvider()}),s(1,"span",1),v(2,"lib-avatar-image",2),l(),s(3,"span",3),f(4),l(),s(5,"span",4),v(6,"lib-svg-icon",5),l()()),o&2&&(a(2),p("src",r.clinic.image),a(),p("id",r.clinic.clinicUuid),a(),y(" ",r.clinic.title," "),a(2),p("params",A(4,ay)))},dependencies:[Ve,U],styles:[".element[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1rem;border-top:1px solid #e6e6e6;align-items:center;justify-content:space-between;color:#505050;font-size:.9rem;cursor:pointer;-webkit-overflow-scrolling:touch}.element[_ngcontent-%COMP%]:last-child, .element[_ngcontent-%COMP%] .last[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 .5rem;overflow:hidden;flex:1;line-height:1.3rem}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%], .element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:block}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{margin-bottom:.3rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;flex:.2;--avatar-image-size: 2rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg, .element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:2rem;height:2rem;min-width:1rem;min-height:1rem;background-size:2rem}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{color:#a7a7a7;display:flex;align-items:center;font-family:Roboto-medium,sans-serif}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:1.4rem;height:1.4rem}.element[_ngcontent-%COMP%]{font-size:inherit;padding:24px 16px}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{--avatar-image-size: 32px}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg{width:32px;height:32px}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:22px;height:22px}.element[_ngcontent-%COMP%]{border:none!important;width:100%;background:none;text-align:left;font:inherit}"],changeDetection:0});let n=e;return n})();function cy(n,e){n&1&&(s(0,"div",9),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"We don't have any clinics associated with your search")," "))}function py(n,e){n&1&&(s(0,"div",10),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Please enter name or phone number of the provider you want to add to your list")," "))}function dy(n,e){if(n&1&&(s(0,"li"),v(1,"app-provider-connect-item",15),l()),n&2){let t=e.$implicit;a(),p("clinic",t)}}function my(n,e){if(n&1){let t=S();s(0,"div",11)(1,"div",12),P("scrolled",function(){x(t);let o=g();return O(o.onScroll())}),s(2,"ul",13),C(3,dy,2,1,"li",14),l()()()}if(n&2){let t=g();a(),p("infiniteScrollDistance",2)("infiniteScrollThrottle",50),a(2),p("ngForOf",t.clinicList)}}var n0=(()=>{let e=class e{constructor(i){this.clinicApiService=i,this.clinicList=[],this.searchParams={count:100,page:0,search:""}}isListEmpty(){return this.clinicList!==void 0&&this.clinicList.length===0}isListNotEmpty(){return this.clinicList!==void 0&&this.clinicList.length>0}loadClinicList(){this.searchParams.search.length<3?this.clinicList=[]:this.clinicApiService.searchClinics(this.searchParams).subscribe(i=>
7{i.forEach(o=>this.clinicList.push(o))})}onChange(){this.searchParams.page=0,this.searchParams.search=this.searchParams.search.trim(),this.clinicList=[],this.loadClinicList()}onScroll(){this.clinicList.length>=this.searchParams.count&&(this.searchParams.page++,this.loadClinicList())}};e.\u0275fac=function(o){return new(o||e)(h(Te))},e.\u0275cmp=w({type:e,selectors:[["app-provider-connect"]],standalone:!1,decls:19,vars:16,consts:[[1,"wrapper"],["class","text","aria-live","polite","role","alert",4,"ngIf"],["class","text",4,"ngIf"],[1,"search"],[1,"container"],["for","clinic-search"],["type","search","id","clinic-search",3,"ngModelChange","change","ngModel"],["libButton","","type","button",1,"action-button",3,"click"],["class","list-wrapper",4,"ngIf"],["aria-live","polite","role","alert",1,"text"],[1,"text"],[1,"list-wrapper"],["infiniteScroll","",1,"list-content",3,"scrolled","infiniteScrollDistance","infiniteScrollThrottle"],[1,"list"],[4,"ngFor","ngForOf"],[3,"clinic"]],template:function(o,r){o&1&&(s(0,"app-header-title-update"),f(1),d(2,"translate"),l(),s(3,"div",0)(4,"h1"),f(5),d(6,"translate"),l(),C(7,cy,3,3,"div",1)(8,py,3,3,"div",2),s(9,"div",3)(10,"div",4)(11,"label",5),f(12),d(13,"translate"),l(),s(14,"input",6),Me("ngModelChange",function(m){return Pe(r.searchParams.search,m)||(r.searchParams.search=m),m}),P("change",function(){return r.onChange()}),l()()(),s(15,"button",7),P("click",function(){return r.onChange()}),f(16),d(17,"translate"),l(),C(18,my,4,3,"div",8),l()),o&2&&(a(),b(u(2,8,"Add Provider")),a(4),y(" ",u(6,10,"Add clinic")," "),a(2),p("ngIf",r.isListEmpty()&&r.searchParams.search.length),a(),p("ngIf",!r.searchParams.search.length),a(4),b(u(13,12,"Name or Phone Number:")),a(2),ye("ngModel",r.searchParams.search),a(2),y(" ",u(17,14,"Search")," "),a(2),p("ngIf",r.isListNotEmpty()))},dependencies:[Xt,ee,X,Ie,ue,F,ve,Cs,i0,T],styles:['.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}.list-content[_ngcontent-%COMP%]{display:flex;flex:1}.list-wrapper[_ngcontent-%COMP%]{display:flex;flex:1;width:100%}.wrapper[_ngcontent-%COMP%]{width:100%;max-width:820px;margin-left:auto;margin-right:auto;box-sizing:border-box;padding:20px 35px;letter-spacing:.53px;font-size:16px}.wrapper[_ngcontent-%COMP%]:after{content:"";display:block;padding-bottom:50px}.wrapper[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px;color:#064060;font-family:Roboto-medium,sans-serif;text-align:center;padding:0 0 38px}label[_ngcontent-%COMP%]{display:block;font-size:12px;margin-bottom:4px}input[_ngcontent-%COMP%]{font-size:16px!important;min-height:32px!important}.search[_ngcontent-%COMP%]{display:flex;justify-content:center;padding-bottom:50px;width:100%}.search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{padding:0 2.4rem}.search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff;font-size:1rem;width:320px}.search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}.action-button[_ngcontent-%COMP%]{min-width:240px;width:auto}.wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;align-items:center}.wrapper[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center;line-height:1.5rem;padding-bottom:25px}.list-wrapper[_ngcontent-%COMP%]{padding-top:2rem}li[_ngcontent-%COMP%]{border-top:1px solid #e6e6e6}li[_ngcontent-%COMP%]:last-child{border-bottom:1px solid #e6e6e6}']});let n=e;return n})();var o0=(()=>{let e=class e{constructor(i,o,r){this.modalWindowService=i,this.userApiService=o,this.router=r}deleteAccount(){this.modalWindowService.confirm("Are you sure you want to delete your account? Your profile, photos, and data will be permanently deleted","Delete account","I UNDERSTAND","CA
7NCEL").pipe(ge(Boolean),L(()=>this.userApiService.deleteAccount())).subscribe(()=>this.router.navigate(["/user/delete-account-success"]))}};e.\u0275fac=function(o){return new(o||e)(h(rt),h(Ze),h(B))},e.\u0275cmp=w({type:e,selectors:[["app-delete-account"]],standalone:!1,decls:17,vars:12,consts:[[1,"wrapper"],[1,"header"],[1,"title"],[1,"main"],[1,"description"],[1,"footer"],["libButton","","type","button",3,"click"]],template:function(o,r){o&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),f(3),d(4,"translate"),l()(),s(5,"div",3)(6,"div",4)(7,"p"),f(8),d(9,"translate"),l(),s(10,"p"),f(11),d(12,"translate"),l()()(),s(13,"div",5)(14,"button",6),P("click",function(){return r.deleteAccount()}),f(15),d(16,"translate"),l()()()),o&2&&(a(3),y(" ",u(4,4,"Account deletion")," "),a(5),y(" ",u(9,6,"Deleting your account is a permanent action.")," "),a(3),y(" ",u(12,8,"This action will remove your access to your account entirely.")," "),a(4),y(" ",u(16,10,"DELETE ACCOUNT")," "))},dependencies:[ve,T],styles:['.header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:1.5rem;gap:.5rem}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:center;line-height:1.31rem;font-family:Roboto-bold,sans-serif;font-size:1.125rem;color:#064060}.header[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.5rem;color:#505050;font-size:1rem;text-align:left;margin:0 1rem}.wrapper[_ngcontent-%COMP%]{width:100%;max-width:820px;margin-left:auto;margin-right:auto;box-sizing:border-box;padding:20px 35px;letter-spacing:.53px;font-size:16px}.wrapper[_ngcontent-%COMP%]:after{content:"";display:block;padding-bottom:50px}.wrapper[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px;color:#064060;font-family:Roboto-medium,sans-serif;text-align:center;padding:0 0 38px}label[_ngcontent-%COMP%]{display:block;font-size:12px;margin-bottom:4px}input[_ngcontent-%COMP%]{font-size:16px!important;min-height:32px!important}.wrapper[_ngcontent-%COMP%]{box-sizing:border-box;padding:1.5rem 2rem;height:100%}.wrapper[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.wrapper[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:1.5rem;color:#505050;font-size:1rem;text-align:left}.wrapper[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:3.5rem}.wrapper[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:15rem;width:auto}']});let n=e;return n})();var gy=()=>({name:"ok",color:"#064060"});function uy(n,e){n&1&&(s(0,"span",27),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"You cannot save without entering a username")," "))}function fy(n,e){if(n&1&&(s(0,"span",27),f(1),d(2,"translate"),l()),n&2){let t=g(2);a(),y(" ",u(2,1,t.error.error.form.username.errors[0])," ")}}function hy(n,e){n&1&&(s(0,"span",27),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Please fill email or phone")))}function _y(n,e){n&1&&(s(0,"span",27),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Please enter a valid email address")," "))}function Cy(n,e){if(n&1&&(s(0,"span",27),f(1),d(2,"translate"),l()),n&2){let t=g(2);a(),y(" ",u(2,1,t.error.error.form.email.errors[0])," ")}}function vy(n,e){n&1&&(s(0,"span",27),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Please enter a valid phone number")," "))}function yy(n,e){n&1&&(s(0,"span",27),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Please fill email or phone")," "))}function Py(n,e){if(n&1&&(s(0,"span",27),f(1),d(2,"translate"),l()),n&2){let t=g(2);a(),y(" ",u(2,1,t.error.error.form.mobilePhone.errors[0])," ")}}function My(n,e){if(n&1){let t=S();s(0,"div",28)(1,"button",29),P("click",function(){x(t);let o=g(2);return O(o.checkPhone())}),f(2),d(3,"translate"),l()()}if(n&2){g();let t=V(29),i=g();a(),p("disabled",!i.personal.username||!t.valid||!i.personal.email&&!i.personal.mobilePhone),a(),y(" ",u(3,2,"Save Changes")," ")}}function by(n,e){n&1&&(s(0,"div",30),v(1,"lib-svg-icon",31),s(2,"span",32),f(3),d(4,"translate"),l()()),n&2&&(a(),p("params",A(4,gy)),a(2),y(" ",u(4,2,"Saved")," "))}function xy(n,e){n&1&&(s(0,"button",33),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"ADVANCED SETTINGS")," "))}function Oy(n,e){if(n&1){let t=S();s(0,"div",4)(1,"h1"),f(2),d(3,"translate"),l(),s(4,"div",5)(5,"div",6)(6,"label",7),f(7),d(8,"translate"),l(),s(9,"input",8),d(10,"translate"),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.personal.username,o)||(r.personal.username=o),O(o)}),l(),C(11,uy,3,3,"span",9)(12,fy,3,3,"span",9),l(),s(13,"div",10)(14,"label",11),f(15),d(16,"translate"),l(),v(17,"input",12),l(),s(18,"div",13)(19,"label",14),f(20),d(21,"translate"),l(),v(22,"input",15),l(),s(23,"div",16)(24,"label",17),f(25),d(26,"translate"),l(),s(27,"div")(28,"input",18,0),d(30,"translate"),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.personal.email,o)||(r.personal.email=o),O(o)}),l()(),C(31,hy,3,3,"span",9)(32,_y,3,3,"span",9)(33,Cy,3,3,"span",9),l(),s(34,"div",19)(35,"label",20),f(36),d(37,"translate"),l(),s(38,"div",21)(39,"input",22),d(40,"translate"),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.personal.mobilePhone,o)||(r.personal.mobilePhone=o),O(o)}),l()(),C(41,vy,3,3,"span",9)(42,yy,3,3,"span",9)(43,Py,3,3,"span",9),l()(),C(44,My,4,4,"div",23)(45,by,5,5,"div",24),s(46,"div",25,1),C(48,xy,3,3,"button",26),l()()}if(n&2){let t=V(29),i=V(47),o=g();a(2),y(" ",u(3,27,"Account settings")," "),a(5),b(u(8,29,"Username")),a(2),ye("ngModel",o.personal.username),p("placeholder",u(10,31,"Enter here...")),a(2),p("ngIf",!o.personal.username),a(),p("ngIf",o.error==null||o.error.error==null||o.error.error.form==null||o.error.error.form.username==null?null:o.error.error.form.username.errors),a(3),b(u(16,33,"First Name")),a(2),p("disabled",!0)("value",o.personal.firstName),a(3),b(u(21,35,"Last Name")),a(2),p("disabled",!0)("value",o.personal.lastName),a(3),b(u(26,37,"Email")),a(3),ye("ngModel",o.personal.email),p("placeholder",u(30,39,"Enter here...")),a(3),p("ngIf",!o.personal.email&&!o.personal.mobilePhone),a(),p("ngIf",!t.valid),a(),p("ngIf",o.error==null||o.error.error==null||o.error.error.form==null||o.error.error.form.email==null?null:o.error.error.form.email.errors),a(3),b(u(37,41,"Mobile Phone")),a(3),ye("ngModel",o.personal.mobilePhone),p("placeholder",u(40,43,"Enter here...")),a(2),p("ngIf",o.isMobilePhoneError),a(),p("ngIf",!o.personal.email&&!o.personal.mobilePhone),a(),p("ngIf",o.error==null||o.error.error==null||o.error.error.form==null||o.error.error.form.mobilePhone==null?null:o.error.error.form.mobilePhone.errors),a(),p("ngIf",!o.isNotification),a(),p("ngIf",o.isNotification),a(3),p("ngIf",!o.isFamilyLogin&&i.value)}}var r0=(()=>{let e=class e{constructor(i,o,r,c,m,_,M,I){this.demographicsApiService=i,this.currentUser=o,this.userStorage=r,this.userService=c,this.infoApiService=m,this.errorService=_,this.userApiService=M,this.userFamilyService=I}ngOnInit(){this.loadData(),this.errorService.initError()}saveData(){this.error=null;let{email:i,username:o,firstName:r,lastName:c,mobilePhone:m}=this.personal;this.demographicsApiService.updateAccountSettings({email:i,username:o,firstName:r,lastName:c,phone:m}).pipe(L(()=>this.userApiService.getUserAccount()),re(_=>Oe(z({},_),{role:this.userService.getUserRole()}
7)),L(_=>this.userStorage.setUser(_)),ne(()=>this.isNotification=!0),Wi(5e3)).subscribe({next:()=>this.isNotification=!1,error:_=>this.error=_})}checkPhone(){this.isMobilePhoneError=!1,this.infoApiService.phoneValidation({phone:this.personal.mobilePhone,region:"US",type:"mobile"}).subscribe({next:()=>this.saveData(),error:()=>this.isMobilePhoneError=!0})}loadData(){this.userFamilyService.isFamilyLogin().pipe(ne(i=>this.isFamilyLogin=i),L(()=>this.currentUser.getModel()),L(({id:i})=>this.demographicsApiService.getPersonal("",i))).subscribe(i=>this.personal=i)}};e.\u0275fac=function(o){return new(o||e)(h(Bn),h(It),h(ki),h(De),h($i),h(Ii),h(Ze),h(Ti))},e.\u0275cmp=w({type:e,selectors:[["app-account-settings"]],standalone:!1,decls:5,vars:4,consts:[["emailField","ngModel"],["isCordovaApp","isCordovaApp"],[1,"text-wrap"],["class","wrapper",4,"ngIf"],[1,"wrapper"],[1,"content"],[1,"username"],["for","username"],["id","username","type","text","autocomplete","username",3,"ngModelChange","ngModel","placeholder"],["class","error","aria-live","polite","role","alert",4,"ngIf"],[1,"first-name"],["for","first-name"],["id","first-name","type","text",3,"disabled","value"],[1,"last-name"],["for","last-name"],["id","last-name","type","text",3,"disabled","value"],[1,"email"],["for","email"],["type","email","id","email","autocomplete","email","pattern","^\\w+([\\.+\\-]?\\w+)*@\\w+([\\.\\-]?\\w+)*(\\.[a-z]{2,4})+$",3,"ngModelChange","ngModel","placeholder"],[1,"mobile-phone"],["for","mobile-phone"],[1,"mobile-phone-inputs"],["id","mobile-phone","type","tel","autocomplete","tel-national","mask","(000)000-0000","pattern","[0-9\\s\\(\\)_]+",1,"phone-number",3,"ngModelChange","ngModel","placeholder"],["class","navigation","id","footer",4,"ngIf"],["class","notification",4,"ngIf"],["libIsCordovaApp","",1,"advanced-settings"],["type","button","class","button-grey","routerLink","/user/delete-account",4,"ngIf"],["aria-live","polite","role","alert",1,"error"],["id","footer",1,"navigation"],["libButton","","type","button",1,"action-button",3,"click","disabled"],[1,"notification"],[3,"params"],["aria-live","polite","role","status"],["type","button","routerLink","/user/delete-account",1,"button-grey"]],template:function(o,r){o&1&&(s(0,"app-header-title-update")(1,"div",2),f(2),d(3,"translate"),l()(),C(4,Oy,49,45,"div",3)),o&2&&(a(2),y(" ",u(3,2,"Account settings")," "),a(2),p("ngIf",r.personal))},dependencies:[Xt,lo,ee,X,Mi,Ie,Vn,Qe,F,U,ve,T],styles:['.wrapper[_ngcontent-%COMP%]{width:100%;max-width:820px;margin-left:auto;margin-right:auto;box-sizing:border-box;padding:20px 35px;letter-spacing:.53px;font-size:16px}.wrapper[_ngcontent-%COMP%]:after{content:"";display:block;padding-bottom:50px}.wrapper[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px;color:#064060;font-family:Roboto-medium,sans-serif;text-align:center;padding:0 0 38px}label[_ngcontent-%COMP%]{display:block;font-size:12px;margin-bottom:4px}input[_ngcontent-%COMP%]{font-size:16px!important;min-height:32px!important}.wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column}.content[_ngcontent-%COMP%]{padding-bottom:3rem;display:grid;grid-template-columns:auto;gap:20px}.content[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{padding:.5rem 0}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff;font-size:1rem}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-clear-button, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-ms-clear, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-inner-spin-button, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]:-moz-focusring, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.content[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date].ng-dirty[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]:disabled, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}.navigation[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.notification[_ngcontent-%COMP%]{margin-top:.8rem;display:flex;justify-content:center;align-items:center}.notification[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-family:Roboto-medium,sans-serif;color:#064060;font-size:1.1rem}.notification[_ngcontent-%COMP%] svg{width:1.3rem;height:1.3rem;margin-right:.4rem}.action-button[_ngcontent-%COMP%]{min-width:240px;width:auto}.advanced-settings[_ngcontent-%COMP%]{margin-top:2rem;display:flex;flex-direction:column;justify-content:center;align-items:center}.advanced-settings[_ngcontent-%COMP%] .button-grey[_ngcontent-%COMP%]{display:flex;color:#949494;justify-content:center;padding:.75rem;background-color:transparent;border-radius:8px;width:auto;box-sizing:border-box;font-family:Roboto-bold;align-items:center;min-width:15rem;font-size:.875rem;cursor:pointer}.advanced-settings[_ngcontent-%COMP%] .button-grey[_ngcontent-%COMP%]:hover{opacity:.8}.advanced-settings[_ngcontent-%COMP%] .button-grey[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.advanced-settings[_ngcontent-%COMP%] .button-grey[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.advanced-settings[_ngcontent-%COMP%] .button-grey[disabled][_ngcontent-%COMP%]{cursor:default}@media screen and (min-width:700px){.content[_ngcontent-%COMP%]{grid-template-columns:auto auto}}']});let n=e;return n})();var wy=()=>({name:"heart-new",color:"#E16481"}),a0=(()=>{let e=class e{constructor(i){this.authorizationService=i}ngOnInit(){oa(1e4).pipe(L(()=>this.authorizationService.logout())).subscribe()}};e.\u0275fac=function(o){return new(o||e)(h(nt))},e.\u0275cmp=w({type:e,selectors:[["app-delete-account-success"]],standalone:!1,decls:15,vars:11,consts:[[1,"content","deleted"],[1,"header"],[1,"title"],[1,"main"],[1,"description"],[1,"icon"],[3,"params"]],template:function(o,r){o&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),f(3),d(4,"translate"),l()(),s(5,"div",3)(6,"div",4)(7,"p"),f(8),d(9,"translate"),l(),s(10,"p"),f(11),d(12,"translate"),l()(),s(13,"div",5),v(14,"lib-svg-icon",6),l()()()),o&2&&(a(3),b(u(4,4,"Account deleted")),a(5),y(" ",u(9,6,"Your account has been deleted and you will no longer be able to login with your user credentials.")," "),a(3),y(" ",u(12,8,"Thank you for using our application, take care, and we hope to see you again soon!")," "),a(3),p("params",A(10,wy)))},dependencies:[U,T],styles:['.header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:1.5rem;gap:.5rem}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:center;line-height:1.31rem;font-family:Roboto-bold,sans-serif;font-size:1.125rem;color:#064060}.header[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.5rem;color:#505050;font-size:1rem;text-align:left;margin:0 1rem}.wrapper[_ngcontent-%COMP%]{width:100%;max-width:820px;margin-left:auto;margin-right:auto;box-sizing:border-box;padding:20px 35px;letter-spacing:.53px;font-size:16px}.wrapper[_ngcontent-%COMP%]:after{content:"";display:block;padding-bottom:50px}.wrapper[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px;color:#064060;font-family:Roboto-medium,sans-serif;text-align:center;padding:0 0 38px}label[_ngcontent-%COMP%]{display:block;font-size:12px;margin-bottom:4px}input[_ngcontent-%COMP%]{font-size:16px!important;min-height:32px!important}.wrapper[_ngcontent-%COMP%]{box-sizing:border-box;padding:1.5rem 2rem;height:100%}.wrapper[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.wrapper[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:1.5rem;color:#505050;font-size:1rem;text-align:left}.wrapper[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:3.5rem}.wrapper[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:15rem;width:auto}',".content[_ngcontent-%COMP%]{box-sizing:border-box;background-color:#0d9dc51a;padding-top:3.5rem;width:100%;height:100%}.main[_ngcontent-%COMP%]{padding:0 1rem}.icon[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:3.5rem}.icon[_ngcontent-%COMP%] svg{width:7.875rem;height:7.5rem}.icon[_ngcontent-%COMP%] svg path{stroke-width:1}"]});let n=e;return n})();var Mo=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({imports:[Ht,vs,gs]});let n=e;return n})();var s0=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({imports:[Ht,Mo]});let n=e;return n})();ri();var Li=(()=>{let e=class e{constructor(i,o){this.router=i,this.historyService=o,this.isOverlayVisible=new jt,this.selectedTemplate=new yi(null),this.isOverlayVisible$=this.isOverlayVisible.asObservable(),this.selectedTemplate$=this.selectedTemplate.pipe(ne(r=>{r&&this.selectedTemplate.next(null)}),ge(r=>r!==null))}
7showTemplates(i){i?this.isOverlayVisible.next(!0):this.router.navigate(["/provider/patient/sms-templates"],{queryParamsHandling:"merge"})}hideTemplates(i){i?this.isOverlayVisible.next(!1):this.historyService.goBack()}selectTemplate(i,o){this.selectedTemplate.next(i),this.hideTemplates(o)}};e.\u0275fac=function(o){return new(o||e)(ie(B),ie(Rn))},e.\u0275prov=be({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var Ty=()=>({name:"template",color:"#064060"});function ky(n,e){if(n&1){let t=S();s(0,"lib-checkbox",2),P("checkedChange",function(o){x(t);let r=g(2);return O(r.value.shouldSave=o)}),f(1),d(2,"translate"),l()}if(n&2){let t=g(2);p("checked",t.value.shouldSave),a(),y(" ",u(2,2,"Save to templates")," ")}}function Ay(n,e){if(n&1&&(_e(0,ky,3,4,"lib-checkbox",1),d(1,"hasProviderPermission"),d(2,"async")),n&2){let t=g();Ce(u(2,3,u(1,1,t.ProviderPermissionEnum.MANAGE_MESSAGING_TEMPLATES))?0:-1)}}function Ey(n,e){if(n&1){let t=S();s(0,"button",3),d(1,"translate"),P("click",function(){x(t);let o=g();return O(o.showTemplates())}),v(2,"lib-svg-icon",4),l()}n&2&&(p("matTooltip",u(1,2,"Choose template")),a(2),p("params",A(4,Ty)))}var Xr=(()=>{let e=class e{constructor(i){this.messageTemplateDisplayService=i,this.isEmbedded=!1,this.ProviderPermissionEnum=br}showTemplates(){this.messageTemplateDisplayService.showTemplates(this.isEmbedded)}};e.\u0275fac=function(o){return new(o||e)(h(Li))},e.\u0275cmp=w({type:e,selectors:[["lib-message-template-action"]],inputs:{message:"message",value:"value",isEmbedded:[2,"isEmbedded","isEmbedded",Qi]},standalone:!1,decls:2,vars:1,consts:[["type","button",3,"matTooltip"],[3,"checked"],[3,"checkedChange","checked"],["type","button",3,"click","matTooltip"],[3,"params"]],template:function(o,r){o&1&&_e(0,Ay,3,5)(1,Ey,3,5,"button",0),o&2&&Ce(r.message?0:1)},dependencies:[U,Ta,ts,Fe,T,Jl],styles:["[_nghost-%COMP%]{flex-grow:1}lib-checkbox[_ngcontent-%COMP%]{display:flex}button[_ngcontent-%COMP%]{--svg-size: 1rem;background:none;cursor:pointer}"],changeDetection:0});let n=e;return n})();var Fy=["textInput"],Ly=["autosize"],Dy=["fileUploadInput"],By=()=>({name:"send",color:"currentColor"}),Ry=()=>({name:"trash-new",color:"#505050"}),Vy=()=>({name:"list",color:"#505050"}),Ny=()=>({name:"attachment-alt",color:"#064060"});function Uy(n,e){if(n&1&&(se(0),v(1,"img",19),le()),n&2){let t=g().$implicit;a(),p("src",t.href,Kt)("alt",t.fileName)}}function qy(n,e){if(n&1&&(v(0,"lib-svg-icon",20),s(1,"span",21),f(2),l()),n&2){let t=g().$implicit;p("params",A(2,Vy)),a(2),b(t.fileName)}}function zy(n,e){if(n&1){let t=S();s(0,"div",15),C(1,Uy,2,2,"ng-container",16)(2,qy,3,3,"ng-template",null,1,pe),s(4,"button",17),d(5,"translate"),P("click",function(){let o=x(t).index,r=g(2);return O(r.removeAttachment(o))}),v(6,"lib-svg-icon",18),l()()}if(n&2){let t=e.$implicit,i=V(3),o=g(2);a(),p("ngIf",o.isImageFile(t.fileName))("ngIfElse",i),a(3),G("aria-label",u(5,4,"Remove attachment")+" "+t.fileName),a(2),p("params",A(6,Ry))}}function jy(n,e){if(n&1){let t=S();s(0,"div",11)(1,"input",22,2),P("change",function(o){x(t);let r=g(2);return O(r.detectAttachments(o.target.files))}),l(),s(3,"button",23),d(4,"translate"),d(5,"translate"),P("click",function(){x(t);let o=V(2);return O(o.click())}),v(6,"lib-svg-icon",14),l()()}if(n&2){let t=g(2);a(),p("accept",t.attachmentMimeTypeList.join(","))("disabled",(t.resultMessage==null||t.resultMessage.attachments==null?null:t.resultMessage.attachments.length)===t.MAX_IMAGE_COUNT),a(2),p("matTooltip",u(4,6,"Attach file/image"))("disabled",(t.resultMessage==null||t.resultMessage.attachments==null?null:t.resultMessage.attachments.length)===t.MAX_IMAGE_COUNT),G("aria-label",u(5,8,"Attach file/image")),a(3),p("params",A(10,Ny))}}function Wy(n,e){if(n&1&&v(0,"lib-message-template-action",12),n&2){g();let t=V(6),i=g();p("isEmbedded",i.isEmbedded)("value",i.templateActionValue)("message",t.value)}}function Qy(n,e){if(n&1){let t=S();s(0,"form",5),d(1,"translate"),P("ngSubmit",function(){x(t);let o=g();return O(o.onSubmit())}),s(2,"div",6),C(3,zy,7,7,"div",7),l(),s(4,"div",8)(5,"textarea",9,0),d(8,"translate"),d(9,"translate"),P("focus",function(){x(t);let o=g();return O(o.onFocusArea())})("input",function(){x(t);let o=g();return O(o.onTextInput())})("keydown",function(o){x(t);let r=g();return O(r.onTextareaKeydown(o))})("keydown.enter",function(o){x(t);let r=g();return O(r.onKeyEnter(o))}),f(10," "),l()(),s(11,"div",10),_e(12,jy,7,11,"div",11),_e(13,Wy,1,3,"lib-message-template-action",12),s(14,"button",13),d(15,"translate"),v(16,"lib-svg-icon",14),l()()()}if(n&2){let t=g();Z("has-thread",!!t.threadId),p("formGroup",t.messageForm),G("aria-label",u(1,13,"Message")),a(3),p("ngForOf",t.resultMessage==null?null:t.resultMessage.attachments),a(2),p("cdkAutosizeMaxRows",t.threadId?3:null)("placeholder",u(8,15,"Type your message...")),G("aria-label",u(9,17,"Message")),a(7),Ce(t.showAttachment?12:-1),a(),Ce(t.isProviderRole&&t.clinicUuid?13:-1),a(),p("disabled",t.isSendingDisabled),G("aria-label",u(15,19,"Send")),a(2),p("params",A(21,By))}}function Gy(n,e){n&1&&(s(0,"div",4)(1,"p"),f(2),d(3,"translate"),l(),s(4,"p"),f(5),d(6,"translate"),l()()),n&2&&(a(2),b(u(3,2,"This user is not accepting messages at this time.")),a(3),b(u(6,4,"Please contact our office if needed.")))}var Cn,$n=(Cn=class{constructor(e,t,i,o,r,c,m,_,M,I,k,R){this.threadService=e,this.clinicApiService=t,this.formBuilder=i,this.modalWindowService=o,this.fileLoaderService=r,this.smsApiService=c,this.deviceService=m,this.asyncStorageService=_,this.appConfig=M,this.currentUserService=I,this.messageTemplateDisplayService=k,this.errorService=R,this.isEmbedded=!1,this.update=new he(!0),this.templateActionValue={shouldSave:!1},this.showAttachment=!1,this.MAX_IMAGE_COUNT=3,this.isSendingInProgress=!1,this.isProviderRole=this.appConfig.defaultUserRole===Ut.PROVIDER,this.ProviderPermissionEnum=br,this.attachmentMimeTypeList=["application/gzip","application/pdf","application/vnd.ms-excel","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.text","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/x-gzip","application/x-tar","application/x-zip-compressed","application/zip","image/bmp","image/gif","
7image/jpeg","image/png","image/tiff","text/csv"]}ngOnInit(){this.initResultMessage(),this.initForm(),this.initFormRestriction(),this.messageTemplateDisplayService.selectedTemplate$.pipe(Le(this)).subscribe(e=>{e&&this.messageForm&&(this.messageForm.patchValue({text:e}),this.onTextInput())})}get clinicUuid(){return this.activeThread?.clinicUuid??this.create?.clinicUuid}onKeyEnter(e){return!this.isSendingDisabled&&!this.deviceService.isTouchDevice()&&(e.preventDefault(),this.onSubmit()),this.deviceService.isTouchDevice()}onSubmit(){if(this.isSendingDisabled)return;let e=this.messageForm.value.text,t=this.templateActionValue.shouldSave&&e?this.smsApiService.saveTemplate(this.clinicUuid,{text:e}):me(null);Ft([this.currentUserService.getAccountData(),t]).subscribe(([{memberId:i}])=>{this.templateActionValue.shouldSave=!1,this.isSendingInProgress=!0,this.create?this.createNewThread(i):this.createNewMessage(i)})}createNewMessage(e){let t=[];this.uploadAttachments().pipe(ne(i=>i.forEach(o=>t.push(o))),re(i=>i.map(o=>o.uuid)),L(i=>this.threadService.createMessage({text:this.text,threadId:this.threadId,listAttachmentId:i})),Pt(i=>(this.isSendingInProgress=!1,xn(()=>i)))).subscribe(i=>{this.resultMessage.attachments=t,this.resultMessage.text=this.messageForm.get("text").value,this.resultMessage.messageId=i.messageId,this.resultMessage.partThreadId=e,this.postSave()})}createNewThread(e){let t=[];this.uploadAttachments().pipe(ne(i=>i.forEach(o=>t.push(o))),re(i=>i.map(o=>o.uuid)),L(i=>this.threadService.createThread({text:this.text,type:this.create.type,subject:this.create.subject,participantList:this.create.participantList,clinicUuid:this.create?.clinicUuid,listAttachmentId:i})),Pt(i=>(this.isSendingInProgress=!1,xn(()=>i)))).subscribe(i=>{this.resultMessage.attachments=t,this.resultMessage.text=i.lastMessage.text,this.resultMessage.messageId=i.lastMessage.messageId,this.resultMessage.partThreadId=e,this.resultMessage.threadId=i.threadId,this.postSave()})}uploadAttachments(){return this.resultMessage.attachments?.length?this.threadService.uploadAttachments(this.clinicUuid,this.resultMessage.attachments).pipe(Pt(e=>(this.errorService.displayNotification(`Failed to upload file ${this.resultMessage.attachments[0].fileName}`),xn(()=>e))),re(e=>{let t=e.filter(({attachmentId:i,error:o})=>o&&!i);if(t.length)throw this.errorService.displayNotification(`Failed to upload unsupported file ${t[0].fileName}`),new Error(t[0].error.detail+" "+t[0].fileName);return e})):me([])}get isSendingDisabled(){return this.messageForm?.invalid||this.isSendingInProgress}onFocusArea(){this.asyncStorageService.get("messagingWarning").pipe(ge(e=>e&&!this.isProviderRole),ne(()=>this.textInput.nativeElement.blur()),L(()=>this.modalWindowService.confirm("This messaging system can only be used for non-urgent matters. If you need medical attention now, please call the clinic or dial 911. Messages are replied by the clinic within 1-2 working days.","Warning","I UNDERSTAND","CANCEL",this.isProviderRole)),ge(Boolean),L(()=>this.asyncStorageService.remove("messagingWarning"))).subscribe()}onTextInput(){this.autosize?.resizeToFitContent(!0)}onTextareaKeydown(e){(e.key==="ArrowUp"||e.key==="ArrowDown")&&e.stopPropagation()}postSave(){this.resultMessage.attachments?.length&&this.resultMessage.attachments.forEach(e=>{e.href=`/api/attachment/message/${this.resultMessage.messageId}/attachment/${e.attachmentId}`}),this.isSendingInProgress=!1,this.update.emit(this.resultMessage),this.initResultMessage(),this.initForm()}detectAttachments(e){if(!e?.length)return;this.resultMessage.text=this.messageForm.get("text").value,this.resultMessage.attachments=this.resultMessage.attachments||[];let{length:t}=this.resultMessage.attachments;(t+e.length<=this.MAX_IMAGE_COUNT?me(!0):this.modalWindowService.confirm(`Only ${this.MAX_IMAGE_COUNT} files accepted.`,"Warning","OKAY","CANCEL",this.isProviderRole)).pipe(ge(Boolean),L(()=>this.fileLoaderService.loadFiles(e,this.MAX_IMAGE_COUNT-t))).subscribe(o=>{this.resultMessage.attachments=[...this.resultMessage.attachments,...o.map((r,c)=>({attachmentId:new Date().getTime()+c,fileName:e[c].name,type:nd.IMAGE,href:r,metaType:{virtual:!0,origin:e[c]}}))],this.initForm()})}isImageFile(e){return/\.(jpeg|jpg|gif|png|bmp)$/i.test(e)}removeAttachment(e){this.resultMessage.attachments.splice(e,1),this.initForm(this.textInput.nativeElement.value)}get text(){return this.resultMessage.attachments?.length&&this.messageForm.get("text").value===""?" ":this.messageForm.get("text").value}initForm(e=this.resultMessage.text){let t;this.create?t={text:[e,at.required],type:[this.create.type,at.required],subject:[this.create.subject,at.required],clinicId:[this.create.clinicUuid,at.required]}:t={threadId:[this.threadId,at.required],text:[e,at.required]},this.resultMessage.attachments?.length&&(t.text=[this.resultMessage.text]),this.messageForm=this.formBuilder.group(t),this.fileUploadInput&&(this.fileUploadInput.nativeElement.value=""),this.onTextInput()}initResultMessage(){this.resultMessage={createdAtUnix:new Date().getTime(),isLast:!0,isOwner:!0,isRead:!1,messageId:0,messageType:jl.COMMON,partThreadId:0,source:{sourceId:0,sourceType:jl.COMMON},text:"",threadId:0}}initFormRestriction(){this.isProviderRole&&this.activeThread&&(this.activeThread.noReply=!1),this.clinicApiService.getMessageSettings(this.clinicUuid).subscribe(({fileUpload:e,isAllowed:t})=>{this.showAttachment=e,!this.isProviderRole&&this.activeThread&&(this.activeThread.noReply=this.activeThread.noReply||!t)})}},Cn.\u0275fac=function(t){return new(t||Cn)(h(Gt),h(Te),h(Nt),h(rt),h(ja),h(on),h(Si),h(si),h("APP_CONFIG"),h(bt),h(Li),h(Ii))},Cn.\u0275cmp=w({type:Cn,selectors:[["lib-message-thread-form"]],viewQuery:function(t,i){if(t&1&&(ft(Fy,5),ft(Ly,5),ft(Dy,5)),t&2){let o;ht(o=_t())&&(i.textInput=o.first),ht(o=_t())&&(i.autosize=o.first),ht(o=_t())&&(i.fileUploadInput=o.first)}},inputs:{create:"create",threadId:"threadId",activeThread:"activeThread",isEmbedded:[2,"isEmbedded","isEmbedded",Qi]},outputs:{update:"update"},standalone:!1,decls:2,vars:1,consts:[["textInput","","autosize","cdkTextareaAutosize"],["documentTemplate",""],["fileUploadInput",""],[1,"send-form",3,"has-thread","formGroup"],[1,"n
7o-reply"],[1,"send-form",3,"ngSubmit","formGroup"],[1,"attachments-container"],["class","attachment",4,"ngFor","ngForOf"],[1,"text-area"],["cdkTextareaAutosize","","cdkAutosizeMinRows","1","name","text","formControlName","text","rows","1",3,"focus","input","keydown","keydown.enter","cdkAutosizeMaxRows","placeholder"],[1,"message-bar"],[1,"attachment-wrapper"],[3,"isEmbedded","value","message"],["libButton","","variant","icon","type","submit",1,"send-button",3,"disabled"],[3,"params"],[1,"attachment"],[4,"ngIf","ngIfElse"],["type","button",1,"remove-attachment-button",3,"click"],[1,"remove-attachment-icon",3,"params"],[3,"src","alt"],[1,"document-icon",3,"params"],[1,"document-name"],["type","file","id","fileAttach","name","fileAttach","multiple","","hidden","",3,"change","accept","disabled"],["type","button",1,"attach-file-button",3,"click","matTooltip","disabled"]],template:function(t,i){t&1&&_e(0,Qy,17,22,"form",3)(1,Gy,7,6,"div",4),t&2&&Ce(i.messageForm&&!(i.activeThread!=null&&i.activeThread.noReply)?0:1)},dependencies:[ue,F,U,ig,je,ee,X,Ne,tt,st,Ta,ve,Xr,T],styles:[".send-form[_ngcontent-%COMP%]{width:100%;height:100%;min-height:0;display:flex;flex-direction:column}.send-form.keyboard-shown[_ngcontent-%COMP%]{position:absolute;top:9.5vh;height:calc(100% - 9.5vh)}.send-form[_ngcontent-%COMP%] .send-button[_ngcontent-%COMP%]{--svg-size: 1rem;display:flex;align-items:center;justify-content:center;background-color:#f1f5f9;color:#064060;cursor:pointer;width:2rem;height:2rem;border-radius:50%;margin-left:auto}.send-form[_ngcontent-%COMP%] .send-button[_ngcontent-%COMP%]:disabled, .send-form[_ngcontent-%COMP%] .send-button[aria-disabled=true][_ngcontent-%COMP%]{opacity:.25;cursor:default}.send-form[_ngcontent-%COMP%] .attachment-wrapper[_ngcontent-%COMP%]{display:flex}.send-form[_ngcontent-%COMP%] .attachment-wrapper[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{display:none}.send-form[_ngcontent-%COMP%] .attachment-wrapper[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]:disabled + .attach-file-button[_ngcontent-%COMP%]{pointer-events:none;opacity:.25}.send-form[_ngcontent-%COMP%] .attachment-wrapper[_ngcontent-%COMP%] .attach-file-button[_ngcontent-%COMP%]{--svg-size: 1rem;display:flex;margin-right:.625rem;padding:0;border:0;background:transparent;cursor:pointer}.send-form[_ngcontent-%COMP%] .text-area[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-grow:1;min-height:0;margin:.5rem .75rem 0;border:1px solid #E2E8F0;border-radius:8px;overflow:hidden}.send-form[_ngcontent-%COMP%] .text-area[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{box-sizing:border-box;flex:1 1 auto;width:100%;resize:none;overflow-y:auto;letter-spacing:.0275rem;min-height:2rem;padding:.5rem .75rem}.send-form[_ngcontent-%COMP%] .message-bar[_ngcontent-%COMP%]{display:flex;padding:.5rem .75rem;align-items:center;justify-content:space-between}.send-form[_ngcontent-%COMP%] .attachments-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 .75rem}.send-form[_ngcontent-%COMP%] .attachments-container[_ngcontent-%COMP%] .attachment[_ngcontent-%COMP%]{position:relative;box-sizing:border-box;max-width:33.3333333333%;padding:.5rem .25rem;display:flex;align-items:center}.send-form[_ngcontent-%COMP%] .attachments-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;border-radius:4px;max-height:6rem}.send-form[_ngcontent-%COMP%] .attachments-container[_ngcontent-%COMP%] .document-icon[_ngcontent-%COMP%] svg{height:1.875rem;width:1.875rem}.send-form[_ngcontent-%COMP%] .attachments-container[_ngcontent-%COMP%] .document-name[_ngcontent-%COMP%]{word-break:break-all;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.send-form[_ngcontent-%COMP%] .attachments-container[_ngcontent-%COMP%] .remove-attachment-button[_ngcontent-%COMP%]{position:absolute;right:.5rem;bottom:.75rem;display:flex;justify-content:center;padding:.3125rem .375rem .125rem;border:0;background-color:#fffc;border-radius:4px;width:1.875rem;height:1.875rem;
7align-items:center;cursor:pointer}.send-form[_ngcontent-%COMP%] .attachments-container[_ngcontent-%COMP%] .remove-attachment-button[_ngcontent-%COMP%] .remove-attachment-icon[_ngcontent-%COMP%]{--svg-width: 1rem;--svg-height: 1.125rem}.send-form[_ngcontent-%COMP%] .attachments-container[_ngcontent-%COMP%] .document-icon[_ngcontent-%COMP%] ~ .remove-attachment-button[_ngcontent-%COMP%]{position:static}.no-reply[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;padding:.5rem;line-height:1.5}"]}),Cn);$n=Xe([et(),ut("design:paramtypes",[Gt,Te,Nt,rt,ja,on,Si,Object,Object,bt,Li,Ii])],$n);ri();var Kn=(function(n){return n.Text="text",n.Link="link",n})(Kn||{});var c0=(()=>{let e=class e{constructor(){this.urlRegex=/(https?:\/\/[^\s<]+)/gi,this.trailingPunct=`.,:;!?)]}'"`,this.namedEntities={quot:'"',amp:"&",lt:"<",gt:">",apos:"'"}}decodeEntities(i){return i&&i.replace(/&(#\d+|\w+);/g,(o,r)=>r?r.charAt(0)==="#"?r==="#039"?"'":o:this.namedEntities[r.toLowerCase()]??o:o)}transform(i){if(!i||!i.trim())return[];let o=this.decodeEntities(i),r=[],c=0,m;for(this.urlRegex.lastIndex=0;(m=this.urlRegex.exec(o))!==null;){let _=m.index,M=m[0];_>c&&r.push({type:Kn.Text,text:o.slice(c,_)});let I=M,k="";for(;I.length&&this.trailingPunct.indexOf(I[I.length-1])>=0;)k=I[I.length-1]+k,I=I.slice(0,-1);r.push({type:Kn.Link,text:I,href:I}),k&&r.push({type:Kn.Text,text:k}),c=_+M.length}return c<o.length&&r.push({type:Kn.Text,text:o.slice(c)}),r}};e.\u0275fac=function(o){return new(o||e)},e.\u0275pipe=bp({name:"tokenizeText",type:e,pure:!0});let n=e;return n})();function Hy(n,e){if(n&1&&(Dl(0,"a",0),f(1),Bl()),n&2){let t=g().$implicit;ga("href",t.href,Kt),a(),b(t.text)}}function $y(n,e){if(n&1&&(Dl(0,"span"),f(1),Bl()),n&2){let t=g().$implicit;a(),b(t.text)}}function Ky(n,e){if(n&1&&_e(0,Hy,2,2,"a",0)(1,$y,2,1,"span"),n&2){let t,i=e.$implicit,o=g();Ce((t=i.type)===o.TokenTypeEnum.Link?0:1)}}var Cl=(()=>{let e=class e{constructor(){this.text="",this.TokenTypeEnum=Kn}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["lib-message-text"]],inputs:{text:"text"},decls:3,vars:2,consts:[["target","_blank","rel","noopener noreferrer",3,"href"]],template:function(o,r){o&1&&(Wt(0,Ky,2,1,null,null,hr),d(2,"tokenizeText")),o&2&&Qt(u(2,0,r.text))},dependencies:[c0],styles:["[_nghost-%COMP%]{display:block;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:text;user-select:text}a[_ngcontent-%COMP%]{letter-spacing:normal;font-family:Roboto-bold,sans-serif}"],changeDetection:0});let n=e;return n})();var Yy=["textAreaElement"],Xy=["messageListWrap"];function Zy(n,e){n&1&&(s(0,"div",8)(1,"h1"),f(2),d(3,"translate"),l(),s(4,"p"),f(5),d(6,"translate"),l(),s(7,"button",9),f(8),d(9,"translate"),l(),s(10,"button",10),f(11),d(12,"translate"),l()()),n&2&&(a(2),b(u(3,4,"Sorry, you can\u2019t send a text")),a(3),b(u(6,6,"It looks like this patient doesn\u2019t have a mobile phone number or has not consented to text. Please update their details and try again.")),a(3),b(u(9,8,"UPDATE DETAILS")),a(3),b(u(12,10,"SEND APP MESSAGE")))}function Jy(n,e){if(n&1&&(s(0,"div",15)(1,"p",16),f(2),d(3,"c4uDate"),l(),s(4,"div",17)(5,"p",8),v(6,"lib-message-text",18),s(7,"span",19),f(8),d(9,"c4uDate"),l()()()()),n&2){let t=e.$implicit;a(2),b(D(3,3,t.sentAt,"message_full")),a(4),p("text",t.text),a(2),b(D(9,6,t.sentAt,"todo_time"))}}function eP(n,e){if(n&1){let t=S();s(0,"div",13,1),P("scrolledUp",function(){x(t);let o=g(2);return O(o.onScrollUp())}),C(2,Jy,10,9,"div",14),d(3,"reverse"),l()}if(n&2){let t=g(2);p("scrollWindow",!1)("infiniteScrollUpDistance",.2)("infiniteScrollThrottle",50),a(2),p("ngForOf",u(3,4,t.smsList))}}function tP(n,e){if(n&1&&(s(0,"div",28)(1,"span",29),f(2),l(),f(3),s(4,"span",30),f(5),d(6,"translate"),l()()),n&2){let t=e.ngIf,i=g(3);a(2),b(t),a(),y(" / ",i.MAX_TEXT_LENGTH," "),a(2),y(" - ",u(6,3,"Character limit exceeded"))}}function iP(n,e){if(n&1){let t=S();s(0,"footer",20),P("click",function(){x(t);let o=g(2);return O(o.scrollMessageListToBottom())}),s(1,"form",21)(2,"div",22)(3,"textarea",23,2),d(5,"translate"),d(6,"translate"),P("keydown.enter",function(){x(t);let o=g(2);return O(o.onKeyEnter())}),f(7," "),l(),C(8,tP,7,5,"div",24),l(),s(9,"div",25),v(10,"lib-message-template-action",26,3),s(12,"button",27),P("click",function(){x(t);let o=g(2);return O(o.sendSmsAndTemplate())}),f(13),d(14,"translate"),l()()()()}if(n&2){let t=e.ngIf,i=V(4),o=g(2);a(),p("formGroup",o.smsForm),a(),Z("error",t.errors==null?null:t.errors.maxlength),a(),Z("active",t.value),p("placeholder",u(5,13,"Type your message..."))("scrollTop",i.scrollHeight),G("aria-label",u(6,15,"Type your message...")),a(5),p("ngIf",t.value==null?null:t.value.length),a(2),p("message",t.value)("value",o.templateActionValue),a(2),p("disabled",o.smsForm.invali
7d),a(),y(" ",u(14,17,"SEND")," ")}}function nP(n,e){if(n&1&&(s(0,"main"),C(1,eP,4,6,"div",11),l(),C(2,iP,15,19,"footer",12)),n&2){let t=g();a(),p("ngIf",t.smsList==null?null:t.smsList.length),a(),p("ngIf",t.smsForm.controls.text)}}var vn,ip=(vn=class{constructor(e,t,i,o,r,c,m){this.formBuilder=e,this.smsApiService=t,this.activatedRoute=i,this.providerDataService=o,this.patientDataService=r,this.demographicsApiService=c,this.messageTemplateDisplayService=m,this.PAGE_SIZE=15,this.pageIndex=0,this.sentSmsCount=0,this.MAX_TEXT_LENGTH=160,this.smsList=[],this.isSendSmsAvailable=!1,this.templateActionValue={shouldSave:!1},this.smsForm=this.formBuilder.group({text:["",[at.required,at.maxLength(this.MAX_TEXT_LENGTH)]]})}ngOnInit(){Jn([this.providerDataService.getCurrentClinicUuid(),this.patientDataService.currentPatient$]).pipe(ge(([e,t])=>!!e&&!!t),sa(),ne(([e,{userId:t}])=>{this.clinicUuid=e,this.userId=t}),L(([e,{userId:t}])=>this.demographicsApiService.getClinicUserDetails(e,t)),ne(({mobilePhone:e,consentToText:t})=>this.isSendSmsAvailable=e&&t),L(()=>this.getSmsList()),Le(this)).subscribe(()=>{this.adjustTextAreaHeight(),this.scrollMessageListToBottom()}),this.messageTemplateDisplayService.selectedTemplate$.pipe(Le(this)).subscribe(e=>{e&&this.smsForm&&this.smsForm.patchValue({text:e})}),this.initSmsTextChangeListener()}onSmsSentSuccess(){this.smsForm.reset(),this.getSmsList(!0).subscribe(()=>{++this.sentSmsCount,this.scrollMessageListToBottom()})}onScrollUp(){this.smsList.length<this.totalCount&&(this.previousScrollHeight=this.messageListContainer?.nativeElement.scrollHeight,this.getSmsList().subscribe(()=>this.scrollMessageListToBottom(!0)))}scrollMessageListToBottom(e=!1){this.messageListContainer?.nativeElement&&(this.messageListContainer.nativeElement.scrollTop=e?this.messageListContainer.nativeElement.scrollHeight-this.previousScrollHeight:this.messageListContainer.nativeElement.scrollHeight)}getSmsList(e=!1){return this.smsApiService.getSmsList(this.clinicUuid,this.userId,this.PAGE_SIZE,e?0:this.PAGE_SIZE*this.pageIndex+this.sentSmsCount).pipe(ne(t=>{e?this.smsList=[t.result[0],...this.smsList]:(this.smsList=[...this.smsList,...t.result],++this.pageIndex),this.totalCount=t.totalCount}),Wi(0))}initSmsTextChangeListener(){this.smsForm.controls.text.valueChanges.pipe(Le(this)).subscribe(()=>this.adjustTextAreaHeight())}adjustTextAreaHeight(){let{nativeElement:e}=this.textAreaElement;e.value?(e.style.height="auto",e.style.height=`${e.scrollHeight}px`):e.style.height="2rem"}onKeyEnter(){return this.smsForm.valid&&this.sendSmsAndTemplate(),!1}sendSmsAndTemplate(){let{patientId:e}=this.activatedRoute.parent.parent.parent.snapshot.params,t=this.smsForm.value,i=this.templateActionValue.shouldSave?this.smsApiService.saveTemplate(this.clinicUuid,t):me(null),o=this.providerDataService.getCurrentProviderId().pipe(L(r=>this.smsApiService.sendSms(r,e,t)));i.pipe(ne(()=>this.templateActionValue.shouldSave=!1),L(()=>o)).subscribe(()=>this.onSmsSentSuccess())}},vn.\u0275fac=function(t){return new(t||vn)(h(Nt),h(on),h(j),h(Ni),h(Ri),h(Bn),h(Li))},vn.\u0275cmp=w({type:vn,selectors:[["ng-component"]],viewQuery:function(t,i){if(t&1&&(ft(Yy,5),ft(Xy,5)),t&2){let o;ht(o=_t())&&(i.textAreaElement=o.first),ht(o=_t())&&(i.messageListContainer=o.first)}},standalone:!1,decls:11,vars:8,consts:[["sendSmsTemplate",""],["messageListWrap",""],["textAreaElement",""],["templateActionComponent",""],[1,"sms-wrapper"],[1,"header-text"],["routerLink",".."],["class","content",4,"ngIf","ngIfElse"],[1,"content"],["type","button","routerLink","../../../address-and-contacts",1,"update-button"],["type","button","routerLink","..",1,"send-button"],["class","sms-container","infiniteScroll","",3,"scrollWindow","infiniteScrollUpDistance","infiniteScrollThrottle","scrolledUp",4,"ngIf"],[3,"click",4,"ngIf"],["infiniteScroll","",1,"sms-container",3,"scrolledUp","scrollWindow","infiniteScrollUpDistance","infiniteScrollThrottle"],["class","sms-preview",4,"ngFor","ngForOf"],[1,"sms-preview"],[1,"date"],[1,"sms"],[1,"sms-value",3,"text"],[1,"time"],[3,"click"],[1,"sms-form",3,"formGroup"],[1,"textarea-wrapper"],["formControlName","text","type","text",3,"keydown.enter","placeholder","scrollTop"],["class","symbols-counter",4,"ngIf"],[1,"buttons-container"],[3,"message","value"],["type","submit",3,"click","disabled"],[1,"symbols-counter"],[1,"count"],[1,"error-text"]],template:function(t,i){if(t&1&&(s(0,"div",4)(1,"header")(2,"div",5),f(3),d(4,"translate"),s(5,"a",6),f(6),d(7,"translate"),l()()(),C(8,Zy,13,12,"div",7)(9,nP,3,2,"ng-template",null,0,pe),l()),t&2){let o=V(10);a(3),y(" ",u(4,4,"This text message can include a maximum of "+i.MAX_TEXT_LENGTH+" characters. Please do not include any personal information in the text message as they are not HIPAA compliant, to do this use")," "),a(3),b(u(7,6,"Send Message")),a(2),p("ngIf",!i.isSendSmsAvailable)("ngIfElse",o)}},dependencies:[ue,F,Qe,je,ee,X,Ne,tt,st,Cs,Cl,Xr,Je,wd,T],styles:['.sms-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1}.sms-wrapper[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{box-sizing:border-box;font-size:.625rem;line-height:1rem;padding:.625rem 1rem;box-shadow:0 2px 4px #0000001a;flex:0 0 auto;position:relative;z-index:1;background-color:#fff}.sms-wrapper[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .header-text[_ngcontent-%COMP%]{margin:auto}.sms-wrapper[_ngcontent-%COMP%] header[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;cursor:pointer}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 2rem;box-sizing:border-box;gap:.75rem;flex:1;align-self:center;width:100%}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:#064060;font-size:1.5rem;line-height:1.75rem;font-family:Roboto-bold,sans-serif}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:1.5rem;color:#505050;text-align:center;margin:1rem auto;width:100%}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .sms-value[_ngcontent-%COMP%]{width:100%;word-wrap:break-word;white-space:pre-line}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .update-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.75rem 1.5rem;background-color:#064060;border-radius:8px;width:auto;box-sizing:border-box;font-family:Roboto-bold;align-items:center;cursor:pointer}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .update-button[_ngcontent-%COMP%]:hover{opacity:.8}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .update-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .update-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .update-button[disabled][_ngcontent-%COMP%]{cursor:default}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .send-button[_ngcontent-%COMP%]{display:flex;color:#064060;justify-content:center;padding:.75rem;background-color:#fff;border-radius:8px;width:auto;box-sizing:border-box;font-family:Roboto-bold;align-items:center;cursor:pointer}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .send-button[_ngcontent-%COMP%]:hover{opacity:.8}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .send-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .send-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .send-button[disabled][_ngcontent-%COMP%]{cursor:default}.sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:.875rem}.sms-wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;height:100%;overflow:auto}.sms-wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .sms-container[_ngcontent-%COMP%]{display:block;overflow:auto}.sms-wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .sms-container[_ngcontent-%COMP%] .sms-preview[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-self:flex-end;width:100%;overflow:initial;margin:0 auto;flex:1 0 auto}.sms-wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .sms-container[_ngcontent-%COMP%] .sms-preview[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex:0 0 auto;gap:.25rem;align-items:flex-start;width:100%}.sms-wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:.675rem 0 .25rem;font-size:.675rem;font-family:Roboto-bold,sans-serif;color:#06406080}.sms-wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .sms[_ngcontent-%COMP%]{padding-left:2rem;padding-right:1rem;justify-content:flex-end;display:flex;margin:.25rem 0}.sms-wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{background-color:#03c5e533;padding:.5rem;min-width:0;position:relative;border-radius:8px 0 8px 8px;font-size:.75rem;line-height:1.125rem;display:flex;flex-direction:column;flex:1 1 auto}.sms-wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{font-size:.625rem;color:#50505080;align-self:flex-end}.sms-wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]:after{content:"";display:block;border-style:solid;border-width:8px 8px 0 0;border-color:rgba(13,157,197,.2) transparent transparent transparent;right:-8px;top:0;position:absolute;width:0;height:0}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;flex-direction:column;justify-content:flex-end;box-sizing:border-box;padding:1rem;align-items:center}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .sms-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .textarea-wrapper[_ngcontent-%COMP%]{position:relative;border:1px solid #949494;border-radius:8px;overflow:hidden}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .textarea-wrapper.error[_ngcontent-%COMP%]{border-color:#de000d}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .textarea-wrapper.error[_ngcontent-%COMP%] .symbols-counter[_ngcontent-%COMP%]{color:#de000d}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .textarea-wrapper.error[_ngcontent-%COMP%] .error-text[_ngcontent-%COMP%]{visibility:visible}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .textarea-wrapper[_ngcontent-%COMP%] .symbols-counter[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;font-size:.625rem;color:#50505080}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .textarea-wrapper[_ngcontent-%COMP%] .symbols-counter[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .textarea-wrapper[_ngcontent-%COMP%] .error-text[_ngcontent-%COMP%]{color:#de000d;visibility:hidden}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{padding:.5rem;line-height:1rem;font-size:.75rem;width:100%;box-sizing:border-box;max-height:10rem;border:none;overflow:hidden}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] textarea.active[_ngcontent-%COMP%]{padding-bottom:1.25rem;overflow:auto}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] textarea.ng-invalid[_ngcontent-%COMP%]{outline:none}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-top:.625rem}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%], .sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:disabled){cursor:pointer}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.75rem;background-color:#064060;border-radius:8px;width:100%;box-sizing:border-box;font-family:Roboto-bold;align-items:center;cursor:pointer;min-width:auto;padding:.75rem 1.5rem;width:auto;font-size:.875rem}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{opacity:.8}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] button[disabled][_ngcontent-%COMP%]{cursor:default}.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{background-color:#a7a7a7;cursor:default}@media(max-height:700px){.sms-wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{max-height:5rem}}
7@media(min-width:900px){.sms-wrapper[_ngcontent-%COMP%] .header-text[_ngcontent-%COMP%], .sms-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%], .sms-wrapper[_ngcontent-%COMP%] .sms-preview[_ngcontent-%COMP%], .sms-wrapper[_ngcontent-%COMP%] .sms-form[_ngcontent-%COMP%], .sms-wrapper[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{max-width:480px}}']}),vn);ip=Xe([et(),ut("design:paramtypes",[Nt,on,j,Ni,Ri,Bn,Li])],ip);var oP=(n,e)=>[n,e];function rP(n,e){if(n&1&&(s(0,"p",8),f(1),d(2,"applyTimezone"),d(3,"c4uDate"),l()),n&2){let t=e.ngIf,i=g(2);a(),y(" ",D(3,4,D(2,1,i.thread.lastMessage.createdAt,t),"message_full")," ")}}function aP(n,e){if(n&1&&(s(0,"p",9),f(1),l()),n&2){let t=g(2);a(),y(" ",t.anotherProvider.name," ")}}function sP(n,e){if(n&1&&(s(0,"a",1)(1,"div",2),v(2,"lib-avatar-image",3),l(),s(3,"div",4)(4,"p",5),f(5),l(),C(6,rP,4,7,"p",6)(7,aP,2,1,"p",7),l()()),n&2){let t=g();p("routerLink",Dt(8,oP,t.messageUrl,t.thread.threadId)),a(),Z("unread",t.thread.unreadCount>0),a(),p("src",t.participant.image)("name",t.participant.participantType===t.ParticipantTypeEnum.USER?t.participant.name:t.participant.firstName),a(3),b(t.participant.name),a(),p("ngIf",t.user==null?null:t.user.timezone),a(),p("ngIf",t.anotherProvider)}}var vl=(()=>{let e=class e{constructor(i,o,r){this.currentUserService=i,this.appConfig=o,this.threadService=r,this.messageUrl=`/${this.appConfig.defaultUserRole}/message/thread`,this.ParticipantTypeEnum=Ue}ngOnInit(){this.currentUserService.getAccountData().subscribe(i=>{this.user=i,i.memberType===Ue.DOCTOR?(this.participant=this.threadService.getPrimaryParticipant(this.thread,Ue.USER)??this.threadService.getAnotherPrimaryParticipantProvider(this.thread,i),this.participant&&(this.anotherProvider=this.thread.participantList.find(({isPrimary:o,participantType:r,participantId:c})=>Ue.DOCTOR===r&&this.participant.participantId!==c&&o))):this.participant=this.threadService.getOppositePrimaryParticipant(this.thread,Ue.USER)})}};e.\u0275fac=function(o){return new(o||e)(h(bt),h("APP_CONFIG"),h(Gt))},e.\u0275cmp=w({type:e,selectors:[["lib-thread-item"]],inputs:{thread:"thread"},standalone:!1,decls:1,vars:1,consts:[["class","element",3,"routerLink",4,"ngIf"],[1,"element",3,"routerLink"],[1,"avatar"],["size","2.5rem",3,"src","name"],[1,"message-data"],[1,"name"],["class","date",4,"ngIf"],["class","another-provider-name",4,"ngIf"],[1,"date"],[1,"another-provider-name"]],template:function(o,r){o&1&&C(0,sP,8,11,"a",0),o&2&&p("ngIf",r.participant)},dependencies:[F,Qe,Ve,Je,ct],styles:['.element[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1rem;border-top:1px solid #e6e6e6;align-items:center;justify-content:space-between;color:#505050;font-size:.9rem;cursor:pointer;-webkit-overflow-scrolling:touch}.element[_ngcontent-%COMP%]:last-child, .element[_ngcontent-%COMP%] .last[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 .5rem;overflow:hidden;flex:1;line-height:1.3rem}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%], .element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:block}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{margin-bottom:.3rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;flex:.2;--avatar-image-size: 2rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg, .element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:2rem;height:2rem;min-width:1rem;min-height:1rem;background-size:2rem}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{color:#a7a7a7;display:flex;align-items:center;font-family:Roboto-medium,sans-serif}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:1.4rem;height:1.4rem}[_nghost-%COMP%]{display:block;padding:3px;border-bottom:1px solid #e6e6e6;box-sizing:border-box}.element[_ngcontent-%COMP%]{padding:1.25rem;justify-content:flex-start;font-family:Roboto-regular,Arial,Helvetica,sans-serif;border-top:none;border-bottom:none!important}.element[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;padding-bottom:.25rem}.element[_ngcontent-%COMP%] .name[_ngcontent-%COMP%], .element[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{font-size:1rem;letter-spacing:.0325rem;line-height:1.125rem}
7.element[_ngcontent-%COMP%] .another-provider-name[_ngcontent-%COMP%]{font-size:.75rem;font-family:Roboto-bold,sans-serif;line-height:1.5rem;letter-spacing:.015rem}.avatar[_ngcontent-%COMP%]{margin-right:.625rem;position:relative}.avatar.unread[_ngcontent-%COMP%]:before{content:"";position:absolute;z-index:1;transform:translate(-.125rem,-25%);display:block;height:.75rem;width:.75rem;background:#de000d;border-radius:50%;border:.125rem solid #fff}@media(min-width:768px){.element[_ngcontent-%COMP%]{padding-left:0} lib-message-list .list-wrapper.clinic-list{overflow:visible}}@media only screen and (min-width:1200px){.element[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-right:1rem;padding-right:40px;box-sizing:border-box}.element[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex:1 1 0}}']});let n=e;return n})();var lP=n=>[n];function cP(n,e){if(n&1&&(s(0,"li"),v(1,"lib-thread-item",7),l()),n&2){let t=e.$implicit;a(),p("thread",t)}}var np=(()=>{let e=class e{constructor(i,o){this.threadService=i,this.router=o,this.receiverListLink="/user/message/thread/create/clinic"}ngOnInit(){this.threadService.query().subscribe(i=>{this.threadList=i,this.threadService.setThreadList(i),this.threadList.length===0&&this.router.navigate([this.receiverListLink])})}};e.\u0275fac=function(o){return new(o||e)(h(Gt),h(B))},e.\u0275cmp=w({type:e,selectors:[["lib-patient-thread-list"]],standalone:!1,decls:7,vars:5,consts:[["isAtTheTop","isAtThePosition"],["libIsAtThePosition","top",1,"list-container"],[1,"list-wrapper","clinic-list"],[1,"list-content"],[1,"list"],[4,"ngFor","ngForOf"],["iconName","edit-square","backgroundColor","#064060","text","COMPOSE","tabindex","-1",3,"isCollapsed","routerLink"],[3,"thread"]],template:function(o,r){if(o&1&&(s(0,"div",1,0)(2,"div",2)(3,"div",3)(4,"ul",4),C(5,cP,2,1,"li",5),l()()()(),v(6,"lib-floating-button",6)),o&2){let c=V(1);a(5),p("ngForOf",r.threadList),a(),p("isCollapsed",!c.value)("routerLink",ce(3,lP,r.receiverListLink))}},dependencies:[ue,Qe,Ro,Ga,vl],styles:["[_nghost-%COMP%]{display:block;width:100%;position:relative;height:100%}.list-container[_ngcontent-%COMP%]{height:100%;overflow:auto}.list-wrapper[_ngcontent-%COMP%]{width:100%;overflow:auto;-webkit-overflow-scrolling:touch}@media(min-width:768px){.list-wrapper[_ngcontent-%COMP%]{width:calc(100% - 5rem);margin:0 auto}}"]});let n=e;return n})();var op=(()=>{let e=class e{constructor(i,o,r,c){this.clinicApiService=i,this.patientApiService=o,this.cdr=r,this.patientSearchNamePipe=c,this.patientSelected=new he,this.searchCleared=new he,this.searchForm=new Np({searchQuery:new Ca("")}),this.patientSearchPage=0,this.totalPatientSearchCount=0}clearSearch(){this.searchForm.get("searchQuery")?.setValue(""),this.searchCleared.emit()}get searchQuery(){return this.searchForm.get("searchQuery")?.value}loadPatientSearchResults(){this.patientSearchPage++;let i={status:"all",count:15,page:this.patientSearchPage,name:this.searchQuery};return this.clinicApiService.getClinicInfoByToken().pipe(L(({clinicUuid:o})=>this.patientApiService.getPatientList(o,i)),ne(({totalCount:o})=>this.totalPatientSearchCount=o),re(({result:o})=>(o.forEach(r=>r.name=this.patientSearchNamePipe.transform(r)),o)))}onSearch(){this.searchQuery&&(this.patientSearchPage=0,this.loadPatientSearchResults().subscribe(i=>{if(this.totalPatientSearchCount===1){this.onPatientSelected(i[0]);return}this.listboxData={results:i,labelKey:"name",idKey:"id",totalCount:this.totalPatientSearchCount,onLoadMore:()=>this.loadPatientSearchResults(),highlight:o=>this.highlightSearchText(o)},this.cdr.markForCheck()}))}highlightSearchText(i){if(!this.searchQuery||!i)return[{text:i,highlight:!1}];let o=i.slice(0,this.searchQuery.length),r=i.slice(this.searchQuery.length);return[{text:o,highlight:!0},{text:r,highlight:!1}].filter(c=>c.text.length>0)}onPatientSelected(i){this.listboxData=null,this.searchForm.get("searchQuery").setValue(i.name),this.patientSelected.emit(i)}};e.\u0275fac=function(o){return new(o||e)(h(Te),h(Ba),h(wo),h(Fa))},e.\u0275cmp=w({type:e,selectors:[["lib-provider-thread-list-patient-search"]],outputs:{patientSelected:"patientSelected",searchCleared:"searchCleared"},decls:4,vars:5,consts:[[3,"ngSubmit","formGroup"],[3,"queryCleared","querySubmitted","resultSelected","listboxData"],["type","search","formControlName","searchQuery",1,"input-search-with-hidden-x",3,"input","placeholder"]],template:function(o,r){o&1&&(s(0,"form",0),P("ngSubmit",function(){return r.onSearch()}),s(1,"lib-search-input-shell",1),P("queryCleared",function(){return r.clearSearch()})("querySubmitted",function(){return r.onSearch()})("resultSelected",function(m){return r.onPatientSelected(m)}),s(2,"input",2),d(3,"translate"),P("input",function(){return r.listboxData=null}),l()()()),o&2&&(p("formGroup",r.searchForm),a(),p("listboxData",r.listboxData),a(),p("placeholder",u(3,3,"Last Name, First Name")))},dependencies:[xa,je,ee,X,Ne,tt,st,Fd,T],styles:["lib-search-input-shell[_ngcontent-%COMP%]{margin:.25rem 0}"],changeDetection:0});let n=e;return n})();var vP=n=>({own:n}),yP=n=>["/user/appointment",n],PP=()=>({name:"clock",color:"#00ABC7"});function MP(n,e){if(n&1){let t=S();s(0,"a",16),d(1,"apiLink"),d(2,"async"),s(3,"img",17),d(4,"apiLink"),d(5,"async"),P("load",function(){x(t);let o=g(3);return O(o.imageLoaded.emit())}),l()()}if(n&2){let t=g(2).$implicit;p("href",u(2,4,u(1,2,t.href)),Kt),a(3),p("src",u(5,8,u(4,6,t.href)),Kt)}}function bP(n,e){if(n&1&&(s(0,"a",18),d(1,"apiLink"),d(2,"async"),f(3),l()),n&2){let t=g(2).$implicit;p("href",u(2,4,u(1,2,t.href)),Kt),a(3),y(" ",t.fileName," ")}}function xP(n,e){if(n&1&&(se(0),C(1,MP,6,10,"a",14)(2,bP,4,6,"a",15),le()),n&2){let t=g().$implicit;a(),p("ngIf",t.type==="image"),a(),p("ngIf",t.type==="file")}}function OP(n,e){if(n&1&&(s(0,"div",12),C(1,xP,3,2,"ng-container",13),d(2,"includes"),l()),n&2){let t=e.$implicit;a(),p("ngIf",!D(2,1,t.href,"data:"))}}function wP(n,e){if(n&1&&(s(0,"div")(1,"a",20),v(2,"lib-svg-icon",21),s(3,"span",22),f(4),d(5,"translate"),l()()()),n&2){let t=g(2);
7a(),p("routerLink",ce(5,yP,t.message.source.sourceId)),a(),p("params",A(7,PP)),a(2),b(u(5,3,"View Appointment Details"))}}function SP(n,e){if(n&1&&(s(0,"div",19),C(1,wP,6,8,"div",13),l()),n&2){let t=g();a(),p("ngIf",t.message.source.sourceType==="appointment")}}function IP(n,e){n&1&&(s(0,"div",23),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Read")," "))}function TP(n,e){n&1&&(s(0,"div",23),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Delivered")," "))}var rp=(()=>{let e=class e{constructor(){this.updated=new he(!0),this.imageLoaded=new he(!0),this.ParticipantTypeEnum=Ue}get isOwnMessage(){return this.message.isOwner}removeFile(i){let o=this.message.attachments.indexOf(i);this.message.attachments.splice(o,1),this.updated.emit(this.message)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=w({type:e,selectors:[["lib-message-item"]],hostVars:2,hostBindings:function(o,r){o&2&&Z("own",r.isOwnMessage)},inputs:{message:"message",participant:"participant",userTimezone:"userTimezone"},outputs:{updated:"updated",imageLoaded:"imageLoaded"},standalone:!1,decls:17,vars:19,consts:[[1,"message",3,"ngClass"],[1,"message-info"],[1,"participant-name"],[1,"message-create-time"],[1,"message-content-wrapper"],[1,"avatar",3,"src","name"],[1,"content"],[1,"attachment",3,"hidden"],["class","attachment-item",4,"ngFor","ngForOf"],[3,"text"],["class","source",4,"ngIf"],["class","message-status",4,"ngIf"],[1,"attachment-item"],[4,"ngIf"],["target","_blank","tabindex","-1",3,"href",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],["target","_blank","tabindex","-1",3,"href"],["alt","attachment","onError","this.src='assets/img/svg/icons/doctor-avatar-placeholder-zoom.svg'",3,"load","src"],["target","_blank",3,"href"],[1,"source"],["routerLinkActive","active",1,"source-detail-link",3,"routerLink"],[1,"icon-active",3,"params"],[1,"text"],[1,"message-status"]],template:function(o,r){o&1&&(s(0,"div",0)(1,"p",1)(2,"span",2),f(3),l(),s(4,"span",3),f(5),d(6,"applyTimezone"),d(7,"c4uDate"),l()(),s(8,"div",4),v(9,"lib-avatar-image",5),s(10,"div",6)(11,"div",7),C(12,OP,3,4,"div",8),l(),v(13,"lib-message-text",9),C(14,SP,2,1,"div",10),l()(),C(15,IP,3,3,"div",11)(16,TP,3,3,"div",11),l()),o&2&&(p("ngClass",ce(17,vP,r.message.isOwner)),a(3),b(r.participant.name),a(2),b(D(7,14,D(6,11,r.message.createdAt,r.userTimezone),"time")),a(4),p("src",r.participant.image)("name",r.participant.participantType===r.ParticipantTypeEnum.USER?r.participant.name:r.participant.firstName),a(2),p("hidden",!(r.message.attachments!=null&&r.message.attachments.length)),a(),p("ngForOf",r.message.attachments),a(),p("text",r.message.text),a(),p("ngIf",r.message.source),a(),p("ngIf",r.message.lastMessageStatus==="read"),a(),p("ngIf",r.message.lastMessageStatus==="unread"))},dependencies:[He,ue,F,U,Qe,Eo,Ve,Cl,Fe,Je,ct,Ea,Xi,T],styles:['[_nghost-%COMP%]{display:block;align-self:flex-start}.own[_nghost-%COMP%], .own [_nghost-%COMP%]{align-self:flex-end}.message[_ngcontent-%COMP%]{display:flex;flex-direction:column}.message.own[_ngcontent-%COMP%]{margin-left:.625rem}.message.own[_ngcontent-%COMP%] .message-info[_ngcontent-%COMP%]{padding-right:3rem}.message.own[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{margin-left:.625rem}.message.own[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{background-color:#03c5e526;border-top-right-radius:0}.message.own[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]:after{left:100%;right:-5px;border-width:5px 5px 0 0;border-color:rgba(3,197,229,.15) transparent transparent transparent}.message.own[_ngcontent-%COMP%] .message-content-wrapper[_ngcontent-%COMP%]{flex-direction:row-reverse}.message[_ngcontent-%COMP%]:not(.own){margin-right:.625rem}.message[_ngcontent-%COMP%]:not(.own) .message-info[_ngcontent-%COMP%]{padding-left:3rem}.message[_ngcontent-%COMP%]:not(.own) .avatar[_ngcontent-%COMP%]{margin-right:.625rem}.message[_ngcontent-%COMP%]:not(.own) .content[_ngcontent-%COMP%]{border-top-left-radius:0}.message[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{--avatar-image-size: 2.375rem}.message[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;background-color:#fff;padding:.5rem .625rem;min-width:0;position:relative;border-radius:8px}.message[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]:after{content:"";display:block;position:absolute;
7left:-5px;top:0;background-color:transparent;width:0;height:0;border-style:solid;border-width:0 5px 5px 0;border-color:transparent white transparent transparent}.message[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] lib-message-text[_ngcontent-%COMP%]{position:relative;z-index:0;white-space:pre-wrap;overflow-wrap:break-word;-webkit-user-select:text;user-select:text;line-height:1.5;letter-spacing:.0275rem;word-break:break-word}.message[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .attachment[_ngcontent-%COMP%]:not([hidden]) + lib-message-text[_ngcontent-%COMP%]{margin-top:.5rem}.message[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .attachment-item[_ngcontent-%COMP%]:not(:last-of-type){margin-bottom:.5rem}.message[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .attachment-item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;max-height:calc(.7*(100vh - 100px))}.message[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .source[_ngcontent-%COMP%] .source-detail-link[_ngcontent-%COMP%]{display:flex;align-items:center;white-space:nowrap}.message[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .source[_ngcontent-%COMP%] .source-detail-link[_ngcontent-%COMP%] svg{width:1.7rem;height:1.7rem;margin-right:.3rem}.message-info[_ngcontent-%COMP%]{font-size:.625rem;line-height:18px;letter-spacing:.33px;display:flex;gap:.625rem}
7.message-info[_ngcontent-%COMP%] .participant-name[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.message-info[_ngcontent-%COMP%] .message-create-time[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0}.message-content-wrapper[_ngcontent-%COMP%]{display:flex}.message-status[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-right:3rem;font-size:10px;font-style:normal;font-weight:400;line-height:18px;letter-spacing:.333px}']});let n=e;return n})();var EP=()=>({name:"arrow-left",color:"#505050"});function FP(n,e){if(n&1&&(se(0),v(1,"lib-patient-view-header",9),le()),n&2){let t=g(3);a(),p("patient",t.oppositeParticipantPatient)("showExternalLink",t.showExternalLink)}}function LP(n,e){if(n&1&&(s(0,"div",10),v(1,"lib-avatar-image",11),l(),s(2,"div",12)(3,"span",13),f(4),l()()),n&2){let t=g(3);a(),p("src",t.oppositeParticipantProvider.image)("name",t.oppositeParticipantProvider.firstName),a(3),b(t.oppositeParticipantProvider.name)}}function DP(n,e){if(n&1){let t=S();s(0,"div",5,0)(2,"button",6),d(3,"translate"),P("click",function(){x(t);let o=g(2);return O(o.goBack())}),v(4,"lib-svg-icon",7),l(),C(5,FP,2,2,"ng-container",8)(6,LP,5,3,"ng-template",null,1,pe),l()}if(n&2){let t=V(1),i=V(7),o=g(2);Z("cordova-app",t.value),a(2),G("aria-label",u(3,6,"Back")),a(2),p("params",A(8,EP)),a(),p("ngIf",o.oppositeParticipantPatient)("ngIfElse",i)}}function BP(n,e){if(n&1&&(s(0,"lib-header-portal"),C(1,DP,8,9,"div",4),l()),n&2){let t=g();a(),p("ngIf",t.oppositeParticipantProvider||t.oppositeParticipantPatient)}}function RP(n,e){if(n&1){let t=S();s(0,"div",14)(1,"lib-message-thread-form",15),P("update",function(o){x(t);let r=g();return O(r.openThread(o))}),l()()}if(n&2){let t=g();a(),p("create",t.createRequest)}}var ap=(()=>{let e=class e{constructor(i,o,r,c,m,_,M){this.router=i,this.activatedRoute=o,this.currentUserService=r,this.messageService=c,this.patientDataService=m,this.patientApiService=_,this.pageHeaderService=M,this.patientId=this.activatedRoute.parent?.parent?.parent?.snapshot.params.patientId,this.isOnPatientView=!!this.patientId,this.showExternalLink=!this.activatedRoute.snapshot.data.hideExternalLink}ngOnInit(){this.currentUserService.getAccountData().subscribe(i=>{let o=this.activatedRoute.snapshot.queryParams;this.setCreateRequest(o,i),this.isOnPatientView||this.setOppositeParticipant(o,i)})}setCreateRequest(i,o){this.createRequest={text:"",type:"common",subject:"common",clinicUuid:i.clinicUuid,participantList:[{participantId:Number(i.participantId),participantType:i.participantType},{participantId:o.memberId,participantType:o.memberType}]}}setOppositeParticipant(i,o){i.patientId?this.patientDataService.currentPatient$.pipe(L(r=>bo(()=>!!r&&r.id===i.patientId,me(r),this.patientApiService.getPatient(i.clinicUuid??"",i.patientId??0))),sa()).subscribe(r=>this.oppositeParticipantPatient=r):(this.oppositeParticipantProvider={name:i.participantName,image:i.participantImage},o.memberType===Ue.USER&&this.pageHeaderService.setOppositeParticipant(this.oppositeParticipantProvider))}goBack(){this.activatedRoute.snapshot.queryParams.patientId?this.router.navigateByUrl("/provider/message/search-patient"):this.router.navigateByUrl("/provider/message/search-provider")}openThread(i){this.router.navigate([`../${i.threadId}`],{relativeTo:this.activatedRoute}),this.messageService.refreshThreadList()}};e.\u0275fac=function(o){return new(o||e)(h(B),h(j),h(bt),h(ao),h(Ri),h(Ba
7),h(Ra))},e.\u0275cmp=w({type:e,selectors:[["lib-thread-create"]],standalone:!1,decls:2,vars:2,consts:[["isCordovaApp","isCordovaApp"],["participantProviderTemplate",""],[4,"ngIf"],["class","thread-wrapper",4,"ngIf"],["class","header-wrapper","libIsCordovaApp","",3,"cordova-app",4,"ngIf"],["libIsCordovaApp","",1,"header-wrapper"],["type","button",1,"back-button",3,"click"],[3,"params"],[4,"ngIf","ngIfElse"],[3,"patient","showExternalLink"],[1,"picture"],["size","2rem",3,"src","name"],[1,"text-wrap"],[1,"text"],[1,"thread-wrapper"],[3,"update","create"]],template:function(o,r){o&1&&C(0,BP,2,1,"lib-header-portal",2)(1,RP,2,1,"div",3),o&2&&(p("ngIf",!r.isOnPatientView),a(),p("ngIf",r.createRequest))},dependencies:[F,U,lo,Ve,zo,ms,$n,T],styles:[".header-wrapper[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center;justify-content:center;width:100%}.header-wrapper.cordova-app[_ngcontent-%COMP%] .picture[_ngcontent-%COMP%]{margin-left:4.1rem}.header-wrapper.cordova-app[_ngcontent-%COMP%] .text-wrap[_ngcontent-%COMP%]{margin-right:4.1rem}.header-wrapper[_ngcontent-%COMP%] .picture[_ngcontent-%COMP%]{margin-left:76px;margin-right:.625rem}.header-wrapper[_ngcontent-%COMP%] .text-wrap[_ngcontent-%COMP%]{margin-right:76px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:calc(1rem - 1px);letter-spacing:.015rem}.header-wrapper[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{position:absolute;background:none;cursor:pointer;top:50%;transform:translateY(-50%);left:1rem}.header-wrapper[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%] svg{width:1.4rem;height:1.4rem}[_nghost-%COMP%]{display:block;height:100%;width:100%}.thread-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:auto;flex:1;height:100%}.thread-wrapper[_ngcontent-%COMP%] .thread-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;flex:.75;overflow:hidden;overflow-y:scroll}.thread-wrapper[_ngcontent-%COMP%] .thread-view[_ngcontent-%COMP%] .load-more[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:1rem}.thread-wrapper[_ngcontent-%COMP%] .thread-view[_ngcontent-%COMP%] .thread-message[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:.7rem;font-size:.8rem}.thread-wrapper[_ngcontent-%COMP%] lib-message-thread-form[_ngcontent-%COMP%]{display:flex;flex:1}"]});let n=e;return n})();var UP=["messageList"],qP=n=>({value:n}),zP=n=>({participantId:n});function jP(n,e){if(n&1){let t=S();s(0,"button",7),P("click",function(){x(t);let o=g();return O(o.loadMessagesSavingScroll())}),f(1),d(2,"translate"),l()}n&2&&(a(),y(" ",u(2,1,"Load More")," "))}function WP(n,e){n&1&&(s(0,"span",9),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Swipe up to refresh")," "))}function QP(n,e){if(n&1&&(se(0),C(1,WP,3,3,"span",8),le()),n&2){g();let t=V(3),i=V(8);a(),p("ngIf",t.canBePerformed)("ngIfElse",i)}}function GP(n,e){if(n&1){let t=S();s(0,"button",10),P("click",function(){x(t);let o=g();return O(o.refreshMessages())}),f(1),d(2,"translate"),l()}n&2&&(a(),y(" ",u(2,1,"Click to refresh")," "))}function HP(n,e){if(n&1&&(s(0,"div",14),f(1),d(2,"applyTimezone"),d(3,"c4uDate"),l()),n&2){let t=g(2).$implicit,i=g();a(),y(" ",D(3,4,D(2,1,t.createdAt,i.userTimezone),"appointment_date")," ")}}function $P(n,e){if(n&1){let t=S();s(0,"lib-message-item",15),P("updated",function(o){x(t);let r=g(3);return O(r.updateMessageList(o))})("imageLoaded",function(){x(t);let o=g(3);return O(o.onImageLoaded())}),l()}if(n&2){let t=e.ngIf,i=g(2).$implicit,o=g();p("message",i)("participant",t)("userTimezone",o.userTimezone)}}function KP(n,e){if(n&1&&(se(0),C(1,HP,4,7,"div",12)(2,$P,1,3,"lib-message-item",13),d(3,"findByProps"),le()),n&2){let t=e.ngIf,i=g().$implicit,o=g();a(),p("ngIf",t.value),a(),p("ngIf",D(3,2,o.activeThread.participantList,ce(5,zP,i.partThreadId)))}}function YP(n,e){if(n&1&&(s(0,"div",11),C(1,KP,4,7,"ng-container",4),d(2,"showMessageDate"),l()),n&2){let t=e.$implicit,i=e.index,o=g();a(),p("ngIf",ce(5,qP,io(2,1,t,o.activeThread.messageList[i-1],o.userTimezone)))}}function XP(n,e){if(n&1){let t=S();s(0,"lib-message-thread-form",16),P("click",function(){x(t);let o=g();return O(o.scrollListToBottom())})("update",function(o){x(t);let r=g();return O(r.updateMessageList(o))}),l()}if(n&2){let t=g();p("isEmbedded",t.isEmbedded)("activeThread",t.activeThread)("threadId",t.messageListRequestParam
7s.threadId)}}var yl=(()=>{let e=class e{constructor(i,o,r,c,m){this.providerDataService=i,this.threadService=o,this.currentUserService=r,this.appConfig=c,this.newItemsCountApiService=m,this.previousScrollHeight=0,this.accountData$=this.currentUserService.getAccountData(),this.isEmbedded=!1,this.threadLoaded=new he,this.showLoadMoreOption=!1,this.isRoleProvider=this.appConfig.defaultUserRole===Ut.PROVIDER}ngOnInit(){this.refreshMessages()}ngAfterViewInit(){this.keyManager=new Ia(this.messageItems).withWrap()}onKeydown(i){i.key==="PageUp"&&this.showLoadMoreOption?this.loadMessagesSavingScroll():this.keyManager.onKeydown(i)}refreshMessages(){this.messageListRequestParams={page:0,count:10,threadId:this.threadId},this.previousScrollHeight=0,this.activeThread=null,this.loadMessages()}onImageLoaded(){this.messageListRequestParams.page===1&&this.scrollListToBottom()}loadMessagesSavingScroll(){this.previousScrollHeight=this.messageListContainer.nativeElement?.scrollHeight??0,this.loadMessages()}setupLastMessage(){let i,o;i=o={messageId:0,createdAtUnix:null,isLast:null,isOwner:null,isRead:null,partThreadId:null,source:null},this.activeThread.messageList.forEach(r=>{r.isOwner&&r.isRead&&r.messageId>i.messageId&&(i=r),r.isOwner&&!r.isRead&&r.messageId>o.messageId&&(o=r)}),o.lastMessageStatus="unread",i.lastMessageStatus="read"}scrollListToPrevPosition(){this.messageListContainer&&this.setScrollTop(this.messageListContainer.nativeElement.scrollHeight-this.previousScrollHeight)}updateMessageList(i){let o=this.activeThread.messageList.findIndex(({messageId:r})=>r===i.messageId);o===-1?(this.activeThread.messageList=[...this.activeThread.messageList,i],this.getMessageParticipant(i)||this.accountData$.subscribe(r=>{let c={name:r.name,participantType:r.memberType,participantId:r.memberId,image:r.image,firstName:r.firstName};this.activeThread.participantList=[...this.activeThread.participantList,c]})):!i.text&&!i.attachments?.length?this.activeThread.messageList.splice(o,1):this.activeThread.messageList[o]=i,this.setupLastMessage(),this.scrollListToBottom()}scrollListToBottom(){setTimeout(()=>this.setScrollTop(this.messageListContainer?.nativeElement.scrollHeight))}
7loadMessages(){++this.messageListRequestParams.page,Ft([this.threadService.getMessageList(this.messageListRequestParams),this.accountData$]).pipe(ne(([i,o])=>{this.updateThreadDependingValues(i,o),this.threadLoaded.emit({thread:this.activeThread,user:o})}),Wi(0)).subscribe(()=>this.scrollListToPrevPosition())}setScrollTop(i){this.messageListContainer?.nativeElement&&(this.messageListContainer.nativeElement.scrollTop=i??0)}markRead(){this.threadService.markRead(this.messageListRequestParams.threadId??0).pipe(ge(()=>this.isRoleProvider),L(()=>this.providerDataService.getCurrentClinicUuid()),L(i=>this.newItemsCountApiService.getNewMessagesCount(i))).subscribe(i=>this.threadService.setUnreadMessageCount(i))}updateThreadDependingValues(i,o){this.userTimezone=o.timezone,this.showLoadMoreOption=i.messageList.reduce((r,{attachments:c})=>r+(c?.length||1),0)>=this.messageListRequestParams.count,this.activeThread&&(i.messageList=i.messageList.concat(this.activeThread.messageList),i.participantList=this.activeThread.participantList),i.messageList.sort((r,c)=>r.messageId-c.messageId),this.activeThread=i,this.setupLastMessage(),this.markRead()}getMessageParticipant(i){return this.activeThread.participantList.find(o=>i.partThreadId===o.participantId)}};e.\u0275fac=function(o){return new(o||e)(h(Ni),h(Gt),h(bt),h("APP_CONFIG"),h(Qd))},e.\u0275cmp=w({type:e,selectors:[["lib-thread-view-content"]],viewQuery:function(o,r){if(o&1&&(ft(UP,5),ft(Fn,5)),o&2){let c;ht(c=_t())&&(r.messageListContainer=c.first),ht(c=_t())&&(r.messageItems=c)}},hostBindings:function(o,r){o&1&&P("keydown",function(m){return r.onKeydown(m)})},inputs:{threadId:"threadId",isEmbedded:[2,"isEmbedded","isEmbedded",Qi]},outputs:{threadLoaded:"threadLoaded"},standalone:!1,decls:11,vars:7,consts:[["messageList","","isAtTheBottom","isAtThePosition","swipeAction","swipeAction"],["clickRefreshTpl",""],["libIsAtThePosition","bottom","libSwipeAction","","tabindex","0",1,"thread-view","keyboard-only-focus",3,"swipeUp"],["type","button","class","load-more",3,"click",4,"ngIf"],[4,"ngIf"],["class","thread-message",4,"ngFor","ngForOf"],[3,"isEmbedded","activeThread","threadId","click","update",4,"ngIf"],["type","button",1,"load-more",3,"click"],["class","refresh-hint",4,"ngIf","ngIfElse"],[1,"refresh-hint"],["type","button",1,"refresh-hint","clickable",3,"click"],[1,"thread-message"],["class","date","libFocusable","",4,"ngIf"],["libFocusable","",3,"message","participant","userTimezone","updated","imageLoaded",4,"ngIf"],["libFocusable","",1,"date"],["libFocusable","",3,"updated","imageLoaded","message","participant","userTimezone"],[3,"click","update","isEmbedded","activeThread","threadId"]],template:function(o,r){if(o&1){let c=S();s(0,"div",2,0),d(4,"translate"),P("swipeUp",function(){return x(c),O(r.refreshMessages())}),C(5,jP,3,3,"button",3)(6,QP,2,2,"ng-container",4)(7,GP,3,3,"ng-template",null,1,pe)(9,YP,3,7,"div",5),l(),C(10,XP,1,3,"lib-message-thread-form",6)}if(o&2){let c=V(2);G("aria-label",u(4,5,"Message List")),a(5),p("ngIf",r.showLoadMoreOption),a(),p("ngIf",c.value),a(3),p("ngForOf",r.activeThread==null?null:r.activeThread.messageList),a(),p("ngIf",r.activeThread)}},dependencies:[ue,F,Ha,Ro,Fn,$n,rp,Je,ct,Od,T,bd],styles:["[_nghost-%COMP%]{--thread-view-background-color: #f5f5f5;width:100%;display:flex;flex-direction:column;overflow:auto;position:relative;z-index:0;background-color:var(--thread-view-background-color)}.has-header[_nghost-%COMP%] .thread-view[_ngcontent-%COMP%]{padding-top:2.25rem}.has-header[_nghost-%COMP%] .refresh-hint[_ngcontent-%COMP%]{top:2.75rem}.refresh-hint[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translate(-50%);z-index:1;padding:.625rem .875rem;background-color:#fff;border:0;font-family:Roboto-bold,sans-serif;font-size:.875rem;color:inherit;box-shadow:0 .25rem .25rem #80808040;border-radius:2rem}.refresh-hint.clickable[_ngcontent-%COMP%]{cursor:pointer}.thread-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem .625rem;flex:1;overflow:hidden;overflow-y:auto}.thread-view[_ngcontent-%COMP%] .load-more[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%;padding:1rem;border:0;background:none;color:inherit;font:inherit;cursor:pointer}.thread-view[_ngcontent-%COMP%] .thread-message[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:.625rem}.thread-view[_ngcontent-%COMP%] .thread-message[_ngcontent-%COMP%]:first-of-type{flex-grow:1;display:flex;flex-direction:column;justify-content:flex-end}.thread-view[_ngcontent-%COMP%] .thread-message[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{display:flex;justify-content:center;font-size:.625rem;line-height:1.125rem;letter-spacing:.33px}lib-message-thread-form[_ngcontent-%COMP%]{display:flex;box-shadow:0 -2px 4px #0000001a;z-index:1;background-color:#fff}"]});let n=e;return n})();var ZP=()=>({name:"arrow-left",color:"#505050"});function JP(n,e){if(n&1&&v(0,"lib-patient-view-header",12),n&2){let t=g(4);p("patient",t.patient)("showExternalLink",t.showExternalLink)}}function eM(n,e){if(n&1&&(se(0),C(1,JP,1,2,"lib-patient-view-header",11),le()),n&2){let t=g(3);a(),p("ngIf",t.patient)}
7}function tM(n,e){if(n&1&&(s(0,"div",13),v(1,"lib-avatar-image",14),l(),s(2,"div",15)(3,"span",16),f(4),l()()),n&2){let t=g(3);a(),p("src",t.oppositeParticipant.image)("name",t.oppositeParticipant.firstName||t.oppositeParticipant.name),a(3),b(t.oppositeParticipant.name)}}function iM(n,e){if(n&1){let t=S();s(0,"div",7,0)(2,"button",8),d(3,"translate"),P("click",function(){x(t);let o=g(2);return O(o.goBack())}),v(4,"lib-svg-icon",9),l(),C(5,eM,2,1,"ng-container",10)(6,tM,5,3,"ng-template",null,1,pe),l()}if(n&2){let t=V(1),i=V(7),o=g(2);Z("cordova-app",t.value),a(2),G("aria-label",u(3,6,"Back")),a(2),p("params",A(8,ZP)),a(),p("ngIf",o.oppositeParticipant.participantType===o.ParticipantTypeEnum.USER)("ngIfElse",i)}}function nM(n,e){if(n&1&&(s(0,"lib-header-portal"),C(1,iM,8,9,"div",6),l()),n&2){let t=g();a(),p("ngIf",t.oppositeParticipant)}}function oM(n,e){if(n&1&&(s(0,"header",17)(1,"span"),f(2),l()()),n&2){let t,i=g();a(2),y("",(t=i.getPrimaryParticipant(i.activeThread,i.ParticipantTypeEnum.DOCTOR))==null?null:t.name,"\u2019s Inbox")}
7}var sp=(()=>{let e=class e{constructor(i,o,r,c,m,_,M,I){this.providerDataService=i,this.patientDataService=o,this.activatedRoute=r,this.threadService=c,this.pageHeaderService=m,this.demographicsApiService=_,this.location=M,this.appConfig=I,this.patientId=this.activatedRoute.parent?.parent?.parent?.snapshot.params.patientId,this.threadId=this.activatedRoute.snapshot.params.threadId,this.isRoleProvider=this.appConfig.defaultUserRole===Ut.PROVIDER,this.isOnPatientView=!!this.patientId,this.ParticipantTypeEnum=Ue,this.showExternalLink=!this.activatedRoute.snapshot.data.hideExternalLink}ngOnInit(){this.isOnPatientView=!!this.patientId}goBack(){this.location.back()}get showHeader(){return this.activeThread&&this.isRoleProvider&&!this.isOnPatientView}onThreadLoad(i){this.isOnPatientView||this.setHeader(i.thread,i.user),this.activeThread=i.thread}setHeader(i,o){o.memberType===Ue.DOCTOR?(this.oppositeParticipant=this.getPrimaryParticipant(i,Ue.USER)??this.threadService.getAnotherPrimaryParticipantProvider(i,o),this.oppositeParticipant.participantType===Ue.USER&&this.providerDataService.getCurrentClinicUuid().pipe(L(r=>this.demographicsApiService.getClinicUserDetails(r,this.oppositeParticipant.participantId).pipe(L(({patientId:c})=>this.patientDataService.getPatientData(r,c))))).subscribe(r=>this.patient=r)):(this.oppositeParticipant=this.threadService.getOppositePrimaryParticipant(i,Ue.USER),this.pageHeaderService.setOppositeParticipant(this.oppositeParticipant))}getPrimaryParticipant(i,o){return this.threadService.getPrimaryParticipant(i,o)}};e.\u0275fac=function(o){return new(o||e)(h(Ni),h(Ri),h(j),h(Gt),h(Ra),h(Bn),h(So),h("APP_CONFIG"))},e.\u0275cmp=w({type:e,selectors:[["lib-thread-view"]],standalone:!1,decls:4,vars:5,consts:[["isCordovaApp","isCordovaApp"],["participantTemplate",""],[4,"ngIf"],[1,"thread-wrapper"],["class","thread-header",4,"ngIf"],[3,"threadLoaded","threadId"],["class","header-wrapper","libIsCordovaApp","",3,"cordova-app",4,"ngIf"],["libIsCordovaApp","",1,"header-wrapper"],["type","button",1,"back-button",3,"click"],[3,"params"],[4,"ngIf","ngIfElse"],[3,"patient","showExternalLink",4,"ngIf"],[3,"patient","showExternalLink"],[1,"picture"],[3,"src","name"],[1,"text-wrap"],[1,"text"],[1,"thread-header"]],template:function(o,r){o&1&&(C(0,nM,2,1,"lib-header-portal",2),s(1,"div",3),C(2,oM,3,1,"header",4),s(3,"lib-thread-view-content",5),P("threadLoaded",function(m){return r.onThreadLoad(m)}),l()()),o&2&&(p("ngIf",!r.isOnPatientView),a(2),p("ngIf",r.showHeader),a(),Z("has-header",r.showHeader),p("threadId",r.threadId))},dependencies:[F,U,lo,Ve,zo,ms,yl,T],styles:[".header-wrapper[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center;justify-content:center;width:100%}.header-wrapper.cordova-app[_ngcontent-%COMP%] .picture[_ngcontent-%COMP%]{margin-left:4.1rem}.header-wrapper.cordova-app[_ngcontent-%COMP%] .text-wrap[_ngcontent-%COMP%]{margin-right:4.1rem}.header-wrapper[_ngcontent-%COMP%] .picture[_ngcontent-%COMP%]{margin-right:.7rem;margin-left:76px;--avatar-image-size: 1.7rem}.header-wrapper[_ngcontent-%COMP%] .text-wrap[_ngcontent-%COMP%]{margin-right:76px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}button.back-button[_ngcontent-%COMP%]{position:absolute;background:none;cursor:pointer;top:50%;transform:translateY(-50%)}button.back-button[_ngcontent-%COMP%] svg{width:1.4rem;height:1.4rem}.back-button[_ngcontent-%COMP%]{left:1rem}[_nghost-%COMP%]{display:block;width:100%;height:100%}.thread-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:auto;flex:1;height:100%;position:relative;z-index:0;background-color:#80808014}.thread-wrapper[_ngcontent-%COMP%] .thread-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;text-align:center;position:absolute;top:0;left:0;height:2.25rem;width:100%;z-index:1;background-color:#ffffffe6;font-size:.875rem;letter-spacing:.0275rem;border-bottom:1px solid rgba(80,80,80,.15);box-sizing:border-box;padding:0 1rem}.thread-wrapper[_ngcontent-%COMP%] .thread-header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.5rem}lib-thread-view-content[_ngcontent-%COMP%]{height:100%}"]});let n=e;return n})();var g0=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({providers:[Fa],imports:[In,Nn,Bs,Cr,ti,gs,vs,ts,op,Xl,Or]});let n=e;return n})();var u0=(()=>{let e=class e{constructor(){setTimeout(()=>{document.getElementsByTagName("router-outlet")[0]||window.location.reload()},100)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e,bootstrap:[Ko]}),e.\u0275inj=we({imports:[no,zu,Ht,Xc,g0,Zc,Mo,s0,ti,Nu,Um,Au,uo,Ht,Xc,Zc,Mo,no]});let n=e;return n})();ri();var aM=()=>["medication"],sM=()=>["allergy"],lM=()=>["allergy","medication","score"];function cM(n,e){n&1&&v(0,"app-questionnaire-form-medication")}function pM(n,e){n&1&&v(0,"app-questionnaire-form-allergy")}function dM(n,e){n&1&&v(0,"app-questionnaire-form-common")}function mM(n,e){if(n&1&&(s(0,"div",1),C(1,cM,1,0,"app-questionnaire-form-medication",2),d(2,"includes"),C(3,pM,1,0,"app-questionnaire-form-allergy",2),d(4,"includes"),C(5,dM,1,0,"app-questionnaire-form-common",2),d(6,"includes"),l()),n&2){let t=g();a(),p("ngIf",D(2,3,A(12,aM),t.form.type)),a(2),p("ngIf",D(4,6,A(13,sM),t.form.type)),a(2),p("ngIf",!D(6,9,A(14,lM),t.form.type))}}var yn,fi=(yn=class{constructor(e,t,i,o,r,c,m,_,M,I,k){this.activeRoute=e,this.router=t,this.dataService=i,this.questionnaireService=o,this.questionnaireApiService=r,this.taskService=c,this.translateService=m,this.checkInFlowService=_,this.onFlyTasksFlowService=M,this.configService=I,this.clinicApiService=k,this.redirectTaskService=fe(mt),this.activeRoute.queryParams.pipe(Le(this)).subscribe(R=>{this.clinicUuid=R.clinicUuid?R.clinicUuid:void 0,this.appointmentId=R.appointmentId?Number(R.appointmentId):void 0,this.questionId=R.questionId?Number(R.questionId):void 0,this.formId=this.formId||this.dataService.formId,this.resetQuestionData(),this.router.url.includes("questionId")||this.dataService.clearForm(),this.dataService.activeForm.pipe(ne(N=>{N||this.getFormSource(R)}),ge(Boolean),Wi(0),Le(this)).subscribe(N=>{this.form=N,this.prepareViewQuestion()}),this.activeRoute.params.pipe(Le(this)).subscribe(N=>{Number(N.formId)!==this.formId&&this.getForm(N,R)})})}ngOnInit(){this.dataService.updateNextButtonStatus(!0),this.configService.setTitle(this.taskService.getActiveTask()?.todo?.category?.title)}loadForm(){let e=this.translateService.getLanguage(),t={clinicUuid:this.clinicUuid,appointmentId:this.appointmentId};e&&(t.language=e),this.questionnaireApiService.getByInputParams(this.formId,t).subscribe({next:i=>{i.type=i.groupList?i.type:Hp.SCORE,this.dataService.language=e,this.dataService.appointmentId=this.appointmentId,this.dataService.updateForm(i),this.dataService.activeFormStorage.next(i)},error:()=>this.redirectTaskService.navigate([this.redirectTaskService.getBaseQuestionnaireUrl(),"unavailable"])})}refreshQuestionListInGroupList(e){}resetQuestionData(){this.totalActiveQuestions=0,this.viewQuestionOrder=1,this.viewQuestion=void 0,this.prevRouteParam
7s=void 0,this.nextRouteParams=void 0}prepareViewQuestionAdditional(){}prepareViewQuestion(){let e=this.questionnaireService.getGroupListByForm(this.form,!0);this.refreshQuestionListInGroupList(e),this.resetQuestionData(),this.questionnaireService.forEachQuestionInGroupList(e,t=>{this.totalActiveQuestions++,!t.isExcluded&&(this.viewQuestion&&!this.nextRouteParams&&(this.nextRouteParams={clinicUuid:this.clinicUuid,appointmentId:this.appointmentId,questionId:t.id}),t.fieldList||(t.fieldList=[]),this.questionId||(this.questionId=t.id),t.id===this.questionId&&(this.viewQuestion=t,this.questionId=t.id,this.primaryField=this.questionnaireService.selectPrimaryField(t.fieldList),this.primaryField&&this.questionnaireService.updateField(this.primaryField,!0),this.viewQuestionOrder=this.totalActiveQuestions),this.viewQuestion||(this.prevRouteParams={clinicUuid:this.clinicUuid,appointmentId:this.appointmentId,questionId:t.id}))}),this.dataService.indexOfLastQuestion=e.flatMap(({questionList:t})=>t).map(({isExcluded:t})=>!t).lastIndexOf(!0),this.prepareViewQuestionAdditional()}isNextButtonLocked(){return this.dataService.isNextButtonLocked()}isFormDataBeingSent(){return this.dataService.isFormSending.getValue()}getFormSource(e){this.activeRoute.params.pipe(Le(this)).subscribe(t=>this.getForm(t,e))}getForm(e,t={}){let i=this.dataService.activeFormStorage.value,o=this.translateService.getLanguage();this.questionId=t.questionId?Number(t.questionId):void 0,this.formId=Number(e.formId),this.dataService.formId=this.formId,i&&i.id===this.formId&&this.dataService.appointmentId===this.appointmentId&&o===this.dataService.language?this.dataService.updateForm(i):this.loadForm()}saveHHForm(e){if(this.onFlyTasksFlowService.isOnFlyTasksFlow()){this.saveFormAndCompleteOnFlyTask();return}let t=this.taskService.getActiveTask(),i={clinicUuid:this.clinicUuid,appointmentId:this.appointmentId};e||this.dataService.updateFormSendingStatus(!0),this.questionnaireService.prepareFormForSave(this.form);let o,r,c=t;if(t.category?.action===Ql.ENCOUNTER_REASON){if(this.dataService.formList=this.dataService.formList.filter(m=>this.form.id!==m.formId),this.dataService.formList.push({formId:this.form.id,form:this.form}),this.dataService.isNextFormAvailable()){this.dataService.redirectToNextForm(),this.dataService.updateFormSendingStatus(!1);return}o=this.questionnaireApiService.saveFormListAndCompleteSettingTask(this.dataService.formList,t.id,t.todo.source.appointment_id),r=()=>(c.isDone=!0,this.taskService.setActiveTask(c),c)}else t.isDone?(o=this.questionnaireApiService.saveForm(this.form,i),r=()=>t):t.valueType===Ql.FORM_DOCUMENT?(o=this.questionnaireApiService.saveFormDocumentFormAndCompleteSettingTask(this.form,c.clinicUuid,c.source.appointment.id,c.settingId,c.actions[0].value[0]),r=()=>(c.isDone=!0,this.taskService.setActiveTask(c),c)):this.checkInFlowService.isCheckInAppFlow()?(o=c.source?.appointment?this.questionnaireApiService.saveFormAndCompleteSettingTask(this.form,c.settingId,c.source.appointment.id):this.questionnaireApiService.saveFormAndCompleteOnFlyTask(this.form,this.clinicUuid,c.settingId),r=()=>(c.isDone=!0,this.taskService.setActiveTask(c),c)):(o=this.questionnaireApiService.saveFormAndCompleteTask(this.form,t,i),r=m=>this.taskService.activateTaskAsCompleted(t,m));o.subscribe(m=>{let _=r(m);this.dataService.updateFormSendingStatus(!1),e?this.dataService.redirectToNextForm():this.checkInFlowService.isCheckInAppFlow()?this.checkInFlowService.moveForwardFromCompletedTask(_):this.taskService.redirectToTaskAction(_,!1)},()=>this.dataService.updateFormSendingStatus(!1))}saveFormAndCompleteOnFlyTask(){let e=this.taskService.getActiveTask();this.questionnaireApiService.saveFormAndCompleteOnFlyTask(this.form,this.clinicUuid,e.settingId).subscribe(()=>{this.dataService.updateFormSendingStatus(!1),this.onFlyTasksFlowService.completeCurrentTask(),this.onFlyTasksFlowService.goToFirstIncompleteTask(this.clinicUuid,e.userId)})}clearBaseData(){this.appointmentId=void 0,this.clinicUuid=void 0,this.form=void 0,this.formId=void 0,this.questionId=void 0,this.primaryField=void 0,this.viewQuestion=void 0}}
7,yn.\u0275fac=function(t){return new(t||yn)(h(j),h(B),h(zt),h(Et),h(Do),h(mt),h(qt),h(St),h(zn),h(oe),h(Te))},yn.\u0275cmp=w({type:yn,selectors:[["app-questionnaire-form-main"]],standalone:!1,decls:1,vars:1,consts:[["class","wrap",4,"ngIf"],[1,"wrap"],[4,"ngIf"]],template:function(t,i){t&1&&C(0,mM,7,15,"div",0),t&2&&p("ngIf",i.form)},styles:["[_nghost-%COMP%]{display:flex;height:100%}.wrap[_ngcontent-%COMP%]{display:flex;flex:1;flex-direction:column;align-items:center;width:100%}.wrap[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{height:100%;width:100%}"]}),yn);fi=Xe([et(),ut("design:paramtypes",[j,B,zt,Et,Do,mt,qt,St,zn,oe,Te])],fi);var f0=(()=>{let e=class e{constructor(i,o,r){this.redirectTaskService=i,this.checkInFlowService=o,this.onFlyTasksFlowService=r}ngOnInit(){this.task=this.redirectTaskService.getActiveTask()}continue(){this.onFlyTasksFlowService.isOnFlyTasksFlow()?this.onFlyTasksFlowService.markTaskAsDoneAndMoveForward(this.task):this.checkInFlowService.isCheckInAppFlow()?this.checkInFlowService.markCheckInFlowTaskAsDoneAndGoToNext(this.task):this.redirectTaskService.completeTaskAndSetItActive(this.task,!0).subscribe(()=>this.redirectTaskService.gotoSuccessPage())}};e.\u0275fac=function(o){return new(o||e)(h(mt),h(St),h(zn))},e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-unavailable"]],standalone:!1,decls:12,vars:9,consts:[[1,"task-panel"],[1,"task-panel-header"],[1,"title"],[1,"task-panel-body"],["type","button",1,"task-panel-button",3,"click"]],template:function(o,r){o&1&&(s(0,"div",0)(1,"div",1)(2,"h1",2),f(3),d(4,"translate"),l()(),s(5,"div",3)(6,"p"),f(7),d(8,"translate"),l(),s(9,"button",4),P("click",function(){return r.continue()}),f(10),d(11,"translate"),l()()()),o&2&&(a(3),b(u(4,3,"Form Unavailable")),a(4),b(u(8,5,"It looks like this form is no longer available. Please continue with your next task.")),a(3),y(" ",u(11,7,"CONTINUE")," "))},dependencies:[T],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{height:100%;background-color:#f5f5f5;font-size:16px}.task-panel[_ngcontent-%COMP%]{background-color:#f5f5f5;border-radius:0;width:100%}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{padding:1.5rem 0 1.25rem;height:unset}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:0}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding-top:0}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-align:center}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{margin:2rem auto 1rem;background-color:var(--branding-primary-color, #064060)}"],changeDetection:0});let n=e;return n})();var pt=(()=>{let e=class e{constructor(i){this.questionnaireService=i,this.isViewTemplateCollapsed=!1}parseAnswer(i){}ngOnInit(){(!this.primaryField||this.primaryField.fieldId===this.field.fieldId)&&this.questionnaireService.updateField(this.field)}isFieldWithLabel(){return this.field.label&&this.field.label.length>0}applyAnswer(i){this.parseAnswer(i);let o=this.primaryField?[this.primaryField,!0]:[this.field,!1];this.questionnaireService.updateField(...o)}isDescriptionVisible(){let i=!1;if(this.question&&this.question.description){let o=0;i=!0;for(let r of this.question.fieldList){if(r.fieldId===this.field.fieldId){o>0&&(i=!1);break}o++}}return i}};e.\u0275fac=function(o){return new(o||e)(h(Et))},e.\u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{field:"field",question:"question",extendClass:"extendClass",desc:"desc",primaryField:"primaryField",isViewTemplateCollapsed:"isViewTemplateCollapsed"},standalone:!1,decls:0,vars:0,template:function(o,r){},encapsulation:2});let n=e;return n})();function gM(n,e){if(n&1){let t=S();s(0,"label",2)(1,"input",3),P("change",function(){let o=x(t).$implicit,r=g();return O(r.applyAnswer(o))}),l(),v(2,"span",4),s(3,"strong",5),f(4),d(5,"translate"),l()()}if(n&2){let t=e.$implicit,i=g();a(),p("checked",i.isChosenVariant(t)),a(3),y(" ",u(5,2,t.title||t.name)," ")}}var Pl=(()=>{let e=class e extends pt{parseAnswer(i){this.field.answer=this.field.answer||[];let o=this.field.answer.indexOf(i.id);o>-1?this.field.answer.splice(o,1):this.field.answer.push(i.id)}isChosenVariant(i){return this.questionnaireService.isVariantInFieldAnswer(i,this.field.answer)}};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-checkbox-simple"]],standalone:!1,features:[Y],decls:3,vars:4,consts:[[1,"field"],["class","element",4,"ngFor","ngForOf"],[1,"element"],["type","checkbox",1,"checkbox",3,"change","checked"],[1,"mark"],[1,"label"]],template:function(o,r){o&1&&(s(0,"div",0),C(1,gM,6,4,"label",1),d(2,"sortAscByProp"),l()),o&2&&(a(),p("ngForOf",D(2,1,r.field.variantList,"order")))},dependencies:[ue,T,Oi],styles:['.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;background-color:#fff;border-radius:8px;padding:var(--field-controls-vertical-padding, 2rem) var(--field-controls-horizontal-padding, 1.25rem);gap:2rem}.element[_ngcontent-%COMP%]{display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;width:100%;margin:2rem auto;text-align:left;align-items:inherit;margin:0}.element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{height:2.5rem;width:2.5rem;background-color:"transparent";border:1px solid #e6e6e6;margin:0 1rem;flex:.15}.element[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:.85}.element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.element[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .element[_ngcontent-%COMP%] input[type=checkbox].checked[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{margin-left:.7rem;margin-top:.1rem;width:1rem;height:1.4rem;border:solid var(--branding-primary-color);border-width:0 .3rem .3rem 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.element[_ngcontent-%COMP%] input[type=checkbox].checked[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%], .element[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]{background-color:var(--branding-primary-color);border-color:var(--branding-primary-color)}.element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{width:1.1rem;height:1.1rem;flex:inherit;border-color:#949494;border-radius:.3rem;margin:0 1rem 0 0}.element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{margin-top:.13rem;margin-left:.33rem;width:.3rem;height:.5rem;border-width:0 .15rem .15rem 0;border-color:#fff}.element[_ngcontent-%COMP%] .mark.disabled[_ngcontent-%COMP%]{opacity:.6}.element[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{line-height:1.2rem}.element[_ngcontent-%COMP%] .label.disabled[_ngcontent-%COMP%]{opacity:.6}@media(min-width:700px){.field[_ngcontent-%COMP%]{padding:var(--field-controls-vertical-padding, 2rem) var(--field-controls-horizontal-padding-medium, 2.5rem)}}']});let n=e;return n})();var uM=()=>({name:"plus",color:"#064060"}),fM=()=>({name:"search-new",color:"#949494"});function hM(n,e){n&1&&(s(0,"div",10),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"You do not currently have any allergies on file. You can add allergies via the buttons below, simply tap Submit if you do not have any allergies.")," "))}function _M(n,e){if(n&1&&v(0,"app-questionnaire-field-checkbox-simple",12),n&2){let t=e.$implicit;p("field",t)}}function CM(n,e){if(n&1&&(s(0,"div")(1,"div",10),f(2),d(3,"translate"),l(),C(4,_M,
71,1,"app-questionnaire-field-checkbox-simple",11),d(5,"asFieldTypeArray"),l()),n&2){let t=g(2);a(2),y(" ",u(3,2,"Please uncheck any allergies that are no longer relevant or add any new allergies")," "),a(2),p("ngForOf",u(5,4,t.viewQuestion.fieldList))}}function vM(n,e){if(n&1){let t=S();s(0,"div",3)(1,"app-header-title-update"),f(2),d(3,"translate"),l(),s(4,"h1",4),f(5),d(6,"translate"),l(),C(7,hM,3,3,"div",5)(8,CM,6,6,"div",6),s(9,"button",7),P("click",function(){x(t);let o=g();return O(o.saveHHForm(!1))}),f(10),d(11,"translate"),l(),s(12,"button",8),P("click",function(){x(t);let o=g();return O(o.togglePage())}),v(13,"lib-svg-icon",9),s(14,"span"),f(15),d(16,"translate"),l()()()}if(n&2){let t=g();a(2),b(u(3,8,"Allergies")),a(3),b(u(6,10,"Review Allergies")),a(2),p("ngIf",t.isListEmpty()===!0),a(),p("ngIf",t.isListEmpty()===!1),a(),p("disabled",t.isFormDataBeingSent()),a(),y(" ",u(11,12,"SUBMIT")," "),a(3),p("params",A(16,uM)),a(2),b(u(16,14,"ADD ALLERGY"))}}function yM(n,e){if(n&1){let t=S();s(0,"label",27)(1,"input",28),d(2,"translate"),P("click",function(){let o=x(t).$implicit,r=g(3);return O(r.addAllergy(o))}),l(),v(3,"span",29),s(4,"strong",30),f(5),l()()}if(n&2){let t=e.$implicit,i=g(3);p("for","checkbox-"+t.id),a(),p("id","checkbox-"+t.id)("checked",i.isAllergyChosen(t))("placeholder",u(2,6,"Enter here...")),a(3),G("aria-describedby","checkbox-"+t.id),a(),y(" ",t.name," ")}}function PM(n,e){if(n&1){let t=S();s(0,"fieldset",23)(1,"legend",10),f(2),d(3,"translate"),l(),s(4,"div",24),C(5,yM,6,8,"label",25),l(),s(6,"button",26),P("click",function(){x(t);let o=g(2);return O(o.togglePage())}),f(7),d(8,"translate"),l()()}if(n&2){let t=g(2);a(2),y(" ",u(3,3,"Choose the allergy you want to add:")," "),a(3),p("ngForOf",t.allergyList),a(2),y(" ",u(8,5,"SAVE")," ")}}function MM(n,e){n&1&&(s(0,"div",31)(1,"div",4),f(2),d(3,"translate"),l(),s(4,"div",10),f(5),d(6,"translate"),l()()),n&2&&(a(2),b(u(3,2,"Sorry...")),a(3),y(" ",u(6,4,"There are no results that match your search criteria. Please try an alternative search.")," "))}function bM(n,e){if(n&1){let t=S();s(0,"div",13)(1,"app-header-title-update"),f(2),d(3,"translate"),l(),s(4,"div",14)(5,"h1",4),f(6),d(7,"translate"),l(),s(8,"div",15),f(9),d(10,"translate"),l(),s(11,"div",16)(12,"input",17),d(13,"translate"),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.searchValue,o)||(r.searchValue=o),O(o)}),P("search",function(){x(t);let o=g();return O(o.searchAllergy())}),l(),s(14,"span",18)(15,"lib-svg-icon",19),P("click",function(){x(t);let o=g();return O(o.searchAllergy())}),l()()()(),C(16,PM,9,7,"fieldset",20)(17,MM,7,6,"div",21),s(18,"button",22),P("click",function(){x(t);let o=g();return O(o.togglePage())}),f(19),d(20,"translate"),l()()}if(n&2){let t=g();a(2),b(u(3,9,"Add allergies to list")),a(4),b(u(7,11,"Allergy Search")),a(3),y(" ",u(10,13,"Type in the name of your allergy")," "),a(3),p("placeholder",u(13,15,"Type here...")),ye("ngModel",t.searchValue),a(3),p("params",A(19,fM)),a(),p("ngIf",t.allergyList==null?null:t.allergyList.length),a(),p("ngIf",t.isSearchFinished&&(t.searchValue==null?null:t.searchValue.length)&&!(t.allergyList!=null&&t.allergyList.length)),a(2),y(" ",u(20,17,"BACK")," ")}}var _0=(()=>{let e=class e extends fi{constructor(i,o,r,c,m,_,M,I,k,R,N,W){super(i,o,r,c,m,_,M,I,k,R,N),this.activeRoute=i,this.router=o,this.dataService=r,this.questionnaireService=c,this.questionnaireApiService=m,this.taskService=_,this.translateService=M,this.checkInFlowService=I,this.onFlyTasksFlowService=k,this.configService=R,this.clinicApiService=N,this.appointmentApiService=W,this.isPrimaryFieldInitialized=!1,this.isSearchFinished=!1}ngOnInit(){this.task=this.taskService.getActiveTask(),this.appointmentId=this.task.todo.source.appointment_id,this.configService.setTitle("Review Allergies"),this.appointmentId&&this.appointmentApiService.get(this.appointmentId).subscribe(({clinicUuid:i})=>{this.clinicUuid=i})}ngAfterViewChecked(){!this.isPrimaryFieldInitialized&&this.primaryField&&(this.initPrimaryField(),this.isPrimaryFieldInitialized=!0)}ngOnDestroy(){this.clearBaseData(),this.dataService.clearBaseData(),this.dataService.clearForm(),this.dataService.clearFormsStorage(),this.isPrimaryFieldInitialized=!1}togglePage(){this.isAddAllergyPage=!this.isAddAllergyPage,this.isSearchFinished=!1,this.searchValue=null,this.allergyList=[]}
7isListEmpty(){if(this.viewQuestion?.fieldList.length&&this.primaryField)return this.primaryField.variantList.length===0}addAllergy(i){let o=this.primaryField.answer.indexOf(i.id),r=this.primaryField.variantList.map(c=>c.id).indexOf(i.id);o!==-1?(this.primaryField.answer.splice(o,1),this.primaryField.variantList.splice(r,1)):(this.primaryField.answer.push(i.id),r===-1&&this.primaryField.variantList.push(i))}initPrimaryField(){this.primaryField.variantList||(this.primaryField.variantList=[]),Array.isArray(this.primaryField.answer)&&this.primaryField.answer.length||(this.primaryField.answer=this.primaryField.variantList.map(i=>i.id))}isAllergyChosen(i){return this.primaryField?.answer?.indexOf(i.id)!==-1}searchAllergy(){!this.searchValue||this.searchValue.length<2||this.clinicApiService.searchAllergies(this.clinicUuid,this.searchValue).subscribe(i=>{this.allergyList=i,this.isSearchFinished=!0})}};e.\u0275fac=function(o){return new(o||e)(h(j),h(B),h(zt),h(Et),h(Do),h(mt),h(qt),h(St),h(zn),h(oe),h(Te),h(Ct))},e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-form-allergy"]],standalone:!1,features:[Y],decls:3,vars:4,consts:[[1,"allergy-form"],["class","allergy-data",4,"ngIf"],["class","add-allergy",4,"ngIf"],[1,"allergy-data"],[1,"title"],["class","description",4,"ngIf"],[4,"ngIf"],["libButton","","type","submit",1,"button",3,"click","disabled"],["type","button",1,"additional",3,"click"],[3,"params"],[1,"description"],[3,"field",4,"ngFor","ngForOf"],[3,"field"],[1,"add-allergy"],[1,"search"],["id","allergy-search-label",1,"description"],[1,"container"],["type","search","aria-labelledby","allergy-search-label",1,"input-search-with-hidden-x",3,"ngModelChange","search","placeholder","ngModel"],[1,"search-icon"],[3,"click","params"],["class","list-wrapper",4,"ngIf"],["class","search-result-empty",4,"ngIf"],["type","button",1,"back-btn",3,"click"],[1,"list-wrapper"],[1,"allergies-list"],["class","element",3,"for",4,"ngFor","ngForOf"],["libButton","","type","button",1,"button",3,"click"],[1,"element",3,"for"],["type","checkbox","name","allergy",1,"checkbox",3,"click","id","checked","placeholder"],[1,"mark"],[1,"label"],[1,"search-result-empty"]],template:function(o,r){o&1&&(s(0,"div",0),C(1,vM,17,17,"div",1)(2,bM,21,20,"div",2),l()),o&2&&(Z("search-form",r.isAddAllergyPage),a(),p("ngIf",!r.isAddAllergyPage),a(),p("ngIf",r.isAddAllergyPage))},dependencies:[Xt,ee,X,Ie,ue,F,U,ve,Pl,T,Un],styles:['.no-data[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;padding:0 5%;align-items:center;justify-content:center;background-color:#effcff;text-align:center;color:#064060;line-height:1.5rem;font-family:Roboto-bold,sans-serif;flex-direction:column;box-sizing:border-box}.no-data[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.5rem;margin-bottom:1rem}.no-data[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding:1rem}[_nghost-%COMP%]{background-color:#8080801a;overflow:auto}.allergy-form[_ngcontent-%COMP%]{padding:1.5rem 1rem;width:100%;min-height:100%;box-sizing:border-box}.allergy-form.search-form[_ngcontent-%COMP%]{background-color:#fff}.allergy-form[_ngcontent-%COMP%] .allergy-data[_ngcontent-%COMP%]{align-items:center}.allergy-form[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.125rem;font-family:Roboto-bold,sans-serif;text-align:center;color:#064060;padding-bottom:1rem}.allergy-form[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.5rem;padding:0 1rem}.allergy-form[_ngcontent-%COMP%] app-questionnaire-field-checkbox-simple[_ngcontent-%COMP%]{display:block;margin:1.5rem auto 3.5rem}.allergy-form[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{width:15rem;margin:1.5rem auto}.allergy-form[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:.5rem;width:fit-content;margin:auto;cursor:pointer;background:none}.allergy-form[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{border-radius:50%;width:2rem;height:2rem;display:flex;justify-content:center;align-items:center;background:#06406026}.allergy-form[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:.7rem;height:.7rem}.allergy-form[_ngcontent-%COMP%] .additional[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;font-size:.75rem;color:#064060}.allergy-form[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{height:fit-content;width:100%}.allergy-form[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{display:flex;position:relative;margin:1.5rem auto 2.5rem}.allergy-form[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border-radius:8px;border-color:#949494;padding:.625rem 1.5rem .625rem 1rem}.allergy-form[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.allergy-form[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.allergy-form[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.allergy-form[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.allergy-form[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.allergy-form[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%]{border-color:#505050;color:#505050}.allergy-form[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .search-icon[_ngcontent-%COMP%]{position:absolute;right:.75rem;display:flex;justify-content:center;align-items:center;height:100%}.allergy-form[_ngcontent-%COMP%] .allergies-list[_ngcontent-%COMP%]{padding:0 1rem;box-sizing:border-box}.allergy-form[_ngcontent-%COMP%] .search-result-empty[_ngcontent-%COMP%]{padding:0 1rem}.allergy-form[_ngcontent-%COMP%] .search-result-empty[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left}.allergy-form[_ngcontent-%COMP%] .search-result-empty[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{padding:0 0 1.5rem}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;width:100%;margin:2rem auto;text-align:left;align-items:inherit}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{height:2.5rem;width:2.5rem;background-color:"transparent";border:1px solid #e6e6e6;margin:0 1rem;flex:.15}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:.85}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox].checked[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{margin-left:.7rem;margin-top:.1rem;width:1rem;height:1.4rem;border:solid var(--branding-primary-color);border-width:0 .3rem .3rem 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox].checked[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%], .allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]{background-color:var(--branding-primary-color);border-color:var(--branding-primary-color)}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{width:1.1rem;height:1.1rem;flex:inherit;border-color:#949494;border-radius:.3rem;margin:0 1rem 0 0}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{margin-top:.13rem;margin-left:.33rem;width:.3rem;height:.5rem;border-width:0 .15rem .15rem 0;border-color:#fff}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark.disabled[_ngcontent-%COMP%]{opacity:.6}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{line-height:1.2rem}.allergy-form[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .label.disabled[_ngcontent-%COMP%]{opacity:.6}.allergy-form[_ngcontent-%COMP%] .back-btn[_ngcontent-%COMP%]{display:block;text-align:center;font-family:Roboto-bold,sans-serif;font-size:.75rem;cursor:pointer;color:#064060;background:none;margin:auto}@media(min-width:700px){.allergy-form[_ngcontent-%COMP%]{padding:1.5rem 2.5rem}.allergy-form[_ngcontent-%COMP%] .add-allergy[_ngcontent-%COMP%]{max-width:22rem;margin:auto}.description[_ngcontent-%COMP%]{padding:0 1.5rem}}']});let n=e;return n})();ri();var xM=()=>({name:"medication",color:"#3C9F76"});function OM(n,e){if(n&1){let t=S();s(0,"div",3)(1,"div",4)(2,"div",5),v(3,"lib-svg-icon",6),l(),s(4,"div",7)(5,"h1",8),f(6),d(7,"translate"),l(),s(8,"p"),f(9),d(10,"translate"),l()(),s(11,"div",9)(12,"button",10),P("click",function(){x(t);let o=g();return O(o.goToNextTask())}),f(13),d(14,"translate"),l()()()()}n&2&&(a(3),p("params",A(10,xM)),a(3),b(u(7,4,"No medications on file")),a(3),y(" ",u(10,6,"We do not have any medications on file for you at this time. Please bring a list of any medications that you are currently taking with you to your appointment or send us this list in a message.")," "),a(4),y(" ",u(14,8,"Go to
7next task")," "))}function wM(n,e){if(n&1&&v(0,"app-questionnaire-field-checkbox-simple",17),n&2){let t=e.$implicit;p("field",t)}}function SM(n,e){if(n&1){let t=S();se(0),s(1,"button",18),P("click",function(){x(t);let o=g(3);return O(o.goToGlicRxCard())}),f(2),d(3,"translate"),l(),le()}if(n&2){let t=g(3);a(),Z("inactive",!t.isNextButtonLocked()),a(),y(" ",u(3,3,"CONTINUE")," ")}}function IM(n,e){if(n&1){let t=S();s(0,"button",19),P("click",function(){x(t);let o=g(3);return O(o.saveHHForm(!1))}),f(1),d(2,"translate"),l()}if(n&2){let t=g(3);Z("inactive",!t.isNextButtonLocked()),p("disabled",t.isFormDataBeingSent()),a(),y(" ",u(2,4,"SUBMIT")," ")}}function TM(n,e){if(n&1&&(s(0,"div")(1,"h1",8),f(2),d(3,"translate"),l(),s(4,"div",14),f(5),d(6,"translate"),l(),C(7,wM,1,1,"app-questionnaire-field-checkbox-simple",15),d(8,"asFieldTypeArray"),C(9,SM,4,5,"ng-container",16),d(10,"async"),C(11,IM,3,6,"ng-template",null,0,pe),l()),n&2){let t=V(12),i=g(2);a(2),y(" ",u(3,5,"Review Medications")," "),a(3),y(" ",u(6,7,"Please uncheck any medications you are no longer taking")," "),a(2),p("ngForOf",u(8,9,i.viewQuestion.fieldList)),a(2),p("ngIf",u(10,11,i.isGlicRxModuleActive$))("ngIfElse",t)}}function kM(n,e){if(n&1){let t=S();s(0,"div",20)(1,"h1",8),f(2),d(3,"translate"),l(),v(4,"img",21)(5,"img",22),s(6,"mat-checkbox",23),Me("ngModelChange",function(o){x(t);let r=g(2);return Pe(r.sendGlicRxCard,o)||(r.sendGlicRxCard=o),O(o)}),f(7),l(),s(8,"button",19),P("click",function(){x(t);let o=g(2);return O(o.onSubmit())}),f(9),d(10,"translate"),l()()}if(n&2){let t=g(2);a(2),y(" ",u(3,7,"Would you like to receive a prescription savings card?")," "),a(4),ye("ngModel",t.sendGlicRxCard),a(),y(" ","Yes, please send me a Prescription Savings Card to my email and/or text."," "),a(),Z("inactive",!t.isNextButtonLocked()),p("disabled",t.isFormDataBeingSent()),a(),y(" ",u(10,9,"CONTINUE")," ")}}function AM(n,e){if(n&1&&(s(0,"div",11),C(1,TM,13,13,"div",12)(2,kM,11,11,"div",13),l()),n&2){let t=g();a(),p("ngIf",!t.showGlicRxCard),a(),p("ngIf",t.showGlicRxCard)}}var nn,cr=(nn=class extends fi{constructor(){super(...arguments),this.isListEmptySubject=new jt,this.isPrimaryFieldAnswerInitialized=!1,this.sendGlicRxCard=!0,this.showGlicRxCard=!1,this.isGlicRxModuleActive$=this.clinicApiService.isClinicModuleActive(this.clinicUuid,ei.GLIC_HEALTH)}ngOnInit(){super.ngOnInit(),this.configService.setTitle("Review Medications"),this.isListEmptySubject.pipe(Le(this)).subscribe(e=>{if(!this.isListEmptyValue&&e&&!this.checkInFlowService.isCheckInAppFlow()){let t=this.taskService.getActiveTask();t&&!t.isDone&&this.taskService.completeTaskAndSetItActive(t,!0).subscribe()}!e&&!this.isPrimaryFieldAnswerInitialized&&!(Array.isArray(this.primaryField.answer)&&this.primaryField.answer.length)&&(this.primaryField.answer=this.primaryField.variantList.map(t=>t.id),this.isPrimaryFieldAnswerInitialized=!0),this.isListEmptyValue=e})}ngOnDestroy(){this.clearBaseData(),this.dataService.clearBaseData(),this.dataService.clearForm(),this.dataService.clearFormsStorage(),this.isPrimaryFieldAnswerInitialized=!1}
7isListEmpty(){if(this.viewQuestion?.fieldList.length&&this.primaryField){let e=this.primaryField.variantList.length===0;return this.isListEmptySubject.next(e),e}}goToGlicRxCard(){this.showGlicRxCard=!0}onSubmit(){this.sendGlicRxCard&&this.questionnaireApiService.sendGlicRxCard(this.clinicUuid).subscribe(),this.saveHHForm(!1)}goToNextTask(){this.checkInFlowService.isCheckInAppFlow()?this.checkInFlowService.markCheckInFlowTaskAsDoneAndGoToNext(this.taskService.getActiveTask()):this.taskService.gotoNextTask()}},nn.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ae(nn)))(i||nn)}})(),nn.\u0275cmp=w({type:nn,selectors:[["app-questionnaire-form-medication"]],standalone:!1,features:[Y],decls:2,vars:2,consts:[["submitTemplate",""],["class","task-panel-background",4,"ngIf"],["class","medications",4,"ngIf"],[1,"task-panel-background"],[1,"task-panel"],[1,"task-panel-header"],[3,"params"],[1,"task-panel-body"],[1,"title"],[1,"footer"],["libButton","","type","button",1,"task-panel-button",3,"click"],[1,"medications"],[4,"ngIf"],["class","glic-rx",4,"ngIf"],[1,"description"],[3,"field",4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],[3,"field"],["libButton","","type","button",3,"click"],["libButton","","type","button",3,"click","disabled"],[1,"glic-rx"],["src","assets/img/glic-rx.jpg","alt","Glic Rx Prescription Card",1,"card-image"],["src","assets/img/glic-rx-pharmacy.png","alt","Accepted at over 35,000 pharmacies nationwide!",1,"pharmacy-image"],[1,"mat-checkbox-new",3,"ngModelChange","ngModel"]],template:function(t,i){t&1&&C(0,OM,15,11,"div",1)(1,AM,3,2,"div",2),t&2&&(p("ngIf",i.isListEmpty()===!0),a(),p("ngIf",i.isListEmpty()===!1))},dependencies:[X,Ie,cd,ue,F,U,ve,Pl,T,Un,Fe],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{background-color:#8080801a}.task-panel-background[_ngcontent-%COMP%]{background:linear-gradient(165deg,#66cea8,#66cea899)}.task-panel-header[_ngcontent-%COMP%]{background:#66cea826}.medications[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;padding:1.5rem 1rem}.medications[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.125rem;font-family:Roboto-bold,sans-serif;text-align:center;color:#064060;padding-bottom:1rem}.medications[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.5rem;padding:0 1rem}.medications[_ngcontent-%COMP%] app-questionnaire-field-checkbox-simple[_ngcontent-%COMP%]{display:block;margin-top:1.5rem}.medications[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:15rem;margin:3.5rem auto 2.5rem}.glic-rx[_ngcontent-%COMP%]{text-align:center}.glic-rx[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:block;width:fit-content;margin:auto}.card-image[_ngcontent-%COMP%]{border-radius:8px;border:1px solid #d3d3d3;margin:1rem auto;max-width:100%}.pharmacy-image[_ngcontent-%COMP%]{margin:2rem auto;max-width:100%;min-height:0}@media(min-width:700px){.medications[_ngcontent-%COMP%]{padding:1.5rem 2.5rem}.description[_ngcontent-%COMP%]{padding:0 1.5rem}}@media(max-width:400px){.glic-rx[_ngcontent-%COMP%]{padding:0 1rem}.card-image[_ngcontent-%COMP%]{width:290px}}"]}),nn);cr=Xe([et()],cr);ri();
7var C0=()=>({name:"arrow-left",color:"currentColor"}),v0=()=>({name:"arrow-right",color:"#ffffff"});function EM(n,e){if(n&1){let t=S();s(0,"button",6),P("click",function(){x(t);let o=g();return O(o.gotoQuestionByParams(o.prevRouteParams))}),s(1,"span",7),v(2,"lib-svg-icon",8),l(),f(3),d(4,"translate"),l()}n&2&&(a(2),p("params",A(4,C0)),a(),y(" ",u(4,2,"PREVIOUS")," "))}function FM(n,e){if(n&1){let t=S();s(0,"button",6),P("click",function(){x(t);let o=g();return O(o.goToPrevQuestionnaire())}),s(1,"span",7),v(2,"lib-svg-icon",8),l(),f(3),d(4,"translate"),l()}n&2&&(a(2),p("params",A(4,C0)),a(),y(" ",u(4,2,"PREVIOUS")," "))}function LM(n,e){if(n&1){let t=S();s(0,"button",9),P("click",function(){x(t);let o=g();return O(o.saveClick())}),f(1),d(2,"translate"),s(3,"span",7),v(4,"lib-svg-icon",8),l()()}if(n&2){let t=g();Z("inactive",t.isNextLocked),p("disabled",t.isNextLocked||t.isFormSending),a(),y(" ",u(2,5,t.isNextFormButton()?"NEXT":"SAVE")," "),a(3),p("params",A(7,v0))}}function DM(n,e){if(n&1){let t=S();s(0,"button",9),P("click",function(){x(t);let o=g(2);return O(o.gotoQuestionByParams(o.nextRouteParams))}),f(1),d(2,"translate"),s(3,"span",7),v(4,"lib-svg-icon",8),l()()}if(n&2){let t=g(2);p("disabled",t.isNextLocked),a(),y(" ",u(2,3,"NEXT")," "),a(3),p("params",A(5,v0))}}function BM(n,e){if(n&1&&C(0,DM,5,6,"button",10),n&2){let t=g();p("ngIf",t.nextRouteParams)}}var Pn,Ml=(Pn=class{constructor(e,t,i){this.dataService=e,this.activatedRoute=t,this.redirectTaskService=i,this.save=new he(!0)}ngOnInit(){this.dataService.isNextLocked.pipe(Le(this)).subscribe(e=>this.isNextLocked=e),this.dataService.isFormSending.pipe(Le(this)).subscribe(e=>this.isFormSending=e),this.updateQuestionnaireLength(),this.updatePrevQuestionnaireLength(),this.setPrevQuestionnaire()}get questionCounter(){let e=this.isNextFormCounter()?this.questionnaireTotal:this.totalActiveQuestions;return e===1?"":`${this.viewQuestionOrder+(this.prevQuestionnaireTotal||0)}/${e}`}get isCurrentQuestionLast(){return this.dataService.indexOfLastQuestion+1===this.viewQuestionOrder}isNextFormButton(){return this.dataService.formStorageList?.value&&this.dataService.formStorageList.value.length-1!==this.dataService.formOrder.value}isNextFormCounter(){return this.dataService.formStorageList?.value?.length>1}saveClick(){this.dataService.updateFormSendingStatus(!0),this.save.emit(!0)}updatePrevQuestionnaireLength(){let e=this.dataService.formOrder.value;e<=0||(this.prevQuestionnaireTotal=this.getQuestionnaireTotal((this.dataService.questionnaireStorageList.value||[]).slice(0,e)))}getQuestionnaireTotal(e){return(e||[]).flatMap(({groupList:t})=>t).flatMap(({questionList:t})=>t).length}setPrevQuestionnaire(){let e=this.activatedRoute.snapshot.queryParams,t=this.dataService.prevQuestionnaireParams.value;t[this.dataService.formOrder.value]={prevRouteParams:e,formId:this.formId,formType:this.formType},this.dataService.updatePrevQuestionnaireParams(t)}goToPrevQuestionnaire(){this.dataService.updateFormOrder(this.dataService.formOrder.value-1);let e=this.dataService.prevQuestionnaireParams.value[this.dataService.formOrder.value];this.redirectTaskService.navigate([this.getQuestionnaireUrl(e.formType,e.formId)],{queryParams:{appointmentId:e.prevRouteParams.appointmentId,questionId:e.prevRouteParams.questionId}})}isPrevQuestionnaireButton(){return!this.prevRouteParams&&this.dataService.formOrder.value>0}updateQuestionnaireLength(){this.questionnaireTotal=this.getQuestionnaireTotal(this.dataService.questionnaireStorageList.value)}getQuestionnaireUrl(e,t){return this.redirectTaskService.getBaseQuestionnaireUrl()+"/"+e+"/"+t}gotoQuestionByParams(e){this.redirectTaskService.navigate([this.getQuestionnaireUrl(this.formType,this.formId)],{queryParams:e})}},Pn.\u0275fac=function(t){return new(t||Pn)(h(zt),h(j),h(mt))},Pn.\u0275cmp=w({type:Pn,selectors:[["app-questionnaire-form-pagination"]],inputs:{prevRouteParams:"prevRouteParams",viewQuestionOrder:"viewQuestionOrder",totalActiveQuestions:"totalActiveQuestions",nextRouteParams:"nextRouteParams",formId:"formId",formType:"formType"},outputs:{save:"save"},standalone:!1,decls:8,vars:4,consts:[["nextButtonTemplate",""],[1,"pagination"],[1,"pagination-btn"],["libButton","","variant","link","class","nav-back","type","button",3,"click",4,"ngIf"],[1,"pagination-btn","right"],["libButton","","class","right","type","button",3,"inactive","disabled","click",4,"ngIf","ngIfElse"],["libButton","","variant","link","type","button",1,"nav-back",3,"click"],[1,"arrow"],[3,"params"],["libButton","","type","button",1,"right",3,"click","disabled"],["libButton","","class","right","type","button",3,"disabled","click",4,"ngIf"]],template:function(t,i){if(t&1&&(s(0,"div",1)(1,"span",2),C(2,EM,5,5,"button",3)(3,FM,5,5,"button",3),l(),s(4,"span",4),C(5,LM,5,8,"button",5)(6,BM,1,1,"ng-template",null,0,pe),l()()),t&2){let o=V(7);
7a(2),p("ngIf",i.prevRouteParams),a(),p("ngIf",i.isPrevQuestionnaireButton()),a(2),p("ngIf",i.isCurrentQuestionLast)("ngIfElse",o)}},dependencies:[F,U,ve,T],styles:[".pagination[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:row;align-items:center;padding:1rem 0 2rem;font-size:.7rem;justify-content:space-between;background-color:#f5f5f5}.pagination[_ngcontent-%COMP%] .pagination-btn[_ngcontent-%COMP%]{flex:1}.pagination[_ngcontent-%COMP%] .pagination-btn[_ngcontent-%COMP%]:not(.right){padding-left:1rem;padding-right:0}.pagination[_ngcontent-%COMP%] .pagination-btn.right[_ngcontent-%COMP%]{justify-content:flex-end;display:flex;padding-left:0}.pagination[_ngcontent-%COMP%] button.right[_ngcontent-%COMP%]{width:auto;padding:.5rem 1rem;font-size:.75rem}.pagination[_ngcontent-%COMP%] .nav-back[_ngcontent-%COMP%]{color:#505050}.pagination[_ngcontent-%COMP%] .button-placeholder[_ngcontent-%COMP%]{display:flex;min-width:30vw}"]}),Pn);Ml=Xe([et(),ut("design:paramtypes",[zt,j,mt])],Ml);var S0=ia(Rl());var VM=n=>({"label-small":n}),NM=n=>({"field-small":n});function UM(n,e){if(n&1&&(s(0,"div",7),f(1),d(2,"translate"),l()),n&2){let t=g();a(),Vt("",u(2,2,"Question")," ",t.questionCounter)}}function qM(n,e){if(n&1){let t=S();s(0,"div",1)(1,"label",2),f(2),d(3,"translate"),l(),s(4,"input",8),d(5,"translate"),P("change",function(){x(t);let o=g();return O(o.applyAnswer(o.field.answer))})("blur",function(){x(t);let o=g();return O(o.applyAnswer(o.field.answer))}),Me("ngModelChange",function(o){x(t);let r=g();return Pe(r.field.answer.heightCentimeter,o)||(r.field.answer.heightCentimeter=o),O(o)}),l()()}if(n&2){let t=g();a(),p("id","label-"+t.field.fieldId+"-bmi-heightCentimeter-"+t.field.stringId)("for",t.field.fieldId+"-bmi-heightCentimeter-"+t.field.stringId),a(),y(" ",u(3,11,"Centimeter"),": "),a(2),p("id",t.field.fieldId+"-bmi-heightCentimeter-"+t.field.stringId)("name",t.field.fieldId+"-bmi-heightCentimeter-"+t.field.stringId)("placeholder",u(5,13,"cm"))("required",t.field.required)("min",1)("max",999),ye("ngModel",t.field.answer.heightCentimeter),p("ngClass",ce(15,NM,!t.isMetricSystem))}}var bl=(()=>{let e=class e extends pt{constructor(i,o){super(i),this.questionnaireService=i,this.config=o,this.isMetricSystem=this.config.isMetricSystem()}parseAnswer(i){this.field.answer=i}ngOnInit(){this.field.answer=this.field.answer||{weight:void 0,heightMeter:void 0,heightCentimeter:void 0}}};e.\u0275fac=function(o){return new(o||e)(h(Et),h(oe))},e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-bmi"]],inputs:{questionCounter:"questionCounter"},standalone:!1,features:[Y],decls:15,vars:33,consts:[[1,"form"],[1,"field","labelSecond","element"],[1,"label-first",3,"id","for"],["class","question-counter",4,"ngIf"],["type","number","pattern","[0-9\\.\\,]*",1,"field-numeric",3,"change","blur","ngModelChange","id","name","placeholder","required","min","max","ngModel"],["type","number","pattern","[0-9\\.\\,]*",1,"field-numeric",3,"change","blur","ngModelChange","id","name","placeholder","required","min","max","ngModel","ngClass"],["class","field labelSecond element",4,"ngIf"],[1,"question-counter"],["type","number","pattern","[0-9\\.\\,]*",1,"bmi-heightCentimeter",3,"change","blur","ngModelChange","id","name","placeholder","required","min","max","ngModel","ngClass"]],template:function(o,r){o&1&&(s(0,"div",0)(1,"div",1)(2,"label",2),f(3),d(4,"translate"),l(),C(5,UM,3,4,"div",3),s(6,"input",4),d(7,"translate"),P("change",function(){return r.applyAnswer(r.field.answer)})("blur",function(){return r.applyAnswer(r.field.answer)}),Me("ngModelChange",function(m){return Pe(r.field.answer.weight,m)||(r.field.answer.weight=m),m}),l()(),s(8,"div",1)(9,"label",2),f(10),d(11,"translate"),l(),s(12,"input",5),d(13,"translate"),P("change",function(){return r.applyAnswer(r.field.answer)})("blur",function(){return r.applyAnswer(r.field.answer)}),Me("ngModelChange",function(m){return Pe(r.field.answer.heightMeter,m)||(r.field.answer.heightMeter=m),m}),l()(),C(14,qM,6,17,"div",6),l()),o&2&&(a(2),p("id","label-"+r.field.fieldId+"-bmi-weight-"+r.field.stringId)("for",r.field.fieldId+"-bmi-weight-"+r.field.stringId),a(),y(" ",u(4,23,"Weight"),": "),a(2),p("ngIf",r.questionCounter),a(),p("id",r.field.fieldId+"-bmi-weight-"+r.field.stringId)("name",r.field.fieldId+"-bmi-weight-"+r.field.stringId)("placeholder",u(7,25,"lbs"))("required",r.field.required)("min",1)("max",999),ye("ngModel",r.field.answer.weight),a(3),p("id","label-"+r.field.fieldId+"-bmi-heightMeter-"+r.field.stringId)("for",r.field.fieldId+"-bmi-heightMeter-"+r.field.stringId),a(),y(" ",u(11,27,"He
7ight"),": "),a(2),p("id",r.field.fieldId+"-bmi-heightMeter-"+r.field.stringId)("name",r.field.fieldId+"-bmi-heightMeter-"+r.field.stringId)("placeholder",u(13,29,"Ft"))("required",r.field.required)("min",1)("max",999),ye("ngModel",r.field.answer.heightMeter),p("ngClass",ce(31,VM,!r.isMetricSystem)),a(2),p("ngIf",!r.isMetricSystem))},dependencies:[ee,va,X,We,Mi,Pa,ya,Ie,He,F,T],styles:[".element[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:1rem;border-bottom:1px solid #e6e6e6}.element[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.element[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.element[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.element[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.element[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem 0;border:none;width:auto;box-sizing:border-box;text-align:right;justify-content:flex-end;background-color:transparent}.element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1}.form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:var(--field-controls-vertical-padding, 1rem) var(--field-controls-horizontal-padding, 1rem);flex:1}"]});let n=e;return n})();var zM=(n,e)=>({field_full:n,field_label:e});function jM(n,e){if(n&1&&(s(0,"div",7),f(1),l()),n&2){let t=g();a(),b(t.field.title)}}function WM(n,e){if(n&1&&(s(0,"div",8),f(1),l()),n&2){let t=g();a(),y(" ",t.question.description," ")}}function QM(n,e){if(n&1&&(s(0,"label",9),f(1),l()),n&2){let t=g();p("id","date-description"+t.field.fieldId)("for",t.field.fieldId+"-date-"+t.field.stringId),a(),y(" ",t.field.label," ")}}var P0=(()=>{let e=class e extends pt{parseAnswer(i){this.virtualAnswerYear||this.virtualAnswerMonth?(this.field.answer={year:this.virtualAnswerYear,month:this.virtualAnswerMonth},this.field.multi&&(this.field.answer=[this.field.answer])):this.field.answer=null}ngOnInit(){this.field.attributes=this.field.attributes||{},this.currentYear=new Date().getFullYear(),this.minYear=this.currentYear-130,this.field.answer&&(this.virtualAnswerYear=this.field.answer.year,this.virtualAnswerMonth=this.field.answer.month),this.applyAnswer(!0)}};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-date"]],standalone:!1,features:[Y],decls:9,vars:27,consts:[[1,"field"],["class","title",4,"ngIf"],["class","desc",4,"ngIf"],[1,"question",3,"ngClass"],[3,"id","for",4,"ngIf"],["type","tel","mask","00","pattern","/^[0-9]+$/",1,"field-date","month",3,"change","blur","ngModelChange","min","max","id","name","placeholder","required","ngModel"],["type","tel","mask","0000","pattern","/^[0-9]+$/",1,"field-date","year",3,"change","blur","ngModelChange","min","max","id","name","placeholder","required","ngModel"],[1,"title"],[1,"desc"],[3,"id","for"]],template:function(o,r){o&1&&(s(0,"div",0),C(1,jM,2,1,"div",1)(2,WM,2,1,"div",2),s(3,"div",3),C(4,QM,2,3,"label",4),s(5,"input",5),d(6,"translate"),P("change",function(m){return r.applyAnswer(m.target.checkValidity())})("blur",function(m){return r.applyAnswer(m.target.checkValidity())})("ngModelChange",function(m){return r.virtualAnswerMonth=m}),l(),s(7,"input",6),d(8,"translate"),P("change",function(m){return r.applyAnswer(m.target.checkValidity())})("blur",function(m){return r.applyAnswer(m.target.checkValidity())})("ngModelChange",function(m){return r.virtualAnswerYear=m}),l()()()),o&2&&(a(),p("ngIf",r.field.title),a(),p("ngIf",r.isDescriptionVisible()),a(),p("ngClass",Dt(24,zM,!r.isFieldWithLabel(),r.isFieldWithLabel())),a(),p("ngIf",r.isFieldWithLabel()),a(),p("min",0)("max",12)("id",r.field.fieldId+"-date-"+r.field.stringId)("name",r.field.fieldId+"-date-"+r.field.stringId)("placeholder",r.virtualAnswerMonth?r.virtualAnswerMonth:u(6,20,"Month"))("required",r.field.required)("ngModel",r.virtualAnswerMonth),G("aria-describedby","date-description"+r.field.fieldId),a(2),p("min",r.minYear)("max",r.currentYear)("id",r.field.fieldId+"-date-"+r.field.stringId)("name",r.field.fieldId+"-date-"+r.field.stringId)("placeholder",r.virtualAnswerYear?r.virtualAnswerYear:u(8,22,"Year"))("required",r.field.required)("ngModel",r.virtualAnswerYear),G("aria-describedby","date-description"+r.field.fieldId))},dependencies:[ee,X,We,Mi,Ie,Vn,He,F,T],styles:[".title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;padding-bottom:1rem}.desc[_ngcontent-%COMP%]{padding:1rem 1.5rem;padding-top:0;font-size:.9rem;margin:0 auto}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:var(--field-controls-vertical-padding, 1rem) var(--field-controls-horizontal-padding, 1rem);flex:1}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:space-between;align-items:center}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{min-width:30%}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;border-radius:4px;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .month[_ngcontent-%COMP%]{margin-right:1rem}"]});let n=e;return n})();function HM(n,e){if(n&1&&(s(0,"div",5),f(1),d(2,"translate"),l()),n&2){let t=g(2);a(),y(" ",u(2,1,t.field.title)," ")}}function $M(n,e){if(n&1&&(s(0,"h1",5),f(1),d(2,"translate"),l()),n&2){let t=g(2);a(),b(u(2,1,t.field.title))}}function KM(n,e){if(n&1&&(se(0),C(1,HM,3,3,"div",4)(2,$M,3,3,"ng-template",null,0,pe),le()),n&2){let t=V(3),i=g();a(),p("ngIf",!i.questionCounter)("ngIfElse",t)}}function YM(n,e){if(n&1&&(s(0,"div",6),f(1),d(2,"translate"),l()),n&2){let t=g();a(),Vt("",u(2,2,"Question")," ",t.questionCounter)}}function XM(n,e){if(n&1&&(s(0,"div",7),f(1),d(2,"translate"),l()),n&2){let t=g();a(),y(" ",u(2,1,t.question.description),` 8`)}}var hi=(()=>{let e=class e extends pt{};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-header"]],inputs:{questionCounter:"questionCounter"},standalone:!1,features:[Y],decls:3,vars:3,consts:[["headingTemplate",""],[4,"ngIf"],["class","question-counter",4,"ngIf"],["class","desc",4,"ngIf"],["class","title",4,"ngIf","ngIfElse"],[1,"title"],[1,"question-counter"],[1,"desc"]],template:function(o,r){o&1&&C(0,KM,4,2,"ng-container",1)(1,YM,3,4,"div",2)(2,XM,3,3,"div",3),o&2&&(p("ngIf",r.field.title),a(),p("ngIf",r.questionCounter),a(),p("ngIf",r.isDescriptionVisible()))},dependencies:[F,T],styles:["[_nghost-%COMP%]{width:100%;text-align:center}.title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;font-size:1.125rem;margin:1rem auto;line-height:1.3rem;padding:0 1rem;color:#064060}.question-counter[_ngcontent-%COMP%]{margin-top:0}.desc[_ngcontent-%COMP%]{padding:1rem 1.25rem 1.5rem;padding-top:0;margin:0 auto;text-align:left}"]});let n=e;return n})();function ZM(n,e){if(n&1&&v(0,"app-questionnaire-field-header",9),n&2){let t=g();p("field",t.field)("question",t.question)("questionCounter",t.questionCounter)}}function JM(n,e){n&1&&(s(0,"div",10),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Date not valid")," "))}var xl=(()=>{let e=class e extends pt{constructor(i,o){super(i),this.questionnaireService=i,this.dateTimeService=o,this.virtualAnswerYear=null,this.virtualAnswerMonth=null,this.virtualAnswerDay=null}ngOnInit(){this.field.attributes=this.field.attributes||{},this.maxDateString=this.dateTimeService.format(this.dateTimeService.getStartOfDay(),"mysql_date"),this.field.answer&&(this.virtualAnswerYear=this.field.answer.year,this.virtualAnswerMonth=this.field.answer.month,this.virtualAnswerDay=this.field.answer.day),this.applyAnswer(!0)}parseAnswer(i){this.field.required||this.virtualAnswerYear?this.field.answer={year:this.virtualAnswerYear,month:this.virtualAnswerMonth||(this.virtualAnswerYear?1:null),day:this.virtualAnswerDay||(this.virtualAnswerYear?1:null)}:this.field.answer=null,this.field.answer&&!this.isDateValid(this.field.answer.month,this.field.answer.day,this.field.answer.year)||this.field.answer&&this.field.answer.year&&this.isYearValidationError()?(this.field.answer=null,this.field.invalid=!0):this.field.invalid=!1,this.field.multi&&(this.field.answer=[this.field.answer])}isDateValidationError(){return this.virtualAnswerMonth||this.virtualAnswerDay||this.virtualAnswerYear?!this.isYearValidationError()&&!this.isMonthValidationError()?this.virtualAnswerMonth&&this.virtualAnswerDay&&this.virtualAnswerYear?!this.isDateValid(this.virtualAnswerMonth,this.virtualAnswerDay,this.virtualAnswerYear):!1:!0:!1}isDateValid(i,o,r){let c=i+"-"+o+"-"+r;return qe(c,["MM-DD-YYYY"]).isValid()}isYearValidationError(){return this.virtualAnswerYear<1900||!this.virtualAnswerYear||this.virtualAnswerYear>2100}isMonthValidationError(){return this.virtualAnswerMonth>12}};e.\u0275fac=function(o){return new(o||e)(h(Et),h(lt))},e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-date-part"]],inputs:{questionCounter:"questionCounter"},standalone:!1,features:[Y],decls:26,vars:37,consts:[[1,"field"],[3,"field","question","questionCounter",4,"ngIf"],[1,"date-wrapper"],[1,"cdk-visually-hidden"],[1,"question"],["type","tel","mask","00","pattern","[0-9]*",1,"field-date",3,"ngModelChange","change","blur","keypress","keydown","keyup","id","placeholder","required","max","ngModel"],["type","tel","mask","00","pattern","[0-9]*",1,"field-date",3,"change","blur","ngModelChange","keypress","keydown","keyup","id","placeholder","required","max","ngModel"],["type","tel","mask","0000","pattern","[0-9]*",1,"field-date",3,"change","blur","ngModelChange","keypress","keydown","keyup","id","placeholder","required","max","ngModel"],["class","error","role","alert","aria-atomic","true",4,"ngIf"],[3,"field","question","questionCounter"],["role","alert","aria-atomic","true",1,"error"]],template:function(o,r){o&1&&(s(0,"div",0),C(1,ZM,1,3,"app-questionnaire-field-header",1),s(2,"fieldset",2)(3,"legend",3),f(4),d(5,"translate"),l(),s(6,"div",4)(7,"label")(8,"span"),f(9),d(10,"translate"),l(),s(11,"input",5),d(12,"translate"),P("ngModelChange",function(m){return r.virtualAnswerMonth=m})("change",function(m){return r.applyAnswer(m.target.checkValidity())})("blur",function(m){return r.applyAnswer(m.target.checkValidity())})("keypress",function(m){return r.applyAnswer(m.target.checkValidity())})("keydown",function(m){return r.applyAnswer(m.target.checkValidity())})("keyup",function(m){return r.applyAnswer(m.target.checkValidity())}),l()(),s(13,"label")(14,"span"),f(15),d(16,"translate"),l(),s(17,"input",6),d(18,"translate"),P("change",function(m){return r.applyAnswer(m.target.checkValidity())})("blur",function(m){return r.applyAnswer(m.target.checkValidity())})("ngModelChange",function(m){return r.virtualAnswerDay=m})("keypress",function(m){return r.applyAnswer(m.target.checkValidity())})("keydown",function(m){return r.applyAnswer(m.target.checkValidity())})("keyup",function(m){return r.applyAnswer(m.target.checkValidity())}),l()(),s(19,"label")(20,"span"),f(21),d(22,"translate"),l(),s(23,"input",7),d(24,"translate"),P("change",function(m){return r.applyAnswer(m.target.checkValidity())})("blur",function(m){return r.applyAnswer(m.target.checkValidity())})("ngModelChange",function(m){return r.virtualAnswerYear=m})("keypress",function(m){return r.applyAnswer(m.target.checkValidity())})("keydown",function(m){return r.applyAnswer(m.target.checkValidity())})("keyup",function(m){return r.applyAnswer(m.target.checkValidity())}),l()()(),C(25,JM,3,3,"div",8),l()()),o&2&&(a(),p("ngIf",!r.isViewTemplateCollapsed),a(),Z("collapsed",r.isViewTemplateCollapsed),a(2),y(" ",u(5,23,r.field.title)," "),a(5),b(u(10,25,"Month")),a(2),p("id","month-"+r.field.fieldId+"-date-part-"+r.field.stringId)("placeholder",u(12,27,"MM"))("required",r.field.required)("max",r.maxDateString)("ngModel",r.virtualAnswerMonth),a(4),b(u(16,29,"Day")),a(2),p("id","day-"+r.field.fieldId+"-date-part-"+r.field.stringId)("placeholder",u(18,31,"DD"))("required",r.field.required)("max",r.maxDateString)("ngModel",r.virtualAnswerDay),a(4),b(u(22,33,"Year")),a(2),p("id","year-"+r.field.fieldId+"-date-part-"+r.field.stringId)("placeholder",u(24,35,"YYYY"))("required",r.field.required)("max",r.maxDateString)("ngModel",r.virtualAnswerYear),a(2),p("ngIf",r.isDateV
8alidationError()))},dependencies:[ee,X,We,Mi,Ie,Vn,F,hi,T],styles:[".field[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:var(--field-controls-vertical-padding, 1.5rem) var(--field-controls-horizontal-padding, 1rem);background:#fff;box-sizing:border-box;width:100%;border-radius:8px;position:relative}.field[_ngcontent-%COMP%] .date-wrapper.collapsed[_ngcontent-%COMP%]{padding-top:0}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:space-between;align-items:center;padding:0;gap:.625rem}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.75rem;margin-bottom:.3rem;text-align:left}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.625rem;border:1px solid #e6e6e6;width:100%;appearance:none;min-height:2rem;line-height:initial;border:1px solid #949494;color:#6a6a6a;border-radius:8px;box-sizing:border-box;line-height:1.19rem}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%]{border-color:#505050;color:#505050}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{display:flex;width:100%;box-sizing:border-box;margin-top:1rem}@media(min-width:700px){.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%]{padding:var(--field-controls-vertical-padding, 1.5rem) var(--field-controls-horizontal-padding-medium, 2.5rem)}.field[_ngcontent-%COMP%] .date-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{gap:1.25rem}}"]});let n=e;return n})();var eb=n=>({"label-small":n});function tb(n,e){if(n&1&&v(0,"app-questionnaire-field-header",7),n&2){let t=g();p("field",t.field)("question",t.question)("questionCounter",t.questionCounter)}}var Ol=(()=>{let e=class e extends pt{constructor(i,o){super(i),this.questionnaireService=i,this.configService=o,this.isMetricSystem=this.configService.isMetricSystem()}parseAnswer(i){this.field.answer=(this.heightMetre??(this.heightCentimetre?0:""))+(this.heightMetre||this.heightCentimetre?".":"")+(this.heightCentimetre??"")}ngOnInit(){this.field.attributes=this.field.attributes||{},this.field.answer&&([this.heightMetre,this.heightCentimetre]=String(this.field.answer).split(/[,|\.]/)),this.applyAnswer(this.field.answer)}};e.\u0275fac=function(o){return new(o||e)(h(Et),h(oe))},e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-height"]],inputs:{questionCounter:"questionCounter"},standalone:!1,features:[Y],decls:15,vars:23,consts:[[1,"field",3,"ngClass"],[3,"field","question","questionCounter",4,"ngIf"],[1,"question-wrapper"],[1,"question"],[1,"label-first"],["type","number","pattern","[0-9\\.\\,]*",1,"field-numeric",3,"ngModelChange","change","blur","id","required","min","max","ngClass","ngModel"],["type","number","pattern","[0-9\\.\\,]*",1,"bmi-heightCentimeter","field-small",3,"ngModelChange","change","blur","id","required","min","max","ngModel"],[3,"field","question","questionCounter"]],template:function(o,r){o&1&&(s(0,"div",0),C(1,tb,1,3,"app-questionnaire-field-header",1),s(2,"div",2)(3,"div",3)(4,"label",4)(5,"span"),f(6),d(7,"translate"),l(),s(8,"input",5),Me("ngModelChange",function(m){return Pe(r.heightMetre,m)||(r.heightMetre=m),m}),P("change",function(){return r.applyAnswer(r.field.answer)})("blur",function(){return r.applyAnswer(r.field.answer)}),l()()(),s(9,"div",3)(10,"label",4)(11,"span"),f(12),d(13,"translate"),l(),s(14,"input",6),Me("ngModelChange",function(m){return Pe(r.heightCentimetre,m)||(r.heightCentimetre=m),m}),P("change",function(){return r.applyAnswer(r.field.answer)})("blur",function(){return r.applyAnswer(r.field.answer)}),l()()()()()),o&2&&(p("ngClass",r.extendClass),a(),p("ngIf",!r.isViewTemplateCollapsed),a(),Z("collapsed",r.isViewTemplateCollapsed),a(4),y("",u(7,17,"Feet"),":"),a(2),p("id",r.field.fieldId+"-bmi-heightMeter-"+r.field.stringId)("required",r.field.required)("min",0)("max",999)("ngClass",ce(21,eb,!r.isMetricSystem)),ye("ngModel",r.heightMetre),a(4),y("",u(13,19,"Inch"),":"),a(2),p("id",r.field.fieldId+"-bmi-heightCentimeter-"+r.field.stringId)("required",r.field.required)("min",0)("max",999),ye("ngModel",r.height
8Centimetre))},dependencies:[ee,va,X,We,Mi,Pa,ya,Ie,He,F,hi,T],styles:[".field[_ngcontent-%COMP%]{display:flex;flex-direction:column}.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%]{display:flex;background:#fff;border-radius:8px;padding:var(--field-controls-vertical-padding, 1.5rem) var(--field-controls-horizontal-padding, 1rem);gap:1.25rem}.field[_ngcontent-%COMP%] .question-wrapper.collapsed[_ngcontent-%COMP%]{padding-top:0;padding-bottom:1rem}.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{flex:1}.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.75rem;margin-bottom:.3rem}.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.625rem;border:1px solid #e6e6e6;width:100%;appearance:none;min-height:2rem;line-height:initial;border:1px solid #949494;color:#6a6a6a;border-radius:8px;box-sizing:border-box;line-height:1.19rem}.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%]{border-color:#505050;color:#505050}@media(min-width:700px){.field[_ngcontent-%COMP%] .question-wrapper[_ngcontent-%COMP%]{padding:var(--field-controls-vertical-padding, 1.5rem) var(--field-controls-horizontal-padding-medium, 2.5rem)}}"]});let n=e;return n})();function ib(n,e){if(n&1&&v(0,"app-questionnaire-field-header",5),n&2){let t=g();p("field",t.field)("question",t.question)("questionCounter",t.questionCounter)}}function nb(n,e){if(n&1&&(s(0,"label",6),f(1),d(2,"translate"),l()),n&2){let t=g();p("for",t.field.fieldId+"-numeric-"+t.field.stringId),a(),y(" ",u(2,2,t.field.label)," ")}}var wl=(()=>{let e=class e extends pt{constructor(i,o){super(i),this.questionnaireService=i,this.formBuilder=o}parseAnswer(i){let o=this.numericFieldForm.get("fieldNumeric"),r=null;o.value&&o.valid&&(r=Number((""+o.value).replace(",","")),isNaN(r)&&(r=null)),this.field.invalid=!o.valid,this.field.answer=r}ngOnInit(){this.field.attributes=this.field.attributes||{},this.initForm(),this.applyAnswer(this.field.answer)}initForm(){let i=this.field.answer,o=[at.pattern("[0-9.,]*"),Hl.min(this.field.attributes.min||0),Hl.max(this.field.attributes.max||1e5)];this.field.required&&o.unshift(at.required),this.numericFieldForm=this.formBuilder.group({fieldNumeric:[i,o]})}};e.\u0275fac=function(o){return new(o||e)(h(Et),h(Nt))},e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-numeric"]],inputs:{questionCounter:"questionCounter"},standalone:!1,features:[Y],decls:7,vars:13,consts:[[1,"field",3,"ngClass"],[3,"field","question","questionCounter",4,"ngIf"],[1,"question",3,"formGroup"],[3,"for",4,"ngIf"],["type","tel","formControlName","fieldNumeric",3,"focus","blur","change","keypress","keydown","keyup","id","placeholder"],[3,"field","question","questionCounter"],[3,"for"]],template:function(o,r){o&1&&(s(0,"div",0),C(1,ib,1,3,"app-questionnaire-field-header",1),s(2,"div",2),C(3,nb,3,4,"label",3),s(4,"input",4),d(5,"translate"),d(6,"translate"),P("focus",function(){return r.applyAnswer(r.field.answer)})("blur",function(){return r.applyAnswer(r.field.answer)})("change",function(){return r.applyAnswer(r.field.answer)})("keypress",function(){return r.applyAnswer(r.field.answer)})("keydown",function(){return r.applyAnswer(r.field.answer)})("keyup",function(){return r.applyAnswer(r.field.answer)}),l()()()),o&2&&(p("ngClass",r.extendClass),a(),p("ngIf",!r.isViewTemplateCollapsed),a(),Z("collapsed",r.isViewTemplateCollapsed),p("formGroup",r.numericFieldForm),a(),p("ngIf",r.isFieldWithLabel()),a(),p("id",r.field.fieldId+"-numeric-"+r.field.stringId)("placeholder",u(5,9,"Enter here...")),G("aria-label",r.isFieldWithLabel()?null:u(6,11,r.field.title)))},dependencies:[ee,X,Ne,tt,st,He,F,hi,T],styles:[".field[_ngcontent-%COMP%]{display:flex;flex-direction:column}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;padding:var(--field-controls-vertical-padding, 1.5rem) var(--field-controls-horizontal-padding, 1rem);box-sizing:border-box;border-radius:8px}.field[_ngcontent-%COMP%] .question.collapsed[_ngcontent-%COMP%]{padding-top:0}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem;margin-bottom:.3rem}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.625rem;border:1px solid #e6e6e6;width:100%;appearance:none;min-height:2rem;line-height:initial;border:1px solid #949494;color:#757575;border-radius:8px;box-sizing:border-box;line-height:1.19rem}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%]{border-color:#505050;color:#505050}@media(min-width:700px){.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{padding:var(--field-controls-vertical-padding, 1.5rem) var(--field-controls-horizontal-padding-medium, 2.5rem)}}"]});let n=e;return n})();var ob=(n,e)=>({field_full:n,field_label:e});function rb(n,e){if(n&1&&v(0,"app-questionnaire-field-header",7),n&2){let t=g();p("field",t.field)("question",t.question)("questionCounter",t.questionCounter)}}function ab(n,e){if(n&1&&(s(0,"span"),f(1),d(2,"translate"),l()),n&2){let t=g();a(),b(u(2,1,t.field.description))}}var Sl=(()=>{let e=class e extends pt{ngOnInit(){this.field.attributes=this.field.attributes||{},this.applyAnswer(this.field.answer)}parseAnswer(i){this.field.answer=i}};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-string"]],inputs:{questionCounter:"questionCounter"},standalone:!1,features:[Y],decls:8,vars:13,consts:[[1,"field"],[1,"field-wrapper"],[3,"field","question","questionCounter",4,"ngIf"],[1,"string-wrapper"],[1,"question","element",3,"ngClass"],[4,"ngIf"],[1,"field-string",3,"ngModelChange","focus","blur","change","keypress","keydown","keyup","id","maxlength","required","ngModel"],[3,"field","question","questionCounter"]],template:function(o,r){o&1&&(s(0,"div",0)(1,"div",1),C(2,rb,1,3,"app-questionnaire-field-header",2),s(3,"div",3)(4,"div",4),C(5,ab,3,3,"span",5),s(6,"textarea",6),d(7,"translate"),Me("ngModelChange",function(m){return Pe(r.field.answer,m)||(r.field.answer=m),m}),P("focus",function(){return r.applyAnswer(r.field.answer)})("blur",function(){return r.applyAnswer(r.field.answer)})("change",function(){return r.applyAnswer(r.field.answer)})("keypress",function(){return r.applyAnswer(r.field.answer)})("keydown",function(){return r.applyAnswer(r.field.answer)})("keyup",function(){return r.applyAnswer(r.field.answer)}),l()()()()()),o&2&&(a(2),p("ngIf",!r.isViewTemplateCollapsed),a(2),p("ngClass",Dt(10,ob,!r.isFieldWithLabel(),r.isFieldWithLabel())),a(),p("ngIf",r.field.description),a(),p("id",r.field.fieldId+"-string-"+r.field.stringId)("maxlength",r.field.attributes.length||1e3)("required",r.field.required),ye("ngModel",r.field.answer),G("aria-label",u(7,8,r.field.description||r.field.title||"text")))},dependencies:[ee,X,We,ko,Ie,He,F,hi,T],styles:[".field[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0;flex:1}.field[_ngcontent-%COMP%] .field-wrapper[_ngcontent-%COMP%]{width:100%}.field[_ngcontent-%COMP%] .field-wrapper[_ngcontent-%COMP%] .string-wrapper[_ngcontent-%COMP%]{display:flex;width:auto;flex-direction:column;padding:var(--field-controls-vertical-padding, 1.8rem) var(--field-controls-horizontal-padding, 1rem);background-color:#fff;border-radius:8px}.field[_ngcontent-%COMP%] .field-wrapper[_ngcontent-%COMP%] .string-wrapper[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0}.field[_ngcontent-%COMP%] .field-wrapper[_ngcontent-%COMP%] .string-wrapper[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.75rem;padding-bottom:.3rem}.field[_ngcontent-%COMP%] .field-wrapper[_ngcontent-%COMP%] .string-wrapper[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{border:1px solid #949494;flex:1;min-height:10vh;padding:.5rem;border-radius:8px;line-height:1rem}.field[_ngcontent-%COMP%] .field-wrapper[_ngcontent-%COMP%] .string-wrapper[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] textarea.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}@media(min-width:700px){.field[_ngcontent-%COMP%] .string-wrapper[_ngcontent-%COMP%]{margin-bottom:1rem;padding:var(--field-controls-vertical-padding, 1.8rem) var(--field-controls-horizontal-padding-medium, 2.5rem)!important}}"]});let n=e;return n})();
8function sb(n,e){if(n&1&&(s(0,"option",7),f(1),d(2,"translate"),l()),n&2){let t=g().$implicit;p("ngValue",t),a(),y(" ",u(2,2,t.title)," ")}}function lb(n,e){if(n&1&&(se(0),C(1,sb,3,4,"option",6),le()),n&2){let t=e.$implicit,i=g();a(),p("ngIf",i.isVariantSelectable(t))}}var w0=(()=>{let e=class e extends pt{ngOnInit(){this.extendVariantListWithDefaultValue(),this.initSelectedVariant()}changeSelectedVariant(){this.applyAnswer(this.selectedVariant)}parseAnswer(i){this.field.answer=i.id?[i.id]:null}isVariantSelectable(i){let o=this.primaryField.variantList[this.variantIndex].conditionalFieldList;if(o.length<=1)return!0;for(let r=0;r<o.length;r++)if(r!==this.identity&&o[r].some(c=>c.fieldId===this.field.fieldId&&c.answer?.includes(i.id)))return!1;return!0}initSelectedVariant(){this.field.answer?.length>0&&this.field.variantList.length>0&&(this.selectedVariant=this.field.variantList.find(({id:i})=>this.field.answer.includes(i))),this.selectedVariant||(this.selectedVariant=this.field.variantList[0])}extendVariantListWithDefaultValue(){let i={id:0,title:"Select",variantId:0,isDeleted:!1,conditionalFieldList:[],excludingQuestionList:[],excludingVariantList:[],order:0,score:0};this.field.variantList.some(({id:o})=>o===0)||this.field.variantList.unshift(i)}};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-variant-multi"]],inputs:{variantIndex:"variantIndex",identity:"identity"},standalone:!1,features:[Y],decls:8,vars:7,consts:[[1,"field"],[1,"question"],[1,"variant"],[3,"for"],[1,"variant-select",3,"ngModelChange","id","ngModel"],[4,"ngFor","ngForOf"],[3,"ngValue",4,"ngIf"],[3,"ngValue"]],template:function(o,r){o&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"label",3),f(4),d(5,"translate"),l(),s(6,"select",4),Me("ngModelChange",function(m){return Pe(r.selectedVariant,m)||(r.selectedVariant=m),m}),P("ngModelChange",function(){return r.changeSelectedVariant()}),C(7,lb,2,1,"ng-container",5),l()()()()),o&2&&(a(3),p("for","select-"+r.field.fieldId+"-"+r.variantIndex+"-"+r.identity),a(),b(u(5,5,r.field.title)),a(2),p("id","select-"+r.field.fieldId+"-"+r.variantIndex+"-"+r.identity),ye("ngModel",r.selectedVariant),a(),p("ngForOf",r.field.variantList))},dependencies:[An,En,kn,X,Ie,ue,F,T],styles:[".field[_ngcontent-%COMP%]{padding:var(--field-controls-vertical-padding, 0) var(--field-controls-horizontal-padding, 1rem);margin-bottom:.5rem}.field[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%]{display:flex;align-items:center}.field[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{flex:.5;font-weight:400;font-family:Roboto-regular,sans-serif;font-size:.8rem}.field[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{line-height:2rem;height:6vh;min-height:2rem;padding:0 .5rem;border-radius:0;appearance:none;border:1px solid #e6e6e6;display:block;flex:.5;width:100%;margin:0 -.04rem .8rem;color:#000}"]});let n=e;return n})();var I0=n=>({primaryField:n}),db=n=>({chosen:n}),mb=(n,e,t)=>({chosen:n,disabled:e,"with-conditional-field":t}),gb=()=>({name:"trash-new",color:"#949494"}),ub=()=>["variant","radio","dropdown","scale","checkbox"],fb=()=>["numeric","custom_waist"],hb=()=>["height"],_b=()=>["custom_bmi"],Cb=()=>["string"],vb=()=>["date","date_calendar"],yb=()=>["date_part"];function Pb(n,e){n&1&&Lt(0)}function Mb(n,e){if(n&1&&(s(0,"div",4)(1,"lib-accordion",5)(2,"div",6),C(3,Pb,1,0,"ng-container",7),l()()()),n&2){let t=e.$implicit;g(2);let i=V(4);a(),p("title",t.title),a(2),p("ngTemplateOutlet",i)("ngTemplateOutletContext",ce(3,I0,t))}}function bb(n,e){if(n&1&&(se(0),C(1,Mb,4,5,"div",3),d(2,"asFieldTypeArray"),d(3,"sortAscByProp"),le()),n&2){let t=g();a(),p("ngForOf",D(3,3,u(2,1,t.question.fieldList),"order"))}}function xb(n,e){if(n&1&&(s(0,"h1",13),f(1),l()),n&2){let t=g().$implicit;a(),y(" ",t.title," ")}}function Ob(n,e){if(n&1&&(s(0,"div",14),f(1),d(2,"translate"),l()),n&2){let t=g(4);a(),Vt("",u(2,2,"Question")," ",t.questionCounter)}}function wb(n,e){if(n&1&&(s(0,"div",15),f(1),l()),n&2){let t=g(4);a(),y(" ",t.viewQuestion.description," ")}}function Sb(n,e){n&1&&Lt(0)}function Ib(n,e){if(n&1&&(s(0,"div",6),C(1,xb,2,1,"h1",10)(2,Ob,3,4,"div",11)(3,wb,2,1,"div",12)(4,Sb,1,0,"ng-container",7),l()),n&2){let t=e.$implicit,i=g(3),o=V(4);a(),p("ngIf",t.title),a(),p("ngIf",i.questionCounter),a(),p("ngIf",i.viewQuestion.description),a(),p("ngTemplateOutlet",o)("ngTemplateOutletContext",ce(5,I0,t))}}function Tb(n,e){if(n&1&&(s(0,"div",4),C(1,Ib,5,7,"div",9),d(2,"asFieldTypeArray"),l(
8)),n&2){let t=g(2);a(),p("ngForOf",u(2,1,t.viewQuestion.fieldList))}}function kb(n,e){if(n&1&&C(0,Tb,3,3,"div",8),n&2){let t=g();p("ngIf",t.viewQuestion)}}function Ab(n,e){if(n&1){let t=S();s(0,"button",27),d(1,"translate"),P("click",function(){x(t);let o=g().index,r=g().$implicit,c=g(2);return O(c.removeConditionalFieldList(r.conditionalFieldList,o))}),v(2,"lib-svg-icon",28),l()}n&2&&(G("aria-label",u(1,2,"Remove")),a(2),p("params",A(4,gb)))}function Eb(n,e){if(n&1&&v(0,"app-questionnaire-field-variant-multi",35),n&2){let t=g().$implicit,i=g(2).index,o=g().index,r=g().primaryField;p("extendClass","inline")("field",t)("identity",i)("variantIndex",o)("primaryField",r)}}function Fb(n,e){if(n&1&&(v(0,"app-questionnaire-field-numeric",36),d(1,"translate")),n&2){let t=g().$implicit,i=g(4).primaryField;p("desc",u(1,4,"age"))("extendClass","inline")("field",t)("primaryField",i)}}function Lb(n,e){if(n&1&&(v(0,"app-questionnaire-field-height",36),d(1,"translate")),n&2){let t=g().$implicit,i=g(4).primaryField;p("desc",u(1,4,"age"))("extendClass","inline")("field",t)("primaryField",i)}}function Db(n,e){if(n&1&&v(0,"app-questionnaire-field-bmi",37),n&2){let t=g().$implicit,i=g(4).primaryField;p("extendClass","inline")("field",t)("primaryField",i)}}function Bb(n,e){if(n&1&&v(0,"app-questionnaire-field-string",37),n&2){let t=g().$implicit,i=g(4).primaryField;p("extendClass","inline")("field",t)("primaryField",i)}}function Rb(n,e){if(n&1&&v(0,"app-questionnaire-field-date",37),n&2){let t=g().$implicit,i=g(4).primaryField;p("extendClass","inline")("field",t)("primaryField",i)}}function Vb(n,e){if(n&1&&v(0,"app-questionnaire-field-date-part",37),n&2){let t=g().$implicit,i=g(4).primaryField;p("extendClass","inline")("field",t)("primaryField",i)}}function Nb(n,e){if(n&1&&(s(0,"div",31),C(1,Eb,1,5,"app-questionnaire-field-variant-multi",32),d(2,"includes"),C(3,Fb,2,6,"app-questionnaire-field-numeric",33),d(4,"includes"),C(5,Lb,2,6,"app-questionnaire-field-height",33),d(6,"includes"),C(7,Db,1,3,"app-questionnaire-field-bmi",34),d(8,"includes"),C(9,Bb,1,3,"app-questionnaire-field-string",34),d(10,"includes"),C(11,Rb,1,3,"app-questionnaire-field-date",34),d(12,"includes"),C(13,Vb,1,3,"app-questionnaire-field-date-part",34),d(14,"includes"),l()),n&2){let t=e.$implicit,i=g(5);a(),p("ngIf",D(2,7,A(28,ub),i.viewType(t))),a(2),p("ngIf",D(4,10,A(29,fb),i.viewType(t))),a(2),p("ngIf",D(6,13,A(30,hb),i.viewType(t))),a(2),p("ngIf",D(8,16,A(31,_b),i.viewType(t))),a(2),p("ngIf",D(10,19,A(32,Cb),i.viewType(t))),a(2),p("ngIf",D(12,22,A(33,vb),i.viewType(t))),a(2),p("ngIf",D(14,25,A(34,yb),i.viewType(t)))}}function Ub(n,e){if(n&1&&(s(0,"fieldset",29),C(1,Nb,15,35,"div",30),s(2,"legend",17),f(3),l()()),n&2){let t=g().$implicit,i=g().$implicit;a(),p("ngForOf",t),a(2),y(" ",i.title," ")}}function qb(n,e){if(n&1){let t=S();s(0,"p",38)(1,"button",39),P("click",function(){x(t);let o=g().index,r=g().$implicit,c=g(2);return O(c.addConditionalFieldList(r.conditionalFieldList,o+1))}),f(2),d(3,"translate"),l()()}if(n&2){let t=g(2).$implicit,i=g().primaryField;a(),G("aria-describedby","variant-"+t.id+"-field-"+i.fieldId),a(),y(" ",u(3,2,"+ ADD ONE MORE")," ")}}function zb(n,e){if(n&1&&(s(0,"div",23),C(1,Ab,3,5,"button",24)(2,Ub,4,2,"fieldset",25)(3,qb,4,4,"p",26),l()),n&2){let t=e.$implicit,i=e.index,o=e.last,r=g().$implicit,c=g(2);p("id",Sp("paragraph-",i+1)),a(),p("ngIf",r.conditionalFieldList.length>1),a(),p("ngIf",c.isChosenVariant(r)),a(),p("ngIf",c.isChosenVariant(r)&&t.length>0&&o)}}function jb(n,e){if(n&1){let t=S();s(0,"div",19)(1,"input",20),P("change",function(){let o=x(t).$implicit,r=g(2);return O(r.applyAnswer(o))}),l(),s(2,"label",21),f(3),l(),C(4,zb,4,5,"div",22),d(5,"asFieldTypeDoubleArray"),l()}if(n&2){let t=e.$implicit,i=g().primaryField,o=g();p("ngClass",ce(8,db,o.isChosenVariant(t))),a(),p("id","variant-"+t.id+"-field-"+i.fieldId),a(),p("ngClass",_a(10,mb,o.isChosenVariant(t),o.isDisabledVariant(t),t.conditionalFieldList.length))("for","variant-"+t.id+"-field-"+i.fieldId),a(),y(" ",t.title," "),a(),p("ngForOf",u(5,6,t.conditionalFieldList))}}function Wb(n,e){if(n&1&&(s(0,"fieldset",16)(1,"legend",17),f(2),l(),C(3,jb,6,14,"div",18),d(4,"asVariantTypeArray"),d(5,"sortAscByProp"),l()),n&2){let t=e.primaryField;
8a(2),b(t.title),a(),p("ngForOf",D(5,4,u(4,2,t.variantList),"order"))}}var T0=(()=>{let e=class e extends fi{constructor(){super(...arguments),this.isViewTemplateCollapsed=!1}isChosenVariant(i){return this.questionnaireService.isVariantInFieldAnswer(i,this.supportAnswer)}isDisabledVariant(i){return this.questionnaireService.isVariantDisabled(i)}addConditionalFieldList(i,o){let r=(0,S0.default)([],i[0]),c=o+1;r.forEach(m=>m.answer=null),i.push(r),setTimeout(()=>document.querySelector("#paragraph-"+c).scrollIntoView({behavior:"smooth"}),100)}removeConditionalFieldList(i,o){i.splice(o,1),this.prepareViewQuestionAdditional()}applyAnswer(i){let o=this.isViewTemplateCollapsed&&this.question?this.question.fieldList:this.viewQuestion.fieldList,r=this.questionnaireService.selectPrimaryField(o);r.answer=r.answer||[];let c=r.answer.indexOf(i.id),m=!0;if(c>-1&&(this.questionnaireService.isFieldMultiAnswerAllowed(r)||!r.required)?(!r.required||r.answer.length>1)&&(m=!1,r.answer.splice(c,1)):this.questionnaireService.isFieldMultiAnswerAllowed(r)?c===-1&&r.answer.push(i.id):r.answer=[i.id],r.answer?this.supportAnswer=r.answer:r.answer=this.supportAnswer,this.prepareFieldView(r,i),this.questionnaireService.refreshQuestionListByFieldAndForm(r,this.form),!this.isNextButtonLocked()&&m){let _=i.conditionalFieldList;e:for(let M of _)for(let I of M)if(I.typeView===Mr.DROPDOWN&&(this.questionnaireService.updateField(I),this.isNextButtonLocked()))break e}}viewType(i){return i.typeView!==null?i.typeView:i.type}prepareFieldView(i,o){this.questionnaireService.refreshVariantListByField(i,o),this.questionnaireService.updateField(i,!0)}refreshQuestionListInGroupList(i){this.questionnaireService.refreshQuestionListByForm(this.form,i)}prepareViewQuestionAdditional(){if(this.viewQuestion||this.question&&this.isViewTemplateCollapsed){let i=this.isViewTemplateCollapsed&&this.question?this.question.fieldList:this.viewQuestion.fieldList,o=this.questionnaireService.selectPrimaryField(i);this.supportAnswer=o.answer,this.prepareFieldView(o)}setTimeout(()=>{document.querySelector("#addConditionalField")?.scrollIntoView({block:"end",behavior:"smooth"})},100)}};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-question-multi"]],inputs:{questionCounter:"questionCounter",isViewTemplateCollapsed:"isViewTemplateCollapsed",question:"question"},standalone:!1,features:[Y],decls:5,vars:2,consts:[["standardViewTemplateTpl",""],["variantListTpl",""],[4,"ngIf","ngIfElse"],["class","wrap",4,"ngFor","ngForOf"],[1,"wrap"],[3,"title"],[1,"question"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","wrap",4,"ngIf"],["class","question",4,"ngFor","ngForOf"],["class","title",4,"ngIf"],["class","question-counter",4,"ngIf"],["class","desc",4,"ngIf"],[1,"title"],[1,"question-counter"],[1,"desc"],[1,"variant-list"],[1,"cdk-visually-hidden"],["class","variant-item",3,"ngClass",4,"ngFor","ngForOf"],[1,"variant-item",3,"ngClass"],["type","checkbox",1,"cdk-visually-hidden",3,"change","id"],[1,"variant",3,"ngClass","for"],["class","paragraph",3,"id",4,"ngFor","ngForOf"],[1,"paragraph",3,"id"],["type","button","class","remove",3,"click",4,"ngIf"],["class","paragraph-wrapper",4,"ngIf"],["class","buttons questionnaire-buttons","id","addConditionalField",4,"ngIf"],["type","button",1,"remove",3,"click"],[1,"icon",3,"params"],[1,"paragraph-wrapper"],["class","paragraph-field",4,"ngFor","ngForOf"],[1,"paragraph-field"],[3,"extendClass","field","identity","variantIndex","primaryField",4,"ngIf"],[3,"desc","extendClass","field","primaryField",4,"ngIf"],[3,"extendClass","field","primaryField",4,"ngIf"],[3,"extendClass","field","identity","variantIndex","primaryField"],[3,"desc","extendClass","field","primaryField"],[3,"extendClass","field","primaryField"],["id","addConditionalField",1,"buttons","questionnaire-buttons"],["type","button",1,"add-field",3,"click"]],template:function(o,r){if(o&1&&C(0,bb,4,6,"ng-container",2)(1,kb,1,1,"ng-template",null,0,pe)(3,Wb,6,7,"ng-template",null,1,pe),o&2){let c=V(2);p("ngIf",r.isViewTemplateCollapsed&&r.question)("ngIfElse",c)}},dependencies:[He,ue,F,Pi,U,us,bl,P0,xl,Ol,wl,Sl,w0,Xi,T,Un,Sd,Id,Oi],styles:[".wrap[_ngcontent-%COMP%]{width:100%;background-color:#f5f5f5}.wrap[_ngcontent-%COMP%] > .question[_ngcontent-%COMP%]{padding:1.2rem 0 .6rem}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{margin:0 auto;overflow:auto;-webkit-overflow-scrolling:touch}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{padding:0 1rem;line-height:1.5rem;letter-spacing:.23px}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-bottom:1rem;font-size:1.125rem;color:#064060;text-align:center;line-height:1.31rem;font-family:Roboto-bold,sans-serif}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{text-align:left}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%]{margin-top:1.25rem;padding:2px}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item.chosen[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%]{display:block}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus-visible + label[_ngcontent-%COMP%]{outline:solid 2px #2A7EFB}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%]{display:flex;color:#505050;justify-content:center;padding:1rem;background-color:#fff;border-radius:8px;width:100%;box-sizing:border-box;font-family:Roboto-medium;align-items:center;cursor:pointer;margin:.4rem auto 0;min-height:2.4rem;transition:all linear .5s}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%]:hover{opacity:.8}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant[disabled][_ngcontent-%COMP%]{cursor:default}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:1rem;background-color:var(--branding-primary-color);border-radius:8px;width:100%;box-sizing:border-box;font-family:Roboto-medium;align-items:center;cursor:pointer}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%]:hover{opacity:.8}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant.chosen[disabled][_ngcontent-%COMP%]{cursor:default}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant.chosen.with-conditional-field[_ngcontent-%COMP%]{border-radius:8px 8px 0 0}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .variant.disabled[_ngcontent-%COMP%]{opacity:.6}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%]{display:none;border:1px solid rgba(6,64,96,.5);position:relative;border-top:0;border-bottom:1px solid rgba(128,128,128,.2);background:#fff}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%]:last-child{border-radius:0 0 8px 8px;border-bottom:1px solid rgba(6,64,96,.5)}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{position:absolute;top:1rem;right:1rem;padding:0;border:0;background:transparent;line-height:0;cursor:pointer}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%] svg, .wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{min-width:.7rem;min-height:.7rem}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%]{padding:2.5rem 1.25rem 1rem;display:flex;flex-flow:wrap}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(2n).paragraph-field{padding-left:.625rem}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] [_ngcontent-%COMP%]:nth-child(odd).paragraph-field{padding-right:.625rem}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%]{display:flex;flex:1;min-width:50%;max-width:50%;box-sizing:border-box}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] .field.inline[_ngcontent-%COMP%]{display:none}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-variant-multi{width:100%}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-variant-multi .field{padding:0;margin:0}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-variant-multi .field .question{padding-top:0}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-variant-multi .variant{flex-direction:column;align-items:flex-start}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-variant-multi .variant label{display:inline;font-size:.75rem;line-height:1.5rem;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-variant-multi .variant select{border-radius:8px;height:auto;padding:.625rem;font-size:1rem;line-height:1.18rem;border:1px solid #949494;color:#757575;background:#fff;margin-bottom:0}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-variant-multi .variant select.ng-dirty{border-color:#505050;color:#505050}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-numeric .title, .wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-string .title{font-size:.75rem;font-family:Roboto-regular,sans-serif;text-align:left;margin:0;line-height:1.5rem;padding:0;color:#505050}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-numeric .question, .wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-string .question{padding:0}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-string{width:100%}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-string .string-wrapper{padding:0}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-date-part .title{display:none}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-date-part .date-wrapper{padding:.5rem 0 0}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .paragraph-wrapper[_ngcontent-%COMP%] .paragraph-field[_ngcontent-%COMP%] app-questionnaire-field-height .question label{align-items:flex-start}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%]
8 .questionnaire-buttons[_ngcontent-%COMP%]{display:flex;padding:0 1rem 1rem}.wrap[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-list[_ngcontent-%COMP%] .variant-item[_ngcontent-%COMP%] .paragraph[_ngcontent-%COMP%] .questionnaire-buttons[_ngcontent-%COMP%] .add-field[_ngcontent-%COMP%]{color:#064060;background:none;font-size:.75rem;font-family:Roboto-bold,sans-serif;cursor:pointer}@media(min-width:700px){.paragraph-wrapper[_ngcontent-%COMP%]{padding-left:2.5rem!important;padding-right:2.5rem!important}.remove[_ngcontent-%COMP%]{right:2.5rem!important}.questionnaire-buttons[_ngcontent-%COMP%]{padding-left:2.5rem}}"]});let n=e;return n})();var Gb=(n,e,t)=>({chosen:n,disabled:e,"with-conditional-field":t});function Hb(n,e){if(n&1&&v(0,"app-questionnaire-field-header",5),n&2){let t=g();p("field",t.field)("question",t.question)("questionCounter",t.questionCounter)}}function $b(n,e){if(n&1&&v(0,"app-questionnaire-field-common",11),n&2){let t=e.$implicit,i=g(3);p("ngClass",t.typeView||t.type)("form",i.form)("primaryField",i.primaryField)("field",t)}}function Kb(n,e){if(n&1&&(se(0),C(1,$b,1,4,"app-questionnaire-field-common",10),d(2,"asFieldTypeSingleArray"),d(3,"sortAscByProp"),le()),n&2){let t=g().$implicit;a(),p("ngForOf",D(3,3,u(2,1,t.conditionalFieldList),"order"))}}function Yb(n,e){if(n&1){let t=S();s(0,"div",6)(1,"input",7),P("change",function(){let o=x(t).$implicit,r=g();return O(r.applyAnswer(o))}),l(),s(2,"label",8),f(3),l(),C(4,Kb,4,6,"ng-container",9),l()}if(n&2){let t=e.$implicit,i=g();a(),p("id","variant-"+t.id+"-field-"+i.primaryField.fieldId)("checked",i.isChosenVariant(t)),a(),p("ngClass",_a(6,Gb,i.isChosenVariant(t),i.isDisabledVariant(t),t.conditionalFieldList.length))("for","variant-"+t.id+"-field-"+i.primaryField.fieldId),a(),y(" ",t.title," "),a(),p("ngIf",i.isChosenVariant(t)&&t.conditionalFieldList.length)}}var Yn=(()=>{let e=class e extends pt{ngOnInit(){this.field.answer=this.field.answer||[],super.ngOnInit(),this.questionnaireService.refreshVariantListByField(this.field)}parseAnswer(i){let o=this.field.answer.indexOf(i.id);this.field.answer.length>0&&!this.questionnaireService.isFieldMultiAnswerAllowed(this.field)&&this.field.answer.forEach(r=>{r!==i.id&&this.field.variantList.forEach(c=>{c.id===r&&c.conditionalFieldList?.length&&c.conditionalFieldList.forEach(_=>{if(_.required&&!_.answer){let M=this.field.answer.indexOf(c.id);this.field.answer.splice(M,1)}})})}),o>-1&&(this.questionnaireService.isFieldMultiAnswerAllowed(this.field)||!this.field.required)?(!this.field.required||this.field.answer.length>1)&&this.field.answer.splice(o,1):this.questionnaireService.isFieldMultiAnswerAllowed(this.field)?o===-1&&this.field.answer.push(i.id):this.field.answer=[i.id],this.questionnaireService.refreshVariantListByField(this.field,i),this.questionnaireService.refreshQuestionListByFieldAndForm(this.field,this.form),this.conditionalFieldList=i.conditionalFieldList||[]}isChosenVariant(i){return this.questionnaireService.isVariantInFieldAnswer(i,this.field.answer)}isDisabledVariant(i){return this.questionnaireService.isVariantDisabled(i)}};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-variant"]],inputs:{form:"form",questionCounter:"questionCounter"},standalone:!1,features:[Y],decls:7,vars:6,consts:[[1,"field"],[3,"field","question","questionCounter",4,"ngIf"],[1,"question"],[1,"cdk-visually-hidden"],["class","variant-wrap",4,"ngFor","ngForOf"],[3,"field","question","questionCounter"],[1,"variant-wrap"],["type","checkbox",1,"cdk-visually-hidden",3,"change","id","checked"],[1,"variant",3,"ngClass","for"],[4,"ngIf"],[3,"ngClass","form","primaryField","field",4,"ngFor","ngForOf"],[3,"ngClass","form","primaryField","field"]],template:function(o,r){o&1&&(s(0,"div",0),C(1,Hb,1,3,"app-questionnaire-field-header",1),s(2,"fieldset",2)(3,"legend",3),f(4),l(),C(5,Yb,5,10,"div",4),d(6,"sortAscByProp"),l()()),o&2&&(a(),p("ngIf",!r.isViewTemplateCollapsed),a(3),b(r.field.title),a(),p("ngForOf",D(6,3,r.field.variantList,"order")))},styles:['.field[_ngcontent-%COMP%]{display:block;margin:0 auto;text-align:center}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:auto}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:.625rem}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus-visible + label[_ngcontent-%COMP%]{border:solid 2px #2A7EFB}.field[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%]{display:flex;color:#505050;justify-content:center;padding:var(--field-variant-option-vertical-padding, 1rem) 1rem;background-color:var(--field-variant-option-default-color, #fff);width:100%;box-sizing:border-box;font-family:var(--field-variant-option-font-family, "Roboto-bold", sans-serif);align-items:center;cursor:pointer;min-height:2.4rem;transition:all linear .2s;border-radius:8px;border:solid 2px transparent}.field[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%]:hover{opacity:.8}.field[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.field[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.field[_ngcontent-%COMP%] .variant[disabled][_ngcontent-%COMP%]{cursor:default}.field[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:var(--field-variant-option-vertical-padding, 1rem) 1rem;background-color:var(--branding-primary-color);width:100%;box-sizing:border-box;font-family:var(--field-variant-option-font-family, "Roboto-bold", sans-serif);align-items:center;cursor:pointer;border-radius:8px}.field[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%]:hover{opacity:.8}.field[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.field[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.field[_ngcontent-%COMP%] .variant.chosen[disabled][_ngcontent-%COMP%]{cursor:default}.field[_ngcontent-%COMP%] .variant.chosen.with-conditional-fields[_ngcontent-%COMP%]{border-radius:8px 8px 0 0}.field[_ngcontent-%COMP%] .variant.disabled[_ngcontent-%COMP%]{opacity:.6}.field[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%]{display:block;border:var(--field-variant-option-conditional-fields-border-size, 1px) solid rgba(6,64,96,.5);border-top:none;border-radius:0 0 8px 8px}.field[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%] .title{text-align:left;font-family:Roboto-regular,sans-serif;color:#505050;font-size:1rem;margin-bottom:var(--secondary-question-variant-header-bottom-margin, 1rem);padding:var(--secondary-question-header-title-vertical-padding, 0) var(--secondary-question-header-title-horizontal-padding, 1rem)}.field[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%] .wrapper{background-color:#fff;border-radius:0 0 8px 8px}.field[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%] app-questionnaire-field-height .question label{align-items:flex-start}.field[_ngcontent-%COMP%] app-questionnaire-field-common.scale[_ngcontent-%COMP%], .field[_ngcontent-%COMP%] app-questionnaire-field-common.variant[_ngcontent-%COMP%], .field[_ngcontent-%COMP%] app-questionnaire-field-common.dropdown[_ngcontent-%COMP%]{border:none;margin-bottom:.5rem}.field[_ngcontent-%COMP%] app-questionnaire-field-common.scale[_ngcontent-%COMP%] + .variant[_ngcontent-%COMP%], .field[_ngcontent-%COMP%] app-questionnaire-field-common.variant[_ngcontent-%COMP%] + .variant[_ngcontent-%COMP%], .field[_ngcontent-%COMP%] app-questionnaire-field-common.dropdown[_ngcontent-%COMP%] + .variant[_ngcontent-%COMP%]{border-radius:8px}.field[_ngcontent-%COMP%] app-questionnaire-field-common.scale[_ngcontent-%COMP%] .title, .field[_ngcontent-%COMP%] app-questionnaire-field-common.variant[_ngcontent-%COMP%] .title, .field[_ngcontent-%COMP%] app-questionnaire-field-common.dropdown[_ngcontent-%COMP%] .title{margin:1.5rem 0 var(--secondary-question-variant-header-bottom-margin, 1.5rem)}.field[_ngcontent-%COMP%] app-questionnaire-field-common.scale[_ngcontent-%COMP%] .wrapper, .field[_ngcontent-%COMP%] app-questionnaire-field-common.variant[_ngcontent-%COMP%] .wrapper, .field[_ngcontent-%COMP%] app-questionnaire-field-common.dropdown[_ngcontent-%COMP%] .wrapper{background-color:initial}']});let n=e;return n})();function Zb(n,e){if(n&1&&v(0,"app-questionnaire-field-header",5),n&2){let t=g();p("field",t.field)("question",t.question)("questionCounter",t.questionCounter)}}function Jb(n,e){if(n&1&&v(0,"app-questionnaire-field-common",14),n&2){let t=e.$implicit,i=g(3);p("form",i.form)("primaryField",i.primaryField)("field",t)}}function ex(n,e){if(n&1&&(s(0,"div",12),C(1,Jb,1,3,"app-questionnaire-field-common",13),d(2,"asFieldTypeSingleArray"),d(3,"sortAscByProp"),l()),n&2){let t=g().$implicit;a(),p("ngForOf",D(3,3,u(2,1,t.conditionalFieldList),"order"))}}function tx(n,e){if(n&1){let t=S();s(0,"div",6)(1,"label",7)(2,"input",8),P("change",function(){let o=x(t).$implicit,r=g();return O(r.applyAnswer(o))}),l(),v(3,"span",9),s(4,"strong",10),f(5),d(6,"translate"),l()(),C(7,ex,4,6,"div",11),l()}if(n&2){let t=e.$implicit,i=g();a(2),Z("checked",i.isChosenVariant(t)),p("name",i.field.fieldId),a(),Z("disabled",i.isDisabledVariant(t)),a(),Z("disabled",i.isDisabledVariant(t)),a(),y(" ",u(6,9,t.title||i.field.label||i.field.title||t.name)," "),a(2),p("ngIf",i.isChosenVariant(t)&&t.conditionalFieldList.length)}}var Il=(()=>{let e=class e extends Yn{};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-checkbox"]],standalone:!1,features:[Y],decls:8,vars:8,consts:[[1,"field"],[3,"field","question","questionCounter",4,"ngIf"],[1,"element-container"],[1,"cdk-visually-hidden"],["class","checkbox-wrapper",4,"ngFor","ngForOf"],[3,"field","question","questionCounter"],[1,"checkbox-wrapper"],[1,"element"],["type","checkbox",1,"checkbox",3,"change","name"],[1,"mark"],[1,"label"],["class","secondary-questions-list",4,"ngIf"],[1,"secondary-questions-list"],[3,"form","primaryField","field",4,"ngFor","ngForOf"],[3,"form","primaryField","field"]],template:function(o,r){o&1&&(s(0,"div",0),C(1,Zb,1,3,"app-questionnaire-field-header",1),s(2,"fieldset",2)(3,"legend",3),f(4),d(5,"translate"),l(),C(6,tx,8,11,"div",4),d(7,"sortAscByProp"),l()()),o&2&&(a(),p("ngIf",!r.isViewTemplateCollapsed),a(3),y(" ",u(5,3,r.field.title)," "),a(2),p("ngForOf",D(7,5,r.field.variantList,"order")))},styles:['.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%]{background-color:#fff;width:100%;border-radius:8px;padding:var(--field-controls-vertical-padding, 0) var(--field-controls-horizontal-padding, 1.5rem);box-sizing:border-box;min-width:0}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .checkbox-wrapper[_ngcontent-%COMP%]{padding:var(--field-checkbox-wrapper-vertical-padding, 0) 0}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;width:100%;margin:var(--field-checkbox-element-vertical-margin, 2rem) auto;text-align:left;align-items:inherit}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{height:2.5rem;width:2.5rem;background-color:#fff;border:1px solid #e6e6e6;margin:0 1rem;flex:.15}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:.85}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox].checked[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{margin-left:.7rem;margin-top:.1rem;width:1rem;height:1.4rem;border:solid var(--branding-primary-color);border-width:0 .3rem .3rem 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox].checked[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]{background-color:var(--branding-primary-color);border-color:var(--branding-primary-color)}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{width:1.1rem;height:1.1rem;flex:inherit;flex-shrink:0;border-color:#949494;border-radius:.3rem;margin:0 var(--field-checkbox-right-margin, 1rem) 0 0}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{margin-top:.13rem;margin-left:.33rem;width:.3rem;height:.5rem;border-width:0 .15rem .15rem 0;border-color:#fff}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark.disabled[_ngcontent-%COMP%]{opacity:.6}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{line-height:1.2rem}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .label.disabled[_ngcontent-%COMP%]{opacity:.6}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .secondary-questions-list[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%]{display:block;border-top:1px solid rgba(128,128,128,.2)}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .secondary-questions-list[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%]:last-child{border-bottom:1px solid rgba(128,128,128,.2)}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .secondary-questions-list[_ngcontent-%COMP%] .title{font-size:1rem;font-family:Roboto-regular,sans-serif;text-align:left;padding:var(--secondary-question-header-title-vertical-padding, 2rem) var(--secondary-question-header-title-horizontal-padding, 1.25rem) 0;margin:0 0 var(--secondary-question-variant-bottom-margin, 0) 0;color:#505050}.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%] .secondary-questions-list[_ngcontent-%COMP%] .string-wrapper{padding-top:0!important}@media(min-width:700px){.field[_ngcontent-%COMP%] .element-container[_ngcontent-%COMP%]{padding:var(--field-controls-vertical-padding, 0) var(--field-controls-horizontal-padding-medium, 2.5rem)}}']});let n=e;return n})();var nx=["signatureInput"];function ox(n,e){if(n&1&&v(0,"app-questionnaire-field-header",4),n&2){let t=g();p("field",t.field)("question",t.question)("questionCounter",t.questionCounter)}}var k0=(()=>{let e=class e extends pt{constructor(i,o){super(i),this.questionnaireService=i,this.dataService=o}ngAfterViewInit(){if(this.drawing=this.dataService.drawingData.getValue()||[],this.drawing.length>0)for(let i of this.drawing)i.fieldId===this.field.fieldId&&this.signatureInput.setData(i.drawingImg,{width:i.width,height:i.height})}onUpdate(i){let o=!1;this.field.answer=i.toDataURL();for(let r of this.drawing)r.fieldId===this.field.fieldId&&(r.drawingImg=i.toDataURL(),r.
8width=i.getCanvas().width,r.height=i.getCanvas().height,o=!0);o||this.drawing.push({fieldId:this.field.fieldId,drawingImg:i.toDataURL(),width:i.getCanvas().width,height:i.getCanvas().height}),this.dataService.updateDrawingData(this.drawing),this.applyAnswer(this.field.answer.length>0)}onClear(){if(this.drawing.length>0){for(let i=0;i<this.drawing.length;i++)if(this.drawing[i].fieldId===this.field.fieldId){this.drawing.splice(i,1);break}}this.dataService.updateDrawingData(this.drawing),this.field.answer="",this.applyAnswer(!1)}};e.\u0275fac=function(o){return new(o||e)(h(Et),h(zt))},e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-drawing"]],viewQuery:function(o,r){if(o&1&&ft(nx,5),o&2){let c;ht(c=_t())&&(r.signatureInput=c.first)}},inputs:{questionCounter:"questionCounter"},standalone:!1,features:[Y],decls:4,vars:1,consts:[["signatureInput",""],[1,"field"],[3,"field","question","questionCounter",4,"ngIf"],[3,"update","clear"],[3,"field","question","questionCounter"]],template:function(o,r){if(o&1){let c=S();s(0,"div",1),C(1,ox,1,3,"app-questionnaire-field-header",2),s(2,"app-signature-input",3,0),P("update",function(_){return x(c),O(r.onUpdate(_))})("clear",function(){return x(c),O(r.onClear())}),l()()}o&2&&(a(),p("ngIf",!r.isViewTemplateCollapsed))},dependencies:[$d,F,hi],styles:[".field[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;flex:1}app-signature-input[_ngcontent-%COMP%]{padding:var(--field-controls-vertical-padding, 1rem) var(--field-controls-horizontal-padding, 1.25rem);background-color:#fff;border-radius:8px}@media(min-width:700px){app-signature-input[_ngcontent-%COMP%]{padding:var(--field-controls-vertical-padding, 1rem) var(--field-controls-horizontal-padding-medium, 2.5rem)}}"]});let n=e;return n})();var ax=(n,e)=>({chosen:n,disabled:e});function sx(n,e){if(n&1&&v(0,"app-questionnaire-field-header",5),n&2){let t=g();p("field",t.field)("question",t.question)("questionCounter",t.questionCounter)}}function lx(n,e){if(n&1&&v(0,"app-questionnaire-field-common",14),n&2){let t=e.$implicit,i=g(3);p("form",i.form)("primaryField",i.primaryField)("field",t)}}function cx(n,e){if(n&1&&(s(0,"div",12),C(1,lx,1,3,"app-questionnaire-field-common",13),d(2,"asFieldTypeSingleArray"),d(3,"sortAscByProp"),l()),n&2){let t=g().$implicit;a(),p("ngForOf",D(3,3,u(2,1,t.conditionalFieldList),"order"))}}function px(n,e){if(n&1){let t=S();s(0,"div",6)(1,"label",7)(2,"input",8),P("input",function(){let o=x(t).$implicit,r=g();return O(r.applyAnswer(o))}),l(),v(3,"span",9),s(4,"span",10),f(5),d(6,"translate"),l()(),C(7,cx,4,6,"div",11),l()}if(n&2){let t=e.$implicit,i=g();a(2),p("value",wt(t.title))("name",i.field.fieldId)("ngClass",Dt(9,ax,i.isChosenVariant(t),i.isDisabledVariant(t)))("checked",i.isChosenVariant(t)),a(3),b(u(6,7,t.title)),a(2),p("ngIf",i.isChosenVariant(t)&&t.conditionalFieldList.length)}}var Tl=(()=>{let e=class e extends Yn{};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-radio"]],standalone:!1,features:[Y],decls:8,vars:8,consts:[[1,"field"],[3,"field","question","questionCounter",4,"ngIf"],[1,"question"],[1,"cdk-visually-hidden"],["class","variant-wrap",4,"ngFor","ngForOf"],[3,"field","question","questionCounter"],[1,"variant-wrap"],[1,"variant"],["type","radio",3,"input","value","name","ngClass","checked"],[1,"mark"],[1,"label"],["class","secondary-questions-list",4,"ngIf"],[1,"secondary-questions-list"],[3,"form","primaryField","field",4,"ngFor","ngForOf"],[3,"form","primaryField","field"]],template:function(o,r){o&1&&(s(0,"div",0),C(1,sx,1,3,"app-questionnaire-field-header",1),s(2,"fieldset",2)(3,"legend",3),f(4),d(5,"translate"),l(),C(6,px,8,12,"div",4),d(7,"sortAscByProp"),l()()),o&2&&(a(),p("ngIf",!r.isViewTemplateCollapsed),a(3),y(" ",u(5,3,r.field.title)," "),a(2),p("ngForOf",D(7,5,r.field.variantList,"order")))},styles:['.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:0 auto;text-align:center}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{display:flex;flex-direction:column;background-color:#fff;padding:var(--field-controls-vertical-padding, 1.25rem) var(--field-controls-horizontal-padding, 1.25rem);border-radius:8px;text-align:left;min-width:0}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%]{padding:var(--field-radio-variant-wrap-vertical-padding, 1rem) 0}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%]{display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;justify-content:flex-start}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{position:absolute;height:1.125rem;width:1.125rem;background-color:transparent;border:1px solid #949494;border-radius:50%;display:flex;align-items:center;justify-content:center}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:1.8rem;white-space:nowrap}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%], .field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]{background-color:var(--branding-primary-color);border-color:var(--branding-primary-color)}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{position:absolute;width:.5rem;height:.5rem;border-radius:50%;background:#fff}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{white-space:normal}.field[_ngcontent-%COMP%] .secondary-questions-list[_ngcontent-%COMP%]{margin-top:2rem}.field[_ngcontent-%COMP%] .secondary-questions-list[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%]{display:block;border-top:1px solid rgba(128,128,128,.2)}.field[_ngcontent-%COMP%] .secondary-questions-list[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%]:last-child{border-bottom:1px solid rgba(128,128,128,.2)}.field[_ngcontent-%COMP%] .secondary-questions-list[_ngcontent-%COMP%] .wrapper{background-color:#fff}.field[_ngcontent-%COMP%] .secondary-questions-list[_ngcontent-%COMP%] .title{font-size:1rem;font-family:Roboto-regular,sans-serif;text-align:left;padding:var(--secondary-question-header-title-vertical-padding, 2rem) var(--secondary-question-header-title-horizontal-padding, 1.25rem);margin:0 0 var(--secondary-question-variant-bottom-margin, 0) 0;color:#505050}.field[_ngcontent-%COMP%] .secondary-questions-list[_ngcontent-%COMP%] .string-wrapper{padding-top:0!important}.field[_ngcontent-%COMP%] .secondary-questions-list[_ngcontent-%COMP%] .question{padding:0 var(--secondary-question-radio-question-horizontal-padding, 1rem);margin:0}@media(min-width:700px){.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{padding:var(--field-controls-vertical-padding, 1.25rem) var(--field-controls-horizontal-padding-medium, 2.5rem)}}']});let n=e;return n})();var mx=()=>["signature"],gx=()=>["variant","dropdown","scale"],ux=()=>["radio"],fx=()=>["checkbox"],hx=()=>["numeric","custom_waist"],_x=()=>["custom_bmi"],Cx=()=>["height"],vx=()=>["string"],yx=()=>["date_part"];function Px(n,e){if(n&1&&v(0,"app-questionnaire-field-drawing",5),n&2){let t=g(2);p("questionCounter",t.questionCounter)("field",t.field)("primaryField",t.primaryField)("question",t.question)("isViewTemplateCollapsed",t.isViewTemplateCollapsed)}}function Mx(n,e){if(n&1&&v(0,"app-questionnaire-field-variant",6),n&2){let t=g(2);p("questionCounter",t.questionCounter)("form",t.form)("field",t.field)("question",t.question)("primaryField",t.primaryField)("isViewTemplateCollapsed",t.isViewTemplateCollapsed)}}function bx(n,e){if(n&1&&v(0,"app-questionnaire-field-radio",6),n&2){let t=g(2);p("questionCounter",t.questionCounter)("form",t.form)("field",t.field)("question",t.question)("primaryField",t.primaryField)("isViewTemplateCollapsed",t.isViewTemplateCollapsed)}}function xx(n,e){if(n&1&&v(0,"app-questionnaire-field-checkbox",6),n&2){let t=g(2);p("questionCounter",t.questionCounter)("form",t.form)("field",t.field)("question",t.question)("primaryField",t.primaryField)("isViewTemplateCollapsed",t.isViewTemplateCollapsed)}}function Ox(n,e){if(n&1&&v(0,"app-questionnaire-field-numeric",5),n&2){let t=g(2);p("questionCounter",t.questionCounter)("field",t.field)("primaryField",t.primaryField)("question",t.question)("isViewTemplateCollapsed",t.isViewTemplateCollapsed)}}function wx(n,e){if(n&1&&v(0,"app-questionnaire-field-bmi",7),n&2){let t=g(2);p("questionCounter",t.questionCounter)("field",t.field)("primaryField",t.primaryField)("question",t.question)}}function Sx(n,e){if(n&1&&v(0,"app-questionnaire-field-height",5),n&2){let t=g(2);p("questionCounter",t.questionCounter)("field",t.field)("primaryField",t.primaryField)("question",t.question)("isViewTemplateCollapsed",t.isViewTemplateCollapsed)}}function Ix(n,e){if(n&1&&v(0,"app-questionnaire-field-string",5),n&2){let t=g(2);p("questionCounter",t.questionCounter)("field",t.field)("primaryField",t.primaryField)("question",t.question)("isViewTemplateCollapsed",t.isViewTemplateCollapsed)}}function Tx(n,e){if(n&1&&v(0,"app-questionnaire-field-date-part",5),n&2){let t=g(2);p("questionCounter",t.questionCounter)("field",t.field)("primaryField",t.primaryField)("question",t.question)("isViewTemplateCollapsed",t.isViewTemplateCollapsed)}}function kx(n,e){if(n&1&&(s(0,"div",1),C(1,Px,1,5,"app-questionnaire-field-drawing",2),d(2,"includes"),C(3,Mx,1,6,"app-questionnaire-field-variant",3),d(4,"includes"),C(5,bx,1,6,"app-questionnaire-field-radio",3),d(6,"includes"),C(7,xx,1,6,"app-questionnaire-field-checkbox",3),d(8,"includes"),C(9,Ox,1,5,"app-questionnaire-field-numeric",2),d(10,"includes"),C(11,wx,1,4,"app-questionnaire-field-bmi",4),d(12,"includes"),C(13,Sx,1,5,"app-questionnaire-field-height",2),d(14,"includes"),C(15,Ix,1,5,"app-questionnaire-field-string",2),d(16,"includes"),C(17,Tx,1,5,"app-questionnaire-field-date-part",2),d(18,"includes"),l()),n&2){let t=g();a(),p("ngIf",D(2,9,A(36,mx),t.viewType)),a(2),p("ngIf",D(4,12,A(37,gx),t.viewType)),a(2),p("ngIf",D(6,15,A(38,ux),t.viewType)),a(2),p("ngIf",D(8,18,A(39,fx),t.viewType)),a(2),p("ngIf",D(10,21,A(40,hx),t.viewType)),a(2),p("ngIf",D(12,24,A(41,_x),t.viewType)),a(2),p("ngIf",D(14,27,A(42,Cx),t.viewType)),a(2),p("ngIf",D(16,30,A(43,vx),t.viewType)),a(2),p("ngIf",D(18,33,A(44,yx),t.field.type))}}var pr=(()=>
8{let e=class e extends pt{ngOnInit(){this.viewType=this.field.typeView||this.field.type,this.questionnaireService.updateField(this.field)}};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-field-common"]],inputs:{form:"form",questionCounter:"questionCounter"},standalone:!1,features:[Y],decls:1,vars:1,consts:[["class","wrapper",4,"ngIf"],[1,"wrapper"],[3,"questionCounter","field","primaryField","question","isViewTemplateCollapsed",4,"ngIf"],[3,"questionCounter","form","field","question","primaryField","isViewTemplateCollapsed",4,"ngIf"],[3,"questionCounter","field","primaryField","question",4,"ngIf"],[3,"questionCounter","field","primaryField","question","isViewTemplateCollapsed"],[3,"questionCounter","form","field","question","primaryField","isViewTemplateCollapsed"],[3,"questionCounter","field","primaryField","question"]],template:function(o,r){o&1&&C(0,kx,19,45,"div",0),o&2&&p("ngIf",r.field)},dependencies:[F,bl,Il,xl,k0,Ol,wl,Tl,Sl,Yn,Xi],encapsulation:2});let n=e;return n})();function Ex(n,e){if(n&1&&v(0,"app-questionnaire-question-multi",13),n&2){let t=g().$implicit,i=g(3);p("question",t)("isViewTemplateCollapsed",i.isViewTemplateCollapsed)}}function Fx(n,e){if(n&1&&(s(0,"div",15)(1,"lib-accordion",16),v(2,"app-questionnaire-field-common",17),l()()),n&2){let t=e.$implicit,i=g(2).$implicit,o=g(3);a(),p("title",t.title),a(),p("field",t)("primaryField",o.getPrimaryField(i.fieldList))("form",o.form)("question",i)("isViewTemplateCollapsed",o.isViewTemplateCollapsed)}}function Lx(n,e){if(n&1&&(C(0,Fx,3,6,"div",14),d(1,"asFieldTypeArray"),d(2,"sortAscByProp")),n&2){let t=g().$implicit;p("ngForOf",D(2,3,u(1,1,t.fieldList),"order"))}}function Dx(n,e){if(n&1&&(s(0,"div",11),C(1,Ex,1,2,"app-questionnaire-question-multi",12)(2,Lx,3,6,"ng-template",null,1,pe),l()),n&2){let t=e.$implicit,i=V(3);a(),p("ngIf",t.multi)("ngIfElse",i)}}function Bx(n,e){if(n&1&&(s(0,"div",9),C(1,Dx,4,2,"div",10),l()),n&2){let t=e.$implicit;a(),p("ngForOf",t.questionList)}}function Rx(n,e){if(n&1){let t=S();se(0),s(1,"div",4)(2,"h1",5),f(3),l(),C(4,Bx,2,1,"div",6),s(5,"div",7)(6,"button",8),P("click",function(){x(t);let o=g();return O(o.saveHHForm(!0))}),f(7),d(8,"translate"),l()()(),le()}if(n&2){let t=g();a(3),b(t.form.title),a(),p("ngForOf",t.form.groupList),a(2),p("disabled",t.isFormInvalid(t.form)),a(),y(" ",u(8,4,"SAVE")," ")}}function Vx(n,e){if(n&1&&v(0,"app-questionnaire-question-multi",22),n&2){g();let t=V(6);p("questionCounter",t.questionCounter)}}function Nx(n,e){if(n&1&&v(0,"app-questionnaire-field-common",24),n&2){let t=e.$implicit,i=e.first;g(2);let o=V(6),r=g(2);p("questionCounter",i?o.questionCounter:"")("field",t)("primaryField",r.primaryField)("form",r.form)("question",r.viewQuestion)}}function Ux(n,e){if(n&1&&(C(0,Nx,1,5,"app-questionnaire-field-common",23),d(1,"asFieldTypeArray"),d(2,"sortAscByProp")),n&2){let t=g(3);p("ngForOf",D(2,3,u(1,1,t.viewQuestion.fieldList),"order"))}}function qx(n,e){if(n&1){let t=S();se(0),s(1,"div",19),C(2,Vx,1,1,"app-questionnaire-question-multi",20)(3,Ux,3,6,"ng-template",null,1,pe),s(5,"app-questionnaire-form-pagination",21,2),P("save",function(){x(t);let o=g(2);return O(o.saveHHForm(!0))}),l()(),le()}if(n&2){let t=V(4),i=g(2);a(2),p("ngIf",i.viewQuestion.multi)("ngIfElse",t),a(3),p("prevRouteParams",i.prevRouteParams)("nextRouteParams",i.nextRouteParams)("viewQuestionOrder",i.viewQuestionOrder)("totalActiveQuestions",i.totalActiveQuestions)("formId",i.formId)}}function zx(n,e){if(n&1&&C(0,qx,7,7,"ng-container",18),n&2){let t=g();p("ngIf",t.viewQuestion)}}var kl=(()=>{let e=class e extends fi{get isViewTemplateCollapsed(){return this.form?.viewTemplate===$p.COLLAPSED}isFormInvalid(i){return this.questionnaireService.isFormInvalid(i)}getPrimaryField(i){return this.questionnaireService.selectPrimaryField(i)}saveHHForm(i){this.isViewTemplateCollapsed&&this.isFormInvalid(this.form)||super.saveHHForm(i)}refreshQuestionListInGroupList(i){this.questionnaireService.refreshQuestionListByForm(this.form,i)}};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-questionnaire-form-common"]],standalone:!1,features:[Y],decls:3,vars:2,consts:[["standardViewTemplateTpl",""],["commonFieldTpl",""],["paginationComponent",""],[4,"ngIf","ngIfElse"],[1,"questionnaire-form-wrapper"],[1,"form-title"],["class","questions-group-wrapper",4,"ngFor","ngForOf"],[1,"button-container"],["type","button",1,"save-form-btn",3,"click","disabled"],[1,"questions-group-wrapper"],["class","question-wrapper",4,"ngFor","ngForOf"],[1,"question-wrapper"],[3,"question","isViewTemplateCollapsed",4,"ngIf","ngIfElse"],[3,"question","isViewTemplateCollapsed"],["class","question-field",4,"ngFor","ngForOf"],[1,"question-field"],[3,"title"],[1,"field",3,"field","primaryField","form","question","isViewTemplateCollapsed"],[4,"ngIf"],[1,"question"],[3,"questionCounter",4,"ngIf","ngIfElse"],["formType","common",3,"save","prevRouteParam
8s","nextRouteParams","viewQuestionOrder","totalActiveQuestions","formId"],[3,"questionCounter"],["class","field",3,"questionCounter","field","primaryField","form","question",4,"ngFor","ngForOf"],[1,"field",3,"questionCounter","field","primaryField","form","question"]],template:function(o,r){if(o&1&&C(0,Rx,9,6,"ng-container",3)(1,zx,1,1,"ng-template",null,0,pe),o&2){let c=V(2);p("ngIf",r.form&&r.isViewTemplateCollapsed)("ngIfElse",c)}},dependencies:[ue,F,us,Ml,T0,pr,T,Un,Oi],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;background-color:#f5f5f5;padding:0 1rem;box-sizing:border-box;position:relative;height:100%;overflow:auto}.question[_ngcontent-%COMP%], .questionnaire-form-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%;background-color:#f5f5f5}app-questionnaire-form-pagination[_ngcontent-%COMP%]{margin-top:3.4rem}.questionnaire-form-wrapper[_ngcontent-%COMP%]{align-items:center}.questionnaire-form-wrapper[_ngcontent-%COMP%] .form-title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;font-size:1.125rem;margin:1.25rem auto 1.5rem;line-height:1.25rem;letter-spacing:.0325rem;text-align:center;color:#064060}.questions-group-wrapper[_ngcontent-%COMP%]{width:100%}.questions-group-wrapper[_ngcontent-%COMP%] + .questions-group-wrapper[_ngcontent-%COMP%], .questions-group-wrapper[_ngcontent-%COMP%] + .question-wrapper[_ngcontent-%COMP%], .questions-group-wrapper[_ngcontent-%COMP%] + .question-field[_ngcontent-%COMP%], .question-wrapper[_ngcontent-%COMP%] + .questions-group-wrapper[_ngcontent-%COMP%], .question-wrapper[_ngcontent-%COMP%] + .question-wrapper[_ngcontent-%COMP%], .question-wrapper[_ngcontent-%COMP%] + .question-field[_ngcontent-%COMP%], .question-field[_ngcontent-%COMP%] + .questions-group-wrapper[_ngcontent-%COMP%], .question-field[_ngcontent-%COMP%] + .question-wrapper[_ngcontent-%COMP%], .question-field[_ngcontent-%COMP%] + .question-field[_ngcontent-%COMP%]{margin-top:.625rem}.button-container[_ngcontent-%COMP%]{padding:3.5rem 0}.save-form-btn[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.75rem 1.5rem;background-color:var(--branding-primary-color, #064060);border-radius:8px;width:15rem;box-sizing:border-box;font-family:Roboto-bold;align-items:center;cursor:pointer;letter-spacing:.0275rem;line-height:1rem;font-size:.875rem;height:2.5rem}.save-form-btn[_ngcontent-%COMP%]:hover{opacity:.8}.save-form-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.save-form-btn[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.save-form-btn[disabled][_ngcontent-%COMP%]{cursor:default}.save-form-btn[disabled][_ngcontent-%COMP%]{opacity:.25}@media(min-width:700px){[_nghost-%COMP%]{padding:0 2.5rem}}"]});let n=e;return n})();var cp=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({imports:[Ht]});let n=e;return n})();_r(fi,[F,_0,cr,kl],[Xi]);_r(Il,[ue,F,pr,hi],[T,Ya,Oi]);_r(Tl,[He,ue,F,pr,hi],[T,Ya,Oi]);_r(Yn,[He,ue,F,pr,hi],[Ya,Oi]);function pp(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function A0(n,e){for(let[t,i]of Object.entries(e))if(i!==void 0){if(Array.isArray(i)){let o=n[t];Array.isArray(o)?o.splice(0,o.length,...i):n[t]=[...i];continue}if(pp(i)){let o=n[t];pp(o)||(n[t]={}),A0(n[t],i);continue}n[t]=i}}function E0(n,...e){for(let t of e)pp(t)&&A0(n,t);return n}var Y0=ia(Rl());var Wx=["contentContainer"],Qx=["contentTemplate"],Gx=()=>({name:"fingerprint",color:"#064060"}),Hx=()=>({name:"faceid",color:"#064060"});function $x(n,e){if(n&1){let t=S();s(0,"app-two-factor-auth",4),P("errorNotification",function(){x(t);let o=g();return O(o.errorNotification())})("twoFactorAuthCheck",function(o){x(t);let r=g();return O(r.onLogin(o))})("showLogin",function(){x(t);let o=g();return O(o.showLogin())}),l()}if(n&2){let t=g();p("error",t.error)}}function Kx(n,e){if(n&1&&Lt(0,5,1),n&2){g();let t=V(3);p("ngTemplateOutlet",t)}}function Yx(n,e){if(n&1&&v(0,"img",19),n&2){let t=g(2);p("src",t.logo,Kt)}}function Xx(n,e){if(n&1){let t=S();s(0,"lib-svg-icon",21),P("click",function(){x(t);let o=g(3);return O(o.showAuthAlert())}),l()}n&2&&p("params",A(1,Gx))}function Zx(n,e){if(n&1){let t=S();s(0,"lib-svg-icon",21),P("click",function(){x(t);let o=g(3);return O(o.showAuthAlert())}),l()}n&2&&p("params",A(1,Hx))}function Jx(n,e){if(n&1&&(se(0),C(1,Xx,1,2,"lib-svg-icon",20)(2,Zx,1,2,"lib-svg-icon",20),le()),n&2){let t=g(2);a(),p("ngIf",t.isLoginByFingerprintAvailable()),a(),p("ngIf",t.isLoginByFaceIdAvailable())}}function eO(n,e){if(n&1){let t=S();s(0,"div",6)(1,"header"),C(2,Yx,1,1,"img",7),s(3,"h1"),f(4),d(5,"translate"),l(),s(6,"p"),f(7),d(8,"translate"),l()(),s(9,"main")(10,"form",8),P("ngSubmit",function(){x(t);let o=g();return O(o.loginHandler())}),s(11,"label",9),f(12),d(13,"translate"),l(),v(14,"input",10),s(15,"label",11),f(16),d(17,"translate"),l(),v(18,"input",12),s(19,"p",13),f(20),d(21,"translate"),l(),s(22,"div",14)(23,"button",15),f(24),d(25,"translate"),l(),C(26,Jx,3,2,"ng-container",16),l(),v(27,"app-credential-recovery-link"),s(28,"a",17),d(29,"mergeCurrentQueryParams"),f(30),d(31,"translate"),l()()(),s(32,"footer")(33,"lib-select",18),d(34,"translate"),d(35,"async"),P("selectionOptionChange",function(o){x(t);let r=g();return O(r.setLanguage(o))}),l()()()}if(n&2){let t=g();a(2),p("ngIf",t.logo),a(2),b(u(5,16,"Log in")),a(3),b(u(8,18,"Welcome back! Please log in below.")),a(3),p("formGroup",t.loginForm),a(2),b(u(13,20,"Username")),a(2),p("libAutoFocus",!0),a(2),b(u(17,22,"Password")),a(4),y(" ",u(21,24,t.error==null?null:t.error.error.error_description)," "),a(3),G("aria-disabled",t.loginForm.invali
8d),a(),y(" ",u(25,26,"LOG IN")," "),a(2),p("ngIf",t.isBiometricAuthAvailable),a(2),p("queryParams",u(29,28,null)),a(2),b(u(31,30,"Register")),a(3),p("label",u(34,32,"language"))("ngModel",t.language)("options",u(35,34,t.languageList$))}}var dp=(()=>{let e=class e extends Es{constructor(i,o,r,c,m,_,M,I,k,R,N,W,K,Ee,Ke,ot,ze,Ye,ii,Bt,gt,yt,ni,oi,mr,Di,gr,ea){super(i,o,r,c,m,_,M,I,k,N,R,W,K,Ee,Ke,ot,ze,Ye,ii,Bt,gt,yt,ni,oi),this.fb=o,this.router=r,this.userService=c,this.deviceService=m,this.pushService=_,this.mobileDeviceService=M,this.configService=I,this.zone=k,this.simpleStorageService=R,this.asyncStorageService=N,this.errorService=W,this.authorizationService=K,this.logoutService=Ee,this.translateService=Ke,this.dialogsService=ot,this.activatedRoute=ze,this.appointmentApiService=Ye,this.userApiService=ii,this.loginByTicketService=Bt,this.loginByOauthTwoFactorService=gt,this.loginFactoryService=yt,this.providerChangePasswordService=ni,this.userpilotService=oi,this.infoApiService=mr,this.brandingService=Di,this.elementRef=gr,this.renderer=ea,this.languageList$=this.infoApiService.getUiLanguageList(),this.language=this.translateService.getLanguage()||Kp.ENGLISH}ngOnInit(){super.ngOnInit(),this.brandingService.getCustomization().subscribe(({backgroundColor:i,logo:o})=>{this.renderer.setStyle(this.elementRef.nativeElement,"color",i),this.logo=o})}onTranslationsLoaded(i){super.onTranslationsLoaded(i),this.language=i,this.containerRef&&(this.containerRef.clear(),this.containerRef.createEmbeddedView(this.templateRef))}setLanguage({isoCode:i}){this.translateService.applyLanguage(i).subscribe(()=>this.onTranslationsLoaded(i))}};e.\u0275fac=function(o){return new(o||e)(h(Ge),h(Nt),h(B),h(De),h(Zo),h(Yo),h(Si),h(oe),h(Mt),h(it),h(si),h(Ii),h(nt),h(Fo),h(qt),h(Xo),h(j),h(Ct),h(Ze),h(Va),h(Ua),h(qa),h(Lo),h(Qn),h($i),h(qn),h(Bi),h(Sn))},e.\u0275cmp=w({type:e,selectors:[["ng-component"]],viewQuery:function(o,r){if(o&1&&(ft(Wx,5,da),ft(Qx,5,ca)),o&2){let c;ht(c=_t())&&(r.containerRef=c.first),ht(c=_t())&&(r.templateRef=c.first)}},standalone:!1,features:[Y],decls:4,vars:2,consts:[["contentTemplate",""],["contentContainer",""],[3,"error","errorNotification","twoFactorAuthCheck","showLogin",4,"ngIf"],[3,"ngTemplateOutlet",4,"ngIf"],[3,"errorNotification","twoFactorAuthCheck","showLogin","error"],[3,"ngTemplateOutlet"],[1,"auth-body"],["alt","Clinic logo","class","logo",3,"src",4,"ngIf"],[3,"ngSubmit","formGroup"],["for","username-input",1,"form-label"],["type","text","id","username-input","autocomplete","username","formControlName","username","required","",1,"login",3,"libAutoFocus"],["for","password-input",1,"form-label"],["type","password","formControlName","password","autocomplete","current-password","id","password-input","required","",1,"password"],["aria-live","polite","role","alert",1,"error"],[1,"auth-actions"],["libButton","","type","submit",1,"auth-btn"],[4,"ngIf"],["routerLink","/guest/sign-up",1,"register-link",3,"queryParams"],["placeholder","","size","small","valueField","isoCode","labelField","title",3,"selectionOptionChange","label","ngModel","options"],["alt","Clinic logo",1,"logo",3,"src"],[3,"params","click",4,"ngIf"],[3,"click","params"]],template:function(o,r){o&1&&C(0,$x,1,1,"app-two-factor-auth",2)(1,Kx,2,1,"ng-container",3)(2,eO,36,36,"ng-template",null,0,pe),o&2&&(p("ngIf",r.isTwoFactorAuth),a(),p("ngIf",!r.isTwoFactorAuth))},dependencies:[F,Pi,je,ee,X,Ne,We,Ie,tt,st,cs,oo,Qe,U,Or,ve,As,Fe,Ka,T],styles:["[_nghost-%COMP%], *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]{display:flex;align-items:center;min-height:100%;padding:2em;font-size:16px;color:var(--branding-primary-color, #064060);background-color:currentColor}@media(max-width:480px){[_nghost-%COMP%]{padding:2rem 1rem}[_nghost-%COMP%] .auth-body[_ngcontent-%COMP%]{padding:4.5rem 1rem}}.auth-body[_ngcontent-%COMP%]{width:100%;max-width:38.75em;margin:auto;padding:4.5em 1.5em;border-radius:8px;background-color:#fff;text-align:center}header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-bottom:1em;font:2em Roboto-bold,sans-serif}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#505050}header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{max-width:100%;max-height:3.125em;margin:0 auto 3.125em}main[_ngcontent-%COMP%]{width:27em;max-width:100%;height:auto;margin:2em auto;color:#505050}main[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:block;overflow:visible}main[_ngcontent-%COMP%] label[_ngcontent-%COMP%], main[_ngcontent-%COMP%] legend[_ngcontent-%COMP%], main[_ngcontent-%COMP%] input[_ngcontent-%COMP%], main[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], main[_ngcontent-%COMP%] lib-select[_ngcontent-%COMP%], main[_ngcontent-%COMP%] lib-date-input[_ngcontent-%COMP%]{width:100%;margin:0 auto}main[_ngcontent-%COMP%] label[_ngcontent-%COMP%], main[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{display:block;line-height:1.5;font-size:.75em;text-align:left}main[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:not(:first-child), main[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]:not(:first-child){margin-top:.625em}main[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{color:inherit}main[_ngcontent-%COMP%] fieldset[_ngcontent-%COMP%], main[_ngcontent-%COMP%] lib-select[_ngcontent-%COMP%]{margin-top:.625em}main[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.625em 1em;border-radius:8px;border:1px solid #949494}main[_ngcontent-%COMP%] input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#de000d}main[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;min-height:1.75em;padding:.125rem 1rem;font-size:.75em;text-align:left}main[_ngcontent-%COMP%] .error.centered[_ngcontent-%COMP%]{justify-content:center;text-align:center}main[_ngcontent-%COMP%] .auth-actions[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:1.75em;gap:.375rem}main[_ngcontent-%COMP%] .auth-btn[_ngcontent-%COMP%]{width:auto}main[_ngcontent-%COMP%] .auth-btn[_ngcontent-%COMP%] ~ lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 2.2rem}footer[_ngcontent-%COMP%]{color:#505050;font-size:.875em}footer[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{line-height:1.1;letter-spacing:1em/30}main[_ngcontent-%COMP%]{margin-bottom:1em}main[_ngcontent-%COMP%] app-credential-recovery-link[_ngcontent-%COMP%]{margin:1em}main[_ngcontent-%COMP%] .register-link[_ngcontent-%COMP%]{font-size:.875em}main[_ngcontent-%COMP%] .auth-actions[_ngcontent-%COMP%]{margin-top:1em;justify-content:center}main[_ngcontent-%COMP%] .auth-btn[_ngcontent-%COMP%]{width:15em}main[_ngcontent-%COMP%] .auth-btn[_ngcontent-%COMP%]:not(:only-child){margin-left:2.5em}footer[_ngcontent-%COMP%]{display:flex;justify-content:center}footer[_ngcontent-%COMP%] lib-select[_ngcontent-%COMP%]{width:15em}footer[_ngcontent-%COMP%] lib-select[_ngcontent-%COMP%] mat-label{display:none}app-two-factor-auth[_ngcontent-%COMP%]{padding:1rem 0 2rem;background-color:#fff;border-radius:8px}"]});let n=e;return n})();var tO=()=>({name:"arrow-right",color:"currentColor"}),iO=()=>({name:"arrow-left",color:"currentColor"});function nO(n,e){if(n&1&&v(0,"img",11),n&2){let t=g();p("src",t.logo,Kt)}}function oO(n,e){n&1&&(se(0),v(1,"lib-first-name-field",12)(2,"lib-last-name-field",13),le()),n&2&&(a(),p("focus",!0)("hideAsterisk",!0),a(),p("hideAsterisk",!0))}function rO(n,e){n&1&&(se(0),v(1,"lib-email-field",14)(2,"lib-phone-field",15)(3,"lib-dob-field",13)(4,"lib-gender-field",13),le()),n&2&&(a(),p("focus",!0)("hideAsterisk",!0)("hideLabel",!1),a(),p("hideAsterisk",!0)("hideLabel",!1),a(),p("hideAsterisk",!0),a(),p("hideAsterisk",!0))}function aO(n,e){n&1&&(s(0,"p",26),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Password does not match the confirm password.")," "))}function sO(n,e){n&1&&(s(0,"p",26),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"This user already exists, please")," "))}function lO(n,e){n&1&&(s(0,"p",26),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"This username already exists, please choose another.")," "))}function cO(n,e){n&1&&(s(0,"p",26),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"Please enter a valid mobile phone")," "))}function pO(n,e){if(n&1&&(se(0),s(1,"label",16),f(2),d(3,"translate"),l(),v(4,"input",17),s(5,"p",18),f(6),d(7,"translate"),l(),s(8,"label",19),f(9),d(10,"translate"),l(),v(11,"input",20),s(12,"p",21),v(13,"lib-password-complexity-error"),l(),v(14,"lib-password-complexity-info"),s(15,"label",22),f(16),d(17,"translate"),l(),v(18,"input",23),s(19,"p",24),v(20,"lib-password-complexity-error"),l(),C(21,aO,3,3,"p",25)(22,sO,3,3,"p",25)(23,lO,3,3,"p",25)(24,cO,3,3,"p",25),le()),n&2){let t=g();a(2),b(u(3,15,"Username")),a(2),p("libAutoFocus",t.isStepActive("login")),G("aria-invalid",t.isErrorOnField("username")),a(),p("hidden",!t.isErrorOnField("username")),a(),y(" ",u(7,17,(t.signUpForm.controls.username.errors==null?null:t.signUpForm.controls.username.errors.api)||"This field should be valid and 6 characters minimum")," "),a(3),b(u(10,19,"Password")),a(2),G("aria-invalid",t.isErrorOnField("password")),a(),p("hidden",!t.isErrorOnField("password")),a(4),b(u(17,21,"Confirm password")),a(2),G("aria-invalid",t.isErrorOnField("confirmPassword")),a(),p("hidden",!t.isErrorOnField("confirmPassword")),a(2),p("ngIf",t.isErrorPasswordMatchVisible()),a(),p("ngIf",t.isErrorUserExists()),a(),p("ngIf",t.isErrorUserName()),a(),p("ngIf",t.isErrorMobilePhone())}}function dO(n,e){n&1&&(s(0,"p",35),f(1),d(2,"translate"),l()),n&2&&(a(),y(" ",u(2,1,"You must agree to the terms and conditions before continue")," "))}function mO(n,e){if(n&1&&(se(0),s(1,"label",27),f(2),d(3,"translate"),l(),v(4,"input",28),s(5,"p",29),f(6),d(7,"translate"),l(),s(8,"label",30),f(9),d(10,"translate"),l(),v(11,"input",31),s(12,"p",32),f(13),d(14,"translate"),l(),v(15,"lib-terms-checkbox",33),C(16,dO,3,3,"p",34),le()),n&2){let t=g();a(2),b(u(3,9,"Security question")),a(2),p("libAutoFocus",t.isStepActive("create")),a(),p("hidden",!t.isErrorOnField("securityQuestion")),a(),y(" ",u(7,11,"This field should be valid and 4 characters minimum")," "),a(3),b(u(10,13,"Security answer")),a(3),p("hidden",!t.isErrorOnField("securityAnswer")),a(),y(" ",u(14,15,"This field should be valid and 4 characters minimum")," "),a(2),p("required",!0),a(),p("ngIf",t.isErrorOnField("terms"))}}function gO(n,e){if(n&1){let t=S();s(0,"button",36),P("click",function(){x(t);let o=g();return O(o.goBack())}),v(1,"lib-svg-icon",8),f(2),d(3,"translate"),l()}n&2&&(a(),p("params",A(4,iO)),a(),y(" ",u(3,2,"BACK")," "))}var F0=(()=>{let e=class e extends xs{constructor(i,o,r,c,m,_,M,I,k,R,N,W,K,Ee,Ke){super(i,o,r,c,m,_,M,I,Ke),this.router=i,this.userApiService=_,this.loginByTokenService=I,this.activatedRoute=k,this.elementRef=R,this.renderer=N,this.appointmentCreateNavigationService=W,this.brandingService=K,this.el=Ee,this.signUpTitle="Register",this.steps=["name","info","login","create"]}ngOnInit(){this.brandingService.getCustomization().subscribe(({backgroundColor:i,logo:o})=>{this.renderer.setStyle(this.elementRef.nativeElement,"color",i),this.logo=o})}goBack(){let i=this.steps.findIndex(o=>this.isStepActive(o));this.goTo(this.steps[i-1])}
8goNext(){if(this.signUpForm.invalid){let i=this.el.nativeElement.querySelector("input.ng-invalid, mat-select.ng-invalid, lib-terms-checkbox.ng-invalid input");i&&i.focus();return}if(this.isStepActive("name"))this.goTo("info");else if(this.isStepActive("info"))this.phoneValidation();else if(this.isStepActive("login")){if(this.isErrorPasswordMatch())return;this.goToCreate()}else this.submitForm()}get stepIndex(){return this.steps.findIndex(i=>this.isStepActive(i))+1}get subTitle(){return this.isStepActive("login")?"Set up a username and password":this.isStepActive("create")?"Set up a security question and answer":"Please enter the patient's details"}redirectTo(i,o){let r=this.activatedRoute.snapshot.queryParams;this.appointmentCreateNavigationService.isAppointmentBookingRequired(r)?this.router.navigate([o,"appointment"],{queryParams:r}):super.redirectTo(i,o)}};e.\u0275fac=function(o){return new(o||e)(h(B),h(Mt),h(oe),h(ls),h($i),h(Ze),h(De),h(Na),h(j),h(Bi),h(Sn),h(Ge),h(qn),h(Bi),h(si))},e.\u0275cmp=w({type:e,selectors:[["app-sign-up"]],standalone:!1,features:[Y],decls:32,vars:32,consts:[[1,"auth-body"],["alt","Clinic logo","class","logo",3,"src",4,"ngIf"],[1,"step"],[3,"formGroup"],[4,"ngIf"],[1,"auth-actions"],["libButton","","type","button","class","auth-btn back-btn",3,"click",4,"ngIf"],["libButton","","type","submit",1,"auth-btn","next-btn",3,"click"],[3,"params"],[1,"login-text"],["routerLink","../login",3,"queryParams"],["alt","Clinic logo",1,"logo",3,"src"],[3,"focus","hideAsterisk"],[3,"hideAsterisk"],[3,"focus","hideAsterisk","hideLabel"],[3,"hideAsterisk","hideLabel"],["for","username"],["type","text","id","username","autocomplete","username","formControlName","username","aria-describedby","usernameError","required","",3,"libAutoFocus"],["id","usernameError","aria-atomic","true",1,"error",3,"hidden"],["for","password"],["type","password","id","password","autocomplete","new-password","aria-describedby","passwordError","formControlName","password","required",""],["id","passwordError","aria-atomic","true",1,"error",3,"hidden"],["for","confirmPassword"],["type","password","id","confirmPassword","autocomplete","new-password","formControlName","confirmPassword","aria-describedby","confirmPasswordError","required",""],["id","confirmPasswordError","aria-atomic","true",1,"error",3,"hidden"],["class","error","aria-live","polite","role","alert",4,"ngIf"],["aria-live","polite","role","alert",1,"error"],["for","securityQuestion"],["type","text","id","securityQuestion","autocomplete","off","formControlName","securityQuestion","aria-describedby","securityQuestionError",3,"libAutoFocus"],["id","securityQuestionError","aria-atomic","true",1,"error",3,"hidden"],["for","securityAnswer"],["type","text","id","securityAnswer","autocomplete","off","aria-describedby","securityAnswerError","formControlName","securityAnswer"],["id","securityAnswerError","aria-atomic","true",1,"error",3,"hidden"],["formControlName","terms",3,"required"],["class","error centered","aria-live","polite","role","alert",4,"ngIf"],["aria-live","polite","role","alert",1,"error","centered"],["libButton","","type","button",1,"auth-btn","back-btn",3,"click"]],template:function(o,r){o&1&&(s(0,"div",0)(1,"header"),C(2,nO,1,1,"img",1),s(3,"h1"),f(4),d(5,"translate"),l(),s(6,"p",2),f(7),d(8,"translate"),l(),s(9,"p"),f(10),d(11,"translate"),l()(),s(12,"main")(13,"form",3),C(14,oO,3,3,"ng-container",4)(15,rO,5,7,"ng-container",4)(16,pO,25,23,"ng-container",4)(17,mO,17,17,"ng-container",4),s(18,"div",5),C(19,gO,4,5,"button",6),s(20,"button",7),P("click",function(){return r.goNext()}),f(21),d(22,"translate"),v(23,"lib-svg-icon",8),l()()()(),s(24,"footer")(25,"p",9),f(26),d(27,"translate"),s(28,"a",10),d(29,"mergeCurrentQueryParams"),f(30),d(31,"translate"),l()()()()),o&2&&(a(2),p("ngIf",r.logo),a(2),b(u(5,17,r.signUpTitle)),a(3),wp(" ",u(8,19,"Step")," ",r.stepIndex,"/",r.steps.length," "),a(3),b(u(11,21,r.subTitle)),a(3),p("formGroup",r.signUpForm),a(),p("ngIf",r.isStepActive("name")),a(),p("ngIf",r.isStepActive("info")),a(),p("ngIf",r.isStepActive("login")),a(),p("ngIf",r.isStepActive("create")),a(2),p("ngIf",!r.isStepActive("name")),a(2),y(" ",u(22,23,"NEXT")," "),a(2),p("params",A(31,tO)),a(3),y(" ",u(27,25,"Already have an account?")," "),a(2),p("queryParams",u(29,27,null)),a(2),b(u(31,29,"Log in")))},dependencies:[F,je,ee,X,Ne,We,tt,st,Vo,Xa,oo,Qe,U,No,ve,Za,Ja,rs,as,es,os,Ka,T],styles:["[_nghost-%COMP%], *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]{display:flex;align-items:center;min-height:100%;padding:2em;font-size:16px;color:var(--branding-primary-color, #064060);background-color:currentColor}@media(max-width:480px){[_nghost-%COMP%]{padding:2rem 1rem}[_nghost-%COMP%] .auth-body[_ngcontent-%COMP%]{padding:4.5rem 1rem}}.auth-body[_ngcontent-%COMP%]{width:100%;max-width:38.75em;margin:auto;padding:4.5em 1.5em;border-radius:8px;background-color:#fff;text-align:center}header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-bottom:1em;font:2em Roboto-bold,sans-serif}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#505050}header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{max-width:100%;max-height:3.125em;margin:0 auto 3.125em}main[_ngcontent-%COMP%]{width:27em;max-width:100%;height:auto;margin:2em auto;color:#505050}main[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:block;overflow:visible}main[_ngcontent-%COMP%] label[_ngcontent-%COMP%], main[_ngcontent-%COMP%] legend[_ngcontent-%COMP%], main[_ngcontent-%COMP%] input[_ngcontent-%COMP%], main[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], main[_ngcontent-%COMP%] lib-select[_ngcontent-%COMP%], main[_ngcontent-%COMP%] lib-date-input[_ngcontent-%COMP%]{width:100%;margin:0 auto}main[_ngcontent-%COMP%] label[_ngcontent-%COMP%], main[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{display:block;line-height:1.5;font-size:.75em;text-align:left}main[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:not(:first-child), main[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]:not(:first-child){margin-top:.625em}main[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{color:inherit}main[_ngcontent-%COMP%] fieldset[_ngcontent-%COMP%], main[_ngcontent-%COMP%] lib-select[_ngcontent-%COMP%]{margin-top:.625em}main[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.625em 1em;border-radius:8px;border:1px solid #949494}main[_ngcontent-%COMP%] input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#de000d}main[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;min-height:1.75em;padding:.125rem 1rem;font-size:.75em;text-align:left}main[_ngcontent-%COMP%] .error.centered[_ngcontent-%COMP%]{justify-content:center;text-align:center}main[_ngcontent-%COMP%] .auth-actions[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:1.75em;gap:.375rem}main[_ngcontent-%COMP%] .auth-btn[_ngcontent-%COMP%]{width:auto}main[_ngcontent-%COMP%] .auth-btn[_ngcontent-%COMP%] ~ lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 2.2rem}footer[_ngcontent-%COMP%]{color:#505050;font-size:.875em}footer[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{line-height:1.1;letter-spacing:1em/30}header[_ngcontent-%COMP%] .step[_ngcontent-%COMP%]{font-size:.75em;padding-bottom:.75em}main[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem}main[_ngcontent-%COMP%] .auth-btn[_ngcontent-%COMP%]{line-height:1}main[_ngcontent-%COMP%] .auth-btn.back-btn[_ngcontent-%COMP%]{background-color:transparent;color:var(--branding-primary-color, #064060)}main[_ngcontent-%COMP%] .auth-btn.next-btn[_ngcontent-%COMP%]{margin-left:auto}main[_ngcontent-%COMP%] lib-password-complexity-info[_ngcontent-%COMP%]{font-size:.75em;letter-spacing:.0325em;margin:.5rem 1rem -.5rem}main[_ngcontent-%COMP%] lib-terms-checkbox[_ngcontent-%COMP%]{display:inline-block;margin-top:1rem}lib-first-name-field[_ngcontent-%COMP%], lib-email-field[_ngcontent-%COMP%], lib-phone-field[_ngcontent-%COMP%], lib-dob-field[_ngcontent-%COMP%]{margin-bottom:.625rem}"]});let n=e;return n})();var L0=[{path:"",component:fo,children:[{path:"login",component:dp,title:"Login"},{path:"landing",component:dp,title:"Login"},{path:"sign-up",component:F0,title:"Register"},{path:"video-call/:appointmentId",component:null,loadComponent:()=>import("./chunk-DY2IPHUV.js").then(n=>n.PatientVideoCallLayoutComponent),data:{target:ka.SELF}},...qs,{path:"activation-code/:code",component:Rd},{path:"activate-account-update-data",component:Bd}]}];var uO=()=>({name:"arrow-right",color:"#949494"});function fO(n,e){n&1&&(s(0,"li",4)(1,"p",5),f(2),d(3,"translate"),l()()),n&2&&(a(2),y(" ",u(3,1,"There is no any providers for specified resource")," "))}function hO(n,e){if(n&1&&(s(0,"p",15),f(1),d(2,"translate"),d(3,"c4uDate"),l()),n&2){let t=g().ngIf;a(),Vt(" ",u(2,2,"Out of office. Will be back on")," ",D(3,4,t.vacationEndDate,"message_full")," ")}}function _O(n,e){if(n&1&&(se(0),C(1,hO,4,7,"p",14),le()),n&2){let t=e.ngIf;a(),p("ngIf",t.hasVacation)}}function CO(n,e){if(n&1){let t=S();s(0,"li",4)(1,"button",7),P("focus",function(){let o=x(t).index,r=g(2);return O(r.setActiveItem(o))})("click",function(){let o=x(t).$implicit,r=g(2);return O(r.selectDoctor(o))}),s(2,"div",5)(3,"div",8),v(4,"lib-avatar-image",9),s(5,"span",10),f(6),l()(),s(7,"span",11),v(8,"lib-svg-icon",12),l()(),C(9,_O,2,1,"ng-container",13),l()()}if(n&2){let t=e.$implicit,i=e.index,o=g(2);a(),G("tabindex",o.getItemTabIndex(i)),a(3),p("src",t.image)("name",t.firstName),a(2),b(t.name),a(2),p("params",A(6,uO)),a(),p("ngIf",o.getVacationSettings(t.vacation,o.module))}}function vO(n,e){if(n&1&&(C(0,CO,10,7,"li",6),d(1,"filter")),n&2){let t=g();p("ngForOf",D(1,1,t.doctorList,t.filterList))}}var D0=(()=>{let e=class e{constructor(i,o){this.providerApiService=i,this.configService=o,this.title="Select Recipient",this.doctorSelectListener=new he,this.activeItemIndex=0,this.filterList=r=>(this.callbackFilter===void 0?!0:this.callbackFilter(r))&&!this.isHiddenOnVacation(r)}ngOnInit(){let i;["CareManager","UnifiedWomensHealthcare"].includes(this.configService.getAppName())&&(i="calendar");let o=z(z(z({},this.departmentUuid&&{departmentUuid:this.departmentUuid}),this.consultationTypeId&&{consultationTypeId:this.consultationTypeId}),i&&{resource:i});this.providerApiService.getProviderList(this.clinicUuid,o).subscribe(r=>{this.doctorList=r})}ngAfterViewInit(){this.keyManager=new Ia(this.linkList).withWrap().withHomeAndEnd(),this.keyManagerChangeSubscription=this.keyManager.change.subscribe(()=>{this.syncActiveItemIndex()})}ngOnDestroy(){this.keyManagerChangeSubscription?.unsubscribe()}onKeydown(i){this.keyManager&&(this.keyManager.onKeydown(i),this.syncActiveItemIndex())}getItemTabIndex(i){return i===this.activeItemIndex?0:-1}setActiveItem(i){this.activeItemIndex=i,this.keyManager?.updateActiveItem(i)}getVacationSettings(i,o){return i[o]}isListEmpty(){return this.doctorList!==void 0&&this.doctorList.length===0}isListNotEmpty(){return this.doctorList!==void 0&&this.doctorList.length>0}isHiddenOnVacation(i){let o=i.vacation[this.module];return o===void 0?!1:o.hideIfOnVacation}selectDoctor(i){this.doctorSelectListener.emit(i)}syncActiveItemIndex(){let i=this.keyManager?.activeItemIndex;this.activeItemIndex=i!==void 0&&i>=0?i:0}};e.\u0275fac=function(o){return new(o||e)(h(Gl),h(oe))},e.\u0275cmp=w({type:e,selectors:[["app-doctor-list"]],viewQuery:function(o,r){if(o&1&&ft(Fn,5),o&2){let c;ht(c=_t())&&(r.linkList=c)}},hostBindings:function(o,r){o&1&&P("keydown",function(m){return r.onKeydown(m)})},inputs:{title:"title",module:"module",clinicUuid:"clinicUuid",departmentUuid:"departmentUuid",consultationTypeId:"consultationTypeId",callbackFilter:"callbackFilter"},outputs:{doctorSelectListener:"doctorSelectListener"},standalone:!1,decls:7,vars:5,consts:[["doctorListTemplate",""],["id","doctor-list-title",1,"header"],["aria-labelledby","doctor-list-title","libSwipeAction","",1,"list",3,"swipeDown"],["class","list-item",4,"ngIf","ngIfElse"],[1,"list-item"],[1,"item"],["class","list-item",4,"ngFor","ngForOf"],["libFocusable","","type","button",3,"focus","click"],[1,"image-with-name"],[1,"image",3,"src","name"],[1,"name"],[1,"arrow"],[3,"params"],[4,"ngIf"],["class","hint",4,"ngIf"],[1,"hint"]],template:function(o,r){if(o&1){let c=S();s(0,"h1",1),f(1),d(2,"translate"),l(),s(3,"ul",2),P("swipeDown",function(){return x(c),O(r.ngOnInit())}),C(4,fO,4,3,"li",3)(5,vO,2,4,"ng-template",null,0,pe),l()}if(o&2){let c=V(6);a(),b(u(2,3,r.title)),a(3),p("ngIf",r.isListEmpty())("ngIfElse",c)}},dependencies:[Ha,Ve,Fn,ue,F,U,Je,T,Td],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;overflow-y:hidden;font-size:1rem;font-family:Roboto-bold,sans-serif}.header[_ngcontent-%COMP%], .item[_ngcontent-%COMP%]{padding:1.25rem;border-bottom:1px solid rgba(128,128,128,.2)}@media(min-width:768px){.header[_ngcontent-%COMP%], .item[_ngcontent-%COMP%]{width:calc(100% - 5rem);margin:0 auto;padding:1.25rem 0}}.list[_ngcontent-%COMP%]{overflow:auto}.header[_ngcontent-%COMP%]{font-size:1.125rem;color:#064060;text-align:center;padding:1.25rem 0;line-height:1.25rem;letter-spacing:.033rem}.list-item[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{margin-left:.625rem}.list-item[_ngcontent-%COMP%] svg{width:1rem;height:1rem}.item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;color:#505050}.hint[_ngcontent-%COMP%]{color:#505050;font-family:Roboto-regular,Arial,Helvetica,sans-serif;font-size:.75rem;margin-top:.375rem}.image[_ngcontent-%COMP%]{--avatar-image-size: 2.5rem;margin-right:.625rem}
8.image-with-name[_ngcontent-%COMP%]{display:flex;align-items:center;line-height:1.125rem} lib-message-receiver-list{background-color:#8080800d} lib-message-receiver-list .header{border:none!important} lib-message-receiver-list .list{background-color:#fff;margin:0 15px;border-radius:8px}@media(min-width:768px){ lib-message-receiver-list .list{margin:0 40px}} lib-message-receiver-list .list .list-item .item{padding:25px 15px;width:auto} lib-message-receiver-list .list .list-item:last-child .item{border:none}ul[_ngcontent-%COMP%]{margin:2px}li[_ngcontent-%COMP%]{padding:3px}li[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:none;border:0;color:inherit;display:block;padding:0;text-align:inherit;width:100%}"]});let n=e;return n})();var PO=n=>({name:"office-visit",color:n}),MO=()=>({name:"close",color:"#949494"});function bO(n,e){if(n&1&&(s(0,"div",13)(1,"div",14),f(2),d(3,"applyTimezone"),d(4,"c4uDate"),l(),s(5,"div",15)(6,"div",16),v(7,"lib-avatar-image",17),l(),s(8,"div",18)(9,"div",19),f(10),l(),s(11,"div",20),f(12),l(),s(13,"div",21),f(14),l()()()()),n&2){let t=g(2);a(2),y(" ",D(4,8,D(3,5,t.appointment.appointmentStartAt,t.appointment.timezone),"full")," "),a(5),p("src",t.appointment.doctorImage),a(3),y(" ",t.appointment.doctorName," "),a(2),y(" ",t.appointment.locationName||t.appointment.departmentName," "),a(2),y(" ",t.appointment.appointmentTitle," ")}}function xO(n,e){if(n&1&&(s(0,"div")(1,"div",14),f(2),d(3,"applyTimezone"),d(4,"c4uDate"),l(),s(5,"div",15)(6,"div",16),v(7,"lib-avatar-image",17),l(),s(8,"div",18)(9,"div",19),f(10),l(),s(11,"div",20),f(12),l(),s(13,"div",21),f(14),l()()()()),n&2){let t=e.$implicit;a(2),y(" ",D(4,8,D(3,5,t.appointmentStartAt,t.timezone),"full")," "),a(5),p("src",t.doctorImage),a(3),y(" ",t.doctorName," "),a(2),y(" ",t.locationName||t.departmentName," "),a(2),y(" ",t.appointmentTitle," ")}}function OO(n,e){if(n&1&&(s(0,"div",13),C(1,xO,15,11,"div",22),l()),n&2){let t=g(2);a(),p("ngForOf",t.appointment.appointments)}}function wO(n,e){if(n&1){let t=S();s(0,"div",1)(1,"div",2)(2,"div",3),v(3,"div",4)(4,"lib-svg-icon",5),s(5,"h1",6),f(6),d(7,"translate"),l(),s(8,"button",7),d(9,"translate"),P("click",function(){x(t);let o=g();return O(o.exit())}),v(10,"lib-svg-icon",8),l()(),s(11,"div",9)(12,"p",10),f(13),d(14,"translate"),l(),C(15,bO,15,11,"div",11)(16,OO,2,1,"div",11),l(),s(17,"button",12),P("click",function(){x(t);let o=g();return O(o.startVisitPrep())}),f(18),d(19,"translate"),l()()()}if(n&2){let t=e.ngIf,i=g();Zt("background-color",t.checkInFlowColor||"#39BA85"),a(3),Zt("background-color",t.checkInFlowColor||"#39BA85"),a(),p("params",ce(20,PO,t.checkInFlowColor||"#39BA85")),a(2),b(u(7,12,"Prepare for your visit")),a(2),G("aria-label",u(9,14,"Exit Check-in")),a(2),p("params",A(22,MO)),a(3),y(" ",u(14,16,"You have an upcoming visit, please prepare now.")," "),a(2),p("ngIf",!i.appointment.isMultipleAppointments),a(),p("ngIf",i.appointment.isMultipleAppointments),a(2),y(" ",u(19,18,"START VISIT PREP")," ")}}var B0=(()=>{let e=class e{constructor(i,o,r,c,m,_){this.storageService=i,this.router=o,this.appointmentApiService=r,this.brandConfigService=c,this.checkInFlowService=m,this.brandingService=_,this.customization$=this.brandingService.getCustomization()}ngOnInit(){let i=this.storageService.get("checkInAppointment");this.appointmentApiService.startCheckIn([i.appointmentId]).pipe(L(()=>this.checkInFlowService.getAndCacheNotCompletedTaskList(i))).subscribe(()=>{this.appointment=i,!this.brandConfigService.isBrandQuickCheckIn()&&this.checkInFlowService.isCheckInFlowCompleted()&&this.checkInFlowService.redirectToAppointmentView()})}startVisitPrep(){this.checkInFlowService.redirectToFirstUndoTask()}exit(){this.router.navigate(["/user/check-in-warning"])}};e.\u0275fac=function(o){return new(o||e)(h(it),h(B),h(Ct),h(ci),h(St),h(qn))},e.\u0275cmp=w({type:e,selectors:[["app-check-in-landing"]],standalone:!1,decls:2,vars:3,consts:[["class","task-panel-background",3,"background-color",4,"ngIf"],[1,"task-panel-background"],[1,"task-panel"],[1,"task-panel-header"],[1,"header-background"],[1,"icon",3,"params"],[1,"title"],["type","button",3,"click"],[3,"params"],[1,"task-panel-body"],[1,"hint"],["class","appointment-details",4,"ngIf"],["type","button",1,"task-panel-button",3,"click"],[1,"appointment-details"],[1,"time"],[1,"appointment-info"],[1,"doctor-image"],[3,"src"],[1,"info"],[1,"doctor-name"],[1,"location"],[1,"appointment-type"],[4,"ngFor","ngForOf"]],template:function(o,r){o&1&&(C(0,wO,20,23,"div",0),d(1,"async")),o&2&&p("ngIf",r.appointment&&u(1,1,r.customization$))},dependencies:[Ve,ue,F,U,Je,ct,T,Fe],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{height:100%}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{justify-content:left}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin-left:2rem;z-index:0}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg{width:2.5rem;height:2.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-left:1rem;z-index:0;padding:0;color:#505050}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:none;position:absolute;top:1rem;right:1rem;z-index:0;cursor:pointer}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%] svg{width:1rem;height:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin-bottom:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;padding:1rem 0}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%] .appointment-info[_ngcontent-%COMP%]{display:flex}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%] .appointment-info[_ngcontent-%COMP%] .doctor-image[_ngcontent-%COMP%]{padding-top:4px;margin-right:8px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%] .appointment-info[_ngcontent-%COMP%] .doctor-name[_ng
8content-%COMP%]{font-family:Roboto-bold,sans-serif}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{margin:2rem auto}"]});let n=e;return n})();var SO=n=>({name:"office-visit",color:n});function IO(n,e){if(n&1){let t=S();s(0,"div",1)(1,"div",2)(2,"div",3),v(3,"div",4)(4,"lib-svg-icon",5),s(5,"h1",6),f(6),d(7,"translate"),l()(),s(8,"div",7)(9,"p"),f(10),d(11,"translate"),l()(),s(12,"div",8)(13,"a",9),f(14),d(15,"translate"),l(),s(16,"button",10),P("click",function(){x(t);let o=g();return O(o.goToDefault())}),f(17),d(18,"translate"),l()()()()}if(n&2){let t=e.ngIf;Zt("background-color",t.checkInFlowColor||"#ff0013"),a(3),Zt("background-color",t.checkInFlowColor||"#ff0013"),a(),p("params",ce(17,SO,t.checkInFlowColor||"#ff0013")),a(2),b(u(7,9,"Wait!")),a(4),y(" ",u(11,11,"Are you sure you wish to exit without completing your check in?")," "),a(4),y(" ",u(15,13,"No, take me back")," "),a(3),y(" ",u(18,15,"Yes, I need to do something else")," ")}}var R0=(()=>{let e=class e{constructor(i,o){this.checkInFlowService=i,this.brandingService=o,this.customization$=this.brandingService.getCustomization()}goToDefault(){this.checkInFlowService.cancelCheckInFlow()}};e.\u0275fac=function(o){return new(o||e)(h(St),h(qn))},e.\u0275cmp=w({type:e,selectors:[["app-check-in-warning"]],standalone:!1,decls:2,vars:3,consts:[["class","task-panel-background",3,"background-color",4,"ngIf"],[1,"task-panel-background"],[1,"task-panel"],[1,"task-panel-header"],[1,"header-background"],[3,"params"],[1,"title"],[1,"task-panel-body"],[1,"footer"],["routerLink","/user/check-in-landing",1,"task-panel-button"],[1,"link",3,"click"]],template:function(o,r){o&1&&(C(0,IO,19,19,"div",0),d(1,"async")),o&2&&p("ngIf",u(1,1,r.customization$))},dependencies:[Qe,F,U,T,Fe],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{height:100%}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{justify-content:left}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{margin-left:2rem;z-index:0}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:2.5rem;height:2.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-left:1rem;z-index:0;padding:0;color:#505050}"]});let n=e;return n})();var V0=(()=>{let e=class e{constructor(i,o,r){this.userService=i,this.router=o,this.threadService=r}selectClinic(i,o){this.router.navigate([`/${this.userService.getUserRole()}/message/thread/create/${i.clinicUuid}/provider`],{replaceUrl:o,state:{hideBackButton:o&&!this.threadService.getThreadList()?.length}})}};e.\u0275fac=function(o){return new(o||e)(h(De),h(B),h(Gt))},e.\u0275cmp=w({type:e,selectors:[["app-message-thread-create-clinic"]],standalone:!1,decls:4,vars:3,consts:[["moduleName","messaging",3,"clinicSelect","onlyOneClinicLoaded"]],template:function(o,r){o&1&&(s(0,"app-header-title-update"),f(1),d(2,"translate"),l(),s(3,"app-clinic-list",0),P("clinicSelect",function(m){return r.selectClinic(m)})("onlyOneClinicLoaded",function(m){return r.selectClinic(m,!0)}),l()),o&2&&(a(),b(u(2,1,"Send message")))},dependencies:[Xt,fs,T],encapsulation:2});let n=e;return n})();function TO(n,e){if(n&1){let t=S();s(0,"app-doctor-list",1),P("doctorSelectListener",function(o){x(t);let r=g();return O(r.selectDoctor(o))}),l()}if(n&2){let t=g();p("callbackFilter",t.filterList)("clinicUuid",t.clinicUuid)}}var N0=(()=>{let e=class e{constructor(i,o,r,c,m){this.router=i,this.activeRoute=o,this.clinicApiResource=r,this.messageService=c,this.currentUserService=m,this.filterList=_=>_.permission.messaging}ngOnInit(){this.updateClinic(),this.messageService.initThreadList()}updateClinic(){this.activeRoute.params.pipe(ne(({clinicUuid:i})=>this.clinicUuid=i),ge(({clinic:i})=>!i),L(({clinicUuid:i})=>this.clinicApiResource.getClinicSettings(i))).subscribe(i=>this.clinic=i)}selectDoctor(i){let o={clinicUuid:this.clinicUuid,participantType:Ue.DOCTOR,participantId:i.id,participantName:i.name,participantImage:i.image};this.currentUserService.getAccountData().subscribe(r=>this.messageService.redirectToFoundOrCreatedThread(o,r))}};e.\u0275fac=function(o){return new(o||e)(h(B),h(j),h(Te),h(ao),h(bt))},e.\u0275cmp=w({type:e,selectors:[["app-message-thread-create-provider"]],standalone:!1,decls:1,vars:1,consts:[["module","messaging",3,"callbackFilter","clinicUuid","doctorSelectListener",4,"ngIf"],["module","messaging",3,"doctorSelectListener","callbackFilter","clinicUuid"]],template:function(o,r){o&1&&C(0,TO,1,2,"app-doctor-list",0),o&2&&p("ngIf",r.clinic)},dependencies:[F,D0],styles:["app-doctor-list[_ngcontent-%COMP%]{flex:1}"]});let n=e;return n})();ri();var EO=n=>({"wrapper-menu-open":n}),FO=(n,e)=>({"app-menu-open":n,"app-menu-closed":e});function LO(n,e){if(n&1&&(s(0,"footer",8),v(1,"app-my-care-plan-footer-menu",9),l(
8)),n&2){let t=g(3);a(),p("footerMenuConfig",t.footerMenuConfig)}}function DO(n,e){if(n&1&&(se(0),s(1,"main"),v(2,"router-outlet")(3,"lib-loader")(4,"app-ajax-error"),l(),C(5,LO,2,1,"footer",7),d(6,"async"),le()),n&2){let t=g(2);a(5),p("ngIf",!u(6,1,t.isFooterMenuHidden$))}}function BO(n,e){n&1&&v(0,"app-network-error")}function RO(n,e){if(n&1){let t=S();s(0,"div",4)(1,"header",5)(2,"app-my-care-plan-header",6),P("toggleMenu",function(){x(t);let o=g();return O(o.toggleMenu())}),l()(),C(3,DO,7,3,"ng-container",3)(4,BO,1,0,"ng-template",null,1,pe),l()}if(n&2){let t=V(5),i=g();p("ngClass",ce(4,EO,i.sideMenuService.isSideMenuOpen)),a(2),p("isMenuOpen",i.sideMenuService.isSideMenuOpen),a(),p("ngIf",i.isNetworkUp)("ngIfElse",t)}}function VO(n,e){n&1&&v(0,"app-check-in-flow-container")}function NO(n,e){if(n&1&&(s(0,"div",10),v(1,"app-my-care-plan-side-menu",11),l()),n&2){let t=g();p("ngClass",Dt(2,FO,t.sideMenuService.isSideMenuOpen,!t.sideMenuService.isSideMenuOpen)),a(),p("sideMenuConfig",t.sideMenuConfig)}}var Mn,dr=(Mn=class extends Ts{constructor(e,t,i,o,r,c,m){super(e,t,i,o,r,c,m),this.router=e,this.loaderService=t,this.networkService=i,this.authorizationService=o,this.localStorage=r,this.activatedRoute=c,this.sideMenuService=m,this.isOnFlyTasksFlow=this.localStorage.get("appFlow")==="on-fly",this.footerMenuConfig=this.activatedRoute.snapshot.data.footerMenuConfig||Ld,this.sideMenuConfig=this.activatedRoute.snapshot.data.sideMenuConfig||nr,this.isFooterMenuHidden$=this.router.events.pipe(ge(_=>_ instanceof Ao),eo(null),re(()=>this.getIsFooterMenuHiddenFromActivatedRouteData(this.activatedRoute.snapshot)))}getIsFooterMenuHiddenFromActivatedRouteData(e){let{firstChild:t}=e;return!t||!t.data?!1:t.data.hasOwnProperty("isFooterMenuHidden")?t.data?.isFooterMenuHidden:this.getIsFooterMenuHiddenFromActivatedRouteData(t)}},Mn.\u0275fac=function(t){return new(t||Mn)(h(B),h(Yi),h(xi),h(nt),h(it),h(j),h(vt))},Mn.\u0275cmp=w({type:Mn,selectors:[["app-user-layout"]],standalone:!1,features:[Y],decls:4,vars:3,consts:[["menuTpl",""],["networkErrorTpl",""],["class","wrapper app-my-care-plan",3,"ngClass",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"wrapper","app-my-care-plan",3,"ngClass"],["id","header"],[3,"toggleMenu","isMenuOpen"],["id","footer",4,"ngIf"],["id","footer"],[3,"footerMenuConfig"],[1,"app-menu",3,"ngClass"],[1,"menu-open",3,"sideMenuConfig"]],template:function(t,i){if(t&1&&C(0,RO,6,6,"div",2)(1,VO,1,0,"app-check-in-flow-container",3)(2,NO,2,5,"ng-template",null,0,pe),t&2){let o=V(3);p("ngIf",!i.isCheckInFlow),a(),p("ngIf",i.isCheckInFlow)("ngIfElse",o)}},dependencies:[Uo,qo,Hd,hs,Bo,Hi,He,F,ml,bs,Fe],styles:[".wrapper[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;background-color:#fff;transition:transform .2s ease}.wrapper[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;z-index:2}.wrapper[_ngcontent-%COMP%] app-network-error[_ngcontent-%COMP%]{display:flex;flex:1}.wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%]{display:flex;flex:1}.wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] app-ajax-error[_ngcontent-%COMP%]{overflow:inherit}.wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{display:flex;z-index:2}.wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] app-my-care-plan-footer-menu[_ngcontent-%COMP%], .wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] app-network-error[_ngcontent-%COMP%]{width:100%;min-height:100%}app-case-info[_ngcontent-%COMP%]{overflow:visible}.wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] lib-loader[_ngcontent-%COMP%], .wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] app-ajax-error[_ngcontent-%COMP%]{width:0;display:block}app-my-care-plan-side-menu[_ngcontent-%COMP%]{display:none;width:100%;min-height:100%;height:100%;position:absolute;top:0;background-color:#fff;right:0;border-left:1px solid #e6e6e6}.wrapper-menu-open[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.wrapper-menu-open[_ngcontent-%COMP%] lib-avatar-image{display:none}.menu-open[_ngcontent-%COMP%]{display:block;z-index:1}.app-menu-closed[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;right:0;z-index:-999}.app-menu-closed[_ngcontent-%COMP%] .menu-open[_ngcontent-%COMP%]{display:none}@media all and (max-height:470px){html[_ngcontent-%COMP%]:not(.portal-mobile) .wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{display:none}}"]}),Mn);dr=Xe([et(),ut("design:paramtypes",[B,Yi,xi,nt,it,j,vt])],dr);var U0=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({imports:[Ht,Mo,Sr]});let n=e;return n})();var q0=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({imports:[Ht,Sr,cp,U0,Sr,cp]});let n=e;return n})();var z0=[{path:"regular",component:Kd},{path:"vital-create",component:nm},{path:"vital-data",component:om},{path:"signature-data",loadComponent:()=>import("./chunk-446SX2MU.js").then(n=>n.SignatureDataComponent),title:"Review Document"},{path:"signature-create",loadComponent:()=>import("./chunk-7NFG4IAT.js").then(n=>n.SignatureCreateComponent),title:"Sign Document"},{path:"success",component:rm,title:"Review Task"},{path:"copay-data",component:Xd,title:"Copay"},{path:"copay-create",component:Zd,title:"Make Payment"},{path:"copay-contract",component:dm,title:"Contract"},{path:"copay-contract-sign",component:mm,title:"Contract"},{path:"copay-thank-you",component:gm,title:"Payment Confirmation"},{path:"insurance-card",component:ec,title:"Insurance Card"},{path:"insurance-card/:insuranceType",component:ec,title:"Insurance Card"},{path:"confirm-insurance-card",component:am,title:"Confirm Insurance Card"},{path:"add-secondary-insurance-card",component:sm,title:"Secondary Insurance Card"}
8,{path:"driver-license",component:lm,title:"Driver's License"},{path:"appointment-reason",component:cm,title:"Reason for Visit"},{path:"image-draw",component:pm},{path:"outstanding-balance-list",component:Ps,title:"Outstanding Balances"},{path:"outstanding-balance",component:ys,title:"Outstanding Balance"},{path:"outstanding-balance-partial-payment",component:Ms,title:"Partial Payment"},{path:"demographic/personal",component:Jd,title:"Update Demographics"},{path:"demographic/contact-info",component:em,title:"Update Demographics"},{path:"demographic/emergency-info",component:tm,title:"Update Demographics"},{path:"demographic/additional-info",component:im,title:"Update Demographics"},{path:"form-document",loadComponent:()=>import("./chunk-CIFLFN7H.js").then(n=>n.FormDocumentComponent),title:"Review Document"},{path:"form-document/sign",loadComponent:()=>import("./chunk-UDRIX7HD.js").then(n=>n.FormDocumentSignComponent),title:"Sign Document"},{path:"card-on-file",children:[{path:"",component:fm,title:"Card on File"},{path:"card-details",component:hm,title:"Card Details"}]},{path:"preferred-pharmacy",children:[{path:"",component:_m,title:"Preferred Pharmacy"},{path:"search",component:Cm,title:"Pharmacy Search"}]},{path:"self-pay",loadComponent:()=>import("./chunk-JUKLVJXW.js").then(n=>n.SelfPayComponent),title:"Self Pay"},{path:"fillable-form",children:[{path:"",loadComponent:()=>import("./chunk-3YK4VPZA.js").then(n=>n.FillableFormComponent),title:"Review Document"},{path:"sign",loadComponent:()=>import("./chunk-NNKGQO2O.js").then(n=>n.FillableFormSignComponent),title:"Sign Document"}]}];var j0=[{path:"questionnaire/unavailable",component:f0,title:"Questionnaire"},{path:"questionnaire/main/:formId",component:fi,title:"Questionnaire"},{path:"questionnaire/medication/:formId",component:cr,title:"Review Medications"},{path:"questionnaire/common/:formId",component:kl,title:"Questionnaire"}];var mp=[{path:"security",component:gg},{path:"check-in-landing",component:B0,title:"Check-in"},{path:"check-in-warning",component:R0,title:"Exit Check-in"},{path:"account-settings",canActivate:[Ki],data:{setting:ai.ACCOUNT_SETTINGS},component:r0,title:"Account Settings"},{path:"",canActivate:[Ki],data:{setting:ai.OUTSTANDING_BALANCE},children:[{path:"outstanding-balance",component:ys,title:"Outstanding Balance"},{path:"outstanding-balance-list",component:Ps,title:"Outstanding Balances"},{path:"outstanding-balance-partial-payment",component:Ms,title:"Partial Payment"}]},{path:"news",canActivate:[Ki],data:{setting:ai.NEWS_FEED},loadChildren:()=>import("./chunk-F7U65GP6.js").then(n=>n.NewsModule),title:"News"},{path:"documents",canActivate:[Ki],data:{setting:ai.DOCUMENTS},loadChildren:()=>import("./chunk-EKD2CPD7.js").then(n=>n.PatientSignedDocumentsModule),title:"Documents"},{path:"task-feed",component:um,title:"Tasks"},{path:"task",children:[{path:"",component:Yd},...z0]},...j0,{path:"",canActivate:[Ki],data:{setting:ai.FAMILY},children:[{path:"family/connect",component:gl,title:"Add family member"}]},{path:"vital",canActivate:[Ki],data:{setting:ai.GRAPHS},loadChildren:()=>import("./chunk-75RZDFAZ.js").then(n=>n.VitalModule),title:"Graphs"},{path:"appointment",component:Gu,title:"Visits"},{path:"",canActivate:[Ki],data:{setting:ai.APPOINTMENT_CREATE},children:[{path:"appointment/create",component:ju,title:"Select Clinic"},{path:"appointment/create/providers",component:lg,title:"Select Provider"},{path:"appointment/create/consultation-types",component:Xm,title:"Reason for visit"},{path:"appointment/create/time-slots",component:Ns,title:"Select Date and Time"},{path:"appointment/create/confirm",component:$m,title:"Schedule Appointment"},{path:"appointment/create/confirm-reschedule",component:Hu,title:"Reschedule Appointment"},{path:"appointment/create/summary",component:cc,title:"Appointment Summary",data:{isSummaryDetailsPage:!0}}]},{path:"appointment/:appointmentId",component:cc,title:"Visit Details"},{path:"",canActivate:[Ki],data:{setting:ai.MESSAGE},children:[{path:"message",component:np,title:"Messages"},{path:"message/thread/create/clinic",component:V0,title:"Select Clinic"},{path:"message/thread/create/:clinicUuid/provider",component:N0,title:"Select Recipient"},{path:"message/thread/create",component:ap,data:{isFooterMenuHidden:!0},title:"Send Message"}
8,{path:"message/thread/:threadId",component:sp,data:{isFooterMenuHidden:!0},title:"Message Thread"}]},{path:"",canActivate:[Ki],data:{setting:ai.MY_PROVIDERS},children:[{path:"provider",component:t0},{path:"provider/connect",component:n0}],title:"Clinics"},{path:"delete-account",component:o0,data:{isFooterMenuHidden:!0}}],UO=[{path:"languages",component:mg,title:"Language"}],W0=[{path:"",component:dr,children:[...mp]},{path:"",component:fo,children:[{path:"delete-account-success",component:a0}]},{path:"single",component:fo,children:[...UO]},{path:"video-call/:appointmentId",loadComponent:()=>import("./chunk-DY2IPHUV.js").then(n=>n.PatientVideoCallLayoutComponent)}];var qO=()=>({iconName:"heart-new",activeIconColor:"#CB486B"}),zO=()=>({iconName:"clock-new",activeIconColor:"#3C9F76"}),jO=()=>({iconName:"inbox-new",activeIconColor:"#0D9DC5"}),WO=()=>({iconName:"copay",activeIconColor:"#C85A0E"}),QO=()=>({iconName:"news-new",activeIconColor:"#0D9DC5"}),GO=(n,e)=>({name:n,color:e}),HO=n=>({name:n,color:"#757575"});function $O(n,e){n&1&&Lt(0)}function KO(n,e){n&1&&Lt(0)}function YO(n,e){if(n&1&&(s(0,"li",2)(1,"a",7),C(2,KO,1,0,"ng-container",4),s(3,"span"),f(4),d(5,"translate"),l()()()),n&2){g();let t=V(23);a(2),p("ngTemplateOutlet",t)("ngTemplateOutletContext",A(5,jO)),a(2),b(u(5,3,"Messages"))}}function XO(n,e){n&1&&Lt(0)}function ZO(n,e){n&1&&Lt(0)}function JO(n,e){if(n&1&&(s(0,"li",2)(1,"a",8),C(2,ZO,1,0,"ng-container",4),s(3,"span"),f(4),d(5,"translate"),l()()()),n&2){let t=g(),i=V(23);a(),Z("active",t.isOutstandingBalanceActive()),p("queryParams",t.balanceQueryParams),a(),p("ngTemplateOutlet",i)("ngTemplateOutletContext",A(8,WO)),a(2),b(u(5,6,"Payments"))}}function ew(n,e){n&1&&Lt(0)}function tw(n,e){if(n&1&&(s(0,"li",2)(1,"a",9),C(2,ew,1,0,"ng-container",4),s(3,"span"),f(4),d(5,"translate"),l()()()),n&2){g();let t=V(23);a(2),p("ngTemplateOutlet",t)("ngTemplateOutletContext",A(5,QO)),a(2),b(u(5,3,"News"))}}function iw(n,e){if(n&1&&v(0,"span",10)(1,"lib-svg-icon",11)(2,"lib-svg-icon",12),n&2){let t=e.iconName,i=e.activeIconColor,o=g();Zt("background",o.hexToRgba(i,.04))("border-color",i),a(),p("params",Dt(6,GO,t,i)),a(),p("params",ce(9,HO,t))}}var Q0=(()=>{let e=class e extends Dd{constructor(){super(...arguments),this.AccessSettingEnum=ai}};e.\u0275fac=(()=>{let i;return function(r){return(i||(i=Ae(e)))(r||e)}})(),e.\u0275cmp=w({type:e,selectors:[["app-footer-portal-mobile"]],standalone:!1,features:[Y],decls:24,vars:29,consts:[["iconsTpl",""],[1,"menu"],[1,"menu-item"],["routerLink","/user/task-feed"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","menu-item",4,"ngIf"],["routerLink","/user/appointment","routerLinkActive","active"],["routerLink","/user/message","routerLinkActive","active"],["routerLink","/user/outstanding-balance-list",3,"queryParams"],["routerLink","/user/news","routerLinkActive","active"],[1,"menu-item-bg"],[1,"icon-active",3,"params"],[1,"icon-inactive",3,"params"]],template:function(o,r){if(o&1&&(s(0,"ul",1)(1,"li",2)(2,"a",3),C(3,$O,1,0,"ng-container",4),s(4,"span"),f(5),d(6,"translate"),l()()(),C(7,YO,6,6,"li",5),d(8,"hasCompanyAccess"),d(9,"async"),s(10,"li",2)(11,"a",6),C(12,XO,1,0,"ng-container",4),s(13,"span"),f(14),d(15,"translate"),l()()(),C(16,JO,6,9,"li",5),d(17,"hasCompanyAccess"),d(18,"async"),C(19,tw,6,6,"li",5),d(20,"hasCompanyAccess"),d(21,"async"),l(),C(22,iw,3,11,"ng-template",null,0,pe)),o&2){let c=V(23);a(2),Z("active",r.isTaskFeedActive()),a(),p("ngTemplateOutlet",c)("ngTemplateOutletContext",A(27,qO)),a(2),b(u(6,11,"Tasks")),a(2),p("ngIf",u(9,15,u(8,13,r.AccessSettingEnum.MESSAGE))),a(5),p("ngTemplateOutlet",c)("ngTemplateOutletContext",A(28,zO)),a(2),b(u(15,17,"Visits")),a(2),p("ngIf",u(18,21,u(17,19,r.AccessSettingEnum.OUTSTANDING_BALANCE))),a(3),p("ngIf",u(21,25,u(20,23,r.AccessSettingEnum.NEWS_FEED)))}},dependencies:[F,Pi,Qe,Eo,U,Fe,$a,T],styles:["[_nghost-%COMP%]{width:100%;height:var(--footer-height, 70px);box-shadow:0 -2px 4px #0000001a}nav[_ngcontent-%COMP%]{height:100%}.menu[_ngcontent-%COMP%]{display:flex;justify-content:center;height:100%;background-color:#fff;margin:auto}.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%]{--svg-size: 25px;position:relative;flex:1;font-size:10px}.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{display:flex;align-content:center;align-items:center;justify-content:center;justify-items:center;border-radius:50%;margin-bottom:10px}.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;color:#757575;line-height:12px;letter-spacing:.5px}.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .icon-active[_ngcontent-%COMP%]{display:none}.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;color:#101214}.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] .menu-item-bg[_ngcontent-%COMP%]{display:block;position:absolute;top:0;width:100%;height:100%;border-top:3px solid;box-sizing:border-box}.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] .icon-inactive[_ngcontent-%COMP%]{display:none}.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] .icon-active[_ngcontent-%COMP%]{display:flex}@media(min-width:700px){.menu[_ngcontent-%COMP%]{max-width:700px}}
8@media(min-width:900px){.menu[_ngcontent-%COMP%]{max-width:900px}.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%]{--svg-size: 30px;font-size:12px}}@media only screen and (max-height:460px){.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%]{--svg-size: 20px}.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{margin-bottom:1px}}@media only screen and (max-height:350px){.menu[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%]{--svg-size: 10px;font-size:10px}}"]});let n=e;return n})();var G0=(()=>{let e=class e{constructor(i){this.termsAndConditionsService=i}acceptTermsAndConditions(){this.termsAndConditionsService.accept()}};e.\u0275fac=function(o){return new(o||e)(h(ss))},e.\u0275cmp=w({type:e,selectors:[["app-terms-and-conditions"]],standalone:!1,decls:14,vars:7,consts:[[1,"modal"],[1,"modal-content"],[1,"modal-header"],[1,"pdf-wrapper"],["src",Mp`https://www.qure4u.com/end-user-terms-of-service/`],[1,"container-button"],["libButton","","type","button",3,"click"]],template:function(o,r){o&1&&(v(0,"div",0),s(1,"div",1)(2,"div",2)(3,"h1"),f(4),l(),s(5,"p"),f(6),d(7,"translate"),l()(),s(8,"div",3),v(9,"iframe",4),l(),s(10,"div",5)(11,"button",6),P("click",function(){return r.acceptTermsAndConditions()}),f(12),d(13,"translate"),l()()()),o&2&&(a(4),b("Terms & Conditions Update"),a(2),y(" ",u(7,3,"We have updated our terms and conditions. To proceed, please review and accept them below:")," "),a(6),y(" ",u(13,5,"I accept the terms and conditions")," "))},dependencies:[ve,T],styles:["[_nghost-%COMP%]{position:absolute}.modal[_ngcontent-%COMP%]{position:fixed;left:0;top:0;width:100%;height:100%;background-color:#5e94ac;overflow:auto;opacity:.6;z-index:1000}.modal-content[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;width:1000px;height:fit-content;margin:auto;border-radius:8px;border:1px solid #a7a7a7;background-color:#fff;transform:translate(-50%,-50%);z-index:1001}.modal-header[_ngcontent-%COMP%]{padding:1rem;text-align:center;margin:1rem 3rem}.modal-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px;color:#064060;font-family:Roboto-bold,sans-serif;text-align:center;padding-bottom:18px}.container-button[_ngcontent-%COMP%]{display:flex;justify-content:space-around;padding:2rem}.pdf-wrapper[_ngcontent-%COMP%]{margin:0 2rem;padding:2px;border:1px solid #505050;border-radius:8px;height:40vh}.pdf-wrapper[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{width:100%;height:100%;border:none}button[_ngcontent-%COMP%]{width:auto}@media(max-width:1000px){.modal-content[_ngcontent-%COMP%]{width:calc(100% - 10px)}}"]});let n=e;return n})();var rw=n=>({"wrapper-menu-open":n}),aw=(n,e)=>({"app-menu-open":n,"app-menu-closed":e});function sw(n,e){n&1&&v(0,"app-network-error")}function lw(n,e){n&1&&v(0,"app-terms-and-conditions")}function cw(n,e){if(n&1&&(s(0,"main"),v(1,"router-outlet")(2,"lib-loader")(3,"app-ajax-error"),C(4,lw,1,0,"app-terms-and-conditions",1),l()),n&2){let t=g(2);G("inert",t.sideMenuService.isSideMenuOpen?"":null),a(4),p("ngIf",t.termsAndConditionsService.showTermsAndConditionsPopup)}}function pw(n,e){if(n&1){let t=S();s(0,"div",7)(1,"app-my-care-plan-side-menu",8),P("logoutHandler",function(){x(t);let o=g(2);return O(o.logout())}),l()()}if(n&2){let t=g(2);p("ngClass",Dt(2,aw,t.sideMenuService.isSideMenuOpen,!t.sideMenuService.isSideMenuOpen)),a(),p("sideMenuConfig",t.sideMenuConfig)}}function dw(n,e){n&1&&(s(0,"footer",9),v(1,"app-footer-portal-mobile"),l())}function mw(n,e){if(n&1){let t=S();s(0,"div",2)(1,"header",3)(2,"app-my-care-plan-header",4),P("toggleMenu",function(){x(t);let o=g();return O(o.toggleMenu())}),l()(),C(3,sw,1,0,"app-network-error",1)(4,cw,5,2,"main",1)(5,pw,2,5,"div",5)(6,dw,2,0,"footer",6),d(7,"async"),l()}if(n&2){let t=g();p("ngClass",ce(8,rw,t.sideMenuService.isSideMenuOpen)),a(2),p("isMenuOpen",t.sideMenuService.isSideMenuOpen),a(),p("ngIf",!t.isNetworkUp),a(),p("ngIf",t.isNetworkUp),a(),p("ngIf",!t.isCheckInFlow),a(),p("ngIf",t.isNetworkUp&&!u(7,6,t.isFooterMenuHidden$))}}function gw(n,e){n&1&&v(0,"app-check-in-flow-container")}var H0=(()=>{let e=class e extends dr{constructor(i,o,r,c,m,_,M,I){super(i,o,r,c,m,_,M),this.router=i,this.loaderService=o,this.networkService=r,this.authorizationService=c,this.localStorage=m,this.activatedRoute=_,this.sideMenuService=M,this.termsAndConditionsService=I}ngOnInit(){this.termsAndConditionsService.initCheckTimer()}logout(){this.authorizationService.logout(!0).subscribe()}};e.\u0275fac=function(o){return new(o||e)(h(B),h(Yi),h(xi),h(nt),h(it),h(j),h(vt),h(ss))},e.\u0275cmp=w({type:e,selectors:[["ng-component"]],standalone:!1,features:[Y],decls:2,vars:2,consts:[["class","wrapper app-my-care-plan",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"wrapper","app-my-care-plan",3,"ngClass"],["
8id","header"],[3,"toggleMenu","isMenuOpen"],["class","app-menu",3,"ngClass",4,"ngIf"],["id","footer",4,"ngIf"],[1,"app-menu",3,"ngClass"],[1,"menu-open",3,"logoutHandler","sideMenuConfig"],["id","footer"]],template:function(o,r){o&1&&C(0,mw,8,10,"div",0)(1,gw,1,0,"app-check-in-flow-container",1),o&2&&(p("ngIf",!r.isCheckInFlow),a(),p("ngIf",r.isCheckInFlow))},dependencies:[He,F,Uo,qo,hs,Bo,Hi,ml,bs,Q0,G0,Fe],styles:[".wrapper[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;background-color:#fff;transition:transform .2s ease}.wrapper[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;z-index:2}.wrapper[_ngcontent-%COMP%] app-network-error[_ngcontent-%COMP%]{display:flex;flex:1}.wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%]{display:flex;flex:1}.wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] app-ajax-error[_ngcontent-%COMP%]{overflow:inherit}.wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{display:flex;z-index:2}.wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] app-my-care-plan-footer-menu[_ngcontent-%COMP%], .wrapper[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] app-network-error[_ngcontent-%COMP%]{width:100%;min-height:100%}app-case-info[_ngcontent-%COMP%]{overflow:visible}.wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] lib-loader[_ngcontent-%COMP%], .wrapper[_ngcontent-%COMP%] main[_ngcontent-%COMP%] app-ajax-error[_ngcontent-%COMP%]{width:0;display:block}app-my-care-plan-side-menu[_ngcontent-%COMP%]{display:none;width:100%;min-height:100%;height:100%;position:absolute;top:0;background-color:#fff;right:0;border-left:1px solid #e6e6e6}.wrapper-menu-open[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%}.menu-open[_ngcontent-%COMP%]{display:block;z-index:1}.app-menu-closed[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;right:0;z-index:-999}.app-menu-closed[_ngcontent-%COMP%] .menu-open[_ngcontent-%COMP%]{display:none}"]});let n=e;return n})();var $0=[{path:"",component:H0,children:[...mp]},{path:"video-call/:appointmentId",loadComponent:()=>import("./chunk-DY2IPHUV.js").then(n=>n.PatientVideoCallLayoutComponent),data:{target:ka.SELF}},...W0];var K0=E0(Ot,{production:!0,app:{checkAccessSettings:!0},mobile:{appName:"PortalMobile",windowName:"MyCarePlan",type:rn.MY_CARE_PLAN,route:{main:{guest:L0,user:$0}}}});var Jr=(0,Y0.default)(K0,{clientIdentifier:"70_5hi3rnp9v0o4wwok844ow08cowcww8kkwok8sc48ck044cw0c8:4sqy818488isk8k8080sgw8k08co0wscg08co8c08ocggookcw",mobile:{portalMobileUrl:"https://mobile.my-care-plan.com"},baseHostname:"mobile.my-care-plan.com"});var X0=(()=>{let e=class e extends wa{constructor(i,o){super(),this.title=i,this.translateService=o}updateTitle(i){let o=this.buildTitle(i);o!==void 0?this.title.setTitle(`${this.translateService._("MyCarePlan")} | ${this.translateService._(o)}`):this.title.setTitle(this.translateService._("MyCarePlan"))}};e.\u0275fac=function(o){return new(o||e)(ie(Rp),ie(qt))},e.\u0275prov=be({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var Z0=(()=>{let e=class e{constructor(i,o,r,c){this.activatedRoute=i,this.router=o,this.appointmentCreateNavigationService=r,this.authorizationService=c}ngOnInit(){this.authorizationService.isAuthorized().subscribe(i=>{let o=this.activatedRoute.snapshot.queryParams,r;i&&this.appointmentCreateNavigationService.isAppointmentBookingRequired(o)?r="/user/appointment":this.activatedRoute.snapshot.queryParams.page==="login"?r="/guest/login":r="/guest/sign-up",this.router.navigate([r],{queryParams:o})})}};e.\u0275fac=function(o){return new(o||e)(h(j),h(B),h(Ge),h(nt))},e.\u0275cmp=w({type:e,selectors:[["ng-component"]],standalone:!1,decls:0,vars:0,template:function(o,r){},encapsulation:2});let n=e;return n})();var J0=(()=>{let e=class e{constructor(i,o,r){this.router=i,this.activatedRoute=o,this.authorizationService=r}navigateToVideoCallPage(i){let{uuid:o}=this.activatedRoute.snapshot.queryParams,r={queryParams:Jt({uuid:o})};this.authorizationService.isAuthorized().subscribe(c=>{let m=c?"/user/video-call":"/guest/video-call";this.router.navigate([`${m}/${i}`],r)})}};e.\u0275fac=function(o){return new(o||e)(h(B),h(j),h(nt))},e.\u0275cmp=w({type:e,selectors:[["ng-component"]],standalone:!1,decls:1,vars:1,consts:[[3,"authorized","isRedirectWithoutCodeAllowed"]],template:function(o,r){o&1&&(s(0,"app-login-by-oauth-code",0),P("authorized",function(m){return r.navigateToVideoCallPage(m)}),l()),o&2&&p("isRedirectWithoutCodeAllowed",!0)},dependencies:[_s],encapsulation:2});let n=e;return n})();var ef=(()=>{let e=class e{constructor(i,o){this.appointmentApiService=i,this.checkInFlowService=o}startAppointmentCheckIn(i){this.appointmentApiService.get(i).subscribe(o=>{this.checkInFlowService.startSingleAppointmentCheckIn(o)})}};e.\u0275fac=function(o){return new(o||e)(h(Ct),h(St))},e.\u0275cmp=w({type:e,selectors:[["ng-component"]],standalone:!1,decls:1,vars:0,consts:[[3,"authorized"]],template:function(o,r){o&1&&(s(0,"app-login-by-oauth-code",0),P("authorized",function(m){return r.startAppointmentCheckIn(m)}),l())},dependencies:[_s],encapsulation:2});let n=e;return n})();var tf=[{path:"feedback",loadChildren:()=>import("./chunk-YYQIBP6T.js").then(n=>n.FeedbackModule)},{path:"move-to-video-call",component:J0},{path:"move-from-scheduling",component:Z0},{path:"check-in-now",component:ef},...uc];var nf=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=we({providers:[{provide:Tp,useClass:kp},{provide:wa,useClass:X0}],imports:[Cr.forRoot(tf),Cr]});let n=e;return n})();var of=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Se({type:e,bootstrap:[Ko]}),e.\u0275inj=we({providers:[{provide:"APP_CONFIG",useValue:Jr.app},{provide:"MOBILE_CONFIG",useValue:Jr.mobile},ma(zp)],imports:[no,ba,xa,u0,nf,q0,Za,Ja,rs,as,es,os,No]});let n=e;return n})();Jr.production&&void 0;var hw=new URLSearchParams(window.location.search),_w=window.self!==window.top;hw.has("transaction[transid]")&&_w?document.body.innerHTML="<div>Transaction processing...</div>":Ep().bootstrapModule(of).catch(n=>console.log(n));
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.