(()=>{"use strict";var e,s={69129(e,s,i){var n=i(63814),a=i(74692),d=i.n(a),l=i(19051);window.addEventListener("DOMContentLoaded",(()=>{d()("#loglevel").change((function(){d().post((0,n.Jv)("/settings/admin/log/level"),{level:d()(this).val()},(()=>{OC.Log.reload()}))})),d()("#mail_smtpauth").change((function(){this.checked?d()("#mail_credentials").removeClass("hidden"):d()("#mail_credentials").addClass("hidden")})),d()("#mail_smtpmode").change((function(){"smtp"!==d()(this).val()?(d()("#setting_smtpauth").addClass("hidden"),d()("#setting_smtphost").addClass("hidden"),d()("#mail_smtpsecure_label").addClass("hidden"),d()("#mail_smtpsecure").addClass("hidden"),d()("#mail_credentials").addClass("hidden"),d()("#mail_sendmailmode_label, #mail_sendmailmode").removeClass("hidden")):(d()("#setting_smtpauth").removeClass("hidden"),d()("#setting_smtphost").removeClass("hidden"),d()("#mail_smtpsecure_label").removeClass("hidden"),d()("#mail_smtpsecure").removeClass("hidden"),d()("#mail_smtpauth").is(":checked")&&d()("#mail_credentials").removeClass("hidden"),d()("#mail_sendmailmode_label, #mail_sendmailmode").addClass("hidden"))}));const e=function(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),l.Ay.post((0,n.Jv)("/settings/admin/mailsettings"),d()("#mail_general_settings_form").serialize()).then((()=>{OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))})).catch((e=>{OC.msg.finishedError("#mail_settings_msg",e)})))},s=function(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(s):(OC.msg.startSaving("#mail_settings_msg"),l.Ay.post((0,n.Jv)("/settings/admin/mailsettings/credentials"),d()("#mail_credentials_settings").serialize()).then((()=>{OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))})).catch((e=>{OC.msg.finishedError("#mail_settings_msg",e)})))};d()("#mail_general_settings_form").change(e),d()("#mail_credentials_settings_submit").click(s),d()("#mail_smtppassword").click((()=>{"text"===(void 0).type&&"********"===(void 0).value&&((void 0).type="password",(void 0).value="")})),d()("#sendtestemail").click((e=>{e.preventDefault(),OC.msg.startAction("#sendtestmail_msg",t("settings","Sending…")),l.Ay.post((0,n.Jv)("/settings/admin/mailtest")).then((()=>{OC.msg.finishedSuccess("#sendtestmail_msg",t("settings","Email sent"))})).catch((e=>{OC.msg.finishedError("#sendtestmail_msg",e.response.data)}))})),null!==document.getElementById("security-warning")&&d().when(OC.SetupChecks.checkSetup()).then((e=>{const s=d()("#postsetupchecks");d()("#security-warning-state-loading").addClass("hidden");const i=s.find(".errors"),t=s.find(".warnings"),n=s.find(".info");for(let s=0;s<e.length;s++)switch(e[s].type){case OC.SetupChecks.MESSAGE_TYPE_INFO:n.append("<li>"+e[s].msg+"</li>");break;case OC.SetupChecks.MESSAGE_TYPE_WARNING:t.append("<li>"+e[s].msg+"</li>");break;case OC.SetupChecks.MESSAGE_TYPE_ERROR:default:i.append("<li>"+e[s].msg+"</li>")}let a=!1,l=!1;i.find("li").length>0&&(i.removeClass("hidden"),a=!0),t.find("li").length>0&&(t.removeClass("hidden"),l=!0),n.find("li").length>0&&n.removeClass("hidden"),a||l?(d()("#postsetupchecks-hint").removeClass("hidden"),a?d()("#security-warning-state-failure").removeClass("hidden"):d()("#security-warning-state-warning").removeClass("hidden")):d()("#security-warning-state-ok").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 d=1/0;for(m=0;m<e.length;m++){for(var[i,t,a]=e[m],l=!0,r=0;r<i.length;r++)(!1&a||d>=a)&&Object.keys(n.O).every((e=>n.O[e](i[r])))?i.splice(r--,1):(l=!1,a<d&&(d=a));if(l){e.splice(m--,1);var o=t();void 0!==o&&(s=o)}}return s}a=a||0;for(var m=e.length;m>0&&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.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="undefined"!=typeof document&&document.baseURI||self.location.href;var e={6010:0};n.O.j=s=>0===e[s];var s=(s,i)=>{var t,a,[d,l,r]=i,o=0;if(d.some((s=>0!==e[s]))){for(t in l)n.o(l,t)&&(n.m[t]=l[t]);if(r)var m=r(n)}for(s&&s(i);o<d.length;o++)a=d[o],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(m)},i=globalThis.webpackChunknextcloud=globalThis.webpackChunknextcloud||[];i.forEach(s.bind(null,0)),i.push=s.bind(null,i.push.bind(i))})(),n.nc=void 0;var a=n.O(void 0,[4208],(()=>n(69129)));a=n.O(a)})();
//# sourceMappingURL=settings-legacy-admin.js.map?v=efdda7378bab4dc8f362