PageSourceSearch

https://pifagor.mathema.me/chunk-RM7RBCVR.js

js mathema.me collected 2026-10-01 14:05:57 UTC 48,970 bytes, 1 lines download raw bytes

1import{h as cn}from"./chunk-R3XLMLHC.js";import{a as sn,b as ke}from"./chunk-XCJCANC4.js";import{a as hn}from"./chunk-UUHBNMKO.js";import{a as pn,b as mn}from"./chunk-HE526B7L.js";import{a as dn}from"./chunk-OLHNE62A.js";import"./chunk-MXRDW3B7.js";import"./chunk-EED24HJZ.js";import"./chunk-D45PUQ35.js";import{a as an}from"./chunk-IFI2ZDES.js";import{a as nn}from"./chunk-Q5M3CJLB.js";import{a as ln}from"./chunk-HOOEJXD7.js";import"./chunk-7KSO3RAB.js";import"./chunk-6XZ4CPIJ.js";import"./chunk-6UIA7EUS.js";import"./chunk-AU2MVIAP.js";import"./chunk-WNHFGN4W.js";import{a as rn}from"./chunk-IQT3ZH6U.js";import{b as on}from"./chunk-DE7RHBX5.js";import"./chunk-7PNH5QVB.js";import"./chunk-5V5ZDJWG.js";import"./chunk-MZ4DDSI2.js";import"./chunk-4CP5GMDP.js";import"./chunk-6ITO5WJT.js";import"./chunk-I4YOZKAG.js";import"./chunk-FPAD23IO.js";import{a as Qt,b as Zt,c as Yt}from"./chunk-4HR267RS.js";import"./chunk-GHADZ36V.js";import"./chunk-LELC7AUX.js";import"./chunk-MUZKPFBP.js";import"./chunk-I6COIQ46.js";import"./chunk-JT67NWFA.js";import"./chunk-OWI3EXUZ.js";import"./chunk-HYMVXFVB.js";import"./chunk-OSFMUNWR.js";import"./chunk-FYNZ7ZKZ.js";import"./chunk-6OMGUQZF.js";import"./chunk-HVXMHXVO.js";import"./chunk-GJFRX5JN.js";import"./chunk-6ILYEYRY.js";import"./chunk-6ZBAYJUW.js";import"./chunk-2VKZUXC7.js";import{a as en,b as tn}from"./chunk-2T27X77U.js";import"./chunk-A2LD67HC.js";import"./chunk-IW5Q372S.js";import"./chunk-JLPWRVLF.js";import{b as qt,c as Jt,d as Ut,e as Kt}from"./chunk-PLOXONIS.js";import"./chunk-QMM42RPF.js";import"./chunk-NQ5CFCRY.js";import"./chunk-T5WLFSFU.js";import"./chunk-RGBBHKQQ.js";import{a as It}from"./chunk-JHPQFDTA.js";import"./chunk-LHWVNT5H.js";import"./chunk-NQFOSFE4.js";import"./chunk-6F5SKZQ5.js";import"./chunk-LWVGRJJU.js";import"./chunk-JIA2G4MM.js";import"./chunk-3MJDUM2Z.js";import"./chunk-YTCWISXO.js";import"./chunk-Z3LMSPF3.js";import"./chunk-AUEIGRB4.js";import"./chunk-URVVCX4H.js";import"./chunk-XZDIR5LT.js";import"./chunk-OTGDOEJL.js";import"./chunk-HNBV4XKL.js";import"./chunk-VZZEGPBB.js";import"./chunk-PUDC6Z6M.js";import"./chunk-7CIBA6WV.js";import"./chunk-4TMBKSFA.js";import"./chunk-5CLVXTNM.js";import"./chunk-HYSUFZPW.js";import"./chunk-LYIXUTIQ.js";import{b as Nt,c as Ft}from"./chunk-5SAE7CIB.js";import{b as Bt,h as Te}from"./chunk-N4MRFNQA.js";import"./chunk-JTZW74VZ.js";import"./chunk-R3H5CK4P.js";import"./chunk-P7IGK5JM.js";import{b as Lt}from"./chunk-F43LYABC.js";import{d as At,h as Vt,j as Wt,p as jt,r as $t,s as Gt,v as Ht}from"./chunk-4SFF4AZ7.js";import"./chunk-6IIIQXQO.js";import"./chunk-72X35XQF.js";import{b as Xt}from"./chunk-77QTQED4.js";import"./chunk-7VTZ6T4V.js";import"./chunk-6QJG5VRM.js";import"./chunk-KADPKA4W.js";import{a as ye}from"./chunk-AHSOBK7G.js";import"./chunk-FA6YMLTR.js";import"./chunk-XK6PXV72.js";import{b as Et}from"./chunk-HIVOBJK4.js";import"./chunk-A6LOASI4.js";import{a as L,c as Pe,d as we,g as Rt}from"./chunk-4PVASJIY.js";import"./chunk-ZUBGVPDZ.js";import"./chunk-KM2UKYJH.js";import{b as ge,c as Ce,d as Se}from"./chunk-JWMSWT7K.js";import"./chunk-PO7MRROW.js";import{a as be}from"./chunk-ARG7JIWF.js";import{h as he}from"./chunk-OUW322UI.js";import{a as rt}from"./chunk-ELRWA3VR.js";import{Nb as ot,Ob as at,ab as it}from"./chunk-JYUUV7P3.js";import"./chunk-EKKX7FZG.js";import{a as Ot,b as Pt}from"./chunk-JPIRTLMO.js";import"./chunk-UV2HMRY7.js";import"./chunk-FP2Z63JU.js";import"./chunk-4EHF5SVS.js";import"./chunk-W4JQBRT3.js";import{a as Dt}from"./chunk-I7S54LUY.js";import"./chunk-KI5ESUWS.js";import"./chunk-ROYF4TXL.js";import{a as xt,b as Tt,c as bt}from"./chunk-DMYNVVUF.js";import{a as ze,b as xe,c as zt}from"./chunk-CUJJKEYU.js";import{f as yt,g as wt,h as kt,k as Mt}from"./chunk-BQ4OX3RW.js";import{c as St,f as vt}from"./chunk-BMSQHE5Q.js";import"./chunk-ADDJAMVC.js";import"./chunk-PFM7XEN3.js";import"./chunk-CNDOLJM6.js";import"./chunk-U6IDB2NR.js";import"./chunk-Q2T7O7RU.js";import"./chunk-XRXCDL5O.js";import{J as gt,K as Ct,a as st,d as ct,i as ve,j as pt,l as dt,p as D,r as mt,s as ht,v as ut,w as _t,z as ft}from"./chunk-AGHEJXYL.js";import"./chunk-XWF3DHWI.js";import"./chunk-QX4APFOF.js";import"./chunk-XXMUO7AW.js";import"./chunk-CSCXDYTM.js";import"./chunk-SZMNBCXC.js";import"./chunk-4OQEIZII.js";import"./chunk-7RWCIHFI.js";import"./chunk-XTLQYN4R.js";import{h as _e,i as lt,k as j,l as fe}from"./chunk-675YVCCY.js";import"./chunk-ZL3B2HKZ.js";import"./chunk-YOHJCOJF.js";import{a as W,b as ee}from"./chunk-HLN6NSZR.js";import{d as X}from"./chunk-4X4H2OZV.js";import{c as Y,e as R,f as me}from"./chunk-OJCKUG3E.js";import{a as q}from"./chunk-US4M2QEO.js";import"./chunk-WWEZAWLD.js";import"./chunk-SD3PYMCA.js";import{u as V,v as ue}from"./chunk-QRBUYQQU.js";import"./chunk-6HJ4YLPB.js";import{e as de,g as nt}from"./chunk-JHJUUIIS.js";import"./chunk-VH5NMJG4.js";import{b as F}from"./chunk-MBMRSFWC.js";import"./chunk-SNE5QZGM.js";import{$c as se,$d as Ke,Aa as J,Bd as Ue,Db as w,Dc as y,Ea as f,Ec as re,Fc as U,Ic as g,Jb as I,Jc as ie,Kc as x,Lc as $e,M as Be,Mc as Ge,Pc as He,Q as De,Qc as Xe,R as Le,Rc as qe,Sc as K,Tc as oe,Uc as B,Vc as Je,Yb as v,Zc as le,_b as z,_
1c as G,ac as Oe,bc as k,cc as M,dc as l,de as Qe,ec as s,ed as d,ee as pe,fc as c,fd as m,gc as u,gd as Q,ge as Ze,hc as Ve,ic as We,ie as Ye,ja as Ie,jc as je,jd as P,ka as Re,ke as et,lb as a,mc as A,nc as O,ne as tt,oa as Ee,od as H,pa as _,pd as Z,qc as C,tc as p,va as T,vd as ce,w as Me,wa as b,wd as N,xa as Ae,xb as ne}from"./chunk-UB5JTVWS.js";import{a as ae,b as Fe}from"./chunk-D4ZM5DW5.js";var un=(()=>{let o=class o{constructor(t,i){this.modalRef=t,this.modalData=i}onConfirm(t){this.modalRef.close(t)}onCancel(){this.modalRef.close()}};o.\u0275fac=function(i){return new(i||o)(ne(Ce),ne(ge,8))},o.\u0275cmp=w({type:o,selectors:[["math-schedule-modal"]],decls:1,vars:2,consts:[[3,"confirmSelect","cancelSelect","data","showActions"]],template:function(i,r){i&1&&(s(0,"math-schedule-selector",0),C("confirmSelect",function(S){return r.onConfirm(S)})("cancelSelect",function(){return r.onCancel()}),c()),i&2&&l("data",r.modalData)("showActions",!0)},dependencies:[hn],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0});let e=o;return e})();var yn=()=>({display:"none"}),_n=(()=>{let o=class o{constructor(){this.modalService=_(Se),this.translateService=_(Y),this.placeholder=N(),this.availableSlots=N([]),this.floatingDateTimeToDisplay=N(),this.lessonDuration=N(60),this.timezone=Ue(null),this.scheduleTags=f([]),this.isDisabled=f(!1),this.currentMode=f(L.STABLE),this.selectedValues=H(()=>this.scheduleTags().map(t=>t.label)),this.stableSlots=[],this.floatingSlots=[],this.isModalOpen=!1,this.onChange=()=>{},this.onTouched=()=>{}}writeValue(t){t&&(t.stableSchedule?.length||t.floatingSchedule?.length)?t.stableSchedule?.length?(this.currentMode.set(L.STABLE),this.stableSlots=we(t.stableSchedule),this.floatingSlots=[],this.convertArrayToTags(t.stableSchedule,L.STABLE)):t.floatingSchedule?.length&&(this.currentMode.set(L.FLOATING),this.floatingSlots=t.floatingSchedule,this.stableSlots=[],this.convertArrayToTags(this.floatingSlots,L.FLOATING)):(this.scheduleTags.set([]),this.stableSlots=[],this.floatingSlots=[])}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.isDisabled.set(t)}onOpenChange(t){t&&!this.isModalOpen&&this.openScheduleModal()}openScheduleModal(){this.isModalOpen=!0;let t={mode:this.currentMode(),stableSelectedSlots:this.stableSlots,floatingSelectedSlots:this.floatingSlots,availableSlots:this.availableSlots(),floatingDateTimeToDisplay:this.floatingDateTimeToDisplay(),lessonDuration:this.lessonDuration(),timezone:this.timezone()};this.modalService.create({nzCentered:!0,nzMaskClosable:!0,nzContent:un,nzBodyStyle:{"max-height":"80vh","overflow-y":"auto"},nzData:t,nzTitle:this.translateService.instant("schedule_picker.modal_title"),nzFooter:null,nzWidth:776}).afterClose.subscribe(r=>{this.isModalOpen=!1,r&&this.handleSelection(r)})}handleSelection(t){this.currentMode.set(t.mode),t.timezone!==void 0&&this.timezone.set(t.timezone??null),t.mode===L.STABLE?(this.stableSlots=we(t.stableSlots||[]),this.floatingSlots=[],this.convertArrayToTags(Pe(this.stableSlots),L.STABLE)):(this.floatingSlots=t.floatingSlots||[],this.stableSlots=[],this.convertArrayToTags(this.floatingSlots,L.FLOATING));let i=this.buildSchedulePickerValue();this.onChange(i),this.onTouched()}buildSchedulePickerValue(){return this.currentMode()===L.STABLE?{stableSchedule:Pe(this.stableSlots),floatingSchedule:[]}:{stableSchedule:[],floatingSchedule:this.floatingSlots}}convertArrayToTags(t,i){let r=t.map(h=>({label:Rt(h,i),value:h}));this.scheduleTags.set(r)}changeInputData(t){let i=this.currentMode(),r=this.scheduleTags().filter(S=>t.includes(S.label)).map(S=>S.value);i===L.STABLE?this.stableSlots=we(r):this.floatingSlots=r,this.convertArrayToTags(r,i);let h=this.buildSchedulePickerValue();this.onChange(h),this.onTouched()}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=w({type:o,selectors:[["math-date-time-schedule-picker"]],inputs:{placeholder:[1,"placeholder"],availableSlots:[1,"availableSlots"],floatingDateTimeToDisplay:[1,"floatingDateTimeToDisplay"],lessonDuration:[1,"lessonDuration"],timezone:[1,"timezone"]},outputs:{timezone:"timezoneChange"},features:[le([{provide:st,useExisting:Ie(()=>o),multi:!0}])],decls:2,vars:9,consts:[["nzMode","tags",3,"nzOpenChange","ngModelChange","nzPlaceHolder","nzAllowClear","nzDisabled","nzShowArrow","ngModel","nzDropdownStyle"]],template:function(i,r){i&1&&(s(0,"nz-select",0),d(1,"translate"),C("nzOpenChange",function(S){return r.onOpenChange(S)})("ngModelChange",function(S){return r.changeInputData(S)}),c()),i&2&&l("nzPlaceHolder",r.placeholder()||m(1,6,"teacher_search.filters.not-filled"))("nzAllowClear",!0)("nzDisabled",r.isDisabled())("nzShowArrow",!0)("ngModel",r.selectedValues())("nzDropdownStyle",G(8,yn))},dependencies:[gt,ve,mt,Te,me,R],styles:["[_nghost-%COMP%]     nz-select-top-control{max-height:100px;overflow-y:auto}"],changeDetection:0});let e=o;return e})();var fn=(()=>{let o=class o{};o.\u0275fac=function(i){return new(i||o)}
1,o.\u0275cmp=w({type:o,selectors:[["math-star-icon"]],hostVars:2,hostBindings:function(i,r){i&2&&U("disabled-color",r.disabledColor)},inputs:{disabledColor:"disabledColor"},decls:2,vars:0,consts:[["width","18","height","18","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8 5L7.484 6.394C6.808 8.222 6.47 9.136 5.803 9.803C5.136 10.47 4.222 10.808 2.394 11.484L1 12L2.394 12.516C4.222 13.192 5.136 13.531 5.803 14.197C6.47 14.863 6.808 15.778 7.484 17.606L8 19L8.516 17.606C9.192 15.778 9.531 14.864 10.197 14.197C10.863 13.53 11.778 13.192 13.606 12.516L15 12L13.606 11.484C11.778 10.808 10.864 10.47 10.197 9.803C9.53 9.136 9.192 8.222 8.516 6.394L8 5ZM16 1L15.779 1.597C15.489 2.381 15.344 2.773 15.059 3.058C14.773 3.344 14.381 3.489 13.597 3.778L13 4L13.598 4.221C14.381 4.511 14.773 4.656 15.058 4.941C15.344 5.227 15.489 5.619 15.778 6.403L16 7L16.221 6.403C16.511 5.619 16.656 5.227 16.941 4.942C17.227 4.656 17.619 4.511 18.403 4.222L19 4L18.402 3.779C17.619 3.489 17.227 3.344 16.942 3.059C16.656 2.773 16.511 2.381 16.222 1.597L16 1Z","stroke","#1E38DE","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(i,r){i&1&&(Ae(),Ve(0,"svg",0),je(1,"path",1),We())},styles:["[_nghost-%COMP%]   path[_ngcontent-%COMP%]{transition:stroke .3s ease}.disabled-color[_nghost-%COMP%]   path[_ngcontent-%COMP%]{stroke:var(--math-text-secondary)}"],changeDetection:0});let e=o;return e})();var wn=()=>[21,30],kn=e=>({expanded:e}),Mn=()=>[21,16],E=(e,o)=>o.value;function Dn(e,o){if(e&1&&u(0,"nz-option",7),e&2){let n=o.$implicit;p();let t=B(7);l("nzValue",n.value)("nzLabel",n.label+" "+t)}}function On(e,o){if(e&1&&(u(0,"nz-option",7),d(1,"translate")),e&2){let n=o.$implicit;l("nzValue",n.value)("nzLabel",m(1,2,n.label))}}function Pn(e,o){if(e&1&&(u(0,"nz-option",7),d(1,"translate")),e&2){let n=o.$implicit;l("nzValue",n.value)("nzLabel",m(1,2,n.label))}}function Nn(e,o){if(e&1&&u(0,"nz-option",7),e&2){let n=o.$implicit;l("nzValue",n.value)("nzLabel",n.label)}}function Fn(e,o){if(e&1&&(u(0,"nz-option",7),d(1,"translate")),e&2){let n=o.$implicit;l("nzValue",n.value)("nzLabel",m(1,2,n.label))}}function Bn(e,o){if(e&1&&(u(0,"nz-option",7),d(1,"translate")),e&2){let n=o.$implicit;l("nzValue",n.value)("nzLabel",m(1,2,n.label))}}function Ln(e,o){if(e&1&&(u(0,"nz-option",7),d(1,"translate")),e&2){let n=o.$implicit;l("nzValue",n.value)("nzLabel",m(1,2,n.label))}}function In(e,o){if(e&1&&(u(0,"nz-option",7),d(1,"translate")),e&2){let n=o.$implicit;l("nzValue",n.value)("nzLabel",m(1,2,n.label))}}function Rn(e,o){e&1&&u(0,"span",28)}function En(e,o){if(e&1){let n=O();s(0,"nz-auto-option",29),C("click",function(){let i=T(n).$implicit,r=p();return b(r.selectTeacher(i.value))}),g(1),c()}if(e&2){let n=o.$implicit;l("nzValue",n.label),a(),x(" ",n.label," ")}}var gn=(()=>{let o=class o{constructor(){this.applyFilters=ce(),this.isLoading=N(!1),this.selectedInSearchTeacher=N(null),this.authService=_(he),this.destroyRef=_(J),this.translateService=_(Y),this.activatedRoute=_(de),this.responsiveService=_(be),this.calendarApiService=_(ke),this.studentsApiService=_(ye),this.form=new dt({age:new D(null),schedule:new D(null),timezone:new D(null),gender:new D(null),exam:new D(null),specialNeed:new D(null),teacherId:new D(null),isDepthStudy:new D,additionalSubjects:new D,educationProgram:new D,lang:new D,workingClass:new D}),this.searchControl=new D,this.examPreparationOptions=f([]),this.classesOptions=f([]),this.educationProgramOptions=f([]),this.isExpanded=f(!1),this.isFormChanged=f(!1),this.showExpandedBtnText=f(!1),this.teachers=f([]),this.lessonDuration=f(60),this.timezone=f(null),this.teachersAgeOptions=Zt,this.genderOptions=At(),this.specialNeedsOptions=Ht(),this.additionalSubjectsOptions=Gt(),this.langOptions=$t(),Z(()=>{let t=this.timezone();this.form.controls.timezone.value!==t&&this.form.controls.timezone.setValue(t,{emitEvent:!1})})}ngOnInit(){this.prepareFilteringData(),this.loadLessonDuration(),this.searchControl.setValue(this.selectedInSearchTeacher()),this.fillSearchAutocompleteIfNeed(),this.trackFormChanges(),this.trackQueryParamsChanges(),this.trackSearchControlChanges()}fillSearchAutocompleteIfNeed(){let{teacherId:t}=this.activatedRoute.snapshot.queryParams;t&&this.calendarApiService.getTeachersList({search:t,limit:1}).pipe(Me(i=>this.mapTeachers(i)),F(this.destroyRef)).subscribe(i=>{this.teachers.set(i),this.searchControl.setValue(i[0].label)})}submit(){this.formState=this.form.getRawValue(),this.applyFilters.emit(this.formState),this.isFormChanged.update(()=>!1),this.toggleExpandFilters(!1)}toggleExpandFilters(t){this.isExpanded.update(i=>t??!i),setTimeout(()=>{this.showExpandedBtnText.update(()=>this.isExpanded())},150)}loadLessonDuration(){let t=this.activatedRoute.snapshot.queryParams.lessonLength;if(t){this.lessonDuration.set(Number(t));return}let i=this.activatedRoute.snapshot.params.studentId,r=this.activatedRoute.snapshot.queryParams.oldTeacherId;!i||!r||this.studentsApiService.getScheduleWithTeacher(i,{teacherId:r}).pipe(F(this.destroyRef)).subscribe(h=>this.lessonDuration.set(h.lessonDuration))}prepareFilteringData(){let t=this.activatedRoute.snapshot.params.studentId;this.studentsApiService.getJournal(t).pipe(F(this.destroyRef)).subscribe(({teacher:i,student:r})=>{let{marketRegion:h}=i;this.createExamPreparationOptions(h),this.createClassesOptions(h),this.createStudyProgramOptions(h),this.form.get("workingClass").patchValue(r.class)})}createStudyProgramOptions(t){this.educationProgramOptions.set(Wt(t))}createClassesOptions(t){this.classesOptions.set(Vt(t).map(i=>({value:i.value,label:`${this.translateService.instant(i.label)}`})))}createExamPreparationOptions(t){this.examPreparationOptions.set(jt(t,this.authService.userRole||rt.CLIENT).map(i=>({label:this.translateService.instant(i.label),value:i.value})))}trackFormChanges(){this.form.valueChanges.pipe(De(),F(this.destroyRef)).subscribe(t=>{this.isFormChanged.update(()=>at(t,this.formState))})}trackQueryParamsChanges(){this.activatedRoute.queryParams.pipe(F(this.destroyRef)).subscribe(t=>{this.applyParamsToForm(t)})}applyParamsToForm(t){let i=ae({},t);if(t?.age){let h=(Array.isArray(t.age)?t.age:[t.age]).map(S=>S.split(",").map(Number));i.age=ot(this.teachersAgeOptions,h)}t?.floatingSchedule?.length&&(i.schedule={floatingSchedule:JSON.parse(t.floatingSchedule)}),t?.stableSchedule?.length&&(i.schedule={stableSchedule:JSON.parse(t.stableSchedule)}),t?.timezone&&(i.timezone=t.timezone,this.timezone.set(t.timezone)),this.formState=i,this.form.patchValue(i),this.isFormChanged.set(!1)}selectTeacher(t){this.form.controls.teacherId.setValue(t)}trackSearchControlChanges(){this.searchControl.valueChanges.pipe(Be(300),De(),F(this.destroyRef)).subscribe(t=>
1{if(typeof t=="string"&&t.length===0){this.teachers.set([]),this.form.controls.teacherId.setValue(null);return}this.getTeachers(t)})}getTeachers(t){this.calendarApiService.getTeachersList({search:t,limit:50}).pipe(Me(i=>this.mapTeachers(i)),F(this.destroyRef)).subscribe(i=>{this.teachers.set(i)})}mapTeachers(t){return t.map(i=>({value:i.id,label:`${i.lastName} ${i.firstName}`}))}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=w({type:o,selectors:[["math-regular-teacher-search-filters"]],inputs:{isLoading:[1,"isLoading"],selectedInSearchTeacher:[1,"selectedInSearchTeacher"]},outputs:{applyFilters:"applyFilters"},decls:97,vars:107,consts:[["prefixSearch",""],["auto",""],["nz-form","","nzLayout","vertical",3,"ngSubmit","formGroup"],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzXs","nzSm","nzMd"],["nzJustify","space-between",1,"no-margin-bottom"],["nzSelectBlurBackdrop","","formControlName","workingClass",3,"nzPlaceHolder","nzAllowClear"],[3,"nzValue","nzLabel"],["nzSelectBlurBackdrop","","formControlName","age",3,"nzMode","nzAllowClear","nzPlaceHolder"],["formControlName","schedule",3,"timezoneChange","timezone","lessonDuration","placeholder"],["nz-col","",1,"extra-filters",3,"ngClass","nzSpan"],["nzSelectBlurBackdrop","","formControlName","gender",3,"nzPlaceHolder","nzAllowClear"],["nzSelectBlurBackdrop","","formControlName","exam",3,"nzPlaceHolder","nzAllowClear"],["nzSelectBlurBackdrop","","formControlName","specialNeed",3,"nzAllowClear","nzPlaceHolder","nzBackdrop"],["nzSelectBlurBackdrop","","nzMode","multiple","formControlName","additionalSubjects",3,"nzAllowClear","nzPlaceHolder","nzBackdrop"],["nzSelectBlurBackdrop","","formControlName","educationProgram",3,"nzAllowClear","nzPlaceHolder","nzBackdrop"],["nzSelectBlurBackdrop","","formControlName","lang","nzMode","multiple",3,"nzAllowClear","nzPlaceHolder","nzBackdrop"],[3,"nzPrefix"],["type","text","nz-input","",3,"nzAutocomplete","formControl","placeholder"],[1,"name-link",3,"nzValue"],["nz-checkbox","","formControlName","isDepthStudy","for","isDepthStudy"],["nz-col","","nzSpan","12",1,"expand-collapse-button"],["nz-button","","nz-flex","","nzAlign","center","nzType","link",3,"click"],["nz-icon",""],[3,"rotate"],["nz-col","",1,"left-auto"],["nz-button","","nzType","primary","nzGhost","",1,"apply-filters",3,"disabled","nzBlock"],[3,"disabledColor"],["nz-icon","","nzType","search"],[1,"name-link",3,"click","nzValue"]],template:function(i,r){if(i&1){let h=O();K(0),d(1,"async"),s(2,"form",2),C("ngSubmit",function(){return T(h),b(r.submit())}),s(3,"div",3)(4,"div",4)(5,"nz-form-item",5)(6,"nz-form-control"),K(7),d(8,"translate"),s(9,"nz-select",6),k(10,Dn,1,2,"nz-option",7,E),c()()()(),s(12,"div",4)(13,"nz-form-item",5)(14,"nz-form-control")(15,"nz-select",8),d(16,"translate"),k(17,On,2,4,"nz-option",7,E),c()()()(),s(19,"div",4)(20,"nz-form-item",5)(21,"nz-form-control")(22,"math-date-time-schedule-picker",9),d(23,"translate"),qe("timezoneChange",function(te){return T(h),Xe(r.timezone,te)||(r.timezone=te),b(te)}),c()()()(),s(24,"div",10)(25,"div",3)(26,"div",4)(27,"nz-form-item",5)(28,"nz-form-control")(29,"nz-select",11),d(30,"translate"),k(31,Pn,2,4,"nz-option",7,E),c()()()(),s(33,"div",4)(34,"nz-form-item",5)(35,"nz-form-control")(36,"nz-select",12),d(37,"translate"),k(38,Nn,1,2,"nz-option",7,E),c()()()(),s(40,"div",4)(41,"nz-form-item",5)(42,"nz-form-control")(43,"nz-select",13),d(44,"translate"),k(45,Fn,2,4,"nz-option",7,E),c()()()(),s(47,"div",4)(48,"nz-form-item",5)(49,"nz-form-control")(50,"nz-select",14),d(51,"translate"),k(52,Bn,2,4,"nz-option",7,E),c()()()(),s(54,"div",4)(55,"nz-form-item",5)(56,"nz-form-control")(57,"nz-select",15),d(58,"translate"),k(59,Ln,2,4,"nz-option",7,E),c()()()(),s(61,"div",4)(62,"nz-form-item",5)(63,"nz-form-control")(64,"nz-select",16),d(65,"translate"),k(66,In,2,4,"nz-option",7,E),c()()()(),s(68,"div",4)(69,"nz-form-item",5)(70,"nz-form-control")(71,"nz-input-group",17),u(72,"input",18),d(73,"translate"),I(74,Rn,1,0,"ng-template",null,0,P),s(76,"nz-autocomplete",null,1),k(78,En,2,2,"nz-auto-option",19,E),c()()()()(),s(80,"div",4)(81,"nz-form-item",5)(82,"nz-form-control")(83,"label",20),g(84),d(85,"translate"),c()()()()()(),s(86,"div",21)(87,"a",22),C("click",function(){return T(h),b(r.toggleExpandFilters())}),g(88),d(89,"translate"),s(90,"span",23),u(91,"math-chevron-icon",24),c()()(),s(92,"div",25)(93,"button",26),u(94,"math-star-icon",27),g(95),d(96,"translate"),c()()()()}if(i&2){let h=y(75),S=y(77),te=m(1,74,r.responsiveService.isMd$);a(2),l("formGroup",r.form),a(),l("nzGutter",G(103,wn)),a(),l("nzXs",24)("nzSm",12)("nzMd",8),a(3);let zn=oe(m(8,76,"teacher_search.filters.workingClass"));a(2),l("nzPlaceHolder",zn)("nzAllowClear",!1),a(),M(r.classesOptions()),a(2),l("nzXs",24)("nzSm",12)("nzMd",8),a(3),l("nzMode","multiple")("nzAllowClear",!0)("nzPlaceHolder",m(16,79,"teacher_search.filters.age")),a(2),M(r.teachersAgeOptions),a(2),l("nzXs",24)("nzSm",12)("nzMd",8),a(3),He("timezone",r.timezone),l("lessonDuration",r.lessonDuration())("placeholder",m(23,81,"teacher_search.filters.dates")),a(2),l("ngClass",se(104,kn,r.isExpanded()))("nzSpan",24),a(),l("nzGutter",G(106,Mn)),a(),l("nzXs",24)("nzSm",12)("nzMd",8),a(3),l("nzPlaceHolder",m(30,83,"teacher_search.filters.gender"))("nzAllowClear",!0),a(2),M(r.genderOptions),a(2),l("nzXs",24)("nzSm",12)("nzMd",8),a(3),l("nzPlaceHolder",m(37,85,"teacher_search.filters.exam"))("nzAllowClear",!0),a(2),M(r.examPreparationOptions()),a(2),l("nzXs",24)("nzSm",12)("nzMd",8),a(3),l("nzAllowClear",!0)("nzPlaceHolder",m(44,87,"teacher_search.filters.specialNeed"))("nzBackdrop",!0),a(2),M(r.specialNeedsOptions),a(2),l("nzXs",24)("nzSm",12)("nzMd",8),a(3),l("nzAllowClear",!0)("nzPlaceHolder",m(51,89,"teacher_search.filters.additionalSubjects"))("nzBackdrop",!0),a(2),M(r.additionalSubjectsOptions),a(2),l("nzXs",24)("nzSm",12)("nzMd",8),a(3),l("nzAllowClear",!0)("nzPlaceHolder",m(58,91,"teacher_search.filters.educationProgram"))("nzBackdrop",!0),a(2),M(r.educationProgramOptions()),a(2),l("nzXs",24)("nzSm",12)("nzMd",8),a(3),l("nzAllowClear",!0)("nzPlaceHolder",m(65,93,"teacher_search.filters.lang"))("nzBackdrop",!0),a(2),M(r.langOptions),a(2),l("nzXs",24)("nzSm",12)("nzMd",8),a(3),l("nzPrefix",h),a(),l("placeholder",Je(m(73,95,"users.search")))("nzAutocomplete",
1S)("formControl",r.searchControl),a(6),M(r.teachers()),a(2),l("nzXs",24)("nzSm",12)("nzMd",8),a(4),x(" ",m(85,97,"teacher_search.filters.isDepthStudy")," ");let xn=r.showExpandedBtnText()?"teacher_search.filters.less-filters":"teacher_search.filters.more-filters";a(4),x(" ",m(89,99,xn)," "),a(3),l("rotate",r.showExpandedBtnText()),a(2),l("disabled",!r.isFormChanged())("nzBlock",!te),a(),l("disabledColor",!r.isFormChanged()),a(),x(" ",m(96,101,"teacher_search.filters.apply")," ")}},dependencies:[xe,Tt,Ct,ht,ct,ve,pt,ut,_t,ft,xt,ze,bt,Te,Bt,j,V,W,Qt,Yt,_n,Ke,Mt,yt,kt,wt,Kt,Ut,qt,Jt,fn,Xt,R,pe],styles:["[_nghost-%COMP%]{display:block;width:100%}.no-margin-bottom[_ngcontent-%COMP%]{margin-bottom:0}.btn-icon[_ngcontent-%COMP%]{font-size:12px;font-weight:700}.left-auto[_ngcontent-%COMP%]{width:100%}@media(min-width:768px){.left-auto[_ngcontent-%COMP%]{margin-left:auto;width:auto}}.apply-filters[_ngcontent-%COMP%]{min-width:216px;display:flex;justify-content:center;align-items:center;gap:11px}.extra-filters[_ngcontent-%COMP%]{overflow:hidden;transition:max-height .3s ease-in-out,opacity .3s ease-in-out;max-height:0;opacity:0;padding-top:0!important;padding-bottom:0!important}.extra-filters.expanded[_ngcontent-%COMP%]{max-height:500px;opacity:1}.extra-filters[_ngcontent-%COMP%] + .expand-collapse-button[_ngcontent-%COMP%]{transition:opacity .15s ease-in-out}.extra-filters[_ngcontent-%COMP%] + .expand-collapse-button.fading[_ngcontent-%COMP%]{opacity:.6}.expand-collapse-button[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{padding-left:0}"],changeDetection:0});let e=o;return e})();var Ne=(()=>{let o=class o{constructor(t){this.calendarApiService=t}load(t,i,r){let h=i.startOf("week"),S=X.fromObject({year:h.year,month:h.month,day:h.day},{zone:r});return this.calendarApiService.getWeeklyCalendar({times:[{startTime:S.toISO(),endTime:S.endOf("week").toISO()}],teacherId:t,slotType:sn.ALL})}};o.\u0275fac=function(i){return new(i||o)(Ee(ke))},o.\u0275prov=Re({token:o,factory:o.\u0275fac});let e=o;return e})();var Vn=(e,o)=>o.id;function Wn(e,o){e&1&&u(0,"span",5)}function jn(e,o){if(e&1&&(s(0,"div",2),u(1,"nz-spin",4),I(2,Wn,1,0,"ng-template",null,0,P),c()),e&2){let n=y(3);a(),l("nzIndicator",n)}}function $n(e,o){if(e&1&&(g(0),d(1,"translate")),e&2){let n=p().$implicit,t=p(4);Ge(" ",m(1,3,t.i18n.student),": ",n.student==null?null:n.student.firstName," ",n.student==null?null:n.student.lastName," ")}}function Gn(e,o){if(e&1&&(g(0),d(1,"translate")),e&2){let n=p(6);x(" ",m(1,1,n.i18n.reserved_slot)," ")}}function Hn(e,o){if(e&1&&(g(0),d(1,"translate")),e&2){let n=p(6);x(" ",m(1,1,n.i18n.free_slot)," ")}}function Xn(e,o){if(e&1&&(s(0,"div",16),g(1),c(),v(2,Gn,2,3)(3,Hn,2,3)),e&2){let n=p().$implicit;a(),x(" ",n.time," "),a(),z(n.isLesson?2:3)}}function qn(e,o){if(e&1&&u(0,"mathema-schedule-calendar-slot",15),e&2){let n=p().$implicit,t=p(2).$implicit;l("item",n)("viewType","week")("teacherSearchMode",!0)("isVacation",t.value.isVacation)}}function Jn(e,o){if(e&1&&(s(0,"div",14),I(1,$n,2,5,"ng-template",null,1,P),v(3,Xn,4,2)(4,qn,1,4,"mathema-schedule-calendar-slot",15),c()),e&2){let n=o.$implicit,t=y(2),i=p(4),r=i.compact()&&n.isLesson?t:null;U("lesson",n.isLesson)("compact",i.compact()),l("nz-tooltip",r),a(3),z(i.compact()?3:4)}}function Un(e,o){if(e&1&&(s(0,"div",12),d(1,"translate"),k(2,Jn,5,6,"div",13,Vn),c()),e&2){let n=p().$implicit;U("vacation",n.value.isVacation),l("nzTooltipTitle",m(1,4,"calendar.vacations.vacation-day"))("nzTooltipTrigger",n.value.isVacation?"hover":null),a(2),M(n.value.items)}}function Kn(e,o){if(e&1&&(s(0,"span"),g(1),d(2,"translate"),c()),e&2){let n=p(4);a(),ie(m(2,1,n.i18n.reserve_not_available))}}function Qn(e,o){if(e&1&&(s(0,"span"),g(1),d(2,"translate"),c()),e&2){let n=p(4);a(),ie(m(2,1,n.i18n.no_lessons))}}function Zn(e,o){if(e&1&&(s(0,"div",11),v(1,Kn,3,3,"span")(2,Qn,3,3,"span"),c()),e&2){let n=p(3);a(),z(n.authService.isManager()||n.authService.isAdmin()?1:2)}}function Yn(e,o){if(e&1&&(s(0,"nz-col",6)(1,"div",7)(2,"div",8),g(3),d(4,"date"),d(5,"titlecase"),c(),s(6,"div",9),g(7),d(8,"date"),d(9,"titlecase"),c()(),v(10,Un,4,6,"div",10)(11,Zn,3,1,"div",11),c()),e&2){let n=o.$implicit;a(3),x(" ",m(5,6,Q(4,3,n.value.date,"cccc"))," "),a(4),x(" ",m(9,11,Q(8,8,n.value.date,"d MMMM"))," "),a(3),z(n.value.items!=null&&n.value.items.length?10:11)}}function ei(e,o){if(e&1&&(k(0,Yn,12,13,"nz-col",6,Oe),d(2,"keyvalue")),e&2){let n=p();M(Q(2,0,o,n.sortObjectNumericKeys))}}function ti(e,o){if(e&1&&(s(0,"nz-col",6)(1,"div",8),g(2),d(3,"titlecase"),c(),s(4,"div",9),g(5),d(6,"titlecase"),c(),u(7,"div",17),c()),e&2){let n=o.$implicit,t=p(2);a(2),x(" ",m(3,2,t.formatWeekDayNameFromNumber(n))," "),a(3),x(" ",m(6,4,t.formatWeekDayNumberNameFromNumber(n))," ")}}function ni(e,o){if(e&1&&k(0,ti,8,6,"nz-col",6,Oe),e&2){let n=p();
1M(n.emptyDays)}}var Cn=(()=>{let o=class o{get weekForDisplay(){return this.weekSchedule()}constructor(){this.i18n=q,this.destroyRef=_(J),this.scheduleService=_(Ne),this.authService=_(he),this.languageService=_(it),this.teacherId=N.required(),this.isTeacherBlocked=N(!1),this.weekStartDate=N(),this.compact=N(!1),this.loading=f(!1),this.weekSchedule=f(null),this.emptyDays=[0,1,2,3,4,5,6],this.sortObjectNumericKeys=(t,i)=>Number(t.key)-Number(i.key),Z(()=>{this.loadOnTeacherOrWeekChange()},{allowSignalWrites:!0})}ngOnInit(){this.loadOnTeacherOrWeekChange()}loadOnTeacherOrWeekChange(){let t=this.teacherId(),i=this.weekStartDate()??X.now().startOf("week");if(!t){this.loading.set(!1),this.weekSchedule.set(null);return}this.loading.set(!0),this.scheduleService.load(t,i,this.authService.userTimezone).pipe(Le(()=>this.loading.set(!1)),F(this.destroyRef)).subscribe(r=>this.weekSchedule.set(r))}formatWeekDayNameFromNumber(t){return new Intl.DateTimeFormat(this.languageService.locale,{weekday:"long"}).format(new Date(0,0,t+1))}formatWeekDayNumberNameFromNumber(t){let r=(this.weekStartDate()??X.now().startOf("week")).plus({days:t}).toJSDate();return new Intl.DateTimeFormat(this.languageService.locale,{day:"numeric",month:"long"}).format(r)}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=w({type:o,selectors:[["math-week-schedule"]],inputs:{teacherId:[1,"teacherId"],isTeacherBlocked:[1,"isTeacherBlocked"],weekStartDate:[1,"weekStartDate"],compact:[1,"compact"]},features:[le([Ne])],decls:4,vars:4,consts:[["indicatorTemplate",""],["studentInfoTooltipTmp",""],[1,"expanded-teacher-week-loader"],[1,"week-days"],["nzSimple","",3,"nzIndicator"],["nz-icon","","nzType","loading",2,"font-size","36px"],["nzFlex","auto",1,"week-day"],[1,"week-day-title"],[1,"week-day-name"],[1,"week-day-number"],["nz-tooltip","",1,"slots-box","with-slots",3,"vacation","nzTooltipTitle","nzTooltipTrigger"],[1,"slots-box","empty"],["nz-tooltip","",1,"slots-box","with-slots",3,"nzTooltipTitle","nzTooltipTrigger"],[1,"item-wrapper",3,"lesson","compact","nz-tooltip"],[1,"item-wrapper",3,"nz-tooltip"],[3,"item","viewType","teacherSearchMode","isVacation"],[1,"time"],[1,"slots-box","with-slots"]],template:function(i,r){if(i&1&&(v(0,jn,4,1,"div",2),s(1,"nz-row",3),v(2,ei,3,3)(3,ni,2,0),c()),i&2){let h;z(r.loading()?0:-1),a(),U("compact",r.compact()),a(),z((h=r.weekForDisplay)?2:3,h)}},dependencies:[tt,ue,V,Pt,Ot,zt,xe,ze,vt,St,ee,cn,me,Ze,Ye,et,R],styles:["[_nghost-%COMP%]{position:relative}@media(min-width:992px){.compact[_ngcontent-%COMP%]{flex-wrap:nowrap}}.compact[_ngcontent-%COMP%]   .week-day[_ngcontent-%COMP%]{text-align:center}.expanded-teacher-week-loader[_ngcontent-%COMP%]{position:absolute;display:flex;inset:0;background-color:var(--math-surface-secondary);align-items:center;justify-content:center;z-index:2;opacity:.8}.week-day-name[_ngcontent-%COMP%]{color:var(--math-text-secondary);line-height:1}.week-day-name.schedule[_ngcontent-%COMP%]{margin-bottom:5px;border:1px solid var(--math-border);border-left:0;padding:10px}.week-day-name[_ngcontent-%COMP%]   .add-slot[_ngcontent-%COMP%]{float:right;position:relative;top:-4px}.week-day-name[_ngcontent-%COMP%]   .add-slot[_ngcontent-%COMP%]:hover{color:green}.week-day-number[_ngcontent-%COMP%]{font-weight:600}.week-day-title[_ngcontent-%COMP%]{border:1px solid var(--math-border);border-left:none;padding:8px;text-align:center}.week-day[_ngcontent-%COMP%]{display:flex;flex-direction:column}.week-day[_ngcontent-%COMP%]:last-child   .slots-box[_ngcontent-%COMP%], .week-day[_ngcontent-%COMP%]:last-child   .week-day-title[_ngcontent-%COMP%]{border-right:none}.slots-box[_ngcontent-%COMP%]{flex:1 1 auto;min-height:100px;border-right:1px solid var(--math-border);border-left:0}.slots-box.wide[_ngcontent-%COMP%]{min-width:225px}.slots-box.empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;background-color:var(--math-surface-secondary);color:var(--math-text-secondary)}.slots-box.empty[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{padding:0 16px}.slots-box.vacation[_ngcontent-%COMP%]{background:repeating-linear-gradient(37deg,#ffebd3,#ffebd3 5px,transparent 5px,transparent 10
1px)}.slots-box.with-slots[_ngcontent-%COMP%]{padding:8px}.slots-box.with-slots[_ngcontent-%COMP%]   .lessons-label[_ngcontent-%COMP%]{margin-bottom:3px}.slots-box.with-slots[_ngcontent-%COMP%]   .item-wrapper.lesson[_ngcontent-%COMP%]:not(.compact){height:40px}.slots-box.with-slots[_ngcontent-%COMP%]   .item-wrapper[_ngcontent-%COMP%]:not(:last-child){margin-bottom:8px}.slots-box.with-slots[_ngcontent-%COMP%]   .item-wrapper.compact[_ngcontent-%COMP%]{background-color:var(--math-green-2);color:var(--math-green-6);font-size:14px;line-height:20px;border-radius:8px;text-align:left;padding:6px 8px;font-weight:500}.slots-box.with-slots[_ngcontent-%COMP%]   .item-wrapper.compact.lesson[_ngcontent-%COMP%]{background-color:var(--math-surface-secondary);color:var(--math-red-6)}.slots-box.with-slots[_ngcontent-%COMP%]   .item-wrapper.compact[_ngcontent-%COMP%]   .time[_ngcontent-%COMP%]{color:var(--math-text-primary)}nz-spin[_ngcontent-%COMP%]{text-align:center}@media(max-width:576px){.week-days[_ngcontent-%COMP%]{margin:0 -16px;flex-direction:column}.week-days[_ngcontent-%COMP%]   .week-day[_ngcontent-%COMP%]{padding:8px 16px}.slots-box[_ngcontent-%COMP%]{border:none}.slots-box.with-slots[_ngcontent-%COMP%]{padding:0}.week-day[_ngcontent-%COMP%]:first-child   .slots-box[_ngcontent-%COMP%]{border-left:none}}"],changeDetection:0});let e=o;return e})();var Sn=(()=>{let o=class o{constructor(){this.currentWeekStart=f(X.now().startOf("week")),this.weekTitle=H(()=>this.generateWeekTitle()),this.weekChange=ce(),Z(()=>{this.weekChange.emit(this.currentWeekStart())})}onPreviousWeek(){this.currentWeekStart.update(t=>t.minus({week:1}))}onNextWeek(){this.currentWeekStart.update(t=>t.plus({week:1}))}generateWeekTitle(){let t=this.currentWeekStart(),i=t.plus({days:6});return t.month===i.month?`${t.toFormat("d")} - ${i.toFormat("d LLL")}`:`${t.toFormat("d LLL")} - ${i.toFormat("d LLL")}`}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=w({type:o,selectors:[["math-week-picker"]],outputs:{weekChange:"weekChange"},decls:7,vars:1,consts:[["nz-flex","","nzAlign","center","nzJustify","space-between"],["nz-button","","nzType","text","nzShape","circle",3,"click"],["nz-icon","","nzType","left",1,"icon"],[1,"week-title"],["nz-icon","","nzType","right",1,"icon"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"button",1),C("click",function(){return r.onPreviousWeek()}),u(2,"span",2),c(),s(3,"span",3),g(4),c(),s(5,"button",1),C("click",function(){return r.onNextWeek()}),u(6,"span",4),c()()),i&2&&(a(4),ie(r.weekTitle()))},dependencies:[fe,j,_e,ue,V,ee,W],styles:["[_nghost-%COMP%]{padding:16px 0;display:block}.icon[_ngcontent-%COMP%]{font-size:16px}.week-title[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#262626}"],changeDetection:0});let e=o;return e})();var vn=(()=>{let o=class o{constructor(t){this.modalData=t,this.i18n=q,this.modalRef=_(Ce),this.teacherId=f(null),this.weekStartDate=f(void 0),this.teacherId.set(this.modalData?.teacherId)}onWeekChange(t){this.weekStartDate.set(t)}onClose(){this.modalRef.close()}};o.\u0275fac=function(i){return new(i||o)(ne(ge))},o.\u0275cmp=w({type:o,selectors:[["math-teacher-schedule-modal"]],decls:8,vars:6,consts:[[1,"schedule-card"],[3,"weekChange"],[3,"compact","teacherId","weekStartDate"],["nz-flex","","nzJustify","flex-end"],["nz-button","","nzType","primary",3,"click"]],template:function(i,r){i&1&&(s(0,"nz-card",0)(1,"math-week-picker",1),C("weekChange",function(S){return r.onWeekChange(S)}),c(),u(2,"math-week-schedule",2),c(),u(3,"br"),s(4,"div",3)(5,"button",4),C("click",function(){return r.onClose()}),g(6),d(7,"translate"),c()()),i&2&&(a(2),l("compact",!0)("teacherId",r.teacherId())("weekStartDate",r.weekStartDate()),a(4),x(" ",m(7,4,r.i18n.main.btn.close)," "))},dependencies:[Cn,Sn,Ft,Nt,Lt,fe,j,_e,lt,ee,W,R],styles:[".schedule-card[_ngcontent-%COMP%]{border:1px solid var(--math-border)}.schedule-card[_ngcontent-%COMP%]     .ant-card-body{padding:0}"],changeDetection:0});let e=o;return e})();var ri=()=>[1,3],li=e=>({subject:e}),si=(e,o)=>
1o.id;function ci(e,o){if(e&1&&(g(0),d(1,"translate")),e&2){let n=p(2);x(" ",m(1,1,n.i18n.regular_teacher_change.title)," ")}}function pi(e,o){e&1&&I(0,ci,2,3,"ng-template",7)}function di(e,o){if(e&1){let n=O();s(0,"div")(1,"math-multi-steps-loader",9),d(2,"translate"),C("success",function(){T(n);let i=p();return b(i.hideLoader())}),u(3,"math-loader-trustpilot-section"),c()()}if(e&2){let n=p(),t=B(2);re("margin-top",n.bestRecommendation()?t:0,"px"),a(),l("minProcessingTime",G(8,ri))("title",m(2,6,"teacher_search.loader.title"))("stepKeys",n.loaderSteps)("stopLoading",!n.isLoading())}}function mi(e,o){if(e&1&&A(0,16),e&2){p(2);let n=y(11);l("ngTemplateOutlet",n)}}function hi(e,o){e&1&&I(0,mi,1,1,"ng-template",10)}function ui(e,o){if(e&1&&(g(0),d(1,"translate")),e&2){let n=p(3);x(" ",m(1,1,n.i18n.filters)," ")}}function _i(e,o){if(e&1){let n=O();s(0,"div",11)(1,"h4",17),g(2),d(3,"translate"),c(),s(4,"div",18)(5,"button",19),C("click",function(){T(n);let i=p(2);return b(i.toggleFilters())}),u(6,"span",20),v(7,ui,2,3),c()()()}if(e&2){let n=p(2),t=B(0),i=B(2);a(2),x(" ",Q(3,5,n.i18n.teacher_search.title,se(8,li,n.studentSubject()))," "),a(2),l("nzGap",16),a(),re("margin-bottom",i,"px"),a(2),z(t?7:-1)}}function fi(e,o){if(e&1){let n=O();s(0,"div",12)(1,"math-teacher-card",21),C("selectTeacher",function(){T(n);let i=p(2);return b(i.onSelectTeacher(i.bestRecommendation()))})("cardClicked",function(){T(n);let i=p(2);return b(i.onClickTeacherCard(i.bestRecommendation().id))}),c()()}if(e&2){p();let n=y(4),t=p(),i=B(2);l("nzGap",i)("nzAlign","center"),a(),l("isBestRecommendation",!0)("descriptionLimit",240)("usePlainAvatar",!0)("disableSelectButton",!!t.bestRecommendation().notMatched.length)("teacher",t.bestRecommendation())("selectedSubject",t.studentSubject())("actionsTmp",n)}}function gi(e,o){if(e&1){let n=O();s(0,"button",22),C("click",function(){let i=T(n).$implicit,r=p(2);return b(r.showSchedule(i.id))}),u(1,"span",23),c()}}function Ci(e,o){if(e&1){let n=O();s(0,"math-teacher-card",26),C("selectTeacher",function(){let i=T(n).$implicit,r=p(3);return b(r.onSelectTeacher(i))})("cardClicked",function(){let i=T(n).$implicit,r=p(3);return b(r.onClickTeacherCard(i.id))}),c()}if(e&2){let n=o.$implicit;p(2);let t=y(4),i=p();l("teacher",n)("selectedSubject",i.studentSubject())("actionsTmp",t)("usePlainAvatar",!0)("disableSelectButton",!!i.bestRecommendation().notMatched.length)}}function Si(e,o){if(e&1&&A(0,16),e&2){p(2);let n=y(17);l("ngTemplateOutlet",n)}}function vi(e,o){if(e&1&&(s(0,"div",13)(1,"div",24),k(2,Ci,1,5,"math-teacher-card",25,si),v(4,Si,1,1,"ng-container",16),c()()),e&2){let n=p(2),t=B(2);a(),l("nzGap",t),a(),M(n.teachers()),a(2),z(n.hasMore()?-1:4)}}function zi(e,o){if(e&1&&(s(0,"div"),A(1,16),c()),e&2){p();let n=y(17);p();let t=B(2);re("margin-top",t,"px"),a(),l("ngTemplateOutlet",n)}}function xi(e,o){if(e&1&&(s(0,"div",14),A(1,16),c()),e&2){p();let n=y(19);a(),l("ngTemplateOutlet",n)}}function Ti(e,o){e&1&&(u(0,"img",28),g(1," \xA0 "))}function bi(e,o){if(e&1){let n=O();s(0,"div",15)(1,"button",27),C("click",function(){T(n);let i=p(2);return b(i.onFindMoreTeachers())}),v(2,Ti,2,0),g(3),d(4,"translate"),c()()}if(e&2){let n=p(2),t=B(0);l("nzJustify","center"),a(),l("nzBlock",!t)("disabled",n.isLoadingMore())("nzLoading",n.isLoadingMore()),a(),z(n.isLoadingMore()?-1:2),a(),x(" ",m(4,6,"teacher_search.find-similar-teachers")," ")}}function yi(e,o){e&1&&(s(0,"div",14),u(1,"math-empty-state-card",29),d(2,"translate"),d(3,"translate"),c()),e&2&&(a(),l("title",m(2,4,"errors.something-went-wrong"))("image","/assets/images/empty-card/error.png")("description",m(3,6,"errors.try-reload"))("isBorderless",!0))}function wi(e,o){if(e&1){let n=O();s(0,"div",30)(1,"a",31),C("click",function(){T(n);let i=p(2);return b(i.toggleFilters())}),u(2,"span",32),c(),s(3,"div",33)(4,"h5",17),g(5),d(6,"translate"),c(),s(7,"math-regular-teacher-search-filters",34),C("applyFilters",function(i){T(n);let r=p(2);return b(r.onApplyFilters(i))}),c()()()}if(e&2){let n=p(2);a(5),$e(" ",m(6,4,"teacher_search.filters.title")," ",n.selectedInSearchTeacher()," "),a(2),l("isLoading",n.showLoader())("selectedInSearchTeacher",n.selectedInSearchTeacher())}}function ki(e,o){if(e&1){let n=O();s(0,"math-no-more-teachers",35),C("clickLink",function(){T(n);let i=p(2);return b(i.sendTaskToCrm())})("clickButton",function(){T(n);let i=p(2);return b(i.onSelectTeacher(i.bestRecommendation()))}),c()}}function Mi(e,o){e&1&&(u(0,"math-empty-state-card",36),d(1,"translate"),d(2,"translate")),e&2&&l("title",m(1,3,"teacher_search.empty-state.title-sent-task"))("image","/assets/images/informers/heart-in-hands.png")("description",m(2,5,"teacher_search.empty-state.description-sent-task"))}function Di(e,o){if(e&1&&A(0,16),e&2){p(2);let n=y(15);l("ngTemplateOutlet",n)}}function Oi(e,o){if(e&1&&A(0,16),e&2){p(2);let n=y(13);l("ngTemplateOutlet",n)}}function Pi(e,o){if(e&1&&v(0,Di,1,1,"ng-container",16)(1,Oi,1,1,"ng-container",16),e&2){let n=p(2);z(n.helpRequestSent()?0:1)}}function Ni(e,o){if(e&1&&A(0,16),e&2){p(2);let n=y(15);l("ngTemplateOutlet",n)}}function Fi(e,o){if(e&1&&(u(0,"math-empty-state-card",37),d(1,"translate"),d(2,"translate")),e&2){p(2);let n=y(21);l("title",m(1,4,"teacher_search.empty-state.title"))("image","/assets/images/empty-card/conducted-lessons.png")("description",m(2,6,"teacher_search.empty-state.description"))("button",n)}}
1function Bi(e,o){if(e&1&&v(0,Ni,1,1,"ng-container",16)(1,Fi,3,8,"math-empty-state-card",37),e&2){let n=p(2);z(n.helpRequestSent()?0:1)}}function Li(e,o){if(e&1){let n=O();s(0,"button",38),C("click",function(){T(n);let i=p(2);return b(i.sendTaskToCrm())}),g(1),d(2,"translate"),c()}e&2&&(a(),x(" ",m(2,1,"teacher_search.empty-state.btn-text")," "))}function Ii(e,o){if(e&1&&(v(0,hi,1,0,null,10),v(1,_i,8,10,"div",11),v(2,fi,2,9,"div",12),I(3,gi,2,0,"ng-template",null,0,P),v(5,vi,5,2,"div",13)(6,zi,2,3,"div",8)(7,xi,2,1,"div",14),v(8,bi,5,8,"div",15),v(9,yi,4,8,"div",14),I(10,wi,8,6,"ng-template",null,1,P)(12,ki,1,0,"ng-template",null,2,P)(14,Mi,3,7,"ng-template",null,3,P)(16,Pi,2,1,"ng-template",null,4,P)(18,Bi,2,1,"ng-template",null,5,P)(20,Li,3,3,"ng-template",null,6,P)),e&2){let n=p(),t=B(0),i=!n.showLoader()||n.bestRecommendation(),r=i&&n.showFilters();z(t&&r?0:-1),a(),z(i?1:-1),a(),z(n.bestRecommendation()?2:-1),a(3),z(n.teachers().length?5:(n.teachers().length||n.bestRecommendation())&&!n.hasMore()?6:!n.showLoader()&&!n.teachers().length&&!n.errorLoadingTeachers()&&!n.bestRecommendation()?7:-1),a(3),z(n.hasMore()&&!n.showLoader()&&n.bestRecommendation()?8:-1),a(),z(n.errorLoadingTeachers()?9:-1)}}var ar=(()=>{let o=class o{constructor(){this.i18n=q,this.responsiveService=_(be),this.modalService=_(Se),this.destroyRef=_(J),this.activatedRoute=_(de),this.teachersApiService=_(Et),this.studentsApiService=_(ye),this.translateService=_(Y),this.router=_(nt),this.regularTeacherChangeService=_(mn),this.searchService=_(pn),this.queryParamsControlService=_(dn),this.loaderSteps=rn,this.isMd$=this.responsiveService.isMd$,this.showFilters=f(!1),this.helpRequestSent=f(!1),this.firstLoaderFinished=f(!1),this.selectedInSearchTeacher=H(()=>{let{teacherId:t}=this.queryParamsControlService.getFilterParams(),i=this.bestRecommendation();return t?`${i?.firstName} ${i?.lastName}`:null}),this.showLoader=H(()=>this.searchService.isLoading()||!this.firstLoaderFinished()),this.isLoading=this.searchService.isLoading,this.isLoadingMore=this.searchService.isLoadingMore,this.hasMore=this.searchService.hasMore,this.errorLoadingTeachers=f(!1),this.bestRecommendation=this.searchService.bestRecommendation,this.teachers=this.searchService.teachers,this.studentSubject=f(null)}ngOnInit(){this.saveStudentIdAndOldTeacherId(),this.queryParamsControlService.syncFiltersWithUrlParams(),this.loadStudentSubject(),this.loadTeachers()}loadStudentSubject(){this.studentsApiService.getTeacherSearchFilters(this.studentId).pipe(F(this.destroyRef)).subscribe(t=>this.studentSubject.set(t.subject??null))}saveStudentIdAndOldTeacherId(){this.studentId=this.activatedRoute.snapshot.params.studentId,this.oldTeacherId=this.activatedRoute.snapshot.queryParams.oldTeacherId}loadTeachers(){let t=this.queryParamsControlService.getFilterParams();this.searchService.searchForReplacementRegular(Fe(ae({},t),{pageNumber:1,pageSize:10}),this.studentId)}onSelectTeacher(t){let{floatingSchedule:i,stableSchedule:r,timezone:h,lessonLength:S}=this.queryParamsControlService.getFilterParams();this.regularTeacherChangeService.selectTeacher(this.studentId,this.oldTeacherId,t,i,r,h,S)}onClickTeacherCard(t){this.router.navigate(["./",t],{relativeTo:this.activatedRoute,queryParamsHandling:"merge"})}showSchedule(t){this.modalService.create({nzWidth:1060,nzData:{teacherId:t},nzTitle:this.translateService.instant(q.regular_teacher_change.schedule_modal.title),nzContent:vn,nzFooter:null})}toggleFilters(){this.showFilters.update(t=>!t)}onFindMoreTeachers(){this.searchService.loadMoreTeachers()}hideLoader(){this.firstLoaderFinished.set(!0)}onApplyFilters(t){this.queryParamsControlService.updateQueryParams(t),this.loadTeachers(),this.showFilters.set(!1)}sendTaskToCrm(){this.regularTeacherChangeService.sendRegularTeacherChangeNeedHelp(this.studentId,this.oldTeacherId).pipe(F(this.destroyRef)).subscribe(()=>this.helpRequestSent.set(!0))}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=w({type:o,selectors:[["math-search"]],decls:6,vars:7,consts:[["actionsTmp",""],["filtersTmp",""],["noMoreTeachersTmp",""],["helpRequestSentTmp",""],["noMoreTeachersBlockTmp",""],["emptyStateTmp",""],["buttonTmp",""],["mathHeaderTitle",""],[3,"margin-top"],[3,"success","minProcessingTime","title","stepKeys","stopLoading"],["mathSubheader",""],["nz-flex","","nzJustify","space-between"],["nz-flex","","nzVertical","",3,"nzGap","nzAlign"],[1,"self-search"],[1,"empty-state"],["nz-flex","",3,"nzJustify"],[3,"ngTemplateOutlet"],["nz-typography",""],["nz-flex","",3,"nzGap"],["nz-button","","nzType","primary","nzGhost","",1,"filters-button",3,"click"],["nz-icon","","nzType","sliders"],[3,"selectTeacher","cardClicked","isBestRecommendation","descriptionLimit","usePlainAvatar","disableSelectButton","teacher","selectedSubject","actionsTmp"],["nz-button","",3,"click"],["nz-icon","","nzType","calendar"],["nz-flex","","nzAlign","center","nzVertical","",3,"nzGap"],[3,"teacher","selectedSubject","actionsTmp","usePlainAvatar","disableSelectButton"],[3,"selectTeacher","cardClicked","teacher","selectedSubject","actionsTmp","usePlainAvatar","disableSelectButton"],["nz-button","","nzType","primary","nzGhost","",1,"self-search-btn",3,"click","nzBlock","disabled","nzLoading"],["src","assets/icons/stars.svg","alt","search"],[3,"title","image","description","isBorderless"],[1,"filters-container"],["nz-button","","nzType","text",1,"close-filters-button",3,"click"],["nz-icon","","nzType","close","nzTheme","outline"],[1,"filters-wrapper"],[3,"applyFilters","isLoading","selectedInSearchTeacher"],[3,"clickLink","clickButton"],[3,"title","image","description"],[3,"title","image","description","button"],["nz-button","","nzType","primary","nzGhost","",3,"click"]],template:function(i,r){if(i&1&&(K(0),d(1,"async"),K(2),v(3,pi,1,0,null,7),v(4,di,4,9,"div",8),v(5,Ii,22,6)),i&2){let h=oe(m(1,3,r.isMd$));a(2),oe(16),a(),z(h?3:-1),a(),z(r.showLoader()?4:-1),a(),z(r.showLoader()?-1:5)}},dependencies:[nn,on,W,j,an,en,tn,ln,Qe,It,Dt,V,gn,R,pe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:1075px;margin:0 auto}.self-search[_ngcontent-%COMP%]{margin-top:23px}
1.self-search[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:22px;line-height:1}@media(min-width:768px){.self-search[_ngcontent-%COMP%]{margin-top:28px}.self-search[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:23px}}.self-search-btn[_ngcontent-%COMP%]{margin-top:12px;background-color:var(--math-surface)}@media(max-width:575px){.self-search-btn[_ngcontent-%COMP%]{white-space:break-spaces;word-wrap:break-word;height:auto}}@media(min-width:768px){.self-search-btn[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px;background-color:transparent}}math-info-block[_ngcontent-%COMP%]     .icon{align-self:center}math-teacher-card[_ngcontent-%COMP%]{cursor:pointer}math-teacher-card[_ngcontent-%COMP%]:hover{border-color:var(--math-blue-6);transition:.3s}math-empty-state-card[_ngcontent-%COMP%]{width:100%}.empty-state[_ngcontent-%COMP%]{border-radius:8px;background-color:var(--math-surface);overflow:hidden}.filters-container[_ngcontent-%COMP%]{position:relative;width:100%;padding:14px 0 17px}.close-filters-button[_ngcontent-%COMP%]{position:absolute;top:14px;right:0}.filters-wrapper[_ngcontent-%COMP%]{max-width:1075px;margin:0 auto}"],changeDetection:0});let e=o;return e})();export{ar as SearchComponent};

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.