(function framework7ComponentLoader(n,i){void 0===i&&(i=!0);var e=n.$,t=(n.Template7,n.utils),o=(n.getDevice,n.getSupport,n.Class,n.Modal,n.ConstructorMethods,n.ModalMethods,t.bindMethods),r={handle:function(n,i){var t,o=e(n),r=o[0].scrollTop,l=o[0].scrollHeight,c=o[0].offsetHeight,f=o[0].getAttribute("data-infinite-distance"),a=o.find(".virtual-list"),s=o.hasClass("infinite-scroll-top");if(f||(f=50),"string"==typeof f&&f.indexOf("%")>=0&&(f=parseInt(f,10)/100*c),f>c&&(f=c),s)r<f&&(o.trigger("infinite",i),this.emit("infinite",o[0],i));else if(r+c>=l-f){if(a.length>0&&(t=a.eq(-1)[0].f7VirtualList)&&!t.reachEnd&&!t.params.updatableScroll)return;o.trigger("infinite",i),this.emit("infinite",o[0],i)}},create:function(n){var i=e(n),t=this;function o(n){t.infiniteScroll.handle(this,n)}i.each((function(n){n.f7InfiniteScrollHandler=o,n.addEventListener("scroll",n.f7InfiniteScrollHandler)}))},destroy:function(n){e(n).each((function(n){n.removeEventListener("scroll",n.f7InfiniteScrollHandler),delete n.f7InfiniteScrollHandler}))}},l={name:"infiniteScroll",create:function(){o(this,{infiniteScroll:r})},on:{tabMounted:function(n){var i=this,t=e(n),o=t.find(".infinite-scroll-content");t.is(".infinite-scroll-content")&&o.add(t),o.each((function(n){i.infiniteScroll.create(n)}))},tabBeforeRemove:function(n){var i=e(n),t=this,o=i.find(".infinite-scroll-content");i.is(".infinite-scroll-content")&&o.add(i),o.each((function(n){t.infiniteScroll.destroy(n)}))},pageInit:function(n){var i=this;n.$el.find(".infinite-scroll-content").each((function(n){i.infiniteScroll.create(n)}))},pageBeforeRemove:function(n){var i=this;n.$el.find(".infinite-scroll-content").each((function(n){i.infiniteScroll.destroy(n)}))}}};if(i){if(n.prototype.modules&&n.prototype.modules[l.name])return;n.use(l),n.instance&&(n.instance.useModuleParams(l,n.instance.params),n.instance.useModule(l))}return l}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))
