import{kt as e}from"./BA99CCI5.js";import"./D7pSEO6W.js";function t(){let t=`dark`;t=localStorage.getItem(`theme`)||(globalThis.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`);let{subscribe:n,update:r}=e(t);i(t);function i(e){document.startViewTransition?document.startViewTransition(()=>{document.documentElement.classList.remove(`light`,`dark`),document.documentElement.classList.add(e)}):(document.documentElement.classList.remove(`light`,`dark`),document.documentElement.classList.add(e))}function a(){r(e=>{let t=e===`light`?`dark`:`light`;return i(t),localStorage.setItem(`theme`,t),t})}return{subscribe:n,toggle:a}}var n=t();export{n as t};