!function(){function e(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,i,o,a,l=[],u=!0,f=!1;try{if(o=(n=n.call(e)).next,0===r){if(Object(n)!==n)return;u=!1}else for(;!(u=(t=o.call(n)).done)&&(l.push(t.value),l.length!==r);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return l}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return r(e,n);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 r(e,n)}(e,n)||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 r(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}System.register(["./index-legacy-33e7c04a.js"],(function(r,n){"use strict";var t,i,o,a,l,u,f,d,c,s,v,g,h,m,p,b,y,x,S;return{setters:[function(e){t=e.Q,i=e.i,o=e.l,a=e.m,l=e.t,u=e.d,f=e.q,d=e.az,c=e.x,s=e.bd,v=e.E,g=e.a8,h=e.a7,m=e.g,p=e.L,b=e.aa,y=e.aD,x=e.at,S=e.w}],execute:function(){var n=r("T",Symbol()),T=e(i("list"),3),w=T[0],j=T[1],A=T[2],k={error:Boolean,offset:o(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:a("down"),loadingText:String,finishedText:String,immediateCheck:l},B=u({name:w,props:k,emits:["load","update:error","update:loading"],setup:function(e,r){var i=r.emit,o=r.slots,a=f(e.loading),l=f(),u=f(),S=t(n,null),T=d(l),w=function(){p((function(){if(!(a.value||e.finished||e.disabled||e.error||!1===(null==S?void 0:S.value))){var r=e.direction,n=+e.offset,t=b(T);if(t.height&&!y(l)){var o=b(u);("up"===r?t.top-o.top<=n:o.bottom-t.bottom<=n)&&(a.value=!0,i("update:loading",!0),i("load"))}}}))},k=function(){if(e.finished){var r=o.finished?o.finished():e.finishedText;if(r)return m("div",{class:j("finished-text")},[r])}},B=function(){i("update:error",!1),w()},C=function(){if(e.error){var r=o.error?o.error():e.errorText;if(r)return m("div",{role:"button",class:j("error-text"),tabindex:0,onClick:B},[r])}},O=function(){if(a.value&&!e.finished&&!e.disabled)return m("div",{class:j("loading")},[o.loading?o.loading():m(x,{class:j("loading-icon")},{default:function(){return[e.loadingText||A("loading")]}})])};return c((function(){return[e.loading,e.finished,e.error]}),w),S&&c(S,(function(e){e&&w()})),s((function(){a.value=e.loading})),v((function(){e.immediateCheck&&w()})),g({check:w}),h("scroll",w,{target:T,passive:!0}),function(){var r,n=null==(r=o.default)?void 0:r.call(o),t=m("div",{ref:u,class:j("placeholder")},null);return m("div",{ref:l,role:"feed",class:j(),"aria-busy":a.value},["down"===e.direction?n:t,O(),k(),C(),"up"===e.direction?n:t])}}});r("L",S(B))}}}))}();
