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6D,EAClB,GAAI7D,EAAQiE,OACRrF,KAAKkF,kBAAoB9D,OAEzB,GAA8B,MAA1BpB,KAAKkF,kBACLlF,KAAKsC,iBAAiBsC,KAAKxD,OACxB,CACH,KAAIpB,KAAKmF,eAAevC,OAAS,GAE1B,MADH5C,KAAKmF,eAAeP,KAAKxD,E,CAMzC,GAAkC,GAA9BpB,KAAKmF,eAAevC,OAAxB,CAKI5C,KAAKsC,iBAAmBtC,KAAKsC,iBAAiBgD,MAC1C,CAACC,EAAIC,KAAQ,IAAIC,KAAKD,EAAGb,UAAUe,aAAe,IAAID,KAAKF,EAAGZ,UAAUe,cAI5E,IAAK,MAAMtE,KAAWpB,KAAKsC,iBAAkB,CACzC,KAAItC,KAAKoF,iBAAiBxC,OAAS5C,KAAKmF,eAAevC,OAAS,GAG5D,MAFA5C,KAAKoF,iBAAiBR,KAAK5E,KAAKsC,iBAAiBqD,Q,CAQzD3F,KAAKoF,kBAAoB,IAAIpF,KAAKoF,iBAAiBQ,UAEnD5F,KAAKsC,kBAAoB,IAAItC,KAAKsC,iBAAiBsD,UAEnD5F,KAAKmF,gBAAkB,IAAMnF,KAAKmF,eAAevC,OAAS,EAC1D5C,KAAKqC,kBAAoBrC,KAAKoF,iBAAiBS,OAAO7F,KAAKmF,gBACtDnF,KAAKmF,gBAAkB,IAAMnF,KAAKoF,kBAAoB,KAC3DpF,KAAKqC,kBAAoBrC,KAAKoF,iB,MA1B9BpF,KAAKqC,kBAAoBrC,KAAKmF,cA4BtC,EC3KJ,MAAMW,EAAYC,SAASC,eAAe,gBACpCC,EAAO,aAAoBH,GAC7BA,GACAG,EAAKlG,QACD,SAAC,aAAgB,WACb,SAAC+D,EAAK,M","sources":["webpack:///./tscapi/service/show.service.ts","webpack:///./components/on_air_now/on-air-buttons.component.tsx","webpack:///./components/on_air_now/on-air-shows.tsx","webpack:///./components/on_air_now/on-air-live.component.tsx","webpack:///./components/on_air_now/on-air-recently.component.tsx","webpack:///./components/on_air_now/on-air.component.tsx","webpack:///./components/on_air_now/on-air.tsx"],"sourcesContent":["import http from './httpservice';\r\nimport { Cookie } from '../utils/cookie';\r\n\r\nconst cookie: Cookie = new Cookie();\r\nconst language = cookie.ApiLanguage;\r\nconst baseUrl = '/api/v2/' + language;\r\nconst baseUrlV3 = '/api/v3/' + language;\r\n\r\nconst cachebleHeaders = {\r\n 'Content-Type': 'application/json',\r\n currentdatetime: new Cookie().CurrentDate,\r\n};\r\nconst headers = {\r\n 'Cache-Control': 'no-cache',\r\n 'Content-type': 'application/json',\r\n currentdatetime: new Cookie().CurrentDate,\r\n};\r\n\r\nfunction getShows(successCallback: any, errorCallback: any) {\r\n http.get(baseUrl + '/shows/today', { headers: cachebleHeaders })\r\n .then(result => {\r\n successCallback(result.data);\r\n })\r\n .catch(err => console.log('error getting shows'));\r\n}\r\n\r\nfunction getLiveProducts(successCallback: any, errorCallback: any) {\r\n http.get(baseUrlV3 + '/products/onairnow', { headers: cachebleHeaders })\r\n .then(result => {\r\n successCallback(result.data);\r\n })\r\n .catch(err => console.log('error getting live products'));\r\n}\r\n\r\nfunction getRecentlyAired(successCallback: any, errorCallback: any) {\r\n http.get(baseUrlV3 + '/products/recentlyaired', { headers: cachebleHeaders })\r\n .then(result => {\r\n successCallback(result.data);\r\n })\r\n .catch(err => console.log('error getting recently aired products'));\r\n}\r\n\r\nexport const getWatchLiveProducts = function(timeZone) {\r\n return http.get(baseUrl + '/shows/watchuslive', {\r\n headers: headers,\r\n params: {\r\n timezone: timeZone,\r\n },\r\n });\r\n};\r\n\r\nexport default {\r\n getShows: getShows,\r\n getLiveProducts: getLiveProducts,\r\n getRecentlyAired: getRecentlyAired,\r\n};\r\n","import React from 'react';\r\n\r\nfunction OnAirButtons() {\r\n return (\r\n
\r\n
\r\n
\r\n \r\n Watch Us Live\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Program Guide\r\n \r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport default OnAirButtons;\r\n","import React, { Component } from 'react';\r\nimport { TmShowLink } from '../../tscapi/model/show';\r\n\r\ninterface MyProp {\r\n showLinks: TmShowLink[];\r\n baseURL: string;\r\n}\r\n\r\nexport default class Shows extends Component {\r\n render() {\r\n if (!this.props.showLinks || !this.props.baseURL) {\r\n return
;\r\n }\r\n return (\r\n
\r\n

What's On Air

\r\n\r\n {this.props.showLinks &&\r\n this.props.showLinks.map((links, i) => (\r\n
\r\n \r\n {links.ShowName}\r\n \r\n
\r\n ))}\r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport { TmProductForPRP } from '../../tscapi/model/product';\r\n\r\ninterface MyProps {\r\n liveProducts: TmProductForPRP;\r\n baseURL: string;\r\n}\r\n\r\nexport default class LiveProducts extends Component {\r\n render() {\r\n const { liveProducts, baseURL } = this.props;\r\n if (!this.props.liveProducts) {\r\n return
;\r\n }\r\n return (\r\n
\r\n

\r\n On Air Now\r\n

\r\n
\r\n \r\n \r\n \r\n
{liveProducts.Name}
\r\n
\r\n {liveProducts.IsPriceRange}\r\n {liveProducts.IsPriceRange != liveProducts.WasPriceRange && (\r\n {liveProducts.WasPriceRange} \r\n )}\r\n
\r\n \r\n Shop Now\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n findImageURL(product: TmProductForPRP): string {\r\n let imageURL = '';\r\n const defaultEdpIndex: number = product?.Edps?.findIndex((x) => x.EdpNo == product.DefaultEdp);\r\n if (defaultEdpIndex > -1 && typeof defaultEdpIndex != undefined) {\r\n product.EasyPaymentPrice = product.Edps[defaultEdpIndex].EasyPaymentPrice;\r\n imageURL = product.Edps[defaultEdpIndex].ImageUrl;\r\n }\r\n return imageURL != null ? imageURL : '';\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport { TmProductForPRP } from '../../tscapi/model/product';\r\n\r\ninterface MyProps {\r\n firstPageProducts: TmProductForPRP[];\r\n previousProducts: TmProductForPRP[];\r\n baseURL: string;\r\n}\r\nconst shopAllDivStyle: any = {\r\n margin: '0 2vw',\r\n};\r\n\r\nexport default class RecentProducts extends Component {\r\n componentDidMount() {\r\n if (Array.isArray(this.props.firstPageProducts) && Array.isArray(this.props.previousProducts)) {\r\n this.applyCarousel();\r\n } else {\r\n //dont add jquery carousel because props are null or empty\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n if (Array.isArray(this.props.firstPageProducts) && Array.isArray(this.props.previousProducts)) {\r\n this.applyCarousel();\r\n } else {\r\n //dont add jquery carousel because props are null or empty\r\n }\r\n }\r\n\r\n render() {\r\n const { previousProducts, firstPageProducts, baseURL } = this.props;\r\n return (\r\n
\r\n

\r\n Recently Aired\r\n

\r\n
\r\n
\r\n {previousProducts &&\r\n previousProducts.map((product, i) => (\r\n
\r\n \r\n \r\n \r\n
\r\n ))}\r\n {firstPageProducts &&\r\n firstPageProducts.map((product, i) => (\r\n
\r\n \r\n \r\n \r\n
\r\n ))}\r\n
\r\n
\r\n
\r\n \r\n Shop All Today's Items\r\n \r\n
\r\n
\r\n );\r\n }\r\n findImageURL(product: TmProductForPRP): string {\r\n let imageURL = '';\r\n const defaultEdpIndex: number = product.Edps.findIndex((x) => x.EdpNo == product.DefaultEdp);\r\n if (defaultEdpIndex > -1) {\r\n product.EasyPaymentPrice = product.Edps[defaultEdpIndex].EasyPaymentPrice;\r\n imageURL = product.Edps[defaultEdpIndex].ImageUrl;\r\n }\r\n return imageURL != null ? imageURL : '';\r\n }\r\n\r\n applyCarousel() {\r\n const $onAirNowCarousel = $('.onAirNowCarousel');\r\n if (this.props.previousProducts.length > 0 || this.props.firstPageProducts.length > 0) {\r\n $onAirNowCarousel.not('.slick-initialized').slick({\r\n dots: false,\r\n slidesPerRow: 4,\r\n infinite: false,\r\n rows: 2,\r\n arrows: true,\r\n speed: 300,\r\n prevArrow:\r\n '
Previous
',\r\n nextArrow:\r\n '
Next
',\r\n responsive: [\r\n {\r\n breakpoint: 1200,\r\n settings: {\r\n slidesPerRow: 3,\r\n rows: 2,\r\n },\r\n },\r\n ],\r\n });\r\n $onAirNowCarousel.on('afterChange', function () {\r\n const currentSlide = $onAirNowCarousel.slick('slickCurrentSlide');\r\n if (currentSlide == 0) {\r\n $('.onAirNowCarousel .slick-prev').hide();\r\n $('.onAirNowCarousel .slick-next').show();\r\n } else if (currentSlide == 1) {\r\n $('.onAirNowCarousel .slick-next').hide();\r\n $('.onAirNowCarousel .slick-prev').show();\r\n }\r\n });\r\n const currentSlide = $onAirNowCarousel.slick('slickCurrentSlide');\r\n if (currentSlide == 0) {\r\n $('.onAirNowCarousel .slick-prev').hide();\r\n } else if (currentSlide == 1) {\r\n $('.onAirNowCarousel .slick-next').hide();\r\n }\r\n }\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\n\r\nimport ShowService from '../../tscapi/service/show.service';\r\nimport OnAirButtons from './on-air-buttons.component';\r\nimport Shows from './on-air-shows';\r\nimport LiveProducts from './on-air-live.component';\r\nimport RecentProducts from './on-air-recently.component';\r\nimport { TmProductForPRP, TmProduct } from '../../tscapi/model/product';\r\nimport { TmShowLink } from '../../tscapi/model/show';\r\n\r\ninterface MyState {\r\n liveProducts: TmProductForPRP;\r\n showLinks: TmShowLink[];\r\n recentProducts: TmProductForPRP[];\r\n previousProducts: TmProductForPRP[];\r\n firstPageProducts: TmProductForPRP[];\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\r\ninterface MyProps {}\r\n\r\nexport default class OnAir extends Component {\r\n onAirData: TmProduct[];\r\n products: TmProductForPRP[];\r\n liveProduct: TmProduct;\r\n liveProductForPRP: TmProductForPRP;\r\n ShowLinks: TmShowLink[];\r\n futureProducts: TmProductForPRP[];\r\n borrowedProducts: TmProductForPRP[];\r\n previousProducts: TmProductForPRP[];\r\n firstPageProducts: TmProductForPRP[];\r\n\r\n state: MyState = {\r\n liveProducts: null,\r\n showLinks: null,\r\n recentProducts: null,\r\n firstPageProducts: null,\r\n previousProducts: null,\r\n };\r\n\r\n componentDidMount() {\r\n this.getLiveProductsData();\r\n this.getShowLinksData();\r\n this.getRecentlyAiredData();\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n getLiveProductsData() {\r\n ShowService.getLiveProducts(\r\n (responseData) => {\r\n this.setState({ liveProducts: responseData });\r\n },\r\n function () {\r\n console.log('Failed to get On Air Now content');\r\n },\r\n );\r\n }\r\n\r\n getShowLinksData() {\r\n ShowService.getShows(\r\n (responseData) => {\r\n this.setState({ showLinks: responseData });\r\n },\r\n function () {\r\n console.log('Failed to get Shows List content');\r\n },\r\n );\r\n }\r\n\r\n getRecentlyAiredData() {\r\n ShowService.getRecentlyAired(\r\n (responseData) => {\r\n this.formatRecentProducts(responseData);\r\n this.setState({ recentProducts: this.products });\r\n this.setState({ previousProducts: this.previousProducts });\r\n this.setState({ firstPageProducts: this.firstPageProducts });\r\n },\r\n function () {\r\n console.log('Failed to get Recently Aired content');\r\n },\r\n );\r\n }\r\n\r\n formatRecentProducts(resp) {\r\n this.products = [];\r\n const productHashTable = {};\r\n if (resp.Products[0] && resp.Products[0].OnAirInfo) {\r\n resp.Products.push(resp.Products[0]);\r\n }\r\n for (let index = 0; index < resp.Products.length; index++) {\r\n const prod = resp.Products[index];\r\n if (prod && prod.OnAirInfo) {\r\n if (!productHashTable[prod.ItemNo]) {\r\n productHashTable[prod.ItemNo] = true;\r\n this.products.push(prod);\r\n }\r\n }\r\n }\r\n this.SequenceProduct(this.products);\r\n while ((this.firstPageProducts.length + this.previousProducts.length) % 8 != 0) {\r\n if (this.previousProducts.length > 0) this.previousProducts.pop();\r\n else this.firstPageProducts.pop();\r\n }\r\n }\r\n\r\n SequenceProduct(sourceProducts: TmProductForPRP[]) {\r\n this.liveProductForPRP = null;\r\n this.futureProducts = [];\r\n this.previousProducts = [];\r\n this.borrowedProducts = [];\r\n this.firstPageProducts = [];\r\n\r\n //sort from oldest\r\n\r\n for (const product of sourceProducts) {\r\n if (product.IsLive) {\r\n this.liveProductForPRP = product;\r\n } else {\r\n if (this.liveProductForPRP == null) {\r\n this.previousProducts.push(product);\r\n } else {\r\n if (this.futureProducts.length < 8) {\r\n this.futureProducts.push(product);\r\n } else break;\r\n }\r\n }\r\n }\r\n\r\n if (this.futureProducts.length == 8) {\r\n this.firstPageProducts = this.futureProducts;\r\n return;\r\n } //borrow session begins\r\n else {\r\n this.previousProducts = this.previousProducts.sort(\r\n (p2, p1) => +new Date(p1.OnAirInfo.OnAirStart) - +new Date(p2.OnAirInfo.OnAirStart),\r\n );\r\n\r\n //borrow from past\r\n for (const product of this.previousProducts) {\r\n if (this.borrowedProducts.length + this.futureProducts.length < 8) {\r\n this.borrowedProducts.push(this.previousProducts.shift());\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n //@ts-ignore\r\n if (this.borrowedProducts != []) this.borrowedProducts.reverse();\r\n //@ts-ignore\r\n if (this.previousProducts != []) this.previousProducts.reverse();\r\n //@ts-ignore\r\n if (this.futureProducts != [] && this.futureProducts.length < 8)\r\n this.firstPageProducts = this.borrowedProducts.concat(this.futureProducts); //@ts-ignore\r\n else if (this.futureProducts == [] && this.borrowedProducts != []) {\r\n this.firstPageProducts = this.borrowedProducts;\r\n }\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport ReactDOM from 'react-dom/client';\r\n\r\nimport OnAir from './on-air.component';\r\n\r\nconst onAirElem = document.getElementById('onAirNowWrap') as HTMLElement;\r\nconst root = ReactDOM.createRoot(onAirElem);\r\nif (onAirElem) {\r\n root.render(\r\n \r\n \r\n ,\r\n );\r\n}\r\n"],"names":["language","ApiLanguage","baseUrl","baseUrlV3","cachebleHeaders","currentdatetime","CurrentDate","getShows","successCallback","errorCallback","get","headers","then","result","data","catch","err","console","log","getLiveProducts","getRecentlyAired","className","href","Shows","Component","render","this","props","showLinks","baseURL","map","links","i","VisitId","ShowName","LiveProducts","liveProducts","LinkWithoutDomain","id","ItemNo","alt","Name","src","findImageURL","IsPriceRange","WasPriceRange","product","imageURL","defaultEdpIndex","Edps","findIndex","x","EdpNo","DefaultEdp","undefined","EasyPaymentPrice","ImageUrl","shopAllDivStyle","margin","RecentProducts","componentDidMount","Array","isArray","firstPageProducts","previousProducts","applyCarousel","componentDidUpdate","style","$onAirNowCarousel","$","length","not","slick","dots","slidesPerRow","infinite","rows","arrows","speed","prevArrow","nextArrow","responsive","breakpoint","settings","on","currentSlide","hide","show","OnAir","state","recentProducts","getLiveProductsData","getShowLinksData","getRecentlyAiredData","responseData","setState","formatRecentProducts","products","resp","productHashTable","Products","OnAirInfo","push","index","prod","SequenceProduct","pop","sourceProducts","liveProductForPRP","futureProducts","borrowedProducts","IsLive","sort","p2","p1","Date","OnAirStart","shift","reverse","concat","onAirElem","document","getElementById","root"],"sourceRoot":""}