import{j as r,r as n}from"./index-ukWRVZhT.js";import{u as d}from"./client-hints-D8U-zfYg.js";function x({children:t="Loading"}){const{reducedMotion:e}=d();return e==="reduce"?r.jsx("div",{className:"animate-pulse",children:t}):r.jsxs("div",{className:"flex items-center gap-2 font-mono text-sm font-medium uppercase",role:"status",children:[r.jsx("div",{"aria-hidden":"true",children:r.jsx(u,{})}),t,r.jsx("div",{"aria-hidden":"true",children:r.jsx(u,{})})]})}const o="█<▓█ ▒░/▒░ █░>▒▓/ █▒▒ ▓▒▓/█<░▒ ▓/░>",i=()=>o[Math.floor(Math.random()*o.length)];function u(){const[t,e]=n.useState(o[0]),[s,c]=n.useState(o[1]);return f(()=>{e(i()),c(i())},80),r.jsxs("span",{children:[t,s]})}function f(t,e=1e3){const s=n.useRef();n.useEffect(()=>{s.current=t},[t]),n.useEffect(()=>{function c(){var a;(a=s.current)==null||a.call(s)}if(e!==null){const a=setInterval(c,e);return()=>clearInterval(a)}},[e])}export{x as L};
//# sourceMappingURL=loading-D38hMiHp.js.map
