import{s as f,g as c}from"./DlMEEVHd.js";import{$ as a,ak as l,m as b,Y as _,aD as d,v as p}from"./7RXv2Ffc.js";let t=!1,u=Symbol();function y(e,s,r){const n=r[s]??={store:null,source:l(void 0),unsubscribe:a};if(n.store!==e&&!(u in r))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=a;else{var i=!0;n.unsubscribe=f(e,o=>{i?n.source.v=o:p(n.source,o)}),i=!1}return e&&u in r?c(e):b(n.source)}function m(e,s){return e.set(s),s}function D(e,s){var r=e[s];r.store!==null&&m(r.store,r.source.v)}function N(){const e={};function s(){_(()=>{for(var r in e)e[r].unsubscribe();d(e,u,{enumerable:!1,value:!0})})}return[e,s]}function S(e,s,r){return e.set(r),s}function U(e){var s=t;try{return t=!1,[e(),t]}finally{t=s}}export{N as a,m as b,S as c,U as d,D as i,y as s};
