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.7.2.229/static/js/min/admin.js
polytan02 e87b84a31f Rainloop for Yunohost
Rainloop is a lightweight webmail.
2015-02-01 19:20:54 +00:00

6 lines
132 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(53)(i(17))},function(e,t,i){!function(){"use strict";var t=null,n={},o=i(12),s=i(2),a=i(13),r=i(3),l=i(55),c=i(56),u=i(37),p=i(4),d=i(15),h=i(7);n.trim=a.trim,n.inArray=a.inArray,n.isArray=s.isArray,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)?h.$win.resize():o.setTimeout(function(){h.$win.resize()},e)},50),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.notificationClass=function(){return o.Notification&&o.Notification.requestPermission?o.Notification:null},n.simpleQueryParser=function(e){var t={},i=[],n=[],s=0,a=0;for(i=e.split("&"),s=0,a=i.length;a>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 s={},a=null,r=e.replace(/\?.+$/,""),l=e.replace(/^[^\?]*\?/,""),c=i(23);return a=new c,a.parse(o.decodeURIComponent(r)),a&&a.email&&(s=n.simpleQueryParser(l),i(5).showScreenPopup(t,[p.ComposeType.Empty,null,[a],n.isUnd(s.subject)?null:n.pString(s.subject),n.isUnd(s.body)?null:n.plainToHtml(n.pString(s.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=!!(o.crypto&&o.crypto.getRandomValues&&c),n.encodeHtml=function(e){return n.isNormal(e)?e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):""},n.splitPlainText=function(e,t){var i="",o="",s=e,a=0,r=0;for(t=n.isUnd(t)?100:t;s.length>t;)o=s.substring(0,t),a=o.lastIndexOf(" "),r=o.lastIndexOf("\n"),-1!==r&&(a=r),-1===a&&(a=t),i+=o.substring(0,a)+"\n",s=s.substring(a+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.audio=function(){var e=!1;return function(t,i){if(!1===e)if(h.bIsiOSDevice)e=null;else{var n=!1,s=!1,a=o.Audio?new o.Audio:null;a&&a.canPlayType&&a.play?(n=""!==a.canPlayType('audio/mpeg; codecs="mp3"'),n||(s=""!==a.canPlayType('audio/ogg; codecs="vorbis"')),n||s?(e=a,e.preload="none",e.loop=!1,e.autoplay=!1,e.muted=!1,e.src=n?t:i):e=null):e=null}return e}}(),n.hos=function(e,t){return e&&o.Object&&o.Object.hasOwnProperty?o.Object.hasOwnProperty.call(e,t):!1},n.i18n=function(e,t,i){var o="",s=n.isUnd(h.oI18N[e])?n.isUnd(i)?e:i:h.oI18N[e];if(!n.isUnd(t)&&!n.isNull(t))for(o in t)n.hos(t,o)&&(s=s.replace("%"+o+"%",t[o]));return s},n.i18nToNode=function(e,t){s.defer(function(){a(".i18n",e).each(function(){var e=a(this),t="";t=e.data("i18n-text"),t?e.text(n.i18n(t)):(t=e.data("i18n-html"),t&&e.html(n.i18n(t)),t=e.data("i18n-placeholder"),t&&e.attr("placeholder",n.i18n(t)),t=e.data("i18n-title"),t&&e.attr("title",n.i18n(t)))}),t&&h.bAnimationSupported&&a(".i18n-animation.i18n",e).letterfx({fx:"fall fade",backwards:!1,timing:50,fx_duration:"50ms",letter_end:"restore",element_end:"restore"})})},n.i18nReload=function(){o.rainloopI18N&&(h.oI18N=o.rainloopI18N||{},n.i18nToNode(h.$doc,!0),h.langChangeTrigger(!h.langChangeTrigger())),o.rainloopI18N=null},n.initOnStartOrLangChange=function(e,t,i){e&&e.call(t),i?h.langChangeTrigger.subscribe(function(){e&&e.call(t),i.call(t)}):e&&h.langChangeTrigger.subscribe(e,t)},n.inFocus=function(){return o.document.activeElement?(n.isUnd(o.document.activeElement.__inFocusCache)&&(o.document.activeElement.__inFocusCache=a(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=a(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=[],a="RE"===e,r="FWD"===e,l=!r;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):(a||(a=!!/^RE/i.test(t)),r||(r=!!/^FWD/i.test(t)))}),l?a=!1:r=!1,n.trim((l?"Re: ":"Fwd: ")+(a?"Re: ":"")+(r?"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.getNotification=function(e,t){return e=n.pInt(e),p.Notification.ClientViewError===e&&t?t:n.isUnd(h.oNotificationI18N[e])?"":h.oNotificationI18N[e]},n.initNotificationLanguage=function(){var e=h.oNotificationI18N||{};e[p.Notification.InvalidToken]=n.i18n("NOTIFICATIONS/INVALID_TOKEN"),e[p.Notification.AuthError]=n.i18n("NOTIFICATIONS/AUTH_ERROR"),e[p.Notification.AccessError]=n.i18n("NOTIFICATIONS/ACCESS_ERROR"),e[p.Notification.ConnectionError]=n.i18n("NOTIFICATIONS/CONNECTION_ERROR"),e[p.Notification.CaptchaError]=n.i18n("NOTIFICATIONS/CAPTCHA_ERROR"),e[p.Notification.SocialFacebookLoginAccessDisable]=n.i18n("NOTIFICATIONS/SOCIAL_FACEBOOK_LOGIN_ACCESS_DISABLE"),e[p.Notification.SocialTwitterLoginAccessDisable]=n.i18n("NOTIFICATIONS/SOCIAL_TWITTER_LOGIN_ACCESS_DISABLE"),e[p.Notification.SocialGoogleLoginAccessDisable]=n.i18n("NOTIFICATIONS/SOCIAL_GOOGLE_LOGIN_ACCESS_DISABLE"),e[p.Notification.DomainNotAllowed]=n.i18n("NOTIFICATIONS/DOMAIN_NOT_ALLOWED"),e[p.Notification.AccountNotAllowed]=n.i18n("NOTIFICATIONS/ACCOUNT_NOT_ALLOWED"),e[p.Notification.AccountTwoFactorAuthRequired]=n.i18n("NOTIFICATIONS/ACCOUNT_TWO_FACTOR_AUTH_REQUIRED"),e[p.Notification.AccountTwoFactorAuthError]=n.i18n("NOTIFICATIONS/ACCOUNT_TWO_FACTOR_AUTH_ERROR"),e[p.Notification.CouldNotSaveNewPassword]=n.i18n("NOTIFICATIONS/COULD_NOT_SAVE_NEW_PASSWORD"),e[p.Notification.CurrentPasswordIncorrect]=n.i18n("NOTIFICATIONS/CURRENT_PASSWORD_INCORRECT"),e[p.Notification.NewPasswordShort]=n.i18n("NOTIFICATIONS/NEW_PASSWORD_SHORT"),e[p.Notification.NewPasswordWeak]=n.i18n("NOTIFICATIONS/NEW_PASSWORD_WEAK"),e[p.Notification.NewPasswordForbidden]=n.i18n("NOTIFICATIONS/NEW_PASSWORD_FORBIDDENT"),e[p.Notification.ContactsSyncError]=n.i18n("NOTIFICATIONS/CONTACTS_SYNC_ERROR"),e[p.Notification.CantGetMessageList]=n.i18n("NOTIFICATIONS/CANT_GET_MESSAGE_LIST"),e[p.Notification.CantGetMessage]=n.i18n("NOTIFICATIONS/CANT_GET_MESSAGE"),e[p.Notification.CantDeleteMessage]=n.i18n("NOTIFICATIONS/CANT_DELETE_MESSAGE"),e[p.Notification.CantMoveMessage]=n.i18n("NOTIFICATIONS/CANT_MOVE_MESSAGE"),e[p.Notification.CantCopyMessage]=n.i18n("NOTIFICATIONS/CANT_MOVE_MESSAGE"),e[p.Notification.CantSaveMessage]=n.i18n("NOTIFICATIONS/CANT_SAVE_MESSAGE"),e[p.Notification.CantSendMessage]=n.i18n("NOTIFICATIONS/CANT_SEND_MESSAGE"),e[p.Notification.InvalidRecipients]=n.i18n("NOTIFICATIONS/INVALID_RECIPIENTS"),e[p.Notification.CantCreateFolder]=n.i18n("NOTIFICATIONS/CANT_CREATE_FOLDER"),e[p.Notification.CantRenameFolder]=n.i18n("NOTIFICATIONS/CANT_RENAME_FOLDER"),e[p.Notification.CantDeleteFolder]=n.i18n("NOTIFICATIONS/CANT_DELETE_FOLDER"),e[p.Notification.CantDeleteNonEmptyFolder]=n.i18n("NOTIFICATIONS/CANT_DELETE_NON_EMPTY_FOLDER"),e[p.Notification.CantSubscribeFolder]=n.i18n("NOTIFICATIONS/CANT_SUBSCRIBE_FOLDER"),e[p.Notification.CantUnsubscribeFolder]=n.i18n("NOTIFICATIONS/CANT_UNSUBSCRIBE_FOLDER"),e[p.Notification.CantSaveSettings]=n.i18n("NOTIFICATIONS/CANT_SAVE_SETTINGS"),e[p.Notification.CantSavePluginSettings]=n.i18n("NOTIFICATIONS/CANT_SAVE_PLUGIN_SETTINGS"),e[p.Notification.DomainAlreadyExists]=n.i18n("NOTIFICATIONS/DOMAIN_ALREADY_EXISTS"),e[p.Notification.CantInstallPackage]=n.i18n("NOTIFICATIONS/CANT_INSTALL_PACKAGE"),e[p.Notification.CantDeletePackage]=n.i18n("NOTIFICATIONS/CANT_DELETE_PACKAGE"),e[p.Notification.InvalidPluginPackage]=n.i18n("NOTIFICATIONS/INVALID_PLUGIN_PACKAGE"),e[p.Notification.UnsupportedPluginPackage]=n.i18n("NOTIFICATIONS/UNSUPPORTED_PLUGIN_PACKAGE"),e[p.Notification.LicensingServerIsUnavailable]=n.i18n("NOTIFICATIONS/LICENSING_SERVER_IS_UNAVAILABLE"),e[p.Notification.LicensingExpired]=n.i18n("NOTIFICATIONS/LICENSING_EXPIRED"),e[p.Notification.LicensingBanned]=n.i18n("NOTIFICATIONS/LICENSING_BANNED"),e[p.Notification.DemoSendMessageError]=n.i18n("NOTIFICATIONS/DEMO_SEND_MESSAGE_ERROR"),e[p.Notification.AccountAlreadyExists]=n.i18n("NOTIFICATIONS/ACCOUNT_ALREADY_EXISTS"),e[p.Notification.AccountDoesNotExist]=n.i18n("NOTIFICATIONS/ACCOUNT_DOES_NOT_EXIST"),e[p.Notification.MailServerError]=n.i18n("NOTIFICATIONS/MAIL_SERVER_ERROR"),e[p.Notification.InvalidInputArgument]=n.i18n("NOTIFICATIONS/INVALID_INPUT_ARGUMENT"),e[p.Notification.UnknownNotification]=n.i18n("NOTIFICATIONS/UNKNOWN_ERROR"),e[p.Notification.UnknownError]=n.i18n("NOTIFICATIONS/UNKNOWN_ERROR")},n.getUploadErrorDescByCode=function(e){var t="";switch(n.pInt(e)){case p.UploadErrorCode.FileIsTooBig:t=n.i18n("UPLOAD/ERROR_FILE_IS_TOO_BIG");break;case p.UploadErrorCode.FilePartiallyUploaded:t=n.i18n("UPLOAD/ERROR_FILE_PARTIALLY_UPLOADED");break;case p.UploadErrorCode.FileNoUploaded:t=n.i18n("UPLOAD/ERROR_NO_FILE_UPLOADED");break;case p.UploadErrorCode.MissingTempFolder:t=n.i18n("UPLOAD/ERROR_MISSING_TEMP_FOLDER");break;case p.UploadErrorCode.FileOnSaveingError:t=n.i18n("UPLOAD/ERROR_ON_SAVING_FILE");break;case p.UploadErrorCode.FileType:t=n.i18n("UPLOAD/ERROR_FILE_TYPE");break;default:t=n.i18n("UPLOAD/ERROR_UNKNOWN")}return t},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.killCtrlAandS=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=r.observable(!0),i=n.isUnd(i)?!0:i,s.canExecute=r.computed(n.isFunc(i)?function(){return s.enabled()&&i.call(e)}:function(){return s.enabled()&&!!i}),s},n.initDataConstructorBySettings=function(e){e.editorDefaultType=r.observable(p.EditorDefaultType.Html),e.showImages=r.observable(!1),e.interfaceAnimation=r.observable(p.InterfaceAnimation.Full),e.contactsAutosave=r.observable(!1),h.sAnimationType=p.InterfaceAnimation.Full,e.capaThemes=r.observable(!0),e.capaUserBackground=r.observable(!1),e.allowLanguagesOnSettings=r.observable(!0),e.allowLanguagesOnLogin=r.observable(!0),e.useLocalProxyForExternalImages=r.observable(!1),e.desktopNotifications=r.observable(!1),e.useThreads=r.observable(!0),e.replySameFolder=r.observable(!0),e.useCheckboxesInList=r.observable(!0),e.layout=r.observable(p.Layout.SidePreview),e.usePreviewPane=r.computed(function(){return p.Layout.NoPreview!==e.layout()}),e.interfaceAnimation.subscribe(function(e){if(h.bMobileDevice||e===p.InterfaceAnimation.None)h.$html.removeClass("rl-anim rl-anim-full").addClass("no-rl-anim"),h.sAnimationType=p.InterfaceAnimation.None;else switch(e){case p.InterfaceAnimation.Full:h.$html.removeClass("no-rl-anim").addClass("rl-anim rl-anim-full"),h.sAnimationType=e;break;case p.InterfaceAnimation.Normal:h.$html.removeClass("no-rl-anim rl-anim-full").addClass("rl-anim"),h.sAnimationType=e}}),e.interfaceAnimation.valueHasMutated(),e.desktopNotificationsPermisions=r.computed(function(){e.desktopNotifications();var t=n.notificationClass(),i=p.DesktopNotifications.NotSupported;if(t&&t.permission)switch(t.permission.toLowerCase()){case"granted":i=p.DesktopNotifications.Allowed;break;case"denied":i=p.DesktopNotifications.Denied;break;case"default":i=p.DesktopNotifications.NotAllowed}else o.webkitNotifications&&o.webkitNotifications.checkPermission&&(i=o.webkitNotifications.checkPermission());return i}),e.useDesktopNotifications=r.computed({read:function(){return e.desktopNotifications()&&p.DesktopNotifications.Allowed===e.desktopNotificationsPermisions()},write:function(t){if(t){var i=n.notificationClass(),o=e.desktopNotificationsPermisions();i&&p.DesktopNotifications.Allowed===o?e.desktopNotifications(!0):i&&p.DesktopNotifications.NotAllowed===o?i.requestPermission(function(){e.desktopNotifications.valueHasMutated(),p.DesktopNotifications.Allowed===e.desktopNotificationsPermisions()?e.desktopNotifications()?e.desktopNotifications.valueHasMutated():e.desktopNotifications(!0):e.desktopNotifications()?e.desktopNotifications(!1):e.desktopNotifications.valueHasMutated()}):e.desktopNotifications(!1)}else e.desktopNotifications(!1)}}),e.language=r.observable(""),e.languages=r.observableArray([]),e.mainLanguage=r.computed({read:e.language,write:function(t){t!==e.language()?-1<n.inArray(t,e.languages())?e.language(t):0<e.languages().length&&e.language(e.languages()[0]):e.language.valueHasMutated()}}),e.theme=r.observable(""),e.themes=r.observableArray([]),e.themeBackgroundName=r.observable(""),e.themeBackgroundHash=r.observable(""),e.mainTheme=r.computed({read:e.theme,write:function(t){if(t!==e.theme()){var i=e.themes();-1<n.inArray(t,i)?e.theme(t):0<i.length&&e.theme(i[0])}else e.theme.valueHasMutated()}}),e.capaAdditionalAccounts=r.observable(!1),e.capaAdditionalIdentities=r.observable(!1),e.capaGravatar=r.observable(!1),e.capaSieve=r.observable(!1),e.capaAttachmentThumbnails=r.observable(!1),e.determineUserLanguage=r.observable(!1),e.determineUserDomain=r.observable(!1),e.weakPassword=r.observable(!1),e.messagesPerPage=r.observable(d.Defaults.MessagesPerPage),e.mainMessagesPerPage=e.messagesPerPage,e.mainMessagesPerPage=r.computed({read:e.messagesPerPage,write:function(t){-1<n.inArray(n.pInt(t),d.Defaults.MessagesPerPageArray)?t!==e.messagesPerPage()&&e.messagesPerPage(t):e.messagesPerPage.valueHasMutated()}}),e.facebookSupported=r.observable(!1),e.facebookEnable=r.observable(!1),e.facebookAppID=r.observable(""),e.facebookAppSecret=r.observable(""),e.twitterEnable=r.observable(!1),e.twitterConsumerKey=r.observable(""),e.twitterConsumerSecret=r.observable(""),e.googleEnable=r.observable(!1),e.googleEnable.auth=r.observable(!1),e.googleEnable.drive=r.observable(!1),e.googleEnable.preview=r.observable(!1),e.googleClientID=r.observable(""),e.googleClientSecret=r.observable(""),e.googleApiKey=r.observable(""),e.googleEnable.requireClientSettings=r.computed(function(){return e.googleEnable()&&(e.googleEnable.auth()||e.googleEnable.drive())}),e.googleEnable.requireApiKey=r.computed(function(){return e.googleEnable()&&e.googleEnable.drive()}),e.dropboxEnable=r.observable(!1),e.dropboxApiKey=r.observable(""),e.contactsIsAllowed=r.observable(!1)},n.createMomentDate=function(e){return n.isUnd(e.moment)&&(e.moment=r.observable(moment())),r.computed(function(){h.momentTrigger();var e=this.moment();return 1970===e.year()?"":e.fromNow()},e)},n.createMomentShortDate=function(e){return r.computed(function(){var e="",t=moment(),i=this.moment(),o=this.momentDate();return e=1970===i.year()?"":4>=t.diff(i,"hours")?o:t.format("L")===i.format("L")?n.i18n("MESSAGE_LIST/TODAY_AT",{TIME:i.format("LT")}):t.clone().subtract("days",1).format("L")===i.format("L")?n.i18n("MESSAGE_LIST/YESTERDAY_AT",{TIME:i.format("LT")}):i.format(t.year()===i.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 n.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 a('<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&&a(e).toggleClass("disabled",t.disabled).prop("disabled",t.disabled)},n.windowPopupKnockout=function(e,t,i,s){var l=null,c=o.open(""),u="__OpenerApplyBindingsUid"+n.fakeMd5()+"__",p=a("#"+t);o[u]=function(){if(c&&c.document.body&&p&&p[0]){var t=a(c.document.body);a("#rl-content",t).html(p.html()),a("html",c.document).addClass("external "+a("html").attr("class")),n.i18nToNode(t),e&&a("#rl-content",t)[0]&&r.applyBindings(e,a("#rl-content",t)[0]),o[u]=null,s(c)}},c.document.open(),c.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(i)+'</title></head><body><div id="rl-content"></div></body></html>'),c.document.close(),l=c.document.createElement("script"),l.type="text/javascript",l.innerHTML="if(window&&window.opener&&window.opener['"+u+"']){window.opener['"+u+"']();window.opener['"+u+"']=null}",c.document.getElementsByTagName("head")[0].appendChild(l)},n.settingsSaveHelperFunction=function(e,t,i,o){return i=i||null,o=n.isUnd(o)?1e3:n.pInt(o),function(n,a,r,l,c){t.call(i,a&&a.Result?p.SaveSettingsStep.TrueResult:p.SaveSettingsStep.FalseResult),e&&e.call(i,n,a,r,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 a={};a[t]=s,e.saveAdminConfig?e.saveAdminConfig(o||null,a):e.saveSettings&&e.saveSettings(o||null,a)}}},n.htmlToPlain=function(e){var t=0,i=0,n=0,o=0,s=0,r="",l=function(e){for(var t=100,i="",n="",o=e,s=0,a=0;o.length>t;)n=o.substring(0,t),s=n.lastIndexOf(" "),a=n.lastIndexOf("\n"),-1!==a&&(s=a),-1===s&&(s=t),i+=n.substring(0,s)+"\n",o=o.substring(s+1);return i+o},c=function(e){return e=l(a.trim(e)),e="> "+e.replace(/\n/gm,"\n> "),e.replace(/(^|\n)([> ]+)/gm,function(){return arguments&&2<arguments.length?arguments[1]+a.trim(arguments[2].replace(/[\s]/g,""))+" ":""})},u=function(){if(arguments&&1<arguments.length){var e=a.trim(arguments[1]);return 0<e.length&&(e=e.replace(/<div[^>]*>([\s\S\r\n]*)<\/div>/gim,u),e="\n"+a.trim(e)+"\n"),e}return""},p=function(){return arguments&&1<arguments.length?arguments[1].toString().replace(/[\n]/gm,"<br />"):""},d=function(){return arguments&&1<arguments.length?""+arguments[1]+arguments[2].replace(/</g,"&lt;").replace(/>/g,"&gt;"):""},m=function(){return arguments&&1<arguments.length?a.trim(arguments[1]):""};for(r=e.replace(/<pre[^>]*>([\s\S\r\n]*)<\/pre>/gim,p).replace(/[\s]+/gm," ").replace(/((?:href|data)\s?=\s?)("[^"]+?"|'[^']+?')/gim,d).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,u).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,""),r=h.$div.html(r).text(),r=r.replace(/\n[ \t]+/gm,"\n").replace(/[\n]{3,}/gm,"\n\n").replace(/&gt;/gi,">").replace(/&lt;/gi,"<").replace(/&amp;/gi,"&"),t=0,s=100;s>0&&(s--,i=r.indexOf("__bq__start__",t),i>-1);)n=r.indexOf("__bq__start__",i+5),o=r.indexOf("__bq__end__",i+5),(-1===n||n>o)&&o>i?(r=r.substring(0,i)+c(r.substring(i+13,o))+r.substring(o+11),t=0):t=n>-1&&o>n?n-1:0;return r=r.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,a=[],r="",l=0,c=e.split("\n");do{for(o=!1,a=[],l=0;l<c.length;l++)r=c[l],s=">"===r.substr(0,1),s&&!i?(o=!0,i=!0,a.push("~~~blockquote~~~"),a.push(r.substr(1))):!s&&i?""!==r?(i=!1,a.push("~~~/blockquote~~~"),a.push(r)):a.push(r):a.push(s&&i?r.substr(1):r);i&&(i=!1,a.push("~~~/blockquote~~~")),c=a}while(o);return e=c.join("\n"),e=e.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,a,r,l,c,u,d){var h=null,m=!1,g=0,f=0,b="   ",v=[];for(d=n.isUnd(d)?!1:!!d,u=n.isNormal(u)?u:0<e.length,a=n.isNormal(a)?a:0,r=n.isNormal(r)?r:null,l=n.isNormal(l)?l:null,c=n.isNormal(c)?c:null,n.isArray(i)||(i=[]),n.isArray(s)||(s=[]),g=0,f=s.length;f>g;g++)v.push({id:s[g][0],name:s[g][1],system:!1,seporator:!1,disabled:!1});for(m=!0,g=0,f=e.length;f>g;g++)h=e[g],(l?l.call(null,h):!0)&&(m&&0<v.length&&v.push({id:"---",name:"---",system:!1,seporator:!0,disabled:!0}),m=!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)||(r?r.call(null,h):!1)}));for(m=!0,g=0,f=t.length;f>g;g++)h=t[g],!h.subScribed()&&h.existen&&!d||!h.selectable&&!h.hasSubScribedSubfolders()||(l?l.call(null,h):!0)&&(p.FolderType.User===h.type()||!u||h.hasSubScribedSubfolders())&&(m&&0<v.length&&v.push({id:"---",name:"---",system:!1,seporator:!0,disabled:!0}),m=!1,v.push({id:h.fullNameRaw,name:new o.Array(h.deep+1-a).join(b)+(c?c.call(null,h):h.name()),system:!1,seporator:!1,disabled:!h.selectable||-1<n.inArray(h.fullNameRaw,i)||(r?r.call(null,h):!1)})),h.subScribed()&&0<h.subFolders().length&&(v=v.concat(n.folderListOptionsBuilder([],h.subFolders(),i,[],a,r,l,c,u,d)));return v},n.computedPagenatorHelper=function(e,t){return function(){var i=0,s=0,a=2,r=[],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)?r.unshift(o):r.push(o)};if(c>1||c>0&&l>c){for(l>c?(u(c),i=c,s=c):((3>=l||l>=c-2)&&(a+=2),u(l),i=l,s=l);a>0;)if(i-=1,s+=1,i>0&&(u(i,!1),a--),c>=s)u(s,!0),a--;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 r}},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(){h.dropdownVisibility(!!s.find(h.aBootstrapDropdowns,function(e){return e.hasClass("open")}))},50),n.triggerAutocompleteInputChange=function(e){var t=function(){a(".checkAutocomplete").trigger("change")};(n.isUnd(e)?1:!e)?t():s.delay(t,100)},n.reloadLanguage=function(e,t,o){var r=n.microtime();h.$html.addClass("rl-changing-language"),a.ajax({url:i(11).langLink(e),dataType:"script",cache:!0}).fail(o||n.emptyFunction).done(function(){s.delay(function(){n.i18nReload(),(t||n.emptyFunction)(),h.$html.removeClass("rl-changing-language")},500<n.microtime()-r?1:500)})},n.setHeadViewport=function(e){var t=[];s.each(e,function(e,i){t.push(""+e+"="+i)}),a("#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),r.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,i,s){var r=a("#rlThemeLink"),l=a("#rlThemeStyle"),c=r.attr("href");c||(c=l.attr("data-href")),c&&(c=c.toString().replace(/\/-\/[^\/]+\/\-\//,"/-/"+e+"/-/"),c=c.toString().replace(/\/Css\/[^\/]+\/User\//,"/Css/0/User/"),c=c.toString().replace(/\/Hash\/[^\/]+\//,"/Hash/-/"),"Json/"!==c.substring(c.length-5,c.length)&&(c+="Json/"),o.clearTimeout(n.__themeTimer),i(p.SaveSettingsStep.Animate),n.__themeAjax&&n.__themeAjax.abort&&n.__themeAjax.abort(),n.__themeAjax=a.ajax({url:c,dataType:"json"}).done(function(e){if(e&&n.isArray(e)&&2===e.length){if(!r||!r[0]||l&&l[0]||(l=a('<style id="rlThemeStyle"></style>'),r.after(l),r.remove()),l&&l[0]&&(l.attr("data-href",c).attr("data-theme",e[0]),l[0].styleSheet&&!n.isUnd(l[0].styleSheet.cssText)?l[0].styleSheet.cssText=e[1]:l.text(e[1])),s){var o=a("#rl-bg");t?o.backstretch(s.publicLink(t),{fade:h.bAnimationSupported?1e3:0,centeredX:!0,centeredY:!0}):o.data("backstretch")&&o.backstretch("destroy").attr("style","")}i(p.SaveSettingsStep.TrueResult)}}).always(function(){n.__themeTimer=o.setTimeout(function(){i(p.SaveSettingsStep.Idle)},1e3),n.__themeAjax=null}))},e.exports=n}()},function(e){e.exports=window._},function(e,t,i){!function(t){"use strict";var n=i(12),o=i(2),s=i(13),a=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,r=!0,l="",c="",u=null,p=i(7),d=i(1);p.bMobileDevice||(o=s(e),l=o.data("tooltip-class")||"",r="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=r?t.unwrap(n()):n()();return""===e||o.is(".disabled")||p.dropdownVisibility()?"":'<span class="tooltip-class '+l+'">'+(r?d.i18n(e):e)+"</span>"}}).on("click.koTooltip",function(){o.tooltip("hide")}),u=p.tooltipTrigger.subscribe(function(){o.tooltip("hide")}),a(e,o,u))}},t.bindingHandlers.tooltipForTest={init:function(e){var t=s(e),o=null,r=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=r.tooltipTrigger.subscribe(function(){t.tooltip("hide")}),a(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).tooltip("show")}},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),a=i(1);o.hasClass("open")||(o.find(".dropdown-toggle").dropdown("toggle"),a.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,a){s(e).on("keypress.koOnEnter",function(t){t&&13===n.parseInt(t.keyCode,10)&&(s(e).trigger("change"),i().call(a))}),t.utils.domNodeDisposal.addDisposeCallback(e,function(){s(e).off("keypress.koOnEnter")})}},t.bindingHandlers.onEsc={init:function(e,i,o,a){s(e).on("keypress.koOnEsc",function(t){t&&27===n.parseInt(t.keyCode,10)&&(s(e).trigger("change"),i().call(a))}),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),a=i(1);s(e).toggleClass("fade",!o.bMobileDevice).modal({keyboard:!1,show:t.unwrap(n())}).on("shown.koModal",function(){a.windowResize()}).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,i){s(e).modal(t.unwrap(i())?"show":"hide")}},t.bindingHandlers.i18nInit={init:function(e){var t=i(1);t.i18nToNode(e)}},t.bindingHandlers.i18nUpdate={update:function(e,n){var o=i(1);t.unwrap(n()),o.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()),a=null,r=s(e),l=null,c=o[1]||0;a=s(o[0]||null),a=a[0]?a:null,a&&s(n).resize(function(){l=a.offset(),l&&l.top&&r.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),a=i(7),r=t.unwrap(n()),l=o.pInt(r[1]),c=0,u=s(e).offset().top;u>0&&(u+=o.pInt(r[2]),c=a.$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,a){var r=i(7),l=i(1);if(!r.bMobileDevice){var c=100,u=3,p=a(),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),a=o.offset(),r=a.top+o.height();n.clearInterval(o.data("timerScroll")),o.data("timerScroll",!1),e.pageX>=a.left&&e.pageX<=a.left+o.width()&&(e.pageY>=r-c&&e.pageY<=r&&(t=function(){o.scrollTop(o.scrollTop()+u),l.windowResize()},o.data("timerScroll",n.setInterval(t,10)),t()),e.pageY>=a.top&&e.pageY<=a.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 a=i(7);if(!a.bMobileDevice){var r=n(),l=o(),c=l&&l.droppableOver?l.droppableOver:null,u=l&&l.droppableOut?l.droppableOut:null,p={tolerance:"pointer",hoverClass:"droppableHover"};r&&(p.drop=function(e,t){r(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 a=i(1),r=i(23),l=s(e),c=t(),u=n(),p=u.autoCompleteSource||null,d=function(e){c&&c.focusTrigger&&c.focusTrigger(e)};l.inputosaurus({parseOnBlur:!0,allowDragAndDrop:!0,focusCallback:d,inputDelimiters:[",",";"],autoCompleteSource:p,parseHook:function(e){return o.map(e,function(e){var t=a.trim(e),i=null;return""!==t?(i=new r,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)})},update:function(e,i,n){var o=s(e),a=n(),r=a.emailsTagsFilter||null,l=t.unwrap(i());o.data("EmailsTagsValue")!==l&&(o.val(l),o.data("EmailsTagsValue",l),o.inputosaurus("refresh")),r&&t.unwrap(r)&&o.inputosaurus("focus")}},t.bindingHandlers.command={init:function(e,i,n,o){var a=s(e),r=i();if(!r||!r.enabled||!r.canExecute)throw new Error("You are not using command function");a.addClass("command"),t.bindingHandlers[a.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.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.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.SpoolerType={Delay:0,MessageList:1,Move:2},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",AttachmentThumbnails:"ATTACHMENT_THUMBNAILS",AdditionalAccounts:"ADDITIONAL_ACCOUNTS",AdditionalIdentities:"ADDITIONAL_IDENTITIES"},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},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.DesktopNotifications={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.CustomThemeType={Light:"Light",Dark:"Dark"},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.InterfaceAnimation={None:"None",Normal:"Normal",Full:"Full"},t.Layout={NoPreview:0,SidePreview:1,BottomPreview:2},t.FilterConditionField={From:"From",Recipient:"Recipient",Subject:"Subject"},t.FilterConditionType={Contains:"Contains",NotContains:"NotContains",EqualTo:"EqualTo",NotEqualTo:"NotEqualTo"},t.FiltersAction={None:"None",Move:"Move",Discard:"Discard",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,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,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(13),s=i(3),a=i(60),r=i(32),l=i(7),c=i(21),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(){a.changed.active=!1},t.prototype.routeOn=function(){a.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,a=new e(t),r=a.viewModelPosition(),p=o("#rl-content #rl-"+r.toLowerCase()),d=null;e.__builded=!0,e.__vm=a,a.viewModelName=e.__name,a.viewModelNames=e.__names,p&&1===p.length?(d=o("<div></div>").addClass("rl-view-model").addClass("RL-"+a.viewModelTemplate()).hide(),d.appendTo(p),a.viewModelDom=d,e.__dom=d,"Popups"===r&&(a.cancelCommand=a.closeCommand=u.createCommand(a,function(){i.hideScreenPopup(e)}),a.modalVisibility.subscribe(function(e){var t=this;e?(this.viewModelDom.show(),this.storeAndSetKeyScope(),l.popupVisibilityNames.push(this.viewModelName),a.viewModelDom.css("z-index",3e3+l.popupVisibilityNames().length+10),u.delegateRun(this,"onFocus",[],500)):(u.delegateRun(this,"onHide"),this.restoreKeyScope(),n.each(this.viewModelNames,function(e){c.runHook("view-model-on-hide",[e,t])}),l.popupVisibilityNames.remove(this.viewModelName),a.viewModelDom.css("z-index",2e3),l.tooltipTrigger(!l.tooltipTrigger()),n.delay(function(){t.viewModelDom.hide()},300))},a)),n.each(e.__names,function(e){c.runHook("view-model-pre-build",[e,a,d])}),s.applyBindingAccessorsToNode(d[0],{i18nInit:!0,template:function(){return{name:a.viewModelTemplate()}}},a),u.delegateRun(a,"onBuild",[d]),a&&"Popups"===r&&a.registerPopupKeyDown(),n.each(e.__names,function(e){c.runHook("view-model-post-build",[e,a,d])})):u.log("Cannot find view model position: "+r)}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.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"))})),i.oCurrentScreen=o,i.oCurrentScreen&&(u.delegateRun(i.oCurrentScreen,"onShow"),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"),u.delegateRun(e.__vm,"onFocus",[],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=r.create();t.addRoute(/^([a-zA-Z0-9\-]*)\/?(.*)$/,n.bind(this.screenOnRoute,this)),a.initialized.add(t.parse,t),a.changed.add(t.parse,t),a.init(),o("#rl-content").css({visibility:"visible"}),n.delay(function(){l.$html.removeClass("rl-started-trigger").addClass("rl-started")},50)},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)?(a.changed.active=!0,a[i?"replaceHash":"setHash"](e),a.setHash(e)):(a.changed.active=!1,a[i?"replaceHash":"setHash"](e),a.changed.active=!0)},e.exports=new t}()},,function(e,t,i){!function(){"use strict";var t={},n=i(12),o=i(2),s=i(13),a=i(3),r=i(18),l=i(4);t.$win=s(n),t.$doc=s(n.document),t.$html=s("html"),t.$div=s("<div></div>"),t.now=(new n.Date).getTime(),t.momentTrigger=a.observable(!0),t.dropdownVisibility=a.observable(!1).extend({rateLimit:0}),t.tooltipTrigger=a.observable(!1).extend({rateLimit:0}),t.langChangeTrigger=a.observable(!0),t.useKeyboardShortcuts=a.observable(!0),t.iAjaxErrorCount=0,t.iTokenErrorCount=0,t.iMessageBodyCacheCount=0,t.bUnload=!1,t.sUserAgent=(n.navigator.userAgent||"").toLowerCase(),t.bIsiOSDevice=-1<t.sUserAgent.indexOf("iphone")||-1<t.sUserAgent.indexOf("ipod")||-1<t.sUserAgent.indexOf("ipad"),t.bIsAndroidDevice=-1<t.sUserAgent.indexOf("android"),t.bMobileDevice=t.bIsiOSDevice||t.bIsAndroidDevice,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.sAnimationType="",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,tabletools,contextmenu",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,bidi",allowedContent:!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.oI18N=n.rainloopI18N||{},t.oNotificationI18N={},t.aBootstrapDropdowns=[],t.aViewModels={settings:[],"settings-removed":[],"settings-disabled":[]},t.leftPanelDisabled=a.observable(!1),t.popupVisibilityNames=a.observableArray([]),t.popupVisibility=a.computed(function(){return 0<t.popupVisibilityNames().length},this),t.keyScopeReal=a.observable(l.KeyState.All),t.keyScopeFake=a.observable(l.KeyState.All),t.keyScope=a.computed({owner:this,read:function(){return t.keyScopeFake()},write:function(e){l.KeyState.Menu!==e&&(r.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){r.setScope(e)}),t.dropdownVisibility.subscribe(function(e){e?(t.tooltipTrigger(!t.tooltipTrigger()),t.keyScope(l.KeyState.Menu)):l.KeyState.Menu===r.getScope()&&t.keyScope(t.keyScopeFake())}),e.exports=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(12),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),a=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=a.keyScope(),a.keyScope(this.sDefaultKeyScope)},t.prototype.restoreKeyScope=function(){a.keyScope(this.sCurrentKeyScope)},t.prototype.registerPopupKeyDown=function(){var e=this;a.$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,t,i){!function(){"use strict";function t(){var e=i(8);this.sBase="#/",this.sServer="./?",this.sSubQuery="&s=/",this.sSubSubQuery="&ss=/",this.sVersion=e.settingsGet("Version"),this.sSpecSuffix=e.settingsGet("AuthAccountHash")||"0",this.sStaticPrefix=e.settingsGet("StaticPrefix")||"rainloop/v/"+this.sVersion+"/static/"}var n=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+"/"+n.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/"+n.encodeURIComponent(e)+"/"},t.prototype.publicLink=function(e){return this.sServer+"/Raw/0/Public/"+e+"/"},t.prototype.inbox=function(e){return e=n.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 n.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=n.isNormal(t)?n.pInt(t):1,i=n.pString(i);var o=this.sBase+"mailbox/";return""!==e&&(o+=encodeURI(e)),t>1&&(o=o.replace(/[\/]+$/,""),o+="/p"+t),""!==i&&(o=o.replace(/[\/]+$/,""),o+="/"+encodeURI(i)),o},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="rainloop/v/"+this.sVersion+"/";return"@custom"===e.substr(-7)&&(e=n.trim(e.substring(0,e.length-7)),t=""),t+"themes/"+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){e.exports=window},function(e){e.exports=window.jQuery},,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=2e3,t.Values.SmtpDefaulPort=25,t.Values.SmtpDefaulSecurePort=465,t.Values.MessageBodyCacheLimit=15,t.Values.AjaxErrorLimit=7,t.Values.TokenErrorLimit=10,t.DataImages.UserDotPic="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2P8DwQACgAD/il4QJ8AAAAASUVORK5CYII=",t.DataImages.TranspPic="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=",e.exports=t}(e)}).call(t,i(54)(e))},function(e,t,i){!function(){"use strict";function t(){o.call(this),this.oRequests={}}var n=i(2),o=i(49);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,a,r,l,c,u,p,d,h,m,g,f,b){this.defaultRequest(e,"AdminDomainSave",{Create:t?"1":"0",Name:i,IncHost:n,IncPort:o,IncSecure:s,IncShortLogin:a?"1":"0",UseSieve:r?"1":"0",SieveHost:l,SievePort:c,SieveSecure:u,OutHost:p,OutPort:d,OutSecure:h,OutShortLogin:m?"1":"0",OutAuth:g?"1":"0",OutUsePhpMail:f?"1":"0",WhiteList:b})},t.prototype.testConnectionForDomain=function(e,t,i,n,o,s,a,r,l,c,u,p,d,h){this.defaultRequest(e,"AdminDomainTest",{Name:t,IncHost:i,IncPort:n,IncSecure:o,UseSieve:s?"1":"0",SieveHost:a,SievePort:r,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,t,i){!function(){"use strict";function t(){m.call(this,d)}var n=i(12),o=i(2),s=i(3),a=i(59),r=i(4),l=i(1),c=i(11),u=i(8),p=i(20),d=i(16),h=i(5),m=i(35);o.extend(t.prototype,m.prototype),t.prototype.remote=function(){return d},t.prototype.data=function(){return p},t.prototype.reloadDomainList=function(){p.domains.loading(!0),d.domainList(function(e,t){if(p.domains.loading(!1),r.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);p.domains(i)}})},t.prototype.reloadPluginList=function(){p.plugins.loading(!0),d.pluginList(function(e,t){if(p.plugins.loading(!1),r.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);p.plugins(i)}})},t.prototype.reloadPackagesList=function(){p.packages.loading(!0),p.packagesReal(!0),d.packagesList(function(e,t){if(p.packages.loading(!1),r.StorageResultType.Success===e&&t&&t.Result){p.packagesReal(!!t.Result.Real),p.packagesMainUpdatable(!!t.Result.MainUpdatable);var i=[],n={};o.each(p.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}))),p.packages(i)}else p.packagesReal(!1)})},t.prototype.updateCoreData=function(){p.coreUpdating(!0),d.updateCoreData(function(e,t){p.coreUpdating(!1),p.coreRemoteVersion(""),p.coreRemoteRelease(""),p.coreVersionCompare(-2),r.StorageResultType.Success===e&&t&&t.Result?(p.coreReal(!0),n.location.reload()):p.coreReal(!1)})},t.prototype.reloadCoreData=function(){p.coreChecking(!0),p.coreReal(!0),d.coreData(function(e,t){p.coreChecking(!1),r.StorageResultType.Success===e&&t&&t.Result?(p.coreReal(!!t.Result.Real),p.coreChannel(t.Result.Channel||"stable"),p.coreType(t.Result.Type||"stable"),p.coreUpdatable(!!t.Result.Updatable),p.coreAccess(!!t.Result.Access),p.coreRemoteVersion(t.Result.RemoteVersion||""),p.coreRemoteRelease(t.Result.RemoteRelease||""),p.coreVersionCompare(l.pInt(t.Result.VersionCompare))):(p.coreReal(!1),p.coreChannel("stable"),p.coreType("stable"),p.coreRemoteVersion(""),p.coreRemoteRelease(""),p.coreVersionCompare(-2))})},t.prototype.reloadLicensing=function(e){e=l.isUnd(e)?!1:!!e,p.licensingProcess(!0),p.licenseError(""),d.licensing(function(e,t){p.licensingProcess(!1),r.StorageResultType.Success===e&&t&&t.Result&&l.isNormal(t.Result.Expired)?(p.licenseValid(!0),p.licenseExpired(l.pInt(t.Result.Expired)),p.licenseError(""),p.licensing(!0)):t&&t.ErrorCode&&-1<l.inArray(l.pInt(t.ErrorCode),[r.Notification.LicensingServerIsUnavailable,r.Notification.LicensingExpired])?(p.licenseError(l.getNotification(l.pInt(t.ErrorCode))),p.licensing(!0)):r.StorageResultType.Abort===e?(p.licenseError(l.getNotification(r.Notification.LicensingServerIsUnavailable)),p.licensing(!0)):p.licensing(!1)
},e)},t.prototype.bootstart=function(){m.prototype.bootstart.call(this),p.populateDataOnStart(),h.hideLoading(),u.settingsGet("AllowAdminPanel")?h.startScreens(u.settingsGet("Auth")?[i(81)]:[i(80)]):(h.routeOff(),h.setHash(c.root(),!0),h.routeOff(),o.defer(function(){n.location.href="/"})),a&&a.set(100)},e.exports=new t}()},function(e){e.exports=window.key},,function(e,t,i){!function(){"use strict";function t(){s.call(this),this.domains=o.observableArray([]),this.domains.loading=o.observable(!1).extend({throttle:100}),this.plugins=o.observableArray([]),this.plugins.loading=o.observable(!1).extend({throttle:100}),this.packagesReal=o.observable(!0),this.packagesMainUpdatable=o.observable(!0),this.packages=o.observableArray([]),this.packages.loading=o.observable(!1).extend({throttle:100}),this.coreReal=o.observable(!0),this.coreChannel=o.observable("stable"),this.coreType=o.observable("stable"),this.coreUpdatable=o.observable(!0),this.coreAccess=o.observable(!0),this.coreChecking=o.observable(!1).extend({throttle:100}),this.coreUpdating=o.observable(!1).extend({throttle:100}),this.coreRemoteVersion=o.observable(""),this.coreRemoteRelease=o.observable(""),this.coreVersionCompare=o.observable(-2),this.licensing=o.observable(!1),this.licensingProcess=o.observable(!1),this.licenseValid=o.observable(!1),this.licenseExpired=o.observable(0),this.licenseError=o.observable(""),this.licenseTrigger=o.observable(!1),this.adminManLoading=o.computed(function(){return"000"!==[this.domains.loading()?"1":"0",this.plugins.loading()?"1":"0",this.packages.loading()?"1":"0"].join("")},this),this.adminManLoadingVisibility=o.computed(function(){return this.adminManLoading()?"visible":"hidden"},this).extend({rateLimit:300})}var n=i(2),o=i(3),s=i(48);n.extend(t.prototype,s.prototype),t.prototype.populateDataOnStart=function(){s.prototype.populateDataOnStart.call(this)},e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){this.oSettings=i(8),this.oViewModelsHooks={},this.oSimpleHooks={}}var n=i(2),o=i(7),s=i(1);t.prototype.oSettings={},t.prototype.oViewModelsHooks={},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,s,a){o.__APP__&&o.__APP__.remote().defaultRequest(e,t,i,n,s,a)},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){this.email=e||"",this.name=t||"",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.clear=function(){this.email="",this.name=""},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),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="",a="",r=!1,l=!1,c=!1,u=null,p=0,d=0,h=0;h<e.length;){switch(e.substr(h,1)){case'"':r||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,r=!1):(r=!0,p=h);break;case"<":r||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"(":r||l||c||(c=!0,p=h);break;case")":c&&(d=h,a=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===a.length&&(o=e.replace(s,"")),s=n.trim(s).replace(/^[<]+/,"").replace(/[>]+$/,""),o=n.trim(o).replace(/^["']+/,"").replace(/["']+$/,""),a=n.trim(a).replace(/^[(]+/,"").replace(/[)]+$/,""),o=o.replace(/\\\\(.)/g,"$1"),a=a.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(21);t.prototype.oSubs={},t.prototype.sub=function(e,t,i){return 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,i){return t=t||{},t.element=null,i.element&&(t.element=$(i.element),s.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(e){r.call(this),this.value=e.value||"",this.size=e.size||0,this.label=e.label||"",this.enable=a.isUnd(e.enable)?!0:e.enable,this.trigger=e.trigger&&e.trigger.subscribe?e.trigger:null,this.placeholder=e.placeholder||"",this.labeled=!a.isUnd(e.label),this.triggered=!a.isUnd(e.trigger)&&!!this.trigger,this.classForTrigger=o.observable(""),this.className=o.computed(function(){var e=o.unwrap(this.size),t=this.trigger?" "+a.trim("settings-saved-trigger-input "+this.classForTrigger()):"";return(e>0?"span"+e:"")+t},this),!a.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),a=i(1),r=i(26);t.prototype.setTriggerState=function(e){switch(a.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,r.prototype),t.componentExportHelper=r.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(32),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){e.exports=window.moment},function(e,t,i){!function(){"use strict";function t(e){a.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),a=i(26);n.extend(t.prototype,a.prototype),t.prototype.click=function(){this.readOnly||!this.enable()||this.disable()||this.value(!this.value())},t.componentExportHelper=a.componentExportHelper,e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){c.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=a.KeyState.PopupAsk,l.constructorEnd(this)}var n=i(2),o=i(3),s=i(18),a=i(4),r=i(1),l=i(5),c=i(10);l.extendAsViewModel(["View/Popup/Ask","PopupsAskViewModel"],t),n.extend(t.prototype,c.prototype),t.prototype.clearPopup=function(){this.askDesc(""),this.yesButton(r.i18n("POPUPS_ASK/BUTTON_YES")),this.noButton(r.i18n("POPUPS_ASK/BUTTON_NO")),this.yesFocus(!1),this.noFocus(!1),this.fYesAction=null,this.fNoAction=null},t.prototype.yesClick=function(){this.cancelCommand(),r.isFunc(this.fYesAction)&&this.fYesAction.call(null)},t.prototype.noClick=function(){this.cancelCommand(),r.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=r.isUnd(s)?!0:!!s},t.prototype.onFocus=function(){this.bFocusYesOnShow&&this.yesFocus(!0)},t.prototype.onBuild=function(){s("tab, shift+tab, right, left",a.KeyState.PopupAsk,n.bind(function(){return this.yesFocus()?this.noFocus(!0):this.yesFocus(!0),!1},this)),s("esc",a.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(){l.call(this,"Popups","PopupsLanguages"),this.Data=a.__APP__.data(),this.exp=o.observable(!1),this.languages=o.computed(function(){return n.map(this.Data.languages(),function(e){return{key:e,selected:o.observable(!1),fullName:s.convertLangName(e)}})},this),this.Data.mainLanguage.subscribe(function(){this.resetMainLanguage()},this),r.constructorEnd(this)}var n=i(2),o=i(3),s=i(1),a=i(7),r=i(5),l=i(10);r.extendAsViewModel(["View/Popup/Languages","PopupsLanguagesViewModel"],t),n.extend(t.prototype,l.prototype),t.prototype.languageEnName=function(e){var t=s.convertLangName(e,!0);return"English"===t?"":t},t.prototype.resetMainLanguage=function(){var e=this.Data.mainLanguage();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.Data.mainLanguage(e),this.cancelCommand()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(e){p.call(this),this.isLocalAutocomplete=!0,this.iframe=s('<iframe style="display:none" src="javascript:;" />').appendTo("body"),a.$win.on("error",function(t){t&&t.originalEvent&&t.originalEvent.message&&-1===r.inArray(t.originalEvent.message,["Script error.","Uncaught Error: Error calling method on NPObject."])&&e.jsError(r.emptyFunction,t.originalEvent.message,t.originalEvent.filename,t.originalEvent.lineno,n.location&&n.location.toString?n.location.toString():"",a.$html.attr("class"),r.microtime()-a.now)}),a.$doc.on("keydown",function(e){e&&e.ctrlKey&&a.$html.addClass("rl-ctrl-key-pressed")}).on("keyup",function(e){e&&!e.ctrlKey&&a.$html.removeClass("rl-ctrl-key-pressed")})}var n=i(12),o=i(2),s=i(13),a=i(7),r=i(1),l=i(11),c=i(25),u=i(8),p=i(46);o.extend(t.prototype,p.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):(a.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=!!u.settingsGet("AllowGoogleSocial")&&!!u.settingsGet("AllowGoogleSocialPreview")),this.googlePreviewSupportedCache},t.prototype.setTitle=function(e){e=(r.isNormal(e)&&0<e.length?e+" - ":"")+u.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),a=r.pString(u.settingsGet("CustomLogoutLink")),c=!!u.settingsGet("InIframe");e=r.isUnd(e)?!1:!!e,t=r.isUnd(t)?!1:!!t,e&&this.clearClientSideToken(),e&&t&&n.close&&n.close(),a=a||"./",e&&n.location.href!==a?o.delay(function(){c&&n.parent?n.parent.location.href=a:n.location.href=a},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(61),t=i(3);t.components.register("SaveTrigger",i(43)),t.components.register("Input",i(40)),t.components.register("Select",i(44)),t.components.register("TextArea",i(45)),t.components.register("Radio",i(42)),u.settingsGet("MaterialDesign")&&a.bAnimationSupported?t.components.register("Checkbox",i(41)):t.components.register("Checkbox",i(39)),r.initOnStartOrLangChange(function(){r.initNotificationLanguage()},null),o.delay(function(){r.windowResize()},1e3),e.addState({id:"mobile",maxWidth:767,onEnter:function(){a.$html.addClass("ssm-state-mobile"),c.pub("ssm.mobile-enter")},onLeave:function(){a.$html.removeClass("ssm-state-mobile"),c.pub("ssm.mobile-leave")}}),e.addState({id:"tablet",minWidth:768,maxWidth:999,onEnter:function(){a.$html.addClass("ssm-state-tablet")},onLeave:function(){a.$html.removeClass("ssm-state-tablet")}}),e.addState({id:"desktop",minWidth:1e3,maxWidth:1400,onEnter:function(){a.$html.addClass("ssm-state-desktop")},onLeave:function(){a.$html.removeClass("ssm-state-desktop")}}),e.addState({id:"desktop-large",minWidth:1400,onEnter:function(){a.$html.addClass("ssm-state-desktop-large")},onLeave:function(){a.$html.removeClass("ssm-state-desktop-large")}}),c.sub("ssm.mobile-enter",function(){a.leftPanelDisabled(!0)}),c.sub("ssm.mobile-leave",function(){a.leftPanelDisabled(!1)}),a.leftPanelDisabled.subscribe(function(e){a.$html.toggleClass("rl-left-panel-disabled",e)}),e.ready()},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(a.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),a=i(26);t.prototype.click=function(e){!this.readOnly&&e&&this.value(e.value)},n.extend(t.prototype,a.prototype),t.componentExportHelper=a.componentExportHelper,e.exports=t}()},function(e,t,i){!function(){"use strict";function t(e){o.call(this,e)}var n=i(2),o=i(30);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(27);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(30);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(38);n.extend(t.prototype,o.prototype),e.exports=o.componentExportHelper(t,"RadioComponent")}()},function(e,t,i){!function(){"use strict";function t(e){a.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),a=i(26);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,a.prototype),e.exports=a.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(27);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(27);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(e){u.call(this,"settings",e),this.menu=s.observableArray([]),this.oCurrentSubScreen=null,this.oViewModelPlace=null,this.setupSettings()}var n=i(2),o=i(13),s=i(3),a=i(7),r=i(1),l=i(11),c=i(5),u=i(28);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(a.aViewModels.settings,function(t){return t&&t.__rlSettingsData&&e===t.__rlSettingsData.Route}),u&&(n.find(a.aViewModels["settings-removed"],function(e){return e&&e===u})&&(u=null),u&&n.find(a.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),r.delegateRun(i,"onBuild",[d])):r.log("Cannot find sub settings view model position: SettingsSubScreen")),i&&n.defer(function(){t.oCurrentSubScreen&&(r.delegateRun(t.oCurrentSubScreen,"onHide"),t.oCurrentSubScreen.viewModelDom.hide()),t.oCurrentSubScreen=i,t.oCurrentSubScreen&&(t.oCurrentSubScreen.viewModelDom.show(),r.delegateRun(t.oCurrentSubScreen,"onShow"),r.delegateRun(t.oCurrentSubScreen,"onFocus",[],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)),r.windowResize()})):c.setHash(l.settings(),!1,!0)},t.prototype.onHide=function(){this.oCurrentSubScreen&&this.oCurrentSubScreen.viewModelDom&&(r.delegateRun(this.oCurrentSubScreen,"onHide"),this.oCurrentSubScreen.viewModelDom.hide())},t.prototype.onBuild=function(){n.each(a.aViewModels.settings,function(e){e&&e.__rlSettingsData&&!n.find(a.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(a.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(a.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=r.isUnd(i.subname)?t:r.pString(i.subname),[i.subname]}};return[["{subname}/",i],["{subname}",i],["",i]]},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){o.initDataConstructorBySettings(this)}var n=i(4),o=i(1),s=i(8);t.prototype.populateDataOnStart=function(){var e=o.pInt(s.settingsGet("Layout")),t=s.settingsGet("Languages"),i=s.settingsGet("Themes");o.isArray(t)&&this.languages(t),o.isArray(i)&&this.themes(i),this.mainLanguage(s.settingsGet("Language")),this.mainTheme(s.settingsGet("Theme")),this.themeBackgroundName(s.settingsGet("UserBackgroundName")),this.themeBackgroundHash(s.settingsGet("UserBackgroundHash")),this.capaAdditionalAccounts(s.capa(n.Capa.AdditionalAccounts)),this.capaAdditionalIdentities(s.capa(n.Capa.AdditionalIdentities)),this.capaGravatar(s.capa(n.Capa.Gravatar)),this.capaAttachmentThumbnails(s.capa(n.Capa.AttachmentThumbnails)),this.capaSieve(s.capa(n.Capa.Sieve)),this.determineUserLanguage(!!s.settingsGet("DetermineUserLanguage")),this.determineUserDomain(!!s.settingsGet("DetermineUserDomain")),this.weakPassword(!!s.settingsGet("WeakPassword")),this.capaThemes(s.capa(n.Capa.Themes)),this.capaUserBackground(s.capa(n.Capa.UserBackground)),this.allowLanguagesOnLogin(!!s.settingsGet("AllowLanguagesOnLogin")),this.allowLanguagesOnSettings(!!s.settingsGet("AllowLanguagesOnSettings")),this.useLocalProxyForExternalImages(!!s.settingsGet("UseLocalProxyForExternalImages")),this.editorDefaultType(s.settingsGet("EditorDefaultType")),this.showImages(!!s.settingsGet("ShowImages")),this.contactsAutosave(!!s.settingsGet("ContactsAutosave")),this.interfaceAnimation(s.settingsGet("InterfaceAnimation")),this.mainMessagesPerPage(s.settingsGet("MPP")),this.desktopNotifications(!!s.settingsGet("DesktopNotifications")),this.useThreads(!!s.settingsGet("UseThreads")),this.replySameFolder(!!s.settingsGet("ReplySameFolder")),this.useCheckboxesInList(!!s.settingsGet("UseCheckboxesInList")),this.layout(n.Layout.SidePreview),-1<o.inArray(e,[n.Layout.NoPreview,n.Layout.SidePreview,n.Layout.BottomPreview])&&this.layout(e),this.facebookSupported(!!s.settingsGet("SupportedFacebookSocial")),this.facebookEnable(!!s.settingsGet("AllowFacebookSocial")),this.facebookAppID(s.settingsGet("FacebookAppID")),this.facebookAppSecret(s.settingsGet("FacebookAppSecret")),this.twitterEnable(!!s.settingsGet("AllowTwitterSocial")),this.twitterConsumerKey(s.settingsGet("TwitterConsumerKey")),this.twitterConsumerSecret(s.settingsGet("TwitterConsumerSecret")),this.googleEnable(!!s.settingsGet("AllowGoogleSocial")),this.googleEnable.auth(!!s.settingsGet("AllowGoogleSocialAuth")),this.googleEnable.drive(!!s.settingsGet("AllowGoogleSocialDrive")),this.googleEnable.preview(!!s.settingsGet("AllowGoogleSocialPreview")),this.googleClientID(s.settingsGet("GoogleClientID")),this.googleClientSecret(s.settingsGet("GoogleClientSecret")),this.googleApiKey(s.settingsGet("GoogleApiKey")),this.dropboxEnable(!!s.settingsGet("AllowDropboxSocial")),this.dropboxApiKey(s.settingsGet("DropboxApiKey")),this.contactsIsAllowed(!!s.settingsGet("ContactsIsAllowed"))},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.oRequests={}}var n=i(12),o=i(2),s=i(13),a=i(15),r=i(4),l=i(7),c=i(1),u=i(21),p=i(11),d=i(8);t.prototype.oRequests={},t.prototype.defaultResponse=function(e,t,i,n,s,p){var d=function(){r.StorageResultType.Success!==i&&l.bUnload&&(i=r.StorageResultType.Unload),r.StorageResultType.Success===i&&n&&!n.Result?(n&&-1<c.inArray(n.ErrorCode,[r.Notification.AuthError,r.Notification.AccessError,r.Notification.ConnectionError,r.Notification.DomainNotAllowed,r.Notification.AccountNotAllowed,r.Notification.MailServerError,r.Notification.UnknownNotification,r.Notification.UnknownError])&&l.iAjaxErrorCount++,n&&r.Notification.InvalidToken===n.ErrorCode&&l.iTokenErrorCount++,a.Values.TokenErrorLimit<l.iTokenErrorCount&&l.__APP__&&l.__APP__.loginAndLogoutReload(!0),(n.ClearAuth||n.Logout||a.Values.AjaxErrorLimit<l.iAjaxErrorCount)&&l.__APP__&&(l.__APP__.clearClientSideToken(),n.ClearAuth||l.__APP__.loginAndLogoutReload(!0))):r.StorageResultType.Success===i&&n&&n.Result&&(l.iAjaxErrorCount=0,l.iTokenErrorCount=0),e&&(u.runHook("ajax-default-response",[t,r.StorageResultType.Success===i?n:null,i,s,p]),e(i,r.StorageResultType.Success===i?n:null,s,t,p))};switch(i){case"success":i=r.StorageResultType.Success;break;case"abort":i=r.StorageResultType.Abort;break;default:i=r.StorageResultType.Error}r.StorageResultType.Error===i?o.delay(d,300):d()},t.prototype.ajaxRequest=function(e,t,i,a,r){var l=this,u=""===a,h={},m=(new n.Date).getTime(),g=null,f="";return t=t||{},i=c.isNormal(i)?i:2e4,a=c.isUnd(a)?"":c.pString(a),r=c.isArray(r)?r:[],f=t.Action||"",f&&0<r.length&&o.each(r,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")),g=s.ajax({type:u?"POST":"GET",url:p.ajax(a),async:!0,dataType:"json",data:u?t:{},headers:h,timeout:i,global:!0}),g.always(function(i,o){var s=!1;i&&i.Time&&(s=c.pInt(i.Time)>(new n.Date).getTime()-m),f&&l.oRequests[f]&&(l.oRequests[f].__aborted&&(o="abort"),l.oRequests[f]=null),l.defaultResponse(e,f,o,i,s,t)}),f&&0<r.length&&-1<c.inArray(f,r)&&(this.oRequests[f]&&(this.oRequests[f].__aborted=!0,this.oRequests[f].abort&&this.oRequests[f].abort(),this.oRequests[f]=null),this.oRequests[f]=g),g},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)?a.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,a){this.defaultRequest(e,"JsError",{Message:t,FileName:i,LineNo:n,Location:o,HtmlCapa:s,TimeOnPage:a})},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";e.exports=function(e){var t=i(12),n=i(2),o=i(13),s=i(7),a=i(21),r=i(1),l=i(4),c=i(23);s.__APP__=e,s.$win.keydown(r.killCtrlAandS).keyup(r.killCtrlAandS).unload(function(){s.bUnload=!0}),s.$html.addClass(s.bMobileDevice?"mobile":"no-mobile").on("click.dropdown.data-api",function(){r.detectDropdownVisibility()}),t.rl=t.rl||{},t.rl.addHook=n.bind(a.addHook,a),t.rl.settingsGet=n.bind(a.mainSettingsGet,a),t.rl.remoteRequest=n.bind(a.remoteRequest,a),t.rl.pluginSettingsGet=n.bind(a.settingsGet,a),t.rl.createCommand=r.createCommand,t.rl.i18n=r.i18n,t.rl.EmailModel=c,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(){o.call(this,"login",[i(111)])}var n=i(2),o=i(28);n.extend(t.prototype,o.prototype),t.prototype.onShow=function(){i(17).setTitle("")},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){s.call(this,[i(112),i(113)])}var n=i(2),o=i(5),s=i(47);n.extend(t.prototype,s.prototype),t.prototype.setupSettings=function(e){o.addSettingsViewModel(i(90),"AdminSettingsGeneral","General","general",!0),o.addSettingsViewModel(i(92),"AdminSettingsLogin","Login","login"),o.addSettingsViewModel(i(87),"AdminSettingsBranding","Branding","branding"),o.addSettingsViewModel(i(88),"AdminSettingsContacts","Contacts","contacts"),o.addSettingsViewModel(i(89),"AdminSettingsDomains","Domains","domains"),o.addSettingsViewModel(i(95),"AdminSettingsSecurity","Security","security"),o.addSettingsViewModel(i(96),"AdminSettingsSocial","Integrations","integrations"),o.addSettingsViewModel(i(94),"AdminSettingsPlugins","Plugins","plugins"),o.addSettingsViewModel(i(93),"AdminSettingsPackages","Packages","packages"),o.addSettingsViewModel(i(91),"AdminSettingsLicensing","Licensing","licensing"),o.addSettingsViewModel(i(86),"AdminSettingsAbout","About","about"),e&&e()},t.prototype.onShow=function(){i(17).setTitle("")},e.exports=t}()},,,,,function(e,t,i){!function(){"use strict";function t(){var e=i(8),t=i(20);this.version=n.observable(e.settingsGet("Version")),this.access=n.observable(!!e.settingsGet("CoreAccess")),this.errorDesc=n.observable(""),this.coreReal=t.coreReal,this.coreChannel=t.coreChannel,this.coreType=t.coreType,this.coreUpdatable=t.coreUpdatable,this.coreAccess=t.coreAccess,this.coreChecking=t.coreChecking,this.coreUpdating=t.coreUpdating,this.coreRemoteVersion=t.coreRemoteVersion,this.coreRemoteRelease=t.coreRemoteRelease,this.coreVersionCompare=t.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);t.prototype.onBuild=function(){this.access()&&i(17).reloadCoreData()},t.prototype.updateCoreData=function(){this.coreUpdating()||i(17).updateCoreData()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){var e=i(4),t=i(8);this.capa=!!t.settingsGet("PremType"),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.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.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(16);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),a=s.settingsSaveHelperSimpleFunction(e.loginDescription.trigger,e),r=s.settingsSaveHelperSimpleFunction(e.loginCss.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.loginDescription.subscribe(function(e){t.saveAdminConfig(a,{LoginDescription:s.trim(e)})}),e.loginCss.subscribe(function(e){t.saveAdminConfig(r,{LoginCss: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(16);this.defautOptionsAfterRender=a.defautOptionsAfterRender,this.enableContacts=o.observable(!!r.settingsGet("ContactsEnable")),this.contactsSharing=o.observable(!!r.settingsGet("ContactsSharing")),this.contactsSync=o.observable(!!r.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};r.settingsGet("SQLiteIsSupported")&&l.push("sqlite"),r.settingsGet("MySqlIsSupported")&&l.push("mysql"),r.settingsGet("PostgreSqlIsSupported")&&l.push("pgsql"),this.contactsSupported=0<l.length,this.contactsTypes=o.observableArray([]),this.contactsTypesOptions=this.contactsTypes.map(function(e){var t=-1===a.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<a.inArray(e,l)?this.contactsType(e):0<l.length&&this.contactsType(""):this.contactsType.valueHasMutated()}}),this.contactsType.subscribe(function(){this.testContactsSuccess(!1),this.testContactsError(!1),this.testContactsErrorMessage("")},this),this.pdoDsn=o.observable(r.settingsGet("ContactsPdoDsn")),this.pdoUser=o.observable(r.settingsGet("ContactsPdoUser")),this.pdoPassword=o.observable(r.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=a.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(r.settingsGet("ContactsPdoType")),this.onTestContactsResponse=n.bind(this.onTestContactsResponse,this)}var n=i(2),o=i(3),s=i(4),a=i(1),r=i(8);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(16);n.delay(function(){var i=a.settingsSaveHelperSimpleFunction(e.pdoDsnTrigger,e),n=a.settingsSaveHelperSimpleFunction(e.pdoUserTrigger,e),o=a.settingsSaveHelperSimpleFunction(e.pdoPasswordTrigger,e),s=a.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:a.trim(e)})}),e.pdoUser.subscribe(function(e){t.saveAdminConfig(n,{ContactsPdoUser:a.trim(e)})}),e.pdoPassword.subscribe(function(e){t.saveAdminConfig(o,{ContactsPdoPassword:a.trim(e)})}),e.contactsType(r.settingsGet("ContactsPdoType"))},50)},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.domains=l.domains,this.iDomainForDeletionTimeout=0,this.visibility=s.computed(function(){return l.domains.loading()?"visible":"hidden"},this),this.domainForDeletion=s.observable(null).extend({toggleSubscribe:[this,function(e){e&&e.deleteAccess(!1)},function(e){e&&(e.deleteAccess(!0),this.startDomainForDeletionTimeout())}]})}var n=i(12),o=i(2),s=i(3),a=i(4),r=i(118),l=i(20),c=i(16);t.prototype.startDomainForDeletionTimeout=function(){var e=this;n.clearInterval(this.iDomainForDeletionTimeout),this.iDomainForDeletionTimeout=n.setTimeout(function(){e.domainForDeletion(null)},3e3)},t.prototype.createDomain=function(){i(5).showScreenPopup(r)},t.prototype.deleteDomain=function(e){this.domains.remove(e),c.domainDelete(o.bind(this.onDomainListChangeRequest,this),e.name)},t.prototype.disableDomain=function(e){e.disabled(!e.disabled()),c.domainDisable(o.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=s.dataFor(this);e&&c.domain(o.bind(t.onDomainLoadRequest,t),e.name)}),i(17).reloadDomainList()},t.prototype.onDomainLoadRequest=function(e,t){a.StorageResultType.Success===e&&t&&t.Result&&i(5).showScreenPopup(r,[t.Result])},t.prototype.onDomainListChangeRequest=function(){i(17).reloadDomainList()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.mainLanguage=c.mainLanguage,this.mainTheme=c.mainTheme,this.language=c.language,this.theme=c.theme,this.capaThemes=c.capaThemes,this.capaUserBackground=c.capaUserBackground,this.allowLanguagesOnSettings=c.allowLanguagesOnSettings,this.capaGravatar=c.capaGravatar,this.capaAdditionalAccounts=c.capaAdditionalAccounts,this.capaAdditionalIdentities=c.capaAdditionalIdentities,this.capaAttachmentThumbnails=c.capaAttachmentThumbnails,this.weakPassword=c.weakPassword,this.mainAttachmentLimit=o.observable(a.pInt(l.settingsGet("AttachmentLimit"))/1048576).extend({posInterer:25}),this.uploadData=l.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(c.themes(),function(e){return{optValue:e,optText:a.convertThemeName(e)}})}),this.mainLanguageFullName=o.computed(function(){return a.convertLangName(this.mainLanguage())},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),a=i(1),r=i(11),l=i(8),c=i(20);t.prototype.onBuild=function(){var e=this,t=i(16);n.delay(function(){var i=a.settingsSaveHelperSimpleFunction(e.attachmentLimitTrigger,e),n=a.settingsSaveHelperSimpleFunction(e.languageTrigger,e),o=a.settingsSaveHelperSimpleFunction(e.themeTrigger,e);e.mainAttachmentLimit.subscribe(function(e){t.saveAdminConfig(i,{AttachmentLimit:a.pInt(e)})}),e.language.subscribe(function(e){t.saveAdminConfig(n,{Language:a.trim(e)})}),e.theme.subscribe(function(i){a.changeTheme(i,"",e.themeTrigger),t.saveAdminConfig(o,{Theme:a.trim(i)})}),e.capaAdditionalAccounts.subscribe(function(e){t.saveAdminConfig(null,{CapaAdditionalAccounts:e?"1":"0"})}),e.capaAdditionalIdentities.subscribe(function(e){t.saveAdminConfig(null,{CapaAdditionalIdentities: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(34))},t.prototype.phpInfoLink=function(){return r.phpInfo()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.licensing=a.licensing,this.licensingProcess=a.licensingProcess,this.licenseValid=a.licenseValid,this.licenseExpired=a.licenseExpired,this.licenseError=a.licenseError,this.licenseTrigger=a.licenseTrigger,this.adminDomain=n.observable(""),this.subscriptionEnabled=n.observable(!!s.settingsGet("SubscriptionEnabled")),this.licenseTrigger.subscribe(function(){this.subscriptionEnabled()&&i(17).reloadLicensing(!0)},this)}var n=i(3),o=i(29),s=i(8),a=i(20);t.prototype.onBuild=function(){this.subscriptionEnabled()&&i(17).reloadLicensing(!1)},t.prototype.onShow=function(){this.adminDomain(s.settingsGet("AdminDomain"))},t.prototype.showActivationForm=function(){i(5).showScreenPopup(i(114))},t.prototype.licenseIsUnlim=function(){return 1898625600===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=l.determineUserLanguage,this.determineUserDomain=l.determineUserDomain,this.defaultDomain=o.observable(r.settingsGet("LoginDefaultDomain")),this.allowLanguagesOnLogin=l.allowLanguagesOnLogin,this.defaultDomainTrigger=o.observable(s.SaveSettingsStep.Idle),this.dummy=o.observable(!1)}var n=i(2),o=i(3),s=i(4),a=i(1),r=i(8),l=i(20);t.prototype.onBuild=function(){var e=this,t=i(16);n.delay(function(){var i=a.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:a.trim(e)})})},50)},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.packagesError=o.observable(""),this.packages=r.packages,this.packagesReal=r.packagesReal,this.packagesMainUpdatable=r.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=o.computed(function(){return r.packages.loading()?"visible":"hidden"},this)}var n=i(12),o=i(3),s=i(4),a=i(1),r=i(20),l=i(16);t.prototype.onShow=function(){this.packagesError("")},t.prototype.onBuild=function(){i(17).reloadPackagesList()},t.prototype.requestHelper=function(e,t){var o=this;return function(l,c){s.StorageResultType.Success===l&&c&&c.Result||o.packagesError(c&&c.ErrorCode?a.getNotification(c.ErrorCode):a.getNotification(t?s.Notification.CantInstallPackage:s.Notification.CantDeletePackage)),_.each(r.packages(),function(t){t&&e&&t.loading()&&e.file===t.file&&(e.loading(!1),t.loading(!1))}),s.StorageResultType.Success===l&&c&&c.Result&&c.Result.Reload?n.location.reload():i(17).reloadPackagesList()}},t.prototype.deletePackage=function(e){e&&(e.loading(!0),l.packageDelete(this.requestHelper(e,!1),e))},t.prototype.installPackage=function(e){e&&(e.loading(!0),l.packageInstall(this.requestHelper(e,!0),e))},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.enabledPlugins=o.observable(!!r.settingsGet("EnabledPlugins")),this.pluginsError=o.observable(""),this.plugins=l.plugins,this.visibility=o.computed(function(){return l.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),a=i(1),r=i(8),l=i(20),c=i(16);t.prototype.disablePlugin=function(e){e.disabled(!e.disabled()),c.pluginDisable(this.onPluginDisableRequest,e.name,e.disabled())},t.prototype.configurePlugin=function(e){c.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){c.saveAdminConfig(a.emptyFunction,{EnabledPlugins:e?"1":"0"})})},t.prototype.onShow=function(){this.pluginsError(""),i(17).reloadPluginList()},t.prototype.onPluginLoadRequest=function(e,t){s.StorageResultType.Success===e&&t&&t.Result&&i(5).showScreenPopup(i(121),[t.Result])},t.prototype.onPluginDisableRequest=function(e,t){s.StorageResultType.Success===e&&t&&!t.Result&&t.ErrorCode&&this.pluginsError(s.Notification.UnsupportedPluginPackage===t.ErrorCode&&t.ErrorMessage&&""!==t.ErrorMessage?t.ErrorMessage:a.getNotification(t.ErrorCode)),i(17).reloadPluginList()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.useLocalProxyForExternalImages=c.useLocalProxyForExternalImages,this.weakPassword=c.weakPassword,this.capaOpenPGP=o.observable(l.capa(s.Capa.OpenPGP)),this.capaTwoFactorAuth=o.observable(l.capa(s.Capa.TwoFactor)),this.verifySslCertificate=o.observable(!!l.settingsGet("VerifySslCertificate")),this.allowSelfSigned=o.observable(!!l.settingsGet("AllowSelfSigned")),this.adminLogin=o.observable(l.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=a.createCommand(this,function(){return""===a.trim(this.adminLogin())?(this.adminLoginError(!0),!1):this.adminPasswordNew()!==this.adminPasswordNew2()?(this.adminPasswordNewError(!0),!1):(this.adminPasswordUpdateError(!1),this.adminPasswordUpdateSuccess(!1),void u.saveNewAdminPassword(this.onNewAdminPasswordResponse,{Login:this.adminLogin(),Password:this.adminPassword(),NewPassword:this.adminPasswordNew()}))},function(){return""!==a.trim(this.adminLogin())&&""!==this.adminPassword()}),this.onNewAdminPasswordResponse=n.bind(this.onNewAdminPasswordResponse,this)}var n=i(2),o=i(3),s=i(4),a=i(1),r=i(11),l=i(8),c=i(20),u=i(16);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(){var e=i(16);this.capaOpenPGP.subscribe(function(t){e.saveAdminConfig(a.emptyFunction,{CapaOpenPGP:t?"1":"0"})}),this.capaTwoFactorAuth.subscribe(function(t){e.saveAdminConfig(a.emptyFunction,{CapaTwoFactorAuth:t?"1":"0"})}),this.useLocalProxyForExternalImages.subscribe(function(t){e.saveAdminConfig(null,{UseLocalProxyForExternalImages:t?"1":"0"})}),this.verifySslCertificate.subscribe(function(t){e.saveAdminConfig(null,{VerifySslCertificate:t?"1":"0"})}),this.allowSelfSigned.subscribe(function(t){e.saveAdminConfig(null,{AllowSelfSigned:t?"1":"0"})})},t.prototype.onHide=function(){this.adminPassword(""),this.adminPasswordNew(""),this.adminPasswordNew2("")},t.prototype.phpInfoLink=function(){return r.phpInfo()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){var e=i(20);this.googleEnable=e.googleEnable,this.googleClientID=e.googleClientID,this.googleApiKey=e.googleApiKey,this.googleClientSecret=e.googleClientSecret,this.googleTrigger1=o.observable(s.SaveSettingsStep.Idle),this.googleTrigger2=o.observable(s.SaveSettingsStep.Idle),this.googleTrigger3=o.observable(s.SaveSettingsStep.Idle),this.facebookSupported=e.facebookSupported,this.facebookEnable=e.facebookEnable,this.facebookAppID=e.facebookAppID,this.facebookAppSecret=e.facebookAppSecret,this.facebookTrigger1=o.observable(s.SaveSettingsStep.Idle),this.facebookTrigger2=o.observable(s.SaveSettingsStep.Idle),this.twitterEnable=e.twitterEnable,this.twitterConsumerKey=e.twitterConsumerKey,this.twitterConsumerSecret=e.twitterConsumerSecret,this.twitterTrigger1=o.observable(s.SaveSettingsStep.Idle),this.twitterTrigger2=o.observable(s.SaveSettingsStep.Idle),this.dropboxEnable=e.dropboxEnable,this.dropboxApiKey=e.dropboxApiKey,this.dropboxTrigger1=o.observable(s.SaveSettingsStep.Idle)}var n=i(2),o=i(3),s=i(4),a=i(1);t.prototype.onBuild=function(){var e=this,t=i(16);n.delay(function(){var i=a.settingsSaveHelperSimpleFunction(e.facebookTrigger1,e),n=a.settingsSaveHelperSimpleFunction(e.facebookTrigger2,e),o=a.settingsSaveHelperSimpleFunction(e.twitterTrigger1,e),s=a.settingsSaveHelperSimpleFunction(e.twitterTrigger2,e),r=a.settingsSaveHelperSimpleFunction(e.googleTrigger1,e),l=a.settingsSaveHelperSimpleFunction(e.googleTrigger2,e),c=a.settingsSaveHelperSimpleFunction(e.googleTrigger3,e),u=a.settingsSaveHelperSimpleFunction(e.dropboxTrigger1,e);e.facebookEnable.subscribe(function(i){e.facebookSupported()&&t.saveAdminConfig(a.emptyFunction,{FacebookEnable:i?"1":"0"})}),e.facebookAppID.subscribe(function(n){e.facebookSupported()&&t.saveAdminConfig(i,{FacebookAppID:a.trim(n)})}),e.facebookAppSecret.subscribe(function(i){e.facebookSupported()&&t.saveAdminConfig(n,{FacebookAppSecret:a.trim(i)})}),e.twitterEnable.subscribe(function(e){t.saveAdminConfig(a.emptyFunction,{TwitterEnable:e?"1":"0"})}),e.twitterConsumerKey.subscribe(function(e){t.saveAdminConfig(o,{TwitterConsumerKey:a.trim(e)})}),e.twitterConsumerSecret.subscribe(function(e){t.saveAdminConfig(s,{TwitterConsumerSecret:a.trim(e)})}),e.googleEnable.subscribe(function(e){t.saveAdminConfig(a.emptyFunction,{GoogleEnable:e?"1":"0"})}),e.googleEnable.auth.subscribe(function(e){t.saveAdminConfig(a.emptyFunction,{GoogleEnableAuth:e?"1":"0"})}),e.googleEnable.drive.subscribe(function(e){t.saveAdminConfig(a.emptyFunction,{GoogleEnableDrive:e?"1":"0"})}),e.googleEnable.preview.subscribe(function(e){t.saveAdminConfig(a.emptyFunction,{GoogleEnablePreview:e?"1":"0"})}),e.googleClientID.subscribe(function(e){t.saveAdminConfig(r,{GoogleClientID:a.trim(e)})}),e.googleClientSecret.subscribe(function(e){t.saveAdminConfig(l,{GoogleClientSecret:a.trim(e)})}),e.googleApiKey.subscribe(function(e){t.saveAdminConfig(c,{GoogleApiKey:a.trim(e)})}),e.dropboxEnable.subscribe(function(e){t.saveAdminConfig(a.emptyFunction,{DropboxEnable:e?"1":"0"})}),e.dropboxApiKey.subscribe(function(e){t.saveAdminConfig(u,{DropboxApiKey:a.trim(e)})})},50)},e.exports=t}()},,,,,,,,,,,,,,,function(e,t,i){!function(){"use strict";function t(){u.call(this,"Center","AdminLogin"),this.logoPowered=!!r.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=a.createCommand(this,function(){return a.triggerAutocompleteInputChange(),this.loginError(""===a.trim(this.login())),this.passwordError(""===a.trim(this.password())),this.loginError()||this.passwordError()?!1:(this.submitRequest(!0),l.adminLogin(n.bind(function(e,t){s.StorageResultType.Success===e&&t&&"AdminLogin"===t.Action?t.Result?i(17).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()}),c.constructorEnd(this)}var n=i(2),o=i(3),s=i(4),a=i(1),r=i(8),l=i(16),c=i(5),u=i(10);c.extendAsViewModel(["View/Admin/Login","AdminLoginViewModel"],t),n.extend(t.prototype,u.prototype),t.prototype.onShow=function(){c.routeOff(),n.delay(n.bind(function(){this.loginFocus(!0)},this),100)},t.prototype.onHide=function(){this.loginFocus(!1)},t.prototype.onBuild=function(){a.triggerAutocompleteInputChange(!0)},t.prototype.submitForm=function(){this.submitCommand()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(e){a.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),a=i(10);s.extendAsViewModel(["View/Admin/Settings/Menu","AdminSettingsMenuViewModel"],t),n.extend(t.prototype,a.prototype),t.prototype.link=function(e){return"#/"+e},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){c.call(this,"Right","AdminPane"),this.adminDomain=o.observable(s.settingsGet("AdminDomain")),this.version=o.observable(s.settingsGet("Version")),this.adminManLoadingVisibility=a.adminManLoadingVisibility,this.capa=!!s.settingsGet("PremType"),l.constructorEnd(this)}var n=i(2),o=i(3),s=i(8),a=i(20),r=i(16),l=i(5),c=i(10);l.extendAsViewModel(["View/Admin/Settings/Pane","AdminSettingsPaneViewModel"],t),n.extend(t.prototype,c.prototype),t.prototype.logoutClick=function(){r.adminLogout(function(){i(17).loginAndLogoutReload(!0)})},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){p.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=l.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=a.createCommand(this,function(){this.activateProcess(!0),this.validateSubscriptionKey()?c.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(a.getNotification(i.ErrorCode)),e.activateText.isError(!0),e.key.focus(!0)):(e.activateText(a.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()}),u.constructorEnd(this)}var n=i(2),o=i(3),s=i(4),a=i(1),r=i(8),l=i(20),c=i(16),u=i(5),p=i(10);u.extendAsViewModel(["View/Popup/Activate","PopupsActivateViewModel"],t),n.extend(t.prototype,p.prototype),t.prototype.onShow=function(){this.domain(r.settingsGet("AdminDomain")),this.activateProcess()||(this.key(""),this.activateText(""),this.activateText.isError(!1),this.activationSuccessed(!1))},t.prototype.onFocus=function(){this.activateProcess()||this.key.focus(!0)},t.prototype.validateSubscriptionKey=function(){var e=this.key();return""===e||!!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(a.trim(e))},e.exports=t}()},,,,function(e,t,i){!function(){"use strict";function t(){p.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.testingSmtpError=o.observable(!1),this.testingImapErrorDesc=o.observable(""),this.testingSmtpErrorDesc=o.observable(""),this.testingImapError.subscribe(function(e){e||this.testingImapErrorDesc("")},this),this.testingSmtpError.subscribe(function(e){e||this.testingSmtpErrorDesc("")},this),this.testingImapErrorDesc=o.observable(""),this.testingSmtpErrorDesc=o.observable(""),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.allowSieve=o.observable(c.capa(s.Capa.Sieve)),this.imapServer=o.observable(""),this.imapPort=o.observable(""+a.Values.ImapDefaulPort),this.imapSecure=o.observable(s.ServerSecure.None),this.imapShortLogin=o.observable(!1),this.useSieve=o.observable(!1),this.sieveServer=o.observable(""),this.sievePort=o.observable(""+a.Values.SieveDefaulPort),this.sieveSecure=o.observable(s.ServerSecure.None),this.smtpServer=o.observable(""),this.smtpPort=o.observable(""+a.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.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=r.createCommand(this,function(){this.saving(!0),l.createOrUpdateDomain(n.bind(this.onDomainCreateOrSaveResponse,this),!this.edit(),this.name(),this.imapServer(),r.pInt(this.imapPort()),this.imapSecure(),this.imapShortLogin(),this.useSieve(),this.sieveServer(),r.pInt(this.sievePort()),this.sieveSecure(),this.smtpServer(),r.pInt(this.smtpPort()),this.smtpSecure(),this.smtpShortLogin(),this.smtpAuth(),this.smtpPhpMail(),this.whiteList())},this.canBeSaved),this.testConnectionCommand=r.createCommand(this,function(){this.page("main"),this.sieveSettings(!1),this.testingDone(!1),this.testingImapError(!1),this.testingSmtpError(!1),this.testing(!0),l.testConnectionForDomain(n.bind(this.onTestConnectionResponse,this),this.name(),this.imapServer(),r.pInt(this.imapPort()),this.imapSecure(),this.useSieve(),this.sieveServer(),r.pInt(this.sievePort()),this.sieveSecure(),this.smtpServer(),r.pInt(this.smtpPort()),this.smtpSecure(),this.smtpAuth(),this.smtpPhpMail())
},this.canBeTested),this.whiteListCommand=r.createCommand(this,function(){this.page("white-list")}),this.backCommand=r.createCommand(this,function(){this.page("main")}),this.sieveCommand=r.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=r.pInt(this.imapPort());switch(e=r.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=r.pInt(this.smtpPort());switch(e=r.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),u.constructorEnd(this)}var n=i(2),o=i(3),s=i(4),a=i(15),r=i(1),l=i(16),c=i(8),u=i(5),p=i(10);u.extendAsViewModel(["View/Popup/Domain","PopupsDomainViewModel"],t),n.extend(t.prototype,p.prototype),t.prototype.onTestConnectionResponse=function(e,t){this.testing(!1),s.StorageResultType.Success===e&&t.Result?(this.testingDone(!0),this.testingImapError(!0!==t.Result.Imap),this.testingSmtpError(!0!==t.Result.Smtp),this.testingImapError()&&t.Result.Imap&&this.testingImapErrorDesc(t.Result.Imap),this.testingSmtpError()&&t.Result.Smtp&&this.testingSmtpErrorDesc(t.Result.Smtp)):(this.testingImapError(!0),this.testingSmtpError(!0))},t.prototype.onDomainCreateOrSaveResponse=function(e,t){this.saving(!1),s.StorageResultType.Success===e&&t?t.Result?(i(17).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)},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(r.trim(e.Name)),this.imapServer(r.trim(e.IncHost)),this.imapPort(""+r.pInt(e.IncPort)),this.imapSecure(r.trim(e.IncSecure)),this.imapShortLogin(!!e.IncShortLogin),this.useSieve(!!e.UseSieve),this.sieveServer(r.trim(e.SieveHost)),this.sievePort(""+r.pInt(e.SievePort)),this.sieveSecure(r.trim(e.SieveSecure)),this.smtpServer(r.trim(e.OutHost)),this.smtpPort(""+r.pInt(e.OutPort)),this.smtpSecure(r.trim(e.OutSecure)),this.smtpShortLogin(!!e.OutShortLogin),this.smtpAuth(!!e.OutAuth),this.smtpPhpMail(!!e.OutUsePhpMail),this.whiteList(r.trim(e.WhiteList)),this.enableSmartPorts(!0))},t.prototype.onFocus=function(){""===this.name()&&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(""+a.Values.ImapDefaulPort),this.imapSecure(s.ServerSecure.None),this.imapShortLogin(!1),this.useSieve(!1),this.sieveServer(""),this.sievePort(""+a.Values.SieveDefaulPort),this.sieveSecure(s.ServerSecure.None),this.smtpServer(""),this.smtpPort(""+a.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(){u.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=r.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(""),l.pluginSettingsUpdate(this.onPluginSettingsUpdateResponse,e)},this.hasConfiguration),this.bDisabeCloseOnEsc=!0,this.sDefaultKeyScope=a.KeyState.All,this.tryToClosePopup=n.debounce(n.bind(this.tryToClosePopup,this),200),c.constructorEnd(this)}var n=i(2),o=i(3),s=i(18),a=i(4),r=i(1),l=i(16),c=i(5),u=i(10);c.extendAsViewModel(["View/Popup/Plugin","PopupsPluginViewModel"],t),n.extend(t.prototype,u.prototype),t.prototype.onPluginSettingsUpdateResponse=function(e,t){a.StorageResultType.Success===e&&t&&t.Result?this.cancelCommand():(this.saveError(""),this.saveError(t&&t.ErrorCode?r.getNotification(t.ErrorCode):r.getNotification(a.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;r.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(31);c.isPopupVisible(t)||c.showScreenPopup(t,[r.i18n("POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW"),function(){e.modalVisibility()&&r.delegateRun(e,"cancelCommand")}])},t.prototype.onBuild=function(){s("esc",a.KeyState.All,n.bind(function(){return this.modalVisibility()&&this.tryToClosePopup(),!1},this))},e.exports=t}()}]);