try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`648c415d-301f-4b79-9e8b-a3c1619f5008`,e._sentryDebugIdIdentifier=`sentry-dbid-648c415d-301f-4b79-9e8b-a3c1619f5008`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,Sf as n,i as r,jg as i}from"./entry.client-mpghtlrl.js";var a=t(),o=e(i(),1),s=1e4,c=1e3;function l(e){if(!e)return null;let t=e.isTimerActive?Math.max(0,n(Date.now()-e.remainingTimeLastUpdatedTimestampMs)):0;return Math.max(0,e.remainingTimeInSeconds-t)}function u(e,t){let n=l(t);return{remainingTimeInSeconds:n,remainingTimeInMinutes:n===null?null:Math.ceil(n/60)}}function d(e){let t=(0,a.c)(5),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={remainingTimeInSeconds:null,remainingTimeInMinutes:null},t[0]=n):n=t[0];let[i,l]=(0,o.useReducer)(u,n),d;t[1]===e?d=t[2]:(d=()=>{l(e)},t[1]=e,t[2]=d);let f=d,p;t[3]===f?p=t[4]:(p=[f],t[3]=f,t[4]=p),(0,o.useEffect)(f,p);let m=null;return e?.isTimerActive&&i.remainingTimeInSeconds&&(m=i.remainingTimeInSeconds<60?c:s),r(f,m),i}export{d as n,l as t};