import{E as e,G as t}from"./vue-vendor-DMUmTARL.js";import{dt as n,nt as r}from"./index-kSn5YXd0.js";var i=r({emitAuto:!0,modes:{dark:`dark`,light:``}}),a=n(),o=e(()=>i.value===`auto`?a.value:i.value===`dark`);function s(e,n){if(!(typeof document.startViewTransition==`function`&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)){n();return}let r=e?.clientX??innerWidth/2,i=e?.clientY??innerHeight/2,a=Math.hypot(Math.max(r,innerWidth-r),Math.max(i,innerHeight-i));document.startViewTransition(async()=>{n(),await t()}).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${r}px ${i}px)`,`circle(${a}px at ${r}px ${i}px)`]},{duration:400,easing:`ease-in-out`,pseudoElement:`::view-transition-new(root)`})})}function c(e,t){i.value!==e&&s(t,()=>{i.value=e})}function l(e){s(e,()=>{i.value=o.value?`light`:`dark`})}function u(e){l(e)}var d=[`light`,`dark`,`auto`];function f(e){let t=d[(d.indexOf(i.value)+1)%d.length];s(e,()=>{i.value=t})}var p=()=>({isDark:o,colorMode:i,setColorMode:c,toggleDark:l,toggleDarkTransition:u,cycleColorMode:f});export{p as t};