diff --git a/public/apps/webapp-schulverwaltung/README.md b/public/apps/webapp-schulverwaltung/README.md index 3be33c92..4225c8c6 100644 --- a/public/apps/webapp-schulverwaltung/README.md +++ b/public/apps/webapp-schulverwaltung/README.md @@ -31,3 +31,4 @@ Although it can be used standalone during development, the _webapp-schulverwaltu - [Internationalization (i18n)](doc/i18n.md) – Translating texts - [Browser Testing](doc/browser-testing.md) – Support & BrowserStack.com - [Data Decoding with io-ts](doc/io-ts.md) – API data contract +- [Reactivity](doc/reactivity.md) – Dos and don'ts when using signals & observables diff --git a/public/apps/webapp-schulverwaltung/assets/locales/de-CH.json b/public/apps/webapp-schulverwaltung/assets/locales/de-CH.json index cea45315..a433fd51 100644 --- a/public/apps/webapp-schulverwaltung/assets/locales/de-CH.json +++ b/public/apps/webapp-schulverwaltung/assets/locales/de-CH.json @@ -263,6 +263,9 @@ "header": { "name": "Name" } + }, + "study-course-detail": { + "status": "Status" } }, "courses": { diff --git a/public/apps/webapp-schulverwaltung/assets/locales/fr-CH.json b/public/apps/webapp-schulverwaltung/assets/locales/fr-CH.json index 0878cdad..9dac00f2 100644 --- a/public/apps/webapp-schulverwaltung/assets/locales/fr-CH.json +++ b/public/apps/webapp-schulverwaltung/assets/locales/fr-CH.json @@ -263,6 +263,9 @@ "header": { "name": "Nom" } + }, + "study-course-detail": { + "status": "Statut" } }, "courses": { diff --git a/public/apps/webapp-schulverwaltung/chunk-2FW5UFUO.js b/public/apps/webapp-schulverwaltung/chunk-2FW5UFUO.js new file mode 100644 index 00000000..b1a42a48 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-2FW5UFUO.js @@ -0,0 +1,2 @@ +import{a as ct}from"./chunk-LHXVMKYN.js";import{a as lt,b as pt}from"./chunk-QB4DIFWS.js";import{a as Vi}from"./chunk-RTY26FN4.js";import{a as It}from"./chunk-3HCVMNJA.js";import{e as Ai}from"./chunk-5WNFCBTP.js";import{a as wt,b as ki,c as Pi,d as Mi,e as Oi,f as st,g as at,h as $i,i as Gi,j as Li,k as Di,l as Fi,m as Be,o as Ri,p as he,r as je,s as Bi,u as ji,v as dt}from"./chunk-A3CECLYB.js";import{e as xi}from"./chunk-746ASKQ4.js";import{b as rt}from"./chunk-DTTSX64G.js";import{a as yi}from"./chunk-Y4QYVF5K.js";import{a as Hi}from"./chunk-BIDSHCYH.js";import{a as mt,c as Ni}from"./chunk-4RZQAAPF.js";import{a as wi,b as Ii}from"./chunk-Z4YBXGVO.js";import{a as bi,d as ot}from"./chunk-3L4RH6QP.js";import{a as Ti,d as Ei}from"./chunk-DTYYCJHM.js";import{L as Si,U as Ae,p as _i}from"./chunk-SRCW6BUG.js";import{a as Re,c as Ci,l as xe}from"./chunk-GOGVGWFJ.js";import{a as nt,b as be}from"./chunk-OSOXMODN.js";import{a as it,b as ue}from"./chunk-PSYDBHTH.js";import{a as ei,b as re,h as pi,i as ci,k as mi,l as ui,r as et,w as me}from"./chunk-W4U7QKJF.js";import{a as tt}from"./chunk-AVBHFGIF.js";import{$ as Vt,$a as a,$b as pe,Ab as R,Ad as De,B as Ft,Bb as A,Bd as li,C as Rt,Cb as O,D as Bt,Db as ie,Ea as bt,Eb as Oe,F as ae,Fa as Pe,Fb as D,Ga as C,Gb as Et,H as Z,Hd as hi,Ia as Yt,Id as gi,J as qe,Ja as Kt,Jb as l,K as jt,Kb as c,Kd as fi,Lb as F,M as Q,Md as vi,Na as T,O as At,Ob as Xt,Od as se,P as M,Pd as I,Qa as m,R as Ce,Ra as de,Rd as Fe,Sb as W,Tb as Jt,Va as y,X as oe,Xa as Me,Ya as V,Za as H,_ as $,_a as s,a as L,ab as x,b as B,ba as Ht,ca as Nt,cc as Y,cd as ce,da as ke,dc as $e,ea as E,eb as G,f as te,fa as w,fd as Ke,g as q,gb as b,h as xt,ha as Ut,hb as u,hd as Le,ib as Zt,id as Ze,jb as Qt,jd as ti,ka as Wt,kb as le,l as N,lb as Tt,lc as Ye,m as Dt,ma as J,md as ii,n as _,nd as ni,o as U,od as Qe,pa as zt,pd as ri,qa as j,qb as Se,ra as qt,rb as p,rd as si,sb as f,sd as ai,tb as v,ub as Ne,w as ze,wa as _e,wc as ne,wd as Xe,x as fe,xa as r,xb as Ee,xc as ye,xd as Je,ya as S,yb as we,yc as Ge,yd as oi,zb as Ie,zc as X,zd as di}from"./chunk-2W7IS4PN.js";var zn=t=>[t,"tests"];function qn(t,o){if(t&1&&(s(0,"span"),p(1),l(2,"date"),x(3,"wbr"),p(4),l(5,"date"),a()),t&2){let e=u();r(),v("",F(2,2,e.event().dateFrom,"dd.MM.yyyy"),"\u2013"),r(3),f(F(5,5,e.event().dateTo,"dd.MM.yyyy"))}}function Yn(t,o){if(t&1&&(s(0,"a",6)(1,"i",7),p(2,"arrow_right_alt"),a(),s(3,"span",8),p(4),a()()),t&2){let e=u(2);m("routerLink",D(2,zn,e.event().id)),r(4),f(e.event().evaluationText)}}function Kn(t,o){if(t&1&&(s(0,"a",6)(1,"i",7),p(2,"arrow_right_alt"),a(),s(3,"span",8),p(4),a()()),t&2){let e=u(2);m("routerLink",e.event().evaluationLink),r(4),v("",e.event().evaluationText," ")}}function Zn(t,o){if(t&1&&(s(0,"div",5),T(1,Yn,5,4,"a",6)(2,Kn,5,2,"a",6),a()),t&2){let e=u();r(),y(e.event().evaluationLink?-1:1),r(),y(e.event().evaluationLink?2:-1)}}var Ui=(()=>{class t{constructor(){this.event=j.required(),this.withRatings=j(!0),this.link=W(()=>Ei(this.event().detailLink))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-list-entry"]],inputs:{event:[1,"event"],withRatings:[1,"withRatings"]},decls:11,vars:9,consts:[[1,"designation"],[3,"routerLink","queryParams"],[1,"date"],[1,"registrations"],[1,"registrations-label"],[1,"rating"],[1,"d-flex",3,"routerLink"],[1,"material-icons"],[1,"ps-1"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"a",1),p(2),a()(),s(3,"div",2),T(4,qn,6,8,"span"),a(),s(5,"div",3),p(6),s(7,"span",4),p(8),l(9,"translate"),a()(),T(10,Zn,3,2,"div",5)),i&2&&(r(),m("routerLink",n.link().link)("queryParams",n.link().params),r(),f(n.event().designation),r(2),y(n.event().dateFrom&&n.event().dateTo?4:-1),r(2),v(" ",n.event().studentCount," "),r(2),f(c(9,7,n.event().studentCount===1?"events.registration":"events.registrations")),r(2),y(n.withRatings()&&n.event().evaluationText?10:-1))},dependencies:[X,$e,I],styles:['[_nghost-%COMP%]{display:grid;padding:1rem;border-bottom:1px solid #dee2e6;grid-template-areas:"designation date registrations rating";grid-template-columns:4fr 2fr 2fr 3fr}.designation[_ngcontent-%COMP%]{grid-area:designation;padding-right:1rem}.date[_ngcontent-%COMP%]{grid-area:date;padding-right:1rem}.registrations[_ngcontent-%COMP%]{grid-area:registrations;padding-right:1rem}.rating[_ngcontent-%COMP%]{grid-area:rating}.rating[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.rating[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.rating[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.registrations-label[_ngcontent-%COMP%]{display:none}@media (max-width: 575.98px){.registrations-label[_ngcontent-%COMP%]{display:inline}.designation[_ngcontent-%COMP%], .date[_ngcontent-%COMP%], .registrations[_ngcontent-%COMP%]{padding-right:0}[_nghost-%COMP%]{grid-template-areas:"designation" "date" "registrations" "rating";grid-template-columns:1fr}}']})}}return t})();var Qn=10300,Xn=10260,Jn=10250,er=14030,tr=10350;function ut(t){let{HasEvaluationStarted:o,EvaluationUntil:e,HasTestGrading:i}=t.EvaluationStatusRef;if(o===!0&&(t.StatusId===er||t.StatusId===tr))return{value:ee.Rating};if(o===!0&&i===!1){if(e)return{value:ee.RatingUntil};if(t.StatusId===Qn)return{value:ee.IntermediateRating}}return o===!1&&i===!0&&t.StatusId!==Xn&&t.StatusId!==Jn?{value:ee.Tests}:o===!0&&i===!0?e?{value:ee.Tests,label:ee.RatingUntil}:{value:ee.Tests,label:ee.IntermediateRating}:null}function Wi(t){return t.EvaluationStatusRef.HasEvaluationStarted===!0}function zi(t){return t.EvaluationStatusRef.HasReviewOfEvaluationStarted===!0&&!!t.FinalGrades?.length}function ht(t){let o=t.Classes?t.Classes.map(e=>e.Number).join(", "):null;return o?t.Designation+", "+o:t.Designation}function qi(t,o){return t?(o.Leadership??"").split(",").some(e=>e.trim()===t.fullname):!1}function Yi(t,o){let e=new URLSearchParams({returnlink:o});return o.startsWith("/dashboard")?`/dashboard/students/${t}?${e}`:o.startsWith("/events/current")?`/events/current/${t}?${e}`:`/events/${t}/students?${e}`}function Ki(t){let o=t.ParticipatingStudents?.map(e=>({id:e.Id,name:e.FullName,email:e.DisplayEmail??void 0}))??[];return{eventId:t.Id,eventDesignation:t.Designation,studyClasses:(t.Classes??[]).map(e=>e.Designation).sort(),entries:o}}function kt(t,o){return B(L({},t),{entries:t.entries.map(e=>{let i=o.find(d=>d.StudentId===e.id),n=i?[i.CompanyName,i.CompanyNameAddition].filter(Boolean).join(" \u2013 "):void 0;return B(L({},e),{company:n})})})}function Pt(t,o,e,{emailFallback:i}={}){return{eventId:t,eventDesignation:e[0]?.EventDesignation??"",studyClasses:[],entries:o.map(n=>({id:n.Id,subscriptionId:e.find(d=>d.PersonId===n.Id)?.Id,name:n.FullName,email:(i?n.DisplayEmail??n.Email:n.DisplayEmail)??void 0,status:e.find(d=>d.PersonId===n.Id)?.Status}))}}function Zi(t,o){return B(L({},t),{entries:t.entries.map(e=>B(L({},e),{studyClass:o.find(i=>i.StudentRef.Id===e.id)?.StudyClassNumber}))})}var ee=function(t){return t.Rating="rating",t.RatingUntil="rating-until",t.IntermediateRating="intermediate-rating",t.Tests="add-tests",t}(ee||{}),He=(()=>{class t{constructor(e,i,n,d,h,g,k,z,ge){this.coursesRestService=e,this.eventsRestService=i,this.studyClassRestService=n,this.subscriptionsRestService=d,this.loadingService=h,this.storageService=g,this.translate=k,this.router=z,this.settings=ge,this.loading$=this.loadingService.loading$,this.searchFields$=new q(["designation"]),this.searchSubject$=new q(""),this.search$=this.searchSubject$.asObservable(),this.roles$=new q(null),this.isClassTeacher$=this.roles$.pipe(_(ve=>yi(ve,"ClassTeacherRole")),Q(1)),this.withStudyCourses$=new q(!1),this.unratedCourses$=this.roles$.pipe(M(this.loadUnratedCourses.bind(this)),Q(1)),this.studyCourses$=this.withStudyCourses$.pipe(M(this.loadStudyCourses.bind(this)),Q(1)),this.formativeAssessments$=this.isClassTeacher$.pipe(M(this.loadFormativeAssessments.bind(this)),Q(1)),this.studyClasses$=this.isClassTeacher$.pipe(M(this.loadStudyClasses.bind(this)),Q(1)),this.events$=this.getEvents().pipe(Q(1)),this.filteredEvents$=U([this.events$,this.searchFields$,this.search$]).pipe(_(xe(pt)))}setSearch(e){this.searchSubject$.next(e)}setRoles(e){this.roles$.next(e)}setWithStudyCourses(e){this.withStudyCourses$.next(e)}setSearchFields(e){this.searchFields$.next(e)}getEntries(e=!1){return this.filteredEvents$.pipe(_(i=>e?i.filter(n=>n.evaluationText):i))}getEvents(){return this.loadingService.load(U([this.unratedCourses$,this.studyCourses$,this.formativeAssessments$,this.studyClasses$]),{stopOnFirstValue:!0}).pipe(_(xe(this.createAndSortEvents.bind(this))))}loadUnratedCourses(e){return this.coursesRestService.getExpandedCourses(e).pipe(_(i=>i.filter(n=>!zi(n))))}loadStudyCourses(e){if(!e)return N([]);let i=this.storageService.getPayload();return this.eventsRestService.getStudyCourseEvents().pipe(_(n=>n.filter(d=>qi(i,d))),M(n=>this.subscriptionsRestService.getSubscriptionCountsByEvents(n.map(d=>d.Id)).pipe(_(d=>n.map(h=>B(L({},h),{StudentCount:d[h.Id]??0}))))))}loadFormativeAssessments(e){return e?this.studyClassRestService.getActiveFormativeAssessments():N([])}loadStudyClasses(e){return e?this.studyClassRestService.getActive():N([])}createAndSortEvents(e,i,n,d){let h=d.filter(g=>!n.map(k=>k.Id).includes(g.Id));return[...this.createFromCourses(e),...this.createFromStudyCourses(i),...this.createFromAssessments(n),...this.createFromStudyClasses(h)].sort((g,k)=>g.designation.localeCompare(k.designation))}createFromCourses(e){return e.map(i=>{let n=ut(i);return{id:i.Id,designation:ht(i),detailLink:this.buildStudentsLink(i.Id),studentCount:i.AttendanceRef.StudentCount||0,dateFrom:i.DateFrom,dateTo:i.DateTo,state:n?.value||null,evaluationText:this.getEvaluationText(n,i.EvaluationStatusRef.EvaluationUntil),evaluationLink:n?.value&&n?.value!==ee.Tests?this.buildEvaluationLink(i.Id):null}})}createFromStudyCourses(e){return e.map(i=>({id:i.Id,designation:i.Designation,detailLink:this.buildStudentsLink(i.Id),studentCount:i.StudentCount,state:null}))}createFromAssessments(e){return this.createFromStudyClasses(e).map(n=>B(L({},n),{state:ee.Rating,evaluationText:this.translate.instant("events.state.rating"),evaluationLink:this.buildEvaluationLink(n.id)}))}createFromStudyClasses(e){return e.map(i=>({id:i.Id,designation:i.Number,detailLink:this.buildStudentsLink(i.Id),studentCount:i.StudentCount,state:null}))}getEvaluationText(e,i){let n=e?.label||e?.value;return n?this.translate.instant(`events.state.${n}`)+(n===ee.RatingUntil?` ${i?_i(i,"dd.MM.yyyy"):""}`:""):""}buildStudentsLink(e){return Yi(e,this.router.url)}buildEvaluationLink(e){return(this.settings.eventlist.evaluation??"").replace(":id",String(e))}static{this.\u0275fac=function(i){return new(i||t)($(he),$(ct),$(Vi),$(je),$(be),$(Fe),$(se),$(Ge),$(ce))}}static{this.\u0275prov=oe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var rr=(t,o)=>o.id,sr=()=>[];function ar(t,o){t&1&&x(0,"bkd-spinner")}function or(t,o){t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2&&(r(),v(" ",c(2,1,"events.rating")," "))}function dr(t,o){if(t&1&&x(0,"bkd-events-list-entry",8),t&2){let e=o.$implicit,i=u(3);m("event",e)("withRatings",i.withRatings)}}function lr(t,o){if(t&1&&(s(0,"div",3)(1,"div",4),p(2),l(3,"translate"),a(),s(4,"div",5),p(5),l(6,"translate"),a(),s(7,"div",6),p(8),l(9,"translate"),a(),T(10,or,3,3,"div",7),a(),V(11,dr,1,2,"bkd-events-list-entry",8,rr)),t&2){let e=u(2),i=O(0);r(2),f(c(3,4,"events.designation")),r(3),f(c(6,6,"events.date")),r(3),v(" ",c(9,8,"events.registrations")," "),r(2),y(e.withRatings?10:-1),r(),H(i)}}function pr(t,o){t&1&&(s(0,"p",2),p(1),l(2,"translate"),a()),t&2&&(r(),f(c(2,1,"events.no-events")))}function cr(t,o){if(t&1&&T(0,lr,13,10)(1,pr,3,3,"p",2),t&2){u();let e=O(0);y(e.length>0?0:1)}}var Ji=["designation"],mr=[...Ji,"evaluationText"],ft=(()=>{class t{constructor(e,i){this.state=e,this.storage=i,this.withStudyCourses=!1,this.withRatings=!0,this.state.setRoles(this.storage.getPayload()?.roles??null)}ngOnChanges(e){e.withStudyCourses&&this.state.setWithStudyCourses(e.withStudyCourses.currentValue),e.withRatings&&this.state.setSearchFields(e.withRatings.currentValue?mr:Ji)}static{this.\u0275fac=function(i){return new(i||t)(S(He),S(Fe))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-list"]],inputs:{withStudyCourses:"withStudyCourses",withRatings:"withRatings"},features:[ke],decls:10,vars:17,consts:[[1,"bkd-container"],[1,"d-flex","search",3,"valueChange","value","placeholder","label","disabled"],[1,"mt-3"],[1,"event-header"],[1,"designation"],[1,"date"],[1,"registrations"],[1,"rating"],[3,"event","withRatings"]],template:function(i,n){if(i&1){let d=G();R(0),l(1,"async"),s(2,"div",0)(3,"bkd-resettable-input",1),l(4,"async"),l(5,"translate"),l(6,"translate"),b("valueChange",function(g){return E(d),w(n.state.setSearch(g))}),a(),T(7,ar,1,0,"bkd-spinner"),l(8,"async"),T(9,cr,2,1),a()}if(i&2){let d,h=A((d=c(1,5,n.state.getEntries(n.withRatings)))!==null&&d!==void 0?d:Oe(16,sr));r(3),m("value",c(4,8,n.state.search$))("placeholder",c(5,10,"events.search-by"))("label",c(6,12,"events.search"))("disabled",!h),r(4),y(c(8,14,n.state.loading$)?7:9)}},dependencies:[lt,ue,Y,I,Ui],styles:['.search[_ngcontent-%COMP%]{max-width:500px}.event-header[_ngcontent-%COMP%]{display:grid;padding:1rem;border-bottom:2px solid #dee2e6;grid-template-areas:"designation date registrations rating";grid-template-columns:4fr 2fr 2fr 3fr}@media (max-width: 575.98px){.event-header[_ngcontent-%COMP%]{display:none}}']})}}return t})();var en=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-current-list"]],decls:4,vars:5,consts:[[3,"withStudyCourses","withRatings"]],template:function(i,n){i&1&&(s(0,"h1"),p(1),l(2,"translate"),a(),x(3,"bkd-events-list",0)),i&2&&(r(),f(c(2,3,"events.current.title")),r(2),m("withStudyCourses",!0)("withRatings",!1))},dependencies:[ft,I],encapsulation:2,changeDetection:0})}}return t})();var tn=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-current"]],decls:1,vars:0,template:function(i,n){i&1&&x(0,"router-outlet")},dependencies:[ye],encapsulation:2})}}return t})();var nn=(()=>{class t{constructor(){this.entry=j.required(),this.multipleStudyClasses=j(!1),this.returnLink=j(null),this.link=W(()=>["student",this.entry().id,"addresses"]),this.linkParams=W(()=>{let e=this.returnLink();return e?{returnparams:new URLSearchParams({returnlink:e}).toString()}:{}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-course-entry"]],inputs:{entry:[1,"entry"],multipleStudyClasses:[1,"multipleStudyClasses"],returnLink:[1,"returnLink"]},decls:7,vars:10,consts:[[1,"avatar","large",3,"studentId","link","linkParams"],[1,"name",3,"title","routerLink","queryParams"],[1,"study-class"],[1,"company",3,"title"]],template:function(i,n){i&1&&(x(0,"bkd-avatar",0),s(1,"a",1),p(2),a(),s(3,"div",2),p(4),a(),s(5,"div",3),p(6),a()),i&2&&(m("studentId",n.entry().id)("link",n.link())("linkParams",n.linkParams()),r(),m("title",n.entry().name)("routerLink",n.link())("queryParams",n.linkParams()),r(),f(n.entry().name),r(2),v(" ",n.multipleStudyClasses()?n.entry().studyClass:"",` +`),r(),m("title",n.entry().company),r(),f(n.entry().company))},dependencies:[X,Ai],styles:['[_nghost-%COMP%]{display:grid;grid-template-columns:min-content 1fr;grid-template-rows:min-content min-content 1fr;grid-template-areas:"avatar name" "avatar study-class" "avatar company";padding:2rem 1rem}.avatar[_ngcontent-%COMP%]{grid-area:avatar;margin-right:1.5rem}.name[_ngcontent-%COMP%]{grid-area:name}.study-class[_ngcontent-%COMP%]{grid-area:study-class;font-size:.875rem}.company[_ngcontent-%COMP%]{grid-area:company;align-content:end;padding-bottom:1.5rem}.name[_ngcontent-%COMP%], .company[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}'],changeDetection:0})}}return t})();var ur=t=>({count:t});function hr(t,o){if(t&1&&(s(0,"div",0),p(1),l(2,"translate"),a()),t&2){u();let e=O(2);r(),v(" ",F(2,1,e===1?"events-students.registration":"events-students.registrations",D(4,ur,e))," ")}}var vt=(()=>{class t{constructor(){this.title=j.required(),this.count=j(null),this.searchTerm=Pe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-header"]],inputs:{title:[1,"title"],count:[1,"count"],searchTerm:[1,"searchTerm"]},outputs:{searchTerm:"searchTermChange"},decls:7,vars:10,consts:[[1,"additional-info"],[1,"search",3,"valueChange","value","placeholder","label"]],template:function(i,n){if(i&1){let d=G();s(0,"h1"),p(1),a(),R(2),T(3,hr,3,6,"div",0),s(4,"bkd-resettable-input",1),l(5,"translate"),l(6,"translate"),b("valueChange",function(g){return E(d),w(n.searchTerm.set(g))}),a()}if(i&2){r(),f(n.title()),r();let d=A(n.count());r(),y(d!==null?3:-1),r(),m("value",n.searchTerm())("placeholder",c(5,6,"events-students.search-placeholder"))("label",c(6,8,"events-students.search"))}},dependencies:[I,lt],styles:["h1[_ngcontent-%COMP%]{margin-bottom:0}.search[_ngcontent-%COMP%]{margin-top:1rem;display:flex;max-width:300px}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}"],changeDetection:0})}}return t})();var gr=(t,o)=>o.id;function fr(t,o){t&1&&(s(0,"p"),p(1),l(2,"translate"),a()),t&2&&(r(),f(c(2,1,"events-students.no-entries")))}function vr(t,o){if(t&1&&x(0,"bkd-events-students-course-entry",2),t&2){let e=o.$implicit,i=u();m("entry",e)("multipleStudyClasses",i.multipleStudyClasses())("returnLink",i.returnLink())}}var rn=(()=>{class t{constructor(){this.title=j.required(),this.count=j.required(),this.entries=j.required(),this.multipleStudyClasses=j(!1),this.returnLink=j(null),this.searchTerm=Pe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-course-list"]],inputs:{title:[1,"title"],count:[1,"count"],entries:[1,"entries"],multipleStudyClasses:[1,"multipleStudyClasses"],returnLink:[1,"returnLink"],searchTerm:[1,"searchTerm"]},outputs:{searchTerm:"searchTermChange"},decls:5,vars:4,consts:[[3,"searchTermChange","title","count","searchTerm"],[1,"list"],[3,"entry","multipleStudyClasses","returnLink"]],template:function(i,n){i&1&&(s(0,"bkd-events-students-header",0),Ie("searchTermChange",function(h){return we(n.searchTerm,h)||(n.searchTerm=h),h}),a(),s(1,"section",1),T(2,fr,3,3,"p"),V(3,vr,1,3,"bkd-events-students-course-entry",2,gr),a()),i&2&&(m("title",n.title())("count",n.count()),Ee("searchTerm",n.searchTerm),r(2),y(n.entries().length===0?2:-1),r(),H(n.entries()))},dependencies:[I,vt,nn],styles:["[_nghost-%COMP%]{display:block;overflow:hidden}section.list[_ngcontent-%COMP%]{width:calc(100% + 1px);margin-top:1rem;display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr))}bkd-events-students-course-entry[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6;border-right:1px solid #dee2e6}"],changeDetection:0})}}return t})();var sn=(()=>{class t{constructor(){this.entry=j.required(),this.returnLink=j(null),this.link=W(()=>["study-course-student",this.entry().id]),this.linkParams=W(()=>{let e=this.returnLink();return e?{returnparams:new URLSearchParams({returnlink:e}).toString()}:{}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-study-course-entry"]],inputs:{entry:[1,"entry"],returnLink:[1,"returnLink"]},decls:4,vars:4,consts:[[1,"name",3,"routerLink","queryParams"],[1,"status"]],template:function(i,n){i&1&&(s(0,"a",0),p(1),a(),s(2,"div",1),p(3),a()),i&2&&(m("routerLink",n.link())("queryParams",n.linkParams()),r(),f(n.entry().name),r(2),f(n.entry().status))},dependencies:[X],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;align-items:stretch;border-bottom:1px solid #dee2e6}.name[_ngcontent-%COMP%], .status[_ngcontent-%COMP%]{padding:1rem}.name[_ngcontent-%COMP%]{flex:2;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.status[_ngcontent-%COMP%]{flex:1;padding-left:0}@media (max-width: 750px){[_nghost-%COMP%]{flex-direction:column}.name[_ngcontent-%COMP%]{padding-bottom:0}.status[_ngcontent-%COMP%]{padding-top:0;padding-left:1rem;font-size:.875rem}}"],changeDetection:0})}}return t})();var Cr=(t,o)=>o.id;function _r(t,o){if(t&1){let e=G();s(0,"div",2)(1,"div",4),b("click",function(){E(e);let n=u();return w(n.toggleSort.emit())}),p(2),l(3,"translate"),s(4,"span",5),p(5),a()()()}if(t&2){let e=u();r(),m("className",e.primarySortKey),r(),v(" ",c(3,3,"events-students.list.header."+e.primarySortKey)," "),r(3),f(e.getSortDirectionCharacter(e.sortCriteria()))}}function Sr(t,o){t&1&&(s(0,"p"),p(1),l(2,"translate"),a()),t&2&&(r(),f(c(2,1,"events-students.no-entries")))}function yr(t,o){if(t&1&&x(0,"bkd-events-students-study-course-entry",3),t&2){let e=o.$implicit,i=u();m("entry",e)("returnLink",i.returnLink())}}var an=(()=>{class t{constructor(){this.title=j.required(),this.count=j.required(),this.entries=j.required(),this.returnLink=j(null),this.sortCriteria=j.required(),this.toggleSort=zt(),this.searchTerm=Pe(),this.primarySortKey="name"}getSortDirectionCharacter(e){return e.ascending?"\u2191":"\u2193"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-study-course-list"]],inputs:{title:[1,"title"],count:[1,"count"],entries:[1,"entries"],returnLink:[1,"returnLink"],sortCriteria:[1,"sortCriteria"],searchTerm:[1,"searchTerm"]},outputs:{toggleSort:"toggleSort",searchTerm:"searchTermChange"},features:[ie([])],decls:6,vars:4,consts:[[3,"searchTermChange","title","count","searchTerm"],[1,"list"],[1,"list-header"],[3,"entry","returnLink"],[1,"name",3,"click","className"],[1,"sort-direction"]],template:function(i,n){i&1&&(s(0,"bkd-events-students-header",0),Ie("searchTermChange",function(h){return we(n.searchTerm,h)||(n.searchTerm=h),h}),a(),s(1,"section",1),T(2,_r,6,5,"div",2)(3,Sr,3,3,"p"),V(4,yr,1,2,"bkd-events-students-study-course-entry",3,Cr),a()),i&2&&(m("title",n.title())("count",n.count()),Ee("searchTerm",n.searchTerm),r(2),y(n.entries().length>0?2:3),r(2),H(n.entries()))},dependencies:[I,vt,sn],styles:[".list-header[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;border-bottom:2px solid #dee2e6}.name[_ngcontent-%COMP%]{padding:1rem}"],changeDetection:0})}}return t})();function on(t,o,e){o||Nt(t);let i=o??Vt(Wt);return e?Ht(i,e):i}function We(t,o){let e=on(We,o?.injector),i;return W(()=>(i||(i=Jt(()=>re(t,B(L({},o),{injector:e})))),i()))}var dn=(()=>{class t extends it{constructor(e,i){super(e,i,wi,"ApprenticeshipContracts")}getCompaniesForStudents(e){let i=new Date,n={"filter.StudentId":`;${e.join(";")}`,"filter.ApprenticeshipDateFrom":`<${i.toISOString()}`,"filter.ApprenticeshipDateTo":`>${i.toISOString()}`,fields:"Id,StudentId,CompanyName,CompanyNameAddition"};return this.http.get(`${this.baseUrl}/`,{params:n}).pipe(M(vi(Ii)))}static{this.\u0275fac=function(i){return new(i||t)($(Ye),$(ce))}}static{this.\u0275prov=oe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ct=1;var ln=10,_t=(()=>{class t{constructor(e,i,n,d,h,g,k,z,ge){this.route=e,this.loadingService=i,this.eventsService=n,this.coursesService=d,this.subscriptionsService=h,this.personsService=g,this.apprenticeshipContractsService=k,this.lessonPresencesService=z,this.reportsService=ge,this.eventId$=U([this.route.paramMap,this.route.parent?.paramMap??N(null)]).pipe(_(([ve,Wn])=>Number(ve.get("id")||Wn?.get("id")))),this.eventTypeId$=this.eventId$.pipe(M(this.loadEventTypeId.bind(this))),this.eventTypeId=We(this.eventTypeId$,{initialValue:null}),this.studentEntries=We(this.loadStudentEntries(),{initialValue:null}),this.isStudyCourse=W(()=>this.eventTypeId()===Ct),this.loading=re(this.loadingService.loading(mt)),this.title=W(()=>this.getTitle(this.studentEntries())),this.multipleStudyClasses=W(()=>(this.studentEntries()?.studyClasses?.length??0)>1),this.searchTerm=bt(""),this.sortCriteria=bt({primarySortKey:"name",ascending:!0}),this.entries=W(()=>this.studentEntries()?.entries??[]),this.sortedEntries=W(()=>this.sortStudentEntries(this.entries(),this.sortCriteria())),this.filteredEntries=W(()=>pt(this.sortedEntries(),["name","status","company","studyClass"],this.searchTerm())),this.mailtoLink=W(()=>this.getMailtoLink(this.eventTypeId(),this.entries())),this.reports=We(U([this.eventId$,this.eventTypeId$.pipe(fe(me))]).pipe(M(xe(this.loadReports.bind(this)))),{initialValue:[]})}loadEventTypeId(e){return this.loadingService.load(this.eventsService.getEventTypeId(e),mt)}loadStudentEntries(){return U([this.eventId$,this.eventTypeId$]).pipe(M(([e,i])=>{let n=()=>{switch(i){case null:return N(null);case Ct:return this.loadStudyCourseStudents(e);case ln:return this.loadStudyClassStudents(e);default:return this.loadCourseStudents(e)}};return this.loadingService.load(n(),mt)}))}toggleSort(){this.sortCriteria.update(e=>B(L({},e),{ascending:!e.ascending}))}loadStudyCourseStudents(e){return this.subscriptionsService.getSubscriptionsByCourse(e).pipe(M(i=>this.personsService.getSummaries(i.map(({PersonId:n})=>n).filter(me)).pipe(_(n=>Pt(e,n,i)))))}loadStudyClassStudents(e){return this.subscriptionsService.getSubscriptionsByCourse(e,{"filter.IsOkay":"=1"}).pipe(M(i=>{let n=i.map(({PersonId:d})=>d).filter(me);return U([this.personsService.getSummaries(n),this.apprenticeshipContractsService.getCompaniesForStudents(n)]).pipe(_(([d,h])=>{let g=Pt(e,d,i,{emailFallback:!0});return kt(g,h)}))}))}loadCourseStudents(e){return this.coursesService.getExpandedCourseWithParticipants(e).pipe(_(Ki),M(i=>U([this.apprenticeshipContractsService.getCompaniesForStudents(i.entries.map(({id:n})=>n)),this.lessonPresencesService.getLessonStudyClassesByEvent(e)]).pipe(_(([n,d])=>{let h=kt(i,n);return Zi(h,d)}))))}getTitle(e){if(!e||!e.eventDesignation)return null;let{eventDesignation:i,studyClasses:n}=e;return[i,...n].join(", ")}getMailtoLink(e,i){if(e===null||e===Ct)return null;let n=i.map(d=>d.email).filter(Boolean);return n.length>0?`mailto:${n.join(";")}`:null}loadReports(e,i){switch(i){case null:case Ct:return N([]);case ln:return this.reportsService.getStudyClassStudentsReports(e);default:return this.reportsService.getCourseStudentsReports(e)}}sortStudentEntries(e,i){return[...e].sort(wr(i))}static{this.\u0275fac=function(i){return new(i||t)($(ne),$(be),$(ct),$(he),$(je),$(rt),$(dn),$(xi),$(ot))}}static{this.\u0275prov=oe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function wr(t){return(o,e)=>t.ascending?o.name.localeCompare(e.name):e.name.localeCompare(o.name)}var kr=t=>[t];function Pr(t,o){if(t&1&&(s(0,"a",4)(1,"i",6),p(2,"mail"),a()()),t&2){let e=u(2);m("href",e.state.mailtoLink(),_e)}}function Mr(t,o){if(t&1&&(s(0,"bkd-backlink",0)(1,"div",3),T(2,Pr,3,1,"a",4),x(3,"bkd-reports-link",5),a()()),t&2){let e=u(),i=O(0);m("link",D(3,kr,i)),r(2),y(e.state.mailtoLink()?2:-1),r(),m("reports",e.state.reports())}}function Or(t,o){t&1&&x(0,"bkd-spinner")}function $r(t,o){t&1&&(s(0,"p"),p(1),l(2,"translate"),a()),t&2&&(r(),f(c(2,1,"events-students.no-entries")))}function Gr(t,o){if(t&1){let e=G();s(0,"bkd-events-students-study-course-list",7),b("toggleSort",function(){E(e);let n=u();return w(n.state.toggleSort())}),Ie("searchTermChange",function(n){E(e);let d=u();return we(d.state.searchTerm,n)||(d.state.searchTerm=n),w(n)}),a()}if(t&2){let e=u();m("title",e.state.title())("count",e.state.entries().length)("entries",e.state.filteredEntries())("returnLink",e.returnLink())("sortCriteria",e.state.sortCriteria()),Ee("searchTerm",e.state.searchTerm)}}function Lr(t,o){if(t&1){let e=G();s(0,"bkd-events-students-course-list",8),Ie("searchTermChange",function(n){E(e);let d=u();return we(d.state.searchTerm,n)||(d.state.searchTerm=n),w(n)}),a()}if(t&2){let e=u();m("title",e.state.title())("count",e.state.entries().length)("entries",e.state.filteredEntries())("multipleStudyClasses",e.state.multipleStudyClasses())("returnLink",e.returnLink()),Ee("searchTerm",e.state.searchTerm)}}var pn=(()=>{class t{constructor(e,i){this.state=e,this.route=i,this.returnLink=re(this.route.queryParams.pipe(_(({returnlink:n})=>n?decodeURIComponent(n):null)))}static{this.\u0275fac=function(i){return new(i||t)(S(_t),S(ne))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-list"]],decls:6,vars:3,consts:[[3,"link"],[3,"title","count","entries","returnLink","sortCriteria","searchTerm"],[3,"title","count","entries","multipleStudyClasses","returnLink","searchTerm"],[1,"d-flex"],["target","_blank",1,"mail","btn","btn-primary","btn-icon","me-2",3,"href"],[1,"ms-2",3,"reports"],[1,"material-icons"],[3,"toggleSort","searchTermChange","title","count","entries","returnLink","sortCriteria","searchTerm"],[3,"searchTermChange","title","count","entries","multipleStudyClasses","returnLink","searchTerm"]],template:function(i,n){if(i&1&&(R(0),T(1,Mr,4,5,"bkd-backlink",0)(2,Or,1,0,"bkd-spinner")(3,$r,3,3,"p")(4,Gr,1,6,"bkd-events-students-study-course-list",1)(5,Lr,1,6,"bkd-events-students-course-list",2)),i&2){let d=A(n.returnLink());r(),y(d?1:-1),r(),y(n.state.loading()?2:n.state.entries().length===0?3:n.state.isStudyCourse()?4:5)}},dependencies:[I,ue,Ae,nt,rn,an],encapsulation:2,changeDetection:0})}}return t})();var Dr=(t,o)=>o.id;function Fr(t,o){if(t&1&&(p(0),l(1,"date")),t&2){u(2);let e=O(2);v(" ",F(1,1,e.Birthdate,"dd.MM.yyyy")," ")}}function Rr(t,o){if(t&1&&p(0),t&2){u(2);let e=O(2);v(" (",e.Gender,") ")}}function Br(t,o){if(t&1&&(p(0),x(1,"br")),t&2){u(2);let e=O(2);v(" ",e.AddressLine1,"")}}function jr(t,o){if(t&1&&(p(0),x(1,"br")),t&2){u(2);let e=O(2);Ne(" ",e.Zip," ",e.Location,"")}}function Ar(t,o){if(t&1&&(s(0,"a",4),p(1),a(),x(2,"br")),t&2){u(2);let e=O(2);Tt("href","tel:",e.PhonePrivate,"",_e),r(),f(e.PhonePrivate)}}function Vr(t,o){if(t&1&&(s(0,"a",4),p(1),a()),t&2){u(2);let e=O(2);Tt("href","tel:",e.PhoneMobile,"",_e),r(),f(e.PhoneMobile)}}function Hr(t,o){if(t&1&&(s(0,"h1"),p(1),a(),s(2,"span",3),T(3,Fr,2,4)(4,Rr,1,1),a(),s(5,"address"),T(6,Br,2,1)(7,jr,2,2)(8,Ar,3,3)(9,Vr,2,3,"a",4),a()),t&2){u();let e=O(2);r(),f(e.FullName),r(2),y(e.Birthdate?3:-1),r(),y(e.Gender?4:-1),r(2),y(e.AddressLine1?6:-1),r(),y(e.Zip&&e.Location?7:-1),r(),y(e.PhonePrivate?8:-1),r(),y(e.PhoneMobile?9:-1)}}function Nr(t,o){if(t&1&&(s(0,"div",2),p(1),l(2,"translate"),s(3,"span",5),p(4),a()()),t&2){u();let e=O(4);r(),v(" ",c(2,2,"events-students.study-course-detail.status"),": "),r(3),f(e)}}function Ur(t,o){if(t&1&&(s(0,"a",7),p(1),a()),t&2){let e=u(2).$implicit;le("href",e.file,_e),r(),f(e.value)}}function Wr(t,o){if(t&1&&p(0),t&2){let e=u(2).$implicit;v(" ",e.value," ")}}function zr(t,o){if(t&1&&(s(0,"div",6)(1,"div"),p(2),a(),T(3,Ur,2,2,"a",7)(4,Wr,1,1),a()),t&2){let e=u().$implicit;r(2),f(e.label),r(),y(e.file!==null?3:4)}}function qr(t,o){if(t&1&&T(0,zr,5,2,"div",6),t&2){let e=o.$implicit;y(e.value?0:-1)}}function Yr(t,o){t&1&&x(0,"bkd-spinner")}var cn=(()=>{class t{constructor(e,i,n,d,h,g){this.settings=e,this.route=i,this.personsService=n,this.subscriptionsService=d,this.storageService=h,this.loadingService=g,this.eventId$=this.route.parent?.paramMap.pipe(_(k=>Number(k.get("id"))))??N(0),this.personId$=this.route.paramMap.pipe(_(k=>Number(k.get("id")))),this.person=re(this.personId$.pipe(M(k=>this.personsService.get(k))),{initialValue:null}),this.subscription=re(this.loadSubscription()),this.subscriptionId=W(()=>this.subscription()?.Id??null),this.subscriptionDetails=re(this.loadSubscriptionDetails(),{initialValue:[]}),this.backLink=re(this.route.queryParams.pipe(_(({returnparams:k})=>k),_(Ti))),this.loading=re(this.loadingService.loading$,{initialValue:!0})}loadSubscription(){return this.loadingService.load(U([this.eventId$,this.personId$]).pipe(M(([e,i])=>this.subscriptionsService.getSubscriptionsByCourse(e,{"filter.PersonId":`=${i}`})),_(e=>e[0]??null)),{stopOnFirstValue:!0})}loadSubscriptionDetails(){return this.loadingService.load(ei(this.subscriptionId).pipe(fe(me),M(e=>this.subscriptionsService.getSubscriptionDetailsById(e)),_(e=>e.map(i=>this.toSubscriptionDetailsEntry(i)))),{stopOnFirstValue:!0})}toSubscriptionDetailsEntry(e){return{id:e.Id,label:e.VssDesignation,value:e.Value??"",file:this.buildFileUrl(e)}}buildFileUrl(e){if(e.VssStyle==="PD"||e.VssStyle==="PF"||e.VssStyle==="DA"){let i=this.storageService.getAccessToken()||"";return`${this.settings.apiUrl}/Files/SubscriptionDetails/${e.Id}?token=${i}`}return null}static{this.\u0275fac=function(i){return new(i||t)(S(ce),S(ne),S(rt),S(je),S(Fe),S(be))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-study-course-detail"]],decls:9,vars:6,consts:[[1,"bkd-container","bkd-container-limited"],["link","../..",3,"params"],[1,"status"],[1,"additional-info"],[3,"href"],[1,"ms-2"],[1,"detail"],["target","_blank",3,"href"]],template:function(i,n){if(i&1&&(s(0,"div",0),x(1,"bkd-backlink",1),R(2),T(3,Hr,10,7),R(4),T(5,Nr,5,4,"div",2),V(6,qr,1,1,null,null,Dr),T(8,Yr,1,0,"bkd-spinner"),a()),i&2){let d;r(),m("params",n.backLink()),r();let h=A(n.person());r(),y(h?3:-1),r();let g=A((d=n.subscription())==null?null:d.Status);r(),y(g?5:-1),r(),H(n.subscriptionDetails()),r(2),y(n.loading()?8:-1)}},dependencies:[I,$e,Ae,ue],styles:["h1[_ngcontent-%COMP%]{margin-bottom:0}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}address[_ngcontent-%COMP%]{margin:1rem 0}.status[_ngcontent-%COMP%]{display:flex;align-items:center;padding:1rem 0;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.detail[_ngcontent-%COMP%]{max-width:70ch;padding-top:1rem}.detail[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{color:#4e4e4ef2;font-size:.875rem}"],changeDetection:0})}}return t})();var mn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students"]],features:[ie([_t])],decls:1,vars:0,template:function(i,n){i&1&&x(0,"router-outlet")},dependencies:[ye],encapsulation:2,changeDetection:0})}}return t})();var un=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-tests"]],decls:4,vars:4,consts:[[3,"withRatings"]],template:function(i,n){i&1&&(s(0,"h1"),p(1),l(2,"translate"),a(),x(3,"bkd-events-list",0)),i&2&&(r(),f(c(2,2,"events.title")),r(2),m("withRatings",!0))},dependencies:[ft,I],encapsulation:2})}}return t})();var hn=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events"]],features:[ie([He,Si])],decls:1,vars:0,template:function(i,n){i&1&&x(0,"router-outlet")},dependencies:[ye],encapsulation:2})}}return t})();function gn(t){return o=>{let e=Number(o.value);return e<=t?{greaterThan:{value:e,greaterThanValue:t}}:null}}function Ot(t){return t.map(({finalGrade:o})=>o).filter(Kr)}function Kr(t){return t!==null}function Cn(t,o,e,i){return t?.map(n=>({student:n,finalGrade:Qr(n,e,i),grades:Zr(n,o)}))}function Zr(t,o){return o.map(e=>{if(e.Results===void 0||e.Results?.length===0)return{kind:"no-result",test:e};let i=e.Results?.find(n=>n.StudentId===t.Id);return i!==void 0?{kind:"grade",result:i,test:e}:{kind:"no-result",test:e}})}function Qr(t,o,e){let i=o.find(d=>d.StudentId===t.Id),n=e.find(d=>d.StudentId===t.Id);return i?{id:i.Id,average:Xr(i),finalGradeId:i.GradeId,freeHandGrade:n?Number(n.Grade):null,canGrade:i.CanGrade}:null}function Xr(t){return t.AverageTestResult===0?null:t.AverageTestResult}var _n=({key:t,ascending:o})=>(e,i)=>{let n=o?1:-1;switch(t){case"FullName":return n*e.student.FullName.localeCompare(i.student.FullName);case"FinalGrade":return!e.finalGrade?.finalGradeId||!i.finalGrade?.finalGradeId?n*-1:n*fn(e.finalGrade.finalGradeId,i.finalGrade.finalGradeId);case"TestsMean":return!e.finalGrade?.average||!i.finalGrade?.average?n*-1:n*fn(e.finalGrade.average,i.finalGrade.average)}return n*Jr(t,e,i)},Jr=(t,o,e)=>{let i=o.grades.filter(vn).find(d=>d.test.Id===t.Id),n=e.grades.filter(vn).find(d=>d.test.Id===t.Id);return t.IsPointGrading&&i?.result.GradeId===n?.result.GradeId?(i?.result.Points??0)-(n?.result.Points??0):((i?.result.GradeId??Number.POSITIVE_INFINITY)-(n?.result.GradeId??Number.POSITIVE_INFINITY))*-1};function fn(t,o){return t===o?0:te.average).filter(e=>e!=null&&e!==0).map(Number);return wt(o)}function xn(t,o){let e=t.map(n=>n.freeHandGrade).filter(n=>!!n),i=t.map(n=>n.finalGradeId).filter(n=>n!==null).map(n=>o.find(d=>d.Key===n)).filter(n=>n!==void 0).map(n=>n?.Value).filter(n=>n!==void 0).map(Number).filter(n=>!isNaN(n));return wt([...i,...e])}function $t(t,o){return[...o.filter(e=>e.Id!==t?.Id),t].filter(e=>e!=null)}function bn({id:t,selectedGradeId:o},e){return e.map(i=>i.Id!==t?i:B(L({},i),{GradeId:o}))}function Tn(t,o){switch(o.type){case"reset":return o.payload;case"updateResult":return t?B(L({},t),{Tests:Pi(o.payload.testResult,t.Tests||[],o.payload.ignore),Gradings:o.payload.grading?$t(o.payload.grading,t.Gradings||[]):t.Gradings}):null;case"deleteResult":return t?B(L({},t),{Tests:Mi(o.payload.testId,o.payload.studentId,t.Tests||[]),Gradings:o.payload.grading?$t(o.payload.grading,t.Gradings||[]):t.Gradings||[]}):null;case"toggle-test-state":return t?B(L({},t),{Tests:Oi(o.payload,t.Tests||[])}):null;case"final-grade-overwritten":return t?B(L({},t),{Gradings:bn({id:o.payload.id,selectedGradeId:o.payload.selectedGradeId},t.Gradings||[])}):null;case"replace-grades":return t?B(L({},t),{Gradings:o.payload}):null;case"delete-test":return t?B(L({},t),{Tests:$i(o.payload,t.Tests||[])}):null;default:return t}}var En=(()=>{class t extends it{constructor(e,i){super(e,i,Ri,"Gradings")}updateGrade(e,i){return this.http.put(`${this.baseUrl}/${e}`,{GradeId:i}).pipe(_(()=>e))}static{this.\u0275fac=function(i){return new(i||t)($(Ye),$(ce))}}static{this.\u0275prov=oe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Gt={onlyMine:!1,hidePublished:!1},K=(()=>{class t{constructor(e,i,n,d,h){this.coursesRestService=e,this.gradingScalesRestService=i,this.gradingsRestService=n,this.loadingService=d,this.sortService=h,this.action$=new xt(1),this.loading$=this.loadingService.loading$,this._courseId$=new xt(1),this.courseId$=this._courseId$.asObservable(),this.fetchedCourse$=this._courseId$.pipe(M(g=>this.loadingService.load(this.coursesRestService.getExpandedCourse(g))),Q(1)),this.course$=ze(this.action$,this.fetchedCourse$.pipe(fe(me),_(g=>({type:"reset",payload:g})))).pipe(jt(Tn,null),fe(me),Q(1)),this.tests$=this.course$.pipe(_(g=>g.Tests||[]),_(Gi)),this.hasTests$=this.tests$.pipe(_(g=>g.length>0)),this.filterSubject$=new q(Gt),this.filter$=this.filterSubject$.asObservable(),this.expandedHeaderSubject$=new q(!1),this.expandedHeader$=this.expandedHeaderSubject$.asObservable(),this.filteredTests$=U([this.tests$,this.filter$]).pipe(_(([g,k])=>g.filter(z=>(!k.onlyMine||z.IsOwner)&&(!k.hidePublished||!z.IsPublished)))),this.sorting$=this.sortService.sorting$,this.studentGrades$=U([this.course$,this.filteredTests$,this.sorting$]).pipe(_(xe(this.toStudentGrades.bind(this)))),this.canSetFinalGrade$=this.course$.pipe(_(Wi)),this.gradingScaleIds$=this.course$.pipe(_(g=>gi([...(g.Tests??[]).map(k=>k.GradingScaleId),g.GradingScaleId]).filter(me)),Z(hi),Q(1)),this.gradingScales$=this.gradingScaleIds$.pipe(M(g=>this.gradingScalesRestService.getGradingScales(g)),Q(1)),this.UNDEFINED_GRADINGSCALE_ID=-1,this.gradingScalesOptions$=this.gradingScales$.pipe(_(g=>g.map(k=>{let z=k?.Id||this.UNDEFINED_GRADINGSCALE_ID,ge=k?.Grades.map(ve=>({Key:ve.Id,Value:ve.Designation}))||[];return{id:z,options:ge}}).reduce((k,z)=>B(L({},k),{[z.id]:z.options}),{})),Q(1)),this.meanOfStudentGradesForCourse$=this.studentGrades$.pipe(_(g=>yn(Ot(g)))),this.meanOfFinalGradesForCourse$=U([this.gradingScalesOptions$,this.studentGrades$]).pipe(M(xe(this.meanOfOverwrittenGradesForCourse.bind(this))))}setCourseId(e){this._courseId$.next(e)}setFilter(e){this.filterSubject$.next(e)}gradingOptionsForTest$(e){return this.gradingOptions$(e.GradingScaleId)}gradingOptionsForCourse$(){return this.course$.pipe(M(e=>this.gradingOptions$(e.GradingScaleId)))}toStudentGrades(e,i=[],n){return Cn(e.ParticipatingStudents??[],i,e.Gradings??[],e.FinalGrades??[]).sort(_n(n))}setSorting(e){this.sortService.setSorting(e)}getSortingChar$(e){return this.sortService.getSortingChar$(e)}sortBy(e){this.sortService.toggleSorting(e)}toggleHeader(e){this.expandedHeaderSubject$.next(e)}optimisticallyUpdateGrade(e){return this.course$.pipe(ae(1),_(i=>{let{originalResult:n,updatedResult:d}=this.buildOptimisticResultUpdate(i,e);return this.updateTestResult(d,null),n}))}saveGrade(e,i){this.course$.pipe(ae(1),M(n=>this.coursesRestService.updateTestResult(n.Id,e).pipe(Ft(d=>(i&&this.updateTestResult(L({},i),null),Dt(()=>d)))))).subscribe(({testResult:n,grading:d})=>this.updateOrDeleteTestResult(e.testId,e.studentId,n,d,"gradeId"in e?"grade":"points"))}publish(e){this.coursesRestService.publishTest(e.Id).subscribe(this.toggleTestPublishedState.bind(this))}unpublish(e){this.coursesRestService.unpublishTest(e.Id).subscribe(this.toggleTestPublishedState.bind(this))}deleteTest(e){this.action$.next({type:"delete-test",payload:e})}overwriteFinalGrade({id:e,selectedGradeId:i}){this.gradingsRestService.updateGrade(e,i).subscribe(()=>{this.action$.next({type:"final-grade-overwritten",payload:{id:e,selectedGradeId:i}})})}setAveragesAsFinalGrades(e){this.coursesRestService.setAverageAsFinalGrade(e).subscribe(i=>this.action$.next({type:"replace-grades",payload:i.Gradings}))}buildOptimisticResultUpdate(e,i){let n=ki(e,i.testId,i.studentId),d=n?L({},n):{Id:"",TestId:i.testId,StudentId:i.studentId,CourseRegistrationId:0,GradeId:null,GradeValue:null,GradeDesignation:null,Points:null};return d.GradeId="gradeId"in i?i.gradeId:n?.GradeId??null,d.Points="points"in i?i.points:n?.Points??null,{originalResult:n,updatedResult:d}}updateOrDeleteTestResult(e,i,n,d,h){n?this.updateTestResult(n,d,h):this.deleteTestResult(e,i,d)}updateTestResult(e,i,n){this.action$.next({type:"updateResult",payload:{testResult:e,grading:i??null,ignore:n}})}deleteTestResult(e,i,n){this.action$.next({type:"deleteResult",payload:{testId:e,studentId:i,grading:n}})}toggleTestPublishedState(e){this.action$.next({type:"toggle-test-state",payload:e})}gradingOptions$(e){return e===null?N(null):this.gradingScalesOptions$.pipe(_(i=>i[e]),Q(1))}meanOfOverwrittenGradesForCourse(e,i){return this.course$.pipe(_(n=>{if(n.GradingScaleId===null||e[n.GradingScaleId]===void 0)return null;let d=e[n.GradingScaleId];return xn(Ot(i),d)}))}static{this.\u0275fac=function(i){return new(i||t)($(he),$(Bi),$(En),$(be),$(Ni))}}static{this.\u0275prov=oe({token:t,factory:t.\u0275fac})}}return t})();var is=t=>["/events",t,"tests"];function ns(t,o){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=o.$implicit;r(),v(" ",F(2,1,"global.validation-errors."+e.error,e.params)," ")}}function rs(t,o){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=o.$implicit;r(),v(" ",F(2,1,"global.validation-errors."+e.error,e.params)," ")}}function ss(t,o){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=o.$implicit;r(),v(" ",F(2,1,"global.validation-errors."+e.error,e.params)," ")}}function as(t,o){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=o.$implicit;r(),v(" ",F(2,1,"global.validation-errors."+e.error,e.params)," ")}}function os(t,o){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=o.$implicit;r(),v(" ",F(2,1,"global.validation-errors."+e.error,e.params)," ")}}function ds(t,o){if(t&1&&(s(0,"div",29)(1,"div",30)(2,"div",16)(3,"label",31),p(4),l(5,"translate"),a(),s(6,"div",32),x(7,"input",33),l(8,"async"),V(9,as,3,4,"div",7,Me),l(11,"async"),a()()(),s(12,"div",30)(13,"div",16)(14,"label",34),p(15),l(16,"translate"),a(),s(17,"div",32),x(18,"input",35),l(19,"async"),V(20,os,3,4,"div",7,Me),l(22,"async"),a()()()(),s(23,"div",36),Ut(),s(24,"math")(25,"mi"),p(26),l(27,"translate"),a(),s(28,"mo"),p(29,"="),a(),s(30,"mfrac")(31,"mrow")(32,"mi"),p(33),l(34,"translate"),a(),s(35,"mo"),p(36,"\xD7"),a(),s(37,"mn"),p(38,"5"),a()(),s(39,"mi"),p(40),l(41,"translate"),a()(),s(42,"mo"),p(43,"+"),a(),s(44,"mn"),p(45,"1"),a()()()),t&2){let e,i,n=u(2);r(4),f(c(5,9,"tests.form.max-points")),r(3),de("is-invalid",((e=c(8,11,n.maxPointsErrors$))==null?null:e.length)||!1),r(2),H(c(11,13,n.maxPointsErrors$)),r(6),f(c(16,15,"tests.form.max-points-adjusted")),r(3),de("is-invalid",((i=c(19,17,n.maxPointsAdjustedErrors$))==null?null:i.length)||!1),r(2),H(c(22,19,n.maxPointsAdjustedErrors$)),r(6),v(" ",c(27,21,"tests.form.math.grade")," "),r(7),v(" ",c(34,23,"tests.form.math.points")," "),r(7),f(c(41,25,"tests.form.math.max-points"))}}function ls(t,o){t&1&&(s(0,"div",28)(1,"span",37),p(2,"Loading..."),a()())}function ps(t,o){if(t&1){let e=G();s(0,"form",2),b("ngSubmit",function(){E(e);let n=u();return w(n.onSubmit())}),s(1,"div",3)(2,"div",4)(3,"label",5),p(4),l(5,"translate"),a(),x(6,"input",6),l(7,"async"),l(8,"translate"),V(9,ns,3,4,"div",7,Me),l(11,"async"),a(),s(12,"div",8)(13,"label",9),p(14),l(15,"translate"),a(),s(16,"div",10)(17,"span",11)(18,"i",12),p(19,"calendar_today"),a()(),s(20,"input",13,0),l(22,"async"),l(23,"translate"),b("click",function(){E(e);let n=Se(21);return w(n.toggle())}),a(),V(24,rs,3,4,"div",7,Me),l(26,"async"),a()()(),s(27,"div",14)(28,"label",15),p(29),l(30,"translate"),a(),s(31,"div",4)(32,"div",16)(33,"label",17),p(34),l(35,"translate"),a(),s(36,"div",18),x(37,"input",19),l(38,"async"),V(39,ss,3,4,"div",7,Me),l(41,"async"),a()()()(),s(42,"div")(43,"label",15),p(44),l(45,"translate"),a(),s(46,"div",20),x(47,"input",21),s(48,"label",22),p(49),l(50,"translate"),a()(),s(51,"div",20),x(52,"input",23),s(53,"label",24),p(54),l(55,"translate"),a()(),T(56,ds,46,27),a(),s(57,"div",25)(58,"button",26),l(59,"async"),p(60),l(61,"translate"),a(),s(62,"button",27),p(63),l(64,"translate"),T(65,ls,3,0,"div",28),a()()()}if(t&2){let e,i,n,d,h=u();m("formGroup",h.formGroup),r(4),f(c(5,26,"tests.form.designation")),r(2),de("is-invalid",((e=c(7,28,h.designationErrors$))==null?null:e.length)||!1),m("placeholder",c(8,30,"tests.form.designation-placeholder")),r(3),H(c(11,32,h.designationErrors$)),r(5),f(c(15,34,"tests.form.date")),r(3),m("id",h.componentId),r(3),de("is-invalid",((i=c(22,36,h.dateErrors$))==null?null:i.length)||!1),m("placeholder",c(23,38,"shared.date-select.default-placeholder")),r(4),H(c(26,40,h.dateErrors$)),r(5),f(c(30,42,"tests.form.weight")),r(5),f(c(35,44,"tests.form.factor")),r(3),de("is-invalid",((n=c(38,46,h.weightErrors$))==null?null:n.length)||!1),r(2),H(c(41,48,h.weightErrors$)),r(5),f(c(45,50,"tests.form.grading-type")),r(3),m("value",!1),r(2),f(c(50,52,"tests.form.grades")),r(3),m("value",!0),r(2),f(c(55,54,"tests.form.points")),r(2),y((d=h.formGroup.get("isPointGrading"))!=null&&d.value?56:-1),r(2),m("disabled",h.saving)("routerLink",D(62,is,c(59,56,h.courseId$))),r(2),v(" ",c(61,58,"tests.form.cancel")," "),r(2),m("disabled",h.saving),r(),v(" ",c(64,60,"tests.form.save")," "),r(2),y(h.saving?65:-1)}}var St=(()=>{class t{constructor(e,i,n){this.fb=e,this.translate=i,this.testStateService=n,this.test=null,this.saving=!1,this.save=new J,this.componentId=fi("bkd-tests-edit-form"),this.formGroup=this.createFormGroup(),this.submitted$=new q(!1),this.destroy$=new te,this.designationErrors$=Re(N(this.formGroup),this.submitted$,"designation"),this.dateErrors$=Re(N(this.formGroup),this.submitted$,"date"),this.maxPointsErrors$=Re(N(this.formGroup),this.submitted$,"maxPoints"),this.maxPointsAdjustedErrors$=Re(N(this.formGroup),this.submitted$,"maxPointsAdjusted"),this.weightErrors$=Re(N(this.formGroup),this.submitted$,"weight"),this.courseId$=this.testStateService.courseId$}ngOnInit(){this.test&&this.setInitialValues(this.test),Ci(N(this.formGroup),"isPointGrading").pipe(Ce(this.destroy$)).subscribe(this.togglePointFieldsDisability.bind(this))}ngOnDestroy(){this.destroy$.next()}onSubmit(){this.submitted$.next(!0),this.formGroup.valid&&this.save.emit(this.formGroup.value)}createFormGroup(){return this.fb.group({designation:["",Le.required],date:[null,Le.required],weight:[1,Le.compose([Le.required,gn(0)])],isPointGrading:[!1],maxPoints:[{value:null,disabled:!0},Le.required],maxPointsAdjusted:[{value:null,disabled:!0},null]})}setInitialValues(e){this.formGroup.patchValue({designation:e.Designation,date:e.Date,weight:e.Weight,isPointGrading:e.IsPointGrading,maxPoints:e.MaxPoints,maxPointsAdjusted:e.MaxPointsAdjusted}),e.Results&&e.Results.length>0&&(this.formGroup.get("isPointGrading")?.disable(),this.formGroup.get("maxPoints")?.disable(),this.formGroup.get("maxPointsAdjusted")?.disable()),this.togglePointFieldsDisability()}togglePointFieldsDisability(){let e=this.formGroup.get("maxPoints"),i=this.formGroup.get("maxPointsAdjusted");this.formGroup.get("isPointGrading")?.value?(e?.enable(),i?.enable()):(e?.reset({value:this.test?.MaxPoints,disabled:!0}),i?.reset({value:this.test?.MaxPointsAdjusted,disabled:!0}))}static{this.\u0275fac=function(i){return new(i||t)(S(di),S(se),S(K))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-edit-form"]],inputs:{test:"test",saving:"saving"},outputs:{save:"save"},features:[ie([{provide:pi,useClass:ui},{provide:ci,useClass:Hi}])],decls:1,vars:1,consts:[["dp","ngbDatepicker"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"row","g-3","mb-3"],[1,"col-md-6"],["for","designation",1,"form-label"],["id","designation","name","designation","type","text","formControlName","designation","required","",1,"form-control",3,"placeholder"],[1,"invalid-feedback"],[1,"col-md-6","mb-3"],["for","date",1,"form-label"],[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["id","date","name","date","type","text","ngbDatepicker","","formControlName","date","required","",1,"form-control",3,"click","placeholder"],[1,"row","mb-3"],[1,"form-label"],[1,"row"],["for","factor",1,"form-label","col-3","col-sm-2"],[1,"col-9","col-sm-10"],["id","factor","name","factor","type","number","formControlName","weight","step","0.05","min","0","required","",1,"form-control"],[1,"form-check"],["type","radio","formControlName","isPointGrading","id","type-grades",1,"form-check-input",3,"value"],["for","type-grades",1,"form-check-label"],["type","radio","formControlName","isPointGrading","id","type-points",1,"form-check-input",3,"value"],["for","type-points",1,"form-check-label"],[1,"d-flex","justify-content-end","mt-4"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","routerLink"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"row","ms-4","mb-3","g-3"],[1,"col-sm-6","col-md-4"],["for","max-points",1,"ms-2","col-4","col-form-label"],[1,"col-6"],["type","number","name","maxPoints","id","max-points","formControlName","maxPoints","step","0.01","min","0","max","999","required","",1,"form-control"],["for","max-points-adjusted",1,"ms-2","col-4","col-form-label"],["type","number","name","maxPointsAdjusted","id","max-points-adjusted","formControlName","maxPointsAdjusted","step","0.01","min","0","max","999",1,"form-control"],[1,"ms-4","ps-3","py-3"],[1,"visually-hidden"]],template:function(i,n){i&1&&T(0,ps,66,64,"form",1),i&2&&y(n.formGroup?0:-1)},dependencies:[De,ni,Ke,Qe,ri,Ze,ti,oi,Je,Xe,li,si,ai,mi,X,Y,I],styles:["#factor[_ngcontent-%COMP%], #max-points[_ngcontent-%COMP%], #max-points-adjusted[_ngcontent-%COMP%]{width:5em}"]})}}return t})();var wn=(()=>{class t{constructor(e,i,n,d,h){this.route=e,this.courseService=i,this.toastService=n,this.translate=d,this.router=h,this.saving$=new q(!1),this.courseId$=this.route.paramMap.pipe(_(g=>Number(g.get("id"))),Z())}save(e){this.saving$.next(!0);let{designation:i,date:n,weight:d,isPointGrading:h,maxPoints:g,maxPointsAdjusted:k}=e;this.courseId$.pipe(M(z=>this.courseService.add(z,n,i,d,h,g,k)),qe(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("tests.form.save-success")),this.navigateBack()}navigateBack(){this.courseId$.subscribe(e=>void this.router.navigate(["events",e,"tests"]))}static{this.\u0275fac=function(i){return new(i||t)(S(ne),S(he),S(tt),S(se),S(Ge))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-add"]],decls:6,vars:6,consts:[[1,"bkd-container","bkd-container-limited"],[3,"save","saving"]],template:function(i,n){i&1&&(s(0,"h1"),p(1),l(2,"translate"),a(),s(3,"div",0)(4,"bkd-tests-edit-form",1),l(5,"async"),b("save",function(h){return n.save(h)}),a()()),i&2&&(r(),f(c(2,2,"tests.add-title")),r(3),m("saving",c(5,4,n.saving$)))},dependencies:[St,Y,I],encapsulation:2})}}return t})();var In=(()=>{class t{constructor(e){this.activeModal=e}get canDeleteTest(){return(this.test?.Results?.filter(i=>i.GradeId!==null||i.GradeValue!==null||i.Points!==null)||[]).length===0}static{this.\u0275fac=function(i){return new(i||t)(S(et))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-delete"]],inputs:{test:"test"},decls:13,vars:10,consts:[[1,"modal-body"],["data-testid","confirmation-message"],[1,"modal-footer"],["data-testid","cancel-button","type","button",1,"btn","btn-outline-secondary",3,"click","hidden"],[1,"px-2"],["data-testid","confirm-button","type","button",1,"btn","btn-primary",3,"click"],[1,"px-3"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"p",1),p(2),l(3,"translate"),a()(),s(4,"div",2)(5,"button",3),b("click",function(){return n.activeModal.dismiss()}),s(6,"span",4),p(7),l(8,"translate"),a()(),s(9,"button",5),b("click",function(){return n.activeModal.close(n.canDeleteTest?n.test:null)}),s(10,"span",6),p(11),l(12,"translate"),a()()()),i&2&&(r(2),v(" ",c(3,4,n.canDeleteTest?"tests.form.confirm":"tests.form.delete-not-allowed")," "),r(3),m("hidden",!n.canDeleteTest),r(2),v(" ",c(8,6,"tests.dialog.no")," "),r(4),v(" ",c(12,8,n.canDeleteTest?"tests.dialog.yes":"tests.dialog.ok")," "))},dependencies:[I],encapsulation:2})}}return t})();var hs=t=>({test:t});function gs(t,o){t&1&&x(0,"bkd-spinner")}function fs(t,o){if(t&1){let e=G();s(0,"div",1)(1,"h1"),p(2),l(3,"translate"),a(),s(4,"button",2),b("click",function(){E(e);let n=u(),d=O(0);return w(n.openDeleteModal(d))}),s(5,"i",3),p(6,"delete"),a()()(),s(7,"bkd-tests-edit-form",4),b("save",function(n){E(e);let d=u();return w(d.save(n))}),a()}if(t&2){u();let e=O(0),i=O(2);r(2),v(" ",F(3,3,"tests.edit-title",D(6,hs,e.Designation))," "),r(5),m("test",e)("saving",i)}}var kn=(()=>{class t{constructor(e,i,n,d,h,g,k){this.state=e,this.courseService=i,this.route=n,this.toastService=d,this.translate=h,this.router=g,this.modalService=k,this.saving$=new q(!1),this.testId$=this.route.paramMap.pipe(_(z=>Number(z.get("testId"))),Z()),this.test$=U([this.state.tests$,this.testId$]).pipe(_(([z,ge])=>z.find(ve=>ve.Id===ge)))}openDeleteModal(e){let i=this.modalService.open(In);i.componentInstance.test=e,i.result.then(n=>{n&&this.courseService.delete(e.CourseId,e.Id).subscribe(this.onDeleteSuccess.bind(this))},()=>{})}save(e){this.saving$.next(!0);let{designation:i,date:n,weight:d,isPointGrading:h,maxPoints:g,maxPointsAdjusted:k}=e;U([this.state.courseId$,this.testId$]).pipe(ae(1),M(([z,ge])=>this.courseService.update(z,ge,i,n,d,h,g,k)),qe(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("tests.form.save-success")),this.navigateBack()}onDeleteSuccess(e){this.toastService.success(this.translate.instant("tests.form.delete-success")),this.state.deleteTest(e),this.navigateBack()}navigateBack(){this.state.courseId$.pipe(ae(1)).subscribe(e=>void this.router.navigate(["events",e,"tests"]))}static{this.\u0275fac=function(i){return new(i||t)(S(K),S(he),S(ne),S(tt),S(se),S(Ge),S(dt))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-edit"]],decls:8,vars:9,consts:[[1,"bkd-container","bkd-container-limited"],[1,"d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-primary","btn-icon",3,"click"],[1,"material-icons"],[3,"save","test","saving"]],template:function(i,n){if(i&1&&(R(0),l(1,"async"),R(2),l(3,"async"),s(4,"div",0),T(5,gs,1,0,"bkd-spinner"),l(6,"async"),T(7,fs,8,8),a()),i&2){let d=A(c(1,1,n.test$));r(2),A(c(3,4,n.saving$)),r(3),y(c(6,7,n.state.loading$)?5:d?7:-1)}},dependencies:[St,ue,Y,I],encapsulation:2})}}return t})();var vs=t=>({designation:t}),Pn=(()=>{class t{constructor(e){this.activeModal=e}static{this.\u0275fac=function(i){return new(i||t)(S(et))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-publish-test"]],inputs:{test:"test"},decls:11,vars:12,consts:[[1,"modal-body"],["data-testid","confirmation-message"],[1,"modal-footer"],["data-testid","cancel-button","type","button",1,"btn","btn-outline-secondary",3,"click"],["data-testid","confirm-button","type","button",1,"btn","btn-primary",3,"click"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"p",1),p(2),l(3,"translate"),a()(),s(4,"div",2)(5,"button",3),b("click",function(){return n.activeModal.dismiss()}),p(6),l(7,"translate"),a(),s(8,"button",4),b("click",function(){return n.activeModal.close(!0)}),p(9),l(10,"translate"),a()()),i&2&&(r(2),v(" ",F(3,3,n.test.IsPublished?"tests.publishing.unpublish":"tests.publishing.publish",D(10,vs,n.test.Designation))," "),r(4),v(" ",c(7,6,"tests.publishing.cancel")," "),r(3),v(" ",c(10,8,"tests.publishing.confirm")," "))},dependencies:[I],encapsulation:2})}}return t})();var Cs=t=>({maxPoints:t});function _s(t,o){if(t&1&&(s(0,"div",6),p(1),l(2,"translate"),a()),t&2){let e=u(2);r(),v(" ",F(2,1,"global.validation-errors.invalidPoints",D(4,Cs,e.maxPoints))," ")}}function Ss(t,o){if(t&1){let e=G();s(0,"div",3)(1,"input",5,0),b("ngModelChange",function(){E(e);let n=Se(2),d=u();return w(d.onPointsChange(n.value))}),a(),T(3,_s,3,6,"div",6),a()}if(t&2){let e=Se(2),i=u();r(),de("is-invalid",e.errors),le("max",i.maxPoints),le("tabindex",i.tabIndex),m("disabled",i.grade.test.IsPublished)("ngModel",i.grade.kind==="grade"?i.grade.result.Points:null),r(2),y(e.errors?3:-1)}}var ys=1250,Mn=(()=>{class t{constructor(e){this.state=e,this.maxPoints=0,this.pointsSubject$=new te,this.gradeSubject$=new te,this.gradingScaleDisabledSubject$=new q(!0),this.gradingScaleDisabled$=this.gradingScaleDisabledSubject$.asObservable(),this.destroy$=new te}ngOnInit(){this.gradingScaleDisabledSubject$.next(this.disableGradingScale()),this.maxPoints=Sn(this.grade),this.initSave(this.pointsSubject$.pipe(fe(this.isValid.bind(this)),_(e=>({studentId:this.student.Id,testId:this.grade.test.Id,points:e?Number(e):null})))),this.initSave(this.gradeSubject$.pipe(_(e=>({studentId:this.student.Id,testId:this.grade.test.Id,gradeId:e}))))}ngOnChanges(){this.gradingScaleDisabledSubject$.next(this.disableGradingScale())}ngOnDestroy(){this.destroy$.next()}onPointsChange(e){this.pointsSubject$.next(e),this.gradingScaleDisabledSubject$.next(!(e===null||e===""))}onGradeChange(e){this.gradeSubject$.next(e)}isValid(e){return e===""||e===null?!0:isNaN(Number(e))?!1:!(Number(e)<0||Number(e)>this.maxPoints)}initSave(e){e.pipe(Rt(i=>this.state.optimisticallyUpdateGrade(i).pipe(_(n=>({params:i,originalResult:n})))),Bt(ys),Ce(this.destroy$)).subscribe(({params:i,originalResult:n})=>this.state.saveGrade(i,n))}disableGradingScale(){return this.grade.test.IsPublished?!0:this.grade.kind==="no-result"?!1:this.grade.result.Points!=null&&this.grade.test.IsPointGrading}static{this.\u0275fac=function(i){return new(i||t)(S(K))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-grade"]],inputs:{grade:"grade",student:"student",tabIndex:"tabIndex",gradeOptions:"gradeOptions"},features:[ke],decls:5,vars:8,consts:[["points","ngModel"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],[1,"point-input-container","me-2","me-md-3"],["data-testid","grade-select",1,"grade-select",3,"valueChange","options","allowEmpty","value","disabled","tabindex"],["type","number","step","0.01","min","0","data-testid","point-input",1,"form-control",3,"ngModelChange","max","disabled","tabindex","ngModel"],["data-testid","validation-error-message",1,"invalid-feedback"]],template:function(i,n){i&1&&(s(0,"div",1)(1,"div",2),T(2,Ss,4,7,"div",3),s(3,"bkd-select",4),l(4,"async"),b("valueChange",function(h){return n.onGradeChange(h)}),a()()()),i&2&&(r(2),y(n.grade.test.IsPointGrading?2:-1),r(),m("options",n.gradeOptions)("allowEmpty",!0)("value",n.grade.kind==="grade"?n.grade.result.GradeId:null)("disabled",c(4,6,n.gradingScaleDisabled$))("tabindex",n.tabIndex))},dependencies:[De,Ke,Qe,Ze,Je,Xe,ii,Be,Y,I],styles:[".point-input-container[_ngcontent-%COMP%]{width:4em}[_nghost-%COMP%] select{width:127px}@media (min-width: 576px){.point-input-container[_ngcontent-%COMP%]{width:5em}}"]})}}return t})();function xs(t,o){if(t&1&&(s(0,"span",1),p(1),a()),t&2){let e=u();r(),f(e.calculatePointsAverage(e.test))}}var On=(()=>{class t{constructor(e){this.locale=e}calculatePointsAverage(e){return this.safeAverage(e,2,st)}calculateGradeAverage(e){return this.safeAverage(e,3,at)}safeAverage(e,i,n){try{return Fi(n(e),this.locale,i)}catch{return Li}}static{this.\u0275fac=function(i){return new(i||t)(S(Xt))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-average-grades"]],inputs:{test:"test"},decls:4,vars:2,consts:[[1,"d-flex","flex-row","w-100"],["data-testid","average-points",1,"mr-2","mr-md-3","average-points"],["data-testid","average-grade"]],template:function(i,n){i&1&&(s(0,"div",0),T(1,xs,2,1,"span",1),s(2,"span",2),p(3),a()()),i&2&&(r(),y(n.test.IsPointGrading?1:-1),r(2),f(n.calculateGradeAverage(n.test)))},styles:[".average-points[_ngcontent-%COMP%]{min-width:4.5em}@media (min-width: 576px){.average-points[_ngcontent-%COMP%]{min-width:6em}}"]})}}return t})();var $n=(()=>{class t{constructor(){this.disabled=!1,this.width="127px",this.gradeIdSelected=new J}onGradeChange(e){this.gradeId?.valueOf()!==void 0&&this.gradeIdSelected.emit({id:this.gradeId?.valueOf(),selectedGradeId:e})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-grade-select"]],inputs:{options:"options",valueId:"valueId",gradeId:"gradeId",disabled:"disabled",width:"width"},outputs:{gradeIdSelected:"gradeIdSelected"},decls:1,vars:5,consts:[["data-testid","grade-select",3,"valueChange","options","allowEmpty","value","disabled","width"]],template:function(i,n){i&1&&(s(0,"bkd-select",0),b("valueChange",function(h){return n.onGradeChange(h)}),a()),i&2&&m("options",n.options)("allowEmpty",!0)("value",n.valueId)("disabled",n.disabled)("width",n.width)},dependencies:[Be],encapsulation:2})}}return t})();var bs=576,Gn=(()=>{class t{constructor(e,i){this.portal=e,this.state=i,this.destroy$=new te,this.handleWindowScroll=()=>{this.updateStickyVisibility(),this.updateStickyTopOffset()},this.handleWindowResize=()=>{this.updateStickyWidth(),this.updateStickyVisibility(),this.updateStickyTopOffset()},this.handleTableScroll=()=>{this.updateStickyLeftOffset()}}ngOnInit(){U([this.state.filteredTests$,this.state.expandedHeader$]).pipe(Ce(this.destroy$)).subscribe(()=>setTimeout(()=>this.updateStickyWidth()))}ngAfterViewInit(){this.handleWindowScroll(),this.handleTableScroll(),this.handleWindowResize(),this.window.addEventListener("scroll",this.handleWindowScroll),this.getTableScrollContainer()?.addEventListener("scroll",this.handleTableScroll),this.window.addEventListener("resize",this.handleWindowResize)}ngOnDestroy(){this.window.removeEventListener("scroll",this.handleWindowScroll),this.getTableScrollContainer()?.removeEventListener("scroll",this.handleTableScroll),this.window.removeEventListener("resize",this.handleWindowResize)}get window(){return this.portal.window??window}getTableScrollContainer(){return document.querySelector(".table-responsive-wrapper")??null}updateStickyVisibility(){if(this.isSmallBreakpointDown())return;let e=this.inlineHeader.getTop()+this.getIframeScrollY();this.stickyHeader.shown=this.getScrollTop()>e}updateStickyTopOffset(){this.isSmallBreakpointDown()||this.stickyHeader.setTopOffset(this.portal.inIframe?this.getScrollTop():0)}updateStickyLeftOffset(){this.isSmallBreakpointDown()||this.stickyHeader.setLeftOffset(this.inlineHeader.getLeft())}updateStickyWidth(){this.isSmallBreakpointDown()||(this.stickyHeader.setWidth(this.inlineHeader.getWidth()),this.stickyHeader.setColumnWidths(this.inlineHeader.getColumnWidths()),this.stickyHeader.setStickyColumnHeights(this.inlineHeader.getStickyColumnsHeights()))}getScrollTop(){return this.window.scrollY-this.portal.getIframeTop()}getIframeScrollY(){return window.scrollY}isSmallBreakpointDown(){return window.innerWidth({"btn-primary":t,"btn-outline-secondary":o}),Dn=(()=>{class t{constructor(){this.filter=Gt,this.filterChange=new J}showOnlyMine(){this.filterChange.next(B(L({},this.filter),{onlyMine:!0}))}showAll(){this.filterChange.next(B(L({},this.filter),{onlyMine:!1}))}onHidePublishedChange(e){let i=(e.target&&e.target instanceof HTMLInputElement&&e.target?.checked)??!1;this.filterChange.next(B(L({},this.filter),{hidePublished:i}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-test-table-filter"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},decls:13,vars:18,consts:[[1,"only-mine-buttons"],["type","button",1,"btn","desktop",3,"click","ngClass"],["type","button",1,"btn","ms-2","desktop",3,"click","ngClass"],[1,"hide-published"],[1,"form-check"],["id","hide-published","type","checkbox",1,"form-check-input",3,"change","checked"],["for","hide-published",1,"form-check-label"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"button",1),b("click",function(){return n.showAll()}),p(2),l(3,"translate"),a(),s(4,"button",2),b("click",function(){return n.showOnlyMine()}),p(5),l(6,"translate"),a()(),s(7,"div",3)(8,"div",4)(9,"input",5),b("change",function(h){return n.onHidePublishedChange(h)}),a(),s(10,"label",6),p(11),l(12,"translate"),a()()()),i&2&&(r(),m("ngClass",Et(12,Ln,!n.filter.onlyMine,n.filter.onlyMine)),r(),v(" ",c(3,6,"tests.all-tests")," "),r(2),m("ngClass",Et(15,Ln,n.filter.onlyMine,!n.filter.onlyMine)),r(),v(" ",c(6,8,"tests.owned-tests")," "),r(4),m("checked",n.filter.hidePublished),r(2),v(" ",c(12,10,"tests.hide-published")," "))},dependencies:[pe,De,I],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:100%}.only-mine-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;height:3.625rem}.hide-published[_ngcontent-%COMP%]{display:flex;align-items:center;height:2.375rem;margin-bottom:1rem}.hide-published[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:300}.hide-published[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{margin-bottom:0}"]})}}return t})();var Ts=["*"],Fn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-preserve-line-height"]],ngContentSelectors:Ts,decls:3,vars:0,template:function(i,n){i&1&&(Zt(),s(0,"div"),Qt(1),p(2,"\xA0"),a())},encapsulation:2})}}return t})();var Rn=(()=>{class t{constructor(e){this.translate=e}transform(e){return`${e.Weight} (${e.WeightPercent}%)${this.getPoints(e)}`}getPoints(e){return e.IsPointGrading?`, ${e.MaxPointsAdjusted??e.MaxPoints} ${this.translate.instant("tests.summary.points")}`:""}static{this.\u0275fac=function(i){return new(i||t)(S(se,16))}}static{this.\u0275pipe=Kt({name:"testSummaryShort",type:t,pure:!0})}}return t})();var Es=t=>[t,"edit"];function ws(t,o){t&1&&(s(0,"i",9),p(1,"edit"),a())}function Is(t,o){if(t&1&&(s(0,"div",5)(1,"div",7)(2,"bkd-preserve-line-height"),p(3),l(4,"date"),a(),s(5,"a",8),T(6,ws,2,0,"i",9),a()(),s(7,"bkd-preserve-line-height"),p(8),l(9,"testSummaryShort"),a(),s(10,"bkd-preserve-line-height"),p(11),a()()),t&2){let e=u();r(3),f(F(4,5,e.test.Date,"dd.MM.yyyy")),r(2),m("routerLink",D(10,Es,e.test.Id)),r(),y(e.test.IsOwner&&e.test.IsPublished===!1?6:-1),r(2),v(" ",c(9,8,e.test)," "),r(3),f(e.test.Owner)}}function ks(t,o){if(t&1){let e=G();s(0,"div",6)(1,"a",10),l(2,"translate"),b("click",function(){E(e);let n=u();return w(n.unpublishTest())}),s(3,"i",11),p(4,"lock"),a(),s(5,"span"),p(6),l(7,"translate"),a()(),s(8,"bkd-caret",12),b("click",function(){E(e);let n=u();return w(n.emitToggleHeader())}),a()()}if(t&2){let e=u();r(),le("title",c(2,3,"tests.edit")),r(5),f(c(7,5,"tests.published")),r(2),m("expanded",e.expanded)}}function Ps(t,o){if(t&1){let e=G();s(0,"div",6)(1,"a",13),l(2,"translate"),b("click",function(){E(e);let n=u();return w(n.publishTest())}),s(3,"i",11),p(4,"lock_open"),a(),s(5,"span"),p(6),l(7,"translate"),a()(),s(8,"bkd-caret",12),b("click",function(){E(e);let n=u();return w(n.emitToggleHeader())}),a()()}if(t&2){let e=u();r(),le("title",c(2,3,"tests.publish")),r(5),f(c(7,5,"tests.not-published")),r(2),m("expanded",e.expanded)}}var Bn=(()=>{class t{constructor(){this.toggleHeader=new J,this.publish=new J,this.unpublish=new J}emitToggleHeader(){this.toggleHeader.emit(!this.expanded)}publishTest(){this.publish.emit(this.test)}unpublishTest(){this.unpublish.emit(this.test)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-test-table-header"]],inputs:{test:"test",expanded:"expanded"},outputs:{toggleHeader:"toggleHeader",publish:"publish",unpublish:"unpublish"},decls:9,vars:5,consts:[[1,"d-flex","flex-column","h-100","justify-content-between"],["role","button",1,"test-designation","d-flex","flex-row","my-3","align-items-end","justify-content-between",3,"click"],[3,"ngClass"],[1,"align-self-start",3,"expanded"],[1,"d-flex","flex-column"],[1,"d-flex","flex-column","mb-3"],[1,"d-flex","align-items-center","justify-content-between","test-status"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-link","p-0","edit",3,"routerLink"],[1,"material-icons"],[1,"d-flex","btn","btn-link","ps-0","edit",3,"click","title"],[1,"material-icons","me-1"],[1,"expand-mobile",3,"click","expanded"],[1,"d-flex","btn","btn-link","ps-0",3,"click","title"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"div",1),b("click",function(){return n.emitToggleHeader()}),s(2,"div",2),p(3),a(),x(4,"bkd-caret",3),a(),s(5,"div",4),T(6,Is,12,12,"div",5)(7,ks,9,7,"div",6)(8,Ps,9,7,"div",6),a()()),i&2&&(r(2),m("ngClass",n.expanded?"expanded":"collapsed"),r(),v(" ",n.test.Designation," "),r(),m("expanded",n.expanded),r(2),y(n.expanded?6:-1),r(),y(n.test.IsPublished?7:8))},dependencies:[pe,bi,Fn,X,$e,I,Rn],styles:["[_nghost-%COMP%]{font-weight:300}.collapsed[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.test-designation[_ngcontent-%COMP%]{display:none!important}.test-status[_ngcontent-%COMP%]{order:-1;padding-bottom:1rem}.test-status[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.test-status[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#000}.test-status[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.test-status[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.edit[_ngcontent-%COMP%]{color:#00000080;text-decoration:none}@media (min-width: 811px){.test-designation[_ngcontent-%COMP%]{display:inherit!important}.test-status[_ngcontent-%COMP%]{order:initial}.expand-mobile[_ngcontent-%COMP%]{display:none!important}}"]})}}return t})();var Ms=["bkdTestEditGradesHeader",""],Lt=(t,o)=>o.Id,Os=t=>({"test-point-grading":t}),$s=t=>({selected:t});function Gs(t,o){if(t&1){let e=G();s(0,"th",3)(1,"bkd-test-table-header",14),b("toggleHeader",function(n){E(e);let d=u();return w(d.state.toggleHeader(n))})("publish",function(n){E(e);let d=u();return w(d.publish.emit(n))})("unpublish",function(n){E(e);let d=u();return w(d.unpublish.emit(n))}),a()()}if(t&2){let e=o.$implicit,i=u(),n=O(4);m("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),m("test",e)("expanded",n)}}function Ls(t,o){if(t&1){let e=G();s(0,"th",4)(1,"bkd-test-table-header",14),b("toggleHeader",function(n){E(e);let d=u();return w(d.state.toggleHeader(n))})("publish",function(n){E(e);let d=u();return w(d.publish.emit(n))})("unpublish",function(n){E(e);let d=u();return w(d.unpublish.emit(n))}),a()()}if(t&2){let e=o.$implicit,i=u(),n=O(4);m("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),m("test",e)("expanded",n)}}function Ds(t,o){if(t&1){let e=G();s(0,"div",15)(1,"span",16),b("click",function(){E(e);let n=u().$implicit,d=u();return w(d.state.sortBy(n))}),p(2),l(3,"translate"),a()()}t&2&&(r(2),v("",c(3,1,"tests.points")," "))}function Fs(t,o){if(t&1){let e=G();s(0,"th",13)(1,"div",8),T(2,Ds,4,3,"div",15),s(3,"div",9)(4,"span",16),b("click",function(){let n=E(e).$implicit,d=u();return w(d.state.sortBy(n))}),p(5),l(6,"translate"),a()(),s(7,"div",10),p(8),l(9,"async"),a()()()}if(t&2){let e=o.$implicit,i=u();m("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(2),y(e.IsPointGrading?2:-1),r(3),f(c(6,4,"tests.grade")),r(3),v(" ",c(9,6,i.state.getSortingChar$(e))," ")}}var jn=(()=>{class t{set shown(e){let i=this.element.nativeElement.classList;e?i.add("shown"):i.remove("shown")}constructor(e,i){this.state=e,this.element=i,this.sticky=!1,this.publish=new J,this.unpublish=new J}getTop(){return this.element.nativeElement.getBoundingClientRect().top}getLeft(){return this.element.nativeElement.getBoundingClientRect().left}setTopOffset(e){this.element.nativeElement.style.top=`${e}px`}setLeftOffset(e){this.element.nativeElement.style.left=`${e}px`}getWidth(){return this.element.nativeElement.getBoundingClientRect().width}setWidth(e){this.element.nativeElement.style.width=`${e}px`}getColumnWidths(){return this.getRowsAndColumns().map(e=>e.map(i=>i.getBoundingClientRect().width))}setColumnWidths(e){let i=this.getRowsAndColumns();if(i.length!==e.length||!i.every((n,d)=>n.length===e[d].length))throw new Error("Given column widths do not match number of header rows/columns");i.forEach((n,d)=>n.forEach((h,g)=>{h.style.width=`${e[d][g]}px`,h.style.minWidth=`${e[d][g]}px`}))}getStickyColumnsHeights(){return this.getRowsAndColumns(".sticky").map(e=>e.map(i=>i.getBoundingClientRect().height))}setStickyColumnHeights(e){let i=this.getRowsAndColumns(".sticky");if(i.length!==e.length||!i.every((n,d)=>n.length===e[d].length))throw new Error("Given column heights do not match number of sticky header columns");i.forEach((n,d)=>n.forEach((h,g)=>{h.style.height=`${e[d][g]}px`})),this.getRows().forEach((n,d)=>{let h=e[d].reduce((g,k)=>Math.max(g,k),0);n.style.height=`${h}px`})}getRowsAndColumns(e){return this.getRows().map(i=>Array.from(i.querySelectorAll(`th:not(.header-mobile)${e??""}`)))}getRows(){return Array.from(this.element.nativeElement.querySelectorAll("tr"))}static{this.\u0275fac=function(i){return new(i||t)(S(K),S(qt))}}static{this.\u0275cmp=C({type:t,selectors:[["thead","bkdTestEditGradesHeader",""]],hostVars:2,hostBindings:function(i,n){i&2&&de("sticky",n.sticky)},inputs:{selectedTest:"selectedTest",sticky:"sticky",shown:"shown"},outputs:{publish:"publish",unpublish:"unpublish"},attrs:Ms,decls:42,vars:32,consts:[[1,"header-collapsible"],["colspan","3",1,"desktop","sticky"],[3,"filterChange","filter"],["container","body",1,"test-grade","grade","test-info-desktop",3,"ngClass"],["container","body","colspan","3",1,"test-grade","header-mobile","test-info-mobile",3,"ngClass"],[1,"filler"],[3,"ngClass"],[1,"sticky","student-name",3,"click"],[1,"d-flex"],[1,"column-title"],[1,"sort-direction","ms-1"],[1,"sticky","student-grade","desktop",3,"click","ngClass"],[1,"border-end","sticky","student-average","desktop",3,"click"],["container","body",1,"test-grade",3,"ngClass"],[3,"toggleHeader","publish","unpublish","test","expanded"],[1,"column-title","point-input-container","me-2","me-md-3"],[3,"click"]],template:function(i,n){if(i&1){let d=G();R(0),l(1,"async"),R(2),l(3,"async"),R(4),l(5,"async"),s(6,"tr",0)(7,"th",1)(8,"bkd-test-table-filter",2),b("filterChange",function(g){return E(d),w(n.state.setFilter(g))}),a()(),V(9,Gs,2,3,"th",3,Lt),V(11,Ls,2,3,"th",4,Lt),x(13,"th",5),a(),s(14,"tr",6)(15,"th",7),b("click",function(){return E(d),w(n.state.sortBy("FullName"))}),s(16,"div",8)(17,"div",9),p(18),l(19,"translate"),a(),s(20,"div",10),p(21),l(22,"async"),a()()(),s(23,"th",11),b("click",function(){return E(d),w(n.state.sortBy("FinalGrade"))}),s(24,"div",8)(25,"div",9),p(26),l(27,"translate"),a(),s(28,"div",10),p(29),l(30,"async"),a()()(),s(31,"th",12),b("click",function(){return E(d),w(n.state.sortBy("TestsMean"))}),s(32,"div",8)(33,"div",9),p(34),l(35,"translate"),a(),s(36,"div",10),p(37),l(38,"async"),a()()(),V(39,Fs,10,8,"th",13,Lt),x(41,"th",5),a()}if(i&2){let d=c(1,9,n.state.filteredTests$),h=c(3,11,n.state.filter$);r(4),A(c(5,13,n.state.expandedHeader$)),r(4),m("filter",h),r(),H(d),r(2),H(d),r(3),m("ngClass",D(28,Os,n.selectedTest==null?null:n.selectedTest.IsPointGrading)),r(4),v(" ",c(19,16,"tests.student.name")," "),r(3),v(" ",c(22,18,n.state.getSortingChar$("FullName"))," "),r(2),m("ngClass",D(30,$s,n.selectedTest===void 0)),r(3),v(" ",c(27,20,"tests.grade")," "),r(3),v(" ",c(30,22,n.state.getSortingChar$("FinalGrade"))," "),r(5),v(" ",c(35,24,"tests.mean")," "),r(3),v(" ",c(38,26,n.state.getSortingChar$("TestsMean"))," "),r(2),H(d)}},dependencies:[Y,pe,I,Dn,Bn],styles:["[_nghost-%COMP%]{--spacer: 16px;--point-input-size: 4em;--grade-input-size: 127px;--points-grade-gap: 1rem;--student-name-column-width: 225px;--student-grade-column-width: calc( var(--spacer) + var(--grade-input-size) + var(--spacer) );--student-average-column-width: 100px;--test-grade-column-width: calc( var(--spacer) + var(--point-input-size) + var(--points-grade-gap) + var(--grade-input-size) + var(--spacer) );--student-grade-column-offset: var(--student-name-column-width);--student-average-column-offset: calc( var(--student-grade-column-offset) + var(--student-grade-column-width) );--test-columns-offset: calc( var(--student-average-column-offset) + var(--student-average-column-width) )}@media (min-width: 1000px){[_nghost-%COMP%]{--student-name-column-width: 275px}}@media (max-width: 767.98px){[_nghost-%COMP%]{--points-grade-gap: calc(.5 * var(--spacer))}}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:1rem}td[_ngcontent-%COMP%]{vertical-align:middle}@media (min-width: 576px){[_nghost-%COMP%]{--point-input-size: 5em}}tr[_ngcontent-%COMP%]:not(.header-collapsible) th.test-grade[_ngcontent-%COMP%], td.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}@media (max-width: 810px){tr[_ngcontent-%COMP%]:not(.header-collapsible):not(.test-point-grading) th.test-grade[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]:not(.test-point-grading) th.student-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.test-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.student-grade[_ngcontent-%COMP%]{width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));min-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));max-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer))}}th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{padding:0;width:auto}@media (max-width: 810px){th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{width:0}}th.test-grade[_ngcontent-%COMP%] .column-title.point-input-container[_ngcontent-%COMP%]{width:var(--point-input-size)}@media (max-width: 810px){.desktop[_ngcontent-%COMP%]:not(.selected), .student-grade[_ngcontent-%COMP%]:not(.selected), .student-average[_ngcontent-%COMP%], .test-grade[_ngcontent-%COMP%]:not(.selected){display:none}table[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%], thead[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}th[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]{display:flex;width:100%}.student-name[_ngcontent-%COMP%]{flex:1;display:block;padding-right:0}.test-grade[_ngcontent-%COMP%]{flex:none;display:block}}@media (min-width: 811px){.mobile[_ngcontent-%COMP%]{display:none}.student-name[_ngcontent-%COMP%]{width:var(--student-name-column-width);min-width:var(--student-name-column-width);max-width:var(--student-name-column-width)}.student-grade[_ngcontent-%COMP%]{width:var(--student-grade-column-width);min-width:var(--student-grade-column-width);max-width:var(--student-grade-column-width)}.student-average[_ngcontent-%COMP%]{width:var(--student-average-column-width);min-width:var(--student-average-column-width);max-width:var(--student-average-column-width)}.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}th.sticky[_ngcontent-%COMP%], td.sticky[_ngcontent-%COMP%]{position:sticky;left:0;background-color:#fff}th.sticky.student-grade[_ngcontent-%COMP%], td.sticky.student-grade[_ngcontent-%COMP%]{left:var(--student-grade-column-offset)}th.sticky.student-average[_ngcontent-%COMP%], td.sticky.student-average[_ngcontent-%COMP%]{left:var(--student-average-column-offset)}}@media (max-width: 1200px){[_nghost-%COMP%]{--student-average-column-width: 1px}.student-average[_ngcontent-%COMP%]{padding:0;overflow:hidden}}@media (min-width: 1201px){.student-average-inline[_ngcontent-%COMP%]{display:none}}.sticky[_nghost-%COMP%]{position:fixed;top:0;left:0;z-index:1000;display:none}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-top:none;vertical-align:top}.header-collapsible[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6;padding:0 1rem}tr[_ngcontent-%COMP%] th.test-info-desktop[_ngcontent-%COMP%]{display:none!important}@media (min-width: 811px){.sticky.shown[_nghost-%COMP%]{display:table-header-group}tr[_ngcontent-%COMP%] th.test-info-mobile[_ngcontent-%COMP%]{display:none!important}tr[_ngcontent-%COMP%] th.test-info-desktop[_ngcontent-%COMP%]{display:table-cell!important}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-top:none;padding-top:.25rem;padding-bottom:.25rem;border-top:initial}.sticky[_nghost-%COMP%]{margin-left:var(--test-columns-offset)}.sticky[_nghost-%COMP%] th.sticky[_ngcontent-%COMP%]{position:fixed}}"],changeDetection:0})}}return t})();var Rs=(t,o)=>o.student.Id,Bs=(t,o)=>o.Id,js=(t,o)=>o.id,As=t=>({"test-point-grading":t}),An=t=>({selected:t}),Vs=t=>["student",t,"grades"],Hs=t=>({"visible-on-mobile":t});function Ns(t,o){if(t&1){let e=G();s(0,"bkd-grade-select",19),l(1,"async"),l(2,"async"),b("gradeIdSelected",function(n){E(e);let d=u(2);return w(d.state.overwriteFinalGrade(n))}),a()}if(t&2){let e=u().$implicit,i=u();m("options",c(1,4,i.state.gradingOptionsForCourse$()))("valueId",e.finalGrade.finalGradeId)("gradeId",e.finalGrade.id)("disabled",c(2,6,i.isEditFinalGradesAllowed(e))===!1)}}function Us(t,o){if(t&1&&(s(0,"div"),p(1),a()),t&2){let e=u().$implicit;r(),v(" ",e.finalGrade.freeHandGrade," ")}}function Ws(t,o){if(t&1&&(R(0),s(1,"td",11),x(2,"bkd-grade",20),l(3,"async"),a()),t&2){let e=o.$implicit,i=o.$index,n=u(),d=n.$implicit,h=n.$index,g=u(),k=e.grade;r(),m("ngClass",g.selectedTest!==void 0&&k.test.Id===g.selectedTest.Id?"selected":""),r(),m("grade",k)("gradeOptions",c(3,5,g.state.gradingOptionsForTest$(k.test)))("student",d.student)("tabIndex",(1+i)*1e3+h)}}function zs(t,o){if(t&1&&(s(0,"tr")(1,"td",6)(2,"a",15)(3,"div"),p(4),a(),s(5,"div",8),p(6),l(7,"translate"),l(8,"decimalOrDash"),a()()(),s(9,"td",16),T(10,Ns,3,8,"bkd-grade-select",17)(11,Us,2,1,"div"),a(),s(12,"td",18),p(13),l(14,"decimalOrDash"),a(),V(15,Ws,4,7,"td",11,js),x(17,"td",12),a()),t&2){let e=o.$implicit,i=u();r(2),m("routerLink",D(16,Vs,e.student.Id)),r(2),f(e.student.FullName),r(2),Ne(" ",c(7,8,"tests.mean"),": ",F(8,10,e.finalGrade==null?null:e.finalGrade.average,"1-3")," "),r(3),m("ngClass",D(18,An,i.selectedTest===void 0)),r(),y(e.finalGrade&&!e.finalGrade.freeHandGrade?10:-1),r(),y(e.finalGrade&&e.finalGrade.freeHandGrade?11:-1),r(2),v(" ",F(14,13,e.finalGrade==null?null:e.finalGrade.average,"1-3")," "),r(2),H(i.getGrades(e))}}function qs(t,o){if(t&1&&(s(0,"td",11),x(1,"bkd-average-grades",21),a()),t&2){let e=o.$implicit,i=u();m("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)||e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),m("test",e)}}function Ys(t,o){if(t&1){let e=G();s(0,"button",22),b("click",function(){E(e);let n=u();return w(n.setAverageAsFinalGrade())}),p(1),l(2,"translate"),a()}if(t&2){let e=u(),i=O(2);m("ngClass",D(4,Hs,!i||!e.selectedTest)),r(),v(" ",c(2,2,"tests.set-final-grade")," ")}}var Vn=(()=>{class t{constructor(e,i){this.state=e,this.modalService=i}ngOnInit(){this.state.setSorting({key:"FullName",ascending:!0})}setAverageAsFinalGrade(){this.state.course$.pipe(ae(1)).subscribe(e=>this.state.setAveragesAsFinalGrades({CourseIds:[e.Id]}))}isEditFinalGradesAllowed(e){return this.state.course$.pipe(_(i=>!!(ut(i)?.value&&e.finalGrade?.canGrade)))}getGrades(e){return e.grades.flatMap(i=>({id:`${e.student.Id}-${i.test.Id}`,grade:i}))}publish(e){let i=this.openModal(e);this.onCloseModal(i,()=>this.state.publish(e))}unpublish(e){let i=this.openModal(e);this.onCloseModal(i,()=>this.state.unpublish(e))}calculatePointsAverage(e){return this.safeAverage(e,st)}calculateGradeAverage(e){return this.safeAverage(e,at)}safeAverage(e,i){try{return i(e).toString()}catch{return"\u2013"}}openModal(e){let i=this.modalService.open(Pn);return i.componentInstance.test=e,i}onCloseModal(e,i){e.result.then(n=>{n&&i()},()=>{})}static{this.\u0275fac=function(i){return new(i||t)(S(K),S(dt))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-test-edit-grades"]],inputs:{selectedTest:"selectedTest"},features:[ie([He])],decls:40,vars:45,consts:[["inlineHeader",""],["stickyHeader",""],[1,"table-responsive-wrapper"],["bkdTestEditGradesHeaderSticky","",1,"table","table-hover","h-100",3,"ngClass","inlineHeader","stickyHeader"],["bkdTestEditGradesHeader","",3,"publish","unpublish","selectedTest"],["bkdTestEditGradesHeader","",3,"publish","unpublish","sticky","selectedTest"],[1,"sticky","student-name"],[1,"d-flex","flex-column"],[1,"student-average-inline"],[1,"desktop","sticky","student-grade",3,"ngClass"],[1,"desktop","border-end","sticky","student-average"],[1,"test-grade",3,"ngClass"],[1,"filler"],[1,"action-buttons"],["data-testId","apply-average-button","type","button",1,"apply-average-button","btn","btn-primary","m-3",3,"ngClass"],[3,"routerLink"],[1,"sticky","student-grade",3,"ngClass"],[3,"options","valueId","gradeId","disabled"],[1,"border-end","sticky","student-average"],[3,"gradeIdSelected","options","valueId","gradeId","disabled"],[3,"grade","gradeOptions","student","tabIndex"],[3,"test"],["data-testId","apply-average-button","type","button",1,"apply-average-button","btn","btn-primary","m-3",3,"click","ngClass"]],template:function(i,n){if(i&1){let d=G();R(0),l(1,"async"),R(2),l(3,"async"),R(4),l(5,"async"),s(6,"div",2)(7,"table",3)(8,"thead",4,0),b("publish",function(g){return E(d),w(n.publish(g))})("unpublish",function(g){return E(d),w(n.unpublish(g))}),a(),s(10,"thead",5,1),b("publish",function(g){return E(d),w(n.publish(g))})("unpublish",function(g){return E(d),w(n.unpublish(g))}),a(),s(12,"tbody"),V(13,zs,18,20,"tr",null,Rs),s(15,"tr")(16,"td",6)(17,"div",7)(18,"div"),p(19),l(20,"translate"),a(),s(21,"div",8),p(22),l(23,"translate"),l(24,"async"),l(25,"decimalOrDash"),a()()(),s(26,"td",9),p(27),l(28,"async"),l(29,"decimalOrDash"),a(),s(30,"td",10),p(31),l(32,"async"),l(33,"decimalOrDash"),a(),V(34,qs,2,2,"td",11,Bs),x(36,"td",12),a()()(),s(37,"div",13),T(38,Ys,3,6,"button",14),l(39,"async"),a()()}if(i&2){let d=Se(9),h=Se(11),g=c(1,13,n.state.filteredTests$);r(2),A(c(3,15,n.state.hasTests$));let k=c(5,18,n.state.studentGrades$);r(5),m("ngClass",D(41,As,n.selectedTest==null?null:n.selectedTest.IsPointGrading))("inlineHeader",d)("stickyHeader",h),r(),m("selectedTest",n.selectedTest),r(2),m("sticky",!0)("selectedTest",n.selectedTest),r(3),H(k),r(6),f(c(20,20,"tests.average")),r(3),Ne(" ",c(23,22,"tests.mean"),": ",F(25,26,c(24,24,n.state.meanOfStudentGradesForCourse$),"1-3")," "),r(4),m("ngClass",D(43,An,n.selectedTest===void 0)),r(),v(" ",F(29,31,c(28,29,n.state.meanOfFinalGradesForCourse$),"1-3")," "),r(4),v(" ",F(33,36,c(32,34,n.state.meanOfStudentGradesForCourse$),"1-3")," "),r(3),H(g),r(4),y(c(39,39,n.state.canSetFinalGrade$)?38:-1)}},dependencies:[pe,X,$n,Mn,On,Y,I,Di,Gn,jn],styles:["[_nghost-%COMP%]{--spacer: 16px;--point-input-size: 4em;--grade-input-size: 127px;--points-grade-gap: 1rem;--student-name-column-width: 225px;--student-grade-column-width: calc( var(--spacer) + var(--grade-input-size) + var(--spacer) );--student-average-column-width: 100px;--test-grade-column-width: calc( var(--spacer) + var(--point-input-size) + var(--points-grade-gap) + var(--grade-input-size) + var(--spacer) );--student-grade-column-offset: var(--student-name-column-width);--student-average-column-offset: calc( var(--student-grade-column-offset) + var(--student-grade-column-width) );--test-columns-offset: calc( var(--student-average-column-offset) + var(--student-average-column-width) )}@media (min-width: 1000px){[_nghost-%COMP%]{--student-name-column-width: 275px}}@media (max-width: 767.98px){[_nghost-%COMP%]{--points-grade-gap: calc(.5 * var(--spacer))}}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:1rem}td[_ngcontent-%COMP%]{vertical-align:middle}@media (min-width: 576px){[_nghost-%COMP%]{--point-input-size: 5em}}tr[_ngcontent-%COMP%]:not(.header-collapsible) th.test-grade[_ngcontent-%COMP%], td.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}@media (max-width: 810px){tr[_ngcontent-%COMP%]:not(.header-collapsible):not(.test-point-grading) th.test-grade[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]:not(.test-point-grading) th.student-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.test-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.student-grade[_ngcontent-%COMP%]{width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));min-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));max-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer))}}th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{padding:0;width:auto}@media (max-width: 810px){th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{width:0}}th.test-grade[_ngcontent-%COMP%] .column-title.point-input-container[_ngcontent-%COMP%]{width:var(--point-input-size)}@media (max-width: 810px){.desktop[_ngcontent-%COMP%]:not(.selected), .student-grade[_ngcontent-%COMP%]:not(.selected), .student-average[_ngcontent-%COMP%], .test-grade[_ngcontent-%COMP%]:not(.selected){display:none}table[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%], thead[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}th[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]{display:flex;width:100%}.student-name[_ngcontent-%COMP%]{flex:1;display:block;padding-right:0}.test-grade[_ngcontent-%COMP%]{flex:none;display:block}}@media (min-width: 811px){.mobile[_ngcontent-%COMP%]{display:none}.student-name[_ngcontent-%COMP%]{width:var(--student-name-column-width);min-width:var(--student-name-column-width);max-width:var(--student-name-column-width)}.student-grade[_ngcontent-%COMP%]{width:var(--student-grade-column-width);min-width:var(--student-grade-column-width);max-width:var(--student-grade-column-width)}.student-average[_ngcontent-%COMP%]{width:var(--student-average-column-width);min-width:var(--student-average-column-width);max-width:var(--student-average-column-width)}.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}th.sticky[_ngcontent-%COMP%], td.sticky[_ngcontent-%COMP%]{position:sticky;left:0;background-color:#fff}th.sticky.student-grade[_ngcontent-%COMP%], td.sticky.student-grade[_ngcontent-%COMP%]{left:var(--student-grade-column-offset)}th.sticky.student-average[_ngcontent-%COMP%], td.sticky.student-average[_ngcontent-%COMP%]{left:var(--student-average-column-offset)}}@media (max-width: 1200px){[_nghost-%COMP%]{--student-average-column-width: 1px}.student-average[_ngcontent-%COMP%]{padding:0;overflow:hidden}}@media (min-width: 1201px){.student-average-inline[_ngcontent-%COMP%]{display:none}}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child{text-decoration:underline}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child:hover{text-decoration-color:#ea161f}.student-average-inline[_ngcontent-%COMP%]{color:#4e4e4ef2;font-size:.875rem;line-height:1}@media (min-width: 811px){.table-responsive-wrapper[_ngcontent-%COMP%]{display:block;overflow-x:auto}table[_ngcontent-%COMP%]{border-collapse:separate;border-spacing:0}.action-buttons[_ngcontent-%COMP%]{position:sticky;left:0}}@media (max-width: 810px){.apply-average-button[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]})}}return t})();var Ks=()=>["/events"],Zs=t=>({count:t});function Qs(t,o){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=u();r(),v(" ",F(2,1,e.course.ParticipatingStudents.length===1?"courses.registration":"courses.registrations",D(4,Zs,e.course.ParticipatingStudents.length))," ")}}var Hn=(()=>{class t{constructor(e){this.reportsService=e,this.course$=new q(null),this.reports$=this.course$.pipe(_(i=>i?.Id),Z(),M(i=>i?this.reportsService.getCourseTestsReports(i):N([])),At([]))}ngOnChanges(e){e.course&&this.course$.next(e.course.currentValue)}getDesignation(){return ht(this.course)}static{this.\u0275fac=function(i){return new(i||t)(S(ot))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-header"]],inputs:{course:"course"},features:[ke],decls:12,vars:7,consts:[[3,"link"],[1,"d-flex"],["routerLink","add",1,"edit","btn","btn-primary","btn-icon","ms-2"],[1,"material-icons"],[1,"ms-2",3,"reports"],["id","excel-import"],[1,"d-flex","flex-column","header"],[1,"additional-info"]],template:function(i,n){i&1&&(s(0,"bkd-backlink",0)(1,"div",1)(2,"a",2)(3,"i",3),p(4,"add"),a()(),x(5,"bkd-reports-link",4),l(6,"async"),x(7,"div",5),a()(),s(8,"div",6)(9,"h1"),p(10),a(),T(11,Qs,3,6,"div",7),a()),i&2&&(m("link",Oe(6,Ks)),r(5),m("reports",c(6,4,n.reports$)),r(5),f(n.getDesignation()),r(),y(n.course.ParticipatingStudents?11:-1))},dependencies:[Ae,X,nt,Y,I],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem;border-bottom:1px solid #dee2e6}h1[_ngcontent-%COMP%]{margin-bottom:0}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}"]})}}return t})();var Xs=()=>[],Js=t=>({"visible-on-mobile":t});function ea(t,o){t&1&&x(0,"bkd-spinner")}function ta(t,o){if(t&1){let e=G();s(0,"bkd-select",4),b("valueChange",function(n){E(e);let d=u(2);return w(n&&d.testSelected(n))}),a(),x(1,"bkd-test-edit-grades",5)}if(t&2){u(2);let e=O(6),i=O(8),n=O(10);m("options",e)("value",i)("allowEmpty",!1),r(),m("selectedTest",n)}}function ia(t,o){t&1&&(s(0,"p",2),p(1),l(2,"translate"),a()),t&2&&(r(),f(c(2,1,"tests.no-tests")))}function na(t,o){if(t&1&&(s(0,"a",3),l(1,"async"),s(2,"i",6),p(3,"arrow_right_alt"),a(),s(4,"span",7),p(5),l(6,"translate"),a()()),t&2){let e=u(2),i=O(4),n=O(10);le("href",c(1,3,e.buildLinkToRatingOverview()),_e),m("ngClass",D(7,Js,!i||!n)),r(5),f(c(6,5,"tests.link-to-rating-overview"))}}function ra(t,o){if(t&1&&(x(0,"bkd-tests-header",1),T(1,ta,2,4)(2,ia,3,3,"p",2)(3,na,7,9,"a",3),l(4,"async")),t&2){let e=u(),i=O(0),n=O(2);m("course",i),r(),y(n.length>0?1:2),r(2),y(c(4,3,e.state.canSetFinalGrade$)?3:-1)}}var Nn=(()=>{class t{constructor(e,i,n){this.settings=e,this.state=i,this.translate=n,this.selectTest$=new te,this.testOptions$=this.state.tests$.pipe(_(d=>[{Key:-1,Value:this.translate.instant("tests.grade")},...d.map(h=>({Key:h.Id,Value:h.Designation}))]),Z()),this.selectedTestId$=ze(this.selectTest$,this.state.tests$.pipe(ae(1),_(d=>d[0]?.Id))).pipe(Z()),this.selectedTest$=this.selectedTestId$.pipe(M(d=>this.state.tests$.pipe(_(h=>h.find(g=>g.Id===d)))),Z())}testSelected(e){this.selectTest$.next(e)}buildLinkToRatingOverview(){return this.state.course$.pipe(ae(1),_(e=>this.settings.eventlist.evaluation.replace(":id",String(e.Id))))}static{this.\u0275fac=function(i){return new(i||t)(S(ce),S(K),S(se))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-list"]],decls:16,vars:22,consts:[[1,"bkd-container"],[3,"course"],[1,"mt-3","px-3"],[1,"rating-overview","d-flex","justify-content-end","pe-3","border-top","pt-3",3,"ngClass","href"],["width","100%",1,"tests-dropdown",3,"valueChange","options","value","allowEmpty"],[3,"selectedTest"],[1,"material-icons","fw-bold"],[1,"ps-1"]],template:function(i,n){if(i&1&&(R(0),l(1,"async"),R(2),l(3,"async"),R(4),l(5,"async"),R(6),l(7,"async"),R(8),l(9,"async"),R(10),l(11,"async"),s(12,"div",0),T(13,ea,1,0,"bkd-spinner"),l(14,"async"),T(15,ra,5,5),a()),i&2){let d;A(c(1,1,n.state.course$)),r(2),A((d=c(3,4,n.state.tests$))!==null&&d!==void 0?d:Oe(21,Xs)),r(2),A(c(5,7,n.state.hasTests$)),r(2),A(c(7,10,n.testOptions$)),r(2),A(c(9,13,n.selectedTestId$)),r(2),A(c(11,16,n.selectedTest$)),r(3),y(c(14,19,n.state.loading$)?13:15)}},dependencies:[Hn,Be,Vn,pe,ue,Y,I],styles:[".tests-dropdown[_ngcontent-%COMP%]{display:block;padding:1rem 0}@media (min-width: 811px){.tests-dropdown[_ngcontent-%COMP%]{display:none}}a.rating-overview[_ngcontent-%COMP%]{text-decoration:none}a.rating-overview[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}a.rating-overview[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}@media (max-width: 810px){a.rating-overview[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]})}}return t})();var yt=(()=>{class t{constructor(e,i){this.state=e,this.route=i,this.courseId$=this.route.paramMap.pipe(_(n=>Number(n.get("id"))),Z()),this.destroy$=new te}ngOnInit(){this.courseId$.pipe(Ce(this.destroy$)).subscribe(e=>this.state.setCourseId(e))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(i){return new(i||t)(S(K),S(ne))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests"]],features:[ie([K])],decls:1,vars:0,template:function(i,n){i&1&&x(0,"router-outlet")},dependencies:[ye],encapsulation:2})}}return t})();function Un(t){return{path:t,component:mn,children:[{path:"",component:pn},{path:"study-course-student/:id",component:cn},It]}}var xc=[{path:"",component:hn,children:[{path:"",component:un},{path:"current",component:tn,children:[{path:"",component:en},Un(":id")]},{path:":id",component:yt,children:[{path:"tests",component:Nn},Un("students")]},{path:":id/tests/:testId/edit",component:yt,children:[{path:"",component:kn}]},{path:":id/tests/add",component:yt,children:[{path:"",component:wn}]},{path:":id/tests",children:[It]}]}];export{Yi as a,Un as b,xc as c}; diff --git a/public/apps/webapp-schulverwaltung/chunk-34ZOBT6Z.js b/public/apps/webapp-schulverwaltung/chunk-2W7IS4PN.js similarity index 99% rename from public/apps/webapp-schulverwaltung/chunk-34ZOBT6Z.js rename to public/apps/webapp-schulverwaltung/chunk-2W7IS4PN.js index 75778e6e..1102b685 100644 --- a/public/apps/webapp-schulverwaltung/chunk-34ZOBT6Z.js +++ b/public/apps/webapp-schulverwaltung/chunk-2W7IS4PN.js @@ -6,4 +6,4 @@ ${n.map((r,o)=>`${o+1}) ${r.toString()}`).join(` `&&e.charAt(1)==T0?e.slice(2):e;let o=Qe(t);if(Array.isArray(t))o=t.map(Qe).join(" -> ");else if(typeof t=="object"){let i=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];i.push(s+":"+(typeof a=="string"?JSON.stringify(a):Qe(a)))}o=`{${i.join(", ")}}`}return`${n}${r?"("+r+")":""}[${o}]: ${e.replace(S0,` `)}`}var Af=gv(av("Optional"),8);var mv=gv(av("SkipSelf"),4);function Sr(e,t){let n=e.hasOwnProperty(eu);return n?e[eu]:null}function F0(e,t,n){if(e.length!==t.length)return!1;for(let r=0;rArray.isArray(n)?Nf(n,t):t(n))}function vv(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function nu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function L0(e,t){let n=[];for(let r=0;rt;){let i=o-2;e[o]=e[i],o--}e[t]=n,e[t+1]=r}}function Ru(e,t,n){let r=es(e,t);return r>=0?e[r|1]=n:(r=~r,k0(e,r,t,n)),r}function id(e,t){let n=es(e,t);if(n>=0)return e[n|1]}function es(e,t){return j0(e,t,1)}function j0(e,t,n){let r=0,o=e.length>>n;for(;o!==r;){let i=r+(o-r>>1),s=e[i<t?o=i:r=i+1}return~(o<{n.push(s)};return Nf(t,s=>{let a=s;Cd(a,i,[],r)&&(o||=[],o.push(a))}),o!==void 0&&Iv(o,i),n}function Iv(e,t){for(let n=0;n{t(i,r)})}}function Cd(e,t,n,r){if(e=Oe(e),!e)return!1;let o=null,i=gm(e),s=!i&&$n(e);if(!i&&!s){let u=e.ngModule;if(i=gm(u),i)o=u;else return!1}else{if(s&&!s.standalone)return!1;o=e}let a=r.has(o);if(s){if(a)return!1;if(r.add(o),s.dependencies){let u=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of u)Cd(l,t,n,r)}}else if(i){if(i.imports!=null&&!a){r.add(o);let l;try{Nf(i.imports,c=>{Cd(c,t,n,r)&&(l||=[],l.push(c))})}finally{}l!==void 0&&Iv(l,t)}if(!a){let l=Sr(o)||(()=>new o);t({provide:o,useFactory:l,deps:Ye},o),t({provide:Dv,useValue:o,multi:!0},o),t({provide:bo,useValue:()=>I(o),multi:!0},o)}let u=i.providers;if(u!=null&&!a){let l=e;Of(u,c=>{t(c,l)})}}else return!1;return o!==e&&e.providers!==void 0}function Of(e,t){for(let n of e)fv(n)&&(n=n.\u0275providers),Array.isArray(n)?Of(n,t):t(n)}var U0=Q({provide:String,useValue:Q});function _v(e){return e!==null&&typeof e=="object"&&U0 in e}function B0(e){return!!(e&&e.useExisting)}function $0(e){return!!(e&&e.useFactory)}function Eo(e){return typeof e=="function"}function H0(e){return!!e.useClass}var Ou=new E(""),Wa={},z0={},sd;function Fu(){return sd===void 0&&(sd=new ru),sd}var Je=class{},zi=class extends Je{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,n,r,o){super(),this.parent=n,this.source=r,this.scopes=o,Ed(t,s=>this.processProvider(s)),this.records.set(yv,mo(void 0,this)),o.has("environment")&&this.records.set(Je,mo(void 0,this));let i=this.records.get(Ou);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Dv,Ye,U.Self))}destroy(){Vi(this),this._destroyed=!0;let t=V(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),V(t)}}onDestroy(t){return Vi(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){Vi(this);let n=Vn(this),r=Ze(void 0),o;try{return t()}finally{Vn(n),Ze(r)}}get(t,n=Hi,r=U.Default){if(Vi(this),t.hasOwnProperty(vm))return t[vm](this);r=Nu(r);let o,i=Vn(this),s=Ze(void 0);try{if(!(r&U.SkipSelf)){let u=this.records.get(t);if(u===void 0){let l=K0(t)&&Au(t);l&&this.injectableDefInScope(l)?u=mo(bd(t),Wa):u=null,this.records.set(t,u)}if(u!=null)return this.hydrate(t,u)}let a=r&U.Self?Fu():this.parent;return n=r&U.Optional&&n===Hi?null:n,a.get(t,n)}catch(a){if(a.name==="NullInjectorError"){if((a[tu]=a[tu]||[]).unshift(Qe(t)),i)throw a;return R0(a,t,"R3InjectorError",this.source)}else throw a}finally{Ze(s),Vn(i)}}resolveInjectorInitializers(){let t=V(null),n=Vn(this),r=Ze(void 0),o;try{let i=this.get(bo,Ye,U.Self);for(let s of i)s()}finally{Vn(n),Ze(r),V(t)}}toString(){let t=[],n=this.records;for(let r of n.keys())t.push(Qe(r));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=Oe(t);let n=Eo(t)?t:Oe(t&&t.provide),r=q0(t);if(!Eo(t)&&t.multi===!0){let o=this.records.get(n);o||(o=mo(void 0,Wa,!0),o.factory=()=>wd(o.multi),this.records.set(n,o)),n=t,o.multi.push(t)}this.records.set(n,r)}hydrate(t,n){let r=V(null);try{return n.value===Wa&&(n.value=z0,n.value=n.factory()),typeof n.value=="object"&&n.value&&Z0(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{V(r)}}injectableDefInScope(t){if(!t.providedIn)return!1;let n=Oe(t.providedIn);return typeof n=="string"?n==="any"||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){let n=this._onDestroyHooks.indexOf(t);n!==-1&&this._onDestroyHooks.splice(n,1)}};function bd(e){let t=Au(e),n=t!==null?t.factory:Sr(e);if(n!==null)return n;if(e instanceof E)throw new b(204,!1);if(e instanceof Function)return G0(e);throw new b(204,!1)}function G0(e){if(e.length>0)throw new b(204,!1);let n=v0(e);return n!==null?()=>n.factory(e):()=>new e}function q0(e){if(_v(e))return mo(void 0,e.useValue);{let t=xv(e);return mo(t,Wa)}}function xv(e,t,n){let r;if(Eo(e)){let o=Oe(e);return Sr(o)||bd(o)}else if(_v(e))r=()=>Oe(e.useValue);else if($0(e))r=()=>e.useFactory(...wd(e.deps||[]));else if(B0(e))r=()=>I(Oe(e.useExisting));else{let o=Oe(e&&(e.useClass||e.provide));if(W0(e))r=()=>new o(...wd(e.deps));else return Sr(o)||bd(o)}return r}function Vi(e){if(e.destroyed)throw new b(205,!1)}function mo(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function W0(e){return!!e.deps}function Z0(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function K0(e){return typeof e=="function"||typeof e=="object"&&e instanceof E}function Ed(e,t){for(let n of e)Array.isArray(n)?Ed(n,t):n&&fv(n)?Ed(n.\u0275providers,t):t(n)}function st(e,t){e instanceof zi&&Vi(e);let n,r=Vn(e),o=Ze(void 0);try{return t()}finally{Vn(r),Ze(o)}}function Sv(){return pv()!==void 0||M0()!=null}function Pu(e){if(!Sv())throw new b(-203,!1)}function Y0(e){return typeof e=="function"}var ln=0,O=1,M=2,Be=3,At=4,nt=5,Io=6,ou=7,Fe=8,_o=9,on=10,ue=11,Gi=12,Dm=13,Oo=14,Xe=15,Tr=16,vo=17,sn=18,Lu=19,Tv=20,Un=21,Za=22,Mr=23,it=24,ve=25,Mv=1;var Ar=7,iu=8,xo=9,Ue=10,su=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(su||{});function Bn(e){return Array.isArray(e)&&typeof e[Mv]=="object"}function cn(e){return Array.isArray(e)&&e[Mv]===!0}function Ff(e){return(e.flags&4)!==0}function ku(e){return e.componentOffset>-1}function ju(e){return(e.flags&1)===1}function Hn(e){return!!e.template}function Id(e){return(e[M]&512)!==0}var _d=class{previousValue;currentValue;firstChange;constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}};function Av(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var gt=(()=>{let e=()=>Nv;return e.ngInherit=!0,e})();function Nv(e){return e.type.prototype.ngOnChanges&&(e.setInput=J0),Q0}function Q0(){let e=Ov(this),t=e?.current;if(t){let n=e.previous;if(n===rn)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function J0(e,t,n,r,o){let i=this.declaredInputs[r],s=Ov(e)||X0(e,{previous:rn,current:null}),a=s.current||(s.current={}),u=s.previous,l=u[i];a[i]=new _d(l&&l.currentValue,n,u===rn),Av(e,t,o,n)}var Rv="__ngSimpleChanges__";function Ov(e){return e[Rv]||null}function X0(e,t){return e[Rv]=t}var wm=null;var Vt=function(e,t,n){wm?.(e,t,n)},Fv="svg",Pv="math";function Bt(e){for(;Array.isArray(e);)e=e[ln];return e}function Lv(e,t){return Bt(t[e])}function mt(e,t){return Bt(t[e.index])}function Pf(e,t){return e.data[t]}function ts(e,t){return e[t]}function Zn(e,t){let n=t[e];return Bn(n)?n:n[ln]}function eS(e){return(e[M]&4)===4}function Lf(e){return(e[M]&128)===128}function tS(e){return cn(e[Be])}function zn(e,t){return t==null?null:e[t]}function kv(e){e[vo]=0}function kf(e){e[M]&1024||(e[M]|=1024,Lf(e)&&ns(e))}function nS(e,t){for(;e>0;)t=t[Oo],e--;return t}function Vu(e){return!!(e[M]&9216||e[it]?.dirty)}function xd(e){e[on].changeDetectionScheduler?.notify(9),e[M]&64&&(e[M]|=1024),Vu(e)&&ns(e)}function ns(e){e[on].changeDetectionScheduler?.notify(0);let t=Nr(e);for(;t!==null&&!(t[M]&8192||(t[M]|=8192,!Lf(t)));)t=Nr(t)}function jv(e,t){if((e[M]&256)===256)throw new b(911,!1);e[Un]===null&&(e[Un]=[]),e[Un].push(t)}function rS(e,t){if(e[Un]===null)return;let n=e[Un].indexOf(t);n!==-1&&e[Un].splice(n,1)}function Nr(e){let t=e[Be];return cn(t)?t[Be]:t}var L={lFrame:Wv(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Sd=!1;function oS(){return L.lFrame.elementDepthCount}function iS(){L.lFrame.elementDepthCount++}function sS(){L.lFrame.elementDepthCount--}function Vv(){return L.bindingsEnabled}function Uv(){return L.skipHydrationRootTNode!==null}function aS(e){return L.skipHydrationRootTNode===e}function uS(){L.skipHydrationRootTNode=null}function x(){return L.lFrame.lView}function re(){return L.lFrame.tView}function r9(e){return L.lFrame.contextLView=e,e[Fe]}function o9(e){return L.lFrame.contextLView=null,e}function Se(){let e=Bv();for(;e!==null&&e.type===64;)e=e.parent;return e}function Bv(){return L.lFrame.currentTNode}function lS(){let e=L.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Kn(e,t){let n=L.lFrame;n.currentTNode=e,n.isParent=t}function jf(){return L.lFrame.isParent}function Vf(){L.lFrame.isParent=!1}function $v(){return L.lFrame.contextLView}function Hv(){return Sd}function au(e){let t=Sd;return Sd=e,t}function Yn(){let e=L.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Uf(){return L.lFrame.bindingIndex}function cS(e){return L.lFrame.bindingIndex=e}function Vr(){return L.lFrame.bindingIndex++}function rs(e){let t=L.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function dS(){return L.lFrame.inI18n}function fS(e,t){let n=L.lFrame;n.bindingIndex=n.bindingRootIndex=e,Td(t)}function pS(){return L.lFrame.currentDirectiveIndex}function Td(e){L.lFrame.currentDirectiveIndex=e}function hS(e){let t=L.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function zv(){return L.lFrame.currentQueryIndex}function Bf(e){L.lFrame.currentQueryIndex=e}function gS(e){let t=e[O];return t.type===2?t.declTNode:t.type===1?e[nt]:null}function Gv(e,t,n){if(n&U.SkipSelf){let o=t,i=e;for(;o=o.parent,o===null&&!(n&U.Host);)if(o=gS(i),o===null||(i=i[Oo],o.type&10))break;if(o===null)return!1;t=o,e=i}let r=L.lFrame=qv();return r.currentTNode=t,r.lView=e,!0}function $f(e){let t=qv(),n=e[O];L.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function qv(){let e=L.lFrame,t=e===null?null:e.child;return t===null?Wv(e):t}function Wv(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function Zv(){let e=L.lFrame;return L.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Kv=Zv;function Hf(){let e=Zv();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function mS(e){return(L.lFrame.contextLView=nS(e,L.lFrame.contextLView))[Fe]}function vt(){return L.lFrame.selectedIndex}function Rr(e){L.lFrame.selectedIndex=e}function os(){let e=L.lFrame;return Pf(e.tView,e.selectedIndex)}function i9(){L.lFrame.currentNamespace=Fv}function s9(){L.lFrame.currentNamespace=Pv}function vS(){return L.lFrame.currentNamespace}var Yv=!0;function Uu(){return Yv}function Bu(e){Yv=e}function yS(e,t,n){let{ngOnChanges:r,ngOnInit:o,ngDoCheck:i}=t.type.prototype;if(r){let s=Nv(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}o&&(n.preOrderHooks??=[]).push(0-e,o),i&&((n.preOrderHooks??=[]).push(e,i),(n.preOrderCheckHooks??=[]).push(e,i))}function $u(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n=r)break}else t[u]<0&&(e[vo]+=65536),(a>14>16&&(e[M]&3)===t&&(e[M]+=16384,Cm(a,i)):Cm(a,i)}var Co=-1,Or=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,n,r){this.factory=t,this.canSeeViewProviders=n,this.injectImpl=r}};function wS(e){return e instanceof Or}function CS(e){return(e.flags&8)!==0}function bS(e){return(e.flags&16)!==0}function Md(e,t,n){let r=0;for(;rt){s=i-1;break}}}for(;i>16}function lu(e,t){let n=IS(e),r=t;for(;n>0;)r=r[Oo],n--;return r}var Nd=!0;function cu(e){let t=Nd;return Nd=e,t}var _S=256,ey=_S-1,ty=5,xS=0,Ut={};function SS(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Bi)&&(r=n[Bi]),r==null&&(r=n[Bi]=xS++);let o=r&ey,i=1<>ty)]|=i}function du(e,t){let n=ny(e,t);if(n!==-1)return n;let r=t[O];r.firstCreatePass&&(e.injectorIndex=t.length,ld(r.data,e),ld(t,null),ld(r.blueprint,null));let o=zf(e,t),i=e.injectorIndex;if(Xv(o)){let s=uu(o),a=lu(o,t),u=a[O].data;for(let l=0;l<8;l++)t[i+l]=a[s+l]|u[s+l]}return t[i+8]=o,i}function ld(e,t){e.push(0,0,0,0,0,0,0,0,t)}function ny(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function zf(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,o=t;for(;o!==null;){if(r=ay(o),r===null)return Co;if(n++,o=o[Oo],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Co}function Rd(e,t,n){SS(e,t,n)}function TS(e,t){if(t==="class")return e.classes;if(t==="style")return e.styles;let n=e.attrs;if(n){let r=n.length,o=0;for(;o>20,d=r?a:a+c,f=o?a+c:l;for(let p=d;p=u&&h.type===n)return p}if(o){let p=s[u];if(p&&Hn(p)&&p.type===n)return u}return null}function Fr(e,t,n,r){let o=e[n],i=t.data;if(wS(o)){let s=o;s.resolving&&I0(E0(i[n]));let a=cu(s.canSeeViewProviders);s.resolving=!0;let u,l=s.injectImpl?Ze(s.injectImpl):null,c=Gv(e,r,U.Default);try{o=e[n]=s.factory(void 0,i,e,r),t.firstCreatePass&&n>=r.directiveStart&&yS(n,i[n],t)}finally{l!==null&&Ze(l),cu(a),s.resolving=!1,Kv()}}return o}function AS(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Bi)?e[Bi]:void 0;return typeof t=="number"?t>=0?t&ey:NS:t}function Em(e,t,n){let r=1<>ty)]&r)}function Im(e,t){return!(e&U.Self)&&!(e&U.Host&&t)}var xr=class{_tNode;_lView;constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return iy(this._tNode,this._lView,t,Nu(r),n)}};function NS(){return new xr(Se(),x())}function Le(e){return Xi(()=>{let t=e.prototype.constructor,n=t[eu]||Od(t),r=Object.prototype,o=Object.getPrototypeOf(e.prototype).constructor;for(;o&&o!==r;){let i=o[eu]||Od(o);if(i&&i!==n)return i;o=Object.getPrototypeOf(o)}return i=>new i})}function Od(e){return uv(e)?()=>{let t=Od(Oe(e));return t&&t()}:Sr(e)}function RS(e,t,n,r,o){let i=e,s=t;for(;i!==null&&s!==null&&s[M]&2048&&!(s[M]&512);){let a=sy(i,s,n,r|U.Self,Ut);if(a!==Ut)return a;let u=i.parent;if(!u){let l=s[Tv];if(l){let c=l.get(n,Ut,r);if(c!==Ut)return c}u=ay(s),s=s[Oo]}i=u}return o}function ay(e){let t=e[O],n=t.type;return n===2?t.declTNode:n===1?e[nt]:null}function Gf(e){return TS(Se(),e)}function _m(e,t=null,n=null,r){let o=uy(e,t,n,r);return o.resolveInjectorInitializers(),o}function uy(e,t=null,n=null,r,o=new Set){let i=[n||Ye,V0(e)];return r=r||(typeof e=="object"?void 0:Qe(e)),new zi(i,t||Fu(),r||null,o)}var et=class e{static THROW_IF_NOT_FOUND=Hi;static NULL=new ru;static create(t,n){if(Array.isArray(t))return _m({name:""},n,t,"");{let r=t.name??"";return _m({name:r},t.parent,t.providers,r)}}static \u0275prov=C({token:e,providedIn:"any",factory:()=>I(yv)});static __NG_ELEMENT_ID__=-1};var OS=new E("");OS.__NG_ELEMENT_ID__=e=>{let t=Se();if(t===null)throw new b(204,!1);if(t.type&2)return t.value;if(e&U.Optional)return null;throw new b(204,!1)};var ly=!1,Fo=(()=>{class e{static __NG_ELEMENT_ID__=FS;static __NG_ENV_ID__=n=>n}return e})(),fu=class extends Fo{_lView;constructor(t){super(),this._lView=t}onDestroy(t){return jv(this._lView,t),()=>rS(this._lView,t)}};function FS(){return new fu(x())}var Pr=class{},qf=new E("",{providedIn:"root",factory:()=>!1});var cy=new E(""),dy=new E(""),dn=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Ne(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})();var Fd=class extends te{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,Sv()&&(this.destroyRef=v(Fo,{optional:!0})??void 0,this.pendingTasks=v(dn,{optional:!0})??void 0)}emit(t){let n=V(null);try{super.next(t)}finally{V(n)}}subscribe(t,n,r){let o=t,i=n||(()=>null),s=r;if(t&&typeof t=="object"){let u=t;o=u.next?.bind(u),i=u.error?.bind(u),s=u.complete?.bind(u)}this.__isAsync&&(i=this.wrapInTimeout(i),o&&(o=this.wrapInTimeout(o)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:o,error:i,complete:s});return t instanceof ae&&t.add(a),a}wrapInTimeout(t){return n=>{let r=this.pendingTasks?.add();setTimeout(()=>{t(n),r!==void 0&&this.pendingTasks?.remove(r)})}}},Y=Fd;function Wi(...e){}function fy(e){let t,n;function r(){e=Wi;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function xm(e){return queueMicrotask(()=>e()),()=>{e=Wi}}var Wf="isAngularZone",pu=Wf+"_ID",PS=0,me=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Y(!1);onMicrotaskEmpty=new Y(!1);onStable=new Y(!1);onError=new Y(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:i=ly}=t;if(typeof Zone>"u")throw new b(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!o&&r,s.shouldCoalesceRunChangeDetection=o,s.callbackScheduled=!1,s.scheduleInRootZone=i,jS(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Wf)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new b(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new b(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,o){let i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+o,t,LS,Wi,Wi);try{return i.runTask(s,n,r)}finally{i.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},LS={};function Zf(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function kS(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){fy(()=>{e.callbackScheduled=!1,Pd(e),e.isCheckStableRunning=!0,Zf(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Pd(e)}function jS(e){let t=()=>{kS(e)},n=PS++;e._inner=e._inner.fork({name:"angular",properties:{[Wf]:!0,[pu]:n,[pu+n]:!0},onInvokeTask:(r,o,i,s,a,u)=>{if(VS(u))return r.invokeTask(i,s,a,u);try{return Sm(e),r.invokeTask(i,s,a,u)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),Tm(e)}},onInvoke:(r,o,i,s,a,u,l)=>{try{return Sm(e),r.invoke(i,s,a,u,l)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!US(u)&&t(),Tm(e)}},onHasTask:(r,o,i,s)=>{r.hasTask(i,s),o===i&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,Pd(e),Zf(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,o,i,s)=>(r.handleError(i,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function Pd(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function Sm(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Tm(e){e._nesting--,Zf(e)}var Ld=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Y;onMicrotaskEmpty=new Y;onStable=new Y;onError=new Y;run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,o){return t.apply(n,r)}};function VS(e){return py(e,"__ignore_ng_zone__")}function US(e){return py(e,"__scheduler_tick__")}function py(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Nt=class{_console=console;handleError(t){this._console.error("ERROR",t)}},BS=new E("",{providedIn:"root",factory:()=>{let e=v(me),t=v(Nt);return n=>e.runOutsideAngular(()=>t.handleError(n))}}),hu=class{destroyed=!1;listeners=null;errorHandler=v(Nt,{optional:!0});destroyRef=v(Fo);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(t){if(this.destroyed)throw new b(953,!1);return(this.listeners??=[]).push(t),{unsubscribe:()=>{let n=this.listeners?.indexOf(t);n!==void 0&&n!==-1&&this.listeners?.splice(n,1)}}}emit(t){if(this.destroyed)throw new b(953,!1);if(this.listeners===null)return;let n=V(null);try{for(let r of this.listeners)try{r(t)}catch(o){this.errorHandler?.handleError(o)}}finally{V(n)}}};function a9(e){return new hu}function Mm(e,t){return sv(e,t)}function $S(e){return sv(Mu,e)}var hy=(Mm.required=$S,Mm);function HS(){return Po(Se(),x())}function Po(e,t){return new Te(mt(e,t))}var Te=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=HS}return e})();function zS(e){return e instanceof Te?e.nativeElement:e}function GS(){return this._results[Symbol.iterator]()}var kd=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new te}constructor(t=!1){this._emitDistinctChangesOnly=t}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;let r=P0(t);(this._changesDetected=!F0(this._results,r,n))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=GS};function gy(e){return(e.flags&128)===128}var my=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(my||{}),vy=new Map,qS=0;function WS(){return qS++}function ZS(e){vy.set(e[Lu],e)}function jd(e){vy.delete(e[Lu])}var Am="__ngContext__";function Gn(e,t){Bn(t)?(e[Am]=t[Lu],ZS(t)):e[Am]=t}function yy(e){return wy(e[Gi])}function Dy(e){return wy(e[At])}function wy(e){for(;e!==null&&!cn(e);)e=e[At];return e}var Vd;function Cy(e){Vd=e}function KS(){if(Vd!==void 0)return Vd;if(typeof document<"u")return document;throw new b(210,!1)}var Kf=new E("",{providedIn:"root",factory:()=>YS}),YS="ng",Yf=new E(""),fn=new E("",{providedIn:"platform",factory:()=>"unknown"});var u9=new E(""),Qf=new E("",{providedIn:"root",factory:()=>KS().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var QS="h",JS="b";var by=!1,XS=new E("",{providedIn:"root",factory:()=>by});var Jf=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(Jf||{}),Hu=new E(""),Nm=new Set;function yt(e){Nm.has(e)||(Nm.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var yo=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(yo||{}),Ey=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})(),eT=[yo.EarlyRead,yo.Write,yo.MixedReadWrite,yo.Read],tT=(()=>{class e{ngZone=v(me);scheduler=v(Pr);errorHandler=v(Nt,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){v(Hu,{optional:!0})}execute(){this.executing=!0;for(let n of eT)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[n]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>r.hooks[n](r.pipelinedValue),r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(8),this.deferredRegistrations.clear()}register(n){this.executing?this.deferredRegistrations.add(n):(this.sequences.add(n),this.scheduler.notify(7))}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(Jf.AFTER_NEXT_RENDER,n):n()}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})(),Ud=class{impl;hooks;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,n,r,o,i=null){this.impl=t,this.hooks=n,this.once=r,this.snapshot=i,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.()}};function nT(e,t){!t?.injector&&Pu(nT);let n=t?.injector??v(et);return yt("NgAfterRender"),_y(e,n,t,!1)}function Iy(e,t){!t?.injector&&Pu(Iy);let n=t?.injector??v(et);return yt("NgAfterNextRender"),_y(e,n,t,!0)}function rT(e,t){if(e instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[t]=e,n}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function _y(e,t,n,r){let o=t.get(Ey);o.impl??=t.get(tT);let i=t.get(Hu,null,{optional:!0}),s=n?.phase??yo.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(Fo):null,u=new Ud(o.impl,rT(e,s),r,a,i?.snapshot(null));return o.impl.register(u),u}var oT=()=>null;function Xf(e,t,n=!1){return oT(e,t,n)}var $t=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}($t||{}),Ba;function iT(){if(Ba===void 0&&(Ba=null,nn.trustedTypes))try{Ba=nn.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Ba}function zu(e){return iT()?.createHTML(e)||e}var $a;function sT(){if($a===void 0&&($a=null,nn.trustedTypes))try{$a=nn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return $a}function Rm(e){return sT()?.createScriptURL(e)||e}var an=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${ov})`}},Bd=class extends an{getTypeName(){return"HTML"}},$d=class extends an{getTypeName(){return"Style"}},Hd=class extends an{getTypeName(){return"Script"}},zd=class extends an{getTypeName(){return"URL"}},Gd=class extends an{getTypeName(){return"ResourceURL"}};function Rt(e){return e instanceof an?e.changingThisBreaksApplicationSecurity:e}function Qn(e,t){let n=aT(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${ov})`)}return n===t}function aT(e){return e instanceof an&&e.getTypeName()||null}function xy(e){return new Bd(e)}function Sy(e){return new $d(e)}function Ty(e){return new Hd(e)}function My(e){return new zd(e)}function Ay(e){return new Gd(e)}function uT(e){let t=new Wd(e);return lT()?new qd(t):t}var qd=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{let n=new window.DOMParser().parseFromString(zu(t),"text/html").body;return n===null?this.inertDocumentHelper.getInertBodyElement(t):(n.firstChild?.remove(),n)}catch{return null}}},Wd=class{defaultDoc;inertDocument;constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let n=this.inertDocument.createElement("template");return n.innerHTML=zu(t),n}};function lT(){try{return!!new window.DOMParser().parseFromString(zu(""),"text/html")}catch{return!1}}var cT=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Gu(e){return e=String(e),e.match(cT)?e:"unsafe:"+e}function pn(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function is(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var Ny=pn("area,br,col,hr,img,wbr"),Ry=pn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Oy=pn("rp,rt"),dT=is(Oy,Ry),fT=is(Ry,pn("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),pT=is(Oy,pn("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Om=is(Ny,fT,pT,dT),Fy=pn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),hT=pn("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),gT=pn("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),mT=is(Fy,hT,gT),vT=pn("script,style,template"),Zd=class{sanitizedSomething=!1;buf=[];sanitizeChildren(t){let n=t.firstChild,r=!0,o=[];for(;n;){if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild){o.push(n),n=wT(n);continue}for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let i=DT(n);if(i){n=i;break}n=o.pop()}}return this.buf.join("")}startElement(t){let n=Fm(t).toLowerCase();if(!Om.hasOwnProperty(n))return this.sanitizedSomething=!0,!vT.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);let r=t.attributes;for(let o=0;o"),!0}endElement(t){let n=Fm(t).toLowerCase();Om.hasOwnProperty(n)&&!Ny.hasOwnProperty(n)&&(this.buf.push(""))}chars(t){this.buf.push(Pm(t))}};function yT(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function DT(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw Py(t);return t}function wT(e){let t=e.firstChild;if(t&&yT(e,t))throw Py(t);return t}function Fm(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function Py(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var CT=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,bT=/([^\#-~ |!])/g;function Pm(e){return e.replace(/&/g,"&").replace(CT,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(bT,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}var Ha;function Ly(e,t){let n=null;try{Ha=Ha||uT(e);let r=t?String(t):"";n=Ha.getInertBodyElement(r);let o=5,i=r;do{if(o===0)throw new Error("Failed to sanitize html because the input is unstable");o--,r=i,i=n.innerHTML,n=Ha.getInertBodyElement(r)}while(r!==i);let a=new Zd().sanitizeChildren(Lm(n)||n);return zu(a)}finally{if(n){let r=Lm(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function Lm(e){return"content"in e&&ET(e)?e.content:null}function ET(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var zt=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(zt||{});function IT(e){let t=jy();return t?t.sanitize(zt.URL,e)||"":Qn(e,"URL")?Rt(e):Gu(Ke(e))}function _T(e){let t=jy();if(t)return Rm(t.sanitize(zt.RESOURCE_URL,e)||"");if(Qn(e,"ResourceURL"))return Rm(Rt(e));throw new b(904,!1)}function xT(e,t){return t==="src"&&(e==="embed"||e==="frame"||e==="iframe"||e==="media"||e==="script")||t==="href"&&(e==="base"||e==="link")?_T:IT}function ky(e,t,n){return xT(t,n)(e)}function jy(){let e=x();return e&&e[on].sanitizer}var ST=/^>|^->||--!>|)/g,MT="\u200B$1\u200B";function AT(e){return e.replace(ST,t=>t.replace(TT,MT))}function Vy(e){return e instanceof Function?e():e}var qn=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(qn||{}),Ht=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Ht||{}),NT;function ep(e,t){return NT(e,t)}function Do(e,t,n,r,o){if(r!=null){let i,s=!1;cn(r)?i=r:Bn(r)&&(s=!0,r=r[ln]);let a=Bt(r);e===0&&n!==null?o==null?zy(t,n,a):gu(t,n,a,o||null,!0):e===1&&n!==null?gu(t,n,a,o||null,!0):e===2?GT(t,a,s):e===3&&t.destroyNode(a),i!=null&&WT(t,e,i,n,o)}}function RT(e,t){return e.createText(t)}function OT(e,t,n){e.setValue(t,n)}function FT(e,t){return e.createComment(AT(t))}function Uy(e,t,n){return e.createElement(t,n)}function PT(e,t){By(e,t),t[ln]=null,t[nt]=null}function LT(e,t,n,r,o,i){r[ln]=o,r[nt]=t,Zu(e,r,n,1,o,i)}function By(e,t){t[on].changeDetectionScheduler?.notify(10),Zu(e,t,t[ue],2,null,null)}function kT(e){let t=e[Gi];if(!t)return cd(e[O],e);for(;t;){let n=null;if(Bn(t))n=t[Gi];else{let r=t[Ue];r&&(n=r)}if(!n){for(;t&&!t[At]&&t!==e;)Bn(t)&&cd(t[O],t),t=t[Be];t===null&&(t=e),Bn(t)&&cd(t[O],t),n=t&&t[At]}t=n}}function jT(e,t,n,r){let o=Ue+r,i=n.length;r>0&&(n[o-1][At]=t),r0&&(e[n-1][At]=r[At]);let i=nu(e,Ue+t);PT(r[O],r);let s=i[sn];s!==null&&s.detachView(i[O]),r[Be]=null,r[At]=null,r[M]&=-129}return r}function qu(e,t){if(!(t[M]&256)){let n=t[ue];n.destroyNode&&Zu(e,t,n,3,null,null),kT(t)}}function cd(e,t){if(t[M]&256)return;let n=V(null);try{t[M]&=-129,t[M]|=256,t[it]&&ro(t[it]),UT(e,t),VT(e,t),t[O].type===1&&t[ue].destroy();let r=t[Tr];if(r!==null&&cn(t[Be])){r!==t[Be]&&tp(r,t);let o=t[sn];o!==null&&o.detachView(e)}jd(t)}finally{V(n)}}function VT(e,t){let n=e.cleanup,r=t[ou];if(n!==null)for(let s=0;s=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[ou]=null);let o=t[Un];if(o!==null){t[Un]=null;for(let s=0;s-1){let{encapsulation:i}=e.data[r.directiveStart+o];if(i===$t.None||i===$t.Emulated)return null}return mt(r,n)}}function gu(e,t,n,r,o){e.insertBefore(t,n,r,o)}function zy(e,t,n){e.appendChild(t,n)}function km(e,t,n,r,o){r!==null?gu(e,t,n,r,o):zy(e,t,n)}function Gy(e,t){return e.parentNode(t)}function $T(e,t){return e.nextSibling(t)}function qy(e,t,n){return zT(e,t,n)}function HT(e,t,n){return e.type&40?mt(e,n):null}var zT=HT,jm;function Wu(e,t,n,r){let o=Hy(e,r,t),i=t[ue],s=r.parent||t[nt],a=qy(s,r,t);if(o!=null)if(Array.isArray(n))for(let u=0;u-1){let i;for(;++oi?d="":d=o[c+1].toLowerCase(),r&2&&l!==d){if(Tt(r))return!1;s=!0}}}}return Tt(r)||s}function Tt(e){return(e&1)===0}function eM(e,t,n,r){if(t===null)return-1;let o=0;if(r||!n){let i=!1;for(;o-1)for(n++;n0?'="'+a+'"':"")+"]"}else r&8?o+="."+s:r&4&&(o+=" "+s);else o!==""&&!Tt(s)&&(t+=Vm(i,o),o=""),r=s,i=i||!Tt(r);n++}return o!==""&&(t+=Vm(i,o)),t}function sM(e){return e.map(iM).join(",")}function aM(e){let t=[],n=[],r=1,o=2;for(;rve&&Xy(e,t,ve,!1),Vt(s?2:0,o),n(r,o)}finally{Rr(i),Vt(s?3:1,o)}}function op(e,t,n){if(Ff(t)){let r=V(null);try{let o=t.directiveStart,i=t.directiveEnd;for(let s=o;snull;function gM(e,t,n,r){let o=lD(t);o.push(n),e.firstCreatePass&&cD(e).push(r,o.length-1)}function mM(e,t,n,r,o,i){let s=t?t.injectorIndex:-1,a=0;return Uv()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:o,attrs:i,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Um(e,t,n,r,o){for(let i in t){if(!t.hasOwnProperty(i))continue;let s=t[i];if(s===void 0)continue;r??={};let a,u=qn.None;Array.isArray(s)?(a=s[0],u=s[1]):a=s;let l=i;if(o!==null){if(!o.hasOwnProperty(i))continue;l=o[i]}e===0?Bm(r,n,l,a,u):Bm(r,n,l,a)}return r}function Bm(e,t,n,r,o){let i;e.hasOwnProperty(n)?(i=e[n]).push(t,r):i=e[n]=[t,r],o!==void 0&&i.push(o)}function vM(e,t,n){let r=t.directiveStart,o=t.directiveEnd,i=e.data,s=t.attrs,a=[],u=null,l=null;for(let c=r;c0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function bM(e,t,n,r){let o=n.directiveStart,i=n.directiveEnd;ku(n)&&MM(t,n,e.data[o+n.componentOffset]),e.firstCreatePass||du(n,t),Gn(r,t);let s=n.initialInputs;for(let a=o;a{ns(e.lView)},consumerOnSignalRead(){this.lView[it]=this}});function $M(e){let t=e[it]??Object.create(HM);return t.lView=e,t}var HM=P(y({},wr),{consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{let t=Nr(e.lView);for(;t&&!gD(t[O]);)t=Nr(t);t&&kf(t)},consumerOnSignalRead(){this.lView[it]=this}});function gD(e){return e.type!==2}function mD(e){if(e[Mr]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[Mr])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[M]&8192)}}var zM=100;function vD(e,t=!0,n=0){let o=e[on].rendererFactory,i=!1;i||o.begin?.();try{GM(e,n)}catch(s){throw t&&dD(e,s),s}finally{i||o.end?.()}}function GM(e,t){let n=Hv();try{au(!0),Jd(e,t);let r=0;for(;Vu(e);){if(r===zM)throw new b(103,!1);r++,Jd(e,1)}}finally{au(n)}}function qM(e,t,n,r){let o=t[M];if((o&256)===256)return;let i=!1,s=!1;$f(t);let a=!0,u=null,l=null;i||(gD(e)?(l=jM(t),u=no(l)):Cg()===null?(a=!1,l=$M(t),u=no(l)):t[it]&&(ro(t[it]),t[it]=null));try{kv(t),cS(e.bindingStartIndex),n!==null&&nD(e,t,n,2,r);let c=(o&3)===3;if(!i)if(c){let p=e.preOrderCheckHooks;p!==null&&Ka(t,p,null)}else{let p=e.preOrderHooks;p!==null&&Ya(t,p,0,null),ad(t,0)}if(s||WM(t),mD(t),yD(t,0),e.contentQueries!==null&&uD(e,t),!i)if(c){let p=e.contentCheckHooks;p!==null&&Ka(t,p)}else{let p=e.contentHooks;p!==null&&Ya(t,p,1),ad(t,1)}lM(e,t);let d=e.components;d!==null&&wD(t,d,0);let f=e.viewQuery;if(f!==null&&Qd(2,f,r),!i)if(c){let p=e.viewCheckHooks;p!==null&&Ka(t,p)}else{let p=e.viewHooks;p!==null&&Ya(t,p,2),ad(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[Za]){for(let p of t[Za])p();t[Za]=null}i||(t[M]&=-73)}catch(c){throw i||ns(t),c}finally{l!==null&&(Mi(l,u),a&&UM(l)),Hf()}}function yD(e,t){for(let n=yy(e);n!==null;n=Dy(n))for(let r=Ue;r-1&&(Zi(t,r),nu(n,r))}this._attachedToViewContainer=!1}qu(this._lView[O],this._lView)}onDestroy(t){jv(this._lView,t)}markForCheck(){dp(this._cdRefInjectingView||this._lView,4)}markForRefresh(){kf(this._cdRefInjectingView||this._lView)}detach(){this._lView[M]&=-129}reattach(){xd(this._lView),this._lView[M]|=128}detectChanges(){this._lView[M]|=1024,vD(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new b(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=Id(this._lView),n=this._lView[Tr];n!==null&&!t&&tp(n,this._lView),By(this._lView[O],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new b(902,!1);this._appRef=t;let n=Id(this._lView),r=this._lView[Tr];r!==null&&!n&&$y(r,this._lView),xd(this._lView)}},Ki=(()=>{class e{static __NG_ELEMENT_ID__=QM}return e})(),KM=Ki,YM=class extends KM{_declarationLView;_declarationTContainer;elementRef;constructor(t,n,r){super(),this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){let o=ss(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new Lr(o)}};function QM(){return Xu(Se(),x())}function Xu(e,t){return e.type&4?new YM(t,e,Po(e,t)):null}var d9=new RegExp(`^(\\d+)*(${JS}|${QS})*(.*)`);var JM=()=>null;function To(e,t){return JM(e,t)}var Xd=class{},vu=class{},ef=class{resolveComponentFactory(t){throw Error(`No component factory found for ${Qe(t)}.`)}},Mo=class{static NULL=new ef},Ao=class{},at=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>XM()}return e})();function XM(){let e=x(),t=Se(),n=Zn(t.index,e);return(Bn(n)?n:e)[ue]}var eA=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:()=>null})}return e})();function yu(e,t,n){let r=n?e.styles:null,o=n?e.classes:null,i=0;if(t!==null)for(let s=0;s0&&Ky(e,n,i.join(" "))}}function aA(e,t,n){let r=e.projection=[];for(let o=0;o{class e{static __NG_ELEMENT_ID__=lA}return e})();function lA(){let e=Se();return bD(e,x())}var cA=Br,CD=class extends cA{_lContainer;_hostTNode;_hostLView;constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return Po(this._hostTNode,this._hostLView)}get injector(){return new xr(this._hostTNode,this._hostLView)}get parentInjector(){let t=zf(this._hostTNode,this._hostLView);if(Xv(t)){let n=lu(t,this._hostLView),r=uu(t),o=n[O].data[r+8];return new xr(o,n)}else return new xr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let n=Hm(this._lContainer);return n!==null&&n[t]||null}get length(){return this._lContainer.length-Ue}createEmbeddedView(t,n,r){let o,i;typeof r=="number"?o=r:r!=null&&(o=r.index,i=r.injector);let s=To(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(n||{},i,s);return this.insertImpl(a,o,So(this._hostTNode,s)),a}createComponent(t,n,r,o,i){let s=t&&!Y0(t),a;if(s)a=n;else{let h=n||{};a=h.index,r=h.injector,o=h.projectableNodes,i=h.environmentInjector||h.ngModuleRef}let u=s?t:new No($n(t)),l=r||this.parentInjector;if(!i&&u.ngModule==null){let g=(s?l:this.parentInjector).get(Je,null);g&&(i=g)}let c=$n(u.componentType??{}),d=To(this._lContainer,c?.id??null),f=d?.firstChild??null,p=u.create(l,o,f,i);return this.insertImpl(p.hostView,a,So(this._hostTNode,d)),p}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){let o=t._lView;if(tS(o)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let u=o[Be],l=new CD(u,u[nt],u[Be]);l.detach(l.indexOf(t))}}let i=this._adjustIndex(n),s=this._lContainer;return as(s,o,i,r),t.attachToViewContainerRef(),vv(dd(s),i,t),t}move(t,n){return this.insert(t,n)}indexOf(t){let n=Hm(this._lContainer);return n!==null?n.indexOf(t):-1}remove(t){let n=this._adjustIndex(t,-1),r=Zi(this._lContainer,n);r&&(nu(dd(this._lContainer),n),qu(r[O],r))}detach(t){let n=this._adjustIndex(t,-1),r=Zi(this._lContainer,n);return r&&nu(dd(this._lContainer),n)!=null?new Lr(r):null}_adjustIndex(t,n=0){return t??this.length+n}};function Hm(e){return e[iu]}function dd(e){return e[iu]||(e[iu]=[])}function bD(e,t){let n,r=t[e.index];return cn(r)?n=r:(n=aD(r,t,null,e),t[e.index]=n,Qu(t,n)),fA(n,t,e,r),new CD(n,e,t)}function dA(e,t){let n=e[ue],r=n.createComment(""),o=mt(t,e),i=Gy(n,o);return gu(n,i,r,$T(n,o),!1),r}var fA=gA,pA=()=>!1;function hA(e,t,n){return pA(e,t,n)}function gA(e,t,n,r){if(e[Ar])return;let o;n.type&8?o=Bt(r):o=dA(t,n),e[Ar]=o}var nf=class e{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},rf=class e{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,o=[];for(let i=0;i0)r.push(s[a/2]);else{let l=i[a+1],c=t[-u];for(let d=Ue;dt.trim())}function _D(e,t,n){e.queries===null&&(e.queries=new of),e.queries.track(new sf(t,n))}function IA(e,t){let n=e.contentQueries||(e.contentQueries=[]),r=n.length?n[n.length-1]:-1;t!==r&&n.push(e.queries.length-1,t)}function fp(e,t){return e.queries.getByIndex(t)}function _A(e,t){let n=e[O],r=fp(n,t);return r.crossesNgTemplate?af(n,e,t,[]):ED(n,e,r,t)}function xA(e){return typeof e=="function"&&e[He]!==void 0}function Lo(e,t){yt("NgSignals");let n=Rg(e),r=n[He];return t?.equal&&(r.equal=t.equal),n.set=o=>Ni(r,o),n.update=o=>Og(r,o),n.asReadonly=xD.bind(n),n}function xD(){let e=this[He];if(e.readonlyFn===void 0){let t=()=>this();t[He]=e,e.readonlyFn=t}return e.readonlyFn}function SD(e){return xA(e)&&typeof e.set=="function"}function TD(e,t){let n=Object.create(iv),r=new hu;n.value=e;function o(){return Ti(n),zm(n.value),n.value}return o[He]=n,o.asReadonly=xD.bind(o),o.set=i=>{n.equal(n.value,i)||(Ni(n,i),r.emit(i))},o.update=i=>{zm(n.value),o.set(i(n.value))},o.subscribe=r.subscribe.bind(r),o.destroyRef=r.destroyRef,o}function zm(e){if(e===Mu)throw new b(952,!1)}function Gm(e,t){return TD(e,t)}function SA(e){return TD(Mu,e)}var p9=(Gm.required=SA,Gm);var Wn=class{},Yi=class{};var uf=class extends Wn{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new Du(this);constructor(t,n,r,o=!0){super(),this.ngModuleType=t,this._parent=n;let i=wv(t);this._bootstrapComponents=Vy(i.bootstrap),this._r3Injector=uy(t,n,[{provide:Wn,useValue:this},{provide:Mo,useValue:this.componentFactoryResolver},...r],Qe(t),new Set(["environment"])),o&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}},lf=class extends Yi{moduleType;constructor(t){super(),this.moduleType=t}create(t){return new uf(this.moduleType,t,[])}};var Cu=class extends Wn{injector;componentFactoryResolver=new Du(this);instance=null;constructor(t){super();let n=new zi([...t.providers,{provide:Wn,useValue:this},{provide:Mo,useValue:this.componentFactoryResolver}],t.parent||Fu(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function pp(e,t,n=null){return new Cu({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var TA=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=Ev(!1,n.type),o=r.length>0?pp([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=C({token:e,providedIn:"environment",factory:()=>new e(I(Je))})}return e})();function MD(e){return Xi(()=>{let t=AD(e),n=P(y({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===my.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?o=>o.get(TA).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||$t.Emulated,styles:e.styles||Ye,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&yt("NgStandalone"),ND(n);let r=e.dependencies;return n.directiveDefs=Wm(r,!1),n.pipeDefs=Wm(r,!0),n.id=NA(n),n})}function MA(e){return $n(e)||Rf(e)}function AA(e){return e!==null}function hn(e){return Xi(()=>({type:e.type,bootstrap:e.bootstrap||Ye,declarations:e.declarations||Ye,imports:e.imports||Ye,exports:e.exports||Ye,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function qm(e,t){if(e==null)return rn;let n={};for(let r in e)if(e.hasOwnProperty(r)){let o=e[r],i,s,a=qn.None;Array.isArray(o)?(a=o[0],i=o[1],s=o[2]??i):(i=o,s=o),t?(n[i]=a!==qn.None?[r,a]:r,t[i]=s):n[i]=r}return n}function H(e){return Xi(()=>{let t=AD(e);return ND(t),t})}function ko(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function AD(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||rn,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Ye,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qm(e.inputs,t),outputs:qm(e.outputs),debugInfo:null}}function ND(e){e.features?.forEach(t=>t(e))}function Wm(e,t){if(!e)return null;let n=t?Cv:MA;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(AA)}function NA(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function RA(e){return Object.getPrototypeOf(e.prototype).constructor}function _e(e){let t=RA(e.type),n=!0,r=[e];for(;t;){let o;if(Hn(e))o=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new b(903,!1);o=t.\u0275dir}if(o){if(n){r.push(o);let s=e;s.inputs=za(e.inputs),s.inputTransforms=za(e.inputTransforms),s.declaredInputs=za(e.declaredInputs),s.outputs=za(e.outputs);let a=o.hostBindings;a&&kA(e,a);let u=o.viewQuery,l=o.contentQueries;if(u&&PA(e,u),l&&LA(e,l),OA(e,o),g0(e.outputs,o.outputs),Hn(o)&&o.data.animation){let c=e.data;c.animation=(c.animation||[]).concat(o.data.animation)}}let i=o.features;if(i)for(let s=0;s=0;r--){let o=e[r];o.hostVars=t+=o.hostVars,o.hostAttrs=qi(o.hostAttrs,n=qi(n,o.hostAttrs))}}function za(e){return e===rn?{}:e===Ye?[]:e}function PA(e,t){let n=e.viewQuery;n?e.viewQuery=(r,o)=>{t(r,o),n(r,o)}:e.viewQuery=t}function LA(e,t){let n=e.contentQueries;n?e.contentQueries=(r,o,i)=>{t(r,o,i),n(r,o,i)}:e.contentQueries=t}function kA(e,t){let n=e.hostBindings;n?e.hostBindings=(r,o)=>{t(r,o),n(r,o)}:e.hostBindings=t}function h9(e){let t=n=>{let r=Array.isArray(e);n.hostDirectives===null?(n.findHostDirectiveDefs=RD,n.hostDirectives=r?e.map(cf):[e]):r?n.hostDirectives.unshift(...e.map(cf)):n.hostDirectives.unshift(e)};return t.ngInherit=!0,t}function RD(e,t,n){if(e.hostDirectives!==null)for(let r of e.hostDirectives)if(typeof r=="function"){let o=r();for(let i of o)Zm(cf(i),t,n)}else Zm(r,t,n)}function Zm(e,t,n){let r=Rf(e.directive);jA(r.declaredInputs,e.inputs),RD(r,t,n),n.set(r,e),t.push(r)}function cf(e){return typeof e=="function"?{directive:Oe(e),inputs:rn,outputs:rn}:{directive:Oe(e.directive),inputs:Km(e.inputs),outputs:Km(e.outputs)}}function Km(e){if(e===void 0||e.length===0)return rn;let t={};for(let n=0;n{class e{log(n){console.log(n)}warn(n){console.warn(n)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();var LD=new E("");function Jn(e){return!!e&&typeof e.then=="function"}function gp(e){return!!e&&typeof e.subscribe=="function"}var kD=new E("");var jD=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=v(kD,{optional:!0})??[];injector=v(et);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let i=st(this.injector,o);if(Jn(i))n.push(i);else if(gp(i)){let s=new Promise((a,u)=>{i.subscribe({complete:a,error:u})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),VD=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:()=>new Eu})}return e})(),Eu=class{queuedEffectCount=0;queues=new Map;schedule(t){this.enqueue(t)}enqueue(t){let n=t.zone;this.queues.has(n)||this.queues.set(n,new Set);let r=this.queues.get(n);r.has(t)||(this.queuedEffectCount++,r.add(t))}flush(){for(;this.queuedEffectCount>0;)for(let[t,n]of this.queues)t===null?this.flushQueue(n):t.run(()=>this.flushQueue(n))}flushQueue(t){for(let n of t)t.delete(n),this.queuedEffectCount--,n.run()}},tl=new E("");function GA(){Ng(()=>{throw new b(600,!1)})}function qA(e){return e.isBoundToModule}var WA=10;function ZA(e,t,n){try{let r=n();return Jn(r)?r.catch(o=>{throw t.runOutsideAngular(()=>e.handleError(o)),o}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var Xn=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=v(BS);afterRenderManager=v(Ey);zonelessEnabled=v(qf);rootEffectScheduler=v(VD);dirtyFlags=0;deferredDirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new te;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=v(dn).hasPendingTasks.pipe(R(n=>!n));constructor(){v(Hu,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:o=>{o&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=v(Je);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){let o=n instanceof vu;if(!this._injector.get(jD).done){let f=!o&&bv(n),p=!1;throw new b(405,p)}let s;o?s=n:s=this._injector.get(Mo).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let a=qA(s)?void 0:this._injector.get(Wn),u=r||s.selector,l=s.create(et.NULL,[],u,a),c=l.location.nativeElement,d=l.injector.get(LD,null);return d?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),Ja(this.components,l),d?.unregisterApplication(c)}),this._loadComponent(l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick=()=>{if(this.tracingSnapshot!==null){let r=this.tracingSnapshot;this.tracingSnapshot=null,r.run(Jf.CHANGE_DETECTION,this._tick),r.dispose();return}if(this._runningTick)throw new b(101,!1);let n=V(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,V(n),this.afterTick.next()}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Ao,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let n=0;for(;this.dirtyFlags!==0&&n++Vu(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;Ja(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(tl,[]).forEach(o=>o(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>Ja(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new b(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Ja(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function KA(e,t,n,r){if(!n&&!Vu(e))return;vD(e,t,n&&!r?0:1)}function $r(e,t,n,r){let o=x(),i=Vr();if(tt(o,i,t)){let s=re(),a=os();AM(a,o,e,t,n,r)}return $r}function mp(e,t,n,r){return tt(e,Vr(),n)?t+Ke(n)+r:Me}function YA(e,t,n,r,o,i){let s=Uf(),a=Qi(e,s,n,o);return rs(2),a?t+Ke(n)+r+Ke(o)+i:Me}function QA(e,t,n,r,o,i,s,a){let u=Uf(),l=FD(e,u,n,o,s);return rs(3),l?t+Ke(n)+r+Ke(o)+i+Ke(s)+a:Me}function JA(e,t,n,r,o,i,s,a,u,l,c,d){let f=Uf(),p=PD(e,f,n,o,s,u);return p=tt(e,f+4,c)||p,rs(5),p?t+Ke(n)+r+Ke(o)+i+Ke(s)+a+Ke(u)+l+Ke(c)+d:Me}function Ga(e,t){return e<<17|t<<2}function kr(e){return e>>17&32767}function XA(e){return(e&2)==2}function eN(e,t){return e&131071|t<<17}function df(e){return e|2}function Ro(e){return(e&131068)>>2}function fd(e,t){return e&-131069|t<<2}function tN(e){return(e&1)===1}function ff(e){return e|1}function nN(e,t,n,r,o,i){let s=i?t.classBindings:t.styleBindings,a=kr(s),u=Ro(s);e[r]=n;let l=!1,c;if(Array.isArray(n)){let d=n;c=d[1],(c===null||es(d,c)>0)&&(l=!0)}else c=n;if(o)if(u!==0){let f=kr(e[a+1]);e[r+1]=Ga(f,a),f!==0&&(e[f+1]=fd(e[f+1],r)),e[a+1]=eN(e[a+1],r)}else e[r+1]=Ga(a,0),a!==0&&(e[a+1]=fd(e[a+1],r)),a=r;else e[r+1]=Ga(u,0),a===0?a=r:e[u+1]=fd(e[u+1],r),u=r;l&&(e[r+1]=df(e[r+1])),Ym(e,c,r,!0),Ym(e,c,r,!1),rN(t,c,e,r,i),s=Ga(a,u),i?t.classBindings=s:t.styleBindings=s}function rN(e,t,n,r,o){let i=o?e.residualClasses:e.residualStyles;i!=null&&typeof t=="string"&&es(i,t)>=0&&(n[r+1]=ff(n[r+1]))}function Ym(e,t,n,r){let o=e[n+1],i=t===null,s=r?kr(o):Ro(o),a=!1;for(;s!==0&&(a===!1||i);){let u=e[s],l=e[s+1];oN(u,t)&&(a=!0,e[s+1]=r?ff(l):df(l)),s=r?kr(l):Ro(l)}a&&(e[n+1]=r?df(o):ff(o))}function oN(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?es(e,t)>=0:!1}var Mt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function iN(e){return e.substring(Mt.key,Mt.keyEnd)}function sN(e){return aN(e),UD(e,BD(e,0,Mt.textEnd))}function UD(e,t){let n=Mt.textEnd;return n===t?-1:(t=Mt.keyEnd=uN(e,Mt.key=t,n),BD(e,t,n))}function aN(e){Mt.key=0,Mt.keyEnd=0,Mt.value=0,Mt.valueEnd=0,Mt.textEnd=e.length}function BD(e,t,n){for(;t32;)t++;return t}function lN(e,t,n){let r=x(),o=Vr();if(tt(r,o,t)){let i=re(),s=os();Yu(i,s,r,e,t,r[ue],n,!1)}return lN}function pf(e,t,n,r,o){let i=t.inputs,s=o?"class":"style";lp(e,n,i[s],s,r)}function nl(e,t){return cN(e,t,null,!0),nl}function g9(e){HD(mN,$D,e,!0)}function $D(e,t){for(let n=sN(t);n>=0;n=UD(t,n))Ru(e,iN(t),!0)}function cN(e,t,n,r){let o=x(),i=re(),s=rs(2);if(i.firstUpdatePass&&GD(i,e,s,r),t!==Me&&tt(o,s,t)){let a=i.data[vt()];qD(i,a,o,o[ue],e,o[s+1]=yN(t,n),r,s)}}function HD(e,t,n,r){let o=re(),i=rs(2);o.firstUpdatePass&&GD(o,null,i,r);let s=x();if(n!==Me&&tt(s,i,n)){let a=o.data[vt()];if(WD(a,r)&&!zD(o,i)){let u=r?a.classesWithoutHost:a.stylesWithoutHost;u!==null&&(n=vd(u,n||"")),pf(o,a,s,n,r)}else vN(o,a,s,s[ue],s[i+1],s[i+1]=gN(e,t,n),r,i)}}function zD(e,t){return t>=e.expandoStartIndex}function GD(e,t,n,r){let o=e.data;if(o[n+1]===null){let i=o[vt()],s=zD(e,n);WD(i,r)&&t===null&&!s&&(t=!1),t=dN(o,i,t,r),nN(o,i,t,n,s,r)}}function dN(e,t,n,r){let o=hS(e),i=r?t.residualClasses:t.residualStyles;if(o===null)(r?t.classBindings:t.styleBindings)===0&&(n=pd(null,e,t,n,r),n=Ji(n,t.attrs,r),i=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==o)if(n=pd(o,e,t,n,r),i===null){let u=fN(e,t,r);u!==void 0&&Array.isArray(u)&&(u=pd(null,e,t,u[1],r),u=Ji(u,t.attrs,r),pN(e,t,r,u))}else i=hN(e,t,r)}return i!==void 0&&(r?t.residualClasses=i:t.residualStyles=i),n}function fN(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Ro(r)!==0)return e[kr(r)]}function pN(e,t,n,r){let o=n?t.classBindings:t.styleBindings;e[kr(o)]=r}function hN(e,t,n){let r,o=t.directiveEnd;for(let i=1+t.directiveStylingLast;i0;){let u=e[o],l=Array.isArray(u),c=l?u[1]:u,d=c===null,f=n[o+1];f===Me&&(f=d?Ye:void 0);let p=d?id(f,r):c===r?f:void 0;if(l&&!Iu(p)&&(p=id(u,r)),Iu(p)&&(a=p,s))return a;let h=e[o+1];o=s?kr(h):Ro(h)}if(t!==null){let u=i?t.residualClasses:t.residualStyles;u!=null&&(a=id(u,r))}return a}function Iu(e){return e!==void 0}function yN(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=Qe(Rt(e)))),e}function WD(e,t){return(e.flags&(t?8:16))!==0}function m9(e,t,n){let r=x(),o=mp(r,e,t,n);HD(Ru,$D,o,!0)}function v9(){return x()[Xe][Fe]}var hf=class{destroy(t){}updateValue(t,n){}swap(t,n){let r=Math.min(t,n),o=Math.max(t,n),i=this.detach(o);if(o-r>1){let s=this.detach(r);this.attach(r,i),this.attach(o,s)}else this.attach(r,i)}move(t,n){this.attach(n,this.detach(t))}};function hd(e,t,n,r,o){return e===n&&Object.is(t,r)?1:Object.is(o(e,t),o(n,r))?-1:0}function DN(e,t,n){let r,o,i=0,s=e.length-1,a=void 0;if(Array.isArray(t)){let u=t.length-1;for(;i<=s&&i<=u;){let l=e.at(i),c=t[i],d=hd(i,l,i,c,n);if(d!==0){d<0&&e.updateValue(i,c),i++;continue}let f=e.at(s),p=t[u],h=hd(s,f,u,p,n);if(h!==0){h<0&&e.updateValue(s,p),s--,u--;continue}let g=n(i,l),m=n(s,f),D=n(i,c);if(Object.is(D,m)){let N=n(u,p);Object.is(N,g)?(e.swap(i,s),e.updateValue(s,p),u--,s--):e.move(s,i),e.updateValue(i,c),i++;continue}if(r??=new _u,o??=Xm(e,i,s,n),gf(e,r,i,D))e.updateValue(i,c),i++,s++;else if(o.has(D))r.set(g,e.detach(i)),s--;else{let N=e.create(i,t[i]);e.attach(i,N),i++,s++}}for(;i<=u;)Jm(e,r,n,i,t[i]),i++}else if(t!=null){let u=t[Symbol.iterator](),l=u.next();for(;!l.done&&i<=s;){let c=e.at(i),d=l.value,f=hd(i,c,i,d,n);if(f!==0)f<0&&e.updateValue(i,d),i++,l=u.next();else{r??=new _u,o??=Xm(e,i,s,n);let p=n(i,d);if(gf(e,r,i,p))e.updateValue(i,d),i++,s++,l=u.next();else if(!o.has(p))e.attach(i,e.create(i,d)),i++,s++,l=u.next();else{let h=n(i,c);r.set(h,e.detach(i)),s--}}}for(;!l.done;)Jm(e,r,n,e.length,l.value),l=u.next()}for(;i<=s;)e.destroy(e.detach(s--));r?.forEach(u=>{e.destroy(u)})}function gf(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Jm(e,t,n,r,o){if(gf(e,t,r,n(r,o)))e.updateValue(r,o);else{let i=e.create(r,o);e.attach(r,i)}}function Xm(e,t,n,r){let o=new Set;for(let i=t;i<=n;i++)o.add(r(i,e.at(i)));return o}var _u=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let n=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(n)?(this.kvMap.set(t,this._vMap.get(n)),this._vMap.delete(n)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,n){if(this.kvMap.has(t)){let r=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(r);)r=o.get(r);o.set(r,n)}else this.kvMap.set(t,n)}forEach(t){for(let[n,r]of this.kvMap)if(t(r,n),this._vMap!==void 0){let o=this._vMap;for(;o.has(r);)r=o.get(r),t(r,n)}}};function y9(e,t){yt("NgControlFlow");let n=x(),r=Vr(),o=n[r]!==Me?n[r]:-1,i=o!==-1?xu(n,ve+o):void 0,s=0;if(tt(n,r,e)){let a=V(null);try{if(i!==void 0&&pD(i,s),e!==-1){let u=ve+e,l=xu(n,u),c=Df(n[O],u),d=To(l,c.tView.ssrId),f=ss(n,c,t,{dehydratedView:d});as(l,f,s,So(c,d))}}finally{V(a)}}else if(i!==void 0){let a=fD(i,s);a!==void 0&&(a[Fe]=t)}}var mf=class{lContainer;$implicit;$index;constructor(t,n,r){this.lContainer=t,this.$implicit=n,this.$index=r}get $count(){return this.lContainer.length-Ue}};function D9(e){return e}function w9(e,t){return t}var vf=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,n,r){this.hasEmptyBlock=t,this.trackByFn=n,this.liveCollection=r}};function C9(e,t,n,r,o,i,s,a,u,l,c,d,f){yt("NgControlFlow");let p=x(),h=re(),g=u!==void 0,m=x(),D=a?s.bind(m[Xe][Fe]):s,N=new vf(g,D);m[ve+e]=N,bu(p,h,e+1,t,n,r,o,zn(h.consts,i)),g&&bu(p,h,e+2,u,l,c,d,zn(h.consts,f))}var yf=class extends hf{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,n,r){super(),this.lContainer=t,this.hostLView=n,this.templateTNode=r}get length(){return this.lContainer.length-Ue}at(t){return this.getLView(t)[Fe].$implicit}attach(t,n){let r=n[Io];this.needsIndexUpdate||=t!==this.length,as(this.lContainer,n,t,So(this.templateTNode,r))}detach(t){return this.needsIndexUpdate||=t!==this.length-1,wN(this.lContainer,t)}create(t,n){let r=To(this.lContainer,this.templateTNode.tView.ssrId),o=ss(this.hostLView,this.templateTNode,new mf(this.lContainer,n,t),{dehydratedView:r});return this.operationsCounter?.recordCreate(),o}destroy(t){qu(t[O],t),this.operationsCounter?.recordDestroy()}updateValue(t,n){this.getLView(t)[Fe].$implicit=n}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t(Bu(!0),Uy(r,o,vS()));function IN(e,t,n,r,o){let i=t.consts,s=zn(i,r),a=Ur(t,e,8,"ng-container",s);s!==null&&yu(a,s,!0);let u=zn(i,o);return up(t,n,a,u),t.queries!==null&&t.queries.elementStart(t,a),a}function YD(e,t,n){let r=x(),o=re(),i=e+ve,s=o.firstCreatePass?IN(i,o,r,t,n):o.data[i];Kn(s,!0);let a=xN(o,r,s,e);return r[i]=a,Uu()&&Wu(o,r,a,s),Gn(a,r),ju(s)&&(ip(o,r,s),op(o,s,r)),n!=null&&sp(r,s),YD}function QD(){let e=Se(),t=re();return jf()?Vf():(e=e.parent,Kn(e,!1)),t.firstCreatePass&&($u(t,e),Ff(e)&&t.queries.elementEnd(e)),QD}function _N(e,t,n){return YD(e,t,n),QD(),_N}var xN=(e,t,n,r)=>(Bu(!0),FT(t[ue],""));function E9(){return x()}function SN(e,t,n){let r=x(),o=Vr();if(tt(r,o,t)){let i=re(),s=os();Yu(i,s,r,e,t,r[ue],n,!0)}return SN}var _r=void 0;function TN(e){let t=e,n=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return n===1&&r===0?1:5}var MN=["en",[["a","p"],["AM","PM"],_r],[["AM","PM"],_r,_r],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],_r,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],_r,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",_r,"{1} 'at' {0}",_r],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",TN],$i={};function JD(e,t,n){typeof t!="string"&&(n=t,t=e[le.LocaleId]),t=t.toLowerCase().replace(/_/g,"-"),$i[t]=e,n&&($i[t][le.ExtraData]=n)}function ut(e){let t=AN(e),n=ev(t);if(n)return n;let r=t.split("-")[0];if(n=ev(r),n)return n;if(r==="en")return MN;throw new b(701,!1)}function ev(e){return e in $i||($i[e]=nn.ng&&nn.ng.common&&nn.ng.common.locales&&nn.ng.common.locales[e]),$i[e]}var le=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}(le||{});function AN(e){return e.toLowerCase().replace(/_/g,"-")}var Su="en-US";var NN=Su;function RN(e){typeof e=="string"&&(NN=e.toLowerCase().replace(/_/g,"-"))}var ON=(e,t,n)=>{};function Dt(e,t,n,r){let o=x(),i=re(),s=Se();return XD(i,o,o[ue],s,e,t,r),Dt}function FN(e,t,n,r){let o=e.cleanup;if(o!=null)for(let i=0;iu?a[u]:null}typeof s=="string"&&(i+=2)}return null}function XD(e,t,n,r,o,i,s){let a=ju(r),l=e.firstCreatePass&&cD(e),c=t[Fe],d=lD(t),f=!0;if(r.type&3||s){let g=mt(r,t),m=s?s(g):g,D=d.length,N=s?ee=>s(Bt(ee[r.index])):r.index,B=null;if(!s&&a&&(B=FN(e,t,o,r.index)),B!==null){let ee=B.__ngLastListenerFn__||B;ee.__ngNextListenerFn__=i,B.__ngLastListenerFn__=i,f=!1}else{i=nv(r,t,c,i),ON(g,o,i);let ee=n.listen(m,o,i);d.push(i,ee),l&&l.push(o,N,D,D+1)}}else i=nv(r,t,c,i);let p=r.outputs,h;if(f&&p!==null&&(h=p[o])){let g=h.length;if(g)for(let m=0;m-1?Zn(e.index,t):t;dp(s,5);let a=tv(t,n,r,i),u=o.__ngNextListenerFn__;for(;u;)a=tv(t,n,u,i)&&a,u=u.__ngNextListenerFn__;return a}}function I9(e=1){return mS(e)}function PN(e,t){let n=null,r=tM(e);for(let o=0;o=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function T9(e){let t=$v();return ts(t,ve+e)}function M9(e,t=""){let n=x(),r=re(),o=e+ve,i=r.firstCreatePass?Ur(r,o,1,t,null):r.data[o],s=jN(r,n,i,t,e);n[o]=s,Uu()&&Wu(r,n,s,i),Kn(i,!1)}var jN=(e,t,n,r,o)=>(Bu(!0),RT(t[ue],r));function VN(e){return ow("",e,""),VN}function ow(e,t,n){let r=x(),o=mp(r,e,t,n);return o!==Me&&Ju(r,vt(),o),ow}function UN(e,t,n,r,o){let i=x(),s=YA(i,e,t,n,r,o);return s!==Me&&Ju(i,vt(),s),UN}function BN(e,t,n,r,o,i,s){let a=x(),u=QA(a,e,t,n,r,o,i,s);return u!==Me&&Ju(a,vt(),u),BN}function $N(e,t,n,r,o,i,s,a,u,l,c){let d=x(),f=JA(d,e,t,n,r,o,i,s,a,u,l,c);return f!==Me&&Ju(d,vt(),f),$N}function HN(e,t,n){SD(t)&&(t=t());let r=x(),o=Vr();if(tt(r,o,t)){let i=re(),s=os();Yu(i,s,r,e,t,r[ue],n,!1)}return HN}function A9(e,t){let n=SD(e);return n&&e.set(t),n}function zN(e,t){let n=x(),r=re(),o=Se();return XD(r,n,n[ue],o,e,t),zN}var iw={};function GN(e){let t=re(),n=x(),r=e+ve,o=Ur(t,r,128,null,null);return Kn(o,!1),yp(t,n,r,iw),GN}function N9(e){yt("NgLet");let t=re(),n=x(),r=vt();return yp(t,n,r,e),e}function R9(e){let t=$v(),n=ts(t,ve+e);if(n===iw)throw new b(314,!1);return n}function qN(e,t,n){let r=re();if(r.firstCreatePass){let o=Hn(e);wf(n,r.data,r.blueprint,o,!0),wf(t,r.data,r.blueprint,o,!1)}}function wf(e,t,n,r,o){if(e=Oe(e),Array.isArray(e))for(let i=0;i>20;if(Eo(e)||!e.multi){let p=new Or(l,o,w),h=md(u,t,o?c:c+f,d);h===-1?(Rd(du(a,s),i,u),gd(i,e,t.length),t.push(u),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),n.push(p),s.push(p)):(n[h]=p,s[h]=p)}else{let p=md(u,t,c+f,d),h=md(u,t,c,c+f),g=p>=0&&n[p],m=h>=0&&n[h];if(o&&!m||!o&&!g){Rd(du(a,s),i,u);let D=KN(o?ZN:WN,n.length,o,r,l);!o&&m&&(n[h].providerFactory=D),gd(i,e,t.length,0),t.push(u),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),n.push(D),s.push(D)}else{let D=sw(n[o?h:p],l,!o&&r);gd(i,e,p>-1?p:h,D)}!o&&r&&m&&n[h].componentProviders++}}}function gd(e,t,n,r){let o=Eo(t),i=H0(t);if(o||i){let u=(i?Oe(t.useClass):t).prototype.ngOnDestroy;if(u){let l=e.destroyHooks||(e.destroyHooks=[]);if(!o&&t.multi){let c=l.indexOf(n);c===-1?l.push(n,[r,u]):l[c+1].push(r,u)}else l.push(n,u)}}}function sw(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function md(e,t,n,r){for(let o=n;o{n.providersResolver=(r,o)=>qN(r,o?o(e):e,t)}}function O9(e,t,n){let r=Yn()+e,o=x();return o[r]===Me?us(o,r,n?t.call(n):t()):VA(o,r)}function F9(e,t,n,r){return aw(x(),Yn(),e,t,n,r)}function P9(e,t,n,r,o){return uw(x(),Yn(),e,t,n,r,o)}function L9(e,t,n,r,o,i){return YN(x(),Yn(),e,t,n,r,o,i)}function k9(e,t,n,r,o,i,s){return lw(x(),Yn(),e,t,n,r,o,i,s)}function rl(e,t){let n=e[t];return n===Me?void 0:n}function aw(e,t,n,r,o,i){let s=t+n;return tt(e,s,o)?us(e,s+1,i?r.call(i,o):r(o)):rl(e,s+1)}function uw(e,t,n,r,o,i,s){let a=t+n;return Qi(e,a,o,i)?us(e,a+2,s?r.call(s,o,i):r(o,i)):rl(e,a+2)}function YN(e,t,n,r,o,i,s,a){let u=t+n;return FD(e,u,o,i,s)?us(e,u+3,a?r.call(a,o,i,s):r(o,i,s)):rl(e,u+3)}function lw(e,t,n,r,o,i,s,a,u){let l=t+n;return PD(e,l,o,i,s,a)?us(e,l+4,u?r.call(u,o,i,s,a):r(o,i,s,a)):rl(e,l+4)}function j9(e,t){let n=re(),r,o=e+ve;n.firstCreatePass?(r=QN(t,n.pipeRegistry),n.data[o]=r,r.onDestroy&&(n.destroyHooks??=[]).push(o,r.onDestroy)):r=n.data[o];let i=r.factory||(r.factory=Sr(r.type,!0)),s,a=Ze(w);try{let u=cu(!1),l=i();return cu(u),yp(n,x(),o,l),l}finally{Ze(a)}}function QN(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function V9(e,t,n){let r=e+ve,o=x(),i=ts(o,r);return Dp(o,r)?aw(o,Yn(),t,i.transform,n,i):i.transform(n)}function U9(e,t,n,r){let o=e+ve,i=x(),s=ts(i,o);return Dp(i,o)?uw(i,Yn(),t,s.transform,n,r,s):s.transform(n,r)}function B9(e,t,n,r,o,i){let s=e+ve,a=x(),u=ts(a,s);return Dp(a,s)?lw(a,Yn(),t,u.transform,n,r,o,i,u):u.transform(n,r,o,i)}function Dp(e,t){return e[O].data[t].pure}function $9(e,t){return Xu(e,t)}var bf=class{ngModuleFactory;componentFactories;constructor(t,n){this.ngModuleFactory=t,this.componentFactories=n}},wp=(()=>{class e{compileModuleSync(n){return new lf(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let r=this.compileModuleSync(n),o=wv(n),i=Vy(o.declarations).reduce((s,a)=>{let u=$n(a);return u&&s.push(new No(u)),s},[]);return new bf(r,i)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var JN=(()=>{class e{zone=v(me);changeDetectionScheduler=v(Pr);applicationRef=v(Xn);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function XN({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new me(P(y({},eR()),{scheduleInRootZone:n})),[{provide:me,useFactory:e},{provide:bo,multi:!0,useFactory:()=>{let r=v(JN,{optional:!0});return()=>r.initialize()}},{provide:bo,multi:!0,useFactory:()=>{let r=v(tR);return()=>{r.initialize()}}},t===!0?{provide:cy,useValue:!0}:[],{provide:dy,useValue:n??ly}]}function eR(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var tR=(()=>{class e{subscription=new ae;initialized=!1;zone=v(me);pendingTasks=v(dn);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{me.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{me.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var nR=(()=>{class e{appRef=v(Xn);taskService=v(dn);ngZone=v(me);zonelessEnabled=v(qf);tracing=v(Hu,{optional:!0});disableScheduling=v(cy,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ae;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(pu):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(v(dy,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof Ld||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 8:{this.appRef.deferredDirtyFlags|=8;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 13:{this.appRef.dirtyFlags|=16,r=!0;break}case 14:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{r=!0;break}case 10:case 9:case 7:case 11:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let o=this.useMicrotaskScheduler?xm:fy;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>o(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>o(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(pu+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,xm(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function rR(){return typeof $localize<"u"&&$localize.locale||Su}var ls=new E("",{providedIn:"root",factory:()=>v(ls,U.Optional|U.SkipSelf)||rR()});var Ef=new E("");function qa(e){return!e.moduleRef}function oR(e){let t=qa(e)?e.r3Injector:e.moduleRef.injector,n=t.get(me);return n.run(()=>{qa(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Nt,null),o;if(n.runOutsideAngular(()=>{o=n.onError.subscribe({next:i=>{r.handleError(i)}})}),qa(e)){let i=()=>t.destroy(),s=e.platformInjector.get(Ef);s.add(i),t.onDestroy(()=>{o.unsubscribe(),s.delete(i)})}else{let i=()=>e.moduleRef.destroy(),s=e.platformInjector.get(Ef);s.add(i),e.moduleRef.onDestroy(()=>{Ja(e.allPlatformModules,e.moduleRef),o.unsubscribe(),s.delete(i)})}return ZA(r,n,()=>{let i=t.get(jD);return i.runInitializers(),i.donePromise.then(()=>{let s=t.get(ls,Su);if(RN(s||Su),qa(e)){let a=t.get(Xn);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return iR(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function iR(e,t){let n=e.injector.get(Xn);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new b(-403,!1);t.push(e)}var Xa=null;function sR(e=[],t){return et.create({name:t,providers:[{provide:Ou,useValue:"platform"},{provide:Ef,useValue:new Set([()=>Xa=null])},...e]})}function aR(e=[]){if(Xa)return Xa;let t=sR(e);return Xa=t,GA(),uR(t),t}function uR(e){let t=e.get(Yf,null);st(e,()=>{t?.forEach(n=>n())})}var wt=(()=>{class e{static __NG_ELEMENT_ID__=lR}return e})();function lR(e){return cR(Se(),x(),(e&16)===16)}function cR(e,t,n){if(ku(e)&&!n){let r=Zn(e.index,t);return new Lr(r,r)}else if(e.type&175){let r=t[Xe];return new Lr(r,t)}return null}var If=class{constructor(){}supports(t){return t instanceof Map||OD(t)}create(){return new _f}},_f=class{_records=new Map;_mapHead=null;_appendAfter=null;_previousMapHead=null;_changesHead=null;_changesTail=null;_additionsHead=null;_additionsTail=null;_removalsHead=null;_removalsTail=null;get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(t){let n;for(n=this._mapHead;n!==null;n=n._next)t(n)}forEachPreviousItem(t){let n;for(n=this._previousMapHead;n!==null;n=n._nextPrevious)t(n)}forEachChangedItem(t){let n;for(n=this._changesHead;n!==null;n=n._nextChanged)t(n)}forEachAddedItem(t){let n;for(n=this._additionsHead;n!==null;n=n._nextAdded)t(n)}forEachRemovedItem(t){let n;for(n=this._removalsHead;n!==null;n=n._nextRemoved)t(n)}diff(t){if(!t)t=new Map;else if(!(t instanceof Map||OD(t)))throw new b(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let n=this._mapHead;if(this._appendAfter=null,this._forEach(t,(r,o)=>{if(n&&n.key===o)this._maybeAddToChanges(n,r),this._appendAfter=n,n=n._next;else{let i=this._getOrCreateRecordForKey(o,r);n=this._insertBeforeOrAppend(n,i)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let r=n;r!==null;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,n){if(t){let r=t._prev;return n._next=t,n._prev=r,t._prev=n,r&&(r._next=n),t===this._mapHead&&(this._mapHead=n),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(t,n){if(this._records.has(t)){let o=this._records.get(t);this._maybeAddToChanges(o,n);let i=o._prev,s=o._next;return i&&(i._next=s),s&&(s._prev=i),o._next=null,o._prev=null,o}let r=new xf(t);return this._records.set(t,r),r.currentValue=n,this._addToAdditions(r),r}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;t!==null;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;t!=null;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,n){Object.is(n,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=n,this._addToChanges(t))}_addToAdditions(t){this._additionsHead===null?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){this._changesHead===null?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,n){t instanceof Map?t.forEach(n):Object.keys(t).forEach(r=>n(t[r],r))}},xf=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(t){this.key=t}};function rv(){return new Cp([new If])}var Cp=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:rv});factories;constructor(n){this.factories=n}static create(n,r){if(r){let o=r.factories.slice();n=n.concat(o)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||rv()),deps:[[e,new mv,new Af]]}}find(n){let r=this.factories.find(o=>o.supports(n));if(r)return r;throw new b(901,!1)}}return e})();function cw(e){try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,o=aR(r),i=[XN({}),{provide:Pr,useExisting:nR},...n||[]],s=new Cu({providers:i,parent:o,debugName:"",runEnvironmentInitializers:!1});return oR({r3Injector:s.injector,platformInjector:o,rootComponent:t})}catch(t){return Promise.reject(t)}}function er(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function dR(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function jo(e,t){yt("NgSignals");let n=Tg(e);return t?.equal&&(n[He].equal=t.equal),n}function Ct(e){let t=V(null);try{return e()}finally{V(t)}}var dw=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=fR}return e})();function fR(){return new dw(x(),Se())}var pR=!1,hR=(()=>{class e extends Eu{pendingTasks=v(dn);taskId=null;schedule(n){super.schedule(n),this.taskId===null&&(this.taskId=this.pendingTasks.add(),queueMicrotask(()=>this.flush()))}flush(){try{super.flush()}finally{this.taskId!==null&&(this.pendingTasks.remove(this.taskId),this.taskId=null)}}static \u0275prov=C({token:e,providedIn:"root",factory:()=>new e})}return e})(),Sf=class{scheduler;effectFn;zone;injector;unregisterOnDestroy;watcher;constructor(t,n,r,o,i,s){this.scheduler=t,this.effectFn=n,this.zone=r,this.injector=i,this.watcher=Fg(a=>this.runEffect(a),()=>this.schedule(),s),this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}runEffect(t){try{this.effectFn(t)}catch(n){this.injector.get(Nt,null,{optional:!0})?.handleError(n)}}run(){this.watcher.run()}schedule(){this.scheduler.schedule(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}};function gR(){}function mR(e,t){yt("NgSignals"),!t?.injector&&Pu(gR);let n=t?.injector??v(et),r=t?.manualCleanup!==!0?n.get(Fo):null,o=new Sf(n.get(hR),e,typeof Zone>"u"?null:Zone.current,r,n,t?.allowSignalWrites??!1),i=n.get(wt,null,{optional:!0});return!i||!(i._lView[M]&8)?o.watcher.notify():(i._lView[Za]??=[]).push(o.watcher.notify),o}var vR=pR;var Tf=class{[He];constructor(t){this[He]=t}destroy(){this[He].destroy()}};function yR(e,t){if(vR)return mR(e,t);yt("NgSignals"),!t?.injector&&Pu(yR);let n=t?.injector??v(et),r=t?.manualCleanup!==!0?n.get(Fo):null,o,i=n.get(dw,null,{optional:!0}),s=n.get(Pr);return i!==null&&!t?.forceRoot?(o=CR(i.view,s,e),r instanceof fu&&r._lView===i.view&&(r=null)):o=bR(e,n.get(VD),s),o.injector=n,r!==null&&(o.onDestroyFn=r.onDestroy(()=>o.destroy())),new Tf(o)}var fw=P(y({},wr),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,hasRun:!1,cleanupFns:void 0,zone:null,onDestroyFn:Wi,run(){if(this.dirty=!1,this.hasRun&&!Ai(this))return;this.hasRun=!0;let e=r=>(this.cleanupFns??=[]).push(r),t=no(this),n=au(!1);try{this.maybeCleanup(),this.fn(e)}finally{au(n),Mi(this,t)}},maybeCleanup(){if(this.cleanupFns?.length)try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[]}}}),DR=P(y({},fw),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(13)},destroy(){ro(this),this.onDestroyFn(),this.maybeCleanup()}}),wR=P(y({},fw),{consumerMarkedDirty(){this.view[M]|=8192,ns(this.view),this.notifier.notify(14)},destroy(){ro(this),this.onDestroyFn(),this.maybeCleanup(),this.view[Mr]?.delete(this)}});function CR(e,t,n){let r=Object.create(wR);return r.view=e,r.zone=typeof Zone<"u"?Zone.current:null,r.notifier=t,r.fn=n,e[Mr]??=new Set,e[Mr].add(r),r.consumerMarkedDirty(r),r}function bR(e,t,n){let r=Object.create(DR);return r.fn=e,r.scheduler=t,r.notifier=n,r.zone=typeof Zone<"u"?Zone.current:null,r.scheduler.schedule(r),r.notifier.notify(13),r}function H9(e,t){let n=$n(e),r=t.elementInjector||Fu();return new No(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var yw=null;function Dn(){return yw}function Dw(e){yw??=e}var fl=class{};var $e=new E(""),Op=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(ER),providedIn:"platform"})}return e})();var ER=(()=>{class e extends Op{_location;_history;_doc=v($e);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Dn().getBaseHref(this._doc)}onPopState(n){let r=Dn().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Dn().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,o){this._history.pushState(n,r,o)}replaceState(n,r,o){this._history.replaceState(n,r,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function Fp(e,t){if(e.length==0)return t;if(t.length==0)return e;let n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,n==2?e+t.substring(1):n==1?e+t:e+"/"+t}function pw(e){let t=e.match(/#|\?|$/),n=t&&t.index||e.length,r=n-(e[n-1]==="/"?1:0);return e.slice(0,r)+e.slice(n)}function mn(e){return e&&e[0]!=="?"?"?"+e:e}var tr=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(Cw),providedIn:"root"})}return e})(),ww=new E(""),Cw=(()=>{class e extends tr{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??v($e).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return Fp(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+mn(this._platformLocation.search),o=this._platformLocation.hash;return o&&n?`${r}${o}`:r}pushState(n,r,o,i){let s=this.prepareExternalUrl(o+mn(i));this._platformLocation.pushState(n,r,s)}replaceState(n,r,o,i){let s=this.prepareExternalUrl(o+mn(i));this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(r){return new(r||e)(I(Op),I(ww,8))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),bw=(()=>{class e extends tr{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,r!=null&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){let r=this._platformLocation.hash??"#";return r.length>0?r.substring(1):r}prepareExternalUrl(n){let r=Fp(this._baseHref,n);return r.length>0?"#"+r:r}pushState(n,r,o,i){let s=this.prepareExternalUrl(o+mn(i));s.length==0&&(s=this._platformLocation.pathname),this._platformLocation.pushState(n,r,s)}replaceState(n,r,o,i){let s=this.prepareExternalUrl(o+mn(i));s.length==0&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(r){return new(r||e)(I(Op),I(ww,8))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),ds=(()=>{class e{_subject=new te;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=xR(pw(hw(r))),this._locationStrategy.onPopState(o=>{this._subject.next({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+mn(r))}normalize(n){return e.stripTrailingSlash(_R(this._basePath,hw(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",o=null){this._locationStrategy.pushState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+mn(r)),o)}replaceState(n,r="",o=null){this._locationStrategy.replaceState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+mn(r)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(o=>o(n,r))}subscribe(n,r,o){return this._subject.subscribe({next:n,error:r??void 0,complete:o??void 0})}static normalizeQueryParams=mn;static joinWithSlash=Fp;static stripTrailingSlash=pw;static \u0275fac=function(r){return new(r||e)(I(tr))};static \u0275prov=C({token:e,factory:()=>IR(),providedIn:"root"})}return e})();function IR(){return new ds(I(tr))}function _R(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function hw(e){return e.replace(/\/index.html$/,"")}function xR(e){if(new RegExp("^(https?:)?//").test(e)){let[,n]=e.split(/\/\/[^\/]+/);return n}return e}var Ew=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(Ew||{});var Ge=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(Ge||{}),J=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(J||{}),lt=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(lt||{}),ct={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function SR(e){return ut(e)[le.LocaleId]}function TR(e,t,n){let r=ut(e),o=[r[le.DayPeriodsFormat],r[le.DayPeriodsStandalone]],i=bt(o,t);return bt(i,n)}function MR(e,t,n){let r=ut(e),o=[r[le.DaysFormat],r[le.DaysStandalone]],i=bt(o,t);return bt(i,n)}function AR(e,t,n){let r=ut(e),o=[r[le.MonthsFormat],r[le.MonthsStandalone]],i=bt(o,t);return bt(i,n)}function NR(e,t){let r=ut(e)[le.Eras];return bt(r,t)}function ol(e,t){let n=ut(e);return bt(n[le.DateFormat],t)}function il(e,t){let n=ut(e);return bt(n[le.TimeFormat],t)}function sl(e,t){let r=ut(e)[le.DateTimeFormat];return bt(r,t)}function vn(e,t){let n=ut(e),r=n[le.NumberSymbols][t];if(typeof r>"u"){if(t===ct.CurrencyDecimal)return n[le.NumberSymbols][ct.Decimal];if(t===ct.CurrencyGroup)return n[le.NumberSymbols][ct.Group]}return r}function RR(e,t){return ut(e)[le.NumberFormats][t]}function Iw(e){if(!e[le.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[le.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function OR(e){let t=ut(e);return Iw(t),(t[le.ExtraData][2]||[]).map(r=>typeof r=="string"?bp(r):[bp(r[0]),bp(r[1])])}function FR(e,t,n){let r=ut(e);Iw(r);let o=[r[le.ExtraData][0],r[le.ExtraData][1]],i=bt(o,t)||[];return bt(i,n)||[]}function bt(e,t){for(let n=t;n>-1;n--)if(typeof e[n]<"u")return e[n];throw new Error("Locale data API: locale data undefined")}function bp(e){let[t,n]=e.split(":");return{hours:+t,minutes:+n}}var PR=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,al={},LR=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,yn=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}(yn||{}),G=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.FractionalSeconds=6]="FractionalSeconds",e[e.Day=7]="Day",e}(G||{}),z=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}(z||{});function kR(e,t,n,r){let o=qR(e);t=gn(n,t)||t;let s=[],a;for(;t;)if(a=LR.exec(t),a){s=s.concat(a.slice(1));let c=s.pop();if(!c)break;t=c}else{s.push(t);break}let u=o.getTimezoneOffset();r&&(u=xw(r,u),o=GR(o,r,!0));let l="";return s.forEach(c=>{let d=HR(c);l+=d?d(o,n,u):c==="''"?"'":c.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function pl(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function gn(e,t){let n=SR(e);if(al[n]??={},al[n][t])return al[n][t];let r="";switch(t){case"shortDate":r=ol(e,lt.Short);break;case"mediumDate":r=ol(e,lt.Medium);break;case"longDate":r=ol(e,lt.Long);break;case"fullDate":r=ol(e,lt.Full);break;case"shortTime":r=il(e,lt.Short);break;case"mediumTime":r=il(e,lt.Medium);break;case"longTime":r=il(e,lt.Long);break;case"fullTime":r=il(e,lt.Full);break;case"short":let o=gn(e,"shortTime"),i=gn(e,"shortDate");r=ul(sl(e,lt.Short),[o,i]);break;case"medium":let s=gn(e,"mediumTime"),a=gn(e,"mediumDate");r=ul(sl(e,lt.Medium),[s,a]);break;case"long":let u=gn(e,"longTime"),l=gn(e,"longDate");r=ul(sl(e,lt.Long),[u,l]);break;case"full":let c=gn(e,"fullTime"),d=gn(e,"fullDate");r=ul(sl(e,lt.Full),[c,d]);break}return r&&(al[n][t]=r),r}function ul(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(n,r){return t!=null&&r in t?t[r]:n})),e}function Ot(e,t,n="-",r,o){let i="";(e<0||o&&e<=0)&&(o?e=-e+1:(e=-e,i=n));let s=String(e);for(;s.length0||a>-n)&&(a+=n),e===G.Hours)a===0&&n===-12&&(a=12);else if(e===G.FractionalSeconds)return jR(a,t);let u=vn(s,ct.MinusSign);return Ot(a,t,u,r,o)}}function VR(e,t){switch(e){case G.FullYear:return t.getFullYear();case G.Month:return t.getMonth();case G.Date:return t.getDate();case G.Hours:return t.getHours();case G.Minutes:return t.getMinutes();case G.Seconds:return t.getSeconds();case G.FractionalSeconds:return t.getMilliseconds();case G.Day:return t.getDay();default:throw new Error(`Unknown DateType value "${e}".`)}}function oe(e,t,n=Ge.Format,r=!1){return function(o,i){return UR(o,i,e,t,n,r)}}function UR(e,t,n,r,o,i){switch(n){case z.Months:return AR(t,o,r)[e.getMonth()];case z.Days:return MR(t,o,r)[e.getDay()];case z.DayPeriods:let s=e.getHours(),a=e.getMinutes();if(i){let l=OR(t),c=FR(t,o,r),d=l.findIndex(f=>{if(Array.isArray(f)){let[p,h]=f,g=s>=p.hours&&a>=p.minutes,m=s0?Math.floor(o/60):Math.ceil(o/60);switch(e){case yn.Short:return(o>=0?"+":"")+Ot(s,2,i)+Ot(Math.abs(o%60),2,i);case yn.ShortGMT:return"GMT"+(o>=0?"+":"")+Ot(s,1,i);case yn.Long:return"GMT"+(o>=0?"+":"")+Ot(s,2,i)+":"+Ot(Math.abs(o%60),2,i);case yn.Extended:return r===0?"Z":(o>=0?"+":"")+Ot(s,2,i)+":"+Ot(Math.abs(o%60),2,i);default:throw new Error(`Unknown zone width "${e}"`)}}}var BR=0,dl=4;function $R(e){let t=pl(e,BR,1).getDay();return pl(e,0,1+(t<=dl?dl:dl+7)-t)}function _w(e){let t=e.getDay(),n=t===0?-3:dl-t;return pl(e.getFullYear(),e.getMonth(),e.getDate()+n)}function Ep(e,t=!1){return function(n,r){let o;if(t){let i=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,s=n.getDate();o=1+Math.floor((s+i)/7)}else{let i=_w(n),s=$R(i.getFullYear()),a=i.getTime()-s.getTime();o=1+Math.round(a/6048e5)}return Ot(o,e,vn(r,ct.MinusSign))}}function cl(e,t=!1){return function(n,r){let i=_w(n).getFullYear();return Ot(i,e,vn(r,ct.MinusSign),t)}}var Ip={};function HR(e){if(Ip[e])return Ip[e];let t;switch(e){case"G":case"GG":case"GGG":t=oe(z.Eras,J.Abbreviated);break;case"GGGG":t=oe(z.Eras,J.Wide);break;case"GGGGG":t=oe(z.Eras,J.Narrow);break;case"y":t=ye(G.FullYear,1,0,!1,!0);break;case"yy":t=ye(G.FullYear,2,0,!0,!0);break;case"yyy":t=ye(G.FullYear,3,0,!1,!0);break;case"yyyy":t=ye(G.FullYear,4,0,!1,!0);break;case"Y":t=cl(1);break;case"YY":t=cl(2,!0);break;case"YYY":t=cl(3);break;case"YYYY":t=cl(4);break;case"M":case"L":t=ye(G.Month,1,1);break;case"MM":case"LL":t=ye(G.Month,2,1);break;case"MMM":t=oe(z.Months,J.Abbreviated);break;case"MMMM":t=oe(z.Months,J.Wide);break;case"MMMMM":t=oe(z.Months,J.Narrow);break;case"LLL":t=oe(z.Months,J.Abbreviated,Ge.Standalone);break;case"LLLL":t=oe(z.Months,J.Wide,Ge.Standalone);break;case"LLLLL":t=oe(z.Months,J.Narrow,Ge.Standalone);break;case"w":t=Ep(1);break;case"ww":t=Ep(2);break;case"W":t=Ep(1,!0);break;case"d":t=ye(G.Date,1);break;case"dd":t=ye(G.Date,2);break;case"c":case"cc":t=ye(G.Day,1);break;case"ccc":t=oe(z.Days,J.Abbreviated,Ge.Standalone);break;case"cccc":t=oe(z.Days,J.Wide,Ge.Standalone);break;case"ccccc":t=oe(z.Days,J.Narrow,Ge.Standalone);break;case"cccccc":t=oe(z.Days,J.Short,Ge.Standalone);break;case"E":case"EE":case"EEE":t=oe(z.Days,J.Abbreviated);break;case"EEEE":t=oe(z.Days,J.Wide);break;case"EEEEE":t=oe(z.Days,J.Narrow);break;case"EEEEEE":t=oe(z.Days,J.Short);break;case"a":case"aa":case"aaa":t=oe(z.DayPeriods,J.Abbreviated);break;case"aaaa":t=oe(z.DayPeriods,J.Wide);break;case"aaaaa":t=oe(z.DayPeriods,J.Narrow);break;case"b":case"bb":case"bbb":t=oe(z.DayPeriods,J.Abbreviated,Ge.Standalone,!0);break;case"bbbb":t=oe(z.DayPeriods,J.Wide,Ge.Standalone,!0);break;case"bbbbb":t=oe(z.DayPeriods,J.Narrow,Ge.Standalone,!0);break;case"B":case"BB":case"BBB":t=oe(z.DayPeriods,J.Abbreviated,Ge.Format,!0);break;case"BBBB":t=oe(z.DayPeriods,J.Wide,Ge.Format,!0);break;case"BBBBB":t=oe(z.DayPeriods,J.Narrow,Ge.Format,!0);break;case"h":t=ye(G.Hours,1,-12);break;case"hh":t=ye(G.Hours,2,-12);break;case"H":t=ye(G.Hours,1);break;case"HH":t=ye(G.Hours,2);break;case"m":t=ye(G.Minutes,1);break;case"mm":t=ye(G.Minutes,2);break;case"s":t=ye(G.Seconds,1);break;case"ss":t=ye(G.Seconds,2);break;case"S":t=ye(G.FractionalSeconds,1);break;case"SS":t=ye(G.FractionalSeconds,2);break;case"SSS":t=ye(G.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":t=ll(yn.Short);break;case"ZZZZZ":t=ll(yn.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=ll(yn.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=ll(yn.Long);break;default:return null}return Ip[e]=t,t}function xw(e,t){e=e.replace(/:/g,"");let n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function zR(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function GR(e,t,n){let r=n?-1:1,o=e.getTimezoneOffset(),i=xw(t,o);return zR(e,r*(i-o))}function qR(e){if(gw(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[o,i=1,s=1]=e.split("-").map(a=>+a);return pl(o,i-1,s)}let n=parseFloat(e);if(!isNaN(e-n))return new Date(n);let r;if(r=e.match(PR))return WR(r)}let t=new Date(e);if(!gw(t))throw new Error(`Unable to convert "${e}" into a date`);return t}function WR(e){let t=new Date(0),n=0,r=0,o=e[8]?t.setUTCFullYear:t.setFullYear,i=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),o.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let s=Number(e[4]||0)-n,a=Number(e[5]||0)-r,u=Number(e[6]||0),l=Math.floor(parseFloat("0."+(e[7]||0))*1e3);return i.call(t,s,a,u,l),t}function gw(e){return e instanceof Date&&!isNaN(e.valueOf())}var ZR=/^(\d+)?\.((\d+)(-(\d+))?)?$/,mw=22,hl=".",cs="0",KR=";",YR=",",_p="#";function QR(e,t,n,r,o,i,s=!1){let a="",u=!1;if(!isFinite(e))a=vn(n,ct.Infinity);else{let l=tO(e);s&&(l=eO(l));let c=t.minInt,d=t.minFrac,f=t.maxFrac;if(i){let N=i.match(ZR);if(N===null)throw new Error(`${i} is not a valid digit info`);let B=N[1],ee=N[3],pe=N[5];B!=null&&(c=xp(B)),ee!=null&&(d=xp(ee)),pe!=null?f=xp(pe):ee!=null&&d>f&&(f=d)}nO(l,d,f);let p=l.digits,h=l.integerLen,g=l.exponent,m=[];for(u=p.every(N=>!N);h0?m=p.splice(h,p.length):(m=p,p=[0]);let D=[];for(p.length>=t.lgSize&&D.unshift(p.splice(-t.lgSize,p.length).join(""));p.length>t.gSize;)D.unshift(p.splice(-t.gSize,p.length).join(""));p.length&&D.unshift(p.join("")),a=D.join(vn(n,r)),m.length&&(a+=vn(n,o)+m.join("")),g&&(a+=vn(n,ct.Exponential)+"+"+g)}return e<0&&!u?a=t.negPre+a+t.negSuf:a=t.posPre+a+t.posSuf,a}function JR(e,t,n){let r=RR(t,Ew.Decimal),o=XR(r,vn(t,ct.MinusSign));return QR(e,o,t,ct.Group,ct.Decimal,n)}function XR(e,t="-"){let n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=e.split(KR),o=r[0],i=r[1],s=o.indexOf(hl)!==-1?o.split(hl):[o.substring(0,o.lastIndexOf(cs)+1),o.substring(o.lastIndexOf(cs)+1)],a=s[0],u=s[1]||"";n.posPre=a.substring(0,a.indexOf(_p));for(let c=0;c-1&&(t=t.replace(hl,"")),(i=t.search(/e/i))>0?(o<0&&(o=i),o+=+t.slice(i+1),t=t.substring(0,i)):o<0&&(o=t.length),i=0;t.charAt(i)===cs;i++);if(i===(a=t.length))r=[0],o=1;else{for(a--;t.charAt(a)===cs;)a--;for(o-=i,r=[],s=0;i<=a;i++,s++)r[s]=Number(t.charAt(i))}return o>mw&&(r=r.splice(0,mw-1),n=o-1,o=1),{digits:r,exponent:n,integerLen:o}}function nO(e,t,n){if(t>n)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${n}).`);let r=e.digits,o=r.length-e.integerLen,i=Math.min(Math.max(t,o),n),s=i+e.integerLen,a=r[s];if(s>0){r.splice(Math.max(e.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)r.unshift(0),e.integerLen++;r.unshift(1),e.integerLen++}else r[s-1]++;for(;o=l?h.pop():u=!1),f>=10?1:0},0);c&&(r.unshift(c),e.integerLen++)}function xp(e){let t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}function d7(e,t,n){return JD(e,t,n)}function gl(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[o,i]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(o.trim()===t)return decodeURIComponent(i)}return null}var Sp=/\s+/,vw=[],f7=(()=>{class e{_ngEl;_renderer;initialClasses=vw;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(Sp):vw}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Sp):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let o=this.stateMap.get(n);o!==void 0?(o.enabled!==r&&(o.changed=!0,o.enabled=r),o.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],o=n[1];o.changed?(this._toggleClass(r,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),o.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(Sp).forEach(o=>{r?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}static \u0275fac=function(r){return new(r||e)(w(Te),w(at))};static \u0275dir=H({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})();var p7=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(n,r,o){this._ngEl=n,this._differs=r,this._renderer=o}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,r){let[o,i]=n.split("."),s=o.indexOf("-")===-1?void 0:Ht.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,o,i?`${r}${i}`:r,s):this._renderer.removeStyle(this._ngEl.nativeElement,o,s)}_applyChanges(n){n.forEachRemovedItem(r=>this._setStyle(r.key,null)),n.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),n.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}static \u0275fac=function(r){return new(r||e)(w(Te),w(Cp),w(at))};static \u0275dir=H({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),h7=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,o):!1,get:(n,r,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,o)}})}static \u0275fac=function(r){return new(r||e)(w(Br))};static \u0275dir=H({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[gt]})}return e})();function Pp(e,t){return new b(2100,!1)}var Tp=class{createSubscription(t,n){return Ct(()=>t.subscribe({next:n,error:r=>{throw r}}))}dispose(t){Ct(()=>t.unsubscribe())}},Mp=class{createSubscription(t,n){return t.then(n,r=>{throw r})}dispose(t){}},rO=new Mp,oO=new Tp,g7=(()=>{class e{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;constructor(n){this._ref=n}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(n){if(!this._obj){if(n)try{this.markForCheckOnValueUpdate=!1,this._subscribe(n)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return n!==this._obj?(this._dispose(),this.transform(n)):this._latestValue}_subscribe(n){this._obj=n,this._strategy=this._selectStrategy(n),this._subscription=this._strategy.createSubscription(n,r=>this._updateLatestValue(n,r))}_selectStrategy(n){if(Jn(n))return rO;if(gp(n))return oO;throw Pp(e,n)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(n,r){n===this._obj&&(this._latestValue=r,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(r){return new(r||e)(w(wt,16))};static \u0275pipe=ko({name:"async",type:e,pure:!1})}return e})();var iO="mediumDate",sO=new E(""),aO=new E(""),m7=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(n,r,o){this.locale=n,this.defaultTimezone=r,this.defaultOptions=o}transform(n,r,o,i){if(n==null||n===""||n!==n)return null;try{let s=r??this.defaultOptions?.dateFormat??iO,a=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return kR(n,s,i||this.locale,a)}catch(s){throw Pp(e,s.message)}}static \u0275fac=function(r){return new(r||e)(w(ls,16),w(sO,24),w(aO,24))};static \u0275pipe=ko({name:"date",type:e,pure:!0})}return e})();var v7=(()=>{class e{_locale;constructor(n){this._locale=n}transform(n,r,o){if(!uO(n))return null;o||=this._locale;try{let i=lO(n);return JR(i,o,r)}catch(i){throw Pp(e,i.message)}}static \u0275fac=function(r){return new(r||e)(w(ls,16))};static \u0275pipe=ko({name:"number",type:e,pure:!0})}return e})();function uO(e){return!(e==null||e===""||e!==e)}function lO(e){if(typeof e=="string"&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!="number")throw new Error(`${e} is not a number`);return e}var Lp="browser",cO="server";function dO(e){return e===Lp}function ml(e){return e===cO}var fO=(()=>{class e{static \u0275prov=C({token:e,providedIn:"root",factory:()=>dO(v(fn))?new Ap(v($e),window):new Np})}return e})(),Ap=class{document;window;offset=()=>[0,0];constructor(t,n){this.document=t,this.window=n}setOffset(t){Array.isArray(t)?this.offset=()=>t:this.offset=t}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(t){this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){let n=pO(this.document,t);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(t){this.window.history.scrollRestoration=t}scrollToElement(t){let n=t.getBoundingClientRect(),r=n.left+this.window.pageXOffset,o=n.top+this.window.pageYOffset,i=this.offset();this.window.scrollTo(r-i[0],o-i[1])}};function pO(e,t){let n=e.getElementById(t)||e.getElementsByName(t)[0];if(n)return n;if(typeof e.createTreeWalker=="function"&&e.body&&typeof e.body.attachShadow=="function"){let r=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT),o=r.currentNode;for(;o;){let i=o.shadowRoot;if(i){let s=i.getElementById(t)||i.querySelector(`[name="${t}"]`);if(s)return s}o=r.nextNode()}}return null}var Np=class{setOffset(t){}getScrollPosition(){return[0,0]}scrollToPosition(t){}scrollToAnchor(t){}setHistoryScrollRestoration(t){}},Vo=class{};var ps=class{},yl=class{},wn=class e{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(` `).forEach(n=>{let r=n.indexOf(":");if(r>0){let o=n.slice(0,r),i=n.slice(r+1).trim();this.addHeaderEntry(o,i)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((n,r)=>{this.addHeaderEntry(r,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([n,r])=>{this.setHeaderEntries(n,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let n=this.headers.get(t.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,n){return this.clone({name:t,value:n,op:"a"})}set(t,n){return this.clone({name:t,value:n,op:"s"})}delete(t,n){return this.clone({name:t,value:n,op:"d"})}maybeSetNormalizedName(t,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,t)}init(){this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(n=>{this.headers.set(n,t.headers.get(n)),this.normalizedNames.set(n,t.normalizedNames.get(n))})}clone(t){let n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}applyUpdate(t){let n=t.name.toLowerCase();switch(t.op){case"a":case"s":let r=t.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,n);let o=(t.op==="a"?this.headers.get(n):void 0)||[];o.push(...r),this.headers.set(n,o);break;case"d":let i=t.value;if(!i)this.headers.delete(n),this.normalizedNames.delete(n);else{let s=this.headers.get(n);if(!s)return;s=s.filter(a=>i.indexOf(a)===-1),s.length===0?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,s)}break}}addHeaderEntry(t,n){let r=t.toLowerCase();this.maybeSetNormalizedName(t,r),this.headers.has(r)?this.headers.get(r).push(n):this.headers.set(r,[n])}setHeaderEntries(t,n){let r=(Array.isArray(n)?n:[n]).map(i=>i.toString()),o=t.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}};var jp=class{encodeKey(t){return Tw(t)}encodeValue(t){return Tw(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function hO(e,t){let n=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(o=>{let i=o.indexOf("="),[s,a]=i==-1?[t.decodeKey(o),""]:[t.decodeKey(o.slice(0,i)),t.decodeValue(o.slice(i+1))],u=n.get(s)||[];u.push(a),n.set(s,u)}),n}var gO=/%(\d[a-f0-9])/gi,mO={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Tw(e){return encodeURIComponent(e).replace(gO,(t,n)=>mO[n]??t)}function vl(e){return`${e}`}var rr=class e{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new jp,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=hO(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(n=>{let r=t.fromObject[n],o=Array.isArray(r)?r.map(vl):[vl(r)];this.map.set(n,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let n=this.map.get(t);return n?n[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,n){return this.clone({param:t,value:n,op:"a"})}appendAll(t){let n=[];return Object.keys(t).forEach(r=>{let o=t[r];Array.isArray(o)?o.forEach(i=>{n.push({param:r,value:i,op:"a"})}):n.push({param:r,value:o,op:"a"})}),this.clone(n)}set(t,n){return this.clone({param:t,value:n,op:"s"})}delete(t,n){return this.clone({param:t,value:n,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let n=this.encoder.encodeKey(t);return this.map.get(t).map(r=>n+"="+this.encoder.encodeValue(r)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(t),n}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let n=(t.op==="a"?this.map.get(t.param):void 0)||[];n.push(vl(t.value)),this.map.set(t.param,n);break;case"d":if(t.value!==void 0){let r=this.map.get(t.param)||[],o=r.indexOf(vl(t.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}},Mw=class{defaultValue;constructor(t){this.defaultValue=t}},Vp=class{map=new Map;set(t,n){return this.map.set(t,n),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function vO(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Aw(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function Nw(e){return typeof Blob<"u"&&e instanceof Blob}function Rw(e){return typeof FormData<"u"&&e instanceof FormData}function yO(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}var fs=class e{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(t,n,r,o){this.url=n,this.method=t.toUpperCase();let i;if(vO(this.method)||o?(this.body=r!==void 0?r:null,i=o):i=r,i&&(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params),this.transferCache=i.transferCache),this.headers??=new wn,this.context??=new Vp,!this.params)this.params=new rr,this.urlWithParams=n;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=n;else{let a=n.indexOf("?"),u=a===-1?"?":af.set(p,t.setHeaders[p]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((f,p)=>f.set(p,t.setParams[p]),c)),new e(n,r,s,{params:c,headers:l,context:d,reportProgress:u,responseType:o,withCredentials:a,transferCache:i})}},or=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(or||{}),hs=class{headers;status;statusText;url;ok;type;constructor(t,n=200,r="OK"){this.headers=t.headers||new wn,this.status=t.status!==void 0?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},Dl=class e extends hs{constructor(t={}){super(t)}type=or.ResponseHeader;clone(t={}){return new e({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},gs=class e extends hs{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=or.Response;clone(t={}){return new e({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},nr=class extends hs{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},Lw=200,DO=204;function kp(e,t){return{body:t,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}var wO=(()=>{class e{handler;constructor(n){this.handler=n}request(n,r,o={}){let i;if(n instanceof fs)i=n;else{let u;o.headers instanceof wn?u=o.headers:u=new wn(o.headers);let l;o.params&&(o.params instanceof rr?l=o.params:l=new rr({fromObject:o.params})),i=new fs(n,r,o.body!==void 0?o.body:null,{headers:u,context:o.context,params:l,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let s=_(i).pipe(jt(u=>this.handler.handle(u)));if(n instanceof fs||o.observe==="events")return s;let a=s.pipe(Ve(u=>u instanceof gs));switch(o.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return a.pipe(R(u=>{if(u.body!==null&&!(u.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return u.body}));case"blob":return a.pipe(R(u=>{if(u.body!==null&&!(u.body instanceof Blob))throw new Error("Response is not a Blob.");return u.body}));case"text":return a.pipe(R(u=>{if(u.body!==null&&typeof u.body!="string")throw new Error("Response is not a string.");return u.body}));case"json":default:return a.pipe(R(u=>u.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:new rr().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,o={}){return this.request("PATCH",n,kp(o,r))}post(n,r,o={}){return this.request("POST",n,kp(o,r))}put(n,r,o={}){return this.request("PUT",n,kp(o,r))}static \u0275fac=function(r){return new(r||e)(I(ps))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),CO=/^\)\]\}',?\n/,bO="X-Request-URL";function Ow(e){if(e.url)return e.url;let t=bO.toLocaleLowerCase();return e.headers.get(t)}var EO=(()=>{class e{fetchImpl=v(Up,{optional:!0})?.fetch??((...n)=>globalThis.fetch(...n));ngZone=v(me);handle(n){return new F(r=>{let o=new AbortController;return this.doRequest(n,o.signal,r).then(Bp,i=>r.error(new nr({error:i}))),()=>o.abort()})}doRequest(n,r,o){return _i(this,null,function*(){let i=this.createRequestInit(n),s;try{let p=this.ngZone.runOutsideAngular(()=>this.fetchImpl(n.urlWithParams,y({signal:r},i)));IO(p),o.next({type:or.Sent}),s=yield p}catch(p){o.error(new nr({error:p,status:p.status??0,statusText:p.statusText,url:n.urlWithParams,headers:p.headers}));return}let a=new wn(s.headers),u=s.statusText,l=Ow(s)??n.urlWithParams,c=s.status,d=null;if(n.reportProgress&&o.next(new Dl({headers:a,status:c,statusText:u,url:l})),s.body){let p=s.headers.get("content-length"),h=[],g=s.body.getReader(),m=0,D,N,B=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>_i(this,null,function*(){for(;;){let{done:pe,value:we}=yield g.read();if(pe)break;if(h.push(we),m+=we.length,n.reportProgress){N=n.responseType==="text"?(N??"")+(D??=new TextDecoder).decode(we,{stream:!0}):void 0;let Zt=()=>o.next({type:or.DownloadProgress,total:p?+p:void 0,loaded:m,partialText:N});B?B.run(Zt):Zt()}}}));let ee=this.concatChunks(h,m);try{let pe=s.headers.get("Content-Type")??"";d=this.parseBody(n,ee,pe)}catch(pe){o.error(new nr({error:pe,headers:new wn(s.headers),status:s.status,statusText:s.statusText,url:Ow(s)??n.urlWithParams}));return}}c===0&&(c=d?Lw:0),c>=200&&c<300?(o.next(new gs({body:d,headers:a,status:c,statusText:u,url:l})),o.complete()):o.error(new nr({error:d,headers:a,status:c,statusText:u,url:l}))})}parseBody(n,r,o){switch(n.responseType){case"json":let i=new TextDecoder().decode(r).replace(CO,"");return i===""?null:JSON.parse(i);case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(n){let r={},o=n.withCredentials?"include":void 0;if(n.headers.forEach((i,s)=>r[i]=s.join(",")),n.headers.has("Accept")||(r.Accept="application/json, text/plain, */*"),!n.headers.has("Content-Type")){let i=n.detectContentTypeHeader();i!==null&&(r["Content-Type"]=i)}return{body:n.serializeBody(),method:n.method,headers:r,credentials:o}}concatChunks(n,r){let o=new Uint8Array(r),i=0;for(let s of n)o.set(s,i),i+=s.length;return o}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Up=class{};function Bp(){}function IO(e){e.then(Bp,Bp)}function _O(e,t){return t(e)}function xO(e,t,n){return(r,o)=>st(n,()=>t(r,i=>e(i,o)))}var $p=new E(""),SO=new E(""),TO=new E("",{providedIn:"root",factory:()=>!0});var Fw=(()=>{class e extends ps{backend;injector;chain=null;pendingTasks=v(dn);contributeToStability=v(TO);constructor(n,r){super(),this.backend=n,this.injector=r}handle(n){if(this.chain===null){let r=Array.from(new Set([...this.injector.get($p),...this.injector.get(SO,[])]));this.chain=r.reduceRight((o,i)=>xO(o,i,this.injector),_O)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(n,o=>this.backend.handle(o)).pipe(jn(()=>this.pendingTasks.remove(r)))}else return this.chain(n,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||e)(I(yl),I(Je))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();var MO=/^\)\]\}',?\n/;function AO(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}var Pw=(()=>{class e{xhrFactory;constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new b(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?ne(r.\u0275loadImpl()):_(null)).pipe(Ee(()=>new F(i=>{let s=r.build();if(s.open(n.method,n.urlWithParams),n.withCredentials&&(s.withCredentials=!0),n.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),n.headers.has("Accept")||s.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let g=n.detectContentTypeHeader();g!==null&&s.setRequestHeader("Content-Type",g)}if(n.responseType){let g=n.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=n.serializeBody(),u=null,l=()=>{if(u!==null)return u;let g=s.statusText||"OK",m=new wn(s.getAllResponseHeaders()),D=AO(s)||n.url;return u=new Dl({headers:m,status:s.status,statusText:g,url:D}),u},c=()=>{let{headers:g,status:m,statusText:D,url:N}=l(),B=null;m!==DO&&(B=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=B?Lw:0);let ee=m>=200&&m<300;if(n.responseType==="json"&&typeof B=="string"){let pe=B;B=B.replace(MO,"");try{B=B!==""?JSON.parse(B):null}catch(we){B=pe,ee&&(ee=!1,B={error:we,text:B})}}ee?(i.next(new gs({body:B,headers:g,status:m,statusText:D,url:N||void 0})),i.complete()):i.error(new nr({error:B,headers:g,status:m,statusText:D,url:N||void 0}))},d=g=>{let{url:m}=l(),D=new nr({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});i.error(D)},f=!1,p=g=>{f||(i.next(l()),f=!0);let m={type:or.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),n.responseType==="text"&&s.responseText&&(m.partialText=s.responseText),i.next(m)},h=g=>{let m={type:or.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),i.next(m)};return s.addEventListener("load",c),s.addEventListener("error",d),s.addEventListener("timeout",d),s.addEventListener("abort",d),n.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",h)),s.send(a),i.next({type:or.Sent}),()=>{s.removeEventListener("error",d),s.removeEventListener("abort",d),s.removeEventListener("load",c),s.removeEventListener("timeout",d),n.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",h)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(r){return new(r||e)(I(Vo))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),kw=new E(""),NO="XSRF-TOKEN",RO=new E("",{providedIn:"root",factory:()=>NO}),OO="X-XSRF-TOKEN",FO=new E("",{providedIn:"root",factory:()=>OO}),wl=class{},PO=(()=>{class e{doc;platform;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(n,r,o){this.doc=n,this.platform=r,this.cookieName=o}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=gl(n,this.cookieName),this.lastCookieString=n),this.lastToken}static \u0275fac=function(r){return new(r||e)(I($e),I(fn),I(RO))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();function LO(e,t){let n=e.url.toLowerCase();if(!v(kw)||e.method==="GET"||e.method==="HEAD"||n.startsWith("http://")||n.startsWith("https://"))return t(e);let r=v(wl).getToken(),o=v(FO);return r!=null&&!e.headers.has(o)&&(e=e.clone({headers:e.headers.set(o,r)})),t(e)}var jw=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(jw||{});function kO(e,t){return{\u0275kind:e,\u0275providers:t}}function A7(...e){let t=[wO,Pw,Fw,{provide:ps,useExisting:Fw},{provide:yl,useFactory:()=>v(EO,{optional:!0})??v(Pw)},{provide:$p,useValue:LO,multi:!0},{provide:kw,useValue:!0},{provide:wl,useClass:PO}];for(let n of e)t.push(...n.\u0275providers);return jr(t)}function N7(e){return kO(jw.Interceptors,e.map(t=>({provide:$p,useValue:t,multi:!0})))}var zp=class extends fl{supportsDOMEvents=!0},Gp=class e extends zp{static makeCurrent(){Dw(new e)}onAndCancel(t,n,r){return t.addEventListener(n,r),()=>{t.removeEventListener(n,r)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=jO();return n==null?null:VO(n)}resetBaseElement(){ms=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return gl(document.cookie,t)}},ms=null;function jO(){return ms=ms||document.querySelector("base"),ms?ms.getAttribute("href"):null}function VO(e){return new URL(e,document.baseURI).pathname}var UO=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),qp=new E(""),zw=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,o){return this._findPluginFor(r).addEventListener(n,r,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new b(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(r){return new(r||e)(I(qp),I(me))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),bl=class{_doc;constructor(t){this._doc=t}manager},Cl="ng-app-id";function Vw(e){for(let t of e)t.remove()}function Uw(e,t){let n=t.createElement("style");return n.textContent=e,n}function BO(e,t,n,r){let o=e.head?.querySelectorAll(`style[${Cl}="${t}"],link[${Cl}="${t}"]`);if(o)for(let i of o)i.removeAttribute(Cl),i instanceof HTMLLinkElement?r.set(i.href.slice(i.href.lastIndexOf("/")+1),{usage:0,elements:[i]}):i.textContent&&n.set(i.textContent,{usage:0,elements:[i]})}function Wp(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var Gw=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,o,i={}){this.doc=n,this.appId=r,this.nonce=o,this.isServer=ml(i),BO(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let o of n)this.addUsage(o,this.inline,Uw);r?.forEach(o=>this.addUsage(o,this.external,Wp))}removeStyles(n,r){for(let o of n)this.removeUsage(o,this.inline);r?.forEach(o=>this.removeUsage(o,this.external))}addUsage(n,r,o){let i=r.get(n);i?i.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,o(n,this.doc)))})}removeUsage(n,r){let o=r.get(n);o&&(o.usage--,o.usage<=0&&(Vw(o.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])Vw(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:o}]of this.inline)o.push(this.addElement(n,Uw(r,this.doc)));for(let[r,{elements:o}]of this.external)o.push(this.addElement(n,Wp(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(Cl,this.appId),n.appendChild(r)}static \u0275fac=function(r){return new(r||e)(I($e),I(Kf),I(Qf,8),I(fn))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Hp={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Kp=/%COMP%/g,qw="%COMP%",$O=`_nghost-${qw}`,HO=`_ngcontent-${qw}`,zO=!0,GO=new E("",{providedIn:"root",factory:()=>zO});function qO(e){return HO.replace(Kp,e)}function WO(e){return $O.replace(Kp,e)}function Ww(e,t){return t.map(n=>n.replace(Kp,e))}var Bw=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,o,i,s,a,u,l=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=i,this.doc=s,this.platformId=a,this.ngZone=u,this.nonce=l,this.platformIsServer=ml(a),this.defaultRenderer=new vs(n,s,u,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===$t.ShadowDom&&(r=P(y({},r),{encapsulation:$t.Emulated}));let o=this.getOrCreateRenderer(n,r);return o instanceof El?o.applyToHost(n):o instanceof ys&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,i=o.get(r.id);if(!i){let s=this.doc,a=this.ngZone,u=this.eventManager,l=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,d=this.platformIsServer;switch(r.encapsulation){case $t.Emulated:i=new El(u,l,r,this.appId,c,s,a,d);break;case $t.ShadowDom:return new Zp(u,l,n,r,s,a,this.nonce,d);default:i=new ys(u,l,r,c,s,a,d);break}o.set(r.id,i)}return i}ngOnDestroy(){this.rendererByCompId.clear()}static \u0275fac=function(r){return new(r||e)(I(zw),I(Gw),I(Kf),I(GO),I($e),I(fn),I(me),I(Qf))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),vs=class{eventManager;doc;ngZone;platformIsServer;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,n,r,o){this.eventManager=t,this.doc=n,this.ngZone=r,this.platformIsServer=o}destroy(){}destroyNode=null;createElement(t,n){return n?this.doc.createElementNS(Hp[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){($w(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){t&&($w(t)?t.content:t).insertBefore(n,r)}removeChild(t,n){n.remove()}selectRootElement(t,n){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new b(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,o){if(o){n=o+":"+n;let i=Hp[o];i?t.setAttributeNS(i,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let o=Hp[r];o?t.removeAttributeNS(o,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,o){o&(Ht.DashCase|Ht.Important)?t.style.setProperty(n,r,o&Ht.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){r&Ht.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){t!=null&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r){if(typeof t=="string"&&(t=Dn().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${n}`);return this.eventManager.addEventListener(t,n,this.decoratePreventDefault(r))}decoratePreventDefault(t){return n=>{if(n==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(n)):t(n))===!1&&n.preventDefault()}}};function $w(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Zp=class extends vs{sharedStylesHost;hostEl;shadowRoot;constructor(t,n,r,o,i,s,a,u){super(t,i,s,u),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=Ww(o.id,o.styles);for(let d of l){let f=document.createElement("style");a&&f.setAttribute("nonce",a),f.textContent=d,this.shadowRoot.appendChild(f)}let c=o.getExternalStyles?.();if(c)for(let d of c){let f=Wp(d,i);a&&f.setAttribute("nonce",a),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(null,n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},ys=class extends vs{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,n,r,o,i,s,a,u){super(t,i,s,a),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=o,this.styles=u?Ww(u,r.styles):r.styles,this.styleUrls=r.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},El=class extends ys{contentAttr;hostAttr;constructor(t,n,r,o,i,s,a,u){let l=o+"-"+r.id;super(t,n,r,i,s,a,u,l),this.contentAttr=qO(l),this.hostAttr=WO(l)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){let r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}},ZO=(()=>{class e extends bl{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o){return n.addEventListener(r,o,!1),()=>this.removeEventListener(n,r,o)}removeEventListener(n,r,o){return n.removeEventListener(r,o)}static \u0275fac=function(r){return new(r||e)(I($e))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Hw=["alt","control","meta","shift"],KO={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},YO={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},QO=(()=>{class e extends bl{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o){let i=e.parseEventName(r),s=e.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Dn().onAndCancel(n,i.domEventName,s))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let i=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),Hw.forEach(l=>{let c=r.indexOf(l);c>-1&&(r.splice(c,1),s+=l+".")}),s+=i,r.length!=0||i.length===0)return null;let u={};return u.domEventName=o,u.fullKey=s,u}static matchEventFullKeyCode(n,r){let o=KO[n.key]||n.key,i="";return r.indexOf("code.")>-1&&(o=n.code,i="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),Hw.forEach(s=>{if(s!==o){let a=YO[s];a(n)&&(i+=s+".")}}),i+=o,i===r)}static eventCallback(n,r,o){return i=>{e.matchEventFullKeyCode(i,n)&&o.runGuarded(()=>r(i))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(r){return new(r||e)(I($e))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();function X7(e,t){return cw(y({rootComponent:e},JO(t)))}function JO(e){return{appProviders:[...rF,...e?.providers??[]],platformProviders:nF}}function XO(){Gp.makeCurrent()}function eF(){return new Nt}function tF(){return Cy(document),document}var nF=[{provide:fn,useValue:Lp},{provide:Yf,useValue:XO,multi:!0},{provide:$e,useFactory:tF,deps:[]}];var rF=[{provide:Ou,useValue:"root"},{provide:Nt,useFactory:eF,deps:[]},{provide:qp,useClass:ZO,multi:!0,deps:[$e,me,fn]},{provide:qp,useClass:QO,multi:!0,deps:[$e]},Bw,Gw,zw,{provide:Ao,useExisting:Bw},{provide:Vo,useClass:UO,deps:[]},[]];var Zw=(()=>{class e{_doc;constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}static \u0275fac=function(r){return new(r||e)(I($e))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var oF=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=I(iF),o},providedIn:"root"})}return e})(),iF=(()=>{class e extends oF{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case zt.NONE:return r;case zt.HTML:return Qn(r,"HTML")?Rt(r):Ly(this._doc,String(r)).toString();case zt.STYLE:return Qn(r,"Style")?Rt(r):r;case zt.SCRIPT:if(Qn(r,"Script"))return Rt(r);throw new b(5200,!1);case zt.URL:return Qn(r,"URL")?Rt(r):Gu(String(r));case zt.RESOURCE_URL:if(Qn(r,"ResourceURL"))return Rt(r);throw new b(5201,!1);default:throw new b(5202,!1)}}bypassSecurityTrustHtml(n){return xy(n)}bypassSecurityTrustStyle(n){return Sy(n)}bypassSecurityTrustScript(n){return Ty(n)}bypassSecurityTrustUrl(n){return My(n)}bypassSecurityTrustResourceUrl(n){return Ay(n)}static \u0275fac=function(r){return new(r||e)(I($e))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var k="primary",Fs=Symbol("RouteTitle"),eh=class{params;constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n[0]:n}return null}getAll(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}};function Go(e){return new eh(e)}function aF(e,t,n){let r=n.path.split("/");if(r.length>e.length||n.pathMatch==="full"&&(t.hasChildren()||r.lengthr[i]===o)}else return e===t}function oC(e){return e.length>0?e[e.length-1]:null}function ir(e){return Qt(e)?e:Jn(e)?ne(Promise.resolve(e)):_(e)}var lF={exact:sC,subset:aC},iC={exact:cF,subset:dF,ignored:()=>!0};function Kw(e,t,n){return lF[n.paths](e.root,t.root,n.matrixParams)&&iC[n.queryParams](e.queryParams,t.queryParams)&&!(n.fragment==="exact"&&e.fragment!==t.fragment)}function cF(e,t){return Gt(e,t)}function sC(e,t,n){if(!Gr(e.segments,t.segments)||!xl(e.segments,t.segments,n)||e.numberOfChildren!==t.numberOfChildren)return!1;for(let r in t.children)if(!e.children[r]||!sC(e.children[r],t.children[r],n))return!1;return!0}function dF(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>rC(e[n],t[n]))}function aC(e,t,n){return uC(e,t,t.segments,n)}function uC(e,t,n,r){if(e.segments.length>n.length){let o=e.segments.slice(0,n.length);return!(!Gr(o,n)||t.hasChildren()||!xl(o,n,r))}else if(e.segments.length===n.length){if(!Gr(e.segments,n)||!xl(e.segments,n,r))return!1;for(let o in t.children)if(!e.children[o]||!aC(e.children[o],t.children[o],r))return!1;return!0}else{let o=n.slice(0,e.segments.length),i=n.slice(e.segments.length);return!Gr(e.segments,o)||!xl(e.segments,o,r)||!e.children[k]?!1:uC(e.children[k],t,i,r)}}function xl(e,t,n){return t.every((r,o)=>iC[n](e[o].parameters,r.parameters))}var bn=class{root;queryParams;fragment;_queryParamMap;constructor(t=new W([],{}),n={},r=null){this.root=t,this.queryParams=n,this.fragment=r}get queryParamMap(){return this._queryParamMap??=Go(this.queryParams),this._queryParamMap}toString(){return hF.serialize(this)}},W=class{segments;children;parent=null;constructor(t,n){this.segments=t,this.children=n,Object.values(n).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Sl(this)}},zr=class{path;parameters;_parameterMap;constructor(t,n){this.path=t,this.parameters=n}get parameterMap(){return this._parameterMap??=Go(this.parameters),this._parameterMap}toString(){return cC(this)}};function fF(e,t){return Gr(e,t)&&e.every((n,r)=>Gt(n.parameters,t[r].parameters))}function Gr(e,t){return e.length!==t.length?!1:e.every((n,r)=>n.path===t[r].path)}function pF(e,t){let n=[];return Object.entries(e.children).forEach(([r,o])=>{r===k&&(n=n.concat(t(o,r)))}),Object.entries(e.children).forEach(([r,o])=>{r!==k&&(n=n.concat(t(o,r)))}),n}var Sh=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>new _s,providedIn:"root"})}return e})(),_s=class{parse(t){let n=new rh(t);return new bn(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(t){let n=`/${Ds(t.root,!0)}`,r=vF(t.queryParams),o=typeof t.fragment=="string"?`#${gF(t.fragment)}`:"";return`${n}${r}${o}`}},hF=new _s;function Sl(e){return e.segments.map(t=>cC(t)).join("/")}function Ds(e,t){if(!e.hasChildren())return Sl(e);if(t){let n=e.children[k]?Ds(e.children[k],!1):"",r=[];return Object.entries(e.children).forEach(([o,i])=>{o!==k&&r.push(`${o}:${Ds(i,!1)}`)}),r.length>0?`${n}(${r.join("//")})`:n}else{let n=pF(e,(r,o)=>o===k?[Ds(e.children[k],!1)]:[`${o}:${Ds(r,!1)}`]);return Object.keys(e.children).length===1&&e.children[k]!=null?`${Sl(e)}/${n[0]}`:`${Sl(e)}/(${n.join("//")})`}}function lC(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Il(e){return lC(e).replace(/%3B/gi,";")}function gF(e){return encodeURI(e)}function nh(e){return lC(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Tl(e){return decodeURIComponent(e)}function Yw(e){return Tl(e.replace(/\+/g,"%20"))}function cC(e){return`${nh(e.path)}${mF(e.parameters)}`}function mF(e){return Object.entries(e).map(([t,n])=>`;${nh(t)}=${nh(n)}`).join("")}function vF(e){let t=Object.entries(e).map(([n,r])=>Array.isArray(r)?r.map(o=>`${Il(n)}=${Il(o)}`).join("&"):`${Il(n)}=${Il(r)}`).filter(n=>n);return t.length?`?${t.join("&")}`:""}var yF=/^[^\/()?;#]+/;function Yp(e){let t=e.match(yF);return t?t[0]:""}var DF=/^[^\/()?;=#]+/;function wF(e){let t=e.match(DF);return t?t[0]:""}var CF=/^[^=?&#]+/;function bF(e){let t=e.match(CF);return t?t[0]:""}var EF=/^[^&#]+/;function IF(e){let t=e.match(EF);return t?t[0]:""}var rh=class{url;remaining;constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new W([],{}):new W([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(n).length>0)&&(r[k]=new W(t,n)),r}parseSegment(){let t=Yp(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new b(4009,!1);return this.capture(t),new zr(Tl(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let n=wF(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let o=Yp(this.remaining);o&&(r=o,this.capture(r))}t[Tl(n)]=Tl(r)}parseQueryParam(t){let n=bF(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let s=IF(this.remaining);s&&(r=s,this.capture(r))}let o=Yw(n),i=Yw(r);if(t.hasOwnProperty(o)){let s=t[o];Array.isArray(s)||(s=[s],t[o]=s),s.push(i)}else t[o]=i}parseParens(t){let n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=Yp(this.remaining),o=this.remaining[r.length];if(o!=="/"&&o!==")"&&o!==";")throw new b(4010,!1);let i;r.indexOf(":")>-1?(i=r.slice(0,r.indexOf(":")),this.capture(i),this.capture(":")):t&&(i=k);let s=this.parseChildren();n[i]=Object.keys(s).length===1?s[k]:new W([],s),this.consumeOptional("//")}return n}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new b(4011,!1)}};function dC(e){return e.segments.length>0?new W([],{[k]:e}):e}function fC(e){let t={};for(let[r,o]of Object.entries(e.children)){let i=fC(o);if(r===k&&i.segments.length===0&&i.hasChildren())for(let[s,a]of Object.entries(i.children))t[s]=a;else(i.segments.length>0||i.hasChildren())&&(t[r]=i)}let n=new W(e.segments,t);return _F(n)}function _F(e){if(e.numberOfChildren===1&&e.children[k]){let t=e.children[k];return new W(e.segments.concat(t.segments),t.children)}return e}function qr(e){return e instanceof bn}function xF(e,t,n=null,r=null){let o=pC(e);return hC(o,t,n,r)}function pC(e){let t;function n(i){let s={};for(let u of i.children){let l=n(u);s[u.outlet]=l}let a=new W(i.url,s);return i===e&&(t=a),a}let r=n(e.root),o=dC(r);return t??o}function hC(e,t,n,r){let o=e;for(;o.parent;)o=o.parent;if(t.length===0)return Qp(o,o,o,n,r);let i=SF(t);if(i.toRoot())return Qp(o,o,new W([],{}),n,r);let s=TF(i,o,e),a=s.processChildren?bs(s.segmentGroup,s.index,i.commands):mC(s.segmentGroup,s.index,i.commands);return Qp(o,s.segmentGroup,a,n,r)}function Ml(e){return typeof e=="object"&&e!=null&&!e.outlets&&!e.segmentPath}function xs(e){return typeof e=="object"&&e!=null&&e.outlets}function Qp(e,t,n,r,o){let i={};r&&Object.entries(r).forEach(([u,l])=>{i[u]=Array.isArray(l)?l.map(c=>`${c}`):`${l}`});let s;e===t?s=n:s=gC(e,t,n);let a=dC(fC(s));return new bn(a,i,o)}function gC(e,t,n){let r={};return Object.entries(e.children).forEach(([o,i])=>{i===t?r[o]=n:r[o]=gC(i,t,n)}),new W(e.segments,r)}var Al=class{isAbsolute;numberOfDoubleDots;commands;constructor(t,n,r){if(this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=r,t&&r.length>0&&Ml(r[0]))throw new b(4003,!1);let o=r.find(xs);if(o&&o!==oC(r))throw new b(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function SF(e){if(typeof e[0]=="string"&&e.length===1&&e[0]==="/")return new Al(!0,0,e);let t=0,n=!1,r=e.reduce((o,i,s)=>{if(typeof i=="object"&&i!=null){if(i.outlets){let a={};return Object.entries(i.outlets).forEach(([u,l])=>{a[u]=typeof l=="string"?l.split("/"):l}),[...o,{outlets:a}]}if(i.segmentPath)return[...o,i.segmentPath]}return typeof i!="string"?[...o,i]:s===0?(i.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?n=!0:a===".."?t++:a!=""&&o.push(a))}),o):[...o,i]},[]);return new Al(n,t,r)}var $o=class{segmentGroup;processChildren;index;constructor(t,n,r){this.segmentGroup=t,this.processChildren=n,this.index=r}};function TF(e,t,n){if(e.isAbsolute)return new $o(t,!0,0);if(!n)return new $o(t,!1,NaN);if(n.parent===null)return new $o(n,!0,0);let r=Ml(e.commands[0])?0:1,o=n.segments.length-1+r;return MF(n,o,e.numberOfDoubleDots)}function MF(e,t,n){let r=e,o=t,i=n;for(;i>o;){if(i-=o,r=r.parent,!r)throw new b(4005,!1);o=r.segments.length}return new $o(r,!1,o-i)}function AF(e){return xs(e[0])?e[0].outlets:{[k]:e}}function mC(e,t,n){if(e??=new W([],{}),e.segments.length===0&&e.hasChildren())return bs(e,t,n);let r=NF(e,t,n),o=n.slice(r.commandIndex);if(r.match&&r.pathIndexi!==k)&&e.children[k]&&e.numberOfChildren===1&&e.children[k].segments.length===0){let i=bs(e.children[k],t,n);return new W(e.segments,i.children)}return Object.entries(r).forEach(([i,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(o[i]=mC(e.children[i],t,s))}),Object.entries(e.children).forEach(([i,s])=>{r[i]===void 0&&(o[i]=s)}),new W(e.segments,o)}}function NF(e,t,n){let r=0,o=t,i={match:!1,pathIndex:0,commandIndex:0};for(;o=n.length)return i;let s=e.segments[o],a=n[r];if(xs(a))break;let u=`${a}`,l=r0&&u===void 0)break;if(u&&l&&typeof l=="object"&&l.outlets===void 0){if(!Jw(u,l,s))return i;r+=2}else{if(!Jw(u,{},s))return i;r++}o++}return{match:!0,pathIndex:o,commandIndex:r}}function oh(e,t,n){let r=e.segments.slice(0,t),o=0;for(;o{typeof r=="string"&&(r=[r]),r!==null&&(t[n]=oh(new W([],{}),0,r))}),t}function Qw(e){let t={};return Object.entries(e).forEach(([n,r])=>t[n]=`${r}`),t}function Jw(e,t,n){return e==n.path&&Gt(t,n.parameters)}var Es="imperative",ke=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(ke||{}),Et=class{id;url;constructor(t,n){this.id=t,this.url=n}},Ss=class extends Et{type=ke.NavigationStart;navigationTrigger;restoredState;constructor(t,n,r="imperative",o=null){super(t,n),this.navigationTrigger=r,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},En=class extends Et{urlAfterRedirects;type=ke.NavigationEnd;constructor(t,n,r){super(t,n),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},ft=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(ft||{}),ih=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(ih||{}),Cn=class extends Et{reason;code;type=ke.NavigationCancel;constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Wr=class extends Et{reason;code;type=ke.NavigationSkipped;constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o}},Ts=class extends Et{error;target;type=ke.NavigationError;constructor(t,n,r,o){super(t,n),this.error=r,this.target=o}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Nl=class extends Et{urlAfterRedirects;state;type=ke.RoutesRecognized;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},sh=class extends Et{urlAfterRedirects;state;type=ke.GuardsCheckStart;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ah=class extends Et{urlAfterRedirects;state;shouldActivate;type=ke.GuardsCheckEnd;constructor(t,n,r,o,i){super(t,n),this.urlAfterRedirects=r,this.state=o,this.shouldActivate=i}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},uh=class extends Et{urlAfterRedirects;state;type=ke.ResolveStart;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},lh=class extends Et{urlAfterRedirects;state;type=ke.ResolveEnd;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ch=class{route;type=ke.RouteConfigLoadStart;constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},dh=class{route;type=ke.RouteConfigLoadEnd;constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},fh=class{snapshot;type=ke.ChildActivationStart;constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ph=class{snapshot;type=ke.ChildActivationEnd;constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},hh=class{snapshot;type=ke.ActivationStart;constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},gh=class{snapshot;type=ke.ActivationEnd;constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Ms=class{},qo=class{url;navigationBehaviorOptions;constructor(t,n){this.url=t,this.navigationBehaviorOptions=n}};function OF(e,t){return e.providers&&!e._injector&&(e._injector=pp(e.providers,t,`Route: ${e.path}`)),e._injector??t}function Ft(e){return e.outlet||k}function FF(e,t){let n=e.filter(r=>Ft(r)===t);return n.push(...e.filter(r=>Ft(r)!==t)),n}function Ps(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){let n=t.routeConfig;if(n?._loadedInjector)return n._loadedInjector;if(n?._injector)return n._injector}return null}var mh=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return Ps(this.route?.snapshot)??this.rootInjector}constructor(t){this.rootInjector=t,this.children=new jl(this.rootInjector)}},jl=(()=>{class e{rootInjector;contexts=new Map;constructor(n){this.rootInjector=n}onChildOutletCreated(n,r){let o=this.getOrCreateContext(n);o.outlet=r,this.contexts.set(n,o)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new mh(this.rootInjector),this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}static \u0275fac=function(r){return new(r||e)(I(Je))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Rl=class{_root;constructor(t){this._root=t}get root(){return this._root.value}parent(t){let n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null}children(t){let n=vh(t,this._root);return n?n.children.map(r=>r.value):[]}firstChild(t){let n=vh(t,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(t){let n=yh(t,this._root);return n.length<2?[]:n[n.length-2].children.map(o=>o.value).filter(o=>o!==t)}pathFromRoot(t){return yh(t,this._root).map(n=>n.value)}};function vh(e,t){if(e===t.value)return t;for(let n of t.children){let r=vh(e,n);if(r)return r}return null}function yh(e,t){if(e===t.value)return[t];for(let n of t.children){let r=yh(e,n);if(r.length)return r.unshift(t),r}return[]}var dt=class{value;children;constructor(t,n){this.value=t,this.children=n}toString(){return`TreeNode(${this.value})`}};function Bo(e){let t={};return e&&e.children.forEach(n=>t[n.value.outlet]=n),t}var Ol=class extends Rl{snapshot;constructor(t,n){super(t),this.snapshot=n,Th(this,t)}toString(){return this.snapshot.toString()}};function vC(e){let t=PF(e),n=new Ne([new zr("",{})]),r=new Ne({}),o=new Ne({}),i=new Ne({}),s=new Ne(""),a=new Zr(n,r,i,s,o,k,e,t.root);return a.snapshot=t.root,new Ol(new dt(a,[]),t)}function PF(e){let t={},n={},r={},o="",i=new Ho([],t,r,o,n,k,e,null,{});return new Pl("",new dt(i,[]))}var Zr=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(t,n,r,o,i,s,a,u){this.urlSubject=t,this.paramsSubject=n,this.queryParamsSubject=r,this.fragmentSubject=o,this.dataSubject=i,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(R(l=>l[Fs]))??_(void 0),this.url=t,this.params=n,this.queryParams=r,this.fragment=o,this.data=i}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(R(t=>Go(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(R(t=>Go(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Fl(e,t,n="emptyOnly"){let r,{routeConfig:o}=e;return t!==null&&(n==="always"||o?.path===""||!t.component&&!t.routeConfig?.loadComponent)?r={params:y(y({},t.params),e.params),data:y(y({},t.data),e.data),resolve:y(y(y(y({},e.data),t.data),o?.data),e._resolvedData)}:r={params:y({},e.params),data:y({},e.data),resolve:y(y({},e.data),e._resolvedData??{})},o&&DC(o)&&(r.resolve[Fs]=o.title),r}var Ho=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Fs]}constructor(t,n,r,o,i,s,a,u,l){this.url=t,this.params=n,this.queryParams=r,this.fragment=o,this.data=i,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=l}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Go(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Go(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(r=>r.toString()).join("/"),n=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${n}')`}},Pl=class extends Rl{url;constructor(t,n){super(n),this.url=t,Th(this,n)}toString(){return yC(this._root)}};function Th(e,t){t.value._routerState=e,t.children.forEach(n=>Th(e,n))}function yC(e){let t=e.children.length>0?` { ${e.children.map(yC).join(", ")} } `:"";return`${e.value}${t}`}function Jp(e){if(e.snapshot){let t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,Gt(t.queryParams,n.queryParams)||e.queryParamsSubject.next(n.queryParams),t.fragment!==n.fragment&&e.fragmentSubject.next(n.fragment),Gt(t.params,n.params)||e.paramsSubject.next(n.params),uF(t.url,n.url)||e.urlSubject.next(n.url),Gt(t.data,n.data)||e.dataSubject.next(n.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function Dh(e,t){let n=Gt(e.params,t.params)&&fF(e.url,t.url),r=!e.parent!=!t.parent;return n&&!r&&(!e.parent||Dh(e.parent,t.parent))}function DC(e){return typeof e.title=="string"||e.title===null}var LF=new E(""),kF=(()=>{class e{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=k;activateEvents=new Y;deactivateEvents=new Y;attachEvents=new Y;detachEvents=new Y;routerOutletData=hy(void 0);parentContexts=v(jl);location=v(Br);changeDetector=v(wt);inputBinder=v(Mh,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:o}=n.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new b(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new b(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new b(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new b(4013,!1);this._activatedRoute=n;let o=this.location,s=n.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new wh(n,a,o.injector,this.routerOutletData);this.activated=o.createComponent(s,{index:o.length,injector:u,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||e)};static \u0275dir=H({type:e,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[gt]})}return e})(),wh=class e{route;childContexts;parent;outletData;__ngOutletInjector(t){return new e(this.route,this.childContexts,t,this.outletData)}constructor(t,n,r,o){this.route=t,this.childContexts=n,this.parent=r,this.outletData=o}get(t,n){return t===Zr?this.route:t===jl?this.childContexts:t===LF?this.outletData:this.parent.get(t,n)}},Mh=new E("");function jF(e,t,n){let r=As(e,t._root,n?n._root:void 0);return new Ol(r,t)}function As(e,t,n){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){let r=n.value;r._futureSnapshot=t.value;let o=VF(e,t,n);return new dt(r,o)}else{if(e.shouldAttach(t.value)){let i=e.retrieve(t.value);if(i!==null){let s=i.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>As(e,a)),s}}let r=UF(t.value),o=t.children.map(i=>As(e,i));return new dt(r,o)}}function VF(e,t,n){return t.children.map(r=>{for(let o of n.children)if(e.shouldReuseRoute(r.value,o.value.snapshot))return As(e,r,o);return As(e,r)})}function UF(e){return new Zr(new Ne(e.url),new Ne(e.params),new Ne(e.queryParams),new Ne(e.fragment),new Ne(e.data),e.outlet,e.component,e)}var Ns=class{redirectTo;navigationBehaviorOptions;constructor(t,n){this.redirectTo=t,this.navigationBehaviorOptions=n}},wC="ngNavigationCancelingError";function Ll(e,t){let{redirectTo:n,navigationBehaviorOptions:r}=qr(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,o=CC(!1,ft.Redirect);return o.url=n,o.navigationBehaviorOptions=r,o}function CC(e,t){let n=new Error(`NavigationCancelingError: ${e||""}`);return n[wC]=!0,n.cancellationCode=t,n}function BF(e){return bC(e)&&qr(e.url)}function bC(e){return!!e&&e[wC]}var $F=(e,t,n,r)=>R(o=>(new Ch(t,o.targetRouterState,o.currentRouterState,n,r).activate(e),o)),Ch=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(t,n,r,o,i){this.routeReuseStrategy=t,this.futureState=n,this.currState=r,this.forwardEvent=o,this.inputBindingEnabled=i}activate(t){let n=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,r,t),Jp(this.futureState.root),this.activateChildRoutes(n,r,t)}deactivateChildRoutes(t,n,r){let o=Bo(n);t.children.forEach(i=>{let s=i.value.outlet;this.deactivateRoutes(i,o[s],r),delete o[s]}),Object.values(o).forEach(i=>{this.deactivateRouteAndItsChildren(i,r)})}deactivateRoutes(t,n,r){let o=t.value,i=n?n.value:null;if(o===i)if(o.component){let s=r.getContext(o.outlet);s&&this.deactivateChildRoutes(t,n,s.children)}else this.deactivateChildRoutes(t,n,r);else i&&this.deactivateRouteAndItsChildren(n,r)}deactivateRouteAndItsChildren(t,n){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,n):this.deactivateRouteAndOutlet(t,n)}detachAndStoreRouteSubtree(t,n){let r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,i=Bo(t);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,n){let r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,i=Bo(t);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(t,n,r){let o=Bo(n);t.children.forEach(i=>{this.activateRoutes(i,o[i.value.outlet],r),this.forwardEvent(new gh(i.value.snapshot))}),t.children.length&&this.forwardEvent(new ph(t.value.snapshot))}activateRoutes(t,n,r){let o=t.value,i=n?n.value:null;if(Jp(o),o===i)if(o.component){let s=r.getOrCreateContext(o.outlet);this.activateChildRoutes(t,n,s.children)}else this.activateChildRoutes(t,n,r);else if(o.component){let s=r.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let a=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Jp(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=o,s.outlet&&s.outlet.activateWith(o,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,r)}},kl=class{path;route;constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},zo=class{component;route;constructor(t,n){this.component=t,this.route=n}};function HF(e,t,n){let r=e._root,o=t?t._root:null;return ws(r,o,n,[r.value])}function zF(e){let t=e.routeConfig?e.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:e,guards:t}}function Zo(e,t){let n=Symbol(),r=t.get(e,n);return r===n?typeof e=="function"&&!lv(e)?e:t.get(e):r}function ws(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=Bo(t);return e.children.forEach(s=>{GF(s,i[s.value.outlet],n,r.concat([s.value]),o),delete i[s.value.outlet]}),Object.entries(i).forEach(([s,a])=>Is(a,n.getContext(s),o)),o}function GF(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=e.value,s=t?t.value:null,a=n?n.getContext(e.value.outlet):null;if(s&&i.routeConfig===s.routeConfig){let u=qF(s,i,i.routeConfig.runGuardsAndResolvers);u?o.canActivateChecks.push(new kl(r)):(i.data=s.data,i._resolvedData=s._resolvedData),i.component?ws(e,t,a?a.children:null,r,o):ws(e,t,n,r,o),u&&a&&a.outlet&&a.outlet.isActivated&&o.canDeactivateChecks.push(new zo(a.outlet.component,s))}else s&&Is(t,a,o),o.canActivateChecks.push(new kl(r)),i.component?ws(e,null,a?a.children:null,r,o):ws(e,null,n,r,o);return o}function qF(e,t,n){if(typeof n=="function")return n(e,t);switch(n){case"pathParamsChange":return!Gr(e.url,t.url);case"pathParamsOrQueryParamsChange":return!Gr(e.url,t.url)||!Gt(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Dh(e,t)||!Gt(e.queryParams,t.queryParams);case"paramsChange":default:return!Dh(e,t)}}function Is(e,t,n){let r=Bo(e),o=e.value;Object.entries(r).forEach(([i,s])=>{o.component?t?Is(s,t.children.getContext(i),n):Is(s,null,n):Is(s,t,n)}),o.component?t&&t.outlet&&t.outlet.isActivated?n.canDeactivateChecks.push(new zo(t.outlet.component,o)):n.canDeactivateChecks.push(new zo(null,o)):n.canDeactivateChecks.push(new zo(null,o))}function Ls(e){return typeof e=="function"}function WF(e){return typeof e=="boolean"}function ZF(e){return e&&Ls(e.canLoad)}function KF(e){return e&&Ls(e.canActivate)}function YF(e){return e&&Ls(e.canActivateChild)}function QF(e){return e&&Ls(e.canDeactivate)}function JF(e){return e&&Ls(e.canMatch)}function EC(e){return e instanceof Jt||e?.name==="EmptyError"}var _l=Symbol("INITIAL_VALUE");function Wo(){return Ee(e=>Fa(e.map(t=>t.pipe(xe(1),ja(_l)))).pipe(R(t=>{for(let n of t)if(n!==!0){if(n===_l)return _l;if(n===!1||XF(n))return n}return!0}),Ve(t=>t!==_l),xe(1)))}function XF(e){return qr(e)||e instanceof Ns}function eP(e,t){return ce(n=>{let{targetSnapshot:r,currentSnapshot:o,guards:{canActivateChecks:i,canDeactivateChecks:s}}=n;return s.length===0&&i.length===0?_(P(y({},n),{guardsResult:!0})):tP(s,r,o,e).pipe(ce(a=>a&&WF(a)?nP(r,i,e,t):_(a)),R(a=>P(y({},n),{guardsResult:a})))})}function tP(e,t,n,r){return ne(e).pipe(ce(o=>aP(o.component,o.route,n,t,r)),tn(o=>o!==!0,!0))}function nP(e,t,n,r){return ne(t).pipe(jt(o=>ot(oP(o.route.parent,r),rP(o.route,r),sP(e,o.path,n),iP(e,o.route,n))),tn(o=>o!==!0,!0))}function rP(e,t){return e!==null&&t&&t(new hh(e)),_(!0)}function oP(e,t){return e!==null&&t&&t(new fh(e)),_(!0)}function iP(e,t,n){let r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||r.length===0)return _(!0);let o=r.map(i=>Xt(()=>{let s=Ps(t)??n,a=Zo(i,s),u=KF(a)?a.canActivate(t,e):st(s,()=>a(t,e));return ir(u).pipe(tn())}));return _(o).pipe(Wo())}function sP(e,t,n){let r=t[t.length-1],i=t.slice(0,t.length-1).reverse().map(s=>zF(s)).filter(s=>s!==null).map(s=>Xt(()=>{let a=s.guards.map(u=>{let l=Ps(s.node)??n,c=Zo(u,l),d=YF(c)?c.canActivateChild(r,e):st(l,()=>c(r,e));return ir(d).pipe(tn())});return _(a).pipe(Wo())}));return _(i).pipe(Wo())}function aP(e,t,n,r,o){let i=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!i||i.length===0)return _(!0);let s=i.map(a=>{let u=Ps(t)??o,l=Zo(a,u),c=QF(l)?l.canDeactivate(e,t,n,r):st(u,()=>l(e,t,n,r));return ir(c).pipe(tn())});return _(s).pipe(Wo())}function uP(e,t,n,r){let o=t.canLoad;if(o===void 0||o.length===0)return _(!0);let i=o.map(s=>{let a=Zo(s,e),u=ZF(a)?a.canLoad(t,n):st(e,()=>a(t,n));return ir(u)});return _(i).pipe(Wo(),IC(r))}function IC(e){return Wc(Ie(t=>{if(typeof t!="boolean")throw Ll(e,t)}),R(t=>t===!0))}function lP(e,t,n,r){let o=t.canMatch;if(!o||o.length===0)return _(!0);let i=o.map(s=>{let a=Zo(s,e),u=JF(a)?a.canMatch(t,n):st(e,()=>a(t,n));return ir(u)});return _(i).pipe(Wo(),IC(r))}var Rs=class{segmentGroup;constructor(t){this.segmentGroup=t||null}},Os=class extends Error{urlTree;constructor(t){super(),this.urlTree=t}};function Uo(e){return Fn(new Rs(e))}function cP(e){return Fn(new b(4e3,!1))}function dP(e){return Fn(CC(!1,ft.GuardRejected))}var bh=class{urlSerializer;urlTree;constructor(t,n){this.urlSerializer=t,this.urlTree=n}lineralizeSegments(t,n){let r=[],o=n.root;for(;;){if(r=r.concat(o.segments),o.numberOfChildren===0)return _(r);if(o.numberOfChildren>1||!o.children[k])return cP(`${t.redirectTo}`);o=o.children[k]}}applyRedirectCommands(t,n,r,o,i){if(typeof n!="string"){let a=n,{queryParams:u,fragment:l,routeConfig:c,url:d,outlet:f,params:p,data:h,title:g}=o,m=st(i,()=>a({params:p,data:h,queryParams:u,fragment:l,routeConfig:c,url:d,outlet:f,title:g}));if(m instanceof bn)throw new Os(m);n=m}let s=this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),t,r);if(n[0]==="/")throw new Os(s);return s}applyRedirectCreateUrlTree(t,n,r,o){let i=this.createSegmentGroup(t,n.root,r,o);return new bn(i,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(t,n){let r={};return Object.entries(t).forEach(([o,i])=>{if(typeof i=="string"&&i[0]===":"){let a=i.substring(1);r[o]=n[a]}else r[o]=i}),r}createSegmentGroup(t,n,r,o){let i=this.createSegments(t,n.segments,r,o),s={};return Object.entries(n.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(t,u,r,o)}),new W(i,s)}createSegments(t,n,r,o){return n.map(i=>i.path[0]===":"?this.findPosParam(t,i,o):this.findOrReturn(i,r))}findPosParam(t,n,r){let o=r[n.path.substring(1)];if(!o)throw new b(4001,!1);return o}findOrReturn(t,n){let r=0;for(let o of n){if(o.path===t.path)return n.splice(r),o;r++}return t}},Eh={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function fP(e,t,n,r,o){let i=_C(e,t,n);return i.matched?(r=OF(t,r),lP(r,t,n,o).pipe(R(s=>s===!0?i:y({},Eh)))):_(i)}function _C(e,t,n){if(t.path==="**")return pP(n);if(t.path==="")return t.pathMatch==="full"&&(e.hasChildren()||n.length>0)?y({},Eh):{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};let o=(t.matcher||aF)(n,e,t);if(!o)return y({},Eh);let i={};Object.entries(o.posParams??{}).forEach(([a,u])=>{i[a]=u.path});let s=o.consumed.length>0?y(y({},i),o.consumed[o.consumed.length-1].parameters):i;return{matched:!0,consumedSegments:o.consumed,remainingSegments:n.slice(o.consumed.length),parameters:s,positionalParamSegments:o.posParams??{}}}function pP(e){return{matched:!0,parameters:e.length>0?oC(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}function Xw(e,t,n,r){return n.length>0&&mP(e,n,r)?{segmentGroup:new W(t,gP(r,new W(n,e.children))),slicedSegments:[]}:n.length===0&&vP(e,n,r)?{segmentGroup:new W(e.segments,hP(e,n,r,e.children)),slicedSegments:n}:{segmentGroup:new W(e.segments,e.children),slicedSegments:n}}function hP(e,t,n,r){let o={};for(let i of n)if(Vl(e,t,i)&&!r[Ft(i)]){let s=new W([],{});o[Ft(i)]=s}return y(y({},r),o)}function gP(e,t){let n={};n[k]=t;for(let r of e)if(r.path===""&&Ft(r)!==k){let o=new W([],{});n[Ft(r)]=o}return n}function mP(e,t,n){return n.some(r=>Vl(e,t,r)&&Ft(r)!==k)}function vP(e,t,n){return n.some(r=>Vl(e,t,r))}function Vl(e,t,n){return(e.hasChildren()||t.length>0)&&n.pathMatch==="full"?!1:n.path===""}function yP(e,t,n){return t.length===0&&!e.children[n]}var Ih=class{};function DP(e,t,n,r,o,i,s="emptyOnly"){return new _h(e,t,n,r,o,s,i).recognize()}var wP=31,_h=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(t,n,r,o,i,s,a){this.injector=t,this.configLoader=n,this.rootComponentType=r,this.config=o,this.urlTree=i,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new bh(this.urlSerializer,this.urlTree)}noMatchError(t){return new b(4002,`'${t.segmentGroup}'`)}recognize(){let t=Xw(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(R(({children:n,rootSnapshot:r})=>{let o=new dt(r,n),i=new Pl("",o),s=xF(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,i.url=this.urlSerializer.serialize(s),{state:i,tree:s}}))}match(t){let n=new Ho([],Object.freeze({}),Object.freeze(y({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),k,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,k,n).pipe(R(r=>({children:r,rootSnapshot:n})),Ln(r=>{if(r instanceof Os)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof Rs?this.noMatchError(r):r}))}processSegmentGroup(t,n,r,o,i){return r.segments.length===0&&r.hasChildren()?this.processChildren(t,n,r,i):this.processSegment(t,n,r,r.segments,o,!0,i).pipe(R(s=>s instanceof dt?[s]:[]))}processChildren(t,n,r,o){let i=[];for(let s of Object.keys(r.children))s==="primary"?i.unshift(s):i.push(s);return ne(i).pipe(jt(s=>{let a=r.children[s],u=FF(n,s);return this.processSegmentGroup(t,u,a,s,o)}),ka((s,a)=>(s.push(...a),s)),kn(null),nd(),ce(s=>{if(s===null)return Uo(r);let a=xC(s);return CP(a),_(a)}))}processSegment(t,n,r,o,i,s,a){return ne(n).pipe(jt(u=>this.processSegmentAgainstRoute(u._injector??t,n,u,r,o,i,s,a).pipe(Ln(l=>{if(l instanceof Rs)return _(null);throw l}))),tn(u=>!!u),Ln(u=>{if(EC(u))return yP(r,o,i)?_(new Ih):Uo(r);throw u}))}processSegmentAgainstRoute(t,n,r,o,i,s,a,u){return Ft(r)!==s&&(s===k||!Vl(o,i,r))?Uo(o):r.redirectTo===void 0?this.matchSegmentAgainstRoute(t,o,r,i,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,o,n,r,i,s,u):Uo(o)}expandSegmentAgainstRouteUsingRedirect(t,n,r,o,i,s,a){let{matched:u,parameters:l,consumedSegments:c,positionalParamSegments:d,remainingSegments:f}=_C(n,o,i);if(!u)return Uo(n);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>wP&&(this.allowRedirects=!1));let p=new Ho(i,l,Object.freeze(y({},this.urlTree.queryParams)),this.urlTree.fragment,eC(o),Ft(o),o.component??o._loadedComponent??null,o,tC(o)),h=Fl(p,a,this.paramsInheritanceStrategy);p.params=Object.freeze(h.params),p.data=Object.freeze(h.data);let g=this.applyRedirects.applyRedirectCommands(c,o.redirectTo,d,p,t);return this.applyRedirects.lineralizeSegments(o,g).pipe(ce(m=>this.processSegment(t,r,n,m.concat(f),s,!1,a)))}matchSegmentAgainstRoute(t,n,r,o,i,s){let a=fP(n,r,o,t,this.urlSerializer);return r.path==="**"&&(n.children={}),a.pipe(Ee(u=>u.matched?(t=r._injector??t,this.getChildConfig(t,r,o).pipe(Ee(({routes:l})=>{let c=r._loadedInjector??t,{parameters:d,consumedSegments:f,remainingSegments:p}=u,h=new Ho(f,d,Object.freeze(y({},this.urlTree.queryParams)),this.urlTree.fragment,eC(r),Ft(r),r.component??r._loadedComponent??null,r,tC(r)),g=Fl(h,s,this.paramsInheritanceStrategy);h.params=Object.freeze(g.params),h.data=Object.freeze(g.data);let{segmentGroup:m,slicedSegments:D}=Xw(n,f,p,l);if(D.length===0&&m.hasChildren())return this.processChildren(c,l,m,h).pipe(R(B=>new dt(h,B)));if(l.length===0&&D.length===0)return _(new dt(h,[]));let N=Ft(r)===i;return this.processSegment(c,l,m,D,N?k:i,!0,h).pipe(R(B=>new dt(h,B instanceof dt?[B]:[])))}))):Uo(n)))}getChildConfig(t,n,r){return n.children?_({routes:n.children,injector:t}):n.loadChildren?n._loadedRoutes!==void 0?_({routes:n._loadedRoutes,injector:n._loadedInjector}):uP(t,n,r,this.urlSerializer).pipe(ce(o=>o?this.configLoader.loadChildren(t,n).pipe(Ie(i=>{n._loadedRoutes=i.routes,n._loadedInjector=i.injector})):dP(n))):_({routes:[],injector:t})}};function CP(e){e.sort((t,n)=>t.value.outlet===k?-1:n.value.outlet===k?1:t.value.outlet.localeCompare(n.value.outlet))}function bP(e){let t=e.value.routeConfig;return t&&t.path===""}function xC(e){let t=[],n=new Set;for(let r of e){if(!bP(r)){t.push(r);continue}let o=t.find(i=>r.value.routeConfig===i.value.routeConfig);o!==void 0?(o.children.push(...r.children),n.add(o)):t.push(r)}for(let r of n){let o=xC(r.children);t.push(new dt(r.value,o))}return t.filter(r=>!n.has(r))}function eC(e){return e.data||{}}function tC(e){return e.resolve||{}}function EP(e,t,n,r,o,i){return ce(s=>DP(e,t,n,r,s.extractedUrl,o,i).pipe(R(({state:a,tree:u})=>P(y({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function IP(e,t){return ce(n=>{let{targetSnapshot:r,guards:{canActivateChecks:o}}=n;if(!o.length)return _(n);let i=new Set(o.map(u=>u.route)),s=new Set;for(let u of i)if(!s.has(u))for(let l of SC(u))s.add(l);let a=0;return ne(s).pipe(jt(u=>i.has(u)?_P(u,r,e,t):(u.data=Fl(u,u.parent,e).resolve,_(void 0))),Ie(()=>a++),go(1),ce(u=>a===s.size?_(n):Re))})}function SC(e){let t=e.children.map(n=>SC(n)).flat();return[e,...t]}function _P(e,t,n,r){let o=e.routeConfig,i=e._resolve;return o?.title!==void 0&&!DC(o)&&(i[Fs]=o.title),xP(i,e,t,r).pipe(R(s=>(e._resolvedData=s,e.data=Fl(e,e.parent,n).resolve,null)))}function xP(e,t,n,r){let o=th(e);if(o.length===0)return _({});let i={};return ne(o).pipe(ce(s=>SP(e[s],t,n,r).pipe(tn(),Ie(a=>{if(a instanceof Ns)throw Ll(new _s,a);i[s]=a}))),go(1),ki(i),Ln(s=>EC(s)?Re:Fn(s)))}function SP(e,t,n,r){let o=Ps(t)??r,i=Zo(e,o),s=i.resolve?i.resolve(t,n):st(o,()=>i(t,n));return ir(s)}function Xp(e){return Ee(t=>{let n=e(t);return n?ne(n).pipe(R(()=>t)):_(t)})}var TC=(()=>{class e{buildTitle(n){let r,o=n.root;for(;o!==void 0;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(i=>i.outlet===k);return r}getResolvedTitleForRoute(n){return n.data[Fs]}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(TP),providedIn:"root"})}return e})(),TP=(()=>{class e extends TC{title;constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||e)(I(Zw))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ah=new E("",{providedIn:"root",factory:()=>({})}),MP=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=MD({type:e,selectors:[["ng-component"]],decls:1,vars:0,template:function(r,o){r&1&&vp(0,"router-outlet")},dependencies:[kF],encapsulation:2})}return e})();function Nh(e){let t=e.children&&e.children.map(Nh),n=t?P(y({},e),{children:t}):y({},e);return!n.component&&!n.loadComponent&&(t||n.loadChildren)&&n.outlet&&n.outlet!==k&&(n.component=MP),n}var Rh=new E(""),AP=(()=>{class e{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=v(wp);loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return _(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=ir(n.loadComponent()).pipe(R(MC),Ie(i=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=i}),jn(()=>{this.componentLoaders.delete(n)})),o=new lo(r,()=>new te).pipe(uo());return this.componentLoaders.set(n,o),o}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return _({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=NP(r,this.compiler,n,this.onLoadEndListener).pipe(jn(()=>{this.childrenLoaders.delete(r)})),s=new lo(i,()=>new te).pipe(uo());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function NP(e,t,n,r){return ir(e.loadChildren()).pipe(R(MC),ce(o=>o instanceof Yi||Array.isArray(o)?_(o):ne(t.compileModuleAsync(o))),R(o=>{r&&r(e);let i,s,a=!1;return Array.isArray(o)?(s=o,a=!0):(i=o.create(n).injector,s=i.get(Rh,[],{optional:!0,self:!0}).flat()),{routes:s.map(Nh),injector:i}}))}function RP(e){return e&&typeof e=="object"&&"default"in e}function MC(e){return RP(e)?e.default:e}var Oh=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(OP),providedIn:"root"})}return e})(),OP=(()=>{class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),FP=new E("");var PP=new E(""),LP=(()=>{class e{currentNavigation=null;currentTransition=null;lastSuccessfulNavigation=null;events=new te;transitionAbortSubject=new te;configLoader=v(AP);environmentInjector=v(Je);urlSerializer=v(Sh);rootContexts=v(jl);location=v(ds);inputBindingEnabled=v(Mh,{optional:!0})!==null;titleStrategy=v(TC);options=v(Ah,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=v(Oh);createViewTransition=v(FP,{optional:!0});navigationErrorHandler=v(PP,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>_(void 0);rootComponentType=null;constructor(){let n=o=>this.events.next(new ch(o)),r=o=>this.events.next(new dh(o));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;this.transitions?.next(P(y(y({},this.transitions.value),n),{id:r}))}setupNavigations(n,r,o){return this.transitions=new Ne({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:Es,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Ve(i=>i.id!==0),R(i=>P(y({},i),{extractedUrl:this.urlHandlingStrategy.extract(i.rawUrl)})),Ee(i=>{let s=!1,a=!1;return _(i).pipe(Ee(u=>{if(this.navigationId>i.id)return this.cancelNavigationTransition(i,"",ft.SupersededByNewNavigation),Re;this.currentTransition=i,this.currentNavigation={id:u.id,initialUrl:u.rawUrl,extractedUrl:u.extractedUrl,targetBrowserUrl:typeof u.extras.browserUrl=="string"?this.urlSerializer.parse(u.extras.browserUrl):u.extras.browserUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?P(y({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let l=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),c=u.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!l&&c!=="reload"){let d="";return this.events.next(new Wr(u.id,this.urlSerializer.serialize(u.rawUrl),d,ih.IgnoredSameUrlNavigation)),u.resolve(!1),Re}if(this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return _(u).pipe(Ee(d=>{let f=this.transitions?.getValue();return this.events.next(new Ss(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),f!==this.transitions?.getValue()?Re:Promise.resolve(d)}),EP(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),Ie(d=>{i.targetSnapshot=d.targetSnapshot,i.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation=P(y({},this.currentNavigation),{finalUrl:d.urlAfterRedirects});let f=new Nl(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(f)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(u.currentRawUrl)){let{id:d,extractedUrl:f,source:p,restoredState:h,extras:g}=u,m=new Ss(d,this.urlSerializer.serialize(f),p,h);this.events.next(m);let D=vC(this.rootComponentType).snapshot;return this.currentTransition=i=P(y({},u),{targetSnapshot:D,urlAfterRedirects:f,extras:P(y({},g),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=f,_(i)}else{let d="";return this.events.next(new Wr(u.id,this.urlSerializer.serialize(u.extractedUrl),d,ih.IgnoredByUrlHandlingStrategy)),u.resolve(!1),Re}}),Ie(u=>{let l=new sh(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(l)}),R(u=>(this.currentTransition=i=P(y({},u),{guards:HF(u.targetSnapshot,u.currentSnapshot,this.rootContexts)}),i)),eP(this.environmentInjector,u=>this.events.next(u)),Ie(u=>{if(i.guardsResult=u.guardsResult,u.guardsResult&&typeof u.guardsResult!="boolean")throw Ll(this.urlSerializer,u.guardsResult);let l=new ah(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.events.next(l)}),Ve(u=>u.guardsResult?!0:(this.cancelNavigationTransition(u,"",ft.GuardRejected),!1)),Xp(u=>{if(u.guards.canActivateChecks.length)return _(u).pipe(Ie(l=>{let c=new uh(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}),Ee(l=>{let c=!1;return _(l).pipe(IP(this.paramsInheritanceStrategy,this.environmentInjector),Ie({next:()=>c=!0,complete:()=>{c||this.cancelNavigationTransition(l,"",ft.NoDataFromResolver)}}))}),Ie(l=>{let c=new lh(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}))}),Xp(u=>{let l=c=>{let d=[];c.routeConfig?.loadComponent&&!c.routeConfig._loadedComponent&&d.push(this.configLoader.loadComponent(c.routeConfig).pipe(Ie(f=>{c.component=f}),R(()=>{})));for(let f of c.children)d.push(...l(f));return d};return Fa(l(u.targetSnapshot.root)).pipe(kn(null),xe(1))}),Xp(()=>this.afterPreactivation()),Ee(()=>{let{currentSnapshot:u,targetSnapshot:l}=i,c=this.createViewTransition?.(this.environmentInjector,u.root,l.root);return c?ne(c).pipe(R(()=>i)):_(i)}),R(u=>{let l=jF(n.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=i=P(y({},u),{targetRouterState:l}),this.currentNavigation.targetRouterState=l,i}),Ie(()=>{this.events.next(new Ms)}),$F(this.rootContexts,n.routeReuseStrategy,u=>this.events.next(u),this.inputBindingEnabled),xe(1),Ie({next:u=>{s=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new En(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),this.titleStrategy?.updateTitle(u.targetRouterState.snapshot),u.resolve(!0)},complete:()=>{s=!0}}),Va(this.transitionAbortSubject.pipe(Ie(u=>{throw u}))),jn(()=>{!s&&!a&&this.cancelNavigationTransition(i,"",ft.SupersededByNewNavigation),this.currentTransition?.id===i.id&&(this.currentNavigation=null,this.currentTransition=null)}),Ln(u=>{if(a=!0,bC(u))this.events.next(new Cn(i.id,this.urlSerializer.serialize(i.extractedUrl),u.message,u.cancellationCode)),BF(u)?this.events.next(new qo(u.url,u.navigationBehaviorOptions)):i.resolve(!1);else{let l=new Ts(i.id,this.urlSerializer.serialize(i.extractedUrl),u,i.targetSnapshot??void 0);try{let c=st(this.environmentInjector,()=>this.navigationErrorHandler?.(l));if(c instanceof Ns){let{message:d,cancellationCode:f}=Ll(this.urlSerializer,c);this.events.next(new Cn(i.id,this.urlSerializer.serialize(i.extractedUrl),d,f)),this.events.next(new qo(c.redirectTo,c.navigationBehaviorOptions))}else throw this.events.next(l),u}catch(c){this.options.resolveNavigationPromiseOnError?i.resolve(!1):i.reject(c)}}return Re}))}))}cancelNavigationTransition(n,r,o){let i=new Cn(n.id,this.urlSerializer.serialize(n.extractedUrl),r,o);this.events.next(i),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return n.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function kP(e){return e!==Es}var jP=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(VP),providedIn:"root"})}return e})(),xh=class{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig}},VP=(()=>{class e extends xh{static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),AC=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:()=>v(UP),providedIn:"root"})}return e})(),UP=(()=>{class e extends AC{location=v(ds);urlSerializer=v(Sh);options=v(Ah,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";urlHandlingStrategy=v(Oh);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new bn;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}routerState=vC(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{r.type==="popstate"&&n(r.url,r.state)})}handleRouterEvent(n,r){if(n instanceof Ss)this.stateMemento=this.createStateMemento();else if(n instanceof Wr)this.rawUrlTree=r.initialUrl;else if(n instanceof Nl){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(r.targetBrowserUrl??o,r)}}else n instanceof Ms?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(r.targetBrowserUrl??this.rawUrlTree,r)):n instanceof Cn&&(n.code===ft.GuardRejected||n.code===ft.NoDataFromResolver)?this.restoreHistory(r):n instanceof Ts?this.restoreHistory(r,!0):n instanceof En&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let o=n instanceof bn?this.urlSerializer.serialize(n):n;if(this.location.isCurrentPathEqualTo(o)||r.extras.replaceUrl){let i=this.browserPageId,s=y(y({},r.extras.state),this.generateNgRouterState(r.id,i));this.location.replaceState(o,"",s)}else{let i=y(y({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(o,"",i)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,i=this.currentPageId-o;i!==0?this.location.historyGo(i):this.currentUrlTree===n.finalUrl&&i===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Cs=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(Cs||{});function BP(e,t){e.events.pipe(Ve(n=>n instanceof En||n instanceof Cn||n instanceof Ts||n instanceof Wr),R(n=>n instanceof En||n instanceof Wr?Cs.COMPLETE:(n instanceof Cn?n.code===ft.Redirect||n.code===ft.SupersededByNewNavigation:!1)?Cs.REDIRECTING:Cs.FAILED),Ve(n=>n!==Cs.REDIRECTING),xe(1)).subscribe(()=>{t()})}var $P={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},HP={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Ul=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=v(el);stateManager=v(AC);options=v(Ah,{optional:!0})||{};pendingTasks=v(dn);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=v(LP);urlSerializer=v(Sh);location=v(ds);urlHandlingStrategy=v(Oh);_events=new te;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=v(jP);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=v(Rh,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!v(Mh,{optional:!0});constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}eventsSubscription=new ae;subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let o=this.navigationTransitions.currentTransition,i=this.navigationTransitions.currentNavigation;if(o!==null&&i!==null){if(this.stateManager.handleRouterEvent(r,i),r instanceof Cn&&r.code!==ft.Redirect&&r.code!==ft.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof En)this.navigated=!0;else if(r instanceof qo){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),u=y({browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||kP(o.source)},s);this.scheduleNavigation(a,Es,null,u,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}GP(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Es,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",r)},0)})}navigateToSyncWithBrowser(n,r,o){let i={replaceUrl:!0},s=o?.navigationId?o:null;if(o){let u=y({},o);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(i.state=u)}let a=this.parseUrl(n);this.scheduleNavigation(a,r,s,i)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(Nh),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){let{relativeTo:o,queryParams:i,fragment:s,queryParamsHandling:a,preserveFragment:u}=r,l=u?this.currentUrlTree.fragment:s,c=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":c=y(y({},this.currentUrlTree.queryParams),i);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=i||null}c!==null&&(c=this.removeEmptyProps(c));let d;try{let f=o?o.snapshot:this.routerState.snapshot.root;d=pC(f)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),d=this.currentUrlTree.root}return hC(d,n,c,l??null)}navigateByUrl(n,r={skipLocationChange:!1}){let o=qr(n)?n:this.parseUrl(n),i=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(i,Es,null,r)}navigate(n,r={skipLocationChange:!1}){return zP(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,r){let o;if(r===!0?o=y({},$P):r===!1?o=y({},HP):o=r,qr(n))return Kw(this.currentUrlTree,n,o);let i=this.parseUrl(n);return Kw(this.currentUrlTree,i,o)}removeEmptyProps(n){return Object.entries(n).reduce((r,[o,i])=>(i!=null&&(r[o]=i),r),{})}scheduleNavigation(n,r,o,i,s){if(this.disposed)return Promise.resolve(!1);let a,u,l;s?(a=s.resolve,u=s.reject,l=s.promise):l=new Promise((d,f)=>{a=d,u=f});let c=this.pendingTasks.add();return BP(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(c))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:i,resolve:a,reject:u,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(d=>Promise.reject(d))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function zP(e){for(let t=0;t{class e{router;route;tabIndexAttribute;renderer;el;locationStrategy;href=null;target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new te;constructor(n,r,o,i,s,a){this.router=n,this.route=r,this.tabIndexAttribute=o,this.renderer=i,this.el=s,this.locationStrategy=a;let u=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area",this.isAnchorElement?this.subscription=n.events.subscribe(l=>{l instanceof En&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}routerLinkInput=null;set routerLink(n){n==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(qr(n)?this.routerLinkInput=n:this.routerLinkInput=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0"))}onClick(n,r,o,i,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(n!==0||r||o||i||s||typeof this.target=="string"&&this.target!="_self"))return!0;let u={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,u),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let n=this.urlTree;this.href=n!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(n)):null;let r=this.href===null?null:ky(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",r)}applyAttributeValue(n,r){let o=this.renderer,i=this.el.nativeElement;r!==null?o.setAttribute(i,n,r):o.removeAttribute(i,n)}get urlTree(){return this.routerLinkInput===null?null:qr(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||e)(w(Ul),w(Zr),Gf("tabindex"),w(at),w(Te),w(tr))};static \u0275dir=H({type:e,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(r,o){r&1&&Dt("click",function(s){return o.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&$r("target",o.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",er],skipLocationChange:[2,"skipLocationChange","skipLocationChange",er],replaceUrl:[2,"replaceUrl","replaceUrl",er],routerLink:"routerLink"},features:[hp,gt]})}return e})(),wZ=(()=>{class e{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new Y;constructor(n,r,o,i,s){this.router=n,this.element=r,this.renderer=o,this.cdr=i,this.link=s,this.routerEventsSubscription=n.events.subscribe(a=>{a instanceof En&&this.update()})}ngAfterContentInit(){_(this.links.changes,_(null)).pipe(Pn()).subscribe(n=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let n=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=ne(n).pipe(Pn()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(n){let r=Array.isArray(n)?n:n.split(" ");this.classes=r.filter(o=>!!o)}ngOnChanges(n){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let n=this.hasActiveLinks();this.classes.forEach(r=>{n?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),n&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==n&&(this._isActive=n,this.cdr.markForCheck(),this.isActiveChange.emit(n))})}isLinkActive(n){let r=qP(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return o=>{let i=o.urlTree;return i?n.isActive(i,r):!1}}hasActiveLinks(){let n=this.isLinkActive(this.router);return this.link&&n(this.link)||this.links.some(n)}static \u0275fac=function(r){return new(r||e)(w(Ul),w(Te),w(at),w(wt),w(nC,8))};static \u0275dir=H({type:e,selectors:[["","routerLinkActive",""]],contentQueries:function(r,o,i){if(r&1&&tw(i,nC,5),r&2){let s;nw(s=rw())&&(o.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[gt]})}return e})();function qP(e){return!!e.paths}var WP=new E("");function CZ(e,...t){return jr([{provide:Rh,multi:!0,useValue:e},[],{provide:Zr,useFactory:ZP,deps:[Ul]},{provide:tl,multi:!0,useFactory:YP},t.map(n=>n.\u0275providers)])}function ZP(e){return e.routerState.root}function KP(e,t){return{\u0275kind:e,\u0275providers:t}}function YP(){let e=v(et);return t=>{let n=e.get(Xn);if(t!==n.components[0])return;let r=e.get(Ul),o=e.get(QP);e.get(JP)===1&&r.initialNavigation(),e.get(XP,null,U.Optional)?.setUpPreloading(),e.get(WP,null,U.Optional)?.init(),r.resetRootComponentType(n.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var QP=new E("",{factory:()=>new te}),JP=new E("",{providedIn:"root",factory:()=>1});var XP=new E("");function bZ(){return KP(6,[{provide:tr,useClass:bw}])}function NC(e){let t=e.split(/\D/).map(n=>Number(n));return new Date(t[0],t[1]-1,t[2],t[3],t[4],t[5])}function RC(e){let t=e.split(/\D/).map(n=>Number(n));return new Date(t[0],t[1]-1,t[2])}function OC(e){return Fh(e)+`T${ks(e.getHours())}:${ks(e.getMinutes())}:${ks(e.getSeconds())}`}function Fh(e){return`${e.getFullYear()}-${ks(e.getMonth()+1)}-${ks(e.getDate())}`}function ks(e){return("0"+e).slice(-2)}var e1=function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r=e}:e;return function(){var r=Array.from(arguments);return n(arguments)?t.apply(this,r):function(o){return t.apply(void 0,e1([o],r,!1))}}};var PC=function(e){return e._tag==="Left"};var LC=function(e){return{_tag:"Left",left:e}},kC=function(e){return{_tag:"Right",right:e}};function Ph(e){return function(t,n){return e.map(t,function(){return n})}}function jC(e){var t=Ph(e);return function(n){return t(n,void 0)}}function VC(e){return function(t,n){return e.chain(t,function(r){return e.map(n(r),function(){return r})})}}var $l=LC,js=kC,UC=Bl(2,function(e,t){return he(e)?e:t(e.right)}),BC=function(e,t){return sr(e,o1(t))},r1=function(e,t){return sr(e,s1(t))};var Lh="Either";var o1=function(e){return function(t){return he(t)?t:js(e(t.right))}},$C={URI:Lh,map:BC},zZ=Bl(2,Ph($C)),GZ=jC($C);var i1=function(e){return function(t){return he(t)?t:he(e)?e:js(t.right(e.right))}},s1=i1;var a1={URI:Lh,map:BC,ap:r1,chain:UC};var u1={URI:Lh,fromEither:FC};var he=PC;var l1=function(e,t){return function(n){return he(n)?e(n.left):t(n.right)}};var c1=l1,Hl=c1;var qZ=Bl(2,VC(a1));var WZ={fromEither:u1.fromEither};var d1=function(e){return function(t){return he(t)?e(t.left):t}},ZZ=d1;var kh=UC;var K=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ko=function(){return Ko=Object.assign||function(e){for(var t,n=1,r=arguments.length;n")}function ar(e,t,n,r){for(var o=e.length,i=Array(o+1),s=0;s")}function p1(e,t,n,r){r===void 0&&(r="{ [K in ".concat(t.name,"]: ").concat(n.name," }"));for(var o=e.length,i={},s=0;s0?Qr(s):Z(l?i:r)}return qC(t)&&Array.isArray(r)?Z(r):de(r,o)},e.encode===q&&t.encode===q?function(r){return HC(r,e)}:function(r){for(var o={},i=Object.keys(HC(r,e)),s=i.length,a=0;a")}function v1(e){return e.length>0}var pt={};function QC(e,t){for(var n=[],r=0,o=e;r")),new H1(t,function(n){return WC.is(n)&&n.every(e.is)},function(n,r){var o=WC.validate(n,r);if(he(o))return o;for(var i=o.right,s=i.length,a=i,u=[],l=0;l0?Qr(u):Z(a)},e.encode===q?q:function(n){return n.map(e.encode)},e)}var z1=function(e){K(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.props=s,a._tag="InterfaceType",a}return t}($);function ht(e,t){t===void 0&&(t=ZC(e));var n=Object.keys(e),r=n.map(function(i){return e[i]}),o=n.length;return new z1(t,function(i){if(Pt.is(i)){for(var s=0;s0?Qr(c):Z(l)},zl(r)?q:function(i){for(var s=Ko({},i),a=0;a0?Qr(c):Z(l)},zl(r)?q:function(i){for(var s=Ko({},i),a=0;a0){var r=n[0],o=n[1],i=o.length,s=function(a){for(var u=0;u0?Qr(s):Z(zC(r,i))},e.length===0?q:function(r){return zC(r,e.map(function(o){return o.encode(r)}))},e)}var iK=function(e){K(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.types=s,a._tag="TupleType",a}return t}($);var W1=function(e){K(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.type=s,a._tag="ReadonlyType",a}return t}($);function sK(e,t){return t===void 0&&(t="Readonly<".concat(e.name,">")),new W1(t,e.is,e.validate,e.encode,e)}var Z1=function(e){K(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.type=s,a._tag="ReadonlyArrayType",a}return t}($);function ib(e,t){t===void 0&&(t="ReadonlyArray<".concat(e.name,">"));var n=je(e);return new Z1(t,n.is,n.validate,n.encode,e)}var K1=function(e,t){return Q1(ht(e),t)},Y1=function(e){K(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.type=s,a._tag="ExactType",a}return t}($);function Q1(e,t){t===void 0&&(t=m1(e));var n=Uh(e);return new Y1(t,e.is,function(r,o){var i=Pt.validate(r,o);if(he(i))return i;var s=e.validate(r,o);return he(s)?s:js(GC(s.right,n))},function(r){return e.encode(GC(r,n))},e)}var J1=function(e){K(t,e);function t(){var n=e.call(this,"Function",function(r){return typeof r=="function"},function(r,o){return n.is(r)?Z(r):de(r,o)},q)||this;return n._tag="FunctionType",n}return t}($);var aK=new J1,X1=function(e){K(t,e);function t(){var n=e.call(this,"never",function(r){return!1},function(r,o){return de(r,o)},function(){throw new Error("cannot encode never")})||this;return n._tag="NeverType",n}return t}($);var uK=new X1,eL=function(e){K(t,e);function t(){var n=e.call(this,"any",function(r){return!0},Z,q)||this;return n._tag="AnyType",n}return t}($);var lK=new eL;function sb(e,t,n){return n===void 0&&(n="(".concat(e.name," | ").concat(Bh(t),")")),new B1(n,function(r){return e.is(r)&&t(r)},function(r,o){var i=e.validate(r,o);if(he(i))return i;var s=i.right;return t(s)?Z(s):de(s,o)},e.encode,e,t)}var cK=sb(ge,Number.isInteger,"Integer"),tL=function(e){K(t,e);function t(n,r,o,i,s,a){var u=e.call(this,n,r,o,i,s)||this;return u.tag=a,u}return t}(ob);var dK=function(e){return[{key:"",type:e}]};var nL=function(e){K(t,e);function t(){var n=e.call(this,"object",function(r){return r!==null&&typeof r=="object"},function(r,o){return n.is(r)?Z(r):de(r,o)},q)||this;return n._tag="ObjectType",n}return t}($);var fK=new nL;var pK=function(e){K(t,e);function t(n,r,o,i,s){var a=e.call(this,n,r,o,i)||this;return a.props=s,a._tag="StrictType",a}return t}($);var rL=$h("JsonArray",function(){return ib(Hh)}),oL=$h("JsonRecord",function(){return Qo(X,Hh)}),Hh=Bs([tb,ge,X,Us,rL,oL],"Json"),ab=new $("JsonFromString",Hh.is,function(e,t){try{return Z(JSON.parse(e))}catch{return de(e,t)}},function(e){return JSON.stringify(e)});function Hs(e){return Bs([Us,e])}function DK(e){return Bs([Us,Vs,e])}var wK=ht({Id:ge});var CK=ht({Id:ge,HRef:Hs(X)});var bK=ht({Id:Hs(ge),HRef:Hs(X)});var EK=X.pipe(ab,"JsonFromUnknown"),IK=new $("LocalDateTimeFromString",e=>e instanceof Date,(e,t)=>sr(X.validate(e,t),kh(n=>{let r=NC(n);return isNaN(r.getTime())?de(e,t):Z(r)})),e=>OC(e)),_K=new $("LocalDateTimeFromString",e=>e instanceof Date,(e,t)=>sr(X.validate(e,t),kh(n=>{let r=RC(n);return isNaN(r.getTime())?de(e,t):Z(r)})),e=>Fh(e));function SK(e,t){return t.reduce((n,r)=>P(y({},n),{[r]:e[r]}),{})}function ub(e,t){let n=r=>Object.values(t).includes(r);return new $(e,n,(r,o)=>n(r)?Z(r):de(r,o),q)}var lb=function(e){return e.Crystal="crystal",e.Excel="excel",e}(lb||{}),In=ht({type:ub("ReportType",lb),id:ge});var iL=ht({de:ht({label:X,description:X}),fr:ht({label:X,description:X})}),sL=Qo(X,iL),aL=ht({roles:je(X),types:je(X)}),uL=ht({substitutionsAdminLink:X}),OK=ht({apiUrl:X,scriptsAndAssetsPath:X,paginationLimit:ge,absencePresenceTypeId:ge,latePresenceTypeId:ge,dispensationPresenceTypeId:ge,halfDayPresenceTypeId:ge,unconfirmedAbsenceStateId:ge,unexcusedAbsenceStateId:ge,excusedAbsenceStateId:ge,checkableAbsenceStateId:ge,lessonPresencesRefreshTime:ge,unconfirmedAbsencesRefreshTime:Hs(ge),personMasterDataReports:je(In),studentConfirmationReports:je(In),evaluateAbsencesReports:je(In),myAbsencesReports:je(In),testsByCourseReports:je(In),testsBySubscriptionStudentReports:je(In),testsBySubscriptionTeacherReports:je(In),studyClassStudentsReports:je(In),courseStudentsReports:je(In),subscriptionDetailGroupId:ge,headerRoleRestriction:Qo(X,X),notificationTypes:sL,notificationTypesAssignments:je(aL),eventlist:Qo(X,X),dashboard:uL,preventStudentAbsenceAfterLessonStart:je(X)});var FK=new E("Application Settings",{providedIn:"root",factory:()=>window.schulverwaltung.settings});var Db=(()=>{class e{_renderer;_elementRef;onChange=n=>{};onTouched=()=>{};constructor(n,r){this._renderer=n,this._elementRef=r}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}static \u0275fac=function(r){return new(r||e)(w(at),w(Te))};static \u0275dir=H({type:e})}return e})(),ri=(()=>{class e extends Db{static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275dir=H({type:e,features:[_e]})}return e})(),xn=new E(""),lL={provide:xn,useExisting:Pe(()=>cL),multi:!0},cL=(()=>{class e extends ri{writeValue(n){this.setProperty("checked",n)}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,o){r&1&&Dt("change",function(s){return o.onChange(s.target.checked)})("blur",function(){return o.onTouched()})},standalone:!1,features:[ze([lL]),_e]})}return e})(),dL={provide:xn,useExisting:Pe(()=>wb),multi:!0};function fL(){let e=Dn()?Dn().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}var pL=new E(""),wb=(()=>{class e extends Db{_compositionMode;_composing=!1;constructor(n,r,o){super(n,r),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!fL())}writeValue(n){let r=n??"";this.setProperty("value",r)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}static \u0275fac=function(r){return new(r||e)(w(at),w(Te),w(pL,8))};static \u0275dir=H({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){r&1&&Dt("input",function(s){return o._handleInput(s.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(s){return o._compositionEnd(s.target.value)})},standalone:!1,features:[ze([dL]),_e]})}return e})();function ur(e){return e==null||(typeof e=="string"||Array.isArray(e))&&e.length===0}function Cb(e){return e!=null&&typeof e.length=="number"}var cr=new E(""),Ys=new E(""),hL=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,cb=class{static min(t){return bb(t)}static max(t){return Eb(t)}static required(t){return Ib(t)}static requiredTrue(t){return gL(t)}static email(t){return mL(t)}static minLength(t){return vL(t)}static maxLength(t){return yL(t)}static pattern(t){return DL(t)}static nullValidator(t){return ql(t)}static compose(t){return Ab(t)}static composeAsync(t){return Nb(t)}};function bb(e){return t=>{if(ur(t.value)||ur(e))return null;let n=parseFloat(t.value);return!isNaN(n)&&n{if(ur(t.value)||ur(e))return null;let n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}function Ib(e){return ur(e.value)?{required:!0}:null}function gL(e){return e.value===!0?null:{required:!0}}function mL(e){return ur(e.value)||hL.test(e.value)?null:{email:!0}}function vL(e){return t=>ur(t.value)||!Cb(t.value)?null:t.value.lengthCb(t.value)&&t.value.length>e?{maxlength:{requiredLength:e,actualLength:t.value.length}}:null}function DL(e){if(!e)return ql;let t,n;return typeof e=="string"?(n="",e.charAt(0)!=="^"&&(n+="^"),n+=e,e.charAt(e.length-1)!=="$"&&(n+="$"),t=new RegExp(n)):(n=e.toString(),t=e),r=>{if(ur(r.value))return null;let o=r.value;return t.test(o)?null:{pattern:{requiredPattern:n,actualValue:o}}}}function ql(e){return null}function _b(e){return e!=null}function xb(e){return Jn(e)?ne(e):e}function Sb(e){let t={};return e.forEach(n=>{t=n!=null?y(y({},t),n):t}),Object.keys(t).length===0?null:t}function Tb(e,t){return t.map(n=>n(e))}function wL(e){return!e.validate}function Mb(e){return e.map(t=>wL(t)?t:n=>t.validate(n))}function Ab(e){if(!e)return null;let t=e.filter(_b);return t.length==0?null:function(n){return Sb(Tb(n,t))}}function Kh(e){return e!=null?Ab(Mb(e)):null}function Nb(e){if(!e)return null;let t=e.filter(_b);return t.length==0?null:function(n){let r=Tb(n,t).map(xb);return Li(r).pipe(R(Sb))}}function Yh(e){return e!=null?Nb(Mb(e)):null}function db(e,t){return e===null?[t]:Array.isArray(e)?[...e,t]:[e,t]}function Rb(e){return e._rawValidators}function Ob(e){return e._rawAsyncValidators}function zh(e){return e?Array.isArray(e)?e:[e]:[]}function Wl(e,t){return Array.isArray(e)?e.includes(t):e===t}function fb(e,t){let n=zh(t);return zh(e).forEach(o=>{Wl(n,o)||n.push(o)}),n}function pb(e,t){return zh(t).filter(n=>!Wl(e,n))}var Zl=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Kh(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Yh(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,n){return this.control?this.control.hasError(t,n):!1}getError(t,n){return this.control?this.control.getError(t,n):null}},_n=class extends Zl{name;get formDirective(){return null}get path(){return null}},qt=class extends Zl{_parent=null;name=null;valueAccessor=null},Kl=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},CL={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},QK=P(y({},CL),{"[class.ng-submitted]":"isSubmitted"}),JK=(()=>{class e extends Kl{constructor(n){super(n)}static \u0275fac=function(r){return new(r||e)(w(qt,2))};static \u0275dir=H({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&nl("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[_e]})}return e})(),XK=(()=>{class e extends Kl{constructor(n){super(n)}static \u0275fac=function(r){return new(r||e)(w(_n,10))};static \u0275dir=H({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,o){r&2&&nl("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[_e]})}return e})();var zs="VALID",Gl="INVALID",Jo="PENDING",Gs="DISABLED",lr=class{},Yl=class extends lr{value;source;constructor(t,n){super(),this.value=t,this.source=n}},Ws=class extends lr{pristine;source;constructor(t,n){super(),this.pristine=t,this.source=n}},Zs=class extends lr{touched;source;constructor(t,n){super(),this.touched=t,this.source=n}},Xo=class extends lr{status;source;constructor(t,n){super(),this.status=t,this.source=n}},Gh=class extends lr{source;constructor(t){super(),this.source=t}},qh=class extends lr{source;constructor(t){super(),this.source=t}};function Qh(e){return(ec(e)?e.validators:e)||null}function bL(e){return Array.isArray(e)?Kh(e):e||null}function Jh(e,t){return(ec(t)?t.asyncValidators:e)||null}function EL(e){return Array.isArray(e)?Yh(e):e||null}function ec(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function Fb(e,t,n){let r=e.controls;if(!(t?Object.keys(r):r).length)throw new b(1e3,"");if(!r[n])throw new b(1001,"")}function Pb(e,t,n){e._forEachChild((r,o)=>{if(n[o]===void 0)throw new b(1002,"")})}var ti=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,n){this._assignValidators(t),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return Ct(this.statusReactive)}set status(t){Ct(()=>this.statusReactive.set(t))}_status=jo(()=>this.statusReactive());statusReactive=Lo(void 0);get valid(){return this.status===zs}get invalid(){return this.status===Gl}get pending(){return this.status==Jo}get disabled(){return this.status===Gs}get enabled(){return this.status!==Gs}errors;get pristine(){return Ct(this.pristineReactive)}set pristine(t){Ct(()=>this.pristineReactive.set(t))}_pristine=jo(()=>this.pristineReactive());pristineReactive=Lo(!0);get dirty(){return!this.pristine}get touched(){return Ct(this.touchedReactive)}set touched(t){Ct(()=>this.touchedReactive.set(t))}_touched=jo(()=>this.touchedReactive());touchedReactive=Lo(!1);get untouched(){return!this.touched}_events=new te;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(fb(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(fb(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(pb(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(pb(t,this._rawAsyncValidators))}hasValidator(t){return Wl(this._rawValidators,t)}hasAsyncValidator(t){return Wl(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let n=this.touched===!1;this.touched=!0;let r=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(P(y({},t),{sourceControl:r})),n&&t.emitEvent!==!1&&this._events.next(new Zs(!0,r))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(n=>n.markAllAsTouched(t))}markAsUntouched(t={}){let n=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=t.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:r})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,r),n&&t.emitEvent!==!1&&this._events.next(new Zs(!1,r))}markAsDirty(t={}){let n=this.pristine===!0;this.pristine=!1;let r=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(P(y({},t),{sourceControl:r})),n&&t.emitEvent!==!1&&this._events.next(new Ws(!1,r))}markAsPristine(t={}){let n=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=t.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,r),n&&t.emitEvent!==!1&&this._events.next(new Ws(!0,r))}markAsPending(t={}){this.status=Jo;let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Xo(this.status,n)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(P(y({},t),{sourceControl:n}))}disable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=Gs,this.errors=null,this._forEachChild(o=>{o.disable(P(y({},t),{onlySelf:!0}))}),this._updateValue();let r=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Yl(this.value,r)),this._events.next(new Xo(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(P(y({},t),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=zs,this._forEachChild(r=>{r.enable(P(y({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(P(y({},t),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(t,n){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},n),this._parent._updateTouched({},n))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===zs||this.status===Jo)&&this._runAsyncValidator(r,t.emitEvent)}let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Yl(this.value,n)),this._events.next(new Xo(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(P(y({},t),{sourceControl:n}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Gs:zs}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,n){if(this.asyncValidator){this.status=Jo,this._hasOwnPendingAsyncValidator={emitEvent:n!==!1};let r=xb(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:n,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,n={}){this.errors=t,this._updateControlsErrors(n.emitEvent!==!1,this,n.shouldHaveEmitted)}get(t){let n=t;return n==null||(Array.isArray(n)||(n=n.split(".")),n.length===0)?null:n.reduce((r,o)=>r&&r._find(o),this)}getError(t,n){let r=n?this.get(n):this;return r&&r.errors?r.errors[t]:null}hasError(t,n){return!!this.getError(t,n)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,n,r){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||r)&&this._events.next(new Xo(this.status,n)),this._parent&&this._parent._updateControlsErrors(t,n,r)}_initObservables(){this.valueChanges=new Y,this.statusChanges=new Y}_calculateStatus(){return this._allControlsDisabled()?Gs:this.errors?Gl:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Jo)?Jo:this._anyControlsHaveStatus(Gl)?Gl:zs}_anyControlsHaveStatus(t){return this._anyControls(n=>n.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,n){let r=!this._anyControlsDirty(),o=this.pristine!==r;this.pristine=r,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,n),o&&this._events.next(new Ws(this.pristine,n))}_updateTouched(t={},n){this.touched=this._anyControlsTouched(),this._events.next(new Zs(this.touched,n)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,n)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){ec(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let n=this._parent&&this._parent.dirty;return!t&&!!n&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=bL(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=EL(this._rawAsyncValidators)}},ni=class extends ti{constructor(t,n,r){super(Qh(n),Jh(r,n)),this.controls=t,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,n){return this.controls[t]?this.controls[t]:(this.controls[t]=n,n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange),n)}addControl(t,n,r={}){this.registerControl(t,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(t,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}setControl(t,n,r={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],n&&this.registerControl(t,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,n={}){Pb(this,!0,t),Object.keys(t).forEach(r=>{Fb(this,!0,r),this.controls[r].setValue(t[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(t,n={}){t!=null&&(Object.keys(t).forEach(r=>{let o=this.controls[r];o&&o.patchValue(t[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(t={},n={}){this._forEachChild((r,o)=>{r.reset(t?t[o]:null,{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n,this),this._updateTouched(n,this),this.updateValueAndValidity(n)}getRawValue(){return this._reduceChildren({},(t,n,r)=>(t[r]=n.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(n,r)=>r._syncPendingControls()?!0:n);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(n=>{let r=this.controls[n];r&&t(r,n)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[n,r]of Object.entries(this.controls))if(this.contains(n)&&t(r))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(n,r,o)=>((r.enabled||this.disabled)&&(n[o]=r.value),n))}_reduceChildren(t,n){let r=t;return this._forEachChild((o,i)=>{r=n(r,o,i)}),r}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Wh=class extends ni{};var Jr=new E("CallSetDisabledState",{providedIn:"root",factory:()=>Qs}),Qs="always";function Lb(e,t){return[...t.path,e]}function Ks(e,t,n=Qs){Xh(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||n==="always")&&t.valueAccessor.setDisabledState?.(e.disabled),_L(e,t),SL(e,t),xL(e,t),IL(e,t)}function Ql(e,t,n=!0){let r=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(r),t.valueAccessor.registerOnTouched(r)),Xl(e,t),e&&(t._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function Jl(e,t){e.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(t)})}function IL(e,t){if(t.valueAccessor.setDisabledState){let n=r=>{t.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(n),t._registerOnDestroy(()=>{e._unregisterOnDisabledChange(n)})}}function Xh(e,t){let n=Rb(e);t.validator!==null?e.setValidators(db(n,t.validator)):typeof n=="function"&&e.setValidators([n]);let r=Ob(e);t.asyncValidator!==null?e.setAsyncValidators(db(r,t.asyncValidator)):typeof r=="function"&&e.setAsyncValidators([r]);let o=()=>e.updateValueAndValidity();Jl(t._rawValidators,o),Jl(t._rawAsyncValidators,o)}function Xl(e,t){let n=!1;if(e!==null){if(t.validator!==null){let o=Rb(e);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==t.validator);i.length!==o.length&&(n=!0,e.setValidators(i))}}if(t.asyncValidator!==null){let o=Ob(e);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==t.asyncValidator);i.length!==o.length&&(n=!0,e.setAsyncValidators(i))}}}let r=()=>{};return Jl(t._rawValidators,r),Jl(t._rawAsyncValidators,r),n}function _L(e,t){t.valueAccessor.registerOnChange(n=>{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,e.updateOn==="change"&&kb(e,t)})}function xL(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,e.updateOn==="blur"&&e._pendingChange&&kb(e,t),e.updateOn!=="submit"&&e.markAsTouched()})}function kb(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function SL(e,t){let n=(r,o)=>{t.valueAccessor.writeValue(r),o&&t.viewToModelUpdate(r)};e.registerOnChange(n),t._registerOnDestroy(()=>{e._unregisterOnChange(n)})}function jb(e,t){e==null,Xh(e,t)}function TL(e,t){return Xl(e,t)}function eg(e,t){if(!e.hasOwnProperty("model"))return!1;let n=e.model;return n.isFirstChange()?!0:!Object.is(t,n.currentValue)}function ML(e){return Object.getPrototypeOf(e.constructor)===ri}function Vb(e,t){e._syncPendingControls(),t.forEach(n=>{let r=n.control;r.updateOn==="submit"&&r._pendingChange&&(n.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function tg(e,t){if(!t)return null;Array.isArray(t);let n,r,o;return t.forEach(i=>{i.constructor===wb?n=i:ML(i)?r=i:o=i}),o||r||n||null}function AL(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var NL={provide:_n,useExisting:Pe(()=>RL)},qs=Promise.resolve(),RL=(()=>{class e extends _n{callSetDisabledState;get submitted(){return Ct(this.submittedReactive)}_submitted=jo(()=>this.submittedReactive());submittedReactive=Lo(!1);_directives=new Set;form;ngSubmit=new Y;options;constructor(n,r,o){super(),this.callSetDisabledState=o,this.form=new ni({},Kh(n),Yh(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(n){qs.then(()=>{let r=this._findContainer(n.path);n.control=r.registerControl(n.name,n.control),Ks(n.control,n,this.callSetDisabledState),n.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(n)})}getControl(n){return this.form.get(n.path)}removeControl(n){qs.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name),this._directives.delete(n)})}addFormGroup(n){qs.then(()=>{let r=this._findContainer(n.path),o=new ni({});jb(o,n),r.registerControl(n.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(n){qs.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name)})}getFormGroup(n){return this.form.get(n.path)}updateModel(n,r){qs.then(()=>{this.form.get(n.path).setValue(r)})}setValue(n){this.control.setValue(n)}onSubmit(n){return this.submittedReactive.set(!0),Vb(this.form,this._directives),this.ngSubmit.emit(n),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(n){return n.pop(),n.length?this.form.get(n):this.form}static \u0275fac=function(r){return new(r||e)(w(cr,10),w(Ys,10),w(Jr,8))};static \u0275dir=H({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,o){r&1&&Dt("submit",function(s){return o.onSubmit(s)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[ze([NL]),_e]})}return e})();function hb(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function gb(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===2&&"value"in e&&"disabled"in e}var ei=class extends ti{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,n,r){super(Qh(n),Jh(r,n)),this._applyFormState(t),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ec(n)&&(n.nonNullable||n.initialValueIsDefault)&&(gb(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,n={}){this.value=this._pendingValue=t,this._onChange.length&&n.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,n.emitViewToModelChange!==!1)),this.updateValueAndValidity(n)}patchValue(t,n={}){this.setValue(t,n)}reset(t=this.defaultValue,n={}){this._applyFormState(t),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){hb(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){hb(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){gb(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},tY=ei,OL=e=>e instanceof ei;var FL={provide:qt,useExisting:Pe(()=>PL)},mb=Promise.resolve(),PL=(()=>{class e extends qt{_changeDetectorRef;callSetDisabledState;control=new ei;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new Y;constructor(n,r,o,i,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=tg(this,i)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let r=n.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),eg(n,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Ks(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(n){mb.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let r=n.isDisabled.currentValue,o=r!==0&&er(r);mb.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?Lb(n,this._parent):[n]}static \u0275fac=function(r){return new(r||e)(w(_n,9),w(cr,10),w(Ys,10),w(xn,10),w(wt,8),w(Jr,8))};static \u0275dir=H({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[ze([FL]),_e,gt]})}return e})(),nY=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275dir=H({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return e})(),LL={provide:xn,useExisting:Pe(()=>kL),multi:!0},kL=(()=>{class e extends ri{writeValue(n){let r=n??"";this.setProperty("value",r)}registerOnChange(n){this.onChange=r=>{n(r==""?null:parseFloat(r))}}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(r,o){r&1&&Dt("input",function(s){return o.onChange(s.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[ze([LL]),_e]})}return e})(),jL={provide:xn,useExisting:Pe(()=>UL),multi:!0};var VL=(()=>{class e{_accessors=[];add(n,r){this._accessors.push([n,r])}remove(n){for(let r=this._accessors.length-1;r>=0;--r)if(this._accessors[r][1]===n){this._accessors.splice(r,1);return}}select(n){this._accessors.forEach(r=>{this._isSameGroup(r,n)&&r[1]!==n&&r[1].fireUncheck(n.value)})}_isSameGroup(n,r){return n[0].control?n[0]._parent===r._control._parent&&n[1].name===r.name:!1}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),UL=(()=>{class e extends ri{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=v(Jr,{optional:!0})??Qs;constructor(n,r,o,i){super(n,r),this._registry=o,this._injector=i}ngOnInit(){this._control=this._injector.get(qt),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(n){this._state=n===this.value,this.setProperty("checked",this._state)}registerOnChange(n){this._fn=n,this.onChange=()=>{n(this.value),this._registry.select(this)}}setDisabledState(n){(this.setDisabledStateFired||n||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",n),this.setDisabledStateFired=!0}fireUncheck(n){this.writeValue(n)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(r){return new(r||e)(w(at),w(Te),w(VL),w(et))};static \u0275dir=H({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(r,o){r&1&&Dt("change",function(){return o.onChange()})("blur",function(){return o.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[ze([jL]),_e]})}return e})();var ng=new E(""),BL={provide:qt,useExisting:Pe(()=>$L)},$L=(()=>{class e extends qt{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(n){}model;update=new Y;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(n,r,o,i,s){super(),this._ngModelWarningConfig=i,this.callSetDisabledState=s,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=tg(this,o)}ngOnChanges(n){if(this._isControlChanged(n)){let r=n.form.previousValue;r&&Ql(r,this,!1),Ks(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}eg(n,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Ql(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_isControlChanged(n){return n.hasOwnProperty("form")}static \u0275fac=function(r){return new(r||e)(w(cr,10),w(Ys,10),w(xn,10),w(ng,8),w(Jr,8))};static \u0275dir=H({type:e,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[ze([BL]),_e,gt]})}return e})(),HL={provide:_n,useExisting:Pe(()=>zL)},zL=(()=>{class e extends _n{callSetDisabledState;get submitted(){return Ct(this._submittedReactive)}set submitted(n){this._submittedReactive.set(n)}_submitted=jo(()=>this._submittedReactive());_submittedReactive=Lo(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new Y;constructor(n,r,o){super(),this.callSetDisabledState=o,this._setValidators(n),this._setAsyncValidators(r)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Xl(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(n){let r=this.form.get(n.path);return Ks(r,n,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),r}getControl(n){return this.form.get(n.path)}removeControl(n){Ql(n.control||null,n,!1),AL(this.directives,n)}addFormGroup(n){this._setUpFormContainer(n)}removeFormGroup(n){this._cleanUpFormContainer(n)}getFormGroup(n){return this.form.get(n.path)}addFormArray(n){this._setUpFormContainer(n)}removeFormArray(n){this._cleanUpFormContainer(n)}getFormArray(n){return this.form.get(n.path)}updateModel(n,r){this.form.get(n.path).setValue(r)}onSubmit(n){return this._submittedReactive.set(!0),Vb(this.form,this.directives),this.ngSubmit.emit(n),this.form._events.next(new Gh(this.control)),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this._submittedReactive.set(!1),this.form._events.next(new qh(this.form))}_updateDomValue(){this.directives.forEach(n=>{let r=n.control,o=this.form.get(n.path);r!==o&&(Ql(r||null,n),OL(o)&&(Ks(o,n,this.callSetDisabledState),n.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let r=this.form.get(n.path);jb(r,n),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let r=this.form.get(n.path);r&&TL(r,n)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Xh(this.form,this),this._oldForm&&Xl(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(r){return new(r||e)(w(cr,10),w(Ys,10),w(Jr,8))};static \u0275dir=H({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&Dt("submit",function(s){return o.onSubmit(s)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[ze([HL]),_e,gt]})}return e})();var GL={provide:qt,useExisting:Pe(()=>qL)},qL=(()=>{class e extends qt{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(n){}model;update=new Y;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(n,r,o,i,s){super(),this._ngModelWarningConfig=s,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=tg(this,i)}ngOnChanges(n){this._added||this._setUpControl(),eg(n,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}get path(){return Lb(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(r){return new(r||e)(w(_n,13),w(cr,10),w(Ys,10),w(xn,10),w(ng,8))};static \u0275dir=H({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[ze([GL]),_e,gt]})}return e})(),WL={provide:xn,useExisting:Pe(()=>Bb),multi:!0};function Ub(e,t){return e==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${e}: ${t}`.slice(0,50))}function ZL(e){return e.split(":")[0]}var Bb=(()=>{class e extends ri{value;_optionMap=new Map;_idCounter=0;set compareWith(n){this._compareWith=n}_compareWith=Object.is;writeValue(n){this.value=n;let r=this._getOptionId(n),o=Ub(r,n);this.setProperty("value",o)}registerOnChange(n){this.onChange=r=>{this.value=this._getOptionValue(r),n(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(n){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),n))return r;return null}_getOptionValue(n){let r=ZL(n);return this._optionMap.has(r)?this._optionMap.get(r):n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,o){r&1&&Dt("change",function(s){return o.onChange(s.target.value)})("blur",function(){return o.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ze([WL]),_e]})}return e})(),rY=(()=>{class e{_element;_renderer;_select;id;constructor(n,r,o){this._element=n,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption())}set ngValue(n){this._select!=null&&(this._select._optionMap.set(this.id,n),this._setElementValue(Ub(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._setElementValue(n),this._select&&this._select.writeValue(this._select.value)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(r){return new(r||e)(w(Te),w(at),w(Bb,9))};static \u0275dir=H({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})(),KL={provide:xn,useExisting:Pe(()=>$b),multi:!0};function vb(e,t){return e==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${e}: ${t}`.slice(0,50))}function YL(e){return e.split(":")[0]}var $b=(()=>{class e extends ri{value;_optionMap=new Map;_idCounter=0;set compareWith(n){this._compareWith=n}_compareWith=Object.is;writeValue(n){this.value=n;let r;if(Array.isArray(n)){let o=n.map(i=>this._getOptionId(i));r=(i,s)=>{i._setSelected(o.indexOf(s.toString())>-1)}}else r=(o,i)=>{o._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(n){this.onChange=r=>{let o=[],i=r.selectedOptions;if(i!==void 0){let s=i;for(let a=0;a{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,o){r&1&&Dt("change",function(s){return o.onChange(s.target)})("blur",function(){return o.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ze([KL]),_e]})}return e})(),oY=(()=>{class e{_element;_renderer;_select;id;_value;constructor(n,r,o){this._element=n,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption(this))}set ngValue(n){this._select!=null&&(this._value=n,this._setElementValue(vb(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._select?(this._value=n,this._setElementValue(vb(this.id,n)),this._select.writeValue(this._select.value)):this._setElementValue(n)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}_setSelected(n){this._renderer.setProperty(this._element.nativeElement,"selected",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(r){return new(r||e)(w(Te),w(at),w($b,9))};static \u0275dir=H({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})();function Hb(e){return typeof e=="number"?e:parseFloat(e)}var rg=(()=>{class e{_validator=ql;_onChange;_enabled;ngOnChanges(n){if(this.inputName in n){let r=this.normalizeInput(n[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):ql,this._onChange&&this._onChange()}}validate(n){return this._validator(n)}registerOnValidatorChange(n){this._onChange=n}enabled(n){return n!=null}static \u0275fac=function(r){return new(r||e)};static \u0275dir=H({type:e,features:[gt]})}return e})(),QL={provide:cr,useExisting:Pe(()=>JL),multi:!0},JL=(()=>{class e extends rg{max;inputName="max";normalizeInput=n=>Hb(n);createValidator=n=>Eb(n);static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&$r("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[ze([QL]),_e]})}return e})(),XL={provide:cr,useExisting:Pe(()=>ek),multi:!0},ek=(()=>{class e extends rg{min;inputName="min";normalizeInput=n=>Hb(n);createValidator=n=>bb(n);static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&$r("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[ze([XL]),_e]})}return e})(),tk={provide:cr,useExisting:Pe(()=>nk),multi:!0};var nk=(()=>{class e extends rg{required;inputName="required";normalizeInput=er;createValidator=n=>Ib;enabled(n){return n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275dir=H({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(r,o){r&2&&$r("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[ze([tk]),_e]})}return e})();var zb=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=hn({type:e});static \u0275inj=un({})}return e})(),Zh=class extends ti{constructor(t,n,r){super(Qh(n),Jh(r,n)),this.controls=t,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,n={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}insert(t,n,r={}){this.controls.splice(t,0,n),this._registerControl(n),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(t,n={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:n.emitEvent})}setControl(t,n,r={}){let o=this._adjustIndex(t);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),n&&(this.controls.splice(o,0,n),this._registerControl(n)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,n={}){Pb(this,!1,t),t.forEach((r,o)=>{Fb(this,!1,o),this.at(o).setValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(t,n={}){t!=null&&(t.forEach((r,o)=>{this.at(o)&&this.at(o).patchValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(t=[],n={}){this._forEachChild((r,o)=>{r.reset(t[o],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n,this),this._updateTouched(n,this),this.updateValueAndValidity(n)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(n=>n._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((n,r)=>r._syncPendingControls()?!0:n,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((n,r)=>{t(n,r)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(n=>n.enabled&&t(n))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function yb(e){return!!e&&(e.asyncValidators!==void 0||e.validators!==void 0||e.updateOn!==void 0)}var rk=(()=>{class e{useNonNullable=!1;get nonNullable(){let n=new e;return n.useNonNullable=!0,n}group(n,r=null){let o=this._reduceControls(n),i={};return yb(r)?i=r:r!==null&&(i.validators=r.validator,i.asyncValidators=r.asyncValidator),new ni(o,i)}record(n,r=null){let o=this._reduceControls(n);return new Wh(o,r)}control(n,r,o){let i={};return this.useNonNullable?(yb(r)?i=r:(i.validators=r,i.asyncValidators=o),new ei(n,P(y({},i),{nonNullable:!0}))):new ei(n,r,o)}array(n,r,o){let i=n.map(s=>this._createControl(s));return new Zh(i,r,o)}_reduceControls(n){let r={};return Object.keys(n).forEach(o=>{r[o]=this._createControl(n[o])}),r}_createControl(n){if(n instanceof ei)return n;if(n instanceof ti)return n;if(Array.isArray(n)){let r=n[0],o=n.length>1?n[1]:null,i=n.length>2?n[2]:null;return this.control(r,o,i)}else return this.control(n)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var iY=(()=>{class e extends rk{group(n,r=null){return super.group(n,r)}control(n,r,o){return super.control(n,r,o)}array(n,r,o){return super.array(n,r,o)}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var sY=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:Jr,useValue:n.callSetDisabledState??Qs}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=hn({type:e});static \u0275inj=un({imports:[zb]})}return e})(),aY=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:ng,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:Jr,useValue:n.callSetDisabledState??Qs}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=hn({type:e});static \u0275inj=un({imports:[zb]})}return e})();function ok(e,t){for(var n=-1,r=t.length,o=e.length;++n0&&n(a)?t>1?Jb(a,t-1,n,r,o):oi(o,a):r||(o[o.length]=a)}return o}var Xb=Jb;function xk(e){var t=e==null?0:e.length;return t?Xb(e,1):[]}var Sk=xk;function Tk(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var It=Tk;var Mk="[object AsyncFunction]",Ak="[object Function]",Nk="[object GeneratorFunction]",Rk="[object Proxy]";function Ok(e){if(!It(e))return!1;var t=Lt(e);return t==Ak||t==Nk||t==Mk||t==Rk}var nc=Ok;var Fk=De["__core-js_shared__"],rc=Fk;var eE=function(){var e=/[^.]+$/.exec(rc&&rc.keys&&rc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Pk(e){return!!eE&&eE in e}var tE=Pk;var Lk=Function.prototype,kk=Lk.toString;function jk(e){if(e!=null){try{return kk.call(e)}catch{}try{return e+""}catch{}}return""}var Sn=jk;var Vk=/[\\^$.*+?()[\]{}|]/g,Uk=/^\[object .+?Constructor\]$/,Bk=Function.prototype,$k=Object.prototype,Hk=Bk.toString,zk=$k.hasOwnProperty,Gk=RegExp("^"+Hk.call(zk).replace(Vk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qk(e){if(!It(e)||tE(e))return!1;var t=nc(e)?Gk:Uk;return t.test(Sn(e))}var nE=qk;function Wk(e,t){return e?.[t]}var rE=Wk;function Zk(e,t){var n=rE(e,t);return nE(n)?n:void 0}var rt=Zk;var Kk=rt(Object,"create"),Tn=Kk;function Yk(){this.__data__=Tn?Tn(null):{},this.size=0}var oE=Yk;function Qk(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var iE=Qk;var Jk="__lodash_hash_undefined__",Xk=Object.prototype,ej=Xk.hasOwnProperty;function tj(e){var t=this.__data__;if(Tn){var n=t[e];return n===Jk?void 0:n}return ej.call(t,e)?t[e]:void 0}var sE=tj;var nj=Object.prototype,rj=nj.hasOwnProperty;function oj(e){var t=this.__data__;return Tn?t[e]!==void 0:rj.call(t,e)}var aE=oj;var ij="__lodash_hash_undefined__";function sj(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===void 0?ij:t,this}var uE=sj;function si(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var fE=hj;function gj(e,t){var n=this.__data__,r=dr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var pE=gj;function ui(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var xE=Nj;function Rj(e,t,n){for(var r=-1,o=e==null?0:e.length;++r=Vj){var l=t?null:ME(e);if(l)return ci(l);s=!1,o=sc,u=new ic}else u=t?[]:a;e:for(;++r-1&&e%1==0&&e-1&&e%1==0&&e<=aV}var pi=uV;function lV(e){return e!=null&&pi(e.length)&&!nc(e)}var hi=lV;var cV=Object.prototype;function dV(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||cV;return e===n}var gi=dV;function fV(e,t){for(var n=-1,r=Array(e);++no?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=r?e:nI(e,t,n)}var rI=EU;var IU="\\ud800-\\udfff",_U="\\u0300-\\u036f",xU="\\ufe20-\\ufe2f",SU="\\u20d0-\\u20ff",TU=_U+xU+SU,MU="\\ufe0e\\ufe0f",AU="\\u200d",NU=RegExp("["+AU+IU+TU+MU+"]");function RU(e){return NU.test(e)}var vc=RU;function OU(e){return e.split("")}var oI=OU;var iI="\\ud800-\\udfff",FU="\\u0300-\\u036f",PU="\\ufe20-\\ufe2f",LU="\\u20d0-\\u20ff",kU=FU+PU+LU,jU="\\ufe0e\\ufe0f",VU="["+iI+"]",lg="["+kU+"]",cg="\\ud83c[\\udffb-\\udfff]",UU="(?:"+lg+"|"+cg+")",sI="[^"+iI+"]",aI="(?:\\ud83c[\\udde6-\\uddff]){2}",uI="[\\ud800-\\udbff][\\udc00-\\udfff]",BU="\\u200d",lI=UU+"?",cI="["+jU+"]?",$U="(?:"+BU+"(?:"+[sI,aI,uI].join("|")+")"+cI+lI+")*",HU=cI+lI+$U,zU="(?:"+[sI+lg+"?",lg,aI,uI,VU].join("|")+")",GU=RegExp(cg+"(?="+cg+")|"+zU+HU,"g");function qU(e){return e.match(GU)||[]}var dI=qU;function WU(e){return vc(e)?dI(e):oI(e)}var fI=WU;function ZU(e){return function(t){t=_t(t);var n=vc(t)?fI(t):void 0,r=n?n[0]:t.charAt(0),o=n?rI(n,1).join(""):t.slice(1);return r[e]()+o}}var pI=ZU;var KU=pI("toUpperCase"),hI=KU;function YU(e){return hI(_t(e).toLowerCase())}var gI=YU;function QU(e,t,n,r){var o=-1,i=e==null?0:e.length;for(r&&i&&(n=e[++o]);++oa))return!1;var l=i.get(e),c=i.get(t);if(l&&c)return l==t&&c==e;var d=-1,f=!0,p=n&O$?new ic:void 0;for(i.set(e,t),i.set(t,e);++d0?"Infinity":"-Infinity":JSON.stringify(e)}function UH(e){return e.map(function(t){var n=t.key,r=t.type;return"".concat(n,": ").concat(r.name)}).join("/")}function BH(e){return e.message!==void 0?e.message:"Invalid value ".concat(VH(e.value)," supplied to ").concat(UH(e.context))}function $H(e){return e.map(BH)}function HH(){return["No errors!"]}var nx={report:Hl($H,HH)};var pg=class extends Error{constructor(){super(...arguments),this.name="DecodeError"}};function zH(e){return t=>sr(e.decode(t),Hl(n=>Fn(()=>new pg(nx.report($l(n)).join(` -`))),n=>_(n)))}function Xie(e){return zH(je(e))}var na=class{},GH=(()=>{class e extends na{getTranslation(n){return _({})}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Ac=class{},qH=(()=>{class e{handle(n){return n.key}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();function Nc(e,t){if(e===t)return!0;if(e===null||t===null)return!1;if(e!==e&&t!==t)return!0;let n=typeof e,r=typeof t,o,i,s;if(n==r&&n=="object")if(Array.isArray(e)){if(!Array.isArray(t))return!1;if((o=e.length)==t.length){for(i=0;i{ia(t[r])?r in e?n[r]=hg(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n):hg({},t)}function gg(e,t){let n=t.split(".");t="";do t+=n.shift(),Dr(e)&&Dr(e[t])&&(ia(e[t])||mg(e[t])||!n.length)?(e=e[t],t=""):n.length?t+=".":e=void 0;while(n.length);return e}function ZH(e,t,n){let r=t.split("."),o=e;for(let i=0;i{class e extends ra{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(n,r){if(vg(n))return this.interpolateString(n,r);if(WH(n))return this.interpolateFunction(n,r)}interpolateFunction(n,r){return n(r)}interpolateString(n,r){return r?n.replace(this.templateMatcher,(o,i)=>{let s=gg(r,i);return Dr(s)?s:o}):n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),oa=class{},YH=(()=>{class e extends oa{compile(n,r){return n}compileTranslations(n,r){return n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Rc=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new Y;onLangChange=new Y;onDefaultLangChange=new Y},rx=new E("ISOALTE_TRANSLATE_SERVICE"),ox=new E("USE_DEFAULT_LANG"),ix=new E("DEFAULT_LANGUAGE"),sx=new E("USE_EXTEND"),ta=e=>Qt(e)?e:_(e),ax=(()=>{class e{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;isolate;extend;loadingTranslations;pending=!1;_onTranslationChange=new Y;_onLangChange=new Y;_onDefaultLangChange=new Y;_defaultLang;_currentLang;_langs=[];_translations={};_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(n){this.isolate?this._defaultLang=n:this.store.defaultLang=n}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(n){this.isolate?this._currentLang=n:this.store.currentLang=n}get langs(){return this.isolate?this._langs:this.store.langs}set langs(n){this.isolate?this._langs=n:this.store.langs=n}get translations(){return this.isolate?this._translations:this.store.translations}set translations(n){this.isolate?this._translations=n:this.store.translations=n}constructor(n,r,o,i,s,a=!0,u=!1,l=!1,c){this.store=n,this.currentLoader=r,this.compiler=o,this.parser=i,this.missingTranslationHandler=s,this.useDefaultLang=a,this.isolate=u,this.extend=l,c&&this.setDefaultLang(c)}setDefaultLang(n){if(n===this.defaultLang)return;let r=this.retrieveTranslations(n);typeof r<"u"?(this.defaultLang==null&&(this.defaultLang=n),r.pipe(xe(1)).subscribe(()=>{this.changeDefaultLang(n)})):this.changeDefaultLang(n)}getDefaultLang(){return this.defaultLang}use(n){if(this.lastUseLanguage=n,n===this.currentLang)return _(this.translations[n]);this.currentLang||(this.currentLang=n);let r=this.retrieveTranslations(n);return Qt(r)?(r.pipe(xe(1)).subscribe(()=>{this.changeLang(n)}),r):(this.changeLang(n),_(this.translations[n]))}changeLang(n){n===this.lastUseLanguage&&(this.currentLang=n,this.onLangChange.emit({lang:n,translations:this.translations[n]}),this.defaultLang==null&&this.changeDefaultLang(n))}retrieveTranslations(n){if(typeof this.translations[n]>"u"||this.extend)return this._translationRequests[n]=this._translationRequests[n]||this.loadAndCompileTranslations(n),this._translationRequests[n]}getTranslation(n){return this.loadAndCompileTranslations(n)}loadAndCompileTranslations(n){this.pending=!0;let r=this.currentLoader.getTranslation(n).pipe(ji(1),xe(1));return this.loadingTranslations=r.pipe(R(o=>this.compiler.compileTranslations(o,n)),ji(1),xe(1)),this.loadingTranslations.subscribe({next:o=>{this.translations[n]=this.extend&&this.translations[n]?y(y({},o),this.translations[n]):o,this.updateLangs(),this.pending=!1},error:o=>{this.pending=!1}}),r}setTranslation(n,r,o=!1){let i=this.compiler.compileTranslations(r,n);(o||this.extend)&&this.translations[n]?this.translations[n]=hg(this.translations[n],i):this.translations[n]=i,this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}getLangs(){return this.langs}addLangs(n){n.forEach(r=>{this.langs.indexOf(r)===-1&&this.langs.push(r)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(n,r,o){let i;if(n&&(i=this.runInterpolation(gg(n,r),o)),i===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.runInterpolation(gg(this.translations[this.defaultLang],r),o)),i===void 0){let s={key:r,translateService:this};typeof o<"u"&&(s.interpolateParams=o),i=this.missingTranslationHandler.handle(s)}return i!==void 0?i:r}runInterpolation(n,r){if(mg(n))return n.map(o=>this.runInterpolation(o,r));if(ia(n)){let o={};for(let i in n)o[i]=this.runInterpolation(n[i],r);return o}else return this.parser.interpolate(n,r)}getParsedResult(n,r,o){if(r instanceof Array){let i={},s=!1;for(let u of r)i[u]=this.getParsedResultForKey(n,u,o),s=s||Qt(i[u]);if(!s)return i;let a=r.map(u=>ta(i[u]));return Li(a).pipe(R(u=>{let l={};return u.forEach((c,d)=>{l[r[d]]=c}),l}))}return this.getParsedResultForKey(n,r,o)}get(n,r){if(!Dr(n)||!n.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(jt(o=>ta(this.getParsedResult(o,n,r)))):ta(this.getParsedResult(this.translations[this.currentLang],n,r))}getStreamOnTranslationChange(n,r){if(!Dr(n)||!n.length)throw new Error('Parameter "key" is required and cannot be empty');return ot(Xt(()=>this.get(n,r)),this.onTranslationChange.pipe(Ee(o=>{let i=this.getParsedResult(o.translations,n,r);return ta(i)})))}stream(n,r){if(!Dr(n)||!n.length)throw new Error('Parameter "key" required');return ot(Xt(()=>this.get(n,r)),this.onLangChange.pipe(Ee(o=>{let i=this.getParsedResult(o.translations,n,r);return ta(i)})))}instant(n,r){if(!Dr(n)||n.length===0)throw new Error('Parameter "key" is required and cannot be empty');let o=this.getParsedResult(this.translations[this.currentLang],n,r);return Qt(o)?Array.isArray(n)?n.reduce((i,s)=>(i[s]=s,i),{}):n:o}set(n,r,o=this.currentLang){ZH(this.translations[o],n,vg(r)?this.compiler.compile(r,o):this.compiler.compileTranslations(r,o)),this.updateLangs(),this.onTranslationChange.emit({lang:o,translations:this.translations[o]})}changeDefaultLang(n){this.defaultLang=n,this.onDefaultLangChange.emit({lang:n,translations:this.translations[n]})}reloadLang(n){return this.resetLang(n),this.loadAndCompileTranslations(n)}resetLang(n){delete this._translationRequests[n],delete this.translations[n]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let n=this.getBrowserCultureLang();return n?n.split(/[-_]/)[0]:void 0}getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}static \u0275fac=function(r){return new(r||e)(I(Rc),I(na),I(oa),I(ra),I(Ac),I(ox),I(rx),I(sx),I(ix))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var cse=(()=>{class e{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(n,r){this.translate=n,this._ref=r}updateValue(n,r,o){let i=s=>{this.value=s!==void 0?s:n,this.lastKey=n,this._ref.markForCheck()};if(o){let s=this.translate.getParsedResult(o,n,r);Qt(s)?s.subscribe(i):i(s)}this.translate.get(n,r).subscribe(i)}transform(n,...r){if(!n||!n.length)return n;if(Nc(n,this.lastKey)&&Nc(r,this.lastParams))return this.value;let o;if(Dr(r[0])&&r.length)if(vg(r[0])&&r[0].length){let i=r[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{o=JSON.parse(i)}catch(s){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${r[0]}`)}}else ia(r[0])&&(o=r[0]);return this.lastKey=n,this.lastParams=r,this.updateValue(n,o),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(n,o,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,o,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,o))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(r){return new(r||e)(w(ax,16),w(wt,16))};static \u0275pipe=ko({name:"translate",type:e,pure:!1});static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();var dse=(e={})=>jr([e.loader||{provide:na,useClass:GH},e.compiler||{provide:oa,useClass:YH},e.parser||{provide:ra,useClass:KH},e.missingTranslationHandler||{provide:Ac,useClass:qH},Rc,{provide:rx,useValue:e.isolate},{provide:ox,useValue:e.useDefaultLang},{provide:sx,useValue:e.extend},{provide:ix,useValue:e.defaultLanguage},ax]);var QH="uiCulture",JH="CLX.LoginToken",XH="CLX.RefreshToken",ez="CLX.TokenExpire",hse=(()=>{class e{getLanguage(){return this.getValue(QH)}getAccessToken(){let n=this.getValue(JH);return n?n.replace(/^"+|"+$/g,""):null}getRefreshToken(){return this.getValue(XH)}getTokenExpire(){return this.getValue(ez)}getPayload(){let n=this.getAccessToken(),r=n?n.split(".")[1]:null,o=r?r.replace("-","+").replace("_","/"):null,i=JSON.parse(window.atob(o||""));return i.roles="holder_roles"in i?i.holder_roles:i.roles,i}getValue(n){return sessionStorage.getItem(n)||localStorage.getItem(n)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{y as a,P as b,fx as c,_i as d,F as e,te as f,Ne as g,Oi as h,Tx as i,Mx as j,Re as k,_ as l,Fn as m,R as n,Fa as o,ce as p,Xt as q,qx as r,Li as s,ed as t,en as u,Xx as v,e0 as w,Ve as x,n0 as y,o0 as z,i0 as A,Ln as B,jt as C,cm as D,kn as E,xe as F,s0 as G,fm as H,l0 as I,jn as J,ka as K,od as L,ji as M,c0 as N,ja as O,Ee as P,d0 as Q,Va as R,Ie as S,f0 as T,p0 as U,b as V,Pe as W,C as X,un as Y,E as Z,I as _,v as $,Je as aa,Pu as ba,gt as ca,r9 as da,o9 as ea,i9 as fa,s9 as ga,Le as ha,Gf as ia,et as ja,Fo as ka,Y as la,me as ma,Nt as na,a9 as oa,hy as pa,Te as qa,u9 as ra,yt as sa,nT as ta,Iy as ua,IT as va,l9 as wa,w as xa,uM as ya,Ki as za,Ao as Aa,at as Ba,Br as Ca,Lo as Da,p9 as Ea,MD as Fa,hn as Ga,H as Ha,ko as Ia,_e as Ja,h9 as Ka,hp as La,$A as Ma,Xn as Na,$r as Oa,lN as Pa,nl as Qa,g9 as Ra,m9 as Sa,v9 as Ta,y9 as Ua,D9 as Va,w9 as Wa,C9 as Xa,b9 as Ya,ZD as Za,KD as _a,vp as $a,YD as ab,QD as bb,_N as cb,E9 as db,SN as eb,Dt as fb,I9 as gb,_9 as hb,x9 as ib,kN as jb,ew as kb,tw as lb,S9 as mb,nw as nb,rw as ob,T9 as pb,M9 as qb,VN as rb,ow as sb,UN as tb,BN as ub,$N as vb,HN as wb,A9 as xb,zN as yb,GN as zb,N9 as Ab,R9 as Bb,ze as Cb,O9 as Db,F9 as Eb,P9 as Fb,L9 as Gb,k9 as Hb,j9 as Ib,V9 as Jb,U9 as Kb,B9 as Lb,$9 as Mb,ls as Nb,wt as Ob,er as Pb,dR as Qb,jo as Rb,Ct as Sb,yR as Tb,H9 as Ub,$e as Vb,ds as Wb,kR as Xb,JR as Yb,d7 as Zb,f7 as _b,p7 as $b,h7 as ac,g7 as bc,m7 as cc,v7 as dc,fO as ec,wn as fc,rr as gc,Mw as hc,Vp as ic,nr as jc,wO as kc,A7 as lc,N7 as mc,Bw as nc,X7 as oc,oF as pc,k as qc,_s as rc,Ss as sc,En as tc,gh as uc,Zr as vc,kF as wc,Ul as xc,nC as yc,wZ as zc,CZ as Ac,bZ as Bc,ZZ as Cc,de as Dc,Z as Ec,$ as Fc,X as Gc,ge as Hc,tb as Ic,eK as Jc,tK as Kc,je as Lc,ht as Mc,rK as Nc,Bs as Oc,oK as Pc,sK as Qc,dK as Rc,RC as Sc,Hs as Tc,DK as Uc,wK as Vc,CK as Wc,bK as Xc,EK as Yc,IK as Zc,_K as _c,SK as $c,OK as ad,FK as bd,xn as cd,cL as dd,wb as ed,cr as fd,cb as gd,JK as hd,XK as id,RL as jd,tY as kd,PL as ld,nY as md,kL as nd,UL as od,$L as pd,zL as qd,qL as rd,Bb as sd,rY as td,oY as ud,JL as vd,ek as wd,nk as xd,iY as yd,sY as zd,aY as Ad,Sk as Bd,dg as Cd,BB as Dd,A$ as Ed,NH as Fd,OH as Gd,$j as Hd,PH as Id,jH as Jd,zH as Kd,Xie as Ld,na as Md,ax as Nd,cse as Od,dse as Pd,hse as Qd}; +`))),n=>_(n)))}function Xie(e){return zH(je(e))}var na=class{},GH=(()=>{class e extends na{getTranslation(n){return _({})}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Ac=class{},qH=(()=>{class e{handle(n){return n.key}static \u0275fac=function(r){return new(r||e)};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();function Nc(e,t){if(e===t)return!0;if(e===null||t===null)return!1;if(e!==e&&t!==t)return!0;let n=typeof e,r=typeof t,o,i,s;if(n==r&&n=="object")if(Array.isArray(e)){if(!Array.isArray(t))return!1;if((o=e.length)==t.length){for(i=0;i{ia(t[r])?r in e?n[r]=hg(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n):hg({},t)}function gg(e,t){let n=t.split(".");t="";do t+=n.shift(),Dr(e)&&Dr(e[t])&&(ia(e[t])||mg(e[t])||!n.length)?(e=e[t],t=""):n.length?t+=".":e=void 0;while(n.length);return e}function ZH(e,t,n){let r=t.split("."),o=e;for(let i=0;i{class e extends ra{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(n,r){if(vg(n))return this.interpolateString(n,r);if(WH(n))return this.interpolateFunction(n,r)}interpolateFunction(n,r){return n(r)}interpolateString(n,r){return r?n.replace(this.templateMatcher,(o,i)=>{let s=gg(r,i);return Dr(s)?s:o}):n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),oa=class{},YH=(()=>{class e extends oa{compile(n,r){return n}compileTranslations(n,r){return n}static \u0275fac=(()=>{let n;return function(o){return(n||(n=Le(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Rc=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new Y;onLangChange=new Y;onDefaultLangChange=new Y},rx=new E("ISOALTE_TRANSLATE_SERVICE"),ox=new E("USE_DEFAULT_LANG"),ix=new E("DEFAULT_LANGUAGE"),sx=new E("USE_EXTEND"),ta=e=>Qt(e)?e:_(e),ax=(()=>{class e{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;isolate;extend;loadingTranslations;pending=!1;_onTranslationChange=new Y;_onLangChange=new Y;_onDefaultLangChange=new Y;_defaultLang;_currentLang;_langs=[];_translations={};_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(n){this.isolate?this._defaultLang=n:this.store.defaultLang=n}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(n){this.isolate?this._currentLang=n:this.store.currentLang=n}get langs(){return this.isolate?this._langs:this.store.langs}set langs(n){this.isolate?this._langs=n:this.store.langs=n}get translations(){return this.isolate?this._translations:this.store.translations}set translations(n){this.isolate?this._translations=n:this.store.translations=n}constructor(n,r,o,i,s,a=!0,u=!1,l=!1,c){this.store=n,this.currentLoader=r,this.compiler=o,this.parser=i,this.missingTranslationHandler=s,this.useDefaultLang=a,this.isolate=u,this.extend=l,c&&this.setDefaultLang(c)}setDefaultLang(n){if(n===this.defaultLang)return;let r=this.retrieveTranslations(n);typeof r<"u"?(this.defaultLang==null&&(this.defaultLang=n),r.pipe(xe(1)).subscribe(()=>{this.changeDefaultLang(n)})):this.changeDefaultLang(n)}getDefaultLang(){return this.defaultLang}use(n){if(this.lastUseLanguage=n,n===this.currentLang)return _(this.translations[n]);this.currentLang||(this.currentLang=n);let r=this.retrieveTranslations(n);return Qt(r)?(r.pipe(xe(1)).subscribe(()=>{this.changeLang(n)}),r):(this.changeLang(n),_(this.translations[n]))}changeLang(n){n===this.lastUseLanguage&&(this.currentLang=n,this.onLangChange.emit({lang:n,translations:this.translations[n]}),this.defaultLang==null&&this.changeDefaultLang(n))}retrieveTranslations(n){if(typeof this.translations[n]>"u"||this.extend)return this._translationRequests[n]=this._translationRequests[n]||this.loadAndCompileTranslations(n),this._translationRequests[n]}getTranslation(n){return this.loadAndCompileTranslations(n)}loadAndCompileTranslations(n){this.pending=!0;let r=this.currentLoader.getTranslation(n).pipe(ji(1),xe(1));return this.loadingTranslations=r.pipe(R(o=>this.compiler.compileTranslations(o,n)),ji(1),xe(1)),this.loadingTranslations.subscribe({next:o=>{this.translations[n]=this.extend&&this.translations[n]?y(y({},o),this.translations[n]):o,this.updateLangs(),this.pending=!1},error:o=>{this.pending=!1}}),r}setTranslation(n,r,o=!1){let i=this.compiler.compileTranslations(r,n);(o||this.extend)&&this.translations[n]?this.translations[n]=hg(this.translations[n],i):this.translations[n]=i,this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}getLangs(){return this.langs}addLangs(n){n.forEach(r=>{this.langs.indexOf(r)===-1&&this.langs.push(r)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(n,r,o){let i;if(n&&(i=this.runInterpolation(gg(n,r),o)),i===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.runInterpolation(gg(this.translations[this.defaultLang],r),o)),i===void 0){let s={key:r,translateService:this};typeof o<"u"&&(s.interpolateParams=o),i=this.missingTranslationHandler.handle(s)}return i!==void 0?i:r}runInterpolation(n,r){if(mg(n))return n.map(o=>this.runInterpolation(o,r));if(ia(n)){let o={};for(let i in n)o[i]=this.runInterpolation(n[i],r);return o}else return this.parser.interpolate(n,r)}getParsedResult(n,r,o){if(r instanceof Array){let i={},s=!1;for(let u of r)i[u]=this.getParsedResultForKey(n,u,o),s=s||Qt(i[u]);if(!s)return i;let a=r.map(u=>ta(i[u]));return Li(a).pipe(R(u=>{let l={};return u.forEach((c,d)=>{l[r[d]]=c}),l}))}return this.getParsedResultForKey(n,r,o)}get(n,r){if(!Dr(n)||!n.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(jt(o=>ta(this.getParsedResult(o,n,r)))):ta(this.getParsedResult(this.translations[this.currentLang],n,r))}getStreamOnTranslationChange(n,r){if(!Dr(n)||!n.length)throw new Error('Parameter "key" is required and cannot be empty');return ot(Xt(()=>this.get(n,r)),this.onTranslationChange.pipe(Ee(o=>{let i=this.getParsedResult(o.translations,n,r);return ta(i)})))}stream(n,r){if(!Dr(n)||!n.length)throw new Error('Parameter "key" required');return ot(Xt(()=>this.get(n,r)),this.onLangChange.pipe(Ee(o=>{let i=this.getParsedResult(o.translations,n,r);return ta(i)})))}instant(n,r){if(!Dr(n)||n.length===0)throw new Error('Parameter "key" is required and cannot be empty');let o=this.getParsedResult(this.translations[this.currentLang],n,r);return Qt(o)?Array.isArray(n)?n.reduce((i,s)=>(i[s]=s,i),{}):n:o}set(n,r,o=this.currentLang){ZH(this.translations[o],n,vg(r)?this.compiler.compile(r,o):this.compiler.compileTranslations(r,o)),this.updateLangs(),this.onTranslationChange.emit({lang:o,translations:this.translations[o]})}changeDefaultLang(n){this.defaultLang=n,this.onDefaultLangChange.emit({lang:n,translations:this.translations[n]})}reloadLang(n){return this.resetLang(n),this.loadAndCompileTranslations(n)}resetLang(n){delete this._translationRequests[n],delete this.translations[n]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let n=this.getBrowserCultureLang();return n?n.split(/[-_]/)[0]:void 0}getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}static \u0275fac=function(r){return new(r||e)(I(Rc),I(na),I(oa),I(ra),I(Ac),I(ox),I(rx),I(sx),I(ix))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var cse=(()=>{class e{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(n,r){this.translate=n,this._ref=r}updateValue(n,r,o){let i=s=>{this.value=s!==void 0?s:n,this.lastKey=n,this._ref.markForCheck()};if(o){let s=this.translate.getParsedResult(o,n,r);Qt(s)?s.subscribe(i):i(s)}this.translate.get(n,r).subscribe(i)}transform(n,...r){if(!n||!n.length)return n;if(Nc(n,this.lastKey)&&Nc(r,this.lastParams))return this.value;let o;if(Dr(r[0])&&r.length)if(vg(r[0])&&r[0].length){let i=r[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{o=JSON.parse(i)}catch(s){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${r[0]}`)}}else ia(r[0])&&(o=r[0]);return this.lastKey=n,this.lastParams=r,this.updateValue(n,o),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(n,o,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,o,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,o))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(r){return new(r||e)(w(ax,16),w(wt,16))};static \u0275pipe=ko({name:"translate",type:e,pure:!1});static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();var dse=(e={})=>jr([e.loader||{provide:na,useClass:GH},e.compiler||{provide:oa,useClass:YH},e.parser||{provide:ra,useClass:KH},e.missingTranslationHandler||{provide:Ac,useClass:qH},Rc,{provide:rx,useValue:e.isolate},{provide:ox,useValue:e.useDefaultLang},{provide:sx,useValue:e.extend},{provide:ix,useValue:e.defaultLanguage},ax]);var QH="uiCulture",JH="CLX.LoginToken",XH="CLX.RefreshToken",ez="CLX.TokenExpire",hse=(()=>{class e{getLanguage(){return this.getValue(QH)}getAccessToken(){let n=this.getValue(JH);return n?n.replace(/^"+|"+$/g,""):null}getRefreshToken(){return this.getValue(XH)}getTokenExpire(){return this.getValue(ez)}getPayload(){let n=this.getAccessToken(),r=n?n.split(".")[1]:null,o=r?r.replace("-","+").replace("_","/"):null,i=JSON.parse(window.atob(o||""));return i.roles="holder_roles"in i?i.holder_roles:i.roles,i}getValue(n){return sessionStorage.getItem(n)||localStorage.getItem(n)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{y as a,P as b,fx as c,_i as d,F as e,te as f,Ne as g,Oi as h,Tx as i,Mx as j,Re as k,_ as l,Fn as m,R as n,Fa as o,ce as p,Xt as q,qx as r,Li as s,ed as t,en as u,Xx as v,e0 as w,Ve as x,n0 as y,o0 as z,i0 as A,Ln as B,jt as C,cm as D,kn as E,xe as F,s0 as G,fm as H,l0 as I,jn as J,ka as K,od as L,ji as M,c0 as N,ja as O,Ee as P,d0 as Q,Va as R,Ie as S,f0 as T,p0 as U,b as V,Pe as W,C as X,un as Y,E as Z,I as _,v as $,Je as aa,st as ba,Pu as ca,gt as da,r9 as ea,o9 as fa,i9 as ga,s9 as ha,Le as ia,Gf as ja,et as ka,Fo as la,Y as ma,me as na,Nt as oa,a9 as pa,hy as qa,Te as ra,u9 as sa,yt as ta,nT as ua,Iy as va,IT as wa,l9 as xa,w as ya,uM as za,Ki as Aa,Ao as Ba,at as Ca,Br as Da,Lo as Ea,p9 as Fa,MD as Ga,hn as Ha,H as Ia,ko as Ja,_e as Ka,h9 as La,hp as Ma,$A as Na,Xn as Oa,$r as Pa,lN as Qa,nl as Ra,g9 as Sa,m9 as Ta,v9 as Ua,y9 as Va,D9 as Wa,w9 as Xa,C9 as Ya,b9 as Za,ZD as _a,KD as $a,vp as ab,YD as bb,QD as cb,_N as db,E9 as eb,SN as fb,Dt as gb,I9 as hb,_9 as ib,x9 as jb,kN as kb,ew as lb,tw as mb,S9 as nb,nw as ob,rw as pb,T9 as qb,M9 as rb,VN as sb,ow as tb,UN as ub,BN as vb,$N as wb,HN as xb,A9 as yb,zN as zb,GN as Ab,N9 as Bb,R9 as Cb,ze as Db,O9 as Eb,F9 as Fb,P9 as Gb,L9 as Hb,k9 as Ib,j9 as Jb,V9 as Kb,U9 as Lb,B9 as Mb,$9 as Nb,ls as Ob,wt as Pb,er as Qb,dR as Rb,jo as Sb,Ct as Tb,yR as Ub,H9 as Vb,$e as Wb,ds as Xb,kR as Yb,JR as Zb,d7 as _b,f7 as $b,p7 as ac,h7 as bc,g7 as cc,m7 as dc,v7 as ec,fO as fc,wn as gc,rr as hc,Mw as ic,Vp as jc,nr as kc,wO as lc,A7 as mc,N7 as nc,Bw as oc,X7 as pc,oF as qc,k as rc,_s as sc,Ss as tc,En as uc,gh as vc,Zr as wc,kF as xc,Ul as yc,nC as zc,wZ as Ac,CZ as Bc,bZ as Cc,ZZ as Dc,de as Ec,Z as Fc,$ as Gc,X as Hc,ge as Ic,tb as Jc,eK as Kc,tK as Lc,je as Mc,ht as Nc,rK as Oc,Bs as Pc,oK as Qc,sK as Rc,dK as Sc,RC as Tc,Hs as Uc,DK as Vc,wK as Wc,CK as Xc,bK as Yc,EK as Zc,IK as _c,_K as $c,SK as ad,OK as bd,FK as cd,xn as dd,cL as ed,wb as fd,cr as gd,cb as hd,JK as id,XK as jd,RL as kd,tY as ld,PL as md,nY as nd,kL as od,UL as pd,$L as qd,zL as rd,qL as sd,Bb as td,rY as ud,oY as vd,JL as wd,ek as xd,nk as yd,iY as zd,sY as Ad,aY as Bd,Sk as Cd,dg as Dd,BB as Ed,A$ as Fd,NH as Gd,OH as Hd,$j as Id,PH as Jd,jH as Kd,zH as Ld,Xie as Md,na as Nd,ax as Od,cse as Pd,dse as Qd,hse as Rd}; diff --git a/public/apps/webapp-schulverwaltung/chunk-33HDDU2F.js b/public/apps/webapp-schulverwaltung/chunk-33HDDU2F.js deleted file mode 100644 index f6e9d625..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-33HDDU2F.js +++ /dev/null @@ -1 +0,0 @@ -import{b as a,c as b}from"./chunk-LEK2XGQE.js";import"./chunk-K4773ZNS.js";import"./chunk-ZGDP3BAB.js";import"./chunk-4CSFXSJN.js";import"./chunk-SP6SA4GZ.js";import"./chunk-NOKI2UHM.js";import"./chunk-U5XSAHDS.js";import"./chunk-4GQ5KKE3.js";import"./chunk-HAKJPBT5.js";import"./chunk-HAMVO7SX.js";import"./chunk-Y4QYVF5K.js";import"./chunk-UVJXXYOR.js";import"./chunk-FFBZO25J.js";import"./chunk-SVCHNGNX.js";import"./chunk-UFRLS5GG.js";import"./chunk-DZUR7EKU.js";import"./chunk-FLVW3H6P.js";import"./chunk-2UDOWYE6.js";import"./chunk-EDO6DY2V.js";import"./chunk-PQGQXFEQ.js";import"./chunk-UPZQ4FTT.js";import"./chunk-5NJNJ42P.js";import"./chunk-JHVNIEZK.js";import"./chunk-LTVWFE76.js";import"./chunk-34ZOBT6Z.js";export{b as EVENTS_ROUTES,a as getStudentsRoute}; diff --git a/public/apps/webapp-schulverwaltung/chunk-SP6SA4GZ.js b/public/apps/webapp-schulverwaltung/chunk-3HCVMNJA.js similarity index 93% rename from public/apps/webapp-schulverwaltung/chunk-SP6SA4GZ.js rename to public/apps/webapp-schulverwaltung/chunk-3HCVMNJA.js index 10ee3abe..a44b8a20 100644 --- a/public/apps/webapp-schulverwaltung/chunk-SP6SA4GZ.js +++ b/public/apps/webapp-schulverwaltung/chunk-3HCVMNJA.js @@ -1 +1 @@ -import{a as we,b as Ee,c as je,d as Ve,e as Me}from"./chunk-NOKI2UHM.js";import{t as R,w as Fe}from"./chunk-U5XSAHDS.js";import{d as $e,e as Te}from"./chunk-HAKJPBT5.js";import{b as te}from"./chunk-DZUR7EKU.js";import{a as Be}from"./chunk-FLVW3H6P.js";import{L as Ie,P as Z,T as Le,U as Re}from"./chunk-EDO6DY2V.js";import{a as Pe}from"./chunk-UPZQ4FTT.js";import{b as ee}from"./chunk-5NJNJ42P.js";import{c as Y,d as z,e as J,f as K,g as X}from"./chunk-JHVNIEZK.js";import{a as ke}from"./chunk-LTVWFE76.js";import{$a as b,Ab as y,Bb as v,Cb as W,Db as re,Eb as ae,Fa as I,Ib as d,Jb as m,Kb as ve,L as me,M as ue,Ma as c,Nd as De,O as oe,Od as M,P as E,Pa as p,Qa as fe,R as U,Ua as _,Va as _e,X as Q,Xa as N,Ya as O,Za as r,_ as L,_a as a,a as j,b as V,bc as w,bd as Ae,cc as Ce,da as k,db as F,ea as D,f as q,fb as $,g as ce,gb as l,h as se,hb as be,ib as he,k as de,l as pe,n as P,o as le,pb as h,qb as u,rb as H,sb as f,vc as xe,wa as n,wc as ge,xa as x,yc as ye,zb as g,zc as Se}from"./chunk-34ZOBT6Z.js";var ie=(()=>{class e{constructor(t,i,s,C,B){this.settings=t,this.lessonPresencesService=i,this.presenceTypesService=s,this.toastService=C,this.translate=B,this.studentId$=new se(1),this.checkableAbsences$=this.getAbsences(this.loadCheckableAbsences.bind(this)),this.openAbsences$=this.getAbsences(this.loadOpenAbsences.bind(this)),this.excusedAbsences$=this.getAbsences(this.loadExcusedAbsences.bind(this)),this.unexcusedAbsences$=this.getAbsences(this.loadUnexcusedAbsences.bind(this)),this.incidents$=this.getAbsences(this.loadIncidents.bind(this)),this.halfDays$=this.getAbsences(this.loadHalfDays.bind(this)),this.counts$=this.getCounts()}setStudentId(t){this.studentId$.next(t)}getAbsences(t){return this.studentId$.pipe(E(t),oe(null),me({connector:()=>new se(1)}))}getCounts(){return this.studentId$.pipe(E(t=>le([this.loadStatistics(t).pipe(oe(null)),this.openAbsences$.pipe(P(i=>i?.length??null)),this.checkableAbsences$.pipe(P(i=>i?.length??null))])),P(([t,i,s])=>({openAbsences:i,checkableAbsences:s,excusedAbsences:t?.TotalAbsencesValidExcuse??null,unexcusedAbsences:t?.TotalAbsencesWithoutExcuse??null,incidents:t?.TotalIncidents??null,halfDays:t?.TotalHalfDays??null})))}loadStatistics(t){return this.lessonPresencesService.getStatistics({student:t,educationalEvent:null,studyClass:null},null,0).pipe(E(({entries:i})=>i.length>0?pe(i[0]):(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),de)))}loadOpenAbsences(t){return this.lessonPresencesService.getListOfUnconfirmed(this.getBaseParams(t))}loadCheckableAbsences(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.checkableAbsenceStateId}`})})}loadExcusedAbsences(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.excusedAbsenceStateId}`})})}loadUnexcusedAbsences(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.unexcusedAbsenceStateId}`})})}loadIncidents(t){return this.presenceTypesService.incidentTypes$.pipe(P(i=>V(j({},this.getBaseParams(t)),{"filter.TypeRef":`;${i.map(s=>s.Id).join(";")}`})),E(i=>this.lessonPresencesService.getList({params:i})))}loadHalfDays(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.TypeRef":`=${this.settings.halfDayPresenceTypeId}`})})}getBaseParams(t){return{sort:"LessonDateTimeFrom.asc","filter.StudentRef":`=${t}`}}static{this.\u0275fac=function(i){return new(i||e)(L(Ae),L(Te),L(Z),L(ke),L(De))}}static{this.\u0275prov=Q({token:e,factory:e.\u0275fac})}}return e})();var T=(()=>{class e{constructor(t,i){this.profileService=t,this.route=i,this.currentDossier$=new ce("addresses"),this.studentId$=this.route.paramMap.pipe(P(s=>Number(s.get("id")))),this.profile$=this.studentId$.pipe(E(s=>this.profileService.getProfile(s)),ue(1)),this.returnParams$=this.route.queryParams.pipe(P(({returnparams:s})=>s)),this.backlinkQueryParams$=this.returnParams$.pipe(P(Be)),this.loading$=this.profileService.loading$}static{this.\u0275fac=function(i){return new(i||e)(L(we),L(xe))}}static{this.\u0275prov=Q({token:e,factory:e.\u0275fac})}}return e})();function ze(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.checkableAbsences,") ")}}function Je(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.checkableAbsences$)}}function Ke(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.openAbsences,") ")}}function Xe(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",14),e&2){let t=l();p("absences$",t.absencesService.openAbsences$)("selectionService",t.absencesSelectionService)}}function Ze(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.excusedAbsences,") ")}}function et(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.excusedAbsences$)}}function tt(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.unexcusedAbsences,") ")}}function it(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let t=l();p("absences$",t.absencesService.unexcusedAbsences$)("displayPresenceType",!1)}}function nt(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.incidents,") ")}}function st(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.incidents$)}}function ot(e,o){if(e&1&&u(0),e&2){l(2);let t=v(0);f(" (",t==null?null:t.halfDays,") ")}}function rt(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let t=l(2);p("absences$",t.absencesService.halfDays$)("displayPresenceType",!1)}}function at(e,o){if(e&1){let t=F();r(0,"div",12,5)(2,"div",8)(3,"bkd-student-dossier-entry-header",9),$("click",function(){k(t);let s=h(1);return D(s.toggle())}),u(4),d(5,"translate"),c(6,ot,1,1),a()(),r(7,"div",10)(8,"div",11),c(9,rt,1,2,"ng-template"),a()()()}if(e&2){let t=h(1);l();let i=v(0);n(3),p("opened",!t.collapsed),n(),f(" ",m(5,3,"shared.profile.half-days")," "),n(2),_((i==null?null:i.halfDays)!==null?6:-1)}}var Ge=(()=>{class e{constructor(t,i,s,C){this.state=t,this.presenceTypesService=i,this.absencesService=s,this.absencesSelectionService=C,this.halfDayActive$=this.presenceTypesService.halfDayActive$,this.destroy$=new q,this.state.currentDossier$.next("absences")}ngOnInit(){this.state.studentId$.pipe(U(this.destroy$)).subscribe(t=>this.absencesService.setStudentId(t))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(i){return new(i||e)(x(T),x(Z),x(ie),x(Ie))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-dossier-absences"]],features:[W([ie])],decls:55,vars:31,consts:[["checkableAbsences","ngbAccordionItem"],["openAbsences","ngbAccordionItem"],["excusedAbsences","ngbAccordionItem"],["unexcusedAbsences","ngbAccordionItem"],["incidents","ngbAccordionItem"],["halfDays","ngbAccordionItem"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],["ngbAccordionItem","","id","half-days"],[3,"absences$"],[3,"absences$","selectionService"],[3,"absences$","displayPresenceType"]],template:function(i,s){if(i&1){let C=F();g(0),d(1,"async"),r(2,"div",6)(3,"div",7,0)(5,"div",8)(6,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(4);return D(S.toggle())}),u(7),d(8,"translate"),c(9,ze,1,1),a()(),r(10,"div",10)(11,"div",11),c(12,Je,1,1,"ng-template"),a()()(),r(13,"div",7,1)(15,"div",8)(16,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(14);return D(S.toggle())}),u(17),d(18,"translate"),c(19,Ke,1,1),a()(),r(20,"div",10)(21,"div",11),c(22,Xe,1,2,"ng-template"),a()()(),r(23,"div",7,2)(25,"div",8)(26,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(24);return D(S.toggle())}),u(27),d(28,"translate"),c(29,Ze,1,1),a()(),r(30,"div",10)(31,"div",11),c(32,et,1,1,"ng-template"),a()()(),r(33,"div",7,3)(35,"div",8)(36,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(34);return D(S.toggle())}),u(37),d(38,"translate"),c(39,tt,1,1),a()(),r(40,"div",10)(41,"div",11),c(42,it,1,2,"ng-template"),a()()(),r(43,"div",7,4)(45,"div",8)(46,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(44);return D(S.toggle())}),u(47),d(48,"translate"),c(49,nt,1,1),a()(),r(50,"div",10)(51,"div",11),c(52,st,1,1,"ng-template"),a()()(),c(53,at,10,5,"div",12),d(54,"async"),a()}if(i&2){let C=h(4),B=h(14),S=h(24),Ue=h(34),Qe=h(44),A=y(m(1,16,s.absencesService.counts$));n(6),p("opened",!C.collapsed),n(),f(" ",m(8,19,"shared.profile.checkable-absences")," "),n(2),_((A==null?null:A.checkableAbsences)!==null?9:-1),n(7),p("opened",!B.collapsed),n(),f(" ",m(18,21,"shared.profile.open-absences")," "),n(2),_((A==null?null:A.openAbsences)!==null?19:-1),n(7),p("opened",!S.collapsed),n(),f(" ",m(28,23,"shared.profile.excused-absences")," "),n(2),_((A==null?null:A.excusedAbsences)!==null?29:-1),n(7),p("opened",!Ue.collapsed),n(),f(" ",m(38,25,"shared.profile.unexcused-absences")," "),n(2),_((A==null?null:A.unexcusedAbsences)!==null?39:-1),n(7),p("opened",!Qe.collapsed),n(),f(" ",m(48,27,"shared.profile.incidents")," "),n(2),_((A==null?null:A.incidents)!==null?49:-1),n(4),_(m(54,29,s.halfDayActive$)?53:-1)}},dependencies:[X,K,J,te,z,Y,Le,w,M],encapsulation:2,changeDetection:0})}}return e})();var ct=(e,o)=>o.apprenticeshipContract.Id,dt=(e,o)=>o.Id;function pt(e,o){if(e&1&&b(0,"bkd-student-dossier-legal-representative",9),e&2){let t=o.$implicit;p("person",t)}}function lt(e,o){if(e&1&&N(0,pt,1,1,"bkd-student-dossier-legal-representative",9,dt),e&2){l(3);let t=v(0);O(t.legalRepresentativePersons)}}function mt(e,o){if(e&1){let t=F();r(0,"div",4,0)(2,"div",5)(3,"bkd-student-dossier-entry-header",6),$("click",function(){k(t);let s=h(1);return D(s.toggle())}),u(4),d(5,"translate"),a()(),r(6,"div",7)(7,"div",8),c(8,lt,2,0,"ng-template"),a()()()}if(e&2){let t=h(1);n(3),p("opened",!t.collapsed),n(),f(" ",m(5,2,"shared.profile.legal-representation")," ")}}function ut(e,o){if(e&1&&u(0),e&2){let t=l().$index;f(" ",t+1," ")}}function ft(e,o){if(e&1&&b(0,"bkd-student-dossier-apprenticeship-company",10),e&2){let t=l().$implicit;p("company",t)}}function _t(e,o){if(e&1){let t=F();r(0,"div",4,1)(2,"div",5)(3,"bkd-student-dossier-entry-header",6),$("click",function(){k(t);let s=h(1);return D(s.toggle())}),u(4),d(5,"translate"),c(6,ut,1,1),a()(),r(7,"div",7)(8,"div",8),c(9,ft,1,1,"ng-template"),a()()()}if(e&2){let t=h(1);l(2);let i=v(0);n(3),p("opened",!t.collapsed),n(),f(" ",m(5,3,"shared.profile.apprenticeship-company")," "),n(2),_(i.apprenticeshipCompanies.length>1?6:-1)}}function bt(e,o){if(e&1&&(b(0,"bkd-student-dossier-address",2),r(1,"div",3),c(2,mt,9,4,"div",4),N(3,_t,10,5,"div",4,ct),a()),e&2){l();let t=v(0);p("student",t.student),n(2),_(t.legalRepresentativePersons.length>0?2:-1),n(),O(t.apprenticeshipCompanies)}}var Ne=(()=>{class e{constructor(t){this.state=t,this.state.currentDossier$.next("addresses")}static{this.\u0275fac=function(i){return new(i||e)(x(T))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-dossier-addresses"]],decls:3,vars:4,consts:[["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],[1,"profile-entry",3,"student"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[1,"profile-entry",3,"person"],[1,"profile-entry",3,"company"]],template:function(i,s){if(i&1&&(g(0),d(1,"async"),c(2,bt,5,2)),i&2){let C=y(m(1,1,s.state.profile$));n(2),_(C?2:-1)}},dependencies:[Ee,X,K,J,te,z,Y,Ve,je,w,M],styles:[".profile-entry[_ngcontent-%COMP%]{display:block;padding:0 1rem}"],changeDetection:0})}}return e})();function vt(e,o){e&1&&b(0,"bkd-spinner")}function Ct(e,o){if(e&1&&b(0,"bkd-dossier-grades-view",0),e&2){l();let t=v(0),i=v(2),s=v(4);p("courses",t)("studentId",i)("gradingScales",s)}}var Oe=(()=>{class e{constructor(t,i){this.state=t,this.dossierGradesService=i,this.destroy$=new q}ngOnInit(){this.state.currentDossier$.next("grades"),this.state.studentId$.pipe(U(this.destroy$)).subscribe(t=>this.dossierGradesService.setStudentId(t))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(i){return new(i||e)(x(T),x(R))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-dossier-grades"]],decls:9,vars:12,consts:[[3,"courses","studentId","gradingScales"]],template:function(i,s){i&1&&(g(0),d(1,"async"),g(2),d(3,"async"),g(4),d(5,"async"),c(6,vt,1,0,"bkd-spinner"),d(7,"async"),c(8,Ct,1,3,"bkd-dossier-grades-view",0)),i&2&&(y(m(1,1,s.dossierGradesService.studentCourses$)),n(2),y(m(3,4,s.state.studentId$)),n(2),y(m(5,7,s.dossierGradesService.gradingScales$)),n(2),_(m(7,10,s.dossierGradesService.loading$)?6:8))},dependencies:[Fe,ee,w],encapsulation:2})}}return e})();var xt=["*"];function gt(e,o){if(e&1&&(r(0,"div",5)(1,"span",6),u(2),d(3,"date"),a(),r(4,"span",7),u(5),a()()),e&2){let t=l();n(2),H(ve(3,2,t.student.Birthdate,"dd.MM.yyyy")),n(3),f("(",t.student.Gender,")")}}var He=(()=>{class e{constructor(){this.link="/"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-student-backlink"]],inputs:{link:"link",queryParams:"queryParams",studentId:"studentId",studentName:"studentName",student:"student"},ngContentSelectors:xt,decls:9,vars:5,consts:[[1,"d-flex","flex-column","w-100"],[3,"link","params"],[1,"d-flex","flex-row","align-items-start"],[1,"me-3","medium",3,"studentId"],[1,"d-flex","flex-column"],[1,"additional-info"],[1,"birthday"],[1,"gender"]],template:function(i,s){i&1&&(be(),r(0,"div",0)(1,"bkd-backlink",1),he(2),a(),r(3,"div",2),b(4,"bkd-avatar",3),r(5,"div",4)(6,"h1"),u(7),a(),c(8,gt,6,5,"div",5),a()()()),i&2&&(n(),p("link",s.link)("params",s.queryParams),n(3),p("studentId",s.studentId),n(3),H(s.student?s.student.FullName:s.studentName),n(),_(s.student?8:-1))},dependencies:[Re,Me,Ce],styles:["[_nghost-%COMP%]{display:flex;align-items:center;width:100%}h1[_ngcontent-%COMP%]{margin:-3px 0 0;display:flex;align-items:baseline;line-height:1}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}.gender[_ngcontent-%COMP%]{margin-left:.8ch}"],changeDetection:0})}}return e})();var yt=()=>["addresses","absences","grades"],St=()=>[],At=e=>({returnparams:e}),kt=e=>[e];function Dt(e,o){e&1&&b(0,"bkd-spinner")}function It(e,o){if(e&1&&b(0,"bkd-reports-link",3),e&2){let t;l(2);let i=v(4);p("reports",(t=i)!==null&&t!==void 0?t:re(1,St))}}function $t(e,o){if(e&1&&(r(0,"a",5),d(1,"async"),r(2,"button",6,0),u(4),d(5,"translate"),a()()),e&2){let t=o.$implicit,i=h(3),s=l(2);p("queryParams",ae(9,At,m(1,5,s.state.returnParams$)))("routerLink",ae(11,kt,t)),n(2),fe("btn-outline-secondary",!i.isActive),n(2),f(" ",m(5,7,"dossier."+t)," ")}}function Tt(e,o){e&1&&(r(0,"div"),b(1,"router-outlet"),a())}function Pt(e,o){e&1&&(r(0,"p"),u(1),d(2,"translate"),a()),e&2&&(n(),H(m(2,1,"shared.profile.no-profile")))}function Lt(e,o){if(e&1&&(r(0,"bkd-student-backlink",2),d(1,"async"),d(2,"async"),c(3,It,1,2,"bkd-reports-link",3),a(),r(4,"div",4),N(5,$t,6,13,"a",5,_e),a(),c(7,Tt,2,0,"div")(8,Pt,3,3,"p")),e&2){let t=l(),i=v(0),s=v(2);p("link","../..")("queryParams",m(1,6,t.state.backlinkQueryParams$))("studentId",m(2,8,t.state.studentId$))("student",i&&i.student),n(3),_(s==="grades"?3:-1),n(2),O(re(10,yt)),n(2),_(i?7:8)}}var qe=(()=>{class e{constructor(t,i){this.state=t,this.dossierGradesService=i,this.state.currentDossier$.next("addresses")}static{this.\u0275fac=function(i){return new(i||e)(x(T),x(R))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-student-dossier"]],features:[W([T,R])],decls:10,vars:12,consts:[["rla","routerLinkActive"],[1,"bkd-container","bkd-container-limited"],[1,"mb-2",3,"link","queryParams","studentId","student"],[1,"ms-2",3,"reports"],[1,"d-flex","flex-row","py-3","flex-wrap"],[1,"me-1","mt-1","me-sm-2",3,"queryParams","routerLink"],["data-test-id","dossier-section-button","type","button","routerLinkActive","btn-primary",1,"btn","btn-outline-secondary"]],template:function(i,s){i&1&&(g(0),d(1,"async"),g(2),d(3,"async"),g(4),d(5,"async"),r(6,"div",1),c(7,Dt,1,0,"bkd-spinner"),d(8,"async"),c(9,Lt,9,11),a()),i&2&&(y(m(1,1,s.state.profile$)),n(2),y(m(3,4,s.state.currentDossier$)),n(2),y(m(5,7,s.dossierGradesService.testReports$)),n(3),_(m(8,10,s.state.loading$)?7:9))},dependencies:[He,Pe,ye,Se,ge,ee,w,M],encapsulation:2,changeDetection:0})}}return e})();var Li={path:"student/:id",children:[{path:"",component:qe,children:[{path:"addresses",component:Ne},{path:"absences",component:Ge},{path:"grades",component:Oe}]},{path:"absences/confirm",component:$e}]};export{Li as a}; +import{a as we,b as Ee,c as je,d as Ve,e as Me}from"./chunk-5WNFCBTP.js";import{t as R,w as Fe}from"./chunk-A3CECLYB.js";import{d as $e,e as Te}from"./chunk-746ASKQ4.js";import{b as te}from"./chunk-3L4RH6QP.js";import{a as Be}from"./chunk-DTYYCJHM.js";import{L as Ie,P as Z,T as Le,U as Re}from"./chunk-SRCW6BUG.js";import{a as Pe}from"./chunk-OSOXMODN.js";import{b as ee}from"./chunk-PSYDBHTH.js";import{c as Y,d as z,e as J,f as K,g as X}from"./chunk-W4U7QKJF.js";import{a as ke}from"./chunk-AVBHFGIF.js";import{$a as a,Ab as g,Ac as Se,Bb as y,Cb as v,Db as W,Eb as re,Fb as ae,Ga as I,Jb as d,Kb as m,L as me,Lb as ve,M as ue,Na as c,O as oe,Od as De,P as E,Pd as M,Qa as p,R as U,Ra as fe,Va as _,Wa as _e,X as Q,Ya as N,Za as O,_ as L,_a as r,a as j,ab as b,b as V,cc as w,cd as Ae,dc as Ce,ea as k,eb as F,f as q,fa as D,g as ce,gb as $,h as se,hb as l,ib as be,jb as he,k as de,l as pe,n as P,o as le,qb as h,rb as u,sb as H,tb as f,wc as xe,xa as n,xc as ge,ya as x,zc as ye}from"./chunk-2W7IS4PN.js";var ie=(()=>{class e{constructor(t,i,s,C,B){this.settings=t,this.lessonPresencesService=i,this.presenceTypesService=s,this.toastService=C,this.translate=B,this.studentId$=new se(1),this.checkableAbsences$=this.getAbsences(this.loadCheckableAbsences.bind(this)),this.openAbsences$=this.getAbsences(this.loadOpenAbsences.bind(this)),this.excusedAbsences$=this.getAbsences(this.loadExcusedAbsences.bind(this)),this.unexcusedAbsences$=this.getAbsences(this.loadUnexcusedAbsences.bind(this)),this.incidents$=this.getAbsences(this.loadIncidents.bind(this)),this.halfDays$=this.getAbsences(this.loadHalfDays.bind(this)),this.counts$=this.getCounts()}setStudentId(t){this.studentId$.next(t)}getAbsences(t){return this.studentId$.pipe(E(t),oe(null),me({connector:()=>new se(1)}))}getCounts(){return this.studentId$.pipe(E(t=>le([this.loadStatistics(t).pipe(oe(null)),this.openAbsences$.pipe(P(i=>i?.length??null)),this.checkableAbsences$.pipe(P(i=>i?.length??null))])),P(([t,i,s])=>({openAbsences:i,checkableAbsences:s,excusedAbsences:t?.TotalAbsencesValidExcuse??null,unexcusedAbsences:t?.TotalAbsencesWithoutExcuse??null,incidents:t?.TotalIncidents??null,halfDays:t?.TotalHalfDays??null})))}loadStatistics(t){return this.lessonPresencesService.getStatistics({student:t,educationalEvent:null,studyClass:null},null,0).pipe(E(({entries:i})=>i.length>0?pe(i[0]):(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),de)))}loadOpenAbsences(t){return this.lessonPresencesService.getListOfUnconfirmed(this.getBaseParams(t))}loadCheckableAbsences(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.checkableAbsenceStateId}`})})}loadExcusedAbsences(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.excusedAbsenceStateId}`})})}loadUnexcusedAbsences(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.ConfirmationStateId":`=${this.settings.unexcusedAbsenceStateId}`})})}loadIncidents(t){return this.presenceTypesService.incidentTypes$.pipe(P(i=>V(j({},this.getBaseParams(t)),{"filter.TypeRef":`;${i.map(s=>s.Id).join(";")}`})),E(i=>this.lessonPresencesService.getList({params:i})))}loadHalfDays(t){return this.lessonPresencesService.getList({params:V(j({},this.getBaseParams(t)),{"filter.TypeRef":`=${this.settings.halfDayPresenceTypeId}`})})}getBaseParams(t){return{sort:"LessonDateTimeFrom.asc","filter.StudentRef":`=${t}`}}static{this.\u0275fac=function(i){return new(i||e)(L(Ae),L(Te),L(Z),L(ke),L(De))}}static{this.\u0275prov=Q({token:e,factory:e.\u0275fac})}}return e})();var T=(()=>{class e{constructor(t,i){this.profileService=t,this.route=i,this.currentDossier$=new ce("addresses"),this.studentId$=this.route.paramMap.pipe(P(s=>Number(s.get("id")))),this.profile$=this.studentId$.pipe(E(s=>this.profileService.getProfile(s)),ue(1)),this.returnParams$=this.route.queryParams.pipe(P(({returnparams:s})=>s)),this.backlinkQueryParams$=this.returnParams$.pipe(P(Be)),this.loading$=this.profileService.loading$}static{this.\u0275fac=function(i){return new(i||e)(L(we),L(xe))}}static{this.\u0275prov=Q({token:e,factory:e.\u0275fac})}}return e})();function ze(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.checkableAbsences,") ")}}function Je(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.checkableAbsences$)}}function Ke(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.openAbsences,") ")}}function Xe(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",14),e&2){let t=l();p("absences$",t.absencesService.openAbsences$)("selectionService",t.absencesSelectionService)}}function Ze(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.excusedAbsences,") ")}}function et(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.excusedAbsences$)}}function tt(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.unexcusedAbsences,") ")}}function it(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let t=l();p("absences$",t.absencesService.unexcusedAbsences$)("displayPresenceType",!1)}}function nt(e,o){if(e&1&&u(0),e&2){l();let t=v(0);f(" (",t==null?null:t.incidents,") ")}}function st(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",13),e&2){let t=l();p("absences$",t.absencesService.incidents$)}}function ot(e,o){if(e&1&&u(0),e&2){l(2);let t=v(0);f(" (",t==null?null:t.halfDays,") ")}}function rt(e,o){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let t=l(2);p("absences$",t.absencesService.halfDays$)("displayPresenceType",!1)}}function at(e,o){if(e&1){let t=F();r(0,"div",12,5)(2,"div",8)(3,"bkd-student-dossier-entry-header",9),$("click",function(){k(t);let s=h(1);return D(s.toggle())}),u(4),d(5,"translate"),c(6,ot,1,1),a()(),r(7,"div",10)(8,"div",11),c(9,rt,1,2,"ng-template"),a()()()}if(e&2){let t=h(1);l();let i=v(0);n(3),p("opened",!t.collapsed),n(),f(" ",m(5,3,"shared.profile.half-days")," "),n(2),_((i==null?null:i.halfDays)!==null?6:-1)}}var Ge=(()=>{class e{constructor(t,i,s,C){this.state=t,this.presenceTypesService=i,this.absencesService=s,this.absencesSelectionService=C,this.halfDayActive$=this.presenceTypesService.halfDayActive$,this.destroy$=new q,this.state.currentDossier$.next("absences")}ngOnInit(){this.state.studentId$.pipe(U(this.destroy$)).subscribe(t=>this.absencesService.setStudentId(t))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(i){return new(i||e)(x(T),x(Z),x(ie),x(Ie))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-dossier-absences"]],features:[W([ie])],decls:55,vars:31,consts:[["checkableAbsences","ngbAccordionItem"],["openAbsences","ngbAccordionItem"],["excusedAbsences","ngbAccordionItem"],["unexcusedAbsences","ngbAccordionItem"],["incidents","ngbAccordionItem"],["halfDays","ngbAccordionItem"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],["ngbAccordionItem","","id","half-days"],[3,"absences$"],[3,"absences$","selectionService"],[3,"absences$","displayPresenceType"]],template:function(i,s){if(i&1){let C=F();g(0),d(1,"async"),r(2,"div",6)(3,"div",7,0)(5,"div",8)(6,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(4);return D(S.toggle())}),u(7),d(8,"translate"),c(9,ze,1,1),a()(),r(10,"div",10)(11,"div",11),c(12,Je,1,1,"ng-template"),a()()(),r(13,"div",7,1)(15,"div",8)(16,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(14);return D(S.toggle())}),u(17),d(18,"translate"),c(19,Ke,1,1),a()(),r(20,"div",10)(21,"div",11),c(22,Xe,1,2,"ng-template"),a()()(),r(23,"div",7,2)(25,"div",8)(26,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(24);return D(S.toggle())}),u(27),d(28,"translate"),c(29,Ze,1,1),a()(),r(30,"div",10)(31,"div",11),c(32,et,1,1,"ng-template"),a()()(),r(33,"div",7,3)(35,"div",8)(36,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(34);return D(S.toggle())}),u(37),d(38,"translate"),c(39,tt,1,1),a()(),r(40,"div",10)(41,"div",11),c(42,it,1,2,"ng-template"),a()()(),r(43,"div",7,4)(45,"div",8)(46,"bkd-student-dossier-entry-header",9),$("click",function(){k(C);let S=h(44);return D(S.toggle())}),u(47),d(48,"translate"),c(49,nt,1,1),a()(),r(50,"div",10)(51,"div",11),c(52,st,1,1,"ng-template"),a()()(),c(53,at,10,5,"div",12),d(54,"async"),a()}if(i&2){let C=h(4),B=h(14),S=h(24),Ue=h(34),Qe=h(44),A=y(m(1,16,s.absencesService.counts$));n(6),p("opened",!C.collapsed),n(),f(" ",m(8,19,"shared.profile.checkable-absences")," "),n(2),_((A==null?null:A.checkableAbsences)!==null?9:-1),n(7),p("opened",!B.collapsed),n(),f(" ",m(18,21,"shared.profile.open-absences")," "),n(2),_((A==null?null:A.openAbsences)!==null?19:-1),n(7),p("opened",!S.collapsed),n(),f(" ",m(28,23,"shared.profile.excused-absences")," "),n(2),_((A==null?null:A.excusedAbsences)!==null?29:-1),n(7),p("opened",!Ue.collapsed),n(),f(" ",m(38,25,"shared.profile.unexcused-absences")," "),n(2),_((A==null?null:A.unexcusedAbsences)!==null?39:-1),n(7),p("opened",!Qe.collapsed),n(),f(" ",m(48,27,"shared.profile.incidents")," "),n(2),_((A==null?null:A.incidents)!==null?49:-1),n(4),_(m(54,29,s.halfDayActive$)?53:-1)}},dependencies:[X,K,J,te,z,Y,Le,w,M],encapsulation:2,changeDetection:0})}}return e})();var ct=(e,o)=>o.apprenticeshipContract.Id,dt=(e,o)=>o.Id;function pt(e,o){if(e&1&&b(0,"bkd-student-dossier-legal-representative",9),e&2){let t=o.$implicit;p("person",t)}}function lt(e,o){if(e&1&&N(0,pt,1,1,"bkd-student-dossier-legal-representative",9,dt),e&2){l(3);let t=v(0);O(t.legalRepresentativePersons)}}function mt(e,o){if(e&1){let t=F();r(0,"div",4,0)(2,"div",5)(3,"bkd-student-dossier-entry-header",6),$("click",function(){k(t);let s=h(1);return D(s.toggle())}),u(4),d(5,"translate"),a()(),r(6,"div",7)(7,"div",8),c(8,lt,2,0,"ng-template"),a()()()}if(e&2){let t=h(1);n(3),p("opened",!t.collapsed),n(),f(" ",m(5,2,"shared.profile.legal-representation")," ")}}function ut(e,o){if(e&1&&u(0),e&2){let t=l().$index;f(" ",t+1," ")}}function ft(e,o){if(e&1&&b(0,"bkd-student-dossier-apprenticeship-company",10),e&2){let t=l().$implicit;p("company",t)}}function _t(e,o){if(e&1){let t=F();r(0,"div",4,1)(2,"div",5)(3,"bkd-student-dossier-entry-header",6),$("click",function(){k(t);let s=h(1);return D(s.toggle())}),u(4),d(5,"translate"),c(6,ut,1,1),a()(),r(7,"div",7)(8,"div",8),c(9,ft,1,1,"ng-template"),a()()()}if(e&2){let t=h(1);l(2);let i=v(0);n(3),p("opened",!t.collapsed),n(),f(" ",m(5,3,"shared.profile.apprenticeship-company")," "),n(2),_(i.apprenticeshipCompanies.length>1?6:-1)}}function bt(e,o){if(e&1&&(b(0,"bkd-student-dossier-address",2),r(1,"div",3),c(2,mt,9,4,"div",4),N(3,_t,10,5,"div",4,ct),a()),e&2){l();let t=v(0);p("student",t.student),n(2),_(t.legalRepresentativePersons.length>0?2:-1),n(),O(t.apprenticeshipCompanies)}}var Ne=(()=>{class e{constructor(t){this.state=t,this.state.currentDossier$.next("addresses")}static{this.\u0275fac=function(i){return new(i||e)(x(T))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-dossier-addresses"]],decls:3,vars:4,consts:[["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],[1,"profile-entry",3,"student"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[1,"profile-entry",3,"person"],[1,"profile-entry",3,"company"]],template:function(i,s){if(i&1&&(g(0),d(1,"async"),c(2,bt,5,2)),i&2){let C=y(m(1,1,s.state.profile$));n(2),_(C?2:-1)}},dependencies:[Ee,X,K,J,te,z,Y,Ve,je,w,M],styles:[".profile-entry[_ngcontent-%COMP%]{display:block;padding:0 1rem}"],changeDetection:0})}}return e})();function vt(e,o){e&1&&b(0,"bkd-spinner")}function Ct(e,o){if(e&1&&b(0,"bkd-dossier-grades-view",0),e&2){l();let t=v(0),i=v(2),s=v(4);p("courses",t)("studentId",i)("gradingScales",s)}}var Oe=(()=>{class e{constructor(t,i){this.state=t,this.dossierGradesService=i,this.destroy$=new q}ngOnInit(){this.state.currentDossier$.next("grades"),this.state.studentId$.pipe(U(this.destroy$)).subscribe(t=>this.dossierGradesService.setStudentId(t))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(i){return new(i||e)(x(T),x(R))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-dossier-grades"]],decls:9,vars:12,consts:[[3,"courses","studentId","gradingScales"]],template:function(i,s){i&1&&(g(0),d(1,"async"),g(2),d(3,"async"),g(4),d(5,"async"),c(6,vt,1,0,"bkd-spinner"),d(7,"async"),c(8,Ct,1,3,"bkd-dossier-grades-view",0)),i&2&&(y(m(1,1,s.dossierGradesService.studentCourses$)),n(2),y(m(3,4,s.state.studentId$)),n(2),y(m(5,7,s.dossierGradesService.gradingScales$)),n(2),_(m(7,10,s.dossierGradesService.loading$)?6:8))},dependencies:[Fe,ee,w],encapsulation:2})}}return e})();var xt=["*"];function gt(e,o){if(e&1&&(r(0,"div",5)(1,"span",6),u(2),d(3,"date"),a(),r(4,"span",7),u(5),a()()),e&2){let t=l();n(2),H(ve(3,2,t.student.Birthdate,"dd.MM.yyyy")),n(3),f("(",t.student.Gender,")")}}var He=(()=>{class e{constructor(){this.link="/"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-student-backlink"]],inputs:{link:"link",queryParams:"queryParams",studentId:"studentId",studentName:"studentName",student:"student"},ngContentSelectors:xt,decls:9,vars:5,consts:[[1,"d-flex","flex-column","w-100"],[3,"link","params"],[1,"d-flex","flex-row","align-items-start"],[1,"me-3","medium",3,"studentId"],[1,"d-flex","flex-column"],[1,"additional-info"],[1,"birthday"],[1,"gender"]],template:function(i,s){i&1&&(be(),r(0,"div",0)(1,"bkd-backlink",1),he(2),a(),r(3,"div",2),b(4,"bkd-avatar",3),r(5,"div",4)(6,"h1"),u(7),a(),c(8,gt,6,5,"div",5),a()()()),i&2&&(n(),p("link",s.link)("params",s.queryParams),n(3),p("studentId",s.studentId),n(3),H(s.student?s.student.FullName:s.studentName),n(),_(s.student?8:-1))},dependencies:[Re,Me,Ce],styles:["[_nghost-%COMP%]{display:flex;align-items:center;width:100%}h1[_ngcontent-%COMP%]{margin:-3px 0 0;display:flex;align-items:baseline;line-height:1}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}.gender[_ngcontent-%COMP%]{margin-left:.8ch}"],changeDetection:0})}}return e})();var yt=()=>["addresses","absences","grades"],St=()=>[],At=e=>({returnparams:e}),kt=e=>[e];function Dt(e,o){e&1&&b(0,"bkd-spinner")}function It(e,o){if(e&1&&b(0,"bkd-reports-link",3),e&2){let t;l(2);let i=v(4);p("reports",(t=i)!==null&&t!==void 0?t:re(1,St))}}function $t(e,o){if(e&1&&(r(0,"a",5),d(1,"async"),r(2,"button",6,0),u(4),d(5,"translate"),a()()),e&2){let t=o.$implicit,i=h(3),s=l(2);p("queryParams",ae(9,At,m(1,5,s.state.returnParams$)))("routerLink",ae(11,kt,t)),n(2),fe("btn-outline-secondary",!i.isActive),n(2),f(" ",m(5,7,"dossier."+t)," ")}}function Tt(e,o){e&1&&(r(0,"div"),b(1,"router-outlet"),a())}function Pt(e,o){e&1&&(r(0,"p"),u(1),d(2,"translate"),a()),e&2&&(n(),H(m(2,1,"shared.profile.no-profile")))}function Lt(e,o){if(e&1&&(r(0,"bkd-student-backlink",2),d(1,"async"),d(2,"async"),c(3,It,1,2,"bkd-reports-link",3),a(),r(4,"div",4),N(5,$t,6,13,"a",5,_e),a(),c(7,Tt,2,0,"div")(8,Pt,3,3,"p")),e&2){let t=l(),i=v(0),s=v(2);p("link","../..")("queryParams",m(1,6,t.state.backlinkQueryParams$))("studentId",m(2,8,t.state.studentId$))("student",i&&i.student),n(3),_(s==="grades"?3:-1),n(2),O(re(10,yt)),n(2),_(i?7:8)}}var qe=(()=>{class e{constructor(t,i){this.state=t,this.dossierGradesService=i,this.state.currentDossier$.next("addresses")}static{this.\u0275fac=function(i){return new(i||e)(x(T),x(R))}}static{this.\u0275cmp=I({type:e,selectors:[["bkd-student-dossier"]],features:[W([T,R])],decls:10,vars:12,consts:[["rla","routerLinkActive"],[1,"bkd-container","bkd-container-limited"],[1,"mb-2",3,"link","queryParams","studentId","student"],[1,"ms-2",3,"reports"],[1,"d-flex","flex-row","py-3","flex-wrap"],[1,"me-1","mt-1","me-sm-2",3,"queryParams","routerLink"],["data-test-id","dossier-section-button","type","button","routerLinkActive","btn-primary",1,"btn","btn-outline-secondary"]],template:function(i,s){i&1&&(g(0),d(1,"async"),g(2),d(3,"async"),g(4),d(5,"async"),r(6,"div",1),c(7,Dt,1,0,"bkd-spinner"),d(8,"async"),c(9,Lt,9,11),a()),i&2&&(y(m(1,1,s.state.profile$)),n(2),y(m(3,4,s.state.currentDossier$)),n(2),y(m(5,7,s.dossierGradesService.testReports$)),n(3),_(m(8,10,s.state.loading$)?7:9))},dependencies:[He,Pe,ye,Se,ge,ee,w,M],encapsulation:2,changeDetection:0})}}return e})();var Li={path:"student/:id",children:[{path:"",component:qe,children:[{path:"addresses",component:Ne},{path:"absences",component:Ge},{path:"grades",component:Oe}]},{path:"absences/confirm",component:$e}]};export{Li as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-3K4NZPMP.js b/public/apps/webapp-schulverwaltung/chunk-3K4NZPMP.js new file mode 100644 index 00000000..69a87a6a --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-3K4NZPMP.js @@ -0,0 +1 @@ +import{b as a,c as b}from"./chunk-2FW5UFUO.js";import"./chunk-LHXVMKYN.js";import"./chunk-QB4DIFWS.js";import"./chunk-RTY26FN4.js";import"./chunk-3HCVMNJA.js";import"./chunk-5WNFCBTP.js";import"./chunk-A3CECLYB.js";import"./chunk-HCNFZOWE.js";import"./chunk-746ASKQ4.js";import"./chunk-DTTSX64G.js";import"./chunk-Y4QYVF5K.js";import"./chunk-AYQPMCNZ.js";import"./chunk-BIDSHCYH.js";import"./chunk-4RZQAAPF.js";import"./chunk-Z4YBXGVO.js";import"./chunk-3L4RH6QP.js";import"./chunk-DTYYCJHM.js";import"./chunk-XAZECV42.js";import"./chunk-SRCW6BUG.js";import"./chunk-GOGVGWFJ.js";import"./chunk-OSOXMODN.js";import"./chunk-PSYDBHTH.js";import"./chunk-W4U7QKJF.js";import"./chunk-AVBHFGIF.js";import"./chunk-2W7IS4PN.js";export{b as EVENTS_ROUTES,a as getStudentsRoute}; diff --git a/public/apps/webapp-schulverwaltung/chunk-DZUR7EKU.js b/public/apps/webapp-schulverwaltung/chunk-3L4RH6QP.js similarity index 92% rename from public/apps/webapp-schulverwaltung/chunk-DZUR7EKU.js rename to public/apps/webapp-schulverwaltung/chunk-3L4RH6QP.js index 5fb7c0b3..ebbc6d77 100644 --- a/public/apps/webapp-schulverwaltung/chunk-DZUR7EKU.js +++ b/public/apps/webapp-schulverwaltung/chunk-3L4RH6QP.js @@ -1 +1 @@ -import{$a as M,Bd as O,Fa as d,Fd as B,Gc as o,Hc as h,Jc as f,Kd as I,Lc as F,Mc as R,Oc as k,P as C,Pa as x,Qd as _,Tc as a,Uc as L,X as P,Za as u,Zc as w,_ as c,_a as g,a as b,b as y,bd as E,hb as j,ib as D,kc as $,l as A,n as v,o as S,qb as T,rb as U,wa as m}from"./chunk-34ZOBT6Z.js";var N=(()=>{class i{constructor(){this.expanded=!1}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=d({type:i,selectors:[["bkd-caret"]],inputs:{expanded:"expanded"},decls:2,vars:1,consts:[["role","button",1,"d-flex","material-icons"]],template:function(e,r){e&1&&(u(0,"i",0),T(1),g()),e&2&&(m(),U(r.expanded?"expand_less":"expand_more"))},styles:["i[_ngcontent-%COMP%]:hover{color:#ea161f}"]})}}return i})();var X=["*"],V=(()=>{class i{constructor(){this.opened=!1}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=d({type:i,selectors:[["bkd-student-dossier-entry-header"]],inputs:{opened:"opened"},ngContentSelectors:X,decls:3,vars:1,consts:[[1,"m-0"],[1,"d-flex","align-items-center",3,"expanded"]],template:function(e,r){e&1&&(j(),u(0,"h5",0),D(1),g(),M(2,"bkd-caret",1)),e&2&&(m(2),x("expanded",r.opened))},dependencies:[N],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-top:1px solid #dee2e6;cursor:pointer}button[_ngcontent-%COMP%]{color:#000;text-decoration:none}.btn-link[_ngcontent-%COMP%]:hover{text-decoration:none}"],changeDetection:0})}}return i})();var J=R({Id:h,Title:o}),z=a(F(J));var pt=(()=>{class i{constructor(t,e,r){this.settings=t,this.storageService=e,this.http=r}getPersonMasterDataReports(t){return this.getAvailableReports("Person",this.settings.personMasterDataReports,[t])}getStudentConfirmationReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.studentConfirmationReports,t)}getEvaluateAbsencesReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.evaluateAbsencesReports,t)}getMyAbsencesReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.myAbsencesReports,t)}getCourseTestsReports(t){return this.getAvailableReports("Anlass",this.settings.testsByCourseReports,[t])}getStudentSubscriptionGradesReports(t){return this.settings.testsBySubscriptionStudentReports.map((r,n)=>{let s=this.getReportUrl(r.type,"Anmeldung",r.id,t);return y(b({},r),{title:`Report ${n+1}`,url:s})})}getTeacherSubscriptionGradesReports(t){return this.settings.testsBySubscriptionTeacherReports.map((r,n)=>{let s=this.getReportUrl(r.type,"Anmeldung",r.id,t);return y(b({},r),{title:`Report ${n+1}`,url:s})})}getStudyClassStudentsReports(t){return this.getAvailableReports("Anlass",this.settings.studyClassStudentsReports,[t])}getCourseStudentsReports(t){return this.getAvailableReports("Anlass",this.settings.courseStudentsReports,[t])}getAvailableReports(t,e,r){let n=B(e,p=>p.type),s=S(Object.keys(n).map(p=>this.getAvailableReportsForType(p,t,n[p].map(({id:l})=>l),r)));return this.mergeAvailableReports(s,e)}getAvailableReportsForType(t,e,r,n){return n.length===0?A([]):this.http.get(this.getReportAvailabilityUrl(t,e,r,n)).pipe(C(I(z)),v(s=>s?s.map(({Id:p,Title:l})=>({type:t,id:p,title:l,url:this.getReportUrl(t,e,p,n)})):[]))}mergeAvailableReports(t,e){return t.pipe(v(r=>{let n=O(r);return e.reduce((s,p)=>{let l=n.find(({id:H})=>H===p.id);return l?[...s,l]:s},[])}))}getReportUrl(t,e,r,n){let s=new URL(`${this.settings.apiUrl}/Files/${this.getReportTypePathPart(t)}/${e}/${r}`);return s.searchParams.set("ids",n.join(",")),s.searchParams.set("token",this.storageService.getAccessToken()??""),s.toString()}getReportAvailabilityUrl(t,e,r,n){let s=new URL(`${this.settings.apiUrl}/${this.getReportTypePathPart(t)}/AvailableReports/${e}`);return s.searchParams.set("ids",Array.isArray(r)?r.join(","):String(r)),s.searchParams.set("keys",n.join(",")),s.toString()}getReportTypePathPart(t){return`${t[0].toUpperCase()+t.slice(1)}Reports`}static{this.\u0275fac=function(e){return new(e||i)(c(E),c(_),c($))}}static{this.\u0275prov=P({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var dt=R({Id:h,AddressLine1:a(o),AddressLine2:L(o),Birthdate:a(w),DisplayEmail:a(o),FirstName:o,FullName:o,Gender:k([f("M"),f("F"),f("X")]),LastName:o,Location:a(o),PhoneMobile:a(o),PhonePrivate:a(o),PostalCode:a(o)});export{N as a,V as b,dt as c,pt as d}; +import{$a as g,Cd as O,Ga as d,Gd as B,Hc as o,Ic as h,Kc as f,Ld as I,Mc as F,Nc as R,P as C,Pc as k,Qa as x,Rd as _,Uc as a,Vc as L,X as P,_ as c,_a as u,_c as w,a as b,ab as M,b as y,cd as E,ib as j,jb as D,l as A,lc as $,n as v,o as S,rb as T,sb as U,xa as m}from"./chunk-2W7IS4PN.js";var N=(()=>{class i{constructor(){this.expanded=!1}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=d({type:i,selectors:[["bkd-caret"]],inputs:{expanded:"expanded"},decls:2,vars:1,consts:[["role","button",1,"d-flex","material-icons"]],template:function(e,r){e&1&&(u(0,"i",0),T(1),g()),e&2&&(m(),U(r.expanded?"expand_less":"expand_more"))},styles:["i[_ngcontent-%COMP%]:hover{color:#ea161f}"]})}}return i})();var X=["*"],V=(()=>{class i{constructor(){this.opened=!1}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=d({type:i,selectors:[["bkd-student-dossier-entry-header"]],inputs:{opened:"opened"},ngContentSelectors:X,decls:3,vars:1,consts:[[1,"m-0"],[1,"d-flex","align-items-center",3,"expanded"]],template:function(e,r){e&1&&(j(),u(0,"h5",0),D(1),g(),M(2,"bkd-caret",1)),e&2&&(m(2),x("expanded",r.opened))},dependencies:[N],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-top:1px solid #dee2e6;cursor:pointer}button[_ngcontent-%COMP%]{color:#000;text-decoration:none}.btn-link[_ngcontent-%COMP%]:hover{text-decoration:none}"],changeDetection:0})}}return i})();var J=R({Id:h,Title:o}),z=a(F(J));var pt=(()=>{class i{constructor(t,e,r){this.settings=t,this.storageService=e,this.http=r}getPersonMasterDataReports(t){return this.getAvailableReports("Person",this.settings.personMasterDataReports,[t])}getStudentConfirmationReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.studentConfirmationReports,t)}getEvaluateAbsencesReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.evaluateAbsencesReports,t)}getMyAbsencesReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.myAbsencesReports,t)}getCourseTestsReports(t){return this.getAvailableReports("Anlass",this.settings.testsByCourseReports,[t])}getStudentSubscriptionGradesReports(t){return this.settings.testsBySubscriptionStudentReports.map((r,n)=>{let s=this.getReportUrl(r.type,"Anmeldung",r.id,t);return y(b({},r),{title:`Report ${n+1}`,url:s})})}getTeacherSubscriptionGradesReports(t){return this.settings.testsBySubscriptionTeacherReports.map((r,n)=>{let s=this.getReportUrl(r.type,"Anmeldung",r.id,t);return y(b({},r),{title:`Report ${n+1}`,url:s})})}getStudyClassStudentsReports(t){return this.getAvailableReports("Anlass",this.settings.studyClassStudentsReports,[t])}getCourseStudentsReports(t){return this.getAvailableReports("Anlass",this.settings.courseStudentsReports,[t])}getAvailableReports(t,e,r){let n=B(e,p=>p.type),s=S(Object.keys(n).map(p=>this.getAvailableReportsForType(p,t,n[p].map(({id:l})=>l),r)));return this.mergeAvailableReports(s,e)}getAvailableReportsForType(t,e,r,n){return n.length===0?A([]):this.http.get(this.getReportAvailabilityUrl(t,e,r,n)).pipe(C(I(z)),v(s=>s?s.map(({Id:p,Title:l})=>({type:t,id:p,title:l,url:this.getReportUrl(t,e,p,n)})):[]))}mergeAvailableReports(t,e){return t.pipe(v(r=>{let n=O(r);return e.reduce((s,p)=>{let l=n.find(({id:H})=>H===p.id);return l?[...s,l]:s},[])}))}getReportUrl(t,e,r,n){let s=new URL(`${this.settings.apiUrl}/Files/${this.getReportTypePathPart(t)}/${e}/${r}`);return s.searchParams.set("ids",n.join(",")),s.searchParams.set("token",this.storageService.getAccessToken()??""),s.toString()}getReportAvailabilityUrl(t,e,r,n){let s=new URL(`${this.settings.apiUrl}/${this.getReportTypePathPart(t)}/AvailableReports/${e}`);return s.searchParams.set("ids",Array.isArray(r)?r.join(","):String(r)),s.searchParams.set("keys",n.join(",")),s.toString()}getReportTypePathPart(t){return`${t[0].toUpperCase()+t.slice(1)}Reports`}static{this.\u0275fac=function(e){return new(e||i)(c(E),c(_),c($))}}static{this.\u0275prov=P({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var dt=R({Id:h,AddressLine1:a(o),AddressLine2:L(o),Birthdate:a(w),DisplayEmail:a(o),FirstName:o,FullName:o,Gender:k([f("M"),f("F"),f("X")]),LastName:o,Location:a(o),PhoneMobile:a(o),PhonePrivate:a(o),PostalCode:a(o)});export{N as a,V as b,dt as c,pt as d}; diff --git a/public/apps/webapp-schulverwaltung/chunk-ZA3SEXFP.js b/public/apps/webapp-schulverwaltung/chunk-3P6YOVUR.js similarity index 92% rename from public/apps/webapp-schulverwaltung/chunk-ZA3SEXFP.js rename to public/apps/webapp-schulverwaltung/chunk-3P6YOVUR.js index 82f5b635..66092ea7 100644 --- a/public/apps/webapp-schulverwaltung/chunk-ZA3SEXFP.js +++ b/public/apps/webapp-schulverwaltung/chunk-3P6YOVUR.js @@ -1 +1 @@ -import{F as s,M as p,P as f,Q as d,R as n,X as g,_ as h,ec as S,f as c,l,n as a,p as u,sc as v,tc as m,uc as P,x as e,xc as $}from"./chunk-34ZOBT6Z.js";var I=(()=>{class o{constructor(t,i){this.router=t,this.viewportScroller=i,this.scrollPositions={},this.previousRoute=null,this.currentRoute=this.getInitialActivatedRouteSnapshot(),this.currentScrollPosition=[0,0],this.destroy$=new c,this.activationEnd$=this.router.events.pipe(e(R)),this.navigationEnd$=this.router.events.pipe(e(C)),this.navigationStart$=this.router.events.pipe(e(y)),this.scrollPosition$=this.navigationStart$.pipe(a(this.getScrollPosition.bind(this))),this.route$=this.activationEnd$.pipe(s(1)).pipe(u(r=>[l(r),this.navigationEnd$.pipe(f(()=>this.activationEnd$.pipe(s(1))))]),d(),a(r=>r.snapshot),p(1)),this.scrollPosition$.pipe(n(this.destroy$)).subscribe(r=>this.currentScrollPosition=r),this.route$.pipe(n(this.destroy$)).subscribe(r=>{this.previousRoute=this.currentRoute,this.currentRoute=r})}ngOnDestroy(){this.destroy$.next()}restore(){if(!this.currentRoute||!this.requiresStoring(this.currentRoute))return;if(this.previousRoute&&this.shouldStoreFor(this.currentRoute,this.previousRoute)){let i=this.getPath(this.currentRoute);this.scrollToPosition(this.scrollPositions[i]||[0,0])}let t=this.currentRoute;this.route$.pipe(s(1),n(this.destroy$),e(i=>this.shouldStoreFor(t,i))).subscribe(()=>{let i=this.getPath(t);this.scrollPositions[i]=this.currentScrollPosition})}getScrollPosition(){return this.viewportScroller.getScrollPosition()}scrollToPosition(t){this.viewportScroller.scrollToPosition(t)}getPath(t){return t?"/"+t.pathFromRoot.map(i=>i.routeConfig&&i.routeConfig.path).filter(i=>i).join("/"):"/"}requiresStoring(t){return!!(t&&t.routeConfig&&t.routeConfig.data&&Array.isArray(t.routeConfig.data.restoreScrollPositionFrom)&&t.routeConfig.data.restoreScrollPositionFrom.length>0)}shouldStoreFor(t,i){return(t&&t.routeConfig&&t.routeConfig.data&&Array.isArray(t.routeConfig.data.restoreScrollPositionFrom)?t.routeConfig.data.restoreScrollPositionFrom:[]).includes(this.getPath(i))}getInitialActivatedRouteSnapshot(){let t=this.router.routerState.snapshot.root;for(;t.firstChild;)t=t.firstChild;return t}static{this.\u0275fac=function(i){return new(i||o)(h($),h(S))}}static{this.\u0275prov=g({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function R(o){return o instanceof P}function y(o){return o instanceof v}function C(o){return o instanceof m}export{I as a}; +import{F as s,M as p,P as f,Q as d,R as n,X as g,_ as h,f as c,fc as S,l,n as a,p as u,tc as v,uc as m,vc as P,x as e,yc as $}from"./chunk-2W7IS4PN.js";var I=(()=>{class o{constructor(t,i){this.router=t,this.viewportScroller=i,this.scrollPositions={},this.previousRoute=null,this.currentRoute=this.getInitialActivatedRouteSnapshot(),this.currentScrollPosition=[0,0],this.destroy$=new c,this.activationEnd$=this.router.events.pipe(e(R)),this.navigationEnd$=this.router.events.pipe(e(C)),this.navigationStart$=this.router.events.pipe(e(y)),this.scrollPosition$=this.navigationStart$.pipe(a(this.getScrollPosition.bind(this))),this.route$=this.activationEnd$.pipe(s(1)).pipe(u(r=>[l(r),this.navigationEnd$.pipe(f(()=>this.activationEnd$.pipe(s(1))))]),d(),a(r=>r.snapshot),p(1)),this.scrollPosition$.pipe(n(this.destroy$)).subscribe(r=>this.currentScrollPosition=r),this.route$.pipe(n(this.destroy$)).subscribe(r=>{this.previousRoute=this.currentRoute,this.currentRoute=r})}ngOnDestroy(){this.destroy$.next()}restore(){if(!this.currentRoute||!this.requiresStoring(this.currentRoute))return;if(this.previousRoute&&this.shouldStoreFor(this.currentRoute,this.previousRoute)){let i=this.getPath(this.currentRoute);this.scrollToPosition(this.scrollPositions[i]||[0,0])}let t=this.currentRoute;this.route$.pipe(s(1),n(this.destroy$),e(i=>this.shouldStoreFor(t,i))).subscribe(()=>{let i=this.getPath(t);this.scrollPositions[i]=this.currentScrollPosition})}getScrollPosition(){return this.viewportScroller.getScrollPosition()}scrollToPosition(t){this.viewportScroller.scrollToPosition(t)}getPath(t){return t?"/"+t.pathFromRoot.map(i=>i.routeConfig&&i.routeConfig.path).filter(i=>i).join("/"):"/"}requiresStoring(t){return!!(t&&t.routeConfig&&t.routeConfig.data&&Array.isArray(t.routeConfig.data.restoreScrollPositionFrom)&&t.routeConfig.data.restoreScrollPositionFrom.length>0)}shouldStoreFor(t,i){return(t&&t.routeConfig&&t.routeConfig.data&&Array.isArray(t.routeConfig.data.restoreScrollPositionFrom)?t.routeConfig.data.restoreScrollPositionFrom:[]).includes(this.getPath(i))}getInitialActivatedRouteSnapshot(){let t=this.router.routerState.snapshot.root;for(;t.firstChild;)t=t.firstChild;return t}static{this.\u0275fac=function(i){return new(i||o)(h($),h(S))}}static{this.\u0275prov=g({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function R(o){return o instanceof P}function y(o){return o instanceof v}function C(o){return o instanceof m}export{I as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-X4IBKFGZ.js b/public/apps/webapp-schulverwaltung/chunk-4KY7ONEQ.js similarity index 95% rename from public/apps/webapp-schulverwaltung/chunk-X4IBKFGZ.js rename to public/apps/webapp-schulverwaltung/chunk-4KY7ONEQ.js index 6d8cdc56..39c2ea99 100644 --- a/public/apps/webapp-schulverwaltung/chunk-X4IBKFGZ.js +++ b/public/apps/webapp-schulverwaltung/chunk-4KY7ONEQ.js @@ -1 +1 @@ -import{p as A}from"./chunk-EDO6DY2V.js";import{a as B}from"./chunk-5NJNJ42P.js";import{a as V}from"./chunk-LTVWFE76.js";import{$c as Y,Gc as D,Ha as k,Hc as R,Ld as b,Mc as S,Nd as x,P as m,S as w,T as P,X as M,_ as d,a as p,b as h,bd as $,ca as j,k as W,kc as z,l as g,la as T,ma as U,n as u,p as O,qa as F,t as K,x as N,xa as y}from"./chunk-34ZOBT6Z.js";function _(t,e,o,i){let n=window&&!!window.document&&window.document.documentElement,r=n&&e?window:o;if(t&&(r=t&&n&&typeof t=="string"?tt(t,o.nativeElement,i):t,!r))throw new Error("ngx-infinite-scroll {resolveContainerElement()}: selector for");return r}function tt(t,e,o){return(o?window.document:e).querySelector(t)}function E(t){return t&&!t.firstChange}function et(){return typeof window<"u"}var ot={clientHeight:"clientHeight",offsetHeight:"offsetHeight",scrollHeight:"scrollHeight",pageYOffset:"pageYOffset",offsetTop:"offsetTop",scrollTop:"scrollTop",top:"top"},it={clientHeight:"clientWidth",offsetHeight:"offsetWidth",scrollHeight:"scrollWidth",pageYOffset:"pageXOffset",offsetTop:"offsetLeft",scrollTop:"scrollLeft",top:"left"},v=class{constructor(e=!0){this.vertical=e,this.propsMap=e?ot:it}clientHeightKey(){return this.propsMap.clientHeight}offsetHeightKey(){return this.propsMap.offsetHeight}scrollHeightKey(){return this.propsMap.scrollHeight}pageYOffsetKey(){return this.propsMap.pageYOffset}offsetTopKey(){return this.propsMap.offsetTop}scrollTopKey(){return this.propsMap.scrollTop}topKey(){return this.propsMap.top}};function nt(t,e,o){return!!(t&&e||!o&&e)}function rt({windowElement:t,axis:e}){return lt({axis:e,isWindow:st(t)},t)}function lt(t,e){let o=t.isWindow||e&&!e.nativeElement?e:e.nativeElement;return h(p({},t),{container:o})}function st(t){return["Window","global"].some(o=>Object.prototype.toString.call(t).includes(o))}function I(t,e){return t?e.document.documentElement:null}function G(t,e){let o=ft(e);return e.isWindow?ct(o,t,e):at(o,t,e)}function ct(t,e,o){let{axis:i,container:n,isWindow:r}=o,{offsetHeightKey:l,clientHeightKey:c}=X(i),a=t+q(I(r,n),i,r),s=L(e.nativeElement,r,l,c),f=ut(e.nativeElement,i,r)+s;return{height:t,scrolled:a,totalToScroll:f,isWindow:r}}function at(t,e,o){let{axis:i,container:n}=o,r=n[i.scrollTopKey()],l=n[i.scrollHeightKey()];return{height:t,scrolled:r,totalToScroll:l,isWindow:!1}}function X(t){return{offsetHeightKey:t.offsetHeightKey(),clientHeightKey:t.clientHeightKey()}}function ft({container:t,isWindow:e,axis:o}){let{offsetHeightKey:i,clientHeightKey:n}=X(o);return L(t,e,i,n)}function L(t,e,o,i){if(isNaN(t[o])){let n=I(e,t);return n?n[i]:0}else return t[o]}function ut(t,e,o){let i=e.topKey();if(t.getBoundingClientRect)return t.getBoundingClientRect()[i]+q(t,e,o)}function q(t,e,o){let i=e.pageYOffsetKey(),n=e.scrollTopKey(),r=e.offsetTopKey();return isNaN(window.pageYOffset)?I(o,t)[n]:t.ownerDocument?t.ownerDocument.defaultView[i]:t[r]}function dt(t,e={down:0,up:0},o){let i,n;if(t.totalToScroll<=0)return!1;let r=t.isWindow?t.scrolled:t.height+t.scrolled;if(o)i=(t.totalToScroll-r)/t.totalToScroll,n=(e?.down?e.down:0)/10;else{let c=t.scrolled+(t.totalToScroll-r);i=t.scrolled/c,n=(e?.up?e.up:0)/10}return i<=n}function pt(t,e){return tg(G(i,r))),u(s=>St(l.lastScrollPosition,s,a)),w(({stats:s})=>l.updateScroll(s.scrolled,s.totalToScroll)),N(({fire:s,scrollDown:f,stats:{totalToScroll:J}})=>nt(t.alwaysCallback,s,l.isTriggeredScroll(J,f))),w(({scrollDown:s,stats:{totalToScroll:f}})=>{l.updateTriggeredFlag(f,s)}),u(wt))}function mt(t){let e=K(t.container,"scroll");return t.throttle&&(e=e.pipe(P(t.throttle,void 0,{leading:!0,trailing:!0}))),e}function St(t,e,o){let{scrollDown:i,fire:n}=ht(t,e,o);return{scrollDown:i,fire:n,stats:e}}var H={DOWN:"[NGX_ISE] DOWN",UP:"[NGX_ISE] UP"};function wt(t){let{scrollDown:e,stats:{scrolled:o}}=t;return{type:e?H.DOWN:H.UP,payload:{currentScrollPosition:o}}}var Nt=(()=>{class t{constructor(o,i){this.element=o,this.zone=i,this.scrolled=new T,this.scrolledUp=new T,this.infiniteScrollDistance=2,this.infiniteScrollUpDistance=1.5,this.infiniteScrollThrottle=150,this.infiniteScrollDisabled=!1,this.infiniteScrollContainer=null,this.scrollWindow=!0,this.immediateCheck=!1,this.horizontal=!1,this.alwaysCallback=!1,this.fromRoot=!1}ngAfterViewInit(){this.infiniteScrollDisabled||this.setup()}ngOnChanges({infiniteScrollContainer:o,infiniteScrollDisabled:i,infiniteScrollDistance:n}){let r=E(o),l=E(i),c=E(n),a=!l&&!this.infiniteScrollDisabled||l&&!i.currentValue||c;(r||l||c)&&(this.destroyScroller(),a&&this.setup())}ngOnDestroy(){this.destroyScroller()}setup(){et()&&this.zone.runOutsideAngular(()=>{this.disposeScroller=gt({fromRoot:this.fromRoot,alwaysCallback:this.alwaysCallback,disable:this.infiniteScrollDisabled,downDistance:this.infiniteScrollDistance,element:this.element,horizontal:this.horizontal,scrollContainer:this.infiniteScrollContainer,scrollWindow:this.scrollWindow,throttle:this.infiniteScrollThrottle,upDistance:this.infiniteScrollUpDistance}).subscribe(o=>this.handleOnScroll(o))})}handleOnScroll({type:o,payload:i}){let n=o===H.DOWN?this.scrolled:this.scrolledUp;Tt(n)&&this.zone.run(()=>n.emit(i))}destroyScroller(){this.disposeScroller&&this.disposeScroller.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)(y(F),y(U))}}static{this.\u0275dir=k({type:t,selectors:[["","infiniteScroll",""],["","infinite-scroll",""],["","data-infinite-scroll",""]],inputs:{infiniteScrollDistance:"infiniteScrollDistance",infiniteScrollUpDistance:"infiniteScrollUpDistance",infiniteScrollThrottle:"infiniteScrollThrottle",infiniteScrollDisabled:"infiniteScrollDisabled",infiniteScrollContainer:"infiniteScrollContainer",scrollWindow:"scrollWindow",immediateCheck:"immediateCheck",horizontal:"horizontal",alwaysCallback:"alwaysCallback",fromRoot:"fromRoot"},outputs:{scrolled:"scrolled",scrolledUp:"scrolledUp"},features:[j]})}}return t})();function Tt(t){return t.observed??t.observers.length>0}function Ut(t){return Object.keys(t).reduce((e,o)=>{let i=yt(t[o]);return i?h(p({},e),{[o]:i}):e},{})}function yt(t){return t?t instanceof Date?A(t,"yyyy-MM-dd"):String(t):null}var Z=S({Id:R,Designation:D,Number:D});var qt=(()=>{class t extends B{constructor(o,i,n,r){super(o,i,Z,"EducationalEvents"),this.translate=n,this.toastService=r,this.typeaheadCodec=S(Y(this.codec.props,["Id","Designation","Number"]))}getTypeaheadItems(o){return this.http.get(`${this.baseUrl}/CurrentSemester`,{params:{fields:["Id","Designation","Number"].join(","),"filter.Designation":`~*${o}*`}}).pipe(m(b(this.typeaheadCodec)),u(i=>i.map(n=>({Key:n.Id,Value:`${n.Designation} (${n.Number})`}))))}getTypeaheadItemByKey(o){return this.http.get(`${this.baseUrl}/CurrentSemester`,{params:{fields:["Id","Designation","Number"].join(","),"filter.Id":`=${o}`}}).pipe(m(b(this.typeaheadCodec)),m(i=>i.length===0?(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),W):g({Key:i[0].Id,Value:`${i[0].Designation} (${i[0].Number})`})))}static{this.\u0275fac=function(i){return new(i||t)(d(z),d($),d(x),d(V))}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{Ut as a,Nt as b,qt as c}; +import{p as A}from"./chunk-SRCW6BUG.js";import{a as B}from"./chunk-PSYDBHTH.js";import{a as V}from"./chunk-AVBHFGIF.js";import{Hc as D,Ia as k,Ic as R,Md as b,Nc as S,Od as x,P as m,S as w,T as P,X as M,_ as d,a as p,ad as Y,b as h,cd as $,da as j,k as W,l as g,lc as z,ma as T,n as u,na as U,p as O,ra as F,t as K,x as N,ya as y}from"./chunk-2W7IS4PN.js";function _(t,e,o,i){let n=window&&!!window.document&&window.document.documentElement,r=n&&e?window:o;if(t&&(r=t&&n&&typeof t=="string"?tt(t,o.nativeElement,i):t,!r))throw new Error("ngx-infinite-scroll {resolveContainerElement()}: selector for");return r}function tt(t,e,o){return(o?window.document:e).querySelector(t)}function E(t){return t&&!t.firstChange}function et(){return typeof window<"u"}var ot={clientHeight:"clientHeight",offsetHeight:"offsetHeight",scrollHeight:"scrollHeight",pageYOffset:"pageYOffset",offsetTop:"offsetTop",scrollTop:"scrollTop",top:"top"},it={clientHeight:"clientWidth",offsetHeight:"offsetWidth",scrollHeight:"scrollWidth",pageYOffset:"pageXOffset",offsetTop:"offsetLeft",scrollTop:"scrollLeft",top:"left"},v=class{constructor(e=!0){this.vertical=e,this.propsMap=e?ot:it}clientHeightKey(){return this.propsMap.clientHeight}offsetHeightKey(){return this.propsMap.offsetHeight}scrollHeightKey(){return this.propsMap.scrollHeight}pageYOffsetKey(){return this.propsMap.pageYOffset}offsetTopKey(){return this.propsMap.offsetTop}scrollTopKey(){return this.propsMap.scrollTop}topKey(){return this.propsMap.top}};function nt(t,e,o){return!!(t&&e||!o&&e)}function rt({windowElement:t,axis:e}){return lt({axis:e,isWindow:st(t)},t)}function lt(t,e){let o=t.isWindow||e&&!e.nativeElement?e:e.nativeElement;return h(p({},t),{container:o})}function st(t){return["Window","global"].some(o=>Object.prototype.toString.call(t).includes(o))}function I(t,e){return t?e.document.documentElement:null}function G(t,e){let o=ft(e);return e.isWindow?ct(o,t,e):at(o,t,e)}function ct(t,e,o){let{axis:i,container:n,isWindow:r}=o,{offsetHeightKey:l,clientHeightKey:c}=X(i),a=t+q(I(r,n),i,r),s=L(e.nativeElement,r,l,c),f=ut(e.nativeElement,i,r)+s;return{height:t,scrolled:a,totalToScroll:f,isWindow:r}}function at(t,e,o){let{axis:i,container:n}=o,r=n[i.scrollTopKey()],l=n[i.scrollHeightKey()];return{height:t,scrolled:r,totalToScroll:l,isWindow:!1}}function X(t){return{offsetHeightKey:t.offsetHeightKey(),clientHeightKey:t.clientHeightKey()}}function ft({container:t,isWindow:e,axis:o}){let{offsetHeightKey:i,clientHeightKey:n}=X(o);return L(t,e,i,n)}function L(t,e,o,i){if(isNaN(t[o])){let n=I(e,t);return n?n[i]:0}else return t[o]}function ut(t,e,o){let i=e.topKey();if(t.getBoundingClientRect)return t.getBoundingClientRect()[i]+q(t,e,o)}function q(t,e,o){let i=e.pageYOffsetKey(),n=e.scrollTopKey(),r=e.offsetTopKey();return isNaN(window.pageYOffset)?I(o,t)[n]:t.ownerDocument?t.ownerDocument.defaultView[i]:t[r]}function dt(t,e={down:0,up:0},o){let i,n;if(t.totalToScroll<=0)return!1;let r=t.isWindow?t.scrolled:t.height+t.scrolled;if(o)i=(t.totalToScroll-r)/t.totalToScroll,n=(e?.down?e.down:0)/10;else{let c=t.scrolled+(t.totalToScroll-r);i=t.scrolled/c,n=(e?.up?e.up:0)/10}return i<=n}function pt(t,e){return tg(G(i,r))),u(s=>St(l.lastScrollPosition,s,a)),w(({stats:s})=>l.updateScroll(s.scrolled,s.totalToScroll)),N(({fire:s,scrollDown:f,stats:{totalToScroll:J}})=>nt(t.alwaysCallback,s,l.isTriggeredScroll(J,f))),w(({scrollDown:s,stats:{totalToScroll:f}})=>{l.updateTriggeredFlag(f,s)}),u(wt))}function mt(t){let e=K(t.container,"scroll");return t.throttle&&(e=e.pipe(P(t.throttle,void 0,{leading:!0,trailing:!0}))),e}function St(t,e,o){let{scrollDown:i,fire:n}=ht(t,e,o);return{scrollDown:i,fire:n,stats:e}}var H={DOWN:"[NGX_ISE] DOWN",UP:"[NGX_ISE] UP"};function wt(t){let{scrollDown:e,stats:{scrolled:o}}=t;return{type:e?H.DOWN:H.UP,payload:{currentScrollPosition:o}}}var Nt=(()=>{class t{constructor(o,i){this.element=o,this.zone=i,this.scrolled=new T,this.scrolledUp=new T,this.infiniteScrollDistance=2,this.infiniteScrollUpDistance=1.5,this.infiniteScrollThrottle=150,this.infiniteScrollDisabled=!1,this.infiniteScrollContainer=null,this.scrollWindow=!0,this.immediateCheck=!1,this.horizontal=!1,this.alwaysCallback=!1,this.fromRoot=!1}ngAfterViewInit(){this.infiniteScrollDisabled||this.setup()}ngOnChanges({infiniteScrollContainer:o,infiniteScrollDisabled:i,infiniteScrollDistance:n}){let r=E(o),l=E(i),c=E(n),a=!l&&!this.infiniteScrollDisabled||l&&!i.currentValue||c;(r||l||c)&&(this.destroyScroller(),a&&this.setup())}ngOnDestroy(){this.destroyScroller()}setup(){et()&&this.zone.runOutsideAngular(()=>{this.disposeScroller=gt({fromRoot:this.fromRoot,alwaysCallback:this.alwaysCallback,disable:this.infiniteScrollDisabled,downDistance:this.infiniteScrollDistance,element:this.element,horizontal:this.horizontal,scrollContainer:this.infiniteScrollContainer,scrollWindow:this.scrollWindow,throttle:this.infiniteScrollThrottle,upDistance:this.infiniteScrollUpDistance}).subscribe(o=>this.handleOnScroll(o))})}handleOnScroll({type:o,payload:i}){let n=o===H.DOWN?this.scrolled:this.scrolledUp;Tt(n)&&this.zone.run(()=>n.emit(i))}destroyScroller(){this.disposeScroller&&this.disposeScroller.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)(y(F),y(U))}}static{this.\u0275dir=k({type:t,selectors:[["","infiniteScroll",""],["","infinite-scroll",""],["","data-infinite-scroll",""]],inputs:{infiniteScrollDistance:"infiniteScrollDistance",infiniteScrollUpDistance:"infiniteScrollUpDistance",infiniteScrollThrottle:"infiniteScrollThrottle",infiniteScrollDisabled:"infiniteScrollDisabled",infiniteScrollContainer:"infiniteScrollContainer",scrollWindow:"scrollWindow",immediateCheck:"immediateCheck",horizontal:"horizontal",alwaysCallback:"alwaysCallback",fromRoot:"fromRoot"},outputs:{scrolled:"scrolled",scrolledUp:"scrolledUp"},features:[j]})}}return t})();function Tt(t){return t.observed??t.observers.length>0}function Ut(t){return Object.keys(t).reduce((e,o)=>{let i=yt(t[o]);return i?h(p({},e),{[o]:i}):e},{})}function yt(t){return t?t instanceof Date?A(t,"yyyy-MM-dd"):String(t):null}var Z=S({Id:R,Designation:D,Number:D});var qt=(()=>{class t extends B{constructor(o,i,n,r){super(o,i,Z,"EducationalEvents"),this.translate=n,this.toastService=r,this.typeaheadCodec=S(Y(this.codec.props,["Id","Designation","Number"]))}getTypeaheadItems(o){return this.http.get(`${this.baseUrl}/CurrentSemester`,{params:{fields:["Id","Designation","Number"].join(","),"filter.Designation":`~*${o}*`}}).pipe(m(b(this.typeaheadCodec)),u(i=>i.map(n=>({Key:n.Id,Value:`${n.Designation} (${n.Number})`}))))}getTypeaheadItemByKey(o){return this.http.get(`${this.baseUrl}/CurrentSemester`,{params:{fields:["Id","Designation","Number"].join(","),"filter.Id":`=${o}`}}).pipe(m(b(this.typeaheadCodec)),m(i=>i.length===0?(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),W):g({Key:i[0].Id,Value:`${i[0].Designation} (${i[0].Number})`})))}static{this.\u0275fac=function(i){return new(i||t)(d(z),d($),d(x),d(V))}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{Ut as a,Nt as b,qt as c}; diff --git a/public/apps/webapp-schulverwaltung/chunk-SDI6V7TL.js b/public/apps/webapp-schulverwaltung/chunk-4RWZ7N7L.js similarity index 93% rename from public/apps/webapp-schulverwaltung/chunk-SDI6V7TL.js rename to public/apps/webapp-schulverwaltung/chunk-4RWZ7N7L.js index 1b640932..4f08d225 100644 --- a/public/apps/webapp-schulverwaltung/chunk-SDI6V7TL.js +++ b/public/apps/webapp-schulverwaltung/chunk-4RWZ7N7L.js @@ -1 +1 @@ -import{a as Ae,b as De,c as Le,d as Ve,e as Fe}from"./chunk-NOKI2UHM.js";import"./chunk-4GQ5KKE3.js";import{b as Be}from"./chunk-HAMVO7SX.js";import"./chunk-UVJXXYOR.js";import"./chunk-UFRLS5GG.js";import{b as $e,d as Ne}from"./chunk-DZUR7EKU.js";import"./chunk-2UDOWYE6.js";import{a as W}from"./chunk-PQGQXFEQ.js";import{a as Ie}from"./chunk-UPZQ4FTT.js";import{b as Te}from"./chunk-5NJNJ42P.js";import{c as ge,d as be,e as Se,f as Pe,g as Me,w as ke}from"./chunk-JHVNIEZK.js";import{a as we}from"./chunk-LTVWFE76.js";import{$a as m,Ab as R,Ad as xe,B as K,Bb as v,Cb as le,F as U,Fa as x,Ib as a,J as Q,Jb as s,Kb as E,M as j,Ma as _,Nd as Ee,O as X,Oa as ne,Od as D,P as I,Pa as y,Qa as oe,Ua as u,Wa as z,X as ee,Xa as T,Ya as $,Za as r,_ as te,_a as o,bc as A,ca as ie,cc as G,da as S,db as w,ea as P,ed as ce,fb as M,g as N,gb as c,gd as me,h as Z,hd as fe,id as _e,jb as B,l as O,m as q,md as ue,n as k,pb as b,qb as l,qd as ye,rb as C,rd as ve,sb as f,tb as re,ub as ae,wa as n,wc as pe,x as J,xa as g,xc as de,yc as se,yd as Ce,zb as F,zd as he}from"./chunk-34ZOBT6Z.js";var Y="no_access",V=(()=>{class e{constructor(t){this.profileService=t,this.reset$=new N(void 0),this.rawProfile$=this.reset$.pipe(I(()=>this.loadProfile()),j(1)),this.profile$=this.rawProfile$.pipe(k(i=>i===Y?null:i)),this.noAccess$=this.rawProfile$.pipe(k(i=>i===Y)),this.loading$=this.profileService.loading$}reset(){this.reset$.next()}loadProfile(){return this.profileService.getMyProfile().pipe(K(t=>t.status===403?O(Y):q(()=>t)))}static{this.\u0275fac=function(i){return new(i||e)(te(Ae))}}static{this.\u0275prov=ee({token:e,factory:e.\u0275fac})}}return e})();function Ze(e,d){if(e&1&&(r(0,"div"),l(1),o()),e&2){c(2);let t=v(2);n(),f(" ",t.AddressLine2," ")}}function qe(e,d){if(e&1&&(r(0,"div",5),l(1),a(2,"translate"),o()),e&2){let t=d.$implicit;n(),f(" ",E(2,1,"global.validation-errors."+t.error,t.params)," ")}}function Je(e,d){if(e&1&&(r(0,"div",13),l(1),a(2,"translate"),o()),e&2){let t=d.$implicit;n(),f(" ",E(2,1,"global.validation-errors."+t.error,t.params)," ")}}function Ke(e,d){e&1&&(r(0,"div",18)(1,"span",19),l(2,"Loading..."),o()())}function Qe(e,d){if(e&1){let t=w();r(0,"form",2),M("ngSubmit",function(){S(t);let p=c();return P(p.onSubmit())}),r(1,"div",3)(2,"p"),l(3),a(4,"translate"),o(),r(5,"address",4)(6,"div"),l(7),o(),_(8,Ze,2,1,"div"),r(9,"div"),l(10),o()()(),T(11,qe,3,4,"div",5,z),a(13,"async"),r(14,"div",3)(15,"label",6),l(16),a(17,"translate"),o(),m(18,"input",7),o(),r(19,"div",3)(20,"label",8),l(21),a(22,"translate"),o(),m(23,"input",9),r(24,"small",10),l(25),a(26,"translate"),o()(),r(27,"div",3)(28,"label",11),l(29),a(30,"translate"),o(),m(31,"input",12),a(32,"async"),T(33,Je,3,4,"div",13,z),a(35,"async"),r(36,"small",14),l(37),a(38,"translate"),o()(),r(39,"div",15)(40,"button",16),a(41,"async"),M("click",function(){S(t);let p=c();return P(p.cancel())}),l(42),a(43,"translate"),o(),r(44,"button",17),a(45,"async"),l(46),a(47,"translate"),_(48,Ke,3,0,"div",18),a(49,"async"),o()()()}if(e&2){let t,i=c(),p=v(0),h=v(2);y("formGroup",p),n(3),C(s(4,18,"my-profile.edit.address-changes-remark")),n(4),C(h.AddressLine1),n(),u(h.AddressLine2?8:-1),n(2),re("",h.Zip||""," ",h.Location,""),n(),$(s(13,20,i.formErrors$)),n(5),f(" ",s(17,22,"my-profile.edit.fields.phone-private")," "),n(5),f(" ",s(22,24,"my-profile.edit.fields.phone-mobile")," "),n(4),C(s(26,26,"my-profile.edit.fields.phone-mobile-hint")),n(4),f(" ",s(30,28,"my-profile.edit.fields.email2")," "),n(2),oe("is-invalid",((t=(t=s(32,30,i.email2Errors$))==null?null:t.length)!==null&&t!==void 0?t:0)>0),n(2),$(s(35,32,i.email2Errors$)),n(4),C(s(38,34,"my-profile.edit.fields.email2-hint")),n(3),y("disabled",s(41,36,i.saving$)),n(2),f(" ",s(43,38,"my-profile.edit.cancel")," "),n(2),y("disabled",s(45,40,i.saving$)),n(2),f(" ",s(47,42,"my-profile.edit.save")," "),n(2),u(s(49,44,i.saving$)?48:-1)}}var Oe=(()=>{class e{constructor(t,i,p,h,H,We){this.fb=t,this.router=i,this.toastService=p,this.translate=h,this.profileService=H,this.personsService=We,this.student$=this.profileService.profile$.pipe(J(ke),k(({student:Ye})=>Ye)),this.formGroup$=this.student$.pipe(k(this.createFormGroup.bind(this)),j(1)),this.saving$=new N(!1),this.submitted$=new N(!1),this.formErrors$=W(this.formGroup$,this.submitted$),this.email2Errors$=W(this.formGroup$,this.submitted$,"email2")}cancel(){this.navigateBack()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(U(1)).subscribe(t=>{if(t.valid){let{phonePrivate:i,phoneMobile:p,email2:h}=t.value;this.save(i?.trim()||null,p?.trim()||null,h||null)}})}createFormGroup(t){return this.fb.group({phonePrivate:[t.PhonePrivate],phoneMobile:[t.PhoneMobile],email2:[t.Email2,me.email]})}save(t,i,p){this.saving$.next(!0),this.student$.pipe(U(1),I(h=>this.personsService.update(h.Id,t,i,p)),Q(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.profileService.reset(),this.toastService.success(this.translate.instant("my-profile.edit.save-success")),this.navigateBack()}navigateBack(){this.router.navigate(["/my-profile"])}static{this.\u0275fac=function(i){return new(i||e)(g(Ce),g(de),g(we),g(Ee),g(V),g(Be))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-edit"]],decls:9,vars:10,consts:[[1,"bkd-container","bkd-container-limited"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"mb-3"],[1,"text-muted"],[1,"alert","alert-danger"],["id","my-profile-phone-private",1,"form-label"],["id","my-profile-phone-private","formControlName","phonePrivate","type","tel",1,"form-control"],["id","my-profile-phone-mobile",1,"form-label"],["id","my-profile-phone-mobile","formControlName","phoneMobile","type","tel","aria-describedby","my-profile-phone-mobile-hint",1,"form-control"],["id","my-profile-phone-mobile-hint",1,"form-text"],["for","my-profile-email2",1,"form-label"],["id","my-profile-email2","formControlName","email2","type","email","aria-describedby","my-profile-email2-hint",1,"form-control"],[1,"invalid-feedback"],["id","my-profile-email2-hint",1,"form-text"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(i,p){if(i&1&&(F(0),a(1,"async"),F(2),a(3,"async"),r(4,"div",0)(5,"h1"),l(6),a(7,"translate"),o(),_(8,Qe,50,46,"form",1),o()),i&2){let h=R(s(1,2,p.formGroup$));n(2);let H=R(s(3,5,p.student$));n(4),C(s(7,8,"my-profile.edit.title")),n(2),u(h&&H?8:-1)}},dependencies:[he,ue,ce,fe,_e,xe,ye,ve,A,D],encapsulation:2,changeDetection:0})}}return e})();var je=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-address"]],inputs:{address:"address"},decls:2,vars:1,template:function(i,p){i&1&&(r(0,"address"),l(1),o()),i&2&&(n(),C(p.address))},styles:["[_nghost-%COMP%]{padding:1rem}address[_ngcontent-%COMP%]{white-space:pre-wrap}"],changeDetection:0})}}return e})();var Ge=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-entry"]],inputs:{label:"label",value:"value"},decls:6,vars:4,consts:[[1,"row"],[1,"col-md-6"]],template:function(i,p){i&1&&(r(0,"dl",0)(1,"dt",1),l(2),a(3,"translate"),o(),r(4,"dd",1),l(5),o()()),i&2&&(n(2),C(s(3,2,p.label)),n(3),C(p.value))},dependencies:[D],styles:["dl[_ngcontent-%COMP%]{padding:0 1rem}dt[_ngcontent-%COMP%]{font-weight:400;color:#00000080}"],changeDetection:0})}}return e})();function Xe(e,d){if(e&1&&(r(0,"span"),l(1),o()),e&2){let t=c(2);n(),f("(",t.student.Gender,")")}}function et(e,d){if(e&1&&(r(0,"div",0)(1,"div",2),m(2,"bkd-avatar",3),r(3,"div",4),l(4),_(5,Xe,2,1,"span"),r(6,"div",5),l(7),a(8,"date"),o()()(),m(9,"bkd-reports-link",6),a(10,"async"),o()),e&2){let t=c();n(2),y("studentId",t.student.Id),n(2),ae(" ",t.student.LastName," ",t.student.FirstName," ",t.student.MiddleName," "),n(),u(t.student.Gender?5:-1),n(2),f(" ",E(8,7,t.student.Birthdate,"dd.MM.yyyy")," "),n(2),y("reports",s(10,10,t.reports$))}}function tt(e,d){if(e&1&&(r(0,"div",1),l(1),o()),e&2){let t=c();n(),C(t.student.Email)}}var He=(()=>{class e{constructor(t){this.reportsService=t,this.studentId$=new Z(1),this.reports$=this.studentId$.pipe(I(i=>i?this.reportsService.getPersonMasterDataReports(i):O([])),X([]))}ngOnChanges(t){t.student&&this.studentId$.next(t.student.currentValue?.Id||null)}static{this.\u0275fac=function(i){return new(i||e)(g(Ne))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-header"]],inputs:{student:"student"},features:[ie],decls:2,vars:2,consts:[[1,"avatar-person"],[1,"email"],[1,"d-flex"],[1,"me-3","avatar","large",3,"studentId"],[1,"person"],[1,"birthdate"],[3,"reports"]],template:function(i,p){i&1&&_(0,et,11,12,"div",0)(1,tt,2,1,"div",1),i&2&&(u(p.student?0:-1),n(),u(p.student?1:-1))},dependencies:[Fe,Ie,A,G],styles:[".avatar-person[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-left:1rem 1rem 1rem 0}.person[_ngcontent-%COMP%]{align-self:center}.email[_ngcontent-%COMP%]{padding:1rem 1rem 0 0}.report[_ngcontent-%COMP%]{align-self:flex-start;line-height:1}"],changeDetection:0})}}return e})();var it=(e,d)=>d.apprenticeshipContract.Id,nt=(e,d)=>d.Id;function ot(e,d){e&1&&m(0,"bkd-spinner")}function rt(e,d){e&1&&(r(0,"p",7),l(1),a(2,"translate"),o()),e&2&&(n(),f(" ",s(2,1,"shared.profile.substitution-profile")," "))}function at(e,d){e&1&&(r(0,"p",8),l(1),a(2,"translate"),o()),e&2&&(n(),f(" ",s(2,1,"shared.profile.no-profile")," "))}function lt(e,d){if(e&1&&(_(0,rt,3,3,"p",7),a(1,"async"),_(2,at,3,3,"p",8)),e&2){let t=c();u(s(1,1,t.profileService.noAccess$)?0:2)}}function pt(e,d){if(e&1&&m(0,"bkd-my-profile-entry",12),e&2){c(2);let t=v(0);B("value",t.student.SocialSecurityNumber)}}function dt(e,d){if(e&1&&m(0,"bkd-my-profile-entry",13),e&2){c(2);let t=v(0);B("value",t.student.HomeTown||t.student.Nationality)}}function st(e,d){if(e&1&&m(0,"bkd-my-profile-entry",14),e&2){c(2);let t=v(0);B("value",t.student.NativeLanguage)}}function ct(e,d){if(e&1&&m(0,"bkd-my-profile-entry",15),e&2){c(2);let t=v(0);B("value",t.stayPermitValue)}}function mt(e,d){if(e&1&&(m(0,"bkd-my-profile-entry",16),a(1,"date")),e&2){c(2);let t=v(0);B("value",E(1,1,t.student.StayPermitExpiry,"mediumDate"))}}function ft(e,d){if(e&1&&(r(0,"div",24)(1,"a",25),a(2,"translate"),r(3,"i",26),l(4,"edit"),o()(),m(5,"bkd-student-dossier-address",27),o()),e&2){c(2);let t=v(0);n(),ne("aria-label",s(2,2,"my-profile.edit.title")),n(4),y("student",t.student)}}function _t(e,d){if(e&1&&m(0,"bkd-my-profile-address",28),e&2){c(3);let t=v(0);y("address",t.student.CorrespondenceAddress)}}function ut(e,d){if(e&1){let t=w();r(0,"div",18,1)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,_t,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,2,"shared.profile.correspondence-address")," ")}}function yt(e,d){if(e&1&&m(0,"bkd-my-profile-address",28),e&2){c(3);let t=v(0);y("address",t.student.BillingAddress)}}function vt(e,d){if(e&1){let t=w();r(0,"div",18,2)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,yt,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,2,"shared.profile.billing-address")," ")}}function Ct(e,d){if(e&1&&m(0,"bkd-student-dossier-legal-representative",29),e&2){let t=d.$implicit;y("person",t)}}function ht(e,d){if(e&1&&T(0,Ct,1,1,"bkd-student-dossier-legal-representative",29,nt),e&2){c(3);let t=v(0);$(t.legalRepresentativePersons)}}function xt(e,d){if(e&1){let t=w();r(0,"div",18,3)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,ht,2,0,"ng-template"),o()()()}if(e&2){let t=b(1);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,2,"shared.profile.legal-representation")," ")}}function gt(e,d){if(e&1&&l(0),e&2){let t=c().$index;f(" ",t+1," ")}}function bt(e,d){if(e&1&&m(0,"bkd-student-dossier-apprenticeship-company",30),e&2){let t=c().$implicit;y("company",t)}}function St(e,d){if(e&1){let t=w();r(0,"div",23,4)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),_(6,gt,1,1),o()(),r(7,"div",21)(8,"div",22),_(9,bt,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);c(2);let i=v(0);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,3,"shared.profile.apprenticeship-company")," "),n(2),u(i.apprenticeshipCompanies.length>1?6:-1)}}function Pt(e,d){if(e&1){let t=w();m(0,"bkd-my-profile-header",9),r(1,"div",10)(2,"div",11),_(3,pt,1,1,"bkd-my-profile-entry",12)(4,dt,1,1,"bkd-my-profile-entry",13)(5,st,1,1,"bkd-my-profile-entry",14)(6,ct,1,1,"bkd-my-profile-entry",15)(7,mt,2,4,"bkd-my-profile-entry",16),o(),r(8,"div",17)(9,"div",18,0)(11,"div",19)(12,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(10);return P(p.toggle())}),l(13),a(14,"translate"),o()(),r(15,"div",21)(16,"div",22),_(17,ft,6,4,"ng-template"),o()()(),_(18,ut,9,4,"div",18)(19,vt,9,4,"div",18)(20,xt,9,4,"div",18),T(21,St,10,5,"div",23,it),o()()}if(e&2){let t=b(10);c();let i=v(0);y("student",i.student),n(3),u(i.student.SocialSecurityNumber?3:-1),n(),u(i.student.HomeTown||i.student.Nationality?4:-1),n(),u(i.student.NativeLanguage?5:-1),n(),u(i.stayPermitValue?6:-1),n(),u(i.student.StayPermitExpiry?7:-1),n(5),y("opened",!t.collapsed),n(),f(" ",s(14,11,"shared.profile.student-address")," "),n(5),u(i.student.CorrespondenceAddress?18:-1),n(),u(i.student.BillingAddress?19:-1),n(),u(i.legalRepresentativePersons.length>0?20:-1),n(),$(i.apprenticeshipCompanies)}}var Ue=(()=>{class e{constructor(t){this.profileService=t}static{this.\u0275fac=function(i){return new(i||e)(g(V))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-show"]],decls:10,vars:9,consts:[["studentAddress","ngbAccordionItem"],["correspondenceAddress","ngbAccordionItem"],["billingAddress","ngbAccordionItem"],["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],[1,"bkd-container","bkd-container-limited"],["data-testid","profile-title"],["data-testid","profile-substitution"],["data-testid","profile-none"],[3,"student"],["data-testid","profile-content",1,"profile-content"],[1,"profile-entries","pt-3"],["label","my-profile.show.social-security-number",3,"value"],["label","my-profile.show.hometown-nationality",3,"value"],["label","my-profile.show.native-language",3,"value"],["label","my-profile.show.stay-permit",3,"value"],["label","my-profile.show.stay-permit-expiry",3,"value"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"ngbAccordionItem"],[1,"clearfix"],["routerLink","edit",1,"btn","btn-primary","btn-icon","float-end","me-2"],[1,"material-icons"],["emailProperty","Email2",1,"profile-entry",3,"student"],[1,"profile-entry",3,"address"],[1,"profile-entry",3,"person"],[1,"profile-entry",3,"company"]],template:function(i,p){if(i&1&&(F(0),a(1,"async"),r(2,"div",5)(3,"h1",6),l(4),a(5,"translate"),o(),_(6,ot,1,0,"bkd-spinner"),a(7,"async"),_(8,lt,3,3)(9,Pt,23,13),o()),i&2){let h=R(s(1,2,p.profileService.profile$));n(4),C(s(5,5,"my-profile.title")),n(2),u(s(7,7,p.profileService.loading$)?6:h?9:8)}},dependencies:[He,Ge,Me,Pe,Se,$e,be,ge,se,De,je,Ve,Le,Te,A,G,D],styles:[".profile-content[_ngcontent-%COMP%]{padding-top:1rem}.profile-entry[_ngcontent-%COMP%]{display:block;padding:0 1rem}.profile-entries[_ngcontent-%COMP%]:not(:empty){border-top:1px solid rgb(222,222,222)}"],changeDetection:0})}}return e})();var ze=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile"]],features:[le([V])],decls:1,vars:0,template:function(i,p){i&1&&m(0,"router-outlet")},dependencies:[pe],encapsulation:2,changeDetection:0})}}return e})();var yi=[{path:"",component:ze,children:[{path:"",component:Ue},{path:"edit",component:Oe}]}];export{yi as MY_PROFILE_ROUTES}; +import{a as Ae,b as De,c as Le,d as Ve,e as Fe}from"./chunk-5WNFCBTP.js";import"./chunk-HCNFZOWE.js";import{b as Be}from"./chunk-DTTSX64G.js";import"./chunk-AYQPMCNZ.js";import"./chunk-Z4YBXGVO.js";import{b as $e,d as Ne}from"./chunk-3L4RH6QP.js";import"./chunk-XAZECV42.js";import{a as W}from"./chunk-GOGVGWFJ.js";import{a as Ie}from"./chunk-OSOXMODN.js";import{b as Te}from"./chunk-PSYDBHTH.js";import{c as ge,d as be,e as Se,f as Pe,g as Me,w as ke}from"./chunk-W4U7QKJF.js";import{a as we}from"./chunk-AVBHFGIF.js";import{$a as o,Ab as F,Ad as he,B as K,Bb as R,Bd as xe,Cb as v,Db as le,F as U,Ga as x,J as Q,Jb as a,Kb as s,Lb as E,M as j,Na as _,O as X,Od as Ee,P as I,Pa as ne,Pd as D,Qa as y,Ra as oe,Va as u,X as ee,Xa as z,Ya as T,Za as $,_ as te,_a as r,ab as m,cc as A,da as ie,dc as G,ea as S,eb as w,fa as P,fd as ce,g as N,gb as M,h as Z,hb as c,hd as me,id as fe,jd as _e,kb as B,l as O,m as q,n as k,nd as ue,qb as b,rb as l,rd as ye,sb as C,sd as ve,tb as f,ub as re,vb as ae,x as J,xa as n,xc as pe,ya as g,yc as de,zc as se,zd as Ce}from"./chunk-2W7IS4PN.js";var Y="no_access",V=(()=>{class e{constructor(t){this.profileService=t,this.reset$=new N(void 0),this.rawProfile$=this.reset$.pipe(I(()=>this.loadProfile()),j(1)),this.profile$=this.rawProfile$.pipe(k(i=>i===Y?null:i)),this.noAccess$=this.rawProfile$.pipe(k(i=>i===Y)),this.loading$=this.profileService.loading$}reset(){this.reset$.next()}loadProfile(){return this.profileService.getMyProfile().pipe(K(t=>t.status===403?O(Y):q(()=>t)))}static{this.\u0275fac=function(i){return new(i||e)(te(Ae))}}static{this.\u0275prov=ee({token:e,factory:e.\u0275fac})}}return e})();function Ze(e,d){if(e&1&&(r(0,"div"),l(1),o()),e&2){c(2);let t=v(2);n(),f(" ",t.AddressLine2," ")}}function qe(e,d){if(e&1&&(r(0,"div",5),l(1),a(2,"translate"),o()),e&2){let t=d.$implicit;n(),f(" ",E(2,1,"global.validation-errors."+t.error,t.params)," ")}}function Je(e,d){if(e&1&&(r(0,"div",13),l(1),a(2,"translate"),o()),e&2){let t=d.$implicit;n(),f(" ",E(2,1,"global.validation-errors."+t.error,t.params)," ")}}function Ke(e,d){e&1&&(r(0,"div",18)(1,"span",19),l(2,"Loading..."),o()())}function Qe(e,d){if(e&1){let t=w();r(0,"form",2),M("ngSubmit",function(){S(t);let p=c();return P(p.onSubmit())}),r(1,"div",3)(2,"p"),l(3),a(4,"translate"),o(),r(5,"address",4)(6,"div"),l(7),o(),_(8,Ze,2,1,"div"),r(9,"div"),l(10),o()()(),T(11,qe,3,4,"div",5,z),a(13,"async"),r(14,"div",3)(15,"label",6),l(16),a(17,"translate"),o(),m(18,"input",7),o(),r(19,"div",3)(20,"label",8),l(21),a(22,"translate"),o(),m(23,"input",9),r(24,"small",10),l(25),a(26,"translate"),o()(),r(27,"div",3)(28,"label",11),l(29),a(30,"translate"),o(),m(31,"input",12),a(32,"async"),T(33,Je,3,4,"div",13,z),a(35,"async"),r(36,"small",14),l(37),a(38,"translate"),o()(),r(39,"div",15)(40,"button",16),a(41,"async"),M("click",function(){S(t);let p=c();return P(p.cancel())}),l(42),a(43,"translate"),o(),r(44,"button",17),a(45,"async"),l(46),a(47,"translate"),_(48,Ke,3,0,"div",18),a(49,"async"),o()()()}if(e&2){let t,i=c(),p=v(0),h=v(2);y("formGroup",p),n(3),C(s(4,18,"my-profile.edit.address-changes-remark")),n(4),C(h.AddressLine1),n(),u(h.AddressLine2?8:-1),n(2),re("",h.Zip||""," ",h.Location,""),n(),$(s(13,20,i.formErrors$)),n(5),f(" ",s(17,22,"my-profile.edit.fields.phone-private")," "),n(5),f(" ",s(22,24,"my-profile.edit.fields.phone-mobile")," "),n(4),C(s(26,26,"my-profile.edit.fields.phone-mobile-hint")),n(4),f(" ",s(30,28,"my-profile.edit.fields.email2")," "),n(2),oe("is-invalid",((t=(t=s(32,30,i.email2Errors$))==null?null:t.length)!==null&&t!==void 0?t:0)>0),n(2),$(s(35,32,i.email2Errors$)),n(4),C(s(38,34,"my-profile.edit.fields.email2-hint")),n(3),y("disabled",s(41,36,i.saving$)),n(2),f(" ",s(43,38,"my-profile.edit.cancel")," "),n(2),y("disabled",s(45,40,i.saving$)),n(2),f(" ",s(47,42,"my-profile.edit.save")," "),n(2),u(s(49,44,i.saving$)?48:-1)}}var Oe=(()=>{class e{constructor(t,i,p,h,H,We){this.fb=t,this.router=i,this.toastService=p,this.translate=h,this.profileService=H,this.personsService=We,this.student$=this.profileService.profile$.pipe(J(ke),k(({student:Ye})=>Ye)),this.formGroup$=this.student$.pipe(k(this.createFormGroup.bind(this)),j(1)),this.saving$=new N(!1),this.submitted$=new N(!1),this.formErrors$=W(this.formGroup$,this.submitted$),this.email2Errors$=W(this.formGroup$,this.submitted$,"email2")}cancel(){this.navigateBack()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(U(1)).subscribe(t=>{if(t.valid){let{phonePrivate:i,phoneMobile:p,email2:h}=t.value;this.save(i?.trim()||null,p?.trim()||null,h||null)}})}createFormGroup(t){return this.fb.group({phonePrivate:[t.PhonePrivate],phoneMobile:[t.PhoneMobile],email2:[t.Email2,me.email]})}save(t,i,p){this.saving$.next(!0),this.student$.pipe(U(1),I(h=>this.personsService.update(h.Id,t,i,p)),Q(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.profileService.reset(),this.toastService.success(this.translate.instant("my-profile.edit.save-success")),this.navigateBack()}navigateBack(){this.router.navigate(["/my-profile"])}static{this.\u0275fac=function(i){return new(i||e)(g(Ce),g(de),g(we),g(Ee),g(V),g(Be))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-edit"]],decls:9,vars:10,consts:[[1,"bkd-container","bkd-container-limited"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"mb-3"],[1,"text-muted"],[1,"alert","alert-danger"],["id","my-profile-phone-private",1,"form-label"],["id","my-profile-phone-private","formControlName","phonePrivate","type","tel",1,"form-control"],["id","my-profile-phone-mobile",1,"form-label"],["id","my-profile-phone-mobile","formControlName","phoneMobile","type","tel","aria-describedby","my-profile-phone-mobile-hint",1,"form-control"],["id","my-profile-phone-mobile-hint",1,"form-text"],["for","my-profile-email2",1,"form-label"],["id","my-profile-email2","formControlName","email2","type","email","aria-describedby","my-profile-email2-hint",1,"form-control"],[1,"invalid-feedback"],["id","my-profile-email2-hint",1,"form-text"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(i,p){if(i&1&&(F(0),a(1,"async"),F(2),a(3,"async"),r(4,"div",0)(5,"h1"),l(6),a(7,"translate"),o(),_(8,Qe,50,46,"form",1),o()),i&2){let h=R(s(1,2,p.formGroup$));n(2);let H=R(s(3,5,p.student$));n(4),C(s(7,8,"my-profile.edit.title")),n(2),u(h&&H?8:-1)}},dependencies:[he,ue,ce,fe,_e,xe,ye,ve,A,D],encapsulation:2,changeDetection:0})}}return e})();var je=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-address"]],inputs:{address:"address"},decls:2,vars:1,template:function(i,p){i&1&&(r(0,"address"),l(1),o()),i&2&&(n(),C(p.address))},styles:["[_nghost-%COMP%]{padding:1rem}address[_ngcontent-%COMP%]{white-space:pre-wrap}"],changeDetection:0})}}return e})();var Ge=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-entry"]],inputs:{label:"label",value:"value"},decls:6,vars:4,consts:[[1,"row"],[1,"col-md-6"]],template:function(i,p){i&1&&(r(0,"dl",0)(1,"dt",1),l(2),a(3,"translate"),o(),r(4,"dd",1),l(5),o()()),i&2&&(n(2),C(s(3,2,p.label)),n(3),C(p.value))},dependencies:[D],styles:["dl[_ngcontent-%COMP%]{padding:0 1rem}dt[_ngcontent-%COMP%]{font-weight:400;color:#00000080}"],changeDetection:0})}}return e})();function Xe(e,d){if(e&1&&(r(0,"span"),l(1),o()),e&2){let t=c(2);n(),f("(",t.student.Gender,")")}}function et(e,d){if(e&1&&(r(0,"div",0)(1,"div",2),m(2,"bkd-avatar",3),r(3,"div",4),l(4),_(5,Xe,2,1,"span"),r(6,"div",5),l(7),a(8,"date"),o()()(),m(9,"bkd-reports-link",6),a(10,"async"),o()),e&2){let t=c();n(2),y("studentId",t.student.Id),n(2),ae(" ",t.student.LastName," ",t.student.FirstName," ",t.student.MiddleName," "),n(),u(t.student.Gender?5:-1),n(2),f(" ",E(8,7,t.student.Birthdate,"dd.MM.yyyy")," "),n(2),y("reports",s(10,10,t.reports$))}}function tt(e,d){if(e&1&&(r(0,"div",1),l(1),o()),e&2){let t=c();n(),C(t.student.Email)}}var He=(()=>{class e{constructor(t){this.reportsService=t,this.studentId$=new Z(1),this.reports$=this.studentId$.pipe(I(i=>i?this.reportsService.getPersonMasterDataReports(i):O([])),X([]))}ngOnChanges(t){t.student&&this.studentId$.next(t.student.currentValue?.Id||null)}static{this.\u0275fac=function(i){return new(i||e)(g(Ne))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-header"]],inputs:{student:"student"},features:[ie],decls:2,vars:2,consts:[[1,"avatar-person"],[1,"email"],[1,"d-flex"],[1,"me-3","avatar","large",3,"studentId"],[1,"person"],[1,"birthdate"],[3,"reports"]],template:function(i,p){i&1&&_(0,et,11,12,"div",0)(1,tt,2,1,"div",1),i&2&&(u(p.student?0:-1),n(),u(p.student?1:-1))},dependencies:[Fe,Ie,A,G],styles:[".avatar-person[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-left:1rem 1rem 1rem 0}.person[_ngcontent-%COMP%]{align-self:center}.email[_ngcontent-%COMP%]{padding:1rem 1rem 0 0}.report[_ngcontent-%COMP%]{align-self:flex-start;line-height:1}"],changeDetection:0})}}return e})();var it=(e,d)=>d.apprenticeshipContract.Id,nt=(e,d)=>d.Id;function ot(e,d){e&1&&m(0,"bkd-spinner")}function rt(e,d){e&1&&(r(0,"p",7),l(1),a(2,"translate"),o()),e&2&&(n(),f(" ",s(2,1,"shared.profile.substitution-profile")," "))}function at(e,d){e&1&&(r(0,"p",8),l(1),a(2,"translate"),o()),e&2&&(n(),f(" ",s(2,1,"shared.profile.no-profile")," "))}function lt(e,d){if(e&1&&(_(0,rt,3,3,"p",7),a(1,"async"),_(2,at,3,3,"p",8)),e&2){let t=c();u(s(1,1,t.profileService.noAccess$)?0:2)}}function pt(e,d){if(e&1&&m(0,"bkd-my-profile-entry",12),e&2){c(2);let t=v(0);B("value",t.student.SocialSecurityNumber)}}function dt(e,d){if(e&1&&m(0,"bkd-my-profile-entry",13),e&2){c(2);let t=v(0);B("value",t.student.HomeTown||t.student.Nationality)}}function st(e,d){if(e&1&&m(0,"bkd-my-profile-entry",14),e&2){c(2);let t=v(0);B("value",t.student.NativeLanguage)}}function ct(e,d){if(e&1&&m(0,"bkd-my-profile-entry",15),e&2){c(2);let t=v(0);B("value",t.stayPermitValue)}}function mt(e,d){if(e&1&&(m(0,"bkd-my-profile-entry",16),a(1,"date")),e&2){c(2);let t=v(0);B("value",E(1,1,t.student.StayPermitExpiry,"mediumDate"))}}function ft(e,d){if(e&1&&(r(0,"div",24)(1,"a",25),a(2,"translate"),r(3,"i",26),l(4,"edit"),o()(),m(5,"bkd-student-dossier-address",27),o()),e&2){c(2);let t=v(0);n(),ne("aria-label",s(2,2,"my-profile.edit.title")),n(4),y("student",t.student)}}function _t(e,d){if(e&1&&m(0,"bkd-my-profile-address",28),e&2){c(3);let t=v(0);y("address",t.student.CorrespondenceAddress)}}function ut(e,d){if(e&1){let t=w();r(0,"div",18,1)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,_t,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,2,"shared.profile.correspondence-address")," ")}}function yt(e,d){if(e&1&&m(0,"bkd-my-profile-address",28),e&2){c(3);let t=v(0);y("address",t.student.BillingAddress)}}function vt(e,d){if(e&1){let t=w();r(0,"div",18,2)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,yt,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,2,"shared.profile.billing-address")," ")}}function Ct(e,d){if(e&1&&m(0,"bkd-student-dossier-legal-representative",29),e&2){let t=d.$implicit;y("person",t)}}function ht(e,d){if(e&1&&T(0,Ct,1,1,"bkd-student-dossier-legal-representative",29,nt),e&2){c(3);let t=v(0);$(t.legalRepresentativePersons)}}function xt(e,d){if(e&1){let t=w();r(0,"div",18,3)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),o()(),r(6,"div",21)(7,"div",22),_(8,ht,2,0,"ng-template"),o()()()}if(e&2){let t=b(1);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,2,"shared.profile.legal-representation")," ")}}function gt(e,d){if(e&1&&l(0),e&2){let t=c().$index;f(" ",t+1," ")}}function bt(e,d){if(e&1&&m(0,"bkd-student-dossier-apprenticeship-company",30),e&2){let t=c().$implicit;y("company",t)}}function St(e,d){if(e&1){let t=w();r(0,"div",23,4)(2,"div",19)(3,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(1);return P(p.toggle())}),l(4),a(5,"translate"),_(6,gt,1,1),o()(),r(7,"div",21)(8,"div",22),_(9,bt,1,1,"ng-template"),o()()()}if(e&2){let t=b(1);c(2);let i=v(0);n(3),y("opened",!t.collapsed),n(),f(" ",s(5,3,"shared.profile.apprenticeship-company")," "),n(2),u(i.apprenticeshipCompanies.length>1?6:-1)}}function Pt(e,d){if(e&1){let t=w();m(0,"bkd-my-profile-header",9),r(1,"div",10)(2,"div",11),_(3,pt,1,1,"bkd-my-profile-entry",12)(4,dt,1,1,"bkd-my-profile-entry",13)(5,st,1,1,"bkd-my-profile-entry",14)(6,ct,1,1,"bkd-my-profile-entry",15)(7,mt,2,4,"bkd-my-profile-entry",16),o(),r(8,"div",17)(9,"div",18,0)(11,"div",19)(12,"bkd-student-dossier-entry-header",20),M("click",function(){S(t);let p=b(10);return P(p.toggle())}),l(13),a(14,"translate"),o()(),r(15,"div",21)(16,"div",22),_(17,ft,6,4,"ng-template"),o()()(),_(18,ut,9,4,"div",18)(19,vt,9,4,"div",18)(20,xt,9,4,"div",18),T(21,St,10,5,"div",23,it),o()()}if(e&2){let t=b(10);c();let i=v(0);y("student",i.student),n(3),u(i.student.SocialSecurityNumber?3:-1),n(),u(i.student.HomeTown||i.student.Nationality?4:-1),n(),u(i.student.NativeLanguage?5:-1),n(),u(i.stayPermitValue?6:-1),n(),u(i.student.StayPermitExpiry?7:-1),n(5),y("opened",!t.collapsed),n(),f(" ",s(14,11,"shared.profile.student-address")," "),n(5),u(i.student.CorrespondenceAddress?18:-1),n(),u(i.student.BillingAddress?19:-1),n(),u(i.legalRepresentativePersons.length>0?20:-1),n(),$(i.apprenticeshipCompanies)}}var Ue=(()=>{class e{constructor(t){this.profileService=t}static{this.\u0275fac=function(i){return new(i||e)(g(V))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile-show"]],decls:10,vars:9,consts:[["studentAddress","ngbAccordionItem"],["correspondenceAddress","ngbAccordionItem"],["billingAddress","ngbAccordionItem"],["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],[1,"bkd-container","bkd-container-limited"],["data-testid","profile-title"],["data-testid","profile-substitution"],["data-testid","profile-none"],[3,"student"],["data-testid","profile-content",1,"profile-content"],[1,"profile-entries","pt-3"],["label","my-profile.show.social-security-number",3,"value"],["label","my-profile.show.hometown-nationality",3,"value"],["label","my-profile.show.native-language",3,"value"],["label","my-profile.show.stay-permit",3,"value"],["label","my-profile.show.stay-permit-expiry",3,"value"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"ngbAccordionItem"],[1,"clearfix"],["routerLink","edit",1,"btn","btn-primary","btn-icon","float-end","me-2"],[1,"material-icons"],["emailProperty","Email2",1,"profile-entry",3,"student"],[1,"profile-entry",3,"address"],[1,"profile-entry",3,"person"],[1,"profile-entry",3,"company"]],template:function(i,p){if(i&1&&(F(0),a(1,"async"),r(2,"div",5)(3,"h1",6),l(4),a(5,"translate"),o(),_(6,ot,1,0,"bkd-spinner"),a(7,"async"),_(8,lt,3,3)(9,Pt,23,13),o()),i&2){let h=R(s(1,2,p.profileService.profile$));n(4),C(s(5,5,"my-profile.title")),n(2),u(s(7,7,p.profileService.loading$)?6:h?9:8)}},dependencies:[He,Ge,Me,Pe,Se,$e,be,ge,se,De,je,Ve,Le,Te,A,G,D],styles:[".profile-content[_ngcontent-%COMP%]{padding-top:1rem}.profile-entry[_ngcontent-%COMP%]{display:block;padding:0 1rem}.profile-entries[_ngcontent-%COMP%]:not(:empty){border-top:1px solid rgb(222,222,222)}"],changeDetection:0})}}return e})();var ze=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-my-profile"]],features:[le([V])],decls:1,vars:0,template:function(i,p){i&1&&m(0,"router-outlet")},dependencies:[pe],encapsulation:2,changeDetection:0})}}return e})();var yi=[{path:"",component:ze,children:[{path:"",component:Ue},{path:"edit",component:Oe}]}];export{yi as MY_PROFILE_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-SVCHNGNX.js b/public/apps/webapp-schulverwaltung/chunk-4RZQAAPF.js similarity index 91% rename from public/apps/webapp-schulverwaltung/chunk-SVCHNGNX.js rename to public/apps/webapp-schulverwaltung/chunk-4RZQAAPF.js index 70ba9464..d28a42e5 100644 --- a/public/apps/webapp-schulverwaltung/chunk-SVCHNGNX.js +++ b/public/apps/webapp-schulverwaltung/chunk-4RZQAAPF.js @@ -1 +1 @@ -import{b as P}from"./chunk-FLVW3H6P.js";import{l as F}from"./chunk-PQGQXFEQ.js";import{C as b,D as S,Ed as x,F as p,Gd as g,H as c,K as u,M as n,R as y,X as l,f as o,g as h,n as s,o as f,w as a,x as m,ya as v}from"./chunk-34ZOBT6Z.js";var R="page",L=(()=>{class r{constructor(t,i,$,j,E){this.location=t,this.loadingService=i,this.sortService=$,this.settings=j,this.loading$=this.loadingService.loading$,this.loadingPage$=this.loadingService.loading(R),this.sorting$=this.sortService.sorting$,this.filter$=new h(this.getInitialFilter()),this.isFilterValid$=this.filter$.pipe(s(this.isValidFilter.bind(this))),this.validFilter$=this.filter$.pipe(m(this.isValidFilter.bind(this)),c(g),n(1)),this.resetEntries$=new o,this.nextPage$=new o,this.page$=a(this.nextPage$.pipe(s(()=>"next")),a(this.resetEntries$,this.validFilter$,this.sorting$).pipe(s(()=>"reset"))).pipe(u((e,d)=>d==="next"?e+1:0,0)),this.offset$=this.page$.pipe(s(e=>e*this.settings.paginationLimit)),this.pageResult$=f([this.validFilter$,this.sorting$,this.offset$]).pipe(S(10),b(F(this.loadEntries.bind(this))),n(1)),this.entries$=a(a(this.resetEntries$,this.validFilter$,this.sorting$).pipe(s(()=>({action:"reset"}))),this.pageResult$.pipe(s(e=>e.offset===0?{action:"reset",entries:e.entries}:{action:"append",entries:e.entries}))).pipe(u(this.entriesActionReducer.bind(this),[]),n(1)),this.total$=this.pageResult$.pipe(s(({total:e})=>e)),this.hasMore$=this.pageResult$.pipe(s(({offset:e,total:d})=>ethis.location.replaceState(E,e)),this.sortService.setSorting(this.getInitialSorting())}ngOnDestroy(){this.destroy$.next()}setFilter(t){this.filter$.next(x(t))}nextPage(){this.hasMore$.pipe(p(1)).subscribe(t=>{t&&this.nextPage$.next()})}resetEntries(){this.resetEntries$.next()}getInitialSorting(){return null}entriesActionReducer(t,i){switch(i.action){case"append":return[...t,...i.entries];case"reset":return i.entries?i.entries:[];default:return t}}static{this.\u0275fac=function(i){v()}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})();var M=(()=>{class r{getSortingChar$(t){return this.sorting$.pipe(s(i=>i&&t===i.key?i.ascending?"\u2193":"\u2191":""))}constructor(){this.sortingSubject$=new h(null),this.sorting$=this.sortingSubject$.asObservable().pipe(c(g),n(1))}setSorting(t){this.sortingSubject$.next(t)}toggleSorting(t){this.sorting$.pipe(p(1)).subscribe(i=>{let $=i&&i.key===t?!i.ascending:!0;this.sortingSubject$.next({key:t,ascending:$})})}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{R as a,L as b,M as c}; +import{b as P}from"./chunk-DTYYCJHM.js";import{l as F}from"./chunk-GOGVGWFJ.js";import{C as b,D as S,F as p,Fd as x,H as c,Hd as g,K as u,M as n,R as y,X as l,f as o,g as h,n as s,o as f,w as a,x as m,za as v}from"./chunk-2W7IS4PN.js";var R="page",L=(()=>{class r{constructor(t,i,$,j,E){this.location=t,this.loadingService=i,this.sortService=$,this.settings=j,this.loading$=this.loadingService.loading$,this.loadingPage$=this.loadingService.loading(R),this.sorting$=this.sortService.sorting$,this.filter$=new h(this.getInitialFilter()),this.isFilterValid$=this.filter$.pipe(s(this.isValidFilter.bind(this))),this.validFilter$=this.filter$.pipe(m(this.isValidFilter.bind(this)),c(g),n(1)),this.resetEntries$=new o,this.nextPage$=new o,this.page$=a(this.nextPage$.pipe(s(()=>"next")),a(this.resetEntries$,this.validFilter$,this.sorting$).pipe(s(()=>"reset"))).pipe(u((e,d)=>d==="next"?e+1:0,0)),this.offset$=this.page$.pipe(s(e=>e*this.settings.paginationLimit)),this.pageResult$=f([this.validFilter$,this.sorting$,this.offset$]).pipe(S(10),b(F(this.loadEntries.bind(this))),n(1)),this.entries$=a(a(this.resetEntries$,this.validFilter$,this.sorting$).pipe(s(()=>({action:"reset"}))),this.pageResult$.pipe(s(e=>e.offset===0?{action:"reset",entries:e.entries}:{action:"append",entries:e.entries}))).pipe(u(this.entriesActionReducer.bind(this),[]),n(1)),this.total$=this.pageResult$.pipe(s(({total:e})=>e)),this.hasMore$=this.pageResult$.pipe(s(({offset:e,total:d})=>ethis.location.replaceState(E,e)),this.sortService.setSorting(this.getInitialSorting())}ngOnDestroy(){this.destroy$.next()}setFilter(t){this.filter$.next(x(t))}nextPage(){this.hasMore$.pipe(p(1)).subscribe(t=>{t&&this.nextPage$.next()})}resetEntries(){this.resetEntries$.next()}getInitialSorting(){return null}entriesActionReducer(t,i){switch(i.action){case"append":return[...t,...i.entries];case"reset":return i.entries?i.entries:[];default:return t}}static{this.\u0275fac=function(i){v()}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})();var M=(()=>{class r{getSortingChar$(t){return this.sorting$.pipe(s(i=>i&&t===i.key?i.ascending?"\u2193":"\u2191":""))}constructor(){this.sortingSubject$=new h(null),this.sorting$=this.sortingSubject$.asObservable().pipe(c(g),n(1))}setSorting(t){this.sortingSubject$.next(t)}toggleSorting(t){this.sorting$.pipe(p(1)).subscribe(i=>{let $=i&&i.key===t?!i.ascending:!0;this.sortingSubject$.next({key:t,ascending:$})})}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{R as a,L as b,M as c}; diff --git a/public/apps/webapp-schulverwaltung/chunk-NOKI2UHM.js b/public/apps/webapp-schulverwaltung/chunk-5WNFCBTP.js similarity index 94% rename from public/apps/webapp-schulverwaltung/chunk-NOKI2UHM.js rename to public/apps/webapp-schulverwaltung/chunk-5WNFCBTP.js index cf0266c3..f8b27a2d 100644 --- a/public/apps/webapp-schulverwaltung/chunk-NOKI2UHM.js +++ b/public/apps/webapp-schulverwaltung/chunk-5WNFCBTP.js @@ -1 +1 @@ -import{a as Y}from"./chunk-4GQ5KKE3.js";import{a as se,b as ce}from"./chunk-HAMVO7SX.js";import{f as le,g as de}from"./chunk-UFRLS5GG.js";import{j as q,k as O,l as K}from"./chunk-PQGQXFEQ.js";import{b as me}from"./chunk-UPZQ4FTT.js";import{a as J,c as Q}from"./chunk-5NJNJ42P.js";import{w as Z}from"./chunk-JHVNIEZK.js";import{$a as s,$b as ae,Fa as I,Gc as d,Hc as U,Ia as te,Ib as u,Jb as x,Kb as k,Ma as b,Mc as z,Od as pe,P as F,Pa as ne,Qa as ie,Qd as N,Tc as h,Ua as p,Uc as R,X as L,Za as c,_ as f,_a as m,bd as j,ca as ee,cc as re,gb as l,ic as B,kb as y,kc as w,l as M,n as G,o as E,qb as r,rb as _,sb as C,tb as v,va as g,wa as a,x as X,xa as V,yc as oe}from"./chunk-34ZOBT6Z.js";function ve(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.student.AddressLine2,"")}}function Se(t,o){if(t&1&&(c(0,"a",0),r(1),m(),s(2,"br")),t&2){let e=l();y("href","tel:",e.student.PhonePrivate,"",g),a(),C(" ",e.student.PhonePrivate," ")}}function _e(t,o){if(t&1&&(c(0,"a",0),r(1),m(),s(2,"br")),t&2){let e=l();y("href","tel:",e.student.PhoneMobile,"",g),a(),C(" ",e.student.PhoneMobile," ")}}function be(t,o){if(t&1&&(c(0,"a",0),r(1),m()),t&2){let e=l();y("href","mailto:",e.email,"",g),a(),C(" ",e.email," ")}}var Qe=(()=>{class t{constructor(){this.emailProperty="DisplayEmail"}get postalCode(){return"PostalCode"in this.student?this.student.PostalCode:this.student.Zip}get email(){return this.emailProperty==="Email2"&&"Email2"in this.student?this.student.Email2||null:this.student.DisplayEmail}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-student-dossier-address"]],inputs:{student:"student",emailProperty:"emailProperty"},decls:9,vars:7,consts:[[3,"href"]],template:function(i,n){i&1&&(c(0,"address"),r(1),s(2,"br"),b(3,ve,2,1),r(4),s(5,"br"),b(6,Se,3,3)(7,_e,3,3)(8,be,2,3,"a",0),m()),i&2&&(a(),C(" ",n.student.AddressLine1,""),a(2),p(n.student.AddressLine2?3:-1),a(),v(" ",n.postalCode||""," ",n.student.Location,""),a(2),p(n.student.PhonePrivate?6:-1),a(),p(n.student.PhoneMobile?7:-1),a(),p(n.email?8:-1))},encapsulation:2,changeDetection:0})}}return t})();var $=(()=>{class t{transform(e){return e?.DisplayEmail||e?.Email||e?.Email2||null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=te({name:"bkdPersonEmail",type:t,pure:!0})}}return t})();function Pe(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.CompanyName,"")}}function Me(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.CompanyNameAddition,"")}}function Ie(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();v(" ",(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Lastname)||""," ",(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Firstname)||"","")}}function Ae(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.AddressLine1,"")}}function Te(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.AddressLine2,"")}}function De(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();v(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PostalCode," ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Location,"")}}function Ee(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PhoneBusiness,"",g),a(),_(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PhoneBusiness)}}function Le(t,o){if(t&1&&(c(0,"a",0),u(1,"bkdPersonEmail"),r(2),u(3,"bkdPersonEmail"),m()),t&2){let e=l();y("href","mailto:",x(1,3,e.company.apprenticeshipManager),"",g),a(2),_(x(3,5,e.company.apprenticeshipManager))}}function je(t,o){if(t&1&&(c(0,"div",1),r(1),u(2,"translate"),u(3,"addSpace"),s(4,"br"),r(5),u(6,"date"),u(7,"date"),m()),t&2){let e=l();a(),v(" ",x(2,4,"shared.profile.apprenticeship-period"),"",k(3,6,":",":"),""),a(4),v(" ",k(6,9,e.company.apprenticeshipContract.ContractDateFrom,"dd.MM.yyyy"),"\u2013",k(7,12,e.company.apprenticeshipContract.ContractDateTo,"dd.MM.yyyy")," ")}}function ke(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l(2);v(" ",e.company.jobTrainer.Lastname||""," ",e.company.jobTrainer.Firstname||"","")}}function Re(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l(2);y("href","tel:",e.company.jobTrainer.PhoneBusiness,"",g),a(),_(e.company.jobTrainer.PhoneBusiness)}}function Fe(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l(2);y("href","tel:",e.company.jobTrainer.PhoneMobile,"",g),a(),_(e.company.jobTrainer.PhoneMobile)}}function Be(t,o){if(t&1&&(c(0,"a",0),u(1,"bkdPersonEmail"),r(2),u(3,"bkdPersonEmail"),m()),t&2){let e=l(2);y("href","mailto:",x(1,3,e.company.jobTrainer),"",g),a(2),_(x(3,5,e.company.jobTrainer))}}function we(t,o){if(t&1&&(c(0,"div",1),r(1),u(2,"translate"),u(3,"addSpace"),c(4,"address"),b(5,ke,2,2)(6,Re,3,3,"a",0)(7,Fe,3,3,"a",0)(8,Be,4,7,"a",0),u(9,"bkdPersonEmail"),m()()),t&2){let e=l();a(),v(" ",x(2,6,"shared.profile.job-trainer"),"",k(3,8,":",":")," "),a(4),p(e.company.jobTrainer.Lastname||e.company.jobTrainer.Firstname?5:-1),a(),p(e.company.jobTrainer.PhoneBusiness?6:-1),a(),p(e.company.jobTrainer.PhoneMobile?7:-1),a(),p(x(9,11,e.company.jobTrainer)?8:-1)}}var at=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-student-dossier-apprenticeship-company"]],inputs:{company:"company"},decls:12,vars:12,consts:[[3,"href"],[1,"subentry"]],template:function(i,n){i&1&&(c(0,"address"),b(1,Pe,2,1)(2,Me,2,1)(3,Ie,2,2)(4,Ae,2,1)(5,Te,2,1)(6,De,2,2)(7,Ee,3,3,"a",0)(8,Le,4,7,"a",0),u(9,"bkdPersonEmail"),m(),b(10,je,8,15,"div",1)(11,we,10,13,"div",1)),i&2&&(a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.CompanyName?1:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.CompanyNameAddition?2:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Lastname||n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Firstname?3:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.AddressLine1?4:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.AddressLine2?5:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.PostalCode&&(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Location)?6:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.PhoneBusiness?7:-1),a(),p(x(9,10,n.company.apprenticeshipManager)?8:-1),a(2),p(n.company.apprenticeshipContract.ContractDateFrom?10:-1),a(),p(n.company.jobTrainer?11:-1))},dependencies:[re,pe,de,$],styles:[".subentry[_ngcontent-%COMP%]{padding-bottom:1rem}"],changeDetection:0})}}return t})();function Ue(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.person.AddressLine1,"")}}function ze(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.person.AddressLine2,"")}}function Ne(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();v(" ",e.person.Zip," ",e.person.Location,"")}}function Oe(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.person.PhonePrivate,"",g),a(),_(e.person.PhonePrivate)}}function Je(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.person.PhoneMobile,"",g),a(),_(e.person.PhoneMobile)}}function Ye(t,o){if(t&1&&(c(0,"a",0),u(1,"bkdPersonEmail"),r(2),u(3,"bkdPersonEmail"),m()),t&2){let e=l();y("href","mailto:",x(1,3,e.person),"",g),a(2),_(x(3,5,e.person))}}var pt=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-student-dossier-legal-representative"]],inputs:{person:"person"},decls:10,vars:10,consts:[[3,"href"]],template:function(i,n){i&1&&(c(0,"address"),r(1),s(2,"br"),b(3,Ue,2,1)(4,ze,2,1)(5,Ne,2,2)(6,Oe,3,3,"a",0)(7,Je,3,3,"a",0)(8,Ye,4,7,"a",0),u(9,"bkdPersonEmail"),m()),i&2&&(a(),v(" ",n.person.LastName," ",n.person.FirstName,""),a(2),p(n.person.AddressLine1?3:-1),a(),p(n.person.AddressLine2?4:-1),a(),p(n.person.Zip&&n.person.Zip?5:-1),a(),p(n.person.PhonePrivate?6:-1),a(),p(n.person.PhoneMobile?7:-1),a(),p(x(9,8,n.person)?8:-1))},dependencies:[$],encapsulation:2,changeDetection:0})}}return t})();function W(t,o){let e=+q(t)-+q(o);return e<0?-1:e>0?1:e}function ue(t,o,e){let[i,n]=O(e?.in,t,o);return i.getFullYear()-n.getFullYear()}function he(t,o,e){let[i,n]=O(e?.in,t,o),S=W(i,n),A=Math.abs(ue(i,n));i.setFullYear(1584),n.setFullYear(1584);let T=W(i,n)===-S,P=S*(A-+T);return P===0?0:P}var $e=18;function fe(t){return he(new Date,t.Birthdate||new Date)>=$e}var ge=z({Email:h(d),Email2:h(d),PhoneBusiness:h(d),CompanyName:R(d),CompanyNameAddition:R(d),Firstname:h(d),Lastname:h(d),AddressLine1:R(d),AddressLine2:R(d),PostalCode:h(d),Location:h(d),Id:U});var ye=(()=>{class t extends J{constructor(e,i){super(e,i,ge,"ApprenticeshipManagers")}static{this.\u0275fac=function(i){return new(i||t)(f(w),f(j))}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ce=z({Email:h(d),Email2:h(d),PhoneBusiness:h(d),PhoneMobile:h(d),Firstname:h(d),Lastname:h(d),Id:U});var xe=(()=>{class t extends J{constructor(e,i){super(e,i,Ce,"JobTrainers")}static{this.\u0275fac=function(i){return new(i||t)(f(w),f(j))}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ot=(()=>{class t{constructor(e,i,n,S,A,T,P){this.studentService=e,this.personsService=i,this.apprenticeshipManagersService=n,this.jobTrainersService=S,this.loadingService=A,this.dropDownItemsService=T,this.storageService=P,this.loading$=this.loadingService.loading$}getProfile(e){return this.loadingService.load(E([this.loadStudent(e),this.loadLegalRepresentatives(e),this.loadApprenticeshipContracts(e)]).pipe(F(K(this.mapToProfile.bind(this)))))}getMyProfile(){let i=(this.storageService.getPayload()?.roles?.split(";")??[]).includes("StudentRole");return this.loadingService.load(this.personsService.getMyself({context:new B().set(Y,{disableErrorHandlingForStatus:[403]})}).pipe(F(n=>E([M(n),i?this.loadLegalRepresentatives(n.Id):M([]),i?this.loadApprenticeshipContracts(n.Id):M([]),this.loadStayPermitValue(n.StayPermit)]))).pipe(F(K(this.mapToProfile.bind(this))),X(Z)))}loadStudent(e){return this.studentService.get(e,{context:new B().set(Y,{disableErrorHandlingForStatus:[404]})}).pipe(Q())}loadLegalRepresentatives(e){return this.studentService.getLegalRepresentatives(e)}loadApprenticeshipContracts(e){return this.studentService.getCurrentApprenticeshipContracts(e,{context:new B().set(Y,{disableErrorHandlingForStatus:[404]})}).pipe(Q([]))}loadStayPermitValue(e){return this.dropDownItemsService.getStayPermits().pipe(G(i=>i.find(n=>n.Key===e)?.Value||null))}mapToProfile(e,i,n,S=null){return e?(i=this.getRelevantLegalRepresentatives(e,i),E([this.loadLegalRepresentativPersons(i),this.loadJobTrainers(n),this.loadApprenticeshipManagers(n)]).pipe(G(([A,T,P])=>this.createProfile(e,S,i,A,n,P,T)))):M(null)}loadLegalRepresentativPersons(e){return e.length===0?M([]):this.personsService.getListForIds(e.map(i=>i.RepresentativeId))}loadJobTrainers(e){let i=e.map(n=>n.JobTrainer).filter(n=>typeof n=="number");return i.length===0?M([]):E(i.map(n=>this.jobTrainersService.get(n)))}loadApprenticeshipManagers(e){let i=e.map(n=>n.ApprenticeshipManagerId);return i.length===0?M([]):E(i.map(n=>this.apprenticeshipManagersService.get(n)))}createProfile(e,i,n,S,A,T,P){return{student:e,stayPermitValue:i||void 0,legalRepresentativePersons:n.map(H=>this.findPerson(H.RepresentativeId,S)).filter(Z),apprenticeshipCompanies:A.map(H=>this.createApprenticeshipCompany(H,T,P))}}getRelevantLegalRepresentatives(e,i){let n=fe(e);return i.filter(S=>!n||S.RepresentativeAfterMajority)}createApprenticeshipCompany(e,i,n){return{apprenticeshipContract:e,jobTrainer:this.findPerson(e.JobTrainer,n),apprenticeshipManager:this.findPerson(e.ApprenticeshipManagerId,i)}}findPerson(e,i){return e&&i.find(n=>n.Id===e)||null}static{this.\u0275fac=function(i){return new(i||t)(f(le),f(ce),f(ye),f(xe),f(me),f(se),f(N))}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Gt=(()=>{class t{constructor(e,i){this.settings=e,this.storageService=i,this.avatarStyles={}}ngOnChanges(e){e.studentId&&(this.avatarStyles=this.buildAvatarStyles(this.studentId))}buildAvatarStyles(e){return{"background-image":[this.buildAvatarUrl(e),this.fallbackAvatarUrl].map(i=>`url(${i})`).join(", ")}}buildAvatarUrl(e){let i=this.storageService.getAccessToken()||"";return`${this.settings.apiUrl}/Files/personPictures/${e}?token=${i}`}get fallbackAvatarUrl(){return`${this.settings.scriptsAndAssetsPath}/assets/images/avatar-placeholder.png`}static{this.\u0275fac=function(i){return new(i||t)(V(j),V(N))}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-avatar"]],inputs:{studentId:"studentId",link:"link",linkParams:"linkParams"},features:[ee],decls:1,vars:5,consts:[[1,"avatar",3,"routerLink","queryParams","ngStyle"]],template:function(i,n){i&1&&s(0,"a",0),i&2&&(ie("disabled",!n.link),ne("routerLink",n.link)("queryParams",n.linkParams)("ngStyle",n.avatarStyles))},dependencies:[oe,ae],styles:["[_nghost-%COMP%]{display:flex}.small[_nghost-%COMP%]{width:40px;min-width:40px;height:50px}.medium[_nghost-%COMP%]{width:58px;min-width:58px;height:75px}.large[_nghost-%COMP%]{width:100px;min-width:100px;height:130px}.avatar[_ngcontent-%COMP%]{flex:1;border:1px solid rgba(0,0,0,.25);background-repeat:no-repeat;background-size:cover;background-position:center}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}"]})}}return t})();export{Ot as a,Qe as b,at as c,pt as d,Gt as e}; +import{a as Y}from"./chunk-HCNFZOWE.js";import{a as se,b as ce}from"./chunk-DTTSX64G.js";import{f as le,g as de}from"./chunk-Z4YBXGVO.js";import{j as q,k as O,l as K}from"./chunk-GOGVGWFJ.js";import{b as me}from"./chunk-OSOXMODN.js";import{a as J,c as Q}from"./chunk-PSYDBHTH.js";import{w as Z}from"./chunk-W4U7QKJF.js";import{$a as m,Ga as I,Hc as d,Ic as U,Ja as te,Jb as u,Kb as x,Lb as k,Na as b,Nc as z,P as F,Pd as pe,Qa as ne,Ra as ie,Rd as N,Uc as h,Va as p,Vc as R,X as L,_ as f,_a as c,ab as s,ac as ae,cd as j,da as ee,dc as re,hb as l,jc as B,l as M,lb as y,lc as w,n as G,o as E,rb as r,sb as _,tb as C,ub as v,wa as g,x as X,xa as a,ya as V,zc as oe}from"./chunk-2W7IS4PN.js";function ve(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.student.AddressLine2,"")}}function Se(t,o){if(t&1&&(c(0,"a",0),r(1),m(),s(2,"br")),t&2){let e=l();y("href","tel:",e.student.PhonePrivate,"",g),a(),C(" ",e.student.PhonePrivate," ")}}function _e(t,o){if(t&1&&(c(0,"a",0),r(1),m(),s(2,"br")),t&2){let e=l();y("href","tel:",e.student.PhoneMobile,"",g),a(),C(" ",e.student.PhoneMobile," ")}}function be(t,o){if(t&1&&(c(0,"a",0),r(1),m()),t&2){let e=l();y("href","mailto:",e.email,"",g),a(),C(" ",e.email," ")}}var Qe=(()=>{class t{constructor(){this.emailProperty="DisplayEmail"}get postalCode(){return"PostalCode"in this.student?this.student.PostalCode:this.student.Zip}get email(){return this.emailProperty==="Email2"&&"Email2"in this.student?this.student.Email2||null:this.student.DisplayEmail}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-student-dossier-address"]],inputs:{student:"student",emailProperty:"emailProperty"},decls:9,vars:7,consts:[[3,"href"]],template:function(i,n){i&1&&(c(0,"address"),r(1),s(2,"br"),b(3,ve,2,1),r(4),s(5,"br"),b(6,Se,3,3)(7,_e,3,3)(8,be,2,3,"a",0),m()),i&2&&(a(),C(" ",n.student.AddressLine1,""),a(2),p(n.student.AddressLine2?3:-1),a(),v(" ",n.postalCode||""," ",n.student.Location,""),a(2),p(n.student.PhonePrivate?6:-1),a(),p(n.student.PhoneMobile?7:-1),a(),p(n.email?8:-1))},encapsulation:2,changeDetection:0})}}return t})();var $=(()=>{class t{transform(e){return e?.DisplayEmail||e?.Email||e?.Email2||null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=te({name:"bkdPersonEmail",type:t,pure:!0})}}return t})();function Pe(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.CompanyName,"")}}function Me(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.CompanyNameAddition,"")}}function Ie(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();v(" ",(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Lastname)||""," ",(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Firstname)||"","")}}function Ae(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.AddressLine1,"")}}function Te(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.AddressLine2,"")}}function De(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();v(" ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PostalCode," ",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.Location,"")}}function Ee(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PhoneBusiness,"",g),a(),_(e.company.apprenticeshipManager==null?null:e.company.apprenticeshipManager.PhoneBusiness)}}function Le(t,o){if(t&1&&(c(0,"a",0),u(1,"bkdPersonEmail"),r(2),u(3,"bkdPersonEmail"),m()),t&2){let e=l();y("href","mailto:",x(1,3,e.company.apprenticeshipManager),"",g),a(2),_(x(3,5,e.company.apprenticeshipManager))}}function je(t,o){if(t&1&&(c(0,"div",1),r(1),u(2,"translate"),u(3,"addSpace"),s(4,"br"),r(5),u(6,"date"),u(7,"date"),m()),t&2){let e=l();a(),v(" ",x(2,4,"shared.profile.apprenticeship-period"),"",k(3,6,":",":"),""),a(4),v(" ",k(6,9,e.company.apprenticeshipContract.ContractDateFrom,"dd.MM.yyyy"),"\u2013",k(7,12,e.company.apprenticeshipContract.ContractDateTo,"dd.MM.yyyy")," ")}}function ke(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l(2);v(" ",e.company.jobTrainer.Lastname||""," ",e.company.jobTrainer.Firstname||"","")}}function Re(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l(2);y("href","tel:",e.company.jobTrainer.PhoneBusiness,"",g),a(),_(e.company.jobTrainer.PhoneBusiness)}}function Fe(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l(2);y("href","tel:",e.company.jobTrainer.PhoneMobile,"",g),a(),_(e.company.jobTrainer.PhoneMobile)}}function Be(t,o){if(t&1&&(c(0,"a",0),u(1,"bkdPersonEmail"),r(2),u(3,"bkdPersonEmail"),m()),t&2){let e=l(2);y("href","mailto:",x(1,3,e.company.jobTrainer),"",g),a(2),_(x(3,5,e.company.jobTrainer))}}function we(t,o){if(t&1&&(c(0,"div",1),r(1),u(2,"translate"),u(3,"addSpace"),c(4,"address"),b(5,ke,2,2)(6,Re,3,3,"a",0)(7,Fe,3,3,"a",0)(8,Be,4,7,"a",0),u(9,"bkdPersonEmail"),m()()),t&2){let e=l();a(),v(" ",x(2,6,"shared.profile.job-trainer"),"",k(3,8,":",":")," "),a(4),p(e.company.jobTrainer.Lastname||e.company.jobTrainer.Firstname?5:-1),a(),p(e.company.jobTrainer.PhoneBusiness?6:-1),a(),p(e.company.jobTrainer.PhoneMobile?7:-1),a(),p(x(9,11,e.company.jobTrainer)?8:-1)}}var at=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-student-dossier-apprenticeship-company"]],inputs:{company:"company"},decls:12,vars:12,consts:[[3,"href"],[1,"subentry"]],template:function(i,n){i&1&&(c(0,"address"),b(1,Pe,2,1)(2,Me,2,1)(3,Ie,2,2)(4,Ae,2,1)(5,Te,2,1)(6,De,2,2)(7,Ee,3,3,"a",0)(8,Le,4,7,"a",0),u(9,"bkdPersonEmail"),m(),b(10,je,8,15,"div",1)(11,we,10,13,"div",1)),i&2&&(a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.CompanyName?1:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.CompanyNameAddition?2:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Lastname||n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Firstname?3:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.AddressLine1?4:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.AddressLine2?5:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.PostalCode&&(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.Location)?6:-1),a(),p(n.company.apprenticeshipManager!=null&&n.company.apprenticeshipManager.PhoneBusiness?7:-1),a(),p(x(9,10,n.company.apprenticeshipManager)?8:-1),a(2),p(n.company.apprenticeshipContract.ContractDateFrom?10:-1),a(),p(n.company.jobTrainer?11:-1))},dependencies:[re,pe,de,$],styles:[".subentry[_ngcontent-%COMP%]{padding-bottom:1rem}"],changeDetection:0})}}return t})();function Ue(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.person.AddressLine1,"")}}function ze(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();C(" ",e.person.AddressLine2,"")}}function Ne(t,o){if(t&1&&(r(0),s(1,"br")),t&2){let e=l();v(" ",e.person.Zip," ",e.person.Location,"")}}function Oe(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.person.PhonePrivate,"",g),a(),_(e.person.PhonePrivate)}}function Je(t,o){if(t&1&&(c(0,"a",0),r(1),s(2,"br"),m()),t&2){let e=l();y("href","tel:",e.person.PhoneMobile,"",g),a(),_(e.person.PhoneMobile)}}function Ye(t,o){if(t&1&&(c(0,"a",0),u(1,"bkdPersonEmail"),r(2),u(3,"bkdPersonEmail"),m()),t&2){let e=l();y("href","mailto:",x(1,3,e.person),"",g),a(2),_(x(3,5,e.person))}}var pt=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-student-dossier-legal-representative"]],inputs:{person:"person"},decls:10,vars:10,consts:[[3,"href"]],template:function(i,n){i&1&&(c(0,"address"),r(1),s(2,"br"),b(3,Ue,2,1)(4,ze,2,1)(5,Ne,2,2)(6,Oe,3,3,"a",0)(7,Je,3,3,"a",0)(8,Ye,4,7,"a",0),u(9,"bkdPersonEmail"),m()),i&2&&(a(),v(" ",n.person.LastName," ",n.person.FirstName,""),a(2),p(n.person.AddressLine1?3:-1),a(),p(n.person.AddressLine2?4:-1),a(),p(n.person.Zip&&n.person.Zip?5:-1),a(),p(n.person.PhonePrivate?6:-1),a(),p(n.person.PhoneMobile?7:-1),a(),p(x(9,8,n.person)?8:-1))},dependencies:[$],encapsulation:2,changeDetection:0})}}return t})();function W(t,o){let e=+q(t)-+q(o);return e<0?-1:e>0?1:e}function ue(t,o,e){let[i,n]=O(e?.in,t,o);return i.getFullYear()-n.getFullYear()}function he(t,o,e){let[i,n]=O(e?.in,t,o),S=W(i,n),A=Math.abs(ue(i,n));i.setFullYear(1584),n.setFullYear(1584);let T=W(i,n)===-S,P=S*(A-+T);return P===0?0:P}var $e=18;function fe(t){return he(new Date,t.Birthdate||new Date)>=$e}var ge=z({Email:h(d),Email2:h(d),PhoneBusiness:h(d),CompanyName:R(d),CompanyNameAddition:R(d),Firstname:h(d),Lastname:h(d),AddressLine1:R(d),AddressLine2:R(d),PostalCode:h(d),Location:h(d),Id:U});var ye=(()=>{class t extends J{constructor(e,i){super(e,i,ge,"ApprenticeshipManagers")}static{this.\u0275fac=function(i){return new(i||t)(f(w),f(j))}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ce=z({Email:h(d),Email2:h(d),PhoneBusiness:h(d),PhoneMobile:h(d),Firstname:h(d),Lastname:h(d),Id:U});var xe=(()=>{class t extends J{constructor(e,i){super(e,i,Ce,"JobTrainers")}static{this.\u0275fac=function(i){return new(i||t)(f(w),f(j))}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ot=(()=>{class t{constructor(e,i,n,S,A,T,P){this.studentService=e,this.personsService=i,this.apprenticeshipManagersService=n,this.jobTrainersService=S,this.loadingService=A,this.dropDownItemsService=T,this.storageService=P,this.loading$=this.loadingService.loading$}getProfile(e){return this.loadingService.load(E([this.loadStudent(e),this.loadLegalRepresentatives(e),this.loadApprenticeshipContracts(e)]).pipe(F(K(this.mapToProfile.bind(this)))))}getMyProfile(){let i=(this.storageService.getPayload()?.roles?.split(";")??[]).includes("StudentRole");return this.loadingService.load(this.personsService.getMyself({context:new B().set(Y,{disableErrorHandlingForStatus:[403]})}).pipe(F(n=>E([M(n),i?this.loadLegalRepresentatives(n.Id):M([]),i?this.loadApprenticeshipContracts(n.Id):M([]),this.loadStayPermitValue(n.StayPermit)]))).pipe(F(K(this.mapToProfile.bind(this))),X(Z)))}loadStudent(e){return this.studentService.get(e,{context:new B().set(Y,{disableErrorHandlingForStatus:[404]})}).pipe(Q())}loadLegalRepresentatives(e){return this.studentService.getLegalRepresentatives(e)}loadApprenticeshipContracts(e){return this.studentService.getCurrentApprenticeshipContracts(e,{context:new B().set(Y,{disableErrorHandlingForStatus:[404]})}).pipe(Q([]))}loadStayPermitValue(e){return this.dropDownItemsService.getStayPermits().pipe(G(i=>i.find(n=>n.Key===e)?.Value||null))}mapToProfile(e,i,n,S=null){return e?(i=this.getRelevantLegalRepresentatives(e,i),E([this.loadLegalRepresentativPersons(i),this.loadJobTrainers(n),this.loadApprenticeshipManagers(n)]).pipe(G(([A,T,P])=>this.createProfile(e,S,i,A,n,P,T)))):M(null)}loadLegalRepresentativPersons(e){return e.length===0?M([]):this.personsService.getListForIds(e.map(i=>i.RepresentativeId))}loadJobTrainers(e){let i=e.map(n=>n.JobTrainer).filter(n=>typeof n=="number");return i.length===0?M([]):E(i.map(n=>this.jobTrainersService.get(n)))}loadApprenticeshipManagers(e){let i=e.map(n=>n.ApprenticeshipManagerId);return i.length===0?M([]):E(i.map(n=>this.apprenticeshipManagersService.get(n)))}createProfile(e,i,n,S,A,T,P){return{student:e,stayPermitValue:i||void 0,legalRepresentativePersons:n.map(H=>this.findPerson(H.RepresentativeId,S)).filter(Z),apprenticeshipCompanies:A.map(H=>this.createApprenticeshipCompany(H,T,P))}}getRelevantLegalRepresentatives(e,i){let n=fe(e);return i.filter(S=>!n||S.RepresentativeAfterMajority)}createApprenticeshipCompany(e,i,n){return{apprenticeshipContract:e,jobTrainer:this.findPerson(e.JobTrainer,n),apprenticeshipManager:this.findPerson(e.ApprenticeshipManagerId,i)}}findPerson(e,i){return e&&i.find(n=>n.Id===e)||null}static{this.\u0275fac=function(i){return new(i||t)(f(le),f(ce),f(ye),f(xe),f(me),f(se),f(N))}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Gt=(()=>{class t{constructor(e,i){this.settings=e,this.storageService=i,this.avatarStyles={}}ngOnChanges(e){e.studentId&&(this.avatarStyles=this.buildAvatarStyles(this.studentId))}buildAvatarStyles(e){return{"background-image":[this.buildAvatarUrl(e),this.fallbackAvatarUrl].map(i=>`url(${i})`).join(", ")}}buildAvatarUrl(e){let i=this.storageService.getAccessToken()||"";return`${this.settings.apiUrl}/Files/personPictures/${e}?token=${i}`}get fallbackAvatarUrl(){return`${this.settings.scriptsAndAssetsPath}/assets/images/avatar-placeholder.png`}static{this.\u0275fac=function(i){return new(i||t)(V(j),V(N))}}static{this.\u0275cmp=I({type:t,selectors:[["bkd-avatar"]],inputs:{studentId:"studentId",link:"link",linkParams:"linkParams"},features:[ee],decls:1,vars:5,consts:[[1,"avatar",3,"routerLink","queryParams","ngStyle"]],template:function(i,n){i&1&&s(0,"a",0),i&2&&(ie("disabled",!n.link),ne("routerLink",n.link)("queryParams",n.linkParams)("ngStyle",n.avatarStyles))},dependencies:[oe,ae],styles:["[_nghost-%COMP%]{display:flex}.small[_nghost-%COMP%]{width:40px;min-width:40px;height:50px}.medium[_nghost-%COMP%]{width:58px;min-width:58px;height:75px}.large[_nghost-%COMP%]{width:100px;min-width:100px;height:130px}.avatar[_ngcontent-%COMP%]{flex:1;border:1px solid rgba(0,0,0,.25);background-repeat:no-repeat;background-size:cover;background-position:center}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}"]})}}return t})();export{Ot as a,Qe as b,at as c,pt as d,Gt as e}; diff --git a/public/apps/webapp-schulverwaltung/chunk-QXEPYX24.js b/public/apps/webapp-schulverwaltung/chunk-6XR42WAQ.js similarity index 81% rename from public/apps/webapp-schulverwaltung/chunk-QXEPYX24.js rename to public/apps/webapp-schulverwaltung/chunk-6XR42WAQ.js index 0c83376c..c1c69a53 100644 --- a/public/apps/webapp-schulverwaltung/chunk-QXEPYX24.js +++ b/public/apps/webapp-schulverwaltung/chunk-6XR42WAQ.js @@ -1 +1 @@ -import{y as u}from"./chunk-EDO6DY2V.js";function l(e,n,i){return e.map(t=>{let r=null;t.TypeRef.Id&&(r=n.find(f=>f.Id===t.TypeRef.Id)||null);let o;return t.ConfirmationStateId&&(o=i.find(f=>f.Key===t.ConfirmationStateId)),new u(t,r,null,o)})}function p(e,n,i){return e?n.filter(t=>i.find(r=>r===t.lessonPresence.StudentRef.Id)):n}export{l as a,p as b}; +import{y as u}from"./chunk-SRCW6BUG.js";function l(e,n,i){return e.map(t=>{let r=null;t.TypeRef.Id&&(r=n.find(f=>f.Id===t.TypeRef.Id)||null);let o;return t.ConfirmationStateId&&(o=i.find(f=>f.Key===t.ConfirmationStateId)),new u(t,r,null,o)})}function p(e,n,i){return e?n.filter(t=>i.find(r=>r===t.lessonPresence.StudentRef.Id)):n}export{l as a,p as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-HAKJPBT5.js b/public/apps/webapp-schulverwaltung/chunk-746ASKQ4.js similarity index 93% rename from public/apps/webapp-schulverwaltung/chunk-HAKJPBT5.js rename to public/apps/webapp-schulverwaltung/chunk-746ASKQ4.js index ebf51d62..e81a3db2 100644 --- a/public/apps/webapp-schulverwaltung/chunk-HAKJPBT5.js +++ b/public/apps/webapp-schulverwaltung/chunk-746ASKQ4.js @@ -1 +1 @@ -import{a as it}from"./chunk-HAMVO7SX.js";import{a as J}from"./chunk-Y4QYVF5K.js";import{G as et,L as tt,P as st,Q as rt,b as Qe,g as pe,p as E,q as Ze}from"./chunk-EDO6DY2V.js";import{a as ce,b as N,c as Je,k as Ye,l as ot}from"./chunk-PQGQXFEQ.js";import{a as nt}from"./chunk-5NJNJ42P.js";import{w as _}from"./chunk-JHVNIEZK.js";import{a as Ke}from"./chunk-LTVWFE76.js";import{$a as F,$c as ae,Ab as H,Ad as He,Bb as K,Db as $e,Eb as Ie,F as L,Fa as Ce,Gc as d,Hc as g,Ib as a,Ic as Be,J as ge,Jb as c,Kb as q,Ld as S,M as ie,Ma as j,Mc as v,Nd as qe,Od as We,P as l,Pa as C,Qa as Re,Qd as ze,R as M,Tc as I,Ua as P,Wa as re,Wc as u,X as ve,Xa as G,Xc as W,Ya as X,Z as Se,Za as p,Zc as k,_ as O,_a as m,_c as je,a as V,b as U,bc as _e,bd as z,da as ne,db as Te,ea as se,ed as Pe,f as ye,fb as oe,fc as xe,g as ee,gb as x,gc as $,gd as we,hd as Ne,id as Ve,kc as Ee,l as te,md as Ue,n as y,o as D,od as Me,qb as f,qd as Oe,rb as Le,rd as Ge,s as be,sb as b,vc as Ae,wa as o,x as T,xa as h,xc as De,yc as ke,yd as Xe,zb as w,zd as Fe}from"./chunk-34ZOBT6Z.js";function de(i,r){return i.pipe(y(e=>e.find(t=>t.Key===r)||null))}function _t(i){return i.slice().sort((r,e)=>r.Value.localeCompare(e.Value))}var at=new Se("Confirm Absences Service");function ct(i,r,e){let[t,n]=Ye(e?.in,i,r);return+pe(t)==+pe(n)}var ht=(i,r)=>r.Id,yt=i=>({count:i}),bt=()=>["/edit-absences"];function gt(i,r){if(i&1&&(p(0,"div",4),f(1),a(2,"translate"),m()),i&2){let e=r.$implicit;o(),b(" ",q(2,1,"global.validation-errors."+e.error,e.params)," ")}}function vt(i,r){if(i&1&&(p(0,"div",21),f(1),a(2,"translate"),m()),i&2){let e=r.$implicit;o(),b(" ",q(2,1,"global.validation-errors."+e.error,e.params)," ")}}function St(i,r){if(i&1&&(G(0,vt,3,4,"div",21,re),a(2,"async")),i&2){let e=x(4);X(c(2,0,e.absenceTypeIdErrors$))}}function Ct(i,r){if(i&1&&(p(0,"div",16),F(1,"input",19),a(2,"async"),p(3,"label",20),f(4),m(),j(5,St,3,2),a(6,"async"),m()),i&2){let e,t,n=r.$implicit,s=r.$index,R=x(3);o(),Re("is-invalid",((e=(e=c(2,7,R.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),C("id","absence-type-"+s)("value",n.Id),o(2),C("for","absence-type-"+s),o(),b(" ",n.Designation," "),o(),P(((t=(t=c(6,9,R.absenceTypes$))==null?null:t.length)!==null&&t!==void 0?t:0)-1===s?5:-1)}}function Rt(i,r){if(i&1&&(G(0,Ct,7,11,"div",16,ht),a(2,"async"),p(3,"div",17),f(4),a(5,"translate"),p(6,"a",18),f(7),a(8,"translate"),m()()),i&2){let e=x(2);X(c(2,3,e.absenceTypes$)),o(4),b(" ",c(5,5,"open-absences.edit.remark")," "),o(2),C("routerLink",$e(9,bt)),o(),b(" ",c(8,7,"edit-absences.title")," ")}}function Tt(i,r){i&1&&(p(0,"div",15)(1,"span",22),f(2,"Loading..."),m()())}function Lt(i,r){if(i&1){let e=Te();p(0,"form",3),oe("ngSubmit",function(){ne(e);let n=x();return se(n.onSubmit())}),G(1,gt,3,4,"div",4,re),a(3,"async"),p(4,"div",5)(5,"div",6),F(6,"input",7),p(7,"label",8),f(8),m(),j(9,Rt,9,10),m(),p(10,"div",9),F(11,"input",10),p(12,"label",11),f(13),m()()(),p(14,"div",12)(15,"button",13),a(16,"async"),oe("click",function(){ne(e);let n=x();return se(n.cancel())}),f(17),a(18,"translate"),m(),p(19,"button",14),a(20,"async"),f(21),a(22,"translate"),j(23,Tt,3,0,"div",15),a(24,"async"),m()()()}if(i&2){let e=x(),t=K(0),n=K(2),s=K(4);C("formGroup",t),o(),X(c(3,11,e.formErrors$)),o(5),C("value",s.Key),o(2),b(" ",s.Value," "),o(),P(t.get("absenceTypeId")?9:-1),o(2),C("value",n.Key),o(2),b(" ",n.Value," "),o(2),C("disabled",c(16,13,e.saving$)),o(2),b(" ",c(18,15,"open-absences.edit.cancel")," "),o(2),C("disabled",c(20,17,e.saving$)),o(2),b(" ",c(22,19,"open-absences.edit.save")," "),o(2),P(c(24,21,e.saving$)?23:-1)}}var Zt=(()=>{class i{constructor(e,t,n,s,R,B,A,dt,mt,lt,ft){this.fb=e,this.router=t,this.activatedRoute=n,this.toastService=s,this.translate=R,this.selectionService=B,this.dropDownItemsService=A,this.presenceTypesService=dt,this.updateService=mt,this.settings=lt,this.openAbsencesEditService=ft,this.formGroup$=this.selectionService.selectedWithoutPresenceType$.pipe(y(this.createFormGroup.bind(this)),ie(1)),this.saving$=new ee(!1),this.submitted$=new ee(!1),this.formErrors$=ce(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=ce(this.formGroup$,this.submitted$,"absenceTypeId"),this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(ie(1)),this.excusedState$=de(this.confirmationStates$,this.settings.excusedAbsenceStateId),this.unexcusedState$=de(this.confirmationStates$,this.settings.unexcusedAbsenceStateId),this.absenceTypes$=this.presenceTypesService.confirmationTypes$,this.destroy$=new ye}ngOnInit(){this.selectionService.selectedIds$.pipe(L(1)).subscribe(e=>{e.length===0&&this.navigateBack()}),Je(this.formGroup$,"confirmationValue").pipe(M(this.destroy$)).subscribe(e=>{typeof e=="number"&&this.updateAbsenceTypeIdDisabled(e)}),D([N(this.formGroup$,"confirmationValue").pipe(T(_)),N(this.formGroup$,"absenceTypeId").pipe(T(_)),this.saving$]).pipe(M(this.destroy$)).subscribe(([e,t,n])=>{n?(e.disable(),t.disable()):(e.enable(),this.updateAbsenceTypeIdDisabled(e.value))}),D([N(this.formGroup$,"confirmationValue").pipe(T(_)),this.excusedState$.pipe(L(1),T(_))]).pipe(M(this.destroy$)).subscribe(([e,t])=>e.setValue(t.Key))}ngOnDestroy(){this.destroy$.next()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(L(1)).subscribe(e=>{if(e.valid){let{confirmationValue:t,absenceTypeId:n}=e.value;this.save(t,n)}})}cancel(){this.navigateBack()}getSelectedCount(){return this.selectionService.selectedLessons$.pipe(y(e=>e.length))}createFormGroup(e){return e.length>0?this.fb.group({confirmationValue:[null],absenceTypeId:[null,we.required]}):this.fb.group({confirmationValue:[null]})}updateAbsenceTypeIdDisabled(e){D([N(this.formGroup$,"absenceTypeId").pipe(L(1),T(_)),this.excusedState$.pipe(L(1),T(_))]).subscribe(([t,n])=>{e===n.Key?t.enable():t.disable()})}save(e,t){this.saving$.next(!0),D([this.selectionService.selectedIds$.pipe(L(1)),this.unexcusedState$.pipe(L(1),T(_))]).pipe(l(([n,s])=>D(n.map(({lessonIds:R,personId:B,presenceTypeId:A})=>this.updateService.confirmLessonPresences(R,[B],this.getNewAbsenceTypeId(A,e,Number(s.Key),t),e)))),ge(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}getNewAbsenceTypeId(e,t,n,s){if(!e)throw new Error("absence type id cannot be null");return t===n?this.settings.absencePresenceTypeId:e===this.settings.absencePresenceTypeId?s:e}onSaveSuccess(){this.openAbsencesEditService?.updateAfterConfirm&&this.openAbsencesEditService.updateAfterConfirm(),this.toastService.success(this.translate.instant("open-absences.edit.save-success")),this.navigateBack()}navigateBack(){this.router.navigate(this.openAbsencesEditService?.confirmBackLink||[".."],{relativeTo:this.activatedRoute,queryParams:this.openAbsencesEditService?.confirmBackLinkParams})}static{this.\u0275fac=function(t){return new(t||i)(h(Xe),h(De),h(Ae),h(Ke),h(qe),h(tt),h(it),h(st),h(rt),h(z),h(at,8))}}static{this.\u0275cmp=Ce({type:i,selectors:[["bkd-confirm-absences"]],decls:16,vars:21,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"alert","alert-danger"],[1,"form-group","pb-4"],[1,"form-check","mt-2","mb-3","pb-3","border-bottom"],["type","radio","id","excused","formControlName","confirmationValue",1,"form-check-input",3,"value"],["for","excused",1,"form-check-label"],[1,"form-check","mt-3","mb-3","pb-3","border-bottom"],["type","radio","id","unexcused","formControlName","confirmationValue",1,"form-check-input",3,"value"],["for","unexcused",1,"form-check-label"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"form-check","my-3"],[1,"remark"],[3,"routerLink"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback"],[1,"visually-hidden"]],template:function(t,n){if(t&1&&(w(0),a(1,"async"),w(2),a(3,"async"),w(4),a(5,"async"),p(6,"div",0)(7,"h1"),f(8),a(9,"translate"),m(),p(10,"div",1),w(11),a(12,"async"),f(13),a(14,"translate"),m(),j(15,Lt,25,23,"form",2),m()),t&2){let s=H(c(1,3,n.formGroup$));o(2);let R=H(c(3,6,n.unexcusedState$));o(2);let B=H(c(5,9,n.excusedState$));o(4),Le(c(9,12,"open-absences.edit.title"));let A=c(12,14,n.getSelectedCount());o(5),b(" ",q(14,16,A===1?"open-absences.edit.lesson-selected":"open-absences.edit.lessons-selected",Ie(19,yt,A))," "),o(2),P(s&&R&&B?15:-1)}},dependencies:[Fe,Ue,Pe,Me,Ne,Ve,He,Oe,Ge,ke,_e,We],encapsulation:2,changeDetection:0})}}return i})();var pt=v({StudentRef:u,StudentFullName:d,TotalAbsences:g,TotalAbsencesUnconfirmed:g,TotalAbsencesValidExcuse:g,TotalAbsencesWithoutExcuse:g,TotalAbsencesUnchecked:g,TotalDispensations:g,TotalHalfDays:g,TotalIncidents:g});var me=v({Id:d,LessonRef:u,StudentRef:u,EventRef:u,TypeRef:W,RegistrationRef:W,StudyClassRef:W,ConfirmationStateId:I(g),EventDesignation:d,HasStudyCourseConfirmationCode:Be,LessonDateTimeFrom:k,LessonDateTimeTo:k,Comment:I(d),Date:I(je),Type:I(d),StudentFullName:d,StudyClassNumber:d,TeacherInformation:I(d)});var Y=v({LessonRef:u,EventRef:u,StudyClassNumber:d,StudentRef:u});var le=v({LessonRef:u,EventRef:u,EventDesignation:d,StudyClassNumber:d,TeacherInformation:I(d),LessonDateTimeFrom:k,LessonDateTimeTo:k});function fe(i){return r=>r.pipe(l(e=>{let t=Number(e.headers.get("X-Pagination-Offset")),n=Number(e.headers.get("X-Pagination-Total"));return S(i)(e.body).pipe(y(s=>({offset:t,total:n,entries:s})))}))}function Z(i,r,e=new $){return e.set("offset",String(i)).set("limit",String(r))}function ue(i=new xe){return i.set("X-Pagination-Total","on")}var Di=(()=>{class i extends nt{constructor(e,t,n){super(e,t,me,"LessonPresences"),this.storage=n,this.lessonPresenceRefCodec=v(ae(this.codec.props,["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"])),this.lessonPresenceIdCodec=v(ae(this.codec.props,["Id"]))}getLessonsByDate(e){let t={fields:Object.keys(le.props).join(","),"filter.LessonDateTimeFrom":`=${E(e,"yyyy-MM-dd")}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(l(S(le)))}getLessonStudyClassesByDate(e){let t={fields:Object.keys(Y.props).join(","),"filter.LessonDateTimeFrom":`=${E(e,"yyyy-MM-dd")}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(l(S(Y)))}getLessonStudyClassesByEvent(e){let t={"filter.EventRef":`=${e}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(l(S(Y)))}getListByLessons(e){if(e.length===0)return te([]);let n={"filter.LessonRef":`;${e.map(s=>s.LessonRef.Id).join(";")}`};return this.getList({params:n,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListByDateStudentClass(e,t,n){let s={"filter.LessonDateTimeFrom":`=${E(e,"yyyy-MM-dd")}`,"filter.StudentRef":`=${t}`};return n!=null&&(s["filter.StudyClassRef"]=`=${n}`),this.getList({params:s,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListForToday(){return this.http.get(`${this.baseUrl}/Today`,{headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(l(S(this.codec)))}getListOfUnconfirmed(e){return J(this.storage.getPayload()?.roles,"ClassTeacherRole")?be([this.getListOfUnconfirmedClassTeacher(e),this.getListOfUnconfirmedLessonTeacher(e)]).pipe(y(ot(et))):J(this.storage.getPayload()?.roles,"LessonTeacherRole")?this.getListOfUnconfirmedLessonTeacher(e):J(this.storage.getPayload()?.roles,"AbsenceAdministratorRole")?this.getListOfUnconfirmedAbsenceAdministrator(e):te([])}getStatistics(e,t,n){let s=he([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]]);return s=$t(t,s),s=Z(n,this.settings.paginationLimit,s),this.http.get(`${this.baseUrl}/Statistics`,{params:s,headers:ue(),observe:"response"}).pipe(fe(pt))}getLessonRefs(e){let t=he([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]]);return t=t.set("filter.TypeRef",">0"),t=t.set("fields",["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"].join(",")),t=t.set("limit","1500"),this.http.get(`${this.baseUrl}/`,{params:t}).pipe(l(S(this.lessonPresenceRefCodec)))}getRegistrationRefsByEventIds(e){let t=new $;return t.set("filter.EventRef",`;${e.join(";")}`),t=t.set("fields",["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"].join(",")),this.http.get(`${this.baseUrl}/`,{params:t}).pipe(l(S(this.lessonPresenceRefCodec)))}getFilteredList(e,t,n){let s=he([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]],new $({fromObject:n}));return e.teacher&&(s=s.set("filter.TeacherInformation",`~*${e.teacher}*`)),e.dateFrom&&e.dateTo&&ct(e.dateFrom,e.dateTo)?s=s.set("filter.LessonDateTimeFrom",`=${E(e.dateFrom,"yyyy-MM-dd")}`):(e.dateFrom&&(s=s.set("filter.LessonDateTimeFrom",`>${E(Ze(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(s=s.set("filter.LessonDateTimeTo",`<${E(Qe(e.dateTo,1),"yyyy-MM-dd")}`))),e.weekdays&&(s=s.set("filter.WeekdayId",`;${e.weekdays.join(";")}`)),e.confirmationStates&&(s=s.set("filter.ConfirmationStateId",`;${e.confirmationStates.join(";")}`)),e.incidentTypes&&(s=s.set("filter.TypeRef",`;${e.incidentTypes.join(";")}`)),e.presenceTypes&&(s=s.set("filter.TypeRef",`;${e.presenceTypes.join(";")}`)),e.incidentTypes&&e.presenceTypes&&(s=s.set("filter.TypeRef",`;${e.presenceTypes.join(";")};${e.incidentTypes.join(";")}`)),this.http.get(`${this.baseUrl}/`,{params:Z(t,this.settings.paginationLimit,s),headers:ue(),observe:"response"}).pipe(fe(me))}hasLessonsLessonTeacher(){let e=new $().set("fields","Id");return this.http.get(`${this.baseUrl}/`,{params:Z(0,1,e),headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(l(S(this.lessonPresenceIdCodec)),y(t=>t.length>0))}checkableAbsencesCount(){return this.http.get(`${this.baseUrl}/`,{headers:{"X-Role-Restriction":"LessonTeacherRole"},params:{"filter.ConfirmationStateId":`;${this.settings.checkableAbsenceStateId}`,fields:"Id,ConfirmationStateId"}}).pipe(l(S(this.lessonPresenceIdCodec)),y(e=>e.length))}getListOfUnconfirmedLessonTeacher(e){return this.getList({headers:{"X-Role-Restriction":"LessonTeacherRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=false"})})}getListOfUnconfirmedClassTeacher(e){return this.getList({headers:{"X-Role-Restriction":"ClassTeacherRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=true"})})}getListOfUnconfirmedAbsenceAdministrator(e){return this.getList({headers:{"X-Role-Restriction":"AbsenceAdministratorRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`})})}static{this.\u0275fac=function(t){return new(t||i)(O(Ee),O(z),O(ze))}}static{this.\u0275prov=ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function he(i,r=new $){return i.reduce((e,[t,n])=>t&&n?e.set(`filter.${n}`,`=${t}`):e,r)}function $t(i,r=new $){return i?r.set("sort",`${i.key}.${i.ascending?"asc":"desc"}`):r}export{_t as a,at as b,ct as c,Zt as d,Di as e}; +import{a as it}from"./chunk-DTTSX64G.js";import{a as J}from"./chunk-Y4QYVF5K.js";import{G as et,L as tt,P as st,Q as rt,b as Qe,g as pe,p as E,q as Ze}from"./chunk-SRCW6BUG.js";import{a as ce,b as N,c as Je,k as Ye,l as ot}from"./chunk-GOGVGWFJ.js";import{a as nt}from"./chunk-PSYDBHTH.js";import{w as _}from"./chunk-W4U7QKJF.js";import{a as Ke}from"./chunk-AVBHFGIF.js";import{$a as m,$c as je,Ab as w,Ad as Fe,Bb as H,Bd as He,Cb as K,Eb as $e,F as L,Fb as Ie,Ga as Ce,Hc as d,Ic as g,J as ge,Jb as a,Jc as Be,Kb as c,Lb as q,M as ie,Md as S,Na as j,Nc as v,Od as qe,P as l,Pd as We,Qa as C,R as M,Ra as Re,Rd as ze,Uc as I,Va as P,X as ve,Xa as re,Xc as u,Ya as G,Yc as W,Z as Se,Za as X,_ as O,_a as p,_c as k,a as V,ab as F,ad as ae,b as U,cc as _e,cd as z,ea as ne,eb as Te,f as ye,fa as se,fd as Pe,g as ee,gb as oe,gc as xe,hb as x,hc as $,hd as we,id as Ne,jd as Ve,l as te,lc as Ee,n as y,nd as Ue,o as D,pd as Me,rb as f,rd as Oe,s as be,sb as Le,sd as Ge,tb as b,wc as Ae,x as T,xa as o,ya as h,yc as De,zc as ke,zd as Xe}from"./chunk-2W7IS4PN.js";function de(i,r){return i.pipe(y(e=>e.find(t=>t.Key===r)||null))}function _t(i){return i.slice().sort((r,e)=>r.Value.localeCompare(e.Value))}var at=new Se("Confirm Absences Service");function ct(i,r,e){let[t,n]=Ye(e?.in,i,r);return+pe(t)==+pe(n)}var ht=(i,r)=>r.Id,yt=i=>({count:i}),bt=()=>["/edit-absences"];function gt(i,r){if(i&1&&(p(0,"div",4),f(1),a(2,"translate"),m()),i&2){let e=r.$implicit;o(),b(" ",q(2,1,"global.validation-errors."+e.error,e.params)," ")}}function vt(i,r){if(i&1&&(p(0,"div",21),f(1),a(2,"translate"),m()),i&2){let e=r.$implicit;o(),b(" ",q(2,1,"global.validation-errors."+e.error,e.params)," ")}}function St(i,r){if(i&1&&(G(0,vt,3,4,"div",21,re),a(2,"async")),i&2){let e=x(4);X(c(2,0,e.absenceTypeIdErrors$))}}function Ct(i,r){if(i&1&&(p(0,"div",16),F(1,"input",19),a(2,"async"),p(3,"label",20),f(4),m(),j(5,St,3,2),a(6,"async"),m()),i&2){let e,t,n=r.$implicit,s=r.$index,R=x(3);o(),Re("is-invalid",((e=(e=c(2,7,R.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),C("id","absence-type-"+s)("value",n.Id),o(2),C("for","absence-type-"+s),o(),b(" ",n.Designation," "),o(),P(((t=(t=c(6,9,R.absenceTypes$))==null?null:t.length)!==null&&t!==void 0?t:0)-1===s?5:-1)}}function Rt(i,r){if(i&1&&(G(0,Ct,7,11,"div",16,ht),a(2,"async"),p(3,"div",17),f(4),a(5,"translate"),p(6,"a",18),f(7),a(8,"translate"),m()()),i&2){let e=x(2);X(c(2,3,e.absenceTypes$)),o(4),b(" ",c(5,5,"open-absences.edit.remark")," "),o(2),C("routerLink",$e(9,bt)),o(),b(" ",c(8,7,"edit-absences.title")," ")}}function Tt(i,r){i&1&&(p(0,"div",15)(1,"span",22),f(2,"Loading..."),m()())}function Lt(i,r){if(i&1){let e=Te();p(0,"form",3),oe("ngSubmit",function(){ne(e);let n=x();return se(n.onSubmit())}),G(1,gt,3,4,"div",4,re),a(3,"async"),p(4,"div",5)(5,"div",6),F(6,"input",7),p(7,"label",8),f(8),m(),j(9,Rt,9,10),m(),p(10,"div",9),F(11,"input",10),p(12,"label",11),f(13),m()()(),p(14,"div",12)(15,"button",13),a(16,"async"),oe("click",function(){ne(e);let n=x();return se(n.cancel())}),f(17),a(18,"translate"),m(),p(19,"button",14),a(20,"async"),f(21),a(22,"translate"),j(23,Tt,3,0,"div",15),a(24,"async"),m()()()}if(i&2){let e=x(),t=K(0),n=K(2),s=K(4);C("formGroup",t),o(),X(c(3,11,e.formErrors$)),o(5),C("value",s.Key),o(2),b(" ",s.Value," "),o(),P(t.get("absenceTypeId")?9:-1),o(2),C("value",n.Key),o(2),b(" ",n.Value," "),o(2),C("disabled",c(16,13,e.saving$)),o(2),b(" ",c(18,15,"open-absences.edit.cancel")," "),o(2),C("disabled",c(20,17,e.saving$)),o(2),b(" ",c(22,19,"open-absences.edit.save")," "),o(2),P(c(24,21,e.saving$)?23:-1)}}var Zt=(()=>{class i{constructor(e,t,n,s,R,B,A,dt,mt,lt,ft){this.fb=e,this.router=t,this.activatedRoute=n,this.toastService=s,this.translate=R,this.selectionService=B,this.dropDownItemsService=A,this.presenceTypesService=dt,this.updateService=mt,this.settings=lt,this.openAbsencesEditService=ft,this.formGroup$=this.selectionService.selectedWithoutPresenceType$.pipe(y(this.createFormGroup.bind(this)),ie(1)),this.saving$=new ee(!1),this.submitted$=new ee(!1),this.formErrors$=ce(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=ce(this.formGroup$,this.submitted$,"absenceTypeId"),this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(ie(1)),this.excusedState$=de(this.confirmationStates$,this.settings.excusedAbsenceStateId),this.unexcusedState$=de(this.confirmationStates$,this.settings.unexcusedAbsenceStateId),this.absenceTypes$=this.presenceTypesService.confirmationTypes$,this.destroy$=new ye}ngOnInit(){this.selectionService.selectedIds$.pipe(L(1)).subscribe(e=>{e.length===0&&this.navigateBack()}),Je(this.formGroup$,"confirmationValue").pipe(M(this.destroy$)).subscribe(e=>{typeof e=="number"&&this.updateAbsenceTypeIdDisabled(e)}),D([N(this.formGroup$,"confirmationValue").pipe(T(_)),N(this.formGroup$,"absenceTypeId").pipe(T(_)),this.saving$]).pipe(M(this.destroy$)).subscribe(([e,t,n])=>{n?(e.disable(),t.disable()):(e.enable(),this.updateAbsenceTypeIdDisabled(e.value))}),D([N(this.formGroup$,"confirmationValue").pipe(T(_)),this.excusedState$.pipe(L(1),T(_))]).pipe(M(this.destroy$)).subscribe(([e,t])=>e.setValue(t.Key))}ngOnDestroy(){this.destroy$.next()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(L(1)).subscribe(e=>{if(e.valid){let{confirmationValue:t,absenceTypeId:n}=e.value;this.save(t,n)}})}cancel(){this.navigateBack()}getSelectedCount(){return this.selectionService.selectedLessons$.pipe(y(e=>e.length))}createFormGroup(e){return e.length>0?this.fb.group({confirmationValue:[null],absenceTypeId:[null,we.required]}):this.fb.group({confirmationValue:[null]})}updateAbsenceTypeIdDisabled(e){D([N(this.formGroup$,"absenceTypeId").pipe(L(1),T(_)),this.excusedState$.pipe(L(1),T(_))]).subscribe(([t,n])=>{e===n.Key?t.enable():t.disable()})}save(e,t){this.saving$.next(!0),D([this.selectionService.selectedIds$.pipe(L(1)),this.unexcusedState$.pipe(L(1),T(_))]).pipe(l(([n,s])=>D(n.map(({lessonIds:R,personId:B,presenceTypeId:A})=>this.updateService.confirmLessonPresences(R,[B],this.getNewAbsenceTypeId(A,e,Number(s.Key),t),e)))),ge(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}getNewAbsenceTypeId(e,t,n,s){if(!e)throw new Error("absence type id cannot be null");return t===n?this.settings.absencePresenceTypeId:e===this.settings.absencePresenceTypeId?s:e}onSaveSuccess(){this.openAbsencesEditService?.updateAfterConfirm&&this.openAbsencesEditService.updateAfterConfirm(),this.toastService.success(this.translate.instant("open-absences.edit.save-success")),this.navigateBack()}navigateBack(){this.router.navigate(this.openAbsencesEditService?.confirmBackLink||[".."],{relativeTo:this.activatedRoute,queryParams:this.openAbsencesEditService?.confirmBackLinkParams})}static{this.\u0275fac=function(t){return new(t||i)(h(Xe),h(De),h(Ae),h(Ke),h(qe),h(tt),h(it),h(st),h(rt),h(z),h(at,8))}}static{this.\u0275cmp=Ce({type:i,selectors:[["bkd-confirm-absences"]],decls:16,vars:21,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"alert","alert-danger"],[1,"form-group","pb-4"],[1,"form-check","mt-2","mb-3","pb-3","border-bottom"],["type","radio","id","excused","formControlName","confirmationValue",1,"form-check-input",3,"value"],["for","excused",1,"form-check-label"],[1,"form-check","mt-3","mb-3","pb-3","border-bottom"],["type","radio","id","unexcused","formControlName","confirmationValue",1,"form-check-input",3,"value"],["for","unexcused",1,"form-check-label"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"form-check","my-3"],[1,"remark"],[3,"routerLink"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback"],[1,"visually-hidden"]],template:function(t,n){if(t&1&&(w(0),a(1,"async"),w(2),a(3,"async"),w(4),a(5,"async"),p(6,"div",0)(7,"h1"),f(8),a(9,"translate"),m(),p(10,"div",1),w(11),a(12,"async"),f(13),a(14,"translate"),m(),j(15,Lt,25,23,"form",2),m()),t&2){let s=H(c(1,3,n.formGroup$));o(2);let R=H(c(3,6,n.unexcusedState$));o(2);let B=H(c(5,9,n.excusedState$));o(4),Le(c(9,12,"open-absences.edit.title"));let A=c(12,14,n.getSelectedCount());o(5),b(" ",q(14,16,A===1?"open-absences.edit.lesson-selected":"open-absences.edit.lessons-selected",Ie(19,yt,A))," "),o(2),P(s&&R&&B?15:-1)}},dependencies:[Fe,Ue,Pe,Me,Ne,Ve,He,Oe,Ge,ke,_e,We],encapsulation:2,changeDetection:0})}}return i})();var pt=v({StudentRef:u,StudentFullName:d,TotalAbsences:g,TotalAbsencesUnconfirmed:g,TotalAbsencesValidExcuse:g,TotalAbsencesWithoutExcuse:g,TotalAbsencesUnchecked:g,TotalDispensations:g,TotalHalfDays:g,TotalIncidents:g});var me=v({Id:d,LessonRef:u,StudentRef:u,EventRef:u,TypeRef:W,RegistrationRef:W,StudyClassRef:W,ConfirmationStateId:I(g),EventDesignation:d,HasStudyCourseConfirmationCode:Be,LessonDateTimeFrom:k,LessonDateTimeTo:k,Comment:I(d),Date:I(je),Type:I(d),StudentFullName:d,StudyClassNumber:d,TeacherInformation:I(d)});var Y=v({LessonRef:u,EventRef:u,StudyClassNumber:d,StudentRef:u});var le=v({LessonRef:u,EventRef:u,EventDesignation:d,StudyClassNumber:d,TeacherInformation:I(d),LessonDateTimeFrom:k,LessonDateTimeTo:k});function fe(i){return r=>r.pipe(l(e=>{let t=Number(e.headers.get("X-Pagination-Offset")),n=Number(e.headers.get("X-Pagination-Total"));return S(i)(e.body).pipe(y(s=>({offset:t,total:n,entries:s})))}))}function Z(i,r,e=new $){return e.set("offset",String(i)).set("limit",String(r))}function ue(i=new xe){return i.set("X-Pagination-Total","on")}var Di=(()=>{class i extends nt{constructor(e,t,n){super(e,t,me,"LessonPresences"),this.storage=n,this.lessonPresenceRefCodec=v(ae(this.codec.props,["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"])),this.lessonPresenceIdCodec=v(ae(this.codec.props,["Id"]))}getLessonsByDate(e){let t={fields:Object.keys(le.props).join(","),"filter.LessonDateTimeFrom":`=${E(e,"yyyy-MM-dd")}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(l(S(le)))}getLessonStudyClassesByDate(e){let t={fields:Object.keys(Y.props).join(","),"filter.LessonDateTimeFrom":`=${E(e,"yyyy-MM-dd")}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(l(S(Y)))}getLessonStudyClassesByEvent(e){let t={"filter.EventRef":`=${e}`,sort:"LessonDateTimeFrom"},n={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:n}).pipe(l(S(Y)))}getListByLessons(e){if(e.length===0)return te([]);let n={"filter.LessonRef":`;${e.map(s=>s.LessonRef.Id).join(";")}`};return this.getList({params:n,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListByDateStudentClass(e,t,n){let s={"filter.LessonDateTimeFrom":`=${E(e,"yyyy-MM-dd")}`,"filter.StudentRef":`=${t}`};return n!=null&&(s["filter.StudyClassRef"]=`=${n}`),this.getList({params:s,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListForToday(){return this.http.get(`${this.baseUrl}/Today`,{headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(l(S(this.codec)))}getListOfUnconfirmed(e){return J(this.storage.getPayload()?.roles,"ClassTeacherRole")?be([this.getListOfUnconfirmedClassTeacher(e),this.getListOfUnconfirmedLessonTeacher(e)]).pipe(y(ot(et))):J(this.storage.getPayload()?.roles,"LessonTeacherRole")?this.getListOfUnconfirmedLessonTeacher(e):J(this.storage.getPayload()?.roles,"AbsenceAdministratorRole")?this.getListOfUnconfirmedAbsenceAdministrator(e):te([])}getStatistics(e,t,n){let s=he([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]]);return s=$t(t,s),s=Z(n,this.settings.paginationLimit,s),this.http.get(`${this.baseUrl}/Statistics`,{params:s,headers:ue(),observe:"response"}).pipe(fe(pt))}getLessonRefs(e){let t=he([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]]);return t=t.set("filter.TypeRef",">0"),t=t.set("fields",["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"].join(",")),t=t.set("limit","1500"),this.http.get(`${this.baseUrl}/`,{params:t}).pipe(l(S(this.lessonPresenceRefCodec)))}getRegistrationRefsByEventIds(e){let t=new $;return t.set("filter.EventRef",`;${e.join(";")}`),t=t.set("fields",["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"].join(",")),this.http.get(`${this.baseUrl}/`,{params:t}).pipe(l(S(this.lessonPresenceRefCodec)))}getFilteredList(e,t,n){let s=he([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]],new $({fromObject:n}));return e.teacher&&(s=s.set("filter.TeacherInformation",`~*${e.teacher}*`)),e.dateFrom&&e.dateTo&&ct(e.dateFrom,e.dateTo)?s=s.set("filter.LessonDateTimeFrom",`=${E(e.dateFrom,"yyyy-MM-dd")}`):(e.dateFrom&&(s=s.set("filter.LessonDateTimeFrom",`>${E(Ze(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(s=s.set("filter.LessonDateTimeTo",`<${E(Qe(e.dateTo,1),"yyyy-MM-dd")}`))),e.weekdays&&(s=s.set("filter.WeekdayId",`;${e.weekdays.join(";")}`)),e.confirmationStates&&(s=s.set("filter.ConfirmationStateId",`;${e.confirmationStates.join(";")}`)),e.incidentTypes&&(s=s.set("filter.TypeRef",`;${e.incidentTypes.join(";")}`)),e.presenceTypes&&(s=s.set("filter.TypeRef",`;${e.presenceTypes.join(";")}`)),e.incidentTypes&&e.presenceTypes&&(s=s.set("filter.TypeRef",`;${e.presenceTypes.join(";")};${e.incidentTypes.join(";")}`)),this.http.get(`${this.baseUrl}/`,{params:Z(t,this.settings.paginationLimit,s),headers:ue(),observe:"response"}).pipe(fe(me))}hasLessonsLessonTeacher(){let e=new $().set("fields","Id");return this.http.get(`${this.baseUrl}/`,{params:Z(0,1,e),headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(l(S(this.lessonPresenceIdCodec)),y(t=>t.length>0))}checkableAbsencesCount(){return this.http.get(`${this.baseUrl}/`,{headers:{"X-Role-Restriction":"LessonTeacherRole"},params:{"filter.ConfirmationStateId":`;${this.settings.checkableAbsenceStateId}`,fields:"Id,ConfirmationStateId"}}).pipe(l(S(this.lessonPresenceIdCodec)),y(e=>e.length))}getListOfUnconfirmedLessonTeacher(e){return this.getList({headers:{"X-Role-Restriction":"LessonTeacherRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=false"})})}getListOfUnconfirmedClassTeacher(e){return this.getList({headers:{"X-Role-Restriction":"ClassTeacherRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=true"})})}getListOfUnconfirmedAbsenceAdministrator(e){return this.getList({headers:{"X-Role-Restriction":"AbsenceAdministratorRole"},params:U(V({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`})})}static{this.\u0275fac=function(t){return new(t||i)(O(Ee),O(z),O(ze))}}static{this.\u0275prov=ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function he(i,r=new $){return i.reduce((e,[t,n])=>t&&n?e.set(`filter.${n}`,`=${t}`):e,r)}function $t(i,r=new $){return i?r.set("sort",`${i.key}.${i.ascending?"asc":"desc"}`):r}export{_t as a,at as b,ct as c,Zt as d,Di as e}; diff --git a/public/apps/webapp-schulverwaltung/chunk-JZ3SRNI2.js b/public/apps/webapp-schulverwaltung/chunk-7KV2DHNF.js similarity index 86% rename from public/apps/webapp-schulverwaltung/chunk-JZ3SRNI2.js rename to public/apps/webapp-schulverwaltung/chunk-7KV2DHNF.js index 97691b57..15875635 100644 --- a/public/apps/webapp-schulverwaltung/chunk-JZ3SRNI2.js +++ b/public/apps/webapp-schulverwaltung/chunk-7KV2DHNF.js @@ -1 +1 @@ -import{p as Y,r as z,s as Q,t as W,w as X}from"./chunk-U5XSAHDS.js";import"./chunk-Y4QYVF5K.js";import"./chunk-UVJXXYOR.js";import{d as K}from"./chunk-DZUR7EKU.js";import{a as J,b as V}from"./chunk-UPZQ4FTT.js";import{b as U}from"./chunk-5NJNJ42P.js";import{C as w,w as x}from"./chunk-JHVNIEZK.js";import{$a as m,Ab as I,Bb as $,Cb as b,Db as O,Fa as l,Ib as o,Jb as a,M as E,Ma as j,Od as R,P as _,Pa as v,Qd as q,Ua as B,X as P,Za as g,_ as p,_a as u,bc as M,bd as N,gb as A,h as L,n as d,o as k,qb as y,rb as C,s as D,wa as c,wc as H,xa as h,zb as G}from"./chunk-34ZOBT6Z.js";var f=(()=>{class e{constructor(s,t,n,S,se,ne,oe){this.storageService=s,this.loadingService=t,this.coursesRestService=n,this.subscriptionRestService=S,this.reportsService=se,this.gradingScalesRestService=ne,this.settings=oe,this.studentId$=new L(1),this.loading$=this.loadingService.loading$,this.studentCourses$=this.loadCourses().pipe(E(1)),this.studentCoursesSorted$=this.studentCourses$.pipe(d(i=>i.slice().sort((r,ae)=>r.Designation.localeCompare(ae.Designation)))),this.studentCourseIds$=this.studentCourses$.pipe(d(i=>i.flatMap(r=>r.Id))),this.subscriptionIds$=k([this.studentId$,this.studentCourseIds$]).pipe(_(([i,r])=>this.subscriptionRestService.getSubscriptionIdsByStudentAndCourse(i,r))),this.testReports$=this.subscriptionIds$.pipe(d(i=>this.reportsService.getStudentSubscriptionGradesReports(i))),this.tests$=this.studentCourses$.pipe(d(i=>i.flatMap(r=>r.Tests).filter(x))),this.gradingScaleIdsFromTests$=this.tests$.pipe(d(i=>[...i.map(r=>r.GradingScaleId)].filter(x).filter(w))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(d(i=>i.flatMap(r=>r.GradingScaleId).filter(x).filter(w))),this.gradingScaleIds$=k([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(d(([i,r])=>i.concat(r).filter(w))),this.gradingScales$=this.gradingScaleIds$.pipe(_(i=>D(i.map(r=>this.gradingScalesRestService.getGradingScale(r)))));let F=this.storageService.getPayload()?.id_person;F&&this.studentId$.next(Number(F))}loadCourses(){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForStudent())}static{this.\u0275fac=function(t){return new(t||e)(p(q),p(V),p(Y),p(z),p(K),p(Q),p(N))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var de=()=>[],ee=(()=>{class e{constructor(s){this.myGradesService=s}static{this.\u0275fac=function(t){return new(t||e)(h(f))}}static{this.\u0275cmp=l({type:e,selectors:[["bkd-my-grades-header"]],decls:7,vars:7,consts:[[1,"d-flex","justify-content-between","header"],[3,"reports"]],template:function(t,n){if(t&1&&(g(0,"div",0)(1,"div"),y(2),o(3,"translate"),u(),g(4,"div"),m(5,"bkd-reports-link",1),o(6,"async"),u()()),t&2){let S;c(2),C(a(3,2,"my-grades.header")),c(3),v("reports",(S=a(6,4,n.myGradesService.testReports$))!==null&&S!==void 0?S:O(6,de))}},dependencies:[J,M,R],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem}.report[_ngcontent-%COMP%]{margin-left:1rem}"]})}}return e})();function pe(e,re){e&1&&m(0,"bkd-spinner")}function ce(e,re){if(e&1&&m(0,"bkd-dossier-grades-view",1),e&2){A();let s=$(0),t=$(2),n=$(4);v("courses",s)("studentId",t)("gradingScales",n)("isEditable",!1)}}var te=(()=>{class e{constructor(s){this.myGradesService=s}static{this.\u0275fac=function(t){return new(t||e)(h(f))}}static{this.\u0275cmp=l({type:e,selectors:[["bkd-my-grades-show"]],features:[b([W])],decls:14,vars:15,consts:[[1,"bkd-container","bkd-container-limited"],[3,"courses","studentId","gradingScales","isEditable"]],template:function(t,n){t&1&&(G(0),o(1,"async"),G(2),o(3,"async"),G(4),o(5,"async"),g(6,"div",0)(7,"h1"),y(8),o(9,"translate"),u(),m(10,"bkd-my-grades-header"),j(11,pe,1,0,"bkd-spinner"),o(12,"async"),j(13,ce,1,4,"bkd-dossier-grades-view",1),u()),t&2&&(I(a(1,2,n.myGradesService.studentCoursesSorted$)),c(2),I(a(3,5,n.myGradesService.studentId$)),c(2),I(a(5,8,n.myGradesService.gradingScales$)),c(4),C(a(9,11,"my-grades.title")),c(3),B(a(12,13,n.myGradesService.loading$)?11:13))},dependencies:[ee,X,U,M,R],encapsulation:2})}}return e})();var ie=(()=>{class e{constructor(){}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["bkd-my-grades"]],features:[b([f])],decls:1,vars:0,template:function(t,n){t&1&&m(0,"router-outlet")},dependencies:[H],encapsulation:2})}}return e})();var Ee=[{path:"",component:ie,children:[{path:"",component:te}]}];export{Ee as MY_GRADES_ROUTES}; +import{p as Y,r as z,s as Q,t as W,w as X}from"./chunk-A3CECLYB.js";import"./chunk-Y4QYVF5K.js";import"./chunk-AYQPMCNZ.js";import{d as K}from"./chunk-3L4RH6QP.js";import{a as J,b as V}from"./chunk-OSOXMODN.js";import{b as U}from"./chunk-PSYDBHTH.js";import{C as w,w as x}from"./chunk-W4U7QKJF.js";import{$a as u,Ab as G,Bb as I,Cb as $,Db as b,Eb as O,Ga as l,Jb as o,Kb as a,M as E,Na as j,P as _,Pd as R,Qa as v,Rd as q,Va as B,X as P,_ as p,_a as g,ab as m,cc as M,cd as N,h as L,hb as A,n as d,o as k,rb as y,s as D,sb as C,xa as c,xc as H,ya as h}from"./chunk-2W7IS4PN.js";var f=(()=>{class e{constructor(s,t,n,S,se,ne,oe){this.storageService=s,this.loadingService=t,this.coursesRestService=n,this.subscriptionRestService=S,this.reportsService=se,this.gradingScalesRestService=ne,this.settings=oe,this.studentId$=new L(1),this.loading$=this.loadingService.loading$,this.studentCourses$=this.loadCourses().pipe(E(1)),this.studentCoursesSorted$=this.studentCourses$.pipe(d(i=>i.slice().sort((r,ae)=>r.Designation.localeCompare(ae.Designation)))),this.studentCourseIds$=this.studentCourses$.pipe(d(i=>i.flatMap(r=>r.Id))),this.subscriptionIds$=k([this.studentId$,this.studentCourseIds$]).pipe(_(([i,r])=>this.subscriptionRestService.getSubscriptionIdsByStudentAndCourse(i,r))),this.testReports$=this.subscriptionIds$.pipe(d(i=>this.reportsService.getStudentSubscriptionGradesReports(i))),this.tests$=this.studentCourses$.pipe(d(i=>i.flatMap(r=>r.Tests).filter(x))),this.gradingScaleIdsFromTests$=this.tests$.pipe(d(i=>[...i.map(r=>r.GradingScaleId)].filter(x).filter(w))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(d(i=>i.flatMap(r=>r.GradingScaleId).filter(x).filter(w))),this.gradingScaleIds$=k([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(d(([i,r])=>i.concat(r).filter(w))),this.gradingScales$=this.gradingScaleIds$.pipe(_(i=>D(i.map(r=>this.gradingScalesRestService.getGradingScale(r)))));let F=this.storageService.getPayload()?.id_person;F&&this.studentId$.next(Number(F))}loadCourses(){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForStudent())}static{this.\u0275fac=function(t){return new(t||e)(p(q),p(V),p(Y),p(z),p(K),p(Q),p(N))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var de=()=>[],ee=(()=>{class e{constructor(s){this.myGradesService=s}static{this.\u0275fac=function(t){return new(t||e)(h(f))}}static{this.\u0275cmp=l({type:e,selectors:[["bkd-my-grades-header"]],decls:7,vars:7,consts:[[1,"d-flex","justify-content-between","header"],[3,"reports"]],template:function(t,n){if(t&1&&(g(0,"div",0)(1,"div"),y(2),o(3,"translate"),u(),g(4,"div"),m(5,"bkd-reports-link",1),o(6,"async"),u()()),t&2){let S;c(2),C(a(3,2,"my-grades.header")),c(3),v("reports",(S=a(6,4,n.myGradesService.testReports$))!==null&&S!==void 0?S:O(6,de))}},dependencies:[J,M,R],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem}.report[_ngcontent-%COMP%]{margin-left:1rem}"]})}}return e})();function pe(e,re){e&1&&m(0,"bkd-spinner")}function ce(e,re){if(e&1&&m(0,"bkd-dossier-grades-view",1),e&2){A();let s=$(0),t=$(2),n=$(4);v("courses",s)("studentId",t)("gradingScales",n)("isEditable",!1)}}var te=(()=>{class e{constructor(s){this.myGradesService=s}static{this.\u0275fac=function(t){return new(t||e)(h(f))}}static{this.\u0275cmp=l({type:e,selectors:[["bkd-my-grades-show"]],features:[b([W])],decls:14,vars:15,consts:[[1,"bkd-container","bkd-container-limited"],[3,"courses","studentId","gradingScales","isEditable"]],template:function(t,n){t&1&&(G(0),o(1,"async"),G(2),o(3,"async"),G(4),o(5,"async"),g(6,"div",0)(7,"h1"),y(8),o(9,"translate"),u(),m(10,"bkd-my-grades-header"),j(11,pe,1,0,"bkd-spinner"),o(12,"async"),j(13,ce,1,4,"bkd-dossier-grades-view",1),u()),t&2&&(I(a(1,2,n.myGradesService.studentCoursesSorted$)),c(2),I(a(3,5,n.myGradesService.studentId$)),c(2),I(a(5,8,n.myGradesService.gradingScales$)),c(4),C(a(9,11,"my-grades.title")),c(3),B(a(12,13,n.myGradesService.loading$)?11:13))},dependencies:[ee,X,U,M,R],encapsulation:2})}}return e})();var ie=(()=>{class e{constructor(){}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["bkd-my-grades"]],features:[b([f])],decls:1,vars:0,template:function(t,n){t&1&&m(0,"router-outlet")},dependencies:[H],encapsulation:2})}}return e})();var Ee=[{path:"",component:ie,children:[{path:"",component:te}]}];export{Ee as MY_GRADES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-MTEM3R5P.js b/public/apps/webapp-schulverwaltung/chunk-7LHHIW7H.js similarity index 95% rename from public/apps/webapp-schulverwaltung/chunk-MTEM3R5P.js rename to public/apps/webapp-schulverwaltung/chunk-7LHHIW7H.js index 8220c834..bd115f54 100644 --- a/public/apps/webapp-schulverwaltung/chunk-MTEM3R5P.js +++ b/public/apps/webapp-schulverwaltung/chunk-7LHHIW7H.js @@ -1,2 +1,2 @@ -import{a as Gt}from"./chunk-FNU566LQ.js";import{a as Nt}from"./chunk-FFBZO25J.js";import{a as jt,b as Ot,c as Vt}from"./chunk-SVCHNGNX.js";import{f as Fe,g as Ee}from"./chunk-UFRLS5GG.js";import{b as Dt,d as Et}from"./chunk-DZUR7EKU.js";import"./chunk-FLVW3H6P.js";import"./chunk-2UDOWYE6.js";import{a as Ht}from"./chunk-ZA3SEXFP.js";import{H as Tt,I as kt,J as Mt,L as de,P as Y,Q as me,R as Lt,S as Rt,T as Pt,U as Bt,b as xt,g as At,p as _e,q as It,t as De,w as he,x as Ue}from"./chunk-EDO6DY2V.js";import{a as St,l as ue}from"./chunk-PQGQXFEQ.js";import{a as $t,b as Ft}from"./chunk-UPZQ4FTT.js";import{b as wt}from"./chunk-5NJNJ42P.js";import{c as ut,d as ft,e as bt,f as yt,g as _t,h as ht,i as vt,l as gt,w as te,y as Ct}from"./chunk-JHVNIEZK.js";import{a as pe}from"./chunk-LTVWFE76.js";import{$a as S,Ab as J,Ad as Pe,Bb as w,Bd as ee,Cb as se,Db as Z,Eb as oe,F as E,Fa as k,Hd as ce,Ib as r,J as Qe,Ja as ge,Jb as l,Kb as P,L as ze,M as B,Ma as h,Nd as le,O as Ye,Od as D,P as L,Pa as b,Qa as ne,Qd as G,R as Xe,Sa as et,Sc as qe,Ua as C,Wa as Ce,Wb as at,X as ie,Xa as K,Ya as Q,Za as a,_ as j,_a as c,_b as Se,a as Ve,ad as dt,bc as z,bd as H,cc as ct,da as I,db as O,ea as T,ed as Ie,f as ve,fb as g,g as He,gb as _,gc as pt,gd as mt,h as Ge,ha as Je,hd as Te,id as ke,l as q,la as Ze,mb as tt,md as Me,n as y,nb as it,o as x,ob as nt,od as Le,pb as R,qb as d,qd as Re,rb as $,rd as $e,sb as f,tb as X,vc as lt,wa as o,wb as st,wc as xe,x as W,xa as u,xb as ot,xc as re,yb as rt,yc as Ae,yd as ae,zb as N,zd as we}from"./chunk-34ZOBT6Z.js";var je=(()=>{class t{constructor(e,i,n,s,p,v,A,F){this.fb=e,this.router=i,this.toastService=n,this.translate=s,this.presenceTypesService=p,this.updateService=v,this.storageService=A,this.settings=F,this.formGroup=this.createFormGroup(),this.saving$=new He(!1),this.submitted$=new He(!1),this.absenceTypes$=x([this.getConfirmationTypes(),this.getHalfDayType()]).pipe(y(([U,M])=>M?[...U,M]:U)),this.absenceTypeIdErrors$=St(q(this.formGroup),this.submitted$,"absenceTypeId"),this.destroy$=new ve}ngOnInit(){this.selectedLessonIds$.pipe(E(1),W(Rt)).subscribe(()=>this.navigateBack())}ngOnDestroy(){this.destroy$.next()}onSubmit(){if(this.submitted$.next(!0),this.formGroup.valid){let{absenceTypeId:e}=this.formGroup.value;this.save(e)}}cancel(){this.navigateBack()}getSelectedCount(){return this.selectedLessonIds$.pipe(y(e=>e.length))}getConfirmationTypes(){return this.presenceTypesService.confirmationTypes$.pipe(y(e=>e.filter(i=>i.IsAbsence&&i.Id!==this.settings.halfDayPresenceTypeId)))}getHalfDayType(){return q(null)}createFormGroup(){return this.fb.group({absenceTypeId:[null,mt.required]})}save(e){this.saving$.next(!0),this.selectedLessonIds$.pipe(E(1),L(i=>this.updateService.editLessonPresences(i,[Number(this.storageService.getPayload()?.id_person)],e)),Qe(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("my-absences.confirm.save-success")),this.navigateBack()}static{this.\u0275fac=function(i){return new(i||t)(u(ae),u(re),u(pe),u(le),u(Y),u(me),u(G),u(dt))}}static{this.\u0275cmp=k({type:t,selectors:[["ng-component"]],decls:0,vars:0,template:function(i,n){},encapsulation:2})}}return t})();var fe=(()=>{class t{constructor(e,i,n){this.settings=e,this.storageService=i,this.studentsService=n,this.studentId$=new Ge(1),this.lessonAbsences$=this.studentId$.pipe(L(this.loadLessonAbsences.bind(this)),B(1)),this.lessonIncidents$=this.studentId$.pipe(L(this.loadLessonIncidents.bind(this)),B(1)),this.lessonPresences$=this.getLessonPresences(),this.checkableAbsences$=this.getAbsences(this.settings.checkableAbsenceStateId),this.openAbsences$=this.getAbsences(this.settings.unconfirmedAbsenceStateId),this.excusedAbsences$=this.getAbsences(this.settings.excusedAbsenceStateId),this.unexcusedAbsences$=this.getAbsences(this.settings.unexcusedAbsenceStateId),this.incidents$=this.getAbsences(null),this.openLessonAbsences$=x([this.openAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.checkableLessonAbsences$=x([this.checkableAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.excusedLessonAbsences$=x([this.excusedAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.unexcusedLessonAbsences$=x([this.unexcusedAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.incidentsLessonAbsences$=x([this.incidents$.pipe(W(te)),this.lessonIncidents$]).pipe(y(ue(this.getLessonIncidents.bind(this))),B(1)),this.counts$=this.getCounts();let s=this.storageService.getPayload()?.id_person;s&&this.studentId$.next(Number(s))}reset(){this.studentId$.pipe(E(1)).subscribe(e=>this.studentId$.next(e))}getLessonPresences(){return this.getCached(x([this.studentId$,this.lessonAbsences$,this.lessonIncidents$]).pipe(L(([e,i,n])=>this.loadTimetableEntries(e,i,n).pipe(y(s=>this.buildLessonPresences(i,n,s)))),y(Mt)))}getAbsences(e){return this.getCached(this.lessonPresences$.pipe(y(i=>i?.filter(n=>n.ConfirmationStateId===e)||null)))}getLessonAbsences(e,i){let n=e.map(s=>s.LessonRef.Id);return i.filter(s=>n.includes(s.LessonRef.Id))}getLessonIncidents(e,i){let n=e.map(s=>s.LessonRef.Id);return i.filter(s=>n.includes(s.LessonRef.Id))}getCounts(){return x([this.getCount(this.checkableAbsences$),this.getCount(this.openAbsences$),this.getCount(this.excusedAbsences$),this.getCount(this.unexcusedAbsences$),this.getCount(this.incidents$)]).pipe(y(([e,i,n,s,p])=>({checkableAbsences:e,openAbsences:i,excusedAbsences:n,unexcusedAbsences:s,incidents:p,halfDays:null})))}getCached(e){return e.pipe(Ye(null),ze({connector:()=>new Ge(1)}))}getCount(e){return e.pipe(y(i=>i?.length??null))}loadLessonAbsences(e){return this.studentsService.getLessonAbsences(e)}loadLessonIncidents(e){return this.studentsService.getLessonIncidents(e)}loadTimetableEntries(e,i,n){return this.studentsService.getTimetableEntries(e,{"filter.Id":`;${[...i,...n].map(s=>s.LessonRef.Id).join(";")}`})}buildLessonPresences(e,i,n){return[...e,...i].map(s=>this.buildLessonPresence(s,n)).filter(te)}buildLessonPresence(e,i){let n=i.find(s=>s.Id===e.LessonRef.Id);return n?{Id:"",LessonRef:{Id:e.LessonRef.Id,HRef:e.LessonRef.HRef?e.LessonRef.HRef:null},StudentRef:e.StudentRef,EventRef:{Id:0,HRef:null},TypeRef:e.TypeRef,RegistrationRef:{Id:0,HRef:null},StudyClassRef:{Id:0,HRef:null},ConfirmationStateId:"ConfirmationStateId"in e?e.ConfirmationStateId:null,EventDesignation:n.EventDesignation,HasStudyCourseConfirmationCode:!1,LessonDateTimeFrom:n.From,LessonDateTimeTo:n.To,Comment:null,Date:n.From,Type:e.Type,StudentFullName:e.StudentFullName,StudyClassNumber:"",TeacherInformation:n.EventManagerInformation??null}:null}static{this.\u0275fac=function(i){return new(i||t)(j(H),j(G),j(Fe))}}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac})}}return t})();var pi=(t,m)=>m.Id,li=t=>({count:t}),di=t=>({"border-top pt-3":t});function mi(t,m){if(t&1&&(a(0,"div",13),d(1),r(2,"translate"),c()),t&2){let e=m.$implicit;o(),f(" ",P(2,1,"global.validation-errors."+e.error,e.params)," ")}}function ui(t,m){if(t&1&&(K(0,mi,3,4,"div",13,Ce),r(2,"async")),t&2){let e=_(2);Q(l(2,0,e.absenceTypeIdErrors$))}}function fi(t,m){if(t&1&&(a(0,"div",5),S(1,"input",11),r(2,"async"),a(3,"label",12),d(4),c(),h(5,ui,3,2),r(6,"async"),c()),t&2){let e,i,n=m.$implicit,s=m.$index,p=_();b("ngClass",oe(12,di,n.IsHalfDay)),o(),ne("is-invalid",((e=(e=l(2,8,p.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),b("id","absence-type-"+s)("value",n.Id),o(2),b("for","absence-type-"+s),o(),f(" ",n.Designation," "),o(),C(((i=(i=l(6,10,p.absenceTypes$))==null?null:i.length)!==null&&i!==void 0?i:0)-1===s?5:-1)}}function bi(t,m){t&1&&(a(0,"div",10)(1,"span",14),d(2,"Loading..."),c()())}var zt=(()=>{class t extends je{constructor(e,i,n,s,p,v,A,F,U,M){super(e,i,n,s,p,v,A,F),this.myAbsencesService=U,this.selectionService=M,this.titleKey="my-absences.confirm.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(y(Oe=>ce(ee(Oe.map(Ne=>Ne.lessonIds))))),this.confirmationStateId=this.settings.unconfirmedAbsencesRefreshTime}onSaveSuccess(){this.selectionService.clear(),this.myAbsencesService.reset(),super.onSaveSuccess()}navigateBack(){this.router.navigate(["/my-absences"])}static{this.\u0275fac=function(i){return new(i||t)(u(ae),u(re),u(pe),u(le),u(Y),u(me),u(G),u(H),u(fe),u(de))}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-confirm"]],features:[ge],decls:32,vars:39,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],[1,"form-check","my-3",3,"ngClass"],[1,"remark"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback","mt-4"],[1,"visually-hidden"]],template:function(i,n){if(i&1){let s=O();a(0,"div",0)(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1),N(5),r(6,"async"),d(7),r(8,"translate"),c(),a(9,"form",2),g("ngSubmit",function(){return I(s),T(n.onSubmit())}),a(10,"div",3)(11,"label",4),d(12),r(13,"translate"),r(14,"addSpace"),c(),K(15,fi,7,14,"div",5,pi),r(17,"async"),c(),a(18,"div",6),d(19),r(20,"translate"),c(),a(21,"div",7)(22,"button",8),r(23,"async"),g("click",function(){return I(s),T(n.cancel())}),d(24),r(25,"translate"),c(),a(26,"button",9),r(27,"async"),d(28),r(29,"translate"),h(30,bi,3,0,"div",10),r(31,"async"),c()()()()}if(i&2){o(2),$(l(3,11,n.titleKey));let s=l(6,13,n.getSelectedCount());o(5),f(" ",P(8,15,s===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",oe(37,li,s))," "),o(2),b("formGroup",n.formGroup),o(3),X("",l(13,18,"my-absences.confirm.choose-presence-type"),"",P(14,20,":",":"),""),o(3),Q(l(17,23,n.absenceTypes$)),o(4),f(" ",l(20,25,"my-absences.confirm.remark")," "),o(3),b("disabled",l(23,27,n.saving$)),o(2),f(" ",l(25,29,"my-absences.confirm.cancel")," "),o(2),b("disabled",l(27,31,n.saving$)),o(2),f(" ",l(29,33,"my-absences.confirm.save")," "),o(2),C(l(31,35,n.saving$)?30:-1)}},dependencies:[we,Me,Ie,Le,Te,ke,Pe,Re,$e,Se,z,D,Ee],encapsulation:2,changeDetection:0})}}return t})();var be=(()=>{class t extends Ot{get preventAbsencesAfterStart(){if(this._preventAbsencesAfterStart==null){let e=this.storageService.getPayload()?.instance_id,i=this.settings.preventStudentAbsenceAfterLessonStart;this._preventAbsencesAfterStart=e?i.includes(e):!1}return this._preventAbsencesAfterStart}constructor(e,i,n,s,p,v){super(e,i,v,n,"/my-absences/report"),this.studentsService=s,this.storageService=p}getInitialFilter(){return{dateFrom:null,dateTo:null}}isValidFilter(e){return!!(e.dateFrom||e.dateTo)}loadEntries(e,i,n){let s=this.buildRequestParamsFromFilter(e).set("sort","From.asc");return this.loadingService.load(this.loadTimetableEntries(s).pipe(y(p=>this.filterAbsencesAfterLessonStart(p)),L(p=>x([q(p),this.loadLessonAbsences(p),this.loadLessonDispensations(p)])),y(([p,v,A])=>this.buildLessonPresences(p,v,A)),y(p=>({offset:0,total:p.length,entries:p}))),jt)}filterAbsencesAfterLessonStart(e){return this.preventAbsencesAfterStart?e.filter(i=>i.From.getTime()>=new Date().getTime()):e}buildParamsFromFilter(e){let{dateFrom:i,dateTo:n}=e,s={};return i&&(s.dateFrom=_e(i,"yyyy-MM-dd")),n&&(s.dateTo=_e(n,"yyyy-MM-dd")),s}buildRequestParamsFromFilter(e){let i=new pt;return e.dateFrom&&(i=i.set("filter.From",`>${_e(It(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(i=i.set("filter.To",`<${_e(xt(e.dateTo,1),"yyyy-MM-dd")}`)),i}get studentId(){let e=this.storageService.getPayload()?.id_person;if(e==null)throw new Error("No student id available");return Number(e)}loadTimetableEntries(e){return this.studentsService.getTimetableEntries(this.studentId,e)}loadLessonAbsences(e){return e.length>0?this.studentsService.getLessonAbsences(this.studentId,{"filter.Id":`;${e.map(i=>i.Id).join(";")}`}):q([])}loadLessonDispensations(e){return e.length>0?this.studentsService.getLessonDispensations(this.studentId,{"filter.Id":`;${e.map(i=>i.Id).join(";")}`}):q([])}buildLessonPresences(e,i,n){return e.map(s=>this.buildLessonPresence(s,i,n))}buildLessonPresence(e,i,n){let s=i.find(A=>A.LessonRef.Id===e.Id),p=n.find(A=>A.LessonRef.Id===e.Id),v=this.buildLessonPresenceTypeRef(s,p);return{Id:"",LessonRef:{Id:e.Id,HRef:null},StudentRef:(s||p)?.StudentRef||{Id:this.studentId,HRef:null},EventRef:{Id:0,HRef:null},TypeRef:v,RegistrationRef:{Id:0,HRef:null},StudyClassRef:{Id:0,HRef:null},ConfirmationStateId:s?.ConfirmationStateId||p&&this.settings.excusedAbsenceStateId||null,EventDesignation:e.EventDesignation||"",HasStudyCourseConfirmationCode:!1,LessonDateTimeFrom:e.From||new Date,LessonDateTimeTo:e.To||new Date,Comment:null,Date:e.From||new Date,Type:(s||p)?.Type||null,StudentFullName:(s||p)?.StudentFullName||"",StudyClassNumber:"",TeacherInformation:e.EventManagerInformation??null}}buildLessonPresenceTypeRef(e,i){return e?Ve({},e.TypeRef):i?Ve({},i.TypeRef):{Id:null,HRef:null}}static{this.\u0275fac=function(i){return new(i||t)(j(at),j(Ft),j(H),j(Fe),j(G),j(Vt))}}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac})}}return t})();var ye=(()=>{class t extends Tt{constructor(){super(...arguments),this.selectedIds$=this.selection$.pipe(y(kt))}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Je(t)))(n||t)}})()}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac})}}return t})();var yi=(t,m)=>m.Id,_i=t=>({count:t}),hi=t=>({"border-top pt-3":t});function vi(t,m){if(t&1&&(a(0,"div",13),d(1),r(2,"translate"),c()),t&2){let e=m.$implicit;o(),f(" ",P(2,1,"global.validation-errors."+e.error,e.params)," ")}}function gi(t,m){if(t&1&&(K(0,vi,3,4,"div",13,Ce),r(2,"async")),t&2){let e=_(2);Q(l(2,0,e.absenceTypeIdErrors$))}}function Ci(t,m){if(t&1&&(a(0,"div",5),S(1,"input",11),r(2,"async"),a(3,"label",12),d(4),c(),h(5,gi,3,2),r(6,"async"),c()),t&2){let e,i,n=m.$implicit,s=m.$index,p=_();b("ngClass",oe(12,hi,n.IsHalfDay)),o(),ne("is-invalid",((e=(e=l(2,8,p.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),b("id","absence-type-"+s)("value",n.Id),o(2),b("for","absence-type-"+s),o(),f(" ",n.Designation," "),o(),C(((i=(i=l(6,10,p.absenceTypes$))==null?null:i.length)!==null&&i!==void 0?i:0)-1===s?5:-1)}}function Si(t,m){t&1&&(a(0,"div",10)(1,"span",14),d(2,"Loading..."),c()())}var Jt=(()=>{class t extends je{constructor(e,i,n,s,p,v,A,F,U,M){super(e,i,n,s,p,v,A,F),this.state=U,this.selectionService=M,this.titleKey="my-absences.report.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(y(Oe=>ce(ee(Oe.map(Ne=>Ne.lessonIds))))),this.confirmationStateId=this.settings.checkableAbsenceStateId}getHalfDayType(){return this.presenceTypesService.getPresenceType(this.settings.halfDayPresenceTypeId).pipe(y(e=>e.Active?e:null))}onSaveSuccess(){this.selectionService.clear(),this.state.resetEntries(),super.onSaveSuccess()}navigateBack(){this.state.queryParams$.pipe(E(1)).subscribe(e=>{this.router.navigate(["/my-absences/report"],{queryParams:e})})}static{this.\u0275fac=function(i){return new(i||t)(u(ae),u(re),u(pe),u(le),u(Y),u(me),u(G),u(H),u(be),u(ye))}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-confirm"]],features:[ge],decls:32,vars:39,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],[1,"form-check","my-3",3,"ngClass"],[1,"remark"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback","mt-4"],[1,"visually-hidden"]],template:function(i,n){if(i&1){let s=O();a(0,"div",0)(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1),N(5),r(6,"async"),d(7),r(8,"translate"),c(),a(9,"form",2),g("ngSubmit",function(){return I(s),T(n.onSubmit())}),a(10,"div",3)(11,"label",4),d(12),r(13,"translate"),r(14,"addSpace"),c(),K(15,Ci,7,14,"div",5,yi),r(17,"async"),c(),a(18,"div",6),d(19),r(20,"translate"),c(),a(21,"div",7)(22,"button",8),r(23,"async"),g("click",function(){return I(s),T(n.cancel())}),d(24),r(25,"translate"),c(),a(26,"button",9),r(27,"async"),d(28),r(29,"translate"),h(30,Si,3,0,"div",10),r(31,"async"),c()()()()}if(i&2){o(2),$(l(3,11,n.titleKey));let s=l(6,13,n.getSelectedCount());o(5),f(" ",P(8,15,s===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",oe(37,_i,s))," "),o(2),b("formGroup",n.formGroup),o(3),X("",l(13,18,"my-absences.confirm.choose-presence-type"),"",P(14,20,":",":"),""),o(3),Q(l(17,23,n.absenceTypes$)),o(4),f(" ",l(20,25,"my-absences.confirm.remark")," "),o(3),b("disabled",l(23,27,n.saving$)),o(2),f(" ",l(25,29,"my-absences.confirm.cancel")," "),o(2),b("disabled",l(27,31,n.saving$)),o(2),f(" ",l(29,33,"my-absences.confirm.save")," "),o(2),C(l(31,35,n.saving$)?30:-1)}},dependencies:[we,Me,Ie,Le,Te,ke,Pe,Re,$e,Se,z,D,Ee],encapsulation:2,changeDetection:0})}}return t})();var xi=()=>["/my-absences"],ei=(()=>{class t{constructor(){this.filter={dateFrom:null,dateTo:null},this.filterChange=new Ze,this.minDate={year:new Date().getFullYear(),month:new Date().getMonth()+1,day:new Date().getDate()}}updateDateFrom(e){this.filter.dateFrom=e,e&&(this.filter.dateTo=e)}show(){this.filterChange.emit({dateFrom:Zt(this.filter.dateFrom),dateTo:Zt(this.filter.dateTo)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},features:[se([{provide:ht,useClass:gt},{provide:vt,useClass:Nt}])],decls:19,vars:18,consts:[[3,"link"],[1,"filters"],[1,"form-group"],[1,"form-label"],[3,"valueChange","minDate","value"],[1,"buttons"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,n){i&1&&(S(0,"bkd-backlink",0),a(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1)(5,"div",2)(6,"label",3),d(7),r(8,"translate"),c(),a(9,"bkd-date-select",4),g("valueChange",function(p){return n.updateDateFrom(p)}),c()(),a(10,"div",2)(11,"label",3),d(12),r(13,"translate"),c(),a(14,"bkd-date-select",4),rt("valueChange",function(p){return ot(n.filter.dateTo,p)||(n.filter.dateTo=p),p}),c()(),a(15,"div",5)(16,"button",6),g("click",function(){return n.show()}),d(17),r(18,"translate"),c()()()),i&2&&(b("link",Z(17,xi)),o(2),$(l(3,9,"my-absences.report.title")),o(5),$(l(8,11,"my-absences.report.header.date-from")),o(2),b("minDate",n.minDate)("value",n.filter.dateFrom),o(3),$(l(13,13,"my-absences.report.header.date-to")),o(2),b("minDate",n.minDate),st("value",n.filter.dateTo),o(3),f(" ",l(18,15,"my-absences.report.header.show")," "))},dependencies:[Bt,Gt,D],styles:["[_nghost-%COMP%]{display:block;padding-bottom:1rem;border-bottom:1px solid #dee2e6}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.form-group[_ngcontent-%COMP%]{flex:1;min-width:20rem;max-width:40rem;margin-right:1rem;margin-bottom:.5rem}.buttons[_ngcontent-%COMP%]{flex:none;margin-top:1.625rem;margin-right:0}@media (max-width: 575.98px){[_nghost-%COMP%]{padding-bottom:0}.buttons[_ngcontent-%COMP%]{width:100%;margin-top:1rem;margin-bottom:1rem}}"],changeDetection:0})}}return t})();function Zt(t){return t?At(t):null}var Ai=(t,m)=>m.Id;function Ii(t,m){t&1&&S(0,"bkd-spinner")}function Ti(t,m){if(t&1){let e=O();a(0,"div",8)(1,"input",9,2),r(3,"async"),g("change",function(){I(e);let n=_().$implicit,s=_(5);return T(s.selectionService.toggle(n))}),c()()}if(t&2){let e=_().$implicit,i=_(5);o(),b("checked",l(3,1,i.selectionService.isSelected$(e)))}}function ki(t,m){if(t&1&&(a(0,"div")(1,"i",13),d(2),c()()),t&2){_();let e=w(2);et("checkbox presence-category ",e.category,""),o(2),$(e.icon)}}function Mi(t,m){if(t&1&&d(0),t&2){let e=_().$implicit;f(" , ",e.StudyClassNumber," ")}}function Li(t,m){if(t&1&&(a(0,"div",20),d(1),c()),t&2){_();let e=w(15);o(),f(" ",e," ")}}function Ri(t,m){if(t&1){let e=O();a(0,"div",15,1),g("click",function(n){I(e);let s=R(1),p=_(5);return T(p.onRowClick(n,s))}),N(2),r(3,"async"),h(4,Ti,4,3,"div",8)(5,ki,3,4,"div",16),a(6,"div",17),d(7),h(8,Mi,1,1),c(),a(9,"div",18),d(10),r(11,"date"),r(12,"date"),c(),a(13,"div",19),d(14),c(),N(15),r(16,"async"),h(17,Li,2,1,"div",20),a(18,"div",21),d(19),r(20,"date"),c(),a(21,"div",22),d(22),r(23,"bkdDaysDifference"),c(),a(24,"div",23),d(25),r(26,"date"),r(27,"bkdDaysDifference"),c()()}if(t&2){let e=m.$implicit,i=_(5);o(2);let n=J(l(3,11,i.getPresenceCategory(e)));o(2),C(n?5:4),o(3),f(" ",e.EventDesignation," "),o(),C(e.StudyClassNumber?8:-1),o(2),X(" ",P(11,14,e.LessonDateTimeFrom,"HH:mm"),"\u2013",P(12,17,e.LessonDateTimeTo,"HH:mm")," "),o(4),f(" ",e.TeacherInformation," "),o();let s=J(l(16,20,i.getPresenceTypeDesignation(e)));o(2),C(s?17:-1),o(2),f(" ",P(20,23,e.LessonDateTimeFrom,"dd.MM.yyyy")," "),o(3),f(" ",l(23,26,e.LessonDateTimeFrom)," "),o(3),X(" ",P(26,28,e.LessonDateTimeFrom,"dd.MM.yyyy"),", ",l(27,31,e.LessonDateTimeFrom)," ")}}function $i(t,m){if(t&1){let e=O();a(0,"div")(1,"div",7,0),g("click",function(n){I(e);let s=R(2),p=_(4);return T(p.onRowClick(n,s))}),a(3,"div",8)(4,"input",9),r(5,"async"),g("change",function(n){I(e);let s=_(4);return T(s.toggleAll(n.target==null?null:n.target.checked))}),c()(),a(6,"div",10),d(7),r(8,"translate"),c(),a(9,"div",11)(10,"a",12),r(11,"async"),a(12,"i",13),d(13,"edit"),c()()()(),K(14,Ri,28,33,"div",14,Ai),c()}if(t&2){let e,i=_(4),n=w(0);o(4),b("checked",l(5,4,i.allSelected$)),o(3),f(" ",l(8,6,"my-absences.report.list.all")," "),o(3),ne("disabled",((e=l(11,8,i.selectionService.selection$))==null?null:e.length)===0),o(4),Q(n)}}function wi(t,m){t&1&&S(0,"bkd-spinner",6)}function Pi(t,m){if(t&1&&(a(0,"div",5),h(1,$i,16,10,"div")(2,wi,1,0,"bkd-spinner",6),c()),t&2){_(3);let e=w(0),i=w(2);o(),C(e&&e.length>0?1:-1),o(),C(i?2:-1)}}function Di(t,m){t&1&&(a(0,"p",4),d(1),r(2,"translate"),c()),t&2&&(o(),f(" ",l(2,1,"my-absences.report.no-entries")," "))}function Fi(t,m){if(t&1&&h(0,Pi,3,2,"div",5)(1,Di,3,3,"p",4),t&2){_(2);let e=w(0),i=w(2);C(e&&e.length>0||i?0:1)}}function Ei(t,m){if(t&1&&(h(0,Ii,1,0,"bkd-spinner"),r(1,"async"),h(2,Fi,2,1)),t&2){let e=_();C(l(1,1,e.state.loading$)?0:2)}}function Bi(t,m){t&1&&(a(0,"p",4),d(1),r(2,"translate"),c()),t&2&&(o(),$(l(2,1,"my-absences.report.no-filter")))}var ti=(()=>{class t{constructor(e,i,n,s,p,v){this.state=e,this.selectionService=i,this.route=n,this.scrollPosition=s,this.presenceTypesService=p,this.settings=v,this.filterFromParams$=this.route.queryParams.pipe(y(ji)),this.allSelected$=x([this.selectionService.selection$,this.state.entries$.pipe(L(A=>x(A.map(F=>this.getPresenceType(F)))))]).pipe(y(([A,F])=>A.length>0&&A.length===F.filter(Ct(De)).length)),this.destroy$=new ve}ngOnInit(){this.filterFromParams$.pipe(E(1)).subscribe(e=>this.state.setFilter(e)),this.state.validFilter$.pipe(Xe(this.destroy$)).subscribe(()=>this.selectionService.clear())}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}getPresenceCategory(e){return this.getPresenceType(e).pipe(y(i=>De(i)?e.ConfirmationStateId===this.settings.checkableAbsenceStateId?{category:he.Unapproved,icon:Ue(he.Unapproved)}:{category:he.Absent,icon:Ue(he.Absent)}:null))}getPresenceTypeDesignation(e){return this.presenceTypesService.displayedTypes$.pipe(y(i=>e.TypeRef.Id&&i.find(n=>n.Id===e.TypeRef.Id)?.Designation||null))}toggleAll(e){x([this.state.entries$.pipe(E(1)),this.presenceTypesService.presenceTypes$.pipe(E(1))]).subscribe(([i,n])=>{let s=n.filter(p=>De(p)).map(p=>p.Id);this.selectionService.clear(e?i.filter(p=>p.TypeRef.Id==null||!s.includes(p.TypeRef.Id)):null)})}onRowClick(e,i){let n=i.querySelector('input[type="checkbox"]');n&&e.target!==n&&!e.target.closest(".buttons")&&n.click()}getPresenceType(e){return this.presenceTypesService.presenceTypes$.pipe(y(i=>e.TypeRef.Id&&i.find(n=>n.Id===e.TypeRef.Id)||null))}static{this.\u0275fac=function(i){return new(i||t)(u(be),u(ye),u(lt),u(Ht),u(Y),u(H))}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report-list"]],decls:9,vars:12,consts:[["all",""],["row",""],["checkbox",""],[3,"filterChange","filter"],[1,"mt-3"],[1,"py-3"],[1,"inline"],[1,"entries-all",3,"click"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"all"],[1,"buttons"],["routerLink","confirm",1,"edit","btn","btn-primary","btn-icon","me-2"],[1,"material-icons"],[1,"entry"],[1,"entry",3,"click"],[3,"class"],[1,"lesson-class"],[1,"time","pe-2"],[1,"teacher"],[1,"presence-type"],[1,"date"],[1,"days-ago"],[1,"date-days-ago"]],template:function(i,n){if(i&1){let s=O();N(0),r(1,"async"),N(2),r(3,"async"),a(4,"bkd-my-absences-report-header",3),r(5,"async"),g("filterChange",function(v){return I(s),T(n.state.setFilter(v))}),c(),h(6,Ei,3,3),r(7,"async"),h(8,Bi,3,3,"p",4)}i&2&&(J(l(1,2,n.state.entries$)),o(2),J(l(3,5,n.state.loadingPage$)),o(2),b("filter",l(5,8,n.filterFromParams$)),o(2),C(l(7,10,n.state.isFilterValid$)?6:8))},dependencies:[ei,Ae,wt,z,ct,D,Lt],styles:['.entries-all[_ngcontent-%COMP%]{padding:0 0 .5rem 1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox all buttons";grid-template-columns:min-content 1fr min-content}.entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox lesson-class time teacher" "checkbox presence-type date days-ago";grid-template-columns:min-content 2fr 1fr 2fr}.entry[_ngcontent-%COMP%]:first-child{padding-top:0}.entries-all[_ngcontent-%COMP%] + .entry[_ngcontent-%COMP%]{padding-top:1rem}.presence-category.absent[_ngcontent-%COMP%]{color:#ea161f}.presence-category.unapproved[_ngcontent-%COMP%]{color:#ffa814}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.presence-category[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{display:block;font-size:16px}.entries-all[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{padding-top:.2rem}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.all[_ngcontent-%COMP%]{grid-area:all}.buttons[_ngcontent-%COMP%]{grid-area:buttons;display:flex}.lesson-class[_ngcontent-%COMP%]{grid-area:lesson-class;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.time[_ngcontent-%COMP%]{grid-area:time}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.presence-type[_ngcontent-%COMP%]{color:#adb5bd;grid-area:presence-type}.date[_ngcontent-%COMP%]{grid-area:date}.days-ago[_ngcontent-%COMP%]{color:#adb5bd;grid-area:days-ago}.date-days-ago[_ngcontent-%COMP%]{grid-area:date-days-ago;display:none}@media (max-width: 750px){.entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox lesson-class" "checkbox teacher" "checkbox date-days-ago" "checkbox time" "checkbox presence-type";grid-template-columns:min-content 1fr}.date-days-ago[_ngcontent-%COMP%]{display:block}.date[_ngcontent-%COMP%], .days-ago[_ngcontent-%COMP%]{display:none}}'],changeDetection:0})}}return t})();function ji(t){return{dateFrom:t.dateFrom?qe(t.dateFrom):null,dateTo:t.dateTo?qe(t.dateTo):null}}var ii=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report"]],features:[se([be,ye])],decls:1,vars:0,template:function(i,n){i&1&&S(0,"router-outlet")},dependencies:[xe],encapsulation:2,changeDetection:0})}}return t})();var Oi=["link"],Ni=()=>["/my-absences/report"],ni=(()=>{class t{onClick(){this.link.nativeElement.click()}constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report-link"]],viewQuery:function(i,n){if(i&1&&tt(Oi,5),i&2){let s;it(s=nt())&&(n.link=s.first)}},hostBindings:function(i,n){i&1&&g("click",function(p){return n.onClick(p)})},decls:8,vars:5,consts:[["link",""],[1,"m-0"],[1,"btn","btn-link","p-0",3,"routerLink"],[1,"d-flex","align-items-center"],[1,"material-icons"]],template:function(i,n){i&1&&(a(0,"h5",1),d(1),r(2,"translate"),c(),a(3,"a",2,0)(5,"div",3)(6,"i",4),d(7,"keyboard_arrow_right"),c()()()),i&2&&(o(),f(" ",l(2,2,"my-absences.report.title"),` +import{a as Gt}from"./chunk-W3JKHGP4.js";import{a as Nt}from"./chunk-BIDSHCYH.js";import{a as jt,b as Ot,c as Vt}from"./chunk-4RZQAAPF.js";import{f as Fe,g as Ee}from"./chunk-Z4YBXGVO.js";import{b as Dt,d as Et}from"./chunk-3L4RH6QP.js";import"./chunk-DTYYCJHM.js";import"./chunk-XAZECV42.js";import{a as Ht}from"./chunk-3P6YOVUR.js";import{H as Tt,I as kt,J as Mt,L as de,P as Y,Q as me,R as Lt,S as Rt,T as Pt,U as Bt,b as xt,g as At,p as _e,q as It,t as De,w as he,x as Ue}from"./chunk-SRCW6BUG.js";import{a as St,l as ue}from"./chunk-GOGVGWFJ.js";import{a as $t,b as Ft}from"./chunk-OSOXMODN.js";import{b as wt}from"./chunk-PSYDBHTH.js";import{c as ut,d as ft,e as bt,f as yt,g as _t,h as ht,i as vt,l as gt,w as te,y as Ct}from"./chunk-W4U7QKJF.js";import{a as pe}from"./chunk-AVBHFGIF.js";import{$a as c,$b as Se,Ab as N,Ad as we,Bb as J,Bd as Pe,Cb as w,Cd as ee,Db as se,Eb as Z,F as E,Fb as oe,Ga as k,Id as ce,J as Qe,Jb as r,Ka as ge,Kb as l,L as ze,Lb as P,M as B,Na as h,O as Ye,Od as le,P as L,Pd as D,Qa as b,R as Xe,Ra as ne,Rd as G,Ta as et,Tc as qe,Va as C,X as ie,Xa as Ce,Xb as at,Ya as K,Za as Q,_ as j,_a as a,a as Ve,ab as S,bd as dt,cc as z,cd as H,dc as ct,ea as I,eb as O,f as ve,fa as T,fd as Ie,g as He,gb as g,h as Ge,hb as _,hc as pt,hd as mt,ia as Je,id as Te,jd as ke,l as q,ma as Ze,n as y,nb as tt,nd as Me,o as x,ob as it,pb as nt,pd as Le,qb as R,rb as d,rd as Re,sb as $,sd as $e,tb as f,ub as X,wc as lt,x as W,xa as o,xb as st,xc as xe,ya as u,yb as ot,yc as re,zb as rt,zc as Ae,zd as ae}from"./chunk-2W7IS4PN.js";var je=(()=>{class t{constructor(e,i,n,s,p,v,A,F){this.fb=e,this.router=i,this.toastService=n,this.translate=s,this.presenceTypesService=p,this.updateService=v,this.storageService=A,this.settings=F,this.formGroup=this.createFormGroup(),this.saving$=new He(!1),this.submitted$=new He(!1),this.absenceTypes$=x([this.getConfirmationTypes(),this.getHalfDayType()]).pipe(y(([U,M])=>M?[...U,M]:U)),this.absenceTypeIdErrors$=St(q(this.formGroup),this.submitted$,"absenceTypeId"),this.destroy$=new ve}ngOnInit(){this.selectedLessonIds$.pipe(E(1),W(Rt)).subscribe(()=>this.navigateBack())}ngOnDestroy(){this.destroy$.next()}onSubmit(){if(this.submitted$.next(!0),this.formGroup.valid){let{absenceTypeId:e}=this.formGroup.value;this.save(e)}}cancel(){this.navigateBack()}getSelectedCount(){return this.selectedLessonIds$.pipe(y(e=>e.length))}getConfirmationTypes(){return this.presenceTypesService.confirmationTypes$.pipe(y(e=>e.filter(i=>i.IsAbsence&&i.Id!==this.settings.halfDayPresenceTypeId)))}getHalfDayType(){return q(null)}createFormGroup(){return this.fb.group({absenceTypeId:[null,mt.required]})}save(e){this.saving$.next(!0),this.selectedLessonIds$.pipe(E(1),L(i=>this.updateService.editLessonPresences(i,[Number(this.storageService.getPayload()?.id_person)],e)),Qe(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("my-absences.confirm.save-success")),this.navigateBack()}static{this.\u0275fac=function(i){return new(i||t)(u(ae),u(re),u(pe),u(le),u(Y),u(me),u(G),u(dt))}}static{this.\u0275cmp=k({type:t,selectors:[["ng-component"]],decls:0,vars:0,template:function(i,n){},encapsulation:2})}}return t})();var fe=(()=>{class t{constructor(e,i,n){this.settings=e,this.storageService=i,this.studentsService=n,this.studentId$=new Ge(1),this.lessonAbsences$=this.studentId$.pipe(L(this.loadLessonAbsences.bind(this)),B(1)),this.lessonIncidents$=this.studentId$.pipe(L(this.loadLessonIncidents.bind(this)),B(1)),this.lessonPresences$=this.getLessonPresences(),this.checkableAbsences$=this.getAbsences(this.settings.checkableAbsenceStateId),this.openAbsences$=this.getAbsences(this.settings.unconfirmedAbsenceStateId),this.excusedAbsences$=this.getAbsences(this.settings.excusedAbsenceStateId),this.unexcusedAbsences$=this.getAbsences(this.settings.unexcusedAbsenceStateId),this.incidents$=this.getAbsences(null),this.openLessonAbsences$=x([this.openAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.checkableLessonAbsences$=x([this.checkableAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.excusedLessonAbsences$=x([this.excusedAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.unexcusedLessonAbsences$=x([this.unexcusedAbsences$.pipe(W(te)),this.lessonAbsences$]).pipe(y(ue(this.getLessonAbsences.bind(this))),B(1)),this.incidentsLessonAbsences$=x([this.incidents$.pipe(W(te)),this.lessonIncidents$]).pipe(y(ue(this.getLessonIncidents.bind(this))),B(1)),this.counts$=this.getCounts();let s=this.storageService.getPayload()?.id_person;s&&this.studentId$.next(Number(s))}reset(){this.studentId$.pipe(E(1)).subscribe(e=>this.studentId$.next(e))}getLessonPresences(){return this.getCached(x([this.studentId$,this.lessonAbsences$,this.lessonIncidents$]).pipe(L(([e,i,n])=>this.loadTimetableEntries(e,i,n).pipe(y(s=>this.buildLessonPresences(i,n,s)))),y(Mt)))}getAbsences(e){return this.getCached(this.lessonPresences$.pipe(y(i=>i?.filter(n=>n.ConfirmationStateId===e)||null)))}getLessonAbsences(e,i){let n=e.map(s=>s.LessonRef.Id);return i.filter(s=>n.includes(s.LessonRef.Id))}getLessonIncidents(e,i){let n=e.map(s=>s.LessonRef.Id);return i.filter(s=>n.includes(s.LessonRef.Id))}getCounts(){return x([this.getCount(this.checkableAbsences$),this.getCount(this.openAbsences$),this.getCount(this.excusedAbsences$),this.getCount(this.unexcusedAbsences$),this.getCount(this.incidents$)]).pipe(y(([e,i,n,s,p])=>({checkableAbsences:e,openAbsences:i,excusedAbsences:n,unexcusedAbsences:s,incidents:p,halfDays:null})))}getCached(e){return e.pipe(Ye(null),ze({connector:()=>new Ge(1)}))}getCount(e){return e.pipe(y(i=>i?.length??null))}loadLessonAbsences(e){return this.studentsService.getLessonAbsences(e)}loadLessonIncidents(e){return this.studentsService.getLessonIncidents(e)}loadTimetableEntries(e,i,n){return this.studentsService.getTimetableEntries(e,{"filter.Id":`;${[...i,...n].map(s=>s.LessonRef.Id).join(";")}`})}buildLessonPresences(e,i,n){return[...e,...i].map(s=>this.buildLessonPresence(s,n)).filter(te)}buildLessonPresence(e,i){let n=i.find(s=>s.Id===e.LessonRef.Id);return n?{Id:"",LessonRef:{Id:e.LessonRef.Id,HRef:e.LessonRef.HRef?e.LessonRef.HRef:null},StudentRef:e.StudentRef,EventRef:{Id:0,HRef:null},TypeRef:e.TypeRef,RegistrationRef:{Id:0,HRef:null},StudyClassRef:{Id:0,HRef:null},ConfirmationStateId:"ConfirmationStateId"in e?e.ConfirmationStateId:null,EventDesignation:n.EventDesignation,HasStudyCourseConfirmationCode:!1,LessonDateTimeFrom:n.From,LessonDateTimeTo:n.To,Comment:null,Date:n.From,Type:e.Type,StudentFullName:e.StudentFullName,StudyClassNumber:"",TeacherInformation:n.EventManagerInformation??null}:null}static{this.\u0275fac=function(i){return new(i||t)(j(H),j(G),j(Fe))}}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac})}}return t})();var pi=(t,m)=>m.Id,li=t=>({count:t}),di=t=>({"border-top pt-3":t});function mi(t,m){if(t&1&&(a(0,"div",13),d(1),r(2,"translate"),c()),t&2){let e=m.$implicit;o(),f(" ",P(2,1,"global.validation-errors."+e.error,e.params)," ")}}function ui(t,m){if(t&1&&(K(0,mi,3,4,"div",13,Ce),r(2,"async")),t&2){let e=_(2);Q(l(2,0,e.absenceTypeIdErrors$))}}function fi(t,m){if(t&1&&(a(0,"div",5),S(1,"input",11),r(2,"async"),a(3,"label",12),d(4),c(),h(5,ui,3,2),r(6,"async"),c()),t&2){let e,i,n=m.$implicit,s=m.$index,p=_();b("ngClass",oe(12,di,n.IsHalfDay)),o(),ne("is-invalid",((e=(e=l(2,8,p.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),b("id","absence-type-"+s)("value",n.Id),o(2),b("for","absence-type-"+s),o(),f(" ",n.Designation," "),o(),C(((i=(i=l(6,10,p.absenceTypes$))==null?null:i.length)!==null&&i!==void 0?i:0)-1===s?5:-1)}}function bi(t,m){t&1&&(a(0,"div",10)(1,"span",14),d(2,"Loading..."),c()())}var zt=(()=>{class t extends je{constructor(e,i,n,s,p,v,A,F,U,M){super(e,i,n,s,p,v,A,F),this.myAbsencesService=U,this.selectionService=M,this.titleKey="my-absences.confirm.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(y(Oe=>ce(ee(Oe.map(Ne=>Ne.lessonIds))))),this.confirmationStateId=this.settings.unconfirmedAbsencesRefreshTime}onSaveSuccess(){this.selectionService.clear(),this.myAbsencesService.reset(),super.onSaveSuccess()}navigateBack(){this.router.navigate(["/my-absences"])}static{this.\u0275fac=function(i){return new(i||t)(u(ae),u(re),u(pe),u(le),u(Y),u(me),u(G),u(H),u(fe),u(de))}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-confirm"]],features:[ge],decls:32,vars:39,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],[1,"form-check","my-3",3,"ngClass"],[1,"remark"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback","mt-4"],[1,"visually-hidden"]],template:function(i,n){if(i&1){let s=O();a(0,"div",0)(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1),N(5),r(6,"async"),d(7),r(8,"translate"),c(),a(9,"form",2),g("ngSubmit",function(){return I(s),T(n.onSubmit())}),a(10,"div",3)(11,"label",4),d(12),r(13,"translate"),r(14,"addSpace"),c(),K(15,fi,7,14,"div",5,pi),r(17,"async"),c(),a(18,"div",6),d(19),r(20,"translate"),c(),a(21,"div",7)(22,"button",8),r(23,"async"),g("click",function(){return I(s),T(n.cancel())}),d(24),r(25,"translate"),c(),a(26,"button",9),r(27,"async"),d(28),r(29,"translate"),h(30,bi,3,0,"div",10),r(31,"async"),c()()()()}if(i&2){o(2),$(l(3,11,n.titleKey));let s=l(6,13,n.getSelectedCount());o(5),f(" ",P(8,15,s===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",oe(37,li,s))," "),o(2),b("formGroup",n.formGroup),o(3),X("",l(13,18,"my-absences.confirm.choose-presence-type"),"",P(14,20,":",":"),""),o(3),Q(l(17,23,n.absenceTypes$)),o(4),f(" ",l(20,25,"my-absences.confirm.remark")," "),o(3),b("disabled",l(23,27,n.saving$)),o(2),f(" ",l(25,29,"my-absences.confirm.cancel")," "),o(2),b("disabled",l(27,31,n.saving$)),o(2),f(" ",l(29,33,"my-absences.confirm.save")," "),o(2),C(l(31,35,n.saving$)?30:-1)}},dependencies:[we,Me,Ie,Le,Te,ke,Pe,Re,$e,Se,z,D,Ee],encapsulation:2,changeDetection:0})}}return t})();var be=(()=>{class t extends Ot{get preventAbsencesAfterStart(){if(this._preventAbsencesAfterStart==null){let e=this.storageService.getPayload()?.instance_id,i=this.settings.preventStudentAbsenceAfterLessonStart;this._preventAbsencesAfterStart=e?i.includes(e):!1}return this._preventAbsencesAfterStart}constructor(e,i,n,s,p,v){super(e,i,v,n,"/my-absences/report"),this.studentsService=s,this.storageService=p}getInitialFilter(){return{dateFrom:null,dateTo:null}}isValidFilter(e){return!!(e.dateFrom||e.dateTo)}loadEntries(e,i,n){let s=this.buildRequestParamsFromFilter(e).set("sort","From.asc");return this.loadingService.load(this.loadTimetableEntries(s).pipe(y(p=>this.filterAbsencesAfterLessonStart(p)),L(p=>x([q(p),this.loadLessonAbsences(p),this.loadLessonDispensations(p)])),y(([p,v,A])=>this.buildLessonPresences(p,v,A)),y(p=>({offset:0,total:p.length,entries:p}))),jt)}filterAbsencesAfterLessonStart(e){return this.preventAbsencesAfterStart?e.filter(i=>i.From.getTime()>=new Date().getTime()):e}buildParamsFromFilter(e){let{dateFrom:i,dateTo:n}=e,s={};return i&&(s.dateFrom=_e(i,"yyyy-MM-dd")),n&&(s.dateTo=_e(n,"yyyy-MM-dd")),s}buildRequestParamsFromFilter(e){let i=new pt;return e.dateFrom&&(i=i.set("filter.From",`>${_e(It(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(i=i.set("filter.To",`<${_e(xt(e.dateTo,1),"yyyy-MM-dd")}`)),i}get studentId(){let e=this.storageService.getPayload()?.id_person;if(e==null)throw new Error("No student id available");return Number(e)}loadTimetableEntries(e){return this.studentsService.getTimetableEntries(this.studentId,e)}loadLessonAbsences(e){return e.length>0?this.studentsService.getLessonAbsences(this.studentId,{"filter.Id":`;${e.map(i=>i.Id).join(";")}`}):q([])}loadLessonDispensations(e){return e.length>0?this.studentsService.getLessonDispensations(this.studentId,{"filter.Id":`;${e.map(i=>i.Id).join(";")}`}):q([])}buildLessonPresences(e,i,n){return e.map(s=>this.buildLessonPresence(s,i,n))}buildLessonPresence(e,i,n){let s=i.find(A=>A.LessonRef.Id===e.Id),p=n.find(A=>A.LessonRef.Id===e.Id),v=this.buildLessonPresenceTypeRef(s,p);return{Id:"",LessonRef:{Id:e.Id,HRef:null},StudentRef:(s||p)?.StudentRef||{Id:this.studentId,HRef:null},EventRef:{Id:0,HRef:null},TypeRef:v,RegistrationRef:{Id:0,HRef:null},StudyClassRef:{Id:0,HRef:null},ConfirmationStateId:s?.ConfirmationStateId||p&&this.settings.excusedAbsenceStateId||null,EventDesignation:e.EventDesignation||"",HasStudyCourseConfirmationCode:!1,LessonDateTimeFrom:e.From||new Date,LessonDateTimeTo:e.To||new Date,Comment:null,Date:e.From||new Date,Type:(s||p)?.Type||null,StudentFullName:(s||p)?.StudentFullName||"",StudyClassNumber:"",TeacherInformation:e.EventManagerInformation??null}}buildLessonPresenceTypeRef(e,i){return e?Ve({},e.TypeRef):i?Ve({},i.TypeRef):{Id:null,HRef:null}}static{this.\u0275fac=function(i){return new(i||t)(j(at),j(Ft),j(H),j(Fe),j(G),j(Vt))}}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac})}}return t})();var ye=(()=>{class t extends Tt{constructor(){super(...arguments),this.selectedIds$=this.selection$.pipe(y(kt))}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Je(t)))(n||t)}})()}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac})}}return t})();var yi=(t,m)=>m.Id,_i=t=>({count:t}),hi=t=>({"border-top pt-3":t});function vi(t,m){if(t&1&&(a(0,"div",13),d(1),r(2,"translate"),c()),t&2){let e=m.$implicit;o(),f(" ",P(2,1,"global.validation-errors."+e.error,e.params)," ")}}function gi(t,m){if(t&1&&(K(0,vi,3,4,"div",13,Ce),r(2,"async")),t&2){let e=_(2);Q(l(2,0,e.absenceTypeIdErrors$))}}function Ci(t,m){if(t&1&&(a(0,"div",5),S(1,"input",11),r(2,"async"),a(3,"label",12),d(4),c(),h(5,gi,3,2),r(6,"async"),c()),t&2){let e,i,n=m.$implicit,s=m.$index,p=_();b("ngClass",oe(12,hi,n.IsHalfDay)),o(),ne("is-invalid",((e=(e=l(2,8,p.absenceTypeIdErrors$))==null?null:e.length)!==null&&e!==void 0?e:0)>0),b("id","absence-type-"+s)("value",n.Id),o(2),b("for","absence-type-"+s),o(),f(" ",n.Designation," "),o(),C(((i=(i=l(6,10,p.absenceTypes$))==null?null:i.length)!==null&&i!==void 0?i:0)-1===s?5:-1)}}function Si(t,m){t&1&&(a(0,"div",10)(1,"span",14),d(2,"Loading..."),c()())}var Jt=(()=>{class t extends je{constructor(e,i,n,s,p,v,A,F,U,M){super(e,i,n,s,p,v,A,F),this.state=U,this.selectionService=M,this.titleKey="my-absences.report.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(y(Oe=>ce(ee(Oe.map(Ne=>Ne.lessonIds))))),this.confirmationStateId=this.settings.checkableAbsenceStateId}getHalfDayType(){return this.presenceTypesService.getPresenceType(this.settings.halfDayPresenceTypeId).pipe(y(e=>e.Active?e:null))}onSaveSuccess(){this.selectionService.clear(),this.state.resetEntries(),super.onSaveSuccess()}navigateBack(){this.state.queryParams$.pipe(E(1)).subscribe(e=>{this.router.navigate(["/my-absences/report"],{queryParams:e})})}static{this.\u0275fac=function(i){return new(i||t)(u(ae),u(re),u(pe),u(le),u(Y),u(me),u(G),u(H),u(be),u(ye))}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-confirm"]],features:[ge],decls:32,vars:39,consts:[[1,"bkd-container","bkd-container-limited"],[1,"mb-3","pb-3","border-bottom"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],[1,"form-check","my-3",3,"ngClass"],[1,"remark"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"invalid-feedback","mt-4"],[1,"visually-hidden"]],template:function(i,n){if(i&1){let s=O();a(0,"div",0)(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1),N(5),r(6,"async"),d(7),r(8,"translate"),c(),a(9,"form",2),g("ngSubmit",function(){return I(s),T(n.onSubmit())}),a(10,"div",3)(11,"label",4),d(12),r(13,"translate"),r(14,"addSpace"),c(),K(15,Ci,7,14,"div",5,yi),r(17,"async"),c(),a(18,"div",6),d(19),r(20,"translate"),c(),a(21,"div",7)(22,"button",8),r(23,"async"),g("click",function(){return I(s),T(n.cancel())}),d(24),r(25,"translate"),c(),a(26,"button",9),r(27,"async"),d(28),r(29,"translate"),h(30,Si,3,0,"div",10),r(31,"async"),c()()()()}if(i&2){o(2),$(l(3,11,n.titleKey));let s=l(6,13,n.getSelectedCount());o(5),f(" ",P(8,15,s===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",oe(37,_i,s))," "),o(2),b("formGroup",n.formGroup),o(3),X("",l(13,18,"my-absences.confirm.choose-presence-type"),"",P(14,20,":",":"),""),o(3),Q(l(17,23,n.absenceTypes$)),o(4),f(" ",l(20,25,"my-absences.confirm.remark")," "),o(3),b("disabled",l(23,27,n.saving$)),o(2),f(" ",l(25,29,"my-absences.confirm.cancel")," "),o(2),b("disabled",l(27,31,n.saving$)),o(2),f(" ",l(29,33,"my-absences.confirm.save")," "),o(2),C(l(31,35,n.saving$)?30:-1)}},dependencies:[we,Me,Ie,Le,Te,ke,Pe,Re,$e,Se,z,D,Ee],encapsulation:2,changeDetection:0})}}return t})();var xi=()=>["/my-absences"],ei=(()=>{class t{constructor(){this.filter={dateFrom:null,dateTo:null},this.filterChange=new Ze,this.minDate={year:new Date().getFullYear(),month:new Date().getMonth()+1,day:new Date().getDate()}}updateDateFrom(e){this.filter.dateFrom=e,e&&(this.filter.dateTo=e)}show(){this.filterChange.emit({dateFrom:Zt(this.filter.dateFrom),dateTo:Zt(this.filter.dateTo)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},features:[se([{provide:ht,useClass:gt},{provide:vt,useClass:Nt}])],decls:19,vars:18,consts:[[3,"link"],[1,"filters"],[1,"form-group"],[1,"form-label"],[3,"valueChange","minDate","value"],[1,"buttons"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,n){i&1&&(S(0,"bkd-backlink",0),a(1,"h1"),d(2),r(3,"translate"),c(),a(4,"div",1)(5,"div",2)(6,"label",3),d(7),r(8,"translate"),c(),a(9,"bkd-date-select",4),g("valueChange",function(p){return n.updateDateFrom(p)}),c()(),a(10,"div",2)(11,"label",3),d(12),r(13,"translate"),c(),a(14,"bkd-date-select",4),rt("valueChange",function(p){return ot(n.filter.dateTo,p)||(n.filter.dateTo=p),p}),c()(),a(15,"div",5)(16,"button",6),g("click",function(){return n.show()}),d(17),r(18,"translate"),c()()()),i&2&&(b("link",Z(17,xi)),o(2),$(l(3,9,"my-absences.report.title")),o(5),$(l(8,11,"my-absences.report.header.date-from")),o(2),b("minDate",n.minDate)("value",n.filter.dateFrom),o(3),$(l(13,13,"my-absences.report.header.date-to")),o(2),b("minDate",n.minDate),st("value",n.filter.dateTo),o(3),f(" ",l(18,15,"my-absences.report.header.show")," "))},dependencies:[Bt,Gt,D],styles:["[_nghost-%COMP%]{display:block;padding-bottom:1rem;border-bottom:1px solid #dee2e6}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.form-group[_ngcontent-%COMP%]{flex:1;min-width:20rem;max-width:40rem;margin-right:1rem;margin-bottom:.5rem}.buttons[_ngcontent-%COMP%]{flex:none;margin-top:1.625rem;margin-right:0}@media (max-width: 575.98px){[_nghost-%COMP%]{padding-bottom:0}.buttons[_ngcontent-%COMP%]{width:100%;margin-top:1rem;margin-bottom:1rem}}"],changeDetection:0})}}return t})();function Zt(t){return t?At(t):null}var Ai=(t,m)=>m.Id;function Ii(t,m){t&1&&S(0,"bkd-spinner")}function Ti(t,m){if(t&1){let e=O();a(0,"div",8)(1,"input",9,2),r(3,"async"),g("change",function(){I(e);let n=_().$implicit,s=_(5);return T(s.selectionService.toggle(n))}),c()()}if(t&2){let e=_().$implicit,i=_(5);o(),b("checked",l(3,1,i.selectionService.isSelected$(e)))}}function ki(t,m){if(t&1&&(a(0,"div")(1,"i",13),d(2),c()()),t&2){_();let e=w(2);et("checkbox presence-category ",e.category,""),o(2),$(e.icon)}}function Mi(t,m){if(t&1&&d(0),t&2){let e=_().$implicit;f(" , ",e.StudyClassNumber," ")}}function Li(t,m){if(t&1&&(a(0,"div",20),d(1),c()),t&2){_();let e=w(15);o(),f(" ",e," ")}}function Ri(t,m){if(t&1){let e=O();a(0,"div",15,1),g("click",function(n){I(e);let s=R(1),p=_(5);return T(p.onRowClick(n,s))}),N(2),r(3,"async"),h(4,Ti,4,3,"div",8)(5,ki,3,4,"div",16),a(6,"div",17),d(7),h(8,Mi,1,1),c(),a(9,"div",18),d(10),r(11,"date"),r(12,"date"),c(),a(13,"div",19),d(14),c(),N(15),r(16,"async"),h(17,Li,2,1,"div",20),a(18,"div",21),d(19),r(20,"date"),c(),a(21,"div",22),d(22),r(23,"bkdDaysDifference"),c(),a(24,"div",23),d(25),r(26,"date"),r(27,"bkdDaysDifference"),c()()}if(t&2){let e=m.$implicit,i=_(5);o(2);let n=J(l(3,11,i.getPresenceCategory(e)));o(2),C(n?5:4),o(3),f(" ",e.EventDesignation," "),o(),C(e.StudyClassNumber?8:-1),o(2),X(" ",P(11,14,e.LessonDateTimeFrom,"HH:mm"),"\u2013",P(12,17,e.LessonDateTimeTo,"HH:mm")," "),o(4),f(" ",e.TeacherInformation," "),o();let s=J(l(16,20,i.getPresenceTypeDesignation(e)));o(2),C(s?17:-1),o(2),f(" ",P(20,23,e.LessonDateTimeFrom,"dd.MM.yyyy")," "),o(3),f(" ",l(23,26,e.LessonDateTimeFrom)," "),o(3),X(" ",P(26,28,e.LessonDateTimeFrom,"dd.MM.yyyy"),", ",l(27,31,e.LessonDateTimeFrom)," ")}}function $i(t,m){if(t&1){let e=O();a(0,"div")(1,"div",7,0),g("click",function(n){I(e);let s=R(2),p=_(4);return T(p.onRowClick(n,s))}),a(3,"div",8)(4,"input",9),r(5,"async"),g("change",function(n){I(e);let s=_(4);return T(s.toggleAll(n.target==null?null:n.target.checked))}),c()(),a(6,"div",10),d(7),r(8,"translate"),c(),a(9,"div",11)(10,"a",12),r(11,"async"),a(12,"i",13),d(13,"edit"),c()()()(),K(14,Ri,28,33,"div",14,Ai),c()}if(t&2){let e,i=_(4),n=w(0);o(4),b("checked",l(5,4,i.allSelected$)),o(3),f(" ",l(8,6,"my-absences.report.list.all")," "),o(3),ne("disabled",((e=l(11,8,i.selectionService.selection$))==null?null:e.length)===0),o(4),Q(n)}}function wi(t,m){t&1&&S(0,"bkd-spinner",6)}function Pi(t,m){if(t&1&&(a(0,"div",5),h(1,$i,16,10,"div")(2,wi,1,0,"bkd-spinner",6),c()),t&2){_(3);let e=w(0),i=w(2);o(),C(e&&e.length>0?1:-1),o(),C(i?2:-1)}}function Di(t,m){t&1&&(a(0,"p",4),d(1),r(2,"translate"),c()),t&2&&(o(),f(" ",l(2,1,"my-absences.report.no-entries")," "))}function Fi(t,m){if(t&1&&h(0,Pi,3,2,"div",5)(1,Di,3,3,"p",4),t&2){_(2);let e=w(0),i=w(2);C(e&&e.length>0||i?0:1)}}function Ei(t,m){if(t&1&&(h(0,Ii,1,0,"bkd-spinner"),r(1,"async"),h(2,Fi,2,1)),t&2){let e=_();C(l(1,1,e.state.loading$)?0:2)}}function Bi(t,m){t&1&&(a(0,"p",4),d(1),r(2,"translate"),c()),t&2&&(o(),$(l(2,1,"my-absences.report.no-filter")))}var ti=(()=>{class t{constructor(e,i,n,s,p,v){this.state=e,this.selectionService=i,this.route=n,this.scrollPosition=s,this.presenceTypesService=p,this.settings=v,this.filterFromParams$=this.route.queryParams.pipe(y(ji)),this.allSelected$=x([this.selectionService.selection$,this.state.entries$.pipe(L(A=>x(A.map(F=>this.getPresenceType(F)))))]).pipe(y(([A,F])=>A.length>0&&A.length===F.filter(Ct(De)).length)),this.destroy$=new ve}ngOnInit(){this.filterFromParams$.pipe(E(1)).subscribe(e=>this.state.setFilter(e)),this.state.validFilter$.pipe(Xe(this.destroy$)).subscribe(()=>this.selectionService.clear())}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}getPresenceCategory(e){return this.getPresenceType(e).pipe(y(i=>De(i)?e.ConfirmationStateId===this.settings.checkableAbsenceStateId?{category:he.Unapproved,icon:Ue(he.Unapproved)}:{category:he.Absent,icon:Ue(he.Absent)}:null))}getPresenceTypeDesignation(e){return this.presenceTypesService.displayedTypes$.pipe(y(i=>e.TypeRef.Id&&i.find(n=>n.Id===e.TypeRef.Id)?.Designation||null))}toggleAll(e){x([this.state.entries$.pipe(E(1)),this.presenceTypesService.presenceTypes$.pipe(E(1))]).subscribe(([i,n])=>{let s=n.filter(p=>De(p)).map(p=>p.Id);this.selectionService.clear(e?i.filter(p=>p.TypeRef.Id==null||!s.includes(p.TypeRef.Id)):null)})}onRowClick(e,i){let n=i.querySelector('input[type="checkbox"]');n&&e.target!==n&&!e.target.closest(".buttons")&&n.click()}getPresenceType(e){return this.presenceTypesService.presenceTypes$.pipe(y(i=>e.TypeRef.Id&&i.find(n=>n.Id===e.TypeRef.Id)||null))}static{this.\u0275fac=function(i){return new(i||t)(u(be),u(ye),u(lt),u(Ht),u(Y),u(H))}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report-list"]],decls:9,vars:12,consts:[["all",""],["row",""],["checkbox",""],[3,"filterChange","filter"],[1,"mt-3"],[1,"py-3"],[1,"inline"],[1,"entries-all",3,"click"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"all"],[1,"buttons"],["routerLink","confirm",1,"edit","btn","btn-primary","btn-icon","me-2"],[1,"material-icons"],[1,"entry"],[1,"entry",3,"click"],[3,"class"],[1,"lesson-class"],[1,"time","pe-2"],[1,"teacher"],[1,"presence-type"],[1,"date"],[1,"days-ago"],[1,"date-days-ago"]],template:function(i,n){if(i&1){let s=O();N(0),r(1,"async"),N(2),r(3,"async"),a(4,"bkd-my-absences-report-header",3),r(5,"async"),g("filterChange",function(v){return I(s),T(n.state.setFilter(v))}),c(),h(6,Ei,3,3),r(7,"async"),h(8,Bi,3,3,"p",4)}i&2&&(J(l(1,2,n.state.entries$)),o(2),J(l(3,5,n.state.loadingPage$)),o(2),b("filter",l(5,8,n.filterFromParams$)),o(2),C(l(7,10,n.state.isFilterValid$)?6:8))},dependencies:[ei,Ae,wt,z,ct,D,Lt],styles:['.entries-all[_ngcontent-%COMP%]{padding:0 0 .5rem 1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox all buttons";grid-template-columns:min-content 1fr min-content}.entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox lesson-class time teacher" "checkbox presence-type date days-ago";grid-template-columns:min-content 2fr 1fr 2fr}.entry[_ngcontent-%COMP%]:first-child{padding-top:0}.entries-all[_ngcontent-%COMP%] + .entry[_ngcontent-%COMP%]{padding-top:1rem}.presence-category.absent[_ngcontent-%COMP%]{color:#ea161f}.presence-category.unapproved[_ngcontent-%COMP%]{color:#ffa814}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.presence-category[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{display:block;font-size:16px}.entries-all[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{padding-top:.2rem}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.all[_ngcontent-%COMP%]{grid-area:all}.buttons[_ngcontent-%COMP%]{grid-area:buttons;display:flex}.lesson-class[_ngcontent-%COMP%]{grid-area:lesson-class;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.time[_ngcontent-%COMP%]{grid-area:time}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.presence-type[_ngcontent-%COMP%]{color:#adb5bd;grid-area:presence-type}.date[_ngcontent-%COMP%]{grid-area:date}.days-ago[_ngcontent-%COMP%]{color:#adb5bd;grid-area:days-ago}.date-days-ago[_ngcontent-%COMP%]{grid-area:date-days-ago;display:none}@media (max-width: 750px){.entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox lesson-class" "checkbox teacher" "checkbox date-days-ago" "checkbox time" "checkbox presence-type";grid-template-columns:min-content 1fr}.date-days-ago[_ngcontent-%COMP%]{display:block}.date[_ngcontent-%COMP%], .days-ago[_ngcontent-%COMP%]{display:none}}'],changeDetection:0})}}return t})();function ji(t){return{dateFrom:t.dateFrom?qe(t.dateFrom):null,dateTo:t.dateTo?qe(t.dateTo):null}}var ii=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report"]],features:[se([be,ye])],decls:1,vars:0,template:function(i,n){i&1&&S(0,"router-outlet")},dependencies:[xe],encapsulation:2,changeDetection:0})}}return t})();var Oi=["link"],Ni=()=>["/my-absences/report"],ni=(()=>{class t{onClick(){this.link.nativeElement.click()}constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-report-link"]],viewQuery:function(i,n){if(i&1&&tt(Oi,5),i&2){let s;it(s=nt())&&(n.link=s.first)}},hostBindings:function(i,n){i&1&&g("click",function(p){return n.onClick(p)})},decls:8,vars:5,consts:[["link",""],[1,"m-0"],[1,"btn","btn-link","p-0",3,"routerLink"],[1,"d-flex","align-items-center"],[1,"material-icons"]],template:function(i,n){i&1&&(a(0,"h5",1),d(1),r(2,"translate"),c(),a(3,"a",2,0)(5,"div",3)(6,"i",4),d(7,"keyboard_arrow_right"),c()()()),i&2&&(o(),f(" ",l(2,2,"my-absences.report.title"),` `),o(2),b("routerLink",Z(4,Ni)))},dependencies:[Ae,D],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;cursor:pointer}.btn[_ngcontent-%COMP%]{color:#000;text-decoration:none}"],changeDetection:0})}}return t})();var si=()=>[];function Vi(t,m){}function Hi(t,m){if(t&1&&d(0),t&2){_();let e=w(0);f(" (",e==null?null:e.checkableAbsences,") ")}}function Gi(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",15),t&2){let e=_();b("absences$",e.myAbsencesService.checkableAbsences$)}}function qi(t,m){if(t&1&&d(0),t&2){_();let e=w(0);f(" (",e==null?null:e.openAbsences,") ")}}function Ui(t,m){if(t&1&&(S(0,"bkd-student-dossier-absences",16),r(1,"translate"),r(2,"async")),t&2){let e,i=_();b("absences$",i.myAbsencesService.openAbsences$)("selectionService",i.absencesSelectionService)("defaultAbsenceSelectionMessage",l(1,4,"my-absences.show.default-absence-selection-message"))("reports",(e=l(2,6,i.openAbsencesReports$))!==null&&e!==void 0?e:Z(8,si))}}function Wi(t,m){if(t&1&&d(0),t&2){_();let e=w(0);f(" (",e==null?null:e.excusedAbsences,") ")}}function Ki(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",15),t&2){let e=_();b("absences$",e.myAbsencesService.excusedAbsences$)}}function Qi(t,m){if(t&1&&d(0),t&2){_();let e=w(0);f(" (",e==null?null:e.unexcusedAbsences,") ")}}function zi(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",17),t&2){let e=_();b("absences$",e.myAbsencesService.unexcusedAbsences$)("displayPresenceType",!1)}}function Yi(t,m){if(t&1&&d(0),t&2){_();let e=w(0);f(" (",e==null?null:e.incidents,") ")}}function Xi(t,m){if(t&1&&S(0,"bkd-student-dossier-absences",15),t&2){let e=_();b("absences$",e.myAbsencesService.incidents$)}}var oi=(()=>{class t{constructor(e,i,n){this.reportsService=e,this.myAbsencesService=i,this.absencesSelectionService=n,this.openAbsencesReports$=this.loadOpenAbsencesReports(),this.allAbsencesReports$=this.loadAllAbsencesReports()}loadOpenAbsencesReports(){return x([this.absencesSelectionService.selectedWithoutPresenceType$,this.absencesSelectionService.selectedIds$]).pipe(L(([e,i])=>e.length===0&&i.length>0?this.getOpenAbsencesRecordIds(ce(ee(i.map(n=>n.lessonIds)))):q([])),L(e=>this.reportsService.getStudentConfirmationReports(e)),B(1))}loadAllAbsencesReports(){return x([this.myAbsencesService.openLessonAbsences$,this.myAbsencesService.checkableLessonAbsences$,this.myAbsencesService.excusedLessonAbsences$,this.myAbsencesService.unexcusedLessonAbsences$,this.myAbsencesService.incidentsLessonAbsences$]).pipe(y(e=>this.getAllAbsencesRecordIds(ee(e))),L(e=>this.reportsService.getMyAbsencesReports(e)),B(1))}getAllAbsencesRecordIds(e){return e.map(i=>`${i.LessonRef.Id}_${i.RegistrationId}`)}getOpenAbsencesRecordIds(e){return this.myAbsencesService.openLessonAbsences$.pipe(y(i=>i.filter(n=>e.includes(n.LessonRef.Id)).map(n=>`${n.LessonRef.Id}_${n.RegistrationId}`)))}static{this.\u0275fac=function(i){return new(i||t)(u(Et),u(fe),u(de))}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences-show"]],decls:70,vars:38,consts:[["checkableAbsences","ngbAccordionItem"],["openAbsences","ngbAccordionItem"],["excusedAbsences","ngbAccordionItem"],["unexcusedAbsences","ngbAccordionItem"],["incidents","ngbAccordionItem"],[1,"bkd-container","bkd-container-limited"],[1,"d-flex","justify-content-between","border-bottom","header"],[1,"ps-3"],[3,"reports"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"click","opened"],[3,"absences$"],[3,"absences$","selectionService","defaultAbsenceSelectionMessage","reports"],[3,"absences$","displayPresenceType"]],template:function(i,n){if(i&1){let s=O();N(0),r(1,"async"),a(2,"div",5)(3,"h1"),d(4),r(5,"translate"),c(),a(6,"div",6)(7,"div"),d(8),r(9,"translate"),c(),a(10,"div",7),S(11,"bkd-reports-link",8),r(12,"async"),c()(),a(13,"div",9)(14,"div",10)(15,"div",11),S(16,"bkd-my-absences-report-link"),c(),a(17,"div",12)(18,"div",13),h(19,Vi,0,0,"ng-template"),c()()(),a(20,"div",10,0)(22,"div",11)(23,"bkd-student-dossier-entry-header",14),g("click",function(){I(s);let v=R(21);return T(v.toggle())}),d(24),r(25,"translate"),h(26,Hi,1,1),c()(),a(27,"div",12)(28,"div",13),h(29,Gi,1,1,"ng-template"),c()()(),a(30,"div",10,1)(32,"div",11)(33,"bkd-student-dossier-entry-header",14),g("click",function(){I(s);let v=R(31);return T(v.toggle())}),d(34),r(35,"translate"),h(36,qi,1,1),c()(),a(37,"div",12)(38,"div",13),h(39,Ui,3,9,"ng-template"),c()()(),a(40,"div",10,2)(42,"div",11)(43,"bkd-student-dossier-entry-header",14),g("click",function(){I(s);let v=R(41);return T(v.toggle())}),d(44),r(45,"translate"),h(46,Wi,1,1),c()(),a(47,"div",12)(48,"div",13),h(49,Ki,1,1,"ng-template"),c()()(),a(50,"div",10,3)(52,"div",11)(53,"bkd-student-dossier-entry-header",14),g("click",function(){I(s);let v=R(51);return T(v.toggle())}),d(54),r(55,"translate"),h(56,Qi,1,1),c()(),a(57,"div",12)(58,"div",13),h(59,zi,1,2,"ng-template"),c()()(),a(60,"div",10,4)(62,"div",11)(63,"bkd-student-dossier-entry-header",14),g("click",function(){I(s);let v=R(61);return T(v.toggle())}),d(64),r(65,"translate"),h(66,Yi,1,1),c()(),a(67,"div",12)(68,"div",13),h(69,Xi,1,1,"ng-template"),c()()()()()}if(i&2){let s,p=R(21),v=R(31),A=R(41),F=R(51),U=R(61),M=J(l(1,18,n.myAbsencesService.counts$));o(4),$(l(5,21,"my-absences.title")),o(4),$(l(9,23,"my-absences.description")),o(3),b("reports",(s=l(12,25,n.allAbsencesReports$))!==null&&s!==void 0?s:Z(37,si)),o(12),b("opened",!p.collapsed),o(),f(" ",l(25,27,"shared.profile.checkable-absences")," "),o(2),C((M==null?null:M.checkableAbsences)!==null?26:-1),o(7),b("opened",!v.collapsed),o(),f(" ",l(35,29,"shared.profile.open-absences")," "),o(2),C((M==null?null:M.openAbsences)!==null?36:-1),o(7),b("opened",!A.collapsed),o(),f(" ",l(45,31,"shared.profile.excused-absences")," "),o(2),C((M==null?null:M.excusedAbsences)!==null?46:-1),o(7),b("opened",!F.collapsed),o(),f(" ",l(55,33,"shared.profile.unexcused-absences")," "),o(2),C((M==null?null:M.unexcusedAbsences)!==null?56:-1),o(7),b("opened",!U.collapsed),o(),f(" ",l(65,35,"shared.profile.incidents")," "),o(2),C((M==null?null:M.incidents)!==null?66:-1)}},dependencies:[$t,_t,yt,bt,ni,ft,ut,Dt,Pt,z,D],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem}"],changeDetection:0})}}return t})();var ri=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=k({type:t,selectors:[["bkd-my-absences"]],features:[se([fe,de])],decls:1,vars:0,template:function(i,n){i&1&&S(0,"router-outlet")},dependencies:[xe],encapsulation:2,changeDetection:0})}}return t})();var Ws=[{path:"",component:ri,children:[{path:"",component:oi},{path:"confirm",component:zt},{path:"report",component:ii,children:[{path:"",component:ti,data:{restoreScrollPositionFrom:["/my-absences/report/confirm"]}},{path:"confirm",component:Jt}]}]}];export{Ws as MY_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-A3CECLYB.js b/public/apps/webapp-schulverwaltung/chunk-A3CECLYB.js new file mode 100644 index 00000000..5498234e --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-A3CECLYB.js @@ -0,0 +1,3 @@ +import{a as yt}from"./chunk-Y4QYVF5K.js";import{a as xt}from"./chunk-AYQPMCNZ.js";import{b as Tt,c as _t,d as wt}from"./chunk-3L4RH6QP.js";import{b as Gt}from"./chunk-OSOXMODN.js";import{a as se}from"./chunk-PSYDBHTH.js";import{C as Ce,c as ft,d as ht,e as It,f as St,g as bt,r as vt,s as Ct,w as ve}from"./chunk-W4U7QKJF.js";import{$a as d,Ab as pe,Ad as Se,Bb as ce,Bd as gt,Cb as U,D as we,Eb as Xe,Fb as fe,Ga as D,H as qe,Hc as h,Ic as o,Ja as Q,Jb as c,Jc as j,K as Ke,Kb as f,Lb as L,Ld as q,M as Ee,Mb as Je,Mc as w,Md as N,Na as T,Nc as b,Ob as Ye,Oc as he,Od as be,P as v,Pd as M,Qa as G,Qc as $e,R as Pe,Ra as De,Uc as u,Va as _,Wc as it,X as R,Ya as Z,Za as ee,Zb as Qe,_ as x,_a as l,_c as re,a as O,ab as te,ac as Ze,ad as nt,b as F,c as He,cc as k,cd as W,da as H,dc as et,ea as J,eb as ie,ec as tt,f as ue,fa as Y,fd as rt,g as A,gb as V,h as oe,hb as S,hd as Re,id as Ie,kb as ge,l as Ge,lc as ne,ld as st,m as Ue,ma as ze,md as at,n as m,o as de,od as ot,qb as le,qd as dt,rb as p,s as me,sb as $,tb as C,td as lt,ud as pt,vd as ct,w as Le,wd as ut,x as We,xa as a,xd as mt,ya as P}from"./chunk-2W7IS4PN.js";var ri=(t,r)=>r.Key,si=t=>({width:t});function ai(t,r){if(t&1&&(l(0,"option",1),p(1),c(2,"translate"),d()),t&2){let e=S();G("ngValue",null),a(),C(" ",f(2,2,e.emptyLabel)," ")}}function oi(t,r){if(t&1&&(l(0,"option",1),p(1),d()),t&2){let e=r.$implicit;G("ngValue",e),a(),C(" ",e.Value," ")}}var Et=(()=>{class t{constructor(){this.options=[],this.allowEmpty=!0,this.emptyLabel="",this.value=null,this.disabled=!1,this.tabindex=0,this.width="auto",this.valueChange=new ze,this.options$=new A([]),this.rawValue$=new A(null),this.value$=de([this.rawValue$,this.options$]).pipe(m(([e,i])=>i&&i.find(n=>n.Key===e)||null))}ngOnChanges(e){e.value&&this.rawValue$.next(e.value.currentValue),e.options&&this.options$.next(e.options.currentValue)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["bkd-select"]],inputs:{options:"options",allowEmpty:"allowEmpty",emptyLabel:"emptyLabel",value:"value",disabled:"disabled",tabindex:"tabindex",width:"width"},outputs:{valueChange:"valueChange"},features:[H],decls:6,vars:9,consts:[[1,"form-select",3,"ngModelChange","tabindex","ngStyle","disabled","ngModel"],[3,"ngValue"]],template:function(i,n){i&1&&(l(0,"select",0),c(1,"async"),V("ngModelChange",function(y){return n.valueChange.emit(y&&y.Key)}),T(2,ai,3,4,"option",1),Z(3,oi,2,2,"option",1,ri),p(5,` > +`),d()),i&2&&(ge("tabindex",n.tabindex),G("ngStyle",fe(7,si,n.width))("disabled",n.disabled)("ngModel",f(1,5,n.value$)),a(2),_(n.allowEmpty?2:-1),a(),ee(n.options))},dependencies:[Se,pt,ct,lt,Ie,at,k,Ze,M],encapsulation:2,changeDetection:0})}}return t})();var Pt=b({Id:o,Designation:h,StudentCount:o,Number:h});var Me=b({Id:h,TestId:o,CourseRegistrationId:o,GradeId:u(o),GradeValue:u(o),GradeDesignation:u(h),Points:u(o),StudentId:o});var Dt=b({Id:o,CourseId:o,Date:re,Designation:h,Weight:o,WeightPercent:o,IsPointGrading:j,MaxPoints:u(o),MaxPointsAdjusted:u(o),IsPublished:j,IsOwner:j,Owner:u(h),GradingScaleId:u(o),Results:u(w(Me))});var $t=b({Id:o}),Rt=he({HRef:u(h)}),di=he({HasEvaluationStarted:j,EvaluationUntil:u(re),HasReviewOfEvaluationStarted:j,HasTestGrading:j,Id:o}),li=$e([$t,Rt,di]),pi=he({Id:o,StudentCount:o}),ci=$e([$t,Rt,pi]),ui=b({Grade:h,AverageTestResult:o,Id:o,StudentId:o}),Oe=b({AverageTestResult:o,CanGrade:j,EventId:o,GradeId:u(o),GradeValue:u(o),Id:o,StudentId:o}),K=b({HRef:h,Id:o,Number:h,Designation:h,DateFrom:u(re),DateTo:u(re),StatusId:o,GradingScaleId:u(o),FinalGrades:u(w(ui)),Gradings:u(w(Oe)),Tests:u(w(Dt)),EvaluationStatusRef:li,AttendanceRef:ci,ParticipatingStudents:u(w(_t)),Classes:u(w(Pt))}),Mt=b({TestResults:w(Me),Gradings:w(Oe)}),Ot=b({Gradings:w(Oe)});var xe=(()=>{class t extends se{constructor(e,i){super(e,i,K,"Courses"),this.statusCodec=b(nt(this.codec.props,["Id","StatusId","EvaluationStatusRef"]))}getNumberOfCoursesForRating(){return this.http.get(`${this.baseUrl}/?expand=EvaluationStatusRef&fields=Id,StatusId,EvaluationStatusRef&filter.StatusId=;10300;10240`,{headers:{"X-Role-Restriction":"TeacherRole"}}).pipe(v(N(this.statusCodec)),m(e=>e.filter(i=>i.EvaluationStatusRef.HasEvaluationStarted===!0)),m(e=>e.length))}getExpandedCourses(e){return yt(e,"TeacherRole")?this.http.get(`${this.baseUrl}/?expand=EvaluationStatusRef,AttendanceRef,Classes,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"TeacherRole"}}).pipe(v(N(K))):Ge([])}getExpandedCourse(e){return this.http.get(`${this.baseUrl}/${e}?expand=ParticipatingStudents,EvaluationStatusRef,Tests,Gradings,FinalGrades,Classes`).pipe(v(q(K)))}getExpandedCourseWithParticipants(e){return this.http.get(`${this.baseUrl}/${e}?expand=ParticipatingStudents,Classes,AttendanceRef`).pipe(v(q(K)))}getExpandedCoursesForDossier(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades,EvaluationStatusRef,ParticipatingStudents,Classes&filter.StatusId=;${this.settings.eventlist.statusfilter}`).pipe(v(N(K)))}getExpandedCoursesForStudent(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"StudentRole"}}).pipe(v(N(K)))}add(e,i,n,s,y,B,g){let I={Tests:[{Date:i,Designation:n,Weight:s,IsPointGrading:y,MaxPoints:B,MaxPointsAdjusted:g}]};return this.http.put(`${this.baseUrl}/${e}/Tests/New`,I).pipe(m(()=>{}))}update(e,i,n,s,y,B,g,I){let X={Tests:[{Id:i,Designation:n,Date:s,Weight:y,IsPointGrading:B,MaxPoints:g,MaxPointsAdjusted:I}]};return this.http.put(`${this.baseUrl}/${e}/Tests/Update`,X).pipe(m(()=>{}))}delete(e,i){let n={TestIds:[i]};return this.http.put(`${this.baseUrl}/${e}/Tests/Delete`,n).pipe(m(()=>i))}updateTestResult(e,i){let I=i,{studentId:n,testId:s}=I,y=He(I,["studentId","testId"]),B={StudentIds:[n],TestId:s},g="gradeId"in y?F(O({},B),{GradeId:y.gradeId}):F(O({},B),{Points:y.points});return this.http.put(`${this.baseUrl}/${e}/SetTestResult`,g).pipe(v(q(Mt)),v(({TestResults:X,Gradings:Ne})=>X.length<=1&&Ne.length===1?Ge({courseId:e,testResult:X[0]??null,grading:Ne[0]}):Ue(()=>new Error("`TestResults` or `Gradings` does not contain a single value"))))}setAverageAsFinalGrade(e){return this.http.put(`${this.baseUrl}/SetAverageTestResult`,e).pipe(v(q(Ot)))}publishTest(e){let i={TestIds:[e]};return this.http.put(`${this.baseUrl}/PublishTest`,i).pipe(m(()=>e))}unpublishTest(e){let i={TestIds:[e]};return this.http.put(`${this.baseUrl}/UnpublishTest`,i).pipe(m(()=>e))}static{this.\u0275fac=function(i){return new(i||t)(x(ne),x(W))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Bt=b({Id:h,SubscriptionId:o,VssId:o,EventId:o,DropdownItems:u(w(xt)),IdPerson:o,ShowAsRadioButtons:j,Value:u(h),VssDesignation:h,VssStyle:h}),Fe=b({Id:o,EventId:u(o),PersonId:u(o),Status:h,EventDesignation:u(h)});var At=(()=>{class t extends se{constructor(e,i){super(e,i,Fe,"Subscriptions")}getSubscriptionIdsByStudentAndCourse(e,i){return this.http.get(`${this.baseUrl}/`,{params:{"filter.PersonId":`=${e}`,"filter.EventId":`;${i}`}}).pipe(v(N(it)),m(n=>n.map(s=>s.Id)))}getSubscriptionCountsByEvents(e){return this.http.get(`${this.baseUrl}/`,{params:{"filter.EventId":`;${e.join(";")}`,fields:["Id","EventId"].join(",")}}).pipe(v(N(b({Id:o,EventId:o}))),m(i=>i.reduce((n,s)=>(n[s.EventId]=n[s.EventId]?n[s.EventId]+1:1,n),{})))}getSubscriptionsByCourse(e,i){return this.http.get(`${this.baseUrl}/`,{params:F(O({"filter.EventId":`=${e}`},i),{fields:["Id","EventId","EventDesignation","PersonId","Status"].join(",")})}).pipe(v(N(Fe)))}getSubscriptionDetailsById(e){return this.http.get(`${this.baseUrl}/${e}/SubscriptionDetails`).pipe(v(N(Bt)))}static{this.\u0275fac=function(i){return new(i||t)(x(ne),x(W))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Vt(t){return t.length===0?0:je(t.map(({value:r,weight:e})=>r*e))/je(t.map(({weight:r})=>r))}function Be(t){return t.length===0?0:Number(je(t)/t.length)}function je(t){return t.reduce(gi,0)}function gi(t,r){return t+r}function Mn(t,r,e){return t?t.Tests?.reduce((i,n)=>i||n.Id===r&&n.Results?.find(s=>s.TestId===r&&s.StudentId===e)||null,null)??null:null}function On(t,r,e){return r.map(i=>i.Id===t.TestId?Ve(t,i,e):i)}function Fn(t,r,e){return e.map(i=>i.Id===t?fi(r,i):i)}function jn(t,r){return r.map(e=>e.Id===t?F(O({},e),{IsPublished:!e.IsPublished}):e)}function Bn(t){let r=Ii(t);if(r.length===0)throw new Error("unable to calculate averages without results");return Be(r)}function Ae(t){return t.MaxPointsAdjusted||t.MaxPoints}function An(t){let r=hi(t);if(r.length===0)throw new Error("unable to calculate averages without results");return Be(r)}function z(t,r){return r.Results?.find(e=>e.StudentId===t)}function Vn(t,r){return r===null?null:r.filter(e=>e.Id!==t)}function Ve(t,r,e){let i=e&&r.Results?.find(s=>s.TestId===t.TestId&&s.StudentId===t.StudentId),n=r.Results?.filter(s=>!(s.TestId===t.TestId&&s.StudentId===t.StudentId))||[];return i&&e==="grade"?t.GradeId=i.GradeId:i&&e==="points"&&(t.Points=i.Points),F(O({},r),{Results:[...n,t]})}function Nt(t){return t.slice().sort((r,e)=>e.Date.getTime()-r.Date.getTime())}function ye(t,r){return r?.find(e=>e.Id===t.GradingScaleId)||null}function fi(t,r){return F(O({},r),{Results:r.Results?.filter(e=>e.StudentId!==t)||[]})}function hi(t){return t.Results?.filter(r=>r.GradeDesignation!==null).map(r=>Number(r.GradeDesignation)).filter(r=>!isNaN(r))||[]}function Ii(t){return t.Results?.map(r=>r.Points!==null?r.Points:kt).filter(r=>r>kt)||[]}var kt=-1;var Si=b({Id:o,Designation:h}),ke=b({Id:o,Grades:w(Si)});var Ht=(()=>{class t extends se{constructor(e,i){super(e,i,ke,"GradingScales")}getGradingScale(e){return this.http.get(`${this.baseUrl}/${e}`).pipe(v(q(ke)))}getGradingScales(e){return me(e.map(this.getGradingScale.bind(this)))}static{this.\u0275fac=function(i){return new(i||t)(x(ne),x(W))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Te=(()=>{class t{constructor(e,i,n,s,y,B){this.coursesRestService=e,this.subscriptionRestService=i,this.reportsService=n,this.loadingService=s,this.gradingScalesRestService=y,this.settings=B,this.studentId$=new oe(1),this.initialStudentCourses$=this.studentId$.pipe(qe(),v(this.loadCourses.bind(this)),m(g=>g.sort((I,X)=>I.Designation.localeCompare(X.Designation))),Ee(1)),this.action$=new oe(1),this.studentCourses$=Le(this.action$,this.initialStudentCourses$.pipe(m(g=>({type:"initializeCourses",payload:g})))).pipe(Ke(this.coursesReducer.bind(this),[]),Ee(1)),this.loading$=this.loadingService.loading$,this.studentCourseIds$=this.studentCourses$.pipe(m(g=>g.flatMap(I=>I.Id))),this.subscriptionIds$=de([this.studentId$,this.studentCourseIds$]).pipe(v(([g,I])=>this.subscriptionRestService.getSubscriptionIdsByStudentAndCourse(g,I))),this.testReports$=this.subscriptionIds$.pipe(m(g=>this.reportsService.getTeacherSubscriptionGradesReports(g))),this.tests$=this.studentCourses$.pipe(m(g=>g.flatMap(I=>I.Tests).filter(ve))),this.gradingScaleIdsFromTests$=this.tests$.pipe(m(g=>[...g.map(I=>I.GradingScaleId)].filter(ve).filter(Ce))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(m(g=>g.flatMap(I=>I.GradingScaleId).filter(ve).filter(Ce))),this.gradingScaleIds$=de([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(m(([g,I])=>g.concat(I).filter(Ce))),this.gradingScales$=this.gradingScaleIds$.pipe(v(g=>me(g.map(I=>this.gradingScalesRestService.getGradingScale(I)))))}setStudentId(e){this.studentId$.next(e)}getFinalGradeForStudent(e,i){return e?.FinalGrades?.find(n=>n.StudentId===i)}getGradingForStudent(e,i){return e?.Gradings?.find(n=>n.StudentId===i)}getGradingScaleOfCourse(e,i){return i?.find(n=>n.Id===e.GradingScaleId)}getGradesForStudent(e,i,n){return e.Tests?.flatMap(s=>({value:Number(ye(s,n)?.Grades.find(B=>B.Id===z(i,s)?.GradeId)?.Designation),weight:s.Weight})).filter(({value:s})=>!!s)||[]}updateStudentCourses(e){this.action$.next({type:"updateCourses",payload:e})}loadCourses(e){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForDossier().pipe(m(i=>i.filter(n=>n.ParticipatingStudents?.find(s=>s.Id===e)))))}coursesReducer(e,i){switch(i.type){case"initializeCourses":return i.payload;case"updateCourses":return this.updateCourses([...e],i.payload);default:return e}}updateCourses(e,i){return e.map(n=>F(O({},n),{Tests:n.Tests!==null?n.Tests.map(s=>s.Id===i.Id?i:s):null}))}static{this.\u0275fac=function(i){return new(i||t)(x(xe),x(At),x(wt),x(Gt),x(Ht),x(W))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac})}}return t})();var Lt=(()=>{class t{constructor(){}get inIframe(){return window.parent!==window}get window(){return this.inIframe?window.parent:null}get document(){return this.window?.document.documentElement??null}querySelector(e){return this.window?.document?.querySelector("bkd-portal")?.shadowRoot?.querySelector(e)??null}getIframeElement(){return this.querySelector("bkd-content")?.shadowRoot?.querySelector("iframe")??null}getIframeTop(){return this.getIframeElement()?.offsetTop??0}getIFrameBottom(){let e=this.getIframeElement();return e?e.offsetTop+e.offsetHeight:0}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Wt=(()=>{class t{constructor(e,i){this.modal=e,this.portal=i}open(...e){let i=this.modal.open(...e);return this.applyPortalOffsetAndMaxHeight(i),this.disablePortalScrolling(i),i}get activeInstances(){return this.modal.activeInstances}dismissAll(...e){return this.modal.dismissAll(...e)}hasOpenModals(...e){return this.modal.hasOpenModals(...e)}applyPortalOffsetAndMaxHeight(e){let i=this.getModalWindowElement(e);if(!i){console.warn("Trying to apply portal offset to , but element is not present!");return}this.portal.window&&(i.style.top=`${this.getModalIframeOffset()}px`,i.style.maxHeight=`${this.getModalHeight()}px`)}disablePortalScrolling(e){if(this.portal.window&&this.portal.document){let i=this.portal.window.innerWidth-this.portal.document.clientWidth;this.portal.document.style.paddingRight=`${i}px`,this.portal.document.style.overflow="hidden"}e.hidden.subscribe(()=>{this.portal.document&&(this.portal.document.style.paddingRight="0px",this.portal.document.style.overflow="auto")})}getModalWindowElement(e){return e._windowCmptRef?.instance?._elRef?.nativeElement??null}getModalIframeOffset(){return Math.max(this.getViewportTop()-this.portal.getIframeTop(),0)}getModalTop(){return Math.max(this.getViewportTop(),this.portal.getIframeTop())}getModalBottom(){return Math.min(this.getViewportBottom(),this.portal.getIFrameBottom())}getModalHeight(){return this.getModalBottom()-this.getModalTop()}getViewportTop(){return this.portal.window?.scrollY??0}getViewportBottom(){return this.getViewportTop()+this.getViewportHeight()}getViewportHeight(){return this.portal.window?.innerHeight??0}static{this.\u0275fac=function(i){return new(i||t)(x(Ct),x(Lt))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function _e(t,r,e){return r?r.Grade:yi(t,e)||t?.GradeValue}function yi(t,r){return r?.Grades.find(e=>e.Id===t?.GradeId)?.Designation}var Ti="1-3",Kt="\u2013",zt=(()=>{class t{constructor(e){this.locale=e}transform(e,i,n){let s=Number(e??null);return isNaN(s)?Kt:_i(Number(e??null),n??this.locale,i)}static{this.\u0275fac=function(i){return new(i||t)(P(Ye,16))}}static{this.\u0275pipe=Q({name:"decimalOrDash",type:t,pure:!0})}}return t})();function _i(t,r,e){return t===0?Kt:Qe(t,r,`1.${Gi(e)}`)}function Gi(t){return t?String(t).includes("-")?String(t):`${t}-${t}`:Ti}var Xt=(()=>{class t{constructor(){}getGradeForStudent(){return _e(this.grading,this.finalGrade,this.gradingScale)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["bkd-dossier-grades-final-grade"]],inputs:{finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},decls:14,vars:11,consts:[[1,"final-entry"],["data-testid","final-grade"],["data-testid","average-test-results"]],template:function(i,n){i&1&&(l(0,"div",0)(1,"div"),p(2),c(3,"translate"),d(),l(4,"div",1)(5,"span"),p(6),d()(),l(7,"div"),p(8),c(9,"translate"),d(),l(10,"div",2)(11,"span"),p(12),c(13,"decimalOrDash"),d()()()),i&2&&(a(2),$(f(3,4,"dossier.grade")),a(4),$(n.getGradeForStudent()||"\u2013"),a(2),$(f(9,6,"dossier.average")),a(4),$(L(13,8,n.average,"1-3")))},dependencies:[M,zt],styles:[".final-entry[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:repeat(2,1fr)}span[_ngcontent-%COMP%]{margin-left:2em}"]})}}return t})();var Jt=(()=>{class t{constructor(e){this.translate=e}transform(e,i,n,s="tests.points"){return e.IsPointGrading&&(e.IsPublished||n)?`${z(i,e)?.Points||"\u2013"} / ${e.MaxPointsAdjusted||e.MaxPoints} ${this.translate.instant(s)}`:""}static{this.\u0275fac=function(i){return new(i||t)(P(be,16))}}static{this.\u0275pipe=Q({name:"bkdTestPoints",type:t,pure:!0})}}return t})();var Yt=(()=>{class t{constructor(e){this.translate=e}transform(e){return`${this.translate.instant("tests.factor")} ${e.Weight} (${e.WeightPercent}%)`}static{this.\u0275fac=function(i){return new(i||t)(P(be,16))}}static{this.\u0275pipe=Q({name:"bkdTestWeight",type:t,pure:!0})}}return t})();var Ei=t=>({maxPoints:t});function Pi(t,r){if(t&1&&(l(0,"div",13),p(1),c(2,"translate"),d()),t&2){let e=S(2);a(),C(" ",L(2,1,"global.validation-errors.invalidPoints",fe(4,Ei,e.maxPoints))," ")}}function Di(t,r){if(t&1){let e=ie();l(0,"div",3)(1,"label",11),p(2),c(3,"translate"),d(),l(4,"div",6)(5,"input",12,0),V("input",function(){J(e);let n=le(6),s=S();return Y(s.onPointsChange(n.value))}),d()(),T(7,Pi,3,6,"div",13),d()}if(t&2){let e=S();a(2),$(f(3,8,"dossier.dialog.points")),a(2),De("is-invalid",e.pointsInput.errors),a(),De("is-invalid",e.pointsInput.errors),ge("max",e.maxPoints),G("formControl",e.pointsInput),a(2),_(e.pointsInput.errors?7:-1)}}var Qt=500,Zt=(()=>{class t{constructor(e,i){this.activeModal=e,this.courseService=i,this.maxPoints=0,this.gradeSubject$=new ue,this.pointsSubject$=new ue,this.closeButtonDisabled$=new A(!1),this.gradingScaleDisabled$=new A(!0),this.grade$=this.gradeSubject$.pipe(we(Qt)),this.points$=this.pointsSubject$.pipe(we(Qt),We(this.isValid.bind(this)),m(Number)),this.destroy$=new ue}ngOnInit(){this.maxPoints=Ae(this.test),this.pointsInput=new st({value:this.points,disabled:!1},[Re.min(0),Re.pattern("[0-9]+([\\.][0-9]+)?"),this.maxPointValidator()]),this.gradingScaleDisabled$.next(this.test.IsPointGrading&&this.points>0),this.points$.pipe(Pe(this.destroy$)).subscribe(e=>this.updateTestResult({studentId:this.studentId,testId:this.test.Id,points:e})),this.grade$.pipe(Pe(this.destroy$)).subscribe(e=>this.updateTestResult({studentId:this.studentId,testId:this.test.Id,gradeId:e}))}onGradeChange(e){this.gradeSubject$.next(e)}onPointsChange(e){this.pointsSubject$.next(e),this.gradingScaleDisabled$.next(e.length>0)}updateTestResult(e){this.closeButtonDisabled$.next(!0),this.courseService.updateTestResult(this.test.CourseId,e).subscribe(({testResult:i})=>{this.gradeId=i?.GradeId??null,this.updatedTestResult=i,this.closeButtonDisabled$.next(!1)})}isValid(e){return e===""||isNaN(Number(e))?!1:!(Number(e)<0||Number(e)>this.maxPoints)}maxPointValidator(){return e=>Number(e.value)>Ae(this.test)?{customMax:!0}:null}static{this.\u0275fac=function(i){return new(i||t)(P(vt),P(xe))}}static{this.\u0275cmp=D({type:t,selectors:[["bkd-dossier-grades-edit"]],inputs:{test:"test",gradeId:"gradeId",gradeOptions:"gradeOptions",points:"points",studentId:"studentId"},decls:19,vars:20,consts:[["pointInput",""],[1,"modal-body"],[1,"mb-4"],[1,"form-group","row"],[1,"form-group","row","mt-2"],["for","grade",1,"col-6","col-form-label"],[1,"col-6"],["id","grade",3,"valueChange","options","value","allowEmpty","disabled"],[1,"text-muted","mt-4"],[1,"modal-footer"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["for","points",1,"col-6","col-form-label"],["id","points","type","number","step","0.01","min","0",1,"form-control",3,"input","max","formControl"],["data-testid","validation-error-message",1,"invalid-feedback","col-6","offset-6"]],template:function(i,n){i&1&&(l(0,"div",1)(1,"p",2),p(2),d(),T(3,Di,8,10,"div",3),l(4,"div",4)(5,"label",5),p(6),c(7,"translate"),d(),l(8,"div",6)(9,"bkd-select",7),c(10,"async"),V("valueChange",function(y){return y&&n.onGradeChange(y)}),d()()(),l(11,"p",8),p(12),c(13,"translate"),d()(),l(14,"div",9)(15,"button",10),c(16,"async"),V("click",function(){return n.activeModal.close(n.updatedTestResult)}),p(17),c(18,"translate"),d()()),i&2&&(a(2),$(n.test.Designation),a(),_(n.test.IsPointGrading?3:-1),a(3),$(f(7,10,"dossier.dialog.grade")),a(3),G("options",n.gradeOptions)("value",n.gradeId)("allowEmpty",!1)("disabled",f(10,12,n.gradingScaleDisabled$)),a(3),C(" ",f(13,14,n.test.IsPointGrading?"dossier.dialog.hint.points":"dossier.dialog.hint.grade")," "),a(3),G("disabled",f(16,16,n.closeButtonDisabled$)),a(2),C(" ",f(18,18,"dossier.dialog.close")," "))},dependencies:[Se,rt,ot,Ie,mt,ut,gt,dt,Et,k,M],encapsulation:2})}}return t})();function $i(t,r){if(t&1){let e=ie();l(0,"a",10),V("click",function(){J(e);let n=S(2),s=U(0);return Y(n.editGrading(s))}),l(1,"i",11),p(2,"edit"),d(),l(3,"span",5),p(4),d()()}if(t&2){S(2);let e=U(2);a(4),$(e)}}function Ri(t,r){if(t&1&&(l(0,"span",5),p(1),d()),t&2){S(2);let e=U(2);a(),$(e)}}function Mi(t,r){if(t&1&&(l(0,"div",9),p(1),c(2,"translate"),d()),t&2){S(2);let e=U(0);a(),C(" ",f(2,1,e.IsPublished?"tests.published":"tests.not-published")," ")}}function Oi(t,r){if(t&1&&(l(0,"div",0)(1,"div",1),p(2),d(),l(3,"div",2),p(4),c(5,"date"),d(),l(6,"div",3),T(7,$i,5,1,"a",4)(8,Ri,2,1,"span",5),d(),l(9,"div",6),p(10),c(11,"bkdTestWeight"),d(),l(12,"div",7)(13,"span"),p(14),c(15,"bkdTestPoints"),d()(),l(16,"div",8),p(17),d(),T(18,Mi,3,3,"div",9),d()),t&2){let e=S(),i=U(0);a(2),C(" ",i.Designation," "),a(2),C(" ",L(5,7,i.Date,"dd.MM.yyyy")," "),a(3),_(e.isEditable&&i.IsOwner?7:8),a(3),C(" ",f(11,10,i)," "),a(4),$(Je(15,12,i,e.studentId,e.isEditable,"dossier.points")),a(3),C(" ",i.Owner," "),a(),_(e.isEditable?18:-1)}}var ei=(()=>{class t{constructor(e,i){this.gradeService=e,this.modalService=i,this.test$=new oe(1),this.grading$=this.test$.pipe(m(this.getGrading.bind(this)))}ngOnChanges(e){e.test&&this.test$.next(this.test)}editGrading(e){let i=this.modalService.open(Zt,{backdrop:"static"});i.componentInstance.test=e,i.componentInstance.gradeId=this.getGradeId(e),i.componentInstance.gradeOptions=t.mapToOptions(this.gradingScale),i.componentInstance.studentId=this.studentId,i.componentInstance.points=this.getPoints(e),i.result.then(n=>{n&&this.updateStudentGrade(n,e)},()=>{})}updateStudentGrade(e,i){let n=Ve(e,i);this.gradeService.updateStudentCourses(n)}getGrading(e){return this.gradingScale?.Grades.find(i=>i.Id===this.getGradeId(e))?.Designation||"\u2013"}getGradeId(e){return z(this.studentId,e)?.GradeId||null}getPoints(e){return z(this.studentId,e)?.Points||null}static mapToOptions(e){return e?.Grades.map(i=>({Key:i.Id,Value:i.Designation}))||null}static{this.\u0275fac=function(i){return new(i||t)(P(Te),P(Wt))}}static{this.\u0275cmp=D({type:t,selectors:[["bkd-dossier-single-test"]],inputs:{test:"test",studentId:"studentId",gradingScale:"gradingScale",isEditable:"isEditable"},features:[H],decls:5,vars:7,consts:[[1,"test-entry"],["data-testid","test-designation",1,"designation"],["data-testid","test-date",1,"date"],[1,"grade"],["aria-label","edit grade",1,"btn","btn-link"],["data-testid","test-grade"],["data-testid","test-factor",1,"factor"],["data-testid","test-points",1,"points"],["data-testid","test-teacher",1,"teacher"],["data-testid","test-status",1,"state"],["aria-label","edit grade",1,"btn","btn-link",3,"click"],["data-testid","test-grade-edit-icon",1,"material-icons"]],template:function(i,n){if(i&1&&(pe(0),c(1,"async"),pe(2),c(3,"async"),T(4,Oi,19,17,"div",0)),i&2){let s=ce(f(1,1,n.test$));a(2),ce(f(3,4,n.grading$)),a(2),_(s?4:-1)}},dependencies:[k,et,M,Jt,Yt],styles:['.test-entry[_ngcontent-%COMP%]{border-top:1px solid #dee2e6;padding:1rem;display:grid;grid-template-areas:"designation designation grade factor" "date date points ." "teacher teacher . ." "state state . .";grid-template-columns:repeat(4,1fr)}span[_ngcontent-%COMP%]{margin-left:2em}.designation[_ngcontent-%COMP%]{grid-area:designation}.date[_ngcontent-%COMP%]{grid-area:date}.grade[_ngcontent-%COMP%]{grid-area:grade}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;color:#000;padding:0;text-decoration:none}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.grade[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:-1em;color:#00000080}.points[_ngcontent-%COMP%]{grid-area:points;color:#00000080}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.state[_ngcontent-%COMP%]{grid-area:state}@media (max-width: 575.98px){.test-entry[_ngcontent-%COMP%]{grid-template-areas:"designation designation" "date grade" "factor points" "teacher teacher" "state state";grid-template-columns:repeat(2,1fr)}}']})}}return t})();var Fi=(t,r)=>r.Id,ji=()=>[];function Bi(t,r){if(t&1&&te(0,"bkd-dossier-single-test",2),t&2){let e=r.$implicit,i=S(2);G("test",e)("studentId",i.studentId)("gradingScale",i.getGradingScaleOfTest(e))("isEditable",i.isEditable)}}function Ai(t,r){if(t&1&&(l(0,"div"),te(1,"bkd-dossier-grades-final-grade",1),Z(2,Bi,1,4,"bkd-dossier-single-test",2,Fi),d()),t&2){let e=S(),i=U(0);a(),G("finalGrade",e.decoratedCourse.finalGrade)("grading",e.decoratedCourse.grading)("gradingScale",e.decoratedCourse.gradingScale)("average",e.decoratedCourse.average),a(),ee(i)}}function Vi(t,r){t&1&&(l(0,"p",0),p(1),c(2,"translate"),d()),t&2&&(a(),C(" ",f(2,1,"dossier.no-tests")," "))}var ti=(()=>{class t{ngOnChanges(e){e.decoratedCourse&&this.sortedTests$.next(this.sortedTests())}constructor(){this.sortedTests$=new A([])}sortedTests(){return this.decoratedCourse.course.Tests?Nt(this.decoratedCourse.course.Tests):[]}getGradingScaleOfTest(e){return ye(e,this.gradingScales)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["bkd-dossier-course-tests"]],inputs:{studentId:"studentId",decoratedCourse:"decoratedCourse",gradingScales:"gradingScales",isEditable:"isEditable"},features:[H],decls:4,vars:5,consts:[["data-testid","message-no-tests",1,"p-3"],[3,"finalGrade","grading","gradingScale","average"],[3,"test","studentId","gradingScale","isEditable"]],template:function(i,n){if(i&1&&(pe(0),c(1,"async"),T(2,Ai,4,4,"div")(3,Vi,3,3,"p",0)),i&2){let s,y=ce((s=f(1,1,n.sortedTests$))!==null&&s!==void 0?s:Xe(4,ji));a(2),_(y.length>0?2:3)}},dependencies:[Xt,ei,k,M],encapsulation:2})}}return t})();function ki(t,r){if(t&1&&(l(0,"span",0),p(1),d()),t&2){let e=S();a(),C(" (",e.grade,")")}}function Ni(t,r){if(t&1&&(l(0,"span",1),p(1),c(2,"number"),d()),t&2){let e=S();a(),C(" (",L(2,1,e.average,"1.1-3"),")")}}var ii=(()=>{class t{constructor(){}get grade(){return this.getGradeForStudent()}getGradeForStudent(){return _e(this.grading,this.finalGrade,this.gradingScale)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["bkd-dossier-grades-course-header"]],inputs:{designation:"designation",finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},decls:3,vars:3,consts:[["data-testId","grade",1,"grade"],["data-testId","average",1,"average"]],template:function(i,n){i&1&&(p(0),T(1,ki,2,1,"span",0)(2,Ni,3,4,"span",1)),i&2&&(C("",n.designation,` +`),a(),_(n.grade?1:-1),a(),_(!n.grade&&n.average?2:-1))},dependencies:[tt],styles:[".average[_ngcontent-%COMP%]{color:#00000080}"]})}}return t})();var Hi=(t,r)=>r.course.Id;function Ui(t,r){if(t&1&&te(0,"bkd-dossier-course-tests",9),t&2){let e=S().$implicit,i=S(2);G("decoratedCourse",e)("studentId",i.studentId)("gradingScales",i.gradingScales)("isEditable",i.isEditable)}}function Li(t,r){if(t&1){let e=ie();l(0,"div")(1,"div",2)(2,"div",3,0)(4,"div",4)(5,"bkd-student-dossier-entry-header",5),V("click",function(){J(e);let n=le(3);return Y(n.toggle())}),te(6,"bkd-dossier-grades-course-header",6),d()(),l(7,"div",7)(8,"div",8),T(9,Ui,1,4,"ng-template"),d()()()()()}if(t&2){let e=r.$implicit,i=le(3);a(5),G("opened",!i.collapsed),a(),G("designation",e.course.Designation)("finalGrade",e.finalGrade)("grading",e.grading)("gradingScale",e.gradingScale)("average",e.average)}}function Wi(t,r){if(t&1&&(Z(0,Li,10,6,"div",null,Hi),c(2,"async")),t&2){let e=S();ee(f(2,0,e.decoratedCoursesSubject$))}}function qi(t,r){t&1&&(l(0,"p",1),p(1),c(2,"translate"),d()),t&2&&(a(),C(" ",f(2,1,"dossier.no-courses")," "))}var qr=(()=>{class t{constructor(e){this.dossierGradesService=e,this.isEditable=!0,this.decoratedCoursesSubject$=new A([])}ngOnChanges(){this.decoratedCoursesSubject$.next(this.decorateCourses())}decorateCourses(){return this.courses.map(e=>{let i=this.dossierGradesService.getFinalGradeForStudent(e,this.studentId),n=this.dossierGradesService.getGradesForStudent(e,this.studentId,this.gradingScales);return{course:e,finalGrade:i,grading:this.dossierGradesService.getGradingForStudent(e,this.studentId),gradingScale:this.dossierGradesService.getGradingScaleOfCourse(e,this.gradingScales),average:i?.AverageTestResult||Vt(n)}})}static{this.\u0275fac=function(i){return new(i||t)(P(Te))}}static{this.\u0275cmp=D({type:t,selectors:[["bkd-dossier-grades-view"]],inputs:{courses:"courses",studentId:"studentId",gradingScales:"gradingScales",isEditable:"isEditable"},features:[H],decls:2,vars:1,consts:[["courses","ngbAccordionItem"],["data-testid","message-no-courses",1,"py-3"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],[3,"designation","finalGrade","grading","gradingScale","average"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"decoratedCourse","studentId","gradingScales","isEditable"]],template:function(i,n){i&1&&T(0,Wi,3,2)(1,qi,3,3,"p",1),i&2&&_(n.courses.length>0?0:1)},dependencies:[bt,St,It,Tt,ii,ht,ft,ti,k,M],encapsulation:2})}}return t})();export{Be as a,Mn as b,On as c,Fn as d,jn as e,Bn as f,An as g,Vn as h,Nt as i,Kt as j,zt as k,_i as l,Et as m,Pt as n,Oe as o,xe as p,Bt as q,At as r,Ht as s,Te as t,Lt as u,Wt as v,qr as w}; diff --git a/public/apps/webapp-schulverwaltung/chunk-LTVWFE76.js b/public/apps/webapp-schulverwaltung/chunk-AVBHFGIF.js similarity index 92% rename from public/apps/webapp-schulverwaltung/chunk-LTVWFE76.js rename to public/apps/webapp-schulverwaltung/chunk-AVBHFGIF.js index bd6f5fba..4d8b3108 100644 --- a/public/apps/webapp-schulverwaltung/chunk-LTVWFE76.js +++ b/public/apps/webapp-schulverwaltung/chunk-AVBHFGIF.js @@ -1 +1 @@ -import{F as r,Gd as c,X as n,g as a}from"./chunk-34ZOBT6Z.js";var h=(()=>{class i{constructor(){this.toastsSubject=new a([]),this.toasts$=this.toastsSubject.asObservable()}success(t,e){this.addUnique({message:t,header:e,classname:"bg-success text-light",icon:"check_circle"})}warning(t,e){this.addUnique({message:t,header:e,classname:"bg-warning",icon:"help"})}error(t,e){this.addUnique({message:t,header:e,classname:"bg-danger text-light",icon:"cancel"})}remove(t){this.updateToasts(e=>e.filter(s=>!c(s,t)))}addUnique(t){this.updateToasts(e=>{if(!this.exists(e,t))return[...e,t]})}exists(t,e){return!!t.find(s=>s.message===e.message&&s.header===e.header)}updateToasts(t){this.toasts$.pipe(r(1)).subscribe(e=>{let s=t(e);s&&this.toastsSubject.next(s)})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{h as a}; +import{F as r,Hd as c,X as n,g as a}from"./chunk-2W7IS4PN.js";var h=(()=>{class i{constructor(){this.toastsSubject=new a([]),this.toasts$=this.toastsSubject.asObservable()}success(t,e){this.addUnique({message:t,header:e,classname:"bg-success text-light",icon:"check_circle"})}warning(t,e){this.addUnique({message:t,header:e,classname:"bg-warning",icon:"help"})}error(t,e){this.addUnique({message:t,header:e,classname:"bg-danger text-light",icon:"cancel"})}remove(t){this.updateToasts(e=>e.filter(s=>!c(s,t)))}addUnique(t){this.updateToasts(e=>{if(!this.exists(e,t))return[...e,t]})}exists(t,e){return!!t.find(s=>s.message===e.message&&s.header===e.header)}updateToasts(t){this.toasts$.pipe(r(1)).subscribe(e=>{let s=t(e);s&&this.toastsSubject.next(s)})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{h as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-AYQPMCNZ.js b/public/apps/webapp-schulverwaltung/chunk-AYQPMCNZ.js new file mode 100644 index 00000000..5d950ded --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-AYQPMCNZ.js @@ -0,0 +1 @@ +import{Hc as t,Ic as n,Nc as o,Pc as r}from"./chunk-2W7IS4PN.js";var i=o({Key:r([n,t]),Value:t});export{i as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-BIDF56I4.js b/public/apps/webapp-schulverwaltung/chunk-B47FYJ6R.js similarity index 92% rename from public/apps/webapp-schulverwaltung/chunk-BIDF56I4.js rename to public/apps/webapp-schulverwaltung/chunk-B47FYJ6R.js index d1b51e49..ae177217 100644 --- a/public/apps/webapp-schulverwaltung/chunk-BIDF56I4.js +++ b/public/apps/webapp-schulverwaltung/chunk-B47FYJ6R.js @@ -1,2 +1,2 @@ -import{b as Te}from"./chunk-EY7EEL4Q.js";import{b as Me}from"./chunk-Y4QYVF5K.js";import"./chunk-UVJXXYOR.js";import{b as xe}from"./chunk-5NJNJ42P.js";import{a as Ce}from"./chunk-LTVWFE76.js";import{$a as g,Ab as U,Ad as ye,Bb as K,Cb as oe,Fa as u,H,Hd as ve,Ib as d,J as R,Jb as m,Jd as be,M as j,Ma as v,N as Y,Nd as Se,Oa as M,Ob as se,Od as E,P as $,Pa as h,Qa as A,Qd as _e,R as F,U as B,Ua as b,W as J,Wa as Z,X as Q,Xa as x,Ya as T,Za as r,_ as L,_a as s,a as P,b as G,bc as ae,bd as le,cd as ce,dd as pe,f as W,fb as ee,g as q,gb as k,hd as I,id as de,l as D,la as X,ld as me,md as ue,n as _,qb as f,qd as he,rb as C,rd as fe,sb as N,w as z,wa as o,wb as te,wc as re,xa as y,xb as ie,yb as ne,yd as ge,zb as V,zd as O}from"./chunk-34ZOBT6Z.js";var ke=(()=>{class t{constructor(){this.id=null,this.label=null,this.disabled=!1,this.value=!1,this.valueChange=new X,this.fallbackId=be("bkd-switch")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-switch"]],inputs:{id:"id",label:"label",disabled:"disabled",value:"value"},outputs:{valueChange:"valueChange"},decls:3,vars:5,consts:[["type","checkbox",3,"ngModelChange","disabled","ngModel"]],template:function(i,n){if(i&1&&(r(0,"input",0),ee("ngModelChange",function(l){return n.valueChange.emit(l)}),s(),r(1,"label"),f(2),s()),i&2){let a,l;h("disabled",n.disabled)("ngModel",n.value),M("id",(a=n.id)!==null&&a!==void 0?a:n.fallbackId),o(),M("for",(l=n.id)!==null&&l!==void 0?l:n.fallbackId),o(),C(n.label)}},dependencies:[O,pe,I,me],styles:['input[_ngcontent-%COMP%]{opacity:0;position:absolute}label[_ngcontent-%COMP%]{cursor:pointer;text-indent:-9999px;width:36px;height:18px;border:1px solid rgb(0,0,0);background:#fff;display:block;border-radius:18px;position:relative}label[_ngcontent-%COMP%]:after{content:"";position:absolute;top:1px;left:1px;width:14px;height:14px;background:#000;border-radius:14px;transition:.3s}input[_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{border-color:#000;background:#000}input[_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:calc(100% - 1px);transform:translate(-100%);background:#fff}input[_ngcontent-%COMP%]:focus + label[_ngcontent-%COMP%]{box-shadow:0 0 0 .25rem #4e4e4e40}input[_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]{cursor:default;background:#fff;border-color:#dedede}input[_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]:after{background:#dedede}label[_ngcontent-%COMP%]:active:after{width:18.2px}'],changeDetection:0})}}return t})();function Ge(t,p){if(t&1&&(r(0,"div"),f(1),s()),t&2){let e=p.$implicit;o(),N(" ",e," ")}}function De(t,p){if(t&1&&(r(0,"div",3),x(1,Ge,2,1,"div",null,Z),s()),t&2){let e=k();o(),T(e.descriptionLines)}}var Ne=(()=>{class t{constructor(e){this.cd=e,this.id="",this.label="",this.description=null,this.disabled=!1,this.onChange=i=>{},this.onTouched=()=>{},this._value=!1}get value(){return this._value}set value(e){this._value=e,this.onChange(e)}get descriptionLines(){return this.description?this.description.split(` +import{b as Te}from"./chunk-DJH5AAGM.js";import{b as Me}from"./chunk-Y4QYVF5K.js";import"./chunk-AYQPMCNZ.js";import{b as xe}from"./chunk-PSYDBHTH.js";import{a as Ce}from"./chunk-AVBHFGIF.js";import{$a as s,Ab as V,Ad as O,Bb as U,Bd as ye,Cb as K,Db as oe,Ga as u,H,Id as ve,J as R,Jb as d,Kb as m,Kd as be,M as j,N as Y,Na as v,Od as Se,P as $,Pa as M,Pb as se,Pd as E,Qa as h,R as F,Ra as A,Rd as _e,U as B,Va as b,W as J,X as Q,Xa as Z,Ya as x,Za as T,_ as L,_a as r,a as P,ab as g,b as G,cc as ae,cd as le,dd as ce,ed as pe,f as W,g as q,gb as ee,hb as k,id as I,jd as de,l as D,ma as X,md as me,n as _,nd as ue,rb as f,rd as he,sb as C,sd as fe,tb as N,w as z,xa as o,xb as te,xc as re,ya as y,yb as ie,zb as ne,zd as ge}from"./chunk-2W7IS4PN.js";var ke=(()=>{class t{constructor(){this.id=null,this.label=null,this.disabled=!1,this.value=!1,this.valueChange=new X,this.fallbackId=be("bkd-switch")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-switch"]],inputs:{id:"id",label:"label",disabled:"disabled",value:"value"},outputs:{valueChange:"valueChange"},decls:3,vars:5,consts:[["type","checkbox",3,"ngModelChange","disabled","ngModel"]],template:function(i,n){if(i&1&&(r(0,"input",0),ee("ngModelChange",function(l){return n.valueChange.emit(l)}),s(),r(1,"label"),f(2),s()),i&2){let a,l;h("disabled",n.disabled)("ngModel",n.value),M("id",(a=n.id)!==null&&a!==void 0?a:n.fallbackId),o(),M("for",(l=n.id)!==null&&l!==void 0?l:n.fallbackId),o(),C(n.label)}},dependencies:[O,pe,I,me],styles:['input[_ngcontent-%COMP%]{opacity:0;position:absolute}label[_ngcontent-%COMP%]{cursor:pointer;text-indent:-9999px;width:36px;height:18px;border:1px solid rgb(0,0,0);background:#fff;display:block;border-radius:18px;position:relative}label[_ngcontent-%COMP%]:after{content:"";position:absolute;top:1px;left:1px;width:14px;height:14px;background:#000;border-radius:14px;transition:.3s}input[_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{border-color:#000;background:#000}input[_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:calc(100% - 1px);transform:translate(-100%);background:#fff}input[_ngcontent-%COMP%]:focus + label[_ngcontent-%COMP%]{box-shadow:0 0 0 .25rem #4e4e4e40}input[_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]{cursor:default;background:#fff;border-color:#dedede}input[_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]:after{background:#dedede}label[_ngcontent-%COMP%]:active:after{width:18.2px}'],changeDetection:0})}}return t})();function Ge(t,p){if(t&1&&(r(0,"div"),f(1),s()),t&2){let e=p.$implicit;o(),N(" ",e," ")}}function De(t,p){if(t&1&&(r(0,"div",3),x(1,Ge,2,1,"div",null,Z),s()),t&2){let e=k();o(),T(e.descriptionLines)}}var Ne=(()=>{class t{constructor(e){this.cd=e,this.id="",this.label="",this.description=null,this.disabled=!1,this.onChange=i=>{},this.onTouched=()=>{},this._value=!1}get value(){return this._value}set value(e){this._value=e,this.onChange(e)}get descriptionLines(){return this.description?this.description.split(` `):[]}writeValue(e){this._value=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}static{this.\u0275fac=function(i){return new(i||t)(y(se))}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings-notifications-toggle"]],inputs:{id:"id",label:"label",description:"description",disabled:"disabled"},features:[oe([{provide:ce,useExisting:J(()=>t),multi:!0}])],decls:5,vars:6,consts:[[1,"d-flex","align-items-center"],[1,"flex-fill"],[3,"valueChange","id","value","disabled"],[1,"form-text"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"label",1),f(2),s(),r(3,"bkd-switch",2),ne("valueChange",function(l){return ie(n.value,l)||(n.value=l),l}),s()(),v(4,De,3,0,"div",3)),i&2&&(o(),M("for",n.id),o(),N(" ",n.label," "),o(),h("id",n.id),te("value",n.value),h("disabled",n.disabled),o(),b(n.description?4:-1))},dependencies:[ke],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var we=(()=>{class t{constructor(e,i){this.settings=e,this.storage=i,this.currentRoles=null}getNotificationTypes(){return this.getNotificationTypeKeys().map(e=>{if(!(e in this.settings.notificationTypes))throw new Error(`Key '${e}' is missing in 'notificationTypes' setting`);return{key:e,text:this.settings.notificationTypes[e]}})}getNotificationTypeKeys(){return ve(this.settings.notificationTypesAssignments.reduce((e,{roles:i,types:n})=>this.hasAnyRole(i)?[...e,...n]:e,[]))}hasAnyRole(e){return this.currentRoles===null&&(this.currentRoles=Me(this.storage.getPayload()?.roles)),this.currentRoles.some(i=>e.includes(i))}static{this.\u0275fac=function(i){return new(i||t)(L(le),L(_e))}}static{this.\u0275prov=Q({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var $e=(t,p)=>p.key;function je(t,p){t&1&&(r(0,"div",2),g(1,"bkd-spinner",5),s())}function Be(t,p){if(t&1&&(g(0,"bkd-my-settings-notifications-toggle",7),d(1,"async"),d(2,"async")),t&2){let e=p.$implicit,i=p.$index;A("mt-4",i>0),h("id","notification-channels-"+e.key)("label",m(1,6,e.label))("description",m(2,8,e.description))("formControlName",e.key)}}function Le(t,p){if(t&1&&(r(0,"form",3),x(1,Be,3,10,"bkd-my-settings-notifications-toggle",6,$e),s()),t&2){let e=k(),i=K(0);h("formGroup",i),o(),T(e.channelsSettings)}}function Ae(t,p){if(t&1&&(g(0,"bkd-my-settings-notifications-toggle",7),d(1,"async"),d(2,"async")),t&2){let e=p.$implicit,i=p.$index;A("mt-4",i>0),h("id","notification-types-"+e.key)("label",m(1,6,e.label))("description",m(2,8,e.description))("formControlName",e.key)}}function Ve(t,p){if(t&1&&(r(0,"form",3),x(1,Ae,3,10,"bkd-my-settings-notifications-toggle",6,$e),s()),t&2){let e=k(),i=K(2);h("formGroup",i),o(),T(e.typesSettings)}}var Fe=(()=>{class t{constructor(e,i,n,a,l){this.userSettings=e,this.formBuilder=i,this.toastService=n,this.translate=a,this.notificationTypes=l,this.channelsSettings=[{key:"gui",label:this.translate.get("my-settings.notifications.gui")},{key:"mail",label:this.translate.get("my-settings.notifications.mail")},{key:"phoneMobile",label:this.translate.get("my-settings.notifications.phoneMobile")}],this.typesSettings=this.notificationTypes.getNotificationTypes().map(c=>{let{label:S,description:Ee}=this.translate.currentLang==="fr-CH"?c.text.fr:c.text.de;return{key:c.key,label:D(S),description:D(Ee)}}),this.channelsValue$=this.userSettings.getNotificationChannels(),this.typesValue$=this.userSettings.getNotificationTypesInactive().pipe(_(this.typesArrayToRecord.bind(this))),this.channelsFormGroup$=this.channelsValue$.pipe(_(c=>this.createFormGroup(this.channelsSettings,c)),j(1)),this.allChannelsInactive$=z(this.channelsValue$,this.channelsFormGroup$.pipe($(c=>c.valueChanges))).pipe(_(c=>Object.values(c).every(S=>!S)),H()),this.typesFormGroup$=this.typesValue$.pipe(B(this.allChannelsInactive$),_(([c,S])=>this.createFormGroup(this.typesSettings,c,!0,S)),j(1)),this.saving$=new q(!1),this.destroy$=new W}ngOnInit(){this.userSettings.refetch(),this.allChannelsInactive$.pipe(Y(1),B(this.typesFormGroup$),F(this.destroy$)).subscribe(([e,i])=>{Object.values(i.controls).forEach(n=>e?n.disable():n.enable())}),this.channelsFormGroup$.pipe(F(this.destroy$),$(e=>e.valueChanges)).subscribe(this.saveChannels.bind(this)),this.typesFormGroup$.pipe(F(this.destroy$),$(e=>e.valueChanges)).subscribe(this.saveTypes.bind(this))}ngOnDestroy(){this.destroy$.next()}createFormGroup(e,i,n=!1,a=!1){return this.formBuilder.group(e.reduce((l,{key:c})=>G(P({},l),{[c]:[{value:i[c]??n,disabled:a}]}),{}))}saveChannels(e){this.saving$.next(!0),this.userSettings.saveNotificationChannels(e).pipe(R(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}saveTypes(e){this.saving$.next(!0),this.userSettings.saveNotificationTypesInactive(this.typesRecordToArray(e)).pipe(R(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("my-settings.notifications.save-success"))}typesArrayToRecord(e){return this.typesSettings.reduce((n,{key:a})=>G(P({},n),{[a]:!e.includes(a)}),{})}typesRecordToArray(e){return Object.keys(e).reduce((n,a)=>e[a]?n:[...n,a],[])}static{this.\u0275fac=function(i){return new(i||t)(y(Te),y(ge),y(Ce),y(Se),y(we))}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings-notifications"]],decls:17,vars:17,consts:[[1,"pb-4"],[1,"m-0","pb-3","d-flex","align-items-stretch"],[1,"position-relative"],[3,"formGroup"],[1,"mt-4","form-text"],[1,"position-absolute","inline","small","d-inline-block","ms-2"],[3,"id","label","description","formControlName","mt-4"],[3,"id","label","description","formControlName"]],template:function(i,n){if(i&1&&(V(0),d(1,"async"),V(2),d(3,"async"),r(4,"div",0)(5,"h2",1)(6,"span"),f(7),d(8,"translate"),s(),v(9,je,2,0,"div",2),d(10,"async"),s(),v(11,Le,3,1,"form",3),r(12,"p",4),f(13),d(14,"translate"),s(),g(15,"hr"),v(16,Ve,3,1,"form",3),s()),i&2){let a=U(m(1,5,n.channelsFormGroup$));o(2);let l=U(m(3,8,n.typesFormGroup$));o(5),C(m(8,11,"my-settings.notifications.title")),o(2),b(m(10,13,n.saving$)?9:-1),o(2),b(a?11:-1),o(2),N(" ",m(14,15,"my-settings.notifications.privacy-hint")," "),o(3),b(l?16:-1)}},dependencies:[xe,O,ue,I,de,ye,he,fe,Ne,ae,E],styles:[".checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important}"],changeDetection:0})}}return t})();var Ie=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings-show"]],decls:5,vars:3,consts:[[1,"bkd-container","bkd-container-limited"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"h1"),f(2),d(3,"translate"),s(),g(4,"bkd-my-settings-notifications"),s()),i&2&&(o(2),C(m(3,1,"my-settings.title")))},dependencies:[Fe,E],encapsulation:2})}}return t})();var Oe=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=u({type:t,selectors:[["bkd-my-settings"]],decls:1,vars:0,template:function(i,n){i&1&&g(0,"router-outlet")},dependencies:[re],encapsulation:2,changeDetection:0})}}return t})();var Nt=[{path:"",component:Oe,children:[{path:"",component:Ie}]}];export{Nt as MY_SETTINGS_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-FFBZO25J.js b/public/apps/webapp-schulverwaltung/chunk-BIDSHCYH.js similarity index 98% rename from public/apps/webapp-schulverwaltung/chunk-FFBZO25J.js rename to public/apps/webapp-schulverwaltung/chunk-BIDSHCYH.js index 6e7e6153..16b19089 100644 --- a/public/apps/webapp-schulverwaltung/chunk-FFBZO25J.js +++ b/public/apps/webapp-schulverwaltung/chunk-BIDSHCYH.js @@ -1 +1 @@ -import{b as _,c as O,d as M,e as Y,f as I,h as Yr,i as Ir,j as Er,k as Hr,l as hr,m as qr,n as Lr,o as yr,p as vr}from"./chunk-EDO6DY2V.js";import{f as Mr,g as _r,h as Or,i as d,j as w}from"./chunk-PQGQXFEQ.js";import{i as Nr}from"./chunk-JHVNIEZK.js";import{X as Tr,ha as kr}from"./chunk-34ZOBT6Z.js";function Qr(){return Object.assign({},O())}function Rr(o,r){let t=w(o,r?.in).getDay();return t===0?7:t}function Fr(o,r){let t=Vr(r)?new r(0):d(r,0);return t.setFullYear(o.getFullYear(),o.getMonth(),o.getDate()),t.setHours(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()),t}function Vr(o){return typeof o=="function"&&o.prototype?.constructor===o}var Zr=10,E=class{subPriority=0;validate(r,t){return!0}},H=class extends E{constructor(r,t,e,s,i){super(),this.value=r,this.validateValue=t,this.setValue=e,this.priority=s,i&&(this.subPriority=i)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,e){return this.setValue(r,t,this.value,e)}},q=class extends E{priority=Zr;subPriority=-1;constructor(r,t){super(),this.context=r||(e=>d(t,e))}set(r,t){return t.timestampIsSet?r:d(r,Fr(r,this.context))}};var n=class{run(r,t,e,s){let i=this.parse(r,t,e,s);return i?{setter:new H(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(r,t,e){return!0}};var L=class extends n{priority=140;parse(r,t,e){switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"})||e.era(r,{width:"narrow"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})||e.era(r,{width:"abbreviated"})||e.era(r,{width:"narrow"})}}set(r,t,e){return t.era=e,r.setFullYear(e,0,1),r.setHours(0,0,0,0),r}incompatibleTokens=["R","u","t","T"]};var c={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},x={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function p(o,r){return o&&{value:r(o.value),rest:o.rest}}function u(o,r){let t=r.match(o);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function h(o,r){let t=r.match(o);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};let e=t[1]==="+"?1:-1,s=t[2]?parseInt(t[2],10):0,i=t[3]?parseInt(t[3],10):0,l=t[5]?parseInt(t[5],10):0;return{value:e*(s*_r+i*Mr+l*Or),rest:r.slice(t[0].length)}}function v(o){return u(c.anyDigitsSigned,o)}function a(o,r){switch(o){case 1:return u(c.singleDigit,r);case 2:return u(c.twoDigits,r);case 3:return u(c.threeDigits,r);case 4:return u(c.fourDigits,r);default:return u(new RegExp("^\\d{1,"+o+"}"),r)}}function P(o,r){switch(o){case 1:return u(c.singleDigitSigned,r);case 2:return u(c.twoDigitsSigned,r);case 3:return u(c.threeDigitsSigned,r);case 4:return u(c.fourDigitsSigned,r);default:return u(new RegExp("^-?\\d{1,"+o+"}"),r)}}function T(o){switch(o){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Q(o,r){let t=r>0,e=t?r:1-r,s;if(e<=50)s=o||100;else{let i=e+50,l=Math.trunc(i/100)*100,y=o>=i%100;s=o+l-(y?100:0)}return t?s:1-s}function R(o){return o%400===0||o%4===0&&o%100!==0}var F=class extends n{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(r,t,e){let s=i=>({year:i,isTwoDigitYear:t==="yy"});switch(t){case"y":return p(a(4,r),s);case"yo":return p(e.ordinalNumber(r,{unit:"year"}),s);default:return p(a(t.length,r),s)}}validate(r,t){return t.isTwoDigitYear||t.year>0}set(r,t,e){let s=r.getFullYear();if(e.isTwoDigitYear){let l=Q(e.year,s);return r.setFullYear(l,0,1),r.setHours(0,0,0,0),r}let i=!("era"in t)||t.era===1?e.year:1-e.year;return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}};var W=class extends n{priority=130;parse(r,t,e){let s=i=>({year:i,isTwoDigitYear:t==="YY"});switch(t){case"Y":return p(a(4,r),s);case"Yo":return p(e.ordinalNumber(r,{unit:"year"}),s);default:return p(a(t.length,r),s)}}validate(r,t){return t.isTwoDigitYear||t.year>0}set(r,t,e,s){let i=Er(r,s);if(e.isTwoDigitYear){let y=Q(e.year,i);return r.setFullYear(y,0,s.firstWeekContainsDate),r.setHours(0,0,0,0),M(r,s)}let l=!("era"in t)||t.era===1?e.year:1-e.year;return r.setFullYear(l,0,s.firstWeekContainsDate),r.setHours(0,0,0,0),M(r,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]};var C=class extends n{priority=130;parse(r,t){return t==="R"?P(4,r):P(t.length,r)}set(r,t,e){let s=d(r,0);return s.setFullYear(e,0,4),s.setHours(0,0,0,0),Y(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]};var B=class extends n{priority=130;parse(r,t){return t==="u"?P(4,r):P(t.length,r)}set(r,t,e){return r.setFullYear(e,0,1),r.setHours(0,0,0,0),r}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]};var G=class extends n{priority=120;parse(r,t,e){switch(t){case"Q":case"QQ":return a(t.length,r);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"})||e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})||e.quarter(r,{width:"abbreviated",context:"formatting"})||e.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=1&&t<=4}set(r,t,e){return r.setMonth((e-1)*3,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]};var X=class extends n{priority=120;parse(r,t,e){switch(t){case"q":case"qq":return a(t.length,r);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"})||e.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})||e.quarter(r,{width:"abbreviated",context:"standalone"})||e.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=1&&t<=4}set(r,t,e){return r.setMonth((e-1)*3,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]};var z=class extends n{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(r,t,e){let s=i=>i-1;switch(t){case"M":return p(u(c.month,r),s);case"MM":return p(a(2,r),s);case"Mo":return p(e.ordinalNumber(r,{unit:"month"}),s);case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"})||e.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})||e.month(r,{width:"abbreviated",context:"formatting"})||e.month(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.setMonth(e,1),r.setHours(0,0,0,0),r}};var A=class extends n{priority=110;parse(r,t,e){let s=i=>i-1;switch(t){case"L":return p(u(c.month,r),s);case"LL":return p(a(2,r),s);case"Lo":return p(e.ordinalNumber(r,{unit:"month"}),s);case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"})||e.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})||e.month(r,{width:"abbreviated",context:"standalone"})||e.month(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.setMonth(e,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]};function Wr(o,r,t){let e=w(o,t?.in),s=Hr(e,t)-r;return e.setDate(e.getDate()-s*7),w(e,t?.in)}var V=class extends n{priority=100;parse(r,t,e){switch(t){case"w":return u(c.week,r);case"wo":return e.ordinalNumber(r,{unit:"week"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=53}set(r,t,e,s){return M(Wr(r,e,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]};function Cr(o,r,t){let e=w(o,t?.in),s=Ir(e,t)-r;return e.setDate(e.getDate()-s*7),e}var Z=class extends n{priority=100;parse(r,t,e){switch(t){case"I":return u(c.week,r);case"Io":return e.ordinalNumber(r,{unit:"week"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=53}set(r,t,e){return Y(Cr(r,e))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]};var Kr=[31,28,31,30,31,30,31,31,30,31,30,31],$r=[31,29,31,30,31,30,31,31,30,31,30,31],K=class extends n{priority=90;subPriority=1;parse(r,t,e){switch(t){case"d":return u(c.date,r);case"do":return e.ordinalNumber(r,{unit:"date"});default:return a(t.length,r)}}validate(r,t){let e=r.getFullYear(),s=R(e),i=r.getMonth();return s?t>=1&&t<=$r[i]:t>=1&&t<=Kr[i]}set(r,t,e){return r.setDate(e),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]};var $=class extends n{priority=90;subpriority=1;parse(r,t,e){switch(t){case"D":case"DD":return u(c.dayOfYear,r);case"Do":return e.ordinalNumber(r,{unit:"date"});default:return a(t.length,r)}}validate(r,t){let e=r.getFullYear();return R(e)?t>=1&&t<=366:t>=1&&t<=365}set(r,t,e){return r.setMonth(0,e),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]};function k(o,r,t){let e=O(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,i=w(o,t?.in),l=i.getDay(),dr=(r%7+7)%7,D=7-s,N=r<0||r>6?r-(l+D)%7:(dr+D)%7-(l+D)%7;return _(i,N,t)}var j=class extends n{priority=90;parse(r,t,e){switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["D","i","e","c","t","T"]};var U=class extends n{priority=90;parse(r,t,e,s){let i=l=>{let y=Math.floor((l-1)/7)*7;return(l+s.weekStartsOn+6)%7+y};switch(t){case"e":case"ee":return p(a(t.length,r),i);case"eo":return p(e.ordinalNumber(r,{unit:"day"}),i);case"eee":return e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"eeeee":return e.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]};var J=class extends n{priority=90;parse(r,t,e,s){let i=l=>{let y=Math.floor((l-1)/7)*7;return(l+s.weekStartsOn+6)%7+y};switch(t){case"c":case"cc":return p(a(t.length,r),i);case"co":return p(e.ordinalNumber(r,{unit:"day"}),i);case"ccc":return e.day(r,{width:"abbreviated",context:"standalone"})||e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"});case"ccccc":return e.day(r,{width:"narrow",context:"standalone"});case"cccccc":return e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return e.day(r,{width:"wide",context:"standalone"})||e.day(r,{width:"abbreviated",context:"standalone"})||e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]};function Br(o,r,t){let e=w(o,t?.in),s=Rr(e,t),i=r-s;return _(e,i,t)}var S=class extends n{priority=90;parse(r,t,e){let s=i=>i===0?7:i;switch(t){case"i":case"ii":return a(t.length,r);case"io":return e.ordinalNumber(r,{unit:"day"});case"iii":return p(e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s);case"iiiii":return p(e.day(r,{width:"narrow",context:"formatting"}),s);case"iiiiii":return p(e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s);case"iiii":default:return p(e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s)}}validate(r,t){return t>=1&&t<=7}set(r,t,e){return r=Br(r,e),r.setHours(0,0,0,0),r}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]};var rr=class extends n{priority=80;parse(r,t,e){switch(t){case"a":case"aa":case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["b","B","H","k","t","T"]};var er=class extends n{priority=80;parse(r,t,e){switch(t){case"b":case"bb":case"bbb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["a","B","H","k","t","T"]};var tr=class extends n{priority=80;parse(r,t,e){switch(t){case"B":case"BB":case"BBB":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["a","b","t","T"]};var or=class extends n{priority=70;parse(r,t,e){switch(t){case"h":return u(c.hour12h,r);case"ho":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=12}set(r,t,e){let s=r.getHours()>=12;return s&&e<12?r.setHours(e+12,0,0,0):!s&&e===12?r.setHours(0,0,0,0):r.setHours(e,0,0,0),r}incompatibleTokens=["H","K","k","t","T"]};var sr=class extends n{priority=70;parse(r,t,e){switch(t){case"H":return u(c.hour23h,r);case"Ho":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=23}set(r,t,e){return r.setHours(e,0,0,0),r}incompatibleTokens=["a","b","h","K","k","t","T"]};var nr=class extends n{priority=70;parse(r,t,e){switch(t){case"K":return u(c.hour11h,r);case"Ko":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.getHours()>=12&&e<12?r.setHours(e+12,0,0,0):r.setHours(e,0,0,0),r}incompatibleTokens=["h","H","k","t","T"]};var ir=class extends n{priority=70;parse(r,t,e){switch(t){case"k":return u(c.hour24h,r);case"ko":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=24}set(r,t,e){let s=e<=24?e%24:e;return r.setHours(s,0,0,0),r}incompatibleTokens=["a","b","h","H","K","t","T"]};var ar=class extends n{priority=60;parse(r,t,e){switch(t){case"m":return u(c.minute,r);case"mo":return e.ordinalNumber(r,{unit:"minute"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=59}set(r,t,e){return r.setMinutes(e,0,0),r}incompatibleTokens=["t","T"]};var ur=class extends n{priority=50;parse(r,t,e){switch(t){case"s":return u(c.second,r);case"so":return e.ordinalNumber(r,{unit:"second"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=59}set(r,t,e){return r.setSeconds(e,0),r}incompatibleTokens=["t","T"]};var cr=class extends n{priority=30;parse(r,t){let e=s=>Math.trunc(s*Math.pow(10,-t.length+3));return p(a(t.length,r),e)}set(r,t,e){return r.setMilliseconds(e),r}incompatibleTokens=["t","T"]};var mr=class extends n{priority=10;parse(r,t){switch(t){case"X":return h(x.basicOptionalMinutes,r);case"XX":return h(x.basic,r);case"XXXX":return h(x.basicOptionalSeconds,r);case"XXXXX":return h(x.extendedOptionalSeconds,r);case"XXX":default:return h(x.extended,r)}}set(r,t,e){return t.timestampIsSet?r:d(r,r.getTime()-I(r)-e)}incompatibleTokens=["t","T","x"]};var pr=class extends n{priority=10;parse(r,t){switch(t){case"x":return h(x.basicOptionalMinutes,r);case"xx":return h(x.basic,r);case"xxxx":return h(x.basicOptionalSeconds,r);case"xxxxx":return h(x.extendedOptionalSeconds,r);case"xxx":default:return h(x.extended,r)}}set(r,t,e){return t.timestampIsSet?r:d(r,r.getTime()-I(r)-e)}incompatibleTokens=["t","T","X"]};var fr=class extends n{priority=40;parse(r){return v(r)}set(r,t,e){return[d(r,e*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var lr=class extends n{priority=20;parse(r){return v(r)}set(r,t,e){return[d(r,e),{timestampIsSet:!0}]}incompatibleTokens="*"};var Gr={G:new L,y:new F,Y:new W,R:new C,u:new B,Q:new G,q:new X,M:new z,L:new A,w:new V,I:new Z,d:new K,D:new $,E:new j,e:new U,c:new J,i:new S,a:new rr,b:new er,B:new tr,h:new or,H:new sr,K:new nr,k:new ir,m:new ar,s:new ur,S:new cr,X:new mr,x:new pr,t:new fr,T:new lr};var jr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ur=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Jr=/^'([^]*?)'?$/,Sr=/''/g,re=/\S/,ee=/[a-zA-Z]/;function Xr(o,r,t,e){let s=()=>d(e?.in||t,NaN),i=Qr(),l=e?.locale??i.locale??Yr,y=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,dr=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!r)return o?s():w(t,e?.in);let D={firstWeekContainsDate:y,weekStartsOn:dr,locale:l},N=[new q(e?.in,t)],zr=r.match(Ur).map(m=>{let f=m[0];if(f in hr){let b=hr[f];return b(m,l.formatLong)}return m}).join("").match(jr),wr=[];for(let m of zr){!e?.useAdditionalWeekYearTokens&&Lr(m)&&yr(m,r,o),!e?.useAdditionalDayOfYearTokens&&qr(m)&&yr(m,r,o);let f=m[0],b=Gr[f];if(b){let{incompatibleTokens:Dr}=b;if(Array.isArray(Dr)){let gr=wr.find(Pr=>Dr.includes(Pr.token)||Pr.token===f);if(gr)throw new RangeError(`The format string mustn't contain \`${gr.fullToken}\` and \`${m}\` at the same time`)}else if(b.incompatibleTokens==="*"&&wr.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);wr.push({token:f,fullToken:m});let xr=b.run(o,m,l.match,D);if(!xr)return s();N.push(xr.setter),o=xr.rest}else{if(f.match(ee))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");if(m==="''"?m="'":f==="'"&&(m=te(m)),o.indexOf(m)===0)o=o.slice(m.length);else return s()}}if(o.length>0&&re.test(o))return s();let Ar=N.map(m=>m.priority).sort((m,f)=>f-m).filter((m,f,b)=>b.indexOf(m)===f).map(m=>N.filter(f=>f.priority===m).sort((f,b)=>b.subPriority-f.subPriority)).map(m=>m[0]),g=w(t,e?.in);if(isNaN(+g))return s();let br={};for(let m of Ar){if(!m.validate(g,D))return s();let f=m.set(g,br,D);Array.isArray(f)?(g=f[0],Object.assign(br,f[1])):g=f}return g}function te(o){return o.match(Jr)[1].replace(Sr,"'")}var Fs=(()=>{class o extends Nr{parse(t){let e=t?Xr(t,"dd.MM.yyyy",new Date):null;return e?{year:e.getFullYear(),month:e.getMonth(),day:e.getDay()}:null}format(t){return t?vr(new Date(t.year,t.month-1,t.day),"dd.MM.yyyy"):""}static{this.\u0275fac=(()=>{let t;return function(s){return(t||(t=kr(o)))(s||o)}})()}static{this.\u0275prov=Tr({token:o,factory:o.\u0275fac})}}return o})();export{Fs as a}; +import{b as _,c as O,d as M,e as Y,f as I,h as Yr,i as Ir,j as Er,k as Hr,l as hr,m as qr,n as Lr,o as yr,p as vr}from"./chunk-SRCW6BUG.js";import{f as Mr,g as _r,h as Or,i as d,j as w}from"./chunk-GOGVGWFJ.js";import{i as Nr}from"./chunk-W4U7QKJF.js";import{X as Tr,ia as kr}from"./chunk-2W7IS4PN.js";function Qr(){return Object.assign({},O())}function Rr(o,r){let t=w(o,r?.in).getDay();return t===0?7:t}function Fr(o,r){let t=Vr(r)?new r(0):d(r,0);return t.setFullYear(o.getFullYear(),o.getMonth(),o.getDate()),t.setHours(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()),t}function Vr(o){return typeof o=="function"&&o.prototype?.constructor===o}var Zr=10,E=class{subPriority=0;validate(r,t){return!0}},H=class extends E{constructor(r,t,e,s,i){super(),this.value=r,this.validateValue=t,this.setValue=e,this.priority=s,i&&(this.subPriority=i)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,e){return this.setValue(r,t,this.value,e)}},q=class extends E{priority=Zr;subPriority=-1;constructor(r,t){super(),this.context=r||(e=>d(t,e))}set(r,t){return t.timestampIsSet?r:d(r,Fr(r,this.context))}};var n=class{run(r,t,e,s){let i=this.parse(r,t,e,s);return i?{setter:new H(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(r,t,e){return!0}};var L=class extends n{priority=140;parse(r,t,e){switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"})||e.era(r,{width:"narrow"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})||e.era(r,{width:"abbreviated"})||e.era(r,{width:"narrow"})}}set(r,t,e){return t.era=e,r.setFullYear(e,0,1),r.setHours(0,0,0,0),r}incompatibleTokens=["R","u","t","T"]};var c={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},x={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function p(o,r){return o&&{value:r(o.value),rest:o.rest}}function u(o,r){let t=r.match(o);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function h(o,r){let t=r.match(o);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};let e=t[1]==="+"?1:-1,s=t[2]?parseInt(t[2],10):0,i=t[3]?parseInt(t[3],10):0,l=t[5]?parseInt(t[5],10):0;return{value:e*(s*_r+i*Mr+l*Or),rest:r.slice(t[0].length)}}function v(o){return u(c.anyDigitsSigned,o)}function a(o,r){switch(o){case 1:return u(c.singleDigit,r);case 2:return u(c.twoDigits,r);case 3:return u(c.threeDigits,r);case 4:return u(c.fourDigits,r);default:return u(new RegExp("^\\d{1,"+o+"}"),r)}}function P(o,r){switch(o){case 1:return u(c.singleDigitSigned,r);case 2:return u(c.twoDigitsSigned,r);case 3:return u(c.threeDigitsSigned,r);case 4:return u(c.fourDigitsSigned,r);default:return u(new RegExp("^-?\\d{1,"+o+"}"),r)}}function T(o){switch(o){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Q(o,r){let t=r>0,e=t?r:1-r,s;if(e<=50)s=o||100;else{let i=e+50,l=Math.trunc(i/100)*100,y=o>=i%100;s=o+l-(y?100:0)}return t?s:1-s}function R(o){return o%400===0||o%4===0&&o%100!==0}var F=class extends n{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(r,t,e){let s=i=>({year:i,isTwoDigitYear:t==="yy"});switch(t){case"y":return p(a(4,r),s);case"yo":return p(e.ordinalNumber(r,{unit:"year"}),s);default:return p(a(t.length,r),s)}}validate(r,t){return t.isTwoDigitYear||t.year>0}set(r,t,e){let s=r.getFullYear();if(e.isTwoDigitYear){let l=Q(e.year,s);return r.setFullYear(l,0,1),r.setHours(0,0,0,0),r}let i=!("era"in t)||t.era===1?e.year:1-e.year;return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}};var W=class extends n{priority=130;parse(r,t,e){let s=i=>({year:i,isTwoDigitYear:t==="YY"});switch(t){case"Y":return p(a(4,r),s);case"Yo":return p(e.ordinalNumber(r,{unit:"year"}),s);default:return p(a(t.length,r),s)}}validate(r,t){return t.isTwoDigitYear||t.year>0}set(r,t,e,s){let i=Er(r,s);if(e.isTwoDigitYear){let y=Q(e.year,i);return r.setFullYear(y,0,s.firstWeekContainsDate),r.setHours(0,0,0,0),M(r,s)}let l=!("era"in t)||t.era===1?e.year:1-e.year;return r.setFullYear(l,0,s.firstWeekContainsDate),r.setHours(0,0,0,0),M(r,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]};var C=class extends n{priority=130;parse(r,t){return t==="R"?P(4,r):P(t.length,r)}set(r,t,e){let s=d(r,0);return s.setFullYear(e,0,4),s.setHours(0,0,0,0),Y(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]};var B=class extends n{priority=130;parse(r,t){return t==="u"?P(4,r):P(t.length,r)}set(r,t,e){return r.setFullYear(e,0,1),r.setHours(0,0,0,0),r}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]};var G=class extends n{priority=120;parse(r,t,e){switch(t){case"Q":case"QQ":return a(t.length,r);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"})||e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})||e.quarter(r,{width:"abbreviated",context:"formatting"})||e.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=1&&t<=4}set(r,t,e){return r.setMonth((e-1)*3,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]};var X=class extends n{priority=120;parse(r,t,e){switch(t){case"q":case"qq":return a(t.length,r);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"})||e.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})||e.quarter(r,{width:"abbreviated",context:"standalone"})||e.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=1&&t<=4}set(r,t,e){return r.setMonth((e-1)*3,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]};var z=class extends n{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(r,t,e){let s=i=>i-1;switch(t){case"M":return p(u(c.month,r),s);case"MM":return p(a(2,r),s);case"Mo":return p(e.ordinalNumber(r,{unit:"month"}),s);case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"})||e.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})||e.month(r,{width:"abbreviated",context:"formatting"})||e.month(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.setMonth(e,1),r.setHours(0,0,0,0),r}};var A=class extends n{priority=110;parse(r,t,e){let s=i=>i-1;switch(t){case"L":return p(u(c.month,r),s);case"LL":return p(a(2,r),s);case"Lo":return p(e.ordinalNumber(r,{unit:"month"}),s);case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"})||e.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})||e.month(r,{width:"abbreviated",context:"standalone"})||e.month(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.setMonth(e,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]};function Wr(o,r,t){let e=w(o,t?.in),s=Hr(e,t)-r;return e.setDate(e.getDate()-s*7),w(e,t?.in)}var V=class extends n{priority=100;parse(r,t,e){switch(t){case"w":return u(c.week,r);case"wo":return e.ordinalNumber(r,{unit:"week"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=53}set(r,t,e,s){return M(Wr(r,e,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]};function Cr(o,r,t){let e=w(o,t?.in),s=Ir(e,t)-r;return e.setDate(e.getDate()-s*7),e}var Z=class extends n{priority=100;parse(r,t,e){switch(t){case"I":return u(c.week,r);case"Io":return e.ordinalNumber(r,{unit:"week"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=53}set(r,t,e){return Y(Cr(r,e))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]};var Kr=[31,28,31,30,31,30,31,31,30,31,30,31],$r=[31,29,31,30,31,30,31,31,30,31,30,31],K=class extends n{priority=90;subPriority=1;parse(r,t,e){switch(t){case"d":return u(c.date,r);case"do":return e.ordinalNumber(r,{unit:"date"});default:return a(t.length,r)}}validate(r,t){let e=r.getFullYear(),s=R(e),i=r.getMonth();return s?t>=1&&t<=$r[i]:t>=1&&t<=Kr[i]}set(r,t,e){return r.setDate(e),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]};var $=class extends n{priority=90;subpriority=1;parse(r,t,e){switch(t){case"D":case"DD":return u(c.dayOfYear,r);case"Do":return e.ordinalNumber(r,{unit:"date"});default:return a(t.length,r)}}validate(r,t){let e=r.getFullYear();return R(e)?t>=1&&t<=366:t>=1&&t<=365}set(r,t,e){return r.setMonth(0,e),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]};function k(o,r,t){let e=O(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,i=w(o,t?.in),l=i.getDay(),dr=(r%7+7)%7,D=7-s,N=r<0||r>6?r-(l+D)%7:(dr+D)%7-(l+D)%7;return _(i,N,t)}var j=class extends n{priority=90;parse(r,t,e){switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["D","i","e","c","t","T"]};var U=class extends n{priority=90;parse(r,t,e,s){let i=l=>{let y=Math.floor((l-1)/7)*7;return(l+s.weekStartsOn+6)%7+y};switch(t){case"e":case"ee":return p(a(t.length,r),i);case"eo":return p(e.ordinalNumber(r,{unit:"day"}),i);case"eee":return e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"eeeee":return e.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]};var J=class extends n{priority=90;parse(r,t,e,s){let i=l=>{let y=Math.floor((l-1)/7)*7;return(l+s.weekStartsOn+6)%7+y};switch(t){case"c":case"cc":return p(a(t.length,r),i);case"co":return p(e.ordinalNumber(r,{unit:"day"}),i);case"ccc":return e.day(r,{width:"abbreviated",context:"standalone"})||e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"});case"ccccc":return e.day(r,{width:"narrow",context:"standalone"});case"cccccc":return e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return e.day(r,{width:"wide",context:"standalone"})||e.day(r,{width:"abbreviated",context:"standalone"})||e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]};function Br(o,r,t){let e=w(o,t?.in),s=Rr(e,t),i=r-s;return _(e,i,t)}var S=class extends n{priority=90;parse(r,t,e){let s=i=>i===0?7:i;switch(t){case"i":case"ii":return a(t.length,r);case"io":return e.ordinalNumber(r,{unit:"day"});case"iii":return p(e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s);case"iiiii":return p(e.day(r,{width:"narrow",context:"formatting"}),s);case"iiiiii":return p(e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s);case"iiii":default:return p(e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s)}}validate(r,t){return t>=1&&t<=7}set(r,t,e){return r=Br(r,e),r.setHours(0,0,0,0),r}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]};var rr=class extends n{priority=80;parse(r,t,e){switch(t){case"a":case"aa":case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["b","B","H","k","t","T"]};var er=class extends n{priority=80;parse(r,t,e){switch(t){case"b":case"bb":case"bbb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["a","B","H","k","t","T"]};var tr=class extends n{priority=80;parse(r,t,e){switch(t){case"B":case"BB":case"BBB":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["a","b","t","T"]};var or=class extends n{priority=70;parse(r,t,e){switch(t){case"h":return u(c.hour12h,r);case"ho":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=12}set(r,t,e){let s=r.getHours()>=12;return s&&e<12?r.setHours(e+12,0,0,0):!s&&e===12?r.setHours(0,0,0,0):r.setHours(e,0,0,0),r}incompatibleTokens=["H","K","k","t","T"]};var sr=class extends n{priority=70;parse(r,t,e){switch(t){case"H":return u(c.hour23h,r);case"Ho":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=23}set(r,t,e){return r.setHours(e,0,0,0),r}incompatibleTokens=["a","b","h","K","k","t","T"]};var nr=class extends n{priority=70;parse(r,t,e){switch(t){case"K":return u(c.hour11h,r);case"Ko":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.getHours()>=12&&e<12?r.setHours(e+12,0,0,0):r.setHours(e,0,0,0),r}incompatibleTokens=["h","H","k","t","T"]};var ir=class extends n{priority=70;parse(r,t,e){switch(t){case"k":return u(c.hour24h,r);case"ko":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=24}set(r,t,e){let s=e<=24?e%24:e;return r.setHours(s,0,0,0),r}incompatibleTokens=["a","b","h","H","K","t","T"]};var ar=class extends n{priority=60;parse(r,t,e){switch(t){case"m":return u(c.minute,r);case"mo":return e.ordinalNumber(r,{unit:"minute"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=59}set(r,t,e){return r.setMinutes(e,0,0),r}incompatibleTokens=["t","T"]};var ur=class extends n{priority=50;parse(r,t,e){switch(t){case"s":return u(c.second,r);case"so":return e.ordinalNumber(r,{unit:"second"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=59}set(r,t,e){return r.setSeconds(e,0),r}incompatibleTokens=["t","T"]};var cr=class extends n{priority=30;parse(r,t){let e=s=>Math.trunc(s*Math.pow(10,-t.length+3));return p(a(t.length,r),e)}set(r,t,e){return r.setMilliseconds(e),r}incompatibleTokens=["t","T"]};var mr=class extends n{priority=10;parse(r,t){switch(t){case"X":return h(x.basicOptionalMinutes,r);case"XX":return h(x.basic,r);case"XXXX":return h(x.basicOptionalSeconds,r);case"XXXXX":return h(x.extendedOptionalSeconds,r);case"XXX":default:return h(x.extended,r)}}set(r,t,e){return t.timestampIsSet?r:d(r,r.getTime()-I(r)-e)}incompatibleTokens=["t","T","x"]};var pr=class extends n{priority=10;parse(r,t){switch(t){case"x":return h(x.basicOptionalMinutes,r);case"xx":return h(x.basic,r);case"xxxx":return h(x.basicOptionalSeconds,r);case"xxxxx":return h(x.extendedOptionalSeconds,r);case"xxx":default:return h(x.extended,r)}}set(r,t,e){return t.timestampIsSet?r:d(r,r.getTime()-I(r)-e)}incompatibleTokens=["t","T","X"]};var fr=class extends n{priority=40;parse(r){return v(r)}set(r,t,e){return[d(r,e*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var lr=class extends n{priority=20;parse(r){return v(r)}set(r,t,e){return[d(r,e),{timestampIsSet:!0}]}incompatibleTokens="*"};var Gr={G:new L,y:new F,Y:new W,R:new C,u:new B,Q:new G,q:new X,M:new z,L:new A,w:new V,I:new Z,d:new K,D:new $,E:new j,e:new U,c:new J,i:new S,a:new rr,b:new er,B:new tr,h:new or,H:new sr,K:new nr,k:new ir,m:new ar,s:new ur,S:new cr,X:new mr,x:new pr,t:new fr,T:new lr};var jr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ur=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Jr=/^'([^]*?)'?$/,Sr=/''/g,re=/\S/,ee=/[a-zA-Z]/;function Xr(o,r,t,e){let s=()=>d(e?.in||t,NaN),i=Qr(),l=e?.locale??i.locale??Yr,y=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,dr=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!r)return o?s():w(t,e?.in);let D={firstWeekContainsDate:y,weekStartsOn:dr,locale:l},N=[new q(e?.in,t)],zr=r.match(Ur).map(m=>{let f=m[0];if(f in hr){let b=hr[f];return b(m,l.formatLong)}return m}).join("").match(jr),wr=[];for(let m of zr){!e?.useAdditionalWeekYearTokens&&Lr(m)&&yr(m,r,o),!e?.useAdditionalDayOfYearTokens&&qr(m)&&yr(m,r,o);let f=m[0],b=Gr[f];if(b){let{incompatibleTokens:Dr}=b;if(Array.isArray(Dr)){let gr=wr.find(Pr=>Dr.includes(Pr.token)||Pr.token===f);if(gr)throw new RangeError(`The format string mustn't contain \`${gr.fullToken}\` and \`${m}\` at the same time`)}else if(b.incompatibleTokens==="*"&&wr.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);wr.push({token:f,fullToken:m});let xr=b.run(o,m,l.match,D);if(!xr)return s();N.push(xr.setter),o=xr.rest}else{if(f.match(ee))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");if(m==="''"?m="'":f==="'"&&(m=te(m)),o.indexOf(m)===0)o=o.slice(m.length);else return s()}}if(o.length>0&&re.test(o))return s();let Ar=N.map(m=>m.priority).sort((m,f)=>f-m).filter((m,f,b)=>b.indexOf(m)===f).map(m=>N.filter(f=>f.priority===m).sort((f,b)=>b.subPriority-f.subPriority)).map(m=>m[0]),g=w(t,e?.in);if(isNaN(+g))return s();let br={};for(let m of Ar){if(!m.validate(g,D))return s();let f=m.set(g,br,D);Array.isArray(f)?(g=f[0],Object.assign(br,f[1])):g=f}return g}function te(o){return o.match(Jr)[1].replace(Sr,"'")}var Fs=(()=>{class o extends Nr{parse(t){let e=t?Xr(t,"dd.MM.yyyy",new Date):null;return e?{year:e.getFullYear(),month:e.getMonth(),day:e.getDay()}:null}format(t){return t?vr(new Date(t.year,t.month-1,t.day),"dd.MM.yyyy"):""}static{this.\u0275fac=(()=>{let t;return function(s){return(t||(t=kr(o)))(s||o)}})()}static{this.\u0275prov=Tr({token:o,factory:o.\u0275fac})}}return o})();export{Fs as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-EY7EEL4Q.js b/public/apps/webapp-schulverwaltung/chunk-DJH5AAGM.js similarity index 90% rename from public/apps/webapp-schulverwaltung/chunk-EY7EEL4Q.js rename to public/apps/webapp-schulverwaltung/chunk-DJH5AAGM.js index 67e1415f..80639e0f 100644 --- a/public/apps/webapp-schulverwaltung/chunk-EY7EEL4Q.js +++ b/public/apps/webapp-schulverwaltung/chunk-DJH5AAGM.js @@ -1 +1 @@ -import{a as F}from"./chunk-UVJXXYOR.js";import{a as G,e as u}from"./chunk-5NJNJ42P.js";import{Cc as P,D as V,Dc as R,Ec as m,Fc as U,Gc as a,Hc as x,Ic as h,Kc as A,Kd as s,Lc as l,M as I,Mc as o,O as S,P as n,Qc as C,Rc as _,S as O,Tc as v,X as g,Yc as d,_ as f,bd as $,f as T,kc as j,n as c}from"./chunk-34ZOBT6Z.js";function M(e){var r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e),r}function k(e,r,t){t===void 0&&(t=e.name);var i=M(e);return i.validate=r,i.decode=function(p){return r(p,_(i))},i.name=t,i}function y(e,r,t){return t===void 0&&(t="withFallback("+e.name+")"),k(e,function(i,p){return P(function(){return m(r)})(e.validate(i,p))},t)}var q=o({Key:a,Value:a}),D=o({Id:a,Settings:C(l(q))}),b=d.pipe(o({mail:y(h,!1),gui:y(h,!1),phoneMobile:y(h,!1)})),E=new U("NotificationTypesInactive",e=>Array.isArray(e)&&e.every(r=>typeof r=="string"),(e,r)=>typeof e=="string"?m(e.split(";").filter(Boolean)):R(e,r),e=>e.join(";")),z=function(e){return e.Grid="grid",e.List="list",e}(z||{}),w=d.pipe(o({presenceControl:A({grid:null,list:null})})),Q=o({eventId:v(x),group:v(F.props.Key)}),N=d.pipe(C(l(Q))),Y=o({AccessInfo:o({Roles:l(a),Permissions:l(a)})});var L=(()=>{class e extends G{constructor(t,i){super(t,i,D,"UserSettings")}getUserSettingsCst(t){return this.http.get(`${this.baseUrl}/Cst`,{params:t}).pipe(n(s(this.codec)))}updateUserSettingsCst(t){return this.http.patch(`${this.baseUrl}/Cst`,t)}getAccessInfo(){return this.http.get(`${this.baseUrl}/?expand=AccessInfo`).pipe(n(s(Y)),c(({AccessInfo:t})=>t))}static{this.\u0275fac=function(i){return new(i||e)(f(j),f($))}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var tt=100,H="presenceControlViewMode",W="presenceControlGroupView",B="notification",J="notificationTypesInactive",vt=(()=>{class e{constructor(t){this.settingsRestService=t,this.refetch$=new T,this.settings$=this.refetch$.pipe(S(null),V(tt),n(()=>this.settingsRestService.getUserSettingsCst()),c(i=>i.Settings),I(1)),this.accessInfo$=this.settingsRestService.getAccessInfo().pipe(I(1))}refetch(){this.refetch$.next()}getSetting(t){return this.settings$.pipe(c(i=>i.find(p=>p.Key===t)?.Value??null))}saveSetting(t,i){return this.settingsRestService.updateUserSettingsCst(this.buildSettings(t,i)).pipe(O(()=>this.refetch$.next()))}getPresenceControlViewMode(){return this.getSetting(H).pipe(u('{"presenceControl":"grid"}'),n(s(w)),c(({presenceControl:t})=>t))}savePresenceControlViewMode(t){return this.saveSetting(H,w.encode({presenceControl:t}))}getPresenceControlGroupView(){return this.getSetting(W).pipe(u("[]"),n(s(N)))}savePresenceControlGroupView(t){return this.saveSetting(W,N.encode(t))}getNotificationChannels(){return this.getSetting(B).pipe(u("{}"),n(s(b)))}saveNotificationChannels(t){return this.saveSetting(B,b.encode(t))}getNotificationTypesInactive(){return this.getSetting(J).pipe(u(""),n(s(E)))}saveNotificationTypesInactive(t){return this.saveSetting(J,E.encode(t))}getRolesAndPermissions(){return this.accessInfo$.pipe(c(({Roles:t,Permissions:i})=>[...t,...i]),S(null))}buildSettings(t,i){return{Id:"Cst",Settings:[{Key:t,Value:i}]}}static{this.\u0275fac=function(i){return new(i||e)(f(L))}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{z as a,vt as b}; +import{a as F}from"./chunk-AYQPMCNZ.js";import{a as G,e as u}from"./chunk-PSYDBHTH.js";import{D as V,Dc as P,Ec as R,Fc as m,Gc as U,Hc as a,Ic as x,Jc as h,Lc as A,Ld as s,M as I,Mc as l,Nc as o,O as S,P as n,Rc as C,S as O,Sc as _,Uc as v,X as g,Zc as d,_ as f,cd as $,f as T,lc as j,n as c}from"./chunk-2W7IS4PN.js";function M(e){var r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e),r}function k(e,r,t){t===void 0&&(t=e.name);var i=M(e);return i.validate=r,i.decode=function(p){return r(p,_(i))},i.name=t,i}function y(e,r,t){return t===void 0&&(t="withFallback("+e.name+")"),k(e,function(i,p){return P(function(){return m(r)})(e.validate(i,p))},t)}var q=o({Key:a,Value:a}),D=o({Id:a,Settings:C(l(q))}),b=d.pipe(o({mail:y(h,!1),gui:y(h,!1),phoneMobile:y(h,!1)})),E=new U("NotificationTypesInactive",e=>Array.isArray(e)&&e.every(r=>typeof r=="string"),(e,r)=>typeof e=="string"?m(e.split(";").filter(Boolean)):R(e,r),e=>e.join(";")),z=function(e){return e.Grid="grid",e.List="list",e}(z||{}),w=d.pipe(o({presenceControl:A({grid:null,list:null})})),Q=o({eventId:v(x),group:v(F.props.Key)}),N=d.pipe(C(l(Q))),Y=o({AccessInfo:o({Roles:l(a),Permissions:l(a)})});var L=(()=>{class e extends G{constructor(t,i){super(t,i,D,"UserSettings")}getUserSettingsCst(t){return this.http.get(`${this.baseUrl}/Cst`,{params:t}).pipe(n(s(this.codec)))}updateUserSettingsCst(t){return this.http.patch(`${this.baseUrl}/Cst`,t)}getAccessInfo(){return this.http.get(`${this.baseUrl}/?expand=AccessInfo`).pipe(n(s(Y)),c(({AccessInfo:t})=>t))}static{this.\u0275fac=function(i){return new(i||e)(f(j),f($))}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var tt=100,H="presenceControlViewMode",W="presenceControlGroupView",B="notification",J="notificationTypesInactive",vt=(()=>{class e{constructor(t){this.settingsRestService=t,this.refetch$=new T,this.settings$=this.refetch$.pipe(S(null),V(tt),n(()=>this.settingsRestService.getUserSettingsCst()),c(i=>i.Settings),I(1)),this.accessInfo$=this.settingsRestService.getAccessInfo().pipe(I(1))}refetch(){this.refetch$.next()}getSetting(t){return this.settings$.pipe(c(i=>i.find(p=>p.Key===t)?.Value??null))}saveSetting(t,i){return this.settingsRestService.updateUserSettingsCst(this.buildSettings(t,i)).pipe(O(()=>this.refetch$.next()))}getPresenceControlViewMode(){return this.getSetting(H).pipe(u('{"presenceControl":"grid"}'),n(s(w)),c(({presenceControl:t})=>t))}savePresenceControlViewMode(t){return this.saveSetting(H,w.encode({presenceControl:t}))}getPresenceControlGroupView(){return this.getSetting(W).pipe(u("[]"),n(s(N)))}savePresenceControlGroupView(t){return this.saveSetting(W,N.encode(t))}getNotificationChannels(){return this.getSetting(B).pipe(u("{}"),n(s(b)))}saveNotificationChannels(t){return this.saveSetting(B,b.encode(t))}getNotificationTypesInactive(){return this.getSetting(J).pipe(u(""),n(s(E)))}saveNotificationTypesInactive(t){return this.saveSetting(J,E.encode(t))}getRolesAndPermissions(){return this.accessInfo$.pipe(c(({Roles:t,Permissions:i})=>[...t,...i]),S(null))}buildSettings(t,i){return{Id:"Cst",Settings:[{Key:t,Value:i}]}}static{this.\u0275fac=function(i){return new(i||e)(f(L))}}static{this.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{z as a,vt as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-PCBMXZVX.js b/public/apps/webapp-schulverwaltung/chunk-DKHMWL57.js similarity index 87% rename from public/apps/webapp-schulverwaltung/chunk-PCBMXZVX.js rename to public/apps/webapp-schulverwaltung/chunk-DKHMWL57.js index e82c0d17..30bf5462 100644 --- a/public/apps/webapp-schulverwaltung/chunk-PCBMXZVX.js +++ b/public/apps/webapp-schulverwaltung/chunk-DKHMWL57.js @@ -1 +1 @@ -import{a as ye,b as Se,c as ge}from"./chunk-X4IBKFGZ.js";import{a as be}from"./chunk-ETZJYB5I.js";import{a as _e}from"./chunk-4CSFXSJN.js";import{a as ue}from"./chunk-SP6SA4GZ.js";import"./chunk-NOKI2UHM.js";import"./chunk-U5XSAHDS.js";import"./chunk-4GQ5KKE3.js";import{b as oe,e as M}from"./chunk-HAKJPBT5.js";import"./chunk-HAMVO7SX.js";import"./chunk-Y4QYVF5K.js";import"./chunk-UVJXXYOR.js";import{a as ve,b as Ce,c as fe}from"./chunk-SVCHNGNX.js";import{f as de}from"./chunk-UFRLS5GG.js";import{d as me}from"./chunk-DZUR7EKU.js";import"./chunk-FLVW3H6P.js";import"./chunk-2UDOWYE6.js";import{a as he}from"./chunk-ZA3SEXFP.js";import{L as re,P as se}from"./chunk-EDO6DY2V.js";import"./chunk-PQGQXFEQ.js";import{a as le,b as pe}from"./chunk-UPZQ4FTT.js";import{b as ce}from"./chunk-5NJNJ42P.js";import{u as ae}from"./chunk-JHVNIEZK.js";import"./chunk-LTVWFE76.js";import{$a as k,Ab as j,Bb as S,Cb as J,Db as K,Eb as N,F as W,Fa as x,Ib as s,Jb as l,M as q,Ma as C,Oa as z,Od as D,P as V,Pa as v,R as U,Ua as b,Wb as Q,X as G,Xa as I,Ya as F,Za as o,_ as E,_a as r,_b as Y,bc as Z,bd as ne,da as L,db as P,ea as T,fb as h,gb as p,la as X,n as H,qb as m,rb as y,sb as f,vc as ee,wa as a,wb as w,wc as te,xa as _,xb as R,yb as B,yc as ie,zb as $}from"./chunk-34ZOBT6Z.js";var Ee=(()=>{class e{constructor(t,i,n){this.studentsService=t,this.educationalEventsService=i,this.studyClassesService=n,this.filter={student:null,educationalEvent:null,studyClass:null},this.filterChange=new X,this.classesHttpFilter={params:{fields:"IsActive","filter.IsActive":"=true"}}}show(){this.filterChange.emit(this.filter)}static{this.\u0275fac=function(i){return new(i||e)(_(de),_(ge),_(_e))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-evaluate-absences-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},decls:20,vars:19,consts:[[1,"row","g-3","align-items-end"],[1,"col-sm-12","col-md"],[1,"form-label"],[3,"valueChange","typeaheadService","value"],[3,"valueChange","typeaheadService","value","additionalHttpParams"],[1,"col-auto"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,n){i&1&&(o(0,"div",0)(1,"div",1)(2,"label",2),m(3),s(4,"translate"),r(),o(5,"bkd-typeahead",3),B("valueChange",function(d){return R(n.filter.student,d)||(n.filter.student=d),d}),r()(),o(6,"div",1)(7,"label",2),m(8),s(9,"translate"),r(),o(10,"bkd-typeahead",3),B("valueChange",function(d){return R(n.filter.educationalEvent,d)||(n.filter.educationalEvent=d),d}),r()(),o(11,"div",1)(12,"label",2),m(13),s(14,"translate"),r(),o(15,"bkd-typeahead",4),B("valueChange",function(d){return R(n.filter.studyClass,d)||(n.filter.studyClass=d),d}),r()(),o(16,"div",5)(17,"button",6),h("click",function(){return n.show()}),m(18),s(19,"translate"),r()()()),i&2&&(a(3),y(l(4,11,"evaluate-absences.header.student")),a(2),v("typeaheadService",n.studentsService),w("value",n.filter.student),a(3),y(l(9,13,"evaluate-absences.header.module-instance")),a(2),v("typeaheadService",n.educationalEventsService),w("value",n.filter.educationalEvent),a(3),y(l(14,15,"evaluate-absences.header.study-class")),a(2),v("typeaheadService",n.studyClassesService),w("value",n.filter.studyClass),v("additionalHttpParams",n.classesHttpFilter),a(3),f(" ",l(19,17,"evaluate-absences.header.show")," "))},dependencies:[be,D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:1rem 1rem 1rem 0;border-bottom:1px solid #dee2e6}"],changeDetection:0})}}return e})();var g=(()=>{class e extends Ce{constructor(t,i,n,u,d){super(t,i,d,n,"/evaluate-absences"),this.lessonPresenceService=u,this.queryParamsString$.pipe(U(this.destroy$)).subscribe(A=>this.confirmBackLinkParams={returnparams:A})}updateAfterConfirm(){this.resetEntries()}getInitialFilter(){return{student:null,educationalEvent:null,studyClass:null}}isValidFilter(t){return!!(t.student||t.educationalEvent||t.studyClass)}getInitialSorting(){return{key:"StudentFullName",ascending:!0}}loadEntries(t,i,n){return this.loadingService.load(this.lessonPresenceService.getStatistics(t,i,n),ve)}buildParamsFromFilter(t){return ye(t)}static{this.\u0275fac=function(i){return new(i||e)(E(Q),E(pe),E(ne),E(M),E(fe))}}static{this.\u0275prov=G({token:e,factory:e.\u0275fac})}}return e})();var ke=(e,c)=>c.key,Pe=(e,c)=>c.StudentRef.Id,Ie=()=>[],Fe=e=>["student",e,"absences"],we=e=>({returnparams:e});function Re(e,c){e&1&&k(0,"bkd-spinner")}function Be(e,c){if(e&1){let t=P();o(0,"th",9),h("click",function(){let n=L(t).$implicit,u=p(4);return T(u.state.sortService.toggleSorting(n.key))}),o(1,"div",10)(2,"div",11),s(3,"translate"),m(4),s(5,"translate"),r(),o(6,"div",12),m(7),s(8,"async"),r()()()}if(e&2){let t=c.$implicit,i=p(4);v("ngClass",t.label),a(2),v("ngbTooltip",l(3,4,"evaluate-absences.list.header."+t.label)),a(2),f(" ",l(5,6,"evaluate-absences.list.header."+t.label)," "),a(3),f(" ",l(8,8,i.state.sortService.getSortingChar$(t.key))," ")}}function $e(e,c){if(e&1&&(o(0,"a",13),s(1,"async"),m(2),r()),e&2){let t=p().$implicit,i=p().$implicit,n=p(5);v("routerLink",N(5,Fe,i.StudentRef.Id))("queryParams",N(7,we,l(1,3,n.profileReturnParams$))),a(2),f(" ",i[t.key]," ")}}function je(e,c){if(e&1&&m(0),e&2){let t=p().$implicit,i=p().$implicit;f(" ",i[t.key]," ")}}function De(e,c){if(e&1&&(o(0,"td"),s(1,"translate"),C(2,$e,3,9,"a",13)(3,je,1,1),r()),e&2){let t=c.$implicit;z("data-label",l(1,2,"evaluate-absences.list.header."+t.label)),a(2),b(t.key==="StudentFullName"?2:3)}}function Me(e,c){if(e&1&&(o(0,"tr"),I(1,De,4,4,"td",null,ke),r()),e&2){let t=p(5);a(),F(t.columns)}}function Ve(e,c){if(e&1&&(o(0,"tbody"),I(1,Me,3,0,"tr",null,Pe),r()),e&2){p(4);let t=S(0);a(),F(t)}}function Ne(e,c){e&1&&k(0,"bkd-spinner",7)}function Oe(e,c){if(e&1){let t=P();o(0,"button",14),h("click",function(){L(t);let n=p(4);return T(n.state.nextPage())}),m(1),s(2,"translate"),r()}e&2&&(a(),f(" ",l(2,1,"global.pagination.load-more")," "))}function He(e,c){if(e&1){let t=P();o(0,"div",2)(1,"div",3),k(2,"bkd-reports-link",4),s(3,"async"),r(),o(4,"table",5),h("scrolled",function(){L(t);let n=p(3);return T(n.onScroll())}),o(5,"thead")(6,"tr"),I(7,Be,9,10,"th",6,ke),r()(),C(9,Ve,3,0,"tbody"),r(),C(10,Ne,1,0,"bkd-spinner",7)(11,Oe,3,3,"button",8),r()}if(e&2){let t,i=p(3),n=S(0),u=S(2),d=S(4);a(2),v("reports",(t=l(3,4,i.reports$))!==null&&t!==void 0?t:K(6,Ie)),a(5),F(i.columns),a(2),b(n&&n.length>0?9:-1),a(),b(d?10:-1),a(),b(u&&!d?11:-1)}}function We(e,c){e&1&&(o(0,"p",1),m(1),s(2,"translate"),r()),e&2&&(a(),f(" ",l(2,1,"evaluate-absences.no-entries")," "))}function qe(e,c){if(e&1&&C(0,He,12,7,"div",2)(1,We,3,3,"p",1),e&2){p(2);let t=S(0),i=S(4);b(t&&t.length>0||i?0:1)}}function Ue(e,c){if(e&1&&(C(0,Re,1,0,"bkd-spinner"),s(1,"async"),C(2,qe,2,1)),e&2){let t=p();b(l(1,1,t.state.loading$)?0:2)}}function Ge(e,c){e&1&&(o(0,"p",1),m(1),s(2,"translate"),r()),e&2&&(a(),y(l(2,1,"evaluate-absences.no-filter")))}var Ae=(()=>{class e{constructor(t,i,n,u,d,A){this.state=t,this.scrollPosition=i,this.route=n,this.presenceTypesService=u,this.reportsService=d,this.lessonPresencesService=A,this.reports$=this.loadReports(),this.columns=[{key:"StudentFullName",label:"student"},{key:"TotalAbsences",label:"total"},{key:"TotalAbsencesValidExcuse",label:"valid-excuse"},{key:"TotalAbsencesWithoutExcuse",label:"without-excuse"},{key:"TotalAbsencesUnconfirmed",label:"unconfirmed"},{key:"TotalAbsencesUnchecked",label:"unchecked"},{key:"TotalIncidents",label:"incident"}],this.filterFromParams$=this.route.queryParams.pipe(H(Xe)),this.profileReturnParams$=this.state.queryParamsString$}ngOnInit(){this.filterFromParams$.pipe(W(1)).subscribe(t=>this.state.setFilter(t)),this.presenceTypesService.halfDayActive$.subscribe(t=>{t&&(this.columns=[...this.columns,{key:"TotalHalfDays",label:"halfday"}])})}ngAfterViewInit(){this.scrollPosition.restore()}onScroll(){this.state.nextPage()}loadReports(){return this.state.validFilter$.pipe(V(t=>this.lessonPresencesService.getLessonRefs(t)),V(t=>t.length>0?this.reportsService.getEvaluateAbsencesReports(this.getReportRecordIds(t)):[]),q(1))}getReportRecordIds(t){return t.map(i=>`${i.LessonRef.Id}_${i.RegistrationRef.Id}`)}static{this.\u0275fac=function(i){return new(i||e)(_(g),_(he),_(ee),_(se),_(me),_(M))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-evaluate-absences-list"]],decls:14,vars:18,consts:[[3,"filterChange","filter"],[1,"mt-3"],[1,"py-3"],[1,"buttons"],[1,"mb-2",3,"reports"],["infiniteScroll","",1,"table","table-striped","table-fixed",3,"scrolled"],["scope","col",3,"ngClass"],[1,"inline"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto"],["scope","col",3,"click","ngClass"],[1,"d-flex"],[1,"column-title",3,"ngbTooltip"],[1,"sort-direction"],[1,"student",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto",3,"click"]],template:function(i,n){if(i&1){let u=P();$(0),s(1,"async"),$(2),s(3,"async"),$(4),s(5,"async"),o(6,"h1"),m(7),s(8,"translate"),r(),o(9,"bkd-evaluate-absences-header",0),s(10,"async"),h("filterChange",function(A){return L(u),T(n.state.setFilter(A))}),r(),C(11,Ue,3,3),s(12,"async"),C(13,Ge,3,3,"p",1)}i&2&&(j(l(1,3,n.state.entries$)),a(2),j(l(3,6,n.state.hasMore$)),a(2),j(l(5,9,n.state.loadingPage$)),a(3),y(l(8,12,"evaluate-absences.title")),a(2),v("filter",l(10,14,n.filterFromParams$)),a(2),b(l(12,16,n.state.isFilterValid$)?11:13))},dependencies:[Ee,le,Se,Y,ae,ie,ce,Z,D],styles:["th[_ngcontent-%COMP%]{cursor:pointer}th.student[_ngcontent-%COMP%]{width:30%}.column-title[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"],changeDetection:0})}}return e})();function Xe(e){return{student:e.student?Number(e.student):null,educationalEvent:e.educationalEvent?Number(e.educationalEvent):null,studyClass:e.studyClass?Number(e.studyClass):null}}var Le=(()=>{class e{constructor(t){this.state=t}static{this.\u0275fac=function(i){return new(i||e)(_(g))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-evaluate-absences"]],features:[J([g,{provide:oe,useExisting:g},re])],decls:1,vars:0,template:function(i,n){i&1&&k(0,"router-outlet")},dependencies:[te],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var Bt=[{path:"",component:Le,children:[{path:"",component:Ae,data:{restoreScrollPositionFrom:["/evaluate-absences/student/:id"]}},ue]}];export{Bt as EVALUATE_ABSENCES_ROUTES}; +import{a as ye,b as Se,c as ge}from"./chunk-4KY7ONEQ.js";import{a as be}from"./chunk-W4ESFJ6M.js";import{a as _e}from"./chunk-RTY26FN4.js";import{a as ue}from"./chunk-3HCVMNJA.js";import"./chunk-5WNFCBTP.js";import"./chunk-A3CECLYB.js";import"./chunk-HCNFZOWE.js";import{b as oe,e as M}from"./chunk-746ASKQ4.js";import"./chunk-DTTSX64G.js";import"./chunk-Y4QYVF5K.js";import"./chunk-AYQPMCNZ.js";import{a as ve,b as Ce,c as fe}from"./chunk-4RZQAAPF.js";import{f as de}from"./chunk-Z4YBXGVO.js";import{d as me}from"./chunk-3L4RH6QP.js";import"./chunk-DTYYCJHM.js";import"./chunk-XAZECV42.js";import{a as he}from"./chunk-3P6YOVUR.js";import{L as re,P as se}from"./chunk-SRCW6BUG.js";import"./chunk-GOGVGWFJ.js";import{a as le,b as pe}from"./chunk-OSOXMODN.js";import{b as ce}from"./chunk-PSYDBHTH.js";import{u as ae}from"./chunk-W4U7QKJF.js";import"./chunk-AVBHFGIF.js";import{$a as r,$b as Y,Ab as $,Bb as j,Cb as S,Db as J,Eb as K,F as W,Fb as N,Ga as x,Jb as s,Kb as l,M as q,Na as C,P as V,Pa as z,Pd as D,Qa as v,R as U,Va as b,X as G,Xb as Q,Ya as I,Za as F,_ as E,_a as o,ab as k,cc as Z,cd as ne,ea as L,eb as P,fa as T,gb as h,hb as p,ma as X,n as H,rb as m,sb as y,tb as f,wc as ee,xa as a,xb as w,xc as te,ya as _,yb as R,zb as B,zc as ie}from"./chunk-2W7IS4PN.js";var Ee=(()=>{class e{constructor(t,i,n){this.studentsService=t,this.educationalEventsService=i,this.studyClassesService=n,this.filter={student:null,educationalEvent:null,studyClass:null},this.filterChange=new X,this.classesHttpFilter={params:{fields:"IsActive","filter.IsActive":"=true"}}}show(){this.filterChange.emit(this.filter)}static{this.\u0275fac=function(i){return new(i||e)(_(de),_(ge),_(_e))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-evaluate-absences-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},decls:20,vars:19,consts:[[1,"row","g-3","align-items-end"],[1,"col-sm-12","col-md"],[1,"form-label"],[3,"valueChange","typeaheadService","value"],[3,"valueChange","typeaheadService","value","additionalHttpParams"],[1,"col-auto"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,n){i&1&&(o(0,"div",0)(1,"div",1)(2,"label",2),m(3),s(4,"translate"),r(),o(5,"bkd-typeahead",3),B("valueChange",function(d){return R(n.filter.student,d)||(n.filter.student=d),d}),r()(),o(6,"div",1)(7,"label",2),m(8),s(9,"translate"),r(),o(10,"bkd-typeahead",3),B("valueChange",function(d){return R(n.filter.educationalEvent,d)||(n.filter.educationalEvent=d),d}),r()(),o(11,"div",1)(12,"label",2),m(13),s(14,"translate"),r(),o(15,"bkd-typeahead",4),B("valueChange",function(d){return R(n.filter.studyClass,d)||(n.filter.studyClass=d),d}),r()(),o(16,"div",5)(17,"button",6),h("click",function(){return n.show()}),m(18),s(19,"translate"),r()()()),i&2&&(a(3),y(l(4,11,"evaluate-absences.header.student")),a(2),v("typeaheadService",n.studentsService),w("value",n.filter.student),a(3),y(l(9,13,"evaluate-absences.header.module-instance")),a(2),v("typeaheadService",n.educationalEventsService),w("value",n.filter.educationalEvent),a(3),y(l(14,15,"evaluate-absences.header.study-class")),a(2),v("typeaheadService",n.studyClassesService),w("value",n.filter.studyClass),v("additionalHttpParams",n.classesHttpFilter),a(3),f(" ",l(19,17,"evaluate-absences.header.show")," "))},dependencies:[be,D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:1rem 1rem 1rem 0;border-bottom:1px solid #dee2e6}"],changeDetection:0})}}return e})();var g=(()=>{class e extends Ce{constructor(t,i,n,u,d){super(t,i,d,n,"/evaluate-absences"),this.lessonPresenceService=u,this.queryParamsString$.pipe(U(this.destroy$)).subscribe(A=>this.confirmBackLinkParams={returnparams:A})}updateAfterConfirm(){this.resetEntries()}getInitialFilter(){return{student:null,educationalEvent:null,studyClass:null}}isValidFilter(t){return!!(t.student||t.educationalEvent||t.studyClass)}getInitialSorting(){return{key:"StudentFullName",ascending:!0}}loadEntries(t,i,n){return this.loadingService.load(this.lessonPresenceService.getStatistics(t,i,n),ve)}buildParamsFromFilter(t){return ye(t)}static{this.\u0275fac=function(i){return new(i||e)(E(Q),E(pe),E(ne),E(M),E(fe))}}static{this.\u0275prov=G({token:e,factory:e.\u0275fac})}}return e})();var ke=(e,c)=>c.key,Pe=(e,c)=>c.StudentRef.Id,Ie=()=>[],Fe=e=>["student",e,"absences"],we=e=>({returnparams:e});function Re(e,c){e&1&&k(0,"bkd-spinner")}function Be(e,c){if(e&1){let t=P();o(0,"th",9),h("click",function(){let n=L(t).$implicit,u=p(4);return T(u.state.sortService.toggleSorting(n.key))}),o(1,"div",10)(2,"div",11),s(3,"translate"),m(4),s(5,"translate"),r(),o(6,"div",12),m(7),s(8,"async"),r()()()}if(e&2){let t=c.$implicit,i=p(4);v("ngClass",t.label),a(2),v("ngbTooltip",l(3,4,"evaluate-absences.list.header."+t.label)),a(2),f(" ",l(5,6,"evaluate-absences.list.header."+t.label)," "),a(3),f(" ",l(8,8,i.state.sortService.getSortingChar$(t.key))," ")}}function $e(e,c){if(e&1&&(o(0,"a",13),s(1,"async"),m(2),r()),e&2){let t=p().$implicit,i=p().$implicit,n=p(5);v("routerLink",N(5,Fe,i.StudentRef.Id))("queryParams",N(7,we,l(1,3,n.profileReturnParams$))),a(2),f(" ",i[t.key]," ")}}function je(e,c){if(e&1&&m(0),e&2){let t=p().$implicit,i=p().$implicit;f(" ",i[t.key]," ")}}function De(e,c){if(e&1&&(o(0,"td"),s(1,"translate"),C(2,$e,3,9,"a",13)(3,je,1,1),r()),e&2){let t=c.$implicit;z("data-label",l(1,2,"evaluate-absences.list.header."+t.label)),a(2),b(t.key==="StudentFullName"?2:3)}}function Me(e,c){if(e&1&&(o(0,"tr"),I(1,De,4,4,"td",null,ke),r()),e&2){let t=p(5);a(),F(t.columns)}}function Ve(e,c){if(e&1&&(o(0,"tbody"),I(1,Me,3,0,"tr",null,Pe),r()),e&2){p(4);let t=S(0);a(),F(t)}}function Ne(e,c){e&1&&k(0,"bkd-spinner",7)}function Oe(e,c){if(e&1){let t=P();o(0,"button",14),h("click",function(){L(t);let n=p(4);return T(n.state.nextPage())}),m(1),s(2,"translate"),r()}e&2&&(a(),f(" ",l(2,1,"global.pagination.load-more")," "))}function He(e,c){if(e&1){let t=P();o(0,"div",2)(1,"div",3),k(2,"bkd-reports-link",4),s(3,"async"),r(),o(4,"table",5),h("scrolled",function(){L(t);let n=p(3);return T(n.onScroll())}),o(5,"thead")(6,"tr"),I(7,Be,9,10,"th",6,ke),r()(),C(9,Ve,3,0,"tbody"),r(),C(10,Ne,1,0,"bkd-spinner",7)(11,Oe,3,3,"button",8),r()}if(e&2){let t,i=p(3),n=S(0),u=S(2),d=S(4);a(2),v("reports",(t=l(3,4,i.reports$))!==null&&t!==void 0?t:K(6,Ie)),a(5),F(i.columns),a(2),b(n&&n.length>0?9:-1),a(),b(d?10:-1),a(),b(u&&!d?11:-1)}}function We(e,c){e&1&&(o(0,"p",1),m(1),s(2,"translate"),r()),e&2&&(a(),f(" ",l(2,1,"evaluate-absences.no-entries")," "))}function qe(e,c){if(e&1&&C(0,He,12,7,"div",2)(1,We,3,3,"p",1),e&2){p(2);let t=S(0),i=S(4);b(t&&t.length>0||i?0:1)}}function Ue(e,c){if(e&1&&(C(0,Re,1,0,"bkd-spinner"),s(1,"async"),C(2,qe,2,1)),e&2){let t=p();b(l(1,1,t.state.loading$)?0:2)}}function Ge(e,c){e&1&&(o(0,"p",1),m(1),s(2,"translate"),r()),e&2&&(a(),y(l(2,1,"evaluate-absences.no-filter")))}var Ae=(()=>{class e{constructor(t,i,n,u,d,A){this.state=t,this.scrollPosition=i,this.route=n,this.presenceTypesService=u,this.reportsService=d,this.lessonPresencesService=A,this.reports$=this.loadReports(),this.columns=[{key:"StudentFullName",label:"student"},{key:"TotalAbsences",label:"total"},{key:"TotalAbsencesValidExcuse",label:"valid-excuse"},{key:"TotalAbsencesWithoutExcuse",label:"without-excuse"},{key:"TotalAbsencesUnconfirmed",label:"unconfirmed"},{key:"TotalAbsencesUnchecked",label:"unchecked"},{key:"TotalIncidents",label:"incident"}],this.filterFromParams$=this.route.queryParams.pipe(H(Xe)),this.profileReturnParams$=this.state.queryParamsString$}ngOnInit(){this.filterFromParams$.pipe(W(1)).subscribe(t=>this.state.setFilter(t)),this.presenceTypesService.halfDayActive$.subscribe(t=>{t&&(this.columns=[...this.columns,{key:"TotalHalfDays",label:"halfday"}])})}ngAfterViewInit(){this.scrollPosition.restore()}onScroll(){this.state.nextPage()}loadReports(){return this.state.validFilter$.pipe(V(t=>this.lessonPresencesService.getLessonRefs(t)),V(t=>t.length>0?this.reportsService.getEvaluateAbsencesReports(this.getReportRecordIds(t)):[]),q(1))}getReportRecordIds(t){return t.map(i=>`${i.LessonRef.Id}_${i.RegistrationRef.Id}`)}static{this.\u0275fac=function(i){return new(i||e)(_(g),_(he),_(ee),_(se),_(me),_(M))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-evaluate-absences-list"]],decls:14,vars:18,consts:[[3,"filterChange","filter"],[1,"mt-3"],[1,"py-3"],[1,"buttons"],[1,"mb-2",3,"reports"],["infiniteScroll","",1,"table","table-striped","table-fixed",3,"scrolled"],["scope","col",3,"ngClass"],[1,"inline"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto"],["scope","col",3,"click","ngClass"],[1,"d-flex"],[1,"column-title",3,"ngbTooltip"],[1,"sort-direction"],[1,"student",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto",3,"click"]],template:function(i,n){if(i&1){let u=P();$(0),s(1,"async"),$(2),s(3,"async"),$(4),s(5,"async"),o(6,"h1"),m(7),s(8,"translate"),r(),o(9,"bkd-evaluate-absences-header",0),s(10,"async"),h("filterChange",function(A){return L(u),T(n.state.setFilter(A))}),r(),C(11,Ue,3,3),s(12,"async"),C(13,Ge,3,3,"p",1)}i&2&&(j(l(1,3,n.state.entries$)),a(2),j(l(3,6,n.state.hasMore$)),a(2),j(l(5,9,n.state.loadingPage$)),a(3),y(l(8,12,"evaluate-absences.title")),a(2),v("filter",l(10,14,n.filterFromParams$)),a(2),b(l(12,16,n.state.isFilterValid$)?11:13))},dependencies:[Ee,le,Se,Y,ae,ie,ce,Z,D],styles:["th[_ngcontent-%COMP%]{cursor:pointer}th.student[_ngcontent-%COMP%]{width:30%}.column-title[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"],changeDetection:0})}}return e})();function Xe(e){return{student:e.student?Number(e.student):null,educationalEvent:e.educationalEvent?Number(e.educationalEvent):null,studyClass:e.studyClass?Number(e.studyClass):null}}var Le=(()=>{class e{constructor(t){this.state=t}static{this.\u0275fac=function(i){return new(i||e)(_(g))}}static{this.\u0275cmp=x({type:e,selectors:[["bkd-evaluate-absences"]],features:[J([g,{provide:oe,useExisting:g},re])],decls:1,vars:0,template:function(i,n){i&1&&k(0,"router-outlet")},dependencies:[te],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var Bt=[{path:"",component:Le,children:[{path:"",component:Ae,data:{restoreScrollPositionFrom:["/evaluate-absences/student/:id"]}},ue]}];export{Bt as EVALUATE_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-HAMVO7SX.js b/public/apps/webapp-schulverwaltung/chunk-DTTSX64G.js similarity index 88% rename from public/apps/webapp-schulverwaltung/chunk-HAMVO7SX.js rename to public/apps/webapp-schulverwaltung/chunk-DTTSX64G.js index 894baf20..1d26d514 100644 --- a/public/apps/webapp-schulverwaltung/chunk-HAMVO7SX.js +++ b/public/apps/webapp-schulverwaltung/chunk-DTTSX64G.js @@ -1 +1 @@ -import{a as u}from"./chunk-UVJXXYOR.js";import{a as P}from"./chunk-5NJNJ42P.js";import{$c as S,Gc as t,Hc as g,Jc as h,Kd as E,Ld as n,M as l,Mc as m,Oc as I,P as o,Tc as e,Uc as p,X as c,Zc as b,_ as a,bd as f,kc as d,n as y}from"./chunk-34ZOBT6Z.js";var T=(()=>{class r{constructor(i,s){this.http=i,this.settings=s}getWeekdays(){return this.http.get(`${this.baseUrl}/Weekdays`).pipe(o(n(u)),l(1))}getAbsenceConfirmationStates(){return this.http.get(`${this.baseUrl}/AbsenceConfirmationStates`).pipe(o(n(u)),l(1))}getStayPermits(){return this.http.get(`${this.baseUrl}/StayPermits`).pipe(o(n(u)),l(1))}get baseUrl(){return`${this.settings.apiUrl}/DropDownItems`}static{this.\u0275fac=function(s){return new(s||r)(a(d),a(f))}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var j=m({Id:g,FormOfAddress:t,Nationality:e(t),AddressLine1:e(t),AddressLine2:e(t),BillingAddress:e(t),Birthdate:e(b),CorrespondenceAddress:e(t),DisplayEmail:e(t),Email:p(t),Email2:p(t),FirstName:e(t),Gender:e(I([h("M"),h("F"),h("X")])),HomeTown:e(t),LastName:e(t),FullName:e(t),Location:e(t),MiddleName:e(t),NativeLanguage:e(t),PhoneMobile:e(t),PhonePrivate:e(t),PhoneBusiness:p(t),SocialSecurityNumber:e(t),StayPermit:e(g),StayPermitExpiry:e(b),Zip:e(t)}),F=m({Id:g,FullName:t,DisplayEmail:e(t),Email:p(t)});var Z=(()=>{class r extends P{constructor(i,s){super(i,s,j,"Persons"),this.personEmailCodec=m(S(this.codec.props,["Email","FormOfAddress"]))}getListForIds(i){return this.getList({params:{"filter.Id":`;${i.join(";")}`}})}getSummaries(i){return this.http.get(`${this.baseUrl}/`,{params:{"filter.Id":`;${i.join(";")}`,fields:["Id","FullName","DisplayEmail","Email"].join(",")}}).pipe(o(n(F)))}getMyself(i){return this.http.get(`${this.baseUrl}/me`,i).pipe(o(E(this.codec)))}getByIdWithEmailInfos(i){return this.http.get(`${this.baseUrl}/`,{params:{"filter.Id=":i.toString(),fields:["FormOfAddress","Email"].join(",")}}).pipe(o(n(this.personEmailCodec)),y(s=>s[0]))}update(i,s,A,N){let $={PhonePrivate:s,PhoneMobile:A,Email2:N};return this.http.put(`${this.baseUrl}/${i}`,$).pipe(y(()=>{}))}static{this.\u0275fac=function(s){return new(s||r)(a(d),a(f))}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{T as a,Z as b}; +import{a as u}from"./chunk-AYQPMCNZ.js";import{a as P}from"./chunk-PSYDBHTH.js";import{Hc as t,Ic as g,Kc as h,Ld as E,M as l,Md as n,Nc as m,P as o,Pc as I,Uc as e,Vc as p,X as c,_ as a,_c as b,ad as S,cd as f,lc as d,n as y}from"./chunk-2W7IS4PN.js";var T=(()=>{class r{constructor(i,s){this.http=i,this.settings=s}getWeekdays(){return this.http.get(`${this.baseUrl}/Weekdays`).pipe(o(n(u)),l(1))}getAbsenceConfirmationStates(){return this.http.get(`${this.baseUrl}/AbsenceConfirmationStates`).pipe(o(n(u)),l(1))}getStayPermits(){return this.http.get(`${this.baseUrl}/StayPermits`).pipe(o(n(u)),l(1))}get baseUrl(){return`${this.settings.apiUrl}/DropDownItems`}static{this.\u0275fac=function(s){return new(s||r)(a(d),a(f))}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var j=m({Id:g,FormOfAddress:t,Nationality:e(t),AddressLine1:e(t),AddressLine2:e(t),BillingAddress:e(t),Birthdate:e(b),CorrespondenceAddress:e(t),DisplayEmail:e(t),Email:p(t),Email2:p(t),FirstName:e(t),Gender:e(I([h("M"),h("F"),h("X")])),HomeTown:e(t),LastName:e(t),FullName:e(t),Location:e(t),MiddleName:e(t),NativeLanguage:e(t),PhoneMobile:e(t),PhonePrivate:e(t),PhoneBusiness:p(t),SocialSecurityNumber:e(t),StayPermit:e(g),StayPermitExpiry:e(b),Zip:e(t)}),F=m({Id:g,FullName:t,DisplayEmail:e(t),Email:p(t)});var Z=(()=>{class r extends P{constructor(i,s){super(i,s,j,"Persons"),this.personEmailCodec=m(S(this.codec.props,["Email","FormOfAddress"]))}getListForIds(i){return this.getList({params:{"filter.Id":`;${i.join(";")}`}})}getSummaries(i){return this.http.get(`${this.baseUrl}/`,{params:{"filter.Id":`;${i.join(";")}`,fields:["Id","FullName","DisplayEmail","Email"].join(",")}}).pipe(o(n(F)))}getMyself(i){return this.http.get(`${this.baseUrl}/me`,i).pipe(o(E(this.codec)))}getByIdWithEmailInfos(i){return this.http.get(`${this.baseUrl}/`,{params:{"filter.Id=":i.toString(),fields:["FormOfAddress","Email"].join(",")}}).pipe(o(n(this.personEmailCodec)),y(s=>s[0]))}update(i,s,A,N){let $={PhonePrivate:s,PhoneMobile:A,Email2:N};return this.http.put(`${this.baseUrl}/${i}`,$).pipe(y(()=>{}))}static{this.\u0275fac=function(s){return new(s||r)(a(d),a(f))}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{T as a,Z as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-FLVW3H6P.js b/public/apps/webapp-schulverwaltung/chunk-DTYYCJHM.js similarity index 87% rename from public/apps/webapp-schulverwaltung/chunk-FLVW3H6P.js rename to public/apps/webapp-schulverwaltung/chunk-DTYYCJHM.js index 1188a275..2370fa89 100644 --- a/public/apps/webapp-schulverwaltung/chunk-FLVW3H6P.js +++ b/public/apps/webapp-schulverwaltung/chunk-DTYYCJHM.js @@ -1 +1 @@ -import{a as o,b as s,qc as c,rc as l}from"./chunk-34ZOBT6Z.js";function u(e){return String(e||"").replace(/^\?/,"").split("&").reduce((t,r)=>{let[n,i]=r.split("=");return s(o({},t),{[n]:i})},{})}function p(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return[...t,n==null?r:`${r}=${n}`]},[]).join("&")}function f(e){let i=new l().parse(e)?.root.children[c]?.segments;return i?i[0].path:null}function g(e){let{pathname:t,search:r}=new URL(e,window.location.href);return{link:t,params:u(r)}}export{u as a,p as b,f as c,g as d}; +import{a as o,b as s,rc as c,sc as l}from"./chunk-2W7IS4PN.js";function u(e){return String(e||"").replace(/^\?/,"").split("&").reduce((t,r)=>{let[n,i]=r.split("=");return s(o({},t),{[n]:i})},{})}function p(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return[...t,n==null?r:`${r}=${n}`]},[]).join("&")}function f(e){let i=new l().parse(e)?.root.children[c]?.segments;return i?i[0].path:null}function g(e){let{pathname:t,search:r}=new URL(e,window.location.href);return{link:t,params:u(r)}}export{u as a,p as b,f as c,g as d}; diff --git a/public/apps/webapp-schulverwaltung/chunk-PQGQXFEQ.js b/public/apps/webapp-schulverwaltung/chunk-GOGVGWFJ.js similarity index 93% rename from public/apps/webapp-schulverwaltung/chunk-PQGQXFEQ.js rename to public/apps/webapp-schulverwaltung/chunk-GOGVGWFJ.js index f480d8fb..3047c8b9 100644 --- a/public/apps/webapp-schulverwaltung/chunk-PQGQXFEQ.js +++ b/public/apps/webapp-schulverwaltung/chunk-GOGVGWFJ.js @@ -1 +1 @@ -import{M as I,O as i,P as p,k as m,l as x,n as c,o as f,x as l}from"./chunk-34ZOBT6Z.js";function C(t,o,n){return f([t,o]).pipe(l(([r,a])=>a),p(([r,a])=>{let e=n?r?.get(n)||null:r;return e?e.statusChanges.pipe(i(e.status),c(()=>h(e))):x([])}),i([]),I(1))}function y(t,o){return t.pipe(c(n=>n.get(o)||null))}function j(t,o){return y(t,o).pipe(p(n=>n?n.valueChanges:m))}function h(t){return t?Object.keys(t.errors||{}).map(o=>({error:o,params:t.errors&&t.errors[o]instanceof Object?t.errors[o]:null})):[]}function w(t){return o=>t(...o)}var b=Math.pow(10,8)*24*60*60*1e3,T=-b,W=6048e5,E=864e5,H=6e4,z=36e5,O=1e3;var D=3600;var d=D*24,Q=d*7,M=d*365.2425,Y=M/12,V=Y*3,u=Symbol.for("constructDateFrom");function s(t,o){return typeof t=="function"?t(o):t&&typeof t=="object"&&u in t?t[u](o):t instanceof Date?new t.constructor(o):new Date(o)}function P(t,o){return s(o||t,t)}function G(t,...o){let n=s.bind(null,t||o.find(r=>typeof r=="object"));return o.map(n)}export{C as a,y as b,j as c,W as d,E as e,H as f,z as g,O as h,s as i,P as j,G as k,w as l}; +import{M as I,O as i,P as p,k as m,l as x,n as c,o as f,x as l}from"./chunk-2W7IS4PN.js";function C(t,o,n){return f([t,o]).pipe(l(([r,a])=>a),p(([r,a])=>{let e=n?r?.get(n)||null:r;return e?e.statusChanges.pipe(i(e.status),c(()=>h(e))):x([])}),i([]),I(1))}function y(t,o){return t.pipe(c(n=>n.get(o)||null))}function j(t,o){return y(t,o).pipe(p(n=>n?n.valueChanges:m))}function h(t){return t?Object.keys(t.errors||{}).map(o=>({error:o,params:t.errors&&t.errors[o]instanceof Object?t.errors[o]:null})):[]}function w(t){return o=>t(...o)}var b=Math.pow(10,8)*24*60*60*1e3,T=-b,W=6048e5,E=864e5,H=6e4,z=36e5,O=1e3;var D=3600;var d=D*24,Q=d*7,M=d*365.2425,Y=M/12,V=Y*3,u=Symbol.for("constructDateFrom");function s(t,o){return typeof t=="function"?t(o):t&&typeof t=="object"&&u in t?t[u](o):t instanceof Date?new t.constructor(o):new Date(o)}function P(t,o){return s(o||t,t)}function G(t,...o){let n=s.bind(null,t||o.find(r=>typeof r=="object"));return o.map(n)}export{C as a,y as b,j as c,W as d,E as e,H as f,z as g,O as h,s as i,P as j,G as k,w as l}; diff --git a/public/apps/webapp-schulverwaltung/chunk-4GQ5KKE3.js b/public/apps/webapp-schulverwaltung/chunk-HCNFZOWE.js similarity index 83% rename from public/apps/webapp-schulverwaltung/chunk-4GQ5KKE3.js rename to public/apps/webapp-schulverwaltung/chunk-HCNFZOWE.js index 910ab640..1105db26 100644 --- a/public/apps/webapp-schulverwaltung/chunk-4GQ5KKE3.js +++ b/public/apps/webapp-schulverwaltung/chunk-HCNFZOWE.js @@ -1,2 +1,2 @@ -import{x as b}from"./chunk-JHVNIEZK.js";import{a as g}from"./chunk-LTVWFE76.js";import{$ as i,B as f,Nd as E,hc as p,jc as d,k as t,m as u,xc as m}from"./chunk-34ZOBT6Z.js";var S=new p(()=>({disableErrorHandling:!1,disableErrorHandlingForStatus:[]}));function R(){return(e,o)=>{let s=e.context.get(S);return o(e).pipe(f(h(s)))}}function h(e){let o=i(m),s=i(g),a=i(E);return r=>{if(r instanceof d&&!e.disableErrorHandling&&(!e.disableErrorHandlingForStatus||!e.disableErrorHandlingForStatus.includes(r.status)))switch(r.status){case 401:return n("noaccess"),o.navigate(["/unauthenticated"]),t;case 403:return n("noaccess"),o.navigate(["/dashboard"]),t;case 404:return n("notfound"),t;case 0:case 503:case 504:return n("unavailable"),t;case 409:return v(r),t;default:return n("server"),t}return u(()=>r)};function n(r){s.error(a.instant(`global.rest-errors.${r}-message`),a.instant(`global.rest-errors.${r}-title`))}function v(r){let c=a.instant("global.rest-errors.conflict-message"),l=H(r);s.error(l.length>0?l.join(` +import{x as b}from"./chunk-W4U7QKJF.js";import{a as g}from"./chunk-AVBHFGIF.js";import{$ as i,B as f,Od as E,ic as p,k as t,kc as d,m as u,yc as m}from"./chunk-2W7IS4PN.js";var S=new p(()=>({disableErrorHandling:!1,disableErrorHandlingForStatus:[]}));function R(){return(e,o)=>{let s=e.context.get(S);return o(e).pipe(f(h(s)))}}function h(e){let o=i(m),s=i(g),a=i(E);return r=>{if(r instanceof d&&!e.disableErrorHandling&&(!e.disableErrorHandlingForStatus||!e.disableErrorHandlingForStatus.includes(r.status)))switch(r.status){case 401:return n("noaccess"),o.navigate(["/unauthenticated"]),t;case 403:return n("noaccess"),o.navigate(["/dashboard"]),t;case 404:return n("notfound"),t;case 0:case 503:case 504:return n("unavailable"),t;case 409:return v(r),t;default:return n("server"),t}return u(()=>r)};function n(r){s.error(a.instant(`global.rest-errors.${r}-message`),a.instant(`global.rest-errors.${r}-title`))}function v(r){let c=a.instant("global.rest-errors.conflict-message"),l=H(r);s.error(l.length>0?l.join(` `):c,a.instant("global.rest-errors.conflict-title"))}function H(r){return Array.isArray(r.error?.Issues)?r.error.Issues.map(c=>c?.Message).filter(b):[]}}export{S as a,R as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-LEK2XGQE.js b/public/apps/webapp-schulverwaltung/chunk-LEK2XGQE.js deleted file mode 100644 index 2497b8df..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-LEK2XGQE.js +++ /dev/null @@ -1,2 +0,0 @@ -import{a as dt}from"./chunk-K4773ZNS.js";import{a as at,b as ot}from"./chunk-ZGDP3BAB.js";import{a as $i}from"./chunk-4CSFXSJN.js";import{a as wt}from"./chunk-SP6SA4GZ.js";import{e as Oi}from"./chunk-NOKI2UHM.js";import{a as Tt,b as _i,c as yi,d as Si,e as bi,f as et,g as tt,h as xi,i as Ti,j as wi,k as Ei,l as ki,m as Fe,o as Ii,p as le,r as it,s as Pi,u as Mi,v as rt}from"./chunk-U5XSAHDS.js";import{e as ui}from"./chunk-HAKJPBT5.js";import{b as Ci}from"./chunk-HAMVO7SX.js";import{a as mi}from"./chunk-Y4QYVF5K.js";import{a as Gi}from"./chunk-FFBZO25J.js";import{a as lt,c as Li}from"./chunk-SVCHNGNX.js";import{a as fi,b as vi}from"./chunk-UFRLS5GG.js";import{a as hi,d as nt}from"./chunk-DZUR7EKU.js";import{d as gi}from"./chunk-FLVW3H6P.js";import{L as ci,U as st,p as pi}from"./chunk-EDO6DY2V.js";import{a as Ge,c as li,l as Ce}from"./chunk-PQGQXFEQ.js";import{a as Ze,b as Le}from"./chunk-UPZQ4FTT.js";import{a as Qe,b as _e}from"./chunk-5NJNJ42P.js";import{a as xt,b as we,h as ti,i as ii,k as ni,l as ri,r as Ke,w as ve}from"./chunk-JHVNIEZK.js";import{a as Xe}from"./chunk-LTVWFE76.js";import{$a as b,Ab as H,Ad as ei,B as Gt,Bb as j,C as Lt,Cb as ie,D as Ft,Da as yt,Db as Pe,Ea as ke,Eb as G,F as re,Fa as C,Fb as bt,Gd as si,H as X,Ha as Vt,Hd as ai,Ia as Ht,Ib as l,J as Ae,Jb as c,Jd as oi,K as Dt,Kb as F,Ld as di,M as J,Ma as E,Nb as Wt,Nd as ne,O as Rt,Od as k,P as $,Pa as m,Qa as ae,Qd as Je,R as me,Rb as K,Ua as x,Wa as Ie,X as se,Xa as A,Ya as V,Za as s,_ as P,_a as a,_b as oe,a as L,b as D,bc as z,bd as fe,ca as Ee,cc as He,da as T,db as O,ea as w,ed as Ue,f as te,fb as _,g as W,ga as Bt,gb as h,gd as Oe,h as _t,hb as Nt,hd as We,ib as Ut,id as qt,jb as ue,kc as Ne,l as U,la as Z,ld as zt,m as $t,md as Yt,n as y,nd as qe,o as q,oa as jt,od as Kt,pa as R,pb as he,qa as At,qb as p,qd as Xt,rb as f,rd as Jt,sb as v,tb as St,va as Ve,vc as de,vd as ze,w as je,wa as r,wb as be,wc as ge,wd as Ye,x as Se,xa as S,xb as xe,xc as Me,xd as Qt,yb as Te,yc as Q,yd as Zt,zb as B,zd as $e}from"./chunk-34ZOBT6Z.js";var Ln=t=>[t,"tests"];function Fn(t,d){if(t&1&&(s(0,"span"),p(1),l(2,"date"),b(3,"wbr"),p(4),l(5,"date"),a()),t&2){let e=h();r(),v("",F(2,2,e.event().dateFrom,"dd.MM.yyyy"),"\u2013"),r(3),f(F(5,5,e.event().dateTo,"dd.MM.yyyy"))}}function Dn(t,d){if(t&1&&(s(0,"a",6)(1,"i",7),p(2,"arrow_right_alt"),a(),s(3,"span",8),p(4),a()()),t&2){let e=h(2);m("routerLink",G(2,Ln,e.event().id)),r(4),f(e.event().evaluationText)}}function Rn(t,d){if(t&1&&(s(0,"a",6)(1,"i",7),p(2,"arrow_right_alt"),a(),s(3,"span",8),p(4),a()()),t&2){let e=h(2);m("routerLink",e.event().evaluationLink),r(4),v("",e.event().evaluationText," ")}}function Bn(t,d){if(t&1&&(s(0,"div",5),E(1,Dn,5,4,"a",6)(2,Rn,5,2,"a",6),a()),t&2){let e=h();r(),x(e.event().evaluationLink?-1:1),r(),x(e.event().evaluationLink?2:-1)}}var Fi=(()=>{class t{constructor(){this.event=R.required(),this.withRatings=R(!0),this.link=K(()=>gi(this.event().detailLink))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-list-entry"]],inputs:{event:[1,"event"],withRatings:[1,"withRatings"]},decls:11,vars:9,consts:[[1,"designation"],[3,"routerLink","queryParams"],[1,"date"],[1,"registrations"],[1,"registrations-label"],[1,"rating"],[1,"d-flex",3,"routerLink"],[1,"material-icons"],[1,"ps-1"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"a",1),p(2),a()(),s(3,"div",2),E(4,Fn,6,8,"span"),a(),s(5,"div",3),p(6),s(7,"span",4),p(8),l(9,"translate"),a()(),E(10,Bn,3,2,"div",5)),i&2&&(r(),m("routerLink",n.link().link)("queryParams",n.link().params),r(),f(n.event().designation),r(2),x(n.event().dateFrom&&n.event().dateTo?4:-1),r(2),v(" ",n.event().studentCount," "),r(2),f(c(9,7,n.event().studentCount===1?"events.registration":"events.registrations")),r(2),x(n.withRatings()&&n.event().evaluationText?10:-1))},dependencies:[Q,He,k],styles:['[_nghost-%COMP%]{display:grid;padding:1rem;border-bottom:1px solid #dee2e6;grid-template-areas:"designation date registrations rating";grid-template-columns:4fr 2fr 2fr 3fr}.designation[_ngcontent-%COMP%]{grid-area:designation;padding-right:1rem}.date[_ngcontent-%COMP%]{grid-area:date;padding-right:1rem}.registrations[_ngcontent-%COMP%]{grid-area:registrations;padding-right:1rem}.rating[_ngcontent-%COMP%]{grid-area:rating}.rating[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.rating[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.rating[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.registrations-label[_ngcontent-%COMP%]{display:none}@media (max-width: 575.98px){.registrations-label[_ngcontent-%COMP%]{display:inline}.designation[_ngcontent-%COMP%], .date[_ngcontent-%COMP%], .registrations[_ngcontent-%COMP%]{padding-right:0}[_nghost-%COMP%]{grid-template-areas:"designation" "date" "registrations" "rating";grid-template-columns:1fr}}']})}}return t})();var jn=10300,An=10260,Vn=10250,Hn=14030,Nn=10350;function pt(t){let{HasEvaluationStarted:d,EvaluationUntil:e,HasTestGrading:i}=t.EvaluationStatusRef;if(d===!0&&(t.StatusId===Hn||t.StatusId===Nn))return{value:ee.Rating};if(d===!0&&i===!1){if(e)return{value:ee.RatingUntil};if(t.StatusId===jn)return{value:ee.IntermediateRating}}return d===!1&&i===!0&&t.StatusId!==An&&t.StatusId!==Vn?{value:ee.Tests}:d===!0&&i===!0?e?{value:ee.Tests,label:ee.RatingUntil}:{value:ee.Tests,label:ee.IntermediateRating}:null}function Di(t){return t.EvaluationStatusRef.HasEvaluationStarted===!0}function Ri(t){return t.EvaluationStatusRef.HasReviewOfEvaluationStarted===!0&&!!t.FinalGrades?.length}function ct(t){let d=t.Classes?t.Classes.map(e=>e.Number).join(", "):null;return d?t.Designation+", "+d:t.Designation}function Bi(t,d){return t?(d.Leadership??"").split(",").some(e=>e.trim()===t.fullname):!1}function ji(t,d){let e=new URLSearchParams({returnlink:d});return d.startsWith("/dashboard")?`/dashboard/students/${t}?${e}`:d.startsWith("/events/current")?`/events/current/${t}?${e}`:`/events/${t}/students?${e}`}function Ai(t){let d=t.ParticipatingStudents?.map(e=>({id:e.Id,name:e.FullName,email:e.DisplayEmail??void 0}))??[];return{eventId:t.Id,eventDesignation:t.Designation,studyClasses:(t.Classes??[]).map(e=>e.Designation).sort(),entries:d}}function Et(t,d){return D(L({},t),{entries:t.entries.map(e=>{let i=d.find(o=>o.StudentId===e.id),n=i?[i.CompanyName,i.CompanyNameAddition].filter(Boolean).join(" \u2013 "):void 0;return D(L({},e),{company:n})})})}function kt(t,d,e,{emailFallback:i}={}){return{eventId:t,eventDesignation:e[0]?.EventDesignation??"",studyClasses:[],entries:d.map(n=>({id:n.Id,name:n.FullName,email:(i?n.DisplayEmail??n.Email:n.DisplayEmail)??void 0,status:e.find(o=>o.PersonId===n.Id)?.Status}))}}function Vi(t,d){return D(L({},t),{entries:t.entries.map(e=>D(L({},e),{studyClass:d.find(i=>i.StudentRef.Id===e.id)?.StudyClassNumber}))})}var ee=function(t){return t.Rating="rating",t.RatingUntil="rating-until",t.IntermediateRating="intermediate-rating",t.Tests="add-tests",t}(ee||{}),De=(()=>{class t{constructor(e,i,n,o,u,g,M,N,pe){this.coursesRestService=e,this.eventsRestService=i,this.studyClassRestService=n,this.subscriptionsRestService=o,this.loadingService=u,this.storageService=g,this.translate=M,this.router=N,this.settings=pe,this.loading$=this.loadingService.loading$,this.searchFields$=new W(["designation"]),this.searchSubject$=new W(""),this.search$=this.searchSubject$.asObservable(),this.roles$=new W(null),this.isClassTeacher$=this.roles$.pipe(y(ce=>mi(ce,"ClassTeacherRole")),J(1)),this.withStudyCourses$=new W(!1),this.unratedCourses$=this.roles$.pipe($(this.loadUnratedCourses.bind(this)),J(1)),this.studyCourses$=this.withStudyCourses$.pipe($(this.loadStudyCourses.bind(this)),J(1)),this.formativeAssessments$=this.isClassTeacher$.pipe($(this.loadFormativeAssessments.bind(this)),J(1)),this.studyClasses$=this.isClassTeacher$.pipe($(this.loadStudyClasses.bind(this)),J(1)),this.events$=this.getEvents().pipe(J(1)),this.filteredEvents$=q([this.events$,this.searchFields$,this.search$]).pipe(y(Ce(ot)))}setSearch(e){this.searchSubject$.next(e)}setRoles(e){this.roles$.next(e)}setWithStudyCourses(e){this.withStudyCourses$.next(e)}setSearchFields(e){this.searchFields$.next(e)}getEntries(e=!1){return this.filteredEvents$.pipe(y(i=>e?i.filter(n=>n.evaluationText):i))}getEvents(){return this.loadingService.load(q([this.unratedCourses$,this.studyCourses$,this.formativeAssessments$,this.studyClasses$]),{stopOnFirstValue:!0}).pipe(y(Ce(this.createAndSortEvents.bind(this))))}loadUnratedCourses(e){return this.coursesRestService.getExpandedCourses(e).pipe(y(i=>i.filter(n=>!Ri(n))))}loadStudyCourses(e){if(!e)return U([]);let i=this.storageService.getPayload();return this.eventsRestService.getStudyCourseEvents().pipe(y(n=>n.filter(o=>Bi(i,o))),$(n=>this.subscriptionsRestService.getSubscriptionCountsByEvents(n.map(o=>o.Id)).pipe(y(o=>n.map(u=>D(L({},u),{StudentCount:o[u.Id]??0}))))))}loadFormativeAssessments(e){return e?this.studyClassRestService.getActiveFormativeAssessments():U([])}loadStudyClasses(e){return e?this.studyClassRestService.getActive():U([])}createAndSortEvents(e,i,n,o){let u=o.filter(g=>!n.map(M=>M.Id).includes(g.Id));return[...this.createFromCourses(e),...this.createFromStudyCourses(i),...this.createFromAssessments(n),...this.createFromStudyClasses(u)].sort((g,M)=>g.designation.localeCompare(M.designation))}createFromCourses(e){return e.map(i=>{let n=pt(i);return{id:i.Id,designation:ct(i),detailLink:this.buildStudentsLink(i.Id),studentCount:i.AttendanceRef.StudentCount||0,dateFrom:i.DateFrom,dateTo:i.DateTo,state:n?.value||null,evaluationText:this.getEvaluationText(n,i.EvaluationStatusRef.EvaluationUntil),evaluationLink:n?.value&&n?.value!==ee.Tests?this.buildEvaluationLink(i.Id):null}})}createFromStudyCourses(e){return e.map(i=>({id:i.Id,designation:i.Designation,detailLink:this.buildStudentsLink(i.Id),studentCount:i.StudentCount,state:null}))}createFromAssessments(e){return this.createFromStudyClasses(e).map(n=>D(L({},n),{state:ee.Rating,evaluationText:this.translate.instant("events.state.rating"),evaluationLink:this.buildEvaluationLink(n.id)}))}createFromStudyClasses(e){return e.map(i=>({id:i.Id,designation:i.Number,detailLink:this.buildStudentsLink(i.Id),studentCount:i.StudentCount,state:null}))}getEvaluationText(e,i){let n=e?.label||e?.value;return n?this.translate.instant(`events.state.${n}`)+(n===ee.RatingUntil?` ${i?pi(i,"dd.MM.yyyy"):""}`:""):""}buildStudentsLink(e){return ji(e,this.router.url)}buildEvaluationLink(e){return(this.settings.eventlist.evaluation??"").replace(":id",String(e))}static{this.\u0275fac=function(i){return new(i||t)(P(le),P(dt),P($i),P(it),P(Le),P(Je),P(ne),P(Me),P(fe))}}static{this.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Yn=(t,d)=>d.id,Kn=()=>[];function Xn(t,d){t&1&&b(0,"bkd-spinner")}function Jn(t,d){t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2&&(r(),v(" ",c(2,1,"events.rating")," "))}function Qn(t,d){if(t&1&&b(0,"bkd-events-list-entry",8),t&2){let e=d.$implicit,i=h(3);m("event",e)("withRatings",i.withRatings)}}function Zn(t,d){if(t&1&&(s(0,"div",3)(1,"div",4),p(2),l(3,"translate"),a(),s(4,"div",5),p(5),l(6,"translate"),a(),s(7,"div",6),p(8),l(9,"translate"),a(),E(10,Jn,3,3,"div",7),a(),A(11,Qn,1,2,"bkd-events-list-entry",8,Yn)),t&2){let e=h(2),i=j(0);r(2),f(c(3,4,"events.designation")),r(3),f(c(6,6,"events.date")),r(3),v(" ",c(9,8,"events.registrations")," "),r(2),x(e.withRatings?10:-1),r(),V(i)}}function er(t,d){t&1&&(s(0,"p",2),p(1),l(2,"translate"),a()),t&2&&(r(),f(c(2,1,"events.no-events")))}function tr(t,d){if(t&1&&E(0,Zn,13,10)(1,er,3,3,"p",2),t&2){h();let e=j(0);x(e.length>0?0:1)}}var Ni=["designation"],ir=[...Ni,"evaluationText"],ut=(()=>{class t{constructor(e,i){this.state=e,this.storage=i,this.withStudyCourses=!1,this.withRatings=!0,this.state.setRoles(this.storage.getPayload()?.roles??null)}ngOnChanges(e){e.withStudyCourses&&this.state.setWithStudyCourses(e.withStudyCourses.currentValue),e.withRatings&&this.state.setSearchFields(e.withRatings.currentValue?ir:Ni)}static{this.\u0275fac=function(i){return new(i||t)(S(De),S(Je))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-list"]],inputs:{withStudyCourses:"withStudyCourses",withRatings:"withRatings"},features:[Ee],decls:10,vars:17,consts:[[1,"bkd-container"],[1,"d-flex","search",3,"valueChange","value","placeholder","label","disabled"],[1,"mt-3"],[1,"event-header"],[1,"designation"],[1,"date"],[1,"registrations"],[1,"rating"],[3,"event","withRatings"]],template:function(i,n){if(i&1){let o=O();B(0),l(1,"async"),s(2,"div",0)(3,"bkd-resettable-input",1),l(4,"async"),l(5,"translate"),l(6,"translate"),_("valueChange",function(g){return T(o),w(n.state.setSearch(g))}),a(),E(7,Xn,1,0,"bkd-spinner"),l(8,"async"),E(9,tr,2,1),a()}if(i&2){let o,u=H((o=c(1,5,n.state.getEntries(n.withRatings)))!==null&&o!==void 0?o:Pe(16,Kn));r(3),m("value",c(4,8,n.state.search$))("placeholder",c(5,10,"events.search-by"))("label",c(6,12,"events.search"))("disabled",!u),r(4),x(c(8,14,n.state.loading$)?7:9)}},dependencies:[at,_e,z,k,Fi],styles:['.search[_ngcontent-%COMP%]{max-width:500px}.event-header[_ngcontent-%COMP%]{display:grid;padding:1rem;border-bottom:2px solid #dee2e6;grid-template-areas:"designation date registrations rating";grid-template-columns:4fr 2fr 2fr 3fr}@media (max-width: 575.98px){.event-header[_ngcontent-%COMP%]{display:none}}']})}}return t})();var Ui=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-current-list"]],decls:4,vars:5,consts:[[3,"withStudyCourses","withRatings"]],template:function(i,n){i&1&&(s(0,"h1"),p(1),l(2,"translate"),a(),b(3,"bkd-events-list",0)),i&2&&(r(),f(c(2,3,"events.current.title")),r(2),m("withStudyCourses",!0)("withRatings",!1))},dependencies:[ut,k],encapsulation:2,changeDetection:0})}}return t})();var Wi=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-current"]],decls:1,vars:0,template:function(i,n){i&1&&b(0,"router-outlet")},dependencies:[ge],encapsulation:2})}}return t})();var qi=(()=>{class t{constructor(){this.entry=R.required(),this.multipleStudyClasses=R(!1),this.returnLink=R(null),this.link=K(()=>["student",this.entry().id,"addresses"]),this.linkParams=K(()=>{let e=this.returnLink();return e?{returnparams:new URLSearchParams({returnlink:e}).toString()}:{}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-course-entry"]],inputs:{entry:[1,"entry"],multipleStudyClasses:[1,"multipleStudyClasses"],returnLink:[1,"returnLink"]},decls:7,vars:10,consts:[[1,"avatar","large",3,"studentId","link","linkParams"],[1,"name",3,"title","routerLink","queryParams"],[1,"study-class"],[1,"company",3,"title"]],template:function(i,n){i&1&&(b(0,"bkd-avatar",0),s(1,"a",1),p(2),a(),s(3,"div",2),p(4),a(),s(5,"div",3),p(6),a()),i&2&&(m("studentId",n.entry().id)("link",n.link())("linkParams",n.linkParams()),r(),m("title",n.entry().name)("routerLink",n.link())("queryParams",n.linkParams()),r(),f(n.entry().name),r(2),v(" ",n.multipleStudyClasses()?n.entry().studyClass:"",` -`),r(),m("title",n.entry().company),r(),f(n.entry().company))},dependencies:[Q,Oi],styles:['[_nghost-%COMP%]{display:grid;grid-template-columns:min-content 1fr;grid-template-rows:min-content min-content 1fr;grid-template-areas:"avatar name" "avatar study-class" "avatar company";padding:2rem 1rem}.avatar[_ngcontent-%COMP%]{grid-area:avatar;margin-right:1.5rem}.name[_ngcontent-%COMP%]{grid-area:name}.study-class[_ngcontent-%COMP%]{grid-area:study-class;font-size:.875rem}.company[_ngcontent-%COMP%]{grid-area:company;align-content:end;padding-bottom:1.5rem}.name[_ngcontent-%COMP%], .company[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}'],changeDetection:0})}}return t})();var nr=t=>({count:t});function rr(t,d){if(t&1&&(s(0,"div",0),p(1),l(2,"translate"),a()),t&2){h();let e=j(2);r(),v(" ",F(2,1,e===1?"events-students.registration":"events-students.registrations",G(4,nr,e))," ")}}var ht=(()=>{class t{constructor(){this.title=R.required(),this.count=R(null),this.searchTerm=ke()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-header"]],inputs:{title:[1,"title"],count:[1,"count"],searchTerm:[1,"searchTerm"]},outputs:{searchTerm:"searchTermChange"},decls:7,vars:10,consts:[[1,"additional-info"],[1,"search",3,"valueChange","value","placeholder","label"]],template:function(i,n){if(i&1){let o=O();s(0,"h1"),p(1),a(),B(2),E(3,rr,3,6,"div",0),s(4,"bkd-resettable-input",1),l(5,"translate"),l(6,"translate"),_("valueChange",function(g){return T(o),w(n.searchTerm.set(g))}),a()}if(i&2){r(),f(n.title()),r();let o=H(n.count());r(),x(o!==null?3:-1),r(),m("value",n.searchTerm())("placeholder",c(5,6,"events-students.search-placeholder"))("label",c(6,8,"events-students.search"))}},dependencies:[k,at],styles:["h1[_ngcontent-%COMP%]{margin-bottom:0}.search[_ngcontent-%COMP%]{margin-top:1rem;display:flex;max-width:300px}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}"],changeDetection:0})}}return t})();var sr=(t,d)=>d.id;function ar(t,d){t&1&&(s(0,"p"),p(1),l(2,"translate"),a()),t&2&&(r(),f(c(2,1,"events-students.no-entries")))}function or(t,d){if(t&1&&b(0,"bkd-events-students-course-entry",2),t&2){let e=d.$implicit,i=h();m("entry",e)("multipleStudyClasses",i.multipleStudyClasses())("returnLink",i.returnLink())}}var zi=(()=>{class t{constructor(){this.title=R.required(),this.count=R.required(),this.entries=R.required(),this.multipleStudyClasses=R(!1),this.returnLink=R(null),this.searchTerm=ke()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-course-list"]],inputs:{title:[1,"title"],count:[1,"count"],entries:[1,"entries"],multipleStudyClasses:[1,"multipleStudyClasses"],returnLink:[1,"returnLink"],searchTerm:[1,"searchTerm"]},outputs:{searchTerm:"searchTermChange"},decls:5,vars:4,consts:[[3,"searchTermChange","title","count","searchTerm"],[1,"list"],[3,"entry","multipleStudyClasses","returnLink"]],template:function(i,n){i&1&&(s(0,"bkd-events-students-header",0),Te("searchTermChange",function(u){return xe(n.searchTerm,u)||(n.searchTerm=u),u}),a(),s(1,"section",1),E(2,ar,3,3,"p"),A(3,or,1,3,"bkd-events-students-course-entry",2,sr),a()),i&2&&(m("title",n.title())("count",n.count()),be("searchTerm",n.searchTerm),r(2),x(n.entries().length===0?2:-1),r(),V(n.entries()))},dependencies:[k,ht,qi],styles:["[_nghost-%COMP%]{display:block;overflow:hidden}section.list[_ngcontent-%COMP%]{width:calc(100% + 1px);margin-top:1rem;display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr))}bkd-events-students-course-entry[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6;border-right:1px solid #dee2e6}"],changeDetection:0})}}return t})();var Yi=(()=>{class t{constructor(){this.entry=R.required(),this.returnLink=R(null),this.link=K(()=>["student",this.entry().id,"absences"]),this.linkParams=K(()=>{let e=this.returnLink();return e?{returnparams:new URLSearchParams({returnlink:e}).toString()}:{}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-study-course-entry"]],inputs:{entry:[1,"entry"],returnLink:[1,"returnLink"]},decls:4,vars:4,consts:[[1,"name",3,"routerLink","queryParams"],[1,"status"]],template:function(i,n){i&1&&(s(0,"a",0),p(1),a(),s(2,"div",1),p(3),a()),i&2&&(m("routerLink",n.link())("queryParams",n.linkParams()),r(),f(n.entry().name),r(2),f(n.entry().status))},dependencies:[Q],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;align-items:stretch;border-bottom:1px solid #dee2e6}.name[_ngcontent-%COMP%], .status[_ngcontent-%COMP%]{padding:1rem}.name[_ngcontent-%COMP%]{flex:2;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.status[_ngcontent-%COMP%]{flex:1;padding-left:0}@media (max-width: 750px){[_nghost-%COMP%]{flex-direction:column}.name[_ngcontent-%COMP%]{padding-bottom:0}.status[_ngcontent-%COMP%]{padding-top:0;padding-left:1rem;font-size:.875rem}}"],changeDetection:0})}}return t})();var dr=(t,d)=>d.id;function lr(t,d){if(t&1){let e=O();s(0,"div",2)(1,"div",4),_("click",function(){T(e);let n=h();return w(n.toggleSort.emit())}),p(2),l(3,"translate"),s(4,"span",5),p(5),a()()()}if(t&2){let e=h();r(),m("className",e.primarySortKey),r(),v(" ",c(3,3,"events-students.list.header."+e.primarySortKey)," "),r(3),f(e.getSortDirectionCharacter(e.sortCriteria()))}}function pr(t,d){t&1&&(s(0,"p"),p(1),l(2,"translate"),a()),t&2&&(r(),f(c(2,1,"events-students.no-entries")))}function cr(t,d){if(t&1&&b(0,"bkd-events-students-study-course-entry",3),t&2){let e=d.$implicit,i=h();m("entry",e)("returnLink",i.returnLink())}}var Ki=(()=>{class t{constructor(){this.title=R.required(),this.count=R.required(),this.entries=R.required(),this.returnLink=R(null),this.sortCriteria=R.required(),this.toggleSort=jt(),this.searchTerm=ke(),this.primarySortKey="name"}getSortDirectionCharacter(e){return e.ascending?"\u2191":"\u2193"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-study-course-list"]],inputs:{title:[1,"title"],count:[1,"count"],entries:[1,"entries"],returnLink:[1,"returnLink"],sortCriteria:[1,"sortCriteria"],searchTerm:[1,"searchTerm"]},outputs:{toggleSort:"toggleSort",searchTerm:"searchTermChange"},features:[ie([])],decls:6,vars:4,consts:[[3,"searchTermChange","title","count","searchTerm"],[1,"list"],[1,"list-header"],[3,"entry","returnLink"],[1,"name",3,"click","className"],[1,"sort-direction"]],template:function(i,n){i&1&&(s(0,"bkd-events-students-header",0),Te("searchTermChange",function(u){return xe(n.searchTerm,u)||(n.searchTerm=u),u}),a(),s(1,"section",1),E(2,lr,6,5,"div",2)(3,pr,3,3,"p"),A(4,cr,1,2,"bkd-events-students-study-course-entry",3,dr),a()),i&2&&(m("title",n.title())("count",n.count()),be("searchTerm",n.searchTerm),r(2),x(n.entries().length>0?2:3),r(2),V(n.entries()))},dependencies:[k,ht,Yi],styles:[".list-header[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;border-bottom:2px solid #dee2e6}.name[_ngcontent-%COMP%]{padding:1rem}"],changeDetection:0})}}return t})();var Xi=(()=>{class t extends Qe{constructor(e,i){super(e,i,fi,"ApprenticeshipContracts")}getCompaniesForStudents(e){let i=new Date,n={"filter.StudentId":`;${e.join(";")}`,"filter.ApprenticeshipDateFrom":`<${i.toISOString()}`,"filter.ApprenticeshipDateTo":`>${i.toISOString()}`,fields:"Id,StudentId,CompanyName,CompanyNameAddition"};return this.http.get(`${this.baseUrl}/`,{params:n}).pipe($(di(vi)))}static{this.\u0275fac=function(i){return new(i||t)(P(Ne),P(fe))}}static{this.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var gt=1;var Ji=10,ft=(()=>{class t{constructor(e,i,n,o,u,g,M,N,pe){this.route=e,this.loadingService=i,this.eventsService=n,this.coursesService=o,this.subscriptionsService=u,this.personsService=g,this.apprenticeshipContractsService=M,this.lessonPresencesService=N,this.reportsService=pe,this.eventId$=q([this.route.paramMap,this.route.parent?.paramMap??U(null)]).pipe(y(([ce,Gn])=>Number(ce.get("id")||Gn?.get("id")))),this.eventTypeId=we(this.eventId$.pipe($(this.loadEventTypeId.bind(this))),{initialValue:null}),this.studentEntries=we(this.loadStudentEntries(),{initialValue:null}),this.isStudyCourse=K(()=>this.eventTypeId()===gt),this.loading=we(this.loadingService.loading(lt)),this.title=K(()=>this.getTitle(this.studentEntries())),this.multipleStudyClasses=K(()=>(this.studentEntries()?.studyClasses?.length??0)>1),this.searchTerm=yt(""),this.sortCriteria=yt({primarySortKey:"name",ascending:!0}),this.entries=K(()=>this.studentEntries()?.entries??[]),this.sortedEntries=K(()=>this.sortStudentEntries(this.entries(),this.sortCriteria())),this.filteredEntries=K(()=>ot(this.sortedEntries(),["name","status","company","studyClass"],this.searchTerm())),this.mailtoLink=K(()=>this.getMailtoLink(this.eventTypeId(),this.entries())),this.reports=we(q([this.eventId$,xt(this.eventTypeId).pipe(Se(ve))]).pipe($(Ce(this.loadReports.bind(this)))),{initialValue:[]})}loadEventTypeId(e){return this.loadingService.load(this.eventsService.getEventTypeId(e),lt)}loadStudentEntries(){return q([this.eventId$,xt(this.eventTypeId)]).pipe($(([e,i])=>{let n=()=>{switch(i){case null:return U(null);case gt:return this.loadStudyCourseStudents(e);case Ji:return this.loadStudyClassStudents(e);default:return this.loadCourseStudents(e)}};return this.loadingService.load(n(),lt)}))}toggleSort(){this.sortCriteria.update(e=>D(L({},e),{ascending:!e.ascending}))}loadStudyCourseStudents(e){return this.subscriptionsService.getSubscriptionsByCourse(e).pipe($(i=>this.personsService.getSummaries(i.map(({PersonId:n})=>n).filter(ve)).pipe(y(n=>kt(e,n,i)))))}loadStudyClassStudents(e){return this.subscriptionsService.getSubscriptionsByCourse(e,{"filter.IsOkay":"=1"}).pipe($(i=>{let n=i.map(({PersonId:o})=>o).filter(ve);return q([this.personsService.getSummaries(n),this.apprenticeshipContractsService.getCompaniesForStudents(n)]).pipe(y(([o,u])=>{let g=kt(e,o,i,{emailFallback:!0});return Et(g,u)}))}))}loadCourseStudents(e){return this.coursesService.getExpandedCourseWithParticipants(e).pipe(y(Ai),$(i=>q([this.apprenticeshipContractsService.getCompaniesForStudents(i.entries.map(({id:n})=>n)),this.lessonPresencesService.getLessonStudyClassesByEvent(e)]).pipe(y(([n,o])=>{let u=Et(i,n);return Vi(u,o)}))))}getTitle(e){if(!e||!e.eventDesignation)return null;let{eventDesignation:i,studyClasses:n}=e;return[i,...n].join(", ")}getMailtoLink(e,i){if(e===null||e===gt)return null;let n=i.map(o=>o.email).filter(Boolean);return n.length>0?`mailto:${n.join(";")}`:null}loadReports(e,i){switch(i){case null:case gt:return U([]);case Ji:return this.reportsService.getStudyClassStudentsReports(e);default:return this.reportsService.getCourseStudentsReports(e)}}sortStudentEntries(e,i){return[...e].sort(gr(i))}static{this.\u0275fac=function(i){return new(i||t)(P(de),P(Le),P(dt),P(le),P(it),P(Ci),P(Xi),P(ui),P(nt))}}static{this.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function gr(t){return(d,e)=>t.ascending?d.name.localeCompare(e.name):e.name.localeCompare(d.name)}var vr=t=>[t];function Cr(t,d){if(t&1&&(s(0,"a",4)(1,"i",6),p(2,"mail"),a()()),t&2){let e=h(2);m("href",e.state.mailtoLink(),Ve)}}function _r(t,d){if(t&1&&(s(0,"bkd-backlink",0)(1,"div",3),E(2,Cr,3,1,"a",4),b(3,"bkd-reports-link",5),a()()),t&2){let e=h(),i=j(0);m("link",G(3,vr,i)),r(2),x(e.state.mailtoLink()?2:-1),r(),m("reports",e.state.reports())}}function yr(t,d){t&1&&b(0,"bkd-spinner")}function Sr(t,d){t&1&&(s(0,"p"),p(1),l(2,"translate"),a()),t&2&&(r(),f(c(2,1,"events-students.no-entries")))}function br(t,d){if(t&1){let e=O();s(0,"bkd-events-students-study-course-list",7),_("toggleSort",function(){T(e);let n=h();return w(n.state.toggleSort())}),Te("searchTermChange",function(n){T(e);let o=h();return xe(o.state.searchTerm,n)||(o.state.searchTerm=n),w(n)}),a()}if(t&2){let e=h();m("title",e.state.title())("count",e.state.entries().length)("entries",e.state.filteredEntries())("returnLink",e.returnLink())("sortCriteria",e.state.sortCriteria()),be("searchTerm",e.state.searchTerm)}}function xr(t,d){if(t&1){let e=O();s(0,"bkd-events-students-course-list",8),Te("searchTermChange",function(n){T(e);let o=h();return xe(o.state.searchTerm,n)||(o.state.searchTerm=n),w(n)}),a()}if(t&2){let e=h();m("title",e.state.title())("count",e.state.entries().length)("entries",e.state.filteredEntries())("multipleStudyClasses",e.state.multipleStudyClasses())("returnLink",e.returnLink()),be("searchTerm",e.state.searchTerm)}}var Qi=(()=>{class t{constructor(e,i){this.state=e,this.route=i,this.returnLink=we(this.route.queryParams.pipe(y(({returnlink:n})=>n?decodeURIComponent(n):null)))}static{this.\u0275fac=function(i){return new(i||t)(S(ft),S(de))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students-list"]],decls:6,vars:3,consts:[[3,"link"],[3,"title","count","entries","returnLink","sortCriteria","searchTerm"],[3,"title","count","entries","multipleStudyClasses","returnLink","searchTerm"],[1,"d-flex"],["target","_blank",1,"mail","btn","btn-primary","btn-icon","me-2",3,"href"],[1,"ms-2",3,"reports"],[1,"material-icons"],[3,"toggleSort","searchTermChange","title","count","entries","returnLink","sortCriteria","searchTerm"],[3,"searchTermChange","title","count","entries","multipleStudyClasses","returnLink","searchTerm"]],template:function(i,n){if(i&1&&(B(0),E(1,_r,4,5,"bkd-backlink",0)(2,yr,1,0,"bkd-spinner")(3,Sr,3,3,"p")(4,br,1,6,"bkd-events-students-study-course-list",1)(5,xr,1,6,"bkd-events-students-course-list",2)),i&2){let o=H(n.returnLink());r(),x(o?1:-1),r(),x(n.state.loading()?2:n.state.entries().length===0?3:n.state.isStudyCourse()?4:5)}},dependencies:[k,_e,st,Ze,zi,Ki],encapsulation:2,changeDetection:0})}}return t})();var Zi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-students"]],features:[ie([ft])],decls:1,vars:0,template:function(i,n){i&1&&b(0,"router-outlet")},dependencies:[ge],encapsulation:2,changeDetection:0})}}return t})();var en=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events-tests"]],decls:4,vars:4,consts:[[3,"withRatings"]],template:function(i,n){i&1&&(s(0,"h1"),p(1),l(2,"translate"),a(),b(3,"bkd-events-list",0)),i&2&&(r(),f(c(2,2,"events.title")),r(2),m("withRatings",!0))},dependencies:[ut,k],encapsulation:2})}}return t})();var tn=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-events"]],features:[ie([De,ci])],decls:1,vars:0,template:function(i,n){i&1&&b(0,"router-outlet")},dependencies:[ge],encapsulation:2})}}return t})();function nn(t){return d=>{let e=Number(d.value);return e<=t?{greaterThan:{value:e,greaterThanValue:t}}:null}}function It(t){return t.map(({finalGrade:d})=>d).filter(Tr)}function Tr(t){return t!==null}function an(t,d,e,i){return t?.map(n=>({student:n,finalGrade:Er(n,e,i),grades:wr(n,d)}))}function wr(t,d){return d.map(e=>{if(e.Results===void 0||e.Results?.length===0)return{kind:"no-result",test:e};let i=e.Results?.find(n=>n.StudentId===t.Id);return i!==void 0?{kind:"grade",result:i,test:e}:{kind:"no-result",test:e}})}function Er(t,d,e){let i=d.find(o=>o.StudentId===t.Id),n=e.find(o=>o.StudentId===t.Id);return i?{id:i.Id,average:kr(i),finalGradeId:i.GradeId,freeHandGrade:n?Number(n.Grade):null,canGrade:i.CanGrade}:null}function kr(t){return t.AverageTestResult===0?null:t.AverageTestResult}var on=({key:t,ascending:d})=>(e,i)=>{let n=d?1:-1;switch(t){case"FullName":return n*e.student.FullName.localeCompare(i.student.FullName);case"FinalGrade":return!e.finalGrade?.finalGradeId||!i.finalGrade?.finalGradeId?n*-1:n*rn(e.finalGrade.finalGradeId,i.finalGrade.finalGradeId);case"TestsMean":return!e.finalGrade?.average||!i.finalGrade?.average?n*-1:n*rn(e.finalGrade.average,i.finalGrade.average)}return n*Ir(t,e,i)},Ir=(t,d,e)=>{let i=d.grades.filter(sn).find(o=>o.test.Id===t.Id),n=e.grades.filter(sn).find(o=>o.test.Id===t.Id);return t.IsPointGrading&&i?.result.GradeId===n?.result.GradeId?(i?.result.Points??0)-(n?.result.Points??0):((i?.result.GradeId??Number.POSITIVE_INFINITY)-(n?.result.GradeId??Number.POSITIVE_INFINITY))*-1};function rn(t,d){return t===d?0:te.average).filter(e=>e!=null&&e!==0).map(Number);return Tt(d)}function pn(t,d){let e=t.map(n=>n.freeHandGrade).filter(n=>!!n),i=t.map(n=>n.finalGradeId).filter(n=>n!==null).map(n=>d.find(o=>o.Key===n)).filter(n=>n!==void 0).map(n=>n?.Value).filter(n=>n!==void 0).map(Number).filter(n=>!isNaN(n));return Tt([...i,...e])}function Pt(t,d){return[...d.filter(e=>e.Id!==t?.Id),t].filter(e=>e!=null)}function cn({id:t,selectedGradeId:d},e){return e.map(i=>i.Id!==t?i:D(L({},i),{GradeId:d}))}function mn(t,d){switch(d.type){case"reset":return d.payload;case"updateResult":return t?D(L({},t),{Tests:yi(d.payload.testResult,t.Tests||[],d.payload.ignore),Gradings:d.payload.grading?Pt(d.payload.grading,t.Gradings||[]):t.Gradings}):null;case"deleteResult":return t?D(L({},t),{Tests:Si(d.payload.testId,d.payload.studentId,t.Tests||[]),Gradings:d.payload.grading?Pt(d.payload.grading,t.Gradings||[]):t.Gradings||[]}):null;case"toggle-test-state":return t?D(L({},t),{Tests:bi(d.payload,t.Tests||[])}):null;case"final-grade-overwritten":return t?D(L({},t),{Gradings:cn({id:d.payload.id,selectedGradeId:d.payload.selectedGradeId},t.Gradings||[])}):null;case"replace-grades":return t?D(L({},t),{Gradings:d.payload}):null;case"delete-test":return t?D(L({},t),{Tests:xi(d.payload,t.Tests||[])}):null;default:return t}}var un=(()=>{class t extends Qe{constructor(e,i){super(e,i,Ii,"Gradings")}updateGrade(e,i){return this.http.put(`${this.baseUrl}/${e}`,{GradeId:i}).pipe(y(()=>e))}static{this.\u0275fac=function(i){return new(i||t)(P(Ne),P(fe))}}static{this.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Mt={onlyMine:!1,hidePublished:!1},Y=(()=>{class t{constructor(e,i,n,o,u){this.coursesRestService=e,this.gradingScalesRestService=i,this.gradingsRestService=n,this.loadingService=o,this.sortService=u,this.action$=new _t(1),this.loading$=this.loadingService.loading$,this._courseId$=new _t(1),this.courseId$=this._courseId$.asObservable(),this.fetchedCourse$=this._courseId$.pipe($(g=>this.loadingService.load(this.coursesRestService.getExpandedCourse(g))),J(1)),this.course$=je(this.action$,this.fetchedCourse$.pipe(Se(ve),y(g=>({type:"reset",payload:g})))).pipe(Dt(mn,null),Se(ve),J(1)),this.tests$=this.course$.pipe(y(g=>g.Tests||[]),y(Ti)),this.hasTests$=this.tests$.pipe(y(g=>g.length>0)),this.filterSubject$=new W(Mt),this.filter$=this.filterSubject$.asObservable(),this.expandedHeaderSubject$=new W(!1),this.expandedHeader$=this.expandedHeaderSubject$.asObservable(),this.filteredTests$=q([this.tests$,this.filter$]).pipe(y(([g,M])=>g.filter(N=>(!M.onlyMine||N.IsOwner)&&(!M.hidePublished||!N.IsPublished)))),this.sorting$=this.sortService.sorting$,this.studentGrades$=q([this.course$,this.filteredTests$,this.sorting$]).pipe(y(Ce(this.toStudentGrades.bind(this)))),this.canSetFinalGrade$=this.course$.pipe(y(Di)),this.gradingScaleIds$=this.course$.pipe(y(g=>ai([...(g.Tests??[]).map(M=>M.GradingScaleId),g.GradingScaleId]).filter(ve)),X(si),J(1)),this.gradingScales$=this.gradingScaleIds$.pipe($(g=>this.gradingScalesRestService.getGradingScales(g)),J(1)),this.UNDEFINED_GRADINGSCALE_ID=-1,this.gradingScalesOptions$=this.gradingScales$.pipe(y(g=>g.map(M=>{let N=M?.Id||this.UNDEFINED_GRADINGSCALE_ID,pe=M?.Grades.map(ce=>({Key:ce.Id,Value:ce.Designation}))||[];return{id:N,options:pe}}).reduce((M,N)=>D(L({},M),{[N.id]:N.options}),{})),J(1)),this.meanOfStudentGradesForCourse$=this.studentGrades$.pipe(y(g=>ln(It(g)))),this.meanOfFinalGradesForCourse$=q([this.gradingScalesOptions$,this.studentGrades$]).pipe($(Ce(this.meanOfOverwrittenGradesForCourse.bind(this))))}setCourseId(e){this._courseId$.next(e)}setFilter(e){this.filterSubject$.next(e)}gradingOptionsForTest$(e){return this.gradingOptions$(e.GradingScaleId)}gradingOptionsForCourse$(){return this.course$.pipe($(e=>this.gradingOptions$(e.GradingScaleId)))}toStudentGrades(e,i=[],n){return an(e.ParticipatingStudents??[],i,e.Gradings??[],e.FinalGrades??[]).sort(on(n))}setSorting(e){this.sortService.setSorting(e)}getSortingChar$(e){return this.sortService.getSortingChar$(e)}sortBy(e){this.sortService.toggleSorting(e)}toggleHeader(e){this.expandedHeaderSubject$.next(e)}optimisticallyUpdateGrade(e){return this.course$.pipe(re(1),y(i=>{let{originalResult:n,updatedResult:o}=this.buildOptimisticResultUpdate(i,e);return this.updateTestResult(o,null),n}))}saveGrade(e,i){this.course$.pipe(re(1),$(n=>this.coursesRestService.updateTestResult(n.Id,e).pipe(Gt(o=>(i&&this.updateTestResult(L({},i),null),$t(()=>o)))))).subscribe(({testResult:n,grading:o})=>this.updateOrDeleteTestResult(e.testId,e.studentId,n,o,"gradeId"in e?"grade":"points"))}publish(e){this.coursesRestService.publishTest(e.Id).subscribe(this.toggleTestPublishedState.bind(this))}unpublish(e){this.coursesRestService.unpublishTest(e.Id).subscribe(this.toggleTestPublishedState.bind(this))}deleteTest(e){this.action$.next({type:"delete-test",payload:e})}overwriteFinalGrade({id:e,selectedGradeId:i}){this.gradingsRestService.updateGrade(e,i).subscribe(()=>{this.action$.next({type:"final-grade-overwritten",payload:{id:e,selectedGradeId:i}})})}setAveragesAsFinalGrades(e){this.coursesRestService.setAverageAsFinalGrade(e).subscribe(i=>this.action$.next({type:"replace-grades",payload:i.Gradings}))}buildOptimisticResultUpdate(e,i){let n=_i(e,i.testId,i.studentId),o=n?L({},n):{Id:"",TestId:i.testId,StudentId:i.studentId,CourseRegistrationId:0,GradeId:null,GradeValue:null,GradeDesignation:null,Points:null};return o.GradeId="gradeId"in i?i.gradeId:n?.GradeId??null,o.Points="points"in i?i.points:n?.Points??null,{originalResult:n,updatedResult:o}}updateOrDeleteTestResult(e,i,n,o,u){n?this.updateTestResult(n,o,u):this.deleteTestResult(e,i,o)}updateTestResult(e,i,n){this.action$.next({type:"updateResult",payload:{testResult:e,grading:i??null,ignore:n}})}deleteTestResult(e,i,n){this.action$.next({type:"deleteResult",payload:{testId:e,studentId:i,grading:n}})}toggleTestPublishedState(e){this.action$.next({type:"toggle-test-state",payload:e})}gradingOptions$(e){return e===null?U(null):this.gradingScalesOptions$.pipe(y(i=>i[e]),J(1))}meanOfOverwrittenGradesForCourse(e,i){return this.course$.pipe(y(n=>{if(n.GradingScaleId===null||e[n.GradingScaleId]===void 0)return null;let o=e[n.GradingScaleId];return pn(It(i),o)}))}static{this.\u0275fac=function(i){return new(i||t)(P(le),P(Pi),P(un),P(Le),P(Li))}}static{this.\u0275prov=se({token:t,factory:t.\u0275fac})}}return t})();var Or=t=>["/events",t,"tests"];function $r(t,d){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=d.$implicit;r(),v(" ",F(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Gr(t,d){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=d.$implicit;r(),v(" ",F(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Lr(t,d){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=d.$implicit;r(),v(" ",F(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Fr(t,d){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=d.$implicit;r(),v(" ",F(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Dr(t,d){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=d.$implicit;r(),v(" ",F(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Rr(t,d){if(t&1&&(s(0,"div",29)(1,"div",30)(2,"div",16)(3,"label",31),p(4),l(5,"translate"),a(),s(6,"div",32),b(7,"input",33),l(8,"async"),A(9,Fr,3,4,"div",7,Ie),l(11,"async"),a()()(),s(12,"div",30)(13,"div",16)(14,"label",34),p(15),l(16,"translate"),a(),s(17,"div",32),b(18,"input",35),l(19,"async"),A(20,Dr,3,4,"div",7,Ie),l(22,"async"),a()()()(),s(23,"div",36),Bt(),s(24,"math")(25,"mi"),p(26),l(27,"translate"),a(),s(28,"mo"),p(29,"="),a(),s(30,"mfrac")(31,"mrow")(32,"mi"),p(33),l(34,"translate"),a(),s(35,"mo"),p(36,"\xD7"),a(),s(37,"mn"),p(38,"5"),a()(),s(39,"mi"),p(40),l(41,"translate"),a()(),s(42,"mo"),p(43,"+"),a(),s(44,"mn"),p(45,"1"),a()()()),t&2){let e,i,n=h(2);r(4),f(c(5,9,"tests.form.max-points")),r(3),ae("is-invalid",((e=c(8,11,n.maxPointsErrors$))==null?null:e.length)||!1),r(2),V(c(11,13,n.maxPointsErrors$)),r(6),f(c(16,15,"tests.form.max-points-adjusted")),r(3),ae("is-invalid",((i=c(19,17,n.maxPointsAdjustedErrors$))==null?null:i.length)||!1),r(2),V(c(22,19,n.maxPointsAdjustedErrors$)),r(6),v(" ",c(27,21,"tests.form.math.grade")," "),r(7),v(" ",c(34,23,"tests.form.math.points")," "),r(7),f(c(41,25,"tests.form.math.max-points"))}}function Br(t,d){t&1&&(s(0,"div",28)(1,"span",37),p(2,"Loading..."),a()())}function jr(t,d){if(t&1){let e=O();s(0,"form",2),_("ngSubmit",function(){T(e);let n=h();return w(n.onSubmit())}),s(1,"div",3)(2,"div",4)(3,"label",5),p(4),l(5,"translate"),a(),b(6,"input",6),l(7,"async"),l(8,"translate"),A(9,$r,3,4,"div",7,Ie),l(11,"async"),a(),s(12,"div",8)(13,"label",9),p(14),l(15,"translate"),a(),s(16,"div",10)(17,"span",11)(18,"i",12),p(19,"calendar_today"),a()(),s(20,"input",13,0),l(22,"async"),l(23,"translate"),_("click",function(){T(e);let n=he(21);return w(n.toggle())}),a(),A(24,Gr,3,4,"div",7,Ie),l(26,"async"),a()()(),s(27,"div",14)(28,"label",15),p(29),l(30,"translate"),a(),s(31,"div",4)(32,"div",16)(33,"label",17),p(34),l(35,"translate"),a(),s(36,"div",18),b(37,"input",19),l(38,"async"),A(39,Lr,3,4,"div",7,Ie),l(41,"async"),a()()()(),s(42,"div")(43,"label",15),p(44),l(45,"translate"),a(),s(46,"div",20),b(47,"input",21),s(48,"label",22),p(49),l(50,"translate"),a()(),s(51,"div",20),b(52,"input",23),s(53,"label",24),p(54),l(55,"translate"),a()(),E(56,Rr,46,27),a(),s(57,"div",25)(58,"button",26),l(59,"async"),p(60),l(61,"translate"),a(),s(62,"button",27),p(63),l(64,"translate"),E(65,Br,3,0,"div",28),a()()()}if(t&2){let e,i,n,o,u=h();m("formGroup",u.formGroup),r(4),f(c(5,26,"tests.form.designation")),r(2),ae("is-invalid",((e=c(7,28,u.designationErrors$))==null?null:e.length)||!1),m("placeholder",c(8,30,"tests.form.designation-placeholder")),r(3),V(c(11,32,u.designationErrors$)),r(5),f(c(15,34,"tests.form.date")),r(3),m("id",u.componentId),r(3),ae("is-invalid",((i=c(22,36,u.dateErrors$))==null?null:i.length)||!1),m("placeholder",c(23,38,"shared.date-select.default-placeholder")),r(4),V(c(26,40,u.dateErrors$)),r(5),f(c(30,42,"tests.form.weight")),r(5),f(c(35,44,"tests.form.factor")),r(3),ae("is-invalid",((n=c(38,46,u.weightErrors$))==null?null:n.length)||!1),r(2),V(c(41,48,u.weightErrors$)),r(5),f(c(45,50,"tests.form.grading-type")),r(3),m("value",!1),r(2),f(c(50,52,"tests.form.grades")),r(3),m("value",!0),r(2),f(c(55,54,"tests.form.points")),r(2),x((o=u.formGroup.get("isPointGrading"))!=null&&o.value?56:-1),r(2),m("disabled",u.saving)("routerLink",G(62,Or,c(59,56,u.courseId$))),r(2),v(" ",c(61,58,"tests.form.cancel")," "),r(2),m("disabled",u.saving),r(),v(" ",c(64,60,"tests.form.save")," "),r(2),x(u.saving?65:-1)}}var vt=(()=>{class t{constructor(e,i,n){this.fb=e,this.translate=i,this.testStateService=n,this.test=null,this.saving=!1,this.save=new Z,this.componentId=oi("bkd-tests-edit-form"),this.formGroup=this.createFormGroup(),this.submitted$=new W(!1),this.destroy$=new te,this.designationErrors$=Ge(U(this.formGroup),this.submitted$,"designation"),this.dateErrors$=Ge(U(this.formGroup),this.submitted$,"date"),this.maxPointsErrors$=Ge(U(this.formGroup),this.submitted$,"maxPoints"),this.maxPointsAdjustedErrors$=Ge(U(this.formGroup),this.submitted$,"maxPointsAdjusted"),this.weightErrors$=Ge(U(this.formGroup),this.submitted$,"weight"),this.courseId$=this.testStateService.courseId$}ngOnInit(){this.test&&this.setInitialValues(this.test),li(U(this.formGroup),"isPointGrading").pipe(me(this.destroy$)).subscribe(this.togglePointFieldsDisability.bind(this))}ngOnDestroy(){this.destroy$.next()}onSubmit(){this.submitted$.next(!0),this.formGroup.valid&&this.save.emit(this.formGroup.value)}createFormGroup(){return this.fb.group({designation:["",Oe.required],date:[null,Oe.required],weight:[1,Oe.compose([Oe.required,nn(0)])],isPointGrading:[!1],maxPoints:[{value:null,disabled:!0},Oe.required],maxPointsAdjusted:[{value:null,disabled:!0},null]})}setInitialValues(e){this.formGroup.patchValue({designation:e.Designation,date:e.Date,weight:e.Weight,isPointGrading:e.IsPointGrading,maxPoints:e.MaxPoints,maxPointsAdjusted:e.MaxPointsAdjusted}),e.Results&&e.Results.length>0&&(this.formGroup.get("isPointGrading")?.disable(),this.formGroup.get("maxPoints")?.disable(),this.formGroup.get("maxPointsAdjusted")?.disable()),this.togglePointFieldsDisability()}togglePointFieldsDisability(){let e=this.formGroup.get("maxPoints"),i=this.formGroup.get("maxPointsAdjusted");this.formGroup.get("isPointGrading")?.value?(e?.enable(),i?.enable()):(e?.reset({value:this.test?.MaxPoints,disabled:!0}),i?.reset({value:this.test?.MaxPointsAdjusted,disabled:!0}))}static{this.\u0275fac=function(i){return new(i||t)(S(Zt),S(ne),S(Y))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-edit-form"]],inputs:{test:"test",saving:"saving"},outputs:{save:"save"},features:[ie([{provide:ti,useClass:ri},{provide:ii,useClass:Gi}])],decls:1,vars:1,consts:[["dp","ngbDatepicker"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"row","g-3","mb-3"],[1,"col-md-6"],["for","designation",1,"form-label"],["id","designation","name","designation","type","text","formControlName","designation","required","",1,"form-control",3,"placeholder"],[1,"invalid-feedback"],[1,"col-md-6","mb-3"],["for","date",1,"form-label"],[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["id","date","name","date","type","text","ngbDatepicker","","formControlName","date","required","",1,"form-control",3,"click","placeholder"],[1,"row","mb-3"],[1,"form-label"],[1,"row"],["for","factor",1,"form-label","col-3","col-sm-2"],[1,"col-9","col-sm-10"],["id","factor","name","factor","type","number","formControlName","weight","step","0.05","min","0","required","",1,"form-control"],[1,"form-check"],["type","radio","formControlName","isPointGrading","id","type-grades",1,"form-check-input",3,"value"],["for","type-grades",1,"form-check-label"],["type","radio","formControlName","isPointGrading","id","type-points",1,"form-check-input",3,"value"],["for","type-points",1,"form-check-label"],[1,"d-flex","justify-content-end","mt-4"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","routerLink"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"row","ms-4","mb-3","g-3"],[1,"col-sm-6","col-md-4"],["for","max-points",1,"ms-2","col-4","col-form-label"],[1,"col-6"],["type","number","name","maxPoints","id","max-points","formControlName","maxPoints","step","0.01","min","0","max","999","required","",1,"form-control"],["for","max-points-adjusted",1,"ms-2","col-4","col-form-label"],["type","number","name","maxPointsAdjusted","id","max-points-adjusted","formControlName","maxPointsAdjusted","step","0.01","min","0","max","999",1,"form-control"],[1,"ms-4","ps-3","py-3"],[1,"visually-hidden"]],template:function(i,n){i&1&&E(0,jr,66,64,"form",1),i&2&&x(n.formGroup?0:-1)},dependencies:[$e,Yt,Ue,qe,Kt,We,qt,Qt,Ye,ze,ei,Xt,Jt,ni,Q,z,k],styles:["#factor[_ngcontent-%COMP%], #max-points[_ngcontent-%COMP%], #max-points-adjusted[_ngcontent-%COMP%]{width:5em}"]})}}return t})();var hn=(()=>{class t{constructor(e,i,n,o,u){this.route=e,this.courseService=i,this.toastService=n,this.translate=o,this.router=u,this.saving$=new W(!1),this.courseId$=this.route.paramMap.pipe(y(g=>Number(g.get("id"))),X())}save(e){this.saving$.next(!0);let{designation:i,date:n,weight:o,isPointGrading:u,maxPoints:g,maxPointsAdjusted:M}=e;this.courseId$.pipe($(N=>this.courseService.add(N,n,i,o,u,g,M)),Ae(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("tests.form.save-success")),this.navigateBack()}navigateBack(){this.courseId$.subscribe(e=>void this.router.navigate(["events",e,"tests"]))}static{this.\u0275fac=function(i){return new(i||t)(S(de),S(le),S(Xe),S(ne),S(Me))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-add"]],decls:6,vars:6,consts:[[1,"bkd-container","bkd-container-limited"],[3,"save","saving"]],template:function(i,n){i&1&&(s(0,"h1"),p(1),l(2,"translate"),a(),s(3,"div",0)(4,"bkd-tests-edit-form",1),l(5,"async"),_("save",function(u){return n.save(u)}),a()()),i&2&&(r(),f(c(2,2,"tests.add-title")),r(3),m("saving",c(5,4,n.saving$)))},dependencies:[vt,z,k],encapsulation:2})}}return t})();var gn=(()=>{class t{constructor(e){this.activeModal=e}get canDeleteTest(){return(this.test?.Results?.filter(i=>i.GradeId!==null||i.GradeValue!==null||i.Points!==null)||[]).length===0}static{this.\u0275fac=function(i){return new(i||t)(S(Ke))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-delete"]],inputs:{test:"test"},decls:13,vars:10,consts:[[1,"modal-body"],["data-testid","confirmation-message"],[1,"modal-footer"],["data-testid","cancel-button","type","button",1,"btn","btn-outline-secondary",3,"click","hidden"],[1,"px-2"],["data-testid","confirm-button","type","button",1,"btn","btn-primary",3,"click"],[1,"px-3"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"p",1),p(2),l(3,"translate"),a()(),s(4,"div",2)(5,"button",3),_("click",function(){return n.activeModal.dismiss()}),s(6,"span",4),p(7),l(8,"translate"),a()(),s(9,"button",5),_("click",function(){return n.activeModal.close(n.canDeleteTest?n.test:null)}),s(10,"span",6),p(11),l(12,"translate"),a()()()),i&2&&(r(2),v(" ",c(3,4,n.canDeleteTest?"tests.form.confirm":"tests.form.delete-not-allowed")," "),r(3),m("hidden",!n.canDeleteTest),r(2),v(" ",c(8,6,"tests.dialog.no")," "),r(4),v(" ",c(12,8,n.canDeleteTest?"tests.dialog.yes":"tests.dialog.ok")," "))},dependencies:[k],encapsulation:2})}}return t})();var Nr=t=>({test:t});function Ur(t,d){t&1&&b(0,"bkd-spinner")}function Wr(t,d){if(t&1){let e=O();s(0,"div",1)(1,"h1"),p(2),l(3,"translate"),a(),s(4,"button",2),_("click",function(){T(e);let n=h(),o=j(0);return w(n.openDeleteModal(o))}),s(5,"i",3),p(6,"delete"),a()()(),s(7,"bkd-tests-edit-form",4),_("save",function(n){T(e);let o=h();return w(o.save(n))}),a()}if(t&2){h();let e=j(0),i=j(2);r(2),v(" ",F(3,3,"tests.edit-title",G(6,Nr,e.Designation))," "),r(5),m("test",e)("saving",i)}}var fn=(()=>{class t{constructor(e,i,n,o,u,g,M){this.state=e,this.courseService=i,this.route=n,this.toastService=o,this.translate=u,this.router=g,this.modalService=M,this.saving$=new W(!1),this.testId$=this.route.paramMap.pipe(y(N=>Number(N.get("testId"))),X()),this.test$=q([this.state.tests$,this.testId$]).pipe(y(([N,pe])=>N.find(ce=>ce.Id===pe)))}openDeleteModal(e){let i=this.modalService.open(gn);i.componentInstance.test=e,i.result.then(n=>{n&&this.courseService.delete(e.CourseId,e.Id).subscribe(this.onDeleteSuccess.bind(this))},()=>{})}save(e){this.saving$.next(!0);let{designation:i,date:n,weight:o,isPointGrading:u,maxPoints:g,maxPointsAdjusted:M}=e;q([this.state.courseId$,this.testId$]).pipe(re(1),$(([N,pe])=>this.courseService.update(N,pe,i,n,o,u,g,M)),Ae(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("tests.form.save-success")),this.navigateBack()}onDeleteSuccess(e){this.toastService.success(this.translate.instant("tests.form.delete-success")),this.state.deleteTest(e),this.navigateBack()}navigateBack(){this.state.courseId$.pipe(re(1)).subscribe(e=>void this.router.navigate(["events",e,"tests"]))}static{this.\u0275fac=function(i){return new(i||t)(S(Y),S(le),S(de),S(Xe),S(ne),S(Me),S(rt))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-edit"]],decls:8,vars:9,consts:[[1,"bkd-container","bkd-container-limited"],[1,"d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-primary","btn-icon",3,"click"],[1,"material-icons"],[3,"save","test","saving"]],template:function(i,n){if(i&1&&(B(0),l(1,"async"),B(2),l(3,"async"),s(4,"div",0),E(5,Ur,1,0,"bkd-spinner"),l(6,"async"),E(7,Wr,8,8),a()),i&2){let o=H(c(1,1,n.test$));r(2),H(c(3,4,n.saving$)),r(3),x(c(6,7,n.state.loading$)?5:o?7:-1)}},dependencies:[vt,_e,z,k],encapsulation:2})}}return t})();var qr=t=>({designation:t}),vn=(()=>{class t{constructor(e){this.activeModal=e}static{this.\u0275fac=function(i){return new(i||t)(S(Ke))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-publish-test"]],inputs:{test:"test"},decls:11,vars:12,consts:[[1,"modal-body"],["data-testid","confirmation-message"],[1,"modal-footer"],["data-testid","cancel-button","type","button",1,"btn","btn-outline-secondary",3,"click"],["data-testid","confirm-button","type","button",1,"btn","btn-primary",3,"click"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"p",1),p(2),l(3,"translate"),a()(),s(4,"div",2)(5,"button",3),_("click",function(){return n.activeModal.dismiss()}),p(6),l(7,"translate"),a(),s(8,"button",4),_("click",function(){return n.activeModal.close(!0)}),p(9),l(10,"translate"),a()()),i&2&&(r(2),v(" ",F(3,3,n.test.IsPublished?"tests.publishing.unpublish":"tests.publishing.publish",G(10,qr,n.test.Designation))," "),r(4),v(" ",c(7,6,"tests.publishing.cancel")," "),r(3),v(" ",c(10,8,"tests.publishing.confirm")," "))},dependencies:[k],encapsulation:2})}}return t})();var zr=t=>({maxPoints:t});function Yr(t,d){if(t&1&&(s(0,"div",6),p(1),l(2,"translate"),a()),t&2){let e=h(2);r(),v(" ",F(2,1,"global.validation-errors.invalidPoints",G(4,zr,e.maxPoints))," ")}}function Kr(t,d){if(t&1){let e=O();s(0,"div",3)(1,"input",5,0),_("ngModelChange",function(){T(e);let n=he(2),o=h();return w(o.onPointsChange(n.value))}),a(),E(3,Yr,3,6,"div",6),a()}if(t&2){let e=he(2),i=h();r(),ae("is-invalid",e.errors),ue("max",i.maxPoints),ue("tabindex",i.tabIndex),m("disabled",i.grade.test.IsPublished)("ngModel",i.grade.kind==="grade"?i.grade.result.Points:null),r(2),x(e.errors?3:-1)}}var Xr=1250,Cn=(()=>{class t{constructor(e){this.state=e,this.maxPoints=0,this.pointsSubject$=new te,this.gradeSubject$=new te,this.gradingScaleDisabledSubject$=new W(!0),this.gradingScaleDisabled$=this.gradingScaleDisabledSubject$.asObservable(),this.destroy$=new te}ngOnInit(){this.gradingScaleDisabledSubject$.next(this.disableGradingScale()),this.maxPoints=dn(this.grade),this.initSave(this.pointsSubject$.pipe(Se(this.isValid.bind(this)),y(e=>({studentId:this.student.Id,testId:this.grade.test.Id,points:e?Number(e):null})))),this.initSave(this.gradeSubject$.pipe(y(e=>({studentId:this.student.Id,testId:this.grade.test.Id,gradeId:e}))))}ngOnChanges(){this.gradingScaleDisabledSubject$.next(this.disableGradingScale())}ngOnDestroy(){this.destroy$.next()}onPointsChange(e){this.pointsSubject$.next(e),this.gradingScaleDisabledSubject$.next(!(e===null||e===""))}onGradeChange(e){this.gradeSubject$.next(e)}isValid(e){return e===""||e===null?!0:isNaN(Number(e))?!1:!(Number(e)<0||Number(e)>this.maxPoints)}initSave(e){e.pipe(Lt(i=>this.state.optimisticallyUpdateGrade(i).pipe(y(n=>({params:i,originalResult:n})))),Ft(Xr),me(this.destroy$)).subscribe(({params:i,originalResult:n})=>this.state.saveGrade(i,n))}disableGradingScale(){return this.grade.test.IsPublished?!0:this.grade.kind==="no-result"?!1:this.grade.result.Points!=null&&this.grade.test.IsPointGrading}static{this.\u0275fac=function(i){return new(i||t)(S(Y))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-grade"]],inputs:{grade:"grade",student:"student",tabIndex:"tabIndex",gradeOptions:"gradeOptions"},features:[Ee],decls:5,vars:8,consts:[["points","ngModel"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],[1,"point-input-container","me-2","me-md-3"],["data-testid","grade-select",1,"grade-select",3,"valueChange","options","allowEmpty","value","disabled","tabindex"],["type","number","step","0.01","min","0","data-testid","point-input",1,"form-control",3,"ngModelChange","max","disabled","tabindex","ngModel"],["data-testid","validation-error-message",1,"invalid-feedback"]],template:function(i,n){i&1&&(s(0,"div",1)(1,"div",2),E(2,Kr,4,7,"div",3),s(3,"bkd-select",4),l(4,"async"),_("valueChange",function(u){return n.onGradeChange(u)}),a()()()),i&2&&(r(2),x(n.grade.test.IsPointGrading?2:-1),r(),m("options",n.gradeOptions)("allowEmpty",!0)("value",n.grade.kind==="grade"?n.grade.result.GradeId:null)("disabled",c(4,6,n.gradingScaleDisabled$))("tabindex",n.tabIndex))},dependencies:[$e,Ue,qe,We,Ye,ze,zt,Fe,z,k],styles:[".point-input-container[_ngcontent-%COMP%]{width:4em}[_nghost-%COMP%] select{width:127px}@media (min-width: 576px){.point-input-container[_ngcontent-%COMP%]{width:5em}}"]})}}return t})();function Jr(t,d){if(t&1&&(s(0,"span",1),p(1),a()),t&2){let e=h();r(),f(e.calculatePointsAverage(e.test))}}var _n=(()=>{class t{constructor(e){this.locale=e}calculatePointsAverage(e){return this.safeAverage(e,2,et)}calculateGradeAverage(e){return this.safeAverage(e,3,tt)}safeAverage(e,i,n){try{return ki(n(e),this.locale,i)}catch{return wi}}static{this.\u0275fac=function(i){return new(i||t)(S(Wt))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-average-grades"]],inputs:{test:"test"},decls:4,vars:2,consts:[[1,"d-flex","flex-row","w-100"],["data-testid","average-points",1,"mr-2","mr-md-3","average-points"],["data-testid","average-grade"]],template:function(i,n){i&1&&(s(0,"div",0),E(1,Jr,2,1,"span",1),s(2,"span",2),p(3),a()()),i&2&&(r(),x(n.test.IsPointGrading?1:-1),r(2),f(n.calculateGradeAverage(n.test)))},styles:[".average-points[_ngcontent-%COMP%]{min-width:4.5em}@media (min-width: 576px){.average-points[_ngcontent-%COMP%]{min-width:6em}}"]})}}return t})();var yn=(()=>{class t{constructor(){this.disabled=!1,this.width="127px",this.gradeIdSelected=new Z}onGradeChange(e){this.gradeId?.valueOf()!==void 0&&this.gradeIdSelected.emit({id:this.gradeId?.valueOf(),selectedGradeId:e})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-grade-select"]],inputs:{options:"options",valueId:"valueId",gradeId:"gradeId",disabled:"disabled",width:"width"},outputs:{gradeIdSelected:"gradeIdSelected"},decls:1,vars:5,consts:[["data-testid","grade-select",3,"valueChange","options","allowEmpty","value","disabled","width"]],template:function(i,n){i&1&&(s(0,"bkd-select",0),_("valueChange",function(u){return n.onGradeChange(u)}),a()),i&2&&m("options",n.options)("allowEmpty",!0)("value",n.valueId)("disabled",n.disabled)("width",n.width)},dependencies:[Fe],encapsulation:2})}}return t})();var Qr=576,Sn=(()=>{class t{constructor(e,i){this.portal=e,this.state=i,this.destroy$=new te,this.handleWindowScroll=()=>{this.updateStickyVisibility(),this.updateStickyTopOffset()},this.handleWindowResize=()=>{this.updateStickyWidth(),this.updateStickyVisibility(),this.updateStickyTopOffset()},this.handleTableScroll=()=>{this.updateStickyLeftOffset()}}ngOnInit(){q([this.state.filteredTests$,this.state.expandedHeader$]).pipe(me(this.destroy$)).subscribe(()=>setTimeout(()=>this.updateStickyWidth()))}ngAfterViewInit(){this.handleWindowScroll(),this.handleTableScroll(),this.handleWindowResize(),this.window.addEventListener("scroll",this.handleWindowScroll),this.getTableScrollContainer()?.addEventListener("scroll",this.handleTableScroll),this.window.addEventListener("resize",this.handleWindowResize)}ngOnDestroy(){this.window.removeEventListener("scroll",this.handleWindowScroll),this.getTableScrollContainer()?.removeEventListener("scroll",this.handleTableScroll),this.window.removeEventListener("resize",this.handleWindowResize)}get window(){return this.portal.window??window}getTableScrollContainer(){return document.querySelector(".table-responsive-wrapper")??null}updateStickyVisibility(){if(this.isSmallBreakpointDown())return;let e=this.inlineHeader.getTop()+this.getIframeScrollY();this.stickyHeader.shown=this.getScrollTop()>e}updateStickyTopOffset(){this.isSmallBreakpointDown()||this.stickyHeader.setTopOffset(this.portal.inIframe?this.getScrollTop():0)}updateStickyLeftOffset(){this.isSmallBreakpointDown()||this.stickyHeader.setLeftOffset(this.inlineHeader.getLeft())}updateStickyWidth(){this.isSmallBreakpointDown()||(this.stickyHeader.setWidth(this.inlineHeader.getWidth()),this.stickyHeader.setColumnWidths(this.inlineHeader.getColumnWidths()),this.stickyHeader.setStickyColumnHeights(this.inlineHeader.getStickyColumnsHeights()))}getScrollTop(){return this.window.scrollY-this.portal.getIframeTop()}getIframeScrollY(){return window.scrollY}isSmallBreakpointDown(){return window.innerWidth({"btn-primary":t,"btn-outline-secondary":d}),xn=(()=>{class t{constructor(){this.filter=Mt,this.filterChange=new Z}showOnlyMine(){this.filterChange.next(D(L({},this.filter),{onlyMine:!0}))}showAll(){this.filterChange.next(D(L({},this.filter),{onlyMine:!1}))}onHidePublishedChange(e){let i=(e.target&&e.target instanceof HTMLInputElement&&e.target?.checked)??!1;this.filterChange.next(D(L({},this.filter),{hidePublished:i}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-test-table-filter"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},decls:13,vars:18,consts:[[1,"only-mine-buttons"],["type","button",1,"btn","desktop",3,"click","ngClass"],["type","button",1,"btn","ms-2","desktop",3,"click","ngClass"],[1,"hide-published"],[1,"form-check"],["id","hide-published","type","checkbox",1,"form-check-input",3,"change","checked"],["for","hide-published",1,"form-check-label"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"button",1),_("click",function(){return n.showAll()}),p(2),l(3,"translate"),a(),s(4,"button",2),_("click",function(){return n.showOnlyMine()}),p(5),l(6,"translate"),a()(),s(7,"div",3)(8,"div",4)(9,"input",5),_("change",function(u){return n.onHidePublishedChange(u)}),a(),s(10,"label",6),p(11),l(12,"translate"),a()()()),i&2&&(r(),m("ngClass",bt(12,bn,!n.filter.onlyMine,n.filter.onlyMine)),r(),v(" ",c(3,6,"tests.all-tests")," "),r(2),m("ngClass",bt(15,bn,n.filter.onlyMine,!n.filter.onlyMine)),r(),v(" ",c(6,8,"tests.owned-tests")," "),r(4),m("checked",n.filter.hidePublished),r(2),v(" ",c(12,10,"tests.hide-published")," "))},dependencies:[oe,$e,k],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:100%}.only-mine-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;height:3.625rem}.hide-published[_ngcontent-%COMP%]{display:flex;align-items:center;height:2.375rem;margin-bottom:1rem}.hide-published[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:300}.hide-published[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{margin-bottom:0}"]})}}return t})();var Zr=["*"],Tn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-preserve-line-height"]],ngContentSelectors:Zr,decls:3,vars:0,template:function(i,n){i&1&&(Nt(),s(0,"div"),Ut(1),p(2,"\xA0"),a())},encapsulation:2})}}return t})();var wn=(()=>{class t{constructor(e){this.translate=e}transform(e){return`${e.Weight} (${e.WeightPercent}%)${this.getPoints(e)}`}getPoints(e){return e.IsPointGrading?`, ${e.MaxPointsAdjusted??e.MaxPoints} ${this.translate.instant("tests.summary.points")}`:""}static{this.\u0275fac=function(i){return new(i||t)(S(ne,16))}}static{this.\u0275pipe=Ht({name:"testSummaryShort",type:t,pure:!0})}}return t})();var es=t=>[t,"edit"];function ts(t,d){t&1&&(s(0,"i",9),p(1,"edit"),a())}function is(t,d){if(t&1&&(s(0,"div",5)(1,"div",7)(2,"bkd-preserve-line-height"),p(3),l(4,"date"),a(),s(5,"a",8),E(6,ts,2,0,"i",9),a()(),s(7,"bkd-preserve-line-height"),p(8),l(9,"testSummaryShort"),a(),s(10,"bkd-preserve-line-height"),p(11),a()()),t&2){let e=h();r(3),f(F(4,5,e.test.Date,"dd.MM.yyyy")),r(2),m("routerLink",G(10,es,e.test.Id)),r(),x(e.test.IsOwner&&e.test.IsPublished===!1?6:-1),r(2),v(" ",c(9,8,e.test)," "),r(3),f(e.test.Owner)}}function ns(t,d){if(t&1){let e=O();s(0,"div",6)(1,"a",10),l(2,"translate"),_("click",function(){T(e);let n=h();return w(n.unpublishTest())}),s(3,"i",11),p(4,"lock"),a(),s(5,"span"),p(6),l(7,"translate"),a()(),s(8,"bkd-caret",12),_("click",function(){T(e);let n=h();return w(n.emitToggleHeader())}),a()()}if(t&2){let e=h();r(),ue("title",c(2,3,"tests.edit")),r(5),f(c(7,5,"tests.published")),r(2),m("expanded",e.expanded)}}function rs(t,d){if(t&1){let e=O();s(0,"div",6)(1,"a",13),l(2,"translate"),_("click",function(){T(e);let n=h();return w(n.publishTest())}),s(3,"i",11),p(4,"lock_open"),a(),s(5,"span"),p(6),l(7,"translate"),a()(),s(8,"bkd-caret",12),_("click",function(){T(e);let n=h();return w(n.emitToggleHeader())}),a()()}if(t&2){let e=h();r(),ue("title",c(2,3,"tests.publish")),r(5),f(c(7,5,"tests.not-published")),r(2),m("expanded",e.expanded)}}var En=(()=>{class t{constructor(){this.toggleHeader=new Z,this.publish=new Z,this.unpublish=new Z}emitToggleHeader(){this.toggleHeader.emit(!this.expanded)}publishTest(){this.publish.emit(this.test)}unpublishTest(){this.unpublish.emit(this.test)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-test-table-header"]],inputs:{test:"test",expanded:"expanded"},outputs:{toggleHeader:"toggleHeader",publish:"publish",unpublish:"unpublish"},decls:9,vars:5,consts:[[1,"d-flex","flex-column","h-100","justify-content-between"],["role","button",1,"test-designation","d-flex","flex-row","my-3","align-items-end","justify-content-between",3,"click"],[3,"ngClass"],[1,"align-self-start",3,"expanded"],[1,"d-flex","flex-column"],[1,"d-flex","flex-column","mb-3"],[1,"d-flex","align-items-center","justify-content-between","test-status"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-link","p-0","edit",3,"routerLink"],[1,"material-icons"],[1,"d-flex","btn","btn-link","ps-0","edit",3,"click","title"],[1,"material-icons","me-1"],[1,"expand-mobile",3,"click","expanded"],[1,"d-flex","btn","btn-link","ps-0",3,"click","title"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"div",1),_("click",function(){return n.emitToggleHeader()}),s(2,"div",2),p(3),a(),b(4,"bkd-caret",3),a(),s(5,"div",4),E(6,is,12,12,"div",5)(7,ns,9,7,"div",6)(8,rs,9,7,"div",6),a()()),i&2&&(r(2),m("ngClass",n.expanded?"expanded":"collapsed"),r(),v(" ",n.test.Designation," "),r(),m("expanded",n.expanded),r(2),x(n.expanded?6:-1),r(),x(n.test.IsPublished?7:8))},dependencies:[oe,hi,Tn,Q,He,k,wn],styles:["[_nghost-%COMP%]{font-weight:300}.collapsed[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.test-designation[_ngcontent-%COMP%]{display:none!important}.test-status[_ngcontent-%COMP%]{order:-1;padding-bottom:1rem}.test-status[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.test-status[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#000}.test-status[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.test-status[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.edit[_ngcontent-%COMP%]{color:#00000080;text-decoration:none}@media (min-width: 811px){.test-designation[_ngcontent-%COMP%]{display:inherit!important}.test-status[_ngcontent-%COMP%]{order:initial}.expand-mobile[_ngcontent-%COMP%]{display:none!important}}"]})}}return t})();var ss=["bkdTestEditGradesHeader",""],Ot=(t,d)=>d.Id,as=t=>({"test-point-grading":t}),os=t=>({selected:t});function ds(t,d){if(t&1){let e=O();s(0,"th",3)(1,"bkd-test-table-header",14),_("toggleHeader",function(n){T(e);let o=h();return w(o.state.toggleHeader(n))})("publish",function(n){T(e);let o=h();return w(o.publish.emit(n))})("unpublish",function(n){T(e);let o=h();return w(o.unpublish.emit(n))}),a()()}if(t&2){let e=d.$implicit,i=h(),n=j(4);m("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),m("test",e)("expanded",n)}}function ls(t,d){if(t&1){let e=O();s(0,"th",4)(1,"bkd-test-table-header",14),_("toggleHeader",function(n){T(e);let o=h();return w(o.state.toggleHeader(n))})("publish",function(n){T(e);let o=h();return w(o.publish.emit(n))})("unpublish",function(n){T(e);let o=h();return w(o.unpublish.emit(n))}),a()()}if(t&2){let e=d.$implicit,i=h(),n=j(4);m("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),m("test",e)("expanded",n)}}function ps(t,d){if(t&1){let e=O();s(0,"div",15)(1,"span",16),_("click",function(){T(e);let n=h().$implicit,o=h();return w(o.state.sortBy(n))}),p(2),l(3,"translate"),a()()}t&2&&(r(2),v("",c(3,1,"tests.points")," "))}function cs(t,d){if(t&1){let e=O();s(0,"th",13)(1,"div",8),E(2,ps,4,3,"div",15),s(3,"div",9)(4,"span",16),_("click",function(){let n=T(e).$implicit,o=h();return w(o.state.sortBy(n))}),p(5),l(6,"translate"),a()(),s(7,"div",10),p(8),l(9,"async"),a()()()}if(t&2){let e=d.$implicit,i=h();m("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(2),x(e.IsPointGrading?2:-1),r(3),f(c(6,4,"tests.grade")),r(3),v(" ",c(9,6,i.state.getSortingChar$(e))," ")}}var kn=(()=>{class t{set shown(e){let i=this.element.nativeElement.classList;e?i.add("shown"):i.remove("shown")}constructor(e,i){this.state=e,this.element=i,this.sticky=!1,this.publish=new Z,this.unpublish=new Z}getTop(){return this.element.nativeElement.getBoundingClientRect().top}getLeft(){return this.element.nativeElement.getBoundingClientRect().left}setTopOffset(e){this.element.nativeElement.style.top=`${e}px`}setLeftOffset(e){this.element.nativeElement.style.left=`${e}px`}getWidth(){return this.element.nativeElement.getBoundingClientRect().width}setWidth(e){this.element.nativeElement.style.width=`${e}px`}getColumnWidths(){return this.getRowsAndColumns().map(e=>e.map(i=>i.getBoundingClientRect().width))}setColumnWidths(e){let i=this.getRowsAndColumns();if(i.length!==e.length||!i.every((n,o)=>n.length===e[o].length))throw new Error("Given column widths do not match number of header rows/columns");i.forEach((n,o)=>n.forEach((u,g)=>{u.style.width=`${e[o][g]}px`,u.style.minWidth=`${e[o][g]}px`}))}getStickyColumnsHeights(){return this.getRowsAndColumns(".sticky").map(e=>e.map(i=>i.getBoundingClientRect().height))}setStickyColumnHeights(e){let i=this.getRowsAndColumns(".sticky");if(i.length!==e.length||!i.every((n,o)=>n.length===e[o].length))throw new Error("Given column heights do not match number of sticky header columns");i.forEach((n,o)=>n.forEach((u,g)=>{u.style.height=`${e[o][g]}px`})),this.getRows().forEach((n,o)=>{let u=e[o].reduce((g,M)=>Math.max(g,M),0);n.style.height=`${u}px`})}getRowsAndColumns(e){return this.getRows().map(i=>Array.from(i.querySelectorAll(`th:not(.header-mobile)${e??""}`)))}getRows(){return Array.from(this.element.nativeElement.querySelectorAll("tr"))}static{this.\u0275fac=function(i){return new(i||t)(S(Y),S(At))}}static{this.\u0275cmp=C({type:t,selectors:[["thead","bkdTestEditGradesHeader",""]],hostVars:2,hostBindings:function(i,n){i&2&&ae("sticky",n.sticky)},inputs:{selectedTest:"selectedTest",sticky:"sticky",shown:"shown"},outputs:{publish:"publish",unpublish:"unpublish"},attrs:ss,decls:42,vars:32,consts:[[1,"header-collapsible"],["colspan","3",1,"desktop","sticky"],[3,"filterChange","filter"],["container","body",1,"test-grade","grade","test-info-desktop",3,"ngClass"],["container","body","colspan","3",1,"test-grade","header-mobile","test-info-mobile",3,"ngClass"],[1,"filler"],[3,"ngClass"],[1,"sticky","student-name",3,"click"],[1,"d-flex"],[1,"column-title"],[1,"sort-direction","ms-1"],[1,"sticky","student-grade","desktop",3,"click","ngClass"],[1,"border-end","sticky","student-average","desktop",3,"click"],["container","body",1,"test-grade",3,"ngClass"],[3,"toggleHeader","publish","unpublish","test","expanded"],[1,"column-title","point-input-container","me-2","me-md-3"],[3,"click"]],template:function(i,n){if(i&1){let o=O();B(0),l(1,"async"),B(2),l(3,"async"),B(4),l(5,"async"),s(6,"tr",0)(7,"th",1)(8,"bkd-test-table-filter",2),_("filterChange",function(g){return T(o),w(n.state.setFilter(g))}),a()(),A(9,ds,2,3,"th",3,Ot),A(11,ls,2,3,"th",4,Ot),b(13,"th",5),a(),s(14,"tr",6)(15,"th",7),_("click",function(){return T(o),w(n.state.sortBy("FullName"))}),s(16,"div",8)(17,"div",9),p(18),l(19,"translate"),a(),s(20,"div",10),p(21),l(22,"async"),a()()(),s(23,"th",11),_("click",function(){return T(o),w(n.state.sortBy("FinalGrade"))}),s(24,"div",8)(25,"div",9),p(26),l(27,"translate"),a(),s(28,"div",10),p(29),l(30,"async"),a()()(),s(31,"th",12),_("click",function(){return T(o),w(n.state.sortBy("TestsMean"))}),s(32,"div",8)(33,"div",9),p(34),l(35,"translate"),a(),s(36,"div",10),p(37),l(38,"async"),a()()(),A(39,cs,10,8,"th",13,Ot),b(41,"th",5),a()}if(i&2){let o=c(1,9,n.state.filteredTests$),u=c(3,11,n.state.filter$);r(4),H(c(5,13,n.state.expandedHeader$)),r(4),m("filter",u),r(),V(o),r(2),V(o),r(3),m("ngClass",G(28,as,n.selectedTest==null?null:n.selectedTest.IsPointGrading)),r(4),v(" ",c(19,16,"tests.student.name")," "),r(3),v(" ",c(22,18,n.state.getSortingChar$("FullName"))," "),r(2),m("ngClass",G(30,os,n.selectedTest===void 0)),r(3),v(" ",c(27,20,"tests.grade")," "),r(3),v(" ",c(30,22,n.state.getSortingChar$("FinalGrade"))," "),r(5),v(" ",c(35,24,"tests.mean")," "),r(3),v(" ",c(38,26,n.state.getSortingChar$("TestsMean"))," "),r(2),V(o)}},dependencies:[z,oe,k,xn,En],styles:["[_nghost-%COMP%]{--spacer: 16px;--point-input-size: 4em;--grade-input-size: 127px;--points-grade-gap: 1rem;--student-name-column-width: 225px;--student-grade-column-width: calc( var(--spacer) + var(--grade-input-size) + var(--spacer) );--student-average-column-width: 100px;--test-grade-column-width: calc( var(--spacer) + var(--point-input-size) + var(--points-grade-gap) + var(--grade-input-size) + var(--spacer) );--student-grade-column-offset: var(--student-name-column-width);--student-average-column-offset: calc( var(--student-grade-column-offset) + var(--student-grade-column-width) );--test-columns-offset: calc( var(--student-average-column-offset) + var(--student-average-column-width) )}@media (min-width: 1000px){[_nghost-%COMP%]{--student-name-column-width: 275px}}@media (max-width: 767.98px){[_nghost-%COMP%]{--points-grade-gap: calc(.5 * var(--spacer))}}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:1rem}td[_ngcontent-%COMP%]{vertical-align:middle}@media (min-width: 576px){[_nghost-%COMP%]{--point-input-size: 5em}}tr[_ngcontent-%COMP%]:not(.header-collapsible) th.test-grade[_ngcontent-%COMP%], td.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}@media (max-width: 810px){tr[_ngcontent-%COMP%]:not(.header-collapsible):not(.test-point-grading) th.test-grade[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]:not(.test-point-grading) th.student-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.test-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.student-grade[_ngcontent-%COMP%]{width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));min-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));max-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer))}}th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{padding:0;width:auto}@media (max-width: 810px){th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{width:0}}th.test-grade[_ngcontent-%COMP%] .column-title.point-input-container[_ngcontent-%COMP%]{width:var(--point-input-size)}@media (max-width: 810px){.desktop[_ngcontent-%COMP%]:not(.selected), .student-grade[_ngcontent-%COMP%]:not(.selected), .student-average[_ngcontent-%COMP%], .test-grade[_ngcontent-%COMP%]:not(.selected){display:none}table[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%], thead[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}th[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]{display:flex;width:100%}.student-name[_ngcontent-%COMP%]{flex:1;display:block;padding-right:0}.test-grade[_ngcontent-%COMP%]{flex:none;display:block}}@media (min-width: 811px){.mobile[_ngcontent-%COMP%]{display:none}.student-name[_ngcontent-%COMP%]{width:var(--student-name-column-width);min-width:var(--student-name-column-width);max-width:var(--student-name-column-width)}.student-grade[_ngcontent-%COMP%]{width:var(--student-grade-column-width);min-width:var(--student-grade-column-width);max-width:var(--student-grade-column-width)}.student-average[_ngcontent-%COMP%]{width:var(--student-average-column-width);min-width:var(--student-average-column-width);max-width:var(--student-average-column-width)}.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}th.sticky[_ngcontent-%COMP%], td.sticky[_ngcontent-%COMP%]{position:sticky;left:0;background-color:#fff}th.sticky.student-grade[_ngcontent-%COMP%], td.sticky.student-grade[_ngcontent-%COMP%]{left:var(--student-grade-column-offset)}th.sticky.student-average[_ngcontent-%COMP%], td.sticky.student-average[_ngcontent-%COMP%]{left:var(--student-average-column-offset)}}@media (max-width: 1200px){[_nghost-%COMP%]{--student-average-column-width: 1px}.student-average[_ngcontent-%COMP%]{padding:0;overflow:hidden}}@media (min-width: 1201px){.student-average-inline[_ngcontent-%COMP%]{display:none}}.sticky[_nghost-%COMP%]{position:fixed;top:0;left:0;z-index:1000;display:none}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-top:none;vertical-align:top}.header-collapsible[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6;padding:0 1rem}tr[_ngcontent-%COMP%] th.test-info-desktop[_ngcontent-%COMP%]{display:none!important}@media (min-width: 811px){.sticky.shown[_nghost-%COMP%]{display:table-header-group}tr[_ngcontent-%COMP%] th.test-info-mobile[_ngcontent-%COMP%]{display:none!important}tr[_ngcontent-%COMP%] th.test-info-desktop[_ngcontent-%COMP%]{display:table-cell!important}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-top:none;padding-top:.25rem;padding-bottom:.25rem;border-top:initial}.sticky[_nghost-%COMP%]{margin-left:var(--test-columns-offset)}.sticky[_nghost-%COMP%] th.sticky[_ngcontent-%COMP%]{position:fixed}}"],changeDetection:0})}}return t})();var ms=(t,d)=>d.student.Id,us=(t,d)=>d.Id,hs=(t,d)=>d.id,gs=t=>({"test-point-grading":t}),In=t=>({selected:t}),fs=t=>["student",t,"grades"],vs=t=>({"visible-on-mobile":t});function Cs(t,d){if(t&1){let e=O();s(0,"bkd-grade-select",19),l(1,"async"),l(2,"async"),_("gradeIdSelected",function(n){T(e);let o=h(2);return w(o.state.overwriteFinalGrade(n))}),a()}if(t&2){let e=h().$implicit,i=h();m("options",c(1,4,i.state.gradingOptionsForCourse$()))("valueId",e.finalGrade.finalGradeId)("gradeId",e.finalGrade.id)("disabled",c(2,6,i.isEditFinalGradesAllowed(e))===!1)}}function _s(t,d){if(t&1&&(s(0,"div"),p(1),a()),t&2){let e=h().$implicit;r(),v(" ",e.finalGrade.freeHandGrade," ")}}function ys(t,d){if(t&1&&(B(0),s(1,"td",11),b(2,"bkd-grade",20),l(3,"async"),a()),t&2){let e=d.$implicit,i=d.$index,n=h(),o=n.$implicit,u=n.$index,g=h(),M=e.grade;r(),m("ngClass",g.selectedTest!==void 0&&M.test.Id===g.selectedTest.Id?"selected":""),r(),m("grade",M)("gradeOptions",c(3,5,g.state.gradingOptionsForTest$(M.test)))("student",o.student)("tabIndex",(1+i)*1e3+u)}}function Ss(t,d){if(t&1&&(s(0,"tr")(1,"td",6)(2,"a",15)(3,"div"),p(4),a(),s(5,"div",8),p(6),l(7,"translate"),l(8,"decimalOrDash"),a()()(),s(9,"td",16),E(10,Cs,3,8,"bkd-grade-select",17)(11,_s,2,1,"div"),a(),s(12,"td",18),p(13),l(14,"decimalOrDash"),a(),A(15,ys,4,7,"td",11,hs),b(17,"td",12),a()),t&2){let e=d.$implicit,i=h();r(2),m("routerLink",G(16,fs,e.student.Id)),r(2),f(e.student.FullName),r(2),St(" ",c(7,8,"tests.mean"),": ",F(8,10,e.finalGrade==null?null:e.finalGrade.average,"1-3")," "),r(3),m("ngClass",G(18,In,i.selectedTest===void 0)),r(),x(e.finalGrade&&!e.finalGrade.freeHandGrade?10:-1),r(),x(e.finalGrade&&e.finalGrade.freeHandGrade?11:-1),r(2),v(" ",F(14,13,e.finalGrade==null?null:e.finalGrade.average,"1-3")," "),r(2),V(i.getGrades(e))}}function bs(t,d){if(t&1&&(s(0,"td",11),b(1,"bkd-average-grades",21),a()),t&2){let e=d.$implicit,i=h();m("ngClass",e.Id===(i.selectedTest==null?null:i.selectedTest.Id)||e.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),r(),m("test",e)}}function xs(t,d){if(t&1){let e=O();s(0,"button",22),_("click",function(){T(e);let n=h();return w(n.setAverageAsFinalGrade())}),p(1),l(2,"translate"),a()}if(t&2){let e=h(),i=j(2);m("ngClass",G(4,vs,!i||!e.selectedTest)),r(),v(" ",c(2,2,"tests.set-final-grade")," ")}}var Pn=(()=>{class t{constructor(e,i){this.state=e,this.modalService=i}ngOnInit(){this.state.setSorting({key:"FullName",ascending:!0})}setAverageAsFinalGrade(){this.state.course$.pipe(re(1)).subscribe(e=>this.state.setAveragesAsFinalGrades({CourseIds:[e.Id]}))}isEditFinalGradesAllowed(e){return this.state.course$.pipe(y(i=>!!(pt(i)?.value&&e.finalGrade?.canGrade)))}getGrades(e){return e.grades.flatMap(i=>({id:`${e.student.Id}-${i.test.Id}`,grade:i}))}publish(e){let i=this.openModal(e);this.onCloseModal(i,()=>this.state.publish(e))}unpublish(e){let i=this.openModal(e);this.onCloseModal(i,()=>this.state.unpublish(e))}calculatePointsAverage(e){return this.safeAverage(e,et)}calculateGradeAverage(e){return this.safeAverage(e,tt)}safeAverage(e,i){try{return i(e).toString()}catch{return"\u2013"}}openModal(e){let i=this.modalService.open(vn);return i.componentInstance.test=e,i}onCloseModal(e,i){e.result.then(n=>{n&&i()},()=>{})}static{this.\u0275fac=function(i){return new(i||t)(S(Y),S(rt))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-test-edit-grades"]],inputs:{selectedTest:"selectedTest"},features:[ie([De])],decls:40,vars:45,consts:[["inlineHeader",""],["stickyHeader",""],[1,"table-responsive-wrapper"],["bkdTestEditGradesHeaderSticky","",1,"table","table-hover","h-100",3,"ngClass","inlineHeader","stickyHeader"],["bkdTestEditGradesHeader","",3,"publish","unpublish","selectedTest"],["bkdTestEditGradesHeader","",3,"publish","unpublish","sticky","selectedTest"],[1,"sticky","student-name"],[1,"d-flex","flex-column"],[1,"student-average-inline"],[1,"desktop","sticky","student-grade",3,"ngClass"],[1,"desktop","border-end","sticky","student-average"],[1,"test-grade",3,"ngClass"],[1,"filler"],[1,"action-buttons"],["data-testId","apply-average-button","type","button",1,"apply-average-button","btn","btn-primary","m-3",3,"ngClass"],[3,"routerLink"],[1,"sticky","student-grade",3,"ngClass"],[3,"options","valueId","gradeId","disabled"],[1,"border-end","sticky","student-average"],[3,"gradeIdSelected","options","valueId","gradeId","disabled"],[3,"grade","gradeOptions","student","tabIndex"],[3,"test"],["data-testId","apply-average-button","type","button",1,"apply-average-button","btn","btn-primary","m-3",3,"click","ngClass"]],template:function(i,n){if(i&1){let o=O();B(0),l(1,"async"),B(2),l(3,"async"),B(4),l(5,"async"),s(6,"div",2)(7,"table",3)(8,"thead",4,0),_("publish",function(g){return T(o),w(n.publish(g))})("unpublish",function(g){return T(o),w(n.unpublish(g))}),a(),s(10,"thead",5,1),_("publish",function(g){return T(o),w(n.publish(g))})("unpublish",function(g){return T(o),w(n.unpublish(g))}),a(),s(12,"tbody"),A(13,Ss,18,20,"tr",null,ms),s(15,"tr")(16,"td",6)(17,"div",7)(18,"div"),p(19),l(20,"translate"),a(),s(21,"div",8),p(22),l(23,"translate"),l(24,"async"),l(25,"decimalOrDash"),a()()(),s(26,"td",9),p(27),l(28,"async"),l(29,"decimalOrDash"),a(),s(30,"td",10),p(31),l(32,"async"),l(33,"decimalOrDash"),a(),A(34,bs,2,2,"td",11,us),b(36,"td",12),a()()(),s(37,"div",13),E(38,xs,3,6,"button",14),l(39,"async"),a()()}if(i&2){let o=he(9),u=he(11),g=c(1,13,n.state.filteredTests$);r(2),H(c(3,15,n.state.hasTests$));let M=c(5,18,n.state.studentGrades$);r(5),m("ngClass",G(41,gs,n.selectedTest==null?null:n.selectedTest.IsPointGrading))("inlineHeader",o)("stickyHeader",u),r(),m("selectedTest",n.selectedTest),r(2),m("sticky",!0)("selectedTest",n.selectedTest),r(3),V(M),r(6),f(c(20,20,"tests.average")),r(3),St(" ",c(23,22,"tests.mean"),": ",F(25,26,c(24,24,n.state.meanOfStudentGradesForCourse$),"1-3")," "),r(4),m("ngClass",G(43,In,n.selectedTest===void 0)),r(),v(" ",F(29,31,c(28,29,n.state.meanOfFinalGradesForCourse$),"1-3")," "),r(4),v(" ",F(33,36,c(32,34,n.state.meanOfStudentGradesForCourse$),"1-3")," "),r(3),V(g),r(4),x(c(39,39,n.state.canSetFinalGrade$)?38:-1)}},dependencies:[oe,Q,yn,Cn,_n,z,k,Ei,Sn,kn],styles:["[_nghost-%COMP%]{--spacer: 16px;--point-input-size: 4em;--grade-input-size: 127px;--points-grade-gap: 1rem;--student-name-column-width: 225px;--student-grade-column-width: calc( var(--spacer) + var(--grade-input-size) + var(--spacer) );--student-average-column-width: 100px;--test-grade-column-width: calc( var(--spacer) + var(--point-input-size) + var(--points-grade-gap) + var(--grade-input-size) + var(--spacer) );--student-grade-column-offset: var(--student-name-column-width);--student-average-column-offset: calc( var(--student-grade-column-offset) + var(--student-grade-column-width) );--test-columns-offset: calc( var(--student-average-column-offset) + var(--student-average-column-width) )}@media (min-width: 1000px){[_nghost-%COMP%]{--student-name-column-width: 275px}}@media (max-width: 767.98px){[_nghost-%COMP%]{--points-grade-gap: calc(.5 * var(--spacer))}}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:1rem}td[_ngcontent-%COMP%]{vertical-align:middle}@media (min-width: 576px){[_nghost-%COMP%]{--point-input-size: 5em}}tr[_ngcontent-%COMP%]:not(.header-collapsible) th.test-grade[_ngcontent-%COMP%], td.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}@media (max-width: 810px){tr[_ngcontent-%COMP%]:not(.header-collapsible):not(.test-point-grading) th.test-grade[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]:not(.test-point-grading) th.student-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.test-grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%]:not(.test-point-grading) td.student-grade[_ngcontent-%COMP%]{width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));min-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer));max-width:calc(var(--spacer) + var(--grade-input-size) + var(--spacer))}}th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{padding:0;width:auto}@media (max-width: 810px){th.filler[_ngcontent-%COMP%], .header-collapsible[_ngcontent-%COMP%] th.filler[_ngcontent-%COMP%], td.filler[_ngcontent-%COMP%]{width:0}}th.test-grade[_ngcontent-%COMP%] .column-title.point-input-container[_ngcontent-%COMP%]{width:var(--point-input-size)}@media (max-width: 810px){.desktop[_ngcontent-%COMP%]:not(.selected), .student-grade[_ngcontent-%COMP%]:not(.selected), .student-average[_ngcontent-%COMP%], .test-grade[_ngcontent-%COMP%]:not(.selected){display:none}table[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%], thead[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}th[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]{display:flex;width:100%}.student-name[_ngcontent-%COMP%]{flex:1;display:block;padding-right:0}.test-grade[_ngcontent-%COMP%]{flex:none;display:block}}@media (min-width: 811px){.mobile[_ngcontent-%COMP%]{display:none}.student-name[_ngcontent-%COMP%]{width:var(--student-name-column-width);min-width:var(--student-name-column-width);max-width:var(--student-name-column-width)}.student-grade[_ngcontent-%COMP%]{width:var(--student-grade-column-width);min-width:var(--student-grade-column-width);max-width:var(--student-grade-column-width)}.student-average[_ngcontent-%COMP%]{width:var(--student-average-column-width);min-width:var(--student-average-column-width);max-width:var(--student-average-column-width)}.test-grade[_ngcontent-%COMP%]{width:var(--test-grade-column-width);min-width:var(--test-grade-column-width);max-width:var(--test-grade-column-width)}th.sticky[_ngcontent-%COMP%], td.sticky[_ngcontent-%COMP%]{position:sticky;left:0;background-color:#fff}th.sticky.student-grade[_ngcontent-%COMP%], td.sticky.student-grade[_ngcontent-%COMP%]{left:var(--student-grade-column-offset)}th.sticky.student-average[_ngcontent-%COMP%], td.sticky.student-average[_ngcontent-%COMP%]{left:var(--student-average-column-offset)}}@media (max-width: 1200px){[_nghost-%COMP%]{--student-average-column-width: 1px}.student-average[_ngcontent-%COMP%]{padding:0;overflow:hidden}}@media (min-width: 1201px){.student-average-inline[_ngcontent-%COMP%]{display:none}}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child{text-decoration:underline}tbody[_ngcontent-%COMP%] td.student-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child:hover{text-decoration-color:#ea161f}.student-average-inline[_ngcontent-%COMP%]{color:#4e4e4ef2;font-size:.875rem;line-height:1}@media (min-width: 811px){.table-responsive-wrapper[_ngcontent-%COMP%]{display:block;overflow-x:auto}table[_ngcontent-%COMP%]{border-collapse:separate;border-spacing:0}.action-buttons[_ngcontent-%COMP%]{position:sticky;left:0}}@media (max-width: 810px){.apply-average-button[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]})}}return t})();var Ts=()=>["/events"],ws=t=>({count:t});function Es(t,d){if(t&1&&(s(0,"div",7),p(1),l(2,"translate"),a()),t&2){let e=h();r(),v(" ",F(2,1,e.course.ParticipatingStudents.length===1?"courses.registration":"courses.registrations",G(4,ws,e.course.ParticipatingStudents.length))," ")}}var Mn=(()=>{class t{constructor(e){this.reportsService=e,this.course$=new W(null),this.reports$=this.course$.pipe(y(i=>i?.Id),X(),$(i=>i?this.reportsService.getCourseTestsReports(i):U([])),Rt([]))}ngOnChanges(e){e.course&&this.course$.next(e.course.currentValue)}getDesignation(){return ct(this.course)}static{this.\u0275fac=function(i){return new(i||t)(S(nt))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-header"]],inputs:{course:"course"},features:[Ee],decls:12,vars:7,consts:[[3,"link"],[1,"d-flex"],["routerLink","add",1,"edit","btn","btn-primary","btn-icon","ms-2"],[1,"material-icons"],[1,"ms-2",3,"reports"],["id","excel-import"],[1,"d-flex","flex-column","header"],[1,"additional-info"]],template:function(i,n){i&1&&(s(0,"bkd-backlink",0)(1,"div",1)(2,"a",2)(3,"i",3),p(4,"add"),a()(),b(5,"bkd-reports-link",4),l(6,"async"),b(7,"div",5),a()(),s(8,"div",6)(9,"h1"),p(10),a(),E(11,Es,3,6,"div",7),a()),i&2&&(m("link",Pe(6,Ts)),r(5),m("reports",c(6,4,n.reports$)),r(5),f(n.getDesignation()),r(),x(n.course.ParticipatingStudents?11:-1))},dependencies:[st,Q,Ze,z,k],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem;border-bottom:1px solid #dee2e6}h1[_ngcontent-%COMP%]{margin-bottom:0}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}"]})}}return t})();var ks=()=>[],Is=t=>({"visible-on-mobile":t});function Ps(t,d){t&1&&b(0,"bkd-spinner")}function Ms(t,d){if(t&1){let e=O();s(0,"bkd-select",4),_("valueChange",function(n){T(e);let o=h(2);return w(n&&o.testSelected(n))}),a(),b(1,"bkd-test-edit-grades",5)}if(t&2){h(2);let e=j(6),i=j(8),n=j(10);m("options",e)("value",i)("allowEmpty",!1),r(),m("selectedTest",n)}}function Os(t,d){t&1&&(s(0,"p",2),p(1),l(2,"translate"),a()),t&2&&(r(),f(c(2,1,"tests.no-tests")))}function $s(t,d){if(t&1&&(s(0,"a",3),l(1,"async"),s(2,"i",6),p(3,"arrow_right_alt"),a(),s(4,"span",7),p(5),l(6,"translate"),a()()),t&2){let e=h(2),i=j(4),n=j(10);ue("href",c(1,3,e.buildLinkToRatingOverview()),Ve),m("ngClass",G(7,Is,!i||!n)),r(5),f(c(6,5,"tests.link-to-rating-overview"))}}function Gs(t,d){if(t&1&&(b(0,"bkd-tests-header",1),E(1,Ms,2,4)(2,Os,3,3,"p",2)(3,$s,7,9,"a",3),l(4,"async")),t&2){let e=h(),i=j(0),n=j(2);m("course",i),r(),x(n.length>0?1:2),r(2),x(c(4,3,e.state.canSetFinalGrade$)?3:-1)}}var On=(()=>{class t{constructor(e,i,n){this.settings=e,this.state=i,this.translate=n,this.selectTest$=new te,this.testOptions$=this.state.tests$.pipe(y(o=>[{Key:-1,Value:this.translate.instant("tests.grade")},...o.map(u=>({Key:u.Id,Value:u.Designation}))]),X()),this.selectedTestId$=je(this.selectTest$,this.state.tests$.pipe(re(1),y(o=>o[0]?.Id))).pipe(X()),this.selectedTest$=this.selectedTestId$.pipe($(o=>this.state.tests$.pipe(y(u=>u.find(g=>g.Id===o)))),X())}testSelected(e){this.selectTest$.next(e)}buildLinkToRatingOverview(){return this.state.course$.pipe(re(1),y(e=>this.settings.eventlist.evaluation.replace(":id",String(e.Id))))}static{this.\u0275fac=function(i){return new(i||t)(S(fe),S(Y),S(ne))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests-list"]],decls:16,vars:22,consts:[[1,"bkd-container"],[3,"course"],[1,"mt-3","px-3"],[1,"rating-overview","d-flex","justify-content-end","pe-3","border-top","pt-3",3,"ngClass","href"],["width","100%",1,"tests-dropdown",3,"valueChange","options","value","allowEmpty"],[3,"selectedTest"],[1,"material-icons","fw-bold"],[1,"ps-1"]],template:function(i,n){if(i&1&&(B(0),l(1,"async"),B(2),l(3,"async"),B(4),l(5,"async"),B(6),l(7,"async"),B(8),l(9,"async"),B(10),l(11,"async"),s(12,"div",0),E(13,Ps,1,0,"bkd-spinner"),l(14,"async"),E(15,Gs,5,5),a()),i&2){let o;H(c(1,1,n.state.course$)),r(2),H((o=c(3,4,n.state.tests$))!==null&&o!==void 0?o:Pe(21,ks)),r(2),H(c(5,7,n.state.hasTests$)),r(2),H(c(7,10,n.testOptions$)),r(2),H(c(9,13,n.selectedTestId$)),r(2),H(c(11,16,n.selectedTest$)),r(3),x(c(14,19,n.state.loading$)?13:15)}},dependencies:[Mn,Fe,Pn,oe,_e,z,k],styles:[".tests-dropdown[_ngcontent-%COMP%]{display:block;padding:1rem 0}@media (min-width: 811px){.tests-dropdown[_ngcontent-%COMP%]{display:none}}a.rating-overview[_ngcontent-%COMP%]{text-decoration:none}a.rating-overview[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}a.rating-overview[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}@media (max-width: 810px){a.rating-overview[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]})}}return t})();var Ct=(()=>{class t{constructor(e,i){this.state=e,this.route=i,this.courseId$=this.route.paramMap.pipe(y(n=>Number(n.get("id"))),X()),this.destroy$=new te}ngOnInit(){this.courseId$.pipe(me(this.destroy$)).subscribe(e=>this.state.setCourseId(e))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(i){return new(i||t)(S(Y),S(de))}}static{this.\u0275cmp=C({type:t,selectors:[["bkd-tests"]],features:[ie([Y])],decls:1,vars:0,template:function(i,n){i&1&&b(0,"router-outlet")},dependencies:[ge],encapsulation:2})}}return t})();function $n(t){return{path:t,component:Zi,children:[{path:"",component:Qi},wt]}}var Pp=[{path:"",component:tn,children:[{path:"",component:en},{path:"current",component:Wi,children:[{path:"",component:Ui},$n(":id")]},{path:":id",component:Ct,children:[{path:"tests",component:On},$n("students")]},{path:":id/tests/:testId/edit",component:Ct,children:[{path:"",component:fn}]},{path:":id/tests/add",component:Ct,children:[{path:"",component:hn}]},{path:":id/tests",children:[wt]}]}];export{ji as a,$n as b,Pp as c}; diff --git a/public/apps/webapp-schulverwaltung/chunk-K4773ZNS.js b/public/apps/webapp-schulverwaltung/chunk-LHXVMKYN.js similarity index 72% rename from public/apps/webapp-schulverwaltung/chunk-K4773ZNS.js rename to public/apps/webapp-schulverwaltung/chunk-LHXVMKYN.js index f4f805de..d8e6204e 100644 --- a/public/apps/webapp-schulverwaltung/chunk-K4773ZNS.js +++ b/public/apps/webapp-schulverwaltung/chunk-LHXVMKYN.js @@ -1 +1 @@ -import{q as l}from"./chunk-U5XSAHDS.js";import{a as y}from"./chunk-5NJNJ42P.js";import{Gc as n,Hc as i,Ld as m,Mc as p,P as o,Uc as d,X as c,_ as s,bd as v,gc as f,kc as u,n as a}from"./chunk-34ZOBT6Z.js";var E=p({Id:i,Designation:n,Leadership:d(n),StudentCount:i}),I=p({Id:i,EventType:n,EventTypeId:i});var M=(()=>{class e extends y{constructor(t,r){super(t,r,E,"Events")}getStudyCourseEvents(){let t=new f().set("filter.EventTypeId","=1");return this.getList({params:t})}getSubscriptionDetailsDefinitions(t){return this.http.get(`${this.baseUrl}/${t}/SubscriptionDetails`).pipe(o(m(l)))}getEventTypeId(t){let r={fields:"Id,EventTypeId,EventType","filter.Id":`=${t}`};return this.http.get(`${this.baseUrl}/`,{params:r}).pipe(o(m(I)),a(b=>b[0]?.EventTypeId??null))}static{this.\u0275fac=function(r){return new(r||e)(s(u),s(v))}}static{this.\u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{M as a}; +import{q as l}from"./chunk-A3CECLYB.js";import{a as y}from"./chunk-PSYDBHTH.js";import{Hc as n,Ic as i,Md as m,Nc as p,P as o,Vc as d,X as c,_ as s,cd as v,hc as f,lc as u,n as a}from"./chunk-2W7IS4PN.js";var E=p({Id:i,Designation:n,Leadership:d(n),StudentCount:i}),I=p({Id:i,EventType:n,EventTypeId:i});var M=(()=>{class e extends y{constructor(t,r){super(t,r,E,"Events")}getStudyCourseEvents(){let t=new f().set("filter.EventTypeId","=1");return this.getList({params:t})}getSubscriptionDetailsDefinitions(t){return this.http.get(`${this.baseUrl}/${t}/SubscriptionDetails`).pipe(o(m(l)))}getEventTypeId(t){let r={fields:"Id,EventTypeId,EventType","filter.Id":`=${t}`};return this.http.get(`${this.baseUrl}/`,{params:r}).pipe(o(m(I)),a(b=>b[0]?.EventTypeId??null))}static{this.\u0275fac=function(r){return new(r||e)(s(u),s(v))}}static{this.\u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{M as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-UPZQ4FTT.js b/public/apps/webapp-schulverwaltung/chunk-OSOXMODN.js similarity index 87% rename from public/apps/webapp-schulverwaltung/chunk-UPZQ4FTT.js rename to public/apps/webapp-schulverwaltung/chunk-OSOXMODN.js index c10a2db4..14d80ce0 100644 --- a/public/apps/webapp-schulverwaltung/chunk-UPZQ4FTT.js +++ b/public/apps/webapp-schulverwaltung/chunk-OSOXMODN.js @@ -1 +1 @@ -import{d as B}from"./chunk-5NJNJ42P.js";import{m as V,n as j,o as z,p as P,q}from"./chunk-JHVNIEZK.js";import{Fa as $,H as w,J as v,Jd as A,K as x,Ma as R,O as k,Oa as S,Pa as m,Qa as U,S as I,Ua as u,X as y,Xa as F,Ya as E,Za as a,_a as l,da as D,db as M,ea as L,f as h,fb as N,gb as s,h as _,n as d,qb as p,r as C,sb as O,va as T,wa as o}from"./chunk-34ZOBT6Z.js";var Z=(e,r)=>r.id;function G(e,r){if(e&1&&(a(0,"a",2)(1,"i",3),p(2,"description"),l()()),e&2){let t=s();U("disabled",t.disableIfUnavailable&&t.reports.length===0),m("href",t.reports.length>0&&t.reports[0].url,T)}}function H(e,r){if(e&1){let t=M();a(0,"button",7),N("click",function(){let i=D(t).$implicit,c=s(2);return L(c.openReport(i))}),p(1),l()}if(e&2){let t=r.$implicit;o(),O(" ",t.title," ")}}function J(e,r){if(e&1&&(a(0,"div",1)(1,"a",4)(2,"i",3),p(3,"description"),l()(),a(4,"div",5),F(5,H,2,1,"button",6,Z),l()()),e&2){let t=s();o(),m("id",t.dropdownId),o(3),S("aria-labelledby",t.dropdownId),o(),E(t.reports)}}var tt=(()=>{class e{constructor(){this.reports=[],this.disableIfUnavailable=!1,this.dropdownId=A("reports-link-dropdown")}openReport(t){window.open(t.url,"_blank")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=$({type:e,selectors:[["bkd-reports-link"]],inputs:{reports:"reports",disableIfUnavailable:"disableIfUnavailable"},decls:2,vars:2,consts:[["target","_blank",1,"btn","btn-primary","btn-icon",3,"href","disabled"],["ngbDropdown","",1,"d-inline-block"],["target","_blank",1,"btn","btn-primary","btn-icon",3,"href"],[1,"material-icons"],["ngbDropdownToggle","",1,"btn","btn-primary","btn-icon","d-flex","align-items-center",3,"id"],["ngbDropdownMenu",""],["ngbDropdownItem",""],["ngbDropdownItem","",3,"click"]],template:function(n,i){n&1&&R(0,G,3,3,"a",0)(1,J,7,2,"div",1),n&2&&(u(i.reports.length===1||i.reports.length===0&&i.disableIfUnavailable?0:-1),o(),u(i.reports.length>1?1:-1))},dependencies:[q,P,z,j,V],styles:["a[_ngcontent-%COMP%]{text-decoration:none;color:#fff}"]})}}return e})();var f="default",rt=(()=>{class e{constructor(){this.action$=new h,this.loadingCounts$=C(this.action$.pipe(x((t,{action:n,context:i})=>{switch(n){case"increment":return t[i]=(t[i]||0)+1,t;case"decrement":return t[i]=Math.max(0,(t[i]||0)-1),t;default:return t}},{}),k({})),{connector:()=>new _(1)}),this.loading$=this.loading(),this.loadingCountsSub=this.loadingCounts$.connect()}ngOnDestroy(){this.loadingCountsSub.unsubscribe()}loading(t=f){return this.loadingCounts$.pipe(d(n=>n[t]),d(K),w())}load(t,n=f){let i=typeof n=="string"?n:n.context||f,c=typeof n=="object"&&n.stopOnFirstValue||!1,b=this.decrementLoadingCount(i),g=!0;function W(){g&&(b(),g=!1)}return t.pipe(B(this.incrementLoadingCount(i)),c?I(W):v(b))}incrementLoadingCount(t){return()=>this.action$.next({action:"increment",context:t})}decrementLoadingCount(t){return()=>this.action$.next({action:"decrement",context:t})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=y({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function K(e){return(e||0)!==0}export{tt as a,rt as b}; +import{d as B}from"./chunk-PSYDBHTH.js";import{m as V,n as j,o as z,p as P,q}from"./chunk-W4U7QKJF.js";import{$a as l,Ga as $,H as w,J as v,K as x,Kd as A,Na as R,O as k,Pa as S,Qa as m,Ra as U,S as I,Va as u,X as y,Ya as F,Za as E,_a as a,ea as D,eb as M,f as h,fa as L,gb as N,h as _,hb as s,n as d,r as C,rb as p,tb as O,wa as T,xa as o}from"./chunk-2W7IS4PN.js";var Z=(e,r)=>r.id;function G(e,r){if(e&1&&(a(0,"a",2)(1,"i",3),p(2,"description"),l()()),e&2){let t=s();U("disabled",t.disableIfUnavailable&&t.reports.length===0),m("href",t.reports.length>0&&t.reports[0].url,T)}}function H(e,r){if(e&1){let t=M();a(0,"button",7),N("click",function(){let i=D(t).$implicit,c=s(2);return L(c.openReport(i))}),p(1),l()}if(e&2){let t=r.$implicit;o(),O(" ",t.title," ")}}function J(e,r){if(e&1&&(a(0,"div",1)(1,"a",4)(2,"i",3),p(3,"description"),l()(),a(4,"div",5),F(5,H,2,1,"button",6,Z),l()()),e&2){let t=s();o(),m("id",t.dropdownId),o(3),S("aria-labelledby",t.dropdownId),o(),E(t.reports)}}var tt=(()=>{class e{constructor(){this.reports=[],this.disableIfUnavailable=!1,this.dropdownId=A("reports-link-dropdown")}openReport(t){window.open(t.url,"_blank")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=$({type:e,selectors:[["bkd-reports-link"]],inputs:{reports:"reports",disableIfUnavailable:"disableIfUnavailable"},decls:2,vars:2,consts:[["target","_blank",1,"btn","btn-primary","btn-icon",3,"href","disabled"],["ngbDropdown","",1,"d-inline-block"],["target","_blank",1,"btn","btn-primary","btn-icon",3,"href"],[1,"material-icons"],["ngbDropdownToggle","",1,"btn","btn-primary","btn-icon","d-flex","align-items-center",3,"id"],["ngbDropdownMenu",""],["ngbDropdownItem",""],["ngbDropdownItem","",3,"click"]],template:function(n,i){n&1&&R(0,G,3,3,"a",0)(1,J,7,2,"div",1),n&2&&(u(i.reports.length===1||i.reports.length===0&&i.disableIfUnavailable?0:-1),o(),u(i.reports.length>1?1:-1))},dependencies:[q,P,z,j,V],styles:["a[_ngcontent-%COMP%]{text-decoration:none;color:#fff}"]})}}return e})();var f="default",rt=(()=>{class e{constructor(){this.action$=new h,this.loadingCounts$=C(this.action$.pipe(x((t,{action:n,context:i})=>{switch(n){case"increment":return t[i]=(t[i]||0)+1,t;case"decrement":return t[i]=Math.max(0,(t[i]||0)-1),t;default:return t}},{}),k({})),{connector:()=>new _(1)}),this.loading$=this.loading(),this.loadingCountsSub=this.loadingCounts$.connect()}ngOnDestroy(){this.loadingCountsSub.unsubscribe()}loading(t=f){return this.loadingCounts$.pipe(d(n=>n[t]),d(K),w())}load(t,n=f){let i=typeof n=="string"?n:n.context||f,c=typeof n=="object"&&n.stopOnFirstValue||!1,b=this.decrementLoadingCount(i),g=!0;function W(){g&&(b(),g=!1)}return t.pipe(B(this.incrementLoadingCount(i)),c?I(W):v(b))}incrementLoadingCount(t){return()=>this.action$.next({action:"increment",context:t})}decrementLoadingCount(t){return()=>this.action$.next({action:"decrement",context:t})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=y({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function K(e){return(e||0)!==0}export{tt as a,rt as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-5NJNJ42P.js b/public/apps/webapp-schulverwaltung/chunk-PSYDBHTH.js similarity index 89% rename from public/apps/webapp-schulverwaltung/chunk-5NJNJ42P.js rename to public/apps/webapp-schulverwaltung/chunk-PSYDBHTH.js index 2e2dd676..e08ee173 100644 --- a/public/apps/webapp-schulverwaltung/chunk-5NJNJ42P.js +++ b/public/apps/webapp-schulverwaltung/chunk-PSYDBHTH.js @@ -1 +1 @@ -import{B as u,E as f,Fa as x,Kd as O,Ld as P,O as s,P as i,U as g,Za as w,_a as C,jc as b,l as a,m as l,n as o,q as h,qb as M,t as m,v as d,w as p}from"./chunk-34ZOBT6Z.js";var _=(()=>{class t{constructor(){}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=x({type:t,selectors:[["bkd-spinner"]],decls:4,vars:0,consts:[[1,"spinner-container"],["role","status",1,"spinner-border"],[1,"visually-hidden"]],template:function(r,c){r&1&&(w(0,"div",0)(1,"div",1)(2,"span",2),M(3,"Loading..."),C()()())},styles:[".spinner-container[_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%]:not(.inline) .spinner-container[_ngcontent-%COMP%]{top:-131px;min-height:200px}.spinner-border[_ngcontent-%COMP%]{width:4rem;height:4rem}[_nghost-%COMP%]:not(.inline) .spinner-border[_ngcontent-%COMP%]{margin-top:100px}.small[_nghost-%COMP%] .spinner-border[_ngcontent-%COMP%]{width:2rem;height:2rem;--bs-spinner-vertical-align: -.2em;--bs-spinner-border-width: .15em}"]})}}return t})();var v=class{constructor(e,n,r,c){this.http=e,this.settings=n,this.codec=r,this.resourcePath=c}get(e,n){return this.http.get(`${this.baseUrl}/${e}`,n).pipe(i(O(this.codec)))}getList(e){return this.http.get(`${this.baseUrl}/`,e).pipe(i(P(this.codec)))}get baseUrl(){return`${this.settings.apiUrl}/${this.resourcePath}`}};function S(t){return u(e=>e instanceof b&&e.status===404?a(t||null):l(()=>e))}function T(t){return e=>h(()=>(t(),e))}function A(t){return e=>e.pipe(o(n=>n??t),f(t))}function H(t,e){return t.pipe(i(n=>e.pipe(s(n),o(()=>n))))}function R(t,e=window.document){return p(...["click","keydown"].map(n=>m(e,n))).pipe(s(null),i(()=>d(t)),o(()=>{}))}function W(t,e){return p(t,e.pipe(g(t),o(([n,r])=>r)))}export{v as a,_ as b,S as c,T as d,A as e,H as f,R as g,W as h}; +import{$a as C,B as u,E as f,Ga as x,Ld as O,Md as P,O as s,P as i,U as g,_a as w,kc as b,l as a,m as l,n as o,q as h,rb as M,t as m,v as d,w as p}from"./chunk-2W7IS4PN.js";var _=(()=>{class t{constructor(){}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=x({type:t,selectors:[["bkd-spinner"]],decls:4,vars:0,consts:[[1,"spinner-container"],["role","status",1,"spinner-border"],[1,"visually-hidden"]],template:function(r,c){r&1&&(w(0,"div",0)(1,"div",1)(2,"span",2),M(3,"Loading..."),C()()())},styles:[".spinner-container[_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%]:not(.inline) .spinner-container[_ngcontent-%COMP%]{top:-131px;min-height:200px}.spinner-border[_ngcontent-%COMP%]{width:4rem;height:4rem}[_nghost-%COMP%]:not(.inline) .spinner-border[_ngcontent-%COMP%]{margin-top:100px}.small[_nghost-%COMP%] .spinner-border[_ngcontent-%COMP%]{width:2rem;height:2rem;--bs-spinner-vertical-align: -.2em;--bs-spinner-border-width: .15em}"]})}}return t})();var v=class{constructor(e,n,r,c){this.http=e,this.settings=n,this.codec=r,this.resourcePath=c}get(e,n){return this.http.get(`${this.baseUrl}/${e}`,n).pipe(i(O(this.codec)))}getList(e){return this.http.get(`${this.baseUrl}/`,e).pipe(i(P(this.codec)))}get baseUrl(){return`${this.settings.apiUrl}/${this.resourcePath}`}};function S(t){return u(e=>e instanceof b&&e.status===404?a(t||null):l(()=>e))}function T(t){return e=>h(()=>(t(),e))}function A(t){return e=>e.pipe(o(n=>n??t),f(t))}function H(t,e){return t.pipe(i(n=>e.pipe(s(n),o(()=>n))))}function R(t,e=window.document){return p(...["click","keydown"].map(n=>m(e,n))).pipe(s(null),i(()=>d(t)),o(()=>{}))}function W(t,e){return p(t,e.pipe(g(t),o(([n,r])=>r)))}export{v as a,_ as b,S as c,T as d,A as e,H as f,R as g,W as h}; diff --git a/public/apps/webapp-schulverwaltung/chunk-ITBCT34A.js b/public/apps/webapp-schulverwaltung/chunk-PUOIWHIP.js similarity index 97% rename from public/apps/webapp-schulverwaltung/chunk-ITBCT34A.js rename to public/apps/webapp-schulverwaltung/chunk-PUOIWHIP.js index ff268cc5..5253dfb9 100644 --- a/public/apps/webapp-schulverwaltung/chunk-ITBCT34A.js +++ b/public/apps/webapp-schulverwaltung/chunk-PUOIWHIP.js @@ -1,2 +1,2 @@ -import{a as Bi}from"./chunk-QXEPYX24.js";import{a as Pi,b as Ni,c as Mi}from"./chunk-X4IBKFGZ.js";import{a as Li}from"./chunk-ETZJYB5I.js";import{a as wi}from"./chunk-4CSFXSJN.js";import{a as xi}from"./chunk-SP6SA4GZ.js";import"./chunk-NOKI2UHM.js";import"./chunk-U5XSAHDS.js";import"./chunk-4GQ5KKE3.js";import{a as ui,b as hi,e as vi}from"./chunk-HAKJPBT5.js";import{a as je}from"./chunk-HAMVO7SX.js";import"./chunk-Y4QYVF5K.js";import"./chunk-UVJXXYOR.js";import{a as Vi}from"./chunk-FNU566LQ.js";import{a as ki}from"./chunk-FFBZO25J.js";import{a as Ai,b as Fi,c as Di}from"./chunk-SVCHNGNX.js";import{e as Ti,f as Si}from"./chunk-UFRLS5GG.js";import"./chunk-DZUR7EKU.js";import{a as yi}from"./chunk-FLVW3H6P.js";import"./chunk-2UDOWYE6.js";import{a as Oi}from"./chunk-ZA3SEXFP.js";import{H as _i,I as at,L as gi,M as ot,N as lt,O as Ae,P as He,Q as bi,g as mi,r as fi,s as rt}from"./chunk-EDO6DY2V.js";import{a as $e,c as st,l as Ci}from"./chunk-PQGQXFEQ.js";import{b as Ii}from"./chunk-UPZQ4FTT.js";import{b as Ei}from"./chunk-5NJNJ42P.js";import{A as pi,h as ri,i as ai,l as oi,y as we}from"./chunk-JHVNIEZK.js";import{a as ci}from"./chunk-LTVWFE76.js";import{$a as L,A as gt,Ab as le,Ad as si,Ba as wt,Bb as Y,Cb as pe,D as bt,Db as Dt,Eb as X,F as ie,Fa as H,Fb as Lt,Ga as At,Gb as Bt,Gc as tt,Ha as W,Hb as Ot,Hc as it,Hd as li,Ib as d,J as Ct,Jb as u,Kb as ne,La as Pe,Ld as di,M as ue,Ma as b,Mb as ce,Mc as Gt,Nd as Re,O as vt,Oa as J,Ob as Pt,Od as me,P as ye,Pa as _,Pb as B,Qa as G,Qb as Ie,R as N,S as Et,Sc as nt,Ta as Ke,Ua as y,Vb as Nt,W as yt,Wa as Se,Wb as Vt,X as Z,Xa as V,Y as Tt,Ya as M,Z as St,Za as l,_ as j,_a as c,_b as Mt,a as be,ab as Ft,ac as et,b as De,bb as kt,bc as ve,bd as he,ca as Te,cb as Ye,cc as Rt,cd as qt,da as v,db as P,dd as Ut,ea as E,ed as zt,f as re,fb as x,g as ze,gb as h,gd as xe,ha as It,hb as Ze,hd as Ve,i as mt,ia as Qe,ib as Je,id as Qt,j as ft,jb as fe,kb as Xe,kc as $t,l as _t,la as F,lb as q,ld as Kt,ma as xt,mb as _e,md as Yt,n as T,nb as k,o as Le,ob as D,od as Zt,pb as U,qa as ae,qb as p,qd as Jt,rb as I,rd as Xt,sb as C,sd as ei,t as Ee,tb as Ce,td as ti,ud as ii,vc as Ne,w as Be,wa as o,wb as z,wc as jt,x as Oe,xa as f,xb as Q,xc as Ht,yb as K,yc as Wt,yd as ni,za as S,zb as oe,zd as Me}from"./chunk-34ZOBT6Z.js";var O=function(t){return t.Absent="absent",t.Dispensation="dispensation",t.HalfDay="half-day",t.Incident="incident",t.Present="present",t}(O||{}),$i=(()=>{class t{constructor(e,i){this.updateService=e,this.settings=i}update(e,i,n,r,a,m){let g=[];switch(n){case O.Present:g=this.createResetBulkRequests(e);break;case O.Absent:g=this.createAbsentEditBulkRequests(e,i,r,a);break;case O.Dispensation:g=this.createEditBulkRequests(e,null,this.settings.dispensationPresenceTypeId);break;case O.HalfDay:g=this.createEditBulkRequests(e,null,this.settings.halfDayPresenceTypeId);break;case O.Incident:g=this.createEditBulkRequests(e,null,m);break}return Le(g).pipe(T(()=>{}))}createAbsentEditBulkRequests(e,i,n,r){return n===this.settings.excusedAbsenceStateId?this.createEditBulkRequests(e,n,r):n===this.settings.unexcusedAbsenceStateId?this.createEditBulkRequests(e,n,this.settings.absencePresenceTypeId):[...this.createEditBulkRequests(e.filter(Ri(i,this.settings)),n,this.settings.absencePresenceTypeId),...this.createEditBulkRequests(e.filter(we(Ri(i,this.settings))),n,null)]}createResetBulkRequests(e){return at(e).map(({lessonIds:i,personIds:n})=>this.updateService.removeLessonPresences(i,n))}createEditBulkRequests(e,i,n){return at(e).map(({lessonIds:r,personIds:a})=>this.updateService.editLessonPresences(r,a,n||void 0,i||void 0))}static{this.\u0275fac=function(i){return new(i||t)(j(bi),j(he))}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Ri(t,s){return e=>{let i=t.find(n=>n.Id===e.TypeRef.Id);return!i||i.Id===s.dispensationPresenceTypeId||i.Id===s.halfDayPresenceTypeId||i.IsIncident}}var te=(()=>{class t extends Fi{constructor(e,i,n,r,a,m,g){super(e,i,n,r,"/edit-absences"),this.lessonPresencesService=a,this.presenceTypesService=m,this.dropDownItemsService=g,this.weekdays$=this.loadWeekdays().pipe(ue(1)),this.presenceTypes$=this.loadPresenceTypes().pipe(ue(1)),this.absenceConfirmationStates$=this.loadAbsenceConfirmationStates().pipe(T(ui),ue(1)),this.presenceControlEntries$=Le([this.entries$,this.presenceTypes$,this.absenceConfirmationStates$]).pipe(T(Ci(Bi)),ue(1)),this.selected=[],this.queryParamsString$.pipe(N(this.destroy$)).subscribe(A=>this.confirmBackLinkParams={returnparams:A})}resetSelection(){this.selected=[]}updateAfterConfirm(){this.resetEntries()}getInitialFilter(){return{student:null,educationalEvent:null,studyClass:null,teacher:null,dateFrom:null,dateTo:null,weekdays:null,presenceTypes:null,confirmationStates:null,incidentTypes:null}}isValidFilter(e){return!!(e.student||e.educationalEvent||e.studyClass||e.teacher||e.dateFrom||e.dateTo||e.weekdays||e.presenceTypes||e.confirmationStates||e.incidentTypes)}loadEntries(e,i,n){let r={sort:"StudentFullName.asc,LessonDateTimeFrom.asc"};return this.loadingService.load(this.lessonPresencesService.getFilteredList(e,n,r),Ai)}buildParamsFromFilter(e){return Pi(e)}loadWeekdays(){return this.loadingService.load(this.dropDownItemsService.getWeekdays())}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.activePresenceTypes$)}loadAbsenceConfirmationStates(){return this.loadingService.load(this.dropDownItemsService.getAbsenceConfirmationStates())}static{this.\u0275fac=function(i){return new(i||t)(j(Vt),j(Ii),j(Di),j(he),j(vi),j(He),j(je))}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})();var fn=(t,s)=>s.Key,ji=(t,s)=>s.Id;function _n(t,s){if(t&1&&(l(0,"div",3),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",ne(2,1,"global.validation-errors."+e.error,e.params)," ")}}function gn(t,s){if(t&1&&(l(0,"option",18),p(1),c()),t&2){let e=s.$implicit;_("ngValue",e.Id),o(),C(" ",e.Designation," ")}}function bn(t,s){if(t&1&&(l(0,"select",17),d(1,"async"),l(2,"option",18),p(3),d(4,"translate"),c(),V(5,gn,2,2,"option",18,ji),d(7,"async"),c()),t&2){let e,i=h(5);G("is-invalid",((e=u(1,4,i.absenceTypeIdErrors$))==null?null:e.length)||!1),o(2),_("ngValue",null),o(),C(" ",u(4,6,"edit-absences.edit.absence-type-placeholder")," "),o(2),M(u(7,8,i.absenceTypes$))}}function Cn(t,s){if(t&1&&(l(0,"div",16),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",ne(2,1,"global.validation-errors."+e.error,e.params)," ")}}function vn(t,s){if(t&1&&(l(0,"div",13),L(1,"input",14),l(2,"label",11),p(3),c(),b(4,bn,8,10,"select",15),V(5,Cn,3,4,"div",16,Se),d(7,"async"),c()),t&2){let e=s.$implicit,i=h(4);o(),_("id","state-"+e.Key)("value",e.Key),o(),fe("for","state-"+e.Key),o(),C(" ",e.Value," "),o(),y(i.isExcused(e)?4:-1),o(),M(u(7,5,i.absenceTypeIdErrors$))}}function En(t,s){if(t&1&&(l(0,"div",12),V(1,vn,8,7,"div",13,fn),c()),t&2){h(3);let e=Y(0);o(),M(e)}}function yn(t,s){if(t&1&&(l(0,"option",18),p(1),c()),t&2){let e=s.$implicit;_("ngValue",e.Id),o(),C(" ",e.Designation," ")}}function Tn(t,s){if(t&1&&(l(0,"div",16),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",ne(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Sn(t,s){if(t&1&&(l(0,"div",12)(1,"select",19),d(2,"async"),l(3,"option",18),p(4),d(5,"translate"),c(),V(6,yn,2,2,"option",18,ji),d(8,"async"),c(),V(9,Tn,3,4,"div",16,Se),d(11,"async"),c()),t&2){let e,i=h(3);o(),G("is-invalid",((e=u(2,4,i.incidentIdErrors$))==null?null:e.length)||!1),o(2),_("ngValue",null),o(),C(" ",u(5,6,"edit-absences.edit.incident-placeholder")," "),o(2),M(u(8,8,i.incidents$)),o(3),M(u(11,10,i.incidentIdErrors$))}}function In(t,s){if(t&1&&(l(0,"div",5),L(1,"input",10),l(2,"label",11),p(3),d(4,"translate"),c(),b(5,En,3,0,"div",12)(6,Sn,12,12,"div",12),c()),t&2){let e=s.$implicit,i=h(2);o(),_("id","category-"+e)("value",e),o(),fe("for","category-"+e),o(),C(" ",u(4,6,"edit-absences.edit.categories."+e)," "),o(2),y(i.isAbsent(e)?5:-1),o(),y(i.isIncident(e)?6:-1)}}function xn(t,s){t&1&&(l(0,"div",9)(1,"span",20),p(2,"Loading..."),c()())}function wn(t,s){if(t&1){let e=P();l(0,"form",2),x("ngSubmit",function(){v(e);let n=h();return E(n.onSubmit())}),V(1,_n,3,4,"div",3,Se),d(3,"async"),l(4,"div",4),V(5,In,7,8,"div",5,Se),c(),l(7,"div",6)(8,"button",7),d(9,"async"),x("click",function(){v(e);let n=h();return E(n.cancel())}),p(10),d(11,"translate"),c(),l(12,"button",8),d(13,"async"),p(14),d(15,"translate"),b(16,xn,3,0,"div",9),d(17,"async"),c()()()}if(t&2){let e=h(),i=Y(2),n=Y(4);_("formGroup",n),o(),M(u(3,6,e.formErrors$)),o(4),M(i),o(3),_("disabled",u(9,8,e.saving$)),o(2),C(" ",u(11,10,"edit-absences.edit.cancel")," "),o(2),_("disabled",u(13,12,e.saving$)),o(2),C(" ",u(15,14,"edit-absences.edit.save")," "),o(2),y(u(17,16,e.saving$)?16:-1)}}var Hi=(()=>{class t{constructor(e,i,n,r,a,m,g,A,ee,R){this.fb=e,this.router=i,this.route=n,this.toastService=r,this.translate=a,this.state=m,this.dropDownItemsService=g,this.presenceTypesService=A,this.updateService=ee,this.settings=R,this.absenceTypes$=this.presenceTypesService.confirmationTypes$,this.incidents$=this.presenceTypesService.incidentTypes$,this.formGroup$=this.createFormGroup(),this.saving$=new ze(!1),this.submitted$=new ze(!1),this.formErrors$=$e(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=$e(this.formGroup$,this.submitted$,"absenceTypeId"),this.incidentIdErrors$=$e(this.formGroup$,this.submitted$,"incidentId"),this.availableCategories=[O.Absent,O.Dispensation,O.HalfDay,O.Incident,O.Present],this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(T(this.sortAbsenceConfirmationStates.bind(this)),ue(1)),this.activeCategories$=this.presenceTypesService.halfDayActive$.pipe(T($=>$?this.availableCategories:this.availableCategories.filter(ge=>ge!==O.HalfDay))),this.destroy$=new re}ngOnInit(){this.state.selected.length===0&&this.navigateBack(),st(this.formGroup$,"category").pipe(N(this.destroy$)).subscribe(this.updateConfirmationValueDisabled.bind(this)),st(this.formGroup$,"confirmationValue").pipe(N(this.destroy$)).subscribe(this.updateAbsenceTypeIdDisabled.bind(this))}ngOnDestroy(){this.destroy$.next()}isAbsent(e){return e===O.Absent}isExcused(e){return e.Key===this.settings.excusedAbsenceStateId}isIncident(e){return e===O.Incident}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(ie(1)).subscribe(e=>{e.valid&&this.save(e)})}cancel(){this.navigateBack()}createFormGroup(){return this.getInitialAbsenceTypeId().pipe(T(e=>this.fb.group({category:[O.Absent,xe.required],confirmationValue:[this.settings.excusedAbsenceStateId,xe.required],absenceTypeId:[e,xe.required],incidentId:[{value:null,disabled:!0},xe.required]})),ue(1))}getInitialAbsenceTypeId(){return this.absenceTypes$.pipe(ie(1),T(e=>{let i=e.map(r=>r.Id),n=li(this.state.selected.map(r=>r.TypeRef.Id));return n.length===1&&n[0]!=null&&i.includes(n[0])?n[0]:null}))}updateConfirmationValueDisabled(){this.formGroup$.pipe(ie(1)).subscribe(e=>{let i=e.get("category"),n=e.get("confirmationValue"),r=e.get("absenceTypeId"),a=e.get("incidentId");i&&n&&r&&a&&(i.value===O.Absent?(n.enable(),this.updateAbsenceTypeIdDisabled()):(n.disable(),r.disable()),i.value===O.Incident?a.enable():a.disable())})}updateAbsenceTypeIdDisabled(){this.formGroup$.pipe(ie(1)).subscribe(e=>{let i=e.get("confirmationValue"),n=e.get("absenceTypeId");i&&n&&(i.value===this.settings.excusedAbsenceStateId?n.enable():n.disable())})}save(e){this.saving$.next(!0);let{category:i,confirmationValue:n,absenceTypeId:r,incidentId:a}=e.value;this.presenceTypesService.presenceTypes$.pipe(ye(m=>this.updateService.update(this.state.selected,m,i,n,r,a)),Ct(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.state.resetSelection(),this.toastService.success(this.translate.instant("edit-absences.edit.save-success")),this.navigateBack(!0)}navigateBack(e){this.route.queryParams.pipe(ie(1)).subscribe(i=>{this.router.navigate(["/edit-absences"],{queryParams:De(be({},yi(i.returnparams)),{reload:e})})})}sortAbsenceConfirmationStates(e){return e.slice().sort((i,n)=>i.Key===this.settings.excusedAbsenceStateId?-1:n.Key===this.settings.excusedAbsenceStateId?1:i.Value.localeCompare(n.Value))}static{this.\u0275fac=function(i){return new(i||t)(f(ni),f(Ht),f(Ne),f(ci),f(Re),f(te),f(je),f(He),f($i),f(he))}}static{this.\u0275cmp=H({type:t,selectors:[["bkd-edit-absences-edit"]],decls:11,vars:13,consts:[[1,"bkd-container","bkd-container-limited"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"alert","alert-danger"],[1,"form-group","pb-4"],[1,"form-check","mt-2","mb-3"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","category",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"ms-5"],[1,"form-check","mt-2","mb-2"],["type","radio","formControlName","confirmationValue",1,"form-check-input",3,"id","value"],["formControlName","absenceTypeId",1,"form-select","mt-1",3,"is-invalid"],[1,"invalid-feedback"],["formControlName","absenceTypeId",1,"form-select","mt-1"],[3,"ngValue"],["formControlName","incidentId",1,"form-select","mt-1"],[1,"visually-hidden"]],template:function(i,n){if(i&1&&(oe(0),d(1,"async"),oe(2),d(3,"async"),oe(4),d(5,"async"),l(6,"h1"),p(7),d(8,"translate"),c(),l(9,"div",0),b(10,wn,18,18,"form",1),c()),i&2){let r=le(u(1,2,n.confirmationStates$));o(2),le(u(3,5,n.activeCategories$)),o(2);let a=le(u(5,8,n.formGroup$));o(3),I(u(8,11,"edit-absences.title")),o(3),y(a&&r?10:-1)}},dependencies:[Me,Yt,ti,ii,zt,ei,Zt,Ve,Qt,si,Jt,Xt,ve,me],encapsulation:2,changeDetection:0})}}return t})();var Ge=(()=>{class t extends _i{static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=It(t)))(n||t)}})()}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})();var Fn=["content"],kn=["scroll"],Dn=["padding"],qi=["*"],ke=t=>({searchTerm:t});function Ln(t,s){if(t&1&&(l(0,"div",3),Ye(1,6),c()),t&2){let e=h();o(),_("ngTemplateOutlet",e.headerTemplate)("ngTemplateOutletContext",X(2,ke,e.filterValue))}}function Bn(t,s){if(t&1&&(l(0,"div",5),Ye(1,6),c()),t&2){let e=h();o(),_("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",X(2,ke,e.filterValue))}}var On=["searchInput"],Pn=["clearButton"],Nn=(t,s,e)=>({item:t,clear:s,label:e}),Vn=(t,s)=>({items:t,clear:s}),Mn=(t,s,e,i)=>({item:t,item$:s,index:e,searchTerm:i});function Rn(t,s){if(t&1&&(l(0,"div",20),p(1),c()),t&2){let e=h(2);o(),I(e.placeholder)}}function $n(t,s){}function jn(t,s){if(t&1&&b(0,Rn,2,1,"ng-template",null,1,ce)(2,$n,0,0,"ng-template",19),t&2){let e=U(1),i=h();o(2),_("ngTemplateOutlet",i.placeholderTemplate||e)}}function Hn(t,s){if(t&1){let e=P();l(0,"span",23),x("click",function(){v(e);let n=h().$implicit,r=h(2);return E(r.unselect(n))}),p(1,"\xD7"),c(),L(2,"span",24)}if(t&2){let e=h().$implicit,i=h(2);o(2),_("ngItemLabel",e.label)("escape",i.escapeHTML)}}function Wn(t,s){}function Gn(t,s){if(t&1&&(l(0,"div",22),b(1,Hn,3,2,"ng-template",null,2,ce)(3,Wn,0,0,"ng-template",12),c()),t&2){let e=s.$implicit,i=U(2),n=h(2);G("ng-value-disabled",e.disabled),o(3),_("ngTemplateOutlet",n.labelTemplate||i)("ngTemplateOutletContext",Bt(4,Nn,e.value,n.clearItem,e.label))}}function qn(t,s){if(t&1&&V(0,Gn,4,8,"div",21,Ke().trackByOption,!0),t&2){let e=h();M(e.selectedItems)}}function Un(t,s){}function zn(t,s){if(t&1&&b(0,Un,0,0,"ng-template",12),t&2){let e=h();_("ngTemplateOutlet",e.multiLabelTemplate)("ngTemplateOutletContext",Lt(2,Vn,e.selectedValues,e.clearItem))}}function Qn(t,s){t&1&&L(0,"div",25)}function Kn(t,s){}function Yn(t,s){if(t&1&&b(0,Qn,1,0,"ng-template",null,3,ce)(2,Kn,0,0,"ng-template",19),t&2){let e=U(1),i=h();o(2),_("ngTemplateOutlet",i.loadingSpinnerTemplate||e)}}function Zn(t,s){if(t&1&&(l(0,"span",15,4)(2,"span",26),p(3,"\xD7"),c()()),t&2){let e=h();fe("title",e.clearAllText)}}function Jn(t,s){if(t&1&&L(0,"span",31),t&2){let e=h().$implicit,i=h(2);_("ngItemLabel",e.label)("escape",i.escapeHTML)}}function Xn(t,s){}function es(t,s){if(t&1){let e=P();l(0,"div",30),x("click",function(){let n=v(e).$implicit,r=h(2);return E(r.toggleItem(n))})("mouseover",function(){let n=v(e).$implicit,r=h(2);return E(r.onItemHover(n))}),b(1,Jn,1,2,"ng-template",null,5,ce)(3,Xn,0,0,"ng-template",12),c()}if(t&2){let e=s.$implicit,i=U(2),n=h(2);G("ng-option-disabled",e.disabled)("ng-option-selected",e.selected)("ng-optgroup",e.children)("ng-option",!e.children)("ng-option-child",!!e.parent)("ng-option-marked",e===n.itemsList.markedItem),J("role",e.children?"group":"option")("aria-selected",e.selected)("id",e==null?null:e.htmlId),o(3),_("ngTemplateOutlet",e.children?n.optgroupTemplate||i:n.optionTemplate||i)("ngTemplateOutletContext",Ot(17,Mn,e.value,e,e.index,n.searchTerm))}}function ts(t,s){if(t&1&&(l(0,"span")(1,"span",33),p(2),c(),p(3),c()),t&2){let e=h(3);o(2),I(e.addTagText),o(),C('"',e.searchTerm,'"')}}function is(t,s){}function ns(t,s){if(t&1){let e=P();l(0,"div",32),x("mouseover",function(){v(e);let n=h(2);return E(n.itemsList.unmarkItem())})("click",function(){v(e);let n=h(2);return E(n.selectTag())}),b(1,ts,4,2,"ng-template",null,6,ce)(3,is,0,0,"ng-template",12),c()}if(t&2){let e=U(2),i=h(2);G("ng-option-marked",!i.itemsList.markedItem),o(3),_("ngTemplateOutlet",i.tagTemplate||e)("ngTemplateOutletContext",X(4,ke,i.searchTerm))}}function ss(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=h(3);o(),I(e.notFoundText)}}function rs(t,s){}function as(t,s){if(t&1&&b(0,ss,2,1,"ng-template",null,7,ce)(2,rs,0,0,"ng-template",12),t&2){let e=U(1),i=h(2);o(2),_("ngTemplateOutlet",i.notFoundTemplate||e)("ngTemplateOutletContext",X(2,ke,i.searchTerm))}}function os(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=h(3);o(),I(e.typeToSearchText)}}function ls(t,s){}function cs(t,s){if(t&1&&b(0,os,2,1,"ng-template",null,8,ce)(2,ls,0,0,"ng-template",19),t&2){let e=U(1),i=h(2);o(2),_("ngTemplateOutlet",i.typeToSearchTemplate||e)}}function ds(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=h(3);o(),I(e.loadingText)}}function us(t,s){}function ps(t,s){if(t&1&&b(0,ds,2,1,"ng-template",null,9,ce)(2,us,0,0,"ng-template",12),t&2){let e=U(1),i=h(2);o(2),_("ngTemplateOutlet",i.loadingTextTemplate||e)("ngTemplateOutletContext",X(2,ke,i.searchTerm))}}function hs(t,s){if(t&1){let e=P();l(0,"ng-dropdown-panel",27),x("update",function(n){v(e);let r=h();return E(r.viewPortItems=n)})("scroll",function(n){v(e);let r=h();return E(r.scroll.emit(n))})("scrollToEnd",function(n){v(e);let r=h();return E(r.scrollToEnd.emit(n))})("outsideClick",function(){v(e);let n=h();return E(n.close())}),Ft(1),V(2,es,4,22,"div",28,Ke().trackByOption,!0),b(4,ns,4,6,"div",29),kt(),b(5,as,3,4)(6,cs,3,1)(7,ps,3,4),c()}if(t&2){let e=h();G("ng-select-multiple",e.multiple),_("virtualScroll",e.virtualScroll)("bufferAmount",e.bufferAmount)("appendTo",e.appendTo)("position",e.dropdownPosition)("headerTemplate",e.headerTemplate)("footerTemplate",e.footerTemplate)("filterValue",e.searchTerm)("items",e.itemsList.filteredItems)("markedItem",e.itemsList.markedItem)("ngClass",e.appendTo?e.ngClass?e.ngClass:e.classes:null)("id",e.dropdownId),J("aria-label",e.ariaLabelDropdown),o(2),M(e.viewPortItems),o(2),y(e.showAddTag?4:-1),o(),y(e.showNoItemsFound()?5:-1),o(),y(e.showTypeToSearch()?6:-1),o(),y(e.loading&&e.itemsList.filteredItems.length===0?7:-1)}}var Ui=/[&<>"']/g,ms=RegExp(Ui.source),fs={"&":"&","<":"<",">":">",'"':""","'":"'"};function _s(t){return t&&ms.test(t)?t.replace(Ui,s=>fs[s]):t}function w(t){return t!=null}function Fe(t){return typeof t=="object"&&w(t)}function gs(t){return t instanceof Promise}function Ue(t){return t instanceof Function}var bs=(()=>{class t{constructor(e){this.element=e,this.escape=!0}ngOnChanges(e){this.element.nativeElement.innerHTML=this.escape?_s(this.ngItemLabel):this.ngItemLabel}static{this.\u0275fac=function(i){return new(i||t)(f(ae))}}static{this.\u0275dir=W({type:t,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[Te]})}}return t})(),ut=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-option-tmp",""]]})}}return t})(),pt=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-optgroup-tmp",""]]})}}return t})(),Cs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-label-tmp",""]]})}}return t})(),ht=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-multi-label-tmp",""]]})}}return t})(),vs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-header-tmp",""]]})}}return t})(),Es=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-footer-tmp",""]]})}}return t})(),ys=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-notfound-tmp",""]]})}}return t})(),Ts=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-placeholder-tmp",""]]})}}return t})(),Ss=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-typetosearch-tmp",""]]})}}return t})(),Is=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-loadingtext-tmp",""]]})}}return t})(),xs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-tag-tmp",""]]})}}return t})(),ws=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-loadingspinner-tmp",""]]})}}return t})();function zi(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(Math.random()*16|0).toString(16))}var As={"\u24B6":"A",\uFF21:"A",\u00C0:"A",\u00C1:"A",\u00C2:"A",\u1EA6:"A",\u1EA4:"A",\u1EAA:"A",\u1EA8:"A",\u00C3:"A",\u0100:"A",\u0102:"A",\u1EB0:"A",\u1EAE:"A",\u1EB4:"A",\u1EB2:"A",\u0226:"A",\u01E0:"A",\u00C4:"A",\u01DE:"A",\u1EA2:"A",\u00C5:"A",\u01FA:"A",\u01CD:"A",\u0200:"A",\u0202:"A",\u1EA0:"A",\u1EAC:"A",\u1EB6:"A",\u1E00:"A",\u0104:"A","\u023A":"A","\u2C6F":"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B",\uFF22:"B",\u1E02:"B",\u1E04:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0181:"B","\u24B8":"C",\uFF23:"C",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0187:"C","\u023B":"C","\uA73E":"C","\u24B9":"D",\uFF24:"D",\u1E0A:"D",\u010E:"D",\u1E0C:"D",\u1E10:"D",\u1E12:"D",\u1E0E:"D",\u0110:"D",\u018B:"D",\u018A:"D",\u0189:"D","\uA779":"D",\u01F1:"DZ",\u01C4:"DZ",\u01F2:"Dz",\u01C5:"Dz","\u24BA":"E",\uFF25:"E",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u1EC0:"E",\u1EBE:"E",\u1EC4:"E",\u1EC2:"E",\u1EBC:"E",\u0112:"E",\u1E14:"E",\u1E16:"E",\u0114:"E",\u0116:"E",\u00CB:"E",\u1EBA:"E",\u011A:"E",\u0204:"E",\u0206:"E",\u1EB8:"E",\u1EC6:"E",\u0228:"E",\u1E1C:"E",\u0118:"E",\u1E18:"E",\u1E1A:"E",\u0190:"E",\u018E:"E","\u24BB":"F",\uFF26:"F",\u1E1E:"F",\u0191:"F","\uA77B":"F","\u24BC":"G",\uFF27:"G",\u01F4:"G",\u011C:"G",\u1E20:"G",\u011E:"G",\u0120:"G",\u01E6:"G",\u0122:"G",\u01E4:"G",\u0193:"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H",\uFF28:"H",\u0124:"H",\u1E22:"H",\u1E26:"H",\u021E:"H",\u1E24:"H",\u1E28:"H",\u1E2A:"H",\u0126:"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I",\uFF29:"I",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u0128:"I",\u012A:"I",\u012C:"I",\u0130:"I",\u00CF:"I",\u1E2E:"I",\u1EC8:"I",\u01CF:"I",\u0208:"I",\u020A:"I",\u1ECA:"I",\u012E:"I",\u1E2C:"I",\u0197:"I","\u24BF":"J",\uFF2A:"J",\u0134:"J","\u0248":"J","\u24C0":"K",\uFF2B:"K",\u1E30:"K",\u01E8:"K",\u1E32:"K",\u0136:"K",\u1E34:"K",\u0198:"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L",\uFF2C:"L",\u013F:"L",\u0139:"L",\u013D:"L",\u1E36:"L",\u1E38:"L",\u013B:"L",\u1E3C:"L",\u1E3A:"L",\u0141:"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L",\u01C7:"LJ",\u01C8:"Lj","\u24C2":"M",\uFF2D:"M",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u019C:"M","\u24C3":"N",\uFF2E:"N",\u01F8:"N",\u0143:"N",\u00D1:"N",\u1E44:"N",\u0147:"N",\u1E46:"N",\u0145:"N",\u1E4A:"N",\u1E48:"N","\u0220":"N",\u019D:"N","\uA790":"N","\uA7A4":"N",\u01CA:"NJ",\u01CB:"Nj","\u24C4":"O",\uFF2F:"O",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u1ED2:"O",\u1ED0:"O",\u1ED6:"O",\u1ED4:"O",\u00D5:"O",\u1E4C:"O",\u022C:"O",\u1E4E:"O",\u014C:"O",\u1E50:"O",\u1E52:"O",\u014E:"O",\u022E:"O",\u0230:"O",\u00D6:"O",\u022A:"O",\u1ECE:"O",\u0150:"O",\u01D1:"O",\u020C:"O",\u020E:"O",\u01A0:"O",\u1EDC:"O",\u1EDA:"O",\u1EE0:"O",\u1EDE:"O",\u1EE2:"O",\u1ECC:"O",\u1ED8:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u0186:"O",\u019F:"O","\uA74A":"O","\uA74C":"O",\u01A2:"OI","\uA74E":"OO",\u0222:"OU","\u24C5":"P",\uFF30:"P",\u1E54:"P",\u1E56:"P",\u01A4:"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q",\uFF31:"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R",\uFF32:"R",\u0154:"R",\u1E58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1E5A:"R",\u1E5C:"R",\u0156:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S",\uFF33:"S","\u1E9E":"S",\u015A:"S",\u1E64:"S",\u015C:"S",\u1E60:"S",\u0160:"S",\u1E66:"S",\u1E62:"S",\u1E68:"S",\u0218:"S",\u015E:"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T",\uFF34:"T",\u1E6A:"T",\u0164:"T",\u1E6C:"T",\u021A:"T",\u0162:"T",\u1E70:"T",\u1E6E:"T",\u0166:"T",\u01AC:"T",\u01AE:"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U",\uFF35:"U",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u0168:"U",\u1E78:"U",\u016A:"U",\u1E7A:"U",\u016C:"U",\u00DC:"U",\u01DB:"U",\u01D7:"U",\u01D5:"U",\u01D9:"U",\u1EE6:"U",\u016E:"U",\u0170:"U",\u01D3:"U",\u0214:"U",\u0216:"U",\u01AF:"U",\u1EEA:"U",\u1EE8:"U",\u1EEE:"U",\u1EEC:"U",\u1EF0:"U",\u1EE4:"U",\u1E72:"U",\u0172:"U",\u1E76:"U",\u1E74:"U","\u0244":"U","\u24CB":"V",\uFF36:"V",\u1E7C:"V",\u1E7E:"V",\u01B2:"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W",\uFF37:"W",\u1E80:"W",\u1E82:"W",\u0174:"W",\u1E86:"W",\u1E84:"W",\u1E88:"W","\u2C72":"W","\u24CD":"X",\uFF38:"X",\u1E8A:"X",\u1E8C:"X","\u24CE":"Y",\uFF39:"Y",\u1EF2:"Y",\u00DD:"Y",\u0176:"Y",\u1EF8:"Y",\u0232:"Y",\u1E8E:"Y",\u0178:"Y",\u1EF6:"Y",\u1EF4:"Y",\u01B3:"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z",\uFF3A:"Z",\u0179:"Z",\u1E90:"Z",\u017B:"Z",\u017D:"Z",\u1E92:"Z",\u1E94:"Z",\u01B5:"Z",\u0224:"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a",\uFF41:"a",\u1E9A:"a",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u1EA7:"a",\u1EA5:"a",\u1EAB:"a",\u1EA9:"a",\u00E3:"a",\u0101:"a",\u0103:"a",\u1EB1:"a",\u1EAF:"a",\u1EB5:"a",\u1EB3:"a",\u0227:"a",\u01E1:"a",\u00E4:"a",\u01DF:"a",\u1EA3:"a",\u00E5:"a",\u01FB:"a",\u01CE:"a",\u0201:"a",\u0203:"a",\u1EA1:"a",\u1EAD:"a",\u1EB7:"a",\u1E01:"a",\u0105:"a","\u2C65":"a",\u0250:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b",\uFF42:"b",\u1E03:"b",\u1E05:"b",\u1E07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24D2":"c",\uFF43:"c",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0188:"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d",\uFF44:"d",\u1E0B:"d",\u010F:"d",\u1E0D:"d",\u1E11:"d",\u1E13:"d",\u1E0F:"d",\u0111:"d",\u018C:"d",\u0256:"d",\u0257:"d","\uA77A":"d",\u01F3:"dz",\u01C6:"dz","\u24D4":"e",\uFF45:"e",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u1EC1:"e",\u1EBF:"e",\u1EC5:"e",\u1EC3:"e",\u1EBD:"e",\u0113:"e",\u1E15:"e",\u1E17:"e",\u0115:"e",\u0117:"e",\u00EB:"e",\u1EBB:"e",\u011B:"e",\u0205:"e",\u0207:"e",\u1EB9:"e",\u1EC7:"e",\u0229:"e",\u1E1D:"e",\u0119:"e",\u1E19:"e",\u1E1B:"e","\u0247":"e",\u025B:"e",\u01DD:"e","\u24D5":"f",\uFF46:"f",\u1E1F:"f",\u0192:"f","\uA77C":"f","\u24D6":"g",\uFF47:"g",\u01F5:"g",\u011D:"g",\u1E21:"g",\u011F:"g",\u0121:"g",\u01E7:"g",\u0123:"g",\u01E5:"g",\u0260:"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h",\uFF48:"h",\u0125:"h",\u1E23:"h",\u1E27:"h",\u021F:"h",\u1E25:"h",\u1E29:"h",\u1E2B:"h",\u1E96:"h",\u0127:"h","\u2C68":"h","\u2C76":"h",\u0265:"h",\u0195:"hv","\u24D8":"i",\uFF49:"i",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u0129:"i",\u012B:"i",\u012D:"i",\u00EF:"i",\u1E2F:"i",\u1EC9:"i",\u01D0:"i",\u0209:"i",\u020B:"i",\u1ECB:"i",\u012F:"i",\u1E2D:"i",\u0268:"i",\u0131:"i","\u24D9":"j",\uFF4A:"j",\u0135:"j",\u01F0:"j","\u0249":"j","\u24DA":"k",\uFF4B:"k",\u1E31:"k",\u01E9:"k",\u1E33:"k",\u0137:"k",\u1E35:"k",\u0199:"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l",\uFF4C:"l",\u0140:"l",\u013A:"l",\u013E:"l",\u1E37:"l",\u1E39:"l",\u013C:"l",\u1E3D:"l",\u1E3B:"l",\u017F:"l",\u0142:"l",\u019A:"l",\u026B:"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l",\u01C9:"lj","\u24DC":"m",\uFF4D:"m",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m",\u026F:"m","\u24DD":"n",\uFF4E:"n",\u01F9:"n",\u0144:"n",\u00F1:"n",\u1E45:"n",\u0148:"n",\u1E47:"n",\u0146:"n",\u1E4B:"n",\u1E49:"n",\u019E:"n",\u0272:"n",\u0149:"n","\uA791":"n","\uA7A5":"n",\u01CC:"nj","\u24DE":"o",\uFF4F:"o",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u1ED3:"o",\u1ED1:"o",\u1ED7:"o",\u1ED5:"o",\u00F5:"o",\u1E4D:"o",\u022D:"o",\u1E4F:"o",\u014D:"o",\u1E51:"o",\u1E53:"o",\u014F:"o",\u022F:"o",\u0231:"o",\u00F6:"o",\u022B:"o",\u1ECF:"o",\u0151:"o",\u01D2:"o",\u020D:"o",\u020F:"o",\u01A1:"o",\u1EDD:"o",\u1EDB:"o",\u1EE1:"o",\u1EDF:"o",\u1EE3:"o",\u1ECD:"o",\u1ED9:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u0254:"o","\uA74B":"o","\uA74D":"o",\u0275:"o",\u01A3:"oi",\u0223:"ou","\uA74F":"oo","\u24DF":"p",\uFF50:"p",\u1E55:"p",\u1E57:"p",\u01A5:"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q",\uFF51:"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r",\uFF52:"r",\u0155:"r",\u1E59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1E5B:"r",\u1E5D:"r",\u0157:"r",\u1E5F:"r","\u024D":"r",\u027D:"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s",\uFF53:"s",\u00DF:"s",\u015B:"s",\u1E65:"s",\u015D:"s",\u1E61:"s",\u0161:"s",\u1E67:"s",\u1E63:"s",\u1E69:"s",\u0219:"s",\u015F:"s","\u023F":"s","\uA7A9":"s","\uA785":"s",\u1E9B:"s","\u24E3":"t",\uFF54:"t",\u1E6B:"t",\u1E97:"t",\u0165:"t",\u1E6D:"t",\u021B:"t",\u0163:"t",\u1E71:"t",\u1E6F:"t",\u0167:"t",\u01AD:"t",\u0288:"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u",\uFF55:"u",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u0169:"u",\u1E79:"u",\u016B:"u",\u1E7B:"u",\u016D:"u",\u00FC:"u",\u01DC:"u",\u01D8:"u",\u01D6:"u",\u01DA:"u",\u1EE7:"u",\u016F:"u",\u0171:"u",\u01D4:"u",\u0215:"u",\u0217:"u",\u01B0:"u",\u1EEB:"u",\u1EE9:"u",\u1EEF:"u",\u1EED:"u",\u1EF1:"u",\u1EE5:"u",\u1E73:"u",\u0173:"u",\u1E77:"u",\u1E75:"u",\u0289:"u","\u24E5":"v",\uFF56:"v",\u1E7D:"v",\u1E7F:"v",\u028B:"v","\uA75F":"v",\u028C:"v","\uA761":"vy","\u24E6":"w",\uFF57:"w",\u1E81:"w",\u1E83:"w",\u0175:"w",\u1E87:"w",\u1E85:"w",\u1E98:"w",\u1E89:"w","\u2C73":"w","\u24E7":"x",\uFF58:"x",\u1E8B:"x",\u1E8D:"x","\u24E8":"y",\uFF59:"y",\u1EF3:"y",\u00FD:"y",\u0177:"y",\u1EF9:"y",\u0233:"y",\u1E8F:"y",\u00FF:"y",\u1EF7:"y",\u1E99:"y",\u1EF5:"y",\u01B4:"y","\u024F":"y","\u1EFF":"y","\u24E9":"z",\uFF5A:"z",\u017A:"z",\u1E91:"z",\u017C:"z",\u017E:"z",\u1E93:"z",\u1E95:"z",\u01B6:"z",\u0225:"z","\u0240":"z","\u2C6C":"z","\uA763":"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038A:"\u0399",\u03AA:"\u0399",\u038C:"\u039F",\u038E:"\u03A5",\u03AB:"\u03A5",\u038F:"\u03A9",\u03AC:"\u03B1",\u03AD:"\u03B5",\u03AE:"\u03B7",\u03AF:"\u03B9",\u03CA:"\u03B9",\u0390:"\u03B9",\u03CC:"\u03BF",\u03CD:"\u03C5",\u03CB:"\u03C5",\u03B0:"\u03C5",\u03C9:"\u03C9",\u03C2:"\u03C3"};function qe(t){let s=e=>As[e]||e;return t.replace(/[^\u0000-\u007E]/g,s)}var ct=class{constructor(s,e){this._ngSelect=s,this._selectionModel=e,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length}get lastSelectedItem(){let s=this.selectedItems.length-1;for(;s>=0;s--){let e=this.selectedItems[s];if(!e.disabled)return e}return null}setItems(s){this._items=s.map((e,i)=>this.mapItem(e,i)),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(s){if(s.selected||this.maxItemsSelected)return;let e=this._ngSelect.multiple;e||this.clearSelected(),this._selectionModel.select(s,e,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(s)}unselect(s){s.selected&&(this._selectionModel.unselect(s,this._ngSelect.multiple),this._ngSelect.hideSelected&&w(s.index)&&this._ngSelect.multiple&&this._showSelected(s))}findItem(s){let e;return this._ngSelect.compareWith?e=i=>this._ngSelect.compareWith(i.value,s):this._ngSelect.bindValue?e=i=>!i.children&&this.resolveNested(i.value,this._ngSelect.bindValue)===s:e=i=>i.value===s||!i.children&&i.label&&i.label===this.resolveNested(s,this._ngSelect.bindLabel),this._items.find(i=>e(i))}addItem(s){let e=this.mapItem(s,this._items.length);return this._items.push(e),this._filteredItems.push(e),e}clearSelected(s=!1){this._selectionModel.clear(s),this._items.forEach(e=>{e.selected=s&&e.selected&&e.disabled,e.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(s){return s=qe(s).toLocaleLowerCase(),this.filteredItems.find(e=>qe(e.label).toLocaleLowerCase().substr(0,s.length)===s)}filter(s){if(!s){this.resetFilteredItems();return}this._filteredItems=[],s=this._ngSelect.searchFn?s:qe(s).toLocaleLowerCase();let e=this._ngSelect.searchFn||this._defaultSearchFn,i=this._ngSelect.hideSelected;for(let n of Array.from(this._groups.keys())){let r=[];for(let a of this._groups.get(n)){if(i&&(a.parent&&a.parent.selected||a.selected))continue;let m=this._ngSelect.searchFn?a.value:a;e(s,m)&&r.push(a)}if(r.length>0){let[a]=r.slice(-1);if(a.parent){let m=this._items.find(g=>g===a.parent);this._filteredItems.push(m)}this._filteredItems.push(...r)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._ngSelect.hideSelected&&this.selectedItems.length>0?this._filteredItems=this._items.filter(s=>!s.selected):this._filteredItems=this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(s){this._markedIndex=this._filteredItems.indexOf(s)}markSelectedOrDefault(s){if(this._filteredItems.length===0)return;let e=this._getLastMarkedIndex();e>-1?this._markedIndex=e:this._markedIndex=s?this.filteredItems.findIndex(i=>!i.disabled):-1}resolveNested(s,e){if(!Fe(s))return s;if(e.indexOf(".")===-1)return s[e];{let i=e.split("."),n=s;for(let r=0,a=i.length;rthis.selectedItems.indexOf(e)===-1))}_showSelected(s){if(this._filteredItems.push(s),s.parent){let e=s.parent;this._filteredItems.find(n=>n===e)||this._filteredItems.push(e)}else if(s.children)for(let e of s.children)e.selected=!1,this._filteredItems.push(e);this._filteredItems=[...this._filteredItems.sort((e,i)=>e.index-i.index)]}_hideSelected(s){this._filteredItems=this._filteredItems.filter(e=>e!==s),s.parent?s.parent.children.every(i=>i.selected)&&(this._filteredItems=this._filteredItems.filter(i=>i!==s.parent)):s.children&&(this._filteredItems=this.filteredItems.filter(e=>e.parent!==s))}_defaultSearchFn(s,e){return qe(e.label).toLocaleLowerCase().indexOf(s)>-1}_getNextItemIndex(s){return s>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(s){this._filteredItems.length===0||this._filteredItems.every(e=>e.disabled)||(this._markedIndex=this._getNextItemIndex(s),this.markedItem.disabled&&this._stepToItem(s))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&this.markedItem===void 0)return-1;let s=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&s<0?-1:Math.max(this.markedIndex,s)}_groupBy(s,e){let i=new Map;if(s.length===0)return i;if(Array.isArray(s[0].value[e])){for(let a of s){let m=(a.value[e]||[]).map((g,A)=>this.mapItem(g,A));i.set(a,m)}return i}let n=Ue(this._ngSelect.groupBy),r=a=>{let m=n?e(a.value):a.value[e];return w(m)?m:void 0};for(let a of s){let m=r(a),g=i.get(m);g?g.push(a):i.set(m,[a])}return i}_flatten(s){let e=Ue(this._ngSelect.groupBy),i=[];for(let n of Array.from(s.keys())){let r=i.length;if(n===void 0){let R=s.get(void 0)||[];i.push(...R.map($=>($.index=r++,$)));continue}let a=Fe(n),m={label:a?"":String(n),children:void 0,parent:null,index:r++,disabled:!this._ngSelect.selectableGroup,htmlId:zi()},g=e?this._ngSelect.bindLabel:this._ngSelect.groupBy,A=this._ngSelect.groupValue||(()=>a?n.value:{[g]:n}),ee=s.get(n).map(R=>(R.parent=m,R.children=void 0,R.index=r++,R));m.children=ee,m.value=A(n,ee.map(R=>R.value)),i.push(m),i.push(...ee)}return i}},Qi=(()=>{class t{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(e,i,n){let r=this._dimensions,a=r.itemHeight*i,g=Math.max(0,e)/a*i,A=Math.min(i,Math.ceil(g)+(r.itemsPerViewport+1)),R=Math.max(0,A-r.itemsPerViewport),$=Math.min(R,Math.floor(g)),ge=r.itemHeight*Math.ceil($)-r.itemHeight*Math.min($,n);return ge=isNaN(ge)?0:ge,$=isNaN($)?-1:$,A=isNaN(A)?-1:A,$-=n,$=Math.max(0,$),A+=n,A=Math.min(i,A),{topPadding:ge,scrollHeight:a,start:$,end:A}}setDimensions(e,i){let n=Math.max(1,Math.floor(i/e));this._dimensions={itemHeight:e,panelHeight:i,itemsPerViewport:n}}getScrollTo(e,i,n){let{panelHeight:r}=this.dimensions,a=e+i,m=n,g=m+r;return r>=a&&n===e?null:a>g?m+a-g:e<=m?e:null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})(),Wi=["top","right","bottom","left"],Fs=typeof requestAnimationFrame<"u"?ft:mt,Gi=(()=>{class t{constructor(e,i,n,r,a){this._renderer=e,this._zone=i,this._panelService=n,this._document=a,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new F,this.scroll=new F,this.scrollToEnd=new F,this.outsideClick=new F,this._destroy$=new re,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=r.nativeElement}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(e){e!==this._itemsLength&&(this._itemsLength=e,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem){let{itemHeight:e,panelHeight:i}=this._panelService.dimensions,n=this.markedItem.index*e;return i>n?0:n}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._virtualPadding=this.paddingElementRef.nativeElement,this._scrollablePanel=this.scrollElementRef.nativeElement,this._contentPanel=this.contentElementRef.nativeElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener()}ngOnChanges(e){if(e.items){let i=e.items;this._onItemsChange(i.currentValue,i.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(e,i=!1){if(!e)return;let n=this.items.indexOf(e);if(n<0||n>=this.itemsLength)return;let r;if(this.virtualScroll){let a=this._panelService.dimensions.itemHeight;r=this._panelService.getScrollTo(n*a,a,this._lastScrollPosition)}else{let a=this._dropdown.querySelector(`#${e.htmlId}`),m=i?a.offsetTop:this._lastScrollPosition;r=this._panelService.getScrollTo(a.offsetTop,a.clientHeight,m)}w(r)&&(this._scrollablePanel.scrollTop=r)}scrollToTag(){let e=this._scrollablePanel;e.scrollTop=e.scrollHeight-e.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),Wi.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(e){Wi.forEach(n=>{let r=`ng-select-${n}`;this._renderer.removeClass(this._dropdown,r),this._renderer.removeClass(this._select,r)});let i=`ng-select-${e}`;this._renderer.addClass(this._dropdown,i),this._renderer.addClass(this._select,i)}_handleScroll(){this._zone.runOutsideAngular(()=>{Ee(this.scrollElementRef.nativeElement,"scroll").pipe(N(this._destroy$),gt(0,Fs)).subscribe(e=>{let i=e.path||e.composedPath&&e.composedPath();if(!i||i.length===0&&!e.target)return;let n=!i||i.length===0?e.target.scrollTop:i[0].scrollTop;this._onContentScrolled(n)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{Be(Ee(this._document,"touchstart",{capture:!0}),Ee(this._document,"click",{capture:!0})).pipe(N(this._destroy$)).subscribe(e=>this._checkToClose(e))})}_checkToClose(e){if(this._select.contains(e.target)||this._dropdown.contains(e.target))return;let i=e.path||e.composedPath&&e.composedPath();e.target&&e.target.shadowRoot&&i&&i[0]&&this._select.contains(i[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(e,i){this.items=e||[],this._scrollToEndFired=!1,this.itemsLength=e.length,this.virtualScroll?this._updateItemsRange(i):(this._setVirtualHeight(),this._updateItems(i))}_updateItems(e){this.update.emit(this.items),e!==!1&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{let i=this._scrollablePanel.clientHeight;this._panelService.setDimensions(0,i),this._handleDropdownPosition(),this.scrollTo(this.markedItem,e)})})}_updateItemsRange(e){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{e?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(e){this.virtualScroll&&this._renderItemsRange(e),this._lastScrollPosition=e,this._fireScrollToEnd(e)}_updateVirtualHeight(e){this._updateScrollHeight&&(this._virtualPadding.style.height=`${e}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding&&(this._virtualPadding.style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(e=null){if(e&&this._lastScrollPosition===e)return;e=e||this._scrollablePanel.scrollTop;let i=this._panelService.calculateItems(e,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(i.scrollHeight),this._contentPanel.style.transform=`translateY(${i.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(i.start,i.end)),this.scroll.emit({start:i.start,end:i.end})}),w(e)&&this._lastScrollPosition===0&&(this._scrollablePanel.scrollTop=e,this._lastScrollPosition=e)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||this.itemsLength===0)return Promise.resolve(this._panelService.dimensions);let[e]=this.items;return this.update.emit([e]),Promise.resolve().then(()=>{let n=this._dropdown.querySelector(`#${e.htmlId}`).clientHeight;this._virtualPadding.style.height=`${n*this.itemsLength}px`;let r=this._scrollablePanel.clientHeight;return this._panelService.setDimensions(n,r),this._panelService.dimensions})}_fireScrollToEnd(e){if(this._scrollToEndFired||e===0)return;let i=this.virtualScroll?this._virtualPadding:this._contentPanel;e+this._dropdown.clientHeight>=i.clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(e){if(this.position!=="auto")return this.position;let i=this._select.getBoundingClientRect(),n=document.documentElement.scrollTop||document.body.scrollTop,r=i.top+window.pageYOffset,a=i.height,m=e.getBoundingClientRect().height;return r+a+m>n+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo){if(this._parent=document.querySelector(this.appendTo),!this._parent)throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){let e=this._select.getBoundingClientRect(),i=this._parent.getBoundingClientRect(),n=e.left-i.left;this._dropdown.style.left=n+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"}_updateYPosition(){let e=this._select.getBoundingClientRect(),i=this._parent.getBoundingClientRect(),n=e.height;if(this._currentPosition==="top"){let r=i.bottom-e.bottom;this._dropdown.style.bottom=r+n+"px",this._dropdown.style.top="auto"}else if(this._currentPosition==="bottom"){let r=e.top-i.top;this._dropdown.style.top=r+n+"px",this._dropdown.style.bottom="auto"}}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{Ee(this._dropdown,"mousedown").pipe(N(this._destroy$)).subscribe(e=>{e.target.tagName!=="INPUT"&&e.preventDefault()})})}static{this.\u0275fac=function(i){return new(i||t)(f(wt),f(xt),f(Qi),f(ae),f(Nt,8))}}static{this.\u0275cmp=H({type:t,selectors:[["ng-dropdown-panel"]],viewQuery:function(i,n){if(i&1&&(_e(Fn,7,ae),_e(kn,7,ae),_e(Dn,7,ae)),i&2){let r;k(r=D())&&(n.contentElementRef=r.first),k(r=D())&&(n.scrollElementRef=r.first),k(r=D())&&(n.paddingElementRef=r.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:[2,"virtualScroll","virtualScroll",B],headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[Pe,Te],ngContentSelectors:qi,decls:9,vars:6,consts:[["scroll",""],["padding",""],["content",""],[1,"ng-dropdown-header"],["role","listbox",1,"ng-dropdown-panel-items","scroll-host"],[1,"ng-dropdown-footer"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,n){i&1&&(Ze(),b(0,Ln,2,4,"div",3),l(1,"div",4,0),L(3,"div",null,1),l(5,"div",null,2),Je(7),c()(),b(8,Bn,2,4,"div",5)),i&2&&(y(n.headerTemplate?0:-1),o(3),G("total-padding",n.virtualScroll),o(2),G("scrollable-content",n.virtualScroll&&n.items.length),o(3),y(n.footerTemplate?8:-1))},dependencies:[et],encapsulation:2,changeDetection:0})}}return t})(),ks=(()=>{class t{constructor(e){this.elementRef=e,this.disabled=!1,this.stateChange$=new re}get label(){return(this.elementRef.nativeElement.textContent||"").trim()}ngOnChanges(e){e.disabled&&this.stateChange$.next({value:this.value,disabled:this.disabled})}ngAfterViewChecked(){this.label!==this._previousLabel&&(this._previousLabel=this.label,this.stateChange$.next({value:this.value,disabled:this.disabled,label:this.elementRef.nativeElement.innerHTML}))}ngOnDestroy(){this.stateChange$.complete()}static{this.\u0275fac=function(i){return new(i||t)(f(ae))}}static{this.\u0275cmp=H({type:t,selectors:[["ng-option"]],inputs:{value:"value",disabled:[2,"disabled","disabled",B]},features:[Pe,Te],ngContentSelectors:qi,decls:1,vars:0,template:function(i,n){i&1&&(Ze(),Je(0))},encapsulation:2,changeDetection:0})}}return t})(),se=function(t){return t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Esc=27]="Esc",t[t.Space=32]="Space",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowDown=40]="ArrowDown",t[t.Backspace=8]="Backspace",t}(se||{});function Ki(){return new dt}var dt=class{constructor(){this._selected=[]}get value(){return this._selected}select(s,e,i){if(s.selected=!0,(!s.children||!e&&i)&&this._selected.push(s),e)if(s.parent){let n=s.parent.children.length,r=s.parent.children.filter(a=>a.selected).length;s.parent.selected=n===r}else s.children&&(this._setChildrenSelectedState(s.children,!0),this._removeChildren(s),i&&this._activeChildren(s)?this._selected=[...this._selected.filter(n=>n.parent!==s),s]:this._selected=[...this._selected,...s.children.filter(n=>!n.disabled)])}unselect(s,e){if(this._selected=this._selected.filter(i=>i!==s),s.selected=!1,e)if(s.parent&&s.parent.selected){let i=s.parent.children;this._removeParent(s.parent),this._removeChildren(s.parent),this._selected.push(...i.filter(n=>n!==s&&!n.disabled)),s.parent.selected=!1}else s.children&&(this._setChildrenSelectedState(s.children,!1),this._removeChildren(s))}clear(s){this._selected=s?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(s,e){for(let i of s)i.disabled||(i.selected=e)}_removeChildren(s){this._selected=[...this._selected.filter(e=>e.parent!==s),...s.children.filter(e=>e.parent===s&&e.disabled&&e.selected)]}_removeParent(s){this._selected=this._selected.filter(e=>e!==s)}_activeChildren(s){return s.children.every(e=>!e.disabled||e.selected)}},Ds=(()=>{class t{constructor(){this.fixedPlaceholder=!0,this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Ls=(()=>{class t{warn(e){console.warn(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Yi=new St("ng-select-selection-model"),Zi=(()=>{class t{constructor(e,i,n,r,a,m,g){this.classes=e,this.autoFocus=i,this.config=n,this._cd=m,this._console=g,this.ariaLabelDropdown="Options List",this.markFirst=!0,this.fixedPlaceholder=!0,this.preventToggleOnRightClick=!1,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.trackByFn=null,this.clearOnBackspace=!0,this.labelForId=null,this.inputAttrs={},this.readonly=!1,this.searchWhileComposing=!0,this.minTermLength=0,this.editableSearchTerm=!1,this.ngClass=null,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new F,this.focusEvent=new F,this.changeEvent=new F,this.openEvent=new F,this.closeEvent=new F,this.searchEvent=new F,this.clearEvent=new F,this.addEvent=new F,this.removeEvent=new F,this.scroll=new F,this.scrollToEnd=new F,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=zi(),this.escapeHTML=!0,this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new re,this._keyPress$=new re,this._items=[],this.keyDownFn=A=>!0,this.clearItem=A=>{let ee=this.selectedItems.find(R=>R.value===A);this.unselect(ee)},this.trackByOption=(A,ee)=>this.trackByFn?this.trackByFn(ee.value):ee,this._onChange=A=>{},this._onTouched=()=>{},this._mergeGlobalConfig(n),this.itemsList=new ct(this,r?r():Ki()),this.element=a.nativeElement}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get items(){return this._items}set items(e){this._itemsAreUsed=!0,this._items=e??[]}get disabled(){return this.readonly||this._disabled}get compareWith(){return this._compareWith}set compareWith(e){if(e!=null&&!Ue(e))throw Error("`compareWith` must be a function.");this._compareWith=e}get clearSearchOnAdd(){return w(this._clearSearchOnAdd)?this._clearSearchOnAdd:w(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(e){this._clearSearchOnAdd=e}get deselectOnClick(){return w(this._deselectOnClick)?this._deselectOnClick:w(this.config.deselectOnClick)?this.config.deselectOnClick:this.multiple}set deselectOnClick(e){this._deselectOnClick=e}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(e=>e.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel)return this.dropdownPanel.currentPosition}get showAddTag(){if(!this._validTerm)return!1;let e=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(i=>i.label.toLowerCase()===e)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(i=>i.label.toLowerCase()===e))&&!this.loading}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}get _isTypeahead(){return this.typeahead&&this.typeahead.observers.length>0}get _validTerm(){let e=this.searchTerm&&this.searchTerm.trim();return e&&e.length>=this.minTermLength}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(e){e.multiple&&this.itemsList.clearSelected(),e.items&&this._setItems(e.items.currentValue||[]),e.isOpen&&(this._manualOpen=w(e.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),w(this.autoFocus)&&this.focus()}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}handleKeyDown(e){if(se[e.which]){if(this.keyDownFn(e)===!1)return;this.handleKeyCode(e)}else e.key&&e.key.length===1&&this._keyPress$.next(e.key.toLocaleLowerCase())}handleKeyCode(e){let i=e.target;this.clearButton&&this.clearButton.nativeElement===i?this.handleKeyCodeClear(e):this.handleKeyCodeInput(e)}handleKeyCodeInput(e){switch(e.which){case se.ArrowDown:this._handleArrowDown(e);break;case se.ArrowUp:this._handleArrowUp(e);break;case se.Space:this._handleSpace(e);break;case se.Enter:this._handleEnter(e);break;case se.Tab:this._handleTab(e);break;case se.Esc:this.close(),e.preventDefault();break;case se.Backspace:this._handleBackspace();break}}handleKeyCodeClear(e){switch(e.which){case se.Enter:this.handleClearClick(),e.preventDefault();break}}handleMousedown(e){if(this.preventToggleOnRightClick&&e.button===2)return!1;let i=e.target;if(i.tagName!=="INPUT"&&e.preventDefault(),i.classList.contains("ng-clear-wrapper")){this.handleClearClick();return}if(i.classList.contains("ng-arrow-wrapper")){this.handleArrowClick();return}i.classList.contains("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle())}handleArrowClick(){this.isOpen?this.close():this.open()}handleClearClick(){this.hasValue&&(this.itemsList.clearSelected(!0),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())}writeValue(e){this.itemsList.clearSelected(),this._handleWriteValue(e),this._cd.markForCheck()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._disabled=e,this._cd.markForCheck()}toggle(){this.isOpen?this.close():this.open()}open(){this.disabled||this.isOpen||this._manualOpen||!this._isTypeahead&&!this.addTag&&this.itemsList.noItemsToSelect||(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen||this._manualOpen||(this.isOpen=!1,this._isComposing=!1,this._editableSearchTerm?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())}toggleItem(e){!e||e.disabled||this.disabled||(this.deselectOnClick&&e.selected?this.unselect(e):this.select(e),this._editableSearchTerm&&this._setSearchTermFromItems())}select(e){e.selected||(this.itemsList.select(e),this.clearSearchOnAdd&&!this._editableSearchTerm&&this._clearSearch(),this._updateNgModel(),this.multiple&&this.addEvent.emit(e.value)),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close(),this._onSelectionChanged()}focus(){this.searchInput.nativeElement.focus()}blur(){this.searchInput.nativeElement.blur()}unselect(e){e&&(this.itemsList.unselect(e),this.focus(),this._updateNgModel(),this.removeEvent.emit(e.value),this._onSelectionChanged())}selectTag(){let e;Ue(this.addTag)?e=this.addTag(this.searchTerm):e=this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};let i=n=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(n,null):this.itemsList.addItem(n);gs(e)?e.then(n=>this.select(i(n))).catch(()=>{}):e&&this.select(i(e))}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}focusOnClear(){this.blur(),this.clearButton&&this.clearButton.nativeElement.focus()}showNoItemsFound(){let e=this.itemsList.filteredItems.length===0;return(e&&!this._isTypeahead&&!this.loading||e&&this._isTypeahead&&this._validTerm&&!this.loading)&&!this.showAddTag}showTypeToSearch(){return this.itemsList.filteredItems.length===0&&this._isTypeahead&&!this._validTerm&&!this.loading}onCompositionStart(){this._isComposing=!0}onCompositionEnd(e){this._isComposing=!1,!this.searchWhileComposing&&this.filter(e)}filter(e){this._isComposing&&!this.searchWhileComposing||(this.searchTerm=e,this._isTypeahead&&(this._validTerm||this.minTermLength===0)&&this.typeahead.next(e),this._isTypeahead||(this.itemsList.filter(this.searchTerm),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit({term:e,items:this.itemsList.filteredItems.map(i=>i.value)}),this.open())}onInputFocus(e){this.focused||(this._editableSearchTerm&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(e),this.focused=!0)}onInputBlur(e){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(e),!this.isOpen&&!this.disabled&&this._onTouched(),this._editableSearchTerm&&this._setSearchTermFromItems(),this.focused=!1}onItemHover(e){e.disabled||this.itemsList.markItem(e)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){let e=this.selectedItems&&this.selectedItems[0];this.searchTerm=e&&e.label||null}_setItems(e){let i=e[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=w(i)?!Fe(i):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(e),e.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&w(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){let e=n=>{this.items=n.map(r=>({$ngOptionValue:r.value,$ngOptionLabel:r.elementRef.nativeElement.innerHTML,disabled:r.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},i=()=>{let n=Be(this.ngOptions.changes,this._destroy$);Be(...this.ngOptions.map(r=>r.stateChange$)).pipe(N(n)).subscribe(r=>{let a=this.itemsList.findItem(r.value);a.disabled=r.disabled,a.label=r.label||a.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe(vt(this.ngOptions),N(this._destroy$)).subscribe(n=>{this.bindLabel=this._defaultLabel,e(n),i()})}_isValidWriteValue(e){if(!w(e)||this.multiple&&e===""||Array.isArray(e)&&e.length===0)return!1;let i=n=>!w(this.compareWith)&&Fe(n)&&this.bindValue?(this._console.warn(`Setting object(${JSON.stringify(n)}) as your model with bindValue is not allowed unless [compareWith] is used.`),!1):!0;return this.multiple?Array.isArray(e)?e.every(n=>i(n)):(this._console.warn("Multiple select ngModel should be array."),!1):i(e)}_handleWriteValue(e){if(!this._isValidWriteValue(e))return;let i=n=>{let r=this.itemsList.findItem(n);if(r)this.itemsList.select(r);else{let a=Fe(n),m=!a&&!this.bindValue;a||m?this.itemsList.select(this.itemsList.mapItem(n,null)):this.bindValue&&(r={[this.bindLabel]:null,[this.bindValue]:n},this.itemsList.select(this.itemsList.mapItem(r,null)))}};this.multiple?e.forEach(n=>i(n)):i(e)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe(N(this._destroy$),Et(e=>this._pressedKeys.push(e)),bt(200),Oe(()=>this._pressedKeys.length>0),T(()=>this._pressedKeys.join(""))).subscribe(e=>{let i=this.itemsList.findByLabel(e);i&&(this.isOpen?(this.itemsList.markItem(i),this._scrollToMarked(),this._cd.markForCheck()):this.select(i)),this._pressedKeys=[]})}_setInputAttributes(){let e=this.searchInput.nativeElement,i=be({type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId},this.inputAttrs);for(let n of Object.keys(i))e.setAttribute(n,i[n])}_updateNgModel(){let e=[];for(let n of this.selectedItems)if(this.bindValue){let r=null;if(n.children){let a=this.groupValue?this.bindValue:this.groupBy;r=n.value[a||this.groupBy]}else r=this.itemsList.resolveNested(n.value,this.bindValue);e.push(r)}else e.push(n.value);let i=this.selectedItems.map(n=>n.value);this.multiple?(this._onChange(e),this.changeEvent.emit(i)):(this._onChange(w(e[0])?e[0]:null),this.changeEvent.emit(i[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(e){this.searchTerm=e,this._isTypeahead&&this.typeahead.next(e)}_scrollToMarked(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollToTag()}_onSelectionChanged(){this.isOpen&&this.deselectOnClick&&this.appendTo&&(this._cd.detectChanges(),this.dropdownPanel.adjustPosition())}_handleTab(e){if(this.isOpen===!1){if(this.showClear()&&!e.shiftKey)this.focusOnClear(),e.preventDefault();else if(!this.addTag)return}this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),e.preventDefault()):this.showAddTag?(this.selectTag(),e.preventDefault()):this.close():this.close()}_handleEnter(e){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else if(this.openOnEnter)this.open();else return;e.preventDefault()}_handleSpace(e){this.isOpen||this._manualOpen||(this.open(),e.preventDefault())}_handleArrowDown(e){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),e.preventDefault()}_handleArrowUp(e){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),e.preventDefault())}_nextItemIsTag(e){let i=this.itemsList.markedIndex+e;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(i<0||i===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}_mergeGlobalConfig(e){this.placeholder=this.placeholder||e.placeholder,this.fixedPlaceholder=this.fixedPlaceholder||e.fixedPlaceholder,this.notFoundText=this.notFoundText||e.notFoundText,this.typeToSearchText=this.typeToSearchText||e.typeToSearchText,this.addTagText=this.addTagText||e.addTagText,this.loadingText=this.loadingText||e.loadingText,this.clearAllText=this.clearAllText||e.clearAllText,this.virtualScroll=w(this.virtualScroll)?this.virtualScroll:w(e.disableVirtualScroll)?!e.disableVirtualScroll:!1,this.openOnEnter=w(this.openOnEnter)?this.openOnEnter:e.openOnEnter,this.appendTo=this.appendTo||e.appendTo,this.bindValue=this.bindValue||e.bindValue,this.bindLabel=this.bindLabel||e.bindLabel,this.appearance=this.appearance||e.appearance}static{this.\u0275fac=function(i){return new(i||t)(Qe("class"),Qe("autofocus"),f(Ds),f(Yi,8),f(ae),f(Pt),f(Ls))}}static{this.\u0275cmp=H({type:t,selectors:[["ng-select"]],contentQueries:function(i,n,r){if(i&1&&(q(r,ut,5,S),q(r,pt,5,S),q(r,Cs,5,S),q(r,ht,5,S),q(r,vs,5,S),q(r,Es,5,S),q(r,ys,5,S),q(r,Ts,5,S),q(r,Ss,5,S),q(r,Is,5,S),q(r,xs,5,S),q(r,ws,5,S),q(r,ks,5)),i&2){let a;k(a=D())&&(n.optionTemplate=a.first),k(a=D())&&(n.optgroupTemplate=a.first),k(a=D())&&(n.labelTemplate=a.first),k(a=D())&&(n.multiLabelTemplate=a.first),k(a=D())&&(n.headerTemplate=a.first),k(a=D())&&(n.footerTemplate=a.first),k(a=D())&&(n.notFoundTemplate=a.first),k(a=D())&&(n.placeholderTemplate=a.first),k(a=D())&&(n.typeToSearchTemplate=a.first),k(a=D())&&(n.loadingTextTemplate=a.first),k(a=D())&&(n.tagTemplate=a.first),k(a=D())&&(n.loadingSpinnerTemplate=a.first),k(a=D())&&(n.ngOptions=a)}},viewQuery:function(i,n){if(i&1&&(_e(Gi,5),_e(On,7),_e(Pn,5)),i&2){let r;k(r=D())&&(n.dropdownPanel=r.first),k(r=D())&&(n.searchInput=r.first),k(r=D())&&(n.clearButton=r.first)}},hostVars:20,hostBindings:function(i,n){i&1&&x("keydown",function(a){return n.handleKeyDown(a)}),i&2&&G("ng-select-typeahead",n.typeahead)("ng-select-multiple",n.multiple)("ng-select-taggable",n.addTag)("ng-select-searchable",n.searchable)("ng-select-clearable",n.clearable)("ng-select-opened",n.isOpen)("ng-select",n.useDefaultClass)("ng-select-filtered",n.filtered)("ng-select-single",n.single)("ng-select-disabled",n.disabled)},inputs:{ariaLabelDropdown:"ariaLabelDropdown",bindLabel:"bindLabel",bindValue:"bindValue",ariaLabel:"ariaLabel",markFirst:[2,"markFirst","markFirst",B],placeholder:"placeholder",fixedPlaceholder:"fixedPlaceholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",preventToggleOnRightClick:"preventToggleOnRightClick",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:[2,"loading","loading",B],closeOnSelect:[2,"closeOnSelect","closeOnSelect",B],hideSelected:[2,"hideSelected","hideSelected",B],selectOnTab:[2,"selectOnTab","selectOnTab",B],openOnEnter:[2,"openOnEnter","openOnEnter",B],maxSelectedItems:[2,"maxSelectedItems","maxSelectedItems",Ie],groupBy:"groupBy",groupValue:"groupValue",bufferAmount:[2,"bufferAmount","bufferAmount",Ie],virtualScroll:[2,"virtualScroll","virtualScroll",B],selectableGroup:[2,"selectableGroup","selectableGroup",B],selectableGroupAsModel:[2,"selectableGroupAsModel","selectableGroupAsModel",B],searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:[2,"clearOnBackspace","clearOnBackspace",B],labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:[2,"tabIndex","tabIndex",Ie],readonly:[2,"readonly","readonly",B],searchWhileComposing:[2,"searchWhileComposing","searchWhileComposing",B],minTermLength:[2,"minTermLength","minTermLength",Ie],editableSearchTerm:[2,"editableSearchTerm","editableSearchTerm",B],ngClass:"ngClass",typeahead:"typeahead",multiple:[2,"multiple","multiple",B],addTag:"addTag",searchable:[2,"searchable","searchable",B],clearable:[2,"clearable","clearable",B],isOpen:"isOpen",items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd",deselectOnClick:"deselectOnClick",keyDownFn:"keyDownFn"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[pe([{provide:qt,useExisting:yt(()=>t),multi:!0},Qi]),Pe,Te],decls:13,vars:19,consts:[["searchInput",""],["defaultPlaceholderTemplate",""],["defaultLabelTemplate",""],["defaultLoadingSpinnerTemplate",""],["clearButton",""],["defaultOptionTemplate",""],["defaultTagTemplate",""],["defaultNotFoundTemplate",""],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""],[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng-input"],["aria-autocomplete","list","role","combobox",3,"blur","change","compositionend","compositionstart","focus","input","disabled","readOnly","value"],["role","button","tabindex","0",1,"ng-clear-wrapper",3,"title"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["role","listbox",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id"],[3,"ngTemplateOutlet"],[1,"ng-placeholder"],[1,"ng-value",3,"ng-value-disabled"],[1,"ng-value"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],[1,"ng-spinner-loader"],["aria-hidden","true",1,"ng-clear"],["role","listbox",1,"ng-dropdown-panel",3,"update","scroll","scrollToEnd","outsideClick","virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ngClass","id"],[1,"ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked"],["role","option",1,"ng-option",3,"ng-option-marked"],[1,"ng-option",3,"click","mouseover"],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],[1,"ng-tag-label"],[1,"ng-option","ng-option-disabled"]],template:function(i,n){if(i&1){let r=P();l(0,"div",10),x("mousedown",function(m){return v(r),E(n.handleMousedown(m))}),l(1,"div",11),b(2,jn,3,1)(3,qn,2,0)(4,zn,1,5,null,12),l(5,"div",13)(6,"input",14,0),x("blur",function(m){return v(r),E(n.onInputBlur(m))})("change",function(m){return v(r),E(m.stopPropagation())})("compositionend",function(){v(r);let m=U(7);return E(n.onCompositionEnd(m.value))})("compositionstart",function(){return v(r),E(n.onCompositionStart())})("focus",function(m){return v(r),E(n.onInputFocus(m))})("input",function(){v(r);let m=U(7);return E(n.filter(m.value))}),c()()(),b(8,Yn,3,1)(9,Zn,4,1,"span",15),l(10,"span",16),L(11,"span",17),c()(),b(12,hs,8,18,"ng-dropdown-panel",18)}i&2&&(G("ng-appearance-outline",n.appearance==="outline")("ng-has-value",n.hasValue),o(2),y(n.selectedItems.length===0&&!n.searchTerm||n.fixedPlaceholder===!0?2:-1),o(),y((!n.multiLabelTemplate||!n.multiple)&&n.selectedItems.length>0?3:-1),o(),y(n.multiple&&n.multiLabelTemplate&&n.selectedValues.length>0?4:-1),o(2),_("disabled",n.disabled)("readOnly",!n.searchable||n.itemsList.maxItemsSelected)("value",n.searchTerm?n.searchTerm:""),J("aria-activedescendant",n.isOpen?n.itemsList==null||n.itemsList.markedItem==null?null:n.itemsList.markedItem.htmlId:null)("aria-controls",n.isOpen?n.dropdownId:null)("aria-expanded",n.isOpen)("aria-label",n.ariaLabel)("id",n.labelForId)("tabindex",n.tabIndex),o(2),y(n.loading?8:-1),o(),y(n.showClear()?9:-1),o(3),y(n.isOpen?12:-1))},dependencies:[et,bs,Gi,Mt],styles:[`@charset "UTF-8";.ng-select{position:relative;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0} +import{a as Bi}from"./chunk-6XR42WAQ.js";import{a as Pi,b as Ni,c as Mi}from"./chunk-4KY7ONEQ.js";import{a as Li}from"./chunk-W4ESFJ6M.js";import{a as wi}from"./chunk-RTY26FN4.js";import{a as xi}from"./chunk-3HCVMNJA.js";import"./chunk-5WNFCBTP.js";import"./chunk-A3CECLYB.js";import"./chunk-HCNFZOWE.js";import{a as ui,b as hi,e as vi}from"./chunk-746ASKQ4.js";import{a as je}from"./chunk-DTTSX64G.js";import"./chunk-Y4QYVF5K.js";import"./chunk-AYQPMCNZ.js";import{a as Vi}from"./chunk-W3JKHGP4.js";import{a as ki}from"./chunk-BIDSHCYH.js";import{a as Ai,b as Fi,c as Di}from"./chunk-4RZQAAPF.js";import{e as Ti,f as Si}from"./chunk-Z4YBXGVO.js";import"./chunk-3L4RH6QP.js";import{a as yi}from"./chunk-DTYYCJHM.js";import"./chunk-XAZECV42.js";import{a as Oi}from"./chunk-3P6YOVUR.js";import{H as _i,I as at,L as gi,M as ot,N as lt,O as Ae,P as He,Q as bi,g as mi,r as fi,s as rt}from"./chunk-SRCW6BUG.js";import{a as $e,c as st,l as Ci}from"./chunk-GOGVGWFJ.js";import{b as Ii}from"./chunk-OSOXMODN.js";import{b as Ei}from"./chunk-PSYDBHTH.js";import{A as pi,h as ri,i as ai,l as oi,y as we}from"./chunk-W4U7QKJF.js";import{a as ci}from"./chunk-AVBHFGIF.js";import{$a as c,$b as Mt,A as gt,Aa as S,Ab as oe,Ad as Me,Bb as le,Bd as si,Ca as wt,Cb as Y,D as bt,Db as pe,Eb as Dt,F as ie,Fb as X,Ga as H,Gb as Lt,Ha as At,Hb as Bt,Hc as tt,Ia as W,Ib as Ot,Ic as it,Id as li,J as Ct,Jb as d,Kb as u,Lb as ne,M as ue,Ma as Pe,Md as di,Na as b,Nb as ce,Nc as Gt,O as vt,Od as Re,P as ye,Pa as J,Pb as Pt,Pd as me,Qa as _,Qb as B,R as N,Ra as G,Rb as Ie,S as Et,Tc as nt,Ua as Ke,Va as y,W as yt,Wb as Nt,X as Z,Xa as Se,Xb as Vt,Y as Tt,Ya as V,Z as St,Za as M,_ as j,_a as l,a as be,ab as L,b as De,bb as Ft,bc as et,cb as kt,cc as ve,cd as he,da as Te,db as Ye,dc as Rt,dd as qt,ea as v,eb as P,ed as Ut,f as re,fa as E,fd as zt,g as ze,gb as x,hb as h,hd as xe,i as mt,ia as It,ib as Ze,id as Ve,j as ft,ja as Qe,jb as Je,jd as Qt,kb as fe,l as _t,lb as Xe,lc as $t,ma as F,mb as q,md as Kt,n as T,na as xt,nb as _e,nd as Yt,o as Le,ob as k,pb as D,pd as Zt,qb as U,ra as ae,rb as p,rd as Jt,sb as I,sd as Xt,t as Ee,tb as C,td as ei,ub as Ce,ud as ti,vd as ii,w as Be,wc as Ne,x as Oe,xa as o,xb as z,xc as jt,ya as f,yb as Q,yc as Ht,zb as K,zc as Wt,zd as ni}from"./chunk-2W7IS4PN.js";var O=function(t){return t.Absent="absent",t.Dispensation="dispensation",t.HalfDay="half-day",t.Incident="incident",t.Present="present",t}(O||{}),$i=(()=>{class t{constructor(e,i){this.updateService=e,this.settings=i}update(e,i,n,r,a,m){let g=[];switch(n){case O.Present:g=this.createResetBulkRequests(e);break;case O.Absent:g=this.createAbsentEditBulkRequests(e,i,r,a);break;case O.Dispensation:g=this.createEditBulkRequests(e,null,this.settings.dispensationPresenceTypeId);break;case O.HalfDay:g=this.createEditBulkRequests(e,null,this.settings.halfDayPresenceTypeId);break;case O.Incident:g=this.createEditBulkRequests(e,null,m);break}return Le(g).pipe(T(()=>{}))}createAbsentEditBulkRequests(e,i,n,r){return n===this.settings.excusedAbsenceStateId?this.createEditBulkRequests(e,n,r):n===this.settings.unexcusedAbsenceStateId?this.createEditBulkRequests(e,n,this.settings.absencePresenceTypeId):[...this.createEditBulkRequests(e.filter(Ri(i,this.settings)),n,this.settings.absencePresenceTypeId),...this.createEditBulkRequests(e.filter(we(Ri(i,this.settings))),n,null)]}createResetBulkRequests(e){return at(e).map(({lessonIds:i,personIds:n})=>this.updateService.removeLessonPresences(i,n))}createEditBulkRequests(e,i,n){return at(e).map(({lessonIds:r,personIds:a})=>this.updateService.editLessonPresences(r,a,n||void 0,i||void 0))}static{this.\u0275fac=function(i){return new(i||t)(j(bi),j(he))}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Ri(t,s){return e=>{let i=t.find(n=>n.Id===e.TypeRef.Id);return!i||i.Id===s.dispensationPresenceTypeId||i.Id===s.halfDayPresenceTypeId||i.IsIncident}}var te=(()=>{class t extends Fi{constructor(e,i,n,r,a,m,g){super(e,i,n,r,"/edit-absences"),this.lessonPresencesService=a,this.presenceTypesService=m,this.dropDownItemsService=g,this.weekdays$=this.loadWeekdays().pipe(ue(1)),this.presenceTypes$=this.loadPresenceTypes().pipe(ue(1)),this.absenceConfirmationStates$=this.loadAbsenceConfirmationStates().pipe(T(ui),ue(1)),this.presenceControlEntries$=Le([this.entries$,this.presenceTypes$,this.absenceConfirmationStates$]).pipe(T(Ci(Bi)),ue(1)),this.selected=[],this.queryParamsString$.pipe(N(this.destroy$)).subscribe(A=>this.confirmBackLinkParams={returnparams:A})}resetSelection(){this.selected=[]}updateAfterConfirm(){this.resetEntries()}getInitialFilter(){return{student:null,educationalEvent:null,studyClass:null,teacher:null,dateFrom:null,dateTo:null,weekdays:null,presenceTypes:null,confirmationStates:null,incidentTypes:null}}isValidFilter(e){return!!(e.student||e.educationalEvent||e.studyClass||e.teacher||e.dateFrom||e.dateTo||e.weekdays||e.presenceTypes||e.confirmationStates||e.incidentTypes)}loadEntries(e,i,n){let r={sort:"StudentFullName.asc,LessonDateTimeFrom.asc"};return this.loadingService.load(this.lessonPresencesService.getFilteredList(e,n,r),Ai)}buildParamsFromFilter(e){return Pi(e)}loadWeekdays(){return this.loadingService.load(this.dropDownItemsService.getWeekdays())}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.activePresenceTypes$)}loadAbsenceConfirmationStates(){return this.loadingService.load(this.dropDownItemsService.getAbsenceConfirmationStates())}static{this.\u0275fac=function(i){return new(i||t)(j(Vt),j(Ii),j(Di),j(he),j(vi),j(He),j(je))}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})();var fn=(t,s)=>s.Key,ji=(t,s)=>s.Id;function _n(t,s){if(t&1&&(l(0,"div",3),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",ne(2,1,"global.validation-errors."+e.error,e.params)," ")}}function gn(t,s){if(t&1&&(l(0,"option",18),p(1),c()),t&2){let e=s.$implicit;_("ngValue",e.Id),o(),C(" ",e.Designation," ")}}function bn(t,s){if(t&1&&(l(0,"select",17),d(1,"async"),l(2,"option",18),p(3),d(4,"translate"),c(),V(5,gn,2,2,"option",18,ji),d(7,"async"),c()),t&2){let e,i=h(5);G("is-invalid",((e=u(1,4,i.absenceTypeIdErrors$))==null?null:e.length)||!1),o(2),_("ngValue",null),o(),C(" ",u(4,6,"edit-absences.edit.absence-type-placeholder")," "),o(2),M(u(7,8,i.absenceTypes$))}}function Cn(t,s){if(t&1&&(l(0,"div",16),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",ne(2,1,"global.validation-errors."+e.error,e.params)," ")}}function vn(t,s){if(t&1&&(l(0,"div",13),L(1,"input",14),l(2,"label",11),p(3),c(),b(4,bn,8,10,"select",15),V(5,Cn,3,4,"div",16,Se),d(7,"async"),c()),t&2){let e=s.$implicit,i=h(4);o(),_("id","state-"+e.Key)("value",e.Key),o(),fe("for","state-"+e.Key),o(),C(" ",e.Value," "),o(),y(i.isExcused(e)?4:-1),o(),M(u(7,5,i.absenceTypeIdErrors$))}}function En(t,s){if(t&1&&(l(0,"div",12),V(1,vn,8,7,"div",13,fn),c()),t&2){h(3);let e=Y(0);o(),M(e)}}function yn(t,s){if(t&1&&(l(0,"option",18),p(1),c()),t&2){let e=s.$implicit;_("ngValue",e.Id),o(),C(" ",e.Designation," ")}}function Tn(t,s){if(t&1&&(l(0,"div",16),p(1),d(2,"translate"),c()),t&2){let e=s.$implicit;o(),C(" ",ne(2,1,"global.validation-errors."+e.error,e.params)," ")}}function Sn(t,s){if(t&1&&(l(0,"div",12)(1,"select",19),d(2,"async"),l(3,"option",18),p(4),d(5,"translate"),c(),V(6,yn,2,2,"option",18,ji),d(8,"async"),c(),V(9,Tn,3,4,"div",16,Se),d(11,"async"),c()),t&2){let e,i=h(3);o(),G("is-invalid",((e=u(2,4,i.incidentIdErrors$))==null?null:e.length)||!1),o(2),_("ngValue",null),o(),C(" ",u(5,6,"edit-absences.edit.incident-placeholder")," "),o(2),M(u(8,8,i.incidents$)),o(3),M(u(11,10,i.incidentIdErrors$))}}function In(t,s){if(t&1&&(l(0,"div",5),L(1,"input",10),l(2,"label",11),p(3),d(4,"translate"),c(),b(5,En,3,0,"div",12)(6,Sn,12,12,"div",12),c()),t&2){let e=s.$implicit,i=h(2);o(),_("id","category-"+e)("value",e),o(),fe("for","category-"+e),o(),C(" ",u(4,6,"edit-absences.edit.categories."+e)," "),o(2),y(i.isAbsent(e)?5:-1),o(),y(i.isIncident(e)?6:-1)}}function xn(t,s){t&1&&(l(0,"div",9)(1,"span",20),p(2,"Loading..."),c()())}function wn(t,s){if(t&1){let e=P();l(0,"form",2),x("ngSubmit",function(){v(e);let n=h();return E(n.onSubmit())}),V(1,_n,3,4,"div",3,Se),d(3,"async"),l(4,"div",4),V(5,In,7,8,"div",5,Se),c(),l(7,"div",6)(8,"button",7),d(9,"async"),x("click",function(){v(e);let n=h();return E(n.cancel())}),p(10),d(11,"translate"),c(),l(12,"button",8),d(13,"async"),p(14),d(15,"translate"),b(16,xn,3,0,"div",9),d(17,"async"),c()()()}if(t&2){let e=h(),i=Y(2),n=Y(4);_("formGroup",n),o(),M(u(3,6,e.formErrors$)),o(4),M(i),o(3),_("disabled",u(9,8,e.saving$)),o(2),C(" ",u(11,10,"edit-absences.edit.cancel")," "),o(2),_("disabled",u(13,12,e.saving$)),o(2),C(" ",u(15,14,"edit-absences.edit.save")," "),o(2),y(u(17,16,e.saving$)?16:-1)}}var Hi=(()=>{class t{constructor(e,i,n,r,a,m,g,A,ee,R){this.fb=e,this.router=i,this.route=n,this.toastService=r,this.translate=a,this.state=m,this.dropDownItemsService=g,this.presenceTypesService=A,this.updateService=ee,this.settings=R,this.absenceTypes$=this.presenceTypesService.confirmationTypes$,this.incidents$=this.presenceTypesService.incidentTypes$,this.formGroup$=this.createFormGroup(),this.saving$=new ze(!1),this.submitted$=new ze(!1),this.formErrors$=$e(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=$e(this.formGroup$,this.submitted$,"absenceTypeId"),this.incidentIdErrors$=$e(this.formGroup$,this.submitted$,"incidentId"),this.availableCategories=[O.Absent,O.Dispensation,O.HalfDay,O.Incident,O.Present],this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(T(this.sortAbsenceConfirmationStates.bind(this)),ue(1)),this.activeCategories$=this.presenceTypesService.halfDayActive$.pipe(T($=>$?this.availableCategories:this.availableCategories.filter(ge=>ge!==O.HalfDay))),this.destroy$=new re}ngOnInit(){this.state.selected.length===0&&this.navigateBack(),st(this.formGroup$,"category").pipe(N(this.destroy$)).subscribe(this.updateConfirmationValueDisabled.bind(this)),st(this.formGroup$,"confirmationValue").pipe(N(this.destroy$)).subscribe(this.updateAbsenceTypeIdDisabled.bind(this))}ngOnDestroy(){this.destroy$.next()}isAbsent(e){return e===O.Absent}isExcused(e){return e.Key===this.settings.excusedAbsenceStateId}isIncident(e){return e===O.Incident}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(ie(1)).subscribe(e=>{e.valid&&this.save(e)})}cancel(){this.navigateBack()}createFormGroup(){return this.getInitialAbsenceTypeId().pipe(T(e=>this.fb.group({category:[O.Absent,xe.required],confirmationValue:[this.settings.excusedAbsenceStateId,xe.required],absenceTypeId:[e,xe.required],incidentId:[{value:null,disabled:!0},xe.required]})),ue(1))}getInitialAbsenceTypeId(){return this.absenceTypes$.pipe(ie(1),T(e=>{let i=e.map(r=>r.Id),n=li(this.state.selected.map(r=>r.TypeRef.Id));return n.length===1&&n[0]!=null&&i.includes(n[0])?n[0]:null}))}updateConfirmationValueDisabled(){this.formGroup$.pipe(ie(1)).subscribe(e=>{let i=e.get("category"),n=e.get("confirmationValue"),r=e.get("absenceTypeId"),a=e.get("incidentId");i&&n&&r&&a&&(i.value===O.Absent?(n.enable(),this.updateAbsenceTypeIdDisabled()):(n.disable(),r.disable()),i.value===O.Incident?a.enable():a.disable())})}updateAbsenceTypeIdDisabled(){this.formGroup$.pipe(ie(1)).subscribe(e=>{let i=e.get("confirmationValue"),n=e.get("absenceTypeId");i&&n&&(i.value===this.settings.excusedAbsenceStateId?n.enable():n.disable())})}save(e){this.saving$.next(!0);let{category:i,confirmationValue:n,absenceTypeId:r,incidentId:a}=e.value;this.presenceTypesService.presenceTypes$.pipe(ye(m=>this.updateService.update(this.state.selected,m,i,n,r,a)),Ct(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.state.resetSelection(),this.toastService.success(this.translate.instant("edit-absences.edit.save-success")),this.navigateBack(!0)}navigateBack(e){this.route.queryParams.pipe(ie(1)).subscribe(i=>{this.router.navigate(["/edit-absences"],{queryParams:De(be({},yi(i.returnparams)),{reload:e})})})}sortAbsenceConfirmationStates(e){return e.slice().sort((i,n)=>i.Key===this.settings.excusedAbsenceStateId?-1:n.Key===this.settings.excusedAbsenceStateId?1:i.Value.localeCompare(n.Value))}static{this.\u0275fac=function(i){return new(i||t)(f(ni),f(Ht),f(Ne),f(ci),f(Re),f(te),f(je),f(He),f($i),f(he))}}static{this.\u0275cmp=H({type:t,selectors:[["bkd-edit-absences-edit"]],decls:11,vars:13,consts:[[1,"bkd-container","bkd-container-limited"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"alert","alert-danger"],[1,"form-group","pb-4"],[1,"form-check","mt-2","mb-3"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],["type","radio","formControlName","category",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[1,"ms-5"],[1,"form-check","mt-2","mb-2"],["type","radio","formControlName","confirmationValue",1,"form-check-input",3,"id","value"],["formControlName","absenceTypeId",1,"form-select","mt-1",3,"is-invalid"],[1,"invalid-feedback"],["formControlName","absenceTypeId",1,"form-select","mt-1"],[3,"ngValue"],["formControlName","incidentId",1,"form-select","mt-1"],[1,"visually-hidden"]],template:function(i,n){if(i&1&&(oe(0),d(1,"async"),oe(2),d(3,"async"),oe(4),d(5,"async"),l(6,"h1"),p(7),d(8,"translate"),c(),l(9,"div",0),b(10,wn,18,18,"form",1),c()),i&2){let r=le(u(1,2,n.confirmationStates$));o(2),le(u(3,5,n.activeCategories$)),o(2);let a=le(u(5,8,n.formGroup$));o(3),I(u(8,11,"edit-absences.title")),o(3),y(a&&r?10:-1)}},dependencies:[Me,Yt,ti,ii,zt,ei,Zt,Ve,Qt,si,Jt,Xt,ve,me],encapsulation:2,changeDetection:0})}}return t})();var Ge=(()=>{class t extends _i{static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=It(t)))(n||t)}})()}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})();var Fn=["content"],kn=["scroll"],Dn=["padding"],qi=["*"],ke=t=>({searchTerm:t});function Ln(t,s){if(t&1&&(l(0,"div",3),Ye(1,6),c()),t&2){let e=h();o(),_("ngTemplateOutlet",e.headerTemplate)("ngTemplateOutletContext",X(2,ke,e.filterValue))}}function Bn(t,s){if(t&1&&(l(0,"div",5),Ye(1,6),c()),t&2){let e=h();o(),_("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",X(2,ke,e.filterValue))}}var On=["searchInput"],Pn=["clearButton"],Nn=(t,s,e)=>({item:t,clear:s,label:e}),Vn=(t,s)=>({items:t,clear:s}),Mn=(t,s,e,i)=>({item:t,item$:s,index:e,searchTerm:i});function Rn(t,s){if(t&1&&(l(0,"div",20),p(1),c()),t&2){let e=h(2);o(),I(e.placeholder)}}function $n(t,s){}function jn(t,s){if(t&1&&b(0,Rn,2,1,"ng-template",null,1,ce)(2,$n,0,0,"ng-template",19),t&2){let e=U(1),i=h();o(2),_("ngTemplateOutlet",i.placeholderTemplate||e)}}function Hn(t,s){if(t&1){let e=P();l(0,"span",23),x("click",function(){v(e);let n=h().$implicit,r=h(2);return E(r.unselect(n))}),p(1,"\xD7"),c(),L(2,"span",24)}if(t&2){let e=h().$implicit,i=h(2);o(2),_("ngItemLabel",e.label)("escape",i.escapeHTML)}}function Wn(t,s){}function Gn(t,s){if(t&1&&(l(0,"div",22),b(1,Hn,3,2,"ng-template",null,2,ce)(3,Wn,0,0,"ng-template",12),c()),t&2){let e=s.$implicit,i=U(2),n=h(2);G("ng-value-disabled",e.disabled),o(3),_("ngTemplateOutlet",n.labelTemplate||i)("ngTemplateOutletContext",Bt(4,Nn,e.value,n.clearItem,e.label))}}function qn(t,s){if(t&1&&V(0,Gn,4,8,"div",21,Ke().trackByOption,!0),t&2){let e=h();M(e.selectedItems)}}function Un(t,s){}function zn(t,s){if(t&1&&b(0,Un,0,0,"ng-template",12),t&2){let e=h();_("ngTemplateOutlet",e.multiLabelTemplate)("ngTemplateOutletContext",Lt(2,Vn,e.selectedValues,e.clearItem))}}function Qn(t,s){t&1&&L(0,"div",25)}function Kn(t,s){}function Yn(t,s){if(t&1&&b(0,Qn,1,0,"ng-template",null,3,ce)(2,Kn,0,0,"ng-template",19),t&2){let e=U(1),i=h();o(2),_("ngTemplateOutlet",i.loadingSpinnerTemplate||e)}}function Zn(t,s){if(t&1&&(l(0,"span",15,4)(2,"span",26),p(3,"\xD7"),c()()),t&2){let e=h();fe("title",e.clearAllText)}}function Jn(t,s){if(t&1&&L(0,"span",31),t&2){let e=h().$implicit,i=h(2);_("ngItemLabel",e.label)("escape",i.escapeHTML)}}function Xn(t,s){}function es(t,s){if(t&1){let e=P();l(0,"div",30),x("click",function(){let n=v(e).$implicit,r=h(2);return E(r.toggleItem(n))})("mouseover",function(){let n=v(e).$implicit,r=h(2);return E(r.onItemHover(n))}),b(1,Jn,1,2,"ng-template",null,5,ce)(3,Xn,0,0,"ng-template",12),c()}if(t&2){let e=s.$implicit,i=U(2),n=h(2);G("ng-option-disabled",e.disabled)("ng-option-selected",e.selected)("ng-optgroup",e.children)("ng-option",!e.children)("ng-option-child",!!e.parent)("ng-option-marked",e===n.itemsList.markedItem),J("role",e.children?"group":"option")("aria-selected",e.selected)("id",e==null?null:e.htmlId),o(3),_("ngTemplateOutlet",e.children?n.optgroupTemplate||i:n.optionTemplate||i)("ngTemplateOutletContext",Ot(17,Mn,e.value,e,e.index,n.searchTerm))}}function ts(t,s){if(t&1&&(l(0,"span")(1,"span",33),p(2),c(),p(3),c()),t&2){let e=h(3);o(2),I(e.addTagText),o(),C('"',e.searchTerm,'"')}}function is(t,s){}function ns(t,s){if(t&1){let e=P();l(0,"div",32),x("mouseover",function(){v(e);let n=h(2);return E(n.itemsList.unmarkItem())})("click",function(){v(e);let n=h(2);return E(n.selectTag())}),b(1,ts,4,2,"ng-template",null,6,ce)(3,is,0,0,"ng-template",12),c()}if(t&2){let e=U(2),i=h(2);G("ng-option-marked",!i.itemsList.markedItem),o(3),_("ngTemplateOutlet",i.tagTemplate||e)("ngTemplateOutletContext",X(4,ke,i.searchTerm))}}function ss(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=h(3);o(),I(e.notFoundText)}}function rs(t,s){}function as(t,s){if(t&1&&b(0,ss,2,1,"ng-template",null,7,ce)(2,rs,0,0,"ng-template",12),t&2){let e=U(1),i=h(2);o(2),_("ngTemplateOutlet",i.notFoundTemplate||e)("ngTemplateOutletContext",X(2,ke,i.searchTerm))}}function os(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=h(3);o(),I(e.typeToSearchText)}}function ls(t,s){}function cs(t,s){if(t&1&&b(0,os,2,1,"ng-template",null,8,ce)(2,ls,0,0,"ng-template",19),t&2){let e=U(1),i=h(2);o(2),_("ngTemplateOutlet",i.typeToSearchTemplate||e)}}function ds(t,s){if(t&1&&(l(0,"div",34),p(1),c()),t&2){let e=h(3);o(),I(e.loadingText)}}function us(t,s){}function ps(t,s){if(t&1&&b(0,ds,2,1,"ng-template",null,9,ce)(2,us,0,0,"ng-template",12),t&2){let e=U(1),i=h(2);o(2),_("ngTemplateOutlet",i.loadingTextTemplate||e)("ngTemplateOutletContext",X(2,ke,i.searchTerm))}}function hs(t,s){if(t&1){let e=P();l(0,"ng-dropdown-panel",27),x("update",function(n){v(e);let r=h();return E(r.viewPortItems=n)})("scroll",function(n){v(e);let r=h();return E(r.scroll.emit(n))})("scrollToEnd",function(n){v(e);let r=h();return E(r.scrollToEnd.emit(n))})("outsideClick",function(){v(e);let n=h();return E(n.close())}),Ft(1),V(2,es,4,22,"div",28,Ke().trackByOption,!0),b(4,ns,4,6,"div",29),kt(),b(5,as,3,4)(6,cs,3,1)(7,ps,3,4),c()}if(t&2){let e=h();G("ng-select-multiple",e.multiple),_("virtualScroll",e.virtualScroll)("bufferAmount",e.bufferAmount)("appendTo",e.appendTo)("position",e.dropdownPosition)("headerTemplate",e.headerTemplate)("footerTemplate",e.footerTemplate)("filterValue",e.searchTerm)("items",e.itemsList.filteredItems)("markedItem",e.itemsList.markedItem)("ngClass",e.appendTo?e.ngClass?e.ngClass:e.classes:null)("id",e.dropdownId),J("aria-label",e.ariaLabelDropdown),o(2),M(e.viewPortItems),o(2),y(e.showAddTag?4:-1),o(),y(e.showNoItemsFound()?5:-1),o(),y(e.showTypeToSearch()?6:-1),o(),y(e.loading&&e.itemsList.filteredItems.length===0?7:-1)}}var Ui=/[&<>"']/g,ms=RegExp(Ui.source),fs={"&":"&","<":"<",">":">",'"':""","'":"'"};function _s(t){return t&&ms.test(t)?t.replace(Ui,s=>fs[s]):t}function w(t){return t!=null}function Fe(t){return typeof t=="object"&&w(t)}function gs(t){return t instanceof Promise}function Ue(t){return t instanceof Function}var bs=(()=>{class t{constructor(e){this.element=e,this.escape=!0}ngOnChanges(e){this.element.nativeElement.innerHTML=this.escape?_s(this.ngItemLabel):this.ngItemLabel}static{this.\u0275fac=function(i){return new(i||t)(f(ae))}}static{this.\u0275dir=W({type:t,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[Te]})}}return t})(),ut=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-option-tmp",""]]})}}return t})(),pt=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-optgroup-tmp",""]]})}}return t})(),Cs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-label-tmp",""]]})}}return t})(),ht=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-multi-label-tmp",""]]})}}return t})(),vs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-header-tmp",""]]})}}return t})(),Es=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-footer-tmp",""]]})}}return t})(),ys=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-notfound-tmp",""]]})}}return t})(),Ts=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-placeholder-tmp",""]]})}}return t})(),Ss=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-typetosearch-tmp",""]]})}}return t})(),Is=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-loadingtext-tmp",""]]})}}return t})(),xs=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-tag-tmp",""]]})}}return t})(),ws=(()=>{class t{constructor(e){this.template=e}static{this.\u0275fac=function(i){return new(i||t)(f(S))}}static{this.\u0275dir=W({type:t,selectors:[["","ng-loadingspinner-tmp",""]]})}}return t})();function zi(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(Math.random()*16|0).toString(16))}var As={"\u24B6":"A",\uFF21:"A",\u00C0:"A",\u00C1:"A",\u00C2:"A",\u1EA6:"A",\u1EA4:"A",\u1EAA:"A",\u1EA8:"A",\u00C3:"A",\u0100:"A",\u0102:"A",\u1EB0:"A",\u1EAE:"A",\u1EB4:"A",\u1EB2:"A",\u0226:"A",\u01E0:"A",\u00C4:"A",\u01DE:"A",\u1EA2:"A",\u00C5:"A",\u01FA:"A",\u01CD:"A",\u0200:"A",\u0202:"A",\u1EA0:"A",\u1EAC:"A",\u1EB6:"A",\u1E00:"A",\u0104:"A","\u023A":"A","\u2C6F":"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B",\uFF22:"B",\u1E02:"B",\u1E04:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0181:"B","\u24B8":"C",\uFF23:"C",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0187:"C","\u023B":"C","\uA73E":"C","\u24B9":"D",\uFF24:"D",\u1E0A:"D",\u010E:"D",\u1E0C:"D",\u1E10:"D",\u1E12:"D",\u1E0E:"D",\u0110:"D",\u018B:"D",\u018A:"D",\u0189:"D","\uA779":"D",\u01F1:"DZ",\u01C4:"DZ",\u01F2:"Dz",\u01C5:"Dz","\u24BA":"E",\uFF25:"E",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u1EC0:"E",\u1EBE:"E",\u1EC4:"E",\u1EC2:"E",\u1EBC:"E",\u0112:"E",\u1E14:"E",\u1E16:"E",\u0114:"E",\u0116:"E",\u00CB:"E",\u1EBA:"E",\u011A:"E",\u0204:"E",\u0206:"E",\u1EB8:"E",\u1EC6:"E",\u0228:"E",\u1E1C:"E",\u0118:"E",\u1E18:"E",\u1E1A:"E",\u0190:"E",\u018E:"E","\u24BB":"F",\uFF26:"F",\u1E1E:"F",\u0191:"F","\uA77B":"F","\u24BC":"G",\uFF27:"G",\u01F4:"G",\u011C:"G",\u1E20:"G",\u011E:"G",\u0120:"G",\u01E6:"G",\u0122:"G",\u01E4:"G",\u0193:"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H",\uFF28:"H",\u0124:"H",\u1E22:"H",\u1E26:"H",\u021E:"H",\u1E24:"H",\u1E28:"H",\u1E2A:"H",\u0126:"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I",\uFF29:"I",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u0128:"I",\u012A:"I",\u012C:"I",\u0130:"I",\u00CF:"I",\u1E2E:"I",\u1EC8:"I",\u01CF:"I",\u0208:"I",\u020A:"I",\u1ECA:"I",\u012E:"I",\u1E2C:"I",\u0197:"I","\u24BF":"J",\uFF2A:"J",\u0134:"J","\u0248":"J","\u24C0":"K",\uFF2B:"K",\u1E30:"K",\u01E8:"K",\u1E32:"K",\u0136:"K",\u1E34:"K",\u0198:"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L",\uFF2C:"L",\u013F:"L",\u0139:"L",\u013D:"L",\u1E36:"L",\u1E38:"L",\u013B:"L",\u1E3C:"L",\u1E3A:"L",\u0141:"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L",\u01C7:"LJ",\u01C8:"Lj","\u24C2":"M",\uFF2D:"M",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u019C:"M","\u24C3":"N",\uFF2E:"N",\u01F8:"N",\u0143:"N",\u00D1:"N",\u1E44:"N",\u0147:"N",\u1E46:"N",\u0145:"N",\u1E4A:"N",\u1E48:"N","\u0220":"N",\u019D:"N","\uA790":"N","\uA7A4":"N",\u01CA:"NJ",\u01CB:"Nj","\u24C4":"O",\uFF2F:"O",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u1ED2:"O",\u1ED0:"O",\u1ED6:"O",\u1ED4:"O",\u00D5:"O",\u1E4C:"O",\u022C:"O",\u1E4E:"O",\u014C:"O",\u1E50:"O",\u1E52:"O",\u014E:"O",\u022E:"O",\u0230:"O",\u00D6:"O",\u022A:"O",\u1ECE:"O",\u0150:"O",\u01D1:"O",\u020C:"O",\u020E:"O",\u01A0:"O",\u1EDC:"O",\u1EDA:"O",\u1EE0:"O",\u1EDE:"O",\u1EE2:"O",\u1ECC:"O",\u1ED8:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u0186:"O",\u019F:"O","\uA74A":"O","\uA74C":"O",\u01A2:"OI","\uA74E":"OO",\u0222:"OU","\u24C5":"P",\uFF30:"P",\u1E54:"P",\u1E56:"P",\u01A4:"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q",\uFF31:"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R",\uFF32:"R",\u0154:"R",\u1E58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1E5A:"R",\u1E5C:"R",\u0156:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S",\uFF33:"S","\u1E9E":"S",\u015A:"S",\u1E64:"S",\u015C:"S",\u1E60:"S",\u0160:"S",\u1E66:"S",\u1E62:"S",\u1E68:"S",\u0218:"S",\u015E:"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T",\uFF34:"T",\u1E6A:"T",\u0164:"T",\u1E6C:"T",\u021A:"T",\u0162:"T",\u1E70:"T",\u1E6E:"T",\u0166:"T",\u01AC:"T",\u01AE:"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U",\uFF35:"U",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u0168:"U",\u1E78:"U",\u016A:"U",\u1E7A:"U",\u016C:"U",\u00DC:"U",\u01DB:"U",\u01D7:"U",\u01D5:"U",\u01D9:"U",\u1EE6:"U",\u016E:"U",\u0170:"U",\u01D3:"U",\u0214:"U",\u0216:"U",\u01AF:"U",\u1EEA:"U",\u1EE8:"U",\u1EEE:"U",\u1EEC:"U",\u1EF0:"U",\u1EE4:"U",\u1E72:"U",\u0172:"U",\u1E76:"U",\u1E74:"U","\u0244":"U","\u24CB":"V",\uFF36:"V",\u1E7C:"V",\u1E7E:"V",\u01B2:"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W",\uFF37:"W",\u1E80:"W",\u1E82:"W",\u0174:"W",\u1E86:"W",\u1E84:"W",\u1E88:"W","\u2C72":"W","\u24CD":"X",\uFF38:"X",\u1E8A:"X",\u1E8C:"X","\u24CE":"Y",\uFF39:"Y",\u1EF2:"Y",\u00DD:"Y",\u0176:"Y",\u1EF8:"Y",\u0232:"Y",\u1E8E:"Y",\u0178:"Y",\u1EF6:"Y",\u1EF4:"Y",\u01B3:"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z",\uFF3A:"Z",\u0179:"Z",\u1E90:"Z",\u017B:"Z",\u017D:"Z",\u1E92:"Z",\u1E94:"Z",\u01B5:"Z",\u0224:"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a",\uFF41:"a",\u1E9A:"a",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u1EA7:"a",\u1EA5:"a",\u1EAB:"a",\u1EA9:"a",\u00E3:"a",\u0101:"a",\u0103:"a",\u1EB1:"a",\u1EAF:"a",\u1EB5:"a",\u1EB3:"a",\u0227:"a",\u01E1:"a",\u00E4:"a",\u01DF:"a",\u1EA3:"a",\u00E5:"a",\u01FB:"a",\u01CE:"a",\u0201:"a",\u0203:"a",\u1EA1:"a",\u1EAD:"a",\u1EB7:"a",\u1E01:"a",\u0105:"a","\u2C65":"a",\u0250:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b",\uFF42:"b",\u1E03:"b",\u1E05:"b",\u1E07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24D2":"c",\uFF43:"c",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0188:"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d",\uFF44:"d",\u1E0B:"d",\u010F:"d",\u1E0D:"d",\u1E11:"d",\u1E13:"d",\u1E0F:"d",\u0111:"d",\u018C:"d",\u0256:"d",\u0257:"d","\uA77A":"d",\u01F3:"dz",\u01C6:"dz","\u24D4":"e",\uFF45:"e",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u1EC1:"e",\u1EBF:"e",\u1EC5:"e",\u1EC3:"e",\u1EBD:"e",\u0113:"e",\u1E15:"e",\u1E17:"e",\u0115:"e",\u0117:"e",\u00EB:"e",\u1EBB:"e",\u011B:"e",\u0205:"e",\u0207:"e",\u1EB9:"e",\u1EC7:"e",\u0229:"e",\u1E1D:"e",\u0119:"e",\u1E19:"e",\u1E1B:"e","\u0247":"e",\u025B:"e",\u01DD:"e","\u24D5":"f",\uFF46:"f",\u1E1F:"f",\u0192:"f","\uA77C":"f","\u24D6":"g",\uFF47:"g",\u01F5:"g",\u011D:"g",\u1E21:"g",\u011F:"g",\u0121:"g",\u01E7:"g",\u0123:"g",\u01E5:"g",\u0260:"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h",\uFF48:"h",\u0125:"h",\u1E23:"h",\u1E27:"h",\u021F:"h",\u1E25:"h",\u1E29:"h",\u1E2B:"h",\u1E96:"h",\u0127:"h","\u2C68":"h","\u2C76":"h",\u0265:"h",\u0195:"hv","\u24D8":"i",\uFF49:"i",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u0129:"i",\u012B:"i",\u012D:"i",\u00EF:"i",\u1E2F:"i",\u1EC9:"i",\u01D0:"i",\u0209:"i",\u020B:"i",\u1ECB:"i",\u012F:"i",\u1E2D:"i",\u0268:"i",\u0131:"i","\u24D9":"j",\uFF4A:"j",\u0135:"j",\u01F0:"j","\u0249":"j","\u24DA":"k",\uFF4B:"k",\u1E31:"k",\u01E9:"k",\u1E33:"k",\u0137:"k",\u1E35:"k",\u0199:"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l",\uFF4C:"l",\u0140:"l",\u013A:"l",\u013E:"l",\u1E37:"l",\u1E39:"l",\u013C:"l",\u1E3D:"l",\u1E3B:"l",\u017F:"l",\u0142:"l",\u019A:"l",\u026B:"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l",\u01C9:"lj","\u24DC":"m",\uFF4D:"m",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m",\u026F:"m","\u24DD":"n",\uFF4E:"n",\u01F9:"n",\u0144:"n",\u00F1:"n",\u1E45:"n",\u0148:"n",\u1E47:"n",\u0146:"n",\u1E4B:"n",\u1E49:"n",\u019E:"n",\u0272:"n",\u0149:"n","\uA791":"n","\uA7A5":"n",\u01CC:"nj","\u24DE":"o",\uFF4F:"o",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u1ED3:"o",\u1ED1:"o",\u1ED7:"o",\u1ED5:"o",\u00F5:"o",\u1E4D:"o",\u022D:"o",\u1E4F:"o",\u014D:"o",\u1E51:"o",\u1E53:"o",\u014F:"o",\u022F:"o",\u0231:"o",\u00F6:"o",\u022B:"o",\u1ECF:"o",\u0151:"o",\u01D2:"o",\u020D:"o",\u020F:"o",\u01A1:"o",\u1EDD:"o",\u1EDB:"o",\u1EE1:"o",\u1EDF:"o",\u1EE3:"o",\u1ECD:"o",\u1ED9:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u0254:"o","\uA74B":"o","\uA74D":"o",\u0275:"o",\u01A3:"oi",\u0223:"ou","\uA74F":"oo","\u24DF":"p",\uFF50:"p",\u1E55:"p",\u1E57:"p",\u01A5:"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q",\uFF51:"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r",\uFF52:"r",\u0155:"r",\u1E59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1E5B:"r",\u1E5D:"r",\u0157:"r",\u1E5F:"r","\u024D":"r",\u027D:"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s",\uFF53:"s",\u00DF:"s",\u015B:"s",\u1E65:"s",\u015D:"s",\u1E61:"s",\u0161:"s",\u1E67:"s",\u1E63:"s",\u1E69:"s",\u0219:"s",\u015F:"s","\u023F":"s","\uA7A9":"s","\uA785":"s",\u1E9B:"s","\u24E3":"t",\uFF54:"t",\u1E6B:"t",\u1E97:"t",\u0165:"t",\u1E6D:"t",\u021B:"t",\u0163:"t",\u1E71:"t",\u1E6F:"t",\u0167:"t",\u01AD:"t",\u0288:"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u",\uFF55:"u",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u0169:"u",\u1E79:"u",\u016B:"u",\u1E7B:"u",\u016D:"u",\u00FC:"u",\u01DC:"u",\u01D8:"u",\u01D6:"u",\u01DA:"u",\u1EE7:"u",\u016F:"u",\u0171:"u",\u01D4:"u",\u0215:"u",\u0217:"u",\u01B0:"u",\u1EEB:"u",\u1EE9:"u",\u1EEF:"u",\u1EED:"u",\u1EF1:"u",\u1EE5:"u",\u1E73:"u",\u0173:"u",\u1E77:"u",\u1E75:"u",\u0289:"u","\u24E5":"v",\uFF56:"v",\u1E7D:"v",\u1E7F:"v",\u028B:"v","\uA75F":"v",\u028C:"v","\uA761":"vy","\u24E6":"w",\uFF57:"w",\u1E81:"w",\u1E83:"w",\u0175:"w",\u1E87:"w",\u1E85:"w",\u1E98:"w",\u1E89:"w","\u2C73":"w","\u24E7":"x",\uFF58:"x",\u1E8B:"x",\u1E8D:"x","\u24E8":"y",\uFF59:"y",\u1EF3:"y",\u00FD:"y",\u0177:"y",\u1EF9:"y",\u0233:"y",\u1E8F:"y",\u00FF:"y",\u1EF7:"y",\u1E99:"y",\u1EF5:"y",\u01B4:"y","\u024F":"y","\u1EFF":"y","\u24E9":"z",\uFF5A:"z",\u017A:"z",\u1E91:"z",\u017C:"z",\u017E:"z",\u1E93:"z",\u1E95:"z",\u01B6:"z",\u0225:"z","\u0240":"z","\u2C6C":"z","\uA763":"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038A:"\u0399",\u03AA:"\u0399",\u038C:"\u039F",\u038E:"\u03A5",\u03AB:"\u03A5",\u038F:"\u03A9",\u03AC:"\u03B1",\u03AD:"\u03B5",\u03AE:"\u03B7",\u03AF:"\u03B9",\u03CA:"\u03B9",\u0390:"\u03B9",\u03CC:"\u03BF",\u03CD:"\u03C5",\u03CB:"\u03C5",\u03B0:"\u03C5",\u03C9:"\u03C9",\u03C2:"\u03C3"};function qe(t){let s=e=>As[e]||e;return t.replace(/[^\u0000-\u007E]/g,s)}var ct=class{constructor(s,e){this._ngSelect=s,this._selectionModel=e,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length}get lastSelectedItem(){let s=this.selectedItems.length-1;for(;s>=0;s--){let e=this.selectedItems[s];if(!e.disabled)return e}return null}setItems(s){this._items=s.map((e,i)=>this.mapItem(e,i)),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(s){if(s.selected||this.maxItemsSelected)return;let e=this._ngSelect.multiple;e||this.clearSelected(),this._selectionModel.select(s,e,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(s)}unselect(s){s.selected&&(this._selectionModel.unselect(s,this._ngSelect.multiple),this._ngSelect.hideSelected&&w(s.index)&&this._ngSelect.multiple&&this._showSelected(s))}findItem(s){let e;return this._ngSelect.compareWith?e=i=>this._ngSelect.compareWith(i.value,s):this._ngSelect.bindValue?e=i=>!i.children&&this.resolveNested(i.value,this._ngSelect.bindValue)===s:e=i=>i.value===s||!i.children&&i.label&&i.label===this.resolveNested(s,this._ngSelect.bindLabel),this._items.find(i=>e(i))}addItem(s){let e=this.mapItem(s,this._items.length);return this._items.push(e),this._filteredItems.push(e),e}clearSelected(s=!1){this._selectionModel.clear(s),this._items.forEach(e=>{e.selected=s&&e.selected&&e.disabled,e.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(s){return s=qe(s).toLocaleLowerCase(),this.filteredItems.find(e=>qe(e.label).toLocaleLowerCase().substr(0,s.length)===s)}filter(s){if(!s){this.resetFilteredItems();return}this._filteredItems=[],s=this._ngSelect.searchFn?s:qe(s).toLocaleLowerCase();let e=this._ngSelect.searchFn||this._defaultSearchFn,i=this._ngSelect.hideSelected;for(let n of Array.from(this._groups.keys())){let r=[];for(let a of this._groups.get(n)){if(i&&(a.parent&&a.parent.selected||a.selected))continue;let m=this._ngSelect.searchFn?a.value:a;e(s,m)&&r.push(a)}if(r.length>0){let[a]=r.slice(-1);if(a.parent){let m=this._items.find(g=>g===a.parent);this._filteredItems.push(m)}this._filteredItems.push(...r)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._ngSelect.hideSelected&&this.selectedItems.length>0?this._filteredItems=this._items.filter(s=>!s.selected):this._filteredItems=this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(s){this._markedIndex=this._filteredItems.indexOf(s)}markSelectedOrDefault(s){if(this._filteredItems.length===0)return;let e=this._getLastMarkedIndex();e>-1?this._markedIndex=e:this._markedIndex=s?this.filteredItems.findIndex(i=>!i.disabled):-1}resolveNested(s,e){if(!Fe(s))return s;if(e.indexOf(".")===-1)return s[e];{let i=e.split("."),n=s;for(let r=0,a=i.length;rthis.selectedItems.indexOf(e)===-1))}_showSelected(s){if(this._filteredItems.push(s),s.parent){let e=s.parent;this._filteredItems.find(n=>n===e)||this._filteredItems.push(e)}else if(s.children)for(let e of s.children)e.selected=!1,this._filteredItems.push(e);this._filteredItems=[...this._filteredItems.sort((e,i)=>e.index-i.index)]}_hideSelected(s){this._filteredItems=this._filteredItems.filter(e=>e!==s),s.parent?s.parent.children.every(i=>i.selected)&&(this._filteredItems=this._filteredItems.filter(i=>i!==s.parent)):s.children&&(this._filteredItems=this.filteredItems.filter(e=>e.parent!==s))}_defaultSearchFn(s,e){return qe(e.label).toLocaleLowerCase().indexOf(s)>-1}_getNextItemIndex(s){return s>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(s){this._filteredItems.length===0||this._filteredItems.every(e=>e.disabled)||(this._markedIndex=this._getNextItemIndex(s),this.markedItem.disabled&&this._stepToItem(s))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&this.markedItem===void 0)return-1;let s=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&s<0?-1:Math.max(this.markedIndex,s)}_groupBy(s,e){let i=new Map;if(s.length===0)return i;if(Array.isArray(s[0].value[e])){for(let a of s){let m=(a.value[e]||[]).map((g,A)=>this.mapItem(g,A));i.set(a,m)}return i}let n=Ue(this._ngSelect.groupBy),r=a=>{let m=n?e(a.value):a.value[e];return w(m)?m:void 0};for(let a of s){let m=r(a),g=i.get(m);g?g.push(a):i.set(m,[a])}return i}_flatten(s){let e=Ue(this._ngSelect.groupBy),i=[];for(let n of Array.from(s.keys())){let r=i.length;if(n===void 0){let R=s.get(void 0)||[];i.push(...R.map($=>($.index=r++,$)));continue}let a=Fe(n),m={label:a?"":String(n),children:void 0,parent:null,index:r++,disabled:!this._ngSelect.selectableGroup,htmlId:zi()},g=e?this._ngSelect.bindLabel:this._ngSelect.groupBy,A=this._ngSelect.groupValue||(()=>a?n.value:{[g]:n}),ee=s.get(n).map(R=>(R.parent=m,R.children=void 0,R.index=r++,R));m.children=ee,m.value=A(n,ee.map(R=>R.value)),i.push(m),i.push(...ee)}return i}},Qi=(()=>{class t{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(e,i,n){let r=this._dimensions,a=r.itemHeight*i,g=Math.max(0,e)/a*i,A=Math.min(i,Math.ceil(g)+(r.itemsPerViewport+1)),R=Math.max(0,A-r.itemsPerViewport),$=Math.min(R,Math.floor(g)),ge=r.itemHeight*Math.ceil($)-r.itemHeight*Math.min($,n);return ge=isNaN(ge)?0:ge,$=isNaN($)?-1:$,A=isNaN(A)?-1:A,$-=n,$=Math.max(0,$),A+=n,A=Math.min(i,A),{topPadding:ge,scrollHeight:a,start:$,end:A}}setDimensions(e,i){let n=Math.max(1,Math.floor(i/e));this._dimensions={itemHeight:e,panelHeight:i,itemsPerViewport:n}}getScrollTo(e,i,n){let{panelHeight:r}=this.dimensions,a=e+i,m=n,g=m+r;return r>=a&&n===e?null:a>g?m+a-g:e<=m?e:null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac})}}return t})(),Wi=["top","right","bottom","left"],Fs=typeof requestAnimationFrame<"u"?ft:mt,Gi=(()=>{class t{constructor(e,i,n,r,a){this._renderer=e,this._zone=i,this._panelService=n,this._document=a,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new F,this.scroll=new F,this.scrollToEnd=new F,this.outsideClick=new F,this._destroy$=new re,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=r.nativeElement}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(e){e!==this._itemsLength&&(this._itemsLength=e,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem){let{itemHeight:e,panelHeight:i}=this._panelService.dimensions,n=this.markedItem.index*e;return i>n?0:n}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._virtualPadding=this.paddingElementRef.nativeElement,this._scrollablePanel=this.scrollElementRef.nativeElement,this._contentPanel=this.contentElementRef.nativeElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener()}ngOnChanges(e){if(e.items){let i=e.items;this._onItemsChange(i.currentValue,i.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(e,i=!1){if(!e)return;let n=this.items.indexOf(e);if(n<0||n>=this.itemsLength)return;let r;if(this.virtualScroll){let a=this._panelService.dimensions.itemHeight;r=this._panelService.getScrollTo(n*a,a,this._lastScrollPosition)}else{let a=this._dropdown.querySelector(`#${e.htmlId}`),m=i?a.offsetTop:this._lastScrollPosition;r=this._panelService.getScrollTo(a.offsetTop,a.clientHeight,m)}w(r)&&(this._scrollablePanel.scrollTop=r)}scrollToTag(){let e=this._scrollablePanel;e.scrollTop=e.scrollHeight-e.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),Wi.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(e){Wi.forEach(n=>{let r=`ng-select-${n}`;this._renderer.removeClass(this._dropdown,r),this._renderer.removeClass(this._select,r)});let i=`ng-select-${e}`;this._renderer.addClass(this._dropdown,i),this._renderer.addClass(this._select,i)}_handleScroll(){this._zone.runOutsideAngular(()=>{Ee(this.scrollElementRef.nativeElement,"scroll").pipe(N(this._destroy$),gt(0,Fs)).subscribe(e=>{let i=e.path||e.composedPath&&e.composedPath();if(!i||i.length===0&&!e.target)return;let n=!i||i.length===0?e.target.scrollTop:i[0].scrollTop;this._onContentScrolled(n)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{Be(Ee(this._document,"touchstart",{capture:!0}),Ee(this._document,"click",{capture:!0})).pipe(N(this._destroy$)).subscribe(e=>this._checkToClose(e))})}_checkToClose(e){if(this._select.contains(e.target)||this._dropdown.contains(e.target))return;let i=e.path||e.composedPath&&e.composedPath();e.target&&e.target.shadowRoot&&i&&i[0]&&this._select.contains(i[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(e,i){this.items=e||[],this._scrollToEndFired=!1,this.itemsLength=e.length,this.virtualScroll?this._updateItemsRange(i):(this._setVirtualHeight(),this._updateItems(i))}_updateItems(e){this.update.emit(this.items),e!==!1&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{let i=this._scrollablePanel.clientHeight;this._panelService.setDimensions(0,i),this._handleDropdownPosition(),this.scrollTo(this.markedItem,e)})})}_updateItemsRange(e){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{e?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(e){this.virtualScroll&&this._renderItemsRange(e),this._lastScrollPosition=e,this._fireScrollToEnd(e)}_updateVirtualHeight(e){this._updateScrollHeight&&(this._virtualPadding.style.height=`${e}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding&&(this._virtualPadding.style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(e=null){if(e&&this._lastScrollPosition===e)return;e=e||this._scrollablePanel.scrollTop;let i=this._panelService.calculateItems(e,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(i.scrollHeight),this._contentPanel.style.transform=`translateY(${i.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(i.start,i.end)),this.scroll.emit({start:i.start,end:i.end})}),w(e)&&this._lastScrollPosition===0&&(this._scrollablePanel.scrollTop=e,this._lastScrollPosition=e)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||this.itemsLength===0)return Promise.resolve(this._panelService.dimensions);let[e]=this.items;return this.update.emit([e]),Promise.resolve().then(()=>{let n=this._dropdown.querySelector(`#${e.htmlId}`).clientHeight;this._virtualPadding.style.height=`${n*this.itemsLength}px`;let r=this._scrollablePanel.clientHeight;return this._panelService.setDimensions(n,r),this._panelService.dimensions})}_fireScrollToEnd(e){if(this._scrollToEndFired||e===0)return;let i=this.virtualScroll?this._virtualPadding:this._contentPanel;e+this._dropdown.clientHeight>=i.clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(e){if(this.position!=="auto")return this.position;let i=this._select.getBoundingClientRect(),n=document.documentElement.scrollTop||document.body.scrollTop,r=i.top+window.pageYOffset,a=i.height,m=e.getBoundingClientRect().height;return r+a+m>n+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo){if(this._parent=document.querySelector(this.appendTo),!this._parent)throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){let e=this._select.getBoundingClientRect(),i=this._parent.getBoundingClientRect(),n=e.left-i.left;this._dropdown.style.left=n+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"}_updateYPosition(){let e=this._select.getBoundingClientRect(),i=this._parent.getBoundingClientRect(),n=e.height;if(this._currentPosition==="top"){let r=i.bottom-e.bottom;this._dropdown.style.bottom=r+n+"px",this._dropdown.style.top="auto"}else if(this._currentPosition==="bottom"){let r=e.top-i.top;this._dropdown.style.top=r+n+"px",this._dropdown.style.bottom="auto"}}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{Ee(this._dropdown,"mousedown").pipe(N(this._destroy$)).subscribe(e=>{e.target.tagName!=="INPUT"&&e.preventDefault()})})}static{this.\u0275fac=function(i){return new(i||t)(f(wt),f(xt),f(Qi),f(ae),f(Nt,8))}}static{this.\u0275cmp=H({type:t,selectors:[["ng-dropdown-panel"]],viewQuery:function(i,n){if(i&1&&(_e(Fn,7,ae),_e(kn,7,ae),_e(Dn,7,ae)),i&2){let r;k(r=D())&&(n.contentElementRef=r.first),k(r=D())&&(n.scrollElementRef=r.first),k(r=D())&&(n.paddingElementRef=r.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:[2,"virtualScroll","virtualScroll",B],headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[Pe,Te],ngContentSelectors:qi,decls:9,vars:6,consts:[["scroll",""],["padding",""],["content",""],[1,"ng-dropdown-header"],["role","listbox",1,"ng-dropdown-panel-items","scroll-host"],[1,"ng-dropdown-footer"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,n){i&1&&(Ze(),b(0,Ln,2,4,"div",3),l(1,"div",4,0),L(3,"div",null,1),l(5,"div",null,2),Je(7),c()(),b(8,Bn,2,4,"div",5)),i&2&&(y(n.headerTemplate?0:-1),o(3),G("total-padding",n.virtualScroll),o(2),G("scrollable-content",n.virtualScroll&&n.items.length),o(3),y(n.footerTemplate?8:-1))},dependencies:[et],encapsulation:2,changeDetection:0})}}return t})(),ks=(()=>{class t{constructor(e){this.elementRef=e,this.disabled=!1,this.stateChange$=new re}get label(){return(this.elementRef.nativeElement.textContent||"").trim()}ngOnChanges(e){e.disabled&&this.stateChange$.next({value:this.value,disabled:this.disabled})}ngAfterViewChecked(){this.label!==this._previousLabel&&(this._previousLabel=this.label,this.stateChange$.next({value:this.value,disabled:this.disabled,label:this.elementRef.nativeElement.innerHTML}))}ngOnDestroy(){this.stateChange$.complete()}static{this.\u0275fac=function(i){return new(i||t)(f(ae))}}static{this.\u0275cmp=H({type:t,selectors:[["ng-option"]],inputs:{value:"value",disabled:[2,"disabled","disabled",B]},features:[Pe,Te],ngContentSelectors:qi,decls:1,vars:0,template:function(i,n){i&1&&(Ze(),Je(0))},encapsulation:2,changeDetection:0})}}return t})(),se=function(t){return t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Esc=27]="Esc",t[t.Space=32]="Space",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowDown=40]="ArrowDown",t[t.Backspace=8]="Backspace",t}(se||{});function Ki(){return new dt}var dt=class{constructor(){this._selected=[]}get value(){return this._selected}select(s,e,i){if(s.selected=!0,(!s.children||!e&&i)&&this._selected.push(s),e)if(s.parent){let n=s.parent.children.length,r=s.parent.children.filter(a=>a.selected).length;s.parent.selected=n===r}else s.children&&(this._setChildrenSelectedState(s.children,!0),this._removeChildren(s),i&&this._activeChildren(s)?this._selected=[...this._selected.filter(n=>n.parent!==s),s]:this._selected=[...this._selected,...s.children.filter(n=>!n.disabled)])}unselect(s,e){if(this._selected=this._selected.filter(i=>i!==s),s.selected=!1,e)if(s.parent&&s.parent.selected){let i=s.parent.children;this._removeParent(s.parent),this._removeChildren(s.parent),this._selected.push(...i.filter(n=>n!==s&&!n.disabled)),s.parent.selected=!1}else s.children&&(this._setChildrenSelectedState(s.children,!1),this._removeChildren(s))}clear(s){this._selected=s?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(s,e){for(let i of s)i.disabled||(i.selected=e)}_removeChildren(s){this._selected=[...this._selected.filter(e=>e.parent!==s),...s.children.filter(e=>e.parent===s&&e.disabled&&e.selected)]}_removeParent(s){this._selected=this._selected.filter(e=>e!==s)}_activeChildren(s){return s.children.every(e=>!e.disabled||e.selected)}},Ds=(()=>{class t{constructor(){this.fixedPlaceholder=!0,this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Ls=(()=>{class t{warn(e){console.warn(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Yi=new St("ng-select-selection-model"),Zi=(()=>{class t{constructor(e,i,n,r,a,m,g){this.classes=e,this.autoFocus=i,this.config=n,this._cd=m,this._console=g,this.ariaLabelDropdown="Options List",this.markFirst=!0,this.fixedPlaceholder=!0,this.preventToggleOnRightClick=!1,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.trackByFn=null,this.clearOnBackspace=!0,this.labelForId=null,this.inputAttrs={},this.readonly=!1,this.searchWhileComposing=!0,this.minTermLength=0,this.editableSearchTerm=!1,this.ngClass=null,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new F,this.focusEvent=new F,this.changeEvent=new F,this.openEvent=new F,this.closeEvent=new F,this.searchEvent=new F,this.clearEvent=new F,this.addEvent=new F,this.removeEvent=new F,this.scroll=new F,this.scrollToEnd=new F,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=zi(),this.escapeHTML=!0,this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new re,this._keyPress$=new re,this._items=[],this.keyDownFn=A=>!0,this.clearItem=A=>{let ee=this.selectedItems.find(R=>R.value===A);this.unselect(ee)},this.trackByOption=(A,ee)=>this.trackByFn?this.trackByFn(ee.value):ee,this._onChange=A=>{},this._onTouched=()=>{},this._mergeGlobalConfig(n),this.itemsList=new ct(this,r?r():Ki()),this.element=a.nativeElement}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get items(){return this._items}set items(e){this._itemsAreUsed=!0,this._items=e??[]}get disabled(){return this.readonly||this._disabled}get compareWith(){return this._compareWith}set compareWith(e){if(e!=null&&!Ue(e))throw Error("`compareWith` must be a function.");this._compareWith=e}get clearSearchOnAdd(){return w(this._clearSearchOnAdd)?this._clearSearchOnAdd:w(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(e){this._clearSearchOnAdd=e}get deselectOnClick(){return w(this._deselectOnClick)?this._deselectOnClick:w(this.config.deselectOnClick)?this.config.deselectOnClick:this.multiple}set deselectOnClick(e){this._deselectOnClick=e}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(e=>e.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel)return this.dropdownPanel.currentPosition}get showAddTag(){if(!this._validTerm)return!1;let e=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(i=>i.label.toLowerCase()===e)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(i=>i.label.toLowerCase()===e))&&!this.loading}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}get _isTypeahead(){return this.typeahead&&this.typeahead.observers.length>0}get _validTerm(){let e=this.searchTerm&&this.searchTerm.trim();return e&&e.length>=this.minTermLength}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(e){e.multiple&&this.itemsList.clearSelected(),e.items&&this._setItems(e.items.currentValue||[]),e.isOpen&&(this._manualOpen=w(e.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),w(this.autoFocus)&&this.focus()}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}handleKeyDown(e){if(se[e.which]){if(this.keyDownFn(e)===!1)return;this.handleKeyCode(e)}else e.key&&e.key.length===1&&this._keyPress$.next(e.key.toLocaleLowerCase())}handleKeyCode(e){let i=e.target;this.clearButton&&this.clearButton.nativeElement===i?this.handleKeyCodeClear(e):this.handleKeyCodeInput(e)}handleKeyCodeInput(e){switch(e.which){case se.ArrowDown:this._handleArrowDown(e);break;case se.ArrowUp:this._handleArrowUp(e);break;case se.Space:this._handleSpace(e);break;case se.Enter:this._handleEnter(e);break;case se.Tab:this._handleTab(e);break;case se.Esc:this.close(),e.preventDefault();break;case se.Backspace:this._handleBackspace();break}}handleKeyCodeClear(e){switch(e.which){case se.Enter:this.handleClearClick(),e.preventDefault();break}}handleMousedown(e){if(this.preventToggleOnRightClick&&e.button===2)return!1;let i=e.target;if(i.tagName!=="INPUT"&&e.preventDefault(),i.classList.contains("ng-clear-wrapper")){this.handleClearClick();return}if(i.classList.contains("ng-arrow-wrapper")){this.handleArrowClick();return}i.classList.contains("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle())}handleArrowClick(){this.isOpen?this.close():this.open()}handleClearClick(){this.hasValue&&(this.itemsList.clearSelected(!0),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())}writeValue(e){this.itemsList.clearSelected(),this._handleWriteValue(e),this._cd.markForCheck()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._disabled=e,this._cd.markForCheck()}toggle(){this.isOpen?this.close():this.open()}open(){this.disabled||this.isOpen||this._manualOpen||!this._isTypeahead&&!this.addTag&&this.itemsList.noItemsToSelect||(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen||this._manualOpen||(this.isOpen=!1,this._isComposing=!1,this._editableSearchTerm?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())}toggleItem(e){!e||e.disabled||this.disabled||(this.deselectOnClick&&e.selected?this.unselect(e):this.select(e),this._editableSearchTerm&&this._setSearchTermFromItems())}select(e){e.selected||(this.itemsList.select(e),this.clearSearchOnAdd&&!this._editableSearchTerm&&this._clearSearch(),this._updateNgModel(),this.multiple&&this.addEvent.emit(e.value)),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close(),this._onSelectionChanged()}focus(){this.searchInput.nativeElement.focus()}blur(){this.searchInput.nativeElement.blur()}unselect(e){e&&(this.itemsList.unselect(e),this.focus(),this._updateNgModel(),this.removeEvent.emit(e.value),this._onSelectionChanged())}selectTag(){let e;Ue(this.addTag)?e=this.addTag(this.searchTerm):e=this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};let i=n=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(n,null):this.itemsList.addItem(n);gs(e)?e.then(n=>this.select(i(n))).catch(()=>{}):e&&this.select(i(e))}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}focusOnClear(){this.blur(),this.clearButton&&this.clearButton.nativeElement.focus()}showNoItemsFound(){let e=this.itemsList.filteredItems.length===0;return(e&&!this._isTypeahead&&!this.loading||e&&this._isTypeahead&&this._validTerm&&!this.loading)&&!this.showAddTag}showTypeToSearch(){return this.itemsList.filteredItems.length===0&&this._isTypeahead&&!this._validTerm&&!this.loading}onCompositionStart(){this._isComposing=!0}onCompositionEnd(e){this._isComposing=!1,!this.searchWhileComposing&&this.filter(e)}filter(e){this._isComposing&&!this.searchWhileComposing||(this.searchTerm=e,this._isTypeahead&&(this._validTerm||this.minTermLength===0)&&this.typeahead.next(e),this._isTypeahead||(this.itemsList.filter(this.searchTerm),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit({term:e,items:this.itemsList.filteredItems.map(i=>i.value)}),this.open())}onInputFocus(e){this.focused||(this._editableSearchTerm&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(e),this.focused=!0)}onInputBlur(e){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(e),!this.isOpen&&!this.disabled&&this._onTouched(),this._editableSearchTerm&&this._setSearchTermFromItems(),this.focused=!1}onItemHover(e){e.disabled||this.itemsList.markItem(e)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){let e=this.selectedItems&&this.selectedItems[0];this.searchTerm=e&&e.label||null}_setItems(e){let i=e[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=w(i)?!Fe(i):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(e),e.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&w(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){let e=n=>{this.items=n.map(r=>({$ngOptionValue:r.value,$ngOptionLabel:r.elementRef.nativeElement.innerHTML,disabled:r.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},i=()=>{let n=Be(this.ngOptions.changes,this._destroy$);Be(...this.ngOptions.map(r=>r.stateChange$)).pipe(N(n)).subscribe(r=>{let a=this.itemsList.findItem(r.value);a.disabled=r.disabled,a.label=r.label||a.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe(vt(this.ngOptions),N(this._destroy$)).subscribe(n=>{this.bindLabel=this._defaultLabel,e(n),i()})}_isValidWriteValue(e){if(!w(e)||this.multiple&&e===""||Array.isArray(e)&&e.length===0)return!1;let i=n=>!w(this.compareWith)&&Fe(n)&&this.bindValue?(this._console.warn(`Setting object(${JSON.stringify(n)}) as your model with bindValue is not allowed unless [compareWith] is used.`),!1):!0;return this.multiple?Array.isArray(e)?e.every(n=>i(n)):(this._console.warn("Multiple select ngModel should be array."),!1):i(e)}_handleWriteValue(e){if(!this._isValidWriteValue(e))return;let i=n=>{let r=this.itemsList.findItem(n);if(r)this.itemsList.select(r);else{let a=Fe(n),m=!a&&!this.bindValue;a||m?this.itemsList.select(this.itemsList.mapItem(n,null)):this.bindValue&&(r={[this.bindLabel]:null,[this.bindValue]:n},this.itemsList.select(this.itemsList.mapItem(r,null)))}};this.multiple?e.forEach(n=>i(n)):i(e)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe(N(this._destroy$),Et(e=>this._pressedKeys.push(e)),bt(200),Oe(()=>this._pressedKeys.length>0),T(()=>this._pressedKeys.join(""))).subscribe(e=>{let i=this.itemsList.findByLabel(e);i&&(this.isOpen?(this.itemsList.markItem(i),this._scrollToMarked(),this._cd.markForCheck()):this.select(i)),this._pressedKeys=[]})}_setInputAttributes(){let e=this.searchInput.nativeElement,i=be({type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId},this.inputAttrs);for(let n of Object.keys(i))e.setAttribute(n,i[n])}_updateNgModel(){let e=[];for(let n of this.selectedItems)if(this.bindValue){let r=null;if(n.children){let a=this.groupValue?this.bindValue:this.groupBy;r=n.value[a||this.groupBy]}else r=this.itemsList.resolveNested(n.value,this.bindValue);e.push(r)}else e.push(n.value);let i=this.selectedItems.map(n=>n.value);this.multiple?(this._onChange(e),this.changeEvent.emit(i)):(this._onChange(w(e[0])?e[0]:null),this.changeEvent.emit(i[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(e){this.searchTerm=e,this._isTypeahead&&this.typeahead.next(e)}_scrollToMarked(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollToTag()}_onSelectionChanged(){this.isOpen&&this.deselectOnClick&&this.appendTo&&(this._cd.detectChanges(),this.dropdownPanel.adjustPosition())}_handleTab(e){if(this.isOpen===!1){if(this.showClear()&&!e.shiftKey)this.focusOnClear(),e.preventDefault();else if(!this.addTag)return}this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),e.preventDefault()):this.showAddTag?(this.selectTag(),e.preventDefault()):this.close():this.close()}_handleEnter(e){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else if(this.openOnEnter)this.open();else return;e.preventDefault()}_handleSpace(e){this.isOpen||this._manualOpen||(this.open(),e.preventDefault())}_handleArrowDown(e){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),e.preventDefault()}_handleArrowUp(e){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),e.preventDefault())}_nextItemIsTag(e){let i=this.itemsList.markedIndex+e;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(i<0||i===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}_mergeGlobalConfig(e){this.placeholder=this.placeholder||e.placeholder,this.fixedPlaceholder=this.fixedPlaceholder||e.fixedPlaceholder,this.notFoundText=this.notFoundText||e.notFoundText,this.typeToSearchText=this.typeToSearchText||e.typeToSearchText,this.addTagText=this.addTagText||e.addTagText,this.loadingText=this.loadingText||e.loadingText,this.clearAllText=this.clearAllText||e.clearAllText,this.virtualScroll=w(this.virtualScroll)?this.virtualScroll:w(e.disableVirtualScroll)?!e.disableVirtualScroll:!1,this.openOnEnter=w(this.openOnEnter)?this.openOnEnter:e.openOnEnter,this.appendTo=this.appendTo||e.appendTo,this.bindValue=this.bindValue||e.bindValue,this.bindLabel=this.bindLabel||e.bindLabel,this.appearance=this.appearance||e.appearance}static{this.\u0275fac=function(i){return new(i||t)(Qe("class"),Qe("autofocus"),f(Ds),f(Yi,8),f(ae),f(Pt),f(Ls))}}static{this.\u0275cmp=H({type:t,selectors:[["ng-select"]],contentQueries:function(i,n,r){if(i&1&&(q(r,ut,5,S),q(r,pt,5,S),q(r,Cs,5,S),q(r,ht,5,S),q(r,vs,5,S),q(r,Es,5,S),q(r,ys,5,S),q(r,Ts,5,S),q(r,Ss,5,S),q(r,Is,5,S),q(r,xs,5,S),q(r,ws,5,S),q(r,ks,5)),i&2){let a;k(a=D())&&(n.optionTemplate=a.first),k(a=D())&&(n.optgroupTemplate=a.first),k(a=D())&&(n.labelTemplate=a.first),k(a=D())&&(n.multiLabelTemplate=a.first),k(a=D())&&(n.headerTemplate=a.first),k(a=D())&&(n.footerTemplate=a.first),k(a=D())&&(n.notFoundTemplate=a.first),k(a=D())&&(n.placeholderTemplate=a.first),k(a=D())&&(n.typeToSearchTemplate=a.first),k(a=D())&&(n.loadingTextTemplate=a.first),k(a=D())&&(n.tagTemplate=a.first),k(a=D())&&(n.loadingSpinnerTemplate=a.first),k(a=D())&&(n.ngOptions=a)}},viewQuery:function(i,n){if(i&1&&(_e(Gi,5),_e(On,7),_e(Pn,5)),i&2){let r;k(r=D())&&(n.dropdownPanel=r.first),k(r=D())&&(n.searchInput=r.first),k(r=D())&&(n.clearButton=r.first)}},hostVars:20,hostBindings:function(i,n){i&1&&x("keydown",function(a){return n.handleKeyDown(a)}),i&2&&G("ng-select-typeahead",n.typeahead)("ng-select-multiple",n.multiple)("ng-select-taggable",n.addTag)("ng-select-searchable",n.searchable)("ng-select-clearable",n.clearable)("ng-select-opened",n.isOpen)("ng-select",n.useDefaultClass)("ng-select-filtered",n.filtered)("ng-select-single",n.single)("ng-select-disabled",n.disabled)},inputs:{ariaLabelDropdown:"ariaLabelDropdown",bindLabel:"bindLabel",bindValue:"bindValue",ariaLabel:"ariaLabel",markFirst:[2,"markFirst","markFirst",B],placeholder:"placeholder",fixedPlaceholder:"fixedPlaceholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",preventToggleOnRightClick:"preventToggleOnRightClick",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:[2,"loading","loading",B],closeOnSelect:[2,"closeOnSelect","closeOnSelect",B],hideSelected:[2,"hideSelected","hideSelected",B],selectOnTab:[2,"selectOnTab","selectOnTab",B],openOnEnter:[2,"openOnEnter","openOnEnter",B],maxSelectedItems:[2,"maxSelectedItems","maxSelectedItems",Ie],groupBy:"groupBy",groupValue:"groupValue",bufferAmount:[2,"bufferAmount","bufferAmount",Ie],virtualScroll:[2,"virtualScroll","virtualScroll",B],selectableGroup:[2,"selectableGroup","selectableGroup",B],selectableGroupAsModel:[2,"selectableGroupAsModel","selectableGroupAsModel",B],searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:[2,"clearOnBackspace","clearOnBackspace",B],labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:[2,"tabIndex","tabIndex",Ie],readonly:[2,"readonly","readonly",B],searchWhileComposing:[2,"searchWhileComposing","searchWhileComposing",B],minTermLength:[2,"minTermLength","minTermLength",Ie],editableSearchTerm:[2,"editableSearchTerm","editableSearchTerm",B],ngClass:"ngClass",typeahead:"typeahead",multiple:[2,"multiple","multiple",B],addTag:"addTag",searchable:[2,"searchable","searchable",B],clearable:[2,"clearable","clearable",B],isOpen:"isOpen",items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd",deselectOnClick:"deselectOnClick",keyDownFn:"keyDownFn"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[pe([{provide:qt,useExisting:yt(()=>t),multi:!0},Qi]),Pe,Te],decls:13,vars:19,consts:[["searchInput",""],["defaultPlaceholderTemplate",""],["defaultLabelTemplate",""],["defaultLoadingSpinnerTemplate",""],["clearButton",""],["defaultOptionTemplate",""],["defaultTagTemplate",""],["defaultNotFoundTemplate",""],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""],[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng-input"],["aria-autocomplete","list","role","combobox",3,"blur","change","compositionend","compositionstart","focus","input","disabled","readOnly","value"],["role","button","tabindex","0",1,"ng-clear-wrapper",3,"title"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["role","listbox",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id"],[3,"ngTemplateOutlet"],[1,"ng-placeholder"],[1,"ng-value",3,"ng-value-disabled"],[1,"ng-value"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],[1,"ng-spinner-loader"],["aria-hidden","true",1,"ng-clear"],["role","listbox",1,"ng-dropdown-panel",3,"update","scroll","scrollToEnd","outsideClick","virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ngClass","id"],[1,"ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked"],["role","option",1,"ng-option",3,"ng-option-marked"],[1,"ng-option",3,"click","mouseover"],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],[1,"ng-tag-label"],[1,"ng-option","ng-option-disabled"]],template:function(i,n){if(i&1){let r=P();l(0,"div",10),x("mousedown",function(m){return v(r),E(n.handleMousedown(m))}),l(1,"div",11),b(2,jn,3,1)(3,qn,2,0)(4,zn,1,5,null,12),l(5,"div",13)(6,"input",14,0),x("blur",function(m){return v(r),E(n.onInputBlur(m))})("change",function(m){return v(r),E(m.stopPropagation())})("compositionend",function(){v(r);let m=U(7);return E(n.onCompositionEnd(m.value))})("compositionstart",function(){return v(r),E(n.onCompositionStart())})("focus",function(m){return v(r),E(n.onInputFocus(m))})("input",function(){v(r);let m=U(7);return E(n.filter(m.value))}),c()()(),b(8,Yn,3,1)(9,Zn,4,1,"span",15),l(10,"span",16),L(11,"span",17),c()(),b(12,hs,8,18,"ng-dropdown-panel",18)}i&2&&(G("ng-appearance-outline",n.appearance==="outline")("ng-has-value",n.hasValue),o(2),y(n.selectedItems.length===0&&!n.searchTerm||n.fixedPlaceholder===!0?2:-1),o(),y((!n.multiLabelTemplate||!n.multiple)&&n.selectedItems.length>0?3:-1),o(),y(n.multiple&&n.multiLabelTemplate&&n.selectedValues.length>0?4:-1),o(2),_("disabled",n.disabled)("readOnly",!n.searchable||n.itemsList.maxItemsSelected)("value",n.searchTerm?n.searchTerm:""),J("aria-activedescendant",n.isOpen?n.itemsList==null||n.itemsList.markedItem==null?null:n.itemsList.markedItem.htmlId:null)("aria-controls",n.isOpen?n.dropdownId:null)("aria-expanded",n.isOpen)("aria-label",n.ariaLabel)("id",n.labelForId)("tabindex",n.tabIndex),o(2),y(n.loading?8:-1),o(),y(n.showClear()?9:-1),o(3),y(n.isOpen?12:-1))},dependencies:[et,bs,Gi,Mt],styles:[`@charset "UTF-8";.ng-select{position:relative;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0} `],encapsulation:2,changeDetection:0})}}return t})(),Ji=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=At({type:t})}static{this.\u0275inj=Tt({providers:[{provide:Yi,useValue:Ki}]})}}return t})();var Os=(t,s)=>s.Key;function Ps(t,s){if(t&1){let e=P();l(0,"div",4),p(1),l(2,"span",5),x("click",function(){let n=v(e).$implicit,r=h().clear;return E(r(n))}),p(3,"\xD7"),c()()}if(t&2){let e=s.$implicit;o(),C(" ",e.Value," ")}}function Ns(t,s){if(t&1&&V(0,Ps,4,1,"div",4,Os),t&2){let e=s.items;M(e)}}function Vs(t,s){if(t&1&&(L(0,"input",6),p(1)),t&2){let e=s.item,i=s.item$,n=s.index;Xe("id","item-",n,""),_("ngModel",i.selected),o(),C(" ",e.Group," ")}}function Ms(t,s){if(t&1&&(L(0,"input",6),p(1)),t&2){let e=s.item,i=s.item$,n=s.index;Xe("id","item-",n,""),_("ngModel",i.selected),o(),C(" ",e.Value," ")}}var Xi=(()=>{class t{constructor(){this.options=[],this.values=[],this.valuesChange=new F}itemsChanged(){this.valuesChange.emit(this.values)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=H({type:t,selectors:[["bkd-multiselect"]],inputs:{options:"options",values:"values"},outputs:{valuesChange:"valuesChange"},decls:5,vars:10,consts:[["groupBy","Group","bindValue","Key","bindLabel","Value","dropdownPosition","bottom",1,"multiselect",3,"ngModelChange","click","clear","items","multiple","selectableGroup","selectableGroupAsModel","closeOnSelect","ngModel","placeholder","clearable"],["ng-multi-label-tmp",""],["ng-optgroup-tmp",""],["ng-option-tmp",""],[1,"ng-value"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"],["type","checkbox",3,"id","ngModel"]],template:function(i,n){i&1&&(l(0,"ng-select",0),d(1,"translate"),K("ngModelChange",function(a){return Q(n.values,a)||(n.values=a),a}),x("click",function(){return n.itemsChanged()})("clear",function(){return n.itemsChanged()}),b(2,Ns,2,0,"ng-template",1)(3,Vs,2,4,"ng-template",2)(4,Ms,2,4,"ng-template",3),c()),i&2&&(fe("placeholder",u(1,8,"shared.select.empty-option")),_("items",n.options)("multiple",!0)("selectableGroup",!0)("selectableGroupAsModel",!1)("closeOnSelect",!1),z("ngModel",n.values),_("clearable",!0))},dependencies:[Ji,Zi,pt,ut,ht,Me,Ut,Ve,Kt,me],encapsulation:2})}}return t})();var en=Gt({HRef:tt,Id:it,TeacherId:it,FullName:tt});var tn=(()=>{class t extends Ti{constructor(e,i){super(e,i,en,"TeacherResources","FullName","FullName")}getTypeaheadItemByKey(e){return this.http.get(`${this.baseUrl}/`,{params:{fields:[this.keyAttr,this.labelAttr].join(","),[`filter.${this.labelAttr}`]:`~*${e}*`}}).pipe(ye(di(this.typeaheadCodec)),ye(i=>_t({Key:i[0].FullName,Value:`${i[0].FullName}`})))}static{this.\u0275fac=function(i){return new(i||t)(j($t),j(he))}}static{this.\u0275prov=Z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var sn=(()=>{class t{constructor(e,i,n,r,a,m){this.studentsService=e,this.educationalEventsService=i,this.studyClassService=n,this.teacherResourcesService=r,this.state=a,this.translate=m,this.filter={student:null,educationalEvent:null,studyClass:null,teacher:null,dateFrom:null,dateTo:null,weekdays:null,presenceTypes:null,confirmationStates:null,incidentTypes:null},this.filterChange=new F,this.weekdaysGrouped$=this.state.weekdays$.pipe(T(g=>Ae(g,this.translate.instant("shared.multiselect.all-option")))),this.absenceConfirmationStatesGrouped$=this.state.absenceConfirmationStates$.pipe(T(g=>Ae(g,this.translate.instant("shared.multiselect.all-option")))),this.presenceTypesGrouped$=this.state.presenceTypes$.pipe(T(g=>g.filter(we(fi)).filter(we(rt))),T(ot),T(lt),T(g=>Ae(g,this.translate.instant("shared.multiselect.all-option")))),this.incidentTypesGrouped$=this.state.presenceTypes$.pipe(T(g=>g.filter(rt)),T(ot),T(lt),T(g=>Ae(g,this.translate.instant("shared.multiselect.all-option")))),this.classesHttpFilter={params:{fields:"IsActive","filter.IsActive":"=true"}}}show(){this.filterChange.emit(De(be({},this.filter),{dateFrom:nn(this.filter.dateFrom),dateTo:nn(this.filter.dateTo)}))}static{this.\u0275fac=function(i){return new(i||t)(f(Si),f(Mi),f(wi),f(tn),f(te),f(Re))}}static{this.\u0275cmp=H({type:t,selectors:[["bkd-edit-absences-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},features:[pe([{provide:ri,useClass:oi},{provide:ai,useClass:ki}])],decls:60,vars:60,consts:[[1,"row","g-3","mb-5"],[1,"col-md-6","col-lg-3"],[1,"form-label"],[3,"valueChange","typeaheadService","value"],[3,"valueChange","typeaheadService","value","additionalHttpParams"],[3,"valueChange","value"],[3,"valuesChange","options","values"],[1,"row","g-3","align-items-end"],[1,"col-sm-12","col-md"],[1,"col-auto"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,n){i&1&&(l(0,"div",0)(1,"div",1)(2,"label",2),p(3),d(4,"translate"),c(),l(5,"bkd-typeahead",3),K("valueChange",function(a){return Q(n.filter.student,a)||(n.filter.student=a),a}),c()(),l(6,"div",1)(7,"label",2),p(8),d(9,"translate"),c(),l(10,"bkd-typeahead",3),K("valueChange",function(a){return Q(n.filter.educationalEvent,a)||(n.filter.educationalEvent=a),a}),c()(),l(11,"div",1)(12,"label",2),p(13),d(14,"translate"),c(),l(15,"bkd-typeahead",4),K("valueChange",function(a){return Q(n.filter.studyClass,a)||(n.filter.studyClass=a),a}),c()(),l(16,"div",1)(17,"label",2),p(18),d(19,"translate"),c(),l(20,"bkd-typeahead",3),K("valueChange",function(a){return Q(n.filter.teacher,a)||(n.filter.teacher=a),a}),c()(),l(21,"div",1)(22,"label",2),p(23),d(24,"translate"),c(),l(25,"bkd-date-select",5),K("valueChange",function(a){return Q(n.filter.dateFrom,a)||(n.filter.dateFrom=a),a}),c()(),l(26,"div",1)(27,"label",2),p(28),d(29,"translate"),c(),l(30,"bkd-date-select",5),K("valueChange",function(a){return Q(n.filter.dateTo,a)||(n.filter.dateTo=a),a}),c()(),l(31,"div",1)(32,"label",2),p(33),d(34,"translate"),c(),l(35,"bkd-multiselect",6),d(36,"async"),K("valuesChange",function(a){return Q(n.filter.weekdays,a)||(n.filter.weekdays=a),a}),c()()(),l(37,"div",7)(38,"div",8)(39,"label",2),p(40),d(41,"translate"),c(),l(42,"bkd-multiselect",6),d(43,"async"),K("valuesChange",function(a){return Q(n.filter.confirmationStates,a)||(n.filter.confirmationStates=a),a}),c()(),l(44,"div",8)(45,"label",2),p(46),d(47,"translate"),c(),l(48,"bkd-multiselect",6),d(49,"async"),K("valuesChange",function(a){return Q(n.filter.presenceTypes,a)||(n.filter.presenceTypes=a),a}),c()(),l(50,"div",8)(51,"label",2),p(52),d(53,"translate"),c(),l(54,"bkd-multiselect",6),d(55,"async"),K("valuesChange",function(a){return Q(n.filter.incidentTypes,a)||(n.filter.incidentTypes=a),a}),c()(),l(56,"div",9)(57,"button",10),x("click",function(){return n.show()}),p(58),d(59,"translate"),c()()()),i&2&&(o(3),I(u(4,30,"edit-absences.header.student")),o(2),_("typeaheadService",n.studentsService),z("value",n.filter.student),o(3),I(u(9,32,"edit-absences.header.module-instance")),o(2),_("typeaheadService",n.educationalEventsService),z("value",n.filter.educationalEvent),o(3),I(u(14,34,"edit-absences.header.study-class")),o(2),_("typeaheadService",n.studyClassService),z("value",n.filter.studyClass),_("additionalHttpParams",n.classesHttpFilter),o(3),I(u(19,36,"edit-absences.header.teacher")),o(2),_("typeaheadService",n.teacherResourcesService),z("value",n.filter.teacher),o(3),I(u(24,38,"edit-absences.header.date-from")),o(2),z("value",n.filter.dateFrom),o(3),I(u(29,40,"edit-absences.header.date-to")),o(2),z("value",n.filter.dateTo),o(3),I(u(34,42,"edit-absences.header.weekdays")),o(2),_("options",u(36,44,n.weekdaysGrouped$)),z("values",n.filter.weekdays),o(5),I(u(41,46,"edit-absences.header.confirmation-state")),o(2),_("options",u(43,48,n.absenceConfirmationStatesGrouped$)),z("values",n.filter.confirmationStates),o(4),I(u(47,50,"edit-absences.header.presence-type")),o(2),_("options",u(49,52,n.presenceTypesGrouped$)),z("values",n.filter.presenceTypes),o(4),I(u(53,54,"edit-absences.header.incident")),o(2),_("options",u(55,56,n.incidentTypesGrouped$)),z("values",n.filter.incidentTypes),o(4),C(" ",u(59,58,"edit-absences.header.show")," "))},dependencies:[Li,Vi,Xi,ve,me],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:0 1rem 1rem 0;border-bottom:1px solid #dee2e6}"],changeDetection:0})}}return t})();function nn(t){return t?mi(t):null}var $s=(t,s)=>s.id,js=()=>[],rn=t=>({count:t}),an=t=>({returnparams:t}),Hs=t=>["student",t,"absences"];function Ws(t,s){t&1&&L(0,"bkd-spinner")}function Gs(t,s){if(t&1&&(l(0,"div",5)(1,"div",9),p(2),d(3,"async"),d(4,"translate"),d(5,"translate"),c(),l(6,"a",10),d(7,"async"),l(8,"i",11),p(9,"edit"),c()()()),t&2){let e=h(4),i=Y(0);o(2),Ce(" ",ne(4,7,"edit-absences.list.total",X(15,rn,u(3,5,e.state.total$)||0)),", ",ne(5,10,"edit-absences.list.selected",X(17,rn,i.length))," "),o(4),G("disabled",i.length===0),_("queryParams",X(19,an,u(7,13,e.state.queryParamsString$)))}}function qs(t,s){if(t&1){let e=P();l(0,"tr")(1,"td",14),x("click",function(n){v(e);let r=U(3),a=h(5);return E(a.onCheckboxCellClick(n,r))}),l(2,"input",12,0),d(4,"async"),x("change",function(){let n=v(e).$implicit,r=h(5);return E(r.selectionService.toggle(n.lessonPresence))}),c()(),l(5,"td",13),d(6,"translate"),l(7,"span",15)(8,"i",11),p(9),c()()(),l(10,"td"),d(11,"translate"),l(12,"a",16),d(13,"async"),p(14),c(),L(15,"br"),p(16),c(),l(17,"td"),d(18,"translate"),p(19),d(20,"date"),c(),l(21,"td"),d(22,"translate"),p(23),d(24,"date"),d(25,"date"),c(),l(26,"td"),d(27,"translate"),p(28),c(),l(29,"td",17),d(30,"translate"),p(31),c(),l(32,"td"),d(33,"translate"),p(34),c()()}if(t&2){let e=s.$implicit,i=h(5);o(2),_("checked",u(4,21,i.selectionService.isSelected$(e.lessonPresence))),o(3),J("data-label",u(6,23,"edit-absences.list.header.presence")),o(2),_("className",e.presenceCategory),o(2),I(e.presenceCategoryIcon),o(),J("data-label",u(11,25,"edit-absences.list.header.mobil-student-module-instance-study-class")),o(2),_("routerLink",X(48,Hs,e.lessonPresence.StudentRef.Id))("queryParams",X(50,an,u(13,27,i.profileReturnParams$))),o(2),C(" ",e.lessonPresence.StudentFullName," "),o(2),Ce(" ",e.lessonPresence.EventDesignation,", ",e.lessonPresence.StudyClassNumber," "),o(),J("data-label",u(18,29,"edit-absences.list.header.date")),o(2),C(" ",ne(20,31,e.lessonPresence.LessonDateTimeFrom,"mediumDate")," "),o(2),J("data-label",u(22,34,"edit-absences.list.header.time")),o(2),Ce(" ",ne(24,36,e.lessonPresence.LessonDateTimeFrom,"shortTime"),"\u2013",ne(25,39,e.lessonPresence.LessonDateTimeTo,"shortTime")," "),o(3),J("data-label",u(27,42,"edit-absences.list.header.confirmation-state")),o(2),C(" ",e.confirmationState==null?null:e.confirmationState.Value," "),o(),J("data-label",u(30,44,"edit-absences.list.header.mobil-presence-type-incident")),o(2),C(" ",e.presenceType==null?null:e.presenceType.Designation," "),o(),J("data-label",u(33,46,"edit-absences.list.header.teacher")),o(2),C(" ",e.lessonPresence.TeacherInformation," ")}}function Us(t,s){if(t&1){let e=P();l(0,"table",6)(1,"thead")(2,"tr")(3,"th")(4,"input",12),x("change",function(n){v(e);let r=h(4);return E(r.toggleAll(n.currentTarget==null?null:n.currentTarget.checked))}),c()(),l(5,"th",13),p(6),d(7,"translate"),c(),l(8,"th"),p(9),d(10,"translate"),L(11,"br"),p(12),d(13,"translate"),d(14,"translate"),c(),l(15,"th"),p(16),d(17,"translate"),c(),l(18,"th"),p(19),d(20,"translate"),c(),l(21,"th"),p(22),d(23,"translate"),c(),l(24,"th"),p(25),d(26,"translate"),d(27,"translate"),c(),l(28,"th"),p(29),d(30,"translate"),c()()(),l(31,"tbody"),V(32,qs,35,52,"tr",null,$s),c()()}if(t&2){h(4);let e=Y(0),i=Y(2);o(4),_("checked",e.length===i.length),o(2),C(" ",u(7,11,"edit-absences.list.header.presence")," "),o(3),C(" ",u(10,13,"edit-absences.list.header.student")," "),o(3),Ce(" ",u(13,15,"edit-absences.list.header.module-instance"),", ",u(14,17,"edit-absences.list.header.study-class")," "),o(4),C(" ",u(17,19,"edit-absences.list.header.date")," "),o(3),I(u(20,21,"edit-absences.list.header.time")),o(3),C(" ",u(23,23,"edit-absences.list.header.confirmation-state")," "),o(3),Ce(" ",u(26,25,"edit-absences.list.header.presence-type")," / ",u(27,27,"edit-absences.list.header.incident")," "),o(4),I(u(30,29,"edit-absences.list.header.teacher")),o(3),M(i)}}function zs(t,s){t&1&&L(0,"bkd-spinner",7)}function Qs(t,s){if(t&1){let e=P();l(0,"button",18),x("click",function(){v(e);let n=h(4);return E(n.state.nextPage())}),p(1),d(2,"translate"),c()}t&2&&(o(),C(" ",u(2,1,"global.pagination.load-more")," "))}function Ks(t,s){if(t&1){let e=P();l(0,"div",4),x("scrolled",function(){v(e);let n=h(3);return E(n.onScroll())}),b(1,Gs,10,21,"div",5)(2,Us,34,31,"table",6)(3,zs,1,0,"bkd-spinner",7)(4,Qs,3,3,"button",8),c()}if(t&2){h(3);let e=Y(2),i=Y(4),n=Y(6);o(),y(e&&e.length>0?1:-1),o(),y(e&&e.length>0?2:-1),o(),y(n?3:-1),o(),y(i&&!n?4:-1)}}function Ys(t,s){t&1&&(l(0,"p",2),p(1),d(2,"translate"),c()),t&2&&(o(),I(u(2,1,"edit-absences.no-entries")))}function Zs(t,s){if(t&1&&b(0,Ks,5,4,"div",3)(1,Ys,3,3,"p",2),t&2){h(2);let e=Y(2),i=Y(6);y(e&&e.length>0||i?0:1)}}function Js(t,s){if(t&1&&(b(0,Ws,1,0,"bkd-spinner"),d(1,"async"),b(2,Zs,2,1)),t&2){let e=h();y(u(1,1,e.state.loading$)?0:2)}}function Xs(t,s){t&1&&(l(0,"p",2),p(1),d(2,"translate"),c()),t&2&&(o(),I(u(2,1,"edit-absences.no-filter")))}var on=(()=>{class t{constructor(e,i,n,r){this.state=e,this.selectionService=i,this.scrollPosition=n,this.route=r,this.filterFromParams$=this.route.queryParams.pipe(T(er)),this.profileReturnParams$=this.state.queryParamsString$,this.destroy$=new re}ngOnInit(){this.filterFromParams$.pipe(ie(1)).subscribe(e=>this.state.setFilter(e)),this.state.validFilter$.pipe(N(this.destroy$)).subscribe(()=>this.selectionService.clear()),this.selectionService.selection$.pipe(N(this.destroy$)).subscribe(e=>this.state.selected=e),this.route.queryParams.pipe(ie(1),T(({reload:e})=>e),Oe(pi)).subscribe(()=>this.state.resetEntries())}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}toggleAll(e){this.state.entries$.pipe(ie(1)).subscribe(i=>this.selectionService.clear(e?i:null))}onCheckboxCellClick(e,i){e.target!==i&&i.click()}onScroll(){this.state.nextPage()}static{this.\u0275fac=function(i){return new(i||t)(f(te),f(Ge),f(Oi),f(Ne))}}static{this.\u0275cmp=H({type:t,selectors:[["bkd-edit-absences-list"]],features:[pe([Ge])],decls:16,vars:22,consts:[["checkbox",""],[3,"filterChange","filter"],[1,"mt-3"],["infiniteScroll","",1,"py-3"],["infiniteScroll","",1,"py-3",3,"scrolled"],[1,"d-flex","align-items-center","justify-content-between"],[1,"table","table-striped"],[1,"inline"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto"],[1,"total"],["routerLink","/edit-absences/edit",1,"edit","btn","btn-primary","btn-icon","mt-1","mb-2",3,"queryParams"],[1,"material-icons"],["type","checkbox",3,"change","checked"],[1,"presence-category"],[1,"edit-absences-checkbox",3,"click"],[3,"className"],[1,"student",3,"routerLink","queryParams"],[1,"designation-incident"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto",3,"click"]],template:function(i,n){if(i&1){let r=P();oe(0),d(1,"async"),oe(2),d(3,"async"),oe(4),d(5,"async"),oe(6),d(7,"async"),l(8,"h1"),p(9),d(10,"translate"),c(),l(11,"bkd-edit-absences-header",1),d(12,"async"),x("filterChange",function(m){return v(r),E(n.state.setFilter(m))}),c(),b(13,Js,3,3),d(14,"async"),b(15,Xs,3,3,"p",2)}if(i&2){let r;le((r=u(1,3,n.selectionService.selection$))!==null&&r!==void 0?r:Dt(21,js)),o(2),le(u(3,6,n.state.presenceControlEntries$)),o(2),le(u(5,9,n.state.hasMore$)),o(2),le(u(7,12,n.state.loadingPage$)),o(3),I(u(10,15,"edit-absences.title")),o(2),_("filter",u(12,17,n.filterFromParams$)),o(2),y(u(14,19,n.state.isFilterValid$)?13:15)}},dependencies:[sn,Ni,Wt,Ei,ve,Rt,me],styles:[".presence-category[_ngcontent-%COMP%]{text-align:center}.presence-category[_ngcontent-%COMP%] .absent[_ngcontent-%COMP%]{color:#ea161f}.presence-category[_ngcontent-%COMP%] .present[_ngcontent-%COMP%]{color:#3d8608}.presence-category[_ngcontent-%COMP%] .unapproved[_ngcontent-%COMP%]{color:#ffa814}.designation-incident[_ngcontent-%COMP%]{max-width:50ch}@media screen and (max-width: 820px){.edit-absences-checkbox[_ngcontent-%COMP%]{text-align:left}.presence-category[_ngcontent-%COMP%]{text-align:right}.designation-incident[_ngcontent-%COMP%]{max-width:initial}}"],changeDetection:0})}}return t})();function er(t){return{student:t.student?Number(t.student):null,educationalEvent:t.educationalEvent?Number(t.educationalEvent):null,studyClass:t.studyClass?Number(t.studyClass):null,teacher:t.teacher??null,dateFrom:t.dateFrom?nt(t.dateFrom):null,dateTo:t.dateTo?nt(t.dateTo):null,weekdays:t.weekdays?t.weekdays.split(","):null,presenceTypes:t.presenceTypes?t.presenceTypes.split(",").map(Number):null,confirmationStates:t.confirmationStates?t.confirmationStates.split(",").map(Number):null,incidentTypes:t.incidentTypes?t.incidentTypes.split(",").map(Number):null}}var ln=(()=>{class t{constructor(e){this.state=e}static{this.\u0275fac=function(i){return new(i||t)(f(te))}}static{this.\u0275cmp=H({type:t,selectors:[["bkd-edit-absences"]],features:[pe([te,{provide:hi,useExisting:te},gi])],decls:1,vars:0,template:function(i,n){i&1&&L(0,"router-outlet")},dependencies:[jt],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var lo=[{path:"",component:ln,children:[{path:"",component:on,data:{restoreScrollPositionFrom:["/edit-absences/edit","/edit-absences/student/:id/addresses","/edit-absences/student/:id/absences","/edit-absences/student/:id/grades"]}},{path:"edit",component:Hi},xi]}];export{lo as EDIT_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-ZGDP3BAB.js b/public/apps/webapp-schulverwaltung/chunk-QB4DIFWS.js similarity index 89% rename from public/apps/webapp-schulverwaltung/chunk-ZGDP3BAB.js rename to public/apps/webapp-schulverwaltung/chunk-QB4DIFWS.js index 8f54f2b1..d35a531f 100644 --- a/public/apps/webapp-schulverwaltung/chunk-ZGDP3BAB.js +++ b/public/apps/webapp-schulverwaltung/chunk-QB4DIFWS.js @@ -1 +1 @@ -import{Cd as k,Ea as b,Fa as f,Ma as h,Oa as v,Pa as _,Qa as g,Ua as C,Za as a,_a as r,da as d,db as x,ea as m,fb as s,gb as y,pa as o,qb as p,wa as u}from"./chunk-34ZOBT6Z.js";function S(e,l){if(e&1){let n=x();a(0,"button",5),s("click",function(){d(n);let t=y();return m(t.value.set(""))}),a(1,"i",2),p(2,"clear"),r()()}}var z=(()=>{class e{constructor(){this.value=b(""),this.disabled=o(!1),this.placeholder=o(""),this.label=o("")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=f({type:e,selectors:[["bkd-resettable-input"]],inputs:{value:[1,"value"],disabled:[1,"disabled"],placeholder:[1,"placeholder"],label:[1,"label"]},outputs:{value:"valueChange"},decls:6,vars:7,consts:[[1,"input-group"],["id","resettable-input",1,"input-group-text"],[1,"material-icons"],["type","text","aria-describedby","resettable-input",1,"form-control",3,"input","value","disabled"],["type","button",1,"clear","btn","btn-link","text-decoration-none"],["type","button",1,"clear","btn","btn-link","text-decoration-none",3,"click"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"span",1)(2,"i",2),p(3,"search"),r()(),a(4,"input",3),s("input",function(c){return t.value.set(c.target==null?null:c.target.value)}),r(),h(5,S,3,0,"button",4),r()),i&2&&(u(4),g("has-value",t.value()),_("value",t.value())("disabled",t.disabled()),v("placeholder",t.placeholder())("aria-label",t.label()),u(),C(t.value()?5:-1))},styles:["input.has-value[_ngcontent-%COMP%]{padding-right:2.5em}.btn.clear[_ngcontent-%COMP%]{position:absolute;right:0;z-index:5;padding-left:.5rem;padding-right:.5rem}"]})}}return e})();function O(e,l,n){return n?e.filter(w(l,n)):e}function w(e,l){let n=E(l);return i=>e.some(t=>I(i[t],n))}function I(e,l){return e?E(String(e)).includes(l):!1}function E(e){return k(e.toLowerCase())}export{z as a,O as b}; +import{$a as r,Dd as k,Fa as b,Ga as f,Na as h,Pa as v,Qa as _,Ra as g,Va as C,_a as a,ea as d,eb as x,fa as m,gb as s,hb as y,qa as o,rb as p,xa as u}from"./chunk-2W7IS4PN.js";function S(e,l){if(e&1){let n=x();a(0,"button",5),s("click",function(){d(n);let t=y();return m(t.value.set(""))}),a(1,"i",2),p(2,"clear"),r()()}}var z=(()=>{class e{constructor(){this.value=b(""),this.disabled=o(!1),this.placeholder=o(""),this.label=o("")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=f({type:e,selectors:[["bkd-resettable-input"]],inputs:{value:[1,"value"],disabled:[1,"disabled"],placeholder:[1,"placeholder"],label:[1,"label"]},outputs:{value:"valueChange"},decls:6,vars:7,consts:[[1,"input-group"],["id","resettable-input",1,"input-group-text"],[1,"material-icons"],["type","text","aria-describedby","resettable-input",1,"form-control",3,"input","value","disabled"],["type","button",1,"clear","btn","btn-link","text-decoration-none"],["type","button",1,"clear","btn","btn-link","text-decoration-none",3,"click"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"span",1)(2,"i",2),p(3,"search"),r()(),a(4,"input",3),s("input",function(c){return t.value.set(c.target==null?null:c.target.value)}),r(),h(5,S,3,0,"button",4),r()),i&2&&(u(4),g("has-value",t.value()),_("value",t.value())("disabled",t.disabled()),v("placeholder",t.placeholder())("aria-label",t.label()),u(),C(t.value()?5:-1))},styles:["input.has-value[_ngcontent-%COMP%]{padding-right:2.5em}.btn.clear[_ngcontent-%COMP%]{position:absolute;right:0;z-index:5;padding-left:.5rem;padding-right:.5rem}"]})}}return e})();function O(e,l,n){return n?e.filter(w(l,n)):e}function w(e,l){let n=E(l);return i=>e.some(t=>I(i[t],n))}function I(e,l){return e?E(String(e)).includes(l):!1}function E(e){return k(e.toLowerCase())}export{z as a,O as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-4CSFXSJN.js b/public/apps/webapp-schulverwaltung/chunk-RTY26FN4.js similarity index 73% rename from public/apps/webapp-schulverwaltung/chunk-4CSFXSJN.js rename to public/apps/webapp-schulverwaltung/chunk-RTY26FN4.js index 603947d5..0dfdd547 100644 --- a/public/apps/webapp-schulverwaltung/chunk-4CSFXSJN.js +++ b/public/apps/webapp-schulverwaltung/chunk-RTY26FN4.js @@ -1 +1 @@ -import{n as e}from"./chunk-U5XSAHDS.js";import{e as p}from"./chunk-UFRLS5GG.js";import{Ld as o,P as i,X as c,_ as s,bd as m,kc as n}from"./chunk-34ZOBT6Z.js";var I=(()=>{class t extends p{constructor(a,r){super(a,r,e,"StudyClasses","Number")}getActive(){return this.http.get(`${this.baseUrl}/?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(i(o(e)))}getActiveFormativeAssessments(){return this.http.get(`${this.baseUrl}/FormativeAssessments?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(i(o(e)))}static{this.\u0275fac=function(r){return new(r||t)(s(n),s(m))}}static{this.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{I as a}; +import{n as e}from"./chunk-A3CECLYB.js";import{e as p}from"./chunk-Z4YBXGVO.js";import{Md as o,P as i,X as c,_ as s,cd as m,lc as n}from"./chunk-2W7IS4PN.js";var I=(()=>{class t extends p{constructor(a,r){super(a,r,e,"StudyClasses","Number")}getActive(){return this.http.get(`${this.baseUrl}/?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(i(o(e)))}getActiveFormativeAssessments(){return this.http.get(`${this.baseUrl}/FormativeAssessments?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(i(o(e)))}static{this.\u0275fac=function(r){return new(r||t)(s(n),s(m))}}static{this.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{I as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-UOR7VPK5.js b/public/apps/webapp-schulverwaltung/chunk-S4T5K3GB.js similarity index 93% rename from public/apps/webapp-schulverwaltung/chunk-UOR7VPK5.js rename to public/apps/webapp-schulverwaltung/chunk-S4T5K3GB.js index 6c62e058..17280119 100644 --- a/public/apps/webapp-schulverwaltung/chunk-UOR7VPK5.js +++ b/public/apps/webapp-schulverwaltung/chunk-S4T5K3GB.js @@ -1 +1 @@ -import{a as we,b as De}from"./chunk-ZGDP3BAB.js";import{b as ve,d as Oe,e as $e}from"./chunk-HAKJPBT5.js";import{b as Ie}from"./chunk-HAMVO7SX.js";import"./chunk-Y4QYVF5K.js";import"./chunk-UVJXXYOR.js";import{a as z}from"./chunk-ZA3SEXFP.js";import{D as ye,E as Se,F as xe,K as Ae,L as y,P as ke,R as Pe,T as Ee,U as Te,a as ge}from"./chunk-EDO6DY2V.js";import{l as Q}from"./chunk-PQGQXFEQ.js";import{b as Le}from"./chunk-UPZQ4FTT.js";import{b as Me}from"./chunk-5NJNJ42P.js";import{A as _e,z as Ce}from"./chunk-JHVNIEZK.js";import"./chunk-LTVWFE76.js";import{$a as x,Ab as U,Bb as I,Cb as ae,Db as j,Eb as K,F as _,Fa as P,Fb as pe,Ib as a,Jb as l,Kb as B,M as N,Ma as w,Nd as he,Od as fe,P as V,Pa as C,Qa as se,R as Y,Ua as R,Wa as oe,X as ie,Xa as G,Ya as J,Za as c,_ as T,_a as r,bc as q,cc as le,da as O,db as D,ea as $,f as k,fb as M,g as W,gb as f,k as ee,n as b,o as S,pb as re,qb as u,rb as v,sb as E,tb as ce,vc as de,w as te,wa as s,wc as me,x as ne,xa as h,xc as ue,yc as be,zb as F}from"./chunk-34ZOBT6Z.js";var Ue=["studentFullName","studyClassNumber"],A=(()=>{class n{constructor(e,t,i,o){this.lessonPresencesService=e,this.selectionService=t,this.loadingService=i,this.translate=o,this.loading$=this.loadingService.loading$,this.search$=new W(""),this.updateUnconfirmedAbsences$=new k,this.unconfirmedAbsences$=te(this.loadUnconfirmedAbsences(),this.updateUnconfirmedAbsences$).pipe(N(1)),this.entries$=this.unconfirmedAbsences$.pipe(b(ye),N(1)),this.sortCriteriaSubject$=new W({primarySortKey:"date",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=S([this.entries$,this.sortCriteria$]).pipe(b(Q(Se))),this.filteredEntries$=S([this.sortedEntries$,this.search$]).pipe(b(([d,p])=>De(d,Ue,p)),N(1)),this.currentDetail=null}getUnconfirmedAbsences(e,t){return this.entries$.pipe(b(i=>{let o=i.find(d=>d.dateString===e&&d.studentId===t);return o?o.absences:[]}))}getAllUnconfirmedAbsencesForStudent(e){return this.entries$.pipe(b(t=>t.filter(i=>i.studentId===e).reduce((i,o)=>i.concat(o.absences),[])))}toggleSort(e){this.sortCriteriaSubject$.pipe(_(1)).subscribe(t=>{t.primarySortKey===e?this.sortCriteriaSubject$.next({primarySortKey:e,ascending:!t.ascending}):this.sortCriteriaSubject$.next({primarySortKey:e,ascending:e==="name"})})}get confirmBackLink(){return this.currentDetail?["/open-absences/detail",this.currentDetail.personId,this.currentDetail.date]:["/open-absences"]}updateAfterConfirm(){S([this.unconfirmedAbsences$.pipe(_(1)),this.selectionService.selectedIds$.pipe(_(1))]).pipe(b(Q(xe))).subscribe(e=>{this.selectionService.clear(),this.updateUnconfirmedAbsences$.next(e)})}buildMailToString(e,t){let i=e.Email,o=this.translate.instant("open-absences.detail.mail.subject"),d=t.map(L=>Ae(L)).join("%0D%0A"),p=`${this.translate.instant("open-absences.detail.mail.body")}%0D%0A${d}`;return p.length>=1600&&(p=`${p.substring(0,1500)}%0D%0A${this.translate.instant("open-absences.detail.mail.bodyToLargeForEmailTo")}`),`${i}?subject=${o}&body=${p}`}loadUnconfirmedAbsences(){return this.loadingService.load(this.lessonPresencesService.getListOfUnconfirmed())}static{this.\u0275fac=function(t){return new(t||n)(T($e),T(y),T(Le),T(he))}}static{this.\u0275prov=ie({token:n,factory:n.\u0275fac})}}return n})();var qe=()=>["/open-absences"],Be=(()=>{class n{constructor(e,t,i,o,d,p,L){this.router=e,this.route=t,this.openAbsencesService=i,this.presenceTypesService=o,this.personService=d,this.selectionService=p,this.scrollPosition=L,this.absences$=this.route.paramMap.pipe(V(this.getAbsencesForParams.bind(this))),this.hasAbsences$=this.absences$.pipe(b(Ce(1))),this.studentFullName$=this.absences$.pipe(b(m=>m[0]&&m[0].StudentFullName||null)),this.allSelected$=S([this.absences$,this.selectionService.selection$]).pipe(b(([m,H])=>m.length===H.length)),this.studentEmail$=this.absences$.pipe(b(m=>m[0]&&m[0].StudentRef.Id||null),V(m=>m?this.personService.getByIdWithEmailInfos(m):ee)),this.allUnconfirmedAbsencesForStudent$=this.route.paramMap.pipe(V(this.getAbsencesForStudentParam.bind(this))),this.mailTo$=S([this.studentEmail$,this.allUnconfirmedAbsencesForStudent$]).pipe(b(([m,H])=>this.openAbsencesService.buildMailToString(m,H))),this.destroy$=new k}ngOnInit(){this.selectionService.clearNonLessonPresences(),this.route.paramMap.pipe(Y(this.destroy$)).subscribe(e=>this.openAbsencesService.currentDetail={date:String(e.get("date")),personId:Number(e.get("personId"))}),this.hasAbsences$.pipe(Y(this.destroy$),ne(ge(_e))).subscribe(()=>void this.router.navigate(["/open-absences"]))}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}toggleAll(e){e?this.absences$.pipe(_(1)).subscribe(t=>this.selectionService.clear(t)):this.selectionService.clear()}onRowClick(e,t){e.target!==t&&t.click()}getPresenceTypeDesignation(e){return this.presenceTypesService.displayedTypes$.pipe(b(t=>e.TypeRef.Id&&t.find(i=>i.Id===e.TypeRef.Id)?.Designation||null))}getAbsencesForParams(e){return this.openAbsencesService.getUnconfirmedAbsences(String(e.get("date")),Number(e.get("personId")))}getAbsencesForStudentParam(e){return this.openAbsencesService.getAllUnconfirmedAbsencesForStudent(Number(e.get("personId")))}static{this.\u0275fac=function(t){return new(t||n)(h(ue),h(de),h(A),h(ke),h(Ie),h(y),h(z))}}static{this.\u0275cmp=P({type:n,selectors:[["bkd-open-absences-detail"]],decls:6,vars:10,consts:[[3,"link"],[3,"absences$","selectionService","confirmLink","displayEmail","mailTo$"]],template:function(t,i){t&1&&(c(0,"div"),x(1,"bkd-backlink",0),c(2,"h1"),u(3),a(4,"async"),r()(),x(5,"bkd-student-dossier-absences",1)),t&2&&(s(),C("link",j(9,qe)),s(2),v(l(4,7,i.studentFullName$)),s(2),C("absences$",i.absences$)("selectionService",i.selectionService)("confirmLink","/open-absences/confirm")("displayEmail",!0)("mailTo$",i.mailTo$))},dependencies:[Te,Ee,q],styles:['.content[_ngcontent-%COMP%]{padding-left:1rem;padding-right:1rem}.back[_ngcontent-%COMP%]{color:#000;text-decoration:none}.back[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%], .back[_ngcontent-%COMP%]:active span[_ngcontent-%COMP%]{text-decoration:underline}.absence-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox lesson-class time teacher" "checkbox presence-type date days-ago";grid-template-columns:min-content 2fr 1fr 2fr}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.6rem .5rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.all[_ngcontent-%COMP%]{grid-area:all}.lesson-class[_ngcontent-%COMP%]{grid-area:lesson-class;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.time[_ngcontent-%COMP%]{grid-area:time}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.presence-type[_ngcontent-%COMP%]{color:#adb5bd;grid-area:presence-type}.date[_ngcontent-%COMP%]{grid-area:date}.days-ago[_ngcontent-%COMP%]{color:#adb5bd;grid-area:days-ago}.date-days-ago[_ngcontent-%COMP%]{grid-area:date-days-ago;display:none}@media (max-width: 750px){.content[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.absence-entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox lesson-class" "checkbox teacher" "checkbox date-days-ago" "checkbox time" "checkbox presence-type";grid-template-columns:min-content 1fr}.date-days-ago[_ngcontent-%COMP%]{display:block}.date[_ngcontent-%COMP%], .days-ago[_ngcontent-%COMP%]{display:none}}'],changeDetection:0})}}return n})();var ze=(n,g)=>g.id,Ne=()=>[],Z=n=>({count:n}),He=(n,g)=>["detail",n,g];function We(n,g){if(n&1&&(c(0,"div",2)(1,"div",5),u(2),a(3,"translate"),r(),c(4,"a",6)(5,"i",7),u(6,"edit"),r()()()),n&2){f();let e=I(0);s(2),E(" ",B(3,3,"open-absences.selected",K(6,Z,e.length))," "),s(2),se("disabled",e.length===0)}}function Ye(n,g){n&1&&x(0,"bkd-spinner")}function Ge(n,g){n&1&&(c(0,"p",3),u(1),a(2,"translate"),r()),n&2&&(s(),v(l(2,1,"open-absences.noEntries")))}function Je(n,g){if(n&1&&(c(0,"span",13),u(1),r()),n&2){let e=f().$implicit,t=f(2),i=I(4);s(),v(t.getSortDirectionCharacter(i,e))}}function Qe(n,g){if(n&1){let e=D();c(0,"div",12),M("click",function(){let i=O(e).$implicit,o=f(2);return $(o.openAbsencesService.toggleSort(i))}),u(1),a(2,"translate"),w(3,Je,2,1,"span",13),r()}if(n&2){let e=g.$implicit;f(2);let t=I(4);C("className",e),s(),E(" ",l(2,3,"open-absences.list.header."+e)," "),s(2),R(t?3:-1)}}function Xe(n,g){if(n&1){let e=D();c(0,"div")(1,"div",14)(2,"div",15),M("click",function(i){O(e);let o=re(4),d=f(2);return $(d.onCheckboxCellClick(i,o))}),c(3,"input",10,0),a(5,"async"),M("change",function(){let i=O(e).$implicit,o=f(2);return $(o.selectionService.toggle(i))}),r()(),c(6,"div",16)(7,"a",17),u(8),r()(),c(9,"div",18),u(10),r(),c(11,"div",19),u(12),a(13,"translate"),r(),c(14,"div",20),u(15),a(16,"translate"),r(),c(17,"div",21),u(18),a(19,"bkdDaysDifference"),r(),c(20,"div",22),u(21),a(22,"date"),r()()()}if(n&2){let e=g.$implicit,t=f(2);s(3),C("checked",l(5,9,t.selectionService.isSelected$(e))),s(4),C("routerLink",pe(22,He,e.studentId,e.dateString)),s(),v(e.studentFullName),s(2),E(" ",e.studyClassNumber," "),s(2),E(" ",B(13,11,t.getLessonsCountKey(e),K(25,Z,e.lessonsCount))," "),s(3),ce(" ",e.studyClassNumber,", ",B(16,14,t.getLessonsCountKey(e),K(27,Z,e.lessonsCount))," "),s(3),E(" ",l(19,17,e.date)," "),s(3),v(B(22,19,e.date,"dd.MM.yyyy"))}}function Ze(n,g){if(n&1){let e=D();c(0,"div",4)(1,"div",8)(2,"div",9)(3,"input",10),M("change",function(i){O(e);let o=f();return $(o.onToggleAll(i.currentTarget==null?null:i.currentTarget.checked))}),r()(),G(4,Qe,4,5,"div",11,oe),r(),G(6,Xe,23,29,"div",null,ze),r()}if(n&2){let e=f(),t=I(0),i=I(2);s(3),C("checked",t.length===i.length),s(),J(e.primarySortKeys),s(2),J(i)}}var Ve=(()=>{class n{constructor(e,t,i){this.openAbsencesService=e,this.selectionService=t,this.scrollPosition=i,this.primarySortKeys=["name","date"],this.destroy$=new k}ngOnInit(){this.openAbsencesService.currentDetail=null,this.selectionService.clearNonOpenAbsencesEntries()}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}onToggleAll(e){this.openAbsencesService.filteredEntries$.pipe(_(1)).subscribe(t=>{this.selectionService.clear(e?t:null)})}onCheckboxCellClick(e,t){e.target!==t&&t.click()}getSortDirectionCharacter(e,t){return e.primarySortKey!==t?"":e.ascending?"\u2193":"\u2191"}getLessonsCountKey(e){return`open-absences.list.content.lessonsCount.${e.lessonsCount===1?"singular":"plural"}`}static{this.\u0275fac=function(t){return new(t||n)(h(A),h(y),h(z))}}static{this.\u0275cmp=P({type:n,selectors:[["bkd-open-absences-list"]],decls:22,vars:29,consts:[["checkbox",""],[1,"d-flex","header-search",3,"valueChange","value","placeholder","label"],[1,"d-flex","align-items-center","justify-content-between","mt-1"],[1,"mt-3"],[1,"content"],[1,"selection-count","ps-1"],["routerLink","/open-absences/confirm",1,"edit","btn","btn-primary","btn-edit","mt-1","mb-2"],[1,"material-icons"],[1,"absence-header"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[3,"className"],[3,"click","className"],[1,"sort-direction"],[1,"absence-entry"],[1,"checkbox",3,"click"],[1,"name","pe-2"],[3,"routerLink"],[1,"study-class"],[1,"lessons-count"],[1,"study-class-lessons-count"],[1,"days-ago"],[1,"date"]],template:function(t,i){if(t&1){let o=D();F(0),a(1,"async"),F(2),a(3,"async"),F(4),a(5,"async"),F(6),a(7,"async"),c(8,"h1"),u(9),a(10,"translate"),r(),c(11,"div")(12,"div")(13,"bkd-resettable-input",1),a(14,"async"),a(15,"translate"),a(16,"translate"),M("valueChange",function(p){return O(o),$(i.openAbsencesService.search$.next(p))}),r(),w(17,We,7,8,"div",2),r(),w(18,Ye,1,0,"bkd-spinner"),a(19,"async"),w(20,Ge,3,3,"p",3)(21,Ze,8,1,"div",4),r()}if(t&2){let o,d,p;U((o=l(1,6,i.selectionService.selection$))!==null&&o!==void 0?o:j(27,Ne)),s(2);let L=U((d=l(3,9,i.openAbsencesService.filteredEntries$))!==null&&d!==void 0?d:j(28,Ne));s(2),U(l(5,12,i.openAbsencesService.sortCriteria$));let m=((p=(p=l(7,15,i.openAbsencesService.sortedEntries$))==null?null:p.length)!==null&&p!==void 0?p:0)===0||L.length===0;s(5),v(l(10,17,"open-absences.title")),s(4),C("value",l(14,19,i.openAbsencesService.search$))("placeholder",l(15,21,"open-absences.search-by-name-or-class"))("label",l(16,23,"open-absences.search")),s(4),R(m?-1:17),s(),R(l(19,25,i.openAbsencesService.loading$)?18:m?20:21)}},dependencies:[we,be,Me,q,le,fe,Pe],styles:['.header-search[_ngcontent-%COMP%]{max-width:500px}.absence-header[_ngcontent-%COMP%]{cursor:pointer;padding:1rem;display:grid;grid-template-areas:"checkbox name date";grid-template-columns:min-content 5fr 1fr;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6;align-items:center}.absence-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox name study-class lessons-count days-ago date";grid-template-columns:min-content 2fr 1fr 1fr 1fr 1fr;align-items:center}.checkbox[_ngcontent-%COMP%]{align-self:start;grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.name[_ngcontent-%COMP%]{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.lessons-count[_ngcontent-%COMP%]{grid-area:lessons-count}.study-class[_ngcontent-%COMP%]{grid-area:study-class}.study-class-lessons-count[_ngcontent-%COMP%]{grid-area:study-class-lessons-count;display:none}.days-ago[_ngcontent-%COMP%]{color:#6c757d;grid-area:days-ago}.date[_ngcontent-%COMP%]{grid-area:date}@media (max-width: 750px){.content[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.absence-header[_ngcontent-%COMP%]{grid-template-areas:"checkbox name date";grid-template-columns:min-content 3fr 2fr}.absence-entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox name date" "checkbox study-class-lessons-count days-ago";grid-template-columns:min-content 3fr 2fr}.study-class-lessons-count[_ngcontent-%COMP%]{display:block}.study-class[_ngcontent-%COMP%], .lessons-count[_ngcontent-%COMP%]{display:none}.days-ago[_ngcontent-%COMP%], .study-class-lessons-count[_ngcontent-%COMP%]{font-size:.875rem;color:#adb5bd}}'],changeDetection:0})}}return n})();var Re=(()=>{class n{constructor(){}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["bkd-open-absences"]],features:[ae([A,y,{provide:ve,useExisting:A}])],decls:1,vars:0,template:function(t,i){t&1&&x(0,"router-outlet")},dependencies:[me],encapsulation:2,changeDetection:0})}}return n})();var Bt=[{path:"",component:Re,children:[{path:"",component:Ve,data:{restoreScrollPositionFrom:["/open-absences/detail/:personId/:date","/open-absences/confirm"]}},{path:"detail/:personId/:date",component:Be,data:{restoreScrollPositionFrom:["/open-absences/confirm"]}},{path:"confirm",component:Oe}]}];export{Bt as OPEN_ABSENCES_ROUTES}; +import{a as we,b as De}from"./chunk-QB4DIFWS.js";import{b as ve,d as Oe,e as $e}from"./chunk-746ASKQ4.js";import{b as Ie}from"./chunk-DTTSX64G.js";import"./chunk-Y4QYVF5K.js";import"./chunk-AYQPMCNZ.js";import{a as z}from"./chunk-3P6YOVUR.js";import{D as ye,E as Se,F as xe,K as Ae,L as y,P as ke,R as Pe,T as Ee,U as Te,a as ge}from"./chunk-SRCW6BUG.js";import{l as Q}from"./chunk-GOGVGWFJ.js";import{b as Le}from"./chunk-OSOXMODN.js";import{b as Me}from"./chunk-PSYDBHTH.js";import{A as _e,z as Ce}from"./chunk-W4U7QKJF.js";import"./chunk-AVBHFGIF.js";import{$a as r,Ab as F,Bb as U,Cb as I,Db as ae,Eb as j,F as _,Fb as K,Ga as P,Gb as pe,Jb as a,Kb as l,Lb as B,M as N,Na as w,Od as he,P as V,Pd as fe,Qa as C,R as Y,Ra as se,Va as R,X as ie,Xa as oe,Ya as G,Za as J,_ as T,_a as c,ab as x,cc as q,dc as le,ea as O,eb as D,f as k,fa as $,g as W,gb as M,hb as f,k as ee,n as b,o as S,qb as re,rb as u,sb as v,tb as E,ub as ce,w as te,wc as de,x as ne,xa as s,xc as me,ya as h,yc as ue,zc as be}from"./chunk-2W7IS4PN.js";var Ue=["studentFullName","studyClassNumber"],A=(()=>{class n{constructor(e,t,i,o){this.lessonPresencesService=e,this.selectionService=t,this.loadingService=i,this.translate=o,this.loading$=this.loadingService.loading$,this.search$=new W(""),this.updateUnconfirmedAbsences$=new k,this.unconfirmedAbsences$=te(this.loadUnconfirmedAbsences(),this.updateUnconfirmedAbsences$).pipe(N(1)),this.entries$=this.unconfirmedAbsences$.pipe(b(ye),N(1)),this.sortCriteriaSubject$=new W({primarySortKey:"date",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=S([this.entries$,this.sortCriteria$]).pipe(b(Q(Se))),this.filteredEntries$=S([this.sortedEntries$,this.search$]).pipe(b(([d,p])=>De(d,Ue,p)),N(1)),this.currentDetail=null}getUnconfirmedAbsences(e,t){return this.entries$.pipe(b(i=>{let o=i.find(d=>d.dateString===e&&d.studentId===t);return o?o.absences:[]}))}getAllUnconfirmedAbsencesForStudent(e){return this.entries$.pipe(b(t=>t.filter(i=>i.studentId===e).reduce((i,o)=>i.concat(o.absences),[])))}toggleSort(e){this.sortCriteriaSubject$.pipe(_(1)).subscribe(t=>{t.primarySortKey===e?this.sortCriteriaSubject$.next({primarySortKey:e,ascending:!t.ascending}):this.sortCriteriaSubject$.next({primarySortKey:e,ascending:e==="name"})})}get confirmBackLink(){return this.currentDetail?["/open-absences/detail",this.currentDetail.personId,this.currentDetail.date]:["/open-absences"]}updateAfterConfirm(){S([this.unconfirmedAbsences$.pipe(_(1)),this.selectionService.selectedIds$.pipe(_(1))]).pipe(b(Q(xe))).subscribe(e=>{this.selectionService.clear(),this.updateUnconfirmedAbsences$.next(e)})}buildMailToString(e,t){let i=e.Email,o=this.translate.instant("open-absences.detail.mail.subject"),d=t.map(L=>Ae(L)).join("%0D%0A"),p=`${this.translate.instant("open-absences.detail.mail.body")}%0D%0A${d}`;return p.length>=1600&&(p=`${p.substring(0,1500)}%0D%0A${this.translate.instant("open-absences.detail.mail.bodyToLargeForEmailTo")}`),`${i}?subject=${o}&body=${p}`}loadUnconfirmedAbsences(){return this.loadingService.load(this.lessonPresencesService.getListOfUnconfirmed())}static{this.\u0275fac=function(t){return new(t||n)(T($e),T(y),T(Le),T(he))}}static{this.\u0275prov=ie({token:n,factory:n.\u0275fac})}}return n})();var qe=()=>["/open-absences"],Be=(()=>{class n{constructor(e,t,i,o,d,p,L){this.router=e,this.route=t,this.openAbsencesService=i,this.presenceTypesService=o,this.personService=d,this.selectionService=p,this.scrollPosition=L,this.absences$=this.route.paramMap.pipe(V(this.getAbsencesForParams.bind(this))),this.hasAbsences$=this.absences$.pipe(b(Ce(1))),this.studentFullName$=this.absences$.pipe(b(m=>m[0]&&m[0].StudentFullName||null)),this.allSelected$=S([this.absences$,this.selectionService.selection$]).pipe(b(([m,H])=>m.length===H.length)),this.studentEmail$=this.absences$.pipe(b(m=>m[0]&&m[0].StudentRef.Id||null),V(m=>m?this.personService.getByIdWithEmailInfos(m):ee)),this.allUnconfirmedAbsencesForStudent$=this.route.paramMap.pipe(V(this.getAbsencesForStudentParam.bind(this))),this.mailTo$=S([this.studentEmail$,this.allUnconfirmedAbsencesForStudent$]).pipe(b(([m,H])=>this.openAbsencesService.buildMailToString(m,H))),this.destroy$=new k}ngOnInit(){this.selectionService.clearNonLessonPresences(),this.route.paramMap.pipe(Y(this.destroy$)).subscribe(e=>this.openAbsencesService.currentDetail={date:String(e.get("date")),personId:Number(e.get("personId"))}),this.hasAbsences$.pipe(Y(this.destroy$),ne(ge(_e))).subscribe(()=>void this.router.navigate(["/open-absences"]))}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}toggleAll(e){e?this.absences$.pipe(_(1)).subscribe(t=>this.selectionService.clear(t)):this.selectionService.clear()}onRowClick(e,t){e.target!==t&&t.click()}getPresenceTypeDesignation(e){return this.presenceTypesService.displayedTypes$.pipe(b(t=>e.TypeRef.Id&&t.find(i=>i.Id===e.TypeRef.Id)?.Designation||null))}getAbsencesForParams(e){return this.openAbsencesService.getUnconfirmedAbsences(String(e.get("date")),Number(e.get("personId")))}getAbsencesForStudentParam(e){return this.openAbsencesService.getAllUnconfirmedAbsencesForStudent(Number(e.get("personId")))}static{this.\u0275fac=function(t){return new(t||n)(h(ue),h(de),h(A),h(ke),h(Ie),h(y),h(z))}}static{this.\u0275cmp=P({type:n,selectors:[["bkd-open-absences-detail"]],decls:6,vars:10,consts:[[3,"link"],[3,"absences$","selectionService","confirmLink","displayEmail","mailTo$"]],template:function(t,i){t&1&&(c(0,"div"),x(1,"bkd-backlink",0),c(2,"h1"),u(3),a(4,"async"),r()(),x(5,"bkd-student-dossier-absences",1)),t&2&&(s(),C("link",j(9,qe)),s(2),v(l(4,7,i.studentFullName$)),s(2),C("absences$",i.absences$)("selectionService",i.selectionService)("confirmLink","/open-absences/confirm")("displayEmail",!0)("mailTo$",i.mailTo$))},dependencies:[Te,Ee,q],styles:['.content[_ngcontent-%COMP%]{padding-left:1rem;padding-right:1rem}.back[_ngcontent-%COMP%]{color:#000;text-decoration:none}.back[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%], .back[_ngcontent-%COMP%]:active span[_ngcontent-%COMP%]{text-decoration:underline}.absence-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox lesson-class time teacher" "checkbox presence-type date days-ago";grid-template-columns:min-content 2fr 1fr 2fr}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.6rem .5rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.all[_ngcontent-%COMP%]{grid-area:all}.lesson-class[_ngcontent-%COMP%]{grid-area:lesson-class;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.time[_ngcontent-%COMP%]{grid-area:time}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.presence-type[_ngcontent-%COMP%]{color:#adb5bd;grid-area:presence-type}.date[_ngcontent-%COMP%]{grid-area:date}.days-ago[_ngcontent-%COMP%]{color:#adb5bd;grid-area:days-ago}.date-days-ago[_ngcontent-%COMP%]{grid-area:date-days-ago;display:none}@media (max-width: 750px){.content[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.absence-entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox lesson-class" "checkbox teacher" "checkbox date-days-ago" "checkbox time" "checkbox presence-type";grid-template-columns:min-content 1fr}.date-days-ago[_ngcontent-%COMP%]{display:block}.date[_ngcontent-%COMP%], .days-ago[_ngcontent-%COMP%]{display:none}}'],changeDetection:0})}}return n})();var ze=(n,g)=>g.id,Ne=()=>[],Z=n=>({count:n}),He=(n,g)=>["detail",n,g];function We(n,g){if(n&1&&(c(0,"div",2)(1,"div",5),u(2),a(3,"translate"),r(),c(4,"a",6)(5,"i",7),u(6,"edit"),r()()()),n&2){f();let e=I(0);s(2),E(" ",B(3,3,"open-absences.selected",K(6,Z,e.length))," "),s(2),se("disabled",e.length===0)}}function Ye(n,g){n&1&&x(0,"bkd-spinner")}function Ge(n,g){n&1&&(c(0,"p",3),u(1),a(2,"translate"),r()),n&2&&(s(),v(l(2,1,"open-absences.noEntries")))}function Je(n,g){if(n&1&&(c(0,"span",13),u(1),r()),n&2){let e=f().$implicit,t=f(2),i=I(4);s(),v(t.getSortDirectionCharacter(i,e))}}function Qe(n,g){if(n&1){let e=D();c(0,"div",12),M("click",function(){let i=O(e).$implicit,o=f(2);return $(o.openAbsencesService.toggleSort(i))}),u(1),a(2,"translate"),w(3,Je,2,1,"span",13),r()}if(n&2){let e=g.$implicit;f(2);let t=I(4);C("className",e),s(),E(" ",l(2,3,"open-absences.list.header."+e)," "),s(2),R(t?3:-1)}}function Xe(n,g){if(n&1){let e=D();c(0,"div")(1,"div",14)(2,"div",15),M("click",function(i){O(e);let o=re(4),d=f(2);return $(d.onCheckboxCellClick(i,o))}),c(3,"input",10,0),a(5,"async"),M("change",function(){let i=O(e).$implicit,o=f(2);return $(o.selectionService.toggle(i))}),r()(),c(6,"div",16)(7,"a",17),u(8),r()(),c(9,"div",18),u(10),r(),c(11,"div",19),u(12),a(13,"translate"),r(),c(14,"div",20),u(15),a(16,"translate"),r(),c(17,"div",21),u(18),a(19,"bkdDaysDifference"),r(),c(20,"div",22),u(21),a(22,"date"),r()()()}if(n&2){let e=g.$implicit,t=f(2);s(3),C("checked",l(5,9,t.selectionService.isSelected$(e))),s(4),C("routerLink",pe(22,He,e.studentId,e.dateString)),s(),v(e.studentFullName),s(2),E(" ",e.studyClassNumber," "),s(2),E(" ",B(13,11,t.getLessonsCountKey(e),K(25,Z,e.lessonsCount))," "),s(3),ce(" ",e.studyClassNumber,", ",B(16,14,t.getLessonsCountKey(e),K(27,Z,e.lessonsCount))," "),s(3),E(" ",l(19,17,e.date)," "),s(3),v(B(22,19,e.date,"dd.MM.yyyy"))}}function Ze(n,g){if(n&1){let e=D();c(0,"div",4)(1,"div",8)(2,"div",9)(3,"input",10),M("change",function(i){O(e);let o=f();return $(o.onToggleAll(i.currentTarget==null?null:i.currentTarget.checked))}),r()(),G(4,Qe,4,5,"div",11,oe),r(),G(6,Xe,23,29,"div",null,ze),r()}if(n&2){let e=f(),t=I(0),i=I(2);s(3),C("checked",t.length===i.length),s(),J(e.primarySortKeys),s(2),J(i)}}var Ve=(()=>{class n{constructor(e,t,i){this.openAbsencesService=e,this.selectionService=t,this.scrollPosition=i,this.primarySortKeys=["name","date"],this.destroy$=new k}ngOnInit(){this.openAbsencesService.currentDetail=null,this.selectionService.clearNonOpenAbsencesEntries()}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}onToggleAll(e){this.openAbsencesService.filteredEntries$.pipe(_(1)).subscribe(t=>{this.selectionService.clear(e?t:null)})}onCheckboxCellClick(e,t){e.target!==t&&t.click()}getSortDirectionCharacter(e,t){return e.primarySortKey!==t?"":e.ascending?"\u2193":"\u2191"}getLessonsCountKey(e){return`open-absences.list.content.lessonsCount.${e.lessonsCount===1?"singular":"plural"}`}static{this.\u0275fac=function(t){return new(t||n)(h(A),h(y),h(z))}}static{this.\u0275cmp=P({type:n,selectors:[["bkd-open-absences-list"]],decls:22,vars:29,consts:[["checkbox",""],[1,"d-flex","header-search",3,"valueChange","value","placeholder","label"],[1,"d-flex","align-items-center","justify-content-between","mt-1"],[1,"mt-3"],[1,"content"],[1,"selection-count","ps-1"],["routerLink","/open-absences/confirm",1,"edit","btn","btn-primary","btn-edit","mt-1","mb-2"],[1,"material-icons"],[1,"absence-header"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[3,"className"],[3,"click","className"],[1,"sort-direction"],[1,"absence-entry"],[1,"checkbox",3,"click"],[1,"name","pe-2"],[3,"routerLink"],[1,"study-class"],[1,"lessons-count"],[1,"study-class-lessons-count"],[1,"days-ago"],[1,"date"]],template:function(t,i){if(t&1){let o=D();F(0),a(1,"async"),F(2),a(3,"async"),F(4),a(5,"async"),F(6),a(7,"async"),c(8,"h1"),u(9),a(10,"translate"),r(),c(11,"div")(12,"div")(13,"bkd-resettable-input",1),a(14,"async"),a(15,"translate"),a(16,"translate"),M("valueChange",function(p){return O(o),$(i.openAbsencesService.search$.next(p))}),r(),w(17,We,7,8,"div",2),r(),w(18,Ye,1,0,"bkd-spinner"),a(19,"async"),w(20,Ge,3,3,"p",3)(21,Ze,8,1,"div",4),r()}if(t&2){let o,d,p;U((o=l(1,6,i.selectionService.selection$))!==null&&o!==void 0?o:j(27,Ne)),s(2);let L=U((d=l(3,9,i.openAbsencesService.filteredEntries$))!==null&&d!==void 0?d:j(28,Ne));s(2),U(l(5,12,i.openAbsencesService.sortCriteria$));let m=((p=(p=l(7,15,i.openAbsencesService.sortedEntries$))==null?null:p.length)!==null&&p!==void 0?p:0)===0||L.length===0;s(5),v(l(10,17,"open-absences.title")),s(4),C("value",l(14,19,i.openAbsencesService.search$))("placeholder",l(15,21,"open-absences.search-by-name-or-class"))("label",l(16,23,"open-absences.search")),s(4),R(m?-1:17),s(),R(l(19,25,i.openAbsencesService.loading$)?18:m?20:21)}},dependencies:[we,be,Me,q,le,fe,Pe],styles:['.header-search[_ngcontent-%COMP%]{max-width:500px}.absence-header[_ngcontent-%COMP%]{cursor:pointer;padding:1rem;display:grid;grid-template-areas:"checkbox name date";grid-template-columns:min-content 5fr 1fr;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6;align-items:center}.absence-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox name study-class lessons-count days-ago date";grid-template-columns:min-content 2fr 1fr 1fr 1fr 1fr;align-items:center}.checkbox[_ngcontent-%COMP%]{align-self:start;grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.name[_ngcontent-%COMP%]{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.lessons-count[_ngcontent-%COMP%]{grid-area:lessons-count}.study-class[_ngcontent-%COMP%]{grid-area:study-class}.study-class-lessons-count[_ngcontent-%COMP%]{grid-area:study-class-lessons-count;display:none}.days-ago[_ngcontent-%COMP%]{color:#6c757d;grid-area:days-ago}.date[_ngcontent-%COMP%]{grid-area:date}@media (max-width: 750px){.content[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.absence-header[_ngcontent-%COMP%]{grid-template-areas:"checkbox name date";grid-template-columns:min-content 3fr 2fr}.absence-entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox name date" "checkbox study-class-lessons-count days-ago";grid-template-columns:min-content 3fr 2fr}.study-class-lessons-count[_ngcontent-%COMP%]{display:block}.study-class[_ngcontent-%COMP%], .lessons-count[_ngcontent-%COMP%]{display:none}.days-ago[_ngcontent-%COMP%], .study-class-lessons-count[_ngcontent-%COMP%]{font-size:.875rem;color:#adb5bd}}'],changeDetection:0})}}return n})();var Re=(()=>{class n{constructor(){}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["bkd-open-absences"]],features:[ae([A,y,{provide:ve,useExisting:A}])],decls:1,vars:0,template:function(t,i){t&1&&x(0,"router-outlet")},dependencies:[me],encapsulation:2,changeDetection:0})}}return n})();var Bt=[{path:"",component:Re,children:[{path:"",component:Ve,data:{restoreScrollPositionFrom:["/open-absences/detail/:personId/:date","/open-absences/confirm"]}},{path:"detail/:personId/:date",component:Be,data:{restoreScrollPositionFrom:["/open-absences/confirm"]}},{path:"confirm",component:Oe}]}];export{Bt as OPEN_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-EDO6DY2V.js b/public/apps/webapp-schulverwaltung/chunk-SRCW6BUG.js similarity index 97% rename from public/apps/webapp-schulverwaltung/chunk-EDO6DY2V.js rename to public/apps/webapp-schulverwaltung/chunk-SRCW6BUG.js index cbe3ce28..4a982644 100644 --- a/public/apps/webapp-schulverwaltung/chunk-EDO6DY2V.js +++ b/public/apps/webapp-schulverwaltung/chunk-SRCW6BUG.js @@ -1,2 +1,2 @@ -import{d as ue,e as dt,i as C,j as l,k as lt}from"./chunk-PQGQXFEQ.js";import{a as ft}from"./chunk-UPZQ4FTT.js";import{a as mt,b as pt}from"./chunk-5NJNJ42P.js";import{B as Ce,w as ct,y as ut}from"./chunk-JHVNIEZK.js";import{$a as we,Ab as et,Bb as tt,F as G,Fa as re,Gc as it,H as te,Hc as Te,Ia as Be,Ib as f,Ic as L,Id as se,Jb as h,K as $e,Kb as K,M as T,Ma as _,Mc as ot,Nd as st,O as W,Od as ce,P as xe,Pa as B,Q as Re,Qa as je,Tc as at,Ua as P,X as D,Xa as qe,Ya as He,Za as m,_ as S,_a as p,a as Ie,b as Oe,bc as nt,bd as F,ca as Ne,cc as rt,da as Q,db as ie,ea as U,f as Me,fb as X,g as Le,gb as b,h as V,hb as Ve,ib as Ge,jb as Qe,kb as Ue,kc as oe,l as Fe,mb as Xe,n as c,nb as Je,o as Ae,ob as Ke,pb as ze,qb as y,r as Ee,rb as J,sb as I,tb as ve,va as Ye,wa as u,x as We,xa as ne,yc as ae,zb as Ze}from"./chunk-34ZOBT6Z.js";var ht=function(e){return function(n){return!e(n)}};function Xt(e){return!e}function Jt(e){return!!(e&&e.IsComment)}function Kt(e){return!!(e&&e.IsIncident)}function de(e){return!!(e&&(e.IsAbsence||e.IsDispensation||e.IsHalfDay))}function Se(e,n){return!!(e&&n&&e.Id===n.absencePresenceTypeId)}function _e(e,n){return!!(e&&n&&n===e.checkableAbsenceStateId)}function gt(e,n,t){return!!(Xt(n)&&e.ConfirmationStateId===null||Jt(n)||Kt(n)||de(n)&&e.ConfirmationStateId===t.unconfirmedAbsenceStateId||_e(t,e.ConfirmationStateId))}function lr(e,n){return e?.IsAbsence?n.unconfirmedAbsenceStateId:null}var v=function(e){return e.Present="present",e.Unapproved="unapproved",e.Absent="absent",e}(v||{});function zt(e){switch(e){case v.Absent:return"cancel";case v.Unapproved:return"help";default:return"check_circle"}}var le=class{constructor(n,t,r,i){this.lessonPresence=n,this.presenceType=t,this.precedingAbsences=r,this.confirmationState=i,this.studentFullName=n.StudentFullName}get id(){return`${this.lessonPresence.LessonRef.Id}-${this.lessonPresence.StudentRef.Id}`}get presenceCategory(){return _e(this.settings,this.confirmationState&&Number(this.confirmationState.Key))?v.Unapproved:de(this.presenceType)?v.Absent:v.Present}get nextPresenceCategory(){return this.presenceCategory===v.Absent?v.Present:v.Absent}getNextPresenceType(n){switch(this.nextPresenceCategory){case v.Absent:return this.presenceCategory===v.Unapproved?this.presenceType:n.find(t=>Se(t,this.settings))||null;default:return null}}get canChangePresenceType(){return gt(this.lessonPresence,this.presenceType,this.settings)}get canChangeIncident(){return!de(this.presenceType)}get showDesignation(){return!this.canChangePresenceType||this.presenceCategory===v.Absent&&!Se(this.presenceType,this.settings)||this.presenceCategory===v.Unapproved}get presenceCategoryIcon(){return zt(this.presenceCategory)}get settings(){return window.schulverwaltung.settings}};function yt(e,n,t){let r=l(e,t?.in);return isNaN(n)?C(t?.in||e,NaN):(n&&r.setDate(r.getDate()+n),r)}var Zt={};function A(){return Zt}function O(e,n){let t=A(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,i=l(e,n?.in),o=i.getDay(),a=(o=o.getTime()?r+1:t.getTime()>=d.getTime()?r:r-1}function Pe(e){let n=l(e),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+e-+t}function z(e,n){let t=l(e,n?.in);return t.setHours(0,0,0,0),t}function fe(e,n,t){let[r,i]=lt(t?.in,e,n),o=z(r),a=z(i),d=+o-Pe(o),x=+a-Pe(a);return Math.round((d-x)/dt)}function bt(e,n){let t=me(e,n),r=C(n?.in||e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),$(r)}function xt(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function wt(e){return!(!xt(e)&&typeof e!="number"||isNaN(+l(e)))}function vt(e,n){let t=l(e,n?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}var en={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Tt=(e,n,t)=>{let r,i=en[e];return typeof i=="string"?r=i:n===1?r=i.one:r=i.other.replace("{{count}}",n.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function pe(e){return(n={})=>{let t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}var tn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nn={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ct={date:pe({formats:tn,defaultWidth:"full"}),time:pe({formats:nn,defaultWidth:"full"}),dateTime:pe({formats:rn,defaultWidth:"full"})};var on={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},St=(e,n,t,r)=>on[e];function j(e){return(n,t)=>{let r=t?.context?String(t.context):"standalone",i;if(r==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,d=t?.width?String(t.width):a;i=e.formattingValues[d]||e.formattingValues[a]}else{let a=e.defaultWidth,d=t?.width?String(t.width):e.defaultWidth;i=e.values[d]||e.values[a]}let o=e.argumentCallback?e.argumentCallback(n):n;return i[o]}}var an={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},sn={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},un={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ln={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},mn=(e,n)=>{let t=Number(e),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},_t={ordinalNumber:mn,era:j({values:an,defaultWidth:"wide"}),quarter:j({values:sn,defaultWidth:"wide",argumentCallback:e=>e-1}),month:j({values:cn,defaultWidth:"wide"}),day:j({values:un,defaultWidth:"wide"}),dayPeriod:j({values:dn,defaultWidth:"wide",formattingValues:ln,defaultFormattingWidth:"wide"})};function q(e){return(n,t={})=>{let r=t.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=n.match(i);if(!o)return null;let a=o[0],d=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],x=Array.isArray(d)?pn(d,g=>g.test(a)):fn(d,g=>g.test(a)),k;k=e.valueCallback?e.valueCallback(x):x,k=t.valueCallback?t.valueCallback(k):k;let w=n.slice(a.length);return{value:k,rest:w}}}function fn(e,n){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n(e[t]))return t}function pn(e,n){for(let t=0;t{let r=n.match(e.matchPattern);if(!r)return null;let i=r[0],o=n.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=t.valueCallback?t.valueCallback(a):a;let d=n.slice(i.length);return{value:a,rest:d}}}var hn=/^(\d+)(th|st|nd|rd)?/i,gn=/\d+/i,yn={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},bn={any:[/^b/i,/^(a|c)/i]},xn={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},wn={any:[/1/i,/2/i,/3/i,/4/i]},vn={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Tn={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Cn={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Sn={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_n={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Pn={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Dt={ordinalNumber:Pt({matchPattern:hn,parsePattern:gn,valueCallback:e=>parseInt(e,10)}),era:q({matchPatterns:yn,defaultMatchWidth:"wide",parsePatterns:bn,defaultParseWidth:"any"}),quarter:q({matchPatterns:xn,defaultMatchWidth:"wide",parsePatterns:wn,defaultParseWidth:"any",valueCallback:e=>e+1}),month:q({matchPatterns:vn,defaultMatchWidth:"wide",parsePatterns:Tn,defaultParseWidth:"any"}),day:q({matchPatterns:Cn,defaultMatchWidth:"wide",parsePatterns:Sn,defaultParseWidth:"any"}),dayPeriod:q({matchPatterns:_n,defaultMatchWidth:"any",parsePatterns:Pn,defaultParseWidth:"any"})};var De={code:"en-US",formatDistance:Tt,formatLong:Ct,formatRelative:St,localize:_t,match:Dt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kt(e,n){let t=l(e,n?.in);return fe(t,vt(t))+1}function It(e,n){let t=l(e,n?.in),r=+$(t)-+bt(t);return Math.round(r/ue)+1}function he(e,n){let t=l(e,n?.in),r=t.getFullYear(),i=A(),o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=C(n?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);let d=O(a,n),x=C(n?.in||e,0);x.setFullYear(r,0,o),x.setHours(0,0,0,0);let k=O(x,n);return+t>=+d?r+1:+t>=+k?r:r-1}function Ot(e,n){let t=A(),r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,i=he(e,n),o=C(n?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),O(o,n)}function Mt(e,n){let t=l(e,n?.in),r=+O(t,n)-+Ot(t,n);return Math.round(r/ue)+1}function s(e,n){let t=e<0?"-":"",r=Math.abs(e).toString().padStart(n,"0");return t+r}var M={y(e,n){let t=e.getFullYear(),r=t>0?t:1-t;return s(n==="yy"?r%100:r,n.length)},M(e,n){let t=e.getMonth();return n==="M"?String(t+1):s(t+1,2)},d(e,n){return s(e.getDate(),n.length)},a(e,n){let t=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,n){return s(e.getHours()%12||12,n.length)},H(e,n){return s(e.getHours(),n.length)},m(e,n){return s(e.getMinutes(),n.length)},s(e,n){return s(e.getSeconds(),n.length)},S(e,n){let t=n.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,t-3));return s(i,n.length)}};var H={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ke={G:function(e,n,t){let r=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(e,n,t){if(n==="yo"){let r=e.getFullYear(),i=r>0?r:1-r;return t.ordinalNumber(i,{unit:"year"})}return M.y(e,n)},Y:function(e,n,t,r){let i=he(e,r),o=i>0?i:1-i;if(n==="YY"){let a=o%100;return s(a,2)}return n==="Yo"?t.ordinalNumber(o,{unit:"year"}):s(o,n.length)},R:function(e,n){let t=me(e);return s(t,n.length)},u:function(e,n){let t=e.getFullYear();return s(t,n.length)},Q:function(e,n,t){let r=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,n,t){let r=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return s(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,n,t){let r=e.getMonth();switch(n){case"M":case"MM":return M.M(e,n);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(e,n,t){let r=e.getMonth();switch(n){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(e,n,t,r){let i=Mt(e,r);return n==="wo"?t.ordinalNumber(i,{unit:"week"}):s(i,n.length)},I:function(e,n,t){let r=It(e);return n==="Io"?t.ordinalNumber(r,{unit:"week"}):s(r,n.length)},d:function(e,n,t){return n==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):M.d(e,n)},D:function(e,n,t){let r=kt(e);return n==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):s(r,n.length)},E:function(e,n,t){let r=e.getDay();switch(n){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(e,n,t,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(o);case"ee":return s(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(e,n,t,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(o);case"cc":return s(o,n.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(e,n,t){let r=e.getDay(),i=r===0?7:r;switch(n){case"i":return String(i);case"ii":return s(i,n.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(e,n,t){let i=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,n,t){let r=e.getHours(),i;switch(r===12?i=H.noon:r===0?i=H.midnight:i=r/12>=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,n,t){let r=e.getHours(),i;switch(r>=17?i=H.evening:r>=12?i=H.afternoon:r>=4?i=H.morning:i=H.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,n,t){if(n==="ho"){let r=e.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return M.h(e,n)},H:function(e,n,t){return n==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):M.H(e,n)},K:function(e,n,t){let r=e.getHours()%12;return n==="Ko"?t.ordinalNumber(r,{unit:"hour"}):s(r,n.length)},k:function(e,n,t){let r=e.getHours();return r===0&&(r=24),n==="ko"?t.ordinalNumber(r,{unit:"hour"}):s(r,n.length)},m:function(e,n,t){return n==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):M.m(e,n)},s:function(e,n,t){return n==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):M.s(e,n)},S:function(e,n){return M.S(e,n)},X:function(e,n,t){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return Ft(r);case"XXXX":case"XX":return R(r);case"XXXXX":case"XXX":default:return R(r,":")}},x:function(e,n,t){let r=e.getTimezoneOffset();switch(n){case"x":return Ft(r);case"xxxx":case"xx":return R(r);case"xxxxx":case"xxx":default:return R(r,":")}},O:function(e,n,t){let r=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Lt(r,":");case"OOOO":default:return"GMT"+R(r,":")}},z:function(e,n,t){let r=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Lt(r,":");case"zzzz":default:return"GMT"+R(r,":")}},t:function(e,n,t){let r=Math.trunc(+e/1e3);return s(r,n.length)},T:function(e,n,t){return s(+e,n.length)}};function Lt(e,n=""){let t=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?t+String(i):t+String(i)+n+s(o,2)}function Ft(e,n){return e%60===0?(e>0?"-":"+")+s(Math.abs(e)/60,2):R(e,n)}function R(e,n=""){let t=e>0?"-":"+",r=Math.abs(e),i=s(Math.trunc(r/60),2),o=s(r%60,2);return t+i+n+o}var At=(e,n)=>{switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Et=(e,n)=>{switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Dn=(e,n)=>{let t=e.match(/(P+)(p+)?/)||[],r=t[1],i=t[2];if(!i)return At(e,n);let o;switch(r){case"P":o=n.dateTime({width:"short"});break;case"PP":o=n.dateTime({width:"medium"});break;case"PPP":o=n.dateTime({width:"long"});break;case"PPPP":default:o=n.dateTime({width:"full"});break}return o.replace("{{date}}",At(r,n)).replace("{{time}}",Et(i,n))},Wt={p:Et,P:Dn};var kn=/^D+$/,In=/^Y+$/,On=["D","DD","YY","YYYY"];function $t(e){return kn.test(e)}function Rt(e){return In.test(e)}function Nt(e,n,t){let r=Mn(e,n,t);if(console.warn(r),On.includes(e))throw new RangeError(r)}function Mn(e,n,t){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Ln=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,An=/^'([^]*?)'?$/,En=/''/g,Wn=/[a-zA-Z]/;function E(e,n,t){let r=A(),i=t?.locale??r.locale??De,o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,d=l(e,t?.in);if(!wt(d))throw new RangeError("Invalid time value");let x=n.match(Fn).map(w=>{let g=w[0];if(g==="p"||g==="P"){let be=Wt[g];return be(w,i.formatLong)}return w}).join("").match(Ln).map(w=>{if(w==="''")return{isToken:!1,value:"'"};let g=w[0];if(g==="'")return{isToken:!1,value:$n(w)};if(ke[g])return{isToken:!0,value:w};if(g.match(Wn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:w}});i.localize.preprocessor&&(x=i.localize.preprocessor(d,x));let k={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return x.map(w=>{if(!w.isToken)return w.value;let g=w.value;(!t?.useAdditionalWeekYearTokens&&Rt(g)||!t?.useAdditionalDayOfYearTokens&&$t(g))&&Nt(g,n,String(e));let be=ke[g[0]];return be(d,g,i.localize,k)}).join("")}function $n(e){let n=e.match(An);return n?n[1].replace(En,"'"):e}function so(e,n,t){return yt(e,-n,t)}var N=class{constructor(n){if(this.absences=n,n.length===0)throw new Error("Absences array is empty");this.date=z(this.absences[0].LessonDateTimeFrom),this.dateString=E(this.date,"yyyy-MM-dd"),this.studentId=this.absences[0].StudentRef.Id,this.studentFullName=this.absences[0].StudentFullName,this.studyClassNumber=this.absences[0].StudyClassNumber,this.lessonsCount=this.absences.length}get id(){return`${this.dateString}-${this.studentId}`}};function po(e,n){return e===null&&n===null||e!==null&&n!==null&&e.LessonRef.Id===n.LessonRef.Id&&e.EventDesignation===n.EventDesignation&&e.StudyClassNumber===n.StudyClassNumber&&e.TeacherInformation===n.TeacherInformation&&e.LessonDateTimeFrom.getTime()===n.LessonDateTimeFrom.getTime()&&e.LessonDateTimeTo.getTime()===n.LessonDateTimeTo.getTime()}function Rn(e,n){return e?n.filter(t=>e.lessons.map(r=>r.LessonRef.Id).indexOf(t.LessonRef.Id)>=0).sort(Bn):[]}function Nn(e,n,t){return se(e.filter(r=>r.StudentRef.Id===n.StudentRef.Id&&r.LessonRef.From&&r.LessonRef.From.toDateString()===t?.LessonDateTimeFrom.toDateString()&&r.LessonRef.FromYn(e,o,t,r,i))}function Yn(e,n,t,r,i){let o=null;n.TypeRef.Id&&(o=t.find(x=>x.Id===n.TypeRef.Id)||null);let a=Nn(i,n,e),d;return n.ConfirmationStateId&&(d=r.find(x=>x.Key===n.ConfirmationStateId)),new le(n,o,a,d)}function Yt(e,n){let t=e.LessonDateTimeFrom.getTime(),r=n.LessonDateTimeFrom.getTime();return t-r===0?e.LessonDateTimeTo.getTime()-n.LessonDateTimeTo.getTime():t-r}function Bn(e,n){return e.StudentFullName.localeCompare(n.StudentFullName)}function jn(e,n){return e.LessonRef.From&&e.LessonRef.To&&n.LessonRef.From&&n.LessonRef.To?e.LessonRef.From.getTime()-n.LessonRef.From.getTime()===0?e.LessonRef.To.getTime()-n.LessonRef.To.getTime():e.LessonRef.From.getTime()-n.LessonRef.From.getTime():0}var ge=class extends Error{constructor(n,t){super(`TypeScript thought we could never end up here +import{d as ue,e as dt,i as C,j as l,k as lt}from"./chunk-GOGVGWFJ.js";import{a as ft}from"./chunk-OSOXMODN.js";import{a as mt,b as pt}from"./chunk-PSYDBHTH.js";import{B as Ce,w as ct,y as ut}from"./chunk-W4U7QKJF.js";import{$a as p,Ab as Ze,Bb as et,Cb as tt,F as G,Ga as re,H as te,Hc as it,Ic as Te,Ja as Be,Jb as f,Jc as L,Jd as se,K as $e,Kb as h,Lb as K,M as T,Na as _,Nc as ot,O as W,Od as st,P as xe,Pd as ce,Q as Re,Qa as B,Ra as je,Uc as at,Va as P,X as D,Ya as qe,Za as He,_ as S,_a as m,a as Ie,ab as we,b as Oe,cc as nt,cd as F,da as Ne,dc as rt,ea as Q,eb as ie,f as Me,fa as U,g as Le,gb as X,h as V,hb as b,ib as Ve,jb as Ge,kb as Qe,l as Fe,lb as Ue,lc as oe,n as c,nb as Xe,o as Ae,ob as Je,pb as Ke,qb as ze,r as Ee,rb as y,sb as J,tb as I,ub as ve,wa as Ye,x as We,xa as u,ya as ne,zc as ae}from"./chunk-2W7IS4PN.js";var ht=function(e){return function(n){return!e(n)}};function Xt(e){return!e}function Jt(e){return!!(e&&e.IsComment)}function Kt(e){return!!(e&&e.IsIncident)}function de(e){return!!(e&&(e.IsAbsence||e.IsDispensation||e.IsHalfDay))}function Se(e,n){return!!(e&&n&&e.Id===n.absencePresenceTypeId)}function _e(e,n){return!!(e&&n&&n===e.checkableAbsenceStateId)}function gt(e,n,t){return!!(Xt(n)&&e.ConfirmationStateId===null||Jt(n)||Kt(n)||de(n)&&e.ConfirmationStateId===t.unconfirmedAbsenceStateId||_e(t,e.ConfirmationStateId))}function lr(e,n){return e?.IsAbsence?n.unconfirmedAbsenceStateId:null}var v=function(e){return e.Present="present",e.Unapproved="unapproved",e.Absent="absent",e}(v||{});function zt(e){switch(e){case v.Absent:return"cancel";case v.Unapproved:return"help";default:return"check_circle"}}var le=class{constructor(n,t,r,i){this.lessonPresence=n,this.presenceType=t,this.precedingAbsences=r,this.confirmationState=i,this.studentFullName=n.StudentFullName}get id(){return`${this.lessonPresence.LessonRef.Id}-${this.lessonPresence.StudentRef.Id}`}get presenceCategory(){return _e(this.settings,this.confirmationState&&Number(this.confirmationState.Key))?v.Unapproved:de(this.presenceType)?v.Absent:v.Present}get nextPresenceCategory(){return this.presenceCategory===v.Absent?v.Present:v.Absent}getNextPresenceType(n){switch(this.nextPresenceCategory){case v.Absent:return this.presenceCategory===v.Unapproved?this.presenceType:n.find(t=>Se(t,this.settings))||null;default:return null}}get canChangePresenceType(){return gt(this.lessonPresence,this.presenceType,this.settings)}get canChangeIncident(){return!de(this.presenceType)}get showDesignation(){return!this.canChangePresenceType||this.presenceCategory===v.Absent&&!Se(this.presenceType,this.settings)||this.presenceCategory===v.Unapproved}get presenceCategoryIcon(){return zt(this.presenceCategory)}get settings(){return window.schulverwaltung.settings}};function yt(e,n,t){let r=l(e,t?.in);return isNaN(n)?C(t?.in||e,NaN):(n&&r.setDate(r.getDate()+n),r)}var Zt={};function A(){return Zt}function O(e,n){let t=A(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,i=l(e,n?.in),o=i.getDay(),a=(o=o.getTime()?r+1:t.getTime()>=d.getTime()?r:r-1}function Pe(e){let n=l(e),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+e-+t}function z(e,n){let t=l(e,n?.in);return t.setHours(0,0,0,0),t}function fe(e,n,t){let[r,i]=lt(t?.in,e,n),o=z(r),a=z(i),d=+o-Pe(o),x=+a-Pe(a);return Math.round((d-x)/dt)}function bt(e,n){let t=me(e,n),r=C(n?.in||e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),$(r)}function xt(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function wt(e){return!(!xt(e)&&typeof e!="number"||isNaN(+l(e)))}function vt(e,n){let t=l(e,n?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}var en={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Tt=(e,n,t)=>{let r,i=en[e];return typeof i=="string"?r=i:n===1?r=i.one:r=i.other.replace("{{count}}",n.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function pe(e){return(n={})=>{let t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}var tn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nn={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ct={date:pe({formats:tn,defaultWidth:"full"}),time:pe({formats:nn,defaultWidth:"full"}),dateTime:pe({formats:rn,defaultWidth:"full"})};var on={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},St=(e,n,t,r)=>on[e];function j(e){return(n,t)=>{let r=t?.context?String(t.context):"standalone",i;if(r==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,d=t?.width?String(t.width):a;i=e.formattingValues[d]||e.formattingValues[a]}else{let a=e.defaultWidth,d=t?.width?String(t.width):e.defaultWidth;i=e.values[d]||e.values[a]}let o=e.argumentCallback?e.argumentCallback(n):n;return i[o]}}var an={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},sn={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},un={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ln={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},mn=(e,n)=>{let t=Number(e),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},_t={ordinalNumber:mn,era:j({values:an,defaultWidth:"wide"}),quarter:j({values:sn,defaultWidth:"wide",argumentCallback:e=>e-1}),month:j({values:cn,defaultWidth:"wide"}),day:j({values:un,defaultWidth:"wide"}),dayPeriod:j({values:dn,defaultWidth:"wide",formattingValues:ln,defaultFormattingWidth:"wide"})};function q(e){return(n,t={})=>{let r=t.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=n.match(i);if(!o)return null;let a=o[0],d=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],x=Array.isArray(d)?pn(d,g=>g.test(a)):fn(d,g=>g.test(a)),k;k=e.valueCallback?e.valueCallback(x):x,k=t.valueCallback?t.valueCallback(k):k;let w=n.slice(a.length);return{value:k,rest:w}}}function fn(e,n){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n(e[t]))return t}function pn(e,n){for(let t=0;t{let r=n.match(e.matchPattern);if(!r)return null;let i=r[0],o=n.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=t.valueCallback?t.valueCallback(a):a;let d=n.slice(i.length);return{value:a,rest:d}}}var hn=/^(\d+)(th|st|nd|rd)?/i,gn=/\d+/i,yn={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},bn={any:[/^b/i,/^(a|c)/i]},xn={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},wn={any:[/1/i,/2/i,/3/i,/4/i]},vn={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Tn={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Cn={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Sn={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_n={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Pn={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Dt={ordinalNumber:Pt({matchPattern:hn,parsePattern:gn,valueCallback:e=>parseInt(e,10)}),era:q({matchPatterns:yn,defaultMatchWidth:"wide",parsePatterns:bn,defaultParseWidth:"any"}),quarter:q({matchPatterns:xn,defaultMatchWidth:"wide",parsePatterns:wn,defaultParseWidth:"any",valueCallback:e=>e+1}),month:q({matchPatterns:vn,defaultMatchWidth:"wide",parsePatterns:Tn,defaultParseWidth:"any"}),day:q({matchPatterns:Cn,defaultMatchWidth:"wide",parsePatterns:Sn,defaultParseWidth:"any"}),dayPeriod:q({matchPatterns:_n,defaultMatchWidth:"any",parsePatterns:Pn,defaultParseWidth:"any"})};var De={code:"en-US",formatDistance:Tt,formatLong:Ct,formatRelative:St,localize:_t,match:Dt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kt(e,n){let t=l(e,n?.in);return fe(t,vt(t))+1}function It(e,n){let t=l(e,n?.in),r=+$(t)-+bt(t);return Math.round(r/ue)+1}function he(e,n){let t=l(e,n?.in),r=t.getFullYear(),i=A(),o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=C(n?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);let d=O(a,n),x=C(n?.in||e,0);x.setFullYear(r,0,o),x.setHours(0,0,0,0);let k=O(x,n);return+t>=+d?r+1:+t>=+k?r:r-1}function Ot(e,n){let t=A(),r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,i=he(e,n),o=C(n?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),O(o,n)}function Mt(e,n){let t=l(e,n?.in),r=+O(t,n)-+Ot(t,n);return Math.round(r/ue)+1}function s(e,n){let t=e<0?"-":"",r=Math.abs(e).toString().padStart(n,"0");return t+r}var M={y(e,n){let t=e.getFullYear(),r=t>0?t:1-t;return s(n==="yy"?r%100:r,n.length)},M(e,n){let t=e.getMonth();return n==="M"?String(t+1):s(t+1,2)},d(e,n){return s(e.getDate(),n.length)},a(e,n){let t=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,n){return s(e.getHours()%12||12,n.length)},H(e,n){return s(e.getHours(),n.length)},m(e,n){return s(e.getMinutes(),n.length)},s(e,n){return s(e.getSeconds(),n.length)},S(e,n){let t=n.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,t-3));return s(i,n.length)}};var H={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ke={G:function(e,n,t){let r=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(e,n,t){if(n==="yo"){let r=e.getFullYear(),i=r>0?r:1-r;return t.ordinalNumber(i,{unit:"year"})}return M.y(e,n)},Y:function(e,n,t,r){let i=he(e,r),o=i>0?i:1-i;if(n==="YY"){let a=o%100;return s(a,2)}return n==="Yo"?t.ordinalNumber(o,{unit:"year"}):s(o,n.length)},R:function(e,n){let t=me(e);return s(t,n.length)},u:function(e,n){let t=e.getFullYear();return s(t,n.length)},Q:function(e,n,t){let r=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,n,t){let r=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return s(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,n,t){let r=e.getMonth();switch(n){case"M":case"MM":return M.M(e,n);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(e,n,t){let r=e.getMonth();switch(n){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(e,n,t,r){let i=Mt(e,r);return n==="wo"?t.ordinalNumber(i,{unit:"week"}):s(i,n.length)},I:function(e,n,t){let r=It(e);return n==="Io"?t.ordinalNumber(r,{unit:"week"}):s(r,n.length)},d:function(e,n,t){return n==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):M.d(e,n)},D:function(e,n,t){let r=kt(e);return n==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):s(r,n.length)},E:function(e,n,t){let r=e.getDay();switch(n){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(e,n,t,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(o);case"ee":return s(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(e,n,t,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(o);case"cc":return s(o,n.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(e,n,t){let r=e.getDay(),i=r===0?7:r;switch(n){case"i":return String(i);case"ii":return s(i,n.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(e,n,t){let i=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,n,t){let r=e.getHours(),i;switch(r===12?i=H.noon:r===0?i=H.midnight:i=r/12>=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,n,t){let r=e.getHours(),i;switch(r>=17?i=H.evening:r>=12?i=H.afternoon:r>=4?i=H.morning:i=H.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,n,t){if(n==="ho"){let r=e.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return M.h(e,n)},H:function(e,n,t){return n==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):M.H(e,n)},K:function(e,n,t){let r=e.getHours()%12;return n==="Ko"?t.ordinalNumber(r,{unit:"hour"}):s(r,n.length)},k:function(e,n,t){let r=e.getHours();return r===0&&(r=24),n==="ko"?t.ordinalNumber(r,{unit:"hour"}):s(r,n.length)},m:function(e,n,t){return n==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):M.m(e,n)},s:function(e,n,t){return n==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):M.s(e,n)},S:function(e,n){return M.S(e,n)},X:function(e,n,t){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return Ft(r);case"XXXX":case"XX":return R(r);case"XXXXX":case"XXX":default:return R(r,":")}},x:function(e,n,t){let r=e.getTimezoneOffset();switch(n){case"x":return Ft(r);case"xxxx":case"xx":return R(r);case"xxxxx":case"xxx":default:return R(r,":")}},O:function(e,n,t){let r=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Lt(r,":");case"OOOO":default:return"GMT"+R(r,":")}},z:function(e,n,t){let r=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Lt(r,":");case"zzzz":default:return"GMT"+R(r,":")}},t:function(e,n,t){let r=Math.trunc(+e/1e3);return s(r,n.length)},T:function(e,n,t){return s(+e,n.length)}};function Lt(e,n=""){let t=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?t+String(i):t+String(i)+n+s(o,2)}function Ft(e,n){return e%60===0?(e>0?"-":"+")+s(Math.abs(e)/60,2):R(e,n)}function R(e,n=""){let t=e>0?"-":"+",r=Math.abs(e),i=s(Math.trunc(r/60),2),o=s(r%60,2);return t+i+n+o}var At=(e,n)=>{switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Et=(e,n)=>{switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Dn=(e,n)=>{let t=e.match(/(P+)(p+)?/)||[],r=t[1],i=t[2];if(!i)return At(e,n);let o;switch(r){case"P":o=n.dateTime({width:"short"});break;case"PP":o=n.dateTime({width:"medium"});break;case"PPP":o=n.dateTime({width:"long"});break;case"PPPP":default:o=n.dateTime({width:"full"});break}return o.replace("{{date}}",At(r,n)).replace("{{time}}",Et(i,n))},Wt={p:Et,P:Dn};var kn=/^D+$/,In=/^Y+$/,On=["D","DD","YY","YYYY"];function $t(e){return kn.test(e)}function Rt(e){return In.test(e)}function Nt(e,n,t){let r=Mn(e,n,t);if(console.warn(r),On.includes(e))throw new RangeError(r)}function Mn(e,n,t){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Ln=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,An=/^'([^]*?)'?$/,En=/''/g,Wn=/[a-zA-Z]/;function E(e,n,t){let r=A(),i=t?.locale??r.locale??De,o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,d=l(e,t?.in);if(!wt(d))throw new RangeError("Invalid time value");let x=n.match(Fn).map(w=>{let g=w[0];if(g==="p"||g==="P"){let be=Wt[g];return be(w,i.formatLong)}return w}).join("").match(Ln).map(w=>{if(w==="''")return{isToken:!1,value:"'"};let g=w[0];if(g==="'")return{isToken:!1,value:$n(w)};if(ke[g])return{isToken:!0,value:w};if(g.match(Wn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:w}});i.localize.preprocessor&&(x=i.localize.preprocessor(d,x));let k={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return x.map(w=>{if(!w.isToken)return w.value;let g=w.value;(!t?.useAdditionalWeekYearTokens&&Rt(g)||!t?.useAdditionalDayOfYearTokens&&$t(g))&&Nt(g,n,String(e));let be=ke[g[0]];return be(d,g,i.localize,k)}).join("")}function $n(e){let n=e.match(An);return n?n[1].replace(En,"'"):e}function so(e,n,t){return yt(e,-n,t)}var N=class{constructor(n){if(this.absences=n,n.length===0)throw new Error("Absences array is empty");this.date=z(this.absences[0].LessonDateTimeFrom),this.dateString=E(this.date,"yyyy-MM-dd"),this.studentId=this.absences[0].StudentRef.Id,this.studentFullName=this.absences[0].StudentFullName,this.studyClassNumber=this.absences[0].StudyClassNumber,this.lessonsCount=this.absences.length}get id(){return`${this.dateString}-${this.studentId}`}};function po(e,n){return e===null&&n===null||e!==null&&n!==null&&e.LessonRef.Id===n.LessonRef.Id&&e.EventDesignation===n.EventDesignation&&e.StudyClassNumber===n.StudyClassNumber&&e.TeacherInformation===n.TeacherInformation&&e.LessonDateTimeFrom.getTime()===n.LessonDateTimeFrom.getTime()&&e.LessonDateTimeTo.getTime()===n.LessonDateTimeTo.getTime()}function Rn(e,n){return e?n.filter(t=>e.lessons.map(r=>r.LessonRef.Id).indexOf(t.LessonRef.Id)>=0).sort(Bn):[]}function Nn(e,n,t){return se(e.filter(r=>r.StudentRef.Id===n.StudentRef.Id&&r.LessonRef.From&&r.LessonRef.From.toDateString()===t?.LessonDateTimeFrom.toDateString()&&r.LessonRef.FromYn(e,o,t,r,i))}function Yn(e,n,t,r,i){let o=null;n.TypeRef.Id&&(o=t.find(x=>x.Id===n.TypeRef.Id)||null);let a=Nn(i,n,e),d;return n.ConfirmationStateId&&(d=r.find(x=>x.Key===n.ConfirmationStateId)),new le(n,o,a,d)}function Yt(e,n){let t=e.LessonDateTimeFrom.getTime(),r=n.LessonDateTimeFrom.getTime();return t-r===0?e.LessonDateTimeTo.getTime()-n.LessonDateTimeTo.getTime():t-r}function Bn(e,n){return e.StudentFullName.localeCompare(n.StudentFullName)}function jn(e,n){return e.LessonRef.From&&e.LessonRef.To&&n.LessonRef.From&&n.LessonRef.To?e.LessonRef.From.getTime()-n.LessonRef.From.getTime()===0?e.LessonRef.To.getTime()-n.LessonRef.To.getTime():e.LessonRef.From.getTime()-n.LessonRef.From.getTime():0}var ge=class extends Error{constructor(n,t){super(`TypeScript thought we could never end up here ${t}`)}};function Co(e){let n=Hn(e);return Object.keys(n).reduce((t,r)=>(Object.keys(n[r]).forEach(i=>{t=[...t,new N(n[r][i].sort(Yt))]}),t),[])}function So(e,n){return[...e].sort(qn(n))}function ye(e){return e.reduce((n,t)=>n.concat(t.absences),[])}function _o(e,n){return e.filter(t=>!n.some(({lessonIds:r,personId:i})=>r.includes(t.LessonRef.Id)&&i===t.StudentRef.Id))}function Po(e,n){return se([...e,...n],"Id")}function qn(e){return(n,t)=>{switch(e.primarySortKey){case"date":{let r=n.date.getTime(),i=t.date.getTime();return r===i?n.studentFullName.localeCompare(t.studentFullName):e.ascending?r-i:i-r}case"name":{let r=e.ascending?n.studentFullName.localeCompare(t.studentFullName):t.studentFullName.localeCompare(n.studentFullName);return r===0?t.date.getTime()-n.date.getTime():r}default:throw new ge(e.primarySortKey,"Unhandled sort criteria")}}}function Hn(e){return e.reduce((n,t)=>{let r=E(t.LessonDateTimeFrom,"yyyy-MM-dd"),i=t.StudentRef.Id;return n[r]||(n[r]={}),n[r][i]||(n[r][i]=[]),n[r][i].push(t),n},{})}var Z=function(e){return e.ToggleSelection="TOGGLE",e.ClearSelection="CLEAR",e}(Z||{}),Bt=(()=>{class e{constructor(){this.action$=new Me,this.selection$=Ee(this.action$.pipe($e(this.reduceSelection.bind(this),[]),W([])),{connector:()=>new V(1)}),this.selectionSub=this.selection$.connect()}ngOnDestroy(){this.selectionSub.unsubscribe()}toggle(t){this.action$.next({type:Z.ToggleSelection,payload:t})}clear(t=null){this.action$.next({type:Z.ClearSelection,payload:t})}isSelected$(t){return this.selection$.pipe(c(r=>r.includes(t)),te())}reduceSelection(t,r){switch(r.type){case Z.ToggleSelection:return t.includes(r.payload)?t.filter(i=>i!==r.payload):[...t,r.payload];case Z.ClearSelection:return r.payload||[];default:return t}}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=D({token:e,factory:e.\u0275fac})}}return e})();function Lo(e){let n=e.reduce((t,r)=>(t[r.StudentRef.Id]||(t[r.StudentRef.Id]=[]),t[r.StudentRef.Id].push(r.LessonRef.Id),t),{});return Object.keys(n).map(t=>({personIds:[Number(t)],lessonIds:n[t]}))}function jt(e){let n={};return e.forEach(t=>{n[t.StudentRef.Id]||(n[t.StudentRef.Id]={}),n[t.StudentRef.Id][String(t.TypeRef.Id)]||(n[t.StudentRef.Id][String(t.TypeRef.Id)]=[]),n[t.StudentRef.Id][String(t.TypeRef.Id)].push(t.LessonRef.Id)}),Object.keys(n).reduce((t,r)=>[...t,...Object.keys(n[r]).map(i=>({personId:Number(r),presenceTypeId:i==="null"?null:Number(i),lessonIds:n[r][String(i)]}))],[])}function Fo(e){return e.slice().sort((n,t)=>n.LessonDateTimeFrom.getTime()-t.LessonDateTimeFrom.getTime())}function Ao(e){return`${e.EventDesignation}, ${E(e.LessonDateTimeFrom,"dd.MM.yyyy")}, ${E(e.LessonDateTimeFrom,"HH:mm")}-${E(e.LessonDateTimeTo,"HH:mm")}`}var Ho=(()=>{class e extends Bt{constructor(t){super(),this.settings=t,this.selectedIds$=this.selection$.pipe(c(ee),c(({openAbsencesEntries:r,lessonPresences:i})=>jt([...ye(r),...i])),T(1)),this.selectedLessons$=this.selection$.pipe(c(ee),c(({openAbsencesEntries:r,lessonPresences:i})=>[...ye(r),...i]),T(1)),this.selectedWithoutPresenceType$=this.selection$.pipe(c(ee),c(({openAbsencesEntries:r,lessonPresences:i})=>[...ye(r),...i].filter(o=>o.TypeRef.Id===this.settings.absencePresenceTypeId)))}clearNonOpenAbsencesEntries(){this.selection$.pipe(G(1),c(ee)).subscribe(({openAbsencesEntries:t})=>this.clear(t))}clearNonLessonPresences(){this.selection$.pipe(G(1),c(ee)).subscribe(({lessonPresences:t})=>this.clear(t))}static{this.\u0275fac=function(r){return new(r||e)(S(F))}}static{this.\u0275prov=D({token:e,factory:e.\u0275fac})}}return e})();function ee(e){return{openAbsencesEntries:e.filter(Ce(N)),lessonPresences:e.filter(ht(Ce(N)))}}function qt(e){return e.slice().sort((n,t)=>n.Sort-t.Sort)}function Go(e){return e.map(n=>({Key:n.Id,Value:n.Designation||""}))}function Qo(e,n){return e.map(t=>Object.assign(t,{Group:n}))}var Ht=ot({Id:Te,Active:L,Designation:at(it),IsAbsence:L,IsComment:L,IsDispensation:L,IsIncident:L,IsHalfDay:L,NeedsConfirmation:L,Sort:Te});var Vt=(()=>{class e extends mt{constructor(t,r){super(t,r,Ht,"PresenceTypes")}static{this.\u0275fac=function(r){return new(r||e)(S(oe),S(F))}}static{this.\u0275prov=D({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Gt=(()=>{class e{constructor(t,r){this.restService=t,this.settings=r,this.presenceTypes$=this.loadPresenceTypes().pipe(T(1)),this.activePresenceTypes$=this.presenceTypes$.pipe(c(this.filterActiveTypes.bind(this)),T(1)),this.confirmationTypes$=this.presenceTypes$.pipe(c(this.filterConfirmationTypes.bind(this)),T(1)),this.incidentTypes$=this.presenceTypes$.pipe(c(this.filterIncidentTypes.bind(this)),T(1)),this.displayedTypes$=this.presenceTypes$.pipe(c(this.filterDisplayedTypes.bind(this)),T(1)),this.halfDayActive$=this.presenceTypes$.pipe(c(this.isHalfDayActive.bind(this)),W(!1),te(),T(1))}getPresenceType(t){return this.presenceTypes$.pipe(c(r=>{let i=r.find(o=>o.Id===t);if(!i)throw new Error("presence type not found");return i}))}loadPresenceTypes(){return this.restService.getList().pipe(c(qt))}filterActiveTypes(t){return t.filter(r=>r.Active)}filterConfirmationTypes(t){return t.filter(r=>r.NeedsConfirmation&&r.Active&&r.Id!==this.settings.absencePresenceTypeId)}filterIncidentTypes(t){return t.filter(r=>r.IsIncident&&r.Active)}filterDisplayedTypes(t){return t.filter(r=>r.Id!==this.settings.absencePresenceTypeId)}isHalfDayActive(t){return!!t.find(r=>r.Id===this.settings.halfDayPresenceTypeId)?.Active}static{this.\u0275fac=function(r){return new(r||e)(S(Vt),S(F))}}static{this.\u0275prov=D({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var aa=(()=>{class e{constructor(t,r){this.http=t,this.settings=r}editLessonPresences(t,r,i,o,a){let d={LessonIds:t,PersonIds:r};return i!==void 0&&(d.PresenceTypeId=i),o!==void 0&&(d.ConfirmationValue=o),this.http.put(`${this.settings.apiUrl}/LessonPresences/Edit`,d,a).pipe(c(()=>{}))}removeLessonPresences(t,r,i){return this.http.put(`${this.settings.apiUrl}/LessonPresences/Reset`,{LessonIds:t,PersonIds:r,WithComment:!0},i).pipe(c(()=>{}))}confirmLessonPresences(t,r,i,o){let a={LessonIds:t,PersonIds:r,AbsenceTypeId:i,ConfirmationValue:o};return this.http.put(`${this.settings.apiUrl}/LessonAbsences/Confirm`,a).pipe(c(()=>{}))}static{this.\u0275fac=function(r){return new(r||e)(S(oe),S(F))}}static{this.\u0275prov=D({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Qt=(()=>{class e{constructor(t){this.translate=t}transform(t){if(!t)return"";let r=fe(t,new Date);return this.translate.instant(`shared.daysDifference.${this.getKey(r)}`,{count:Math.abs(r)})}getKey(t){return t===0?"today":t===1?"tomorrow":t===-1?"yesterday":t>0?"in":"ago"}static{this.\u0275fac=function(r){return new(r||e)(ne(st,16))}}static{this.\u0275pipe=Be({name:"bkdDaysDifference",type:e,pure:!0})}}return e})();function la(e){return e.length===0}function Ut(e){return Array.isArray(e)}var Un=["checkbox"],Xn=(e,n)=>n.Id;function Jn(e,n){e&1&&we(0,"bkd-spinner",2)}function Kn(e,n){if(e&1&&we(0,"bkd-reports-link",13),e&2){let t=b(4);B("reports",t.reports)("disableIfUnavailable",!0)}}function zn(e,n){if(e&1&&(m(0,"a",14),f(1,"async"),m(2,"i",12),y(3,"mail"),p()()),e&2){let t=b(4);Ue("href","mailto:",h(1,2,t.mailTo$),"",Ye)}}function Zn(e,n){if(e&1&&(m(0,"div",15),y(1),p()),e&2){let t=b(4);u(),I(" ",t.defaultAbsenceSelectionMessage," ")}}function er(e,n){if(e&1){let t=ie();m(0,"div",6),X("click",function(i){Q(t);let o=ze(3),a=b(3);return U(a.onRowClick(i,o))}),m(1,"div",7)(2,"input",8,0),f(4,"async"),X("change",function(i){Q(t);let o=b(3);return U(o.toggleAll(i.target==null?null:i.target.checked))}),p()(),m(5,"div",9),y(6),f(7,"translate"),p(),m(8,"div",10)(9,"a",11),f(10,"async"),m(11,"i",12),y(12,"edit"),p()(),_(13,Kn,1,2,"bkd-reports-link",13)(14,zn,4,4,"a",14),p(),_(15,Zn,2,1,"div",15),f(16,"async"),p()}if(e&2){let t,r,i=b(3);u(2),B("checked",h(4,8,i.allSelected$)),u(4),J(h(7,10,"open-absences.detail.all")),u(3),je("disabled",((t=h(10,12,i.selectionService==null?null:i.selectionService.selection$))==null?null:t.length)===0),Qe("routerLink",i.confirmLink),u(4),P(i.reports?13:-1),u(),P(i.displayEmail?14:-1),u(),P(i.defaultAbsenceSelectionMessage&&((r=h(16,14,i.selectionService==null?null:i.selectionService.selectedWithoutPresenceType$))!=null&&r.length)?15:-1)}}function tr(e,n){if(e&1){let t=ie();m(0,"div",7)(1,"input",8,1),f(3,"async"),X("change",function(){Q(t);let i=b().$implicit,o=b(3);return U(o.selectionService==null?null:o.selectionService.toggle(i))}),p()()}if(e&2){let t=b().$implicit,r=b(3);u(),B("checked",h(3,1,r.selectionService==null?null:r.selectionService.isSelected$(t)))}}function nr(e,n){if(e&1&&y(0),e&2){let t=b().$implicit;I(" , ",t.StudyClassNumber," ")}}function rr(e,n){if(e&1&&(m(0,"div",20),y(1),p()),e&2){b();let t=tt(12);u(),I(" ",t," ")}}function ir(e,n){e&1&&(m(0,"div",21),y(1),f(2,"translate"),p()),e&2&&(u(),I(" ",h(2,1,"my-absences.show.confirm-presence-type")," "))}function or(e,n){if(e&1){let t=ie();m(0,"div",16),X("click",function(i){let o=Q(t).$index,a=b(3);return U(a.onRowClick(i,o))}),_(1,tr,4,3,"div",7),f(2,"async"),m(3,"div",17),y(4),_(5,nr,1,1),p(),m(6,"div",18),y(7),f(8,"date"),f(9,"date"),p(),m(10,"div",19),y(11),p(),Ze(12),f(13,"async"),_(14,rr,2,1,"div",20)(15,ir,3,3,"div",21),m(16,"div",22),y(17),f(18,"date"),p(),m(19,"div",23),y(20),f(21,"bkdDaysDifference"),p(),m(22,"div",24),y(23),f(24,"date"),f(25,"bkdDaysDifference"),p()()}if(e&2){let t=n.$implicit,r=b(3);u(),P(h(2,12,r.editable$)?1:-1),u(3),I(" ",t.EventDesignation," "),u(),P(t.StudyClassNumber?5:-1),u(2),ve(" ",K(8,14,t.LessonDateTimeFrom,"HH:mm"),"\u2013",K(9,17,t.LessonDateTimeTo,"HH:mm")," "),u(4),I(" ",t.TeacherInformation," "),u();let i=et(h(13,20,r.getPresenceTypeDesignation(t)));u(2),P(i?14:-1),u(),P(r.displayPresenceType&&!i&&r.defaultAbsenceSelectionMessage?15:-1),u(2),I(" ",K(18,23,t.LessonDateTimeFrom,"dd.MM.yyyy")," "),u(3),I(" ",h(21,26,t.LessonDateTimeFrom)," "),u(3),ve(" ",K(24,28,t.LessonDateTimeFrom,"dd.MM.yyyy"),", ",h(25,31,t.LessonDateTimeFrom)," ")}}function ar(e,n){if(e&1&&(_(0,er,17,16,"div",4),f(1,"async"),qe(2,or,26,33,"div",5,Xn),f(4,"async")),e&2){let t=b(2);P(h(1,1,t.editable$)?0:-1),u(2),He(h(4,3,t.lessonPresences$))}}function sr(e,n){e&1&&(m(0,"p",3),y(1),f(2,"translate"),p()),e&2&&(u(),J(h(2,1,"shared.profile.no-absences")))}function cr(e,n){if(e&1&&(_(0,ar,5,5),f(1,"async"),_(2,sr,3,3,"p",3)),e&2){let t,r=b();P(((t=(t=h(1,1,r.lessonPresences$))==null?null:t.length)!==null&&t!==void 0?t:0)>0?0:2)}}var Ca=(()=>{class e{constructor(t){this.presenceTypesService=t,this.selectionService=null,this.displayPresenceType=!0,this.defaultAbsenceSelectionMessage=null,this.reports=null,this.confirmLink="confirm",this.displayEmail=!1,this.lessonPresences$$=new V(1),this.lessonPresences$=this.lessonPresences$$.pipe(Re(),W(null),T(1)),this.loading$=this.lessonPresences$.pipe(c(ut(Ut))),this.selectionService$=new V(1),this.editable$=this.selectionService$.pipe(c(()=>!0),W(!1)),this.displayPresenceType$=new Le(!0),this.allSelected$=Ae([this.lessonPresences$.pipe(We(ct)),this.selectionService$.pipe(xe(r=>r.selection$))]).pipe(c(([r,i])=>r.length===i.length))}ngOnChanges(t){t.absences$&&this.lessonPresences$$.next(t.absences$.currentValue),t.selectionService&&t.selectionService.currentValue&&(t.selectionService.currentValue.clear(),this.selectionService$.next(t.selectionService.currentValue)),t.displayPresenceType&&this.displayPresenceType$.next(t.displayPresenceType.currentValue)}toggleAll(t){t?this.lessonPresences$.pipe(G(1)).subscribe(r=>this.selectionService?.clear(r)):this.selectionService?.clear()}onRowClick(t,r){if(this.checkboxes.length===0)return;let i;typeof r=="number"?i=this.checkboxes.toArray()[r].nativeElement:i=r,t.target!==i&&!t.target.closest(".buttons")&&i.click()}getPresenceTypeDesignation(t){return this.displayPresenceType$.pipe(xe(r=>r?this.presenceTypesService.displayedTypes$:Fe([])),c(r=>t.TypeRef.Id&&r.find(i=>i.Id===t.TypeRef.Id)?.Designation||null))}static{this.\u0275fac=function(r){return new(r||e)(ne(Gt))}}static{this.\u0275cmp=re({type:e,selectors:[["bkd-student-dossier-absences"]],viewQuery:function(r,i){if(r&1&&Xe(Un,5),r&2){let o;Je(o=Ke())&&(i.checkboxes=o)}},inputs:{absences$:"absences$",selectionService:"selectionService",displayPresenceType:"displayPresenceType",defaultAbsenceSelectionMessage:"defaultAbsenceSelectionMessage",reports:"reports",confirmLink:"confirmLink",displayEmail:"displayEmail",mailTo$:"mailTo$"},features:[Ne],decls:3,vars:3,consts:[["allCheckbox",""],["checkbox",""],[1,"inline","d-block","mb-3"],[1,"mx-3"],[1,"absence-all"],[1,"absence-entry"],[1,"absence-all",3,"click"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"all"],[1,"buttons"],[1,"edit","btn","btn-primary","btn-icon","me-2",3,"routerLink"],[1,"material-icons"],[1,"me-2",3,"reports","disableIfUnavailable"],["target","_blank",1,"mail","btn","btn-primary","btn-icon","me-2",3,"href"],[1,"validation"],[1,"absence-entry",3,"click"],[1,"lesson-class"],[1,"time","pe-2"],[1,"teacher"],[1,"presence-type"],[1,"presence-type","confirm"],[1,"date"],[1,"days-ago"],[1,"date-days-ago"]],template:function(r,i){r&1&&(_(0,Jn,1,0,"bkd-spinner",2),f(1,"async"),_(2,cr,3,3)),r&2&&P(h(1,1,i.loading$)?0:2)},dependencies:[ae,ft,pt,nt,rt,ce,Qt],styles:['.absence-all[_ngcontent-%COMP%]{padding:0 0 .5rem 1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox all buttons" "validation validation validation";grid-template-columns:min-content 1fr min-content}.absence-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox lesson-class time teacher" "checkbox presence-type date days-ago";grid-template-columns:min-content 2fr 1fr 2fr}.absence-entry[_ngcontent-%COMP%]:first-child{padding-top:0}.absence-all[_ngcontent-%COMP%] + .absence-entry[_ngcontent-%COMP%]{padding-top:1rem}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.all[_ngcontent-%COMP%]{grid-area:all}.buttons[_ngcontent-%COMP%]{grid-area:buttons;display:flex}.validation[_ngcontent-%COMP%]{grid-area:validation}.validation[_ngcontent-%COMP%], .presence-type.confirm[_ngcontent-%COMP%]{color:#ea161f}.lesson-class[_ngcontent-%COMP%]{grid-area:lesson-class;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.time[_ngcontent-%COMP%]{grid-area:time}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.presence-type[_ngcontent-%COMP%]{color:#adb5bd;grid-area:presence-type}.date[_ngcontent-%COMP%]{grid-area:date}.days-ago[_ngcontent-%COMP%]{color:#adb5bd;grid-area:days-ago}.date-days-ago[_ngcontent-%COMP%]{grid-area:date-days-ago;display:none}@media (max-width: 750px){.absence-entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox lesson-class" "checkbox teacher" "checkbox date-days-ago" "checkbox time" "checkbox presence-type";grid-template-columns:min-content 1fr}.date-days-ago[_ngcontent-%COMP%]{display:block}.date[_ngcontent-%COMP%], .days-ago[_ngcontent-%COMP%]{display:none}}'],changeDetection:0})}}return e})();var ur=["*"],Da=(()=>{class e{constructor(){this.link=[]}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=re({type:e,selectors:[["bkd-backlink"]],inputs:{link:"link",params:"params"},ngContentSelectors:ur,decls:8,vars:5,consts:[[1,"d-flex","align-items-start","justify-content-between","w-100","mb-3"],[3,"routerLink","queryParams"],[1,"material-icons"],[1,"label"]],template:function(r,i){r&1&&(Ve(),m(0,"div",0)(1,"a",1)(2,"span",2),y(3,"arrow_back"),p(),m(4,"span",3),y(5),f(6,"translate"),p()(),Ge(7),p()),r&2&&(u(),B("routerLink",i.link)("queryParams",i.params),u(4),J(h(6,3,"global.back")))},dependencies:[ae,ce],styles:["[_nghost-%COMP%]{display:flex}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{height:calc(var(--bs-body-font-size) * var(--bs-body-line-height))}a[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.3rem}a[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:hover, a[_ngcontent-%COMP%]:focus{text-decoration:none}a[_ngcontent-%COMP%]:hover .label[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:focus .label[_ngcontent-%COMP%]{text-decoration:underline;text-decoration-color:#ea161f}"]})}}return e})();export{ht as a,yt as b,A as c,O as d,$ as e,Pe as f,z as g,De as h,It as i,he as j,Mt as k,Wt as l,$t as m,Rt as n,Nt as o,E as p,so as q,Jt as r,Kt as s,de as t,gt as u,lr as v,v as w,zt as x,le as y,po as z,ho as A,Yn as B,Yt as C,Co as D,So as E,_o as F,Po as G,Bt as H,Lo as I,Fo as J,Ao as K,Ho as L,qt as M,Go as N,Qo as O,Gt as P,aa as Q,Qt as R,la as S,Ca as T,Da as U}; diff --git a/public/apps/webapp-schulverwaltung/chunk-S75UZ635.js b/public/apps/webapp-schulverwaltung/chunk-U3A3T7IE.js similarity index 93% rename from public/apps/webapp-schulverwaltung/chunk-S75UZ635.js rename to public/apps/webapp-schulverwaltung/chunk-U3A3T7IE.js index 9c41e15d..1d2a821c 100644 --- a/public/apps/webapp-schulverwaltung/chunk-S75UZ635.js +++ b/public/apps/webapp-schulverwaltung/chunk-U3A3T7IE.js @@ -1,2 +1,2 @@ -import{a as We,b as Ye}from"./chunk-LEK2XGQE.js";import{b as ie}from"./chunk-EY7EEL4Q.js";import"./chunk-K4773ZNS.js";import"./chunk-ZGDP3BAB.js";import{a as Ze}from"./chunk-ETZJYB5I.js";import"./chunk-4CSFXSJN.js";import{a as Ke}from"./chunk-SP6SA4GZ.js";import"./chunk-NOKI2UHM.js";import{p as Ge}from"./chunk-U5XSAHDS.js";import"./chunk-4GQ5KKE3.js";import{e as ee}from"./chunk-HAKJPBT5.js";import{b as He}from"./chunk-HAMVO7SX.js";import"./chunk-Y4QYVF5K.js";import"./chunk-UVJXXYOR.js";import"./chunk-FFBZO25J.js";import"./chunk-SVCHNGNX.js";import{d as Ue,f as F,g as qe}from"./chunk-UFRLS5GG.js";import"./chunk-DZUR7EKU.js";import{d as ze}from"./chunk-FLVW3H6P.js";import"./chunk-2UDOWYE6.js";import{L as Ne,b as Be,g as de,p as je,q as Fe}from"./chunk-EDO6DY2V.js";import"./chunk-PQGQXFEQ.js";import{b as Ve}from"./chunk-UPZQ4FTT.js";import{a as X,b as te}from"./chunk-5NJNJ42P.js";import{w as we}from"./chunk-JHVNIEZK.js";import"./chunk-LTVWFE76.js";import{$a as C,Ab as U,Bb as H,Cb as Te,Db as w,Fa as S,Gc as Ie,Hc as Ee,Hd as Re,Ia as fe,Ib as a,Id as Ae,Jb as r,Kb as R,Ld as Oe,M as y,Ma as p,Mb as Pe,Mc as Q,O as be,Oa as oe,Od as M,P as D,Pa as _,Qa as _e,Qd as Le,Ua as m,X as B,Xa as Ce,Ya as ge,Za as d,_ as x,_a as c,a as V,ac as De,b as q,bc as O,bd as L,cb as ae,cc as Y,d as pe,da as K,db as ve,ea as W,fa as ue,fb as j,g as me,gb as f,gc as ce,h as he,hb as ye,ib as Se,kc as Z,l as A,n as u,o as G,pb as re,pc as $e,qb as l,rb as P,sb as T,tb as se,ub as xe,va as z,wa as n,wc as ke,xa as v,xc as Me,yc as J,zb as E}from"./chunk-34ZOBT6Z.js";var ut=["*"];function ft(e,s){e&1&&ae(0)}function _t(e,s){if(e&1&&(d(0,"a",1),p(1,ft,1,0,"ng-container",3),c()),e&2){let t=f(),i=re(3);_("routerLink",t.link)("queryParams",t.linkParams),n(),_("ngTemplateOutlet",i)}}function Ct(e,s){e&1&&ae(0)}function gt(e,s){if(e&1&&(d(0,"a",2),p(1,Ct,1,0,"ng-container",3),c()),e&2){let t=f(),i=re(3);_("href",t.externalLink,z),n(),_("ngTemplateOutlet",i)}}function vt(e,s){if(e&1&&(d(0,"span",5),l(1),c()),e&2){let t=f(2);n(),P(t.count)}}function yt(e,s){e&1&&(ue(),d(0,"svg",6),C(1,"path",7),c())}function St(e,s){if(e&1&&(d(0,"span",4),l(1),a(2,"translate"),c(),d(3,"div"),Se(4),p(5,vt,2,1,"span",5)(6,yt,2,0,":svg:svg",6),c()),e&2){let t=f();n(),P(r(2,2,t.label)),n(4),m(t.hasCount(t.count)?5:6)}}var Je=(()=>{class e{constructor(){}hasCount(t){return typeof t=="number"&&t>=0}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-action"]],inputs:{label:"label",count:"count",link:"link",linkParams:"linkParams",externalLink:"externalLink"},ngContentSelectors:ut,decls:4,vars:2,consts:[["actionContent",""],[3,"routerLink","queryParams"],[3,"href"],[4,"ngTemplateOutlet"],[1,"label"],[1,"count"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","fill","none"],["fill","currentColor","d","m12 20-1.425-1.4 5.6-5.6H4v-2h12.175l-5.6-5.6L12 4l8 8-8 8Z"]],template:function(i,o){i&1&&(ye(),p(0,_t,2,3,"a",1)(1,gt,2,2,"a",2)(2,St,7,4,"ng-template",null,0,Pe)),i&2&&(m(o.externalLink?-1:0),n(),m(o.externalLink?1:-1))},dependencies:[J,De,M],styles:["a[_ngcontent-%COMP%]{display:flex;gap:1rem;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:#f7e9d2;text-decoration:none;line-height:1}a[_ngcontent-%COMP%]:hover{background:#f2e0c3}a[_ngcontent-%COMP%]:focus-visible{outline-width:2px;outline-offset:-2px}div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem}.label[_ngcontent-%COMP%]{font-weight:400}.count[_ngcontent-%COMP%]{font-size:1.5rem}"]})}}return e})();var Qe=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-deadline"]],inputs:{count:"count"},decls:3,vars:8,template:function(i,o){i&1&&(l(0),a(1,"translate"),a(2,"addSpace")),i&2&&xe("",r(1,3,"dashboard.actions.deadline"),"",R(2,5,": ",":"),"",o.count,` +import{a as We,b as Ye}from"./chunk-2FW5UFUO.js";import{b as ie}from"./chunk-DJH5AAGM.js";import"./chunk-LHXVMKYN.js";import"./chunk-QB4DIFWS.js";import{a as Ze}from"./chunk-W4ESFJ6M.js";import"./chunk-RTY26FN4.js";import{a as Ke}from"./chunk-3HCVMNJA.js";import"./chunk-5WNFCBTP.js";import{p as Ge}from"./chunk-A3CECLYB.js";import"./chunk-HCNFZOWE.js";import{e as ee}from"./chunk-746ASKQ4.js";import{b as He}from"./chunk-DTTSX64G.js";import"./chunk-Y4QYVF5K.js";import"./chunk-AYQPMCNZ.js";import"./chunk-BIDSHCYH.js";import"./chunk-4RZQAAPF.js";import{d as Ue,f as F,g as qe}from"./chunk-Z4YBXGVO.js";import"./chunk-3L4RH6QP.js";import{d as ze}from"./chunk-DTYYCJHM.js";import"./chunk-XAZECV42.js";import{L as Ne,b as Be,g as de,p as je,q as Fe}from"./chunk-SRCW6BUG.js";import"./chunk-GOGVGWFJ.js";import{b as Ve}from"./chunk-OSOXMODN.js";import{a as X,b as te}from"./chunk-PSYDBHTH.js";import{w as we}from"./chunk-W4U7QKJF.js";import"./chunk-AVBHFGIF.js";import{$a as c,Ab as E,Bb as U,Cb as H,Db as Te,Eb as w,Ga as S,Hc as Ie,Ic as Ee,Id as Re,Ja as fe,Jb as a,Jd as Ae,Kb as r,Lb as R,M as y,Md as Oe,Na as p,Nb as Pe,Nc as Q,O as be,P as D,Pa as oe,Pd as M,Qa as _,Ra as _e,Rd as Le,Va as m,X as B,Ya as Ce,Za as ge,_ as x,_a as d,a as V,ab as C,b as q,bc as De,cc as O,cd as L,d as pe,db as ae,dc as Y,ea as K,eb as ve,fa as W,g as me,ga as ue,gb as j,h as he,hb as f,hc as ce,ib as ye,jb as Se,l as A,lc as Z,n as u,o as G,qb as re,qc as $e,rb as l,sb as P,tb as T,ub as se,vb as xe,wa as z,xa as n,xc as ke,ya as v,yc as Me,zc as J}from"./chunk-2W7IS4PN.js";var ut=["*"];function ft(e,s){e&1&&ae(0)}function _t(e,s){if(e&1&&(d(0,"a",1),p(1,ft,1,0,"ng-container",3),c()),e&2){let t=f(),i=re(3);_("routerLink",t.link)("queryParams",t.linkParams),n(),_("ngTemplateOutlet",i)}}function Ct(e,s){e&1&&ae(0)}function gt(e,s){if(e&1&&(d(0,"a",2),p(1,Ct,1,0,"ng-container",3),c()),e&2){let t=f(),i=re(3);_("href",t.externalLink,z),n(),_("ngTemplateOutlet",i)}}function vt(e,s){if(e&1&&(d(0,"span",5),l(1),c()),e&2){let t=f(2);n(),P(t.count)}}function yt(e,s){e&1&&(ue(),d(0,"svg",6),C(1,"path",7),c())}function St(e,s){if(e&1&&(d(0,"span",4),l(1),a(2,"translate"),c(),d(3,"div"),Se(4),p(5,vt,2,1,"span",5)(6,yt,2,0,":svg:svg",6),c()),e&2){let t=f();n(),P(r(2,2,t.label)),n(4),m(t.hasCount(t.count)?5:6)}}var Je=(()=>{class e{constructor(){}hasCount(t){return typeof t=="number"&&t>=0}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-action"]],inputs:{label:"label",count:"count",link:"link",linkParams:"linkParams",externalLink:"externalLink"},ngContentSelectors:ut,decls:4,vars:2,consts:[["actionContent",""],[3,"routerLink","queryParams"],[3,"href"],[4,"ngTemplateOutlet"],[1,"label"],[1,"count"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","fill","none"],["fill","currentColor","d","m12 20-1.425-1.4 5.6-5.6H4v-2h12.175l-5.6-5.6L12 4l8 8-8 8Z"]],template:function(i,o){i&1&&(ye(),p(0,_t,2,3,"a",1)(1,gt,2,2,"a",2)(2,St,7,4,"ng-template",null,0,Pe)),i&2&&(m(o.externalLink?-1:0),n(),m(o.externalLink?1:-1))},dependencies:[J,De,M],styles:["a[_ngcontent-%COMP%]{display:flex;gap:1rem;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:#f7e9d2;text-decoration:none;line-height:1}a[_ngcontent-%COMP%]:hover{background:#f2e0c3}a[_ngcontent-%COMP%]:focus-visible{outline-width:2px;outline-offset:-2px}div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem}.label[_ngcontent-%COMP%]{font-weight:400}.count[_ngcontent-%COMP%]{font-size:1.5rem}"]})}}return e})();var Qe=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-deadline"]],inputs:{count:"count"},decls:3,vars:8,template:function(i,o){i&1&&(l(0),a(1,"translate"),a(2,"addSpace")),i&2&&xe("",r(1,3,"dashboard.actions.deadline"),"",R(2,5,": ",":"),"",o.count,` `)},dependencies:[M,qe],styles:["[_nghost-%COMP%]{background:#ea161f;color:#fff;white-space:nowrap;font-weight:500;font-size:.875rem;min-height:1.5rem;display:flex;padding:.375rem .5rem;align-items:center;border-radius:2.5rem}"]})}}return e})();var Xe=Q({Id:Ee,Holder:Ie});var et=(()=>{class e extends X{constructor(t,i){super(t,i,Xe,"TeacherSubstitutions")}getTeacherSubstitution(t){return this.getList({params:{"filter.Id":`=${t}`}}).pipe(u(i=>i[0]||null))}static{this.\u0275fac=function(i){return new(i||e)(x(Z),x(L))}}static{this.\u0275prov=B({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var kt=["LessonTeacherRole","ClassTeacherRole","TeacherRole","AbsenceAdministratorRole"],Mt=["LessonTeacherRole","TeacherRole","StudentRole","SubstituteAdministratorRole"],It=["LessonTeacherRole","StudentRole"],I=(()=>{class e{constructor(t,i,o,h,b,$,N,bt){this.settingsService=t,this.lessonPresencesService=i,this.studentsService=o,this.courseService=h,this.teacherSubstitutionService=b,this.personService=$,this.storageService=N,this.settings=bt,this.rolesAndPermissions$=this.settingsService.getRolesAndPermissions(),this.userId$=new he(1),this.lessonAbsences$=this.userId$.pipe(D(g=>this.studentsService.getLessonAbsences(g)),y(1)),this.lessonIncidents$=this.userId$.pipe(D(g=>this.studentsService.getLessonIncidents(g)),y(1)),this.loading$=this.rolesAndPermissions$.pipe(u(g=>g==null)),this.hasSearch$=this.rolesAndPermissions$.pipe(u(this.hasRoles(kt))),this.hasActions$=this.rolesAndPermissions$.pipe(u(this.hasRoles(Mt))),this.hasTimetable$=this.rolesAndPermissions$.pipe(u(this.hasRoles(It))),this.hasLessonTeacherRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["LessonTeacherRole"])),y(1)),this.hasTeacherRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["TeacherRole"])),y(1)),this.hasStudentRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["StudentRole"])),y(1)),this.hasSubstituteAdministratorRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["SubstituteAdministratorRole"])),y(1)),this.editAbsencesCount$=this.hasLessonTeacherRole$.pipe(D(g=>g?this.lessonPresencesService.checkableAbsencesCount():A(!1)),y(1)),this.openAbsencesCount$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["LessonTeacherRole","ClassTeacherRole"])),D(g=>g?this.lessonPresencesService.getListOfUnconfirmed():A([])),u(g=>g.length),y(1)),this.myAbsencesCount$=this.hasStudentRole$.pipe(D(g=>g?this.getMyAbsences():A([])),u(this.getMyAbsencesCount.bind(this)),y(1)),this.coursesToRateCount$=this.courseService.getNumberOfCoursesForRating().pipe(be(0),y(1)),this.hasPresenceControl$=this.hasLessonTeacherRole$.pipe(D(g=>g?this.lessonPresencesService.hasLessonsLessonTeacher():A(!1)),y(1)),this.hasOpenAbsences$=this.openAbsencesCount$.pipe(u(g=>g>0),y(1)),this.editAbsencesParams$=this.getFullName().pipe(u(g=>({confirmationStates:this.settings.checkableAbsenceStateId,teacher:g})),y(1));let le=this.storageService.getPayload()?.id_person;le&&this.userId$.next(Number(le))}hasRoles(t){return i=>(i??[]).some(o=>t.includes(o))}getMyAbsences(){return G([this.userId$,this.lessonAbsences$,this.lessonIncidents$]).pipe(D(([t,i,o])=>this.loadTimetableEntries(t,i,o).pipe(u(h=>[...i,...o].map(b=>this.withTimetableEntry(b,h)).filter(we)))))}getMyAbsencesCount(t){return t?.filter(i=>("ConfirmationStateId"in i?i.ConfirmationStateId:null)===this.settings.unconfirmedAbsenceStateId).length||0}getFullName(){let t=Number(this.storageService.getPayload()?.substitution_id)||null;return t?this.teacherSubstitutionService.getTeacherSubstitution(t).pipe(u(i=>i?.Holder)):this.personService.getMyself().pipe(u(i=>i.FullName))}withTimetableEntry(t,i){return i.find(o=>o.Id===t.LessonRef.Id)?t:null}loadTimetableEntries(t,i,o){return this.studentsService.getTimetableEntries(t,{"filter.Id":`;${[...i,...o].map(h=>h.LessonRef.Id).join(";")}`})}static{this.\u0275fac=function(i){return new(i||e)(x(ie),x(ee),x(F),x(Ge),x(et),x(He),x(Le),x(L))}}static{this.\u0275prov=B({token:e,factory:e.\u0275fac})}}return e})();var Et=()=>["/presence-control"],Rt=()=>["/edit-absences"],At=()=>["/open-absences"],Ot=()=>["/events"],Lt=()=>["/my-absences","report"],wt=()=>["/my-absences"];function Bt(e,s){e&1&&C(0,"bkd-dashboard-action",0),e&2&&_("label","dashboard.actions.presence-control")("link",w(2,Et))}function jt(e,s){if(e&1&&(C(0,"bkd-dashboard-action",1),a(1,"async"),a(2,"async")),e&2){let t=f();_("label","dashboard.actions.edit-absences")("link",w(8,Rt))("linkParams",r(1,4,t.dashboardService.editAbsencesParams$))("count",r(2,6,t.dashboardService.editAbsencesCount$))}}function Ft(e,s){if(e&1&&(C(0,"bkd-dashboard-action",2),a(1,"async")),e&2){let t=f();_("label","dashboard.actions.open-absences")("link",w(5,At))("count",r(1,3,t.dashboardService.openAbsencesCount$))}}function Nt(e,s){if(e&1&&(C(0,"bkd-dashboard-deadline",4),a(1,"async")),e&2){let t=f(2);_("count",r(1,1,t.dashboardService.coursesToRateCount$))}}function zt(e,s){if(e&1&&(d(0,"bkd-dashboard-action",0),p(1,Nt,2,3,"bkd-dashboard-deadline",4),a(2,"async"),c()),e&2){let t,i=f();_("label","dashboard.actions.tests")("link",w(5,Ot)),n(),m((t=r(2,3,i.dashboardService.coursesToRateCount$))!==null&&t!==void 0&&t?1:-1)}}function Ut(e,s){e&1&&C(0,"bkd-dashboard-action",0),e&2&&_("label","dashboard.actions.my-absences-report")("link",w(2,Lt))}function Ht(e,s){if(e&1&&(C(0,"bkd-dashboard-action",2),a(1,"async")),e&2){let t=f();_("label","dashboard.actions.my-absences")("link",w(5,wt))("count",r(1,3,t.dashboardService.myAbsencesCount$))}}function Vt(e,s){if(e&1&&C(0,"bkd-dashboard-action",3),e&2){let t=f();_("label","dashboard.actions.substitutions")("externalLink",t.substitutionsAdminLink)}}var it=(()=>{class e{constructor(t,i){this.dashboardService=t,this.settings=i}get substitutionsAdminLink(){return this.settings.dashboard.substitutionsAdminLink}static{this.\u0275fac=function(i){return new(i||e)(v(I),v(L))}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-actions"]],decls:15,vars:23,consts:[[3,"label","link"],[3,"label","link","linkParams","count"],[3,"label","link","count"],[3,"label","externalLink"],[3,"count"]],template:function(i,o){i&1&&(p(0,Bt,1,3,"bkd-dashboard-action",0),a(1,"async"),p(2,jt,3,9,"bkd-dashboard-action",1),a(3,"async"),a(4,"async"),p(5,Ft,2,6,"bkd-dashboard-action",2),a(6,"async"),p(7,zt,3,6,"bkd-dashboard-action",0),a(8,"async"),p(9,Ut,1,3,"bkd-dashboard-action",0),a(10,"async"),p(11,Ht,2,6,"bkd-dashboard-action",2),a(12,"async"),p(13,Vt,1,2,"bkd-dashboard-action",3),a(14,"async")),i&2&&(m(r(1,7,o.dashboardService.hasPresenceControl$)?0:-1),n(2),m(r(3,9,o.dashboardService.hasLessonTeacherRole$)&&r(4,11,o.dashboardService.editAbsencesParams$)?2:-1),n(3),m(r(6,13,o.dashboardService.hasOpenAbsences$)?5:-1),n(2),m(r(8,15,o.dashboardService.hasTeacherRole$)?7:-1),n(2),m(r(10,17,o.dashboardService.hasStudentRole$)?9:-1),n(2),m(r(12,19,o.dashboardService.hasStudentRole$)?11:-1),n(2),m(r(14,21,o.dashboardService.hasSubstituteAdministratorRole$)?13:-1))},dependencies:[Je,Qe,O],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}"]})}}return e})();var nt=(()=>{class e{constructor(t,i){this.studentsRestService=t,this.router=i}navigateToDossier(t){return pe(this,null,function*(){let i=Number(t);yield this.router.navigate(["dashboard","student",i,"addresses"])})}static{this.\u0275fac=function(i){return new(i||e)(v(F),v(Me))}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-search"]],decls:1,vars:2,consts:[[3,"valueChange","typeaheadService","placeholder"]],template:function(i,o){i&1&&(d(0,"bkd-typeahead",0),j("valueChange",function(b){return b&&o.navigateToDossier(b)}),c()),i&2&&_("typeaheadService",o.studentsRestService)("placeholder","dashboard.search.placeholder")},dependencies:[Ze],styles:["[_nghost-%COMP%]{display:block;padding:.75rem;background:#f7e9d2}"]})}}return e})();var ot=(()=>{class e{constructor(t){this.sanitizer=t}transform(t,i){switch(i){case"html":return this.sanitizer.bypassSecurityTrustHtml(t);case"style":return this.sanitizer.bypassSecurityTrustStyle(t);case"script":return this.sanitizer.bypassSecurityTrustScript(t);case"url":return this.sanitizer.bypassSecurityTrustUrl(t);case"resourceUrl":return this.sanitizer.bypassSecurityTrustResourceUrl(t);default:throw new Error(`Invalid safe type specified: ${i}`)}}static{this.\u0275fac=function(i){return new(i||e)(v($e,16))}}static{this.\u0275pipe=fe({name:"safe",type:e,pure:!0})}}return e})();function at(e){return{id:ct(e.EventId,e.Id),from:e.From,until:e.To,eventId:e.EventId,subject:e.EventDesignation,room:e.EventLocation||void 0,teacher:e.EventManagerInformation||void 0}}function rt(e){let s=e.reduce((t,i)=>{let o=ct(i.EventRef.Id,i.LessonRef.Id);return q(V({},t),{[o]:[...t[o]??[],i.StudyClassNumber]})},{});return Object.keys(s).reduce((t,i)=>q(V({},t),{[i]:Re([...s[i]].sort())}),{})}function st(e,s){return e.map(t=>q(V({},t),{studyClass:s[t.id]?.join(", ")}))}function ct(e,s){return`${e}-${s}`}var qt=(e,s)=>s.id;function Gt(e,s){e&1&&(d(0,"th"),l(1),a(2,"translate"),c()),e&2&&(n(),T(" ",r(2,1,"dashboard.timetable.table.teacher")," "))}function Kt(e,s){if(e&1&&(E(0),d(1,"a",3),l(2),d(3,"span",8),l(4),c()()),e&2){let t=f().$implicit,i=f(2).buildLink(t.eventId);n(),_("routerLink",i.link)("queryParams",i.params),n(),T(" ",t.subject,""),n(2),T(", ",t.studyClass,"")}}function Wt(e,s){if(e&1&&l(0),e&2){let t=f().$implicit;T(" ",t.subject," ")}}function Yt(e,s){if(e&1&&(d(0,"td",4),l(1),a(2,"translate"),c()),e&2){let t=f().$implicit;n(),se(" ",r(2,2,"dashboard.timetable.table.study-class"),": ",t.studyClass," ")}}function Zt(e,s){if(e&1&&(d(0,"td",5),l(1),c()),e&2){let t=f().$implicit;n(),T(" ",t.teacher," ")}}function Jt(e,s){e&1&&(d(0,"span",7),l(1),a(2,"translate"),c()),e&2&&(n(),P(r(2,1,"dashboard.timetable.table.room")))}function Qt(e,s){if(e&1&&(d(0,"tr")(1,"td",1),l(2),a(3,"date"),a(4,"date"),c(),d(5,"td",2),p(6,Kt,5,4,"a",3),a(7,"async"),p(8,Wt,1,1),c(),p(9,Yt,3,4,"td",4),a(10,"async"),p(11,Zt,2,1,"td",5),a(12,"async"),d(13,"td",6),p(14,Jt,3,3,"span",7),l(15),c()()),e&2){let t=s.$implicit,i=f(2);n(2),se(" ",R(3,7,t.from,"HH:mm"),"\u2013",R(4,10,t.until,"HH:mm")," "),n(4),m(r(7,13,i.isTeacher$)?6:8),n(3),m(r(10,15,i.isTeacher$)?9:-1),n(2),m(r(12,17,i.isStudent$)?11:-1),n(3),m(t.room?14:-1),n(),T(" ",t.room," ")}}function Xt(e,s){if(e&1&&(d(0,"table",0)(1,"thead")(2,"tr")(3,"th"),l(4),a(5,"translate"),c(),d(6,"th"),l(7),a(8,"translate"),c(),p(9,Gt,3,3,"th"),a(10,"async"),d(11,"th"),l(12),a(13,"translate"),c()()(),d(14,"tbody"),Ce(15,Qt,16,19,"tr",null,qt),c()()),e&2){let t=f();n(4),P(r(5,4,"dashboard.timetable.table.time")),n(3),P(r(8,6,"dashboard.timetable.table.subject")),n(2),m(r(10,8,t.isStudent$)?9:-1),n(3),T(" ",r(13,10,"dashboard.timetable.table.room")," "),n(3),ge(t.entries)}}function ei(e,s){e&1&&(d(0,"p"),l(1),a(2,"translate"),c()),e&2&&(n(),P(r(2,1,"dashboard.timetable.no-entries")))}var dt=(()=>{class e{constructor(t){this.dashboardService=t,this.entries=[],this.isStudent$=this.dashboardService.hasStudentRole$,this.isTeacher$=this.dashboardService.hasLessonTeacherRole$}buildLink(t){return ze(We(t,"/dashboard"))}static{this.\u0275fac=function(i){return new(i||e)(v(I))}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-timetable-table"]],inputs:{entries:"entries"},decls:2,vars:1,consts:[[1,"table"],[1,"time"],[1,"subject"],[3,"routerLink","queryParams"],[1,"study-class"],[1,"teacher"],[1,"room"],[1,"room-label"],[1,"subject-study-class"]],template:function(i,o){i&1&&p(0,Xt,17,12,"table",0)(1,ei,3,3,"p"),i&2&&m(o.entries.length>0?0:1)},dependencies:[O,Y,M,J],styles:['td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{padding:1rem 1.75rem}.room-label[_ngcontent-%COMP%], td.study-class[_ngcontent-%COMP%]{display:none}@media (max-width: 767.98px){table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{display:none}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{border-top:1px solid var(--bs-border-color)}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-template-areas:"time room" "subject subject" "study-class study-class" "teacher teacher";gap:.5rem;padding:1rem;border-bottom:1px solid var(--bs-border-color)}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:0;padding:0}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.time[_ngcontent-%COMP%]{grid-area:time;font-size:.875rem;line-height:1.125rem;font-weight:300}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.subject[_ngcontent-%COMP%]{grid-area:subject;font-size:1rem;line-height:1.25rem;font-weight:400}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.teacher[_ngcontent-%COMP%]{grid-area:teacher;font-size:.8125rem;line-height:1.0625rem;font-weight:300}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.room[_ngcontent-%COMP%]{grid-area:room;text-align:right;font-size:.875rem;line-height:1.125rem;font-weight:300}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.study-class[_ngcontent-%COMP%]{grid-area:study-class;font-size:.8125rem;line-height:1.0625rem;font-weight:300}td.study-class[_ngcontent-%COMP%]{display:block}.subject-study-class[_ngcontent-%COMP%]{display:none}.room-label[_ngcontent-%COMP%]{display:inline}}']})}}return e})();var ti=Q({}),lt=(()=>{class e extends X{constructor(t,i){super(t,i,ti,"Teachers")}getTimetableEntries(t,i={}){let o=i instanceof ce?i:new ce({fromObject:i});return o=o.set("fields","Id,From,To,EventId,EventNumber,EventDesignation,EventLocation"),this.http.get(`${this.baseUrl}/${t}/TimetableEntries/CurrentSemester`,{params:o}).pipe(D(Oe(Ue)))}static{this.\u0275fac=function(i){return new(i||e)(x(Z),x(L))}}static{this.\u0275prov=B({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function ni(e,s){e&1&&(d(0,"a",6),a(1,"safe"),l(2),a(3,"translate"),c()),e&2&&(_("href",R(1,2,s,"url"),z),n(2),T(" ",r(3,5,"dashboard.timetable.subscribe-calendar")," "))}function oi(e,s){e&1&&C(0,"bkd-spinner")}function ai(e,s){e&1&&(d(0,"a",8),a(1,"safe"),l(2),a(3,"translate"),c()),e&2&&(_("href",R(1,2,s,"url"),z),n(2),T(" ",r(3,5,"dashboard.timetable.subscribe-calendar")," "))}function ri(e,s){if(e&1&&(C(0,"bkd-dashboard-timetable-table",7),p(1,ai,4,7,"a",8),a(2,"async")),e&2){let t,i=f(),o=H(18);_("entries",o),n(),m((t=r(2,2,i.getSubscribeCalendarUrl()))?1:-1,t)}}var si="cal",pt=(()=>{class e{constructor(t,i,o,h,b,$){this.teachersService=t,this.studentsService=i,this.lessonPresencesService=o,this.userSettings=h,this.dashboardService=b,this.loadingService=$,this.userId$=this.dashboardService.userId$,this.isTeacher$=this.dashboardService.hasLessonTeacherRole$,this.isStudent$=this.dashboardService.hasStudentRole$,this.date$=new me(de(new Date)),this.loading$=this.loadingService.loading$,this.timetableEntries$=this.loadTimetableEntries()}gotoToday(){this.date$.next(de(new Date))}gotoPreviousDay(){this.date$.next(Fe(this.date$.getValue(),1))}gotoNextDay(){this.date$.next(Be(this.date$.getValue(),1))}getSubscribeCalendarUrl(){return this.userSettings.getSetting(si)}loadTimetableEntries(){return G([this.isTeacher$,this.isStudent$,this.userId$,this.date$]).pipe(D(([t,i,o,h])=>{let b=()=>t?this.fetchTimetableEntries("teacher",o,h):i?this.fetchTimetableEntries("student",o,h):A([]);return this.loadingService.load(b())}),y(1))}fetchTimetableEntries(t,i,o){let h={"filter.From":`=${je(o,"yyyy-MM-dd")}`,sort:"From,To"};return(t==="teacher"?this.teachersService.getTimetableEntries(i,h):this.studentsService.getTimetableEntries(i,h)).pipe(u(b=>b.map(at)),u(b=>Ae(b,$=>$.id)),D(b=>t==="teacher"?this.loadStudyClasses(o).pipe(u($=>st(b,$))):A(b)))}loadStudyClasses(t){return this.lessonPresencesService.getLessonStudyClassesByDate(t).pipe(u(rt))}static{this.\u0275fac=function(i){return new(i||e)(v(lt),v(F),v(ee),v(ie),v(I),v(Ve))}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-timetable"]],decls:23,vars:24,consts:[[1,"header"],["type","button",1,"btn","btn-primary","today",3,"click"],["type","button",1,"btn","btn-secondary","previous-day",3,"click"],[1,"material-icons"],["type","button",1,"btn","btn-secondary","next-day",3,"click"],[1,"date"],["target","_parent",1,"btn","btn-secondary","subscribe-calendar-header",3,"href"],[3,"entries"],["target","_parent",1,"btn","btn-secondary","subscribe-calendar-bottom",3,"href"]],template:function(i,o){if(i&1){let h=ve();d(0,"div",0)(1,"button",1),j("click",function(){return K(h),W(o.gotoToday())}),l(2),a(3,"translate"),c(),d(4,"button",2),a(5,"translate"),j("click",function(){return K(h),W(o.gotoPreviousDay())}),d(6,"span",3),l(7,"chevron_left"),c()(),d(8,"button",4),a(9,"translate"),j("click",function(){return K(h),W(o.gotoNextDay())}),d(10,"span",3),l(11,"chevron_right"),c()(),d(12,"div",5),l(13),a(14,"async"),a(15,"date"),c(),p(16,ni,4,7,"a",6),a(17,"async"),c(),E(18),a(19,"async"),p(20,oi,1,0,"bkd-spinner"),a(21,"async"),p(22,ri,3,4)}if(i&2){let h;n(2),T(" ",r(3,6,"dashboard.timetable.today")," "),n(2),oe("aria-label",r(5,8,"dashboard.timetable.previousDay")),n(4),oe("aria-label",r(9,10,"dashboard.timetable.nextDay")),n(5),P(R(15,14,r(14,12,o.date$),"E, dd. MMMM yyyy")),n(3),m((h=r(17,17,o.getSubscribeCalendarUrl()))?16:-1,h),n(2),U(r(19,19,o.timetableEntries$)),n(2),m(r(21,22,o.loading$)?20:22)}},dependencies:[dt,te,O,Y,M,ot],styles:["[_nghost-%COMP%]{display:block;margin-bottom:1rem}.header[_ngcontent-%COMP%]{margin-top:1rem;margin-bottom:2rem;display:flex;align-items:center;gap:1rem}.previous-day[_ngcontent-%COMP%], .next-day[_ngcontent-%COMP%]{padding-left:.375rem;padding-right:.375rem}.date[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600}.subscribe-calendar-header[_ngcontent-%COMP%]{margin-left:auto}.subscribe-calendar-bottom[_ngcontent-%COMP%]{display:none}a.btn[_ngcontent-%COMP%]{text-decoration:none}@media (max-width: 767.98px){.subscribe-calendar-header[_ngcontent-%COMP%]{display:none}.subscribe-calendar-bottom[_ngcontent-%COMP%]{display:block;margin-top:2rem}}@media (max-width: 767.98px) and (max-width: 575.98px){.header[_ngcontent-%COMP%]{flex-wrap:wrap-reverse}.header[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{width:100%}}"]})}}return e})();function ci(e,s){e&1&&C(0,"bkd-spinner")}function di(e,s){e&1&&(d(0,"p"),l(1),a(2,"translate"),c()),e&2&&(n(),T(" ",r(2,1,"dashboard.no-access")," "))}function li(e,s){e&1&&(d(0,"div")(1,"h2"),l(2),a(3,"translate"),c(),C(4,"bkd-dashboard-search"),c()),e&2&&(n(2),P(r(3,1,"dashboard.search.title")))}function pi(e,s){e&1&&(d(0,"div")(1,"h2"),l(2),a(3,"translate"),c(),C(4,"bkd-dashboard-actions"),c()),e&2&&(n(2),P(r(3,1,"dashboard.actions.title")))}function mi(e,s){if(e&1&&(d(0,"div",1),p(1,li,5,3,"div")(2,pi,5,3,"div"),c()),e&2){f();let t=H(2),i=H(4);n(),m(t?1:-1),n(),m(i?2:-1)}}function hi(e,s){e&1&&(d(0,"div",2)(1,"h2"),l(2),a(3,"translate"),c(),C(4,"bkd-dashboard-timetable"),c()),e&2&&(n(2),P(r(3,1,"dashboard.timetable.title")))}var mt=(()=>{class e{constructor(t){this.dashboardService=t}static{this.\u0275fac=function(i){return new(i||e)(v(I))}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard-layout"]],decls:17,vars:19,consts:[[1,"columns"],[1,"search-actions-column"],[1,"timetable-column"]],template:function(i,o){if(i&1&&(E(0),a(1,"async"),E(2),a(3,"async"),E(4),a(5,"async"),E(6),a(7,"async"),d(8,"div")(9,"h1"),l(10),a(11,"translate"),c(),p(12,ci,1,0,"bkd-spinner")(13,di,3,3,"p"),d(14,"div",0),p(15,mi,3,2,"div",1)(16,hi,5,3,"div",2),c()()),i&2){let h=r(1,7,o.dashboardService.loading$);n(2);let b=U(r(3,9,o.dashboardService.hasSearch$));n(2);let $=U(r(5,12,o.dashboardService.hasActions$)),N=r(7,15,o.dashboardService.hasTimetable$);n(5),_e("visually-hidden",h||b||$||N),n(),T(" ",r(11,17,"dashboard.heading")," "),n(2),m(h?12:-1),n(),m(!h&&!b&&!$&&!N?13:-1),n(2),m(b||$?15:-1),n(),m(N?16:-1)}},dependencies:[te,nt,it,pt,O,M],styles:[".columns[_ngcontent-%COMP%]{display:flex;flex-direction:column}.columns[_ngcontent-%COMP%], .search-actions-column[_ngcontent-%COMP%]{gap:3rem}.search-actions-column[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;max-width:40rem}.timetable-column[_ngcontent-%COMP%]{flex:2}@media (min-width: 992px){.columns[_ngcontent-%COMP%]{flex-direction:row;gap:1.5rem}.search-actions-column[_ngcontent-%COMP%]{max-width:33%}}"],changeDetection:0})}}return e})();var ht=(()=>{class e{constructor(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=S({type:e,selectors:[["bkd-dashboard"]],features:[Te([I,Ne])],decls:1,vars:0,template:function(i,o){i&1&&C(0,"router-outlet")},dependencies:[ke],encapsulation:2,changeDetection:0})}}return e})();var En=[{path:"",component:ht,children:[{path:"",component:mt},Ke,Ye("students/:id")]}];export{En as DASHBOARD_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-U5XSAHDS.js b/public/apps/webapp-schulverwaltung/chunk-U5XSAHDS.js deleted file mode 100644 index 89981880..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-U5XSAHDS.js +++ /dev/null @@ -1,3 +0,0 @@ -import{a as yt}from"./chunk-Y4QYVF5K.js";import{a as xt}from"./chunk-UVJXXYOR.js";import{b as Tt,c as _t,d as wt}from"./chunk-DZUR7EKU.js";import{b as Gt}from"./chunk-UPZQ4FTT.js";import{a as se}from"./chunk-5NJNJ42P.js";import{C as Ce,c as ft,d as ht,e as It,f as St,g as bt,r as vt,s as Ct,w as ve}from"./chunk-JHVNIEZK.js";import{$a as te,$b as Ze,$c as nt,Ab as ce,Ad as gt,Bb as U,D as we,Db as Xe,Eb as fe,Fa as $,Gc as v,H as qe,Hc as o,Ia as Q,Ib as c,Ic as j,Jb as f,K as Ke,Kb as L,Kd as q,Lb as Je,Lc as w,Ld as N,M as Ee,Ma as T,Mc as S,Nb as Ye,Nc as he,Nd as be,Od as M,P as C,Pa as G,Pc as De,Qa as $e,R as Pe,Tc as u,Ua as _,Vc as it,X as R,Xa as Z,Ya as ee,Yb as Qe,Za as l,Zc as re,_ as x,_a as d,a as O,b as F,bc as V,bd as W,c as He,ca as H,cc as et,da as J,db as ie,dc as tt,ea as Y,ed as rt,f as ue,fb as k,g as B,gb as I,gd as Re,h as oe,hd as Ie,jb as ge,kc as ne,kd as st,l as Ge,la as ze,ld as at,m as Ue,n as m,nd as ot,o as de,pb as le,pd as dt,qb as p,rb as D,s as me,sb as b,sd as lt,td as pt,ud as ct,vd as ut,w as Le,wa as a,wd as mt,x as We,xa as P,zb as pe,zd as Se}from"./chunk-34ZOBT6Z.js";var ni=(t,r)=>r.Key,ri=t=>({width:t});function si(t,r){if(t&1&&(l(0,"option",1),p(1),c(2,"translate"),d()),t&2){let e=I();G("ngValue",null),a(),b(" ",f(2,2,e.emptyLabel)," ")}}function ai(t,r){if(t&1&&(l(0,"option",1),p(1),d()),t&2){let e=r.$implicit;G("ngValue",e),a(),b(" ",e.Value," ")}}var Et=(()=>{class t{constructor(){this.options=[],this.allowEmpty=!0,this.emptyLabel="",this.value=null,this.disabled=!1,this.tabindex=0,this.width="auto",this.valueChange=new ze,this.options$=new B([]),this.rawValue$=new B(null),this.value$=de([this.rawValue$,this.options$]).pipe(m(([e,i])=>i&&i.find(n=>n.Key===e)||null))}ngOnChanges(e){e.value&&this.rawValue$.next(e.value.currentValue),e.options&&this.options$.next(e.options.currentValue)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=$({type:t,selectors:[["bkd-select"]],inputs:{options:"options",allowEmpty:"allowEmpty",emptyLabel:"emptyLabel",value:"value",disabled:"disabled",tabindex:"tabindex",width:"width"},outputs:{valueChange:"valueChange"},features:[H],decls:6,vars:9,consts:[[1,"form-select",3,"ngModelChange","tabindex","ngStyle","disabled","ngModel"],[3,"ngValue"]],template:function(i,n){i&1&&(l(0,"select",0),c(1,"async"),k("ngModelChange",function(y){return n.valueChange.emit(y&&y.Key)}),T(2,si,3,4,"option",1),Z(3,ai,2,2,"option",1,ni),p(5,` > -`),d()),i&2&&(ge("tabindex",n.tabindex),G("ngStyle",fe(7,ri,n.width))("disabled",n.disabled)("ngModel",f(1,5,n.value$)),a(2),_(n.allowEmpty?2:-1),a(),ee(n.options))},dependencies:[Se,pt,ct,lt,Ie,at,V,Ze,M],encapsulation:2,changeDetection:0})}}return t})();var Pt=S({Id:o,Designation:v,StudentCount:o,Number:v});var Me=S({Id:v,TestId:o,CourseRegistrationId:o,GradeId:u(o),GradeValue:u(o),GradeDesignation:u(v),Points:u(o),StudentId:o});var $t=S({Id:o,CourseId:o,Date:re,Designation:v,Weight:o,WeightPercent:o,IsPointGrading:j,MaxPoints:u(o),MaxPointsAdjusted:u(o),IsPublished:j,IsOwner:j,Owner:u(v),GradingScaleId:u(o),Results:u(w(Me))});var Dt=S({Id:o}),Rt=he({HRef:u(v)}),oi=he({HasEvaluationStarted:j,EvaluationUntil:u(re),HasReviewOfEvaluationStarted:j,HasTestGrading:j,Id:o}),di=De([Dt,Rt,oi]),li=he({Id:o,StudentCount:o}),pi=De([Dt,Rt,li]),ci=S({Grade:v,AverageTestResult:o,Id:o,StudentId:o}),Oe=S({AverageTestResult:o,CanGrade:j,EventId:o,GradeId:u(o),GradeValue:u(o),Id:o,StudentId:o}),K=S({HRef:v,Id:o,Number:v,Designation:v,DateFrom:u(re),DateTo:u(re),StatusId:o,GradingScaleId:u(o),FinalGrades:u(w(ci)),Gradings:u(w(Oe)),Tests:u(w($t)),EvaluationStatusRef:di,AttendanceRef:pi,ParticipatingStudents:u(w(_t)),Classes:u(w(Pt))}),Mt=S({TestResults:w(Me),Gradings:w(Oe)}),Ot=S({Gradings:w(Oe)});var xe=(()=>{class t extends se{constructor(e,i){super(e,i,K,"Courses"),this.statusCodec=S(nt(this.codec.props,["Id","StatusId","EvaluationStatusRef"]))}getNumberOfCoursesForRating(){return this.http.get(`${this.baseUrl}/?expand=EvaluationStatusRef&fields=Id,StatusId,EvaluationStatusRef&filter.StatusId=;10300;10240`,{headers:{"X-Role-Restriction":"TeacherRole"}}).pipe(C(N(this.statusCodec)),m(e=>e.filter(i=>i.EvaluationStatusRef.HasEvaluationStarted===!0)),m(e=>e.length))}getExpandedCourses(e){return yt(e,"TeacherRole")?this.http.get(`${this.baseUrl}/?expand=EvaluationStatusRef,AttendanceRef,Classes,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"TeacherRole"}}).pipe(C(N(K))):Ge([])}getExpandedCourse(e){return this.http.get(`${this.baseUrl}/${e}?expand=ParticipatingStudents,EvaluationStatusRef,Tests,Gradings,FinalGrades,Classes`).pipe(C(q(K)))}getExpandedCourseWithParticipants(e){return this.http.get(`${this.baseUrl}/${e}?expand=ParticipatingStudents,Classes,AttendanceRef`).pipe(C(q(K)))}getExpandedCoursesForDossier(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades,EvaluationStatusRef,ParticipatingStudents,Classes&filter.StatusId=;${this.settings.eventlist.statusfilter}`).pipe(C(N(K)))}getExpandedCoursesForStudent(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"StudentRole"}}).pipe(C(N(K)))}add(e,i,n,s,y,A,g){let h={Tests:[{Date:i,Designation:n,Weight:s,IsPointGrading:y,MaxPoints:A,MaxPointsAdjusted:g}]};return this.http.put(`${this.baseUrl}/${e}/Tests/New`,h).pipe(m(()=>{}))}update(e,i,n,s,y,A,g,h){let X={Tests:[{Id:i,Designation:n,Date:s,Weight:y,IsPointGrading:A,MaxPoints:g,MaxPointsAdjusted:h}]};return this.http.put(`${this.baseUrl}/${e}/Tests/Update`,X).pipe(m(()=>{}))}delete(e,i){let n={TestIds:[i]};return this.http.put(`${this.baseUrl}/${e}/Tests/Delete`,n).pipe(m(()=>i))}updateTestResult(e,i){let h=i,{studentId:n,testId:s}=h,y=He(h,["studentId","testId"]),A={StudentIds:[n],TestId:s},g="gradeId"in y?F(O({},A),{GradeId:y.gradeId}):F(O({},A),{Points:y.points});return this.http.put(`${this.baseUrl}/${e}/SetTestResult`,g).pipe(C(q(Mt)),C(({TestResults:X,Gradings:Ne})=>X.length<=1&&Ne.length===1?Ge({courseId:e,testResult:X[0]??null,grading:Ne[0]}):Ue(()=>new Error("`TestResults` or `Gradings` does not contain a single value"))))}setAverageAsFinalGrade(e){return this.http.put(`${this.baseUrl}/SetAverageTestResult`,e).pipe(C(q(Ot)))}publishTest(e){let i={TestIds:[e]};return this.http.put(`${this.baseUrl}/PublishTest`,i).pipe(m(()=>e))}unpublishTest(e){let i={TestIds:[e]};return this.http.put(`${this.baseUrl}/UnpublishTest`,i).pipe(m(()=>e))}static{this.\u0275fac=function(i){return new(i||t)(x(ne),x(W))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function At(t){return t.length===0?0:Fe(t.map(({value:r,weight:e})=>r*e))/Fe(t.map(({weight:r})=>r))}function je(t){return t.length===0?0:Number(Fe(t)/t.length)}function Fe(t){return t.reduce(ui,0)}function ui(t,r){return t+r}function xn(t,r,e){return t?t.Tests?.reduce((i,n)=>i||n.Id===r&&n.Results?.find(s=>s.TestId===r&&s.StudentId===e)||null,null)??null:null}function yn(t,r,e){return r.map(i=>i.Id===t.TestId?Be(t,i,e):i)}function Tn(t,r,e){return e.map(i=>i.Id===t?mi(r,i):i)}function _n(t,r){return r.map(e=>e.Id===t?F(O({},e),{IsPublished:!e.IsPublished}):e)}function Gn(t){let r=fi(t);if(r.length===0)throw new Error("unable to calculate averages without results");return je(r)}function Ae(t){return t.MaxPointsAdjusted||t.MaxPoints}function wn(t){let r=gi(t);if(r.length===0)throw new Error("unable to calculate averages without results");return je(r)}function z(t,r){return r.Results?.find(e=>e.StudentId===t)}function En(t,r){return r===null?null:r.filter(e=>e.Id!==t)}function Be(t,r,e){let i=e&&r.Results?.find(s=>s.TestId===t.TestId&&s.StudentId===t.StudentId),n=r.Results?.filter(s=>!(s.TestId===t.TestId&&s.StudentId===t.StudentId))||[];return i&&e==="grade"?t.GradeId=i.GradeId:i&&e==="points"&&(t.Points=i.Points),F(O({},r),{Results:[...n,t]})}function kt(t){return t.slice().sort((r,e)=>e.Date.getTime()-r.Date.getTime())}function ye(t,r){return r?.find(e=>e.Id===t.GradingScaleId)||null}function mi(t,r){return F(O({},r),{Results:r.Results?.filter(e=>e.StudentId!==t)||[]})}function gi(t){return t.Results?.filter(r=>r.GradeDesignation!==null).map(r=>Number(r.GradeDesignation)).filter(r=>!isNaN(r))||[]}function fi(t){return t.Results?.map(r=>r.Points!==null?r.Points:Bt).filter(r=>r>Bt)||[]}var Bt=-1;var Mn=S({Id:v,SubscriptionId:o,VssId:o,EventId:o,DropdownItems:u(w(xt)),IdPerson:o,ShowAsRadioButtons:j,Value:u(v)}),ke=S({Id:o,EventId:u(o),PersonId:u(o),Status:v,EventDesignation:u(v)});var Vt=(()=>{class t extends se{constructor(e,i){super(e,i,ke,"Subscriptions")}getSubscriptionIdsByStudentAndCourse(e,i){return this.http.get(`${this.baseUrl}/`,{params:{"filter.PersonId":`=${e}`,"filter.EventId":`;${i}`}}).pipe(C(N(it)),m(n=>n.map(s=>s.Id)))}getSubscriptionCountsByEvents(e){return this.http.get(`${this.baseUrl}/`,{params:{"filter.EventId":`;${e.join(";")}`,fields:["Id","EventId"].join(",")}}).pipe(C(N(S({Id:o,EventId:o}))),m(i=>i.reduce((n,s)=>(n[s.EventId]=n[s.EventId]?n[s.EventId]+1:1,n),{})))}getSubscriptionsByCourse(e,i){return this.http.get(`${this.baseUrl}/`,{params:F(O({"filter.EventId":`=${e}`},i),{fields:["Id","EventId","EventDesignation","PersonId","Status"].join(",")})}).pipe(C(N(ke)))}static{this.\u0275fac=function(i){return new(i||t)(x(ne),x(W))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ii=S({Id:o,Designation:v}),Ve=S({Id:o,Grades:w(Ii)});var Nt=(()=>{class t extends se{constructor(e,i){super(e,i,Ve,"GradingScales")}getGradingScale(e){return this.http.get(`${this.baseUrl}/${e}`).pipe(C(q(Ve)))}getGradingScales(e){return me(e.map(this.getGradingScale.bind(this)))}static{this.\u0275fac=function(i){return new(i||t)(x(ne),x(W))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Te=(()=>{class t{constructor(e,i,n,s,y,A){this.coursesRestService=e,this.subscriptionRestService=i,this.reportsService=n,this.loadingService=s,this.gradingScalesRestService=y,this.settings=A,this.studentId$=new oe(1),this.initialStudentCourses$=this.studentId$.pipe(qe(),C(this.loadCourses.bind(this)),m(g=>g.sort((h,X)=>h.Designation.localeCompare(X.Designation))),Ee(1)),this.action$=new oe(1),this.studentCourses$=Le(this.action$,this.initialStudentCourses$.pipe(m(g=>({type:"initializeCourses",payload:g})))).pipe(Ke(this.coursesReducer.bind(this),[]),Ee(1)),this.loading$=this.loadingService.loading$,this.studentCourseIds$=this.studentCourses$.pipe(m(g=>g.flatMap(h=>h.Id))),this.subscriptionIds$=de([this.studentId$,this.studentCourseIds$]).pipe(C(([g,h])=>this.subscriptionRestService.getSubscriptionIdsByStudentAndCourse(g,h))),this.testReports$=this.subscriptionIds$.pipe(m(g=>this.reportsService.getTeacherSubscriptionGradesReports(g))),this.tests$=this.studentCourses$.pipe(m(g=>g.flatMap(h=>h.Tests).filter(ve))),this.gradingScaleIdsFromTests$=this.tests$.pipe(m(g=>[...g.map(h=>h.GradingScaleId)].filter(ve).filter(Ce))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(m(g=>g.flatMap(h=>h.GradingScaleId).filter(ve).filter(Ce))),this.gradingScaleIds$=de([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(m(([g,h])=>g.concat(h).filter(Ce))),this.gradingScales$=this.gradingScaleIds$.pipe(C(g=>me(g.map(h=>this.gradingScalesRestService.getGradingScale(h)))))}setStudentId(e){this.studentId$.next(e)}getFinalGradeForStudent(e,i){return e?.FinalGrades?.find(n=>n.StudentId===i)}getGradingForStudent(e,i){return e?.Gradings?.find(n=>n.StudentId===i)}getGradingScaleOfCourse(e,i){return i?.find(n=>n.Id===e.GradingScaleId)}getGradesForStudent(e,i,n){return e.Tests?.flatMap(s=>({value:Number(ye(s,n)?.Grades.find(A=>A.Id===z(i,s)?.GradeId)?.Designation),weight:s.Weight})).filter(({value:s})=>!!s)||[]}updateStudentCourses(e){this.action$.next({type:"updateCourses",payload:e})}loadCourses(e){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForDossier().pipe(m(i=>i.filter(n=>n.ParticipatingStudents?.find(s=>s.Id===e)))))}coursesReducer(e,i){switch(i.type){case"initializeCourses":return i.payload;case"updateCourses":return this.updateCourses([...e],i.payload);default:return e}}updateCourses(e,i){return e.map(n=>F(O({},n),{Tests:n.Tests!==null?n.Tests.map(s=>s.Id===i.Id?i:s):null}))}static{this.\u0275fac=function(i){return new(i||t)(x(xe),x(Vt),x(wt),x(Gt),x(Nt),x(W))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac})}}return t})();var Ut=(()=>{class t{constructor(){}get inIframe(){return window.parent!==window}get window(){return this.inIframe?window.parent:null}get document(){return this.window?.document.documentElement??null}querySelector(e){return this.window?.document?.querySelector("bkd-portal")?.shadowRoot?.querySelector(e)??null}getIframeElement(){return this.querySelector("bkd-content")?.shadowRoot?.querySelector("iframe")??null}getIframeTop(){return this.getIframeElement()?.offsetTop??0}getIFrameBottom(){let e=this.getIframeElement();return e?e.offsetTop+e.offsetHeight:0}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Lt=(()=>{class t{constructor(e,i){this.modal=e,this.portal=i}open(...e){let i=this.modal.open(...e);return this.applyPortalOffsetAndMaxHeight(i),this.disablePortalScrolling(i),i}get activeInstances(){return this.modal.activeInstances}dismissAll(...e){return this.modal.dismissAll(...e)}hasOpenModals(...e){return this.modal.hasOpenModals(...e)}applyPortalOffsetAndMaxHeight(e){let i=this.getModalWindowElement(e);if(!i){console.warn("Trying to apply portal offset to , but element is not present!");return}this.portal.window&&(i.style.top=`${this.getModalIframeOffset()}px`,i.style.maxHeight=`${this.getModalHeight()}px`)}disablePortalScrolling(e){if(this.portal.window&&this.portal.document){let i=this.portal.window.innerWidth-this.portal.document.clientWidth;this.portal.document.style.paddingRight=`${i}px`,this.portal.document.style.overflow="hidden"}e.hidden.subscribe(()=>{this.portal.document&&(this.portal.document.style.paddingRight="0px",this.portal.document.style.overflow="auto")})}getModalWindowElement(e){return e._windowCmptRef?.instance?._elRef?.nativeElement??null}getModalIframeOffset(){return Math.max(this.getViewportTop()-this.portal.getIframeTop(),0)}getModalTop(){return Math.max(this.getViewportTop(),this.portal.getIframeTop())}getModalBottom(){return Math.min(this.getViewportBottom(),this.portal.getIFrameBottom())}getModalHeight(){return this.getModalBottom()-this.getModalTop()}getViewportTop(){return this.portal.window?.scrollY??0}getViewportBottom(){return this.getViewportTop()+this.getViewportHeight()}getViewportHeight(){return this.portal.window?.innerHeight??0}static{this.\u0275fac=function(i){return new(i||t)(x(Ct),x(Ut))}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function _e(t,r,e){return r?r.Grade:xi(t,e)||t?.GradeValue}function xi(t,r){return r?.Grades.find(e=>e.Id===t?.GradeId)?.Designation}var yi="1-3",qt="\u2013",Kt=(()=>{class t{constructor(e){this.locale=e}transform(e,i,n){let s=Number(e??null);return isNaN(s)?qt:Ti(Number(e??null),n??this.locale,i)}static{this.\u0275fac=function(i){return new(i||t)(P(Ye,16))}}static{this.\u0275pipe=Q({name:"decimalOrDash",type:t,pure:!0})}}return t})();function Ti(t,r,e){return t===0?qt:Qe(t,r,`1.${_i(e)}`)}function _i(t){return t?String(t).includes("-")?String(t):`${t}-${t}`:yi}var zt=(()=>{class t{constructor(){}getGradeForStudent(){return _e(this.grading,this.finalGrade,this.gradingScale)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=$({type:t,selectors:[["bkd-dossier-grades-final-grade"]],inputs:{finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},decls:14,vars:11,consts:[[1,"final-entry"],["data-testid","final-grade"],["data-testid","average-test-results"]],template:function(i,n){i&1&&(l(0,"div",0)(1,"div"),p(2),c(3,"translate"),d(),l(4,"div",1)(5,"span"),p(6),d()(),l(7,"div"),p(8),c(9,"translate"),d(),l(10,"div",2)(11,"span"),p(12),c(13,"decimalOrDash"),d()()()),i&2&&(a(2),D(f(3,4,"dossier.grade")),a(4),D(n.getGradeForStudent()||"\u2013"),a(2),D(f(9,6,"dossier.average")),a(4),D(L(13,8,n.average,"1-3")))},dependencies:[M,Kt],styles:[".final-entry[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:repeat(2,1fr)}span[_ngcontent-%COMP%]{margin-left:2em}"]})}}return t})();var Xt=(()=>{class t{constructor(e){this.translate=e}transform(e,i,n,s="tests.points"){return e.IsPointGrading&&(e.IsPublished||n)?`${z(i,e)?.Points||"\u2013"} / ${e.MaxPointsAdjusted||e.MaxPoints} ${this.translate.instant(s)}`:""}static{this.\u0275fac=function(i){return new(i||t)(P(be,16))}}static{this.\u0275pipe=Q({name:"bkdTestPoints",type:t,pure:!0})}}return t})();var Jt=(()=>{class t{constructor(e){this.translate=e}transform(e){return`${this.translate.instant("tests.factor")} ${e.Weight} (${e.WeightPercent}%)`}static{this.\u0275fac=function(i){return new(i||t)(P(be,16))}}static{this.\u0275pipe=Q({name:"bkdTestWeight",type:t,pure:!0})}}return t})();var wi=t=>({maxPoints:t});function Ei(t,r){if(t&1&&(l(0,"div",13),p(1),c(2,"translate"),d()),t&2){let e=I(2);a(),b(" ",L(2,1,"global.validation-errors.invalidPoints",fe(4,wi,e.maxPoints))," ")}}function Pi(t,r){if(t&1){let e=ie();l(0,"div",3)(1,"label",11),p(2),c(3,"translate"),d(),l(4,"div",6)(5,"input",12,0),k("input",function(){J(e);let n=le(6),s=I();return Y(s.onPointsChange(n.value))}),d()(),T(7,Ei,3,6,"div",13),d()}if(t&2){let e=I();a(2),D(f(3,8,"dossier.dialog.points")),a(2),$e("is-invalid",e.pointsInput.errors),a(),$e("is-invalid",e.pointsInput.errors),ge("max",e.maxPoints),G("formControl",e.pointsInput),a(2),_(e.pointsInput.errors?7:-1)}}var Yt=500,Qt=(()=>{class t{constructor(e,i){this.activeModal=e,this.courseService=i,this.maxPoints=0,this.gradeSubject$=new ue,this.pointsSubject$=new ue,this.closeButtonDisabled$=new B(!1),this.gradingScaleDisabled$=new B(!0),this.grade$=this.gradeSubject$.pipe(we(Yt)),this.points$=this.pointsSubject$.pipe(we(Yt),We(this.isValid.bind(this)),m(Number)),this.destroy$=new ue}ngOnInit(){this.maxPoints=Ae(this.test),this.pointsInput=new st({value:this.points,disabled:!1},[Re.min(0),Re.pattern("[0-9]+([\\.][0-9]+)?"),this.maxPointValidator()]),this.gradingScaleDisabled$.next(this.test.IsPointGrading&&this.points>0),this.points$.pipe(Pe(this.destroy$)).subscribe(e=>this.updateTestResult({studentId:this.studentId,testId:this.test.Id,points:e})),this.grade$.pipe(Pe(this.destroy$)).subscribe(e=>this.updateTestResult({studentId:this.studentId,testId:this.test.Id,gradeId:e}))}onGradeChange(e){this.gradeSubject$.next(e)}onPointsChange(e){this.pointsSubject$.next(e),this.gradingScaleDisabled$.next(e.length>0)}updateTestResult(e){this.closeButtonDisabled$.next(!0),this.courseService.updateTestResult(this.test.CourseId,e).subscribe(({testResult:i})=>{this.gradeId=i?.GradeId??null,this.updatedTestResult=i,this.closeButtonDisabled$.next(!1)})}isValid(e){return e===""||isNaN(Number(e))?!1:!(Number(e)<0||Number(e)>this.maxPoints)}maxPointValidator(){return e=>Number(e.value)>Ae(this.test)?{customMax:!0}:null}static{this.\u0275fac=function(i){return new(i||t)(P(vt),P(xe))}}static{this.\u0275cmp=$({type:t,selectors:[["bkd-dossier-grades-edit"]],inputs:{test:"test",gradeId:"gradeId",gradeOptions:"gradeOptions",points:"points",studentId:"studentId"},decls:19,vars:20,consts:[["pointInput",""],[1,"modal-body"],[1,"mb-4"],[1,"form-group","row"],[1,"form-group","row","mt-2"],["for","grade",1,"col-6","col-form-label"],[1,"col-6"],["id","grade",3,"valueChange","options","value","allowEmpty","disabled"],[1,"text-muted","mt-4"],[1,"modal-footer"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["for","points",1,"col-6","col-form-label"],["id","points","type","number","step","0.01","min","0",1,"form-control",3,"input","max","formControl"],["data-testid","validation-error-message",1,"invalid-feedback","col-6","offset-6"]],template:function(i,n){i&1&&(l(0,"div",1)(1,"p",2),p(2),d(),T(3,Pi,8,10,"div",3),l(4,"div",4)(5,"label",5),p(6),c(7,"translate"),d(),l(8,"div",6)(9,"bkd-select",7),c(10,"async"),k("valueChange",function(y){return y&&n.onGradeChange(y)}),d()()(),l(11,"p",8),p(12),c(13,"translate"),d()(),l(14,"div",9)(15,"button",10),c(16,"async"),k("click",function(){return n.activeModal.close(n.updatedTestResult)}),p(17),c(18,"translate"),d()()),i&2&&(a(2),D(n.test.Designation),a(),_(n.test.IsPointGrading?3:-1),a(3),D(f(7,10,"dossier.dialog.grade")),a(3),G("options",n.gradeOptions)("value",n.gradeId)("allowEmpty",!1)("disabled",f(10,12,n.gradingScaleDisabled$)),a(3),b(" ",f(13,14,n.test.IsPointGrading?"dossier.dialog.hint.points":"dossier.dialog.hint.grade")," "),a(3),G("disabled",f(16,16,n.closeButtonDisabled$)),a(2),b(" ",f(18,18,"dossier.dialog.close")," "))},dependencies:[Se,rt,ot,Ie,mt,ut,gt,dt,Et,V,M],encapsulation:2})}}return t})();function $i(t,r){if(t&1){let e=ie();l(0,"a",10),k("click",function(){J(e);let n=I(2),s=U(0);return Y(n.editGrading(s))}),l(1,"i",11),p(2,"edit"),d(),l(3,"span",5),p(4),d()()}if(t&2){I(2);let e=U(2);a(4),D(e)}}function Di(t,r){if(t&1&&(l(0,"span",5),p(1),d()),t&2){I(2);let e=U(2);a(),D(e)}}function Ri(t,r){if(t&1&&(l(0,"div",9),p(1),c(2,"translate"),d()),t&2){I(2);let e=U(0);a(),b(" ",f(2,1,e.IsPublished?"tests.published":"tests.not-published")," ")}}function Mi(t,r){if(t&1&&(l(0,"div",0)(1,"div",1),p(2),d(),l(3,"div",2),p(4),c(5,"date"),d(),l(6,"div",3),T(7,$i,5,1,"a",4)(8,Di,2,1,"span",5),d(),l(9,"div",6),p(10),c(11,"bkdTestWeight"),d(),l(12,"div",7)(13,"span"),p(14),c(15,"bkdTestPoints"),d()(),l(16,"div",8),p(17),d(),T(18,Ri,3,3,"div",9),d()),t&2){let e=I(),i=U(0);a(2),b(" ",i.Designation," "),a(2),b(" ",L(5,7,i.Date,"dd.MM.yyyy")," "),a(3),_(e.isEditable&&i.IsOwner?7:8),a(3),b(" ",f(11,10,i)," "),a(4),D(Je(15,12,i,e.studentId,e.isEditable,"dossier.points")),a(3),b(" ",i.Owner," "),a(),_(e.isEditable?18:-1)}}var Zt=(()=>{class t{constructor(e,i){this.gradeService=e,this.modalService=i,this.test$=new oe(1),this.grading$=this.test$.pipe(m(this.getGrading.bind(this)))}ngOnChanges(e){e.test&&this.test$.next(this.test)}editGrading(e){let i=this.modalService.open(Qt,{backdrop:"static"});i.componentInstance.test=e,i.componentInstance.gradeId=this.getGradeId(e),i.componentInstance.gradeOptions=t.mapToOptions(this.gradingScale),i.componentInstance.studentId=this.studentId,i.componentInstance.points=this.getPoints(e),i.result.then(n=>{n&&this.updateStudentGrade(n,e)},()=>{})}updateStudentGrade(e,i){let n=Be(e,i);this.gradeService.updateStudentCourses(n)}getGrading(e){return this.gradingScale?.Grades.find(i=>i.Id===this.getGradeId(e))?.Designation||"\u2013"}getGradeId(e){return z(this.studentId,e)?.GradeId||null}getPoints(e){return z(this.studentId,e)?.Points||null}static mapToOptions(e){return e?.Grades.map(i=>({Key:i.Id,Value:i.Designation}))||null}static{this.\u0275fac=function(i){return new(i||t)(P(Te),P(Lt))}}static{this.\u0275cmp=$({type:t,selectors:[["bkd-dossier-single-test"]],inputs:{test:"test",studentId:"studentId",gradingScale:"gradingScale",isEditable:"isEditable"},features:[H],decls:5,vars:7,consts:[[1,"test-entry"],["data-testid","test-designation",1,"designation"],["data-testid","test-date",1,"date"],[1,"grade"],["aria-label","edit grade",1,"btn","btn-link"],["data-testid","test-grade"],["data-testid","test-factor",1,"factor"],["data-testid","test-points",1,"points"],["data-testid","test-teacher",1,"teacher"],["data-testid","test-status",1,"state"],["aria-label","edit grade",1,"btn","btn-link",3,"click"],["data-testid","test-grade-edit-icon",1,"material-icons"]],template:function(i,n){if(i&1&&(pe(0),c(1,"async"),pe(2),c(3,"async"),T(4,Mi,19,17,"div",0)),i&2){let s=ce(f(1,1,n.test$));a(2),ce(f(3,4,n.grading$)),a(2),_(s?4:-1)}},dependencies:[V,et,M,Xt,Jt],styles:['.test-entry[_ngcontent-%COMP%]{border-top:1px solid #dee2e6;padding:1rem;display:grid;grid-template-areas:"designation designation grade factor" "date date points ." "teacher teacher . ." "state state . .";grid-template-columns:repeat(4,1fr)}span[_ngcontent-%COMP%]{margin-left:2em}.designation[_ngcontent-%COMP%]{grid-area:designation}.date[_ngcontent-%COMP%]{grid-area:date}.grade[_ngcontent-%COMP%]{grid-area:grade}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;color:#000;padding:0;text-decoration:none}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.grade[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:-1em;color:#00000080}.points[_ngcontent-%COMP%]{grid-area:points;color:#00000080}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.state[_ngcontent-%COMP%]{grid-area:state}@media (max-width: 575.98px){.test-entry[_ngcontent-%COMP%]{grid-template-areas:"designation designation" "date grade" "factor points" "teacher teacher" "state state";grid-template-columns:repeat(2,1fr)}}']})}}return t})();var Oi=(t,r)=>r.Id,Fi=()=>[];function ji(t,r){if(t&1&&te(0,"bkd-dossier-single-test",2),t&2){let e=r.$implicit,i=I(2);G("test",e)("studentId",i.studentId)("gradingScale",i.getGradingScaleOfTest(e))("isEditable",i.isEditable)}}function Ai(t,r){if(t&1&&(l(0,"div"),te(1,"bkd-dossier-grades-final-grade",1),Z(2,ji,1,4,"bkd-dossier-single-test",2,Oi),d()),t&2){let e=I(),i=U(0);a(),G("finalGrade",e.decoratedCourse.finalGrade)("grading",e.decoratedCourse.grading)("gradingScale",e.decoratedCourse.gradingScale)("average",e.decoratedCourse.average),a(),ee(i)}}function Bi(t,r){t&1&&(l(0,"p",0),p(1),c(2,"translate"),d()),t&2&&(a(),b(" ",f(2,1,"dossier.no-tests")," "))}var ei=(()=>{class t{ngOnChanges(e){e.decoratedCourse&&this.sortedTests$.next(this.sortedTests())}constructor(){this.sortedTests$=new B([])}sortedTests(){return this.decoratedCourse.course.Tests?kt(this.decoratedCourse.course.Tests):[]}getGradingScaleOfTest(e){return ye(e,this.gradingScales)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=$({type:t,selectors:[["bkd-dossier-course-tests"]],inputs:{studentId:"studentId",decoratedCourse:"decoratedCourse",gradingScales:"gradingScales",isEditable:"isEditable"},features:[H],decls:4,vars:5,consts:[["data-testid","message-no-tests",1,"p-3"],[3,"finalGrade","grading","gradingScale","average"],[3,"test","studentId","gradingScale","isEditable"]],template:function(i,n){if(i&1&&(pe(0),c(1,"async"),T(2,Ai,4,4,"div")(3,Bi,3,3,"p",0)),i&2){let s,y=ce((s=f(1,1,n.sortedTests$))!==null&&s!==void 0?s:Xe(4,Fi));a(2),_(y.length>0?2:3)}},dependencies:[zt,Zt,V,M],encapsulation:2})}}return t})();function ki(t,r){if(t&1&&(l(0,"span",0),p(1),d()),t&2){let e=I();a(),b(" (",e.grade,")")}}function Vi(t,r){if(t&1&&(l(0,"span",1),p(1),c(2,"number"),d()),t&2){let e=I();a(),b(" (",L(2,1,e.average,"1.1-3"),")")}}var ti=(()=>{class t{constructor(){}get grade(){return this.getGradeForStudent()}getGradeForStudent(){return _e(this.grading,this.finalGrade,this.gradingScale)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=$({type:t,selectors:[["bkd-dossier-grades-course-header"]],inputs:{designation:"designation",finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},decls:3,vars:3,consts:[["data-testId","grade",1,"grade"],["data-testId","average",1,"average"]],template:function(i,n){i&1&&(p(0),T(1,ki,2,1,"span",0)(2,Vi,3,4,"span",1)),i&2&&(b("",n.designation,` -`),a(),_(n.grade?1:-1),a(),_(!n.grade&&n.average?2:-1))},dependencies:[tt],styles:[".average[_ngcontent-%COMP%]{color:#00000080}"]})}}return t})();var Ni=(t,r)=>r.course.Id;function Hi(t,r){if(t&1&&te(0,"bkd-dossier-course-tests",9),t&2){let e=I().$implicit,i=I(2);G("decoratedCourse",e)("studentId",i.studentId)("gradingScales",i.gradingScales)("isEditable",i.isEditable)}}function Ui(t,r){if(t&1){let e=ie();l(0,"div")(1,"div",2)(2,"div",3,0)(4,"div",4)(5,"bkd-student-dossier-entry-header",5),k("click",function(){J(e);let n=le(3);return Y(n.toggle())}),te(6,"bkd-dossier-grades-course-header",6),d()(),l(7,"div",7)(8,"div",8),T(9,Hi,1,4,"ng-template"),d()()()()()}if(t&2){let e=r.$implicit,i=le(3);a(5),G("opened",!i.collapsed),a(),G("designation",e.course.Designation)("finalGrade",e.finalGrade)("grading",e.grading)("gradingScale",e.gradingScale)("average",e.average)}}function Li(t,r){if(t&1&&(Z(0,Ui,10,6,"div",null,Ni),c(2,"async")),t&2){let e=I();ee(f(2,0,e.decoratedCoursesSubject$))}}function Wi(t,r){t&1&&(l(0,"p",1),p(1),c(2,"translate"),d()),t&2&&(a(),b(" ",f(2,1,"dossier.no-courses")," "))}var qr=(()=>{class t{constructor(e){this.dossierGradesService=e,this.isEditable=!0,this.decoratedCoursesSubject$=new B([])}ngOnChanges(){this.decoratedCoursesSubject$.next(this.decorateCourses())}decorateCourses(){return this.courses.map(e=>{let i=this.dossierGradesService.getFinalGradeForStudent(e,this.studentId),n=this.dossierGradesService.getGradesForStudent(e,this.studentId,this.gradingScales);return{course:e,finalGrade:i,grading:this.dossierGradesService.getGradingForStudent(e,this.studentId),gradingScale:this.dossierGradesService.getGradingScaleOfCourse(e,this.gradingScales),average:i?.AverageTestResult||At(n)}})}static{this.\u0275fac=function(i){return new(i||t)(P(Te))}}static{this.\u0275cmp=$({type:t,selectors:[["bkd-dossier-grades-view"]],inputs:{courses:"courses",studentId:"studentId",gradingScales:"gradingScales",isEditable:"isEditable"},features:[H],decls:2,vars:1,consts:[["courses","ngbAccordionItem"],["data-testid","message-no-courses",1,"py-3"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],[3,"designation","finalGrade","grading","gradingScale","average"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"decoratedCourse","studentId","gradingScales","isEditable"]],template:function(i,n){i&1&&T(0,Li,3,2)(1,Wi,3,3,"p",1),i&2&&_(n.courses.length>0?0:1)},dependencies:[bt,St,It,Tt,ti,ht,ft,ei,V,M],encapsulation:2})}}return t})();export{je as a,xn as b,yn as c,Tn as d,_n as e,Gn as f,wn as g,En as h,kt as i,qt as j,Kt as k,Ti as l,Et as m,Pt as n,Oe as o,xe as p,Mn as q,Vt as r,Nt as s,Te as t,Ut as u,Lt as v,qr as w}; diff --git a/public/apps/webapp-schulverwaltung/chunk-UVJXXYOR.js b/public/apps/webapp-schulverwaltung/chunk-UVJXXYOR.js deleted file mode 100644 index 4225d07d..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-UVJXXYOR.js +++ /dev/null @@ -1 +0,0 @@ -import{Gc as t,Hc as n,Mc as o,Oc as r}from"./chunk-34ZOBT6Z.js";var i=o({Key:r([n,t]),Value:t});export{i as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-YJSXN7FS.js b/public/apps/webapp-schulverwaltung/chunk-VFFZAFLB.js similarity index 96% rename from public/apps/webapp-schulverwaltung/chunk-YJSXN7FS.js rename to public/apps/webapp-schulverwaltung/chunk-VFFZAFLB.js index 139a7ef4..cf8887fa 100644 --- a/public/apps/webapp-schulverwaltung/chunk-YJSXN7FS.js +++ b/public/apps/webapp-schulverwaltung/chunk-VFFZAFLB.js @@ -1 +1 @@ -import{a as pe,b as Pe}from"./chunk-EY7EEL4Q.js";import{a as bn}from"./chunk-K4773ZNS.js";import{a as _n,b as vn}from"./chunk-ZGDP3BAB.js";import{b as Pn}from"./chunk-QXEPYX24.js";import{a as Cn}from"./chunk-SP6SA4GZ.js";import{e as fn}from"./chunk-NOKI2UHM.js";import{q as gn,v as ye}from"./chunk-U5XSAHDS.js";import{a as ct}from"./chunk-4GQ5KKE3.js";import{b as zt,c as Xt,e as Qe}from"./chunk-HAKJPBT5.js";import{a as rn}from"./chunk-HAMVO7SX.js";import"./chunk-Y4QYVF5K.js";import"./chunk-UVJXXYOR.js";import{a as yn}from"./chunk-FFBZO25J.js";import{c as at,g as un}from"./chunk-UFRLS5GG.js";import{a as cn}from"./chunk-DZUR7EKU.js";import{a as an,b as pn}from"./chunk-FLVW3H6P.js";import"./chunk-2UDOWYE6.js";import{a as Sn}from"./chunk-ZA3SEXFP.js";import{A as en,B as tn,C as rt,H as nn,L as on,P as ve,Q as sn,S as st,U as hn,g as Jt,p as Yt,u as Zt,v as He,z as qe}from"./chunk-EDO6DY2V.js";import{j as z,l as se}from"./chunk-PQGQXFEQ.js";import{b as ce}from"./chunk-UPZQ4FTT.js";import{a as We,b as be,f as ln,g as dn,h as mn}from"./chunk-5NJNJ42P.js";import{h as At,i as Rt,j as Ge,k as Gt,l as Nt,m as Ut,o as Ht,p as qt,q as Le,r as re,w as Kt,y as Ue}from"./chunk-JHVNIEZK.js";import{a as _e}from"./chunk-LTVWFE76.js";import{$a as W,Ab as Y,B as ht,Bb as Q,Bd as ot,C as Ct,Cb as ue,D as tt,Db as ke,Eb as ne,F as O,Fa as D,Fb as $t,Gd as Ne,H as Be,Hd as $e,Ib as p,Jb as m,K as _t,Kb as U,L as vt,Ld as Wt,M as E,Ma as L,N as nt,Nd as K,O as je,Od as V,P as T,Pa as x,Qa as J,Qd as Qt,R as q,Ra as Pt,Sa as Ve,Sc as Bt,Ua as k,Wa as St,Wb as Dt,X as R,Xa as B,Ya as j,Za as c,_,_a as a,_b as Ot,a as le,b as de,bc as ie,bd as H,ca as bt,cc as ge,da as v,db as S,ea as b,ed as jt,f as $,fb as C,g as me,gb as f,h as we,ha as yt,hd as Vt,ic as it,id as fe,jd as he,kb as X,kc as Fe,l as Z,la as te,ld as Ft,mb as xt,md as Ce,n as u,nb as It,o as M,ob as wt,pb as Mt,qb as d,rb as I,s as Me,sb as y,tb as Tt,u as ft,ub as kt,vb as Lt,vc as Ae,w as ee,wa as s,wc as Et,x as Te,xa as h,yc as Re,zb as G,zd as oe}from"./chunk-34ZOBT6Z.js";function xn(n,r){return+z(n)<+z(r)}function In(n,r){return+z(n)==+z(r)}function wn(n,r,e){let t=+z(n,e?.in),[i,o]=[+z(r.start,e?.in),+z(r.end,e?.in)].sort((l,g)=>l-g);return t>=i&&t<=o}function Mn(n,r,e){let t=r.map(o=>({eventId:o,group:n})),i=e.map(o=>t.find(l=>l.eventId===o.eventId)||o);return[...new Set([...i,...t])].filter(o=>o.group!==null)}var Ke=(()=>{class n extends nn{static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=yt(n)))(i||n)}})()}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();function Tn(n,r){return[...n].sort(oi(r))}function oi(n){return(r,e)=>{switch(n.primarySortKey){case"name":{let t=r.name.localeCompare(e.name);return n.ascending?t*-1:t}case"group":{let t=(r.detail.Value||"").localeCompare(e.detail.Value||"");return n.ascending?t*-1:t}}}}function kn(n,r){return n.map(e=>ri(e,r))}function ri(n,r){return{id:n.IdPerson,name:r.find(e=>e.StudentRef.Id===n.IdPerson)?.StudentFullName||"",group:n.Value,detail:n}}function Ln(n,r){return n.filter(e=>e.VssId===r.subscriptionDetailGroupId)}function pt(n,r){return n.find(e=>e.VssId===r.subscriptionDetailGroupId)}var si=(n,r)=>r.id;function ci(n,r){if(n&1){let e=S();c(0,"div",1)(1,"input",5),C("change",function(){let i=v(e).$implicit,o=f();return b(o.onSelectionChange(i))}),a(),c(2,"label",6),d(3),a()()}if(n&2){let e=r.$implicit,t=r.$index,i=f();s(),X("id","group-",t,""),x("checked",e.id===i.selected.id)("value",e.id),s(),X("for","group-",t,""),s(),y(" ",e.label," ")}}var De=function(n){return n.Select="select",n.Assign="assign",n}(De||{}),$n=(()=>{class n{constructor(e,t){this.activeModal=e,this.translate=t,this.groupOptions=[]}ngOnInit(){this.title=`presence-control.groups.${this.dialogMode}.title`;let e=this.createEmtpyOption();this.groupOptions=this.createGroupOptions(this.subscriptionDetailsDefinitions),this.groupOptions.unshift(e),this.selected=this.groupOptions.find(t=>t.id===this.group)||e}createEmtpyOption(){let e=this.dialogMode===De.Select?"presence-control.groups.all":"presence-control.groups.none";return{id:null,label:this.translate.instant(e)}}createGroupOptions(e){return e.DropdownItems?e.DropdownItems.map(t=>({id:t.Key,label:`${this.translate.instant("presence-control.groups.group")} ${t.Value}`})):[]}getSelectedGroup(){return this.selected}onSelectionChange(e){this.selected=e}static{this.\u0275fac=function(t){return new(t||n)(h(re),h(K))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-group-dialog"]],inputs:{dialogMode:"dialogMode",subscriptionDetailsDefinitions:"subscriptionDetailsDefinitions",group:"group"},decls:14,vars:9,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],["type","radio","name","groups",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,i){t&1&&(c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),c(4,"form"),B(5,ci,4,7,"div",1,si),a()(),c(7,"div",2)(8,"button",3),C("click",function(){return i.activeModal.dismiss()}),d(9),p(10,"translate"),a(),c(11,"button",4),C("click",function(){return i.activeModal.close(i.getSelectedGroup())}),d(12),p(13,"translate"),a()()),t&2&&(s(2),y(" ",m(3,3,i.title)," "),s(3),j(i.groupOptions),s(4),y(" ",m(10,5,"presence-control.groups.cancel")," "),s(3),y(" ",m(13,7,"presence-control.groups.save")," "))},dependencies:[oe,Ce,fe,he,V],encapsulation:2})}}return n})();function Dn(n,r){return n===null&&r===null||n!==null&&r!==null&&n.TeacherInformation===r.TeacherInformation&&n.LessonDateTimeFrom.getTime()===r.LessonDateTimeFrom.getTime()&&n.LessonDateTimeTo.getTime()===r.LessonDateTimeTo.getTime()}function On(n){let r=new dt(n.TeacherInformation,n.LessonDateTimeFrom,n.LessonDateTimeTo);return r.addLesson(n),r}var dt=class{constructor(r,e,t){this.TeacherInformation=r,this.LessonDateTimeFrom=e,this.LessonDateTimeTo=t,this.lessons=[]}addLesson(r){this.lessons.some(e=>qe(e,r))||(this.lessons.push(r),this.updateId(),this.updateStudyClassNumbers(),this.updateEventDesignations())}getIds(){return[...new Set(this.lessons.map(r=>r.LessonRef.Id))]}getEventIds(){return[...new Set(this.lessons.map(r=>r.EventRef.Id))]}updateId(){this.id=[...new Set(this.lessons.map(r=>r.LessonRef.Id).sort())].join("-")}updateStudyClassNumbers(){this.studyClassNumbers=[...new Set(this.lessons.map(r=>r.StudyClassNumber).sort((r,e)=>r.localeCompare(e)))].join(", ")}updateEventDesignations(){this.eventDesignations=[...new Set(this.lessons.map(r=>r.EventDesignation).sort())].join(", ")}};function En(n){return ai(n).reduce((r,e)=>{let t=r.find(o=>Dn(o,e));if(t)return t.addLesson(e),r;let i=On(e);return[...r,i]},[]).sort(rt)}function Bn(n){if(n.length===0)return null;let r=new Date;if(n=[...n].sort(rt),Xt(r,n[0].LessonDateTimeFrom)){for(let e of n)if(xn(r,e.LessonDateTimeFrom)||wn(r,{start:e.LessonDateTimeFrom,end:e.LessonDateTimeTo}))return e;return n[n.length-1]}return n[0]}function ai(n){return n.reduce((r,e)=>r.some(t=>qe(t,e))?r:[...r,e],[])}function jn(n,r,e,t){return n.map(i=>{let o=r.find(l=>pi(l.presence,i));if(o){let l;return!o.newPresenceTypeId&&i.Comment?l=e.find(g=>g.IsComment)||null:l=e.find(g=>g.Id===o.newPresenceTypeId)||null,de(le({},i),{TypeRef:li(l),Date:null,Type:l?l.Designation:null,ConfirmationStateId:He(l,t)})}return i})}function pi(n,r){return n.LessonRef.Id===r.LessonRef.Id&&n.StudentRef.Id===r.StudentRef.Id}function li(n){return{Id:n?n.Id:null,HRef:null}}function Xe(n){return r=>r.reduce((e,t)=>e+(t.presenceCategory===n?1:0),0)}function Vn(){return n=>n.reduce((r,e)=>r+(e.precedingAbsences&&e.precedingAbsences.length>0?1:0),0)}var Fn=(()=>{class n extends We{constructor(e,t){super(e,t,at,"LessonTeachers")}loadOtherTeachersLessonAbsences(e,t,i){let o=`${this.baseUrl}/except/${e}/LessonAbsences?expand=LessonRef`;return t&&t.length>0&&(o=o.concat("&filter.StudentRef=;"+t.join(";"))),this.http.get(o,{params:i}).pipe(T(Wt(at)))}static{this.\u0275fac=function(t){return new(t||n)(_(Fe),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ye=(()=>{class n extends We{constructor(e,t){super(e,t,gn,"SubscriptionDetails")}getListForEvent(e){return this.getList({params:{IdEvent:String(e)}})}update(e,t){let i={IdPerson:t.IdPerson,EventId:t.EventId,Value:e};return this.http.put(`${this.baseUrl}/${t.Id}`,i).pipe(u(()=>{}))}static{this.\u0275fac=function(t){return new(t||n)(_(Fe),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Rn="presence-control-group",ae=(()=>{class n{constructor(e,t,i,o,l){this.userSettings=e,this.eventService=t,this.subscriptionDetailsService=i,this.loadingService=o,this.settings=l,this.selectGroup$=new $,this.selectedLesson$=new we,this.lessonPresences$=new we,this.reloadSubscriptionDetails$=new $,this.defaultGroup=null,this.savedGroup$=this.selectedLesson$.pipe(T(g=>this.userSettings.getPresenceControlGroupView().pipe(u(w=>this.findGroupByLesson(w,g))))),this.group$=ee(this.selectGroup$,this.savedGroup$).pipe(je(this.defaultGroup),E(1)),this.loading$=this.loadingService.loading(Rn),this.subscriptionDetailsDefinitions$=this.selectedLesson$.pipe(u(g=>g?.getEventIds()||[]),T(g=>Me(g.map(w=>this.eventService.getSubscriptionDetailsDefinitions(w)))),E(1)),this.groupsAvailability$=this.subscriptionDetailsDefinitions$.pipe(u(g=>g.every(w=>pt(w,this.settings))),E(1)),this.subscriptionDetails$=M([this.selectedLesson$,this.groupsAvailability$,this.reloadSubscriptionDetails$.pipe(u(()=>!1),je(!0))]).pipe(T(([g,w,F])=>g&&w?this.loadSubscriptionDetailsForLesson(g,F):Z([])),u(g=>Ln(g,this.settings)),E(1)),this.subscriptionDetailPersonIds$=M([this.group$,this.subscriptionDetails$]).pipe(u(([g,w])=>w.filter(F=>F.Value===g).map(F=>F.IdPerson)),je([]))}selectGroup(e){this.selectGroup$.next(e)}setSelectedLesson(e){this.selectedLesson$.next(e)}setLessonPresences(e){this.lessonPresences$.next(e)}getSubscriptionDetailsDefinitions(){return this.subscriptionDetailsDefinitions$.pipe(u(ot),u(e=>pt(e,this.settings)))}getSubscriptionDetailsForStudents(){return M([this.subscriptionDetails$,this.lessonPresences$]).pipe(u(se(kn)))}reloadSubscriptionDetails(){this.reloadSubscriptionDetails$.next(void 0)}loadSubscriptionDetailsForLesson(e,t=!0){return this.loadingService.load(Me($e(e.getEventIds()).map(i=>this.subscriptionDetailsService.getListForEvent(i))),t?void 0:Rn).pipe(u(ot))}findGroupByLesson(e,t){return e.find(o=>o.eventId===t?.getEventIds()[0])?.group||this.defaultGroup}static{this.\u0275fac=function(t){return new(t||n)(_(Pe),_(bn),_(Ye),_(ce),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();var Un=Object.values(pe),N=(()=>{class n{constructor(e,t,i,o,l,g,w,F,Se,xe){this.userSettings=e,this.lessonPresencesService=t,this.lessonTeacherService=i,this.presenceTypesService=o,this.groupService=l,this.dropDownItemsService=g,this.loadingService=w,this.storageService=F,this.settings=Se,this.location=xe,this.selectedDateSubject$=new me(new Date),this.selectedDate$=this.selectedDateSubject$.asObservable().pipe(u(P=>Jt(P)),Be(Ne)),this.viewModeSubject$=new $,this.viewMode$=ee(this.viewModeSubject$,this.userSettings.getPresenceControlViewMode().pipe(O(1))),this.lessons$=this.selectedDate$.pipe(T(P=>this.loadLessonsByDate(P)),E(1)),this.selectLessonId$=new $,this.selectLesson$=this.selectLessonId$.pipe(T(P=>this.getLessonById(P))),this.selectedLesson$=M([ln(this.selectLesson$.pipe(Be((P,Ie)=>Ne(P,Ie))),dn(this.settings.lessonPresencesRefreshTime)),this.lessons$]).pipe(u(([P,Ie])=>Ie.find(ni=>ni.id===P.id)?P:null),E(1)),this.studyClassCount$=this.selectedLesson$.pipe(u(P=>P?.lessons.length||0)),this.updateLessonPresences$=new $,this.reloadLessonPresences$=new $,this.lessonPresences$=ee(mn(this.selectedLesson$,this.reloadLessonPresences$).pipe(T(P=>P?this.loadLessonPresencesByLesson(P):Z([]))),this.updateLessonPresences$).pipe(E(1)),this.presenceTypes$=this.loadPresenceTypes().pipe(E(1)),this.reloadStudentIdsWithUnconfirmedAbsences$=new $,this.studentIdsWithUnconfirmedAbsences$=ee(this.selectedDate$,this.selectedLesson$.pipe(nt(1)),this.reloadStudentIdsWithUnconfirmedAbsences$).pipe(T(()=>this.loadStudentIdsWithUnconfirmedAbsences()),E(1)),this.loading$=this.loadingService.loading$,this.absenceConfirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(E(1)),this.studentIds$=this.lessonPresences$.pipe(u(P=>$e(P.map(Ie=>Ie.StudentRef.Id))),E(1)),this.otherTeachersAbsences$=this.studentIds$.pipe(Be(Ne),T(P=>P.length>0?this.lessonTeacherService.loadOtherTeachersLessonAbsences(this.getMyself(),P):Z([])),E(1)),this.groupsAvailability$=this.groupService.groupsAvailability$,this.presenceControlEntries$=M([this.selectedLesson$,this.lessonPresences$,this.presenceTypes$,this.absenceConfirmationStates$,this.otherTeachersAbsences$]).pipe(u(se(en))),this.presenceControlEntriesByGroup$=M([this.groupService.group$,this.presenceControlEntries$,this.groupService.subscriptionDetailPersonIds$]).pipe(u(se(Pn)),E(1)),this.presentCount$=this.presenceControlEntriesByGroup$.pipe(u(Xe("present"))),this.absentCount$=this.presenceControlEntriesByGroup$.pipe(u(Xe("absent"))),this.unapprovedCount$=this.presenceControlEntriesByGroup$.pipe(u(Xe("unapproved"))),this.absentPrecedingCount$=this.presenceControlEntriesByGroup$.pipe(u(Vn())),this.queryParamsString$=M([this.selectedDate$,this.selectedLesson$,this.viewMode$]).pipe(u(se(this.buildQueryParams.bind(this))),u(pn)),this.destroy$=new $,this.queryParamsString$.pipe(q(this.destroy$)).subscribe(P=>{this.location.replaceState("/presence-control",P),this.confirmBackLinkParams={returnparams:P}}),this.viewMode$.pipe(nt(1),T(P=>this.userSettings.savePresenceControlViewMode(P)),q(this.destroy$)).subscribe(),this.selectedLesson$.pipe(q(this.destroy$)).subscribe(P=>{this.groupService.setSelectedLesson(P)}),this.lessonPresences$.pipe(q(this.destroy$)).subscribe(P=>this.groupService.setLessonPresences(P))}ngOnDestroy(){this.destroy$.next()}setDate(e){this.selectedDateSubject$.next(e)}setLessonId(e){this.selectLessonId$.next(e)}setViewMode(e){this.viewModeSubject$.next(e)}updateLessonPresencesTypes(e){M([this.lessonPresences$.pipe(O(1)),this.presenceTypes$.pipe(O(1))]).pipe(u(([t,i])=>jn(t,e,i,this.settings))).subscribe(t=>this.updateLessonPresences$.next(t))}getNextPresenceType(e){return this.presenceTypes$.pipe(O(1),u(t=>e.getNextPresenceType(t)))}hasUnconfirmedAbsences(e){return this.studentIdsWithUnconfirmedAbsences$.pipe(u(t=>t.includes(e.lessonPresence.StudentRef.Id)))}updateAfterConfirm(){this.reloadLessonPresences$.next(),this.reloadStudentIdsWithUnconfirmedAbsences$.next()}loadLessonPresencesByLesson(e){return this.loadingService.load(this.lessonPresencesService.getListByLessons(e.lessons))}loadLessonsByDate(e){return this.loadingService.load(this.lessonPresencesService.getLessonsByDate(e)).pipe(u(En))}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.presenceTypes$)}loadStudentIdsWithUnconfirmedAbsences(){return ft(0,this.settings.unconfirmedAbsencesRefreshTime||-1).pipe(T(()=>this.lessonPresencesService.getListOfUnconfirmed()),u(e=>$e(e.map(t=>t.StudentRef.Id))))}buildQueryParams(e,t,i){let o={date:Yt(e,"yyyy-MM-dd"),viewMode:i};return t&&(o.lesson=String(t.id)),o}getLessonById(e){let t=String(e);return this.lessons$.pipe(u(i=>t&&i.find(o=>o.id===t)||Bn(i)),Te(Boolean))}getMyself(){let e=this.storageService.getPayload();return Number(e?.holder_id||e?.id_person)}static{this.\u0275fac=function(t){return new(t||n)(_(Pe),_(Qe),_(Fn),_(ve),_(ae),_(rn),_(ce),_(Qt),_(H),_(Dt))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();var fi=(n,r)=>r.id,hi=()=>[],Ci=()=>["/presence-control"];function _i(n,r){if(n&1&&(c(0,"span",12),d(1),a()),n&2){let e=f().$implicit,t=f(),i=Q(0);s(),I(t.getSortDirectionCharacter(i,e))}}function vi(n,r){if(n&1){let e=S();c(0,"div",11),C("click",function(){let i=v(e).$implicit,o=f();return b(o.toggleSort(i))}),d(1),p(2,"translate"),L(3,_i,2,1,"span",12),a()}if(n&2){let e=r.$implicit;f();let t=Q(0);x("className",e),s(),y(" ",m(2,3,"presence-control.groups.list.header."+e)," "),s(2),k(t?3:-1)}}function bi(n,r){n&1&&W(0,"bkd-spinner")}function yi(n,r){n&1&&W(0,"bkd-spinner",18)}function Pi(n,r){if(n&1){let e=S();c(0,"div",13)(1,"div",14)(2,"input",15,0),p(4,"async"),C("change",function(){let i=v(e).$implicit,o=f(2);return b(o.selectionService.toggle(i))}),a()(),c(5,"div",16),d(6),a(),c(7,"div",17)(8,"span"),d(9),a(),L(10,yi,1,0,"bkd-spinner",18),p(11,"async"),a()()}if(n&2){let e=r.$implicit,t=f(2);s(2),x("checked",m(4,4,t.selectionService.isSelected$(e))),s(4),y(" ",e.name," "),s(3),I(e.group?e.group:""),s(),k(m(11,6,t.groupService.loading$)?10:-1)}}function Si(n,r){if(n&1&&B(0,Pi,12,8,"div",13,fi),n&2){f();let e=Q(2);j(e)}}var Wn=(()=>{class n{constructor(e,t,i,o,l,g,w,F,Se){this.route=e,this.state=t,this.selectionService=i,this.groupService=o,this.userSettings=l,this.subscriptionDetailService=g,this.toastService=w,this.translate=F,this.modalService=Se,this.primarySortKeys=["name","group"],this.backlinkQueryParams$=this.route.queryParams.pipe(u(({returnparams:xe})=>xe),u(an)),this.eventIds$=this.state.selectedLesson$.pipe(u(xe=>xe?.getEventIds()||[])),this.sortCriteriaSubject$=new me({primarySortKey:"name",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=M([this.groupService.getSubscriptionDetailsForStudents(),this.sortCriteria$]).pipe(u(se(Tn))),this.selected=[]}ngOnInit(){this.selectionService.selection$.subscribe(e=>this.selected=e)}selectGroup(){this.openGroupModal(De.Select,this.selectCallback.bind(this))}assignGroup(){this.openGroupModal(De.Assign,this.assignCallback.bind(this))}openGroupModal(e,t){M([this.groupService.getSubscriptionDetailsDefinitions(),this.groupService.group$]).pipe(O(1)).subscribe(([i,o])=>{let l=this.modalService.open($n);l.componentInstance.dialogMode=e,l.componentInstance.subscriptionDetailsDefinitions=i,l.componentInstance.group=o,l.result.then(g=>{t(g)},()=>{})})}selectCallback(e){M([this.eventIds$,this.userSettings.getPresenceControlGroupView()]).pipe(O(1),T(([t,i])=>this.userSettings.savePresenceControlGroupView(Mn(e.id,t,i))),u(()=>e.id)).subscribe(t=>this.groupService.selectGroup(t))}assignCallback(e){Me(this.selected.map(t=>this.subscriptionDetailService.update(e.id,t.detail))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.groupService.reloadSubscriptionDetails(),this.selectionService.clear(),this.toastService.success(this.translate.instant("presence-control.groups.notifications.save-success"))}getSortDirectionCharacter(e,t){return e.primarySortKey!==t?"":e.ascending?"\u2193":"\u2191"}toggleSort(e){this.sortCriteriaSubject$.pipe(O(1)).subscribe(t=>{t.primarySortKey===e?this.sortCriteriaSubject$.next({primarySortKey:e,ascending:!t.ascending}):this.sortCriteriaSubject$.next({primarySortKey:e,ascending:e==="name"})})}static{this.\u0275fac=function(t){return new(t||n)(h(Ae),h(N),h(Ke),h(ae),h(Pe),h(Ye),h(_e),h(K),h(ye))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-group"]],features:[ue([Ke])],decls:33,vars:32,consts:[["checkbox",""],[3,"link","params"],[1,"group-header","mb-2","d-flex","justify-content-between"],[1,"d-flex","align-items-baseline"],[1,"ps-3"],["type","button",1,"show","btn","btn-link",3,"click"],["aria-label","edit",1,"btn","btn-primary","btn-icon","me-2",3,"click"],[1,"material-icons"],[1,"group-list"],[1,"group-list-header"],[3,"className"],[3,"click","className"],[1,"sort-direction"],[1,"group-list-entry"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"name","pe-2"],[1,"group","d-flex","justify-content-between"],[1,"inline","small"]],template:function(t,i){if(t&1){let o=S();G(0),p(1,"async"),G(2),p(3,"async"),G(4),p(5,"async"),G(6),p(7,"async"),c(8,"div"),W(9,"bkd-backlink",1),p(10,"async"),c(11,"h1"),d(12),p(13,"translate"),a(),c(14,"div",2)(15,"div",3)(16,"span",4),d(17),p(18,"translate"),a(),c(19,"button",5),C("click",function(){return v(o),b(i.selectGroup())}),d(20),p(21,"translate"),p(22,"translate"),a()(),c(23,"a",6),C("click",function(){return v(o),b(i.assignGroup())}),c(24,"i",7),d(25,"edit"),a()()(),c(26,"div",8)(27,"div",9),B(28,vi,4,5,"div",10,St),a(),L(30,bi,1,0,"bkd-spinner"),p(31,"async"),L(32,Si,2,0),a()()}if(t&2){let o;Y(m(1,8,i.sortCriteria$)),s(2),Y(m(3,11,i.sortedEntries$));let l=(o=m(5,14,i.selectionService.selection$))!==null&&o!==void 0?o:ke(30,hi),g=m(7,16,i.groupService.group$);s(7),x("link",ke(31,Ci))("params",m(10,18,i.backlinkQueryParams$)),s(3),I(m(13,20,"presence-control.groups.title")),s(5),I(m(18,22,"presence-control.groups.show")),s(3),y(" ",g?m(21,24,"presence-control.groups.group")+" "+g:m(22,26,"presence-control.groups.all")," "),s(3),J("disabled",l.length===0),s(5),j(i.primarySortKeys),s(2),k(m(31,28,i.state.loading$)?30:32)}},dependencies:[hn,be,ie,V],styles:['[_nghost-%COMP%]{display:block}.group-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#000;font-weight:300;text-decoration:underline;padding-left:.5rem}.group-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.group-list-header[_ngcontent-%COMP%]{cursor:pointer;padding:1rem;display:grid;grid-template-areas:"name group";grid-template-columns:3fr 2fr;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6}.group-list-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox name group";grid-template-columns:min-content 3fr 2fr}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.name[_ngcontent-%COMP%]{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.group[_ngcontent-%COMP%]{grid-area:group}@media (max-width: 750px){.group-list[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.group-list-header[_ngcontent-%COMP%]{grid-template-columns:3fr 1fr}.group-list-entry[_ngcontent-%COMP%]{grid-template-columns:min-content 3fr 1fr}}'],changeDetection:0})}}return n})();var xi=(n,r)=>r.entry.id;function Ii(n,r){if(n&1){let e=S();c(0,"div",1)(1,"input",5),C("change",function(){let i=v(e).$implicit;return b(i.selected=!i.selected)}),a(),c(2,"label",6)(3,"i"),d(4),a(),c(5,"div",7),d(6),p(7,"date"),p(8,"date"),a()()()}if(n&2){let e=r.$implicit,t=r.$index,i=f();s(),X("id","lesson-presence-",t,""),x("checked",e.selected),s(),J("fw-bold",i.isCurrentLesson(e)),X("for","lesson-presence-",t,""),s(),Ve("",e.entry.presenceCategory," material-icons pe-2"),s(),I(e.entry.presenceCategoryIcon),s(2),kt(" ",U(7,14,e.entry.lessonPresence.LessonDateTimeFrom,"HH:mm"),"\u2013",U(8,17,e.entry.lessonPresence.LessonDateTimeTo,"HH:mm")," ",e.entry.lessonPresence.EventDesignation," ")}}var Qn=(()=>{class n{constructor(e){this.activeModal=e,this.blockLessonOptions=[]}ngOnInit(){this.blockLessonOptions=this.buildLessonPresenceOptions()}getSelectedEntries(){return this.blockLessonOptions.filter(({selected:e})=>e).map(({entry:e})=>e)}isCurrentLesson(e){return In(e.entry.lessonPresence.LessonDateTimeFrom,this.entry.lessonPresence.LessonDateTimeFrom)}buildLessonPresenceOptions(){return this.blockPresenceControlEntries.map(e=>({entry:e,selected:this.entry.confirmationState===e.confirmationState}))}static{this.\u0275fac=function(t){return new(t||n)(h(re))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-block-lesson-component"]],inputs:{entry:"entry",blockPresenceControlEntries:"blockPresenceControlEntries"},decls:15,vars:11,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["type","checkbox",1,"form-check-input",3,"change","id","checked"],[1,"form-check-label","d-flex",3,"for"],[1,"d-block","text-truncate"]],template:function(t,i){if(t&1){let o=S();c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),c(4,"form"),B(5,Ii,9,20,"div",1,xi),a()(),G(7),c(8,"div",2)(9,"button",3),C("click",function(){return v(o),b(i.activeModal.close())}),d(10),p(11,"translate"),a(),c(12,"button",4),C("click",function(){v(o);let g=Q(7);return b(i.activeModal.close(g))}),d(13),p(14,"translate"),a()()}if(t&2){s(2),y(" ",m(3,4,"presence-control.block-lesson.text")," "),s(3),j(i.blockLessonOptions),s(2);let o=Y(i.getSelectedEntries());s(3),y(" ",m(11,7,"presence-control.block-lesson.cancel")," "),s(2),x("disabled",o.length===0),s(),y(" ",m(14,9,"presence-control.block-lesson.save")," ")}},dependencies:[oe,Ce,fe,he,ge,V],styles:[".checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.absent[_ngcontent-%COMP%]{color:#ea161f}.present[_ngcontent-%COMP%]{color:#3d8608}.unapproved[_ngcontent-%COMP%]{color:#ffa814}"]})}}return n})();var wi=30;function gt(n){return`blockLesson${n.lessonPresence.Id}`}var Ze=(()=>{class n{constructor(e,t,i,o){this.state=e,this.lessonPresencesService=t,this.loadingService=i,this.settings=o}getBlockLessonPresenceControlEntries(e){return M([this.state.lessons$.pipe(O(1)),this.loadChangeableLessonPresences(e),this.state.presenceTypes$.pipe(O(1)),this.state.absenceConfirmationStates$.pipe(O(1)),this.state.otherTeachersAbsences$.pipe(O(1))]).pipe(u(([t,i,o,l,g])=>this.filterBlockLessonPresences(e,i).map(w=>tn(t.find(F=>F.id===w.LessonRef.Id.toString()),w,o,l,g))))}filterBlockLessonPresences(e,t){return[...t].sort((i,o)=>i.LessonDateTimeFrom>o.LessonDateTimeFrom?1:-1).reduce((i,o)=>{let l=i[i.length-1];return this.isWithinBlockTime(o,l)?(i.push(o),i):i.find(g=>g.Id===e.lessonPresence.Id)?i:[o]},[])}isWithinBlockTime(e,t){return t?e.LessonDateTimeFrom.getTime()-t.LessonDateTimeTo.getTime()<=wi*60*1e3:!0}loadChangeableLessonPresences(e){return M([this.loadLessonPresences(e),this.state.presenceTypes$.pipe(O(1))]).pipe(u(([t,i])=>t.filter(o=>Zt(o,i.find(l=>l.Id===o.TypeRef.Id)||null,this.settings))))}loadLessonPresences(e){return this.loadingService.load(this.lessonPresencesService.getListByDateStudentClass(e.lessonPresence.LessonDateTimeFrom,e.lessonPresence.StudentRef.Id,e.lessonPresence.StudyClassRef.Id??void 0).pipe(u(t=>t.filter(i=>i.TeacherInformation===e.lessonPresence.TeacherInformation))),gt(e))}static{this.\u0275fac=function(t){return new(t||n)(_(N),_(Qe),_(ce),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();var Ti=(n,r)=>r.Id;function ki(n,r){if(n&1&&(c(0,"div"),d(1),p(2,"date"),p(3,"date"),p(4,"addSpace"),a()),n&2){let e=r.$implicit;s(),Lt(" ",U(2,5,e.LessonRef.From,"HH:mm"),"\u2013",U(3,8,e.LessonRef.To,"HH:mm")," ",e.LessonRef.EventDesignation,"",U(4,11,":",":")," ",e.Type," ")}}var Kn=(()=>{class n{constructor(e){this.activeModal=e}static{this.\u0275fac=function(t){return new(t||n)(h(re))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-preceding-absence"]],inputs:{precedingAbsences:"precedingAbsences"},decls:10,vars:6,consts:[[1,"modal-body"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(t,i){t&1&&(c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),B(4,ki,5,14,"div",null,Ti),a(),c(6,"div",1)(7,"button",2),C("click",function(){return i.activeModal.dismiss()}),d(8),p(9,"translate"),a()()),t&2&&(s(2),y(" ",m(3,2,"presence-control.preceding-absence.text")," "),s(2),j(i.precedingAbsences),s(4),y(" ",m(9,4,"presence-control.preceding-absence.cancel")," "))},dependencies:[ge,V,un],encapsulation:2})}}return n})();var Li=n=>["student",n,"absences"],$i=n=>["/presence-control/student",n,"absences"];function Di(n,r){if(n&1&&(W(0,"bkd-avatar",0),p(1,"async")),n&2){let e=f();x("studentId",m(1,3,e.studentId$))("link",ne(5,$i,e.entry.lessonPresence.StudentRef.Id.toString()))("linkParams",e.profileReturnParams)}}function Oi(n,r){if(n&1&&(c(0,"span"),d(1),a()),n&2){let e=f(2);s(),I(e.entry.presenceType==null?null:e.entry.presenceType.Designation)}}function Ei(n,r){if(n&1){let e=S();c(0,"button",12),C("click",function(){v(e);let i=f();return b(i.updatePresenceType(i.entry))}),L(1,Oi,2,1,"span"),a()}if(n&2){let e=f();s(),k(e.entry.presenceType!=null&&e.entry.presenceType.IsIncident?-1:1)}}function Bi(n,r){n&1&&W(0,"bkd-spinner",5)}function ji(n,r){if(n&1){let e=S();c(0,"button",13),C("click",function(){v(e);let i=f();return b(i.showPrecedingAbsences(i.entry))}),c(1,"i",14),d(2,"info"),a()()}}function Vi(n,r){if(n&1&&(c(0,"span",9),d(1),a()),n&2){let e=f();s(),y(" ",e.entry.lessonPresence.StudyClassNumber," ")}}function Fi(n,r){if(n&1){let e=S();c(0,"a",15),C("click",function(){v(e);let i=f();return b(i.updateIncident(i.entry))}),c(1,"i",4),d(2,"edit"),a(),c(3,"span"),d(4),p(5,"translate"),a()()}if(n&2){let e=f();s(4),I(m(5,1,(e.entry.presenceType==null?null:e.entry.presenceType.IsIncident)&&(e.entry.presenceType==null?null:e.entry.presenceType.Designation)||"presence-control.entry.incident"))}}var zn=(()=>{class n{get classNames(){return[this.entry.presenceCategory,this.viewMode].join(" ")}constructor(e,t,i,o){this.toastService=e,this.translate=t,this.modalService=i,this.loadingService=o,this.hasUnconfirmedAbsences=!1,this.showClassName=!1,this.togglePresenceType=new te,this.changeIncident=new te,this.entry$=new we(1),this.studentId$=this.entry$.pipe(u(({lessonPresence:l})=>l.StudentRef.Id)),this.loading$=this.entry$.pipe(T(l=>this.loadingService.loading(gt(l))))}ngOnChanges(e){e.entry&&this.entry$.next(e.entry.currentValue)}get isListViewMode(){return this.viewMode===pe.List}updatePresenceType(e){e.canChangePresenceType?this.togglePresenceType.emit(e):this.toastService.warning(this.translate.instant("presence-control.entry.update-warning"))}updateIncident(e){e.canChangeIncident&&this.changeIncident.emit(e)}showPrecedingAbsences(e){let t=this.modalService.open(Kn);t.componentInstance.precedingAbsences=e.precedingAbsences}static{this.\u0275fac=function(t){return new(t||n)(h(_e),h(K),h(ye),h(ce))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-entry"]],hostVars:2,hostBindings:function(t,i){t&2&&Pt(i.classNames)},inputs:{entry:"entry",hasUnconfirmedAbsences:"hasUnconfirmedAbsences",viewMode:"viewMode",showClassName:"showClassName",profileReturnParams:"profileReturnParams"},outputs:{togglePresenceType:"togglePresenceType",changeIncident:"changeIncident"},features:[bt],decls:18,vars:20,consts:[[1,"avatar","large",3,"studentId","link","linkParams"],["type","button",1,"presence-category","designation","btn","btn-link"],["type","button",1,"presence-category","status","btn","btn-link",3,"click","disabled"],[1,"position-relative"],[1,"material-icons"],[1,"inline","small"],["type","button",1,"previously-absent","d-flex","btn","btn-link"],[1,"student-info",3,"routerLink","queryParams"],[1,"student-name","text-truncate"],[1,"study-class","text-truncate"],[1,"unconfirmed-absences"],[1,"incident","btn","btn-link"],["type","button",1,"presence-category","designation","btn","btn-link",3,"click"],["type","button",1,"previously-absent","d-flex","btn","btn-link",3,"click"],[1,"material-icons-outlined"],[1,"incident","btn","btn-link",3,"click"]],template:function(t,i){if(t&1){let o=S();L(0,Di,2,7,"bkd-avatar",0)(1,Ei,2,1,"button",1),G(2),p(3,"async"),c(4,"button",2),C("click",function(){return v(o),b(i.updatePresenceType(i.entry))}),c(5,"div",3)(6,"i",4),d(7),a(),L(8,Bi,1,0,"bkd-spinner",5),a()(),L(9,ji,3,0,"button",6),c(10,"a",7)(11,"span",8),d(12),a(),L(13,Vi,2,1,"span",9),c(14,"span",10),d(15),p(16,"translate"),a()(),L(17,Fi,6,3,"a",11)}if(t&2){k(i.isListViewMode?-1:0),s(),k(i.entry.showDesignation?1:-1);let o=m(3,14,i.loading$);s(3),x("disabled",o),s(2),J("invisible",o),s(),I(i.entry.presenceCategoryIcon),s(),k(o?8:-1),s(),k(i.entry.precedingAbsences!=null&&i.entry.precedingAbsences.length?9:-1),s(),x("routerLink",ne(18,Li,i.entry.lessonPresence.StudentRef.Id))("queryParams",i.profileReturnParams),s(2),I(i.entry.lessonPresence.StudentFullName),s(),k(i.isListViewMode&&i.showClassName?13:-1),s(2),y(" ",i.hasUnconfirmedAbsences?m(16,16,"presence-control.entry.unconfirmed-absences"):""," "),s(2),k(i.entry.canChangeIncident?17:-1)}},dependencies:[fn,be,Re,ie,V],styles:['[_nghost-%COMP%]{padding:2rem 1rem;background-color:#fff;display:grid;grid-template-areas:"avatar status designation previously-absent" "avatar student-info student-info student-info" "avatar incident incident incident";grid-template-columns:min-content min-content 3fr min-content}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{align-self:center}.presence-category[_ngcontent-%COMP%]{text-decoration:none}.presence-category[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{top:.1875rem}.absent[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#ea161f}.present[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#3d8608}.unapproved[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#ffa814}.presence-category[_ngcontent-%COMP%] bkd-spinner[_ngcontent-%COMP%]{color:#000;position:absolute;top:4px;left:5px}.designation[_ngcontent-%COMP%], .student-info[_ngcontent-%COMP%], a.incident[_ngcontent-%COMP%], .incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.avatar[_ngcontent-%COMP%]{grid-area:avatar;margin-right:1.5rem}.status[_ngcontent-%COMP%]{grid-area:status}.status[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:2rem}.designation[_ngcontent-%COMP%]{grid-area:designation;text-align:left;line-height:2.375rem}.previously-absent[_ngcontent-%COMP%]{grid-area:previously-absent;text-decoration:none;color:#00000080;justify-self:end}.student-info[_ngcontent-%COMP%]{grid-area:student-info;display:flex;flex-direction:column;text-decoration:none}.student-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{text-decoration:underline}.student-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child:hover{text-decoration-color:#ea161f}.unconfirmed-absences[_ngcontent-%COMP%]{color:#ea161f;font-size:.875rem;line-height:1}.study-class[_ngcontent-%COMP%]{font-size:.875rem;line-height:1}.incident[_ngcontent-%COMP%]{color:#00000080;padding-right:1.5rem;grid-area:incident;display:flex;text-decoration:none}.incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.incident[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:.3em}.grid[_nghost-%COMP%] .status[_ngcontent-%COMP%], .grid[_nghost-%COMP%] .designation[_ngcontent-%COMP%]{align-self:start;margin-left:-1.5rem;margin-top:-.375rem}.grid[_nghost-%COMP%] .incident[_ngcontent-%COMP%]{align-self:end;margin-left:-1.5rem;margin-bottom:-.375rem}.grid[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{padding-right:0;align-self:start}.grid[_nghost-%COMP%] .unconfirmed-absences[_ngcontent-%COMP%]{height:.875rem}.list[_nghost-%COMP%]{grid-template-areas:"student-info status incidentordesignation previously-absent";grid-template-columns:3fr min-content 4fr 3em;padding:.5rem 1rem}.list[_nghost-%COMP%] .status[_ngcontent-%COMP%]{justify-self:start}.list[_nghost-%COMP%] .student-name[_ngcontent-%COMP%]{line-height:1;margin-bottom:.5rem}.list[_nghost-%COMP%] .incident[_ngcontent-%COMP%], .list[_nghost-%COMP%] .designation[_ngcontent-%COMP%]{grid-area:incidentordesignation}.list[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{padding-right:0}@media (max-width: 750px){.list[_nghost-%COMP%]{grid-template-areas:"student-info student-info student-info previously-absent" "status incidentordesignation incidentordesignation incidentordesignation";grid-template-columns:min-content 1fr 1fr min-content;row-gap:1rem}.list[_nghost-%COMP%] .status[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.list[_nghost-%COMP%] .student-name[_ngcontent-%COMP%]{margin-top:.5rem}.list[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{align-self:start}}']})}}return n})();var Ai=(n,r)=>r.viewMode,Ri=(n,r)=>r.id,Gi=(n,r)=>({"btn-link":n,"btn-danger":r}),Ni=n=>["groups",n],Ui=n=>({returnparams:n});function Hi(n,r){if(n&1){let e=S();c(0,"div",22),C("click",function(){v(e);let i=f();return b(i.lessonDropdown==null?null:i.lessonDropdown.toggle())}),d(1),p(2,"date"),c(3,"span",23),d(4),p(5,"date"),a()()}if(n&2){let e=f();s(),y(" ",U(2,2,e.selectedLesson.LessonDateTimeFrom,"HH:mm"),"\u2013"),s(3),I(U(5,5,e.selectedLesson.LessonDateTimeTo,"HH:mm"))}}function qi(n,r){if(n&1){let e=S();c(0,"div",28),C("click",function(){let i=v(e).$implicit,o=f(2);return b(o.selectLessonChange.emit(i))}),c(1,"div",29)(2,"div"),d(3),p(4,"date"),p(5,"date"),a(),c(6,"div",25),d(7),a(),c(8,"div",25),d(9),a()()()}if(n&2){let e=r.$implicit,t=f(2);J("active",e.id===t.selectedLesson.id),s(3),Tt(" ",U(4,6,e.LessonDateTimeFrom,"HH:mm"),"\u2013",U(5,9,e.LessonDateTimeTo,"HH:mm")," "),s(4),y(" ",e.eventDesignations," "),s(2),y(" ",e.studyClassNumbers," ")}}function Wi(n,r){if(n&1&&(c(0,"div",7)(1,"div",24)(2,"div",25),d(3),a(),c(4,"div",25),d(5),a()(),c(6,"div",26),B(7,qi,10,12,"div",27,Ri),a()()),n&2){let e=f();s(3),I(e.selectedLesson.eventDesignations),s(2),I(e.selectedLesson.studyClassNumbers),s(2),j(e.lessons)}}function Qi(n,r){if(n&1){let e=S();c(0,"bkd-caret",30),C("click",function(){v(e);let i=f();return b(i.lessonDropdown==null?null:i.lessonDropdown.toggle())}),a()}if(n&2){let e=f();x("expanded",(e.lessonDropdown==null?null:e.lessonDropdown.isOpen())||!1)}}function Ki(n,r){if(n&1&&(c(0,"a",19),p(1,"async"),p(2,"async"),p(3,"async"),c(4,"i",31),d(5,"groups"),a()()),n&2){let e=f();x("ngClass",$t(9,Gi,m(1,3,e.isGroupSelected$)===!1,m(2,5,e.isGroupSelected$)))("routerLink",ne(12,Ni,e.selectedLesson.id))("queryParams",ne(14,Ui,m(3,7,e.state.queryParamsString$)))}}function zi(n,r){if(n&1){let e=S();c(0,"button",32),C("click",function(){let i=v(e).$implicit,o=f();return b(o.viewModeChange.emit(i.viewMode))}),c(1,"i",31),d(2),a()()}if(n&2){let e=r.$implicit,t=f();J("btn-outline-secondary",e.viewMode===t.viewMode)("btn-link",e.viewMode!==t.viewMode)("active",e.viewMode===t.viewMode),x("disabled",!t.selectedLesson),s(2),I(e.icon)}}var Ji=Le.prototype._positionMenu;Le.prototype._positionMenu=function(...r){let e=Ji.apply(this,r);if(this._anchor.nativeElement.id==="lesson-dropdown"){let t=this._bodyContainer||this._menu.nativeElement,i=t.style.transform?.match(/translate\(([0-9-.]+)px, ([0-9-.]+)px\)/);i&&parseFloat(i[1])<0&&(t.style.transform=`translate(0px, ${i[2]}px)`)}return e};var Jn=(()=>{class n{constructor(e,t,i){this.state=e,this.groupService=t,this.presentCount=null,this.absentCount=null,this.unapprovedCount=null,this.absentPrecedingCount=null,this.search="",this.selectLessonChange=new te,this.selectDateChange=new te,this.searchChange=new te,this.viewModeChange=new te,this.viewModeOptions=[{viewMode:pe.List,icon:"list"},{viewMode:pe.Grid,icon:"view_module"}],this.isGroupSelected$=this.groupService.group$.pipe(u(Kt)),i.popperOptions=o=>de(le({},o),{modifiers:o.modifiers?.map(l=>(l.name==="offset"&&(l.options={offset:({placement:g,reference:w,popper:F})=>g==="bottom-start"?[(window.innerWidth-F.width)/2-w.x,0]:[]}),l))})}static{this.\u0275fac=function(t){return new(t||n)(h(N),h(ae),h(Ge))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-header"]],viewQuery:function(t,i){if(t&1&&xt(Le,5),t&2){let o;It(o=wt())&&(i.lessonDropdown=o.first)}},inputs:{selectedLesson:"selectedLesson",lessons:"lessons",presentCount:"presentCount",absentCount:"absentCount",unapprovedCount:"unapprovedCount",absentPrecedingCount:"absentPrecedingCount",viewMode:"viewMode",selectDate:"selectDate",search:"search"},outputs:{selectLessonChange:"selectLessonChange",selectDateChange:"selectDateChange",searchChange:"searchChange",viewModeChange:"viewModeChange"},features:[ue([Ge,{provide:At,useClass:Nt},{provide:Rt,useClass:yn}])],decls:41,vars:19,consts:[["d","ngbDatepicker"],[1,"navigation"],[1,"lesson-date"],["type","button",1,"btn","btn-link",3,"click"],[1,"material-icons"],["positionTarget",".lesson-date-input","ngbDatepicker","","placement","bottom-start",1,"lesson-date-input",3,"ngModelChange","ngModel"],[1,"lesson-time"],["ngbDropdown","","container","body","display","dynamic","placement","bottom",1,"lesson-description"],[1,"dropdown-caret",3,"expanded"],[1,"states"],[1,"state","present"],[1,"count"],[1,"state","absent"],[1,"state","unapproved"],[1,"state","previously-absent"],[1,"material-icons-outlined"],[1,"search-and-views"],[1,"search",3,"valueChange","value","disabled","placeholder","label"],[1,"group-and-views","d-flex","align-items-center"],["type","button",1,"group","btn","me-2","me-sm-4",3,"ngClass","routerLink","queryParams"],[1,"views"],["type","button",1,"view","btn","btn-primary","btn-icon",3,"disabled","btn-outline-secondary","btn-link","active"],[1,"lesson-time",3,"click"],[1,"lesson-time-to"],["id","lesson-dropdown","ngbDropdownToggle",""],[1,"text-truncate"],["ngbDropdownMenu","","aria-labelledby","lesson-dropdown"],["ngbDropdownItem","",3,"active"],["ngbDropdownItem","",3,"click"],[1,"lesson-entry"],[1,"dropdown-caret",3,"click","expanded"],[1,"material-icons","align-middle"],["type","button",1,"view","btn","btn-primary","btn-icon",3,"click","disabled"]],template:function(t,i){if(t&1){let o=S();c(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){v(o);let g=Mt(6);return b(g.toggle())}),c(3,"i",4),d(4,"calendar_today"),a()(),c(5,"input",5,0),C("ngModelChange",function(g){return v(o),b(i.selectDateChange.emit(g))}),a()(),L(7,Hi,6,8,"div",6)(8,Wi,9,2,"div",7)(9,Qi,1,1,"bkd-caret",8),a(),c(10,"div",9)(11,"div",10)(12,"i",4),d(13,"check_circle"),a(),c(14,"span",11),d(15),a()(),c(16,"div",12)(17,"i",4),d(18,"cancel"),a(),c(19,"span",11),d(20),a()(),c(21,"div",13)(22,"i",4),d(23,"help"),a(),c(24,"span",11),d(25),a()(),c(26,"div",14)(27,"i",15),d(28,"info"),a(),c(29,"span",11),d(30),a()()(),c(31,"div",16)(32,"bkd-resettable-input",17),p(33,"translate"),p(34,"translate"),C("valueChange",function(g){return v(o),b(i.searchChange.emit(g))}),a(),c(35,"div",18),L(36,Ki,6,16,"a",19),p(37,"async"),c(38,"div",20),B(39,zi,3,8,"button",21,Ai),a()()()}t&2&&(s(5),x("ngModel",i.selectDate),s(2),k(i.selectedLesson?7:-1),s(),k(i.selectedLesson?8:-1),s(),k(i.lessons.length>0?9:-1),s(6),I(i.presentCount!==null?i.presentCount:"?"),s(5),I(i.absentCount!==null?i.absentCount:"?"),s(5),I(i.unapprovedCount!==null?i.unapprovedCount:"?"),s(5),I(i.absentPrecedingCount!==null?i.absentPrecedingCount:"?"),s(2),x("value",i.search)("disabled",!i.selectedLesson)("placeholder",m(33,13,"presence-control.header.search-by-name"))("label",m(34,15,"presence-control.header.search")),s(4),k(m(37,17,i.selectedLesson&&i.state.groupsAvailability$)?36:-1),s(3),j(i.viewModeOptions))},dependencies:[Gt,oe,jt,Vt,Ft,Le,qt,Ht,Ut,cn,_n,Ot,Re,ie,ge,V],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;padding:.75rem 0}.navigation[_ngcontent-%COMP%]{display:grid;grid-template-areas:". date time dropdown-caret" ". description description dropdown-caret";grid-template-columns:1fr auto auto 1fr;align-items:center}.lesson-date[_ngcontent-%COMP%]{grid-area:date;justify-self:end;display:flex;align-items:center;justify-content:flex-end}.lesson-date[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:0 .5ch 0 0}.lesson-date[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#000;position:relative}.lesson-date-input[_ngcontent-%COMP%]{font-weight:600;background:transparent;border:none;width:11ch}.lesson-time[_ngcontent-%COMP%]{grid-area:time;cursor:pointer}.lesson-description[_ngcontent-%COMP%]{grid-area:description;overflow:hidden;text-align:center;cursor:pointer}.dropdown-toggle[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dropdown-toggle[_ngcontent-%COMP%]:after{display:none}.dropdown-caret[_ngcontent-%COMP%]{grid-area:dropdown-caret;line-height:100%;text-align:left;color:#000}.dropdown-menu[_ngcontent-%COMP%]{width:50ch;padding:0;box-shadow:2px 2px 3px -1px #0003}@media (max-width: 800px){.dropdown-menu[_ngcontent-%COMP%]{width:100vw}}.dropdown-item[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6}.states[_ngcontent-%COMP%]{margin:.75rem 0;display:flex;justify-content:center}.state[_ngcontent-%COMP%]{margin-right:7%;display:flex}.state[_ngcontent-%COMP%]:last-child{margin-right:0}@media (min-width: 1000px){.state[_ngcontent-%COMP%]{margin-right:4rem}}.state.present[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#3d8608}.state.absent[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#ea161f}.state.unapproved[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#ffa814}.state.previously-absent[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#00000080}.state[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{margin-left:.3em;margin-top:1px}.search-and-views[_ngcontent-%COMP%]{padding-top:.75rem;display:flex;justify-content:space-between;border-top:1px solid #dee2e6}.search[_ngcontent-%COMP%]{flex:auto;max-width:300px;margin-right:1rem}.views[_ngcontent-%COMP%]{display:flex}.view[_ngcontent-%COMP%]{color:#4e4e4ef2;background-color:#fff}.view.active[_ngcontent-%COMP%]{color:#fff;background-color:#4e4e4ef2;border:none}.group[_ngcontent-%COMP%], .view[_ngcontent-%COMP%]{text-decoration:none;padding-left:0;padding-right:0;aspect-ratio:1/1;width:calc(.75rem + 2 * var(--bs-border-width) + 1.625rem);border-radius:50%}.group.btn-link[_ngcontent-%COMP%]{color:#000}@media (max-width: 380px){[_nghost-%COMP%]{padding-left:.5rem;padding-right:.5rem}#search-addon[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem}}@media (max-width: 365px){.lesson-time[_ngcontent-%COMP%]{line-height:1}.lesson-time-to[_ngcontent-%COMP%]{display:block}.dropdown-caret[_ngcontent-%COMP%]{padding-left:0}}']})}}return n})();var Xi=(n,r)=>r.id;function Yi(n,r){if(n&1){let e=S();c(0,"div",1)(1,"input",5),C("change",function(){let i=v(e).$implicit,o=f();return b(o.onSelectionChange(i))}),a(),c(2,"label",6),d(3),a()()}if(n&2){let e=r.$implicit,t=r.$index,i=f();s(),X("id","incident-",t,""),x("checked",e.id===i.selected.id)("value",e.id),s(),X("for","incident-",t,""),s(),y(" ",e.label," ")}}var Xn=(()=>{class n{constructor(e,t){this.activeModal=e,this.translate=t,this.incidentOptions=[]}ngOnInit(){let e=this.createIncidentOption();this.incidentOptions=this.incidentTypes.map(t=>this.createIncidentOption(t)),this.incidentOptions.unshift(e),this.selected=this.incidentOptions.find(t=>t.id===this.incident?.Id)||e}createIncidentOption(e){return{id:e?e.Id:null,label:e?e.Designation:this.translate.instant("presence-control.incident.no-incident")}}onSelectionChange(e){this.selected=e}getSelectedIncident(){return this.incidentTypes.find(e=>e.Id===this.selected?.id)||null}static{this.\u0275fac=function(t){return new(t||n)(h(re),h(K))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-incident"]],inputs:{incident:"incident",incidentTypes:"incidentTypes"},decls:14,vars:9,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],["type","radio","name","incident",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,i){t&1&&(c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),c(4,"form"),B(5,Yi,4,7,"div",1,Xi),a()(),c(7,"div",2)(8,"button",3),C("click",function(){return i.activeModal.dismiss()}),d(9),p(10,"translate"),a(),c(11,"button",4),C("click",function(){return i.activeModal.close(i.getSelectedIncident())}),d(12),p(13,"translate"),a()()),t&2&&(s(2),y(" ",m(3,3,"presence-control.incident.text")," "),s(3),j(i.incidentOptions),s(4),y(" ",m(10,5,"presence-control.incident.cancel")," "),s(3),y(" ",m(13,7,"presence-control.incident.save")," "))},dependencies:[oe,Ce,fe,he,V],styles:["form[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{border-bottom:1px solid #dee2e6;padding-bottom:1rem;margin-bottom:1rem}"]})}}return n})();var Zi=20,eo=100,Ee=function(n){return n.AddUpdateAction="ADD",n.RemoveUpdateAction="REMOVE",n}(Ee||{}),et=(()=>{class n{constructor(e,t,i,o,l){this.toastService=e,this.translate=t,this.restService=i,this.presenceTypesService=o,this.settings=l,this.destroy$=new $,this.action$=new $,this.pendingUpdates$=this.action$.pipe(_t(this.reduceUpdates.bind(this),[]),vt()),this.revertUpdates$=new $,this.performUpdates$=this.pendingUpdates$.pipe(tt(eo),Te(Ue(st)),Ct(this.performUpdates.bind(this))),this.stateUpdates$=ee(this.pendingUpdates$,this.revertUpdates$).pipe(tt(Zi),Te(Ue(st))),this.performUpdates$.pipe(q(this.destroy$)).subscribe()}ngOnDestroy(){this.destroy$.next()}updatePresenceType(e,t=null){this.dispatchAddUpdate(e.lessonPresence,t)}performUpdates(e){let t=this.groupUpdates(e);return M(Object.keys(t).reduce((i,o)=>{let l=t[o];return Object.keys(l).forEach(g=>{let w=l[g];i.push(this.performUpdateForGroup(w))}),i},[])).pipe(u(()=>t))}performUpdateForGroup(e){return e.forEach(t=>this.dispatchRemoveUpdate(t.presence)),this.performLessonPresencesUpdatesByIds(e[0].presence.LessonRef.Id,e.map(t=>t.presence.StudentRef.Id),e[0].newPresenceTypeId).pipe(ht(t=>this.revertUpdatesAfterError(e,t)))}performLessonPresencesUpdatesByIds(e,t,i=null){return i?(i?this.presenceTypesService.getPresenceType(i):Z(null)).pipe(T(l=>this.restService.editLessonPresences([e],t,l?.Id,He(l,this.settings)||void 0,{context:new it().set(ct,{disableErrorHandling:!0})}))):this.restService.removeLessonPresences([e],t,{context:new it().set(ct,{disableErrorHandling:!0})})}revertUpdatesAfterError(e,t){return console.error("Bulk-update of lesson presences failed"),console.error(t),this.toastService.error(this.translate.instant("shared.lesson-presences-update.error")),this.revertUpdates$.next(e.map(i=>de(le({},i),{newPresenceTypeId:i.presence.TypeRef.Id}))),Z(void 0)}groupUpdates(e){return e.reduce((t,i)=>{let o=String(i.newPresenceTypeId&&i.newPresenceTypeId);return t[o]||(t[o]={}),Array.isArray(t[o][i.presence.LessonRef.Id])||(t[o][i.presence.LessonRef.Id]=[]),t[o][i.presence.LessonRef.Id].push(i),t},{})}reduceUpdates(e,t){switch(t.type){case Ee.AddUpdateAction:{let{presence:i,newPresenceTypeId:o}=t.payload,l=e.findIndex(Yn(i));return l===-1?[...e,{presence:i,newPresenceTypeId:o}]:[...e.slice(0,l),{presence:e[l].presence,newPresenceTypeId:o},...e.slice(l+1)]}case Ee.RemoveUpdateAction:return e.filter(Ue(Yn(t.payload)));default:return e}}dispatchAddUpdate(e,t){this.action$.next({type:Ee.AddUpdateAction,payload:{presence:e,newPresenceTypeId:t}})}dispatchRemoveUpdate(e){this.action$.next({type:Ee.RemoveUpdateAction,payload:e})}static{this.\u0275fac=function(t){return new(t||n)(_(_e),_(K),_(sn),_(ve),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Yn(n){return r=>r.presence.LessonRef.Id===n.LessonRef.Id&&r.presence.StudentRef.Id===n.StudentRef.Id}var to=(n,r)=>r.id,no=()=>[],io=n=>({returnparams:n});function oo(n,r){n&1&&W(0,"bkd-spinner")}function ro(n,r){n&1&&(c(0,"p",1),d(1),p(2,"translate"),a()),n&2&&(s(),I(m(2,1,"presence-control.no-lessons")))}function so(n,r){n&1&&(c(0,"p",1),d(1),p(2,"translate"),a()),n&2&&(s(),y(" ",m(2,1,"presence-control.no-lesson-presences")," "))}function co(n,r){if(n&1){let e=S();c(0,"bkd-presence-control-entry",4),p(1,"async"),p(2,"async"),p(3,"async"),p(4,"async"),C("togglePresenceType",function(i){v(e);let o=f(3);return b(o.togglePresenceType(i))})("changeIncident",function(i){v(e);let o=f(3);return b(o.changeIncident(i))}),a()}if(n&2){let e,t=r.$implicit,i=f(3);x("entry",t)("hasUnconfirmedAbsences",m(1,5,i.state.hasUnconfirmedAbsences(t)))("viewMode",m(2,7,i.state.viewMode$))("showClassName",((e=m(3,9,i.state.studyClassCount$))!==null&&e!==void 0?e:0)>1)("profileReturnParams",ne(13,io,m(4,11,i.state.queryParamsString$)))}}function ao(n,r){if(n&1&&(c(0,"div"),p(1,"async"),B(2,co,5,15,"bkd-presence-control-entry",3,to),a()),n&2){let e=f(2),t=Q(4);Ve("default-entries entries view-mode-",m(1,3,e.state.viewMode$),""),s(2),j(t)}}function po(n,r){if(n&1){let e=S();c(0,"bkd-presence-control-header",0),p(1,"async"),p(2,"async"),p(3,"async"),p(4,"async"),p(5,"async"),p(6,"async"),p(7,"async"),C("searchChange",function(i){v(e);let o=f();return b(o.search$.next(i))})("viewModeChange",function(i){v(e);let o=f();return b(o.state.setViewMode(i))})("selectDateChange",function(i){v(e);let o=f();return b(o.state.setDate(i))})("selectLessonChange",function(i){v(e);let o=f();return b(o.state.setLessonId(i.id))}),a(),L(8,ro,3,3,"p",1)(9,so,3,3,"p",1)(10,ao,4,5,"div",2)}if(n&2){let e=f(),t=Q(0),i=Q(2),o=Q(4);x("selectedLesson",t)("lessons",i)("presentCount",m(1,10,e.state.presentCount$))("absentCount",m(2,12,e.state.absentCount$))("unapprovedCount",m(3,14,e.state.unapprovedCount$))("absentPrecedingCount",m(4,16,e.state.absentPrecedingCount$))("viewMode",m(5,18,e.state.viewMode$))("selectDate",m(6,20,e.state.selectedDate$))("search",m(7,22,e.search$)),s(8),k(t?o.length===0?9:10:8)}}var lo=["studentFullName"],ei=(()=>{class n{constructor(e,t,i,o,l,g,w){this.state=e,this.blockLessons=t,this.lessonPresencesUpdateService=i,this.presenceTypesService=o,this.modalService=l,this.scrollPosition=g,this.route=w,this.search$=new me(""),this.entries$=M([this.state.presenceControlEntriesByGroup$,this.search$]).pipe(u(([F,Se])=>vn(F,lo,Se)),E(1)),this.destroy$=new $}ngOnInit(){this.route.queryParams.pipe(q(this.destroy$)).subscribe(this.restoreStateFromParams.bind(this))}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}doTogglePresenceType(e){e.forEach(t=>this.state.getNextPresenceType(t).subscribe(i=>this.lessonPresencesUpdateService.updatePresenceType(t,i?i.Id:null)))}togglePresenceType(e){this.blockLessons.getBlockLessonPresenceControlEntries(e).pipe(O(1)).subscribe(t=>{if(t.length===1){let i=t[0];this.doTogglePresenceType([i])}else{let i=this.modalService.open(Qn);i.componentInstance.entry=e,i.componentInstance.blockPresenceControlEntries=t,i.result.then(o=>{o&&this.doTogglePresenceType(o)},()=>{})}})}updateIncident(e,t){this.lessonPresencesUpdateService.updatePresenceType(e,t)}changeIncident(e){this.presenceTypesService.incidentTypes$.subscribe(t=>{let i=this.modalService.open(Xn);i.componentInstance.incident=t.find(o=>o.Id===e.presenceType?.Id)||null,i.componentInstance.incidentTypes=t,i.result.then(o=>{this.updateIncident(e,o?.Id||null)},()=>{})})}restoreStateFromParams(e){e.date&&this.state.setDate(Bt(e.date));let t=String(e.lesson);t&&this.state.setLessonId(t),e.viewMode&&Un.includes(e.viewMode)&&this.state.setViewMode(e.viewMode)}static{this.\u0275fac=function(t){return new(t||n)(h(N),h(Ze),h(et),h(ve),h(ye),h(Sn),h(Ae))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-list"]],decls:12,vars:16,consts:[[3,"searchChange","viewModeChange","selectDateChange","selectLessonChange","selectedLesson","lessons","presentCount","absentCount","unapprovedCount","absentPrecedingCount","viewMode","selectDate","search"],[1,"mt-3"],[3,"class"],[3,"entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams"],[3,"togglePresenceType","changeIncident","entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams"]],template:function(t,i){if(t&1&&(G(0),p(1,"async"),G(2),p(3,"async"),G(4),p(5,"async"),c(6,"h1"),d(7),p(8,"translate"),a(),L(9,oo,1,0,"bkd-spinner"),p(10,"async"),L(11,po,11,24)),t&2){let o;Y(m(1,2,i.state.selectedLesson$)),s(2),Y(m(3,5,i.state.lessons$)),s(2),Y((o=m(5,8,i.entries$))!==null&&o!==void 0?o:ke(15,no)),s(3),I(m(8,11,"presence-control.title")),s(2),k(m(10,13,i.state.loading$)?9:11)}},dependencies:[Jn,zn,be,ie,V],styles:["bkd-presence-control-entry[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6}.entries.view-mode-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr))}.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{border-right:1px solid #dee2e6}[_nghost-%COMP%]{display:block;overflow:hidden;width:100%}.entries.view-mode-grid[_ngcontent-%COMP%]{width:calc(100% + 1px)}"],changeDetection:0})}}return n})();var ti=(()=>{class n{constructor(e,t){this.state=e,this.lessonPresencesUpdateService=t,this.destroy$=new $}ngOnInit(){this.lessonPresencesUpdateService.stateUpdates$.pipe(q(this.destroy$)).subscribe(e=>this.state.updateLessonPresencesTypes(e))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(t){return new(t||n)(h(N),h(et))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control"]],features:[ue([N,Ze,ae,on,{provide:zt,useExisting:N}])],decls:1,vars:0,template:function(t,i){t&1&&W(0,"router-outlet")},dependencies:[Et],encapsulation:2,changeDetection:0})}}return n})();var sc=[{path:"",component:ti,children:[{path:"",component:ei,data:{restoreScrollPositionFrom:["/presence-control/student/:id/addresses","/presence-control/student/:id/absences","/presence-control/student/:id/grades"]}},Cn,{path:"groups/:id",component:Wn}]}];export{sc as PRESENCE_CONTROL_ROUTES}; +import{a as pe,b as Pe}from"./chunk-DJH5AAGM.js";import{a as bn}from"./chunk-LHXVMKYN.js";import{a as _n,b as vn}from"./chunk-QB4DIFWS.js";import{b as Pn}from"./chunk-6XR42WAQ.js";import{a as Cn}from"./chunk-3HCVMNJA.js";import{e as fn}from"./chunk-5WNFCBTP.js";import{q as gn,v as ye}from"./chunk-A3CECLYB.js";import{a as ct}from"./chunk-HCNFZOWE.js";import{b as zt,c as Xt,e as Qe}from"./chunk-746ASKQ4.js";import{a as rn}from"./chunk-DTTSX64G.js";import"./chunk-Y4QYVF5K.js";import"./chunk-AYQPMCNZ.js";import{a as yn}from"./chunk-BIDSHCYH.js";import{c as at,g as un}from"./chunk-Z4YBXGVO.js";import{a as cn}from"./chunk-3L4RH6QP.js";import{a as an,b as pn}from"./chunk-DTYYCJHM.js";import"./chunk-XAZECV42.js";import{a as Sn}from"./chunk-3P6YOVUR.js";import{A as en,B as tn,C as rt,H as nn,L as on,P as ve,Q as sn,S as st,U as hn,g as Jt,p as Yt,u as Zt,v as He,z as qe}from"./chunk-SRCW6BUG.js";import{j as z,l as se}from"./chunk-GOGVGWFJ.js";import{b as ce}from"./chunk-OSOXMODN.js";import{a as We,b as be,f as ln,g as dn,h as mn}from"./chunk-PSYDBHTH.js";import{h as At,i as Rt,j as Ge,k as Gt,l as Nt,m as Ut,o as Ht,p as qt,q as Le,r as re,w as Kt,y as Ue}from"./chunk-W4U7QKJF.js";import{a as _e}from"./chunk-AVBHFGIF.js";import{$a as a,$b as Ot,Ab as G,Ad as oe,B as ht,Bb as Y,C as Ct,Cb as Q,Cd as ot,D as tt,Db as ue,Eb as ke,F as O,Fb as ne,Ga as D,Gb as $t,H as Be,Hd as Ne,Id as $e,Jb as p,K as _t,Kb as m,L as vt,Lb as U,M as E,Md as Wt,N as nt,Na as L,O as je,Od as K,P as T,Pd as V,Qa as x,R as q,Ra as J,Rd as Qt,Sa as Pt,Ta as Ve,Tc as Bt,Va as k,X as R,Xa as St,Xb as Dt,Ya as B,Za as j,_,_a as c,a as le,ab as W,b as de,cc as ie,cd as H,da as bt,dc as ge,ea as v,eb as S,f as $,fa as b,fd as jt,g as me,gb as C,h as we,hb as f,ia as yt,id as Vt,jc as it,jd as fe,kd as he,l as Z,lb as X,lc as Fe,ma as te,md as Ft,n as u,nb as xt,nd as Ce,o as M,ob as It,pb as wt,qb as Mt,rb as d,s as Me,sb as I,tb as y,u as ft,ub as Tt,vb as kt,w as ee,wb as Lt,wc as Ae,x as Te,xa as s,xc as Et,ya as h,zc as Re}from"./chunk-2W7IS4PN.js";function xn(n,r){return+z(n)<+z(r)}function In(n,r){return+z(n)==+z(r)}function wn(n,r,e){let t=+z(n,e?.in),[i,o]=[+z(r.start,e?.in),+z(r.end,e?.in)].sort((l,g)=>l-g);return t>=i&&t<=o}function Mn(n,r,e){let t=r.map(o=>({eventId:o,group:n})),i=e.map(o=>t.find(l=>l.eventId===o.eventId)||o);return[...new Set([...i,...t])].filter(o=>o.group!==null)}var Ke=(()=>{class n extends nn{static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=yt(n)))(i||n)}})()}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();function Tn(n,r){return[...n].sort(oi(r))}function oi(n){return(r,e)=>{switch(n.primarySortKey){case"name":{let t=r.name.localeCompare(e.name);return n.ascending?t*-1:t}case"group":{let t=(r.detail.Value||"").localeCompare(e.detail.Value||"");return n.ascending?t*-1:t}}}}function kn(n,r){return n.map(e=>ri(e,r))}function ri(n,r){return{id:n.IdPerson,name:r.find(e=>e.StudentRef.Id===n.IdPerson)?.StudentFullName||"",group:n.Value,detail:n}}function Ln(n,r){return n.filter(e=>e.VssId===r.subscriptionDetailGroupId)}function pt(n,r){return n.find(e=>e.VssId===r.subscriptionDetailGroupId)}var si=(n,r)=>r.id;function ci(n,r){if(n&1){let e=S();c(0,"div",1)(1,"input",5),C("change",function(){let i=v(e).$implicit,o=f();return b(o.onSelectionChange(i))}),a(),c(2,"label",6),d(3),a()()}if(n&2){let e=r.$implicit,t=r.$index,i=f();s(),X("id","group-",t,""),x("checked",e.id===i.selected.id)("value",e.id),s(),X("for","group-",t,""),s(),y(" ",e.label," ")}}var De=function(n){return n.Select="select",n.Assign="assign",n}(De||{}),$n=(()=>{class n{constructor(e,t){this.activeModal=e,this.translate=t,this.groupOptions=[]}ngOnInit(){this.title=`presence-control.groups.${this.dialogMode}.title`;let e=this.createEmtpyOption();this.groupOptions=this.createGroupOptions(this.subscriptionDetailsDefinitions),this.groupOptions.unshift(e),this.selected=this.groupOptions.find(t=>t.id===this.group)||e}createEmtpyOption(){let e=this.dialogMode===De.Select?"presence-control.groups.all":"presence-control.groups.none";return{id:null,label:this.translate.instant(e)}}createGroupOptions(e){return e.DropdownItems?e.DropdownItems.map(t=>({id:t.Key,label:`${this.translate.instant("presence-control.groups.group")} ${t.Value}`})):[]}getSelectedGroup(){return this.selected}onSelectionChange(e){this.selected=e}static{this.\u0275fac=function(t){return new(t||n)(h(re),h(K))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-group-dialog"]],inputs:{dialogMode:"dialogMode",subscriptionDetailsDefinitions:"subscriptionDetailsDefinitions",group:"group"},decls:14,vars:9,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],["type","radio","name","groups",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,i){t&1&&(c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),c(4,"form"),B(5,ci,4,7,"div",1,si),a()(),c(7,"div",2)(8,"button",3),C("click",function(){return i.activeModal.dismiss()}),d(9),p(10,"translate"),a(),c(11,"button",4),C("click",function(){return i.activeModal.close(i.getSelectedGroup())}),d(12),p(13,"translate"),a()()),t&2&&(s(2),y(" ",m(3,3,i.title)," "),s(3),j(i.groupOptions),s(4),y(" ",m(10,5,"presence-control.groups.cancel")," "),s(3),y(" ",m(13,7,"presence-control.groups.save")," "))},dependencies:[oe,Ce,fe,he,V],encapsulation:2})}}return n})();function Dn(n,r){return n===null&&r===null||n!==null&&r!==null&&n.TeacherInformation===r.TeacherInformation&&n.LessonDateTimeFrom.getTime()===r.LessonDateTimeFrom.getTime()&&n.LessonDateTimeTo.getTime()===r.LessonDateTimeTo.getTime()}function On(n){let r=new dt(n.TeacherInformation,n.LessonDateTimeFrom,n.LessonDateTimeTo);return r.addLesson(n),r}var dt=class{constructor(r,e,t){this.TeacherInformation=r,this.LessonDateTimeFrom=e,this.LessonDateTimeTo=t,this.lessons=[]}addLesson(r){this.lessons.some(e=>qe(e,r))||(this.lessons.push(r),this.updateId(),this.updateStudyClassNumbers(),this.updateEventDesignations())}getIds(){return[...new Set(this.lessons.map(r=>r.LessonRef.Id))]}getEventIds(){return[...new Set(this.lessons.map(r=>r.EventRef.Id))]}updateId(){this.id=[...new Set(this.lessons.map(r=>r.LessonRef.Id).sort())].join("-")}updateStudyClassNumbers(){this.studyClassNumbers=[...new Set(this.lessons.map(r=>r.StudyClassNumber).sort((r,e)=>r.localeCompare(e)))].join(", ")}updateEventDesignations(){this.eventDesignations=[...new Set(this.lessons.map(r=>r.EventDesignation).sort())].join(", ")}};function En(n){return ai(n).reduce((r,e)=>{let t=r.find(o=>Dn(o,e));if(t)return t.addLesson(e),r;let i=On(e);return[...r,i]},[]).sort(rt)}function Bn(n){if(n.length===0)return null;let r=new Date;if(n=[...n].sort(rt),Xt(r,n[0].LessonDateTimeFrom)){for(let e of n)if(xn(r,e.LessonDateTimeFrom)||wn(r,{start:e.LessonDateTimeFrom,end:e.LessonDateTimeTo}))return e;return n[n.length-1]}return n[0]}function ai(n){return n.reduce((r,e)=>r.some(t=>qe(t,e))?r:[...r,e],[])}function jn(n,r,e,t){return n.map(i=>{let o=r.find(l=>pi(l.presence,i));if(o){let l;return!o.newPresenceTypeId&&i.Comment?l=e.find(g=>g.IsComment)||null:l=e.find(g=>g.Id===o.newPresenceTypeId)||null,de(le({},i),{TypeRef:li(l),Date:null,Type:l?l.Designation:null,ConfirmationStateId:He(l,t)})}return i})}function pi(n,r){return n.LessonRef.Id===r.LessonRef.Id&&n.StudentRef.Id===r.StudentRef.Id}function li(n){return{Id:n?n.Id:null,HRef:null}}function Xe(n){return r=>r.reduce((e,t)=>e+(t.presenceCategory===n?1:0),0)}function Vn(){return n=>n.reduce((r,e)=>r+(e.precedingAbsences&&e.precedingAbsences.length>0?1:0),0)}var Fn=(()=>{class n extends We{constructor(e,t){super(e,t,at,"LessonTeachers")}loadOtherTeachersLessonAbsences(e,t,i){let o=`${this.baseUrl}/except/${e}/LessonAbsences?expand=LessonRef`;return t&&t.length>0&&(o=o.concat("&filter.StudentRef=;"+t.join(";"))),this.http.get(o,{params:i}).pipe(T(Wt(at)))}static{this.\u0275fac=function(t){return new(t||n)(_(Fe),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ye=(()=>{class n extends We{constructor(e,t){super(e,t,gn,"SubscriptionDetails")}getListForEvent(e){return this.getList({params:{IdEvent:String(e)}})}update(e,t){let i={IdPerson:t.IdPerson,EventId:t.EventId,Value:e};return this.http.put(`${this.baseUrl}/${t.Id}`,i).pipe(u(()=>{}))}static{this.\u0275fac=function(t){return new(t||n)(_(Fe),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Rn="presence-control-group",ae=(()=>{class n{constructor(e,t,i,o,l){this.userSettings=e,this.eventService=t,this.subscriptionDetailsService=i,this.loadingService=o,this.settings=l,this.selectGroup$=new $,this.selectedLesson$=new we,this.lessonPresences$=new we,this.reloadSubscriptionDetails$=new $,this.defaultGroup=null,this.savedGroup$=this.selectedLesson$.pipe(T(g=>this.userSettings.getPresenceControlGroupView().pipe(u(w=>this.findGroupByLesson(w,g))))),this.group$=ee(this.selectGroup$,this.savedGroup$).pipe(je(this.defaultGroup),E(1)),this.loading$=this.loadingService.loading(Rn),this.subscriptionDetailsDefinitions$=this.selectedLesson$.pipe(u(g=>g?.getEventIds()||[]),T(g=>Me(g.map(w=>this.eventService.getSubscriptionDetailsDefinitions(w)))),E(1)),this.groupsAvailability$=this.subscriptionDetailsDefinitions$.pipe(u(g=>g.every(w=>pt(w,this.settings))),E(1)),this.subscriptionDetails$=M([this.selectedLesson$,this.groupsAvailability$,this.reloadSubscriptionDetails$.pipe(u(()=>!1),je(!0))]).pipe(T(([g,w,F])=>g&&w?this.loadSubscriptionDetailsForLesson(g,F):Z([])),u(g=>Ln(g,this.settings)),E(1)),this.subscriptionDetailPersonIds$=M([this.group$,this.subscriptionDetails$]).pipe(u(([g,w])=>w.filter(F=>F.Value===g).map(F=>F.IdPerson)),je([]))}selectGroup(e){this.selectGroup$.next(e)}setSelectedLesson(e){this.selectedLesson$.next(e)}setLessonPresences(e){this.lessonPresences$.next(e)}getSubscriptionDetailsDefinitions(){return this.subscriptionDetailsDefinitions$.pipe(u(ot),u(e=>pt(e,this.settings)))}getSubscriptionDetailsForStudents(){return M([this.subscriptionDetails$,this.lessonPresences$]).pipe(u(se(kn)))}reloadSubscriptionDetails(){this.reloadSubscriptionDetails$.next(void 0)}loadSubscriptionDetailsForLesson(e,t=!0){return this.loadingService.load(Me($e(e.getEventIds()).map(i=>this.subscriptionDetailsService.getListForEvent(i))),t?void 0:Rn).pipe(u(ot))}findGroupByLesson(e,t){return e.find(o=>o.eventId===t?.getEventIds()[0])?.group||this.defaultGroup}static{this.\u0275fac=function(t){return new(t||n)(_(Pe),_(bn),_(Ye),_(ce),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();var Un=Object.values(pe),N=(()=>{class n{constructor(e,t,i,o,l,g,w,F,Se,xe){this.userSettings=e,this.lessonPresencesService=t,this.lessonTeacherService=i,this.presenceTypesService=o,this.groupService=l,this.dropDownItemsService=g,this.loadingService=w,this.storageService=F,this.settings=Se,this.location=xe,this.selectedDateSubject$=new me(new Date),this.selectedDate$=this.selectedDateSubject$.asObservable().pipe(u(P=>Jt(P)),Be(Ne)),this.viewModeSubject$=new $,this.viewMode$=ee(this.viewModeSubject$,this.userSettings.getPresenceControlViewMode().pipe(O(1))),this.lessons$=this.selectedDate$.pipe(T(P=>this.loadLessonsByDate(P)),E(1)),this.selectLessonId$=new $,this.selectLesson$=this.selectLessonId$.pipe(T(P=>this.getLessonById(P))),this.selectedLesson$=M([ln(this.selectLesson$.pipe(Be((P,Ie)=>Ne(P,Ie))),dn(this.settings.lessonPresencesRefreshTime)),this.lessons$]).pipe(u(([P,Ie])=>Ie.find(ni=>ni.id===P.id)?P:null),E(1)),this.studyClassCount$=this.selectedLesson$.pipe(u(P=>P?.lessons.length||0)),this.updateLessonPresences$=new $,this.reloadLessonPresences$=new $,this.lessonPresences$=ee(mn(this.selectedLesson$,this.reloadLessonPresences$).pipe(T(P=>P?this.loadLessonPresencesByLesson(P):Z([]))),this.updateLessonPresences$).pipe(E(1)),this.presenceTypes$=this.loadPresenceTypes().pipe(E(1)),this.reloadStudentIdsWithUnconfirmedAbsences$=new $,this.studentIdsWithUnconfirmedAbsences$=ee(this.selectedDate$,this.selectedLesson$.pipe(nt(1)),this.reloadStudentIdsWithUnconfirmedAbsences$).pipe(T(()=>this.loadStudentIdsWithUnconfirmedAbsences()),E(1)),this.loading$=this.loadingService.loading$,this.absenceConfirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(E(1)),this.studentIds$=this.lessonPresences$.pipe(u(P=>$e(P.map(Ie=>Ie.StudentRef.Id))),E(1)),this.otherTeachersAbsences$=this.studentIds$.pipe(Be(Ne),T(P=>P.length>0?this.lessonTeacherService.loadOtherTeachersLessonAbsences(this.getMyself(),P):Z([])),E(1)),this.groupsAvailability$=this.groupService.groupsAvailability$,this.presenceControlEntries$=M([this.selectedLesson$,this.lessonPresences$,this.presenceTypes$,this.absenceConfirmationStates$,this.otherTeachersAbsences$]).pipe(u(se(en))),this.presenceControlEntriesByGroup$=M([this.groupService.group$,this.presenceControlEntries$,this.groupService.subscriptionDetailPersonIds$]).pipe(u(se(Pn)),E(1)),this.presentCount$=this.presenceControlEntriesByGroup$.pipe(u(Xe("present"))),this.absentCount$=this.presenceControlEntriesByGroup$.pipe(u(Xe("absent"))),this.unapprovedCount$=this.presenceControlEntriesByGroup$.pipe(u(Xe("unapproved"))),this.absentPrecedingCount$=this.presenceControlEntriesByGroup$.pipe(u(Vn())),this.queryParamsString$=M([this.selectedDate$,this.selectedLesson$,this.viewMode$]).pipe(u(se(this.buildQueryParams.bind(this))),u(pn)),this.destroy$=new $,this.queryParamsString$.pipe(q(this.destroy$)).subscribe(P=>{this.location.replaceState("/presence-control",P),this.confirmBackLinkParams={returnparams:P}}),this.viewMode$.pipe(nt(1),T(P=>this.userSettings.savePresenceControlViewMode(P)),q(this.destroy$)).subscribe(),this.selectedLesson$.pipe(q(this.destroy$)).subscribe(P=>{this.groupService.setSelectedLesson(P)}),this.lessonPresences$.pipe(q(this.destroy$)).subscribe(P=>this.groupService.setLessonPresences(P))}ngOnDestroy(){this.destroy$.next()}setDate(e){this.selectedDateSubject$.next(e)}setLessonId(e){this.selectLessonId$.next(e)}setViewMode(e){this.viewModeSubject$.next(e)}updateLessonPresencesTypes(e){M([this.lessonPresences$.pipe(O(1)),this.presenceTypes$.pipe(O(1))]).pipe(u(([t,i])=>jn(t,e,i,this.settings))).subscribe(t=>this.updateLessonPresences$.next(t))}getNextPresenceType(e){return this.presenceTypes$.pipe(O(1),u(t=>e.getNextPresenceType(t)))}hasUnconfirmedAbsences(e){return this.studentIdsWithUnconfirmedAbsences$.pipe(u(t=>t.includes(e.lessonPresence.StudentRef.Id)))}updateAfterConfirm(){this.reloadLessonPresences$.next(),this.reloadStudentIdsWithUnconfirmedAbsences$.next()}loadLessonPresencesByLesson(e){return this.loadingService.load(this.lessonPresencesService.getListByLessons(e.lessons))}loadLessonsByDate(e){return this.loadingService.load(this.lessonPresencesService.getLessonsByDate(e)).pipe(u(En))}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.presenceTypes$)}loadStudentIdsWithUnconfirmedAbsences(){return ft(0,this.settings.unconfirmedAbsencesRefreshTime||-1).pipe(T(()=>this.lessonPresencesService.getListOfUnconfirmed()),u(e=>$e(e.map(t=>t.StudentRef.Id))))}buildQueryParams(e,t,i){let o={date:Yt(e,"yyyy-MM-dd"),viewMode:i};return t&&(o.lesson=String(t.id)),o}getLessonById(e){let t=String(e);return this.lessons$.pipe(u(i=>t&&i.find(o=>o.id===t)||Bn(i)),Te(Boolean))}getMyself(){let e=this.storageService.getPayload();return Number(e?.holder_id||e?.id_person)}static{this.\u0275fac=function(t){return new(t||n)(_(Pe),_(Qe),_(Fn),_(ve),_(ae),_(rn),_(ce),_(Qt),_(H),_(Dt))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();var fi=(n,r)=>r.id,hi=()=>[],Ci=()=>["/presence-control"];function _i(n,r){if(n&1&&(c(0,"span",12),d(1),a()),n&2){let e=f().$implicit,t=f(),i=Q(0);s(),I(t.getSortDirectionCharacter(i,e))}}function vi(n,r){if(n&1){let e=S();c(0,"div",11),C("click",function(){let i=v(e).$implicit,o=f();return b(o.toggleSort(i))}),d(1),p(2,"translate"),L(3,_i,2,1,"span",12),a()}if(n&2){let e=r.$implicit;f();let t=Q(0);x("className",e),s(),y(" ",m(2,3,"presence-control.groups.list.header."+e)," "),s(2),k(t?3:-1)}}function bi(n,r){n&1&&W(0,"bkd-spinner")}function yi(n,r){n&1&&W(0,"bkd-spinner",18)}function Pi(n,r){if(n&1){let e=S();c(0,"div",13)(1,"div",14)(2,"input",15,0),p(4,"async"),C("change",function(){let i=v(e).$implicit,o=f(2);return b(o.selectionService.toggle(i))}),a()(),c(5,"div",16),d(6),a(),c(7,"div",17)(8,"span"),d(9),a(),L(10,yi,1,0,"bkd-spinner",18),p(11,"async"),a()()}if(n&2){let e=r.$implicit,t=f(2);s(2),x("checked",m(4,4,t.selectionService.isSelected$(e))),s(4),y(" ",e.name," "),s(3),I(e.group?e.group:""),s(),k(m(11,6,t.groupService.loading$)?10:-1)}}function Si(n,r){if(n&1&&B(0,Pi,12,8,"div",13,fi),n&2){f();let e=Q(2);j(e)}}var Wn=(()=>{class n{constructor(e,t,i,o,l,g,w,F,Se){this.route=e,this.state=t,this.selectionService=i,this.groupService=o,this.userSettings=l,this.subscriptionDetailService=g,this.toastService=w,this.translate=F,this.modalService=Se,this.primarySortKeys=["name","group"],this.backlinkQueryParams$=this.route.queryParams.pipe(u(({returnparams:xe})=>xe),u(an)),this.eventIds$=this.state.selectedLesson$.pipe(u(xe=>xe?.getEventIds()||[])),this.sortCriteriaSubject$=new me({primarySortKey:"name",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=M([this.groupService.getSubscriptionDetailsForStudents(),this.sortCriteria$]).pipe(u(se(Tn))),this.selected=[]}ngOnInit(){this.selectionService.selection$.subscribe(e=>this.selected=e)}selectGroup(){this.openGroupModal(De.Select,this.selectCallback.bind(this))}assignGroup(){this.openGroupModal(De.Assign,this.assignCallback.bind(this))}openGroupModal(e,t){M([this.groupService.getSubscriptionDetailsDefinitions(),this.groupService.group$]).pipe(O(1)).subscribe(([i,o])=>{let l=this.modalService.open($n);l.componentInstance.dialogMode=e,l.componentInstance.subscriptionDetailsDefinitions=i,l.componentInstance.group=o,l.result.then(g=>{t(g)},()=>{})})}selectCallback(e){M([this.eventIds$,this.userSettings.getPresenceControlGroupView()]).pipe(O(1),T(([t,i])=>this.userSettings.savePresenceControlGroupView(Mn(e.id,t,i))),u(()=>e.id)).subscribe(t=>this.groupService.selectGroup(t))}assignCallback(e){Me(this.selected.map(t=>this.subscriptionDetailService.update(e.id,t.detail))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.groupService.reloadSubscriptionDetails(),this.selectionService.clear(),this.toastService.success(this.translate.instant("presence-control.groups.notifications.save-success"))}getSortDirectionCharacter(e,t){return e.primarySortKey!==t?"":e.ascending?"\u2193":"\u2191"}toggleSort(e){this.sortCriteriaSubject$.pipe(O(1)).subscribe(t=>{t.primarySortKey===e?this.sortCriteriaSubject$.next({primarySortKey:e,ascending:!t.ascending}):this.sortCriteriaSubject$.next({primarySortKey:e,ascending:e==="name"})})}static{this.\u0275fac=function(t){return new(t||n)(h(Ae),h(N),h(Ke),h(ae),h(Pe),h(Ye),h(_e),h(K),h(ye))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-group"]],features:[ue([Ke])],decls:33,vars:32,consts:[["checkbox",""],[3,"link","params"],[1,"group-header","mb-2","d-flex","justify-content-between"],[1,"d-flex","align-items-baseline"],[1,"ps-3"],["type","button",1,"show","btn","btn-link",3,"click"],["aria-label","edit",1,"btn","btn-primary","btn-icon","me-2",3,"click"],[1,"material-icons"],[1,"group-list"],[1,"group-list-header"],[3,"className"],[3,"click","className"],[1,"sort-direction"],[1,"group-list-entry"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"name","pe-2"],[1,"group","d-flex","justify-content-between"],[1,"inline","small"]],template:function(t,i){if(t&1){let o=S();G(0),p(1,"async"),G(2),p(3,"async"),G(4),p(5,"async"),G(6),p(7,"async"),c(8,"div"),W(9,"bkd-backlink",1),p(10,"async"),c(11,"h1"),d(12),p(13,"translate"),a(),c(14,"div",2)(15,"div",3)(16,"span",4),d(17),p(18,"translate"),a(),c(19,"button",5),C("click",function(){return v(o),b(i.selectGroup())}),d(20),p(21,"translate"),p(22,"translate"),a()(),c(23,"a",6),C("click",function(){return v(o),b(i.assignGroup())}),c(24,"i",7),d(25,"edit"),a()()(),c(26,"div",8)(27,"div",9),B(28,vi,4,5,"div",10,St),a(),L(30,bi,1,0,"bkd-spinner"),p(31,"async"),L(32,Si,2,0),a()()}if(t&2){let o;Y(m(1,8,i.sortCriteria$)),s(2),Y(m(3,11,i.sortedEntries$));let l=(o=m(5,14,i.selectionService.selection$))!==null&&o!==void 0?o:ke(30,hi),g=m(7,16,i.groupService.group$);s(7),x("link",ke(31,Ci))("params",m(10,18,i.backlinkQueryParams$)),s(3),I(m(13,20,"presence-control.groups.title")),s(5),I(m(18,22,"presence-control.groups.show")),s(3),y(" ",g?m(21,24,"presence-control.groups.group")+" "+g:m(22,26,"presence-control.groups.all")," "),s(3),J("disabled",l.length===0),s(5),j(i.primarySortKeys),s(2),k(m(31,28,i.state.loading$)?30:32)}},dependencies:[hn,be,ie,V],styles:['[_nghost-%COMP%]{display:block}.group-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#000;font-weight:300;text-decoration:underline;padding-left:.5rem}.group-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.group-list-header[_ngcontent-%COMP%]{cursor:pointer;padding:1rem;display:grid;grid-template-areas:"name group";grid-template-columns:3fr 2fr;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6}.group-list-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox name group";grid-template-columns:min-content 3fr 2fr}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.name[_ngcontent-%COMP%]{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.group[_ngcontent-%COMP%]{grid-area:group}@media (max-width: 750px){.group-list[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.group-list-header[_ngcontent-%COMP%]{grid-template-columns:3fr 1fr}.group-list-entry[_ngcontent-%COMP%]{grid-template-columns:min-content 3fr 1fr}}'],changeDetection:0})}}return n})();var xi=(n,r)=>r.entry.id;function Ii(n,r){if(n&1){let e=S();c(0,"div",1)(1,"input",5),C("change",function(){let i=v(e).$implicit;return b(i.selected=!i.selected)}),a(),c(2,"label",6)(3,"i"),d(4),a(),c(5,"div",7),d(6),p(7,"date"),p(8,"date"),a()()()}if(n&2){let e=r.$implicit,t=r.$index,i=f();s(),X("id","lesson-presence-",t,""),x("checked",e.selected),s(),J("fw-bold",i.isCurrentLesson(e)),X("for","lesson-presence-",t,""),s(),Ve("",e.entry.presenceCategory," material-icons pe-2"),s(),I(e.entry.presenceCategoryIcon),s(2),kt(" ",U(7,14,e.entry.lessonPresence.LessonDateTimeFrom,"HH:mm"),"\u2013",U(8,17,e.entry.lessonPresence.LessonDateTimeTo,"HH:mm")," ",e.entry.lessonPresence.EventDesignation," ")}}var Qn=(()=>{class n{constructor(e){this.activeModal=e,this.blockLessonOptions=[]}ngOnInit(){this.blockLessonOptions=this.buildLessonPresenceOptions()}getSelectedEntries(){return this.blockLessonOptions.filter(({selected:e})=>e).map(({entry:e})=>e)}isCurrentLesson(e){return In(e.entry.lessonPresence.LessonDateTimeFrom,this.entry.lessonPresence.LessonDateTimeFrom)}buildLessonPresenceOptions(){return this.blockPresenceControlEntries.map(e=>({entry:e,selected:this.entry.confirmationState===e.confirmationState}))}static{this.\u0275fac=function(t){return new(t||n)(h(re))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-block-lesson-component"]],inputs:{entry:"entry",blockPresenceControlEntries:"blockPresenceControlEntries"},decls:15,vars:11,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["type","checkbox",1,"form-check-input",3,"change","id","checked"],[1,"form-check-label","d-flex",3,"for"],[1,"d-block","text-truncate"]],template:function(t,i){if(t&1){let o=S();c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),c(4,"form"),B(5,Ii,9,20,"div",1,xi),a()(),G(7),c(8,"div",2)(9,"button",3),C("click",function(){return v(o),b(i.activeModal.close())}),d(10),p(11,"translate"),a(),c(12,"button",4),C("click",function(){v(o);let g=Q(7);return b(i.activeModal.close(g))}),d(13),p(14,"translate"),a()()}if(t&2){s(2),y(" ",m(3,4,"presence-control.block-lesson.text")," "),s(3),j(i.blockLessonOptions),s(2);let o=Y(i.getSelectedEntries());s(3),y(" ",m(11,7,"presence-control.block-lesson.cancel")," "),s(2),x("disabled",o.length===0),s(),y(" ",m(14,9,"presence-control.block-lesson.save")," ")}},dependencies:[oe,Ce,fe,he,ge,V],styles:[".checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.absent[_ngcontent-%COMP%]{color:#ea161f}.present[_ngcontent-%COMP%]{color:#3d8608}.unapproved[_ngcontent-%COMP%]{color:#ffa814}"]})}}return n})();var wi=30;function gt(n){return`blockLesson${n.lessonPresence.Id}`}var Ze=(()=>{class n{constructor(e,t,i,o){this.state=e,this.lessonPresencesService=t,this.loadingService=i,this.settings=o}getBlockLessonPresenceControlEntries(e){return M([this.state.lessons$.pipe(O(1)),this.loadChangeableLessonPresences(e),this.state.presenceTypes$.pipe(O(1)),this.state.absenceConfirmationStates$.pipe(O(1)),this.state.otherTeachersAbsences$.pipe(O(1))]).pipe(u(([t,i,o,l,g])=>this.filterBlockLessonPresences(e,i).map(w=>tn(t.find(F=>F.id===w.LessonRef.Id.toString()),w,o,l,g))))}filterBlockLessonPresences(e,t){return[...t].sort((i,o)=>i.LessonDateTimeFrom>o.LessonDateTimeFrom?1:-1).reduce((i,o)=>{let l=i[i.length-1];return this.isWithinBlockTime(o,l)?(i.push(o),i):i.find(g=>g.Id===e.lessonPresence.Id)?i:[o]},[])}isWithinBlockTime(e,t){return t?e.LessonDateTimeFrom.getTime()-t.LessonDateTimeTo.getTime()<=wi*60*1e3:!0}loadChangeableLessonPresences(e){return M([this.loadLessonPresences(e),this.state.presenceTypes$.pipe(O(1))]).pipe(u(([t,i])=>t.filter(o=>Zt(o,i.find(l=>l.Id===o.TypeRef.Id)||null,this.settings))))}loadLessonPresences(e){return this.loadingService.load(this.lessonPresencesService.getListByDateStudentClass(e.lessonPresence.LessonDateTimeFrom,e.lessonPresence.StudentRef.Id,e.lessonPresence.StudyClassRef.Id??void 0).pipe(u(t=>t.filter(i=>i.TeacherInformation===e.lessonPresence.TeacherInformation))),gt(e))}static{this.\u0275fac=function(t){return new(t||n)(_(N),_(Qe),_(ce),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac})}}return n})();var Ti=(n,r)=>r.Id;function ki(n,r){if(n&1&&(c(0,"div"),d(1),p(2,"date"),p(3,"date"),p(4,"addSpace"),a()),n&2){let e=r.$implicit;s(),Lt(" ",U(2,5,e.LessonRef.From,"HH:mm"),"\u2013",U(3,8,e.LessonRef.To,"HH:mm")," ",e.LessonRef.EventDesignation,"",U(4,11,":",":")," ",e.Type," ")}}var Kn=(()=>{class n{constructor(e){this.activeModal=e}static{this.\u0275fac=function(t){return new(t||n)(h(re))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-preceding-absence"]],inputs:{precedingAbsences:"precedingAbsences"},decls:10,vars:6,consts:[[1,"modal-body"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(t,i){t&1&&(c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),B(4,ki,5,14,"div",null,Ti),a(),c(6,"div",1)(7,"button",2),C("click",function(){return i.activeModal.dismiss()}),d(8),p(9,"translate"),a()()),t&2&&(s(2),y(" ",m(3,2,"presence-control.preceding-absence.text")," "),s(2),j(i.precedingAbsences),s(4),y(" ",m(9,4,"presence-control.preceding-absence.cancel")," "))},dependencies:[ge,V,un],encapsulation:2})}}return n})();var Li=n=>["student",n,"absences"],$i=n=>["/presence-control/student",n,"absences"];function Di(n,r){if(n&1&&(W(0,"bkd-avatar",0),p(1,"async")),n&2){let e=f();x("studentId",m(1,3,e.studentId$))("link",ne(5,$i,e.entry.lessonPresence.StudentRef.Id.toString()))("linkParams",e.profileReturnParams)}}function Oi(n,r){if(n&1&&(c(0,"span"),d(1),a()),n&2){let e=f(2);s(),I(e.entry.presenceType==null?null:e.entry.presenceType.Designation)}}function Ei(n,r){if(n&1){let e=S();c(0,"button",12),C("click",function(){v(e);let i=f();return b(i.updatePresenceType(i.entry))}),L(1,Oi,2,1,"span"),a()}if(n&2){let e=f();s(),k(e.entry.presenceType!=null&&e.entry.presenceType.IsIncident?-1:1)}}function Bi(n,r){n&1&&W(0,"bkd-spinner",5)}function ji(n,r){if(n&1){let e=S();c(0,"button",13),C("click",function(){v(e);let i=f();return b(i.showPrecedingAbsences(i.entry))}),c(1,"i",14),d(2,"info"),a()()}}function Vi(n,r){if(n&1&&(c(0,"span",9),d(1),a()),n&2){let e=f();s(),y(" ",e.entry.lessonPresence.StudyClassNumber," ")}}function Fi(n,r){if(n&1){let e=S();c(0,"a",15),C("click",function(){v(e);let i=f();return b(i.updateIncident(i.entry))}),c(1,"i",4),d(2,"edit"),a(),c(3,"span"),d(4),p(5,"translate"),a()()}if(n&2){let e=f();s(4),I(m(5,1,(e.entry.presenceType==null?null:e.entry.presenceType.IsIncident)&&(e.entry.presenceType==null?null:e.entry.presenceType.Designation)||"presence-control.entry.incident"))}}var zn=(()=>{class n{get classNames(){return[this.entry.presenceCategory,this.viewMode].join(" ")}constructor(e,t,i,o){this.toastService=e,this.translate=t,this.modalService=i,this.loadingService=o,this.hasUnconfirmedAbsences=!1,this.showClassName=!1,this.togglePresenceType=new te,this.changeIncident=new te,this.entry$=new we(1),this.studentId$=this.entry$.pipe(u(({lessonPresence:l})=>l.StudentRef.Id)),this.loading$=this.entry$.pipe(T(l=>this.loadingService.loading(gt(l))))}ngOnChanges(e){e.entry&&this.entry$.next(e.entry.currentValue)}get isListViewMode(){return this.viewMode===pe.List}updatePresenceType(e){e.canChangePresenceType?this.togglePresenceType.emit(e):this.toastService.warning(this.translate.instant("presence-control.entry.update-warning"))}updateIncident(e){e.canChangeIncident&&this.changeIncident.emit(e)}showPrecedingAbsences(e){let t=this.modalService.open(Kn);t.componentInstance.precedingAbsences=e.precedingAbsences}static{this.\u0275fac=function(t){return new(t||n)(h(_e),h(K),h(ye),h(ce))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-entry"]],hostVars:2,hostBindings:function(t,i){t&2&&Pt(i.classNames)},inputs:{entry:"entry",hasUnconfirmedAbsences:"hasUnconfirmedAbsences",viewMode:"viewMode",showClassName:"showClassName",profileReturnParams:"profileReturnParams"},outputs:{togglePresenceType:"togglePresenceType",changeIncident:"changeIncident"},features:[bt],decls:18,vars:20,consts:[[1,"avatar","large",3,"studentId","link","linkParams"],["type","button",1,"presence-category","designation","btn","btn-link"],["type","button",1,"presence-category","status","btn","btn-link",3,"click","disabled"],[1,"position-relative"],[1,"material-icons"],[1,"inline","small"],["type","button",1,"previously-absent","d-flex","btn","btn-link"],[1,"student-info",3,"routerLink","queryParams"],[1,"student-name","text-truncate"],[1,"study-class","text-truncate"],[1,"unconfirmed-absences"],[1,"incident","btn","btn-link"],["type","button",1,"presence-category","designation","btn","btn-link",3,"click"],["type","button",1,"previously-absent","d-flex","btn","btn-link",3,"click"],[1,"material-icons-outlined"],[1,"incident","btn","btn-link",3,"click"]],template:function(t,i){if(t&1){let o=S();L(0,Di,2,7,"bkd-avatar",0)(1,Ei,2,1,"button",1),G(2),p(3,"async"),c(4,"button",2),C("click",function(){return v(o),b(i.updatePresenceType(i.entry))}),c(5,"div",3)(6,"i",4),d(7),a(),L(8,Bi,1,0,"bkd-spinner",5),a()(),L(9,ji,3,0,"button",6),c(10,"a",7)(11,"span",8),d(12),a(),L(13,Vi,2,1,"span",9),c(14,"span",10),d(15),p(16,"translate"),a()(),L(17,Fi,6,3,"a",11)}if(t&2){k(i.isListViewMode?-1:0),s(),k(i.entry.showDesignation?1:-1);let o=m(3,14,i.loading$);s(3),x("disabled",o),s(2),J("invisible",o),s(),I(i.entry.presenceCategoryIcon),s(),k(o?8:-1),s(),k(i.entry.precedingAbsences!=null&&i.entry.precedingAbsences.length?9:-1),s(),x("routerLink",ne(18,Li,i.entry.lessonPresence.StudentRef.Id))("queryParams",i.profileReturnParams),s(2),I(i.entry.lessonPresence.StudentFullName),s(),k(i.isListViewMode&&i.showClassName?13:-1),s(2),y(" ",i.hasUnconfirmedAbsences?m(16,16,"presence-control.entry.unconfirmed-absences"):""," "),s(2),k(i.entry.canChangeIncident?17:-1)}},dependencies:[fn,be,Re,ie,V],styles:['[_nghost-%COMP%]{padding:2rem 1rem;background-color:#fff;display:grid;grid-template-areas:"avatar status designation previously-absent" "avatar student-info student-info student-info" "avatar incident incident incident";grid-template-columns:min-content min-content 3fr min-content}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{align-self:center}.presence-category[_ngcontent-%COMP%]{text-decoration:none}.presence-category[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{top:.1875rem}.absent[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#ea161f}.present[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#3d8608}.unapproved[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#ffa814}.presence-category[_ngcontent-%COMP%] bkd-spinner[_ngcontent-%COMP%]{color:#000;position:absolute;top:4px;left:5px}.designation[_ngcontent-%COMP%], .student-info[_ngcontent-%COMP%], a.incident[_ngcontent-%COMP%], .incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.avatar[_ngcontent-%COMP%]{grid-area:avatar;margin-right:1.5rem}.status[_ngcontent-%COMP%]{grid-area:status}.status[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:2rem}.designation[_ngcontent-%COMP%]{grid-area:designation;text-align:left;line-height:2.375rem}.previously-absent[_ngcontent-%COMP%]{grid-area:previously-absent;text-decoration:none;color:#00000080;justify-self:end}.student-info[_ngcontent-%COMP%]{grid-area:student-info;display:flex;flex-direction:column;text-decoration:none}.student-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{text-decoration:underline}.student-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child:hover{text-decoration-color:#ea161f}.unconfirmed-absences[_ngcontent-%COMP%]{color:#ea161f;font-size:.875rem;line-height:1}.study-class[_ngcontent-%COMP%]{font-size:.875rem;line-height:1}.incident[_ngcontent-%COMP%]{color:#00000080;padding-right:1.5rem;grid-area:incident;display:flex;text-decoration:none}.incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.incident[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:.3em}.grid[_nghost-%COMP%] .status[_ngcontent-%COMP%], .grid[_nghost-%COMP%] .designation[_ngcontent-%COMP%]{align-self:start;margin-left:-1.5rem;margin-top:-.375rem}.grid[_nghost-%COMP%] .incident[_ngcontent-%COMP%]{align-self:end;margin-left:-1.5rem;margin-bottom:-.375rem}.grid[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{padding-right:0;align-self:start}.grid[_nghost-%COMP%] .unconfirmed-absences[_ngcontent-%COMP%]{height:.875rem}.list[_nghost-%COMP%]{grid-template-areas:"student-info status incidentordesignation previously-absent";grid-template-columns:3fr min-content 4fr 3em;padding:.5rem 1rem}.list[_nghost-%COMP%] .status[_ngcontent-%COMP%]{justify-self:start}.list[_nghost-%COMP%] .student-name[_ngcontent-%COMP%]{line-height:1;margin-bottom:.5rem}.list[_nghost-%COMP%] .incident[_ngcontent-%COMP%], .list[_nghost-%COMP%] .designation[_ngcontent-%COMP%]{grid-area:incidentordesignation}.list[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{padding-right:0}@media (max-width: 750px){.list[_nghost-%COMP%]{grid-template-areas:"student-info student-info student-info previously-absent" "status incidentordesignation incidentordesignation incidentordesignation";grid-template-columns:min-content 1fr 1fr min-content;row-gap:1rem}.list[_nghost-%COMP%] .status[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.list[_nghost-%COMP%] .student-name[_ngcontent-%COMP%]{margin-top:.5rem}.list[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{align-self:start}}']})}}return n})();var Ai=(n,r)=>r.viewMode,Ri=(n,r)=>r.id,Gi=(n,r)=>({"btn-link":n,"btn-danger":r}),Ni=n=>["groups",n],Ui=n=>({returnparams:n});function Hi(n,r){if(n&1){let e=S();c(0,"div",22),C("click",function(){v(e);let i=f();return b(i.lessonDropdown==null?null:i.lessonDropdown.toggle())}),d(1),p(2,"date"),c(3,"span",23),d(4),p(5,"date"),a()()}if(n&2){let e=f();s(),y(" ",U(2,2,e.selectedLesson.LessonDateTimeFrom,"HH:mm"),"\u2013"),s(3),I(U(5,5,e.selectedLesson.LessonDateTimeTo,"HH:mm"))}}function qi(n,r){if(n&1){let e=S();c(0,"div",28),C("click",function(){let i=v(e).$implicit,o=f(2);return b(o.selectLessonChange.emit(i))}),c(1,"div",29)(2,"div"),d(3),p(4,"date"),p(5,"date"),a(),c(6,"div",25),d(7),a(),c(8,"div",25),d(9),a()()()}if(n&2){let e=r.$implicit,t=f(2);J("active",e.id===t.selectedLesson.id),s(3),Tt(" ",U(4,6,e.LessonDateTimeFrom,"HH:mm"),"\u2013",U(5,9,e.LessonDateTimeTo,"HH:mm")," "),s(4),y(" ",e.eventDesignations," "),s(2),y(" ",e.studyClassNumbers," ")}}function Wi(n,r){if(n&1&&(c(0,"div",7)(1,"div",24)(2,"div",25),d(3),a(),c(4,"div",25),d(5),a()(),c(6,"div",26),B(7,qi,10,12,"div",27,Ri),a()()),n&2){let e=f();s(3),I(e.selectedLesson.eventDesignations),s(2),I(e.selectedLesson.studyClassNumbers),s(2),j(e.lessons)}}function Qi(n,r){if(n&1){let e=S();c(0,"bkd-caret",30),C("click",function(){v(e);let i=f();return b(i.lessonDropdown==null?null:i.lessonDropdown.toggle())}),a()}if(n&2){let e=f();x("expanded",(e.lessonDropdown==null?null:e.lessonDropdown.isOpen())||!1)}}function Ki(n,r){if(n&1&&(c(0,"a",19),p(1,"async"),p(2,"async"),p(3,"async"),c(4,"i",31),d(5,"groups"),a()()),n&2){let e=f();x("ngClass",$t(9,Gi,m(1,3,e.isGroupSelected$)===!1,m(2,5,e.isGroupSelected$)))("routerLink",ne(12,Ni,e.selectedLesson.id))("queryParams",ne(14,Ui,m(3,7,e.state.queryParamsString$)))}}function zi(n,r){if(n&1){let e=S();c(0,"button",32),C("click",function(){let i=v(e).$implicit,o=f();return b(o.viewModeChange.emit(i.viewMode))}),c(1,"i",31),d(2),a()()}if(n&2){let e=r.$implicit,t=f();J("btn-outline-secondary",e.viewMode===t.viewMode)("btn-link",e.viewMode!==t.viewMode)("active",e.viewMode===t.viewMode),x("disabled",!t.selectedLesson),s(2),I(e.icon)}}var Ji=Le.prototype._positionMenu;Le.prototype._positionMenu=function(...r){let e=Ji.apply(this,r);if(this._anchor.nativeElement.id==="lesson-dropdown"){let t=this._bodyContainer||this._menu.nativeElement,i=t.style.transform?.match(/translate\(([0-9-.]+)px, ([0-9-.]+)px\)/);i&&parseFloat(i[1])<0&&(t.style.transform=`translate(0px, ${i[2]}px)`)}return e};var Jn=(()=>{class n{constructor(e,t,i){this.state=e,this.groupService=t,this.presentCount=null,this.absentCount=null,this.unapprovedCount=null,this.absentPrecedingCount=null,this.search="",this.selectLessonChange=new te,this.selectDateChange=new te,this.searchChange=new te,this.viewModeChange=new te,this.viewModeOptions=[{viewMode:pe.List,icon:"list"},{viewMode:pe.Grid,icon:"view_module"}],this.isGroupSelected$=this.groupService.group$.pipe(u(Kt)),i.popperOptions=o=>de(le({},o),{modifiers:o.modifiers?.map(l=>(l.name==="offset"&&(l.options={offset:({placement:g,reference:w,popper:F})=>g==="bottom-start"?[(window.innerWidth-F.width)/2-w.x,0]:[]}),l))})}static{this.\u0275fac=function(t){return new(t||n)(h(N),h(ae),h(Ge))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-header"]],viewQuery:function(t,i){if(t&1&&xt(Le,5),t&2){let o;It(o=wt())&&(i.lessonDropdown=o.first)}},inputs:{selectedLesson:"selectedLesson",lessons:"lessons",presentCount:"presentCount",absentCount:"absentCount",unapprovedCount:"unapprovedCount",absentPrecedingCount:"absentPrecedingCount",viewMode:"viewMode",selectDate:"selectDate",search:"search"},outputs:{selectLessonChange:"selectLessonChange",selectDateChange:"selectDateChange",searchChange:"searchChange",viewModeChange:"viewModeChange"},features:[ue([Ge,{provide:At,useClass:Nt},{provide:Rt,useClass:yn}])],decls:41,vars:19,consts:[["d","ngbDatepicker"],[1,"navigation"],[1,"lesson-date"],["type","button",1,"btn","btn-link",3,"click"],[1,"material-icons"],["positionTarget",".lesson-date-input","ngbDatepicker","","placement","bottom-start",1,"lesson-date-input",3,"ngModelChange","ngModel"],[1,"lesson-time"],["ngbDropdown","","container","body","display","dynamic","placement","bottom",1,"lesson-description"],[1,"dropdown-caret",3,"expanded"],[1,"states"],[1,"state","present"],[1,"count"],[1,"state","absent"],[1,"state","unapproved"],[1,"state","previously-absent"],[1,"material-icons-outlined"],[1,"search-and-views"],[1,"search",3,"valueChange","value","disabled","placeholder","label"],[1,"group-and-views","d-flex","align-items-center"],["type","button",1,"group","btn","me-2","me-sm-4",3,"ngClass","routerLink","queryParams"],[1,"views"],["type","button",1,"view","btn","btn-primary","btn-icon",3,"disabled","btn-outline-secondary","btn-link","active"],[1,"lesson-time",3,"click"],[1,"lesson-time-to"],["id","lesson-dropdown","ngbDropdownToggle",""],[1,"text-truncate"],["ngbDropdownMenu","","aria-labelledby","lesson-dropdown"],["ngbDropdownItem","",3,"active"],["ngbDropdownItem","",3,"click"],[1,"lesson-entry"],[1,"dropdown-caret",3,"click","expanded"],[1,"material-icons","align-middle"],["type","button",1,"view","btn","btn-primary","btn-icon",3,"click","disabled"]],template:function(t,i){if(t&1){let o=S();c(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){v(o);let g=Mt(6);return b(g.toggle())}),c(3,"i",4),d(4,"calendar_today"),a()(),c(5,"input",5,0),C("ngModelChange",function(g){return v(o),b(i.selectDateChange.emit(g))}),a()(),L(7,Hi,6,8,"div",6)(8,Wi,9,2,"div",7)(9,Qi,1,1,"bkd-caret",8),a(),c(10,"div",9)(11,"div",10)(12,"i",4),d(13,"check_circle"),a(),c(14,"span",11),d(15),a()(),c(16,"div",12)(17,"i",4),d(18,"cancel"),a(),c(19,"span",11),d(20),a()(),c(21,"div",13)(22,"i",4),d(23,"help"),a(),c(24,"span",11),d(25),a()(),c(26,"div",14)(27,"i",15),d(28,"info"),a(),c(29,"span",11),d(30),a()()(),c(31,"div",16)(32,"bkd-resettable-input",17),p(33,"translate"),p(34,"translate"),C("valueChange",function(g){return v(o),b(i.searchChange.emit(g))}),a(),c(35,"div",18),L(36,Ki,6,16,"a",19),p(37,"async"),c(38,"div",20),B(39,zi,3,8,"button",21,Ai),a()()()}t&2&&(s(5),x("ngModel",i.selectDate),s(2),k(i.selectedLesson?7:-1),s(),k(i.selectedLesson?8:-1),s(),k(i.lessons.length>0?9:-1),s(6),I(i.presentCount!==null?i.presentCount:"?"),s(5),I(i.absentCount!==null?i.absentCount:"?"),s(5),I(i.unapprovedCount!==null?i.unapprovedCount:"?"),s(5),I(i.absentPrecedingCount!==null?i.absentPrecedingCount:"?"),s(2),x("value",i.search)("disabled",!i.selectedLesson)("placeholder",m(33,13,"presence-control.header.search-by-name"))("label",m(34,15,"presence-control.header.search")),s(4),k(m(37,17,i.selectedLesson&&i.state.groupsAvailability$)?36:-1),s(3),j(i.viewModeOptions))},dependencies:[Gt,oe,jt,Vt,Ft,Le,qt,Ht,Ut,cn,_n,Ot,Re,ie,ge,V],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;padding:.75rem 0}.navigation[_ngcontent-%COMP%]{display:grid;grid-template-areas:". date time dropdown-caret" ". description description dropdown-caret";grid-template-columns:1fr auto auto 1fr;align-items:center}.lesson-date[_ngcontent-%COMP%]{grid-area:date;justify-self:end;display:flex;align-items:center;justify-content:flex-end}.lesson-date[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:0 .5ch 0 0}.lesson-date[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#000;position:relative}.lesson-date-input[_ngcontent-%COMP%]{font-weight:600;background:transparent;border:none;width:11ch}.lesson-time[_ngcontent-%COMP%]{grid-area:time;cursor:pointer}.lesson-description[_ngcontent-%COMP%]{grid-area:description;overflow:hidden;text-align:center;cursor:pointer}.dropdown-toggle[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dropdown-toggle[_ngcontent-%COMP%]:after{display:none}.dropdown-caret[_ngcontent-%COMP%]{grid-area:dropdown-caret;line-height:100%;text-align:left;color:#000}.dropdown-menu[_ngcontent-%COMP%]{width:50ch;padding:0;box-shadow:2px 2px 3px -1px #0003}@media (max-width: 800px){.dropdown-menu[_ngcontent-%COMP%]{width:100vw}}.dropdown-item[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6}.states[_ngcontent-%COMP%]{margin:.75rem 0;display:flex;justify-content:center}.state[_ngcontent-%COMP%]{margin-right:7%;display:flex}.state[_ngcontent-%COMP%]:last-child{margin-right:0}@media (min-width: 1000px){.state[_ngcontent-%COMP%]{margin-right:4rem}}.state.present[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#3d8608}.state.absent[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#ea161f}.state.unapproved[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#ffa814}.state.previously-absent[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#00000080}.state[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{margin-left:.3em;margin-top:1px}.search-and-views[_ngcontent-%COMP%]{padding-top:.75rem;display:flex;justify-content:space-between;border-top:1px solid #dee2e6}.search[_ngcontent-%COMP%]{flex:auto;max-width:300px;margin-right:1rem}.views[_ngcontent-%COMP%]{display:flex}.view[_ngcontent-%COMP%]{color:#4e4e4ef2;background-color:#fff}.view.active[_ngcontent-%COMP%]{color:#fff;background-color:#4e4e4ef2;border:none}.group[_ngcontent-%COMP%], .view[_ngcontent-%COMP%]{text-decoration:none;padding-left:0;padding-right:0;aspect-ratio:1/1;width:calc(.75rem + 2 * var(--bs-border-width) + 1.625rem);border-radius:50%}.group.btn-link[_ngcontent-%COMP%]{color:#000}@media (max-width: 380px){[_nghost-%COMP%]{padding-left:.5rem;padding-right:.5rem}#search-addon[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem}}@media (max-width: 365px){.lesson-time[_ngcontent-%COMP%]{line-height:1}.lesson-time-to[_ngcontent-%COMP%]{display:block}.dropdown-caret[_ngcontent-%COMP%]{padding-left:0}}']})}}return n})();var Xi=(n,r)=>r.id;function Yi(n,r){if(n&1){let e=S();c(0,"div",1)(1,"input",5),C("change",function(){let i=v(e).$implicit,o=f();return b(o.onSelectionChange(i))}),a(),c(2,"label",6),d(3),a()()}if(n&2){let e=r.$implicit,t=r.$index,i=f();s(),X("id","incident-",t,""),x("checked",e.id===i.selected.id)("value",e.id),s(),X("for","incident-",t,""),s(),y(" ",e.label," ")}}var Xn=(()=>{class n{constructor(e,t){this.activeModal=e,this.translate=t,this.incidentOptions=[]}ngOnInit(){let e=this.createIncidentOption();this.incidentOptions=this.incidentTypes.map(t=>this.createIncidentOption(t)),this.incidentOptions.unshift(e),this.selected=this.incidentOptions.find(t=>t.id===this.incident?.Id)||e}createIncidentOption(e){return{id:e?e.Id:null,label:e?e.Designation:this.translate.instant("presence-control.incident.no-incident")}}onSelectionChange(e){this.selected=e}getSelectedIncident(){return this.incidentTypes.find(e=>e.Id===this.selected?.id)||null}static{this.\u0275fac=function(t){return new(t||n)(h(re),h(K))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-incident"]],inputs:{incident:"incident",incidentTypes:"incidentTypes"},decls:14,vars:9,consts:[[1,"modal-body"],[1,"form-check"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],["type","radio","name","incident",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,i){t&1&&(c(0,"div",0)(1,"p"),d(2),p(3,"translate"),a(),c(4,"form"),B(5,Yi,4,7,"div",1,Xi),a()(),c(7,"div",2)(8,"button",3),C("click",function(){return i.activeModal.dismiss()}),d(9),p(10,"translate"),a(),c(11,"button",4),C("click",function(){return i.activeModal.close(i.getSelectedIncident())}),d(12),p(13,"translate"),a()()),t&2&&(s(2),y(" ",m(3,3,"presence-control.incident.text")," "),s(3),j(i.incidentOptions),s(4),y(" ",m(10,5,"presence-control.incident.cancel")," "),s(3),y(" ",m(13,7,"presence-control.incident.save")," "))},dependencies:[oe,Ce,fe,he,V],styles:["form[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{border-bottom:1px solid #dee2e6;padding-bottom:1rem;margin-bottom:1rem}"]})}}return n})();var Zi=20,eo=100,Ee=function(n){return n.AddUpdateAction="ADD",n.RemoveUpdateAction="REMOVE",n}(Ee||{}),et=(()=>{class n{constructor(e,t,i,o,l){this.toastService=e,this.translate=t,this.restService=i,this.presenceTypesService=o,this.settings=l,this.destroy$=new $,this.action$=new $,this.pendingUpdates$=this.action$.pipe(_t(this.reduceUpdates.bind(this),[]),vt()),this.revertUpdates$=new $,this.performUpdates$=this.pendingUpdates$.pipe(tt(eo),Te(Ue(st)),Ct(this.performUpdates.bind(this))),this.stateUpdates$=ee(this.pendingUpdates$,this.revertUpdates$).pipe(tt(Zi),Te(Ue(st))),this.performUpdates$.pipe(q(this.destroy$)).subscribe()}ngOnDestroy(){this.destroy$.next()}updatePresenceType(e,t=null){this.dispatchAddUpdate(e.lessonPresence,t)}performUpdates(e){let t=this.groupUpdates(e);return M(Object.keys(t).reduce((i,o)=>{let l=t[o];return Object.keys(l).forEach(g=>{let w=l[g];i.push(this.performUpdateForGroup(w))}),i},[])).pipe(u(()=>t))}performUpdateForGroup(e){return e.forEach(t=>this.dispatchRemoveUpdate(t.presence)),this.performLessonPresencesUpdatesByIds(e[0].presence.LessonRef.Id,e.map(t=>t.presence.StudentRef.Id),e[0].newPresenceTypeId).pipe(ht(t=>this.revertUpdatesAfterError(e,t)))}performLessonPresencesUpdatesByIds(e,t,i=null){return i?(i?this.presenceTypesService.getPresenceType(i):Z(null)).pipe(T(l=>this.restService.editLessonPresences([e],t,l?.Id,He(l,this.settings)||void 0,{context:new it().set(ct,{disableErrorHandling:!0})}))):this.restService.removeLessonPresences([e],t,{context:new it().set(ct,{disableErrorHandling:!0})})}revertUpdatesAfterError(e,t){return console.error("Bulk-update of lesson presences failed"),console.error(t),this.toastService.error(this.translate.instant("shared.lesson-presences-update.error")),this.revertUpdates$.next(e.map(i=>de(le({},i),{newPresenceTypeId:i.presence.TypeRef.Id}))),Z(void 0)}groupUpdates(e){return e.reduce((t,i)=>{let o=String(i.newPresenceTypeId&&i.newPresenceTypeId);return t[o]||(t[o]={}),Array.isArray(t[o][i.presence.LessonRef.Id])||(t[o][i.presence.LessonRef.Id]=[]),t[o][i.presence.LessonRef.Id].push(i),t},{})}reduceUpdates(e,t){switch(t.type){case Ee.AddUpdateAction:{let{presence:i,newPresenceTypeId:o}=t.payload,l=e.findIndex(Yn(i));return l===-1?[...e,{presence:i,newPresenceTypeId:o}]:[...e.slice(0,l),{presence:e[l].presence,newPresenceTypeId:o},...e.slice(l+1)]}case Ee.RemoveUpdateAction:return e.filter(Ue(Yn(t.payload)));default:return e}}dispatchAddUpdate(e,t){this.action$.next({type:Ee.AddUpdateAction,payload:{presence:e,newPresenceTypeId:t}})}dispatchRemoveUpdate(e){this.action$.next({type:Ee.RemoveUpdateAction,payload:e})}static{this.\u0275fac=function(t){return new(t||n)(_(_e),_(K),_(sn),_(ve),_(H))}}static{this.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Yn(n){return r=>r.presence.LessonRef.Id===n.LessonRef.Id&&r.presence.StudentRef.Id===n.StudentRef.Id}var to=(n,r)=>r.id,no=()=>[],io=n=>({returnparams:n});function oo(n,r){n&1&&W(0,"bkd-spinner")}function ro(n,r){n&1&&(c(0,"p",1),d(1),p(2,"translate"),a()),n&2&&(s(),I(m(2,1,"presence-control.no-lessons")))}function so(n,r){n&1&&(c(0,"p",1),d(1),p(2,"translate"),a()),n&2&&(s(),y(" ",m(2,1,"presence-control.no-lesson-presences")," "))}function co(n,r){if(n&1){let e=S();c(0,"bkd-presence-control-entry",4),p(1,"async"),p(2,"async"),p(3,"async"),p(4,"async"),C("togglePresenceType",function(i){v(e);let o=f(3);return b(o.togglePresenceType(i))})("changeIncident",function(i){v(e);let o=f(3);return b(o.changeIncident(i))}),a()}if(n&2){let e,t=r.$implicit,i=f(3);x("entry",t)("hasUnconfirmedAbsences",m(1,5,i.state.hasUnconfirmedAbsences(t)))("viewMode",m(2,7,i.state.viewMode$))("showClassName",((e=m(3,9,i.state.studyClassCount$))!==null&&e!==void 0?e:0)>1)("profileReturnParams",ne(13,io,m(4,11,i.state.queryParamsString$)))}}function ao(n,r){if(n&1&&(c(0,"div"),p(1,"async"),B(2,co,5,15,"bkd-presence-control-entry",3,to),a()),n&2){let e=f(2),t=Q(4);Ve("default-entries entries view-mode-",m(1,3,e.state.viewMode$),""),s(2),j(t)}}function po(n,r){if(n&1){let e=S();c(0,"bkd-presence-control-header",0),p(1,"async"),p(2,"async"),p(3,"async"),p(4,"async"),p(5,"async"),p(6,"async"),p(7,"async"),C("searchChange",function(i){v(e);let o=f();return b(o.search$.next(i))})("viewModeChange",function(i){v(e);let o=f();return b(o.state.setViewMode(i))})("selectDateChange",function(i){v(e);let o=f();return b(o.state.setDate(i))})("selectLessonChange",function(i){v(e);let o=f();return b(o.state.setLessonId(i.id))}),a(),L(8,ro,3,3,"p",1)(9,so,3,3,"p",1)(10,ao,4,5,"div",2)}if(n&2){let e=f(),t=Q(0),i=Q(2),o=Q(4);x("selectedLesson",t)("lessons",i)("presentCount",m(1,10,e.state.presentCount$))("absentCount",m(2,12,e.state.absentCount$))("unapprovedCount",m(3,14,e.state.unapprovedCount$))("absentPrecedingCount",m(4,16,e.state.absentPrecedingCount$))("viewMode",m(5,18,e.state.viewMode$))("selectDate",m(6,20,e.state.selectedDate$))("search",m(7,22,e.search$)),s(8),k(t?o.length===0?9:10:8)}}var lo=["studentFullName"],ei=(()=>{class n{constructor(e,t,i,o,l,g,w){this.state=e,this.blockLessons=t,this.lessonPresencesUpdateService=i,this.presenceTypesService=o,this.modalService=l,this.scrollPosition=g,this.route=w,this.search$=new me(""),this.entries$=M([this.state.presenceControlEntriesByGroup$,this.search$]).pipe(u(([F,Se])=>vn(F,lo,Se)),E(1)),this.destroy$=new $}ngOnInit(){this.route.queryParams.pipe(q(this.destroy$)).subscribe(this.restoreStateFromParams.bind(this))}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}doTogglePresenceType(e){e.forEach(t=>this.state.getNextPresenceType(t).subscribe(i=>this.lessonPresencesUpdateService.updatePresenceType(t,i?i.Id:null)))}togglePresenceType(e){this.blockLessons.getBlockLessonPresenceControlEntries(e).pipe(O(1)).subscribe(t=>{if(t.length===1){let i=t[0];this.doTogglePresenceType([i])}else{let i=this.modalService.open(Qn);i.componentInstance.entry=e,i.componentInstance.blockPresenceControlEntries=t,i.result.then(o=>{o&&this.doTogglePresenceType(o)},()=>{})}})}updateIncident(e,t){this.lessonPresencesUpdateService.updatePresenceType(e,t)}changeIncident(e){this.presenceTypesService.incidentTypes$.subscribe(t=>{let i=this.modalService.open(Xn);i.componentInstance.incident=t.find(o=>o.Id===e.presenceType?.Id)||null,i.componentInstance.incidentTypes=t,i.result.then(o=>{this.updateIncident(e,o?.Id||null)},()=>{})})}restoreStateFromParams(e){e.date&&this.state.setDate(Bt(e.date));let t=String(e.lesson);t&&this.state.setLessonId(t),e.viewMode&&Un.includes(e.viewMode)&&this.state.setViewMode(e.viewMode)}static{this.\u0275fac=function(t){return new(t||n)(h(N),h(Ze),h(et),h(ve),h(ye),h(Sn),h(Ae))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control-list"]],decls:12,vars:16,consts:[[3,"searchChange","viewModeChange","selectDateChange","selectLessonChange","selectedLesson","lessons","presentCount","absentCount","unapprovedCount","absentPrecedingCount","viewMode","selectDate","search"],[1,"mt-3"],[3,"class"],[3,"entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams"],[3,"togglePresenceType","changeIncident","entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams"]],template:function(t,i){if(t&1&&(G(0),p(1,"async"),G(2),p(3,"async"),G(4),p(5,"async"),c(6,"h1"),d(7),p(8,"translate"),a(),L(9,oo,1,0,"bkd-spinner"),p(10,"async"),L(11,po,11,24)),t&2){let o;Y(m(1,2,i.state.selectedLesson$)),s(2),Y(m(3,5,i.state.lessons$)),s(2),Y((o=m(5,8,i.entries$))!==null&&o!==void 0?o:ke(15,no)),s(3),I(m(8,11,"presence-control.title")),s(2),k(m(10,13,i.state.loading$)?9:11)}},dependencies:[Jn,zn,be,ie,V],styles:["bkd-presence-control-entry[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6}.entries.view-mode-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr))}.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{border-right:1px solid #dee2e6}[_nghost-%COMP%]{display:block;overflow:hidden;width:100%}.entries.view-mode-grid[_ngcontent-%COMP%]{width:calc(100% + 1px)}"],changeDetection:0})}}return n})();var ti=(()=>{class n{constructor(e,t){this.state=e,this.lessonPresencesUpdateService=t,this.destroy$=new $}ngOnInit(){this.lessonPresencesUpdateService.stateUpdates$.pipe(q(this.destroy$)).subscribe(e=>this.state.updateLessonPresencesTypes(e))}ngOnDestroy(){this.destroy$.next()}static{this.\u0275fac=function(t){return new(t||n)(h(N),h(et))}}static{this.\u0275cmp=D({type:n,selectors:[["bkd-presence-control"]],features:[ue([N,Ze,ae,on,{provide:zt,useExisting:N}])],decls:1,vars:0,template:function(t,i){t&1&&W(0,"router-outlet")},dependencies:[Et],encapsulation:2,changeDetection:0})}}return n})();var sc=[{path:"",component:ti,children:[{path:"",component:ei,data:{restoreScrollPositionFrom:["/presence-control/student/:id/addresses","/presence-control/student/:id/absences","/presence-control/student/:id/grades"]}},Cn,{path:"groups/:id",component:Wn}]}];export{sc as PRESENCE_CONTROL_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-FNU566LQ.js b/public/apps/webapp-schulverwaltung/chunk-W3JKHGP4.js similarity index 81% rename from public/apps/webapp-schulverwaltung/chunk-FNU566LQ.js rename to public/apps/webapp-schulverwaltung/chunk-W3JKHGP4.js index bbe6aec6..f6d4dadf 100644 --- a/public/apps/webapp-schulverwaltung/chunk-FNU566LQ.js +++ b/public/apps/webapp-schulverwaltung/chunk-W3JKHGP4.js @@ -1 +1 @@ -import{k as y}from"./chunk-JHVNIEZK.js";import{Fa as g,Ib as c,Jb as s,Jd as w,Oa as h,Od as S,Pa as l,Za as p,_a as d,da as a,db as f,ea as o,ed as _,fb as v,hd as b,la as m,ld as M,pb as D,qb as C,wa as r,zd as k}from"./chunk-34ZOBT6Z.js";var z=(()=>{class t{constructor(){this.value=null,this.placeholder="shared.date-select.default-placeholder",this.minDate=null,this.valueChange=new m,this.componentId=w("bkd-date-select-")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=g({type:t,selectors:[["bkd-date-select"]],inputs:{value:"value",placeholder:"placeholder",minDate:"minDate"},outputs:{valueChange:"valueChange"},decls:8,vars:10,consts:[["dp","ngbDatepicker"],[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["type","text","ngbDatepicker","",1,"form-control",3,"click","ngModelChange","minDate","ngModel"]],template:function(i,e){if(i&1){let u=f();p(0,"div",1)(1,"span",2)(2,"i",3),C(3,"calendar_today"),d()(),p(4,"input",4,0),c(6,"translate"),c(7,"translate"),v("click",function(){a(u);let n=D(5);return o(n.toggle())})("ngModelChange",function(n){return a(u),o(e.valueChange.emit(n))}),d()()}i&2&&(r(),l("id",e.componentId),r(3),l("minDate",e.minDate)("ngModel",e.value),h("placeholder",s(6,6,e.placeholder))("aria-label",s(7,8,e.placeholder))("aria-describedby",e.componentId))},dependencies:[y,k,_,b,M,S],encapsulation:2})}}return t})();export{z as a}; +import{k as y}from"./chunk-W4U7QKJF.js";import{$a as d,Ad as k,Ga as g,Jb as c,Kb as s,Kd as w,Pa as h,Pd as S,Qa as l,_a as p,ea as a,eb as f,fa as o,fd as _,gb as v,id as b,ma as m,md as M,qb as D,rb as C,xa as r}from"./chunk-2W7IS4PN.js";var z=(()=>{class t{constructor(){this.value=null,this.placeholder="shared.date-select.default-placeholder",this.minDate=null,this.valueChange=new m,this.componentId=w("bkd-date-select-")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=g({type:t,selectors:[["bkd-date-select"]],inputs:{value:"value",placeholder:"placeholder",minDate:"minDate"},outputs:{valueChange:"valueChange"},decls:8,vars:10,consts:[["dp","ngbDatepicker"],[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["type","text","ngbDatepicker","",1,"form-control",3,"click","ngModelChange","minDate","ngModel"]],template:function(i,e){if(i&1){let u=f();p(0,"div",1)(1,"span",2)(2,"i",3),C(3,"calendar_today"),d()(),p(4,"input",4,0),c(6,"translate"),c(7,"translate"),v("click",function(){a(u);let n=D(5);return o(n.toggle())})("ngModelChange",function(n){return a(u),o(e.valueChange.emit(n))}),d()()}i&2&&(r(),l("id",e.componentId),r(3),l("minDate",e.minDate)("ngModel",e.value),h("placeholder",s(6,6,e.placeholder))("aria-label",s(7,8,e.placeholder))("aria-describedby",e.componentId))},dependencies:[y,k,_,b,M,S],encapsulation:2})}}return t})();export{z as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-ETZJYB5I.js b/public/apps/webapp-schulverwaltung/chunk-W4ESFJ6M.js similarity index 90% rename from public/apps/webapp-schulverwaltung/chunk-ETZJYB5I.js rename to public/apps/webapp-schulverwaltung/chunk-W4ESFJ6M.js index 1b2c08fa..123a8662 100644 --- a/public/apps/webapp-schulverwaltung/chunk-ETZJYB5I.js +++ b/public/apps/webapp-schulverwaltung/chunk-W4ESFJ6M.js @@ -1 +1 @@ -import{v as B,z as H}from"./chunk-JHVNIEZK.js";import{D as _,Fa as O,H as u,Ib as l,J as h,Jb as p,Jd as N,Ma as g,Oa as S,Od as D,P as T,Pa as f,Ua as y,Za as a,_a as o,bc as P,ca as I,da as M,db as $,ea as E,ed as k,fb as C,g as m,gb as x,hd as w,ld as F,n as c,qb as d,wa as r,x as v,zd as V}from"./chunk-34ZOBT6Z.js";function z(n,s){if(n&1){let e=$();a(0,"button",6),C("click",function(t){M(e);let b=x();return E(b.modelChange(t))}),a(1,"i",2),d(2,"clear"),o()()}}function L(n,s){n&1&&(a(0,"div",5)(1,"div",7)(2,"span",8),d(3,"Loading..."),o()()())}var A=300,j=3,ne=(()=>{class n{constructor(){this.selectedItem$=new m(null),this.placeholder="shared.typeahead.default-placeholder",this.valueChange=this.selectedItem$.pipe(c(e=>e?e.Key:null),u()),this.componentId=N("bkd-typeahead-"),this.loading$=new m(!1),this.search=e=>e.pipe(q(j,A),T(this.fetchItems.bind(this)))}ngOnChanges(e){e.value&&e.value.currentValue&&e.value.currentValue!==this.selectedItemKey&&this.fetchItem(e.value.currentValue).subscribe(i=>{this.modelChange(i)})}format(e){return e.Value}modelChange(e){this.selectedItem$.next(e instanceof Object?e:null)}get selectedItemKey(){return this.selectedItem$.value?this.selectedItem$.value.Key:null}fetchItems(e){return this.loading$.next(!0),this.typeaheadService.getTypeaheadItems(e,this.additionalHttpParams).pipe(h(()=>this.loading$.next(!1)))}fetchItem(e){return this.loading$.next(!0),this.typeaheadService.getTypeaheadItemByKey(e).pipe(h(()=>this.loading$.next(!1)))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=O({type:n,selectors:[["bkd-typeahead"]],inputs:{typeaheadService:"typeaheadService",placeholder:"placeholder",value:"value",additionalHttpParams:"additionalHttpParams"},outputs:{valueChange:"valueChange"},features:[I],decls:11,vars:18,consts:[[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["type","text",1,"form-control",3,"ngModelChange","ngbTypeahead","inputFormatter","resultFormatter","ngModel"],["type","button",1,"btn","btn-link","text-decoration-none"],[1,"spinner-container"],["type","button",1,"btn","btn-link","text-decoration-none",3,"click"],["role","status",1,"spinner-border","spinner-border-sm"],[1,"visually-hidden"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"span",1)(2,"i",2),d(3,"search"),o()(),a(4,"input",3),l(5,"async"),l(6,"translate"),l(7,"translate"),C("ngModelChange",function(K){return t.modelChange(K)}),o(),g(8,z,3,0,"button",4),o(),g(9,L,4,0,"div",5),l(10,"async")),i&2&&(r(),f("id",t.componentId),r(3),f("ngbTypeahead",t.search)("inputFormatter",t.format)("resultFormatter",t.format)("ngModel",p(5,10,t.selectedItem$)),S("placeholder",p(6,12,t.placeholder))("aria-label",p(7,14,t.placeholder))("aria-describedby",t.componentId),r(4),y(t.value?8:-1),r(),y(p(10,16,t.loading$)?9:-1))},dependencies:[B,V,k,w,F,P,D],styles:["[_nghost-%COMP%]{display:block;position:relative;background:#fff}.spinner-container[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;right:.75rem;display:flex;align-items:center;z-index:1001}.spinner-border[_ngcontent-%COMP%]{color:#6c757d}input[_ngcontent-%COMP%]{padding-right:2.5em}.input-group[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{position:absolute;right:0;z-index:5}"],changeDetection:0})}}return n})();function q(n,s){return e=>e.pipe(_(s),c(U),u(),v(H(n)))}function U(n){return n.trim().toLowerCase()}export{ne as a}; +import{v as B,z as H}from"./chunk-W4U7QKJF.js";import{$a as o,Ad as V,D as _,Ga as O,H as u,J as h,Jb as l,Kb as p,Kd as N,Na as g,P as T,Pa as S,Pd as D,Qa as f,Va as y,_a as a,cc as P,da as I,ea as M,eb as $,fa as E,fd as k,g as m,gb as C,hb as x,id as w,md as F,n as c,rb as d,x as v,xa as r}from"./chunk-2W7IS4PN.js";function z(n,s){if(n&1){let e=$();a(0,"button",6),C("click",function(t){M(e);let b=x();return E(b.modelChange(t))}),a(1,"i",2),d(2,"clear"),o()()}}function L(n,s){n&1&&(a(0,"div",5)(1,"div",7)(2,"span",8),d(3,"Loading..."),o()()())}var A=300,j=3,ne=(()=>{class n{constructor(){this.selectedItem$=new m(null),this.placeholder="shared.typeahead.default-placeholder",this.valueChange=this.selectedItem$.pipe(c(e=>e?e.Key:null),u()),this.componentId=N("bkd-typeahead-"),this.loading$=new m(!1),this.search=e=>e.pipe(q(j,A),T(this.fetchItems.bind(this)))}ngOnChanges(e){e.value&&e.value.currentValue&&e.value.currentValue!==this.selectedItemKey&&this.fetchItem(e.value.currentValue).subscribe(i=>{this.modelChange(i)})}format(e){return e.Value}modelChange(e){this.selectedItem$.next(e instanceof Object?e:null)}get selectedItemKey(){return this.selectedItem$.value?this.selectedItem$.value.Key:null}fetchItems(e){return this.loading$.next(!0),this.typeaheadService.getTypeaheadItems(e,this.additionalHttpParams).pipe(h(()=>this.loading$.next(!1)))}fetchItem(e){return this.loading$.next(!0),this.typeaheadService.getTypeaheadItemByKey(e).pipe(h(()=>this.loading$.next(!1)))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=O({type:n,selectors:[["bkd-typeahead"]],inputs:{typeaheadService:"typeaheadService",placeholder:"placeholder",value:"value",additionalHttpParams:"additionalHttpParams"},outputs:{valueChange:"valueChange"},features:[I],decls:11,vars:18,consts:[[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["type","text",1,"form-control",3,"ngModelChange","ngbTypeahead","inputFormatter","resultFormatter","ngModel"],["type","button",1,"btn","btn-link","text-decoration-none"],[1,"spinner-container"],["type","button",1,"btn","btn-link","text-decoration-none",3,"click"],["role","status",1,"spinner-border","spinner-border-sm"],[1,"visually-hidden"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"span",1)(2,"i",2),d(3,"search"),o()(),a(4,"input",3),l(5,"async"),l(6,"translate"),l(7,"translate"),C("ngModelChange",function(K){return t.modelChange(K)}),o(),g(8,z,3,0,"button",4),o(),g(9,L,4,0,"div",5),l(10,"async")),i&2&&(r(),f("id",t.componentId),r(3),f("ngbTypeahead",t.search)("inputFormatter",t.format)("resultFormatter",t.format)("ngModel",p(5,10,t.selectedItem$)),S("placeholder",p(6,12,t.placeholder))("aria-label",p(7,14,t.placeholder))("aria-describedby",t.componentId),r(4),y(t.value?8:-1),r(),y(p(10,16,t.loading$)?9:-1))},dependencies:[B,V,k,w,F,P,D],styles:["[_nghost-%COMP%]{display:block;position:relative;background:#fff}.spinner-container[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;right:.75rem;display:flex;align-items:center;z-index:1001}.spinner-border[_ngcontent-%COMP%]{color:#6c757d}input[_ngcontent-%COMP%]{padding-right:2.5em}.input-group[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{position:absolute;right:0;z-index:5}"],changeDetection:0})}}return n})();function q(n,s){return e=>e.pipe(_(s),c(U),u(),v(H(n)))}function U(n){return n.trim().toLowerCase()}export{ne as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-JHVNIEZK.js b/public/apps/webapp-schulverwaltung/chunk-W4U7QKJF.js similarity index 99% rename from public/apps/webapp-schulverwaltung/chunk-JHVNIEZK.js rename to public/apps/webapp-schulverwaltung/chunk-W4U7QKJF.js index 7956d9b6..726d3eb9 100644 --- a/public/apps/webapp-schulverwaltung/chunk-JHVNIEZK.js +++ b/public/apps/webapp-schulverwaltung/chunk-W4U7QKJF.js @@ -1,4 +1,4 @@ -import{$ as c,$a as Ce,Ca as Yt,Cb as Rt,Da as Ai,Eb as An,F as pt,Fa as le,G as Tn,Gb as xn,Ha as K,I as En,Ja as Nn,Ka as Cn,Ma as x,Mb as Pt,Na as xi,Nb as kn,Oa as Ne,Ob as We,P as Mi,Pa as I,Qa as U,R as W,Ra as Ze,Rb as Bn,S as Ot,Sb as Bi,Tb as In,U as Jt,Ua as se,Ub as ei,V as Ri,Va as Zt,Vb as me,W as ft,Wa as Xe,X as N,Xa as Ee,Xb as Fn,Ya as Se,Z as Sn,Za as O,_a as C,a as Je,aa as Pi,ab as Mn,ac as At,b as zt,ba as qt,bb as Rn,ca as Fe,cb as Pn,cd as ti,da as De,db as et,e as Kt,ea as Te,eb as Me,f as j,fb as ee,fd as Ln,g as mn,gb as T,h as vn,ha as Le,hb as Ct,ia as On,ib as Mt,ja as Z,k as bn,ka as He,l as St,la as S,lb as Re,ma as ce,mb as tt,n as qe,nb as ie,ob as ne,p as yn,pb as Xt,qa as X,qb as de,rb as Oe,sb as ki,t as z,ta as Nt,u as wn,ua as Ye,w as Dn,wa as y,x as we,y as Ci,z as Qt,za as _t}from"./chunk-34ZOBT6Z.js";function it(t){t||(qt(it),t=c(He));let o=new Kt(e=>t.onDestroy(e.next.bind(e)));return e=>e.pipe(W(o))}function So(t,o){!o?.injector&&qt(So);let e=o?.injector??c(Z),i=new vn(1),n=In(()=>{let s;try{s=t()}catch(r){Bi(()=>i.error(r));return}Bi(()=>i.next(s))},{injector:e,manualCleanup:!0});return e.get(He).onDestroy(()=>{n.destroy(),i.complete()}),i.asObservable()}function Oo(t,o){let e=!o?.manualCleanup;e&&!o?.injector&&qt(Oo);let i=e?o?.injector?.get(He)??c(He):null,n=No(o?.equal),s;o?.requireSync?s=Ai({kind:0},{equal:n}):s=Ai({kind:1,value:o?.initialValue},{equal:n});let r=t.subscribe({next:a=>s.set({kind:1,value:a}),error:a=>{if(o?.rejectErrors)throw a;s.set({kind:2,error:a})}});if(o?.requireSync&&s().kind===0)throw new Ri(601,!1);return i?.onDestroy(r.unsubscribe.bind(r)),Bn(()=>{let a=s();switch(a.kind){case 1:return a.value;case 2:throw a.error;case 0:throw new Ri(601,!1)}},{equal:o?.equal})}function No(t=Object.is){return(o,e)=>o.kind===1&&e.kind===1&&t(o.value,e.value)}var k="top",Q="bottom",G="right",F="left",ii="auto",Ue=[k,Q,G,F],Pe="start",nt="end",Hn="clippingParents",ni="viewport",gt="popper",Wn="reference",Ii=Ue.reduce(function(t,o){return t.concat([o+"-"+Pe,o+"-"+nt])},[]),oi=[].concat(Ue,[ii]).reduce(function(t,o){return t.concat([o,o+"-"+Pe,o+"-"+nt])},[]),Co="beforeRead",Mo="read",Ro="afterRead",Po="beforeMain",Ao="main",xo="afterMain",ko="beforeWrite",Bo="write",Io="afterWrite",Un=[Co,Mo,Ro,Po,Ao,xo,ko,Bo,Io];function V(t){return t?(t.nodeName||"").toLowerCase():null}function A(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function ue(t){var o=A(t).Element;return t instanceof o||t instanceof Element}function L(t){var o=A(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function mt(t){if(typeof ShadowRoot>"u")return!1;var o=A(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Fo(t){var o=t.state;Object.keys(o.elements).forEach(function(e){var i=o.styles[e]||{},n=o.attributes[e]||{},s=o.elements[e];!L(s)||!V(s)||(Object.assign(s.style,i),Object.keys(n).forEach(function(r){var a=n[r];a===!1?s.removeAttribute(r):s.setAttribute(r,a===!0?"":a)}))})}function Lo(t){var o=t.state,e={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,e.popper),o.styles=e,o.elements.arrow&&Object.assign(o.elements.arrow.style,e.arrow),function(){Object.keys(o.elements).forEach(function(i){var n=o.elements[i],s=o.attributes[i]||{},r=Object.keys(o.styles.hasOwnProperty(i)?o.styles[i]:e[i]),a=r.reduce(function(l,d){return l[d]="",l},{});!L(n)||!V(n)||(Object.assign(n.style,a),Object.keys(s).forEach(function(l){n.removeAttribute(l)}))})}}var Gn={name:"applyStyles",enabled:!0,phase:"write",fn:Fo,effect:Lo,requires:["computeStyles"]};function $(t){return t.split("-")[0]}var ve=Math.max,ot=Math.min,Ae=Math.round;function vt(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function xt(){return!/^((?!chrome|android).)*safari/i.test(vt())}function he(t,o,e){o===void 0&&(o=!1),e===void 0&&(e=!1);var i=t.getBoundingClientRect(),n=1,s=1;o&&L(t)&&(n=t.offsetWidth>0&&Ae(i.width)/t.offsetWidth||1,s=t.offsetHeight>0&&Ae(i.height)/t.offsetHeight||1);var r=ue(t)?A(t):window,a=r.visualViewport,l=!xt()&&e,d=(i.left+(l&&a?a.offsetLeft:0))/n,u=(i.top+(l&&a?a.offsetTop:0))/s,f=i.width/n,p=i.height/s;return{width:f,height:p,top:u,right:d+f,bottom:u+p,left:d,x:d,y:u}}function st(t){var o=he(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(o.width-e)<=1&&(e=o.width),Math.abs(o.height-i)<=1&&(i=o.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function kt(t,o){var e=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(e&&mt(e)){var i=o;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function oe(t){return A(t).getComputedStyle(t)}function Fi(t){return["table","td","th"].indexOf(V(t))>=0}function J(t){return((ue(t)?t.ownerDocument:t.document)||window.document).documentElement}function xe(t){return V(t)==="html"?t:t.assignedSlot||t.parentNode||(mt(t)?t.host:null)||J(t)}function Vn(t){return!L(t)||oe(t).position==="fixed"?null:t.offsetParent}function Ho(t){var o=/firefox/i.test(vt()),e=/Trident/i.test(vt());if(e&&L(t)){var i=oe(t);if(i.position==="fixed")return null}var n=xe(t);for(mt(n)&&(n=n.host);L(n)&&["html","body"].indexOf(V(n))<0;){var s=oe(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||o&&s.willChange==="filter"||o&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function be(t){for(var o=A(t),e=Vn(t);e&&Fi(e)&&oe(e).position==="static";)e=Vn(e);return e&&(V(e)==="html"||V(e)==="body"&&oe(e).position==="static")?o:e||Ho(t)||o}function rt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function at(t,o,e){return ve(t,ot(o,e))}function $n(t,o,e){var i=at(t,o,e);return i>e?e:i}function Bt(){return{top:0,right:0,bottom:0,left:0}}function It(t){return Object.assign({},Bt(),t)}function Ft(t,o){return o.reduce(function(e,i){return e[i]=t,e},{})}var Wo=function(o,e){return o=typeof o=="function"?o(Object.assign({},e.rects,{placement:e.placement})):o,It(typeof o!="number"?o:Ft(o,Ue))};function Uo(t){var o,e=t.state,i=t.name,n=t.options,s=e.elements.arrow,r=e.modifiersData.popperOffsets,a=$(e.placement),l=rt(a),d=[F,G].indexOf(a)>=0,u=d?"height":"width";if(!(!s||!r)){var f=Wo(n.padding,e),p=st(s),h=l==="y"?k:F,_=l==="y"?Q:G,v=e.rects.reference[u]+e.rects.reference[l]-r[l]-e.rects.popper[u],g=r[l]-e.rects.reference[l],w=be(s),b=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,R=v/2-g/2,m=f[h],D=b-p[u]-f[_],E=b/2-p[u]/2+R,P=at(m,E,D),M=l;e.modifiersData[i]=(o={},o[M]=P,o.centerOffset=P-E,o)}}function Go(t){var o=t.state,e=t.options,i=e.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=o.elements.popper.querySelector(n),!n)||kt(o.elements.popper,n)&&(o.elements.arrow=n))}var Li={name:"arrow",enabled:!0,phase:"main",fn:Uo,effect:Go,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function pe(t){return t.split("-")[1]}var Vo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $o(t,o){var e=t.x,i=t.y,n=o.devicePixelRatio||1;return{x:Ae(e*n)/n||0,y:Ae(i*n)/n||0}}function jn(t){var o,e=t.popper,i=t.popperRect,n=t.placement,s=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,f=t.isFixed,p=r.x,h=p===void 0?0:p,_=r.y,v=_===void 0?0:_,g=typeof u=="function"?u({x:h,y:v}):{x:h,y:v};h=g.x,v=g.y;var w=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),R=F,m=k,D=window;if(d){var E=be(e),P="clientHeight",M="clientWidth";if(E===A(e)&&(E=J(e),oe(E).position!=="static"&&a==="absolute"&&(P="scrollHeight",M="scrollWidth")),E=E,n===k||(n===F||n===G)&&s===nt){m=Q;var H=f&&E===D&&D.visualViewport?D.visualViewport.height:E[P];v-=H-i.height,v*=l?1:-1}if(n===F||(n===k||n===Q)&&s===nt){R=G;var B=f&&E===D&&D.visualViewport?D.visualViewport.width:E[M];h-=B-i.width,h*=l?1:-1}}var Y=Object.assign({position:a},d&&Vo),_e=u===!0?$o({x:h,y:v},A(e)):{x:h,y:v};if(h=_e.x,v=_e.y,l){var te;return Object.assign({},Y,(te={},te[m]=b?"0":"",te[R]=w?"0":"",te.transform=(D.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",te))}return Object.assign({},Y,(o={},o[m]=b?v+"px":"",o[R]=w?h+"px":"",o.transform="",o))}function jo(t){var o=t.state,e=t.options,i=e.gpuAcceleration,n=i===void 0?!0:i,s=e.adaptive,r=s===void 0?!0:s,a=e.roundOffsets,l=a===void 0?!0:a,d={placement:$(o.placement),variation:pe(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:n,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,jn(Object.assign({},d,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:r,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,jn(Object.assign({},d,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}var zn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jo,data:{}};var si={passive:!0};function zo(t){var o=t.state,e=t.instance,i=t.options,n=i.scroll,s=n===void 0?!0:n,r=i.resize,a=r===void 0?!0:r,l=A(o.elements.popper),d=[].concat(o.scrollParents.reference,o.scrollParents.popper);return s&&d.forEach(function(u){u.addEventListener("scroll",e.update,si)}),a&&l.addEventListener("resize",e.update,si),function(){s&&d.forEach(function(u){u.removeEventListener("scroll",e.update,si)}),a&&l.removeEventListener("resize",e.update,si)}}var Kn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:zo,data:{}};var Ko={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t){return t.replace(/left|right|bottom|top/g,function(o){return Ko[o]})}var Qo={start:"end",end:"start"};function ri(t){return t.replace(/start|end/g,function(o){return Qo[o]})}function lt(t){var o=A(t),e=o.pageXOffset,i=o.pageYOffset;return{scrollLeft:e,scrollTop:i}}function ct(t){return he(J(t)).left+lt(t).scrollLeft}function Hi(t,o){var e=A(t),i=J(t),n=e.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(n){s=n.width,r=n.height;var d=xt();(d||!d&&o==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:s,height:r,x:a+ct(t),y:l}}function Wi(t){var o,e=J(t),i=lt(t),n=(o=t.ownerDocument)==null?void 0:o.body,s=ve(e.scrollWidth,e.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=ve(e.scrollHeight,e.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-i.scrollLeft+ct(t),l=-i.scrollTop;return oe(n||e).direction==="rtl"&&(a+=ve(e.clientWidth,n?n.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function dt(t){var o=oe(t),e=o.overflow,i=o.overflowX,n=o.overflowY;return/auto|scroll|overlay|hidden/.test(e+n+i)}function ai(t){return["html","body","#document"].indexOf(V(t))>=0?t.ownerDocument.body:L(t)&&dt(t)?t:ai(xe(t))}function Ge(t,o){var e;o===void 0&&(o=[]);var i=ai(t),n=i===((e=t.ownerDocument)==null?void 0:e.body),s=A(i),r=n?[s].concat(s.visualViewport||[],dt(i)?i:[]):i,a=o.concat(r);return n?a:a.concat(Ge(xe(r)))}function yt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Jo(t,o){var e=he(t,!1,o==="fixed");return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function Qn(t,o,e){return o===ni?yt(Hi(t,e)):ue(o)?Jo(o,e):yt(Wi(J(t)))}function qo(t){var o=Ge(xe(t)),e=["absolute","fixed"].indexOf(oe(t).position)>=0,i=e&&L(t)?be(t):t;return ue(i)?o.filter(function(n){return ue(n)&&kt(n,i)&&V(n)!=="body"}):[]}function Ui(t,o,e,i){var n=o==="clippingParents"?qo(t):[].concat(o),s=[].concat(n,[e]),r=s[0],a=s.reduce(function(l,d){var u=Qn(t,d,i);return l.top=ve(u.top,l.top),l.right=ot(u.right,l.right),l.bottom=ot(u.bottom,l.bottom),l.left=ve(u.left,l.left),l},Qn(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Lt(t){var o=t.reference,e=t.element,i=t.placement,n=i?$(i):null,s=i?pe(i):null,r=o.x+o.width/2-e.width/2,a=o.y+o.height/2-e.height/2,l;switch(n){case k:l={x:r,y:o.y-e.height};break;case Q:l={x:r,y:o.y+o.height};break;case G:l={x:o.x+o.width,y:a};break;case F:l={x:o.x-e.width,y:a};break;default:l={x:o.x,y:o.y}}var d=n?rt(n):null;if(d!=null){var u=d==="y"?"height":"width";switch(s){case Pe:l[d]=l[d]-(o[u]/2-e[u]/2);break;case nt:l[d]=l[d]+(o[u]/2-e[u]/2);break;default:}}return l}function Ve(t,o){o===void 0&&(o={});var e=o,i=e.placement,n=i===void 0?t.placement:i,s=e.strategy,r=s===void 0?t.strategy:s,a=e.boundary,l=a===void 0?Hn:a,d=e.rootBoundary,u=d===void 0?ni:d,f=e.elementContext,p=f===void 0?gt:f,h=e.altBoundary,_=h===void 0?!1:h,v=e.padding,g=v===void 0?0:v,w=It(typeof g!="number"?g:Ft(g,Ue)),b=p===gt?Wn:gt,R=t.rects.popper,m=t.elements[_?b:p],D=Ui(ue(m)?m:m.contextElement||J(t.elements.popper),l,u,r),E=he(t.elements.reference),P=Lt({reference:E,element:R,strategy:"absolute",placement:n}),M=yt(Object.assign({},R,P)),H=p===gt?M:E,B={top:D.top-H.top+w.top,bottom:H.bottom-D.bottom+w.bottom,left:D.left-H.left+w.left,right:H.right-D.right+w.right},Y=t.modifiersData.offset;if(p===gt&&Y){var _e=Y[n];Object.keys(B).forEach(function(te){var $e=[G,Q].indexOf(te)>=0?1:-1,je=[k,Q].indexOf(te)>=0?"y":"x";B[te]+=_e[je]*$e})}return B}function Gi(t,o){o===void 0&&(o={});var e=o,i=e.placement,n=e.boundary,s=e.rootBoundary,r=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,d=l===void 0?oi:l,u=pe(i),f=u?a?Ii:Ii.filter(function(_){return pe(_)===u}):Ue,p=f.filter(function(_){return d.indexOf(_)>=0});p.length===0&&(p=f);var h=p.reduce(function(_,v){return _[v]=Ve(t,{placement:v,boundary:n,rootBoundary:s,padding:r})[$(v)],_},{});return Object.keys(h).sort(function(_,v){return h[_]-h[v]})}function Yo(t){if($(t)===ii)return[];var o=bt(t);return[ri(t),o,ri(o)]}function Zo(t){var o=t.state,e=t.options,i=t.name;if(!o.modifiersData[i]._skip){for(var n=e.mainAxis,s=n===void 0?!0:n,r=e.altAxis,a=r===void 0?!0:r,l=e.fallbackPlacements,d=e.padding,u=e.boundary,f=e.rootBoundary,p=e.altBoundary,h=e.flipVariations,_=h===void 0?!0:h,v=e.allowedAutoPlacements,g=o.options.placement,w=$(g),b=w===g,R=l||(b||!_?[bt(g)]:Yo(g)),m=[g].concat(R).reduce(function(ht,Ie){return ht.concat($(Ie)===ii?Gi(o,{placement:Ie,boundary:u,rootBoundary:f,padding:d,flipVariations:_,allowedAutoPlacements:v}):Ie)},[]),D=o.rects.reference,E=o.rects.popper,P=new Map,M=!0,H=m[0],B=0;B=0,je=$e?"width":"height",ae=Ve(o,{placement:Y,boundary:u,rootBoundary:f,altBoundary:p,padding:d}),ge=$e?te?G:F:te?Q:k;D[je]>E[je]&&(ge=bt(ge));var Ut=bt(ge),ze=[];if(s&&ze.push(ae[_e]<=0),a&&ze.push(ae[ge]<=0,ae[Ut]<=0),ze.every(function(ht){return ht})){H=Y,M=!1;break}P.set(Y,ze)}if(M)for(var Gt=_?3:1,Ei=function(Ie){var Et=m.find(function($t){var Ke=P.get($t);if(Ke)return Ke.slice(0,Ie).every(function(Si){return Si})});if(Et)return H=Et,"break"},Tt=Gt;Tt>0;Tt--){var Vt=Ei(Tt);if(Vt==="break")break}o.placement!==H&&(o.modifiersData[i]._skip=!0,o.placement=H,o.reset=!0)}}var Vi={name:"flip",enabled:!0,phase:"main",fn:Zo,requiresIfExists:["offset"],data:{_skip:!1}};function Xo(t,o,e){var i=$(t),n=[F,k].indexOf(i)>=0?-1:1,s=typeof e=="function"?e(Object.assign({},o,{placement:t})):e,r=s[0],a=s[1];return r=r||0,a=(a||0)*n,[F,G].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function es(t){var o=t.state,e=t.options,i=t.name,n=e.offset,s=n===void 0?[0,0]:n,r=oi.reduce(function(u,f){return u[f]=Xo(f,o.rects,s),u},{}),a=r[o.placement],l=a.x,d=a.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=d),o.modifiersData[i]=r}var $i={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:es};function ts(t){var o=t.state,e=t.name;o.modifiersData[e]=Lt({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}var Jn={name:"popperOffsets",enabled:!0,phase:"read",fn:ts,data:{}};function ji(t){return t==="x"?"y":"x"}function is(t){var o=t.state,e=t.options,i=t.name,n=e.mainAxis,s=n===void 0?!0:n,r=e.altAxis,a=r===void 0?!1:r,l=e.boundary,d=e.rootBoundary,u=e.altBoundary,f=e.padding,p=e.tether,h=p===void 0?!0:p,_=e.tetherOffset,v=_===void 0?0:_,g=Ve(o,{boundary:l,rootBoundary:d,padding:f,altBoundary:u}),w=$(o.placement),b=pe(o.placement),R=!b,m=rt(w),D=ji(m),E=o.modifiersData.popperOffsets,P=o.rects.reference,M=o.rects.popper,H=typeof v=="function"?v(Object.assign({},o.rects,{placement:o.placement})):v,B=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),Y=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,_e={x:0,y:0};if(E){if(s){var te,$e=m==="y"?k:F,je=m==="y"?Q:G,ae=m==="y"?"height":"width",ge=E[m],Ut=ge+g[$e],ze=ge-g[je],Gt=h?-M[ae]/2:0,Ei=b===Pe?P[ae]:M[ae],Tt=b===Pe?-M[ae]:-P[ae],Vt=o.elements.arrow,ht=h&&Vt?st(Vt):{width:0,height:0},Ie=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:Bt(),Et=Ie[$e],$t=Ie[je],Ke=at(0,P[ae],ht[ae]),Si=R?P[ae]/2-Gt-Ke-Et-B.mainAxis:Ei-Ke-Et-B.mainAxis,bo=R?-P[ae]/2+Gt+Ke+$t+B.mainAxis:Tt+Ke+$t+B.mainAxis,Oi=o.elements.arrow&&be(o.elements.arrow),yo=Oi?m==="y"?Oi.clientTop||0:Oi.clientLeft||0:0,ln=(te=Y?.[m])!=null?te:0,wo=ge+Si-ln-yo,Do=ge+bo-ln,cn=at(h?ot(Ut,wo):Ut,ge,h?ve(ze,Do):ze);E[m]=cn,_e[m]=cn-ge}if(a){var dn,To=m==="x"?k:F,Eo=m==="x"?Q:G,Qe=E[D],jt=D==="y"?"height":"width",un=Qe+g[To],hn=Qe-g[Eo],Ni=[k,F].indexOf(w)!==-1,pn=(dn=Y?.[D])!=null?dn:0,fn=Ni?un:Qe-P[jt]-M[jt]-pn+B.altAxis,_n=Ni?Qe+P[jt]+M[jt]-pn-B.altAxis:hn,gn=h&&Ni?$n(fn,Qe,_n):at(h?fn:un,Qe,h?_n:hn);E[D]=gn,_e[D]=gn-Qe}o.modifiersData[i]=_e}}var zi={name:"preventOverflow",enabled:!0,phase:"main",fn:is,requiresIfExists:["offset"]};function Ki(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Qi(t){return t===A(t)||!L(t)?lt(t):Ki(t)}function ns(t){var o=t.getBoundingClientRect(),e=Ae(o.width)/t.offsetWidth||1,i=Ae(o.height)/t.offsetHeight||1;return e!==1||i!==1}function Ji(t,o,e){e===void 0&&(e=!1);var i=L(o),n=L(o)&&ns(o),s=J(o),r=he(t,n,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&((V(o)!=="body"||dt(s))&&(a=Qi(o)),L(o)?(l=he(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):s&&(l.x=ct(s))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function os(t){var o=new Map,e=new Set,i=[];t.forEach(function(s){o.set(s.name,s)});function n(s){e.add(s.name);var r=[].concat(s.requires||[],s.requiresIfExists||[]);r.forEach(function(a){if(!e.has(a)){var l=o.get(a);l&&n(l)}}),i.push(s)}return t.forEach(function(s){e.has(s.name)||n(s)}),i}function qi(t){var o=os(t);return Un.reduce(function(e,i){return e.concat(o.filter(function(n){return n.phase===i}))},[])}function Yi(t){var o;return function(){return o||(o=new Promise(function(e){Promise.resolve().then(function(){o=void 0,e(t())})})),o}}function Zi(t){var o=t.reduce(function(e,i){var n=e[i.name];return e[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,e},{});return Object.keys(o).map(function(e){return o[e]})}var qn={placement:"bottom",modifiers:[],strategy:"absolute"};function Yn(){for(var t=arguments.length,o=new Array(t),e=0;e0?0:-1),y(2),ki(" ",n.i18n.getMonthLabel(e.firstDate)," "),y(),se(i!==n.months.length-1?3:-1)}}function ms(t,o){if(t&1&&Ee(0,gs,4,3,null,null,Xe),t&2){let e=T();Se(e.months)}}function vs(t,o){if(t&1&&(O(0,"div",1),de(1),C()),t&2){let e=T(2);y(),Oe(e.i18n.getWeekLabel())}}function bs(t,o){if(t&1&&(O(0,"div",2),de(1),C()),t&2){let e=o.$implicit;y(),Oe(e)}}function ys(t,o){if(t&1&&(O(0,"div",0),x(1,vs,2,1,"div",1),Ee(2,bs,2,1,"div",2,Zt),C()),t&2){let e=T();y(),se(e.datepicker.showWeekNumbers?1:-1),y(),Se(e.viewModel.weekdays)}}function ws(t,o){if(t&1&&(O(0,"div",4),de(1),C()),t&2){let e=T(2).$implicit,i=T();y(),Oe(i.i18n.getWeekNumerals(e.number))}}function Ds(t,o){}function Ts(t,o){if(t&1&&x(0,Ds,0,0,"ng-template",7),t&2){let e=T().$implicit,i=T(3);I("ngTemplateOutlet",i.datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function Es(t,o){if(t&1){let e=et();O(0,"div",6),ee("click",function(n){let s=De(e).$implicit;return T(3).doSelect(s),Te(n.preventDefault())}),x(1,Ts,1,2,null,7),C()}if(t&2){let e=o.$implicit;U("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),I("tabindex",e.tabindex),Ne("aria-label",e.ariaLabel),y(),se(e.hidden?-1:1)}}function Ss(t,o){if(t&1&&(O(0,"div",3),x(1,ws,2,1,"div",4),Ee(2,Es,2,9,"div",5,Xe),C()),t&2){let e=T().$implicit,i=T();y(),se(i.datepicker.showWeekNumbers?1:-1),y(),Se(e.days)}}function Os(t,o){if(t&1&&x(0,Ss,4,1,"div",3),t&2){let e=o.$implicit;se(e.collapsed?-1:0)}}var Ns=["defaultDayTemplate"],Cs=["content"],Ms=t=>({$implicit:t});function Rs(t,o){if(t&1&&Ce(0,"div",8),t&2){let e=o.date,i=o.currentMonth,n=o.selected,s=o.disabled,r=o.focused;I("date",e)("currentMonth",i)("selected",n)("disabled",s)("focused",r)}}function Ps(t,o){if(t&1&&(O(0,"div",10),de(1),C()),t&2){let e=T().$implicit,i=T(2);y(),ki(" ",i.i18n.getMonthLabel(e.firstDate)," ")}}function As(t,o){if(t&1&&(O(0,"div",9),x(1,Ps,2,1,"div",10),Ce(2,"ngb-datepicker-month",11),C()),t&2){let e=o.$implicit,i=T(2);y(),se(i.navigation==="none"||i.displayMonths>1&&i.navigation==="select"?1:-1),y(),I("month",e.firstDate)}}function xs(t,o){if(t&1&&Ee(0,As,3,2,"div",9,Xe),t&2){let e=T();Se(e.model.months)}}function ks(t,o){if(t&1){let e=et();O(0,"ngb-datepicker-navigation",12),ee("navigate",function(n){De(e);let s=T();return Te(s.onNavigateEvent(n))})("select",function(n){De(e);let s=T();return Te(s.onNavigateDateSelect(n))}),C()}if(t&2){let e=T();I("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect",e.model.navigation==="select")("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function Bs(t,o){}function Is(t,o){}var Fs=["dialog"];function Ls(t,o){if(t&1&&(O(0,"strong",3),de(1),C()),t&2){let e=T();y(),Oe(e.header)}}function Hs(t,o){}function Ws(t,o){if(t&1){let e=et();O(0,"div",1),x(1,Hs,0,0,"ng-template",4),O(2,"button",5),ee("click",function(){De(e);let n=T();return Te(n.hide())}),C()()}if(t&2){let e=T(),i=Xt(1);y(),I("ngTemplateOutlet",e.contentHeaderTpl||i)}}function Us(t,o){if(t&1&&(O(0,"span"),de(1),C()),t&2){let e=T().$implicit,i=T();Ze(i.highlightClass),y(),Oe(e)}}function Gs(t,o){if(t&1&&(Mn(0),de(1),Rn()),t&2){let e=T().$implicit;y(),Oe(e)}}function Vs(t,o){if(t&1&&x(0,Us,2,4,"span",0)(1,Gs,2,1,"ng-container"),t&2){let e=o.$index;se(e%2!==0?0:1)}}var $s=(t,o,e)=>({result:t,term:o,formatter:e});function js(t,o){if(t&1&&Ce(0,"ngb-highlight",2),t&2){let e=o.result,i=o.term,n=o.formatter;I("result",n(e))("term",i)}}function zs(t,o){}function Ks(t,o){if(t&1){let e=et();O(0,"button",3),ee("mouseenter",function(){let n=De(e).$index,s=T();return Te(s.markActive(n))})("click",function(){let n=De(e).$implicit,s=T();return Te(s.select(n))}),x(1,zs,0,0,"ng-template",4),C()}if(t&2){let e=o.$implicit,i=o.$index,n=T(),s=Xt(1);U("active",i===n.activeIdx),I("id",n.id+"-"+i),y(),I("ngTemplateOutlet",n.resultTemplate||s)("ngTemplateOutletContext",xn(5,$s,e,n.term,n.formatter))}}var lo={animation:!0,transitionTimerDelayMs:5},Wt=(()=>{class t{constructor(){this.animation=lo.animation}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Qs=(()=>{class t{constructor(){this._ngbConfig=c(Wt),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Js(t){let{transitionDelay:o,transitionDuration:e}=window.getComputedStyle(t),i=parseFloat(o),n=parseFloat(e);return(i+n)*1e3}function ye(t){return parseInt(`${t}`,10)}function Ht(t){return t!=null?`${t}`:""}function Dt(t){return typeof t=="string"}function ke(t){return!isNaN(ye(t))}function q(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function hi(t){return t!=null}function qs(t){return t&&t.then}function Xn(t){return ke(t)?`0${t}`.slice(-2):""}function Ys(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Zs(t,o){return!o||typeof t.closest>"u"?null:t.closest(o)}function mi(t){return(t||document.body).getBoundingClientRect()}function Xs(t){return o=>new Kt(e=>{let i=r=>t.run(()=>e.next(r)),n=r=>t.run(()=>e.error(r)),s=()=>t.run(()=>e.complete());return o.subscribe({next:i,error:n,complete:s})})}function eo(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function co(t=document){let o=t?.activeElement;return o?o.shadowRoot?co(o.shadowRoot):o:null}var er=()=>{},{transitionTimerDelayMs:tr}=lo,li=new Map,fe=(t,o,e,i)=>{let n=i.context||{},s=li.get(o);if(s)switch(i.runningTransition){case"continue":return bn;case"stop":t.run(()=>s.transition$.complete()),n=Object.assign(s.context,n),li.delete(o)}let r=e(o,i.animation,n)||er;if(!i.animation||window.getComputedStyle(o).transitionProperty==="none")return t.run(()=>r()),St(void 0).pipe(Xs(t));let a=new j,l=new j,d=a.pipe(En(!0));li.set(o,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let u=Js(o);return t.runOutsideAngular(()=>{let f=z(o,"transitionend").pipe(W(d),we(({target:h})=>h===o)),p=wn(u+tr).pipe(W(d));Ci(p,f,l).pipe(W(d)).subscribe(()=>{li.delete(o),t.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()};function ir(t,o){if(typeof navigator>"u")return"0px";let{classList:e}=t,i=e.contains("show");i||e.add("show"),t.style[o]="";let n=t.getBoundingClientRect()[o]+"px";return i||e.remove("show"),n}var nr=(t,o,e)=>{let{direction:i,maxSize:n,dimension:s}=e,{classList:r}=t;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!o){a();return}return n||(n=ir(t,s),e.maxSize=n,t.style[s]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),mi(t),r.add("collapsing")),t.style[s]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),t.style[s]=""}},or=(()=>{class t{constructor(){this._ngbConfig=c(Wt),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),to=(()=>{class t{constructor(){this._config=c(or),this._element=c(X),this._zone=c(ce),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new S,this.horizontal=this._config.horizontal,this.shown=new S,this.hidden=new S}set collapsed(e){this._isCollapsed!==e&&(this._isCollapsed=e,this._afterInit&&this._runTransitionWithEvents(e,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(e=this._isCollapsed){this.collapsed=!e,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(e,i){return fe(this._zone,this._element.nativeElement,nr,{animation:i,runningTransition:"stop",context:{direction:e?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(e,i){this._runTransition(e,i).subscribe(()=>{e?this.hidden.emit():this.shown.emit()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,n){i&2&&U("collapse-horizontal",n.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]})}}return t})(),sr=0,th=(()=>{class t{constructor(){this._item=c(vi),this._viewRef=null,this.elementRef=c(X)}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){this._viewRef||(this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["","ngbAccordionBody",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,_t,7),i&2){let r;ie(r=ne())&&(n._bodyTpl=r.first)}},viewQuery:function(i,n){if(i&1&&tt(rs,7,Yt),i&2){let s;ie(s=ne())&&(n._vcr=s.first)}},hostAttrs:[1,"accordion-body"],attrs:as,ngContentSelectors:gi,decls:3,vars:0,consts:[["container",""]],template:function(i,n){i&1&&(Ct(),Pn(0,null,0),Mt(2))},encapsulation:2})}}return t})(),rr=(()=>{class t{constructor(){this.item=c(vi),this.ngbCollapse=c(to)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(i,n){i&2&&(Me("id",n.item.collapseId),Ne("aria-labelledby",n.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[Cn([to])]})}}return t})();var ih=(()=>{class t{constructor(){this.item=c(vi)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(i,n){i&2&&U("collapsed",n.item.collapsed)}})}}return t})(),vi=(()=>{class t{constructor(){this._accordion=c(ar),this._cd=c(We),this._destroyRef=c(He),this._collapsed=!0,this._id=`ngb-accordion-item-${sr++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new S,this.shown=new S,this.hide=new S,this.hidden=new S}set id(e){Dt(e)&&e!==""&&(this._id=e)}set destroyOnHide(e){this._destroyOnHide=e}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(e){e?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:e}=this._collapse;e.animation=!1,e.collapsed=this.collapsed,e.animation=this._accordion.animation,e.hidden.pipe(it(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id),this._cd.markForCheck()}),e.shown.pipe(it(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id),this._cd.markForCheck()})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionItem",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,rr,7),i&2){let r;ie(r=ne())&&(n._collapse=r.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(i,n){i&2&&Me("id",n.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]})}}return t})(),ar=(()=>{class t{constructor(){this._config=c(Qs),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new S,this.shown=new S,this.hide=new S,this.hidden=new S}toggle(e){this._getItem(e)?.toggle()}expand(e){this._getItem(e)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(e=>!e.collapsed)||this._items.first.expand():this._items.forEach(e=>e.expand()))}collapse(e){this._getItem(e)?.collapse()}collapseAll(){this._items?.forEach(e=>e.collapse())}isExpanded(e){let i=this._getItem(e);return i?!i.collapsed:!1}_ensureCanExpand(e){return this.closeOthers?this._items?(this._items.find(i=>!i.collapsed&&e!==i)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(e){return this._items?.find(i=>i.id===e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordion",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,vi,4),i&2){let r;ie(r=ne())&&(n._items=r)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]})}}return t})();var re=class t{static from(o){return o instanceof t?o:o?new t(o.year,o.month,o.day):null}constructor(o,e,i){this.year=q(o)?o:null,this.month=q(e)?e:null,this.day=q(i)?i:null}equals(o){return o!=null&&this.year===o.year&&this.month===o.month&&this.day===o.day}before(o){return o?this.year===o.year?this.month===o.month?this.day===o.day?!1:this.dayo.day:this.month>o.month:this.year>o.year:!1}};function io(t){return new re(t.getFullYear(),t.getMonth()+1,t.getDate())}function ci(t){let o=new Date(t.year,t.month-1,t.day,12);return isNaN(o.getTime())||o.setFullYear(t.year),o}function lr(){return new cr}var bi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>lr(),providedIn:"root"})}}return t})(),cr=(()=>{class t extends bi{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,i="d",n=1){let s=ci(e),r=!0,a=s.getMonth();switch(i){case"y":s.setFullYear(s.getFullYear()+n);break;case"m":a+=n,s.setMonth(a),a=a%12,a<0&&(a=a+12);break;case"d":s.setDate(s.getDate()+n),r=!1;break;default:return e}return r&&s.getMonth()!==a&&s.setDate(0),io(s)}getPrev(e,i="d",n=1){return this.getNext(e,i,-n)}getWeekday(e){let n=ci(e).getDay();return n===0?7:n}getWeekNumber(e,i){i===7&&(i=0);let n=(11-i)%7,s=e[n],r=ci(s);r.setDate(r.getDate()+4-(r.getDay()||7));let a=r.getTime();return r.setMonth(0),r.setDate(1),Math.floor(Math.round((a-r.getTime())/864e5)/7)+1}getToday(){return io(new Date)}isValid(e){if(!e||!q(e.year)||!q(e.month)||!q(e.day)||e.year===0)return!1;let i=ci(e);return!isNaN(i.getTime())&&i.getFullYear()===e.year&&i.getMonth()+1===e.month&&i.getDate()===e.day}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})();function wt(t,o){return!dr(t,o)}function uo(t,o){return!t&&!o?!1:!t||!o?!0:t.year!==o.year||t.month!==o.month}function dr(t,o){return!t&&!o||!!t&&!!o&&t.equals(o)}function ur(t,o){if(o&&t&&o.before(t))throw new Error(`'maxDate' ${o} should be greater than 'minDate' ${t}`)}function di(t,o,e){return t&&o&&t.before(o)?o:t&&e&&t.after(e)?e:t||null}function en(t,o){let{minDate:e,maxDate:i,disabled:n,markDisabled:s}=o;return!(t==null||n||s&&s(t,{year:t.year,month:t.month})||e&&t.before(e)||i&&t.after(i))}function hr(t,o,e,i){if(!o)return[];let n=t.getMonths(o.year);if(e&&o.year===e.year){let s=n.findIndex(r=>r===e.month);n=n.slice(s)}if(i&&o.year===i.year){let s=n.findIndex(r=>r===i.month);n=n.slice(0,s+1)}return n}function pr(t,o,e){if(!t)return[];let i=o?Math.max(o.year,t.year-500):t.year-10,s=(e?Math.min(e.year,t.year+500):t.year+10)-i+1,r=Array(s);for(let a=0;a{let f=Object.assign(t.getNext(o,"m",u),{day:1});if(r[u]=null,!n){let p=a.findIndex(h=>h.firstDate.equals(f));p!==-1&&(r[u]=a.splice(p,1)[0])}return f}).forEach((d,u)=>{r[u]===null&&(r[u]=mr(t,d,e,i,a.shift()||{}))}),r}function mr(t,o,e,i,n={}){let{dayTemplateData:s,minDate:r,maxDate:a,firstDayOfWeek:l,markDisabled:d,outsideDays:u,weekdayWidth:f,weekdaysVisible:p}=e,h=t.getToday();n.firstDate=null,n.lastDate=null,n.number=o.month,n.year=o.year,n.weeks=n.weeks||[],n.weekdays=n.weekdays||[],o=vr(t,o,l),p||(n.weekdays.length=0);for(let _=0;_w.date),l),v.collapsed=u==="collapsed"&&g[0].date.month!==n.number&&g[g.length-1].date.month!==n.number}return n}function vr(t,o,e){let i=t.getDaysPerWeek(),n=new re(o.year,o.month,1),s=t.getWeekday(n)%i;return t.getPrev(n,"d",(i+s-e)%i)}var ut=(()=>{class t{getMonthLabel(e){return`${this.getMonthFullName(e.month,e.year)} ${this.getYearNumerals(e.year)}`}getDayNumerals(e){return`${e.day}`}getWeekNumerals(e){return`${e}`}getYearNumerals(e){return`${e}`}getWeekLabel(){return""}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>new br,providedIn:"root"})}}return t})(),br=(()=>{class t extends ut{constructor(){super(...arguments),this._locale=c(kn),this._monthsShort=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"short",timeZone:"UTC"}).format(Date.UTC(2e3,e))),this._monthsFull=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"long",timeZone:"UTC"}).format(Date.UTC(2e3,e)))}getWeekdayLabel(e,i="narrow"){return[1,2,3,4,5,6,7].map(s=>Intl.DateTimeFormat(this._locale,{weekday:i,timeZone:"UTC"}).format(Date.UTC(2e3,4,s)))[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){let i=new Date(e.year,e.month-1,e.day);return Fn(i,"fullDate",this._locale)}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),tn=(()=>{class t{constructor(){this._VALIDATORS={dayTemplateData:e=>{if(this._state.dayTemplateData!==e)return{dayTemplateData:e}},displayMonths:e=>{if(e=ye(e),q(e)&&e>0&&this._state.displayMonths!==e)return{displayMonths:e}},disabled:e=>{if(this._state.disabled!==e)return{disabled:e}},firstDayOfWeek:e=>{if(e=ye(e),q(e)&&e>=0&&this._state.firstDayOfWeek!==e)return{firstDayOfWeek:e}},focusVisible:e=>{if(this._state.focusVisible!==e&&!this._state.disabled)return{focusVisible:e}},markDisabled:e=>{if(this._state.markDisabled!==e)return{markDisabled:e}},maxDate:e=>{let i=this.toValidDate(e,null);if(wt(this._state.maxDate,i))return{maxDate:i}},minDate:e=>{let i=this.toValidDate(e,null);if(wt(this._state.minDate,i))return{minDate:i}},navigation:e=>{if(this._state.navigation!==e)return{navigation:e}},outsideDays:e=>{if(this._state.outsideDays!==e)return{outsideDays:e}},weekdays:e=>{let i=e===!0||e===!1?"narrow":e,n=e===!0||e===!1?e:!0;if(this._state.weekdayWidth!==i||this._state.weekdaysVisible!==n)return{weekdayWidth:i,weekdaysVisible:n}}},this._calendar=c(bi),this._i18n=c(ut),this._model$=new j,this._dateSelect$=new j,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:"narrow",weekdaysVisible:!0}}get model$(){return this._model$.pipe(we(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(we(e=>e!==null))}set(e){let i=Object.keys(e).map(n=>this._VALIDATORS[n](e[n])).reduce((n,s)=>Je(Je({},n),s),{});Object.keys(i).length>0&&this._nextState(i)}focus(e){let i=this.toValidDate(e,null);i!=null&&!this._state.disabled&&wt(this._state.focusDate,i)&&this._nextState({focusDate:e})}focusSelect(){en(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){let i=this.toValidDate(e,this._calendar.getToday());i!=null&&!this._state.disabled&&(!this._state.firstDate||uo(this._state.firstDate,i))&&this._nextState({firstDate:i})}select(e,i={}){let n=this.toValidDate(e,null);n!=null&&!this._state.disabled&&(wt(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),i.emitEvent&&en(n,this._state)&&this._dateSelect$.next(n))}toValidDate(e,i){let n=re.from(e);return i===void 0&&(i=this._calendar.getToday()),this._calendar.isValid(n)?n:i}getMonth(e){for(let i of this._state.months)if(e.month===i.number&&e.year===i.year)return i;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){let i=this._updateState(e);this._patchContexts(i),this._state=i,this._model$.next(this._state)}_patchContexts(e){let{months:i,displayMonths:n,selectedDate:s,focusDate:r,focusVisible:a,disabled:l,outsideDays:d}=e;e.months.forEach(u=>{u.weeks.forEach(f=>{f.days.forEach(p=>{r&&(p.context.focused=r.equals(p.date)&&a),p.tabindex=!l&&r&&p.date.equals(r)&&r.month===u.number?0:-1,l===!0&&(p.context.disabled=!0),s!==void 0&&(p.context.selected=s!==null&&s.equals(p.date)),u.number!==p.date.month&&(p.hidden=d==="hidden"||d==="collapsed"||n>1&&p.date.after(i[0].firstDate)&&p.date.before(i[n-1].lastDate))})})})}_updateState(e){let i=Object.assign({},this._state,e),n=i.firstDate;if(("minDate"in e||"maxDate"in e)&&(ur(i.minDate,i.maxDate),i.focusDate=di(i.focusDate,i.minDate,i.maxDate),i.firstDate=di(i.firstDate,i.minDate,i.maxDate),n=i.focusDate),"disabled"in e&&(i.focusVisible=!1),"selectedDate"in e&&this._state.months.length===0&&(n=i.selectedDate),"focusVisible"in e||"focusDate"in e&&(i.focusDate=di(i.focusDate,i.minDate,i.maxDate),n=i.focusDate,i.months.length!==0&&i.focusDate&&!i.focusDate.before(i.firstDate)&&!i.focusDate.after(i.lastDate)))return i;if("firstDate"in e&&(i.firstDate=di(i.firstDate,i.minDate,i.maxDate),n=i.firstDate),n){let s="dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e||"weekdaysVisible"in e,r=gr(this._calendar,n,i,this._i18n,s);i.months=r,i.firstDate=r[0].firstDate,i.lastDate=r[r.length-1].lastDate,"selectedDate"in e&&!en(i.selectedDate,i)&&(i.selectedDate=null),"firstDate"in e&&(!i.focusDate||i.focusDate.before(i.firstDate)||i.focusDate.after(i.lastDate))&&(i.focusDate=n);let a=!this._state.firstDate||this._state.firstDate.year!==i.firstDate.year,l=!this._state.firstDate||this._state.firstDate.month!==i.firstDate.month;i.navigation==="select"?(("minDate"in e||"maxDate"in e||i.selectBoxes.years.length===0||a)&&(i.selectBoxes.years=pr(i.firstDate,i.minDate,i.maxDate)),("minDate"in e||"maxDate"in e||i.selectBoxes.months.length===0||a)&&(i.selectBoxes.months=hr(this._calendar,i.firstDate,i.minDate,i.maxDate))):i.selectBoxes={years:[],months:[]},(i.navigation==="arrows"||i.navigation==="select")&&(l||a||"minDate"in e||"maxDate"in e||"disabled"in e)&&(i.prevDisabled=i.disabled||_r(this._calendar,i.firstDate,i.minDate),i.nextDisabled=i.disabled||fr(this._calendar,i.lastDate,i.maxDate))}return i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),pi=function(t){return t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT",t}(pi||{}),rn=(()=>{class t{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays="narrow"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function yr(){return new wr}var yi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>yr(),providedIn:"root"})}}return t})(),wr=(()=>{class t extends yi{fromModel(e){return e&&q(e.year)&&q(e.month)&&q(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&q(e.year)&&q(e.month)&&q(e.day)?{year:e.year,month:e.month,day:e.day}:null}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),Dr=(()=>{class t{processKey(e,i){let{state:n,calendar:s}=i;switch(e.key){case"PageUp":i.focusDate(s.getPrev(n.focusedDate,e.shiftKey?"y":"m",1));break;case"PageDown":i.focusDate(s.getNext(n.focusedDate,e.shiftKey?"y":"m",1));break;case"End":i.focusDate(e.shiftKey?n.maxDate:n.lastDate);break;case"Home":i.focusDate(e.shiftKey?n.minDate:n.firstDate);break;case"ArrowLeft":i.focusDate(s.getPrev(n.focusedDate,"d",1));break;case"ArrowUp":i.focusDate(s.getPrev(n.focusedDate,"d",s.getDaysPerWeek()));break;case"ArrowRight":i.focusDate(s.getNext(n.focusedDate,"d",1));break;case"ArrowDown":i.focusDate(s.getNext(n.focusedDate,"d",s.getDaysPerWeek()));break;case"Enter":case" ":i.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Tr=(()=>{class t{constructor(){this.i18n=c(ut)}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(i,n){i&2&&U("bg-primary",n.selected)("text-white",n.selected)("text-muted",n.isMuted())("outside",n.isMuted())("active",n.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},attrs:ls,decls:1,vars:1,template:function(i,n){i&1&&de(0),i&2&&Oe(n.i18n.getDayNumerals(n.date))},styles:[`[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-tertiary-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5} +import{$ as c,$a as C,Aa as _t,Da as Yt,Db as Rt,Ea as Ai,F as pt,Fb as An,G as Tn,Ga as le,Hb as xn,I as En,Ia as K,Ka as Nn,La as Cn,Na as x,Nb as Pt,Oa as xi,Ob as kn,P as Mi,Pa as Ne,Pb as We,Qa as I,R as W,Ra as U,S as Ot,Sa as Ze,Sb as Bn,Tb as Bi,U as Jt,Ub as In,V as Ri,Va as se,Vb as ei,W as ft,Wa as Zt,Wb as me,X as N,Xa as Xe,Ya as Ee,Yb as Fn,Z as Sn,Za as Se,_a as O,a as Je,aa as Pi,ab as Ce,b as zt,bb as Mn,bc as At,ca as qt,cb as Rn,da as Fe,db as Pn,dd as ti,e as Kt,ea as De,eb as et,f as j,fa as Te,fb as Me,g as mn,gb as ee,gd as Ln,h as vn,hb as T,ia as Le,ib as Ct,ja as On,jb as Mt,k as bn,ka as Z,l as St,la as He,ma as S,mb as Re,n as qe,na as ce,nb as tt,ob as ie,p as yn,pb as ne,qb as Xt,ra as X,rb as de,sb as Oe,t as z,tb as ki,u as wn,ua as Nt,va as Ye,w as Dn,x as we,xa as y,y as Ci,z as Qt}from"./chunk-2W7IS4PN.js";function it(t){t||(qt(it),t=c(He));let o=new Kt(e=>t.onDestroy(e.next.bind(e)));return e=>e.pipe(W(o))}function So(t,o){!o?.injector&&qt(So);let e=o?.injector??c(Z),i=new vn(1),n=In(()=>{let s;try{s=t()}catch(r){Bi(()=>i.error(r));return}Bi(()=>i.next(s))},{injector:e,manualCleanup:!0});return e.get(He).onDestroy(()=>{n.destroy(),i.complete()}),i.asObservable()}function Oo(t,o){let e=!o?.manualCleanup;e&&!o?.injector&&qt(Oo);let i=e?o?.injector?.get(He)??c(He):null,n=No(o?.equal),s;o?.requireSync?s=Ai({kind:0},{equal:n}):s=Ai({kind:1,value:o?.initialValue},{equal:n});let r=t.subscribe({next:a=>s.set({kind:1,value:a}),error:a=>{if(o?.rejectErrors)throw a;s.set({kind:2,error:a})}});if(o?.requireSync&&s().kind===0)throw new Ri(601,!1);return i?.onDestroy(r.unsubscribe.bind(r)),Bn(()=>{let a=s();switch(a.kind){case 1:return a.value;case 2:throw a.error;case 0:throw new Ri(601,!1)}},{equal:o?.equal})}function No(t=Object.is){return(o,e)=>o.kind===1&&e.kind===1&&t(o.value,e.value)}var k="top",Q="bottom",G="right",F="left",ii="auto",Ue=[k,Q,G,F],Pe="start",nt="end",Hn="clippingParents",ni="viewport",gt="popper",Wn="reference",Ii=Ue.reduce(function(t,o){return t.concat([o+"-"+Pe,o+"-"+nt])},[]),oi=[].concat(Ue,[ii]).reduce(function(t,o){return t.concat([o,o+"-"+Pe,o+"-"+nt])},[]),Co="beforeRead",Mo="read",Ro="afterRead",Po="beforeMain",Ao="main",xo="afterMain",ko="beforeWrite",Bo="write",Io="afterWrite",Un=[Co,Mo,Ro,Po,Ao,xo,ko,Bo,Io];function V(t){return t?(t.nodeName||"").toLowerCase():null}function A(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function ue(t){var o=A(t).Element;return t instanceof o||t instanceof Element}function L(t){var o=A(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function mt(t){if(typeof ShadowRoot>"u")return!1;var o=A(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Fo(t){var o=t.state;Object.keys(o.elements).forEach(function(e){var i=o.styles[e]||{},n=o.attributes[e]||{},s=o.elements[e];!L(s)||!V(s)||(Object.assign(s.style,i),Object.keys(n).forEach(function(r){var a=n[r];a===!1?s.removeAttribute(r):s.setAttribute(r,a===!0?"":a)}))})}function Lo(t){var o=t.state,e={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,e.popper),o.styles=e,o.elements.arrow&&Object.assign(o.elements.arrow.style,e.arrow),function(){Object.keys(o.elements).forEach(function(i){var n=o.elements[i],s=o.attributes[i]||{},r=Object.keys(o.styles.hasOwnProperty(i)?o.styles[i]:e[i]),a=r.reduce(function(l,d){return l[d]="",l},{});!L(n)||!V(n)||(Object.assign(n.style,a),Object.keys(s).forEach(function(l){n.removeAttribute(l)}))})}}var Gn={name:"applyStyles",enabled:!0,phase:"write",fn:Fo,effect:Lo,requires:["computeStyles"]};function $(t){return t.split("-")[0]}var ve=Math.max,ot=Math.min,Ae=Math.round;function vt(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function xt(){return!/^((?!chrome|android).)*safari/i.test(vt())}function he(t,o,e){o===void 0&&(o=!1),e===void 0&&(e=!1);var i=t.getBoundingClientRect(),n=1,s=1;o&&L(t)&&(n=t.offsetWidth>0&&Ae(i.width)/t.offsetWidth||1,s=t.offsetHeight>0&&Ae(i.height)/t.offsetHeight||1);var r=ue(t)?A(t):window,a=r.visualViewport,l=!xt()&&e,d=(i.left+(l&&a?a.offsetLeft:0))/n,u=(i.top+(l&&a?a.offsetTop:0))/s,f=i.width/n,p=i.height/s;return{width:f,height:p,top:u,right:d+f,bottom:u+p,left:d,x:d,y:u}}function st(t){var o=he(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(o.width-e)<=1&&(e=o.width),Math.abs(o.height-i)<=1&&(i=o.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function kt(t,o){var e=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(e&&mt(e)){var i=o;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function oe(t){return A(t).getComputedStyle(t)}function Fi(t){return["table","td","th"].indexOf(V(t))>=0}function J(t){return((ue(t)?t.ownerDocument:t.document)||window.document).documentElement}function xe(t){return V(t)==="html"?t:t.assignedSlot||t.parentNode||(mt(t)?t.host:null)||J(t)}function Vn(t){return!L(t)||oe(t).position==="fixed"?null:t.offsetParent}function Ho(t){var o=/firefox/i.test(vt()),e=/Trident/i.test(vt());if(e&&L(t)){var i=oe(t);if(i.position==="fixed")return null}var n=xe(t);for(mt(n)&&(n=n.host);L(n)&&["html","body"].indexOf(V(n))<0;){var s=oe(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||o&&s.willChange==="filter"||o&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function be(t){for(var o=A(t),e=Vn(t);e&&Fi(e)&&oe(e).position==="static";)e=Vn(e);return e&&(V(e)==="html"||V(e)==="body"&&oe(e).position==="static")?o:e||Ho(t)||o}function rt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function at(t,o,e){return ve(t,ot(o,e))}function $n(t,o,e){var i=at(t,o,e);return i>e?e:i}function Bt(){return{top:0,right:0,bottom:0,left:0}}function It(t){return Object.assign({},Bt(),t)}function Ft(t,o){return o.reduce(function(e,i){return e[i]=t,e},{})}var Wo=function(o,e){return o=typeof o=="function"?o(Object.assign({},e.rects,{placement:e.placement})):o,It(typeof o!="number"?o:Ft(o,Ue))};function Uo(t){var o,e=t.state,i=t.name,n=t.options,s=e.elements.arrow,r=e.modifiersData.popperOffsets,a=$(e.placement),l=rt(a),d=[F,G].indexOf(a)>=0,u=d?"height":"width";if(!(!s||!r)){var f=Wo(n.padding,e),p=st(s),h=l==="y"?k:F,_=l==="y"?Q:G,v=e.rects.reference[u]+e.rects.reference[l]-r[l]-e.rects.popper[u],g=r[l]-e.rects.reference[l],w=be(s),b=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,R=v/2-g/2,m=f[h],D=b-p[u]-f[_],E=b/2-p[u]/2+R,P=at(m,E,D),M=l;e.modifiersData[i]=(o={},o[M]=P,o.centerOffset=P-E,o)}}function Go(t){var o=t.state,e=t.options,i=e.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=o.elements.popper.querySelector(n),!n)||kt(o.elements.popper,n)&&(o.elements.arrow=n))}var Li={name:"arrow",enabled:!0,phase:"main",fn:Uo,effect:Go,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function pe(t){return t.split("-")[1]}var Vo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $o(t,o){var e=t.x,i=t.y,n=o.devicePixelRatio||1;return{x:Ae(e*n)/n||0,y:Ae(i*n)/n||0}}function jn(t){var o,e=t.popper,i=t.popperRect,n=t.placement,s=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,f=t.isFixed,p=r.x,h=p===void 0?0:p,_=r.y,v=_===void 0?0:_,g=typeof u=="function"?u({x:h,y:v}):{x:h,y:v};h=g.x,v=g.y;var w=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),R=F,m=k,D=window;if(d){var E=be(e),P="clientHeight",M="clientWidth";if(E===A(e)&&(E=J(e),oe(E).position!=="static"&&a==="absolute"&&(P="scrollHeight",M="scrollWidth")),E=E,n===k||(n===F||n===G)&&s===nt){m=Q;var H=f&&E===D&&D.visualViewport?D.visualViewport.height:E[P];v-=H-i.height,v*=l?1:-1}if(n===F||(n===k||n===Q)&&s===nt){R=G;var B=f&&E===D&&D.visualViewport?D.visualViewport.width:E[M];h-=B-i.width,h*=l?1:-1}}var Y=Object.assign({position:a},d&&Vo),_e=u===!0?$o({x:h,y:v},A(e)):{x:h,y:v};if(h=_e.x,v=_e.y,l){var te;return Object.assign({},Y,(te={},te[m]=b?"0":"",te[R]=w?"0":"",te.transform=(D.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",te))}return Object.assign({},Y,(o={},o[m]=b?v+"px":"",o[R]=w?h+"px":"",o.transform="",o))}function jo(t){var o=t.state,e=t.options,i=e.gpuAcceleration,n=i===void 0?!0:i,s=e.adaptive,r=s===void 0?!0:s,a=e.roundOffsets,l=a===void 0?!0:a,d={placement:$(o.placement),variation:pe(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:n,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,jn(Object.assign({},d,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:r,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,jn(Object.assign({},d,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}var zn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jo,data:{}};var si={passive:!0};function zo(t){var o=t.state,e=t.instance,i=t.options,n=i.scroll,s=n===void 0?!0:n,r=i.resize,a=r===void 0?!0:r,l=A(o.elements.popper),d=[].concat(o.scrollParents.reference,o.scrollParents.popper);return s&&d.forEach(function(u){u.addEventListener("scroll",e.update,si)}),a&&l.addEventListener("resize",e.update,si),function(){s&&d.forEach(function(u){u.removeEventListener("scroll",e.update,si)}),a&&l.removeEventListener("resize",e.update,si)}}var Kn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:zo,data:{}};var Ko={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t){return t.replace(/left|right|bottom|top/g,function(o){return Ko[o]})}var Qo={start:"end",end:"start"};function ri(t){return t.replace(/start|end/g,function(o){return Qo[o]})}function lt(t){var o=A(t),e=o.pageXOffset,i=o.pageYOffset;return{scrollLeft:e,scrollTop:i}}function ct(t){return he(J(t)).left+lt(t).scrollLeft}function Hi(t,o){var e=A(t),i=J(t),n=e.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(n){s=n.width,r=n.height;var d=xt();(d||!d&&o==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:s,height:r,x:a+ct(t),y:l}}function Wi(t){var o,e=J(t),i=lt(t),n=(o=t.ownerDocument)==null?void 0:o.body,s=ve(e.scrollWidth,e.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=ve(e.scrollHeight,e.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-i.scrollLeft+ct(t),l=-i.scrollTop;return oe(n||e).direction==="rtl"&&(a+=ve(e.clientWidth,n?n.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function dt(t){var o=oe(t),e=o.overflow,i=o.overflowX,n=o.overflowY;return/auto|scroll|overlay|hidden/.test(e+n+i)}function ai(t){return["html","body","#document"].indexOf(V(t))>=0?t.ownerDocument.body:L(t)&&dt(t)?t:ai(xe(t))}function Ge(t,o){var e;o===void 0&&(o=[]);var i=ai(t),n=i===((e=t.ownerDocument)==null?void 0:e.body),s=A(i),r=n?[s].concat(s.visualViewport||[],dt(i)?i:[]):i,a=o.concat(r);return n?a:a.concat(Ge(xe(r)))}function yt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Jo(t,o){var e=he(t,!1,o==="fixed");return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function Qn(t,o,e){return o===ni?yt(Hi(t,e)):ue(o)?Jo(o,e):yt(Wi(J(t)))}function qo(t){var o=Ge(xe(t)),e=["absolute","fixed"].indexOf(oe(t).position)>=0,i=e&&L(t)?be(t):t;return ue(i)?o.filter(function(n){return ue(n)&&kt(n,i)&&V(n)!=="body"}):[]}function Ui(t,o,e,i){var n=o==="clippingParents"?qo(t):[].concat(o),s=[].concat(n,[e]),r=s[0],a=s.reduce(function(l,d){var u=Qn(t,d,i);return l.top=ve(u.top,l.top),l.right=ot(u.right,l.right),l.bottom=ot(u.bottom,l.bottom),l.left=ve(u.left,l.left),l},Qn(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Lt(t){var o=t.reference,e=t.element,i=t.placement,n=i?$(i):null,s=i?pe(i):null,r=o.x+o.width/2-e.width/2,a=o.y+o.height/2-e.height/2,l;switch(n){case k:l={x:r,y:o.y-e.height};break;case Q:l={x:r,y:o.y+o.height};break;case G:l={x:o.x+o.width,y:a};break;case F:l={x:o.x-e.width,y:a};break;default:l={x:o.x,y:o.y}}var d=n?rt(n):null;if(d!=null){var u=d==="y"?"height":"width";switch(s){case Pe:l[d]=l[d]-(o[u]/2-e[u]/2);break;case nt:l[d]=l[d]+(o[u]/2-e[u]/2);break;default:}}return l}function Ve(t,o){o===void 0&&(o={});var e=o,i=e.placement,n=i===void 0?t.placement:i,s=e.strategy,r=s===void 0?t.strategy:s,a=e.boundary,l=a===void 0?Hn:a,d=e.rootBoundary,u=d===void 0?ni:d,f=e.elementContext,p=f===void 0?gt:f,h=e.altBoundary,_=h===void 0?!1:h,v=e.padding,g=v===void 0?0:v,w=It(typeof g!="number"?g:Ft(g,Ue)),b=p===gt?Wn:gt,R=t.rects.popper,m=t.elements[_?b:p],D=Ui(ue(m)?m:m.contextElement||J(t.elements.popper),l,u,r),E=he(t.elements.reference),P=Lt({reference:E,element:R,strategy:"absolute",placement:n}),M=yt(Object.assign({},R,P)),H=p===gt?M:E,B={top:D.top-H.top+w.top,bottom:H.bottom-D.bottom+w.bottom,left:D.left-H.left+w.left,right:H.right-D.right+w.right},Y=t.modifiersData.offset;if(p===gt&&Y){var _e=Y[n];Object.keys(B).forEach(function(te){var $e=[G,Q].indexOf(te)>=0?1:-1,je=[k,Q].indexOf(te)>=0?"y":"x";B[te]+=_e[je]*$e})}return B}function Gi(t,o){o===void 0&&(o={});var e=o,i=e.placement,n=e.boundary,s=e.rootBoundary,r=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,d=l===void 0?oi:l,u=pe(i),f=u?a?Ii:Ii.filter(function(_){return pe(_)===u}):Ue,p=f.filter(function(_){return d.indexOf(_)>=0});p.length===0&&(p=f);var h=p.reduce(function(_,v){return _[v]=Ve(t,{placement:v,boundary:n,rootBoundary:s,padding:r})[$(v)],_},{});return Object.keys(h).sort(function(_,v){return h[_]-h[v]})}function Yo(t){if($(t)===ii)return[];var o=bt(t);return[ri(t),o,ri(o)]}function Zo(t){var o=t.state,e=t.options,i=t.name;if(!o.modifiersData[i]._skip){for(var n=e.mainAxis,s=n===void 0?!0:n,r=e.altAxis,a=r===void 0?!0:r,l=e.fallbackPlacements,d=e.padding,u=e.boundary,f=e.rootBoundary,p=e.altBoundary,h=e.flipVariations,_=h===void 0?!0:h,v=e.allowedAutoPlacements,g=o.options.placement,w=$(g),b=w===g,R=l||(b||!_?[bt(g)]:Yo(g)),m=[g].concat(R).reduce(function(ht,Ie){return ht.concat($(Ie)===ii?Gi(o,{placement:Ie,boundary:u,rootBoundary:f,padding:d,flipVariations:_,allowedAutoPlacements:v}):Ie)},[]),D=o.rects.reference,E=o.rects.popper,P=new Map,M=!0,H=m[0],B=0;B=0,je=$e?"width":"height",ae=Ve(o,{placement:Y,boundary:u,rootBoundary:f,altBoundary:p,padding:d}),ge=$e?te?G:F:te?Q:k;D[je]>E[je]&&(ge=bt(ge));var Ut=bt(ge),ze=[];if(s&&ze.push(ae[_e]<=0),a&&ze.push(ae[ge]<=0,ae[Ut]<=0),ze.every(function(ht){return ht})){H=Y,M=!1;break}P.set(Y,ze)}if(M)for(var Gt=_?3:1,Ei=function(Ie){var Et=m.find(function($t){var Ke=P.get($t);if(Ke)return Ke.slice(0,Ie).every(function(Si){return Si})});if(Et)return H=Et,"break"},Tt=Gt;Tt>0;Tt--){var Vt=Ei(Tt);if(Vt==="break")break}o.placement!==H&&(o.modifiersData[i]._skip=!0,o.placement=H,o.reset=!0)}}var Vi={name:"flip",enabled:!0,phase:"main",fn:Zo,requiresIfExists:["offset"],data:{_skip:!1}};function Xo(t,o,e){var i=$(t),n=[F,k].indexOf(i)>=0?-1:1,s=typeof e=="function"?e(Object.assign({},o,{placement:t})):e,r=s[0],a=s[1];return r=r||0,a=(a||0)*n,[F,G].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function es(t){var o=t.state,e=t.options,i=t.name,n=e.offset,s=n===void 0?[0,0]:n,r=oi.reduce(function(u,f){return u[f]=Xo(f,o.rects,s),u},{}),a=r[o.placement],l=a.x,d=a.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=d),o.modifiersData[i]=r}var $i={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:es};function ts(t){var o=t.state,e=t.name;o.modifiersData[e]=Lt({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}var Jn={name:"popperOffsets",enabled:!0,phase:"read",fn:ts,data:{}};function ji(t){return t==="x"?"y":"x"}function is(t){var o=t.state,e=t.options,i=t.name,n=e.mainAxis,s=n===void 0?!0:n,r=e.altAxis,a=r===void 0?!1:r,l=e.boundary,d=e.rootBoundary,u=e.altBoundary,f=e.padding,p=e.tether,h=p===void 0?!0:p,_=e.tetherOffset,v=_===void 0?0:_,g=Ve(o,{boundary:l,rootBoundary:d,padding:f,altBoundary:u}),w=$(o.placement),b=pe(o.placement),R=!b,m=rt(w),D=ji(m),E=o.modifiersData.popperOffsets,P=o.rects.reference,M=o.rects.popper,H=typeof v=="function"?v(Object.assign({},o.rects,{placement:o.placement})):v,B=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),Y=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,_e={x:0,y:0};if(E){if(s){var te,$e=m==="y"?k:F,je=m==="y"?Q:G,ae=m==="y"?"height":"width",ge=E[m],Ut=ge+g[$e],ze=ge-g[je],Gt=h?-M[ae]/2:0,Ei=b===Pe?P[ae]:M[ae],Tt=b===Pe?-M[ae]:-P[ae],Vt=o.elements.arrow,ht=h&&Vt?st(Vt):{width:0,height:0},Ie=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:Bt(),Et=Ie[$e],$t=Ie[je],Ke=at(0,P[ae],ht[ae]),Si=R?P[ae]/2-Gt-Ke-Et-B.mainAxis:Ei-Ke-Et-B.mainAxis,bo=R?-P[ae]/2+Gt+Ke+$t+B.mainAxis:Tt+Ke+$t+B.mainAxis,Oi=o.elements.arrow&&be(o.elements.arrow),yo=Oi?m==="y"?Oi.clientTop||0:Oi.clientLeft||0:0,ln=(te=Y?.[m])!=null?te:0,wo=ge+Si-ln-yo,Do=ge+bo-ln,cn=at(h?ot(Ut,wo):Ut,ge,h?ve(ze,Do):ze);E[m]=cn,_e[m]=cn-ge}if(a){var dn,To=m==="x"?k:F,Eo=m==="x"?Q:G,Qe=E[D],jt=D==="y"?"height":"width",un=Qe+g[To],hn=Qe-g[Eo],Ni=[k,F].indexOf(w)!==-1,pn=(dn=Y?.[D])!=null?dn:0,fn=Ni?un:Qe-P[jt]-M[jt]-pn+B.altAxis,_n=Ni?Qe+P[jt]+M[jt]-pn-B.altAxis:hn,gn=h&&Ni?$n(fn,Qe,_n):at(h?fn:un,Qe,h?_n:hn);E[D]=gn,_e[D]=gn-Qe}o.modifiersData[i]=_e}}var zi={name:"preventOverflow",enabled:!0,phase:"main",fn:is,requiresIfExists:["offset"]};function Ki(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Qi(t){return t===A(t)||!L(t)?lt(t):Ki(t)}function ns(t){var o=t.getBoundingClientRect(),e=Ae(o.width)/t.offsetWidth||1,i=Ae(o.height)/t.offsetHeight||1;return e!==1||i!==1}function Ji(t,o,e){e===void 0&&(e=!1);var i=L(o),n=L(o)&&ns(o),s=J(o),r=he(t,n,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&((V(o)!=="body"||dt(s))&&(a=Qi(o)),L(o)?(l=he(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):s&&(l.x=ct(s))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function os(t){var o=new Map,e=new Set,i=[];t.forEach(function(s){o.set(s.name,s)});function n(s){e.add(s.name);var r=[].concat(s.requires||[],s.requiresIfExists||[]);r.forEach(function(a){if(!e.has(a)){var l=o.get(a);l&&n(l)}}),i.push(s)}return t.forEach(function(s){e.has(s.name)||n(s)}),i}function qi(t){var o=os(t);return Un.reduce(function(e,i){return e.concat(o.filter(function(n){return n.phase===i}))},[])}function Yi(t){var o;return function(){return o||(o=new Promise(function(e){Promise.resolve().then(function(){o=void 0,e(t())})})),o}}function Zi(t){var o=t.reduce(function(e,i){var n=e[i.name];return e[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,e},{});return Object.keys(o).map(function(e){return o[e]})}var qn={placement:"bottom",modifiers:[],strategy:"absolute"};function Yn(){for(var t=arguments.length,o=new Array(t),e=0;e0?0:-1),y(2),ki(" ",n.i18n.getMonthLabel(e.firstDate)," "),y(),se(i!==n.months.length-1?3:-1)}}function ms(t,o){if(t&1&&Ee(0,gs,4,3,null,null,Xe),t&2){let e=T();Se(e.months)}}function vs(t,o){if(t&1&&(O(0,"div",1),de(1),C()),t&2){let e=T(2);y(),Oe(e.i18n.getWeekLabel())}}function bs(t,o){if(t&1&&(O(0,"div",2),de(1),C()),t&2){let e=o.$implicit;y(),Oe(e)}}function ys(t,o){if(t&1&&(O(0,"div",0),x(1,vs,2,1,"div",1),Ee(2,bs,2,1,"div",2,Zt),C()),t&2){let e=T();y(),se(e.datepicker.showWeekNumbers?1:-1),y(),Se(e.viewModel.weekdays)}}function ws(t,o){if(t&1&&(O(0,"div",4),de(1),C()),t&2){let e=T(2).$implicit,i=T();y(),Oe(i.i18n.getWeekNumerals(e.number))}}function Ds(t,o){}function Ts(t,o){if(t&1&&x(0,Ds,0,0,"ng-template",7),t&2){let e=T().$implicit,i=T(3);I("ngTemplateOutlet",i.datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function Es(t,o){if(t&1){let e=et();O(0,"div",6),ee("click",function(n){let s=De(e).$implicit;return T(3).doSelect(s),Te(n.preventDefault())}),x(1,Ts,1,2,null,7),C()}if(t&2){let e=o.$implicit;U("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),I("tabindex",e.tabindex),Ne("aria-label",e.ariaLabel),y(),se(e.hidden?-1:1)}}function Ss(t,o){if(t&1&&(O(0,"div",3),x(1,ws,2,1,"div",4),Ee(2,Es,2,9,"div",5,Xe),C()),t&2){let e=T().$implicit,i=T();y(),se(i.datepicker.showWeekNumbers?1:-1),y(),Se(e.days)}}function Os(t,o){if(t&1&&x(0,Ss,4,1,"div",3),t&2){let e=o.$implicit;se(e.collapsed?-1:0)}}var Ns=["defaultDayTemplate"],Cs=["content"],Ms=t=>({$implicit:t});function Rs(t,o){if(t&1&&Ce(0,"div",8),t&2){let e=o.date,i=o.currentMonth,n=o.selected,s=o.disabled,r=o.focused;I("date",e)("currentMonth",i)("selected",n)("disabled",s)("focused",r)}}function Ps(t,o){if(t&1&&(O(0,"div",10),de(1),C()),t&2){let e=T().$implicit,i=T(2);y(),ki(" ",i.i18n.getMonthLabel(e.firstDate)," ")}}function As(t,o){if(t&1&&(O(0,"div",9),x(1,Ps,2,1,"div",10),Ce(2,"ngb-datepicker-month",11),C()),t&2){let e=o.$implicit,i=T(2);y(),se(i.navigation==="none"||i.displayMonths>1&&i.navigation==="select"?1:-1),y(),I("month",e.firstDate)}}function xs(t,o){if(t&1&&Ee(0,As,3,2,"div",9,Xe),t&2){let e=T();Se(e.model.months)}}function ks(t,o){if(t&1){let e=et();O(0,"ngb-datepicker-navigation",12),ee("navigate",function(n){De(e);let s=T();return Te(s.onNavigateEvent(n))})("select",function(n){De(e);let s=T();return Te(s.onNavigateDateSelect(n))}),C()}if(t&2){let e=T();I("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect",e.model.navigation==="select")("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function Bs(t,o){}function Is(t,o){}var Fs=["dialog"];function Ls(t,o){if(t&1&&(O(0,"strong",3),de(1),C()),t&2){let e=T();y(),Oe(e.header)}}function Hs(t,o){}function Ws(t,o){if(t&1){let e=et();O(0,"div",1),x(1,Hs,0,0,"ng-template",4),O(2,"button",5),ee("click",function(){De(e);let n=T();return Te(n.hide())}),C()()}if(t&2){let e=T(),i=Xt(1);y(),I("ngTemplateOutlet",e.contentHeaderTpl||i)}}function Us(t,o){if(t&1&&(O(0,"span"),de(1),C()),t&2){let e=T().$implicit,i=T();Ze(i.highlightClass),y(),Oe(e)}}function Gs(t,o){if(t&1&&(Mn(0),de(1),Rn()),t&2){let e=T().$implicit;y(),Oe(e)}}function Vs(t,o){if(t&1&&x(0,Us,2,4,"span",0)(1,Gs,2,1,"ng-container"),t&2){let e=o.$index;se(e%2!==0?0:1)}}var $s=(t,o,e)=>({result:t,term:o,formatter:e});function js(t,o){if(t&1&&Ce(0,"ngb-highlight",2),t&2){let e=o.result,i=o.term,n=o.formatter;I("result",n(e))("term",i)}}function zs(t,o){}function Ks(t,o){if(t&1){let e=et();O(0,"button",3),ee("mouseenter",function(){let n=De(e).$index,s=T();return Te(s.markActive(n))})("click",function(){let n=De(e).$implicit,s=T();return Te(s.select(n))}),x(1,zs,0,0,"ng-template",4),C()}if(t&2){let e=o.$implicit,i=o.$index,n=T(),s=Xt(1);U("active",i===n.activeIdx),I("id",n.id+"-"+i),y(),I("ngTemplateOutlet",n.resultTemplate||s)("ngTemplateOutletContext",xn(5,$s,e,n.term,n.formatter))}}var lo={animation:!0,transitionTimerDelayMs:5},Wt=(()=>{class t{constructor(){this.animation=lo.animation}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Qs=(()=>{class t{constructor(){this._ngbConfig=c(Wt),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Js(t){let{transitionDelay:o,transitionDuration:e}=window.getComputedStyle(t),i=parseFloat(o),n=parseFloat(e);return(i+n)*1e3}function ye(t){return parseInt(`${t}`,10)}function Ht(t){return t!=null?`${t}`:""}function Dt(t){return typeof t=="string"}function ke(t){return!isNaN(ye(t))}function q(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function hi(t){return t!=null}function qs(t){return t&&t.then}function Xn(t){return ke(t)?`0${t}`.slice(-2):""}function Ys(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Zs(t,o){return!o||typeof t.closest>"u"?null:t.closest(o)}function mi(t){return(t||document.body).getBoundingClientRect()}function Xs(t){return o=>new Kt(e=>{let i=r=>t.run(()=>e.next(r)),n=r=>t.run(()=>e.error(r)),s=()=>t.run(()=>e.complete());return o.subscribe({next:i,error:n,complete:s})})}function eo(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function co(t=document){let o=t?.activeElement;return o?o.shadowRoot?co(o.shadowRoot):o:null}var er=()=>{},{transitionTimerDelayMs:tr}=lo,li=new Map,fe=(t,o,e,i)=>{let n=i.context||{},s=li.get(o);if(s)switch(i.runningTransition){case"continue":return bn;case"stop":t.run(()=>s.transition$.complete()),n=Object.assign(s.context,n),li.delete(o)}let r=e(o,i.animation,n)||er;if(!i.animation||window.getComputedStyle(o).transitionProperty==="none")return t.run(()=>r()),St(void 0).pipe(Xs(t));let a=new j,l=new j,d=a.pipe(En(!0));li.set(o,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let u=Js(o);return t.runOutsideAngular(()=>{let f=z(o,"transitionend").pipe(W(d),we(({target:h})=>h===o)),p=wn(u+tr).pipe(W(d));Ci(p,f,l).pipe(W(d)).subscribe(()=>{li.delete(o),t.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()};function ir(t,o){if(typeof navigator>"u")return"0px";let{classList:e}=t,i=e.contains("show");i||e.add("show"),t.style[o]="";let n=t.getBoundingClientRect()[o]+"px";return i||e.remove("show"),n}var nr=(t,o,e)=>{let{direction:i,maxSize:n,dimension:s}=e,{classList:r}=t;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!o){a();return}return n||(n=ir(t,s),e.maxSize=n,t.style[s]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),mi(t),r.add("collapsing")),t.style[s]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),t.style[s]=""}},or=(()=>{class t{constructor(){this._ngbConfig=c(Wt),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),to=(()=>{class t{constructor(){this._config=c(or),this._element=c(X),this._zone=c(ce),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new S,this.horizontal=this._config.horizontal,this.shown=new S,this.hidden=new S}set collapsed(e){this._isCollapsed!==e&&(this._isCollapsed=e,this._afterInit&&this._runTransitionWithEvents(e,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(e=this._isCollapsed){this.collapsed=!e,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(e,i){return fe(this._zone,this._element.nativeElement,nr,{animation:i,runningTransition:"stop",context:{direction:e?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(e,i){this._runTransition(e,i).subscribe(()=>{e?this.hidden.emit():this.shown.emit()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,n){i&2&&U("collapse-horizontal",n.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]})}}return t})(),sr=0,th=(()=>{class t{constructor(){this._item=c(vi),this._viewRef=null,this.elementRef=c(X)}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){this._viewRef||(this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["","ngbAccordionBody",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,_t,7),i&2){let r;ie(r=ne())&&(n._bodyTpl=r.first)}},viewQuery:function(i,n){if(i&1&&tt(rs,7,Yt),i&2){let s;ie(s=ne())&&(n._vcr=s.first)}},hostAttrs:[1,"accordion-body"],attrs:as,ngContentSelectors:gi,decls:3,vars:0,consts:[["container",""]],template:function(i,n){i&1&&(Ct(),Pn(0,null,0),Mt(2))},encapsulation:2})}}return t})(),rr=(()=>{class t{constructor(){this.item=c(vi),this.ngbCollapse=c(to)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(i,n){i&2&&(Me("id",n.item.collapseId),Ne("aria-labelledby",n.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[Cn([to])]})}}return t})();var ih=(()=>{class t{constructor(){this.item=c(vi)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(i,n){i&2&&U("collapsed",n.item.collapsed)}})}}return t})(),vi=(()=>{class t{constructor(){this._accordion=c(ar),this._cd=c(We),this._destroyRef=c(He),this._collapsed=!0,this._id=`ngb-accordion-item-${sr++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new S,this.shown=new S,this.hide=new S,this.hidden=new S}set id(e){Dt(e)&&e!==""&&(this._id=e)}set destroyOnHide(e){this._destroyOnHide=e}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(e){e?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:e}=this._collapse;e.animation=!1,e.collapsed=this.collapsed,e.animation=this._accordion.animation,e.hidden.pipe(it(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id),this._cd.markForCheck()}),e.shown.pipe(it(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id),this._cd.markForCheck()})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordionItem",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,rr,7),i&2){let r;ie(r=ne())&&(n._collapse=r.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(i,n){i&2&&Me("id",n.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]})}}return t})(),ar=(()=>{class t{constructor(){this._config=c(Qs),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new S,this.shown=new S,this.hide=new S,this.hidden=new S}toggle(e){this._getItem(e)?.toggle()}expand(e){this._getItem(e)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(e=>!e.collapsed)||this._items.first.expand():this._items.forEach(e=>e.expand()))}collapse(e){this._getItem(e)?.collapse()}collapseAll(){this._items?.forEach(e=>e.collapse())}isExpanded(e){let i=this._getItem(e);return i?!i.collapsed:!1}_ensureCanExpand(e){return this.closeOthers?this._items?(this._items.find(i=>!i.collapsed&&e!==i)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(e){return this._items?.find(i=>i.id===e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["","ngbAccordion",""]],contentQueries:function(i,n,s){if(i&1&&Re(s,vi,4),i&2){let r;ie(r=ne())&&(n._items=r)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]})}}return t})();var re=class t{static from(o){return o instanceof t?o:o?new t(o.year,o.month,o.day):null}constructor(o,e,i){this.year=q(o)?o:null,this.month=q(e)?e:null,this.day=q(i)?i:null}equals(o){return o!=null&&this.year===o.year&&this.month===o.month&&this.day===o.day}before(o){return o?this.year===o.year?this.month===o.month?this.day===o.day?!1:this.dayo.day:this.month>o.month:this.year>o.year:!1}};function io(t){return new re(t.getFullYear(),t.getMonth()+1,t.getDate())}function ci(t){let o=new Date(t.year,t.month-1,t.day,12);return isNaN(o.getTime())||o.setFullYear(t.year),o}function lr(){return new cr}var bi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>lr(),providedIn:"root"})}}return t})(),cr=(()=>{class t extends bi{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,i="d",n=1){let s=ci(e),r=!0,a=s.getMonth();switch(i){case"y":s.setFullYear(s.getFullYear()+n);break;case"m":a+=n,s.setMonth(a),a=a%12,a<0&&(a=a+12);break;case"d":s.setDate(s.getDate()+n),r=!1;break;default:return e}return r&&s.getMonth()!==a&&s.setDate(0),io(s)}getPrev(e,i="d",n=1){return this.getNext(e,i,-n)}getWeekday(e){let n=ci(e).getDay();return n===0?7:n}getWeekNumber(e,i){i===7&&(i=0);let n=(11-i)%7,s=e[n],r=ci(s);r.setDate(r.getDate()+4-(r.getDay()||7));let a=r.getTime();return r.setMonth(0),r.setDate(1),Math.floor(Math.round((a-r.getTime())/864e5)/7)+1}getToday(){return io(new Date)}isValid(e){if(!e||!q(e.year)||!q(e.month)||!q(e.day)||e.year===0)return!1;let i=ci(e);return!isNaN(i.getTime())&&i.getFullYear()===e.year&&i.getMonth()+1===e.month&&i.getDate()===e.day}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})();function wt(t,o){return!dr(t,o)}function uo(t,o){return!t&&!o?!1:!t||!o?!0:t.year!==o.year||t.month!==o.month}function dr(t,o){return!t&&!o||!!t&&!!o&&t.equals(o)}function ur(t,o){if(o&&t&&o.before(t))throw new Error(`'maxDate' ${o} should be greater than 'minDate' ${t}`)}function di(t,o,e){return t&&o&&t.before(o)?o:t&&e&&t.after(e)?e:t||null}function en(t,o){let{minDate:e,maxDate:i,disabled:n,markDisabled:s}=o;return!(t==null||n||s&&s(t,{year:t.year,month:t.month})||e&&t.before(e)||i&&t.after(i))}function hr(t,o,e,i){if(!o)return[];let n=t.getMonths(o.year);if(e&&o.year===e.year){let s=n.findIndex(r=>r===e.month);n=n.slice(s)}if(i&&o.year===i.year){let s=n.findIndex(r=>r===i.month);n=n.slice(0,s+1)}return n}function pr(t,o,e){if(!t)return[];let i=o?Math.max(o.year,t.year-500):t.year-10,s=(e?Math.min(e.year,t.year+500):t.year+10)-i+1,r=Array(s);for(let a=0;a{let f=Object.assign(t.getNext(o,"m",u),{day:1});if(r[u]=null,!n){let p=a.findIndex(h=>h.firstDate.equals(f));p!==-1&&(r[u]=a.splice(p,1)[0])}return f}).forEach((d,u)=>{r[u]===null&&(r[u]=mr(t,d,e,i,a.shift()||{}))}),r}function mr(t,o,e,i,n={}){let{dayTemplateData:s,minDate:r,maxDate:a,firstDayOfWeek:l,markDisabled:d,outsideDays:u,weekdayWidth:f,weekdaysVisible:p}=e,h=t.getToday();n.firstDate=null,n.lastDate=null,n.number=o.month,n.year=o.year,n.weeks=n.weeks||[],n.weekdays=n.weekdays||[],o=vr(t,o,l),p||(n.weekdays.length=0);for(let _=0;_w.date),l),v.collapsed=u==="collapsed"&&g[0].date.month!==n.number&&g[g.length-1].date.month!==n.number}return n}function vr(t,o,e){let i=t.getDaysPerWeek(),n=new re(o.year,o.month,1),s=t.getWeekday(n)%i;return t.getPrev(n,"d",(i+s-e)%i)}var ut=(()=>{class t{getMonthLabel(e){return`${this.getMonthFullName(e.month,e.year)} ${this.getYearNumerals(e.year)}`}getDayNumerals(e){return`${e.day}`}getWeekNumerals(e){return`${e}`}getYearNumerals(e){return`${e}`}getWeekLabel(){return""}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>new br,providedIn:"root"})}}return t})(),br=(()=>{class t extends ut{constructor(){super(...arguments),this._locale=c(kn),this._monthsShort=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"short",timeZone:"UTC"}).format(Date.UTC(2e3,e))),this._monthsFull=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"long",timeZone:"UTC"}).format(Date.UTC(2e3,e)))}getWeekdayLabel(e,i="narrow"){return[1,2,3,4,5,6,7].map(s=>Intl.DateTimeFormat(this._locale,{weekday:i,timeZone:"UTC"}).format(Date.UTC(2e3,4,s)))[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){let i=new Date(e.year,e.month-1,e.day);return Fn(i,"fullDate",this._locale)}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),tn=(()=>{class t{constructor(){this._VALIDATORS={dayTemplateData:e=>{if(this._state.dayTemplateData!==e)return{dayTemplateData:e}},displayMonths:e=>{if(e=ye(e),q(e)&&e>0&&this._state.displayMonths!==e)return{displayMonths:e}},disabled:e=>{if(this._state.disabled!==e)return{disabled:e}},firstDayOfWeek:e=>{if(e=ye(e),q(e)&&e>=0&&this._state.firstDayOfWeek!==e)return{firstDayOfWeek:e}},focusVisible:e=>{if(this._state.focusVisible!==e&&!this._state.disabled)return{focusVisible:e}},markDisabled:e=>{if(this._state.markDisabled!==e)return{markDisabled:e}},maxDate:e=>{let i=this.toValidDate(e,null);if(wt(this._state.maxDate,i))return{maxDate:i}},minDate:e=>{let i=this.toValidDate(e,null);if(wt(this._state.minDate,i))return{minDate:i}},navigation:e=>{if(this._state.navigation!==e)return{navigation:e}},outsideDays:e=>{if(this._state.outsideDays!==e)return{outsideDays:e}},weekdays:e=>{let i=e===!0||e===!1?"narrow":e,n=e===!0||e===!1?e:!0;if(this._state.weekdayWidth!==i||this._state.weekdaysVisible!==n)return{weekdayWidth:i,weekdaysVisible:n}}},this._calendar=c(bi),this._i18n=c(ut),this._model$=new j,this._dateSelect$=new j,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:"narrow",weekdaysVisible:!0}}get model$(){return this._model$.pipe(we(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(we(e=>e!==null))}set(e){let i=Object.keys(e).map(n=>this._VALIDATORS[n](e[n])).reduce((n,s)=>Je(Je({},n),s),{});Object.keys(i).length>0&&this._nextState(i)}focus(e){let i=this.toValidDate(e,null);i!=null&&!this._state.disabled&&wt(this._state.focusDate,i)&&this._nextState({focusDate:e})}focusSelect(){en(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){let i=this.toValidDate(e,this._calendar.getToday());i!=null&&!this._state.disabled&&(!this._state.firstDate||uo(this._state.firstDate,i))&&this._nextState({firstDate:i})}select(e,i={}){let n=this.toValidDate(e,null);n!=null&&!this._state.disabled&&(wt(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),i.emitEvent&&en(n,this._state)&&this._dateSelect$.next(n))}toValidDate(e,i){let n=re.from(e);return i===void 0&&(i=this._calendar.getToday()),this._calendar.isValid(n)?n:i}getMonth(e){for(let i of this._state.months)if(e.month===i.number&&e.year===i.year)return i;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){let i=this._updateState(e);this._patchContexts(i),this._state=i,this._model$.next(this._state)}_patchContexts(e){let{months:i,displayMonths:n,selectedDate:s,focusDate:r,focusVisible:a,disabled:l,outsideDays:d}=e;e.months.forEach(u=>{u.weeks.forEach(f=>{f.days.forEach(p=>{r&&(p.context.focused=r.equals(p.date)&&a),p.tabindex=!l&&r&&p.date.equals(r)&&r.month===u.number?0:-1,l===!0&&(p.context.disabled=!0),s!==void 0&&(p.context.selected=s!==null&&s.equals(p.date)),u.number!==p.date.month&&(p.hidden=d==="hidden"||d==="collapsed"||n>1&&p.date.after(i[0].firstDate)&&p.date.before(i[n-1].lastDate))})})})}_updateState(e){let i=Object.assign({},this._state,e),n=i.firstDate;if(("minDate"in e||"maxDate"in e)&&(ur(i.minDate,i.maxDate),i.focusDate=di(i.focusDate,i.minDate,i.maxDate),i.firstDate=di(i.firstDate,i.minDate,i.maxDate),n=i.focusDate),"disabled"in e&&(i.focusVisible=!1),"selectedDate"in e&&this._state.months.length===0&&(n=i.selectedDate),"focusVisible"in e||"focusDate"in e&&(i.focusDate=di(i.focusDate,i.minDate,i.maxDate),n=i.focusDate,i.months.length!==0&&i.focusDate&&!i.focusDate.before(i.firstDate)&&!i.focusDate.after(i.lastDate)))return i;if("firstDate"in e&&(i.firstDate=di(i.firstDate,i.minDate,i.maxDate),n=i.firstDate),n){let s="dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e||"weekdaysVisible"in e,r=gr(this._calendar,n,i,this._i18n,s);i.months=r,i.firstDate=r[0].firstDate,i.lastDate=r[r.length-1].lastDate,"selectedDate"in e&&!en(i.selectedDate,i)&&(i.selectedDate=null),"firstDate"in e&&(!i.focusDate||i.focusDate.before(i.firstDate)||i.focusDate.after(i.lastDate))&&(i.focusDate=n);let a=!this._state.firstDate||this._state.firstDate.year!==i.firstDate.year,l=!this._state.firstDate||this._state.firstDate.month!==i.firstDate.month;i.navigation==="select"?(("minDate"in e||"maxDate"in e||i.selectBoxes.years.length===0||a)&&(i.selectBoxes.years=pr(i.firstDate,i.minDate,i.maxDate)),("minDate"in e||"maxDate"in e||i.selectBoxes.months.length===0||a)&&(i.selectBoxes.months=hr(this._calendar,i.firstDate,i.minDate,i.maxDate))):i.selectBoxes={years:[],months:[]},(i.navigation==="arrows"||i.navigation==="select")&&(l||a||"minDate"in e||"maxDate"in e||"disabled"in e)&&(i.prevDisabled=i.disabled||_r(this._calendar,i.firstDate,i.minDate),i.nextDisabled=i.disabled||fr(this._calendar,i.lastDate,i.maxDate))}return i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),pi=function(t){return t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT",t}(pi||{}),rn=(()=>{class t{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays="narrow"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function yr(){return new wr}var yi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:()=>yr(),providedIn:"root"})}}return t})(),wr=(()=>{class t extends yi{fromModel(e){return e&&q(e.year)&&q(e.month)&&q(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&q(e.year)&&q(e.month)&&q(e.day)?{year:e.year,month:e.month,day:e.day}:null}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})()}static{this.\u0275prov=N({token:t,factory:t.\u0275fac})}}return t})(),Dr=(()=>{class t{processKey(e,i){let{state:n,calendar:s}=i;switch(e.key){case"PageUp":i.focusDate(s.getPrev(n.focusedDate,e.shiftKey?"y":"m",1));break;case"PageDown":i.focusDate(s.getNext(n.focusedDate,e.shiftKey?"y":"m",1));break;case"End":i.focusDate(e.shiftKey?n.maxDate:n.lastDate);break;case"Home":i.focusDate(e.shiftKey?n.minDate:n.firstDate);break;case"ArrowLeft":i.focusDate(s.getPrev(n.focusedDate,"d",1));break;case"ArrowUp":i.focusDate(s.getPrev(n.focusedDate,"d",s.getDaysPerWeek()));break;case"ArrowRight":i.focusDate(s.getNext(n.focusedDate,"d",1));break;case"ArrowDown":i.focusDate(s.getNext(n.focusedDate,"d",s.getDaysPerWeek()));break;case"Enter":case" ":i.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Tr=(()=>{class t{constructor(){this.i18n=c(ut)}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(i,n){i&2&&U("bg-primary",n.selected)("text-white",n.selected)("text-muted",n.isMuted())("outside",n.isMuted())("active",n.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},attrs:ls,decls:1,vars:1,template:function(i,n){i&1&&de(0),i&2&&Oe(n.i18n.getDayNumerals(n.date))},styles:[`[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-tertiary-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5} `],encapsulation:2,changeDetection:0})}}return t})(),Er=(()=>{class t{constructor(){this._month=-1,this._year=-1,this.i18n=c(ut),this.select=new S}changeMonth(e){this.select.emit(new re(this.date.year,ye(e),1))}changeYear(e){this.select.emit(new re(ye(e),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this.monthSelect.nativeElement.value=`${this._month}`),this.date.year!==this._year&&(this._year=this.date.year,this.yearSelect.nativeElement.value=`${this._year}`))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(i,n){if(i&1&&(tt(cs,7,X),tt(ds,7,X)),i&2){let s;ie(s=ne())&&(n.monthSelect=s.first),ie(s=ne())&&(n.yearSelect=s.first)}},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},decls:8,vars:2,consts:()=>{let e;e=$localize`:@@ngb.datepicker.select-month:Select month`;let i;i=$localize`:@@ngb.datepicker.select-month:Select month`;let n;n=$localize`:@@ngb.datepicker.select-year:Select year`;let s;return s=$localize`:@@ngb.datepicker.select-year:Select year`,[["month",""],["year",""],["aria-label",e,"title",i,1,"form-select",3,"change","disabled"],[3,"value"],["aria-label",n,"title",s,1,"form-select",3,"change","disabled"]]},template:function(i,n){if(i&1){let s=et();O(0,"select",2,0),ee("change",function(a){return De(s),Te(n.changeMonth(a.target.value))}),Ee(2,us,2,3,"option",3,Xe),C(),O(4,"select",4,1),ee("change",function(a){return De(s),Te(n.changeYear(a.target.value))}),Ee(6,hs,2,2,"option",3,Xe),C()}i&2&&(I("disabled",n.disabled),y(2),Se(n.months),y(2),I("disabled",n.disabled),y(2),Se(n.years))},styles:[`ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important} `],encapsulation:2,changeDetection:0})}}return t})(),Sr=(()=>{class t{constructor(){this.navigation=pi,this.i18n=c(ut),this.months=[],this.navigate=new S,this.select=new S}onClickPrev(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["ngb-datepicker-navigation"]],inputs:{date:"date",disabled:"disabled",months:"months",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},decls:8,vars:4,consts:()=>{let e;e=$localize`:@@ngb.datepicker.previous-month:Previous month`;let i;i=$localize`:@@ngb.datepicker.previous-month:Previous month`;let n;n=$localize`:@@ngb.datepicker.next-month:Next month`;let s;return s=$localize`:@@ngb.datepicker.next-month:Next month`,[[1,"ngb-dp-arrow","ngb-dp-arrow-prev"],["type","button","aria-label",e,"title",i,1,"btn","btn-link","ngb-dp-arrow-btn",3,"click","disabled"],[1,"ngb-dp-navigation-chevron"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years"],[1,"ngb-dp-arrow","ngb-dp-arrow-next"],["type","button","aria-label",n,"title",s,1,"btn","btn-link","ngb-dp-arrow-btn",3,"click","disabled"],[1,"ngb-dp-navigation-select",3,"select","date","disabled","months","years"],[1,"ngb-dp-arrow"],[1,"ngb-dp-month-name"]]},template:function(i,n){i&1&&(O(0,"div",0)(1,"button",1),ee("click",function(r){return n.onClickPrev(r)}),Ce(2,"span",2),C()(),x(3,ps,1,4,"ngb-datepicker-navigation-select",3)(4,ms,2,0),O(5,"div",4)(6,"button",5),ee("click",function(r){return n.onClickNext(r)}),Ce(7,"span",2),C()()),i&2&&(y(),I("disabled",n.prevDisabled),y(2),se(n.showSelect?3:-1),y(),se(n.showSelect?-1:4),y(2),I("disabled",n.nextDisabled))},dependencies:[Er],styles:[`ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow-next{justify-content:flex-end}.ngb-dp-arrow-next .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem} `],encapsulation:2,changeDetection:0})}}return t})(),Or=(()=>{class t{constructor(){this.templateRef=c(_t)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=K({type:t,selectors:[["ng-template","ngbDatepickerContent",""]]})}}return t})(),Nr=(()=>{class t{constructor(){this._keyboardService=c(Dr),this._service=c(tn),this.i18n=c(ut),this.datepicker=c(ho)}set month(e){this.viewModel=this._service.getMonth(e)}onKeyDown(e){this._keyboardService.processKey(e,this.datepicker)}doSelect(e){!e.context.disabled&&!e.hidden&&this.datepicker.onDateSelect(e.date)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=le({type:t,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(i,n){i&1&&ee("keydown",function(r){return n.onKeyDown(r)})},inputs:{month:"month"},decls:3,vars:1,consts:[["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],[1,"ngb-dp-weekday","ngb-dp-showweek","small"],["role","columnheader",1,"ngb-dp-weekday","small"],["role","row",1,"ngb-dp-week"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"disabled","tabindex","hidden","ngb-dp-today"],["role","gridcell",1,"ngb-dp-day",3,"click","tabindex"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,n){i&1&&(x(0,ys,4,1,"div",0),Ee(1,Os,1,1,null,null,Xe)),i&2&&(se(n.viewModel.weekdays.length>0?0:-1),y(),Se(n.viewModel.weeks))},dependencies:[At],styles:[`ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-tertiary-bg)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1} diff --git a/public/apps/webapp-schulverwaltung/chunk-2UDOWYE6.js b/public/apps/webapp-schulverwaltung/chunk-XAZECV42.js similarity index 88% rename from public/apps/webapp-schulverwaltung/chunk-2UDOWYE6.js rename to public/apps/webapp-schulverwaltung/chunk-XAZECV42.js index 86ec2bda..19afe08c 100644 --- a/public/apps/webapp-schulverwaltung/chunk-2UDOWYE6.js +++ b/public/apps/webapp-schulverwaltung/chunk-XAZECV42.js @@ -1 +1 @@ -import{Nb as s,Nd as g,Qd as u,X as o,_ as r}from"./chunk-34ZOBT6Z.js";var i=["de-CH","fr-CH"],n=i[0];function f(){return[{provide:s,useFactory:t=>t.detectLanguage(),deps:[c]}]}var c=(()=>{class t{constructor(e,a){this.translate=e,this.storage=a}initialize(){this.translate.setDefaultLang(n),this.translate.use(this.detectLanguage())}detectLanguage(){return this.detectedLanguage||(this.detectedLanguage=this.getDocumentLanguage()||this.getStoredLanguage()||this.getBrowserLanguage()||n),this.detectedLanguage}getLocalizedLanguage(e){return e=i.find(a=>a===`${(e||"").toLowerCase()}-CH`),e||n}getDocumentLanguage(){let e=document.querySelector("[lang]");return this.normalizeLanguage(e&&e.lang)}getStoredLanguage(){return this.normalizeLanguage(this.storage.getLanguage())}getBrowserLanguage(){return this.normalizeLanguage(this.translate.getBrowserLang())}normalizeLanguage(e){return e=(e||"").split("-")[0],e&&i.find(a=>e===a.split("-")[0])||null}static{this.\u0275fac=function(a){return new(a||t)(r(g),r(u))}}static{this.\u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{f as a,c as b}; +import{Ob as s,Od as g,Rd as u,X as o,_ as r}from"./chunk-2W7IS4PN.js";var i=["de-CH","fr-CH"],n=i[0];function f(){return[{provide:s,useFactory:t=>t.detectLanguage(),deps:[c]}]}var c=(()=>{class t{constructor(e,a){this.translate=e,this.storage=a}initialize(){this.translate.setDefaultLang(n),this.translate.use(this.detectLanguage())}detectLanguage(){return this.detectedLanguage||(this.detectedLanguage=this.getDocumentLanguage()||this.getStoredLanguage()||this.getBrowserLanguage()||n),this.detectedLanguage}getLocalizedLanguage(e){return e=i.find(a=>a===`${(e||"").toLowerCase()}-CH`),e||n}getDocumentLanguage(){let e=document.querySelector("[lang]");return this.normalizeLanguage(e&&e.lang)}getStoredLanguage(){return this.normalizeLanguage(this.storage.getLanguage())}getBrowserLanguage(){return this.normalizeLanguage(this.translate.getBrowserLang())}normalizeLanguage(e){return e=(e||"").split("-")[0],e&&i.find(a=>e===a.split("-")[0])||null}static{this.\u0275fac=function(a){return new(a||t)(r(g),r(u))}}static{this.\u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{f as a,c as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-UFRLS5GG.js b/public/apps/webapp-schulverwaltung/chunk-Z4YBXGVO.js similarity index 88% rename from public/apps/webapp-schulverwaltung/chunk-UFRLS5GG.js rename to public/apps/webapp-schulverwaltung/chunk-Z4YBXGVO.js index 54751227..68b78b3d 100644 --- a/public/apps/webapp-schulverwaltung/chunk-UFRLS5GG.js +++ b/public/apps/webapp-schulverwaltung/chunk-Z4YBXGVO.js @@ -1 +1 @@ -import{c as N}from"./chunk-DZUR7EKU.js";import{b as F}from"./chunk-2UDOWYE6.js";import{a as j}from"./chunk-5NJNJ42P.js";import{$c as $,Gc as r,Hc as n,Ia as S,Ic as v,Kd as D,Ld as c,Mc as s,Nc as L,P as a,Pc as E,Tc as i,Uc as l,Wc as p,X as R,Zc as m,_ as I,a as b,bd as x,gc as A,kc as T,n as y,xa as C}from"./chunk-34ZOBT6Z.js";var z=(()=>{class o{constructor(t){this.i18n=t}transform(t,e){switch(this.i18n.detectLanguage()){case"fr-CH":return Array.from(e).map(d=>t=t.replace(d," ".concat(d))),t;default:return t}}static{this.\u0275fac=function(e){return new(e||o)(C(F,16))}}static{this.\u0275pipe=S({name:"addSpace",type:o,pure:!0})}}return o})();var H=s({Id:n,JobTrainer:i(n),ApprenticeshipManagerId:n,ContractDateFrom:i(m),ContractDateTo:i(m)}),X=s({Id:n,StudentId:n,CompanyName:l(r),CompanyNameAddition:l(r)});var k=s({Id:n,RepresentativeId:n,RepresentativeAfterMajority:v});var B=s({Id:n}),G=L({HRef:i(r)}),J=L({From:m,To:m,EventNumber:r,EventDesignation:r,Designation:i(r)}),P=E([B,G,J]),M=s({Id:r,LessonRef:P,StudentRef:p,TypeRef:p,Type:i(r),ConfirmationState:i(r),ConfirmationStateId:n,Comment:i(r),StudentFullName:r,RegistrationId:n,HRef:r});var U=s({Id:r,LessonRef:p,StudentRef:p,TypeRef:p,Type:i(r),Comment:i(r),StudentFullName:r,HRef:r});var w=s({LessonRef:p,StudentRef:p,TypeRef:p,Comment:i(r),StudentFullName:r,Type:i(r),RegistrationId:n,HRef:r});var O=s({Id:n,From:m,To:m,EventId:n,EventNumber:r,EventDesignation:r,EventLocation:i(r),EventManagerInformation:l(r)});var u=class extends j{constructor(f,t,e,h,d,K="Id"){super(f,t,e,h),this.labelAttr=d,this.keyAttr=K,this.typeaheadCodec=s($(this.codec.props,[this.keyAttr,this.labelAttr]))}getTypeaheadItems(f,t){let e={params:{fields:[this.keyAttr,this.labelAttr].join(","),[`filter.${this.labelAttr}`]:`~*${f}*`}};return this.http.get(`${this.baseUrl}/`,t?this.mergeHttpParams(e,t):e).pipe(a(c(this.typeaheadCodec)),y(h=>h.map(d=>({Key:d[this.keyAttr],Value:d[this.labelAttr]}))))}getTypeaheadItemByKey(f){return this.http.get(`${this.baseUrl}/${f}`,{params:{fields:[this.keyAttr,this.labelAttr].join(",")}}).pipe(a(D(this.typeaheadCodec)),y(t=>({Key:t[this.keyAttr],Value:t[this.labelAttr]})))}mergeHttpParams(f,t){let e={params:b(b({},f.params),t.params)};return t.params.fields&&(e.params.fields=f.params.fields.concat(",",t.params.fields)),e}};var vt=(()=>{class o extends u{constructor(t,e){super(t,e,N,"Students","FullName")}getLegalRepresentatives(t,e){return this.http.get(`${this.baseUrl}/${t}/LegalRepresentatives`,{params:e}).pipe(a(c(k)))}getCurrentApprenticeshipContracts(t,e){return this.http.get(`${this.baseUrl}/${t}/ApprenticeshipContracts/Current`,e).pipe(a(c(H)))}getLessonAbsences(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonAbsences`,{params:e}).pipe(a(c(M)))}getLessonIncidents(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonIncidents`,{params:e}).pipe(a(c(w)))}getLessonDispensations(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonDispensations`,{params:e}).pipe(a(c(U)))}getTimetableEntries(t,e={}){return e instanceof A||(e=new A({fromObject:e})),e=e.set("fields","Id,From,To,EventId,EventNumber,EventDesignation,EventLocation,EventManagerInformation"),this.http.get(`${this.baseUrl}/${t}/TimetableEntries/CurrentSemester`,{params:e}).pipe(a(c(O)))}static{this.\u0275fac=function(e){return new(e||o)(I(T),I(x))}}static{this.\u0275prov=R({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{H as a,X as b,M as c,O as d,u as e,vt as f,z as g}; +import{c as N}from"./chunk-3L4RH6QP.js";import{b as F}from"./chunk-XAZECV42.js";import{a as j}from"./chunk-PSYDBHTH.js";import{Hc as r,Ic as n,Ja as S,Jc as v,Ld as D,Md as c,Nc as s,Oc as L,P as a,Qc as E,Uc as i,Vc as l,X as R,Xc as p,_ as I,_c as m,a as b,ad as $,cd as x,hc as A,lc as T,n as y,ya as C}from"./chunk-2W7IS4PN.js";var z=(()=>{class o{constructor(t){this.i18n=t}transform(t,e){switch(this.i18n.detectLanguage()){case"fr-CH":return Array.from(e).map(d=>t=t.replace(d," ".concat(d))),t;default:return t}}static{this.\u0275fac=function(e){return new(e||o)(C(F,16))}}static{this.\u0275pipe=S({name:"addSpace",type:o,pure:!0})}}return o})();var H=s({Id:n,JobTrainer:i(n),ApprenticeshipManagerId:n,ContractDateFrom:i(m),ContractDateTo:i(m)}),X=s({Id:n,StudentId:n,CompanyName:l(r),CompanyNameAddition:l(r)});var k=s({Id:n,RepresentativeId:n,RepresentativeAfterMajority:v});var B=s({Id:n}),G=L({HRef:i(r)}),J=L({From:m,To:m,EventNumber:r,EventDesignation:r,Designation:i(r)}),P=E([B,G,J]),M=s({Id:r,LessonRef:P,StudentRef:p,TypeRef:p,Type:i(r),ConfirmationState:i(r),ConfirmationStateId:n,Comment:i(r),StudentFullName:r,RegistrationId:n,HRef:r});var U=s({Id:r,LessonRef:p,StudentRef:p,TypeRef:p,Type:i(r),Comment:i(r),StudentFullName:r,HRef:r});var w=s({LessonRef:p,StudentRef:p,TypeRef:p,Comment:i(r),StudentFullName:r,Type:i(r),RegistrationId:n,HRef:r});var O=s({Id:n,From:m,To:m,EventId:n,EventNumber:r,EventDesignation:r,EventLocation:i(r),EventManagerInformation:l(r)});var u=class extends j{constructor(f,t,e,h,d,K="Id"){super(f,t,e,h),this.labelAttr=d,this.keyAttr=K,this.typeaheadCodec=s($(this.codec.props,[this.keyAttr,this.labelAttr]))}getTypeaheadItems(f,t){let e={params:{fields:[this.keyAttr,this.labelAttr].join(","),[`filter.${this.labelAttr}`]:`~*${f}*`}};return this.http.get(`${this.baseUrl}/`,t?this.mergeHttpParams(e,t):e).pipe(a(c(this.typeaheadCodec)),y(h=>h.map(d=>({Key:d[this.keyAttr],Value:d[this.labelAttr]}))))}getTypeaheadItemByKey(f){return this.http.get(`${this.baseUrl}/${f}`,{params:{fields:[this.keyAttr,this.labelAttr].join(",")}}).pipe(a(D(this.typeaheadCodec)),y(t=>({Key:t[this.keyAttr],Value:t[this.labelAttr]})))}mergeHttpParams(f,t){let e={params:b(b({},f.params),t.params)};return t.params.fields&&(e.params.fields=f.params.fields.concat(",",t.params.fields)),e}};var vt=(()=>{class o extends u{constructor(t,e){super(t,e,N,"Students","FullName")}getLegalRepresentatives(t,e){return this.http.get(`${this.baseUrl}/${t}/LegalRepresentatives`,{params:e}).pipe(a(c(k)))}getCurrentApprenticeshipContracts(t,e){return this.http.get(`${this.baseUrl}/${t}/ApprenticeshipContracts/Current`,e).pipe(a(c(H)))}getLessonAbsences(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonAbsences`,{params:e}).pipe(a(c(M)))}getLessonIncidents(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonIncidents`,{params:e}).pipe(a(c(w)))}getLessonDispensations(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonDispensations`,{params:e}).pipe(a(c(U)))}getTimetableEntries(t,e={}){return e instanceof A||(e=new A({fromObject:e})),e=e.set("fields","Id,From,To,EventId,EventNumber,EventDesignation,EventLocation,EventManagerInformation"),this.http.get(`${this.baseUrl}/${t}/TimetableEntries/CurrentSemester`,{params:e}).pipe(a(c(O)))}static{this.\u0275fac=function(e){return new(e||o)(I(T),I(x))}}static{this.\u0275prov=R({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{H as a,X as b,M as c,O as d,u as e,vt as f,z as g}; diff --git a/public/apps/webapp-schulverwaltung/doc/reactivity.md b/public/apps/webapp-schulverwaltung/doc/reactivity.md new file mode 100644 index 00000000..b2196fed --- /dev/null +++ b/public/apps/webapp-schulverwaltung/doc/reactivity.md @@ -0,0 +1,17 @@ +[back](../README.md) + +# Reactivity + +Previously the go-to tool for reactivity has been RxJS and observables. With Angular 17 a new reactive building block has been introduced: signals. With this change Angular is shifting towards signal-based APIs and patterns. But as of 2025 this is still "work in progress" and there are dos and don'ts to consider: + +- For data fetching, we still use the observable-based `HttpClient` API for now, since with signals a pattern still has to emerge. +- In terms of the ergonomics it is desirable to work with signals in components/templates. They allow to always read the current value (also for `computed`s, no `value$.pipe(take(1)).subscribe(value => ...)`) and it is easy to define derived values with `computed(() => ...)`. +- Observables can be converted to signals using `toSignal`, but there are important things to note: + - `toSignal` is not lazy, it subscribes to the observable (and causes the fetching of the data) no matter if the signal is read or not. The behavior can be compared to a "hot" observable. + - This project includes a custom `toLazySignal` that only subscribes to the observable, when the signal is read. + - Both `toSignal` and `toLazySignal` only unsubscribe when the injector is destroyed (i.e. the component is destroyed), they won't unsubscribe if the component stops using the signal due to a condition (`@if`) in the template. + - Global services with `{ providedIn: "root" }` should not use `toSignal` and `toLazySignal`, since these observables will never get unsubscribed, unless a "hot" observable is the desired behavior. + - Local services (provided in the context of a component or route) should always use `toLazySignal` when data fetching is involved. + - Be aware, that converting signals created with `toLazySignal` back with `toObservable` will cause them to be not lazy anymore. +- `input` and `model` signals are preferred over `@Input` since they allow to integrate in the reactive world nicely (no more `Subject` that is `next`ed in `ngOnChanges`). And also, they allow to mark inputs as `input.required`. +- Function-based `output` is preferred over `@Output`. diff --git a/public/apps/webapp-schulverwaltung/index.html b/public/apps/webapp-schulverwaltung/index.html index 3af0297c..0687488b 100644 --- a/public/apps/webapp-schulverwaltung/index.html +++ b/public/apps/webapp-schulverwaltung/index.html @@ -14,5 +14,5 @@ - + diff --git a/public/apps/webapp-schulverwaltung/main.js b/public/apps/webapp-schulverwaltung/main.js index ffad64fb..32fa8f16 100644 --- a/public/apps/webapp-schulverwaltung/main.js +++ b/public/apps/webapp-schulverwaltung/main.js @@ -1 +1 @@ -import{b as Mn}from"./chunk-4GQ5KKE3.js";import{c as An}from"./chunk-FLVW3H6P.js";import{a as bn,b as wn}from"./chunk-2UDOWYE6.js";import{t as gn}from"./chunk-JHVNIEZK.js";import{a as ge}from"./chunk-LTVWFE76.js";import{$ as H,$a as Zt,Aa as Gt,Ac as mn,B as jt,Bc as fn,Dd as yn,Fa as J,Ib as fe,Jb as pe,Kd as _n,Ma as xt,Md as Sn,Nd as En,Od as Oe,Pa as Ne,Pd as vn,Qd as Tn,Ra as Wt,Ua as Jt,V as v,Va as Yt,Vb as nn,Wa as Xt,X as W,Xa as Ce,Ya as Fe,Z as qt,Za as U,Zb as rt,_ as j,_a as Y,a as Pe,ad as pn,bc as sn,bd as X,c as Bt,da as Ut,db as en,ea as Qt,fb as tn,gb as st,jc as rn,k as Kt,kc as on,lc as an,ma as De,mc as ln,na as Vt,nc as cn,oc as un,qb as re,ra as nt,rb as it,sa as Ht,sb as Re,wa as q,wc as hn,xa as ie,xc as ke,yc as dn}from"./chunk-34ZOBT6Z.js";function _s(s){let e=s,t=Math.floor(Math.abs(s)),n=s.toString().replace(/^[^.]*\.?/,"").length;return t===1&&n===0?1:5}var Pn=["de-CH",[["AM","PM"],void 0,void 0],void 0,[["S","M","D","M","D","F","S"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So","Mo","Di","Mi","Do","Fr","Sa"]],[["S","M","D","M","D","F","S"],["So","Mo","Di","Mi","Do","Fr","Sa"],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["v. Chr.","n. Chr."],void 0,void 0],1,[6,0],["dd.MM.yy","dd.MM.y","d. MMMM y","EEEE, d. MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} 'um' {0}",void 0],[".","\u2019",";","%","+","-","E","\xB7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4\xA0#,##0.00;\xA4-#,##0.00","#E0"],"CHF","CHF","Schweizer Franken",{ATS:["\xF6S"],AUD:["AU$","$"],BGM:["BGK"],BGO:["BGJ"],BYN:[void 0,"\u0440."],CUC:[void 0,"Cub$"],DEM:["DM"],EUR:[],FKP:[void 0,"Fl\xA3"],GHS:[void 0,"\u20B5"],GNF:[void 0,"F.G."],KMF:[void 0,"FC"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],RWF:[void 0,"F.Rw"],SYP:[],THB:["\u0E3F"],TWD:["NT$"],XXX:[],ZMW:[void 0,"K"]},"ltr",_s];function Ss(s){let e=s,t=Math.floor(Math.abs(s)),n=s.toString().replace(/^[^.]*\.?/,"").length,i=parseInt(s.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===0||t===1?1:i===0&&t!==0&&t%1e6===0&&n===0||!(i>=0&&i<=5)?4:5}var Dn=["fr-CH",[["AM","PM"],void 0,void 0],void 0,[["D","L","M","M","J","V","S"],["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],["di","lu","ma","me","je","ve","sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"]],void 0,[["av. J.-C.","ap. J.-C."],void 0,["avant J\xE9sus-Christ","apr\xE8s J\xE9sus-Christ"]],1,[6,0],["dd.MM.yy","d MMM y","d MMMM y","EEEE, d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH.mm:ss 'h' zzzz"],["{1} {0}","{1}, {0}","{1} '\xE0' {0}",void 0],[",","\u202F",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":","."],["#,##0.###","#,##0%","#,##0.00\xA0\xA4","#E0"],"CHF","CHF","franc suisse",{ARS:["$AR","$"],AUD:["$AU","$"],BEF:["FB"],BMD:["$BM","$"],BND:["$BN","$"],BYN:[void 0,"\u0440."],BZD:["$BZ","$"],CAD:["$CA","$"],CLP:["$CL","$"],CNY:[void 0,"\xA5"],COP:["$CO","$"],CYP:["\xA3CY"],EGP:[void 0,"\xA3E"],FJD:["$FJ","$"],FKP:["\xA3FK","\xA3"],FRF:["F"],GBP:["\xA3GB","\xA3"],GIP:["\xA3GI","\xA3"],HKD:[void 0,"$"],IEP:["\xA3IE"],ILP:["\xA3IL"],ITL:["\u20A4IT"],JPY:[void 0,"\xA5"],KMF:[void 0,"FC"],LBP:["\xA3LB","\xA3L"],MTP:["\xA3MT"],MXN:["$MX","$"],NAD:["$NA","$"],NIO:[void 0,"$C"],NZD:["$NZ","$"],PHP:[void 0,"\u20B1"],RHD:["$RH"],RON:[void 0,"L"],RWF:[void 0,"FR"],SBD:["$SB","$"],SGD:["$SG","$"],SRD:["$SR","$"],TOP:[void 0,"$T"],TTD:["$TT","$"],TWD:[void 0,"NT$"],USD:["$US","$"],UYU:["$UY","$"],WST:["$WS"],XCD:[void 0,"$"],XPF:["FCFP"],ZMW:[void 0,"Kw"]},"ltr",Ss];function Es(s,e){if(s&1&&(U(0,"i",3),re(1),Y()),s&2){let t=st().$implicit;q(),it(t.icon)}}function vs(s,e){if(s&1){let t=en();U(0,"ngb-toast",1),tn("hidden",function(){let i=Ut(t).$implicit,r=st();return Qt(r.toastService.remove(i))}),U(1,"div",2),xt(2,Es,2,1,"i",3),U(3,"span"),re(4),Y()()()}if(s&2){let t=e.$implicit;Wt(t.classname),Ne("header",t.header||"")("autohide",!0),q(2),Jt(t.icon?2:-1),q(2),it(t.message)}}var Cn=(()=>{class s{constructor(t){this.toastService=t}static{this.\u0275fac=function(n){return new(n||s)(ie(ge))}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-toast"]],decls:3,vars:2,consts:[[3,"header","class","autohide"],[3,"hidden","header","autohide"],[1,"d-flex","gap-2"],[1,"material-icons"]],template:function(n,i){n&1&&(Ce(0,vs,5,6,"ngb-toast",0,Xt),fe(2,"async")),n&2&&Fe(pe(2,0,i.toastService.toasts$))},dependencies:[gn,sn],styles:["[_nghost-%COMP%]{position:fixed;top:0;right:0;margin:.5em;z-index:1200}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{font-size:medium}"]})}}return s})();var Fn=new qt("Navigator API",{providedIn:"root",factory:()=>navigator});var Rn=(()=>{class s{constructor(t,n,i,r){this.toastService=n,this.settings=i,this.navigator=r,t.initialize(),this.checkSettings()}checkSettings(){_n(pn)(this.settings).pipe(jt(t=>(console.error(String(t)),this.toastService.error("Please check the contents of the settings.js file (see Console output for more details).","Invalid Settings"),Kt))).subscribe()}static{this.\u0275fac=function(n){return new(n||s)(ie(wn),ie(ge),ie(X),ie(Fn))}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-app"]],decls:2,vars:0,consts:[["aria-live","polite","aria-atomic","true"]],template:function(n,i){n&1&&Zt(0,"bkd-toast",0)(1,"router-outlet")},dependencies:[Cn,hn],styles:["[_nghost-%COMP%]{width:100%}"],changeDetection:0})}}return s})();var _=function(s){return s[s.State=0]="State",s[s.Transition=1]="Transition",s[s.Sequence=2]="Sequence",s[s.Group=3]="Group",s[s.Animate=4]="Animate",s[s.Keyframes=5]="Keyframes",s[s.Style=6]="Style",s[s.Trigger=7]="Trigger",s[s.Reference=8]="Reference",s[s.AnimateChild=9]="AnimateChild",s[s.AnimateRef=10]="AnimateRef",s[s.Query=11]="Query",s[s.Stagger=12]="Stagger",s}(_||{}),Q="*";function kn(s,e=null){return{type:_.Sequence,steps:s,options:e}}function ot(s){return{type:_.Style,styles:s,offset:null}}var Z=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(e=0,t=0){this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Se=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(e){this.players=e;let t=0,n=0,i=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++n==r&&this._onDestroy()}),o.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let t=e*this.totalTime;this.players.forEach(n=>{let i=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(i)})}getPosition(){let e=this.players.reduce((t,n)=>t===null||n.totalTime>t.totalTime?n:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Ie="!";function On(s){return new v(3e3,!1)}function Ts(){return new v(3100,!1)}function bs(){return new v(3101,!1)}function ws(s){return new v(3001,!1)}function As(s){return new v(3003,!1)}function Ms(s){return new v(3004,!1)}function Ps(s,e){return new v(3005,!1)}function Ds(){return new v(3006,!1)}function Ns(){return new v(3007,!1)}function Cs(s,e){return new v(3008,!1)}function Fs(s){return new v(3002,!1)}function Rs(s,e,t,n,i){return new v(3010,!1)}function ks(){return new v(3011,!1)}function Os(){return new v(3012,!1)}function Is(){return new v(3200,!1)}function Ls(){return new v(3202,!1)}function $s(){return new v(3013,!1)}function zs(s){return new v(3014,!1)}function Bs(s){return new v(3015,!1)}function Ks(s){return new v(3016,!1)}function js(s,e){return new v(3404,!1)}function qs(s){return new v(3502,!1)}function Us(s){return new v(3503,!1)}function Qs(){return new v(3300,!1)}function Vs(s){return new v(3504,!1)}function Hs(s){return new v(3301,!1)}function Gs(s,e){return new v(3302,!1)}function xs(s){return new v(3303,!1)}function Ws(s,e){return new v(3400,!1)}function Js(s){return new v(3401,!1)}function Ys(s){return new v(3402,!1)}function Xs(s,e){return new v(3505,!1)}function ee(s){switch(s.length){case 0:return new Z;case 1:return s[0];default:return new Se(s)}}function xn(s,e,t=new Map,n=new Map){let i=[],r=[],o=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),h=c==o,u=h&&a||new Map;l.forEach((S,y)=>{let m=y,g=S;if(y!=="offset")switch(m=s.normalizePropertyName(m,i),g){case Ie:g=t.get(y);break;case Q:g=n.get(y);break;default:g=s.normalizeStyleValue(y,m,g,i);break}u.set(m,g)}),h||r.push(u),a=u,o=c}),i.length)throw qs(i);return r}function Dt(s,e,t,n){switch(e){case"start":s.onStart(()=>n(t&&at(t,"start",s)));break;case"done":s.onDone(()=>n(t&&at(t,"done",s)));break;case"destroy":s.onDestroy(()=>n(t&&at(t,"destroy",s)));break}}function at(s,e,t){let n=t.totalTime,i=!!t.disabled,r=Nt(s.element,s.triggerName,s.fromState,s.toState,e||s.phaseName,n??s.totalTime,i),o=s._data;return o!=null&&(r._data=o),r}function Nt(s,e,t,n,i="",r=0,o){return{element:s,triggerName:e,fromState:t,toState:n,phaseName:i,totalTime:r,disabled:!!o}}function O(s,e,t){let n=s.get(e);return n||s.set(e,n=t),n}function In(s){let e=s.indexOf(":"),t=s.substring(1,e),n=s.slice(e+1);return[t,n]}var Zs=typeof document>"u"?null:document.documentElement;function Ct(s){let e=s.parentNode||s.host||null;return e===Zs?null:e}function ei(s){return s.substring(1,6)=="ebkit"}var ae=null,Ln=!1;function ti(s){ae||(ae=ni()||{},Ln=ae.style?"WebkitAppearance"in ae.style:!1);let e=!0;return ae.style&&!ei(s)&&(e=s in ae.style,!e&&Ln&&(e="Webkit"+s.charAt(0).toUpperCase()+s.slice(1)in ae.style)),e}function ni(){return typeof document<"u"?document.body:null}function Wn(s,e){for(;e;){if(e===s)return!0;e=Ct(e)}return!1}function Jn(s,e,t){if(t)return Array.from(s.querySelectorAll(e));let n=s.querySelector(e);return n?[n]:[]}var Ft=(()=>{class s{validateStyleProperty(t){return ti(t)}containsElement(t,n){return Wn(t,n)}getParentElement(t){return Ct(t)}query(t,n,i){return Jn(t,n,i)}computeStyle(t,n,i){return i||""}animate(t,n,i,r,o,a=[],l){return new Z(i,r)}static \u0275fac=function(n){return new(n||s)};static \u0275prov=W({token:s,factory:s.\u0275fac})}return s})(),ue=class{static NOOP=new Ft},he=class{};var si=1e3,Yn="{{",ii="}}",Xn="ng-enter",mt="ng-leave",Le="ng-trigger",je=".ng-trigger",$n="ng-animating",ft=".ng-animating";function G(s){if(typeof s=="number")return s;let e=s.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:pt(parseFloat(e[1]),e[2])}function pt(s,e){switch(e){case"s":return s*si;default:return s}}function qe(s,e,t){return s.hasOwnProperty("duration")?s:ri(s,e,t)}function ri(s,e,t){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,r=0,o="";if(typeof s=="string"){let a=s.match(n);if(a===null)return e.push(On(s)),{duration:0,delay:0,easing:""};i=pt(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(r=pt(parseFloat(l),a[4]));let c=a[5];c&&(o=c)}else i=s;if(!t){let a=!1,l=e.length;i<0&&(e.push(Ts()),a=!0),r<0&&(e.push(bs()),a=!0),a&&e.splice(l,0,On(s))}return{duration:i,delay:r,easing:o}}function oi(s){return s.length?s[0]instanceof Map?s:s.map(e=>new Map(Object.entries(e))):[]}function V(s,e,t){e.forEach((n,i)=>{let r=Rt(i);t&&!t.has(i)&&t.set(i,s.style[r]),s.style[r]=n})}function ce(s,e){e.forEach((t,n)=>{let i=Rt(n);s.style[i]=""})}function Ee(s){return Array.isArray(s)?s.length==1?s[0]:kn(s):s}function ai(s,e,t){let n=e.params||{},i=Zn(s);i.length&&i.forEach(r=>{n.hasOwnProperty(r)||t.push(ws(r))})}var gt=new RegExp(`${Yn}\\s*(.+?)\\s*${ii}`,"g");function Zn(s){let e=[];if(typeof s=="string"){let t;for(;t=gt.exec(s);)e.push(t[1]);gt.lastIndex=0}return e}function Te(s,e,t){let n=`${s}`,i=n.replace(gt,(r,o)=>{let a=e[o];return a==null&&(t.push(As(o)),a=""),a.toString()});return i==n?s:i}var li=/-+([a-z0-9])/g;function Rt(s){return s.replace(li,(...e)=>e[1].toUpperCase())}function ci(s,e){return s===0||e===0}function ui(s,e,t){if(t.size&&e.length){let n=e[0],i=[];if(t.forEach((r,o)=>{n.has(o)||i.push(o),n.set(o,r)}),i.length)for(let r=1;ro.set(a,kt(s,a)))}}return e}function k(s,e,t){switch(e.type){case _.Trigger:return s.visitTrigger(e,t);case _.State:return s.visitState(e,t);case _.Transition:return s.visitTransition(e,t);case _.Sequence:return s.visitSequence(e,t);case _.Group:return s.visitGroup(e,t);case _.Animate:return s.visitAnimate(e,t);case _.Keyframes:return s.visitKeyframes(e,t);case _.Style:return s.visitStyle(e,t);case _.Reference:return s.visitReference(e,t);case _.AnimateChild:return s.visitAnimateChild(e,t);case _.AnimateRef:return s.visitAnimateRef(e,t);case _.Query:return s.visitQuery(e,t);case _.Stagger:return s.visitStagger(e,t);default:throw Ms(e.type)}}function kt(s,e){return window.getComputedStyle(s)[e]}var hi=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Ue=class extends he{normalizePropertyName(e,t){return Rt(e)}normalizeStyleValue(e,t,n,i){let r="",o=n.toString().trim();if(hi.has(t)&&n!==0&&n!=="0")if(typeof n=="number")r="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push(Ps(e,n))}return o+r}};var Qe="*";function di(s,e){let t=[];return typeof s=="string"?s.split(/\s*,\s*/).forEach(n=>mi(n,t,e)):t.push(s),t}function mi(s,e,t){if(s[0]==":"){let l=fi(s,t);if(typeof l=="function"){e.push(l);return}s=l}let n=s.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return t.push(Bs(s)),e;let i=n[1],r=n[2],o=n[3];e.push(zn(i,o));let a=i==Qe&&o==Qe;r[0]=="<"&&!a&&e.push(zn(o,i))}function fi(s,e){switch(s){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}var $e=new Set(["true","1"]),ze=new Set(["false","0"]);function zn(s,e){let t=$e.has(s)||ze.has(s),n=$e.has(e)||ze.has(e);return(i,r)=>{let o=s==Qe||s==i,a=e==Qe||e==r;return!o&&t&&typeof i=="boolean"&&(o=i?$e.has(s):ze.has(s)),!a&&n&&typeof r=="boolean"&&(a=r?$e.has(e):ze.has(e)),o&&a}}var es=":self",pi=new RegExp(`s*${es}s*,?`,"g");function ts(s,e,t,n){return new yt(s).build(e,t,n)}var Bn="",yt=class{_driver;constructor(e){this._driver=e}build(e,t,n){let i=new _t(t);return this._resetContextStyleTimingState(i),k(this,Ee(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=Bn,e.collectedStyles=new Map,e.collectedStyles.set(Bn,new Map),e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,i=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(Ds()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==_.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=c}else if(a.type==_.Transition){let l=this.visitTransition(a,t);n+=l.queryCount,i+=l.depCount,o.push(l)}else t.errors.push(Ns())}),{type:_.Trigger,name:e.name,states:r,transitions:o,queryCount:n,depCount:i,options:null}}visitState(e,t){let n=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(n.containsDynamicStyles){let r=new Set,o=i||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{Zn(l).forEach(c=>{o.hasOwnProperty(c)||r.add(c)})})}),r.size&&t.errors.push(Cs(e.name,[...r.values()]))}return{type:_.State,name:e.name,style:n,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let n=k(this,Ee(e.animation),t),i=di(e.expr,t.errors);return{type:_.Transition,matchers:i,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:le(e.options)}}visitSequence(e,t){return{type:_.Sequence,steps:e.steps.map(n=>k(this,n,t)),options:le(e.options)}}visitGroup(e,t){let n=t.currentTime,i=0,r=e.steps.map(o=>{t.currentTime=n;let a=k(this,o,t);return i=Math.max(i,t.currentTime),a});return t.currentTime=i,{type:_.Group,steps:r,options:le(e.options)}}visitAnimate(e,t){let n=Si(e.timings,t.errors);t.currentAnimateTimings=n;let i,r=e.styles?e.styles:ot({});if(r.type==_.Keyframes)i=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};n.easing&&(c.easing=n.easing),o=ot(c)}t.currentTime+=n.duration+n.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,i=l}return t.currentAnimateTimings=null,{type:_.Animate,timings:n,style:i,options:null}}visitStyle(e,t){let n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){let n=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of i)typeof a=="string"?a===Q?n.push(a):t.errors.push(Fs(a)):n.push(new Map(Object.entries(a)));let r=!1,o=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!r)){for(let l of a.values())if(l.toString().indexOf(Yn)>=0){r=!0;break}}}),{type:_.Style,styles:n,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let n=t.currentAnimateTimings,i=t.currentTime,r=t.currentTime;n&&r>0&&(r-=n.duration+n.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),h=c.get(l),u=!0;h&&(r!=i&&r>=h.startTime&&i<=h.endTime&&(t.errors.push(Rs(l,h.startTime,h.endTime,r,i)),u=!1),r=h.startTime),u&&c.set(l,{startTime:r,endTime:i}),t.options&&ai(a,t.options,t.errors)})})}visitKeyframes(e,t){let n={type:_.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(ks()),n;let i=1,r=0,o=[],a=!1,l=!1,c=0,h=e.steps.map(w=>{let A=this._makeStyleAst(w,t),N=A.offset!=null?A.offset:_i(A.styles),P=0;return N!=null&&(r++,P=A.offset=N),l=l||P<0||P>1,a=a||P0&&r{let N=S>0?A==y?1:S*A:o[A],P=N*T;t.currentTime=m+g.delay+P,g.duration=P,this._validateStyleAst(w,t),w.offset=N,n.styles.push(w)}),n}visitReference(e,t){return{type:_.Reference,animation:k(this,Ee(e.animation),t),options:le(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:_.AnimateChild,options:le(e.options)}}visitAnimateRef(e,t){return{type:_.AnimateRef,animation:this.visitReference(e.animation,t),options:le(e.options)}}visitQuery(e,t){let n=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=gi(e.selector);t.currentQuerySelector=n.length?n+" "+r:r,O(t.collectedStyles,t.currentQuerySelector,new Map);let a=k(this,Ee(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:_.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:le(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push($s());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:qe(e.timings,t.errors,!0);return{type:_.Stagger,animation:k(this,Ee(e.animation),t),timings:n,options:null}}};function gi(s){let e=!!s.split(/\s*,\s*/).find(t=>t==es);return e&&(s=s.replace(pi,"")),s=s.replace(/@\*/g,je).replace(/@\w+/g,t=>je+"-"+t.slice(1)).replace(/:animating/g,ft),[s,e]}function yi(s){return s?Pe({},s):null}var _t=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function _i(s){if(typeof s=="string")return null;let e=null;if(Array.isArray(s))s.forEach(t=>{if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(s instanceof Map&&s.has("offset")){let t=s;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function Si(s,e){if(s.hasOwnProperty("duration"))return s;if(typeof s=="number"){let r=qe(s,e).duration;return lt(r,0,"")}let t=s;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=lt(0,0,"");return r.dynamic=!0,r.strValue=t,r}let i=qe(t,e);return lt(i.duration,i.delay,i.easing)}function le(s){return s?(s=Pe({},s),s.params&&(s.params=yi(s.params))):s={},s}function lt(s,e,t){return{duration:s,delay:e,easing:t}}function Ot(s,e,t,n,i,r,o=null,a=!1){return{type:1,element:s,keyframes:e,preStyleProps:t,postStyleProps:n,duration:i,delay:r,totalTime:i+r,easing:o,subTimeline:a}}var be=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},Ei=1,vi=":enter",Ti=new RegExp(vi,"g"),bi=":leave",wi=new RegExp(bi,"g");function ns(s,e,t,n,i,r=new Map,o=new Map,a,l,c=[]){return new St().buildKeyframes(s,e,t,n,i,r,o,a,l,c)}var St=class{buildKeyframes(e,t,n,i,r,o,a,l,c,h=[]){c=c||new be;let u=new Et(e,t,c,i,r,h,[]);u.options=l;let S=l.delay?G(l.delay):0;u.currentTimeline.delayNextStep(S),u.currentTimeline.setStyles([o],null,u.errors,l),k(this,n,u);let y=u.timelines.filter(m=>m.containsAnimation());if(y.length&&a.size){let m;for(let g=y.length-1;g>=0;g--){let T=y[g];if(T.element===t){m=T;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([a],null,u.errors,l)}return y.length?y.map(m=>m.buildKeyframes()):[Ot(t,[],[],[],0,S,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let n=t.subInstructions.get(t.element);if(n){let i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,i,i.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,n),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,n){for(let i of e){let r=i?.delay;if(r){let o=typeof r=="number"?r:G(Te(r,i?.params??{},t.errors));n.delayNextStep(o)}}}_visitSubInstructions(e,t,n){let r=t.currentTimeline.currentTime,o=n.duration!=null?G(n.duration):null,a=n.delay!=null?G(n.delay):null;return o!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,o,a);r=Math.max(r,c.duration+c.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),k(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let n=t.subContextCount,i=t,r=e.options;if(r&&(r.params||r.delay)&&(i=t.createSubContext(r),i.transformIntoNewTimeline(),r.delay!=null)){i.previousNode.type==_.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Ve);let o=G(r.delay);i.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>k(this,o,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let n=[],i=t.currentTimeline.currentTime,r=e.options&&e.options.delay?G(e.options.delay):0;e.steps.forEach(o=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),k(this,o,a),i=Math.max(i,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(i),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let n=e.strValue,i=t.params?Te(n,t.params,t.errors):n;return qe(i,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let n=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),i.snapshotCurrentStyles());let r=e.style;r.type==_.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(n.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let n=t.currentTimeline,i=t.currentAnimateTimings;!i&&n.hasCurrentStyleProperties()&&n.forwardFrame();let r=i&&i.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(r):n.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let n=t.currentAnimateTimings,i=t.currentTimeline.duration,r=n.duration,a=t.createSubContext().currentTimeline;a.easing=n.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*r),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(i+r),t.previousNode=e}visitQuery(e,t){let n=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?G(i.delay):0;r&&(t.previousNode.type===_.Style||n==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Ve);let o=n,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,h)=>{t.currentQueryIndex=h;let u=t.createSubContext(e.options,c);r&&u.delayNextStep(r),c===t.element&&(l=u.currentTimeline),k(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let S=u.currentTimeline.currentTime;o=Math.max(o,S)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let n=t.parentContext,i=t.currentTimeline,r=e.timings,o=Math.abs(r.duration),a=o*(t.currentQueryTotal-1),l=o*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=n.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let u=h.currentTime;k(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)}},Ve={},Et=class s{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Ve;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,n,i,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=r,this.errors=o,this.timelines=a,this.currentTimeline=l||new He(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let n=e,i=this.options;n.duration!=null&&(i.duration=G(n.duration)),n.delay!=null&&(i.delay=G(n.delay));let r=n.params;if(r){let o=i.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=Te(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let n=e.params={};Object.keys(t).forEach(i=>{n[i]=t[i]})}}return e}createSubContext(e=null,t,n){let i=t||this.element,r=new s(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=Ve,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){let i={duration:t??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},r=new vt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,n,i,r,o){let a=[];if(i&&a.push(this.element),e.length>0){e=e.replace(Ti,"."+this._enterClassName),e=e.replace(wi,"."+this._leaveClassName);let l=n!=1,c=this._driver.query(this.element,e,l);n!==0&&(c=n<0?c.slice(c.length+n,c.length):c.slice(0,n)),a.push(...c)}return!r&&a.length==0&&o.push(zs(t)),a}},He=class s{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,n,i){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=i,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new s(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Ei,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||Q),this._currentKeyframe.set(t,Q);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,i){t&&this._previousKeyframe.set("easing",t);let r=i&&i.params||{},o=Ai(e,this._globalTimelineStyles);for(let[a,l]of o){let c=Te(l,r,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Q),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,n)=>{let i=this._styleSummary.get(n);(!i||t.time>i.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,n=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((h,u)=>{h===Ie?e.add(u):h===Q&&t.add(u)}),n||c.set("offset",l/this.duration),i.push(c)});let r=[...e.values()],o=[...t.values()];if(n){let a=i[0],l=new Map(a);a.set("offset",0),l.set("offset",1),i=[a,l]}return Ot(this.element,i,r,o,this.duration,this.startTime,this.easing,!1)}},vt=class extends He{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,n,i,r,o,a=!1){super(e,t,o.delay),this.keyframes=n,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=n+t,a=t/o,l=new Map(e[0]);l.set("offset",0),r.push(l);let c=new Map(e[0]);c.set("offset",Kn(a)),r.push(c);let h=e.length-1;for(let u=1;u<=h;u++){let S=new Map(e[u]),y=S.get("offset"),m=t+y*n;S.set("offset",Kn(m/o)),r.push(S)}n=o,t=0,i="",e=r}return Ot(this.element,e,this.preStyleProps,this.postStyleProps,n,t,i,!0)}};function Kn(s,e=3){let t=Math.pow(10,e-1);return Math.round(s*t)/t}function Ai(s,e){let t=new Map,n;return s.forEach(i=>{if(i==="*"){n??=e.keys();for(let r of n)t.set(r,Q)}else for(let[r,o]of i)t.set(r,o)}),t}function jn(s,e,t,n,i,r,o,a,l,c,h,u,S){return{type:0,element:s,triggerName:e,isRemovalTransition:i,fromState:t,fromStyles:r,toState:n,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:S}}var ct={},Ge=class{_triggerName;ast;_stateStyles;constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,i){return Mi(this.ast.matchers,e,t,n,i)}buildStyles(e,t,n){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(t,n):new Map}build(e,t,n,i,r,o,a,l,c,h){let u=[],S=this.ast.options&&this.ast.options.params||ct,y=a&&a.params||ct,m=this.buildStyles(n,y,u),g=l&&l.params||ct,T=this.buildStyles(i,g,u),w=new Set,A=new Map,N=new Map,P=i==="void",de={params:ss(g,S),delay:this.ast.options?.delay},B=h?[]:ns(e,t,this.ast.animation,r,o,m,T,de,c,u),C=0;return B.forEach(F=>{C=Math.max(F.duration+F.delay,C)}),u.length?jn(t,this._triggerName,n,i,P,m,T,[],[],A,N,C,u):(B.forEach(F=>{let te=F.element,me=O(A,te,new Set);F.preStyleProps.forEach(ne=>me.add(ne));let It=O(N,te,new Set);F.postStyleProps.forEach(ne=>It.add(ne)),te!==t&&w.add(te)}),jn(t,this._triggerName,n,i,P,m,T,B,[...w.values()],A,N,C))}};function Mi(s,e,t,n,i){return s.some(r=>r(e,t,n,i))}function ss(s,e){let t=Pe({},e);return Object.entries(s).forEach(([n,i])=>{i!=null&&(t[n]=i)}),t}var Tt=class{styles;defaultParams;normalizer;constructor(e,t,n){this.styles=e,this.defaultParams=t,this.normalizer=n}buildStyles(e,t){let n=new Map,i=ss(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=Te(o,i,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),n.set(a,o)})}),n}};function Pi(s,e,t){return new bt(s,e,t)}var bt=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,n){this.name=e,this.ast=t,this._normalizer=n,t.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new Tt(i.style,r,n))}),qn(this.states,"true","1"),qn(this.states,"false","0"),t.transitions.forEach(i=>{this.transitionFactories.push(new Ge(e,i,this.states))}),this.fallbackTransition=Di(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,i){return this.transitionFactories.find(o=>o.match(e,t,n,i))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}};function Di(s,e,t){let n=[(o,a)=>!0],i={type:_.Sequence,steps:[],options:null},r={type:_.Transition,animation:i,matchers:n,options:null,queryCount:0,depCount:0};return new Ge(s,r,e)}function qn(s,e,t){s.has(e)?s.has(t)||s.set(t,s.get(e)):s.has(t)&&s.set(e,s.get(t))}var Ni=new be,wt=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n}register(e,t){let n=[],i=[],r=ts(this._driver,t,n,i);if(n.length)throw Us(n);i.length&&void 0,this._animations.set(e,r)}_buildPlayer(e,t,n){let i=e.element,r=xn(this._normalizer,e.keyframes,t,n);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){let i=[],r=this._animations.get(e),o,a=new Map;if(r?(o=ns(this._driver,t,r,Xn,mt,new Map,new Map,n,Ni,i),o.forEach(h=>{let u=O(a,h.element,new Map);h.postStyleProps.forEach(S=>u.set(S,null))})):(i.push(Qs()),o=[]),i.length)throw Vs(i);a.forEach((h,u)=>{h.forEach((S,y)=>{h.set(y,this._driver.computeStyle(u,y,Q))})});let l=o.map(h=>{let u=a.get(h.element);return this._buildPlayer(h,new Map,u)}),c=ee(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Hs(e);return t}listen(e,t,n,i){let r=Nt(t,"","","");return Dt(this._getPlayer(e),n,r,i),()=>{}}command(e,t,n,i){if(n=="register"){this.register(e,i[0]);return}if(n=="create"){let o=i[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e);break}}},Un="ng-animate-queued",Ci=".ng-animate-queued",ut="ng-animate-disabled",Fi=".ng-animate-disabled",Ri="ng-star-inserted",ki=".ng-star-inserted",Oi=[],is={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Ii={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},$="__ng_removed",we=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let n=e&&e.hasOwnProperty("value"),i=n?e.value:e;if(this.value=$i(i),n){let r=e,{value:o}=r,a=Bt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let n=this.options.params;Object.keys(t).forEach(i=>{n[i]==null&&(n[i]=t[i])})}}},ve="void",ht=new we(ve),At=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this._hostClassName="ng-tns-"+e,L(t,this._hostClassName)}listen(e,t,n,i){if(!this._triggers.has(t))throw Gs(n,t);if(n==null||n.length==0)throw xs(t);if(!zi(n))throw Ws(n,t);let r=O(this._elementListeners,e,[]),o={name:t,phase:n,callback:i};r.push(o);let a=O(this._engine.statesByElement,e,new Map);return a.has(t)||(L(e,Le),L(e,Le+"-"+t),a.set(t,ht)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(o);l>=0&&r.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Js(e);return t}trigger(e,t,n,i=!0){let r=this._getTrigger(t),o=new Ae(this.id,t,e),a=this._engine.statesByElement.get(e);a||(L(e,Le),L(e,Le+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new we(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=ht),!(c.value===ve)&&l.value===c.value){if(!ji(l.params,c.params)){let g=[],T=r.matchStyles(l.value,l.params,g),w=r.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{ce(e,T),V(e,w)})}return}let S=O(this._engine.playersByElement,e,[]);S.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,c.value,e,c.params),m=!1;if(!y){if(!i)return;y=r.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:c,player:o,isFallbackTransition:m}),m||(L(e,Un),o.onStart(()=>{ye(e,Un)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let T=this._engine.playersByElement.get(e);if(T){let w=T.indexOf(o);w>=0&&T.splice(w,1)}}),this.players.push(o),S.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(i=>i.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let n=this._engine.driver.query(e,je,!0);n.forEach(i=>{if(i[$])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(o=>o.triggerLeaveAnimation(i,t,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,t,n,i){let r=this._engine.statesByElement.get(e),o=new Map;if(r){let a=[];if(r.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){let h=this.trigger(e,c,ve,i);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),n&&ee(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(t&&n){let i=new Set;t.forEach(r=>{let o=r.name;if(i.has(o))return;i.add(o);let l=this._triggers.get(o).fallbackTransition,c=n.get(o)||ht,h=new we(ve),u=new Ae(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:h,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let i=!1;if(n.totalAnimations){let r=n.players.length?n.playersByQueriedElement.get(e):[];if(r&&r.length)i=!0;else{let o=e;for(;o=o.parentNode;)if(n.statesByElement.get(o)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)n.markElementAsRemoved(this.id,e,!1,t);else{let r=e[$];(!r||r===is)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){L(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(n=>{let i=n.player;if(i.destroyed)return;let r=n.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==n.triggerName){let l=Nt(r,n.triggerName,n.fromState.value,n.toState.value);l._data=e,Dt(n.player,a.phase,l,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(n)}),this._queue=[],t.sort((n,i)=>{let r=n.transition.ast.depCount,o=i.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(n.element,i.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Mt=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,t){let n=new At(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){let n=this._namespaceList,i=this.namespacesByHostElement;if(n.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=i.get(a);if(l){let c=n.indexOf(l);n.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||n.unshift(e)}else n.push(e);return i.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let i=this._namespaceLookup[e];i&&i.register(t,n)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let i=this._namespaceList.indexOf(n);i>=0&&this._namespaceList.splice(i,1),n.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,n=this.statesByElement.get(e);if(n){for(let i of n.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&t.add(r)}}return t}trigger(e,t,n,i){if(Be(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,n,i),!0}return!1}insertNode(e,t,n,i){if(!Be(t))return;let r=t[$];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(t,n)}i&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),L(e,ut)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),ye(e,ut))}removeNode(e,t,n){if(Be(t)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(e,t,n,i,r){this.collectedLeaveElements.push(t),t[$]={namespaceId:e,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,n,i,r){return Be(t)?this._fetchNamespace(e).listen(t,n,i,r):()=>{}}_buildInstruction(e,t,n,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,je,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,ft,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return ee(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[$];if(t&&t.setForRemoval){if(e[$]=is,t.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(ut)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Fi,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,i)=>this._balanceNamespaceList(n,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],t.length?ee(t).onDone(()=>{n.forEach(i=>i())}):n.forEach(i=>i())}}reportError(e){throw Ys(e)}_flushAnimations(e,t){let n=new be,i=[],r=new Map,o=[],a=new Map,l=new Map,c=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let f=this.driver.query(d,Ci,!0);for(let p=0;p{let p=Xn+g++;m.set(f,p),d.forEach(E=>L(E,p))});let T=[],w=new Set,A=new Set;for(let d=0;dw.add(E)):A.add(f))}let N=new Map,P=Hn(S,Array.from(w));P.forEach((d,f)=>{let p=mt+g++;N.set(f,p),d.forEach(E=>L(E,p))}),e.push(()=>{y.forEach((d,f)=>{let p=m.get(f);d.forEach(E=>ye(E,p))}),P.forEach((d,f)=>{let p=N.get(f);d.forEach(E=>ye(E,p))}),T.forEach(d=>{this.processLeaveNode(d)})});let de=[],B=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let E=p.player,M=p.element;if(de.push(E),this.collectedEnterElements.length){let D=M[$];if(D&&D.setForMove){if(D.previousTriggersValues&&D.previousTriggersValues.has(p.triggerName)){let se=D.previousTriggersValues.get(p.triggerName),I=this.statesByElement.get(p.element);if(I&&I.has(p.triggerName)){let Me=I.get(p.triggerName);Me.value=se,I.set(p.triggerName,Me)}}E.destroy();return}}let K=!u||!this.driver.containsElement(u,M),R=N.get(M),x=m.get(M),b=this._buildInstruction(p,n,x,R,K);if(b.errors&&b.errors.length){B.push(b);return}if(K){E.onStart(()=>ce(M,b.fromStyles)),E.onDestroy(()=>V(M,b.toStyles)),i.push(E);return}if(p.isFallbackTransition){E.onStart(()=>ce(M,b.fromStyles)),E.onDestroy(()=>V(M,b.toStyles)),i.push(E);return}let zt=[];b.timelines.forEach(D=>{D.stretchStartingKeyframe=!0,this.disabledNodes.has(D.element)||zt.push(D)}),b.timelines=zt,n.append(M,b.timelines);let ys={instruction:b,player:E,element:M};o.push(ys),b.queriedElements.forEach(D=>O(a,D,[]).push(E)),b.preStyleProps.forEach((D,se)=>{if(D.size){let I=l.get(se);I||l.set(se,I=new Set),D.forEach((Me,tt)=>I.add(tt))}}),b.postStyleProps.forEach((D,se)=>{let I=c.get(se);I||c.set(se,I=new Set),D.forEach((Me,tt)=>I.add(tt))})});if(B.length){let d=[];B.forEach(f=>{d.push(Xs(f.triggerName,f.errors))}),de.forEach(f=>f.destroy()),this.reportError(d)}let C=new Map,F=new Map;o.forEach(d=>{let f=d.element;n.has(f)&&(F.set(f,f),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,C))}),i.forEach(d=>{let f=d.element;this._getPreviousPlayers(f,!1,d.namespaceId,d.triggerName,null).forEach(E=>{O(C,f,[]).push(E),E.destroy()})});let te=T.filter(d=>Gn(d,l,c)),me=new Map;Vn(me,this.driver,A,c,Q).forEach(d=>{Gn(d,l,c)&&te.push(d)});let ne=new Map;y.forEach((d,f)=>{Vn(ne,this.driver,new Set(d),l,Ie)}),te.forEach(d=>{let f=me.get(d),p=ne.get(d);me.set(d,new Map([...f?.entries()??[],...p?.entries()??[]]))});let et=[],Lt=[],$t={};o.forEach(d=>{let{element:f,player:p,instruction:E}=d;if(n.has(f)){if(h.has(f)){p.onDestroy(()=>V(f,E.toStyles)),p.disabled=!0,p.overrideTotalTime(E.totalTime),i.push(p);return}let M=$t;if(F.size>1){let R=f,x=[];for(;R=R.parentNode;){let b=F.get(R);if(b){M=b;break}x.push(R)}x.forEach(b=>F.set(b,M))}let K=this._buildAnimation(p.namespaceId,E,C,r,ne,me);if(p.setRealPlayer(K),M===$t)et.push(p);else{let R=this.playersByElement.get(M);R&&R.length&&(p.parentPlayer=ee(R)),i.push(p)}}else ce(f,E.fromStyles),p.onDestroy(()=>V(f,E.toStyles)),Lt.push(p),h.has(f)&&i.push(p)}),Lt.forEach(d=>{let f=r.get(d.element);if(f&&f.length){let p=ee(f);d.setRealPlayer(p)}}),i.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d!K.destroyed);M.length?Bi(this,f,M):this.processLeaveNode(f)}return T.length=0,et.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let f=this.players.indexOf(d);this.players.splice(f,1)}),d.play()}),et}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,i,r){let o=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let l=!r||r==ve;a.forEach(c=>{c.queued||!l&&c.triggerName!=i||o.push(c)})}}return(n||i)&&(o=o.filter(a=>!(n&&n!=a.namespaceId||i&&i!=a.triggerName))),o}_beforeAnimationBuild(e,t,n){let i=t.triggerName,r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:i;for(let l of t.timelines){let c=l.element,h=c!==r,u=O(n,c,[]);this._getPreviousPlayers(c,h,o,a,t.toState).forEach(y=>{let m=y.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),y.destroy(),u.push(y)})}ce(r,t.fromStyles)}_buildAnimation(e,t,n,i,r,o){let a=t.triggerName,l=t.element,c=[],h=new Set,u=new Set,S=t.timelines.map(m=>{let g=m.element;h.add(g);let T=g[$];if(T&&T.removedBeforeQueried)return new Z(m.duration,m.delay);let w=g!==l,A=Ki((n.get(g)||Oi).map(C=>C.getRealPlayer())).filter(C=>{let F=C;return F.element?F.element===g:!1}),N=r.get(g),P=o.get(g),de=xn(this._normalizer,m.keyframes,N,P),B=this._buildPlayer(m,de,A);if(m.subTimeline&&i&&u.add(g),w){let C=new Ae(e,a,g);C.setRealPlayer(B),c.push(C)}return B});c.forEach(m=>{O(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>Li(this.playersByQueriedElement,m.element,m))}),h.forEach(m=>L(m,$n));let y=ee(S);return y.onDestroy(()=>{h.forEach(m=>ye(m,$n)),V(l,t.toStyles)}),u.forEach(m=>{O(i,m,[]).push(y)}),y}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new Z(e.duration,e.delay)}},Ae=class{namespaceId;triggerName;element;_player=new Z;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,n)=>{t.forEach(i=>Dt(e,n,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){O(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function Li(s,e,t){let n=s.get(e);if(n){if(n.length){let i=n.indexOf(t);n.splice(i,1)}n.length==0&&s.delete(e)}return n}function $i(s){return s??null}function Be(s){return s&&s.nodeType===1}function zi(s){return s=="start"||s=="done"}function Qn(s,e){let t=s.style.display;return s.style.display=e??"none",t}function Vn(s,e,t,n,i){let r=[];t.forEach(l=>r.push(Qn(l)));let o=[];n.forEach((l,c)=>{let h=new Map;l.forEach(u=>{let S=e.computeStyle(c,u,i);h.set(u,S),(!S||S.length==0)&&(c[$]=Ii,o.push(c))}),s.set(c,h)});let a=0;return t.forEach(l=>Qn(l,r[a++])),o}function Hn(s,e){let t=new Map;if(s.forEach(a=>t.set(a,[])),e.length==0)return t;let n=1,i=new Set(e),r=new Map;function o(a){if(!a)return n;let l=r.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:i.has(c)?l=n:l=o(c),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==n&&t.get(l).push(a)}),t}function L(s,e){s.classList?.add(e)}function ye(s,e){s.classList?.remove(e)}function Bi(s,e,t){ee(t).onDone(()=>s.processLeaveNode(e))}function Ki(s){let e=[];return rs(s,e),e}function rs(s,e){for(let t=0;ti.add(r)):e.set(s,n),t.delete(s),!0}var _e=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,n){this._driver=t,this._normalizer=n,this._transitionEngine=new Mt(e.body,t,n),this._timelineEngine=new wt(e.body,t,n),this._transitionEngine.onRemovalComplete=(i,r)=>this.onRemovalComplete(i,r)}registerTrigger(e,t,n,i,r){let o=e+"-"+i,a=this._triggerCache[o];if(!a){let l=[],c=[],h=ts(this._driver,r,l,c);if(l.length)throw js(i,l);c.length&&void 0,a=Pi(i,h,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,i,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,n,i){this._transitionEngine.insertNode(e,t,n,i)}onRemove(e,t,n){this._transitionEngine.removeNode(e,t,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,i){if(n.charAt(0)=="@"){let[r,o]=In(n),a=i;this._timelineEngine.command(r,t,o,a)}else this._transitionEngine.trigger(e,t,n,i)}listen(e,t,n,i,r){if(n.charAt(0)=="@"){let[o,a]=In(n);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,n,i,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function qi(s,e){let t=null,n=null;return Array.isArray(e)&&e.length?(t=dt(e[0]),e.length>1&&(n=dt(e[e.length-1]))):e instanceof Map&&(t=dt(e)),t||n?new Ui(s,t,n):null}var Ui=(()=>{class s{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,n,i){this._element=t,this._startStyles=n,this._endStyles=i;let r=s.initialStylesByElement.get(t);r||s.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&V(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(V(this._element,this._initialStyles),this._endStyles&&(V(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(s.initialStylesByElement.delete(this._element),this._startStyles&&(ce(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ce(this._element,this._endStyles),this._endStyles=null),V(this._element,this._initialStyles),this._state=3)}}return s})();function dt(s){let e=null;return s.forEach((t,n)=>{Qi(n)&&(e=e||new Map,e.set(n,t))}),e}function Qi(s){return s==="display"||s==="position"}var xe=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,n,i){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=i,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(e,t,n){return e.animate(this._convertKeyframesToObject(t),n)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,i)=>{i!=="offset"&&e.set(i,this._finished?n:kt(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},We=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return Wn(e,t)}getParentElement(e){return Ct(e)}query(e,t,n){return Jn(e,t,n)}computeStyle(e,t,n){return kt(e,t)}animate(e,t,n,i,r,o=[]){let a=i==0?"both":"forwards",l={duration:n,delay:i,fill:a};r&&(l.easing=r);let c=new Map,h=o.filter(y=>y instanceof xe);ci(n,i)&&h.forEach(y=>{y.currentSnapshot.forEach((m,g)=>c.set(g,m))});let u=oi(t).map(y=>new Map(y));u=ui(e,u,c);let S=qi(e,u);return new xe(e,u,l,S)}};var Ke="@",os="@.disabled",Je=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,n,i){this.namespaceId=e,this.delegate=t,this.engine=n,this._onDestroy=i}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,n,i=!0){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,i)}removeChild(e,t,n){this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,n,i){this.delegate.setAttribute(e,t,n,i)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,i){this.delegate.setStyle(e,t,n,i)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){t.charAt(0)==Ke&&t==os?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n){return this.delegate.listen(e,t,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},Pt=class extends Je{factory;constructor(e,t,n,i,r){super(t,n,i,r),this.factory=e,this.namespaceId=t}setProperty(e,t,n){t.charAt(0)==Ke?t.charAt(1)=="."&&t==os?(n=n===void 0?!0:!!n,this.disableAnimations(e,n)):this.engine.process(this.namespaceId,e,t.slice(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n){if(t.charAt(0)==Ke){let i=Vi(e),r=t.slice(1),o="";return r.charAt(0)!=Ke&&([r,o]=Hi(r)),this.engine.listen(this.namespaceId,i,r,o,a=>{let l=a._data||-1;this.factory.scheduleListenerCallback(l,n,a)})}return this.delegate.listen(e,t,n)}};function Vi(s){switch(s){case"body":return document.body;case"document":return document;case"window":return window;default:return s}}function Hi(s){let e=s.indexOf("."),t=s.substring(0,e),n=s.slice(e+1);return[t,n]}var Ye=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,t.onRemovalComplete=(i,r)=>{r?.removeChild(null,i)}}createRenderer(e,t){let n="",i=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,h=c.get(i);if(!h){let u=()=>c.delete(i);h=new Je(n,i,this.engine,u),c.set(i,h)}return h}let r=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(r,o,e,c.name,c)};return t.data.animation.forEach(a),new Pt(this,o,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){if(e>=0&&et(n));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{let[o,a]=r;o(a)}),this._animationCallbacksBuffer=[]})}),i.push([t,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var xi=(()=>{class s extends _e{constructor(t,n,i){super(t,n,i)}ngOnDestroy(){this.flush()}static \u0275fac=function(n){return new(n||s)(j(nn),j(ue),j(he))};static \u0275prov=W({token:s,factory:s.\u0275fac})}return s})();function Wi(){return new Ue}function Ji(s,e,t){return new Ye(s,e,t)}var as=[{provide:he,useFactory:Wi},{provide:_e,useClass:xi},{provide:Gt,useFactory:Ji,deps:[cn,_e,De]}],Yi=[{provide:ue,useFactory:()=>new We},{provide:nt,useValue:"BrowserAnimations"},...as],kr=[{provide:ue,useClass:Ft},{provide:nt,useValue:"NoopAnimations"},...as];function ls(){return Ht("NgEagerAnimations"),[...Yi]}var Xe=class{http;prefix;suffix;constructor(e,t="/assets/i18n/",n=".json"){this.http=e,this.prefix=t,this.suffix=n}getTranslation(e){return this.http.get(`${this.prefix}${e}${this.suffix}`)}};function Xi(s,e){if(s&1&&(U(0,"li")(1,"h2")(2,"a",1),re(3),fe(4,"translate"),Y()()()),s&2){let t,n=e.$implicit;q(2),Ne("routerLink","/"+n.path),q(),Re(" ",pe(4,2,((t=n.name)!==null&&t!==void 0?t:n.path)+".title")," ")}}var cs=(()=>{class s{constructor(){this.sections=[{path:"dashboard"},{path:"presence-control"},{path:"open-absences"},{path:"edit-absences"},{path:"evaluate-absences"},{path:"events"},{path:"events/current",name:"events.current"},{path:"my-absences"},{path:"my-profile"},{path:"my-grades"},{path:"my-settings"}]}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-home"]],decls:3,vars:0,consts:[[1,"mt-3"],[3,"routerLink"]],template:function(n,i){n&1&&(U(0,"ul",0),Ce(1,Xi,5,4,"li",null,Yt),Y()),n&2&&(q(),Fe(i.sections))},dependencies:[dn,Oe],encapsulation:2,changeDetection:0})}}return s})();var us=(()=>{class s{constructor(){}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-unauthenticated"]],decls:4,vars:3,consts:[[1,"bkd-container"],[1,"alert","alert-danger","my-3"]],template:function(n,i){n&1&&(U(0,"div",0)(1,"div",1),re(2),fe(3,"translate"),Y()()),n&2&&(q(2),Re(" ",pe(3,1,"unauthenticated.message")," "))},dependencies:[Oe],encapsulation:2})}}return s})();var Ze=(()=>{class s{constructor(t){this.storage=t}get isAuthenticated(){return!!this.accessToken}get accessToken(){return this.storage.getAccessToken()}static{this.\u0275fac=function(n){return new(n||s)(j(Tn))}}static{this.\u0275prov=W({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();function z(){return()=>{let s=H(Ze),e=H(ke);return s.isAuthenticated?!0:(e.navigate(["/unauthenticated"]),!1)}}var hs=[{path:"dashboard",canActivate:[z()],loadChildren:()=>import("./chunk-S75UZ635.js").then(s=>s.DASHBOARD_ROUTES)},{path:"presence-control",canActivate:[z()],loadChildren:()=>import("./chunk-YJSXN7FS.js").then(s=>s.PRESENCE_CONTROL_ROUTES)},{path:"open-absences",canActivate:[z()],loadChildren:()=>import("./chunk-UOR7VPK5.js").then(s=>s.OPEN_ABSENCES_ROUTES)},{path:"edit-absences",canActivate:[z()],loadChildren:()=>import("./chunk-ITBCT34A.js").then(s=>s.EDIT_ABSENCES_ROUTES)},{path:"evaluate-absences",canActivate:[z()],loadChildren:()=>import("./chunk-PCBMXZVX.js").then(s=>s.EVALUATE_ABSENCES_ROUTES)},{path:"events",canActivate:[z()],loadChildren:()=>import("./chunk-33HDDU2F.js").then(s=>s.EVENTS_ROUTES)},{path:"my-absences",canActivate:[z()],loadChildren:()=>import("./chunk-MTEM3R5P.js").then(s=>s.MY_ABSENCES_ROUTES)},{path:"my-profile",canActivate:[z()],loadChildren:()=>import("./chunk-SDI6V7TL.js").then(s=>s.MY_PROFILE_ROUTES)},{path:"my-grades",canActivate:[z()],loadChildren:()=>import("./chunk-JZ3SRNI2.js").then(s=>s.MY_GRADES_ROUTES)},{path:"my-settings",canActivate:[z()],loadChildren:()=>import("./chunk-BIDF56I4.js").then(s=>s.MY_SETTINGS_ROUTES)},{path:"unauthenticated",component:us},{path:"",component:cs,pathMatch:"full"}];function ds(){return(s,e)=>{let t=H(Ze),n=H(X);if(s.url.startsWith(n.apiUrl)&&t.accessToken){let i=s.headers.set("Authorization",`Bearer ${t.accessToken}`);return e(s.clone({headers:i}))}return e(s)}}function ms(){return(s,e)=>{let t=H(X);if(!s.headers.has("X-Role-Restriction")&&t.headerRoleRestriction){let n=Zi();if(n&&t.headerRoleRestriction[n]){let i=s.headers.set("X-Role-Restriction",t.headerRoleRestriction[n]);return e(s.clone({headers:i}))}}return e(s)}}function Zi(){let s=H(ke),e=s.url?An(s.url):null;return e?yn(e):null}function fs(){return[{provide:Vt,useClass:er}]}var er=(()=>{class s{constructor(t,n,i){this.ngZone=t,this.translate=n,this.toastService=i}handleError(t){console.error(String(t)),t instanceof rn||this.notifyError()}notifyError(){this.ngZone.run(()=>{this.toastService.error(this.translate.instant("global.app-errors.exception-message"),this.translate.instant("global.app-errors.exception-title"))})}static{this.\u0275fac=function(n){return new(n||s)(j(De),j(En),j(ge))}}static{this.\u0275prov=W({token:s,factory:s.\u0275fac})}}return s})();function tr(s,e){return new Xe(s,`${e.scriptsAndAssetsPath}/assets/locales/`,".json")}var ps={providers:[mn(hs,fn()),an(ln([Mn(),ds(),ms()])),ls(),fs(),vn({loader:{provide:Sn,useFactory:tr,deps:[on,X]}}),bn()]};var gs={production:!0};gs.production&&void 0;rt(Pn);rt(Dn);un(Rn,ps).catch(s=>console.error(s)); +import{b as Mn}from"./chunk-HCNFZOWE.js";import{c as An}from"./chunk-DTYYCJHM.js";import{a as bn,b as wn}from"./chunk-XAZECV42.js";import{t as gn}from"./chunk-W4U7QKJF.js";import{a as ge}from"./chunk-AVBHFGIF.js";import{$ as H,$a as Y,B as jt,Ba as Gt,Bc as mn,Cc as fn,Ed as yn,Ga as J,Jb as fe,Kb as pe,Ld as _n,Na as xt,Nd as Sn,Od as En,Pd as Oe,Qa as Ne,Qd as vn,Rd as Tn,Sa as Wt,V as v,Va as Jt,Wa as Yt,Wb as nn,X as W,Xa as Xt,Ya as Ce,Z as qt,Za as Fe,_ as j,_a as U,_b as rt,a as Pe,ab as Zt,bd as pn,c as Bt,cc as sn,cd as X,ea as Ut,eb as en,fa as Qt,gb as tn,hb as st,k as Kt,kc as rn,lc as on,mc as an,na as De,nc as ln,oa as Vt,oc as cn,pc as un,rb as re,sa as nt,sb as it,ta as Ht,tb as Re,xa as q,xc as hn,ya as ie,yc as ke,zc as dn}from"./chunk-2W7IS4PN.js";function _s(s){let e=s,t=Math.floor(Math.abs(s)),n=s.toString().replace(/^[^.]*\.?/,"").length;return t===1&&n===0?1:5}var Pn=["de-CH",[["AM","PM"],void 0,void 0],void 0,[["S","M","D","M","D","F","S"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So","Mo","Di","Mi","Do","Fr","Sa"]],[["S","M","D","M","D","F","S"],["So","Mo","Di","Mi","Do","Fr","Sa"],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["v. Chr.","n. Chr."],void 0,void 0],1,[6,0],["dd.MM.yy","dd.MM.y","d. MMMM y","EEEE, d. MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} 'um' {0}",void 0],[".","\u2019",";","%","+","-","E","\xB7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4\xA0#,##0.00;\xA4-#,##0.00","#E0"],"CHF","CHF","Schweizer Franken",{ATS:["\xF6S"],AUD:["AU$","$"],BGM:["BGK"],BGO:["BGJ"],BYN:[void 0,"\u0440."],CUC:[void 0,"Cub$"],DEM:["DM"],EUR:[],FKP:[void 0,"Fl\xA3"],GHS:[void 0,"\u20B5"],GNF:[void 0,"F.G."],KMF:[void 0,"FC"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],RWF:[void 0,"F.Rw"],SYP:[],THB:["\u0E3F"],TWD:["NT$"],XXX:[],ZMW:[void 0,"K"]},"ltr",_s];function Ss(s){let e=s,t=Math.floor(Math.abs(s)),n=s.toString().replace(/^[^.]*\.?/,"").length,i=parseInt(s.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===0||t===1?1:i===0&&t!==0&&t%1e6===0&&n===0||!(i>=0&&i<=5)?4:5}var Dn=["fr-CH",[["AM","PM"],void 0,void 0],void 0,[["D","L","M","M","J","V","S"],["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],["di","lu","ma","me","je","ve","sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"]],void 0,[["av. J.-C.","ap. J.-C."],void 0,["avant J\xE9sus-Christ","apr\xE8s J\xE9sus-Christ"]],1,[6,0],["dd.MM.yy","d MMM y","d MMMM y","EEEE, d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH.mm:ss 'h' zzzz"],["{1} {0}","{1}, {0}","{1} '\xE0' {0}",void 0],[",","\u202F",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":","."],["#,##0.###","#,##0%","#,##0.00\xA0\xA4","#E0"],"CHF","CHF","franc suisse",{ARS:["$AR","$"],AUD:["$AU","$"],BEF:["FB"],BMD:["$BM","$"],BND:["$BN","$"],BYN:[void 0,"\u0440."],BZD:["$BZ","$"],CAD:["$CA","$"],CLP:["$CL","$"],CNY:[void 0,"\xA5"],COP:["$CO","$"],CYP:["\xA3CY"],EGP:[void 0,"\xA3E"],FJD:["$FJ","$"],FKP:["\xA3FK","\xA3"],FRF:["F"],GBP:["\xA3GB","\xA3"],GIP:["\xA3GI","\xA3"],HKD:[void 0,"$"],IEP:["\xA3IE"],ILP:["\xA3IL"],ITL:["\u20A4IT"],JPY:[void 0,"\xA5"],KMF:[void 0,"FC"],LBP:["\xA3LB","\xA3L"],MTP:["\xA3MT"],MXN:["$MX","$"],NAD:["$NA","$"],NIO:[void 0,"$C"],NZD:["$NZ","$"],PHP:[void 0,"\u20B1"],RHD:["$RH"],RON:[void 0,"L"],RWF:[void 0,"FR"],SBD:["$SB","$"],SGD:["$SG","$"],SRD:["$SR","$"],TOP:[void 0,"$T"],TTD:["$TT","$"],TWD:[void 0,"NT$"],USD:["$US","$"],UYU:["$UY","$"],WST:["$WS"],XCD:[void 0,"$"],XPF:["FCFP"],ZMW:[void 0,"Kw"]},"ltr",Ss];function Es(s,e){if(s&1&&(U(0,"i",3),re(1),Y()),s&2){let t=st().$implicit;q(),it(t.icon)}}function vs(s,e){if(s&1){let t=en();U(0,"ngb-toast",1),tn("hidden",function(){let i=Ut(t).$implicit,r=st();return Qt(r.toastService.remove(i))}),U(1,"div",2),xt(2,Es,2,1,"i",3),U(3,"span"),re(4),Y()()()}if(s&2){let t=e.$implicit;Wt(t.classname),Ne("header",t.header||"")("autohide",!0),q(2),Jt(t.icon?2:-1),q(2),it(t.message)}}var Cn=(()=>{class s{constructor(t){this.toastService=t}static{this.\u0275fac=function(n){return new(n||s)(ie(ge))}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-toast"]],decls:3,vars:2,consts:[[3,"header","class","autohide"],[3,"hidden","header","autohide"],[1,"d-flex","gap-2"],[1,"material-icons"]],template:function(n,i){n&1&&(Ce(0,vs,5,6,"ngb-toast",0,Xt),fe(2,"async")),n&2&&Fe(pe(2,0,i.toastService.toasts$))},dependencies:[gn,sn],styles:["[_nghost-%COMP%]{position:fixed;top:0;right:0;margin:.5em;z-index:1200}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{font-size:medium}"]})}}return s})();var Fn=new qt("Navigator API",{providedIn:"root",factory:()=>navigator});var Rn=(()=>{class s{constructor(t,n,i,r){this.toastService=n,this.settings=i,this.navigator=r,t.initialize(),this.checkSettings()}checkSettings(){_n(pn)(this.settings).pipe(jt(t=>(console.error(String(t)),this.toastService.error("Please check the contents of the settings.js file (see Console output for more details).","Invalid Settings"),Kt))).subscribe()}static{this.\u0275fac=function(n){return new(n||s)(ie(wn),ie(ge),ie(X),ie(Fn))}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-app"]],decls:2,vars:0,consts:[["aria-live","polite","aria-atomic","true"]],template:function(n,i){n&1&&Zt(0,"bkd-toast",0)(1,"router-outlet")},dependencies:[Cn,hn],styles:["[_nghost-%COMP%]{width:100%}"],changeDetection:0})}}return s})();var _=function(s){return s[s.State=0]="State",s[s.Transition=1]="Transition",s[s.Sequence=2]="Sequence",s[s.Group=3]="Group",s[s.Animate=4]="Animate",s[s.Keyframes=5]="Keyframes",s[s.Style=6]="Style",s[s.Trigger=7]="Trigger",s[s.Reference=8]="Reference",s[s.AnimateChild=9]="AnimateChild",s[s.AnimateRef=10]="AnimateRef",s[s.Query=11]="Query",s[s.Stagger=12]="Stagger",s}(_||{}),Q="*";function kn(s,e=null){return{type:_.Sequence,steps:s,options:e}}function ot(s){return{type:_.Style,styles:s,offset:null}}var Z=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(e=0,t=0){this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Se=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(e){this.players=e;let t=0,n=0,i=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++n==r&&this._onDestroy()}),o.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let t=e*this.totalTime;this.players.forEach(n=>{let i=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(i)})}getPosition(){let e=this.players.reduce((t,n)=>t===null||n.totalTime>t.totalTime?n:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Ie="!";function On(s){return new v(3e3,!1)}function Ts(){return new v(3100,!1)}function bs(){return new v(3101,!1)}function ws(s){return new v(3001,!1)}function As(s){return new v(3003,!1)}function Ms(s){return new v(3004,!1)}function Ps(s,e){return new v(3005,!1)}function Ds(){return new v(3006,!1)}function Ns(){return new v(3007,!1)}function Cs(s,e){return new v(3008,!1)}function Fs(s){return new v(3002,!1)}function Rs(s,e,t,n,i){return new v(3010,!1)}function ks(){return new v(3011,!1)}function Os(){return new v(3012,!1)}function Is(){return new v(3200,!1)}function Ls(){return new v(3202,!1)}function $s(){return new v(3013,!1)}function zs(s){return new v(3014,!1)}function Bs(s){return new v(3015,!1)}function Ks(s){return new v(3016,!1)}function js(s,e){return new v(3404,!1)}function qs(s){return new v(3502,!1)}function Us(s){return new v(3503,!1)}function Qs(){return new v(3300,!1)}function Vs(s){return new v(3504,!1)}function Hs(s){return new v(3301,!1)}function Gs(s,e){return new v(3302,!1)}function xs(s){return new v(3303,!1)}function Ws(s,e){return new v(3400,!1)}function Js(s){return new v(3401,!1)}function Ys(s){return new v(3402,!1)}function Xs(s,e){return new v(3505,!1)}function ee(s){switch(s.length){case 0:return new Z;case 1:return s[0];default:return new Se(s)}}function xn(s,e,t=new Map,n=new Map){let i=[],r=[],o=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),h=c==o,u=h&&a||new Map;l.forEach((S,y)=>{let m=y,g=S;if(y!=="offset")switch(m=s.normalizePropertyName(m,i),g){case Ie:g=t.get(y);break;case Q:g=n.get(y);break;default:g=s.normalizeStyleValue(y,m,g,i);break}u.set(m,g)}),h||r.push(u),a=u,o=c}),i.length)throw qs(i);return r}function Dt(s,e,t,n){switch(e){case"start":s.onStart(()=>n(t&&at(t,"start",s)));break;case"done":s.onDone(()=>n(t&&at(t,"done",s)));break;case"destroy":s.onDestroy(()=>n(t&&at(t,"destroy",s)));break}}function at(s,e,t){let n=t.totalTime,i=!!t.disabled,r=Nt(s.element,s.triggerName,s.fromState,s.toState,e||s.phaseName,n??s.totalTime,i),o=s._data;return o!=null&&(r._data=o),r}function Nt(s,e,t,n,i="",r=0,o){return{element:s,triggerName:e,fromState:t,toState:n,phaseName:i,totalTime:r,disabled:!!o}}function O(s,e,t){let n=s.get(e);return n||s.set(e,n=t),n}function In(s){let e=s.indexOf(":"),t=s.substring(1,e),n=s.slice(e+1);return[t,n]}var Zs=typeof document>"u"?null:document.documentElement;function Ct(s){let e=s.parentNode||s.host||null;return e===Zs?null:e}function ei(s){return s.substring(1,6)=="ebkit"}var ae=null,Ln=!1;function ti(s){ae||(ae=ni()||{},Ln=ae.style?"WebkitAppearance"in ae.style:!1);let e=!0;return ae.style&&!ei(s)&&(e=s in ae.style,!e&&Ln&&(e="Webkit"+s.charAt(0).toUpperCase()+s.slice(1)in ae.style)),e}function ni(){return typeof document<"u"?document.body:null}function Wn(s,e){for(;e;){if(e===s)return!0;e=Ct(e)}return!1}function Jn(s,e,t){if(t)return Array.from(s.querySelectorAll(e));let n=s.querySelector(e);return n?[n]:[]}var Ft=(()=>{class s{validateStyleProperty(t){return ti(t)}containsElement(t,n){return Wn(t,n)}getParentElement(t){return Ct(t)}query(t,n,i){return Jn(t,n,i)}computeStyle(t,n,i){return i||""}animate(t,n,i,r,o,a=[],l){return new Z(i,r)}static \u0275fac=function(n){return new(n||s)};static \u0275prov=W({token:s,factory:s.\u0275fac})}return s})(),ue=class{static NOOP=new Ft},he=class{};var si=1e3,Yn="{{",ii="}}",Xn="ng-enter",mt="ng-leave",Le="ng-trigger",je=".ng-trigger",$n="ng-animating",ft=".ng-animating";function G(s){if(typeof s=="number")return s;let e=s.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:pt(parseFloat(e[1]),e[2])}function pt(s,e){switch(e){case"s":return s*si;default:return s}}function qe(s,e,t){return s.hasOwnProperty("duration")?s:ri(s,e,t)}function ri(s,e,t){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,r=0,o="";if(typeof s=="string"){let a=s.match(n);if(a===null)return e.push(On(s)),{duration:0,delay:0,easing:""};i=pt(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(r=pt(parseFloat(l),a[4]));let c=a[5];c&&(o=c)}else i=s;if(!t){let a=!1,l=e.length;i<0&&(e.push(Ts()),a=!0),r<0&&(e.push(bs()),a=!0),a&&e.splice(l,0,On(s))}return{duration:i,delay:r,easing:o}}function oi(s){return s.length?s[0]instanceof Map?s:s.map(e=>new Map(Object.entries(e))):[]}function V(s,e,t){e.forEach((n,i)=>{let r=Rt(i);t&&!t.has(i)&&t.set(i,s.style[r]),s.style[r]=n})}function ce(s,e){e.forEach((t,n)=>{let i=Rt(n);s.style[i]=""})}function Ee(s){return Array.isArray(s)?s.length==1?s[0]:kn(s):s}function ai(s,e,t){let n=e.params||{},i=Zn(s);i.length&&i.forEach(r=>{n.hasOwnProperty(r)||t.push(ws(r))})}var gt=new RegExp(`${Yn}\\s*(.+?)\\s*${ii}`,"g");function Zn(s){let e=[];if(typeof s=="string"){let t;for(;t=gt.exec(s);)e.push(t[1]);gt.lastIndex=0}return e}function Te(s,e,t){let n=`${s}`,i=n.replace(gt,(r,o)=>{let a=e[o];return a==null&&(t.push(As(o)),a=""),a.toString()});return i==n?s:i}var li=/-+([a-z0-9])/g;function Rt(s){return s.replace(li,(...e)=>e[1].toUpperCase())}function ci(s,e){return s===0||e===0}function ui(s,e,t){if(t.size&&e.length){let n=e[0],i=[];if(t.forEach((r,o)=>{n.has(o)||i.push(o),n.set(o,r)}),i.length)for(let r=1;ro.set(a,kt(s,a)))}}return e}function k(s,e,t){switch(e.type){case _.Trigger:return s.visitTrigger(e,t);case _.State:return s.visitState(e,t);case _.Transition:return s.visitTransition(e,t);case _.Sequence:return s.visitSequence(e,t);case _.Group:return s.visitGroup(e,t);case _.Animate:return s.visitAnimate(e,t);case _.Keyframes:return s.visitKeyframes(e,t);case _.Style:return s.visitStyle(e,t);case _.Reference:return s.visitReference(e,t);case _.AnimateChild:return s.visitAnimateChild(e,t);case _.AnimateRef:return s.visitAnimateRef(e,t);case _.Query:return s.visitQuery(e,t);case _.Stagger:return s.visitStagger(e,t);default:throw Ms(e.type)}}function kt(s,e){return window.getComputedStyle(s)[e]}var hi=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Ue=class extends he{normalizePropertyName(e,t){return Rt(e)}normalizeStyleValue(e,t,n,i){let r="",o=n.toString().trim();if(hi.has(t)&&n!==0&&n!=="0")if(typeof n=="number")r="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push(Ps(e,n))}return o+r}};var Qe="*";function di(s,e){let t=[];return typeof s=="string"?s.split(/\s*,\s*/).forEach(n=>mi(n,t,e)):t.push(s),t}function mi(s,e,t){if(s[0]==":"){let l=fi(s,t);if(typeof l=="function"){e.push(l);return}s=l}let n=s.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return t.push(Bs(s)),e;let i=n[1],r=n[2],o=n[3];e.push(zn(i,o));let a=i==Qe&&o==Qe;r[0]=="<"&&!a&&e.push(zn(o,i))}function fi(s,e){switch(s){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}var $e=new Set(["true","1"]),ze=new Set(["false","0"]);function zn(s,e){let t=$e.has(s)||ze.has(s),n=$e.has(e)||ze.has(e);return(i,r)=>{let o=s==Qe||s==i,a=e==Qe||e==r;return!o&&t&&typeof i=="boolean"&&(o=i?$e.has(s):ze.has(s)),!a&&n&&typeof r=="boolean"&&(a=r?$e.has(e):ze.has(e)),o&&a}}var es=":self",pi=new RegExp(`s*${es}s*,?`,"g");function ts(s,e,t,n){return new yt(s).build(e,t,n)}var Bn="",yt=class{_driver;constructor(e){this._driver=e}build(e,t,n){let i=new _t(t);return this._resetContextStyleTimingState(i),k(this,Ee(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=Bn,e.collectedStyles=new Map,e.collectedStyles.set(Bn,new Map),e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,i=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(Ds()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==_.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=c}else if(a.type==_.Transition){let l=this.visitTransition(a,t);n+=l.queryCount,i+=l.depCount,o.push(l)}else t.errors.push(Ns())}),{type:_.Trigger,name:e.name,states:r,transitions:o,queryCount:n,depCount:i,options:null}}visitState(e,t){let n=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(n.containsDynamicStyles){let r=new Set,o=i||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{Zn(l).forEach(c=>{o.hasOwnProperty(c)||r.add(c)})})}),r.size&&t.errors.push(Cs(e.name,[...r.values()]))}return{type:_.State,name:e.name,style:n,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let n=k(this,Ee(e.animation),t),i=di(e.expr,t.errors);return{type:_.Transition,matchers:i,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:le(e.options)}}visitSequence(e,t){return{type:_.Sequence,steps:e.steps.map(n=>k(this,n,t)),options:le(e.options)}}visitGroup(e,t){let n=t.currentTime,i=0,r=e.steps.map(o=>{t.currentTime=n;let a=k(this,o,t);return i=Math.max(i,t.currentTime),a});return t.currentTime=i,{type:_.Group,steps:r,options:le(e.options)}}visitAnimate(e,t){let n=Si(e.timings,t.errors);t.currentAnimateTimings=n;let i,r=e.styles?e.styles:ot({});if(r.type==_.Keyframes)i=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};n.easing&&(c.easing=n.easing),o=ot(c)}t.currentTime+=n.duration+n.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,i=l}return t.currentAnimateTimings=null,{type:_.Animate,timings:n,style:i,options:null}}visitStyle(e,t){let n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){let n=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of i)typeof a=="string"?a===Q?n.push(a):t.errors.push(Fs(a)):n.push(new Map(Object.entries(a)));let r=!1,o=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!r)){for(let l of a.values())if(l.toString().indexOf(Yn)>=0){r=!0;break}}}),{type:_.Style,styles:n,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let n=t.currentAnimateTimings,i=t.currentTime,r=t.currentTime;n&&r>0&&(r-=n.duration+n.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),h=c.get(l),u=!0;h&&(r!=i&&r>=h.startTime&&i<=h.endTime&&(t.errors.push(Rs(l,h.startTime,h.endTime,r,i)),u=!1),r=h.startTime),u&&c.set(l,{startTime:r,endTime:i}),t.options&&ai(a,t.options,t.errors)})})}visitKeyframes(e,t){let n={type:_.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(ks()),n;let i=1,r=0,o=[],a=!1,l=!1,c=0,h=e.steps.map(w=>{let A=this._makeStyleAst(w,t),N=A.offset!=null?A.offset:_i(A.styles),P=0;return N!=null&&(r++,P=A.offset=N),l=l||P<0||P>1,a=a||P0&&r{let N=S>0?A==y?1:S*A:o[A],P=N*T;t.currentTime=m+g.delay+P,g.duration=P,this._validateStyleAst(w,t),w.offset=N,n.styles.push(w)}),n}visitReference(e,t){return{type:_.Reference,animation:k(this,Ee(e.animation),t),options:le(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:_.AnimateChild,options:le(e.options)}}visitAnimateRef(e,t){return{type:_.AnimateRef,animation:this.visitReference(e.animation,t),options:le(e.options)}}visitQuery(e,t){let n=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=gi(e.selector);t.currentQuerySelector=n.length?n+" "+r:r,O(t.collectedStyles,t.currentQuerySelector,new Map);let a=k(this,Ee(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:_.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:le(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push($s());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:qe(e.timings,t.errors,!0);return{type:_.Stagger,animation:k(this,Ee(e.animation),t),timings:n,options:null}}};function gi(s){let e=!!s.split(/\s*,\s*/).find(t=>t==es);return e&&(s=s.replace(pi,"")),s=s.replace(/@\*/g,je).replace(/@\w+/g,t=>je+"-"+t.slice(1)).replace(/:animating/g,ft),[s,e]}function yi(s){return s?Pe({},s):null}var _t=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function _i(s){if(typeof s=="string")return null;let e=null;if(Array.isArray(s))s.forEach(t=>{if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(s instanceof Map&&s.has("offset")){let t=s;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function Si(s,e){if(s.hasOwnProperty("duration"))return s;if(typeof s=="number"){let r=qe(s,e).duration;return lt(r,0,"")}let t=s;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=lt(0,0,"");return r.dynamic=!0,r.strValue=t,r}let i=qe(t,e);return lt(i.duration,i.delay,i.easing)}function le(s){return s?(s=Pe({},s),s.params&&(s.params=yi(s.params))):s={},s}function lt(s,e,t){return{duration:s,delay:e,easing:t}}function Ot(s,e,t,n,i,r,o=null,a=!1){return{type:1,element:s,keyframes:e,preStyleProps:t,postStyleProps:n,duration:i,delay:r,totalTime:i+r,easing:o,subTimeline:a}}var be=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},Ei=1,vi=":enter",Ti=new RegExp(vi,"g"),bi=":leave",wi=new RegExp(bi,"g");function ns(s,e,t,n,i,r=new Map,o=new Map,a,l,c=[]){return new St().buildKeyframes(s,e,t,n,i,r,o,a,l,c)}var St=class{buildKeyframes(e,t,n,i,r,o,a,l,c,h=[]){c=c||new be;let u=new Et(e,t,c,i,r,h,[]);u.options=l;let S=l.delay?G(l.delay):0;u.currentTimeline.delayNextStep(S),u.currentTimeline.setStyles([o],null,u.errors,l),k(this,n,u);let y=u.timelines.filter(m=>m.containsAnimation());if(y.length&&a.size){let m;for(let g=y.length-1;g>=0;g--){let T=y[g];if(T.element===t){m=T;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([a],null,u.errors,l)}return y.length?y.map(m=>m.buildKeyframes()):[Ot(t,[],[],[],0,S,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let n=t.subInstructions.get(t.element);if(n){let i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,i,i.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,n),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,n){for(let i of e){let r=i?.delay;if(r){let o=typeof r=="number"?r:G(Te(r,i?.params??{},t.errors));n.delayNextStep(o)}}}_visitSubInstructions(e,t,n){let r=t.currentTimeline.currentTime,o=n.duration!=null?G(n.duration):null,a=n.delay!=null?G(n.delay):null;return o!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,o,a);r=Math.max(r,c.duration+c.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),k(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let n=t.subContextCount,i=t,r=e.options;if(r&&(r.params||r.delay)&&(i=t.createSubContext(r),i.transformIntoNewTimeline(),r.delay!=null)){i.previousNode.type==_.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Ve);let o=G(r.delay);i.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>k(this,o,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let n=[],i=t.currentTimeline.currentTime,r=e.options&&e.options.delay?G(e.options.delay):0;e.steps.forEach(o=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),k(this,o,a),i=Math.max(i,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(i),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let n=e.strValue,i=t.params?Te(n,t.params,t.errors):n;return qe(i,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let n=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),i.snapshotCurrentStyles());let r=e.style;r.type==_.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(n.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let n=t.currentTimeline,i=t.currentAnimateTimings;!i&&n.hasCurrentStyleProperties()&&n.forwardFrame();let r=i&&i.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(r):n.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let n=t.currentAnimateTimings,i=t.currentTimeline.duration,r=n.duration,a=t.createSubContext().currentTimeline;a.easing=n.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*r),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(i+r),t.previousNode=e}visitQuery(e,t){let n=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?G(i.delay):0;r&&(t.previousNode.type===_.Style||n==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Ve);let o=n,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,h)=>{t.currentQueryIndex=h;let u=t.createSubContext(e.options,c);r&&u.delayNextStep(r),c===t.element&&(l=u.currentTimeline),k(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let S=u.currentTimeline.currentTime;o=Math.max(o,S)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let n=t.parentContext,i=t.currentTimeline,r=e.timings,o=Math.abs(r.duration),a=o*(t.currentQueryTotal-1),l=o*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=n.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let u=h.currentTime;k(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)}},Ve={},Et=class s{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Ve;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,n,i,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=r,this.errors=o,this.timelines=a,this.currentTimeline=l||new He(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let n=e,i=this.options;n.duration!=null&&(i.duration=G(n.duration)),n.delay!=null&&(i.delay=G(n.delay));let r=n.params;if(r){let o=i.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=Te(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let n=e.params={};Object.keys(t).forEach(i=>{n[i]=t[i]})}}return e}createSubContext(e=null,t,n){let i=t||this.element,r=new s(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=Ve,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){let i={duration:t??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},r=new vt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,n,i,r,o){let a=[];if(i&&a.push(this.element),e.length>0){e=e.replace(Ti,"."+this._enterClassName),e=e.replace(wi,"."+this._leaveClassName);let l=n!=1,c=this._driver.query(this.element,e,l);n!==0&&(c=n<0?c.slice(c.length+n,c.length):c.slice(0,n)),a.push(...c)}return!r&&a.length==0&&o.push(zs(t)),a}},He=class s{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,n,i){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=i,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new s(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Ei,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||Q),this._currentKeyframe.set(t,Q);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,i){t&&this._previousKeyframe.set("easing",t);let r=i&&i.params||{},o=Ai(e,this._globalTimelineStyles);for(let[a,l]of o){let c=Te(l,r,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Q),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,n)=>{let i=this._styleSummary.get(n);(!i||t.time>i.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,n=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((h,u)=>{h===Ie?e.add(u):h===Q&&t.add(u)}),n||c.set("offset",l/this.duration),i.push(c)});let r=[...e.values()],o=[...t.values()];if(n){let a=i[0],l=new Map(a);a.set("offset",0),l.set("offset",1),i=[a,l]}return Ot(this.element,i,r,o,this.duration,this.startTime,this.easing,!1)}},vt=class extends He{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,n,i,r,o,a=!1){super(e,t,o.delay),this.keyframes=n,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=n+t,a=t/o,l=new Map(e[0]);l.set("offset",0),r.push(l);let c=new Map(e[0]);c.set("offset",Kn(a)),r.push(c);let h=e.length-1;for(let u=1;u<=h;u++){let S=new Map(e[u]),y=S.get("offset"),m=t+y*n;S.set("offset",Kn(m/o)),r.push(S)}n=o,t=0,i="",e=r}return Ot(this.element,e,this.preStyleProps,this.postStyleProps,n,t,i,!0)}};function Kn(s,e=3){let t=Math.pow(10,e-1);return Math.round(s*t)/t}function Ai(s,e){let t=new Map,n;return s.forEach(i=>{if(i==="*"){n??=e.keys();for(let r of n)t.set(r,Q)}else for(let[r,o]of i)t.set(r,o)}),t}function jn(s,e,t,n,i,r,o,a,l,c,h,u,S){return{type:0,element:s,triggerName:e,isRemovalTransition:i,fromState:t,fromStyles:r,toState:n,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:S}}var ct={},Ge=class{_triggerName;ast;_stateStyles;constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,i){return Mi(this.ast.matchers,e,t,n,i)}buildStyles(e,t,n){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(t,n):new Map}build(e,t,n,i,r,o,a,l,c,h){let u=[],S=this.ast.options&&this.ast.options.params||ct,y=a&&a.params||ct,m=this.buildStyles(n,y,u),g=l&&l.params||ct,T=this.buildStyles(i,g,u),w=new Set,A=new Map,N=new Map,P=i==="void",de={params:ss(g,S),delay:this.ast.options?.delay},B=h?[]:ns(e,t,this.ast.animation,r,o,m,T,de,c,u),C=0;return B.forEach(F=>{C=Math.max(F.duration+F.delay,C)}),u.length?jn(t,this._triggerName,n,i,P,m,T,[],[],A,N,C,u):(B.forEach(F=>{let te=F.element,me=O(A,te,new Set);F.preStyleProps.forEach(ne=>me.add(ne));let It=O(N,te,new Set);F.postStyleProps.forEach(ne=>It.add(ne)),te!==t&&w.add(te)}),jn(t,this._triggerName,n,i,P,m,T,B,[...w.values()],A,N,C))}};function Mi(s,e,t,n,i){return s.some(r=>r(e,t,n,i))}function ss(s,e){let t=Pe({},e);return Object.entries(s).forEach(([n,i])=>{i!=null&&(t[n]=i)}),t}var Tt=class{styles;defaultParams;normalizer;constructor(e,t,n){this.styles=e,this.defaultParams=t,this.normalizer=n}buildStyles(e,t){let n=new Map,i=ss(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=Te(o,i,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),n.set(a,o)})}),n}};function Pi(s,e,t){return new bt(s,e,t)}var bt=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,n){this.name=e,this.ast=t,this._normalizer=n,t.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new Tt(i.style,r,n))}),qn(this.states,"true","1"),qn(this.states,"false","0"),t.transitions.forEach(i=>{this.transitionFactories.push(new Ge(e,i,this.states))}),this.fallbackTransition=Di(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,i){return this.transitionFactories.find(o=>o.match(e,t,n,i))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}};function Di(s,e,t){let n=[(o,a)=>!0],i={type:_.Sequence,steps:[],options:null},r={type:_.Transition,animation:i,matchers:n,options:null,queryCount:0,depCount:0};return new Ge(s,r,e)}function qn(s,e,t){s.has(e)?s.has(t)||s.set(t,s.get(e)):s.has(t)&&s.set(e,s.get(t))}var Ni=new be,wt=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n}register(e,t){let n=[],i=[],r=ts(this._driver,t,n,i);if(n.length)throw Us(n);i.length&&void 0,this._animations.set(e,r)}_buildPlayer(e,t,n){let i=e.element,r=xn(this._normalizer,e.keyframes,t,n);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){let i=[],r=this._animations.get(e),o,a=new Map;if(r?(o=ns(this._driver,t,r,Xn,mt,new Map,new Map,n,Ni,i),o.forEach(h=>{let u=O(a,h.element,new Map);h.postStyleProps.forEach(S=>u.set(S,null))})):(i.push(Qs()),o=[]),i.length)throw Vs(i);a.forEach((h,u)=>{h.forEach((S,y)=>{h.set(y,this._driver.computeStyle(u,y,Q))})});let l=o.map(h=>{let u=a.get(h.element);return this._buildPlayer(h,new Map,u)}),c=ee(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Hs(e);return t}listen(e,t,n,i){let r=Nt(t,"","","");return Dt(this._getPlayer(e),n,r,i),()=>{}}command(e,t,n,i){if(n=="register"){this.register(e,i[0]);return}if(n=="create"){let o=i[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e);break}}},Un="ng-animate-queued",Ci=".ng-animate-queued",ut="ng-animate-disabled",Fi=".ng-animate-disabled",Ri="ng-star-inserted",ki=".ng-star-inserted",Oi=[],is={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Ii={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},$="__ng_removed",we=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let n=e&&e.hasOwnProperty("value"),i=n?e.value:e;if(this.value=$i(i),n){let r=e,{value:o}=r,a=Bt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let n=this.options.params;Object.keys(t).forEach(i=>{n[i]==null&&(n[i]=t[i])})}}},ve="void",ht=new we(ve),At=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this._hostClassName="ng-tns-"+e,L(t,this._hostClassName)}listen(e,t,n,i){if(!this._triggers.has(t))throw Gs(n,t);if(n==null||n.length==0)throw xs(t);if(!zi(n))throw Ws(n,t);let r=O(this._elementListeners,e,[]),o={name:t,phase:n,callback:i};r.push(o);let a=O(this._engine.statesByElement,e,new Map);return a.has(t)||(L(e,Le),L(e,Le+"-"+t),a.set(t,ht)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(o);l>=0&&r.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Js(e);return t}trigger(e,t,n,i=!0){let r=this._getTrigger(t),o=new Ae(this.id,t,e),a=this._engine.statesByElement.get(e);a||(L(e,Le),L(e,Le+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new we(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=ht),!(c.value===ve)&&l.value===c.value){if(!ji(l.params,c.params)){let g=[],T=r.matchStyles(l.value,l.params,g),w=r.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{ce(e,T),V(e,w)})}return}let S=O(this._engine.playersByElement,e,[]);S.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,c.value,e,c.params),m=!1;if(!y){if(!i)return;y=r.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:c,player:o,isFallbackTransition:m}),m||(L(e,Un),o.onStart(()=>{ye(e,Un)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let T=this._engine.playersByElement.get(e);if(T){let w=T.indexOf(o);w>=0&&T.splice(w,1)}}),this.players.push(o),S.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(i=>i.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let n=this._engine.driver.query(e,je,!0);n.forEach(i=>{if(i[$])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(o=>o.triggerLeaveAnimation(i,t,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,t,n,i){let r=this._engine.statesByElement.get(e),o=new Map;if(r){let a=[];if(r.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){let h=this.trigger(e,c,ve,i);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),n&&ee(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(t&&n){let i=new Set;t.forEach(r=>{let o=r.name;if(i.has(o))return;i.add(o);let l=this._triggers.get(o).fallbackTransition,c=n.get(o)||ht,h=new we(ve),u=new Ae(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:h,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let i=!1;if(n.totalAnimations){let r=n.players.length?n.playersByQueriedElement.get(e):[];if(r&&r.length)i=!0;else{let o=e;for(;o=o.parentNode;)if(n.statesByElement.get(o)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)n.markElementAsRemoved(this.id,e,!1,t);else{let r=e[$];(!r||r===is)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){L(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(n=>{let i=n.player;if(i.destroyed)return;let r=n.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==n.triggerName){let l=Nt(r,n.triggerName,n.fromState.value,n.toState.value);l._data=e,Dt(n.player,a.phase,l,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(n)}),this._queue=[],t.sort((n,i)=>{let r=n.transition.ast.depCount,o=i.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(n.element,i.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Mt=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,t){let n=new At(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){let n=this._namespaceList,i=this.namespacesByHostElement;if(n.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=i.get(a);if(l){let c=n.indexOf(l);n.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||n.unshift(e)}else n.push(e);return i.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let i=this._namespaceLookup[e];i&&i.register(t,n)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let i=this._namespaceList.indexOf(n);i>=0&&this._namespaceList.splice(i,1),n.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,n=this.statesByElement.get(e);if(n){for(let i of n.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&t.add(r)}}return t}trigger(e,t,n,i){if(Be(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,n,i),!0}return!1}insertNode(e,t,n,i){if(!Be(t))return;let r=t[$];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(t,n)}i&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),L(e,ut)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),ye(e,ut))}removeNode(e,t,n){if(Be(t)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(e,t,n,i,r){this.collectedLeaveElements.push(t),t[$]={namespaceId:e,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,n,i,r){return Be(t)?this._fetchNamespace(e).listen(t,n,i,r):()=>{}}_buildInstruction(e,t,n,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,je,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,ft,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return ee(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[$];if(t&&t.setForRemoval){if(e[$]=is,t.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(ut)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Fi,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,i)=>this._balanceNamespaceList(n,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],t.length?ee(t).onDone(()=>{n.forEach(i=>i())}):n.forEach(i=>i())}}reportError(e){throw Ys(e)}_flushAnimations(e,t){let n=new be,i=[],r=new Map,o=[],a=new Map,l=new Map,c=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let f=this.driver.query(d,Ci,!0);for(let p=0;p{let p=Xn+g++;m.set(f,p),d.forEach(E=>L(E,p))});let T=[],w=new Set,A=new Set;for(let d=0;dw.add(E)):A.add(f))}let N=new Map,P=Hn(S,Array.from(w));P.forEach((d,f)=>{let p=mt+g++;N.set(f,p),d.forEach(E=>L(E,p))}),e.push(()=>{y.forEach((d,f)=>{let p=m.get(f);d.forEach(E=>ye(E,p))}),P.forEach((d,f)=>{let p=N.get(f);d.forEach(E=>ye(E,p))}),T.forEach(d=>{this.processLeaveNode(d)})});let de=[],B=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let E=p.player,M=p.element;if(de.push(E),this.collectedEnterElements.length){let D=M[$];if(D&&D.setForMove){if(D.previousTriggersValues&&D.previousTriggersValues.has(p.triggerName)){let se=D.previousTriggersValues.get(p.triggerName),I=this.statesByElement.get(p.element);if(I&&I.has(p.triggerName)){let Me=I.get(p.triggerName);Me.value=se,I.set(p.triggerName,Me)}}E.destroy();return}}let K=!u||!this.driver.containsElement(u,M),R=N.get(M),x=m.get(M),b=this._buildInstruction(p,n,x,R,K);if(b.errors&&b.errors.length){B.push(b);return}if(K){E.onStart(()=>ce(M,b.fromStyles)),E.onDestroy(()=>V(M,b.toStyles)),i.push(E);return}if(p.isFallbackTransition){E.onStart(()=>ce(M,b.fromStyles)),E.onDestroy(()=>V(M,b.toStyles)),i.push(E);return}let zt=[];b.timelines.forEach(D=>{D.stretchStartingKeyframe=!0,this.disabledNodes.has(D.element)||zt.push(D)}),b.timelines=zt,n.append(M,b.timelines);let ys={instruction:b,player:E,element:M};o.push(ys),b.queriedElements.forEach(D=>O(a,D,[]).push(E)),b.preStyleProps.forEach((D,se)=>{if(D.size){let I=l.get(se);I||l.set(se,I=new Set),D.forEach((Me,tt)=>I.add(tt))}}),b.postStyleProps.forEach((D,se)=>{let I=c.get(se);I||c.set(se,I=new Set),D.forEach((Me,tt)=>I.add(tt))})});if(B.length){let d=[];B.forEach(f=>{d.push(Xs(f.triggerName,f.errors))}),de.forEach(f=>f.destroy()),this.reportError(d)}let C=new Map,F=new Map;o.forEach(d=>{let f=d.element;n.has(f)&&(F.set(f,f),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,C))}),i.forEach(d=>{let f=d.element;this._getPreviousPlayers(f,!1,d.namespaceId,d.triggerName,null).forEach(E=>{O(C,f,[]).push(E),E.destroy()})});let te=T.filter(d=>Gn(d,l,c)),me=new Map;Vn(me,this.driver,A,c,Q).forEach(d=>{Gn(d,l,c)&&te.push(d)});let ne=new Map;y.forEach((d,f)=>{Vn(ne,this.driver,new Set(d),l,Ie)}),te.forEach(d=>{let f=me.get(d),p=ne.get(d);me.set(d,new Map([...f?.entries()??[],...p?.entries()??[]]))});let et=[],Lt=[],$t={};o.forEach(d=>{let{element:f,player:p,instruction:E}=d;if(n.has(f)){if(h.has(f)){p.onDestroy(()=>V(f,E.toStyles)),p.disabled=!0,p.overrideTotalTime(E.totalTime),i.push(p);return}let M=$t;if(F.size>1){let R=f,x=[];for(;R=R.parentNode;){let b=F.get(R);if(b){M=b;break}x.push(R)}x.forEach(b=>F.set(b,M))}let K=this._buildAnimation(p.namespaceId,E,C,r,ne,me);if(p.setRealPlayer(K),M===$t)et.push(p);else{let R=this.playersByElement.get(M);R&&R.length&&(p.parentPlayer=ee(R)),i.push(p)}}else ce(f,E.fromStyles),p.onDestroy(()=>V(f,E.toStyles)),Lt.push(p),h.has(f)&&i.push(p)}),Lt.forEach(d=>{let f=r.get(d.element);if(f&&f.length){let p=ee(f);d.setRealPlayer(p)}}),i.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d!K.destroyed);M.length?Bi(this,f,M):this.processLeaveNode(f)}return T.length=0,et.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let f=this.players.indexOf(d);this.players.splice(f,1)}),d.play()}),et}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,i,r){let o=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let l=!r||r==ve;a.forEach(c=>{c.queued||!l&&c.triggerName!=i||o.push(c)})}}return(n||i)&&(o=o.filter(a=>!(n&&n!=a.namespaceId||i&&i!=a.triggerName))),o}_beforeAnimationBuild(e,t,n){let i=t.triggerName,r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:i;for(let l of t.timelines){let c=l.element,h=c!==r,u=O(n,c,[]);this._getPreviousPlayers(c,h,o,a,t.toState).forEach(y=>{let m=y.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),y.destroy(),u.push(y)})}ce(r,t.fromStyles)}_buildAnimation(e,t,n,i,r,o){let a=t.triggerName,l=t.element,c=[],h=new Set,u=new Set,S=t.timelines.map(m=>{let g=m.element;h.add(g);let T=g[$];if(T&&T.removedBeforeQueried)return new Z(m.duration,m.delay);let w=g!==l,A=Ki((n.get(g)||Oi).map(C=>C.getRealPlayer())).filter(C=>{let F=C;return F.element?F.element===g:!1}),N=r.get(g),P=o.get(g),de=xn(this._normalizer,m.keyframes,N,P),B=this._buildPlayer(m,de,A);if(m.subTimeline&&i&&u.add(g),w){let C=new Ae(e,a,g);C.setRealPlayer(B),c.push(C)}return B});c.forEach(m=>{O(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>Li(this.playersByQueriedElement,m.element,m))}),h.forEach(m=>L(m,$n));let y=ee(S);return y.onDestroy(()=>{h.forEach(m=>ye(m,$n)),V(l,t.toStyles)}),u.forEach(m=>{O(i,m,[]).push(y)}),y}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new Z(e.duration,e.delay)}},Ae=class{namespaceId;triggerName;element;_player=new Z;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,n)=>{t.forEach(i=>Dt(e,n,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){O(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function Li(s,e,t){let n=s.get(e);if(n){if(n.length){let i=n.indexOf(t);n.splice(i,1)}n.length==0&&s.delete(e)}return n}function $i(s){return s??null}function Be(s){return s&&s.nodeType===1}function zi(s){return s=="start"||s=="done"}function Qn(s,e){let t=s.style.display;return s.style.display=e??"none",t}function Vn(s,e,t,n,i){let r=[];t.forEach(l=>r.push(Qn(l)));let o=[];n.forEach((l,c)=>{let h=new Map;l.forEach(u=>{let S=e.computeStyle(c,u,i);h.set(u,S),(!S||S.length==0)&&(c[$]=Ii,o.push(c))}),s.set(c,h)});let a=0;return t.forEach(l=>Qn(l,r[a++])),o}function Hn(s,e){let t=new Map;if(s.forEach(a=>t.set(a,[])),e.length==0)return t;let n=1,i=new Set(e),r=new Map;function o(a){if(!a)return n;let l=r.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:i.has(c)?l=n:l=o(c),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==n&&t.get(l).push(a)}),t}function L(s,e){s.classList?.add(e)}function ye(s,e){s.classList?.remove(e)}function Bi(s,e,t){ee(t).onDone(()=>s.processLeaveNode(e))}function Ki(s){let e=[];return rs(s,e),e}function rs(s,e){for(let t=0;ti.add(r)):e.set(s,n),t.delete(s),!0}var _e=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,n){this._driver=t,this._normalizer=n,this._transitionEngine=new Mt(e.body,t,n),this._timelineEngine=new wt(e.body,t,n),this._transitionEngine.onRemovalComplete=(i,r)=>this.onRemovalComplete(i,r)}registerTrigger(e,t,n,i,r){let o=e+"-"+i,a=this._triggerCache[o];if(!a){let l=[],c=[],h=ts(this._driver,r,l,c);if(l.length)throw js(i,l);c.length&&void 0,a=Pi(i,h,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,i,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,n,i){this._transitionEngine.insertNode(e,t,n,i)}onRemove(e,t,n){this._transitionEngine.removeNode(e,t,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,i){if(n.charAt(0)=="@"){let[r,o]=In(n),a=i;this._timelineEngine.command(r,t,o,a)}else this._transitionEngine.trigger(e,t,n,i)}listen(e,t,n,i,r){if(n.charAt(0)=="@"){let[o,a]=In(n);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,n,i,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function qi(s,e){let t=null,n=null;return Array.isArray(e)&&e.length?(t=dt(e[0]),e.length>1&&(n=dt(e[e.length-1]))):e instanceof Map&&(t=dt(e)),t||n?new Ui(s,t,n):null}var Ui=(()=>{class s{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,n,i){this._element=t,this._startStyles=n,this._endStyles=i;let r=s.initialStylesByElement.get(t);r||s.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&V(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(V(this._element,this._initialStyles),this._endStyles&&(V(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(s.initialStylesByElement.delete(this._element),this._startStyles&&(ce(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ce(this._element,this._endStyles),this._endStyles=null),V(this._element,this._initialStyles),this._state=3)}}return s})();function dt(s){let e=null;return s.forEach((t,n)=>{Qi(n)&&(e=e||new Map,e.set(n,t))}),e}function Qi(s){return s==="display"||s==="position"}var xe=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,n,i){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=i,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(e,t,n){return e.animate(this._convertKeyframesToObject(t),n)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,i)=>{i!=="offset"&&e.set(i,this._finished?n:kt(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},We=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return Wn(e,t)}getParentElement(e){return Ct(e)}query(e,t,n){return Jn(e,t,n)}computeStyle(e,t,n){return kt(e,t)}animate(e,t,n,i,r,o=[]){let a=i==0?"both":"forwards",l={duration:n,delay:i,fill:a};r&&(l.easing=r);let c=new Map,h=o.filter(y=>y instanceof xe);ci(n,i)&&h.forEach(y=>{y.currentSnapshot.forEach((m,g)=>c.set(g,m))});let u=oi(t).map(y=>new Map(y));u=ui(e,u,c);let S=qi(e,u);return new xe(e,u,l,S)}};var Ke="@",os="@.disabled",Je=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,n,i){this.namespaceId=e,this.delegate=t,this.engine=n,this._onDestroy=i}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,n,i=!0){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,i)}removeChild(e,t,n){this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,n,i){this.delegate.setAttribute(e,t,n,i)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,i){this.delegate.setStyle(e,t,n,i)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){t.charAt(0)==Ke&&t==os?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n){return this.delegate.listen(e,t,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},Pt=class extends Je{factory;constructor(e,t,n,i,r){super(t,n,i,r),this.factory=e,this.namespaceId=t}setProperty(e,t,n){t.charAt(0)==Ke?t.charAt(1)=="."&&t==os?(n=n===void 0?!0:!!n,this.disableAnimations(e,n)):this.engine.process(this.namespaceId,e,t.slice(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n){if(t.charAt(0)==Ke){let i=Vi(e),r=t.slice(1),o="";return r.charAt(0)!=Ke&&([r,o]=Hi(r)),this.engine.listen(this.namespaceId,i,r,o,a=>{let l=a._data||-1;this.factory.scheduleListenerCallback(l,n,a)})}return this.delegate.listen(e,t,n)}};function Vi(s){switch(s){case"body":return document.body;case"document":return document;case"window":return window;default:return s}}function Hi(s){let e=s.indexOf("."),t=s.substring(0,e),n=s.slice(e+1);return[t,n]}var Ye=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,t.onRemovalComplete=(i,r)=>{r?.removeChild(null,i)}}createRenderer(e,t){let n="",i=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,h=c.get(i);if(!h){let u=()=>c.delete(i);h=new Je(n,i,this.engine,u),c.set(i,h)}return h}let r=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(r,o,e,c.name,c)};return t.data.animation.forEach(a),new Pt(this,o,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){if(e>=0&&et(n));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{let[o,a]=r;o(a)}),this._animationCallbacksBuffer=[]})}),i.push([t,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var xi=(()=>{class s extends _e{constructor(t,n,i){super(t,n,i)}ngOnDestroy(){this.flush()}static \u0275fac=function(n){return new(n||s)(j(nn),j(ue),j(he))};static \u0275prov=W({token:s,factory:s.\u0275fac})}return s})();function Wi(){return new Ue}function Ji(s,e,t){return new Ye(s,e,t)}var as=[{provide:he,useFactory:Wi},{provide:_e,useClass:xi},{provide:Gt,useFactory:Ji,deps:[cn,_e,De]}],Yi=[{provide:ue,useFactory:()=>new We},{provide:nt,useValue:"BrowserAnimations"},...as],kr=[{provide:ue,useClass:Ft},{provide:nt,useValue:"NoopAnimations"},...as];function ls(){return Ht("NgEagerAnimations"),[...Yi]}var Xe=class{http;prefix;suffix;constructor(e,t="/assets/i18n/",n=".json"){this.http=e,this.prefix=t,this.suffix=n}getTranslation(e){return this.http.get(`${this.prefix}${e}${this.suffix}`)}};function Xi(s,e){if(s&1&&(U(0,"li")(1,"h2")(2,"a",1),re(3),fe(4,"translate"),Y()()()),s&2){let t,n=e.$implicit;q(2),Ne("routerLink","/"+n.path),q(),Re(" ",pe(4,2,((t=n.name)!==null&&t!==void 0?t:n.path)+".title")," ")}}var cs=(()=>{class s{constructor(){this.sections=[{path:"dashboard"},{path:"presence-control"},{path:"open-absences"},{path:"edit-absences"},{path:"evaluate-absences"},{path:"events"},{path:"events/current",name:"events.current"},{path:"my-absences"},{path:"my-profile"},{path:"my-grades"},{path:"my-settings"}]}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-home"]],decls:3,vars:0,consts:[[1,"mt-3"],[3,"routerLink"]],template:function(n,i){n&1&&(U(0,"ul",0),Ce(1,Xi,5,4,"li",null,Yt),Y()),n&2&&(q(),Fe(i.sections))},dependencies:[dn,Oe],encapsulation:2,changeDetection:0})}}return s})();var us=(()=>{class s{constructor(){}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=J({type:s,selectors:[["bkd-unauthenticated"]],decls:4,vars:3,consts:[[1,"bkd-container"],[1,"alert","alert-danger","my-3"]],template:function(n,i){n&1&&(U(0,"div",0)(1,"div",1),re(2),fe(3,"translate"),Y()()),n&2&&(q(2),Re(" ",pe(3,1,"unauthenticated.message")," "))},dependencies:[Oe],encapsulation:2})}}return s})();var Ze=(()=>{class s{constructor(t){this.storage=t}get isAuthenticated(){return!!this.accessToken}get accessToken(){return this.storage.getAccessToken()}static{this.\u0275fac=function(n){return new(n||s)(j(Tn))}}static{this.\u0275prov=W({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();function z(){return()=>{let s=H(Ze),e=H(ke);return s.isAuthenticated?!0:(e.navigate(["/unauthenticated"]),!1)}}var hs=[{path:"dashboard",canActivate:[z()],loadChildren:()=>import("./chunk-U3A3T7IE.js").then(s=>s.DASHBOARD_ROUTES)},{path:"presence-control",canActivate:[z()],loadChildren:()=>import("./chunk-VFFZAFLB.js").then(s=>s.PRESENCE_CONTROL_ROUTES)},{path:"open-absences",canActivate:[z()],loadChildren:()=>import("./chunk-S4T5K3GB.js").then(s=>s.OPEN_ABSENCES_ROUTES)},{path:"edit-absences",canActivate:[z()],loadChildren:()=>import("./chunk-PUOIWHIP.js").then(s=>s.EDIT_ABSENCES_ROUTES)},{path:"evaluate-absences",canActivate:[z()],loadChildren:()=>import("./chunk-DKHMWL57.js").then(s=>s.EVALUATE_ABSENCES_ROUTES)},{path:"events",canActivate:[z()],loadChildren:()=>import("./chunk-3K4NZPMP.js").then(s=>s.EVENTS_ROUTES)},{path:"my-absences",canActivate:[z()],loadChildren:()=>import("./chunk-7LHHIW7H.js").then(s=>s.MY_ABSENCES_ROUTES)},{path:"my-profile",canActivate:[z()],loadChildren:()=>import("./chunk-4RWZ7N7L.js").then(s=>s.MY_PROFILE_ROUTES)},{path:"my-grades",canActivate:[z()],loadChildren:()=>import("./chunk-7KV2DHNF.js").then(s=>s.MY_GRADES_ROUTES)},{path:"my-settings",canActivate:[z()],loadChildren:()=>import("./chunk-B47FYJ6R.js").then(s=>s.MY_SETTINGS_ROUTES)},{path:"unauthenticated",component:us},{path:"",component:cs,pathMatch:"full"}];function ds(){return(s,e)=>{let t=H(Ze),n=H(X);if(s.url.startsWith(n.apiUrl)&&t.accessToken){let i=s.headers.set("Authorization",`Bearer ${t.accessToken}`);return e(s.clone({headers:i}))}return e(s)}}function ms(){return(s,e)=>{let t=H(X);if(!s.headers.has("X-Role-Restriction")&&t.headerRoleRestriction){let n=Zi();if(n&&t.headerRoleRestriction[n]){let i=s.headers.set("X-Role-Restriction",t.headerRoleRestriction[n]);return e(s.clone({headers:i}))}}return e(s)}}function Zi(){let s=H(ke),e=s.url?An(s.url):null;return e?yn(e):null}function fs(){return[{provide:Vt,useClass:er}]}var er=(()=>{class s{constructor(t,n,i){this.ngZone=t,this.translate=n,this.toastService=i}handleError(t){console.error(String(t)),t instanceof rn||this.notifyError()}notifyError(){this.ngZone.run(()=>{this.toastService.error(this.translate.instant("global.app-errors.exception-message"),this.translate.instant("global.app-errors.exception-title"))})}static{this.\u0275fac=function(n){return new(n||s)(j(De),j(En),j(ge))}}static{this.\u0275prov=W({token:s,factory:s.\u0275fac})}}return s})();function tr(s,e){return new Xe(s,`${e.scriptsAndAssetsPath}/assets/locales/`,".json")}var ps={providers:[mn(hs,fn()),an(ln([Mn(),ds(),ms()])),ls(),fs(),vn({loader:{provide:Sn,useFactory:tr,deps:[on,X]}}),bn()]};var gs={production:!0};gs.production&&void 0;rt(Pn);rt(Dn);un(Rn,ps).catch(s=>console.error(s));