chore(js/css): update generated files

This commit is contained in:
InverseBot committed 2020-07-30 00:37:08 -04:00
1 parent 8205acc5d5
commit 728b4eeed4
10 files changed
+10 -10

No files matched your search

+1 -1
View File
@@ -1,2 +1,2 @@
function l(){var n,e,t=arguments[0],i=t,r=arguments;for(labels[t]?i=labels[t]:clabels[t]&&(i=clabels[t]),n=1,e=0;n<r.length;n++,e++)i=i.replace("%{"+e+"}",r[n]);return(n=1)<r.length&&(i=i.replace(/%((%)|s|d)/g,function(e){var t=null;if(e[2])t=e[2];else{switch(t=r[n],e){case"%d":t=parseFloat(t),isNaN(t)&&(t=0)}n++}return t})),i}function hexToRgb(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function contrast(e){var t,n,i=1;if(t=hexToRgb(e)){n=[t.r/255,t.g/255,t.b/255];for(var r=0;r<n.length;++r)n[r]<=.03928?n[r]=n[r]/12.92:n[r]=Math.pow((n[r]+.055)/1.055,2.4);i=.2126*n[0]+.7152*n[1]+.0722*n[2]}return.179<i?"black":"white"}function guid(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return(e()+e()+"-"+e()+"-4"+e().substr(0,3)+"-"+e()+"-"+e()+e()+e()).toLowerCase()}!function(){"use strict";function e(e,t,n,i,r,o,s){e.classNameFilter(/^(?:(?!ng-animate-disabled).)*$/),r.definePalette("sogo-green",{50:"eaf5e9",100:"cbe5c8",200:"aad6a5",300:"88c781",400:"66b86a",500:"56b04c",600:"4da143",700:"388e3c",800:"367d2e",900:"225e1b",A100:"fafafa",A200:"69f0ae",A400:"00e676",A700:"00c853",contrastDefaultColor:"dark",contrastLightColors:["300","400","500","600","700","800","900"]}),r.definePalette("sogo-blue",{50:"f0faf9",100:"e1f5f3",200:"ceebe8",300:"bfe0dd",400:"b2d6d3",500:"a1ccc8",600:"8ebfbb",700:"7db3b0",800:"639997",900:"4d8080",A100:"d4f7fa",A200:"c3f5fa",A400:"53e3f0",A700:"00b0c0",contrastDefaultColor:"light",contrastDarkColors:["50","100","200"]}),r.definePalette("sogo-paper",{50:"fcf7f8",100:"f7f1dc",200:"ede5ca",300:"e6d8ba",400:"e2d2a3",500:"d6c48d",600:"baa870",700:"857545",800:"524517",900:"433809",1e3:"000000",A100:"ffffff",A200:"eeeeee",A400:"bdbdbd",A700:"616161",contrastDefaultColor:"dark",contrastLightColors:["800","900"]});var a=r.extendPalette("grey",{1e3:"baa870"});r.definePalette("sogo-grey",a),r.theme("default").primaryPalette("sogo-blue",{default:"900","hue-1":"400","hue-2":"800","hue-3":"A700"}).accentPalette("sogo-green",{default:"500","hue-1":"A100","hue-2":"300","hue-3":"A700"}).backgroundPalette("sogo-grey"),r.registerStyles([".md-autocomplete-suggestions.md-3-line li p {"," color: '{{foreground-2}}';","}"].join("")),r.registerStyles([".sg-time-selection-indicator.sg-time-selected,",".sg-time-selection-indicator:hover.sg-time-selected,",".sg-time-selection-indicator.md-focus.sg-time-selected {"," background: '{{primary-500}}';","}",".sg-timepicker-open .sg-timepicker-icon {"," color: '{{primary-900}}';","}",".sg-timepicker-time,",".sg-timepicker-open .sg-timepicker-input-container {"," background: '{{background-hue-1}}';","}",".sg-timepicker-input-mask-opaque {"," box-shadow: 0 0 0 9999px '{{background-hue-1}}';","}"].join("")),r.registerStyles(["[ui-view=calendars] .hours {"," color: '{{primary-700}}';","}",".attendees .busy {"," background-color: '{{background-1000}}';","}",".attendees .event {"," background-color: '{{primary-300}}';","}"].join("")),r.registerStyles([".sg-message-thread {"," background-color: '{{primary-100}}';","}",".sg-message-thread-first {"," background-color: '{{primary-200}}';","}"].join("")),window.DebugEnabled||(t.debugEnabled(!1),n.debugInfoEnabled(!1),o.disableWarnings(),s.errorOnUnhandledRejections(!1),r.generateThemesOnDemand(!0)),i.interceptors.push("AuthInterceptor"),i.interceptors.push("ErrorInterceptor")}function a(t,e,n,i,r){var o,s;return o=e.defer(),(s=angular.element('<iframe class="ng-hide" src="'+t.UserFolderURL+'recover"></iframe>')).on("load",function(){var e=i.get("$state");2<r.config.attempt?(angular.element(t).off("beforeunload"),t.location.href=t.ApplicationBaseURL+e.href(e.current),o.reject()):n(function(){var e=i.get("$http");r.config.attempt?r.config.attempt++:r.config.attempt=1,e(r.config).then(function(e){o.resolve(e)},function(e){o.reject(e)}).finally(function(){n(s.remove,1e3)})},2e3)}),document.body.appendChild(s[0]),o.promise}function t(n,i,r,o){return{response:function(e){var t;return e&&/^application\/json/.test(e.config.headers.Accept)&&/^[\n\r\t ]*<!DOCTYPE html/.test(e.data)?n.usesCASAuthentication||n.usesSAML2Authentication?a(n,i,r,o,e):(t=o.get("$state"),angular.element(n).off("beforeunload"),n.location.href=n.ApplicationBaseURL+t.href(t.current),i.reject()):e}}}function n(n,i,r,o,s){return{responseError:function(e){var t;if(/^application\/json/.test(e.config.headers.Accept)){if((i.usesCASAuthentication||i.usesSAML2Authentication)&&-1==e.status)return a(i,r,o,s,e);i.usesSAML2Authentication&&401==e.status&&!i.recovered?(t=s.get("$state"),angular.element(i).off("beforeunload"),i.recovered=!0,i.location.href=i.ApplicationBaseURL+t.href(t.current)):e.data.quiet||n.$broadcast("http:Error",e)}return r.reject(e)}}}angular.module("SOGo.Common",["ngAnimate","ngMessages","ngSanitize","ngMaterial","mdColors"]).value("sgSettings",{isPopup:document.body.classList.contains("popup"),baseURL:function(){return ApplicLine truncated
function l(){var n,e,t=arguments[0],i=t,r=arguments;for(labels[t]?i=labels[t]:clabels[t]&&(i=clabels[t]),n=1,e=0;n<r.length;n++,e++)i=i.replace("%{"+e+"}",r[n]);return(n=1)<r.length&&(i=i.replace(/%((%)|s|d)/g,function(e){var t=null;if(e[2])t=e[2];else{switch(t=r[n],e){case"%d":t=parseFloat(t),isNaN(t)&&(t=0)}n++}return t})),i}function hexToRgb(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function contrast(e){var t,n,i=1;if(t=hexToRgb(e)){n=[t.r/255,t.g/255,t.b/255];for(var r=0;r<n.length;++r)n[r]<=.03928?n[r]=n[r]/12.92:n[r]=Math.pow((n[r]+.055)/1.055,2.4);i=.2126*n[0]+.7152*n[1]+.0722*n[2]}return.179<i?"black":"white"}function guid(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return(e()+e()+"-"+e()+"-4"+e().substr(0,3)+"-"+e()+"-"+e()+e()+e()).toLowerCase()}!function(){"use strict";function e(e,t,n,i,r,o,s){e.classNameFilter(/^(?:(?!ng-animate-disabled).)*$/),r.definePalette("sogo-green",{50:"eaf5e9",100:"cbe5c8",200:"aad6a5",300:"88c781",400:"66b86a",500:"56b04c",600:"4da143",700:"388e3c",800:"367d2e",900:"225e1b",A100:"fafafa",A200:"69f0ae",A400:"00e676",A700:"00c853",contrastDefaultColor:"dark",contrastLightColors:["300","400","500","600","700","800","900"]}),r.definePalette("sogo-blue",{50:"f0faf9",100:"e1f5f3",200:"ceebe8",300:"bfe0dd",400:"b2d6d3",500:"a1ccc8",600:"8ebfbb",700:"7db3b0",800:"639997",900:"4d8080",A100:"d4f7fa",A200:"c3f5fa",A400:"53e3f0",A700:"00b0c0",contrastDefaultColor:"light",contrastDarkColors:["50","100","200"]}),r.definePalette("sogo-paper",{50:"fcf7f8",100:"f7f1dc",200:"ede5ca",300:"e6d8ba",400:"e2d2a3",500:"d6c48d",600:"baa870",700:"857545",800:"524517",900:"433809",1e3:"000000",A100:"ffffff",A200:"eeeeee",A400:"bdbdbd",A700:"616161",contrastDefaultColor:"dark",contrastLightColors:["800","900"]});var a=r.extendPalette("grey",{1e3:"baa870"});r.definePalette("sogo-grey",a),r.theme("default").primaryPalette("sogo-blue",{default:"900","hue-1":"400","hue-2":"800","hue-3":"A700"}).accentPalette("sogo-green",{default:"500","hue-1":"A100","hue-2":"300","hue-3":"A700"}).backgroundPalette("sogo-grey"),r.registerStyles([".md-autocomplete-suggestions.md-3-line li p {"," color: '{{foreground-2}}';","}"].join("")),r.registerStyles([".sg-time-selection-indicator.sg-time-selected,",".sg-time-selection-indicator:hover.sg-time-selected,",".sg-time-selection-indicator.md-focus.sg-time-selected {"," background: '{{primary-500}}';","}",".sg-timepicker-open .sg-timepicker-icon {"," color: '{{primary-900}}';","}",".sg-timepicker-time,",".sg-timepicker-open .sg-timepicker-input-container {"," background: '{{background-hue-1}}';","}",".sg-timepicker-input-mask-opaque {"," box-shadow: 0 0 0 9999px '{{background-hue-1}}';","}"].join("")),r.registerStyles(["[ui-view=calendars] .hours {"," color: '{{primary-700}}';","}",".attendees .busy {"," background-color: '{{background-1000}}';","}",".attendees .event {"," background-color: '{{primary-300}}';","}"].join("")),r.registerStyles([".sg-message-thread {"," background-color: '{{primary-100}}';","}",".sg-message-thread-first {"," background-color: '{{primary-200}}';","}"].join("")),window.DebugEnabled||(t.debugEnabled(!1),n.debugInfoEnabled(!1),o.disableWarnings(),s.errorOnUnhandledRejections(!1),r.generateThemesOnDemand(!0)),i.interceptors.push("AuthInterceptor"),i.interceptors.push("ErrorInterceptor")}function a(t,e,n,i,r){var o,s;return o=e.defer(),(s=angular.element('<iframe class="ng-hide" src="'+t.UserFolderURL+'recover"></iframe>')).on("load",function(){var e=i.get("$state");2<r.config.attempt?(angular.element(t).off("beforeunload"),t.location.href=t.ApplicationBaseURL+e.href(e.current),o.reject()):n(function(){var e=i.get("$http");r.config.attempt?r.config.attempt++:r.config.attempt=1,e(r.config).then(function(e){o.resolve(e)},function(e){o.reject(e)}).finally(function(){n(s.remove,1e3)})},2e3)}),document.body.appendChild(s[0]),o.promise}function t(n,i,r,o){return{response:function(e){var t;return e&&/^application\/json/.test(e.config.headers.Accept)&&/^[\n\r\t ]*<!DOCTYPE html/.test(e.data)?n.usesCASAuthentication||n.usesSAML2Authentication?a(n,i,r,o,e):(t=o.get("$state"),angular.element(n).off("beforeunload"),n.location.href=n.ApplicationBaseURL+t.href(t.current),i.reject()):e}}}function n(n,i,r,o,s){return{responseError:function(e){var t;if(/^application\/json/.test(e.config.headers.Accept)){if((i.usesCASAuthentication||i.usesSAML2Authentication)&&-1==e.status)return a(i,r,o,s,e);i.usesSAML2Authentication&&401==e.status&&!i.recovered?(t=s.get("$state"),angular.element(i).off("beforeunload"),i.recovered=!0,i.location.href=i.ApplicationBaseURL+t.href(t.current)):e.data.quiet||n.$broadcast("http:Error",e)}return r.reject(e)}}}angular.module("SOGo.Common",["ngAnimate","ngMessages","ngSanitize","ngMaterial","mdColors"]).value("sgSettings",{isPopup:document.body.classList.contains("popup"),baseURL:function(){return ApplicLine truncated
//# sourceMappingURL=Common.js.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"sources":["Common/utils.js","Common/Common.app.js","Common/mdColors.app.js","Common/decodeUri.filter.js","Common/encodeUri.filter.js","Common/ensureTarget.filter.js","Common/loc.filter.js","Common/range.filter.js","Common/txt2html.filter.js","Common/AclController.js","Common/navController.js","Common/Acl.service.js","Common/Alarm.service.js","Common/Authentication.service.js","Common/Dialog.service.js","Common/Gravatar.service.js","Common/Resource.service.js","Common/sgFocus.service.js","Common/sgHotkeys.service.js","Common/User.service.js","Common/sgAutogrow.directive.js","Common/sgAvatarImage.directive.js","Common/sgBlockToggle.directive.js","Common/sgCheckmark.directive.js","Common/sgColorPicker.directive.js","Common/sgCompile.directive.js","Common/sgDatepickerReadonlyInput.directive.js","Common/sgDraggable.directive.js","Common/sgDroppable.directive.js","Common/sgEnter.directive.js","Common/sgEscape.directive.js","Common/sgFocus.directive.js","Common/sgFolderStylesheet.directive.js","Common/sgLabels.directive.js","Common/sgNoDirtyCheck.directive.js","Common/sgPlaceholder.directive.js","Common/sgQrCode.directive.js","Common/sgResetOnDisabled.directive.js","Common/sgRippleClick.directive.js","Common/sgSearch.directive.js","Common/sgSelectOnly.directive.js","Common/sgSubscribe.directive.js","Common/sgTimepicker.directive.js","Common/sgToggleGrid.directive.js"],"names":["l","i","j","key","arguments","value","args","labels","clabels","length","replace","m","val","parseFloat","isNaN","hexToRgb","hex","result","exec","r","parseInt","g","b","contrast","color","c","Math","pow","guid","S4","random","toString","substring","substr","toLowerCase","configure","$animateProvider","$logProvider","$compileProvider","$httpProvider","$mdThemingProvider","$mdAriaProvider","$qProvider","classNameFilter","definePalette","50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700","contrastDefaultColor","contrastLightColors","contrastDarkColors","1000","greyMap","extendPalette","theme","primaryPalette","default","hue-1","hue-2","hue-3","accentPalette","backgroundPalette","registerStyles","join","window","DebugEnabled","debugEnabled","debugInfoEnabled","disableWarnings","errorOnUnhandledRejections","generateThemesOnDemand","interceptors","push","renewTicket","$window","$q","$timeout","$injector","response","deferred","iframe","defer","angular","element","UserFolderURL","on","$state","get","config","attempt","off","location","href","ApplicationBaseURL","current","reject","$http","then","resolve","finally","remove","document","body","appendChild","promise","AuthInterceptor","test","headers","Accept","data","usesCASAuthentication","usesSAML2Authentication","ErrorInterceptor","$rootScope","responseError","rejection","status","recovered","quiet","$broadcast","module","isPopup","classList","contains","baseURL","resourcesURL","ResourcesURL","activeUser","param","settings","login","UserLogin","identification","UserIdentification","email","UserEmail","language","UserLanguage","folderURL","isSuperUser","IsSuperUser","path","calendar","UserCalendarPath","contacts","UserContactsPath","mail","UserMailPath","preferences","UserPreferencesPath","administration","UserAdministrationPath","help","HelpURL","logoff","UserLogoffPath","minimumSearchLength","isNumber","constant","selection","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print","factory","$inject","_$mdThemingProvider","runBlock","$interpolate","$document","$log","buildCssSelectors","selectors","fgDefault","bgDefault","bdrDefault","fgDefaultHue","bgDefaultHue","fgColor","bgColor","bdrColor","fgHue","bgHue","customSheet","style","head","querySelector","createElement","title","createTextNode","sheet","getStyleSheet","index","cssRules","deleteRule","addRule","fgInterpolate","bgInterpolate","themeName","paletteName","colorArray","hueName","context","palette","hue","insertRule","addBorderRule","bdrInterpolate","colorValue","forEach","_THEMES","_PALETTES","colors","primary","name","hues","run","decodeUri","decodeURIComponent","filter","encodeUri","encodeURIComponent","ensureTarget","$sce","tree","find","attr","trustAs","html","n","res","txt2html","linkyFilter","text","String","rel","undefined","AclController","$mdDialog","Dialog","usersWithACL","User","folder","vm","this","selectUser","user","$event","target","parentNode","selectedUid","uid","selectedUser","inactive","$rights","users","userToAdd","searchText","folderClassName","isFunction","getClassName","templateName","getElementById","$isAnonymous","userFilter","$query","$filter","$acl","closeModal","$resetUsersRights","hide","saveModal","$saveUsersRights","alert","confirmChange","confirmation","$confirmRights","showing","message","removeUser","$removeUser","addUser","$addUser","toggleAllRights","$toggleAllRights","hasNoRight","$hasNoRight","showRights","controller","navController","$scope","$interval","$mdSidenav","$mdToast","$mdMedia","sgConstant","sgSettings","Resource","Alarm","resourLine truncated
{"version":3,"sources":["Common/utils.js","Common/Common.app.js","Common/mdColors.app.js","Common/decodeUri.filter.js","Common/encodeUri.filter.js","Common/ensureTarget.filter.js","Common/loc.filter.js","Common/range.filter.js","Common/txt2html.filter.js","Common/AclController.js","Common/navController.js","Common/Acl.service.js","Common/Authentication.service.js","Common/Dialog.service.js","Common/Gravatar.service.js","Common/Resource.service.js","Common/sgFocus.service.js","Common/sgHotkeys.service.js","Common/User.service.js","Common/sgAutogrow.directive.js","Common/sgAvatarImage.directive.js","Common/sgBlockToggle.directive.js","Common/sgCheckmark.directive.js","Common/sgColorPicker.directive.js","Common/sgCompile.directive.js","Common/sgDatepickerReadonlyInput.directive.js","Common/sgDraggable.directive.js","Common/sgDroppable.directive.js","Common/sgEnter.directive.js","Common/sgEscape.directive.js","Common/sgFocus.directive.js","Common/sgFolderStylesheet.directive.js","Common/sgLabels.directive.js","Common/sgNoDirtyCheck.directive.js","Common/sgPlaceholder.directive.js","Common/sgQrCode.directive.js","Common/sgResetOnDisabled.directive.js","Common/sgRippleClick.directive.js","Common/sgSearch.directive.js","Common/sgSelectOnly.directive.js","Common/sgSubscribe.directive.js","Common/sgTimepicker.directive.js","Common/sgToggleGrid.directive.js"],"names":["l","i","j","key","arguments","value","args","labels","clabels","length","replace","m","val","parseFloat","isNaN","hexToRgb","hex","result","exec","r","parseInt","g","b","contrast","color","c","Math","pow","guid","S4","random","toString","substring","substr","toLowerCase","configure","$animateProvider","$logProvider","$compileProvider","$httpProvider","$mdThemingProvider","$mdAriaProvider","$qProvider","classNameFilter","definePalette","50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700","contrastDefaultColor","contrastLightColors","contrastDarkColors","1000","greyMap","extendPalette","theme","primaryPalette","default","hue-1","hue-2","hue-3","accentPalette","backgroundPalette","registerStyles","join","window","DebugEnabled","debugEnabled","debugInfoEnabled","disableWarnings","errorOnUnhandledRejections","generateThemesOnDemand","interceptors","push","renewTicket","$window","$q","$timeout","$injector","response","deferred","iframe","defer","angular","element","UserFolderURL","on","$state","get","config","attempt","off","location","href","ApplicationBaseURL","current","reject","$http","then","resolve","finally","remove","document","body","appendChild","promise","AuthInterceptor","test","headers","Accept","data","usesCASAuthentication","usesSAML2Authentication","ErrorInterceptor","$rootScope","responseError","rejection","status","recovered","quiet","$broadcast","module","isPopup","classList","contains","baseURL","resourcesURL","ResourcesURL","activeUser","param","settings","login","UserLogin","identification","UserIdentification","email","UserEmail","language","UserLanguage","folderURL","isSuperUser","IsSuperUser","path","calendar","UserCalendarPath","contacts","UserContactsPath","mail","UserMailPath","preferences","UserPreferencesPath","administration","UserAdministrationPath","help","HelpURL","logoff","UserLogoffPath","minimumSearchLength","isNumber","constant","selection","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print","factory","$inject","_$mdThemingProvider","runBlock","$interpolate","$document","$log","buildCssSelectors","selectors","fgDefault","bgDefault","bdrDefault","fgDefaultHue","bgDefaultHue","fgColor","bgColor","bdrColor","fgHue","bgHue","customSheet","style","head","querySelector","createElement","title","createTextNode","sheet","getStyleSheet","index","cssRules","deleteRule","addRule","fgInterpolate","bgInterpolate","themeName","paletteName","colorArray","hueName","context","palette","hue","insertRule","addBorderRule","bdrInterpolate","colorValue","forEach","_THEMES","_PALETTES","colors","primary","name","hues","run","decodeUri","decodeURIComponent","filter","encodeUri","encodeURIComponent","ensureTarget","$sce","tree","find","attr","trustAs","html","n","res","txt2html","linkyFilter","text","String","rel","undefined","AclController","$mdDialog","Dialog","usersWithACL","User","folder","vm","this","selectUser","user","$event","target","parentNode","selectedUid","uid","selectedUser","inactive","$rights","users","userToAdd","searchText","folderClassName","isFunction","getClassName","templateName","getElementById","$isAnonymous","userFilter","$query","$filter","$acl","closeModal","$resetUsersRights","hide","saveModal","$saveUsersRights","alert","confirmChange","confirmation","$confirmRights","showing","message","removeUser","$removeUser","addUser","$addUser","toggleAllRights","$toggleAllRights","hasNoRight","$hasNoRight","showRights","controller","navController","$scope","$interval","$mdSidenav","$mdToast","$mdMedia","sgConstant","sgSettings","Resource","Preferences","resource","onHttpError","eLine truncated
+1 -1
View File
@@ -1,2 +1,2 @@
!function(){"use strict";function c(e){"function"!=typeof e.then&&(angular.extend(this,e),_.forEach(this.identities,function(e){if(e.fullName&&e.email?e.full=e.fullName+" <"+e.email+">":e.email?e.full="<"+e.email+">":e.full="",e.signature){var t=angular.element("<div>"+e.signature+"</div>");e.textSignature=_.map(t.contents(),"textContent").join(" ").trim()}}),c.$log.debug("Account: "+JSON.stringify(e,void 0,2)))}c.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Mailbox","Message",function(e,t,n,s,i,o,a,r){return angular.extend(c,{$q:e,$timeout:t,$log:n,$$resource:new i(s.activeUser("folderURL")+"Mail",s.activeUser()),$Preferences:o,$Mailbox:a,$Message:r}),c}];try{angular.module("SOGo.MailerUI")}catch(e){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").factory("Account",c.$factory),c.$findAll=function(e){return e?c.$unwrapCollection(e):c.$accounts?c.$q.when(c.$accounts):c.$$resource.fetch("","mailAccounts").then(function(e){return c.$unwrapCollection(e)})},c.$unwrapCollection=function(e){var n=[];return angular.forEach(e,function(e,t){e.id=t,n[t]=new c(e)}),c.$accounts=n},c.prototype.getLength=function(){return this.$expanded?this.$flattenMailboxes().length:0},c.prototype.getItemAtIndex=function(e){var t;return t=this.$flattenMailboxes(),0<=e&&e<t.length?t[e]:null},c.prototype.$getMailboxes=function(e){var o=this,t=e&&e.reload;return this.$mailboxes&&!t?c.$q.when(this.$mailboxes):(!t&&this.$futureMailboxesData||(this.$futureMailboxesData=c.$Mailbox.$find(this,e).then(function(e){var n=o.$flattenMailboxes({all:!0});o.$mailboxes=e,o.$expanded=!1;var s=function(e){_.forEach(e,function(e){var t=_.find(n,["id",e.id]);t&&(e.unseenCount=t.unseenCount),e.children&&0<e.children.length&&s(e.children)})};s(o.$mailboxes);var t,i=function(e){_.forEach(e,function(e){e.$expanded=0<=t.indexOf("/"+e.id),e.children&&0<e.children.length&&i(e.children)})};if(c.$Preferences.settings.Mail.ExpandedFolders){if(angular.isString(c.$Preferences.settings.Mail.ExpandedFolders))try{t=angular.fromJson(c.$Preferences.settings.Mail.ExpandedFolders)}catch(e){c.$log.warn("Can't parse list of expanded folders. String was: "+c.$Preferences.settings.Mail.ExpandedFolders),t=[]}else t=c.$Preferences.settings.Mail.ExpandedFolders;o.$expanded=0<=t.indexOf("/"+o.id),0<t.length&&i(o.$mailboxes)}return c.$accounts&&(o.$expanded|=1==c.$accounts.length),o.$flattenMailboxes({reload:!0}),o.$mailboxes})),this.$futureMailboxesData)},c.prototype.$flattenMailboxes=function(t){var n=[],s=[],i=function(e){_.forEach(e,function(e){n.push(e),(t&&t.all||e.$expanded)&&e.children&&0<e.children.length&&i(e.children)})};return!this.$$flattenMailboxes||t&&(t.reload||t.all)?(i(this.$mailboxes),t&&t.all||(this.$$flattenMailboxes=n,t&&t.saveState&&(_.forEach(c.$accounts,function(e){e.$expanded&&s.push("/"+e.id),_.reduce(e.$$flattenMailboxes,function(e,t){return t.$expanded&&e.push("/"+t.id),e},s)}),c.$$resource.post(null,"saveFoldersState",s)))):n=this.$$flattenMailboxes,n},c.prototype.$getMailboxByType=function(n){var s=function(e){var t=_.find(e,function(e){return e.type==n});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=s(e.children))}),t};return s(this.$mailboxes)},c.prototype.$getMailboxByPath=function(n){var s=function(e){var t=_.find(e,function(e){return e.path==n});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=s(e.children))}),t};return s(this.$mailboxes)},c.prototype.$newMailbox=function(e,t){var n=this;return c.$$resource.post(e.toString(),"createFolder",{name:t}).then(function(){n.$getMailboxes({reload:!0})})},c.prototype.getTextSignature=function(e){if(e.signature){var t=angular.element("<div>"+e.signature+"</div>");e.textSignature=_.map(t.contents(),"textContent").join(" ").trim()}else e.textSignature="";return e.textSignature},c.prototype.$certificate=function(){var t=this;return this.security&&this.security.hasCertificate?this.$$certificate?c.$q.when(this.$$certificate):c.$$resource.fetch(this.id.toString(),"certificate").then(function(e){return t.$$certificate=e}):c.$q.reject()},c.prototype.$removeCertificate=function(){var e=this;return c.$$resource.fetch(this.id.toString(),"removeCertificate").then(function(){e.security.hasCertificate=!1})},c.prototype.updateQuota=function(e){var t,n;t=Math.round(1e4*e.usedSpace/e.maxQuota)/100,n=l("quotasFormat").formatted(t,Math.round(e.maxQuota/10.24)/100),this.$quota={percent:t,description:n}},c.prototype.$newMessage=function(s){var i=this;return c.$$resource.fetch(this.id.toString(),"compose").then(function(e){return c.$log.debug("New message (compose): "+JSON.stringify(e,void 0,2)),new c.$Message(e.accountId,i.$getMailboxByPath(e.mailboxPath),e)}).then(function(n){return c.$$resource.fetch(n.$absolutePath({asDraft:!0}),"edit").then(function(e){var t=c.$Preferences.defaults.AuxiliaryMailAccounts[i.id];return t.security&&(t.security.alwaysSign&&(e.sign=!0),t.security.alwaysEncrypt&&(e.encrypt=!0))Line truncated
!function(){"use strict";function c(e){"function"!=typeof e.then&&(angular.extend(this,e),_.forEach(this.identities,function(e){if(e.fullName&&e.email?e.full=e.fullName+" <"+e.email+">":e.email?e.full="<"+e.email+">":e.full="",e.signature){var t=angular.element("<div>"+e.signature+"</div>");e.textSignature=_.map(t.contents(),"textContent").join(" ").trim()}}),c.$log.debug("Account: "+JSON.stringify(e,void 0,2)))}c.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Mailbox","Message",function(e,t,n,s,i,o,a,r){return angular.extend(c,{$q:e,$timeout:t,$log:n,$$resource:new i(s.activeUser("folderURL")+"Mail",s.activeUser()),$Preferences:o,$Mailbox:a,$Message:r}),c}];try{angular.module("SOGo.MailerUI")}catch(e){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").factory("Account",c.$factory),c.$findAll=function(e){return e?c.$unwrapCollection(e):c.$accounts?c.$q.when(c.$accounts):c.$$resource.fetch("","mailAccounts").then(function(e){return c.$unwrapCollection(e)})},c.$unwrapCollection=function(e){var n=[];return angular.forEach(e,function(e,t){e.id=t,n[t]=new c(e)}),c.$accounts=n},c.prototype.getLength=function(){return this.$expanded?this.$flattenMailboxes().length:0},c.prototype.getItemAtIndex=function(e){var t;return t=this.$flattenMailboxes(),0<=e&&e<t.length?t[e]:null},c.prototype.$getMailboxes=function(e){var o=this,t=e&&e.reload;return this.$mailboxes&&!t?c.$q.when(this.$mailboxes):(!t&&this.$futureMailboxesData||(this.$futureMailboxesData=c.$Mailbox.$find(this,e).then(function(e){var n=o.$flattenMailboxes({all:!0});o.$mailboxes=e,o.$expanded=!1;var s=function(e){_.forEach(e,function(e){var t=_.find(n,["id",e.id]);t&&(e.unseenCount=t.unseenCount),e.children&&0<e.children.length&&s(e.children)})};s(o.$mailboxes);var t,i=function(e){_.forEach(e,function(e){e.$expanded=0<=t.indexOf("/"+e.id),e.children&&0<e.children.length&&i(e.children)})};if(c.$Preferences.settings.Mail.ExpandedFolders){if(angular.isString(c.$Preferences.settings.Mail.ExpandedFolders))try{t=angular.fromJson(c.$Preferences.settings.Mail.ExpandedFolders)}catch(e){c.$log.warn("Can't parse list of expanded folders. String was: "+c.$Preferences.settings.Mail.ExpandedFolders),t=[]}else t=c.$Preferences.settings.Mail.ExpandedFolders;o.$expanded=0<=t.indexOf("/"+o.id),0<t.length&&i(o.$mailboxes)}return c.$accounts&&(o.$expanded|=1==c.$accounts.length),o.$flattenMailboxes({reload:!0}),o.$mailboxes})),this.$futureMailboxesData)},c.prototype.$flattenMailboxes=function(t){var n=[],s=[],i=function(e){_.forEach(e,function(e){n.push(e),(t&&t.all||e.$expanded)&&e.children&&0<e.children.length&&i(e.children)})};return!this.$$flattenMailboxes||t&&(t.reload||t.all)?(i(this.$mailboxes),t&&t.all||(this.$$flattenMailboxes=n,t&&t.saveState&&(_.forEach(c.$accounts,function(e){e.$expanded&&s.push("/"+e.id),_.reduce(e.$$flattenMailboxes,function(e,t){return t.$expanded&&e.push("/"+t.id),e},s)}),c.$$resource.post(null,"saveFoldersState",s)))):n=this.$$flattenMailboxes,n},c.prototype.$getMailboxByType=function(n){var s=function(e){var t=_.find(e,function(e){return e.type==n});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=s(e.children))}),t};return s(this.$mailboxes)},c.prototype.$getMailboxByPath=function(n){var s=function(e){var t=_.find(e,function(e){return e.path==n});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=s(e.children))}),t};return s(this.$mailboxes)},c.prototype.$newMailbox=function(e,t){var n=this;return c.$$resource.post(e.toString(),"createFolder",{name:t}).then(function(){n.$getMailboxes({reload:!0})})},c.prototype.getTextSignature=function(e){if(e.signature){var t=angular.element("<div>"+e.signature+"</div>");e.textSignature=_.map(t.contents(),"textContent").join(" ").trim()}else e.textSignature="";return e.textSignature},c.prototype.$certificate=function(){var t=this;return this.security&&this.security.hasCertificate?this.$$certificate?c.$q.when(this.$$certificate):c.$$resource.fetch(this.id.toString(),"certificate").then(function(e){return t.$$certificate=e}):c.$q.reject()},c.prototype.$removeCertificate=function(){var e=this;return c.$$resource.fetch(this.id.toString(),"removeCertificate").then(function(){e.security.hasCertificate=!1})},c.prototype.updateQuota=function(e){var t,n;t=Math.round(1e4*e.usedSpace/e.maxQuota)/100,n=l("quotasFormat").formatted(t,Math.round(e.maxQuota/10.24)/100),this.$quota={percent:t,description:n}},c.prototype.$newMessage=function(s){var i=this;return c.$$resource.fetch(this.id.toString(),"compose").then(function(e){return c.$log.debug("New message (compose): "+JSON.stringify(e,void 0,2)),new c.$Message(e.accountId,i.$getMailboxByPath(e.mailboxPath),e)}).then(function(n){return c.$$resource.fetch(n.$absolutePath({asDraft:!0}),"edit").then(function(e){var t=c.$Preferences.defaults.AuxiliaryMailAccounts[i.id];return t.security&&(t.security.alwaysSign&&(e.sign=!0),t.security.alwaysEncrypt&&(e.encrypt=!0))Line truncated
//# sourceMappingURL=Mailer.services.js.map
@@ -1 +1 @@
{"version":3,"sources":["Mailer/Account.service.js","Mailer/Mailbox.service.js","Mailer/Message.service.js","Mailer/sgImageGallery.service.js","Mailer/VirtualMailbox.service.js","Mailer/MailboxController.js","Mailer/MailboxesController.js","Mailer/MessageController.js","Mailer/MessageEditorController.js","Mailer/sgAccountSection.directive.js","Mailer/sgIMIP.directive.js","Mailer/sgMailboxListItem.directive.js","Mailer/sgMessageListItem.directive.js","Mailer/sgMessageListItemMain.directive.js","Mailer/sgZoomableImage.directive.js"],"names":["Account","futureAccountData","then","angular","extend","this","_","forEach","identities","identity","fullName","email","full","signature","element","textSignature","map","contents","join","trim","$log","debug","JSON","stringify","undefined","$factory","$q","$timeout","Settings","Resource","Preferences","Mailbox","Message","$$resource","activeUser","$Preferences","$Mailbox","$Message","module","e","factory","$findAll","data","$unwrapCollection","$accounts","when","fetch","o","collection","i","id","prototype","getLength","$expanded","$flattenMailboxes","length","getItemAtIndex","index","expandedMailboxes","$getMailboxes","options","_this","reload","$mailboxes","$futureMailboxesData","$find","previousMailboxes","all","_visitForUnseencount","mailboxes","previousMailbox","find","unseenCount","children","expandedFolders","_visitForExpanded","indexOf","settings","Mail","ExpandedFolders","isString","fromJson","warn","allMailboxes","_visit","push","$$flattenMailboxes","saveState","account","reduce","mailbox","post","$getMailboxByType","type","_find","$getMailboxByPath","path","$newMailbox","name","toString","getTextSignature","$certificate","security","hasCertificate","$$certificate","reject","$removeCertificate","updateQuota","percent","description","Math","round","usedSpace","maxQuota","l","formatted","$quota","$newMessage","accountId","mailboxPath","message","$absolutePath","asDraft","accountDefaults","defaults","AuxiliaryMailAccounts","alwaysSign","sign","alwaysEncrypt","encrypt","editable","isNew","mailto","isObject","$parseMailto","$addDelegate","user","deferred","defer","param","uid","delegates","resolve","users","status","promise","$removeDelegate","splice","$omit","value","key","copy","isReadOnly","pick","futureMailboxData","$account","init","newMailboxData","create","$unwrap","Acl","PRELOAD","BATCH_DELETE_LIMIT","$$Acl","$query","sort","asc","selectedFolder","$refreshTimeout","$virtualMode","$virtualPath","SortingState","parseInt","constant","LOOKAHEAD","SIZE","createMailboxes","level","quotas","split","component","asCSSIdentifier","isUndefined","uidsMap","headers","$isLoading","$messages","$id","$acl","threaded","$collapsedThreads","threadsCollapsed","$displayName","$isEditable","isEditable","$isSpecial","$icon","$isNoInferiors","isNoInferiors","$shadowData","selectFolder","collapsedThread","filter","msg","first","collapsed","visibleMessages","$lastVisibleIndex","max","$loadMessage","$selectedMessages","selected","$selectedCount","isSelectedMessage","messageId","selectedMessage","$selectedMessage","$selectedMessageIndex","hasSelectedMessage","isDefined","$filter","sortingAttributes","filters","cancel","searchInput","secondFilter","match","searchBy","refreshViewCheck","SOGoRefreshViewCheck","f","bind","timeInterval","endIndex","uids","futureHeadersData","startIndex","loaded","subject","min","loading","$unwrapHeaders","flags","isNoSelect","getClassName","base","$rename","findParent","parent","parentMailbox","$save","sibling","oldPath","localeCompare","pathRE","RegExp","_updateChildren","child","replace","$compact","$canFolderAs","$setFolderAs","$emptyTrash","$markAsRead","isread","$flagMessages","messages","operation","msgUIDs","saveSelectedMessages","selectedMessages","selectedUIDs","filename","download","exportFolder","open","$delete","$_deleteMessages","unseen","firstIndex","forEachRight","selectedIndex","findIndex","$deleteMessages","batchSize","_deleteMessages","start","end","currentUids","slice","currentMessages","$markOrUnMarkMessagesAsJunk","method","$copyMessages","folder","$moveMessages","$reset","$move","parentPath","finally","save","response","error","$futureMailboxData","$topIndex","invokeMap","msgs","msgObject","zipObject","count","isError","j","messageHeaders","$updateSubscribe","action","subscribed","futureMessageData","lazy","$mailbox","$hasUnsafeContent","$loadUnsafeContent","to","cc","bcc","threadCount","isNaN","threadMember","Message_STATUS","STATUS","$avatar","avatar","SOGoMailLabelsColors","$tags","SOGoMailDisplayRemoteInlineImages","$displayRemoteInlineImages","NOT_LOADED","DELAYED_LOADING","LOADING","LOADED","DELAYED_MS","filterTags","query","excludedTags","re","results","keys","tag","pair","search","includes","color","$formatFullAddresses","flag","charAt","buildPath","nocache","draftId","withResourcePath","$setUID","oldUID","attr","constructor","shortname","last","image","$shortRecipients","result","total","$shortAddress","address","allowReplyAlLine truncated
{"version":3,"sources":["Mailer/Account.service.js","Mailer/Mailbox.service.js","Mailer/Message.service.js","Mailer/sgImageGallery.service.js","Mailer/VirtualMailbox.service.js","Mailer/MailboxController.js","Mailer/MailboxesController.js","Mailer/MessageController.js","Mailer/MessageEditorController.js","Mailer/sgAccountSection.directive.js","Mailer/sgIMIP.directive.js","Mailer/sgMailboxListItem.directive.js","Mailer/sgMessageListItem.directive.js","Mailer/sgMessageListItemMain.directive.js","Mailer/sgZoomableImage.directive.js"],"names":["Account","futureAccountData","then","angular","extend","this","_","forEach","identities","identity","fullName","email","full","signature","element","textSignature","map","contents","join","trim","$log","debug","JSON","stringify","undefined","$factory","$q","$timeout","Settings","Resource","Preferences","Mailbox","Message","$$resource","activeUser","$Preferences","$Mailbox","$Message","module","e","factory","$findAll","data","$unwrapCollection","$accounts","when","fetch","o","collection","i","id","prototype","getLength","$expanded","$flattenMailboxes","length","getItemAtIndex","index","expandedMailboxes","$getMailboxes","options","_this","reload","$mailboxes","$futureMailboxesData","$find","previousMailboxes","all","_visitForUnseencount","mailboxes","previousMailbox","find","unseenCount","children","expandedFolders","_visitForExpanded","indexOf","settings","Mail","ExpandedFolders","isString","fromJson","warn","allMailboxes","_visit","push","$$flattenMailboxes","saveState","account","reduce","mailbox","post","$getMailboxByType","type","_find","$getMailboxByPath","path","$newMailbox","name","toString","getTextSignature","$certificate","security","hasCertificate","$$certificate","reject","$removeCertificate","updateQuota","percent","description","Math","round","usedSpace","maxQuota","l","formatted","$quota","$newMessage","accountId","mailboxPath","message","$absolutePath","asDraft","accountDefaults","defaults","AuxiliaryMailAccounts","alwaysSign","sign","alwaysEncrypt","encrypt","editable","isNew","mailto","isObject","$parseMailto","$addDelegate","user","deferred","defer","param","uid","delegates","resolve","users","status","promise","$removeDelegate","splice","$omit","value","key","copy","isReadOnly","pick","futureMailboxData","$account","init","newMailboxData","create","$unwrap","Acl","PRELOAD","BATCH_DELETE_LIMIT","$$Acl","$query","sort","asc","selectedFolder","$refreshTimeout","$virtualMode","$virtualPath","SortingState","parseInt","constant","LOOKAHEAD","SIZE","createMailboxes","level","quotas","split","component","asCSSIdentifier","isUndefined","uidsMap","headers","$isLoading","$messages","$id","$acl","threaded","$collapsedThreads","threadsCollapsed","$displayName","$isEditable","isEditable","$isSpecial","$icon","$isNoInferiors","isNoInferiors","$shadowData","selectFolder","collapsedThread","filter","msg","first","collapsed","visibleMessages","$lastVisibleIndex","max","$loadMessage","$selectedMessages","selected","$selectedCount","isSelectedMessage","messageId","selectedMessage","$selectedMessage","$selectedMessageIndex","hasSelectedMessage","isDefined","$filter","sortingAttributes","filters","cancel","searchInput","secondFilter","match","searchBy","refreshViewCheck","SOGoRefreshViewCheck","f","bind","timeInterval","endIndex","uids","futureHeadersData","startIndex","loaded","subject","min","loading","$unwrapHeaders","flags","isNoSelect","getClassName","base","$rename","findParent","parent","parentMailbox","$save","sibling","oldPath","localeCompare","pathRE","RegExp","_updateChildren","child","replace","$compact","$canFolderAs","$setFolderAs","$emptyTrash","$markAsRead","isread","$flagMessages","messages","operation","msgUIDs","saveSelectedMessages","selectedMessages","selectedUIDs","filename","download","exportFolder","open","$delete","$_deleteMessages","unseen","firstIndex","forEachRight","selectedIndex","findIndex","$deleteMessages","batchSize","_deleteMessages","start","end","currentUids","slice","currentMessages","$markOrUnMarkMessagesAsJunk","method","$copyMessages","folder","$moveMessages","$reset","$move","parentPath","finally","save","response","error","$futureMailboxData","$topIndex","invokeMap","msgs","msgObject","zipObject","count","isError","j","messageHeaders","$updateSubscribe","action","subscribed","futureMessageData","lazy","$mailbox","$hasUnsafeContent","$loadUnsafeContent","to","cc","bcc","threadCount","isNaN","threadMember","Message_STATUS","STATUS","$avatar","avatar","SOGoMailLabelsColors","$tags","SOGoMailDisplayRemoteInlineImages","$displayRemoteInlineImages","NOT_LOADED","DELAYED_LOADING","LOADING","LOADED","DELAYED_MS","filterTags","query","excludedTags","re","results","keys","tag","pair","search","includes","color","$formatFullAddresses","flag","charAt","buildPath","nocache","draftId","withResourcePath","$setUID","oldUID","attr","constructor","shortname","last","image","$shortRecipients","result","total","$shortAddress","address","allowReplyAlLine truncated
+1 -1
View File
@@ -1,2 +1,2 @@
!function(){"use strict";function e(e,t){e.state("preferences",{abstract:!0,views:{preferences:{templateUrl:"preferences.html",controller:"PreferencesController",controllerAs:"app"}}}).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"}}}),t.rules.otherwise("/general")}function t(e,t,s,a){e.DebugEnabled||a.defaultErrorHandler(function(){}),s.onError({to:"preferences.**"},function(e){"preferences"==e.to().name||e.ignored()||(t.error("transition error to "+e.to().name+": "+e.error().detail),a.go({state:"preferences"}))})}angular.module("SOGo.PreferencesUI",["ui.router","sgCkeditor","angularFileUpload","SOGo.Common","SOGo.MailerUI","SOGo.ContactsUI","SOGo.Authentication","as.sortable"]).config(e).run(t),e.$inject=["$stateProvider","$urlServiceProvider"],t.$inject=["$window","$log","$transitions","$state"]}(),function(){"use strict";function e(i,e,t,s,a,r,n,o,c,d,f){var u=this;function h(){u.account.security&&u.account.security.hasCertificate&&u.account.$certificate().then(function(e){u.certificate=e},function(){delete u.account.security.hasCertificate})}function p(e){var t=0<e.type.indexOf("pkcs12")||/\.(p12|pfx)$/.test(e.name);return u.form.certificateFilename.$setValidity("fileformat",t),t}this.defaultPort=143,this.defaults=o,this.account=c,this.accountId=d,this.hostnameRE=0<d?/^(?!(127\.0\.0\.1|localhost(?:\.localdomain)?)$)/:/./,this.addressesSearchText="",this.emailSeparatorKeys=[t.KEY_CODE.ENTER,t.KEY_CODE.TAB,t.KEY_CODE.COMMA,t.KEY_CODE.SEMICOLON],this.ckConfig={autoGrow_minHeight:70,toolbar:[["Bold","Italic","-","Link","Font","FontSize","-","TextColor","BGColor","Source"]],language:o.LocaleCode},this.account.encryption?"ssl"==this.account.encryption&&(this.defaultPort=993):this.account.encryption="none",h(),this.uploader=new a({url:[n.activeUser("folderURL")+"Mail",d,"importCertificate"].join("/"),autoUpload:!1,queueLimit:1,filters:[{name:p,fn:p}],onAfterAddingFile:function(e){u.certificateFilename=e.file.name},onSuccessItem:function(e,t,s,a){this.clearQueue(),i(function(){_.assign(u.account,{security:{hasCertificate:!0},$$certificate:t})}),h()},onErrorItem:function(e,t,s,a){r.alert(l("Error"),l("An error occurred while importing the certificate. Verify your password."))}}),this.hasIdentities=function(){return 0<_.filter(this.account.identities,u.isEditableIdentity).length},this.isEditableIdentity=function(e){return!e.isReadOnly},this.selectIdentity=function(e){this.selectedIdentity==e?this.selectedIdentity=null:this.selectedIdentity=e},this.setDefaultIdentity=function(e,s){return _.forEach(this.account.identities,function(e,t){t==s?e.isDefault=!e.isDefault:delete e.isDefault}),e.stopPropagation(),!1},this.canRemoveIdentity=function(e){return e==this.selectedIdentity&&1<this.account.identities.length},this.removeIdentity=function(e){this.account.identities.splice(e,1),this.selectedIdentity=null},this.addIdentity=function(){var e=_.findIndex(this.account.identities,{isReadOnly:1}),t={};e<0&&(e=this.account.identities.length),this.customFromIsReadonly()&&(t.fullName=this.account.identities[0].fullName),this.account.identities.splice(Math.max(e,0),0,t),this.selectedIdentity=e},this.showCkEditor=function(e){return this.selectedIdentity==e&&"html"==this.defaults.SOGoMailComposeMessageType},this.filterEmailAddresses=function(t){return _.filter(e.defaultEmailAddresses,function(e){return 0<=e.toLowerCase().indexOf(t.toLowerCase())})},this.customFromIsReadonly=function(){return!(0<d)&&!f},this.importCertificate=function(){this.uploader.queue[0].formData=[{password:this.certificatePassword}],this.uploader.uploadItem(0)},this.onBeforeUploadCertificate=function(e){this.form=e,this.uploader.clearQueue()},this.removeCertificate=function(){this.account.$removeCertificate()},this.cancel=function(){s.cancel()},this.save=function(){s.hide()}}e.$inject=["$timeout","$window","$mdConstant","$mdDialog","FileUploader","Dialog","sgSettings","defaults","account","accountId","mailCustomFromEnabled"],angular.module("SOGo.PreferencesUI").controller("AccountDialogController",e)}(),function(){"use strict";function e(e,t,s,a,i,r,n,o,c){var d=t.sieveCapabilities,f=t.forwardEnabled;t.vacationEnabled;this.filter=i,this.mailboxes=r,this.labels=n,this.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")},-1<d.indexOf("body")&&(this.fieldLabels.body=l("Body")),this.methodLabels={discard:l("Discard the message"),keep:l("Keep the message"),stop:l("Stop processing filter rules")},f&&(this.methodLabels.redirect=l("Forward the message to")),-1<d.indexOf("reject")&&(this.methodLabels.reject=l("Send a rejeLine truncated
!function(){"use strict";function e(e,t){e.state("preferences",{abstract:!0,views:{preferences:{templateUrl:"preferences.html",controller:"PreferencesController",controllerAs:"app"}}}).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"}}}),t.rules.otherwise("/general")}function t(e,t,s,a){e.DebugEnabled||a.defaultErrorHandler(function(){}),s.onError({to:"preferences.**"},function(e){"preferences"==e.to().name||e.ignored()||(t.error("transition error to "+e.to().name+": "+e.error().detail),a.go({state:"preferences"}))})}angular.module("SOGo.PreferencesUI",["ui.router","sgCkeditor","angularFileUpload","SOGo.Common","SOGo.MailerUI","SOGo.ContactsUI","SOGo.Authentication","as.sortable"]).config(e).run(t),e.$inject=["$stateProvider","$urlServiceProvider"],t.$inject=["$window","$log","$transitions","$state"]}(),function(){"use strict";function e(i,e,t,s,a,r,n,o,c,d,f){var u=this;function h(){u.account.security&&u.account.security.hasCertificate&&u.account.$certificate().then(function(e){u.certificate=e},function(){delete u.account.security.hasCertificate})}function p(e){var t=0<e.type.indexOf("pkcs12")||/\.(p12|pfx)$/.test(e.name);return u.form.certificateFilename.$setValidity("fileformat",t),t}this.defaultPort=143,this.defaults=o,this.account=c,this.accountId=d,this.hostnameRE=0<d?/^(?!(127\.0\.0\.1|localhost(?:\.localdomain)?)$)/:/./,this.addressesSearchText="",this.emailSeparatorKeys=[t.KEY_CODE.ENTER,t.KEY_CODE.TAB,t.KEY_CODE.COMMA,t.KEY_CODE.SEMICOLON],this.ckConfig={autoGrow_minHeight:70,toolbar:[["Bold","Italic","-","Link","Font","FontSize","-","TextColor","BGColor","Source"]],language:o.LocaleCode},this.account.encryption?"ssl"==this.account.encryption&&(this.defaultPort=993):this.account.encryption="none",h(),this.uploader=new a({url:[n.activeUser("folderURL")+"Mail",d,"importCertificate"].join("/"),autoUpload:!1,queueLimit:1,filters:[{name:p,fn:p}],onAfterAddingFile:function(e){u.certificateFilename=e.file.name},onSuccessItem:function(e,t,s,a){this.clearQueue(),i(function(){_.assign(u.account,{security:{hasCertificate:!0},$$certificate:t})}),h()},onErrorItem:function(e,t,s,a){r.alert(l("Error"),l("An error occurred while importing the certificate. Verify your password."))}}),this.hasIdentities=function(){return 0<_.filter(this.account.identities,u.isEditableIdentity).length},this.isEditableIdentity=function(e){return!e.isReadOnly},this.selectIdentity=function(e){this.selectedIdentity==e?this.selectedIdentity=null:this.selectedIdentity=e},this.setDefaultIdentity=function(e,s){return _.forEach(this.account.identities,function(e,t){t==s?e.isDefault=!e.isDefault:delete e.isDefault}),e.stopPropagation(),!1},this.canRemoveIdentity=function(e){return e==this.selectedIdentity&&1<this.account.identities.length},this.removeIdentity=function(e){this.account.identities.splice(e,1),this.selectedIdentity=null},this.addIdentity=function(){var e=_.findIndex(this.account.identities,{isReadOnly:1}),t={};e<0&&(e=this.account.identities.length),this.customFromIsReadonly()&&(t.fullName=this.account.identities[0].fullName),this.account.identities.splice(Math.max(e,0),0,t),this.selectedIdentity=e},this.showCkEditor=function(e){return this.selectedIdentity==e&&"html"==this.defaults.SOGoMailComposeMessageType},this.filterEmailAddresses=function(t){return _.filter(e.defaultEmailAddresses,function(e){return 0<=e.toLowerCase().indexOf(t.toLowerCase())})},this.customFromIsReadonly=function(){return!(0<d)&&!f},this.importCertificate=function(){this.uploader.queue[0].formData=[{password:this.certificatePassword}],this.uploader.uploadItem(0)},this.onBeforeUploadCertificate=function(e){this.form=e,this.uploader.clearQueue()},this.removeCertificate=function(){this.account.$removeCertificate()},this.cancel=function(){s.cancel()},this.save=function(){s.hide()}}e.$inject=["$timeout","$window","$mdConstant","$mdDialog","FileUploader","Dialog","sgSettings","defaults","account","accountId","mailCustomFromEnabled"],angular.module("SOGo.PreferencesUI").controller("AccountDialogController",e)}(),function(){"use strict";function e(e,t,s,a,i,r,n,o,c){var d=t.sieveCapabilities,f=t.forwardEnabled;t.vacationEnabled;this.filter=i,this.mailboxes=r,this.labels=n,this.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")},-1<d.indexOf("body")&&(this.fieldLabels.body=l("Body")),this.methodLabels={discard:l("Discard the message"),keep:l("Keep the message"),stop:l("Stop processing filter rules")},f&&(this.methodLabels.redirect=l("Forward the message to")),-1<d.indexOf("reject")&&(this.methodLabels.reject=l("Send a rejeLine truncated
//# sourceMappingURL=Preferences.js.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"sources":["Preferences/Preferences.app.js","Preferences/AccountDialogController.js","Preferences/FiltersDialogController.js","Preferences/PreferencesController.js"],"names":["configure","$stateProvider","$urlServiceProvider","state","abstract","views","preferences","templateUrl","controller","controllerAs","url","module","rules","otherwise","runBlock","$window","$log","$transitions","$state","DebugEnabled","defaultErrorHandler","onError","to","transition","name","ignored","error","detail","go","angular","config","run","$inject","AccountDialogController","$timeout","$mdConstant","$mdDialog","FileUploader","Dialog","Settings","defaults","account","accountId","mailCustomFromEnabled","vm","this","_loadCertificate","security","hasCertificate","$certificate","then","crt","certificate","filterByExtension","item","isP12File","type","indexOf","test","form","certificateFilename","$setValidity","defaultPort","hostnameRE","addressesSearchText","emailSeparatorKeys","KEY_CODE","ENTER","TAB","COMMA","SEMICOLON","ckConfig","autoGrow_minHeight","toolbar","language","LocaleCode","encryption","uploader","activeUser","join","autoUpload","queueLimit","filters","fn","onAfterAddingFile","file","onSuccessItem","response","status","headers","clearQueue","_","assign","$$certificate","onErrorItem","alert","l","hasIdentities","filter","identities","isEditableIdentity","length","identity","isReadOnly","selectIdentity","index","selectedIdentity","setDefaultIdentity","$event","$index","forEach","i","isDefault","stopPropagation","canRemoveIdentity","removeIdentity","splice","addIdentity","firstReadonlyIndex","findIndex","customFromIsReadonly","fullName","Math","max","showCkEditor","SOGoMailComposeMessageType","filterEmailAddresses","$query","defaultEmailAddresses","address","toLowerCase","importCertificate","queue","formData","password","certificatePassword","uploadItem","onBeforeUploadCertificate","removeCertificate","$removeCertificate","cancel","save","hide","FiltersDialogController","$scope","mailboxes","labels","validateForwardAddress","Preferences","sieveCapabilities","forwardEnabled","vacationEnabled","fieldLabels","subject","from","cc","to_or_cc","size","header","body","methodLabels","discard","keep","stop","redirect","reject","fileinto","addflag","numberOperatorLabels","under","over","textOperatorLabels","is","is_not","contains","contains_not","matches","matches_not","regex","regex_not","hasRulesAndActions","requirements","actions","match","push","every","a","invalid","method","action","argument","err","message","addMailFilterRule","event","field","operator","removeMailFilterRule","addMailFilterAction","removeMailFilterAction","PreferencesController","$q","$mdMedia","$mdSidenav","$mdToast","sgSettings","focus","User","Account","Authentication","Date","beginOfDay","_loadAllMailboxes","mail","id","$getMailboxes","allMailboxes","$flattenMailboxes","all","defaultAddresses","domains","domain","forwardConstraints","isDefined","Forward","enabled","forwardAddress","adr","split","Error","forwardConstraintsDomains","$onInit","passwords","newPassword","newPasswordConfirmation","oldPassword","timeZonesList","timeZonesSearchText","sieveVariablesCapability","mailLabelKeyRE","RegExp","SOGoAlternateAvatar","$alternateAvatar","hasActiveExternalSieveScripts","updateVacationDates","$valid","close","onLanguageChange","confirm","ok","quick","location","reload","resetContactsCategories","SOGoContactsCategories","defaultContactsCategories","$setDirty","resetCalendarCategories","SOGoCalendarCategories","keys","defaultCalendarCategories","SOGoCalendarCategoriesColorsValues","values","addCalendarCategory","resetCalendarCategoryValidity","removeCalendarCategory","addContactCategory","removeContactCategory","addMailAccount","ev","AuxiliaryMailAccounts","isNew","email","receipts","receiptAction","receiptNonRecipientAction","receiptOutsideDomainAction","receiptAnyAction","show","targetEvent","locals","isArray","settings","Mail","ExpandedFolders","$omit","editMailAccount","data","cloneDeep","catch","noop","removeMailAccount","resetMailLabelValidity","addMailLabel","guid","SOGoMailLabelsColorsKeys","SOGoMailLabelsColorsValues","removeMailLabel","addMailFilter","active","SOGoMailLabelsColors","SOGoSieveFilters","editMailFilter","copy","removeMailFilter","onFiltersOrderChanged","_onFiltersOrderChanged","difference","Vacation","autoReplyEmailAddresses","addDefaultEmailAddresses","v","union","userFilter","search","excludedUsers","minimumSearchLength","$filter","users","user","$$image","image","avatar","c_email","no_404","manageSieveScript","confirmChanges","target","$dirty","preventDefault","tagName","parentNode","href","options","sendForm","addresses","uniq","value","$save","simple","content","position","hideDelay","$setPristine","canChangePassword","changePassword","title","finally","undefined","msg","timeZonesListFilter","toUpperCase","d","toggleVacationStartDate","toggleVacationEndDate","startDateEnabled","startDate","endDateEnabled","endDate","gLine truncated
{"version":3,"sources":["Preferences/Preferences.app.js","Preferences/AccountDialogController.js","Preferences/FiltersDialogController.js","Preferences/PreferencesController.js"],"names":["configure","$stateProvider","$urlServiceProvider","state","abstract","views","preferences","templateUrl","controller","controllerAs","url","module","rules","otherwise","runBlock","$window","$log","$transitions","$state","DebugEnabled","defaultErrorHandler","onError","to","transition","name","ignored","error","detail","go","angular","config","run","$inject","AccountDialogController","$timeout","$mdConstant","$mdDialog","FileUploader","Dialog","Settings","defaults","account","accountId","mailCustomFromEnabled","vm","this","_loadCertificate","security","hasCertificate","$certificate","then","crt","certificate","filterByExtension","item","isP12File","type","indexOf","test","form","certificateFilename","$setValidity","defaultPort","hostnameRE","addressesSearchText","emailSeparatorKeys","KEY_CODE","ENTER","TAB","COMMA","SEMICOLON","ckConfig","autoGrow_minHeight","toolbar","language","LocaleCode","encryption","uploader","activeUser","join","autoUpload","queueLimit","filters","fn","onAfterAddingFile","file","onSuccessItem","response","status","headers","clearQueue","_","assign","$$certificate","onErrorItem","alert","l","hasIdentities","filter","identities","isEditableIdentity","length","identity","isReadOnly","selectIdentity","index","selectedIdentity","setDefaultIdentity","$event","$index","forEach","i","isDefault","stopPropagation","canRemoveIdentity","removeIdentity","splice","addIdentity","firstReadonlyIndex","findIndex","customFromIsReadonly","fullName","Math","max","showCkEditor","SOGoMailComposeMessageType","filterEmailAddresses","$query","defaultEmailAddresses","address","toLowerCase","importCertificate","queue","formData","password","certificatePassword","uploadItem","onBeforeUploadCertificate","removeCertificate","$removeCertificate","cancel","save","hide","FiltersDialogController","$scope","mailboxes","labels","validateForwardAddress","Preferences","sieveCapabilities","forwardEnabled","vacationEnabled","fieldLabels","subject","from","cc","to_or_cc","size","header","body","methodLabels","discard","keep","stop","redirect","reject","fileinto","addflag","numberOperatorLabels","under","over","textOperatorLabels","is","is_not","contains","contains_not","matches","matches_not","regex","regex_not","hasRulesAndActions","requirements","actions","match","push","every","a","invalid","method","action","argument","err","message","addMailFilterRule","event","field","operator","removeMailFilterRule","addMailFilterAction","removeMailFilterAction","PreferencesController","$q","$mdMedia","$mdSidenav","$mdToast","sgSettings","focus","User","Account","Authentication","Date","beginOfDay","_loadAllMailboxes","mail","id","$getMailboxes","allMailboxes","$flattenMailboxes","all","defaultAddresses","domains","domain","forwardConstraints","isDefined","Forward","enabled","forwardAddress","adr","split","Error","forwardConstraintsDomains","$onInit","passwords","newPassword","newPasswordConfirmation","oldPassword","timeZonesList","timeZonesSearchText","sieveVariablesCapability","mailLabelKeyRE","RegExp","SOGoAlternateAvatar","$alternateAvatar","hasActiveExternalSieveScripts","updateVacationDates","$valid","close","onLanguageChange","confirm","ok","quick","location","reload","onDesktopNotificationsChange","SOGoDesktopNotifications","authorizeNotifications","resetContactsCategories","SOGoContactsCategories","defaultContactsCategories","$setDirty","resetCalendarCategories","SOGoCalendarCategories","keys","defaultCalendarCategories","SOGoCalendarCategoriesColorsValues","values","addCalendarCategory","resetCalendarCategoryValidity","removeCalendarCategory","addContactCategory","removeContactCategory","addMailAccount","ev","AuxiliaryMailAccounts","isNew","email","receipts","receiptAction","receiptNonRecipientAction","receiptOutsideDomainAction","receiptAnyAction","show","targetEvent","locals","isArray","settings","Mail","ExpandedFolders","$omit","editMailAccount","data","cloneDeep","catch","noop","removeMailAccount","resetMailLabelValidity","addMailLabel","guid","SOGoMailLabelsColorsKeys","SOGoMailLabelsColorsValues","removeMailLabel","addMailFilter","active","SOGoMailLabelsColors","SOGoSieveFilters","editMailFilter","copy","removeMailFilter","onFiltersOrderChanged","_onFiltersOrderChanged","difference","Vacation","autoReplyEmailAddresses","addDefaultEmailAddresses","v","union","userFilter","search","excludedUsers","minimumSearchLength","$filter","users","user","$$image","image","avatar","c_email","no_404","manageSieveScript","confirmChanges","target","$dirty","preventDefault","tagName","parentNode","href","options","sendForm","addresses","uniq","value","$save","simple","content","position","hideDelay","$setPristine","canChangePassword","changePassword","title","finally","undefined","msg","timeZonesListFilter","toUpperCase","d","toggleVacationStartDate","Line truncated
@@ -1,2 +1,2 @@
!function(){"use strict";function d(){var e,a,t,r=this;if(this.defaults={},this.settings={Mail:{}},e=d.$document[0].getElementById("UserDefaults")){try{t=angular.fromJson(e.textContent||e.innerHTML)}catch(e){d.$log.error("Can't parse user's defaults: "+e.message),t={}}t.SOGoMailLabelsColorsKeys=[],t.SOGoMailLabelsColorsValues=[],_.forEach(t.SOGoMailLabelsColors,function(e,a){t.SOGoMailLabelsColorsKeys.push(a),t.SOGoMailLabelsColorsValues.push(e),"$"==a.charAt(0)&&(Object.defineProperty(t.SOGoMailLabelsColors,"_"+a,Object.getOwnPropertyDescriptor(t.SOGoMailLabelsColors,a)),delete t.SOGoMailLabelsColors[a])}),_.forEach(t.SOGoSieveFilters,function(e){_.forEach(e.actions,function(e){"addflag"==e.method&&"$"==e.argument.charAt(0)&&(e.argument="_"+e.argument)})}),t.SOGoRememberLastModule&&(t.SOGoLoginModule="Last"),t.SOGoMailAutoSave=parseInt(t.SOGoMailAutoSave)||0,t.SOGoMailComposeWindowEnabled=angular.isDefined(t.SOGoMailComposeWindow),t.SOGoMailComposeFontSizeEnabled=0<parseInt(t.SOGoMailComposeFontSize),window.CKEDITOR&&t.SOGoMailComposeFontSizeEnabled&&(window.CKEDITOR.config.fontSize_defaultLabel=t.SOGoMailComposeFontSize,window.CKEDITOR.addCss(".cke_editable { font-size: "+t.SOGoMailComposeFontSize+"px; }")),_.forEach(t.AuxiliaryMailAccounts,function(e){isNaN(parseInt(e.port))&&(e.port=null)}),t.Vacation?(t.Vacation.startDate?t.Vacation.startDate=new Date(1e3*parseInt(t.Vacation.startDate)):(t.Vacation.startDateEnabled=0,t.Vacation.startDate=new Date,t.Vacation.startDate=t.Vacation.startDate.beginOfDay(),t.Vacation.startDate.addDays(1)),t.Vacation.endDate?t.Vacation.endDate=new Date(1e3*parseInt(t.Vacation.endDate)):(t.Vacation.endDateEnabled=0,t.Vacation.endDate=new Date(t.Vacation.startDate.getTime()),t.Vacation.endDate.addDays(1)),t.Vacation.autoReplyEmailAddresses&&angular.isString(t.Vacation.autoReplyEmailAddresses)&&t.Vacation.autoReplyEmailAddresses.length&&(t.Vacation.autoReplyEmailAddresses=t.Vacation.autoReplyEmailAddresses.split(/, */))):t.Vacation={},(angular.isUndefined(t.Vacation.autoReplyEmailAddresses)||0==t.Vacation.autoReplyEmailAddresses.length)&&angular.isDefined(window.defaultEmailAddresses)&&(t.Vacation.autoReplyEmailAddresses=window.defaultEmailAddresses),angular.isUndefined(t.Vacation.daysBetweenResponse)&&(t.Vacation.daysBetweenResponse=7),angular.isUndefined(t.Vacation.startDate)&&(t.Vacation.startDateEnabled=0,t.Vacation.startDate=new Date),angular.isUndefined(t.Vacation.endDate)&&(t.Vacation.endDateEnabled=0,t.Vacation.endDate=new Date),t.Forward&&(angular.isString(t.Forward.forwardAddress)?t.Forward.forwardAddress=t.Forward.forwardAddress.split(/, */):angular.isArray(t.Forward.forwardAddress)||(t.Forward.forwardAddress=[])),angular.isUndefined(t.SOGoCalendarCategories)&&(t.SOGoCalendarCategories=[]),t.SOGoCalendarCategoriesColorsValues=[],_.forEach(t.SOGoCalendarCategories,function(e){t.SOGoCalendarCategoriesColorsValues.push(t.SOGoCalendarCategoriesColors[e])}),angular.isUndefined(t.SOGoContactsCategories)?t.SOGoContactsCategories=[]:t.SOGoContactsCategories=_.compact(t.SOGoContactsCategories),angular.extend(r.defaults,t),r.$mdDateLocaleProvider=d.$mdDateLocaleProvider,angular.extend(r.$mdDateLocaleProvider,t.locale),angular.extend(r.$mdDateLocaleProvider,{firstDayOfWeek:t.SOGoFirstDayOfWeek,firstWeekOfYear:t.SOGoFirstWeekOfYear}),r.$mdDateLocaleProvider.firstDayOfWeek=parseInt(t.SOGoFirstDayOfWeek),r.$mdDateLocaleProvider.weekNumberFormatter=function(e){return l("Week %d",e)},r.$mdDateLocaleProvider.msgCalendar=l("Calendar"),r.$mdDateLocaleProvider.msgOpenCalendar=l("Open Calendar"),r.$mdDateLocaleProvider.parseDate=function(e){return e?e.parseDate(r.$mdDateLocaleProvider,r.defaults.SOGoShortDateFormat):new Date(NaN)},r.$mdDateLocaleProvider.formatDate=function(e){return e?e.format(r.$mdDateLocaleProvider,e.$dateFormat||r.defaults.SOGoShortDateFormat):""},r.$mdDateLocaleProvider.parseTime=function(e){return e?e.parseDate(r.$mdDateLocaleProvider,r.defaults.SOGoTimeFormat):new Date(NaN)},r.$mdDateLocaleProvider.formatTime=function(e){return e?e.format(r.$mdDateLocaleProvider,r.defaults.SOGoTimeFormat):""},r.$mdDateLocaleProvider.isDateComplete=function(e){e=e.trim();return/^((([a-zA-Z]|[^\x00-\x7F]){2,}|[0-9]{1,4})([ .,]+|[/-])){2}(([a-zA-Z]|[^\x00-\x7F]){3,}|[0-9]{1,4})$/.test(e)}}if(a=d.$document[0].getElementById("UserSettings")){try{t=angular.fromJson(a.textContent||a.innerHTML)}catch(e){d.$log.error("Can't parse user's settings: "+e.message),t={}}t.Calendar&&(t.Calendar.PreventInvitationsWhitelist?t.Calendar.PreventInvitationsWhitelist=_.map(t.Calendar.PreventInvitationsWhitelist,function(e,a){var t=/^(.+)\s<(\S+)>$/.exec(e),o=new d.$User({uid:a,cn:t[1],c_email:t[2]});return o.$$image||(o.$$image=r.avatar(o.c_email,32,{no_404:!0})),o}):t.Calendar.PreventInvitationsWhitelist=[]),angular.extend(r.settings,t)}}d.$factory=["$document","$q","$timeout","$log","$mdDateLocale","sgSettings","Gravatar","Resource","User",function(e,a,t,o,r,s,n,i,l){return angular.extend(d,{$documentLine truncated
!function(){"use strict";function f(){var e,t,a,n=this;if(this.nextAlarm=null,this.nextInboxPoll=null,this.currentToast=f.$q.when(!0),this.lastUid=null,this.notifications={},this.defaults={},this.settings={Mail:{}},e=f.$document[0].getElementById("UserDefaults")){try{a=angular.fromJson(e.textContent||e.innerHTML)}catch(e){f.$log.error("Can't parse user's defaults: "+e.message),a={}}a.SOGoMailLabelsColorsKeys=[],a.SOGoMailLabelsColorsValues=[],_.forEach(a.SOGoMailLabelsColors,function(e,t){a.SOGoMailLabelsColorsKeys.push(t),a.SOGoMailLabelsColorsValues.push(e),"$"==t.charAt(0)&&(Object.defineProperty(a.SOGoMailLabelsColors,"_"+t,Object.getOwnPropertyDescriptor(a.SOGoMailLabelsColors,t)),delete a.SOGoMailLabelsColors[t])}),_.forEach(a.SOGoSieveFilters,function(e){_.forEach(e.actions,function(e){"addflag"==e.method&&"$"==e.argument.charAt(0)&&(e.argument="_"+e.argument)})}),a.SOGoRememberLastModule&&(a.SOGoLoginModule="Last"),a.SOGoMailAutoSave=parseInt(a.SOGoMailAutoSave)||0,a.SOGoMailComposeWindowEnabled=angular.isDefined(a.SOGoMailComposeWindow),a.SOGoMailComposeFontSizeEnabled=0<parseInt(a.SOGoMailComposeFontSize),window.CKEDITOR&&a.SOGoMailComposeFontSizeEnabled&&(window.CKEDITOR.config.fontSize_defaultLabel=a.SOGoMailComposeFontSize,window.CKEDITOR.addCss(".cke_editable { font-size: "+a.SOGoMailComposeFontSize+"px; }")),_.forEach(a.AuxiliaryMailAccounts,function(e){isNaN(parseInt(e.port))&&(e.port=null)}),a.Vacation?(a.Vacation.startDate?a.Vacation.startDate=new Date(1e3*parseInt(a.Vacation.startDate)):(a.Vacation.startDateEnabled=0,a.Vacation.startDate=new Date,a.Vacation.startDate=a.Vacation.startDate.beginOfDay(),a.Vacation.startDate.addDays(1)),a.Vacation.endDate?a.Vacation.endDate=new Date(1e3*parseInt(a.Vacation.endDate)):(a.Vacation.endDateEnabled=0,a.Vacation.endDate=new Date(a.Vacation.startDate.getTime()),a.Vacation.endDate.addDays(1)),a.Vacation.autoReplyEmailAddresses&&angular.isString(a.Vacation.autoReplyEmailAddresses)&&a.Vacation.autoReplyEmailAddresses.length&&(a.Vacation.autoReplyEmailAddresses=a.Vacation.autoReplyEmailAddresses.split(/, */))):a.Vacation={},(angular.isUndefined(a.Vacation.autoReplyEmailAddresses)||0==a.Vacation.autoReplyEmailAddresses.length)&&angular.isDefined(window.defaultEmailAddresses)&&(a.Vacation.autoReplyEmailAddresses=window.defaultEmailAddresses),angular.isUndefined(a.Vacation.daysBetweenResponse)&&(a.Vacation.daysBetweenResponse=7),angular.isUndefined(a.Vacation.startDate)&&(a.Vacation.startDateEnabled=0,a.Vacation.startDate=new Date),angular.isUndefined(a.Vacation.endDate)&&(a.Vacation.endDateEnabled=0,a.Vacation.endDate=new Date),a.Forward&&(angular.isString(a.Forward.forwardAddress)?a.Forward.forwardAddress=a.Forward.forwardAddress.split(/, */):angular.isArray(a.Forward.forwardAddress)||(a.Forward.forwardAddress=[])),angular.isUndefined(a.SOGoCalendarCategories)&&(a.SOGoCalendarCategories=[]),a.SOGoCalendarCategoriesColorsValues=[],_.forEach(a.SOGoCalendarCategories,function(e){a.SOGoCalendarCategoriesColorsValues.push(a.SOGoCalendarCategoriesColors[e])}),angular.isUndefined(a.SOGoContactsCategories)?a.SOGoContactsCategories=[]:a.SOGoContactsCategories=_.compact(a.SOGoContactsCategories),angular.extend(n.defaults,a),n.$mdDateLocaleProvider=f.$mdDateLocaleProvider,angular.extend(n.$mdDateLocaleProvider,a.locale),angular.extend(n.$mdDateLocaleProvider,{firstDayOfWeek:a.SOGoFirstDayOfWeek,firstWeekOfYear:a.SOGoFirstWeekOfYear}),n.$mdDateLocaleProvider.firstDayOfWeek=parseInt(a.SOGoFirstDayOfWeek),n.$mdDateLocaleProvider.weekNumberFormatter=function(e){return l("Week %d",e)},n.$mdDateLocaleProvider.msgCalendar=l("Calendar"),n.$mdDateLocaleProvider.msgOpenCalendar=l("Open Calendar"),n.$mdDateLocaleProvider.parseDate=function(e){return e?e.parseDate(n.$mdDateLocaleProvider,n.defaults.SOGoShortDateFormat):new Date(NaN)},n.$mdDateLocaleProvider.formatDate=function(e){return e?e.format(n.$mdDateLocaleProvider,e.$dateFormat||n.defaults.SOGoShortDateFormat):""},n.$mdDateLocaleProvider.parseTime=function(e){return e?e.parseDate(n.$mdDateLocaleProvider,n.defaults.SOGoTimeFormat):new Date(NaN)},n.$mdDateLocaleProvider.formatTime=function(e){return e?e.format(n.$mdDateLocaleProvider,n.defaults.SOGoTimeFormat):""},n.$mdDateLocaleProvider.isDateComplete=function(e){e=e.trim();return/^((([a-zA-Z]|[^\x00-\x7F]){2,}|[0-9]{1,4})([ .,]+|[/-])){2}(([a-zA-Z]|[^\x00-\x7F]){3,}|[0-9]{1,4})$/.test(e)}}if(t=f.$document[0].getElementById("UserSettings")){try{a=angular.fromJson(t.textContent||t.innerHTML)}catch(e){f.$log.error("Can't parse user's settings: "+e.message),a={}}a.Calendar&&(a.Calendar.PreventInvitationsWhitelist?a.Calendar.PreventInvitationsWhitelist=_.map(a.Calendar.PreventInvitationsWhitelist,function(e,t){var a=/^(.+)\s<(\S+)>$/.exec(e),o=new f.$User({uid:t,cn:a[1],c_email:a[2]});return o.$$image||(o.$$image=n.avatar(o.c_email,32,{no_404:!0})),o}):a.Calendar.PreventInvitationsWhitelist=[]),angular.extend(n.settings,a)}}f.$factory=["$window","$document","$q","$timeout","Line truncated
//# sourceMappingURL=Preferences.services.js.map
@@ -1 +1 @@
{"version":3,"sources":["Preferences/Preferences.service.js"],"names":["Preferences","defaultsElement","settingsElement","data","_this","this","defaults","settings","Mail","$document","getElementById","angular","fromJson","textContent","innerHTML","e","$log","error","message","SOGoMailLabelsColorsKeys","SOGoMailLabelsColorsValues","_","forEach","SOGoMailLabelsColors","value","key","push","charAt","Object","defineProperty","getOwnPropertyDescriptor","SOGoSieveFilters","filter","actions","action","method","argument","SOGoRememberLastModule","SOGoLoginModule","SOGoMailAutoSave","parseInt","SOGoMailComposeWindowEnabled","isDefined","SOGoMailComposeWindow","SOGoMailComposeFontSizeEnabled","SOGoMailComposeFontSize","window","CKEDITOR","config","fontSize_defaultLabel","addCss","AuxiliaryMailAccounts","mailAccount","isNaN","port","Vacation","startDate","Date","startDateEnabled","beginOfDay","addDays","endDate","endDateEnabled","getTime","autoReplyEmailAddresses","isString","length","split","isUndefined","defaultEmailAddresses","daysBetweenResponse","Forward","forwardAddress","isArray","SOGoCalendarCategories","SOGoCalendarCategoriesColorsValues","SOGoCalendarCategoriesColors","SOGoContactsCategories","compact","extend","$mdDateLocaleProvider","locale","firstDayOfWeek","SOGoFirstDayOfWeek","firstWeekOfYear","SOGoFirstWeekOfYear","weekNumberFormatter","weekNumber","l","msgCalendar","msgOpenCalendar","parseDate","dateString","SOGoShortDateFormat","NaN","formatDate","date","format","$dateFormat","parseTime","timeString","SOGoTimeFormat","formatTime","isDateComplete","trim","test","Calendar","PreventInvitationsWhitelist","map","match","exec","user","$User","uid","cn","c_email","$$image","avatar","no_404","$factory","$q","$timeout","Settings","Gravatar","Resource","User","$gravatar","$$resource","activeUser","$resourcesURL","resourcesURL","module","factory","prototype","ready","warn","when","email","size","options","url","alternate_avatar","SOGoAlternateAvatar","SOGoGravatarEnabled","join","dstObject","dstAttr","hasActiveExternalSieveScripts","quietFetch","then","response","status","resolve","$save","save","$omit","deep","preferences","whitelist","copy","i","substring","$shortFormat"],"mappings":"CAEA,WACE,aAMA,SAASA,IACP,IAAkBC,EAAiBC,EAAiBC,EAAhDC,EAAQC,KAMZ,GAJAA,KAAKC,SAAW,GAChBD,KAAKE,SAAW,CAACC,KAAM,IAEvBP,EAAkBD,EAAYS,UAAU,GAAGC,eAAe,gBACrC,CACnB,IACEP,EAAOQ,QAAQC,SAASX,EAAgBY,aAAeZ,EAAgBa,WACvE,MAAOC,GACPf,EAAYgB,KAAKC,MAAM,gCAAkCF,EAAEG,SAC3Df,EAAO,GAITA,EAAKgB,yBAA2B,GAChChB,EAAKiB,2BAA6B,GAClCC,EAAEC,QAAQnB,EAAKoB,qBAAsB,SAAUC,EAAOC,GACpDtB,EAAKgB,yBAAyBO,KAAKD,GACnCtB,EAAKiB,2BAA2BM,KAAKF,GAChB,KAAjBC,EAAIE,OAAO,KACbC,OAAOC,eAAe1B,EAAKoB,qBAAsB,IAAME,EACjCG,OAAOE,yBAAyB3B,EAAKoB,qBAAsBE,WAC1EtB,EAAKoB,qBAAqBE,MAIrCJ,EAAEC,QAAQnB,EAAK4B,iBAAkB,SAASC,GACxCX,EAAEC,QAAQU,EAAOC,QAAS,SAASC,GACZ,WAAjBA,EAAOC,QACsB,KAA7BD,EAAOE,SAAST,OAAO,KACzBO,EAAOE,SAAW,IAAMF,EAAOE,cAIjCjC,EAAKkC,yBACPlC,EAAKmC,gBAAkB,QAGzBnC,EAAKoC,iBAAmBC,SAASrC,EAAKoC,mBAAqB,EAE3DpC,EAAKsC,6BAA+B9B,QAAQ+B,UAAUvC,EAAKwC,uBAG3DxC,EAAKyC,+BAA0E,EAAzCJ,SAASrC,EAAK0C,yBAEhDC,OAAOC,UAAY5C,EAAKyC,iCAE1BE,OAAOC,SAASC,OAAOC,sBAAwB9C,EAAK0C,wBACpDC,OAAOC,SAASG,OAAO,8BAAgC/C,EAAK0C,wBAA0B,UAGxFxB,EAAEC,QAAQnB,EAAKgD,sBAAuB,SAAUC,GAC1CC,MAAMb,SAASY,EAAYE,SAC7BF,EAAYE,KAAO,QAKnBnD,EAAKoD,UACHpD,EAAKoD,SAASC,UAChBrD,EAAKoD,SAASC,UAAY,IAAIC,KAAyC,IAApCjB,SAASrC,EAAKoD,SAASC,aAE1DrD,EAAKoD,SAASG,iBAAmB,EACjCvD,EAAKoD,SAASC,UAAY,IAAIC,KAC9BtD,EAAKoD,SAASC,UAAYrD,EAAKoD,SAASC,UAAUG,aAClDxD,EAAKoD,SAASC,UAAUI,QAAQ,IAE9BzD,EAAKoD,SAASM,QAChB1D,EAAKoD,SAASM,QAAU,IAAIJ,KAAuC,IAAlCjB,SAASrC,EAAKoD,SAASM,WAExD1D,EAAKoD,SAASO,eAAiB,EAC/B3D,EAAKoD,SAASM,QAAU,IAAIJ,KAAKtD,EAAKoD,SAASC,UAAUO,WACzD5D,EAAKoD,SAASM,QAAQD,QAAQ,IAE5BzD,EAAKoD,SAASS,yBACdrD,QAAQsD,SAAS9D,EAAKoD,SAASS,0BAC/B7D,EAAKoD,SAASS,wBAAwBE,SACxC/D,EAAKoD,SAASS,wBAA0B7D,EAAKoD,SAASS,wBAAwBG,MAAM,SAEtFhE,EAAKoD,SAAW,IAEb5C,QAAQyD,YAAYjE,EAAKoD,SAASS,0BACa,GAAhD7D,EAAKoD,SAASS,wBAAwBE,SACtCvD,QAAQ+B,UAAUI,OAAOuB,yBAC3BlE,EAAKoD,SAASS,wBAA0BlB,OAAOuB,uBAE7C1D,QAAQyD,YAAYjE,EAAKoD,SAASe,uBACpCnE,EAAKoD,SAASe,oBAAsB,GAElC3D,QAAQyD,YAAYjE,EAAKoD,SAASC,aACpCrD,EAAKoD,SAASG,iBAAmB,EACjCvD,EAAKoD,SAASC,UAAY,IAAIC,MAG5B9C,QAAQyD,YAAYjE,EAAKoD,SAASM,WACpC1D,EAAKoD,SAASO,eAAiB,EAC/B3D,EAAKoD,SAASM,QAAU,IAAIJ,MAG1BtD,EAAKoE,UACH5D,QAAQsD,SAAS9D,EAAKoE,QAAQC,gBAChCrE,EAAKoE,QAAQC,eAAiBrE,EAAKoE,QAAQC,eAAeL,MAAM,OACxDxD,QAAQ8D,QAAQtE,EAAKoE,QAAQC,kBACrCrE,EAAKoE,QAAQC,eAAiB,KAI9B7D,QAAQyD,YAAYjE,EAAKuE,0BAC3BvE,EAAKuE,uBAAyB,IAChCvE,EAAKwE,mCAAqC,GAC1CtD,EAAEC,QAAQnB,EAAKuE,uBAAwB,SAAUlD,GAC/CrB,EAAKwE,mCAAmCjD,KAAKvB,EAAKyE,6BAA6BpD,MAG7Eb,QAAQyD,YAAYjE,EAAK0E,wBAC3B1E,EAAK0E,uBAAyB,GAE9B1E,EAAK0E,uBAAyBxD,EAAEyD,QAAQ3E,EAAK0E,wBAE/ClE,QAAQoE,OAAO3E,EAAME,SAAUH,GAG/BC,EAAM4E,sBAAwBhF,EAAYgF,sBAC1CrE,QAAQoE,OAAO3E,EAAM4E,sBAAuB7E,EAAK8E,QACjDtE,QAAQoE,OAAO3E,EAAM4E,sBAAuB,CAC1CE,eAAgB/E,EAAKgF,mBACrBC,gBAAiBjF,EAAKkF,sBAExBjF,EAAM4E,sBAAsBE,eAAiB1C,SAASrC,EAAKgF,oBAC3D/E,EAAM4E,sBAAsBM,oBAAsB,SAASC,GACzD,OAAOC,EAAE,UAALine truncated
{"version":3,"sources":["Preferences/Preferences.service.js"],"names":["Preferences","defaultsElement","settingsElement","data","_this","this","nextAlarm","nextInboxPoll","currentToast","$q","when","lastUid","notifications","defaults","settings","Mail","$document","getElementById","angular","fromJson","textContent","innerHTML","e","$log","error","message","SOGoMailLabelsColorsKeys","SOGoMailLabelsColorsValues","_","forEach","SOGoMailLabelsColors","value","key","push","charAt","Object","defineProperty","getOwnPropertyDescriptor","SOGoSieveFilters","filter","actions","action","method","argument","SOGoRememberLastModule","SOGoLoginModule","SOGoMailAutoSave","parseInt","SOGoMailComposeWindowEnabled","isDefined","SOGoMailComposeWindow","SOGoMailComposeFontSizeEnabled","SOGoMailComposeFontSize","window","CKEDITOR","config","fontSize_defaultLabel","addCss","AuxiliaryMailAccounts","mailAccount","isNaN","port","Vacation","startDate","Date","startDateEnabled","beginOfDay","addDays","endDate","endDateEnabled","getTime","autoReplyEmailAddresses","isString","length","split","isUndefined","defaultEmailAddresses","daysBetweenResponse","Forward","forwardAddress","isArray","SOGoCalendarCategories","SOGoCalendarCategoriesColorsValues","SOGoCalendarCategoriesColors","SOGoContactsCategories","compact","extend","$mdDateLocaleProvider","locale","firstDayOfWeek","SOGoFirstDayOfWeek","firstWeekOfYear","SOGoFirstWeekOfYear","weekNumberFormatter","weekNumber","l","msgCalendar","msgOpenCalendar","parseDate","dateString","SOGoShortDateFormat","NaN","formatDate","date","format","$dateFormat","parseTime","timeString","SOGoTimeFormat","formatTime","isDateComplete","trim","test","Calendar","PreventInvitationsWhitelist","map","match","exec","user","$User","uid","cn","c_email","$$image","avatar","no_404","$factory","$window","$timeout","$state","$mdToast","Settings","Gravatar","Resource","User","$toast","$gravatar","$$resource","activeUser","$resourcesURL","resourcesURL","module","factory","prototype","ready","warn","email","size","options","url","alternate_avatar","SOGoAlternateAvatar","SOGoGravatarEnabled","join","dstObject","dstAttr","hasActiveExternalSieveScripts","quietFetch","then","response","status","resolve","supportsNotifications","Notification","authorizeNotifications","requestPermission","permission","createNotification","id","title","params","pick","tag","lang","dir","onclick","onClick","close","viewInboxMessage","get","go","accountId","mailboxId","messageId","location","path","pollInbox","toastController","scope","hide","sortingAttributes","sort","asc","noHeaders","dry","filters","searchBy","searchInput","cancel","post","uids","uidHeaderIndex","headers","indexOf","fromHeaderIndex","subjectHeaderIndex","threaded","splice","find","index","toast","debug","h","SOGoDesktopNotifications","href","body","name","icon","template","position","hideDelay","controller","show","finally","refreshViewCheck","SOGoRefreshViewCheck","bind","timeInterval","$inject","getAlarms","now","browserTime","Math","floor","fetch","alarms","a","b","x","next","pop","utc","alarmTime","delay","f","showAlarm","today","day","asDate","period","AlarmController","summary","reminder","snooze","localizedStartDate","localizedEndDate","isAllDay","localizedStartTime","localizedEndTime","view","getDayString","locals","$save","save","$omit","deep","preferences","whitelist","copy","i","substring","$shortFormat"],"mappings":"CAEA,WACE,aAMA,SAASA,IACP,IAAkBC,EAAiBC,EAAiBC,EAAhDC,EAAQC,KAYZ,GAVAA,KAAKC,UAAY,KACjBD,KAAKE,cAAgB,KACrBF,KAAKG,aAAeR,EAAYS,GAAGC,MAAK,GACxCL,KAAKM,QAAU,KACfN,KAAKO,cAAgB,GAErBP,KAAKQ,SAAW,GAChBR,KAAKS,SAAW,CAACC,KAAM,IAEvBd,EAAkBD,EAAYgB,UAAU,GAAGC,eAAe,gBACrC,CACnB,IACEd,EAAOe,QAAQC,SAASlB,EAAgBmB,aAAenB,EAAgBoB,WACvE,MAAOC,GACPtB,EAAYuB,KAAKC,MAAM,gCAAkCF,EAAEG,SAC3DtB,EAAO,GAITA,EAAKuB,yBAA2B,GAChCvB,EAAKwB,2BAA6B,GAClCC,EAAEC,QAAQ1B,EAAK2B,qBAAsB,SAAUC,EAAOC,GACpD7B,EAAKuB,yBAAyBO,KAAKD,GACnC7B,EAAKwB,2BAA2BM,KAAKF,GAChB,KAAjBC,EAAIE,OAAO,KACbC,OAAOC,eAAejC,EAAK2B,qBAAsB,IAAME,EACjCG,OAAOE,yBAAyBlC,EAAK2B,qBAAsBE,WAC1E7B,EAAK2B,qBAAqBE,MAIrCJ,EAAEC,QAAQ1B,EAAKmC,iBAAkB,SAASC,GACxCX,EAAEC,QAAQU,EAAOC,QAAS,SAASC,GACZ,WAAjBA,EAAOC,QACsB,KAA7BD,EAAOE,SAAST,OAAO,KACzBO,EAAOE,SAAW,IAAMF,EAAOE,cAIjCxC,EAAKyC,yBACPzC,EAAK0C,gBAAkB,QAGzB1C,EAAK2C,iBAAmBC,SAAS5C,EAAK2C,mBAAqB,EAE3D3C,EAAK6C,6BAA+B9B,QAAQ+B,UAAU9C,EAAK+C,uBAG3D/C,EAAKgD,+BAA0E,EAAzCJ,SAAS5C,EAAKiD,yBAEhDC,OAAOC,UAAYnD,EAAKgD,iCAE1BE,OAAOC,SAASC,OAAOC,sBAAwBrD,EAAKiD,wBACpDC,OAAOC,SAASG,OAAO,8BAAgCtD,EAAKiD,wBAA0B,UAGxFxB,EAAEC,QAAQ1B,EAAKuD,sBAAuB,SAAUC,GAC1CC,MAAMb,SAASY,EAAYE,SAC7BF,EAAYE,KAAO,QAKnB1D,EAAK2D,UACH3D,EAAK2D,SAASC,UAChB5D,EAAK2D,SAASC,UAAY,IAAIC,KAAyC,IAApCjB,SAAS5C,EAAK2D,SAASC,aAE1D5D,EAAK2D,SAASG,iBAAmB,EACjC9D,EAAK2D,SAASC,UAAY,IAAIC,KAC9B7D,EAAK2D,SAASC,UAAY5D,EAAK2D,SAASC,UAAUG,aAClD/D,EAAK2D,SAASC,UAAUI,QAAQ,IAE9BhE,EAAK2D,SAASM,QAChBjE,EAAK2D,SAASM,QAAU,IAAIJ,KAAuC,IAAlCjB,SAAS5C,EAAK2D,SAASM,WAExDjE,EAAK2D,SAASO,eAAiB,EAC/BlE,EAAK2D,SAASM,QAAU,IAAIJ,KAAK7D,EAAK2D,SAALine truncated
@@ -1,2 +1,2 @@
!function(){"use strict";function d(e){this.component=e,this.component.attendees&&_.forEach(this.component.attendees,function(e){e.image=d.$gravatar(e.email,32)}),this.workDaysOnly=!0,this.slotStartTimeLimit=new Date,this.slotStartTimeLimit.setMinutes(0),this.slotStartTimeLimit.setHours(d.dayStartHour),this.slotEndTimeLimit=new Date,this.slotEndTimeLimit.setMinutes(0),this.slotEndTimeLimit.setHours(d.dayEndHour),this.$days=[],this.$futureFreebusyData={},this.updateFreeBusyCoverage(),this.updateFreeBusy(),0==this.$days.length&&this.getDays()}d.$factory=["$q","$timeout","$log","sgSettings","Attendees_ROLES","Preferences","User","Card","Gravatar","Resource",function(e,t,n,i,a,o,r,s,c,l){return angular.extend(d,{$q:e,$timeout:t,$log:n,$settings:i,$User:r,$Preferences:o,$Card:s,$gravatar:c,$$resource:new l(i.activeUser("folderURL")+"Calendar",i.activeUser()),ROLES:a}),d.dayStartHour=parseInt(o.defaults.SOGoDayStartTime.split(":")[0]),d.dayEndHour=parseInt(o.defaults.SOGoDayEndTime.split(":")[0]),d}];try{angular.module("SOGo.SchedulerUI")}catch(e){angular.module("SOGo.SchedulerUI",["SOGo.Common"])}angular.module("SOGo.SchedulerUI").constant("Attendees_ROLES",{REQ_PARTICIPANT:"req-participant",OPT_PARTICIPANT:"opt-participant",NON_PARTICIPANT:"non-participant",CHAIR:"chair"}).factory("Attendees",d.$factory),d.timeToQuarters=function(e){return 4*e.getHours()+Math.ceil(e.getMinutes()/15)},d.prototype.getLength=function(){return this.component.attendees?this.component.attendees.length:0},d.prototype.initOrganizer=function(e){var n=this;(e&&e.isSubscription?d.$User.$filter(e.owner).then(function(e){var t=e[0];n.component.organizer={uid:t.uid,name:t.cn,email:t.c_email}}):(this.component.organizer||(this.component.organizer={uid:d.$settings.activeUser("login"),name:d.$settings.activeUser("identification"),email:d.$settings.activeUser("email")}),d.$q.when())).then(function(){n.updateFreeBusyAttendee(n.component.organizer)})},d.prototype.add=function(e,t){var n,i,a=this;e&&((!this.component.attendees||t&&t.organizerCalendar)&&this.initOrganizer(t?t.organizerCalendar:null),e.$isList({expandable:!0})?(i=d.$Card.$find(e.container,e.c_name)).$id().then(function(e){_.forEach(i.refs,function(e){n={name:e.c_cn,email:e.$preferredEmail(t?t.partial:null),role:d.ROLES.REQ_PARTICIPANT,partstat:"needs-action",uid:e.c_uid,$avatarIcon:"person"},_.find(a.component.attendees,function(e){return e.email==n.email})||(n.image=d.$gravatar(n.email,32),a.component.attendees?a.component.attendees.push(n):a.component.attendees=[n],a.updateFreeBusyAttendee(n))})}):(n={uid:e.c_uid,domain:e.c_domain,isMSExchange:e.ismsexchange,isGroup:e.$isList(),isExpandableGroup:!1,isResource:e.isresource,name:e.c_cn,email:e.$$email,role:d.ROLES.REQ_PARTICIPANT,partstat:"needs-action",$avatarIcon:e.$avatarIcon},_.find(this.attendees,function(e){return e.email==n.email})||(e.$isList()&&d.$Preferences.defaults.SOGoLDAPGroupExpansionEnabled&&e.$members().then(function(e){n.members=e,n.isExpandableGroup=!0}),n.image=d.$gravatar(n.email,32),this.component.attendees?_.findIndex(this.component.attendees,{email:n.email})<0&&this.component.attendees.push(n):this.component.attendees=[n],this.updateFreeBusyAttendee(n))))},d.prototype.nextRole=function(t){var e=_.values(d.ROLES),n=_.findIndex(e,function(e){return t.role===e});t.role=e[++n%4]},d.prototype.hasAttendee=function(e){var t=_.find(this.component.attendees,function(t){return _.find(e.emails,function(e){return e.value==t.email})});return angular.isDefined(t)},d.prototype.remove=function(t){var e=_.findIndex(this.component.attendees,function(e){return e.email==t.email});-1<e&&this.component.attendees.splice(e,1),delete this.$futureFreebusyData[t.uid]},d.prototype.updateFreeBusyCoverage=function(){var o,r,s,e,c={};this.component.start&&this.component.end&&(o=new Date(this.component.start.getTime()),r=new Date(this.component.end.getTime()),this.component.isAllDay?(o.setHours(d.dayStartHour),o.setMinutes(0),r.setHours(d.dayEndHour),r.setMinutes(0),s=e=0):(s=parseInt(o.getMinutes()/15+.5),e=parseInt(r.getMinutes()/15+.5)),o.setMinutes(15*s),r.setMinutes(15*e),_.forEach(o.beginOfDay().daysUpTo(r.beginOfDay()),function(e,t){e<o&&(e=new Date(o.getTime()));var n,i=e.getDate(),a=e.getDayString();if(a===o.getDayString())for(n=e.getHours().toString(),c[a]={},c[a][n]=[];0<s;)c[a][n].push(0),s--;else e=e.beginOfDay(),c[a]={};for(;e.getTime()<r.getTime()&&e.getDate()==i;)n=e.getHours().toString(),angular.isUndefined(c[a][n])&&(c[a][n]=[]),c[a][n].push(1),e.addMinutes(15)}),this.freebusy=c)},d.prototype.coversFreeBusy=function(e,t,n){return this.freebusy&&angular.isDefined(this.freebusy[e])&&angular.isDefined(this.freebusy[e][t])&&1==this.freebusy[e][t][n]},d.prototype.getDays=function(e){var t,n,i,a=this;return e?(t=e,(n=new Date(e.getTime())).addMinutes(this.component.delta)):(t=this.component.start,n=this.component.end),(0===this.$days.length||_.findIndex(this.$days,["getDayString",t.getDayString()])<0||_.findIndex(this.$days,["geLine truncated
!function(){"use strict";function d(e){this.component=e,this.component.attendees&&_.forEach(this.component.attendees,function(e){e.image=d.$gravatar(e.email,32)}),this.workDaysOnly=!0,this.slotStartTimeLimit=new Date,this.slotStartTimeLimit.setMinutes(0),this.slotStartTimeLimit.setHours(d.dayStartHour),this.slotEndTimeLimit=new Date,this.slotEndTimeLimit.setMinutes(0),this.slotEndTimeLimit.setHours(d.dayEndHour),this.$days=[],this.$futureFreebusyData={},this.updateFreeBusyCoverage(),this.updateFreeBusy(),0==this.$days.length&&this.getDays()}d.$factory=["$q","$timeout","$log","sgSettings","Attendees_ROLES","Preferences","User","Card","Gravatar","Resource",function(e,t,n,i,a,o,r,s,c,l){return angular.extend(d,{$q:e,$timeout:t,$log:n,$settings:i,$User:r,$Preferences:o,$Card:s,$gravatar:c,$$resource:new l(i.activeUser("folderURL")+"Calendar",i.activeUser()),ROLES:a}),d.dayStartHour=parseInt(o.defaults.SOGoDayStartTime.split(":")[0]),d.dayEndHour=parseInt(o.defaults.SOGoDayEndTime.split(":")[0]),d}];try{angular.module("SOGo.SchedulerUI")}catch(e){angular.module("SOGo.SchedulerUI",["SOGo.Common"])}angular.module("SOGo.SchedulerUI").constant("Attendees_ROLES",{REQ_PARTICIPANT:"req-participant",OPT_PARTICIPANT:"opt-participant",NON_PARTICIPANT:"non-participant",CHAIR:"chair"}).factory("Attendees",d.$factory),d.timeToQuarters=function(e){return 4*e.getHours()+Math.ceil(e.getMinutes()/15)},d.prototype.getLength=function(){return this.component.attendees?this.component.attendees.length:0},d.prototype.initOrganizer=function(e){var n=this;(e&&e.isSubscription?d.$User.$filter(e.owner).then(function(e){var t=e[0];n.component.organizer={uid:t.uid,name:t.cn,email:t.c_email}}):(this.component.organizer||(this.component.organizer={uid:d.$settings.activeUser("login"),name:d.$settings.activeUser("identification"),email:d.$settings.activeUser("email")}),d.$q.when())).then(function(){n.updateFreeBusyAttendee(n.component.organizer)})},d.prototype.add=function(e,t){var n,i,a=this;e&&((!this.component.attendees||t&&t.organizerCalendar)&&this.initOrganizer(t?t.organizerCalendar:null),e.$isList({expandable:!0})?(i=d.$Card.$find(e.container,e.c_name)).$id().then(function(e){_.forEach(i.refs,function(e){n={name:e.c_cn,email:e.$preferredEmail(t?t.partial:null),role:d.ROLES.REQ_PARTICIPANT,partstat:"needs-action",uid:e.c_uid,$avatarIcon:"person"},_.find(a.component.attendees,function(e){return e.email==n.email})||(n.image=d.$gravatar(n.email,32),a.component.attendees?a.component.attendees.push(n):a.component.attendees=[n],a.updateFreeBusyAttendee(n))})}):(n={uid:e.c_uid,domain:e.c_domain,isMSExchange:e.ismsexchange,isGroup:e.$isList(),isExpandableGroup:!1,isResource:e.isresource,name:e.c_cn,email:e.$$email,role:d.ROLES.REQ_PARTICIPANT,partstat:"needs-action",$avatarIcon:e.$avatarIcon},_.find(this.attendees,function(e){return e.email==n.email})||(e.$isList()&&d.$Preferences.defaults.SOGoLDAPGroupExpansionEnabled&&e.$members().then(function(e){n.members=e,n.isExpandableGroup=!0}),n.image=d.$gravatar(n.email,32),this.component.attendees?_.findIndex(this.component.attendees,{email:n.email})<0&&this.component.attendees.push(n):this.component.attendees=[n],this.updateFreeBusyAttendee(n))))},d.prototype.nextRole=function(t){var e=_.values(d.ROLES),n=_.findIndex(e,function(e){return t.role===e});t.role=e[++n%4]},d.prototype.hasAttendee=function(e){var t=_.find(this.component.attendees,function(t){return _.find(e.emails,function(e){return e.value==t.email})});return angular.isDefined(t)},d.prototype.remove=function(t){var e=_.findIndex(this.component.attendees,function(e){return e.email==t.email});-1<e&&this.component.attendees.splice(e,1),delete this.$futureFreebusyData[t.uid]},d.prototype.updateFreeBusyCoverage=function(){var o,r,s,e,c={};this.component.start&&this.component.end&&(o=new Date(this.component.start.getTime()),r=new Date(this.component.end.getTime()),this.component.isAllDay?(o.setHours(d.dayStartHour),o.setMinutes(0),r.setHours(d.dayEndHour),r.setMinutes(0),s=e=0):(s=parseInt(o.getMinutes()/15+.5),e=parseInt(r.getMinutes()/15+.5)),o.setMinutes(15*s),r.setMinutes(15*e),_.forEach(o.beginOfDay().daysUpTo(r.beginOfDay()),function(e,t){e<o&&(e=new Date(o.getTime()));var n,i=e.getDate(),a=e.getDayString();if(a===o.getDayString())for(n=e.getHours().toString(),c[a]={},c[a][n]=[];0<s;)c[a][n].push(0),s--;else e=e.beginOfDay(),c[a]={};for(;e.getTime()<r.getTime()&&e.getDate()==i;)n=e.getHours().toString(),angular.isUndefined(c[a][n])&&(c[a][n]=[]),c[a][n].push(1),e.addMinutes(15)}),this.freebusy=c)},d.prototype.coversFreeBusy=function(e,t,n){return this.freebusy&&angular.isDefined(this.freebusy[e])&&angular.isDefined(this.freebusy[e][t])&&1==this.freebusy[e][t][n]},d.prototype.getDays=function(e){var t,n,i,a=this;return e?(t=e,(n=new Date(e.getTime())).addMinutes(this.component.delta)):(t=this.component.start,n=this.component.end),(0===this.$days.length||_.findIndex(this.$days,["getDayString",t.getDayString()])<0||_.findIndex(this.$days,["geLine truncated
//# sourceMappingURL=Scheduler.services.js.map
@@ -1 +1 @@
{"version":3,"sources":["Scheduler/Attendees.service.js","Scheduler/Calendar.service.js","Scheduler/Component.service.js","Scheduler/CalendarController.js","Scheduler/CalendarListController.js","Scheduler/CalendarsController.js","Scheduler/ComponentController.js","Scheduler/sgCalendarDay.directive.js","Scheduler/sgCalendarDayBlock.directive.js","Scheduler/sgCalendarDayTable.directive.js","Scheduler/sgCalendarGhost.directive.js","Scheduler/sgCalendarListEvent.directive.js","Scheduler/sgCalendarListItem.directive.js","Scheduler/sgCalendarMonthDay.directive.js","Scheduler/sgCalendarMonthEvent.directive.js","Scheduler/sgCalendarPrintStylesheet.directive.js","Scheduler/sgCalendarScrollView.directive.js","Scheduler/sgCategoryStylesheet.directive.js","Scheduler/sgDraggableCalendarBlock.directive.js","Scheduler/sgFreebusy.directive.js","Scheduler/sgFreebusyDay.directive.js","Scheduler/sgNowLine.directive.js"],"names":["Attendees","component","this","attendees","_","forEach","attendee","image","$gravatar","email","workDaysOnly","slotStartTimeLimit","Date","setMinutes","setHours","dayStartHour","slotEndTimeLimit","dayEndHour","$days","$futureFreebusyData","updateFreeBusyCoverage","updateFreeBusy","length","getDays","$factory","$q","$timeout","$log","Settings","ROLES","Preferences","User","Card","Gravatar","Resource","angular","extend","$settings","$User","$Preferences","$Card","$$resource","activeUser","parseInt","defaults","SOGoDayStartTime","split","SOGoDayEndTime","module","e","constant","REQ_PARTICIPANT","OPT_PARTICIPANT","NON_PARTICIPANT","CHAIR","factory","timeToQuarters","dateTime","getHours","Math","ceil","getMinutes","prototype","getLength","initOrganizer","calendar","_this","isSubscription","$filter","owner","then","results","organizer","uid","name","cn","c_email","when","updateFreeBusyAttendee","add","card","options","list","organizerCalendar","$isList","expandable","$find","container","c_name","$id","listId","refs","ref","c_cn","$preferredEmail","partial","role","partstat","c_uid","$avatarIcon","find","o","push","domain","c_domain","isMSExchange","ismsexchange","isGroup","isExpandableGroup","isResource","isresource","$$email","SOGoLDAPGroupExpansionEnabled","$members","members","findIndex","nextRole","roles","values","index","hasAttendee","emails","value","isDefined","remove","currentAttendee","splice","roundedStart","roundedEnd","startQuarter","endQuarter","freebusy","start","end","getTime","isAllDay","beginOfDay","daysUpTo","date","hourKey","currentDay","getDate","dayKey","getDayString","toString","isUndefined","addMinutes","coversFreeBusy","day","hour","quarter","refDate","sd","ed","formatFcn","delta","addDays","$mdDateLocaleProvider","formatDate","$dateFormat","SOGoLongDateFormat","stringWithSeparator","promises","filter","all","promise","resource","params","days","sday","map","eday","userResource","intersection","keys","fetch","data","i","forwardFindDate","currentStart","foundDate","maxOffset","endLimit","duration","offset","firstStep","floor","currentEntries","indexOf","startLimit","testDuration","foundTime","setTime","forwardAdjustCurrentStart","getDay","backwardFindDate","lastIndexOf","testOffset","debug","backwardAdjustCurrentStart","findSlot","direction","findDate","adjustCurrentStart","clone","setSeconds","step","catch","err","mergeFreebusy","startDay","j","attendeeEntries","flatMap","count","reject","l","Calendar","futureCalendarData","init","id","newCalendarData","create","$unwrap","Component","Acl","$Component","$$Acl","$view","EventDragDayLength","EventDragHorizontalOffset","ConflictHTTPErrorCode","$defaultCalendar","SOGoDefaultCalendar","$findAll","active","$add","sibling","isWebCalendar","$webcalendars","$subscriptions","$calendars","localeCompare","settings","FoldersOrder","saveFoldersOrder","$reloadAll","writable","calendars","union","isOwned","acls","objectCreator","calendarData","group","login","$get","$getIndex","$subscribe","path","$addWebCalendar","url","d","defer","urls","webCalendarURL","post","isEditable","isRemote","JSON","stringify","undefined","resolve","response","status","reloadWebCalendars","$error","statusText","$deleteComponents","components","pid","uids","saveFoldersActivation","ids","request","folders","color","$acl","isSuperUser","$shadowData","$omit","$futureCalendarData","getClassName","base","$rename","$save","$delete","$reset","key","save","setCredentials","username","password","export","ownerPaths","realOwnerId","type","filename","webDavICSURL","substring","join","open","$setActivation","$getComponent","componentId","recurrenceId","isError","isObject","copy","futureComponentData","newComponentData","newguid","isNew","$rootScope","Component_STATUS","STATUS","$Attendees","timeFormat","$query","search","$queryEvents","sort","asc","filterpopup","$queryTasks","$refreshTimeout","$ghost","EventsFilterState","TasksFilterState","EventsSortingState","TasksSortingState","show_completed","ShowCompletedTasks","$categories","SOGoCalendarCategoriesColors","SOGoTimeFormat","NOTLine truncated
{"version":3,"sources":["Scheduler/Attendees.service.js","Scheduler/Calendar.service.js","Scheduler/Component.service.js","Scheduler/CalendarController.js","Scheduler/CalendarListController.js","Scheduler/CalendarsController.js","Scheduler/ComponentController.js","Scheduler/sgCalendarDay.directive.js","Scheduler/sgCalendarDayBlock.directive.js","Scheduler/sgCalendarDayTable.directive.js","Scheduler/sgCalendarGhost.directive.js","Scheduler/sgCalendarListEvent.directive.js","Scheduler/sgCalendarListItem.directive.js","Scheduler/sgCalendarMonthDay.directive.js","Scheduler/sgCalendarMonthEvent.directive.js","Scheduler/sgCalendarPrintStylesheet.directive.js","Scheduler/sgCalendarScrollView.directive.js","Scheduler/sgCategoryStylesheet.directive.js","Scheduler/sgDraggableCalendarBlock.directive.js","Scheduler/sgFreebusy.directive.js","Scheduler/sgFreebusyDay.directive.js","Scheduler/sgNowLine.directive.js"],"names":["Attendees","component","this","attendees","_","forEach","attendee","image","$gravatar","email","workDaysOnly","slotStartTimeLimit","Date","setMinutes","setHours","dayStartHour","slotEndTimeLimit","dayEndHour","$days","$futureFreebusyData","updateFreeBusyCoverage","updateFreeBusy","length","getDays","$factory","$q","$timeout","$log","Settings","ROLES","Preferences","User","Card","Gravatar","Resource","angular","extend","$settings","$User","$Preferences","$Card","$$resource","activeUser","parseInt","defaults","SOGoDayStartTime","split","SOGoDayEndTime","module","e","constant","REQ_PARTICIPANT","OPT_PARTICIPANT","NON_PARTICIPANT","CHAIR","factory","timeToQuarters","dateTime","getHours","Math","ceil","getMinutes","prototype","getLength","initOrganizer","calendar","_this","isSubscription","$filter","owner","then","results","organizer","uid","name","cn","c_email","when","updateFreeBusyAttendee","add","card","options","list","organizerCalendar","$isList","expandable","$find","container","c_name","$id","listId","refs","ref","c_cn","$preferredEmail","partial","role","partstat","c_uid","$avatarIcon","find","o","push","domain","c_domain","isMSExchange","ismsexchange","isGroup","isExpandableGroup","isResource","isresource","$$email","SOGoLDAPGroupExpansionEnabled","$members","members","findIndex","nextRole","roles","values","index","hasAttendee","emails","value","isDefined","remove","currentAttendee","splice","roundedStart","roundedEnd","startQuarter","endQuarter","freebusy","start","end","getTime","isAllDay","beginOfDay","daysUpTo","date","hourKey","currentDay","getDate","dayKey","getDayString","toString","isUndefined","addMinutes","coversFreeBusy","day","hour","quarter","refDate","sd","ed","formatFcn","delta","addDays","$mdDateLocaleProvider","formatDate","$dateFormat","SOGoLongDateFormat","stringWithSeparator","promises","filter","all","promise","resource","params","days","sday","map","eday","userResource","intersection","keys","fetch","data","i","forwardFindDate","currentStart","foundDate","maxOffset","endLimit","duration","offset","firstStep","floor","currentEntries","indexOf","startLimit","testDuration","foundTime","setTime","forwardAdjustCurrentStart","getDay","backwardFindDate","lastIndexOf","testOffset","debug","backwardAdjustCurrentStart","findSlot","direction","findDate","adjustCurrentStart","clone","setSeconds","step","catch","err","mergeFreebusy","startDay","j","attendeeEntries","flatMap","count","reject","l","Calendar","futureCalendarData","init","id","newCalendarData","create","$unwrap","Component","Acl","$Component","$$Acl","$view","EventDragDayLength","EventDragHorizontalOffset","ConflictHTTPErrorCode","$defaultCalendar","SOGoDefaultCalendar","$findAll","active","$add","sibling","isWebCalendar","$webcalendars","$subscriptions","$calendars","localeCompare","settings","FoldersOrder","saveFoldersOrder","$reloadAll","writable","calendars","union","isOwned","acls","objectCreator","calendarData","group","login","$get","$getIndex","$subscribe","path","$addWebCalendar","url","d","defer","urls","webCalendarURL","post","isEditable","isRemote","JSON","stringify","undefined","resolve","response","status","reloadWebCalendars","$error","statusText","$deleteComponents","components","pid","uids","saveFoldersActivation","ids","request","folders","color","$acl","isSuperUser","$shadowData","$omit","$futureCalendarData","getClassName","base","$rename","$save","$delete","$reset","key","save","setCredentials","username","password","export","ownerPaths","realOwnerId","type","filename","webDavICSURL","substring","join","open","$setActivation","$getComponent","componentId","recurrenceId","isError","isObject","copy","futureComponentData","newComponentData","newguid","isNew","$rootScope","Component_STATUS","STATUS","$Attendees","timeFormat","$query","search","$queryEvents","sort","asc","filterpopup","$queryTasks","$refreshTimeout","$ghost","EventsFilterState","TasksFilterState","EventsSortingState","TasksSortingState","show_completed","ShowCompletedTasks","$categories","SOGoCalendarCategoriesColors","SOGoTimeFormat","NOTLine truncated