import{n,s as t}from"./index-6e99513e.js";const e=[];function s(s,o=n){let i;const c=new Set;function f(n){if(t(s,n)&&(s=n,i)){const n=!e.length;for(const n of c)n[1](),e.push(n,s);if(n){for(let n=0;n{c.delete(r),0===c.size&&(i(),i=null)}}}}export{s as w};