!function(){"use strict";functiona(a,c){a.state("preferences",{"abstract":!0,views:{preferences:{templateUrl:"preferences.html",controller:"PreferencesController",controllerAs:"app"}},resolve:{statePreferences:b}}).state("preferences.general",{url:"/general",views:{module:{templateUrl:"generalPreferences.html"}}}).state("preferences.calendars",{url:"/calendars",views:{module:{templateUrl:"calendarsPreferences.html"}}}).state("preferences.addressbooks",{url:"/addressbooks",views:{module:{templateUrl:"addressbooksPreferences.html"}}}).state("preferences.mailer",{url:"/mailer",views:{module:{templateUrl:"mailerPreferences.html"}}}),c.otherwise("/general")}functionb(a){returna}functionc(a){a.$on("$routeChangeError",function(a,b,c,d){console.error(a,b,c,d)})}angular.module("SOGo.PreferencesUI",["ui.router","ck","SOGo.Common","SOGo.MailerUI","SOGo.ContactsUI","SOGo.Authentication"]).config(a).run(c),a.$inject=["$stateProvider","$urlRouterProvider"],b.$inject=["Preferences"],c.$inject=["$rootScope"]}(),function(){"use strict";functiona(a,b,c,d,e){functionf(){returnd>0?!1:!e}functiong(){a.cancel()}functionh(){a.hide()}vari=this;i.defaults=b,i.account=c,i.accountId=d,i.customFromIsReadonly=f,i.cancel=g,i.save=h}a.$inject=["$mdDialog","defaults","account","accountId","mailCustomFromEnabled"],angular.module("SOGo.PreferencesUI").controller("AccountDialogController",a)}(),function(){"use strict";functiona(a,b,c,d,e,f){functiong(){c.cancel()}functionh(a){c.hide()}functioni(a){n.filter.rules||(n.filter.rules=[]),n.filter.rules.push({field:"subject",operator:"contains"})}functionj(a){n.filter.rules.splice(a,1)}functionk(a){n.filter.actions||(n.filter.actions=[]),n.filter.actions.push({method:"discard"})}functionm(a){n.filter.actions.splice(a,1)}varn=this,o=b.sieveCapabilities;n.filter=d,n.mailboxes=e,n.labels=f,n.cancel=g,n.save=h,n.addMailFilterRule=i,n.removeMailFilterRule=j,n.addMailFilterAction=k,n.removeMailFilterAction=m,n.fieldLabels={subject:l("Subject"),from:l("From"),to:l("To"),cc:l("Cc"),to_or_cc:l("To or Cc"),size:l("Size (Kb)"),header:l("Header")},o.indexOf("body")>-1&&(n.fieldLabels.body=l("Body")),n.methodLabels={discard:l("Discard the message"),keep:l("Keep the message"),redirect:l("Forward the message to"),vacation:l("Send a vacation message"),stop:l("Stop processing filter rules")},o.indexOf("reject")>-1&&(n.methodLabels.reject=l("Send a reject message")),o.indexOf("fileinto")>-1&&(n.methodLabels.fileinto=l("File the message in")),(o.indexOf("imapflags")>-1||o.indexOf("imap4flags")>-1)&&(n.methodLabels.addflag=l("Flag the message with")),n.numberOperatorLabels={under:l("is under"),over:l("is over")},n.textOperatorLabels={is:l("is"),is_not:l("is not"),contains:l("contains"),contains_not:l("does not contain"),matches:l("matches"),matches_not:l("does not match")},o.indexOf("regex")>-1&&(n.textOperatorLabels.regex=l("matches regex"),n.textOperatorLabels.regex_not=l("does not match regex")),n.flagLabels={seen:l("Seen"),deleted:l("Deleted"),answered:l("Answered"),flagged:l("Flagged"),junk:l("Junk"),not_junk:l("Not Junk")}}a.$inject=["$scope","$window","$mdDialog","filter","mailboxes","labels"],angular.module("SOGo.PreferencesUI").controller("FiltersDialogController",a)}(),function(){"use strict";functiona(a,b,c,d,e,f,g,h,i,j,k,m,n){functiono(a){d("xs")&&e("left").close(),c.go("preferences."+a)}functionp(){i.confirm(l("Warning"),l("Save preferences and reload page now?"),{ok:l("Yes"),cancel:l("No")}).then(function(){D().then(function(){b.location.reload(!0)})})}functionq(){I.preferences.defaults.SOGoCalendarCategoriesColors["New category"]="#aaa",I.preferences.defaults.SOGoCalendarCategories.push("New category"),h("calendarCategory_"+(I.preferences.defaults.SOGoCalendarCategories.length-1))}functionr(a){varb=I.preferences.defaults.SOGoCalendarCategories[a];I.preferences.defaults.SOGoCalendarCategories.splice(a,1),deleteI.preferences.defaults.SOGoCalendarCategoriesColors[b]}functions(){I.preferences.defaults.SOGoContactsCategories.push(""),h("contactCategory_"+(I.preferences.defaults.SOGoContactsCat