!function(){function e(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var t,i,o=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(t=r.next()).done)&&(o.push(t.value),!n||o.length!==n);a=!0);}catch(u){l=!0,i=u}finally{try{a||null==r.return||r.return()}finally{if(l)throw i}}return o}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return n(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return n(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}System.register(["./index-legacy.2ae28dc5.js","./use-tab-status-legacy.17f6d490.js"],(function(n){"use strict";var r,t,i,o,a,l,u,d,f,c,s,v,g,h,y,p,m,b,x;return{setters:[function(e){r=e.m,t=e.q,i=e.n,o=e.t,a=e.d,l=e.S,u=e.ak,d=e.E,f=e.ay,c=e.X,s=e.G,v=e.Y,g=e.k,h=e.W,y=e.at,p=e.aq,m=e.L,b=e.y},function(e){x=e.u}],execute:function(){var S=e(r("list"),3),T=S[0],k=S[1],w=S[2],A={error:Boolean,offset:t(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:i("down"),loadingText:String,finishedText:String,immediateCheck:o},j=a({name:T,props:A,emits:["load","update:error","update:loading"],setup:function(e,n){var r=n.emit,t=n.slots,i=l(e.loading),o=l(),a=l(),b=x(),S=u(o),T=function(){h((function(){if(!(i.value||e.finished||e.disabled||e.error||!1===(null==b?void 0:b.value))){var n=e.offset,t=e.direction,l=y(S);if(l.height&&!p(o)){var u=y(a);("up"===t?l.top-u.top<=n:u.bottom-l.bottom<=n)&&(i.value=!0,r("update:loading",!0),r("load"))}}}))},A=function(){if(e.finished){var n=t.finished?t.finished():e.finishedText;if(n)return g("div",{class:k("finished-text")},[n])}},j=function(){r("update:error",!1),T()},B=function(){if(e.error){var n=t.error?t.error():e.errorText;if(n)return g("div",{role:"button",class:k("error-text"),tabindex:0,onClick:j},[n])}},C=function(){if(i.value&&!e.finished&&!e.disabled)return g("div",{class:k("loading")},[t.loading?t.loading():g(m,{class:k("loading-icon")},{default:function(){return[e.loadingText||w("loading")]}})])};return d((function(){return[e.loading,e.finished,e.error]}),T),b&&d(b,(function(e){e&&T()})),f((function(){i.value=e.loading})),c((function(){e.immediateCheck&&T()})),s({check:T}),v("scroll",T,{target:S,passive:!0}),function(){var n,r=null==(n=t.default)?void 0:n.call(t),l=g("div",{ref:a,class:k("placeholder")},null);return g("div",{ref:o,role:"feed",class:k(),"aria-busy":i.value},["down"===e.direction?r:l,C(),A(),B(),"up"===e.direction?r:l])}}});n("L",b(j))}}}))}();
