import{c as J}from"./@traptitech.363dce05.js";import{r as Q}from"./vue.eaf71fac.js";var k={exports:{}};/*! * vue-virtual-scroll-list v2.3.5-10 * open source under the MIT license * https://github.com/tangbc/vue-virtual-scroll-list#readme */(function($,Z){(function(h,O){$.exports=O(Q)})(J,function(h){h=h&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h;function O(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function x(r,e){for(var t=0;tr.length)&&(e=r.length);for(var t=0,i=new Array(e);tthis.range.start)){var i=Math.max(t-this.param.buffer,0);this.checkRange(i,this.getEndByStart(i))}}},{key:"handleBehind",value:function(){var t=this.getScrollOvers();tt&&(o=s-1)}return i>0?--i:0}},{key:"getIndexOffset",value:function(t){if(!t)return 0;for(var i=0,s=0,n=0;n1&&arguments[1]!==void 0?arguments[1]:!1;if(this.$emit("activity",!0),this.pageMode)this.scrollToBehavior(document.body,e,i),this.scrollToBehavior(document.documentElement,e,i);else{var s=this.$refs.root;s&&this.scrollToBehavior(s,e,i)}requestAnimationFrame(function(){t.activeEvent(t.$refs.root),t.$emit("activity",!1)})},scrollToIndex:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(e>=this.dataSources.length-1)this.scrollToBottom();else{var i=this.virtual.getOffset(e);t!==0&&(i=Math.max(0,i+t)),this.scrollToOffset(i)}},scrollToBottom:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.$refs.shepherd;if(i){var s=i[this.isHorizontal?"offsetLeft":"offsetTop"];if(this.scrollToOffset(s,t),t)return;this.toBottomTime&&(clearTimeout(this.toBottomTime),this.toBottomTime=null),this.toBottomTime=setTimeout(function(){e.getOffset()+e.getClientSize()+1s+1||!s||(this.virtual.handleScroll(t),this.activeEvent(e.target),this.emitEvent(t,i,s,e))}},activeEvent:function(e){var t=this;if(!(!this.activePrefix||!e)){var i=e.getBoundingClientRect(),s=e.querySelectorAll('div[role="listitem"]');s.forEach(function(n,o){var a=n.getBoundingClientRect();if(a.topi.top&&a.lefti.left?n.classList.remove(t.activePrefix+"-leave"):n.classList.add(t.activePrefix+"-leave"),t.isHorizontal){var l=Math.min(100,a.width/2),p=a.left+l,g=a.right-l;gi.right?n.classList.remove(t.activePrefix+"-enter"):n.classList.add(t.activePrefix+"-enter")}else{var u=Math.min(100,a.height/2),f=a.top+u,m=a.bottom-u;mi.bottom?n.classList.remove(t.activePrefix+"-enter"):n.classList.add(t.activePrefix+"-enter")}})}},emitEvent:function(e,t,i,s){this.$emit("scroll",s,this.virtual.getRange()),this.virtual.isFront()&&!!this.dataSources.length&&e-this.topThreshold<=0?this.$emit("totop"):this.virtual.isBehind()&&e+t+this.bottomThreshold>=i&&this.$emit("tobottom")},getRenderSlots:function(e){for(var t=[],i=this.range,s=i.start,n=i.end,o=this.dataSources,a=this.dataKey,l=this.itemClass,p=this.itemTag,g=this.itemStyle,u=this.isHorizontal,f=this.extraProps,m=this.dataComponent,I=this.itemScopedSlots,E=this.$scopedSlots&&this.$scopedSlots.item,c=s;c<=n;c++){var y=o[c];if(y){var T=typeof a=="function"?a(y):y[a];typeof T=="string"||typeof T=="number"?t.push(e(Y,{props:{index:c,tag:p,event:S.ITEM,horizontal:u,uniqueKey:T,source:y,extraProps:f,component:m,slotComponent:E,scopedSlots:I},style:g,class:[l,this.itemClassAdd?this.itemClassAdd(c):null]})):console.warn("Cannot get the data-key '".concat(a,"' from data-sources."))}else console.warn("Cannot get the index '".concat(c,"' from data-sources."))}return t}},render:function(e){var t=this.$slots,i=t.header,s=t.footer,n=this.range,o=n.padFront,a=n.padBehind,l=this.isHorizontal,p=this.pageMode,g=this.rootTag,u=this.wrapTag,f=this.wrapClass,m=this.wrapStyle,I=this.headerTag,E=this.headerClass,c=this.headerStyle,y=this.footerTag,T=this.footerClass,X=this.footerStyle,W=this.disabled,P={padding:l?"0px ".concat(a,"px 0px ").concat(o,"px"):"".concat(o,"px 0px ").concat(a,"px")},G=m?Object.assign({},m,P):P;return e(g,{ref:"root",style:W?{overflow:"hidden"}:null,on:{"&scroll":!p&&this.onScroll}},[i?e(R,{class:E,style:c,props:{tag:I,event:S.SLOT,uniqueKey:z.HEADER}},i):null,e(u,{class:f,attrs:{role:"group"},style:G},this.getRenderSlots(e)),s?e(R,{class:T,style:X,props:{tag:y,event:S.SLOT,uniqueKey:z.FOOTER}},s):null,e("div",{ref:"shepherd",style:{width:l?"0px":"100%",height:l?"100%":"0px"}})])}});return U})})(k);var it=k.exports;export{it as V};