p-21891ead.js 731 B

1234
  1. /*!
  2. * (C) Ionic http://ionicframework.com - MIT License
  3. */
  4. import{w as t}from"./p-66a5d6a8.js";import{h as o,a as e,b as n}from"./p-89b61afc.js";import{createGesture as r}from"./p-8ededb41.js";const a=(a,s)=>{let d,i;const c=(t,o,e)=>{if("undefined"==typeof document)return;const n=document.elementFromPoint(t,o);n&&s(n)&&!n.disabled?n!==d&&(f(),m(n,e)):f()},m=(o,e)=>{d=o,i||(i=d);const n=d;t((()=>n.classList.add("ion-activated"))),e()},f=(o=!1)=>{if(!d)return;const e=d;t((()=>e.classList.remove("ion-activated"))),o&&i!==d&&d.click(),d=void 0};return r({el:a,gestureName:"buttonActiveDrag",threshold:0,onStart:t=>c(t.currentX,t.currentY,e),onMove:t=>c(t.currentX,t.currentY,n),onEnd:()=>{f(!0),o(),i=void 0}})};export{a as c}