1"use strict";(self.webpackChunkwebapp=self.webpackChunkwebapp||[]).push([[7588],{4563:(_,h,o)=>{o.d(h,{O:()=>m});var s=o(1158);function m(p,e,d){let l=s(e,"HH:mm");return d&&(l=l.add(d,"minutes")),s(p).set({hour:l.get("hour"),minute:l.get("minute"),second:l.get("second")}).utc().toISOString()}},2864:(_,h,o)=>{o.d(h,{A:()=>p});var s=o(5e3),u=o(9808);const m=function(e,d){return{"shadow-2xl":e,"border-3 border-white":d}};let p=(()=>{class e{constructor(){}ngOnChanges(){setTimeout(()=>{this.avatar||(this.avatar="/assets/images/user.svg")})}}return e.\u0275fac=function(l){return new(l||e)},e.\u0275cmp=s.Xpm({type:e,selectors:[["ui-avatar"]],inputs:{avatar:"avatar",shadow:"shadow",border:"border"},features:[s.TTD],decls:1,vars:5,consts:[[1,"rounded-full","block","w-full","h-full",3,"src","ngClass"]],template:function(l,g){1&l&&s._UZ(0,"img",0),2&l&&s.Q6J("src",g.avatar,s.LSH)("ngClass",s.WLB(2,m,g.shadow,g.border))},directives:[u.mk],styles:["[_nghost-%COMP%]{display:block}"]}),e})()},9613:(_,h,o)=>{o.d(h,{F:()=>m});var s=o(9808),u=o(5e3);let m=(()=>{class p{}return p.\u0275fac=function(d){return new(d||p)},p.\u0275mod=u.oAB({type:p}),p.\u0275inj=u.cJS({imports:[[s.ez]]}),p})()},7588:(_,h,o)=>{o.r(h),o.d(h,{TherapistSelectModule:()=>de});var s=o(9808),u=o(218),m=o(2654),p=o(846),e=o(5e3),d=o(9665),l=o(3075),g=o(6630);const F=["*"];let E=(()=>{class i{constructor(){this.valuesSet=new Set,this.subscription=new m.w,this.onChange=t=>{},this.onTouched=()=>{}}ngAfterContentInit(){this.checkboxes.forEach(t=>{this.subscription.add(t.modelChange.subscribe(n=>{n?this.valuesSet.add(t.value):this.valuesSet.delete(t.value),this.model=Array.from(this.valuesSet),this.onChange(this.model)}))})}ngOnDestroy(){this.subscription.unsubscribe()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}writeValue(t){this.model=t,this.model&&this.checkboxes&&this.checkboxes.forEach(n=>{-1!==this.model.indexOf(n.value)&&(n.model=!0,this.valuesSet.add(n.value))})}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["ui-checkbox-group"]],contentQueries:function(t,n,a){if(1&t&&e.Suo(a,g.b,4),2&t){let c;e.iGM(c=e.CRH())&&(n.checkboxes=c)}},features:[e._Bn([{provide:l.JU,useExisting:(0,e.Gpc)(()=>i),multi:!0}])],ngContentSelectors:F,decls:1,vars:0,template:function(t,n){1&t&&(e.F$t(),e.Hsn(0))},styles:[""]}),i})();var x=o(4164);function Q(i,r){if(1&i&&e._UZ(0,"ui-checkbox",8),2&i){const t=r.$implicit;e.Q6J("value",t.value)("label",t.label)}}let I=(()=>{class i{constructor(t){this.ref=t,this.THERAPY_TYPES_OPTIONS=p.Mm,this.availabilities=[{label:"Disponibilit\xe0 Mattutina",value:"morning"},{label:"Disponibilit\xe0 Pomeridiana",value:"afternoon"},{label:"Disponibilit\xe0 Serale",value:"evening"}],this.ref.data&&(this.therapyType=this.ref.data.therapyType,this.availability=this.ref.data.availability)}ngOnInit(){}reset(){this.ref.close({therapyType:[],availability:[]})}apply(){this.ref.close({therapyType:this.therapyType,availability:this.availability})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(d.S))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-therapist-filter-modal"]],decls:11,vars:2,consts:[[1,"w-72"],[1,"text-dark","text-xl","font-semibold","leading-7","mb-6"],[1,"text-sm"],[3,"ngModel","ngModelChange"],["class","mb-2 block",3,"value","label",4,"ngFor","ngForOf"],[1,"border-t","border-grey-200","mt-8","pt-6","flex","items-center","justify-end"],["fill","outline",1,"mr-5",3,"click"],[3,"click"],[1,"mb-2","block",3,"value","label"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"h1",1),e._uU(2,"Filtra terapeuti"),e.qZA(),e.TgZ(3,"div",2)(4,"ui-checkbox-group",3),e.NdJ("ngModelChange",function(c){return n.availability=c}),e.YNc(5,Q,1,2,"ui-checkbox",4),e.qZA()(),e.TgZ(6,"div",5)(7,"ui-button",6),e.NdJ("click",function(){return n.reset()}),e._uU(8,"Resetta"),e.qZA(),e.TgZ(9,"ui-button",7),e.NdJ("click",function(){return n.apply()}),e._uU(10,"Applica filtri"),e.qZA()()()),2&t&&(e.xp6(4),e.Q6J("ngModel",n.availability),e.xp6(1),e.Q6J("ngForOf",n.availabilities))},directives:[E,l.JJ,l.On,s.sg,g.b,x.r],styles:[""]}),i})();
1var D=o(13),N=o(5241),C=o(4563),Y=o(4350),S=o(1158),z=o(7836),y=o(7721),k=o(5525),P=o(5765),B=o(4445),H=o(5008),M=o(7576),Z=o(1072),w=o(1927),L=o(5613),A=o(9856),O=o(5268),R=o(2864),J=o(5850);function K(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"ui-time-selector",9),e.NdJ("timeSelect",function(a){e.CHM(t);const c=e.oxw();return c.selectTime.emit({time:a,therapist:c.therapist})}),e.qZA()}2&i&&e.Q6J("times",r.ngIf)("height",266)}function W(i,r){1&i&&(e.TgZ(0,"div",10),e._UZ(1,"ui-spinner",11),e.qZA()),2&i&&(e.xp6(1),e.Q6J("diameter",80))}let j=(()=>{class i{constructor(t,n){this.userService=t,this.therapistService=n,this.selectTime=new e.vpe,this.subscription=new m.w}ngOnInit(){this.subscription.add(this.userService.onboardingChange$.subscribe(()=>{var t;(null===(t=this.userService.onboarding.selectedTherapist)||void 0===t?void 0:t.id)!==this.therapist.id&&this.timeSelector.reset()})),this.times$=this.therapistService.listSlots(this.therapist.id,{end_date:S().add(11,"days").format("YYYY-MM-DD")})}ngOnDestroy(){this.subscription.unsubscribe()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(M.K),e.Y36(y.Q))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-therapist-card"]],viewQuery:function(t,n){if(1&t&&e.Gf(O.K,5),2&t){let a;e.iGM(a=e.CRH())&&(n.timeSelector=a.first)}},inputs:{therapist:"therapist"},outputs:{selectTime:"selectTime"},decls:16,vars:8,consts:[[1,"bg-white","shadow","rounded-lg","p-4","md:p-8"],[1,"grid","md:grid-cols-2","gap-y-4"],[1,"flex","mb-6"],[1,"w-14","h-14","md:w-28","md:h-28","mr-7","flex-shrink-0",3,"avatar"],[1,"font-bold","text-xl","mb-2"],[1,"md:text-xl"],[1,"text-sm","md:text-base","whitespace-pre-line"],[3,"times","height","timeSelect",4,"ngIf","ngIfElse"],["loading",""],[3,"times","height","timeSelect"],[1,"flex","justify-center","mt-5"],[3,"diameter"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div")(3,"div",2),e._UZ(4,"ui-avatar",3),e.TgZ(5,"div")(6,"h2",4),e._uU(7),e.qZA(),e.TgZ(8,"p",5),e._uU(9),e.qZA()()(),e.TgZ(10,"p",6),e._uU(11),e.qZA()(),e.YNc(12,K,1,2,"ui-time-selector",7),e.ALo(13,"async"),e.YNc(14,W,2,1,"ng-template",null,8,e.W1O),e.qZA()()),2&t){const a=e.MAs(15);e.xp6(4),e.Q6J("avatar",n.therapist.avatar),e.xp6(3),e.Oqu(n.therapist.fullName),e.xp6(2),e.Oqu(n.therapist.specialty),e.xp6(2),e.Oqu(n.therapist.description),e.xp6(1),e.Q6J("ngIf",e.lcZ(13,6,n.times$))("ngIfElse",a)}},directives:[R.A,s.O5,O.K,J.O],pipes:[s.Ov],styles:[""]}),i})();function G(i,r){if(1&i){const t=e.EpF();e.TgZ(0,"app-therapist-card",19),e.NdJ("selectTime",function(a){return e.CHM(t),e.oxw(3).selectTime(a)}),e.qZA()}2&i&&e.Q6J("therapist",r.$implicit)}function $(i,r){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",14),e.NdJ("scrolled",function(){return e.CHM(t),e.oxw(2).table.nextPage()}),e.YNc(2,G,1,1,"app-therapist-card",15),e.qZA(),e.TgZ(3,"div",16)(4,"div",17)(5,"ui-button",18),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).next()}),e._uU(6,"Prenota colloquio"),e.qZA()()(),e.BQk()}if(2&i){const t=r.ngIf,n=e.oxw(2);e.xp6(1),e.Q6J("scrollWindow",!1)("infiniteScrollDistance",2)("infiniteScrollThrottle",50),e.xp6(1),e.Q6J("ngForOf",t),e.xp6(3),e.Q6J("block",!0)("disabled",!n.userService.onboarding.selectedTherapist)}}function X(i,r){1&i&&(e.TgZ(0,"div",20),e._UZ(1,"ui-spinner",21),e.qZA()),2&i&&(e.xp6(1),e.Q6J("diameter",80))}const V=function(){return["/onboarding/therapy"]};function q(i,r){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"a",3),e._UZ(2,"svg-icon",4),e._uU(3," Passo precedente "),e.qZA(),e.TgZ(4,"h2",5),e._uU(5,"Seleziona terapeuta, data e ora del primo colloquio"),e.qZA(),e.TgZ(6,"div",6)(7,"div",7),e._UZ(8,"ui-input",8),e.qZA(),e._UZ(9,"div",9),e.TgZ(10,"div",10)(11,"lib-time-zone",11),e.NdJ("ngModelChange",function(a){return e.CHM(t),e.oxw().userService.user.time_zone=a})("ngModelChange",function(a){return e.CHM(t),e.oxw().onTimezoneChange(a)}),e.qZA()()(),e.YNc(12,$,7,6,"ng-container",12),e.ALo(13,"async"),e.YNc(14,X,2,1,"ng-template",null,13,e.W1O),e.BQk()}if(2&i){const t=e.MAs(15),n=e.oxw();e.xp6(1),e.Q6J("routerLink",e.DdM(7,V)),e.xp6(7),e.Q6J("formControl",n.searchControl),e.xp6(3),e.Q6J("ngModel",n.userService.user.time_zone),e.xp6(1),e.Q6J("ngIf",e.lcZ(13,5,n.table.items$))("ngIfElse",t)}}function ee(i,r){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",22)(2,"div",23)(3,"h2",24),e._uU(4,"Messaggio per il tuo terapeuta"),e.qZA(),e.TgZ(5,"p",25),e._uU(6,"C\u2019\xe8 qualche cosa in particolare che vuoi fare sapere al tuo terapeuta e che pu\xf2 aiutare nel vostro primo colloquio insieme? Condividilo
1nel box qui sotto."),e.qZA(),e.TgZ(7,"ui-input",26),e.NdJ("ngModelChange",function(a){return e.CHM(t),e.oxw().notes=a}),e.qZA(),e.TgZ(8,"div",27)(9,"ui-button",28),e.NdJ("click",function(){return e.CHM(t),e.oxw().reserve()}),e._uU(10,"Salta"),e.qZA(),e.TgZ(11,"ui-button",29),e.NdJ("click",function(){return e.CHM(t),e.oxw().reserve()}),e._uU(12,"Invia"),e.qZA()()()(),e.BQk()}if(2&i){const t=e.oxw();e.xp6(7),e.Q6J("ngModel",t.notes),e.xp6(2),e.Q6J("block",!0),e.xp6(2),e.Q6J("block",!0)}}const te=function(){return["/patient"]};function ie(i,r){if(1&i&&(e.TgZ(0,"div",30)(1,"h2",31),e._uU(2,"Il tuo primo colloquio \xe8 stato prenotato"),e.qZA(),e.TgZ(3,"div",32)(4,"div",33)(5,"h1",34),e._uU(6),e._UZ(7,"br"),e.TgZ(8,"span",35),e._uU(9),e.ALo(10,"date"),e.qZA()()()(),e.TgZ(11,"div",22)(12,"p",36),e._uU(13," Ora hai accesso alla tua area personale e riservata dove svolgere la terapia, visualizzare l'agenda, gestire i pagamenti e comunicare col terapeuta. "),e.qZA()(),e.TgZ(14,"div",37)(15,"div",17)(16,"ui-button",38),e._uU(17,"Accedi alla tua area personale"),e.qZA()()()()),2&i){const t=e.oxw();e.xp6(6),e.hij(" ",t.userService.onboarding.selectedTherapist.fullName,""),e.xp6(3),e.AsE("",e.xi3(10,5,t.userService.onboarding.selectedTime.date,"fullDate")," - ",t.userService.onboarding.selectedTime.time,""),e.xp6(7),e.Q6J("block",!0)("routerLink",e.DdM(8,te))}}const ne=[{path:"",component:(()=>{class i{constructor(t,n,a,c,v,f,T){this.therapistService=t,this.overlayService=n,this.therapyService=a,this.patientService=c,this.snackbar=v,this.route=f,this.userService=T,this.table=new N.i(this.therapistService.list.bind(this.therapistService)),this.searchControl=new l.NI,this.subscription=new m.w,this.step=1}ngOnInit(){const t=this.route.snapshot.queryParams.therapist;this.table.addFilter({"q[therapies_cont_any][]":["single","couple"],"q[user_status_eq]":z.sL.active}),t&&(this.searchControl.setValue(t),this.table.filterByUserName(t)),this.subscription.add(this.searchControl.valueChanges.pipe((0,D.b)(500)).subscribe(n=>this.table.filterByUserName(n)))}onTimezoneChange(t){S.tz.setDefault(t),this.userService.user&&this.patientService.update(this.userService.user.id,{time_zone:t}).subscribe(()=>{this.table.reload()})}selectTime({time:t,therapist:n}){this.userService.onboardingSelectTime(t,n)}next(){this.step++}reserve(){var t,n,a,c,v,f;const T=(0,C.O)(null===(t=this.userService.onboarding.selectedTime)||void 0===t?void 0:t.date,null===(n=this.userService.onboarding.selectedTime)||void 0===n?void 0:n.time),me=(0,C.O)(null===(a=this.userService.onboarding.selectedTime)||void 0===a?void 0:a.date,null===(c=this.userService.onboarding.selectedTime)||void 0===c?void 0:c.time,60);this.therapyService.create({therapy:{typology:Y.N3.single,name:null===(v=this.userService.user)||void 0===v?void 0:v.fullName},therapies_therapists:[{id:null===(f=this.userService.onboarding.selectedTherapist)||void 0===f?void 0:f.id,primary:!0}],appointment:{start_date:T,end_date:me,notes:this.notes}}).subscribe(U=>{this.step++,this.userService.user&&this.patientService.update(this.userService.user.id,{onboarding:!0}).subscribe()},U=>{var b;const he=(null===(b=U.error.errors)||void 0===b?void 0:b.start_date)?"La data selezionata non \xe8 pi\xf9 disponibile":"Si \xe8 verificato un errore";this.snackbar.error(he,"Errore"),this.step--})}openFilterModal(){this.overlayService.open(I,this.filters).afterClosed$.subscribe(t=>{t.data&&(this.filters=t.data)})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(y.Q),e.Y36(k.F),e.Y36(P.C),e.Y36(B.e),e.Y36(H.o),e.Y36(u.gz),e.Y36(M.K))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-therapist-select"]],decls:4,vars:3,consts:[[1,"container-full","pt-16","pb-5"],[4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-sm","font-semibold","inline-flex","items-center","cursor-pointer",3,"routerLink"],["key","chevron-left",1,"text-dark","mr-0.5"],[1,"font-serif","font-bold","text-3xl","mb-14","text-center"],[1,"grid","md:grid-cols-12","gap-5","mb-10"],[1,"col-span-7","md:col-span-6"],["label","Cerca il terapeuta per nome","placeholder","Cerca terapeuta","icon","search",3,"formControl"],[1,"col-span-5","md:col-span-3","pt-10"],[1,"col-span-12","md:col-start-10","md:col-span-3"],["label","Fuso orario",3,"ngModel","ngModelChange"],[4,"ngIf","ngIfElse"],["loading",""],["infiniteScroll","",1,"overflow-y-auto","flex-h","-mx-4","px-4","pb-20",3,"scrollWindow","infiniteScrollDistance","infiniteScrollThrottle","scrolled"],["class","block mb-6",3,"therapist","selectTime",4,"ngFor","ngForOf"],[1,"bg-white","fixed","lg:absolute","left-0","right-0","bottom-0","h-16","shadow-lg","bg-opacity-90","border","border-grey-200","flex","items-center","justify-center"],[1,"w-72"],[3,"block","disabled","click"],[1,"block","mb-6",3,"therapist","selectTime"],[1,"flex","justify-center","mt-20"],[3,"diameter"],[1,"grid","md:grid-cols-12","gap-x-5","mt-8"],[1,"lg:col-start-4","col-span-6"],[1,"font-serif","font-bold","text-3xl","mb-8","mt-12","text-center"],[1,"md:col-start-4","col-span-6","text-sm","mb-6"],["type","textarea","placeholder","Messaggio per il tuo terapeuta",3,"ngModel","ngModelChange"],[1,"mt-10","flex","gap-5"],["fill","outline",3,"block","click"],[3,"block","click"],[1,"text-center"],[1,"font-serif","font-bold","text-3xl","mb-12","mt-12"],[1,"grid","md:grid-cols-12","gap-x-5"],[1,"bg-brand-200","md:col-start-3","md:col-end-11","rounded-lg","p-5","relative"],[1,"font-medium","text-xl"],[1,"uppercase"],[1,"md:col-start-4","col-span-6","text-sm"],[1,"mt-16","flex","justify-center"],[3,"block","routerLink"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0),e.YNc(1,q,16,8,"ng-container",1),e.YNc(2,ee,13,3,"ng-container",1),e.YNc(3,ie,18,9,"div",2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",1===n.step),e.xp6(1),e.Q6J("ngIf",2===n.step),e.xp6(1),e.Q6J("ngIf",3===n.step))},directives:[s.O5,u.yS,Z.bk,w.a,l.JJ,l.oH,L.F,l.On,A.R,s.sg,j,x.r,J.O,u.rH],pipes:[s.Ov,s.uU],styles:["@media (min-width: 1024px){.flex-h[_ngcontent-%COMP%]{height:calc(100vh - 369px)}}"]}),i})()}];let oe=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[[u.Bz.forChild(ne)],u.Bz]}),i})();var re=o(3685),ae=o(9613),se=o(1332),le=o(8806),ce=o(2721),pe=o(1148),ue=o(1321);let de=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[[s.ez,oe,re.g,ae.F,se.U,le.h,ce.n,l.u5,A.X,l.UX,Z.Kz,pe.F,ue.d]]}),i})()}}]);
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.