2 lines
3.1 KiB
JavaScript
2 lines
3.1 KiB
JavaScript
import{aG as A,aY as w,aX as y,a$ as m,a4 as L,Q as q,bd as V,D as x,as as p,b as I,be as M}from"./DScGFiBY.js";function G(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const N=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function X(e){return N.includes(e)}const P={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 F(e){return e=e.toLowerCase(),P[e]??e}const D=["touchstart","touchmove"];function Q(e){return D.includes(e)}const O=["textarea","script","style","title"];function U(e){return O.includes(e)}const c=Symbol("events"),W=new Set,j=new Set;function Y(e){if(!x)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 z(e,t,r,n={}){function u(a){if(n.capture||B.call(t,a),!a.cancelBubble)return V(()=>r==null?void 0:r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?q(()=>{t.addEventListener(e,u,n)}):t.addEventListener(e,u,n),u}function $(e,t,r,n={}){var u=z(t,e,r,n);return()=>{e.removeEventListener(t,u,n)}}function H(e,t,r){(t[c]??(t[c]={}))[e]=r}function J(e){for(var t=0;t<e.length;t++)W.add(e[t]);for(var r of j)r(e)}let k=null;function B(e){var v,E;var t=this,r=t.ownerDocument,n=e.type,u=((v=e.composedPath)==null?void 0:v.call(e))||[],a=u[0]||e.target;k=e;var f=0,s=k===e&&e[c];if(s){var o=u.indexOf(s);if(o!==-1&&(t===document||t===window)){e[c]=t;return}var i=u.indexOf(t);if(i===-1)return;o<=i&&(f=o)}if(a=u[f]||e.target,a!==t){A(e,"currentTarget",{configurable:!0,get(){return a||r}});var S=m,T=L;w(null),y(null);try{for(var d,h=[];a!==null;){var _=a.assignedSlot||a.parentNode||a.host||null;try{var g=(E=a[c])==null?void 0:E[n];g!=null&&(!a.disabled||e.target===a)&&g.call(a,e)}catch(b){d?h.push(b):d=b}if(e.cancelBubble||_===t||_===null)break;a=_}if(d){for(let b of h)queueMicrotask(()=>{throw b});throw d}}finally{e[c]=t,delete e.currentTarget,w(S),y(T)}}}function C(e,t,r){if(e==null)return t(void 0),p;const n=I(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}const l=[];function K(e,t=p){let r=null;const n=new Set;function u(s){if(M(e,s)&&(e=s,r)){const o=!l.length;for(const i of n)i[1](),l.push(i,e);if(o){for(let i=0;i<l.length;i+=2)l[i][0](l[i+1]);l.length=0}}}function a(s){u(s(e))}function f(s,o=p){const i=[s,o];return n.add(i),n.size===1&&(r=t(u,a)||p),s(e),()=>{n.delete(i),n.size===0&&r&&(r(),r=null)}}return{set:u,update:a,subscribe:f}}function Z(e){let t;return C(e,r=>t=r)(),t}export{W as a,Q as b,G as c,H as d,J as e,z as f,Z as g,B as h,U as i,X as j,Y as k,F as n,$ as o,j as r,C as s,K as w};
|