{"ast":null,"code":"import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, ViewChild, ContentChild, ContentChildren, NgModule } from '@angular/core';\nimport { Header, Footer, PrimeTemplate, SharedModule } from 'primeng/api';\nimport * as i2 from 'primeng/ripple';\nimport { RippleModule } from 'primeng/ripple';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport { UniqueComponentId } from 'primeng/utils';\nconst _c0 = [\"itemsContainer\"];\n\nfunction Carousel_div_1_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\n\nfunction Carousel_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 11);\n i0.ɵɵprojection(1);\n i0.ɵɵtemplate(2, Carousel_div_1_ng_container_2_Template, 1, 0, \"ng-container\", 12);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.headerTemplate);\n }\n}\n\nconst _c1 = function (a1) {\n return {\n \"p-carousel-prev p-link\": true,\n \"p-disabled\": a1\n };\n};\n\nconst _c2 = function (a1, a2) {\n return {\n \"p-carousel-prev-icon pi\": true,\n \"pi-chevron-left\": a1,\n \"pi-chevron-up\": a2\n };\n};\n\nfunction Carousel_button_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r11 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"button\", 13);\n i0.ɵɵlistener(\"click\", function Carousel_button_4_Template_button_click_0_listener($event) {\n i0.ɵɵrestoreView(_r11);\n const ctx_r10 = i0.ɵɵnextContext();\n return ctx_r10.navBackward($event);\n });\n i0.ɵɵelement(1, \"span\", 2);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction1(3, _c1, ctx_r1.isBackwardNavDisabled()))(\"disabled\", ctx_r1.isBackwardNavDisabled());\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction2(5, _c2, !ctx_r1.isVertical(), ctx_r1.isVertical()));\n }\n}\n\nfunction Carousel_div_8_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\n\nconst _c3 = function (a1, a2, a3) {\n return {\n \"p-carousel-item p-carousel-item-cloned\": true,\n \"p-carousel-item-active\": a1,\n \"p-carousel-item-start\": a2,\n \"p-carousel-item-end\": a3\n };\n};\n\nconst _c4 = function (a0) {\n return {\n $implicit: a0\n };\n};\n\nfunction Carousel_div_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵtemplate(1, Carousel_div_8_ng_container_1_Template, 1, 0, \"ng-container\", 14);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const item_r12 = ctx.$implicit;\n const index_r13 = ctx.index;\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction3(3, _c3, ctx_r3.totalShiftedItems * -1 === ctx_r3.value.length, 0 === index_r13, ctx_r3.clonedItemsForStarting.length - 1 === index_r13));\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r3.itemTemplate)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction1(7, _c4, item_r12));\n }\n}\n\nfunction Carousel_div_9_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\n\nconst _c5 = function (a1, a2, a3) {\n return {\n \"p-carousel-item\": true,\n \"p-carousel-item-active\": a1,\n \"p-carousel-item-start\": a2,\n \"p-carousel-item-end\": a3\n };\n};\n\nfunction Carousel_div_9_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵtemplate(1, Carousel_div_9_ng_container_1_Template, 1, 0, \"ng-container\", 14);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const item_r15 = ctx.$implicit;\n const index_r16 = ctx.index;\n const ctx_r4 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction3(3, _c5, ctx_r4.firstIndex() <= index_r16 && ctx_r4.lastIndex() >= index_r16, ctx_r4.firstIndex() === index_r16, ctx_r4.lastIndex() === index_r16));\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r4.itemTemplate)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction1(7, _c4, item_r15));\n }\n}\n\nfunction Carousel_div_10_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\n\nfunction Carousel_div_10_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵtemplate(1, Carousel_div_10_ng_container_1_Template, 1, 0, \"ng-container\", 14);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const item_r18 = ctx.$implicit;\n const index_r19 = ctx.index;\n const ctx_r5 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction3(3, _c3, ctx_r5.totalShiftedItems * -1 === ctx_r5.numVisible, 0 === index_r19, ctx_r5.clonedItemsForFinishing.length - 1 === index_r19));\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r5.itemTemplate)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction1(7, _c4, item_r18));\n }\n}\n\nconst _c6 = function (a1) {\n return {\n \"p-carousel-next p-link\": true,\n \"p-disabled\": a1\n };\n};\n\nconst _c7 = function (a1, a2) {\n return {\n \"p-carousel-prev-icon pi\": true,\n \"pi-chevron-right\": a1,\n \"pi-chevron-down\": a2\n };\n};\n\nfunction Carousel_button_11_Template(rf, ctx) {\n if (rf & 1) {\n const _r22 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"button\", 13);\n i0.ɵɵlistener(\"click\", function Carousel_button_11_Template_button_click_0_listener($event) {\n i0.ɵɵrestoreView(_r22);\n const ctx_r21 = i0.ɵɵnextContext();\n return ctx_r21.navForward($event);\n });\n i0.ɵɵelement(1, \"span\", 2);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r6 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction1(3, _c6, ctx_r6.isForwardNavDisabled()))(\"disabled\", ctx_r6.isForwardNavDisabled());\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction2(5, _c7, !ctx_r6.isVertical(), ctx_r6.isVertical()));\n }\n}\n\nconst _c8 = function (a1) {\n return {\n \"p-carousel-indicator\": true,\n \"p-highlight\": a1\n };\n};\n\nfunction Carousel_ul_12_li_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r27 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"li\", 2);\n i0.ɵɵelementStart(1, \"button\", 15);\n i0.ɵɵlistener(\"click\", function Carousel_ul_12_li_1_Template_button_click_1_listener($event) {\n const restoredCtx = i0.ɵɵrestoreView(_r27);\n const i_r25 = restoredCtx.index;\n const ctx_r26 = i0.ɵɵnextContext(2);\n return ctx_r26.onDotClick($event, i_r25);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const i_r25 = ctx.index;\n const ctx_r23 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction1(5, _c8, ctx_r23._page === i_r25));\n i0.ɵɵadvance(1);\n i0.ɵɵclassMap(ctx_r23.indicatorStyleClass);\n i0.ɵɵproperty(\"ngClass\", \"p-link\")(\"ngStyle\", ctx_r23.indicatorStyle);\n }\n}\n\nfunction Carousel_ul_12_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ul\", 0);\n i0.ɵɵtemplate(1, Carousel_ul_12_li_1_Template, 2, 7, \"li\", 8);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r7 = i0.ɵɵnextContext();\n i0.ɵɵclassMap(ctx_r7.indicatorsContentClass);\n i0.ɵɵproperty(\"ngClass\", \"p-carousel-indicators p-reset\")(\"ngStyle\", ctx_r7.indicatorsContentStyle);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx_r7.totalDotsArray());\n }\n}\n\nfunction Carousel_div_13_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\n\nfunction Carousel_div_13_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 16);\n i0.ɵɵprojection(1, 1);\n i0.ɵɵtemplate(2, Carousel_div_13_ng_container_2_Template, 1, 0, \"ng-container\", 12);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r8 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r8.footerTemplate);\n }\n}\n\nconst _c9 = [[[\"p-header\"]], [[\"p-footer\"]]];\n\nconst _c10 = function (a1, a2) {\n return {\n \"p-carousel p-component\": true,\n \"p-carousel-vertical\": a1,\n \"p-carousel-horizontal\": a2\n };\n};\n\nconst _c11 = function (a0) {\n return {\n \"height\": a0\n };\n};\n\nconst _c12 = [\"p-header\", \"p-footer\"];\n\nclass Carousel {\n constructor(el, zone, cd) {\n this.el = el;\n this.zone = zone;\n this.cd = cd;\n this.orientation = \"horizontal\";\n this.verticalViewPortHeight = \"300px\";\n this.contentClass = \"\";\n this.indicatorsContentClass = \"\";\n this.indicatorStyleClass = \"\";\n this.circular = false;\n this.showIndicators = true;\n this.showNavigators = true;\n this.autoplayInterval = 0;\n this.onPage = new EventEmitter();\n this._numVisible = 1;\n this._numScroll = 1;\n this._oldNumScroll = 0;\n this.prevState = {\n numScroll: 0,\n numVisible: 0,\n value: []\n };\n this.defaultNumScroll = 1;\n this.defaultNumVisible = 1;\n this._page = 0;\n this.isRemainingItemsAdded = false;\n this.remainingItems = 0;\n this.swipeThreshold = 20;\n this.totalShiftedItems = this.page * this.numScroll * -1;\n }\n\n get page() {\n return this._page;\n }\n\n set page(val) {\n if (this.isCreated && val !== this._page) {\n if (this.autoplayInterval) {\n this.stopAutoplay();\n this.allowAutoplay = false;\n }\n\n if (val > this._page && val <= this.totalDots() - 1) {\n this.step(-1, val);\n } else if (val < this._page) {\n this.step(1, val);\n }\n }\n\n this._page = val;\n }\n\n get numVisible() {\n return this._numVisible;\n }\n\n set numVisible(val) {\n this._numVisible = val;\n }\n\n get numScroll() {\n return this._numVisible;\n }\n\n set numScroll(val) {\n this._numScroll = val;\n }\n\n get value() {\n return this._value;\n }\n\n set value(val) {\n this._value = val;\n }\n\n ngOnChanges(simpleChange) {\n if (simpleChange.value) {\n if (this.circular && this._value) {\n this.setCloneItems();\n }\n }\n\n if (this.isCreated) {\n if (simpleChange.numVisible) {\n if (this.responsiveOptions) {\n this.defaultNumVisible = this.numVisible;\n }\n\n if (this.isCircular()) {\n this.setCloneItems();\n }\n\n this.createStyle();\n this.calculatePosition();\n }\n\n if (simpleChange.numScroll) {\n if (this.responsiveOptions) {\n this.defaultNumScroll = this.numScroll;\n }\n }\n }\n }\n\n ngAfterContentInit() {\n this.id = UniqueComponentId();\n this.allowAutoplay = !!this.autoplayInterval;\n\n if (this.circular) {\n this.setCloneItems();\n }\n\n if (this.responsiveOptions) {\n this.defaultNumScroll = this._numScroll;\n this.defaultNumVisible = this._numVisible;\n }\n\n this.createStyle();\n this.calculatePosition();\n\n if (this.responsiveOptions) {\n this.bindDocumentListeners();\n }\n\n this.templates.forEach(item => {\n switch (item.getType()) {\n case 'item':\n this.itemTemplate = item.template;\n break;\n\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n case 'footer':\n this.footerTemplate = item.template;\n break;\n\n default:\n this.itemTemplate = item.template;\n break;\n }\n });\n }\n\n ngAfterContentChecked() {\n const isCircular = this.isCircular();\n let totalShiftedItems = this.totalShiftedItems;\n\n if (this.value && this.itemsContainer && (this.prevState.numScroll !== this._numScroll || this.prevState.numVisible !== this._numVisible || this.prevState.value.length !== this.value.length)) {\n if (this.autoplayInterval) {\n this.stopAutoplay();\n }\n\n this.remainingItems = (this.value.length - this._numVisible) % this._numScroll;\n let page = this._page;\n\n if (this.totalDots() !== 0 && page >= this.totalDots()) {\n page = this.totalDots() - 1;\n this._page = page;\n this.onPage.emit({\n page: this.page\n });\n }\n\n totalShiftedItems = page * this._numScroll * -1;\n\n if (isCircular) {\n totalShiftedItems -= this._numVisible;\n }\n\n if (page === this.totalDots() - 1 && this.remainingItems > 0) {\n totalShiftedItems += -1 * this.remainingItems + this._numScroll;\n this.isRemainingItemsAdded = true;\n } else {\n this.isRemainingItemsAdded = false;\n }\n\n if (totalShiftedItems !== this.totalShiftedItems) {\n this.totalShiftedItems = totalShiftedItems;\n }\n\n this._oldNumScroll = this._numScroll;\n this.prevState.numScroll = this._numScroll;\n this.prevState.numVisible = this._numVisible;\n this.prevState.value = [...this._value];\n\n if (this.totalDots() > 0 && this.itemsContainer.nativeElement) {\n this.itemsContainer.nativeElement.style.transform = this.isVertical() ? `translate3d(0, ${totalShiftedItems * (100 / this._numVisible)}%, 0)` : `translate3d(${totalShiftedItems * (100 / this._numVisible)}%, 0, 0)`;\n }\n\n this.isCreated = true;\n\n if (this.autoplayInterval && this.isAutoplay()) {\n this.startAutoplay();\n }\n }\n\n if (isCircular) {\n if (this.page === 0) {\n totalShiftedItems = -1 * this._numVisible;\n } else if (totalShiftedItems === 0) {\n totalShiftedItems = -1 * this.value.length;\n\n if (this.remainingItems > 0) {\n this.isRemainingItemsAdded = true;\n }\n }\n\n if (totalShiftedItems !== this.totalShiftedItems) {\n this.totalShiftedItems = totalShiftedItems;\n }\n }\n }\n\n createStyle() {\n if (!this.carouselStyle) {\n this.carouselStyle = document.createElement('style');\n this.carouselStyle.type = 'text/css';\n document.body.appendChild(this.carouselStyle);\n }\n\n let innerHTML = `\n #${this.id} .p-carousel-item {\n\t\t\t\tflex: 1 0 ${100 / this.numVisible}%\n\t\t\t}\n `;\n\n if (this.responsiveOptions) {\n this.responsiveOptions.sort((data1, data2) => {\n const value1 = data1.breakpoint;\n const value2 = data2.breakpoint;\n let result = null;\n if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, {\n numeric: true\n });else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;\n return -1 * result;\n });\n\n for (let i = 0; i < this.responsiveOptions.length; i++) {\n let res = this.responsiveOptions[i];\n innerHTML += `\n @media screen and (max-width: ${res.breakpoint}) {\n #${this.id} .p-carousel-item {\n flex: 1 0 ${100 / res.numVisible}%\n }\n }\n `;\n }\n }\n\n this.carouselStyle.innerHTML = innerHTML;\n }\n\n calculatePosition() {\n if (this.responsiveOptions) {\n let windowWidth = window.innerWidth;\n let matchedResponsiveData = {\n numVisible: this.defaultNumVisible,\n numScroll: this.defaultNumScroll\n };\n\n for (let i = 0; i < this.responsiveOptions.length; i++) {\n let res = this.responsiveOptions[i];\n\n if (parseInt(res.breakpoint, 10) >= windowWidth) {\n matchedResponsiveData = res;\n }\n }\n\n if (this._numScroll !== matchedResponsiveData.numScroll) {\n let page = this._page;\n page = Math.floor(page * this._numScroll / matchedResponsiveData.numScroll);\n let totalShiftedItems = matchedResponsiveData.numScroll * this.page * -1;\n\n if (this.isCircular()) {\n totalShiftedItems -= matchedResponsiveData.numVisible;\n }\n\n this.totalShiftedItems = totalShiftedItems;\n this._numScroll = matchedResponsiveData.numScroll;\n this._page = page;\n this.onPage.emit({\n page: this.page\n });\n }\n\n if (this._numVisible !== matchedResponsiveData.numVisible) {\n this._numVisible = matchedResponsiveData.numVisible;\n this.setCloneItems();\n }\n\n this.cd.markForCheck();\n }\n }\n\n setCloneItems() {\n this.clonedItemsForStarting = [];\n this.clonedItemsForFinishing = [];\n\n if (this.isCircular()) {\n this.clonedItemsForStarting.push(...this.value.slice(-1 * this._numVisible));\n this.clonedItemsForFinishing.push(...this.value.slice(0, this._numVisible));\n }\n }\n\n firstIndex() {\n return this.isCircular() ? -1 * (this.totalShiftedItems + this.numVisible) : this.totalShiftedItems * -1;\n }\n\n lastIndex() {\n return this.firstIndex() + this.numVisible - 1;\n }\n\n totalDots() {\n return this.value ? Math.ceil((this.value.length - this._numVisible) / this._numScroll) + 1 : 0;\n }\n\n totalDotsArray() {\n const totalDots = this.totalDots();\n return totalDots <= 0 ? [] : Array(totalDots).fill(0);\n }\n\n isVertical() {\n return this.orientation === 'vertical';\n }\n\n isCircular() {\n return this.circular && this.value && this.value.length >= this.numVisible;\n }\n\n isAutoplay() {\n return this.autoplayInterval && this.allowAutoplay;\n }\n\n isForwardNavDisabled() {\n return this.isEmpty() || this._page >= this.totalDots() - 1 && !this.isCircular();\n }\n\n isBackwardNavDisabled() {\n return this.isEmpty() || this._page <= 0 && !this.isCircular();\n }\n\n isEmpty() {\n return !this.value || this.value.length === 0;\n }\n\n navForward(e, index) {\n if (this.isCircular() || this._page < this.totalDots() - 1) {\n this.step(-1, index);\n }\n\n if (this.autoplayInterval) {\n this.stopAutoplay();\n this.allowAutoplay = false;\n }\n\n if (e && e.cancelable) {\n e.preventDefault();\n }\n }\n\n navBackward(e, index) {\n if (this.isCircular() || this._page !== 0) {\n this.step(1, index);\n }\n\n if (this.autoplayInterval) {\n this.stopAutoplay();\n this.allowAutoplay = false;\n }\n\n if (e && e.cancelable) {\n e.preventDefault();\n }\n }\n\n onDotClick(e, index) {\n let page = this._page;\n\n if (this.autoplayInterval) {\n this.stopAutoplay();\n this.allowAutoplay = false;\n }\n\n if (index > page) {\n this.navForward(e, index);\n } else if (index < page) {\n this.navBackward(e, index);\n }\n }\n\n step(dir, page) {\n let totalShiftedItems = this.totalShiftedItems;\n const isCircular = this.isCircular();\n\n if (page != null) {\n totalShiftedItems = this._numScroll * page * -1;\n\n if (isCircular) {\n totalShiftedItems -= this._numVisible;\n }\n\n this.isRemainingItemsAdded = false;\n } else {\n totalShiftedItems += this._numScroll * dir;\n\n if (this.isRemainingItemsAdded) {\n totalShiftedItems += this.remainingItems - this._numScroll * dir;\n this.isRemainingItemsAdded = false;\n }\n\n let originalShiftedItems = isCircular ? totalShiftedItems + this._numVisible : totalShiftedItems;\n page = Math.abs(Math.floor(originalShiftedItems / this._numScroll));\n }\n\n if (isCircular && this.page === this.totalDots() - 1 && dir === -1) {\n totalShiftedItems = -1 * (this.value.length + this._numVisible);\n page = 0;\n } else if (isCircular && this.page === 0 && dir === 1) {\n totalShiftedItems = 0;\n page = this.totalDots() - 1;\n } else if (page === this.totalDots() - 1 && this.remainingItems > 0) {\n totalShiftedItems += this.remainingItems * -1 - this._numScroll * dir;\n this.isRemainingItemsAdded = true;\n }\n\n if (this.itemsContainer) {\n this.itemsContainer.nativeElement.style.transform = this.isVertical() ? `translate3d(0, ${totalShiftedItems * (100 / this._numVisible)}%, 0)` : `translate3d(${totalShiftedItems * (100 / this._numVisible)}%, 0, 0)`;\n this.itemsContainer.nativeElement.style.transition = 'transform 500ms ease 0s';\n }\n\n this.totalShiftedItems = totalShiftedItems;\n this._page = page;\n this.onPage.emit({\n page: this.page\n });\n }\n\n startAutoplay() {\n this.interval = setInterval(() => {\n if (this.totalDots() > 0) {\n if (this.page === this.totalDots() - 1) {\n this.step(-1, 0);\n } else {\n this.step(-1, this.page + 1);\n }\n }\n }, this.autoplayInterval);\n }\n\n stopAutoplay() {\n if (this.interval) {\n clearInterval(this.interval);\n }\n }\n\n onTransitionEnd() {\n if (this.itemsContainer) {\n this.itemsContainer.nativeElement.style.transition = '';\n\n if ((this.page === 0 || this.page === this.totalDots() - 1) && this.isCircular()) {\n this.itemsContainer.nativeElement.style.transform = this.isVertical() ? `translate3d(0, ${this.totalShiftedItems * (100 / this._numVisible)}%, 0)` : `translate3d(${this.totalShiftedItems * (100 / this._numVisible)}%, 0, 0)`;\n }\n }\n }\n\n onTouchStart(e) {\n let touchobj = e.changedTouches[0];\n this.startPos = {\n x: touchobj.pageX,\n y: touchobj.pageY\n };\n }\n\n onTouchMove(e) {\n if (e.cancelable) {\n e.preventDefault();\n }\n }\n\n onTouchEnd(e) {\n let touchobj = e.changedTouches[0];\n\n if (this.isVertical()) {\n this.changePageOnTouch(e, touchobj.pageY - this.startPos.y);\n } else {\n this.changePageOnTouch(e, touchobj.pageX - this.startPos.x);\n }\n }\n\n changePageOnTouch(e, diff) {\n if (Math.abs(diff) > this.swipeThreshold) {\n if (diff < 0) {\n this.navForward(e);\n } else {\n this.navBackward(e);\n }\n }\n }\n\n bindDocumentListeners() {\n if (!this.documentResizeListener) {\n this.documentResizeListener = e => {\n this.calculatePosition();\n };\n\n window.addEventListener('resize', this.documentResizeListener);\n }\n }\n\n unbindDocumentListeners() {\n if (this.documentResizeListener) {\n window.removeEventListener('resize', this.documentResizeListener);\n this.documentResizeListener = null;\n }\n }\n\n ngOnDestroy() {\n if (this.responsiveOptions) {\n this.unbindDocumentListeners();\n }\n\n if (this.autoplayInterval) {\n this.stopAutoplay();\n }\n }\n\n}\n\nCarousel.ɵfac = function Carousel_Factory(t) {\n return new (t || Carousel)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n};\n\nCarousel.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: Carousel,\n selectors: [[\"p-carousel\"]],\n contentQueries: function Carousel_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, Header, 5);\n i0.ɵɵcontentQuery(dirIndex, Footer, 5);\n i0.ɵɵcontentQuery(dirIndex, PrimeTemplate, 4);\n }\n\n if (rf & 2) {\n let _t;\n\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.headerFacet = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.footerFacet = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templates = _t);\n }\n },\n viewQuery: function Carousel_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n }\n\n if (rf & 2) {\n let _t;\n\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.itemsContainer = _t.first);\n }\n },\n hostAttrs: [1, \"p-element\"],\n inputs: {\n page: \"page\",\n numVisible: \"numVisible\",\n numScroll: \"numScroll\",\n responsiveOptions: \"responsiveOptions\",\n orientation: \"orientation\",\n verticalViewPortHeight: \"verticalViewPortHeight\",\n contentClass: \"contentClass\",\n indicatorsContentClass: \"indicatorsContentClass\",\n indicatorsContentStyle: \"indicatorsContentStyle\",\n indicatorStyleClass: \"indicatorStyleClass\",\n indicatorStyle: \"indicatorStyle\",\n value: \"value\",\n circular: \"circular\",\n showIndicators: \"showIndicators\",\n showNavigators: \"showNavigators\",\n autoplayInterval: \"autoplayInterval\",\n style: \"style\",\n styleClass: \"styleClass\"\n },\n outputs: {\n onPage: \"onPage\"\n },\n features: [i0.ɵɵNgOnChangesFeature],\n ngContentSelectors: _c12,\n decls: 14,\n vars: 22,\n consts: [[3, \"ngClass\", \"ngStyle\"], [\"class\", \"p-carousel-header\", 4, \"ngIf\"], [3, \"ngClass\"], [1, \"p-carousel-container\"], [\"type\", \"button\", \"pRipple\", \"\", 3, \"ngClass\", \"disabled\", \"click\", 4, \"ngIf\"], [1, \"p-carousel-items-content\", 3, \"ngStyle\"], [1, \"p-carousel-items-container\", 3, \"transitionend\", \"touchend\", \"touchstart\", \"touchmove\"], [\"itemsContainer\", \"\"], [3, \"ngClass\", 4, \"ngFor\", \"ngForOf\"], [3, \"ngClass\", \"class\", \"ngStyle\", 4, \"ngIf\"], [\"class\", \"p-carousel-footer\", 4, \"ngIf\"], [1, \"p-carousel-header\"], [4, \"ngTemplateOutlet\"], [\"type\", \"button\", \"pRipple\", \"\", 3, \"ngClass\", \"disabled\", \"click\"], [4, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [\"type\", \"button\", 3, \"ngClass\", \"ngStyle\", \"click\"], [1, \"p-carousel-footer\"]],\n template: function Carousel_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c9);\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵtemplate(1, Carousel_div_1_Template, 3, 1, \"div\", 1);\n i0.ɵɵelementStart(2, \"div\", 2);\n i0.ɵɵelementStart(3, \"div\", 3);\n i0.ɵɵtemplate(4, Carousel_button_4_Template, 2, 8, \"button\", 4);\n i0.ɵɵelementStart(5, \"div\", 5);\n i0.ɵɵelementStart(6, \"div\", 6, 7);\n i0.ɵɵlistener(\"transitionend\", function Carousel_Template_div_transitionend_6_listener() {\n return ctx.onTransitionEnd();\n })(\"touchend\", function Carousel_Template_div_touchend_6_listener($event) {\n return ctx.onTouchEnd($event);\n })(\"touchstart\", function Carousel_Template_div_touchstart_6_listener($event) {\n return ctx.onTouchStart($event);\n })(\"touchmove\", function Carousel_Template_div_touchmove_6_listener($event) {\n return ctx.onTouchMove($event);\n });\n i0.ɵɵtemplate(8, Carousel_div_8_Template, 2, 9, \"div\", 8);\n i0.ɵɵtemplate(9, Carousel_div_9_Template, 2, 9, \"div\", 8);\n i0.ɵɵtemplate(10, Carousel_div_10_Template, 2, 9, \"div\", 8);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(11, Carousel_button_11_Template, 2, 8, \"button\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(12, Carousel_ul_12_Template, 2, 5, \"ul\", 9);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(13, Carousel_div_13_Template, 3, 1, \"div\", 10);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n i0.ɵɵclassMap(ctx.styleClass);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction2(17, _c10, ctx.isVertical(), !ctx.isVertical()))(\"ngStyle\", ctx.style);\n i0.ɵɵattribute(\"id\", ctx.id);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.headerFacet || ctx.headerTemplate);\n i0.ɵɵadvance(1);\n i0.ɵɵclassMap(ctx.contentClass);\n i0.ɵɵproperty(\"ngClass\", \"p-carousel-content\");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.showNavigators);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngStyle\", i0.ɵɵpureFunction1(20, _c11, ctx.isVertical() ? ctx.verticalViewPortHeight : \"auto\"));\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngForOf\", ctx.clonedItemsForStarting);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx.value);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx.clonedItemsForFinishing);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.showNavigators);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.showIndicators);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.footerFacet || ctx.footerTemplate);\n }\n },\n directives: [i1.NgClass, i1.NgStyle, i1.NgIf, i1.NgForOf, i1.NgTemplateOutlet, i2.Ripple],\n styles: [\".p-carousel{display:flex;flex-direction:column}.p-carousel-content{display:flex;flex-direction:column;overflow:auto}.p-carousel-prev,.p-carousel-next{align-self:center;flex-grow:0;flex-shrink:0;display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-carousel-container{display:flex;flex-direction:row}.p-carousel-items-content{overflow:hidden;width:100%}.p-carousel-items-container{display:flex;flex-direction:row}.p-carousel-indicators{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap}.p-carousel-indicator>button{display:flex;align-items:center;justify-content:center}.p-carousel-vertical .p-carousel-container{flex-direction:column}.p-carousel-vertical .p-carousel-items-container{flex-direction:column;height:100%}.p-items-hidden .p-carousel-item{visibility:hidden}.p-items-hidden .p-carousel-item.p-carousel-item-active{visibility:visible}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(Carousel, [{\n type: Component,\n args: [{\n selector: 'p-carousel',\n template: `\n\t\t