import{r as t,c as s,h as e,H as i,g as o}from"./p-78e3ebb9.js";import{c as h}from"./p-2fad2a65.js";const n="body,html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-view-core{display:block}";const r=class{constructor(e){t(this,e);this.onLongPress=s(this,"longpress",7);this.startTime=0;this.animation=undefined;this.hoverClass=undefined;this.hoverStartTime=50;this.hoverStayTime=400;this.hover=false;this.touch=false}onTouchStart(){if(this.hoverClass){this.touch=true;setTimeout((()=>{if(this.touch){this.hover=true}}),this.hoverStartTime)}this.timeoutEvent=setTimeout((()=>{this.onLongPress.emit()}),350);this.startTime=Date.now()}onTouchMove(){clearTimeout(this.timeoutEvent)}onTouchEnd(){const t=Date.now()-this.startTime;if(t<350){clearTimeout(this.timeoutEvent)}if(this.hoverClass){this.touch=false;setTimeout((()=>{if(!this.touch){this.hover=false}}),this.hoverStayTime)}}componentDidRender(){const t=this.el;t.childNodes.forEach((t=>{if(t.nodeType===document.COMMENT_NODE&&t["s-cn"])t["s-cn"]=false;if(t.nodeType!==document.COMMENT_NODE&&t["s-sr"])t["s-sr"]=false}))}render(){const t=h({[`${this.hoverClass}`]:this.hover});let s={};if(!!this.animation){s["animation"]=this.animation;s["data-animation"]=this.animation}return e(i,Object.assign({class:t},s),e("slot",null))}get el(){return o(this)}};r.style=n;export{r as taro_view_core};
//# sourceMappingURL=p-dafcf631.entry.js.map