import{S as l,T as s,U as y,z as E,V as k,W as S,X as V}from"./DkzsT1tV.js";function B(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const A=["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(t){return A.includes(t)}const L={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 R(t){return t=t.toLowerCase(),L[t]??t}const x=["touchstart","touchmove"];function j(t){return x.includes(t)}const I=["textarea","script","style","title"];function q(t){return I.includes(t)}function N(t){var e=y,a=E;l(null),s(null);try{return t()}finally{l(e),s(a)}}const P=new Set,W=new Set;function z(t,e,a,i={}){function o(r){if(i.capture||M.call(e,r),!r.cancelBubble)return N(()=>a==null?void 0:a.call(this,r))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?V(()=>{e.addEventListener(t,o,i)}):e.addEventListener(t,o,i),o}function C(t){for(var e=0;e<t.length;e++)P.add(t[e]);for(var a of W)a(t)}function M(t){var b;var e=this,a=e.ownerDocument,i=t.type,o=((b=t.composedPath)==null?void 0:b.call(t))||[],r=o[0]||t.target,p=0,_=t.__root;if(_){var f=o.indexOf(_);if(f!==-1&&(e===document||e===window)){t.__root=e;return}var v=o.indexOf(e);if(v===-1)return;f<=v&&(p=f)}if(r=o[p]||t.target,r!==e){k(t,"currentTarget",{configurable:!0,get(){return r||a}});var w=y,g=E;l(null),s(null);try{for(var u,h=[];r!==null;){var d=r.assignedSlot||r.parentNode||r.host||null;try{var c=r["__"+i];if(c!=null&&(!r.disabled||t.target===r))if(S(c)){var[m,...T]=c;m.apply(r,[t,...T])}else c.call(r,t)}catch(n){u?h.push(n):u=n}if(t.cancelBubble||d===e||d===null)break;r=d}if(u){for(let n of h)queueMicrotask(()=>{throw n});throw u}}finally{t.__root=e,delete t.currentTarget,l(w),s(g)}}}export{P as a,q as b,B as c,z as d,C as e,D as f,M as h,j as i,R as n,W as r};
