import{c as m,d as y}from"./chunk-ANX7B7LC.js";import{C as o,O as l,f as h,ia as p,la as T,q as n}from"./chunk-PGS4AHIT.js";var f,w=h(()=>{"use strict";T();y();f=class b{static observable(e){return new n(t=>{t.next(e),t.complete()})}static debounce(e,t=300){let r;return function(...s){r&&clearTimeout(r),r=setTimeout(()=>{e.apply(e,s)},t)}}static debouncer(e,t=300){let r,s=[],u=[],c={active:!1,debounce:function(i=t){return function(...d){c.active=!0,r&&clearTimeout(r),r=setTimeout(()=>{let v=e.apply(e,d);b.after(v,()=>{s.forEach(a=>a.apply(a)),u.forEach(a=>a.apply(a)),u=[],c.active=!1})},i)}},after:i=>{s.push(i)},debounced:i=>{if(c.active===!1){i.apply(i);return}u.push(i)}};return c}static promise(){return new Promise((e,t)=>{e()})}static delay(e=0){return new Promise((t,r)=>{setTimeout(()=>{t()},e)})}static after(e,t){if(o(e)){let r=e.subscribe(s=>{r.unsubscribe(),t(s)});return e}return m.isPromise(e)?e.then(r=>t(r)):t(e)}static debounceTimer(e,t=300){return l(t).pipe(p(()=>e()))}}});export{f as a,w as b};
