You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
1.2 KiB

var d=Object.defineProperty;var p=(r,e,t)=>e in r?d(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var a=(r,e,t)=>p(r,typeof e!="symbol"?e+"":e,t);import{aa as f,an as h,C as u,V as _,_ as v,x as b,h as I,a1 as x,j as $}from"./index-BLqts8WY.js";var m=Object.defineProperty,y=Object.getOwnPropertyDescriptor,l=(r,e,t,n)=>{for(var s=n>1?void 0:n?y(e,t):e,i=r.length-1,c;i>=0;i--)(c=r[i])&&(s=(n?c(e,t,s):c(s))||s);return n&&s&&m(e,t,s),s};let o=class extends _{constructor(){super(...arguments);a(this,"distance");a(this,"observer");a(this,"isInitialRender",!0)}updated(){if(!this.observer){const t={root:null,rootMargin:`0px 0px ${this.distance}px 0px`,threshold:1};this.observer=new IntersectionObserver(this.handleIntersection,t),this.observer.observe(this.$refs.sentinel)}}beforeUnmount(){this.observer&&this.observer.disconnect()}handleIntersection(t){return!!t[0].isIntersecting}};l([f({default:200})],o.prototype,"distance",2);l([h("reached-bottom")],o.prototype,"handleIntersection",1);o=l([u],o);const O={ref:"scrollContainer"},C={ref:"sentinel",style:{height:"1px"}};function P(r,e,t,n,s,i){return b(),I("div",O,[x(r.$slots,"default"),$("div",C,null,512)],512)}const w=v(o,[["render",P]]);export{w as I};