import{r as u}from"./normalize-props-D7NI5JRu.js";function a(t,r){if(!t)return;const{attributes:s,callback:c}=r,n=t.ownerDocument.defaultView||window,e=new n.MutationObserver(i=>{for(const o of i)o.type==="attributes"&&o.attributeName&&s.includes(o.attributeName)&&c(o)});return e.observe(t,{attributes:!0,attributeFilter:s}),()=>e.disconnect()}function l(t,r){const{defer:s}=r,c=s?u:e=>e(),n=[];return n.push(c(()=>{const e=typeof t=="function"?t():t;n.push(a(e,r))})),()=>{n.forEach(e=>e?.())}}function f(t,r){const{callback:s}=r;if(!t)return;const c=t.ownerDocument.defaultView||window,n=new c.MutationObserver(s);return n.observe(t,{childList:!0,subtree:!0}),()=>n.disconnect()}function w(t,r){const{defer:s}=r,c=s?u:e=>e(),n=[];return n.push(c(()=>{const e=typeof t=="function"?t():t;n.push(f(e,r))})),()=>{n.forEach(e=>e?.())}}export{w as a,l as o};
