import{g as t,B as o,o as e,d as n,w as i,e as s,x as l,f as p,t as r,H as c,L as h,a0 as a,i as u,b1 as d,b2 as g}from"./index-C0ioWTxp.js";import{_ as w}from"./_plugin-vue_export-helper.BCo6x5W8.js";const f={down:{offset:80,native:!1},up:{offset:150,toTop:{src:"https://www.mescroll.com/img/mescroll-totop.png",offset:1e3,right:20,bottom:120,width:72},empty:{use:!0,icon:"https://www.mescroll.com/img/mescroll-empty.png"}},i18n:{zh:{down:{textInOffset:"下拉刷新",textOutOffset:"释放更新",textLoading:"加载中 ...",textSuccess:"加载成功",textErr:"加载失败"},up:{textLoading:"加载中 ...",textNoMore:"-- END --",empty:{tip:"~ 空空如也 ~"}}},en:{down:{textInOffset:"drop down refresh",textOutOffset:"release updates",textLoading:"loading ...",textSuccess:"loaded successfully",textErr:"loading failed"},up:{textLoading:"loading ...",textNoMore:"-- END --",empty:{tip:"~ absolutely empty ~"}}}}},m={def:"zh",getType(){return t("mescroll-i18n")||this.def},setType(t){o("mescroll-i18n",t)}};const y=w({props:{option:{type:Object,default:()=>({})}},computed:{icon(){if(null!=this.option.icon)return this.option.icon;{let t=m.getType();return this.option.i18n?this.option.i18n[t].icon:f.i18n[t].up.empty.icon||f.up.empty.icon}},tip(){if(null!=this.option.tip)return this.option.tip;{let t=m.getType();return this.option.i18n?this.option.i18n[t].tip:f.i18n[t].up.empty.tip||f.up.empty.tip}},btnText(){if(this.option.i18n){let t=m.getType();return this.option.i18n[t].btnText}return this.option.btnText}},methods:{emptyClick(){this.$emit("emptyclick")}}},[["render",function(t,o,d,g,w,f){const m=a,y=u;return e(),n(y,{class:c(["mescroll-empty",{"empty-fixed":d.option.fixed}]),style:h({"z-index":d.option.zIndex,top:d.option.top})},{default:i((()=>[s(y,null,{default:i((()=>[f.icon?(e(),n(m,{key:0,class:"empty-icon",src:f.icon,mode:"widthFix"},null,8,["src"])):l("",!0)])),_:1}),f.tip?(e(),n(y,{key:0,class:"empty-tip"},{default:i((()=>[p(r(f.tip),1)])),_:1})):l("",!0),f.btnText?(e(),n(y,{key:1,class:"empty-btn",onClick:f.emptyClick},{default:i((()=>[p(r(f.btnText),1)])),_:1},8,["onClick"])):l("",!0)])),_:1},8,["class","style"])}],["__scopeId","data-v-d8e57396"]]);function S(t,o){let e=this;e.version="1.3.7",e.options=t||{},e.isScrollBody=o||!1,e.isDownScrolling=!1,e.isUpScrolling=!1;let n=e.options.down&&e.options.down.callback;e.initDownScroll(),e.initUpScroll(),setTimeout((function(){(e.optDown.use||e.optDown.native)&&e.optDown.auto&&n&&(e.optDown.autoShowLoading?e.triggerDownScroll():e.optDown.callback&&e.optDown.callback(e)),e.isUpAutoLoad||setTimeout((function(){e.optUp.use&&e.optUp.auto&&!e.isUpAutoLoad&&e.triggerUpScroll()}),100)}),30)}S.prototype.extendDownScroll=function(t){S.extend(t,{use:!0,auto:!0,native:!1,autoShowLoading:!1,isLock:!1,offset:80,startTop:100,inOffsetRate:1,outOffsetRate:.2,bottomOffset:20,minAngle:45,textInOffset:"下拉刷新",textOutOffset:"释放更新",textLoading:"加载中 ...",textSuccess:"加载成功",textErr:"加载失败",beforeEndDelay:0,bgColor:"transparent",textColor:"gray",inited:null,inOffset:null,outOffset:null,onMoving:null,beforeLoading:null,showLoading:null,afterLoading:null,beforeEndDownScroll:null,endDownScroll:null,afterEndDownScroll:null,callback:function(t){t.resetUpScroll()}})},S.prototype.extendUpScroll=function(t){S.extend(t,{use:!0,auto:!0,isLock:!1,isBoth:!0,callback:null,page:{num:0,size:10,time:null},noMoreSize:5,offset:150,textLoading:"加载中 ...",textNoMore:"-- END --",bgColor:"transparent",textColor:"gray",inited:null,showLoading:null,showNoMore:null,hideUpScroll:null,errDistance:60,toTop:{src:null,offset:1e3,duration:300,btnClick:null,onShow:null,zIndex:9990,left:null,right:20,bottom:120,safearea:!1,width:72,radius:"50%"},empty:{use:!0,icon:null,tip:"~ 暂无相关数据 ~",btnText:"",btnClick:null,onShow:null,fixed:!1,top:"100rpx",zIndex:99},onScroll:!1})},S.extend=function(t,o){if(!t)return o;for(let e in o)if(null==t[e]){let n=o[e];t[e]=null!=n&&"object"==typeof n?S.extend({},n):n}else"object"==typeof t[e]&&S.extend(t[e],o[e]);return t},S.prototype.hasColor=function(t){if(!t)return!1;let o=t.toLowerCase();return"#fff"!=o&&"#ffffff"!=o&&"transparent"!=o&&"white"!=o},S.prototype.initDownScroll=function(){let t=this;t.optDown=t.options.down||{},!t.optDown.textColor&&t.hasColor(t.optDown.bgColor)&&(t.optDown.textColor="#fff"),t.extendDownScroll(t.optDown),t.isScrollBody&&t.optDown.native?t.optDown.use=!1:t.optDown.native=!1,t.downHight=0,t.optDown.use&&t.optDown.inited&&setTimeout((function(){t.optDown.inited(t)}),0)},S.prototype.touchstartEvent=function(t){this.optDown.use&&(this.startPoint=this.getPoint(t),this.startTop=this.getScrollTop(),this.startAngle=0,this.lastPoint=this.startPoint,this.maxTouchmoveY=this.getBodyHeight()-this.optDown.bottomOffset,this.inTouchend=!1)},S.prototype.touchmoveEvent=function(t){if(!this.optDown.use)return;let o=this,e=o.getScrollTop(),n=o.getPoint(t);if(n.y-o.startPoint.y>0&&(o.isScrollBody&&e<=0||!o.isScrollBody&&(e<=0||e<=o.optDown.startTop&&e===o.startTop))&&!o.inTouchend&&!o.isDownScrolling&&!o.optDown.isLock&&(!o.isUpScrolling||o.isUpScrolling&&o.optUp.isBoth)){if(o.startAngle||(o.startAngle=o.getAngle(o.lastPoint,n)),o.startAngle<o.optDown.minAngle)return;if(o.maxTouchmoveY>0&&n.y>=o.maxTouchmoveY)return o.inTouchend=!0,void o.touchendEvent();o.preventDefault(t);let e=n.y-o.lastPoint.y;o.downHight<o.optDown.offset?(1!==o.movetype&&(o.movetype=1,o.isDownEndSuccess=null,o.optDown.inOffset&&o.optDown.inOffset(o),o.isMoveDown=!0),o.downHight+=e*o.optDown.inOffsetRate):(2!==o.movetype&&(o.movetype=2,o.optDown.outOffset&&o.optDown.outOffset(o),o.isMoveDown=!0),o.downHight+=e>0?e*o.optDown.outOffsetRate:e),o.downHight=Math.round(o.downHight);let i=o.downHight/o.optDown.offset;o.optDown.onMoving&&o.optDown.onMoving(o,i,o.downHight)}o.lastPoint=n},S.prototype.touchendEvent=function(t){if(this.optDown.use)if(this.isMoveDown)this.downHight>=this.optDown.offset?this.triggerDownScroll():(this.downHight=0,this.endDownScrollCall(this)),this.movetype=0,this.isMoveDown=!1;else if(!this.isScrollBody&&this.getScrollTop()===this.startTop){if(this.getPoint(t).y-this.startPoint.y<0){this.getAngle(this.getPoint(t),this.startPoint)>80&&this.triggerUpScroll(!0)}}},S.prototype.getPoint=function(t){return t?t.touches&&t.touches[0]?{x:t.touches[0].pageX,y:t.touches[0].pageY}:t.changedTouches&&t.changedTouches[0]?{x:t.changedTouches[0].pageX,y:t.changedTouches[0].pageY}:{x:t.clientX,y:t.clientY}:{x:0,y:0}},S.prototype.getAngle=function(t,o){let e=Math.abs(t.x-o.x),n=Math.abs(t.y-o.y),i=Math.sqrt(e*e+n*n),s=0;return 0!==i&&(s=Math.asin(n/i)/Math.PI*180),s},S.prototype.triggerDownScroll=function(){this.optDown.beforeLoading&&this.optDown.beforeLoading(this)||(this.showDownScroll(),!this.optDown.native&&this.optDown.callback&&this.optDown.callback(this))},S.prototype.showDownScroll=function(){this.isDownScrolling=!0,this.optDown.native?(d(),this.showDownLoadingCall(0)):(this.downHight=this.optDown.offset,this.showDownLoadingCall(this.downHight))},S.prototype.showDownLoadingCall=function(t){this.optDown.showLoading&&this.optDown.showLoading(this,t),this.optDown.afterLoading&&this.optDown.afterLoading(this,t)},S.prototype.onPullDownRefresh=function(){this.isDownScrolling=!0,this.showDownLoadingCall(0),this.optDown.callback&&this.optDown.callback(this)},S.prototype.endDownScroll=function(){if(this.optDown.native)return this.isDownScrolling=!1,this.endDownScrollCall(this),void g();let t=this,o=function(){t.downHight=0,t.isDownScrolling=!1,t.endDownScrollCall(t),t.isScrollBody||(t.setScrollHeight(0),t.scrollTo(0,0))},e=0;t.optDown.beforeEndDownScroll&&(e=t.optDown.beforeEndDownScroll(t),null==t.isDownEndSuccess&&(e=0)),"number"==typeof e&&e>0?setTimeout(o,e):o()},S.prototype.endDownScrollCall=function(){this.optDown.endDownScroll&&this.optDown.endDownScroll(this),this.optDown.afterEndDownScroll&&this.optDown.afterEndDownScroll(this)},S.prototype.lockDownScroll=function(t){null==t&&(t=!0),this.optDown.isLock=t},S.prototype.lockUpScroll=function(t){null==t&&(t=!0),this.optUp.isLock=t},S.prototype.initUpScroll=function(){let t=this;t.optUp=t.options.up||{use:!1},!t.optUp.textColor&&t.hasColor(t.optUp.bgColor)&&(t.optUp.textColor="#fff"),t.extendUpScroll(t.optUp),!1!==t.optUp.use&&(t.optUp.hasNext=!0,t.startNum=t.optUp.page.num+1,t.optUp.inited&&setTimeout((function(){t.optUp.inited(t)}),0))},S.prototype.onReachBottom=function(){this.isScrollBody&&!this.isUpScrolling&&!this.optUp.isLock&&this.optUp.hasNext&&this.triggerUpScroll()},S.prototype.onPageScroll=function(t){this.isScrollBody&&(this.setScrollTop(t.scrollTop),t.scrollTop>=this.optUp.toTop.offset?this.showTopBtn():this.hideTopBtn())},S.prototype.scroll=function(t,o){this.setScrollTop(t.scrollTop),this.setScrollHeight(t.scrollHeight),null==this.preScrollY&&(this.preScrollY=0),this.isScrollUp=t.scrollTop-this.preScrollY>0,this.preScrollY=t.scrollTop,this.isScrollUp&&this.triggerUpScroll(!0),t.scrollTop>=this.optUp.toTop.offset?this.showTopBtn():this.hideTopBtn(),this.optUp.onScroll&&o&&o()},S.prototype.triggerUpScroll=function(t){if(!this.isUpScrolling&&this.optUp.use&&this.optUp.callback){if(!0===t){let t=!1;if(!this.optUp.hasNext||this.optUp.isLock||this.isDownScrolling||this.getScrollBottom()<=this.optUp.offset&&(t=!0),!1===t)return}this.showUpScroll(),this.optUp.page.num++,this.isUpAutoLoad=!0,this.num=this.optUp.page.num,this.size=this.optUp.page.size,this.time=this.optUp.page.time,this.optUp.callback(this)}},S.prototype.showUpScroll=function(){this.isUpScrolling=!0,this.optUp.showLoading&&this.optUp.showLoading(this)},S.prototype.showNoMore=function(){this.optUp.hasNext=!1,this.optUp.showNoMore&&this.optUp.showNoMore(this)},S.prototype.hideUpScroll=function(){this.optUp.hideUpScroll&&this.optUp.hideUpScroll(this)},S.prototype.endUpScroll=function(t){null!=t&&(t?this.showNoMore():this.hideUpScroll()),this.isUpScrolling=!1},S.prototype.resetUpScroll=function(t){if(this.optUp&&this.optUp.use){let o=this.optUp.page;this.prePageNum=o.num,this.prePageTime=o.time,o.num=this.startNum,o.time=null,this.isDownScrolling||!1===t||(null==t?(this.removeEmpty(),this.showUpScroll()):this.showDownScroll()),this.isUpAutoLoad=!0,this.num=o.num,this.size=o.size,this.time=o.time,this.optUp.callback&&this.optUp.callback(this)}},S.prototype.setPageNum=function(t){this.optUp.page.num=t-1},S.prototype.setPageSize=function(t){this.optUp.page.size=t},S.prototype.endByPage=function(t,o,e){let n;this.optUp.use&&null!=o&&(n=this.optUp.page.num<o),this.endSuccess(t,n,e)},S.prototype.endBySize=function(t,o,e){let n;if(this.optUp.use&&null!=o){n=(this.optUp.page.num-1)*this.optUp.page.size+t<o}this.endSuccess(t,n,e)},S.prototype.endSuccess=function(t,o,e){let n=this;if(n.isDownScrolling&&(n.isDownEndSuccess=!0,n.endDownScroll()),n.optUp.use){let i;if(null!=t){let s=n.optUp.page.num,l=n.optUp.page.size;if(1===s&&e&&(n.optUp.page.time=e),t<l||!1===o)if(n.optUp.hasNext=!1,0===t&&1===s)i=!1,n.showEmpty();else{i=!((s-1)*l+t<n.optUp.noMoreSize),n.removeEmpty()}else i=!1,n.optUp.hasNext=!0,n.removeEmpty()}n.endUpScroll(i)}},S.prototype.endErr=function(t){if(this.isDownScrolling){this.isDownEndSuccess=!1;let t=this.optUp.page;t&&this.prePageNum&&(t.num=this.prePageNum,t.time=this.prePageTime),this.endDownScroll()}this.isUpScrolling&&(this.optUp.page.num--,this.endUpScroll(!1),this.isScrollBody&&0!==t&&(t||(t=this.optUp.errDistance),this.scrollTo(this.getScrollTop()-t,0)))},S.prototype.showEmpty=function(){this.optUp.empty.use&&this.optUp.empty.onShow&&this.optUp.empty.onShow(!0)},S.prototype.removeEmpty=function(){this.optUp.empty.use&&this.optUp.empty.onShow&&this.optUp.empty.onShow(!1)},S.prototype.showTopBtn=function(){this.topBtnShow||(this.topBtnShow=!0,this.optUp.toTop.onShow&&this.optUp.toTop.onShow(!0))},S.prototype.hideTopBtn=function(){this.topBtnShow&&(this.topBtnShow=!1,this.optUp.toTop.onShow&&this.optUp.toTop.onShow(!1))},S.prototype.getScrollTop=function(){return this.scrollTop||0},S.prototype.setScrollTop=function(t){this.scrollTop=t},S.prototype.scrollTo=function(t,o){this.myScrollTo&&this.myScrollTo(t,o)},S.prototype.resetScrollTo=function(t){this.myScrollTo=t},S.prototype.getScrollBottom=function(){return this.getScrollHeight()-this.getClientHeight()-this.getScrollTop()},S.prototype.getStep=function(t,o,e,n,i){let s=o-t;if(0===n||0===s)return void(e&&e(o));let l=(n=n||300)/(i=i||30),p=s/l,r=0,c=setInterval((function(){r<l-1?(t+=p,e&&e(t,c),r++):(e&&e(o,c),clearInterval(c))}),i)},S.prototype.getClientHeight=function(t){let o=this.clientHeight||0;return 0===o&&!0!==t&&(o=this.getBodyHeight()),o},S.prototype.setClientHeight=function(t){this.clientHeight=t},S.prototype.getScrollHeight=function(){return this.scrollHeight||0},S.prototype.setScrollHeight=function(t){this.scrollHeight=t},S.prototype.getBodyHeight=function(){return this.bodyHeight||0},S.prototype.setBodyHeight=function(t){this.bodyHeight=t},S.prototype.preventDefault=function(t){t&&t.cancelable&&!t.defaultPrevented&&t.preventDefault()};const D=w({props:{option:{type:Object,default:()=>({})},value:!1,modelValue:!1},computed:{left(){return this.option.left?this.addUnit(this.option.left):"auto"},right(){return this.option.left?"auto":this.addUnit(this.option.right)},isShow(){return this.modelValue}},methods:{addUnit:t=>t?"number"==typeof t?t+"rpx":t:0,toTopClick(){this.$emit("update:modelValue",!1),this.$emit("click")}}},[["render",function(t,o,i,s,p,r){const u=a;return i.option.src?(e(),n(u,{key:0,class:c(["mescroll-totop",[r.isShow?"mescroll-totop-in":"mescroll-totop-out",{"mescroll-totop-safearea":i.option.safearea}]]),style:h({"z-index":i.option.zIndex,left:r.left,right:r.right,bottom:r.addUnit(i.option.bottom),width:r.addUnit(i.option.width),"border-radius":r.addUnit(i.option.radius)}),src:i.option.src,mode:"widthFix",onClick:r.toTopClick},null,8,["class","style","src","onClick"])):l("",!0)}],["__scopeId","data-v-3d9c8017"]]),T={data:()=>({wxsProp:{optDown:{},scrollTop:0,bodyHeight:0,isDownScrolling:!1,isUpScrolling:!1,isScrollBody:!0,isUpBoth:!0,t:0},callProp:{callType:"",t:0}}),methods:{wxsCall(t){"setWxsProp"===t.type?this.wxsProp={optDown:this.mescroll.optDown,scrollTop:this.mescroll.getScrollTop(),bodyHeight:this.mescroll.getBodyHeight(),isDownScrolling:this.mescroll.isDownScrolling,isUpScrolling:this.mescroll.isUpScrolling,isUpBoth:this.mescroll.optUp.isBoth,isScrollBody:this.mescroll.isScrollBody,t:Date.now()}:"setLoadType"===t.type?(this.downLoadType=t.downLoadType,this.$set(this.mescroll,"downLoadType",this.downLoadType),this.$set(this.mescroll,"isDownEndSuccess",null)):"triggerDownScroll"===t.type?this.mescroll.triggerDownScroll():"endDownScroll"===t.type?this.mescroll.endDownScroll():"triggerUpScroll"===t.type&&this.mescroll.triggerUpScroll(!0)}},mounted(){this.mescroll.optDown.afterLoading=()=>{this.callProp={callType:"showLoading",t:Date.now()}},this.mescroll.optDown.afterEndDownScroll=()=>{this.callProp={callType:"endDownScroll",t:Date.now()};let t=300+(this.mescroll.optDown.beforeEndDelay||0);setTimeout((()=>{4!==this.downLoadType&&0!==this.downLoadType||(this.callProp={callType:"clearTransform",t:Date.now()}),this.$set(this.mescroll,"downLoadType",this.downLoadType)}),t)},this.wxsCall({type:"setWxsProp"})}};var U={};function x(t,o){if(U.isMoveDown)U.downHight>=U.optDown.offset?(U.downHight=U.optDown.offset,U.callMethod(o,{type:"triggerDownScroll"})):(U.downHight=0,U.callMethod(o,{type:"endDownScroll"})),U.movetype=0,U.isMoveDown=!1;else if(!U.isScrollBody&&U.getScrollTop()===U.startTop){if(U.getPoint(t).y-U.startPoint.y<0)U.getAngle(U.getPoint(t),U.startPoint)>80&&U.callMethod(o,{type:"triggerUpScroll"})}U.callMethod(o,{type:"setWxsProp"})}U.onMoving=function(t,o,e){t.requestAnimationFrame((function(){t.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"transform",transform:"translateY("+e+"px)",transition:""});var n=t.selectComponent(".mescroll-wxs-progress");n&&n.setStyle({transform:"rotate("+360*o+"deg)"})}))},U.showLoading=function(t){U.downHight=U.optDown.offset,t.requestAnimationFrame((function(){t.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"auto",transform:"translateY("+U.downHight+"px)",transition:"transform 300ms"})}))},U.endDownScroll=function(t){U.downHight=0,U.isDownScrolling=!1,t.requestAnimationFrame((function(){t.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"auto",transform:"translateY(0)",transition:"transform 300ms"})}))},U.clearTransform=function(t){t.requestAnimationFrame((function(){t.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"",transform:"",transition:""})}))},U.disabled=function(){return!U.optDown||!U.optDown.use||U.optDown.native},U.getPoint=function(t){return t?t.touches&&t.touches[0]?{x:t.touches[0].pageX,y:t.touches[0].pageY}:t.changedTouches&&t.changedTouches[0]?{x:t.changedTouches[0].pageX,y:t.changedTouches[0].pageY}:{x:t.clientX,y:t.clientY}:{x:0,y:0}},U.getAngle=function(t,o){var e=Math.abs(t.x-o.x),n=Math.abs(t.y-o.y),i=Math.sqrt(e*e+n*n),s=0;return 0!==i&&(s=Math.asin(n/i)/Math.PI*180),s},U.getScrollTop=function(){return U.scrollTop||0},U.getBodyHeight=function(){return U.bodyHeight||0},U.callMethod=function(t,o){t&&t.callMethod("wxsCall",o)};const v={propObserver:function(t){t&&(U.optDown=t.optDown,U.scrollTop=t.scrollTop,U.bodyHeight=t.bodyHeight,U.isDownScrolling=t.isDownScrolling,U.isUpScrolling=t.isUpScrolling,U.isUpBoth=t.isUpBoth,U.isScrollBody=t.isScrollBody,U.startTop=t.scrollTop)},callObserver:function(t,o,e){U.disabled()||t.callType&&("showLoading"===t.callType?U.showLoading(e):"endDownScroll"===t.callType?U.endDownScroll(e):"clearTransform"===t.callType&&U.clearTransform(e))},touchstartEvent:function(t,o){U.downHight=0,U.startPoint=U.getPoint(t),U.startTop=U.getScrollTop(),U.startAngle=0,U.lastPoint=U.startPoint,U.maxTouchmoveY=U.getBodyHeight()-U.optDown.bottomOffset,U.inTouchend=!1,U.callMethod(o,{type:"setWxsProp"})},touchmoveEvent:function(t,o){var e=!0;if(U.disabled())return e;var n=U.getScrollTop(),i=U.getPoint(t);if(i.y-U.startPoint.y>0&&(U.isScrollBody&&n<=0||!U.isScrollBody&&(n<=0||n<=U.optDown.startTop&&n===U.startTop))&&!U.inTouchend&&!U.isDownScrolling&&!U.optDown.isLock&&(!U.isUpScrolling||U.isUpScrolling&&U.isUpBoth)){if(U.startAngle||(U.startAngle=U.getAngle(U.lastPoint,i)),U.startAngle<U.optDown.minAngle)return e;if(U.maxTouchmoveY>0&&i.y>=U.maxTouchmoveY)return U.inTouchend=!0,x(t,o),e;e=!1;var s=i.y-U.lastPoint.y;U.downHight<U.optDown.offset?(1!==U.movetype&&(U.movetype=1,U.callMethod(o,{type:"setLoadType",downLoadType:1}),U.isMoveDown=!0),U.downHight+=s*U.optDown.inOffsetRate):(2!==U.movetype&&(U.movetype=2,U.callMethod(o,{type:"setLoadType",downLoadType:2}),U.isMoveDown=!0),U.downHight+=s>0?s*U.optDown.outOffsetRate:s),U.downHight=Math.round(U.downHight);var l=U.downHight/U.optDown.offset;U.onMoving(o,l,U.downHight)}return U.lastPoint=i,e},touchendEvent:x},b=t=>{t.$wxs||(t.$wxs=[]),t.$wxs.push("wxsBiz"),t.mixins||(t.mixins=[]),t.mixins.push({beforeCreate(){this.wxsBiz=v}})};var P={};function L(t){P.optDown=t.optDown,P.scrollTop=t.scrollTop,P.isDownScrolling=t.isDownScrolling,P.isUpScrolling=t.isUpScrolling,P.isUpBoth=t.isUpBoth}window&&!window.$mescrollRenderInit&&(window.$mescrollRenderInit=!0,window.addEventListener("touchstart",(function(t){P.disabled()||(P.startPoint=P.getPoint(t))}),{passive:!0}),window.addEventListener("touchmove",(function(t){if(!P.disabled()&&(!(P.getScrollTop()>0)&&P.getPoint(t).y-P.startPoint.y>0&&!P.isDownScrolling&&!P.optDown.isLock&&(!P.isUpScrolling||P.isUpScrolling&&P.isUpBoth))){for(var o=t.target,e=!1;o&&o.tagName&&"UNI-PAGE-BODY"!==o.tagName&&"BODY"!=o.tagName;){var n=o.classList;if(n&&n.contains("mescroll-render-touch")){e=!0;break}o=o.parentNode}e&&t.cancelable&&!t.defaultPrevented&&t.preventDefault()}}),{passive:!1})),P.getScrollTop=function(){return P.scrollTop||document.documentElement.scrollTop||document.body.scrollTop||0},P.disabled=function(){return!P.optDown||!P.optDown.use||P.optDown.native},P.getPoint=function(t){return t?t.touches&&t.touches[0]?{x:t.touches[0].pageX,y:t.touches[0].pageY}:t.changedTouches&&t.changedTouches[0]?{x:t.changedTouches[0].pageX,y:t.changedTouches[0].pageY}:{x:t.clientX,y:t.clientY}:{x:0,y:0}};const B={data:()=>({propObserver:L})},H={data:()=>({mescroll:null}),onPullDownRefresh(){this.mescroll&&this.mescroll.onPullDownRefresh()},onPageScroll(t){this.mescroll&&this.mescroll.onPageScroll(t)},onReachBottom(){this.mescroll&&this.mescroll.onReachBottom()},methods:{mescrollInit(t){this.mescroll=t},downCallback(){this.mescroll.optUp.use?this.mescroll.resetUpScroll():setTimeout((()=>{this.mescroll.endSuccess()}),500)},upCallback(){setTimeout((()=>{this.mescroll.endErr()}),500)}}};export{f as G,H as M,T as W,y as _,D as a,b,S as c,m,B as r};