"use strict";var e=require("../internal-state.cjs");exports.delegateEvent=t=>{e.delegatedEvents.has(t)||(document.addEventListener(t,(t=>{for(var a=t.target,r=e.handlers.get(t.target);a&&(!r||!r.some((e=>e.eventName==t.type)));a=a.parentNode,r=e.handlers.get(a));return(r||[]).filter((e=>e.handler&&e.eventName==t.type)).map((e=>e.handler(t,a)||!0)).reduce(((e,t)=>e&&t),!0)}),{capture:!0}),e.delegatedEvents.add(t))};
//# sourceMappingURL=event-delegation.cjs.map
