UNPKG

ngx-owl-carousel-o

Version:
1 lines 60.2 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("rxjs"),require("@angular/platform-browser"),require("rxjs/operators"),require("@angular/router"),require("@angular/animations")):"function"==typeof define&&define.amd?define("ngx-owl-carousel-o",["exports","@angular/core","@angular/common","rxjs","@angular/platform-browser","rxjs/operators","@angular/router","@angular/animations"],e):e((t=t||self)["ngx-owl-carousel-o"]={},t.ng.core,t.ng.common,t.rxjs,t.ng.platformBrowser,t.rxjs.operators,t.ng.router,t.ng.animations)}(this,function(t,e,i,s,n,r,a,o){"use strict";var u=function(t,e){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function l(t,e){function i(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var c=function(){return(c=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function h(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a}function p(t,e){return function(i,s){e(i,s,t)}}function d(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function g(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var s,n,r=i.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(s=r.next()).done;)a.push(s.value)}catch(o){n={error:o}}finally{try{s&&!s.done&&(i=r["return"])&&i.call(r)}finally{if(n)throw n.error}}return a}function f(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}var v,m,y=function(){function t(t){this.eventManager=t,this.resizeSubject=new s.Subject,this.eventManager.addGlobalEventListener("window","resize",this.onResize.bind(this)),this.eventManager.addGlobalEventListener("window","onload",this.onLoaded.bind(this))}return Object.defineProperty(t.prototype,"onResize$",{get:function(){return this.resizeSubject.asObservable()},enumerable:!0,configurable:!0}),t.prototype.onResize=function(t){this.resizeSubject.next(t.target)},t.prototype.onLoaded=function(t){this.windowWidth=t.target},t=h([e.Injectable(),d("design:paramtypes",[n.EventManager])],t)}(),b=function(){this.items=3,this.loop=!1,this.center=!1,this.rewind=!1,this.mouseDrag=!0,this.touchDrag=!0,this.pullDrag=!0,this.freeDrag=!1,this.margin=0,this.stagePadding=0,this.merge=!1,this.mergeFit=!0,this.autoWidth=!1,this.startPosition=0,this.rtl=!1,this.smartSpeed=250,this.fluidSpeed=!1,this.dragEndSpeed=!1,this.responsive={},this.responsiveRefreshRate=200,this.nav=!1,this.navText=["prev","next"],this.navSpeed=!1,this.slideBy=1,this.dots=!0,this.dotsEach=!1,this.dotsData=!1,this.dotsSpeed=!1,this.autoplay=!1,this.autoplayTimeout=5e3,this.autoplayHoverPause=!1,this.autoplaySpeed=!1,this.lazyLoad=!1,this.lazyLoadEager=0,this.slideTransition="",this.animateOut=!1,this.animateIn=!1,this.autoHeight=!1,this.URLhashListener=!1},_=function(){this.items="number",this.loop="boolean",this.center="boolean",this.rewind="boolean",this.mouseDrag="boolean",this.touchDrag="boolean",this.pullDrag="boolean",this.freeDrag="boolean",this.margin="number",this.stagePadding="number",this.merge="boolean",this.mergeFit="boolean",this.autoWidth="boolean",this.startPosition="number|string",this.rtl="boolean",this.smartSpeed="number",this.fluidSpeed="boolean",this.dragEndSpeed="number|boolean",this.responsive={},this.responsiveRefreshRate="number",this.nav="boolean",this.navText="string[]",this.navSpeed="number|boolean",this.slideBy="number|string",this.dots="boolean",this.dotsEach="number|boolean",this.dotsData="boolean",this.dotsSpeed="number|boolean",this.autoplay="boolean",this.autoplayTimeout="number",this.autoplayHoverPause="boolean",this.autoplaySpeed="number|boolean",this.lazyLoad="boolean",this.lazyLoadEager="number",this.slideTransition="string",this.animateOut="string|boolean",this.animateIn="string|boolean",this.autoHeight="boolean",this.URLhashListener="boolean"},S=function(){function t(t){this.errorHandler=t}return t.prototype.log=function(t){for(var i=[],s=1;s<arguments.length;s++)i[s-1]=arguments[s];e.isDevMode()&&console.log.apply(console,f([t],i))},t.prototype.error=function(t){this.errorHandler.handleError(t)},t.prototype.warn=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];console.warn.apply(console,f([t],e))},t=h([e.Injectable(),d("design:paramtypes",[e.ErrorHandler])],t)}();!function(t){t.Event="event",t.State="state"}(v||(v={})),function(t){t.Default="default",t.Inner="inner",t.Outer="outer"}(m||(m={}));var D=function(){function t(t){var e=this;this.logger=t,this._viewSettingsShipper$=new s.Subject,this._initializedCarousel$=new s.Subject,this._changeSettingsCarousel$=new s.Subject,this._changedSettingsCarousel$=new s.Subject,this._translateCarousel$=new s.Subject,this._translatedCarousel$=new s.Subject,this._resizeCarousel$=new s.Subject,this._resizedCarousel$=new s.Subject,this._refreshCarousel$=new s.Subject,this._refreshedCarousel$=new s.Subject,this._dragCarousel$=new s.Subject,this._draggedCarousel$=new s.Subject,this.settings={items:0},this.owlDOMData={rtl:!1,isResponsive:!1,isRefreshed:!1,isLoaded:!1,isLoading:!1,isMouseDragable:!1,isGrab:!1,isTouchDragable:!1},this.stageData={transform:"translate3d(0px,0px,0px)",transition:"0s",width:0,paddingL:0,paddingR:0},this._items=[],this._widths=[],this._supress={},this._plugins={},this._current=null,this._clones=[],this._mergers=[],this._speed=null,this._coordinates=[],this._breakpoint=null,this.clonedIdPrefix="cloned-",this._options={},this._invalidated={},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},this._pipe=[{filter:["width","items","settings"],run:function(t){t.current=e._items&&e._items[e.relative(e._current)].id}},{filter:["width","items","settings"],run:function(t){var i=e.settings.margin||"",s=!e.settings.autoWidth,n=e.settings.rtl,r={"margin-left":n?i:"","margin-right":n?"":i};s||e.slidesData.forEach(function(t){t.marginL=r["margin-left"],t.marginR=r["margin-right"]}),t.css=r}},{filter:["width","items","settings"],run:function(t){var i=+(e.width()/e.settings.items).toFixed(3)-e.settings.margin,s=!e.settings.autoWidth,n=[],r=null,a=e._items.length;for(t.items={merge:!1,width:i};a--;)r=e._mergers[a],r=e.settings.mergeFit&&Math.min(r,e.settings.items)||r,t.items.merge=r>1||t.items.merge,n[a]=s?i*r:e._items[a].width?e._items[a].width:i;e._widths=n,e.slidesData.forEach(function(i,s){i.width=e._widths[s],i.marginR=t.css["margin-right"],i.marginL=t.css["margin-left"]})}},{filter:["items","settings"],run:function(){var t=[],i=e._items,s=e.settings,n=Math.max(2*s.items,4),r=2*Math.ceil(i.length/2),a=[],o=[],u=s.loop&&i.length?s.rewind?n:Math.max(n,r):0;for(u/=2;u--;)t.push(e.normalize(t.length/2,!0)),a.push(c({},e.slidesData[t[t.length-1]])),t.push(e.normalize(i.length-1-(t.length-1)/2,!0)),o.unshift(c({},e.slidesData[t[t.length-1]]));e._clones=t,a=a.map(function(t){return t.id=""+e.clonedIdPrefix+t.id,t.isActive=!1,t.isCloned=!0,t}),o=o.map(function(t){return t.id=""+e.clonedIdPrefix+t.id,t.isActive=!1,t.isCloned=!0,t}),e.slidesData=o.concat(e.slidesData).concat(a)}},{filter:["width","items","settings"],run:function(){for(var t=e.settings.rtl?1:-1,i=e._clones.length+e._items.length,s=[],n=-1,r=0,a=0;++n<i;)r=s[n-1]||0,a=e._widths[e.relative(n)]+e.settings.margin,s.push(r+a*t);e._coordinates=s}},{filter:["width","items","settings"],run:function(){var t=e.settings.stagePadding,i=e._coordinates,s={width:Math.ceil(Math.abs(i[i.length-1]))+2*t,"padding-left":t||"","padding-right":t||""};e.stageData.width=s.width,e.stageData.paddingL=s["padding-left"],e.stageData.paddingR=s["padding-right"]}},{filter:["width","items","settings"],run:function(t){var i=t.current?e.slidesData.findIndex(function(e){return e.id===t.current}):0;i=Math.max(e.minimum(),Math.min(e.maximum(),i)),e.reset(i)}},{filter:["position"],run:function(){e.animate(e.coordinates(e._current))}},{filter:["width","position","items","settings"],run:function(){var t,i,s,n,r,a,o=e.settings.rtl?1:-1,u=2*e.settings.stagePadding,l=[];if("number"==typeof(t=e.coordinates(e.current()))?t+=u:t=0,i=t+e.width()*o,-1===o&&e.settings.center){var c=e._coordinates.filter(function(i){return e.settings.items%2==1?i>=t:i>t});t=c.length?c[c.length-1]:t}for(r=0,a=e._coordinates.length;r<a;r++)s=Math.ceil(e._coordinates[r-1]||0),n=Math.ceil(Math.abs(e._coordinates[r])+u*o),(e._op(s,"<=",t)&&e._op(s,">",i)||e._op(n,"<",t)&&e._op(n,">",i))&&l.push(r);e.slidesData.forEach(function(t){return t.isActive=!1,t}),l.forEach(function(t){e.slidesData[t].isActive=!0}),e.settings.center&&(e.slidesData.forEach(function(t){return t.isCentered=!1,t}),e.slidesData[e.current()].isCentered=!0)}}]}return Object.defineProperty(t.prototype,"invalidated",{get:function(){return this._invalidated},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"states",{get:function(){return this._states},enumerable:!0,configurable:!0}),t.prototype.getViewCurSettings=function(){return this._viewSettingsShipper$.asObservable()},t.prototype.getInitializedState=function(){return this._initializedCarousel$.asObservable()},t.prototype.getChangeState=function(){return this._changeSettingsCarousel$.asObservable()},t.prototype.getChangedState=function(){return this._changedSettingsCarousel$.asObservable()},t.prototype.getTranslateState=function(){return this._translateCarousel$.asObservable()},t.prototype.getTranslatedState=function(){return this._translatedCarousel$.asObservable()},t.prototype.getResizeState=function(){return this._resizeCarousel$.asObservable()},t.prototype.getResizedState=function(){return this._resizedCarousel$.asObservable()},t.prototype.getRefreshState=function(){return this._refreshCarousel$.asObservable()},t.prototype.getRefreshedState=function(){return this._refreshedCarousel$.asObservable()},t.prototype.getDragState=function(){return this._dragCarousel$.asObservable()},t.prototype.getDraggedState=function(){return this._draggedCarousel$.asObservable()},t.prototype.setOptions=function(t){var e=new b,i=this._validateOptions(t,e);this._options=c({},e,i)},t.prototype._validateOptions=function(t,e){var i=this,s=c({},t),n=new _,r=function(s,n){return i.logger.log("options."+n+" must be type of "+s+"; "+n+"="+t[n]+" skipped to defaults: "+n+"="+e[n]),e[n]},a=function(t){if(s.hasOwnProperty(t))if("number"===n[t])o._isNumeric(s[t])?(s[t]=+s[t],s[t]="items"===t?o._validateItems(s[t]):s[t]):s[t]=r(n[t],t);else if("boolean"===n[t]&&"boolean"!=typeof s[t])s[t]=r(n[t],t);else if("number|boolean"!==n[t]||o._isNumberOrBoolean(s[t]))if("number|string"!==n[t]||o._isNumberOrString(s[t]))if("string|boolean"!==n[t]||o._isStringOrBoolean(s[t])){if("string[]"===n[t])if(Array.isArray(s[t])){var e=!1;s[t].forEach(function(t){e="string"==typeof t}),e||(s[t]=r(n[t],t))}else s[t]=r(n[t],t)}else s[t]=r(n[t],t);else s[t]=r(n[t],t);else s[t]=r(n[t],t)},o=this;for(var u in s)a(u);return s},t.prototype._validateItems=function(t){var e;return t>this._items.length?(e=this._items.length,this.logger.log("The option 'items' in your options is bigger than the number of slides. This option is updated to the current number of slides and the navigation got disabled")):(t===this._items.length&&(this.settings.dots||this.settings.nav)&&this.logger.log("Option 'items' in your options is equal to the number of slides. So the navigation got disabled"),e=t),e},t.prototype.setCarouselWidth=function(t){this._width=t},t.prototype.setup=function(t,e,i){this.setCarouselWidth(t),this.setItems(e),this._defineSlidesData(),this.setOptions(i),this.settings=c({},this._options),this.setOptionsForViewport(),this._trigger("change",{property:{name:"settings",value:this.settings}}),this.invalidate("settings"),this._trigger("changed",{property:{name:"settings",value:this.settings}})},t.prototype.setOptionsForViewport=function(){var t=this,e=this._width,i=this._options.responsive,s=-1;if(Object.keys(i).length)if(e){for(var n in i)i.hasOwnProperty(n)&&+n<=e&&+n>s&&(s=Number(n));this.settings=c({},this._options,i[s],{items:i[s]&&i[s].items?this._validateItems(i[s].items):this._options.items}),delete this.settings.responsive,this.owlDOMData.isResponsive=!0,this.owlDOMData.isMouseDragable=this.settings.mouseDrag,this.owlDOMData.isTouchDragable=this.settings.touchDrag;var r=[];this._items.forEach(function(e){var i=t.settings.merge?e.dataMerge:1;r.push(i)}),this._mergers=r,this._breakpoint=s,this.invalidate("settings")}else this.settings.items=1},t.prototype.initialize=function(t){var e=this;this.enter("initializing"),this.owlDOMData.rtl=this.settings.rtl,this._mergers.length&&(this._mergers=[]),t.forEach(function(t){var i=e.settings.merge?t.dataMerge:1;e._mergers.push(i)}),this._clones=[],this.reset(this._isNumeric(this.settings.startPosition)?+this.settings.startPosition:0),this.invalidate("items"),this.refresh(),this.owlDOMData.isLoaded=!0,this.owlDOMData.isMouseDragable=this.settings.mouseDrag,this.owlDOMData.isTouchDragable=this.settings.touchDrag,this.sendChanges(),this.leave("initializing"),this._trigger("initialized")},t.prototype.sendChanges=function(){this._viewSettingsShipper$.next({owlDOMData:this.owlDOMData,stageData:this.stageData,slidesData:this.slidesData,navData:this.navData,dotsData:this.dotsData})},t.prototype._optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=0,this.settings.merge=!1)},t.prototype.update=function(){for(var t=this,e=0,i=this._pipe.length,s=function(e){return t._invalidated[e]},n={};e<i;){var r=this._pipe[e].filter.filter(s);(this._invalidated.all||r.length>0)&&this._pipe[e].run(n),e++}this.slidesData.forEach(function(e){return e.classes=t.setCurSlideClasses(e)}),this.sendChanges(),this._invalidated={},this.is("valid")||this.enter("valid")},t.prototype.width=function(t){switch(t=t||m.Default){case m.Inner:case m.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},t.prototype.refresh=function(){this.enter("refreshing"),this._trigger("refresh"),this._defineSlidesData(),this.setOptionsForViewport(),this._optionsLogic(),this.update(),this.leave("refreshing"),this._trigger("refreshed")},t.prototype.onResize=function(t){if(!this._items.length)return!1;this.setCarouselWidth(t),this.enter("resizing"),this._trigger("resize"),this.invalidate("width"),this.refresh(),this.leave("resizing"),this._trigger("resized")},t.prototype.prepareDragging=function(t){var e,i;return e={x:+(i=this.stageData.transform.replace(/.*\(|\)| |[^,-\d]\w|\)/g,"").split(","))[0],y:+i[1]},this.is("animating")&&this.invalidate("position"),"mousedown"===t.type&&(this.owlDOMData.isGrab=!0),this.speed(0),e},t.prototype.enterDragging=function(){this.enter("dragging"),this._trigger("drag")},t.prototype.defineNewCoordsDrag=function(t,e){var i=null,s=null,n=null,r=this.difference(e.pointer,this.pointer(t)),a=this.difference(e.stage.start,r);return!!this.is("dragging")&&(this.settings.loop?(i=this.coordinates(this.minimum()),s=+this.coordinates(this.maximum()+1)-i,a.x=((a.x-i)%s+s)%s+i):(i=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),s=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),n=this.settings.pullDrag?-1*r.x/5:0,a.x=Math.max(Math.min(a.x,i+n),s+n)),a)},t.prototype.finishDragging=function(t,e,i){var s,n=this.difference(e.pointer,this.pointer(t)),r=e.stage.current,a=["right","left"][+(this.settings.rtl?n.x<+this.settings.rtl:n.x>+this.settings.rtl)];(0!==n.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(+this.settings.dragEndSpeed||this.settings.smartSpeed),s=this.closest(r.x,0!==n.x?a:e.direction),this.current()!==this.current(-1===s?undefined:s)&&(this.invalidate("position"),this.update()),e.direction=a,(Math.abs(n.x)>3||(new Date).getTime()-e.time>300)&&i()),this.is("dragging")&&(this.leave("dragging"),this._trigger("dragged"))},t.prototype.closest=function(t,e){var i=this.width(),s=this.coordinates(),n=-1;this.settings.center&&(s=s.map(function(t){return 0===t&&(t+=1e-6),t}));for(var r=0;r<s.length&&("left"===e&&t>s[r]-30&&t<s[r]+30?n=r:"right"===e&&t>s[r]-i-30&&t<s[r]-i+30?n=r+1:this._op(t,"<",s[r])&&this._op(t,">",s[r+1]||s[r]-i)?n="left"===e?r+1:r:null===e&&t>s[r]-30&&t<s[r]+30&&(n=r),-1===n);r++);return this.settings.loop||(this._op(t,">",s[this.minimum()])?n=t=this.minimum():this._op(t,"<",s[this.maximum()])&&(n=t=this.maximum())),n},t.prototype.animate=function(t){var e=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),e&&(this.enter("animating"),this._trigger("translate")),this.stageData.transform="translate3d("+t+"px,0px,0px)",this.stageData.transition=this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")},t.prototype.is=function(t){return this._states.current[t]&&this._states.current[t]>0},t.prototype.current=function(t){if(t===undefined)return this._current;if(0===this._items.length)return undefined;if(t=this.normalize(t),this._current!==t){this._trigger("change",{property:{name:"position",value:t}});this._current=t,this.invalidate("position"),this._trigger("changed",{property:{name:"position",value:this._current}})}return this._current},t.prototype.invalidate=function(t){return"string"==typeof t&&(this._invalidated[t]=!0,this.is("valid")&&this.leave("valid")),Object.keys(this._invalidated)},t.prototype.reset=function(t){(t=this.normalize(t))!==undefined&&(this._speed=0,this._current=t,this._suppress(["translate","translated"]),this.animate(this.coordinates(t)),this._release(["translate","translated"]))},t.prototype.normalize=function(t,e){var i=this._items.length,s=e?0:this._clones.length;return!this._isNumeric(t)||i<1?t=undefined:(t<0||t>=i+s)&&(t=((t-s/2)%i+i)%i+s/2),t},t.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},t.prototype.maximum=function(t){void 0===t&&(t=!1);var e,i,s,n=this.settings,r=this._coordinates.length;if(n.loop)r=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){for(e=this._items.length,i=this.slidesData[--e].width,s=this._width;e--&&!((i+=+this.slidesData[e].width+this.settings.margin)>s););r=e+1}else r=n.center?this._items.length-1:this._items.length-n.items;return t&&(r-=this._clones.length/2),Math.max(r,0)},t.prototype.minimum=function(t){return void 0===t&&(t=!1),t?0:this._clones.length/2},t.prototype.items=function(t){return t===undefined?this._items.slice():(t=this.normalize(t,!0),[this._items[t]])},t.prototype.mergers=function(t){return t===undefined?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},t.prototype.clones=function(t){var e=this._clones.length/2,i=e+this._items.length,s=function(t){return t%2==0?i+t/2:e-(t+1)/2};return t===undefined?this._clones.map(function(t,e){return s(e)}):this._clones.map(function(e,i){return e===t?s(i):null}).filter(function(t){return t})},t.prototype.speed=function(t){return t!==undefined&&(this._speed=t),this._speed},t.prototype.coordinates=function(t){var e,i=this,s=1,n=t-1;return t===undefined?this._coordinates.map(function(t,e){return i.coordinates(e)}):(this.settings.center?(this.settings.rtl&&(s=-1,n=t+1),e=this._coordinates[t],e+=(this.width()-e+(this._coordinates[n]||0))/2*s):e=this._coordinates[n]||0,e=Math.ceil(e))},t.prototype._duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(+i||this.settings.smartSpeed)},t.prototype.to=function(t,e){var i=this,s=this.current(),n=null,r=t-this.relative(s),a=this.maximum(),o=0,u=+(r>0)-+(r<0),l=this._items.length,c=this.minimum();this.settings.loop?(!this.settings.rewind&&Math.abs(r)>l/2&&(r+=-1*u*l),(n=(((t=s+r)-c)%l+l)%l+c)!==t&&n-r<=a&&n-r>0&&(s=n-r,t=n,o=30,this.reset(s),this.sendChanges())):t=this.settings.rewind?(t%(a+=1)+a)%a:Math.max(c,Math.min(a,t)),setTimeout(function(){i.speed(i._duration(s,t,e)),i.current(t),i.update()},o)},t.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},t.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},t.prototype.onTransitionEnd=function(t){if(t!==undefined)return!1;this.leave("animating"),this._trigger("translated")},t.prototype._viewport=function(){var t;return this._width?t=this._width:this.logger.log("Can not detect viewport width."),t},t.prototype.setItems=function(t){this._items=t},t.prototype._defineSlidesData=function(){var t;this.slidesData&&this.slidesData.length&&(t=new Map,this.slidesData.forEach(function(e){e.load&&t.set(e.id,e.load)})),this.slidesData=this._items.map(function(e){return{id:""+e.id,isActive:!1,tplRef:e.tplRef,dataMerge:e.dataMerge,width:0,isCloned:!1,load:!!t&&t.get(e.id),hashFragment:e.dataHash}})},t.prototype.setCurSlideClasses=function(t){var e={active:t.isActive,center:t.isCentered,cloned:t.isCloned,animated:t.isAnimated,"owl-animated-in":t.isDefAnimatedIn,"owl-animated-out":t.isDefAnimatedOut};return this.settings.animateIn&&(e[this.settings.animateIn]=t.isCustomAnimatedIn),this.settings.animateOut&&(e[this.settings.animateOut]=t.isCustomAnimatedOut),e},t.prototype._op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?t>i:t<i;case">":return s?t<i:t>i;case">=":return s?t<=i:t>=i;case"<=":return s?t>=i:t<=i}},t.prototype._trigger=function(t,e,i,s,n){switch(t){case"initialized":this._initializedCarousel$.next(t);break;case"change":this._changeSettingsCarousel$.next(e);break;case"changed":this._changedSettingsCarousel$.next(e);break;case"drag":this._dragCarousel$.next(t);break;case"dragged":this._draggedCarousel$.next(t);break;case"resize":this._resizeCarousel$.next(t);break;case"resized":this._resizedCarousel$.next(t);break;case"refresh":this._refreshCarousel$.next(t);break;case"refreshed":this._refreshedCarousel$.next(t);break;case"translate":this._translateCarousel$.next(t);break;case"translated":this._translatedCarousel$.next(t)}},t.prototype.enter=function(t){var e=this;[t].concat(this._states.tags[t]||[]).forEach(function(t){e._states.current[t]===undefined&&(e._states.current[t]=0),e._states.current[t]++})},t.prototype.leave=function(t){var e=this;[t].concat(this._states.tags[t]||[]).forEach(function(t){(0===e._states.current[t]||e._states.current[t])&&e._states.current[t]--})},t.prototype.register=function(t){var e=this;t.type===v.State&&(this._states.tags[t.name]?this._states.tags[t.name]=this._states.tags[t.name].concat(t.tags):this._states.tags[t.name]=t.tags,this._states.tags[t.name]=this._states.tags[t.name].filter(function(i,s){return e._states.tags[t.name].indexOf(i)===s}))},t.prototype._suppress=function(t){var e=this;t.forEach(function(t){e._supress[t]=!0})},t.prototype._release=function(t){var e=this;t.forEach(function(t){delete e._supress[t]})},t.prototype.pointer=function(t){var e={x:null,y:null};return(t=(t=t.originalEvent||t||window.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(e.x=t.pageX,e.y=t.pageY):(e.x=t.clientX,e.y=t.clientY),e},t.prototype._isNumeric=function(t){return!isNaN(parseFloat(t))},t.prototype._isNumberOrBoolean=function(t){return this._isNumeric(t)||"boolean"==typeof t},t.prototype._isNumberOrString=function(t){return this._isNumeric(t)||"string"==typeof t},t.prototype._isStringOrBoolean=function(t){return"string"==typeof t||"boolean"==typeof t},t.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},t=h([e.Injectable(),d("design:paramtypes",[S])],t)}(),w=function(){function t(t){this.carouselService=t,this._initialized=!1,this._pages=[],this._navData={disabled:!1,prev:{disabled:!1,htmlText:""},next:{disabled:!1,htmlText:""}},this._dotsData={disabled:!1,dots:[]},this.spyDataStreams()}return t.prototype.ngOnDestroy=function(){this.navSubscription.unsubscribe()},t.prototype.spyDataStreams=function(){var t=this,e=this.carouselService.getInitializedState().pipe(r.tap(function(e){t.initialize(),t._updateNavPages(),t.draw(),t.update(),t.carouselService.sendChanges()})),i=this.carouselService.getChangedState().pipe(r.filter(function(t){return"position"===t.property.name}),r.tap(function(e){t.update()})),n=this.carouselService.getRefreshedState().pipe(r.tap(function(){t._updateNavPages(),t.draw(),t.update(),t.carouselService.sendChanges()})),a=s.merge(e,i,n);this.navSubscription=a.subscribe(function(){})},t.prototype.initialize=function(){this._navData.disabled=!0,this._navData.prev.htmlText=this.carouselService.settings.navText[0],this._navData.next.htmlText=this.carouselService.settings.navText[1],this._dotsData.disabled=!0,this.carouselService.navData=this._navData,this.carouselService.dotsData=this._dotsData},t.prototype._updateNavPages=function(){var t,e,i=this.carouselService.clones().length/2,s=i+this.carouselService.items().length,n=this.carouselService.maximum(!0),r=[],a=this.carouselService.settings,o=a.center||a.autoWidth||a.dotsData?1:a.dotsEach||a.items;if(o=+o,"page"!==a.slideBy&&(a.slideBy=Math.min(+a.slideBy,a.items)),a.dots||"page"===a.slideBy)for(t=i,e=0,0;t<s;t++){if(e>=o||0===e){if(r.push({start:Math.min(n,t-i),end:t-i+o-1}),Math.min(n,t-i)===n)break;e=0,0}e+=this.carouselService.mergers(this.carouselService.relative(t))}this._pages=r},t.prototype.draw=function(){var t,e=this,i=this.carouselService.settings,s=this.carouselService.items(),n=s.length<=i.items;if(this._navData.disabled=!i.nav||n,this._dotsData.disabled=!i.dots||n,i.dots)if(t=this._pages.length-this._dotsData.dots.length,i.dotsData&&0!==t)this._dotsData.dots=[],s.forEach(function(t){e._dotsData.dots.push({active:!1,id:"dot-"+t.id,innerContent:t.dotContent,showInnerContent:!0})});else if(t>0)for(var r=this._dotsData.dots.length>0?this._dotsData.dots.length:0,a=0;a<t;a++)this._dotsData.dots.push({active:!1,id:"dot-"+(a+r),innerContent:"",showInnerContent:!1});else t<0&&this._dotsData.dots.splice(t,Math.abs(t));this.carouselService.navData=this._navData,this.carouselService.dotsData=this._dotsData},t.prototype.update=function(){this._updateNavButtons(),this._updateDots()},t.prototype._updateNavButtons=function(){var t=this.carouselService.settings,e=t.loop||t.rewind,i=this.carouselService.relative(this.carouselService.current());t.nav&&(this._navData.prev.disabled=!e&&i<=this.carouselService.minimum(!0),this._navData.next.disabled=!e&&i>=this.carouselService.maximum(!0)),this.carouselService.navData=this._navData},t.prototype._updateDots=function(){var t;this.carouselService.settings.dots&&(this._dotsData.dots.forEach(function(t){!0===t.active&&(t.active=!1)}),t=this._current(),this._dotsData.dots.length&&(this._dotsData.dots[t].active=!0),this.carouselService.dotsData=this._dotsData)},t.prototype._current=function(){var t=this.carouselService.relative(this.carouselService.current()),e=this._pages.filter(function(e,i){return e.start<=t&&e.end>=t}).pop();return this._pages.findIndex(function(t){return t.start===e.start&&t.end===e.end})},t.prototype._getPosition=function(t){var e,i,s=this.carouselService.settings;return"page"===s.slideBy?(e=this._current(),i=this._pages.length,t?++e:--e,e=this._pages[(e%i+i)%i].start):(e=this.carouselService.relative(this.carouselService.current()),i=this.carouselService.items().length,t?e+=+s.slideBy:e-=+s.slideBy),e},t.prototype.next=function(t){this.carouselService.to(this._getPosition(!0),t)},t.prototype.prev=function(t){this.carouselService.to(this._getPosition(!1),t)},t.prototype.to=function(t,e,i){var s;!i&&this._pages.length?(s=this._pages.length,this.carouselService.to(this._pages[(t%s+s)%s].start,e)):this.carouselService.to(t,e)},t.prototype.moveByDot=function(t){var e=this._dotsData.dots.findIndex(function(e){return t===e.id});this.to(e,this.carouselService.settings.dotsSpeed)},t.prototype.toSlideById=function(t){var e=this.carouselService.slidesData.findIndex(function(e){return e.id===t&&!1===e.isCloned});-1!==e&&e!==this.carouselService.current()&&this.carouselService.to(this.carouselService.relative(e),!1)},t=h([e.Injectable(),d("design:paramtypes",[D])],t)}(),O=new e.InjectionToken("WindowToken"),C=function(){function t(){}return Object.defineProperty(t.prototype,"nativeWindow",{get:function(){throw new Error("Not implemented.")},enumerable:!0,configurable:!0}),t}(),x=function(t){function e(){return t.call(this)||this}return l(e,t),Object.defineProperty(e.prototype,"nativeWindow",{get:function(){return window},enumerable:!0,configurable:!0}),e}(C);function M(t,e){if(i.isPlatformBrowser(e))return t.nativeWindow;return{setTimeout:function(t,e){},clearTimeout:function(t){}}}var T={provide:C,useClass:x},I={provide:O,useFactory:M,deps:[C,e.PLATFORM_ID]},P=[T,I],L=new e.InjectionToken("DocumentToken"),E=function(){function t(){}return Object.defineProperty(t.prototype,"nativeDocument",{get:function(){throw new Error("Not implemented.")},enumerable:!0,configurable:!0}),t}(),j=function(t){function e(){return t.call(this)||this}return l(e,t),Object.defineProperty(e.prototype,"nativeDocument",{get:function(){return document},enumerable:!0,configurable:!0}),e}(E);function z(t,e){if(i.isPlatformBrowser(e))return t.nativeDocument;return{hidden:!1,visibilityState:"visible"}}var R={provide:E,useClass:j},A={provide:L,useFactory:z,deps:[E,e.PLATFORM_ID]},k=[R,A],$=function(){function t(t,e,i){this.carouselService=t,this._timeout=null,this._paused=!1,this.winRef=e,this.docRef=i,this.spyDataStreams()}return t.prototype.ngOnDestroy=function(){this.autoplaySubscription.unsubscribe()},t.prototype.spyDataStreams=function(){var t=this,e=this.carouselService.getInitializedState().pipe(r.tap(function(){t.carouselService.settings.autoplay&&t.play()})),i=this.carouselService.getChangedState().pipe(r.tap(function(e){t._handleChangeObservable(e)})),n=this.carouselService.getResizedState().pipe(r.tap(function(){t.carouselService.settings.autoplay?t.play():t.stop()})),a=s.merge(e,i,n);this.autoplaySubscription=a.subscribe(function(){})},t.prototype.play=function(t,e){this._paused&&(this._paused=!1,this._setAutoPlayInterval(1)),this.carouselService.is("rotating")||(this.carouselService.enter("rotating"),this._setAutoPlayInterval())},t.prototype._getNextTimeout=function(t,e){var i=this;return this._timeout&&this.winRef.clearTimeout(this._timeout),this._isArtificialAutoplayTimeout=!!t,this.winRef.setTimeout(function(){i._paused||i.carouselService.is("busy")||i.carouselService.is("interacting")||i.docRef.hidden||i.carouselService.next(e||i.carouselService.settings.autoplaySpeed)},t||this.carouselService.settings.autoplayTimeout)},t.prototype._setAutoPlayInterval=function(t){this._timeout=this._getNextTimeout(t)},t.prototype.stop=function(){this.carouselService.is("rotating")&&(this._paused=!0,this.winRef.clearTimeout(this._timeout),this.carouselService.leave("rotating"))},t.prototype.pause=function(){this.carouselService.is("rotating")&&(this._paused=!0)},t.prototype._handleChangeObservable=function(t){"settings"===t.property.name?this.carouselService.settings.autoplay?this.play():this.stop():"position"===t.property.name&&this.carouselService.settings.autoplay&&this._setAutoPlayInterval()},t.prototype._playAfterTranslated=function(){var t=this;s.of("translated").pipe(r.switchMap(function(e){return t.carouselService.getTranslatedState()}),r.first(),r.filter(function(){return t._isArtificialAutoplayTimeout}),r.tap(function(){return t._setAutoPlayInterval()})).subscribe(function(){})},t.prototype.startPausing=function(){this.carouselService.settings.autoplayHoverPause&&this.carouselService.is("rotating")&&this.pause()},t.prototype.startPlayingMouseLeave=function(){this.carouselService.settings.autoplayHoverPause&&this.carouselService.is("rotating")&&(this.play(),this._playAfterTranslated())},t.prototype.startPlayingTouchEnd=function(){this.carouselService.settings.autoplayHoverPause&&this.carouselService.is("rotating")&&(this.play(),this._playAfterTranslated())},t=h([e.Injectable(),p(1,e.Inject(O)),p(2,e.Inject(L)),d("design:paramtypes",[D,Object,Object])],t)}(),H=function(){function t(t){this.carouselService=t,this.spyDataStreams()}return t.prototype.ngOnDestroy=function(){this.lazyLoadSubscription.unsubscribe()},t.prototype.spyDataStreams=function(){var t=this,e=this.carouselService.getInitializedState().pipe(r.tap(function(){var e=t.carouselService.settings&&!t.carouselService.settings.lazyLoad;t.carouselService.slidesData.forEach(function(t){return t.load=!!e})})),i=this.carouselService.getChangeState(),n=this.carouselService.getResizedState(),a=s.merge(e,i,n).pipe(r.tap(function(e){return t._defineLazyLoadSlides(e)}));this.lazyLoadSubscription=a.subscribe(function(){})},t.prototype._defineLazyLoadSlides=function(t){var e=this;if(this.carouselService.settings&&this.carouselService.settings.lazyLoad&&(t.property&&"position"===t.property.name||"initialized"===t||"resized"===t)){var i=this.carouselService.settings,s=this.carouselService.clones().length,n=i.center&&Math.ceil(i.items/2)||i.items,r=i.center&&-1*n||0,a=(t.property&&t.property.value!==undefined?t.property.value:this.carouselService.current())+r;for(i.lazyLoadEager>0&&(n+=i.lazyLoadEager,i.loop&&(a-=i.lazyLoadEager,n++));r++<n;)this._load(s/2+this.carouselService.relative(a)),s&&this.carouselService.clones(this.carouselService.relative(a)).forEach(function(t){return e._load(t)}),a++}},t.prototype._load=function(t){this.carouselService.slidesData[t].load||(this.carouselService.slidesData[t].load=!0)},t=h([e.Injectable(),d("design:paramtypes",[D])],t)}(),B=function(){function t(t){this.carouselService=t,this.swapping=!0,this.previous=undefined,this.next=undefined,this.spyDataStreams()}return t.prototype.ngOnDestroy=function(){this.animateSubscription.unsubscribe()},t.prototype.spyDataStreams=function(){var t=this,e=this.carouselService.getChangeState().pipe(r.tap(function(e){"position"===e.property.name&&(t.previous=t.carouselService.current(),t.next=e.property.value)})),i=this.carouselService.getDragState(),n=this.carouselService.getDraggedState(),a=this.carouselService.getTranslatedState(),o=s.merge(i,n,a).pipe(r.tap(function(e){return t.swapping="translated"===e})),u=this.carouselService.getTranslateState().pipe(r.tap(function(e){t.swapping&&(t.carouselService._options.animateOut||t.carouselService._options.animateIn)&&t._swap()})),l=s.merge(e,u,o).pipe();this.animateSubscription=l.subscribe(function(){})},t.prototype._swap=function(){if(1===this.carouselService.settings.items){var t;this.carouselService.speed(0);var e=this.carouselService.slidesData[this.previous],i=this.carouselService.slidesData[this.next],s=this.carouselService.settings.animateIn,n=this.carouselService.settings.animateOut;this.carouselService.current()!==this.previous&&(n&&(t=+this.carouselService.coordinates(this.previous)-+this.carouselService.coordinates(this.next),this.carouselService.slidesData.forEach(function(i){i.id===e.id&&(i.left=t+"px",i.isAnimated=!0,i.isDefAnimatedOut=!0,i.isCustomAnimatedOut=!0)})),s&&this.carouselService.slidesData.forEach(function(t){t.id===i.id&&(t.isAnimated=!0,t.isDefAnimatedIn=!0,t.isCustomAnimatedIn=!0)}))}},t.prototype.clear=function(t){var e=this;this.carouselService.slidesData.forEach(function(i){i.id===t&&(i.left="",i.isAnimated=!1,i.isDefAnimatedOut=!1,i.isCustomAnimatedOut=!1,i.isDefAnimatedIn=!1,i.isCustomAnimatedIn=!1,i.classes=e.carouselService.setCurSlideClasses(i))}),this.carouselService.onTransitionEnd()},t=h([e.Injectable(),d("design:paramtypes",[D])],t)}(),F=function(){function t(t){this.carouselService=t,this.spyDataStreams()}return t.prototype.ngOnDestroy=function(){this.autoHeightSubscription.unsubscribe()},t.prototype.spyDataStreams=function(){var t=this,e=this.carouselService.getInitializedState().pipe(r.tap(function(e){t.carouselService.settings.autoHeight?t.update():t.carouselService.slidesData.forEach(function(t){return t.heightState="full"})})),i=this.carouselService.getChangedState().pipe(r.tap(function(e){t.carouselService.settings.autoHeight&&"position"===e.property.name&&t.update()})),n=this.carouselService.getRefreshedState().pipe(r.tap(function(e){t.carouselService.settings.autoHeight&&t.update()})),a=s.merge(e,i,n);this.autoHeightSubscription=a.subscribe(function(){})},t.prototype.update=function(){var t=this.carouselService.settings.items,e=this.carouselService.current(),i=e+t;this.carouselService.settings.center&&(e=t%2==1?e-(t-1)/2:e-t/2,i=t%2==1?e+t:e+t+1),this.carouselService.slidesData.forEach(function(t,s){t.heightState=s>=e&&s<i?"full":"nulled"})},t=h([e.Injectable(),d("design:paramtypes",[D])],t)}(),N=function(){function t(t,e,i){this.carouselService=t,this.route=e,this.router=i,this.spyDataStreams(),this.route||(this.route={fragment:s.of("no route").pipe(r.take(1))}),this.router||(this.router={navigate:function(t,e){}})}return t.prototype.ngOnDestroy=function(){this.hashSubscription.unsubscribe()},t.prototype.spyDataStreams=function(){var t=this,e=this.carouselService.getInitializedState().pipe(r.tap(function(){return t.listenToRoute()})),i=this.carouselService.getChangedState().pipe(r.tap(function(e){if(t.carouselService.settings.URLhashListener&&"position"===e.property.name){var i=t.carouselService.current(),s=t.carouselService.slidesData[i].hashFragment;if(!s||s===t.currentHashFragment)return;t.router.navigate(["./"],{fragment:s,relativeTo:t.route})}})),n=s.merge(e,i);this.hashSubscription=n.subscribe(function(){})},t.prototype.rewind=function(t){var e=this.carouselService.slidesData.findIndex(function(e){return e.hashFragment===t&&!1===e.isCloned});-1!==e&&e!==this.carouselService.current()&&this.carouselService.to(this.carouselService.relative(e),!1)},t.prototype.listenToRoute=function(){var t=this,e="URLHash"===this.carouselService.settings.startPosition?0:2;this.route.fragment.pipe(r.skip(e)).subscribe(function(e){t.currentHashFragment=e,t.rewind(e)})},t=h([e.Injectable(),p(1,e.Optional()),p(2,e.Optional()),d("design:paramtypes",[D,a.ActivatedRoute,a.Router])],t)}(),W=0,q=function(){function t(t){this.tplRef=t,this.id="owl-slide-"+W++,this._dataMerge=1,this.width=0,this.dotContent="",this.dataHash=""}return Object.defineProperty(t.prototype,"dataMerge",{get:function(){return this._dataMerge},set:function(t){this._dataMerge=this.isNumeric(t)?t:1},enumerable:!0,configurable:!0}),t.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},h([e.Input(),d("design:type",Object)],t.prototype,"id",void 0),h([e.Input(),d("design:type",Number),d("design:paramtypes",[Number])],t.prototype,"dataMerge",null),h([e.Input(),d("design:type",Object)],t.prototype,"width",void 0),h([e.Input(),d("design:type",Object)],t.prototype,"dotContent",void 0),h([e.Input(),d("design:type",Object)],t.prototype,"dataHash",void 0),t=h([e.Directive({selector:"ng-template[carouselSlide]"}),d("design:paramtypes",[e.TemplateRef])],t)}(),U=function(){},Q=function(){function t(t,i,s,n,r,a,o,u,l,c,h){this.el=t,this.resizeService=i,this.carouselService=s,this.navigationService=n,this.autoplayService=r,this.lazyLoadService=a,this.animateService=o,this.autoHeightService=u,this.hashService=l,this.logger=c,this.translated=new e.EventEmitter,this.dragging=new e.EventEmitter,this.change=new e.EventEmitter,this.changed=new e.EventEmitter,this.initialized=new e.EventEmitter,this.slidesData=[],this.carouselLoaded=!1,this.docRef=h}return t.prototype.onVisibilityChange=function(t){if(this.carouselService.settings.autoplay)switch(this.docRef.visibilityState){case"visible":this.autoplayService.play();break;case"hidden":this.autoplayService.stop()}},t.prototype.ngOnInit=function(){this.spyDataStreams(),this.carouselWindowWidth=this.el.nativeElement.querySelector(".owl-carousel").clientWidth},t.prototype.ngAfterContentChecked=function(){},t.prototype.ngAfterContentInit=function(){var t=this;this.slides.toArray().length?(this.carouselService.setup(this.carouselWindowWidth,this.slides.toArray(),this.options),this.carouselService.initialize(this.slides.toArray()),this._winResizeWatcher()):this.logger.log("There are no slides to show. So the carousel won't be rendered"),this._slidesChangesSubscription=this.slides.changes.pipe(r.tap(function(e){e.toArray().length?(t.carouselService.setup(t.carouselWindowWidth,e.toArray(),t.options),t.carouselService.initialize(e.toArray())):(t.carouselLoaded=!1,t.logger.log("There are no slides to show. So the carousel won't be re-rendered"))})).subscribe(function(){})},t.prototype.ngOnDestroy=function(){this.resizeSubscription&&this.resizeSubscription.unsubscribe(),this._slidesChangesSubscription&&this._slidesChangesSubscription.unsubscribe(),this._allObservSubscription&&this._allObservSubscription.unsubscribe()},t.prototype.spyDataStreams=function(){var t=this;this._viewCurSettings$=this.carouselService.getViewCurSettings().pipe(r.tap(function(e){t.owlDOMData=e.owlDOMData,t.stageData=e.stageData,t.slidesData=e.slidesData,t.carouselLoaded||(t.carouselLoaded=!0),t.navData=e.navData,t.dotsData=e.dotsData})),this._initializedCarousel$=this.carouselService.getInitializedState().pipe(r.tap(function(){t.gatherTranslatedData(),t.initialized.emit(t.slidesOutputData)})),this._translatedCarousel$=this.carouselService.getTranslatedState().pipe(r.tap(function(){t.gatherTranslatedData(),t.translated.emit(t.slidesOutputData)})),this._changeCarousel$=this.carouselService.getChangeState().pipe(r.tap(function(){t.gatherTranslatedData(),t.change.emit(t.slidesOutputData)})),this._changedCarousel$=this.carouselService.getChangeState().pipe(r.switchMap(function(e){var i=s.of(e).pipe(r.filter(function(){return"position"===e.property.name}),r.switchMap(function(){return s.from(t.slidesData)}),r.skip(e.property.value),r.take(t.carouselService.settings.items),r.map(function(e){var i=t.carouselService.clonedIdPrefix,s=e.id.indexOf(i)>=0?e.id.slice(i.length):e.id;return c({},e,{id:s,isActive:!0})}),r.toArray(),r.map(function(i){return{slides:i,startPosition:t.carouselService.relative(e.property.value)}}));return s.merge(i)}),r.tap(function(e){t.gatherTranslatedData(),t.changed.emit(e.slides.length?e:t.slidesOutputData)})),this._draggingCarousel$=this.carouselService.getDragState().pipe(r.tap(function(){t.gatherTranslatedData(),t.dragging.emit({dragging:!0,data:t.slidesOutputData})}),r.switchMap(function(){return t.carouselService.getDraggedState().pipe(r.map(function(){return!!t.carouselService.is("animating")}))}),r.switchMap(function(e){return e?t.carouselService.getTranslatedState().pipe(r.first()):s.of("not animating")}),r.tap(function(){t.dragging.emit({dragging:!1,data:t.slidesOutputData})})),this._carouselMerge$=s.merge(this._viewCurSettings$,this._translatedCarousel$,this._draggingCarousel$,this._changeCarousel$,this._changedCarousel$,this._initializedCarousel$),this._allObservSubscription=this._carouselMerge$.subscribe(function(){})},t.prototype._winResizeWatcher=function(){var t=this;Object.keys(this.carouselService._options.responsive).length&&(this.resizeSubscription=this.resizeService.onResize$.pipe(r.filter(function(){return t.carouselWindowWidth!==t.el.nativeElement.querySelector(".owl-carousel").clientWidth}),r.delay(this.carouselService.settings.responsiveRefreshRate)).subscribe(function(){t.carouselService.onResize(t.el.nativeElement.querySelector(".owl-carousel").clientWidth),t.carouselWindowWidth=t.el.nativeElement.querySelector(".owl-carousel").clientWidth}))},t.prototype.onTransitionEnd=function(){this.carouselService.onTransitionEnd()},t.prototype.next=function(){this.carouselLoaded&&this.navigationService.next(this.carouselService.settings.navSpeed)},t.prototype.prev=function(){this.carouselLoaded&&this.navigationService.prev(this.carouselService.settings.navSpeed)},t.prototype.moveByDot=function(t){this.carouselLoaded&&this.navigationService.moveByDot(t)},t.prototype.to=function(t){this.carouselLoaded&&this.navigationService.toSlideById(t)},t.prototype.gatherTranslatedData=function(){var t,e=this.carouselService.clonedIdPrefix,i=this.slidesData.filter(function(t){return!0===t.isActive}).map(function(t){return{id:t.id.indexOf(e)>=0?t.id.slice(e.length):t.id,width:t.width,marginL:t.marginL,marginR:t.marginR,center:t.isCentered}});t=this.carouselService.relative(this.carouselService.current()),this.slidesOutputData={startPosition:t,slides:i}},t.prototype.startPausing=function(){this.autoplayService.startPausing()},t.prototype.startPlayML=function(){this.autoplayService.startPlayingMouseLeave()},t.prototype.startPlayTE=function(){this.autoplayService.startPlayingTouchEnd()},h([e.ContentChildren(q),d("design:type",e.QueryList)],t.prototype,"slides",void 0),h([e.Output(),d("design:type",Object)],t.prototype,"translated",void 0),h([e.Output(),d("design:type",Object)],t.prototype,"dragging",void 0),h([e.Output(),d("design:type",Object)],t.prototype,"change",void 0),h([e.Output(),d("design:type",Object)],t.prototype,"changed",void 0),h([e.Output(),d("design:type",Object)],t.prototype,"initialized",void 0),h([e.Input(),d("design:type",Object)],t.prototype,"options",void 0),h([e.HostListener("document:visibilitychange",["$event"]),d("design:type",Function),d("design:paramtypes",[Event]),d("design:returntype",void 0)],t.prototype,"onVisibilityChange",null),t=h([e.Component({selector:"owl-carousel-o",template:'\n <div class="owl-carousel owl-theme" #owlCarousel\n [ngClass]="{\'owl-rtl\': owlDOMData?.rtl,\n \'owl-loaded\': owlDOMData?.isLoaded,\n \'owl-responsive\': owlDOMData?.isResponsive,\n \'owl-drag\': owlDOMData?.isMouseDragable,\n \'owl-grab\': owlDOMData?.isGrab}"\n (mouseover)="startPausing()"\n (mouseleave)="startPlayML()"\n (touchstart)="startPausing()"\n (touchend)="startPlayTE()">\n\n <div *ngIf="carouselLoaded" class="owl-stage-outer">\n <owl-stage [owlDraggable]="{\'isMouseDragable\': owlDOMData?.isMouseDragable, \'isTouchDragable\': owlDOMData?.isTouchDragable}"\n [stageData]="stageData"\n [slidesData]="slidesData"></owl-stage>\n </div> \x3c!-- /.owl-stage-outer --\x3e\n <ng-container *ngIf="slides.toArray().length">\n <div class="owl-nav" [ngClass]="{\'disabled\': navData?.disabled}">\n <div class="owl-prev" [ngClass]="{\'disabled\': navData?.prev?.disabled}" (click)="prev()" [innerHTML]="navData?.prev?.htmlText"></div>\n <div class="owl-next" [ngClass]="{\'disabled\': navData?.next?.disabled}" (click)="next()" [innerHTML]="navData?.next?.htmlText"></div>\n </div> \x3c!-- /.owl-nav --\x3e\n <div class="owl-dots" [ngClass]="{\'disabled\': dotsData?.disabled}">\n <div *ngFor="let dot of dotsData?.dots" class="owl-dot" [ngClass]="{\'active\': dot.active, \'owl-dot-text\': dot.showInnerContent}" (click)="moveByDot(dot.id)">\n <span [innerHTML]="dot.innerContent"></span>\n </div>\n </div> \x3c!-- /.owl-dots --\x3e\n </ng-container>\n </div> \x3c!-- /.owl-carousel owl-loaded --\x3e\n ',providers:[w,$,D,H,B,F,N],styles:[".owl-theme { display: block; }"]}),p(10,e.Inject(L)),d("design:paramtypes",[e.ElementRef,y,D,w,$,H,B,F,N,S,Object])],t)}(),V=function(){},G=function(){function t(t,e,i,n,r){var a=this;this.zone=t,this.el=e,this.renderer=i,this.carouselService=n,this.animateService=r,this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null,active:!1,moving:!1},this._oneDragMove$=new s.Subject,this.bindOneMouseTouchMove=function(t){a._oneMouseTouchMove(t)},this.bindOnDragMove=function(t){a._onDragMove(t)},this.bindOnDragEnd=function(t){a._onDragEnd(t)},this._oneClickHandler=function(){a.listenerOneClick=a.renderer.listen(a._drag.target,"click",function(){return!1}),a.listenerOneClick()}}return t.prototype.onMouseDown=function(t){this.owlDraggable.isMouseDragable&&this._onDragStart(t)},t.prototype.onTouchStart=function(t){this.owlDraggable.isTouchDragable&&this._onDragStart(t)},t.prototype.onTouchCancel=function(t){this._onDragEnd(t)},t.prototype.onDragStart=function(){if(this.owlDraggable.isMouseDragable)return!1},t.prototype.onSelectStart=function(){if(this.owlDraggable.isMouseDragable)return!1},t.prototype.ngOnInit=function(){var t=this;this._oneMoveSubsription=this._oneDragMove$.pipe(r.first()).subscribe(function(){t._sendChanges()})},t.prototype.ngOnDestroy=function(){this._oneMoveSubsription.unsubscribe()},t.prototype._onDragStart=function(t){var e,i=this;3!==t.which&&(e=this._prepareDragging(t),this._drag.time=(new Date).getTime(),this._drag.target=t.target,this._drag.stage.start=e,this._drag.stage.current=e,this._drag.pointer=this._pointer(t),this.listenerMouseUp=this.renderer.listen(document,"mouseup",this.bindOnDragEnd),this.listenerTouchEnd=this.renderer.listen(document,"touchend",this.bindOnDragEnd),this.zone.runOutsideAngular(function(){i.listenerOneMouseMove=i.renderer.listen(document,"mousemove",i.bindOneMouseTouchMove),i.listenerOneTouchMove=i.renderer.listen(document,"touchmove",i.bindOneMouseTouchMove)}))},t.prototype._oneMouseTouchMove=function(t){var e=this._difference(this._drag.pointer,this._pointer(t));this.listenerATag&&this.listenerATag(),Math.abs(e.x)<3&&Math.abs(e.y)<3&&this._is("valid")||Math.abs(e.x)<3&&Math.abs(e.x)<Math.abs(e.y)&&this._is("valid")||(this.listenerOneMouseMove(),this.listenerOneTouchMove(),this._drag.moving=!0,this.blockClickAnchorInDragging(t),this.listenerMouseMove=this.renderer.listen(document,"mousemove",this.bindOnDragMove),this.listenerTouchMove=this.renderer.listen(document,"touchmove",this.bindOnDragMove),t.preventDefault(),this._enterDragging(),this._oneDragMove$.next(t))},t.prototype.blockClickAnchorInDragging=function(t){for(var e=t.target;e&&!(e instanceof HTMLAnchorElement);)e=e.par