(()=>{function t(){var t=null!==localStorage.getItem("darkSwitch")&&"dark"===localStorage.getItem("darkSwitch");e.checked=t,t?document.body.setAttribute("data-theme","dark"):document.body.removeAttribute("data-theme")}var e=document.getElementById("darkSwitch");t(),window.addEventListener("load",(function(){e&&(t(),e.addEventListener("change",(function(){e.checked?(document.body.setAttribute("data-theme","dark"),localStorage.setItem("darkSwitch","dark")):(document.body.removeAttribute("data-theme"),localStorage.removeItem("darkSwitch"))})))})),$(document).ready((function(){$(".table-container tr").on("click",(function(){$("#"+$(this).data("display")).toggle()})),$("#table-log").DataTable({order:[$("#table-log").data("orderingIndex"),"desc"],stateSave:!0,stateSaveCallback:function(t,e){window.localStorage.setItem("datatable",JSON.stringify(e))},stateLoadCallback:function(t){var e=JSON.parse(window.localStorage.getItem("datatable"));return e&&(e.start=0),e}}),$(document).on("click","#delete-log, #clean-log, #delete-all-log",(function(){return confirm("Are you sure?")}))}))})();