Files
doneit-web/_platforms/browser/www/7732-es2015.67e56c5b5449425c4cba.js
T
tiago.kayaya 24e2a8f518 save
2021-08-18 18:58:02 +01:00

1 line
102 KiB
JavaScript

(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[7732],{87732:function(e,t,n){"use strict";n.d(t,{eV:function(){return cn},S4:function(){return pn}});var i=n(64762),o=n(37716),a=n(38583),l=n(35957),r=n(79765);const s=["monthSlider"];function c(e,t){if(1&e&&(o.TgZ(0,"th"),o.TgZ(1,"small"),o._uU(2),o.qZA(),o.qZA()),2&e){const e=t.$implicit;o.xp6(2),o.Oqu(e)}}function d(e,t){}const p=function(e,t,n){return{view:e,row:t,col:n}};function g(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"td",7),o.NdJ("click",function(){const t=o.CHM(e).$implicit,n=o.oxw().$implicit,i=o.oxw(2);return i.select(i.views[0].dates[7*n+t])}),o.YNc(1,d,0,0,"ng-template",3),o.qZA()}if(2&e){const e=t.$implicit,n=o.oxw().$implicit,i=o.oxw(2);o.Q6J("ngClass",i.getHighlightClass(i.views[0].dates[7*n+e])),o.xp6(1),o.Q6J("ngTemplateOutlet",i.monthviewDisplayEventTemplate)("ngTemplateOutletContext",o.kEZ(3,p,i.views[0],n,e))}}const h=function(){return[0,1,2,3,4,5,6]};function v(e,t){1&e&&(o.TgZ(0,"tr"),o.YNc(1,g,2,7,"td",6),o.qZA()),2&e&&(o.xp6(1),o.Q6J("ngForOf",o.DdM(1,h)))}const u=function(){return[0,1,2,3,4,5]};function m(e,t){if(1&e&&(o.TgZ(0,"table",4),o.TgZ(1,"thead"),o.TgZ(2,"tr"),o.YNc(3,c,3,1,"th",5),o.qZA(),o.qZA(),o.TgZ(4,"tbody"),o.YNc(5,v,2,2,"tr",5),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(3),o.Q6J("ngForOf",e.views[0].dayHeaders),o.xp6(2),o.Q6J("ngForOf",o.DdM(2,u))}}function w(e,t){if(1&e&&(o.TgZ(0,"th"),o.TgZ(1,"small"),o._uU(2),o.qZA(),o.qZA()),2&e){const e=t.$implicit;o.xp6(2),o.Oqu(e)}}function f(e,t){}function T(e,t){if(1&e&&(o.TgZ(0,"td"),o.YNc(1,f,0,0,"ng-template",3),o.qZA()),2&e){const e=t.$implicit,n=o.oxw().$implicit,i=o.oxw(2);o.xp6(1),o.Q6J("ngTemplateOutlet",i.monthviewInactiveDisplayEventTemplate)("ngTemplateOutletContext",o.kEZ(2,p,i.views[0],n,e))}}function y(e,t){1&e&&(o.TgZ(0,"tr"),o.YNc(1,T,2,6,"td",5),o.qZA()),2&e&&(o.xp6(1),o.Q6J("ngForOf",o.DdM(1,h)))}function S(e,t){if(1&e&&(o.TgZ(0,"table",4),o.TgZ(1,"thead"),o.TgZ(2,"tr",8),o.YNc(3,w,3,1,"th",5),o.qZA(),o.qZA(),o.TgZ(4,"tbody"),o.YNc(5,y,2,2,"tr",5),o._UZ(6,"tr"),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(3),o.Q6J("ngForOf",e.views[0].dayHeaders),o.xp6(2),o.Q6J("ngForOf",o.DdM(2,u))}}function b(e,t){if(1&e&&(o.TgZ(0,"th"),o.TgZ(1,"small"),o._uU(2),o.qZA(),o.qZA()),2&e){const e=t.$implicit;o.xp6(2),o.Oqu(e)}}function x(e,t){}function D(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"td",7),o.NdJ("click",function(){const t=o.CHM(e).$implicit,n=o.oxw().$implicit,i=o.oxw(2);return i.select(i.views[1].dates[7*n+t])}),o.YNc(1,x,0,0,"ng-template",3),o.qZA()}if(2&e){const e=t.$implicit,n=o.oxw().$implicit,i=o.oxw(2);o.Q6J("ngClass",i.getHighlightClass(i.views[1].dates[7*n+e])),o.xp6(1),o.Q6J("ngTemplateOutlet",i.monthviewDisplayEventTemplate)("ngTemplateOutletContext",o.kEZ(3,p,i.views[1],n,e))}}function Z(e,t){1&e&&(o.TgZ(0,"tr"),o.YNc(1,D,2,7,"td",6),o.qZA()),2&e&&(o.xp6(1),o.Q6J("ngForOf",o.DdM(1,h)))}function C(e,t){if(1&e&&(o.TgZ(0,"table",4),o.TgZ(1,"thead"),o.TgZ(2,"tr"),o.YNc(3,b,3,1,"th",5),o.qZA(),o.qZA(),o.TgZ(4,"tbody"),o.YNc(5,Z,2,2,"tr",5),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(3),o.Q6J("ngForOf",e.views[1].dayHeaders),o.xp6(2),o.Q6J("ngForOf",o.DdM(2,u))}}function I(e,t){if(1&e&&(o.TgZ(0,"th"),o.TgZ(1,"small"),o._uU(2),o.qZA(),o.qZA()),2&e){const e=t.$implicit;o.xp6(2),o.Oqu(e)}}function A(e,t){}function O(e,t){if(1&e&&(o.TgZ(0,"td"),o.YNc(1,A,0,0,"ng-template",3),o.qZA()),2&e){const e=t.$implicit,n=o.oxw().$implicit,i=o.oxw(2);o.xp6(1),o.Q6J("ngTemplateOutlet",i.monthviewInactiveDisplayEventTemplate)("ngTemplateOutletContext",o.kEZ(2,p,i.views[1],n,e))}}function k(e,t){1&e&&(o.TgZ(0,"tr"),o.YNc(1,O,2,6,"td",5),o.qZA()),2&e&&(o.xp6(1),o.Q6J("ngForOf",o.DdM(1,h)))}function E(e,t){if(1&e&&(o.TgZ(0,"table",4),o.TgZ(1,"thead"),o.TgZ(2,"tr",8),o.YNc(3,I,3,1,"th",5),o.qZA(),o.qZA(),o.TgZ(4,"tbody"),o.YNc(5,k,2,2,"tr",5),o._UZ(6,"tr"),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(3),o.Q6J("ngForOf",e.views[1].dayHeaders),o.xp6(2),o.Q6J("ngForOf",o.DdM(2,u))}}function q(e,t){if(1&e&&(o.TgZ(0,"th"),o.TgZ(1,"small"),o._uU(2),o.qZA(),o.qZA()),2&e){const e=t.$implicit;o.xp6(2),o.Oqu(e)}}function P(e,t){}function M(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"td",7),o.NdJ("click",function(){const t=o.CHM(e).$implicit,n=o.oxw().$implicit,i=o.oxw(2);return i.select(i.views[2].dates[7*n+t])}),o.YNc(1,P,0,0,"ng-template",3),o.qZA()}if(2&e){const e=t.$implicit,n=o.oxw().$implicit,i=o.oxw(2);o.Q6J("ngClass",i.getHighlightClass(i.views[2].dates[7*n+e])),o.xp6(1),o.Q6J("ngTemplateOutlet",i.monthviewDisplayEventTemplate)("ngTemplateOutletContext",o.kEZ(3,p,i.views[2],n,e))}}function N(e,t){1&e&&(o.TgZ(0,"tr"),o.YNc(1,M,2,7,"td",6),o.qZA()),2&e&&(o.xp6(1),o.Q6J("ngForOf",o.DdM(1,h)))}function H(e,t){if(1&e&&(o.TgZ(0,"table",4),o.TgZ(1,"thead"),o.TgZ(2,"tr"),o.YNc(3,q,3,1,"th",5),o.qZA(),o.qZA(),o.TgZ(4,"tbody"),o.YNc(5,N,2,2,"tr",5),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(3),o.Q6J("ngForOf",e.views[2].dayHeaders),o.xp6(2),o.Q6J("ngForOf",o.DdM(2,u))}}function F(e,t){if(1&e&&(o.TgZ(0,"th"),o.TgZ(1,"small"),o._uU(2),o.qZA(),o.qZA()),2&e){const e=t.$implicit;o.xp6(2),o.Oqu(e)}}function J(e,t){}function Y(e,t){if(1&e&&(o.TgZ(0,"td"),o.YNc(1,J,0,0,"ng-template",3),o.qZA()),2&e){const e=t.$implicit,n=o.oxw().$implicit,i=o.oxw(2);o.xp6(1),o.Q6J("ngTemplateOutlet",i.monthviewInactiveDisplayEventTemplate)("ngTemplateOutletContext",o.kEZ(2,p,i.views[2],n,e))}}function _(e,t){1&e&&(o.TgZ(0,"tr"),o.YNc(1,Y,2,6,"td",5),o.qZA()),2&e&&(o.xp6(1),o.Q6J("ngForOf",o.DdM(1,h)))}function Q(e,t){if(1&e&&(o.TgZ(0,"table",4),o.TgZ(1,"thead"),o.TgZ(2,"tr",8),o.YNc(3,F,3,1,"th",5),o.qZA(),o.qZA(),o.TgZ(4,"tbody"),o.YNc(5,_,2,2,"tr",5),o._UZ(6,"tr"),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(3),o.Q6J("ngForOf",e.views[2].dayHeaders),o.xp6(2),o.Q6J("ngForOf",o.DdM(2,u))}}function V(e,t){}const B=function(e,t,n){return{showEventDetail:e,selectedDate:t,noEventsLabel:n}},U=["weekSlider"];function L(e,t){}const $=function(e){return{viewDate:e}};function W(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"th",7),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw().daySelected(t)}),o.YNc(1,L,0,0,"ng-template",8),o.qZA()}if(2&e){const e=t.$implicit,n=o.oxw();o.Q6J("ngClass",n.getHighlightClass(e)),o.xp6(1),o.Q6J("ngTemplateOutlet",n.weekviewHeaderTemplate)("ngTemplateOutletContext",o.VKq(3,$,e))}}function R(e,t){}const j=function(e,t){return{day:e,eventTemplate:t}};function K(e,t){if(1&e&&(o.TgZ(0,"td",17),o.YNc(1,R,0,0,"ng-template",8),o.qZA()),2&e){const e=t.$implicit,n=o.oxw(2);o.xp6(1),o.Q6J("ngTemplateOutlet",n.weekviewAllDayEventSectionTemplate)("ngTemplateOutletContext",o.WLB(2,j,e,n.weekviewAllDayEventTemplate))}}function z(e,t){}const G=function(e,t,n){return{tm:e,hourParts:t,eventTemplate:n}};function X(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"td",20),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(3).select(t.time,t.events)}),o.YNc(1,z,0,0,"ng-template",8),o.qZA()}if(2&e){const e=t.$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngTemplateOutlet",n.weekviewNormalEventSectionTemplate)("ngTemplateOutletContext",o.kEZ(2,G,e,n.hourParts,n.weekviewNormalEventTemplate))}}function ee(e,t){if(1&e&&(o.TgZ(0,"tr"),o.TgZ(1,"td",18),o._uU(2),o.qZA(),o.YNc(3,X,2,6,"td",19),o.qZA()),2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(1),o.Q6J("ngForOf",e)}}function te(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div"),o.TgZ(1,"div",9),o.TgZ(2,"div",10),o._uU(3),o.qZA(),o.TgZ(4,"div",11),o.TgZ(5,"table",12),o.TgZ(6,"tbody"),o.TgZ(7,"tr"),o.YNc(8,K,2,5,"td",13),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(9,"init-position-scroll",14),o.NdJ("onScroll",function(t){return o.CHM(e),o.oxw().setScrollPosition(t)}),o.TgZ(10,"table",15),o.TgZ(11,"tbody"),o.YNc(12,ee,4,2,"tr",16),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=o.oxw();o.xp6(3),o.Oqu(e.allDayLabel),o.xp6(5),o.Q6J("ngForOf",e.views[0].dates),o.xp6(1),o.Q6J("initPosition",e.initScrollPosition)("emitEvent",e.preserveScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[0].rows)}}function ne(e,t){}const ie=function(e){return{day:e}};function oe(e,t){if(1&e&&(o.TgZ(0,"td",17),o.YNc(1,ne,0,0,"ng-template",8),o.qZA()),2&e){const e=t.$implicit,n=o.oxw(2);o.xp6(1),o.Q6J("ngTemplateOutlet",n.weekviewInactiveAllDayEventSectionTemplate)("ngTemplateOutletContext",o.VKq(2,ie,e))}}function ae(e,t){}const le=function(e,t){return{tm:e,hourParts:t}};function re(e,t){if(1&e&&(o.TgZ(0,"td",17),o.YNc(1,ae,0,0,"ng-template",8),o.qZA()),2&e){const e=t.$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngTemplateOutlet",n.weekviewInactiveNormalEventSectionTemplate)("ngTemplateOutletContext",o.WLB(2,le,e,n.hourParts))}}function se(e,t){if(1&e&&(o.TgZ(0,"tr"),o.TgZ(1,"td",18),o._uU(2),o.qZA(),o.YNc(3,re,2,5,"td",13),o.qZA()),2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(1),o.Q6J("ngForOf",e)}}function ce(e,t){if(1&e&&(o.TgZ(0,"div"),o.TgZ(1,"div",9),o.TgZ(2,"div",10),o._uU(3),o.qZA(),o.TgZ(4,"div",11),o.TgZ(5,"table",12),o.TgZ(6,"tbody"),o.TgZ(7,"tr"),o.YNc(8,oe,2,4,"td",13),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(9,"init-position-scroll",21),o.TgZ(10,"table",15),o.TgZ(11,"tbody"),o.YNc(12,se,4,2,"tr",16),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(3),o.Oqu(e.allDayLabel),o.xp6(5),o.Q6J("ngForOf",e.views[0].dates),o.xp6(1),o.Q6J("initPosition",e.initScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[0].rows)}}function de(e,t){}function pe(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"th",7),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw().daySelected(t)}),o.YNc(1,de,0,0,"ng-template",8),o.qZA()}if(2&e){const e=t.$implicit,n=o.oxw();o.Q6J("ngClass",n.getHighlightClass(e)),o.xp6(1),o.Q6J("ngTemplateOutlet",n.weekviewHeaderTemplate)("ngTemplateOutletContext",o.VKq(3,$,e))}}function ge(e,t){}function he(e,t){if(1&e&&(o.TgZ(0,"td",17),o.YNc(1,ge,0,0,"ng-template",8),o.qZA()),2&e){const e=t.$implicit,n=o.oxw(2);o.xp6(1),o.Q6J("ngTemplateOutlet",n.weekviewAllDayEventSectionTemplate)("ngTemplateOutletContext",o.WLB(2,j,e,n.weekviewAllDayEventTemplate))}}function ve(e,t){}const ue=function(e){return{"calendar-event-wrap":e}};function me(e,t){if(1&e&&(o.TgZ(0,"div",23),o.YNc(1,ve,0,0,"ng-template",8),o.qZA()),2&e){const e=o.oxw().$implicit,t=o.oxw(3);o.Q6J("ngClass",o.VKq(3,ue,e.events)),o.xp6(1),o.Q6J("ngTemplateOutlet",t.weekviewNormalEventSectionTemplate)("ngTemplateOutletContext",o.kEZ(5,G,e,t.hourParts,t.weekviewNormalEventTemplate))}}function we(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"td",20),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(3).select(t.time,t.events)}),o.YNc(1,me,2,9,"div",22),o.qZA()}if(2&e){const e=t.$implicit;o.xp6(1),o.Q6J("ngIf",e.events)}}function fe(e,t){if(1&e&&(o.TgZ(0,"tr"),o.TgZ(1,"td",18),o._uU(2),o.qZA(),o.YNc(3,we,2,1,"td",19),o.qZA()),2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(1),o.Q6J("ngForOf",e)}}function Te(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div"),o.TgZ(1,"div",9),o.TgZ(2,"div",10),o._uU(3),o.qZA(),o.TgZ(4,"div",11),o.TgZ(5,"table",12),o.TgZ(6,"tbody"),o.TgZ(7,"tr"),o.YNc(8,he,2,5,"td",13),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(9,"init-position-scroll",14),o.NdJ("onScroll",function(t){return o.CHM(e),o.oxw().setScrollPosition(t)}),o.TgZ(10,"table",15),o.TgZ(11,"tbody"),o.YNc(12,fe,4,2,"tr",16),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=o.oxw();o.xp6(3),o.Oqu(e.allDayLabel),o.xp6(5),o.Q6J("ngForOf",e.views[1].dates),o.xp6(1),o.Q6J("initPosition",e.initScrollPosition)("emitEvent",e.preserveScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[1].rows)}}function ye(e,t){}function Se(e,t){if(1&e&&(o.TgZ(0,"td",17),o.YNc(1,ye,0,0,"ng-template",8),o.qZA()),2&e){const e=t.$implicit,n=o.oxw(2);o.xp6(1),o.Q6J("ngTemplateOutlet",n.weekviewInactiveAllDayEventSectionTemplate)("ngTemplateOutletContext",o.VKq(2,ie,e))}}function be(e,t){}function xe(e,t){if(1&e&&(o.TgZ(0,"div",23),o.YNc(1,be,0,0,"ng-template",8),o.qZA()),2&e){const e=o.oxw().$implicit,t=o.oxw(3);o.Q6J("ngClass",o.VKq(3,ue,e.events)),o.xp6(1),o.Q6J("ngTemplateOutlet",t.weekviewInactiveNormalEventSectionTemplate)("ngTemplateOutletContext",o.WLB(5,le,e,t.hourParts))}}function De(e,t){if(1&e&&(o.TgZ(0,"td",17),o.YNc(1,xe,2,8,"div",22),o.qZA()),2&e){const e=t.$implicit;o.xp6(1),o.Q6J("ngIf",e.events)}}function Ze(e,t){if(1&e&&(o.TgZ(0,"tr"),o.TgZ(1,"td",18),o._uU(2),o.qZA(),o.YNc(3,De,2,1,"td",13),o.qZA()),2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(1),o.Q6J("ngForOf",e)}}function Ce(e,t){if(1&e&&(o.TgZ(0,"div"),o.TgZ(1,"div",9),o.TgZ(2,"div",10),o._uU(3),o.qZA(),o.TgZ(4,"div",11),o.TgZ(5,"table",12),o.TgZ(6,"tbody"),o.TgZ(7,"tr"),o.YNc(8,Se,2,4,"td",13),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(9,"init-position-scroll",21),o.TgZ(10,"table",15),o.TgZ(11,"tbody"),o.YNc(12,Ze,4,2,"tr",16),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(3),o.Oqu(e.allDayLabel),o.xp6(5),o.Q6J("ngForOf",e.views[1].dates),o.xp6(1),o.Q6J("initPosition",e.initScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[1].rows)}}function Ie(e,t){}function Ae(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"th",7),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw().daySelected(t)}),o.YNc(1,Ie,0,0,"ng-template",8),o.qZA()}if(2&e){const e=t.$implicit,n=o.oxw();o.Q6J("ngClass",n.getHighlightClass(e)),o.xp6(1),o.Q6J("ngTemplateOutlet",n.weekviewHeaderTemplate)("ngTemplateOutletContext",o.VKq(3,$,e))}}function Oe(e,t){}function ke(e,t){if(1&e&&(o.TgZ(0,"td",17),o.YNc(1,Oe,0,0,"ng-template",8),o.qZA()),2&e){const e=t.$implicit,n=o.oxw(2);o.xp6(1),o.Q6J("ngTemplateOutlet",n.weekviewAllDayEventSectionTemplate)("ngTemplateOutletContext",o.WLB(2,j,e,n.weekviewAllDayEventTemplate))}}function Ee(e,t){}function qe(e,t){if(1&e&&(o.TgZ(0,"div",23),o.YNc(1,Ee,0,0,"ng-template",8),o.qZA()),2&e){const e=o.oxw().$implicit,t=o.oxw(3);o.Q6J("ngClass",o.VKq(3,ue,e.events)),o.xp6(1),o.Q6J("ngTemplateOutlet",t.weekviewNormalEventSectionTemplate)("ngTemplateOutletContext",o.kEZ(5,G,e,t.hourParts,t.weekviewNormalEventTemplate))}}function Pe(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"td",20),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(3).select(t.time,t.events)}),o.YNc(1,qe,2,9,"div",22),o.qZA()}if(2&e){const e=t.$implicit;o.xp6(1),o.Q6J("ngIf",e.events)}}function Me(e,t){if(1&e&&(o.TgZ(0,"tr"),o.TgZ(1,"td",18),o._uU(2),o.qZA(),o.YNc(3,Pe,2,1,"td",19),o.qZA()),2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(1),o.Q6J("ngForOf",e)}}function Ne(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div"),o.TgZ(1,"div",9),o.TgZ(2,"div",10),o._uU(3),o.qZA(),o.TgZ(4,"div",11),o.TgZ(5,"table",12),o.TgZ(6,"tbody"),o.TgZ(7,"tr"),o.YNc(8,ke,2,5,"td",13),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(9,"init-position-scroll",14),o.NdJ("onScroll",function(t){return o.CHM(e),o.oxw().setScrollPosition(t)}),o.TgZ(10,"table",15),o.TgZ(11,"tbody"),o.YNc(12,Me,4,2,"tr",16),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=o.oxw();o.xp6(3),o.Oqu(e.allDayLabel),o.xp6(5),o.Q6J("ngForOf",e.views[2].dates),o.xp6(1),o.Q6J("initPosition",e.initScrollPosition)("emitEvent",e.preserveScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[2].rows)}}function He(e,t){}function Fe(e,t){if(1&e&&(o.TgZ(0,"td",17),o.YNc(1,He,0,0,"ng-template",8),o.qZA()),2&e){const e=t.$implicit,n=o.oxw(2);o.xp6(1),o.Q6J("ngTemplateOutlet",n.weekviewInactiveAllDayEventSectionTemplate)("ngTemplateOutletContext",o.VKq(2,ie,e))}}function Je(e,t){}function Ye(e,t){if(1&e&&(o.TgZ(0,"div",23),o.YNc(1,Je,0,0,"ng-template",8),o.qZA()),2&e){const e=o.oxw().$implicit,t=o.oxw(3);o.Q6J("ngClass",o.VKq(3,ue,e.events)),o.xp6(1),o.Q6J("ngTemplateOutlet",t.weekviewInactiveNormalEventSectionTemplate)("ngTemplateOutletContext",o.WLB(5,le,e,t.hourParts))}}function _e(e,t){if(1&e&&(o.TgZ(0,"td",17),o.YNc(1,Ye,2,8,"div",22),o.qZA()),2&e){const e=t.$implicit;o.xp6(1),o.Q6J("ngIf",e.events)}}function Qe(e,t){if(1&e&&(o.TgZ(0,"tr"),o.TgZ(1,"td",18),o._uU(2),o.qZA(),o.YNc(3,_e,2,1,"td",13),o.qZA()),2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(1),o.Q6J("ngForOf",e)}}function Ve(e,t){if(1&e&&(o.TgZ(0,"div"),o.TgZ(1,"div",9),o.TgZ(2,"div",10),o._uU(3),o.qZA(),o.TgZ(4,"div",11),o.TgZ(5,"table",12),o.TgZ(6,"tbody"),o.TgZ(7,"tr"),o.YNc(8,Fe,2,4,"td",13),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(9,"init-position-scroll",21),o.TgZ(10,"table",15),o.TgZ(11,"tbody"),o.YNc(12,Qe,4,2,"tr",16),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(3),o.Oqu(e.allDayLabel),o.xp6(5),o.Q6J("ngForOf",e.views[2].dates),o.xp6(1),o.Q6J("initPosition",e.initScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[2].rows)}}const Be=["daySlider"];function Ue(e,t){}const Le=function(e){return{height:e}},$e=function(e,t){return{allDayEvents:e,eventTemplate:t}};function We(e,t){if(1&e&&(o.TgZ(0,"td",11),o.YNc(1,Ue,0,0,"ng-template",12),o.qZA()),2&e){const e=o.oxw();o.Q6J("ngClass",o.VKq(4,ue,e.views[0].allDayEvents.length>0))("ngStyle",o.VKq(6,Le,25*e.views[0].allDayEvents.length+"px")),o.xp6(1),o.Q6J("ngTemplateOutlet",e.dayviewAllDayEventSectionTemplate)("ngTemplateOutletContext",o.WLB(8,$e,e.views[0].allDayEvents,e.dayviewAllDayEventTemplate))}}function Re(e,t){}const je=function(e){return{allDayEvents:e}};function Ke(e,t){if(1&e&&(o.TgZ(0,"td",13),o.YNc(1,Re,0,0,"ng-template",12),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.Q6J("ngTemplateOutlet",e.dayviewInactiveAllDayEventSectionTemplate)("ngTemplateOutletContext",o.VKq(2,je,e.views[0].allDayEvents))}}function ze(e,t){}function Ge(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"tr"),o.TgZ(1,"td",17),o._uU(2),o.qZA(),o.TgZ(3,"td",18),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(2).select(t.time,t.events)}),o.YNc(4,ze,0,0,"ng-template",12),o.qZA(),o.qZA()}if(2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(2),o.Q6J("ngTemplateOutlet",i.dayviewNormalEventSectionTemplate)("ngTemplateOutletContext",o.kEZ(3,G,e,i.hourParts,i.dayviewNormalEventTemplate))}}function Xe(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"init-position-scroll",14),o.NdJ("onScroll",function(t){return o.CHM(e),o.oxw().setScrollPosition(t)}),o.TgZ(1,"table",15),o.TgZ(2,"tbody"),o.YNc(3,Ge,5,7,"tr",16),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=o.oxw();o.Q6J("initPosition",e.initScrollPosition)("emitEvent",e.preserveScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[0].rows)}}function et(e,t){}function tt(e,t){if(1&e&&(o.TgZ(0,"tr"),o.TgZ(1,"td",17),o._uU(2),o.qZA(),o.TgZ(3,"td",13),o.YNc(4,et,0,0,"ng-template",12),o.qZA(),o.qZA()),2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(2),o.Q6J("ngTemplateOutlet",i.dayviewInactiveNormalEventSectionTemplate)("ngTemplateOutletContext",o.WLB(3,le,e,i.hourParts))}}function nt(e,t){if(1&e&&(o.TgZ(0,"init-position-scroll",19),o.TgZ(1,"table",15),o.TgZ(2,"tbody"),o.YNc(3,tt,5,6,"tr",16),o.qZA(),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.Q6J("initPosition",e.initScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[0].rows)}}function it(e,t){}function ot(e,t){if(1&e&&(o.TgZ(0,"td",11),o.YNc(1,it,0,0,"ng-template",12),o.qZA()),2&e){const e=o.oxw();o.Q6J("ngClass",o.VKq(4,ue,e.views[1].allDayEvents.length>0))("ngStyle",o.VKq(6,Le,25*e.views[1].allDayEvents.length+"px")),o.xp6(1),o.Q6J("ngTemplateOutlet",e.dayviewAllDayEventSectionTemplate)("ngTemplateOutletContext",o.WLB(8,$e,e.views[1].allDayEvents,e.dayviewAllDayEventTemplate))}}function at(e,t){}function lt(e,t){if(1&e&&(o.TgZ(0,"td",13),o.YNc(1,at,0,0,"ng-template",12),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.Q6J("ngTemplateOutlet",e.dayviewInactiveAllDayEventSectionTemplate)("ngTemplateOutletContext",o.VKq(2,je,e.views[1].allDayEvents))}}function rt(e,t){}function st(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"tr"),o.TgZ(1,"td",17),o._uU(2),o.qZA(),o.TgZ(3,"td",18),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(2).select(t.time,t.events)}),o.YNc(4,rt,0,0,"ng-template",12),o.qZA(),o.qZA()}if(2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(2),o.Q6J("ngTemplateOutlet",i.dayviewNormalEventSectionTemplate)("ngTemplateOutletContext",o.kEZ(3,G,e,i.hourParts,i.dayviewNormalEventTemplate))}}function ct(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"init-position-scroll",14),o.NdJ("onScroll",function(t){return o.CHM(e),o.oxw().setScrollPosition(t)}),o.TgZ(1,"table",15),o.TgZ(2,"tbody"),o.YNc(3,st,5,7,"tr",16),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=o.oxw();o.Q6J("initPosition",e.initScrollPosition)("emitEvent",e.preserveScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[1].rows)}}function dt(e,t){}function pt(e,t){if(1&e&&(o.TgZ(0,"tr"),o.TgZ(1,"td",17),o._uU(2),o.qZA(),o.TgZ(3,"td",13),o.YNc(4,dt,0,0,"ng-template",12),o.qZA(),o.qZA()),2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(2),o.Q6J("ngTemplateOutlet",i.dayviewInactiveNormalEventSectionTemplate)("ngTemplateOutletContext",o.WLB(3,le,e,i.hourParts))}}function gt(e,t){if(1&e&&(o.TgZ(0,"init-position-scroll",19),o.TgZ(1,"table",15),o.TgZ(2,"tbody"),o.YNc(3,pt,5,6,"tr",16),o.qZA(),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.Q6J("initPosition",e.initScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[1].rows)}}function ht(e,t){}function vt(e,t){if(1&e&&(o.TgZ(0,"td",11),o.YNc(1,ht,0,0,"ng-template",12),o.qZA()),2&e){const e=o.oxw();o.Q6J("ngClass",o.VKq(4,ue,e.views[2].allDayEvents.length>0))("ngStyle",o.VKq(6,Le,25*e.views[2].allDayEvents.length+"px")),o.xp6(1),o.Q6J("ngTemplateOutlet",e.dayviewAllDayEventSectionTemplate)("ngTemplateOutletContext",o.WLB(8,$e,e.views[2].allDayEvents,e.dayviewAllDayEventTemplate))}}function ut(e,t){}function mt(e,t){if(1&e&&(o.TgZ(0,"td",13),o.YNc(1,ut,0,0,"ng-template",12),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.Q6J("ngTemplateOutlet",e.dayviewInactiveAllDayEventSectionTemplate)("ngTemplateOutletContext",o.VKq(2,je,e.views[2].allDayEvents))}}function wt(e,t){}function ft(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"tr"),o.TgZ(1,"td",17),o._uU(2),o.qZA(),o.TgZ(3,"td",18),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(2).select(t.time,t.events)}),o.YNc(4,wt,0,0,"ng-template",12),o.qZA(),o.qZA()}if(2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(2),o.Q6J("ngTemplateOutlet",i.dayviewNormalEventSectionTemplate)("ngTemplateOutletContext",o.kEZ(3,G,e,i.hourParts,i.dayviewNormalEventTemplate))}}function Tt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"init-position-scroll",14),o.NdJ("onScroll",function(t){return o.CHM(e),o.oxw().setScrollPosition(t)}),o.TgZ(1,"table",15),o.TgZ(2,"tbody"),o.YNc(3,ft,5,7,"tr",16),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=o.oxw();o.Q6J("initPosition",e.initScrollPosition)("emitEvent",e.preserveScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[2].rows)}}function yt(e,t){}function St(e,t){if(1&e&&(o.TgZ(0,"tr"),o.TgZ(1,"td",17),o._uU(2),o.qZA(),o.TgZ(3,"td",13),o.YNc(4,yt,0,0,"ng-template",12),o.qZA(),o.qZA()),2&e){const e=t.$implicit,n=t.index,i=o.oxw(2);o.xp6(2),o.hij(" ",i.hourColumnLabels[n]," "),o.xp6(2),o.Q6J("ngTemplateOutlet",i.dayviewInactiveNormalEventSectionTemplate)("ngTemplateOutletContext",o.WLB(3,le,e,i.hourParts))}}function bt(e,t){if(1&e&&(o.TgZ(0,"init-position-scroll",19),o.TgZ(1,"table",15),o.TgZ(2,"tbody"),o.YNc(3,St,5,6,"tr",16),o.qZA(),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.Q6J("initPosition",e.initScrollPosition),o.xp6(3),o.Q6J("ngForOf",e.views[2].rows)}}function xt(e,t){1&e&&o._uU(0),2&e&&o.hij(" ",t.view.dates[7*t.row+t.col].label," ")}function Dt(e,t){if(1&e&&(o.TgZ(0,"span",21),o._uU(1),o.ALo(2,"date"),o.ALo(3,"date"),o.qZA()),2&e){const e=o.oxw().$implicit;o.xp6(1),o.AsE("",o.xi3(2,2,e.startTime,"HH:mm")," - ",o.xi3(3,5,e.endTime,"HH:mm")," ")}}function Zt(e,t){if(1&e&&(o.TgZ(0,"span",21),o._uU(1),o.qZA()),2&e){const e=o.oxw(4);o.xp6(1),o.Oqu(e.allDayLabel)}}function Ct(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"ion-item",18),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(3).eventSelected(t)}),o.YNc(1,Dt,4,8,"span",19),o.YNc(2,Zt,2,1,"span",19),o.TgZ(3,"span",20),o._uU(4),o.qZA(),o.qZA()}if(2&e){const e=t.$implicit;o.xp6(1),o.Q6J("ngIf",!e.allDay),o.xp6(1),o.Q6J("ngIf",e.allDay),o.xp6(2),o.hij(" | ",e.title,"")}}function It(e,t){if(1&e&&(o.TgZ(0,"ion-item"),o.TgZ(1,"div",22),o._uU(2),o.qZA(),o.qZA()),2&e){const e=o.oxw(2).noEventsLabel;o.xp6(2),o.Oqu(e)}}function At(e,t){if(1&e&&(o.TgZ(0,"ion-list",15),o.YNc(1,Ct,5,3,"ion-item",16),o.YNc(2,It,3,1,"ion-item",17),o.qZA()),2&e){const e=o.oxw().selectedDate;o.xp6(1),o.Q6J("ngForOf",null==e?null:e.events),o.xp6(1),o.Q6J("ngIf",0==(null==e?null:e.events.length))}}function Ot(e,t){1&e&&o.YNc(0,At,3,2,"ion-list",14),2&e&&o.Q6J("ngIf",t.showEventDetail)}function kt(e,t){1&e&&o._uU(0),2&e&&o.hij(" ",t.viewDate.dayHeader," ")}function Et(e,t){if(1&e&&(o.TgZ(0,"div",23),o._uU(1),o.qZA()),2&e){const e=t.displayEvent;o.xp6(1),o.Oqu(e.event.title)}}function qt(e,t){if(1&e&&(o.TgZ(0,"div",23),o._uU(1),o.qZA()),2&e){const e=t.displayEvent;o.xp6(1),o.Oqu(e.event.title)}}function Pt(e,t){}const Mt=function(e,t){return{top:e,width:t,height:"25px"}},Nt=function(e){return{displayEvent:e}};function Ht(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",27),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(3).eventSelected(t.event)}),o.YNc(1,Pt,0,0,"ng-template",28),o.qZA()}if(2&e){const e=t.$implicit,n=o.oxw(2).eventTemplate;o.Q6J("ngStyle",o.WLB(3,Mt,25*e.position+"px",100*(e.endIndex-e.startIndex)+"%")),o.xp6(1),o.Q6J("ngTemplateOutlet",n)("ngTemplateOutletContext",o.VKq(6,Nt,e))}}function Ft(e,t){if(1&e&&(o.TgZ(0,"div",25),o.YNc(1,Ht,2,8,"div",26),o.qZA()),2&e){const e=o.oxw().day;o.Q6J("ngClass",o.VKq(3,ue,e.events))("ngStyle",o.VKq(5,Le,25*e.events.length+"px")),o.xp6(1),o.Q6J("ngForOf",e.events)}}function Jt(e,t){1&e&&o.YNc(0,Ft,2,7,"div",24),2&e&&o.Q6J("ngIf",t.day.events)}function Yt(e,t){}const _t=function(e){return{top:e,width:"100%",height:"25px"}};function Qt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",27),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(2).eventSelected(t.event)}),o.YNc(1,Yt,0,0,"ng-template",28),o.qZA()}if(2&e){const e=t.$implicit,n=t.index,i=o.oxw().eventTemplate;o.Q6J("ngStyle",o.VKq(3,_t,25*n+"px")),o.xp6(1),o.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",o.VKq(5,Nt,e))}}function Vt(e,t){1&e&&o.YNc(0,Qt,2,7,"div",26),2&e&&o.Q6J("ngForOf",t.allDayEvents)}function Bt(e,t){}const Ut=function(e,t,n,i){return{top:e,left:t,width:n,height:i}};function Lt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",27),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(3).eventSelected(t.event)}),o.YNc(1,Bt,0,0,"ng-template",28),o.qZA()}if(2&e){const e=t.$implicit,n=o.oxw(2),i=n.hourParts,a=n.eventTemplate;o.Q6J("ngStyle",o.l5B(3,Ut,37*e.startOffset/i+"px",100/e.overlapNumber*e.position+"%",100/e.overlapNumber+"%",37*(e.endIndex-e.startIndex-(e.endOffset+e.startOffset)/i)+"px")),o.xp6(1),o.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",o.VKq(8,Nt,e))}}function $t(e,t){if(1&e&&(o.TgZ(0,"div",30),o.YNc(1,Lt,2,10,"div",26),o.qZA()),2&e){const e=o.oxw().tm;o.Q6J("ngClass",o.VKq(2,ue,e.events)),o.xp6(1),o.Q6J("ngForOf",e.events)}}function Wt(e,t){1&e&&o.YNc(0,$t,2,4,"div",29),2&e&&o.Q6J("ngIf",t.tm.events)}function Rt(e,t){}function jt(e,t){}function Kt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"monthview",31),o.NdJ("onRangeChanged",function(t){return o.CHM(e),o.oxw().rangeChanged(t)})("onEventSelected",function(t){return o.CHM(e),o.oxw().eventSelected(t)})("onTimeSelected",function(t){return o.CHM(e),o.oxw().timeSelected(t)})("onTitleChanged",function(t){return o.CHM(e),o.oxw().titleChanged(t)}),o.qZA()}if(2&e){const e=o.oxw(),t=o.MAs(1),n=o.MAs(3);o.Q6J("formatDay",e.formatDay)("formatDayHeader",e.formatDayHeader)("formatMonthTitle",e.formatMonthTitle)("startingDayMonth",e.startingDayMonth)("showEventDetail",e.showEventDetail)("noEventsLabel",e.noEventsLabel)("autoSelect",e.autoSelect)("eventSource",e.eventSource)("markDisabled",e.markDisabled)("monthviewDisplayEventTemplate",e.monthviewDisplayEventTemplate||t)("monthviewInactiveDisplayEventTemplate",e.monthviewInactiveDisplayEventTemplate||t)("monthviewEventDetailTemplate",e.monthviewEventDetailTemplate||n)("locale",e.locale)("dateFormatter",e.dateFormatter)("dir",e.dir)("lockSwipeToPrev",e.lockSwipeToPrev)("lockSwipes",e.lockSwipes)("sliderOptions",e.sliderOptions)}}function zt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"weekview",32),o.NdJ("onRangeChanged",function(t){return o.CHM(e),o.oxw().rangeChanged(t)})("onEventSelected",function(t){return o.CHM(e),o.oxw().eventSelected(t)})("onTimeSelected",function(t){return o.CHM(e),o.oxw().timeSelected(t)})("onTitleChanged",function(t){return o.CHM(e),o.oxw().titleChanged(t)}),o.qZA()}if(2&e){const e=o.oxw(),t=o.MAs(5),n=o.MAs(7),i=o.MAs(9),a=o.MAs(11),l=o.MAs(15),r=o.MAs(17),s=o.MAs(19);o.Q6J("formatWeekTitle",e.formatWeekTitle)("formatWeekViewDayHeader",e.formatWeekViewDayHeader)("formatHourColumn",e.formatHourColumn)("startingDayWeek",e.startingDayWeek)("allDayLabel",e.allDayLabel)("hourParts",e.hourParts)("autoSelect",e.autoSelect)("hourSegments",e.hourSegments)("eventSource",e.eventSource)("markDisabled",e.markDisabled)("weekviewHeaderTemplate",e.weekviewHeaderTemplate||t)("weekviewAllDayEventTemplate",e.weekviewAllDayEventTemplate||n)("weekviewNormalEventTemplate",e.weekviewNormalEventTemplate||i)("weekviewAllDayEventSectionTemplate",e.weekviewAllDayEventSectionTemplate||a)("weekviewNormalEventSectionTemplate",e.weekviewNormalEventSectionTemplate||l)("weekviewInactiveAllDayEventSectionTemplate",e.weekviewInactiveAllDayEventSectionTemplate||r)("weekviewInactiveNormalEventSectionTemplate",e.weekviewInactiveNormalEventSectionTemplate||s)("locale",e.locale)("dateFormatter",e.dateFormatter)("dir",e.dir)("scrollToHour",e.scrollToHour)("preserveScrollPosition",e.preserveScrollPosition)("lockSwipeToPrev",e.lockSwipeToPrev)("lockSwipes",e.lockSwipes)("startHour",e.startHour)("endHour",e.endHour)("sliderOptions",e.sliderOptions)}}function Gt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"dayview",33),o.NdJ("onRangeChanged",function(t){return o.CHM(e),o.oxw().rangeChanged(t)})("onEventSelected",function(t){return o.CHM(e),o.oxw().eventSelected(t)})("onTimeSelected",function(t){return o.CHM(e),o.oxw().timeSelected(t)})("onTitleChanged",function(t){return o.CHM(e),o.oxw().titleChanged(t)}),o.qZA()}if(2&e){const e=o.oxw(),t=o.MAs(7),n=o.MAs(9),i=o.MAs(13),a=o.MAs(15),l=o.MAs(17),r=o.MAs(19);o.Q6J("formatDayTitle",e.formatDayTitle)("formatHourColumn",e.formatHourColumn)("allDayLabel",e.allDayLabel)("hourParts",e.hourParts)("hourSegments",e.hourSegments)("eventSource",e.eventSource)("markDisabled",e.markDisabled)("dayviewAllDayEventTemplate",e.dayviewAllDayEventTemplate||t)("dayviewNormalEventTemplate",e.dayviewNormalEventTemplate||n)("dayviewAllDayEventSectionTemplate",e.dayviewAllDayEventSectionTemplate||i)("dayviewNormalEventSectionTemplate",e.dayviewNormalEventSectionTemplate||a)("dayviewInactiveAllDayEventSectionTemplate",e.dayviewInactiveAllDayEventSectionTemplate||l)("dayviewInactiveNormalEventSectionTemplate",e.dayviewInactiveNormalEventSectionTemplate||r)("locale",e.locale)("dateFormatter",e.dateFormatter)("dir",e.dir)("scrollToHour",e.scrollToHour)("preserveScrollPosition",e.preserveScrollPosition)("lockSwipeToPrev",e.lockSwipeToPrev)("lockSwipes",e.lockSwipes)("startHour",e.startHour)("endHour",e.endHour)("sliderOptions",e.sliderOptions)}}const Xt=["*"];let en=(()=>{let e=class{constructor(){this.currentDateChangedFromParent=new r.xQ,this.currentDateChangedFromChildren=new r.xQ,this.eventSourceChanged=new r.xQ,this.slideChanged=new r.xQ,this.slideUpdated=new r.xQ,this.currentDateChangedFromParent$=this.currentDateChangedFromParent.asObservable(),this.currentDateChangedFromChildren$=this.currentDateChangedFromChildren.asObservable(),this.eventSourceChanged$=this.eventSourceChanged.asObservable(),this.slideChanged$=this.slideChanged.asObservable(),this.slideUpdated$=this.slideUpdated.asObservable()}setCurrentDate(e,t=!1){this._currentDate=new Date(e),t?this.currentDateChangedFromParent.next(e):this.currentDateChangedFromChildren.next(e)}get currentDate(){return this._currentDate}rangeChanged(e){if("local"===this.queryMode)e.eventSource&&e.onDataLoaded&&e.onDataLoaded();else if("remote"===this.queryMode){let t=new Date(e.range.startTime.getTime()),n=new Date(e.range.endTime.getTime());t.setHours(0),23===t.getHours()&&t.setTime(t.getTime()+36e5),n.setHours(0),23===n.getHours()&&n.setTime(n.getTime()+36e5),e.onRangeChanged.emit({startTime:t,endTime:n})}}getStep(e){switch(e){case"month":return{years:0,months:1,days:0};case"week":return{years:0,months:0,days:7};case"day":return{years:0,months:0,days:1}}}getAdjacentCalendarDate(e,t){let n=this.currentDate;const i=this.getStep(e),o=n.getFullYear()+t*i.years,a=n.getMonth()+t*i.months,l=n.getDate()+t*i.days;if(n=new Date(o,a,l,12,0,0),"month"===e){const e=new Date(o,a+1,1,12,0,0);e.getTime()<=n.getTime()&&(n=new Date(e.getTime()-864e5))}return n}getAdjacentViewStartTime(e,t){let n=this.getAdjacentCalendarDate(e.mode,t);return e.getRange(n).startTime}populateAdjacentViews(e){let t,n,i,o=e.currentViewIndex;1===e.direction?(t=this.getAdjacentViewStartTime(e,1),i=(o+1)%3,e.views[i]=e.getViewData(t)):-1===e.direction?(t=this.getAdjacentViewStartTime(e,-1),i=(o+2)%3,e.views[i]=e.getViewData(t)):e.views?(t=e.range.startTime,e.views[o]=e.getViewData(t),t=this.getAdjacentViewStartTime(e,-1),i=(o+2)%3,e.views[i]=e.getViewData(t),t=this.getAdjacentViewStartTime(e,1),i=(o+1)%3,e.views[i]=e.getViewData(t)):(n=[],t=e.range.startTime,n.push(e.getViewData(t)),t=this.getAdjacentViewStartTime(e,1),n.push(e.getViewData(t)),t=this.getAdjacentViewStartTime(e,-1),n.push(e.getViewData(t)),e.views=n)}loadEvents(){this.eventSourceChanged.next()}slide(e){this.slideChanged.next(e)}update(){this.slideUpdated.next()}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=o.Yz7({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();var tn;let nn=tn=class{constructor(e){this.calendarService=e,this.autoSelect=!0,this.dir="",this.onRangeChanged=new o.vpe,this.onEventSelected=new o.vpe,this.onTimeSelected=new o.vpe(!0),this.onTitleChanged=new o.vpe(!0),this.views=[],this.currentViewIndex=0,this.mode="month",this.direction=0,this.moveOnSelected=!1,this.inited=!1,this.callbackOnInit=!0}static getDates(e,t){const n=new Array(t),i=new Date(e.getTime());let o=0;for(;o<t;)n[o++]=new Date(i.getTime()),i.setDate(i.getDate()+1);return n}ngOnInit(){if(this.sliderOptions||(this.sliderOptions={}),this.sliderOptions.loop=!0,this.dateFormatter&&this.dateFormatter.formatMonthViewDay)this.formatDayLabel=this.dateFormatter.formatMonthViewDay;else{const e=new a.uU("en-US");this.formatDayLabel=function(t){return e.transform(t,this.formatDay)}}if(this.dateFormatter&&this.dateFormatter.formatMonthViewDayHeader)this.formatDayHeaderLabel=this.dateFormatter.formatMonthViewDayHeader;else{const e=new a.uU(this.locale);this.formatDayHeaderLabel=function(t){return e.transform(t,this.formatDayHeader)}}if(this.dateFormatter&&this.dateFormatter.formatMonthViewTitle)this.formatTitle=this.dateFormatter.formatMonthViewTitle;else{const e=new a.uU(this.locale);this.formatTitle=function(t){return e.transform(t,this.formatMonthTitle)}}this.lockSwipeToPrev&&this.slider.lockSwipeToPrev(!0),this.lockSwipes&&this.slider.lockSwipes(!0),this.refreshView(),this.inited=!0,this.currentDateChangedFromParentSubscription=this.calendarService.currentDateChangedFromParent$.subscribe(e=>{this.refreshView()}),this.eventSourceChangedSubscription=this.calendarService.eventSourceChanged$.subscribe(()=>{this.onDataLoaded()}),this.slideChangedSubscription=this.calendarService.slideChanged$.subscribe(e=>{1===e?this.slider.slideNext():-1===e&&this.slider.slidePrev()}),this.slideUpdatedSubscription=this.calendarService.slideUpdated$.subscribe(()=>{this.slider.update()})}ngOnDestroy(){this.currentDateChangedFromParentSubscription&&(this.currentDateChangedFromParentSubscription.unsubscribe(),this.currentDateChangedFromParentSubscription=null),this.eventSourceChangedSubscription&&(this.eventSourceChangedSubscription.unsubscribe(),this.eventSourceChangedSubscription=null),this.slideChangedSubscription&&(this.slideChangedSubscription.unsubscribe(),this.slideChangedSubscription=null),this.slideUpdatedSubscription&&(this.slideUpdatedSubscription.unsubscribe(),this.slideUpdatedSubscription=null)}ngOnChanges(e){if(!this.inited)return;const t=e.eventSource;t&&t.currentValue&&this.onDataLoaded();const n=e.lockSwipeToPrev;n&&this.slider.lockSwipeToPrev(n.currentValue);const i=e.lockSwipes;i&&this.slider.lockSwipes(i.currentValue)}ngAfterViewInit(){const e=this.getTitle();this.onTitleChanged.emit(e)}onSlideChanged(){if(this.callbackOnInit)return void(this.callbackOnInit=!1);let e=0;const t=this.currentViewIndex;this.slider.getActiveIndex().then(n=>{n=(n+2)%3,isNaN(n)&&(n=t),n-t==1?e=1:0===n&&2===t?(e=1,this.slider.slideTo(1,0,!1)):t-n==1?e=-1:2===n&&0===t&&(e=-1,this.slider.slideTo(3,0,!1)),this.currentViewIndex=n,this.move(e)})}move(e){if(0!==e){if(this.direction=e,!this.moveOnSelected){const t=this.calendarService.getAdjacentCalendarDate(this.mode,e);this.calendarService.setCurrentDate(t)}this.refreshView(),this.direction=0,this.moveOnSelected=!1}}createDateObject(e){let t=!1;return this.markDisabled&&(t=this.markDisabled(e)),{date:e,events:[],label:this.formatDayLabel(e),secondary:!1,disabled:t}}getViewData(e){const t=e,n=t.getDate(),i=(t.getMonth()+(1!==n?1:0))%12,o=tn.getDates(t,42),a=[];for(let r=0;r<42;r++){const e=this.createDateObject(o[r]);e.secondary=o[r].getMonth()!==i,a[r]=e}const l=[];for(let r=0;r<7;r++)l.push(this.formatDayHeaderLabel(a[r].date));return{dates:a,dayHeaders:l}}getHighlightClass(e){let t="";return e.hasEvent&&(t=e.secondary?"monthview-secondary-with-event":"monthview-primary-with-event"),e.selected&&(t&&(t+=" "),t+="monthview-selected"),e.current&&(t&&(t+=" "),t+="monthview-current"),e.secondary&&(t&&(t+=" "),t+="text-muted"),e.disabled&&(t&&(t+=" "),t+="monthview-disabled"),t}getRange(e){const t=e.getFullYear(),n=e.getMonth(),i=new Date(t,n,1,12,0,0),o=this.startingDayMonth-i.getDay(),a=o>0?7-o:-o,l=new Date(i.getTime());a>0&&l.setDate(1-a);const r=new Date(l.getTime());return r.setDate(r.getDate()+42),{startTime:l,endTime:r}}onDataLoaded(){const e=this.range,t=this.eventSource,n=t?t.length:0,i=e.startTime,o=e.endTime,a=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate()),l=Date.UTC(o.getFullYear(),o.getMonth(),o.getDate()),r=this.views[this.currentViewIndex].dates;for(let s=0;s<42;s+=1)r[s].hasEvent&&(r[s].hasEvent=!1,r[s].events=[]);for(let s=0;s<n;s+=1){const e=t[s],n=e.startTime,i=e.endTime;let o,c,d,p;if(e.allDay?(o=n.getTime(),c=i.getTime()):(o=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()),c=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate()+1)),c<=a||o>=l)continue;d=o<a?0:(o-a)/864e5,p=c>l?(l-a)/864e5:(c-a)/864e5;let g=Math.floor(d);const h=Math.ceil(p-6e-4);for(;g<h;){r[g].hasEvent=!0;let t=r[g].events;t?t.push(e):(t=[],t.push(e),r[g].events=t),g+=1}}for(let s=0;s<42;s+=1)r[s].hasEvent&&r[s].events.sort(this.compareEvent);if(this.autoSelect){let e=!1;for(let t=0;t<42;t+=1)if(r[t].selected){this.selectedDate=r[t],e=!0;break}e&&this.onTimeSelected.emit({selectedTime:this.selectedDate.date,events:this.selectedDate.events,disabled:this.selectedDate.disabled})}}refreshView(){if(this.range=this.getRange(this.calendarService.currentDate),this.inited){const e=this.getTitle();this.onTitleChanged.emit(e)}this.calendarService.populateAdjacentViews(this),this.updateCurrentView(this.range.startTime,this.views[this.currentViewIndex]),this.calendarService.rangeChanged(this)}getTitle(){const e=this.range.startTime,t=e.getDate(),n=(e.getMonth()+(1!==t?1:0))%12,i=e.getFullYear()+(1!==t&&0===n?1:0),o=new Date(i,n,1,12,0,0,0);return this.formatTitle(o)}compareEvent(e,t){return e.allDay?1:t.allDay?-1:e.startTime.getTime()-t.startTime.getTime()}select(e){if(!this.views)return;const t=e.date,n=e.events;if(!e.disabled){const e=this.views[this.currentViewIndex].dates,n=this.calendarService.currentDate,i=n.getMonth(),o=n.getFullYear(),a=t.getMonth(),l=t.getFullYear();let r=0;if(o===l?i!==a&&(r=i<a?1:-1):r=o<l?1:-1,this.calendarService.setCurrentDate(t),0===r){const n=this.range.startTime,i=864e5,o=Math.round((Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()))/i);for(let t=0;t<42;t+=1)e[t].selected=!1;o>=0&&o<42&&(e[o].selected=!0,this.selectedDate=e[o])}else this.moveOnSelected=!0,this.slideView(r)}this.onTimeSelected.emit({selectedTime:t,events:n,disabled:e.disabled})}slideView(e){1===e?this.slider.slideNext():-1===e&&this.slider.slidePrev()}updateCurrentView(e,t){const n=this.calendarService.currentDate,i=new Date,o=Math.round((Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/864e5),a=Math.round((Date.UTC(i.getFullYear(),i.getMonth(),i.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/864e5);for(let l=0;l<42;l+=1)t.dates[l].selected=!1;o>=0&&o<42&&!t.dates[o].disabled&&(this.autoSelect||this.moveOnSelected)?(t.dates[o].selected=!0,this.selectedDate=t.dates[o]):this.selectedDate={date:null,events:[],label:null,secondary:null,disabled:!1},a>=0&&a<42&&(t.dates[a].current=!0)}eventSelected(e){this.onEventSelected.emit(e)}};var on;nn.\u0275fac=function(e){return new(e||nn)(o.Y36(en))},nn.\u0275cmp=o.Xpm({type:nn,selectors:[["monthview"]],viewQuery:function(e,t){if(1&e&&o.Gf(s,7),2&e){let e;o.iGM(e=o.CRH())&&(t.slider=e.first)}},inputs:{autoSelect:"autoSelect",dir:"dir",sliderOptions:"sliderOptions",monthviewDisplayEventTemplate:"monthviewDisplayEventTemplate",monthviewInactiveDisplayEventTemplate:"monthviewInactiveDisplayEventTemplate",monthviewEventDetailTemplate:"monthviewEventDetailTemplate",formatDay:"formatDay",formatDayHeader:"formatDayHeader",formatMonthTitle:"formatMonthTitle",eventSource:"eventSource",startingDayMonth:"startingDayMonth",showEventDetail:"showEventDetail",noEventsLabel:"noEventsLabel",markDisabled:"markDisabled",locale:"locale",dateFormatter:"dateFormatter",lockSwipeToPrev:"lockSwipeToPrev",lockSwipes:"lockSwipes"},outputs:{onRangeChanged:"onRangeChanged",onEventSelected:"onEventSelected",onTimeSelected:"onTimeSelected",onTitleChanged:"onTitleChanged"},features:[o.TTD],decls:13,vars:14,consts:[[3,"options","dir","ionSlideDidChange"],["monthSlider",""],["class","table table-bordered table-fixed monthview-datetable",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"table","table-bordered","table-fixed","monthview-datetable"],[4,"ngFor","ngForOf"],["tappable","",3,"ngClass","click",4,"ngFor","ngForOf"],["tappable","",3,"ngClass","click"],[1,"text-center"]],template:function(e,t){1&e&&(o.TgZ(0,"div"),o.TgZ(1,"ion-slides",0,1),o.NdJ("ionSlideDidChange",function(){return t.onSlideChanged()}),o.TgZ(3,"ion-slide"),o.YNc(4,m,6,3,"table",2),o.YNc(5,S,7,3,"table",2),o.qZA(),o.TgZ(6,"ion-slide"),o.YNc(7,C,6,3,"table",2),o.YNc(8,E,7,3,"table",2),o.qZA(),o.TgZ(9,"ion-slide"),o.YNc(10,H,6,3,"table",2),o.YNc(11,Q,7,3,"table",2),o.qZA(),o.qZA(),o.YNc(12,V,0,0,"ng-template",3),o.qZA()),2&e&&(o.xp6(1),o.Q6J("options",t.sliderOptions)("dir",t.dir),o.xp6(3),o.Q6J("ngIf",0===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",0!==t.currentViewIndex),o.xp6(2),o.Q6J("ngIf",1===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",1!==t.currentViewIndex),o.xp6(2),o.Q6J("ngIf",2===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",2!==t.currentViewIndex),o.xp6(1),o.Q6J("ngTemplateOutlet",t.monthviewEventDetailTemplate)("ngTemplateOutletContext",o.kEZ(10,B,t.showEventDetail,t.selectedDate,t.noEventsLabel)))},directives:[l.Hr,l.A$,a.O5,a.tP,a.sg,a.mk],styles:[".text-muted[_ngcontent-%COMP%] {\n color: #999;\n }\n\n .table-fixed[_ngcontent-%COMP%] {\n table-layout: fixed;\n }\n\n .table[_ngcontent-%COMP%] {\n width: 100%;\n max-width: 100%;\n background-color: transparent;\n }\n\n .table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] > tfoot[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] > tfoot[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%] {\n padding: 8px;\n line-height: 20px;\n vertical-align: top;\n }\n\n .table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%] {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n }\n\n .table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%]:first-child > tr[_ngcontent-%COMP%]:first-child > th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%]:first-child > tr[_ngcontent-%COMP%]:first-child > td[_ngcontent-%COMP%] {\n border-top: 0\n }\n\n .table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] + tbody[_ngcontent-%COMP%] {\n border-top: 2px solid #ddd;\n }\n\n .table-bordered[_ngcontent-%COMP%] {\n border: 1px solid #ddd;\n }\n\n .table-bordered[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], .table-bordered[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], .table-bordered[_ngcontent-%COMP%] > tfoot[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], .table-bordered[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%], .table-bordered[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%], .table-bordered[_ngcontent-%COMP%] > tfoot[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%] {\n border: 1px solid #ddd;\n }\n\n .table-bordered[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], .table-bordered[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%] {\n border-bottom-width: 2px;\n }\n\n .table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:nth-child(odd) > td[_ngcontent-%COMP%], .table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:nth-child(odd) > th[_ngcontent-%COMP%] {\n background-color: #f9f9f9\n }\n\n .monthview-primary-with-event[_ngcontent-%COMP%] {\n background-color: #3a87ad;\n color: white;\n }\n\n .monthview-current[_ngcontent-%COMP%] {\n background-color: #f0f0f0;\n }\n\n .monthview-selected[_ngcontent-%COMP%] {\n background-color: #009900;\n color: white;\n }\n\n .monthview-datetable[_ngcontent-%COMP%] td.monthview-disabled[_ngcontent-%COMP%] {\n color: lightgrey;\n cursor: default;\n }\n\n .monthview-datetable[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n text-align: center;\n }\n\n .monthview-datetable[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n cursor: pointer;\n text-align: center;\n }\n\n .monthview-secondary-with-event[_ngcontent-%COMP%] {\n background-color: #d9edf7;\n }\n\n [_ngcontent-%COMP%]::-webkit-scrollbar, *[_ngcontent-%COMP%]::-webkit-scrollbar {\n display: none;\n }"]}),nn.ctorParameters=()=>[{type:en}],(0,i.gn)([(0,o.i9L)("monthSlider",{static:!0})],nn.prototype,"slider",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"monthviewDisplayEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"monthviewInactiveDisplayEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"monthviewEventDetailTemplate",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"formatDay",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"formatDayHeader",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"formatMonthTitle",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"eventSource",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"startingDayMonth",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"showEventDetail",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"noEventsLabel",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"autoSelect",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"markDisabled",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"locale",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"dateFormatter",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"dir",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"lockSwipeToPrev",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"lockSwipes",void 0),(0,i.gn)([(0,o.IIB)()],nn.prototype,"sliderOptions",void 0),(0,i.gn)([(0,o.r_U)()],nn.prototype,"onRangeChanged",void 0),(0,i.gn)([(0,o.r_U)()],nn.prototype,"onEventSelected",void 0),(0,i.gn)([(0,o.r_U)()],nn.prototype,"onTimeSelected",void 0),(0,i.gn)([(0,o.r_U)()],nn.prototype,"onTitleChanged",void 0);let an=on=class{constructor(e,t){this.calendarService=e,this.elm=t,this.class=!0,this.autoSelect=!0,this.dir="",this.scrollToHour=0,this.onRangeChanged=new o.vpe,this.onEventSelected=new o.vpe,this.onTimeSelected=new o.vpe,this.onTitleChanged=new o.vpe(!0),this.views=[],this.currentViewIndex=0,this.direction=0,this.mode="week",this.inited=!1,this.callbackOnInit=!0}static createDateObjects(e,t,n,i){const o=[],a=e.getDate();let l,r;i<1?(l=Math.floor(1/i),r=60):(l=1,r=Math.floor(60/i));for(let s=t;s<n;s+=l)for(let t=0;t<60;t+=r){const n=[];for(let i=0;i<7;i+=1){const o=new Date(e.getTime());o.setHours(0+s,t),o.setDate(a+i),n.push({events:[],time:o})}o.push(n)}return o}static getDates(e,t){const n=new Array(t),i=new Date(e.getTime());let o=0;for(;o<t;)n[o++]={date:new Date(i.getTime()),events:[],dayHeader:""},i.setDate(i.getDate()+1);return n}static compareEventByStartOffset(e,t){return e.startOffset-t.startOffset}static calculateWidth(e,t,n){const i=t*n,o=new Array(i);e.sort((e,t)=>t.position-e.position);for(let r=0;r<i;r+=1)o[r]={calculated:!1,events:[]};const a=e.length;for(let r=0;r<a;r+=1){const t=e[r];let i=t.startIndex*n+t.startOffset;for(;i<t.endIndex*n-t.endOffset;)o[i].events.push(t),i+=1}let l=0;for(;l<a;){let t=e[l];if(!t.overlapNumber){const e=t.position+1;t.overlapNumber=e;const i=[t];for(;t=i.shift();){let a=t.startIndex*n+t.startOffset;for(;a<t.endIndex*n-t.endOffset;){if(!o[a].calculated&&(o[a].calculated=!0,o[a].events)){const t=o[a].events.length;for(let n=0;n<t;n+=1){const t=o[a].events[n];t.overlapNumber||(t.overlapNumber=e,i.push(t))}}a+=1}}}l+=1}}ngOnInit(){if(this.sliderOptions||(this.sliderOptions={}),this.sliderOptions.loop=!0,this.hourRange=(this.endHour-this.startHour)*this.hourSegments,this.dateFormatter&&this.dateFormatter.formatWeekViewDayHeader)this.formatDayHeader=this.dateFormatter.formatWeekViewDayHeader;else{const e=new a.uU(this.locale);this.formatDayHeader=function(t){return e.transform(t,this.formatWeekViewDayHeader)}}if(this.dateFormatter&&this.dateFormatter.formatWeekViewTitle)this.formatTitle=this.dateFormatter.formatWeekViewTitle;else{const e=new a.uU(this.locale);this.formatTitle=function(t){return e.transform(t,this.formatWeekTitle)}}if(this.dateFormatter&&this.dateFormatter.formatWeekViewHourColumn)this.formatHourColumnLabel=this.dateFormatter.formatWeekViewHourColumn;else{const e=new a.uU(this.locale);this.formatHourColumnLabel=function(t){return e.transform(t,this.formatHourColumn)}}this.lockSwipeToPrev&&this.slider.lockSwipeToPrev(!0),this.lockSwipes&&this.slider.lockSwipes(!0),this.refreshView(),this.hourColumnLabels=this.getHourColumnLabels(),this.inited=!0,this.currentDateChangedFromParentSubscription=this.calendarService.currentDateChangedFromParent$.subscribe(e=>{this.refreshView()}),this.eventSourceChangedSubscription=this.calendarService.eventSourceChanged$.subscribe(()=>{this.onDataLoaded()}),this.slideChangedSubscription=this.calendarService.slideChanged$.subscribe(e=>{1===e?this.slider.slideNext():-1===e&&this.slider.slidePrev()}),this.slideUpdatedSubscription=this.calendarService.slideUpdated$.subscribe(()=>{this.slider.update()})}ngAfterViewInit(){const e=this.getTitle();if(this.onTitleChanged.emit(e),this.scrollToHour>0){const e=this.elm.nativeElement.querySelector(".weekview-normal-event-container").querySelectorAll(".calendar-hour-column"),t=this;setTimeout(()=>{t.initScrollPosition=e[t.scrollToHour-t.startHour].offsetTop},50)}}ngOnChanges(e){if(!this.inited)return;const t=e.eventSource;t&&t.currentValue&&this.onDataLoaded();const n=e.lockSwipeToPrev;n&&this.slider.lockSwipeToPrev(n.currentValue);const i=e.lockSwipes;i&&this.slider.lockSwipes(i.currentValue)}ngOnDestroy(){this.currentDateChangedFromParentSubscription&&(this.currentDateChangedFromParentSubscription.unsubscribe(),this.currentDateChangedFromParentSubscription=null),this.eventSourceChangedSubscription&&(this.eventSourceChangedSubscription.unsubscribe(),this.eventSourceChangedSubscription=null),this.slideChangedSubscription&&(this.slideChangedSubscription.unsubscribe(),this.slideChangedSubscription=null),this.slideUpdatedSubscription&&(this.slideUpdatedSubscription.unsubscribe(),this.slideUpdatedSubscription=null)}onSlideChanged(){if(this.callbackOnInit)return void(this.callbackOnInit=!1);const e=this.currentViewIndex;let t=0;this.slider.getActiveIndex().then(n=>{n=(n+2)%3,isNaN(n)&&(n=e),n-e==1?t=1:0===n&&2===e?(t=1,this.slider.slideTo(1,0,!1)):e-n==1?t=-1:2===n&&0===e&&(t=-1,this.slider.slideTo(3,0,!1)),this.currentViewIndex=n,this.move(t)})}move(e){if(0===e)return;this.direction=e;const t=this.calendarService.getAdjacentCalendarDate(this.mode,e);this.calendarService.setCurrentDate(t),this.refreshView(),this.direction=0}getHourColumnLabels(){const e=[];for(let t=0,n=this.views[0].rows.length;t<n;t+=1)if(0===t&&this.views[0].rows[t][0].time.getHours()!==this.startHour){const n=new Date(this.views[0].rows[t][0].time);n.setDate(n.getDate()+1),n.setHours(this.startHour),e.push(this.formatHourColumnLabel(n))}else e.push(this.formatHourColumnLabel(this.views[0].rows[t][0].time));return e}getViewData(e){const t=on.getDates(e,7);for(let n=0;n<7;n++)t[n].dayHeader=this.formatDayHeader(t[n].date);return{rows:on.createDateObjects(e,this.startHour,this.endHour,this.hourSegments),dates:t}}getRange(e){const t=e.getFullYear(),n=e.getMonth(),i=e.getDate();let o=e.getDay()-this.startingDayWeek;return o<0&&(o+=7),{startTime:new Date(t,n,i-o,12,0,0),endTime:new Date(t,n,i-o+7,12,0,0)}}onDataLoaded(){const e=this.eventSource,t=e?e.length:0,n=this.range.startTime,i=this.range.endTime,o=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()),a=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate()),l=this.currentViewIndex,r=this.views[l].rows,s=this.views[l].dates,c=this.startHour*this.hourSegments,d=this.endHour*this.hourSegments,p=24*this.hourSegments;let g=!1,h=!1;for(let v=0;v<7;v+=1)s[v].events=[],s[v].hasEvent=!1;for(let v=0;v<7;v+=1)for(let e=0;e<this.hourRange;e+=1)r[e][v].events=[];for(let v=0;v<t;v+=1){const t=e[v],n=t.startTime,i=t.endTime;let l,u;if(t.allDay?(l=n.getTime(),u=i.getTime()):(l=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()),u=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate()+1)),!(u<=o||l>=a||n>=i))if(t.allDay){let e,n;g=!0,e=l<=o?0:Math.round((l-o)/864e5),n=u>=a?Math.round((a-o)/864e5):Math.round((u-o)/864e5);const i={event:t,startIndex:e,endIndex:n};let r=s[e].events;r?r.push(i):(r=[],r.push(i),s[e].events=r),s[e].hasEvent=!0}else{let e,g;h=!0,e=l<o?0:(l-o)/36e5*this.hourSegments+(n.getHours()+n.getMinutes()/60)*this.hourSegments,g=u>a?(a-o)/36e5*this.hourSegments:(u-864e5-o)/36e5*this.hourSegments+(i.getHours()+i.getMinutes()/60)*this.hourSegments;const v=Math.floor(e),m=Math.ceil(g-.016);let w=v%p,f=Math.floor(v/p),T=f*p,y=0,S=0;1!==this.hourParts&&(y=w<c?0:Math.floor((e-v)*this.hourParts));do{let e;if(T+=p,T<m?e=p:(e=T===m?p:m%p,1!==this.hourParts&&(S=e>d?0:Math.floor((m-g)*this.hourParts))),w<c?w=0:w-=c,e>d&&(e=d),e-=c,w<e){const n={event:t,startIndex:w,endIndex:e,startOffset:y,endOffset:S};let i=r[w][f].events;i?i.push(n):(i=[],i.push(n),r[w][f].events=i),s[f].hasEvent=!0}w=0,y=0,f+=1}while(T<m)}}if(h)for(let v=0;v<7;v+=1){let e=[];for(let t=0;t<this.hourRange;t+=1)r[t][v].events&&(r[t][v].events.sort(on.compareEventByStartOffset),e=e.concat(r[t][v].events));e.length>0&&this.placeEvents(e)}if(g){let e=[];for(let t=0;t<7;t+=1)s[t].events&&(e=e.concat(s[t].events));e.length>0&&this.placeAllDayEvents(e)}if(this.autoSelect){let e,t=!1;for(let n=0;n<7;n+=1)if(s[n].selected){e=s[n],t=!0;break}if(t){let t=!1;this.markDisabled&&(t=this.markDisabled(e.date)),this.onTimeSelected.emit({selectedTime:e.date,events:e.events.map(e=>e.event),disabled:t})}}}refreshView(){if(this.range=this.getRange(this.calendarService.currentDate),this.inited){const e=this.getTitle();this.onTitleChanged.emit(e)}this.calendarService.populateAdjacentViews(this),this.updateCurrentView(this.range.startTime,this.views[this.currentViewIndex]),this.calendarService.rangeChanged(this)}getTitle(){const e=new Date(this.range.startTime.getTime());return e.setHours(12,0,0,0),this.formatTitle(e)}getHighlightClass(e){let t="";return e.hasEvent&&(t&&(t+=" "),t="weekview-with-event"),e.selected&&(t&&(t+=" "),t+="weekview-selected"),e.current&&(t&&(t+=" "),t+="weekview-current"),t}select(e,t){let n=!1;this.markDisabled&&(n=this.markDisabled(e)),this.onTimeSelected.emit({selectedTime:e,events:t.map(e=>e.event),disabled:n})}placeEvents(e){this.calculatePosition(e),on.calculateWidth(e,this.hourRange,this.hourParts)}placeAllDayEvents(e){this.calculatePosition(e)}overlap(e,t){let n=e,i=t;return(e.startIndex>t.startIndex||e.startIndex===t.startIndex&&e.startOffset>t.startOffset)&&(n=t,i=e),!(n.endIndex<=i.startIndex||n.endIndex-i.startIndex==1&&n.endOffset+i.startOffset>=this.hourParts)}calculatePosition(e){const t=e.length,n=new Array(t);let i=0;for(let o=0;o<t;o+=1){let t;for(t=0;t<i;t+=1)n[t]=!1;for(let i=0;i<o;i+=1)this.overlap(e[o],e[i])&&(n[e[i].position]=!0);for(t=0;t<i&&n[t];t+=1);e[o].position=t<i?t:i++}if("rtl"===this.dir)for(let o=0;o<t;o+=1)e[o].position=i-1-e[o].position}updateCurrentView(e,t){const n=this.calendarService.currentDate,i=new Date,o=Math.round((Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/864e5),a=Math.floor((Date.UTC(i.getFullYear(),i.getMonth(),i.getTime())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/864e5);for(let l=0;l<7;l+=1)t.dates[l].selected=!1;o>=0&&o<7&&this.autoSelect&&(t.dates[o].selected=!0),a>=0&&a<7&&(t.dates[a].current=!0)}daySelected(e){const t=e.date,n=this.views[this.currentViewIndex].dates,i=this.range.startTime,o=Math.round((Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.UTC(i.getFullYear(),i.getMonth(),i.getDate()))/864e5);this.calendarService.setCurrentDate(t);for(let l=0;l<7;l+=1)n[l].selected=!1;o>=0&&o<7&&(n[o].selected=!0);let a=!1;this.markDisabled&&(a=this.markDisabled(t)),this.onTimeSelected.emit({selectedTime:t,events:e.events.map(e=>e.event),disabled:a})}setScrollPosition(e){this.initScrollPosition=e}};var ln;an.\u0275fac=function(e){return new(e||an)(o.Y36(en),o.Y36(o.SBq))},an.\u0275cmp=o.Xpm({type:an,selectors:[["weekview"]],viewQuery:function(e,t){if(1&e&&o.Gf(U,7),2&e){let e;o.iGM(e=o.CRH())&&(t.slider=e.first)}},hostVars:2,hostBindings:function(e,t){2&e&&o.ekj("weekview",t.class)},inputs:{autoSelect:"autoSelect",dir:"dir",scrollToHour:"scrollToHour",sliderOptions:"sliderOptions",weekviewHeaderTemplate:"weekviewHeaderTemplate",weekviewAllDayEventTemplate:"weekviewAllDayEventTemplate",weekviewNormalEventTemplate:"weekviewNormalEventTemplate",weekviewAllDayEventSectionTemplate:"weekviewAllDayEventSectionTemplate",weekviewNormalEventSectionTemplate:"weekviewNormalEventSectionTemplate",weekviewInactiveAllDayEventSectionTemplate:"weekviewInactiveAllDayEventSectionTemplate",weekviewInactiveNormalEventSectionTemplate:"weekviewInactiveNormalEventSectionTemplate",formatWeekTitle:"formatWeekTitle",formatWeekViewDayHeader:"formatWeekViewDayHeader",formatHourColumn:"formatHourColumn",startingDayWeek:"startingDayWeek",allDayLabel:"allDayLabel",hourParts:"hourParts",eventSource:"eventSource",markDisabled:"markDisabled",locale:"locale",dateFormatter:"dateFormatter",preserveScrollPosition:"preserveScrollPosition",lockSwipeToPrev:"lockSwipeToPrev",lockSwipes:"lockSwipes",startHour:"startHour",endHour:"endHour",hourSegments:"hourSegments"},outputs:{onRangeChanged:"onRangeChanged",onEventSelected:"onEventSelected",onTimeSelected:"onTimeSelected",onTitleChanged:"onTitleChanged"},features:[o.TTD],decls:26,vars:11,consts:[[1,"slides-container",3,"options","dir","ionSlideDidChange"],["weekSlider",""],[1,"slide-container"],[1,"table","table-bordered","table-fixed","weekview-header"],[1,"calendar-hour-column"],["class","weekview-header text-center",3,"ngClass","click",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"weekview-header","text-center",3,"ngClass","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"weekview-allday-table"],[1,"weekview-allday-label"],[1,"weekview-allday-content-wrapper","scroll-content"],[1,"table","table-fixed","weekview-allday-content-table"],["class","calendar-cell",4,"ngFor","ngForOf"],[1,"weekview-normal-event-container",3,"initPosition","emitEvent","onScroll"],[1,"table","table-bordered","table-fixed","weekview-normal-event-table"],[4,"ngFor","ngForOf"],[1,"calendar-cell"],[1,"calendar-hour-column","text-center"],["class","calendar-cell","tappable","",3,"click",4,"ngFor","ngForOf"],["tappable","",1,"calendar-cell",3,"click"],[1,"weekview-normal-event-container",3,"initPosition"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(e,t){1&e&&(o.TgZ(0,"ion-slides",0,1),o.NdJ("ionSlideDidChange",function(){return t.onSlideChanged()}),o.TgZ(2,"ion-slide",2),o.TgZ(3,"table",3),o.TgZ(4,"thead"),o.TgZ(5,"tr"),o._UZ(6,"th",4),o.YNc(7,W,2,5,"th",5),o.qZA(),o.qZA(),o.qZA(),o.YNc(8,te,13,5,"div",6),o.YNc(9,ce,13,4,"div",6),o.qZA(),o.TgZ(10,"ion-slide",2),o.TgZ(11,"table",3),o.TgZ(12,"thead"),o.TgZ(13,"tr"),o._UZ(14,"th",4),o.YNc(15,pe,2,5,"th",5),o.qZA(),o.qZA(),o.qZA(),o.YNc(16,Te,13,5,"div",6),o.YNc(17,Ce,13,4,"div",6),o.qZA(),o.TgZ(18,"ion-slide",2),o.TgZ(19,"table",3),o.TgZ(20,"thead"),o.TgZ(21,"tr"),o._UZ(22,"th",4),o.YNc(23,Ae,2,5,"th",5),o.qZA(),o.qZA(),o.qZA(),o.YNc(24,Ne,13,5,"div",6),o.YNc(25,Ve,13,4,"div",6),o.qZA(),o.qZA()),2&e&&(o.Q6J("options",t.sliderOptions)("dir",t.dir),o.xp6(7),o.Q6J("ngForOf",t.views[0].dates),o.xp6(1),o.Q6J("ngIf",0===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",0!==t.currentViewIndex),o.xp6(6),o.Q6J("ngForOf",t.views[1].dates),o.xp6(1),o.Q6J("ngIf",1===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",1!==t.currentViewIndex),o.xp6(6),o.Q6J("ngForOf",t.views[2].dates),o.xp6(1),o.Q6J("ngIf",2===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",2!==t.currentViewIndex))},directives:function(){return[l.Hr,l.A$,a.sg,a.O5,a.mk,a.tP,dn]},styles:['\n .table-fixed {\n table-layout: fixed;\n }\n\n .table {\n width: 100%;\n max-width: 100%;\n background-color: transparent;\n }\n\n .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td,\n .table > tbody > tr > td, .table > tfoot > tr > td {\n padding: 8px;\n line-height: 20px;\n vertical-align: top;\n }\n\n .table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n }\n\n .table > thead:first-child > tr:first-child > th, .table > thead:first-child > tr:first-child > td {\n border-top: 0\n }\n\n .table > tbody + tbody {\n border-top: 2px solid #ddd;\n }\n\n .table-bordered {\n border: 1px solid #ddd;\n }\n\n .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th,\n .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {\n border: 1px solid #ddd;\n }\n\n .table-bordered > thead > tr > th, .table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n }\n\n .table-striped > tbody > tr:nth-child(odd) > td, .table-striped > tbody > tr:nth-child(odd) > th {\n background-color: #f9f9f9\n }\n\n .calendar-hour-column {\n width: 50px;\n white-space: nowrap;\n }\n\n .calendar-event-wrap {\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .calendar-event {\n position: absolute;\n padding: 2px;\n cursor: pointer;\n z-index: 10000;\n }\n\n .calendar-cell {\n padding: 0 !important;\n height: 37px;\n }\n\n .slides-container {\n height: 100%;\n }\n\n .slide-container {\n display: block;\n }\n\n .weekview-allday-label {\n float: left;\n height: 100%;\n line-height: 50px;\n text-align: center;\n width: 50px;\n border-left: 1px solid #ddd;\n }\n\n [dir="rtl"] .weekview-allday-label {\n float: right;\n border-right: 1px solid #ddd;\n }\n\n .weekview-allday-content-wrapper {\n margin-left: 50px;\n overflow: hidden;\n height: 51px;\n }\n\n [dir="rtl"] .weekview-allday-content-wrapper {\n margin-left: 0;\n margin-right: 50px;\n }\n\n .weekview-allday-content-table {\n min-height: 50px;\n }\n\n .weekview-allday-content-table td {\n border-left: 1px solid #ddd;\n border-right: 1px solid #ddd;\n }\n\n .weekview-header th {\n overflow: hidden;\n white-space: nowrap;\n font-size: 14px;\n }\n\n .weekview-allday-table {\n height: 50px;\n position: relative;\n border-bottom: 1px solid #ddd;\n font-size: 14px;\n }\n\n .weekview-normal-event-container {\n margin-top: 87px;\n overflow: hidden;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n position: absolute;\n font-size: 14px;\n }\n\n .scroll-content {\n overflow-y: auto;\n overflow-x: hidden;\n }\n\n ::-webkit-scrollbar,\n *::-webkit-scrollbar {\n display: none;\n }\n\n .table > tbody > tr > td.calendar-hour-column {\n padding-left: 0;\n padding-right: 0;\n vertical-align: middle;\n }\n\n @media (max-width: 750px) {\n .weekview-allday-label, .calendar-hour-column {\n width: 31px;\n font-size: 12px;\n }\n\n .weekview-allday-label {\n padding-top: 4px;\n }\n\n .table > tbody > tr > td.calendar-hour-column {\n padding-left: 0;\n padding-right: 0;\n vertical-align: middle;\n line-height: 12px;\n }\n\n .table > thead > tr > th.weekview-header {\n padding-left: 0;\n padding-right: 0;\n font-size: 12px;\n }\n\n .weekview-allday-label {\n line-height: 20px;\n }\n\n .weekview-allday-content-wrapper {\n margin-left: 31px;\n }\n\n [dir="rtl"] .weekview-allday-content-wrapper {\n margin-left: 0;\n margin-right: 31px;\n }\n }\n '],encapsulation:2}),an.ctorParameters=()=>[{type:en},{type:o.SBq}],(0,i.gn)([(0,o.i9L)("weekSlider",{static:!0})],an.prototype,"slider",void 0),(0,i.gn)([(0,o.pfw)("class.weekview")],an.prototype,"class",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"weekviewHeaderTemplate",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"weekviewAllDayEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"weekviewNormalEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"weekviewAllDayEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"weekviewNormalEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"weekviewInactiveAllDayEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"weekviewInactiveNormalEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"formatWeekTitle",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"formatWeekViewDayHeader",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"formatHourColumn",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"startingDayWeek",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"allDayLabel",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"hourParts",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"eventSource",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"autoSelect",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"markDisabled",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"locale",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"dateFormatter",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"dir",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"scrollToHour",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"preserveScrollPosition",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"lockSwipeToPrev",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"lockSwipes",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"startHour",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"endHour",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"sliderOptions",void 0),(0,i.gn)([(0,o.IIB)()],an.prototype,"hourSegments",void 0),(0,i.gn)([(0,o.r_U)()],an.prototype,"onRangeChanged",void 0),(0,i.gn)([(0,o.r_U)()],an.prototype,"onEventSelected",void 0),(0,i.gn)([(0,o.r_U)()],an.prototype,"onTimeSelected",void 0),(0,i.gn)([(0,o.r_U)()],an.prototype,"onTitleChanged",void 0);let rn=ln=class{constructor(e,t){this.calendarService=e,this.elm=t,this.class=!0,this.dir="",this.scrollToHour=0,this.onRangeChanged=new o.vpe,this.onEventSelected=new o.vpe,this.onTimeSelected=new o.vpe,this.onTitleChanged=new o.vpe(!0),this.views=[],this.currentViewIndex=0,this.direction=0,this.mode="day",this.inited=!1,this.callbackOnInit=!0}static createDateObjects(e,t,n,i){const o=[],a=e.getDate();let l,r,s;i<1?(r=Math.floor(1/i),s=60):(r=1,s=Math.floor(60/i));for(let c=t;c<n;c+=r)for(let t=0;t<60;t+=s)l=new Date(e.getTime()),l.setHours(0+c,t),l.setDate(a),o.push({time:l,events:[]});return o}static compareEventByStartOffset(e,t){return e.startOffset-t.startOffset}static calculateWidth(e,t,n){const i=t*n,o=new Array(i);e.sort((e,t)=>t.position-e.position);for(let r=0;r<i;r+=1)o[r]={calculated:!1,events:[]};const a=e.length;for(let r=0;r<a;r+=1){const t=e[r];let i=t.startIndex*n+t.startOffset;for(;i<t.endIndex*n-t.endOffset;)o[i].events.push(t),i+=1}let l=0;for(;l<a;){let t=e[l];if(!t.overlapNumber){const e=t.position+1;t.overlapNumber=e;const i=[t];for(;t=i.shift();){let a=t.startIndex*n+t.startOffset;for(;a<t.endIndex*n-t.endOffset;){if(!o[a].calculated&&(o[a].calculated=!0,o[a].events)){const t=o[a].events.length;for(let n=0;n<t;n+=1){const t=o[a].events[n];t.overlapNumber||(t.overlapNumber=e,i.push(t))}}a+=1}}}l+=1}}ngOnInit(){if(this.sliderOptions||(this.sliderOptions={}),this.sliderOptions.loop=!0,this.hourRange=(this.endHour-this.startHour)*this.hourSegments,this.dateFormatter&&this.dateFormatter.formatDayViewTitle)this.formatTitle=this.dateFormatter.formatDayViewTitle;else{const e=new a.uU(this.locale);this.formatTitle=function(t){return e.transform(t,this.formatDayTitle)}}if(this.dateFormatter&&this.dateFormatter.formatDayViewHourColumn)this.formatHourColumnLabel=this.dateFormatter.formatDayViewHourColumn;else{const e=new a.uU(this.locale);this.formatHourColumnLabel=function(t){return e.transform(t,this.formatHourColumn)}}this.lockSwipeToPrev&&this.slider.lockSwipeToPrev(!0),this.lockSwipes&&this.slider.lockSwipes(!0),this.refreshView(),this.hourColumnLabels=this.getHourColumnLabels(),this.inited=!0,this.currentDateChangedFromParentSubscription=this.calendarService.currentDateChangedFromParent$.subscribe(e=>{this.refreshView()}),this.eventSourceChangedSubscription=this.calendarService.eventSourceChanged$.subscribe(()=>{this.onDataLoaded()}),this.slideChangedSubscription=this.calendarService.slideChanged$.subscribe(e=>{1===e?this.slider.slideNext():-1===e&&this.slider.slidePrev()}),this.slideUpdatedSubscription=this.calendarService.slideUpdated$.subscribe(()=>{this.slider.update()})}ngAfterViewInit(){const e=this.getTitle();if(this.onTitleChanged.emit(e),this.scrollToHour>0){const e=this.elm.nativeElement.querySelector(".dayview-normal-event-container").querySelectorAll(".calendar-hour-column"),t=this;setTimeout(()=>{t.initScrollPosition=e[t.scrollToHour-t.startHour].offsetTop},50)}}ngOnChanges(e){if(!this.inited)return;const t=e.eventSource;t&&t.currentValue&&this.onDataLoaded();const n=e.lockSwipeToPrev;n&&this.slider.lockSwipeToPrev(n.currentValue);const i=e.lockSwipes;i&&this.slider.lockSwipes(i.currentValue)}ngOnDestroy(){this.currentDateChangedFromParentSubscription&&(this.currentDateChangedFromParentSubscription.unsubscribe(),this.currentDateChangedFromParentSubscription=null),this.eventSourceChangedSubscription&&(this.eventSourceChangedSubscription.unsubscribe(),this.eventSourceChangedSubscription=null),this.slideChangedSubscription&&(this.slideChangedSubscription.unsubscribe(),this.slideChangedSubscription=null),this.slideUpdatedSubscription&&(this.slideUpdatedSubscription.unsubscribe(),this.slideUpdatedSubscription=null)}onSlideChanged(){if(this.callbackOnInit)return void(this.callbackOnInit=!1);let e=0;const t=this.currentViewIndex;this.slider.getActiveIndex().then(n=>{n=(n+2)%3,isNaN(n)&&(n=t),n-t==1?e=1:0===n&&2===t?(e=1,this.slider.slideTo(1,0,!1)):t-n==1?e=-1:2===n&&0===t&&(e=-1,this.slider.slideTo(3,0,!1)),this.currentViewIndex=n,this.move(e)})}move(e){if(0===e)return;this.direction=e;const t=this.calendarService.getAdjacentCalendarDate(this.mode,e);this.calendarService.setCurrentDate(t),this.refreshView(),this.direction=0}getHourColumnLabels(){const e=[];for(let t=0,n=this.views[0].rows.length;t<n;t+=1)if(0===t&&this.views[0].rows[t].time.getHours()!==this.startHour){const n=new Date(this.views[0].rows[t].time);n.setDate(n.getDate()+1),n.setHours(this.startHour),e.push(this.formatHourColumnLabel(n))}else e.push(this.formatHourColumnLabel(this.views[0].rows[t].time));return e}getViewData(e){return{rows:ln.createDateObjects(e,this.startHour,this.endHour,this.hourSegments),allDayEvents:[]}}getRange(e){const t=e.getFullYear(),n=e.getMonth(),i=e.getDate();return{startTime:new Date(t,n,i,12,0,0),endTime:new Date(t,n,i+1,12,0,0)}}onDataLoaded(){const e=this.eventSource,t=e?e.length:0,n=this.range.startTime,i=this.range.endTime,o=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()),a=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate()),l=this.currentViewIndex,r=this.views[l].rows,s=this.views[l].allDayEvents=[],c=this.startHour*this.hourSegments,d=this.endHour*this.hourSegments;let p=!1;for(let g=0;g<this.hourRange;g+=1)r[g].events=[];for(let g=0;g<t;g+=1){const t=e[g],n=t.startTime,i=t.endTime;let l,h;if(t.allDay?(l=n.getTime(),h=i.getTime()):(l=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()),h=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate()+1)),!(h<=o||l>=a||n>=i))if(t.allDay)s.push({event:t});else{let e,s;p=!0,e=l<o?0:(n.getHours()+n.getMinutes()/60)*this.hourSegments,s=h>a?(a-o)/36e5*this.hourSegments:(i.getHours()+i.getMinutes()/60)*this.hourSegments;let g=Math.floor(e),v=Math.ceil(s-.016),u=0,m=0;if(1!==this.hourParts&&(u=g<c?0:Math.floor((e-g)*this.hourParts),m=v>d?0:Math.floor((v-s)*this.hourParts)),g<c?g=0:g-=c,v>d&&(v=d),v-=c,g<v){const e={event:t,startIndex:g,endIndex:v,startOffset:u,endOffset:m};let n=r[g].events;n?n.push(e):(n=[],n.push(e),r[g].events=n)}}}if(p){let e=[];for(let t=0;t<this.hourRange;t+=1)r[t].events&&(r[t].events.sort(ln.compareEventByStartOffset),e=e.concat(r[t].events));e.length>0&&this.placeEvents(e)}}refreshView(){if(this.range=this.getRange(this.calendarService.currentDate),this.inited){const e=this.getTitle();this.onTitleChanged.emit(e)}this.calendarService.populateAdjacentViews(this),this.calendarService.rangeChanged(this)}getTitle(){const e=new Date(this.range.startTime.getTime());return e.setHours(12,0,0,0),this.formatTitle(e)}select(e,t){let n=!1;this.markDisabled&&(n=this.markDisabled(e)),this.onTimeSelected.emit({selectedTime:e,events:t.map(e=>e.event),disabled:n})}placeEvents(e){this.calculatePosition(e),ln.calculateWidth(e,this.hourRange,this.hourParts)}placeAllDayEvents(e){this.calculatePosition(e)}overlap(e,t){let n=e,i=t;return(e.startIndex>t.startIndex||e.startIndex===t.startIndex&&e.startOffset>t.startOffset)&&(n=t,i=e),!(n.endIndex<=i.startIndex||n.endIndex-i.startIndex==1&&n.endOffset+i.startOffset>=this.hourParts)}calculatePosition(e){const t=e.length,n=new Array(t);let i,o=0;for(let a=0;a<t;a+=1){for(i=0;i<o;i+=1)n[i]=!1;for(let t=0;t<a;t+=1)this.overlap(e[a],e[t])&&(n[e[t].position]=!0);for(i=0;i<o&&n[i];i+=1);e[a].position=i<o?i:o++}if("rtl"===this.dir)for(let a=0;a<t;a+=1)e[a].position=o-1-e[a].position}eventSelected(e){this.onEventSelected.emit(e)}setScrollPosition(e){this.initScrollPosition=e}};rn.\u0275fac=function(e){return new(e||rn)(o.Y36(en),o.Y36(o.SBq))},rn.\u0275cmp=o.Xpm({type:rn,selectors:[["dayview"]],viewQuery:function(e,t){if(1&e&&o.Gf(Be,7),2&e){let e;o.iGM(e=o.CRH())&&(t.slider=e.first)}},hostVars:2,hostBindings:function(e,t){2&e&&o.ekj("dayview",t.class)},inputs:{dir:"dir",scrollToHour:"scrollToHour",sliderOptions:"sliderOptions",dayviewAllDayEventTemplate:"dayviewAllDayEventTemplate",dayviewNormalEventTemplate:"dayviewNormalEventTemplate",dayviewAllDayEventSectionTemplate:"dayviewAllDayEventSectionTemplate",dayviewNormalEventSectionTemplate:"dayviewNormalEventSectionTemplate",dayviewInactiveAllDayEventSectionTemplate:"dayviewInactiveAllDayEventSectionTemplate",dayviewInactiveNormalEventSectionTemplate:"dayviewInactiveNormalEventSectionTemplate",formatHourColumn:"formatHourColumn",formatDayTitle:"formatDayTitle",allDayLabel:"allDayLabel",hourParts:"hourParts",eventSource:"eventSource",markDisabled:"markDisabled",locale:"locale",dateFormatter:"dateFormatter",preserveScrollPosition:"preserveScrollPosition",lockSwipeToPrev:"lockSwipeToPrev",lockSwipes:"lockSwipes",startHour:"startHour",endHour:"endHour",hourSegments:"hourSegments"},outputs:{onRangeChanged:"onRangeChanged",onEventSelected:"onEventSelected",onTimeSelected:"onTimeSelected",onTitleChanged:"onTitleChanged"},features:[o.TTD],decls:38,vars:17,consts:[[1,"slides-container",3,"options","dir","ionSlideDidChange"],["daySlider",""],[1,"slide-container"],[1,"dayview-allday-table"],[1,"dayview-allday-label"],[1,"dayview-allday-content-wrapper","scroll-content"],[1,"table","table-bordered","dayview-allday-content-table"],["class","calendar-cell",3,"ngClass","ngStyle",4,"ngIf"],["class","calendar-cell",4,"ngIf"],["class","dayview-normal-event-container",3,"initPosition","emitEvent","onScroll",4,"ngIf"],["class","dayview-normal-event-container",3,"initPosition",4,"ngIf"],[1,"calendar-cell",3,"ngClass","ngStyle"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"calendar-cell"],[1,"dayview-normal-event-container",3,"initPosition","emitEvent","onScroll"],[1,"table","table-bordered","table-fixed","dayview-normal-event-table"],[4,"ngFor","ngForOf"],[1,"calendar-hour-column","text-center"],["tappable","",1,"calendar-cell",3,"click"],[1,"dayview-normal-event-container",3,"initPosition"]],template:function(e,t){1&e&&(o.TgZ(0,"ion-slides",0,1),o.NdJ("ionSlideDidChange",function(){return t.onSlideChanged()}),o.TgZ(2,"ion-slide",2),o.TgZ(3,"div",3),o.TgZ(4,"div",4),o._uU(5),o.qZA(),o.TgZ(6,"div",5),o.TgZ(7,"table",6),o.TgZ(8,"tbody"),o.TgZ(9,"tr"),o.YNc(10,We,2,11,"td",7),o.YNc(11,Ke,2,4,"td",8),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(12,Xe,4,3,"init-position-scroll",9),o.YNc(13,nt,4,2,"init-position-scroll",10),o.qZA(),o.TgZ(14,"ion-slide",2),o.TgZ(15,"div",3),o.TgZ(16,"div",4),o._uU(17),o.qZA(),o.TgZ(18,"div",5),o.TgZ(19,"table",6),o.TgZ(20,"tbody"),o.TgZ(21,"tr"),o.YNc(22,ot,2,11,"td",7),o.YNc(23,lt,2,4,"td",8),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(24,ct,4,3,"init-position-scroll",9),o.YNc(25,gt,4,2,"init-position-scroll",10),o.qZA(),o.TgZ(26,"ion-slide",2),o.TgZ(27,"div",3),o.TgZ(28,"div",4),o._uU(29),o.qZA(),o.TgZ(30,"div",5),o.TgZ(31,"table",6),o.TgZ(32,"tbody"),o.TgZ(33,"tr"),o.YNc(34,vt,2,11,"td",7),o.YNc(35,mt,2,4,"td",8),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(36,Tt,4,3,"init-position-scroll",9),o.YNc(37,bt,4,2,"init-position-scroll",10),o.qZA(),o.qZA()),2&e&&(o.Q6J("options",t.sliderOptions)("dir",t.dir),o.xp6(5),o.Oqu(t.allDayLabel),o.xp6(5),o.Q6J("ngIf",0===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",0!==t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",0===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",0!==t.currentViewIndex),o.xp6(4),o.Oqu(t.allDayLabel),o.xp6(5),o.Q6J("ngIf",1===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",1!==t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",1===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",1!==t.currentViewIndex),o.xp6(4),o.Oqu(t.allDayLabel),o.xp6(5),o.Q6J("ngIf",2===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",2!==t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",2===t.currentViewIndex),o.xp6(1),o.Q6J("ngIf",2!==t.currentViewIndex))},directives:function(){return[l.Hr,l.A$,a.O5,a.mk,a.PC,a.tP,dn,a.sg]},styles:['\n .table-fixed {\n table-layout: fixed;\n }\n\n .table {\n width: 100%;\n max-width: 100%;\n background-color: transparent;\n }\n\n .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td,\n .table > tbody > tr > td, .table > tfoot > tr > td {\n padding: 8px;\n line-height: 20px;\n vertical-align: top;\n }\n\n .table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n }\n\n .table > thead:first-child > tr:first-child > th, .table > thead:first-child > tr:first-child > td {\n border-top: 0\n }\n\n .table > tbody + tbody {\n border-top: 2px solid #ddd;\n }\n\n .table-bordered {\n border: 1px solid #ddd;\n }\n\n .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th,\n .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {\n border: 1px solid #ddd;\n }\n\n .table-bordered > thead > tr > th, .table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n }\n\n .table-striped > tbody > tr:nth-child(odd) > td, .table-striped > tbody > tr:nth-child(odd) > th {\n background-color: #f9f9f9\n }\n\n .calendar-hour-column {\n width: 50px;\n white-space: nowrap;\n }\n\n .calendar-event-wrap {\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .calendar-event {\n position: absolute;\n padding: 2px;\n cursor: pointer;\n z-index: 10000;\n }\n\n .slides-container {\n height: 100%;\n }\n\n .slide-container {\n display: block;\n }\n\n .calendar-cell {\n padding: 0 !important;\n height: 37px;\n }\n\n .dayview-allday-label {\n float: left;\n height: 100%;\n line-height: 50px;\n text-align: center;\n width: 50px;\n border-left: 1px solid #ddd;\n }\n\n [dir="rtl"] .dayview-allday-label {\n border-right: 1px solid #ddd;\n float: right;\n }\n\n .dayview-allday-content-wrapper {\n margin-left: 50px;\n overflow: hidden;\n height: 51px;\n }\n\n [dir="rtl"] .dayview-allday-content-wrapper {\n margin-left: 0;\n margin-right: 50px;\n }\n\n .dayview-allday-content-table {\n min-height: 50px;\n }\n\n .dayview-allday-content-table td {\n border-left: 1px solid #ddd;\n border-right: 1px solid #ddd;\n }\n\n .dayview-allday-table {\n height: 50px;\n position: relative;\n border-bottom: 1px solid #ddd;\n font-size: 14px;\n }\n\n .dayview-normal-event-container {\n margin-top: 50px;\n overflow: hidden;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n position: absolute;\n font-size: 14px;\n }\n\n .scroll-content {\n overflow-y: auto;\n overflow-x: hidden;\n }\n\n ::-webkit-scrollbar,\n *::-webkit-scrollbar {\n display: none;\n }\n\n .table > tbody > tr > td.calendar-hour-column {\n padding-left: 0;\n padding-right: 0;\n vertical-align: middle;\n }\n\n @media (max-width: 750px) {\n .dayview-allday-label, .calendar-hour-column {\n width: 31px;\n font-size: 12px;\n }\n\n .dayview-allday-label {\n padding-top: 4px;\n }\n\n .table > tbody > tr > td.calendar-hour-column {\n padding-left: 0;\n padding-right: 0;\n vertical-align: middle;\n line-height: 12px;\n }\n\n .dayview-allday-label {\n line-height: 20px;\n }\n\n .dayview-allday-content-wrapper {\n margin-left: 31px;\n }\n\n [dir="rtl"] .dayview-allday-content-wrapper {\n margin-left: 0;\n margin-right: 31px;\n }\n }\n '],encapsulation:2}),rn.ctorParameters=()=>[{type:en},{type:o.SBq}],(0,i.gn)([(0,o.i9L)("daySlider",{static:!0})],rn.prototype,"slider",void 0),(0,i.gn)([(0,o.pfw)("class.dayview")],rn.prototype,"class",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"dayviewAllDayEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"dayviewNormalEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"dayviewAllDayEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"dayviewNormalEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"dayviewInactiveAllDayEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"dayviewInactiveNormalEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"formatHourColumn",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"formatDayTitle",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"allDayLabel",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"hourParts",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"eventSource",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"markDisabled",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"locale",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"dateFormatter",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"dir",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"scrollToHour",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"preserveScrollPosition",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"lockSwipeToPrev",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"lockSwipes",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"startHour",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"endHour",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"sliderOptions",void 0),(0,i.gn)([(0,o.IIB)()],rn.prototype,"hourSegments",void 0),(0,i.gn)([(0,o.r_U)()],rn.prototype,"onRangeChanged",void 0),(0,i.gn)([(0,o.r_U)()],rn.prototype,"onEventSelected",void 0),(0,i.gn)([(0,o.r_U)()],rn.prototype,"onTimeSelected",void 0),(0,i.gn)([(0,o.r_U)()],rn.prototype,"onTitleChanged",void 0);var sn=(()=>(function(e){e[e.QuarterHour=15]="QuarterHour",e[e.HalfHour=30]="HalfHour",e[e.Hour=60]="Hour"}(sn||(sn={})),sn))();let cn=(()=>{let e=class{constructor(e,t){this.calendarService=e,this.appLocale=t,this.eventSource=[],this.calendarMode="month",this.formatDay="d",this.formatDayHeader="EEE",this.formatDayTitle="MMMM dd, yyyy",this.formatWeekTitle="MMMM yyyy, 'Week' w",this.formatMonthTitle="MMMM yyyy",this.formatWeekViewDayHeader="EEE d",this.formatHourColumn="ha",this.showEventDetail=!0,this.startingDayMonth=0,this.startingDayWeek=0,this.allDayLabel="all day",this.noEventsLabel="No Events",this.queryMode="local",this.step=sn.Hour,this.timeInterval=60,this.autoSelect=!0,this.dir="",this.scrollToHour=0,this.preserveScrollPosition=!1,this.lockSwipeToPrev=!1,this.lockSwipes=!1,this.locale="",this.startHour=0,this.endHour=24,this.onCurrentDateChanged=new o.vpe,this.onRangeChanged=new o.vpe,this.onEventSelected=new o.vpe,this.onTimeSelected=new o.vpe,this.onTitleChanged=new o.vpe,this.hourParts=1,this.hourSegments=1,this.locale=t}get currentDate(){return this._currentDate}set currentDate(e){e||(e=new Date),this._currentDate=e,this.calendarService.setCurrentDate(e,!0),this.onCurrentDateChanged.emit(this._currentDate)}ngOnInit(){this.autoSelect&&(this.autoSelect="false"!==this.autoSelect.toString()),this.hourSegments=60/this.timeInterval,this.hourParts=60/this.step,this.hourParts=this.hourParts<=this.hourSegments?1:this.hourParts/this.hourSegments,this.startHour=parseInt(this.startHour.toString()),this.endHour=parseInt(this.endHour.toString()),this.calendarService.queryMode=this.queryMode,this.currentDateChangedFromChildrenSubscription=this.calendarService.currentDateChangedFromChildren$.subscribe(e=>{this._currentDate=e,this.onCurrentDateChanged.emit(e)})}ngOnDestroy(){this.currentDateChangedFromChildrenSubscription&&(this.currentDateChangedFromChildrenSubscription.unsubscribe(),this.currentDateChangedFromChildrenSubscription=null)}rangeChanged(e){this.onRangeChanged.emit(e)}eventSelected(e){this.onEventSelected.emit(e)}timeSelected(e){this.onTimeSelected.emit(e)}titleChanged(e){this.onTitleChanged.emit(e)}loadEvents(){this.calendarService.loadEvents()}slideNext(){this.calendarService.slide(1)}slidePrev(){this.calendarService.slide(-1)}update(){this.calendarService.update()}};return e.\u0275fac=function(t){return new(t||e)(o.Y36(en),o.Y36(o.soG))},e.\u0275cmp=o.Xpm({type:e,selectors:[["calendar"]],inputs:{eventSource:"eventSource",calendarMode:"calendarMode",formatDay:"formatDay",formatDayHeader:"formatDayHeader",formatDayTitle:"formatDayTitle",formatWeekTitle:"formatWeekTitle",formatMonthTitle:"formatMonthTitle",formatWeekViewDayHeader:"formatWeekViewDayHeader",formatHourColumn:"formatHourColumn",showEventDetail:"showEventDetail",startingDayMonth:"startingDayMonth",startingDayWeek:"startingDayWeek",allDayLabel:"allDayLabel",noEventsLabel:"noEventsLabel",queryMode:"queryMode",step:"step",timeInterval:"timeInterval",autoSelect:"autoSelect",dir:"dir",scrollToHour:"scrollToHour",preserveScrollPosition:"preserveScrollPosition",lockSwipeToPrev:"lockSwipeToPrev",lockSwipes:"lockSwipes",locale:"locale",startHour:"startHour",endHour:"endHour",currentDate:"currentDate",markDisabled:"markDisabled",monthviewDisplayEventTemplate:"monthviewDisplayEventTemplate",monthviewInactiveDisplayEventTemplate:"monthviewInactiveDisplayEventTemplate",monthviewEventDetailTemplate:"monthviewEventDetailTemplate",weekviewHeaderTemplate:"weekviewHeaderTemplate",weekviewAllDayEventTemplate:"weekviewAllDayEventTemplate",weekviewNormalEventTemplate:"weekviewNormalEventTemplate",dayviewAllDayEventTemplate:"dayviewAllDayEventTemplate",dayviewNormalEventTemplate:"dayviewNormalEventTemplate",weekviewAllDayEventSectionTemplate:"weekviewAllDayEventSectionTemplate",weekviewNormalEventSectionTemplate:"weekviewNormalEventSectionTemplate",dayviewAllDayEventSectionTemplate:"dayviewAllDayEventSectionTemplate",dayviewNormalEventSectionTemplate:"dayviewNormalEventSectionTemplate",weekviewInactiveAllDayEventSectionTemplate:"weekviewInactiveAllDayEventSectionTemplate",weekviewInactiveNormalEventSectionTemplate:"weekviewInactiveNormalEventSectionTemplate",dayviewInactiveAllDayEventSectionTemplate:"dayviewInactiveAllDayEventSectionTemplate",dayviewInactiveNormalEventSectionTemplate:"dayviewInactiveNormalEventSectionTemplate",dateFormatter:"dateFormatter",sliderOptions:"sliderOptions"},outputs:{onCurrentDateChanged:"onCurrentDateChanged",onRangeChanged:"onRangeChanged",onEventSelected:"onEventSelected",onTimeSelected:"onTimeSelected",onTitleChanged:"onTitleChanged"},features:[o._Bn([en])],decls:24,vars:7,consts:[["monthviewDefaultDisplayEventTemplate",""],["monthviewDefaultEventDetailTemplate",""],["defaultWeekviewHeaderTemplate",""],["defaultAllDayEventTemplate",""],["defaultNormalEventTemplate",""],["defaultWeekViewAllDayEventSectionTemplate",""],["defaultDayViewAllDayEventSectionTemplate",""],["defaultNormalEventSectionTemplate",""],["defaultInactiveAllDayEventSectionTemplate",""],["defaultInactiveNormalEventSectionTemplate",""],[3,"ngSwitch"],[3,"formatDay","formatDayHeader","formatMonthTitle","startingDayMonth","showEventDetail","noEventsLabel","autoSelect","eventSource","markDisabled","monthviewDisplayEventTemplate","monthviewInactiveDisplayEventTemplate","monthviewEventDetailTemplate","locale","dateFormatter","dir","lockSwipeToPrev","lockSwipes","sliderOptions","onRangeChanged","onEventSelected","onTimeSelected","onTitleChanged",4,"ngSwitchCase"],[3,"formatWeekTitle","formatWeekViewDayHeader","formatHourColumn","startingDayWeek","allDayLabel","hourParts","autoSelect","hourSegments","eventSource","markDisabled","weekviewHeaderTemplate","weekviewAllDayEventTemplate","weekviewNormalEventTemplate","weekviewAllDayEventSectionTemplate","weekviewNormalEventSectionTemplate","weekviewInactiveAllDayEventSectionTemplate","weekviewInactiveNormalEventSectionTemplate","locale","dateFormatter","dir","scrollToHour","preserveScrollPosition","lockSwipeToPrev","lockSwipes","startHour","endHour","sliderOptions","onRangeChanged","onEventSelected","onTimeSelected","onTitleChanged",4,"ngSwitchCase"],[3,"formatDayTitle","formatHourColumn","allDayLabel","hourParts","hourSegments","eventSource","markDisabled","dayviewAllDayEventTemplate","dayviewNormalEventTemplate","dayviewAllDayEventSectionTemplate","dayviewNormalEventSectionTemplate","dayviewInactiveAllDayEventSectionTemplate","dayviewInactiveNormalEventSectionTemplate","locale","dateFormatter","dir","scrollToHour","preserveScrollPosition","lockSwipeToPrev","lockSwipes","startHour","endHour","sliderOptions","onRangeChanged","onEventSelected","onTimeSelected","onTitleChanged",4,"ngSwitchCase"],["class","event-detail-container","has-bouncing","false","overflow-scroll","false",4,"ngIf"],["has-bouncing","false","overflow-scroll","false",1,"event-detail-container"],[3,"click",4,"ngFor","ngForOf"],[4,"ngIf"],[3,"click"],["class","monthview-eventdetail-timecolumn",4,"ngIf"],[1,"event-detail"],[1,"monthview-eventdetail-timecolumn"],[1,"no-events-label"],[1,"calendar-event-inner"],[3,"ngClass","ngStyle",4,"ngIf"],[3,"ngClass","ngStyle"],["class","calendar-event","tappable","",3,"ngStyle","click",4,"ngFor","ngForOf"],["tappable","",1,"calendar-event",3,"ngStyle","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"formatDay","formatDayHeader","formatMonthTitle","startingDayMonth","showEventDetail","noEventsLabel","autoSelect","eventSource","markDisabled","monthviewDisplayEventTemplate","monthviewInactiveDisplayEventTemplate","monthviewEventDetailTemplate","locale","dateFormatter","dir","lockSwipeToPrev","lockSwipes","sliderOptions","onRangeChanged","onEventSelected","onTimeSelected","onTitleChanged"],[3,"formatWeekTitle","formatWeekViewDayHeader","formatHourColumn","startingDayWeek","allDayLabel","hourParts","autoSelect","hourSegments","eventSource","markDisabled","weekviewHeaderTemplate","weekviewAllDayEventTemplate","weekviewNormalEventTemplate","weekviewAllDayEventSectionTemplate","weekviewNormalEventSectionTemplate","weekviewInactiveAllDayEventSectionTemplate","weekviewInactiveNormalEventSectionTemplate","locale","dateFormatter","dir","scrollToHour","preserveScrollPosition","lockSwipeToPrev","lockSwipes","startHour","endHour","sliderOptions","onRangeChanged","onEventSelected","onTimeSelected","onTitleChanged"],[3,"formatDayTitle","formatHourColumn","allDayLabel","hourParts","hourSegments","eventSource","markDisabled","dayviewAllDayEventTemplate","dayviewNormalEventTemplate","dayviewAllDayEventSectionTemplate","dayviewNormalEventSectionTemplate","dayviewInactiveAllDayEventSectionTemplate","dayviewInactiveNormalEventSectionTemplate","locale","dateFormatter","dir","scrollToHour","preserveScrollPosition","lockSwipeToPrev","lockSwipes","startHour","endHour","sliderOptions","onRangeChanged","onEventSelected","onTimeSelected","onTitleChanged"]],template:function(e,t){1&e&&(o.YNc(0,xt,1,1,"ng-template",null,0,o.W1O),o.YNc(2,Ot,1,1,"ng-template",null,1,o.W1O),o.YNc(4,kt,1,1,"ng-template",null,2,o.W1O),o.YNc(6,Et,2,1,"ng-template",null,3,o.W1O),o.YNc(8,qt,2,1,"ng-template",null,4,o.W1O),o.YNc(10,Jt,1,1,"ng-template",null,5,o.W1O),o.YNc(12,Vt,1,1,"ng-template",null,6,o.W1O),o.YNc(14,Wt,1,1,"ng-template",null,7,o.W1O),o.YNc(16,Rt,0,0,"ng-template",null,8,o.W1O),o.YNc(18,jt,0,0,"ng-template",null,9,o.W1O),o.TgZ(20,"div",10),o.YNc(21,Kt,1,18,"monthview",11),o.YNc(22,zt,1,27,"weekview",12),o.YNc(23,Gt,1,23,"dayview",13),o.qZA()),2&e&&(o.xp6(20),o.Gre("",t.calendarMode,"view-container"),o.Q6J("ngSwitch",t.calendarMode),o.xp6(1),o.Q6J("ngSwitchCase","month"),o.xp6(1),o.Q6J("ngSwitchCase","week"),o.xp6(1),o.Q6J("ngSwitchCase","day"))},directives:[a.RF,a.n9,a.O5,l.q_,a.sg,l.Ie,a.mk,a.PC,a.tP,nn,an,rn],pipes:[a.uU],styles:["[_nghost-%COMP%] > div[_ngcontent-%COMP%] { height: 100%; }\n\n .event-detail-container[_ngcontent-%COMP%] {\n border-top: 2px darkgrey solid;\n }\n\n .no-events-label[_ngcontent-%COMP%] {\n font-weight: bold;\n color: darkgrey;\n text-align: center;\n }\n\n .event-detail[_ngcontent-%COMP%] {\n cursor: pointer;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .monthview-eventdetail-timecolumn[_ngcontent-%COMP%] {\n width: 110px;\n overflow: hidden;\n }\n\n .calendar-event-inner[_ngcontent-%COMP%] {\n overflow: hidden;\n background-color: #3a87ad;\n color: white;\n height: 100%;\n width: 100%;\n padding: 2px;\n line-height: 15px;\n text-align: initial;\n }\n\n @media (max-width: 750px) {\n .calendar-event-inner[_ngcontent-%COMP%] {\n font-size: 12px;\n }\n }"]}),(0,i.gn)([(0,o.IIB)()],e.prototype,"currentDate",null),(0,i.gn)([(0,o.IIB)()],e.prototype,"eventSource",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"calendarMode",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"formatDay",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"formatDayHeader",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"formatDayTitle",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"formatWeekTitle",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"formatMonthTitle",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"formatWeekViewDayHeader",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"formatHourColumn",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"showEventDetail",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"startingDayMonth",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"startingDayWeek",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"allDayLabel",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"noEventsLabel",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"queryMode",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"step",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"timeInterval",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"autoSelect",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"markDisabled",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"monthviewDisplayEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"monthviewInactiveDisplayEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"monthviewEventDetailTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"weekviewHeaderTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"weekviewAllDayEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"weekviewNormalEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"dayviewAllDayEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"dayviewNormalEventTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"weekviewAllDayEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"weekviewNormalEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"dayviewAllDayEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"dayviewNormalEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"weekviewInactiveAllDayEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"weekviewInactiveNormalEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"dayviewInactiveAllDayEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"dayviewInactiveNormalEventSectionTemplate",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"dateFormatter",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"dir",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"scrollToHour",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"preserveScrollPosition",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"lockSwipeToPrev",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"lockSwipes",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"locale",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"startHour",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"endHour",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"sliderOptions",void 0),(0,i.gn)([(0,o.r_U)()],e.prototype,"onCurrentDateChanged",void 0),(0,i.gn)([(0,o.r_U)()],e.prototype,"onRangeChanged",void 0),(0,i.gn)([(0,o.r_U)()],e.prototype,"onEventSelected",void 0),(0,i.gn)([(0,o.r_U)()],e.prototype,"onTimeSelected",void 0),(0,i.gn)([(0,o.r_U)()],e.prototype,"onTitleChanged",void 0),e=(0,i.gn)([(0,i.fM)(1,(0,o.tBr)(o.soG))],e),e})(),dn=(()=>{let e=class{constructor(e){this.onScroll=new o.vpe,this.listenerAttached=!1,this.element=e}ngOnChanges(e){let t=e.initPosition;if(t&&void 0!==t.currentValue&&this.scrollContent){const e=this;setTimeout(function(){e.scrollContent.scrollTop=t.currentValue},0)}}ngAfterViewInit(){const e=this.scrollContent=this.element.nativeElement.querySelector(".scroll-content");if(void 0!==this.initPosition&&(e.scrollTop=this.initPosition),this.emitEvent&&!this.listenerAttached){let t=this.onScroll;this.handler=function(){t.emit(e.scrollTop)},this.listenerAttached=!0,e.addEventListener("scroll",this.handler)}}ngOnDestroy(){this.listenerAttached&&this.scrollContent.removeEventListener("scroll",this.handler)}};return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq))},e.\u0275cmp=o.Xpm({type:e,selectors:[["init-position-scroll"]],inputs:{initPosition:"initPosition",emitEvent:"emitEvent"},outputs:{onScroll:"onScroll"},features:[o.TTD],ngContentSelectors:Xt,decls:2,vars:0,consts:[[1,"scroll-content",2,"height","100%"]],template:function(e,t){1&e&&(o.F$t(),o.TgZ(0,"div",0),o.Hsn(1),o.qZA())},styles:["\n .scroll-content {\n overflow-y: auto;\n overflow-x: hidden;\n } \n "],encapsulation:2}),(0,i.gn)([(0,o.IIB)()],e.prototype,"initPosition",void 0),(0,i.gn)([(0,o.IIB)()],e.prototype,"emitEvent",void 0),(0,i.gn)([(0,o.r_U)()],e.prototype,"onScroll",void 0),e})(),pn=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[l.Pc,a.ez]]}),e})()}}]);