!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){var t,i,o,a,l=[],u=!0,f=!1;try{if(o=(r=r.call(e)).next,0===n){if(Object(r)!==r)return;u=!1}else for(;!(u=(t=o.call(r)).done)&&(l.push(t.value),l.length!==n);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(f)throw i}}return l}}(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-f29cc40f.js","./use-tab-status-legacy-f890f0e4.js"],(function(n,r){"use strict";var t,i,o,a,l,u,f,d,c,s,v,g,h,p,y,b,m,x,j;return{setters:[function(e){t=e.j,i=e.an,o=e.n,a=e.v,l=e.d,u=e.i,f=e.aD,d=e.w,c=e._,s=e.o,v=e.aj,g=e.g,h=e.y,p=e.Y,y=e.aE,b=e.a7,m=e.ao,x=e.D},function(e){j=e.u}],execute:function(){var r=e(t("list"),3),S=r[0],w=r[1],T=r[2],A={error:Boolean,offset:i(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:o("down"),loadingText:String,finishedText:String,immediateCheck:a},B=l({name:S,props:A,emits:["load","update:error","update:loading"],setup:function(e,n){var r=n.emit,t=n.slots,i=u(e.loading),o=u(),a=u(),l=j(),x=f(o),S=function(){h((function(){if(!(i.value||e.finished||e.disabled||e.error||!1===(null==l?void 0:l.value))){var n=e.direction,t=+e.offset,u=p(x);if(u.height&&!y(o)){var f=p(a);("up"===n?u.top-f.top<=t:f.bottom-u.bottom<=t)&&(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:w("finished-text")},[n])}},B=function(){r("update:error",!1),S()},k=function(){if(e.error){var n=t.error?t.error():e.errorText;if(n)return g("div",{role:"button",class:w("error-text"),tabindex:0,onClick:B},[n])}},C=function(){if(i.value&&!e.finished&&!e.disabled)return g("div",{class:w("loading")},[t.loading?t.loading():g(b,{class:w("loading-icon")},{default:function(){return[e.loadingText||T("loading")]}})])};return d((function(){return[e.loading,e.finished,e.error]}),S),l&&d(l,(function(e){e&&S()})),c((function(){i.value=e.loading})),s((function(){e.immediateCheck&&S()})),m({check:S}),v("scroll",S,{target:x,passive:!0}),function(){var n,r=null==(n=t.default)?void 0:n.call(t),l=g("div",{ref:a,class:w("placeholder")},null);return g("div",{ref:o,role:"feed",class:w(),"aria-busy":i.value},["down"===e.direction?r:l,C(),A(),k(),"up"===e.direction?r:l])}}});n("L",x(B))}}}))}();
