System.register(["./index-legacy-Yo-NYFcD.js"],(function(e,t){"use strict";var i,n,o,r,l,a,s,d,c,v,u,f,g,h,x,p,m,_,b,z;return{setters:[e=>{i=e.aF,n=e.k,o=e.d,r=e.r,l=e.aG,a=e.m,s=e.q,d=e.aH,c=e.o,v=e.K,u=e.J,f=e.b,g=e.Y,h=e.B,x=e.A,p=e.y,m=e.Q,_=e.au,b=e.P,z=e.G}],execute:function(){var t=document.createElement("style");t.textContent=":root{--van-list-text-color: var(--van-text-color-2);--van-list-text-font-size: var(--van-font-size-md);--van-list-text-line-height: 50px;--van-list-loading-icon-size: 16px}.van-list__loading,.van-list__finished-text,.van-list__error-text{color:var(--van-list-text-color);font-size:var(--van-list-text-font-size);line-height:var(--van-list-text-line-height);text-align:center}.van-list__placeholder{height:0;pointer-events:none}.van-list__loading-icon .van-loading__spinner{width:var(--van-list-loading-icon-size);height:var(--van-list-loading-icon-size)}\n",document.head.appendChild(t);const y=Symbol(),[T,k,B]=n("list"),C={error:Boolean,offset:g(300),loading:Boolean,disabled:Boolean,finished:Boolean,scroller:Object,errorText:String,direction:h("down"),loadingText:String,finishedText:String,immediateCheck:x};var S=o({name:T,props:C,emits:["load","update:error","update:loading"],setup(e,{emit:t,slots:n}){const o=r(e.loading),g=r(),h=r(),x=i(y,null),z=l(g),T=a((()=>e.scroller||z.value)),C=()=>{p((()=>{if(o.value||e.finished||e.disabled||e.error||!1===(null==x?void 0:x.value))return;const{direction:i}=e,n=+e.offset,r=m(T);if(!r.height||_(g))return;let l=!1;const a=m(h);l="up"===i?r.top-a.top<=n:a.bottom-r.bottom<=n,l&&(o.value=!0,t("update:loading",!0),t("load"))}))},S=()=>{if(e.finished){const t=n.finished?n.finished():e.finishedText;if(t)return f("div",{class:k("finished-text")},[t])}},w=()=>{t("update:error",!1),C()},j=()=>{if(e.error){const t=n.error?n.error():e.errorText;if(t)return f("div",{role:"button",class:k("error-text"),tabindex:0,onClick:w},[t])}},G=()=>{if(o.value&&!e.finished&&!e.disabled)return f("div",{class:k("loading")},[n.loading?n.loading():f(b,{class:k("loading-icon")},{default:()=>[e.loadingText||B("loading")]})])};return s((()=>[e.loading,e.finished,e.error]),C),x&&s(x,(e=>{e&&C()})),d((()=>{o.value=e.loading})),c((()=>{e.immediateCheck&&C()})),v({check:C}),u("scroll",C,{target:T,passive:!0}),()=>{var t;const i=null==(t=n.default)?void 0:t.call(n),r=f("div",{ref:h,class:k("placeholder")},null);return f("div",{ref:g,role:"feed",class:k(),"aria-busy":o.value},["down"===e.direction?i:r,G(),S(),j(),"up"===e.direction?i:r])}}});e("L",z(S))}}}));
