(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b53e5bea-4f46-4f26-8ca7-4e989196b9f1",e._sentryDebugIdIdentifier="sentry-dbid-b53e5bea-4f46-4f26-8ca7-4e989196b9f1")}catch{}})();const c=(e,t)=>{const s=e.storage||sessionStorage,a=e.key||t.$id;if(e.paths){const r=e.paths.reduce((n,o)=>(n[o]=t.$state[o],n),{});s.setItem(a,JSON.stringify(r))}else s.setItem(a,JSON.stringify(t.$state))};var u=({options:e,store:t})=>{var s,a,r,n;if((s=e.persist)!=null&&s.enabled){const o=[{key:t.$id,storage:sessionStorage}],d=(r=(a=e.persist)==null?void 0:a.strategies)!=null&&r.length?(n=e.persist)==null?void 0:n.strategies:o;d.forEach(i=>{const l=i.storage||sessionStorage,g=i.key||t.$id,f=l.getItem(g);f&&(t.$patch(JSON.parse(f)),c(i,t))}),t.$subscribe(()=>{d.forEach(i=>{c(i,t)})})}};export{u as i};
