{"version":3,"file":"ngx-owl-carousel-o.mjs","sources":["../../libs/ngx-owl-carousel-o/src/lib/carousel/owl-carousel-o-config.ts","../../libs/ngx-owl-carousel-o/src/lib/services/logger.service.ts","../../libs/ngx-owl-carousel-o/src/lib/services/carousel.service.ts","../../libs/ngx-owl-carousel-o/src/lib/services/navigation.service.ts","../../libs/ngx-owl-carousel-o/src/lib/services/window-ref.service.ts","../../libs/ngx-owl-carousel-o/src/lib/services/document-ref.service.ts","../../libs/ngx-owl-carousel-o/src/lib/services/autoplay.service.ts","../../libs/ngx-owl-carousel-o/src/lib/services/lazyload.service.ts","../../libs/ngx-owl-carousel-o/src/lib/services/animate.service.ts","../../libs/ngx-owl-carousel-o/src/lib/services/autoheight.service.ts","../../libs/ngx-owl-carousel-o/src/lib/services/hash.service.ts","../../libs/ngx-owl-carousel-o/src/lib/carousel/carousel-slide.directive.ts","../../libs/ngx-owl-carousel-o/src/lib/services/resize.service.ts","../../libs/ngx-owl-carousel-o/src/lib/carousel/stage/stage.component.ts","../../libs/ngx-owl-carousel-o/src/lib/carousel/carousel.component.ts","../../libs/ngx-owl-carousel-o/src/lib/carousel/owl-router-link.directive.ts","../../libs/ngx-owl-carousel-o/src/lib/models/SlidesOutputData.ts","../../libs/ngx-owl-carousel-o/src/lib/carousel/carousel.module.ts","../../libs/ngx-owl-carousel-o/src/lib/models/slide.model.ts","../../libs/ngx-owl-carousel-o/src/ngx-owl-carousel-o.ts"],"sourcesContent":["import { OwlOptions } from \"../models/owl-options.model\";\n\n/**\n * Defaults value of options\n */\nexport class OwlCarouselOConfig implements OwlOptions {\n items = 3;\n skip_validateItems = false;\n loop = false;\n center = false;\n rewind = false;\n\n mouseDrag = true;\n touchDrag = true;\n pullDrag = true;\n freeDrag = false;\n\n margin = 0;\n stagePadding = 0;\n\n merge = false;\n mergeFit = true;\n autoWidth = false;\n\n startPosition = 0;\n rtl = false;\n\n smartSpeed = 250;\n fluidSpeed = false;\n dragEndSpeed = false;\n\n responsive = {};\n responsiveRefreshRate = 200;\n\n // defaults to Navigation\n nav = false;\n navText = [ 'prev', 'next' ];\n navSpeed = false;\n slideBy = 1; // stage moves on 1 width of slide; if slideBy = 2, stage moves on 2 widths of slide\n dots = true;\n dotsEach = false;\n dotsData = false;\n dotsSpeed = false;\n\n // defaults to Autoplay\n autoplay = false;\n autoplayTimeout = 5000;\n autoplayHoverPause = false;\n autoplaySpeed = false;\n autoplayMouseleaveTimeout = 1;\n\n // defaults to LazyLoading\n lazyLoad = false;\n lazyLoadEager = 0;\n\n // defaults to Animate\n slideTransition = '';\n animateOut = false;\n animateIn = false;\n\n // defaults to AutoHeight\n autoHeight = false;\n\n // defaults to Hash\n URLhashListener = false;\n constructor() { }\n}\n\n/**\n * we can't read types from OwlOptions in javascript because of props have undefined value and types of those props are used for validating inputs\n * class below is copy of OwlOptions but its all props have string value showing certain type;\n * this is class is being used just in method _validateOptions() of CarouselService;\n */\nexport class OwlOptionsMockedTypes {\n items = 'number';\n skip_validateItems = 'boolean';\n loop = 'boolean';\n center = 'boolean';\n rewind = 'boolean';\n\n mouseDrag = 'boolean';\n touchDrag = 'boolean';\n pullDrag = 'boolean';\n freeDrag = 'boolean';\n\n margin = 'number';\n stagePadding = 'number';\n\n merge = 'boolean';\n mergeFit = 'boolean';\n autoWidth = 'boolean';\n\n startPosition = 'number|string';\n rtl = 'boolean';\n\n smartSpeed = 'number';\n fluidSpeed = 'boolean';\n dragEndSpeed = 'number|boolean';\n\n responsive = {};\n responsiveRefreshRate = 'number';\n\n // defaults to Navigation\n nav = 'boolean';\n navText = 'string[]';\n navSpeed = 'number|boolean';\n slideBy = 'number|string'; // stage moves on 1 width of slide; if slideBy = 2, stage moves on 2 widths of slide\n dots = 'boolean';\n dotsEach = 'number|boolean';\n dotsData = 'boolean';\n dotsSpeed = 'number|boolean';\n\n // defaults to Autoplay\n autoplay = 'boolean';\n autoplayTimeout = 'number';\n autoplayHoverPause = 'boolean';\n autoplaySpeed = 'number|boolean';\n autoplayMouseleaveTimeout = 'number';\n\n // defaults to LazyLoading\n lazyLoad = 'boolean';\n lazyLoadEager = 'number';\n\n // defaults to Animate\n slideTransition = 'string';\n animateOut = 'string|boolean';\n animateIn = 'string|boolean';\n\n // defaults to AutoHeight\n autoHeight = 'boolean';\n\n // defaults to Hash\n URLhashListener = \"boolean\";\n constructor() { }\n}","import { ErrorHandler, Injectable, isDevMode } from '@angular/core';\n\n@Injectable()\nexport class OwlLogger {\n\n constructor(private errorHandler: ErrorHandler) {}\n\n log(value: any, ...rest: any[]) {\n if (isDevMode()) {\n console.log(value, ...rest);\n }\n }\n\n error(error: Error) {\n this.errorHandler.handleError(error);\n }\n\n warn(value: any, ...rest: any[]) {\n console.warn(value, ...rest);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Subject, Observable } from 'rxjs';\n\nimport { StageData } from '../models/stage-data.model';\nimport { OwlDOMData } from '../models/owlDOM-data.model';\nimport { SlideModel } from '../models/slide.model';\n\n\nimport { CarouselSlideDirective } from '../carousel/carousel-slide.directive';\nimport { OwlCarouselOConfig, OwlOptionsMockedTypes } from '../carousel/owl-carousel-o-config';\nimport { OwlOptions } from '../models/owl-options.model';\n\nimport { NavData, DotsData } from '../models/navigation-data.models';\nimport { OwlLogger } from './logger.service';\n\n/**\n * Current state information and their tags.\n */\nexport class States {\n current: {};\n tags: {\n [key: string]: string[];\n };\n}\n\n/**\n * Enumeration for types.\n * @enum {String}\n */\nexport enum Type {\n\tEvent = 'event',\n\tState = 'state'\n};\n\n/**\n * Enumeration for width.\n * @enum {String}\n */\nexport enum Width {\n\tDefault = 'default',\n\tInner = 'inner',\n\tOuter = 'outer'\n};\n\n/**\n * Model for coords of .owl-stage\n */\nexport class Coords {\n\tx: number;\n\ty: number;\n}\n\n/**\n * Model for all current data of carousel\n */\nexport class CarouselCurrentData {\n\towlDOMData: OwlDOMData;\n\tstageData: StageData;\n\tslidesData: SlideModel[];\n\tnavData: NavData;\n\tdotsData: DotsData;\n}\n\n@Injectable()\nexport class CarouselService {\n\t/**\n * Subject for passing data needed for managing View\n */\n\tprivate _viewSettingsShipper$ = new Subject();\n\t/**\n * Subject for notification when the carousel got initializes\n */\n\tprivate _initializedCarousel$ = new Subject();\n\n\t/**\n * Subject for notification when the carousel's settings start changinf\n */\n\tprivate _changeSettingsCarousel$ = new Subject();\n\n\t/**\n * Subject for notification when the carousel's settings have changed\n */\n\tprivate _changedSettingsCarousel$ = new Subject();\n\t/**\n * Subject for notification when the carousel starts translating or moving\n */\n\tprivate _translateCarousel$ = new Subject();\n\t/**\n * Subject for notification when the carousel stopped translating or moving\n */\n\tprivate _translatedCarousel$ = new Subject();\n\t/**\n * Subject for notification when the carousel's rebuilding caused by 'resize' event starts\n */\n\tprivate _resizeCarousel$ = new Subject();\n\t/**\n * Subject for notification when the carousel's rebuilding caused by 'resize' event is ended\n */\n\tprivate _resizedCarousel$ = new Subject();\n\t/**\n * Subject for notification when the refresh of carousel starts\n */\n\tprivate _refreshCarousel$ = new Subject();\n\t/**\n * Subject for notification when the refresh of carousel is ended\n */\n\tprivate _refreshedCarousel$ = new Subject();\n\t/**\n * Subject for notification when the dragging of carousel starts\n */\n\tprivate _dragCarousel$ = new Subject();\n\t/**\n * Subject for notification when the dragging of carousel is ended\n */\n\tprivate _draggedCarousel$ = new Subject();\n\n /**\n * Current settings for the carousel.\n */\n settings: OwlOptions = {\n\t\titems: 0\n\t};\n\n\t/**\n * Initial data for setting classes to element .owl-carousel\n */\n\towlDOMData: OwlDOMData = {\n\t\trtl: false,\n\t\tisResponsive: false,\n\t\tisRefreshed: false,\n\t\tisLoaded: false,\n\t\tisLoading: false,\n\t\tisMouseDragable: false,\n\t\tisGrab: false,\n\t\tisTouchDragable: false\n\t};\n\n\t/**\n * Initial data of .owl-stage\n */\n\tstageData: StageData = {\n\t\ttransform: 'translate3d(0px,0px,0px)',\n\t\ttransition: '0s',\n\t\twidth: 0,\n\t\tpaddingL: 0,\n\t\tpaddingR: 0\n\t};\n\n\t/**\n\t * Data of every slide\n\t */\n\tslidesData: SlideModel[];\n\n\t/**\n\t * Data of navigation block\n\t */\n\tnavData: NavData;\n\n\t/**\n\t * Data of dots block\n\t */\n\tdotsData: DotsData;\n\n\t/**\n\t * Carousel width\n\t */\n\tprivate _width: number;\n\n\t/**\n\t * All real items.\n\t */\n\tprivate _items: CarouselSlideDirective[] = []; // is equal to this.slides\n\n\t/**\n * Array with width of every slide.\n */\n private _widths: any[] = [];\n\n\t/**\n * Currently suppressed events to prevent them from beeing retriggered.\n */\n\tprivate _supress: any = {};\n\n /**\n * References to the running plugins of this carousel.\n */\n\tprivate _plugins: any = {};\n\n\t/**\n * Absolute current position.\n */\n\tprivate _current: number | null = null;\n\n\t/**\n * All cloned items.\n */\n\tprivate _clones: any[] = [];\n\n /**\n * Merge values of all items.\n * @todo Maybe this could be part of a plugin.\n */\n\tprivate _mergers: any[] = [];\n\n\t/**\n * Animation speed in milliseconds.\n */\n\tprivate _speed: number | null = null;\n\n\t/**\n * Coordinates of all items in pixel.\n * @todo The name of this member is missleading.\n */\n\tprivate _coordinates: number[] = [];\n\n\t/**\n * Current breakpoint.\n * @todo Real media queries would be nice.\n */\n\tprivate _breakpoint: any = null;\n\n\t/**\n\t * Prefix for id of cloned slides\n\t */\n\tclonedIdPrefix = 'cloned-';\n\n\t/**\n\t * Current options set by the caller including defaults.\n\t */\n\t_options: OwlOptions = {};\n\n /**\n * Invalidated parts within the update process.\n */\n private _invalidated: any = {};\n\n // Is needed for tests\n get invalidated() {\n return this._invalidated;\n }\n /**\n * Current state information and their tags.\n */\n private _states: States = {\n current: {},\n tags: {\n initializing: ['busy'],\n animating: ['busy'],\n dragging: ['interacting']\n }\n };\n\n // is needed for tests\n get states() {\n return this._states;\n\t}\n\n\t/**\n \t * Ordered list of workers for the update process.\n */\n private _pipe: any[] = [\n // {\n // filter: ['width', 'settings'],\n // run: () => {\n // this._width = this.carouselWindowWidth;\n // }\n // },\n {\n filter: ['width', 'items', 'settings'],\n run: cache => {\n cache.current = this._items && this._items[this.relative(this._current)].id;\n }\n },\n // {\n // filter: ['items', 'settings'],\n // run: function() {\n // // this.$stage.children('.cloned').remove();\n // }\n\t\t// },\n\t\t {\n filter: [ 'width', 'items', 'settings' ],\n run: (cache) => {\n const margin = this.settings.margin || '',\n grid = !this.settings.autoWidth,\n rtl = this.settings.rtl,\n css = {\n 'margin-left': rtl ? margin : '',\n 'margin-right': rtl ? '' : margin\n };\n\n if(!grid) {\n\t\t\t\t\tthis.slidesData.forEach(slide => {\n\t\t\t\t\t\tslide.marginL = css['margin-left'];\n\t\t\t\t\t\tslide.marginR = css['margin-right'];\n\t\t\t\t\t});\n\t\t\t\t}\n\n cache.css = css;\n }\n }, {\n filter: [ 'width', 'items', 'settings' ],\n run: (cache) => {\n const width: any = +(this.width() / this.settings.items).toFixed(3) - this.settings.margin,\n grid = !this.settings.autoWidth,\n widths = [];\n\t\t\t\tlet merge = null,\n\t\t\t\t\t\titerator = this._items.length;\n\n cache.items = {\n merge: false,\n width: width\n };\n\n while (iterator-- > 0) {\n merge = this._mergers[iterator];\n merge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge;\n cache.items.merge = merge > 1 || cache.items.merge;\n\n widths[iterator] = !grid ? this._items[iterator].width ? this._items[iterator].width : width : width * merge;\n }\n\n\t\t\t\tthis._widths = widths;\n\n\t\t\t\tthis.slidesData.forEach((slide, i) => {\n\t\t\t\t\tslide.width = this._widths[i];\n\t\t\t\t\tslide.marginR = cache.css['margin-right'];\n\t\t\t\t\tslide.marginL = cache.css['margin-left'];\n\t\t\t\t});\n }\n }, {\n filter: [ 'items', 'settings' ],\n run: () => {\n const clones: any[] = [],\n items: CarouselSlideDirective[] = this._items,\n settings: any = this.settings,\n // TODO: Should be computed from number of min width items in stage\n view = Math.max(settings.items * 2, 4),\n size = Math.ceil(items.length / 2) * 2;\n\t\t\t\tlet append: any[] = [],\n prepend: any[] = [],\n\t\t\t\t\trepeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0;\n\n repeat /= 2;\n\n while (repeat-- > 0) {\n // Switch to only using appended clones\n clones.push(this.normalize(clones.length / 2, true));\n append.push({ ...this.slidesData[clones[clones.length - 1]]});\n\t\t\t\t\tclones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));\n\t\t\t\t\tprepend.unshift({ ...this.slidesData[clones[clones.length - 1]]});\n }\n\n\t\t\t\tthis._clones = clones;\n\n\t\t\t\tappend = append.map(slide => {\n\t\t\t\t\tslide.id = `${this.clonedIdPrefix}${slide.id}`;\n\t\t\t\t\tslide.isActive = false;\n\t\t\t\t\tslide.isCloned = true;\n\t\t\t\t\treturn slide;\n\t\t\t\t});\n\n\t\t\t\tprepend = prepend.map(slide => {\n\t\t\t\t\tslide.id = `${this.clonedIdPrefix}${slide.id}`;\n\t\t\t\t\tslide.isActive = false;\n\t\t\t\t\tslide.isCloned = true;\n\t\t\t\t\treturn slide;\n\t\t\t\t});\n\n\t\t\t\tthis.slidesData = prepend.concat(this.slidesData).concat(append);\n }\n }, {\n filter: [ 'width', 'items', 'settings' ],\n run: () => {\n const rtl = this.settings.rtl ? 1 : -1,\n size = this._clones.length + this._items.length,\n coordinates = [];\n let iterator = -1,\n previous = 0,\n current = 0;\n\n while (++iterator < size) {\n previous = coordinates[iterator - 1] || 0;\n current = this._widths[this.relative(iterator)] + this.settings.margin;\n coordinates.push(previous + current * rtl);\n }\n\n this._coordinates = coordinates;\n }\n }, {\n filter: [ 'width', 'items', 'settings' ],\n run: () => {\n const padding = this.settings.stagePadding,\n coordinates = this._coordinates,\n css = {\n 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,\n 'padding-left': padding || '',\n 'padding-right': padding || ''\n\t\t\t\t\t};\n\n\t\t\t\tthis.stageData.width = css.width; // use this property in *ngIf directive for .owl-stage element\n\t\t\t\tthis.stageData.paddingL = css['padding-left'];\n\t\t\t\tthis.stageData.paddingR = css['padding-right'];\n }\n }, {\n // filter: [ 'width', 'items', 'settings' ],\n // run: cache => {\n\t\t// \t\t// this method sets the width for every slide, but I set it in different way earlier\n\t\t// \t\tconst grid = !this.settings.autoWidth,\n\t\t// \t\titems = this.$stage.children(); // use this.slidesData\n // let iterator = this._coordinates.length;\n\n // if (grid && cache.items.merge) {\n // while (iterator--) {\n // cache.css.width = this._widths[this.relative(iterator)];\n // items.eq(iterator).css(cache.css);\n // }\n // } else if (grid) {\n // cache.css.width = cache.items.width;\n // items.css(cache.css);\n // }\n // }\n // }, {\n // filter: [ 'items' ],\n // run: function() {\n // this._coordinates.length < 1 && this.$stage.removeAttr('style');\n // }\n // }, {\n filter: [ 'width', 'items', 'settings' ],\n run: cache => {\n let current = cache.current ? this.slidesData.findIndex(slide => slide.id === cache.current) : 0;\n \tcurrent = Math.max(this.minimum(), Math.min(this.maximum(), current));\n this.reset(current);\n }\n }, {\n filter: [ 'position' ],\n run: () => {\n this.animate(this.coordinates(this._current));\n }\n }, {\n filter: [ 'width', 'position', 'items', 'settings' ],\n run: () => {\n const rtl = this.settings.rtl ? 1 : -1,\n\t\t\t\t\tpadding = this.settings.stagePadding * 2,\n\t\t\t\t\tmatches = [];\n\t\t\t\tlet begin, end, inner, outer, i, n;\n\n\t\t\t\tbegin = this.coordinates(this.current());\n\t\t\t\tif (typeof begin === 'number' ) {\n\t\t\t\t\tbegin += padding;\n\t\t\t\t} else {\n\t\t\t\t\tbegin = 0;\n\t\t\t\t}\n\n\t\t\t\tend = begin + this.width() * rtl;\n\n\t\t\t\tif (rtl === -1 && this.settings.center) {\n\t\t\t\t\tconst result =\tthis._coordinates.filter(element => {\n\t\t\t\t\t\treturn this.settings.items % 2 === 1 ? element >= begin : element > begin;\n\t\t\t\t\t});\n\t\t\t\t\tbegin = result.length ? result[result.length - 1] : begin;\n\t\t\t\t}\n\n for (i = 0, n = this._coordinates.length; i < n; i++) {\n inner = Math.ceil(this._coordinates[i - 1] || 0);\n\t\t\t\t\touter = Math.ceil(Math.abs(this._coordinates[i]) + padding * rtl);\n\n if ((this._op(inner, '<=', begin) && (this._op(inner, '>', end)))\n || (this._op(outer, '<', begin) && this._op(outer, '>', end))) {\n matches.push(i);\n }\n\t\t\t\t}\n\n\t\t\t\tthis.slidesData.forEach(slide => {\n\t\t\t\t\tslide.isActive = false;\n\t\t\t\t\treturn slide;\n\t\t\t\t});\n\t\t\t\tmatches.forEach(item => {\n\t\t\t\t\tthis.slidesData[item].isActive = true;\n\t\t\t\t});\n\n if (this.settings.center) {\n\t\t\t\t\tthis.slidesData.forEach(slide => {\n\t\t\t\t\t\tslide.isCentered = false;\n\t\t\t\t\t\treturn slide;\n\t\t\t\t\t});\n\t\t\t\t\tthis.slidesData[this.current()].isCentered = true;\n }\n }\n }\n ];\n\n\tconstructor(private logger: OwlLogger) { }\n\n\t/**\n\t * Makes _viewSettingsShipper$ Subject become Observable\n\t * @returns Observable of _viewSettingsShipper$ Subject\n\t */\n\tgetViewCurSettings(): Observable {\n\t\treturn this._viewSettingsShipper$.asObservable();\n\t}\n\n\t/**\n\t * Makes _initializedCarousel$ Subject become Observable\n\t * @returns Observable of _initializedCarousel$ Subject\n\t */\n\tgetInitializedState(): Observable {\n\t\treturn this._initializedCarousel$.asObservable()\n\t}\n\n\t/**\n\t * Makes _changeSettingsCarousel$ Subject become Observable\n\t * @returns Observable of _changeSettingsCarousel$ Subject\n\t */\n\tgetChangeState(): Observable {\n\t\treturn this._changeSettingsCarousel$.asObservable();\n\t}\n\n\t/**\n\t * Makes _changedSettingsCarousel$ Subject become Observable\n\t * @returns Observable of _changedSettingsCarousel$ Subject\n\t */\n\tgetChangedState(): Observable {\n\t\treturn this._changedSettingsCarousel$.asObservable();\n\t}\n\n\t/**\n\t * Makes _translateCarousel$ Subject become Observable\n\t * @returns Observable of _translateCarousel$ Subject\n\t */\n\tgetTranslateState(): Observable {\n\t\treturn this._translateCarousel$.asObservable();\n\t}\n\n\t/**\n\t * Makes _translatedCarousel$ Subject become Observable\n\t * @returns Observable of _translatedCarousel$ Subject\n\t */\n\tgetTranslatedState(): Observable {\n\t\treturn this._translatedCarousel$.asObservable();\n\t}\n\n\t/**\n\t * Makes _resizeCarousel$ Subject become Observable\n\t * @returns Observable of _resizeCarousel$ Subject\n\t */\n\tgetResizeState(): Observable {\n\t\treturn this._resizeCarousel$.asObservable();\n\t}\n\n\t/**\n\t * Makes _resizedCarousel$ Subject become Observable\n\t * @returns Observable of _resizedCarousel$ Subject\n\t */\n\tgetResizedState(): Observable {\n\t\treturn this._resizedCarousel$.asObservable();\n\t}\n\n\t/**\n\t * Makes _refreshCarousel$ Subject become Observable\n\t * @returns Observable of _refreshCarousel$ Subject\n\t */\n\tgetRefreshState(): Observable {\n\t\treturn this._refreshCarousel$.asObservable();\n\t}\n\n\t/**\n\t * Makes _refreshedCarousel$ Subject become Observable\n\t * @returns Observable of _refreshedCarousel$ Subject\n\t */\n\tgetRefreshedState(): Observable {\n\t\treturn this._refreshedCarousel$.asObservable();\n\t}\n\n\t/**\n\t * Makes _dragCarousel$ Subject become Observable\n\t * @returns Observable of _dragCarousel$ Subject\n\t */\n\tgetDragState(): Observable {\n\t\treturn this._dragCarousel$.asObservable();\n\t}\n\n\t/**\n\t * Makes _draggedCarousel$ Subject become Observable\n\t * @returns Observable of _draggedCarousel$ Subject\n\t */\n\tgetDraggedState(): Observable {\n\t\treturn this._draggedCarousel$.asObservable();\n\t}\n\n\t/**\n\t * Setups custom options expanding default options\n\t * @param options custom options\n\t */\n\tsetOptions(options: OwlOptions) {\n\t\tconst configOptions: OwlOptions = new OwlCarouselOConfig();\n\t\tconst checkedOptions: OwlOptions = this._validateOptions(options, configOptions);\n\t\tthis._options = { ...configOptions, ...checkedOptions};\n\t}\n\n\t/**\n\t * Checks whether user's option are set properly. Cheking is based on typings;\n\t * @param options options set by user\n\t * @param configOptions default options\n\t * @returns checked and modified (if it's needed) user's options\n\t *\n\t * Notes:\n\t * \t- if user set option with wrong type, it'll be written in console\n\t */\n\tprivate _validateOptions(options: OwlOptions, configOptions: OwlOptions): OwlOptions {\n\t\tconst checkedOptions: OwlOptions = { ...options};\n\t\tconst mockedTypes = new OwlOptionsMockedTypes();\n\n\t\tconst setRightOption = (type: string, key: any): OwlOptions => {\n\t\t\tthis.logger.log(`options.${key} must be type of ${type}; ${key}=${options[key]} skipped to defaults: ${key}=${configOptions[key]}`);\n\t\t\treturn configOptions[key];\n\t\t};\n\n\t\tfor (const key in checkedOptions) {\n\t\t\tif (checkedOptions.hasOwnProperty(key)) {\n\n\t\t\t\t// condition could be shortened but it gets harder for understanding\n\t\t\t\tif (mockedTypes[key] === 'number') {\n\t\t\t\t\tif (this._isNumeric(checkedOptions[key])) {\n\t\t\t\t\t\tcheckedOptions[key] = +checkedOptions[key];\n\t\t\t\t\t\tcheckedOptions[key] = key === 'items' ? this._validateItems(checkedOptions[key], checkedOptions.skip_validateItems) : checkedOptions[key];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcheckedOptions[key] = setRightOption(mockedTypes[key], key);\n\t\t\t\t\t}\n\t\t\t\t} else if (mockedTypes[key] === 'boolean' && typeof checkedOptions[key] !== 'boolean') {\n\t\t\t\t\tcheckedOptions[key] = setRightOption(mockedTypes[key], key);\n\t\t\t\t} else if (mockedTypes[key] === 'number|boolean' && !this._isNumberOrBoolean(checkedOptions[key])) {\n\t\t\t\t\tcheckedOptions[key] = setRightOption(mockedTypes[key], key);\n\t\t\t\t} else if (mockedTypes[key] === 'number|string' && !this._isNumberOrString(checkedOptions[key])) {\n\t\t\t\t\tcheckedOptions[key] = setRightOption(mockedTypes[key], key);\n\t\t\t\t} else if (mockedTypes[key] === 'string|boolean' && !this._isStringOrBoolean(checkedOptions[key])) {\n\t\t\t\t\tcheckedOptions[key] = setRightOption(mockedTypes[key], key);\n\t\t\t\t} else if (mockedTypes[key] === 'string[]') {\n\t\t\t\t\tif (Array.isArray(checkedOptions[key])) {\n\t\t\t\t\t\tlet isString = false;\n\t\t\t\t\t\tcheckedOptions[key].forEach(element => {\n\t\t\t\t\t\t\tisString = typeof element === 'string' ? true : false;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (!isString) { checkedOptions[key] = setRightOption(mockedTypes[key], key) };\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcheckedOptions[key] = setRightOption(mockedTypes[key], key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn checkedOptions;\n\t}\n\n\t/**\n\t * Checks the option `items` set by user and if it bigger than number of slides, the function returns number of slides\n\t * @param items option items set by user\n\t * @param skip_validateItems option `skip_validateItems` set by user\n\t * @returns right number of items\n\t */\n\tprivate _validateItems(items: number, skip_validateItems: boolean): number {\n\t\tlet result: number = items;\n\t\tif (items > this._items.length) {\n\t\t\tif (skip_validateItems) {\n\t\t\t\tthis.logger.log('The option \\'items\\' in your options is bigger than the number of slides. The navigation got disabled');\n\t\t\t} else {\n\t\t\t\tresult = this._items.length;\n\t\t\t\tthis.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');\n\t\t\t}\n\t\t} else {\n\t\t\tif (items === this._items.length && (this.settings.dots || this.settings.nav)) {\n\t\t\t\tthis.logger.log('Option \\'items\\' in your options is equal to the number of slides. So the navigation got disabled');\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Set current width of carousel\n\t * @param width width of carousel Window\n\t */\n\tsetCarouselWidth(width: number) {\n\t\tthis._width = width;\n\t}\n\n /**\n\t * Setups the current settings.\n\t * @todo Remove responsive classes. Why should adaptive designs be brought into IE8?\n\t * @todo Support for media queries by using `matchMedia` would be nice.\n\t * @param carouselWidth width of carousel\n\t * @param slides array of slides\n\t * @param options options set by user\n\t */\n setup(carouselWidth: number, slides: CarouselSlideDirective[], options: OwlOptions) {\n\t\tthis.setCarouselWidth(carouselWidth);\n\t\tthis.setItems(slides);\n\t\tthis._defineSlidesData();\n\t\tthis.setOptions(options);\n\n\t\tthis.settings = { ...this._options};\n\n\t\tthis.setOptionsForViewport();\n\n\t\tthis._trigger('change', { property: { name: 'settings', value: this.settings } });\n\t\tthis.invalidate('settings'); // must be call of this function;\n\t\tthis._trigger('changed', { property: { name: 'settings', value: this.settings } });\n\t}\n\n\t/**\n\t * Set options for current viewport\n\t */\n\tsetOptionsForViewport() {\n\t\tconst viewport = this._width,\n\t\t\toverwrites = this._options.responsive;\n\t\tlet\tmatch = -1;\n\n\t\tif (!Object.keys(overwrites).length) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!viewport) {\n\t\t\tthis.settings.items = 1;\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const key in overwrites) {\n\t\t\tif (overwrites.hasOwnProperty(key)) {\n\t\t\t\tif (+key <= viewport && +key > match) {\n\t\t\t\t\tmatch = Number(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.settings = { ...this._options, ...overwrites[match], items: (overwrites[match] && overwrites[match].items) ? this._validateItems(overwrites[match].items, this._options.skip_validateItems) : this._options.items};\n\t\t// if (typeof this.settings.stagePadding === 'function') {\n\t\t// \tthis.settings.stagePadding = this.settings.stagePadding();\n\t\t// }\n\t\tdelete this.settings.responsive;\n\t\tthis.owlDOMData.isResponsive = true;\n\t\tthis.owlDOMData.isMouseDragable = this.settings.mouseDrag;\n\t\tthis.owlDOMData.isTouchDragable = this.settings.touchDrag;\n\n\t\tconst mergers = [];\n\t\tthis._items.forEach(item => {\n\t\t\tconst mergeN: number = this.settings.merge ? item.dataMerge : 1;\n\t\t\tmergers.push(mergeN);\n\t\t});\n\t\tthis._mergers = mergers;\n\n\t\tthis._breakpoint = match;\n\n\t\tthis.invalidate('settings');\n\t}\n\n\t/**\n\t * Initializes the carousel.\n\t * @param slides array of CarouselSlideDirective\n\t */\n initialize(slides: CarouselSlideDirective[]) {\n\t\tthis.enter('initializing');\n\t\t// this.trigger('initialize');\n\n\t\tthis.owlDOMData.rtl = this.settings.rtl;\n\n\t\tif (this._mergers.length) {\n\t\t\tthis._mergers = [];\n\t\t}\n\n\t\tslides.forEach(item => {\n\t\t\tconst mergeN: number = this.settings.merge ? item.dataMerge : 1;\n\t\t\tthis._mergers.push(mergeN);\n\t\t});\n\t\tthis._clones = [];\n\n\t\tthis.reset(this._isNumeric(this.settings.startPosition) ? +this.settings.startPosition : 0);\n\n\t\tthis.invalidate('items');\n\t\tthis.refresh();\n\n\t\tthis.owlDOMData.isLoaded = true;\n\t\tthis.owlDOMData.isMouseDragable = this.settings.mouseDrag;\n\t\tthis.owlDOMData.isTouchDragable = this.settings.touchDrag;\n\n\t\tthis.sendChanges();\n\n\t\tthis.leave('initializing');\n\t\tthis._trigger('initialized');\n\t};\n\n\t/**\n\t * Sends all data needed for View\n\t */\n\tsendChanges() {\n\t\tthis._viewSettingsShipper$.next({\n\t\t\towlDOMData: this.owlDOMData,\n\t\t\tstageData: this.stageData,\n\t\t\tslidesData: this.slidesData,\n\t\t\tnavData: this.navData,\n\t\t\tdotsData: this.dotsData\n\t\t});\n\t}\n\n\n /**\n\t * Updates option logic if necessery\n\t */\n private _optionsLogic() {\n\t\tif (this.settings.autoWidth) {\n\t\t\tthis.settings.stagePadding = 0;\n\t\t\tthis.settings.merge = false;\n\t\t}\n\t}\n\n /**\n * Updates the view\n */\n update() {\n let i = 0;\n const n = this._pipe.length,\n filter = item => this._invalidated[item],\n\t\t\tcache = {};\n\n while (i < n) {\n const filteredPipe = this._pipe[i].filter.filter(filter);\n if (this._invalidated.all || filteredPipe.length > 0) {\n\t\t\t\tthis._pipe[i].run(cache);\n }\n i++;\n\t\t}\n\t\tthis.slidesData.forEach(slide => slide.classes = this.setCurSlideClasses(slide));\n\t\tthis.sendChanges();\n\n this._invalidated = {};\n\n if (!this.is('valid')) {\n this.enter('valid');\n }\n }\n\n /**\n\t * Gets the width of the view.\n\t * @param [dimension=Width.Default] The dimension to return\n\t * @returns The width of the view in pixel.\n\t */\n width(dimension?: Width): number {\n\t\tdimension = dimension || Width.Default;\n\t\tswitch (dimension) {\n\t\t\tcase Width.Inner:\n\t\t\tcase Width.Outer:\n\t\t\t\treturn this._width;\n\t\t\tdefault:\n\t\t\t\treturn this._width - this.settings.stagePadding * 2 + this.settings.margin;\n\t\t}\n\t}\n\n /**\n\t * Refreshes the carousel primarily for adaptive purposes.\n\t */\n refresh() {\n\t\tthis.enter('refreshing');\n\t\tthis._trigger('refresh');\n\t\tthis._defineSlidesData();\n\t\tthis.setOptionsForViewport();\n\n\t\tthis._optionsLogic();\n\n\t\t// this.$element.addClass(this.options.refreshClass);\n\n\t\tthis.update();\n\n\t\t// this.$element.removeClass(this.options.refreshClass);\n\n\t\tthis.leave('refreshing');\n\t\tthis._trigger('refreshed');\n\t }\n\n /**\n\t * Checks window `resize` event.\n\t * @param curWidth width of .owl-carousel\n\t */\n onResize(curWidth: number) {\n\t\tif (!this._items.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.setCarouselWidth(curWidth);\n\n\t\tthis.enter('resizing');\n\n\t\t// if (this.trigger('resize').isDefaultPrevented()) {\n\t\t// \tthis.leave('resizing');\n\t\t// \treturn false;\n\t\t// }\n\t\tthis._trigger('resize');\n\t\tthis.invalidate('width');\n\n\t\tthis.refresh();\n\n\t\tthis.leave('resizing');\n\t\tthis._trigger('resized');\n\t}\n\n /**\n\t * Prepares data for dragging carousel. It starts after firing `touchstart` and `mousedown` events.\n\t * @todo Horizontal swipe threshold as option\n\t * @todo #261\n\t * @param event - The event arguments.\n\t * @returns stage - object with 'x' and 'y' coordinates of .owl-stage\n\t */\n prepareDragging(event: any): Coords {\n\t\tlet stage: Coords = null,\n\t\t\t\ttransformArr: string[];\n\n\t\t// could be 5 commented lines below; However there's stage transform in stageData and in updates after each move of stage\n // stage = getComputedStyle(this.el.nativeElement).transform.replace(/.*\\(|\\)| /g, '').split(',');\n // stage = {\n // x: stage[stage.length === 16 ? 12 : 4],\n // y: stage[stage.length === 16 ? 13 : 5]\n\t\t// };\n\n\t\ttransformArr = this.stageData.transform.replace(/.*\\(|\\)| |[^,-\\d]\\w|\\)/g, '').split(',');\n stage = {\n x: +transformArr[0],\n y: +transformArr[1]\n };\n\n\t\tif (this.is('animating')) {\n\t\t\tthis.invalidate('position');\n }\n\n if (event.type === 'mousedown') {\n this.owlDOMData.isGrab = true;\n }\n\n\t\tthis.speed(0);\n\t\treturn stage;\n\t}\n\n\t/**\n\t * Enters into a 'dragging' state\n\t */\n\tenterDragging() {\n\t\tthis.enter('dragging');\n this._trigger('drag');\n\t}\n\n /**\n\t * Defines new coords for .owl-stage while dragging it\n\t * @todo #261\n\t * @param event the event arguments.\n\t * @param dragData initial data got after starting dragging\n\t * @returns coords or false\n\t */\n defineNewCoordsDrag(event: any, dragData: any): boolean | Coords {\n\t\tlet minimum = null,\n\t\tmaximum = null,\n\t\tpull = null;\n\t\tconst\tdelta = this.difference(dragData.pointer, this.pointer(event)),\n\t\t\tstage = this.difference(dragData.stage.start, delta);\n\n\t\tif (!this.is('dragging')) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.settings.loop) {\n\t\t\tminimum = this.coordinates(this.minimum());\n\t\t\tmaximum = +this.coordinates(this.maximum() + 1) - minimum;\n\t\t\tstage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum;\n\t\t} else {\n\t\t\tminimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());\n\t\t\tmaximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());\n\t\t\tpull = this.settings.pullDrag ? -1 * delta.x / 5 : 0;\n\t\t\tstage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull);\n\t\t}\n\n\t\treturn stage;\n\t}\n\n /**\n\t * Finishes dragging of carousel when `touchend` and `mouseup` events fire.\n\t * @todo #261\n\t * @todo Threshold for click event\n\t * @param event the event arguments.\n\t * @param dragObj the object with dragging settings and states\n\t * @param clickAttacher function which attaches click handler to slide or its children elements in order to prevent event bubling\n\t */\n finishDragging(event: any, dragObj: any, clickAttacher: () => void) {\n\t\tconst directions = ['right', 'left'],\n\t\t\t\tdelta = this.difference(dragObj.pointer, this.pointer(event)),\n stage = dragObj.stage.current,\n\t\t\t\tdirection = directions[+(this.settings.rtl ? delta.x < +this.settings.rtl : delta.x > +this.settings.rtl)];\n\t\tlet currentSlideI: number, current: number, newCurrent: number;\n\n\t\tif (delta.x !== 0 && this.is('dragging') || !this.is('valid')) {\n this.speed(+this.settings.dragEndSpeed || this.settings.smartSpeed);\n\t\t\t\tcurrentSlideI = this.closest(stage.x, delta.x !== 0 ? direction : dragObj.direction);\n\t\t\t\tcurrent = this.current();\n newCurrent = this.current(currentSlideI === -1 ? undefined : currentSlideI);\n\n\t\t\t\tif (current !== newCurrent) {\n\t\t\t\t\tthis.invalidate('position');\n\t\t\t\t\tthis.update();\n\t\t\t\t}\n\n dragObj.direction = direction;\n\n if (Math.abs(delta.x) > 3 || new Date().getTime() - dragObj.time > 300) {\n\t\t\t\t\tclickAttacher();\n }\n }\n if (!this.is('dragging')) {\n return;\n }\n\t\t\tthis.leave('dragging');\n\t\t\tthis._trigger('dragged')\n\t }\n\n /**\n\t * Gets absolute position of the closest item for a coordinate.\n\t * @todo Setting `freeDrag` makes `closest` not reusable. See #165.\n\t * @param coordinate The coordinate in pixel.\n\t * @param direction The direction to check for the closest item. Ether `left` or `right`.\n\t * @returns The absolute position of the closest item.\n\t */\n closest(coordinate: number, direction: string): number {\n\t\tconst pull = 30,\n\t\t\twidth = this.width();\n\t\tlet\tcoordinates: number[] = this.coordinates() as number[],\n\t\t position = -1;\n\n\t\tif (this.settings.center) {\n\t\t\tcoordinates = coordinates.map(item => {\n\t\t\t\tif (item === 0) {\n\t\t\t\t\titem += 0.000001;\n\t\t\t\t}\n\t\t\t\treturn item;\n\t\t\t})\n\t\t}\n\n\t\t// option 'freeDrag' doesn't have realization and using it here creates problem:\n\t\t// variable 'position' stays unchanged (it equals -1 at the begging) and thus method returns -1\n\t\t// Returning value is consumed by method current(), which taking -1 as argument calculates the index of new current slide\n\t\t// In case of having 5 slides ans 'loop=false; calling 'current(-1)' sets props '_current' as 4. Just last slide remains visible instead of 3 last slides.\n\n\t\t// if (!this.settings.freeDrag) {\n\t\t\t// check closest item\n\t\t\tfor (let i = 0; i < coordinates.length; i++) {\n\n\t\t\t\tif (direction === 'left' && coordinate > coordinates[i] - pull && coordinate < coordinates[i] + pull) {\n\t\t\t\t\tposition = i;\n\t\t\t\t// on a right pull, check on previous index\n\t\t\t\t// to do so, subtract width from value and set position = index + 1\n\t\t\t\t} else if (direction === 'right' && coordinate > coordinates[i] - width - pull && coordinate < coordinates[i] - width + pull) {\n\t\t\t\t\tposition = i + 1;\n\t\t\t\t} else if (this._op(coordinate, '<', coordinates[i])\n\t\t\t\t\t&& this._op(coordinate, '>', coordinates[i + 1] || coordinates[i] - width)) {\n\t\t\t\t\tposition = direction === 'left' ? i + 1 : i;\n\t\t\t\t} else if (direction === null && coordinate > coordinates[i] - pull && coordinate < coordinates[i] + pull) {\n\t\t\t\t\tposition = i;\n\t\t\t\t}\n\n\t\t\t\tif (position !== -1) { break };\n\t\t\t}\n\t\t// }\n\n\t\tif (!this.settings.loop) {\n\t\t\t// non loop boundries\n\t\t\tif (this._op(coordinate, '>', coordinates[this.minimum()])) {\n\t\t\t\tposition = coordinate = this.minimum();\n\t\t\t} else if (this._op(coordinate, '<', coordinates[this.maximum()])) {\n\t\t\t\tposition = coordinate = this.maximum();\n\t\t\t}\n\t\t}\n\n\t\treturn position;\n\t }\n\n /**\n\t * Animates the stage.\n\t * @todo #270\n\t * @param coordinate The coordinate in pixels.\n\t */\n animate(coordinate: number | number[]) {\n\t\tconst animate = this.speed() > 0;\n\n\t\tif (this.is('animating')) {\n\t\t\tthis.onTransitionEnd();\n\t\t}\n\n\t\tif (animate) {\n\t\t\tthis.enter('animating');\n\t\t\tthis._trigger('translate');\n\t\t}\n\n\t\tthis.stageData.transform = 'translate3d(' + coordinate + 'px,0px,0px)';\n\t\tthis.stageData.transition = (this.speed() / 1000) + 's' + (\n\t\t\tthis.settings.slideTransition ? ' ' + this.settings.slideTransition : ''\n\t\t);\n\n\t\t// also there was transition by means of JQuery.animate or css-changing property left\n\t }\n\n /**\n\t * Checks whether the carousel is in a specific state or not.\n\t * @param state The state to check.\n\t * @returns The flag which indicates if the carousel is busy.\n\t */\n is(state: string): boolean {\n\t\treturn this._states.current[state] && this._states.current[state] > 0;\n };\n\n /**\n\t * Sets the absolute position of the current item.\n\t * @param position The new absolute position or nothing to leave it unchanged.\n\t * @returns The absolute position of the current item.\n\t */\n current(position?: number): number {\n\t\tif (position === undefined) {\n\t\t\treturn this._current;\n\t\t}\n\n\t\tif (this._items.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tposition = this.normalize(position);\n\n\t\tif (this._current !== position) {\n\t\t\tconst event = this._trigger('change', { property: { name: 'position', value: position } });\n\n\t\t\t// if (event.data !== undefined) {\n\t\t\t// \tposition = this.normalize(event.data);\n\t\t\t// }\n\n\t\t\tthis._current = position;\n\n\t\t\tthis.invalidate('position');\n\t\t\tthis._trigger('changed', { property: { name: 'position', value: this._current } });\n\t\t}\n\n\t\treturn this._current;\n\t }\n\n /**\n\t * Invalidates the given part of the update routine.\n\t * @param part The part to invalidate.\n\t * @returns The invalidated parts.\n\t */\n invalidate(part: string): string[] {\n\t\tif (typeof part === 'string') {\n\t\t\tthis._invalidated[part] = true;\n\t\t\tif(this.is('valid')) { this.leave('valid'); }\n\t\t}\n\t\treturn Object.keys(this._invalidated);\n };\n\n\t/**\n\t * Resets the absolute position of the current item.\n\t * @param position the absolute position of the new item.\n\t */\n reset(position: number) {\n\t\tposition = this.normalize(position);\n\n\t\tif (position === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._speed = 0;\n\t\tthis._current = position;\n\n\t\tthis._suppress([ 'translate', 'translated' ]);\n\n\t\tthis.animate(this.coordinates(position));\n\n\t\tthis._release([ 'translate', 'translated' ]);\n\t}\n\n /**\n\t * Normalizes an absolute or a relative position of an item.\n\t * @param position The absolute or relative position to normalize.\n\t * @param relative Whether the given position is relative or not.\n\t * @returns The normalized position.\n\t */\n normalize(position: number, relative?: boolean): number {\n\t\tconst n = this._items.length,\n\t\t\t\t\tm = relative ? 0 : this._clones.length;\n\n\t\tif (!this._isNumeric(position) || n < 1) {\n\t\t\tposition = undefined;\n\t\t} else if (position < 0 || position >= n + m) {\n\t\t\tposition = ((position - m / 2) % n + n) % n + m / 2;\n\t\t}\n\n\t\treturn position;\n\t }\n\n /**\n\t * Converts an absolute position of an item into a relative one.\n\t * @param position The absolute position to convert.\n\t * @returns The converted position.\n\t */\n relative(position: number): number {\n\t\tposition -= this._clones.length / 2;\n\t\treturn this.normalize(position, true);\n\t}\n\n /**\n\t * Gets the maximum position for the current item.\n\t * @param relative Whether to return an absolute position or a relative position.\n\t * @returns number of maximum position\n\t */\n maximum(relative: boolean = false): number {\n\t\tconst settings = this.settings;\n\t\tlet\tmaximum = this._coordinates.length,\n\t\t\titerator,\n\t\t\treciprocalItemsWidth,\n\t\t\telementWidth;\n\n\t\tif (settings.loop) {\n\t\t\tmaximum = this._clones.length / 2 + this._items.length - 1;\n\t\t} else if (settings.autoWidth || settings.merge) {\n\t\t\titerator = this._items.length;\n\t\t\treciprocalItemsWidth = this.slidesData[--iterator].width;\n\t\t\telementWidth = this._width;\n\t\t\twhile (iterator-- > 0) {\n\t\t\t\t// it could be use this._items instead of this.slidesData;\n\t\t\t\treciprocalItemsWidth += +this.slidesData[iterator].width + this.settings.margin;\n\t\t\t\tif (reciprocalItemsWidth > elementWidth) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmaximum = iterator + 1;\n\t\t} else if (settings.center) {\n\t\t\tmaximum = this._items.length - 1;\n\t\t} else {\n\t\t\tmaximum = this._items.length - settings.items;\n\t\t}\n\n\t\tif (relative) {\n\t\t\tmaximum -= this._clones.length / 2;\n\t\t}\n\n\t\treturn Math.max(maximum, 0);\n\t }\n\n /**\n\t * Gets the minimum position for the current item.\n\t * @param relative Whether to return an absolute position or a relative position.\n\t * @returns number of minimum position\n\t */\n minimum(relative: boolean = false): number {\n\t\treturn relative ? 0 : this._clones.length / 2;\n\t}\n\n /**\n\t * Gets an item at the specified relative position.\n\t * @param position The relative position of the item.\n\t * @returns The item at the given position or all items if no position was given.\n\t */\n items(position?: number): CarouselSlideDirective[] {\n\t\tif (position === undefined) {\n\t\t\treturn this._items.slice();\n\t\t}\n\n\t\tposition = this.normalize(position, true);\n\t\treturn [this._items[position]];\n\t }\n\n /**\n\t * Gets an item at the specified relative position.\n\t * @param position The relative position of the item.\n\t * @returns The item at the given position or all items if no position was given.\n\t */\n mergers(position: number): number | number[] {\n\t\tif (position === undefined) {\n\t\t\treturn this._mergers.slice();\n\t\t}\n\n\t\tposition = this.normalize(position, true);\n\t\treturn this._mergers[position];\n\t }\n\n /**\n\t * Gets the absolute positions of clones for an item.\n\t * @param position The relative position of the item.\n\t * @returns The absolute positions of clones for the item or all if no position was given.\n\t */\n clones(position?: number): number[] {\n\t\tconst odd = this._clones.length / 2,\n\t\t\teven = odd + this._items.length,\n\t\t\tmap = index => index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2;\n\n\t\tif (position === undefined) {\n\t\t\treturn this._clones.map((v, i) => map(i));\n\t\t}\n\n\t\treturn this._clones.map((v, i) => v === position ? map(i) : null).filter(item => item);\n\t}\n\n /**\n\t * Sets the current animation speed.\n\t * @param speed The animation speed in milliseconds or nothing to leave it unchanged.\n\t * @returns The current animation speed in milliseconds.\n\t */\n speed(speed?: number): number {\n\t\tif (speed !== undefined) {\n\t\t\tthis._speed = speed;\n\t\t}\n\n\t\treturn this._speed;\n\t}\n\n /**\n\t * Gets the coordinate of an item.\n\t * @todo The name of this method is missleanding.\n\t * @param position The absolute position of the item within `minimum()` and `maximum()`.\n\t * @returns The coordinate of the item in pixel or all coordinates.\n\t */\n coordinates(position?: number): number | number[] {\n\t\tlet multiplier = 1,\n\t\t\tnewPosition = position - 1,\n\t\t\tcoordinate,\n\t\t\tresult: number[];\n\n\t\tif (position === undefined) {\n\t\t\tresult = this._coordinates.map((item, index) => {\n\t\t\t\treturn this.coordinates(index) as number;\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\n\t\tif (this.settings.center) {\n\t\t\tif (this.settings.rtl) {\n\t\t\t\tmultiplier = -1;\n\t\t\t\tnewPosition = position + 1;\n\t\t\t}\n\n\t\t\tcoordinate = this._coordinates[position];\n\t\t\tcoordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier;\n\t\t} else {\n\t\t\tcoordinate = this._coordinates[newPosition] || 0;\n\t\t}\n\n\t\tcoordinate = Math.ceil(coordinate);\n\n\t\treturn coordinate;\n\t }\n\n /**\n\t * Calculates the speed for a translation.\n\t * @param from The absolute position of the start item.\n\t * @param to The absolute position of the target item.\n\t * @param factor [factor=undefined] - The time factor in milliseconds.\n\t * @returns The time in milliseconds for the translation.\n\t */\n private _duration(from: number, to: number, factor?: number | boolean): number {\n\t\tif (factor === 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((+factor || this.settings.smartSpeed));\n\t}\n\n /**\n\t * Slides to the specified item.\n\t * @param position The position of the item.\n\t * @param speed The time in milliseconds for the transition.\n\t */\n to(position: number, speed: number | boolean) {\n\t\tlet current = this.current(),\n\t\t\trevert = null,\n\t\t\tdistance = position - this.relative(current),\n\t\t\tmaximum = this.maximum(),\n\t\t\tdelayForLoop = 0;\n\t\tconst\tdirection = +(distance > 0) - +(distance < 0),\n\t\t\titems = this._items.length,\n\t\t\tminimum = this.minimum();\n\n\t\tif (this.settings.loop) {\n\t\t\tif (!this.settings.rewind && Math.abs(distance) > items / 2) {\n\t\t\t\tdistance += direction * -1 * items;\n\t\t\t}\n\n\t\t\tposition = current + distance;\n\t\t\trevert = ((position - minimum) % items + items) % items + minimum;\n\n\t\t\tif (revert !== position && revert - distance <= maximum && revert - distance > 0) {\n\t\t\t\tcurrent = revert - distance;\n\t\t\t\tposition = revert;\n\t\t\t\tdelayForLoop = 30;\n\t\t\t\tthis.reset(current);\n\t\t\t\tthis.sendChanges();\n\t\t\t}\n\t\t} else if (this.settings.rewind) {\n\t\t\tmaximum += 1;\n\t\t\tposition = (position % maximum + maximum) % maximum;\n\t\t} else {\n\t\t\tposition = Math.max(minimum, Math.min(maximum, position));\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tthis.speed(this._duration(current, position, speed));\n\t\t\tthis.current(position);\n\n\t\t\tthis.update();\n\t\t}, delayForLoop);\n\n\t}\n\n /**\n\t * Slides to the next item.\n\t * @param speed The time in milliseconds for the transition.\n\t */\n next(speed: number | boolean) {\n\t\tspeed = speed || false;\n\t\tthis.to(this.relative(this.current()) + 1, speed);\n\t}\n\n /**\n\t * Slides to the previous item.\n\t * @param speed The time in milliseconds for the transition.\n\t */\n prev(speed: number | boolean) {\n\t\tspeed = speed || false;\n\t\tthis.to(this.relative(this.current()) - 1, speed);\n\t}\n\n /**\n\t * Handles the end of an animation.\n\t * @param event - The event arguments.\n\t */\n onTransitionEnd(event?: any) {\n\t\t// if css2 animation then event object is undefined\n\t\tif (event !== undefined) {\n\t\t\t// event.stopPropagation();\n\n\t\t\t// // Catch only owl-stage transitionEnd event\n\t\t\t// if ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)\t) {\n\t\t\t// \treturn false;\n\t\t\t// }\n\t\t\treturn false;\n\t\t}\n\t\tthis.leave('animating');\n\t\tthis._trigger('translated');\n\t}\n\n /**\n\t * Gets viewport width.\n\t * @returns - The width in pixel.\n\t */\n private _viewport(): number {\n\t\tlet width;\n\t\tif (this._width) {\n\t\t\twidth = this._width;\n\t\t} else {\n\t\t\tthis.logger.log('Can not detect viewport width.');\n\t\t}\n\t\treturn width;\n\t}\n\n /**\n\t * Sets _items\n\t * @param content The list of slides put into CarouselSlideDirectives.\n\t */\n setItems(content: CarouselSlideDirective[]) {\n\t\tthis._items = content;\n\t}\n\n\t/**\n\t * Sets slidesData using this._items\n\t */\n\tprivate _defineSlidesData() {\n\t\t// Maybe creating and using loadMap would be better in LazyLoadService.\n\t\t// Hovewer in that case when 'resize' event fires, prop 'load' of all slides will get 'false' and such state of prop will be seen by View during its updating. Accordingly the code will remove slides's content from DOM even if it was loaded before.\n\t\t// Thus it would be needed to add that content into DOM again.\n\t\t// In order to avoid additional removing/adding loaded slides's content we use loadMap here and set restore state of prop 'load' before the View will get it.\n\t\tlet loadMap: Map;\n\n\t\tif (this.slidesData && this.slidesData.length) {\n\t\t\tloadMap = new Map();\n\t\t\tthis.slidesData.forEach(item => {\n\t\t\t\tif (item.load) {\n\t\t\t\t\tloadMap.set(item.id, item.load);\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tthis.slidesData = this._items.map(slide => {\n\t\t\treturn {\n\t\t\t\tid: `${slide.id}`,\n\t\t\t\tisActive: false,\n\t\t\t\ttplRef: slide.tplRef,\n\t\t\t\tdataMerge: slide.dataMerge,\n\t\t\t\twidth: 0,\n\t\t\t\tisCloned: false,\n\t\t\t\tload: loadMap ? loadMap.get(slide.id) : false,\n\t\t\t\thashFragment: slide.dataHash\n\t\t\t};\n\t\t});\n\t}\n\n\t/**\n\t * Sets current classes for slide\n\t * @param slide Slide of carousel\n\t * @returns object with names of css-classes which are keys and true/false values\n\t */\n\tsetCurSlideClasses(slide: SlideModel): {[key: string]: boolean} {\n\t\t// CSS classes: added/removed per current state of component properties\n\t\tconst currentClasses: {[key: string]: boolean} = {\n\t\t\t'active': slide.isActive,\n\t\t\t'center': slide.isCentered,\n\t\t\t'cloned': slide.isCloned,\n\t\t\t'animated': slide.isAnimated,\n\t\t\t'owl-animated-in': slide.isDefAnimatedIn,\n\t\t\t'owl-animated-out': slide.isDefAnimatedOut\n\t\t};\n\t\tif (this.settings.animateIn) {\n\t\t\tcurrentClasses[this.settings.animateIn as string] = slide.isCustomAnimatedIn;\n\t\t}\n\t\tif (this.settings.animateOut) {\n\t\t\tcurrentClasses[this.settings.animateOut as string] = slide.isCustomAnimatedOut;\n\t\t}\n\t\treturn currentClasses;\n\t}\n\n /**\n\t * Operators to calculate right-to-left and left-to-right.\n\t * @param a - The left side operand.\n\t * @param o - The operator.\n\t * @param b - The right side operand.\n\t * @returns true/false meaning right-to-left or left-to-right\n\t */\n private _op(a: number, o: string, b: number): boolean {\n\t\tconst rtl = this.settings.rtl;\n\t\tswitch (o) {\n\t\t\tcase '<':\n\t\t\t\treturn rtl ? a > b : a < b;\n\t\t\tcase '>':\n\t\t\t\treturn rtl ? a < b : a > b;\n\t\t\tcase '>=':\n\t\t\t\treturn rtl ? a <= b : a >= b;\n\t\t\tcase '<=':\n\t\t\t\treturn rtl ? a >= b : a <= b;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n /**\n\t * Triggers a public event.\n\t * @todo Remove `status`, `relatedTarget` should be used instead.\n\t * @param name The event name.\n\t * @param data The event data.\n\t * @param namespace The event namespace.\n\t * @param state The state which is associated with the event.\n\t * @param enter Indicates if the call enters the specified state or not.\n\t */\n private _trigger(name: string, data?: any, namespace?: string, state?: string, enter?: boolean) {\n\t\tswitch (name) {\n\t\t\tcase 'initialized':\n\t\t\t\tthis._initializedCarousel$.next(name);\n\t\t\t\tbreak;\n\t\t\tcase 'change':\n\t\t\t\tthis._changeSettingsCarousel$.next(data);\n\t\t\t\tbreak;\n\t\t\tcase 'changed':\n\t\t\t\tthis._changedSettingsCarousel$.next(data);\n\t\t\t\tbreak;\n\t\t\tcase 'drag':\n\t\t\t\tthis._dragCarousel$.next(name);\n\t\t\t\tbreak;\n\t\t\tcase 'dragged':\n\t\t\t\tthis._draggedCarousel$.next(name);\n\t\t\t\tbreak;\n\t\t\tcase 'resize':\n\t\t\t\tthis._resizeCarousel$.next(name);\n\t\t\t\tbreak;\n\t\t\tcase 'resized':\n\t\t\t\tthis._resizedCarousel$.next(name);\n\t\t\t\tbreak;\n\t\t\tcase 'refresh':\n\t\t\t\tthis._refreshCarousel$.next(name);\n\t\t\t\tbreak;\n\t\t\tcase 'refreshed':\n\t\t\t\tthis._refreshedCarousel$.next(name);\n\t\t\t\tbreak;\n\t\t\tcase 'translate':\n\t\t\t\tthis._translateCarousel$.next(name);\n\t\t\t\tbreak;\n\t\t\tcase 'translated':\n\t\t\t\tthis._translatedCarousel$.next(name);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t}\n\n\t/**\n\t * Enters a state.\n\t * @param name - The state name.\n\t */\n enter(name: string) {\n [ name ].concat(this._states.tags[name] || []).forEach((stateName) => {\n if (this._states.current[stateName] === undefined) {\n\t\t\t\tthis._states.current[stateName] = 0;\n\t\t\t}\n\n\t\t\tthis._states.current[stateName]++;\n });\n };\n\n /**\n\t * Leaves a state.\n\t * @param name - The state name.\n\t */\n\tleave(name: string) {\n [ name ].concat(this._states.tags[name] || []).forEach((stateName) => {\n if (this._states.current[stateName] === 0 || !!this._states.current[stateName]) {\n this._states.current[stateName]--;\n }\n })\n };\n\n /**\n\t * Registers an event or state.\n\t * @param object - The event or state to register.\n\t */\n register(object: any) {\n\t\tif (object.type === Type.State) {\n\t\t\tif (!this._states.tags[object.name]) {\n\t\t\t\tthis._states.tags[object.name] = object.tags;\n\t\t\t} else {\n\t\t\t\tthis._states.tags[object.name] = this._states.tags[object.name].concat(object.tags);\n\t\t\t}\n\n\t\t\tthis._states.tags[object.name] = this._states.tags[object.name].filter((tag, i) => {\n\t\t\t\treturn this._states.tags[object.name].indexOf(tag) === i;\n\t\t\t});\n\t\t}\n\t}\n\n /**\n\t * Suppresses events.\n\t * @param events The events to suppress.\n\t */\n private _suppress(events: string[]) {\n\t\tevents.forEach(event => {\n\t\t\tthis._supress[event] = true;\n\t\t});\n\t}\n\n /**\n\t * Releases suppressed events.\n\t * @param events The events to release.\n\t */\n private _release(events: string[]) {\n\t\tevents.forEach(event => {\n\t\t\tdelete this._supress[event];\n\t\t});\n\t }\n\n /**\n\t * Gets unified pointer coordinates from event.\n\t * @todo #261\n\t * @param event The `mousedown` or `touchstart` event.\n\t * @returns Object Coords which contains `x` and `y` coordinates of current pointer position.\n\t */\n\tpointer(event: any): Coords {\n\t\tconst result = { x: null, y: null };\n\n\t\tevent = event.originalEvent || event || window.event;\n\n\t\tevent = event.touches && event.touches.length ?\n\t\t\tevent.touches[0] : event.changedTouches && event.changedTouches.length ?\n\t\t\t\tevent.changedTouches[0] : event;\n\n\t\tif (event.pageX) {\n\t\t\tresult.x = event.pageX;\n\t\t\tresult.y = event.pageY;\n\t\t} else {\n\t\t\tresult.x = event.clientX;\n\t\t\tresult.y = event.clientY;\n\t\t}\n\n\t\treturn result;\n\t }\n\n /**\n\t * Determines if the input is a Number or something that can be coerced to a Number\n\t * @param number The input to be tested\n\t * @returns An indication if the input is a Number or can be coerced to a Number\n\t */\n private _isNumeric(number: any): boolean {\n\t\treturn !isNaN(parseFloat(number));\n\t}\n\n\t/**\n\t * Determines whether value is number or boolean type\n\t * @param value The input to be tested\n\t * @returns An indication if the input is a Number or can be coerced to a Number, or Boolean\n\t */\n\tprivate _isNumberOrBoolean(value: number | boolean): boolean {\n\t\treturn this._isNumeric(value) || typeof value === 'boolean';\n\t}\n\n\t/**\n\t * Determines whether value is number or string type\n\t * @param value The input to be tested\n\t * @returns An indication if the input is a Number or can be coerced to a Number, or String\n\t */\n\tprivate _isNumberOrString(value: number | string): boolean {\n\t\treturn this._isNumeric(value) || typeof value === 'string';\n\t}\n\n\t/**\n\t * Determines whether value is number or string type\n\t * @param value The input to be tested\n\t * @returns An indication if the input is a Number or can be coerced to a Number, or String\n\t */\n\tprivate _isStringOrBoolean(value: number | string): boolean {\n\t\treturn typeof value === 'string' || typeof value === 'boolean';\n\t}\n\n /**\n\t * Gets the difference of two vectors.\n\t * @todo #261\n\t * @param first The first vector.\n\t * @param second The second vector.\n\t * @returns The difference.\n\t */\n difference(first: Coords, second: Coords): Coords {\n\t\tif (null === first || null === second) {\n return {\n x: 0,\n y: 0,\n };\n }\n\t\treturn {\n\t\t\tx: first.x - second.x,\n\t\t\ty: first.y - second.y\n\t\t};\n\t}\n\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { NavData, DotsData } from '../models/navigation-data.models';\nimport { CarouselSlideDirective } from '../carousel/carousel-slide.directive';\nimport { CarouselService } from './carousel.service';\nimport { Subscription, Observable, merge } from 'rxjs';\nimport { tap, filter } from 'rxjs/operators';\nimport { OwlOptions } from '../models/owl-options.model';\n\n@Injectable()\nexport class NavigationService implements OnDestroy {\n /**\n * Subscrioption to merge Observable from CarouselService\n */\n navSubscription: Subscription;\n\n /**\n * Indicates whether the plugin is initialized or not.\n */\n protected _initialized = false;\n\n /**\n * The current paging indexes.\n */\n protected _pages: any[] = [];\n\n /**\n * Data for navigation elements of the user interface.\n */\n protected _navData: NavData = {\n disabled: false,\n prev: {\n disabled: false,\n htmlText: ''\n },\n next: {\n disabled: false,\n htmlText: ''\n },\n };\n\n /**\n * Data for dot elements of the user interface.\n */\n protected _dotsData: DotsData = {\n disabled: false,\n dots: []\n };\n\n constructor(private carouselService: CarouselService) {\n this.spyDataStreams();\n }\n\n ngOnDestroy() {\n this.navSubscription.unsubscribe();\n }\n\n /**\n * Defines Observables which service must observe\n */\n spyDataStreams() {\n const initializedCarousel$: Observable = this.carouselService.getInitializedState().pipe(\n tap(state => {\n this.initialize();\n this._updateNavPages();\n this.draw();\n this.update();\n this.carouselService.sendChanges();\n })\n );\n\n // mostly changes in carouselService and carousel at all causes carouselService.to(). It moves stage right-left by its code and calling needed functions\n // Thus this method by calling carouselService.current(position) notifies about changes\n const changedSettings$: Observable = this.carouselService.getChangedState().pipe(\n filter(data => data.property.name === 'position'),\n tap(data => {\n this.update();\n // should be the call of the function written at the end of comment\n // but the method carouselServive.to() has setTimeout(f, 0) which contains carouselServive.update() which calls sendChanges() method.\n // carouselService.navData and carouselService.dotsData update earlier than carouselServive.update() gets called\n // updates of carouselService.navData and carouselService.dotsData are being happening withing carouselService.current(position) method which calls next() of _changedSettingsCarousel$\n // carouselService.current(position) is being calling earlier than carouselServive.update();\n // this.carouselService.sendChanges();\n })\n );\n\n const refreshedCarousel$: Observable = this.carouselService.getRefreshedState().pipe(\n tap(() => {\n this._updateNavPages();\n this.draw();\n this.update();\n this.carouselService.sendChanges();\n })\n );\n\n const navMerge$: Observable = merge(initializedCarousel$, changedSettings$, refreshedCarousel$);\n this.navSubscription = navMerge$.subscribe(\n () => {}\n );\n }\n\n /**\n\t * Initializes the layout of the plugin and extends the carousel.\n\t */\n\tinitialize() {\n this._navData.disabled = true;\n this._navData.prev.htmlText = this.carouselService.settings.navText[0];\n this._navData.next.htmlText = this.carouselService.settings.navText[1];\n\n this._dotsData.disabled = true;\n\n this.carouselService.navData = this._navData;\n this.carouselService.dotsData = this._dotsData;\n }\n\n /**\n * Calculates internal states and updates prop _pages\n */\n\tprivate _updateNavPages() {\n\t\tlet i: number, j: number, k: number;\n\t\tconst lower: number = this.carouselService.clones().length / 2,\n upper: number = lower + this.carouselService.items().length,\n maximum: number = this.carouselService.maximum(true),\n pages: any[] = [],\n settings: OwlOptions = this.carouselService.settings;\n let size = settings.center || settings.autoWidth || settings.dotsData\n ? 1 : Math.floor(Number(settings.dotsEach)) || Math.floor(settings.items);\n size = +size;\n\t\tif (settings.slideBy !== 'page') {\n\t\t\tsettings.slideBy = Math.min(+settings.slideBy, settings.items);\n\t\t}\n\n\t\tif (settings.dots || settings.slideBy === 'page') {\n\n\t\t\tfor (i = lower, j = 0, k = 0; i < upper; i++) {\n\t\t\t\tif (j >= size || j === 0) {\n\t\t\t\t\tpages.push({\n\t\t\t\t\t\tstart: Math.min(maximum, i - lower),\n\t\t\t\t\t\tend: i - lower + size - 1\n\t\t\t\t\t});\n\t\t\t\t\tif (Math.min(maximum, i - lower) === maximum) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tj = 0, ++k;\n\t\t\t\t}\n\t\t\t\tj += this.carouselService.mergers(this.carouselService.relative(i)) as number;\n\t\t\t}\n\t\t}\n\t\tthis._pages = pages;\n\t}\n\n /**\n\t * Draws the user interface.\n\t * @todo The option `dotsData` wont work.\n\t */\n draw() {\n\t\tlet difference: number;\n const\tsettings: OwlOptions = this.carouselService.settings,\n items: CarouselSlideDirective[] = this.carouselService.items(),\n disabled = items.length <= settings.items;\n\n\t\tthis._navData.disabled = !settings.nav || disabled;\n\t\tthis._dotsData.disabled = !settings.dots || disabled;\n\n\t\tif (settings.dots) {\n\t\t\tdifference = this._pages.length - this._dotsData.dots.length;\n\n\t\t\tif (settings.dotsData && difference !== 0) {\n this._dotsData.dots = [];\n items.forEach(item => {\n this._dotsData.dots.push({\n active: false,\n id: `dot-${item.id}`,\n innerContent: item.dotContent,\n showInnerContent: true\n });\n });\n\t\t\t} else if (difference > 0) {\n const startI: number = this._dotsData.dots.length > 0 ? this._dotsData.dots.length : 0;\n for (let i = 0; i < difference; i++) {\n this._dotsData.dots.push({\n active: false,\n id: `dot-${i + startI}`,\n innerContent: '',\n showInnerContent: false\n });\n }\n\t\t\t} else if (difference < 0) {\n this._dotsData.dots.splice(difference, Math.abs(difference))\n\t\t\t}\n }\n\n this.carouselService.navData = this._navData;\n this.carouselService.dotsData = this._dotsData;\n };\n\n /**\n * Updates navigation buttons's and dots's states\n */\n update() {\n this._updateNavButtons();\n this._updateDots();\n }\n\n /**\n * Changes state of nav buttons (disabled, enabled)\n */\n private _updateNavButtons() {\n const\tsettings: OwlOptions = this.carouselService.settings,\n loop: boolean = settings.loop || settings.rewind,\n index: number = this.carouselService.relative(this.carouselService.current());\n\n if (settings.nav) {\n this._navData.prev.disabled = !loop && index <= this.carouselService.minimum(true);\n\t\t\tthis._navData.next.disabled = !loop && index >= this.carouselService.maximum(true);\n }\n\n this.carouselService.navData = this._navData;\n }\n\n /**\n * Changes active dot if page becomes changed\n */\n private _updateDots() {\n let curActiveDotI: number;\n\n if(!this.carouselService.settings.dots) {\n return;\n }\n this._dotsData.dots.forEach(item => {\n if (item.active === true) {\n item.active = false;\n }\n })\n\n curActiveDotI = this._current();\n if (this._dotsData.dots.length) {\n this._dotsData.dots[curActiveDotI].active = true;\n }\n this.carouselService.dotsData = this._dotsData;\n }\n\n /**\n\t * Gets the current page position of the carousel.\n\t * @returns the current page position of the carousel\n\t */\n\tprivate _current(): any {\n const current: number = this.carouselService.relative(this.carouselService.current());\n let finalCurrent: number;\n const pages: any = this._pages.filter((page, index) => {\n return page.start <= current && page.end >= current;\n }).pop();\n\n finalCurrent = this._pages.findIndex(page => {\n return page.start === pages.start && page.end === pages.end;\n });\n\n return finalCurrent;\n };\n\n /**\n\t * Gets the current succesor/predecessor position.\n * @param sussessor position of slide\n\t * @returns the current succesor/predecessor position\n\t */\n\tprivate _getPosition(successor: number | boolean): number {\n\t\tlet position: number, length: number;\n\t\tconst\tsettings: OwlOptions = this.carouselService.settings;\n\n\t\tif (settings.slideBy === 'page') {\n\t\t\tposition = this._current();\n\t\t\tlength = this._pages.length;\n\t\t\tsuccessor ? ++position : --position;\n\t\t\tposition = this._pages[((position % length) + length) % length].start;\n\t\t} else {\n\t\t\tposition = this.carouselService.relative(this.carouselService.current());\n\t\t\tlength = this.carouselService.items().length;\n\t\t\tsuccessor ? position += +settings.slideBy : position -= +settings.slideBy;\n\t\t}\n\n\t\treturn position;\n };\n\n /**\n\t * Slides to the next item or page.\n\t * @param speed The time in milliseconds for the transition.\n\t */\n\tnext(speed: number | boolean) {\n this.carouselService.to(this._getPosition(true), speed);\n\t};\n\n\t/**\n\t * Slides to the previous item or page.\n\t * @param speed The time in milliseconds for the transition.\n\t */\n\tprev(speed: number | boolean) {\n this.carouselService.to(this._getPosition(false), speed);\n };\n\n \t/**\n\t * Slides to the specified item or page.\n\t * @param position - The position of the item or page.\n\t * @param speed - The time in milliseconds for the transition.\n\t * @param standard - Whether to use the standard behaviour or not. Default meaning false\n\t */\n\tto(position: number, speed: number | boolean, standard?: boolean) {\n\t\tlet length: number;\n\t\tif (!standard && this._pages.length) {\n length = this._pages.length;\n this.carouselService.to(this._pages[((position % length) + length) % length].start, speed);\n\t\t} else {\n this.carouselService.to(position, speed);\n\t\t}\n };\n\n /**\n * Moves carousel after user's clicking on any dots\n */\n moveByDot(dotId: string) {\n const index: number = this._dotsData.dots.findIndex(dot => dotId === dot.id);\n this.to(index, this.carouselService.settings.dotsSpeed);\n }\n\n /**\n * rewinds carousel to slide with needed id\n * @param id id of slide\n */\n toSlideById(id: string) {\n const position = this.carouselService.slidesData.findIndex(slide => slide.id === id && slide.isCloned === false);\n\n if (position === -1 || position === this.carouselService.current()) {\n return;\n }\n\n\t\tthis.carouselService.to(this.carouselService.relative(position), false);\n }\n\n}\n","// import { Injectable } from '@angular/core';\n// function _window(): any {\n// // return the global native browser window object\n// return window;\n// }\n// @Injectable()\n// export class WindowRefService {\n// get nativeWindow(): any {\n// return _window();\n// }\n// }\n\nimport { isPlatformBrowser } from '@angular/common';\nimport { ClassProvider, FactoryProvider, InjectionToken, PLATFORM_ID, Injectable } from '@angular/core';\n\n/**\n * Create a new injection token for injecting the window into a component.\n */\nexport const WINDOW = new InjectionToken('WindowToken');\n\n/**\n * Define abstract class for obtaining reference to the global window object.\n */\nexport abstract class WindowRef {\n get nativeWindow(): Window | Object {\n throw new Error('Not implemented.');\n }\n}\n\n/**\n * Define class that implements the abstract class and returns the native window object.\n */\n@Injectable()\nexport class BrowserWindowRef extends WindowRef {\n constructor() {\n super();\n }\n\n /**\n * @returns window object\n */\n get nativeWindow(): Window | Object {\n return window;\n }\n}\n\n/**\n * Create an factory function that returns the native window object.\n * @param browserWindowRef Native window object\n * @param platformId id of platform\n * @returns type of platform of empty object\n */\nexport function windowFactory(\n browserWindowRef: BrowserWindowRef,\n platformId: Object\n): Window | Object {\n if (isPlatformBrowser(platformId)) {\n return browserWindowRef.nativeWindow;\n }\n const obj = {\n setTimeout: (func: any, time: any) => {},\n clearTimeout: (a: any) => {}\n }\n return obj;\n}\n\n/**\n * Create a injectable provider for the WindowRef token that uses the BrowserWindowRef class.\n */\nexport const browserWindowProvider: ClassProvider = {\n provide: WindowRef,\n useClass: BrowserWindowRef\n};\n\n/**\n * Create an injectable provider that uses the windowFactory function for returning the native window object.\n */\nexport const windowProvider: FactoryProvider = {\n provide: WINDOW,\n useFactory: windowFactory,\n deps: [WindowRef, PLATFORM_ID]\n};\n\n/**\n * Create an array of providers.\n */\nexport const WINDOW_PROVIDERS = [browserWindowProvider, windowProvider];\n","import { isPlatformBrowser } from '@angular/common';\nimport { ClassProvider, FactoryProvider, InjectionToken, PLATFORM_ID, Injectable } from '@angular/core';\n\n/**\n * Create a new injection token for injecting the Document into a component.\n */\nexport const DOCUMENT = new InjectionToken('DocumentToken');\n/**\n * Define abstract class for obtaining reference to the global Document object.\n */\nexport abstract class DocumentRef {\n get nativeDocument(): Document | Object {\n throw new Error('Not implemented.');\n }\n}\n\n/**\n * Define class that implements the abstract class and returns the native Document object.\n */\n@Injectable()\nexport class BrowserDocumentRef extends DocumentRef {\n constructor() {\n super();\n }\n\n /**\n * @returns Document object\n */\n get nativeDocument(): Document | Object {\n return document;\n }\n}\n\n/**\n * Create an factory function that returns the native Document object.\n * @param browserDocumentRef Native Document object\n * @param platformId id of platform\n * @returns type of platform of empty object\n */\nexport function documentFactory(\n browserDocumentRef: BrowserDocumentRef,\n platformId: Object\n): Document | Object {\n if (isPlatformBrowser(platformId)) {\n return browserDocumentRef.nativeDocument;\n }\n const doc = {\n hidden: false,\n visibilityState: 'visible'\n }\n return doc;\n}\n\n/**\n * Create a injectable provider for the DocumentRef token that uses the BrowserDocumentRef class.\n */\nexport const browserDocumentProvider: ClassProvider = {\n provide: DocumentRef,\n useClass: BrowserDocumentRef\n};\n\n/**\n * Create an injectable provider that uses the DocumentFactory function for returning the native Document object.\n */\nexport const documentProvider: FactoryProvider = {\n provide: DOCUMENT,\n useFactory: documentFactory,\n deps: [DocumentRef, PLATFORM_ID]\n};\n\n/**\n * Create an array of providers.\n */\nexport const DOCUMENT_PROVIDERS = [browserDocumentProvider, documentProvider];\n","import { Injectable, Inject, OnDestroy, NgZone } from '@angular/core';\nimport { Subscription, Observable, merge, of } from 'rxjs';\nimport { tap, switchMap, first, filter } from 'rxjs/operators';\n\nimport { CarouselService } from './carousel.service';\nimport { WINDOW } from './window-ref.service';\nimport { DOCUMENT } from './document-ref.service';\n\n@Injectable()\nexport class AutoplayService implements OnDestroy{\n /**\n * Subscrioption to merge Observables from CarouselService\n */\n autoplaySubscription: Subscription;\n\n /**\n * The autoplay timeout.\n */\n private _timeout: number = null;\n\n /**\n * Indicates whenever the autoplay is paused.\n */\n private _paused = false;\n\n /**\n * Shows whether the code (the plugin) changed the option 'AutoplayTimeout' for own needs\n */\n private _isArtificialAutoplayTimeout: boolean;\n\n /**\n * Shows whether the autoplay is paused for unlimited time by the developer.\n * Use to prevent autoplaying in case of firing `mouseleave` by adding layers to `` like `mat-menu` does\n */\n private _isAutoplayStopped = false;\n get isAutoplayStopped() {\n return this._isAutoplayStopped;\n }\n set isAutoplayStopped(value) {\n this._isAutoplayStopped = value;\n }\n\n private winRef: Window;\n private docRef: Document;\n\n\n constructor(private carouselService: CarouselService,\n @Inject(WINDOW) winRef: any,\n @Inject(DOCUMENT) docRef: any,\n private ngZone: NgZone\n ) {\n this.winRef = winRef as Window;\n this.docRef = docRef as Document;\n this.spyDataStreams();\n }\n\n ngOnDestroy() {\n this.autoplaySubscription.unsubscribe();\n }\n\n /**\n * Defines Observables which service must observe\n */\n spyDataStreams() {\n const initializedCarousel$: Observable = this.carouselService.getInitializedState().pipe(\n tap(() => {\n if (this.carouselService.settings.autoplay) {\n this.play();\n\t\t\t\t}\n })\n );\n\n const changedSettings$: Observable = this.carouselService.getChangedState().pipe(\n tap(data => {\n this._handleChangeObservable(data);\n })\n );\n\n const resized$: Observable = this.carouselService.getResizedState().pipe(\n tap(() => {\n if (this.carouselService.settings.autoplay && !this._isAutoplayStopped) {\n this.play();\n\t\t\t\t} else {\n this.stop();\n }\n })\n )\n\n // original Autoplay Plugin has listeners on play.owl.core and stop.owl.core events.\n // They are triggered by Video Plugin\n\n const autoplayMerge$: Observable = merge(initializedCarousel$, changedSettings$, resized$);\n this.autoplaySubscription = autoplayMerge$.subscribe(\n () => {}\n );\n }\n\n /**\n\t * Starts the autoplay.\n\t * @param timeout The interval before the next animation starts.\n\t * @param speed The animation speed for the animations.\n\t */\n\tplay(timeout?: number, speed?: number) {\n if (this._paused) {\n\t\t\tthis._paused = false;\n\t\t\tthis._setAutoPlayInterval(this.carouselService.settings.autoplayMouseleaveTimeout);\n }\n\n\t\tif (this.carouselService.is('rotating')) {\n\t\t\treturn;\n\t\t}\n\n this.carouselService.enter('rotating');\n\n\t\tthis._setAutoPlayInterval();\n };\n\n /**\n\t * Gets a new timeout\n\t * @param timeout - The interval before the next animation starts.\n\t * @param speed - The animation speed for the animations.\n\t * @return\n\t */\n\tprivate _getNextTimeout(timeout?: number, speed?: number): number {\n\t\tif ( this._timeout ) {\n\t\t\tthis.winRef.clearTimeout(this._timeout);\n }\n\n this._isArtificialAutoplayTimeout = timeout ? true : false;\n\n\t\treturn this.ngZone.runOutsideAngular(() => {\n return this.winRef.setTimeout(() =>{\n this.ngZone.run(() => {\n if (this._paused || this.carouselService.is('busy') || this.carouselService.is('interacting') || this.docRef.hidden) {\n return;\n }\n this.carouselService.next(speed || this.carouselService.settings.autoplaySpeed);\n });\n }, timeout || this.carouselService.settings.autoplayTimeout);\n });\n\n };\n\n /**\n\t * Sets autoplay in motion.\n\t */\n private _setAutoPlayInterval(timeout?: number) {\n\t\tthis._timeout = this._getNextTimeout(timeout);\n\t};\n\n\t/**\n\t * Stops the autoplay.\n\t */\n\tstop() {\n\t\tif (!this.carouselService.is('rotating')) {\n\t\t\treturn;\n\t\t}\n this._paused = true;\n\n\t\tthis.winRef.clearTimeout(this._timeout);\n\t\tthis.carouselService.leave('rotating');\n };\n\n /**\n\t * Stops the autoplay.\n\t */\n\tpause() {\n\t\tif (!this.carouselService.is('rotating')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._paused = true;\n };\n\n /**\n * Manages by autoplaying according to data passed by _changedSettingsCarousel$ Obsarvable\n * @param data object with current position of carousel and type of change\n */\n private _handleChangeObservable(data: any) {\n if (data.property.name === 'settings') {\n if (this.carouselService.settings.autoplay) {\n this.play();\n } else {\n this.stop();\n }\n } else if (data.property.name === 'position') {\n //console.log('play?', e);\n if (this.carouselService.settings.autoplay) {\n this._setAutoPlayInterval();\n }\n }\n }\n\n /**\n * Starts autoplaying of the carousel in the case when user leaves the carousel before it starts translateing (moving)\n */\n private _playAfterTranslated() {\n of('translated').pipe(\n switchMap(data => this.carouselService.getTranslatedState()),\n first(),\n filter(() => this._isArtificialAutoplayTimeout),\n tap(() => this._setAutoPlayInterval())\n ).subscribe(() => { });\n }\n\n /**\n * Starts pausing\n */\n startPausing() {\n if (this.carouselService.settings.autoplayHoverPause && this.carouselService.is('rotating')) {\n this.pause();\n }\n }\n\n /**\n * Starts playing after mouse leaves carousel\n */\n startPlayingMouseLeave() {\n if (this.carouselService.settings.autoplayHoverPause && this.carouselService.is('rotating')) {\n this.play();\n this._playAfterTranslated();\n }\n }\n\n /**\n * Starts playing after touch ends\n */\n startPlayingTouchEnd() {\n if (this.carouselService.settings.autoplayHoverPause && this.carouselService.is('rotating')) {\n this.play();\n this._playAfterTranslated();\n }\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { Subscription, Observable, merge } from 'rxjs';\nimport { CarouselService } from './carousel.service';\nimport { tap } from 'rxjs/operators';\n\n@Injectable()\nexport class LazyLoadService implements OnDestroy {\n /**\n * Subscrioption to merge Observable from CarouselService\n */\n lazyLoadSubscription: Subscription;\n\n constructor(private carouselService: CarouselService) {\n this.spyDataStreams();\n }\n\n ngOnDestroy() {\n this.lazyLoadSubscription.unsubscribe();\n }\n\n /**\n * Defines Observables which service must observe\n */\n spyDataStreams() {\n const initializedCarousel$: Observable = this.carouselService.getInitializedState().pipe(\n tap(() => {\n const isLazyLoad = this.carouselService.settings && !this.carouselService.settings.lazyLoad;\n this.carouselService.slidesData.forEach(item => item.load = isLazyLoad ? true : false);\n })\n );\n\n const changeSettings$: Observable = this.carouselService.getChangeState();\n\n const resizedCarousel$: Observable = this.carouselService.getResizedState();\n\n\n const lazyLoadMerge$: Observable = merge(initializedCarousel$, changeSettings$, resizedCarousel$).pipe(\n tap(data => this._defineLazyLoadSlides(data)),\n // tap(() => this.carouselService.sendChanges())\n );\n this.lazyLoadSubscription = lazyLoadMerge$.subscribe(\n () => {}\n );\n }\n\n private _defineLazyLoadSlides(data: any) {\n if (!this.carouselService.settings || !this.carouselService.settings.lazyLoad) {\n return;\n }\n\n if ((data.property && data.property.name === 'position') || data === 'initialized' || data === \"resized\") {\n const settings = this.carouselService.settings,\n clones = this.carouselService.clones().length;\n let n = (settings.center && Math.ceil(settings.items / 2) || settings.items),\n i = ((settings.center && n * -1) || 0),\n position = (data.property && data.property.value !== undefined ? data.property.value : this.carouselService.current()) + i;\n // load = $.proxy(function(i, v) { this.load(v) }, this);\n //TODO: Need documentation for this new option\n if (settings.lazyLoadEager > 0) {\n n += settings.lazyLoadEager;\n // If the carousel is looping also preload images that are to the \"left\"\n if (settings.loop) {\n position -= settings.lazyLoadEager;\n n++;\n }\n }\n\n while (i++ < n) {\n this._load(clones / 2 + this.carouselService.relative(position));\n if (clones) {\n this.carouselService.clones(this.carouselService.relative(position)).forEach(value => this._load(value));\n\n }\n position++;\n }\n }\n }\n\n /**\n\t * Loads all resources of an item at the specified position.\n\t * @param position - The absolute position of the item.\n\t */\n private _load(position: number) {\n if (this.carouselService.slidesData[position].load) {\n return;\n }\n\n this.carouselService.slidesData[position].load = true;\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { Subscription, Observable, merge } from 'rxjs';\nimport { CarouselService } from './carousel.service';\nimport { tap } from 'rxjs/operators';\n\n@Injectable()\nexport class AnimateService implements OnDestroy{\n /**\n * Subscrioption to merge Observable from CarouselService\n */\n animateSubscription: Subscription;\n\n /**\n * s\n */\n swapping = true;\n\n /**\n * active slide before translating\n */\n previous = undefined;\n\n /**\n * new active slide after translating\n */\n next = undefined;\n\n constructor(private carouselService: CarouselService) {\n this.spyDataStreams();\n }\n\n ngOnDestroy() {\n this.animateSubscription.unsubscribe();\n }\n\n /**\n * Defines Observables which service must observe\n */\n spyDataStreams() {\n const changeSettings$: Observable = this.carouselService.getChangeState().pipe(\n tap(data => {\n if (data.property.name === 'position') {\n\t\t\t\t\tthis.previous = this.carouselService.current();\n\t\t\t\t\tthis.next = data.property.value;\n\t\t\t\t}\n })\n );\n\n const dragCarousel$: Observable = this.carouselService.getDragState();\n const draggedCarousel$: Observable = this.carouselService.getDraggedState();\n const translatedCarousel$: Observable = this.carouselService.getTranslatedState();\n\n const dragTranslatedMerge$: Observable = merge(dragCarousel$, draggedCarousel$, translatedCarousel$).pipe(\n tap(data => this.swapping = data === 'translated')\n );\n\n const translateCarousel$: Observable = this.carouselService.getTranslateState().pipe(\n tap(data => {\n if (this.swapping && (this.carouselService._options.animateOut || this.carouselService._options.animateIn)) {\n this._swap();\n }\n })\n );\n\n const animateMerge$: Observable = merge(changeSettings$, translateCarousel$, dragTranslatedMerge$).pipe();\n this.animateSubscription = animateMerge$.subscribe(\n () => {}\n );\n }\n\n /**\n\t * Toggles the animation classes whenever an translations starts.\n\t * @returns\n\t */\n\tprivate _swap(): boolean {\n\n\t\tif (this.carouselService.settings.items !== 1) {\n\t\t\treturn;\n\t\t}\n\n\t\t// if (!$.support.animation || !$.support.transition) {\n\t\t// \treturn;\n\t\t// }\n\n\t\tthis.carouselService.speed(0);\n\n\t\tlet left;\n\t\tconst\tprevious = this.carouselService.slidesData[this.previous],\n\t\t\tnext = this.carouselService.slidesData[this.next],\n\t\t\tincoming = this.carouselService.settings.animateIn,\n\t\t\toutgoing = this.carouselService.settings.animateOut;\n\n\t\tif (this.carouselService.current() === this.previous) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (outgoing) {\n\t\t\tleft = +this.carouselService.coordinates(this.previous) - +this.carouselService.coordinates(this.next);\n this.carouselService.slidesData.forEach(slide => {\n if (slide.id === previous.id) {\n slide.left = `${left}px`;\n slide.isAnimated = true;\n slide.isDefAnimatedOut = true;\n slide.isCustomAnimatedOut = true;\n }\n });\n\t\t}\n\n\t\tif (incoming) {\n this.carouselService.slidesData.forEach(slide => {\n if (slide.id === next.id) {\n slide.isAnimated = true;\n slide.isDefAnimatedIn = true;\n slide.isCustomAnimatedIn = true;\n }\n });\n\t\t}\n\t};\n\n /**\n * Handles the end of 'animationend' event\n * @param id Id of slides\n */\n clear(id) {\n this.carouselService.slidesData.forEach(slide => {\n if (slide.id === id) {\n slide.left = '';\n slide.isAnimated = false;\n slide.isDefAnimatedOut = false;\n slide.isCustomAnimatedOut = false;\n slide.isDefAnimatedIn = false;\n slide.isCustomAnimatedIn = false;\n slide.classes = this.carouselService.setCurSlideClasses(slide);\n }\n });\n this.carouselService.onTransitionEnd();\n\t};\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { Subscription, Observable, merge } from 'rxjs';\nimport { CarouselService } from './carousel.service';\nimport { tap } from 'rxjs/operators';\n\n@Injectable()\nexport class AutoHeightService implements OnDestroy{\n /**\n * Subscrioption to merge Observable from CarouselService\n */\n autoHeightSubscription: Subscription;\n constructor(private carouselService: CarouselService) {\n this.spyDataStreams();\n }\n\n ngOnDestroy() {\n this.autoHeightSubscription.unsubscribe();\n }\n /**\n * Defines Observables which service must observe\n */\n spyDataStreams() {\n const initializedCarousel$: Observable = this.carouselService.getInitializedState().pipe(\n tap(data => {\n if (this.carouselService.settings.autoHeight) {\n this.update();\n } else {\n this.carouselService.slidesData.forEach(slide => slide.heightState = 'full');\n }\n })\n );\n\n const changedSettings$: Observable = this.carouselService.getChangedState().pipe(\n tap(data => {\n if (this.carouselService.settings.autoHeight && data.property.name === 'position'){\n\t\t\t\t\tthis.update();\n\t\t\t\t}\n })\n );\n\n const refreshedCarousel$: Observable = this.carouselService.getRefreshedState().pipe(\n tap(data => {\n if (this.carouselService.settings.autoHeight) {\n this.update();\n }\n })\n );\n\n const autoHeight$: Observable = merge(initializedCarousel$, changedSettings$, refreshedCarousel$);\n this.autoHeightSubscription = autoHeight$.subscribe(\n () => {}\n );\n }\n\n /**\n * Updates the prop 'heightState' of slides\n */\n update() {\n const items = this.carouselService.settings.items\n let start = this.carouselService.current(),\n end = start + items;\n\n if (this.carouselService.settings.center) {\n start = items % 2 === 1 ? start - (items - 1) / 2 : start - items / 2;\n end = items % 2 === 1 ? start + items : start + items + 1;\n }\n\n this.carouselService.slidesData.forEach((slide, i) => {\n slide.heightState = (i >= start && i < end) ? 'full' : 'nulled';\n });\n }\n\n\n}\n","import { Injectable, OnDestroy, Optional } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport { Subscription, Observable, merge, of } from 'rxjs';\nimport { tap, skip, take } from 'rxjs/operators';\n\nimport { CarouselService } from './carousel.service';\n\n@Injectable()\nexport class HashService implements OnDestroy {\n /**\n * Subscription to merge Observable from CarouselService\n */\n hashSubscription: Subscription;\n\n /**\n * Current url fragment (hash)\n */\n currentHashFragment: string;\n\n constructor(\n private carouselService: CarouselService,\n @Optional() private route: ActivatedRoute,\n @Optional() private router: Router\n ) {\n this.spyDataStreams();\n if (!this.route) {\n this.route = {\n fragment: of('no route').pipe(take(1))\n } as any;\n };\n\n if (!this.router) {\n this.router = {\n navigate: (commands: any[], extras?: any) => { return }\n } as any;\n }\n }\n\n ngOnDestroy() {\n this.hashSubscription.unsubscribe();\n }\n\n /**\n * Defines Observables which service must observe\n */\n spyDataStreams() {\n const initializedCarousel$: Observable = this.carouselService.getInitializedState().pipe(\n tap(() => this.listenToRoute() )\n );\n\n const changedSettings$: Observable = this.carouselService.getChangedState().pipe(\n tap(data => {\n if (this.carouselService.settings.URLhashListener && data.property.name === 'position') {\n const newCurSlide = this.carouselService.current();\n const newCurFragment = this.carouselService.slidesData[newCurSlide].hashFragment;\n\n if (!newCurFragment || newCurFragment === this.currentHashFragment) {\n\t\t\t\t\t\treturn;\n }\n this.router.navigate(['./'], {fragment: newCurFragment, relativeTo: this.route});\n }\n })\n );\n\n const hashFragment$: Observable = merge(initializedCarousel$, changedSettings$);\n this.hashSubscription = hashFragment$.subscribe(\n () => {}\n );\n }\n\n /**\n * rewinds carousel to slide which has the same hashFragment as fragment of current url\n * @param fragment fragment of url\n */\n rewind(fragment: string) {\n const position = this.carouselService.slidesData.findIndex(slide => slide.hashFragment === fragment && slide.isCloned === false);\n\n if (position === -1 || position === this.carouselService.current()) {\n return;\n }\n\n\t\tthis.carouselService.to(this.carouselService.relative(position), false);\n }\n\n /**\n * Initiate listening to ActivatedRoute.fragment\n */\n listenToRoute() {\n const count = this.carouselService.settings.startPosition === 'URLHash' ? 0 : 2;\n this.route.fragment.pipe(\n skip(count)\n )\n .subscribe(\n fragment => {\n this.currentHashFragment = fragment;\n this.rewind(fragment);\n }\n )\n }\n}\n","import { Input, Directive, TemplateRef } from '@angular/core';\n\nlet nextId = 0;\n\n@Directive({ selector: 'ng-template[carouselSlide]' })\nexport class CarouselSlideDirective {\n /**\n * Unique slide identifier. Must be unique for the entire document for proper accessibility support.\n * Will be auto-generated if not provided.\n */\n @Input() id = `owl-slide-${nextId++}`;\n\n /**\n * Defines how much widths of common slide will current slide have\n * e.g. if _mergeData=2, the slide will twice wider then slides with _mergeData=1\n */\n private _dataMerge = 1;\n @Input()\n set dataMerge(data: number) {\n this._dataMerge = this.isNumeric(data) ? data : 1;\n };\n get dataMerge(): number { return this._dataMerge; }\n\n /**\n * Width of slide\n */\n @Input() width = 0;\n\n /**\n * Inner content of dot for certain slide; can be html-markup\n */\n @Input() dotContent = '';\n\n /**\n * Hash (fragment) of url which corresponds to certain slide\n */\n @Input() dataHash = '';\n\n constructor(public tplRef: TemplateRef) { }\n\n /**\n * Determines if the input is a Number or something that can be coerced to a Number\n * @param - The input to be tested\n * @returns - An indication if the input is a Number or can be coerced to a Number\n */\n isNumeric(number: any): boolean {\n return !isNaN(parseFloat(number));\n }\n}\n","import { EventManager } from '@angular/platform-browser';\nimport { Observable, Subject } from 'rxjs';\nimport { Inject, Injectable } from '@angular/core';\nimport { DOCUMENT } from './document-ref.service';\n\n@Injectable()\nexport class ResizeService {\n /**\n * Width of window\n */\n public windowWidth: any;\n\n /**\n * Makes resizeSubject become Observable\n * @returns Observable of resizeSubject\n */\n get onResize$(): Observable {\n return this.resizeSubject.asObservable();\n }\n\n /**\n * Subject of 'resize' event\n */\n private resizeSubject: Subject;\n private docRef: Document;\n\n constructor(private eventManager: EventManager, @Inject(DOCUMENT) docRef: any,) {\n\n this.docRef = docRef as Document;\n\n this.resizeSubject = new Subject();\n this.eventManager.addGlobalEventListener(\n 'window',\n 'resize',\n this.onResize.bind(this)\n );\n this.eventManager.addGlobalEventListener(\n 'window',\n 'onload',\n this.onLoaded.bind(this)\n );\n }\n\n /**\n * Handler of 'resize' event. Passes data throw resizeSubject\n * @param event Event Object of 'resize' event\n */\n private onResize(event: UIEvent) {\n if (this.docRef?.fullscreenElement) {\n return\n }\n this.resizeSubject.next(event.target);\n }\n\n /**\n * Handler of 'onload' event. Defines the width of window\n * @param event Event Object of 'onload' event\n */\n private onLoaded(event: UIEvent) {\n this.windowWidth = event.target;\n }\n}\n","import { Component, NgZone, ElementRef, HostListener, Renderer2, OnInit, OnDestroy, Input } from '@angular/core';\nimport { CarouselService, Coords } from '../../services/carousel.service';\nimport { Subject, Subscription } from 'rxjs';\nimport { first } from 'rxjs/operators';\nimport { StageData } from '../../models/stage-data.model';\nimport { SlideModel } from '../../models/slide.model';\nimport { AnimateService } from '../../services/animate.service';\nimport {\n trigger,\n state,\n style,\n animate,\n transition\n} from '@angular/animations';\n@Component({\n selector: 'owl-stage',\n template: `\n
\n
\n \n
\n \n
\n
\n
\n
\n `,\n animations: [\n trigger('autoHeight', [\n state('nulled', style({height: 0})),\n state('full', style({height: '*'})),\n transition('full => nulled', [\n // style({height: '*'}),\n animate('700ms 350ms')\n ]),\n transition('nulled => full', [\n // style({height: 0}),\n animate(350)\n ]),\n ])\n ]\n})\nexport class StageComponent implements OnInit, OnDestroy {\n /**\n * Object with settings which make carousel draggable by touch or mouse\n */\n @Input() owlDraggable: {\n isMouseDragable: boolean,\n isTouchDragable: boolean\n };\n\n /**\n * Data of owl-stage\n */\n @Input() stageData: StageData;\n\n\t/**\n\t * Data of every slide\n\t */\n @Input() slidesData: SlideModel[];\n\n /**\n * Function wich will be returned after attaching listener to 'mousemove' event\n */\n listenerMouseMove: () => void;\n /**\n * Function wich will be returned after attaching listener to 'touchmove' event\n */\n listenerTouchMove: () => void;\n /**\n * Function wich will be returned after attaching listener to 'mousemove' event\n */\n listenerOneMouseMove: () => void;\n /**\n * Function wich will be returned after attaching listener to 'touchmove' event\n */\n listenerOneTouchMove: () => void;\n\n /**\n * Function wich will be returned after attaching listener to 'mouseup' event\n */\n listenerMouseUp: () => void;\n /**\n * Function wich will be returned after attaching listener to 'touchend' event\n */\n listenerTouchEnd: () => void;\n\n /**\n * Function wich will be returned after attaching listener to 'click' event\n */\n listenerOneClick: () => void;\n\n listenerATag: () => void;\n\n /**\n * Object with data needed for dragging\n */\n private _drag: any = {\n time: null,\n target: null,\n pointer: null,\n stage: {\n start: null,\n current: null\n },\n direction: null,\n active: false,\n moving: false\n };\n\n /**\n * Subject for notification when the carousel's rebuilding caused by resize event starts\n */\n private _oneDragMove$ = new Subject();\n\n /**\n * Subsctiption to _oneDragMove$ Subject\n */\n private _oneMoveSubsription: Subscription;\n\n preparePublicSlide = (slide: SlideModel): SlideModel => {\n const newSlide = { ...slide };\n delete newSlide.tplRef;\n return newSlide;\n }\n\n constructor(private zone: NgZone,\n private el: ElementRef,\n private renderer: Renderer2,\n private carouselService: CarouselService,\n private animateService: AnimateService) { }\n\n @HostListener('mousedown', ['$event']) onMouseDown(event) {\n if (this.owlDraggable.isMouseDragable) {\n this._onDragStart(event);\n }\n }\n\n @HostListener('touchstart', ['$event']) onTouchStart(event) {\n if (event.targetTouches.length >= 2) {\n return false;\n }\n if (this.owlDraggable.isTouchDragable) {\n this._onDragStart(event);\n }\n }\n\n @HostListener('touchcancel', ['$event']) onTouchCancel(event) {\n this._onDragEnd(event);\n }\n\n @HostListener('dragstart') onDragStart() {\n if (this.owlDraggable.isMouseDragable) {\n return false;\n }\n }\n\n @HostListener('selectstart') onSelectStart() {\n if (this.owlDraggable.isMouseDragable) {\n return false;\n }\n }\n\n ngOnInit() {\n this._oneMoveSubsription = this._oneDragMove$\n .pipe(first())\n .subscribe(() => {\n this._sendChanges();\n });\n }\n\n ngOnDestroy() {\n this._oneMoveSubsription.unsubscribe();\n }\n\n /**\n * Passes this to _oneMouseTouchMove();\n */\n bindOneMouseTouchMove = (ev) => {\n this._oneMouseTouchMove(ev);\n }\n\n /**\n * Passes this to _onDragMove();\n */\n bindOnDragMove = (ev) => {\n this._onDragMove(ev);\n }\n\n /**\n * Passes this to _onDragMove();\n */\n bindOnDragEnd = (ev) => {\n // this.zone.run(() => {\n this._onDragEnd(ev);\n // });\n }\n\n /**\n\t * Handles `touchstart` and `mousedown` events.\n\t * @todo Horizontal swipe threshold as option\n\t * @todo #261\n\t * @param event - The event arguments.\n\t */\n\tprivate _onDragStart(event): any {\n\t\tlet stage: Coords = null;\n\n\t\tif (event.which === 3) {\n\t\t\treturn;\n }\n\n stage = this._prepareDragging(event);\n\n\t\tthis._drag.time = new Date().getTime();\n\t\tthis._drag.target = event.target;\n\t\tthis._drag.stage.start = stage;\n\t\tthis._drag.stage.current = stage;\n this._drag.pointer = this._pointer(event);\n\n this.listenerMouseUp = this.renderer.listen(document, 'mouseup', this.bindOnDragEnd);\n this.listenerTouchEnd = this.renderer.listen(document, 'touchend', this.bindOnDragEnd);\n\n this.zone.runOutsideAngular(() => {\n this.listenerOneMouseMove = this.renderer.listen(document, 'mousemove', this.bindOneMouseTouchMove);\n this.listenerOneTouchMove = this.renderer.listen(document, 'touchmove', this.bindOneMouseTouchMove);\n });\n\n }\n\n /**\n * Attaches listeners to `touchmove` and `mousemove` events; initiates updating carousel after starting dragging\n * @param event event objech of mouse or touch event\n */\n private _oneMouseTouchMove(event) {\n const delta = this._difference(this._drag.pointer, this._pointer(event));\n if (this.listenerATag) {\n this.listenerATag();\n }\n if ( Math.abs(delta.x) < 3 && Math.abs(delta.y) < 3 && this._is('valid')) {\n return;\n }\n\n if ((Math.abs(delta.x) < 3 && Math.abs(delta.x) < Math.abs(delta.y)) && this._is('valid')) {\n return;\n }\n this.listenerOneMouseMove();\n this.listenerOneTouchMove();\n this._drag.moving = true;\n\n this.blockClickAnchorInDragging(event);\n\n this.listenerMouseMove = this.renderer.listen(document, 'mousemove', this.bindOnDragMove);\n this.listenerTouchMove = this.renderer.listen(document, 'touchmove', this.bindOnDragMove);\n\n event.preventDefault();\n\n this._enterDragging();\n this._oneDragMove$.next(event);\n // this._sendChanges();\n }\n\n /**\n * Attaches handler to HTMLAnchorElement for preventing click while carousel is being dragged\n * @param event event object\n */\n private blockClickAnchorInDragging(event: any) {\n let target: HTMLElement | null = event.target;\n while (target && !(target instanceof HTMLAnchorElement)) {\n target = target.parentElement;\n }\n if (target instanceof HTMLAnchorElement) {\n this.listenerATag = this.renderer.listen(target, 'click', () => false);\n }\n }\n\n \t/**\n\t * Handles the `touchmove` and `mousemove` events.\n\t * @todo #261\n\t * @param event - The event arguments.\n\t */\n\tprivate _onDragMove(event) {\n let stage: Coords;\n const stageOrExit: boolean | Coords = this.carouselService.defineNewCoordsDrag(event, this._drag);\n\n if (stageOrExit === false) {\n return;\n }\n stage = stageOrExit as Coords;\n\n\t\tevent.preventDefault();\n\n this._drag.stage.current = stage;\n\t\tthis._animate(stage.x - this._drag.stage.start.x);\n };\n\n /**\n * Moves .owl-stage left-right\n * @param coordinate coordinate to be set to .owl-stage\n */\n private _animate(coordinate: number) {\n this.renderer.setStyle(this.el.nativeElement.children[0], 'transform', `translate3d(${coordinate}px,0px,0px`);\n this.renderer.setStyle(this.el.nativeElement.children[0], 'transition', '0s');\n }\n\n /**\n\t * Handles the `touchend` and `mouseup` events.\n\t * @todo #261\n\t * @todo Threshold for click event\n\t * @param event - The event arguments.\n\t */\n\tprivate _onDragEnd(event) {\n this.carouselService.owlDOMData.isGrab = false;\n this.listenerOneMouseMove();\n this.listenerOneTouchMove();\n\n if (this._drag.moving) {\n this.renderer.setStyle(this.el.nativeElement.children[0], 'transform', ``);\n this.renderer.setStyle(this.el.nativeElement.children[0], 'transition', this.carouselService.speed(+this.carouselService.settings.dragEndSpeed || this.carouselService.settings.smartSpeed)/1000 +'s');\n\n this._finishDragging(event);\n this.listenerMouseMove();\n this.listenerTouchMove();\n }\n\n this._drag = {\n time: null,\n target: null,\n pointer: null,\n stage: {\n start: null,\n current: null\n },\n direction: null,\n active: false,\n moving: false\n };\n\n // this.carouselService.trigger('dragged');\n this.listenerMouseUp();\n this.listenerTouchEnd();\n };\n\n /**\n\t * Prepares data for dragging carousel. It starts after firing `touchstart` and `mousedown` events.\n\t * @param event - The event arguments.\n\t * @returns stage - object with 'x' and 'y' coordinates of .owl-stage\n\t */\n private _prepareDragging(event: any): Coords {\n return this.carouselService.prepareDragging(event);\n }\n\n /**\n * Attaches handler for 'click' event on any element in .owl-stage in order to prevent dragging when moving of cursor is less than 3px\n */\n private _oneClickHandler = () => {\n this.listenerOneClick = this.renderer.listen(this._drag.target, 'click', () => false)\n this.listenerOneClick();\n }\n\n /**\n * Finishes dragging\n * @param event object event of 'mouseUp' of 'touchend' events\n */\n private _finishDragging(event: any) {\n this.carouselService.finishDragging(event, this._drag, this._oneClickHandler);\n }\n\n /**\n\t * Gets unified pointer coordinates from event.\n\t * @param event The `mousedown` or `touchstart` event.\n\t * @returns Contains `x` and `y` coordinates of current pointer position.\n\t */\n private _pointer(event: any): any {\n return this.carouselService.pointer(event);\n }\n\n /**\n\t * Gets the difference of two vectors.\n\t * @param first The first vector.\n\t * @param second The second vector.\n\t * @returns The difference.\n\t */\n private _difference(firstC: Coords, second: Coords): any {\n return this.carouselService.difference(firstC, second);\n }\n\n /**\n\t * Checks whether the carousel is in a specific state or not.\n\t * @param specificState The state to check.\n\t * @returns The flag which indicates if the carousel is busy.\n\t */\n private _is(specificState: string): boolean {\n return this.carouselService.is(specificState);\n }\n\n /**\n * Enters a state.\n * @param name The state name.\n */\n private _enter(name: string) {\n this.carouselService.enter(name);\n }\n\n /**\n\t * Sends all data needed for View.\n\t */\n private _sendChanges() {\n this.carouselService.sendChanges();\n }\n\n /**\n * Handler for transitioend event\n */\n onTransitionEnd() {\n this.carouselService.onTransitionEnd();\n }\n\n /**\n\t * Enters into a 'dragging' state\n\t */\n private _enterDragging() {\n this.carouselService.enterDragging();\n }\n\n /**\n * Handles the end of 'animationend' event\n * @param id Id of slides\n */\n clear(id) {\n this.animateService.clear(id);\n }\n}\n","import {\n Component,\n OnInit,\n OnDestroy,\n Input,\n Output,\n QueryList,\n ContentChildren,\n ElementRef,\n AfterContentInit,\n EventEmitter,\n HostListener,\n Inject,\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n OnChanges\n} from '@angular/core';\n\nimport { Subscription, Observable, merge, of, from } from 'rxjs';\n\nimport { ResizeService } from '../services/resize.service';\nimport { tap, delay, filter, switchMap, first, map, skip, take, toArray } from 'rxjs/operators';\nimport { CarouselService, CarouselCurrentData } from '../services/carousel.service';\nimport { StageData } from \"../models/stage-data.model\";\nimport { OwlDOMData } from \"../models/owlDOM-data.model\";\nimport { SlideModel } from '../models/slide.model';\nimport { OwlOptions } from '../models/owl-options.model';\nimport { NavData, DotsData } from '../models/navigation-data.models';\nimport { NavigationService } from '../services/navigation.service';\nimport { AutoplayService } from '../services/autoplay.service';\nimport { LazyLoadService } from '../services/lazyload.service';\nimport { AnimateService } from '../services/animate.service';\nimport { AutoHeightService } from '../services/autoheight.service';\nimport { HashService } from '../services/hash.service';\nimport { OwlLogger } from '../services/logger.service';\nimport { DOCUMENT } from '../services/document-ref.service';\nimport { CarouselSlideDirective } from './carousel-slide.directive';\nimport { SlidesOutputData } from '../models/SlidesOutputData';\n\n@Component({\n selector: 'owl-carousel-o',\n template: `\n \n `,\n styles: [`.owl-theme { display: block; }`],\n providers: [\n NavigationService,\n AutoplayService,\n CarouselService,\n LazyLoadService,\n AnimateService,\n AutoHeightService,\n HashService\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CarouselComponent\n implements OnInit, AfterContentInit, OnDestroy, OnChanges {\n @ContentChildren(CarouselSlideDirective)\n slides: QueryList;\n\n @Output() translated = new EventEmitter();\n @Output() dragging = new EventEmitter<{dragging: boolean, data: SlidesOutputData}>();\n @Output() change = new EventEmitter();\n @Output() changed = new EventEmitter();\n @Output() initialized = new EventEmitter();\n\n /**\n * Width of carousel window (tag with class .owl-carousel), in wich we can see moving sliders\n */\n carouselWindowWidth: number;\n\n /**\n * Subscription to 'resize' event\n */\n resizeSubscription: Subscription;\n\n /**\n * Subscription merge Observable, which merges all Observables in the component except 'resize' Observable and this.slides.changes()\n */\n private _allObservSubscription: Subscription;\n\n /**\n * Subscription to `this.slides.changes().\n * It could be included in 'this._allObservSubscription', but that subcription get created during the initializing of component\n * and 'this.slides' are undefined at that moment. So it's needed to wait for initialization of content.\n */\n private _slidesChangesSubscription: Subscription;\n\n /**\n * Current settings for the carousel.\n */\n owlDOMData: OwlDOMData;\n\n /**\n * Data of owl-stage\n */\n stageData: StageData;\n\n /**\n\t * Data of every slide\n\t */\n slidesData: SlideModel[] = [];\n\n /**\n\t * Data of navigation block\n\t */\n\tnavData: NavData;\n\n\t/**\n\t * Data of dots block\n\t */\n dotsData: DotsData;\n\n /**\n * Data, wich are passed out of carousel after ending of transioning of carousel\n */\n slidesOutputData: SlidesOutputData;\n\n /**\n * Shows whether carousel is loaded of not.\n */\n carouselLoaded = false;\n\n /**\n * User's options\n */\n @Input() options: OwlOptions;\n\n prevOptions: OwlOptions;\n\n /**\n * Observable for getting current View Settings\n */\n private _viewCurSettings$: Observable;\n\n /**\n * Observable for catching the end of transition of carousel\n */\n private _translatedCarousel$: Observable;\n\n /**\n * Observable for catching the start of dragging of the carousel\n */\n private _draggingCarousel$: Observable;\n\n /**\n * Observable for catching the start of changing of the carousel\n */\n private _changeCarousel$: Observable;\n\n /**\n * Observable for catching the moment when the data about slides changed, more exactly when the position changed.\n */\n private _changedCarousel$: Observable;\n\n /**\n * Observable for catching the initialization of changing the carousel\n */\n private _initializedCarousel$: Observable;\n\n /**\n * Observable for merging all Observables and creating one subscription\n */\n private _carouselMerge$: Observable;\n private docRef: Document;\n\n constructor(\n private el: ElementRef,\n private resizeService: ResizeService,\n private carouselService: CarouselService,\n private navigationService: NavigationService,\n private autoplayService: AutoplayService,\n private lazyLoadService: LazyLoadService,\n private animateService: AnimateService,\n private autoHeightService: AutoHeightService,\n private hashService: HashService,\n private logger: OwlLogger,\n private changeDetectorRef: ChangeDetectorRef,\n @Inject(DOCUMENT) docRef: any\n ) {\n this.docRef = docRef as Document;\n\n }\n\n @HostListener('document:visibilitychange', ['$event'])\n onVisibilityChange(ev: any) {\n if (!this.carouselService.settings.autoplay) return;\n switch (this.docRef.visibilityState) {\n case 'visible':\n !this.autoplayService.isAutoplayStopped && this.autoplayService.play();\n break;\n\n case 'hidden':\n this.autoplayService.pause();\n break;\n\n default:\n break;\n }\n };\n\n\n ngOnInit() {\n this.spyDataStreams();\n\n this.carouselWindowWidth = this.el.nativeElement.querySelector(\n '.owl-carousel'\n ).clientWidth;\n }\n\n ngOnChanges() {\n if (this.prevOptions !== this.options) {\n if (this.prevOptions && this.slides?.toArray().length) {\n this.carouselService.setup(this.carouselWindowWidth, this.slides.toArray(), this.options);\n this.carouselService.initialize(this.slides.toArray());\n } else if (this.prevOptions && !this.slides?.toArray().length) {\n this.carouselLoaded = false;\n this.logger.log(`There are no slides to show. So the carousel won't be re-rendered...`);\n } else {\n this.carouselLoaded = false;\n }\n this.prevOptions = this.options;\n }\n }\n\n ngAfterContentInit() {\n if (this.slides.toArray().length) {\n this.carouselService.setup(this.carouselWindowWidth, this.slides.toArray(), this.options);\n this.carouselService.initialize(this.slides.toArray());\n\n this._winResizeWatcher();\n } else {\n this.logger.log(`There are no slides to show. So the carousel won't be rendered`);\n }\n\n this._slidesChangesSubscription = this.slides.changes.pipe(\n tap((slides) => {\n if (slides.toArray().length) {\n // this.carouselService.setItems(slides.toArray());\n this.carouselService.setup(this.carouselWindowWidth, slides.toArray(), this.options);\n this.carouselService.initialize(slides.toArray());\n } else {\n this.carouselLoaded = false;\n this.logger.log(`There are no slides to show. So the carousel won't be re-rendered`);\n }\n })\n ).subscribe(()=>{});\n\n }\n\n ngOnDestroy() {\n if (this.resizeSubscription) {\n this.resizeSubscription.unsubscribe();\n }\n\n if (this._slidesChangesSubscription) {\n this._slidesChangesSubscription.unsubscribe();\n }\n\n if (this._allObservSubscription) {\n this._allObservSubscription.unsubscribe();\n }\n }\n\n /**\n * Joins the observable login in one place: sets values to some observables, merges this observables and\n * subcribes to merge func\n */\n spyDataStreams() {\n this._viewCurSettings$ = this.carouselService.getViewCurSettings().pipe(\n tap(data => {\n this.owlDOMData = data.owlDOMData;\n this.stageData = data.stageData;\n this.slidesData = data.slidesData;\n if (!this.carouselLoaded) {\n this.carouselLoaded = true;\n }\n this.navData = data.navData;\n this.dotsData = data.dotsData;\n this.changeDetectorRef.markForCheck();\n })\n );\n\n this._initializedCarousel$ = this.carouselService.getInitializedState().pipe(\n tap(() => {\n this.gatherTranslatedData();\n this.initialized.emit(this.slidesOutputData);\n // this.slidesOutputData = {};\n })\n )\n\n this._translatedCarousel$ = this.carouselService.getTranslatedState().pipe(\n tap(() => {\n this.gatherTranslatedData();\n this.translated.emit(this.slidesOutputData);\n // this.slidesOutputData = {};\n })\n );\n\n this._changeCarousel$ = this.carouselService.getChangeState().pipe(\n tap(() => {\n this.gatherTranslatedData();\n this.change.emit(this.slidesOutputData);\n // this.slidesOutputData = {};\n })\n );\n\n this._changedCarousel$ = this.carouselService.getChangeState().pipe(\n switchMap(value => {\n const changedPosition: Observable = of(value).pipe(\n filter(() => value.property.name === 'position'),\n switchMap(() => from(this.slidesData)),\n skip(value.property.value),\n take(this.carouselService.settings.items),\n map(slide => {\n const clonedIdPrefix = this.carouselService.clonedIdPrefix;\n const id = slide.id.indexOf(clonedIdPrefix) >= 0 ? slide.id.slice(clonedIdPrefix.length) : slide.id;\n return { ...slide, id: id, isActive: true };\n }),\n toArray(),\n map(slides => {\n return {\n slides: slides,\n startPosition: this.carouselService.relative(value.property.value)\n }\n })\n );\n\n // const changedSetting: Observable = of(value).pipe(\n // filter(() => value.property.name === 'settings'),\n // map(() => {\n // return {\n // slides: [],\n // startPosition: this.carouselService.relative(value.property.value)\n // }\n // })\n // )\n return merge(changedPosition);\n }),\n tap(slidesData => {\n this.gatherTranslatedData();\n this.changed.emit(slidesData.slides.length ? slidesData : this.slidesOutputData);\n // console.log(this.slidesOutputData);\n // this.slidesOutputData = {};\n })\n );\n\n this._draggingCarousel$ = this.carouselService.getDragState().pipe(\n tap(() => {\n this.gatherTranslatedData();\n this.dragging.emit({dragging: true, data: this.slidesOutputData});\n }),\n switchMap(\n () => this.carouselService.getDraggedState().pipe(\n map(() => !!this.carouselService.is('animating'))\n )\n ),\n switchMap(\n anim => {\n if (anim) {\n return this.carouselService.getTranslatedState().pipe(\n first(),\n );\n } else {\n return of('not animating');\n }\n }\n ),\n tap(() => {\n this.dragging.emit({dragging: false, data: this.slidesOutputData});\n })\n );\n\n this._carouselMerge$ = merge(\n this._viewCurSettings$,\n this._translatedCarousel$,\n this._draggingCarousel$,\n this._changeCarousel$,\n this._changedCarousel$,\n this._initializedCarousel$\n );\n this._allObservSubscription = this._carouselMerge$.subscribe(() => {});\n }\n\n /**\n * Init subscription to resize event and attaches handler for this event\n */\n private _winResizeWatcher() {\n if (Object.keys(this.carouselService._options.responsive).length) {\n this.resizeSubscription = this.resizeService.onResize$\n .pipe(\n filter(() => this.carouselWindowWidth !== this.el.nativeElement.querySelector('.owl-carousel').clientWidth),\n delay(this.carouselService.settings.responsiveRefreshRate)\n )\n .subscribe(() => {\n this.carouselService.onResize(this.el.nativeElement.querySelector('.owl-carousel').clientWidth);\n this.carouselWindowWidth = this.el.nativeElement.querySelector('.owl-carousel').clientWidth;\n });\n }\n }\n\n /**\n * Handler for transitioend event\n */\n onTransitionEnd() {\n this.carouselService.onTransitionEnd();\n }\n\n /**\n * Handler for click event, attached to next button\n */\n next() {\n if (!this.carouselLoaded) return;\n this.navigationService.next(this.carouselService.settings.navSpeed);\n }\n\n /**\n * Handler for click event, attached to prev button\n */\n prev() {\n if (!this.carouselLoaded) return;\n this.navigationService.prev(this.carouselService.settings.navSpeed);\n }\n\n /**\n * Handler for click event, attached to dots\n */\n moveByDot(dotId: string) {\n if (!this.carouselLoaded) return;\n this.navigationService.moveByDot(dotId);\n }\n\n /**\n * rewinds carousel to slide with needed id\n * @param id fragment of url\n */\n to(id: string) {\n // if (!this.carouselLoaded || ((this.navData && this.navData.disabled) && (this.dotsData && this.dotsData.disabled))) return;\n if (!this.carouselLoaded) return;\n this.navigationService.toSlideById(id);\n }\n\n /**\n * Gathers and prepares data intended for passing to the user by means of firing event translatedCarousel\n */\n gatherTranslatedData() {\n let startPosition: number;\n const clonedIdPrefix = this.carouselService.clonedIdPrefix;\n const activeSlides: SlideModel[] = this.slidesData\n .filter(slide => slide.isActive === true)\n .map(slide => {\n const id = slide.id.indexOf(clonedIdPrefix) >= 0 ? slide.id.slice(clonedIdPrefix.length) : slide.id;\n return {\n id: id,\n width: slide.width,\n marginL: slide.marginL,\n marginR: slide.marginR,\n center: slide.isCentered\n }\n });\n startPosition = this.carouselService.relative(this.carouselService.current());\n this.slidesOutputData = {\n startPosition: startPosition,\n slides: activeSlides\n }\n }\n\n /**\n * Starts pausing\n */\n startPausing() {\n this.autoplayService.startPausing();\n }\n\n /**\n * Starts playing after mouse leaves carousel\n */\n startPlayML() {\n this.autoplayService.startPlayingMouseLeave();\n }\n\n /**\n * Starts playing after touch ends\n */\n startPlayTE() {\n this.autoplayService.startPlayingTouchEnd();\n }\n\n stopAutoplay() {\n this.autoplayService.isAutoplayStopped = true;\n this.autoplayService.stop();\n }\n\n startAutoplay() {\n this.autoplayService.isAutoplayStopped = false;\n this.autoplayService.play();\n }\n\n}\n","import {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, isDevMode} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {NavigationEnd, RouterEvent, Router, ActivatedRoute, UrlTree} from '@angular/router';\n\nexport type QueryParamsHandling = 'merge' | 'preserve' | '';\n\n@Directive({selector: ':not(a)[owlRouterLink]'})\nexport class OwlRouterLinkDirective {\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n\n @Input() stopLink = false;\n private commands: any[] = [];\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n if (tabIndex == null) {\n renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n }\n }\n\n @Input()\n set owlRouterLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n /**\n * @deprecated 4.0.0 use `queryParamsHandling` instead.\n */\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && console && console.warn) {\n console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n @HostListener('click')\n onClick(): boolean {\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n if (this.stopLink) {\n return false;\n }\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment)\n});\n }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[owlRouterLink]'})\nexport class OwlRouterLinkWithHrefDirective implements OnChanges, OnDestroy {\n // TODO(issue/24571): remove '!'.\n @HostBinding('attr.target') @Input() target !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() stopLink = false;\n\n private commands: any[] = [];\n private subscription: Subscription;\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n // the url displayed on the anchor element.\n // TODO(issue/24571): remove '!'.\n @HostBinding() href !: string;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n private locationStrategy: LocationStrategy) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.updateTargetUrlAndHref();\n }\n });\n }\n\n @Input()\n set owlRouterLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && console && console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n ngOnChanges(changes: {}): any { this.updateTargetUrlAndHref(); }\n ngOnDestroy(): any { this.subscription.unsubscribe(); }\n\n @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'])\n onClick(button: number, ctrlKey: boolean, metaKey: boolean, shiftKey: boolean): boolean {\n if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n return true;\n }\n\n if (typeof this.target === 'string' && this.target !== '_self') {\n return true;\n }\n\n if (this.stopLink) {\n return false;\n }\n\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n }\n\n private updateTargetUrlAndHref(): void {\n this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment)\n});\n }\n}\n\nfunction attrBoolValue(s: any): boolean {\n return s === '' || !!s;\n}\n","import { SlideModel } from './slide.model';\n\n/**\n * Data which will be passed out after ending of transition of carousel\n */\n\nexport class SlidesOutputData {\n startPosition?: number;\n slides?: SlideModel[];\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n CarouselComponent} from './carousel.component';\nimport { CarouselSlideDirective } from './carousel-slide.directive';\nimport { WINDOW_PROVIDERS } from '../services/window-ref.service';\nimport { ResizeService } from '../services/resize.service';\nimport { DOCUMENT_PROVIDERS } from '../services/document-ref.service';\nimport { StageComponent } from './stage/stage.component';\n// import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n\nexport { CarouselComponent } from './carousel.component';\nexport { CarouselSlideDirective } from './carousel-slide.directive';\nexport { SlidesOutputData } from '../models/SlidesOutputData';\n\nimport { RouterModule, Routes } from '@angular/router';\nimport { OwlRouterLinkDirective, OwlRouterLinkWithHrefDirective } from './owl-router-link.directive';\nimport { OwlLogger } from '../services/logger.service';\nexport { OwlRouterLinkDirective, OwlRouterLinkWithHrefDirective } from './owl-router-link.directive';\n\nconst routes: Routes = [];\n\n\n@NgModule({\n imports: [\n CommonModule,\n // BrowserAnimationsModule, // there's an issue with this import while using lazy loading of module consuming this library. I don't remove it because it could be needed during future enhancement of this lib.\n // RouterModule.forChild(routes)\n ],\n declarations: [CarouselComponent, CarouselSlideDirective, StageComponent, OwlRouterLinkDirective, OwlRouterLinkWithHrefDirective],\n exports: [CarouselComponent, CarouselSlideDirective, OwlRouterLinkDirective, OwlRouterLinkWithHrefDirective],\n providers: [WINDOW_PROVIDERS, ResizeService, DOCUMENT_PROVIDERS, OwlLogger]\n})\nexport class CarouselModule {}\n","import { TemplateRef } from \"@angular/core\";\n\nexport class SlideModel {\n\n /**\n * Id of slide\n */\n id: string;\n\n /**\n * Active state of slide. If true slide gets css-class .active\n */\n isActive?: boolean;\n\n /**\n * TemplateRef of slide. In other words its html-markup\n */\n tplRef?: TemplateRef;\n\n /**\n * Number of grid parts to be used\n */\n dataMerge?: number;\n\n /**\n * Width of slide\n */\n width?: number | string;\n\n /**\n * Css-rule 'margin-left'\n */\n marginL?: number | string;\n\n /**\n * Css-rule 'margin-right'\n */\n marginR?: number | string;\n\n /**\n * Make slide to be on center of the carousel\n */\n isCentered?: boolean;\n\n /**\n * Mark slide to be on center of the carousel (has .center)\n */\n center?: boolean;\n\n /**\n * Cloned slide. It's being used when 'loop'=true\n */\n isCloned?: boolean;\n\n /**\n * Indicates whether slide should be lazy loaded\n */\n load?: boolean;\n\n /**\n * Css-rule 'left'\n */\n left?: number | string;\n\n /**\n * Changeable classes of slide\n */\n classes?: {[key:string]: boolean};\n\n /**\n * Shows whether slide could be animated and could have css-class '.animated'\n */\n isAnimated?: boolean;\n\n /**\n * Shows whether slide could be animated-in and could have css-class '.owl-animated-in'\n */\n isDefAnimatedIn?: boolean;\n /**\n * Shows whether slide could be animated-out and could have css-class '.owl-animated-out'\n */\n isDefAnimatedOut?: boolean;\n /**\n * Shows whether slide could be animated-in and could have animation css-class defined by user\n */\n isCustomAnimatedIn?: boolean;\n /**\n * Shows whether slide could be animated-out and could have animation css-class defined by user\n */\n isCustomAnimatedOut?: boolean;\n\n /**\n * State for defining the height of slide.It's values could be 'full' and 'nulled'. 'Full' sets css-height to 'auto', 'nulled' sets height to '0'.\n */\n heightState?: string;\n\n /**\n * Hash (fragment) of url which corresponds to slide\n */\n hashFragment?: string;\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEA;;;MAGa,kBAAkB;IA4D7B;QA3DA,UAAK,GAAG,CAAC,CAAC;QACV,uBAAkB,GAAG,KAAK,CAAC;QAC3B,SAAI,GAAG,KAAK,CAAC;QACb,WAAM,GAAG,KAAK,CAAC;QACf,WAAM,GAAG,KAAK,CAAC;QAEf,cAAS,GAAG,IAAI,CAAC;QACjB,cAAS,GAAG,IAAI,CAAC;QACjB,aAAQ,GAAG,IAAI,CAAC;QAChB,aAAQ,GAAG,KAAK,CAAC;QAEjB,WAAM,GAAG,CAAC,CAAC;QACX,iBAAY,GAAG,CAAC,CAAC;QAEjB,UAAK,GAAG,KAAK,CAAC;QACd,aAAQ,GAAG,IAAI,CAAC;QAChB,cAAS,GAAG,KAAK,CAAC;QAElB,kBAAa,GAAG,CAAC,CAAC;QAClB,QAAG,GAAG,KAAK,CAAC;QAEZ,eAAU,GAAG,GAAG,CAAC;QACjB,eAAU,GAAG,KAAK,CAAC;QACnB,iBAAY,GAAG,KAAK,CAAC;QAErB,eAAU,GAAG,EAAE,CAAC;QAChB,0BAAqB,GAAG,GAAG,CAAC;;QAG5B,QAAG,GAAG,KAAK,CAAC;QACZ,YAAO,GAAG,CAAE,MAAM,EAAE,MAAM,CAAE,CAAC;QAC7B,aAAQ,GAAG,KAAK,CAAC;QACjB,YAAO,GAAG,CAAC,CAAC;QACZ,SAAI,GAAG,IAAI,CAAC;QACZ,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK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