import{o as e,t}from"./chunk.DuxOD-Sk.js";import{r as n}from"./emotion-is-prop-valid.esm.DV_OErv-.js";var r=t(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),i=t(((e,t)=>{var n=r();function i(){}function a(){}a.resetWarningCache=i,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return r.PropTypes=r,r}})),a=t(((e,t)=>{t.exports=i()()})),o=e(n(),1);function s(e,t,n={}){let r=(0,o.useRef)(null),i=(0,o.useRef)(e),a=(0,o.useRef)(t),{autoStart:s=!0}=n;(0,o.useEffect)(()=>{i.current=e},[e]),(0,o.useEffect)(()=>{a.current=t},[t]);let c=(0,o.useCallback)(()=>{r.current&&=(clearTimeout(r.current),null)},[]),l=(0,o.useCallback)(e=>{c();let t=e===void 0?a.current:e;t!==null&&(r.current=setTimeout(()=>{i.current()},t))},[c]);return(0,o.useEffect)(()=>{if(s)return l(),c},[s,t,l,c]),(0,o.useEffect)(()=>c,[c]),{clear:c,restart:(0,o.useCallback)(e=>{l(e)},[l])}}export{a as n,s as t};