import{s as o,g as c}from"./mi_ehVgZ.js";import{z as f,Z as l,g as b,al as p,am as d,M as _}from"./BSRAYoh9.js";let s=!1,i=Symbol();function m(e,n,r){const u=r[n]??(r[n]={store:null,source:l(void 0),unsubscribe:f});if(u.store!==e&&!(i in r))if(u.unsubscribe(),u.store=e??null,e==null)u.source.v=void 0,u.unsubscribe=f;else{var t=!0;u.unsubscribe=o(e,a=>{t?u.source.v=a:_(u.source,a)}),t=!1}return e&&i in r?c(e):b(u.source)}function y(){const e={};function n(){p(()=>{for(var r in e)e[r].unsubscribe();d(e,i,{enumerable:!1,value:!0})})}return[e,n]}function M(e,n,r){return e.set(r),n}function N(e){var n=s;try{return s=!1,[e(),s]}finally{s=n}}export{y as a,M as b,N as c,m as s};
