!function(){"use strict";functiona(a,d){a.state("calendars",{url:"/calendar",views:{calendars:{templateUrl:"UIxCalMainView",controller:"CalendarsController",controllerAs:"app"}},resolve:{stateCalendars:b}}).state("calendars.view",{url:"/{view:(?:day|week|month|multicolumnday)}/:day",views:{calendarView:{templateUrl:function(a){returna.view+"view?day="+a.day},controller:"CalendarController",controllerAs:"calendar"}},resolve:{stateEventsBlocks:c}}),d.when("/calendar/day",function(){vara=newDate;return"/calendar/day/"+a.getDayString()}),d.when("/calendar/multicolumnday",function(){vara=newDate;return"/calendar/multicolumnday/"+a.getDayString()}),d.when("/calendar/week",function(){vara=newDate;return"/calendar/week/"+a.getDayString()}),d.when("/calendar/month",function(){vara=newDate;return"/calendar/month/"+a.getDayString()}),d.otherwise("/calendar")}functionb(a){returna.$calendars||a.$findAll(window.calendarsData)}functionc(a,b,c){returnb.$eventsBlocksForView(a.view,a.day.asDate()).then(function(a){return_.forEach(a,function(a){a.id&&(a.calendar=newc({id:a.id,name:a.calendarName}))}),a})}functiond(a,b,c,d,e){a.$on("$stateChangeError",function(a,c,e,f,g,h){b.error(h),d.go("calendar")}),a.$on("$routeChangeError",function(a,c,d,e){b.error(a,c,d,e)}),0===c.url().length&&e.ready().then(function(){vara="/calendar/",b=/(.+)view/.exec(e.settings.Calendar.View);a+=b?b[1]:"week",c.replace().url(a)})}angular.module("SOGo.SchedulerUI",["ui.router","angularFileUpload","SOGo.Common","SOGo.PreferencesUI","SOGo.ContactsUI","SOGo.MailerUI"]).config(a).run(d),a.$inject=["$stateProvider","$urlRouterProvider"],b.$inject=["Calendar"],c.$inject=["$stateParams","Component","Calendar"],d.$inject=["$rootScope","$log","$location","$state","Preferences"]}(),function(){"use strict";functiona(a,b,c,d,e,f,g){functionh(){f.$eventsBlocksForView(d.view,d.day.asDate()).then(function(a){l.views=a,_.forEach(l.views,function(a){a.id&&(a.calendar=newe({id:a.id,name:a.calendarName}))})})}functioni(a){varb=angular.element(a.currentTarget).attr("date");c.go("calendars.view",{day:b})}functionj(a){c.go("calendars.view",{view:a})}vark,l=this;l.views=g,l.changeDate=i,l.changeView=j,k=b.$on("calendars:list",h),a.$on("$destroy",k)}a.$inject=["$scope","$rootScope","$state","$stateParams","Calendar","Component","stateEventsBlocks"],angular.module("SOGo.SchedulerUI").controller("CalendarController",a)}(),function(){"use strict";functiona(a,b,c,d,e,f,g,h){functioni(a,b){(b&&b.reload||z.componentType!=a)&&(angular.isUndefined(h["$"+a])&&h.$filter(a),z.unselectComponents(),z.componentType=a,h.saveSelectedList(a))}functionj(){_.each(h["$"+z.componentType],function(a){a.selected=!1})}functionk(){_.each(h["$"+z.componentType],function(a){a.selected=!0})}functionm(a,b){b.selected=!b.selected,a.preventDefault(),a.stopPropagation()}functionn(){e.confirm(l("Warning"),l("Are you sure you want to delete the selected components?")).then(function(){vara=_.filter(h["$"+z.componentType],function(a){returna.selected});g.$deleteComponents(a)},function(a,b){})}functiono(a,b){q(a,b,"appointment")}functionp(a,b){q(a,b,"task")}functionq(a,b,c){if(b.viewable){vare="UIx"+c.capitalize()+"ViewTemplate";d.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!0,escapeToClose:!0,templateUrl:e,controller:"ComponentController",controllerAs:"editor",locals:{stateComponent:b}})}}functionr(a,b){varc,e="appointment";b?(c=b,e=b.type):("tasks"==z.componentType&&(e="task"),c=newh({pid:g.$defaultCalendar(),type:e}));varf="UIx"+e.capitalize()+"EditorTemplate";returnd.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!0,escapeToClose:!0,templateUrl:f,controller:"ComponentEditorController",controllerAs:"editor",locals:{stateComponent:c}})}functions(c){functione(a,b,c,d){a.updateThisOccurrence=function(){c.$adjust(d).then(b.hide,b.cancel)},a.updateAllOccurrences=function(){deletec.occurrenceId,c.$adjust(d).then(b.hide,b.cancel)}}varf,i,j,k,m,n,o;f=h.$ghost.component,i=h.$ghost.pointerHandler,f.isNew?(j=i.currentEven