import{ref as d,watch as h,onUnmounted as m}from"vue";import i from"../../_util/raf.mjs";function b(l,r,g,w){const n=new Map,a=new Map,c=d(Symbol("update"));h(l,()=>{c.value=Symbol("update")});let f;function s(){i.cancel(f)}function u(){s(),f=i(()=>{n.forEach((t,e)=>{if(t&&t.offsetParent){const{offsetHeight:o}=t;a.get(e)!==o&&(c.value=Symbol("update"),a.set(e,t.offsetHeight))}})})}function p(t,e){const o=r(t);n.get(o),e?(n.set(o,e.$el||e),u()):n.delete(o)}return m(()=>{s()}),[p,u,a,c]}export{b as default};
