import{Kt as e,zt as t}from"./icon-K_9KhGme.js";import{n}from"./numbers-CkQhF5C4.js";import"./css-B9Va6QAv.js";/* empty css             */var r=function(){return e.Date.now()},i=`Expected a function`,a=Math.max,o=Math.min;function s(e,s,c){var l,u,d,f,p,m,h=0,g=!1,_=!1,v=!0;if(typeof e!=`function`)throw TypeError(i);s=n(s)||0,t(c)&&(g=!!c.leading,_=`maxWait`in c,d=_?a(n(c.maxWait)||0,s):d,v=`trailing`in c?!!c.trailing:v);function y(t){var n=l,r=u;return l=u=void 0,h=t,f=e.apply(r,n),f}function b(e){return h=e,p=setTimeout(C,s),g?y(e):f}function x(e){var t=e-m,n=e-h,r=s-t;return _?o(r,d-n):r}function S(e){var t=e-m,n=e-h;return m===void 0||t>=s||t<0||_&&n>=d}function C(){var e=r();if(S(e))return w(e);p=setTimeout(C,x(e))}function w(e){return p=void 0,v&&l?y(e):(l=u=void 0,f)}function T(){p!==void 0&&clearTimeout(p),h=0,l=m=u=p=void 0}function E(){return p===void 0?f:w(r())}function D(){var e=r(),t=S(e);if(l=arguments,u=this,m=e,t){if(p===void 0)return b(m);if(_)return clearTimeout(p),p=setTimeout(C,s),y(m)}return p===void 0&&(p=setTimeout(C,s)),f}return D.cancel=T,D.flush=E,D}export{s as t};