import{ba as T,az as L,aS as A,B as M,bb as g,ab as w,bc as V,E as I,J as P}from"./M0Oc_jcV.js";function C(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const m=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function D(e){return m.includes(e)}const B={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function W(e){return e=e.toLowerCase(),B[e]??e}const N=["touchstart","touchmove"];function z(e){return N.includes(e)}const i=Symbol("events"),O=new Set,j=new Set;function R(e){if(!P)return;e.removeAttribute("onload"),e.removeAttribute("onerror");const t=e.__e;t!==void 0&&(e.__e=void 0,queueMicrotask(()=>{e.isConnected&&e.dispatchEvent(t)}))}function y(e,t,r,o={}){function n(a){if(o.capture||q.call(t,a),!a.cancelBubble)return A(()=>r==null?void 0:r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?L(()=>{t.addEventListener(e,n,o)}):t.addEventListener(e,n,o),n}function F(e,t,r,o={}){var n=y(t,e,r,o);return()=>{e.removeEventListener(t,n,o)}}function G(e,t,r,o,n){var a={capture:o,passive:n},u=y(e,t,r,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&T(()=>{t.removeEventListener(e,u,a)})}function H(e,t,r){(t[i]??(t[i]={}))[e]=r}function J(e){for(var t=0;t{throw s});throw c}}finally{e[i]=t,delete e.currentTarget,g(k),w(S)}}}export{H as a,O as b,C as c,J as d,G as e,y as f,D as g,q as h,z as i,R as j,W as n,F as o,j as r};