/* 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)&&0s;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,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):""},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=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 ').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(''+n.encodeHtml(i)+'
'),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]*>([\s\S\r\n]*)<\/div>/gim,u),e="\n"+a.trim(e)+"\n"),e}return""},p=function(){return arguments&&1"):""},d=function(){return arguments&&1/g,">"):""},m=function(){return arguments&&1]*>([\s\S\r\n]*)<\/pre>/gim,p).replace(/[\s]+/gm," ").replace(/((?:href|data)\s?=\s?)("[^"]+?"|'[^']+?')/gim,d).replace(/]*>/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(/]*>/gim,"\n_______________________________\n\n").replace(/]*>([\s\S\r\n]*)<\/div>/gim,u).replace(/]*>/gim,"\n__bq__start__\n").replace(/<\/blockquote>/gim,"\n__bq__end__\n").replace(/]*>([\s\S\r\n]*?)<\/a>/gim,m).replace(/<\/div>/gi,"\n").replace(/ /gi," ").replace(/"/gi,'"').replace(/<[^>]*>/gm,""),r=h.$div.html(r).text(),r=r.replace(/\n[ \t]+/gm,"\n").replace(/[\n]{3,}/gm,"\n\n").replace(/>/gi,">").replace(/</gi,"<").replace(/&/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"===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,"&").replace(/>/g,">").replace(/").replace(/[\s]*~~~\/blockquote~~~/g,"").replace(/\n/g,"
"),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:0g;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&&0g;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&&01||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'),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()?"":''+(r?d.i18n(e):e)+""}}).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('  ').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("
").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("
"),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=-11&&(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,]+)>?,? ?/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?'
")+'" target="_blank" tabindex="-1">'+n.encodeHtml(this.name)+"":i?n.encodeHtml(this.name):this.name:(o=this.email,""!==this.name?t?o=n.encodeHtml('"'+this.name+'" <')+'")+'" target="_blank" tabindex="-1">'+n.encodeHtml(o)+""+n.encodeHtml(">"):(o='"'+this.name+'" <'+o+">",i&&(o=n.encodeHtml(o))):t&&(o=''+n.encodeHtml(this.email)+""))),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;h0&&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('