-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path30-es5.bf163dda65642da54077.js
1 lines (1 loc) · 7.45 KB
/
30-es5.bf163dda65642da54077.js
1
!function(){function n(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function i(n,i,e,t,r,o,s){try{var l=n[o](s),c=l.value}catch(a){return void e(a)}l.done?i(c):Promise.resolve(c).then(t,r)}function e(n){return function(){var e=this,t=arguments;return new Promise((function(r,o){var s=n.apply(e,t);function l(n){i(s,r,o,l,c,"next",n)}function c(n){i(s,r,o,l,c,"throw",n)}l(void 0)}))}}function t(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function r(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function o(n,i,e){return i&&r(n.prototype,i),e&&r(n,e),n}(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{"2lz6":function(i,r,s){"use strict";s.r(r),s.d(r,"ion_infinite_scroll",(function(){return d})),s.d(r,"ion_infinite_scroll_content",(function(){return f}));var l=s("ePDZ"),c=s("ws0j"),a=s("PQ8F"),d=function(){function i(n){var e=this;t(this,i),Object(l.q)(this,n),this.ionInfinite=Object(l.i)(this,"ionInfinite",7),this.thrPx=0,this.thrPc=0,this.didFire=!1,this.isBusy=!1,this.isLoading=!1,this.threshold="15%",this.disabled=!1,this.position="bottom",this.onScroll=function(){var n=e.scrollEl;if(!n||!e.canStart())return 1;var i=e.el.offsetHeight;if(0===i)return 2;var t=n.scrollTop,r=n.offsetHeight,o=0!==e.thrPc?r*e.thrPc:e.thrPx;if(("bottom"===e.position?n.scrollHeight-i-t-o-r:t-i-o)<0){if(!e.didFire)return e.isLoading=!0,e.didFire=!0,e.ionInfinite.emit(),3}else e.didFire=!1;return 4}}var r,s;return o(i,[{key:"thresholdChanged",value:function(){var n=this.threshold;n.lastIndexOf("%")>-1?(this.thrPx=0,this.thrPc=parseFloat(n)/100):(this.thrPx=parseFloat(n),this.thrPc=0)}},{key:"disabledChanged",value:function(){var n=this.disabled;n&&(this.isLoading=!1,this.isBusy=!1),this.enableScrollEvents(!n)}},{key:"connectedCallback",value:(s=e(regeneratorRuntime.mark((function n(){var i,e=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(i=this.el.closest("ion-content"))){n.next=10;break}return n.next=4,i.getScrollElement();case 4:this.scrollEl=n.sent,this.thresholdChanged(),this.disabledChanged(),"top"===this.position&&Object(l.g)((function(){e.scrollEl&&(e.scrollEl.scrollTop=e.scrollEl.scrollHeight-e.scrollEl.clientHeight)})),n.next=11;break;case 10:console.error("<ion-infinite-scroll> must be used inside an <ion-content>");case 11:case"end":return n.stop()}}),n,this)}))),function(){return s.apply(this,arguments)})},{key:"disconnectedCallback",value:function(){this.enableScrollEvents(!1),this.scrollEl=void 0}},{key:"complete",value:(r=e(regeneratorRuntime.mark((function n(){var i,e,t=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=this.scrollEl,this.isLoading&&i&&(this.isLoading=!1,"top"===this.position)&&(this.isBusy=!0,e=i.scrollHeight-i.scrollTop,requestAnimationFrame((function(){Object(l.j)((function(){var n=i.scrollHeight-e;requestAnimationFrame((function(){Object(l.g)((function(){i.scrollTop=n,t.isBusy=!1}))}))}))})));case 2:case"end":return n.stop()}}),n,this)}))),function(){return r.apply(this,arguments)})},{key:"canStart",value:function(){return!(this.disabled||this.isBusy||!this.scrollEl||this.isLoading)}},{key:"enableScrollEvents",value:function(n){this.scrollEl&&(n?this.scrollEl.addEventListener("scroll",this.onScroll):this.scrollEl.removeEventListener("scroll",this.onScroll))}},{key:"render",value:function(){var i,e=Object(c.b)(this),t=this.disabled;return Object(l.l)(l.c,{class:(i={},n(i,e,!0),n(i,"infinite-scroll-loading",this.isLoading),n(i,"infinite-scroll-enabled",!t),i)})}},{key:"el",get:function(){return Object(l.m)(this)}}],[{key:"watchers",get:function(){return{threshold:["thresholdChanged"],disabled:["disabledChanged"]}}}]),i}();d.style="ion-infinite-scroll{display:none;width:100%}.infinite-scroll-enabled{display:block}";var f=function(){function i(n){t(this,i),Object(l.q)(this,n)}return o(i,[{key:"componentDidLoad",value:function(){if(void 0===this.loadingSpinner){var n=Object(c.b)(this);this.loadingSpinner=c.c.get("infiniteLoadingSpinner",c.c.get("spinner","ios"===n?"lines":"crescent"))}}},{key:"render",value:function(){var i,e=Object(c.b)(this);return Object(l.l)(l.c,{class:(i={},n(i,e,!0),n(i,"infinite-scroll-content-"+e,!0),i)},Object(l.l)("div",{class:"infinite-loading"},this.loadingSpinner&&Object(l.l)("div",{class:"infinite-loading-spinner"},Object(l.l)("ion-spinner",{name:this.loadingSpinner})),this.loadingText&&Object(l.l)("div",{class:"infinite-loading-text",innerHTML:Object(a.a)(this.loadingText)})))}}]),i}();f.style={ios:"ion-infinite-scroll-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-height:84px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.infinite-loading{margin-left:0;margin-right:0;margin-top:0;margin-bottom:32px;display:none;width:100%}.infinite-loading-text{margin-left:32px;margin-right:32px;margin-top:4px;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.infinite-loading-text{margin-left:unset;margin-right:unset;-webkit-margin-start:32px;margin-inline-start:32px;-webkit-margin-end:32px;margin-inline-end:32px}}.infinite-scroll-loading ion-infinite-scroll-content>.infinite-loading{display:block}.infinite-scroll-content-ios .infinite-loading-text{color:var(--ion-color-step-600, #666666)}.infinite-scroll-content-ios .infinite-loading-spinner .spinner-lines-ios line,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-lines-small-ios line,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-crescent circle{stroke:var(--ion-color-step-600, #666666)}.infinite-scroll-content-ios .infinite-loading-spinner .spinner-bubbles circle,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-circles circle,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-dots circle{fill:var(--ion-color-step-600, #666666)}",md:"ion-infinite-scroll-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-height:84px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.infinite-loading{margin-left:0;margin-right:0;margin-top:0;margin-bottom:32px;display:none;width:100%}.infinite-loading-text{margin-left:32px;margin-right:32px;margin-top:4px;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.infinite-loading-text{margin-left:unset;margin-right:unset;-webkit-margin-start:32px;margin-inline-start:32px;-webkit-margin-end:32px;margin-inline-end:32px}}.infinite-scroll-loading ion-infinite-scroll-content>.infinite-loading{display:block}.infinite-scroll-content-md .infinite-loading-text{color:var(--ion-color-step-600, #666666)}.infinite-scroll-content-md .infinite-loading-spinner .spinner-lines-md line,.infinite-scroll-content-md .infinite-loading-spinner .spinner-lines-small-md line,.infinite-scroll-content-md .infinite-loading-spinner .spinner-crescent circle{stroke:var(--ion-color-step-600, #666666)}.infinite-scroll-content-md .infinite-loading-spinner .spinner-bubbles circle,.infinite-scroll-content-md .infinite-loading-spinner .spinner-circles circle,.infinite-scroll-content-md .infinite-loading-spinner .spinner-dots circle{fill:var(--ion-color-step-600, #666666)}"}}}])}();