mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
6 lines
No EOL
168 KiB
JavaScript
6 lines
No EOL
168 KiB
JavaScript
!function e(t,i,s){function n(a,r){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!r&&l)return l(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[a]={exports:{}};t[a][0].call(u.exports,function(e){var i=t[a][1][e];return n(i?i:e)},u,u.exports,e,t,i,s)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<s.length;a++)n(s[a]);return n}({1:[function(e){!function(e){"use strict";e("App:Boot")(e("App:Admin"))}(e)},{"App:Admin":3,"App:Boot":4}],2:[function(e,t){!function(e,t){"use strict";function i(e){g.call(this),this.isLocalAutocomplete=!0,this.iframe=s('<iframe style="display:none" src="javascript:;" />').appendTo("body"),r.on("error",function(t){t&&t.originalEvent&&t.originalEvent.message&&-1===u.inArray(t.originalEvent.message,["Script error.","Uncaught Error: Error calling method on NPObject."])&&e.jsError(u.emptyFunction,t.originalEvent.message,t.originalEvent.filename,t.originalEvent.lineno,o.location&&o.location.toString?o.location.toString():"",a.attr("class"),u.microtime()-c.now)}),l.on("keydown",function(e){e&&e.ctrlKey&&a.addClass("rl-ctrl-key-pressed")}).on("keyup",function(e){e&&!e.ctrlKey&&a.removeClass("rl-ctrl-key-pressed")})}var s=t("$"),n=t("_"),o=t("window"),a=t("$html"),r=t("$win"),l=t("$doc"),c=t("Globals"),u=t("Utils"),d=t("LinkBuilder"),p=t("Events"),h=t("Storage:Settings"),g=t("Knoin:AbstractBoot");n.extend(i.prototype,g.prototype),i.prototype.remote=function(){return null},i.prototype.data=function(){return null},i.prototype.setupSettings=function(){return!0},i.prototype.download=function(e){var t=null,i=null,s=o.navigator.userAgent.toLowerCase();return s&&(s.indexOf("chrome")>-1||s.indexOf("chrome")>-1)&&(i=o.document.createElement("a"),i.href=e,o.document.createEvent&&(t=o.document.createEvent("MouseEvents"),t&&t.initEvent&&i.dispatchEvent))?(t.initEvent("click",!0,!0),i.dispatchEvent(t),!0):(c.bMobileDevice?(o.open(e,"_self"),o.focus()):this.iframe.attr("src",e),!0)},i.prototype.setTitle=function(e){e=(u.isNormal(e)&&0<e.length?e+" - ":"")+h.settingsGet("Title")||"",o.document.title="_",o.document.title=e},i.prototype.loginAndLogoutReload=function(e,i){var s=t("App:Knoin"),a=u.pString(h.settingsGet("CustomLogoutLink")),r=!!h.settingsGet("InIframe");e=u.isUnd(e)?!1:!!e,i=u.isUnd(i)?!1:!!i,e&&i&&o.close&&o.close(),e&&""!==a&&o.location.href!==a?n.delay(function(){r&&o.parent?o.parent.location.href=a:o.location.href=a},100):(s.routeOff(),s.setHash(d.root(),!0),s.routeOff(),n.delay(function(){r&&o.parent?o.parent.location.reload():o.location.reload()},100))},i.prototype.historyBack=function(){o.history.back()},i.prototype.bootstart=function(){p.pub("rl.bootstart");var e=t("ssm");u.initOnStartOrLangChange(function(){u.initNotificationLanguage()},null),n.delay(function(){u.windowResize()},1e3),e.addState({id:"mobile",maxWidth:767,onEnter:function(){a.addClass("ssm-state-mobile"),p.pub("ssm.mobile-enter")},onLeave:function(){a.removeClass("ssm-state-mobile"),p.pub("ssm.mobile-leave")}}),e.addState({id:"tablet",minWidth:768,maxWidth:999,onEnter:function(){a.addClass("ssm-state-tablet")},onLeave:function(){a.removeClass("ssm-state-tablet")}}),e.addState({id:"desktop",minWidth:1e3,maxWidth:1400,onEnter:function(){a.addClass("ssm-state-desktop")},onLeave:function(){a.removeClass("ssm-state-desktop")}}),e.addState({id:"desktop-large",minWidth:1400,onEnter:function(){a.addClass("ssm-state-desktop-large")},onLeave:function(){a.removeClass("ssm-state-desktop-large")}}),p.sub("ssm.mobile-enter",function(){c.leftPanelDisabled(!0)}),p.sub("ssm.mobile-leave",function(){c.leftPanelDisabled(!1)}),c.leftPanelDisabled.subscribe(function(e){a.toggleClass("rl-left-panel-disabled",e)}),e.ready()},e.exports=i}(t,e)},{$:21,$doc:13,$html:14,$win:15,"App:Knoin":28,Events:7,Globals:8,"Knoin:AbstractBoot":29,LinkBuilder:9,"Storage:Settings":59,Utils:11,_:26,ssm:25,window:27}],3:[function(e,t){!function(e,t){"use strict";function i(){m.call(this,p)}var s=t("ko"),n=t("_"),o=t("window"),a=t("Enums"),r=t("Utils"),l=t("LinkBuilder"),c=t("App:Knoin"),u=t("Storage:Settings"),d=t("Storage:Admin:Data"),p=t("Storage:Admin:Remote"),h=t("Screen:Admin:Settings"),g=t("Screen:Admin:Login"),m=t("App:Abstract");n.extend(i.prototype,m.prototype),i.prototype.remote=function(){return p},i.prototype.data=function(){return d},i.prototype.setupSettings=function(){return c.addSettingsViewModel(t("Settings:Admin:General"),"AdminSettingsGeneral","General","general",!0),c.addSettingsViewModel(t("Settings:Admin:Login"),"AdminSettingsLogin","Login","login"),u.capa(a.Capa.Prem)&&c.addSettingsViewModel(t("Settings:Admin:Branding"),"AdminSettingsBranding","Branding","branding"),c.addSettingsViewModel(t("Settings:Admin:Contacts"),"AdminSettingsContacts","Contacts","contacts"),c.addSettingsViewModel(t("Settings:Admin:Domains"),"AdminSettingsDomains","Domains","domains"),c.addSettingsViewModel(t("Settings:Admin:Security"),"AdminSettingsSecurity","Security","security"),c.addSettingsViewModel(t("Settings:Admin:Social"),"AdminSettingsSocial","Social","social"),c.addSettingsViewModel(t("Settings:Admin:Plugins"),"AdminSettingsPlugins","Plugins","plugins"),c.addSettingsViewModel(t("Settings:Admin:Packages"),"AdminSettingsPackages","Packages","packages"),c.addSettingsViewModel(t("Settings:Admin:Licensing"),"AdminSettingsLicensing","Licensing","licensing"),c.addSettingsViewModel(t("Settings:Admin:About"),"AdminSettingsAbout","About","about"),!0},i.prototype.reloadDomainList=function(){d.domainsLoading(!0),p.domainList(function(e,t){if(d.domainsLoading(!1),a.StorageResultType.Success===e&&t&&t.Result){var i=n.map(t.Result,function(e,t){return{name:t,disabled:s.observable(!e),deleteAccess:s.observable(!1)}},this);d.domains(i)}})},i.prototype.reloadPluginList=function(){d.pluginsLoading(!0),p.pluginList(function(e,t){if(d.pluginsLoading(!1),a.StorageResultType.Success===e&&t&&t.Result){var i=n.map(t.Result,function(e){return{name:e.Name,disabled:s.observable(!e.Enabled),configured:s.observable(!!e.Configured)}},this);d.plugins(i)}})},i.prototype.reloadPackagesList=function(){d.packagesLoading(!0),d.packagesReal(!0),p.packagesList(function(e,t){if(d.packagesLoading(!1),a.StorageResultType.Success===e&&t&&t.Result){d.packagesReal(!!t.Result.Real),d.packagesMainUpdatable(!!t.Result.MainUpdatable);var i=[],o={};n.each(d.packages(),function(e){e&&e.loading()&&(o[e.file]=e)}),r.isArray(t.Result.List)&&(i=n.compact(n.map(t.Result.List,function(e){return e?(e.loading=s.observable(!r.isUnd(o[e.file])),"core"!==e.type||e.canBeInstalled?e:null):null}))),d.packages(i)}else d.packagesReal(!1)})},i.prototype.updateCoreData=function(){d.coreUpdating(!0),p.updateCoreData(function(e,t){d.coreUpdating(!1),d.coreRemoteVersion(""),d.coreRemoteRelease(""),d.coreVersionCompare(-2),a.StorageResultType.Success===e&&t&&t.Result?(d.coreReal(!0),o.location.reload()):d.coreReal(!1)})},i.prototype.reloadCoreData=function(){d.coreChecking(!0),d.coreReal(!0),p.coreData(function(e,t){d.coreChecking(!1),a.StorageResultType.Success===e&&t&&t.Result?(d.coreReal(!!t.Result.Real),d.coreUpdatable(!!t.Result.Updatable),d.coreAccess(!!t.Result.Access),d.coreRemoteVersion(t.Result.RemoteVersion||""),d.coreRemoteRelease(t.Result.RemoteRelease||""),d.coreVersionCompare(r.pInt(t.Result.VersionCompare))):(d.coreReal(!1),d.coreRemoteVersion(""),d.coreRemoteRelease(""),d.coreVersionCompare(-2))})},i.prototype.reloadLicensing=function(e){e=r.isUnd(e)?!1:!!e,d.licensingProcess(!0),d.licenseError(""),p.licensing(function(e,t){d.licensingProcess(!1),a.StorageResultType.Success===e&&t&&t.Result&&r.isNormal(t.Result.Expired)?(d.licenseValid(!0),d.licenseExpired(r.pInt(t.Result.Expired)),d.licenseError(""),d.licensing(!0)):t&&t.ErrorCode&&-1<r.inArray(r.pInt(t.ErrorCode),[a.Notification.LicensingServerIsUnavailable,a.Notification.LicensingExpired])?(d.licenseError(r.getNotification(r.pInt(t.ErrorCode))),d.licensing(!0)):a.StorageResultType.Abort===e?(d.licenseError(r.getNotification(a.Notification.LicensingServerIsUnavailable)),d.licensing(!0)):d.licensing(!1)},e)},i.prototype.bootstart=function(){m.prototype.bootstart.call(this),d.populateDataOnStart(),c.hideLoading(),u.settingsGet("AllowAdminPanel")?c.startScreens(u.settingsGet("Auth")?[h]:[g]):(c.routeOff(),c.setHash(l.root(),!0),c.routeOff(),n.defer(function(){o.location.href="/"})),o.SimplePace&&o.SimplePace.set(100)},e.exports=new i}(t,e)},{"App:Abstract":2,"App:Knoin":28,Enums:6,LinkBuilder:9,"Screen:Admin:Login":37,"Screen:Admin:Settings":38,"Settings:Admin:About":39,"Settings:Admin:Branding":40,"Settings:Admin:Contacts":41,"Settings:Admin:Domains":42,"Settings:Admin:General":43,"Settings:Admin:Licensing":44,"Settings:Admin:Login":45,"Settings:Admin:Packages":46,"Settings:Admin:Plugins":47,"Settings:Admin:Security":48,"Settings:Admin:Social":49,"Storage:Admin:Data":52,"Storage:Admin:Remote":53,"Storage:Settings":59,Utils:11,_:26,ko:23,window:27}],4:[function(e,t){!function(e,t){"use strict";e.exports=function(e){var i=t("window"),s=t("_"),n=t("$"),o=t("$win"),a=t("$html"),r=t("Globals"),l=t("Plugins"),c=t("Utils"),u=t("Enums"),d=t("Model:Email");r.__APP=e,e.setupSettings(),l.__boot=e,l.__remote=e.remote(),l.__data=e.data(),a.addClass(r.bMobileDevice?"mobile":"no-mobile"),o.keydown(c.killCtrlAandS).keyup(c.killCtrlAandS),o.unload(function(){r.bUnload=!0}),a.on("click.dropdown.data-api",function(){c.detectDropdownVisibility()}),i.rl=i.rl||{},i.rl.addHook=l.addHook,i.rl.settingsGet=l.mainSettingsGet,i.rl.remoteRequest=l.remoteRequest,i.rl.pluginSettingsGet=l.settingsGet,i.rl.createCommand=c.createCommand,i.rl.EmailModel=d,i.rl.Enums=u,i.__APP_BOOT=function(t){n(function(){i.rainloopTEMPLATES&&i.rainloopTEMPLATES[0]?(n("#rl-templates").html(i.rainloopTEMPLATES[0]),s.delay(function(){e.bootstart(),a.removeClass("no-js rl-booted-trigger").addClass("rl-booted")},10)):t(!1),i.__APP_BOOT=null})}}}(t,e)},{$:21,$html:14,$win:15,Enums:6,Globals:8,"Model:Email":34,Plugins:10,Utils:11,_:26,window:27}],5:[function(e,t){!function(e){"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.ClientSideCookieIndexName="rlcsc",t.Values.ImapDefaulPort=143,t.Values.ImapDefaulSecurePort=993,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}(t,e)},{}],6:[function(e,t){!function(e){"use strict";var t={};t.StorageResultType={Success:"success",Abort:"abort",Error:"error",Unload:"unload"},t.State={Empty:10,Login:20,Auth:30},t.StateType={Webmail:0,Admin:1},t.Capa={Prem:"PREM",TwoFactor:"TWO_FACTOR",OpenPGP:"OPEN_PGP",Prefetch:"PREFETCH",Gravatar:"GRAVATAR",Themes:"THEMES",Filters:"FILTERS",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},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"},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.EmailType={Defailt:0,Facebook:1,Google:2},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",To:"To",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={And:"And",Or:"Or"},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,MailServerError:901,ClientViewError:902,InvalidInputArgument:903,UnknownNotification:999,UnknownError:999},e.exports=t}(t,e)},{}],7:[function(e,t){!function(e,t){"use strict";function i(){this.oSubs={}}var s=t("_"),n=t("Utils"),o=t("Plugins");i.prototype.oSubs={},i.prototype.sub=function(e,t,i){return n.isUnd(this.oSubs[e])&&(this.oSubs[e]=[]),this.oSubs[e].push([t,i]),this},i.prototype.pub=function(e,t){return o.runHook("rl-pub",[e,t]),n.isUnd(this.oSubs[e])||s.each(this.oSubs[e],function(e){e[0]&&e[0].apply(e[1]||null,t||[])}),this},e.exports=new i}(t,e)},{Plugins:10,Utils:11,_:26}],8:[function(e,t){!function(e,t){"use strict";var i={},s=t("window"),n=t("ko"),o=t("key"),a=t("$html"),r=t("Enums");i.now=(new s.Date).getTime(),i.momentTrigger=n.observable(!0),i.dropdownVisibility=n.observable(!1).extend({rateLimit:0}),i.tooltipTrigger=n.observable(!1).extend({rateLimit:0}),i.langChangeTrigger=n.observable(!0),i.useKeyboardShortcuts=n.observable(!0),i.iAjaxErrorCount=0,i.iTokenErrorCount=0,i.iMessageBodyCacheCount=0,i.bUnload=!1,i.sUserAgent=(s.navigator.userAgent||"").toLowerCase(),i.bIsiOSDevice=-1<i.sUserAgent.indexOf("iphone")||-1<i.sUserAgent.indexOf("ipod")||-1<i.sUserAgent.indexOf("ipad"),i.bIsAndroidDevice=-1<i.sUserAgent.indexOf("android"),i.bMobileDevice=i.bIsiOSDevice||i.bIsAndroidDevice,i.bDisableNanoScroll=i.bMobileDevice,i.bAllowPdfPreview=!i.bMobileDevice,i.bAnimationSupported=!i.bMobileDevice&&a.hasClass("csstransitions"),i.bXMLHttpRequestSupported=!!s.XMLHttpRequest,i.sAnimationType="",i.__APP=null,i.oHtmlEditorDefaultConfig={title:!1,stylesSet:!1,customConfig:"",contentsCss:"",toolbarGroups:[{name:"spec"},{name:"styles"},{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"colors"},{name:"paragraph",groups:["list","indent","blocks","align"]},{name:"links"},{name:"insert"},{name:"others"}],removePlugins:"contextmenu",removeButtons:"Format,Undo,Redo,Cut,Copy,Paste,Anchor,Strike,Subscript,Superscript,Image,SelectAll",removeDialogTabs:"link:advanced;link:target;image:advanced;images:advanced",extraPlugins:"plain",allowedContent:!0,autoParagraph:!1,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"},i.oHtmlEditorLangsMap={de:"de",es:"es",fr:"fr",hu:"hu",is:"is",it:"it",ko:"ko","ko-kr":"ko",lv:"lv",nl:"nl",no:"no",pl:"pl",pt:"pt","pt-pt":"pt","pt-br":"pt-br",ru:"ru",ro:"ro",zh:"zh","zh-cn":"zh-cn"},i.bAllowPdfPreview&&s.navigator&&s.navigator.mimeTypes&&(i.bAllowPdfPreview=!!_.find(s.navigator.mimeTypes,function(e){return e&&"application/pdf"===e.type})),i.oI18N=s.rainloopI18N||{},i.oNotificationI18N={},i.aBootstrapDropdowns=[],i.aViewModels={settings:[],"settings-removed":[],"settings-disabled":[]},i.leftPanelDisabled=n.observable(!1),i.popupVisibilityNames=n.observableArray([]),i.popupVisibility=n.computed(function(){return 0<i.popupVisibilityNames().length},this),i.keyScopeReal=n.observable(r.KeyState.All),i.keyScopeFake=n.observable(r.KeyState.All),i.keyScope=n.computed({owner:this,read:function(){return i.keyScopeFake()},write:function(e){r.KeyState.Menu!==e&&(o.filter=r.KeyState.Compose===e?function(){return i.useKeyboardShortcuts()}:function(e){if(i.useKeyboardShortcuts()){var t=e.target||e.srcElement,s=t?t.tagName:"";return s=s.toUpperCase(),!("INPUT"===s||"SELECT"===s||"TEXTAREA"===s||t&&"DIV"===s&&"editorHtmlArea"===t.className&&t.contentEditable)}return!1},i.keyScopeFake(e),i.dropdownVisibility()&&(e=r.KeyState.Menu)),i.keyScopeReal(e)}}),i.keyScopeReal.subscribe(function(e){o.setScope(e)}),i.dropdownVisibility.subscribe(function(e){e?(i.tooltipTrigger(!i.tooltipTrigger()),i.keyScope(r.KeyState.Menu)):r.KeyState.Menu===o.getScope()&&i.keyScope(i.keyScopeFake())}),e.exports=i}(t,e)},{$html:14,Enums:6,key:22,ko:23,window:27}],9:[function(e,t){!function(e,t){"use strict";function i(){var e=t("Storage:Settings");this.sBase="#/",this.sServer="./?",this.sVersion=e.settingsGet("Version"),this.sSpecSuffix=e.settingsGet("AuthAccountHash")||"0",this.sStaticPrefix=e.settingsGet("StaticPrefix")||"rainloop/v/"+this.sVersion+"/static/"}var s=t("window"),n=t("Utils");i.prototype.root=function(){return this.sBase},i.prototype.attachmentDownload=function(e){return this.sServer+"/Raw/"+this.sSpecSuffix+"/Download/"+e},i.prototype.attachmentPreview=function(e){return this.sServer+"/Raw/"+this.sSpecSuffix+"/View/"+e},i.prototype.attachmentPreviewAsPlain=function(e){return this.sServer+"/Raw/"+this.sSpecSuffix+"/ViewAsPlain/"+e},i.prototype.upload=function(){return this.sServer+"/Upload/"+this.sSpecSuffix+"/"},i.prototype.uploadContacts=function(){return this.sServer+"/UploadContacts/"+this.sSpecSuffix+"/"},i.prototype.uploadBackground=function(){return this.sServer+"/UploadBackground/"+this.sSpecSuffix+"/"},i.prototype.append=function(){return this.sServer+"/Append/"+this.sSpecSuffix+"/"},i.prototype.change=function(e){return this.sServer+"/Change/"+this.sSpecSuffix+"/"+s.encodeURIComponent(e)+"/"},i.prototype.ajax=function(e){return this.sServer+"/Ajax/"+this.sSpecSuffix+"/"+e},i.prototype.messageViewLink=function(e){return this.sServer+"/Raw/"+this.sSpecSuffix+"/ViewAsPlain/"+e},i.prototype.messageDownloadLink=function(e){return this.sServer+"/Raw/"+this.sSpecSuffix+"/Download/"+e},i.prototype.avatarLink=function(e){return this.sServer+"/Raw/0/Avatar/"+s.encodeURIComponent(e)+"/"},i.prototype.inbox=function(){return this.sBase+"mailbox/Inbox"},i.prototype.messagePreview=function(){return this.sBase+"mailbox/message-preview"},i.prototype.settings=function(e){var t=this.sBase+"settings";return n.isUnd(e)||""===e||(t+="/"+e),t},i.prototype.about=function(){return this.sBase+"about"},i.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},i.prototype.mailBox=function(e,t,i){t=n.isNormal(t)?n.pInt(t):1,i=n.pString(i);var s=this.sBase+"mailbox/";return""!==e&&(s+=encodeURI(e)),t>1&&(s=s.replace(/[\/]+$/,""),s+="/p"+t),""!==i&&(s=s.replace(/[\/]+$/,""),s+="/"+encodeURI(i)),s},i.prototype.phpInfo=function(){return this.sServer+"Info"},i.prototype.langLink=function(e){return this.sServer+"/Lang/0/"+encodeURI(e)+"/"+this.sVersion+"/"},i.prototype.exportContactsVcf=function(){return this.sServer+"/Raw/"+this.sSpecSuffix+"/ContactsVcf/"},i.prototype.exportContactsCsv=function(){return this.sServer+"/Raw/"+this.sSpecSuffix+"/ContactsCsv/"},i.prototype.emptyContactPic=function(){return this.sStaticPrefix+"css/images/empty-contact.png"},i.prototype.sound=function(e){return this.sStaticPrefix+"sounds/"+e},i.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"},i.prototype.notificationMailIcon=function(){return this.sStaticPrefix+"css/images/icom-message-notification.png"},i.prototype.openPgpJs=function(){return this.sStaticPrefix+"js/openpgp.min.js"},i.prototype.socialGoogle=function(){return this.sServer+"SocialGoogle"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")},i.prototype.socialTwitter=function(){return this.sServer+"SocialTwitter"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")},i.prototype.socialFacebook=function(){return this.sServer+"SocialFacebook"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")},e.exports=new i}(t,e)},{"Storage:Settings":59,Utils:11,window:27}],10:[function(e,t){!function(e,t){"use strict";var i={__boot:null,__remote:null,__data:null},s=t("_"),n=t("Utils"),o=t("Storage:Settings");i.oViewModelsHooks={},i.oSimpleHooks={},i.regViewModelHook=function(e,t){t&&(t.__hookName=e)},i.addHook=function(e,t){n.isFunc(t)&&(n.isArray(i.oSimpleHooks[e])||(i.oSimpleHooks[e]=[]),i.oSimpleHooks[e].push(t))},i.runHook=function(e,t){n.isArray(i.oSimpleHooks[e])&&(t=t||[],s.each(i.oSimpleHooks[e],function(e){e.apply(null,t)}))},i.mainSettingsGet=function(e){return o.settingsGet(e)},i.remoteRequest=function(e,t,s,n,o,a){i.__remote&&i.__remote.defaultRequest(e,t,s,n,o,a)},i.settingsGet=function(e,t){var i=o.settingsGet("Plugins");return i=i&&!n.isUnd(i[e])?i[e]:null,i?n.isUnd(i[t])?null:i[t]:null},e.exports=i}(t,e)},{"Storage:Settings":59,Utils:11,_:26}],11:[function(e,t){!function(e,t){"use strict";var i={},s=t("$"),n=t("_"),o=t("ko"),a=t("window"),r=t("$win"),l=t("$html"),c=t("$div"),u=t("$doc"),d=t("NotificationClass"),p=t("Enums"),h=t("Consts"),g=t("Globals");i.trim=s.trim,i.inArray=s.inArray,i.isArray=n.isArray,i.isFunc=n.isFunction,i.isUnd=n.isUndefined,i.isNull=n.isNull,i.emptyFunction=function(){},i.isNormal=function(e){return!i.isUnd(e)&&!i.isNull(e)},i.windowResize=n.debounce(function(e){i.isUnd(e)?r.resize():a.setTimeout(function(){r.resize()},e)},50),i.isPosNumeric=function(e,t){return i.isNormal(e)?(i.isUnd(t)?0:!t)?/^[1-9]+[0-9]*$/.test(e.toString()):/^[0-9]*$/.test(e.toString()):!1},i.pInt=function(e,t){var s=i.isNormal(e)&&""!==e?a.parseInt(e,10):t||0;return a.isNaN(s)?t||0:s},i.pString=function(e){return i.isNormal(e)?""+e:""},i.isNonEmptyArray=function(e){return i.isArray(e)&&0<e.length},i.simpleQueryParser=function(e){var t={},i=[],s=[],n=0,o=0;for(i=e.split("&"),n=0,o=i.length;o>n;n++)s=i[n].split("="),t[a.decodeURIComponent(s[0])]=a.decodeURIComponent(s[1]);return t},i.rsaEncode=function(e,t,s,n){if(a.crypto&&a.crypto.getRandomValues&&a.RSAKey&&t&&s&&n){var o=new a.RSAKey;if(o.setPublic(n,s),e=o.encrypt(i.fakeMd5()+":"+e+":"+i.fakeMd5()),!1!==e)return"rsa:"+t+":"+e}return!1},i.rsaEncode.supported=!!(a.crypto&&a.crypto.getRandomValues&&a.RSAKey),i.exportPath=function(e,t,s){for(var n=null,o=e.split("."),r=s||a;o.length&&(n=o.shift());)o.length||i.isUnd(t)?r=r[n]?r[n]:r[n]={}:r[n]=t},i.pImport=function(e,t,i){e[t]=i},i.pExport=function(e,t,s){return i.isUnd(e[t])?s:e[t]},i.encodeHtml=function(e){return i.isNormal(e)?e.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""},i.splitPlainText=function(e,t){var s="",n="",o=e,a=0,r=0;for(t=i.isUnd(t)?100:t;o.length>t;)n=o.substring(0,t),a=n.lastIndexOf(" "),r=n.lastIndexOf("\n"),-1!==r&&(a=r),-1===a&&(a=t),s+=n.substring(0,a)+"\n",o=o.substring(a+1);return s+o},i.timeOutAction=function(){var e={};return function(t,s,n){i.isUnd(e[t])&&(e[t]=0),a.clearTimeout(e[t]),e[t]=a.setTimeout(s,n)}}(),i.timeOutActionSecond=function(){var e={};return function(t,i,s){e[t]||(e[t]=a.setTimeout(function(){i(),e[t]=0},s))}}(),i.audio=function(){var e=!1;return function(t,i){if(!1===e)if(g.bIsiOSDevice)e=null;else{var s=!1,n=!1,o=a.Audio?new a.Audio:null;o&&o.canPlayType&&o.play?(s=""!==o.canPlayType('audio/mpeg; codecs="mp3"'),s||(n=""!==o.canPlayType('audio/ogg; codecs="vorbis"')),s||n?(e=o,e.preload="none",e.loop=!1,e.autoplay=!1,e.muted=!1,e.src=s?t:i):e=null):e=null}return e}}(),i.hos=function(e,t){return e&&a.Object&&a.Object.hasOwnProperty?a.Object.hasOwnProperty.call(e,t):!1},i.i18n=function(e,t,s){var n="",o=i.isUnd(g.oI18N[e])?i.isUnd(s)?e:s:g.oI18N[e];if(!i.isUnd(t)&&!i.isNull(t))for(n in t)i.hos(t,n)&&(o=o.replace("%"+n+"%",t[n]));return o},i.i18nToNode=function(e){n.defer(function(){s(".i18n",e).each(function(){var e=s(this),t="";t=e.data("i18n-text"),t?e.text(i.i18n(t)):(t=e.data("i18n-html"),t&&e.html(i.i18n(t)),t=e.data("i18n-placeholder"),t&&e.attr("placeholder",i.i18n(t)),t=e.data("i18n-title"),t&&e.attr("title",i.i18n(t)))})})},i.i18nReload=function(){a.rainloopI18N&&(g.oI18N=a.rainloopI18N||{},i.i18nToNode(u),g.langChangeTrigger(!g.langChangeTrigger())),a.rainloopI18N=null},i.initOnStartOrLangChange=function(e,t,i){e&&e.call(t),i?g.langChangeTrigger.subscribe(function(){e&&e.call(t),i.call(t)}):e&&g.langChangeTrigger.subscribe(e,t)},i.inFocus=function(){return a.document.activeElement?(i.isUnd(a.document.activeElement.__inFocusCache)&&(a.document.activeElement.__inFocusCache=s(a.document.activeElement).is("input,textarea,iframe,.cke_editable")),!!a.document.activeElement.__inFocusCache):!1},i.removeInFocus=function(){if(a.document&&a.document.activeElement&&a.document.activeElement.blur){var e=s(a.document.activeElement);e.is("input,textarea")&&a.document.activeElement.blur()}},i.removeSelection=function(){if(a&&a.getSelection){var e=a.getSelection();e&&e.removeAllRanges&&e.removeAllRanges()}else a.document&&a.document.selection&&a.document.selection.empty&&a.document.selection.empty()},i.replySubjectAdd=function(e,t){e=i.trim(e.toUpperCase()),t=i.trim(t.replace(/[\s]+/," "));var s=0,n="",o=!1,a="",r=[],l=[],c="RE"===e,u="FWD"===e,d=!u;if(""!==t){for(o=!1,l=t.split(":"),s=0;s<l.length;s++)a=i.trim(l[s]),o||!/^(RE|FWD)$/i.test(a)&&!/^(RE|FWD)[\[\(][\d]+[\]\)]$/i.test(a)?(r.push(l[s]),o=!0):(c||(c=!!/^RE/i.test(a)),u||(u=!!/^FWD/i.test(a)));0<r.length&&(n=i.trim(r.join(":")))}return d?c=!1:u=!1,i.trim((d?"Re: ":"Fwd: ")+(c?"Re: ":"")+(u?"Fwd: ":"")+n)},i.fixLongSubject=function(e){var t=30,s=/^Re([\[\(]([\d]+)[\]\)]|):[\s]{0,3}Re([\[\(]([\d]+)[\]\)]|):/gi,n=null;e=i.trim(e.replace(/[\s]+/," "));do t--,n=s.exec(e),(!n||i.isUnd(n[0]))&&(n=null),n&&(e=e.replace(s,"Re:"));while(n||t>0);return e.replace(/[\s]+/," ")},i._replySubjectAdd_=function(e,t,s){var n=null,o=i.trim(t);return o=null===(n=new a.RegExp("^"+e+"[\\s]?\\:(.*)$","gi").exec(t))||i.isUnd(n[1])?null===(n=new a.RegExp("^("+e+"[\\s]?[\\[\\(]?)([\\d]+)([\\]\\)]?[\\s]?\\:.*)$","gi").exec(t))||i.isUnd(n[1])||i.isUnd(n[2])||i.isUnd(n[3])?e+": "+t:n[1]+(i.pInt(n[2])+1)+n[3]:e+"[2]: "+n[1],o=o.replace(/[\s]+/g," "),o=(i.isUnd(s)?!0:s)?i.fixLongSubject(o):o},i._fixLongSubject_=function(e){var t=0,s=null;e=i.trim(e.replace(/[\s]+/," "));do s=/^Re(\[([\d]+)\]|):[\s]{0,3}Re(\[([\d]+)\]|):/gi.exec(e),(!s||i.isUnd(s[0]))&&(s=null),s&&(t=0,t+=i.isUnd(s[2])?1:0+i.pInt(s[2]),t+=i.isUnd(s[4])?1:0+i.pInt(s[4]),e=e.replace(/^Re(\[[\d]+\]|):[\s]{0,3}Re(\[[\d]+\]|):/gi,"Re"+(t>0?"["+t+"]":"")+":"));while(s);return e=e.replace(/[\s]+/," ")},i.roundNumber=function(e,t){return a.Math.round(e*a.Math.pow(10,t))/a.Math.pow(10,t)},i.friendlySize=function(e){return e=i.pInt(e),e>=1073741824?i.roundNumber(e/1073741824,1)+"GB":e>=1048576?i.roundNumber(e/1048576,1)+"MB":e>=1024?i.roundNumber(e/1024,0)+"KB":e+"B"},i.log=function(e){a.console&&a.console.log&&a.console.log(e)},i.getNotification=function(e,t){return e=i.pInt(e),p.Notification.ClientViewError===e&&t?t:i.isUnd(g.oNotificationI18N[e])?"":g.oNotificationI18N[e]},i.initNotificationLanguage=function(){var e=g.oNotificationI18N||{};e[p.Notification.InvalidToken]=i.i18n("NOTIFICATIONS/INVALID_TOKEN"),e[p.Notification.AuthError]=i.i18n("NOTIFICATIONS/AUTH_ERROR"),e[p.Notification.AccessError]=i.i18n("NOTIFICATIONS/ACCESS_ERROR"),e[p.Notification.ConnectionError]=i.i18n("NOTIFICATIONS/CONNECTION_ERROR"),e[p.Notification.CaptchaError]=i.i18n("NOTIFICATIONS/CAPTCHA_ERROR"),e[p.Notification.SocialFacebookLoginAccessDisable]=i.i18n("NOTIFICATIONS/SOCIAL_FACEBOOK_LOGIN_ACCESS_DISABLE"),e[p.Notification.SocialTwitterLoginAccessDisable]=i.i18n("NOTIFICATIONS/SOCIAL_TWITTER_LOGIN_ACCESS_DISABLE"),e[p.Notification.SocialGoogleLoginAccessDisable]=i.i18n("NOTIFICATIONS/SOCIAL_GOOGLE_LOGIN_ACCESS_DISABLE"),e[p.Notification.DomainNotAllowed]=i.i18n("NOTIFICATIONS/DOMAIN_NOT_ALLOWED"),e[p.Notification.AccountNotAllowed]=i.i18n("NOTIFICATIONS/ACCOUNT_NOT_ALLOWED"),e[p.Notification.AccountTwoFactorAuthRequired]=i.i18n("NOTIFICATIONS/ACCOUNT_TWO_FACTOR_AUTH_REQUIRED"),e[p.Notification.AccountTwoFactorAuthError]=i.i18n("NOTIFICATIONS/ACCOUNT_TWO_FACTOR_AUTH_ERROR"),e[p.Notification.CouldNotSaveNewPassword]=i.i18n("NOTIFICATIONS/COULD_NOT_SAVE_NEW_PASSWORD"),e[p.Notification.CurrentPasswordIncorrect]=i.i18n("NOTIFICATIONS/CURRENT_PASSWORD_INCORRECT"),e[p.Notification.NewPasswordShort]=i.i18n("NOTIFICATIONS/NEW_PASSWORD_SHORT"),e[p.Notification.NewPasswordWeak]=i.i18n("NOTIFICATIONS/NEW_PASSWORD_WEAK"),e[p.Notification.NewPasswordForbidden]=i.i18n("NOTIFICATIONS/NEW_PASSWORD_FORBIDDENT"),e[p.Notification.ContactsSyncError]=i.i18n("NOTIFICATIONS/CONTACTS_SYNC_ERROR"),e[p.Notification.CantGetMessageList]=i.i18n("NOTIFICATIONS/CANT_GET_MESSAGE_LIST"),e[p.Notification.CantGetMessage]=i.i18n("NOTIFICATIONS/CANT_GET_MESSAGE"),e[p.Notification.CantDeleteMessage]=i.i18n("NOTIFICATIONS/CANT_DELETE_MESSAGE"),e[p.Notification.CantMoveMessage]=i.i18n("NOTIFICATIONS/CANT_MOVE_MESSAGE"),e[p.Notification.CantCopyMessage]=i.i18n("NOTIFICATIONS/CANT_MOVE_MESSAGE"),e[p.Notification.CantSaveMessage]=i.i18n("NOTIFICATIONS/CANT_SAVE_MESSAGE"),e[p.Notification.CantSendMessage]=i.i18n("NOTIFICATIONS/CANT_SEND_MESSAGE"),e[p.Notification.InvalidRecipients]=i.i18n("NOTIFICATIONS/INVALID_RECIPIENTS"),e[p.Notification.CantCreateFolder]=i.i18n("NOTIFICATIONS/CANT_CREATE_FOLDER"),e[p.Notification.CantRenameFolder]=i.i18n("NOTIFICATIONS/CANT_RENAME_FOLDER"),e[p.Notification.CantDeleteFolder]=i.i18n("NOTIFICATIONS/CANT_DELETE_FOLDER"),e[p.Notification.CantDeleteNonEmptyFolder]=i.i18n("NOTIFICATIONS/CANT_DELETE_NON_EMPTY_FOLDER"),e[p.Notification.CantSubscribeFolder]=i.i18n("NOTIFICATIONS/CANT_SUBSCRIBE_FOLDER"),e[p.Notification.CantUnsubscribeFolder]=i.i18n("NOTIFICATIONS/CANT_UNSUBSCRIBE_FOLDER"),e[p.Notification.CantSaveSettings]=i.i18n("NOTIFICATIONS/CANT_SAVE_SETTINGS"),e[p.Notification.CantSavePluginSettings]=i.i18n("NOTIFICATIONS/CANT_SAVE_PLUGIN_SETTINGS"),e[p.Notification.DomainAlreadyExists]=i.i18n("NOTIFICATIONS/DOMAIN_ALREADY_EXISTS"),e[p.Notification.CantInstallPackage]=i.i18n("NOTIFICATIONS/CANT_INSTALL_PACKAGE"),e[p.Notification.CantDeletePackage]=i.i18n("NOTIFICATIONS/CANT_DELETE_PACKAGE"),e[p.Notification.InvalidPluginPackage]=i.i18n("NOTIFICATIONS/INVALID_PLUGIN_PACKAGE"),e[p.Notification.UnsupportedPluginPackage]=i.i18n("NOTIFICATIONS/UNSUPPORTED_PLUGIN_PACKAGE"),e[p.Notification.LicensingServerIsUnavailable]=i.i18n("NOTIFICATIONS/LICENSING_SERVER_IS_UNAVAILABLE"),e[p.Notification.LicensingExpired]=i.i18n("NOTIFICATIONS/LICENSING_EXPIRED"),e[p.Notification.LicensingBanned]=i.i18n("NOTIFICATIONS/LICENSING_BANNED"),e[p.Notification.DemoSendMessageError]=i.i18n("NOTIFICATIONS/DEMO_SEND_MESSAGE_ERROR"),e[p.Notification.AccountAlreadyExists]=i.i18n("NOTIFICATIONS/ACCOUNT_ALREADY_EXISTS"),e[p.Notification.MailServerError]=i.i18n("NOTIFICATIONS/MAIL_SERVER_ERROR"),e[p.Notification.InvalidInputArgument]=i.i18n("NOTIFICATIONS/INVALID_INPUT_ARGUMENT"),e[p.Notification.UnknownNotification]=i.i18n("NOTIFICATIONS/UNKNOWN_ERROR"),e[p.Notification.UnknownError]=i.i18n("NOTIFICATIONS/UNKNOWN_ERROR")
|
||
},i.getUploadErrorDescByCode=function(e){var t="";switch(i.pInt(e)){case p.UploadErrorCode.FileIsTooBig:t=i.i18n("UPLOAD/ERROR_FILE_IS_TOO_BIG");break;case p.UploadErrorCode.FilePartiallyUploaded:t=i.i18n("UPLOAD/ERROR_FILE_PARTIALLY_UPLOADED");break;case p.UploadErrorCode.FileNoUploaded:t=i.i18n("UPLOAD/ERROR_NO_FILE_UPLOADED");break;case p.UploadErrorCode.MissingTempFolder:t=i.i18n("UPLOAD/ERROR_MISSING_TEMP_FOLDER");break;case p.UploadErrorCode.FileOnSaveingError:t=i.i18n("UPLOAD/ERROR_ON_SAVING_FILE");break;case p.UploadErrorCode.FileType:t=i.i18n("UPLOAD/ERROR_FILE_TYPE");break;default:t=i.i18n("UPLOAD/ERROR_UNKNOWN")}return t},i.delegateRun=function(e,t,s,o){e&&e[t]&&(o=i.pInt(o),0>=o?e[t].apply(e,i.isArray(s)?s:[]):n.delay(function(){e[t].apply(e,i.isArray(s)?s:[])},o))},i.killCtrlAandS=function(e){if(e=e||a.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&&(a.getSelection?a.getSelection().removeAllRanges():a.document.selection&&a.document.selection.clear&&a.document.selection.clear(),e.preventDefault())}},i.createCommand=function(e,t,s){var n=t?function(){return n&&n.canExecute&&n.canExecute()&&t.apply(e,Array.prototype.slice.call(arguments)),!1}:function(){};return n.enabled=o.observable(!0),s=i.isUnd(s)?!0:s,n.canExecute=o.computed(i.isFunc(s)?function(){return n.enabled()&&s.call(e)}:function(){return n.enabled()&&!!s}),n},i.initDataConstructorBySettings=function(e){e.editorDefaultType=o.observable(p.EditorDefaultType.Html),e.showImages=o.observable(!1),e.interfaceAnimation=o.observable(p.InterfaceAnimation.Full),e.contactsAutosave=o.observable(!1),g.sAnimationType=p.InterfaceAnimation.Full,e.capaThemes=o.observable(!1),e.allowLanguagesOnSettings=o.observable(!0),e.allowLanguagesOnLogin=o.observable(!0),e.useLocalProxyForExternalImages=o.observable(!1),e.desktopNotifications=o.observable(!1),e.useThreads=o.observable(!0),e.replySameFolder=o.observable(!0),e.useCheckboxesInList=o.observable(!0),e.layout=o.observable(p.Layout.SidePreview),e.usePreviewPane=o.computed(function(){return p.Layout.NoPreview!==e.layout()}),e.interfaceAnimation.subscribe(function(e){if(g.bMobileDevice||e===p.InterfaceAnimation.None)l.removeClass("rl-anim rl-anim-full").addClass("no-rl-anim"),g.sAnimationType=p.InterfaceAnimation.None;else switch(e){case p.InterfaceAnimation.Full:l.removeClass("no-rl-anim").addClass("rl-anim rl-anim-full"),g.sAnimationType=e;break;case p.InterfaceAnimation.Normal:l.removeClass("no-rl-anim rl-anim-full").addClass("rl-anim"),g.sAnimationType=e}}),e.interfaceAnimation.valueHasMutated(),e.desktopNotificationsPermisions=o.computed(function(){e.desktopNotifications();var t=p.DesktopNotifications.NotSupported;if(d&&d.permission)switch(d.permission.toLowerCase()){case"granted":t=p.DesktopNotifications.Allowed;break;case"denied":t=p.DesktopNotifications.Denied;break;case"default":t=p.DesktopNotifications.NotAllowed}else a.webkitNotifications&&a.webkitNotifications.checkPermission&&(t=a.webkitNotifications.checkPermission());return t}),e.useDesktopNotifications=o.computed({read:function(){return e.desktopNotifications()&&p.DesktopNotifications.Allowed===e.desktopNotificationsPermisions()},write:function(t){if(t){var i=e.desktopNotificationsPermisions();p.DesktopNotifications.Allowed===i?e.desktopNotifications(!0):p.DesktopNotifications.NotAllowed===i?d.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=o.observable(""),e.languages=o.observableArray([]),e.mainLanguage=o.computed({read:e.language,write:function(t){t!==e.language()?-1<i.inArray(t,e.languages())?e.language(t):0<e.languages().length&&e.language(e.languages()[0]):e.language.valueHasMutated()}}),e.theme=o.observable(""),e.themes=o.observableArray([]),e.mainTheme=o.computed({read:e.theme,write:function(t){if(t!==e.theme()){var s=e.themes();-1<i.inArray(t,s)?e.theme(t):0<s.length&&e.theme(s[0])}else e.theme.valueHasMutated()}}),e.capaAdditionalAccounts=o.observable(!1),e.capaAdditionalIdentities=o.observable(!1),e.capaGravatar=o.observable(!1),e.determineUserLanguage=o.observable(!1),e.determineUserDomain=o.observable(!1),e.messagesPerPage=o.observable(h.Defaults.MessagesPerPage),e.mainMessagesPerPage=e.messagesPerPage,e.mainMessagesPerPage=o.computed({read:e.messagesPerPage,write:function(t){-1<i.inArray(i.pInt(t),h.Defaults.MessagesPerPageArray)?t!==e.messagesPerPage()&&e.messagesPerPage(t):e.messagesPerPage.valueHasMutated()}}),e.facebookSupported=o.observable(!1),e.facebookEnable=o.observable(!1),e.facebookAppID=o.observable(""),e.facebookAppSecret=o.observable(""),e.twitterEnable=o.observable(!1),e.twitterConsumerKey=o.observable(""),e.twitterConsumerSecret=o.observable(""),e.googleEnable=o.observable(!1),e.googleClientID=o.observable(""),e.googleClientSecret=o.observable(""),e.googleApiKey=o.observable(""),e.dropboxEnable=o.observable(!1),e.dropboxApiKey=o.observable(""),e.contactsIsAllowed=o.observable(!1)},i.createMomentDate=function(e){return i.isUnd(e.moment)&&(e.moment=o.observable(moment())),o.computed(function(){g.momentTrigger();var e=this.moment();return 1970===e.year()?"":e.fromNow()},e)},i.createMomentShortDate=function(e){return o.computed(function(){var e="",t=moment(),s=this.moment(),n=this.momentDate();return e=1970===s.year()?"":4>=t.diff(s,"hours")?n:t.format("L")===s.format("L")?i.i18n("MESSAGE_LIST/TODAY_AT",{TIME:s.format("LT")}):t.clone().subtract("days",1).format("L")===s.format("L")?i.i18n("MESSAGE_LIST/YESTERDAY_AT",{TIME:s.format("LT")}):s.format(t.year()===s.year()?"D MMM.":"LL")},e)},i.initBlockquoteSwitcher=function(e){if(e){var t=s("blockquote:not(.rl-bq-switcher)",e).filter(function(){return 0===s(this).parent().closest("blockquote",e).length});t&&0<t.length&&t.each(function(){var e=s(this),t=e.height();(0===t||t>100)&&(e.addClass("rl-bq-switcher hidden-bq"),s('<span class="rlBlockquoteSwitcher"><i class="icon-ellipsis" /></span>').insertBefore(e).click(function(){e.toggleClass("hidden-bq"),i.windowResize()}).after("<br />").before("<br />"))})}},i.removeBlockquoteSwitcher=function(e){e&&(s(e).find("blockquote.rl-bq-switcher").each(function(){s(this).removeClass("rl-bq-switcher hidden-bq")}),s(e).find(".rlBlockquoteSwitcher").each(function(){s(this).remove()}))},i.toggleMessageBlockquote=function(e){e&&e.find(".rlBlockquoteSwitcher").click()},i.convertThemeName=function(e){return"@custom"===e.substr(-7)&&(e=i.trim(e.substring(0,e.length-7))),i.trim(e.replace(/[^a-zA-Z]+/g," ").replace(/([A-Z])/g," $1").replace(/[\s]+/g," "))},i.quoteName=function(e){return e.replace(/["]/g,'\\"')},i.microtime=function(){return(new Date).getTime()},i.convertLangName=function(e,t){return i.i18n("LANGS_NAMES"+(!0===t?"_EN":"")+"/LANG_"+e.toUpperCase().replace(/[^a-zA-Z0-9]+/,"_"),null,e)},i.fakeMd5=function(e){var t="",s="0123456789abcdefghijklmnopqrstuvwxyz";for(e=i.isUnd(e)?32:i.pInt(e);t.length<e;)t+=s.substr(a.Math.round(a.Math.random()*s.length),1);return t},i.md5=function(e){function t(e,t){return e<<t|e>>>32-t}function i(e,t){var i,s,n,o,a;return n=2147483648&e,o=2147483648&t,i=1073741824&e,s=1073741824&t,a=(1073741823&e)+(1073741823&t),i&s?2147483648^a^n^o:i|s?1073741824&a?3221225472^a^n^o:1073741824^a^n^o:a^n^o}function s(e,t,i){return e&t|~e&i}function n(e,t,i){return e&i|t&~i}function o(e,t,i){return e^t^i}function a(e,t,i){return t^(e|~i)}function r(e,n,o,a,r,l,c){return e=i(e,i(i(s(n,o,a),r),c)),i(t(e,l),n)}function l(e,s,o,a,r,l,c){return e=i(e,i(i(n(s,o,a),r),c)),i(t(e,l),s)}function c(e,s,n,a,r,l,c){return e=i(e,i(i(o(s,n,a),r),c)),i(t(e,l),s)}function u(e,s,n,o,r,l,c){return e=i(e,i(i(a(s,n,o),r),c)),i(t(e,l),s)}function d(e){for(var t,i=e.length,s=i+8,n=(s-s%64)/64,o=16*(n+1),a=Array(o-1),r=0,l=0;i>l;)t=(l-l%4)/4,r=l%4*8,a[t]=a[t]|e.charCodeAt(l)<<r,l++;return t=(l-l%4)/4,r=l%4*8,a[t]=a[t]|128<<r,a[o-2]=i<<3,a[o-1]=i>>>29,a}function p(e){var t,i,s="",n="";for(i=0;3>=i;i++)t=e>>>8*i&255,n="0"+t.toString(16),s+=n.substr(n.length-2,2);return s}function h(e){e=e.replace(/rn/g,"n");for(var t="",i=0;i<e.length;i++){var s=e.charCodeAt(i);128>s?t+=String.fromCharCode(s):s>127&&2048>s?(t+=String.fromCharCode(s>>6|192),t+=String.fromCharCode(63&s|128)):(t+=String.fromCharCode(s>>12|224),t+=String.fromCharCode(s>>6&63|128),t+=String.fromCharCode(63&s|128))}return t}var g,m,f,b,S,v,y,A,w,C=Array(),T=7,E=12,N=17,P=22,L=5,I=9,R=14,k=20,D=4,_=11,F=16,x=23,U=6,M=10,O=15,V=21;for(e=h(e),C=d(e),v=1732584193,y=4023233417,A=2562383102,w=271733878,g=0;g<C.length;g+=16)m=v,f=y,b=A,S=w,v=r(v,y,A,w,C[g+0],T,3614090360),w=r(w,v,y,A,C[g+1],E,3905402710),A=r(A,w,v,y,C[g+2],N,606105819),y=r(y,A,w,v,C[g+3],P,3250441966),v=r(v,y,A,w,C[g+4],T,4118548399),w=r(w,v,y,A,C[g+5],E,1200080426),A=r(A,w,v,y,C[g+6],N,2821735955),y=r(y,A,w,v,C[g+7],P,4249261313),v=r(v,y,A,w,C[g+8],T,1770035416),w=r(w,v,y,A,C[g+9],E,2336552879),A=r(A,w,v,y,C[g+10],N,4294925233),y=r(y,A,w,v,C[g+11],P,2304563134),v=r(v,y,A,w,C[g+12],T,1804603682),w=r(w,v,y,A,C[g+13],E,4254626195),A=r(A,w,v,y,C[g+14],N,2792965006),y=r(y,A,w,v,C[g+15],P,1236535329),v=l(v,y,A,w,C[g+1],L,4129170786),w=l(w,v,y,A,C[g+6],I,3225465664),A=l(A,w,v,y,C[g+11],R,643717713),y=l(y,A,w,v,C[g+0],k,3921069994),v=l(v,y,A,w,C[g+5],L,3593408605),w=l(w,v,y,A,C[g+10],I,38016083),A=l(A,w,v,y,C[g+15],R,3634488961),y=l(y,A,w,v,C[g+4],k,3889429448),v=l(v,y,A,w,C[g+9],L,568446438),w=l(w,v,y,A,C[g+14],I,3275163606),A=l(A,w,v,y,C[g+3],R,4107603335),y=l(y,A,w,v,C[g+8],k,1163531501),v=l(v,y,A,w,C[g+13],L,2850285829),w=l(w,v,y,A,C[g+2],I,4243563512),A=l(A,w,v,y,C[g+7],R,1735328473),y=l(y,A,w,v,C[g+12],k,2368359562),v=c(v,y,A,w,C[g+5],D,4294588738),w=c(w,v,y,A,C[g+8],_,2272392833),A=c(A,w,v,y,C[g+11],F,1839030562),y=c(y,A,w,v,C[g+14],x,4259657740),v=c(v,y,A,w,C[g+1],D,2763975236),w=c(w,v,y,A,C[g+4],_,1272893353),A=c(A,w,v,y,C[g+7],F,4139469664),y=c(y,A,w,v,C[g+10],x,3200236656),v=c(v,y,A,w,C[g+13],D,681279174),w=c(w,v,y,A,C[g+0],_,3936430074),A=c(A,w,v,y,C[g+3],F,3572445317),y=c(y,A,w,v,C[g+6],x,76029189),v=c(v,y,A,w,C[g+9],D,3654602809),w=c(w,v,y,A,C[g+12],_,3873151461),A=c(A,w,v,y,C[g+15],F,530742520),y=c(y,A,w,v,C[g+2],x,3299628645),v=u(v,y,A,w,C[g+0],U,4096336452),w=u(w,v,y,A,C[g+7],M,1126891415),A=u(A,w,v,y,C[g+14],O,2878612391),y=u(y,A,w,v,C[g+5],V,4237533241),v=u(v,y,A,w,C[g+12],U,1700485571),w=u(w,v,y,A,C[g+3],M,2399980690),A=u(A,w,v,y,C[g+10],O,4293915773),y=u(y,A,w,v,C[g+1],V,2240044497),v=u(v,y,A,w,C[g+8],U,1873313359),w=u(w,v,y,A,C[g+15],M,4264355552),A=u(A,w,v,y,C[g+6],O,2734768916),y=u(y,A,w,v,C[g+13],V,1309151649),v=u(v,y,A,w,C[g+4],U,4149444226),w=u(w,v,y,A,C[g+11],M,3174756917),A=u(A,w,v,y,C[g+2],O,718787259),y=u(y,A,w,v,C[g+9],V,3951481745),v=i(v,m),y=i(y,f),A=i(A,b),w=i(w,S);var G=p(v)+p(y)+p(A)+p(w);return G.toLowerCase()},i.convertPlainTextToHtml=function(e){return e.toString().replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<").replace(/\r/g,"").replace(/\n/g,"<br />")},i.draggeblePlace=function(){return s('<div class="draggablePlace"><span class="text"></span> <i class="icon-copy icon-white visible-on-ctrl"></i><i class="icon-mail icon-white hidden-on-ctrl"></i></div>').appendTo("#rl-hidden")},i.defautOptionsAfterRender=function(e,t){t&&!i.isUnd(t.disabled)&&e&&s(e).toggleClass("disabled",t.disabled).prop("disabled",t.disabled)},i.windowPopupKnockout=function(e,t,n,r){var l=null,c=a.open(""),u="__OpenerApplyBindingsUid"+i.fakeMd5()+"__",d=s("#"+t);a[u]=function(){if(c&&c.document.body&&d&&d[0]){var t=s(c.document.body);s("#rl-content",t).html(d.html()),s("html",c.document).addClass("external "+s("html").attr("class")),i.i18nToNode(t),e&&s("#rl-content",t)[0]&&o.applyBindings(e,s("#rl-content",t)[0]),a[u]=null,r(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>'+i.encodeHtml(n)+'</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)},i.settingsSaveHelperFunction=function(e,t,s,o){return s=s||null,o=i.isUnd(o)?1e3:i.pInt(o),function(i,a,r,l,c){t.call(s,a&&a.Result?p.SaveSettingsStep.TrueResult:p.SaveSettingsStep.FalseResult),e&&e.call(s,i,a,r,l,c),n.delay(function(){t.call(s,p.SaveSettingsStep.Idle)},o)}},i.settingsSaveHelperSimpleFunction=function(e,t){return i.settingsSaveHelperFunction(null,e,t,1e3)},i.htmlToPlain=function(e){var t=0,i=0,n=0,o=0,a=0,r="",l=function(e){for(var t=100,i="",s="",n=e,o=0,a=0;n.length>t;)s=n.substring(0,t),o=s.lastIndexOf(" "),a=s.lastIndexOf("\n"),-1!==a&&(o=a),-1===o&&(o=t),i+=s.substring(0,o)+"\n",n=n.substring(o+1);return i+n},u=function(e){return e=l(s.trim(e)),e="> "+e.replace(/\n/gm,"\n> "),e.replace(/(^|\n)([> ]+)/gm,function(){return arguments&&2<arguments.length?arguments[1]+s.trim(arguments[2].replace(/[\s]/,""))+" ":""})},d=function(){if(arguments&&1<arguments.length){var e=s.trim(arguments[1]);return 0<e.length&&(e=e.replace(/<div[^>]*>([\s\S\r\n]*)<\/div>/gim,d),e="\n"+s.trim(e)+"\n"),e}return""},p=function(){return arguments&&1<arguments.length?arguments[1].toString().replace(/[\n]/gm,"<br />"):""},h=function(){return arguments&&1<arguments.length?""+arguments[1]+arguments[2].replace(/</g,"<").replace(/>/g,">"):""},g=function(){return arguments&&1<arguments.length?s.trim(arguments[1]):""};for(r=e.replace(/<pre[^>]*>([\s\S\r\n]*)<\/pre>/gim,p).replace(/[\s]+/gm," ").replace(/((?:href|data)\s?=\s?)("[^"]+?"|'[^']+?')/gim,h).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,d).replace(/<blockquote[^>]*>/gim,"\n__bq__start__\n").replace(/<\/blockquote>/gim,"\n__bq__end__\n").replace(/<a [^>]*>([\s\S\r\n]*?)<\/a>/gim,g).replace(/<\/div>/gi,"\n").replace(/ /gi," ").replace(/"/gi,'"').replace(/<[^>]*>/gm,""),r=c.html(r).text(),r=r.replace(/\n[ \t]+/gm,"\n").replace(/[\n]{3,}/gm,"\n\n").replace(/>/gi,">").replace(/</gi,"<").replace(/&/gi,"&"),t=0,a=100;a>0&&(a--,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)+u(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,"")},i.plainToHtml=function(e,t){e=e.toString().replace(/\r/g,"");var s=!1,n=!0,o=!0,a=[],r="",l=0,c=e.split("\n");do{for(n=!1,a=[],l=0;l<c.length;l++)r=c[l],o=">"===r.substr(0,1),o&&!s?(n=!0,s=!0,a.push("~~~blockquote~~~"),a.push(r.substr(1))):!o&&s?(s=!1,a.push("~~~/blockquote~~~"),a.push(r)):a.push(o&&s?r.substr(1):r);s&&(s=!1,a.push("~~~/blockquote~~~")),c=a}while(n);return e=c.join("\n"),e=e.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<").replace(/~~~blockquote~~~[\s]*/g,"<blockquote>").replace(/[\s]*~~~\/blockquote~~~/g,"</blockquote>").replace(/[\-_~]{10,}/g,"<hr />").replace(/\n/g,"<br />"),t?i.linkify(e):e},a.rainloop_Utils_htmlToPlain=i.htmlToPlain,a.rainloop_Utils_plainToHtml=i.plainToHtml,i.linkify=function(e){return s.fn&&s.fn.linkify&&(e=c.html(e.replace(/&/gi,"amp_amp_12345_amp_amp")).linkify().find(".linkified").removeClass("linkified").end().html().replace(/amp_amp_12345_amp_amp/g,"&")),e},i.resizeAndCrop=function(e,t,i){var s=new a.Image;s.onload=function(){var e=[0,0],s=a.document.createElement("canvas"),n=s.getContext("2d");s.width=t,s.height=t,e=this.width>this.height?[this.width-this.height,0]:[0,this.height-this.width],n.fillStyle="#fff",n.fillRect(0,0,t,t),n.drawImage(this,e[0]/2,e[1]/2,this.width-e[0],this.height-e[1],0,0,t,t),i(s.toDataURL("image/jpeg"))},s.src=e},i.folderListOptionsBuilder=function(e,t,s,n,o,r,l,c,u,d){var h=null,g=!1,m=0,f=0,b=" ",S=[];for(u=i.isNormal(u)?u:0<e.length,d=i.isUnd(d)?!1:!!d,o=i.isNormal(o)?o:0,r=i.isNormal(r)?r:null,l=i.isNormal(l)?l:null,c=i.isNormal(c)?c:null,i.isArray(s)||(s=[]),i.isArray(n)||(n=[]),m=0,f=n.length;f>m;m++)S.push({id:n[m][0],name:n[m][1],system:!1,seporator:!1,disabled:!1});for(g=!0,m=0,f=e.length;f>m;m++)h=e[m],(l?l.call(null,h):!0)&&(g&&0<S.length&&S.push({id:"---",name:"---",system:!1,seporator:!0,disabled:!0}),g=!1,S.push({id:h.fullNameRaw,name:c?c.call(null,h):h.name(),system:!0,seporator:!1,disabled:!h.selectable||-1<i.inArray(h.fullNameRaw,s)||(r?r.call(null,h):!1)}));for(g=!0,m=0,f=t.length;f>m;m++)h=t[m],(h.subScribed()||!h.existen)&&(l?l.call(null,h):!0)&&(p.FolderType.User===h.type()||!u||0<h.subFolders().length)&&(g&&0<S.length&&S.push({id:"---",name:"---",system:!1,seporator:!0,disabled:!0}),g=!1,S.push({id:h.fullNameRaw,name:new a.Array(h.deep+1-o).join(b)+(c?c.call(null,h):h.name()),system:!1,seporator:!1,disabled:!h.selectable||-1<i.inArray(h.fullNameRaw,s)||(r?r.call(null,h):!1)})),h.subScribed()&&0<h.subFolders().length&&(S=S.concat(i.folderListOptionsBuilder([],h.subFolders(),s,[],o,r,l,c,u,d)));return S},i.computedPagenatorHelper=function(e,t){return function(){var s=0,n=0,o=2,r=[],l=e(),c=t(),u=function(e,t,s){var n={current:e===l,name:i.isUnd(s)?e.toString():s.toString(),custom:i.isUnd(s)?!1:!0,title:i.isUnd(s)?"":e.toString(),value:e.toString()};(i.isUnd(t)?0:!t)?r.unshift(n):r.push(n)};if(c>1||c>0&&l>c){for(l>c?(u(c),s=c,n=c):((3>=l||l>=c-2)&&(o+=2),u(l),s=l,n=l);o>0;)if(s-=1,n+=1,s>0&&(u(s,!1),o--),c>=n)u(n,!0),o--;else if(0>=s)break;3===s?u(2,!1):s>3&&u(a.Math.round((s-1)/2),!1,"..."),c-2===n?u(c-1,!0):c-2>n&&u(a.Math.round((c+n)/2),!0,"..."),s>1&&u(1,!1),c>n&&u(c,!0)}return r}},i.selectElement=function(e){if(a.getSelection){var t=a.getSelection();t.removeAllRanges();var i=a.document.createRange();i.selectNodeContents(e),t.addRange(i)}else if(a.document.selection){var s=a.document.body.createTextRange();s.moveToElementText(e),s.select()}},i.detectDropdownVisibility=n.debounce(function(){g.dropdownVisibility(!!n.find(g.aBootstrapDropdowns,function(e){return e.hasClass("open")}))},50),i.triggerAutocompleteInputChange=function(e){var t=function(){s(".checkAutocomplete").trigger("change")};e?n.delay(t,100):t()},e.exports=i}(t,e)},{$:21,$div:12,$doc:13,$html:14,$win:15,Consts:5,Enums:6,Globals:8,NotificationClass:18,_:26,ko:23,window:27}],12:[function(e,t){t.exports=e("$")("<div></div>")},{$:21}],13:[function(e,t){t.exports=e("$")(window.document)},{$:21}],14:[function(e,t){t.exports=e("$")("html")},{$:21}],15:[function(e,t){t.exports=e("$")(window)},{$:21}],16:[function(e,t){t.exports=e("window").rainloopAppData||{}},{window:27}],17:[function(e,t){t.exports=JSON},{}],18:[function(e,t){var i=e("window");t.exports=i.Notification&&i.Notification.requestPermission?i.Notification:null},{window:27}],19:[function(e,t){t.exports=crossroads},{}],20:[function(e,t){t.exports=hasher},{}],21:[function(e,t){t.exports=$},{}],22:[function(e,t){t.exports=key},{}],23:[function(e,t){!function(t,i){"use strict";var s=e("window"),n=e("_"),o=e("$"),a=e("$win"),r=e("$doc");i.bindingHandlers.tooltip={init:function(t,s){var n=e("Globals"),a=e("Utils");if(!n.bMobileDevice){var r=o(t),l=r.data("tooltip-class")||"",c=r.data("tooltip-placement")||"top";r.tooltip({delay:{show:500,hide:100},html:!0,container:"body",placement:c,trigger:"hover",title:function(){return r.is(".disabled")||n.dropdownVisibility()?"":'<span class="tooltip-class '+l+'">'+a.i18n(i.utils.unwrapObservable(s()))+"</span>"}}).click(function(){r.tooltip("hide")}),n.tooltipTrigger.subscribe(function(){r.tooltip("hide")})}}},i.bindingHandlers.tooltip2={init:function(t,i){var s=e("Globals"),n=o(t),a=n.data("tooltip-class")||"",r=n.data("tooltip-placement")||"top";n.tooltip({delay:{show:500,hide:100},html:!0,container:"body",placement:r,title:function(){return n.is(".disabled")||s.dropdownVisibility()?"":'<span class="tooltip-class '+a+'">'+i()()+"</span>"}}).click(function(){n.tooltip("hide")}),s.tooltipTrigger.subscribe(function(){n.tooltip("hide")})}},i.bindingHandlers.tooltip3={init:function(t){var i=o(t),s=e("Globals");i.tooltip({container:"body",trigger:"hover manual",title:function(){return i.data("tooltip3-data")||""}}),r.click(function(){i.tooltip("hide")}),s.tooltipTrigger.subscribe(function(){i.tooltip("hide")})},update:function(e,t){var s=i.utils.unwrapObservable(t());""===s?o(e).data("tooltip3-data","").tooltip("hide"):o(e).data("tooltip3-data",s).tooltip("show")}},i.bindingHandlers.registrateBootstrapDropdown={init:function(t){var i=e("Globals");i.aBootstrapDropdowns.push(o(t))}},i.bindingHandlers.openDropdownTrigger={update:function(t,s){if(i.utils.unwrapObservable(s())){var n=o(t),a=e("Utils");n.hasClass("open")||(n.find(".dropdown-toggle").dropdown("toggle"),a.detectDropdownVisibility()),s()(!1)}}},i.bindingHandlers.dropdownCloser={init:function(e){o(e).closest(".dropdown").on("click",".e-item",function(){o(e).dropdown("toggle")})}},i.bindingHandlers.popover={init:function(e,t){o(e).popover(i.utils.unwrapObservable(t()))}},i.bindingHandlers.csstext={init:function(t,s){var n=e("Utils");t&&t.styleSheet&&!n.isUnd(t.styleSheet.cssText)?t.styleSheet.cssText=i.utils.unwrapObservable(s()):o(t).text(i.utils.unwrapObservable(s()))},update:function(t,s){var n=e("Utils");t&&t.styleSheet&&!n.isUnd(t.styleSheet.cssText)?t.styleSheet.cssText=i.utils.unwrapObservable(s()):o(t).text(i.utils.unwrapObservable(s()))}},i.bindingHandlers.resizecrop={init:function(e){o(e).addClass("resizecrop").resizecrop({width:"100",height:"100",wrapperCSS:{"border-radius":"10px"}})},update:function(e,t){t()(),o(e).resizecrop({width:"100",height:"100"})}},i.bindingHandlers.onEnter={init:function(e,t,i,n){o(e).on("keypress",function(i){i&&13===s.parseInt(i.keyCode,10)&&(o(e).trigger("change"),t().call(n))})}},i.bindingHandlers.onEsc={init:function(e,t,i,n){o(e).on("keypress",function(i){i&&27===s.parseInt(i.keyCode,10)&&(o(e).trigger("change"),t().call(n))})}},i.bindingHandlers.clickOnTrue={update:function(e,t){i.utils.unwrapObservable(t())&&o(e).click()}},i.bindingHandlers.modal={init:function(t,s){var n=e("Globals"),a=e("Utils");o(t).toggleClass("fade",!n.bMobileDevice).modal({keyboard:!1,show:i.utils.unwrapObservable(s())}).on("shown",function(){a.windowResize()}).find(".close").click(function(){s()(!1)})},update:function(e,t){o(e).modal(i.utils.unwrapObservable(t())?"show":"hide")}},i.bindingHandlers.i18nInit={init:function(t){var i=e("Utils");i.i18nToNode(t)}},i.bindingHandlers.i18nUpdate={update:function(t,s){var n=e("Utils");i.utils.unwrapObservable(s()),n.i18nToNode(t)}},i.bindingHandlers.link={update:function(e,t){o(e).attr("href",i.utils.unwrapObservable(t()))}},i.bindingHandlers.title={update:function(e,t){o(e).attr("title",i.utils.unwrapObservable(t()))}},i.bindingHandlers.textF={init:function(e,t){o(e).text(i.utils.unwrapObservable(t()))}},i.bindingHandlers.initDom={init:function(e,t){t()(e)}},i.bindingHandlers.initResizeTrigger={init:function(e,t){var s=i.utils.unwrapObservable(t());o(e).css({height:s[1],"min-height":s[1]})},update:function(t,s){var n=e("Utils"),r=i.utils.unwrapObservable(s()),l=n.pInt(r[1]),c=0,u=o(t).offset().top;u>0&&(u+=n.pInt(r[2]),c=a.height()-u,c>l&&(l=c),o(t).css({height:l,"min-height":l}))}},i.bindingHandlers.appendDom={update:function(e,t){o(e).hide().empty().append(i.utils.unwrapObservable(t())).show()}},i.bindingHandlers.draggable={init:function(t,n,a){var r=e("Globals"),l=e("Utils");if(!r.bMobileDevice){var c=100,u=3,d=a(),p=d&&d.droppableSelector?d.droppableSelector:"",h={distance:20,handle:".dragHandle",cursorAt:{top:22,left:3},refreshPositions:!0,scroll:!0};p&&(h.drag=function(e){o(p).each(function(){var t=null,i=null,n=o(this),a=n.offset(),r=a.top+n.height();s.clearInterval(n.data("timerScroll")),n.data("timerScroll",!1),e.pageX>=a.left&&e.pageX<=a.left+n.width()&&(e.pageY>=r-c&&e.pageY<=r&&(t=function(){n.scrollTop(n.scrollTop()+u),l.windowResize()},n.data("timerScroll",s.setInterval(t,10)),t()),e.pageY>=a.top&&e.pageY<=a.top+c&&(i=function(){n.scrollTop(n.scrollTop()-u),l.windowResize()},n.data("timerScroll",s.setInterval(i,10)),i()))})},h.stop=function(){o(p).each(function(){s.clearInterval(o(this).data("timerScroll")),o(this).data("timerScroll",!1)})}),h.helper=function(e){return n()(e&&e.target?i.dataFor(e.target):null)},o(t).draggable(h).on("mousedown",function(){l.removeInFocus()})}}},i.bindingHandlers.droppable={init:function(t,i,s){var n=e("Globals");if(!n.bMobileDevice){var a=i(),r=s(),l=r&&r.droppableOver?r.droppableOver:null,c=r&&r.droppableOut?r.droppableOut:null,u={tolerance:"pointer",hoverClass:"droppableHover"};a&&(u.drop=function(e,t){a(e,t)},l&&(u.over=function(e,t){l(e,t)}),c&&(u.out=function(e,t){c(e,t)}),o(t).droppable(u))}}},i.bindingHandlers.nano={init:function(t){var i=e("Globals");i.bDisableNanoScroll||o(t).addClass("nano").nanoScroller({iOSNativeScrolling:!1,preventPageScrolling:!0})}},i.bindingHandlers.saveTrigger={init:function(e){var t=o(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(' <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,t){var s=i.utils.unwrapObservable(t()),n=o(e);if("custom"===n.data("save-trigger-type"))switch(s.toString()){case"1":n.find(".animated,.error").hide().removeClass("visible").end().find(".success").show().addClass("visible");break;case"0":n.find(".animated,.success").hide().removeClass("visible").end().find(".error").show().addClass("visible");break;case"-2":n.find(".error,.success").hide().removeClass("visible").end().find(".animated").show().addClass("visible");break;default:n.find(".animated").hide().end().find(".error,.success").removeClass("visible")}else switch(s.toString()){case"1":n.addClass("success").removeClass("error");break;case"0":n.addClass("error").removeClass("success");break;case"-2":break;default:n.removeClass("error success")}}},i.bindingHandlers.emailsTags={init:function(t,i,s){var a=e("Utils"),r=e("Model:Email"),l=o(t),c=i(),u=s(),d=u.autoCompleteSource||null,p=function(e){c&&c.focusTrigger&&c.focusTrigger(e)};l.inputosaurus({parseOnBlur:!0,allowDragAndDrop:!0,focusCallback:p,inputDelimiters:[",",";"],autoCompleteSource:d,parseHook:function(e){return n.map(e,function(e){var t=a.trim(e),i=null;return""!==t?(i=new r,i.mailsoParse(t),i.clearDuplicateName(),[i.toLine(!1),i]):[t,null]})},change:n.bind(function(e){l.data("EmailsTagsValue",e.target.value),c(e.target.value)},this)})},update:function(e,t,s){var n=o(e),a=s(),r=a.emailsTagsFilter||null,l=i.utils.unwrapObservable(t());n.data("EmailsTagsValue")!==l&&(n.val(l),n.data("EmailsTagsValue",l),n.inputosaurus("refresh")),r&&i.utils.unwrapObservable(r)&&n.inputosaurus("focus")}},i.bindingHandlers.contactTags={init:function(t,i,s){var a=e("Utils"),r=e("Model:ContactTag"),l=o(t),c=i(),u=s(),d=u.autoCompleteSource||null,p=function(e){c&&c.focusTrigger&&c.focusTrigger(e)};l.inputosaurus({parseOnBlur:!0,allowDragAndDrop:!1,focusCallback:p,inputDelimiters:[",",";"],outputDelimiter:",",autoCompleteSource:d,parseHook:function(e){return n.map(e,function(e){var t=a.trim(e),i=null;return""!==t?(i=new r,i.name(t),[i.toLine(!1),i]):[t,null]})},change:n.bind(function(e){l.data("ContactTagsValue",e.target.value),c(e.target.value)},this)})},update:function(e,t,s){var n=o(e),a=s(),r=a.contactTagsFilter||null,l=i.utils.unwrapObservable(t());n.data("ContactTagsValue")!==l&&(n.val(l),n.data("ContactTagsValue",l),n.inputosaurus("refresh")),r&&i.utils.unwrapObservable(r)&&n.inputosaurus("focus")}},i.bindingHandlers.command={init:function(e,t,s,n){var a=o(e),r=t();if(!r||!r.enabled||!r.canExecute)throw new Error("You are not using command function");a.addClass("command"),i.bindingHandlers[a.is("form")?"submit":"click"].init.apply(n,arguments)},update:function(e,t){var i=!0,s=o(e),n=t();i=n.enabled(),s.toggleClass("command-not-enabled",!i),i&&(i=n.canExecute(),s.toggleClass("command-can-not-be-execute",!i)),s.toggleClass("command-disabled disable disabled",!i).toggleClass("no-disabled",!!i),(s.is("input")||s.is("button"))&&s.prop("disabled",!i)}},i.extenders.trimmer=function(t){var s=e("Utils"),n=i.computed({read:t,write:function(e){t(s.trim(e.toString()))},owner:this});return n(t()),n},i.extenders.posInterer=function(t,s){var n=e("Utils"),o=i.computed({read:t,write:function(e){var i=n.pInt(e.toString(),s);0>=i&&(i=s),i===t()&&""+i!=""+e&&t(i+1),t(i)}});return o(t()),o},i.extenders.reversible=function(e){var t=e();return e.commit=function(){t=e()},e.reverse=function(){e(t)},e.commitedValue=function(){return t},e},i.extenders.toggleSubscribe=function(e,t){return e.subscribe(t[1],t[0],"beforeChange"),e.subscribe(t[2],t[0]),e},i.extenders.falseTimeout=function(t,i){var n=e("Utils");return t.iTimeout=0,t.subscribe(function(e){e&&(s.clearTimeout(t.iTimeout),t.iTimeout=s.setTimeout(function(){t(!1),t.iTimeout=0},n.pInt(i)))}),t},i.observable.fn.validateNone=function(){return this.hasError=i.observable(!1),this},i.observable.fn.validateEmail=function(){var t=e("Utils");return this.hasError=i.observable(!1),this.subscribe(function(e){e=t.trim(e),this.hasError(""!==e&&!/^[^@\s]+@[^@\s]+$/.test(e))},this),this.valueHasMutated(),this},i.observable.fn.validateSimpleEmail=function(){var t=e("Utils");return this.hasError=i.observable(!1),this.subscribe(function(e){e=t.trim(e),this.hasError(""!==e&&!/^.+@.+$/.test(e))},this),this.valueHasMutated(),this},i.observable.fn.validateFunc=function(t){var s=e("Utils");return this.hasFuncError=i.observable(!1),s.isFunc(t)&&(this.subscribe(function(e){this.hasFuncError(!t(e))},this),this.valueHasMutated()),this},t.exports=i}(t,ko)},{$:21,$doc:13,$win:15,Globals:8,"Model:ContactTag":33,"Model:Email":34,Utils:11,_:26,window:27}],24:[function(e,t){t.exports=moment},{}],25:[function(e,t){t.exports=ssm},{}],26:[function(e,t){t.exports=_},{}],27:[function(e,t){t.exports=window},{}],28:[function(e,t){!function(e,t){"use strict";function i(){this.oScreens={},this.sDefaultScreenName="",this.oCurrentScreen=null}var s=t("$"),n=t("_"),o=t("ko"),a=t("hasher"),r=t("crossroads"),l=t("$html"),c=t("Globals"),u=t("Plugins"),d=t("Utils"),p=t("Knoin:AbstractViewModel");i.prototype.oScreens={},i.prototype.sDefaultScreenName="",i.prototype.oCurrentScreen=null,i.prototype.hideLoading=function(){s("#rl-loading").hide()},i.prototype.constructorEnd=function(e){d.isFunc(e.__constructor_end)&&e.__constructor_end.call(e)},i.prototype.extendAsViewModel=function(e,t,i){t&&(i||(i=p),t.__name=e,u.regViewModelHook(e,t),n.extend(t.prototype,i.prototype))},i.prototype.addSettingsViewModel=function(e,t,i,s,n){e.__rlSettingsData={Label:i,Template:t,Route:s,IsDefault:!!n},c.aViewModels.settings.push(e)},i.prototype.removeSettingsViewModel=function(e){c.aViewModels["settings-removed"].push(e)},i.prototype.disableSettingsViewModel=function(e){c.aViewModels["settings-disabled"].push(e)},i.prototype.routeOff=function(){a.changed.active=!1},i.prototype.routeOn=function(){a.changed.active=!0},i.prototype.screen=function(e){return""===e||d.isUnd(this.oScreens[e])?null:this.oScreens[e]},i.prototype.buildViewModel=function(e,t){if(e&&!e.__builded){var i=this,a=new e(t),r=a.viewModelPosition(),l=s("#rl-content #rl-"+r.toLowerCase()),p=null;
|
||
e.__builded=!0,e.__vm=a,a.viewModelName=e.__name,l&&1===l.length?(p=s("<div></div>").addClass("rl-view-model").addClass("RL-"+a.viewModelTemplate()).hide(),p.appendTo(l),a.viewModelDom=p,e.__dom=p,"Popups"===r&&(a.cancelCommand=a.closeCommand=d.createCommand(a,function(){i.hideScreenPopup(e)}),a.modalVisibility.subscribe(function(e){var t=this;e?(this.viewModelDom.show(),this.storeAndSetKeyScope(),c.popupVisibilityNames.push(this.viewModelName),a.viewModelDom.css("z-index",3e3+c.popupVisibilityNames().length+10),d.delegateRun(this,"onFocus",[],500)):(d.delegateRun(this,"onHide"),this.restoreKeyScope(),c.popupVisibilityNames.remove(this.viewModelName),a.viewModelDom.css("z-index",2e3),c.tooltipTrigger(!c.tooltipTrigger()),n.delay(function(){t.viewModelDom.hide()},300))},a)),u.runHook("view-model-pre-build",[e.__name,a,p]),o.applyBindingAccessorsToNode(p[0],{i18nInit:!0,template:function(){return{name:a.viewModelTemplate()}}},a),d.delegateRun(a,"onBuild",[p]),a&&"Popups"===r&&a.registerPopupKeyDown(),u.runHook("view-model-post-build",[e.__name,a,p])):d.log("Cannot find view model position: "+r)}return e?e.__vm:null},i.prototype.hideScreenPopup=function(e){e&&e.__vm&&e.__dom&&(e.__vm.modalVisibility(!1),u.runHook("view-model-on-hide",[e.__name,e.__vm]))},i.prototype.showScreenPopup=function(e,t){e&&(this.buildViewModel(e),e.__vm&&e.__dom&&(e.__vm.modalVisibility(!0),d.delegateRun(e.__vm,"onShow",t||[]),u.runHook("view-model-on-show",[e.__name,e.__vm,t||[]])))},i.prototype.isPopupVisible=function(e){return e&&e.__vm?e.__vm.modalVisibility():!1},i.prototype.screenOnRoute=function(e,t){var i=this,s=null,o=null;""===d.pString(e)&&(e=this.sDefaultScreenName),""!==e&&(s=this.screen(e),s||(s=this.screen(this.sDefaultScreenName),s&&(t=e+"/"+t,e=this.sDefaultScreenName)),s&&s.__started&&(s.__builded||(s.__builded=!0,d.isNonEmptyArray(s.viewModels())&&n.each(s.viewModels(),function(e){this.buildViewModel(e,s)},this),d.delegateRun(s,"onBuild")),n.defer(function(){i.oCurrentScreen&&(d.delegateRun(i.oCurrentScreen,"onHide"),d.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),d.delegateRun(e.__vm,"onHide"))})),i.oCurrentScreen=s,i.oCurrentScreen&&(d.delegateRun(i.oCurrentScreen,"onShow"),u.runHook("screen-on-show",[i.oCurrentScreen.screenName(),i.oCurrentScreen]),d.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),d.delegateRun(e.__vm,"onShow"),d.delegateRun(e.__vm,"onFocus",[],200),u.runHook("view-model-on-show",[e.__name,e.__vm]))},i)),o=s.__cross?s.__cross():null,o&&o.parse(t)})))},i.prototype.startScreens=function(e){s("#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(),u.runHook("screen-pre-start",[e.screenName(),e]),d.delegateRun(e,"onStart"),u.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(),s("#rl-content").css({visibility:"visible"}),n.delay(function(){l.removeClass("rl-started-trigger").addClass("rl-started")},50)},i.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=d.isUnd(i)?!1:!!i,(d.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 i}(t,e)},{$:21,$html:14,Globals:8,"Knoin:AbstractViewModel":31,Plugins:10,Utils:11,_:26,crossroads:19,hasher:20,ko:23}],29:[function(e,t){!function(e){"use strict";function t(){}t.prototype.bootstart=function(){},e.exports=t}(t,e)},{}],30:[function(e,t){!function(e,t){"use strict";function i(e,t){this.sScreenName=e,this.aViewModels=n.isArray(t)?t:[]}var s=t("crossroads"),n=t("Utils");i.prototype.oCross=null,i.prototype.sScreenName="",i.prototype.aViewModels=[],i.prototype.viewModels=function(){return this.aViewModels},i.prototype.screenName=function(){return this.sScreenName},i.prototype.routes=function(){return null},i.prototype.__cross=function(){return this.oCross},i.prototype.__start=function(){var e=this.routes(),t=null,i=null;n.isNonEmptyArray(e)&&(i=_.bind(this.onRoute||n.emptyFunction,this),t=s.create(),_.each(e,function(e){t.addRoute(e[0],i).rules=e[1]}),this.oCross=t)},e.exports=i}(t,e)},{Utils:11,crossroads:19}],31:[function(e,t){!function(e,t){"use strict";function i(e,t){this.bDisabeCloseOnEsc=!1,this.sPosition=r.pString(e),this.sTemplate=r.pString(t),this.sDefaultKeyScope=o.KeyState.None,this.sCurrentKeyScope=this.sDefaultKeyScope,this.viewModelName="",this.viewModelVisibility=s.observable(!1),this.modalVisibility=s.observable(!1).extend({rateLimit:0}),this.viewModelDom=null}var s=t("ko"),n=t("$win"),o=t("Enums"),a=t("Globals"),r=t("Utils");i.prototype.sPosition="",i.prototype.sTemplate="",i.prototype.viewModelName="",i.prototype.viewModelDom=null,i.prototype.viewModelTemplate=function(){return this.sTemplate},i.prototype.viewModelPosition=function(){return this.sPosition},i.prototype.cancelCommand=function(){},i.prototype.closeCommand=function(){},i.prototype.storeAndSetKeyScope=function(){this.sCurrentKeyScope=a.keyScope(),a.keyScope(this.sDefaultKeyScope)},i.prototype.restoreKeyScope=function(){a.keyScope(this.sCurrentKeyScope)},i.prototype.registerPopupKeyDown=function(){var e=this;n.on("keydown",function(t){if(t&&e.modalVisibility&&e.modalVisibility()){if(!this.bDisabeCloseOnEsc&&o.EventKeyCode.Esc===t.keyCode)return r.delegateRun(e,"cancelCommand"),!1;if(o.EventKeyCode.Backspace===t.keyCode&&!r.inFocus())return!1}return!0})},e.exports=i}(t,e)},{$win:15,Enums:6,Globals:8,Utils:11,ko:23}],32:[function(e,t){!function(e,t){"use strict";function i(){this.mimeType="",this.fileName="",this.estimatedSize=0,this.friendlySize="",this.isInline=!1,this.isLinked=!1,this.cid="",this.cidWithOutTags="",this.contentLocation="",this.download="",this.folder="",this.uid="",this.mimeIndex=""}var s=t("window"),n=t("Globals"),o=t("Utils"),a=t("LinkBuilder");i.newInstanceFromJson=function(e){var t=new i;return t.initByJson(e)?t:null},i.prototype.mimeType="",i.prototype.fileName="",i.prototype.estimatedSize=0,i.prototype.friendlySize="",i.prototype.isInline=!1,i.prototype.isLinked=!1,i.prototype.cid="",i.prototype.cidWithOutTags="",i.prototype.contentLocation="",i.prototype.download="",i.prototype.folder="",i.prototype.uid="",i.prototype.mimeIndex="",i.prototype.initByJson=function(e){var t=!1;return e&&"Object/Attachment"===e["@Object"]&&(this.mimeType=(e.MimeType||"").toLowerCase(),this.fileName=e.FileName,this.estimatedSize=o.pInt(e.EstimatedSize),this.isInline=!!e.IsInline,this.isLinked=!!e.IsLinked,this.cid=e.CID,this.contentLocation=e.ContentLocation,this.download=e.Download,this.folder=e.Folder,this.uid=e.Uid,this.mimeIndex=e.MimeIndex,this.friendlySize=o.friendlySize(this.estimatedSize),this.cidWithOutTags=this.cid.replace(/^<+/,"").replace(/>+$/,""),t=!0),t},i.prototype.isImage=function(){return-1<o.inArray(this.mimeType.toLowerCase(),["image/png","image/jpg","image/jpeg","image/gif"])},i.prototype.isText=function(){return"text/"===this.mimeType.substr(0,5)&&-1===o.inArray(this.mimeType,["text/html"])},i.prototype.isPdf=function(){return n.bAllowPdfPreview&&"application/pdf"===this.mimeType},i.prototype.linkDownload=function(){return a.attachmentDownload(this.download)},i.prototype.linkPreview=function(){return a.attachmentPreview(this.download)},i.prototype.linkPreviewAsPlain=function(){return a.attachmentPreviewAsPlain(this.download)},i.prototype.generateTransferDownloadUrl=function(){var e=this.linkDownload();return"http"!==e.substr(0,4)&&(e=s.location.protocol+"//"+s.location.host+s.location.pathname+e),this.mimeType+":"+this.fileName+":"+e},i.prototype.eventDragStart=function(e,t){var i=t.originalEvent||t;return e&&i&&i.dataTransfer&&i.dataTransfer.setData&&i.dataTransfer.setData("DownloadURL",this.generateTransferDownloadUrl()),!0},i.prototype.iconClass=function(){var e=this.mimeType.toLocaleString().split("/"),t="icon-file";return e&&e[1]&&("image"===e[0]?t="icon-file-image":"text"===e[0]?t="icon-file-text":"audio"===e[0]?t="icon-file-music":"video"===e[0]?t="icon-file-movie":-1<o.inArray(e[1],["zip","7z","tar","rar","gzip","bzip","bzip2","x-zip","x-7z","x-rar","x-tar","x-gzip","x-bzip","x-bzip2","x-zip-compressed","x-7z-compressed","x-rar-compressed"])?t="icon-file-zip":-1<o.inArray(e[1],["rtf","msword","vnd.msword","vnd.openxmlformats-officedocument.wordprocessingml.document","vnd.openxmlformats-officedocument.wordprocessingml.template","vnd.ms-word.document.macroEnabled.12","vnd.ms-word.template.macroEnabled.12"])?t="icon-file-text":-1<o.inArray(e[1],["excel","ms-excel","vnd.ms-excel","vnd.openxmlformats-officedocument.spreadsheetml.sheet","vnd.openxmlformats-officedocument.spreadsheetml.template","vnd.ms-excel.sheet.macroEnabled.12","vnd.ms-excel.template.macroEnabled.12","vnd.ms-excel.addin.macroEnabled.12","vnd.ms-excel.sheet.binary.macroEnabled.12"])?t="icon-file-excel":-1<o.inArray(e[1],["powerpoint","ms-powerpoint","vnd.ms-powerpoint","vnd.openxmlformats-officedocument.presentationml.presentation","vnd.openxmlformats-officedocument.presentationml.template","vnd.openxmlformats-officedocument.presentationml.slideshow","vnd.ms-powerpoint.addin.macroEnabled.12","vnd.ms-powerpoint.presentation.macroEnabled.12","vnd.ms-powerpoint.template.macroEnabled.12","vnd.ms-powerpoint.slideshow.macroEnabled.12"])&&(t="icon-file-chart-graph")),t},e.exports=i}(t,e)},{Globals:8,LinkBuilder:9,Utils:11,window:27}],33:[function(e,t){!function(e,t){"use strict";function i(){this.idContactTag=0,this.name=s.observable(""),this.readOnly=!1}var s=t("ko"),n=t("Utils");i.prototype.parse=function(e){var t=!1;return e&&"Object/Tag"===e["@Object"]&&(this.idContact=n.pInt(e.IdContactTag),this.name(n.pString(e.Name)),this.readOnly=!!e.ReadOnly,t=!0),t},i.prototype.filterHelper=function(e){return-1!==this.name().toLowerCase().indexOf(e.toLowerCase())},i.prototype.toLine=function(e){return(n.isUnd(e)?1:!e)?this.name():n.encodeHtml(this.name())},e.exports=i}(t,e)},{Utils:11,ko:23}],34:[function(e,t){!function(e,t){"use strict";function i(e,t){this.email=e||"",this.name=t||"",this.privateType=null,this.clearDuplicateName()}var s=t("Enums"),n=t("Utils");i.newInstanceFromJson=function(e){var t=new i;return t.initByJson(e)?t:null},i.prototype.name="",i.prototype.email="",i.prototype.privateType=null,i.prototype.clear=function(){this.email="",this.name="",this.privateType=null},i.prototype.validate=function(){return""!==this.name||""!==this.email},i.prototype.hash=function(e){return"#"+(e?"":this.name)+"#"+this.email+"#"},i.prototype.clearDuplicateName=function(){this.name===this.email&&(this.name="")},i.prototype.type=function(){return null===this.privateType&&(this.email&&"@facebook.com"===this.email.substr(-13)&&(this.privateType=s.EmailType.Facebook),null===this.privateType&&(this.privateType=s.EmailType.Default)),this.privateType},i.prototype.search=function(e){return-1<(this.name+" "+this.email).toLowerCase().indexOf(e.toLowerCase())},i.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)},i.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},i.prototype.toLine=function(e,t,i){var s="";return""!==this.email&&(t=n.isUnd(t)?!1:!!t,i=n.isUnd(i)?!1:!!i,e&&""!==this.name?s=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:(s=this.email,""!==this.name?t?s=n.encodeHtml('"'+this.name+'" <')+'<a href="mailto:'+n.encodeHtml('"'+this.name+'" <'+this.email+">")+'" target="_blank" tabindex="-1">'+n.encodeHtml(s)+"</a>"+n.encodeHtml(">"):(s='"'+this.name+'" <'+s+">",i&&(s=n.encodeHtml(s))):t&&(s='<a href="mailto:'+n.encodeHtml(this.email)+'" target="_blank" tabindex="-1">'+n.encodeHtml(this.email)+"</a>"))),s},i.prototype.mailsoParse=function(e){if(e=n.trim(e),""===e)return!1;for(var t=function(e,t,i){e+="";var s=e.length;return 0>t&&(t+=s),s="undefined"==typeof i?s:0>i?i+s:i+t,t>=e.length||0>t||t>s?!1:e.slice(t,s)},i=function(e,t,i,s){return 0>i&&(i+=e.length),s=void 0!==s?s:e.length,0>s&&(s=s+e.length-i),e.slice(0,i)+t.substr(0,s)+t.slice(s)+e.slice(i+s)},s="",o="",a="",r=!1,l=!1,c=!1,u=null,d=0,p=0,h=0;h<e.length;){switch(e.substr(h,1)){case'"':r||l||c?l||c||(p=h,s=t(e,d+1,p-d-1),e=i(e,"",d,p-d+1),p=0,h=0,d=0,r=!1):(r=!0,d=h);break;case"<":r||l||c||(h>0&&0===s.length&&(s=t(e,0,h)),l=!0,d=h);break;case">":l&&(p=h,o=t(e,d+1,p-d-1),e=i(e,"",d,p-d+1),p=0,h=0,d=0,l=!1);break;case"(":r||l||c||(c=!0,d=h);break;case")":c&&(p=h,a=t(e,d+1,p-d-1),e=i(e,"",d,p-d+1),p=0,h=0,d=0,c=!1);break;case"\\":h++}h++}return 0===o.length&&(u=e.match(/[^@\s]+@\S+/i),u&&u[0]?o=u[0]:s=e),o.length>0&&0===s.length&&0===a.length&&(s=e.replace(o,"")),o=n.trim(o).replace(/^[<]+/,"").replace(/[>]+$/,""),s=n.trim(s).replace(/^["']+/,"").replace(/["']+$/,""),a=n.trim(a).replace(/^[(]+/,"").replace(/[)]+$/,""),s=s.replace(/\\\\(.)/,"$1"),a=a.replace(/\\\\(.)/,"$1"),this.name=s,this.email=o,this.clearDuplicateName(),!0},i.prototype.inputoTagLine=function(){return 0<this.name.length?this.name+" ("+this.email+")":this.email},e.exports=i}(t,e)},{Enums:6,Utils:11}],35:[function(e,t){!function(e,t){"use strict";function i(){this.folderFullNameRaw="",this.uid="",this.hash="",this.requestHash="",this.subject=a.observable(""),this.subjectPrefix=a.observable(""),this.subjectSuffix=a.observable(""),this.size=a.observable(0),this.dateTimeStampInUTC=a.observable(0),this.priority=a.observable(u.MessagePriority.Normal),this.proxy=!1,this.fromEmailString=a.observable(""),this.fromClearEmailString=a.observable(""),this.toEmailsString=a.observable(""),this.toClearEmailsString=a.observable(""),this.senderEmailsString=a.observable(""),this.senderClearEmailsString=a.observable(""),this.emails=[],this.from=[],this.to=[],this.cc=[],this.bcc=[],this.replyTo=[],this.deliveredTo=[],this.newForAnimation=a.observable(!1),this.deleted=a.observable(!1),this.unseen=a.observable(!1),this.flagged=a.observable(!1),this.answered=a.observable(!1),this.forwarded=a.observable(!1),this.isReadReceipt=a.observable(!1),this.focused=a.observable(!1),this.selected=a.observable(!1),this.checked=a.observable(!1),this.hasAttachments=a.observable(!1),this.attachmentsMainType=a.observable(""),this.moment=a.observable(r(r.unix(0))),this.attachmentIconClass=a.computed(function(){var e="";if(this.hasAttachments())switch(e="icon-attachment",this.attachmentsMainType()){case"image":e="icon-image";break;case"archive":e="icon-file-zip";break;case"doc":e="icon-file-text"}return e},this),this.fullFormatDateValue=a.computed(function(){return i.calculateFullFromatDateValue(this.dateTimeStampInUTC())},this),this.momentDate=d.createMomentDate(this),this.momentShortDate=d.createMomentShortDate(this),this.dateTimeStampInUTC.subscribe(function(e){var t=r().unix();this.moment(r.unix(e>t?t:e))},this),this.body=null,this.plainRaw="",this.isHtml=a.observable(!1),this.hasImages=a.observable(!1),this.attachments=a.observableArray([]),this.isPgpSigned=a.observable(!1),this.isPgpEncrypted=a.observable(!1),this.pgpSignedVerifyStatus=a.observable(u.SignedVerifyStatus.None),this.pgpSignedVerifyUser=a.observable(""),this.priority=a.observable(u.MessagePriority.Normal),this.readReceipt=a.observable(""),this.aDraftInfo=[],this.sMessageId="",this.sInReplyTo="",this.sReferences="",this.parentUid=a.observable(0),this.threads=a.observableArray([]),this.threadsLen=a.observable(0),this.hasUnseenSubMessage=a.observable(!1),this.hasFlaggedSubMessage=a.observable(!1),this.lastInCollapsedThread=a.observable(!1),this.lastInCollapsedThreadLoading=a.observable(!1),this.threadsLenResult=a.computed(function(){var e=this.threadsLen();return 0===this.parentUid()&&e>0?e+1:""},this)}var s=t("window"),n=t("$"),o=t("_"),a=t("ko"),r=t("moment"),l=t("$win"),c=t("$div"),u=t("Enums"),d=t("Utils"),p=t("LinkBuilder"),h=t("Model:Email"),g=t("Model:Attachment");i.newInstanceFromJson=function(e){var t=new i;return t.initByJson(e)?t:null},i.calculateFullFromatDateValue=function(e){return e>0?r.unix(e).format("LLL"):""},i.emailsToLine=function(e,t,i){var s=[],n=0,o=0;if(d.isNonEmptyArray(e))for(n=0,o=e.length;o>n;n++)s.push(e[n].toLine(t,i));return s.join(", ")},i.emailsToLineClear=function(e){var t=[],i=0,s=0;if(d.isNonEmptyArray(e))for(i=0,s=e.length;s>i;i++)e[i]&&e[i].email&&""!==e[i].name&&t.push(e[i].email);return t.join(", ")},i.initEmailsFromJson=function(e){var t=0,i=0,s=null,n=[];if(d.isNonEmptyArray(e))for(t=0,i=e.length;i>t;t++)s=h.newInstanceFromJson(e[t]),s&&n.push(s);return n},i.replyHelper=function(e,t,i){if(e&&0<e.length)for(var s=0,n=e.length;n>s;s++)d.isUnd(t[e[s].email])&&(t[e[s].email]=!0,i.push(e[s]))},i.prototype.clear=function(){this.folderFullNameRaw="",this.uid="",this.hash="",this.requestHash="",this.subject(""),this.subjectPrefix(""),this.subjectSuffix(""),this.size(0),this.dateTimeStampInUTC(0),this.priority(u.MessagePriority.Normal),this.proxy=!1,this.fromEmailString(""),this.fromClearEmailString(""),this.toEmailsString(""),this.toClearEmailsString(""),this.senderEmailsString(""),this.senderClearEmailsString(""),this.emails=[],this.from=[],this.to=[],this.cc=[],this.bcc=[],this.replyTo=[],this.deliveredTo=[],this.newForAnimation(!1),this.deleted(!1),this.unseen(!1),this.flagged(!1),this.answered(!1),this.forwarded(!1),this.isReadReceipt(!1),this.selected(!1),this.checked(!1),this.hasAttachments(!1),this.attachmentsMainType(""),this.body=null,this.isHtml(!1),this.hasImages(!1),this.attachments([]),this.isPgpSigned(!1),this.isPgpEncrypted(!1),this.pgpSignedVerifyStatus(u.SignedVerifyStatus.None),this.pgpSignedVerifyUser(""),this.priority(u.MessagePriority.Normal),this.readReceipt(""),this.aDraftInfo=[],this.sMessageId="",this.sInReplyTo="",this.sReferences="",this.parentUid(0),this.threads([]),this.threadsLen(0),this.hasUnseenSubMessage(!1),this.hasFlaggedSubMessage(!1),this.lastInCollapsedThread(!1),this.lastInCollapsedThreadLoading(!1)},i.prototype.computeSenderEmail=function(){var e=t("Storage:RainLoop:Data"),i=e.sentFolder(),s=e.draftFolder();this.senderEmailsString(this.folderFullNameRaw===i||this.folderFullNameRaw===s?this.toEmailsString():this.fromEmailString()),this.senderClearEmailsString(this.folderFullNameRaw===i||this.folderFullNameRaw===s?this.toClearEmailsString():this.fromClearEmailString())},i.prototype.initByJson=function(e){var t=!1;return e&&"Object/Message"===e["@Object"]&&(this.folderFullNameRaw=e.Folder,this.uid=e.Uid,this.hash=e.Hash,this.requestHash=e.RequestHash,this.proxy=!!e.ExternalProxy,this.size(d.pInt(e.Size)),this.from=i.initEmailsFromJson(e.From),this.to=i.initEmailsFromJson(e.To),this.cc=i.initEmailsFromJson(e.Cc),this.bcc=i.initEmailsFromJson(e.Bcc),this.replyTo=i.initEmailsFromJson(e.ReplyTo),this.deliveredTo=i.initEmailsFromJson(e.DeliveredTo),this.subject(e.Subject),d.isArray(e.SubjectParts)?(this.subjectPrefix(e.SubjectParts[0]),this.subjectSuffix(e.SubjectParts[1])):(this.subjectPrefix(""),this.subjectSuffix(this.subject())),this.dateTimeStampInUTC(d.pInt(e.DateTimeStampInUTC)),this.hasAttachments(!!e.HasAttachments),this.attachmentsMainType(e.AttachmentsMainType),this.fromEmailString(i.emailsToLine(this.from,!0)),this.fromClearEmailString(i.emailsToLineClear(this.from)),this.toEmailsString(i.emailsToLine(this.to,!0)),this.toClearEmailsString(i.emailsToLineClear(this.to)),this.parentUid(d.pInt(e.ParentThread)),this.threads(d.isArray(e.Threads)?e.Threads:[]),this.threadsLen(d.pInt(e.ThreadsLen)),this.initFlagsByJson(e),this.computeSenderEmail(),t=!0),t},i.prototype.initUpdateByMessageJson=function(e){var i=t("Storage:RainLoop:Data"),s=!1,n=u.MessagePriority.Normal;return e&&"Object/Message"===e["@Object"]&&(n=d.pInt(e.Priority),this.priority(-1<d.inArray(n,[u.MessagePriority.High,u.MessagePriority.Low])?n:u.MessagePriority.Normal),this.aDraftInfo=e.DraftInfo,this.sMessageId=e.MessageId,this.sInReplyTo=e.InReplyTo,this.sReferences=e.References,this.proxy=!!e.ExternalProxy,i.capaOpenPGP()&&(this.isPgpSigned(!!e.PgpSigned),this.isPgpEncrypted(!!e.PgpEncrypted)),this.hasAttachments(!!e.HasAttachments),this.attachmentsMainType(e.AttachmentsMainType),this.foundedCIDs=d.isArray(e.FoundedCIDs)?e.FoundedCIDs:[],this.attachments(this.initAttachmentsFromJson(e.Attachments)),this.readReceipt(e.ReadReceipt||""),this.computeSenderEmail(),s=!0),s},i.prototype.initAttachmentsFromJson=function(e){var t=0,i=0,s=null,n=[];if(e&&"Collection/AttachmentCollection"===e["@Object"]&&d.isNonEmptyArray(e["@Collection"]))for(t=0,i=e["@Collection"].length;i>t;t++)s=g.newInstanceFromJson(e["@Collection"][t]),s&&(""!==s.cidWithOutTags&&0<this.foundedCIDs.length&&0<=d.inArray(s.cidWithOutTags,this.foundedCIDs)&&(s.isLinked=!0),n.push(s));return n},i.prototype.initFlagsByJson=function(e){var t=!1;return e&&"Object/Message"===e["@Object"]&&(this.unseen(!e.IsSeen),this.flagged(!!e.IsFlagged),this.answered(!!e.IsAnswered),this.forwarded(!!e.IsForwarded),this.isReadReceipt(!!e.IsReadReceipt),t=!0),t},i.prototype.fromToLine=function(e,t){return i.emailsToLine(this.from,e,t)},i.prototype.toToLine=function(e,t){return i.emailsToLine(this.to,e,t)},i.prototype.ccToLine=function(e,t){return i.emailsToLine(this.cc,e,t)},i.prototype.bccToLine=function(e,t){return i.emailsToLine(this.bcc,e,t)},i.prototype.lineAsCcc=function(){var e=[];if(this.deleted()&&e.push("deleted"),this.selected()&&e.push("selected"),this.checked()&&e.push("checked"),this.flagged()&&e.push("flagged"),this.unseen()&&e.push("unseen"),this.answered()&&e.push("answered"),this.forwarded()&&e.push("forwarded"),this.focused()&&e.push("focused"),this.hasAttachments())switch(e.push("withAttachments"),this.attachmentsMainType()){case"image":e.push("imageOnlyAttachments");break;case"archive":e.push("archiveOnlyAttachments")}return this.newForAnimation()&&e.push("new"),""===this.subject()&&e.push("emptySubject"),0<this.parentUid()&&e.push("hasParentMessage"),0<this.threadsLen()&&0===this.parentUid()&&e.push("hasChildrenMessage"),this.hasUnseenSubMessage()&&e.push("hasUnseenSubMessage"),this.hasFlaggedSubMessage()&&e.push("hasFlaggedSubMessage"),e.join(" ")},i.prototype.hasVisibleAttachments=function(){return!!o.find(this.attachments(),function(e){return!e.isLinked})},i.prototype.findAttachmentByCid=function(e){var t=null,i=this.attachments();return d.isNonEmptyArray(i)&&(e=e.replace(/^<+/,"").replace(/>+$/,""),t=o.find(i,function(t){return e===t.cidWithOutTags})),t||null},i.prototype.findAttachmentByContentLocation=function(e){var t=null,i=this.attachments();return d.isNonEmptyArray(i)&&(t=o.find(i,function(t){return e===t.contentLocation})),t||null},i.prototype.messageId=function(){return this.sMessageId},i.prototype.inReplyTo=function(){return this.sInReplyTo},i.prototype.references=function(){return this.sReferences},i.prototype.fromAsSingleEmail=function(){return d.isArray(this.from)&&this.from[0]?this.from[0].email:""},i.prototype.viewLink=function(){return p.messageViewLink(this.requestHash)},i.prototype.downloadLink=function(){return p.messageDownloadLink(this.requestHash)},i.prototype.replyEmails=function(e){var t=[],s=d.isUnd(e)?{}:e;return i.replyHelper(this.replyTo,s,t),0===t.length&&i.replyHelper(this.from,s,t),t},i.prototype.replyAllEmails=function(e){var t=[],s=[],n=d.isUnd(e)?{}:e;return i.replyHelper(this.replyTo,n,t),0===t.length&&i.replyHelper(this.from,n,t),i.replyHelper(this.to,n,t),i.replyHelper(this.cc,n,s),[t,s]},i.prototype.textBodyToString=function(){return this.body?this.body.html():""},i.prototype.attachmentsToStringLine=function(){var e=o.map(this.attachments(),function(e){return e.fileName+" ("+e.friendlySize+")"});return e&&0<e.length?e.join(", "):""},i.prototype.getDataForWindowPopup=function(){return{popupFrom:this.fromToLine(!1),popupTo:this.toToLine(!1),popupCc:this.ccToLine(!1),popupBcc:this.bccToLine(!1),popupSubject:this.subject(),popupDate:this.fullFormatDateValue(),popupAttachments:this.attachmentsToStringLine(),popupBody:this.textBodyToString()}},i.prototype.viewPopupMessage=function(e){d.windowPopupKnockout(this.getDataForWindowPopup(),"PopupsWindowSimpleMessage",this.subject(),function(t){t&&t.document&&t.document.body&&(n("img.lazy",t.document.body).each(function(e,t){var i=n(t),s=i.data("original"),o=i.attr("src");e>=0&&s&&!o&&i.attr("src",s)}),e&&s.setTimeout(function(){t.print()},100))})},i.prototype.printMessage=function(){this.viewPopupMessage(!0)},i.prototype.generateUid=function(){return this.folderFullNameRaw+"/"+this.uid},i.prototype.populateByMessageListItem=function(e){return this.folderFullNameRaw=e.folderFullNameRaw,this.uid=e.uid,this.hash=e.hash,this.requestHash=e.requestHash,this.subject(e.subject()),this.subjectPrefix(this.subjectPrefix()),this.subjectSuffix(this.subjectSuffix()),this.size(e.size()),this.dateTimeStampInUTC(e.dateTimeStampInUTC()),this.priority(e.priority()),this.proxy=e.proxy,this.fromEmailString(e.fromEmailString()),this.fromClearEmailString(e.fromClearEmailString()),this.toEmailsString(e.toEmailsString()),this.toClearEmailsString(e.toClearEmailsString()),this.emails=e.emails,this.from=e.from,this.to=e.to,this.cc=e.cc,this.bcc=e.bcc,this.replyTo=e.replyTo,this.deliveredTo=e.deliveredTo,this.unseen(e.unseen()),this.flagged(e.flagged()),this.answered(e.answered()),this.forwarded(e.forwarded()),this.isReadReceipt(e.isReadReceipt()),this.selected(e.selected()),this.checked(e.checked()),this.hasAttachments(e.hasAttachments()),this.attachmentsMainType(e.attachmentsMainType()),this.moment(e.moment()),this.body=null,this.priority(u.MessagePriority.Normal),this.aDraftInfo=[],this.sMessageId="",this.sInReplyTo="",this.sReferences="",this.parentUid(e.parentUid()),this.threads(e.threads()),this.threadsLen(e.threadsLen()),this.computeSenderEmail(),this},i.prototype.showExternalImages=function(e){if(this.body&&this.body.data("rl-has-images")){var t="";e=d.isUnd(e)?!1:e,this.hasImages(!1),this.body.data("rl-has-images",!1),t=this.proxy?"data-x-additional-src":"data-x-src",n("["+t+"]",this.body).each(function(){e&&n(this).is("img")?n(this).addClass("lazy").attr("data-original",n(this).attr(t)).removeAttr(t):n(this).attr("src",n(this).attr(t)).removeAttr(t)}),t=this.proxy?"data-x-additional-style-url":"data-x-style-url",n("["+t+"]",this.body).each(function(){var e=d.trim(n(this).attr("style"));e=""===e?"":";"===e.substr(-1)?e+" ":e+"; ",n(this).attr("style",e+n(this).attr(t)).removeAttr(t)}),e&&(n("img.lazy",this.body).addClass("lazy-inited").lazyload({threshold:400,effect:"fadeIn",skip_invisible:!1,container:n(".RL-MailMessageView .messageView .messageItem .content")[0]}),l.resize()),d.windowResize(500)}},i.prototype.showInternalImages=function(e){if(this.body&&!this.body.data("rl-init-internal-images")){this.body.data("rl-init-internal-images",!0),e=d.isUnd(e)?!1:e;var t=this;n("[data-x-src-cid]",this.body).each(function(){var i=t.findAttachmentByCid(n(this).attr("data-x-src-cid"));i&&i.download&&(e&&n(this).is("img")?n(this).addClass("lazy").attr("data-original",i.linkPreview()):n(this).attr("src",i.linkPreview()))}),n("[data-x-src-location]",this.body).each(function(){var i=t.findAttachmentByContentLocation(n(this).attr("data-x-src-location"));i||(i=t.findAttachmentByCid(n(this).attr("data-x-src-location"))),i&&i.download&&(e&&n(this).is("img")?n(this).addClass("lazy").attr("data-original",i.linkPreview()):n(this).attr("src",i.linkPreview()))}),n("[data-x-style-cid]",this.body).each(function(){var e="",i="",s=t.findAttachmentByCid(n(this).attr("data-x-style-cid"));s&&s.linkPreview&&(i=n(this).attr("data-x-style-cid-name"),""!==i&&(e=d.trim(n(this).attr("style")),e=""===e?"":";"===e.substr(-1)?e+" ":e+"; ",n(this).attr("style",e+i+": url('"+s.linkPreview()+"')")))}),e&&!function(e,t){o.delay(function(){e.addClass("lazy-inited").lazyload({threshold:400,effect:"fadeIn",skip_invisible:!1,container:t})},300)}(n("img.lazy",t.body),n(".RL-MailMessageView .messageView .messageItem .content")[0]),d.windowResize(500)}},i.prototype.storeDataToDom=function(){if(this.body){this.body.data("rl-is-html",!!this.isHtml()),this.body.data("rl-has-images",!!this.hasImages()),this.body.data("rl-plain-raw",this.plainRaw);var e=t("Storage:RainLoop:Data");e.capaOpenPGP()&&(this.body.data("rl-plain-pgp-signed",!!this.isPgpSigned()),this.body.data("rl-plain-pgp-encrypted",!!this.isPgpEncrypted()),this.body.data("rl-pgp-verify-status",this.pgpSignedVerifyStatus()),this.body.data("rl-pgp-verify-user",this.pgpSignedVerifyUser()))}},i.prototype.storePgpVerifyDataToDom=function(){var e=t("Storage:RainLoop:Data");this.body&&e.capaOpenPGP()&&(this.body.data("rl-pgp-verify-status",this.pgpSignedVerifyStatus()),this.body.data("rl-pgp-verify-user",this.pgpSignedVerifyUser()))},i.prototype.fetchDataToDom=function(){if(this.body){this.isHtml(!!this.body.data("rl-is-html")),this.hasImages(!!this.body.data("rl-has-images")),this.plainRaw=d.pString(this.body.data("rl-plain-raw"));var e=t("Storage:RainLoop:Data");e.capaOpenPGP()?(this.isPgpSigned(!!this.body.data("rl-plain-pgp-signed")),this.isPgpEncrypted(!!this.body.data("rl-plain-pgp-encrypted")),this.pgpSignedVerifyStatus(this.body.data("rl-pgp-verify-status")),this.pgpSignedVerifyUser(this.body.data("rl-pgp-verify-user"))):(this.isPgpSigned(!1),this.isPgpEncrypted(!1),this.pgpSignedVerifyStatus(u.SignedVerifyStatus.None),this.pgpSignedVerifyUser(""))}},i.prototype.verifyPgpSignedClearMessage=function(){if(this.isPgpSigned()){var e=[],i=null,a=t("Storage:RainLoop:Data"),r=this.from&&this.from[0]&&this.from[0].email?this.from[0].email:"",l=a.findPublicKeysByEmail(r),d=null,p=null,h="";this.pgpSignedVerifyStatus(u.SignedVerifyStatus.Error),this.pgpSignedVerifyUser("");try{i=s.openpgp.cleartext.readArmored(this.plainRaw),i&&i.getText&&(this.pgpSignedVerifyStatus(l.length?u.SignedVerifyStatus.Unverified:u.SignedVerifyStatus.UnknownPublicKeys),e=i.verify(l),e&&0<e.length&&(d=o.find(e,function(e){return e&&e.keyid&&e.valid}),d&&(p=a.findPublicKeyByHex(d.keyid.toHex()),p&&(h=i.getText(),this.pgpSignedVerifyStatus(u.SignedVerifyStatus.Success),this.pgpSignedVerifyUser(p.user),h=c.empty().append(n('<pre class="b-plain-openpgp signed verified"></pre>').text(h)).html(),c.empty(),this.replacePlaneTextBody(h)))))}catch(g){}this.storePgpVerifyDataToDom()}},i.prototype.decryptPgpEncryptedMessage=function(e){if(this.isPgpEncrypted()){var i=[],a=null,r=null,l=t("Storage:RainLoop:Data"),d=this.from&&this.from[0]&&this.from[0].email?this.from[0].email:"",p=l.findPublicKeysByEmail(d),h=l.findSelfPrivateKey(e),g=null,m=null,f="";this.pgpSignedVerifyStatus(u.SignedVerifyStatus.Error),this.pgpSignedVerifyUser(""),h||this.pgpSignedVerifyStatus(u.SignedVerifyStatus.UnknownPrivateKey);try{a=s.openpgp.message.readArmored(this.plainRaw),a&&h&&a.decrypt&&(this.pgpSignedVerifyStatus(u.SignedVerifyStatus.Unverified),r=a.decrypt(h),r&&(i=r.verify(p),i&&0<i.length&&(g=o.find(i,function(e){return e&&e.keyid&&e.valid}),g&&(m=l.findPublicKeyByHex(g.keyid.toHex()),m&&(this.pgpSignedVerifyStatus(u.SignedVerifyStatus.Success),this.pgpSignedVerifyUser(m.user)))),f=r.getText(),f=c.empty().append(n('<pre class="b-plain-openpgp signed verified"></pre>').text(f)).html(),c.empty(),this.replacePlaneTextBody(f)))}catch(b){}this.storePgpVerifyDataToDom()
|
||
}},i.prototype.replacePlaneTextBody=function(e){this.body&&this.body.html(e).addClass("b-text-part plain")},i.prototype.flagHash=function(){return[this.deleted(),this.unseen(),this.flagged(),this.answered(),this.forwarded(),this.isReadReceipt()].join("")},e.exports=i}(t,e)},{$:21,$div:12,$win:15,Enums:6,LinkBuilder:9,"Model:Attachment":32,"Model:Email":34,"Storage:RainLoop:Data":55,Utils:11,_:26,ko:23,moment:24,window:27}],36:[function(e,t){!function(e,t){"use strict";function i(e){u.call(this,"settings",e),this.menu=o.observableArray([]),this.oCurrentSubScreen=null,this.oViewModelPlace=null}var s=t("$"),n=t("_"),o=t("ko"),a=t("Globals"),r=t("Utils"),l=t("LinkBuilder"),c=t("App:Knoin"),u=t("Knoin:AbstractScreen");n.extend(i.prototype,u.prototype),i.prototype.onRoute=function(e){var t=this,i=null,u=null,d=null,p=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:(d=this.oViewModelPlace,d&&1===d.length?(i=new u,p=s("<div></div>").addClass("rl-settings-view-model").hide(),p.appendTo(d),i.viewModelDom=p,i.__rlSettingsData=u.__rlSettingsData,u.__dom=p,u.__builded=!0,u.__vm=i,o.applyBindingAccessorsToNode(p[0],{i18nInit:!0,template:function(){return{name:u.__rlSettingsData.Template}}},i),r.delegateRun(i,"onBuild",[p])):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)}),s("#rl-content .b-settings .b-content .content").scrollTop(0)),r.windowResize()})):c.setHash(l.settings(),!1,!0)},i.prototype.onHide=function(){this.oCurrentSubScreen&&this.oCurrentSubScreen.viewModelDom&&(r.delegateRun(this.oCurrentSubScreen,"onHide"),this.oCurrentSubScreen.viewModelDom.hide())},i.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:o.observable(!1),disabled:!!n.find(a.aViewModels["settings-disabled"],function(t){return t&&t===e})})},this),this.oViewModelPlace=s("#rl-content #rl-settings-subscreen")},i.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=i}(t,e)},{$:21,"App:Knoin":28,Globals:8,"Knoin:AbstractScreen":30,LinkBuilder:9,Utils:11,_:26,ko:23}],37:[function(e,t){!function(e,t){"use strict";function i(){n.call(this,"login",[t("View:Admin:Login")])}var s=t("_"),n=t("Knoin:AbstractScreen");s.extend(i.prototype,n.prototype),i.prototype.onShow=function(){t("App:Admin").setTitle("")},e.exports=i}(t,e)},{"App:Admin":3,"Knoin:AbstractScreen":30,"View:Admin:Login":60,_:26}],38:[function(e,t){!function(e,t){"use strict";function i(){n.call(this,[t("View:Admin:SettingsMenu"),t("View:Admin:SettingsPane")])}var s=t("_"),n=t("Screen:AbstractSettings");s.extend(i.prototype,n.prototype),i.prototype.onShow=function(){t("App:Admin").setTitle("")},e.exports=i}(t,e)},{"App:Admin":3,"Screen:AbstractSettings":36,"View:Admin:SettingsMenu":61,"View:Admin:SettingsPane":62,_:26}],39:[function(e,t){!function(e,t){"use strict";function i(){var e=t("Storage:Settings"),i=t("Storage:Admin:Data");this.version=s.observable(e.settingsGet("Version")),this.access=s.observable(!!e.settingsGet("CoreAccess")),this.errorDesc=s.observable(""),this.coreReal=i.coreReal,this.coreUpdatable=i.coreUpdatable,this.coreAccess=i.coreAccess,this.coreChecking=i.coreChecking,this.coreUpdating=i.coreUpdating,this.coreRemoteVersion=i.coreRemoteVersion,this.coreRemoteRelease=i.coreRemoteRelease,this.coreVersionCompare=i.coreVersionCompare,this.statusType=s.computed(function(){var e="",t=this.coreVersionCompare(),i=this.coreChecking(),s=this.coreUpdating(),n=this.coreReal();return i?e="checking":s?e="updating":n&&0===t?e="up-to-date":n&&-1===t?e="available":n||(e="error",this.errorDesc("Cannot access the repository at the moment.")),e},this)}var s=t("ko");i.prototype.onBuild=function(){this.access()&&t("App:Admin").reloadCoreData()},i.prototype.updateCoreData=function(){this.coreUpdating()||t("App:Admin").updateCoreData()},e.exports=i}(t,e)},{"App:Admin":3,"Storage:Admin:Data":52,"Storage:Settings":59,ko:23}],40:[function(e,t){!function(e,t){"use strict";function i(){var e=t("Enums"),i=t("Storage:Settings");this.title=n.observable(i.settingsGet("Title")),this.title.trigger=n.observable(e.SaveSettingsStep.Idle),this.loadingDesc=n.observable(i.settingsGet("LoadingDescription")),this.loadingDesc.trigger=n.observable(e.SaveSettingsStep.Idle),this.loginLogo=n.observable(i.settingsGet("LoginLogo")),this.loginLogo.trigger=n.observable(e.SaveSettingsStep.Idle),this.loginDescription=n.observable(i.settingsGet("LoginDescription")),this.loginDescription.trigger=n.observable(e.SaveSettingsStep.Idle),this.loginCss=n.observable(i.settingsGet("LoginCss")),this.loginCss.trigger=n.observable(e.SaveSettingsStep.Idle)}var s=t("_"),n=t("ko"),o=t("Utils");i.prototype.onBuild=function(){var e=this,i=t("Storage:Admin:Remote");s.delay(function(){var t=o.settingsSaveHelperSimpleFunction(e.title.trigger,e),s=o.settingsSaveHelperSimpleFunction(e.loadingDesc.trigger,e),n=o.settingsSaveHelperSimpleFunction(e.loginLogo.trigger,e),a=o.settingsSaveHelperSimpleFunction(e.loginDescription.trigger,e),r=o.settingsSaveHelperSimpleFunction(e.loginCss.trigger,e);e.title.subscribe(function(e){i.saveAdminConfig(t,{Title:o.trim(e)})}),e.loadingDesc.subscribe(function(e){i.saveAdminConfig(s,{LoadingDescription:o.trim(e)})}),e.loginLogo.subscribe(function(e){i.saveAdminConfig(n,{LoginLogo:o.trim(e)})}),e.loginDescription.subscribe(function(e){i.saveAdminConfig(a,{LoginDescription:o.trim(e)})}),e.loginCss.subscribe(function(e){i.saveAdminConfig(r,{LoginCss:o.trim(e)})})},50)},e.exports=i}(t,e)},{Enums:6,"Storage:Admin:Remote":53,"Storage:Settings":59,Utils:11,_:26,ko:23}],41:[function(e,t){!function(e,t){"use strict";function i(){var e=t("Storage:Admin:Remote");this.defautOptionsAfterRender=a.defautOptionsAfterRender,this.enableContacts=n.observable(!!r.settingsGet("ContactsEnable")),this.contactsSharing=n.observable(!!r.settingsGet("ContactsSharing")),this.contactsSync=n.observable(!!r.settingsGet("ContactsSync"));var i=["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=n.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(i),this.contactsType=n.observable(""),this.mainContactsType=n.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=n.observable(r.settingsGet("ContactsPdoDsn")),this.pdoUser=n.observable(r.settingsGet("ContactsPdoUser")),this.pdoPassword=n.observable(r.settingsGet("ContactsPdoPassword")),this.pdoDsnTrigger=n.observable(o.SaveSettingsStep.Idle),this.pdoUserTrigger=n.observable(o.SaveSettingsStep.Idle),this.pdoPasswordTrigger=n.observable(o.SaveSettingsStep.Idle),this.contactsTypeTrigger=n.observable(o.SaveSettingsStep.Idle),this.testing=n.observable(!1),this.testContactsSuccess=n.observable(!1),this.testContactsError=n.observable(!1),this.testContactsErrorMessage=n.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=s.bind(this.onTestContactsResponse,this)}var s=t("_"),n=t("ko"),o=t("Enums"),a=t("Utils"),r=t("Storage:Settings");i.prototype.onTestContactsResponse=function(e,t){this.testContactsSuccess(!1),this.testContactsError(!1),this.testContactsErrorMessage(""),o.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)},i.prototype.onShow=function(){this.testContactsSuccess(!1),this.testContactsError(!1),this.testContactsErrorMessage("")},i.prototype.onBuild=function(){var e=this,i=t("Storage:Admin:Remote");s.delay(function(){var t=a.settingsSaveHelperSimpleFunction(e.pdoDsnTrigger,e),s=a.settingsSaveHelperSimpleFunction(e.pdoUserTrigger,e),n=a.settingsSaveHelperSimpleFunction(e.pdoPasswordTrigger,e),o=a.settingsSaveHelperSimpleFunction(e.contactsTypeTrigger,e);e.enableContacts.subscribe(function(e){i.saveAdminConfig(null,{ContactsEnable:e?"1":"0"})}),e.contactsSharing.subscribe(function(e){i.saveAdminConfig(null,{ContactsSharing:e?"1":"0"})}),e.contactsSync.subscribe(function(e){i.saveAdminConfig(null,{ContactsSync:e?"1":"0"})}),e.contactsType.subscribe(function(e){i.saveAdminConfig(o,{ContactsPdoType:e})}),e.pdoDsn.subscribe(function(e){i.saveAdminConfig(t,{ContactsPdoDsn:a.trim(e)})}),e.pdoUser.subscribe(function(e){i.saveAdminConfig(s,{ContactsPdoUser:a.trim(e)})}),e.pdoPassword.subscribe(function(e){i.saveAdminConfig(n,{ContactsPdoPassword:a.trim(e)})}),e.contactsType(r.settingsGet("ContactsPdoType"))},50)},e.exports=i}(t,e)},{Enums:6,"Storage:Admin:Remote":53,"Storage:Settings":59,Utils:11,_:26,ko:23}],42:[function(e,t){!function(e,t){"use strict";function i(){this.domains=l.domains,this.domainsLoading=l.domainsLoading,this.iDomainForDeletionTimeout=0,this.visibility=o.computed(function(){return l.domainsLoading()?"visible":"hidden"},this),this.domainForDeletion=o.observable(null).extend({toggleSubscribe:[this,function(e){e&&e.deleteAccess(!1)},function(e){e&&(e.deleteAccess(!0),this.startDomainForDeletionTimeout())}]})}var s=t("window"),n=t("_"),o=t("ko"),a=t("Enums"),r=t("View:Popup:Domain"),l=t("Storage:Admin:Data"),c=t("Storage:Admin:Remote");i.prototype.startDomainForDeletionTimeout=function(){var e=this;s.clearInterval(this.iDomainForDeletionTimeout),this.iDomainForDeletionTimeout=s.setTimeout(function(){e.domainForDeletion(null)},3e3)},i.prototype.createDomain=function(){t("App:Knoin").showScreenPopup(r)},i.prototype.deleteDomain=function(e){this.domains.remove(e),c.domainDelete(n.bind(this.onDomainListChangeRequest,this),e.name)},i.prototype.disableDomain=function(e){e.disabled(!e.disabled()),c.domainDisable(n.bind(this.onDomainListChangeRequest,this),e.name,e.disabled())},i.prototype.onBuild=function(e){var i=this;e.on("click",".b-admin-domains-list-table .e-item .e-action",function(){var e=o.dataFor(this);e&&c.domain(n.bind(i.onDomainLoadRequest,i),e.name)}),t("App:Admin").reloadDomainList()},i.prototype.onDomainLoadRequest=function(e,i){a.StorageResultType.Success===e&&i&&i.Result&&t("App:Knoin").showScreenPopup(r,[i.Result])},i.prototype.onDomainListChangeRequest=function(){t("App:Admin").reloadDomainList()},e.exports=i}(t,e)},{"App:Admin":3,"App:Knoin":28,Enums:6,"Storage:Admin:Data":52,"Storage:Admin:Remote":53,"View:Popup:Domain":65,_:26,ko:23,window:27}],43:[function(e,t){!function(e,t){"use strict";function i(){this.mainLanguage=c.mainLanguage,this.mainTheme=c.mainTheme,this.language=c.language,this.theme=c.theme,this.allowLanguagesOnSettings=c.allowLanguagesOnSettings,this.capaThemes=c.capaThemes,this.capaGravatar=c.capaGravatar,this.capaAdditionalAccounts=c.capaAdditionalAccounts,this.capaAdditionalIdentities=c.capaAdditionalIdentities,this.mainAttachmentLimit=n.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=n.computed(function(){return s.map(c.themes(),function(e){return{optValue:e,optText:a.convertThemeName(e)}})}),this.mainLanguageFullName=n.computed(function(){return a.convertLangName(this.mainLanguage())},this),this.weakPassword=!!l.settingsGet("WeakPassword"),this.attachmentLimitTrigger=n.observable(o.SaveSettingsStep.Idle),this.languageTrigger=n.observable(o.SaveSettingsStep.Idle),this.themeTrigger=n.observable(o.SaveSettingsStep.Idle)}var s=t("_"),n=t("ko"),o=t("Enums"),a=t("Utils"),r=t("LinkBuilder"),l=t("Storage:Settings"),c=t("Storage:Admin:Data");i.prototype.onBuild=function(){var e=this,i=t("Storage:Admin:Remote");s.delay(function(){var t=a.settingsSaveHelperSimpleFunction(e.attachmentLimitTrigger,e),s=a.settingsSaveHelperSimpleFunction(e.languageTrigger,e),n=a.settingsSaveHelperSimpleFunction(e.themeTrigger,e);e.mainAttachmentLimit.subscribe(function(e){i.saveAdminConfig(t,{AttachmentLimit:a.pInt(e)})}),e.language.subscribe(function(e){i.saveAdminConfig(s,{Language:a.trim(e)})}),e.theme.subscribe(function(e){i.saveAdminConfig(n,{Theme:a.trim(e)})}),e.capaAdditionalAccounts.subscribe(function(e){i.saveAdminConfig(null,{CapaAdditionalAccounts:e?"1":"0"})}),e.capaAdditionalIdentities.subscribe(function(e){i.saveAdminConfig(null,{CapaAdditionalIdentities:e?"1":"0"})}),e.capaGravatar.subscribe(function(e){i.saveAdminConfig(null,{CapaGravatar:e?"1":"0"})}),e.capaThemes.subscribe(function(e){i.saveAdminConfig(null,{CapaThemes:e?"1":"0"})}),e.allowLanguagesOnSettings.subscribe(function(e){i.saveAdminConfig(null,{AllowLanguagesOnSettings:e?"1":"0"})})},50)},i.prototype.selectLanguage=function(){t("App:Knoin").showScreenPopup(t("View:Popup:Languages"))},i.prototype.phpInfoLink=function(){return r.phpInfo()},e.exports=i}(t,e)},{"App:Knoin":28,Enums:6,LinkBuilder:9,"Storage:Admin:Data":52,"Storage:Admin:Remote":53,"Storage:Settings":59,Utils:11,"View:Popup:Languages":66,_:26,ko:23}],44:[function(e,t){!function(e,t){"use strict";function i(){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=s.observable(""),this.subscriptionEnabled=s.observable(!!o.settingsGet("SubscriptionEnabled")),this.licenseTrigger.subscribe(function(){this.subscriptionEnabled()&&t("App:Admin").reloadLicensing(!0)},this)}var s=t("ko"),n=t("moment"),o=t("Storage:Settings"),a=t("Storage:Admin:Data");i.prototype.onBuild=function(){this.subscriptionEnabled()&&t("App:Admin").reloadLicensing(!1)},i.prototype.onShow=function(){this.adminDomain(o.settingsGet("AdminDomain"))},i.prototype.showActivationForm=function(){t("App:Knoin").showScreenPopup(t("View:Popup:Activate"))},i.prototype.licenseExpiredMomentValue=function(){var e=this.licenseExpired(),t=n.unix(e);return e&&1898625600===e?"Never":t.format("LL")+" ("+t.from(n())+")"},e.exports=i}(t,e)},{"App:Admin":3,"App:Knoin":28,"Storage:Admin:Data":52,"Storage:Settings":59,"View:Popup:Activate":63,ko:23,moment:24}],45:[function(e,t){!function(e,t){"use strict";function i(){this.determineUserLanguage=l.determineUserLanguage,this.determineUserDomain=l.determineUserDomain,this.defaultDomain=n.observable(r.settingsGet("LoginDefaultDomain")),this.allowLanguagesOnLogin=l.allowLanguagesOnLogin,this.defaultDomainTrigger=n.observable(o.SaveSettingsStep.Idle)}var s=t("_"),n=t("ko"),o=t("Enums"),a=t("Utils"),r=t("Storage:Settings"),l=t("Storage:Admin:Data");i.prototype.onBuild=function(){var e=this,i=t("Storage:Admin:Remote");s.delay(function(){var t=a.settingsSaveHelperSimpleFunction(e.defaultDomainTrigger,e);e.determineUserLanguage.subscribe(function(e){i.saveAdminConfig(null,{DetermineUserLanguage:e?"1":"0"})}),e.determineUserDomain.subscribe(function(e){i.saveAdminConfig(null,{DetermineUserDomain:e?"1":"0"})}),e.allowLanguagesOnLogin.subscribe(function(e){i.saveAdminConfig(null,{AllowLanguagesOnLogin:e?"1":"0"})}),e.defaultDomain.subscribe(function(e){i.saveAdminConfig(t,{LoginDefaultDomain:a.trim(e)})})},50)},e.exports=i}(t,e)},{Enums:6,"Storage:Admin:Data":52,"Storage:Admin:Remote":53,"Storage:Settings":59,Utils:11,_:26,ko:23}],46:[function(e,t){!function(e,t){"use strict";function i(){this.packagesError=n.observable(""),this.packages=r.packages,this.packagesLoading=r.packagesLoading,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=n.computed(function(){return r.packagesLoading()?"visible":"hidden"},this)}var s=t("window"),n=t("ko"),o=t("Enums"),a=t("Utils"),r=t("Storage:Admin:Data"),l=t("Storage:Admin:Remote");i.prototype.onShow=function(){this.packagesError("")},i.prototype.onBuild=function(){t("App:Admin").reloadPackagesList()},i.prototype.requestHelper=function(e,i){var n=this;return function(l,c){o.StorageResultType.Success===l&&c&&c.Result||n.packagesError(c&&c.ErrorCode?a.getNotification(c.ErrorCode):a.getNotification(i?o.Notification.CantInstallPackage:o.Notification.CantDeletePackage)),_.each(r.packages(),function(t){t&&e&&t.loading()&&e.file===t.file&&(e.loading(!1),t.loading(!1))}),o.StorageResultType.Success===l&&c&&c.Result&&c.Result.Reload?s.location.reload():t("App:Admin").reloadPackagesList()}},i.prototype.deletePackage=function(e){e&&(e.loading(!0),l.packageDelete(this.requestHelper(e,!1),e))},i.prototype.installPackage=function(e){e&&(e.loading(!0),l.packageInstall(this.requestHelper(e,!0),e))},e.exports=i}(t,e)},{"App:Admin":3,Enums:6,"Storage:Admin:Data":52,"Storage:Admin:Remote":53,Utils:11,ko:23,window:27}],47:[function(e,t){!function(e,t){"use strict";function i(){this.enabledPlugins=n.observable(!!r.settingsGet("EnabledPlugins")),this.pluginsError=n.observable(""),this.plugins=l.plugins,this.pluginsLoading=l.pluginsLoading,this.visibility=n.computed(function(){return l.pluginsLoading()?"visible":"hidden"},this),this.onPluginLoadRequest=s.bind(this.onPluginLoadRequest,this),this.onPluginDisableRequest=s.bind(this.onPluginDisableRequest,this)}var s=t("_"),n=t("ko"),o=t("Enums"),a=t("Utils"),r=t("Storage:Settings"),l=t("Storage:Admin:Data"),c=t("Storage:Admin:Remote");i.prototype.disablePlugin=function(e){e.disabled(!e.disabled()),c.pluginDisable(this.onPluginDisableRequest,e.name,e.disabled())},i.prototype.configurePlugin=function(e){c.plugin(this.onPluginLoadRequest,e.name)},i.prototype.onBuild=function(e){var t=this;e.on("click",".e-item .configure-plugin-action",function(){var e=n.dataFor(this);e&&t.configurePlugin(e)}).on("click",".e-item .disabled-plugin",function(){var e=n.dataFor(this);e&&t.disablePlugin(e)}),this.enabledPlugins.subscribe(function(e){c.saveAdminConfig(a.emptyFunction,{EnabledPlugins:e?"1":"0"})})},i.prototype.onShow=function(){this.pluginsError(""),t("App:Admin").reloadPluginList()},i.prototype.onPluginLoadRequest=function(e,i){o.StorageResultType.Success===e&&i&&i.Result&&t("App:Knoin").showScreenPopup(t("View:Popup:Plugin"),[i.Result])},i.prototype.onPluginDisableRequest=function(e,i){o.StorageResultType.Success===e&&i&&!i.Result&&i.ErrorCode&&this.pluginsError(o.Notification.UnsupportedPluginPackage===i.ErrorCode&&i.ErrorMessage&&""!==i.ErrorMessage?i.ErrorMessage:a.getNotification(i.ErrorCode)),t("App:Admin").reloadPluginList()},e.exports=i}(t,e)},{"App:Admin":3,"App:Knoin":28,Enums:6,"Storage:Admin:Data":52,"Storage:Admin:Remote":53,"Storage:Settings":59,Utils:11,"View:Popup:Plugin":67,_:26,ko:23}],48:[function(e,t){!function(e,t){"use strict";function i(){this.useLocalProxyForExternalImages=c.useLocalProxyForExternalImages,this.capaOpenPGP=n.observable(l.capa(o.Capa.OpenPGP)),this.capaTwoFactorAuth=n.observable(l.capa(o.Capa.TwoFactor)),this.adminLogin=n.observable(l.settingsGet("AdminLogin")),this.adminPassword=n.observable(""),this.adminPasswordNew=n.observable(""),this.adminPasswordNew2=n.observable(""),this.adminPasswordNewError=n.observable(!1),this.adminPasswordUpdateError=n.observable(!1),this.adminPasswordUpdateSuccess=n.observable(!1),this.adminPassword.subscribe(function(){this.adminPasswordUpdateError(!1),this.adminPasswordUpdateSuccess(!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 this.adminPasswordNew()!==this.adminPasswordNew2()?(this.adminPasswordNewError(!0),!1):(this.adminPasswordUpdateError(!1),this.adminPasswordUpdateSuccess(!1),void u.saveNewAdminPassword(this.onNewAdminPasswordResponse,{Password:this.adminPassword(),NewPassword:this.adminPasswordNew()}))},function(){return""!==this.adminPassword()&&""!==this.adminPasswordNew()&&""!==this.adminPasswordNew2()}),this.onNewAdminPasswordResponse=s.bind(this.onNewAdminPasswordResponse,this)}var s=t("_"),n=t("ko"),o=t("Enums"),a=t("Utils"),r=t("LinkBuilder"),l=t("Storage:Settings"),c=t("Storage:Admin:Data"),u=t("Storage:Admin:Remote");i.prototype.onNewAdminPasswordResponse=function(e,t){o.StorageResultType.Success===e&&t&&t.Result?(this.adminPassword(""),this.adminPasswordNew(""),this.adminPasswordNew2(""),this.adminPasswordUpdateSuccess(!0)):this.adminPasswordUpdateError(!0)},i.prototype.onBuild=function(){var e=t("Storage:Admin:Remote");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"})})},i.prototype.onHide=function(){this.adminPassword(""),this.adminPasswordNew(""),this.adminPasswordNew2("")},i.prototype.phpInfoLink=function(){return r.phpInfo()},e.exports=i}(t,e)},{Enums:6,LinkBuilder:9,"Storage:Admin:Data":52,"Storage:Admin:Remote":53,"Storage:Settings":59,Utils:11,_:26,ko:23}],49:[function(e,t){!function(e,t){"use strict";function i(){var e=t("Storage:Admin:Data");this.googleEnable=e.googleEnable,this.googleClientID=e.googleClientID,this.googleApiKey=e.googleApiKey,this.googleClientSecret=e.googleClientSecret,this.googleTrigger1=n.observable(o.SaveSettingsStep.Idle),this.googleTrigger2=n.observable(o.SaveSettingsStep.Idle),this.googleTrigger3=n.observable(o.SaveSettingsStep.Idle),this.facebookSupported=e.facebookSupported,this.facebookEnable=e.facebookEnable,this.facebookAppID=e.facebookAppID,this.facebookAppSecret=e.facebookAppSecret,this.facebookTrigger1=n.observable(o.SaveSettingsStep.Idle),this.facebookTrigger2=n.observable(o.SaveSettingsStep.Idle),this.twitterEnable=e.twitterEnable,this.twitterConsumerKey=e.twitterConsumerKey,this.twitterConsumerSecret=e.twitterConsumerSecret,this.twitterTrigger1=n.observable(o.SaveSettingsStep.Idle),this.twitterTrigger2=n.observable(o.SaveSettingsStep.Idle),this.dropboxEnable=e.dropboxEnable,this.dropboxApiKey=e.dropboxApiKey,this.dropboxTrigger1=n.observable(o.SaveSettingsStep.Idle)}var s=t("_"),n=t("ko"),o=t("Enums"),a=t("Utils");i.prototype.onBuild=function(){var e=this,i=t("Storage:Admin:Remote");s.delay(function(){var t=a.settingsSaveHelperSimpleFunction(e.facebookTrigger1,e),s=a.settingsSaveHelperSimpleFunction(e.facebookTrigger2,e),n=a.settingsSaveHelperSimpleFunction(e.twitterTrigger1,e),o=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(t){e.facebookSupported()&&i.saveAdminConfig(a.emptyFunction,{FacebookEnable:t?"1":"0"})}),e.facebookAppID.subscribe(function(s){e.facebookSupported()&&i.saveAdminConfig(t,{FacebookAppID:a.trim(s)})}),e.facebookAppSecret.subscribe(function(t){e.facebookSupported()&&i.saveAdminConfig(s,{FacebookAppSecret:a.trim(t)})}),e.twitterEnable.subscribe(function(e){i.saveAdminConfig(a.emptyFunction,{TwitterEnable:e?"1":"0"})}),e.twitterConsumerKey.subscribe(function(e){i.saveAdminConfig(n,{TwitterConsumerKey:a.trim(e)})}),e.twitterConsumerSecret.subscribe(function(e){i.saveAdminConfig(o,{TwitterConsumerSecret:a.trim(e)})}),e.googleEnable.subscribe(function(e){i.saveAdminConfig(a.emptyFunction,{GoogleEnable:e?"1":"0"})}),e.googleClientID.subscribe(function(e){i.saveAdminConfig(r,{GoogleClientID:a.trim(e)})}),e.googleClientSecret.subscribe(function(e){i.saveAdminConfig(l,{GoogleClientSecret:a.trim(e)})}),e.googleApiKey.subscribe(function(e){i.saveAdminConfig(c,{GoogleApiKey:a.trim(e)})}),e.dropboxEnable.subscribe(function(e){i.saveAdminConfig(a.emptyFunction,{DropboxEnable:e?"1":"0"})}),e.dropboxApiKey.subscribe(function(e){i.saveAdminConfig(u,{DropboxApiKey:a.trim(e)})})},50)},e.exports=i}(t,e)},{Enums:6,"Storage:Admin:Data":52,"Storage:Admin:Remote":53,Utils:11,_:26,ko:23}],50:[function(e,t){!function(e,t){"use strict";function i(){n.initDataConstructorBySettings(this)}var s=t("Enums"),n=t("Utils"),o=t("Storage:Settings");i.prototype.populateDataOnStart=function(){var e=n.pInt(o.settingsGet("Layout")),t=o.settingsGet("Languages"),i=o.settingsGet("Themes");n.isArray(t)&&this.languages(t),n.isArray(i)&&this.themes(i),this.mainLanguage(o.settingsGet("Language")),this.mainTheme(o.settingsGet("Theme")),this.capaAdditionalAccounts(o.capa(s.Capa.AdditionalAccounts)),this.capaAdditionalIdentities(o.capa(s.Capa.AdditionalIdentities)),this.capaGravatar(o.capa(s.Capa.Gravatar)),this.determineUserLanguage(!!o.settingsGet("DetermineUserLanguage")),this.determineUserDomain(!!o.settingsGet("DetermineUserDomain")),this.capaThemes(o.capa(s.Capa.Themes)),this.allowLanguagesOnLogin(!!o.settingsGet("AllowLanguagesOnLogin")),this.allowLanguagesOnSettings(!!o.settingsGet("AllowLanguagesOnSettings")),this.useLocalProxyForExternalImages(!!o.settingsGet("UseLocalProxyForExternalImages")),this.editorDefaultType(o.settingsGet("EditorDefaultType")),this.showImages(!!o.settingsGet("ShowImages")),this.contactsAutosave(!!o.settingsGet("ContactsAutosave")),this.interfaceAnimation(o.settingsGet("InterfaceAnimation")),this.mainMessagesPerPage(o.settingsGet("MPP")),this.desktopNotifications(!!o.settingsGet("DesktopNotifications")),this.useThreads(!!o.settingsGet("UseThreads")),this.replySameFolder(!!o.settingsGet("ReplySameFolder")),this.useCheckboxesInList(!!o.settingsGet("UseCheckboxesInList")),this.layout(s.Layout.SidePreview),-1<n.inArray(e,[s.Layout.NoPreview,s.Layout.SidePreview,s.Layout.BottomPreview])&&this.layout(e),this.facebookSupported(!!o.settingsGet("SupportedFacebookSocial")),this.facebookEnable(!!o.settingsGet("AllowFacebookSocial")),this.facebookAppID(o.settingsGet("FacebookAppID")),this.facebookAppSecret(o.settingsGet("FacebookAppSecret")),this.twitterEnable(!!o.settingsGet("AllowTwitterSocial")),this.twitterConsumerKey(o.settingsGet("TwitterConsumerKey")),this.twitterConsumerSecret(o.settingsGet("TwitterConsumerSecret")),this.googleEnable(!!o.settingsGet("AllowGoogleSocial")),this.googleClientID(o.settingsGet("GoogleClientID")),this.googleClientSecret(o.settingsGet("GoogleClientSecret")),this.googleApiKey(o.settingsGet("GoogleApiKey")),this.dropboxEnable(!!o.settingsGet("AllowDropboxSocial")),this.dropboxApiKey(o.settingsGet("DropboxApiKey")),this.contactsIsAllowed(!!o.settingsGet("ContactsIsAllowed"))},e.exports=i}(t,e)},{Enums:6,"Storage:Settings":59,Utils:11}],51:[function(e,t){!function(e,t){"use strict";function i(){this.oRequests={}}var s=t("window"),n=t("$"),o=t("_"),a=t("Consts"),r=t("Enums"),l=t("Globals"),c=t("Utils"),u=t("Plugins"),d=t("LinkBuilder"),p=t("Storage:Settings");i.prototype.oRequests={},i.prototype.defaultResponse=function(e,t,i,n,d,p){var h=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.Logout||a.Values.AjaxErrorLimit<l.iAjaxErrorCount)&&(s.__rlah_clear&&s.__rlah_clear(),l.__APP&&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,d,p]),e(i,r.StorageResultType.Success===i?n:null,d,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(h,300):h()},i.prototype.ajaxRequest=function(e,t,i,a,r){var l=this,u=""===a,h={},g=(new s.Date).getTime(),m=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=p.settingsGet("Token")),m=n.ajax({type:u?"POST":"GET",url:d.ajax(a),async:!0,dataType:"json",data:u?t:{},headers:h,timeout:i,global:!0}),m.always(function(i,n){var o=!1;i&&i.Time&&(o=c.pInt(i.Time)>(new s.Date).getTime()-g),f&&l.oRequests[f]&&(l.oRequests[f].__aborted&&(n="abort"),l.oRequests[f]=null),l.defaultResponse(e,f,n,i,o,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]=m),m},i.prototype.defaultRequest=function(e,t,i,s,n,o){i=i||{},i.Action=t,n=c.pString(n),u.runHook("ajax-default-request",[t,i,n]),this.ajaxRequest(e,i,c.isUnd(s)?a.Defaults.DefaultAjaxTimeout:c.pInt(s),n,o)},i.prototype.noop=function(e){this.defaultRequest(e,"Noop")},i.prototype.jsError=function(e,t,i,s,n,o,a){this.defaultRequest(e,"JsError",{Message:t,FileName:i,LineNo:s,Location:n,HtmlCapa:o,TimeOnPage:a})},i.prototype.jsInfo=function(e,t,i,s){this.defaultRequest(e,"JsInfo",{Type:t,Data:i,IsError:(c.isUnd(s)?1:!s)?"0":"1"})},i.prototype.getPublicKey=function(e){this.defaultRequest(e,"GetPublicKey")
|
||
},i.prototype.jsVersion=function(e,t){this.defaultRequest(e,"Version",{Version:t})},e.exports=i}(t,e)},{$:21,Consts:5,Enums:6,Globals:8,LinkBuilder:9,Plugins:10,"Storage:Settings":59,Utils:11,_:26,window:27}],52:[function(e,t){!function(e,t){"use strict";function i(){o.call(this),this.domainsLoading=n.observable(!1).extend({throttle:100}),this.domains=n.observableArray([]),this.pluginsLoading=n.observable(!1).extend({throttle:100}),this.plugins=n.observableArray([]),this.packagesReal=n.observable(!0),this.packagesMainUpdatable=n.observable(!0),this.packagesLoading=n.observable(!1).extend({throttle:100}),this.packages=n.observableArray([]),this.coreReal=n.observable(!0),this.coreUpdatable=n.observable(!0),this.coreAccess=n.observable(!0),this.coreChecking=n.observable(!1).extend({throttle:100}),this.coreUpdating=n.observable(!1).extend({throttle:100}),this.coreRemoteVersion=n.observable(""),this.coreRemoteRelease=n.observable(""),this.coreVersionCompare=n.observable(-2),this.licensing=n.observable(!1),this.licensingProcess=n.observable(!1),this.licenseValid=n.observable(!1),this.licenseExpired=n.observable(0),this.licenseError=n.observable(""),this.licenseTrigger=n.observable(!1),this.adminManLoading=n.computed(function(){return"000"!==[this.domainsLoading()?"1":"0",this.pluginsLoading()?"1":"0",this.packagesLoading()?"1":"0"].join("")},this),this.adminManLoadingVisibility=n.computed(function(){return this.adminManLoading()?"visible":"hidden"},this).extend({rateLimit:300})}var s=t("_"),n=t("ko"),o=t("Storage:Abstract:Data");s.extend(i.prototype,o.prototype),i.prototype.populateDataOnStart=function(){o.prototype.populateDataOnStart.call(this)},e.exports=new i}(t,e)},{"Storage:Abstract:Data":50,_:26,ko:23}],53:[function(e,t){!function(e,t){"use strict";function i(){n.call(this),this.oRequests={}}var s=t("_"),n=t("Storage:Abstract:Remote");s.extend(i.prototype,n.prototype),i.prototype.adminLogin=function(e,t,i){this.defaultRequest(e,"AdminLogin",{Login:t,Password:i})},i.prototype.adminLogout=function(e){this.defaultRequest(e,"AdminLogout")},i.prototype.saveAdminConfig=function(e,t){this.defaultRequest(e,"AdminSettingsUpdate",t)},i.prototype.domainList=function(e){this.defaultRequest(e,"AdminDomainList")},i.prototype.pluginList=function(e){this.defaultRequest(e,"AdminPluginList")},i.prototype.packagesList=function(e){this.defaultRequest(e,"AdminPackagesList")},i.prototype.coreData=function(e){this.defaultRequest(e,"AdminCoreData")},i.prototype.updateCoreData=function(e){this.defaultRequest(e,"AdminUpdateCoreData",{},9e4)},i.prototype.packageInstall=function(e,t){this.defaultRequest(e,"AdminPackageInstall",{Id:t.id,Type:t.type,File:t.file},6e4)},i.prototype.packageDelete=function(e,t){this.defaultRequest(e,"AdminPackageDelete",{Id:t.id})},i.prototype.domain=function(e,t){this.defaultRequest(e,"AdminDomainLoad",{Name:t})},i.prototype.plugin=function(e,t){this.defaultRequest(e,"AdminPluginLoad",{Name:t})},i.prototype.domainDelete=function(e,t){this.defaultRequest(e,"AdminDomainDelete",{Name:t})},i.prototype.domainDisable=function(e,t,i){return this.defaultRequest(e,"AdminDomainDisable",{Name:t,Disabled:i?"1":"0"})},i.prototype.pluginSettingsUpdate=function(e,t){return this.defaultRequest(e,"AdminPluginSettingsUpdate",t)},i.prototype.licensing=function(e,t){return this.defaultRequest(e,"AdminLicensing",{Force:t?"1":"0"})},i.prototype.licensingActivate=function(e,t,i){return this.defaultRequest(e,"AdminLicensingActivate",{Domain:t,Key:i})},i.prototype.pluginDisable=function(e,t,i){return this.defaultRequest(e,"AdminPluginDisable",{Name:t,Disabled:i?"1":"0"})},i.prototype.createOrUpdateDomain=function(e,t,i,s,n,o,a,r,l,c,u,d,p){this.defaultRequest(e,"AdminDomainSave",{Create:t?"1":"0",Name:i,IncHost:s,IncPort:n,IncSecure:o,IncShortLogin:a?"1":"0",OutHost:r,OutPort:l,OutSecure:c,OutShortLogin:u?"1":"0",OutAuth:d?"1":"0",WhiteList:p})},i.prototype.testConnectionForDomain=function(e,t,i,s,n,o,a,r,l){this.defaultRequest(e,"AdminDomainTest",{Name:t,IncHost:i,IncPort:s,IncSecure:n,OutHost:o,OutPort:a,OutSecure:r,OutAuth:l?"1":"0"})},i.prototype.testContacts=function(e,t){this.defaultRequest(e,"AdminContactsTest",t)},i.prototype.saveNewAdminPassword=function(e,t){this.defaultRequest(e,"AdminPasswordUpdate",t)},i.prototype.adminPing=function(e){this.defaultRequest(e,"AdminPing")},e.exports=new i}(t,e)},{"Storage:Abstract:Remote":51,_:26}],54:[function(e,t){!function(e,t){"use strict";function i(){this.oFoldersCache={},this.oFoldersNamesCache={},this.oFolderHashCache={},this.oFolderUidNextCache={},this.oMessageListHashCache={},this.oMessageFlagsCache={},this.oNewMessage={},this.oRequestedMessage={},this.bCapaGravatar=r.capa(n.Capa.Gravatar)}var s=t("_"),n=t("Enums"),o=t("Utils"),a=t("LinkBuilder"),r=t("Storage:Settings");i.prototype.bCapaGravatar=!1,i.prototype.oFoldersCache={},i.prototype.oFoldersNamesCache={},i.prototype.oFolderHashCache={},i.prototype.oFolderUidNextCache={},i.prototype.oMessageListHashCache={},i.prototype.oMessageFlagsCache={},i.prototype.oBodies={},i.prototype.oNewMessage={},i.prototype.oRequestedMessage={},i.prototype.clear=function(){this.oFoldersCache={},this.oFoldersNamesCache={},this.oFolderHashCache={},this.oFolderUidNextCache={},this.oMessageListHashCache={},this.oMessageFlagsCache={},this.oBodies={}},i.prototype.getUserPic=function(e,t){e=o.trim(e),t(this.bCapaGravatar&&""!==e?a.avatarLink(e):"",e)},i.prototype.getMessageKey=function(e,t){return e+"#"+t},i.prototype.addRequestedMessage=function(e,t){this.oRequestedMessage[this.getMessageKey(e,t)]=!0},i.prototype.hasRequestedMessage=function(e,t){return!0===this.oRequestedMessage[this.getMessageKey(e,t)]},i.prototype.addNewMessageCache=function(e,t){this.oNewMessage[this.getMessageKey(e,t)]=!0},i.prototype.hasNewMessageAndRemoveFromCache=function(e,t){return this.oNewMessage[this.getMessageKey(e,t)]?(this.oNewMessage[this.getMessageKey(e,t)]=null,!0):!1},i.prototype.clearNewMessageCache=function(){this.oNewMessage={}},i.prototype.getFolderFullNameRaw=function(e){return""!==e&&this.oFoldersNamesCache[e]?this.oFoldersNamesCache[e]:""},i.prototype.setFolderFullNameRaw=function(e,t){this.oFoldersNamesCache[e]=t},i.prototype.getFolderHash=function(e){return""!==e&&this.oFolderHashCache[e]?this.oFolderHashCache[e]:""},i.prototype.setFolderHash=function(e,t){this.oFolderHashCache[e]=t},i.prototype.getFolderUidNext=function(e){return""!==e&&this.oFolderUidNextCache[e]?this.oFolderUidNextCache[e]:""},i.prototype.setFolderUidNext=function(e,t){this.oFolderUidNextCache[e]=t},i.prototype.getFolderFromCacheList=function(e){return""!==e&&this.oFoldersCache[e]?this.oFoldersCache[e]:null},i.prototype.setFolderToCacheList=function(e,t){this.oFoldersCache[e]=t},i.prototype.removeFolderFromCacheList=function(e){this.setFolderToCacheList(e,null)},i.prototype.getMessageFlagsFromCache=function(e,t){return this.oMessageFlagsCache[e]&&this.oMessageFlagsCache[e][t]?this.oMessageFlagsCache[e][t]:null},i.prototype.setMessageFlagsToCache=function(e,t,i){this.oMessageFlagsCache[e]||(this.oMessageFlagsCache[e]={}),this.oMessageFlagsCache[e][t]=i},i.prototype.clearMessageFlagsFromCacheByFolder=function(e){this.oMessageFlagsCache[e]={}},i.prototype.initMessageFlagsFromCache=function(e){if(e){var t=this,i=this.getMessageFlagsFromCache(e.folderFullNameRaw,e.uid),n=null,a=null;i&&0<i.length&&(e.unseen(!!i[0]),e.flagged(!!i[1]),e.answered(!!i[2]),e.forwarded(!!i[3]),e.isReadReceipt(!!i[4])),0<e.threads().length&&(n=s.find(e.threads(),function(i){var s=t.getMessageFlagsFromCache(e.folderFullNameRaw,i);return s&&0<s.length&&!!s[0]}),a=s.find(e.threads(),function(i){var s=t.getMessageFlagsFromCache(e.folderFullNameRaw,i);return s&&0<s.length&&!!s[1]}),e.hasUnseenSubMessage(n&&0<o.pInt(n)),e.hasFlaggedSubMessage(a&&0<o.pInt(a)))}},i.prototype.storeMessageFlagsToCache=function(e){e&&this.setMessageFlagsToCache(e.folderFullNameRaw,e.uid,[e.unseen(),e.flagged(),e.answered(),e.forwarded(),e.isReadReceipt()])},i.prototype.storeMessageFlagsToCacheByFolderAndUid=function(e,t,i){o.isArray(i)&&0<i.length&&this.setMessageFlagsToCache(e,t,i)},e.exports=new i}(t,e)},{Enums:6,LinkBuilder:9,"Storage:Settings":59,Utils:11,_:26}],55:[function(e,t){!function(e,t){"use strict";function i(){y.call(this);var e=function(e){return function(){var t=f.getFolderFromCacheList(e());t&&t.type(d.FolderType.User)}},t=function(e){return function(t){var i=f.getFolderFromCacheList(t);i&&i.type(e)}};this.devEmail="",this.devPassword="",this.accountEmail=a.observable(""),this.accountIncLogin=a.observable(""),this.accountOutLogin=a.observable(""),this.projectHash=a.observable(""),this.threading=a.observable(!1),this.lastFoldersHash="",this.remoteSuggestions=!1,this.sentFolder=a.observable(""),this.draftFolder=a.observable(""),this.spamFolder=a.observable(""),this.trashFolder=a.observable(""),this.archiveFolder=a.observable(""),this.sentFolder.subscribe(e(this.sentFolder),this,"beforeChange"),this.draftFolder.subscribe(e(this.draftFolder),this,"beforeChange"),this.spamFolder.subscribe(e(this.spamFolder),this,"beforeChange"),this.trashFolder.subscribe(e(this.trashFolder),this,"beforeChange"),this.archiveFolder.subscribe(e(this.archiveFolder),this,"beforeChange"),this.sentFolder.subscribe(t(d.FolderType.SentItems),this),this.draftFolder.subscribe(t(d.FolderType.Draft),this),this.spamFolder.subscribe(t(d.FolderType.Spam),this),this.trashFolder.subscribe(t(d.FolderType.Trash),this),this.archiveFolder.subscribe(t(d.FolderType.Archive),this),this.draftFolderNotEnabled=a.computed(function(){return""===this.draftFolder()||u.Values.UnuseOptionValue===this.draftFolder()},this),this.displayName=a.observable(""),this.signature=a.observable(""),this.signatureToAll=a.observable(!1),this.replyTo=a.observable(""),this.enableTwoFactor=a.observable(!1),this.accounts=a.observableArray([]),this.accountsLoading=a.observable(!1).extend({throttle:100}),this.defaultIdentityID=a.observable(""),this.identities=a.observableArray([]),this.identitiesLoading=a.observable(!1).extend({throttle:100}),this.contactTags=a.observableArray([]),this.contacts=a.observableArray([]),this.contacts.loading=a.observable(!1).extend({throttle:200}),this.contacts.importing=a.observable(!1).extend({throttle:200}),this.contacts.syncing=a.observable(!1).extend({throttle:200}),this.contacts.exportingVcf=a.observable(!1).extend({throttle:200}),this.contacts.exportingCsv=a.observable(!1).extend({throttle:200}),this.allowContactsSync=a.observable(!1),this.enableContactsSync=a.observable(!1),this.contactsSyncUrl=a.observable(""),this.contactsSyncUser=a.observable(""),this.contactsSyncPass=a.observable(""),this.allowContactsSync=a.observable(!!m.settingsGet("ContactsSyncIsAllowed")),this.enableContactsSync=a.observable(!!m.settingsGet("EnableContactsSync")),this.contactsSyncUrl=a.observable(m.settingsGet("ContactsSyncUrl")),this.contactsSyncUser=a.observable(m.settingsGet("ContactsSyncUser")),this.contactsSyncPass=a.observable(m.settingsGet("ContactsSyncPassword")),this.namespace="",this.folderList=a.observableArray([]),this.folderList.focused=a.observable(!1),this.foldersListError=a.observable(""),this.foldersLoading=a.observable(!1),this.foldersCreating=a.observable(!1),this.foldersDeleting=a.observable(!1),this.foldersRenaming=a.observable(!1),this.foldersChanging=a.computed(function(){var e=this.foldersLoading(),t=this.foldersCreating(),i=this.foldersDeleting(),s=this.foldersRenaming();return e||t||i||s},this),this.foldersInboxUnreadCount=a.observable(0),this.currentFolder=a.observable(null).extend({toggleSubscribe:[null,function(e){e&&e.selected(!1)},function(e){e&&e.selected(!0)}]}),this.currentFolderFullNameRaw=a.computed(function(){return this.currentFolder()?this.currentFolder().fullNameRaw:""},this),this.currentFolderFullName=a.computed(function(){return this.currentFolder()?this.currentFolder().fullName:""},this),this.currentFolderFullNameHash=a.computed(function(){return this.currentFolder()?this.currentFolder().fullNameHash:""},this),this.currentFolderName=a.computed(function(){return this.currentFolder()?this.currentFolder().name():""},this),this.folderListSystemNames=a.computed(function(){var e=["INBOX"],t=this.folderList(),i=this.sentFolder(),s=this.draftFolder(),n=this.spamFolder(),o=this.trashFolder(),a=this.archiveFolder();return h.isArray(t)&&0<t.length&&(""!==i&&u.Values.UnuseOptionValue!==i&&e.push(i),""!==s&&u.Values.UnuseOptionValue!==s&&e.push(s),""!==n&&u.Values.UnuseOptionValue!==n&&e.push(n),""!==o&&u.Values.UnuseOptionValue!==o&&e.push(o),""!==a&&u.Values.UnuseOptionValue!==a&&e.push(a)),e},this),this.folderListSystem=a.computed(function(){return o.compact(o.map(this.folderListSystemNames(),function(e){return f.getFolderFromCacheList(e)}))},this),this.folderMenuForMove=a.computed(function(){return h.folderListOptionsBuilder(this.folderListSystem(),this.folderList(),[this.currentFolderFullNameRaw()],null,null,null,null,function(e){return e?e.localName():""})},this),this.staticMessageList=[],this.messageList=a.observableArray([]).extend({rateLimit:0}),this.messageListCount=a.observable(0),this.messageListSearch=a.observable(""),this.messageListPage=a.observable(1),this.messageListThreadFolder=a.observable(""),this.messageListThreadUids=a.observableArray([]),this.messageListThreadFolder.subscribe(function(){this.messageListThreadUids([])},this),this.messageListEndFolder=a.observable(""),this.messageListEndSearch=a.observable(""),this.messageListEndPage=a.observable(1),this.messageListEndHash=a.computed(function(){return this.messageListEndFolder()+"|"+this.messageListEndSearch()+"|"+this.messageListEndPage()},this),this.messageListPageCount=a.computed(function(){var e=s.Math.ceil(this.messageListCount()/this.messagesPerPage());return 0>=e?1:e},this),this.mainMessageListSearch=a.computed({read:this.messageListSearch,write:function(e){b.setHash(g.mailBox(this.currentFolderFullNameHash(),1,h.trim(e.toString())))},owner:this}),this.messageListError=a.observable(""),this.messageListLoading=a.observable(!1),this.messageListIsNotCompleted=a.observable(!1),this.messageListCompleteLoadingThrottle=a.observable(!1).extend({throttle:200}),this.messageListCompleteLoading=a.computed(function(){var e=this.messageListLoading(),t=this.messageListIsNotCompleted();return e||t},this),this.messageListCompleteLoading.subscribe(function(e){this.messageListCompleteLoadingThrottle(e)},this),this.messageList.subscribe(o.debounce(function(e){o.each(e,function(e){e.newForAnimation()&&e.newForAnimation(!1)})},500)),this.staticMessageList=new S,this.message=a.observable(null),this.messageLoading=a.observable(!1),this.messageLoadingThrottle=a.observable(!1).extend({throttle:50}),this.message.focused=a.observable(!1),this.message.subscribe(function(e){e?d.Layout.NoPreview===this.layout()&&this.message.focused(!0):(this.message.focused(!1),this.messageFullScreenMode(!1),this.hideMessageBodies(),d.Layout.NoPreview===this.layout()&&-1<s.location.hash.indexOf("message-preview")&&p.__APP&&p.__APP.historyBack())},this),this.message.focused.subscribe(function(e){e?(this.folderList.focused(!1),p.keyScope(d.KeyState.MessageView)):d.KeyState.MessageView===p.keyScope()&&p.keyScope(d.Layout.NoPreview===this.layout()&&this.message()?d.KeyState.MessageView:d.KeyState.MessageList)},this),this.folderList.focused.subscribe(function(e){e?p.keyScope(d.KeyState.FolderList):d.KeyState.FolderList===p.keyScope()&&p.keyScope(d.KeyState.MessageList)}),this.messageLoading.subscribe(function(e){this.messageLoadingThrottle(e)},this),this.messageFullScreenMode=a.observable(!1),this.messageError=a.observable(""),this.messagesBodiesDom=a.observable(null),this.messagesBodiesDom.subscribe(function(e){!e||e instanceof n||this.messagesBodiesDom(n(e))},this),this.messageActiveDom=a.observable(null),this.isMessageSelected=a.computed(function(){return null!==this.message()},this),this.currentMessage=a.observable(null),this.messageListChecked=a.computed(function(){return o.filter(this.messageList(),function(e){return e.checked()})},this).extend({rateLimit:0}),this.hasCheckedMessages=a.computed(function(){return 0<this.messageListChecked().length},this).extend({rateLimit:0}),this.messageListCheckedOrSelected=a.computed(function(){var e=this.messageListChecked(),t=this.currentMessage();return o.union(e,t?[t]:[])},this),this.messageListCheckedOrSelectedUidsWithSubMails=a.computed(function(){var e=[];return o.each(this.messageListCheckedOrSelected(),function(t){t&&(e.push(t.uid),0<t.threadsLen()&&0===t.parentUid()&&t.lastInCollapsedThread()&&(e=o.union(e,t.threads())))}),e},this),this.userQuota=a.observable(0),this.userUsageSize=a.observable(0),this.userUsageProc=a.computed(function(){var e=this.userQuota(),t=this.userUsageSize();return e>0?s.Math.ceil(t/e*100):0},this),this.capaOpenPGP=a.observable(!1),this.openpgpkeys=a.observableArray([]),this.openpgpKeyring=null,this.openpgpkeysPublic=this.openpgpkeys.filter(function(e){return!(!e||e.isPrivate)}),this.openpgpkeysPrivate=this.openpgpkeys.filter(function(e){return!(!e||!e.isPrivate)}),this.googleActions=a.observable(!1),this.googleLoggined=a.observable(!1),this.googleUserName=a.observable(""),this.facebookActions=a.observable(!1),this.facebookLoggined=a.observable(!1),this.facebookUserName=a.observable(""),this.twitterActions=a.observable(!1),this.twitterLoggined=a.observable(!1),this.twitterUserName=a.observable(""),this.customThemeType=a.observable(d.CustomThemeType.Light),this.purgeMessageBodyCacheThrottle=o.throttle(this.purgeMessageBodyCache,3e4)}var s=t("window"),n=t("$"),o=t("_"),a=t("ko"),r=t("moment"),l=t("$div"),c=t("NotificationClass"),u=t("Consts"),d=t("Enums"),p=t("Globals"),h=t("Utils"),g=t("LinkBuilder"),m=t("Storage:Settings"),f=t("Storage:RainLoop:Cache"),b=t("App:Knoin"),S=t("Model:Message"),v=t("Storage:LocalStorage"),y=t("Storage:Abstract:Data");o.extend(i.prototype,y.prototype),i.prototype.purgeMessageBodyCache=function(){var e=0,t=null,i=p.iMessageBodyCacheCount-u.Values.MessageBodyCacheLimit;i>0&&(t=this.messagesBodiesDom(),t&&(t.find(".rl-cache-class").each(function(){var t=n(this);i>t.data("rl-cache-count")&&(t.addClass("rl-cache-purge"),e++)}),e>0&&o.delay(function(){t.find(".rl-cache-purge").remove()},300)))},i.prototype.populateDataOnStart=function(){y.prototype.populateDataOnStart.call(this),this.accountEmail(m.settingsGet("Email")),this.accountIncLogin(m.settingsGet("IncLogin")),this.accountOutLogin(m.settingsGet("OutLogin")),this.projectHash(m.settingsGet("ProjectHash")),this.defaultIdentityID(m.settingsGet("DefaultIdentityID")),this.displayName(m.settingsGet("DisplayName")),this.replyTo(m.settingsGet("ReplyTo")),this.signature(m.settingsGet("Signature")),this.signatureToAll(!!m.settingsGet("SignatureToAll")),this.enableTwoFactor(!!m.settingsGet("EnableTwoFactor")),this.lastFoldersHash=v.get(d.ClientSideKeyName.FoldersLashHash)||"",this.remoteSuggestions=!!m.settingsGet("RemoteSuggestions"),this.devEmail=m.settingsGet("DevEmail"),this.devPassword=m.settingsGet("DevPassword")},i.prototype.initUidNextAndNewMessages=function(e,t,i){if("INBOX"===e&&h.isNormal(t)&&""!==t){if(h.isArray(i)&&0<i.length){var n=this,a=0,r=i.length,l=function(e,t,i){var o=null;c&&n.useDesktopNotifications()&&(o=new c(t,{body:i,icon:e}),o&&(o.show&&o.show(),s.setTimeout(function(e){return function(){e.cancel?e.cancel():e.close&&e.close()}}(o),7e3)))};if(o.each(i,function(t){f.addNewMessageCache(e,t.Uid)}),r>3)l(g.notificationMailIcon(),this.accountEmail(),h.i18n("MESSAGE_LIST/NEW_MESSAGE_NOTIFICATION",{COUNT:r}));else for(;r>a;a++)l(g.notificationMailIcon(),S.emailsToLine(S.initEmailsFromJson(i[a].From),!1),i[a].Subject)}f.setFolderUidNext(e,t)}},i.prototype.hideMessageBodies=function(){var e=this.messagesBodiesDom();e&&e.find(".b-text-part").hide()},i.prototype.getNextFolderNames=function(e){e=h.isUnd(e)?!1:!!e;var t=[],i=10,s=r().unix(),n=s-300,a=[],l=function(t){o.each(t,function(t){t&&"INBOX"!==t.fullNameRaw&&t.selectable&&t.existen&&n>t.interval&&(!e||t.subScribed())&&a.push([t.interval,t.fullNameRaw]),t&&0<t.subFolders().length&&l(t.subFolders())})};return l(this.folderList()),a.sort(function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0}),o.find(a,function(e){var n=f.getFolderFromCacheList(e[1]);return n&&(n.interval=s,t.push(e[1])),i<=t.length}),o.uniq(t)},i.prototype.removeMessagesFromList=function(e,t,i,s){i=h.isNormal(i)?i:"",s=h.isUnd(s)?!1:!!s,t=o.map(t,function(e){return h.pInt(e)});var n=this,a=0,r=this.messageList(),l=f.getFolderFromCacheList(e),c=""===i?null:f.getFolderFromCacheList(i||""),u=this.currentFolderFullNameRaw(),d=this.message(),p=u===e?o.filter(r,function(e){return e&&-1<h.inArray(h.pInt(e.uid),t)}):[];o.each(p,function(e){e&&e.unseen()&&a++}),l&&!s&&(l.messageCountAll(0<=l.messageCountAll()-t.length?l.messageCountAll()-t.length:0),a>0&&l.messageCountUnread(0<=l.messageCountUnread()-a?l.messageCountUnread()-a:0)),c&&(c.messageCountAll(c.messageCountAll()+t.length),a>0&&c.messageCountUnread(c.messageCountUnread()+a),c.actionBlink(!0)),0<p.length&&(s?o.each(p,function(e){e.checked(!1)}):(this.messageListIsNotCompleted(!0),o.each(p,function(e){d&&d.hash===e.hash&&(d=null,n.message(null)),e.deleted(!0)}),o.delay(function(){o.each(p,function(e){n.messageList.remove(e)})},400))),""!==e&&f.setFolderHash(e,""),""!==i&&f.setFolderHash(i,"")},i.prototype.setMessage=function(e,t){var i=!1,s=!1,o=!1,a=null,r=null,c="",u="",g=!1,m=!1,b=this.messagesBodiesDom(),S=this.message();e&&S&&e.Result&&"Object/Message"===e.Result["@Object"]&&S.folderFullNameRaw===e.Result.Folder&&S.uid===e.Result.Uid&&(this.messageError(""),S.initUpdateByMessageJson(e.Result),f.addRequestedMessage(S.folderFullNameRaw,S.uid),t||S.initFlagsByJson(e.Result),b=b&&b[0]?b:null,b&&(c="rl-mgs-"+S.hash.replace(/[^a-zA-Z0-9]/g,""),r=b.find("#"+c),r&&r[0]?(S.body=r,S.body&&(S.body.data("rl-cache-count",++p.iMessageBodyCacheCount),S.fetchDataToDom())):(s=!!e.Result.HasExternals,o=!!e.Result.HasInternals,a=n('<div id="'+c+'" />').hide().addClass("rl-cache-class"),a.data("rl-cache-count",++p.iMessageBodyCacheCount),h.isNormal(e.Result.Html)&&""!==e.Result.Html?(i=!0,u=e.Result.Html.toString()):h.isNormal(e.Result.Plain)&&""!==e.Result.Plain?(i=!1,u=h.plainToHtml(e.Result.Plain.toString(),!1),(S.isPgpSigned()||S.isPgpEncrypted())&&this.capaOpenPGP()&&(S.plainRaw=h.pString(e.Result.Plain),m=/---BEGIN PGP MESSAGE---/.test(S.plainRaw),m||(g=/-----BEGIN PGP SIGNED MESSAGE-----/.test(S.plainRaw)&&/-----BEGIN PGP SIGNATURE-----/.test(S.plainRaw)),l.empty(),g&&S.isPgpSigned()?u=l.append(n('<pre class="b-plain-openpgp signed"></pre>').text(S.plainRaw)).html():m&&S.isPgpEncrypted()&&(u=l.append(n('<pre class="b-plain-openpgp encrypted"></pre>').text(S.plainRaw)).html()),l.empty(),S.isPgpSigned(g),S.isPgpEncrypted(m))):i=!1,a.html(h.linkify(u)).addClass("b-text-part "+(i?"html":"plain")),S.isHtml(!!i),S.hasImages(!!s),S.pgpSignedVerifyStatus(d.SignedVerifyStatus.None),S.pgpSignedVerifyUser(""),S.body=a,S.body&&b.append(S.body),S.storeDataToDom(),o&&S.showInternalImages(!0),S.hasImages()&&this.showImages()&&S.showExternalImages(!0),this.purgeMessageBodyCacheThrottle()),this.messageActiveDom(S.body),this.hideMessageBodies(),S.body.show(),a&&h.initBlockquoteSwitcher(a)),f.initMessageFlagsFromCache(S),S.unseen()&&p.__APP&&p.__APP.setMessageSeen(S),h.windowResize())},i.prototype.calculateMessageListHash=function(e){return o.map(e,function(e){return""+e.hash+"_"+e.threadsLen()+"_"+e.flagHash()}).join("|")},i.prototype.findPublicKeyByHex=function(e){return o.find(this.openpgpkeysPublic(),function(t){return t&&e===t.id})},i.prototype.findPublicKeysByEmail=function(e){return o.compact(o.map(this.openpgpkeysPublic(),function(t){var i=null;if(t&&e===t.email)try{if(i=s.openpgp.key.readArmored(t.armor),i&&!i.err&&i.keys&&i.keys[0])return i.keys[0]}catch(n){}return null}))},i.prototype.findPrivateKeyByEmail=function(e,t){var i=null,n=o.find(this.openpgpkeysPrivate(),function(t){return t&&e===t.email});if(n)try{i=s.openpgp.key.readArmored(n.armor),i&&!i.err&&i.keys&&i.keys[0]?(i=i.keys[0],i.decrypt(h.pString(t))):i=null}catch(a){i=null}return i},i.prototype.findSelfPrivateKey=function(e){return this.findPrivateKeyByEmail(this.accountEmail(),e)},e.exports=new i}(t,e)},{$:21,$div:12,"App:Knoin":28,Consts:5,Enums:6,Globals:8,LinkBuilder:9,"Model:Message":35,NotificationClass:18,"Storage:Abstract:Data":50,"Storage:LocalStorage":56,"Storage:RainLoop:Cache":54,"Storage:Settings":59,Utils:11,_:26,ko:23,moment:24,window:27}],56:[function(e,t){!function(e,t){"use strict";function i(){var e=t("_"),i=e.find([t("Storage:LocalStorage:Cookie"),t("Storage:LocalStorage:LocalStorage")],function(e){return e.supported()});this.oDriver=null,i&&(this.oDriver=new i)}i.prototype.oDriver=null,i.prototype.set=function(e,t){return this.oDriver?this.oDriver.set("p"+e,t):!1},i.prototype.get=function(e){return this.oDriver?this.oDriver.get("p"+e):null},e.exports=new i}(t,e)},{"Storage:LocalStorage:Cookie":57,"Storage:LocalStorage:LocalStorage":58,_:26}],57:[function(e,t){!function(e,t){"use strict";function i(){}var s=t("$"),n=t("JSON"),o=t("Consts"),a=t("Utils");i.supported=function(){return!0},i.prototype.set=function(e,t){var i=s.cookie(o.Values.ClientSideCookieIndexName),a=!1,r=null;try{r=null===i?null:n.parse(i),r||(r={}),r[e]=t,s.cookie(o.Values.ClientSideCookieIndexName,n.stringify(r),{expires:30}),a=!0}catch(l){}return a},i.prototype.get=function(e){var t=s.cookie(o.Values.ClientSideCookieIndexName),i=null;try{i=null===t?null:n.parse(t),i=i&&!a.isUnd(i[e])?i[e]:null}catch(r){}return i},e.exports=i}(t,e)},{$:21,Consts:5,JSON:17,Utils:11}],58:[function(e,t){!function(e,t){"use strict";function i(){}var s=t("window"),n=t("JSON"),o=t("Consts"),a=t("Utils");i.supported=function(){return!!s.localStorage},i.prototype.set=function(e,t){var i=s.localStorage[o.Values.ClientSideCookieIndexName]||null,a=!1,r=null;try{r=null===i?null:n.parse(i),r||(r={}),r[e]=t,s.localStorage[o.Values.ClientSideCookieIndexName]=n.stringify(r),a=!0}catch(l){}return a},i.prototype.get=function(e){var t=s.localStorage[o.Values.ClientSideCookieIndexName]||null,i=null;try{i=null===t?null:n.parse(t),i=i&&!a.isUnd(i[e])?i[e]:null}catch(r){}return i},e.exports=i}(t,e)},{Consts:5,JSON:17,Utils:11,window:27}],59:[function(e,t){!function(e,t){"use strict";function i(){this.oSettings=t("AppData"),this.oSettings=s.isNormal(this.oSettings)?this.oSettings:{}}var s=t("Utils");i.prototype.oSettings=null,i.prototype.settingsGet=function(e){return s.isUnd(this.oSettings[e])?null:this.oSettings[e]},i.prototype.settingsSet=function(e,t){this.oSettings[e]=t},i.prototype.capa=function(e){var t=this.settingsGet("Capa");return s.isArray(t)&&s.isNormal(e)&&-1<s.inArray(e,t)},e.exports=new i}(t,e)},{AppData:16,Utils:11}],60:[function(e,t){!function(e,t){"use strict";function i(){c.call(this,"Center","AdminLogin"),this.login=n.observable(""),this.password=n.observable(""),this.loginError=n.observable(!1),this.passwordError=n.observable(!1),this.loginFocus=n.observable(!1),this.login.subscribe(function(){this.loginError(!1)},this),this.password.subscribe(function(){this.passwordError(!1)},this),this.submitRequest=n.observable(!1),this.submitError=n.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),r.adminLogin(s.bind(function(e,i){o.StorageResultType.Success===e&&i&&"AdminLogin"===i.Action?i.Result?t("App:Admin").loginAndLogoutReload():i.ErrorCode&&(this.submitRequest(!1),this.submitError(a.getNotification(i.ErrorCode))):(this.submitRequest(!1),this.submitError(a.getNotification(o.Notification.UnknownError)))},this),this.login(),this.password()),!0)},function(){return!this.submitRequest()}),l.constructorEnd(this)}var s=t("_"),n=t("ko"),o=t("Enums"),a=t("Utils"),r=t("Storage:Admin:Remote"),l=t("App:Knoin"),c=t("Knoin:AbstractViewModel");l.extendAsViewModel("AdminLoginViewModel",i),i.prototype.onShow=function(){l.routeOff(),s.delay(s.bind(function(){this.loginFocus(!0)},this),100)},i.prototype.onHide=function(){this.loginFocus(!1)},i.prototype.onBuild=function(){a.triggerAutocompleteInputChange(!0)},i.prototype.submitForm=function(){this.submitCommand()},e.exports=i}(t,e)},{"App:Admin":3,"App:Knoin":28,Enums:6,"Knoin:AbstractViewModel":31,"Storage:Admin:Remote":53,Utils:11,_:26,ko:23}],61:[function(e,t){!function(e,t){"use strict";function i(e){o.call(this,"Left","AdminMenu"),this.leftPanelDisabled=n.leftPanelDisabled,this.menu=e.menu,s.constructorEnd(this)}var s=t("App:Knoin"),n=t("Globals"),o=t("Knoin:AbstractViewModel");s.extendAsViewModel("AdminMenuViewModel",i),i.prototype.link=function(e){return"#/"+e},e.exports=i}(t,e)},{"App:Knoin":28,Globals:8,"Knoin:AbstractViewModel":31}],62:[function(e,t){!function(e,t){"use strict";function i(){l.call(this,"Right","AdminPane"),this.adminDomain=s.observable(n.settingsGet("AdminDomain")),this.version=s.observable(n.settingsGet("Version")),this.adminManLoadingVisibility=o.adminManLoadingVisibility,r.constructorEnd(this)}var s=t("ko"),n=t("Storage:Settings"),o=t("Storage:Admin:Data"),a=t("Storage:Admin:Remote"),r=t("App:Knoin"),l=t("Knoin:AbstractViewModel");r.extendAsViewModel("AdminPaneViewModel",i),i.prototype.logoutClick=function(){a.adminLogout(function(){t("App:Admin").loginAndLogoutReload()})},e.exports=i}(t,e)},{"App:Admin":3,"App:Knoin":28,"Knoin:AbstractViewModel":31,"Storage:Admin:Data":52,"Storage:Admin:Remote":53,"Storage:Settings":59,ko:23}],63:[function(e,t){!function(e,t){"use strict";function i(){u.call(this,"Popups","PopupsActivate");var e=this;this.domain=s.observable(""),this.key=s.observable(""),this.key.focus=s.observable(!1),this.activationSuccessed=s.observable(!1),this.licenseTrigger=r.licenseTrigger,this.activateProcess=s.observable(!1),this.activateText=s.observable(""),this.activateText.isError=s.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=o.createCommand(this,function(){this.activateProcess(!0),this.validateSubscriptionKey()?l.licensingActivate(function(t,i){e.activateProcess(!1),n.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(o.getNotification(i.ErrorCode)),e.activateText.isError(!0),e.key.focus(!0)):(e.activateText(o.getNotification(n.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()}),c.constructorEnd(this)}var s=t("ko"),n=t("Enums"),o=t("Utils"),a=t("Storage:Settings"),r=t("Storage:Admin:Data"),l=t("Storage:Admin:Remote"),c=t("App:Knoin"),u=t("Knoin:AbstractViewModel");c.extendAsViewModel("PopupsActivateViewModel",i),i.prototype.onShow=function(){this.domain(a.settingsGet("AdminDomain")),this.activateProcess()||(this.key(""),this.activateText(""),this.activateText.isError(!1),this.activationSuccessed(!1))},i.prototype.onFocus=function(){this.activateProcess()||this.key.focus(!0)},i.prototype.validateSubscriptionKey=function(){var e=this.key();return""===e||!!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(o.trim(e))},e.exports=i}(t,e)},{"App:Knoin":28,Enums:6,"Knoin:AbstractViewModel":31,"Storage:Admin:Data":52,"Storage:Admin:Remote":53,"Storage:Settings":59,Utils:11,ko:23}],64:[function(e,t){!function(e,t){"use strict";function i(){l.call(this,"Popups","PopupsAsk"),this.askDesc=s.observable(""),this.yesButton=s.observable(""),this.noButton=s.observable(""),this.yesFocus=s.observable(!1),this.noFocus=s.observable(!1),this.fYesAction=null,this.fNoAction=null,this.bDisabeCloseOnEsc=!0,this.sDefaultKeyScope=o.KeyState.PopupAsk,r.constructorEnd(this)
|
||
}var s=t("ko"),n=t("key"),o=t("Enums"),a=t("Utils"),r=t("App:Knoin"),l=t("Knoin:AbstractViewModel");r.extendAsViewModel("PopupsAskViewModel",i),i.prototype.clearPopup=function(){this.askDesc(""),this.yesButton(a.i18n("POPUPS_ASK/BUTTON_YES")),this.noButton(a.i18n("POPUPS_ASK/BUTTON_NO")),this.yesFocus(!1),this.noFocus(!1),this.fYesAction=null,this.fNoAction=null},i.prototype.yesClick=function(){this.cancelCommand(),a.isFunc(this.fYesAction)&&this.fYesAction.call(null)},i.prototype.noClick=function(){this.cancelCommand(),a.isFunc(this.fNoAction)&&this.fNoAction.call(null)},i.prototype.onShow=function(e,t,i,s,n){this.clearPopup(),this.fYesAction=t||null,this.fNoAction=i||null,this.askDesc(e||""),s&&this.yesButton(s),s&&this.yesButton(n)},i.prototype.onFocus=function(){this.yesFocus(!0)},i.prototype.onBuild=function(){n("tab, shift+tab, right, left",o.KeyState.PopupAsk,_.bind(function(){return this.yesFocus()?this.noFocus(!0):this.yesFocus(!0),!1},this)),n("esc",o.KeyState.PopupAsk,_.bind(function(){return this.noClick(),!1},this))},e.exports=i}(t,e)},{"App:Knoin":28,Enums:6,"Knoin:AbstractViewModel":31,Utils:11,key:22,ko:23}],65:[function(e,t){!function(e,t){"use strict";function i(){u.call(this,"Popups","PopupsDomain"),this.edit=n.observable(!1),this.saving=n.observable(!1),this.savingError=n.observable(""),this.whiteListPage=n.observable(!1),this.testing=n.observable(!1),this.testingDone=n.observable(!1),this.testingImapError=n.observable(!1),this.testingSmtpError=n.observable(!1),this.testingImapErrorDesc=n.observable(""),this.testingSmtpErrorDesc=n.observable(""),this.testingImapError.subscribe(function(e){e||this.testingImapErrorDesc("")},this),this.testingSmtpError.subscribe(function(e){e||this.testingSmtpErrorDesc("")},this),this.testingImapErrorDesc=n.observable(""),this.testingSmtpErrorDesc=n.observable(""),this.imapServerFocus=n.observable(!1),this.smtpServerFocus=n.observable(!1),this.name=n.observable(""),this.name.focused=n.observable(!1),this.imapServer=n.observable(""),this.imapPort=n.observable(""+a.Values.ImapDefaulPort),this.imapSecure=n.observable(o.ServerSecure.None),this.imapShortLogin=n.observable(!1),this.smtpServer=n.observable(""),this.smtpPort=n.observable(""+a.Values.SmtpDefaulPort),this.smtpSecure=n.observable(o.ServerSecure.None),this.smtpShortLogin=n.observable(!1),this.smtpAuth=n.observable(!0),this.whiteList=n.observable(""),this.headerText=n.computed(function(){var e=this.name();return this.edit()?'Edit Domain "'+e+'"':"Add Domain"+(""===e?"":' "'+e+'"')},this),this.domainIsComputed=n.computed(function(){return""!==this.name()&&""!==this.imapServer()&&""!==this.imapPort()&&""!==this.smtpServer()&&""!==this.smtpPort()},this),this.canBeTested=n.computed(function(){return!this.testing()&&this.domainIsComputed()},this),this.canBeSaved=n.computed(function(){return!this.saving()&&this.domainIsComputed()},this),this.createOrAddCommand=r.createCommand(this,function(){this.saving(!0),l.createOrUpdateDomain(s.bind(this.onDomainCreateOrSaveResponse,this),!this.edit(),this.name(),this.imapServer(),r.pInt(this.imapPort()),this.imapSecure(),this.imapShortLogin(),this.smtpServer(),r.pInt(this.smtpPort()),this.smtpSecure(),this.smtpShortLogin(),this.smtpAuth(),this.whiteList())},this.canBeSaved),this.testConnectionCommand=r.createCommand(this,function(){this.whiteListPage(!1),this.testingDone(!1),this.testingImapError(!1),this.testingSmtpError(!1),this.testing(!0),l.testConnectionForDomain(s.bind(this.onTestConnectionResponse,this),this.name(),this.imapServer(),r.pInt(this.imapPort()),this.imapSecure(),this.smtpServer(),r.pInt(this.smtpPort()),this.smtpSecure(),this.smtpAuth())},this.canBeTested),this.whiteListCommand=r.createCommand(this,function(){this.whiteListPage(!this.whiteListPage())}),this.imapServerFocus.subscribe(function(e){e&&""!==this.name()&&""===this.imapServer()&&this.imapServer(this.name().replace(/[.]?[*][.]?/g,""))},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){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){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),c.constructorEnd(this)}var s=t("_"),n=t("ko"),o=t("Enums"),a=t("Consts"),r=t("Utils"),l=t("Storage:Admin:Remote"),c=t("App:Knoin"),u=t("Knoin:AbstractViewModel");c.extendAsViewModel("PopupsDomainViewModel",i),i.prototype.onTestConnectionResponse=function(e,t){this.testing(!1),o.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))},i.prototype.onDomainCreateOrSaveResponse=function(e,i){this.saving(!1),o.StorageResultType.Success===e&&i?i.Result?(t("App:Admin").reloadDomainList(),this.closeCommand()):o.Notification.DomainAlreadyExists===i.ErrorCode&&this.savingError("Domain already exists"):this.savingError("Unknown error")},i.prototype.onHide=function(){this.whiteListPage(!1)},i.prototype.onShow=function(e){this.saving(!1),this.whiteListPage(!1),this.testing(!1),this.testingDone(!1),this.testingImapError(!1),this.testingSmtpError(!1),this.clearForm(),e&&(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.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.whiteList(r.trim(e.WhiteList)))},i.prototype.onFocus=function(){""===this.name()&&this.name.focused(!0)},i.prototype.clearForm=function(){this.edit(!1),this.whiteListPage(!1),this.savingError(""),this.name(""),this.name.focused(!1),this.imapServer(""),this.imapPort(""+a.Values.ImapDefaulPort),this.imapSecure(o.ServerSecure.None),this.imapShortLogin(!1),this.smtpServer(""),this.smtpPort(""+a.Values.SmtpDefaulPort),this.smtpSecure(o.ServerSecure.None),this.smtpShortLogin(!1),this.smtpAuth(!0),this.whiteList("")},e.exports=i}(t,e)},{"App:Admin":3,"App:Knoin":28,Consts:5,Enums:6,"Knoin:AbstractViewModel":31,"Storage:Admin:Remote":53,Utils:11,_:26,ko:23}],66:[function(e,t){!function(e,t){"use strict";function i(){l.call(this,"Popups","PopupsLanguages"),this.exp=n.observable(!1),this.languages=n.computed(function(){return s.map(a.languages(),function(e){return{key:e,selected:n.observable(!1),fullName:o.convertLangName(e)}})}),a.mainLanguage.subscribe(function(){this.resetMainLanguage()},this),r.constructorEnd(this)}var s=t("_"),n=t("ko"),o=t("Utils"),a=t("Storage:RainLoop:Data"),r=t("App:Knoin"),l=t("Knoin:AbstractViewModel");r.extendAsViewModel("PopupsLanguagesViewModel",i),i.prototype.languageEnName=function(e){return o.convertLangName(e,!0)},i.prototype.resetMainLanguage=function(){var e=a.mainLanguage();s.each(this.languages(),function(t){t.selected(t.key===e)})},i.prototype.onShow=function(){this.exp(!0),this.resetMainLanguage()},i.prototype.onHide=function(){this.exp(!1)},i.prototype.changeLanguage=function(e){a.mainLanguage(e),this.cancelCommand()},e.exports=i}(t,e)},{"App:Knoin":28,"Knoin:AbstractViewModel":31,"Storage:RainLoop:Data":55,Utils:11,_:26,ko:23}],67:[function(e,t){!function(e,t){"use strict";function i(){u.call(this,"Popups","PopupsPlugin");var e=this;this.onPluginSettingsUpdateResponse=s.bind(this.onPluginSettingsUpdateResponse,this),this.saveError=n.observable(""),this.name=n.observable(""),this.readme=n.observable(""),this.configures=n.observableArray([]),this.hasReadme=n.computed(function(){return""!==this.readme()},this),this.hasConfiguration=n.computed(function(){return 0<this.configures().length},this),this.readmePopoverConf={placement:"top",trigger:"hover",title:"About",content:function(){return e.readme()}},this.saveCommand=r.createCommand(this,function(){var e={};e.Name=this.name(),s.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=s.debounce(s.bind(this.tryToClosePopup,this),200),c.constructorEnd(this)}var s=t("_"),n=t("ko"),o=t("key"),a=t("Enums"),r=t("Utils"),l=t("Storage:Admin:Remote"),c=t("App:Knoin"),u=t("Knoin:AbstractViewModel");c.extendAsViewModel("PopupsPluginViewModel",i),i.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)))},i.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(s.map(t,function(e){return{value:n.observable(e[0]),Name:e[1],Type:e[2],Label:e[3],Default:e[4],Desc:e[5]}}))}},i.prototype.tryToClosePopup=function(){var e=this,i=t("View:Popup:Ask");c.isPopupVisible(i)||c.showScreenPopup(i,[r.i18n("POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW"),function(){e.modalVisibility()&&r.delegateRun(e,"cancelCommand")}])},i.prototype.onBuild=function(){o("esc",a.KeyState.All,s.bind(function(){return this.modalVisibility()&&this.tryToClosePopup(),!1},this))},e.exports=i}(t,e)},{"App:Knoin":28,Enums:6,"Knoin:AbstractViewModel":31,"Storage:Admin:Remote":53,Utils:11,"View:Popup:Ask":64,_:26,key:22,ko:23}]},{},[1]); |