import{u as c,v as p}from"./a9_IrBSG.js";const e=[];function h(n,b=c){let i=null;const o=new Set;function r(t){if(p(n,t)&&(n=t,i)){const u=!e.length;for(const s of o)s[1](),e.push(s,n);if(u){for(let s=0;s{o.delete(s),o.size===0&&i&&(i(),i=null)}}return{set:r,update:f,subscribe:l}}export{h as w};