"use strict";(()=>{{const t="cf-theme-dark",e="cf-theme-light",o="cf-theme",n="cf-theme-toggle-button",a=o=>[...document.getElementsByClassName(n)].forEach(n=>{n.classList.remove("dark"===o?e:t),n.classList.add("dark"===o?t:e)}),l=()=>{const t=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.appendChild(document.createTextNode("* { \n\t\t\ttransition-property: color, background-color, border-color, text-decoration-color, fill, stroke !important;\n\t\t\ttransition-timing-function: ease-in-out !important;\n\t\t\ttransition-duration: 300ms !important;\n\t\t}")),t.appendChild(e),setTimeout(()=>e.remove(),300)},s=()=>{const o=document.querySelector("html");null!=o&&o.classList.contains(t)&&[...document.getElementsByClassName(n)].forEach(o=>{o.classList.remove(t),o.classList.add(e)})};document.addEventListener("DOMContentLoaded",()=>{null!==localStorage.getItem(o)?"dark"===localStorage.getItem(o)?a("light"):a("dark"):s(),[...document.getElementsByClassName(n)].forEach(n=>n.addEventListener("click",n=>{var s,c,r;n.preventDefault(),n.stopPropagation(),l();const i=null==(s=document.getElementsByTagName("html"))?void 0:s[0];null==(c=null==i?void 0:i.classList)||c.toggle(t),null==(r=null==i?void 0:i.classList)||r.toggle(e),a(null!=i&&i.classList.contains(t)?"light":"dark"),localStorage.setItem(o,null!=i&&i.classList.contains(t)?"dark":"light")}))})}})();