1import{_ as t,u as e,a as o,I as n,C as l}from"./index-DIXwfVMT.js";import{j as s,D as r,h as i}from"./i18n-misc-CJ8HFqLU.js";import{x as a,y as p,z as d,at as c,g as u,c as m,V as h,w as f,f as g,G as v,B as y,O as w,U as D,K as b,a2 as T,u as S,I as U,n as L,F as x,r as M,Q as B,J as k,H as C,P as E,a6 as I}from"./vendor-core-DockhpYX.js";var P=function(t,e){var o=this;if(o.version="1.4.2",o.isScrollBody=!t||"body"===t,o.scrollDom=o.isScrollBody?document.body:o.getDomById(t),o.scrollDom){o.options=e||{};var n=navigator.userAgent,l=!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),s=void 0===window.orientation,r=n.indexOf("Android")>-1||n.indexOf("Adr")>-1,i="micromessenger"==n.toLowerCase().match(/MicroMessenger/i);o.os={ios:l,pc:s,android:r,wx:i},o.isDownScrolling=!1,o.isUpScrolling=!1;var a=o.options.down&&o.options.down.callback;o.initDownScroll(),o.initUpScroll(),setTimeout(function(){o.optDown.use&&o.optDown.auto&&a&&(o.optDown.autoShowLoading?o.triggerDownScroll():o.optDown.callback&&o.optDown.callback(o)),o.optUp.use&&o.optUp.auto&&!o.isUpAutoLoad&&o.triggerUpScroll()},30)}};P.prototype.extendDownScroll=function(t){P.extend(t,{use:!0,auto:!0,autoShowLoading:!1,isLock:!1,isBoth:!1,offset:80,inOffsetRate:1,outOffsetRate:.2,bottomOffset:20,minAngle:45,hardwareClass:"mescroll-hardware",mustToTop:!1,warpId:null,warpClass:"mescroll-downwarp",resetClass:"mescroll-downwarp-reset",textInOffset:"Pull to refresh",textOutOffset:"Release update",textLoading:"Loading ...",htmlContent:'<p class="downwarp-progress"></p><p class="downwarp-tip"></p>',inited:function(t,e){t.downTipDom=e.getElementsByClassName("downwarp-tip")[0],t.downProgressDom=e.getElementsByClassName("downwarp-progress")[0]},inOffset:function(t){t.downTipDom&&(t.downTipDom.innerHTML=t.optDown.textInOffset),t.downProgressDom&&t.downProgressDom.classList.remove("mescroll-rotate")},outOffset:function(t){t.downTipDom&&(t.downTipDom.innerHTML=t.optDown.textOutOffset)},onMoving:function(t,e,o){if(t.downProgressDom){var n=360*e;t.downProgressDom.style.webkitTransform="rotate("+n+"deg)",t.downProgressDom.style.transform="rotate("+n+"deg)"}},beforeLoading:function(t,e){return!1},showLoading:function(t){t.downTipDom&&(t.downTipDom.innerHTML=t.optDown.textLoading),t.downProgressDom&&t.downProgressDom.classList.add("mescroll-rotate")},afterLoading:function(t){return 0},callback:function(t){t.resetUpScroll()}})},P.prototype.extendUpScroll=function(t){var e=this.os.pc;P.extend(t,{use:!0,auto:!0,isLock:!1,isBoth:!1,isBounce:!0,callback:null,page:{num:0,size:10,time:null},noMoreSize:5,offset:100,toTop:{warpId:null,src:null,html:null,offset:1e3,warpClass:"mescroll-totop",showClass:"mescroll-fade-in",hideClass:"mescroll-fade-out",fadeDuration:.5,duration:300,supportTap:!1,btnClick:null},loadFull:{use:!1,delay:500},empty:{warpId:null,customId:null,icon:null,tip:"~ 空空å¦ä¹ ~",btntext:"",btnClick:null,supportTap:!1},clearId:null,clearEmptyId:null,hardwareClass:"mescroll-hardware",warpId:null,warpClass:"mescroll-upwarp",htmlLoading:'<p class="upwarp-progress mescroll-rotate"></p><p class="upwarp-tip">Loading ...</p>',htmlNodata:'<p class="upwarp-nodata">-- END --</p>',inited:function(t,e){},showLoading:function(t,e){e.innerHTML=t.optUp.htmlLoading},showNoMore:function(t,e){e.innerHTML=t.optUp.htmlNodata},onScroll:null,scrollbar:{use:e,barClass:"mescroll-bar"},lazyLoad:{use:!1,attr:"imgurl",showClass:"mescroll-lazy-in",delay:500,offset:200}})},P.extend=function(t,e){if(!t)return e;for(var o in e)null==t[o]?t[o]=e[o]:"object"==typeof t[o]&&P.extend(t[o],e[o]);return t},P.prototype.initDownScroll=function(){var t=this;if(t.optDown=t.options.down||{},t.extendDownScroll(t.optDown),t.touchstartEvent=function(e){t.isScrollTo&&t.preventDefault(e),t.startPoint=t.getPoint(e),t.lastPoint=t.startPoint,t.maxTouchmoveY=t.getBodyHeight()-t.optDown.bottomOffset,t.inTouchend=!1;var o=t.getScrollTop();t.isKeepTop=0===o,t.os.pc&&o<=0&&(t.scrollDom.addEventListener("mousemove",t.touchmoveEvent,{passive:!1}),document.ondragstart=function(){return!1})},t.scrollDom.addEventListener("mousedown",t.touchstartEvent),t.scrollDom.addEventListener("touchstart",t.touchstartEvent),t.touchmoveEvent=function(e){if(t.startPoint){var o=t.getScrollTop();o>0&&(t.isKeepTop=!1);var n=t.getPoint(e),l=n.y-t.startPoint.y;if(l>0){if(o<=0&&t.optDown.use&&!t.inTouchend&&!t.isDownScrolling&&!t.optDown.isLock&&(!t.isU
1pScrolling||t.isUpScrolling&&t.optUp.isBoth)){if(t.optDown.mustToTop&&!t.isKeepTop)return;t.preventDefault(e);var s=Math.abs(t.lastPoint.x-n.x),r=Math.abs(t.lastPoint.y-n.y),i=Math.sqrt(s*s+r*r);if(0!==i)if(Math.asin(r/i)/Math.PI*180<t.optDown.minAngle)return;if(t.maxTouchmoveY>0&&n.y>=t.maxTouchmoveY)return t.inTouchend=!0,void t.touchendEvent();var a=n.y-t.lastPoint.y;t.downHight||(t.downHight=0),t.downHight<t.optDown.offset?(1!==t.movetype&&(t.movetype=1,t.optDown.inOffset(t),t.downwarp.classList.remove(t.optDown.resetClass),t.isMoveDown=!0,t.os.ios&&!t.isKeepTop&&(t.scrollDom.classList.add(t.optDown.hardwareClass),t.scrollDom.style.webkitOverflowScrolling="auto",t.isSetScrollAuto=!0)),t.downHight+=a*t.optDown.inOffsetRate):(2!==t.movetype&&(t.movetype=2,t.optDown.outOffset(t),t.downwarp.classList.remove(t.optDown.resetClass),t.isMoveDown=!0,t.os.ios&&!t.isKeepTop&&(t.scrollDom.classList.add(t.optDown.hardwareClass),t.scrollDom.style.webkitOverflowScrolling="auto",t.isSetScrollAuto=!0)),t.downHight+=a>0?a*t.optDown.outOffsetRate:a),t.downwarp.style.height=t.downHight+"px";var p=t.downHight/t.optDown.offset;t.optDown.onMoving(t,p,t.downHight)}}else if(l<0){var d=t.getScrollHeight(),c=t.getClientHeight(),u=d-c-o;!t.optUp.isBounce&&u<=0&&t.preventDefault(e),t.optUp.use&&!t.optUp.isLock&&t.optUp.hasNext&&!t.isUpScrolling&&(!t.isDownScrolling||t.isDownScrolling&&t.optDown.isBoth)&&(c+t.optUp.offset>=d||u<=0)&&t.triggerUpScroll()}t.lastPoint=n}},t.scrollDom.addEventListener("touchmove",t.touchmoveEvent,{passive:!1}),t.touchendEvent=function(){t.optDown.use&&t.isMoveDown&&(t.downHight>=t.optDown.offset?t.triggerDownScroll():(t.downwarp.classList.add(t.optDown.resetClass),t.downHight=0,t.downwarp.style.height=0),t.isSetScrollAuto&&(t.scrollDom.style.webkitOverflowScrolling="touch",t.scrollDom.classList.remove(t.optDown.hardwareClass),t.isSetScrollAuto=!1),t.movetype=0,t.isMoveDown=!1),t.os.pc&&(t.scrollDom.removeEventListener("mousemove",t.touchmoveEvent),document.ondragstart=function(){return!0})},t.scrollDom.addEventListener("mouseup",t.touchendEvent),t.scrollDom.addEventListener("mouseleave",t.touchendEvent),t.scrollDom.addEventListener("touchend",t.touchendEvent),t.scrollDom.addEventListener("touchcancel",t.touchendEvent),t.optDown.use){t.downwarp=document.createElement("div"),t.downwarp.className=t.optDown.warpClass,t.downwarp.innerHTML='<div class="downwarp-content">'+t.optDown.htmlContent+"</div>";var e=t.optDown.warpId?t.getDomById(t.optDown.warpId):t.scrollDom;t.optDown.warpId&&e?e.appendChild(t.downwarp):(e||(e=t.scrollDom),e.insertBefore(t.downwarp,t.scrollDom.firstChild)),setTimeout(function(){t.optDown.inited(t,t.downwarp)},0)}},P.prototype.preventDefault=function(t){t&&t.cancelable&&!t.defaultPrevented&&t.preventDefault()},P.prototype.getPoint=function(t){return{x:t.touches?t.touches[0].pageX:t.clientX,y:t.touches?t.touches[0].pageY:t.clientY}},P.prototype.triggerDownScroll=function(){this.optDown.beforeLoading(this,this.downwarp)||(this.showDownScroll(),this.optDown.callback&&this.optDown.callback(this))},P.prototype.showDownScroll=function(){this.isDownScrolling=!0,this.optDown.showLoading(this),this.downHight=this.optDown.offset,this.downwarp.classList.add(this.optDown.resetClass),this.downwarp.style.height=this.optDown.offset+"px"},P.prototype.endDownScroll=function(){var t=this,e=function(){t.downHight=0,t.downwarp.style.height=0,t.isDownScrolling=!1,t.downProgressDom&&t.downProgressDom.classList.remove("mescroll-rotate")},o=t.optDown.afterLoading(t);"number"==typeof o&&o>0?setTimeout(e,o):e()},P.prototype.lockDownScroll=function(t){null==t&&(t=!0),this.optDown.isLock=t},P.prototype.initUpScroll=function(){var t=this;if(t.optUp=t.options.up||{use:!1},t.extendUpScroll(t.optUp),t.optUp.scrollbar.use&&t.scrollDom.classList.add(t.optUp.scrollbar.barClass),t.optUp.isBounce||t.setBounce(!1),!1!==t.optUp.use){var e;if(t.optUp.hasNext=!0,!t.upwarp)t.upwarp=document.createElement("div"),t.upwarp.className=t.optUp.warpClass,t.optUp.warpId&&(e=t.getDomById(t.optUp.warpId)),e||(e=t.scrollDom),e.appendChild(t.upwarp);t.preScrollY=0,t.lazyStartTime=(new Date).getTime(),t.lazyTag="mescroll-lazying",t.scrollEvent=function(){var e=t.getScrollTop(),o=e-t.preScrollY>0;(t.preScrollY=e,!t.isUpScrolling&&(!t.isDownScrolling||t.isDownScrolling&&t.optDown.isBoth))&&(!t.optUp.isLock&&t.optUp.hasNext&&t.getScrollHeight()-t.getClientHeight()-e<=t.o
1ptUp.offset&&o&&t.triggerUpScroll());var n=t.optUp.toTop;if((n.src||n.html)&&(e>=n.offset?t.showTopBtn():t.hideTopBtn()),t.optUp.lazyLoad.use){var l=(new Date).getTime();t.lazyTimer&&clearTimeout(t.lazyTimer),l-t.lazyStartTime>=t.optUp.lazyLoad.delay?(t.lazyStartTime=l,t.lazyLoad(0)):t.lazyTimer=t.lazyLoad()}t.optUp.onScroll&&t.optUp.onScroll(t,e,o)},t.isScrollBody?window.addEventListener("scroll",t.scrollEvent):t.scrollDom.addEventListener("scroll",t.scrollEvent),setTimeout(function(){t.optUp.inited(t,t.upwarp)},0)}},P.prototype.setBounce=function(t){!this.isScrollBody&&this.os.ios&&(!1===t?(this.optUp.isBounce=!1,window.addEventListener("touchmove",this.bounceTouchmove,{passive:!1})):(this.optUp.isBounce=!0,window.removeEventListener("touchmove",this.bounceTouchmove)))},P.prototype.bounceTouchmove=function(t){for(var e=this,o=t.target,n=!0;o!==document.body&&o!==document;){var l=o.classList;if(l){if(l.contains("mescroll")||l.contains("mescroll-touch")){n=!1;break}if(l.contains("mescroll-touch-x")||l.contains("mescroll-touch-y")){var s=t.touches?t.touches[0].pageX:t.clientX,r=t.touches?t.touches[0].pageY:t.clientY;e.preWinX||(e.preWinX=s),e.preWinY||(e.preWinY=r);var i=Math.abs(e.preWinX-s),a=Math.abs(e.preWinY-r),p=Math.sqrt(i*i+a*a);if(e.preWinX=s,e.preWinY=r,0!==p){var d=Math.asin(a/p)/Math.PI*180;if(d<=45&&l.contains("mescroll-touch-x")||d>45&&l.contains("mescroll-touch-y")){n=!1;break}}}}o=o.parentNode}n&&t.cancelable&&!t.defaultPrevented&&"function"==typeof t.preventDefault&&t.preventDefault()},P.prototype.triggerUpScroll=function(){this.optUp.callback&&!this.isUpScrolling&&(this.showUpScroll(),this.optUp.page.num++,this.isUpAutoLoad=!0,this.optUp.callback(this.optUp.page,this))},P.prototype.showUpScroll=function(){this.isUpScrolling=!0,this.upwarp.classList.add(this.optUp.hardwareClass),this.upwarp.style.visibility="visible",this.upwarp.style.display="block",this.optUp.showLoading(this,this.upwarp)},P.prototype.showNoMore=function(){this.upwarp.style.visibility="visible",this.upwarp.style.display="block",this.optUp.hasNext=!1,this.optUp.showNoMore(this,this.upwarp)},P.prototype.hideUpScroll=function(t){t?this.upwarp.style.display="none":this.upwarp.style.visibility="hidden",this.upwarp.classList.remove(this.optUp.hardwareClass);var e=this.upwarp.getElementsByClassName("upwarp-progress")[0];e&&e.classList.remove("mescroll-rotate")},P.prototype.endUpScroll=function(t,e){null!=t&&(t?this.showNoMore():this.hideUpScroll(e)),this.isUpScrolling=!1},P.prototype.resetUpScroll=function(t){if(this.optUp&&this.optUp.use){var e=this.optUp.page;this.prePageNum=e.num,this.prePageTime=e.time,e.num=1,e.time=null,this.isDownScrolling||!1===t||(null==t?(this.removeEmpty(),this.clearDataList(),this.showUpScroll()):this.showDownScroll()),this.isUpAutoLoad=!0,this.optUp.callback&&this.optUp.callback(e,this)}},P.prototype.setPageNum=function(t){this.optUp.page.num=t-1},P.prototype.setPageSize=function(t){this.optUp.page.size=t},P.prototype.clearDataList=function(){var t=this.optUp.clearId||this.optUp.clearEmptyId;if(t){var e=this.getDomById(t);e&&(e.innerHTML="")}},P.prototype.endByPage=function(t,e,o){var n;this.optUp.use&&null!=e&&(n=this.optUp.page.num<e),this.endSuccess(t,n,o)},P.prototype.endBySize=function(t,e,o){var n;this.optUp.use&&null!=e&&(n=(this.optUp.page.num-1)*this.optUp.page.size+t<e);this.endSuccess(t,n,o)},P.prototype.endSuccess=function(t,e,o){var n=this;if(n.isDownScrolling&&n.endDownScroll(),n.optUp.use){var l;if(null!=t){var s=n.optUp.page.num,r=n.optUp.page.size;if(1===s&&(n.clearDataList(),o&&(n.optUp.page.time=o)),n.optUp.loadMoreControlByHasNext)l=!e,n.optUp.hasNext=e??!1,n.removeEmpty();else if(t<r||!1===e){if(n.optUp.hasNext=!1,0===t&&1===s)l=!1,n.showEmpty();else l=!((s-1)*r+t<n.optUp.noMoreSize),n.removeEmpty()}else l=!1,n.optUp.hasNext=!0,n.removeEmpty()}var i=!n.optUp.hasNext;n.endUpScroll(l,i),n.loadFull(),n.optUp.lazyLoad.use&&n.lazyLoad(20)}},P.prototype.endErr=function(){if(this.isDownScrolling){var 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))},P.prototype.loadFull=function(){var t=this;t.optUp.loadFull.use&&!t.optUp.isLock&&t.optUp.hasNext&&t.optUp.callback&&t.getScrollHeight()<=t.getClientHeight()&&setTimeout(function(){!t.optUp.isLock&&t.optUp.hasNext&&!t.isUpScrolling&&(!t.isDownScrolling||t.optDown.isBoth)&&t.getScrollHeight()<=t.getClientHeight()&&t.triggerUpScroll()},t.optUp.loadFull.delay)},P.prototype.lockUpScroll=function(t){null==t&&(t=!0),this.optUp.isLock=t},P.prototype.showEmpty=function(){var t=this,e=t.optUp.empty;if(e.customId&&(t.emptyDom=t.getDomById(e.customId),t.emptyDom))t.emptyDom.style.display="block";else{var o=e.warpId||t.optUp.clearEmptyId;if(null!=o){var n=t.getDomById(o);if(n){t.removeEmpty();var l="";if(e.icon&&(l+='<img class="empty-icon" src="'+e.icon+'"/>'),e.tip&&(l+='<p class="empty-tip">'+e.tip+"</p>"),e.btntext&&(l+='<p class="empty-btn">'+e.btntext+"</p>"),t.emptyDom=document.createElement("div"),t.emptyDom.className="mescroll-empty",t.emptyDom.innerHTML=l,n.appendChild(t.emptyDom),e.btnClick){var s=t.emptyDom.getElementsByClassName("empty-btn")[0];
1e.supportTap?s.addEventListener("tap",function(o){o.stopPropagation(),t.preventDefault(o),e.btnClick()}):s.onclick=function(){e.btnClick()}}}}}},P.prototype.removeEmpty=function(){this.optUp.empty.customId&&this.emptyDom?this.emptyDom.style.display="none":this.removeChild(this.emptyDom)},P.prototype.showTopBtn=function(t){if(!this.topBtnShow){this.topBtnShow=!0;var e,o=this,n=o.optUp.toTop;if(null==o.toTopBtn)n.html?(o.toTopBtn=document.createElement("div"),o.toTopBtn.innerHTML=n.html):(o.toTopBtn=document.createElement("img"),o.toTopBtn.src=n.src),o.toTopBtn.className=n.warpClass,n.supportTap?o.toTopBtn.addEventListener("tap",function(t){t.stopPropagation(),o.preventDefault(t),!0!==(n.btnClick&&n.btnClick())&&o.scrollTo(0,o.optUp.toTop.duration)}):o.toTopBtn.onclick=function(){!0!==(n.btnClick&&n.btnClick())&&o.scrollTo(0,o.optUp.toTop.duration)},n.warpId&&(e=o.getDomById(n.warpId)),e||(e=document.body),e.appendChild(o.toTopBtn);o.toTopBtn.classList.remove(n.hideClass),o.toTopBtn.classList.add(n.showClass),o.setTopBtnFadeDuration(t)}},P.prototype.hideTopBtn=function(t){this.topBtnShow&&this.toTopBtn&&(this.topBtnShow=!1,this.toTopBtn.classList.remove(this.optUp.toTop.showClass),this.toTopBtn.classList.add(this.optUp.toTop.hideClass),this.setTopBtnFadeDuration(t))},P.prototype.setTopBtnFadeDuration=function(t){if(this.toTopBtn){var e=(null!=t?t:this.optUp.toTop.fadeDuration)+"s";this.toTopBtn.style.animationDuration=e,this.toTopBtn.style.webkitAnimationDuration=e}},P.prototype.scrollTo=function(t,e){var o=this,n=o.getScrollTop(),l=t;if(l>0){var s=o.getScrollHeight()-o.getClientHeight();l>s&&(l=s)}else l=0;o.isScrollTo=!0,o.scrollDom.style.webkitOverflowScrolling="auto",o.scrollDom.style.overflow="hidden",o.getStep(n,l,function(t){o.setScrollTop(t),t===l&&(o.scrollDom.style.webkitOverflowScrolling="touch",o.scrollDom.style.overflow="auto",o.isScrollTo=!1)},e)},P.prototype.getStep=function(t,e,o,n,l){var s=e-t;if(0!==n&&0!==s)var r=(n=n||300)/(l=l||30),i=s/r,a=0,p=window.setInterval(function(){a<r-1?(t+=i,o&&o(t,p),a++):(o&&o(e,p),window.clearInterval(p))},l);else o&&o(e)},P.prototype.lazyLoad=function(t){var e=this,o=null!=t?t:e.optUp.lazyLoad.delay;return setTimeout(function(){for(var t=e.scrollDom.querySelectorAll("["+e.optUp.lazyLoad.attr+"]"),o=t.length,n=0;n<o;n++){var l=t[n];if("true"!==l.getAttribute(e.lazyTag)&&e.isInSee(l,e.optUp.lazyLoad.offset)){var s=l.getAttribute(e.optUp.lazyLoad.attr),r=new Image;r.onload=function(){var t=this.src,o=this.dom,n=e.optUp.lazyLoad.showClass;n&&o.classList.add(n),"IMG"===o.tagName?o.src=t:o.style.backgroundImage="url("+t+")",o.removeAttribute(e.optUp.lazyLoad.attr),o.removeAttribute(e.lazyTag)},r.onerror=function(){this.dom.removeAttribute(e.lazyTag)},r.onabort=function(){this.dom.removeAttribute(e.lazyTag)},r.src=s,l.setAttribute(e.lazyTag,"true"),r.dom=l}}},o)},P.prototype.isInSee=function(t,e){e=e||0;var o=this.getOffsetTop(t),n=this.getScrollTop()-e,l=o+t.offsetHeight,s=n+e+this.getClientHeight()+e;return o<s&&o>=n||l<=s&&l>n},P.prototype.getOffsetTop=function(t){for(var e=t.offsetTop,o=t.offsetParent;null!=o&&o!==this.scrollDom;)e+=o.offsetTop+o.clientTop,o=o.offsetParent;return e},P.prototype.getScrollHeight=function(){return this.scrollDom.scrollHeight},P.prototype.getClientHeight=function(){return this.isScrollBody&&"CSS1Compat"===document.compatMode?document.documentElement.clientHeight:this.scrollDom.clientHeight},P.prototype.getBodyHeight=function(){return document.body.clientHeight||document.documentElement.clientHeight},P.prototype.getScrollTop=function(){return this.isScrollBody?document.documentElement.scrollTop||document.body.scrollTop:this.scrollDom.scrollTop},P.prototype.getToBottom=function(){return this.getScrollHeight()-this.getClientHeight()-this.getScrollTop()},P.prototype.setScrollTop=function(t){"number"==typeof t&&(this.isScrollBody?(document.documentElement.scrollTop=t,document.body.scrollTop=t):this.scrollDom.scrollTop=t)},P.prototype.getDomById=function(t){var e;return t&&("string"==typeof t?e=document.getElementById(t):t.nodeType&&(e=t)),e},P.prototype.removeChild=function(t){if(t){var e=t.parentNode;e&&e.removeChild(t),t=null}},P.prototype.destroy=function(){var t=this;t.scrollDom.removeEventListener("touchstart",t.touchstartEvent),t.scrollDom.removeEventListener("touchmove",t.touchmoveEvent),t.scrollDom.removeEventListener("touchend",t.touchendEvent),t.scrollDom.removeEventListener("touchcancel",t.touchendEvent),t.scrollDom.removeEventListener("mousedown",t.touchstartEvent),t.scrollDom.removeEventListener("mousemove",t.touchmoveEvent),t.scrollDom.removeEventListener("mouseup",t.touchendEvent),t.scrollDom.removeEventListener("mouseleave",t.touchendEvent),t.removeChild(t.downwarp),t.isScrollBody?window.removeEventListener("scroll",t.scrollEvent):t.scrollDom.removeEventListener("scroll",t.scrollEvent),t.removeChild(t.upwarp),t.removeChild(t.toTopBtn),t.setBounce(!0)};const H={ref:"mescroll",class:"mescroll"};const N=t({name:"MeScrollVue",data:function(){return{mescroll:null,lastScrollTop:0,lastBounce:null}},props:{up:Object,down:Object}
1,mounted:function(){this.mescroll=new P(this.$refs.mescroll,{up:this.up,down:this.down}),this.$emit("init",this.mescroll)},beforeDestroy:function(){this.mescroll&&this.mescroll.destroy()},methods:{beforeRouteEnter(){this.mescroll&&(this.lastScrollTop&&(this.mescroll.setScrollTop(this.lastScrollTop),setTimeout(()=>{this.mescroll.setTopBtnFadeDuration(0)},16)),null!=this.lastBounce&&this.mescroll.setBounce(this.lastBounce))},beforeRouteLeave(){this.mescroll&&(this.lastScrollTop=this.mescroll.getScrollTop(),this.mescroll.hideTopBtn(0),this.lastBounce=this.mescroll.optUp.isBounce,this.mescroll.setBounce(!0))}}},[["render",function(t,e,o,n,l,s){return p(),a("div",H,[d(t.$slots,"default")],512)}]]),z=(t,e)=>{const o=t.length-1;if(o<=0)return 0;if(e<=0)return 0;if(e>=t[o])return o-1;let n=0,l=o-1;for(;n<l;){const o=n+l>>1;t[o+1]>e?l=o:n=o+1}return n},R=(t,e)=>z(t,Math.max(e,0)),O=t=>t?t.stable?`stable:${t.key}`:"unstable":"",_={key:0,class:"custom-empty-main"},A=["src"],$={class:"custom-empty-main-info"},F={key:0,class:"custom-empty-main-retry"},K={key:1,class:"custom-empty-loading"},Y={class:"custom-empty-loading-text"},j={__name:"queryEmptyRetry",props:{loading:{type:Boolean,default:!1},hideRetry:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},info:{type:Object,default:()=>null},type:{type:String,default:"loadfailure"},btnText:{type:Object,default:null},emptyIconUrl:{type:String,default:""}},emits:["retry"],setup(t,{emit:r}){var i;const x=e(),M=o(),{createRenderType:B}=c(M),{$$t:k}=(null==(i=u().appContext)?void 0:i.config.globalProperties.$i18n)??{},C=n(s("/mureka/icons/biz-empty-create-music-caa1e9c0.webp"),{width:120,quality:75,forceWebp:!0}),E=()=>({networkerror:k("common.network_error"),loadfailure:k("common.load_failure"),contentviolation:k("common.content_violation"),emptydata:k("common.empty_data")}),I=t,P=m(()=>I.emptyIconUrl||C),H={networkerror:k("common.reload"),loadfailure:k("common.reload")},N=r,z=h({emptyInfo:I.info??E(),retryBtnText:(I.btnText??H)[I.type]}),R=()=>{N("retry")};return f(()=>x.appLanguage,()=>{L().then(()=>{Object.assign(H,{networkerror:k("common.reload"),loadfailure:k("common.reload")}),z.emptyInfo=I.info??E(),z.retryBtnText=(I.btnText??H)[I.type]})}),f(()=>I.info,()=>{z.emptyInfo=I.info??E()}),g(()=>{}),(t,e)=>(p(),a("div",{class:U(["height-all custom-empty flex-center",`render--${I.type} custom-empty--${S(B)}`])},[d(t.$slots,"empty-top"),I.loading?v("",!0):(p(),a("div",_,[d(t.$slots,"empty-icon",{},()=>[I.hideIcon?v("",!0):(p(),a("img",{key:0,src:P.value,alt:"",width:"120",height:"120"},null,8,A))]),y("div",$,w(z.emptyInfo[I.type]),1),!I.hideRetry&&z.retryBtnText?(p(),a("div",F,[D(S(l),{type:"ghost",onClick:R},{default:b(()=>[T(w(z.retryBtnText??S(k)("common.reload")),1)]),_:1})])):v("",!0)])),I.loading?(p(),a("div",K,[e[0]||(e[0]=y("div",{class:"custom-empty-loading-ico"},null,-1)),y("div",Y,w(S(k)("common.loading")),1)])):v("",!0)],2))}},q={__name:"PullTo",props:{showEmptyRetry:{type:Boolean,default:!0},hideEmptyIcon:{type:Boolean,default:!1},initLoad:{type:Boolean,default:!1},itemIdField:{type:String,default:"id"},disabledRefresh:{type:Boolean,default:!1},disabledLoadMore:{type:Boolean,default:!1},showNoMoreData:{type:Boolean,default:!0},data:{type:Array,default:()=>[]},refreshing:{type:Boolean,default:!1},finished:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},datas:{type:Array,default:()=>[]},isLoading:{type:Boolean,default:!1},showInfo:{type:Object,default:()=>({})},emptyType:{type:String,default:"emptydata"},emptyIconUrl:{type:String,default:""},virtual:{type:Boolean,default:!1},estimateSize:{type:[Number,Function],default:84},virtualBuffer:{type:Number,default:0}},emits:["refresh","loadMore","update:refreshing","update:loadingMore","update:isLoading","update:finished","update:disabledRefresh","update:disabledLoadMore","onScroll"],setup(t,{expose:o,emit:n}){var l;const s=x(),c=(t,e)=>r(t,e)??i(),w=e(),{$$t:D}=(null==(l=u().appContext)?void 0:l.config.globalProperties.$i18n)??{},T=t,P=n,H=M(null),_=M(null),A=m(()=>({networkerror:D("common.network_error"),loadfailure:D("common.load_failure"),contentviolation:D("common.content_violation"),emptydata:D("common.empty_data"),...T.showInfo})),$=(t,e)=>{e||(T.showNoMoreData?T.virtual&&L(()=>{var e;((null==(e=X.datas)?void 0:e.length)??0)<5&&t.hideUpScroll(!0)}):t.hideUpScroll(!0))},F=()=>{const t={refreshText:D("common.refresh_text"),refreshingText:D("common.refreshing_text"),loadMoreText:D("common.load_more_text"),loadMoreNoDataText:D("common.load_more_end_text"),loadingText:D("common.loading_text"),releaseUpdateText:D("common.release_update_text")};return{down:{use:!T.disabledRefresh,auto:!1,offset:80,callback:t=>{Mt((e,o)=>{t.endSuccess(e??20,o),$(t,o)},()=>{t.endErr()})},textInOffset:t.refreshText,textOutOffset:t.releaseUpdateText,textLoading:t.loadingText,htmlContent:`\n <div\n class="scroll-load-box-refreshing scroll-load-box-refreshing-top flex-center"\n >\n <div class="slb-refreshing rotate-loading">\n </div>\n <div class="slb-text">\n ${t.refreshText}\n </div>\n \n </div>\n `,textRefreshing:`\n <div\n class="scroll-load-box-refreshing scroll-load-box-refreshing-top flex-center"\n >\n <div class="slb-refreshing rotate-loading">\n </div>\n <div class="slb-text">\n ${t.refreshingText}\n </div>\n \n </div>\n `},up:{use:!T.disabledLoadMore,auto:!1,loadMoreControlByHasNext:!0,callback:(t,e)=>{Bt((t,o)=>{e.endSuccess(t??20,o),$(e,o)},()=>{e.endErr()},()=>{(t=>{var e;if(!(null==t?void 0:t.isUpScrolling))return;const o=null==(e=t.optUp)?void 0:e.page;Number.isFinite(null==o?void 0:o.num)&&(o.num=Math.max(0,o.num-1)),t.endUpScroll(!1)})(e)})},loadFull:{use:!0,delay:500,maxNum:10},htmlRefreshing:`\n <div\n class="scroll-load-box-refreshing scroll-load-box-refreshing-bottom flex-center"\n >\n <div class="slb-text">\n ${t.loadMoreText}\n </div>\n </div>\n `,htmlLoading:`<p class="upwarp-progress mescroll-rotate"></p><p class="upwarp-tip">${t.loadingText}</p>`,htmlNodata:`<p class="upwarp-nodata">${t.loadMoreNoDataText}</p>`,noMoreSize:5,toTop:{src:"",offset:1e3},empty:{warpId:"xxid",icon:"",tip:""},lazyLoad:{use:!1,attr:"imgurl",showClass:"mescroll-lazy-in",delay:500,offset:200}}}},K={mescroll:null},Y=m(()=>Boolean(s.customContent)),q=m(()=>((t,e=!1)=>Boolean(e||(null==t?void 0:t.length)))(X.datas,Y.value)),W=()=>{((t,{disabledLoadMore:e=!1,finished:o=!1,hasData:n=!1,showNoMoreData:l=!0}={})=>
1{if(!t)return;const s=e||o||!n;t.lockUpScroll(s),t.optUp&&(t.optUp.hasNext=!s),t.upwarp&&!t.isUpScrolling&&(l&&!e&&o&&n?t.showNoMore():t.hideUpScroll(!0))})(K.mescroll,{disabledLoadMore:T.disabledLoadMore,finished:T.finished,hasData:q.value,showNoMoreData:T.showNoMoreData})},X=h({isRender:!0,datas:T.datas,refreshing:T.refreshing,loadingMore:T.loadingMore,isLoading:!1,finished:!1,_disabledRefresh:!1,disabledRefresh:T.disabledRefresh,disabledLoadMore:T.disabledLoadMore,mescrollConfig:F()}),Q=m(()=>{var t;return!Y.value&&!(null==(t=X.datas)?void 0:t.length)&&X.finished}),G=t=>{var e;K.mescroll=t,W(),Lt(),T.initLoad&&(null==(e=K.mescroll)||e.triggerDownScroll())},V=M(null),J=h({start:0,end:-1,topPad:0,bottomPad:0}),Z=new Map,tt=new Map;let et=null,ot=null,nt=null,lt=0,st=!1,rt=0,it=!0,at=!1,pt=0,dt=0,ct=0,ut=0,mt=null;const ht=m(()=>{if(!T.virtual)return[];return(X.datas??[]).map((t,e)=>{const o=r(t,T.itemIdField),n=o??i();return{item:{...t,key:n},key:n,index:e,stable:null!=o}})}),ft=m(()=>!T.virtual||J.end<J.start?[]:ht.value.slice(J.start,J.end+1)),gt=t=>{const e=ht.value[t];return e?e.stable&&Z.has(e.key)?Z.get(e.key):((t,e,o,n=84)=>{const l="function"==typeof t?t(e,o):t,s=Number(l);return Number.isFinite(s)&&s>=0?s:n})(T.estimateSize,e.item,t):0},vt=()=>((t,e)=>{const o=new Array(t+1);o[0]=0;for(let n=0;n<t;n+=1){const t=Number(e(n));o[n+1]=o[n]+(Number.isFinite(t)&&t>0?t:0)}return o})(ht.value.length,gt),yt=()=>{if(!et||!V.value)return void(ct=0);if(ct=et.clientHeight,!ct)return;const t=et.getBoundingClientRect(),e=V.value.getBoundingClientRect();dt=e.top-t.top+et.scrollTop},wt=()=>et&&V.value&&ct?{viewportTop:et.scrollTop-dt,viewportHeight:ct}:null,Dt=(t=!1)=>{if(!T.virtual||!st)return;t&&yt();const e=wt();if(!e)return;const o=vt(),n=T.virtualBuffer>0?T.virtualBuffer:e.viewportHeight,l=it?n:2*n,s=it?2*n:n,r=((t,e,o,n,l=n)=>{const s=t.length-1,r=s>0?t[s]:0;if(s<=0)return{start:0,end:-1,topPad:0,bottomPad:0,total:r};const i=z(t,e-n),a=z(t,e+o+l);return{start:i,end:a,topPad:t[i],bottomPad:r-t[a+1],total:r}})(o,e.viewportTop,e.viewportHeight,l,s),i=t?{start:r.start,end:r.end}:((t,e,o,n)=>{if(o<=0||e.end<e.start)return{start:0,end:-1};if(!t||t.end<t.start)return e;if(t.end<e.start-1||t.start>e.end+1)return e;let l=Math.min(t.start,e.start),s=Math.max(t.end,e.end);const r=e.end-e.start+1;return n?l=Math.max(l,e.start-r):s=Math.min(s,e.end+r),{start:Math.max(0,l),end:Math.min(o-1,s)}})({start:J.start,end:J.end},{start:r.start,end:r.end},ht.value.length,it),a=((t,e,o,n,l)=>{if(e.end<e.start)return{start:0,end:-1};const s=Math.max(1,n);if(!(t&&t.end>=t.start)||t.end<e.start-1||t.start>e.end+1){const t=Math.min(Math.max(o,e.start),e.end);let n=t;const l=Math.min(e.end,t+s-1),r=s-(l-n+1);return r>0&&(n=Math.max(e.start,n-r)),{start:n,end:l}}let r=Math.max(t.start,e.start),i=Math.min(t.end,e.end),a=s;if(l){const t=Math.min(e.end-i,a);i+=t,a-=t,r-=Math.min(r-e.start,a)}else{const t=Math.min(r-e.start,a);r-=t,a-=t,i+=Math.min(e.end-i,a)}return{start:r,end:i}})({start:J.start,end:J.end},i,R(o,e.viewportTop),3,it),p=((t,e,o)=>{const n=t.length-1,l=n>0?t[n]:0;return n<=0||o<e?{topPad:0,bottomPad:0,total:l}:{topPad:t[e],bottomPad:l-t[o+1],total:l}})(o,a.start,a.end);J.start=a.start,J.end=a.end,J.topPad=p.topPad,J.bottomPad=p.bottomPad,a.start===i.start&&a.end===i.end||bt(!1)},bt=(t=!1)=>{T.virtual&&st&&(at=at||!0===t,lt||(lt=window.requestAnimationFrame(()=>{lt=0;const t=at;at=!1,Dt(t)})))},Tt=()=>{if(ut>0)return ut-=1,void(rt=(null==et?void 0:et.scrollTop)??0);const t=(null==et?void 0:et.scrollTop)??0;t!==rt&&(it=t>rt,rt=t),bt(!1),pt&&window.clearTimeout(pt),pt=window.setTimeout(()=>{pt=0,bt(!0)},200)},St=t=>{if(!T.virtual||!et||!et.clientHeight)return;const e=[];for(const o of t){const t=o.target,n=t.dataset.virtualKey;null!=n&&t.isConnected&&e.push({key:n,index:Number(t.dataset.virtualIndex),height:t.offsetHeight})}e.length&&(t=>{const e=wt(),o=e?vt():null;let n=!1;for(const{key:l,index:s,height:r}of t){const t=gt(s);Z.set(l,r),Math.abs(r-t)>=1&&(n=!0)}if(n){if(e&&o){const t=R(o,e.viewportTop),n=(vt()[t]??0)-(o[t]??0);if(Math.abs(n)>=.5){const t=et.scrollTop;et.scrollTop=t+n,et.scrollTop!==t&&(ut+=1)}}Dt()}})(e)},Ut=(t,e)=>{if(!t.stable)return;const o=(ot||"undefined"==typeof ResizeObserver||(ot=new ResizeObserver(St)),ot);if(!o)return;const n=tt.get(t.key);e?(e.dataset.virtualKey=t.key,e.dataset.virtualIndex=String(t.index),n!==e&&(n&&o.unobserve(n),tt.set(t.key,e),o.observe(e))):n&&(o.unobserve(n),tt.delete(t.key))},Lt=()=>{var t;if(!T.virtual)return;const e=null==(t=K.mescroll)?void 0:t.scrollDom;e&&e!==et&&(xt(),et=e,rt=et.scrollTop,et.addEventListener("scroll",Tt,{passive:!0}),nt||"undefined"==typeof ResizeObserver||(nt=new ResizeObserver(()=>{yt(),bt(!1)})),null==nt||nt.observe(et),yt(),bt())},xt=()=>{et&&(et.removeEventListener("scroll",Tt),null==nt||nt.unobserve(et),et=null,ut=0)};f(()=>T.virtual?ht.value:null,t=>{if(!t)return;const e=(t=>{const e=t.length,o=e-1,n=e>0?Math.floor(o/4):-1,l=e>0?Math.floor(o/2):-1,s=e>0?Math.floor(3*o/4):-1;return{length:e,firstKey:O(t[0]),quarterKey:O(t[n]),middleKey:O(t[l]),threeQuarterKey:O(t[s]),lastKey:O(t[o])}})(t),o=(l=e,!((n=mt)&&n.length===l.length&&n.firstKey===l.firstKey&&n.quarterKey===l.quarterKey&&n.middleKey===l.middleKey&&n.threeQuarterKey===l.threeQuarterKey&&n.lastKey===l.lastKey));var n,l;
1if(mt=e,o){const e=new Set;for(const o of t)o.stable&&e.add(o.key);for(const t of Z.keys())e.has(t)||Z.delete(t);yt(),bt(!0)}else bt(!1)}),B(()=>{st=!1,lt&&(window.cancelAnimationFrame(lt),lt=0),pt&&(window.clearTimeout(pt),pt=0),xt(),null==ot||ot.disconnect(),ot=null,null==nt||nt.disconnect(),nt=null,tt.clear(),mt=null});const Mt=(t,e)=>{X.isLoading?t():(X.isLoading=!0,P("refresh",(e,o)=>{X.finished=o??!1,X.refreshing=!1,X.isLoading=!1,t(null==e?void 0:e.length,!o)},()=>{X.refreshing=!1,X.isLoading=!1,e()}))},Bt=(t,e,o)=>{X.isLoading?(X.loadingMore=!1,null==o||o()):(X.isLoading=!0,X.loadingMore=!0,X._disabledRefresh=!0,P("loadMore",(e,o)=>{X.finished=o??!1,X.loadingMore=!1,X.isLoading=!1,X._disabledRefresh=!1,t(null==e?void 0:e.length,!o)},()=>{X.loadingMore=!1,X.isLoading=!1,X._disabledRefresh=!1,e()}))};f(()=>T.datas,(t,e)=>{X.datas=T.datas}),f(()=>T.refreshing,(t,e)=>{X.refreshing=T.refreshing}),f(()=>T.loadingMore,(t,e)=>{X.loadingMore=T.loadingMore}),f(()=>T.isLoading,(t,e)=>{X.isLoading=T.isLoading}),f(()=>T.finished,(t,e)=>{X.finished=T.finished,W()}),f(()=>T.disabledLoadMore,(t,e)=>{X.disabledLoadMore=T.disabledLoadMore,W()}),f(()=>T.showNoMoreData,()=>{W()}),f(()=>T.disabledRefresh,(t,e)=>{X.disabledRefresh=T.disabledRefresh,X.mescrollConfig.down.use=!T.disabledRefresh}),f(()=>X.disabledLoadMore,(t,e)=>{P("update:disabledLoadMore",X.disabledLoadMore)}),f(()=>X.disabledRefresh,(t,e)=>{P("update:disabledRefresh",X.disabledRefresh)}),f(()=>X.refreshing,(t,e)=>{P("update:refreshing",X.refreshing)}),f(()=>X.loadingMore,(t,e)=>{P("update:loadingMore",X.loadingMore)}),f(()=>X.isLoading,(t,e)=>{P("update:isLoading",X.isLoading)}),f(()=>X.finished,(t,e)=>{P("update:finished",X.finished)}),f(()=>T.datas,(t,e)=>{W(),L(()=>{!K.mescroll||T.finished||T.disabledLoadMore||K.mescroll.loadFull()})});const kt=()=>{X.mescrollConfig=F(),X.isRender=!1,L(()=>{X.isRender=!0})};f(()=>w.appLanguage,()=>{L().then(()=>{kt()})}),g(()=>{X.datas=T.datas,X.refreshing=T.refreshing,X.loadingMore=T.loadingMore,X.isLoading=T.isLoading,X.finished=T.finished,st=!0,Lt(),bt()});let Ct=0;return o({getScrollTop(){var t;return(null==(t=K.mescroll)?void 0:t.getScrollTop())??0},async setScrollTop(t){const e=++Ct,o=K.mescroll;await L(),o&&e===Ct&&st&&(Dt(!0),await L(),e===Ct&&st&&(o.setScrollTop(t),Dt(!0)))},initUpScroll:()=>new Promise(t=>{var e,o,n,l;null==(o=null==(e=H.value)?void 0:e.mescroll)||o.setScrollTop(0),null==(l=null==(n=H.value)?void 0:n.mescroll)||l.initUpScroll(),t()}),triggerUpScroll(){var t,e;null==(e=null==(t=H.value)?void 0:t.mescroll)||e.triggerUpScroll()},triggerRefresh(){var t;null==(t=K.mescroll)||t.triggerDownScroll()},checkIsFull(){var t,e,o,n;return(null==(e=null==(t=H.value)?void 0:t.mescroll)?void 0:e.getScrollHeight())<=(null==(n=null==(o=H.value)?void 0:o.mescroll)?void 0:n.getClientHeight())}}),(t,e)=>(p(),a("div",{ref_key:"refScrollBox",ref:_,class:U(["scroll-load-box height-all",{"scroll-load-box-show-empty":Q.value}]),isScroll:"true"},[X.isRender?(p(),k(N,{key:0,ref_key:"refMescroll",ref:H,class:U(["mescroll_feed_list",{"mescroll_feed_list--virtual":T.virtual}]),down:X.mescrollConfig.down,up:X.mescrollConfig.up,onInit:G},{default:b(()=>[T.showEmptyRetry&&Q.value&&!S(s).customContent?(p(),k(j,{key:0,type:T.emptyType,info:A.value,"hide-retry":!0,"hide-icon":T.hideEmptyIcon,"empty-icon-url":T.emptyIconUrl},{"empty-top":b(()=>[d(t.$slots,"empty-top")]),_:3},8,["type","info","hide-icon","empty-icon-url"])):v("",!0),S(s).customContent?d(t.$slots,"customContent",{key:1}):v("",!0),S(s).customContent||Q.value?v("",!0):(p(),a("div",{key:2,ref_key:"refMainList",ref:V,class:U(["pull-to-load-main-list",{"pull-to-load-main-list--virtual":T.virtual}])},[T.virtual?(p(),a(C,{key:0},[y("div",{class:"pull-to-virtual-spacer",style:E({height:`${J.topPad}px`})},null,4),(p(!0),a(C,null,I(ft.value,e=>(p(),a("div",{key:e.key,ref_for:!0,ref:t=>Ut(e,t),class:U(["pull-to-virtual-item",{"pull-to-virtual-item--first":0===e.index,"pull-to-virtual-item--last":e.index===ht.value.length-1}])},[d(t.$slots,"default",{item:e.item,index:e.index}
1)],2))),128)),y("div",{class:"pull-to-virtual-spacer",style:E({height:`${J.bottomPad}px`})},null,4)],64)):(p(!0),a(C,{key:1},I(X.datas,(e,o)=>d(t.$slots,"default",{key:c(e,T.itemIdField),item:{...e,key:c(e,T.itemIdField)},index:o})),128))],2))]),_:3},8,["class","down","up"])):v("",!0)],2))}};export{j as _,q as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.