function e(e,n,s){const c=function(e,n){if(n.includes(":"))return n;if(e instanceof Window)return n;const s=e.nodeName.toLocaleLowerCase(),c=s.match(t);return`${null!=c?c[1]:s}:${n}`}(e,n),i=new CustomEvent(c,{detail:s,bubbles:!0,composed:!0});return e.dispatchEvent(i),i}const t=/^(cc-.+?)-beta$/;class n{constructor(e,t,n){this._element=e,this._event=t,this._handler=n,this._connected=!1}connect(){!this._connected&&this._castHandler(this._handler)&&(this._element.addEventListener(this._event,this._handler),this._connected=!0)}disconnect(){this._connected&&this._castHandler(this._handler)&&(this._element.removeEventListener(this._event,this._handler),this._connected=!1)}_castHandler(e){return!0}}export{n as EventHandler,e as dispatchCustomEvent};
//# sourceMappingURL=events.js.map
