(()=>{"use strict";var e,s={69129:(e,s,i)=>{var n=i(63814),a=i(74692),r=i.n(a);window.addEventListener("DOMContentLoaded",(()=>{r()("#loglevel").change((function(){r().post((0,n.Jv)("/settings/admin/log/level"),{level:r()(this).val()},(()=>{OC.Log.reload()}))})),r()("#mail_smtpauth").change((function(){this.checked?r()("#mail_credentials").removeClass("hidden"):r()("#mail_credentials").addClass("hidden")})),r()("#mail_smtpmode").change((function(){"smtp"!==r()(this).val()?(r()("#setting_smtpauth").addClass("hidden"),r()("#setting_smtphost").addClass("hidden"),r()("#mail_smtpsecure_label").addClass("hidden"),r()("#mail_smtpsecure").addClass("hidden"),r()("#mail_credentials").addClass("hidden"),r()("#mail_sendmailmode_label, #mail_sendmailmode").removeClass("hidden")):(r()("#setting_smtpauth").removeClass("hidden"),r()("#setting_smtphost").removeClass("hidden"),r()("#mail_smtpsecure_label").removeClass("hidden"),r()("#mail_smtpsecure").removeClass("hidden"),r()("#mail_smtpauth").is(":checked")&&r()("#mail_credentials").removeClass("hidden"),r()("#mail_sendmailmode_label, #mail_sendmailmode").addClass("hidden"))}));const e=function(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),r().ajax({url:(0,n.Jv)("/settings/admin/mailsettings"),type:"POST",data:r()("#mail_general_settings_form").serialize(),success:()=>{OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:e=>{OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))},s=function(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(s):(OC.msg.startSaving("#mail_settings_msg"),r().ajax({url:(0,n.Jv)("/settings/admin/mailsettings/credentials"),type:"POST",data:r()("#mail_credentials_settings").serialize(),success:()=>{OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:e=>{OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))};r()("#mail_general_settings_form").change(e),r()("#mail_credentials_settings_submit").click(s),r()("#mail_smtppassword").click((()=>{"text"===(void 0).type&&"********"===(void 0).value&&((void 0).type="password",(void 0).value="")})),r()("#sendtestemail").click((e=>{e.preventDefault(),OC.msg.startAction("#sendtestmail_msg",t("settings","Sending…")),r().ajax({url:(0,n.Jv)("/settings/admin/mailtest"),type:"POST",success:()=>{OC.msg.finishedSuccess("#sendtestmail_msg",t("settings","Email sent"))},error:e=>{OC.msg.finishedError("#sendtestmail_msg",e.responseJSON)}})})),null!==document.getElementById("security-warning")&&r().when(OC.SetupChecks.checkSetup()).then((e=>{const s=r()("#postsetupchecks");r()("#security-warning-state-loading").addClass("hidden");let i=!1;const t=s.find(".errors"),n=s.find(".warnings"),a=s.find(".info");for(let s=0;s"+e[s].msg+"");break;case OC.SetupChecks.MESSAGE_TYPE_WARNING:n.append("
  • "+e[s].msg+"
  • ");break;case OC.SetupChecks.MESSAGE_TYPE_ERROR:default:t.append("
  • "+e[s].msg+"
  • ")}t.find("li").length>0&&(t.removeClass("hidden"),i=!0),n.find("li").length>0&&(n.removeClass("hidden"),i=!0),a.find("li").length>0&&(a.removeClass("hidden"),i=!0),i?(r()("#postsetupchecks-hint").removeClass("hidden"),t.find("li").length>0?r()("#security-warning-state-failure").removeClass("hidden"):r()("#security-warning-state-warning").removeClass("hidden")):0===r()("#security-warning").children("ul").children().length?r()("#security-warning-state-ok").removeClass("hidden"):r()("#security-warning-state-failure").removeClass("hidden")}))}))}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={id:e,loaded:!1,exports:{}};return s[e].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.m=s,e=[],n.O=(s,i,t,a)=>{if(!i){var r=1/0;for(m=0;m=a)&&Object.keys(n.O).every((e=>n.O[e](i[d])))?i.splice(d--,1):(l=!1,a0&&e[m-1][2]>a;m--)e[m]=e[m-1];e[m]=[i,t,a]},n.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return n.d(s,{a:s}),s},n.d=(e,s)=>{for(var i in s)n.o(s,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},n.e=()=>Promise.resolve(),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=6010,(()=>{n.b=document.baseURI||self.location.href;var e={6010:0};n.O.j=s=>0===e[s];var s=(s,i)=>{var t,a,r=i[0],l=i[1],d=i[2],o=0;if(r.some((s=>0!==e[s]))){for(t in l)n.o(l,t)&&(n.m[t]=l[t]);if(d)var m=d(n)}for(s&&s(i);on(69129)));a=n.O(a)})(); //# sourceMappingURL=settings-legacy-admin.js.map?v=3fec162d4eef8368be56