!function(){if(null==document.cookie.match(/(^| )txAdmin-darkMode=([^;]+)/))if(console.log("no theme cookie found"),window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)console.log("OS dark mode detected"),document.body.classList.toggle("theme--dark"),document.cookie="txAdmin-darkMode=true;path=/";else if("/"==window.location.pathname){const e=1728e5;if(null===document.cookie.match(/(^| )txAdmin-darkModeSuggestion=([^;]+)/)){const t=new Date;t.setTime(t.getTime()+e);const o=document.getElementById("darkToggleArea"),n=new coreui.Tooltip(o,{container:"body",boundary:"window",offset:function(e){return[0,e.popper.height/3]}});setTimeout((()=>{n.show(),document.cookie=`txAdmin-darkModeSuggestion=true;expires=${t.toUTCString()};path=/`}),2e3)}}const e="d-none";var t=document.body.classList.contains("theme--dark");const o=document.getElementById("darkToggleDark"),n=document.getElementById("darkToggleLight");o.classList.toggle(e,t),n.classList.toggle(e,!t);const d=function(){document.body.classList.toggle("theme--dark"),o.classList.toggle(e),n.classList.toggle(e),t=!t,document.cookie=`txAdmin-darkMode=${t};path=/`};o.addEventListener("click",d),n.addEventListener("click",d)}();