@ionic/core
Version:
Base components for Ionic
4 lines • 2.92 kB
JavaScript
var __awaiter=this&&this.__awaiter||function(r,n,t,e){function i(r){return r instanceof t?r:new t((function(n){n(r)}))}return new(t||(t=Promise))((function(t,o){function u(r){try{a(e.next(r))}catch(r){o(r)}}function c(r){try{a(e["throw"](r))}catch(r){o(r)}}function a(r){r.done?t(r.value):i(r.value).then(u,c)}a((e=e.apply(r,n||[])).next())}))};var __generator=this&&this.__generator||function(r,n){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},e,i,o,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(r){return function(n){return a([r,n])}}function a(c){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,c[0]&&(t=0)),t)try{if(e=1,i&&(o=c[0]&2?i["return"]:c[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;if(i=0,o)c=[c[0]&2,o.value];switch(c[0]){case 0:case 1:o=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;i=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1];o=c;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(c);break}if(o[2])t.ops.pop();t.trys.pop();continue}c=n.call(r,t)}catch(r){c=[6,r];i=0}finally{e=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/System.register(["./p-455cd7cc.system.js","./p-0ec5b7cf.system.js"],(function(r){"use strict";var n,t;return{setters:[function(r){n=r.c},function(r){t=r.b}],execute:function(){var e=this;var i="ION-CONTENT";var o=r("b","ion-content");var u=r("I",".ion-content-scroll-host");var c="".concat(o,", ").concat(u);var a=r("i",(function(r){return r.tagName===i}));var f=r("g",(function(r){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!a(r))return[3,2];return[4,new Promise((function(t){return n(r,t)}))];case 1:t.sent();return[2,r.getScrollElement()];case 2:return[2,r]}}))}))}));var s=r("a",(function(r){var n=r.querySelector(u);if(n){return n}return r.querySelector(c)}));var v=r("f",(function(r){return r.closest(c)}));var h=r("s",(function(r,n){if(a(r)){var t=r;return t.scrollToTop(n)}return Promise.resolve(r.scrollTo({top:0,left:0,behavior:n>0?"smooth":"auto"}))}));var l=r("c",(function(r,n,t,e){if(a(r)){var i=r;return i.scrollByPoint(n,t,e)}return Promise.resolve(r.scrollBy({top:t,left:n,behavior:e>0?"smooth":"auto"}))}));var w=r("p",(function(r){return t(r,o)}));var y=r("d",(function(r){if(a(r)){var n=r;var t=n.scrollY;n.scrollY=false;return t}else{r.style.setProperty("overflow","hidden");return true}}));var b=r("r",(function(r,n){if(a(r)){r.scrollY=n}else{r.style.removeProperty("overflow")}}))}}}));