1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rainloop_ynh.git synced 2024-09-03 20:16:18 +02:00
rainloop_ynh/sources/rainloop/v/1.8.1.281/static/js/min/admin.js
2015-03-07 15:14:19 +00:00

6 lines
139 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
!function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var i={};return t.m=e,t.c=i,t.p="rainloop/v/0.0.0/static/js/min/",t(0)}([function(e,t,i){i(70)(i(16))},function(e,t,i){!function(){"use strict";var t=null,n={},o=i(11),s=i(2),r=i(12),a=i(3),l=i(72),c=i(73),u=i(49),p=i(4),d=i(7);n.trim=r.trim,n.inArray=r.inArray,n.isArray=s.isArray,n.isObject=s.isObject,n.isFunc=s.isFunction,n.isUnd=s.isUndefined,n.isNull=s.isNull,n.emptyFunction=function(){},n.isNormal=function(e){return!n.isUnd(e)&&!n.isNull(e)},n.windowResize=s.debounce(function(e){n.isUnd(e)?d.$win.resize():o.setTimeout(function(){d.$win.resize()},e)},50),n.windowResizeCallback=function(){n.windowResize()},n.isPosNumeric=function(e,t){return n.isNormal(e)?(n.isUnd(t)?0:!t)?/^[1-9]+[0-9]*$/.test(e.toString()):/^[0-9]*$/.test(e.toString()):!1},n.pInt=function(e,t){var i=n.isNormal(e)&&""!==e?o.parseInt(e,10):t||0;return o.isNaN(i)?t||0:i},n.pString=function(e){return n.isNormal(e)?""+e:""},n.encodeURIComponent=function(e){return o.encodeURIComponent(e)},n.isNonEmptyArray=function(e){return n.isArray(e)&&0<e.length},n.simpleQueryParser=function(e){var t={},i=[],n=[],s=0,r=0;for(i=e.split("&"),s=0,r=i.length;r>s;s++)n=i[s].split("="),t[o.decodeURIComponent(n[0])]=o.decodeURIComponent(n[1]);return t},n.mailToHelper=function(e,t){if(e&&"mailto:"===e.toString().substr(0,7).toLowerCase()){e=e.toString().substr(7);var r=[],a=null,l=null,c={},u=i(25),d=e.replace(/\?.+$/,""),h=e.replace(/^[^\?]*\?/,""),g=function(e){return e?s.compact(s.map(o.decodeURIComponent(e).split(/[,]/),function(e){var t=new u;return t.mailsoParse(e),""!==t.email?t:null})):null};return r=g(d),c=n.simpleQueryParser(h),n.isUnd(c.cc)||(a=g(o.decodeURIComponent(c.cc))),n.isUnd(c.bcc)||(l=g(o.decodeURIComponent(c.bcc))),i(5).showScreenPopup(t,[p.ComposeType.Empty,null,r,a,l,n.isUnd(c.subject)?null:n.pString(o.decodeURIComponent(c.subject)),n.isUnd(c.body)?null:n.plainToHtml(n.pString(o.decodeURIComponent(c.body)))]),!0}return!1},n.rsaObject=function(e){return c&&e&&(null===t||t&&t.__sPublicKey!==e)&&o.crypto&&o.crypto.getRandomValues?(t=new c,t.setPublicKey(e),t.__sPublicKey=e):t=!1,t},n.rsaEncode=function(e,t){if(o.crypto&&o.crypto.getRandomValues&&t){var i=!1,s=n.rsaObject(t);if(s&&(i=s.encrypt(n.fakeMd5()+":"+e+":"+n.fakeMd5()),!1!==i&&n.isNormal(i)))return"rsa:xxx:"+i}return e},n.rsaEncode.supported=!1,n.encodeHtml=function(e){return n.isNormal(e)?s.escape(e.toString()):""},n.splitPlainText=function(e,t){var i="",o="",s=e,r=0,a=0;for(t=n.isUnd(t)?100:t;s.length>t;)o=s.substring(0,t),r=o.lastIndexOf(" "),a=o.lastIndexOf("\n"),-1!==a&&(r=a),-1===r&&(r=t),i+=o.substring(0,r)+"\n",s=s.substring(r+1);return i+s},n.timeOutAction=function(){var e={};return function(t,i,s){n.isUnd(e[t])&&(e[t]=0),o.clearTimeout(e[t]),e[t]=o.setTimeout(i,s)}}(),n.timeOutActionSecond=function(){var e={};return function(t,i,n){e[t]||(e[t]=o.setTimeout(function(){i(),e[t]=0},n))}}(),n.hos=function(e,t){return e&&o.Object&&o.Object.hasOwnProperty?o.Object.hasOwnProperty.call(e,t):!1},n.inFocus=function(){return o.document.activeElement?(n.isUnd(o.document.activeElement.__inFocusCache)&&(o.document.activeElement.__inFocusCache=r(o.document.activeElement).is("input,textarea,iframe,.cke_editable")),!!o.document.activeElement.__inFocusCache):!1},n.removeInFocus=function(){if(o.document&&o.document.activeElement&&o.document.activeElement.blur){var e=r(o.document.activeElement);e.is("input,textarea")&&o.document.activeElement.blur()}},n.removeSelection=function(){if(o&&o.getSelection){var e=o.getSelection();e&&e.removeAllRanges&&e.removeAllRanges()}else o.document&&o.document.selection&&o.document.selection.empty&&o.document.selection.empty()},n.replySubjectAdd=function(e,t){e=n.trim(e.toUpperCase()),t=n.trim(t.replace(/[\s]+/g," "));var i=!1,o=[],r="RE"===e,a="FWD"===e,l=!a;return""!==t&&s.each(t.split(":"),function(e){var t=n.trim(e);i||!/^(RE|FWD)$/i.test(t)&&!/^(RE|FWD)[\[\(][\d]+[\]\)]$/i.test(t)?(o.push(e),i=!0):(r||(r=!!/^RE/i.test(t)),a||(a=!!/^FWD/i.test(t)))}),l?r=!1:a=!1,n.trim((l?"Re: ":"Fwd: ")+(r?"Re: ":"")+(a?"Fwd: ":"")+n.trim(o.join(":")))},n.roundNumber=function(e,t){return o.Math.round(e*o.Math.pow(10,t))/o.Math.pow(10,t)},n.friendlySize=function(e){return e=n.pInt(e),e>=1073741824?n.roundNumber(e/1073741824,1)+"GB":e>=1048576?n.roundNumber(e/1048576,1)+"MB":e>=1024?n.roundNumber(e/1024,0)+"KB":e+"B"},n.log=function(e){o.console&&o.console.log&&o.console.log(e)},n.delegateRun=function(e,t,i,o){e&&e[t]&&(o=n.pInt(o),0>=o?e[t].apply(e,n.isArray(i)?i:[]):s.delay(function(){e[t].apply(e,n.isArray(i)?i:[])},o))},n.kill_CtrlA_CtrlS=function(e){if(e=e||o.event,e&&e.ctrlKey&&!e.shiftKey&&!e.altKey){var t=e.target||e.srcElement,i=e.keyCode||e.which;if(i===p.EventKeyCode.S)return void e.preventDefault();if(t&&t.tagName&&t.tagName.match(/INPUT|TEXTAREA/i))return;i===p.EventKeyCode.A&&(o.getSelection?o.getSelection().removeAllRanges():o.document.selection&&o.document.selection.clear&&o.document.selection.clear(),e.preventDefault())}},n.createCommand=function(e,t,i){var o=function(){return s&&s.canExecute&&s.canExecute()&&t.apply(e,Array.prototype.slice.call(arguments)),!1},s=t?o:n.emptyFunction;return s.enabled=a.observable(!0),i=n.isUnd(i)?!0:i,s.canExecute=a.computed(n.isFunc(i)?function(){return s.enabled()&&i.call(e)}:function(){return s.enabled()&&!!i}),s},n.createMomentDate=function(e){return n.isUnd(e.moment)&&(e.moment=a.observable(moment())),a.computed(function(){d.momentTrigger();var e=this.moment();return 1970===e.year()?"":e.fromNow()},e)},n.createMomentShortDate=function(e){return a.computed(function(){var e="",t=moment(),n=this.moment(),o=this.momentDate();return e=1970===n.year()?"":4>=t.diff(n,"hours")?o:t.format("L")===n.format("L")?i(8).i18n("MESSAGE_LIST/TODAY_AT",{TIME:n.format("LT")}):t.clone().subtract("days",1).format("L")===n.format("L")?i(8).i18n("MESSAGE_LIST/YESTERDAY_AT",{TIME:n.format("LT")}):n.format(t.year()===n.year()?"D MMM.":"LL")},e)},n.convertThemeName=function(e){return"@custom"===e.substr(-7)&&(e=n.trim(e.substring(0,e.length-7))),n.trim(e.replace(/[^a-zA-Z0-9]+/g," ").replace(/([A-Z])/g," $1").replace(/[\s]+/g," "))},n.quoteName=function(e){return e.replace(/["]/g,'\\"')},n.microtime=function(){return(new Date).getTime()},n.timestamp=function(){return o.Math.round(n.microtime()/1e3)},n.convertLangName=function(e,t){return i(8).i18n("LANGS_NAMES"+(!0===t?"_EN":"")+"/LANG_"+e.toUpperCase().replace(/[^a-zA-Z0-9]+/g,"_"),null,e)},n.fakeMd5=function(e){var t="",i="0123456789abcdefghijklmnopqrstuvwxyz";for(e=n.isUnd(e)?32:n.pInt(e);t.length<e;)t+=i.substr(o.Math.round(o.Math.random()*i.length),1);return t},n.draggablePlace=function(){return r('<div class="draggablePlace"><span class="text"></span>&nbsp;<i class="icon-copy icon-white visible-on-ctrl"></i><i class="icon-mail icon-white hidden-on-ctrl"></i></div>').appendTo("#rl-hidden")},n.defautOptionsAfterRender=function(e,t){t&&!n.isUnd(t.disabled)&&e&&r(e).toggleClass("disabled",t.disabled).prop("disabled",t.disabled)},n.windowPopupKnockout=function(e,t,s,l){var c=null,u=o.open(""),p="__OpenerApplyBindingsUid"+n.fakeMd5()+"__",d=r("#"+t);o[p]=function(){if(u&&u.document.body&&d&&d[0]){var t=r(u.document.body);r("#rl-content",t).html(d.html()),r("html",u.document).addClass("external "+r("html").attr("class")),i(8).i18nToNode(t),e&&r("#rl-content",t)[0]&&a.applyBindings(e,r("#rl-content",t)[0]),o[p]=null,l(u)}},u.document.open(),u.document.write('<html><head><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><meta name="viewport" content="user-scalable=no" /><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="robots" content="noindex, nofollow, noodp" /><title>'+n.encodeHtml(s)+'</title></head><body><div id="rl-content"></div></body></html>'),u.document.close(),c=u.document.createElement("script"),c.type="text/javascript",c.innerHTML="if(window&&window.opener&&window.opener['"+p+"']){window.opener['"+p+"']();window.opener['"+p+"']=null}",u.document.getElementsByTagName("head")[0].appendChild(c)},n.settingsSaveHelperFunction=function(e,t,i,o){return i=i||null,o=n.isUnd(o)?1e3:n.pInt(o),function(n,r,a,l,c){t.call(i,r&&r.Result?p.SaveSettingsStep.TrueResult:p.SaveSettingsStep.FalseResult),e&&e.call(i,n,r,a,l,c),s.delay(function(){t.call(i,p.SaveSettingsStep.Idle)},o)}},n.settingsSaveHelperSimpleFunction=function(e,t){return n.settingsSaveHelperFunction(null,e,t,1e3)},n.settingsSaveHelperSubscribeFunction=function(e,t,i,o){return function(s){if(e){switch(i){default:s=n.pString(s);break;case"bool":case"boolean":s=s?"1":"0";break;case"int":case"integer":case"number":s=n.pInt(s);break;case"trim":s=n.trim(s)}var r={};r[t]=s,e.saveAdminConfig?e.saveAdminConfig(o||null,r):e.saveSettings&&e.saveSettings(o||null,r)}}},n.htmlToPlain=function(e){var t=0,i=0,n=0,o=0,a=0,l="",c=function(e){for(var t=100,i="",n="",o=e,s=0,r=0;o.length>t;)n=o.substring(0,t),s=n.lastIndexOf(" "),r=n.lastIndexOf("\n"),-1!==r&&(s=r),-1===s&&(s=t),i+=n.substring(0,s)+"\n",o=o.substring(s+1);return i+o},u=function(e){return e=c(r.trim(e)),e="> "+e.replace(/\n/gm,"\n> "),e.replace(/(^|\n)([> ]+)/gm,function(){return arguments&&2<arguments.length?arguments[1]+r.trim(arguments[2].replace(/[\s]/g,""))+" ":""})},p=function(){if(arguments&&1<arguments.length){var e=r.trim(arguments[1]);return 0<e.length&&(e=e.replace(/<div[^>]*>([\s\S\r\n]*)<\/div>/gim,p),e="\n"+r.trim(e)+"\n"),e}return""},h=function(){return arguments&&1<arguments.length?arguments[1].toString().replace(/[\n]/gm,"<br />"):""},g=function(){return arguments&&1<arguments.length?""+arguments[1]+s.escape(arguments[2]):""},m=function(){return arguments&&1<arguments.length?r.trim(arguments[1]):""};for(l=e.replace(/\u0002\u0002/g,"").replace(/\u0003\u0003/g,"").replace(/<pre[^>]*>([\s\S\r\n]*)<\/pre>/gim,h).replace(/[\s]+/gm," ").replace(/((?:href|data)\s?=\s?)("[^"]+?"|'[^']+?')/gim,g).replace(/<br[^>]*>/gim,"\n").replace(/<\/h[\d]>/gi,"\n").replace(/<\/p>/gi,"\n\n").replace(/<\/li>/gi,"\n").replace(/<\/td>/gi,"\n").replace(/<\/tr>/gi,"\n").replace(/<hr[^>]*>/gim,"\n_______________________________\n\n").replace(/<div[^>]*>([\s\S\r\n]*)<\/div>/gim,p).replace(/<blockquote[^>]*>/gim,"\n__bq__start__\n").replace(/<\/blockquote>/gim,"\n__bq__end__\n").replace(/<a [^>]*>([\s\S\r\n]*?)<\/a>/gim,m).replace(/<\/div>/gi,"\n").replace(/&nbsp;/gi," ").replace(/&quot;/gi,'"').replace(/<[^>]*>/gm,""),l=d.$div.html(l).text(),l=l.replace(/\n[ \t]+/gm,"\n").replace(/[\n]{3,}/gm,"\n\n").replace(/&gt;/gi,">").replace(/&lt;/gi,"<").replace(/&amp;/gi,"&"),t=0,a=100;a>0&&(a--,i=l.indexOf("__bq__start__",t),i>-1);)n=l.indexOf("__bq__start__",i+5),o=l.indexOf("__bq__end__",i+5),(-1===n||n>o)&&o>i?(l=l.substring(0,i)+u(l.substring(i+13,o))+l.substring(o+11),t=0):t=n>-1&&o>n?n-1:0;return l=l.replace(/__bq__start__/gm,"").replace(/__bq__end__/gm,"")},n.plainToHtml=function(e,t){e=e.toString().replace(/\r/g,""),t=n.isUnd(t)?!1:!!t;var i=!1,o=!0,s=!0,r=[],a="",l=0,c=e.split("\n");do{for(o=!1,r=[],l=0;l<c.length;l++)a=c[l],s=">"===a.substr(0,1),s&&!i?(o=!0,i=!0,r.push("~~~blockquote~~~"),r.push(a.substr(1))):!s&&i?""!==a?(i=!1,r.push("~~~/blockquote~~~"),r.push(a)):r.push(a):r.push(s&&i?a.substr(1):a);i&&(i=!1,r.push("~~~/blockquote~~~")),c=r}while(o);return e=c.join("\n"),e=e.replace(/\u200C\u200C/g,"").replace(/\u200D\u200D/g,"").replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/~~~blockquote~~~[\s]*/g,"<blockquote>").replace(/[\s]*~~~\/blockquote~~~/g,"</blockquote>").replace(/\n/g,"<br />"),t?n.findEmailAndLinks(e):e},o.rainloop_Utils_htmlToPlain=n.htmlToPlain,o.rainloop_Utils_plainToHtml=n.plainToHtml,n.findEmailAndLinks=function(e){return e=l.link(e,{newWindow:!0,stripPrefix:!1,urls:!0,email:!0,twitter:!1,replaceFn:function(e,t){return!(e&&t&&"url"===t.getType()&&t.matchedText&&0!==t.matchedText.indexOf("http"))}})},n.resizeAndCrop=function(e,t,i){var n=new o.Image;n.onload=function(){var e=[0,0],n=o.document.createElement("canvas"),s=n.getContext("2d");n.width=t,n.height=t,e=this.width>this.height?[this.width-this.height,0]:[0,this.height-this.width],s.fillStyle="#fff",s.fillRect(0,0,t,t),s.drawImage(this,e[0]/2,e[1]/2,this.width-e[0],this.height-e[1],0,0,t,t),i(n.toDataURL("image/jpeg"))},n.src=e},n.folderListOptionsBuilder=function(e,t,i,s,r,a,l,c,u,d){var h=null,g=!1,m=0,f=0,b="   ",v=[];for(d=n.isUnd(d)?!1:!!d,u=n.isNormal(u)?u:0<e.length,r=n.isNormal(r)?r:0,a=n.isNormal(a)?a:null,l=n.isNormal(l)?l:null,c=n.isNormal(c)?c:null,n.isArray(i)||(i=[]),n.isArray(s)||(s=[]),m=0,f=s.length;f>m;m++)v.push({id:s[m][0],name:s[m][1],system:!1,seporator:!1,disabled:!1});for(g=!0,m=0,f=e.length;f>m;m++)h=e[m],(l?l.call(null,h):!0)&&(g&&0<v.length&&v.push({id:"---",name:"---",system:!1,seporator:!0,disabled:!0}),g=!1,v.push({id:h.fullNameRaw,name:c?c.call(null,h):h.name(),system:!0,seporator:!1,disabled:!h.selectable||-1<n.inArray(h.fullNameRaw,i)||(a?a.call(null,h):!1)}));for(g=!0,m=0,f=t.length;f>m;m++)h=t[m],!h.subScribed()&&h.existen&&!d||!h.selectable&&!h.hasSubScribedSubfolders()||(l?l.call(null,h):!0)&&(p.FolderType.User===h.type()||!u||h.hasSubScribedSubfolders())&&(g&&0<v.length&&v.push({id:"---",name:"---",system:!1,seporator:!0,disabled:!0}),g=!1,v.push({id:h.fullNameRaw,name:new o.Array(h.deep+1-r).join(b)+(c?c.call(null,h):h.name()),system:!1,seporator:!1,disabled:!h.selectable||-1<n.inArray(h.fullNameRaw,i)||(a?a.call(null,h):!1)})),h.subScribed()&&0<h.subFolders().length&&(v=v.concat(n.folderListOptionsBuilder([],h.subFolders(),i,[],r,a,l,c,u,d)));return v},n.computedPagenatorHelper=function(e,t){return function(){var i=0,s=0,r=2,a=[],l=e(),c=t(),u=function(e,t,i){var o={current:e===l,name:n.isUnd(i)?e.toString():i.toString(),custom:n.isUnd(i)?!1:!0,title:n.isUnd(i)?"":e.toString(),value:e.toString()};(n.isUnd(t)?0:!t)?a.unshift(o):a.push(o)};if(c>1||c>0&&l>c){for(l>c?(u(c),i=c,s=c):((3>=l||l>=c-2)&&(r+=2),u(l),i=l,s=l);r>0;)if(i-=1,s+=1,i>0&&(u(i,!1),r--),c>=s)u(s,!0),r--;else if(0>=i)break;3===i?u(2,!1):i>3&&u(o.Math.round((i-1)/2),!1,"..."),c-2===s?u(c-1,!0):c-2>s&&u(o.Math.round((c+s)/2),!0,"..."),i>1&&u(1,!1),c>s&&u(c,!0)}return a}},n.selectElement=function(e){var t,i;o.getSelection?(t=o.getSelection(),t.removeAllRanges(),i=o.document.createRange(),i.selectNodeContents(e),t.addRange(i)):o.document.selection&&(i=o.document.body.createTextRange(),i.moveToElementText(e),i.select())},n.detectDropdownVisibility=s.debounce(function(){d.dropdownVisibility(!!s.find(d.aBootstrapDropdowns,function(e){return e.hasClass("open")}))},50),n.triggerAutocompleteInputChange=function(e){var t=function(){r(".checkAutocomplete").trigger("change")};(n.isUnd(e)?1:!e)?t():s.delay(t,100)},n.setHeadViewport=function(e){var t=[];s.each(e,function(e,i){t.push(""+e+"="+i)}),r("#rl-head-viewport").attr("content",t.join(", "))},n.getFileExtension=function(e){e=n.trim(e).toLowerCase();var t=e.split(".").pop();return t===e?"":t},n.mimeContentType=function(e){var t="",i="application/octet-stream";return e=n.trim(e).toLowerCase(),"winmail.dat"===e?"application/ms-tnef":(t=n.getFileExtension(e),t&&0<t.length&&!n.isUnd(u[t])&&(i=u[t]),i)},n.disposeOne=function(e,t){var i=t||e;i&&"function"==typeof i.dispose&&i.dispose()},n.disposeObject=function(e){e&&(n.isArray(e.disposables)&&s.each(e.disposables,n.disposeOne),a.utils.objectForEach(e,n.disposeOne))},n.delegateRunOnDestroy=function(e){e&&(n.isArray(e)?s.each(e,function(e){n.delegateRunOnDestroy(e)}):e&&e.onDestroy&&e.onDestroy())},n.__themeTimer=0,n.__themeAjax=null,n.changeTheme=function(e,t){var i=r("#rlThemeLink"),s=r("#rlThemeStyle"),a=i.attr("href");a||(a=s.attr("data-href")),a&&(a=a.toString().replace(/\/-\/[^\/]+\/\-\//,"/-/"+e+"/-/"),a=a.toString().replace(/\/Css\/[^\/]+\/User\//,"/Css/0/User/"),a=a.toString().replace(/\/Hash\/[^\/]+\//,"/Hash/-/"),"Json/"!==a.substring(a.length-5,a.length)&&(a+="Json/"),o.clearTimeout(n.__themeTimer),t(p.SaveSettingsStep.Animate),n.__themeAjax&&n.__themeAjax.abort&&n.__themeAjax.abort(),n.__themeAjax=r.ajax({url:a,dataType:"json"}).done(function(e){e&&n.isArray(e)&&2===e.length&&(!i||!i[0]||s&&s[0]||(s=r('<style id="rlThemeStyle"></style>'),i.after(s),i.remove()),s&&s[0]&&(s.attr("data-href",a).attr("data-theme",e[0]),s[0].styleSheet&&!n.isUnd(s[0].styleSheet.cssText)?s[0].styleSheet.cssText=e[1]:s.text(e[1])),t(p.SaveSettingsStep.TrueResult))}).always(function(){n.__themeTimer=o.setTimeout(function(){t(p.SaveSettingsStep.Idle)},1e3),n.__themeAjax=null}))},n.substr=o.String.substr,"b"!=="ab".substr(-1)&&(n.substr=function(e,t,i){return 0>t&&(t=e.length+t),e.substr(t,i)}),e.exports=n}()},function(e){e.exports=window._},function(e,t,i){!function(t){"use strict";var n=i(11),o=i(2),s=i(12),r=function(e,i,n){t.utils.domNodeDisposal.addDisposeCallback(e,function(){n&&n.dispose&&n.dispose(),i&&(i.off("click.koTooltip"),i.tooltip&&i.tooltip("destroy")),i=null})};t.bindingHandlers.tooltip={init:function(e,n){var o=null,a=!0,l="",c="",u=null,p=i(7),d=i(8);p.bMobileDevice||(o=s(e),l=o.data("tooltip-class")||"",a="on"===(o.data("tooltip-i18n")||"on"),c=o.data("tooltip-placement")||"top",o.tooltip({delay:{show:500,hide:100},html:!0,container:"body",placement:c,trigger:"hover",title:function(){var e=a?t.unwrap(n()):n()();return""===e||o.is(".disabled")||p.dropdownVisibility()?"":'<span class="tooltip-class '+l+'">'+(a?d.i18n(e):e)+"</span>"}}).on("click.koTooltip",function(){o.tooltip("hide")}),u=p.tooltipTrigger.subscribe(function(){o.tooltip("hide")}),r(e,o,u))}},t.bindingHandlers.tooltipForTest={init:function(e){var t=s(e),o=null,a=i(7);t.tooltip({container:"body",trigger:"hover manual",title:function(){return t.data("tooltip3-data")||""}}),s(n.document).on("click",function(){t.tooltip("hide")}),o=a.tooltipTrigger.subscribe(function(){t.tooltip("hide")}),r(e,t,o)},update:function(e,i){var n=t.unwrap(i());""===n?s(e).data("tooltip3-data","").tooltip("hide"):(s(e).data("tooltip3-data",n),o.delay(function(){s(e).is(":visible")&&s(e).tooltip("show")},100))}},t.bindingHandlers.registrateBootstrapDropdown={init:function(e){var t=i(7);t&&t.aBootstrapDropdowns&&t.aBootstrapDropdowns.push(s(e))}},t.bindingHandlers.openDropdownTrigger={update:function(e,n){if(t.unwrap(n())){var o=s(e),r=i(1);o.hasClass("open")||(o.find(".dropdown-toggle").dropdown("toggle"),r.detectDropdownVisibility()),n()(!1)}}},t.bindingHandlers.dropdownCloser={init:function(e){s(e).closest(".dropdown").on("click",".e-item",function(){s(e).dropdown("toggle")})}},t.bindingHandlers.popover={init:function(e,i){s(e).popover(t.unwrap(i())),t.utils.domNodeDisposal.addDisposeCallback(e,function(){s(e).popover("destroy")})}},t.bindingHandlers.csstext={init:function(e,n){var o=i(1);e&&e.styleSheet&&!o.isUnd(e.styleSheet.cssText)?e.styleSheet.cssText=t.unwrap(n()):s(e).text(t.unwrap(n()))},update:function(e,n){var o=i(1);e&&e.styleSheet&&!o.isUnd(e.styleSheet.cssText)?e.styleSheet.cssText=t.unwrap(n()):s(e).text(t.unwrap(n()))}},t.bindingHandlers.resizecrop={init:function(e){s(e).addClass("resizecrop").resizecrop({width:"100",height:"100",wrapperCSS:{"border-radius":"10px"}})},update:function(e,t){t()(),s(e).resizecrop({width:"100",height:"100"})}},t.bindingHandlers.onEnter={init:function(e,i,o,r){s(e).on("keypress.koOnEnter",function(t){t&&13===n.parseInt(t.keyCode,10)&&(s(e).trigger("change"),i().call(r))}),t.utils.domNodeDisposal.addDisposeCallback(e,function(){s(e).off("keypress.koOnEnter")})}},t.bindingHandlers.onEsc={init:function(e,i,o,r){s(e).on("keypress.koOnEsc",function(t){t&&27===n.parseInt(t.keyCode,10)&&(s(e).trigger("change"),i().call(r))}),t.utils.domNodeDisposal.addDisposeCallback(e,function(){s(e).off("keypress.koOnEsc")})}},t.bindingHandlers.clickOnTrue={update:function(e,i){t.unwrap(i())&&s(e).click()}},t.bindingHandlers.modal={init:function(e,n){var o=i(7),r=i(1);s(e).toggleClass("fade",!o.bMobileDevice).modal({keyboard:!1,show:t.unwrap(n())}).on("shown.koModal",r.windowResizeCallback).find(".close").on("click.koModal",function(){n()(!1)}),t.utils.domNodeDisposal.addDisposeCallback(e,function(){s(e).off("shown.koModal").find(".close").off("click.koModal")})},update:function(e,n){var r=i(7);s(e).modal(t.unwrap(n())?"show":"hide"),r.$html.hasClass("rl-anim")&&(r.$html.addClass("rl-modal-animation"),o.delay(function(){r.$html.removeClass("rl-modal-animation")},400))}},t.bindingHandlers.i18nInit={init:function(e){i(8).i18nToNode(e)}},t.bindingHandlers.i18nUpdate={update:function(e,n){t.unwrap(n()),i(8).i18nToNode(e)}},t.bindingHandlers.link={update:function(e,i){s(e).attr("href",t.unwrap(i()))}},t.bindingHandlers.title={update:function(e,i){s(e).attr("title",t.unwrap(i()))}},t.bindingHandlers.textF={init:function(e,i){s(e).text(t.unwrap(i()))}},t.bindingHandlers.initDom={init:function(e,t){t()(e)}},t.bindingHandlers.initFixedTrigger={init:function(e,i){var o=t.unwrap(i()),r=null,a=s(e),l=null,c=o[1]||0;r=s(o[0]||null),r=r[0]?r:null,r&&s(n).resize(function(){l=r.offset(),l&&l.top&&a.css("top",l.top+c)})}},t.bindingHandlers.initResizeTrigger={init:function(e,i){var n=t.unwrap(i());s(e).css({height:n[1],"min-height":n[1]})},update:function(e,n){var o=i(1),r=i(7),a=t.unwrap(n()),l=o.pInt(a[1]),c=0,u=s(e).offset().top;u>0&&(u+=o.pInt(a[2]),c=r.$win.height()-u,c>l&&(l=c),s(e).css({height:l,"min-height":l}))}},t.bindingHandlers.appendDom={update:function(e,i){s(e).hide().empty().append(t.unwrap(i())).show()}},t.bindingHandlers.draggable={init:function(e,o,r){var a=i(7),l=i(1);if(!a.bMobileDevice){var c=100,u=3,p=r(),d=p&&p.droppableSelector?p.droppableSelector:"",h={distance:20,handle:".dragHandle",cursorAt:{top:22,left:3},refreshPositions:!0,scroll:!0};d&&(h.drag=function(e){s(d).each(function(){var t=null,i=null,o=s(this),r=o.offset(),a=r.top+o.height();n.clearInterval(o.data("timerScroll")),o.data("timerScroll",!1),e.pageX>=r.left&&e.pageX<=r.left+o.width()&&(e.pageY>=a-c&&e.pageY<=a&&(t=function(){o.scrollTop(o.scrollTop()+u),l.windowResize()},o.data("timerScroll",n.setInterval(t,10)),t()),e.pageY>=r.top&&e.pageY<=r.top+c&&(i=function(){o.scrollTop(o.scrollTop()-u),l.windowResize()},o.data("timerScroll",n.setInterval(i,10)),i()))})},h.stop=function(){s(d).each(function(){n.clearInterval(s(this).data("timerScroll")),s(this).data("timerScroll",!1)})}),h.helper=function(e){return o()(e&&e.target?t.dataFor(e.target):null)},s(e).draggable(h).on("mousedown.koDraggable",function(){l.removeInFocus()}),t.utils.domNodeDisposal.addDisposeCallback(e,function(){s(e).off("mousedown.koDraggable").draggable("destroy")})}}},t.bindingHandlers.droppable={init:function(e,n,o){var r=i(7);if(!r.bMobileDevice){var a=n(),l=o(),c=l&&l.droppableOver?l.droppableOver:null,u=l&&l.droppableOut?l.droppableOut:null,p={tolerance:"pointer",hoverClass:"droppableHover"};a&&(p.drop=function(e,t){a(e,t)},c&&(p.over=function(e,t){c(e,t)}),u&&(p.out=function(e,t){u(e,t)}),s(e).droppable(p),t.utils.domNodeDisposal.addDisposeCallback(e,function(){s(e).droppable("destroy")}))}}},t.bindingHandlers.nano={init:function(e){var t=i(7);t.bDisableNanoScroll||s(e).addClass("nano").nanoScroller({iOSNativeScrolling:!1,preventPageScrolling:!0})}},t.bindingHandlers.saveTrigger={init:function(e){var t=s(e);t.data("save-trigger-type",t.is("input[type=text],input[type=email],input[type=password],select,textarea")?"input":"custom"),"custom"===t.data("save-trigger-type")?t.append('&nbsp;&nbsp;<i class="icon-spinner animated"></i><i class="icon-remove error"></i><i class="icon-ok success"></i>').addClass("settings-saved-trigger"):t.addClass("settings-saved-trigger-input")},update:function(e,i){var n=t.unwrap(i()),o=s(e);if("custom"===o.data("save-trigger-type"))switch(n.toString()){case"1":o.find(".animated,.error").hide().removeClass("visible").end().find(".success").show().addClass("visible");break;case"0":o.find(".animated,.success").hide().removeClass("visible").end().find(".error").show().addClass("visible");break;case"-2":o.find(".error,.success").hide().removeClass("visible").end().find(".animated").show().addClass("visible");break;default:o.find(".animated").hide().end().find(".error,.success").removeClass("visible")}else switch(n.toString()){case"1":o.addClass("success").removeClass("error");break;case"0":o.addClass("error").removeClass("success");break;case"-2":break;default:o.removeClass("error success")}}},t.bindingHandlers.emailsTags={init:function(e,t,n){var r=i(1),a=i(25),l=s(e),c=t(),u=n(),p=u.autoCompleteSource||null,d=function(e){c&&c.focused&&c.focused(!!e)};l.inputosaurus({parseOnBlur:!0,allowDragAndDrop:!0,focusCallback:d,inputDelimiters:[",",";"],autoCompleteSource:p,parseHook:function(e){return o.map(e,function(e){var t=r.trim(e),i=null;return""!==t?(i=new a,i.mailsoParse(t),[i.toLine(!1),i]):[t,null]})},change:o.bind(function(e){l.data("EmailsTagsValue",e.target.value),c(e.target.value)},this)}),c&&c.focused&&c.focused.subscribe&&c.focused.subscribe(function(e){l.inputosaurus(e?"focus":"blur")})},update:function(e,i){var n=s(e),o=i(),r=t.unwrap(o);n.data("EmailsTagsValue")!==r&&(n.val(r),n.data("EmailsTagsValue",r),n.inputosaurus("refresh"))}},t.bindingHandlers.command={init:function(e,i,n,o){var r=s(e),a=i();if(!a||!a.enabled||!a.canExecute)throw new Error("You are not using command function");r.addClass("command"),t.bindingHandlers[r.is("form")?"submit":"click"].init.apply(o,arguments)},update:function(e,t){var i=!0,n=s(e),o=t();i=o.enabled(),n.toggleClass("command-not-enabled",!i),i&&(i=o.canExecute(),n.toggleClass("command-can-not-be-execute",!i)),n.toggleClass("command-disabled disable disabled",!i).toggleClass("no-disabled",!!i),(n.is("input")||n.is("button"))&&n.prop("disabled",!i)}},t.extenders.trimmer=function(e){var n=i(1),o=t.computed({read:e,write:function(t){e(n.trim(t.toString()))},owner:this});return o(e()),o},t.extenders.posInterer=function(e,n){var o=i(1),s=t.computed({read:e,write:function(t){var i=o.pInt(t.toString(),n);0>=i&&(i=n),i===e()&&""+i!=""+t&&e(i+1),e(i)}});return s(e()),s},t.extenders.limitedList=function(e,n){var o=i(1),s=t.computed({read:e,write:function(i){var s=t.unwrap(e),r=t.unwrap(n);o.isNonEmptyArray(r)?-1<o.inArray(i,r)?e(i):-1<o.inArray(s,r)?(e(s+" "),e(s)):(e(r[0]+" "),e(r[0])):e("")}}).extend({notify:"always"});return s(e()),s.valueHasMutated||(s.valueHasMutated=function(){e.valueHasMutated()}),s},t.extenders.reversible=function(e){var t=e();return e.commit=function(){t=e()},e.reverse=function(){e(t)},e.commitedValue=function(){return t},e},t.extenders.toggleSubscribe=function(e,t){return e.subscribe(t[1],t[0],"beforeChange"),e.subscribe(t[2],t[0]),e},t.extenders.toggleSubscribeProperty=function(e,t){var i=t[1];return i&&(e.subscribe(function(e){e&&e[i]&&e[i](!1)},t[0],"beforeChange"),e.subscribe(function(e){e&&e[i]&&e[i](!0)},t[0])),e},t.extenders.falseTimeout=function(e,t){var o=i(1);return e.iTimeout=0,e.subscribe(function(i){i&&(n.clearTimeout(e.iTimeout),e.iTimeout=n.setTimeout(function(){e(!1),e.iTimeout=0},o.pInt(t)))}),e},t.observable.fn.validateNone=function(){return this.hasError=t.observable(!1),this},t.observable.fn.validateEmail=function(){var e=i(1);return this.hasError=t.observable(!1),this.subscribe(function(t){t=e.trim(t),this.hasError(""!==t&&!/^[^@\s]+@[^@\s]+$/.test(t))},this),this.valueHasMutated(),this},t.observable.fn.validateSimpleEmail=function(){var e=i(1);return this.hasError=t.observable(!1),this.subscribe(function(t){t=e.trim(t),this.hasError(""!==t&&!/^.+@.+$/.test(t))},this),this.valueHasMutated(),this},t.observable.fn.deleteAccessHelper=function(){return this.extend({falseTimeout:3e3}).extend({toggleSubscribe:[null,function(e){e&&e.deleteAccess&&e.deleteAccess(!1)},function(e){e&&e.deleteAccess&&e.deleteAccess(!0)}]}),this},t.observable.fn.validateFunc=function(e){var n=i(1);return this.hasFuncError=t.observable(!1),n.isFunc(e)&&(this.subscribe(function(t){this.hasFuncError(!e(t))},this),this.valueHasMutated()),this},e.exports=t}(ko)},function(e){!function(){"use strict";var t={};t.StorageResultType={Success:"success",Abort:"abort",Error:"error",Unload:"unload"},t.State={Empty:10,Login:20,Auth:30},t.StateType={Webmail:0,Admin:1},t.Capa={TwoFactor:"TWO_FACTOR",OpenPGP:"OPEN_PGP",Prefetch:"PREFETCH",Gravatar:"GRAVATAR",Themes:"THEMES",UserBackground:"USER_BACKGROUND",Sieve:"SIEVE",Filters:"FILTERS",AttachmentThumbnails:"ATTACHMENT_THUMBNAILS",Templates:"TEMPLATES",AutoLogout:"AUTOLOGOUT",AdditionalAccounts:"ADDITIONAL_ACCOUNTS"},t.KeyState={All:"all",None:"none",ContactList:"contact-list",MessageList:"message-list",FolderList:"folder-list",MessageView:"message-view",Compose:"compose",Settings:"settings",Menu:"menu",PopupComposeOpenPGP:"compose-open-pgp",PopupKeyboardShortcutsHelp:"popup-keyboard-shortcuts-help",PopupAsk:"popup-ask"},t.FolderType={Inbox:10,SentItems:11,Draft:12,Trash:13,Spam:14,Archive:15,NotSpam:80,User:99},t.LoginSignMeTypeAsString={DefaultOff:"defaultoff",DefaultOn:"defaulton",Unused:"unused"},t.LoginSignMeType={DefaultOff:0,DefaultOn:1,Unused:2},t.ComposeType={Empty:"empty",Reply:"reply",ReplyAll:"replyall",Forward:"forward",ForwardAsAttachment:"forward-as-attachment",Draft:"draft",EditAsNew:"editasnew"},t.UploadErrorCode={Normal:0,FileIsTooBig:1,FilePartiallyUploaded:2,FileNoUploaded:3,MissingTempFolder:4,FileOnSaveingError:5,FileType:98,Unknown:99},t.SetSystemFoldersNotification={None:0,Sent:1,Draft:2,Spam:3,Trash:4,Archive:5},t.ClientSideKeyName={FoldersLashHash:0,MessagesInboxLastHash:1,MailBoxListSize:2,ExpandedFolders:3,FolderListSize:4,MessageListSize:5,LastReplyAction:6,LastSignMe:7,ComposeLastIdentityID:8},t.EventKeyCode={Backspace:8,Tab:9,Enter:13,Esc:27,PageUp:33,PageDown:34,Left:37,Right:39,Up:38,Down:40,End:35,Home:36,Space:32,Insert:45,Delete:46,A:65,S:83},t.MessageSetAction={SetSeen:0,UnsetSeen:1,SetFlag:2,UnsetFlag:3},t.MessageSelectAction={All:0,None:1,Invert:2,Unseen:3,Seen:4,Flagged:5,Unflagged:6},t.DesktopNotification={Allowed:0,NotAllowed:1,Denied:2,NotSupported:9},t.MessagePriority={Low:5,Normal:3,High:1},t.EditorDefaultType={Html:"Html",Plain:"Plain",HtmlForced:"HtmlForced",PlainForced:"PlainForced"},t.ServerSecure={None:0,SSL:1,TLS:2},t.SearchDateType={All:-1,Days3:3,Days7:7,Month:30},t.SaveSettingsStep={Animate:-2,Idle:-1,TrueResult:1,FalseResult:0},t.Layout={NoPreview:0,SidePreview:1,BottomPreview:2,Mobile:3},t.FilterConditionField={From:"From",Recipient:"Recipient",Subject:"Subject"},t.FilterConditionType={Contains:"Contains",NotContains:"NotContains",EqualTo:"EqualTo",NotEqualTo:"NotEqualTo"},t.FiltersAction={None:"None",MoveTo:"MoveTo",Discard:"Discard",Vacation:"Vacation",Reject:"Reject",Forward:"Forward"},t.FilterRulesType={All:"All",Any:"Any"},t.SignedVerifyStatus={UnknownPublicKeys:-4,UnknownPrivateKey:-3,Unverified:-2,Error:-1,None:0,Success:1},t.ContactPropertyType={Unknown:0,FullName:10,FirstName:15,LastName:16,MiddleName:16,Nick:18,NamePrefix:20,NameSuffix:21,Email:30,Phone:31,Web:32,Birthday:40,Facebook:90,Skype:91,GitHub:92,Note:110,Custom:250},t.Notification={InvalidToken:101,AuthError:102,AccessError:103,ConnectionError:104,CaptchaError:105,SocialFacebookLoginAccessDisable:106,SocialTwitterLoginAccessDisable:107,SocialGoogleLoginAccessDisable:108,DomainNotAllowed:109,AccountNotAllowed:110,AccountTwoFactorAuthRequired:120,AccountTwoFactorAuthError:121,CouldNotSaveNewPassword:130,CurrentPasswordIncorrect:131,NewPasswordShort:132,NewPasswordWeak:133,NewPasswordForbidden:134,ContactsSyncError:140,CantGetMessageList:201,CantGetMessage:202,CantDeleteMessage:203,CantMoveMessage:204,CantCopyMessage:205,CantSaveMessage:301,CantSendMessage:302,InvalidRecipients:303,CantSaveFilters:351,CantGetFilters:352,FiltersAreNotCorrect:355,CantCreateFolder:400,CantRenameFolder:401,CantDeleteFolder:402,CantSubscribeFolder:403,CantUnsubscribeFolder:404,CantDeleteNonEmptyFolder:405,CantSaveSettings:501,CantSavePluginSettings:502,DomainAlreadyExists:601,CantInstallPackage:701,CantDeletePackage:702,InvalidPluginPackage:703,UnsupportedPluginPackage:704,LicensingServerIsUnavailable:710,LicensingExpired:711,LicensingBanned:712,DemoSendMessageError:750,DemoAccountError:751,AccountAlreadyExists:801,AccountDoesNotExist:802,MailServerError:901,ClientViewError:902,InvalidInputArgument:903,UnknownNotification:999,UnknownError:999},e.exports=t
}()},function(e,t,i){!function(){"use strict";function t(){this.oScreens={},this.sDefaultScreenName="",this.oCurrentScreen=null}var n=i(2),o=i(12),s=i(3),r=i(77),a=i(41),l=i(7),c=i(20),u=i(1);t.prototype.oScreens={},t.prototype.sDefaultScreenName="",t.prototype.oCurrentScreen=null,t.prototype.hideLoading=function(){o("#rl-loading").hide()},t.prototype.constructorEnd=function(e){u.isFunc(e.__constructor_end)&&e.__constructor_end.call(e)},t.prototype.extendAsViewModel=function(e,t){t&&(t.__names=u.isArray(e)?e:[e],t.__name=t.__names[0])},t.prototype.addSettingsViewModel=function(e,t,i,n,o){e.__rlSettingsData={Label:i,Template:t,Route:n,IsDefault:!!o},l.aViewModels.settings.push(e)},t.prototype.removeSettingsViewModel=function(e){l.aViewModels["settings-removed"].push(e)},t.prototype.disableSettingsViewModel=function(e){l.aViewModels["settings-disabled"].push(e)},t.prototype.routeOff=function(){r.changed.active=!1},t.prototype.routeOn=function(){r.changed.active=!0},t.prototype.screen=function(e){return""===e||u.isUnd(this.oScreens[e])?null:this.oScreens[e]},t.prototype.buildViewModel=function(e,t){if(e&&!e.__builded){var i=this,r=new e(t),a=r.viewModelPosition(),p=o("#rl-content #rl-"+a.toLowerCase()),d=null;e.__builded=!0,e.__vm=r,r.onShowTrigger=s.observable(!1),r.onHideTrigger=s.observable(!1),r.viewModelName=e.__name,r.viewModelNames=e.__names,p&&1===p.length?(d=o("<div></div>").addClass("rl-view-model").addClass("RL-"+r.viewModelTemplate()).hide(),d.appendTo(p),r.viewModelDom=d,e.__dom=d,"Popups"===a&&(r.cancelCommand=r.closeCommand=u.createCommand(r,function(){i.hideScreenPopup(e)}),r.modalVisibility.subscribe(function(e){var t=this;e?(this.viewModelDom.show(),this.storeAndSetKeyScope(),l.popupVisibilityNames.push(this.viewModelName),r.viewModelDom.css("z-index",3e3+l.popupVisibilityNames().length+10),this.onShowTrigger&&this.onShowTrigger(!this.onShowTrigger()),u.delegateRun(this,"onShowWithDelay",[],500)):(u.delegateRun(this,"onHide"),u.delegateRun(this,"onHideWithDelay",[],500),this.onHideTrigger&&this.onHideTrigger(!this.onHideTrigger()),this.restoreKeyScope(),n.each(this.viewModelNames,function(e){c.runHook("view-model-on-hide",[e,t])}),l.popupVisibilityNames.remove(this.viewModelName),r.viewModelDom.css("z-index",2e3),l.tooltipTrigger(!l.tooltipTrigger()),n.delay(function(){t.viewModelDom.hide()},300))},r)),n.each(e.__names,function(e){c.runHook("view-model-pre-build",[e,r,d])}),s.applyBindingAccessorsToNode(d[0],{i18nInit:!0,template:function(){return{name:r.viewModelTemplate()}}},r),u.delegateRun(r,"onBuild",[d]),r&&"Popups"===a&&r.registerPopupKeyDown(),n.each(e.__names,function(e){c.runHook("view-model-post-build",[e,r,d])})):u.log("Cannot find view model position: "+a)}return e?e.__vm:null},t.prototype.hideScreenPopup=function(e){e&&e.__vm&&e.__dom&&e.__vm.modalVisibility(!1)},t.prototype.showScreenPopup=function(e,t){e&&(this.buildViewModel(e),e.__vm&&e.__dom&&(e.__vm.modalVisibility(!0),u.delegateRun(e.__vm,"onShow",t||[]),n.each(e.__names,function(i){c.runHook("view-model-on-show",[i,e.__vm,t||[]])})))},t.prototype.isPopupVisible=function(e){return e&&e.__vm?e.__vm.modalVisibility():!1},t.prototype.screenOnRoute=function(e,t){var i=this,o=null,s=null;""===u.pString(e)&&(e=this.sDefaultScreenName),""!==e&&(o=this.screen(e),o||(o=this.screen(this.sDefaultScreenName),o&&(t=e+"/"+t,e=this.sDefaultScreenName)),o&&o.__started&&(o.__builded||(o.__builded=!0,u.isNonEmptyArray(o.viewModels())&&n.each(o.viewModels(),function(e){this.buildViewModel(e,o)},this),u.delegateRun(o,"onBuild")),n.defer(function(){i.oCurrentScreen&&(u.delegateRun(i.oCurrentScreen,"onHide"),u.delegateRun(i.oCurrentScreen,"onHideWithDelay",[],500),i.oCurrentScreen.onHideTrigger&&i.oCurrentScreen.onHideTrigger(!i.oCurrentScreen.onHideTrigger()),u.isNonEmptyArray(i.oCurrentScreen.viewModels())&&n.each(i.oCurrentScreen.viewModels(),function(e){e.__vm&&e.__dom&&"Popups"!==e.__vm.viewModelPosition()&&(e.__dom.hide(),e.__vm.viewModelVisibility(!1),u.delegateRun(e.__vm,"onHide"),u.delegateRun(e.__vm,"onHideWithDelay",[],500),e.__vm.onHideTrigger&&e.__vm.onHideTrigger(!e.__vm.onHideTrigger()))})),i.oCurrentScreen=o,i.oCurrentScreen&&(u.delegateRun(i.oCurrentScreen,"onShow"),i.oCurrentScreen.onShowTrigger&&i.oCurrentScreen.onShowTrigger(!i.oCurrentScreen.onShowTrigger()),c.runHook("screen-on-show",[i.oCurrentScreen.screenName(),i.oCurrentScreen]),u.isNonEmptyArray(i.oCurrentScreen.viewModels())&&n.each(i.oCurrentScreen.viewModels(),function(e){e.__vm&&e.__dom&&"Popups"!==e.__vm.viewModelPosition()&&(e.__dom.show(),e.__vm.viewModelVisibility(!0),u.delegateRun(e.__vm,"onShow"),e.__vm.onShowTrigger&&e.__vm.onShowTrigger(!e.__vm.onShowTrigger()),u.delegateRun(e.__vm,"onShowWithDelay",[],200),n.each(e.__names,function(t){c.runHook("view-model-on-show",[t,e.__vm])}))},i)),s=o.__cross?o.__cross():null,s&&s.parse(t)})))},t.prototype.startScreens=function(e){o("#rl-content").css({visibility:"hidden"}),n.each(e,function(e){var t=new e,i=t?t.screenName():"";t&&""!==i&&(""===this.sDefaultScreenName&&(this.sDefaultScreenName=i),this.oScreens[i]=t)},this),n.each(this.oScreens,function(e){e&&!e.__started&&e.__start&&(e.__started=!0,e.__start(),c.runHook("screen-pre-start",[e.screenName(),e]),u.delegateRun(e,"onStart"),c.runHook("screen-post-start",[e.screenName(),e]))},this);var t=a.create();t.addRoute(/^([a-zA-Z0-9\-]*)\/?(.*)$/,n.bind(this.screenOnRoute,this)),r.initialized.add(t.parse,t),r.changed.add(t.parse,t),r.init(),o("#rl-content").css({visibility:"visible"}),n.delay(function(){l.$html.removeClass("rl-started-trigger").addClass("rl-started")},100),n.delay(function(){l.$html.addClass("rl-started-delay")},200)},t.prototype.setHash=function(e,t,i){e="#"===e.substr(0,1)?e.substr(1):e,e="/"===e.substr(0,1)?e.substr(1):e,i=u.isUnd(i)?!1:!!i,(u.isUnd(t)?1:!t)?(r.changed.active=!0,r[i?"replaceHash":"setHash"](e),r.setHash(e)):(r.changed.active=!1,r[i?"replaceHash":"setHash"](e),r.changed.active=!0)},e.exports=new t}()},,function(e,t,i){!function(){"use strict";var t={},n=i(11),o=i(2),s=i(12),r=i(3),a=i(19),l=i(4);t.$win=s(n),t.$doc=s(n.document),t.$html=s("html"),t.$div=s("<div></div>"),t.$win.__sizes=[0,0],t.now=(new n.Date).getTime(),t.momentTrigger=r.observable(!0),t.dropdownVisibility=r.observable(!1).extend({rateLimit:0}),t.tooltipTrigger=r.observable(!1).extend({rateLimit:0}),t.useKeyboardShortcuts=r.observable(!0),t.iAjaxErrorCount=0,t.iTokenErrorCount=0,t.iMessageBodyCacheCount=0,t.bUnload=!1,t.sUserAgent="navigator"in n&&"userAgent"in n.navigator&&n.navigator.userAgent.toLowerCase()||"",t.bMobileDevice=/android/i.test(t.sUserAgent)||/iphone/i.test(t.sUserAgent)||/ipod/i.test(t.sUserAgent)||/ipad/i.test(t.sUserAgent)||/blackberry/i.test(t.sUserAgent),t.bDisableNanoScroll=t.bMobileDevice,t.bAllowPdfPreview=!t.bMobileDevice,t.bAnimationSupported=!t.bMobileDevice&&t.$html.hasClass("csstransitions")&&t.$html.hasClass("cssanimations"),t.bXMLHttpRequestSupported=!!n.XMLHttpRequest,t.__APP__=null,t.oHtmlEditorDefaultConfig={title:!1,stylesSet:!1,customConfig:"",contentsCss:"",toolbarGroups:[{name:"spec"},{name:"styles"},{name:"basicstyles",groups:["basicstyles","cleanup","bidi"]},{name:"colors"},{name:"paragraph",groups:["list","indent","blocks","align"]},{name:"links"},{name:"insert"},{name:"document",groups:["mode","document","doctools"]},{name:"others"}],removePlugins:"liststyle",removeButtons:"Format,Undo,Redo,Cut,Copy,Paste,Anchor,Strike,Subscript,Superscript,Image,SelectAll,Source",removeDialogTabs:"link:advanced;link:target;image:advanced;images:advanced",extraPlugins:"plain,signature",allowedContent:!0,extraAllowedContent:!0,forceEnterMode:!0,autoParagraph:!1,fillEmptyBlocks:!1,ignoreEmptyParagraph:!0,font_defaultLabel:"Arial",fontSize_defaultLabel:"13",fontSize_sizes:"10/10px;12/12px;13/13px;14/14px;16/16px;18/18px;20/20px;24/24px;28/28px;36/36px;48/48px"},t.oHtmlEditorLangsMap={bg:"bg",de:"de",es:"es",fr:"fr",hu:"hu",is:"is",it:"it",ja:"ja","ja-jp":"ja",ko:"ko","ko-kr":"ko",lt:"lt",lv:"lv",nl:"nl",no:"no",pl:"pl",pt:"pt","pt-pt":"pt","pt-br":"pt-br",ro:"ro",ru:"ru",sk:"sk",sv:"sv",tr:"tr",ua:"ru",zh:"zh","zh-tw":"zh","zh-cn":"zh-cn"},t.bAllowPdfPreview&&n.navigator&&n.navigator.mimeTypes&&(t.bAllowPdfPreview=!!o.find(n.navigator.mimeTypes,function(e){return e&&"application/pdf"===e.type})),t.aBootstrapDropdowns=[],t.aViewModels={settings:[],"settings-removed":[],"settings-disabled":[]},t.leftPanelDisabled=r.observable(!1),t.popupVisibilityNames=r.observableArray([]),t.popupVisibility=r.computed(function(){return 0<t.popupVisibilityNames().length},this),t.popupVisibility.subscribe(function(e){t.$html.toggleClass("rl-modal",e)}),t.keyScopeReal=r.observable(l.KeyState.All),t.keyScopeFake=r.observable(l.KeyState.All),t.keyScope=r.computed({owner:this,read:function(){return t.keyScopeFake()},write:function(e){l.KeyState.Menu!==e&&(a.filter=l.KeyState.Compose===e?function(){return t.useKeyboardShortcuts()}:function(e){if(t.useKeyboardShortcuts()){var i=e.target||e.srcElement,n=i?i.tagName:"";return n=n.toUpperCase(),!("INPUT"===n||"SELECT"===n||"TEXTAREA"===n||i&&"DIV"===n&&"editorHtmlArea"===i.className&&i.contentEditable)}return!1},t.keyScopeFake(e),t.dropdownVisibility()&&(e=l.KeyState.Menu)),t.keyScopeReal(e)}}),t.keyScopeReal.subscribe(function(e){a.setScope(e)}),t.dropdownVisibility.subscribe(function(e){e?(t.tooltipTrigger(!t.tooltipTrigger()),t.keyScope(l.KeyState.Menu)):l.KeyState.Menu===a.getScope()&&t.keyScope(t.keyScopeFake())}),e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.data=n.rainloopI18N||{},this.notificationI18N={},this.trigger=r.observable(!1),this.i18n=s.bind(this.i18n,this)}var n=i(11),o=i(12),s=i(2),r=i(3),a=i(4),l=i(7);t.prototype.data={},t.prototype.notificationI18N={},t.prototype.i18n=function(e,t,i){var n="",o=s.isUndefined(this.data[e])?s.isUndefined(i)?e:i:this.data[e];if(!s.isUndefined(t)&&!s.isNull(t))for(n in t)s.has(t,n)&&(o=o.replace("%"+n+"%",t[n]));return o},t.prototype.i18nToNode=function(e,t){var i=this;s.defer(function(){o(".i18n",e).each(function(){var e=o(this),t="";t=e.data("i18n-text"),t?e.text(i.i18n(t)):(t=e.data("i18n-html"),t&&e.html(i.i18n(t)),t=e.data("i18n-placeholder"),t&&e.attr("placeholder",i.i18n(t)),t=e.data("i18n-title"),t&&e.attr("title",i.i18n(t)))}),t&&l.bAnimationSupported&&o(".i18n-animation.i18n",e).letterfx({fx:"fall fade",backwards:!1,timing:50,fx_duration:"50ms",letter_end:"restore",element_end:"restore"})})},t.prototype.reloadData=function(){n.rainloopI18N&&(this.data=n.rainloopI18N||{},this.i18nToNode(o(n.document),!0),this.trigger(!this.trigger())),n.rainloopI18N=null},t.prototype.initNotificationLanguage=function(){var e=this.notificationI18N||{};e[a.Notification.InvalidToken]=this.i18n("NOTIFICATIONS/INVALID_TOKEN"),e[a.Notification.AuthError]=this.i18n("NOTIFICATIONS/AUTH_ERROR"),e[a.Notification.AccessError]=this.i18n("NOTIFICATIONS/ACCESS_ERROR"),e[a.Notification.ConnectionError]=this.i18n("NOTIFICATIONS/CONNECTION_ERROR"),e[a.Notification.CaptchaError]=this.i18n("NOTIFICATIONS/CAPTCHA_ERROR"),e[a.Notification.SocialFacebookLoginAccessDisable]=this.i18n("NOTIFICATIONS/SOCIAL_FACEBOOK_LOGIN_ACCESS_DISABLE"),e[a.Notification.SocialTwitterLoginAccessDisable]=this.i18n("NOTIFICATIONS/SOCIAL_TWITTER_LOGIN_ACCESS_DISABLE"),e[a.Notification.SocialGoogleLoginAccessDisable]=this.i18n("NOTIFICATIONS/SOCIAL_GOOGLE_LOGIN_ACCESS_DISABLE"),e[a.Notification.DomainNotAllowed]=this.i18n("NOTIFICATIONS/DOMAIN_NOT_ALLOWED"),e[a.Notification.AccountNotAllowed]=this.i18n("NOTIFICATIONS/ACCOUNT_NOT_ALLOWED"),e[a.Notification.AccountTwoFactorAuthRequired]=this.i18n("NOTIFICATIONS/ACCOUNT_TWO_FACTOR_AUTH_REQUIRED"),e[a.Notification.AccountTwoFactorAuthError]=this.i18n("NOTIFICATIONS/ACCOUNT_TWO_FACTOR_AUTH_ERROR"),e[a.Notification.CouldNotSaveNewPassword]=this.i18n("NOTIFICATIONS/COULD_NOT_SAVE_NEW_PASSWORD"),e[a.Notification.CurrentPasswordIncorrect]=this.i18n("NOTIFICATIONS/CURRENT_PASSWORD_INCORRECT"),e[a.Notification.NewPasswordShort]=this.i18n("NOTIFICATIONS/NEW_PASSWORD_SHORT"),e[a.Notification.NewPasswordWeak]=this.i18n("NOTIFICATIONS/NEW_PASSWORD_WEAK"),e[a.Notification.NewPasswordForbidden]=this.i18n("NOTIFICATIONS/NEW_PASSWORD_FORBIDDENT"),e[a.Notification.ContactsSyncError]=this.i18n("NOTIFICATIONS/CONTACTS_SYNC_ERROR"),e[a.Notification.CantGetMessageList]=this.i18n("NOTIFICATIONS/CANT_GET_MESSAGE_LIST"),e[a.Notification.CantGetMessage]=this.i18n("NOTIFICATIONS/CANT_GET_MESSAGE"),e[a.Notification.CantDeleteMessage]=this.i18n("NOTIFICATIONS/CANT_DELETE_MESSAGE"),e[a.Notification.CantMoveMessage]=this.i18n("NOTIFICATIONS/CANT_MOVE_MESSAGE"),e[a.Notification.CantCopyMessage]=this.i18n("NOTIFICATIONS/CANT_MOVE_MESSAGE"),e[a.Notification.CantSaveMessage]=this.i18n("NOTIFICATIONS/CANT_SAVE_MESSAGE"),e[a.Notification.CantSendMessage]=this.i18n("NOTIFICATIONS/CANT_SEND_MESSAGE"),e[a.Notification.InvalidRecipients]=this.i18n("NOTIFICATIONS/INVALID_RECIPIENTS"),e[a.Notification.CantSaveFilters]=this.i18n("NOTIFICATIONS/CANT_SAVE_FILTERS"),e[a.Notification.CantGetFilters]=this.i18n("NOTIFICATIONS/CANT_GET_FILTERS"),e[a.Notification.FiltersAreNotCorrect]=this.i18n("NOTIFICATIONS/FILTERS_ARE_NOT_CORRECT"),e[a.Notification.CantCreateFolder]=this.i18n("NOTIFICATIONS/CANT_CREATE_FOLDER"),e[a.Notification.CantRenameFolder]=this.i18n("NOTIFICATIONS/CANT_RENAME_FOLDER"),e[a.Notification.CantDeleteFolder]=this.i18n("NOTIFICATIONS/CANT_DELETE_FOLDER"),e[a.Notification.CantDeleteNonEmptyFolder]=this.i18n("NOTIFICATIONS/CANT_DELETE_NON_EMPTY_FOLDER"),e[a.Notification.CantSubscribeFolder]=this.i18n("NOTIFICATIONS/CANT_SUBSCRIBE_FOLDER"),e[a.Notification.CantUnsubscribeFolder]=this.i18n("NOTIFICATIONS/CANT_UNSUBSCRIBE_FOLDER"),e[a.Notification.CantSaveSettings]=this.i18n("NOTIFICATIONS/CANT_SAVE_SETTINGS"),e[a.Notification.CantSavePluginSettings]=this.i18n("NOTIFICATIONS/CANT_SAVE_PLUGIN_SETTINGS"),e[a.Notification.DomainAlreadyExists]=this.i18n("NOTIFICATIONS/DOMAIN_ALREADY_EXISTS"),e[a.Notification.CantInstallPackage]=this.i18n("NOTIFICATIONS/CANT_INSTALL_PACKAGE"),e[a.Notification.CantDeletePackage]=this.i18n("NOTIFICATIONS/CANT_DELETE_PACKAGE"),e[a.Notification.InvalidPluginPackage]=this.i18n("NOTIFICATIONS/INVALID_PLUGIN_PACKAGE"),e[a.Notification.UnsupportedPluginPackage]=this.i18n("NOTIFICATIONS/UNSUPPORTED_PLUGIN_PACKAGE"),e[a.Notification.LicensingServerIsUnavailable]=this.i18n("NOTIFICATIONS/LICENSING_SERVER_IS_UNAVAILABLE"),e[a.Notification.LicensingExpired]=this.i18n("NOTIFICATIONS/LICENSING_EXPIRED"),e[a.Notification.LicensingBanned]=this.i18n("NOTIFICATIONS/LICENSING_BANNED"),e[a.Notification.DemoSendMessageError]=this.i18n("NOTIFICATIONS/DEMO_SEND_MESSAGE_ERROR"),e[a.Notification.DemoAccountError]=this.i18n("NOTIFICATIONS/DEMO_ACCOUNT_ERROR"),e[a.Notification.AccountAlreadyExists]=this.i18n("NOTIFICATIONS/ACCOUNT_ALREADY_EXISTS"),e[a.Notification.AccountDoesNotExist]=this.i18n("NOTIFICATIONS/ACCOUNT_DOES_NOT_EXIST"),e[a.Notification.MailServerError]=this.i18n("NOTIFICATIONS/MAIL_SERVER_ERROR"),e[a.Notification.InvalidInputArgument]=this.i18n("NOTIFICATIONS/INVALID_INPUT_ARGUMENT"),e[a.Notification.UnknownNotification]=this.i18n("NOTIFICATIONS/UNKNOWN_ERROR"),e[a.Notification.UnknownError]=this.i18n("NOTIFICATIONS/UNKNOWN_ERROR")},t.prototype.initOnStartOrLangChange=function(e,t,i){e&&e.call(t),i?this.trigger.subscribe(function(){e&&e.call(t),i.call(t)}):e&&this.trigger.subscribe(e,t)},t.prototype.getNotification=function(e,t){return e=n.parseInt(e,10)||0,a.Notification.ClientViewError===e&&t?t:s.isUndefined(this.notificationI18N[e])?"":this.notificationI18N[e]},t.prototype.getUploadErrorDescByCode=function(e){var t="";switch(n.parseInt(e,10)||0){case a.UploadErrorCode.FileIsTooBig:t=this.i18n("UPLOAD/ERROR_FILE_IS_TOO_BIG");break;case a.UploadErrorCode.FilePartiallyUploaded:t=this.i18n("UPLOAD/ERROR_FILE_PARTIALLY_UPLOADED");break;case a.UploadErrorCode.FileNoUploaded:t=this.i18n("UPLOAD/ERROR_NO_FILE_UPLOADED");break;case a.UploadErrorCode.MissingTempFolder:t=this.i18n("UPLOAD/ERROR_MISSING_TEMP_FOLDER");break;case a.UploadErrorCode.FileOnSaveingError:t=this.i18n("UPLOAD/ERROR_ON_SAVING_FILE");break;case a.UploadErrorCode.FileType:t=this.i18n("UPLOAD/ERROR_FILE_TYPE");break;default:t=this.i18n("UPLOAD/ERROR_UNKNOWN")}return t},t.prototype.reload=function(e,t,n){var r=this,a=o("html"),l=function(){},c=(new Date).getTime();a.addClass("rl-changing-language"),o.ajax({url:i(13).langLink(e),dataType:"script",cache:!0}).fail(n||l).done(function(){s.delay(function(){r.reloadData(),(t||l)(),a.removeClass("rl-changing-language")},500<(new Date).getTime()-c?1:500)})},e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){this.oSettings=n.rainloopAppData||{},this.oSettings=o.isNormal(this.oSettings)?this.oSettings:{}}var n=i(11),o=i(1);t.prototype.oSettings=null,t.prototype.settingsGet=function(e){return o.isUnd(this.oSettings[e])?null:this.oSettings[e]},t.prototype.settingsSet=function(e,t){this.oSettings[e]=t},t.prototype.capa=function(e){var t=this.settingsGet("Capa");return o.isArray(t)&&o.isNormal(e)&&-1<o.inArray(e,t)},e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(e,t){this.bDisabeCloseOnEsc=!1,this.sPosition=s.pString(e),this.sTemplate=s.pString(t),this.sDefaultKeyScope=o.KeyState.None,this.sCurrentKeyScope=this.sDefaultKeyScope,this.viewModelVisibility=n.observable(!1),this.modalVisibility=n.observable(!1).extend({rateLimit:0}),this.viewModelName="",this.viewModelNames=[],this.viewModelDom=null}var n=i(3),o=i(4),s=i(1),r=i(7);t.prototype.bDisabeCloseOnEsc=!1,t.prototype.sPosition="",t.prototype.sTemplate="",t.prototype.sDefaultKeyScope=o.KeyState.None,t.prototype.sCurrentKeyScope=o.KeyState.None,t.prototype.viewModelName="",t.prototype.viewModelNames=[],t.prototype.viewModelDom=null,t.prototype.viewModelTemplate=function(){return this.sTemplate},t.prototype.viewModelPosition=function(){return this.sPosition},t.prototype.cancelCommand=function(){},t.prototype.closeCommand=function(){},t.prototype.storeAndSetKeyScope=function(){this.sCurrentKeyScope=r.keyScope(),r.keyScope(this.sDefaultKeyScope)},t.prototype.restoreKeyScope=function(){r.keyScope(this.sCurrentKeyScope)},t.prototype.registerPopupKeyDown=function(){var e=this;r.$win.on("keydown",function(t){if(t&&e.modalVisibility&&e.modalVisibility()){if(!this.bDisabeCloseOnEsc&&o.EventKeyCode.Esc===t.keyCode)return s.delegateRun(e,"cancelCommand"),!1;if(o.EventKeyCode.Backspace===t.keyCode&&!s.inFocus())return!1}return!0})},e.exports=t}()},function(e){e.exports=window},function(e){e.exports=window.jQuery},function(e,t,i){!function(){"use strict";function t(){var e=i(9);this.sBase="#/",this.sServer="./?",this.sSubQuery="&s=/",this.sSubSubQuery="&ss=/",this.sVersion=e.settingsGet("Version"),this.sSpecSuffix=e.settingsGet("AuthAccountHash")||"0",this.sWebPrefix=e.settingsGet("WebPath")||"",this.sVersionPrefix=e.settingsGet("WebVersionPath")||"rainloop/v/"+this.sVersion+"/",this.sStaticPrefix=this.sVersionPrefix+"static/"}var n=i(11),o=i(1);t.prototype.root=function(){return this.sBase},t.prototype.rootAdmin=function(){return this.sServer+"/Admin/"},t.prototype.attachmentDownload=function(e){return this.sServer+"/Raw/"+this.sSubQuery+this.sSpecSuffix+"/Download/"+this.sSubSubQuery+e},t.prototype.attachmentPreview=function(e){return this.sServer+"/Raw/"+this.sSubQuery+this.sSpecSuffix+"/View/"+this.sSubSubQuery+e},t.prototype.attachmentThumbnailPreview=function(e){return this.sServer+"/Raw/"+this.sSubQuery+this.sSpecSuffix+"/ViewThumbnail/"+this.sSubSubQuery+e},t.prototype.attachmentPreviewAsPlain=function(e){return this.sServer+"/Raw/"+this.sSubQuery+this.sSpecSuffix+"/ViewAsPlain/"+this.sSubSubQuery+e},t.prototype.attachmentFramed=function(e){return this.sServer+"/Raw/"+this.sSubQuery+this.sSpecSuffix+"/FramedView/"+this.sSubSubQuery+e},t.prototype.upload=function(){return this.sServer+"/Upload/"+this.sSubQuery+this.sSpecSuffix+"/"},t.prototype.uploadContacts=function(){return this.sServer+"/UploadContacts/"+this.sSubQuery+this.sSpecSuffix+"/"},t.prototype.uploadBackground=function(){return this.sServer+"/UploadBackground/"+this.sSubQuery+this.sSpecSuffix+"/"},t.prototype.append=function(){return this.sServer+"/Append/"+this.sSubQuery+this.sSpecSuffix+"/"},t.prototype.change=function(e){return this.sServer+"/Change/"+this.sSubQuery+this.sSpecSuffix+"/"+o.encodeURIComponent(e)+"/"},t.prototype.ajax=function(e){return this.sServer+"/Ajax/"+this.sSubQuery+this.sSpecSuffix+"/"+e},t.prototype.messageViewLink=function(e){return this.sServer+"/Raw/"+this.sSubQuery+this.sSpecSuffix+"/ViewAsPlain/"+this.sSubSubQuery+e},t.prototype.messageDownloadLink=function(e){return this.sServer+"/Raw/"+this.sSubQuery+this.sSpecSuffix+"/Download/"+this.sSubSubQuery+e},t.prototype.avatarLink=function(e){return this.sServer+"/Raw/0/Avatar/"+o.encodeURIComponent(e)+"/"},t.prototype.publicLink=function(e){return this.sServer+"/Raw/0/Public/"+e+"/"},t.prototype.userBackground=function(e){return this.sServer+"/Raw/"+this.sSubQuery+this.sSpecSuffix+"/UserBackground/"+this.sSubSubQuery+e},t.prototype.inbox=function(e){return e=o.isUnd(e)?"INBOX":e,this.sBase+"mailbox/"+e},t.prototype.messagePreview=function(){return this.sBase+"mailbox/message-preview"},t.prototype.settings=function(e){var t=this.sBase+"settings";return o.isUnd(e)||""===e||(t+="/"+e),t},t.prototype.about=function(){return this.sBase+"about"},t.prototype.admin=function(e){var t=this.sBase;switch(e){case"AdminDomains":t+="domains";break;case"AdminSecurity":t+="security";break;case"AdminLicensing":t+="licensing"}return t},t.prototype.mailBox=function(e,t,i){t=o.isNormal(t)?o.pInt(t):1,i=o.pString(i);var n=this.sBase+"mailbox/";return""!==e&&(n+=encodeURI(e)),t>1&&(n=n.replace(/[\/]+$/,""),n+="/p"+t),""!==i&&(n=n.replace(/[\/]+$/,""),n+="/"+encodeURI(i)),n},t.prototype.phpInfo=function(){return this.sServer+"Info"},t.prototype.langLink=function(e){return this.sServer+"/Lang/0/"+encodeURI(e)+"/"+this.sVersion+"/"},t.prototype.exportContactsVcf=function(){return this.sServer+"/Raw/"+this.sSubQuery+this.sSpecSuffix+"/ContactsVcf/"},t.prototype.exportContactsCsv=function(){return this.sServer+"/Raw/"+this.sSubQuery+this.sSpecSuffix+"/ContactsCsv/"},t.prototype.emptyContactPic=function(){return this.sStaticPrefix+"css/images/empty-contact.png"},t.prototype.sound=function(e){return this.sStaticPrefix+"sounds/"+e},t.prototype.themePreviewLink=function(e){var t=this.sVersionPrefix;return"@custom"===e.substr(-7)&&(e=o.trim(e.substring(0,e.length-7)),t=this.sWebPrefix),t+"themes/"+n.encodeURI(e)+"/images/preview.png"},t.prototype.notificationMailIcon=function(){return this.sStaticPrefix+"css/images/icom-message-notification.png"},t.prototype.openPgpJs=function(){return this.sStaticPrefix+"js/min/openpgp.js"},t.prototype.socialGoogle=function(){return this.sServer+"SocialGoogle"+(""!==this.sSpecSuffix?"/"+this.sSubQuery+this.sSpecSuffix+"/":"")},t.prototype.socialTwitter=function(){return this.sServer+"SocialTwitter"+(""!==this.sSpecSuffix?"/"+this.sSubQuery+this.sSpecSuffix+"/":"")},t.prototype.socialFacebook=function(){return this.sServer+"SocialFacebook"+(""!==this.sSpecSuffix?"/"+this.sSubQuery+this.sSpecSuffix+"/":"")},e.exports=new t}()},,function(e,t,i){(function(e){!function(){"use strict";var t={};t.Values={},t.DataImages={},t.Defaults={},t.Defaults.MessagesPerPage=20,t.Defaults.ContactsPerPage=50,t.Defaults.MessagesPerPageArray=[10,20,30,50,100],t.Defaults.DefaultAjaxTimeout=3e4,t.Defaults.SearchAjaxTimeout=3e5,t.Defaults.SendMessageAjaxTimeout=3e5,t.Defaults.SaveMessageAjaxTimeout=2e5,t.Defaults.ContactsSyncAjaxTimeout=2e5,t.Values.UnuseOptionValue="__UNUSE__",t.Values.ClientSideStorageIndexName="rlcsc",t.Values.ImapDefaulPort=143,t.Values.ImapDefaulSecurePort=993,t.Values.SieveDefaulPort=4190,t.Values.SmtpDefaulPort=25,t.Values.SmtpDefaulSecurePort=465,t.Values.MessageBodyCacheLimit=15,t.Values.AjaxErrorLimit=7,t.Values.TokenErrorLimit=10,t.Values.RainLoopTrialKey="RAINLOOP-TRIAL-KEY",t.DataImages.UserDotPic="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAHHklEQVRoQ7VZW08bVxCeXRuwIbTGXIwNtBBaqjwgVUiR8lDlbza9qe1DpVZ9aNQ/0KpPeaJK07SpcuEeCEmUAObm21bfrL9lONjexSYrWfbunj37zXdmvpkz9oIgCKTD0Wg0xPd94TDP83Q0zvWa50vzklSrdanVanqf4/D84GBGr+F+Op3S8fqoJxLOdnZgTvsO/nYhenHA+UC7CWF1uXwkb9++ldPTUwVerVbVqFQqpR8YPjQ0JCMjI5LNDijoRgP3PQVu5+5Eor2XGLg7IV4GkIdHJ/LmzRs5ODiIwNbrdR0O0GCcq4Xz4eFhmZyclP7+tDQaIik/BG5XKQn4SwG3zJTLZXn9+rUclI8UHD5YVoDDN8bSzXhONwL48fFxGR4eilzFZT1uFRIB5yT8BqCdnR3Z3d0VP9Un6XRawYJpggVrZBv38ME4XKtUKnLt2jUplUoy1PR/l3U7T6sVSAQcgMAkj8PDQ9ne3pajoyMRL7zeKsYZWHgWYDGmv78/mmdwcFA+mJlSgziHDWrERrsjEXDXegTi1tZW+DLxI2bxIrqFNYTXyDyCFweMAHCwb8e4RnTNuOsqe3t7sra21pTD0Kct666E8XlcZyzw9/RUUXK5nK5oUinUQI6TQ3cynO/v78vq6qrKXCNwlTiJJpyNGc3nZHp6uqV2dwrQWOCtZBDAV1ZWwsQk7f0wiQn5kffbAu/0/KWBYzIC1+XukfGx0RGZmppKlC2tIV0Bh4aDcZW7HhkfH8urLLZL7T2pihvlkMNnz56FiadHxicL41IsFpN41bkxsYxbRdFo9jwB8KdPn14J8KnSpBQKhQs63nPmbCVRcBUAR2Lq1VVmpksyMTFxAXjcEsQybiegESionjx5osCZOeNe1O4+EhCAX7bQSgQcxRHTMgAgcz5+/Dis/hL4uHU3/B4YGNASGHIKxuEql0k+l05AeIAF1vPnz5VxFFmdDlaJrMtZITJeSsXCOTlMunKxjLtMYOKNjQ158eJFuAuKkUOb5sEwgff19SkJUBVkThZUbnXZrtCKBQ6gbnWIkjZpyne3ejAWoGnA7Icz6irvBLgbOMicCM6TkxPx/LAkbXfgWcsazuE2kFRsKD5Z+CiqDumKncpZvieWcS6dDVD8xiYCNflpJdwcdwJOf9airLmVQ7DPzMxIYWLsXGXoVqLt5k0M3K3JUVPDZdbWNzsCp48TPFdvdnZWUz32nDha7bJ63kgAJPzSdRks9/Kf9xMJAQ1gq2NpaUmy2Yz4zar4nQC3xb99AQwCcGzLAAwuhG8YiWvcOKts+r4GOe5nMhm5efOm9lUA3E3vSZJRrKvE0fnPv//Jy5cvo5cTHIPQbSjhOoqq69evS19f6lxDKK4+sVhigZPtKJqbrQeqxd5+WR4+fKgqgT0k2XX3nhiPgETWXFhYkFzuPZ2yVq1GTSOXpE47/VjgNnD4m4GG7/LhsTx69EiwD4Vr2MwIIxgbAH18fKx1yfz8vEogNvGtWnCuhLZa9UTAreVWFsHy/b/+Vrbdl7E5REMQD2jDoUbByty+/ZnU64GkU2HzyJLhktU1cLv8nARgkYS2d3ajAgwG8qU2oLmDZ92CMaOjo7K4uCiZgbDWaRWgnZhPxLhrMUCvr69riwKZk1LHF7XqrWAO9hJxH6ozNzcnCx/PqztZg9mf6SQMscCtm2C5ke4BGMlHWTUp36036AJajDVrFMzBrhhWslQsSrFYiOqVpMriNYIgqFRq2j3FAb/zffT6zuxFXxsNzs3NTXn16lW4gYiW96w1FyedF+83xG/2FNGCRpU4NjamMsn+OZ9xE5RXqdaDdPpib6RWCzuwKF9RxqI2AVNQBwQYJoK0wdBejnqtEikP3pfP51XjUTESl12FqJEKxsEorARYDD44ONTeID7YpsEnrRvQfWAI2e8WfDaTUSIwJ0iBCmFOtOUAHvVMPp/TPwvYFVYFIuP8l+DBgwdaa2Miqwa0GgYwfeMltovbDfh6c1vIgMYcliSsKv4IWFr6VDHxvldvBAH+1sA+cnl5WYOPmmr9ir+1l9I0Cgz0yjhXjfJJ0JROnmezWbl165ayr/5fqwcBNr7IfhjMqKcvESSM4eRcCasQ3bDNObmKPLdGUGpZsN24cUNLBm9zazu4d++e6qpNBFaTuUS26U5dpuR1CxyA7J9ddrMRqlz4pwLLYawymPd++/2PADt2ugcGwq9gCCdhQ96C6xWwa6j1ceuq+I0EhW0i8MAIVJfeL3d/DVD8EKi12P6/2S2jV/EccVB54O/ejz/9HGCpoBBMta5rXMXLu53D1XAwjhXwvvv+h4BAXVe4bOu3O3ChxF08LiZFG3fel199G9CH3fLyqv24NcB44MRhpdK788U3CpyKwsCw590xmfSpzsBt0Fqc3ud3vtZigxWcVZCklVpSiN0w3q5E/h9TGMIUuA3+EQAAAABJRU5ErkJggg==",t.DataImages.TranspPic="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=",e.exports=t}(e)}).call(t,i(71)(e))},function(e,t,i){!function(){"use strict";function t(){y.call(this,v)}var n=i(11),o=i(2),s=i(3),r=i(76),a=i(4),l=i(1),c=i(13),u=i(8),p=i(9),d=i(37),h=i(61),g=i(64),m=i(62),f=i(63),b=i(82),v=i(17),S=i(5),y=i(47);o.extend(t.prototype,y.prototype),t.prototype.remote=function(){return v},t.prototype.reloadDomainList=function(){h.domains.loading(!0),v.domainList(function(e,t){if(h.domains.loading(!1),a.StorageResultType.Success===e&&t&&t.Result){var i=o.map(t.Result,function(e,t){return{name:t,disabled:s.observable(!e),deleteAccess:s.observable(!1)}},this);h.domains(i)}})},t.prototype.reloadPluginList=function(){g.plugins.loading(!0),v.pluginList(function(e,t){if(g.plugins.loading(!1),a.StorageResultType.Success===e&&t&&t.Result){var i=o.map(t.Result,function(e){return{name:e.Name,disabled:s.observable(!e.Enabled),configured:s.observable(!!e.Configured)}},this);g.plugins(i)}})},t.prototype.reloadPackagesList=function(){f.packages.loading(!0),f.packagesReal(!0),v.packagesList(function(e,t){if(f.packages.loading(!1),a.StorageResultType.Success===e&&t&&t.Result){f.packagesReal(!!t.Result.Real),f.packagesMainUpdatable(!!t.Result.MainUpdatable);var i=[],n={};o.each(f.packages(),function(e){e&&e.loading()&&(n[e.file]=e)}),l.isArray(t.Result.List)&&(i=o.compact(o.map(t.Result.List,function(e){return e?(e.loading=s.observable(!l.isUnd(n[e.file])),"core"!==e.type||e.canBeInstalled?e:null):null}))),f.packages(i)}else f.packagesReal(!1)})},t.prototype.updateCoreData=function(){b.coreUpdating(!0),v.updateCoreData(function(e,t){b.coreUpdating(!1),b.coreVersion(""),b.coreRemoteVersion(""),b.coreRemoteRelease(""),b.coreVersionCompare(-2),a.StorageResultType.Success===e&&t&&t.Result?(b.coreReal(!0),n.location.reload()):b.coreReal(!1)})},t.prototype.reloadCoreData=function(){b.coreChecking(!0),b.coreReal(!0),v.coreData(function(e,t){b.coreChecking(!1),a.StorageResultType.Success===e&&t&&t.Result?(b.coreReal(!!t.Result.Real),b.coreChannel(t.Result.Channel||"stable"),b.coreType(t.Result.Type||"stable"),b.coreUpdatable(!!t.Result.Updatable),b.coreAccess(!!t.Result.Access),b.coreWarning(!!t.Result.Warning),b.coreVersion(t.Result.Version||""),b.coreRemoteVersion(t.Result.RemoteVersion||""),b.coreRemoteRelease(t.Result.RemoteRelease||""),b.coreVersionCompare(l.pInt(t.Result.VersionCompare))):(b.coreReal(!1),b.coreChannel("stable"),b.coreType("stable"),b.coreWarning(!1),b.coreVersion(""),b.coreRemoteVersion(""),b.coreRemoteRelease(""),b.coreVersionCompare(-2))})},t.prototype.reloadLicensing=function(e){e=l.isUnd(e)?!1:!!e,m.licensingProcess(!0),m.licenseError(""),v.licensing(function(e,t){m.licensingProcess(!1),a.StorageResultType.Success===e&&t&&t.Result&&l.isNormal(t.Result.Expired)?(m.licenseValid(!0),m.licenseExpired(l.pInt(t.Result.Expired)),m.licenseError(""),m.licensing(!0),d.prem(!0)):t&&t.ErrorCode&&-1<l.inArray(l.pInt(t.ErrorCode),[a.Notification.LicensingServerIsUnavailable,a.Notification.LicensingExpired])?(m.licenseError(u.getNotification(l.pInt(t.ErrorCode))),m.licensing(!0)):a.StorageResultType.Abort===e?(m.licenseError(u.getNotification(a.Notification.LicensingServerIsUnavailable)),m.licensing(!0)):m.licensing(!1)},e)},t.prototype.bootstart=function(){y.prototype.bootstart.call(this),i(37).populate(),i(43).populate(),S.hideLoading(),p.settingsGet("AllowAdminPanel")?S.startScreens(p.settingsGet("Auth")?[i(108)]:[i(107)]):(S.routeOff(),S.setHash(c.root(),!0),S.routeOff(),o.defer(function(){n.location.href="/"})),r&&r.set(100)},e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){o.call(this),this.oRequests={}}var n=i(2),o=i(59);n.extend(t.prototype,o.prototype),t.prototype.adminLogin=function(e,t,i){this.defaultRequest(e,"AdminLogin",{Login:t,Password:i})},t.prototype.adminLogout=function(e){this.defaultRequest(e,"AdminLogout")},t.prototype.saveAdminConfig=function(e,t){this.defaultRequest(e,"AdminSettingsUpdate",t)},t.prototype.domainList=function(e){this.defaultRequest(e,"AdminDomainList")},t.prototype.pluginList=function(e){this.defaultRequest(e,"AdminPluginList")},t.prototype.packagesList=function(e){this.defaultRequest(e,"AdminPackagesList")},t.prototype.coreData=function(e){this.defaultRequest(e,"AdminCoreData")},t.prototype.updateCoreData=function(e){this.defaultRequest(e,"AdminUpdateCoreData",{},9e4)},t.prototype.packageInstall=function(e,t){this.defaultRequest(e,"AdminPackageInstall",{Id:t.id,Type:t.type,File:t.file},6e4)},t.prototype.packageDelete=function(e,t){this.defaultRequest(e,"AdminPackageDelete",{Id:t.id})},t.prototype.domain=function(e,t){this.defaultRequest(e,"AdminDomainLoad",{Name:t})},t.prototype.plugin=function(e,t){this.defaultRequest(e,"AdminPluginLoad",{Name:t})},t.prototype.domainDelete=function(e,t){this.defaultRequest(e,"AdminDomainDelete",{Name:t})},t.prototype.domainDisable=function(e,t,i){return this.defaultRequest(e,"AdminDomainDisable",{Name:t,Disabled:i?"1":"0"})},t.prototype.pluginSettingsUpdate=function(e,t){return this.defaultRequest(e,"AdminPluginSettingsUpdate",t)},t.prototype.licensing=function(e,t){return this.defaultRequest(e,"AdminLicensing",{Force:t?"1":"0"})},t.prototype.licensingActivate=function(e,t,i){return this.defaultRequest(e,"AdminLicensingActivate",{Domain:t,Key:i})},t.prototype.pluginDisable=function(e,t,i){return this.defaultRequest(e,"AdminPluginDisable",{Name:t,Disabled:i?"1":"0"})
},t.prototype.createOrUpdateDomain=function(e,t,i,n,o,s,r,a,l,c,u,p,d,h,g,m,f,b,v){this.defaultRequest(e,"AdminDomainSave",{Create:t?"1":"0",Name:i,IncHost:n,IncPort:o,IncSecure:s,IncShortLogin:r?"1":"0",UseSieve:a?"1":"0",SieveAllowRaw:l?"1":"0",SieveHost:c,SievePort:u,SieveSecure:p,OutHost:d,OutPort:h,OutSecure:g,OutShortLogin:m?"1":"0",OutAuth:f?"1":"0",OutUsePhpMail:b?"1":"0",WhiteList:v})},t.prototype.testConnectionForDomain=function(e,t,i,n,o,s,r,a,l,c,u,p,d,h){this.defaultRequest(e,"AdminDomainTest",{Name:t,IncHost:i,IncPort:n,IncSecure:o,UseSieve:s?"1":"0",SieveHost:r,SievePort:a,SieveSecure:l,OutHost:c,OutPort:u,OutSecure:p,OutAuth:d?"1":"0",OutUsePhpMail:h?"1":"0"})},t.prototype.testContacts=function(e,t){this.defaultRequest(e,"AdminContactsTest",t)},t.prototype.saveNewAdminPassword=function(e,t){this.defaultRequest(e,"AdminPasswordUpdate",t)},t.prototype.adminPing=function(e){this.defaultRequest(e,"AdminPing")},e.exports=new t}()},,function(e){e.exports=window.key},function(e,t,i){!function(){"use strict";function t(){this.oSettings=i(9),this.oSimpleHooks={},this.aUserViewModelsHooks=[],this.aAdminViewModelsHooks=[]}var n=i(2),o=i(7),s=i(1);t.prototype.oSettings={},t.prototype.aUserViewModelsHooks=[],t.prototype.aAdminViewModelsHooks=[],t.prototype.oSimpleHooks={},t.prototype.addHook=function(e,t){s.isFunc(t)&&(s.isArray(this.oSimpleHooks[e])||(this.oSimpleHooks[e]=[]),this.oSimpleHooks[e].push(t))},t.prototype.runHook=function(e,t){s.isArray(this.oSimpleHooks[e])&&(t=t||[],n.each(this.oSimpleHooks[e],function(e){e.apply(null,t)}))},t.prototype.mainSettingsGet=function(e){return this.oSettings.settingsGet(e)},t.prototype.remoteRequest=function(e,t,i,n){o.__APP__&&o.__APP__.remote().defaultRequest(e,"Plugin"+t,i,n)},t.prototype.addSettingsViewModel=function(e,t,i,n){this.aUserViewModelsHooks.push([e,t,i,n])},t.prototype.addSettingsViewModelForAdmin=function(e,t,i,n){this.aAdminViewModelsHooks.push([e,t,i,n])},t.prototype.runSettingsViewModelHooks=function(e){n.each(e?this.aAdminViewModelsHooks:this.aUserViewModelsHooks,function(e){i(5).addSettingsViewModel(e[0],e[1],e[2],e[3])})},t.prototype.settingsGet=function(e,t){var i=this.oSettings.settingsGet("Plugins");return i=i&&!s.isUnd(i[e])?i[e]:null,i?s.isUnd(i[t])?null:i[t]:null},e.exports=new t}()},,,,,function(e,t,i){!function(){"use strict";function t(e,t,i,n){this.email=e||"",this.name=t||"",this.dkimStatus=i||"none",this.dkimValue=n||"",this.clearDuplicateName()}var n=i(1);t.newInstanceFromJson=function(e){var i=new t;return i.initByJson(e)?i:null},t.prototype.name="",t.prototype.email="",t.prototype.dkimStatus="none",t.prototype.dkimValue="",t.prototype.clear=function(){this.email="",this.name="",this.dkimStatus="none",this.dkimValue=""},t.prototype.validate=function(){return""!==this.name||""!==this.email},t.prototype.hash=function(e){return"#"+(e?"":this.name)+"#"+this.email+"#"},t.prototype.clearDuplicateName=function(){this.name===this.email&&(this.name="")},t.prototype.search=function(e){return-1<(this.name+" "+this.email).toLowerCase().indexOf(e.toLowerCase())},t.prototype.parse=function(e){this.clear(),e=n.trim(e);var t=/(?:"([^"]+)")? ?[<]?(.*?@[^>,]+)>?,? ?/g,i=t.exec(e);i?(this.name=i[1]||"",this.email=i[2]||"",this.clearDuplicateName()):/^[^@]+@[^@]+$/.test(e)&&(this.name="",this.email=e)},t.prototype.initByJson=function(e){var t=!1;return e&&"Object/Email"===e["@Object"]&&(this.name=n.trim(e.Name),this.email=n.trim(e.Email),this.dkimStatus=n.trim(e.DkimStatus||""),this.dkimValue=n.trim(e.DkimValue||""),t=""!==this.email,this.clearDuplicateName()),t},t.prototype.toLine=function(e,t,i){var o="";return""!==this.email&&(t=n.isUnd(t)?!1:!!t,i=n.isUnd(i)?!1:!!i,e&&""!==this.name?o=t?'<a href="mailto:'+n.encodeHtml('"'+this.name+'" <'+this.email+">")+'" target="_blank" tabindex="-1">'+n.encodeHtml(this.name)+"</a>":i?n.encodeHtml(this.name):this.name:(o=this.email,""!==this.name?t?o=n.encodeHtml('"'+this.name+'" <')+'<a href="mailto:'+n.encodeHtml('"'+this.name+'" <'+this.email+">")+'" target="_blank" tabindex="-1">'+n.encodeHtml(o)+"</a>"+n.encodeHtml(">"):(o='"'+this.name+'" <'+o+">",i&&(o=n.encodeHtml(o))):t&&(o='<a href="mailto:'+n.encodeHtml(this.email)+'" target="_blank" tabindex="-1">'+n.encodeHtml(this.email)+"</a>"))),o},t.prototype.mailsoParse=function(e){if(e=n.trim(e),""===e)return!1;for(var t=function(e,t,i){e+="";var n=e.length;return 0>t&&(t+=n),n="undefined"==typeof i?n:0>i?i+n:i+t,t>=e.length||0>t||t>n?!1:e.slice(t,n)},i=function(e,t,i,n){return 0>i&&(i+=e.length),n=void 0!==n?n:e.length,0>n&&(n=n+e.length-i),e.slice(0,i)+t.substr(0,n)+t.slice(n)+e.slice(i+n)},o="",s="",r="",a=!1,l=!1,c=!1,u=null,p=0,d=0,h=0;h<e.length;){switch(e.substr(h,1)){case'"':a||l||c?l||c||(d=h,o=t(e,p+1,d-p-1),e=i(e,"",p,d-p+1),d=0,h=0,p=0,a=!1):(a=!0,p=h);break;case"<":a||l||c||(h>0&&0===o.length&&(o=t(e,0,h)),l=!0,p=h);break;case">":l&&(d=h,s=t(e,p+1,d-p-1),e=i(e,"",p,d-p+1),d=0,h=0,p=0,l=!1);break;case"(":a||l||c||(c=!0,p=h);break;case")":c&&(d=h,r=t(e,p+1,d-p-1),e=i(e,"",p,d-p+1),d=0,h=0,p=0,c=!1);break;case"\\":h++}h++}return 0===s.length&&(u=e.match(/[^@\s]+@\S+/i),u&&u[0]?s=u[0]:o=e),s.length>0&&0===o.length&&0===r.length&&(o=e.replace(s,"")),s=n.trim(s).replace(/^[<]+/,"").replace(/[>]+$/,""),o=n.trim(o).replace(/^["']+/,"").replace(/["']+$/,""),r=n.trim(r).replace(/^[(]+/,"").replace(/[)]+$/,""),o=o.replace(/\\\\(.)/g,"$1"),r=r.replace(/\\\\(.)/g,"$1"),this.name=o,this.email=s,this.clearDuplicateName(),!0},e.exports=t}()},,,function(e,t,i){!function(){"use strict";function t(){this.oSubs={}}var n=i(2),o=i(1),s=i(20);t.prototype.oSubs={},t.prototype.sub=function(e,t,i){return o.isObject(e)?(i=t||null,t=null,n.each(e,function(e,t){this.sub(t,e,i)},this)):(o.isUnd(this.oSubs[e])&&(this.oSubs[e]=[]),this.oSubs[e].push([t,i])),this},t.prototype.pub=function(e,t){return s.runHook("rl-pub",[e,t]),o.isUnd(this.oSubs[e])||n.each(this.oSubs[e],function(e){e[0]&&e[0].apply(e[1]||null,t||[])}),this},e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){this.disposable=[]}var n=i(2),o=i(3),s=i(1);t.prototype.disposable=[],t.prototype.dispose=function(){n.each(this.disposable,function(e){e&&e.dispose&&e.dispose()})},t.componentExportHelper=function(e,t){return{viewModel:{createViewModel:function(t,n){return t=t||{},t.element=null,n.element&&(t.element=$(n.element),i(8).i18nToNode(t.element),!s.isUnd(t.inline)&&o.unwrap(t.inline)&&t.element.css("display","inline-block")),new e(t)}},template:{element:t}}},e.exports=t}()},,,function(e,t,i){!function(){"use strict";function t(){this.languages=n.observableArray([]),this.language=n.observable("").extend({limitedList:this.languages})}var n=i(3),o=i(1),s=i(9);t.prototype.populate=function(){var e=s.settingsGet("Languages");this.languages(o.isArray(e)?e:[]),this.language(s.settingsGet("Language"))},e.exports=new t}()},function(e){e.exports=window.moment},function(e,t,i){!function(){"use strict";function t(e){a.call(this),this.value=e.value||"",this.size=e.size||0,this.label=e.label||"",this.preLabel=e.preLabel||"",this.enable=r.isUnd(e.enable)?!0:e.enable,this.trigger=e.trigger&&e.trigger.subscribe?e.trigger:null,this.placeholder=e.placeholder||"",this.labeled=!r.isUnd(e.label),this.preLabeled=!r.isUnd(e.preLabel),this.triggered=!r.isUnd(e.trigger)&&!!this.trigger,this.classForTrigger=o.observable(""),this.className=o.computed(function(){var e=o.unwrap(this.size),t=this.trigger?" "+r.trim("settings-saved-trigger-input "+this.classForTrigger()):"";return(e>0?"span"+e:"")+t},this),!r.isUnd(e.width)&&e.element&&e.element.find("input,select,textarea").css("width",e.width),this.disposable.push(this.className),this.trigger&&(this.setTriggerState(this.trigger()),this.disposable.push(this.trigger.subscribe(this.setTriggerState,this)))}var n=i(2),o=i(3),s=i(4),r=i(1),a=i(29);t.prototype.setTriggerState=function(e){switch(r.pInt(e)){case s.SaveSettingsStep.TrueResult:this.classForTrigger("success");break;case s.SaveSettingsStep.FalseResult:this.classForTrigger("error");break;default:this.classForTrigger("")}},n.extend(t.prototype,a.prototype),t.componentExportHelper=a.componentExportHelper,e.exports=t}()},function(e,t,i){!function(){"use strict";function t(e,t){this.sScreenName=e,this.aViewModels=s.isArray(t)?t:[]}var n=i(2),o=i(41),s=i(1);t.prototype.oCross=null,t.prototype.sScreenName="",t.prototype.aViewModels=[],t.prototype.viewModels=function(){return this.aViewModels},t.prototype.screenName=function(){return this.sScreenName},t.prototype.routes=function(){return null},t.prototype.__cross=function(){return this.oCross},t.prototype.__start=function(){var e=this.routes(),t=null,i=null;s.isNonEmptyArray(e)&&(i=n.bind(this.onRoute||s.emptyFunction,this),t=o.create(),n.each(e,function(e){t.addRoute(e[0],i).rules=e[1]}),this.oCross=t)},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.google={},this.twitter={},this.facebook={},this.dropbox={},this.google.enabled=n.observable(!1),this.google.clientID=n.observable(""),this.google.clientSecret=n.observable(""),this.google.apiKey=n.observable(""),this.google.loading=n.observable(!1),this.google.userName=n.observable(""),this.google.loggined=n.computed(function(){return""!==this.google.userName()},this),this.google.capa={},this.google.capa.auth=n.observable(!1),this.google.capa.drive=n.observable(!1),this.google.capa.preview=n.observable(!1),this.google.require={},this.google.require.clientSettings=n.computed(function(){return this.google.enabled()&&(this.google.capa.auth()||this.google.capa.drive())},this),this.google.require.apiKeySettings=n.computed(function(){return this.google.enabled()&&this.google.capa.drive()},this),this.facebook.enabled=n.observable(!1),this.facebook.appID=n.observable(""),this.facebook.appSecret=n.observable(""),this.facebook.loading=n.observable(!1),this.facebook.userName=n.observable(""),this.facebook.supported=n.observable(!1),this.facebook.loggined=n.computed(function(){return""!==this.facebook.userName()},this),this.twitter.enabled=n.observable(!1),this.twitter.consumerKey=n.observable(""),this.twitter.consumerSecret=n.observable(""),this.twitter.loading=n.observable(!1),this.twitter.userName=n.observable(""),this.twitter.loggined=n.computed(function(){return""!==this.twitter.userName()},this),this.dropbox.enabled=n.observable(!1),this.dropbox.apiKey=n.observable("")}var n=i(3);t.prototype.google={},t.prototype.twitter={},t.prototype.facebook={},t.prototype.dropbox={},t.prototype.populate=function(){var e=i(9);this.google.enabled(!!e.settingsGet("AllowGoogleSocial")),this.google.clientID(e.settingsGet("GoogleClientID")),this.google.clientSecret(e.settingsGet("GoogleClientSecret")),this.google.apiKey(e.settingsGet("GoogleApiKey")),this.google.capa.auth(!!e.settingsGet("AllowGoogleSocialAuth")),this.google.capa.drive(!!e.settingsGet("AllowGoogleSocialDrive")),this.google.capa.preview(!!e.settingsGet("AllowGoogleSocialPreview")),this.facebook.enabled(!!e.settingsGet("AllowFacebookSocial")),this.facebook.appID(e.settingsGet("FacebookAppID")),this.facebook.appSecret(e.settingsGet("FacebookAppSecret")),this.facebook.supported(!!e.settingsGet("SupportedFacebookSocial")),this.twitter.enabled=n.observable(!!e.settingsGet("AllowTwitterSocial")),this.twitter.consumerKey=n.observable(e.settingsGet("TwitterConsumerKey")),this.twitter.consumerSecret=n.observable(e.settingsGet("TwitterConsumerSecret")),this.dropbox.enabled(!!e.settingsGet("AllowDropboxSocial")),this.dropbox.apiKey(e.settingsGet("DropboxApiKey"))},e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){s.call(this),this.determineUserLanguage=n.observable(!1),this.determineUserDomain=n.observable(!1),this.weakPassword=n.observable(!1),this.useLocalProxyForExternalImages=n.observable(!1)}var n=i(3),o=i(9),s=i(65);t.prototype.populate=function(){s.prototype.populate.call(this),this.determineUserLanguage(!!o.settingsGet("DetermineUserLanguage")),this.determineUserDomain(!!o.settingsGet("DetermineUserDomain")),this.weakPassword(!!o.settingsGet("WeakPassword")),this.useLocalProxyForExternalImages(!!o.settingsGet("UseLocalProxyForExternalImages"))},e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(e){r.call(this),this.value=e.value,(s.isUnd(this.value)||!this.value.subscribe)&&(this.value=o.observable(s.isUnd(this.value)?!1:!!this.value)),this.enable=e.enable,(s.isUnd(this.enable)||!this.enable.subscribe)&&(this.enable=o.observable(s.isUnd(this.enable)?!0:!!this.enable)),this.disable=e.disable,(s.isUnd(this.disable)||!this.disable.subscribe)&&(this.disable=o.observable(s.isUnd(this.disable)?!1:!!this.disable)),this.label=e.label||"",this.inline=s.isUnd(e.inline)?!1:e.inline,this.readOnly=s.isUnd(e.readOnly)?!1:!!e.readOnly,this.inverted=s.isUnd(e.inverted)?!1:!!e.inverted,this.labeled=!s.isUnd(e.label)}var n=i(2),o=i(3),s=i(1),r=i(29);n.extend(t.prototype,r.prototype),t.prototype.click=function(){this.readOnly||!this.enable()||this.disable()||this.value(!this.value())},t.componentExportHelper=r.componentExportHelper,e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.themes=n.observableArray([]),this.themeBackgroundName=n.observable(""),this.themeBackgroundHash=n.observable(""),this.theme=n.observable("").extend({limitedList:this.themes})}var n=i(3),o=i(1),s=i(9);t.prototype.populate=function(){var e=s.settingsGet("Themes");this.themes(o.isArray(e)?e:[]),this.theme(s.settingsGet("Theme")),this.themeBackgroundName(s.settingsGet("UserBackgroundName")),this.themeBackgroundHash(s.settingsGet("UserBackgroundHash"))},e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){u.call(this,"Popups","PopupsAsk"),this.askDesc=o.observable(""),this.yesButton=o.observable(""),this.noButton=o.observable(""),this.yesFocus=o.observable(!1),this.noFocus=o.observable(!1),this.fYesAction=null,this.fNoAction=null,this.bFocusYesOnShow=!0,this.bDisabeCloseOnEsc=!0,this.sDefaultKeyScope=r.KeyState.PopupAsk,c.constructorEnd(this)}var n=i(2),o=i(3),s=i(19),r=i(4),a=i(1),l=i(8),c=i(5),u=i(10);c.extendAsViewModel(["View/Popup/Ask","PopupsAskViewModel"],t),n.extend(t.prototype,u.prototype),t.prototype.clearPopup=function(){this.askDesc(""),this.yesButton(l.i18n("POPUPS_ASK/BUTTON_YES")),this.noButton(l.i18n("POPUPS_ASK/BUTTON_NO")),this.yesFocus(!1),this.noFocus(!1),this.fYesAction=null,this.fNoAction=null},t.prototype.yesClick=function(){this.cancelCommand(),a.isFunc(this.fYesAction)&&this.fYesAction.call(null)},t.prototype.noClick=function(){this.cancelCommand(),a.isFunc(this.fNoAction)&&this.fNoAction.call(null)},t.prototype.onShow=function(e,t,i,n,o,s){this.clearPopup(),this.fYesAction=t||null,this.fNoAction=i||null,this.askDesc(e||""),n&&this.yesButton(n),n&&this.yesButton(o),this.bFocusYesOnShow=a.isUnd(s)?!0:!!s},t.prototype.onShowWithDelay=function(){this.bFocusYesOnShow&&this.yesFocus(!0)},t.prototype.onBuild=function(){s("tab, shift+tab, right, left",r.KeyState.PopupAsk,n.bind(function(){return this.yesFocus()?this.noFocus(!0):this.yesFocus(!0),!1},this)),s("esc",r.KeyState.PopupAsk,n.bind(function(){return this.noClick(),!1},this))},e.exports=t}()},function(e){e.exports=window.crossroads},,function(e,t,i){!function(){"use strict";function t(){this.additionalAccounts=n.observable(!1),this.gravatar=n.observable(!1),this.attachmentThumbnails=n.observable(!1),this.sieve=n.observable(!1),this.filters=n.observable(!1),this.themes=n.observable(!0),this.userBackground=n.observable(!1),this.openPGP=n.observable(!1),this.twoFactorAuth=n.observable(!1),this.templates=n.observable(!1)}var n=i(3),o=i(4),s=i(9);t.prototype.populate=function(){this.additionalAccounts(s.capa(o.Capa.AdditionalAccounts)),this.gravatar(s.capa(o.Capa.Gravatar)),this.attachmentThumbnails(s.capa(o.Capa.AttachmentThumbnails)),this.sieve(s.capa(o.Capa.Sieve)),this.filters(s.capa(o.Capa.Filters)),this.themes(s.capa(o.Capa.Themes)),this.userBackground(s.capa(o.Capa.UserBackground)),this.openPGP(s.capa(o.Capa.OpenPGP)),this.twoFactorAuth(s.capa(o.Capa.TwoFactor)),this.templates(s.capa(o.Capa.Templates))},e.exports=new t}()},,,function(e,t,i){!function(){"use strict";function t(){a.call(this,"Popups","PopupsLanguages"),this.LanguageStore=i(32),this.exp=o.observable(!1),this.languages=o.computed(function(){return n.map(this.LanguageStore.languages(),function(e){return{key:e,selected:o.observable(!1),fullName:s.convertLangName(e)}})},this),this.LanguageStore.language.subscribe(function(){this.resetMainLanguage()},this),r.constructorEnd(this)}var n=i(2),o=i(3),s=i(1),r=i(5),a=i(10);r.extendAsViewModel(["View/Popup/Languages","PopupsLanguagesViewModel"],t),n.extend(t.prototype,a.prototype),t.prototype.languageEnName=function(e){var t=s.convertLangName(e,!0);return"English"===t?"":t},t.prototype.resetMainLanguage=function(){var e=this.LanguageStore.language();n.each(this.languages(),function(t){t.selected(t.key===e)})},t.prototype.onShow=function(){this.exp(!0),this.resetMainLanguage()},t.prototype.onHide=function(){this.exp(!1)},t.prototype.changeLanguage=function(e){this.LanguageStore.language(e),this.cancelCommand()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(e){d.call(this),this.isLocalAutocomplete=!0,this.iframe=s('<iframe style="display:none" src="javascript:;" />').appendTo("body"),r.$win.on("error",function(t){t&&t.originalEvent&&t.originalEvent.message&&-1===a.inArray(t.originalEvent.message,["Script error.","Uncaught Error: Error calling method on NPObject."])&&e.jsError(a.emptyFunction,t.originalEvent.message,t.originalEvent.filename,t.originalEvent.lineno,n.location&&n.location.toString?n.location.toString():"",r.$html.attr("class"),a.microtime()-r.now)}),r.$win.on("resize",function(){c.pub("window.resize")}),c.sub("window.resize",o.throttle(function(){var e=r.$win.height(),t=r.$win.height();(r.$win.__sizes[0]!==e||r.$win.__sizes[1]!==t)&&(r.$win.__sizes[0]=e,r.$win.__sizes[1]=t,c.pub("window.resize.real"))},50)),r.$doc.on("keydown",function(e){e&&e.ctrlKey&&r.$html.addClass("rl-ctrl-key-pressed")}).on("keyup",function(e){e&&!e.ctrlKey&&r.$html.removeClass("rl-ctrl-key-pressed")}),r.$doc.on("mousemove keypress click",o.debounce(function(){c.pub("rl.auto-logout-refresh")},5e3))}var n=i(11),o=i(2),s=i(12),r=i(7),a=i(1),l=i(13),c=i(28),u=i(8),p=i(9),d=i(58);o.extend(t.prototype,d.prototype),t.prototype.remote=function(){return null},t.prototype.data=function(){return null},t.prototype.download=function(e){var t=null,i=null,o=n.navigator.userAgent.toLowerCase();return o&&(o.indexOf("chrome")>-1||o.indexOf("chrome")>-1)&&(i=n.document.createElement("a"),i.href=e,n.document.createEvent&&(t=n.document.createEvent("MouseEvents"),t&&t.initEvent&&i.dispatchEvent))?(t.initEvent("click",!0,!0),i.dispatchEvent(t),!0):(r.bMobileDevice?(n.open(e,"_self"),n.focus()):this.iframe.attr("src",e),!0)},t.prototype.googlePreviewSupportedCache=null,t.prototype.googlePreviewSupported=function(){return null===this.googlePreviewSupportedCache&&(this.googlePreviewSupportedCache=!!p.settingsGet("AllowGoogleSocial")&&!!p.settingsGet("AllowGoogleSocialPreview")),this.googlePreviewSupportedCache},t.prototype.setTitle=function(e){e=(a.isNormal(e)&&0<e.length?e+" - ":"")+p.settingsGet("Title")||"",n.document.title=e+" ...",n.document.title=e},t.prototype.redirectToAdminPanel=function(){o.delay(function(){n.location.href=l.rootAdmin()},100)},t.prototype.clearClientSideToken=function(){n.__rlah_clear&&n.__rlah_clear()},t.prototype.loginAndLogoutReload=function(e,t){var s=i(5),r=a.pString(p.settingsGet("CustomLogoutLink")),c=!!p.settingsGet("InIframe");e=a.isUnd(e)?!1:!!e,t=a.isUnd(t)?!1:!!t,e&&this.clearClientSideToken(),e&&t&&n.close&&n.close(),r=r||"./",e&&n.location.href!==r?o.delay(function(){c&&n.parent?n.parent.location.href=r:n.location.href=r},100):(s.routeOff(),s.setHash(l.root(),!0),s.routeOff(),o.delay(function(){c&&n.parent?n.parent.location.reload():n.location.reload()},100))},t.prototype.historyBack=function(){n.history.back()},t.prototype.bootstart=function(){c.pub("rl.bootstart");var e=i(78),t=i(3);t.components.register("SaveTrigger",i(55)),t.components.register("Input",i(52)),t.components.register("Select",i(56)),t.components.register("TextArea",i(57)),t.components.register("Radio",i(54)),p.settingsGet("MaterialDesign")&&r.bAnimationSupported?t.components.register("Checkbox",i(53)):t.components.register("Checkbox",i(51)),u.initOnStartOrLangChange(u.initNotificationLanguage,u),o.delay(a.windowResizeCallback,1e3),e.addState({id:"mobile",maxWidth:767,onEnter:function(){r.$html.addClass("ssm-state-mobile"),c.pub("ssm.mobile-enter")},onLeave:function(){r.$html.removeClass("ssm-state-mobile"),c.pub("ssm.mobile-leave")}}),e.addState({id:"tablet",minWidth:768,maxWidth:999,onEnter:function(){r.$html.addClass("ssm-state-tablet")},onLeave:function(){r.$html.removeClass("ssm-state-tablet")}}),e.addState({id:"desktop",minWidth:1e3,maxWidth:1400,onEnter:function(){r.$html.addClass("ssm-state-desktop")},onLeave:function(){r.$html.removeClass("ssm-state-desktop")}}),e.addState({id:"desktop-large",minWidth:1400,onEnter:function(){r.$html.addClass("ssm-state-desktop-large")},onLeave:function(){r.$html.removeClass("ssm-state-desktop-large")}}),c.sub("ssm.mobile-enter",function(){r.leftPanelDisabled(!0)}),c.sub("ssm.mobile-leave",function(){r.leftPanelDisabled(!1)}),r.leftPanelDisabled.subscribe(function(e){r.$html.toggleClass("rl-left-panel-disabled",e)}),e.ready(),i(32).populate(),i(39).populate(),i(36).populate()},e.exports=t}()},,function(e){!function(){"use strict";e.exports={eml:"message/rfc822",mime:"message/rfc822",txt:"text/plain",text:"text/plain",def:"text/plain",list:"text/plain","in":"text/plain",ini:"text/plain",log:"text/plain",sql:"text/plain",cfg:"text/plain",conf:"text/plain",asc:"text/plain",rtx:"text/richtext",vcard:"text/vcard",vcf:"text/vcard",htm:"text/html",html:"text/html",csv:"text/csv",ics:"text/calendar",ifb:"text/calendar",xml:"text/xml",json:"application/json",swf:"application/x-shockwave-flash",hlp:"application/winhlp",wgt:"application/widget",chm:"application/vnd.ms-htmlhelp",p10:"application/pkcs10",p7c:"application/pkcs7-mime",p7m:"application/pkcs7-mime",p7s:"application/pkcs7-signature",torrent:"application/x-bittorrent",js:"application/javascript",pl:"text/perl",css:"text/css",asp:"text/asp",php:"application/x-httpd-php",php3:"application/x-httpd-php",php4:"application/x-httpd-php",php5:"application/x-httpd-php",phtml:"application/x-httpd-php",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",jpe:"image/jpeg",jfif:"image/jpeg",gif:"image/gif",bmp:"image/bmp",cgm:"image/cgm",ief:"image/ief",ico:"image/x-icon",tif:"image/tiff",tiff:"image/tiff",svg:"image/svg+xml",svgz:"image/svg+xml",djv:"image/vnd.djvu",djvu:"image/vnd.djvu",webp:"image/webp",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",exe:"application/x-msdownload",dll:"application/x-msdownload",scr:"application/x-msdownload",com:"application/x-msdownload",bat:"application/x-msdownload",msi:"application/x-msdownload",cab:"application/vnd.ms-cab-compressed",gz:"application/x-gzip",tgz:"application/x-gzip",bz:"application/x-bzip",bz2:"application/x-bzip2",deb:"application/x-debian-package",psf:"application/x-font-linux-psf",otf:"application/x-font-otf",pcf:"application/x-font-pcf",snf:"application/x-font-snf",ttf:"application/x-font-ttf",ttc:"application/x-font-ttf",mp3:"audio/mpeg",amr:"audio/amr",aac:"audio/x-aac",aif:"audio/x-aiff",aifc:"audio/x-aiff",aiff:"audio/x-aiff",wav:"audio/x-wav",wma:"audio/x-ms-wma",wax:"audio/x-ms-wax",midi:"audio/midi",mp4a:"audio/mp4",ogg:"audio/ogg",weba:"audio/webm",ra:"audio/x-pn-realaudio",ram:"audio/x-pn-realaudio",rmp:"audio/x-pn-realaudio-plugin",m3u:"audio/x-mpegurl",flv:"video/x-flv",qt:"video/quicktime",mov:"video/quicktime",wmv:"video/windows-media",avi:"video/x-msvideo",mpg:"video/mpeg",mpeg:"video/mpeg",mpe:"video/mpeg",m1v:"video/mpeg",m2v:"video/mpeg","3gp":"video/3gpp","3g2":"video/3gpp2",h261:"video/h261",h263:"video/h263",h264:"video/h264",jpgv:"video/jpgv",mp4:"video/mp4",mp4v:"video/mp4",mpg4:"video/mp4",ogv:"video/ogg",webm:"video/webm",m4v:"video/x-m4v",asf:"video/x-ms-asf",asx:"video/x-ms-asf",wm:"video/x-ms-wm",wmx:"video/x-ms-wmx",wvx:"video/x-ms-wvx",movie:"video/x-sgi-movie",pdf:"application/pdf",psd:"image/vnd.adobe.photoshop",ai:"application/postscript",eps:"application/postscript",ps:"application/postscript",doc:"application/msword",dot:"application/msword",rtf:"application/rtf",xls:"application/vnd.ms-excel",ppt:"application/vnd.ms-powerpoint",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet"}}()},function(e,t,i){!function(){"use strict";function t(e){if(r.call(this),this.values=o.observableArray([]),this.value=e.value,(s.isUnd(this.value)||!this.value.subscribe)&&(this.value=o.observable("")),this.inline=s.isUnd(e.inline)?!1:e.inline,this.readOnly=s.isUnd(e.readOnly)?!1:!!e.readOnly,e.values){var t=n.map(e.values,function(e,t){return{label:e,value:t}});this.values(t)}this.click=n.bind(this.click,this)}var n=i(2),o=i(3),s=i(1),r=i(29);t.prototype.click=function(e){!this.readOnly&&e&&this.value(e.value)},n.extend(t.prototype,r.prototype),t.componentExportHelper=r.componentExportHelper,e.exports=t}()},function(e,t,i){!function(){"use strict";function t(e){o.call(this,e)}var n=i(2),o=i(38);n.extend(t.prototype,o.prototype),e.exports=o.componentExportHelper(t,"CheckboxComponent")}()},function(e,t,i){!function(){"use strict";function t(e){o.call(this,e)}var n=i(2),o=i(34);n.extend(t.prototype,o.prototype),e.exports=o.componentExportHelper(t,"InputComponent")}()},function(e,t,i){!function(){"use strict";function t(e){s.call(this,e),this.animationBox=o.observable(!1).extend({falseTimeout:200}),this.animationCheckmark=o.observable(!1).extend({falseTimeout:200}),this.animationBoxSetTrue=n.bind(this.animationBoxSetTrue,this),this.animationCheckmarkSetTrue=n.bind(this.animationCheckmarkSetTrue,this),this.disposable.push(this.value.subscribe(function(e){this.triggerAnimation(e)},this))}var n=i(2),o=i(3),s=i(38);n.extend(t.prototype,s.prototype),t.prototype.animationBoxSetTrue=function(){this.animationBox(!0)},t.prototype.animationCheckmarkSetTrue=function(){this.animationCheckmark(!0)},t.prototype.triggerAnimation=function(e){e?(this.animationBoxSetTrue(),n.delay(this.animationCheckmarkSetTrue,200)):(this.animationCheckmarkSetTrue(),n.delay(this.animationBoxSetTrue,200))},e.exports=s.componentExportHelper(t,"CheckboxMaterialDesignComponent")}()},function(e,t,i){!function(){"use strict";function t(e){o.call(this,e)}var n=i(2),o=i(50);n.extend(t.prototype,o.prototype),e.exports=o.componentExportHelper(t,"RadioComponent")}()},function(e,t,i){!function(){"use strict";function t(e){r.call(this),this.element=e.element||null,this.value=e.value&&e.value.subscribe?e.value:null,this.element&&(this.value?(this.element.css("display","inline-block"),e.verticalAlign&&this.element.css("vertical-align",e.verticalAlign),this.setState(this.value()),this.disposable.push(this.value.subscribe(this.setState,this))):this.element.hide())}var n=i(2),o=i(4),s=i(1),r=i(29);t.prototype.setState=function(e){switch(s.pInt(e)){case o.SaveSettingsStep.TrueResult:this.element.find(".animated,.error").hide().removeClass("visible").end().find(".success").show().addClass("visible");break;case o.SaveSettingsStep.FalseResult:this.element.find(".animated,.success").hide().removeClass("visible").end().find(".error").show().addClass("visible");break;case o.SaveSettingsStep.Animate:this.element.find(".error,.success").hide().removeClass("visible").end().find(".animated").show().addClass("visible");break;default:case o.SaveSettingsStep.Idle:this.element.find(".animated").hide().end().find(".error,.success").removeClass("visible")}},n.extend(t.prototype,r.prototype),e.exports=r.componentExportHelper(t,"SaveTriggerComponent")}()},function(e,t,i){!function(){"use strict";function t(e){s.call(this,e),this.options=e.options||"",this.optionsText=e.optionsText||null,this.optionsValue=e.optionsValue||null,this.defautOptionsAfterRender=o.defautOptionsAfterRender}var n=i(2),o=i(1),s=i(34);n.extend(t.prototype,s.prototype),e.exports=s.componentExportHelper(t,"SelectComponent")}()},function(e,t,i){!function(){"use strict";function t(e){s.call(this,e),this.rows=e.rows||5,this.spellcheck=o.isUnd(e.spellcheck)?!1:!!e.spellcheck}var n=i(2),o=i(1),s=i(34);n.extend(t.prototype,s.prototype),e.exports=s.componentExportHelper(t,"TextAreaComponent")}()},function(e){!function(){"use strict";function t(){}t.prototype.bootstart=function(){},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.oRequests={}}var n=i(11),o=i(2),s=i(12),r=i(15),a=i(4),l=i(7),c=i(1),u=i(20),p=i(13),d=i(9);t.prototype.oRequests={},t.prototype.defaultResponse=function(e,t,i,n,s,p){var d=function(){a.StorageResultType.Success!==i&&l.bUnload&&(i=a.StorageResultType.Unload),a.StorageResultType.Success===i&&n&&!n.Result?(n&&-1<c.inArray(n.ErrorCode,[a.Notification.AuthError,a.Notification.AccessError,a.Notification.ConnectionError,a.Notification.DomainNotAllowed,a.Notification.AccountNotAllowed,a.Notification.MailServerError,a.Notification.UnknownNotification,a.Notification.UnknownError])&&l.iAjaxErrorCount++,n&&a.Notification.InvalidToken===n.ErrorCode&&l.iTokenErrorCount++,r.Values.TokenErrorLimit<l.iTokenErrorCount&&l.__APP__&&l.__APP__.loginAndLogoutReload&&l.__APP__.loginAndLogoutReload(!0),(n.ClearAuth||n.Logout||r.Values.AjaxErrorLimit<l.iAjaxErrorCount)&&l.__APP__&&l.__APP__.clearClientSideToken&&(l.__APP__.clearClientSideToken(),!n.ClearAuth&&l.__APP__.loginAndLogoutReload&&l.__APP__.loginAndLogoutReload(!0))):a.StorageResultType.Success===i&&n&&n.Result&&(l.iAjaxErrorCount=0,l.iTokenErrorCount=0),e&&(u.runHook("ajax-default-response",[t,a.StorageResultType.Success===i?n:null,i,s,p]),e(i,a.StorageResultType.Success===i?n:null,s,t,p))};switch(i){case"success":i=a.StorageResultType.Success;break;case"abort":i=a.StorageResultType.Abort;break;default:i=a.StorageResultType.Error}a.StorageResultType.Error===i?o.delay(d,300):d()},t.prototype.ajaxRequest=function(e,t,i,r,a){var l=this,u=""===r,h={},g=(new n.Date).getTime(),m=null,f="";return t=t||{},i=c.isNormal(i)?i:2e4,r=c.isUnd(r)?"":c.pString(r),a=c.isArray(a)?a:[],f=t.Action||"",f&&0<a.length&&o.each(a,function(e){l.oRequests[e]&&(l.oRequests[e].__aborted=!0,l.oRequests[e].abort&&l.oRequests[e].abort(),l.oRequests[e]=null)}),u&&(t.XToken=d.settingsGet("Token")),m=s.ajax({type:u?"POST":"GET",url:p.ajax(r),async:!0,dataType:"json",data:u?t:{},headers:h,timeout:i,global:!0}),m.always(function(i,o){var s=!1;i&&i.Time&&(s=c.pInt(i.Time)>(new n.Date).getTime()-g),f&&l.oRequests[f]&&(l.oRequests[f].__aborted&&(o="abort"),l.oRequests[f]=null),l.defaultResponse(e,f,o,i,s,t)}),f&&0<a.length&&-1<c.inArray(f,a)&&(this.oRequests[f]&&(this.oRequests[f].__aborted=!0,this.oRequests[f].abort&&this.oRequests[f].abort(),this.oRequests[f]=null),this.oRequests[f]=m),m},t.prototype.defaultRequest=function(e,t,i,n,o,s){return i=i||{},i.Action=t,o=c.pString(o),u.runHook("ajax-default-request",[t,i,o]),this.ajaxRequest(e,i,c.isUnd(n)?r.Defaults.DefaultAjaxTimeout:c.pInt(n),o,s)},t.prototype.noop=function(e){this.defaultRequest(e,"Noop")},t.prototype.jsError=function(e,t,i,n,o,s,r){this.defaultRequest(e,"JsError",{Message:t,FileName:i,LineNo:n,Location:o,HtmlCapa:s,TimeOnPage:r})},t.prototype.jsInfo=function(e,t,i,n){this.defaultRequest(e,"JsInfo",{Type:t,Data:i,IsError:(c.isUnd(n)?1:!n)?"0":"1"})},t.prototype.getPublicKey=function(e){this.defaultRequest(e,"GetPublicKey")},t.prototype.jsVersion=function(e,t){this.defaultRequest(e,"Version",{Version:t})
},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(e){u.call(this,"settings",e),this.menu=s.observableArray([]),this.oCurrentSubScreen=null,this.oViewModelPlace=null,this.setupSettings()}var n=i(2),o=i(12),s=i(3),r=i(7),a=i(1),l=i(13),c=i(5),u=i(35);n.extend(t.prototype,u.prototype),t.prototype.setupSettings=function(e){e&&e()},t.prototype.onRoute=function(e){var t=this,i=null,u=null,p=null,d=null;u=n.find(r.aViewModels.settings,function(t){return t&&t.__rlSettingsData&&e===t.__rlSettingsData.Route}),u&&(n.find(r.aViewModels["settings-removed"],function(e){return e&&e===u})&&(u=null),u&&n.find(r.aViewModels["settings-disabled"],function(e){return e&&e===u})&&(u=null)),u?(u.__builded&&u.__vm?i=u.__vm:(p=this.oViewModelPlace,p&&1===p.length?(i=new u,d=o("<div></div>").addClass("rl-settings-view-model").hide(),d.appendTo(p),i.viewModelDom=d,i.__rlSettingsData=u.__rlSettingsData,u.__dom=d,u.__builded=!0,u.__vm=i,s.applyBindingAccessorsToNode(d[0],{i18nInit:!0,template:function(){return{name:u.__rlSettingsData.Template}}},i),a.delegateRun(i,"onBuild",[d])):a.log("Cannot find sub settings view model position: SettingsSubScreen")),i&&n.defer(function(){t.oCurrentSubScreen&&(a.delegateRun(t.oCurrentSubScreen,"onHide"),t.oCurrentSubScreen.viewModelDom.hide()),t.oCurrentSubScreen=i,t.oCurrentSubScreen&&(t.oCurrentSubScreen.viewModelDom.show(),a.delegateRun(t.oCurrentSubScreen,"onShow"),a.delegateRun(t.oCurrentSubScreen,"onShowWithDelay",[],200),n.each(t.menu(),function(e){e.selected(i&&i.__rlSettingsData&&e.route===i.__rlSettingsData.Route)}),o("#rl-content .b-settings .b-content .content").scrollTop(0)),a.windowResize()})):c.setHash(l.settings(),!1,!0)},t.prototype.onHide=function(){this.oCurrentSubScreen&&this.oCurrentSubScreen.viewModelDom&&(a.delegateRun(this.oCurrentSubScreen,"onHide"),this.oCurrentSubScreen.viewModelDom.hide())},t.prototype.onBuild=function(){n.each(r.aViewModels.settings,function(e){e&&e.__rlSettingsData&&!n.find(r.aViewModels["settings-removed"],function(t){return t&&t===e})&&this.menu.push({route:e.__rlSettingsData.Route,label:e.__rlSettingsData.Label,selected:s.observable(!1),disabled:!!n.find(r.aViewModels["settings-disabled"],function(t){return t&&t===e})})},this),this.oViewModelPlace=o("#rl-content #rl-settings-subscreen")},t.prototype.routes=function(){var e=n.find(r.aViewModels.settings,function(e){return e&&e.__rlSettingsData&&e.__rlSettingsData.IsDefault}),t=e?e.__rlSettingsData.Route:"general",i={subname:/^(.*)$/,normalize_:function(e,i){return i.subname=a.isUnd(i.subname)?t:a.pString(i.subname),[i.subname]}};return[["{subname}/",i],["{subname}",i],["",i]]},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.domains=n.observableArray([]),this.domains.loading=n.observable(!1).extend({throttle:100})}var n=i(3);e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){this.licensing=n.observable(!1),this.licensingProcess=n.observable(!1),this.licenseValid=n.observable(!1),this.licenseExpired=n.observable(0),this.licenseError=n.observable(""),this.licenseTrigger=n.observable(!1)}var n=i(3);e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){this.packages=n.observableArray([]),this.packages.loading=n.observable(!1).extend({throttle:100}),this.packagesReal=n.observable(!0),this.packagesMainUpdatable=n.observable(!0)}var n=i(3);e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){this.plugins=n.observableArray([]),this.plugins.loading=n.observable(!1).extend({throttle:100}),this.plugins.error=n.observable("")}var n=i(3);e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){this.allowLanguagesOnSettings=n.observable(!0),this.allowLanguagesOnLogin=n.observable(!0),this.interfaceAnimation=n.observable(!0),this.interfaceAnimation.subscribe(function(e){var t=o.bMobileDevice||!e;o.$html.toggleClass("rl-anim",!t).toggleClass("no-rl-anim",t)}),this.interfaceAnimation.valueHasMutated(),this.prem=n.observable(!1)}var n=i(3),o=i(7),s=i(9);t.prototype.populate=function(){this.allowLanguagesOnLogin(!!s.settingsGet("AllowLanguagesOnLogin")),this.allowLanguagesOnSettings(!!s.settingsGet("AllowLanguagesOnSettings")),this.interfaceAnimation(!!s.settingsGet("InterfaceAnimation")),this.prem(!!s.settingsGet("PremType"))},e.exports=t}()},,,,,function(e,t,i){!function(){"use strict";e.exports=function(e){var t=i(11),n=i(2),o=i(12),s=i(7),r=i(20),a=i(1),l=i(4),c=i(8),u=i(25);s.__APP__=e,s.$win.keydown(a.kill_CtrlA_CtrlS).keyup(a.kill_CtrlA_CtrlS).unload(function(){s.bUnload=!0}),s.$html.addClass(s.bMobileDevice?"mobile":"no-mobile").on("click.dropdown.data-api",function(){a.detectDropdownVisibility()}),t.rl=t.rl||{},t.rl.i18n=n.bind(c.i18n,c),t.rl.addHook=n.bind(r.addHook,r),t.rl.settingsGet=n.bind(r.mainSettingsGet,r),t.rl.createCommand=a.createCommand,t.rl.addSettingsViewModel=n.bind(r.addSettingsViewModel,r),t.rl.pluginRemoteRequest=n.bind(r.remoteRequest,r),t.rl.pluginSettingsGet=n.bind(r.settingsGet,r),t.rl.EmailModel=u,t.rl.Enums=l,t.__APP_BOOT=function(i){o(function(){o("#rl-content").is(":visible")||s.$html.addClass("no-css"),t.rainloopTEMPLATES&&t.rainloopTEMPLATES[0]?(o("#rl-templates").html(t.rainloopTEMPLATES[0]),n.delay(function(){e.bootstart(),s.$html.removeClass("no-js rl-booted-trigger").addClass("rl-booted")},10)):i(!1),t.__APP_BOOT=null})}}}()},function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e){e.exports=window.Autolinker},function(e){e.exports=window.JSEncrypt},,,function(e){e.exports=window.SimplePace},function(e){e.exports=window.hasher},function(e){e.exports=window.ssm},,,,function(e,t,i){!function(){"use strict";function t(){this.coreReal=n.observable(!0),this.coreChannel=n.observable("stable"),this.coreType=n.observable("stable"),this.coreUpdatable=n.observable(!0),this.coreAccess=n.observable(!0),this.coreWarning=n.observable(!1),this.coreChecking=n.observable(!1).extend({throttle:100}),this.coreUpdating=n.observable(!1).extend({throttle:100}),this.coreVersion=n.observable(""),this.coreRemoteVersion=n.observable(""),this.coreRemoteRelease=n.observable(""),this.coreVersionCompare=n.observable(-2)}var n=i(3);e.exports=new t}()},,,,function(e,t,i){!function(){"use strict";function t(){h.call(this,"Popups","PopupsActivate");var e=this;this.domain=o.observable(""),this.key=o.observable(""),this.key.focus=o.observable(!1),this.activationSuccessed=o.observable(!1),this.licenseTrigger=p.licenseTrigger,this.activateProcess=o.observable(!1),this.activateText=o.observable(""),this.activateText.isError=o.observable(!1),this.key.subscribe(function(){this.activateText(""),this.activateText.isError(!1)},this),this.activationSuccessed.subscribe(function(e){e&&this.licenseTrigger(!this.licenseTrigger())},this),this.activateCommand=r.createCommand(this,function(){this.activateProcess(!0),this.validateSubscriptionKey()?u.licensingActivate(function(t,i){e.activateProcess(!1),s.StorageResultType.Success===t&&i.Result?!0===i.Result?(e.activationSuccessed(!0),e.activateText("Subscription Key Activated Successfully"),e.activateText.isError(!1)):(e.activateText(i.Result),e.activateText.isError(!0),e.key.focus(!0)):i.ErrorCode?(e.activateText(l.getNotification(i.ErrorCode)),e.activateText.isError(!0),e.key.focus(!0)):(e.activateText(l.getNotification(s.Notification.UnknownError)),e.activateText.isError(!0),e.key.focus(!0))},this.domain(),this.key()):(this.activateProcess(!1),this.activateText("Invalid Subscription Key"),this.activateText.isError(!0),this.key.focus(!0))},function(){return!this.activateProcess()&&""!==this.domain()&&""!==this.key()&&!this.activationSuccessed()}),d.constructorEnd(this)}var n=i(2),o=i(3),s=i(4),r=i(1),a=i(15),l=i(8),c=i(9),u=i(17),p=i(62),d=i(5),h=i(10);d.extendAsViewModel(["View/Popup/Activate","PopupsActivateViewModel"],t),n.extend(t.prototype,h.prototype),t.prototype.onShow=function(e){this.domain(c.settingsGet("AdminDomain")),this.activateProcess()||(e=r.isUnd(e)?!1:!!e,this.key(e?a.Values.RainLoopTrialKey:""),this.activateText(""),this.activateText.isError(!1),this.activationSuccessed(!1))},t.prototype.onShowWithDelay=function(){this.activateProcess()||this.key.focus(!0)},t.prototype.validateSubscriptionKey=function(){var e=this.key();return""===e||a.Values.RainLoopTrialKey===e||!!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(r.trim(e))},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){d.call(this,"Popups","PopupsDomain"),this.edit=o.observable(!1),this.saving=o.observable(!1),this.savingError=o.observable(""),this.page=o.observable("main"),this.sieveSettings=o.observable(!1),this.testing=o.observable(!1),this.testingDone=o.observable(!1),this.testingImapError=o.observable(!1),this.testingSieveError=o.observable(!1),this.testingSmtpError=o.observable(!1),this.testingImapErrorDesc=o.observable(""),this.testingSieveErrorDesc=o.observable(""),this.testingSmtpErrorDesc=o.observable(""),this.testingImapError.subscribe(function(e){e||this.testingImapErrorDesc("")},this),this.testingSieveError.subscribe(function(e){e||this.testingSieveErrorDesc("")},this),this.testingSmtpError.subscribe(function(e){e||this.testingSmtpErrorDesc("")},this),this.imapServerFocus=o.observable(!1),this.sieveServerFocus=o.observable(!1),this.smtpServerFocus=o.observable(!1),this.name=o.observable(""),this.name.focused=o.observable(!1),this.imapServer=o.observable(""),this.imapPort=o.observable(""+r.Values.ImapDefaulPort),this.imapSecure=o.observable(s.ServerSecure.None),this.imapShortLogin=o.observable(!1),this.useSieve=o.observable(!1),this.sieveAllowRaw=o.observable(!1),this.sieveServer=o.observable(""),this.sievePort=o.observable(""+r.Values.SieveDefaulPort),this.sieveSecure=o.observable(s.ServerSecure.None),this.smtpServer=o.observable(""),this.smtpPort=o.observable(""+r.Values.SmtpDefaulPort),this.smtpSecure=o.observable(s.ServerSecure.None),this.smtpShortLogin=o.observable(!1),this.smtpAuth=o.observable(!0),this.smtpPhpMail=o.observable(!1),this.whiteList=o.observable(""),this.enableSmartPorts=o.observable(!1),this.allowSieve=o.computed(function(){return c.filters()&&c.sieve()},this),this.headerText=o.computed(function(){var e=this.name();return this.edit()?'Edit Domain "'+e+'"':"Add Domain"+(""===e?"":' "'+e+'"')},this),this.domainIsComputed=o.computed(function(){var e=this.smtpPhpMail(),t=this.allowSieve(),i=this.useSieve();return""!==this.name()&&""!==this.imapServer()&&""!==this.imapPort()&&(t&&i?""!==this.sieveServer()&&""!==this.sievePort():!0)&&(""!==this.smtpServer()&&""!==this.smtpPort()||e)},this),this.canBeTested=o.computed(function(){return!this.testing()&&this.domainIsComputed()},this),this.canBeSaved=o.computed(function(){return!this.saving()&&this.domainIsComputed()},this),this.createOrAddCommand=l.createCommand(this,function(){this.saving(!0),u.createOrUpdateDomain(n.bind(this.onDomainCreateOrSaveResponse,this),!this.edit(),this.name(),this.imapServer(),l.pInt(this.imapPort()),this.imapSecure(),this.imapShortLogin(),this.useSieve(),this.sieveAllowRaw(),this.sieveServer(),l.pInt(this.sievePort()),this.sieveSecure(),this.smtpServer(),l.pInt(this.smtpPort()),this.smtpSecure(),this.smtpShortLogin(),this.smtpAuth(),this.smtpPhpMail(),this.whiteList())},this.canBeSaved),this.testConnectionCommand=l.createCommand(this,function(){this.page("main"),this.testingDone(!1),this.testingImapError(!1),this.testingSmtpError(!1),this.testing(!0),u.testConnectionForDomain(n.bind(this.onTestConnectionResponse,this),this.name(),this.imapServer(),l.pInt(this.imapPort()),this.imapSecure(),this.useSieve(),this.sieveServer(),l.pInt(this.sievePort()),this.sieveSecure(),this.smtpServer(),l.pInt(this.smtpPort()),this.smtpSecure(),this.smtpAuth(),this.smtpPhpMail())},this.canBeTested),this.whiteListCommand=l.createCommand(this,function(){this.page("white-list")}),this.backCommand=l.createCommand(this,function(){this.page("main")}),this.sieveCommand=l.createCommand(this,function(){this.sieveSettings(!this.sieveSettings()),this.clearTesting()}),this.page.subscribe(function(){this.sieveSettings(!1)},this),this.imapServerFocus.subscribe(function(e){e&&""!==this.name()&&""===this.imapServer()&&this.imapServer(this.name().replace(/[.]?[*][.]?/g,""))},this),this.sieveServerFocus.subscribe(function(e){e&&""!==this.imapServer()&&""===this.sieveServer()&&this.sieveServer(this.imapServer())},this),this.smtpServerFocus.subscribe(function(e){e&&""!==this.imapServer()&&""===this.smtpServer()&&this.smtpServer(this.imapServer().replace(/imap/gi,"smtp"))},this),this.imapSecure.subscribe(function(e){if(this.enableSmartPorts()){var t=l.pInt(this.imapPort());switch(e=l.pString(e)){case"0":993===t&&this.imapPort("143");break;case"1":143===t&&this.imapPort("993")}}},this),this.smtpSecure.subscribe(function(e){if(this.enableSmartPorts()){var t=l.pInt(this.smtpPort());switch(e=l.pString(e)){case"0":(465===t||587===t)&&this.smtpPort("25");break;case"1":(25===t||587===t)&&this.smtpPort("465");break;case"2":(25===t||465===t)&&this.smtpPort("587")}}},this),p.constructorEnd(this)}var n=i(2),o=i(3),s=i(4),r=i(15),a=i(7),l=i(1),c=i(43),u=i(17),p=i(5),d=i(10);p.extendAsViewModel(["View/Popup/Domain","PopupsDomainViewModel"],t),n.extend(t.prototype,d.prototype),t.prototype.onTestConnectionResponse=function(e,t){if(this.testing(!1),s.StorageResultType.Success===e&&t.Result){var i=!1,n=!1;this.testingDone(!0),this.testingImapError(!0!==t.Result.Imap),this.testingSmtpError(!0!==t.Result.Smtp),this.testingSieveError(!0!==t.Result.Sieve),this.testingImapError()&&t.Result.Imap&&(i=!0,this.testingImapErrorDesc(t.Result.Imap)),this.testingSmtpError()&&t.Result.Smtp&&this.testingSmtpErrorDesc(t.Result.Smtp),this.testingSieveError()&&t.Result.Sieve&&(n=!0,this.testingSieveErrorDesc(t.Result.Sieve)),this.sieveSettings()?!n&&i&&this.sieveSettings(!1):n&&!i&&this.sieveSettings(!0)}else this.testingImapError(!0),this.testingSmtpError(!0),this.testingSieveError(!0),this.sieveSettings(!1)},t.prototype.onDomainCreateOrSaveResponse=function(e,t){this.saving(!1),s.StorageResultType.Success===e&&t?t.Result?(i(16).reloadDomainList(),this.closeCommand()):s.Notification.DomainAlreadyExists===t.ErrorCode&&this.savingError("Domain already exists"):this.savingError("Unknown error")},t.prototype.clearTesting=function(){this.testing(!1),this.testingDone(!1),this.testingImapError(!1),this.testingSmtpError(!1),this.testingSieveError(!1)},t.prototype.onHide=function(){this.page("main"),this.sieveSettings(!1)},t.prototype.onShow=function(e){this.saving(!1),this.page("main"),this.sieveSettings(!1),this.clearTesting(),this.clearForm(),e&&(this.enableSmartPorts(!1),this.edit(!0),this.name(l.trim(e.Name)),this.imapServer(l.trim(e.IncHost)),this.imapPort(""+l.pInt(e.IncPort)),this.imapSecure(l.trim(e.IncSecure)),this.imapShortLogin(!!e.IncShortLogin),this.useSieve(!!e.UseSieve),this.sieveAllowRaw(!!e.SieveAllowRaw),this.sieveServer(l.trim(e.SieveHost)),this.sievePort(""+l.pInt(e.SievePort)),this.sieveSecure(l.trim(e.SieveSecure)),this.smtpServer(l.trim(e.OutHost)),this.smtpPort(""+l.pInt(e.OutPort)),this.smtpSecure(l.trim(e.OutSecure)),this.smtpShortLogin(!!e.OutShortLogin),this.smtpAuth(!!e.OutAuth),this.smtpPhpMail(!!e.OutUsePhpMail),this.whiteList(l.trim(e.WhiteList)),this.enableSmartPorts(!0))},t.prototype.onShowWithDelay=function(){""!==this.name()||a.bMobile||this.name.focused(!0)},t.prototype.clearForm=function(){this.edit(!1),this.page("main"),this.sieveSettings(!1),this.enableSmartPorts(!1),this.savingError(""),this.name(""),this.name.focused(!1),this.imapServer(""),this.imapPort(""+r.Values.ImapDefaulPort),this.imapSecure(s.ServerSecure.None),this.imapShortLogin(!1),this.useSieve(!1),this.sieveAllowRaw(!1),this.sieveServer(""),this.sievePort(""+r.Values.SieveDefaulPort),this.sieveSecure(s.ServerSecure.None),this.smtpServer(""),this.smtpPort(""+r.Values.SmtpDefaulPort),this.smtpSecure(s.ServerSecure.None),this.smtpShortLogin(!1),this.smtpAuth(!0),this.smtpPhpMail(!1),this.whiteList(""),this.enableSmartPorts(!0)},e.exports=t}()},,,,,,,,,,,,,,,,,,,,function(e,t,i){!function(){"use strict";function t(){o.call(this,"login",[i(135)])}var n=i(2),o=i(35);n.extend(t.prototype,o.prototype),t.prototype.onShow=function(){i(16).setTitle("")},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){r.call(this,[i(136),i(137)])}var n=i(2),o=i(5),s=i(20),r=i(60);n.extend(t.prototype,r.prototype),t.prototype.setupSettings=function(e){o.addSettingsViewModel(i(117),"AdminSettingsGeneral","General","general",!0),o.addSettingsViewModel(i(119),"AdminSettingsLogin","Login","login"),o.addSettingsViewModel(i(114),"AdminSettingsBranding","Branding","branding"),o.addSettingsViewModel(i(115),"AdminSettingsContacts","Contacts","contacts"),o.addSettingsViewModel(i(116),"AdminSettingsDomains","Domains","domains"),o.addSettingsViewModel(i(122),"AdminSettingsSecurity","Security","security"),o.addSettingsViewModel(i(123),"AdminSettingsSocial","Integrations","integrations"),o.addSettingsViewModel(i(121),"AdminSettingsPlugins","Plugins","plugins"),o.addSettingsViewModel(i(120),"AdminSettingsPackages","Packages","packages"),o.addSettingsViewModel(i(118),"AdminSettingsLicensing","Licensing","licensing"),o.addSettingsViewModel(i(113),"AdminSettingsAbout","About","about"),s.runSettingsViewModelHooks(!0),e&&e()},t.prototype.onShow=function(){i(16).setTitle("")},e.exports=t}()},,,,,function(e,t,i){!function(){"use strict";function t(){this.version=n.observable(o.settingsGet("Version")),this.access=n.observable(!!o.settingsGet("CoreAccess")),this.errorDesc=n.observable(""),this.coreReal=s.coreReal,this.coreChannel=s.coreChannel,this.coreType=s.coreType,this.coreUpdatable=s.coreUpdatable,this.coreAccess=s.coreAccess,this.coreChecking=s.coreChecking,this.coreUpdating=s.coreUpdating,this.coreWarning=s.coreWarning,this.coreVersion=s.coreVersion,this.coreRemoteVersion=s.coreRemoteVersion,this.coreRemoteRelease=s.coreRemoteRelease,this.coreVersionCompare=s.coreVersionCompare,this.statusType=n.computed(function(){var e="",t=this.coreVersionCompare(),i=this.coreChecking(),n=this.coreUpdating(),o=this.coreReal();return i?e="checking":n?e="updating":o&&0===t?e="up-to-date":o&&-1===t?e="available":o||(e="error",this.errorDesc("Cannot access the repository at the moment.")),e},this)}var n=i(3),o=i(9),s=i(82);t.prototype.onBuild=function(){this.access()&&i(16).reloadCoreData()},t.prototype.updateCoreData=function(){this.coreUpdating()||i(16).updateCoreData()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){var e=i(4),t=i(9),n=i(37);this.capa=n.prem,this.title=o.observable(t.settingsGet("Title")),this.title.trigger=o.observable(e.SaveSettingsStep.Idle),this.loadingDesc=o.observable(t.settingsGet("LoadingDescription")),this.loadingDesc.trigger=o.observable(e.SaveSettingsStep.Idle),this.loginLogo=o.observable(t.settingsGet("LoginLogo")||""),this.loginLogo.trigger=o.observable(e.SaveSettingsStep.Idle),this.loginBackground=o.observable(t.settingsGet("LoginBackground")||""),this.loginBackground.trigger=o.observable(e.SaveSettingsStep.Idle),this.userLogo=o.observable(t.settingsGet("UserLogo")||""),this.userLogo.trigger=o.observable(e.SaveSettingsStep.Idle),this.loginDescription=o.observable(t.settingsGet("LoginDescription")),this.loginDescription.trigger=o.observable(e.SaveSettingsStep.Idle),this.loginCss=o.observable(t.settingsGet("LoginCss")),this.loginCss.trigger=o.observable(e.SaveSettingsStep.Idle),this.userCss=o.observable(t.settingsGet("UserCss")),this.userCss.trigger=o.observable(e.SaveSettingsStep.Idle),this.loginPowered=o.observable(!!t.settingsGet("LoginPowered"))}var n=i(2),o=i(3),s=i(1);t.prototype.onBuild=function(){if(this.capa){var e=this,t=i(17);n.delay(function(){var i=s.settingsSaveHelperSimpleFunction(e.title.trigger,e),n=s.settingsSaveHelperSimpleFunction(e.loadingDesc.trigger,e),o=s.settingsSaveHelperSimpleFunction(e.loginLogo.trigger,e),r=s.settingsSaveHelperSimpleFunction(e.loginDescription.trigger,e),a=s.settingsSaveHelperSimpleFunction(e.loginCss.trigger,e),l=s.settingsSaveHelperSimpleFunction(e.userLogo.trigger,e),c=s.settingsSaveHelperSimpleFunction(e.loginBackground.trigger,e),u=s.settingsSaveHelperSimpleFunction(e.userCss.trigger,e);e.title.subscribe(function(e){t.saveAdminConfig(i,{Title:s.trim(e)})}),e.loadingDesc.subscribe(function(e){t.saveAdminConfig(n,{LoadingDescription:s.trim(e)})}),e.loginLogo.subscribe(function(e){t.saveAdminConfig(o,{LoginLogo:s.trim(e)})}),e.loginBackground.subscribe(function(e){t.saveAdminConfig(c,{LoginBackground:s.trim(e)})}),e.userLogo.subscribe(function(e){t.saveAdminConfig(l,{UserLogo:s.trim(e)})}),e.loginDescription.subscribe(function(e){t.saveAdminConfig(r,{LoginDescription:s.trim(e)})}),e.loginCss.subscribe(function(e){t.saveAdminConfig(a,{LoginCss:s.trim(e)})}),e.userCss.subscribe(function(e){t.saveAdminConfig(u,{UserCss:s.trim(e)})}),e.loginPowered.subscribe(function(e){t.saveAdminConfig(null,{LoginPowered:e?"1":"0"})})},50)}},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){var e=i(17);this.defautOptionsAfterRender=r.defautOptionsAfterRender,this.enableContacts=o.observable(!!a.settingsGet("ContactsEnable")),this.contactsSharing=o.observable(!!a.settingsGet("ContactsSharing")),this.contactsSync=o.observable(!!a.settingsGet("ContactsSync"));var t=["sqlite","mysql","pgsql"],l=[],c=function(e){switch(e){case"sqlite":e="SQLite";break;case"mysql":e="MySQL";break;case"pgsql":e="PostgreSQL"}return e};a.settingsGet("SQLiteIsSupported")&&l.push("sqlite"),a.settingsGet("MySqlIsSupported")&&l.push("mysql"),a.settingsGet("PostgreSqlIsSupported")&&l.push("pgsql"),this.contactsSupported=0<l.length,this.contactsTypes=o.observableArray([]),this.contactsTypesOptions=this.contactsTypes.map(function(e){var t=-1===r.inArray(e,l);return{id:e,name:c(e)+(t?" (not supported)":""),disabled:t}}),this.contactsTypes(t),this.contactsType=o.observable(""),this.mainContactsType=o.computed({owner:this,read:this.contactsType,write:function(e){e!==this.contactsType()?-1<r.inArray(e,l)?this.contactsType(e):0<l.length&&this.contactsType(""):this.contactsType.valueHasMutated()}}).extend({notify:"always"}),this.contactsType.subscribe(function(){this.testContactsSuccess(!1),this.testContactsError(!1),this.testContactsErrorMessage("")},this),this.pdoDsn=o.observable(a.settingsGet("ContactsPdoDsn")),this.pdoUser=o.observable(a.settingsGet("ContactsPdoUser")),this.pdoPassword=o.observable(a.settingsGet("ContactsPdoPassword")),this.pdoDsnTrigger=o.observable(s.SaveSettingsStep.Idle),this.pdoUserTrigger=o.observable(s.SaveSettingsStep.Idle),this.pdoPasswordTrigger=o.observable(s.SaveSettingsStep.Idle),this.contactsTypeTrigger=o.observable(s.SaveSettingsStep.Idle),this.testing=o.observable(!1),this.testContactsSuccess=o.observable(!1),this.testContactsError=o.observable(!1),this.testContactsErrorMessage=o.observable(""),this.testContactsCommand=r.createCommand(this,function(){this.testContactsSuccess(!1),this.testContactsError(!1),this.testContactsErrorMessage(""),this.testing(!0),e.testContacts(this.onTestContactsResponse,{ContactsPdoType:this.contactsType(),ContactsPdoDsn:this.pdoDsn(),ContactsPdoUser:this.pdoUser(),ContactsPdoPassword:this.pdoPassword()})},function(){return""!==this.pdoDsn()&&""!==this.pdoUser()}),this.contactsType(a.settingsGet("ContactsPdoType")),this.onTestContactsResponse=n.bind(this.onTestContactsResponse,this)}var n=i(2),o=i(3),s=i(4),r=i(1),a=i(9);t.prototype.onTestContactsResponse=function(e,t){this.testContactsSuccess(!1),this.testContactsError(!1),this.testContactsErrorMessage(""),s.StorageResultType.Success===e&&t&&t.Result&&t.Result.Result?this.testContactsSuccess(!0):(this.testContactsError(!0),this.testContactsErrorMessage(t&&t.Result?t.Result.Message||"":"")),this.testing(!1)},t.prototype.onShow=function(){this.testContactsSuccess(!1),this.testContactsError(!1),this.testContactsErrorMessage("")},t.prototype.onBuild=function(){var e=this,t=i(17);n.delay(function(){var i=r.settingsSaveHelperSimpleFunction(e.pdoDsnTrigger,e),n=r.settingsSaveHelperSimpleFunction(e.pdoUserTrigger,e),o=r.settingsSaveHelperSimpleFunction(e.pdoPasswordTrigger,e),s=r.settingsSaveHelperSimpleFunction(e.contactsTypeTrigger,e);e.enableContacts.subscribe(function(e){t.saveAdminConfig(null,{ContactsEnable:e?"1":"0"})}),e.contactsSharing.subscribe(function(e){t.saveAdminConfig(null,{ContactsSharing:e?"1":"0"})}),e.contactsSync.subscribe(function(e){t.saveAdminConfig(null,{ContactsSync:e?"1":"0"})}),e.contactsType.subscribe(function(e){t.saveAdminConfig(s,{ContactsPdoType:e})}),e.pdoDsn.subscribe(function(e){t.saveAdminConfig(i,{ContactsPdoDsn:r.trim(e)})}),e.pdoUser.subscribe(function(e){t.saveAdminConfig(n,{ContactsPdoUser:r.trim(e)})}),e.pdoPassword.subscribe(function(e){t.saveAdminConfig(o,{ContactsPdoPassword:r.trim(e)})}),e.contactsType(a.settingsGet("ContactsPdoType"))},50)},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.domains=r.domains,this.visibility=o.computed(function(){return this.domains.loading()?"visible":"hidden"},this),this.domainForDeletion=o.observable(null).deleteAccessHelper()}var n=i(2),o=i(3),s=i(4),r=i(61),a=i(17);t.prototype.createDomain=function(){i(5).showScreenPopup(i(87))},t.prototype.deleteDomain=function(e){this.domains.remove(e),a.domainDelete(n.bind(this.onDomainListChangeRequest,this),e.name)},t.prototype.disableDomain=function(e){e.disabled(!e.disabled()),a.domainDisable(n.bind(this.onDomainListChangeRequest,this),e.name,e.disabled())},t.prototype.onBuild=function(e){var t=this;e.on("click",".b-admin-domains-list-table .e-item .e-action",function(){var e=o.dataFor(this);e&&a.domain(n.bind(t.onDomainLoadRequest,t),e.name)}),i(16).reloadDomainList()},t.prototype.onDomainLoadRequest=function(e,t){s.StorageResultType.Success===e&&t&&t.Result&&i(5).showScreenPopup(i(87),[t.Result])},t.prototype.onDomainListChangeRequest=function(){i(16).reloadDomainList()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.language=c.language,this.languages=c.languages,this.theme=l.theme,this.themes=l.themes,this.capaThemes=p.themes,this.capaUserBackground=p.userBackground,this.capaGravatar=p.gravatar,this.capaAdditionalAccounts=p.additionalAccounts,this.capaAttachmentThumbnails=p.attachmentThumbnails,this.capaTemplates=p.templates,this.allowLanguagesOnSettings=u.allowLanguagesOnSettings,this.weakPassword=u.weakPassword,this.mainAttachmentLimit=o.observable(r.pInt(d.settingsGet("AttachmentLimit"))/1048576).extend({posInterer:25}),this.uploadData=d.settingsGet("PhpUploadSizes"),this.uploadDataDesc=this.uploadData&&(this.uploadData.upload_max_filesize||this.uploadData.post_max_size)?[this.uploadData.upload_max_filesize?"upload_max_filesize = "+this.uploadData.upload_max_filesize+"; ":"",this.uploadData.post_max_size?"post_max_size = "+this.uploadData.post_max_size:""].join(""):"",this.themesOptions=o.computed(function(){return n.map(this.themes(),function(e){return{optValue:e,optText:r.convertThemeName(e)}})},this),this.languageFullName=o.computed(function(){return r.convertLangName(this.language())},this),this.attachmentLimitTrigger=o.observable(s.SaveSettingsStep.Idle),this.languageTrigger=o.observable(s.SaveSettingsStep.Idle),this.themeTrigger=o.observable(s.SaveSettingsStep.Idle)}var n=i(2),o=i(3),s=i(4),r=i(1),a=i(13),l=i(39),c=i(32),u=i(37),p=i(43),d=i(9);t.prototype.onBuild=function(){var e=this,t=i(17);n.delay(function(){var i=r.settingsSaveHelperSimpleFunction(e.attachmentLimitTrigger,e),n=r.settingsSaveHelperSimpleFunction(e.languageTrigger,e),o=r.settingsSaveHelperSimpleFunction(e.themeTrigger,e);e.mainAttachmentLimit.subscribe(function(e){t.saveAdminConfig(i,{AttachmentLimit:r.pInt(e)})}),e.language.subscribe(function(e){t.saveAdminConfig(n,{Language:r.trim(e)})}),e.theme.subscribe(function(i){r.changeTheme(i,e.themeTrigger),t.saveAdminConfig(o,{Theme:r.trim(i)})}),e.capaAdditionalAccounts.subscribe(function(e){t.saveAdminConfig(null,{CapaAdditionalAccounts:e?"1":"0"})}),e.capaTemplates.subscribe(function(e){t.saveAdminConfig(null,{CapaTemplates:e?"1":"0"})}),e.capaGravatar.subscribe(function(e){t.saveAdminConfig(null,{CapaGravatar:e?"1":"0"})}),e.capaAttachmentThumbnails.subscribe(function(e){t.saveAdminConfig(null,{CapaAttachmentThumbnails:e?"1":"0"})}),e.capaThemes.subscribe(function(e){t.saveAdminConfig(null,{CapaThemes:e?"1":"0"})}),e.capaUserBackground.subscribe(function(e){t.saveAdminConfig(null,{CapaUserBackground:e?"1":"0"})}),e.allowLanguagesOnSettings.subscribe(function(e){t.saveAdminConfig(null,{AllowLanguagesOnSettings:e?"1":"0"})})},50)},t.prototype.selectLanguage=function(){i(5).showScreenPopup(i(46))},t.prototype.phpInfoLink=function(){return a.phpInfo()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.licensing=r.licensing,this.licensingProcess=r.licensingProcess,this.licenseValid=r.licenseValid,this.licenseExpired=r.licenseExpired,this.licenseError=r.licenseError,this.licenseTrigger=r.licenseTrigger,this.adminDomain=n.observable(""),this.subscriptionEnabled=n.observable(!!s.settingsGet("SubscriptionEnabled")),this.licenseTrigger.subscribe(function(){this.subscriptionEnabled()&&i(16).reloadLicensing(!0)},this)}var n=i(3),o=i(33),s=i(9),r=i(62);t.prototype.onBuild=function(){this.subscriptionEnabled()&&i(16).reloadLicensing(!1)},t.prototype.onShow=function(){this.adminDomain(s.settingsGet("AdminDomain"))},t.prototype.showActivationForm=function(){i(5).showScreenPopup(i(86))},t.prototype.showTrialForm=function(){i(5).showScreenPopup(i(86),[!0])},t.prototype.licenseIsUnlim=function(){return 1898625600===this.licenseExpired()||1898625700===this.licenseExpired()},t.prototype.licenseExpiredMomentValue=function(){var e=this.licenseExpired(),t=o.unix(e);return this.licenseIsUnlim()?"Never":e&&t.format("LL")+" ("+t.from(o())+")"},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.determineUserLanguage=a.determineUserLanguage,this.determineUserDomain=a.determineUserDomain,this.defaultDomain=o.observable(l.settingsGet("LoginDefaultDomain")),this.allowLanguagesOnLogin=a.allowLanguagesOnLogin,this.defaultDomainTrigger=o.observable(s.SaveSettingsStep.Idle),this.dummy=o.observable(!1)}var n=i(2),o=i(3),s=i(4),r=i(1),a=i(37),l=i(9);t.prototype.onBuild=function(){var e=this,t=i(17);n.delay(function(){var i=r.settingsSaveHelperSimpleFunction(e.defaultDomainTrigger,e);e.determineUserLanguage.subscribe(function(e){t.saveAdminConfig(null,{DetermineUserLanguage:e?"1":"0"})}),e.determineUserDomain.subscribe(function(e){t.saveAdminConfig(null,{DetermineUserDomain:e?"1":"0"})}),e.allowLanguagesOnLogin.subscribe(function(e){t.saveAdminConfig(null,{AllowLanguagesOnLogin:e?"1":"0"})}),e.defaultDomain.subscribe(function(e){t.saveAdminConfig(i,{LoginDefaultDomain:r.trim(e)})})},50)},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.packagesError=s.observable(""),this.packages=l.packages,this.packagesReal=l.packagesReal,this.packagesMainUpdatable=l.packagesMainUpdatable,this.packagesCurrent=this.packages.filter(function(e){return e&&""!==e.installed&&!e.compare}),this.packagesAvailableForUpdate=this.packages.filter(function(e){return e&&""!==e.installed&&!!e.compare}),this.packagesAvailableForInstallation=this.packages.filter(function(e){return e&&""===e.installed}),this.visibility=s.computed(function(){return l.packages.loading()?"visible":"hidden"},this)}var n=i(11),o=i(2),s=i(3),r=i(4),a=i(8),l=i(63),c=i(17);t.prototype.onShow=function(){this.packagesError("")},t.prototype.onBuild=function(){i(16).reloadPackagesList()},t.prototype.requestHelper=function(e,t){var s=this;return function(l,c){r.StorageResultType.Success===l&&c&&c.Result||s.packagesError(c&&c.ErrorCode?a.getNotification(c.ErrorCode):a.getNotification(t?r.Notification.CantInstallPackage:r.Notification.CantDeletePackage)),o.each(s.packages(),function(t){t&&e&&t.loading()&&e.file===t.file&&(e.loading(!1),t.loading(!1))
}),r.StorageResultType.Success===l&&c&&c.Result&&c.Result.Reload?n.location.reload():i(16).reloadPackagesList()}},t.prototype.deletePackage=function(e){e&&(e.loading(!0),c.packageDelete(this.requestHelper(e,!1),e))},t.prototype.installPackage=function(e){e&&(e.loading(!0),c.packageInstall(this.requestHelper(e,!0),e))},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.enabledPlugins=o.observable(!!l.settingsGet("EnabledPlugins")),this.plugins=c.plugins,this.pluginsError=c.plugins.error,this.visibility=o.computed(function(){return c.plugins.loading()?"visible":"hidden"},this),this.onPluginLoadRequest=n.bind(this.onPluginLoadRequest,this),this.onPluginDisableRequest=n.bind(this.onPluginDisableRequest,this)}var n=i(2),o=i(3),s=i(4),r=i(1),a=i(8),l=i(9),c=i(64),u=i(17);t.prototype.disablePlugin=function(e){e.disabled(!e.disabled()),u.pluginDisable(this.onPluginDisableRequest,e.name,e.disabled())},t.prototype.configurePlugin=function(e){u.plugin(this.onPluginLoadRequest,e.name)},t.prototype.onBuild=function(e){var t=this;e.on("click",".e-item .configure-plugin-action",function(){var e=o.dataFor(this);e&&t.configurePlugin(e)}).on("click",".e-item .disabled-plugin",function(){var e=o.dataFor(this);e&&t.disablePlugin(e)}),this.enabledPlugins.subscribe(function(e){u.saveAdminConfig(r.emptyFunction,{EnabledPlugins:e?"1":"0"})})},t.prototype.onShow=function(){c.plugins.error(""),i(16).reloadPluginList()},t.prototype.onPluginLoadRequest=function(e,t){s.StorageResultType.Success===e&&t&&t.Result&&i(5).showScreenPopup(i(143),[t.Result])},t.prototype.onPluginDisableRequest=function(e,t){s.StorageResultType.Success===e&&t&&!t.Result&&t.ErrorCode&&c.plugins.error(s.Notification.UnsupportedPluginPackage===t.ErrorCode&&t.ErrorMessage&&""!==t.ErrorMessage?t.ErrorMessage:a.getNotification(t.ErrorCode)),i(16).reloadPluginList()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.useLocalProxyForExternalImages=l.useLocalProxyForExternalImages,this.weakPassword=l.weakPassword,this.capaOpenPGP=c.openPGP,this.capaTwoFactorAuth=c.twoFactorAuth,this.verifySslCertificate=o.observable(!!u.settingsGet("VerifySslCertificate")),this.allowSelfSigned=o.observable(!!u.settingsGet("AllowSelfSigned")),this.adminLogin=o.observable(u.settingsGet("AdminLogin")),this.adminLoginError=o.observable(!1),this.adminPassword=o.observable(""),this.adminPasswordNew=o.observable(""),this.adminPasswordNew2=o.observable(""),this.adminPasswordNewError=o.observable(!1),this.adminPasswordUpdateError=o.observable(!1),this.adminPasswordUpdateSuccess=o.observable(!1),this.adminPassword.subscribe(function(){this.adminPasswordUpdateError(!1),this.adminPasswordUpdateSuccess(!1)},this),this.adminLogin.subscribe(function(){this.adminLoginError(!1)},this),this.adminPasswordNew.subscribe(function(){this.adminPasswordUpdateError(!1),this.adminPasswordUpdateSuccess(!1),this.adminPasswordNewError(!1)},this),this.adminPasswordNew2.subscribe(function(){this.adminPasswordUpdateError(!1),this.adminPasswordUpdateSuccess(!1),this.adminPasswordNewError(!1)},this),this.saveNewAdminPasswordCommand=r.createCommand(this,function(){return""===r.trim(this.adminLogin())?(this.adminLoginError(!0),!1):this.adminPasswordNew()!==this.adminPasswordNew2()?(this.adminPasswordNewError(!0),!1):(this.adminPasswordUpdateError(!1),this.adminPasswordUpdateSuccess(!1),void p.saveNewAdminPassword(this.onNewAdminPasswordResponse,{Login:this.adminLogin(),Password:this.adminPassword(),NewPassword:this.adminPasswordNew()}))},function(){return""!==r.trim(this.adminLogin())&&""!==this.adminPassword()}),this.onNewAdminPasswordResponse=n.bind(this.onNewAdminPasswordResponse,this)}var n=i(2),o=i(3),s=i(4),r=i(1),a=i(13),l=i(37),c=i(43),u=i(9),p=i(17);t.prototype.onNewAdminPasswordResponse=function(e,t){s.StorageResultType.Success===e&&t&&t.Result?(this.adminPassword(""),this.adminPasswordNew(""),this.adminPasswordNew2(""),this.adminPasswordUpdateSuccess(!0),this.weakPassword(!!t.Result.Weak)):this.adminPasswordUpdateError(!0)},t.prototype.onBuild=function(){this.capaOpenPGP.subscribe(function(e){p.saveAdminConfig(r.emptyFunction,{CapaOpenPGP:e?"1":"0"})}),this.capaTwoFactorAuth.subscribe(function(e){p.saveAdminConfig(r.emptyFunction,{CapaTwoFactorAuth:e?"1":"0"})}),this.useLocalProxyForExternalImages.subscribe(function(e){p.saveAdminConfig(null,{UseLocalProxyForExternalImages:e?"1":"0"})}),this.verifySslCertificate.subscribe(function(e){p.saveAdminConfig(null,{VerifySslCertificate:e?"1":"0"})}),this.allowSelfSigned.subscribe(function(e){p.saveAdminConfig(null,{AllowSelfSigned:e?"1":"0"})})},t.prototype.onHide=function(){this.adminPassword(""),this.adminPasswordNew(""),this.adminPasswordNew2("")},t.prototype.phpInfoLink=function(){return a.phpInfo()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){var e=i(36);this.googleEnable=e.google.enabled,this.googleEnableAuth=e.google.capa.auth,this.googleEnableDrive=e.google.capa.drive,this.googleEnablePreview=e.google.capa.preview,this.googleEnableRequireClientSettings=e.google.require.clientSettings,this.googleEnableRequireApiKey=e.google.require.apiKeySettings,this.googleClientID=e.google.clientID,this.googleClientSecret=e.google.clientSecret,this.googleApiKey=e.google.apiKey,this.googleTrigger1=o.observable(s.SaveSettingsStep.Idle),this.googleTrigger2=o.observable(s.SaveSettingsStep.Idle),this.googleTrigger3=o.observable(s.SaveSettingsStep.Idle),this.facebookSupported=e.facebook.supported,this.facebookEnable=e.facebook.enabled,this.facebookAppID=e.facebook.appID,this.facebookAppSecret=e.facebook.appSecret,this.facebookTrigger1=o.observable(s.SaveSettingsStep.Idle),this.facebookTrigger2=o.observable(s.SaveSettingsStep.Idle),this.twitterEnable=e.twitter.enabled,this.twitterConsumerKey=e.twitter.consumerKey,this.twitterConsumerSecret=e.twitter.consumerSecret,this.twitterTrigger1=o.observable(s.SaveSettingsStep.Idle),this.twitterTrigger2=o.observable(s.SaveSettingsStep.Idle),this.dropboxEnable=e.dropbox.enabled,this.dropboxApiKey=e.dropbox.apiKey,this.dropboxTrigger1=o.observable(s.SaveSettingsStep.Idle)}var n=i(2),o=i(3),s=i(4),r=i(1);t.prototype.onBuild=function(){var e=this,t=i(17);n.delay(function(){var i=r.settingsSaveHelperSimpleFunction(e.facebookTrigger1,e),n=r.settingsSaveHelperSimpleFunction(e.facebookTrigger2,e),o=r.settingsSaveHelperSimpleFunction(e.twitterTrigger1,e),s=r.settingsSaveHelperSimpleFunction(e.twitterTrigger2,e),a=r.settingsSaveHelperSimpleFunction(e.googleTrigger1,e),l=r.settingsSaveHelperSimpleFunction(e.googleTrigger2,e),c=r.settingsSaveHelperSimpleFunction(e.googleTrigger3,e),u=r.settingsSaveHelperSimpleFunction(e.dropboxTrigger1,e);e.facebookEnable.subscribe(function(i){e.facebookSupported()&&t.saveAdminConfig(r.emptyFunction,{FacebookEnable:i?"1":"0"})}),e.facebookAppID.subscribe(function(n){e.facebookSupported()&&t.saveAdminConfig(i,{FacebookAppID:r.trim(n)})}),e.facebookAppSecret.subscribe(function(i){e.facebookSupported()&&t.saveAdminConfig(n,{FacebookAppSecret:r.trim(i)})}),e.twitterEnable.subscribe(function(e){t.saveAdminConfig(r.emptyFunction,{TwitterEnable:e?"1":"0"})}),e.twitterConsumerKey.subscribe(function(e){t.saveAdminConfig(o,{TwitterConsumerKey:r.trim(e)})}),e.twitterConsumerSecret.subscribe(function(e){t.saveAdminConfig(s,{TwitterConsumerSecret:r.trim(e)})}),e.googleEnable.subscribe(function(e){t.saveAdminConfig(r.emptyFunction,{GoogleEnable:e?"1":"0"})}),e.googleEnableAuth.subscribe(function(e){t.saveAdminConfig(r.emptyFunction,{GoogleEnableAuth:e?"1":"0"})}),e.googleEnableDrive.subscribe(function(e){t.saveAdminConfig(r.emptyFunction,{GoogleEnableDrive:e?"1":"0"})}),e.googleEnablePreview.subscribe(function(e){t.saveAdminConfig(r.emptyFunction,{GoogleEnablePreview:e?"1":"0"})}),e.googleClientID.subscribe(function(e){t.saveAdminConfig(a,{GoogleClientID:r.trim(e)})}),e.googleClientSecret.subscribe(function(e){t.saveAdminConfig(l,{GoogleClientSecret:r.trim(e)})}),e.googleApiKey.subscribe(function(e){t.saveAdminConfig(c,{GoogleApiKey:r.trim(e)})}),e.dropboxEnable.subscribe(function(e){t.saveAdminConfig(r.emptyFunction,{DropboxEnable:e?"1":"0"})}),e.dropboxApiKey.subscribe(function(e){t.saveAdminConfig(u,{DropboxApiKey:r.trim(e)})})},50)},e.exports=t}()},,,,,,,,,,,,function(e,t,i){!function(){"use strict";function t(){p.call(this,"Center","AdminLogin"),this.logoPowered=!!l.settingsGet("LoginPowered"),this.login=o.observable(""),this.password=o.observable(""),this.loginError=o.observable(!1),this.passwordError=o.observable(!1),this.loginFocus=o.observable(!1),this.login.subscribe(function(){this.loginError(!1)},this),this.password.subscribe(function(){this.passwordError(!1)},this),this.submitRequest=o.observable(!1),this.submitError=o.observable(""),this.submitCommand=r.createCommand(this,function(){return r.triggerAutocompleteInputChange(),this.loginError(""===r.trim(this.login())),this.passwordError(""===r.trim(this.password())),this.loginError()||this.passwordError()?!1:(this.submitRequest(!0),c.adminLogin(n.bind(function(e,t){s.StorageResultType.Success===e&&t&&"AdminLogin"===t.Action?t.Result?i(16).loginAndLogoutReload():t.ErrorCode&&(this.submitRequest(!1),this.submitError(a.getNotification(t.ErrorCode))):(this.submitRequest(!1),this.submitError(a.getNotification(s.Notification.UnknownError)))},this),this.login(),this.password()),!0)},function(){return!this.submitRequest()}),u.constructorEnd(this)}var n=i(2),o=i(3),s=i(4),r=i(1),a=i(8),l=i(9),c=i(17),u=i(5),p=i(10);u.extendAsViewModel(["View/Admin/Login","AdminLoginViewModel"],t),n.extend(t.prototype,p.prototype),t.prototype.onShow=function(){u.routeOff(),n.delay(n.bind(function(){this.loginFocus(!0)},this),100)},t.prototype.onHide=function(){this.loginFocus(!1)},t.prototype.onBuild=function(){r.triggerAutocompleteInputChange(!0)},t.prototype.submitForm=function(){this.submitCommand()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(e){r.call(this,"Left","AdminMenu"),this.leftPanelDisabled=o.leftPanelDisabled,this.menu=e.menu,s.constructorEnd(this)}var n=i(2),o=i(7),s=i(5),r=i(10);s.extendAsViewModel(["View/Admin/Settings/Menu","AdminSettingsMenuViewModel"],t),n.extend(t.prototype,r.prototype),t.prototype.link=function(e){return"#/"+e},t.prototype.onBuild=function(e){key("up, down",n.throttle(function(t,i){var n="",o=-1,r=i&&"up"===i.shortcut,a=$(".b-admin-menu .e-item",e);t&&a.length&&(o=a.index(a.filter(".selected")),r&&o>0?o--:!r&&o<a.length-1&&o++,n=a.eq(o).attr("href"),n&&s.setHash(n,!1,!0))},200))},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){l.call(this,"Right","AdminPane"),this.adminDomain=o.observable(s.settingsGet("AdminDomain")),this.version=o.observable(s.settingsGet("Version")),this.capa=!!s.settingsGet("PremType"),this.adminManLoading=o.computed(function(){return"000"!==[i(61).domains.loading()?"1":"0",i(64).plugins.loading()?"1":"0",i(63).packages.loading()?"1":"0"].join("")},this),this.adminManLoadingVisibility=o.computed(function(){return this.adminManLoading()?"visible":"hidden"},this).extend({rateLimit:300}),a.constructorEnd(this)}var n=i(2),o=i(3),s=i(9),r=i(17),a=i(5),l=i(10);a.extendAsViewModel(["View/Admin/Settings/Pane","AdminSettingsPaneViewModel"],t),n.extend(t.prototype,l.prototype),t.prototype.logoutClick=function(){r.adminLogout(function(){i(16).loginAndLogoutReload(!0)})},e.exports=t}()},,,,,,function(e,t,i){!function(){"use strict";function t(){p.call(this,"Popups","PopupsPlugin");var e=this;this.onPluginSettingsUpdateResponse=n.bind(this.onPluginSettingsUpdateResponse,this),this.saveError=o.observable(""),this.name=o.observable(""),this.readme=o.observable(""),this.configures=o.observableArray([]),this.hasReadme=o.computed(function(){return""!==this.readme()},this),this.hasConfiguration=o.computed(function(){return 0<this.configures().length},this),this.readmePopoverConf={placement:"top",trigger:"hover",title:"About",container:"body",content:function(){return e.readme()}},this.saveCommand=a.createCommand(this,function(){var e={};e.Name=this.name(),n.each(this.configures(),function(t){var i=t.value();(!1===i||!0===i)&&(i=i?"1":"0"),e["_"+t.Name]=i},this),this.saveError(""),c.pluginSettingsUpdate(this.onPluginSettingsUpdateResponse,e)},this.hasConfiguration),this.bDisabeCloseOnEsc=!0,this.sDefaultKeyScope=r.KeyState.All,this.tryToClosePopup=n.debounce(n.bind(this.tryToClosePopup,this),200),u.constructorEnd(this)}var n=i(2),o=i(3),s=i(19),r=i(4),a=i(1),l=i(8),c=i(17),u=i(5),p=i(10);u.extendAsViewModel(["View/Popup/Plugin","PopupsPluginViewModel"],t),n.extend(t.prototype,p.prototype),t.prototype.onPluginSettingsUpdateResponse=function(e,t){r.StorageResultType.Success===e&&t&&t.Result?this.cancelCommand():(this.saveError(""),this.saveError(t&&t.ErrorCode?l.getNotification(t.ErrorCode):l.getNotification(r.Notification.CantSavePluginSettings)))},t.prototype.onShow=function(e){if(this.name(),this.readme(),this.configures([]),e){this.name(e.Name),this.readme(e.Readme);var t=e.Config;a.isNonEmptyArray(t)&&this.configures(n.map(t,function(e){return{value:o.observable(e[0]),placeholder:o.observable(e[6]),Name:e[1],Type:e[2],Label:e[3],Default:e[4],Desc:e[5]}}))}},t.prototype.tryToClosePopup=function(){var e=this,t=i(40);u.isPopupVisible(t)||u.showScreenPopup(t,[l.i18n("POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW"),function(){e.modalVisibility()&&a.delegateRun(e,"cancelCommand")}])},t.prototype.onBuild=function(){s("esc",r.KeyState.All,n.bind(function(){return this.modalVisibility()&&this.tryToClosePopup(),!1},this))},e.exports=t}()}]);