(function(){try{var g=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};g["__faroBundleId_Speechify Chrome Extension"]="13.4.1"}catch(l){}})();
import{v as u}from"./chunk-XMRXO6YU.js";import{g as E}from"./chunk-ODCFEFOB.js";import{d as l,g as a,n as s}from"./chunk-CLPINNGF.js";s();a();var c=l(E());var L=(m,d,b)=>{let e=u({events:["mutationDetected"]}),n=[],v=(0,c.default)(()=>{e.emit("mutationDetected",{mutations:[...n]}),n.length=0},200,{maxWait:500}),i=new MutationObserver(t=>{n.push(...t),v()});i.observe(m,d);let o=new AbortController;return b.addEventListener("abort",()=>{o.abort()}),{onMutation:t=>e.on("mutationDetected",r=>{t(r.mutations)}),waitForMutation:()=>new Promise(t=>{let r=e.once("mutationDetected",M=>{t(M.mutations)});o.signal.addEventListener("abort",()=>{r(),t([])})}),cleanup:()=>{i.disconnect(),o.abort(),e.removeAllListeners()}}};export{L as a};
//# sourceMappingURL=chunk-UJD7WEL5.js.map
