import{i as e}from"./index-7yDgay5u.js";var t=`islet:theme-preference-change`;function n(){let t=e.schema.safeParse(localStorage.getItem(e.key));return t.success?t.data:e.defaultValue}function r(){let e=n();return e===`auto`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e}function i(e){document.documentElement.dataset.theme=e}function a(){i(r())}function o(){a(),window.dispatchEvent(new Event(t))}export{t as a,i,r as n,a as r,o as t};
//# sourceMappingURL=initializeTheme-CWLBIjiT.js.map