import{a as e}from"./vendor-zustand-XkaRs3NT.js";function t(e){let t=new Set;for(let n of e.values())for(let e of n)t.add(e);return t}var n=e(e=>({workingKeys:new Set,ownerKeys:new Map,setOwnerWorking:(n,r,i)=>e(e=>{let a=new Set(Array.from(r).filter(Boolean)),o=new Map(e.ownerKeys);return i&&a.size>0?o.set(n,a):o.delete(n),{ownerKeys:o,workingKeys:t(o)}}),clearOwner:n=>e(e=>{if(!e.ownerKeys.has(n))return e;let r=new Map(e.ownerKeys);return r.delete(n),{ownerKeys:r,workingKeys:t(r)}})}));export{n as t};