PageSourceSearch

https://www.vzug.com/consultation-booking-feature.module-NJBIW6SC.js

js vzug.com collected 2026-10-01 11:24:36 UTC 85,299 bytes, 1 lines download raw bytes

1import{a as Pi}from"./chunk-QMO6XUYJ.js";import"./chunk-CAFI5YIC.js";import"./chunk-I6GYMV2I.js";import{a as Mi,b as Di}from"./chunk-I63IE7LY.js";import{a as bi}from"./chunk-AXLDIELQ.js";import{a as xi,b as le,c as Bi}from"./chunk-L2D75OT3.js";import"./chunk-F3OPD5UR.js";import{a as Si,b as Ti}from"./chunk-MW46ZS3P.js";import{a as Oi,b as Fi}from"./chunk-WML2KKRD.js";import{a as re,b as se}from"./chunk-COBTFMEO.js";import"./chunk-JHJ2LJAO.js";import"./chunk-675F42SO.js";import{b as yi,c as vi}from"./chunk-Q5WV5GA7.js";import{A as hi,a as vt,b as xt,c as ni,d as ii,e as oi,f as ai,g as ri,h as si,i as li,j as di,k as ci,l as bt,m as mi,n as Ut,o as St,p as pi,q as ui,r as Tt,s as gi,t as Kt,u as Ot,v as _i,w as Ci,x as Ft,y as fi,z as J}from"./chunk-ZDI2HMMO.js";import"./chunk-GSY57JWK.js";import"./chunk-B7HRUQVW.js";import"./chunk-OZHJ6PXK.js";import{d as ti}from"./chunk-EPBWRYCN.js";import"./chunk-B4KLBFX6.js";import"./chunk-ZIN27P3S.js";import"./chunk-3RNOYD7Z.js";import"./chunk-SNHMLIJV.js";import"./chunk-TDOLGIQO.js";import{c as yt}from"./chunk-BGW4JFVC.js";import"./chunk-FK5B46MF.js";import{i as ei}from"./chunk-ISMLZ5AO.js";import"./chunk-ERVRDRGD.js";import{a as Kn,b as mt,c as zn,d as Be,p as ut,q as gt,r as Ke,s as Me,x as oe,y as ae}from"./chunk-NKA5FZDD.js";import{Dc as Ct,Mc as Zn,Nc as _e,Qc as ft,Sc as ht,T as Un,U as pt,Uc as Xn,Vc as Jn,fa as Wn,ga as _t,t as Gn,vc as Ye}from"./chunk-KNPV2EHA.js";import{e as $n}from"./chunk-DDP3RWEG.js";import{a as H,b as $}from"./chunk-RCCDZFTR.js";import{a as jn,b as Qn,c as qn,e as ie,f as L}from"./chunk-7RSDEBSU.js";import{A as Hn,I as ct,a as Z,c as ue,e as ge,g as X,j as Nn,n as Ue,o as Rn,s as lt,t as Vn,v as An,w as Ln,y as dt}from"./chunk-Z5KZRLC7.js";import{c as Yn}from"./chunk-QWOVKJEQ.js";import{$a as En,E as Fe,G as Q,H as q,K as W,W as Gt,_ as In,_a as Y,da as wn,e as Bn,f as T,g as Mn,h as Se,o as Te,q as Dn,s as Pn,u as kn,v as Oe}from"./chunk-H7WMH4BU.js";import{$ as N,Aa as Cn,Ab as bn,Ba as ke,Ca as fn,F as mn,Jd as V,Ka as hn,Kd as A,R as pn,Wb as ot,Y as E,Yc as st,Z as un,ab as it,b as cn,c as k,ca as nt,gc as Sn,j as I,n as tt,nb as yn,ob as vn,pc as Tn,r as w,sa as be,ta as S,ua as O,ud as On,va as gn,vb as xn,vd as Fn,wa as _n,xb as R,xc as at,yc as rt,za as Pe}from"./chunk-5JM3UTP4.js";import{$ as Wt,$b as Le,Aa as me,Ba as Ae,Fa as m,Ib as a,Ic as z,K as B,Na as h,Oa as y,Oc as v,Qc as p,R as je,Ub as tn,Uc as ye,V as Qe,Vc as ve,Vd as dn,Wc as xe,Za as Xt,_b as D,a as jt,da as Yt,dc as P,dd as he,e as Qt,eb as M,ed as qe,gb as Jt,hd as rn,kb as en,ld as sn,mc as Ht,md as $t,nc as nn,o as ce,oa as Zt,oc as _,pc as on,qc as C,qd as ln,ra as te,rd as j,s as qt,sc as an,sd as pe,tc as He,td as We,ua as x,uc as $e,va as ne,vc as r,w as b,wc as s,x as K,xc as c,xd as l,yc as g,yd as d,zd as Ge}from"./chunk-4MWVABFH.js";import"./chunk-76DGGKHL.js";var G=gn(J),Ie=O(G,n=>n.steps),ki=O(G,n=>n.initialRedirectHasBeenDone),Ii=O(G,n=>n.initialized),de=O(G,n=>n.formFlowData),wi=O(G,n=>n.confirmation||void 0),xa=O(de,Ie,(n,o)=>o.slice(0,n.currentStep-1).reverse().find(e=>e.state!=="disabled"&&e.state!=="hidden")||o[n.currentStep-1]),Ei=O(de,Ie,(n,o)=>o.find((e,t)=>t+1===n.currentStep)||o[0]),Ni=O(de,Ie,(n,o)=>o.find((e,t)=>t+1===n.clearedStep+1)||o[0]),ba=O(G,n=>n.consultationData),Ri=O(G,n=>n.consultationData.consultationTypeOptions),Vi=O(G,n=>n.consultationData.consultationReasons),Ai=O(G,n=>n.consultationCenters),Li=O(G,n=>n.consultationDates),Hi=O(G,n=>n.progressIsVisible),$i=O(G,n=>n.loading),Gi=O(G,n=>n.error),Sa=O(G,n=>n.success),Ui=O(G,n=>n.formFlowData.onlineOnly),Ki=O(G,n=>n.formFlowData.clearedStep===0&&n.formFlowData.currentStep===0&&!n.initialRedirectHasBeenDone);var F=class n{constructor(){this.store=m(be)}getIsLoading(){return this.store.pipe(S($i))}getError(){return this.store.pipe(S(Gi))}getProgressIsVisible(){return this.store.pipe(S(Hi))}getSteps(){return this.store.pipe(S(Ie))}getCurrentStep(){return this.store.pipe(S(Ei))}getFormFlowData(){return this.store.pipe(S(de))}getInitialRedirectState(){return this.store.pipe(S(ki))}
1setInitialRedirectState(o){this.store.dispatch(ni({initialRedirectHasBeenDone:o}))}setPreviousStep(){this.store.dispatch(oi())}setCurrentStep(o){this.store.dispatch(ai({currentStep:o}))}setProgressIsVisible(o){this.store.dispatch(ii({progressIsVisible:o}))}init(){this.store.dispatch(vt())}getConsultationTypes(){return this.store.pipe(S(Ri))}getConsultationReasons(){return this.loadConsultationTypes(),this.store.pipe(S(Vi))}getConsultationCenters(){return this.store.pipe(S(Ai))}getConsultationDates(){return this.store.pipe(S(Li))}getConfirmation(){return this.store.pipe(S(wi))}isFlowReset(){return this.store.pipe(S(Ki))}loadConsultationTypes(){this.store.dispatch(St())}loadConsultationCenters(){this.store.dispatch(Tt())}loadConsultationDates(o,e,t){this.store.dispatch(Ot({selectedDate:o,visibleDays:e,loadDatesInPast:t}))}setConsultationType(o,e,t){this.store.dispatch(ri({consultationType:o,consultationLanguage:e,clearNextSteps:t}))}setConsultationCenter(o,e){this.store.dispatch(si({consultationCenter:o,clearNextSteps:e}))}setConsultationDate(o,e,t){this.store.dispatch(li({consultationTimeSlot:o,consultationDateSlot:e,clearNextSteps:t}))}setLogin(o,e){this.store.dispatch(di({userId:o,address:e}))}setDetails(o,e,t,i,u){this.store.dispatch(ci({address:o,reason:e,comment:t,newsletter:i,formData:u}))}submitConsultation(){this.store.dispatch(bt())}setOnlineOnly(o){this.store.dispatch(Ci({onlineOnly:o}))}getOnlineOnly(){return this.store.pipe(S(Ui))}resetData(){this.store.dispatch(Ft())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=me({token:n,factory:n.\u0275fac})}};var Xi=["formElement"],Ji=()=>[0];function eo(n,o){if(n&1&&(g(0,"e-radio-group",6),l(1,"cxTranslate")),n&2){let e=p(2);r("form",e.centerForm)("controlName","center")("radioButtons",o)("legend",d(1,6,"events.availableLocations"))("modifier",e.RadioModifier.CARD)("hideLegend",!0)}}function to(n,o){if(n&1){let e=z();s(0,"div",2),v("handleIntersection",function(i){h(e);let u=p();return y(u.handleIntersection(i))}),s(1,"div",3),g(2,"e-heading",4),l(3,"cxTranslate"),c(),s(4,"form",5,0),_(6,eo,2,8,"e-radio-group",6),l(7,"async"),s(8,"c-action-buttons",7),l(9,"async"),v("prevButtonClick",function(){h(e);let i=p();return y(i.handleBackButtonClick())})("nextButtonClick",function(){h(e);let i=p();return y(i.handleNextButtonClick())}),c()()()}if(n&2){let e,t=p();r("ngClass",t.componentClasses)("threshold",j(14,Ji))("margin","-100% 0px 0px 0px"),a(2),r("headingType",t.HeadingType.H4)("title",d(3,8,"consultationBooking.chooseLocation")),a(2),r("formGroup",t.centerForm),a(2),C((e=d(7,10,t.centerOptions$))?6:-1,e),a(2),r("loading",d(9,12,t.loading$)||!1)}}var Mt=class n extends le{constructor(){super(...arguments);this.router=m(N);this.route=m(E);this.facade=m(F);this.eventService=m(R);this.scrollHandlerService=m(_e);this.fb=m(Fe);this.componentClasses="c-center";this.ButtonModifier=Z;this.ButtonIconPosition=ue;this.HeadingType=X;this.RadioModifier=Ue;this.IconKeys=ge;this.trackingName="form_consultation";this.formFlowData$=this.facade.getFormFlowData().pipe(x(e=>{this.centerForm.get("center")?.setValue(e.center?.pk||"",{emitEvent:!1}),this.currentCenter=e.center}));this.centerOptions$=this.facade.getConsultationCenters().pipe(x(e=>{this.centers=e,e.length===1&&(this.centerForm.get("center")?.setValue(e[0].pk||"",{emitEvent:!1}),this.currentCenter=e[0])}),b(e=>e.map(t=>({value:t.pk,labelText:t.name}))||[]));this.centerForm=this.fb.group({center:["",T.required]})}ngOnInit(){super.ngOnInit(),this.sub.add(this.centerForm.get("center")?.valueChanges.subscribe(e=>{this.currentCenter=this.centers?.find(t=>t.pk===e),this.clearNextSteps=!0})),this.sub.add(K([this.centerOptions$,this.formFlowData$]).pipe(x(([e,t])=>{e.length>1&&!t.center?.code&&(this.centerForm.get("center")?.setValue("",{emitEvent:!1}),this.currentCenter=void 0)})).subscribe()),this.facade.loadConsultationCenters(),this.trackPageTypeEvent(2),this.trackStepEvent(2)}handleNextButtonClick(){this.centerForm.valid&&this.currentCenter?(this.navigationButtonClicked=!0,this.facade.setConsultationCenter(this.currentCenter,this.clearNextSteps)):(this.centerForm.markAllAsTouched(),this.scrollHandlerService.scrollToFormError(this.formElement?.nativeElement))}handleBackButtonClick(){this.navigationButtonClicked=!0,this.facade.setPreviousStep()}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=M(n)))(i||n)}})()}static{this.\u0275cmp=D({type:n,selectors:[["c-center"]],viewQuery:function(t,i){if(t&1&&ye(Xi,5),t&2){let u;ve(u=xe())&&(i.formElement=u.first)}},standalone:!1,features:[P],decls:2,vars:3,consts:[["formElement",""],["dObserveVisibility","",3,"ngClass","threshold","margin"],["dObserveVisibility","",3,"handleIntersection","ngClass","threshold","margin"],[1,"c-center__title-center"],[3,"headingType","title"],[3,"formGroup"],[3,"form","controlName","radioButtons","legend","modifier","hideLegend"],[3,"prevButtonClick","nextButtonClick","loading"]],template:function(t,i){t&1&&(_(0,to,10,15,"div",1),l(1,"async")),t&2&&C(d(1,1,i.formFlowData$)?0:-1)},dependencies:[k,Te,Se,Oe,H,Ke,re,ae,I,V],styles:["[dir=ltr][_ngcontent-%COMP%]{--x-direction: 1}[dir=rtl][_ngcontent-%COMP%]{--x-direction: -1}.c-center__title-center[_ngcontent-%COMP%]{margin-bottom:2rem}@media all and (min-width:1025px){.c-center__title-center[_ngcontent-%COMP%]{margin-bottom:2.4rem}}.c-center__grid-spacing[_ngcontent-%COMP%]{row-gap:.8rem}@media all and (min-width:1025px){.c-center__grid-spacing[_ngcontent-%COMP%]{row-gap:.8rem}}.c-center__select-item[_ngcontent-%COMP%]{height:100%}"]})}};var Dt=class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275mod=Le({type:n})}static{this.\u0275inj=Ae({imports:[w,A,Y,W,q,Q,$,pt,L,Me,se,oe]})}};var no=n=>({centerName:n});function io(n,o){if(n&1&&(s(0,"div",8),g(1,"e-heading",9),c()),n&2){let e=p(3),t=p();a(),r("theme",t.theme)("headingType",t.HeadingType.H3)("title",e.consultationTitle)}}function oo(n,o){if(n&1&&(s(0,"div",8),g(1,"e-heading",10),l(2,"cxTranslate"),c()),n&2){let e=p(4);a(),r("headingType",e.HeadingType.H3)("title",Ge(2,2,"consultationCenter.titleWithCenter",pe(5,no,e.consultationCenterName)))}}function ao(n,o){if(n&1&&(s(0,"div",8),g(1,"e-heading",10),l(2,"cxTranslate"),c()),n&2){let e=p(4);a(),r("headingType",e.HeadingType.H3)("title",d(2,2,"consultationCenter.titleOnline"))}}function ro(n,o){if(n&1&&(s(0,"div",8)(1,"div",11),g(2,"e-text",12),c()()),n&2){let e=p(3),t=p();a(2),r("theme",t.theme)("text",e.consultationSubTitle)}}function so(n,o){if(n&1&&(s(0,"div",4)(1,"div",7),_(2,io,2,3,"div",8),_(3,oo,3,7,"div",8),_(4,ao,3,4,"div",8),_(5,ro,3,2,"div",8),c()()),n&2){let e=p(2),t=p();a(2),C(e.consultationTitle?2:-1),a(),C(e.consultationCenter&&!e.consultationTitle?3:-1),a(),C(e.consultationType===t.ConsultationTypeKey.ONLINE?4:-1),a(),C(e.consultationSubTitle?5:-1)}}function lo(n,o){if(n&1&&(s(0,"div",6),g(1,"c-progress",13),c()),n&2){let e=p(3);a(),r("facade",e.facade)}}function co(n,o){n&1&&g(0,"e-spinner")}function mo(n,o){if(n&1&&(s(0,"div",2)(1,"div",3),_(2,so,6,4,"div",4),s(3,"div",5),_(4,lo,2,1,"div",6),l(5,"async"),g(6,"router-outlet"),_(7,co,1,0,"e-spinner"),l(8,"async"),c()()()),n&2){let e=p(2);a(2),C(e.hasTitle?2:-1),a(2),C(d(5,3,e.progressIsVisible$)===!0?4:-1),a(3),C(d(8,5,e.loading$)?7:-1)}}function po(n,o){if(n&1&&(s(0,"div",1,0),_(2,mo,9,7,"div",2),l(3,"async"),c()),n&2){let e=p();r("ngClass",e.componentClasses),a(2),C(d(3,2,e.formFlowData$)?2:-1)}}var uo="en",Je=class n extends Bi{constructor(){super(...arguments);this.renderer=m(tn);this.component=m(In);this.elementRef=m(Jt);this.facade=m(F);this.router=m(N);this.activatedRoute=m(E);this.routingService=m(Tn);this.location=m(cn);this.winRef=m(it);this.changeDetectorRef=m(dn);this.onNavigateService=m(ti);this.eventService=m(R);this.userAccountFacade=m(yt);this.scrollHandlerService=m(_e);this.smartEditLauncherService=m(Yn);this.headerService=m(Zn);this.platformId=m(en);this.languageService=m(st);this.baseSiteService=m(yn);this.componentClasses="f-consultation-booking";this.HeadingType=X;this.ConsultationTypeKey=$n;this.hasTitle=!1;this.data$=this.data$.pipe(x(e=>{(e.consultationTitle||e.consultationCenter&&!e.consultationTitle||e.consultationType==="ONLINE"||e.consultationSubtitle)&&(this.hasTitle=!0)}));this.formFlowData$=this.facade.getFormFlowData().pipe(x(e=>this.formFlowData=e));this.baseSite$=K([this.baseSiteService.getAll(),this.baseSiteService.getActive()]).pipe(Qe(1),b(([e,t])=>e.filter(i=>i.uid===t)[0]));this.formFlowData={};this.steps=[];this.consultationCenterCode="";this.consultationCenterName=""}getFacade(){return this.facade}ngOnInit(){super.ngOnInit(),this.facade.initialReasonQueryParam===void 0&&(this.facade.initialReasonQueryParam=this.activatedRoute.snapshot.queryParamMap.get("reason")??void 0),this.sub.add(this.steps$.pipe(Yt(),ne(this.data$)).subscribe(([e,t])=>this.handleInitialRedirect(e,t))),this.sub.add(this.restartFlowViaNavigation$.pipe(ne(this.steps$,this.data$)).subscribe(([,e,t])=>this.handleInitialRedirect(e,t)))}handleInitialRedirect(e,t){if(this.smartEditLauncherService.isLaunchedInSmartEdit())return;let i=e.some(ee=>this.router.url.indexOf(`/${ee.routeName}`)>0),u=this.router.url.indexOf(`/${e[0].routeName}`)>0,f=t.consultationCenter!==void 0&&t.consultationCenter!=="",fe=t.consultationType==="ONLINE";if(this.steps=e,this.facade.setOnlineOnly(!1),fe)this.facade.setOnlineOnly(!0),this.addPresetStepsLogicOnline(),this.facade.loadConsultationTypes();else if(f&&!i)this.facade.resetData(),this.sub.add(this.facade.isFlowReset().subscribe(ee=>{ee&&(this.consultationCenterCode=t.consultationCenter,this.addPresetStepsLogicOffline(),this.facade.loadConsultationTypes(),this.setConsultationCenterName(t.consultationCenter))}));else if(f&&i)this.facade.loadConsultationCenters(),this.setConsultationCenterName(t.consultationCenter);else if(i)u&&this.facade.setCurrentStep(1);else{this.facade.setProgressIsVisible(!0);let ee=e[0].routeName;this.facade.setCurrentStep(1),this.router.navigate([ee],{relativeTo:this.activatedRoute,state:{currentStep:1},replaceUrl:!0,skipLocationChange:!0})}}addPresetStepsLogicOffline(){this.sub.add(this.facade.getConsultationTypes().pipe(B(e=>e.length>0),Qe(1),ne(this.languageService.getActive(),this.facade.getInitialRedirectState()),x(([e,t,i])=>this.handlePresetStepsLogicConsultationTypesOffline(e,t,i))).subscribe()),this.sub.add(this.facade.getSteps().pipe(te(e=>K([this.facade.getConsultationCenters(),this.facade.getInitialRedirectState(),ce(e)])),B(([e])=>e.length>0),Qe(1),x(([e,t,i])=>this.handlePresetStepsLogicConsultationCentersOffline(e,t,i))).subscribe())}addPresetStepsLogicOnline(){this.sub.add(K([this.baseSite$,this.languageService.getActive(),this.facade.getInitialRedirectState(),this.facade.getConsultationTypes().pipe(B(e=>e.length>0)),this.facade.getSteps()]).pipe(Qe(1),x(([e,t,i,u,f])=>this.handlePresetStepsLogicConsultationTypesOnline(e,t,i,u,f))).subscribe())}setConsultationCenterName(e){this.sub.add(this.facade.getConsultationCenters().subscribe(t=>{let i=t.find(u=>u.code===e);i&&(this.consultationCenterName=i.name||"")}))}handlePresetStepsLogicConsultationTypesOffline(e,t,i){if(i)return;let u;if(this.consultationCenterCode.indexOf("ONLINE".toLowerCase())>=0?u=e.find(f=>f.type==="ONLINE"):u=e.find(f=>f.type==="ON_SITE"),u){let f=u.languages.find(fe=>fe.isoCode===t.substring(0,2));this.facade.setConsultationType(u,f||e[0].languages[0],!1),this.facade.loadConsultationCenters()}}handlePresetStepsLogicConsultationCentersOffline(e,t,i){if(t)return;let u=e.find(f=>f.code===this.consultationCenterCode);
1if(u){this.facade.setConsultationCenter(u,!1),this.facade.setInitialRedirectState(!0);let f=i[2].routeName;this.router.navigate([f],{relativeTo:this.activatedRoute,state:{currentStep:3},replaceUrl:!0,skipLocationChange:!0})}else{this.facade.setCurrentStep(1);let f=i[0].routeName;this.router.navigate([f],{relativeTo:this.activatedRoute,state:{currentStep:1},replaceUrl:!0,skipLocationChange:!0})}this.facade.setProgressIsVisible(!0)}handlePresetStepsLogicConsultationTypesOnline(e,t,i,u,f){if(i)return;let fe=e?.defaultLanguage?.isocode||"",ee=u.find(De=>De.type==="ONLINE"),Ve;ee&&(Ve=ee.languages.find(De=>De.isoCode===t.substring(0,2)),Ve||(Ve=ee.languages.find(De=>De.isoCode===uo)),Ve||(Ve=ee.languages.find(De=>De.isoCode===fe)),this.facade.setConsultationType(ee,Ve||ee.languages[0],!1),this.facade.setInitialRedirectState(!0),this.router.navigate([f[2].routeName],{relativeTo:this.activatedRoute,state:{currentStep:3},replaceUrl:!0,skipLocationChange:!0}))}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=M(n)))(i||n)}})()}static{this.\u0275cmp=D({type:n,selectors:[["f-consultation-booking"]],features:[ln([F,{provide:xi,useExisting:F}]),P],decls:2,vars:3,consts:[["flowWrapper",""],[3,"ngClass"],[1,"grid"],[1,"g-col-12","g-col-sm-11","g-start-sm-2"],[1,"f-consultation-booking__title"],[1,"f-consultation-booking__inner"],[1,"f-consultation-booking__progress"],[1,"grid","f-consultation-booking__title-container"],[1,"g-col-12","g-col-md-6"],[3,"theme","headingType","title"],[3,"headingType","title"],[1,"f-consultation-booking__subTitle"],[3,"theme","text"],[3,"facade"]],template:function(t,i){if(t&1&&(_(0,po,4,4,"div",1),l(1,"async")),t&2){let u;C((u=d(1,1,i.data$))?0:-1,u)}},dependencies:[w,k,nt,un,Fi,Oi,Dt,$,H,L,ie,A,zn,Kn,I,V],styles:["[dir=ltr][_ngcontent-%COMP%]{--x-direction: 1}[dir=rtl][_ngcontent-%COMP%]{--x-direction: -1}[_nghost-%COMP%]{--e-spinner-backdrop-color: rgba(242, 239, 232, .75);display:block}.f-consultation-booking[_ngcontent-%COMP%]{margin-top:calc(var(--header-height) * -1 - 1rem);padding-top:calc(var(--header-height) + 1rem)}.f-consultation-booking__title-container[_ngcontent-%COMP%]{row-gap:.8rem}@media all and (min-width:1025px){.f-consultation-booking__title-container[_ngcontent-%COMP%]{row-gap:.8rem}}@media all and (max-width:1024px){.f-consultation-booking__title-container[_ngcontent-%COMP%]{margin-top:0}}@media all and (min-width:1025px){.f-consultation-booking__title-container[_ngcontent-%COMP%]{--bs-columns: 11}}.f-consultation-booking__title[_ngcontent-%COMP%]{margin-bottom:2.4rem}@media all and (min-width:1025px){.f-consultation-booking__title[_ngcontent-%COMP%]{margin-bottom:3.6rem}}.f-consultation-booking__inner[_ngcontent-%COMP%]{position:relative}@media all and (min-width:720px){.f-consultation-booking__inner[_ngcontent-%COMP%]{--bs-columns: 11}}.f-consultation-booking__progress[_ngcontent-%COMP%]{margin-bottom:3.6rem}@media all and (min-width:1025px){.f-consultation-booking__progress[_ngcontent-%COMP%]{margin-bottom:4.8rem}}"]})}};var Co=["formElement"],fo=()=>[0],Qi=n=>({"c-date__separator-vertical":n}),ho=(n,o)=>({startDate:n,endDate:o}),qi=(n,o)=>o.startTime+";"+o.endTime;function yo(n,o){if(n&1&&(s(0,"li",15)(1,"span",22),he(2),c(),s(3,"span",22),he(4,"-"),c(),s(5,"span",22),he(6),c()()),n&2){let e=o.$implicit,t=p(5);a(2),qe(t.getSlotStartTime(e)),a(4),qe(t.getSlotEndTime(e))}}function vo(n,o){if(n&1){let e=z();s(0,"li",23),g(1,"input",26),s(2,"label",27),v("click",function(i){let u=h(e).$implicit,f=p().$index,fe=p(5);return y(fe.handleDateSelection(u.dates[f],u,i))}),s(3,"span",28),he(4),l(5,"cxTranslate"),l(6,"cxTranslate"),c(),s(7,"span",29),g(8,"e-icon",30),l(9,"cxTranslate"),c()()()}if(n&2){let e=o.$implicit,t=p(),i=t.$implicit,u=t.$index,f=p(5);r("ngClass",pe(22,Qi,f.checkDateSlotForMonday(i))),a(),r("id",$t("item-",e.dates[u].pk))("value",sn(e.dates[u].pk)),Ht("disabled",e.dates[u].freeCapacity<=0?"disabled":null)("aria-disabled",e.dates[u].freeCapacity<=0?"true":null),a(),r("for",$t("item-",e.dates[u].pk))("ngClass",f.isDateInvalid?"c-date__slot-label--error":""),a(2),rn(" ",d(5,15,f.getItemText(e.dates[u].freeCapacity))," ",f.getFormattedDate(i.date,"EE")," ",Ge(6,17,"consultationBooking.dateRange.a11y.text",We(24,ho,f.getSlotStartTime(e),f.getSlotEndTime(e)))," "),a(4),r("icon",f.getItemIconKey(e.dates[u].freeCapacity))("title",d(9,20,f.getItemText(e.dates[u].freeCapacity)))}}function xo(n,o){if(n&1&&(s(0,"ul",14)(1,"li",23),g(2,"e-text",24)(3,"e-text",25),c(),He(4,vo,10,27,"li",23,qi),c()),n&2){let e=o.$implicit,t=p(2),i=p(3);a(),r("ngClass",pe(5,Qi,i.checkDateSlotForMonday(e))),a(),r("text",i.getFormattedDate(e.date,"EE"))("fontWeight",i.FontWeight.MEDIUM),a(),r("text",i.getFormattedDate(e.date,"dd.MM"))("fontSize",i.FontSize.SMALL),a(),$e(t)}}function bo(n,o){if(n&1&&(s(0,"div",16),g(1,"e-input-error",31),c()),n&2){let e=p(5);a(),r("control",e.dateForm.get("slot"))}}function So(n,o){if(n&1&&(s(0,"div",7)(1,"div",12)(2,"div",13)(3,"ul",14)(4,"li",15),he(5,"\xA0"),g(6,"br"),he(7,"\xA0"),c(),He(8,yo,7,2,"li",15,qi),c(),He(10,xo,6,7,"ul",14,
1nn().trackByPkOrdDate,!0),_(12,bo,2,1,"div",16),s(13,"div",17)(14,"span",18),g(15,"e-icon",19)(16,"e-text",20),l(17,"cxTranslate"),c(),s(18,"span",18),g(19,"e-icon",19)(20,"e-text",20),l(21,"cxTranslate"),c(),s(22,"span",18),g(23,"span",21)(24,"e-text",20),l(25,"cxTranslate"),c()()()()()),n&2){let e=p(),t=p(3);a(8),$e(e),a(2),$e(e[0].dates),a(2),C(t.isDateInvalid?12:-1),a(3),r("icon",t.IconKeys.MINUS),a(),r("text",d(17,6,t.getItemText(-1))),a(3),r("icon",t.IconKeys.CROSS),a(),r("text",d(21,8,t.getItemText(0))),a(4),r("text",d(25,10,t.getItemText(1)))}}function To(n,o){if(n&1&&(s(0,"div",32),g(1,"e-message",33),l(2,"cxTranslate"),c()),n&2){let e=p(5);a(),r("messageType",e.MessageType.WARNING)("message",d(2,2,"consultationBooking.warning.chooseSlot"))}}function Oo(n,o){if(n&1&&(_(0,To,3,4,"div",32),l(1,"async")),n&2){let e=p(4);C(d(1,1,e.loading$)===!1?0:-1)}}function Fo(n,o){n&1&&_(0,So,26,12,"div",7)(1,Oo,2,3),n&2&&C(o.length?0:1)}function Bo(n,o){if(n&1&&(s(0,"div",32),g(1,"e-message",33),l(2,"cxTranslate"),c()),n&2){let e=p(4);a(),r("messageType",e.MessageType.WARNING)("message",d(2,2,"consultationBooking.warning.chooseSlot"))}}function Mo(n,o){if(n&1&&(_(0,Bo,3,4,"div",32),l(1,"async")),n&2){let e=p(3);C(d(1,1,e.loading$)===!1?0:-1)}}function Do(n,o){if(n&1){let e=z();s(0,"form",6,0),v("ngSubmit",function(){h(e);let i=p(2);return y(i.handleNextButtonClick())}),s(2,"div",7)(3,"div",8)(4,"div",9)(5,"e-text-input",10),l(6,"cxTranslate"),v("handleDatePrevButtonClick",function(){h(e);let i=p(2);return y(i.handleDatePrevious())})("handleDateNextButtonClick",function(){h(e);let i=p(2);return y(i.handleDateNext())}),c()()()(),_(7,Fo,2,1),l(8,"async"),on(9,Mo,2,3),s(10,"c-action-buttons",11),l(11,"async"),l(12,"async"),v("prevButtonClick",function(){h(e);let i=p(2);return y(i.handleBackButtonClick())})("nextButtonClick",function(){h(e);let i=p(2);return y(i.handleNextButtonClick())}),c()()}if(n&2){let e,t=p(2);r("formGroup",t.dateForm),Ht("data-theme",t.Theme.DEFAULT),a(5),r("form",t.dateForm)("controlName","startDate")("inputType",t.InputType.DATE)("minDate",t.getFormattedDate(t.minDate,"yyyy-MM-dd"))("prevButtonDisabled",t.isDatePrevButtonDisabled)("labelText",d(6,12,"generic.date"))("hideLabel",!0),a(2),C((e=d(8,14,t.options$))?7:9,e),a(3),r("loading",d(11,16,t.loading$)||!1)("showPrevButton",d(12,18,t.isOnlineOnly$)===!1)}}function Po(n,o){if(n&1){let e=z();s(0,"div",2),v("handleIntersection",function(i){h(e);let u=p();return y(u.handleIntersection(i))}),s(1,"div",3),g(2,"e-heading",4),l(3,"cxTranslate"),c(),_(4,Do,13,20,"form",5),l(5,"async"),c()}if(n&2){let e=p();r("ngClass",e.componentClasses)("threshold",j(9,fo))("margin","-100% 0px 0px 0px"),a(2),r("title",d(3,5,"generic.chooseSlot")),a(2),C(d(5,7,e.locale$)?4:-1)}}var ko=3,Io=6,wo=10,Pt=class n extends le{constructor(){super(...arguments);this.router=m(N);this.route=m(E);this.facade=m(F);this.eventService=m(R);this.scrollHandlerService=m(_e);this.localeService=m(Ct);this.fb=m(Fe);this.breakpointService=m(wn);this.componentClasses="c-date";this.Theme=ct;this.ButtonModifier=Z;this.ButtonIconPosition=ue;this.FontWeight=jn;this.MessageType=dt;this.FontSize=qn;this.InputType=lt;this.IconKeys=ge;this.trackingName="form_consultation";this.isDateInvalid=!1;this.isDatePrevButtonDisabled=!1;this.locale$=this.localeService.locale$.pipe(B(e=>e!==""),x(e=>this.datePipe=new tt(e)));this.formFlowData$=K([this.facade.getFormFlowData(),this.locale$]).pipe(x(([e])=>{this.setCurrentDateValue(e),this.dateForm.get("slot")?.setValue(e.date?.dateSlot?.pk||""),this.isDatePrevButtonDisabled=this.getIsDatePrevButtonDisabled(),this.currentTimeSlot=e.date?.timeSlot,this.currentDateSlot=e.date?.dateSlot}),b(([e])=>e));this.visibleDays$=this.breakpointService.breakpoint$.pipe(b(e=>e===Gt.xs?ko:e===Gt.sm?Io:wo));this._selectedDate=new Qt("");this.selectedDate$=this._selectedDate.asObservable();this.options$=K([this.visibleDays$,this.locale$,this.selectedDate$]).pipe(x(([e])=>{this.visibleDays=e,this.isDatePrevButtonDisabled=this.getIsDatePrevButtonDisabled()}),te(()=>this.facade.getConsultationDates().pipe(x(e=>{if(e.hasSlots&&e.lastVisibleDate){this.slotsAvailable=e.hasSlots,this.lastVisibleDate=new Date(e.lastVisibleDate);let t=new Date(e.slots[0].dates[0].date);this.dateForm.get("startDate")?.setValue(this.datePipe?.transform(t,"yyyy-MM-dd"),{emitEvent:!1})}else this.slotsAvailable=!1;this.loadDateSlotsInPast=!1,this.isDatePrevButtonDisabled=this.getIsDatePrevButtonDisabled()}),b(e=>e?.slots||[]))));this.loading$=this.facade.getIsLoading();this.isOnlineOnly$=this.facade.getOnlineOnly();this.dateForm=this.fb.group({startDate:[""],slot:["",T.required]});this.visibleDays=0;this.minDate=new Date;this.loadDateSlotsInPast=!1;this.slotsAvailable=!1;this.trackByPkOrdDate=(e,t)=>
1t.pk??t.date}ngOnInit(){super.ngOnInit(),this.sub.add(this.dateForm.get("startDate")?.valueChanges.pipe(Zt(1)).subscribe(e=>this._selectedDate.next(e))),this.sub.add(this.dateForm.get("slot")?.valueChanges.subscribe(()=>{this.isDateInvalid=this.getIsDateInvalid(),this.clearNextSteps=!0})),this.sub.add(K([this.visibleDays$,this.selectedDate$.pipe(B(e=>e!==""))]).pipe(x(([e,t])=>{this.facade.loadConsultationDates(new Date(t),e,this.loadDateSlotsInPast)})).subscribe()),this.trackPageTypeEvent(3),this.trackStepEvent(3)}setCurrentDateValue(e){let t=new Date;e.date?.dateSlot?t=new Date(e.date?.dateSlot.date):t.setDate(t.getDate()+1),this._selectedDate.next(this.datePipe?.transform(t,"yyyy-MM-dd")||""),this.dateForm.get("startDate")?.setValue(this._selectedDate.value)}getFormattedDate(e,t){return e instanceof String&&(e=new Date(e)),this.datePipe?.transform(e,t)||""}checkForMonday(e){return e.getDay()===1}checkDateSlotForMonday(e){return this.checkForMonday(new Date(e.date))}getSlotStartTime(e){if(!e)return"";let t=new Date(e.startTime);return this.getTime(t)}getSlotEndTime(e){if(!e)return"";let t=new Date(e.endTime);return this.getTime(t)}getItemText(e){return e===-1?"generic.unavailable":e===0?"generic.booked":"generic.available"}getItemIconKey(e){return e===-1?"minus":e===0?"cross":"check"}getIsDatePrevButtonDisabled(){let e=new Date(this.dateForm.get("startDate")?.value);return e.setDate(e.getDate()-this.visibleDays)<this.minDate.getTime()}handleDatePrevious(){this.loadDateSlotsInPast=!0;let e=new Date(this.dateForm.get("startDate")?.value);this.slotsAvailable?e.setDate(e.getDate()-1):(this.loadDateSlotsInPast=!1,e.setDate(e.getDate()-this.visibleDays)),this.dateForm.get("startDate")?.setValue(this.datePipe?.transform(e,"yyyy-MM-dd"))}handleDateNext(){this.loadDateSlotsInPast=!1;let e=new Date(this.dateForm.get("startDate")?.value);this.lastVisibleDate&&this.slotsAvailable?(e=this.lastVisibleDate,e.setDate(e.getDate()+1)):e.setDate(e.getDate()+this.visibleDays),this.dateForm.get("startDate")?.setValue(this.datePipe?.transform(e,"yyyy-MM-dd"))}handleDateSelection(e,t,i){e.freeCapacity>0?(this.currentDateSlot=e,this.currentTimeSlot=t):(i.preventDefault(),i.stopPropagation())}handleNextButtonClick(){this.dateForm.valid&&this.currentTimeSlot&&this.currentDateSlot?(this.navigationButtonClicked=!0,this.facade.setConsultationDate(this.currentTimeSlot,this.currentDateSlot,this.clearNextSteps)):(this.dateForm.markAllAsTouched(),this.scrollHandlerService.scrollToFormError(this.formElement?.nativeElement),this.isDateInvalid=this.getIsDateInvalid())}handleBackButtonClick(){this.navigationButtonClicked=!0,this.facade.setPreviousStep()}getTime(e){return`${this.datePipe?.transform(e,"HH.mm")}`}getIsDateInvalid(){let e=this.dateForm?.get("slot");return(e?.touched&&e.invalid)??!1}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=M(n)))(i||n)}})()}static{this.\u0275cmp=D({type:n,selectors:[["c-date"]],viewQuery:function(t,i){if(t&1&&ye(Co,5),t&2){let u;ve(u=xe())&&(i.formElement=u.first)}},features:[P],decls:2,vars:3,consts:[["formElement",""],["dObserveVisibility","",3,"ngClass","threshold","margin"],["dObserveVisibility","",3,"handleIntersection","ngClass","threshold","margin"],[1,"c-date__title-consultation"],["headingType","h4",3,"title"],["data-theme-element","form-field",3,"formGroup"],["data-theme-element","form-field",3,"ngSubmit","formGroup"],[1,"grid"],[1,"g-col-8","g-col-sm-3"],[1,"c-date__datepicker"],[3,"handleDatePrevButtonClick","handleDateNextButtonClick","form","controlName","inputType","minDate","prevButtonDisabled","labelText","hideLabel"],[3,"prevButtonClick","nextButtonClick","loading","showPrevButton"],[1,"g-col-12","g-col-sm-11"],[1,"c-date__slot-grid"],[1,"c-date__slot-grid-column"],[1,"c-date__slot-grid-cell"],[1,"c-date__error-message","g-col-11","g-start-2"],[1,"c-date__legend","g-start-2","g-col-10"],[1,"c-date__legend-item"],[1,"c-date__legend-item-icon",3,"icon"],[3,"text"],[1,"c-date__legend-item-icon","c-date__legend-item-icon--selectable"],[1,"c-date__slot-grid-cell-time-heading"],[1,"c-date__slot-grid-cell",3,"ngClass"],[3,"text","fontWeight"],[3,"text","fontSize"],["type","radio","formControlName","slot",1,"c-date__slot-input",3,"id","value"],[1,"c-date__slot-label",3,"click","ngClass","for"],[1,"c-date__slot-label-text"],[1,"c-date__slot-label-icon"],[3,"icon","title"],[3,"control"],[1,"c-date__no-dates","g-col-12","g-col-md-6"],[3,"messageType","message"]],template:function(t,i){t&1&&(_(0,Po,6,10,"div",1),l(1,"async")),t&2&&C(d(1,1,i.formFlowData$)?0:-1)},dependencies:[w,k,A,Y,W,q,Te,Bn,Dn,Mn,Se,Oe,kn,Q,En,$,H,L,ie,Me,Pi,pt,ht,ft,gt,ut,se,re,oe,ae,Un,I,V],styles:['[dir=ltr][_ngcontent-%COMP%]{--x-direction: 1}[dir=rtl][_ngcontent-%COMP%]{--x-direction: -1}.c-date__title-consultation[_ngcontent-%COMP%]{margin-bottom:2rem}@media all and (min-width:1025px){.c-date__title-consultation[_ngcontent-%COMP%]{margin-bottom:2.4rem}}.c-date__datepicker[_ngcontent-%COMP%]{margin-bottom:3.6rem}@media all and (min-width:1025px){.c-date__datepicker[_ngcontent-%COMP%]{margin-bottom:4.8rem}}.c-date__separator-vertical[_ngcontent-%COMP%]{padding-inline-start:1.2rem}@media all and (min-width:1025px){.c-date__separator-vertical[_ngcontent-%COMP%]{padding-inline-start:1.2rem}}.c-date__separator-vertical[_ngcontent-%COMP%]{border-left:1px solid #1d2025}@media all and (min-width:1025px){.c-date__separator-vertical[_ngcontent-%COMP%]{padding-inline-start:2.4rem}}.c-date__slot-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr)}@media all and (min-width:720px){.c-date__slot-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(7,1fr)}}@media all and (min-width:1025px){.c-date__slot-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(11,1fr)}}.c-date__slot-grid-column[_ngcontent-%COMP%]{display:grid}.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]:first-child{padding-bottom:1.6rem}@media all and (min-width:1025px){.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]:first-child{padding-bottom:1.6rem}}.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]:first-child{display:flex;flex-direction:column;align-items:center}.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]:nth-child(2){padding-top:1.6rem}@media all and (min-width:1025px){.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]:nth-child(2){padding-top:1.6rem}}.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]:last-child{padding-bottom:1.6rem}@media all and (min-width:1025px){.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]:last-child{padding-bottom:2rem}}@media all and (min-width:720px){.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]:last-child{padding-bottom:1.6rem}}.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]{padding-bottom:1.2rem}@media all and (min-width:1025px){.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]{padding-bottom:1.2rem}}.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]{padding-inline-end:1.2rem}@media all and (min-width:1025px){.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]{padding-inline-end:1.2rem}}.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;white-space:nowrap;min-height:7rem}@media all and (min-width:720px){.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]{padding-bottom:2.4rem}}@media all and (min-width:1025px){.c-date__slot-grid-column[_ngcontent-%COMP%] > .c-date__slot-grid-cell[_ngcontent-%COMP%]{padding-inline-end:2.4rem}}.c-date__slot-grid-column[_ngcontent-%COMP%]:not(:first-child) > .c-date__slot-grid-cell[_ngcontent-%COMP%]:first-child{border-bottom:1px solid #c7c8ca}.c-date__slot-grid-column[_ngcontent-%COMP%]:not(:first-child) > .c-date__slot-grid-cell[_ngcontent-%COMP%]:last-child{border-bottom:1px solid #c7c8ca}.c-date__slot-grid-column[_ngcontent-%COMP%]:first-child{padding-inline-end:.8rem}@media all and (min-width:1025px){.c-date__slot-grid-column[_ngcontent-%COMP%]:first-child{padding-inline-end:.8rem}}.c-date__slot-grid-column[_ngcontent-%COMP%]:first-child > .c-date__slot-grid-cell[_ngcontent-%COMP%]{flex-direction:column}@media all and (min-width:720px){.c-date__slot-grid-column[_ngcontent-%COMP%]:first-child > .c-date__slot-grid-cell[_ngcontent-%COMP%]{flex-direction:row}}.c-date__slot-grid-column[_ngcontent-%COMP%]:first-child > .c-date__slot-grid-cell[_ngcontent-%COMP%] > .c-date__slot-grid-cell-time-heading[_ngcontent-%COMP%]:nth-child(2){display:none;visibility:hidden}@media all and (min-width:720px){.c-date__slot-grid-column[_ngcontent-%COMP%]:first-child > .c-date__slot-grid-cell[_ngcontent-%COMP%] > .c-date__slot-grid-cell-time-heading[_ngcontent-%COMP%]:nth-child(2){display:block;visibility:visible}}.c-date__slot-grid-cell-time-heading[_ngcontent-%COMP%]{font-size:1.6rem;line-height:1.625;font-weight:300}@media all and (min-width:1025px){.c-date__slot-grid-cell-time-heading[_ngcontent-%COMP%]{font-size:1.6rem;line-height:1.625;font-weight:300}}.c-date__slot-input[_ngcontent-%COMP%]{border:0;clip-path:inset(50%);
1height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.c-date__slot-input[_ngcontent-%COMP%]:focus-visible ~ .c-date__slot-label[_ngcontent-%COMP%]{border:1px solid #706966;background-color:#f2efe8;outline:2px solid #c4bab4;outline-offset:4px}.c-date__slot-input[_ngcontent-%COMP%]:checked ~ .c-date__slot-label[_ngcontent-%COMP%]{background-color:#706966}.c-date__slot-input[_ngcontent-%COMP%]:checked ~ .c-date__slot-label[_ngcontent-%COMP%]   .c-date__slot-label-icon[_ngcontent-%COMP%]{opacity:1}.c-date__slot-input[aria-disabled][_ngcontent-%COMP%] ~ .c-date__slot-label[_ngcontent-%COMP%]{cursor:not-allowed;color:#1d2025;border:none;background-color:transparent}.c-date__slot-input[aria-disabled][_ngcontent-%COMP%] ~ .c-date__slot-label[_ngcontent-%COMP%]:hover{color:#1d2025;border:none;background-color:transparent}.c-date__slot-input[aria-disabled][_ngcontent-%COMP%] ~ .c-date__slot-label[_ngcontent-%COMP%]   .c-date__slot-label-icon[_ngcontent-%COMP%]{opacity:1}.c-date__slot-label[_ngcontent-%COMP%]{transition:border .2s ease-in-out,background-color .2s ease-in-out;content:"";border:1px solid #706966;display:flex;align-items:center;border-radius:50%;color:#fefbf4;background-color:#fefbf4;cursor:pointer}.c-date__slot-label[_ngcontent-%COMP%]:hover{border:1px solid #706966;background-color:#f2efe8}.c-date__slot-label--error[_ngcontent-%COMP%]{border-color:var(--text-input-border-error)}.c-date__slot-label-icon[_ngcontent-%COMP%]{transition:opacity .2s ease-in-out;height:2.2rem;width:2.2rem;font-size:2.2rem;line-height:0;opacity:0}
1.c-date__error-message[_ngcontent-%COMP%]{margin-top:1.2rem}@media all and (min-width:1025px){.c-date__error-message[_ngcontent-%COMP%]{margin-top:1.2rem}}.c-date__no-dates[_ngcontent-%COMP%]{margin-bottom:3.6rem}@media all and (min-width:1025px){.c-date__no-dates[_ngcontent-%COMP%]{margin-bottom:4.8rem}}.c-date__legend[_ngcontent-%COMP%]{margin-top:1.6rem}@media all and (min-width:1025px){.c-date__legend[_ngcontent-%COMP%]{margin-top:1.6rem}}.c-date__legend[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}@media all and (max-width:719px){.c-date__legend[_ngcontent-%COMP%]{flex-direction:column}}.c-date__legend-item[_ngcontent-%COMP%]{margin-inline-end:1.6rem}@media all and (min-width:1025px){.c-date__legend-item[_ngcontent-%COMP%]{margin-inline-end:2rem}}.c-date__legend-item[_ngcontent-%COMP%]{margin-bottom:.4rem}@media all and (min-width:1025px){.c-date__legend-item[_ngcontent-%COMP%]{margin-bottom:.4rem}}.c-date__legend-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.c-date__slot-label-text[_ngcontent-%COMP%]{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.c-date__legend-item-icon[_ngcontent-%COMP%]{margin-inline-end:.8rem}@media all and (min-width:1025px){.c-date__legend-item-icon[_ngcontent-%COMP%]{margin-inline-end:.8rem}}.c-date__legend-item-icon[_ngcontent-%COMP%]{height:2.2rem;width:2.2rem;font-size:2.2rem;line-height:0}.c-date__legend-item-icon--selectable[_ngcontent-%COMP%]{border-radius:50%;border:1px solid #706966;background-color:#fefbf4}']})}};var Eo=["formElement"],No=()=>[0],Ro=n=>({country:n,type:"postalCode"}),Wi=(n,o)=>({searchType:"postalCode",searchParams:n,resultFormatter:o}),Vo=n=>({country:n,type:"town"});function Ao(n,o){if(n&1){let e=z();s(0,"div",19)(1,"e-radio-group",27),v("handleChange",function(){h(e);let i=p(2);return y(i.handleReasonChange("reasonStandard","standard"))}),c(),s(2,"div",28)(3,"e-text-input",29),l(4,"cxTranslate"),l(5,"cxTranslate"),v("handleChange",function(){h(e);let i=p(2);return y(i.handleCommentChange("commentStandard"))}),c()(),s(6,"e-radio-group",27),v("handleChange",function(){h(e);let i=p(2);return y(i.handleReasonChange("reasonOther","other"))}),c(),s(7,"div",30)(8,"e-text-input",29),l(9,"cxTranslate"),l(10,"cxTranslate"),v("handleChange",function(){h(e);let i=p(2);return y(i.handleCommentChange("commentOther"))}),c()()()}if(n&2){let e=p(2);a(),r("form",e.detailsForm)("controlName","reasonStandard")("radioButtons",o)("hideLegend",!0)("noSpacing",!0),a(2),r("form",e.detailsForm)("controlName","commentStandard")("placeholder",d(4,22,"consultationBooking.reasonModelOrSN"))("labelText",d(5,24,"consultationBooking.reasonModelOrSN"))("hideLabel",!0)("noSpacing",!0),a(3),r("form",e.detailsForm)("controlName","reasonOther")("radioButtons",e.reasonOptionsOther)("hideLegend",!0)("noSpacing",!0),a(2),r("form",e.detailsForm)("controlName","commentOther")("placeholder",d(9,26,"consultationBooking.reasonSpecifyOther"))("labelText",d(10,28,"consultationBooking.reasonSpecifyOther"))("hideLabel",!0)("noSpacing",!0)}}function Lo(n,o){if(n&1){let e=z();s(0,"div",2),v("handleIntersection",function(i){h(e);let u=p();return y(u.handleIntersection(i))}),s(1,"form",3,0)(3,"div",4)(4,"div",5),g(5,"e-heading",6),l(6,"cxTranslate"),c(),s(7,"div",7)(8,"e-radio-group",8),l(9,"cxTranslate"),v("handleChange",function(){h(e);let i=p();return y(i.handleTitleChange())}),c(),g(10,"e-text-input",9),l(11,"cxTranslate"),l(12,"cxTranslate"),g(13,"e-text-input",9),l(14,"cxTranslate"),l(15,"cxTranslate"),g(16,"e-text-input",10),l(17,"cxTranslate"),l(18,"cxTranslate"),g(19,"e-text-input",11),l(20,"cxTranslate"),l(21,"cxTranslate"),s(22,"div",12)(23,"div",13),g(24,"e-text-input",9),l(25,"cxTranslate"),l(26,"cxTranslate"),c(),s(27,"div",14),g(28,"e-text-input",9),l(29,"cxTranslate"),l(30,"cxTranslate"),c(),s(31,"div",14)(32,"e-text-input",15),l(33,"cxTranslate"),l(34,"cxTranslate"),v("handleAutoCompleteSelection",function(i){h(e);let u=p();return y(u.handleZipTownSelection(i))}),c()(),s(35,"div",13)(36,"e-text-input",16),l(37,"cxTranslate"),l(38,"cxTranslate"),v("handleAutoCompleteSelection",function(i){h(e);let u=p();return y(u.handleZipTownSelection(i))}),c()()()()(),s(39,"div",17)(40,"div",18),g(41,"e-heading",6),l(42,"cxTranslate"),c(),_(43,Ao,11,30,"div",19),l(44,"async"),s(45,"div",20),g(46,"e-heading",6),l(47,"cxTranslate"),c(),s(48,"div",21),g(49,"e-text",22),l(50,"cxTranslate"),c(),s(51,"e-text-input",23),l(52,"cxTranslate"),v("handleChange",function(i){h(e);let u=p();return y(u.handleFileSelect(i))}),c()(),s(53,"div",24),g(54,"c-newsletter-form-control",25),c()(),s(55,"c-action-buttons",26),l(56,"async"),v("prevButtonClick",function(){h(e);let i=p();return y(i.handleBackButtonClick())})("nextButtonClick",function(){h(e);let i=p();return y(i.handleNextButtonClick())}),c()()}if(n&2){let e,t=p();r("ngClass",t.componentClasses)("threshold",j(116,No))("margin","-100% 0px 0px 0px"),a(),r("formGroup",t.detailsForm),a(4),r("headingType",t.HeadingType.H4)("title",d(6,68,"consultationBooking.yourDetails")),a(2),r("formGroupName","address"),a(),r("form",t.detailsForm.get("address"))("controlName","titleCode")("radioButtons",t.titleOptions)("legend",d(9,70,"address.title"))("modifier",t.RadioModifier.HORIZONTAL),a(2),r("form",t.detailsForm.get("address"))("controlName","firstName")("labelText",d(11,72,"address.firstName"))("placeholder",d(12,74,"address.firstName")),a(3),r("form",t.detailsForm.get("address"))("controlName","lastName")("labelText",d(14,76,"address.lastName"))("placeholder",d(15,78,"address.lastName")),a(3),r("form",t.detailsForm.get("address"))("controlName","email")("labelText",d(17,80,"address.email"))("placeholder",d(18,82,"address.email"))("inputType",t.InputType.EMAIL),a(3),r("form",t.detailsForm.get("address"))("controlName","phone")("labelText",d(20,84,"address.phone"))("placeholder",d(21,86,"address.phone"))("maxLength",25),a(5),r("form",t.detailsForm.get("address"))("controlName","line1")("labelText",d(25,88,"address.streetWithoutNo"))("placeholder",d(26,90,"address.streetWithoutNo")),a(4),r("form",t.detailsForm.get("address"))("controlName","line2")("labelText",d(29,92,"address.streetno"))("placeholder",d(30,94,"address.streetno")),a(4),r("form",t.detailsForm.get("address"))("controlName","postalCode")("labelText",d(33,96,"address.zip"))("placeholder",d(34,98,"address.zip"))("maxLength",t.MaxInputLength.ZIP)("enableAutocomplete",!0)("nativeAutocomplete",t.NativeAutoComplete.OFF)("autoCompleteParams",We(119,Wi,pe(117,Ro,t.currentCountry),t.zipTownResultFormatter)),a(4),r("form",t.detailsForm.get("address"))("controlName","town")("labelText",d(37,100,"address.city"))("placeholder",d(38,102,"address.city"))("enableAutocomplete",!0)("autoCompleteParams",We(124,Wi,pe(122,Vo,t.currentCountry),t.zipTownResultFormatter)),a(5),r("headingType",t.HeadingType.H4)("title",d(42,104,"consultationBooking.reasonTitle")+" *"),a(2),C((e=d(44,106,t.reasonOptionsStandard$))?43:-1,e),a(3),r("headingType",t.HeadingType.H4)("title",d(47,108,"consultationBooking.fileUploadTitle")),a(3),r("text",d(50,110,"consultationBooking.fileUploadText")),a(2),r("inputType",t.InputType.FILE)("form",t.detailsForm)("controlName","file")("messageText",d(52,112,"consultationBooking.files"))("fileTypes",t.allowedTypes)("multipleFiles",!0)("selectedFiles",t.selectedFiles),a(3),r("form",t.detailsForm)("controlName","newsletter"),a(),r("loading",d(56,114,t.loading$)||!1)}}var kt=class n extends le{constructor(){super(...arguments);this.router=m(N);this.route=m(E);this.facade=m(F);this.eventService=m(R);this.fb=m(Fe);this.customFormValidators=m(Ye);this.baseSiteService=m(Wn);this.languageService=m(st);this.globalMessageService=m(rt);this.scrollHandlerService=m(_e);this.phoneNumberPipe=m(ei);this.componentClasses="c-details";this.ButtonModifier=Z;this.ButtonIconPosition=ue;this.HeadingType=X;this.RadioModifier=Ue;this.InputType=lt;this.NativeAutoComplete=Vn;this.IconKeys=ge;this.MaxInputLength=An;this.allowedTypes=[".pdf",".png",".jpg",".doc",".docx",".jpeg"];this.maxFileSize=10;this.trackingName="form_consultation";this.formFlowData$=this.facade.getFormFlowData().pipe(x(e=>this.setInitialFormValues(e)));this.reasonSpecificAppliance="specificAppliance";this.reasonOther="other";this.reasonOptionsStandard=[];this.reasonOptionsOther=[{value:this.reasonOther,labelKey:"consultationBooking.reason.other"}];this.selectedFiles=[];this.detailsForm=this.fb.group({address:this.fb.group({titleCode:["",T.required],firstName:["",T.required],lastName:["",T.required],phone:["",[T.required,e=>Ye.phoneValidator(e,this.currentCountry||"ch")]],email:["",[T.required,Ye.emailValidator]],line1:[""],line2:[""],postalCode:[""],town:[""]}),reasonStandard:["",T.required],commentStandard:[""],reasonOther:["",T.required],commentOther:[""],file:["",[this.customFormValidators.maxFileSize(()=>this.selectedFiles,this.maxFileSize),Ye.fileTypeValidator(()=>this.selectedFiles,this.allowedTypes)]],newsletter:this.fb.array(Ln.map(()=>!1))});this.formData=[];this.titleOptions=Nn;this.initialReasonQueryParamHandled=!1;this.reasonOptionsStandard$=this.facade.getConsultationReasons().pipe(b(e=>{let t=[];return e.forEach(i=>
1{t.push({value:i,labelKey:"consultationBooking.reason."+i})}),t}),x(e=>{this.reasonOptionsStandard=e}))}ngOnInit(){super.ngOnInit(),this.trackPageTypeEvent(5),this.trackStepEvent(5),this.sub.add(K([this.baseSiteService.getCurrentBaseSite(),this.languageService.getActive()]).pipe(x(([e,t])=>{this.currentLanguage=t,this.currentCountry=e?.countryIsoCode,this.shippingCountries=e?.shippingCountryIsoCodes})).subscribe())}addressResultFormatter(e){return e&&e.text?e.text.text:""}zipTownResultFormatter(e){return e?`${e.postalCode} ${e.town}`:""}handleZipTownSelection(e){e.preventDefault(),this.detailsForm.get("address.postalCode")?.setValue(e.item.postalCode),this.detailsForm.get("address.town")?.setValue(e.item.town)}handleFileSelect(e){if(!e)return;let t=Array.from(e);this.selectedFiles=t,this.formData=[],t.forEach(i=>{let u=new FormData;u.append("file",i),this.formData.push(u)}),this.detailsForm.updateValueAndValidity()}handleReasonChange(e,t){let i=this.detailsForm.get(e)?.value;this.currentReason=t==="standard"?this.reasonOptionsStandard.find(u=>u.value===i):this.reasonOptionsOther[0],t==="standard"?(this.resetControl("reasonOther"),this.resetControl("commentOther")):(this.resetControl("reasonStandard"),this.resetControl("commentStandard")),i===this.reasonSpecificAppliance?(this.detailsForm.get("commentStandard")?.setValidators([T.required]),this.detailsForm.get("commentStandard")?.updateValueAndValidity()):i===this.reasonOther?(this.detailsForm.get("commentOther")?.setValidators([T.required]),this.detailsForm.get("commentOther")?.updateValueAndValidity()):(this.resetControl("commentStandard"),this.resetControl("commentOther"))}handleCommentChange(e){let t=e==="commentStandard"?this.reasonSpecificAppliance:this.reasonOther;this.currentReason=e==="commentStandard"?this.reasonOptionsStandard.find(i=>i.value===t):this.reasonOptionsOther[0],this.currentComment=this.detailsForm.get(e)?.value,e==="commentStandard"?(this.detailsForm.get("reasonStandard")?.setValue(this.reasonSpecificAppliance),this.detailsForm.get("reasonStandard")?.setValidators([T.required]),this.resetControl("reasonOther"),this.resetControl("commentOther")):e==="commentOther"&&(this.detailsForm.get("reasonOther")?.setValue(this.reasonOther),this.detailsForm.get("reasonOther")?.setValidators([T.required]),this.resetControl("reasonStandard"),this.resetControl("commentStandard"))}handleTitleChange(){let e=this.detailsForm.get("address.titleCode")?.value;this.currentTitle=this.titleOptions?.find(t=>t.value===e)}handleNextButtonClick(){this.detailsForm.valid?(this.navigationButtonClicked=!0,this.facade.setDetails({titleCode:this.currentTitle?.value||"",title:this.currentTitle?.labelKey||"",firstName:this.detailsForm.get("address.firstName")?.value||"",lastName:this.detailsForm.get("address.lastName")?.value||"",email:this.detailsForm.get("address.email")?.value||"",phone:this.phoneNumberPipe?.transform(this.detailsForm.get("address.phone")?.value||""),line1:this.detailsForm.get("address.line1")?.value||"",line2:this.detailsForm.get("address.line2")?.value||"",postalCode:this.detailsForm.get("address.postalCode")?.value||"",town:this.detailsForm.get("address.town")?.value||""},this.currentReason,this.currentComment,this.detailsForm.get("newsletter")?.value[0],this.formData)):(this.detailsForm.markAllAsTouched(),this.scrollHandlerService.scrollToFormError(this.formElement?.nativeElement))}handleBackButtonClick(){this.navigationButtonClicked=!0,this.facade.setPreviousStep()}setInitialFormValues(e){let t=e.details?.address;t&&(this.detailsForm.get("address.titleCode")?.setValue(t?.titleCode),this.detailsForm.get("address.firstName")?.setValue(t?.firstName),this.detailsForm.get("address.lastName")?.setValue(t?.lastName),this.detailsForm.get("address.email")?.setValue(t?.email),this.detailsForm.get("address.phone")?.setValue(this.phoneNumberPipe?.transform(t?.phone||"")),this.detailsForm.get("address.line1")?.setValue(t?.line1),this.detailsForm.get("address.line2")?.setValue(t?.line2),this.detailsForm.get("address.postalCode")?.setValue(t?.postalCode),this.detailsForm.get("address.town")?.setValue(t?.town)),this.currentTitle=this.titleOptions.find(i=>i.value===t?.titleCode),this.currentReason=e.details?.reason,e.details?.reason?.value===this.reasonOther?(this.detailsForm.get("reasonOther")?.setValue(e.details?.reason?.value),this.detailsForm.get("commentOther")?.setValue(e.details?.comment),this.detailsForm.get("commentOther")?.setValidators([T.required]),this.currentComment=e.details?.comment,this.resetControl("reasonStandard"),this.resetControl("commentStandard")):e.details?.reason?.value===this.reasonSpecificAppliance?(this.detailsForm.get("reasonStandard")?.setValue(e.details?.reason?.value),this.detailsForm.get("commentStandard")?.setValue(e.details?.comment),this.detailsForm.get("commentStandard")?.setValidators([T.required]),this.currentComment=e.details?.comment,this.resetControl("reasonOther"),this.resetControl("commentOther")):e.details?.reason?.value&&(this.detailsForm.get("reasonStandard")?.setValue(e.details?.reason?.value),this.resetControl("reasonOther")),this.detailsForm.get("newsletter")?.setValue([e.details?.newsletter||!1]),e.details?.formData?.some(i=>!(i instanceof FormData))&&this.globalMessageService.add({key:"consultationBooking.fileLostMessage"},at.MSG_TYPE_ERROR),e.details?.formData&&e.details?.formData.length>0&&(e.details?.formData.filter(i=>
1i instanceof FormData).forEach(i=>{let u=i.get("file");u&&this.selectedFiles.push(u)}),this.formData=e.details?.formData),this.applyInitialReasonQueryParam(e)}applyInitialReasonQueryParam(e){if(this.initialReasonQueryParamHandled||(this.initialReasonQueryParamHandled=!0,e.details?.reason))return;let t=this.facade.initialReasonQueryParam;t&&(this.facade.initialReasonQueryParam=void 0,this.detailsForm.get("reasonOther")?.setValue(this.reasonOther),this.detailsForm.get("reasonOther")?.setValidators([T.required]),this.detailsForm.get("reasonOther")?.updateValueAndValidity(),this.detailsForm.get("commentOther")?.setValue(t),this.detailsForm.get("commentOther")?.setValidators([T.required]),this.detailsForm.get("commentOther")?.updateValueAndValidity(),this.resetControl("reasonStandard"),this.resetControl("commentStandard"),this.currentReason=this.reasonOptionsOther[0],this.currentComment=t)}resetControl(e){this.detailsForm.get(e)?.setErrors(null),this.detailsForm.get(e)?.setValidators(null),this.detailsForm.get(e)?.setValue(""),this.detailsForm.get(e)?.markAsPristine(),this.detailsForm.get(e)?.markAsUntouched(),this.detailsForm.get(e)?.updateValueAndValidity()}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=M(n)))(i||n)}})()}static{this.\u0275cmp=D({type:n,selectors:[["c-details"]],viewQuery:function(t,i){if(t&1&&ye(Eo,5),t&2){let u;ve(u=xe())&&(i.formElement=u.first)}},features:[P],decls:2,vars:3,consts:[["formElement",""],["dObserveVisibility","",3,"ngClass","threshold","margin"],["dObserveVisibility","",3,"handleIntersection","ngClass","threshold","margin"],[1,"grid","c-details__form",3,"formGroup"],[1,"g-col-12","g-col-sm-5"],[1,"c-details__title-your-details"],[3,"headingType","title"],[3,"formGroupName"],[3,"handleChange","form","controlName","radioButtons","legend","modifier"],[3,"form","controlName","labelText","placeholder"],[3,"form","controlName","labelText","placeholder","inputType"],[3,"form","controlName","labelText","placeholder","maxLength"],[1,"grid","c-details__address-fields"],[1,"g-col-8","g-col-sm-3"],[1,"g-col-4","g-col-sm-2"],[3,"handleAutoCompleteSelection","form","controlName","labelText","placeholder","maxLength","enableAutocomplete","nativeAutocomplete","autoCompleteParams"],[3,"handleAutoCompleteSelection","form","controlName","labelText","placeholder","enableAutocomplete","autoCompleteParams"],[1,"g-col-12","g-col-sm-5","g-start-sm-7"],[1,"c-details__reason-form-title"],[1,"c-details__reason-input"],[1,"c-details__file-upload-title"],[1,"c-details__file-upload-text"],[3,"text"],[3,"handleChange","inputType","form","controlName","messageText","fileTypes","multipleFiles","selectedFiles"],[1,"g-col-12","c-details__newsletter"],[3,"form","controlName"],[3,"prevButtonClick","nextButtonClick","loading"],[3,"handleChange","form","controlName","radioButtons","hideLegend","noSpacing"],[1,"c-details__reason-serial-number"],[3,"handleChange","form","controlName","placeholder","labelText","hideLabel","noSpacing"],[1,"c-details__reason-comment"]],template:function(t,i){t&1&&(_(0,Lo,57,127,"div",1),l(1,"async")),t&2&&C(d(1,1,i.formFlowData$)?0:-1)},dependencies:[w,k,A,Y,W,q,Te,Se,Oe,Pn,Q,$,H,Be,L,ie,Me,Ke,ht,ft,Di,Mi,se,re,oe,ae,I,V],styles:["[dir=ltr][_ngcontent-%COMP%]{--x-direction: 1}[dir=rtl][_ngcontent-%COMP%]{--x-direction: -1}.c-details__title-your-details[_ngcontent-%COMP%]{margin-bottom:2.4rem}@media all and (min-width:1025px){.c-details__title-your-details[_ngcontent-%COMP%]{margin-bottom:3.6rem}}.c-details__form[_ngcontent-%COMP%]{margin-bottom:3.6rem}@media all and (min-width:1025px){.c-details__form[_ngcontent-%COMP%]{margin-bottom:4.8rem}}@media all and (min-width:720px){.c-details__address-fields[_ngcontent-%COMP%]{--bs-columns: 5}}.c-details__reason-form-title[_ngcontent-%COMP%]{margin-bottom:1.6rem}@media all and (min-width:1025px){.c-details__reason-form-title[_ngcontent-%COMP%]{margin-bottom:1.6rem}}.c-details__reason-input[_ngcontent-%COMP%]{margin-bottom:3.6rem}@media all and (min-width:1025px){.c-details__reason-input[_ngcontent-%COMP%]{margin-bottom:4.8rem}}.c-details__reason-serial-number[_ngcontent-%COMP%]{margin-top:.4rem}@media all and (min-width:1025px){.c-details__reason-serial-number[_ngcontent-%COMP%]{margin-top:.4rem}}.c-details__reason-serial-number[_ngcontent-%COMP%]{margin-bottom:1.2rem}@media all and (min-width:1025px){.c-details__reason-serial-number[_ngcontent-%COMP%]{margin-bottom:1.2rem}}.c-details__reason-comment[_ngcontent-%COMP%]{margin-top:.4rem}@media all and (min-width:1025px){.c-details__reason-comment[_ngcontent-%COMP%]{margin-top:.4rem}}.c-details__file-upload-title[_ngcontent-%COMP%]{margin-bottom:.8rem}@media all and (min-width:1025px){.c-details__file-upload-title[_ngcontent-%COMP%]{margin-bottom:.8rem}}.c-details__file-upload-text[_ngcontent-%COMP%]{margin-bottom:1.6rem}@media all and (min-width:1025px){.c-details__file-upload-text[_ngcontent-%COMP%]{margin-bottom:1.6rem}}.c-details__newsletter[_ngcontent-%COMP%]{margin-top:1.2rem}@media all and (min-width:1025px){.c-details__newsletter[_ngcontent-%COMP%]{margin-top:1.2rem}}"]})}};var $o=()=>[0];function Go(n,o){if(n&1){let e=z();s(0,"div",1)(1,"div",4)(2,"div",5),g(3,"c-gigya-raas",6),c()(),s(4,"div",7)(5,"div",8)(6,"div",9),g(7,"e-heading",10),l(8,"cxTranslate"),c(),s(9,"div",11),g(10,"e-text",12),l(11,"cxTranslate"),c(),s(12,"div",13)(13,"e-button",14),l(14,"cxTranslate"),v("handleButtonClick",function(){h(e);let i=p();return y(i.handleNextButtonClick())}),c()()(),s(15,"div",15)(16,"c-registration-link",16),v("handleRegistrationClick",function(){h(e);let i=p();return y(i.handleRegistrationLinkClick())}),c()()()()}if(n&2){let e=p();a(3),r("manualConfig",e.loginScreenCdcConfig),a(4),r("headingType",e.HeadingType.H4)("headingTag",e.HeadingType.H3)("title",d(8,8,"login.guest.title")),a(3),r("text",d(11,10,"login.guest.intro")),a(3),r("text",d(14,12,"login.guest.login"))("modifier",e.ButtonModifier.PRIMARY),a(3),r("shouldEmitRegistrationClick",!0)}}function Uo(n,o){if(n&1){let e=z();s(0,"div",2)(1,"div",17)(2,"c-gigya-raas",18),v("handleGigyaOnHide",function(){h(e);let i=p();return y(i.handleBackToLoginButtonClick())})("handleGigyaOnAfterSubmit",function(i){h(e);let u=p();return y(u.handleRegistrationOnAfterSubmit(i))}),c()()()}if(n&2){let e=p();a(2),r("manualConfig",e.registerScreenCdcConfig)}}var It=class n extends bi{constructor(){super(...arguments);this.router=m(N);this.route=m(E);this.facade=m(F);this.eventService=m(R);this.winRef=m(it);
1this.vzugBreakpointService=m(_t);this.componentClasses="c-login";this.ButtonModifier=Z;this.ButtonIconPosition=ue;this.HeadingType=X;this.IconKeys=ge;this.trackingName="form_consultation";this.startScreenLogin="vzug-login-screen";this.startScreenRegister="vzug-register-zugorama-screen"}ngOnInit(){super.ngOnInit(),this.trackPageTypeEvent(4),this.trackStepEvent(4)}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=M(n)))(i||n)}})()}static{this.\u0275cmp=D({type:n,selectors:[["c-login"]],features:[P],decls:7,vars:14,consts:[["dObserveVisibility","",3,"handleIntersection","ngClass","threshold","margin"],[1,"c-login__login-container","grid"],[1,"c-login__register-container","grid"],[3,"prevButtonClick","loading","showNextButton"],[1,"g-col-12","g-col-sm-5"],[1,"c-login__gigya-login"],[3,"manualConfig"],[1,"g-col-12","g-col-sm-5","g-start-sm-7"],[1,"c-login__guest"],[1,"c-login__title-guest"],[3,"headingType","headingTag","title"],[1,"c-login__text-guest"],[3,"text"],[1,"c-login__button-guest"],[3,"handleButtonClick","text","modifier"],[1,"c-login__login"],[3,"handleRegistrationClick","shouldEmitRegistrationClick"],[1,"g-col-12","g-col-sm-7"],[3,"handleGigyaOnHide","handleGigyaOnAfterSubmit","manualConfig"]],template:function(t,i){t&1&&(s(0,"div",0),v("handleIntersection",function(f){return i.handleIntersection(f)}),_(1,Go,17,14,"div",1),l(2,"async"),_(3,Uo,3,1,"div",2),l(4,"async"),s(5,"c-action-buttons",3),l(6,"async"),v("prevButtonClick",function(){return i.handleBackButtonClick()}),c()()),t&2&&(r("ngClass",i.componentClasses)("threshold",j(13,$o))("margin","-100% 0px 0px 0px"),a(),C(d(2,7,i.viewType$)==="login"?1:-1),a(2),C(d(4,9,i.viewType$)==="register"?3:-1),a(2),r("loading",d(6,11,i.loading$)||!1)("showNextButton",!1))},dependencies:[w,k,A,Y,W,q,Q,vi,yi,Ti,Si,$,H,L,ie,se,re,Be,mt,oe,ae,I,V],styles:["[dir=ltr][_ngcontent-%COMP%]{--x-direction: 1}[dir=rtl][_ngcontent-%COMP%]{--x-direction: -1}.c-login__guest[_ngcontent-%COMP%]{margin-bottom:7.2rem}@media all and (min-width:1025px){.c-login__guest[_ngcontent-%COMP%]{margin-bottom:9.6rem}}.c-login__guest[_ngcontent-%COMP%]{margin-top:7.2rem}@media all and (min-width:1025px){.c-login__guest[_ngcontent-%COMP%]{margin-top:9.6rem}}.c-login__guest[_ngcontent-%COMP%]{padding-top:2.4rem}@media all and (min-width:1025px){.c-login__guest[_ngcontent-%COMP%]{padding-top:3.6rem}}@media all and (max-width:719px){.c-login__guest[_ngcontent-%COMP%]{border-top:1px solid #c7c8ca}}@media all and (min-width:720px){.c-login__guest[_ngcontent-%COMP%]{padding-top:0;margin-top:0}}.c-login__title-guest[_ngcontent-%COMP%]{margin-bottom:.8rem}@media all and (min-width:1025px){.c-login__title-guest[_ngcontent-%COMP%]{margin-bottom:.8rem}}.c-login__text-guest[_ngcontent-%COMP%]{margin-bottom:2rem}@media all and (min-width:1025px){.c-login__text-guest[_ngcontent-%COMP%]{margin-bottom:2.4rem}}.c-login__login[_ngcontent-%COMP%]{margin-bottom:.8rem}@media all and (min-width:1025px){.c-login__login[_ngcontent-%COMP%]{margin-bottom:.8rem}}.c-login__gigya-login[_ngcontent-%COMP%]{padding-top:3.6rem}@media all and (min-width:1025px){.c-login__gigya-login[_ngcontent-%COMP%]{padding-top:4.8rem}}@media all and (max-width:719px){.c-login__gigya-login[_ngcontent-%COMP%]{border-top:1px solid #c7c8ca}}@media all and (min-width:720px){.c-login__gigya-login[_ngcontent-%COMP%]{padding-top:0}}.c-login__content[_ngcontent-%COMP%]{margin-bottom:7.2rem}@media all and (min-width:1025px){.c-login__content[_ngcontent-%COMP%]{margin-bottom:9.6rem}}.c-login__content[_ngcontent-%COMP%]{padding-top:3.6rem}@media all and (min-width:1025px){.c-login__content[_ngcontent-%COMP%]{padding-top:4.8rem}}.c-login__content[_ngcontent-%COMP%]{border-top:1px solid #e5e0da}"]})}};var Ko=()=>({cxRoute:"home"});function zo(n,o){if(n&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),g(4,"e-heading",4),l(5,"cxTranslate"),c(),s(6,"div",5),g(7,"e-text",6),l(8,"cxTranslate"),c(),s(9,"div",7),g(10,"e-button",8),l(11,"cxUrl"),l(12,"cxTranslate"),c()()()()),n&2){let e=p();r("ngClass",e.componentClasses),a(4),r("title",d(5,7,"generic.booking.success.title"))("headingType",e.HeadingType.H3),a(3),r("text",d(8,9,"generic.booking.success.text")),a(3),r("modifier",e.ButtonModifier.PRIMARY)("url",d(11,11,j(15,Ko)).join("/"))("text",d(12,13,"generic.goto.home"))}}var wt=class n extends le{constructor(){super(...arguments);this.router=m(N);this.route=m(E);this.facade=m(F);this.eventService=m(R);this.componentClasses="c-success";this.ButtonModifier=Z;this.HeadingType=X;this.trackingName="form_consultation";this.confirmation$=this.facade.getConfirmation().pipe(B(e=>!!e),x(e=>this.handleGetConfirmation(e)))}ngOnInit(){this.facade.setCurrentStep(0),this.trackPageTypeEvent(7)}ngAfterViewInit(){this.facade.resetData()}handleGetConfirmation({consultation_type:e,consultation_location:t,consultation_language:i,consultation_reason:u}){this.eventService.dispatch(xn(Gn,{event:`${this.trackingName}_confirmation`,consultation_type:e,consultation_location:t,consultation_language:i,consultation_reason:u}))}isLastStep(){return!0}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=M(n)))(i||n)}})()}static{this.\u0275cmp=D({type:n,selectors:[["c-success"]],features:[P],decls:2,vars:3,consts:[[3,"ngClass"],[1,"grid"],[1,"g-col-12","g-col-sm-8","g-col-md-5"],[1,"c-success__title"],[3,"title","headingType"],[1,"c-success__text"],[3,"text"],[1,"c-success__button"],[3,"modifier","url","text"]],template:function(t,i){t&1&&(_(0,zo,13,16,"div",0),l(1,"async")),t&2&&C(d(1,1,i.confirmation$)?0:-1)},dependencies:[w,k,A,Y,W,q,Q,nt,Fn,L,ie,Be,mt,$,H,I,V,On],styles:["[dir=ltr][_ngcontent-%COMP%]{--x-direction: 1}[dir=rtl][_ngcontent-%COMP%]{--x-direction: -1}[_nghost-%COMP%]{display:block}.c-success__title[_ngcontent-%COMP%]{margin-bottom:1.2rem}@media all and (min-width:1025px){.c-success__title[_ngcontent-%COMP%]{margin-bottom:1.2rem}}.c-success__text[_ngcontent-%COMP%]{margin-bottom:2rem}@media all and (min-width:1025px){.c-success__text[_ngcontent-%COMP%]{margin-bottom:2.4rem}}"]})}};var jo=()=>[0],Qo=n=>({buttonName:n});function qo(n,o){if(n&1&&(s(0,"div",10),g(1,"e-text",11),l(2,"cxTranslate"),c()),n&2){let e=p(2);a(),r("text",d(2,2,"consultationBooking.location"))("fontColor",e.FontColor.INHERIT)}}function Wo(n,o){if(n&1&&(s(0,"div",12),g(1,"e-text",13),c()),n&2){let e=p();a(),r("text",e.center.name)}}function Yo(n,o){if(n&1&&(s(0,"div",10),g(1,"e-text",11),l(2,"cxTranslate"),c(),s(3,"div",12),g(4,"e-text",13),c(),s(5,"div",10),g(6,"e-text",11),l(7,"cxTranslate"),c(),s(8,"div",12),g(9,"e-text",13),c()),n&2){let e=p(),t=p();a(),r("text",d(2,6,"generic.date"))("fontColor",t.FontColor.INHERIT),a(3),r("text",t.getDate(e.date.dateSlot)),a(2),r("text",d(7,8,"generic.time"))("fontColor",t.FontColor.INHERIT),a(3),r("text",t.getSlotTime(e.date.timeSlot))}}function Zo(n,o){if(n&1&&(s(0,"div",10),g(1,"e-text",11),l(2,"cxTranslate"),c(),s(3,"div",12),g(4,"e-text",13),l(5,"cxTranslate"),c()),n&2){let e=p(),t=p();a(),r("text",d(2,3,"consultationBooking.consultationReason"))("fontColor",t.FontColor.INHERIT),a(3),r("text",t.getReasonText(d(5,5,e.details.reason.labelKey),e.details.reason.labelKey,e.details.comment))}}function Xo(n,o){if(n&1&&(s(0,"div",10),g(1,"e-text",11),l(2,"cxTranslate"),c(),s(3,"div",12),g(4,"e-text",13),c()),n&2){let e=p(),t=p();a(),r("text",d(2,3,"address.street"))("fontColor",t.FontColor.INHERIT),a(3),r("text",e.details.address.line1+" "+e.details.address.line2)}}function Jo(n,o){if(n&1&&(s(0,"div",10),g(1,"e-text",11),l(2,"cxTranslate"),l(3,"cxTranslate"),c(),s(4,"div",12),g(5,"e-text",13),c()),n&2){let e=p(),t=p();a(),r("text",d(2,3,"address.zip")+" / "+d(3,5,"address.city"))("fontColor",t.FontColor.INHERIT),a(4),r("text",e.details.address.postalCode+" "+e.details.address.town)}}function ea(n,o){if(n&1&&(s(0,"li",16),he(1),c()),n&2){let e=o.$implicit;a(),qe(e.name)}
1}function ta(n,o){if(n&1&&(s(0,"div",10),g(1,"e-text",11),l(2,"cxTranslate"),c(),s(3,"div",12)(4,"ul"),He(5,ea,2,1,"li",16,an),c()()),n&2){let e=p(),t=p(2);a(),r("text",d(2,2,"consultationBooking.attachments"))("fontColor",t.FontColor.INHERIT),a(4),$e(e)}}function na(n,o){n&1&&_(0,ta,7,4),n&2&&C(o.length?0:-1)}function ia(n,o){if(n&1&&(s(0,"div",15),g(1,"e-text",17),c()),n&2){let e=p(),t=p();a(),r("text",e.center.moreInformation)("tag",t.TextTag.DIV)("renderHtml",!0)}}function oa(n,o){if(n&1&&(s(0,"div")(1,"div",2)(2,"div",3)(3,"div",4),g(4,"e-message",5),l(5,"cxTranslate"),l(6,"cxTranslate"),c()()(),s(7,"div",6)(8,"div",4)(9,"div",7),g(10,"e-heading",8),l(11,"cxTranslate"),c(),s(12,"div",9)(13,"div",10),g(14,"e-text",11),l(15,"cxTranslate"),c(),s(16,"div",12),g(17,"e-text",13),c(),s(18,"div",10),g(19,"e-text",11),l(20,"cxTranslate"),c(),s(21,"div",12),g(22,"e-text",13),c(),_(23,qo,3,4,"div",10),_(24,Wo,2,1,"div",12),_(25,Yo,10,10),l(26,"async"),_(27,Zo,6,7),c()(),s(28,"div",14)(29,"div",7),g(30,"e-heading",8),l(31,"cxTranslate"),c(),s(32,"div",9)(33,"div",10),g(34,"e-text",11),l(35,"cxTranslate"),c(),s(36,"div",12),g(37,"e-text",13),l(38,"cxTranslate"),c(),s(39,"div",10),g(40,"e-text",11),l(41,"cxTranslate"),c(),s(42,"div",12),g(43,"e-text",13),c(),s(44,"div",10),g(45,"e-text",11),l(46,"cxTranslate"),c(),s(47,"div",12),g(48,"e-text",13),c(),_(49,Xo,5,5),_(50,Jo,6,7),s(51,"div",10),g(52,"e-text",11),l(53,"cxTranslate"),c(),s(54,"div",12),g(55,"e-text",13),c(),s(56,"div",10),g(57,"e-text",11),l(58,"cxTranslate"),c(),s(59,"div",12),g(60,"e-text",13),c(),_(61,na,1,1),l(62,"async"),c()(),_(63,ia,2,3,"div",15),c()()),n&2){let e,t=o,i=p();a(4),r("messageType",i.MessageType.WARNING)("message",Ge(6,37,"general.precommitWarning",pe(64,Qo,d(5,35,"consultationBooking.confirm")))),a(6),r("headingType",i.HeadingType.H4)("title",d(11,40,"consultationBooking.summary.appointment.title")),a(4),r("text",d(15,42,"consultationBooking.consultationType"))("fontColor",i.FontColor.INHERIT),a(3),r("text",t.consultation.type.name),a(2),r("text",d(20,44,"consultationBooking.consultationLanguage"))("fontColor",i.FontColor.INHERIT),a(3),r("text",t.consultation.language.name),a(),C(t.center?23:-1),a(),C(t.center?24:-1),a(),C(d(26,46,i.locale$)?25:-1),a(2),C(t.details.reason?27:-1),a(3),r("headingType",i.HeadingType.H4)("title",d(31,48,"consultationBooking.summary.details.title")),a(4),r("text",d(35,50,"address.title"))("fontColor",i.FontColor.INHERIT),a(3),r("text",d(38,52,t.details.address.title)),a(3),r("text",d(41,54,"address.firstName"))("fontColor",i.FontColor.INHERIT),a(3),r("text",t.details.address.firstName),a(2),r("text",d(46,56,"address.lastName"))("fontColor",i.FontColor.INHERIT),a(3),r("text",t.details.address.lastName),a(),C(t.details.address.line1?49:-1),a(),C(t.details.address.town?50:-1),a(2),r("text",d(53,58,"address.email"))("fontColor",i.FontColor.INHERIT),a(3),r("text",t.details.address.email),a(2),r("text",d(58,60,"address.phone"))("fontColor",i.FontColor.INHERIT),a(3),r("text",t.details.address.phone),a(),C((e=d(62,62,i.fileList$))?61:-1,e),a(2),C(t.center!=null&&t.center.moreInformation?63:-1)}}var Et=class n extends le{constructor(){super(...arguments);this.router=m(N);this.route=m(E);this.facade=m(F);this.eventService=m(R);this.localeService=m(Ct);this.globalMessageService=m(rt);this.componentClasses="c-summary";this.ButtonModifier=Z;this.ButtonIconPosition=ue;this.HeadingType=X;this.FontColor=Qn;this.MessageType=dt;this.IconKeys=ge;this.TextTag=Hn;this.trackingName="form_consultation";this.submitButtonDisabledState=Xt(!1);this.sub=new jt;this.formFlowData$=this.facade.getFormFlowData();this.locale$=this.localeService.locale$.pipe(x(e=>{e!==""&&(this.datePipe=new tt(e))}));this.fileList$=this.formFlowData$.pipe(b(e=>{let{formData:t}=e?.details||{};return t?.length?(t?.some(i=>!(i instanceof FormData))&&this.globalMessageService.add({key:"consultationBooking.fileLostMessage"},at.MSG_TYPE_ERROR),t.filter(i=>i instanceof FormData).map(i=>i.get("file"))):[]}));this.reasonStandard="specificAppliance";this.reasonOther="other"}ngOnInit(){super.ngOnInit(),this.trackPageTypeEvent(6),this.trackStepEvent(6),this.sub.add(this.facade.getError().pipe(B(e=>e),x(()=>this.submitButtonDisabledState.set(!1))).subscribe())}ngOnDestroy(){this.sub.unsubscribe()}getDate(e){if(!e)return"";let t=new Date(e.date);return`${this.datePipe?.transform(t,"fullDate")}`}getSlotTime(e){if(!e)return"";let t=new Date(e.startTime),i=new Date(e.endTime);return`${this.datePipe?.transform(t,"HH:mm")} - ${this.datePipe?.transform(i,"HH:mm")}`}getReasonText(e,t,i){return t.endsWith(this.reasonStandard)||t.endsWith(this.reasonOther)?`${e}: ${i}`:e}handleSubmit(){this.submitButtonDisabledState.set(!0),this.navigationButtonClicked=!0,this.facade.submitConsultation()}handleBackButtonClick(){this.navigationButtonClicked=!0,this.facade.setPreviousStep()}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=M(n)))(i||n)}})()}static{this.\u0275cmp=D({type:n,selectors:[["c-summary"]],features:[P],decls:5,vars:12,consts:[["dObserveVisibility","",3,"handleIntersection","ngClass","threshold","margin"],[3,"prevButtonClick","nextButtonClick","loading","nextButtonKey","nextButtonDisabled"],[1,"c-summary__confirmation"],[1,"grid"],[1,"g-col-12","g-col-sm-8","g-col-md-5"],[3,"messageType","message"],[1,"c-summary__info-block","grid"],[1,"c-summary-details__title"],[3,"headingType","title"],[1,"c-summary-detail__grid","grid"],[1,"g-col-6","g-col-sm-4","g-col-md-2","c-summary-detail__texts"],[3,"text","fontColor"],[1,"g-col-6","g-col-sm-4","g-col-md-3"],[3,"text"],[1,"g-col-12","g-col-sm-8","g-col-md-5","g-start-md-7","c-summary-details__personal-infos"],[1,"g-col-12","g-col-sm-11","c-summary-detail__more-information"],[1,"c-summary-detail__file-entry"],[3,"text","tag","renderHtml"]],template:function(t,i){if(t&1&&(s(0,"div",0),v("handleIntersection",function(f){return i.handleIntersection(f)}),_(1,oa,64,66,"div"),l(2,"async"),s(3,"c-action-buttons",1),l(4,"async"),v("prevButtonClick",function(){return i.handleBackButtonClick()})("nextButtonClick",function(){return i.handleSubmit()}),c()()),t&2){let u;r("ngClass",i.componentClasses)("threshold",j(11,jo))("margin","-100% 0px 0px 0px"),a(),C((u=d(2,7,i.formFlowData$))?1:-1,u),a(2),r("loading",d(4,9,i.loading$)||!1)("nextButtonKey","consultationBooking.confirm")("nextButtonDisabled",i.submitButtonDisabledState())}},dependencies:[w,k,A,Y,W,q,Q,$,H,L,ie,Be,gt,ut,se,re,oe,ae,I,V],styles:["[dir=ltr][_ngcontent-%COMP%]{--x-direction: 1}[dir=rtl][_ngcontent-%COMP%]{--x-direction: -1}.c-summary__confirmation[_ngcontent-%COMP%]{margin-bottom:3.6rem}@media all and (min-width:1025px){.c-summary__confirmation[_ngcontent-%COMP%]{margin-bottom:4.8rem}}.c-summary__info-block[_ngcontent-%COMP%]{margin-bottom:3.6rem}@media all and (min-width:1025px){.c-summary__info-block[_ngcontent-%COMP%]{margin-bottom:4.8rem}}.c-summary-details__title[_ngcontent-%COMP%]{margin-bottom:1.6rem}@media all and (min-width:1025px){.c-summary-details__title[_ngcontent-%COMP%]{margin-bottom:2rem}}.c-summary-detail__file-entry[_ngcontent-%COMP%] + .c-summary-detail__file-entry[_ngcontent-%COMP%]{margin-top:.8rem}@media all and (min-width:1025px){.c-summary-detail__file-entry[_ngcontent-%COMP%] + .c-summary-detail__file-entry[_ngcontent-%COMP%]{margin-top:.8rem}}.c-summary-detail__grid[_ngcontent-%COMP%]{row-gap:.8rem}@media all and (min-width:1025px){.c-summary-detail__grid[_ngcontent-%COMP%]{row-gap:.8rem}}.c-summary-detail__grid[_ngcontent-%COMP%]{margin-bottom:3.6rem}@media all and (min-width:1025px){.c-summary-detail__grid[_ngcontent-%COMP%]{margin-bottom:4.8rem}}@media all and (min-width:720px){.c-summary-detail__grid[_ngcontent-%COMP%]{--bs-columns: 8}}@media all and (min-width:1025px){.c-summary-detail__grid[_ngcontent-%COMP%]{--bs-columns: 5}}.c-summary-detail__texts[_ngcontent-%COMP%]{color:#585a5f}.c-summary-detail__more-information[_ngcontent-%COMP%]{margin-top:.8rem}@media all and (min-width:1025px){.c-summary-detail__more-information[_ngcontent-%COMP%]{margin-top:.8rem}}"]})}};var aa=["formElement"],ra=()=>[0];function sa(n,o){if(n&1&&(g(0,"e-radio-group",6),l(1,"cxTranslate")),n&2){let e=p(2);r("form",e.typeForm)("controlName","consultationType")("radioButtons",o)("legend",d(1,8,"events.availableLocations"))("modifier",e.RadioModifier.CARD)("columnWidth",e.RadioCardColumns.COLUMNS_6)("hideLegend",!0)("hideDescription",e.isMobile())}}function la(n,o){if(n&1){let e=z();s(0,"div",2),v("handleIntersection",function(i){h(e);let u=p();return y(u.handleIntersection(i))}),s(1,"div",3),g(2,"e-heading",4),l(3,"cxTranslate"),c(),s(4,"form",5,0),v("ngSubmit",function(){h(e);let i=p();return y(i.handleNextButtonClick())}),_(6,sa,2,10,"e-radio-group",6),l(7,"async"),s(8,"div",7),g(9,"e-heading",4),l(10,"cxTranslate"),c(),s(11,"div",8)(12,"div",9)(13,"e-select",10),l(14,"cxTranslate"),l(15,"cxTranslate"),v("handleChange",function(){h(e);let i=p();return y(i.handleConsultationLanguageChange())}),c()()(),s(16,"c-action-buttons",11),l(17,"async"),v("nextButtonClick",function(){h(e);let i=p();return y(i.handleNextButtonClick())}),c()()()}if(n&2){let e,t=p();r("ngClass",t.componentClasses)("threshold",j(30,ra))("margin","-100% 0px 0px 0px"),a(2),r("headingType",t.HeadingType.H4)("title",d(3,18,"consultationBooking.chooseConsultationType")),a(2),r("formGroup",t.typeForm),a(2),C((e=d(7,20,t.options$))?6:-1,e),a(3),r("headingType",t.HeadingType.H4)("title",d(10,22,"consultationBooking.consultationLanguage")),a(4),r("form",t.typeForm)("items",t.languages)("controlName","consultationLanguage")("placeholder",d(14,24,t.placeholderText))("labelText",d(15,26,"consultationBooking.select.consultationLanguage"))("bindValue","isoCode")("bindName","name"),a(3),r("loading",d(17,28,t.loading$)||!1)("showPrevButton",!1)}}var Nt=class n extends le{constructor(){super(...arguments);this.router=m(N);this.route=m(E);this.facade=m(F);this.eventService=m(R);this.scrollHandlerService=m(_e);this.fb=m(Fe);
1this.vzugBreakpointService=m(_t);this.componentClasses="c-type";this.Theme=ct;this.ButtonModifier=Z;this.HeadingType=X;this.RadioModifier=Ue;this.RadioCardColumns=Rn;this.trackingName="form_consultation";this.formFlowData$=this.facade.getFormFlowData().pipe(x(e=>{this.typeForm.get("consultationType")?.setValue(e.consultation?.type.type||"",{emitEvent:!1}),this.typeForm.get("consultationLanguage")?.setValue(e.consultation?.language.isoCode||null,{emitEvent:!1}),this.currentType=e.consultation?.type,this.currentLanguage=e.consultation?.language,this.languages=this.currentType?.languages}));this.options$=this.facade.getConsultationTypes().pipe(x(e=>{if(e.length===1)this.typeForm.get("consultationType")?.setValue(e[0].type);else if(this.currentType){let t=e.find(i=>i.type===this.currentType?.type);t&&this.handleConsultationTypeChange(t)}}),b(e=>e.map(t=>({value:t.type,labelText:t.name,description:t.description}))));this.typeForm=this.fb.group({consultationType:["",T.required],consultationLanguage:[null,T.required]});this.languages=[];this.isMobile=this.vzugBreakpointService.isMobile()}get placeholderText(){return this.typeForm?.get("consultationType")?.value?"consultationBooking.language.placeholder":"consultationBooking.language.chooseTypeFirst"}ngOnInit(){super.ngOnInit(),this.sub.add(this.typeForm.valueChanges.subscribe(()=>{this.clearNextSteps=!0})),this.sub.add(this.typeForm.get("consultationType")?.valueChanges.pipe(ne(this.facade.getConsultationTypes()),x(([e,t])=>{this.handleConsultationTypeChange(t.find(i=>i.type===e))})).subscribe()),this.facade.loadConsultationTypes(),this.trackPageTypeEvent(1),this.trackStepEvent(1)}handleConsultationTypeChange(e){this.currentType=e,this.languages=e?.languages,this.languages&&this.languages.length===1?(this.typeForm.get("consultationLanguage")?.setValue(this.languages[0].isoCode),this.currentLanguage=this.languages[0]):this.typeForm.get("consultationLanguage")?.setValue(null)}handleConsultationLanguageChange(){let e=this.typeForm.get("consultationLanguage")?.value;this.currentLanguage=this.currentType?.languages.find(t=>t.isoCode===e)}handleNextButtonClick(){this.typeForm.valid&&this.currentType&&this.currentLanguage?(this.navigationButtonClicked=!0,this.facade.setConsultationType(this.currentType,this.currentLanguage,this.clearNextSteps)):(this.typeForm.markAllAsTouched(),this.scrollHandlerService.scrollToFormError(this.formElement?.nativeElement))}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=M(n)))(i||n)}})()}static{this.\u0275cmp=D({type:n,selectors:[["c-type"]],viewQuery:function(t,i){if(t&1&&ye(aa,5),t&2){let u;ve(u=xe())&&(i.formElement=u.first)}},features:[P],decls:2,vars:3,consts:[["formElement",""],["dObserveVisibility","",3,"ngClass","threshold","margin"],["dObserveVisibility","",3,"handleIntersection","ngClass","threshold","margin"],[1,"c-type__title-consultation"],[3,"headingType","title"],[3,"ngSubmit","formGroup"],[3,"form","controlName","radioButtons","legend","modifier","columnWidth","hideLegend","hideDescription"],[1,"c-type__title-language"],[1,"grid"],[1,"g-col-12","g-col-sm-6","g-col-md-5"],[3,"handleChange","form","items","controlName","placeholder","labelText","bindValue","bindName"],[3,"nextButtonClick","loading","showPrevButton"]],template:function(t,i){t&1&&(_(0,la,18,31,"div",1),l(1,"async")),t&2&&C(d(1,1,i.formFlowData$)?0:-1)},dependencies:[w,k,A,Y,W,q,Te,Se,Oe,Q,$,H,Me,Ke,Jn,Xn,L,oe,ae,se,re,I,V],styles:["[dir=ltr][_ngcontent-%COMP%]{--x-direction: 1}[dir=rtl][_ngcontent-%COMP%]{--x-direction: -1}.c-type__title-consultation[_ngcontent-%COMP%]{margin-bottom:2rem}@media all and (min-width:1025px){.c-type__title-consultation[_ngcontent-%COMP%]{margin-bottom:2.4rem}}.c-type__title-language[_ngcontent-%COMP%]{margin-bottom:2rem}@media all and (min-width:1025px){.c-type__title-language[_ngcontent-%COMP%]{margin-bottom:2.4rem}}"],changeDetection:0})}};var Rt=class n{constructor(){this.statePersistenceService=m(ot);this.store=m(be)}sync(){this.statePersistenceService.syncWithStorage({key:J,state$:this.getConsultationBookingState(),onRead:o=>this.store.dispatch(xt({user:void 0,formFlowData:o}))})}getConsultationBookingState(){return this.store.pipe(B(o=>!!o[J]),Wt(J),S(de))}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=me({token:n,factory:n.\u0275fac,providedIn:"root"})}};function da(n,o){return()=>qt(o.getStable("context").pipe(x(()=>n.sync())))}var Vt=class n{static forRoot(){return{ngModule:n,providers:[{provide:bn,useFactory:da,deps:[Rt,Sn],multi:!0}]}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275mod=Le({type:n})}static{this.\u0275inj=Ae({})}};var At=class n{constructor(){this.http=m(mn);this.occEndpoints=m(vn)}loadConsultationData(){let o=this.occEndpoints.buildUrl("consultationTypes");return this.http.get(o).pipe(b(e=>e??{}))}loadConsultationCenters(o){let e=this.occEndpoints.buildUrl("consultationCenters",{urlParam
1s:{language:o.consultation?.language.isoCode||""}});return this.http.get(e).pipe(b(t=>t.centers??[]))}loadConsultationDates(o,e,t,i){let u=e.getTime(),f=this.occEndpoints.buildUrl("consultationDates",{urlParams:{center:o.center?.pk||"-1",date:u.toString(),days:t,loadDateSlotsInPast:i,language:o.consultation?.language.isoCode||""}});return this.http.get(f).pipe(b(fe=>fe??{slots:[],hasSlots:!1,lastVisibleDate:""}))}submitConsultation(o){let e=new FormData;return e.append("reason",o.details?.reason?.value||""),e.append("comment",o.details?.comment||""),e.append("consultationType",o.consultation?.type.type||""),e.append("languageIsoCode",o.consultation?.language.isoCode||""),e.append("selectedSlot",o.date?.dateSlot?.pk||""),e.append("participant.titleCode",o.details?.address.titleCode||""),e.append("participant.firstName",o.details?.address.firstName||""),e.append("participant.lastName",o.details?.address.lastName||""),e.append("participant.email",o.details?.address.email||""),e.append("participant.phone",o.details?.address.phone||""),e.append("participant.line1",o.details?.address.line1||""),e.append("participant.line2",o.details?.address.line2||""),e.append("participant.postalCode",o.details?.address.postalCode||""),e.append("participant.town",o.details?.address.town||""),e.append("newsletter",o.details?.newsletter?"true":"false"),o.details?.formData?.forEach(t=>{e.append("file",t.get("file")||"")}),this.http.post(this.occEndpoints.buildUrl("consultationSubmit"),e)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=me({token:n,factory:n.\u0275fac,providedIn:"root"})}};var Lt=class n{constructor(){this.actions$=m(Cn);this.store=m(be);this.consultationBookingService=m(At);this.statePersistenceService=m(ot);this.userAccountFacade=m(yt);this.init$=Pe(()=>this.actions$.pipe(ke(vt),ne(this.store.pipe(B(o=>!!o[J]),S(Ii))),te(([,o])=>this.userAccountFacade.get().pipe(b(e=>{let t=o?void 0:this.statePersistenceService.readStateFromStorage({key:J});return xt({user:e,formFlowData:t})})))));this.loadConsultationTypes$=Pe(()=>this.actions$.pipe(ke(St),te(()=>this.consultationBookingService.loadConsultationData().pipe(b(o=>pi({consultationData:o})),je(()=>ce(ui()))))));this.loadConsultationCenters$=Pe(()=>this.actions$.pipe(ke(Tt),ne(this.store.pipe(B(o=>!!o[J]),S(de))),te(([,o])=>this.consultationBookingService.loadConsultationCenters(o).pipe(b(e=>gi({consultationCenters:e})),je(()=>ce(Kt()))))));this.loadConsultationDates=Pe(()=>this.actions$.pipe(ke(Ot),ne(this.store.pipe(B(o=>!!o[J]),S(de))),te(([o,e])=>this.consultationBookingService.loadConsultationDates(e,o.selectedDate,o.visibleDays,o.loadDatesInPast).pipe(b(t=>_i({consultationDates:t})),je(()=>ce(Kt()))))));this.submitConsultation$=Pe(()=>this.actions$.pipe(ke(bt),ne(this.store.pipe(B(o=>!!o[J]),S(de))),te(([,o])=>this.consultationBookingService.submitConsultation(o).pipe(b(e=>{if(Object.keys(e).length===0){let t=o.details?.reason?.value||"";return(o.details?.reason?.value==="specificAppliance"||o.details?.reason?.value==="other")&&(t=`${t}: ${o.details.comment}`),mi({consultation_type:o.consultation?.type.type||"",consultation_location:o.center?.name||"ONLINE",consultation_language:o.consultation?.language.isoCode||"",consultation_reason:t})}else return Ut()}),je(()=>ce(Ut()))))));this.reset$=Pe(()=>this.actions$.pipe(ke(Ft),ne(this.userAccountFacade.get()),b(([,o])=>fi({user:o}))))}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=me({token:n,factory:n.\u0275fac})}};var Ce=class n{constructor(){this.store=m(be)}canActivate(o){return K([this.store.pipe(S(Ie)),this.store.pipe(S(Ni))]).pipe(te(([e,t])=>{let i=e.find(u=>u.routeName===o.routeConfig?.path||"")||e[0];return i.state==="locked"||i.state==="disabled"?ce(pn(o,["../"+t.routeName])):ce(!0)}))}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=me({token:n,factory:n.\u0275fac,providedIn:"root"})}};var Yi=class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275mod=Le({type:n})}static{this.\u0275inj=Ae({providers:[hn({cmsComponents:{VzugConsultationBookingComponent:{component:Je,disableSSR:!0,childRoutes:[{path:"type",component:Nt,canActivate:[Ce]},{path:"center",component:Mt,canActivate:[Ce]},{path:"date",component:Pt,canActivate:[Ce]},{path:"login",component:It,canActivate:[Ce]},{path:"details",component:kt,canActivate:[Ce]},{path:"summary",component:Et,canActivate:[Ce]},{path:"success",component:wt,canActivate:[Ce]}]}}}
1)],imports:[Je,_n.forFeature(J,hi),fn.forFeature([Lt]),Vt.forRoot()]})}};export{Yi as ConsultationBookingFeatureModule};

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.