-
Notifications
You must be signed in to change notification settings - Fork 0
/
2315-es2015.c13c410703d3c3866c57.js
1 lines (1 loc) · 1.87 KB
/
2315-es2015.c13c410703d3c3866c57.js
1
(self.webpackChunkv2x_frontend=self.webpackChunkv2x_frontend||[]).push([[2315],{2315:function(e,t,n){"use strict";n.r(t),n.d(t,{startTapClick:function(){return s}});var o=n(1444);const s=e=>{let t,n,s,f=10*-l,v=0;const p=e.getBoolean("animated",!0)&&e.getBoolean("rippleEffect",!0),h=new WeakMap,m=e=>{f=(0,o.u)(e),E(e)},L=()=>{s&&clearTimeout(s),s=void 0,t&&(g(!1),t=void 0)},w=e=>{t||b(i(e),e)},E=e=>{b(void 0,e)},b=(e,n)=>{if(e&&e===t)return;s&&clearTimeout(s),s=void 0;const{x:i,y:r}=(0,o.p)(n);if(t){if(h.has(t))throw new Error("internal error");t.classList.contains(c)||k(t,i,r),g(!0)}if(e){const t=h.get(e);t&&(clearTimeout(t),h.delete(e)),e.classList.remove(c);const n=()=>{k(e,i,r),s=void 0};a(e)?n():s=setTimeout(n,d)}t=e},k=(e,t,o)=>{if(v=Date.now(),e.classList.add(c),!p)return;const s=r(e);null!==s&&(T(),n=s.addRipple(t,o))},T=()=>{void 0!==n&&(n.then(e=>e()),n=void 0)},g=e=>{T();const n=t;if(!n)return;const o=u-Date.now()+v;if(e&&o>0&&!a(n)){const e=setTimeout(()=>{n.classList.remove(c),h.delete(n)},u);h.set(n,e)}else n.classList.remove(c)},C=document;C.addEventListener("ionGestureCaptured",L),C.addEventListener("touchstart",e=>{f=(0,o.u)(e),w(e)},!0),C.addEventListener("touchcancel",m,!0),C.addEventListener("touchend",m,!0),C.addEventListener("pointercancel",L,!0),C.addEventListener("mousedown",e=>{if(2===e.button)return;const t=(0,o.u)(e)-l;f<t&&w(e)},!0),C.addEventListener("mouseup",e=>{const t=(0,o.u)(e)-l;f<t&&E(e)},!0)},i=e=>{if(void 0===e.composedPath)return e.target.closest(".ion-activatable");{const t=e.composedPath();for(let e=0;e<t.length-2;e++){const n=t[e];if(!(n instanceof ShadowRoot)&&n.classList.contains("ion-activatable"))return n}}},a=e=>e.classList.contains("ion-activatable-instant"),r=e=>{if(e.shadowRoot){const t=e.shadowRoot.querySelector("ion-ripple-effect");if(t)return t}return e.querySelector("ion-ripple-effect")},c="ion-activated",d=200,u=200,l=2500}}]);