mirror of
https://github.com/YunoHost-Apps/rainloop_ynh.git
synced 2024-09-03 20:16:18 +02:00
7 lines
139 KiB
JavaScript
7 lines
139 KiB
JavaScript
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||
|
!function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var i={};return t.m=e,t.c=i,t.p="rainloop/v/0.0.0/static/js/min/",t(0)}([function(e,t,i){i(70)(i(16))},function(e,t,i){!function(){"use strict";var t=null,n={},o=i(11),s=i(2),r=i(12),a=i(3),l=i(72),c=i(73),u=i(49),p=i(4),d=i(7);n.trim=r.trim,n.inArray=r.inArray,n.isArray=s.isArray,n.isObject=s.isObject,n.isFunc=s.isFunction,n.isUnd=s.isUndefined,n.isNull=s.isNull,n.emptyFunction=function(){},n.isNormal=function(e){return!n.isUnd(e)&&!n.isNull(e)},n.windowResize=s.debounce(function(e){n.isUnd(e)?d.$win.resize():o.setTimeout(function(){d.$win.resize()},e)},50),n.windowResizeCallback=function(){n.windowResize()},n.isPosNumeric=function(e,t){return n.isNormal(e)?(n.isUnd(t)?0:!t)?/^[1-9]+[0-9]*$/.test(e.toString()):/^[0-9]*$/.test(e.toString()):!1},n.pInt=function(e,t){var i=n.isNormal(e)&&""!==e?o.parseInt(e,10):t||0;return o.isNaN(i)?t||0:i},n.pString=function(e){return n.isNormal(e)?""+e:""},n.encodeURIComponent=function(e){return o.encodeURIComponent(e)},n.isNonEmptyArray=function(e){return n.isArray(e)&&0<e.length},n.simpleQueryParser=function(e){var t={},i=[],n=[],s=0,r=0;for(i=e.split("&"),s=0,r=i.length;r>s;s++)n=i[s].split("="),t[o.decodeURIComponent(n[0])]=o.decodeURIComponent(n[1]);return t},n.mailToHelper=function(e,t){if(e&&"mailto:"===e.toString().substr(0,7).toLowerCase()){e=e.toString().substr(7);var r=[],a=null,l=null,c={},u=i(25),d=e.replace(/\?.+$/,""),h=e.replace(/^[^\?]*\?/,""),g=function(e){return e?s.compact(s.map(o.decodeURIComponent(e).split(/[,]/),function(e){var t=new u;return t.mailsoParse(e),""!==t.email?t:null})):null};return r=g(d),c=n.simpleQueryParser(h),n.isUnd(c.cc)||(a=g(o.decodeURIComponent(c.cc))),n.isUnd(c.bcc)||(l=g(o.decodeURIComponent(c.bcc))),i(5).showScreenPopup(t,[p.ComposeType.Empty,null,r,a,l,n.isUnd(c.subject)?null:n.pString(o.decodeURIComponent(c.subject)),n.isUnd(c.body)?null:n.plainToHtml(n.pString(o.decodeURIComponent(c.body)))]),!0}return!1},n.rsaObject=function(e){return c&&e&&(null===t||t&&t.__sPublicKey!==e)&&o.crypto&&o.crypto.getRandomValues?(t=new c,t.setPublicKey(e),t.__sPublicKey=e):t=!1,t},n.rsaEncode=function(e,t){if(o.crypto&&o.crypto.getRandomValues&&t){var i=!1,s=n.rsaObject(t);if(s&&(i=s.encrypt(n.fakeMd5()+":"+e+":"+n.fakeMd5()),!1!==i&&n.isNormal(i)))return"rsa:xxx:"+i}return e},n.rsaEncode.supported=!1,n.encodeHtml=function(e){return n.isNormal(e)?s.escape(e.toString()):""},n.splitPlainText=function(e,t){var i="",o="",s=e,r=0,a=0;for(t=n.isUnd(t)?100:t;s.length>t;)o=s.substring(0,t),r=o.lastIndexOf(" "),a=o.lastIndexOf("\n"),-1!==a&&(r=a),-1===r&&(r=t),i+=o.substring(0,r)+"\n",s=s.substring(r+1);return i+s},n.timeOutAction=function(){var e={};return function(t,i,s){n.isUnd(e[t])&&(e[t]=0),o.clearTimeout(e[t]),e[t]=o.setTimeout(i,s)}}(),n.timeOutActionSecond=function(){var e={};return function(t,i,n){e[t]||(e[t]=o.setTimeout(function(){i(),e[t]=0},n))}}(),n.hos=function(e,t){return e&&o.Object&&o.Object.hasOwnProperty?o.Object.hasOwnProperty.call(e,t):!1},n.inFocus=function(){return o.document.activeElement?(n.isUnd(o.document.activeElement.__inFocusCache)&&(o.document.activeElement.__inFocusCache=r(o.document.activeElement).is("input,textarea,iframe,.cke_editable")),!!o.document.activeElement.__inFocusCache):!1},n.removeInFocus=function(){if(o.document&&o.document.activeElement&&o.document.activeElement.blur){var e=r(o.document.activeElement);e.is("input,textarea")&&o.document.activeElement.blur()}},n.removeSelection=function(){if(o&&o.getSelection){var e=o.getSelection();e&&e.removeAllRanges&&e.removeAllRanges()}else o.document&&o.document.selection&&o.document.selection.empty&&o.document.selection.empty()},n.replySubjectAdd=function(e,t){e=n.trim(e.toUpperCase()),t=n.trim(t.replace(/[\s]+/g," "));var i=!1,o=[],r="RE"===e,a="FWD"===e,l=!a;return""!==t&&s.each(t.split(":"),function(e){var t=n.trim(e);i||!/^(RE|FWD)$/i.test(t)&&!/^(RE|FWD)[\[\(][\d]+[\]\)]$/i.test(t)?(o.push(e),i=!0):(r||(r=!!/^RE/i.t
|
||
|
}()},function(e,t,i){!function(){"use strict";function t(){this.oScreens={},this.sDefaultScreenName="",this.oCurrentScreen=null}var n=i(2),o=i(12),s=i(3),r=i(77),a=i(41),l=i(7),c=i(20),u=i(1);t.prototype.oScreens={},t.prototype.sDefaultScreenName="",t.prototype.oCurrentScreen=null,t.prototype.hideLoading=function(){o("#rl-loading").hide()},t.prototype.constructorEnd=function(e){u.isFunc(e.__constructor_end)&&e.__constructor_end.call(e)},t.prototype.extendAsViewModel=function(e,t){t&&(t.__names=u.isArray(e)?e:[e],t.__name=t.__names[0])},t.prototype.addSettingsViewModel=function(e,t,i,n,o){e.__rlSettingsData={Label:i,Template:t,Route:n,IsDefault:!!o},l.aViewModels.settings.push(e)},t.prototype.removeSettingsViewModel=function(e){l.aViewModels["settings-removed"].push(e)},t.prototype.disableSettingsViewModel=function(e){l.aViewModels["settings-disabled"].push(e)},t.prototype.routeOff=function(){r.changed.active=!1},t.prototype.routeOn=function(){r.changed.active=!0},t.prototype.screen=function(e){return""===e||u.isUnd(this.oScreens[e])?null:this.oScreens[e]},t.prototype.buildViewModel=function(e,t){if(e&&!e.__builded){var i=this,r=new e(t),a=r.viewModelPosition(),p=o("#rl-content #rl-"+a.toLowerCase()),d=null;e.__builded=!0,e.__vm=r,r.onShowTrigger=s.observable(!1),r.onHideTrigger=s.observable(!1),r.viewModelName=e.__name,r.viewModelNames=e.__names,p&&1===p.length?(d=o("<div></div>").addClass("rl-view-model").addClass("RL-"+r.viewModelTemplate()).hide(),d.appendTo(p),r.viewModelDom=d,e.__dom=d,"Popups"===a&&(r.cancelCommand=r.closeCommand=u.createCommand(r,function(){i.hideScreenPopup(e)}),r.modalVisibility.subscribe(function(e){var t=this;e?(this.viewModelDom.show(),this.storeAndSetKeyScope(),l.popupVisibilityNames.push(this.viewModelName),r.viewModelDom.css("z-index",3e3+l.popupVisibilityNames().length+10),this.onShowTrigger&&this.onShowTrigger(!this.onShowTrigger()),u.delegateRun(this,"onShowWithDelay",[],500)):(u.delegateRun(this,"onHide"),u.delegateRun(this,"onHideWithDelay",[],500),this.onHideTrigger&&this.onHideTrigger(!this.onHideTrigger()),this.restoreKeyScope(),n.each(this.viewModelNames,function(e){c.runHook("view-model-on-hide",[e,t])}),l.popupVisibilityNames.remove(this.viewModelName),r.viewModelDom.css("z-index",2e3),l.tooltipTrigger(!l.tooltipTrigger()),n.delay(function(){t.viewModelDom.hide()},300))},r)),n.each(e.__names,function(e){c.runHook("view-model-pre-build",[e,r,d])}),s.applyBindingAccessorsToNode(d[0],{i18nInit:!0,template:function(){return{name:r.viewModelTemplate()}}},r),u.delegateRun(r,"onBuild",[d]),r&&"Popups"===a&&r.registerPopupKeyDown(),n.each(e.__names,function(e){c.runHook("view-model-post-build",[e,r,d])})):u.log("Cannot find view model position: "+a)}return e?e.__vm:null},t.prototype.hideScreenPopup=function(e){e&&e.__vm&&e.__dom&&e.__vm.modalVisibility(!1)},t.prototype.showScreenPopup=function(e,t){e&&(this.buildViewModel(e),e.__vm&&e.__dom&&(e.__vm.modalVisibility(!0),u.delegateRun(e.__vm,"onShow",t||[]),n.each(e.__names,function(i){c.runHook("view-model-on-show",[i,e.__vm,t||[]])})))},t.prototype.isPopupVisible=function(e){return e&&e.__vm?e.__vm.modalVisibility():!1},t.prototype.screenOnRoute=function(e,t){var i=this,o=null,s=null;""===u.pString(e)&&(e=this.sDefaultScreenName),""!==e&&(o=this.screen(e),o||(o=this.screen(this.sDefaultScreenName),o&&(t=e+"/"+t,e=this.sDefaultScreenName)),o&&o.__started&&(o.__builded||(o.__builded=!0,u.isNonEmptyArray(o.viewModels())&&n.each(o.viewModels(),function(e){this.buildViewModel(e,o)},this),u.delegateRun(o,"onBuild")),n.defer(function(){i.oCurrentScreen&&(u.delegateRun(i.oCurrentScreen,"onHide"),u.delegateRun(i.oCurrentScreen,"onHideWithDelay",[],500),i.oCurrentScreen.onHideTrigger&&i.oCurrentScreen.onHideTrigger(!i.oCurrentScreen.onHideTrigger()),u.isNonEmptyArray(i.oCurrentScreen.viewModels())&&n.each(i.oCurrentScreen.viewModels(),function(e){e.__vm&&e.__dom&&"Popups"!==e.__vm.viewModelPosition()&&(e.__dom.hide(),e.__vm.viewModelVisibility(!1),u.delegateRun(e.__vm,"onHide"),u.delegateRun(e.__vm,"onHideWithDelay",[],500),e.__vm.onHideTrigger&
|
||
|
},t.prototype.createOrUpdateDomain=function(e,t,i,n,o,s,r,a,l,c,u,p,d,h,g,m,f,b,v){this.defaultRequest(e,"AdminDomainSave",{Create:t?"1":"0",Name:i,IncHost:n,IncPort:o,IncSecure:s,IncShortLogin:r?"1":"0",UseSieve:a?"1":"0",SieveAllowRaw:l?"1":"0",SieveHost:c,SievePort:u,SieveSecure:p,OutHost:d,OutPort:h,OutSecure:g,OutShortLogin:m?"1":"0",OutAuth:f?"1":"0",OutUsePhpMail:b?"1":"0",WhiteList:v})},t.prototype.testConnectionForDomain=function(e,t,i,n,o,s,r,a,l,c,u,p,d,h){this.defaultRequest(e,"AdminDomainTest",{Name:t,IncHost:i,IncPort:n,IncSecure:o,UseSieve:s?"1":"0",SieveHost:r,SievePort:a,SieveSecure:l,OutHost:c,OutPort:u,OutSecure:p,OutAuth:d?"1":"0",OutUsePhpMail:h?"1":"0"})},t.prototype.testContacts=function(e,t){this.defaultRequest(e,"AdminContactsTest",t)},t.prototype.saveNewAdminPassword=function(e,t){this.defaultRequest(e,"AdminPasswordUpdate",t)},t.prototype.adminPing=function(e){this.defaultRequest(e,"AdminPing")},e.exports=new t}()},,function(e){e.exports=window.key},function(e,t,i){!function(){"use strict";function t(){this.oSettings=i(9),this.oSimpleHooks={},this.aUserViewModelsHooks=[],this.aAdminViewModelsHooks=[]}var n=i(2),o=i(7),s=i(1);t.prototype.oSettings={},t.prototype.aUserViewModelsHooks=[],t.prototype.aAdminViewModelsHooks=[],t.prototype.oSimpleHooks={},t.prototype.addHook=function(e,t){s.isFunc(t)&&(s.isArray(this.oSimpleHooks[e])||(this.oSimpleHooks[e]=[]),this.oSimpleHooks[e].push(t))},t.prototype.runHook=function(e,t){s.isArray(this.oSimpleHooks[e])&&(t=t||[],n.each(this.oSimpleHooks[e],function(e){e.apply(null,t)}))},t.prototype.mainSettingsGet=function(e){return this.oSettings.settingsGet(e)},t.prototype.remoteRequest=function(e,t,i,n){o.__APP__&&o.__APP__.remote().defaultRequest(e,"Plugin"+t,i,n)},t.prototype.addSettingsViewModel=function(e,t,i,n){this.aUserViewModelsHooks.push([e,t,i,n])},t.prototype.addSettingsViewModelForAdmin=function(e,t,i,n){this.aAdminViewModelsHooks.push([e,t,i,n])},t.prototype.runSettingsViewModelHooks=function(e){n.each(e?this.aAdminViewModelsHooks:this.aUserViewModelsHooks,function(e){i(5).addSettingsViewModel(e[0],e[1],e[2],e[3])})},t.prototype.settingsGet=function(e,t){var i=this.oSettings.settingsGet("Plugins");return i=i&&!s.isUnd(i[e])?i[e]:null,i?s.isUnd(i[t])?null:i[t]:null},e.exports=new t}()},,,,,function(e,t,i){!function(){"use strict";function t(e,t,i,n){this.email=e||"",this.name=t||"",this.dkimStatus=i||"none",this.dkimValue=n||"",this.clearDuplicateName()}var n=i(1);t.newInstanceFromJson=function(e){var i=new t;return i.initByJson(e)?i:null},t.prototype.name="",t.prototype.email="",t.prototype.dkimStatus="none",t.prototype.dkimValue="",t.prototype.clear=function(){this.email="",this.name="",this.dkimStatus="none",this.dkimValue=""},t.prototype.validate=function(){return""!==this.name||""!==this.email},t.prototype.hash=function(e){return"#"+(e?"":this.name)+"#"+this.email+"#"},t.prototype.clearDuplicateName=function(){this.name===this.email&&(this.name="")},t.prototype.search=function(e){return-1<(this.name+" "+this.email).toLowerCase().indexOf(e.toLowerCase())},t.prototype.parse=function(e){this.clear(),e=n.trim(e);var t=/(?:"([^"]+)")? ?[<]?(.*?@[^>,]+)>?,? ?/g,i=t.exec(e);i?(this.name=i[1]||"",this.email=i[2]||"",this.clearDuplicateName()):/^[^@]+@[^@]+$/.test(e)&&(this.name="",this.email=e)},t.prototype.initByJson=function(e){var t=!1;return e&&"Object/Email"===e["@Object"]&&(this.name=n.trim(e.Name),this.email=n.trim(e.Email),this.dkimStatus=n.trim(e.DkimStatus||""),this.dkimValue=n.trim(e.DkimValue||""),t=""!==this.email,this.clearDuplicateName()),t},t.prototype.toLine=function(e,t,i){var o="";return""!==this.email&&(t=n.isUnd(t)?!1:!!t,i=n.isUnd(i)?!1:!!i,e&&""!==this.name?o=t?'<a href="mailto:'+n.encodeHtml('"'+this.name+'" <'+this.email+">")+'" target="_blank" tabindex="-1">'+n.encodeHtml(this.name)+"</a>":i?n.encodeHtml(this.name):this.name:(o=this.email,""!==this.name?t?o=n.encodeHtml('"'+this.name+'" <')+'<a href="mailto:'+n.encodeHtml('"'+this.name+'" <'+this.email+">")+'" target="_blank" tabindex="-1">'+n.encodeHtml(o)+"</a>"+n.encodeHtm
|
||
|
},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(e){u.call(this,"settings",e),this.menu=s.observableArray([]),this.oCurrentSubScreen=null,this.oViewModelPlace=null,this.setupSettings()}var n=i(2),o=i(12),s=i(3),r=i(7),a=i(1),l=i(13),c=i(5),u=i(35);n.extend(t.prototype,u.prototype),t.prototype.setupSettings=function(e){e&&e()},t.prototype.onRoute=function(e){var t=this,i=null,u=null,p=null,d=null;u=n.find(r.aViewModels.settings,function(t){return t&&t.__rlSettingsData&&e===t.__rlSettingsData.Route}),u&&(n.find(r.aViewModels["settings-removed"],function(e){return e&&e===u})&&(u=null),u&&n.find(r.aViewModels["settings-disabled"],function(e){return e&&e===u})&&(u=null)),u?(u.__builded&&u.__vm?i=u.__vm:(p=this.oViewModelPlace,p&&1===p.length?(i=new u,d=o("<div></div>").addClass("rl-settings-view-model").hide(),d.appendTo(p),i.viewModelDom=d,i.__rlSettingsData=u.__rlSettingsData,u.__dom=d,u.__builded=!0,u.__vm=i,s.applyBindingAccessorsToNode(d[0],{i18nInit:!0,template:function(){return{name:u.__rlSettingsData.Template}}},i),a.delegateRun(i,"onBuild",[d])):a.log("Cannot find sub settings view model position: SettingsSubScreen")),i&&n.defer(function(){t.oCurrentSubScreen&&(a.delegateRun(t.oCurrentSubScreen,"onHide"),t.oCurrentSubScreen.viewModelDom.hide()),t.oCurrentSubScreen=i,t.oCurrentSubScreen&&(t.oCurrentSubScreen.viewModelDom.show(),a.delegateRun(t.oCurrentSubScreen,"onShow"),a.delegateRun(t.oCurrentSubScreen,"onShowWithDelay",[],200),n.each(t.menu(),function(e){e.selected(i&&i.__rlSettingsData&&e.route===i.__rlSettingsData.Route)}),o("#rl-content .b-settings .b-content .content").scrollTop(0)),a.windowResize()})):c.setHash(l.settings(),!1,!0)},t.prototype.onHide=function(){this.oCurrentSubScreen&&this.oCurrentSubScreen.viewModelDom&&(a.delegateRun(this.oCurrentSubScreen,"onHide"),this.oCurrentSubScreen.viewModelDom.hide())},t.prototype.onBuild=function(){n.each(r.aViewModels.settings,function(e){e&&e.__rlSettingsData&&!n.find(r.aViewModels["settings-removed"],function(t){return t&&t===e})&&this.menu.push({route:e.__rlSettingsData.Route,label:e.__rlSettingsData.Label,selected:s.observable(!1),disabled:!!n.find(r.aViewModels["settings-disabled"],function(t){return t&&t===e})})},this),this.oViewModelPlace=o("#rl-content #rl-settings-subscreen")},t.prototype.routes=function(){var e=n.find(r.aViewModels.settings,function(e){return e&&e.__rlSettingsData&&e.__rlSettingsData.IsDefault}),t=e?e.__rlSettingsData.Route:"general",i={subname:/^(.*)$/,normalize_:function(e,i){return i.subname=a.isUnd(i.subname)?t:a.pString(i.subname),[i.subname]}};return[["{subname}/",i],["{subname}",i],["",i]]},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.domains=n.observableArray([]),this.domains.loading=n.observable(!1).extend({throttle:100})}var n=i(3);e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){this.licensing=n.observable(!1),this.licensingProcess=n.observable(!1),this.licenseValid=n.observable(!1),this.licenseExpired=n.observable(0),this.licenseError=n.observable(""),this.licenseTrigger=n.observable(!1)}var n=i(3);e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){this.packages=n.observableArray([]),this.packages.loading=n.observable(!1).extend({throttle:100}),this.packagesReal=n.observable(!0),this.packagesMainUpdatable=n.observable(!0)}var n=i(3);e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){this.plugins=n.observableArray([]),this.plugins.loading=n.observable(!1).extend({throttle:100}),this.plugins.error=n.observable("")}var n=i(3);e.exports=new t}()},function(e,t,i){!function(){"use strict";function t(){this.allowLanguagesOnSettings=n.observable(!0),this.allowLanguagesOnLogin=n.observable(!0),this.interfaceAnimation=n.observable(!0),this.interfaceAnimation.subscribe(function(e){var t=o.bMobileDevice||!e;o.$html.toggleClass("rl-anim",!t).toggleClass("no-rl-anim",t)}),this.interfaceAnimation.valueHasMutated(),this.prem=n.observable(!1)}var n=i(3),o=i(7),s=i(9);t.prototype.populate=function(){this.allowLanguagesOnLog
|
||
|
}),r.StorageResultType.Success===l&&c&&c.Result&&c.Result.Reload?n.location.reload():i(16).reloadPackagesList()}},t.prototype.deletePackage=function(e){e&&(e.loading(!0),c.packageDelete(this.requestHelper(e,!1),e))},t.prototype.installPackage=function(e){e&&(e.loading(!0),c.packageInstall(this.requestHelper(e,!0),e))},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.enabledPlugins=o.observable(!!l.settingsGet("EnabledPlugins")),this.plugins=c.plugins,this.pluginsError=c.plugins.error,this.visibility=o.computed(function(){return c.plugins.loading()?"visible":"hidden"},this),this.onPluginLoadRequest=n.bind(this.onPluginLoadRequest,this),this.onPluginDisableRequest=n.bind(this.onPluginDisableRequest,this)}var n=i(2),o=i(3),s=i(4),r=i(1),a=i(8),l=i(9),c=i(64),u=i(17);t.prototype.disablePlugin=function(e){e.disabled(!e.disabled()),u.pluginDisable(this.onPluginDisableRequest,e.name,e.disabled())},t.prototype.configurePlugin=function(e){u.plugin(this.onPluginLoadRequest,e.name)},t.prototype.onBuild=function(e){var t=this;e.on("click",".e-item .configure-plugin-action",function(){var e=o.dataFor(this);e&&t.configurePlugin(e)}).on("click",".e-item .disabled-plugin",function(){var e=o.dataFor(this);e&&t.disablePlugin(e)}),this.enabledPlugins.subscribe(function(e){u.saveAdminConfig(r.emptyFunction,{EnabledPlugins:e?"1":"0"})})},t.prototype.onShow=function(){c.plugins.error(""),i(16).reloadPluginList()},t.prototype.onPluginLoadRequest=function(e,t){s.StorageResultType.Success===e&&t&&t.Result&&i(5).showScreenPopup(i(143),[t.Result])},t.prototype.onPluginDisableRequest=function(e,t){s.StorageResultType.Success===e&&t&&!t.Result&&t.ErrorCode&&c.plugins.error(s.Notification.UnsupportedPluginPackage===t.ErrorCode&&t.ErrorMessage&&""!==t.ErrorMessage?t.ErrorMessage:a.getNotification(t.ErrorCode)),i(16).reloadPluginList()},e.exports=t}()},function(e,t,i){!function(){"use strict";function t(){this.useLocalProxyForExternalImages=l.useLocalProxyForExternalImages,this.weakPassword=l.weakPassword,this.capaOpenPGP=c.openPGP,this.capaTwoFactorAuth=c.twoFactorAuth,this.verifySslCertificate=o.observable(!!u.settingsGet("VerifySslCertificate")),this.allowSelfSigned=o.observable(!!u.settingsGet("AllowSelfSigned")),this.adminLogin=o.observable(u.settingsGet("AdminLogin")),this.adminLoginError=o.observable(!1),this.adminPassword=o.observable(""),this.adminPasswordNew=o.observable(""),this.adminPasswordNew2=o.observable(""),this.adminPasswordNewError=o.observable(!1),this.adminPasswordUpdateError=o.observable(!1),this.adminPasswordUpdateSuccess=o.observable(!1),this.adminPassword.subscribe(function(){this.adminPasswordUpdateError(!1),this.adminPasswordUpdateSuccess(!1)},this),this.adminLogin.subscribe(function(){this.adminLoginError(!1)},this),this.adminPasswordNew.subscribe(function(){this.adminPasswordUpdateError(!1),this.adminPasswordUpdateSuccess(!1),this.adminPasswordNewError(!1)},this),this.adminPasswordNew2.subscribe(function(){this.adminPasswordUpdateError(!1),this.adminPasswordUpdateSuccess(!1),this.adminPasswordNewError(!1)},this),this.saveNewAdminPasswordCommand=r.createCommand(this,function(){return""===r.trim(this.adminLogin())?(this.adminLoginError(!0),!1):this.adminPasswordNew()!==this.adminPasswordNew2()?(this.adminPasswordNewError(!0),!1):(this.adminPasswordUpdateError(!1),this.adminPasswordUpdateSuccess(!1),void p.saveNewAdminPassword(this.onNewAdminPasswordResponse,{Login:this.adminLogin(),Password:this.adminPassword(),NewPassword:this.adminPasswordNew()}))},function(){return""!==r.trim(this.adminLogin())&&""!==this.adminPassword()}),this.onNewAdminPasswordResponse=n.bind(this.onNewAdminPasswordResponse,this)}var n=i(2),o=i(3),s=i(4),r=i(1),a=i(13),l=i(37),c=i(43),u=i(9),p=i(17);t.prototype.onNewAdminPasswordResponse=function(e,t){s.StorageResultType.Success===e&&t&&t.Result?(this.adminPassword(""),this.adminPasswordNew(""),this.adminPasswordNew2(""),this.adminPasswordUpdateSuccess(!0),this.weakPassword(!!t.Result.Weak)):this.adminPasswordUpdateError(!0)},t.prototype.onBuild=function(){this.capaOpenPGP.subs
|