index.08e660c8.js 1.1 KB

1
  1. import{R as w,ba as g,Z as y,b8 as c,bb as O,bc as b}from"./index.332c7f08.js";var p;const u=typeof window!="undefined",A=t=>typeof t=="string",j=()=>{};u&&((p=window==null?void 0:window.navigator)==null?void 0:p.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function v(t){return O()?(b(t),!0):!1}function P(t,e=1e3,r={}){const{immediate:s=!0,immediateCallback:o=!1}=r;let n=null;const a=w(!1);function l(){n&&(clearInterval(n),n=null)}function f(){a.value=!1,l()}function i(){c(e)<=0||(a.value=!0,o&&t(),l(),n=setInterval(t,c(e)))}if(s&&u&&i(),g(e)){const _=y(e,()=>{a.value&&u&&i()});v(_)}return v(f),{isActive:a,pause:f,resume:i}}var I=Object.defineProperty,d=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,m=(t,e,r)=>e in t?I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,h=(t,e)=>{for(var r in e||(e={}))S.call(e,r)&&m(t,r,e[r]);if(d)for(var r of d(e))$.call(e,r)&&m(t,r,e[r]);return t};function x(t=1e3,e={}){const{controls:r=!1,immediate:s=!0}=e,o=w(0),n=P(()=>o.value+=1,t,{immediate:s});return r?h({counter:o},n):o}export{u as a,P as b,A as i,j as n,v as t,x as u};