{"version":3,"file":"chunk-j4vzxibu.js","sources":["packages/sports/web/app/src/banner/banner-tick.component.ts","packages/sports/web/app/src/banner/banner-tick.html","packages/sports/web/app/src/banner/jackpot.service.ts","packages/sports/web/app/src/banner/banner-jackpot.html","packages/sports/web/app/src/banner/banner-jackpot.component.ts"],"sourcesContent":["import { Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';\n\n@Component({\n selector: 'ms-banner-tick',\n templateUrl: 'banner-tick.html',\n standalone: true,\n})\nexport class BannerTickComponent implements OnChanges, OnInit {\n @Input() model: number;\n value: number;\n newValue: number;\n private classList = ['animate', 'new-tick', 'old-tick'];\n @ViewChild('numberClone', { static: true }) numberClone: ElementRef;\n @ViewChild('number', { static: true }) number: ElementRef;\n private container1: any;\n private container2: any;\n\n ngOnInit(): void {\n this.container1 = this.number.nativeElement;\n this.container2 = this.numberClone.nativeElement;\n\n this.animate();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const change = changes['model'];\n\n if (!change) {\n return;\n }\n\n this.newValue = change.currentValue;\n\n if (change.firstChange) {\n return;\n }\n\n this.animate();\n }\n\n private animate(): void {\n if (this.value !== this.newValue) {\n this.animateCounterPart();\n this.value = this.newValue;\n }\n }\n\n private animateCounterPart(): void {\n this.removeClasses(this.container1, this.classList);\n this.removeClasses(this.container2, this.classList);\n\n this.container1.innerHTML = this.newValue.toString();\n this.container1.classList.add('new-tick');\n\n this.container2.classList.add('old-tick');\n this.container2.classList.add('animate');\n\n const t = this.container1;\n this.container1 = this.container2;\n this.container2 = t;\n }\n\n private removeClasses(element: Element, classes: string[]): void {\n for (const _class of classes) {\n element.classList.remove(_class);\n }\n }\n}\n","
\n","import { DestroyRef, Injectable, NgZone, OnDestroy } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { BannersConfig } from '@frontend/sports/common/client-config-data-access';\nimport { LoggerFactory, SportsRemoteLogger } from '@frontend/sports/common/core/feature/logging';\nimport { StringDictionary } from '@frontend/sports/common/core/utils/extended-types';\nimport { TickerInterval, TickerService } from '@frontend/sports/common/core/utils/timer';\nimport { fromSportsEnter, fromSportsLeave } from '@frontend/sports/host-app/sports-product/feature/utils';\nimport { isEmpty } from 'lodash-es';\nimport { Subject } from 'rxjs';\nimport { windowCount } from 'rxjs/operators';\n\nimport { JackpotEvent, JackpotIncrementEvent, JackpotRefreshEvent } from './banner.model';\nimport { BannersService } from './banners.service';\n\n@Injectable({ providedIn: 'root' })\nexport class JackpotService implements OnDestroy {\n private eventsSubject = new Subject