System.register(["./index-legacy.eb062188.js","./use-tab-status-legacy.91417466.js"],(function(e){"use strict";var i,r,t,o,n,a,l,d,s,u,c,f,g,v,h,p,b,x,m,T;return{setters:[function(e){i=e.t,r=e.w,t=e.u,o=e.v,n=e.d,a=e.R,l=e.ap,d=e.y,s=e.Z,u=e.az,c=e.$,f=e.W,g=e.a0,v=e.c,h=e._,p=e.an,b=e.aA,x=e.L,m=e.D},function(e){T=e.u}],execute:function(){const[y,k,B]=i("list"),S={error:Boolean,offset:r(300),loading:Boolean,disabled:Boolean,finished:Boolean,scroller:Object,errorText:String,direction:t("down"),loadingText:String,finishedText:String,immediateCheck:o};var j=n({name:y,props:S,emits:["load","update:error","update:loading"],setup(e,{emit:i,slots:r}){const t=a(e.loading),o=a(),n=a(),m=T(),y=l(o),S=d((()=>e.scroller||y.value)),j=()=>{h((()=>{if(t.value||e.finished||e.disabled||e.error||!1===(null==m?void 0:m.value))return;const{direction:r}=e,a=+e.offset,l=p(S);if(!l.height||b(o))return;let d=!1;const s=p(n);d="up"===r?l.top-s.top<=a:s.bottom-l.bottom<=a,d&&(t.value=!0,i("update:loading",!0),i("load"))}))},w=()=>{if(e.finished){const i=r.finished?r.finished():e.finishedText;if(i)return v("div",{class:k("finished-text")},[i])}},C=()=>{i("update:error",!1),j()},L=()=>{if(e.error){const i=r.error?r.error():e.errorText;if(i)return v("div",{role:"button",class:k("error-text"),tabindex:0,onClick:C},[i])}},z=()=>{if(t.value&&!e.finished&&!e.disabled)return v("div",{class:k("loading")},[r.loading?r.loading():v(x,{class:k("loading-icon")},{default:()=>[e.loadingText||B("loading")]})])};return s((()=>[e.loading,e.finished,e.error]),j),m&&s(m,(e=>{e&&j()})),u((()=>{t.value=e.loading})),c((()=>{e.immediateCheck&&j()})),f({check:j}),g("scroll",j,{target:S,passive:!0}),()=>{var i;const a=null==(i=r.default)?void 0:i.call(r),l=v("div",{ref:n,class:k("placeholder")},null);return v("div",{ref:o,role:"feed",class:k(),"aria-busy":t.value},["down"===e.direction?a:l,z(),w(),L(),"up"===e.direction?a:l])}}});e("L",m(j))}}}));