import{o as e}from"./rolldown-runtime-C_s2cVnS.js";import{h as t,n}from"./vendor-react-nmZsNlRz.js";var r=n(),i=e(t(),1),a=e=>typeof window<`u`&&!!window.matchMedia&&window.matchMedia(e).matches,o=()=>a(`(prefers-reduced-motion: reduce)`);function s(e){let t=(0,r.c)(5),n;t[0]===e?n=t[1]:(n=()=>a(e),t[0]=e,t[1]=n);let[o,s]=(0,i.useState)(n),c,l;return t[2]===e?(c=t[3],l=t[4]):(c=()=>{if(typeof window>`u`||!window.matchMedia)return;let t=window.matchMedia(e),n=()=>s(t.matches);return s(t.matches),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)},l=[e],t[2]=e,t[3]=c,t[4]=l),(0,i.useEffect)(c,l),o}export{o as n,s as r,a as t};