2 lines
2.3 KiB
JavaScript
2 lines
2.3 KiB
JavaScript
import{aj as m,Y as E,ak as k,al as S,am as _,an as b,ao as T,a8 as L}from"./template.CyUWgh-J.js";const i=Symbol("events"),V=new Set,A=new Set;function I(e,t,n,o={}){function r(a){if(o.capture||M.call(t,a),!a.cancelBubble)return k(()=>n?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?E(()=>{t.addEventListener(e,r,o)}):t.addEventListener(e,r,o),r}function x(e,t,n,o,r){var a={capture:o,passive:r},u=I(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&m(()=>{t.removeEventListener(e,u,a)})}function B(e,t,n){(t[i]??={})[e]=n}function D(e){for(var t=0;t<e.length;t++)V.add(e[t]);for(var n of A)n(e)}let g=null;function M(e){var t=this,n=t.ownerDocument,o=e.type,r=e.composedPath?.()||[],a=r[0]||e.target;g=e;var u=0,f=g===e&&e[i];if(f){var s=r.indexOf(f);if(s!==-1&&(t===document||t===window)){e[i]=t;return}var p=r.indexOf(t);if(p===-1)return;s<=p&&(u=s)}if(a=r[u]||e.target,a!==t){S(e,"currentTarget",{configurable:!0,get(){return a||n}});var w=T,y=L;_(null),b(null);try{for(var c,v=[];a!==null;){var d=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[i]?.[o];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(l){c?v.push(l):c=l}if(e.cancelBubble||d===t||d===null)break;a=d}if(c){for(let l of v)queueMicrotask(()=>{throw l});throw c}}finally{e[i]=t,delete e.currentTarget,_(w),b(y)}}}function W(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const P=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function q(e){return P.includes(e)}const N={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 C(e){return e=e.toLowerCase(),N[e]??e}const O=["touchstart","touchmove"];function R(e){return O.includes(e)}export{B as a,V as b,W as c,D as d,x as e,I as f,q as g,M as h,R as i,C as n,A as r};
|