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K,KACb,8BACA,wBACA,0CACA,4BACA,8BACA,0CACA,oCACA,0BACA,kDACA,4CACA,4CACA,8CACA,0CACA,4DACA,sCACA,wCACA,0EACA,oBACA,4CACA,oCACA,oCACA,sCACA,gDACA,sBACA,gCACA,wBACA,sCACA,oCACA,oCACA,4BACA,wCACA,4CACA,8BACA,0DACA,wCACA,oBACA,wCACA,oCACA,kCACA,kCACA,4BACA,8BACA,kCACA,8CACA,wCACA,gCACA,oCACA,oCACA,8BACA,8BACA,kCACA,sCACA,wCACA,wCACA,4CACA,wCACA,8BACA,0BACA,4BACA,gCACA,0BACA,yBACA,4BACA,4CACA,kDACA,gDACA,gCACA,oCACA,wCACA,0CACA,sDACA,8CACA,wBACA,0BACA,0CACA,kCACA,oBACA,sBACA,wCACA,wDACA,0BACA,sBACA,4BACA,oCACA,oCACA,oCACA,oCACA,oCACA,gCACA,0CACA,0CACA,gDACA,kCACA,gCACA,oCACA,sCACA,sCACA,kCACA,kCACA,gCACA,sBACA,wBACA,8BACA,sCACA,4BACA,gBACA,wBACA,8BACA,0BACA,8BACA,4BACA,+bChHJ,iBAkCA,SAASyrC,EAAc79E,GACnB,MAAM89E,EAAc,kCAAkCjb,KAAK7iE,GAC3D,OAAI89E,GAAeA,EAAYn+E,OAAS,GAC7BoG,SAAS+3E,EAAY,GAAI,MAExB,CAEhB,CAyEA,SAAgBC,EAAI3zE,GAChB,GAAsB,oBAAXxL,OACP,MAAO,GAGXwL,EAAOA,EAAKS,QAAQ,OAAQ,OAAOA,QAAQ,OAAQ,OACnD,IAEIyC,EADQ,IAAIs1D,OADH,SAAWx4D,EAAO,aAEXy4D,KAAKjkE,OAAOC,SAASkI,MACzC,OAAoB,OAAZuG,EAAoB,GAAKA,EAAQ,EAC7C,CArHA,uCACI,OAAO,CAkBX,EAqBA,8BAAmCzM,GAC/B,MAAMb,EAAYpB,OAAOqB,UAAUD,UAC7Bg+E,EAAqBh+E,EAAUI,QAAQ,kBAAoB,EAEjE,GAAIS,EAAO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AM,EAE1C6d,EAAOqkF,yBACX,EAEA,8BAkDA,4BAiBA,4BAgHA,iBA0BA,cA2BA,mIChbA,8BAEA,4GCFA,2BAEA","sources":["/source/webpack/universalModuleDefinition","/source/./Frontend/src/assets/js/Shared/AuthenticatedComponent.jsx","/source/./Frontend/src/assets/js/Shared/DisplayFormatter.jsx","/source/./Frontend/src/assets/js/Shared/Helpers/detectMobileBrowser.js","/source/./Frontend/src/assets/js/Shared/LiveStreams/index.js","/source/./Frontend/src/assets/js/Shared/Loading.jsx","/source/./Frontend/src/assets/js/advertising/Mrec/index.jsx","/source/./Frontend/src/assets/js/components/AnimateExpandHOC/index.jsx","/source/./Frontend/src/assets/js/components/ComponentsRenderer/index.jsx","/source/./Frontend/src/assets/js/components/ContentGrid/index.jsx","/source/./Frontend/src/assets/js/components/ContentNoTiles/index.jsx","/source/./Frontend/src/assets/js/components/ContentShare/index.jsx","/source/./Frontend/src/assets/js/components/ContentTiles/index.jsx","/source/./Frontend/src/assets/js/components/FavoriteContent/index.jsx","/source/./Frontend/src/assets/js/components/LoadMore/index.jsx","/source/./Frontend/src/assets/js/components/MegaMenu/Trending/index.jsx","/source/./Frontend/src/assets/js/components/PageTitleBar/index.jsx","/source/./Frontend/src/assets/js/components/SearchForm/index.jsx","/source/./Frontend/src/assets/js/components/HighlightedText/index.jsx","/source/./Frontend/src/assets/js/components/SearchResults/index.jsx","/source/./Frontend/src/assets/js/components/Sponsor/index.jsx","/source/./Frontend/src/assets/js/components/VideoMarquee/index.jsx","/source/./Frontend/src/assets/js/components/LiveTv/index.jsx","/source/./LiveTv/Scripts/Index.js","/source/./Frontend/src/assets/js/components/SearchOverlay/index.jsx","/source/./Frontend/src/assets/js/components/GlobalHeader/index.jsx","/source/./Shared/Scripts/PageBase.js","/source/./Frontend/src/assets/js/Shared/Geo/geoSwitch.tsx","/source/./Frontend/src/assets/js/advertising/C06/index.tsx","/source/./Frontend/src/assets/js/components/AviaVodContainer/AviaVodContainer.tsx","/source/./Frontend/src/assets/js/components/AviaVodContainer/LogIn.tsx","/source/./Frontend/src/assets/js/components/AviaVodContainer/VodCtrlClient.tsx","/source/./Frontend/src/assets/js/components/AviaVodContainer/utils.ts","/source/./Frontend/src/assets/js/components/AviaVodContainer/withSuspenseVod.tsx","/source/./Frontend/src/assets/js/components/Carousel/index.tsx","/source/./Frontend/src/assets/js/components/Carousel/type.ts","/source/./Frontend/src/assets/js/components/CarouselBase/index.tsx","/source/./Frontend/src/assets/js/components/CarouselBaseScrollBoosterWrapper/index.tsx","/source/./Frontend/src/assets/js/components/DisplayBanner/index.tsx","/source/./Frontend/src/assets/js/components/Link/index.tsx","/source/./Frontend/src/assets/js/components/LiveBadge/index.tsx","/source/./Frontend/src/assets/js/components/LivePlayer/LiveCtrlClient.tsx","/source/./Frontend/src/assets/js/components/LivePlayer/index.tsx","/source/./Frontend/src/assets/js/components/LivePlayer/withSuspenseLive.tsx","/source/./Frontend/src/assets/js/components/LiveTv/ComingUpDetails.tsx","/source/./Frontend/src/assets/js/components/LiveTv/LiveOnNowItem.tsx","/source/./Frontend/src/assets/js/components/LiveTv/LiveOnNowStrap.tsx","/source/./Frontend/src/assets/js/components/LiveTv/LiveTvComingUpItem.tsx","/source/./Frontend/src/assets/js/components/LiveTv/LiveTvLaterItem.tsx","/source/./Frontend/src/assets/js/components/LiveTv/LiveTvLiveNowItem.tsx","/source/./Frontend/src/assets/js/components/LiveTv/LiveTvSchedule.tsx","/source/./Frontend/src/assets/js/components/LoadingAnimation/index.tsx","/source/./Frontend/src/assets/js/components/MegaMenu/LiveTvMenu.tsx","/source/./Frontend/src/assets/js/components/MegaMenu/NewsMenu.tsx","/source/./Frontend/src/assets/js/components/MegaMenu/ShowsMenu.tsx","/source/./Frontend/src/assets/js/components/MegaMenu/functions.tsx","/source/./Frontend/src/assets/js/components/MemberGate/index.tsx","/source/./Frontend/src/assets/js/components/MobileGate/index.tsx","/source/./Frontend/src/assets/js/components/NewsSocials/index.tsx","/source/./Frontend/src/assets/js/components/SliderBase/SliderButtons.tsx","/source/./Frontend/src/assets/js/components/SliderBase/index.tsx","/source/./Frontend/src/assets/js/components/userDropdown/index.tsx","/source/./Frontend/src/assets/js/tenplay/@types/bc.interface.ts","/source/./Frontend/src/assets/js/tenplay/@util/callStack.ts","/source/./Frontend/src/assets/js/tenplay/@util/device.ts","/source/./Frontend/src/assets/js/tenplay/@util/userFlag.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/allocator.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/allocator.type.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/allocator.video.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/allocator.video.type.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/id3/id3Processor.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/id3/id3Processor.type.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/oztam.v2.lib.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/oztam.v2.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/tealium.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/tracking.conf.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/tracking.env.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/tracking.init.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/util.ts","/source/./Frontend/src/assets/js/tenplay/pkgAviaAllocator/util/callStack.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/api/api.bvod.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/api/api.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/api/api.video.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/avia.lib.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/commonPlugins/ConsumerAdvice/AviaConsumerAdvice.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/global/config.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/index.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/index.type.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/live/Plugins/LogoDisplay/AviaLogoDisplayOverlayPlugin.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/live/Plugins/LogoDisplay/index.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/live/Plugins/Overlay/AviaOverlayPlugin.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/live/Plugins/Overlay/index.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/live/liveCtrl.tsx","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/live/liveCtrl.util.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/live/liveWatchedTime.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/live/track/allocatorLive.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/live/track/allocatorLive.type.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/live/track/oztam.v2.aviaLive.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/jwt/cacheStatus.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/jwt/enum.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/overlayFactory.tsx","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/overlayTemplate.tsx","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/player.util.type.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/player.utls.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/playerCtrl.tsx","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/playerCtrl.type.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/slate/slateTemplate.tsx","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/track/tealium.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/util/adBlockCheck.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/util/detectOs.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/util/device.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/util/env.util.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/util/imaUtil.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/player/util/isShow.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/Plugins/createUpNext/UpNextPlugin.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/Plugins/createUpNext/enums.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/Plugins/createUpNext/ui-templates/upNextCard.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/Plugins/createUpNext/ui-templates/videoEndPanel.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/Plugins/display/AviaDisplayPlugin.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/track/allocatorVod.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/track/allocatorVod.type.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/track/oztam.v2.aviaVod.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/track/tealium.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/util/VideoProgressEnums.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/util/VideoProgressManager.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/util/VideoProgressManagerQuery.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/util/VideoTextTrackManager.ts","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/vodCtrl.tsx","/source/./Frontend/src/assets/js/tenplay/pkgPlayer/vod/vodCtrl.util.ts","/source/./Frontend/src/assets/js/tenplay/ten/conf.env.ts","/source/./Frontend/src/assets/js/tenplay/ten/cust.env.ads.ts","/source/./Frontend/src/assets/js/tenplay/ten/cust.env.ads.util.ts","/source/./Frontend/src/assets/js/tenplay/ten/cust.env.base.ts","/source/./Frontend/src/assets/js/tenplay/ten/cust.env.track.ts","/source/./Frontend/src/assets/js/tenplay/ten/cust.env.ts","/source/./Frontend/src/assets/js/tenplay/ten/env.enum.ts","/source/./Frontend/src/assets/js/tenplay/ten/env.utag.ts","/source/./Frontend/src/assets/js/tenplay/ten/env.util.ts","/source/./Frontend/src/assets/js/tenplay/ten/js.extension.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/adManager.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/freeWheelManager.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/page.path.processor.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/static.rule.processor.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/static.slot.manager.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/static.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/util.adhesion.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/util.c06.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/util.mrec.carousel.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/util.skin.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/util.ts","/source/./Frontend/src/assets/js/tenplay/tenAds/video.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/admiral.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/allocatorPage.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/allocatorPage.type.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/carouselTracking.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/tealium.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/tealiumTracking.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/telaria.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/track.allocator.page.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/track.allocator.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/track.allocator.video.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/track.dataModel.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/track.init.ts","/source/./Frontend/src/assets/js/tenplay/tenTrack/tracking.init.ts","/source/./Frontend/src/assets/js/tenplay/tenVod/@types/bc.interface.ts","/source/./Frontend/src/assets/js/tenplay/tenVod/plugins/drmFilter.ts","/source/./Frontend/src/assets/js/tenplay/tenVod/plugins/errorHandler.ts","/source/./Frontend/src/assets/js/tenplay/tenVod/plugins/eventHandler.ts","/source/./Frontend/src/assets/js/tenplay/tenVod/plugins/overlayUI.ts","/source/./Frontend/src/assets/js/tenplay/tenVod/plugins/trackingService.ts","/source/./Frontend/src/assets/js/tenplay/tenVod/plugins/videoPlaySync.ts","/source/./Frontend/src/assets/js/tenplay/tenVod/plugins/volumeSync.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TenPlay\"] = factory();\n\telse\n\t\troot[\"TenPlay\"] = root[\"TenPlay\"] || {}, root[\"TenPlay\"][\"LiveTvIndex\"] = factory();\n})(self, function() {\nreturn ","import React from \"react\";\nimport {myAccountPagesEnum} from \"./Enums\";\nimport PropTypes from \"prop-types\";\nimport {MyAccountManager} from \"../tenplay/MyAccountManager\";\n\nexport function requiresAuthentication(Component) {\n return class AuthenticatedComponent extends React.Component {\n static propTypes = {\n requiresAuthentication: PropTypes.bool,\n }\n\n constructor(props) {\n super(props);\n this.state = {\n authenticationFinished: false,\n loggedIn: false,\n userData: null,\n isEmailVerified: false,\n };\n }\n\n checkIfEmailVerified(userData) {\n if (!userData) {\n return false;\n }\n \n const thresholdDate = new Date('01/01/22').getTime();\n const signUpDate = new Date(userData.tu_datecreated).getTime();\n const isEmailVerified = userData.tu_isEmailVerified === 'true';\n \n return signUpDate >= thresholdDate && !isEmailVerified ? isEmailVerified : true;\n }\n\n componentDidMount() {\n MyAccountManager.subscribeToCallbacks((loggedIn, userData, pressedLogOut, redirectURL) => {\n if (pressedLogOut) {\n // we have forcefully logged out - redirect back to home page\n window.location = redirectURL || '/';\n }\n else {\n this.setState({\n loggedIn: loggedIn,\n userData: userData,\n isEmailVerified: userData && this.checkIfEmailVerified(userData),\n authenticationFinished: true,\n });\n const { requiresAuthentication } = this.props;\n if (requiresAuthentication && !loggedIn) {\n MyAccountManager.openModal(myAccountPagesEnum.SIGNIN);\n }\n }\n });\n } \n\n render() {\n return (\n \n );\n }\n };\n}\n\nexport default requiresAuthentication;","import React from \"react\";\nimport { isArray } from \"util\";\n\nexport const showClassificationDisplay = (genres, classification, genreDisplayName) => {\n // this will expect an array of genre NAMES only, and a string of classification\n let genreText = null;\n let spacerText = null;\n let classificationText = null;\n if (genres && isArray(genres) && genres.length > 0) {\n genres.forEach(genre => {\n if (genre) {\n // eliminate nulls\n if (!genreText) {\n genreText = genre;\n } else {\n genreText = genreText + \", \" + genre;\n }\n }\n });\n }\n\n if (classification) {\n if (genreText) {\n spacerText = \" | \";\n }\n classificationText = classification;\n }\n\n var result = (\n <>\n {classificationText && (\n {classificationText}\n )}\n {spacerText && {spacerText}}\n\n {genreText && {genreDisplayName || genreText}}\n \n );\n\n return result;\n};\n","export function detectMobileBrowser() {\n let {userAgent} = navigator;\n if (!userAgent) return false;\n if (userAgent.match(/Android/i)) {\n // if (userAgent.toLowerCase().indexOf('samsungbrowser') > - 1) {\n // return true;\n // } else \n if (userAgent.toLowerCase().indexOf('firefox') > -1) {\n return true;\n }\n } else if (userAgent.match(/iPhone|iPad|iPod/i)) {\n if (userAgent.toLowerCase().match(/firefox|fxios/i)) {\n return true;\n }\n }\n return false;\n}","export const getLiveStream = (liveStreamSchedules) => {\n return liveStreamSchedules.find(schedule => \n new Date(schedule.startDate).getTime() - Date.now() < 0 &&\n new Date(schedule.endDate).getTime() - Date.now() > 0);\n}\n\nexport const getLiveStreams = (liveStreamSchedules) => {\n return liveStreamSchedules.filter(schedule => \n new Date(schedule.startDate).getTime() - Date.now() < 0 &&\n new Date(schedule.endDate).getTime() - Date.now() > 0);\n}\n\nexport const getUpcomingLiveStreams = (liveStreamSchedules) => {\n return liveStreamSchedules.filter(schedule => \n new Date(schedule.startDate).getTime() - Date.now() > 0);\n}","import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport const Loading = (props) => {\n\n if(props.hasLoaded ) {\n return props.component;\n }\n\n if(props.defaultState) {\n return props.defaultState;\n }\n\n return
;\n};\n\nLoading.propTypes = {\n hasLoaded: PropTypes.bool,\n component: PropTypes.element,\n defaultState: PropTypes.node,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst adSlotId = \"mpu_top\"\n\nclass Mrec extends React.Component {\n\n static propTypes = {\n adKey: PropTypes.string,\n }\n\n constructor(props) {\n super(props)\n this.state = {\n }\n }\n\n componentDidUpdate = (prevProps) => {\n if (prevProps.adKey != this.props.adKey) {\n if (window.tenService && window.tenService.ads) {\n window.tenService.ads.syncStaticAdParams();\n window.tenService.ads.reloadStaticAd(adSlotId);\n window.tenService.ads.refreshStaticAd(adSlotId);\n }\n }\n }\n\n componentDidMount() {\n if (window.tenService && window.tenService.ads) {\n window.tenService.ads.syncStaticAdParams();\n window.tenService.ads.reloadStaticAd(adSlotId);\n window.tenService.ads.refreshStaticAd(adSlotId);\n }\n }\n\n render() {\n return (<>\n
\n Advertisement\n
\n );\n }\n}\nexport default Mrec;\n","import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport CloseX from \"../CloseX\";\n\nclass SocialLinks extends Component {\n constructor(props) {\n super(props);\n this.state = { showContent: false };\n this.onClick = this.showContent.bind(this);\n this.closeXHandler = this.closeXHandler.bind(this);\n }\n\n showContent() {\n this.setState({\n showContent: true,\n });\n }\n\n closeXHandler() {\n this.setState({\n showContent: false,\n });\n }\n\n render() {\n const { modifierClasses, text, icon } = this.props;\n\n return (\n \n \n \n {text}\n \n\n <>\n \n {this.state.showContent && (\n \n )}\n {this.props.children}\n
\n \n \n );\n }\n}\n\nSocialLinks.propTypes = {\n children: PropTypes.object,\n href: PropTypes.string,\n title: PropTypes.string,\n modifierClasses: PropTypes.string,\n text: PropTypes.string,\n icon: PropTypes.string,\n};\n\nexport default SocialLinks;\n","import React from 'react';\nimport Carousel from '../Carousel';\nimport {eComponentType, eCarouselType} from \"../Carousel/type\";\nimport ContentTiles from '../ContentTiles';\nimport ContentGrid from '../ContentGrid';\nimport DisplayBanner from '../DisplayBanner';\nimport axios from 'axios';\nimport PropTypes from \"prop-types\";\n\nexport var loadMoreClick = async (tiles, numberToLoad, endpoint) => {\n var ids = [];\n for (var index = 0; index < tiles.length; index++) {\n ids.push(tiles[index].id);\n }\n var data = await axios.get(endpoint, {\n params: {\n skipIds: ids,\n pageSize: numberToLoad,\n },\n })\n .then(function (response) { return response.data; });\n return data;\n}\n\nconst ComponentsRenderer = ( props ) => {\n\n let liveTileCarouselIndex = props.components.reduce((returnIndex, value, index) => {\n const { carouselType } = value;\n\n if (returnIndex < 0 && (carouselType === eCarouselType.DEFAULT || carouselType === eCarouselType.GRID))\n return index;\n\n return returnIndex;\n }, -1);\n\n return (\n <>\n {props.components &&\n props.components.map((carousel, _index) => {\n var { tpId, type, carouselType, slides, title, hasMore, hasAds, loadMoreUrl, code, liveStreamSchedules, sponsorMessage } = carousel;\n if (carouselType == eCarouselType.DEFAULT\n || carouselType == eCarouselType.SHOWS\n || carouselType == eCarouselType.SQUARE\n ) {\n return (\n \n );\n }\n else if (carouselType == eCarouselType.DISPLAYBANNER) {\n return (\n <>\n
\n
\n
\n

{title} {sponsorMessage ? brought to you by {sponsorMessage} : \"\"}

\n
\n \n
\n
\n \n )\n }\n else if (carouselType == eCarouselType.GRID) {\n return (\n <>\n
\n
\n
\n

{title} {sponsorMessage ? brought to you by {sponsorMessage} : \"\"}

\n
\n \n
\n
\n \n )\n }\n else if (carouselType == eCarouselType.COLLECTIONTILE) {\n return (\n <>\n
\n
\n
\n

{title} {sponsorMessage ? brought to you by {sponsorMessage} : \"\"}

\n
\n \n
\n
\n \n )\n }\n else if (type == eComponentType.CODECOMPONENT) {\n return (\n <>\n
\n
\n
\n

{title} {sponsorMessage ? brought to you by {sponsorMessage} : \"\"}

\n
\n
\n
\n
\n \n )\n }\n return null;\n })}\n \n );\n};\n\nComponentsRenderer.propTypes = {\n liveSlide: PropTypes.object,\n};\n\nexport default ComponentsRenderer;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Image from \"../Image\";\nimport { generateContentTypeIcon } from \"../CarouselSlide\";\nimport LoadMore from \"../LoadMore\";\nimport LiveCardCarousel from \"../LiveCardCarousel\";\nimport Mrec from '../../advertising/Mrec';\nimport {VideoProgressManager} from \"../../tenplay/pkgPlayer/vod/util/VideoProgressManager\";\n\nclass ContentGrid extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n tiles: props.tiles,\n hasMore: props.loadMoreClick,\n }\n }\n\n componentDidUpdate = (prevProps) => {\n if (prevProps.tiles != this.props.tiles) {\n this.setState({\n tiles: this.props.tiles,\n hasMore: this.props.loadMoreClick,\n })\n }\n }\n\n componentDidMount() {\n VideoProgressManager.getAllProgress().then(allProgress=>{\n this.setState({\n videoProgress: allProgress,\n });\n })\n }\n\n loadMoreTiles = async () => {\n var { tiles } = this.state;\n var data = await this.props.loadMoreClick(tiles, 10, this.props.loadMoreUrl);\n var { hasMore, items } = data;\n this.setState({\n hasMore: hasMore,\n tiles: [\n ...tiles,\n ...items,\n ],\n });\n }\n\n checkProgress = (urlCode, videoDuration) => {\n const { videoProgress } = this.state;\n let widthPercentage = 0;\n if(videoProgress && videoProgress.length > 0){\n for(let ii=0; ii < videoProgress.length; ii++) {\n if(urlCode === videoProgress[ii].videoCode) {\n const progressSeconds = videoProgress[ii].progress / 1000;\n widthPercentage = Math.round((100 / (parseInt(videoDuration) * 60)) * progressSeconds);\n } \n }\n return widthPercentage;\n }\n }\n\n render() {\n const { tiles, hasMore } = this.state;\n const { liveSlide, hasAds, isPoster } = this.props;\n const gridValue = isPoster ? 24 : 10;\n return (\n <>\n
\n { hasAds &&\n
\n \n
\n }\n {tiles.map((tile, index) => {\n let { cardImage, cardDescription, cardLink, cardTitle, contentType, tpId, urlCode, videoDuration, videoLabel } = tile;\n let currentProgress = this.checkProgress(urlCode, videoDuration);\n return (\n \n {(index == 0 && liveSlide && liveSlide.isLive) //if there's a life stream we want to add it in the first spot\n ?\n \n :\n \n
\n
\n {videoLabel && }\n \n {videoDuration && {videoDuration}}\n {generateContentTypeIcon(contentType)}\n {videoDuration && currentProgress ?\n
\n \n
\n : null\n }\n
\n
\n

{cardTitle}

\n {cardDescription &&

{cardDescription}

}\n
\n
\n
\n }\n
\n );\n })}\n
\n { (!isPoster && hasMore) && this.loadMoreTiles()} /> }\n \n );\n }\n\n}\n\nContentGrid.propTypes = {\n tiles: PropTypes.array,\n loadMoreClick: PropTypes.func,\n loadMoreUrl: PropTypes.string,\n isPoster: PropTypes.bool,\n};\n\nexport default ContentGrid;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nconst ContentNoTiles = props => {\n var { type } = props;\n return (\n <>\n
\n

There are currently no {type} for this show.

\n
\n \n );\n};\n\nContentNoTiles.propTypes = {\n tiles: PropTypes.array,\n};\n\nexport default ContentNoTiles;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nclass ContentShare extends React.Component {\n\n static propTypes = {\n display: PropTypes.string,\n date: PropTypes.string,\n title: PropTypes.string,\n description: PropTypes.string,\n facebookAppId: PropTypes.string,\n modifierClasses: PropTypes.string,\n image: PropTypes.object,\n countdown: PropTypes.string,\n };\n\n constructor(props) {\n super(props);\n this.shareFacebook = this.shareFacebook.bind(this);\n this.shareTwitter = this.shareTwitter.bind(this);\n this.sharePinterest = this.sharePinterest.bind(this);\n this.shareEmail = this.shareEmail.bind(this);\n }\n\n getShareLink = () => {\n return window.location.href;\n }\n\n dateCountdown = ( countdown ) => {\n const day = 86400000;\n let closeDate = new Date(countdown);\n let now = new Date();\n if (closeDate - now < day) {\n return `Closes today`;\n } else if (closeDate > now) {\n return `Closes in ${Math.ceil((closeDate.getTime() - now.getTime()) / day)} days`;\n } else {\n return `Competition closed`;\n }\n }\n\n shareContent(event, platform) {\n window.tenService.pageAllocator && window.tenService.pageAllocator.track(\n \"USER_SIGNIN\", \n platform,\n );\n switch (platform) {\n case \"Facebook\":\n this.shareFacebook(event); break;\n case \"Twitter\":\n this.shareTwitter(event); break;\n case \"Pinterest\":\n this.sharePinterest(event); break;\n case \"Email\":\n this.shareEmail(event); break;\n }\n }\n\n shareFacebook(event) {\n var link = this.getShareLink();\n event.preventDefault();\n var version = \"v2.3\";\n var shareLink =\n \"https://www.facebook.com/v2.3/dialog/share\"\n + \"?app_id=388074567961023\"\n + \"&display=popup\"\n + \"&target=\" + \"_blank\"\n + \"&version=\" + version\n + \"&href=\" + link\n + \"&next=\" + link\n ;\n window.open(shareLink);\n }\n\n generateBody = (title, description, maxLength = 0) => {\n let body;\n if (title) {\n body = title;\n if (description) {\n body = body + \" - \" + description;\n }\n } else if (description) {\n body = description;\n }\n body = (body || \"\").toString().trim();\n if (maxLength > 0 && body.length > maxLength) {\n return body.substring(0, maxLength)\n }\n return body;\n }\n\n shareTwitter(event) {\n var link = this.getShareLink();\n event.preventDefault();\n var { title, description } = this.props;\n var shareLink = \"https://twitter.com/intent/tweet\"\n + \"?url=\" + link\n + \"&text=\" + this.generateBody(title, description, 280);\n window.open(shareLink);\n }\n\n sharePinterest(event) {\n var link = this.getShareLink();\n event.preventDefault();\n var { title, image, description } = this.props;\n var shareLink = \"http://pinterest.com/pin/create/button/\"\n + \"?url=\" + link\n + \"&media=\" + image\n + \"&description=\" + this.generateBody(title, description);\n window.open(shareLink);\n }\n\n shareEmail(event) {\n var link = this.getShareLink();\n event.preventDefault();\n var { title, description } = this.props;\n var subject = title;\n var shareLink = \"mailto:\"\n + \"?subject=\" + subject\n + \"&body=\" + this.generateBody(title, description) + \" at \" + link;\n window.location = shareLink;\n }\n\n render() {\n var { display, date, countdown, modifierClasses } = this.props;\n return (\n <>\n
\n
\n {date && {date}}\n {countdown && {this.dateCountdown(countdown)}}\n
\n
\n
\n this.shareContent(event, \"Facebook\")}\n />\n this.shareContent(event, \"Twitter\")}\n />\n this.shareContent(event, \"Pinterest\")}\n />\n this.shareContent(event, \"Email\")}\n />\n
\n
\n
\n \n );\n }\n}\n\nexport default ContentShare;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Mrec from \"../../advertising/Mrec\";\nimport Image from \"../Image\";\nimport { generateContentTypeIcon } from \"../CarouselSlide\";\nimport LoadMore from \"../LoadMore\";\nimport ContentNoTiles from \"../ContentNoTiles\";\n\nclass ContentTiles extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n tiles: props.tiles,\n hasMore: props.loadMoreClick,\n }\n }\n\n componentDidUpdate = (prevProps) => {\n if (prevProps.tiles != this.props.tiles) {\n this.setState({\n tiles: this.props.tiles,\n })\n }\n }\n\n loadMoreTiles = async () => {\n var { tiles } = this.state;\n var data = await this.props.loadMoreClick(tiles, 9, this.props.loadMoreUrl);\n var { hasMore, items } = data;\n this.setState({\n hasMore: hasMore,\n tiles: [\n ...tiles,\n ...items,\n ],\n });\n }\n\n render() {\n\n const { type, storeScroll } = this.props;\n const { tiles, hasMore } = this.state;\n\n if (!tiles || tiles.length == 0) {\n return \n }\n\n var { hasAds } = this.props;\n return (\n <>\n
\n {hasAds &&\n
\n \n
\n }\n {tiles.map((tile, index) => {\n var { tpId, cardImage, cardDescription, cardLink, cardTitle, contentType } = tile;\n return (\n \n \n
\n
\n \n {generateContentTypeIcon(contentType)}\n
\n
\n

{cardTitle}

\n {cardDescription &&

{cardDescription}

}\n
\n
\n
\n
\n );\n })}\n \n {hasMore && this.loadMoreTiles()} />}\n \n );\n }\n\n}\n\nContentTiles.propTypes = {\n tiles: PropTypes.array,\n loadMoreClick: PropTypes.func,\n hasAds: PropTypes.bool,\n type: PropTypes.string,\n loadMoreUrl: PropTypes.string,\n};\n\nexport default ContentTiles;\n","import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\n\nclass FavoriteContent extends Component {\n static propTypes = {\n clickFavouriteHandler: PropTypes.func,\n contentType: PropTypes.string,\n isFavourite: PropTypes.bool,\n icon: PropTypes.string,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n isFavourite: props.isFavourite,\n };\n }\n\n componentDidUpdate = async (prevProps) => {\n const { isFavourite } = this.props;\n if (isFavourite != prevProps.isFavourite) {\n this.setState({\n isFavourite,\n })\n }\n }\n\n clickHandler = (event) => {\n const { clickFavouriteHandler } = this.props;\n event.preventDefault();\n clickFavouriteHandler();\n }\n\n render() {\n const {\n contentType,\n icon,\n } = this.props;\n const {\n isFavourite,\n } = this.state;\n\n return ( \n \n );\n }\n}\n\nexport default FavoriteContent;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass LoadMore extends Component {\n constructor(props) {\n super(props);\n this.state = {\n };\n }\n render() {\n return (\n

\n \n

\n );\n }\n\n onClickWrapper = (event)=> {\n window.tenService.pageAllocator && window.tenService.pageAllocator.track(\"CATEGORY_LOADMORE\");\n this.props.onClick(event);\n }\n}\n\nLoadMore.propTypes = {\n onClick: PropTypes.func,\n};\n\nexport default LoadMore;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Trending = ( props ) => {\n\n const { trendingData } = props;\n const heading = {\n text: '10 Play Trending',\n img: '/images/10-play-trending.png',\n url: '/10-play-trending',\n more: 'View All Trending',\n };\n\n return (\n
\n { heading.img ?\n

\n \n {heading.text}\n \n

\n : \n \n

{heading.text}

\n
\n }\n \n \n {heading.more}\n \n \n \n )\n}\n\nTrending.propTypes = {\n trendingData: PropTypes.array,\n heading: PropTypes.object,\n};\n\nexport default Trending;","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport {addScrollingState} from '../../Shared/Helpers';\n\nclass PageTitleBar extends Component {\n\n static propTypes = {\n name: PropTypes.string,\n showRef: PropTypes.string,\n isH2: PropTypes.bool,\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n tpId: PropTypes.string,\n isMobilePlayerStickyState: PropTypes.bool,\n logoUrl: PropTypes.string,\n };\n\n constructor(props) {\n super(props);\n this.props = props;\n this.state = {\n scrolling: false,\n }\n }\n\n componentDidMount() {\n addScrollingState(this);\n }\n\n render() {\n const { name, showRef, isH2, children, tpId, isMobilePlayerStickyState, logoUrl } = this.props;\n const { scrolling } = this.state;\n \n const PageTitleBar = (\n
\n
\n
\n {!showRef &&

{name}

}\n {showRef && \n \n {isH2 &&

{name}

}\n {!isH2 &&

{name}

}\n
}\n {children}\n {logoUrl && \"with}\n
\n
\n
\n );\n return PageTitleBar;\n }\n}\n\nexport default PageTitleBar;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass SearchForm extends Component {\n constructor(props) {\n super(props);\n }\n\n\n submitHandler = (event) => {\n let currentTerm = this.props.term;\n let newTerm = currentTerm.replace(\"#\", \"\");\n event.preventDefault();\n window.location = \"/search?query=\" + newTerm;\n }\n\n clickHandler = (event) => {\n this.submitHandler(event)\n }\n\n handleKeyDown = (event) => {\n if (event.key === 'Enter') {\n this.submitHandler(event)\n }\n }\n\n render() {\n return (\n
\n
{ this.handleKeyDown(event) }}>\n \n \n \n
\n );\n }\n}\n\nSearchForm.propTypes = {\n form: PropTypes.object,\n term: PropTypes.string,\n onChange: PropTypes.func,\n searchInputRef: PropTypes.object,\n disableBtn: PropTypes.bool,\n};\n\nexport default SearchForm;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass HighlightedText extends Component {\n constructor(props) {\n super(props);\n }\n render() {\n const { term } = this.props;\n let { text } = this.props;\n let texts = [];\n if (text && term && term.length > 2) {\n const upTerm = term.toUpperCase();\n const upText = text.toUpperCase();\n let termIndex = -1;\n var lastIndex = 0;\n while ((termIndex = upText.indexOf(upTerm, termIndex + 1)) >= 0) {\n texts.push({\n highlight: false,\n text: text.slice(lastIndex, termIndex),\n });\n texts.push({\n highlight: true,\n text: text.slice(termIndex, termIndex + upTerm.length),\n });\n lastIndex = termIndex + upTerm.length;\n }\n texts.push({\n highlight: false,\n text: text.slice(lastIndex, upText.length),\n });\n } else {\n texts.push({\n highlight: false,\n text: text,\n });\n }\n return texts.map((elem, index) => {elem.highlight ? {elem.text} : <>{elem.text}});\n }\n}\n\nHighlightedText.propTypes = {\n term: PropTypes.string,\n text: PropTypes.string,\n};\n\nexport default HighlightedText;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport HighlightedText from '../../components/HighlightedText';\nimport LinesEllipsis from 'react-lines-ellipsis';\nimport responsiveHOC from 'react-lines-ellipsis/lib/responsiveHOC'\nconst ResponsiveEllipsis = responsiveHOC()(LinesEllipsis)\nimport filter from 'lodash.filter';\nimport { showClassificationDisplay } from '../../Shared/DisplayFormatter';\nimport { generateContentTypeIcon, contentTypeEnum } from \"../CarouselSlide\";\n\nclass SearchResults extends Component {\n\n static propTypes = {\n results: PropTypes.array,\n columns: PropTypes.string,\n term: PropTypes.string,\n filter: PropTypes.string,\n currentType: PropTypes.string,\n exclude: PropTypes.array,\n genre: PropTypes.string,\n genreDisplayName: PropTypes.string,\n };\n\n constructor(props) {\n super(props);\n this.state = {};\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick(event, result, index) {\n const searchPage = window.utag_data.siteSubSection1 === 'search';\n const clickTealiumData = { \n 'call_type': 'view',\n searchTerm: this.props.term,\n searchSelectCardPosition: index+1,\n showName: result.headline,\n searchContentType:result.contentType,\n searchResultShowName:result.headline,\n searchPageName: window.utag_data.siteSection, \n }\n if(searchPage){\n const searchPageInfo = {\n filter: this.props.currentType,\n }\n Object.assign(clickTealiumData, searchPageInfo);\n }\n window.tenService.pageAllocator && window.tenService.pageAllocator.track(\"SEARCH_RESULT_CLICKED\", clickTealiumData);\n }\n\n makeResults() {\n let { results } = this.props;\n if (!results) return null;\n if (typeof this.props.filter !== 'undefined') {\n results = filter(this.props.results, { type: this.props.filter });\n }\n if (typeof this.props.genre !== 'undefined' && this.props.genre != 'All Genres') {\n results = filter(this.props.results, { genre: this.props.genre });\n }\n return results.map((result, index) => (\n
\n this.handleClick(event, result, index)} className=\"search-results__result\" data-tp={result.tpId}>\n
\n
\n {/*
*/}\n
\n \"\"\n {generateContentTypeIcon(result.contentType)}\n {result.contentType === contentTypeEnum.VIDEO && result.duration && (\n {result.duration}\n )}\n
\n
\n
\n \n \n \n {result.contentType === contentTypeEnum.SHOWS && (\n <>\n \n {\n result.episodes > 0 &&\n <>\n {result.episodes} Episodes \n
\n \n } \n {showClassificationDisplay(result.genres, result.rating, result.genreDisplayName)}\n
\n \n )}\n {result.contentType === contentTypeEnum.RECIPE && <>{result.author && Recipe by: {result.author}}}\n {result.contentType === contentTypeEnum.ARTICLE && (\n <>\n \n \n \n \n )}\n {result.contentType === contentTypeEnum.VIDEO && (\n <>\n \n \n \n \n )}\n {result.contentType === contentTypeEnum.GALLERY && (\n <>\n \n {result.images} Images\n
\n Publish date: {result.date}\n
\n \n )}\n {result.contentType === contentTypeEnum.COMPETITION && (\n <>\n \n \n \n \n )}\n {result.contentType === contentTypeEnum.CHANNEL && (\n <>\n \n \n \n \n )}\n
\n
\n
\n
\n ));\n }\n\n render() {\n let results = this.makeResults();\n return (\n
\n
{results}
\n
\n );\n }\n}\n\nexport default SearchResults;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst adSlotId = \"logo_top\"\n\nclass Sponsor extends React.Component {\n\n static propTypes = {\n className: PropTypes.string,\n adKey: PropTypes.string,\n }\n\n constructor(props) {\n super(props)\n this.state = {\n }\n }\n\n componentDidUpdate = (prevProps) => {\n if (prevProps.adKey != this.props.adKey) {\n if (window.tenService && window.tenService.ads) {\n window.tenService.ads.syncStaticAdParams();\n window.tenService.ads.reloadStaticAd(adSlotId);\n window.tenService.ads.refreshStaticAd(adSlotId);\n }\n }\n }\n\n componentDidMount() {\n if (window.tenService && window.tenService.ads) {\n window.tenService.ads.syncStaticAdParams();\n window.tenService.ads.reloadStaticAd(adSlotId);\n window.tenService.ads.refreshStaticAd(adSlotId);\n }\n }\n\n render() {\n var { className } = this.props;\n return (\n <>\n
\n \n );\n }\n}\nexport default Sponsor;\n","import React, {Component} from \"react\";\nimport AviaVodContainer from \"../AviaVodContainer/AviaVodContainer\";\nimport PropTypes from \"prop-types\";\nimport Sponsor from \"../Sponsor\";\nimport AviaLiveContainer from \"../LivePlayer\";\nimport LiveBadge from \"../../components/LiveBadge\";\nimport {format} from \"date-fns\";\nimport AnimateExpandHOC from \"../AnimateExpandHOC\";\nimport ContentShare from \"../ContentShare\";\nimport {showClassificationDisplay} from \"../../Shared/DisplayFormatter\";\nimport FavoriteContent from \"../../components/FavoriteContent\";\nimport {GeoSwitch} from \"../../Shared/Geo/geoSwitch\";\nimport {Autoplay} from \"@cbsinteractive/avia-js\";\nimport CloseX from \"../CloseX\";\nimport {NewsSocials} from \"../NewsSocials\";\n\nfunction processFloatingPlayer(el) {\n let top = el.offsetTop;\n let left = el.offsetLeft;\n let width = el.offsetWidth;\n let height = el.offsetHeight;\n\n while(el.offsetParent) {\n el = el.offsetParent;\n top += el.offsetTop;\n left += el.offsetLeft;\n }\n return (\n top < (window.pageYOffset + window.innerHeight) &&\n left < (window.pageXOffset + window.innerWidth) &&\n (top + height) > window.pageYOffset &&\n (left + width) > window.pageXOffset\n );\n}\n\nclass VideoMarquee extends Component {\n isMobilePlayerSticky = false;\n \n static propTypes = {\n isLiveTv: PropTypes.bool, // indicates that the caller is the LiveTv page - always show video, maybe hide description\n isLive: PropTypes.bool,\n mediaInfo: PropTypes.object,\n video: PropTypes.object,\n videoLiveNow: PropTypes.object,\n customChangeVideoHandler: PropTypes.func,\n containerId: PropTypes.string,\n showLink: PropTypes.string,\n facebookAppId: PropTypes.string,\n liveStreamingUnavailable: PropTypes.bool,\n isFavourite: PropTypes.bool,\n clickFavouriteHandler: PropTypes.func,\n showLiveBadge: PropTypes.bool,\n isLivePrerollDisabled: PropTypes.bool,\n isMemberGated: PropTypes.bool,\n isMobilePlayerStickyState: PropTypes.bool,\n activeChannels: PropTypes.array,\n liveChannels: PropTypes.array,\n relativeUrl: PropTypes.string,\n slateTime: PropTypes.number,\n slateUrl: PropTypes.string,\n globalSettings: PropTypes.any\n };\n\n static defaultProps = {\n showLiveBadge: false,\n }\n\n constructor(props) {\n super(props);\n this.state = {\n containerId: props.containerId || \"avia-player-show\",\n showSocialLinks: false,\n isFavourite: props.isFavourite,\n activeChannels: props.activeChannels,\n isMobileBrowser: false,\n };\n }\n\n componentDidMount() {\n const checkIfLive = document.getElementById('live-tv');\n checkIfLive && window.addEventListener(\"scroll\", this.handleScroll);\n }\n\n componentDidUpdate = async (prevProps) => {\n const { isFavourite, activeChannels } = this.props;\n if (isFavourite != prevProps.isFavourite) {\n this.setState({\n isFavourite,\n activeChannels,\n })\n }\n this.setPageTitle();\n }\n\n handleScroll = () => {\n const bounding = document.getElementById('floating-player__outer');\n if (processFloatingPlayer(bounding)) {\n document.getElementById('floating-video').classList.remove(\"floating\");\n }\n else {\n document.getElementById('floating-video').classList.add(\"floating\");\n }\n }\n\n removeSticky = () => {\n document.getElementById('floating-video').classList.remove(\"floating\");\n window.removeEventListener(\"scroll\", this.handleScroll);\n }\n\n setPageTitle = () => {\n const { video } = this.props;\n {video ? document.title = `${video.title} - Network Ten` : null}\n }\n\n shareVideo(event) {\n event.preventDefault();\n }\n\n renderPlayer = () => {\n const { mediaInfo, video, liveStreamingUnavailable, customChangeVideoHandler, isLivePrerollDisabled, isMemberGated, liveChannels, relativeUrl, slateTime, slateUrl, globalSettings, isMobileBrowser } = this.props;\n const { containerId } = this.state;\n if (liveStreamingUnavailable) {\n return (<>\n
\n

Sorry

\n

Live streaming is not available

\n
\n );\n } else if (mediaInfo) {\n return (\n \n );\n } else if (video && video.videoId) {\n return (\n \n );\n } else {\n return {\"\"};\n }\n };\n\n processMobilePlayerSticky = () => {\n const { isMobilePlayerStickyState } = this.props;\n const showVideoElements = typeof document === 'object' && typeof document.getElementsByClassName === 'function' ? document.getElementsByClassName(\"show-video\") : null;\n const showVideoElement = typeof showVideoElements?.length != 'undefined' && showVideoElements?.length === 1 ? showVideoElements[0] : null;\n if (showVideoElement != null) {\n if (isMobilePlayerStickyState) {\n if (!this.isMobilePlayerSticky) {\n this.isMobilePlayerSticky = true;\n showVideoElement.classList?.add('player-wrapper-sticky-mobile');\n }\n } else if (this.isMobilePlayerSticky) {\n this.isMobilePlayerSticky = false;\n showVideoElement.classList?.remove('player-wrapper-sticky-mobile');\n }\n }\n }\n\n render() {\n const {\n video,\n videoLiveNow,\n liveStreamingUnavailable,\n mediaInfo,\n showLink,\n facebookAppId,\n clickFavouriteHandler,\n isLiveTv,\n showLiveBadge,\n isNews,\n } = this.props;\n const {\n isFavourite,\n } = this.state;\n let airDate;\n\n if (video) {\n if (video.airDate) {\n airDate = `${format(new Date(video.airDate), \"ddd D MMM YYYY\")}`;\n } \n }\n\n const videoDetailSwitch = videoLiveNow || video;\n \n let tvRating;\n if(isLiveTv) {\n tvRating = videoDetailSwitch?.rating ? videoDetailSwitch?.rating : videoDetailSwitch?.rating;\n }else {\n tvRating = videoDetailSwitch?.programClassification ? videoDetailSwitch?.programClassification : videoDetailSwitch?.showRatingClassification;\n }\n\n if(videoDetailSwitch) {\n if (typeof window !== 'undefined' && typeof document !== 'undefined') {\n localStorage.setItem(\"currentVideoTitle\", videoDetailSwitch.title);\n }\n } \n\n var displayVideoDescription = true;\n // // hide description if in live but video is not live streamable\n if (isLiveTv && videoDetailSwitch && !videoDetailSwitch.isWebLive) { displayVideoDescription = false; }\n\n isLiveTv && this.processMobilePlayerSticky();\n \n const displayGenre = videoDetailSwitch?.genreDisplayName || videoDetailSwitch?.genre || \"\";\n\n return (\n
\n
\n
\n
\n {this.removeSticky()}} />\n
\n {this.renderPlayer()}\n
\n
\n
\n <>\n
\n {!liveStreamingUnavailable && mediaInfo && showLiveBadge && }\n \n {videoDetailSwitch &&\n <>\n {!displayVideoDescription\n ?\n <>\n

Information Unavailable

\n { isLiveTv &&\n
\n

\n There are no shows currently streaming on this channel.\n See what's coming up next in the schedule below,\n or check out what's on our other channels.\n

\n
\n }\n \n :\n <>\n

\n {videoDetailSwitch.title}\n
\n {(tvRating || displayGenre) && (\n \n {showClassificationDisplay([displayGenre], tvRating)}\n \n )}\n

\n \n \n
\n {(airDate) && (\n \n {videoDetailSwitch.memberGated && (\n <>\n Air Date: {airDate}\n \n )}\n \n )}\n

{videoDetailSwitch.description}

\n
    \n {videoDetailSwitch && videoDetailSwitch.showUrlCode &&\n
  • \n clickFavouriteHandler(videoDetailSwitch.showUrlCode)}\n icon=\"heart\"\n isFavourite={isFavourite}\n />\n
  • \n }\n {showLink && (\n
  • \n \n Watch on Demand\n \n
  • \n )}\n {isLiveTv && (\n
  • \n \n
  • \n )}\n {isNews && (\n
  • \n \n \n \n
  • \n )}\n
  • \n \n \n \n
  • \n
\n
\n \n }\n \n }\n
\n \n
\n
\n
\n
\n );\n }\n}\n\nexport default VideoMarquee;\n","import React, { Component } from \"react\";\nimport PageTitleBar from \"../PageTitleBar\";\nimport VideoMarquee from \"../VideoMarquee\";\nimport PropTypes from \"prop-types\";\nimport { getMappedGeoState, adjustVodLocation } from \"../../Shared/Helpers\";\nimport { myAccountPagesEnum } from \"../../Shared/Enums\";\nimport requiresAuthentication from \"../../Shared/AuthenticatedComponent\";\nimport { MyAccountManager } from \"../../tenplay/MyAccountManager\";\nimport ComingUpDetails from \"./ComingUpDetails\";\nimport LiveOnNowStrap from \"./LiveOnNowStrap\";\nimport LiveTvSchedule from \"./LiveTvSchedule\";\nimport {detectMobileBrowser} from \"../../Shared/Helpers/detectMobileBrowser\";\n\nclass LiveTv extends Component {\n static propTypes = {\n channel: PropTypes.string,\n channelList: PropTypes.array,\n loggedIn: PropTypes.bool,\n slateTime: PropTypes.number,\n video: PropTypes.shape({\n showId: PropTypes.number,\n title: PropTypes.string,\n description: PropTypes.string,\n nextAirDate: PropTypes.string,\n airDate: PropTypes.string,\n poster: PropTypes.string,\n urlCode: PropTypes.string,\n isLive: PropTypes.bool,\n link: PropTypes.string,\n activeChannels: PropTypes.array,\n }),\n };\n\n async componentDidMount() {\n let { channel } = this.state;\n let geoLocation = await getMappedGeoState();\n this.setState({\n location: geoLocation,\n });\n this.handleChannelSelect(channel);\n this.refreshChannels(new Date().getTime(), geoLocation);\n this.liveTvInterval = setInterval(() => { \n this.reloadLiveTv(); \n }, 1000); // run this check every second\n window.addEventListener(\"resize\", this.checkWindowWidth);\n this.checkWindowWidth();\n this.checkMobileBrowser();\n document.documentElement.style.setProperty('scroll-behavior', 'smooth');\n }\n\n constructor(props) {\n super(props);\n this.state = {\n video: null,\n details: null,\n channel: this.props.channel,\n mediaInfo: null,\n favouriteUrlCodes: [],\n schedule: [],\n isMobilePlayerStickyState: false,\n liveChannels: [],\n activeChannels: [],\n isChannelPreRollDisabled: [],\n isMobileBrowser: false,\n };\n if (typeof window !== 'undefined') {\n this.channelChangeEvent = new window.Event(\"channelChange\");\n //document.removeEventListener(\"mousedown\", this.channelChangeEvent, false); \n }\n }\n\n handleComingUpClick = (props) => {\n this.setState({\n details: props,\n });\n };\n\n closeDetailsClick = () => {\n this.setState({\n details: null,\n });\n };\n\n async refreshChannels(nowTime, location) {\n this.setState({\n lastComingUpReloadTime: nowTime,\n });\n let fetchUrl = \"/api/live-tv/\" + location;\n let resp = await fetch(fetchUrl.toLowerCase());\n let data = await resp.json();\n if (data.schedule) {\n this.setState({\n schedule: data.schedule,\n liveChannels: this.getActiveChannels(data.schedule),\n slateTime: data.slateTime,\n });\n }\n }\n\n getLivestreamData = async (channelId, location) => {\n let fetchUrl = \"/api/video/live/\" + channelId + \"/\" + location;\n let resp = await fetch(fetchUrl.toLowerCase()); // always force lowercase due to uppercase filter existing\n let data = await resp.json();\n const {channelDisplayName} = data;\n let { video } = data;\n video.channelDisplayName = channelDisplayName;\n\n await this.getUserFavourites();\n\n this.setState({\n video,\n });\n\n return data;\n }\n\n handleChannelSelect = async channelId => {\n let { location } = this.state;\n let { mediaItem, isMemberGated, channelDisplayName } = await this.getLivestreamData(channelId, adjustVodLocation(location, channelId));\n mediaItem.channelDisplayName = channelDisplayName;\n if (mediaItem) {\n this.setState({\n mediaInfo: mediaItem,\n isMemberGated: isMemberGated,\n });\n }\n\n // we must instead setup an interval to get the current playing video\n this.marqueeReloadInterval = setInterval(() => { this.reloadLivePlayingVideo(channelId, location); }, 1000) // run this check every second\n };\n\n reloadLiveTv = async () => {\n let nowTime = new Date().getTime();\n let lastDate = this.state.lastComingUpReloadTime;\n if (lastDate && ((nowTime - lastDate < 5 * 1000))) { return; } // limit to one api call per 5 seconds\n\n // dig through scheduled videos and check if we need to reload everything\n let { location, schedule } = this.state;\n let reload = false;\n if (schedule[location]) {\n let keys = Object.keys(schedule[location])\n keys.forEach(key => {\n // eslint-disable-next-line prefer-destructuring\n let value = schedule[location][key][0];\n let endTime = new Date(value.endDate);\n const milliseconds = endTime.toString()\n const endTimeMS = Date.parse(milliseconds)\n if (endTimeMS - nowTime < 0) { reload = true; }\n });\n }\n if (reload) {\n await this.refreshChannels(nowTime, location);\n }\n }\n\n reloadLivePlayingVideo = async (channelId, location) => {\n let nowDate = new Date().getTime();\n let lastDate = this.state.lastVideoMarqueeReloadTime;\n if (lastDate && ((nowDate - lastDate < 5 * 1000))) { return; } // limit to one api call per 5 seconds\n\n // check the current loaded video, see if it has 'ended' already - if so, we need to get the new video that should now be playing\n let { video } = this.state;\n let { duration, airDate } = video;\n if (duration && airDate) {\n let startDate = new Date(airDate).getTime()\n let endDate = startDate + (duration * 60 * 1000);\n let millisecondsLeft = (endDate - nowDate);\n if (millisecondsLeft < 0) {\n this.setState({\n lastVideoMarqueeReloadTime: nowDate,\n })\n await this.getLivestreamData(channelId, location);\n }\n }\n }\n\n componentDidUpdate = async (prevProps) => {\n const { loggedIn } = this.props;\n if (loggedIn != prevProps.loggedIn) {\n await this.getUserFavourites();\n if (loggedIn) {\n // url code preserved on log in attempt\n let { urlCodeToFavourite } = this.state;\n if (urlCodeToFavourite && !this.isShowFavourited(urlCodeToFavourite)) {\n await this.handleFavouriteCall(urlCodeToFavourite);\n }\n this.setState({\n urlCodeToFavourite: null,\n })\n }\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"resize\", this.checkWindowWidth);\n clearInterval(this.liveTvInterval);\n clearInterval(this.marqueeReloadInterval);\n }\n\n checkWindowWidth = () => {\n const { isMobilePlayerStickyState } = this.state;\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const mobileWidthLimit = 1024;\n const isStickyState = windowWidth < mobileWidthLimit \n && windowWidth < windowHeight\n isMobilePlayerStickyState != isStickyState && this.setState({ isMobilePlayerStickyState: isStickyState });\n }\n\n checkMobileBrowser = () => {\n const checkIfMobileBrowser = detectMobileBrowser();\n checkIfMobileBrowser && this.setState({isMobileBrowser: checkIfMobileBrowser});\n }\n\n getUserFavourites = async () => {\n const { loggedIn } = this.props;\n if (loggedIn) {\n const shows = await MyAccountManager.getUserFavouriteShows();\n this.setState({\n favouriteUrlCodes: shows,\n })\n }\n }\n\n isShowFavourited = (urlCode) => {\n let { favouriteUrlCodes } = this.state;\n return favouriteUrlCodes.includes(urlCode);\n }\n\n handleFavouriteCall = async (urlCode) => {\n let { favouriteUrlCodes } = this.state;\n if (this.isShowFavourited(urlCode)) {\n MyAccountManager.removeUserFavouriteShow(urlCode);\n let index = favouriteUrlCodes.indexOf(urlCode); // <-- Not supported in {\n //document.dispatchEvent(this.channelChangeEvent)\n }\n\n clickFavouriteHandler = async (showUrlCode) => {\n const { loggedIn } = this.props;\n if (!loggedIn) {\n MyAccountManager.openModal(myAccountPagesEnum.SIGNIN);\n // preserve url code\n this.setState({\n urlCodeToFavourite: showUrlCode,\n })\n } else {\n this.handleFavouriteCall(showUrlCode);\n }\n }\n\n getActiveChannels(schedule) {\n let activeChannels = [];\n let { location, channel } = this.state;\n\n let adjustedLocation = adjustVodLocation(location, channel);\n\n if (adjustedLocation && schedule[adjustedLocation]) {\n let data = schedule[adjustedLocation];\n // find the current item, ensure it is at the top\n let keys = Object.keys(data).sort((first, second) => {\n if (first === channel) {\n return -1;\n }\n if (second === channel) {\n return 1;\n }\n return 0;\n });\n keys.forEach(key => {\n let value = data[key];\n if (!value) {\n activeChannels.push(null); // should be a 'blank' tile\n } else {\n activeChannels.push(value);\n }\n });\n }\n this.setState({\n activeChannels: activeChannels,\n });\n\n return activeChannels;\n }\n\n render() {\n const { video, mediaInfo, isMemberGated, location, details, schedule, isMobilePlayerStickyState, liveChannels, isMobileBrowser } = this.state;\n const { channel, facebookAppId, isLivePrerollDisabled, relativeUrl, brandingLogoDarkUrl, channelGroups, slateTime, channelList, globalSettings } = this.props;\n \n let videoLiveNow;\n /* eslint-disable prefer-destructuring */\n try { videoLiveNow = schedule[location][channel][0]; } catch (err) {/* should never happen */ }\n\n\n const findSlateUrl = (channel, channelList) => {\n const channelObj = channelList.find(item => item.channelId === channel);\n return channelObj ? channelObj.slateUrl : null;\n }\n\n const slateUrl = findSlateUrl(channel, channelList);\n\n return (\n
\n \n \n \n \n \n \n
\n );\n }\n}\n\nexport default requiresAuthentication(LiveTv);","import PageBase from \"../../Shared/Scripts/PageBase\";\nimport LiveTv from \"../../Frontend/src/assets/js/components/LiveTv\";\n/* global liveTvData */\n\nclass LiveTvPage extends PageBase {\n\n registerModules() {\n super.registerModules();\n }\n\n onReady() {\n super.onReady();\n\n this.hydrateComponent(LiveTv, liveTvData, \"#live-tv\");\n }\n}\n\nexport const Page = new LiveTvPage();\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport SearchForm from '../SearchForm';\nimport SearchResults from '../SearchResults';\nimport CloseX from '../CloseX';\nimport { filterSearchInput } from '../../Shared/Helpers';\n\nconst searchData = {\n term: '',\n form: {\n placeholder: 'Search for shows, people, recipes',\n action: '/search?field',\n },\n};\n\nclass SearchOverlay extends Component {\n constructor(props) {\n super(props);\n this.props = props;\n this.state = {\n term: '',\n searchResults: [],\n searchIsEmpty: true,\n popularResults: [],\n };\n this.apiUrl = \"/api/search-overlay?term=\";\n this.trackingTimer = null;\n }\n\n performSearch = async (term) => {\n const { lastSearch, unmounted } = this.state;\n const minSearchLength = 2;\n const trackingDelay = 2000;\n \n if (term === lastSearch || term.length < minSearchLength || unmounted) {\n return;\n }\n \n const replacedTerm = term.replace(\"#\", \"\");\n this.setState({ lastSearch: replacedTerm });\n \n const fetchUrl = `${this.apiUrl}${replacedTerm}`.toLowerCase();\n let results = [];\n \n try {\n const resp = await fetch(fetchUrl);\n const data = await resp.json();\n \n if (data?.results?.length) {\n ({results} = data)\n }\n \n clearTimeout(this.trackingTimer);\n \n this.trackingTimer = setTimeout(() => {\n window.tenService?.pageAllocator?.track(\"SEARCH_COMPLETE\", {\n 'call_type': 'view',\n searchTerm: replacedTerm,\n searchCardsTotal: results.length,\n });\n }, trackingDelay);\n \n } catch (error) {\n results = [];\n }\n \n this.setState({ searchResults: results });\n };\n\n componentDidMount() {\n this.popularSearch();\n }\n\n componentWillUnmount() {\n this.unmounted = true;\n clearTimeout(this.searchDelayTimer);\n }\n\n popularSearch = async () => {\n const fetchUrl = this.apiUrl;\n let data, results;\n try {\n const res = await fetch(fetchUrl.toLowerCase());\n data = await res.json();\n if (typeof data !== \"undefined\" && typeof data.results !== \"undefined\" && Array.isArray(data.results)) {\n ({results} = data);\n } else {\n results = [];\n }\n } catch (error) {\n results = [];\n }\n this.setState({\n popularResults: results,\n });\n }\n\n updateTerm = (event) => {\n const { value: newTerm } = event.target;\n const searchTriggerLength = 6;\n const searchDelay = 1000;\n\n const updatedTerm = filterSearchInput(newTerm.replace(\"#\", \"\"));\n const searchIsEmpty = updatedTerm.length === 0;\n\n this.setState({ term: newTerm, searchIsEmpty });\n\n clearTimeout(this.trackingTimer);\n\n if (!searchIsEmpty) {\n clearTimeout(this.searchDelayTimer);\n\n if (updatedTerm.length % searchTriggerLength === 0) {\n this.performSearch(updatedTerm);\n } else {\n this.searchDelayTimer = setTimeout(this.performSearch, searchDelay, updatedTerm);\n }\n }\n };\n\n closeSearchOverlay = () => {\n clearTimeout(this.trackingTimer);\n this.props.onClick();\n }\n\n render() {\n const { searchResults, searchIsEmpty, popularResults } = this.state;\n return (\n
\n
\n
\n \n

Search

\n \n
\n
\n
\n {\n searchIsEmpty ?\n <>\n \n \n \n : searchResults.length > 0 ?\n <>\n \n \n \n : null\n }\n
\n
\n );\n }\n}\n\nSearchOverlay.propTypes = {\n onClick: PropTypes.func,\n active: PropTypes.bool,\n searchInputRef: PropTypes.object,\n searchOverlayRef: PropTypes.object,\n};\n\nexport default SearchOverlay;\n","import React, { Component } from 'react';\nimport ShowsMegaMenu from '../../components/MegaMenu/ShowsMenu';\nimport NewsMegaMenu from '../../components/MegaMenu/NewsMenu';\nimport LiveTvMegaMenu from '../../components/MegaMenu/LiveTvMenu';\nimport SearchOverlay from '../../components/SearchOverlay';\nimport debounce from 'lodash.debounce';\nimport { addScrollingState } from '../../Shared/Helpers';\nimport { myAccountPagesEnum } from '../../Shared/Enums';\nimport UserDropdown from '../../components/userDropdown';\nimport {eLocalStorage_tenUser_display as displayCacheKey} from \"../../tenplay/tenMember/jwt/enum\";\nimport requiresAuthentication from \"../../Shared/AuthenticatedComponent\";\nimport { Loading } from '../../Shared/Loading';\nimport {Geo} from \"../../tenplay/ten/geo.util\";\nimport {MyAccountManager} from \"../../tenplay/MyAccountManager\";\nimport Link from \"../Link\"\n\nclass GlobalHeader extends Component {\n constructor(props) {\n super(props);\n this.state = {\n scrolling: null,\n fixed: true,\n showSearchOverlay: false,\n showMobileMenu: false,\n showAccessLinks: false,\n showMegaMenu: false,\n activeMegaMenu: null,\n isSecondaryHubPage: false,\n scrollY: 0,\n anchored: false,\n };\n this.toggleShowMobileMenu = this.toggleShowMobileMenu.bind(this);\n this.toggleShowAccessLinks = this.toggleShowAccessLinks.bind(this);\n this.toggleActiveMegaMenu = this.toggleActiveMegaMenu.bind(this);\n this.toggleShowSearchOverlay = this.toggleShowSearchOverlay.bind(this);\n this.searchInputRef = React.createRef();\n this.menuRef = React.createRef();\n this.searchOverlayRef = React.createRef();\n }\n\n toggleShowSearchOverlay() {\n const shouldShowSearchOverlay = !this.state.showSearchOverlay;\n if (shouldShowSearchOverlay) {\n if (window && window.player && typeof window.player.disableKeyCommands === 'function') {\n window.player.disableKeyCommands(true);\n }\n if (window.tenService && window.tenService.pageAllocator && typeof window.tenService.pageAllocator.track === 'function') {\n window.tenService.pageAllocator.track(\"SEARCH_SCREEN_OPENED\", {\n 'call_type': 'view',\n });\n }\n } else {\n if (window && window.player && typeof window.player.disableKeyCommands === 'function') {\n window.player.disableKeyCommands(false);\n }\n }\n this.toggleNoScroll(shouldShowSearchOverlay);\n this.setState({\n showSearchOverlay: shouldShowSearchOverlay,\n activeMegaMenu: null,\n showMegaMenu: false,\n });\n }\n\n toggleShowMobileMenu() {\n this.setState({\n showMobileMenu: !this.state.showMobileMenu,\n });\n }\n\n hideMobileMenu() {\n this.setState({\n showMobileMenu: false,\n });\n }\n\n toggleShowAccessLinks() {\n this.setState({\n showAccessLinks: !this.state.showAccessLinks,\n activeMegaMenu: false,\n });\n }\n\n toggleNoScroll(noScroll) {\n if (noScroll) {\n this.setState({\n scrollY: window.scrollY,\n });\n window.addEventListener('keydown', this.handleEscape.bind(this));\n } else {\n window.removeEventListener('keydown', this.handleEscape.bind(this));\n }\n window.scrollTo(0, this.state.scrollY);\n }\n\n handleEscape(event) {\n if (event.keyCode === 27) {\n if (this.state.showSearchOverlay) {\n this.toggleShowSearchOverlay();\n } else if (this.state.activeMegaMenu !== null) {\n this.toggleActiveMegaMenu(null);\n }\n }\n }\n\n toggleActiveMegaMenu(activeMenu) {\n if (this.state.activeMegaMenu === activeMenu) {\n this.setState({\n activeMegaMenu: null,\n showMegaMenu: false,\n });\n } else {\n this.setState({\n showAccessLinks: false,\n activeMegaMenu: activeMenu,\n showMegaMenu: true,\n });\n }\n }\n\n componentDidUpdate = async (prevProps) => {\n if (this.state.showSearchOverlay) this.searchInputRef.current.focus();\n if(prevProps.loggedIn != this.props.loggedIn && this.props.loggedIn == true) {\n if (window.location.hash && window.location.hash!==\"#alerts\") {\n if (this.state.anchored == true) {\n return;\n } else {\n setTimeout(() => { \n location.href = window.location.hash; \n this.setState({\n anchored: true,\n });\n }, 2000);\n }\n }\n }\n }\n\n async componentDidMount() {\n /* eslint-disable @typescript-eslint/no-this-alias */\n let $this = this;\n let mobileMax = 1023;\n let resGeo;\n let checkIfSecondaryHubPage = document.body.classList.contains('hubpage--secondary');\n\n try {\n resGeo = await Geo.geolocationIpApi();\n } catch (error) {\n // in case geo api is not reachable, we treat it as a valid geo location\n resGeo = {state:'NSW', allow: true};\n }\n\n this.setState({isGeoAllowed: resGeo.allow});\n\n try {\n if(window.location.hash && window.location.hash==\"#alerts\") {\n this.triggerPushNotifications();\n } else if (window.location.hash && window.location.hash!==\"#alerts\") {\n setTimeout(function(){ \n location.href = window.location.hash; \n }, 2000);\n }\n } catch (error) {\n console.log(error);\n }\n\n try {\n if(window.location.href.indexOf(\"alerts=\") > 0) {\n this.triggerPushNotifications();\n }\n } catch (error) {\n console.log(error);\n }\n\n try {\n if(window.location.href.indexOf(\"watchlist=\") > 0) {\n const queryString = window.location.search;\n const urlParams = new URLSearchParams(queryString);\n const watchListValue = urlParams.get('watchlist');\n this.checkWatchlist(watchListValue);\n }\n } catch (error) {\n console.log(error)\n }\n\n if(checkIfSecondaryHubPage) {\n this.setState({isSecondaryHubPage: true});\n }\n\n \n addScrollingState(this);\n var scroll = debounce(\n () => {\n let currentScrollPos = window.pageYOffset;\n if (currentScrollPos > 76) {\n $this.setState({\n fixed: false,\n });\n } else {\n $this.setState({\n fixed: true,\n scrolling: false,\n });\n }\n },\n 50,\n {\n leading: true,\n trailing: true,\n },\n );\n\n document.addEventListener('scroll', function () {\n scroll();\n });\n scroll();\n\n // add resize state functions\n var resize = debounce(\n function () {\n let { clientWidth } = document.documentElement;\n if (clientWidth > mobileMax && $this.state.showMobileMenu) {\n $this.setState({\n showMobileMenu: false,\n activeMegaMenu: '',\n });\n }\n document.documentElement.style.setProperty('--scrollbarwidth', window.innerWidth - clientWidth + 'px');\n document.documentElement.style.setProperty('--screenwidth', clientWidth + 'px');\n },\n 50,\n {\n leading: true,\n trailing: true,\n },\n );\n\n window.addEventListener('resize', function () {\n resize();\n });\n resize();\n }\n\n checkWatchlist = (watchListValue) => {\n if (this.props.loggedIn) {\n setTimeout(() => {\n MyAccountManager.addUserFavouriteShow(watchListValue);\n }, 2000)\n } else {\n MyAccountManager.openModal(myAccountPagesEnum.SIGNIN);\n }\n }\n\n triggerPushNotifications = () => {\n if (Notification.permission !== \"denied\") {\n console.log('firing push permission');\n setTimeout(function(){ \n window.appboy.registerAppboyPushMessages();\n }, 2000);\n } else {\n console.log('Push Notifications are disabled on this browser');\n }\n }\n\n signUpHandler = event => {\n this.hideMobileMenu();\n event.preventDefault();\n if (this.state.isGeoAllowed === false) {\n return;\n } else {\n MyAccountManager.openModal(myAccountPagesEnum.SIGNUP);\n }\n };\n\n signInHandler = event => {\n this.hideMobileMenu();\n event.preventDefault();\n if (this.state.isGeoAllowed === false) {\n return;\n } else {\n MyAccountManager.openModal(myAccountPagesEnum.SIGNIN);\n }\n };\n\n signOutHandler = event => {\n this.hideMobileMenu();\n event.preventDefault();\n MyAccountManager.logoutHandler();\n };\n setActivationLocation = () => {\n const location = window.utag_data.siteSection || window.utag_data.siteSubSection1 \n localStorage.setItem('activationLocation', location.toLowerCase());\n }\n\n getUserDropdown = (userDisplay) => {\n \n const pPlusHambBanner = () => {\n return (\n
  • \n
    \n \n \n \n
    \n
    \n

    7 DAY FREE TRIAL*

    \n
    \n
    \n \n TRY\"Try\n \n
    \n
    \n \n \n \n
    \n
    \n

    *Free trial available to new subscribers only.
    Membership renews at $9.99/month.

    \n
    \n
  • \n )\n }\n\n return (\n this.props.loggedIn ? (\n <>\n
  • \n \n Activate My TV\n \n
  • \n
  • \n this.signOutHandler(event)}/>\n \n \n {userDisplay}\n \n \n My TV\n \n \n
  • \n {pPlusHambBanner()}\n
  • \n this.signOutHandler(event)}>\n Sign Out\n \n
  • \n \n ) : (\n <>\n
  • \n \n Activate My TV\n \n
  • \n
  • \n \n {\n localStorage.setItem('SignUpLeadSource', 'nav');\n return this.signInHandler(event);\n }\n }\n >\n \n Sign In\n \n \n \n \n
  • \n {pPlusHambBanner()}\n \n )\n );\n }\n\n render() {\n let { isHubPage, isShowPage, isDefaultPage, isHomePage, userData } = this.props;\n let { isSecondaryHubPage } = this.state;\n let headerClass = '';\n if (isHubPage) {\n if(isSecondaryHubPage) {\n headerClass = ' global-header--default-page';\n } else {\n headerClass = ' global-header--hub-page global-header--home-page';\n }\n }\n if (isShowPage) {\n headerClass = ' global-header--show-page';\n }\n if (isDefaultPage) {\n headerClass = ' global-header--default-page';\n }\n if (isHomePage) {\n headerClass = ' global-header--home-page';\n }\n\n let userDisplay;\n if (userData) {\n let firstName = localStorage.getItem('tu_firstname');\n var email = userData[displayCacheKey.tu_email];\n if (firstName && firstName != \"undefined\" && typeof firstName != \"undefined\") {\n userDisplay = \"Hi \" + firstName;\n } else if(email && email != \"undefined\" && typeof email != \"undefined\") {\n userDisplay = email;\n } else {\n userDisplay = \"10play Member\";\n }\n }\n\n if (this.state.showSearchOverlay) {\n this.overlayCreated = true;\n }\n \n return (\n <>\n
    \n
    \n

    \n \n
    \n \n

    \n \n \n \n \n
    \n
    \n \n
    \n
    \n \n {\n this.overlayCreated ?\n : \"\"\n }\n \n );\n }\n}\n\nexport default requiresAuthentication(GlobalHeader);\n","import \"core-js/es/symbol\";\nimport \"core-js/features/symbol/iterator\";\nimport \"core-js/features/object/assign\";\nimport \"core-js/features/array/for-each\";\nimport \"whatwg-fetch\";\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport GlobalHeader from \"../../Frontend/src/assets/js/components/GlobalHeader\";\nimport Carousel from \"../../Frontend/src/assets/js/components/Carousel\";\nimport ContentTiles from \"../../Frontend/src/assets/js/components/ContentTiles\";\nimport ContentGrid from \"../../Frontend/src/assets/js/components/ContentGrid\";\nimport DisplayBanner from \"../../Frontend/src/assets/js/components/DisplayBanner\";\nimport {loadMoreClick} from \"../../Frontend/src/assets/js/components/ComponentsRenderer\";\nimport {addAdhesionDom} from \"../../Frontend/src/assets/js/tenplay/tenAds/util.adhesion\";\nimport {AdManager} from \"../../Frontend/src/assets/js/tenplay/tenAds/adManager\";\nimport {env} from \"../../Frontend/src/assets/js/tenplay/ten/cust.env\";\nimport {TenplayPageAllocator} from \"../../Frontend/src/assets/js/tenplay/tenTrack/allocatorPage\";\nimport {TrackJS} from \"trackjs\";\nimport {baseCustEnv} from \"../../Frontend/src/assets/js/tenplay/ten/cust.env.base\";\nimport {MyAccountManager} from \"../../Frontend/src/assets/js/tenplay/MyAccountManager\";\nimport { tenTrack } from '../../Frontend/src/assets/js/tenplay/tenTrack/track.init';\n// eslint-disable-next-line camelcase\nimport { tvid_callback } from '../../Frontend/src/assets/js/tenplay/tenTrack/telaria'\nimport { myAccountPagesEnum } from \"../../Frontend/src/assets/js/Shared/Enums\";\nimport { IMSAPIIntegration } from \"../../Frontend/src/assets/js/tenplay/tenAds/freeWheelManager\";\n/* global headerData */\n/* global carouselData */\n\nexport const DEVICETYPE_DESKTOP = \"Desktop\";\nexport const DEVICETYPE_MOBILE = \"Mobile\";\nexport const DEVICETYPE_TABLET = \"Tablet\";\n\n/**\n * A base class that all other page classes derive from. It features functionality that is common across all pages.\n */\nexport default class PageBase {\n\n /**\n * Constructor that sets default values and adds the navigation bar to the page.\n */\n constructor() {\n this.amfOnloadCalled = false;\n this.isReady = false;\n this.isLoaded = false;\n this.hasInit = false;\n this.gdpr = false;\n this.adsDisabled = false;\n this.adsLoaded = false;\n this.modules = [];\n this.renderInterval = undefined;\n this.imsAPI = new IMSAPIIntegration('https://fms.viacomcbs.digital');\n this.addIMSCacheEventListeners();\n\n window.tenService = window.tenService || {};\n\n if (typeof headerData != \"undefined\") {\n this.hydrateComponent(GlobalHeader, headerData, \"#nav\");\n }\n\n // there will be multiple carousels to load, all contained within this carouselData object as indexes\n if (typeof carouselData != \"undefined\") {\n for (var id in carouselData) {\n if (!Object.prototype.hasOwnProperty.call(carouselData, id))\n continue;\n\n if (carouselData[id].type === \"Grid\") {\n if (carouselData[id].hasMore)\n carouselData[id].loadMoreClick = loadMoreClick;\n this.renderComponent(ContentGrid, carouselData[id], `#carousel_${id}`);\n }\n else if (carouselData[id].type === \"CollectionTile\") {\n if (carouselData[id].hasMore)\n carouselData[id].loadMoreClick = loadMoreClick;\n this.renderComponent(ContentTiles, carouselData[id], `#carousel_${id}`);\n }\n else if (carouselData[id].type === \"DisplayBanner\") {\n if (carouselData[id].hasMore)\n carouselData[id].loadMoreClick = loadMoreClick;\n this.renderComponent(DisplayBanner, carouselData[id], `#carousel_${id}`);\n }\n else\n this.renderComponent(Carousel, carouselData[id], `#carousel_${id}`);\n }\n }\n }\n\n hydrateComponent(componentType, data, selector) {\n var domElement = document.querySelector(selector);\n if (domElement && typeof data != \"undefined\") {\n ReactDOM.hydrate(\n React.createElement(componentType, data),\n domElement,\n );\n }\n }\n\n renderComponent(componentType, data, selector) {\n var domElement = document.querySelector(selector);\n if (domElement && typeof data != \"undefined\") {\n ReactDOM.render(\n React.createElement(componentType, data),\n domElement,\n );\n }\n }\n\n /**\n * Initialisation function to setup the page.\n */\n init() {\n // eslint-disable-next-line camelcase\n window.tvid_callback = tvid_callback\n window.tenService.pageAllocator = new TenplayPageAllocator();\n window.tenService.pageAllocator.track(\"PAGE_VIEW\");\n window.tenService.tenTrack = tenTrack;\n window.tenService.ads = new AdManager(env.adsServiceConfig);\n if (!this.adsDisabled) {\n window.tenService.ads.initVideoAd();\n }\n window.statusReadyValidator.statusUpdate(\"ads\", \"adManager\", true);\n // initStaticAd() at the end of onReady event\n\n this.determineDeviceType();\n this.registerModules();\n this.registerEventHandlers();\n\n const hashValue = window.location.hash;\n if (hashValue === '#signup' || hashValue === '#signin') {\n if (hashValue === '#signin') {\n const signInEvent = new CustomEvent('onSignIn', { detail: { message: 'Open Sign In' } });\n window.dispatchEvent(signInEvent);\n } else {\n const signUpEvent = new CustomEvent('onSignUp', { detail: { message: 'Open Sign Up' } });\n window.dispatchEvent(signUpEvent);\n }\n }\n\n this.hasInit = true;\n document.body.classList.add(\"pageInitiated\");\n\n MyAccountManager.pageLoadCompleted();\n }\n\n renderAdSlots() {\n // todo replace this with watchable\n if (this.renderInterval) {\n clearInterval(this.renderInterval);\n delete this.renderInterval;\n }\n this.renderInterval = setInterval(()=> {\n if (window.tenService.ads && window.tenService.ads.couldDisplayAd) {\n clearInterval(this.renderInterval);\n delete this.renderInterval;\n window.tenService.ads.renderAdSlots();\n }\n }, 50);\n }\n\n /**\n * A function to add a module to the list of modules used by the page.\n * If a trigger for the module has already fire, the new module will fire that trigger.\n * @param newModule A module to add\n */\n addModule(newModule) {\n if (newModule.disabled || (this.gdpr && !newModule.adheresToGdpr))\n return;\n\n this.modules.push(newModule);\n\n if (this.isLoaded) {\n newModule.onWindowLoad();\n }\n\n if (this.isReady) {\n newModule.onReady();\n }\n }\n\n /**\n * Determine the type of device being used (desktop, tablet, mobile) and store the result for later use.\n */\n determineDeviceType() {\n this.windowWidth = window.innerWidth;\n\n this.deviceType = DEVICETYPE_DESKTOP;\n if (this.windowWidth <= 590)\n this.deviceType = DEVICETYPE_MOBILE;\n else if (this.windowWidth <= 1024)\n this.deviceType = DEVICETYPE_TABLET;\n }\n\n /**\n * Mark the page as requiring adherence to GDPR rules. Ads are also disabled.\n * Must be called before the pages \"init\" function is called.\n */\n gdpr() {\n if (this.hasInit)\n throw \"Call to GDPR after page already initialised.\";\n\n this.gdpr = true;\n this.adsDisabled = true;\n }\n\n /**\n * Identifies if the page is being displayed on a mobile device.\n * @returns {boolean} True if the page is being displayed on a mobile device. False otherwise.\n */\n get isMobile() {\n return this.deviceType === DEVICETYPE_MOBILE;\n }\n\n /**\n * Mark the page as having ads disabled.\n * Must be called before the pages \"init\" function is called.\n */\n noAds() {\n if (this.hasInit)\n throw \"Call to NoAds after page already initialised.\";\n\n this.adsDisabled = true;\n }\n\n /**\n * Adds the modules relevant to the page.\n */\n registerModules() {\n // do nothing\n }\n\n /**\n * Register a video player as being displayed on the page.\n * @param _players\n */\n registerPlayers(..._players) {\n // do nothing\n }\n\n /**\n * A function that gets run when the ready event fires.\n * @param eventArgs\n */\n onReady(eventArgs) {\n for (const module of this.modules) {\n module.onReady(eventArgs);\n }\n\n this.isReady = true;\n\n // todo\n // \"homebase\" componnent onReady called hydrateComponent that rerender elements,\n // which will remove all dynamically added ad elements if ad initiation is done before homebase onReady,\n // so need to add a timeout, expecting proper improvements\n setTimeout(()=>{\n if (!this.adsDisabled) {\n document.querySelector(\"#live-tv\") === null && addAdhesionDom();\n window.tenService.ads.initStaticAd();\n this.adsLoaded = true;\n window.statusReadyValidator.statusUpdate(\"ads\", \"adhesion\", true);\n }\n })\n }\n\n /**\n * A function that gets run when the window load event fires.\n * @param eventArgs\n */\n onWindowLoad(eventArgs) {\n for (const module of this.modules) {\n module.onWindowLoad(eventArgs);\n }\n\n this.isLoaded = true;\n }\n\n /**\n * A function that gets run when the window resize event fires.\n * @param eventArgs\n */\n onWindowResize(eventArgs) {\n for (const module of this.modules) {\n module.onWindowResize(eventArgs);\n }\n }\n\n /**\n * A function that gets run when the window scroll event fires.\n * @param eventArgs\n */\n onWindowScroll(eventArgs) {\n for (const module of this.modules) {\n module.onWindowScroll(eventArgs);\n }\n }\n\n /**\n * Registers event handlers that link to the relevant on[Event] functions on the page class.\n * @private\n */\n registerEventHandlers() {\n this.onReady();\n /* eslint-disable @typescript-eslint/no-this-alias */\n let scope = this;\n window.addEventListener('load', function () {\n scope.onWindowLoad();\n });\n window.addEventListener('resize', function () {\n scope.onWindowResize();\n });\n window.addEventListener('scroll', function () {\n scope.onWindowScroll();\n });\n }\n\n addIMSCacheEventListeners() {\n window.addEventListener('userLogin', async (event) => {\n this.imsAPI.invalidateCache();\n this.imsAPI.logFreewheelDebug('Received userLogin event:', event);\n });\n\n window.addEventListener('userLogout', (event) => {\n this.imsAPI.invalidateCache();\n this.imsAPI.logFreewheelDebug('Received userLogout event:', event);\n });\n }\n\n\n\n /**\n * Adds a CSS class to the leaderboard to make the leaderboard stick for a period of 10 seconds.\n * @param stickyLeaderboardSelector A selector that identifies the leaderboard element.\n */\n static stickyLeaderboard(stickyLeaderboardSelector) {\n let leaderboardAdWrapper = document.querySelector(stickyLeaderboardSelector);\n if (leaderboardAdWrapper === null) {\n return;\n }\n\n leaderboardAdWrapper.classList.add(\"sticky\");\n\n setTimeout(function () {\n leaderboardAdWrapper.classList.remove(\"sticky\");\n }, 1000 * 10)\n }\n}\n\n// to avoid introducing multi trackjs instance if this PageBase is included in multi js bunles that all loaded in same page\nwindow.TrackJS = window.TrackJS || TrackJS;\nwindow.TrackJS.install({\n token: \"3b9645b355bd45e3a6dc2a215b42ee12\",\n application: baseCustEnv.isProduction() ? \"10play-prod\" : \"10play-staging\",\n onError: function(payload){\n if(payload.message.indexOf('403 Forbidden: GET https://edge.api.brightcove.com/') > -1){\n payload.message = \"403 Forbidden: GET https://edge.api.brightcove.com/playback/v1/accounts/2199827728001/videos/...\";\n }\n return true;\n },\n});\n\n\n\nwindow.addEventListener('onSignIn', function() {\n MyAccountManager.openModal(myAccountPagesEnum.SIGNIN);\n});\n\nwindow.addEventListener('onSignUp', function() {\n MyAccountManager.openModal(myAccountPagesEnum.SIGNUP);\n});\n","import React, {Component} from 'react';\n/* eslint-disable camelcase */\nimport {eLocalStorage_tenUser_backend} from \"../../tenplay/tenMember/jwt/enum\";\nimport {Geo} from \"../../tenplay/ten/geo.util\";\n\ninterface iGeoSwitchState {\n state: string,\n fetched: boolean,\n changed: boolean,\n redirectToFAQ: boolean,\n}\n\ninterface iGeoSwitchProps {\n className: string,\n}\n\nexport class GeoSwitch extends Component {\n public state: iGeoSwitchState;\n\n constructor(props) {\n super(props);\n\n this.state = {\n state: undefined,\n fetched: false,\n changed: false,\n redirectToFAQ: false,\n };\n\n Geo.geolocation().then((location) => {\n this.setState({\n state: location,\n })\n });\n\n isGeoLocationDeclined().then((isDeclined: boolean) => {\n this.setState({\n redirectToFAQ: isDeclined,\n })\n })\n }\n\n render() {\n if (isGeoLocationSupported() === false) {\n return null;\n }\n\n const {state, fetched, changed} = this.state;\n\n if (state === undefined) {\n return null;\n }\n\n let message;\n if (fetched) {\n if (changed) {\n message = `Switched To ${state}`;\n } else {\n message = `In ${state}`;\n }\n } else {\n message = `Not In ${state}?`;\n }\n\n return (\n <>\n {\n this.state.redirectToFAQ ?\n \n \n Cannot verify Location?\n \n :\n \n }\n \n );\n }\n\n fetchState = async () => {\n let newState;\n\n const coord: {\n latitude: number,\n longitude: number,\n } = await fetchGeoFromBrowser() as any;\n if (typeof coord !== \"object\") {\n // show geo guide - why need it; how to manually enable it after rejected;\n this.setState({redirectToFAQ: true});\n return;\n }\n\n // if get permission & coord returned\n newState = geoStateLocalValidate(coord.latitude);\n\n if (Geo.isAuState(newState) === false || newState === Geo.eState.NSW) {\n // state is unclear, check in fastly API\n newState = await geoStateOnlineValidate(coord);\n }\n\n if (newState === undefined || this.state.state === newState) {\n this.setState({\n fetched: true,\n })\n } else {\n // update cache\n /* eslint-disable camelcase */\n localStorage.setItem(eLocalStorage_tenUser_backend.tu_geo, newState);\n\n // play new state live channel\n this.setState({\n state: newState,\n fetched: true,\n changed: true,\n });\n\n location.reload();\n }\n }\n}\n\nfunction isGeoLocationSupported() {\n return typeof window !== \"undefined\" && typeof window.navigator.geolocation === \"object\" &&\n typeof window.navigator.geolocation.getCurrentPosition === \"function\";\n}\n\nfunction isGeoLocationDeclined() {\n return new Promise((resolve, reject) => {\n if (navigator.permissions) {\n navigator.permissions.query({name: 'geolocation'}).then(function (result) {\n resolve(result.state === \"denied\");\n });\n } else {\n reject();\n }\n })\n}\n\n/**\n * Trigger browser getlocation to receive user coord latitude & longitude;\n * Then send the coord to fastly geo API to varify user location;\n */\nasync function fetchGeoFromBrowser() {\n return new Promise((resolve: any) => {\n if (typeof window === \"undefined\") {\n resolve();\n }\n\n window.navigator.geolocation.getCurrentPosition(\n (position) => {\n resolve(position.coords);\n },\n () => {\n /*\n * error object:\n * code: 1\n * message: \"User denied Geolocation\"\n * */\n resolve();\n }\n );\n\n // todo - some browser might not trigger errorCallback depends on how user reject\n\n });\n}\n\n/**\n * This method should give accurate enough state based on coord for state WA, NT, SA, QLD;\n * If it returns NSW, then need to forward coord to fastly API to get more accurate state;\n * This method's main purpose is to reduce hit to fastly geo API\n */\nfunction geoStateLocalValidate(latitude) {\n let state;\n switch (new Date().getTimezoneOffset()) {\n case -480:\n state = Geo.eState.WA;\n break;\n case -570:\n if (latitude === null) {\n state = undefined;\n } else if (latitude > -26) {\n state = Geo.eState.NT;\n } else {\n state = Geo.eState.SA;\n }\n break;\n case -600:\n if (latitude === null) {\n state = undefined;\n } else if (latitude > -29) {\n state = Geo.eState.QLD;\n } else {\n state = Geo.eState.NSW;\n }\n break;\n case -630:\n state = Geo.eState.SA;\n break;\n case -660:\n state = Geo.eState.NSW;\n break;\n default:\n state = undefined;\n }\n return state;\n}\n\n/**\n *\n * @returns {Promise<*>}\n */\nasync function geoStateOnlineValidate(coord) {\n const req = `/geocoder?` +\n `&latlng=${coord.latitude},${coord.longitude}`;\n\n return new Promise((resolve: any) => {\n fetch(req)\n .then(res => res.json())\n .then(location => {\n try {\n const [detail] = location.results;\n const state = detail.address_components[0].short_name;\n resolve(state);\n } catch (err) {\n console.error(\"Failed processing state result data\");\n resolve();\n }\n });\n })\n}\n","import React from 'react';\nimport Slider, {Settings} from 'react-slick';\n\nimport {CarouselBaseScrollBoosterWrapper, iCarouselBaseScrollBoosterWrapperProps, iCarouselBaseScrollBoosterWrapperState} from \"../../components/CarouselBaseScrollBoosterWrapper\";\n\ninterface IC06Props extends iCarouselBaseScrollBoosterWrapperProps {\n adKey?: string | undefined;\n position?: number;\n}\n\ninterface IC6State extends iCarouselBaseScrollBoosterWrapperState {\n adElements: Array,\n adElementFilled: number,\n}\n\nclass C06 extends CarouselBaseScrollBoosterWrapper {\n numberOfSlide: number;\n carouselContainer: React.RefObject;\n sliderRef: any;\n slidesAdElementFilled: number;\n slidesAdElement: Array;\n settings: Settings = defaultSettings();\n props: IC06Props;\n constructor(props: IC06Props) {\n super((()=>{\n // todo parent class needs settings in constructor but c06 do not receive setting from outside. this might have side effect if we want to dynamically update props.\n return Object.assign({settings: defaultSettings()}, props);\n })());\n this.numberOfSlide = 10;\n this.carouselContainer = React.createRef();\n this.sliderRef = React.createRef() || null;\n this.updateSettings();\n this.slidesAdElementFilled = 0;\n this.slidesAdElement = [...Array(this.numberOfSlide)];\n this.state = {\n adElements: this.slidesAdElement,\n adElementFilled: this.slidesAdElementFilled,\n };\n }\n\n render() {\n const style = {\n display: this.state.adElementFilled ? \"block\" : \"none\",\n };\n\n return (\n <>\n
    \n
    \n
    \n
    \n

    Featured Content

    \n
    \n
    \n \n {this.generateSlides().filter((slide, ind) =>{\n return this.slidesAdElement[ind] !== null;\n })}\n \n
    \n
    \n
    \n
    \n \n );\n }\n\n componentDidUpdate = (prevProps) => {\n const ads = this.slidesAdElement.map((adElement, ind)=>{\n return \"feature_\" + (ind + 1);\n })\n if (prevProps.adKey != this.props.adKey) {\n if (window.tenService && window.tenService.ads) {\n ads.forEach((adSlotId)=>{\n window.tenService.ads.syncStaticAdParams();\n window.tenService.ads.reloadStaticAd(adSlotId);\n window.tenService.ads.refreshStaticAd(adSlotId);\n window.tenService.ads.pageSwitchRefresh(adSlotId);\n \n })\n }\n }\n }\n\n componentDidMount() {\n this.slider = this.sliderRef.current;\n super.componentDidMount && super.componentDidMount();\n }\n\n generateSlides() {\n return this.slidesAdElement.map((adElement, ind)=>{\n const adSlotId = \"feature_\" + (ind + 1);\n return ();\n });\n }\n\n updateState = (index, element) => {\n this.slidesAdElement[index] = element;\n this.slidesAdElementFilled += element ? 1: 0;\n\n const waitingSlots = this.slidesAdElement.filter(adElement=> {\n return adElement === undefined; // not responded ad will be undefined; empty is null;\n }).length;\n\n if (waitingSlots === 0) {\n this.setState({\n adElements: this.slidesAdElement,\n adElementFilled: this.slidesAdElementFilled,\n });\n\n this.slidesAdElementFilled = 0;\n }\n };\n\n updateSettings = ()=>{\n this.settings = this.props.settings;\n this.settings.prevArrow = ;\n this.settings.nextArrow = ;\n\n const {afterChange} = this.settings;\n this.settings.afterChange = (currentSlideIndex) => {\n afterChange && afterChange(currentSlideIndex);\n\n const {length} = this.slidesAdElement.filter(adElement=>{\n return adElement !== null;\n });\n\n setTimeout(() => {\n try {\n const currentSlideToShow = this.slider.innerSlider.props.slidesToShow;\n if (currentSlideToShow > 0) {\n if (currentSlideIndex > length - currentSlideToShow) {\n this.slider.slickGoTo(length - currentSlideToShow);\n }\n }\n } catch(error) {\n // console.error(\"Could not get inner slide setting\");\n }\n }, 10)\n };\n };\n}\n\n/**\n * C06 slide component\n */\n\ntype C06SlideProps = {\n slideIndex: number,\n adElement: Node,\n updateState: (index:number, element:any) => void,\n adSlotId: string,\n adKey: string | undefined,\n};\n\nclass C06Slide extends React.Component {\n slide: React.RefObject;\n containerSlide: HTMLDivElement;\n constructor(props) {\n super(props);\n this.slide = React.createRef();\n }\n \n render() {\n const ind = this.props.slideIndex;\n return (\n
    event.preventDefault()} className={`c06 c${ind} content__item`} key={`c06_card_${ind}`}>\n
    \n {!this.props.adElement && this.getPlaceHolder()}\n
    \n
    \n )\n }\n\n componentDidMount() {\n this.watchingAdCall();\n const { adSlotId } = this.props;\n if (window.tenService && window.tenService.ads) {\n window.tenService.ads.reloadStaticAd(adSlotId);\n window.tenService.ads.refreshStaticAd(adSlotId);\n }\n }\n\n componentDidUpdate(prevProps) {\n this.containerSlide !== this.slide.current && this.watchingAdCall();\n this.props.adElement && this.slide.current.appendChild(this.props.adElement);\n if (prevProps.adKey != this.props.adKey) {\n const { adSlotId } = this.props;\n\n if (window.tenService && window.tenService.ads) {\n window.tenService.ads.reloadStaticAd(adSlotId);\n window.tenService.ads.refreshStaticAd(adSlotId);\n }\n }\n }\n\n getPlaceHolder() {\n return (
    \n
    \n \"loading\"/\n
    \n
    \n

    Loading

    \n
    \n
    \n
    );\n }\n\n watchingAdCall() {\n this.containerSlide = this.slide.current;\n const {containerSlide} = this;\n\n containerSlide && containerSlide.addEventListener(\"adLoadEvent\", () => {\n // console.log(\"get real ad\", this.props.adSlotId);\n this.props.updateState(this.props.slideIndex, containerSlide.querySelector(\".tenads\"));\n });\n containerSlide && containerSlide.addEventListener(\"adBlankEvent\", () => {\n // console.log(\"get empty ad\", this.props.adSlotId);\n this.props.updateState(this.props.slideIndex, null);\n });\n }\n}\n\n\n/**\n * default setting\n */\nfunction defaultSettings() {\n return {\n slidesToShow: 5,\n slidesToScroll: 1,\n arrows: true,\n infinite: false,\n mobileFirst: true,\n cssEase: 'ease-out',\n swipeToSlide: true,\n touchThreshold: 75,\n useTransform: false,\n pauseOnFocus: true,\n pauseOnHover: true,\n className: 'content__feed',\n variableWidth: false,\n responsive: [\n {\n breakpoint: 640,\n settings: {\n slidesToShow: 1.5,\n slidesToScroll: 1,\n arrows: false,\n },\n },\n {\n breakpoint: 1023,\n settings: {\n slidesToShow: 3.4,\n slidesToScroll: 1,\n arrows: false,\n },\n },\n ],\n }\n}\n\n\n/**\n * custom arrow function\n */\n\ninterface SampleArrowProps {\n currentSlide?: number,\n slideCount?: number,\n sliderRef?: any,\n}\n\nfunction SamplePrevArrow(props: SampleArrowProps) {\n const {sliderRef } = props;\n return (\n \n
    \n \n \n );\n};\n\nexport default LogIn;\n","import React from 'react';\nimport { VodCtrl } from '../../tenplay/pkgPlayer/index';\nimport { iAviaVodContainerProps } from './AviaVodContainer';\n\nconst VodCtrlClient: React.FC = ({\n playerId,\n autoplay,\n video,\n videoChangeHandler,\n globalSettings\n}) => (\n \n);\n\nexport default VodCtrlClient;\n","export const getNextVideos = async (urlCode) => {\n const fetchUrl = `/api/next-videos/${urlCode}`;\n const resp = await fetch(fetchUrl);\n const data = await resp.json(); // array of videos\n return data;\n};\n\nexport const loadVideo = async (urlCode, destinationUrl = null) => {\n const fetchUrl = `/api/video/${urlCode}`;\n const resp = await fetch(fetchUrl);\n const data = await resp.json();\n const {video} = data;\n\n if (!destinationUrl) {\n destinationUrl = video.link;\n }\n\n history.pushState(\n {\n video: video,\n type: 'changeVideo',\n },\n '',\n destinationUrl + window.location.search,\n );\n\n // metaData &&\n // Object.keys(metaData).forEach((key) => {\n // window.TealiumData[key] = metaData[key];\n // window.utag_data[key] = metaData[key];\n // });\n // window.tenService.pageAllocator &&\n // window.tenService.pageAllocator.track('CHANGE_VIDEO');\n\n // move window to top\n};\n","import React, { ComponentType, Component } from 'react';\n\ninterface WithSuspenseState {\n LoadedComponent: ComponentType | null;\n}\n\nconst withSuspenseVod =

    (importComponent: () => Promise<{ default: ComponentType

    }>) => {\n class WithSuspense extends Component {\n constructor(props: P) {\n super(props);\n this.state = {\n LoadedComponent: null\n };\n }\n\n async componentDidMount() {\n const { default: LoadedComponent } = await importComponent();\n this.setState({ LoadedComponent });\n }\n\n render() {\n const { LoadedComponent } = this.state;\n return LoadedComponent ? :

    Loading...
    ;\n }\n }\n\n return WithSuspense;\n};\n\nexport default withSuspenseVod;\n","import React, { Component } from 'react';\nimport CarouselBase from '../CarouselBase';\nimport {eCarouselType, iCarouselProps} from \"./type\";\nimport {iSlideSetting} from \"../CarouselBase/type\";\n\nclass Carousel extends Component {\n protected carouselContainer;\n protected settings;\n \n constructor(props) {\n super(props);\n this.carouselContainer = React.createRef();\n this.settings = this.initSettings(props);\n }\n \n initSettings(props) {\n const settings = props.settingsOverride || defaultSettings();\n\n if (this.props.carouselType === eCarouselType.SHOWS) {\n settings.slidesToShow = 6;\n settings.slidesToScroll = 1;\n settings.responsive = [\n {\n breakpoint: 767,\n settings: {\n slidesToShow: 2.4,\n arrows: false,\n },\n },\n {\n breakpoint: 1023,\n settings: {\n slidesToShow: 6.5,\n arrows: false,\n },\n },\n ];\n } else if (this.props.carouselType === eCarouselType.SQUARE) {\n settings.slidesToShow = 5;\n settings.slidesToScroll = 1;\n settings.variableWidth = false;\n settings.responsive = [\n {\n breakpoint: 767,\n settings: {\n slidesToShow: 2.4,\n arrows: false,\n },\n },\n {\n breakpoint: 1023,\n settings: {\n slidesToShow: 3.4,\n arrows: false,\n },\n },\n ];\n } else if (this.props.carouselType === eCarouselType.MYSHOWS) {\n settings.slidesToShow = 6;\n settings.slidesToScroll = 1;\n settings.swipeToSlide = false;\n settings.useTransform = false;\n settings.responsive = [\n {\n breakpoint: 767,\n settings: {\n slidesToShow: 2.4,\n arrows: false,\n },\n },\n {\n breakpoint: 1023,\n settings: {\n slidesToShow: 6.5,\n arrows: false,\n },\n },\n ];\n }\n return settings;\n }\n\n render() {\n const headerImage = null;\n let carouselClasses = \"content content--feed content--\" + this.props.carouselType;\n if (this.props.showThemed) {\n carouselClasses = carouselClasses + \" content--show-themed\";\n }\n if (this.props.noExpandOnHover) {\n carouselClasses = carouselClasses + \" content--no-expand-on-hover\";\n }\n\n return (\n )\n }\n}\n\nexport default Carousel;\n\nexport const defaultSettings: ()=> iSlideSetting = () => {\n return {\n slidesToShow: 5,\n slidesToScroll: 1,\n arrows: true,\n infinite: false,\n mobileFirst: true,\n waitForAnimate: false,\n swipeToSlide: true,\n touchThreshold: 75,\n useTransform: false,\n pauseOnFocus: true,\n pauseOnHover: true, \n className: 'content__feed',\n responsive: [\n {\n breakpoint: 767,\n settings: {\n slidesToShow: 1.8,\n slidesToScroll: 1,\n arrows: false,\n },\n },\n {\n breakpoint: 1023,\n settings: {\n slidesToShow: 3.4,\n slidesToScroll: 1,\n arrows: false,\n },\n },\n ],\n }\n};\n","import {iCarouselBaseProps} from \"../CarouselBase/type\";\nimport Slider from \"react-slick\";\n\nexport interface iCarouselProps extends iCarouselBaseProps {\n carouselType: eCarouselType,\n showThemed?: boolean,\n noExpandOnHover?: boolean,\n}\n\n// todo - separate these types - DEFAULT, SHOWS, SQUARE is carousel.type; rest should renderGrid.type;\nexport enum eCarouselType {\n DEFAULT = \"\",\n SHOWS = \"shows\",\n GRID = \"grid\",\n MYSHOWS = \"myshows\",\n COLLECTIONTILE = \"collection_tile\",\n SQUARE = \"square\",\n FEATURED = \"featured\",\n DISPLAYBANNER = \"display_banner\",\n}\n\nexport enum eComponentType {\n CODECOMPONENT = \"CodeComponent\",\n}\n\n// Slider type definition does not include innerSlider, but we need it.\nexport interface SliderAsType extends Slider{\n innerSlider: Slider,\n}","import React, {RefObject} from 'react';\nimport Slider from 'react-slick';\nimport Mrec from '../../advertising/Mrec';\nimport CarouselSlide from '../CarouselSlide';\nimport axios from 'axios';\nimport C06 from '../../advertising/C06';\nimport {CarouselBaseScrollBoosterWrapper} from \"../CarouselBaseScrollBoosterWrapper\";\nimport {getLiveStreams, getUpcomingLiveStreams} from '../../Shared/LiveStreams';\nimport {SliderAsType} from \"../Carousel/type\";\nimport {iCarouselBaseProps, iCarouselBaseState, iSlideSetting} from \"./type\";\nimport {VideoProgressManager} from \"../../tenplay/pkgPlayer/vod/util/VideoProgressManager\";\nimport requiresAuthentication from \"../../Shared/AuthenticatedComponent\";\n\n// Number of slides to hide from the carousel to give space for ads in desktop view (in mobile view, ads go in the next line)\nconst slidesToHideForAds = 2;\nconst trackingData = []\nif(typeof window !== 'undefined') {\n setTimeout(function() { \n window.tenService.pageAllocator && window.tenService.pageAllocator.track(\"CAROUSEL_LOAD\", {\n \"interactionCategory\" : \"CarouselOnPage\", //Required\n \"interactionType\" : \"impression\", //Required\n \"interactionValue\" : trackingData, //Suggested\n \"interactionValueArray\" : trackingData, //Suggested\n }); \n }, 7000); // for 7 second delay \n}\n\nfunction MyShowsSlide(props) {\n const { firstName, className } = props;\n return (\n \n )\n}\nexport class CarouselBase extends CarouselBaseScrollBoosterWrapper {\n protected carouselAdContent: RefObject;\n\n private _scrolling: boolean;\n private _updateSlidesFunction: () => void;\n private _loading: boolean;\n private _failedCallCount: number;\n private _hasMounted: boolean;\n\n constructor(props) { \n super(props);\n this.carouselAdContent = React.createRef();\n this._hasMounted = false;\n const state = {\n slides: props.slides || [],\n slideIsLoading: false,\n hasAds: props.hasAds,\n hasMore: props.hasMore,\n settings: this.initSettings(this.props),\n videoProgress: [],\n clickSlideHandler: props.clickSlideHandler || null,\n relatedShowsLiveSlides: [],\n mobileBackgroundImageUrl: props.mobileBackgroundImageUrl,\n desktopBackgroundImageUrl: props.desktopBackgroundImageUrl,\n loggedIn: props.loggedIn,\n sideCurrentIndex: 0,\n };\n\n if (this.props.liveStreamSchedules && this.props.liveStreamSchedules.length > 0) {\n const liveStreams = getLiveStreams(this.props.liveStreamSchedules);\n if (liveStreams.length > 0) {\n state.relatedShowsLiveSlides = liveStreams.map(stream => {\n return {\n cardLink: `/${stream.showSlug}/live`,\n imageLink: stream.videoImage.url,\n description: stream.title,\n isLive: true,\n }\n });\n }\n }\n\n this.state = state;\n }\n\n componentDidMount () {\n this._hasMounted = true;\n super.componentDidMount && super.componentDidMount();\n this._hasMounted && this.initAds();\n\n if (this.props.liveStreamSchedules && this.props.liveStreamSchedules.length > 0) {\n this.initUpcomingLiveStreams(this.props.liveStreamSchedules);\n }\n\n this._hasMounted && this.fetchProgress()\n }\n\n componentWillUnmount() {\n this._hasMounted = false;\n this.fetchProgress()\n /* eslint-disable camelcase */\n const {utag_data} = window as any;\n /* eslint-disable camelcase */\n if(utag_data.siteSection === \"Home\") {\n this.initTrackingImpression()\n }\n }\n\n initAds = () => {\n const adContent = this.carouselAdContent.current;\n if (adContent && this.props.hasAds) {\n // watch for class change by ad success/blank callback\n const observer = new MutationObserver((mutationList, observer) => {\n mutationList.forEach(mutation => {\n if (mutation.type === \"attributes\" && mutation.attributeName === \"class\") {\n if (adContent.classList.contains(\"tenads--blank\")) {\n observer.disconnect();\n const {settings} = this.state;\n // We were supposed to have ads but ads didn't load, so extend the numOfSlides back to normal\n settings.slidesToShow += slidesToHideForAds;\n // Also need to re-create the buttons because slidesToShow have changed\n this.initPrevNextButtons(settings);\n this.setState({\n hasAds: false,\n settings: settings,\n });\n\n // keep updating metrics. setState will not make slides change to final size immediately, \n // and updateMetrics affects performance if running too quick. So run it each 100ms for 1 second.\n const intv = window.setInterval(() => {\n this.scrollBooster.updateMetrics();\n }, 100);\n window.setTimeout(() => {\n window.clearInterval(intv);\n }, 1000);\n } else if (adContent.classList.contains(\"tenads--success\")) {\n observer.disconnect();\n }\n }\n })\n });\n\n observer.observe(adContent, {attributes: true});\n }\n }\n\n\n\n initTrackingImpression = async () => {\n const {position} = this.props;\n let {title} = this.props;\n this.props.slides.map(slide => {\n const { genre, contentType} = slide;\n let {cardTitle} = slide;\n if (cardTitle.includes(\" - \") && cardTitle.includes(\"Ep\") ) {\n cardTitle = cardTitle.split('-')[0].trim();\n }\n if (title.includes(\"Continue Watching\")) {\n title = \"Continue Watching\";\n }\n const interactionValue = [title?title:'na', genre?genre:'na', contentType?contentType:'na', position?position:'na', cardTitle?cardTitle:'na'].join(\":\")\n trackingData.push(interactionValue);\n });\n }\n \n fetchProgress = async () => {\n await VideoProgressManager.getAllProgress().then(allProgress=>{ \n this._hasMounted && this.setState({\n videoProgress: allProgress,\n });\n });\n }\n\n /**\n * Set timeouts to add and remove live slides\n */\n initUpcomingLiveStreams = (liveStreamSchedules) => {\n const liveStreams = getLiveStreams(this.props.liveStreamSchedules);\n liveStreams.forEach(stream => {\n setTimeout(() => {\n this.setState(previousState => ({\n relatedShowsLiveSlides: previousState.relatedShowsLiveSlides.filter(liveSlide => liveSlide.cardLink !== `/${stream.showSlug}/live`),\n }));\n }, (new Date(stream.endDate).getTime() - new Date().getTime()))\n })\n\n const upcomingLiveStreams = getUpcomingLiveStreams(liveStreamSchedules);\n upcomingLiveStreams.forEach(stream => {\n setTimeout(() => {\n this.setState(previousState => ({\n relatedShowsLiveSlides: [...previousState.relatedShowsLiveSlides, {\n cardLink: `/${stream.showSlug}/live`,\n imageLink: stream.videoImage.url,\n description: stream.title,\n isLive: true,\n }],\n }));\n setTimeout(() => {\n this.setState(previousState => ({\n relatedShowsLiveSlides: previousState.relatedShowsLiveSlides.filter(liveSlide => liveSlide.cardLink !== `/${stream.showSlug}/live`),\n }));\n }, stream.duration * 60000)\n }, (new Date(stream.startDate).getTime() - new Date().getTime()));\n })\n };\n\n async componentDidUpdate(prevProps:iCarouselBaseProps) { \n super.componentDidUpdate && super.componentDidUpdate(prevProps);\n if(prevProps.loggedIn !== this.props.loggedIn){\n this.setState({\n loggedIn: true\n })\n await this.fetchProgress()\n }\n if (this.props.slides !== prevProps.slides) {\n this.setState({\n slides: this.props.slides,\n hasMore: this.props.hasMore,\n })\n /* eslint-disable id-length */\n this.scrollBooster.setPosition({ x: -2, y: 0 })\n if (this.state.slideIsLoading === false && this.state.sideCurrentIndex > 0){ \n setTimeout(() => {\n this.slider.slickGoTo(0);\n },1000);\n } \n }\n }\n\n initSettings(props) {\n const {settings} = props;\n\n // We begin with creating space for ads and hide the space later if there is no ads\n if (props.hasAds) {\n settings.slidesToShow -= slidesToHideForAds;\n }\n\n this.initPrevNextButtons(settings);\n\n settings.onClickHandler = (event) => {\n if (props.isDragging) {\n event.preventDefault();\n }\n };\n\n const {afterChange} = settings;\n settings.afterChange = (currentSlideIndex) => {\n this.setState({\n sideCurrentIndex: currentSlideIndex,\n })\n afterChange && afterChange();\n\n\n if (this._scrolling) {\n if (this._updateSlidesFunction) {\n this._updateSlidesFunction();\n this._updateSlidesFunction = null;\n }\n this._scrolling = false;\n }\n\n // limit sliding range\n setTimeout(() => {\n let {length} = props.customSlides || this.state.slides;\n // Add extra length from live-now and loading tiles\n if (this.props.liveSlide != null && this.props.liveSlide.isLive) {\n length++;\n }\n if (this.state.hasMore) {\n length++;\n }\n if (this.props.myShows) {\n length++;\n }\n\n try {\n const currentSlideToShow = this.slider.innerSlider.props.slidesToShow;\n if (currentSlideToShow > 0) {\n if (currentSlideIndex > length - currentSlideToShow) {\n this.slider.slickGoTo(length - currentSlideToShow);\n }\n }\n } catch (error) {\n // console.error(\"Could not get inner slide setting\");\n }\n\n }, 10);\n };\n\n settings.beforeChange = (oldIndex, newIndex) => {\n this._scrolling = true;\n this.loadMoreIfNecessary(newIndex);\n };\n\n return settings;\n }\n\n convertCardSlidesToElements(slides) {\n const {clickSlideHandler, title, position } = this.props;\n if (!slides) {\n return null;\n }\n return slides.map((slideProps, index) => (\n \n ))\n }\n\n initPrevNextButtons(settings: iSlideSetting) {\n settings.prevArrow = ;\n settings.nextArrow = ;\n }\n\n getLoadMorePageSize() {\n // We want to load two page worth of items every scroll\n return this.state.settings.slidesToShow * 2;\n }\n\n loadMoreIfNecessary(currentSlideIndex) {\n const lastPageInView = currentSlideIndex > (this.state.slides.length - this.getLoadMorePageSize());\n // we check if there are slides because we don't support customSlides atm\n if (lastPageInView && this.state.hasMore && this.state.slides) {\n this._loadMore();\n }\n }\n\n slideClass(slides) {\n switch(slides.length) {\n case 1: \n return 'card--big';\n case 2: \n return 'card--medium';\n case 3: \n case 4: \n default:\n return 'card--regular';\n }\n }\n\n _loadMore() {\n // Avoid concurrent requests\n if (this._loading || !this.state.hasMore) {\n return;\n }\n // Set loading flag in the instance because using state re-renders the compo and causes race-condition\n this._loading = true;\n this.setState({slideIsLoading: true});\n const {slides} = this.state;\n const baseUrl = `${window.location.protocol}//${window.location.host}${this.props.loadMoreUrl}`;\n const skipIdList = slides.map(slide => slide.id).toString();\n axios\n .get(baseUrl, {\n params: {\n skipIdList,\n pageSize: this.getLoadMorePageSize(),\n },\n })\n .then(response => {\n this._failedCallCount = 0; // reset the fail count\n if (response.status == 200 && response.data) {\n const updatedSlides = slides.concat(response.data.items);\n const updateFunction = () => {\n this.setState({\n hasMore: response.data.hasMore,\n slides: updatedSlides,\n });\n this._loading = false;\n this.setState({slideIsLoading: false});\n }\n\n if (!this._scrolling) {\n updateFunction();\n } else {\n // Do not update the slides while it's scrolling to avoid race condition inside the library\n // Save the function to run it afterChange / afterScroll\n this._updateSlidesFunction = updateFunction;\n }\n\n }\n })\n .catch(() => {\n // Track the fail count\n if (!this._failedCallCount) {\n this._failedCallCount = 0;\n }\n this._failedCallCount++;\n\n // Try 2 more times before calling it off\n if (this._failedCallCount < 3) {\n setTimeout(() => {\n // Only set the loading false right before the next call to avoid user scrolls from triggerring other load more requests in the mean time\n this._loading = false;\n this._loadMore();\n }, 5000);\n } else {\n this._loading = false;\n // Hide the spinner\n this.setState({hasMore: false});\n // Hide the gap left by the spinner slide\n this.slider.slickGoTo(this.state.slides.length - this.state.settings.slidesToShow);\n }\n });\n }\n\n render(): JSX.Element {\n const {tpId, title, headerImage, myShows, sponsorMessage, backgroundClickThroughUrl, link, dropdown, liveSlide, mobileBackgroundImageUrl, desktopBackgroundImageUrl } = this.props;\n const {hasAds, slides, settings, hasMore, relatedShowsLiveSlides, videoProgress, clickSlideHandler } = this.state;\n\n const mobileBgUrl = mobileBackgroundImageUrl != null ? mobileBackgroundImageUrl.retinaUrl : null;\n const desktopBgUrl = desktopBackgroundImageUrl != null ? desktopBackgroundImageUrl.url : null;\n\n let userName;\n if (this.props.userData) {\n const firstName = this.props.userData.tu_firstname;\n if (firstName && firstName != \"undefined\" && typeof firstName != \"undefined\") {\n userName = firstName;\n } else {\n userName = \"10play Member\";\n }\n }\n\n const mobileBackgroundStyles = {\n backgroundImage: \"url(\" + mobileBgUrl + \")\",\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"center -40px\",\n backgroundSize: \"100%\",\n }\n \n const desktopBackgroundStyles = {\n backgroundImage: \"url(\" + desktopBgUrl + \")\",\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"center top\",\n backgroundSize: \"cover\",\n }\n\n let {carouselClasses} = this.props;\n\n if (hasAds) {\n carouselClasses = carouselClasses + \" content--withMREC\";\n }\n // Slide elements are either passed in as custom slides or we use slides in the state which can be a mix of initial slides and pagination loaded slides\n const slideElements = this.props.customSlides || this.convertCardSlidesToElements(slides);\n\n //unshit the related live show strams\n if (relatedShowsLiveSlides.length > 0) {\n slideElements.unshift(\n relatedShowsLiveSlides.map(slide => {\n return (\n \n )\n }));\n }\n\n //The actual show live slide goes first\n if (liveSlide != null && liveSlide.isLive) {\n slideElements.unshift(\n )\n }\n\n if (hasMore) {\n slideElements.push(\n );\n }\n\n if (myShows) {\n slideElements.push(\n \n );\n }\n \n return (\n <>\n
    \n
    \n \n
    \n
    \n\n \n {hasAds &&\n
    \n \n
    \n }\n
    \n
    \n
    \n
    \n {hasAds &&\n \n }\n \n );\n }\n}\n\nexport default requiresAuthentication(CarouselBase);\n\n/**\n * Arrow Button components\n */\n\nfunction SamplePrevArrow(props: iSampleArrowProps) {\n const {sliderRef} = props;\n return (\n \n
    \n \n
    \n \n
    \n
    \n {isWebLive ?\n
    \n {\"Show\n
    \n :
    \n }\n
    \n \n \n
    \n \n );\n}\n\nexport default LiveTvLiveNowItem;","import React, { useEffect, useState, useRef } from \"react\";\nimport LiveTvLiveNowItem from \"./LiveTvLiveNowItem\";\nimport LiveTvComingUpItem from \"./LiveTvComingUpItem\";\nimport LiveTvLaterItem from \"./LiveTvLaterItem\";\nimport LoadingAnimation from '../LoadingAnimation';\nimport Slider from \"../SliderBase\";\nimport { carouselTracking } from \"../../tenplay/tenTrack/carouselTracking\";\n\nconst LiveTvSchedule = ({\n relativeUrl,\n location,\n schedule,\n liveChannels,\n groups,\n handleComingUpClick,\n isMobilePlayerStickyState\n}: any) => {\n const [activeChannels, setActiveChannels] = useState(liveChannels);\n const [activeGroups, setActiveGroups] = useState(groups);\n const [isSticky, setIsSticky] = useState(false);\n const [isActive, setIsActive] = useState(null);\n const [isLoading, setIsLoading] = useState(true);\n const [prevScrollPos, setPrevScrollPos] = useState(0);\n const [moveStickyDown, setmoveStickyDown] = useState(false);\n const [playerHeight, setPlayerHeight] = useState(0);\n const [isMobile, setIsMobile] = useState(false);\n const contentRef = useRef(null);\n const hasGroups: boolean = groups && groups.length > 0;\n let globalIndex = 1;\n\n useEffect(() => {\n const checkActiveCategory = () => {\n const groupTitleElements = document.querySelectorAll('.group__title');\n groupTitleElements.forEach((groupTitleElement) => {\n const rect = groupTitleElement.getBoundingClientRect();\n if (rect.top >= 0 && rect.top <= window.innerHeight) {\n const elementId = groupTitleElement.getAttribute('id');\n if (elementId) {\n setIsActive(elementId);\n } else {\n setIsActive(null);\n }\n }\n });\n };\n \n const calculateElementHeight = () => {\n const { height } = document.getElementsByClassName('main')[0].getBoundingClientRect();\n setPlayerHeight(height + 108);\n };\n\n const timeout = setTimeout(() => {\n setIsLoading(false);\n }, 4000);\n\n const checkMobileWidth = () => {\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n if (viewportWidth < 1024 || viewportHeight < 450) {\n setIsMobile(true);\n }\n\n };\n\n checkMobileWidth();\n calculateElementHeight();\n\n window.addEventListener('resize', checkMobileWidth);\n window.addEventListener('scroll', handleStickyCategoryScroll);\n window.addEventListener('scroll', checkActiveCategory);\n window.addEventListener('resize', calculateElementHeight);\n return () => {\n window.removeEventListener('scroll', checkActiveCategory);\n window.removeEventListener('scroll', handleStickyCategoryScroll);\n window.removeEventListener('resize', calculateElementHeight);\n window.removeEventListener('resize', checkMobileWidth);\n clearTimeout(timeout);\n };\n }, []);\n\n useEffect(() => {\n function handleOverlappingScroll() {\n const currentScrollPos = window.pageYOffset || document.documentElement.scrollTop;\n\n if (currentScrollPos < prevScrollPos) {\n setmoveStickyDown(true);\n } else {\n setmoveStickyDown(false);\n }\n setPrevScrollPos(currentScrollPos);\n }\n window.addEventListener('scroll', handleOverlappingScroll);\n return () => {\n window.removeEventListener('scroll', handleOverlappingScroll);\n };\n }, [prevScrollPos]);\n\n const scrollToSection = (id) => {\n const element = document.getElementById(id);\n setIsActive(id);\n if (element) {\n if(isMobile) {\n element.scrollIntoView({block: \"center\", inline: \"start\"});\n } else {\n element.scrollIntoView({block: \"start\", inline: \"nearest\"});\n }\n }\n };\n\n const handleStickyCategoryScroll = () => {\n const divPosition = document.getElementById('liveTv__schedule').getBoundingClientRect().top;\n \n if (divPosition <= 0) {\n setIsSticky(true);\n } else {\n setIsSticky(false);\n }\n };\n\n useEffect( () => {\n setActiveChannels(liveChannels);\n }, [liveChannels]); \n\n useEffect( () => {\n setActiveGroups(groups);\n }, [groups]); \n\n return (\n
    \n
    \n
    \n

    Live TV Schedule

    \n {isLoading ? \n <>\n \n :\n <>\n
    \n
    \n
    \n {hasGroups && location && schedule[location] ? (\n \n {activeGroups.map((activeGroup, index) => {\n const clickGroupHandlerWrapper = carouselTracking(groups, 1, undefined, 'CATEGORY_CLICK');\n const trackData = {\n catPosition: index + 1,\n interactionCategory: activeGroup.name,\n catTotal: activeGroups.length,\n }\n if(activeGroup.keys.length > 0) {\n return (\n {\n scrollToSection(activeGroup.name);\n clickGroupHandlerWrapper(event, trackData);\n }}\n className={`btn btn--featured-dark btn--lg-extra btn--rounded ${isActive === activeGroup.name ? 'btn--active' : ''\n }`}\n >\n {activeGroup.name}\n \n )\n }\n })}\n \n ) : (\n

    No groups currently available.

    \n )} \n
    \n
    \n
    \n
    \n {location &&\n schedule[location] &&\n activeGroups.map((activeGroup, index) => { \n if(activeGroup.keys.length > 0) {\n const filteredChannels = activeGroup.keys\n .map((key) => key.toLowerCase())\n .map((key) => {\n return activeChannels.find(\n (activeChannel) =>\n key === activeChannel[0].cssClass.toLowerCase()\n ) || {};\n })\n return (\n
    \n

    {activeGroup.name}

    \n {filteredChannels.map((activeChannel) => {\n globalIndex++;\n const clickSlideHandlerWrapper = carouselTracking(activeChannels, 2, activeGroup.name, 'CLICKED_CAROUSEL');\n const channelGroups = activeGroup.name;\n return (\n
    \n \n \n \n
    \n )\n })}\n
    \n )\n }\n })\n }\n
    \n }\n
    \n
    \n
    \n )\n \n}\n\nexport default LiveTvSchedule;","import React from \"react\";\n\nconst LoadingAnimation = ({ text }) => (\n <>\n
    \n

    {text}...

    \n \n \n \n
    \n \n);\n\nexport default LoadingAnimation;","import React, { useState, useRef, useEffect } from 'react';\nimport CloseX from '../CloseX';\nimport { iMegaMenuProps, iMegaMenuState } from './type';\nimport { differenceInMinutes } from 'date-fns';\nimport { epgChannelToClassName, formatScheduleTime, getMappedGeoState } from \"../../Shared/Helpers\";\n\nconst fetchLiveTvMenuData = async (location) => {\n const fetchUrl = `/api/live-menu/${location}`;\n const resp = await fetch(fetchUrl.toLowerCase());\n const data = await resp.json();\n return data;\n};\n\nconst ChannelTile = ({\n channelColour,\n channelCssClass,\n channelLogoDarkUrl,\n channelName,\n channelUrl,\n eventRating,\n eventTitle,\n eventIsWebLive,\n eventStartDate,\n eventEndDate\n}) => {\n const channelColourStyles = { \"--channelColour\": channelColour ? channelColour : \"#06B4FF\" } as React.CSSProperties;\n const [progressBarPercentage, setProgressBarPercentage] = useState(0);\n const [timeStamp, setTimeStamp] = useState(\"\");\n const prevDates = useRef({ eventStartDate, eventEndDate }).current;\n useEffect(() => {\n const intervalId = setInterval(() => {\n if (prevDates.eventEndDate == eventEndDate) {\n setProgressBarPercentage(() => {\n return Math.round((differenceInMinutes(new Date(), new Date(eventStartDate)) / differenceInMinutes(new Date(eventEndDate), new Date(eventStartDate))) * 100);\n });\n setTimeStamp(formatScheduleTime(eventStartDate, eventEndDate));\n } else {\n console.log('new schedule detected');\n prevDates.eventStartDate = eventStartDate;\n prevDates.eventEndDate = eventEndDate;\n }\n }, 3000);\n return () => {\n clearInterval(intervalId);\n }\n }, [eventEndDate]);\n\n return (\n <>\n \n \n )\n}\n\nclass LiveTVMegaMenu extends React.Component {\n intervalId: ReturnType;\n constructor(props) {\n super(props);\n this.state = {\n name: 'livetv',\n data: this.props.data,\n isMenuOpen: false,\n };\n this.clickHandler = this.clickHandler.bind(this);\n }\n\n async componentDidMount() {\n document.addEventListener('visibilitychange', this.checkFocus);\n const location = await getMappedGeoState();\n this.setState({ location });\n this.reloadMegaMenuData();\n this.intervalId = setInterval(this.reloadMegaMenuData, 5000); // Change interval to 5000ms to reduce the frequency of API calls\n }\n\n componentWillUnmount() {\n clearInterval(this.intervalId);\n document.removeEventListener('visibilitychange', this.checkFocus);\n }\n\n reloadMegaMenuData = async () => {\n const nowDate = new Date().getTime();\n const lastDate = this.state.lastLiveFeedReloadTime;\n if (lastDate && ((nowDate - lastDate < 5000))) { return; } // limit to one api call per 5 seconds\n\n // dig through existing channels to see if we need to reload anything\n let reload = false;\n const { data, location } = this.state;\n const { primaryItems, secondaryItems } = data;\n const channels = [...primaryItems, ...secondaryItems];\n if (!location) { return; }\n if (!data) { \n reload = true; \n } else {\n // figure out if we need to reload or not\n channels.forEach((channel) => {\n const { eventEndDate } = channel;\n const endDate: any = new Date(eventEndDate);\n const millisecondsLeft = (endDate - nowDate);\n if (millisecondsLeft < 0) {\n reload = true;\n }\n });\n }\n\n if (reload && this.state.isMenuOpen) {\n const fetchedLiveMegaMenuData = await fetchLiveTvMenuData(this.state.location);\n this.setState({\n lastLiveFeedReloadTime: nowDate,\n data: fetchedLiveMegaMenuData,\n });\n }\n }\n\n clickHandler() {\n this.toggleMenu();\n this.props.onClick(this.state.name);\n }\n\n toggleMenu = () => {\n this.setState(prevState => ({\n isMenuOpen: !prevState.isMenuOpen\n }));\n };\n\n\n\n\n checkFocus = () => {\n if (document.hidden) {\n clearInterval(this.intervalId);\n } else {\n this.intervalId = setInterval(this.reloadMegaMenuData, 5000);\n }\n }\n\n\n\n\n render() {\n return (\n <>\n \n \n );\n }\n}\n\n export default LiveTVMegaMenu;\n\n const LiveTvMenu = props => {\n const shortName = 'livetv';\n \n const handleClick = () => {\n props.onClick();\n };\n \n return (\n <>\n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n

    {props.data.primaryTitle}

    \n
    \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n

    {props.data.secondaryTitle}

    \n
    \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n

    More Channels

    \n
    \n {\n props.data.moreItems?.map((channelItem) => {\n return (\n \n
    \n {channelItem.channelName}\n
    \n
    \n );\n })\n }\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n

    Livestream 24/7 entertainment. View All Channels

    \n
    \n
    \n
    \n
    \n \n );\n };","import React, { Component } from 'react';\nimport SearchForm from '../SearchForm';\nimport SearchResults from '../SearchResults';\nimport CloseX from '../CloseX';\nimport Trending from './Trending';\nimport { MegaMenuSearchFormData, QuickLinks, Menu } from './functions';\nimport { iMegaMenuProps, iMegaMenuState } from './type';\n\nclass NewsMegaMenu extends Component {\n constructor(props) {\n super(props);\n this.clickHandler = this.clickHandler.bind(this);\n this.updateTerm = this.updateTerm.bind(this);\n this.state = {\n term: '',\n name: 'news',\n searchResults: [],\n lastSearch: '',\n };\n this.performSearch = this.performSearch.bind(this);\n }\n \n async performSearch(term) {\n if (!term || term == this.state.lastSearch || term.length < 3) {\n return;\n }\n this.setState({\n lastSearch: term,\n });\n const fetchUrl = \"/api/search-menu\"\n + \"?term=\" + term;\n const resp = await fetch(fetchUrl.toLowerCase());\n const data = await resp.json();\n const { results } = data;\n \n this.setState({\n searchResults: results,\n });\n }\n \n updateTerm(event) {\n const newTerm = event.target.value;\n this.setState({ term: newTerm });\n this.performSearch(newTerm);\n }\n \n clickHandler() {\n this.props.onClick(this.state.name);\n }\n \n render() {\n return (\n <>\n \n \n );\n }\n }\n \n const NewsMenu = props => {\n const shortName = 'news';\n \n const quicklinks = [\n {\n text: '10 News First',\n url: '/news',\n },\n {\n text: '10 Sport',\n url: '/sport',\n },\n {\n text: '10 Trending',\n url: '/10-play-trending',\n },\n ];\n \n const tenNewsFirstColumn = {\n heading: {\n text: '10 News First',\n img: '/images/10-news-first.png',\n },\n links: [\n {\n text: 'National',\n url: '/news/national',\n },\n props.data.localisedNewsFirst,\n {\n text: 'The Project',\n url: '/theproject',\n },\n ],\n more: {\n text: 'View All News',\n url: '/news',\n color: '#1882f8',\n },\n };\n \n const tenSportsColumn = {\n heading: {\n text: '10 Sport',\n img: '/images/10-sport.png',\n },\n links: props.data.tenSportsLinks,\n more: {\n text: 'View All Sports',\n url: '/sport',\n external: 0,\n color: '#1882f8',\n },\n };\n \n return (\n <>\n \n
    \n
      \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n {props.searchResults.length > 0 && (\n <>\n \n \n \n )}\n
    \n
    \n
    \n \n );\n};\n \n export default NewsMegaMenu","import React, { Component } from 'react';\nimport SearchForm from '../SearchForm';\nimport SearchResults from '../SearchResults';\nimport CloseX from '../CloseX';\nimport { MegaMenuSearchFormData, QuickLinks, Menu, Shows } from './functions';\nimport { iMegaMenuProps, iMegaMenuState } from './type';\n \n class ShowsMegaMenu extends Component {\n constructor(props) {\n super(props);\n this.clickHandler = this.clickHandler.bind(this);\n this.updateTerm = this.updateTerm.bind(this);\n this.state = {\n term: '',\n name: 'shows',\n searchResults: [],\n lastSearch: '',\n };\n this.performSearch = this.performSearch.bind(this);\n }\n \n async performSearch(term) {\n if (!term || term == this.state.lastSearch || term.length < 3) {\n return;\n }\n this.setState({\n lastSearch: term,\n });\n const fetchUrl = \"/api/search-menu\"\n + \"?term=\" + term;\n const resp = await fetch(fetchUrl.toLowerCase());\n const data = await resp.json();\n const { results } = data;\n \n this.setState({\n searchResults: results,\n });\n }\n \n updateTerm(event) {\n const newTerm = event.target.value;\n this.setState({ term: newTerm });\n this.performSearch(newTerm);\n }\n \n clickHandler() {\n this.props.onClick(this.state.name);\n }\n \n render() {\n return (\n <>\n \n \n );\n }\n }\n\n export default ShowsMegaMenu;\n\n const ShowsMenu = props => {\n const shortName = 'shows';\n const quicklinks = [\n {\n text: '10 News First',\n url: '/news',\n },\n {\n text: '10 Sport',\n url: '/sport',\n },\n {\n text: '10 Trending',\n url: '/10-play-trending',\n },\n ];\n \n const secondColumn = {\n heading: {\n text: props.data.secondaryLinkGroups[0].heading,\n },\n links: props.data.secondaryLinkGroups[0].links,\n };\n \n const thirdColumn = {\n heading: {\n text: props.data.secondaryLinkGroups[1].heading,\n },\n links: props.data.secondaryLinkGroups[1].links,\n more: {\n text: 'View All Shows',\n url: '/shows',\n color: '#1882f8',\n },\n };\n \n const firstFourResults = props.searchResults.slice(0, 4);\n \n return (\n <>\n \n
    \n
      \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n {props.searchResults.length > 0 && (\n <>\n \n \n \n )}\n
    \n
    \n
    \n \n );\n };","import React from 'react';\n\nexport const MegaMenuSearchFormData = {\n placeholder: 'Search for shows, people, recipes',\n action: '/search?field',\n};\n\nexport const Menu = props => (\n <>\n \n
      \n \n \n
    \n \n);\n\nconst MenuMore = (props) => {\n if (props.url) {\n return (\n
  • \n \n {props.text}\n \n \n
  • \n );\n } else {\n return null;\n }\n};\n\nconst MenuHeading = props => {\n if (props.img) {\n return (\n

    \n {props.text}\n

    \n );\n } else {\n return

    {props.text}

    ;\n }\n};\n\nconst MenuLinks = props =>\n props.textLinks &&\n props.textLinks.map((textLink, index) => (\n
  • \n {textLink.text}\n
  • \n ));\n\nexport const Shows = props => (\n <>\n

    {props.heading}

    \n
      \n \n
    \n \n);\n\nexport const QuickLinks = props =>\n props.textLinks &&\n props.textLinks.map((textLink, index) => (\n
  • \n \n {textLink.text}\n {textLink.external && }\n \n
  • \n ));\n\nconst ShowsLinks = props =>\n props.links &&\n props.links.map((showsLink, index) => (\n
  • \n \n {showsLink.text}\n {showsLink.subText}\n {showsLink.category}\n \n
  • \n ));","import React, {CSSProperties} from 'react';\nimport {myAccountPagesEnum} from '../../Shared/Enums';\nimport {MyAccountManager} from \"../../tenplay/MyAccountManager\";\nimport { iMemberGateProps } from './type';\n\nexport interface MemberGateCSS extends CSSProperties {\n '--background-image-url'?: string;\n}\n\nfunction handleClick() {\n MyAccountManager.openModal(myAccountPagesEnum.SIGNIN);\n MyAccountManager.setLocalStorageItems(\"live\");\n console.log('coming from live');\n}\n\nconst MemberGate = ( props: iMemberGateProps ) => {\n const { poster } = props;\n return (\n <>\n handleClick()}\n >\n
    \n
    \n

    Sign in to watch this live stream

    \n

    \n Not a member?
    Create your free account now\n

    \n \n
    \n
    \n
    \n \n );\n};\n\nexport default MemberGate;","import React from \"react\";\n\nconst MobileGate = () => {\n return (\n
    \n

    Your mobile browser is not supported.

    \n

    Tap here to switch to the 10Play app and enjoy seamless streaming.

    \n Watch 10 Play\n
    \n )\n}\n\nexport default MobileGate;","import React from \"react\";\n\nexport const NewsSocials = () => {\n return (\n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n
    \n )\n}\n\n","import React from \"react\";\n\nexport const PrevButton = ({ enabled, onClick }) => (\n \n \n \n \n \n);\n\nexport const NextButton = ({ enabled, onClick }) => (\n \n \n \n \n \n);\n","import React, { useEffect, useState, useRef, useCallback, ReactNode } from 'react'\nimport useEmblaCarousel, { EmblaOptionsType } from 'embla-carousel-react'\nimport Autoplay, { AutoplayOptionsType } from 'embla-carousel-autoplay'\nimport { PrevButton, NextButton } from \"./SliderButtons\"\n\n/*\nsettings defaults\n\talign: AlignmentOptionType;\n\taxis: AxisOptionType;\n\tcontainScroll: ScrollContainOptionType;\n\tdirection: DirectionOptionType;\n\tdragFree: boolean;\n\tdraggable: boolean;\n\tinViewThreshold: number;\n\tloop: boolean;\n\tskipSnaps: boolean;\n\tslidesToScroll: number;\n\tspeed: number;\n\tstartIndex: number;\n\n\tneed to replace these:\n\tslidesToShow: 1,\n\tslidesToScroll: 1,\n\tuseTransform: false,\n\tmobileFirst: false,\n\tclassName: 'content__feed'\n*/\n\ninterface EmblaEventOptions {\n\tuseClickPreventDefaultOnDrag?: boolean,\n\tuseClickCapture?: boolean\n}\n\ntype iSliderProps = {\n\toptions?: EmblaOptionsType\n\tautoplayOptions?: AutoplayOptionsType\n\teventOptions?: EmblaEventOptions\n\tchildren: ReactNode[]\n}\n\nconst autoplayDefaultSettings: AutoplayOptionsType = {\n playOnInit: false,\n stopOnInteraction: true,\n stopOnMouseEnter: true,\n delay: 4000\n};\n\nconst sliderDefaultSettings: EmblaOptionsType = {\n dragFree: true,\n align: \"start\",\n containScroll: \"trimSnaps\",\n loop: false\n}\n\nconst eventOptionsDefaultSettings: EmblaEventOptions = {\n useClickPreventDefaultOnDrag: true,\n useClickCapture: false,\n}\n\nconst Slider: React.FC = ({\n options,\n autoplayOptions,\n eventOptions,\n children\n}) => {\n const autoplaySettings = autoplayOptions ? autoplayOptions : autoplayDefaultSettings;\n const sliderSettings = options ? options : sliderDefaultSettings;\n\n const getEventSettings = (settings: EmblaEventOptions): EmblaEventOptions => {\n Object.keys(eventOptionsDefaultSettings).forEach((key) => {\n if (settings[key] == null) { settings[key] = eventOptionsDefaultSettings[key]; }\n })\n return settings;\n }\n\t\n const autoplay = useRef(\n // eslint-disable-next-line new-cap\n Autoplay(autoplaySettings)\n );\n\n const [sliderRef, embla] = useEmblaCarousel(sliderSettings, [autoplay.current]);\n const [prevBtnEnabled, setPrevBtnEnabled] = useState(false);\n const [nextBtnEnabled, setNextBtnEnabled] = useState(false);\n const [eventSettings, setEventSettings] = useState(eventOptionsDefaultSettings);\n\n const scrollNext = useCallback(() => {\n if (!embla) return;\n embla.scrollNext();\n autoplay.current.reset();\n }, [embla]);\n\n const scrollPrev = useCallback(() => {\n if (!embla) return;\n embla.scrollPrev();\n autoplay.current.reset();\n }, [embla]);\n\n const onSelect = useCallback(() => {\n if (!embla) return;\n setPrevBtnEnabled(embla.canScrollPrev());\n setNextBtnEnabled(embla.canScrollNext());\n }, [embla]);\n\n useEffect(() => {\n if (!embla) return;\n embla.on(\"select\", onSelect);\n onSelect();\n }, [embla, onSelect]);\n\n useEffect(() => {\n eventOptions != null && setEventSettings(getEventSettings(eventOptions));\n }, [])\n\n const onSlideClick = useCallback(\n (event) => {\n if (eventSettings.useClickPreventDefaultOnDrag && embla && !embla.clickAllowed()) {\n event.preventDefault();\n }\n },\n [embla],\n )\n\t\t\n // const renderSlides = () => {\n // \treturn (\n // \t\tchildren.map((slide, index) => \n // \t\t\t onSlideClick(event, index)}\n // \t\t\t>\n // \t\t\t\t{slide}\n // \t\t\t
    \n // \t\t)\n // \t)\n // }\n\n const renderSlidesWithCapture = () => {\n return (\n children.map((slide, index) => \n (\n onSlideClick(event)}\n >\n {slide}\n
    \n )\n )\t\n )\n }\n\t\n return (\n
    \n
    \n
    \n {eventSettings.useClickCapture ? renderSlidesWithCapture() : children}\n
    \n
    \n \n \n
    \n )\n}\n\nexport default Slider","import React, { useState, useRef, useEffect } from 'react';\nimport { iDropdownProps } from './type';\nimport {MyAccountManager} from \"../../tenplay/MyAccountManager\";\nimport { myAccountPagesEnum } from \"../../Shared/Enums\";\n\nconst Dropdown = ({userName, isEmailVerified, logout}: iDropdownProps) => {\n const [showMenu, setShowMenu] = useState(false);\n\n const triggerDropDown = useRef(null)\n\n const handleClickOutside = event => {\n if(triggerDropDown.current && \n !triggerDropDown.current.contains(event.target)) {\n return setShowMenu(false);\n }\n };\n\n const setActivationLocation = () => {\n const location = window.utag_data.siteSection || window.utag_data.siteSubSection1 \n localStorage.setItem('activationLocation', location.toLowerCase());\n }\n\n useEffect(() => {\n document.addEventListener(\"click\", handleClickOutside, true);\n document.addEventListener(\"scroll\", handleClickOutside, true);\n return () => {\n document.removeEventListener(\"click\", handleClickOutside, true);\n document.removeEventListener(\"scroll\", handleClickOutside, true);\n };\n });\n \n return (\n \n )\n}\n\nexport default Dropdown;","// Type definitions for Video.js 5.16\n// Project: https://github.com/zencoder/video-js\n// Definitions by: Vincent Bortone \n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n\n\n// following 2 methods are Brightcove library API methods\nimport {Allocator_Video} from \"../tenTrack/track.allocator.video\";\nimport {VjsHandler as VjsHandlerVod} from \"../tenVod/base/vjs.handler\";\nimport {VjsPluginHandler} from \"../ten/vjs.util\";\n\ninterface bc{\n (id: any, options?: iPlayerOptions, ready?: () => void): Player\n}\n\nexport interface videojs {\n (id: any, options?: iPlayerOptions, ready?: () => void): Player;\n plugin: (pluginName: string, callback: PluginCallback)=>void;\n registerPlugin: (pluginName: string, callback: PluginCallback)=>void;\n getPlugin: (pluginName: string) => ()=>{};\n pluginHandler: VjsPluginHandler;\n}\n\ninterface iPlayerOptions {\n techOrder?: string[];\n html5?: any;\n width?: number;\n height?: number;\n defaultVolume?: number;\n children?: string[];\n controls?: boolean;\n src?: string;\n autoplay?: boolean;\n preload?: string;\n}\n\ninterface Source {\n type: string;\n src: string;\n useCueTags?: boolean;\n}\n\nexport interface PluginCallback {\n (): void\n}\n\nexport interface mediaCues {\n force_stop: boolean,\n id: string | number,\n metadata: any,\n name: string | number,\n type: string,\n time: number,\n startTime: number,\n endTime: number\n}\n\nexport interface iControlBarItem {\n hide: ()=>void,\n show: ()=>void,\n enable: ()=>void,\n disable: ()=>void,\n on: ()=>void,\n one: ()=>void,\n off: ()=>void,\n trigger: ()=>void,\n dispose: ()=>void\n}\n\nexport interface Player {\n catalog: {\n getVideo: (videoId: string, callback: (event: any, value: any) => void, string: string) => void,\n load: (value: any) => void\n };\n _startTime: number;\n isFullscreen: ()=> boolean;\n\n name: () => string;\n plugin: (pluginName: string, callback: ()=>void) => void;\n play(): Player;\n pause(): Player;\n paused(): boolean;\n src(newSource: string | Source | Source[]): Player;\n currentTime(seconds: number): Player;\n currentTime(): number;\n duration(): number;\n buffered(): TimeRanges;\n bufferedPercent(): number;\n volume(percentAsDecimal: number): TimeRanges;\n volume(): number;\n width(): number;\n width(pixels: number): Player;\n height(): number;\n height(pixels: number): Player;\n hasStarted: any;\n size(width: number, height: number): Player;\n requestFullScreen(): Player;\n cancelFullScreen(): Player;\n ready(callback: (this: Player) => void ): Player;\n on(eventName: any, callback: (eventObject: Event, data?: any) => void ): void;\n one(eventName?: any, callback?: (eventObject: Event) => void ): void;\n off(eventName: any, callback: (eventObject: Event) => void ): void;\n trigger(eventName: any, customDataObject?: any): void;\n dispose(): void;\n addRemoteTextTrack(options: {}): HTMLTrackElement;\n removeRemoteTextTrack(track: HTMLTrackElement): void;\n poster(val?: string): string | Player;\n playbackRate(rate?: number): number;\n\n addClass(classToAdd: string): void;\n hasClass(classToCheck: string): boolean;\n removeClass(classToRemove: string): void;\n\n el(): HTMLDivElement; // it is the brightcove controlled div which is parent of real video element\n\n // controlbar controlBar.fullscreenToggle.hide()\n controlBar: {\n fullscreenToggle: iControlBarItem\n };\n\n dataAttrs: iRegisterPlayerDataAttrs;\n\n /**\n * custom properties\n */\n ima3:any;\n mediainfo: any;\n mediainfoMapping: any;\n\n thisVideoDom: HTMLVideoElement;\n thisBrightcoveDom: HTMLDivElement;\n thisBrightcoveContainerDom: HTMLDivElement;\n\n intervalStock: Array;\n\n allocator?: Allocator_Video;\n singletonEventsHandler?: {[handlerName: string]: ()=> void };\n pluginHandler?: VjsPluginHandler;\n\n nextVideo?: (videoId: string, isAutoplay?: boolean, showPreroll?: boolean) => void;\n}\n\n\nexport interface iRegisterPlayerDataAttrs {\n \"id\": string; // element ID\n \"data-embed\": string; // ?\n \"poster\": string; // default image\n \"class\": string; // style\n \"data-video-id\"?: string; // video ID\n \"video-id\"?: string, // todo copy data-video-id value, prevent default behavior of bc player\n \"autoplay\"?: boolean; // IF autoplay\n \"preload\"?: string; // OR preload = \"metadata\", \"auto\"\n \"data-account\"?: string; // value came from app main entry file\n \"data-uuid\"?: string; //\n \"data-video-ima-url\"?: string; // IMA video ad URL\n}\n\nexport const StandardPlayerEvent = {\n Progress: \"progress\", // stream downloading\n Waiting: \"waiting\",\n Playing: \"playing\", // resumed from pause or download delay\n Error: \"error\", // error while loading\n Loadstart: \"loadstart\", // initialized when ready or video source changed\n Loadedmetadata: \"loadedmetadata\", // of duration, dimension, first segment downloaded\n Loadeddata: \"loadeddata\", // downloaded data of current playback position\n Play: \"play\",\n Pause: \"pause\",\n Seeking: \"seeking\",\n Seeked: \"seeked\",\n Ended: \"ended\",\n Volumechange: \"volumechange\",\n Timeupdate: \"timeupdate\", // play position change\n Stalled: \"stalled\", // Sent when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming.\n};\nexport type StandardPlayerEvent = (typeof StandardPlayerEvent)[keyof typeof StandardPlayerEvent];\n\nexport const CustomPlayerEvent = {\n TimeupdateSec: \"timeupdate-in-sec\",\n PlayerStarted: \"player-started\",\n SegmentChanged: \"segment-changed\",\n SegmentView: \"segment-view\",\n RealFirstPlay: \"real-first-play\",\n StartPlayFromResume: \"start-play-from-resume\",\n CloseTheEnd: \"close-the-end\"\n};\nexport type CustomPlayerEvent = (typeof CustomPlayerEvent)[keyof typeof CustomPlayerEvent];\n\n\nexport const BrightcoveEvent = {\n ...StandardPlayerEvent,\n /** before/after player ready\n */\n BcCatalogError: \"bc-catalog-error\",\n\n /** player\n */\n // Ready: \"ready\", // for using custom plugin, not working well with play() call\n // buffering and QoS events\n Ratechange: \"ratechange\",\n // startup events\n // other\n FirstPlay: \"firstplay\",\n Resume: \"resume\",\n Resize: \"resize\",\n Fullscreenchange: \"fullscreenchange\", // from / to fullscreen change p.isFullscreen()\n};\nexport type BrightcoveEvent = (typeof BrightcoveEvent)[keyof typeof BrightcoveEvent];\n\nexport const BrightcoveCustomEvent = CustomPlayerEvent;\nexport type BrightcoveCustomEvent = CustomPlayerEvent;\n","import {Log} from \"../ten/env.util\";\nimport {Dispose} from \"./abstract/dispose\";\n\nexport interface iCallStackConfig {\n variable: any,\n property: string,\n ms?: number,\n log?: string,\n}\n\nexport class CallStack extends Log implements Dispose{\n private interval: number;\n private callbacks: Array = [];\n\n constructor(private config: iCallStackConfig) {\n super(config.log);\n config.ms = config.ms || 25;\n this.watch();\n }\n\n protected push (fn: Function) {\n this.callbacks.push(fn);\n\n if (this.isReady()) {\n this.onReady();\n }\n }\n\n\n private watch() {\n this.interval = window.setInterval(() => {\n if (this.isReady()) {\n this.onReady();\n window.clearInterval(this.interval);\n }\n }, this.config.ms)\n }\n private isReady() {\n const config = this.config;\n return typeof config.variable === \"object\" && config.variable[config.property];\n }\n private onReady() {\n if (Array.isArray(this.callbacks)) {\n this.callbacks.forEach(fn=>{\n typeof fn === \"function\" && fn();\n });\n this.callbacks = [];\n }\n }\n\n public dispose() {\n this.interval && window.clearInterval(this.interval);\n this.callbacks = [];\n }\n\n}","let userAgentFilterName = [\"bot\", \"mobile\", \"tablet\", \"mobile\"];\nlet userAgentFilter = [\n [\n /(ads|google|bing|msn|yandex|baidu|ro|career|)bot/i,\n /(baidu|jike|symantec)spider/i,\n /scanner/i,\n /(web)crawler/i,\n ],\n [\n /ip(hone|od)/i,\n /android.*(mobile|mini)/i,\n /Opera Mobi/,\n /Mobile.+Firefox/,\n /^HTC/,\n /Fennec/,\n /IEMobile/,\n /BlackBerry/,\n /BB10.*Mobile/,\n /GT-.*Build\\/GINGERBREAD/,\n /SymbianOS.*AppleWebKit/,\n ],\n [\n /ipad/i,\n /android/i,\n /PlayBook; U; RIM Tablet/,\n /hp-tablet.*TouchPad/,\n /Kindle\\/3/,\n\n ],\n [\n // without brand\n /symbian/i,\n /^sonyericsson/i,\n /^nokia/i,\n /^samsung/i,\n /^lg/i,\n /bada/i,\n /blazer/i,\n /cellphone/i,\n /iemobile/i,\n /midp-2.0/i,\n /u990/i,\n /netfront/i,\n /opera mini/i,\n /palm/i,\n /nintendo wii/i,\n /playstation portable/i,\n /portalmmm/i,\n /proxinet/i,\n /sonyericsson/i,\n /symbian/i,\n /windows\\ ?ce/i,\n /winwap/i,\n /eudoraweb/i,\n /htc/i,\n /240x320/i,\n /avantgo/i,\n ],\n];\n\n\nlet type = \"\";\nif (typeof window !== \"undefined\") {\n let filterType = userAgentFilterName.find(function(filterName, index){\n return !!userAgentFilter[index].find(function(regex, regIndex){\n return regex.test(window.navigator.userAgent);\n });\n });\n filterType ? type = filterType : type = \"desktop\";\n}\n\nexport const deviceType = type;\n\nexport function detectDeviceType() {\n if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {\n return \"unknown\";\n }\n\n const userAgent = window.navigator.userAgent.toLowerCase();\n\n if (userAgent.includes(\"box\")) {\n return \"box\";\n }\n if (userAgent.includes(\"tv\")) {\n return \"tv\";\n }\n if (/mobile|android|iphone|ipod|blackberry|phone/.test(userAgent)) {\n return \"phone\";\n }\n if (/tablet|ipad/.test(userAgent)) {\n return \"tablet\";\n }\n return \"desktop\"; // Fallback for everything else\n}","/**\n * Utility function to check and set user flag in localStorage based on a percentage.\n * Resets flags if the percentage changes.\n * @param percentage - The percentage of users to be flagged (e.g., 2 for 2%).\n * @returns {boolean} - Returns true if the user is in the flagged group, false otherwise.\n */\n\nimport { env } from \"../pkgAviaAllocator/tracking.env\";\n\ndeclare global {\n interface Window {\n markAdOps: () => void;\n removeAdOps: () => void;\n checkIsFlagged: () => boolean;\n }\n}\n\nconst FLAG_KEY = 'isFlagged';\nconst ADOPS_KEY = 'isAdops';\nconst PERCENTAGE_KEY = 'currentPercentage';\n\n/**\n * Validates the percentage value.\n * @param percentage - The percentage to validate.\n * @throws Will throw an error if the percentage is not between 0 and 100.\n */\nfunction validatePercentage(percentage: number): void {\n if (percentage < 0 || percentage > 100) {\n throw new Error('Percentage must be between 0 and 100');\n }\n}\n\n/**\n * Retrieves a boolean flag from localStorage.\n * @param key - The key of the flag in localStorage.\n * @returns {boolean | null} - The flag value as a boolean, or null if not set.\n */\nfunction getFlagFromLocalStorage(key: string): boolean | null {\n const value = localStorage.getItem(key);\n return value !== null ? value === 'true' : null;\n}\n\n/**\n * Sets a boolean flag in localStorage.\n * @param key - The key of the flag in localStorage.\n * @param value - The boolean value to set.\n */\nfunction setFlagInLocalStorage(key: string, value: boolean): void {\n localStorage.setItem(key, value.toString());\n}\n\n/**\n * Resets all flags if the percentage changes.\n * @param newPercentage - The new percentage value.\n */\nfunction resetFlagsIfPercentageChanges(newPercentage: number): void {\n const currentPercentage = localStorage.getItem(PERCENTAGE_KEY);\n if (currentPercentage === null || parseFloat(currentPercentage) !== newPercentage) {\n localStorage.removeItem(FLAG_KEY);\n localStorage.setItem(PERCENTAGE_KEY, newPercentage.toString());\n logger(`🔍️ ~ Percentage changed to ${newPercentage}%. Flags reset.`);\n }\n}\n\n/**\n * Checks and sets user flag in localStorage based on a percentage.\n * If the user is part of the AdOps team (isAdops), they are always flagged.\n * Resets flags if the percentage changes.\n * @param percentage - The percentage of users to be flagged (e.g., 2 for 2%).\n * @returns {boolean} - Returns true if the user is in the flagged group, false otherwise.\n */\nexport function checkUserFlag(percentage: number): boolean {\n if (typeof window === 'undefined') {\n console.warn('🔍️ ~ checkUserFlag should only be called in a browser environment.');\n return false;\n }\n\n validatePercentage(percentage);\n\n resetFlagsIfPercentageChanges(percentage);\n\n const isAdops = getFlagFromLocalStorage(ADOPS_KEY);\n if (isAdops === true) {\n setFlagInLocalStorage(FLAG_KEY, true);\n logger('🔍️ ~ AdOps team member detected. Automatically flagged as true.');\n return true;\n }\n\n const isFlagged = getFlagFromLocalStorage(FLAG_KEY);\n\n if (isFlagged !== null) {\n return isFlagged;\n }\n\n const randomNumber = Math.random() * 100;\n const newFlagValue = randomNumber < percentage;\n\n setFlagInLocalStorage(FLAG_KEY, newFlagValue);\n\n logger(`🔍️ ~ User is ${newFlagValue ? 'in' : 'not in'} the ${percentage}% group.`);\n\n return newFlagValue;\n}\n\n/**\n * Marks the user as AdOps in localStorage.\n */\nexport function markAdOps(): void {\n if (typeof window === 'undefined') {\n return;\n }\n\n window.markAdOps = function () {\n setFlagInLocalStorage(ADOPS_KEY, true);\n logger('🔍️ ~ User marked as AdOps.');\n };\n\n window.removeAdOps = function () {\n localStorage.removeItem(ADOPS_KEY);\n localStorage.removeItem(FLAG_KEY);\n logger('🔍️ ~ User removed from AdOps and isFlagged reset.');\n };\n\n window.checkIsFlagged = function (): boolean {\n const isFlagged = getFlagFromLocalStorage(FLAG_KEY);\n logger(`🔍️ ~ User is currently ${isFlagged ? 'flagged' : 'not flagged'}.`);\n return isFlagged !== null ? isFlagged : false;\n };\n}\n\n/**\n * Logs messages to the console only in the development environment.\n * @param message The message to log.\n */\nfunction logger(message: string): void {\n if (!env.isProduction()) {\n console.log(message);\n }\n}","import { iTrackingService } from \"./tracking.conf.type\";\nexport class Allocator{\n protected _servicesConfig: iTrackingService;\n\n public oztam: any;\n public tealium: any;\n\n\n constructor (_servicesConfig: iTrackingService) {\n this._servicesConfig = _servicesConfig;\n }\n \n}","export enum eAllocatorServices {\n oztam = \"oztam\",\n tealium = \"tealium\",\n}\n\n\nexport interface iAllocatorServiceConfig {\n enabled: boolean;\n config: {\n staging: unknown;\n production: unknown;\n };\n}\n\nexport interface iAllocatorServices {\n oztam?: iAllocatorServiceConfig,\n mux?: iAllocatorServiceConfig,\n}\n\nexport interface iExtraInfo {\n userId_oztam?: string,\n externalSessionId?: string,\n externalUserId?: string,\n id3?, // ref interface in child implementation not here.\n}","import {Allocator} from \"./allocator\";\nimport {\n defaultAllocatorVideoState,\n eAllocatorEvent, iAllocatorExtraInfo,\n iAllocatorPlayerRef,\n iAllocatorVideoState,\n} from \"./allocator.video.type\";\nimport {eAllocatorServices} from \"./allocator.type\";\nimport {iTrackingService} from \"./tracking.conf.type\";\n\n\nexport class AllocatorVideo extends Allocator {\n protected _state: iAllocatorVideoState = defaultAllocatorVideoState;\n /**\n * private properties\n */\n\n set firstRoundPlay(bool) {\n this._state.isFirstRoundPlay = bool;\n }\n get firstRoundPlay() {\n return this._state.isFirstRoundPlay;\n }\n\n /**\n * implemented in child class of project folder.\n * IMPORTANT these function reset tracking property inside function.\n */\n protected initTealium (): void {};\n protected initOztam (): void {};\n\n protected initExtraInfo(): void {};\n\n /**\n * public properties\n */\n public trackingOnHold = false; // true - ignore all tracking before it change to true\n\n constructor (_servicesConfig: iTrackingService) {\n super(_servicesConfig);\n\n this._state.eventTimestamp = {};\n }\n\n private updateEventTimestamp (eventName: eAllocatorEvent) {\n this._state.eventTimestamp[eventName] = Date.now();\n }\n\n public updateExtraInfo (extraInfo: iAllocatorExtraInfo) {\n Object.keys(eAllocatorServices).forEach(serviceName => {\n this[serviceName] &&\n this[serviceName].addExtraVideoInfo &&\n this[serviceName].addExtraVideoInfo(extraInfo);\n })\n }\n\n public stopTracking(serviceName?: eAllocatorServices) {\n if (serviceName) {\n this[serviceName] &&\n this[serviceName].stopTracking &&\n this[serviceName].stopTracking();\n } else {\n Object.keys(eAllocatorServices).forEach(serviceName => {\n this[serviceName] &&\n this[serviceName].stopTracking &&\n this[serviceName].stopTracking();\n });\n }\n }\n private resetTrackingState = () => {\n this.stopTracking();\n this._state.eventTimestamp = {};\n this._state.isFirstRoundPlay = true;\n this._state.calledFirstPlay = false;\n this._state.calledPreRollBreakStart = false;\n };\n\n public resetTrackingService() {\n this.resetTrackingState();\n\n delete this.tealium;\n this.initTealium();\n delete this.oztam;\n this.initOztam();\n\n this.initExtraInfo && this.initExtraInfo();\n }\n\n /**\n * video events\n */\n public track(event: eAllocatorEvent, data?, playerRef?: iAllocatorPlayerRef, otherData: any = null) {\n if (this.trackingOnHold) {\n return;\n }\n\n let checkMediaInfoModel = [\n eAllocatorEvent.LOAD,\n eAllocatorEvent.START,\n eAllocatorEvent.FIRST_PLAY,\n eAllocatorEvent.PLAY,\n eAllocatorEvent.PAUSE,\n eAllocatorEvent.UN_PAUSE,\n eAllocatorEvent.RESUME,\n eAllocatorEvent.COMPLETE,\n eAllocatorEvent.AD_BREAK_START,\n eAllocatorEvent.AD_BREAK_END,\n eAllocatorEvent.BEFORE_UNLOAD_PAGE,\n eAllocatorEvent.INIT_PROGRESS_INTERVAL\n ];\n if (checkMediaInfoModel.indexOf(event) >= 0) {\n\n }\n\n let checkAdInfoModel = [\n eAllocatorEvent.AD_BEGIN,\n eAllocatorEvent.AD_PAUSE,\n eAllocatorEvent.AD_RESUME,\n eAllocatorEvent.AD_COMPLETE\n ];\n if (checkAdInfoModel.indexOf(event) >= 0) {\n\n }\n\n let checkPlayerRef = [\n eAllocatorEvent.LOAD,\n eAllocatorEvent.FIRST_PLAY, // vjsplayer\n eAllocatorEvent.PLAY, // vjsplayer\n eAllocatorEvent.PAUSE, // vjsplayer\n eAllocatorEvent.RESUME, // vjsplayer\n eAllocatorEvent.SEEKED,\n eAllocatorEvent.AD_BEGIN, // ad player\n eAllocatorEvent.AD_PAUSE, // ad player\n eAllocatorEvent.AD_RESUME, // ad player\n eAllocatorEvent.AD_BREAK_END // vjsplayer\n ];\n if (checkPlayerRef.indexOf(event) >= 0) {\n if (!playerRef || typeof playerRef.currentTime !== \"function\") {\n console.error('Player missing key method - currentTime');\n return;\n }\n }\n\n let cancelEventTrack = false;\n switch (event) {\n case eAllocatorEvent.LOAD:\n this.onLoad();\n break;\n case eAllocatorEvent.LOADED_METADATA:\n this.onLoadedMetadata(data, playerRef);\n break;\n case eAllocatorEvent.START:\n this.onStart(data, playerRef);\n break;\n case eAllocatorEvent.FIRST_PLAY:\n this._state.calledFirstPlay = true;\n this.onFirstPlay(data, playerRef);\n break;\n case eAllocatorEvent.PLAY:\n\n break;\n case eAllocatorEvent.PAUSE:\n this.onPause(data, playerRef);\n break;\n case eAllocatorEvent.UN_PAUSE:\n this.onUnpause(data, playerRef);\n break;\n case eAllocatorEvent.RESUME:\n this.onResume(data, playerRef);\n break;\n case eAllocatorEvent.PROGRESS:\n this.onProgress();\n break;\n case eAllocatorEvent.SEGMENT_VIEW:\n this.onSegmentView();\n break;\n case eAllocatorEvent.CLOSE_THE_END:\n // todo this logic should be improved\n if (!this._state.eventTimestamp[event] ||\n Date.now() - this._state.eventTimestamp[event] > 3000) {\n this.onCloseTheEnd();\n } else {\n cancelEventTrack = true;\n }\n break;\n case eAllocatorEvent.COMPLETE:\n this.onComplete(data);\n break;\n case eAllocatorEvent.SEEKING:\n this.onSeeking();\n break;\n case eAllocatorEvent.SEEKED:\n this.onSeeked(data, playerRef);\n break;\n case eAllocatorEvent.AD_BEGIN:\n this.onAdBegin(data, playerRef, otherData);\n break;\n case eAllocatorEvent.AD_PAUSE:\n this.onAdPause(data, playerRef);\n break;\n case eAllocatorEvent.AD_RESUME:\n this.onAdResume(data, playerRef);\n break;\n case eAllocatorEvent.AD_COMPLETE:\n this.onAdComplete(data, playerRef, otherData);\n break;\n case eAllocatorEvent.AD_BREAK_START:\n if (!this._state.calledFirstPlay) {\n this._state.calledPreRollBreakStart = true;\n }\n this.onAdBreakStart(data);\n break;\n case eAllocatorEvent.AD_BREAK_END:\n this.onAdBreakEnd(data, playerRef);\n break;\n case eAllocatorEvent.BEFORE_UNLOAD_PAGE:\n this.beforeUnloadPage(data, playerRef, otherData);\n break;\n case eAllocatorEvent.BEFORE_CHANGE_SOURCE:\n this.beforeChangeSource(data, playerRef);\n break;\n case eAllocatorEvent.INIT_PROGRESS_INTERVAL:\n this.initProgressInterval(data, playerRef);\n break;\n }\n\n if (cancelEventTrack) {\n // console.log('canceled event', event);\n } else if (event !== eAllocatorEvent.PROGRESS) {\n // console.log(`tracked event ${event}`);\n }\n\n /**\n * record last called time of the events\n */\n this.updateEventTimestamp(event);\n }\n\n /**\n * if registered event validator returns false, then the event wont be tracked.\n */\n private _validationHolder: [Array, (e)=> boolean][] = [];\n protected _validate(event): boolean {\n for (let i=0;i< this._validationHolder.length; i++) {\n let validation = this._validationHolder[i];\n if (validation[0].indexOf(event) >= 0) {\n return validation[1](event);\n }\n }\n return true;\n }\n public registerValidation(events: Array, validatorCB: (e)=> boolean) {\n this._validationHolder.push([events, validatorCB]);\n }\n\n /**\n * event handlers\n */\n\n private onLoad() {\n }\n\n public onLoadedMetadata(mediainfo, playerRef) {\n if(this.firstRoundPlay) {\n this.oztam && this.oztam.onLoadedMetadata && this.oztam.onLoadedMetadata(mediainfo, playerRef);\n }\n this.tealium && this.tealium.load && this.tealium.load(mediainfo);\n }\n\n // occur once, before trigger first play event\n private onStart(mediainfo, playerRef) {\n\n }\n\n private onReplay(mediainfo, playerRef) {\n // Previously used for Nielsen\n }\n\n // real video content started playing\n protected onFirstPlay(mediainfo, playerRef) {\n if (this.firstRoundPlay) {\n this.oztam && this.oztam.onFirstPlay && this.oztam.onFirstPlay(mediainfo, playerRef);\n }\n this.tealium && this.tealium.firstPlay && this.tealium.firstPlay();\n }\n\n protected initProgressInterval(mediainfo, playerRef) {\n this.oztam && this.oztam.onInitProgress && this.oztam.onInitProgress(mediainfo, playerRef); \n }\n\n private onPause(mediainfo, playerRef) {\n if (this._validate(eAllocatorEvent.PAUSE)) {\n this.tealium && this.tealium.pause && this.tealium.pause();\n this.oztam && this.oztam.onPause && this.oztam.onPause();\n }\n }\n\n private onUnpause(mediainfo, playerRef) {\n if (this._validate(eAllocatorEvent.UN_PAUSE)) {\n this.oztam && this.oztam.onUnPause && this.oztam.onUnPause(mediainfo, playerRef);\n }\n\n if (!this.firstRoundPlay && playerRef.currentTime() === 0) {\n this.onReplay(mediainfo, playerRef);\n }\n }\n\n private onResume(mediainfo, playerRef) {\n\n }\n\n private onProgress() {\n \n }\n\n protected onSegmentView() {\n this.tealium && this.tealium.segmentView && this.tealium.segmentView();\n }\n\n private onCloseTheEnd() {\n if (this.firstRoundPlay) {\n // Previously used for Omniture\n }\n }\n\n private onComplete(mediainfo, playerRef?) {\n this.firstRoundPlay && this.oztam && this.oztam.onComplete && this.oztam.onComplete();\n this.tealium && this.tealium.finished && this.tealium.finished();\n\n // as last thing, set state of firstRoundPlay to false, so tracking of replay can be identified\n this.firstRoundPlay = false;\n }\n\n private onSeeking(){\n if (this._validate(eAllocatorEvent.SEEKING)) {\n this.oztam && this.oztam.onSeeking && this.oztam.onSeeking();\n this.tealium && this.tealium.seeking && this.tealium.seeking();\n }\n }\n\n private onSeeked(mediainfo, playerRef){\n if (this._validate(eAllocatorEvent.SEEKED)) {\n this.oztam && this.oztam.onSeeked && this.oztam.onSeeked(mediainfo, playerRef);\n }\n }\n\n private onAdBegin(adInfo, playerRef, otherData) {\n this.oztam && this.oztam.onAdBegin && this.oztam.onAdBegin();\n this.tealium && this.tealium.adStart && this.tealium.adStart(adInfo, playerRef, otherData);\n }\n\n private onAdPause(adInfo, playerRef) {\n if(this._state.calledFirstPlay) {\n this.oztam && this.oztam.onAdPause && this.oztam.onAdPause();\n }\n }\n\n private onAdResume(adInfo, playerRef) {\n if(this._state.calledFirstPlay) {\n this.oztam && this.oztam.onAdResume && this.oztam.onAdResume();\n }\n }\n\n private onAdComplete(adInfo, playerRef, otherData) {\n this.oztam && this.oztam.onAdComplete && this.oztam.onAdComplete();\n this.tealium && this.tealium.adEnd && this.tealium.adEnd(adInfo, playerRef, otherData);\n }\n\n protected onAdBreakStart(mediainfo) {\n // special break start behaviour\n if (this._state.calledFirstPlay) {\n // midroll\n } else {\n // preroll\n // Previously used for Nielsen\n }\n // all break start behavior\n this.oztam && this.oztam.onAdBreakStart && this.oztam.onAdBreakStart();\n }\n\n protected onAdBreakEnd(mediainfo, playerRef) {\n this.oztam && this.oztam.onAdBreakEnd && this.oztam.onAdBreakEnd(mediainfo, playerRef);\n }\n \n private beforeChangeSource (mediainfo, playerRef) {\n this.tealium && this.tealium.onChangeVideo && this.tealium.onChangeVideo( mediainfo, playerRef);\n this.stopTracking();\n }\n\n private beforeUnloadPage(mediainfo, playerRef, otherData) {\n this.tealium && this.tealium.onExit && this.tealium.onExit(mediainfo, playerRef, otherData);\n this.stopTracking();\n }\n}","import {iOztamV2ExtraInfo} from \"./oztam.v2.type\";\nimport { iWebApiVideoData } from '../pkgPlayer/api/api.video.type';\n\nexport enum eAllocatorEvent {\n LOAD = \"LOAD\",\t\t// video loaded event\n LOADED_METADATA = \"LOADED_METADATA\",\n START = \"START\",\t\t// video play start, includes ads\n FIRST_PLAY = \"FIRST_PLAY\", // video content first play\n TIME_UPDATE = \"TIME_UPDATE\",\n PLAY = \"PLAY\",\t\t// video continue/resume play after ads\n PAUSE = \"PAUSE\",\t\t// user paused video\n UN_PAUSE = \"UN_PAUSE\",\n RESUME = \"RESUME\",\t// user resumed video\n PROGRESS = \"PROGRESS\",\t// video in progress\n SEGMENT_VIEW = \"SEGMENT_VIEW\",\n CLOSE_THE_END = \"CLOSE_THE_END\", // 98% finished / 7 seconds of short episode left\n COMPLETE = \"COMPLETE\",\t// video completed\n SEEKING = \"SEEKING\",\n SEEKED = \"SEEKED\",\n AD_BEGIN = \"AD_BEGIN\",\n AD_COMPLETE = \"AD_COMPLETE\",\n AD_BREAK_START = \"AD_BREAK_START\",\n AD_BREAK_END = \"AD_BREAK_END\",\n AD_PAUSE = \"AD_PAUSE\",\n AD_RESUME = \"AD_RESUME\",\n BEFORE_UNLOAD_PAGE = \"BEFORE_UNLOAD_PAGE\",\n BEFORE_CHANGE_SOURCE = \"BEFORE_CHANGE_SOURCE\",\n INIT_PROGRESS_INTERVAL = \"INIT_PROGRESS_INTERVAL\",\n PLUGIN_EVENT = \"PLUGIN_EVENT\",\n TEXTCUEPOINT = \"TEXTCUEPOINT\",\n}\n\nexport interface iMediaInfo_CustomFields {\n alt_media_id: string;\n clip_title: string;\n tv_show: string;\n series_crid_id?: string;\n episode_crid_id?: string;\n video_type_long_form?: string;\n tv_channel?: string;\n tv_episode?: string;\n episode_name?: string;\n expiry_date?: string;\n program_classification?: string;\n web_content_url?: string;\n clip_category?: string;\n market?: string;\n publisherid?: string\n tv_season?: string\n showContentMarket?: string\n oztamPublisherId?: string\n oztamSessionId?: string\n}\n\nexport interface iMediaInfo_Video {\n ShowGenre: string;\n ShowProgramClassification: string;\n isMemberGatedLive: boolean;\n genre?: string,\n}\n\nexport interface iMediaInfo {\n id: string;\n name: string;\n account_id?: string;\n description?: string;\n long_description?: string;\n duration?: string;\n head_position: string;\n created_at?: string;\n published_at?: string;\n updated_at?: string;\n reference_id?: string;\n publisher_id?: string;\n publisherid?: string;\n custom_fields: iMediaInfo_CustomFields // live returns customFields;\n video?: iMediaInfo_Video;\n channelDisplayName?: string;\n preroll?: any; // reference of brightcove player.ima3.currentAdEventInfo\n}\n\nexport interface iAdInfo {\n type: string;\n asset_id: string;\n head_position: string;\n index?: string;\n duration?: string\n}\n\nexport interface iAllocatorVideoState {\n eventTimestamp: {[key in eAllocatorEvent]?: number},\n isFirstRoundPlay: boolean,\n calledFirstPlay: boolean,\n calledPreRollBreakStart: boolean,\n tealiumEvtOverride: boolean,\n}\n\nexport const defaultAllocatorVideoState: iAllocatorVideoState = {\n eventTimestamp: {},\n isFirstRoundPlay: true,\n calledFirstPlay: false,\n calledPreRollBreakStart: false,\n tealiumEvtOverride: false,\n}\n\nexport interface iAllocatorPlayerRef {\n currentTime?: () => number,\n watchPosition?: number, // only for vod\n videoElement?: any\n}\n\nexport interface iAllocatorExtraInfo extends iOztamV2ExtraInfo {}","import {eCueType, iCueData, iID3, iID3_convertedInfo} from \"./id3Processor.type\";\nimport {isIOS} from \"../util\";\n\nexport function getId3Wrapper(): iID3 {\n return {\n source: undefined,\n latest: undefined,\n pauseDurationBeforeNewId3: 0,\n pauseDurationBeforeNewId3_nielsen: 0,\n\n generateId3Info: function (TXXX) {\n let id3Info: iID3_convertedInfo = {\n cueType: undefined,\n \"CRID\": TXXX.CRID,\n \"EpochTime\": TXXX.EpochTime,\n \"Rating\": TXXX.Rating,\n \"StreamID\": TXXX.StreamID, // index of publisher ID list\n \"LocalTime\": Date.now(),\n \"series_id\": undefined, // get from CRID\n \"episode_id\": undefined, // get from CRID\n \"syncedEpoch\": function () {\n return parseInt(this.EpochTime) +\n Math.floor((Date.now() - id3Info.LocalTime) / 1000);\n } // function to get local synced timestamp based o EpochTime\n };\n\n // sample //sydney.ten.ten.au/56076E1407950\n if (typeof id3Info.CRID === \"string\") {\n let matches = id3Info.CRID.match(/([0-9]{1,})[Ee]([0-9]{1,})$/);\n if (matches && typeof matches === \"object\" && matches[2]) {\n id3Info.series_id = matches[1];\n id3Info.episode_id = matches[2];\n }\n }\n return id3Info;\n },\n update: function (cueType: eCueType, cueData) {\n switch (cueType) {\n case eCueType.TXXX:\n if (typeof cueData === \"string\" || typeof cueData === \"number\") {\n this.updateTimestamp(cueData);\n } else if (typeof cueData === \"object\") {\n this.pauseDurationBeforeNewId3 = 0;\n this.pauseDurationBeforeNewId3_nielsen = 0;\n this.source = cueData;\n this.latest = this.generateId3Info(this.source);\n } else {\n console.error(\"TXXX data is not valid.\", cueData);\n }\n break;\n case eCueType.PRIV:\n case eCueType.TDRL:\n this.updateTimestamp(cueData);\n break;\n }\n this.latest.cueType = cueType;\n return this.latest\n },\n updateTimestamp: function (cueData) {\n try {\n cueData = typeof cueData === 'string' ? cueData.replace(/z$/, \"Z\") : cueData;\n const timestamp = (new Date(cueData)).getTime() / 1000;\n this.source = cueData;\n this.latest = this.generateId3Info({\n CRID: undefined,\n EpochTime: timestamp,\n Rating: undefined,\n StreamID: undefined,\n });\n } catch (err) {\n console.error(\"Cue timestamp is not expected time format\");\n }\n }\n }\n}\n\nexport function cueWatcher(player, _log, callback) {\n player.video.textTracks && player.video.textTracks.addEventListener(\"addtrack\", function(event) {\n const track = event.track;\n if (track.kind !== \"metadata\") {\n return;\n }\n track.mode = \"hidden\";\n track.addEventListener('cuechange', (unusedEvent) => {\n let activeCues = track.activeCues;\n if(!activeCues || !activeCues.length) {\n return;\n }\n for(let i = 0; i < activeCues.length; i++) {\n let cue = activeCues[i] as any;\n let cueObject = cue.value;\n if (cueObject && [eCueType.TXXX, eCueType.TDRL, eCueType.PRIV].indexOf(cueObject.key) >= 0) {\n callback && callback(cueObject);\n } else {\n _log && _log(cue, () => {return JSON.stringify(cueObject)});\n }\n }\n })\n }) \n}\n\n/*\n* this is only for players implemented TXXX and TDRL events\n* */\nexport function cueProcess(player, _log, cueObjectSource: iCueData) {\n try {\n let cueObject;\n switch (cueObjectSource.key) {\n case eCueType.TXXX:\n cueObject = getCueTXXXObject(cueObjectSource);\n if (cueObject.CRID) {\n player.trigger(eCueType.TXXX, cueObject);\n } else {\n _log && _log(\"TXXX missing key data\");\n }\n break;\n case eCueType.TDRL:\n cueObject = getCueTRDLObject(cueObjectSource);\n if (cueObject) {\n player.trigger(eCueType.TDRL, cueObject);\n } else {\n _log && _log(\"TRDL missing key data\");\n }\n break;\n }\n } catch (e) {\n console.error(\"cue data is not expected format\");\n }\n}\n\n// data: 2020-09-01T05:14:27.080z OR 2020-09-01T05:14:27.080Z\nfunction getCueTRDLObject(cueObj: iCueData) {\n return cueObj.data;\n}\n\nfunction getCueTXXXObject(cueObj: iCueData) {\n if (isIOS()) {\n return JSON.parse(cueObj.data);\n }\n\n // default is hls.js, if more player used other than brightcove + yoadmanager, this need to be confirmed in new player if the object structure is same as this.\n return JSON.parse(cueObj.info.replace(/^PROGRAM_INFO/, \"\"));\n}\n\nexport function getTxxxGoogleAdData(txxxObject) {\n if (isIOS()) {\n if (typeof txxxObject.data === \"string\" && /^google_/.test(txxxObject.data)) {\n return txxxObject.data;\n }\n }\n\n // default is hls.js, if more player used other than brightcove + yoadmanager, this need to be confirmed in new player if the object structure is same as this.\n if (typeof txxxObject.data === \"string\" && /^google_/.test(txxxObject.data)) {\n return txxxObject.data;\n }\n}","export enum eCueType {\n TXXX = \"TXXX\",\n TDRL = \"TDRL\",\n PRIV = \"PRIV\",\n}\n\nexport interface iCueData {\n key: eCueType,\n data: any,\n info: any,\n}\n\nexport interface iID3_convertedInfo {\n \"cueType\": eCueType,\n \"CRID\": string,\n \"EpochTime\": string,\n \"Rating\": string,\n \"StreamID\": string, // index of publisher ID list\n \"LocalTime\": number,\n \"series_id\": string, // get from CRID\n \"episode_id\": string, // get from CRID\n \"syncedEpoch\": () => number\n}\n\nexport interface iID3 {\n source: any,\n latest: iID3_convertedInfo,\n pauseDurationBeforeNewId3: number,\n pauseDurationBeforeNewId3_nielsen?: number,\n generateId3Info: (txxx: any) => void,\n update: (type: eCueType, cueData) => void,\n updateTimestamp: (cueData) => void,\n}","import {getUserIp, requestSend, UUID_v4} from \"./util\";\nimport { tenTrack } from \"../tenTrack/track.init\";\nimport { deviceType } from \"../@util/device\";\nimport { iMediaInfo } from \"../tenTrack/track.dataModel\";\n\nexport interface iOzTamTrackingMeta_Config {\n serverTarget: string; // sdeliver.oztam.com.au/api/meter\n protocolVersion: string; // string number\n vendorVersion: string; // Tenplay_{platform}_{float}\n plugin: string; // javascript\n meta: {\n account_id: string // string\n };\n platform?: string; // web | chromecast | etc.\n publisherName?: string; // \"TEN\"\n publisherId?: string; // live gets from mediainfo, vod is predefined in trackingConf\n sessionId?: string; // give a sessionId for current tracking\n}\n\nexport interface iOzTamTrackingMeta_Media {\n mediaId: string,\n mediaType: string,\n mediaDuration: number,\n url: string,\n genre: string,\n}\n\nexport interface iOzTamTrackingEvent {\n timestamp: Date,\n event: eOzTamEvent,\n fromPosition: number, // load, begin, preroll aways is 0\n toPosition: number // load, begin, preroll aways is 0\n}\n\nexport interface iOzTamTrackingFields {\n vendorVersion: string,\n plugin: string,\n timestamp: Date,\n sessionId: string,\n timezoneOffset: number,\n protocolVersion: string,\n publisherId: string, // VOD: brightcove cloud account ID; Live: state stream UUID\n publisherName: string, // TEN\n mediaId: string,\n mediaType: string, // \"vod\" || \"live\"\n mediaDuration: number, // content duration (without server side ad duration)\n url: string,\n events: Array, // normally only one\n properties?: iOzTamTrackingProperties // only for begin event\n}\n\nexport interface iOzTamTrackingProperties {\n altMediaId: string | number,\n channel: string,\n classification: string,\n deviceId: string,\n episodeId: string,\n episodeName: string,\n seriesId: string,\n seriesName: string,\n demo1: string,\n connectionType: string,\n}\n\nexport enum eOzTamEvent {\n LOAD = \"LOAD\",\n BEGIN = \"BEGIN\",\n PROGRESS = \"PROGRESS\",\n COMPLETE = \"COMPLETE\",\n AD_BEGIN = \"AD_BEGIN\",\n AD_COMPLETE = \"AD_COMPLETE\",\n}\n\nexport enum eOztamTrigger {\n LOAD = \"load\",\n BEGIN = \"begin\",\n PROGRESS_INTERVAL = \"progressInterval\",\n AD_EVENT = \"adEvent\",\n COMPLETE = \"complete\",\n DISPOSE = \"DISPOSE\",\n}\n\nexport enum eOzTamField {\n ALT_MEDIA_ID = \"altMediaId\",\n SERIES_ID = \"seriesId\",\n EPISODE_ID = \"episodeId\",\n SERIES_NAME = \"seriesName\",\n EPISODE_NAME = \"episodeName\",\n CHANNEL = \"channel\",\n CLASSIFICATION = \"classification\",\n DVB_TRIPLET = \"dvbTriplet\",\n POST_CODE = \"postCode\",\n\n PROGRAM_ID = \"programId\",\n PROGRAM_NAME = \"programName\",\n GENRE = \"genre\",\n DEMO1 = \"demo1\",\n DEMO2 = \"demo2\",\n DEMO3 = \"demo3\",\n DEVICE_ID = \"deviceId\",\n CONNECTION_TYPE = \"connectionType\",\n STREAMING_TYPE = \"streamingType\",\n LATITUDE = \"latitude\",\n LONGITUDE = \"longitude\",\n ORIGINAL_SESSION_ID = \"originalSessionId\"\n}\n\nexport enum DeviceType {\n TV = 'tv',\n Mobile = 'mobile',\n Desktop = 'desktop',\n Tablet = 'tablet'\n}\n\nexport interface STRPayload {\n PublisherName: string;\n SessionId: string;\n RegistrationId: string;\n PublisherId: string;\n IpAddress: string;\n MediaId: string;\n DeviceId: string;\n MediaType: string;\n DeviceType: DeviceType;\n UserAgent: string | null;\n Genre: string | null;\n AdEventId: string | null;\n TimeStamp: string;\n VendorVersion: string,\n Logging?:string | null,\n}\n\nexport class OzTamServiceV2 {\n private _oztamConfig: iOzTamTrackingMeta_Config;\n private _media: iOzTamTrackingMeta_Media;\n private _eventBuilder: (triggerType?: eOztamTrigger) => iOzTamTrackingEvent;\n private _registeredSessionId: string;\n private _STRFields: STRPayload;\n\n private _progressInterval;\n private _log = function(...args) {\n //console.log(...args);\n }\n\n constructor() {\n }\n\n /**\n * can be customized\n */\n\n protected getEventData(eventType: eOzTamEvent, triggerType?: eOztamTrigger): iOzTamTrackingEvent {\n let event = {\n fromPosition: 0,\n toPosition: 0,\n timestamp: new Date(),\n event: eventType\n };\n event = Object.assign(event,this._eventBuilder(triggerType));\n if ([eOzTamEvent.LOAD, eOzTamEvent.BEGIN].indexOf(eventType) >= 0) {\n event.fromPosition = 0;\n event.toPosition = 0;\n }\n\n return event;\n }\n\n public getFields(event: iOzTamTrackingEvent, media: iOzTamTrackingMeta_Media, oztamConfig: iOzTamTrackingMeta_Config): iOzTamTrackingFields {\n let timestamp = new Date();\n\n this._registeredSessionId = this._registeredSessionId || oztamConfig.sessionId || UUID_v4();\n\n return {\n protocolVersion: oztamConfig.protocolVersion,\n vendorVersion: oztamConfig.vendorVersion,\n plugin: oztamConfig.plugin,\n timestamp: timestamp,\n sessionId: this._registeredSessionId,\n timezoneOffset: Math.abs(timestamp.getTimezoneOffset()),\n publisherId: oztamConfig.publisherId,\n publisherName: oztamConfig.publisherName,\n mediaId: media.mediaId,\n mediaType: media.mediaType,\n mediaDuration: media.mediaDuration,\n url: media.url,\n events: [event]\n };\n }\n\n public get hasIntervalRunning() {\n return this._progressInterval >= 0;\n }\n\n public startProgressInterval() {\n this._log(\"### start progress interval\");\n\n this._progressInterval && this.stopProgressInterval();\n this._progressInterval = setInterval(() => {\n this.trackProgress(eOztamTrigger.PROGRESS_INTERVAL);\n }, 1000 * 60);\n }\n\n public stopProgressInterval(triggerType?: eOztamTrigger) {\n if (this._progressInterval === undefined) {\n return;\n }\n this._log(\"### stop progress interval\");\n\n this.trackProgress(triggerType);\n clearInterval(this._progressInterval);\n this._progressInterval = undefined;\n }\n\n /**\n * do not customize below private and protected functions\n */\n public dispatch(fields: iOzTamTrackingFields) {\n if (!this.canDispatch(fields)) {\n this._log(\"could not dispatch\", fields);\n return;\n }\n\n this._log(\"dispatch \", ()=>{ return JSON.stringify(fields.events[0])});\n let that = this;\n requestSend({\n method: \"POST\",\n url: that._oztamConfig.serverTarget,\n headers: {\n \"Content-Type\": \"application/json\"\n },\n data: JSON.stringify(fields)\n })\n }\n\n\n public canDispatch(fields): boolean {\n try {\n let eventObj: iOzTamTrackingEvent = fields.events[0];\n switch (eventObj.event) {\n case eOzTamEvent.PROGRESS:\n const preventDispatch =\n eventObj.toPosition < eventObj.fromPosition || eventObj.toPosition - eventObj.fromPosition < 0.3;\n const missingPosition = eventObj.fromPosition === undefined || eventObj.toPosition === undefined;\n const nanPosition = isNaN(eventObj.fromPosition) || isNaN(eventObj.toPosition);\n const flagPass = !preventDispatch && !missingPosition && !nanPosition;\n if (!flagPass) {\n this._log(\"canDispatch\", {\n preventDispatch,\n missingPosition,\n nanPosition\n }, eventObj);\n }\n return flagPass;\n default:\n return true;\n }\n } catch (e) {\n console.error(e);\n return false;\n }\n }\n\n public startSession(\n oztamConfig,\n media,\n eventBuilder,\n ) {\n this._oztamConfig = oztamConfig;\n this._media = media;\n this._eventBuilder = eventBuilder;\n }\n\n // there is a case that session id given from 3rd party,\n // so can't directly delete/init it in startSession function\n public resetSessionId(sessionId?: string) {\n if (sessionId) {\n this._registeredSessionId = sessionId;\n } else {\n delete this._registeredSessionId;\n }\n }\n\n public async trackLoad() {\n let event = this.getEventData(eOzTamEvent.LOAD, eOztamTrigger.LOAD);\n let fields = this.getFields(event, this._media, this._oztamConfig);\n this._log(\"lib will tracks \", event, fields);\n this.dispatch(fields);\n }\n\n public trackBegin(properties: iOzTamTrackingProperties) {\n let event = this.getEventData(eOzTamEvent.BEGIN, eOztamTrigger.BEGIN);\n let fields = this.getFields(event, this._media, this._oztamConfig);\n fields.properties = properties;\n this._log(\"lib will tracks \", event, fields);\n this.dispatch(fields);\n }\n\n public async trackAdStart(properties?: iOzTamTrackingProperties) {\n let event = this.getEventData(eOzTamEvent.AD_BEGIN, eOztamTrigger.AD_EVENT);\n let fields = this.getFields(event, this._media, this._oztamConfig);\n this._log(\"lib will tracks \", event, fields);\n this.dispatch(fields);\n }\n\n public trackAdComplete() {\n let event = this.getEventData(eOzTamEvent.AD_COMPLETE, eOztamTrigger.AD_EVENT);\n let fields = this.getFields(event, this._media, this._oztamConfig);\n this._log(\"lib will tracks \", event, fields);\n this.dispatch(fields);\n }\n\n /**\n * if \"triggerType\" is given, it must be eOztamTrigger.PROGRESS_INTERVAL\n * else don not send triggerType to getEventData method means casual progress track\n * @param triggerType\n */\n public trackProgress(triggerType?: eOztamTrigger) {\n let event = this.getEventData(eOzTamEvent.PROGRESS, triggerType);\n let fields = this.getFields(event, this._media, this._oztamConfig);\n this._log(\"lib will tracks \", event, fields);\n this.dispatch(fields);\n }\n\n public trackComplete() {\n let event = this.getEventData(eOzTamEvent.COMPLETE, eOztamTrigger.COMPLETE);\n let fields = this.getFields(event, this._media, this._oztamConfig);\n this._log(\"lib will tracks \", event, fields);\n this.dispatch(fields);\n }\n}","\nimport {\n eOzTamField,\n eOztamTrigger,\n iOzTamTrackingEvent,\n iOzTamTrackingMeta_Config,\n iOzTamTrackingMeta_Media,\n iOzTamTrackingProperties,\n OzTamServiceV2\n} from \"./oztam.v2.lib\";\nimport {Tracking} from \"./util/abstract/tracking\";\nimport {iMediaInfo} from \"./allocator.video.type\";\nimport {iOztamV2ExtraInfo} from \"./oztam.v2.type\";\nimport { tenTrack } from \"../tenTrack/track.init\";\nimport {TrackJS} from \"trackjs\";\nimport Axios from 'axios';\n\nexport class OzTamV2 implements Tracking{\n private _oztamConfig: iOzTamTrackingMeta_Config;\n // TODO refactor name without underscore\n public _oztamService: OzTamServiceV2;\n protected _extraInfo: iOztamV2ExtraInfo = {};\n\n private __storedProgressPosition: number;\n protected _storedProgressPositionTimestamp: number;\n\n protected lastPlayTimestamp: number;\n private duringAdBreak: boolean = false;\n \n private _log = function(...args) {\n //console.log(...args);\n }\n\n constructor(protected trackingConfig: iOzTamTrackingMeta_Config) {\n this._oztamService = new OzTamServiceV2();\n this._oztamConfig = trackingConfig;\n }\n\n // this will be set in each OztamService \"track{EventName}\" method when getting event object.\n // In other events such as pause developer need to manually update this position\n set _storedProgressPosition(positionFloat: number) {\n if (isNaN(positionFloat)) {\n this.__storedProgressPosition = -1;\n return;\n }\n\n this.__storedProgressPosition = parseFloat(positionFloat.toFixed(1));\n this._storedProgressPositionTimestamp = Date.now();\n this._log(\"_storedProgressPosition updated to \", this.__storedProgressPosition);\n }\n\n get _storedProgressPosition(): number {\n return this.__storedProgressPosition || 0;\n }\n\n public addExtraVideoInfo(extraInfo: iOztamV2ExtraInfo) {\n this._extraInfo = Object.assign(this._extraInfo, extraInfo);\n }\n\n /**\n * functions in most case have to be overwritten.\n */\n protected defineGetMediaDurationFn(mediaInfo: iMediaInfo, playerRef): number {\n const duration = mediaInfo.duration === undefined ? 0 : parseInt(mediaInfo.duration);\n if(duration === 0){\n TrackJS.console.error(`VideoId: ${mediaInfo.id} has 0 duration`);\n }\n return duration;\n }\n\n protected defineGetMediaPositionFn(mediaInfo: iMediaInfo, playerRef, lastPlayTimestamp?: number): number {\n return Math.round(playerRef.contentTime);\n }\n\n protected defineGetMediaTypeFn() {\n return \"vod\";\n }\n\n protected defineGetPublisherId(mediainfo: iMediaInfo): string {\n switch (this.defineGetMediaTypeFn()) {\n case \"vod\":\n return this.trackingConfig.meta.account_id;\n case \"live\":\n return mediainfo.publisher_id\n }\n }\n\n protected sessionStart(mediainfo: iMediaInfo, playerRef) {\n this._oztamService.startSession(\n Object.assign({\n publisherId: this.defineGetPublisherId(mediainfo)\n }, this._oztamConfig),\n this.defineTrackingMedia(mediainfo, playerRef),\n (triggerType?: eOztamTrigger) => {\n return this.defineTrackingEvent(mediainfo, playerRef, triggerType)\n }\n )\n }\n\n /**\n * normally below functions does not need to be overwritten, just call it and modify the result\n */\n\n protected defineTrackingProperties(mediainfo: iMediaInfo): iOzTamTrackingProperties {\n return {\n [eOzTamField.ALT_MEDIA_ID]: mediainfo.id,\n [eOzTamField.SERIES_ID]: mediainfo.custom_fields.series_crid_id,\n [eOzTamField.EPISODE_ID]: mediainfo.custom_fields.episode_crid_id,\n [eOzTamField.SERIES_NAME]: mediainfo.custom_fields.tv_show,\n [eOzTamField.EPISODE_NAME]: mediainfo.custom_fields.episode_name || \"\",\n [eOzTamField.CHANNEL]: mediainfo.custom_fields.tv_channel,\n [eOzTamField.CLASSIFICATION]: mediainfo.custom_fields.program_classification,\n [eOzTamField.DEVICE_ID]: tenTrack.deviceId,\n [eOzTamField.DEMO1]: this._extraInfo.oztam_userId,\n } as iOzTamTrackingProperties\n }\n\n protected defineTrackingMedia(mediainfo: iMediaInfo, playerRef): iOzTamTrackingMeta_Media {\n return {\n mediaId: mediainfo.custom_fields?.episode_crid_id || mediainfo.custom_fields?.alt_media_id,\n mediaType: this.defineGetMediaTypeFn(),\n mediaDuration: this.defineGetMediaDurationFn(mediainfo, playerRef),\n url: window.location.href,\n genre: mediainfo.video?.ShowGenre,\n } as iOzTamTrackingMeta_Media;\n }\n\n protected defineTrackingEvent(mediainfo: iMediaInfo, playerRef, triggerType?: eOztamTrigger): iOzTamTrackingEvent {\n let previousStoredPosition = this._storedProgressPosition;\n let positions = {\n fromPosition: previousStoredPosition\n } as any;\n\n switch (triggerType) {\n case eOztamTrigger.LOAD:\n return {\n fromPosition: 0,\n toPosition: 0\n } as any;\n case eOztamTrigger.BEGIN:\n this._storedProgressPosition = this.defineGetMediaPositionFn(mediainfo, playerRef);\n return {\n fromPosition: 0,\n toPosition: 0\n } as any;\n\n case eOztamTrigger.AD_EVENT: // includes adStart & adComplete\n positions.toPosition = positions.fromPosition;\n break;\n case eOztamTrigger.COMPLETE:\n this._storedProgressPosition = this.defineGetMediaPositionFn(mediainfo, playerRef);\n positions.fromPosition = positions.toPosition = this._storedProgressPosition;\n break;\n case eOztamTrigger.PROGRESS_INTERVAL:\n if (this.defineGetMediaTypeFn() === \"live\") {\n positions.fromPosition = this.defineGetMediaPositionFn(mediainfo, playerRef, this._storedProgressPositionTimestamp);\n positions.toPosition = this._storedProgressPosition = Math.floor(\n positions.fromPosition + (Date.now() - this._storedProgressPositionTimestamp) / 1000);\n } else {\n positions.toPosition = this._storedProgressPosition = this.defineGetMediaPositionFn(mediainfo, playerRef);\n }\n break;\n default:\n if (this.defineGetMediaTypeFn() === \"live\") {\n positions.fromPosition = this.defineGetMediaPositionFn(mediainfo, playerRef, this._storedProgressPositionTimestamp);\n positions.toPosition = this._storedProgressPosition = Math.floor(\n positions.fromPosition + (Date.now() - this._storedProgressPositionTimestamp) / 1000);\n } else {\n if (eOztamTrigger.DISPOSE === triggerType) {\n // player position will be unavailable when dispose\n positions.toPosition = positions.fromPosition + (Date.now() - this._storedProgressPositionTimestamp) / 1000;\n this._storedProgressPosition = positions.toPosition;\n } else {\n // player.currentTime() after seeking will be seeked position instead the position before seeking action. Use watchPosition which have less than 50ms delay\n /**\n * for chromecast once stream VOD stream with ad\n */\n if (playerRef.getContentPositionFromPayloadPosition) {\n positions.toPosition = playerRef.getContentPositionFromPayloadPosition(playerRef.watchPosition);\n } else {\n positions.toPosition = Math.round(playerRef.watchPosition);\n }\n this._storedProgressPosition = this.defineGetMediaPositionFn(mediainfo, playerRef);\n }\n\n /**\n * in case like chromecast sender backward forward 30 seconds, the BC player currenttime might not be synced position, it is too complex to fix it properly, here it will reduce the duration to normal range, and this case only rarely happens\n */\n if (positions.toPosition - positions.fromPosition >=60) {\n positions.toPosition = positions.fromPosition + (Date.now() - this._storedProgressPositionTimestamp) / 1000;\n }\n if (positions.toPosition - positions.fromPosition >=60) {\n positions.toPosition = positions.fromPosition + 60;\n }\n }\n }\n return positions;\n }\n\n /**\n * event handlers for allocator\n */\n\n public onLoadedMetadata(mediainfo, playerRef) {\n this.sessionStart(mediainfo, playerRef);\n this._oztamService.trackLoad();\n }\n\n public onFirstPlay(mediainfo, playerRef) {\n this.lastPlayTimestamp = Date.now();\n\n this._oztamService.trackBegin(this.defineTrackingProperties(mediainfo));\n this._oztamService.startProgressInterval();\n }\n\n public onPause() {\n if (this.duringAdBreak) {\n return;\n }\n this._oztamService.stopProgressInterval();\n }\n\n public onUnPause(mediainfo, playerRef) {\n this.lastPlayTimestamp = Date.now();\n\n if (this.duringAdBreak) {\n return;\n }\n this._storedProgressPosition = this.defineGetMediaPositionFn(mediainfo, playerRef);\n this._oztamService.startProgressInterval();\n }\n\n public onComplete() {\n this._oztamService.stopProgressInterval();\n this._oztamService.trackComplete();\n }\n\n public onSeeking() {\n this.onPause();\n }\n\n protected onSeeked(mediainfo, playerRef) {\n this.onUnPause(mediainfo, playerRef);\n }\n\n public onAdBreakStart() {\n this._oztamService.stopProgressInterval();\n this.duringAdBreak = true;\n }\n\n public onAdBegin() {\n this._oztamService.trackAdStart();\n }\n\n public onAdComplete() {\n this._oztamService.trackAdComplete();\n }\n\n public onAdBreakEnd(mediainfo, playerRef) {\n this._storedProgressPosition = this.defineGetMediaPositionFn(mediainfo, playerRef);\n this._oztamService.startProgressInterval();\n this.duringAdBreak = false;\n }\n\n public dispose() {\n if (this._oztamService.hasIntervalRunning) {\n this._oztamService.stopProgressInterval(eOztamTrigger.DISPOSE);\n }\n }\n\n public stopTracking() {\n this.dispose();\n }\n\n public resetSessionId() {\n this._oztamService.resetSessionId();\n }\n}","import {CallStack} from \"./util/callStack\";\nimport {Tracking} from \"./util/abstract/tracking\";\nimport {eUtag, iUtag} from \"../ten/env.utag\";\nimport {jwtMember} from \"../pkgPlayer/player/jwt/cacheStatus\";\nimport { getRoundedMinutes, isEmptyObj } from \"./util\";\n\nexport interface iTealiumExtraInfo {\n genre: string,\n genreSecondary: string,\n}\n\nexport interface iTealiumTrackingData {\n showName: string,\n showKey: string,\n showEpisodeName: string,\n showNameTargeting: string,\n showEpisodeVideoType: string,\n showContentName: string,\n showContentFormatType: string,\n showGenre: string,\n showGenreSecondary: string,\n call_type: string,\n platform: string,\n device: string,\n deviceType: string,\n n10adId: string,\n adobeECID: string,\n}\n\nexport interface iTealiumLiveTrackingData extends iTealiumTrackingData {\n showContentSeason: string,\n showContentMarket: string,\n showContentCategory:string,\n showContentId: string,\n showContentVideoId: string,\n showContentVideoType: string,\n showChannel: string,\n showId: string,\n showGenre: string,\n showName: string,\n showProgramClassification: string,\n isMemberGatedLive: string,\n oztamPublisherId: string,\n oztamSessionId: string,\n videoDuration: string,\n adType: string,\n adDuration:number,\n adIndex: number,\n adTitle: string,\n}\n\nexport class Tealium extends CallStack implements Tracking{\n protected mediaInfo;\n protected utag;\n protected mediaTrackingInfo;\n protected extraInfo: iTealiumExtraInfo = {} as any;\n protected videoHasStarted = false;\n\n constructor() {\n super({\n variable: window,\n property: \"utag\",\n });\n this.push(()=>{\n this.utag = (window as any).utag || {};\n this.utag.track = this.utag.track || function(){\n console.error(\"utag is not available\");\n };\n })\n }\n\n // todo - depreciated\n static isLibReady () {\n return !!(window as any).utag;\n }\n\n public addExtraVideoInfo(extraInfo) {\n Object.assign(this.extraInfo, extraInfo);\n }\n\n /**\n * should return string\n */\n protected getMediaGenre(utag_data: iUtag) {\n const genre: any = utag_data[eUtag.showGenre] || this.extraInfo.genre;\n return genre && Array.isArray(genre) && genre.join(\",\") || genre;\n }\n protected getMediaGenreSecondary(utag_data: iUtag) {\n const genre: any = utag_data[eUtag.showGenreSecondary] || this.extraInfo.genreSecondary;\n return genre && Array.isArray(genre) && genre.join(\",\") || genre;\n }\n\n protected getGeneralData (mediaInfo): iTealiumTrackingData | iTealiumLiveTrackingData {\n const {custom_fields, channelDisplayName} = mediaInfo;\n const video_fields = mediaInfo.video;\n const member = jwtMember.getUserDetail();\n const utag_data: iUtag = (window as any).utag_data || {};\n const player = (window as any).player || {};\n const fastChannelTrackData = {\n showContentMarket: custom_fields.showContentMarket,\n showGenre: video_fields.ShowGenre,\n showProgramClassification: video_fields.ShowProgramClassification,\n isMemberGatedLive: video_fields.isMemberGatedLive,\n }\n const trackingData = {\n showName: utag_data[eUtag.showName],\n showNameTargeting: utag_data[eUtag.showNameTargeting] || custom_fields.tv_show,\n n10adId: utag_data[eUtag.n10adId] || \"\",\n showKey: (function () {\n let tvEpisode = custom_fields.tv_episode;\n if (!tvEpisode) {\n return \"\";\n }\n\n let subStringAsKeyMatch = tvEpisode.match(/([a-zA-Z0-9]{1,}[^0-9]{1,})[0-9]{0,}\\//);\n return subStringAsKeyMatch && subStringAsKeyMatch.length >= 2 ? subStringAsKeyMatch[1] : \"\";\n })(),\n showEpisodeName: custom_fields.clip_title,\n showEpisodeVideoType: custom_fields.video_type_long_form,\n showContentId: !utag_data[eUtag.showKey] || utag_data[eUtag.showKey] === undefined ? utag_data[eUtag.showContentId] : utag_data[eUtag.showKey]+\":\"+ utag_data[eUtag.showContentCategory].toLowerCase(),\n showId: mediaInfo.id,\n showContentName: utag_data[eUtag.showContentName] || document.title?.replace(\"- Network Ten\", \"\"),\n showContentVideoId: utag_data[eUtag.showContentVideoId] || custom_fields.alt_media_id,\n showChannel: channelDisplayName || custom_fields.tv_channel || utag_data[eUtag.showChannel],\n showContentVideoType: custom_fields.video_type_long_form ||utag_data[eUtag.showContentVideoType],\n showContentCategory: utag_data[eUtag.showContentCategory],\n showContentSeason: custom_fields.season || utag_data[eUtag.showContentSeason],\n showContentFormatType: custom_fields.video_type_long_form === \"Full Episode\" ? \"Long Form\" : custom_fields.video_type_long_form === \"Live\" ? \"live\" : \"Short Form\",\n showGenre: this.getMediaGenre(utag_data),\n showGenreSecondary: this.getMediaGenreSecondary(utag_data),\n videoDuration: mediaInfo.duration,\n adType: mediaInfo.adType,\n adDuration:mediaInfo.adDuration,\n adIndex:mediaInfo.adIndex,\n adTitle:mediaInfo.adTitle,\n oztamPublisherId: mediaInfo.publisher_id,\n oztamSessionId: custom_fields.oztamSessionId,\n autoPlayFlag: jwtMember.getAutoplaySetting(),\n call_type: \"link\",\n platform: \"web\",\n device: \"web\",\n deviceType: \"web\",\n adobeECID: utag_data.deviceIdAdobe,\n }\n\n if (custom_fields.video_type_long_form === \"Live\") {\n return Object.assign(trackingData, fastChannelTrackData);\n }\n\n return trackingData;\n }\n\n protected getAdData (mediaInfo, adInfo) {\n const adDataIsEmpty = isEmptyObj(adInfo);\n const generalData = this.getGeneralData(mediaInfo);\n return adDataIsEmpty ? generalData : Object.assign({}, generalData, adInfo);\n }\n\n setMediaInfo(mediaInfo) {\n this.mediaInfo = mediaInfo;\n }\n load(mediaInfo) {\n this.mediaInfo = mediaInfo;\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_load\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n firstPlay () {\n if (!this.mediaInfo) {\n return;\n }\n this.videoHasStarted = true;\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_start\";\n this.mediaTrackingInfo.urlCode = this.mediaInfo.id;\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n onChangeVideo () {\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_up_next\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n pause () {\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_pause\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n seeking () {\n if (!this.mediaInfo || !this.videoHasStarted) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_seeking\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n finished () {\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_complete\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n segmentView () {\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_segment_view\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n adStart (matadata, playerRef, adData) { \n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getAdData(this.mediaInfo, adData);\n this.mediaTrackingInfo.tealium_event = \"ad_start\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n adEnd (matadata, playerRef, adData) {\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getAdData(this.mediaInfo, adData);\n this.mediaTrackingInfo.tealium_event = \"ad_end\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n onExit (mediainfo, playerRef, extraData) {\n if (!this.mediaInfo) {\n return;\n }\n const customExitData = extraData ? extraData : {'videoWatchedDuration' : (playerRef?.playbackTime || 0) > 0 ? getRoundedMinutes(playerRef.playbackTime).toString() : '0'};\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n Object.assign(this.mediaTrackingInfo, customExitData);\n this.mediaTrackingInfo.tealium_event = \"video_exit\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n\n public dispose() {\n super.dispose();\n }\n\n public stopTracking() {\n this.dispose();\n }\n}\n","import {iTrackingService} from \"./tracking.conf.type\";\nimport {deviceType} from \"../pkgPlayer/player/util/device\";\n\nexport const trackingServiceConfig: iTrackingService = {\n oztam: {\n enabled: true,\n config: {\n staging: {\n serverTarget: \"//sdeliver.oztam.com.au/api/meter\",\n protocolVersion: \"1\",\n vendorVersion: deviceType === \"mobile\" ? \"10play_webmobile_4.1\" : \"10play_webdesktop_4.1\",\n plugin: \"javascript\",\n meta: {\n account_id: \"2199827728001\"\n }\n },\n production: {\n serverTarget: \"//deliver.oztam.com.au/api/meter\",\n protocolVersion: \"1\",\n vendorVersion: deviceType === \"mobile\" ? \"10play_webmobile_4.1\" : \"10play_webdesktop_4.1\",\n plugin: \"javascript\",\n meta: {\n account_id: \"2199827728001\"\n }\n }\n }\n },\n mux: {\n enabled: true,\n config: {\n staging: {\n key: \"52g3d6oag448r0bhh5fovnch1\",\n },\n production: {\n key: \"aj41vmodeesojujgtkmm1sfcu\",\n }\n }\n }\n};","export interface iEnv {\n productionHostName: string | Array;\n isProduction: () => boolean;\n isStaging: () => boolean;\n}\n\n/**\n * Global environment setting\n * @type {iEnv}\n */\nlet envTemp: iEnv = {} as any;\n\nif (typeof window !== \"undefined\"){\n envTemp = {\n productionHostName: [\n \"10play.com.au\",\n \"www.10play.com.au\"\n ],\n isProduction: () => {\n let prodDomain = envTemp.productionHostName;\n if (typeof prodDomain === \"string\") {\n return !!(prodDomain && window.location.hostname === prodDomain);\n }\n\n if (prodDomain && Array.isArray(prodDomain)) {\n return prodDomain.indexOf(window.location.hostname) >= 0;\n }\n },\n isStaging: () => {\n return !envTemp.isProduction();\n }\n };\n}\n\nexport const env = envTemp;","/**\n * make sure bind \"this\" to these methods while calling\n */\nimport {env} from \"./tracking.env\";\n\nexport function initOztam(OztamClass) {\n if (this._servicesConfig?.oztam?.enabled) {\n return new OztamClass(\n env.isStaging() ?\n this._servicesConfig.oztam.config.staging :\n this._servicesConfig.oztam.config.production\n );\n }\n}\n\nexport function initTealium(TealiumClass) {\n return new TealiumClass();\n}","import { env } from \"../pkgAviaAllocator/tracking.env\";\n\nexport function UUID_v4() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }\n\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n}\n\n\ninterface iRestParam {\n method: \"POST\" | \"GET\",\n url: string,\n headers: { [header: string]: string },\n successCallback?,\n failCallback?,\n isAsync?: boolean,\n data?: any\n}\n\n\n\nexport async function requestSend(param: iRestParam) {\n fetch(param.url, {\n method: param.method,\n headers: param.headers,\n body: param.data,\n keepalive: true\n }).then( response => {\n if (response.ok) {\n return response.text();\n }\n }).catch(error => {\n console.log(error);\n });\n}\n\nexport function rest(param: iRestParam) {\n let request = new XMLHttpRequest();\n request.open(param.method, param.url);\n let headerNames = Object.keys(param.headers);\n for (let i = 0; i < headerNames.length; i++) {\n let headerName = headerNames[i];\n request.setRequestHeader(headerName, param.headers[headerName]);\n }\n\n if (param.successCallback) {\n request.onreadystatechange = function() {\n if (request.readyState !== 4 || request.status !== 200) {\n return;\n }\n\n try {\n param.successCallback(request.responseText);\n } catch (e) {\n param.failCallback && param.failCallback(e);\n }\n }\n }\n if (param.failCallback) {\n request.onerror = param.failCallback;\n }\n\n request.send(param.method.toLowerCase() === \"post\" && param.data)\n}\n\n\n\nexport function isIOS(): boolean {\n if (typeof window === \"undefined\") {\n return false;\n }\n\n return [\n // this Simulator is iOS simulator, not browser simulator,\n // means browser simulator of iOS return false here\n 'iPad Simulator',\n 'iPhone Simulator',\n 'iPod Simulator',\n 'iPad',\n 'iPhone',\n 'iPod'\n ].some(function(exactPlatformString) {\n return navigator.platform === exactPlatformString\n });\n}\n\nexport const isEmptyObj = (obj: any) => {\n return obj === null || obj === undefined ||\n (Array.isArray(obj) && obj.length === 0) ||\n \"object\" === typeof obj && Object.keys(obj).length === 0 ||\n \"string\" === typeof obj && obj === '';\n}\n\n\n//Requirement: Rounded to the nearest minute eg: if user watches 50 min and 1 -30 sec then pass through 50, if user watches 50min and 31 - 60 sec then pass through 51\nexport function getRoundedMinutes(duration: number) {\n let roundedDuration = Math.floor(duration / 60);\n let remainder = duration % 60;\n if (remainder >= 30) {\n roundedDuration += 1;\n }\n return roundedDuration;\n}\n\n\nexport function Timer(callback: () => void, startTime: number, endTime:number) {\n let timerId: number, start: number, remaining = endTime - startTime;\n let paused = false;\n let pausedTime = 0;\n\n function pause() {\n window.clearTimeout(timerId);\n remaining -= Date.now() - start;\n paused = true;\n pausedTime = remaining;\n }\n\n function resume() {\n start = Date.now();\n window.clearTimeout(timerId);\n timerId = window.setTimeout(callback, remaining);\n paused = false;\n }\n\n this.pause = pause;\n this.resume = resume;\n\n resume();\n}\n\nexport function getDomain(): string {\n return env.isProduction() ? 'https://10play.com.au' : 'https://ww1.10play.com.au'\n}\nexport function getUserIp() {\n return new Promise((resolve, reject) => {\n fetch(`${getDomain()}/whatismyip`)\n .then(res => res.json())\n .then(data => {\n resolve(data.ip);\n })\n .catch(err => reject(err));\n });\n}","import {Dispose} from \"./abstract/dispose\";\n\nexport interface iCallStackConfig {\n variable: any,\n property: string,\n ms?: number,\n}\n\nexport class CallStack implements Dispose{\n private interval: number;\n private callbacks: Array = [];\n\n constructor(private config: iCallStackConfig) {\n config.ms = config.ms || 25;\n this.watch();\n }\n\n protected push (fn: Function) {\n this.callbacks.push(fn);\n\n if (this.isReady()) {\n this.onReady();\n }\n }\n\n\n private watch() {\n this.interval = window.setInterval(() => {\n if (this.isReady()) {\n this.onReady();\n window.clearInterval(this.interval);\n }\n }, this.config.ms)\n }\n private isReady() {\n const config = this.config;\n return typeof config.variable === \"object\" && config.variable[config.property];\n }\n private onReady() {\n if (Array.isArray(this.callbacks)) {\n this.callbacks.forEach(fn=>{\n typeof fn === \"function\" && fn();\n });\n this.callbacks = [];\n }\n }\n\n public dispose() {\n this.interval && window.clearInterval(this.interval);\n this.callbacks = [];\n }\n\n}","import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';\n\nexport interface iBVodData {\n Demo: string;\n BvodId: string;\n BvodIdSalt: string;\n}\n\nexport class AuthenticatedEndpointHandler {\n private apiKey: string;\n private publisherName: string;\n private authToken: string | null;\n private baseUrl: string;\n\n constructor(apiKey: string, publisherName: string) {\n this.apiKey = apiKey;\n this.publisherName = publisherName;\n this.authToken = null;\n this.baseUrl = 'https://realtime-demos.oztam.com.au';\n }\n\n private async requestToken(): Promise {\n try {\n const response: AxiosResponse = await axios.post(`${this.baseUrl}/sign_jwt`, {\n PublisherName: this.publisherName\n }, {\n headers: { 'api-key': this.apiKey }\n });\n\n this.authToken = response.data.access_token;\n return this.authToken;\n } catch (error) {\n this.handleError('signJWT', error);\n throw error;\n }\n }\n\n private async ensureAuthToken(): Promise {\n if (!this.authToken) {\n await this.requestToken();\n }\n }\n\n private async retryRequest(func: () => Promise, retries: number = 3): Promise {\n let attempt = 0;\n while (attempt < retries) {\n try {\n return await func();\n } catch (error) {\n if (!error.response || error.code === 'ECONNABORTED' || error.response.status === 500) {\n attempt++;\n if (attempt < retries) {\n await this.delay(300); // Retry after 300ms\n } else {\n throw error;\n }\n } else {\n throw error;\n }\n }\n }\n throw new Error('Max retries reached');\n }\n\n private async delay(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n }\n\n public async postAuthenticatedData(endpoint: string, data: any): Promise {\n await this.ensureAuthToken();\n return this.retryRequest(() => this.makeAuthenticatedPostRequest(endpoint, data));\n }\n\n private async makeAuthenticatedPostRequest(endpoint: string, data: any): Promise {\n const config: AxiosRequestConfig = {\n headers: { Authorization: `Bearer ${this.authToken}` }\n };\n\n return await axios.post(`${this.baseUrl}${endpoint}`, data, config);\n }\n\n public async postUnauthenticatedData(endpoint: string, data: any): Promise {\n return this.retryRequest(() => axios.post(`${this.baseUrl}${endpoint}`, data));\n }\n\n public mapBvodDataToOztamParams(bvodData: { BvodId: string; Demo: string; BvodIdSalt: string; }[]): [string, string][] {\n const oztamParamsArray: [string, string][] = [];\n bvodData.forEach((item, index) => {\n oztamParamsArray.push([`oztam_${index + 1}`, item.BvodId]);\n oztamParamsArray.push([`oztam_${index + 1}demo`, item.Demo]);\n oztamParamsArray.push([`oztam_${index + 1}salted`, item.BvodIdSalt.toLowerCase()===\"none\" ? '' : item.BvodIdSalt]);\n }); \n return oztamParamsArray;\n }\n\n public addCustParamsCsi(resource: any, bcodData: [string, string][]): string {\n if (!resource || !resource.ad || !resource.ad.csai || !resource.ad.csai.adCallUrl) {\n return;\n }\n \n let adCallUrl: string = resource.ad.csai.adCallUrl;\n let url = new URL(adCallUrl);\n let params = new URLSearchParams(url.search);\n let custParams = params.get('cust_params');\n \n if (!custParams) {\n throw new Error('cust_params not found in the URL');\n }\n \n let custParamsObj: { [key: string]: string } = {};\n custParams.split('&').forEach(param => {\n let [key, value] = param.split('=');\n custParamsObj[key] = value;\n });\n \n bcodData.forEach(([key, value]) => {\n custParamsObj[key] = value;\n });\n \n let newCustParams = Object.entries(custParamsObj).map(([key, value]) => `${key}=${value}`).join('&');\n params.set('cust_params', newCustParams);\n adCallUrl = `${url.origin}${url.pathname}?${params.toString()}`;\n \n resource.ad.csai.adCallUrl = adCallUrl;\n \n return resource.ad.csai.adCallUrl;\n }\n\n\n public addCustParamsSsi(resource: any, bvodData: [string, string][]): string {\n if (!resource || !resource.ad || !resource.ad.ssai || !resource.ad.ssai.adParameters) {\n return;\n }\n \n let custParams = resource.ad.ssai.adParameters.cust_params;\n \n if (!custParams) {\n throw new Error('cust_params not found in adParameters');\n }\n \n let custParamsObj: { [key: string]: string } = {};\n custParams.split('&').forEach(param => {\n let [key, value] = param.split('=');\n custParamsObj[key] = value;\n });\n \n bvodData.forEach(([key, value]) => {\n custParamsObj[key] = value;\n });\n \n let newCustParams = Object.entries(custParamsObj).map(([key, value]) => `${key}=${value}`).join('&');\n resource.ad.ssai.adParameters.cust_params = newCustParams;\n \n return resource.ad.ssai.adParameters.cust_params;\n }\n private handleError(type: string, error: any): void {\n const status = error.response ? error.response.status : 'Unknown';\n const message = error.message || 'No message available';\n\n console.error(`[${type} Error] Status: ${status}, Message: ${message}`);\n }\n}","export class Api {\n static attachApiUrl(url) {\n if (typeof window !== \"undefined\" && window.apiUrl) {\n url = window.apiUrl + url;\n }\n return \"//\" + url.replace(/([^:])\\/\\//, \"$1/\").replace(\"https://\", \"\");\n }\n}\n","import {iUapApiVideoData} from \"./api.video.type\";\nimport {iPlaybackInfoApiType} from \"./api.video.type\";\nimport {jwtMember} from \"../../tenMember/jwt/cacheStatus\";\nimport {eJwtRefreshToken, jwtRefreshToken} from \"../../tenMember/jwt/api/jwtToken\";\nimport {Api} from \"./api\";\n\nexport class ApiVideo {\n static getPlaybackInfoPath(urlCode: string): string {\n return Api.attachApiUrl(`/api/v1/videos/playback/${urlCode}/?platform=web`);\n }\n\n /**\n * return playbackInfo OR null for fail OR undefined for no action taken\n * @param urlCode\n * @param freeWheelEnabled\n * @param drmEnabled\n */\n static async getPlaybackInfo(\n urlCode: string, \n freeWheelEnabled: boolean,\n drmEnabled: boolean\n ): Promise {\n try {\n const refreshResult = await jwtRefreshToken();\n \n const headers: Record = {};\n\n // Handle feature flags\n if (freeWheelEnabled && drmEnabled) {\n headers[\"TP-AcceptFeature\"] = \"v1/fw;v1/drm\";\n } else if (freeWheelEnabled) {\n headers[\"TP-AcceptFeature\"] = \"v1/fw\";\n } else if (drmEnabled) {\n headers[\"TP-AcceptFeature\"] = \"v1/drm\";\n }\n\n if (refreshResult === eJwtRefreshToken.active) {\n const accessToken = jwtMember.getAccessToken();\n if (accessToken) {\n headers.Authorization = `Bearer ${accessToken}`;\n } else {\n console.warn(\"Access token is missing.\");\n }\n }\n \n const url = ApiVideo.getPlaybackInfoPath(urlCode);\n const response = await fetch(url, {\n method: \"GET\",\n headers,\n });\n \n if (!response.ok) {\n console.error(`Error fetching playback info from ${url}:`, response.statusText);\n return null;\n }\n \n const streamSignature = response.headers.get('x-stream-sig');\n const daiAuthToken = response.headers.get('x-dai-auth');\n const responseData = await response.json();\n \n if (!responseData) {\n console.warn(\"Received empty response data.\");\n return null;\n }\n \n return {\n ...responseData,\n streamSignature: streamSignature || responseData.streamSignature || \"default-signature\",\n daiAuthToken: daiAuthToken || responseData.daiAuthToken || \"default-dai-auth-token\",\n } as iPlaybackInfoApiType;\n \n } catch (error) {\n console.error(\"Fetch error:\", error);\n return null;\n }\n }\n \n \n \n\n static getVideoWebPath(urlCode: string) {\n return Api.attachApiUrl(`/api/video/${urlCode}`);\n }\n\n static getVideoUapPath(urlCode: string):string {\n return Api.attachApiUrl(`/api/v1/videos/${urlCode}`);\n }\n static async getVideoUapInfo(urlCode: string): Promise {\n const url = ApiVideo.getVideoUapPath(urlCode);\n const response = await fetch(url,{\n method: \"get\",\n })\n .then(res=>res.json())\n .catch((err)=>{\n console.error(err);\n });\n return response as iUapApiVideoData;\n }\n}","import * as avia from '@cbsinteractive/avia-js';\n\nif (typeof window !== \"undefined\") {\n window.avia = avia;\n}\n\nexport { VideoPlayerInterface, PlayerEvent } from '@cbsinteractive/avia-js';","import {\n\tPlayerEvent,\n\ttype PluginConfigInterface,\n\ttype PluginInterface,\n\ttype PluginServicesInterface,\n} from '@cbsinteractive/avia-js';\n\nimport { ConsumerAdviceOptions } from './iface/ConsumerAdviceOptions';\nimport { env } from '../../../ten/conf.env';\n\nexport const ConsumerAdvice = 'consumeradvice';\n\nexport function consumeradvice(options: Partial = {}): PluginConfigInterface {\n\treturn {\n\t\tid: ConsumerAdvice,\n\t\tfactory: createConsumerAdvice,\n\t\toptions,\n\t};\n}\n\nexport async function createConsumerAdvice(services: PluginServicesInterface, options: ConsumerAdviceOptions): Promise {\n\tconst { consumerAdviceOptions } = options;\n\tconst { player, dom } = services;\n\tconst {isLive} = consumerAdviceOptions;\n\n\tconst consumerAdviceTimer = consumerAdviceOptions.duration * 1000;\n\tlet consumerAdviceActive = false;\n\tconst panel = dom.main;\n\tlet container: HTMLElement | null = null;\n\tlet consumerAdviceTimerId: ReturnType;\n\n\t// get url param from the browser\n\tconst url = new URL(window.location.href);\n\tconst debug = url.searchParams.get('debug') === 'ca';\n\n\tconst createConsumerAdviceElement = () => {\n\n\t\tconst excludedList = [\n\t\t\t\n\t\t] // Add assetKeys to exclude from consumer advice could be used for testing\n\t\t\n\t\tconst assetKey = player?.resource?.ad?.ssai?.assetKey || \"\";\n\t\tconst shouldExclude = excludedList.includes(assetKey);\n\n\t\tlet classification: string = \"\";\n\t\tlet consumerAdvice: string = \"\";\n\n\t\tconst displayOverlay = isLive ? consumerAdviceOptions?.displayOverlay : player?.resource?.metadata?.displayOverlay ?? false;\n\t\t\n\t\tclassification = isLive ? (consumerAdviceOptions?.classification || player?.resource?.metadata?.classification || \"\") : (player?.resource?.metadata?.classification || \"\");\n\t\tconsumerAdvice = isLive ? (consumerAdviceOptions?.consumerAdvice || player?.resource?.metadata?.consumerAdvice || \"\") : (player?.resource?.metadata?.consumerAdvice || \"\");\n\n\t\tlogger('Consumer Advice, classification: ', classification);\n\t\tlogger('Consumer Advice, consumerAdvice: ', consumerAdvice);\n\t\tlogger('Consumer Advice, displayOverlay: ', displayOverlay);\n\n\t\tif (!classification || [\"none\", \"e\", \"\"].includes(classification.toLowerCase()) || !displayOverlay || shouldExclude) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer = document.createElement('div');\n\t\tcontainer.classList.add('consumer-advice', 'remove');\n\t\tcontainer.style.position = 'absolute';\n\t\tcontainer.style.transition = 'opacity 5s ease-in-out';\n\n\t\tconst adviceContainer = document.createElement('div');\n\t\tadviceContainer.classList.add('consumer-advice__container');\n\n\t\tconst wrapper = document.createElement('div');\n\t\twrapper.classList.add('consumer-advice__wrapper');\n\n\t\tconst divider = document.createElement('div');\n\t\tdivider.classList.add('consumer-advice__divider');\n\n\n\t\tconst text = document.createElement('div');\n\t\ttext.classList.add('consumer-advice__text');\n\t\ttext.innerHTML = `

    Rated ${classification}

    ${consumerAdvice ? `
    ${consumerAdvice}
    ` : ''}`;\n\n\t\twrapper.appendChild(divider);\n\t\twrapper.appendChild(text);\n\t\tadviceContainer.appendChild(wrapper);\n\t\tcontainer.appendChild(adviceContainer);\n\n\t\tpanel.appendChild(container);\n\n\t\tlogger('Consumer Advice, created element: ', container);\n\n\t};\n\n\tconst displayConsumerAdviceElement = () => {\n\t\t\n\t\tif (consumerAdviceActive) {\n\t\t\treturn;\n\t\t}\n\t\tconst adviceContainer = container?.querySelector('.consumer-advice__container') as HTMLElement;\n\t\tif (!adviceContainer) {\n\t\t\treturn;\n\t\t}\n\t\tconst isEmpty = container.children.length === 0;\n\t\tif (!isEmpty) {\n\t\t\tadviceContainer.style.opacity = '1';\n\t\t\tcontainer.classList.remove('remove');\n\t\t\tcontainer.style.display = 'block';\n\n\t\t\tcontainer.style.transition = 'opacity 2s ease-in-out';\n\n\t\t\tif (debug) {\n\t\t\t\tconsole.log('Consumer Advice is displayed');\n\t\t\t}\n\t\t\tshowConsumerAdvice();\n\t\t\tconsumerAdviceActive = true;\n\t\t\tstartConsumerAdviceTimer()\n\t\t}\n\n\t\tlogger('Consumer Advice, displayed element: ', container);\n\t};\n\n\tconst startConsumerAdviceTimer = () => {\n\t\tif (consumerAdviceTimerId) {\n\t\t\tclearTimeout(consumerAdviceTimerId);\n\t\t}\n\t\tconsumerAdviceTimerId = setTimeout(() => {\n\t\t\tlogger('Consumer Advice, timer expired');\n\t\t\tcontainer.style.opacity = '0';\n\t\t\tcontainer.addEventListener('transitionend', () => {\n\t\t\t\tcontainer.style.display = 'none';\n\t\t\t\tremoveConsumerAdvice();\n\t\t\t});\n\t\t}, consumerAdviceTimer);\n\n\t\tlogger('Consumer Advice, started timer: ', consumerAdviceTimerId);\n\t};\n\n\tconst hideConsumerAdvice = () => {\n\t\tif (!container) {\n\t\t\treturn;\n\t\t}\n\t\tcontainer.style.opacity = '0';\n\t\tcontainer.style.display = 'none';\n\t};\n\n\tconst showConsumerAdvice = () => {\n\t\tif (!container) {\n\t\t\treturn;\n\t\t}\n\t\tif (consumerAdviceTimerId) {\n\t\t\tclearTimeout(consumerAdviceTimerId);\n\t\t\tstartConsumerAdviceTimer();\n\t\t}\n\t\tcontainer.style.display = 'block';\n\t\tcontainer.style.opacity = '1';\n\t\tlogger('Consumer Advice, showing element: ', container);\n\t};\n\n\tconst removeConsumerAdvice = () => {\n\t\tif (!container) {\n\t\t\treturn;\n\t\t}\n\t\tcontainer.remove();\n\t\tclearTimeout(consumerAdviceTimerId);\n\t\tconsumerAdviceActive = false;\n\t\tlogger('Consumer Advice, removed element: ', container);\n\t}\n\n\n\t// Player Event Handlers ------------------------------------------------------\n\tconst handlePlayerEvent = async (evt) => {\n\t\tif(player.isAd) {\n\t\t\thideConsumerAdvice();\n\t\t};\n\t\tif(!consumerAdviceActive) {\n\t\t\treturn;\n\t\t}\n\t\tswitch (evt.type) {\n\t\t\tcase PlayerEvent.PLAYBACK_STATE_CHANGE:\n\t\t\t\tif (evt.detail.playbackState === 'stopped') {\t\t\t\t\t\n\t\t\t\t\tremoveConsumerAdvice();\n\t\t\t\t\tlogger('Consumer Advice, playback stopped');\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase PlayerEvent.ACTIVE_STATE_CHANGE:\n\t\t\t\tconst { activeState } = evt.detail;\n\t\t\t\tif (activeState === 'active') {\n\t\t\t\t\tlogger('Consumer Advice, control bar active state');\n\t\t\t\t\thideConsumerAdvice();\n\t\t\t\t} else if (activeState === 'inactive'|| activeState === 'idle' && consumerAdviceActive) {\n\t\t\t\t\tif (!player.isAd) {\n\t\t\t\t\t\tlogger('Consumer Advice, is Ad: ', player.isAd);\n\t\t\t\t\t\tshowConsumerAdvice();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PlayerEvent.AD_BREAK_COMPLETE:\n\t\t\t\tif(consumerAdviceActive){\n\t\t\t\t\tlogger('Consumer Advice, ad break complete');\n\t\t\t\t\tshowConsumerAdvice();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\nconst handleDestroy = () => {\n\tclearTimeout(consumerAdviceTimerId);\n\n\tconst eventTypes = Object.values(PlayerEvent);\n\teventTypes.forEach((eventType) => player.off(eventType, handlePlayerEvent));\n\n\tlogger('Consumer Advice, destroyed');\n\n\tremoveConsumerAdvice(); \n\t};\n\t\n\n\tconst eventTypes = PlayerEvent;\n\tfor (const key in eventTypes) {\n\t\tplayer.on(eventTypes[key], (event) => {\n\t\t\thandlePlayerEvent(event);\n\t\t});\n\t};\n\n\tplayer.on(PlayerEvent.STREAM_METADATA, createConsumerAdviceElement);\n\tplayer.on(PlayerEvent.CONTENT_START, displayConsumerAdviceElement);\n\n\n\tconst logger = (message: string, ...optionalParams: any[]) => {\n\t\tif (debug && !env.isProduction()) {\n\t\t\tconsole.log('%c' + message, 'color: yellow; font-weight: bold;', ...optionalParams);\n\t\t}\n\t};\n\n\treturn {\n\t\tgetId() {\n\t\t\treturn ConsumerAdvice;\n\t\t},\n\n\t\tdestroy: handleDestroy,\n\t};\n}\n","// Used for tracking\nexport const accountID = 2199827728001;","import \"./avia.lib\";\nimport \"./index.type\";\n\n/**\n * Make sure any import reference to avia ctrl is imported from here,\n * instead of other files in this pkgPlayer folder\n */\nexport { PlayerStates } from './player/playerCtrl.type';\nexport { PlayerCtrl } from \"./player/playerCtrl\";\nexport { VodCtrl } from './vod/vodCtrl';\nexport { LiveCtrl } from './live/liveCtrl';\n","declare global {\n interface Window {\n adsStatus: string | undefined,\n admiral: any,\n avia: any,\n cvui: any,\n aviaui: any,\n tenService: any,\n tvid_callback: any;\n vtg: any,\n apiUrl: any,\n adsOk: any,\n player: any\n geoip2: any,\n utag_data: any,\n remoteAPIControl: any,\n }\n}\n\nexport const ignore = undefined; // make this file module","import type { PluginConfigInterface, PluginInterface, PluginServicesInterface, ResourceConfigurationInterface } from '@cbsinteractive/avia-js';\nimport { AviaLogoDisplayOverlayOptionsInterface } from './AviaLogoOverlayOptionsInterface';\n\nexport const LOGODISPLAYOVERLAY = 'logodisplayoverlay';\n\nexport function logoOverlay(options: Partial = {}): PluginConfigInterface {\n\treturn {\n\t\tid: LOGODISPLAYOVERLAY,\n\t\tfactory: createLogoDisplayOverlayPlugin,\n\t\toptions,\n\t};\n}\n\nexport function createLogoDisplayOverlayPlugin(services: PluginServicesInterface, options: AviaLogoDisplayOverlayOptionsInterface): PluginInterface {\n\tlet resource: ResourceConfigurationInterface;\n\tlet panel: any;\n\tlet listening = false;\n\tconst { debug} = options;\n\n\tconst { player, dom } = services;\n\tconst { PlayerEvent } = services.avia;\n\tconst container = dom.main;\n\n\n\tconst styles = {\n\t\toverlayImage: {\n\t\t\tmaxWidth: \"130px\",\n\t\t},\n\t};\n\n\tconst listen = () => {\n\t\tif (debug) {\n\t\t\tObject.values(PlayerEvent).forEach((value) => {\n\t\t\t\tif (/^ad|error|content/.test(value) && !/progress/.test(value)) {\n\t\t\t\t\tplayer.on(value, (event) => {\n\t\t\t\t\t\tconsole.log(`%cEvent 🚀 : ${event.type}`, 'color: #4cf');\n\t\t\t\t\t\tif (event.type === 'error') {\n\t\t\t\t\t\t\tconsole.log('ERROR');\n\t\t\t\t\t\t\tconsole.dir(event.detail)\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t};\n\n\tconst onContentStart = () => {\n\t\tresource = player.resource as ResourceConfigurationInterface;\n\t\tif (listening) {\n\t\t\treturn;\n\t\t}\n\t\tconst logoUrl = window.player.logoUrl;\n\t\tpanel = document.createElement('div');\n\t\tpanel.classList.add('logo-overlay');\n\t\tpanel.style.zIndex = options.level || 100;\n\t\tpanel.style.position = 'absolute';\n\t\tpanel.style.top = '5%';\n\t\tpanel.style.left = '0';\n\t\tpanel.style.padding = '0.5% 2% 0.5% 8%';\n\t\tpanel.style.maxWidth = '23%';\n\t\tpanel.style.boxShadow = 'inset 0 0 0 100vmax rgba(0, 0, 0, .7)';\n\t\tconst imageTag = panel.getElementsByTagName('img');\n\t\tif (imageTag.length > 0) {\n\t\t\timageTag[0].style.maxWidth = '100%';\n\t\t}\n\t\tpanel.innerHTML = ``;\n\t\tcontainer.appendChild(panel);\n\t\tpanel.style.display = 'none';\n\t\tpanel.style.opacity = 0;\n\t\tlistening = true;\n\t};\n\n\tconst onEnded = (event: any) => {\n\t\tif (!resource) {\n\t\t\treturn;\n\t\t}\n\t\tlistening = false;\n\t\tcontainer.removeChild(panel);\n\t};\n\n\tconst onActiveStateChange = (event: any) => {\n\t\tif(!panel) {\n\t\t\treturn;\n\t\t}\n\t\tif (event.detail.activeState === 'active') {\n\t\t\tpanel.style.display = 'block';\n\t\t\tfadeIn(panel, fadeOut(panel));\n\t\t} else {\n\t\t\tfadeOut(panel, fadeIn(panel));\n\t\t}\n\t}\n\n\t\n\tconst fadeIn = (element: HTMLElement, fadeOutInterval?: NodeJS.Timeout) => {\n\t\tlet opacity = 0;\n\t\telement.style.display = 'block';\n\t\tconst interval = setInterval(() => {\n\t\t\tif (opacity >= 1) {\n\t\t\t\tclearInterval(interval);\n\t\t\t} else {\n\t\t\t\topacity += 0.1;\n\t\t\t\telement.style.opacity = opacity.toString();\n\t\t\t}\n\t\t}, 50);\n\t\tif (fadeOutInterval) {\n\t\t\tclearInterval(fadeOutInterval);\n\t\t}\n\t\treturn interval;\n\t};\n\n\tconst fadeOut = (element: HTMLElement, fadeInInterval?: NodeJS.Timeout) => {\n\t\tlet opacity = 1;\n\t\tconst interval = setInterval(() => {\n\t\t\tif (opacity <= 0) {\n\t\t\t\tclearInterval(interval);\n\t\t\t\telement.style.display = 'none';\n\t\t\t} else {\n\t\t\t\topacity -= 0.1;\n\t\t\t\telement.style.opacity = opacity.toString();\n\t\t\t}\n\t\t}, 10);\n\t\tif (fadeInInterval) {\n\t\t\tclearInterval(fadeInInterval);\n\t\t}\n\t\treturn interval;\n\t};\n\t\n\tplayer.on(PlayerEvent.READY , listen);\n\tplayer.on(PlayerEvent.CONTENT_SEGMENT_START, onContentStart);\n\tplayer.on(PlayerEvent.CONTENT_SEGMENT_END, onEnded);\n\tplayer.on(PlayerEvent.ACTIVE_STATE_CHANGE, onActiveStateChange);\n\n\treturn {\n\t\tgetId() {\n\t\t\treturn LOGODISPLAYOVERLAY;\n\t\t},\n\n\t\tdestroy() {\n\t\t\tif (panel) {\n\t\t\t\tpanel.onclick = null;\n\t\t\t\tcontainer.removeChild(panel);\n\t\t\t}\n\t\t\tplayer.off(PlayerEvent.CONTENT_SEGMENT_START, onContentStart);\n\t\t\tplayer.off(PlayerEvent.CONTENT_SEGMENT_END, onEnded);\n\t\t\tlistening = false;\n\t\t},\n\t};\n}","import { createLogoDisplayOverlayPlugin, LOGODISPLAYOVERLAY , logoOverlay } from './AviaLogoDisplayOverlayPlugin';\n\nexport type { AviaLogoDisplayOverlayOptionsInterface } from './AviaLogoOverlayOptionsInterface';\nexport * from './AviaLogoDisplayOverlayPlugin';\n\n// UMD Aliases\nexport const ID = LOGODISPLAYOVERLAY;\nexport const createPlugin = createLogoDisplayOverlayPlugin;\nexport const plugin = logoOverlay;","import type {\n\tPluginConfigInterface,\n\tPluginInterface,\n\tPluginServicesInterface,\n\tResourceConfigurationInterface,\n} from '@cbsinteractive/avia-js';\nimport { AviaOverlayOptionsInterface } from './AviaOverlayOptionsInterface';\n\nexport const OVERLAY = 'overlay';\n\nexport function overlay(options: Partial = {}): PluginConfigInterface {\n\treturn {\n\t\tid: OVERLAY,\n\t\tfactory: createOverlayPlugin,\n\t\toptions,\n\t};\n}\n\nexport function createOverlayPlugin(services: PluginServicesInterface, options: AviaOverlayOptionsInterface): PluginInterface {\n\tconst { avia, player, dom } = services;\n\tconst { PlayerEvent } = avia;\n\n\tlet resource: ResourceConfigurationInterface;\n\tlet listening = false;\n\tlet panel: HTMLElement;\n\n\tconst container = dom.main;\n\n\tfunction onContentStart() {\n\t\tif (listening) {\n\t\t\treturn;\n\t\t}\n\n\t\tresource = player.resource;\n\n\t\tconst playlistPlugin = player.getPlugin('playlist');\n\t\tif (playlistPlugin) {\n\t\t\tplayer.on(avia.PlayerEvent.PLUGIN_EVENT, onEnded);\n\t\t} else {\n\t\t\tplayer.on(avia.PlayerEvent.RESOURCE_END, onEnded);\n\t\t}\n\n\t\tlistening = true;\n\t}\n\n\tfunction onEnded(event: any) {\n\t\tif (!resource) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.type === avia.PlayerEvent.PLUGIN_EVENT && event.detail?.type !== 'playlistcomplete') {\n\t\t\treturn;\n\t\t}\n\n\t\trender();\n\t}\n\n\n\n\tfunction render() {\n\t\tconst panelElement = document.createElement('div');\n\t\tpanelElement.classList.add('live-avia-play-overlay');\n\t\tpanelElement.style.zIndex = (options.level || 100).toString();\n\t\tpanelElement.innerHTML = '
    ';\n\t\tpanelElement.onclick = () => {\n\t\t\tresource.playback.startTime = 0;\n\t\t\tplayer.attachResource(resource);\n\t\t\tcontainer.removeChild(panelElement);\n\t\t};\n\n\t\tcontainer.appendChild(panelElement);\n\t\tpanel = panelElement;\n\t}\n\n\tfunction destroy() {\n\t\tif (panel) {\n\t\t\tpanel.onclick = null;\n\t\t\tcontainer.removeChild(panel);\n\t\t\tpanel = null;\n\t\t}\n\n\t\tplayer.off(PlayerEvent.CONTENT_START, onContentStart);\n\t\tplayer.off(PlayerEvent.CONTENT_PROGRESS, onContentStart);\n\t\tplayer.off(PlayerEvent.LIVE_PRESENTATION_STOPPED, onEnded);\n\n\t\tconst playlistPlugin = player.getPlugin('playlist');\n\t\tif (playlistPlugin) {\n\t\t\tplayer.off(PlayerEvent.PLUGIN_EVENT, onEnded);\n\t\t} else {\n\t\t\tplayer.off(PlayerEvent.RESOURCE_END, onEnded);\n\t\t}\n\n\t\tlistening = false;\n\t\tresource = null;\n\t}\n\n\tplayer.on(PlayerEvent.CONTENT_START, onContentStart);\n\tplayer.once(PlayerEvent.CONTENT_PROGRESS, onContentStart);\n\tplayer.on(PlayerEvent.LIVE_PRESENTATION_STOPPED, onEnded);\n\n\treturn {\n\t\tgetId: () => OVERLAY,\n\t\tdestroy,\n\t};\n}\n\n\n","import { createOverlayPlugin, OVERLAY, overlay } from './AviaOverlayPlugin';\n\nexport type { AviaOverlayOptionsInterface } from './AviaOverlayOptionsInterface';\nexport * from './AviaOverlayPlugin';\n\n// UMD Aliases\nexport const ID = OVERLAY;\nexport const createPlugin = createOverlayPlugin;\nexport const plugin = overlay;","import React from 'react';\nimport { PlayerStates, iPlayer } from '../player/playerCtrl.type';\nimport { Autoplay, createVideoPlayer, PlayerEvent, TextTrackEvent, PlayerOptionsInterface } from \"@cbsinteractive/avia-js\";\nimport { LiveCtrlUtils } from './liveCtrl.util';\nimport { tOverlayFactory } from \"../player/overlayTemplate.type\";\nimport { OverlayFactory } from \"../player/overlayFactory\";\nimport * as queryString from \"query-string\";\nimport { AllocatorLive } from \"./track/allocatorLive\";\nimport { cueWatcher, getId3Wrapper, getTxxxGoogleAdData } from \"../../pkgAviaAllocator/id3/id3Processor\";\nimport { iID3, eCueType } from \"../../pkgAviaAllocator/id3/id3Processor.type\";\nimport { trackingServiceConfig } from \"../../pkgAviaAllocator/tracking.conf\";\nimport { allocatorLiveEventMapping } from \"./track/allocatorLive.type\";\nimport { PlayerCtrl } from \"..\";\nimport { getUserIp, UUID_v4 } from \"../../pkgAviaAllocator/util\";\nimport { iChannel, iChannels, iLiveCtrlProps, iLiveCtrlState } from \"./liveCtrl.type\";\nimport { OztamV2AviaLive } from \"./track/oztam.v2.aviaLive\";\nimport { iOzTamTrackingMeta_Media } from \"../../pkgAviaAllocator/oztam.v2.lib\";\nimport { iTrackingOztamConfig } from \"../../pkgAviaAllocator/tracking.conf.type\";\nimport { env } from \"../../pkgAviaAllocator/tracking.env\";\nimport { playlist, PLAYLIST } from '@cbsinteractive/avia-js-playlist';\nimport {getRecordedTime, initRecording} from \"./liveWatchedTime\";\nimport {AuthenticatedEndpointHandler} from '../api/api.bvod';\nimport { tenTrack } from '../../tenTrack/track.init';\nimport { deviceType } from '../player/util/device';\nimport {eLocalStorage_tenUser} from \"../../tenMember/jwt/enum\";\nimport { ApiVideo } from \"../api/api.video\";\nimport { IMSAPIIntegration, IMSResponse } from '../../tenAds/freeWheelManager';\nimport { iPlaybackInfoApiType } from '../api/api.video.type';\nimport { checkUserFlag, markAdOps } from '../../@util/userFlag';\n\nexport class LiveCtrl extends PlayerCtrl {\n readonly _noAds: boolean;\n\n protected _allocator: AllocatorLive;\n\n private _resources: any[] = [];\n private _id3Wrapper: iID3;\n private _initMockProgress: boolean = false;\n private _firstLoad: boolean = true;\n private _beginTimeStamp: number = undefined;\n private _storedEvents: any[] = [];\n private _oztamServiceConfig: iTrackingOztamConfig = undefined;\n private lastPausedTimestamp: number;\n private adEventData = {};\n private _playbackTime = 0;\n private _playBackInfo :iPlaybackInfoApiType;\n private _serverTimeOffset: number = 0;\n \n private updateInterval: ReturnType | null = null;\n \n private hasTimestamp: boolean = false;\n\n private offsetTime: number;\n private currentStreamTime: number = -1;\n \n private customEpochStartingStreamTime: number = -1;\n private customEpochStartingTimeCheckpoint: number = -1;\n private customEpochLastCueUpdateTimeCheckpoint: number = -1;\n private id3EventCuedataOffsetTime: number = 0;\n\n public playerContainerId: string;\n\n private bvodApiKey: string;\n private bvodPublisherName: string;\n private authHandler: AuthenticatedEndpointHandler;\n private imsAPI: IMSAPIIntegration;\n private freeWheelEnabled: boolean;\n private rolloutPercentage: number;\n private isFlagged: boolean;\n private globalSettings: { [key: string]: any };\n private globalFWEnable: boolean;\n \n private playerMuted: boolean;\n constructor(props) {\n super(props);\n\n const string = window.location.search.replace('?','');\n const qs = queryString.parse(string);\n this.markAdOperations();\n this._noAds = typeof qs.noads === 'string' && qs.noads.toLowerCase() === 'true';\n this.playerContainerId = props.containerId;\n this._oztamServiceConfig = this.setOztamConfig();\n this.bvodApiKey = '///adjust.bouncing.flame';\n this.bvodPublisherName = 'TEN';\n this.authHandler = new AuthenticatedEndpointHandler(this.bvodApiKey, this.bvodPublisherName);\n this.imsAPI = new IMSAPIIntegration('https://fms.viacomcbs.digital');\n this.globalSettings = props.globalSettings || {};\n this.globalFWEnable = this.globalSettings.experiments?.[\"Freewheel Enabled\"]?.enabled ?? false;\n this.rolloutPercentage = this.globalSettings.experiments?.[\"Freewheel Enabled\"]?.rolloutPercentage ?? 0;\n this.isFlagged = this.initializeUserFlag(this.rolloutPercentage);\n this.freeWheelEnabled = this.globalFWEnable && this.isFlagged;\n this.playerMuted = false;\n this.state = {\n playerState: PlayerStates.PreInitialize,\n overlay: undefined,\n isMemberGated: this.props.memberGated,\n liveChannels: this.props.liveChannels,\n consumerAdvice: \"\",\n displayOverlay: false,\n drmEnabled: false,\n }\n }\n\n async componentDidMount() {\n if (typeof window === 'undefined') return;\n this.setServerTimeOffset();\n LiveCtrlUtils.detectTouchDevice();\n this.addBeforeUnloadListener();\n if (document.readyState === 'complete') {\n await this._initPlayer();\n } else {\n window.addEventListener('load', this._initPlayer);\n }\n window.addEventListener('userLogin', this.handleUserLogin);\n }\n\n /**\n * Reset resource if google DAI key changes\n */\n componentDidUpdate(prevProps: iLiveCtrlProps) {\n const {mediaInfo} = this.props;\n \n if (prevProps.mediaInfo.customFields.google_dai_key !== mediaInfo.customFields.google_dai_key) {\n this._resetSession();\n this._resetResources();\n }\n }\n\n componentWillUnmount() {\n this.stopIntervals();\n window.removeEventListener('userLogin', this.handleUserLogin);\n }\n\n initializeUserFlag(percent: number): boolean {\n if (percent < 1) {\n return false;\n }\n try {\n return checkUserFlag(percent);\n } catch (error) {\n console.error('Failed to check user flag:', error);\n return false;\n }\n }\n\n markAdOperations() {\n try {\n markAdOps();\n } catch (error) {\n console.error('Failed to mark ad operations:', error);\n }\n }\n\n render() {\n return(\n <>\n {this.state.overlay &&
    {this.state.overlay}
    }\n
    \n \n )\n }\n\n private initializeVariables = () => {\n this.resetVariables();\n this.offsetTime = this.calculateOffsetTimeInMs();\n this.hasTimestamp = false;\n this.currentStreamTime = this.customEpochLastCueUpdateTimeCheckpoint = -1;\n this.customEpochStartingStreamTime = this.customEpochStartingTimeCheckpoint = -1;\n this.id3EventCuedataOffsetTime = 0;\n }\n\n public resetVariables = () => {\n this.stopIntervals ();\n }\n\n private async _updatePlayerState(newPlayerState: PlayerStates) {\n this.setState({\n playerState: newPlayerState\n }, async () => {\n await this._updateOverlayState();\n });\n }\n\n private async _updateOverlayState() {\n const {playerState} = this.state;\n const {video, slateUrl} = this.props;\n const stateOverlayFactory: tOverlayFactory = OverlayFactory[playerState];\n let ui;\n\n if (typeof stateOverlayFactory === \"function\") {\n ui = await stateOverlayFactory(this.player, video, slateUrl)\n }\n this.setState({overlay: ui});\n }\n\n /*\n * Player initiation\n * */\n private _initPlayer = async () => {\n\n const playerShouldBeBlocked = await this._playerShouldBeBlocked();\n const {memberGated, loggedIn} = this.props;\n\n if(playerShouldBeBlocked === \"adBlock\") {\n await this._updatePlayerState(PlayerStates.AdBlockerOn);\n return;\n }\n if(playerShouldBeBlocked === \"geoBlock\") {\n await this._updatePlayerState(PlayerStates.GeoBlocked);\n return;\n }\n if(playerShouldBeBlocked === \"win7Block\") {\n await this._updatePlayerState(PlayerStates.DetectWindows7)\n return;\n }\n if(!loggedIn && memberGated) { \n this._logger.log && this._logger.log(\"Bypass create player\");\n }else {\n this.getConsumerAdvice();\n this._createPlayer();\n }\n }\n\n private async _createPlayer() {\n\n await this._createResources().then(async () => {\n const playerOptions: PlayerOptionsInterface = LiveCtrlUtils.createPlayerOptions({\n containerId: this.playerContainerId,\n autoplay: Autoplay.ATTEMPT_UNMUTED,\n video: this.props.video,\n globalSettings: this.props.globalSettings,\n consumerAdvice: this.state.consumerAdvice,\n displayOverlay: this.state.displayOverlay,\n })\n \n this._id3Wrapper = getId3Wrapper();\n this.resetAllocator();\n await createVideoPlayer(playerOptions).then((player) => {\n this.player = player;\n window.player = player;\n this.initializeVariables();\n this._onPlayerReady(player);\n initRecording(player);\n this._playResources();\n })\n })\n }\n\n private async _createResources() {\n const {mediaInfo, liveChannels, video} = this.props;\n video.displayOverlay = this.state.displayOverlay;\n this._resources = [];\n await this.setMediaInfo(mediaInfo, video);\n }\n\n private getLogoUrl (player: iPlayer) {\n const filteredLiveChannels = this.props.liveChannels.filter((subArray: any) => {\n return subArray.find((channel: any) => {\n return channel.channelUrl === this.props.relativeUrl\n })\n });\n if (filteredLiveChannels.length > 0 && filteredLiveChannels[0].length > 0) {\n const logoUrl = filteredLiveChannels[0][0].logo;\n player.logoUrl = logoUrl;\n } else {\n console.warn('No matching live channels found for logo URL.');\n }\n }\n\n private getConsumerAdvice() {\n const filteredLiveChannels = this.props.liveChannels.filter((subArray: any) => {\n return subArray.find((channel: any) => {\n return channel.channelUrl === this.props.relativeUrl;\n });\n });\n if (filteredLiveChannels.length > 0 && filteredLiveChannels[0].length > 0) {\n const { consumerAdvice, displayOverlay } = filteredLiveChannels[0][0];\n this.setState({ consumerAdvice, displayOverlay });\n } else {\n this.setState({ consumerAdvice: '', displayOverlay: false });\n }\n }\n\n private async _resetResources() {\n await this._createResources().then (() => {\n this._playResources();\n })\n }\n\n private async _updateResource() {\n await this._createResources()\n }\n\n private _playResources() {\n const playList = this.player.getPlugin(PLAYLIST);\n this.livePlayList = playList;\n this.livePlayList.clear();\n this._handleResources();\n }\n\n private async _handleResources(): Promise {\n const { slateTime, slateUrl } = this.props;\n \n if (!slateTime || !slateUrl) {\n this._startPlaylistWithResources(this._resources);\n return;\n }\n \n if (this._resources.length === 1) {\n await this._displaySlateAndExecute(slateTime, () => {\n this._clearSponsorLogo();\n this._startPlaylistWithResources([this._resources[0]]);\n });\n } else if (this._resources.length > 1) {\n this._startPlaylistWithResources([this._resources[0]]);\n this._handlePlaylistCompleteEvent(slateTime);\n }\n }\n \n private async _displaySlateAndExecute(slateTime: number, callback: Function): Promise {\n await this._updatePlayerState(PlayerStates.DisplaySlateImage);\n setTimeout(callback, slateTime * 1000);\n }\n \n private _clearSponsorLogo(): void {\n const container = document.querySelector('.liveVideoContainer') as HTMLElement;\n const childContainer = container?.querySelector('#sponsorLogo') as HTMLElement;\n if (childContainer) childContainer.remove();\n }\n \n private _startPlaylistWithResources(resources: any[]): void {\n this.livePlayList.clear();\n this.livePlayList.addResources(resources);\n this.livePlayList.start();\n }\n \n private _handlePlaylistCompleteEvent(slateTime: number): void {\n this.player.on(PlayerEvent.PLUGIN_EVENT, async (event) => {\n const { type } = event.detail;\n if (type === 'playlistcomplete') {\n await this._displaySlateAndExecute(slateTime, () => {\n this._clearSponsorLogo();\n this.livePlayList.addResources([this._resources[1]]);\n this.livePlayList.next();\n });\n }\n });\n }\n\n\n private _onPlayerReady = (player: any) => {\n this.getLogoUrl(player);\n for (const key in PlayerEvent) {\n player.on(PlayerEvent[key], (event: PlayerEvent) => {\n this._trackEvent(event);\n this._handleEvent(event);\n });\n }\n \n this.watcherClickedLink();\n }\n\n private addBeforeUnloadListener() {\n if (typeof window !== 'undefined') {\n window.addEventListener(\"beforeunload\", event => {\n const {mediaInfo} = this.props;\n this._allocator.track(allocatorLiveEventMapping['beforeunloadpage'], mediaInfo, this.player, {videoWatchedDuration: getRecordedTime()});\n setTimeout(() => {\n this.player.stop();\n }, 0);\n });\n } \n }\n\n private async addWatcherToLink() {\n if(window !== undefined) {\n return new Promise((resolve, reject) => {\n const links = document.querySelectorAll('a');\n const selectedLinks = Array.from(links).filter((link) => {\n const href = link.getAttribute('href');\n const target = link.getAttribute('target');\n return href !== null && target !== '_blank';\n });\n selectedLinks.forEach(link => {\n const lnk = link.addEventListener('click', (event) =>{\n const {defaultPrevented} = event;\n if (!defaultPrevented) {\n const {mediaInfo} = this.props;\n const recordedTime = getRecordedTime();\n const extra = {'videoWatchedDuration': recordedTime};\n this._allocator.track(allocatorLiveEventMapping['beforeunloadpage'], mediaInfo, this.player, extra);\n this._allocator && this._allocator.resetTrackingService();\n }\n ({ success }) => resolve(lnk)\n });\n });\n })\n \n }\n \n }\n\n private async watcherClickedLink() {\n await this.addWatcherToLink();\n }\n\n public async getLiveFields() {\n const userId = localStorage.getItem(eLocalStorage_tenUser.tu_oztamid);\n const timestamp = new Date();\n const metadata = PlayerCtrl.convertToVideoTrackObj(this.props.video, this.props.mediaInfo, this._oztamServiceConfig.sessionId);\n let ipAddress = '';\n try {\n ipAddress = await getUserIp() as string;\n } catch (err) {\n console.error(`🔍️~ Error fetching IP: ${err}`);\n }\n\n const genreFilter = () => {\n if (metadata.video.ShowGenre === \"N/A\") {\n return '';\n } else {\n return metadata.video.ShowGenre\n }\n }\n\n const userAgent = typeof window !== 'undefined' ? window.navigator.userAgent : '';\n const livePayload = {\n AdEventId: '' || null,\n DeviceId: tenTrack.deviceId || '',\n DeviceType: deviceType || '',\n Genre: genreFilter(),\n IpAddress: ipAddress,\n MediaId: metadata.publisher_id || '',\n MediaType: 'live' || '',\n PublisherId: metadata.publisher_id || '',\n PublisherName: 'TEN',\n RegistrationId: userId || '', \n SessionId: this._oztamServiceConfig.sessionId || '',\n TimeStamp: timestamp.toISOString() || '', \n UserAgent: userAgent || null, \n VendorVersion: this._oztamServiceConfig.vendorVersion || '',\n };\n return livePayload;\n }\n\n // BVOD - START\n\n private handleLIVEData = async () => {\n const {loggedIn} = this.props;\n if(!loggedIn) return []; \n try {\n const data = await this.getLiveFields();\n const response = await this.authHandler.postAuthenticatedData('/auth', data);\n const { data: responseData } = response;\n const BvodArray = this.authHandler.mapBvodDataToOztamParams(responseData); //\n return BvodArray;\n } catch (error) {\n console.error(\"🔍️~ Error handling VOD data: \", error);\n }\n };\n\n // BVOD - END\n \n\n private async setMediaInfo(mediaInfo, video) {\n let bvodData = [];\n let imsData = null;\n const { relativeUrl, activeChannels, isLivePrerollDisabled } = this.props;\n\n try {\n bvodData = await this.handleLIVEData();\n } catch (error) {\n console.error(\"🔍️~ Error fetching BVOD data:\", error);\n }\n\n const matchingChannels = activeChannels.flatMap(channels =>\n channels.filter(channel => channel.channelUrl === relativeUrl)\n );\n\n const isChannelPreRollDisabled = matchingChannels.some(channel => channel.isPreRollDisabled);\n\n const { id } = mediaInfo;\n try {\n this._playBackInfo = await ApiVideo.getPlaybackInfo(\n id, \n this.freeWheelEnabled, true\n );\n } catch (error) {\n console.error(\"Error fetching playback info:\", error);\n }\n\n try {\n const prerollDisabled = !!isLivePrerollDisabled || !!this._noAds || !!isChannelPreRollDisabled;\n let imsData = null;\n const prerollSource = prerollDisabled ? null : LiveCtrlUtils.createPrerollResource(mediaInfo, this._oztamServiceConfig.sessionId, bvodData, imsData);\n if (this.freeWheelEnabled) {\n try {\n imsData = await this.fetchIMSDataAndLog();\n if (imsData) {\n console.log('🔍️~ FreeWheel parameters fetched successfully:', imsData);\n } else {\n console.warn('🔍️~ FreeWheel parameters are empty.');\n }\n } catch (error) {\n console.error('🔍️~ Error fetching FreeWheel parameters:', error);\n }\n }\n const contentSource = LiveCtrlUtils.createLiveStreamResource(mediaInfo, this._oztamServiceConfig.sessionId, bvodData, video, imsData, this._playBackInfo, this.freeWheelEnabled, this.playerMuted);\n if (prerollSource) {\n this._resources.push(prerollSource);\n }\n if (contentSource) {\n this._resources.push(contentSource);\n }\n } catch (error) {\n console.error(\"🔍️~ Error setting media info:\", error);\n }\n }\n\n\n protected _addCueListener() {\n cueWatcher(this.player, this._logger.log, (cueObject) => {\n const googleAdData = getTxxxGoogleAdData(cueObject);\n let cueData;\n if (googleAdData) {\n // Google dai ad cue data\n // this._logger.log && this._logger.log(\"received cue for ads\", cueObject);\n if (!this.hasTimestamp && this.customEpochLastCueUpdateTimeCheckpoint === -1) {\n this.setCustomEpochStartingTimes();\n }\n } else {\n // Shows cue data\n // this._logger.log && this._logger.log(\"received cue for shows\", cueObject);\n cueData = this.getCueDataFromId3Event(cueObject);\n if (cueData == null || !this.canBeParsedAsDate(cueData)) {\n if (!env.isProduction()) { console.warn(\"🔍️~ cannot parse epoch data from id3 event\", cueObject) }\n return;\n }\n \n if (!this.hasTimestamp) {\n this.hasTimestamp = true;\n let cueDataTime = new Date(cueData).getTime();\n if (this.customEpochLastCueUpdateTimeCheckpoint > 0) {\n this.id3EventCuedataOffsetTime = (this.customEpochLastCueUpdateTimeCheckpoint - cueDataTime) + (this.getCurrentTime() - this.customEpochLastCueUpdateTimeCheckpoint);\n }\n cueDataTime += this.id3EventCuedataOffsetTime;\n const cueDataTimeWithOffset = (new Date(cueDataTime)).getTime();\n const dateTimeDifference = this.getCurrentTime() - cueDataTimeWithOffset;\n const maxTime = 3 * 60 * 1000; // max id3 epoch offset is 3 mins away from current time\n if (Math.abs(dateTimeDifference) > maxTime) {\n this.id3EventCuedataOffsetTime += (dateTimeDifference - this.calculateOffsetTimeInMs());\n }\n }\n \n cueData = new Date(((new Date(cueData)).getTime() + this.id3EventCuedataOffsetTime)).toISOString();\n this._id3Wrapper.update(cueObject.key, cueData);\n }\n });\n }\n\n protected getCueDataFromId3Event(cueObject): any {\n let cueData;\n if (!cueObject) { return null; }\n const cueObjectDataAdjusted = typeof cueObject.data === 'string' ? cueObject.data.toUpperCase() : cueObject.data;\n const cueObjectInfoAdjusted = typeof cueObject.info === 'string' ? cueObject.info.toUpperCase() : cueObject.info;\n switch (cueObject.key) {\n case eCueType.TXXX: {\n if (!isNaN(Date.parse(cueObjectDataAdjusted))) {\n cueData = cueObject.data;\n } else if (!isNaN(Date.parse(cueObjectInfoAdjusted))) {\n cueData = cueObject.info;\n } else {\n try {\n cueData = JSON.parse(cueObject.data);\n } catch (error) {\n if (!env.isProduction()) { console.warn(error) }\n return;\n }\n }\n break;\n }\n case eCueType.TDRL: {\n if (!isNaN(Date.parse(cueObjectDataAdjusted))) {\n cueData = cueObject.data;\n } else if (!isNaN(Date.parse(cueObjectInfoAdjusted))) {\n cueData = cueObject.info;\n }\n break;\n }\n case eCueType.PRIV: {\n cueData = cueObject.data;\n if (cueObject.data instanceof ArrayBuffer) {\n cueData = String.fromCharCode.apply(null, new Uint8Array(cueObject.data));\n } else if (cueObject.info instanceof ArrayBuffer) {\n cueData = String.fromCharCode.apply(null, new Uint8Array(cueObject.info));\n }\n break;\n }\n }\n cueData = typeof cueData === 'string' ? cueData.replace(/z$/, \"Z\") : cueData;\n return cueData;\n }\n\n public reset() {\n this._resetId3();\n this.resetAllocator();\n };\n\n private _resetId3() {\n if (this._id3Wrapper) {\n this._id3Wrapper.source = undefined;\n this._id3Wrapper.latest = undefined;\n this._id3Wrapper.pauseDurationBeforeNewId3 = 0;\n this._id3Wrapper.pauseDurationBeforeNewId3_nielsen = 0;\n }\n }\n\n protected setOztamConfig() {\n let config;\n\n if(env.isProduction()){\n config = trackingServiceConfig.oztam.config.production;\n } else {\n config = trackingServiceConfig.oztam.config.staging;\n }\n config.sessionId = UUID_v4();\n return config;\n }\n\n protected resetAllocator() {\n if(this._allocator) {\n this._allocator.resetTrackingService();\n }\n this._allocator = new AllocatorLive();\n this._allocator.updateExtraInfo({id3: this._id3Wrapper});\n }\n\n protected _resetSession() {\n this.setOztamConfig();\n this._firstLoad = true;\n this._beginTimeStamp = undefined;\n this._initMockProgress = false;\n this._storedEvents = [];\n this._oztamServiceConfig.sessionId = UUID_v4();\n this.reset();\n }\n\n public _checkId3() {\n return !!this._id3Wrapper && !!this._id3Wrapper.latest;\n }\n\n protected convertToVideoTrackObj(mediaInfo, video) { \n const mediaInfoNew = PlayerCtrl.convertToVideoTrackObj(mediaInfo, video, this._oztamServiceConfig.sessionId);\n mediaInfoNew.publisher_id = mediaInfo.customFields.publisherid;\n \n const newCustomFields = {\n clip_title: mediaInfo.customFields.clip_title,\n episode_name: \"\",\n tv_channel: mediaInfo.customFields.tv_channel,\n video_type_long_form: \"Live\",\n show_title: video.title,\n };\n\n Object.assign(mediaInfoNew.custom_fields, newCustomFields);\n \n return mediaInfoNew;\n };\n\n protected mockOztamProgress(mediaInfo?) {\n const currentTimestamp = Math.round(new Date().getTime() / 1000);\n const delayDuration = currentTimestamp - this._beginTimeStamp;\n const fullProgressEvents = Math.floor(delayDuration / 60);\n const partialProgressDuration = delayDuration % 60;\n const timeToFullProgress = (60 - partialProgressDuration) * 1000;\n\n if(mediaInfo) {\n this._initMockProgress = true;\n\n if(delayDuration <= 2) {\n this._allocator.track(allocatorLiveEventMapping['initialiseProgressInterval'], mediaInfo, this.player);\n return;\n }\n\n const latestEpochTime = parseInt(this._id3Wrapper.latest.EpochTime);\n const epochStartTime = latestEpochTime - delayDuration;\n const timeOffset = Math.round(this._id3Wrapper.latest.LocalTime / 1000 - latestEpochTime);\n\n // Send stored progress events first\n if(this._storedEvents.length > 0) {\n const mockedPartialProgressEvents = this.offsetTimestamps(timeOffset);\n this.postProgressEvents(mockedPartialProgressEvents, mediaInfo);\n }\n\n const mockedProgressEvents = this.mockProgressData(fullProgressEvents, epochStartTime, false);\n this.postProgressEvents(mockedProgressEvents, mediaInfo);\n\n setTimeout(() => {\n const mockedProgressEvent = this.mockProgressData(fullProgressEvents, epochStartTime, true);\n this.postProgressEvents(mockedProgressEvent, mediaInfo);\n \n // Initialise regular progress interval via allocator\n this._allocator.track(allocatorLiveEventMapping['initialiseProgressInterval'], mediaInfo, this.player);\n }, timeToFullProgress);\n\n return;\n }\n // Store events if data is not avaliable\n this.storeEvents(fullProgressEvents, partialProgressDuration, currentTimestamp)\n }\n\n protected storeEvents(fullProgress, partialDuration, currentTime) {\n for(let i = 0; i < fullProgress; i++) {\n const fromSeconds = this._beginTimeStamp + i * 60;\n this._storedEvents.push({from: fromSeconds, to: fromSeconds + 60});\n }\n if(partialDuration > 0) {\n const fromSeconds = currentTime - partialDuration;\n this._storedEvents.push({from: fromSeconds, to: currentTime});\n }\n }\n\n protected offsetTimestamps(offset) {\n const eventArray = [];\n this._storedEvents.forEach((event) => {\n const eventObj = this.setEventFields(event.from - offset, event.to - offset);\n eventArray.push(eventObj);\n })\n\n return eventArray;\n }\n\n protected mockProgressData(numFullEvents, epochStartTime, isPartial) {\n const eventArray = [];\n if(isPartial) {\n const eventStartEpoch = epochStartTime + numFullEvents * 60;\n const dataFields = this.setEventFields(eventStartEpoch, eventStartEpoch + 60);\n eventArray.push(dataFields);\n return eventArray;\n }\n\n for(let i = 0; i < numFullEvents; i++) {\n const eventStartEpoch = epochStartTime + i * 60;\n const dataFields = this.setEventFields(eventStartEpoch, eventStartEpoch + 60);\n eventArray.push(dataFields); \n }\n return eventArray;\n }\n\n protected setEventFields(from, to) {\n return {\n fromPosition: from,\n toPosition: to,\n timestamp: new Date(),\n event: \"PROGRESS\",\n }\n }\n\n protected postProgressEvents(mockedProgressEvents, mediaInfo) {\n mockedProgressEvents.forEach((event) => {\n const media = this.mapMediaInfo(mediaInfo, event);\n const updatedOztamConfig = Object.assign(this._oztamServiceConfig, {publisherId: mediaInfo.publisher_id})\n const trackingFields = (this._allocator.oztam as OztamV2AviaLive)._oztamService.getFields(event, media, updatedOztamConfig);\n this.progressFetch(trackingFields);\n });\n }\n\n protected mapMediaInfo(data, event): iOzTamTrackingMeta_Media {\n return {\n mediaDuration: 0,\n mediaId: data.publisher_id,\n mediaType: \"live\",\n url: window.location.href,\n genre: data.video.showGenre || \"\",\n }\n }\n\n protected progressFetch(trackingFields) {\n let that = this;\n fetch(that._oztamServiceConfig.serverTarget, \n {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify(trackingFields)\n }\n )\n }\n\n protected _trackEvent(event) {\n const {mediaInfo, video} = this.props;\n const eType = event.type\n const allocatorEvent = allocatorLiveEventMapping[eType];\n\n if (allocatorEvent === undefined) {\n return\n }\n\n const container = document.querySelector(`#${this.playerContainerId}`) as HTMLElement;\n\n if (!container) {\n return\n }\n\n const generateAdData = (event) => {\n if(event.type === PlayerEvent.AD_START) {\n const {adDuration, adTitle, adPosition, adObject} = event.detail.adInfo;\n const ads = {\n adType: adObject?.podInfo?.data?.type === \"mid\" ? \"video_midroll\" : \"video_preroll\",\n adDuration: adDuration,\n adTitle: adTitle, \n adIndex: adObject?.j?.adPodInfo?.adPosition || adObject?.data?.position || adPosition, \n }\n this.adEventData = ads;\n }\n if(event.type === PlayerEvent.AD_START || event.type === PlayerEvent.AD_COMPLETE) {\n return this.adEventData;\n }\n }\n\n const videoElement = container.querySelector('video') as HTMLElement;\n video.memberGated = this.props.memberGated;\n \n const allocatorVideoObj = this.convertToVideoTrackObj(mediaInfo, video);\n this.player.currentTime = () => { return this.player.video.currentTime }\n\n switch(eType) {\n case PlayerEvent.RESOURCE_START: \n this._addCueListener(); \n if(!this._firstLoad) {\n return;\n }\n this._firstLoad = false;\n break;\n case PlayerEvent.CONTENT_START:\n this._beginTimeStamp = Math.round(new Date().getTime() / 1000);\n this.beginUpdateInterval();\n break;\n case PlayerEvent.CONTENT_PROGRESS:\n case PlayerEvent.CONTENT_PLAYING:\n if(this._checkId3()) {\n if(!this._initMockProgress) {\n this.mockOztamProgress(allocatorVideoObj);\n }\n break;\n } else {\n return;\n }\n case PlayerEvent.CONTENT_PAUSED:\n this.lastPausedTimestamp = Date.now();\n this.player.stop();\n break\n case PlayerEvent.PLUGIN_EVENT:\n if (event.detail.type === \"play\"){\n const timeToReset = Math.floor((Date.now() - this.lastPausedTimestamp) / 1000);\n if(timeToReset > 600) {\n window && window.location.reload();\n }\n }\n break;\n case PlayerEvent.AD_PAUSED: \n if(this._checkId3()) {\n break;\n }\n // Stop the interval and store partial progress\n this.mockOztamProgress();\n return;\n case PlayerEvent.AD_PLAYING:\n if(this._checkId3()) {\n break;\n }\n // Reset the begin time for calculating progress\n this._beginTimeStamp = Math.round(new Date().getTime() / 1000);\n return;\n case PlayerEvent.LIVE_PRESENTATION_STOPPED:\n\n this._allocator.track(allocatorEvent, allocatorVideoObj, this.player);\n this._resetSession();\n this.playerMuted = this.player.muted\n return;\n default:\n break;\n }\n\n this._allocator.track(allocatorEvent, allocatorVideoObj, this.player, generateAdData(event));\n };\n\n protected _handleEvent(event) {\n const {muted} = event.detail\n const eType = event.type;\n if(eType === PlayerEvent.PLUGIN_EVENT) { \n if(event.detail.type === \"playoverlay\") {\n this._resetResources();\n }\n }\n if(eType === PlayerEvent.MUTE_CHANGE) {\n this.playerMuted = muted;\n }\n }\n\n // Starts the update interval\n private beginUpdateInterval = (): void => {\n // If the update interval is already running, we don't need to start it again.\n if (this.updateInterval !== null) {\n return;\n }\n\n const minimumTimeBeforeFirstCustomCueInSeconds: number = 12;\n \n //TODO: replace this check with content time/buffering/seek/buffer error timestamp event system, does not function as intended but not needed, stream time will always increase irrespective of content time\n this.currentStreamTime = this.getPlayerCurrentTime();\n\n this.updateInterval = setInterval(() => {\n // If we already have a timestamp, stop the intervals.\n if (this.hasTimestamp) {\n this.stopIntervals();\n return;\n }\n\n const currentTime = this.getPlayerCurrentTime();\n\n // Set start checkpoints to check if we have passed the minimum time before we process the first custom cue\n if (this.customEpochStartingTimeCheckpoint === -1) {\n // Live streams will seek to an initial position (eg. 90) soon after starting, delay setting start checkpoints until initial seek has probably happened\n if (Math.floor(currentTime) > 4) {\n this.setCustomEpochStartingTimes();\n }\n return;\n }\n\n // Returns if stream time or time since stream has started has not passed the minimum time before we process the first custom cue\n if (\n this.customEpochLastCueUpdateTimeCheckpoint === -1\n && (currentTime < (this.customEpochStartingStreamTime + minimumTimeBeforeFirstCustomCueInSeconds) || (this.getCurrentTime() - this.customEpochStartingTimeCheckpoint) < minimumTimeBeforeFirstCustomCueInSeconds * 1000)\n ) {\n return;\n }\n \n // If the current time is valid and greater than the last known stream time, update the cue.\n if (\n !isNaN(currentTime) \n && currentTime > this.currentStreamTime\n ) {\n this.updateCue();\n }\n\n // Update the current stream time.\n this.currentStreamTime = currentTime;\n }, 5000);\n };\n\n private setCustomEpochStartingTimes = () => {\n this.customEpochStartingTimeCheckpoint = this.getCurrentTime();\n this.customEpochStartingStreamTime = Math.floor(this.getPlayerCurrentTime());\n }\n\n // Updates cue\n private updateCue = () => {\n this.customEpochLastCueUpdateTimeCheckpoint = this.getCurrentTime() - this.offsetTime;\n this._id3Wrapper.update(eCueType.TDRL, new Date(this.customEpochLastCueUpdateTimeCheckpoint).toISOString());\n }\n \n // Stops all intervals and clears their references\n private stopIntervals = () => {\n if (this.updateInterval !== null) {\n clearInterval(this.updateInterval);\n this.updateInterval = null;\n }\n }\n\n // Gets the current stream time\n private getPlayerCurrentTime = (): number => {\n return this.player.video?.currentTime ?? -1;\n }\n\n // Gets a random offset time between 20-45 seconds by default\n private calculateOffsetTimeInMs = (min = 20, max = 45): number => {\n return max > min ? (Math.floor(Math.random() * (max - min + 1)) + min) * 1000 : 0;\n }\n\n private canBeParsedAsDate = (val: any): boolean => {\n return typeof val === 'number' || (typeof val === 'string' && !isNaN(Date.parse(val)));\n }\n\n private setServerTimeOffset = () => {\n const fetchUrl = \"/timestamp\";\n fetch(fetchUrl.toLowerCase())\n .then(res => res.json())\n .then(data => { \n this._serverTimeOffset = data?.timestamp > 0 ? Date.now() - (data.timestamp * 1000) : 0;\n })\n .catch((err) => { \n this._serverTimeOffset = 0;\n })\n }\n\n private getCurrentTime = () => {\n return Date.now() - this._serverTimeOffset;\n }\n\n private async fetchIMSDataAndLog(): Promise {\n // COPPA flag 1 indicates child-directed content that follows COPPA ad standards\n // 0 indicates adult-directed content\n const coppaFlag = this.props.video.genre?.toLowerCase() === 'kids' ? 1 : 0;\n\n const data = {\n userIp: await getUserIp(),\n coppa: coppaFlag\n };\n\n try {\n // This will automatically handle COPPA status updates and cache invalidation\n const response = await this.imsAPI.getIMSData(data);\n if (response) {\n this.imsAPI.logFreewheelDebug('IMS Data:', response);\n return response;\n }\n return null;\n } catch (error) {\n console.error('Error fetching IMS data:', error);\n return null;\n }\n }\n\n private handleUserLogin = async (event) => {\n this.imsAPI.invalidateCache();\n this.imsAPI.logFreewheelDebug('Received userLogin event:', event);\n }\n}","import { createResourceConfig, PlayerOptionsInterface, VideoFormat, ResourceAdInterface, Autoplay } from \"@cbsinteractive/avia-js\";\nimport { formatIMAServerUrl } from \"../player/util/imaUtil\";\nimport { iVideoAdConfig, iVideoAdRequestParams } from \"../player/util/imaUtil.type\";\nimport { jwtMember} from \"../player/jwt/cacheStatus\";\nimport { eLocalStorage_tenUser_info } from \"../player/jwt/enum\";\nimport { iCreatePlayerConfig } from \"./liveCtrl.type\";\nimport { isCompanionAds } from \"../player/util/isShow\";\nimport { isDesktop } from \"../player/util/env.util\";\nimport { playlist } from '@cbsinteractive/avia-js-playlist';\nimport { replay } from '@cbsinteractive/avia-js-replay';\nimport { overlay } from './Plugins/Overlay';\nimport { logoOverlay } from './Plugins/LogoDisplay';\nimport { gam } from '@cbsinteractive/avia-js-gam';\nimport { hls } from '@cbsinteractive/avia-js-hls';\nimport { ui } from '@cbsinteractive/avia-js-ui';\nimport { consumeradvice } from '../commonPlugins/ConsumerAdvice/AviaConsumerAdvice';\nimport { ApiVideo } from \"../api/api.video\";\nimport { IMSResponse } from '../../tenAds/freeWheelManager';\nimport { iPlaybackInfoApiType } from \"../api/api.video.type\";\nimport { generateGoogleAdTagParams } from '../player/player.utls';\nimport { iBVodData } from '../player/player.util.type';\n\n\nexport namespace LiveCtrlUtils {\n\n export const createPlayerOptions = (props: iCreatePlayerConfig) => {\n const {autoplay, containerId, video, globalSettings, consumerAdvice, displayOverlay} = props;\n const { programClassification, showRatingClassification} = props.video;\n const classification = programClassification ? programClassification?.toUpperCase() : showRatingClassification?.toUpperCase();\n const consumerAdviceOptions = {\n duration: globalSettings?.playbackSettings?.consumerAdviceDisplayTime || 5,\n consumerAdvice: video?.consumerAdvice || consumerAdvice,\n classification,\n isLive: true,\n displayOverlay: displayOverlay,\n };\n let poster = video?.poster;\n if (typeof poster === \"string\" && poster.indexOf(\"image-profile\") > 0) {\n poster = poster.replace(\n \"image-profile=image_poster&io=portrait\",\n \"image-profile=image_full&io=landscape\",\n );\n }\n const theme = {\n html: `\n \n
    \n \n
    \n \n \n ${isDesktop ? '' : ''}\n
    \n
    \n \n ${isDesktop ? '' : ''}\n ${isDesktop ? '' : ''}\n \n
    \n
    \n
    \n
    \n `,\n };\n return {\n container: document.getElementById(containerId) as HTMLElement,\n autoplay,\n renderTextTrackNatively: true,\n useNativeFullscreen: true,\n enableMoat: false,\n overrides: {\n liveStreamPausable: false,\n },\n //logLevel: \"debug\", \n plugins: [\n ui({\n compactViewBreakpoint: 1,\n theme,\n }),\n hls(),\n gam(),\n playlist(),\n overlay(),\n logoOverlay({debug: false}),\n consumeradvice({\n consumerAdviceOptions\n }),\n ], \n } as PlayerOptionsInterface;\n }\n\n export const createPrerollResource = (mediaInfo, oztamSessionId, bvodData, imsData: IMSResponse) => {\n if (typeof window === 'undefined') {\n return {};\n }\n\n const prerollResource = createResourceConfig();\n const videoAdConfig = setVideoAdConfig(oztamSessionId, imsData);\n const imaAdCallUrl = formatIMAServerUrl(mediaInfo.id, videoAdConfig, bvodData);\n const loadVideoWait = 12000;\n\n prerollResource.ad = {\n showPrerollOnNonZeroStart: true,\n csai: {\n adCallUrl: imaAdCallUrl,\n loadVideoTimeoutMs: loadVideoWait,\n preloadContentAtEndOfPreRoll: false,\n enableAdPreloading: true,\n },\n } as ResourceAdInterface;\n\n return prerollResource;\n }\n export const createLiveStreamResource = (mediaInfo, oztamSessionId, bvodData, video, fwParameters: IMSResponse, playBackInfo: iPlaybackInfoApiType, freeWheelEnabled: boolean, playerMuted:boolean) => {\n const daiAuthToken = playBackInfo.daiAuthToken;\n const liveStreamResource = createResourceConfig();\n const videoAdConfig = setVideoAdConfig(oztamSessionId, fwParameters);\n const { account, id, device, site, cmsID, requestParams, customParams } = videoAdConfig;\n\n if (Array.isArray(bvodData) && bvodData.length > 0) {\n customParams.push(...bvodData);\n }\n \n let fwParamsToSpread = {};\n if (freeWheelEnabled) {\n const csidPrefix = 'intllocal_tenplay_au';\n const platform = isDesktop ? 'desktop_web' : 'mobile_web';\n const FW_SITE_SECTION_ID = playBackInfo?.fw?.fwSiteSectionId || '';\n const imafw_csid = `${csidPrefix}_${platform}_live${FW_SITE_SECTION_ID ? `_${FW_SITE_SECTION_ID}` : ''}`;\n if (!csidPrefix || !platform) {\n TrackJS.track({\n message: '🔍️ ~ csidPrefix or platform is not defined',\n csidPrefix,\n platform\n });\n }\n if (!imafw_csid) {\n TrackJS.track({\n message: '🔍️ ~ Missing imafw_csid',\n csidPrefix,\n platform\n });\n return liveStreamResource;\n }\n\n const adParams = {\n gr: jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_gr],\n ge: jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_ge],\n state: localStorage.getItem(\"tu_geo\") || '',\n collection: Array.isArray((window as any).utag_data.videoContentCategories) ? (window as any).utag_data.videoContentCategories : [],\n genre: Array.isArray((window as any).utag_data.showGenres) ? (window as any).utag_data.showGenres : [],\n pcode: jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_memberPostcode],\n session: oztamSessionId,\n sub: jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_n10adId],\n tvid: localStorage.getItem(\"tvid_callback\"),\n oztamozsid: oztamSessionId,\n };\n\n const additionalParams = {\n video,\n plabackInfo: playBackInfo,\n miscData: {\n imafw_csid: imafw_csid,\n imafw_mode: 'live',\n },\n };\n\n const transformedData: iBVodData[] = bvodData.map(([Demo, BvodId], index) => ({\n Demo,\n BvodId,\n }));\n\n const freeWheelParams = generateGoogleAdTagParams(transformedData, { enableFreeWheel: freeWheelEnabled }, mediaInfo?.id || \"\", playBackInfo?.dai?.contentSourceId || \"\", fwParameters?.fms_params, adParams, additionalParams);\n fwParamsToSpread = Object.keys(freeWheelParams).reduce((object, key) => {\n if (freeWheelParams[key] != null) {\n object[key] = freeWheelParams[key];\n }\n return object;\n }, {});\n\n }\n\n liveStreamResource.ad = {\n ssai: {\n assetKey: playBackInfo?.dai?.assetKey || \"\",\n isLive: true,\n format: VideoFormat.HLS,\n ...(freeWheelEnabled && {\n authToken: daiAuthToken,\n }),\n adParameters: {\n iu: `/${account}/${id}/${device}/${site}`,\n cmsid: cmsID,\n ...(!freeWheelEnabled && {\n cust_params: generateCustomParams(customParams)\n }),\n ppid: generateRequestParams(requestParams).ppid || null,\n ...(fwParamsToSpread && Object.keys(fwParamsToSpread).length > 0 ? fwParamsToSpread : {}),\n vpmute: playerMuted ? 1 : 0,\n },\n },\n viewabilityTracking: {\n partner: 'ten',\n viewGuid: 'string',\n pageType: 'string'\n },\n } as ResourceAdInterface;\n return liveStreamResource;\n }\n\n const generateCustomParams = (customParams) => {\n if (Array.isArray(customParams) && customParams.length > 0) {\n let appendingCustomParams = customParams.map(kv => {\n if (typeof kv[0] !== \"string\" || typeof kv[1] !== \"string\" || [undefined, null, \"\", []].includes(kv[1])) {\n return \"\";\n }\n return `${kv[0]}=${kv[1]}`;\n }).filter(kv => {\n return kv !== \"\";\n });\n return appendingCustomParams.join('&');\n }\n }\n\n const generateRequestParams = (requestParams) => {\n let reqParams = {} as iVideoAdRequestParams;\n if (Array.isArray(requestParams)) {\n requestParams.forEach((kv) => {\n if (\n Array.isArray(kv) &&\n kv.length === 2 &&\n kv[0] !== \"\" &&\n kv[1] !== \"\"\n ) {\n reqParams[kv[0]] = kv[1];\n }\n });\n }\n return reqParams;\n };\n\n const setVideoAdConfig = (oztamSessionId, fwParameters: IMSResponse) => {\n const utag_data = (window as any).utag_data;\n const retrievedLocalStorageState = localStorage.getItem(\"tu_geo\") || '';\n const tvid_callback = localStorage.getItem(\"tvid_callback\");\n\n return {\n companionAds: {\n enabled: isCompanionAds(),\n adSizes: [[300, 250], [728, 90], [4, 1]],\n },\n\n account: \"8264\", // todo we do not have access to staging video ad account\n id: \"vau-ten\",\n device: isDesktop ? \"desktop\" : \"mobile_web\",\n site: \"tenplay\",\n cmsID: \"2489270\",\n\n customParams: [\n [\"gr\", jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_gr]],\n [\"ge\", jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_ge]],\n [\"state\", retrievedLocalStorageState],\n [\"collection\", Array.isArray(utag_data.videoContentCategories) ? utag_data.videoContentCategories : []],\n [\"genre\", Array.isArray(utag_data.showGenres) ? utag_data.showGenres : []],\n [\"pcode\", jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_memberPostcode]],\n [\"sub\", jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_n10adId]],\n [\"session\", oztamSessionId],\n [\"tvid\", tvid_callback],\n [\"oztamozsid\", oztamSessionId]\n ],\n requestParams: [\n [\"ppid\", jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_n10adId]],\n ]\n } as iVideoAdConfig;\n }\n\n export const detectTouchDevice = () => {\n if (typeof window !== \"undefined\" && window.hasOwnProperty('ontouchstart')) {\n const root = document.getElementsByTagName('html');\n root[0].classList.add('is-touch');\n }\n }\n}","import { PlayerEvent } from \"@cbsinteractive/avia-js\";\nimport { env } from \"../../ten/conf.env\";\n\nlet beginTimeStamp: number | undefined;\nlet elapsedWatchTime: number = 0;\nlet isPaused: boolean = false;\nlet intervalId: NodeJS.Timeout | undefined;\nlet metadataCuePointTimeout: NodeJS.Timeout | undefined;\nlet debug: boolean = false;\n\nif (typeof window !== 'undefined') {\n const url = new URL(window.location.href);\n\tdebug = url.searchParams.get('debug') === 'timer';\n}\n\nconst messageColors = {\n 'Recording': 'yellow',\n 'Pause recording': 'white',\n 'Resume recording': 'green',\n 'Recording stopped': 'red',\n // Add more mappings as needed\n};\n\nconst logger = (message: string, debug: boolean) => {\n if (debug && !env.isProduction()) {\n const color = messageColors[message.split(':')[0]] || 'black'; // Default to black if no mapping found\n console.log(`%c👁️ ~ ${message}`, `color: ${color}; font-weight: bold;`);\n }\n};\n\nconst initRecording = (player: any): void => {\n player.on(PlayerEvent.CONTENT_START, () => {\n const currentTimeStamp = Date.now();\n if (!beginTimeStamp) {\n beginTimeStamp = currentTimeStamp;\n intervalId = setInterval(() => {\n if (!isPaused) {\n elapsedWatchTime += 1000;\n logger(`Recording: ${elapsedWatchTime / 1000} seconds`, debug);\n }\n }, 1000);\n }\n });\n\n player.on('metadatacuepoint', () => {\n if (!isPaused) {\n logger('Pause recording', debug);\n isPaused = true;\n }\n\n if (metadataCuePointTimeout) {\n clearTimeout(metadataCuePointTimeout);\n }\n\n metadataCuePointTimeout = setTimeout(() => {\n logger('Resume recording', debug);\n isPaused = false;\n }, 1000);\n });\n\n player.on(PlayerEvent.LIVE_PRESENTATION_STOPPED, () => {\n beginTimeStamp = undefined;\n elapsedWatchTime = 0;\n\n if (intervalId) {\n clearInterval(intervalId);\n }\n\n if (metadataCuePointTimeout) {\n clearTimeout(metadataCuePointTimeout);\n }\n\n logger('Recording stopped', debug);\n });\n};\n\nconst getRecordedTime = (): number => {\n return roundSecondsToNearestMinute(elapsedWatchTime / 1000);\n};\n\nconst roundSecondsToNearestMinute = (totalSeconds: number): number => {\n const totalMinutes = Math.floor(totalSeconds / 60);\n const remainingSeconds = totalSeconds % 60;\n const roundedMinutes = remainingSeconds >= 30 ? totalMinutes + 1 : totalMinutes;\n return roundedMinutes;\n};\n\nexport { initRecording, getRecordedTime };","import { iTrackingService } from \"../../../pkgAviaAllocator/tracking.conf.type\"\nimport { trackingServiceConfig } from \"../../../pkgAviaAllocator/tracking.conf\";\nimport { eLocalStorage_tenUser } from \"../../../tenMember/jwt/enum\";\nimport { initTealium, initOztam } from \"../../../pkgAviaAllocator/tracking.init\";\nimport { AllocatorVideo } from \"../../../pkgAviaAllocator/allocator.video\";\nimport { OztamV2AviaLive } from \"./oztam.v2.aviaLive\";\nimport {TealiumAvia} from \"../../player/track/tealium\";\n\nexport class AllocatorLive extends AllocatorVideo {\n constructor (_servicesConfig: iTrackingService = trackingServiceConfig){\n super(_servicesConfig);\n\n this.resetTrackingService();\n }\n\n protected initOztam() {\n this.oztam = initOztam.bind(this)(OztamV2AviaLive);\n }\n\n protected initTealium() {\n this.tealium = initTealium.bind(this)(TealiumAvia);\n }\n\n protected initExtraInfo() {\n this.updateExtraInfo({\n oztam_userId: localStorage.getItem(eLocalStorage_tenUser.tu_oztamid) || \"\",\n })\n }\n\n public onLoadedMetadata(mediainfo, playerRef) {\n if(this.firstRoundPlay) {\n this.oztam && this.oztam.onLoadedMetadata && this.oztam.onLoadedMetadata(mediainfo, playerRef);\n }\n if(!this._state.tealiumEvtOverride) {\n this.tealium && this.tealium.load && this.tealium.load(mediainfo);\n } else {\n this.tealium && this.tealium.setMediaInfo && this.tealium.setMediaInfo(mediainfo);\n }\n }\n\n public onFirstPlay(mediainfo, playerRef) {\n if (this.firstRoundPlay) {\n this.oztam && this.oztam.onFirstPlay && this.oztam.onFirstPlay(mediainfo, playerRef);\n }\n if(!this._state.tealiumEvtOverride) {\n this.tealium && this.tealium.firstPlay && this.tealium.firstPlay();\n }\n this._state.tealiumEvtOverride = true;\n }\n}","import { eAllocatorEvent } from \"../../../pkgAviaAllocator/allocator.video.type\";\nimport { PlayerEvent } from \"../../avia.lib\";\n\nexport const allocatorLiveEventMapping = typeof window === \"undefined\" ? {} : {\n [PlayerEvent.RESOURCE_START]: eAllocatorEvent.LOADED_METADATA,\n [PlayerEvent.CONTENT_START]: eAllocatorEvent.FIRST_PLAY,\n [PlayerEvent.CONTENT_PAUSED]: eAllocatorEvent.PAUSE,\n [PlayerEvent.CONTENT_PLAYING]: eAllocatorEvent.RESUME,\n [PlayerEvent.LIVE_PRESENTATION_STOPPED]: eAllocatorEvent.PAUSE,\n [PlayerEvent.CONTENT_PROGRESS]: eAllocatorEvent.PROGRESS,\n [PlayerEvent.AD_BREAK_START]: eAllocatorEvent.AD_BREAK_START,\n [PlayerEvent.AD_BREAK_COMPLETE]: eAllocatorEvent.SEGMENT_VIEW,\n\n [PlayerEvent.AD_START]: eAllocatorEvent.AD_BEGIN,\n [PlayerEvent.AD_COMPLETE]: eAllocatorEvent.AD_COMPLETE,\n [PlayerEvent.AD_PAUSED]: eAllocatorEvent.AD_PAUSE,\n [PlayerEvent.AD_PLAYING]: eAllocatorEvent.AD_RESUME,\n ['beforeunloadpage']: eAllocatorEvent.BEFORE_UNLOAD_PAGE,\n ['initialiseProgressInterval']: eAllocatorEvent.INIT_PROGRESS_INTERVAL,\n [PlayerEvent.PLUGIN_EVENT]: eAllocatorEvent.PLUGIN_EVENT,\n}","import {OzTamV2} from \"../../../pkgAviaAllocator/oztam.v2\";\nimport {eOzTamEvent, iOzTamTrackingFields, iOzTamTrackingMeta_Config, iOzTamTrackingMeta_Media} from \"../../../pkgAviaAllocator/oztam.v2.lib\";\nimport {iMediaInfo} from \"../../../pkgAviaAllocator/allocator.video.type\";\n\nexport class OztamV2AviaLive extends OzTamV2 {\n private pauseTimestamp;\n\n // for processing delayed EPOCH tracking\n private onHoldProgressFields: Array = [];\n\n constructor(protected trackingConfig: iOzTamTrackingMeta_Config) {\n super(trackingConfig);\n\n this.delayProgressLogic();\n }\n\n private delayProgressLogic = () => {\n const originalCanDispatch = this._oztamService.canDispatch.bind(this._oztamService);\n this._oztamService.canDispatch = (fields: iOzTamTrackingFields): boolean => {\n const {latest} = this._extraInfo.id3;\n const originalCanDispatchFlag = originalCanDispatch(fields);\n if (fields.events[0].event !== eOzTamEvent.PROGRESS) {\n return originalCanDispatchFlag;\n }\n if (!originalCanDispatchFlag) {\n return originalCanDispatchFlag;\n }\n\n // if did not receive epoch from current play timestamp, store all tracking fields until epoch received.\n if (this.lastPlayTimestamp && latest.LocalTime < this.lastPlayTimestamp) {\n this.onHoldProgressFields.push(fields);\n return false;\n }\n\n /**\n * new epoch is received after last play event\n */\n\n // if no holding progress\n if (this.onHoldProgressFields.length === 0) {\n return originalCanDispatchFlag;\n }\n\n try {\n const newEpochtime = latest.EpochTime;\n const thisProgressFromEpochtime = fields.events[0].fromPosition;\n this.batchProgressTrack(newEpochtime, thisProgressFromEpochtime);\n } catch (e) {\n return originalCanDispatchFlag;\n }\n\n return false;\n }\n };\n private batchProgressTrack = (newEpochTime, playEpochtime) => {\n // get total duration\n const totalDuration = this.onHoldProgressFields.reduce((duration, field): number => {\n const event = field.events[0];\n return event.toPosition - event.fromPosition;\n }, 0);\n // calculate start epoch of all on hold progress\n let progressFromPosition = newEpochTime - (newEpochTime - playEpochtime) - totalDuration;\n // update all tracking segment from to position\n this.onHoldProgressFields.forEach(field => {\n const event = field.events[0];\n const duration = event.toPosition - event.fromPosition;\n event.fromPosition = progressFromPosition;\n event.toPosition = progressFromPosition + (duration);\n progressFromPosition = event.toPosition;\n // dispatch each track\n this._oztamService.dispatch(field);\n });\n\n // remove all items in onHoldProgressFields array\n this.onHoldProgressFields.splice(0, this.onHoldProgressFields.length);\n };\n\n public onFirstPlay(mediainfo, playerRef) {\n // this.lastPlayTimestamp = Date.now();\n\n this._oztamService.trackBegin(this.defineTrackingProperties(mediainfo));\n // this._oztamService.startProgressInterval();\n }\n\n public onInitProgress(mediainfo, playerRef) {\n // this.lastPlayTimestamp = Date.now();\n this._storedProgressPositionTimestamp = Date.now();\n this._oztamService.startProgressInterval();\n }\n\n public onPause() {\n this.pauseTimestamp = Date.now();\n super.onPause();\n }\n\n public onUnPause(mediainfo, playerRef) {\n this._extraInfo.id3.pauseDurationBeforeNewId3 += Math.round((Date.now() - this.pauseTimestamp) / 1000);\n super.onUnPause(mediainfo, playerRef);\n }\n\n // live dont stop progress tracking during ad break\n onAdBreakEnd(mediainfo, playerRef) {\n\n }\n\n // Partial progress triggered on ad pause\n public onAdPause() {\n this._oztamService.stopProgressInterval();\n }\n\n public onAdResume(mediainfo, playerRef) {\n this._storedProgressPosition = this.defineGetMediaPositionFn(mediainfo, playerRef);\n this._oztamService.startProgressInterval();\n }\n\n protected defineGetMediaTypeFn() {\n return \"live\";\n }\n\n protected defineGetMediaDurationFn(mediaInfo: iMediaInfo, playerRef): number {\n return 0;\n }\n\n protected defineGetMediaPositionFn(mediaInfo: iMediaInfo, playerRef, lastPlayTimestamp?: number) {\n const id3Wrapper = this._extraInfo?.id3;\n // lastPlayTimestamp is used for getting fromPosition\n if (!id3Wrapper || !id3Wrapper.latest) {\n return 0;\n }\n\n const id3 = id3Wrapper.latest;\n if (lastPlayTimestamp) {\n // live video get from position\n return (() => {\n if (id3.LocalTime < lastPlayTimestamp) {\n // did not receive epoch since last play\n return Math.ceil(parseInt(id3.EpochTime) + ((lastPlayTimestamp - id3.LocalTime) / 1000 - id3Wrapper.pauseDurationBeforeNewId3));\n } else {\n return Math.ceil(parseInt(id3.EpochTime) - (id3.LocalTime - lastPlayTimestamp) / 1000);\n }\n })()\n } else {\n return id3.syncedEpoch();\n }\n }\n\n\n protected defineTrackingMedia(mediainfo: iMediaInfo, playerRef): iOzTamTrackingMeta_Media {\n return {\n mediaId: mediainfo.custom_fields?.episode_crid_id || mediainfo.publisher_id,\n mediaType: this.defineGetMediaTypeFn(),\n mediaDuration: this.defineGetMediaDurationFn(mediainfo, playerRef),\n url: window.location.href\n } as iOzTamTrackingMeta_Media;\n }\n}","import {\n eLocalStorage_tenUser_info as userInfoCacheKey,\n eLocalStorage_tenUser_token as tokenCacheKey,\n tLocalStorage_tenUser_info,\n eLocalSotrage_tenUser_autoplay,\n eLocalSotrage_tenUser_favourites,\n eLocalSotrage_tenUser_progress, localStorage_remain\n} from \"./enum\";\n\n/**\n * general\n */\nfunction isTokenCached () {\n return localStorage.getItem(tokenCacheKey.tu_accesstoken) &&\n localStorage.getItem(tokenCacheKey.tu_refreshtoken);\n}\n\n// this one mainly used for refresh token\nfunction isExpired() {\n if (isTokenCached()) {\n const {expiresAt} = getTokenList();\n return expiresAt <= (Date.now() - 30 * 1000);\n } else {\n return true;\n }\n}\n\n/**\n * sign status\n */\nfunction isLoggedIn() {\n return isTokenCached();\n}\n\nfunction isLoggedOut() {\n return !isTokenCached();\n}\n\n/**\n * local user detail cache\n */\nfunction getUserDetail() {\n const userDetail = {};\n Object.keys(userInfoCacheKey).forEach(key=> {\n const kv = localStorage.getItem(key);\n if (kv) {\n userDetail[key] = kv;\n }\n });\n\n return userDetail;\n}\nfunction setUserDetail(data) {\n Object.keys(userInfoCacheKey).forEach((key: tLocalStorage_tenUser_info)=>{\n data[key] !== undefined && data[key] !== null && localStorage.setItem(key, data[key]);\n });\n}\nfunction removeUserDetail(){\n Object.keys(userInfoCacheKey).forEach(key=>{\n if (localStorage_remain.indexOf(key) === -1) {\n localStorage.removeItem(key);\n }\n });\n}\n\n/**\n * user favourites\n */\nfunction getUserFavouriteShows() {\n const favs = localStorage.getItem(eLocalSotrage_tenUser_favourites.tu_shows);\n return favs;\n}\n\nfunction getUserFavouriteRecipes() {\n const favs = localStorage.getItem(eLocalSotrage_tenUser_favourites.tu_recipes);\n return favs;\n}\n\nfunction setUserFavouriteShows(shows) {\n localStorage.setItem(eLocalSotrage_tenUser_favourites.tu_shows, shows);\n}\n\nfunction setUserFavouriteRecipes(recipes) {\n localStorage.setItem(eLocalSotrage_tenUser_favourites.tu_recipes, recipes); \n}\n\nfunction removeFavouriteShows(): void {\n localStorage.removeItem(eLocalSotrage_tenUser_favourites.tu_shows);\n}\n\nfunction removeFavouriteRecipes(): void {\n localStorage.removeItem(eLocalSotrage_tenUser_favourites.tu_recipes);\n}\n\nfunction removeVideoProgress(): void {\n localStorage.removeItem(eLocalSotrage_tenUser_progress.tu_progress);\n}\n\n/**\n * token section\n */\nfunction getAccessToken(){\n return localStorage.getItem(tokenCacheKey.tu_accesstoken);\n}\n\ninterface iJWT {\n accessToken: string,\n refreshToken: string,\n expiresIn: number,\n expiresAt: number,\n memberId: string,\n memberEmailHash: string,\n}\n\nfunction setTokenList(jwt: iJWT): void {\n const { accessToken, refreshToken, expiresAt, expiresIn } = jwt;\n localStorage.setItem(tokenCacheKey.tu_accesstoken, accessToken);\n localStorage.setItem(tokenCacheKey.tu_refreshtoken, refreshToken);\n localStorage.setItem(tokenCacheKey.tu_expiresat, expiresAt * 1000 + \"\");\n localStorage.setItem(tokenCacheKey.tu_expiresin, expiresIn * 1000 + \"\");\n}\n\ninterface iGetTokenDetailOutput {\n accessToken: string,\n refreshToken: string,\n expiresIn: number,\n expiresAt: number,\n}\n\nfunction getTokenList(): iGetTokenDetailOutput {\n return {\n accessToken: localStorage.getItem(tokenCacheKey.tu_accesstoken),\n refreshToken: localStorage.getItem(tokenCacheKey.tu_refreshtoken),\n expiresIn: parseInt(localStorage.getItem(tokenCacheKey.tu_expiresin)),\n expiresAt: parseInt(localStorage.getItem(tokenCacheKey.tu_expiresat)),\n }\n}\n\nfunction removeTokenList():void {\n localStorage.removeItem(tokenCacheKey.tu_accesstoken);\n localStorage.removeItem(tokenCacheKey.tu_refreshtoken);\n localStorage.removeItem(tokenCacheKey.tu_expiresat);\n localStorage.removeItem(tokenCacheKey.tu_expiresin);\n}\n\nfunction setMemberId(jwt: iJWT): void {\n localStorage.setItem(userInfoCacheKey.tu_memberid, jwt.memberId);\n}\n\nfunction getMemberId(): string {\n return localStorage.getItem(userInfoCacheKey.tu_memberid);\n}\n\nfunction removeMemberId(): void {\n localStorage.removeItem(userInfoCacheKey.tu_memberid);\n}\n\nfunction setMemberEmailHashed(jwt: iJWT): void {\n localStorage.setItem(userInfoCacheKey.tu_memberEmailHashed, jwt.memberEmailHash);\n}\n\nfunction getMemberEmailHashed(): string {\n return localStorage.getItem(userInfoCacheKey.tu_memberEmailHashed);\n}\n\n/**\n * social status\n */\ninterface iSocialStatus {\n regId: string\n socialLinkKey: string\n socialSite: string\n socialSiteId: string\n}\n\nfunction setSocialStatus(statusList: Array = []) {\n const socialLinks = [];\n statusList.forEach(socialStatus => {\n socialLinks.push(socialStatus.socialSite);\n });\n localStorage.setItem(userInfoCacheKey.tu_socialLinks, JSON.stringify(socialLinks));\n}\n\nfunction linkSocialStatus(socialName: string) {\n const socialLinks = getSocialStatus();\n if (socialLinks.indexOf(socialName) >= 0) {\n return;\n }\n socialLinks.push(socialName);\n localStorage.setItem(userInfoCacheKey.tu_socialLinks, JSON.stringify(socialLinks));\n}\n\nfunction unlinkSocialStatus(socialName: string) {\n const socialLinks = getSocialStatus();\n const unlinkIndex = socialLinks.indexOf(socialName);\n if (unlinkIndex >= 0) {\n socialLinks.splice(unlinkIndex, 1);\n localStorage.setItem(userInfoCacheKey.tu_socialLinks, JSON.stringify(socialLinks));\n }\n}\n\nfunction getSocialStatus(): Array {\n try {\n const socialLinks = JSON.parse(localStorage.getItem(userInfoCacheKey.tu_socialLinks));\n if (!socialLinks || !Array.isArray(socialLinks)) {\n return [];\n } else {\n return socialLinks;\n }\n } catch (err) {\n return [];\n }\n}\n\nfunction getAutoplaySetting() {\n const autoplay = localStorage.getItem(eLocalSotrage_tenUser_autoplay.tu_autoplay);\n return autoplay;\n}\n\nfunction setAutoplaySetting(autoplay: boolean) {\n localStorage.setItem(eLocalSotrage_tenUser_autoplay.tu_autoplay, JSON.stringify(autoplay));\n}\n\nfunction removeSocialStatus(): void{\n localStorage.removeItem(userInfoCacheKey.tu_socialLinks);\n return;\n}\n\nfunction removeAllCache() {\n removeTokenList();\n removeMemberId();\n removeUserDetail();\n removeSocialStatus();\n removeVideoProgress();\n}\n\nexport const jwtMember = {\n isExpired,\n isLoggedIn,\n isLoggedOut,\n\n setUserDetail,\n getUserDetail,\n\n getUserFavouriteShows,\n getUserFavouriteRecipes,\n setUserFavouriteShows,\n setUserFavouriteRecipes,\n removeFavouriteShows,\n removeFavouriteRecipes,\n\n setMemberId,\n getMemberId,\n\n setAutoplaySetting,\n getAutoplaySetting,\n\n setMemberEmailHashed,\n getMemberEmailHashed,\n\n setTokenList,\n getTokenList,\n removeTokenList,\n getAccessToken,\n\n setSocialStatus,\n linkSocialStatus,\n unlinkSocialStatus,\n getSocialStatus,\n\n removeAllCache,\n};","export const eLocalStorage_tenUser_display = {\n tu_name: \"tu_name\",\n tu_firstname: \"tu_firstname\",\n tu_lastname: \"tu_lastname\",\n tu_email: \"tu_email\",\n tu_socialLinks: \"tu_socialLinks\",\n};\nexport type tLocalStorage_tenUser_display = (typeof eLocalStorage_tenUser_display)[keyof typeof eLocalStorage_tenUser_display];\n\nexport const eLocalStorage_tenUser_backend = {\n tu_username: \"tu_username\",\n tu_userid: \"tu_userid\",\n tu_memberid: \"tu_memberid\",\n tu_oztamid: \"tu_oztamid\",\n tu_n10adId: \"tu_n10adId\",\n tu_memberEmailHashed: \"tu_memberEmailHashed\",\n tu_datecreated: \"tu_datecreated\",\n tu_gr: \"tu_gr\", // TPWP-1368\n tu_ge: \"tu_ge\",\n tu_geo: \"tu_geo\",\n tu_vpn: \"tu_vpn\",\n tu_vpn_switch: \"tu_vpn_switch\",\n tu_memberPostcode: \"tu_memberPostcode\",\n};\nexport type tLocalStorage_tenUser_backend = (typeof eLocalStorage_tenUser_backend)[keyof typeof eLocalStorage_tenUser_backend];\n\nexport const eLocalStorage_tenUser_info = {\n ...eLocalStorage_tenUser_display,\n ...eLocalStorage_tenUser_backend,\n};\nexport type tLocalStorage_tenUser_info = (typeof eLocalStorage_tenUser_info)[keyof typeof eLocalStorage_tenUser_info];\n\nexport const eLocalStorage_tenUser_token = {\n tu_accesstoken: \"tu_accesstoken\",\n tu_refreshtoken: \"tu_refreshtoken\",\n tu_expiresat: \"tu_expiresat\",\n tu_expiresin: \"tu_expiresin\",\n tu_tokentimestamp: \"tu_tokentimestamp\",\n};\nexport type tLocalStorage_tenUser_token = (typeof eLocalStorage_tenUser_token)[keyof typeof eLocalStorage_tenUser_token];\n\nexport const eLocalSotrage_tenUser_favourites = {\n tu_shows: \"tu_shows\",\n tu_recipes: \"tu_recipes\",\n};\n\nexport const eLocalSotrage_tenUser_progress = {\n tu_progress: \"tu_progress\",\n};\n\nexport const eLocalSotrage_tenUser_autoplay = {\n tu_autoplay: \"tu_autoplay\",\n};\n\nexport type tLocalSotrage_tenUser_favourites = (typeof eLocalSotrage_tenUser_favourites)[keyof typeof eLocalSotrage_tenUser_favourites];\n\nexport const eLocalStorage_tenUser = {\n ...eLocalStorage_tenUser_info,\n ...eLocalStorage_tenUser_token,\n};\nexport type tLocalStorage_tenUser = (typeof eLocalStorage_tenUser)[keyof typeof eLocalStorage_tenUser];\n\n\nexport const eLocalStorage_tenTrack = {\n // ten track\n tt_deviceid: \"tt_deviceid\",\n};\nexport type tLocalStorage_tenTrack = (typeof eLocalStorage_tenTrack)[keyof typeof eLocalStorage_tenTrack];\n\nexport const localStorage_remain = [\n eLocalStorage_tenUser_backend.tu_geo,\n];\n\nexport const eLocalStorage = {\n ...eLocalStorage_tenUser,\n ...eLocalStorage_tenTrack,\n};\nexport type tLocalStorage = (typeof eLocalStorage)[keyof typeof eLocalStorage];","import React from 'react';\nimport OverlayTemplate from './overlayTemplate';\nimport SlateTemplate from './slate/slateTemplate';\nimport {iPlayer, PlayerStates} from './playerCtrl.type';\nimport {tOverlays} from \"./overlayTemplate.type\";\nimport {iWebApiVideoData} from \"../api/api.video.type\";\nimport { ProxyCheck } from '../../ten/geo.util';\n\nconst vpnStorageCleanUp = () => {\n try {\n const value = localStorage?.getItem('tu_vpn');\n if (value !== null) {\n ProxyCheck.storageClean();\n window.location.reload();\n }\n } catch (error) {\n // Error retrieving data\n }\n};\n\nconst AdBlockerOMessage = async (_player: iPlayer, video: iWebApiVideoData) => {\n return (\n \n If you're experiencing playback issues, it may be because you have an ad blocker enabled.{' '}\n Try disabling this and see if that resolves the problem. If not, let us know!\n \n }\n />\n );\n};\n\nconst GeoBlockeMessage = async (_player: iPlayer, video: iWebApiVideoData) => {\n return (\n \n If you're in Australia, please disable any VPNs or get in touch with us at{' '}\n \n helpdesk.tenplay.com.au\n {' '}\n for assistance.\n
    \n

    If you are not using a VPN, please click the button below

    \n \n
    \n \n }\n />\n );\n};\n\nconst ErrorFetchingVideoMessage = async () => {\n return ;\n};\n\nconst DetectWindows7Message = async () => {\n return ;\n}\n\nconst AdFetchingVideoMessage = async () => {\n return ;\n};\n\nconst DisplaySlateImage = async (_player: iPlayer, video: iWebApiVideoData, slateUrl: string) => {\n return ;\n};\n\nexport const OverlayFactory: tOverlays = {\n [PlayerStates.AdBlockerOn]: AdBlockerOMessage,\n [PlayerStates.GeoBlocked]: GeoBlockeMessage,\n [PlayerStates.DetectWindows7]: DetectWindows7Message,\n [PlayerStates.ErrorFetchingVideo]: ErrorFetchingVideoMessage,\n [PlayerStates.ErrorFetchingAd]: AdFetchingVideoMessage,\n [PlayerStates.DisplaySlateImage]: DisplaySlateImage,\n};\n","import React from 'react';\nimport {iOverlayTemplateProps} from \"./overlayTemplate.type\";\n\nconst OverlayTemplate = (props: iOverlayTemplateProps) => {\n const {video, heading, body, id } = props;\n const {poster} = video || {};\n\n return (\n \n
    \n
    \n

    {heading}

    \n

    {body}

    \n
    \n
    \n
    \n );\n};\n\nexport default OverlayTemplate;\n","\n\nexport interface iFreeWheelConfig {\n enableFreeWheel: boolean\n}\n\nexport interface iBVodData {\n Demo: string; //\"F55-64\",\n BvodId: string; //\"5786649802655706129\",\n}\n\nexport interface iFreewheelAdTagParametersGlobal {\n imafw__fw_coppa: string | number; // COPPA compliance setting. Should be set to 0 unless otherwise specified. Required for all platforms. (tfcd).\n imafw__fw_is_lat?: string | number; // User tracking preference. Should be 0 or 1 depending on whether tracking is enabled. Required for all platforms.\n imafw__fw_site_page: string; // Represents the site section for web content. Required and dynamically set for all platforms.\n imafw__fw_h_x_country: string | number; // Country code of the request origin. Required for all platforms.\n imafw__fw_vcid2?: string; // Publisher-provided ID (PPID). Optional for all platforms.\n imafw__fw_content_id?: string; // Video content ID representing the specific video asset. Optional, typically used in dynamic content calls.\n imafw__fw_continuous_play?: string | number; // Indicates whether continuous play triggered the video asset. Optional and used for VOD content only.\n imafw__fw_h_referer?: string; // Referrer URL, mainly used for web environments to track the page source. Optional.\n imafw__fw_3P_uid?: string; // Third-party identifier. Optional and used for user identification from external systems. (Comes from FMS API).\n imafw__fw_3P_UID?: string; // Alternative third-party identifier. Optional and often used interchangeably with 3P_uid. (Comes from FMS API).\n}\n\nexport interface iFreeWheelAdTagParametersCustom {\n imafw_ge: string | number; // Gender information\n imafw_gr: string | number; // Age information\n imafw_givn?: string; // Nonce or one-time value, optional and platform-agnostic.\n imafw_pcode: string; // Postcode\n imafw__fw_h_x_postal_code: string; // Postal code, required for all platforms.\n imafw_state: string; // nsw, sa, qld, nt, wa, vic (these values explicitly listed in spreadsheet docs, unsure if other values are acceptable)\n imafw_sub: string; // Source identifier, typically used in GAM for identifying ad request origins. Required for all platforms. (GAM ppid)\n imafw_session: string; // Session ID to track the user session for dynamic content delivery. Required for all platforms.\n imafw_idtype?: string; // Identifier type, optional and specific to third-party integrations. (Needs clarification - refer to docs).\n imafw_ptype?: string; // Optional parameter for specifying P type, used in platform-specific implementations.\n imafw_vguide?: string; // Optional parameter for video guide metadata, typically used in BVOD environments. (\"Video GUID\" (Globally Unique Identifier))\n imafw_oztamozsid?: string; // BVOD-specific metadata used for OZTAM tracking. Optional and used in Australian markets.\n imafw_oztam_1?: string; // BVOD data point for tracking. Optional.\n imafw_oztam_1salted?: string; // Salted version of OZTAM 1 for privacy-preserving tracking. Optional.\n imafw_oztam_1demo?: string; // Demographic data for OZTAM 1. Optional and BVOD-specific.\n imafw_oztam_2?: string; // BVOD data point for OZTAM 2 tracking. Optional.\n imafw_oztam_2salted?: string; // Salted version of OZTAM 2 for privacy purposes. Optional.\n imafw_oztam_2demo?: string; // Demographic data for OZTAM 2. Optional and used in specific BVOD implementations.\n imafw_oztam_3?: string; // BVOD data point for OZTAM 3 tracking. Optional.\n imafw_oztam_3salted?: string; // Salted version of OZTAM 3 for privacy reasons. Optional.\n imafw_oztam_3demo?: string; // Demographic data for OZTAM 3. Optional.\n imafw_oztam_4?: string; // BVOD data point for OZTAM 4 tracking. Optional.\n imafw_oztam_4salted?: string; // Salted version of OZTAM 4. Optional.\n imafw_oztam_4demo?: string; // Demographic data for OZTAM 4. Optional.\n imafw_collection?: string; // Collection metadata, desktop and mobile-specific. Optional and rarely used in dynamic ad requests.\n imafw_tvid?: string; // TV ID for desktop and mobile platforms. Optional and used in some environments.\n imafw_genre?: string; // Genre information for content categorization. Optional and typically used in desktop and mobile.\n imafw_csid?: string;\n}\n\nexport interface AppInfo {\n webhost: string; // Required for desktop and mobile web\n googledai: number;\n region: string; // Required for non-US domestic properties\n coppa: number; // Required\n}\nexport interface DeviceInfo {\n lat: number;\n ip: string;\n ua: string;\n}\nexport interface Identifiers {\n userid?: string;\n ifa?: string; // Optional, include if available\n ifatype?: string; // Optional, include if available\n emailhash?: string; // Optional, include if available\n subscriberid?: string; // Optional, include if available\n}\nexport interface IMSResponse {\n fms_id_ttl: number;\n fms_params: Record;\n}\n\nexport enum State {\n ACT = \"ACT\",\n NSW = \"NSW\",\n VIC = \"VIC\",\n QLD = \"QLD\",\n SA = \"SA\",\n WA = \"WA\",\n TAS = \"TAS\",\n NT = \"NT\",\n}\n\nexport interface StateRange {\n range: [number, number];\n state: State;\n}","import { env } from './../../ten/cust.env';\nimport { iBVodData, iFreeWheelAdTagParametersCustom, iFreewheelAdTagParametersGlobal, iFreeWheelConfig, State, StateRange } from './player.util.type'; // Adjust the import path as necessary\n\nexport const ORIGIN_PROD = \"https://www.10play.com.au\";\nexport const ORIGIN_DEV = \"https://ww1.10play.com.au\";\n\nexport function generateGoogleAdTagParams(\n bvodData: iBVodData[] | null,\n freeWheelConfig: iFreeWheelConfig,\n contentId: string,\n cmsId: string = '',\n ImsApiParameters: any,\n adParams: any,\n additionalParams: any\n) {\n\n function createAdTagParams(enableFreeWheel: boolean, bvodData: iBVodData[], contentId: string, cmsId: string = '', ImsApiParameters: any, adParams:any, additionalParams:any): { [key: string]: any } {\n const {video, miscData, plabackInfo } = additionalParams;\n if (!enableFreeWheel) {\n return {};\n }\n const globalParams = getGlobalParams(contentId, video);\n const customParams = getCustomParams(bvodData, adParams);\n const extraParams = generateExtraFreeWheelParams(video, miscData);\n const adTagParams = {\n ...globalParams,\n ...customParams,\n ...extraParams,\n ...ImsApiParameters\n };\n if (cmsId) {\n adTagParams['cmsid'] = cmsId;\n }\n\n return adTagParams;\n }\n\n function getCustomParams(bvodData: iBVodData[], adParams:any): { [key: string]: any } {\n const customInterfaceParams: iFreeWheelAdTagParametersCustom = {\n imafw_ge: adParams.ge,\n imafw_gr: adParams.gr,\n imafw_pcode: adParams.pcode,\n imafw__fw_h_x_postal_code: adParams.pcode,\n imafw_sub: adParams.sub,\n imafw_session: adParams.session,\n imafw_tvid: adParams.tvid,\n imafw_state: getStateFromPostcode(adParams.pcode), // deriving from postcode\n ...getBvodCustomParams(bvodData, adParams.oztamozsid),\n };\n return { ...customInterfaceParams };\n }\n\n function getGlobalParams(contentId: string, video:any): { [key: string]: string } {\n const defaultSitePage = env?.isProduction() ? ORIGIN_PROD : ORIGIN_DEV;\n const sitePage = window?.location?.href || defaultSitePage;\n const globalInterfaceParams: iFreewheelAdTagParametersGlobal = {\n imafw__fw_coppa: video?.genre?.toLowerCase() === 'kids' ? 1 : 0,\n imafw__fw_site_page: sitePage,\n imafw__fw_h_x_country: String(\"AU\"),\n imafw__fw_content_id: String(contentId || ''),\n };\n const globalParams: { [key: string]: any } = { ...globalInterfaceParams }\n return globalParams;\n }\n\n\n function getBvodCustomParams(bvodData: iBVodData[], oztamSessionId: string): { [key: string]: any } {\n if (!oztamSessionId || bvodData.length === 0) {\n return {};\n }\n const bvodParams = {\n \"imafw_oztamozsid\": oztamSessionId\n };\n \n bvodData.forEach((data) => {\n bvodParams[`imafw_${data.Demo}`] = data.BvodId;\n });\n return bvodParams;\n }\n\n function generateExtraFreeWheelParams(videoData: any, miscData: any): { [key: string]: any } {\n const extraParams = {\n ...miscData\n };\n return extraParams;\n }\n\n function createBvodParamsArray(bvodData: iBVodData[], oztamSessionId: string): string[] {\n if (!oztamSessionId || bvodData.length === 0) {\n return [];\n }\n const paramsArray = [`oztamozsid=${oztamSessionId}`];\n bvodData.forEach((data, index) => {\n paramsArray.push(`oztam_${index + 1}=${data.BvodId}`);\n paramsArray.push(`oztam_${index + 1}demo=${data.Demo}`);\n });\n return paramsArray;\n }\n\n function getStateFromPostcode(postcode: string): State {\n const numericPostcode = parseInt(postcode, 10);\n\n if (isNaN(numericPostcode) || numericPostcode < 200 || numericPostcode > 9999) {\n return undefined;\n }\n\n const states: StateRange[] = [\n { range: [200, 299], state: State.ACT },\n { range: [800, 999], state: State.NT },\n { range: [1000, 1999], state: State.NSW },\n { range: [2000, 2599], state: State.NSW },\n { range: [2619, 2899], state: State.NSW },\n { range: [2921, 2999], state: State.NSW },\n { range: [2600, 2618], state: State.ACT },\n { range: [2900, 2920], state: State.ACT },\n { range: [3000, 3999], state: State.VIC },\n { range: [4000, 4999], state: State.QLD },\n { range: [5000, 5999], state: State.SA },\n { range: [6000, 6797], state: State.WA },\n { range: [7000, 7999], state: State.TAS }\n ];\n\n const matchedState = states.find(({ range }) => numericPostcode >= range[0] && numericPostcode <= range[1]);\n return matchedState ? matchedState.state : undefined;\n }\n\n return createAdTagParams(freeWheelConfig.enableFreeWheel, bvodData || [], contentId, cmsId, ImsApiParameters, adParams, additionalParams);\n}\n\n\n\n","import React from \"react\";\nimport {accountID} from \"../global/config\";\nimport {ePlayerBlockedReason, ePlayerCtrlState, iPlayer, iPlayerCtrlState} from \"./playerCtrl.type\";\nimport { Geo, ProxyCheck } from '../../ten/geo.util';\nimport {AllocatorVideo} from \"../../pkgAviaAllocator/allocator.video\";\nimport { iUapApiVideoData, iWebApiVideoData } from '../api/api.video.type';\nimport {iMediaInfo} from \"../../pkgAviaAllocator/allocator.video.type\";\nimport {isAdBlock} from \"./util/adBlockCheck\";\nimport {isWindows7} from \"./util/detectOs\";\nimport {promiseAllSettled} from \"../../../Shared/Helpers/index\"\n\nexport class PlayerCtrl extends React.Component {\n static ctrls;\n static ctrlsStateCache;\n\n protected _logger = console;\n protected _allocator: AllocatorVideo;\n\n public player: iPlayer;\n public playerContainerId: string;\n public playing: boolean;\n public livePlayList;\n\n constructor(props) {\n super(props);\n if (typeof window === \"undefined\") {\n return;\n }\n\n this._init();\n PlayerCtrl.ctrls = PlayerCtrl.ctrls || [];\n PlayerCtrl.ctrls.push(this);\n }\n\n static batchCtrlState(batchResumePlay?: boolean) {\n PlayerCtrl.ctrls = PlayerCtrl.ctrls || [];\n PlayerCtrl.ctrlsStateCache = PlayerCtrl.ctrlsStateCache || [];\n\n PlayerCtrl.ctrls.forEach((ctrl: PlayerCtrl, index) => {\n if (batchResumePlay) {\n // resume last stored player state\n switch (PlayerCtrl.ctrlsStateCache[index]) {\n case ePlayerCtrlState.play:\n ctrl.player.play();\n break;\n }\n } else {\n // pause all ctrl players\n PlayerCtrl.ctrlsStateCache[index] =\n ctrl.playing ?\n ePlayerCtrlState.play :\n ePlayerCtrlState.notPlay;\n PlayerCtrl.ctrlsStateCache[index] === ePlayerCtrlState.play && ctrl.player.pause();\n }\n })\n }\n\n private _init() {\n this._initVTG();\n }\n\n private _initVTG() {\n const hasVTGConfigs = window.vtg && window.vtg.config;\n // this._logger.log('vtg config: ' + hasVTGConfigs);\n\n if (hasVTGConfigs) {\n window.vtg.config.OzTam.params.serverInfo.vodKey = String(accountID);\n window.vtg.config.OzTam.params.serverInfo.liveKey = String(accountID);\n }\n }\n\n protected async _playerShouldBeBlocked(): Promise {\n const bypassAdBlockDetection = this._bypassAdBlockDetection();\n const [geoBlockResponse, adBlockResponse, vpnBlockResponse] = await promiseAllSettled([Geo.isGeoBlocked(), isAdBlock(), ProxyCheck.vpnCheck()]);\n const isAdBlocked:boolean = adBlockResponse.value;\n const isGeoBlocked:boolean = geoBlockResponse.value;\n const isVpnBlocked:boolean = vpnBlockResponse.value;\n if (isAdBlocked === true && !bypassAdBlockDetection) {\n await this._deniedAdBlocker();\n return ePlayerBlockedReason.adBlocker;\n } else if (isGeoBlocked === true || isVpnBlocked === true ) {\n await this._deniedGeoBlocker();\n return ePlayerBlockedReason.geoBlocker;\n } else if(await isWindows7() === true){\n await this._deniedWindows7();\n return ePlayerBlockedReason.win7Blocker\n }\n return;\n }\n\n protected _bypassAdBlockDetection = () => {\n const bypassShows = [\"neighbours\", \"ncis\", \"the-bold-and-the-beautiful-fast-tracked\"];\n let bypassDetection = false;\n for(let i = 0; i < bypassShows.length; i++) {\n bypassDetection = window.location.pathname.indexOf(bypassShows[i]) > -1;\n if(bypassDetection) {\n break;\n }\n }\n return bypassDetection;\n }\n\n static convertToVideoTrackObj(mediaInfo: any, video?: any , OzTamSessionID?:string): iMediaInfo {\n const {customFields} = mediaInfo;\n return {\n id: mediaInfo.id,\n name: mediaInfo.clipTitle,\n account_id: accountID + \"\",\n description: mediaInfo.description,\n long_description: mediaInfo.description,\n duration: mediaInfo.duration + \"\",\n channelDisplayName: mediaInfo.channelDisplayName,\n head_position: \"0\",\n created_at: mediaInfo.published + \"\",\n published_at: mediaInfo.published + \"\",\n updated_at: mediaInfo.published + \"\",\n reference_id: mediaInfo.referenceId,\n publisher_id: accountID + \"\",\n custom_fields: {\n alt_media_id: mediaInfo.altId,\n tv_channel: mediaInfo.tvChannel,\n tv_show: mediaInfo.tvShow,\n tv_episode: mediaInfo.episode,\n tv_season: mediaInfo.season,\n episode_crid_id: mediaInfo.episodeCrid,\n series_crid_id: mediaInfo.seriesCrid,\n clip_title: mediaInfo.clipTitle,\n episode_name: mediaInfo.title,\n expiry_date: mediaInfo.expiry + \"\",\n program_classification: mediaInfo.classification,\n video_type_long_form: mediaInfo.videoTypeLongForm,\n showContentMarket: customFields?.market,\n oztamPublisherId: mediaInfo.publisherid,\n oztamSessionId: OzTamSessionID,\n },\n video : {\n ShowGenre: video?.genre || mediaInfo.genre,\n ShowProgramClassification: video?.showRatingClassification,\n isMemberGatedLive: video?.memberGated,\n }\n\n }\n }\n\n /*\n *\n * Implement below methods in child class\n *\n * */\n protected _trackEvent(event, allocatorVideo, mediaInfo, playerRef): void {\n\n }\n\n protected async _deniedAdBlocker() {\n }\n\n protected async _deniedGeoBlocker() {\n }\n\n protected async _deniedWindows7() {\n }\n}","import React from \"react\";\nimport {iAllocatorPlayerRef} from \"../../pkgAviaAllocator/allocator.video.type\";\nimport {PlayerEvent, VideoPlayerInterface} from \"../avia.lib\";\nimport { PlaylistEvent } from \"@cbsinteractive/avia-js-playlist\";\n\nexport interface iPlayerCtrlState {\n playerState: PlayerStates;\n overlay: React.ReactNode,\n}\n\nexport enum PlayerStates {\n PreInitialize = 'PreInitialize',\n ErrorOccurred = 'ErrorOccurred',\n\n Playing = 'Playing',\n Paused = 'Paused',\n End = 'End',\n Next = 'Next',\n AdPlaying = 'AdPlaying',\n AdBlockerOn = 'AdBlockerOn',\n GeoBlocked = 'GeoBlocked',\n DetectWindows7 = \"DetectWindows7\",\n ErrorFetchingVideo = 'ErrorFetchingVideo',\n ErrorFetchingAd = 'ErrorFetchingAd',\n DisplaySlateImage = 'DisplaySlateImage',\n}\n\nexport type playerEventMappable =\n PlayerEvent.CONTENT_PLAYING |\n PlayerEvent.CONTENT_PAUSED |\n PlayerEvent.CONTENT_COMPLETE |\n PlayerEvent.ERROR |\n PlayerEvent.AD_PROGRESS;\n\nexport const playerEventStateMap = {\n [PlayerEvent.CONTENT_PLAYING]: PlayerStates.Playing,\n [PlayerEvent.CONTENT_PAUSED]: PlayerStates.Paused,\n [PlayerEvent.CONTENT_COMPLETE]: PlayerStates.End,\n [PlayerEvent.ERROR]: PlayerStates.ErrorOccurred,\n [PlayerEvent.AD_PROGRESS]: PlayerStates.AdPlaying,\n};\n\nexport enum ePlayerBlockedReason {\n adBlocker = \"adBlock\",\n geoBlocker = \"geoBlock\",\n win7Blocker = \"win7Block\"\n}\n\n\nexport enum ePlayerCtrlState {\n notPlay,\n play,\n}\n\nexport interface iPlayer extends VideoPlayerInterface, iAllocatorPlayerRef {\n videoElement?: any;\n logoUrl?: string;\n consumerAdvice?: string | null;\n}\n","import React from 'react';\nimport {iOverlayTemplateProps} from \"../overlayTemplate.type\";\n\nconst SlateTemplate = (props: iOverlayTemplateProps) => {\n const {id, slateUrl } = props;\n\n return (\n \n \n );\n};\n\nexport default SlateTemplate;\n","import {iTealiumTrackingData, Tealium} from \"../../../pkgAviaAllocator/tealium\";\nimport {jwtMember} from \"../../../tenMember/jwt/cacheStatus\";\n\ninterface iTPWPTealiumTrackingData extends iTealiumTrackingData {\n memberId?: string,\n memberEmailHashed?: string,\n memberLoginStatus?: \"logged-in\" | \"logged-out\",\n showProgramClassification?: string,\n memberGender?: string,\n memberAge?: string,\n memberPostcode?: string,\n memberFavouriteGenre?: string,\n}\n\nexport class TealiumAvia extends Tealium {\n protected getGeneralData(mediaInfo): iTPWPTealiumTrackingData {\n const result: iTPWPTealiumTrackingData = super.getGeneralData(mediaInfo);\n\n const userinfo = jwtMember.getUserDetail();\n\n if (jwtMember.isLoggedIn()) {\n result.memberId = jwtMember.getMemberId();\n result.memberEmailHashed = jwtMember.getMemberEmailHashed();\n result.memberLoginStatus = jwtMember.isLoggedIn() ? \"logged-in\" : \"logged-out\";\n result.memberGender = jwtMember.getMemberGender();\n result.memberAge = jwtMember.getMemberAge();\n result.memberPostcode = jwtMember.getMemberPostcode();\n result.memberFavouriteGenre = jwtMember.getMemberFavouriteGenre();\n }\n\n return result;\n }\n}","// Checks to see if the user has ad blocker enabled\nexport async function isAdBlock() {\n \n let isBlocked;\n \n const tryRequest = async () => {\n try {\n return fetch(\"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\", {\n method: 'HEAD',\n mode: 'no-cors'\n })\n .then((response) => {\n // Google Ads request succeeded, so likely no ad blocker\n isBlocked = false;\n return isBlocked;\n }).catch((e) => {\n // Request failed, likely due to ad blocker\n isBlocked = true;\n return isBlocked;\n });\n } catch (error) {\n console.error(error);\n isBlocked = true;\n return isBlocked;\n }\n }\n \n return isBlocked !== undefined ? isBlocked : await tryRequest();\n }","export async function isWindows7() {\n return navigator.appVersion.indexOf(\"Windows NT 6.1\") !== -1\n}","let userAgentFilterName = [\"bot\", \"mobile\", \"tablet\", \"mobile\"];\nlet userAgentFilter = [\n [\n /(ads|google|bing|msn|yandex|baidu|ro|career|)bot/i,\n /(baidu|jike|symantec)spider/i,\n /scanner/i,\n /(web)crawler/i,\n ],\n [\n /ip(hone|od)/i,\n /android.*(mobile|mini)/i,\n /Opera Mobi/,\n /Mobile.+Firefox/,\n /^HTC/,\n /Fennec/,\n /IEMobile/,\n /BlackBerry/,\n /BB10.*Mobile/,\n /GT-.*Build\\/GINGERBREAD/,\n /SymbianOS.*AppleWebKit/,\n ],\n [\n /ipad/i,\n /android/i,\n /PlayBook; U; RIM Tablet/,\n /hp-tablet.*TouchPad/,\n /Kindle\\/3/,\n\n ],\n [\n // without brand\n /symbian/i,\n /^sonyericsson/i,\n /^nokia/i,\n /^samsung/i,\n /^lg/i,\n /bada/i,\n /blazer/i,\n /cellphone/i,\n /iemobile/i,\n /midp-2.0/i,\n /u990/i,\n /netfront/i,\n /opera mini/i,\n /palm/i,\n /nintendo wii/i,\n /playstation portable/i,\n /portalmmm/i,\n /proxinet/i,\n /sonyericsson/i,\n /symbian/i,\n /windows\\ ?ce/i,\n /winwap/i,\n /eudoraweb/i,\n /htc/i,\n /240x320/i,\n /avantgo/i,\n ],\n];\n\n\nlet type = \"\";\nif (typeof window !== \"undefined\") {\n let filterType = userAgentFilterName.find(function(filterName, index){\n return !!userAgentFilter[index].find(function(regex, regIndex){\n return regex.test(window.navigator.userAgent);\n });\n });\n filterType ? type = filterType : type = \"desktop\";\n}\n\nexport const deviceType = type;","import {deviceType} from \"./device\";\n\nexport const detectBrowser = (function () {\n if (typeof window === \"undefined\") {\n return {\n name: \"node\",\n version: \"0.0.0\"\n };\n }\n\n let userAgent = navigator.userAgent;\n let browserName;\n\n if (userAgent.match(/edg/i)) {\n browserName = \"Edge\";\n }else if(userAgent.match(/chrome|chromium|crios/i)) {\n browserName = \"chrome\";\n } else if (userAgent.match(/firefox|fxios/i)) {\n browserName = \"firefox\";\n } else if (userAgent.match(/safari/i)) {\n browserName = \"safari\";\n } else if (userAgent.match(/opr\\//i)) {\n browserName = \"opera\";\n } else {\n browserName = \"No browser detection\";\n }\n return browserName.toLowerCase();\n})\n\nexport function isFlashPlayerEnabled(): boolean {\n let navigator = (window as any).navigator;\n if (navigator.mimeTypes\n && navigator.mimeTypes['application/x-shockwave-flash'] != undefined\n && navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) {\n return true;\n } else {\n try {\n new ActiveXObject('ShockwaveFlash.ShockwaveFlash');\n return true;\n } catch (e) {\n return false;\n }\n }\n}\n\nexport function generateUUID() {\n let d = new Date().getTime();\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n let r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c == 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n}\n\nexport function gup(name) {\n if (typeof window === \"undefined\") {\n return \"\";\n }\n\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n let regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\n let regex = new RegExp(regexS);\n let results = regex.exec(window.location.href);\n return (results === null) ? \"\" : results[1];\n}\n\nexport const urlUtil = (function () {\n if (typeof window === \"undefined\") {\n return {\n kv: {},\n keys: [],\n };\n }\n\n let params: { [key: string]: string } = {};\n let paramKeys = [];\n if (location.search) {\n let paramStr = location.search;\n if (paramStr[0] === \"?\") {\n paramStr = paramStr.substr(1);\n }\n let paramArray = paramStr.split(\"&\");\n for (let i = 0; i < paramArray.length; i++) {\n let kv = paramArray[i].split(\"=\");\n if (kv.length === 2) {\n params[kv[0]] = kv[1];\n paramKeys.push(kv[0]);\n }\n }\n }\n\n return {\n kv: params,\n keys: paramKeys\n }\n})();\n\nexport const getOffsetTop = (element) => {\n if (!element || !element.nodeName || element.nodeName.toLowerCase() === \"body\") {\n return 0;\n } else {\n return element.offsetTop + getOffsetTop(element.offsetParent)\n }\n};\nexport const lazyCallback = (\n slotElement: HTMLElement,\n events: Array,\n pixelOffset: number,\n callback: () => void\n) => {\n events.forEach((event) => {\n let callbackWrapper = () => {\n for (let i = 0; i < events.length; i++) {\n window.removeEventListener(events[i], eventCallback, false);\n }\n callback();\n };\n\n let eventCallback = () => {\n let windowScrollTop = window.pageYOffset || window.scrollY;\n let windowScrollBottom = window.innerHeight + windowScrollTop;\n let slotOffsetTop = getOffsetTop(slotElement);\n let slotOffsetBottom = getOffsetTop(slotElement) + slotElement.clientHeight;\n if (windowScrollTop < 0) {\n callbackWrapper();\n } else {\n if (slotOffsetTop > (windowScrollTop - pixelOffset) && slotOffsetTop < windowScrollBottom) {\n callbackWrapper();\n }\n if (slotOffsetBottom < (windowScrollBottom + pixelOffset) && slotOffsetBottom > windowScrollTop) {\n callbackWrapper();\n }\n }\n };\n\n window.addEventListener(event, eventCallback, false);\n })\n};\n\nexport const cookies = {\n /**\n *\n * @param name\n * @param paths\n */\n expireAllCookies: function (name, paths) {\n let expires = new Date(0).toUTCString();\n\n // expire null-path cookies as well\n document.cookie = name + '=; expires=' + expires;\n\n for (let i = 0, l = paths.length; i < l; i++) {\n document.cookie = name + '=; path=' + paths[i] + '; expires=' + expires;\n }\n },\n /**\n *\n * @param name\n */\n deleteCookie: function (name) {\n this.setCookie(name, '', -1);\n },\n /**\n *\n * @param name\n * @returns {*}\n */\n getCookie: function (name) {\n let reg = new RegExp('(?:^|; )' + encodeURIComponent(name) + '=([^;]*)', \"i\");\n let matches = document.cookie.match(reg);\n if (matches && matches.length > 1) {\n return matches[1];\n } else {\n return undefined;\n }\n },\n /**\n *\n * @param name\n * @param value\n * @param time\n */\n setCookie: function (name, value, time?) {\n let date = new Date();\n let expires;\n if (typeof value === \"object\") {\n value = JSON.stringify(value);\n }\n if (time) {\n if (typeof time === \"number\" || time.days) {\n date.setTime(date.getTime() + (time * 24 * 60 * 60 * 1000));\n } else if (time.hours) {\n date.setTime(date.getTime() + (time.hours * 60 * 60 * 1000));\n } else if (time.mins) {\n date.setTime(date.getTime() + (time.mins * 60 * 1000));\n } else if (time.seconds) {\n date.setTime(date.getTime() + (time.seconds * 1000));\n }\n expires = \"; expires=\" + date.toUTCString();\n } else {\n expires = \"\";\n }\n document.cookie = name + \"=\" + value + expires + \"; path=/\";\n }\n};\n\nexport const storages = {\n getJSONFromLocalStorage: function (key: string) {\n if (typeof window === \"undefined\") {\n return;\n }\n\n let storageData = (window as any).localStorage.getItem(key);\n if (!storageData) {\n return undefined;\n }\n\n try {\n return JSON.parse(storageData);\n } catch (e) {\n return undefined;\n }\n },\n setJSONToLocalStorage: function (key: string, data: any) {\n if (typeof window === \"undefined\") {\n return;\n }\n\n let stringifyData;\n if (data === undefined || data === null) {\n stringifyData = \"\";\n } else {\n stringifyData = JSON.stringify(data)\n }\n\n (window as any).localStorage.setItem(key, stringifyData);\n }\n};\n\nlet clientWidth, clientHeight;\n\nif (typeof window !== \"undefined\" && document) {\n clientWidth = document.documentElement.clientWidth;\n clientHeight = document.documentElement.clientHeight;\n}\n\nexport const documentClientWidth = clientWidth;\nexport const documentClientHeight = clientHeight;\n\nexport const isMobile = deviceType === \"mobile\";\nexport const isTablet = deviceType === \"tablet\";\nexport const isDesktop = deviceType === \"desktop\";\n\nexport const isMobileWidth = documentClientWidth < 768;\nexport const isTabletWidth = documentClientWidth >= 768 && documentClientWidth < 1024;\nexport const isDesktopWidth = documentClientWidth >= 1024;\n\n","import {isDesktop} from \"./env.util\";\nimport {iVideoAdConfig, iVideoAdParamMapping} from \"./imaUtil.type\";\n\nconst processParamMapping = (paramMapping: iVideoAdParamMapping, path): string => {\n // setting must be complete\n if (!paramMapping.param ||\n !Array.isArray(paramMapping.mappingKey) ||\n !Array.isArray(paramMapping.mappingValue) ||\n paramMapping.mappingKey.length !== paramMapping.mappingValue.length\n ) {\n return;\n }\n\n // find match key index\n const index = paramMapping.mappingKey.findIndex(key => {\n return location.pathname.indexOf(key) === 0;\n });\n\n // get match key's value\n if (index === -1) {\n return;\n }\n\n let out = paramMapping.mappingValue[index];\n let extensionOut;\n\n // if extension setting exists, add extension to the \"out\" value\n if (paramMapping.extensionValue) {\n switch (paramMapping.extensionValue) {\n case \"category\":\n path[0] && (extensionOut= path[0]);\n break;\n case \"section\":\n path[1] && (extensionOut= path[1]);\n break;\n case \"subSection\":\n path[2] && (extensionOut= path[2]);\n break\n }\n }\n if (extensionOut && Array.isArray(paramMapping.extensionReplaceMapping)) {\n paramMapping.extensionReplaceMapping.forEach(replaceKV=>{\n extensionOut.replace(replaceKV[0], replaceKV[1]);\n })\n }\n if (extensionOut) {\n out += extensionOut;\n }\n\n return out;\n}\n\nconst generateAdditionalParam = (paramMappings: Array, path: Array): string => {\n if (!Array.isArray(paramMappings)) {\n return \"\";\n }\n\n const params = paramMappings.map((paramMapping, ind) => {\n const paramOut = processParamMapping(paramMapping, path);\n return paramOut ? paramMapping.param + \"=\" + paramOut : \"\";\n }).filter(param => {\n return !!param;\n });\n\n return encodeURIComponent(Array.from(new Set(params)).join(\"&\"));\n}\n\nexport const formatIMAServerUrl = (videoId: string | number, videoAdConfig: iVideoAdConfig, bvodData: any): string => {\n if (Array.isArray(bvodData) && bvodData.length > 0) {\n videoAdConfig.customParams.push(...bvodData);\n }\n if (!videoId || !videoAdConfig){\n return \"\";\n }\n\n let urlString = \"https://pubads.g.doubleclick.net/gampad/ads?\" +\n \"iu=/\" +\n videoAdConfig.account + \"/\" +\n videoAdConfig.id + \"/\" +\n videoAdConfig.device + \"/\" +\n videoAdConfig.site +\n \"&description_url=\" + encodeURIComponent(location.href) +\n \"&env=vp\" +\n \"&impl=s\" +\n \"&correlator=\" +\n \"&scor==\" +\n \"&tfcd=0\" +\n \"&npa=0\" +\n \"&gdfp_req=1\" +\n \"&output=xml_vmap1_vast4\" +\n \"&sz=640x480\" +\n (videoAdConfig.companionAds.enabled ? \"&ciu_szs=\" + encodeURIComponent(videoAdConfig.companionAds.adSizes.map(size=>(Array.isArray(size) && size.join(\"x\") || size)).join(\",\")) : \"\") +\n \"&pp=\" + (isDesktop ? \"vpaid_js\" : \"ssai\") +\n \"&cmsid=\" + videoAdConfig.cmsID +\n \"&vid=\" + videoId +\n \"&unviewed_position_start=1\";\n\n\n const additionalParam = generateAdditionalParam(videoAdConfig.paramMappings, videoAdConfig.categoryPath);\n\n additionalParam && (urlString += `&cust_params=${additionalParam}`);\n \n const requestParams = videoAdConfig.requestParams;\n if (Array.isArray(requestParams)) {\n requestParams.forEach(kv => {\n if (Array.isArray(kv) && kv.length === 2 && kv[0] !== \"\" && kv[1] !== \"\") {\n urlString += `&${kv[0]}=${kv[1]}`;\n }\n })\n }\n\n if (Array.isArray(videoAdConfig.customParams) && videoAdConfig.customParams.length > 0) {\n let appendingCustomParams = videoAdConfig.customParams.map(kv=>{\n if (typeof kv[0] !== \"string\" || [undefined, null].indexOf(kv[1]) >= 0) {\n return \"\";\n }\n return `${kv[0]}=${kv[1]}`;\n }).filter(kv=>{\n return kv !== \"\";\n });\n if (appendingCustomParams.length > 0) {\n urlString += \"&cust_params=\" + encodeURIComponent(appendingCustomParams.join(\"&\"));\n }\n }\n return urlString;\n}","const isShowPage = () => {\n\n const utag_data = (window as any).utag_data;\n\n if (!utag_data.showChannel) {\n return;\n }\n if (!utag_data.showName) {\n // this is live page\n return;\n }\n return [\"ten\", \"bold\", \"peach\", \"shake\"].indexOf(utag_data.showChannel.toLowerCase()) >= 0;\n}\n\nexport function hasShowVideo() {\n return document.querySelector(\".show-video__player\") !== null;\n}\n\nexport function isCompanionAds() {\n return isShowPage() && hasShowVideo();\n}","import { PluginServicesInterface, ResourceConfigurationInterface, PluginConfigInterface, PluginInterface } from '@cbsinteractive/avia-js'\nimport { UpNextOptionInterface } from './UpNextOptionInterface';\nimport { getNextVideos } from \"../../../../../components/AviaVodContainer/utils\";\nimport { jwtMember } from '../../../player/jwt/cacheStatus';\nimport { AutoplayClass } from './enums'\nimport { iWebApiVideoData } from '../../../api/api.video.type';\nimport { videoEndPanel } from './ui-templates/videoEndPanel'\nimport { upNextCard } from './ui-templates/upNextCard';\nimport { PLAYLIST } from '@cbsinteractive/avia-js-playlist';\n\n\texport function upnext(options = {}): PluginConfigInterface {\n\t\treturn {\n\t\t\tfactory: createUpNext,\n\t\t\toptions,\n\t\t\tid: 'upnext'\n\t\t};\n\t}\n\texport const createUpNext = (services: PluginServicesInterface, options: UpNextOptionInterface): PluginInterface => {\n\t\tlet resource: ResourceConfigurationInterface;\n\t\tlet panelEnd: any;\n\t\tlet panelNext: any;\n\t\tlet nextVideos: iWebApiVideoData[] // Up next videos\n\t\t// Templates-----------\n\t\tlet videoEndPanelTemplate: string;\n\t\tlet upNextCardTemplate: string;\n\t\t// Templates-----------\n\t\tlet countdownSeconds = 5;\n\t\tlet countdownHandler: null | ReturnType = null;\n\t\tlet upNextAutoplay: string;\n\n\t\tlet isOpen = false;\n\n\t\tconst { player, dom } = services;\n\t\t\n\t\tconst vodPlayList = player.getPlugin(PLAYLIST);\n\n\t\tconst { PlayerEvent } = services.avia;\n\t\tconst container = dom.main;\n\n\n\t\tconst onContentStart = async (event:any) => {\n\t\t\tisOpen = false;\n\t\t\tkillUpNextPanel();\n\t\t\tupNextAutoplay = jwtMember.getAutoplaySetting();\n\t\t\tresource = player.resource as ResourceConfigurationInterface;\n\t\t\tnextVideos = await getNextVideos(resource.metadata.altMediaId);\n\t\t\tvideoEndPanelTemplate = videoEndPanel(nextVideos)\n\t\t\tupNextCardTemplate = upNextCard(nextVideos)\n\t\t}\n\n\t\t// Video End Panel ---------------------------------------------------------\n\n\t\tconst createVideoEndPanel = () => {\n\t\t\tvodPlayList && vodPlayList.clear();\n\t\t\tif (!resource) return;\n\t\t\tpanelEnd = document.createElement('div');\n\t\t\tpanelEnd.classList.add('up-next');\n\t\t\tpanelEnd.style.zIndex = options.level || 100;\n\t\t\tpanelEnd.innerHTML = `
    ${videoEndPanelTemplate}
    `;\n\t\t\tpanelEnd.onclick = (event) => {\n\t\t\t\thandlePanelClick(event)\n\t\t\t}\n\t\t\tcontainer.appendChild(panelEnd);\n\n\t\t\tif (upNextAutoplay === 'false') {\n\t\t\t\thandleAutoplay(false);\n\t\t\t} else {\n\t\t\t\thandleAutoplay(true);\n\t\t\t}\n\t\t\tisFullscreenMode();\n\t\t}\n\n\t\tconst handlePanelClick = (evt:any) => {\n\t\t\tconst className = evt.target.className;\n\t\t\tconst evtIndex = parseInt(evt.target.getAttribute('data-index'), 10) + 1;\n\t\t\tconst dataIndex = evtIndex ? evtIndex : 0;\n\n\t\t\tswitch (className) {\n\t\t\t\tcase 'video-end__image':\n\t\t\t\t\tplayNextVideo(dataIndex ? dataIndex : 0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'up-next__image':\n\t\t\t\t\tplayNextVideo(0);\n\t\t\t\t\twindow.tenService.pageAllocator && window.tenService.pageAllocator.track(\"UPNEXT_CLICK_BANNER\", { name: nextVideos[0].title });\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'close__button':\n\t\t\t\t\tkillUpNextPanel();\n\t\t\t\t\tisOpen = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase AutoplayClass.ON:\n\t\t\t\t\thandleAutoplay(true);\n\t\t\t\t\tbreak;\n\t\t\t\tcase AutoplayClass.OFF:\n\t\t\t\t\thandleAutoplay(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'exit-fullscreen__btn':\n\t\t\t\t\texitFullscreen();\n\t\t\t\t\tbreak;\n\t\t\t};\n\n\t\t};\n\n\n\n\t\tconst handleAutoplay = (autoplay: boolean) => {\n\t\t\tconst countDownContainer = document.querySelector('.countdown__text') as HTMLElement;\n\t\t\tconst offBtn = document.querySelector(`.${AutoplayClass.OFF}`);\n\t\t\tconst onBtn = document.querySelector(`.${AutoplayClass.ON}`);\n\t\t\tclearInterval(countdownHandler);\n\t\t\tjwtMember.setAutoplaySetting(autoplay);\n\t\t\tif (autoplay) {\n\t\t\t\tonBtn.classList.add('selected');\n\t\t\t\toffBtn.classList.remove('selected');\n\t\t\t\tupdateCountDownText();\n\t\t\t\tcountDownContainer && countDownContainer.classList.remove('hide');\n\t\t\t\tcountdownHandler = setInterval(updateCountdown, 1000);\n\t\t\t} else {\n\t\t\t\toffBtn.classList.add('selected');\n\t\t\t\tonBtn.classList.remove('selected');\n\t\t\t\tcountDownContainer && countDownContainer.classList.add('hide');\n\t\t\t\tcountdownSeconds = 5;\n\t\t\t};\n\t\t};\n\n\t\tconst updateCountdown = () => {\n\t\t\tif (countdownSeconds > 0) {\n\t\t\t\tcountdownSeconds--;\n\t\t\t\tupdateCountDownText();\n\t\t\t} else {\n\t\t\t\tclearInterval(countdownHandler);\n\t\t\t\tplayNextVideo(0);\n\t\t\t}\n\t\t};\n\n\t\tconst updateCountDownText = () => {\n\t\t\tconst countDownElement = document.getElementById('countdown__text') as HTMLElement;\n\t\t\tcountDownElement ? countDownElement.innerHTML = `In ${countdownSeconds} Seconds` : null;\n\t\t}\n\n\t\tconst playNextVideo = (tileIndex: number) => {\n\t\t\tservices.event.dispatchPluginEvent({ event: 'change-video', video: nextVideos[tileIndex] });\n\t\t\tkillVideoEndPanel();\n\t\t};\n\n\t\tconst killVideoEndPanel = () => {\n\t\t\tif (container && container.contains(panelEnd)) {\n\t\t\t\tcontainer.removeChild(panelEnd)\n\n\t\t\t}\n\t\t\tclearInterval(countdownHandler);\n\t\t\tcountdownSeconds = 5;\n\t\t};\n\t\t// End Video End Panel -----------------------------------------------------\n\n\n\n\t\t// Full Screen ---------------------------------------------------------------\n\t\tconst isFullscreenMode = () => {\n\t\t\tconst overlay = document.querySelector('.up-next') as HTMLElement;\n\t\t\tconst compressIcon = document.querySelector('.exit-fullscreen__btn') as HTMLElement;\n\t\t\tif (!overlay || !compressIcon) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst overlayWidth = overlay.offsetWidth;\n\t\t\tif (overlayWidth > 832) {\n\t\t\t\tcompressIcon.style.display = \"block\";\n\t\t\t} else {\n\t\t\t\thideCompressionIcon();\n\t\t\t}\n\t\t}\n\t\tconst hideCompressionIcon = () => {\n\t\t\tconst compressIcon = document.querySelector('.exit-fullscreen__btn') as HTMLElement;\n\t\t\tcompressIcon.style.display = \"none\";\n\t\t}\n\t\tconst exitFullscreen = () => {\n\t\t\tif (document.exitFullscreen) {\n\t\t\t\tdocument.exitFullscreen();\n\t\t\t\thideCompressionIcon();\n\t\t\t};\n\t\t}\n\t\t// End Full Screen -----------------------------------------------------------\n\n\n\n\t\t// Upnext card ----------------------------------------------------------------\n\t\tconst createUpNextPanel = async () => {\n\t\t\twindow.tenService.pageAllocator && window.tenService.pageAllocator.track(\"UPNEXT_SHOW_BANNER\");\n\t\t\tpanelNext = document.createElement('div');\n\t\t\tpanelNext.classList.add('up-next-card');\n\t\t\tpanelNext.style.zIndex = options.level || 100;\n\t\t\tpanelNext.innerHTML = `
    ${upNextCardTemplate}
    `;\n\t\t\tpanelNext.onclick = (event: any) => {\n\t\t\t\thandlePanelClick(event)\n\t\t\t}\n\t\t\tcontainer.appendChild(panelNext);\n\t\t\tisOpen = true;\n\t\t};\n\t\tconst killUpNextPanel = () => {\n\t\t\tconst element = document.querySelector('.up-next-panel') as HTMLElement;\n\t\t\tif (container && container.contains(panelNext)) {\n\t\t\t\tcontainer.removeChild(panelNext);\n\t\t\t\tisOpen = false;\n\t\t\t}\n\t\t};\n\t\t// End Upnext card ------------------------------------------------------------\n\n\n\n\t\t// Player Event Handlers ------------------------------------------------------\n\t\tconst handlePlayerEvent = async (evt) => {\n\t\t\tswitch (evt.type) {\n\t\t\t\tcase PlayerEvent.CONTENT_PROGRESS:\n\t\t\t\t\tconst contentDuration = evt.detail.contentDuration;\n\t\t\t\t\tconst contentTime = evt.detail.contentTime;\n\t\t\t\t\tif (contentDuration - contentTime <= 30 && !player.isAd ) {\n\t\t\t\t\t\t\tif(isOpen === false) {\n\t\t\t\t\t\t\t\tawait createUpNextPanel();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tkillUpNextPanel();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase PlayerEvent.CONTENT_PAUSED:\n\t\t\t\t\tkillUpNextPanel();\n\t\t\t\t\tbreak;\n\t\t\t\tcase PlayerEvent.AD_PLAYING:\n\t\t\t\t\tkillUpNextPanel();\n\t\t\t\t\tbreak;\n\t\t\t\tcase PlayerEvent.RESOURCE_END:\n\t\t\t\t\tkillUpNextPanel();\n\t\t\t};\n\t\t};\n\n\t\tconst eventTypes = PlayerEvent;\n\t\tfor (const key in eventTypes) {\n\t\t\tplayer.on(eventTypes[key], async (event: any) => {\n\t\t\t\tawait handlePlayerEvent(event);\n\t\t\t});\n\t\t}\n\t\n\t\tplayer.on(PlayerEvent.CONTENT_START, onContentStart);\n\t\tplayer.once(PlayerEvent.CONTENT_PROGRESS, onContentStart);\n\t\tplayer.on(PlayerEvent.CONTENT_COMPLETE, createVideoEndPanel);\n\t\tplayer.on(PlayerEvent.LIVE_PRESENTATION_STOPPED, createVideoEndPanel);\n\n\t\treturn {\n\t\t\tgetId() {\n\t\t\t\treturn 'upnext';\n\t\t\t}, \n\t\t\tdestroy() {\n\t\t\t\tif (panelEnd) {\n\t\t\t\t\tpanelEnd.onclick = null;\n\t\t\t\t\tcontainer.removeChild(panelEnd);\n\t\t\t\t}\n\t\t\t\tif (panelNext) {\n\t\t\t\t\tpanelNext.onclick = null;\n\t\t\t\t\tcontainer.removeChild(panelNext);\n\t\t\t\t}\n\t\n\t\t\t\tplayer.off(PlayerEvent.RESOURCE_START, onContentStart);\n\t\t\t\tplayer.off(PlayerEvent.CONTENT_PROGRESS, onContentStart);\n\t\t\t\tplayer.off(PlayerEvent.CONTENT_COMPLETE, createVideoEndPanel);\n\t\t\t\tplayer.off(PlayerEvent.LIVE_PRESENTATION_STOPPED, createVideoEndPanel);\n\t\t\t}\n\t\t};\n\t\t// End Player Event Handlers --------------------------------------------------\n\t};","export enum AutoplayClass {\n ON = \"autoplay-on\",\n OFF = \"autoplay-off\",\n}","export const upNextCard = (nextVideos) => {\n const { title, image } = nextVideos[0];\n return `
    \n
    \n \n
    \n

    Up Next

    \n ${title}\n
    \n
    \n \n
    `\n}","export const videoEndPanel = (nextVideos) => {\n\n const videoArray = [...nextVideos];\n\tconst upNext = videoArray[0];\n\tconst moreVideos = videoArray.splice(1,4);\n const { title, airDate, description, image } = upNext;\n return `
    \n
    \n

    Up Next In 5 Seconds

    \n
    \n

    Autoplay:

    \n \n \n
    \n
    \n
    \n \n
    \n

    ${title}

    \n

    ${airDate}

    \n

    ${description}

    \n
    \n
    \n
    \n

    More For You

    \n
    \n ${moreVideos.map((videos, index:number) => {\n const { title, airDate, description, image } = videos;\n return `
    \n \n

    ${title}

    \n

    ${airDate}

    \n
    `\n }).join('')\n }\n\n
    \n
    \n
    \n
    `\n\n}","import type { PluginConfigInterface, PluginInterface, PluginServicesInterface, ResourceConfigurationInterface } from '@cbsinteractive/avia-js';\nimport { AviaDisplayOptionsInterface } from './AviaDisplayOptionsInterface';\n\nexport const DISPLAY = 'display';\n\nexport function display(options: Partial = {}): PluginConfigInterface {\n\treturn {\n\t\tid: DISPLAY,\n\t\tfactory: createDisplayPlugin,\n\t\toptions,\n\t};\n}\n\nexport function createDisplayPlugin(services: PluginServicesInterface, options: AviaDisplayOptionsInterface): PluginInterface {\n\tlet resource: ResourceConfigurationInterface;\n\tlet panel: any;\n\tlet listening = false;\n\n\tconst { player, dom } = services;\n\tconst { PlayerEvent } = services.avia;\n\tconst container = dom.main;\n\n\tconst onContentStart = () => {\n\t\tresource = player.resource as ResourceConfigurationInterface;\n\t\tif (panel) {\n\t\t\tpanel.remove();\n\t\t}\n\t\tif (listening) {\n\t\t\treturn;\n\t\t}\n\t\tlistening = true;\n\t};\n\n\n\tconst onResourceEnd = (event: any) => {\n\t\tif (event.detail?.playbackState === 'stopped') {\n\t\t\tpanel = document.createElement('div');\n\t\t\tpanel.classList.add('avia-display');\n\t\t\tpanel.style.zIndex = options.level || 10;\n\t\t\tpanel.innerHTML = '
    ';\n\n\t\t\tpanel.onclick = () => {\n\t\t\t\tif (resource?.playback) resource.playback.startTime = 0;\n\t\t\t\tplayer?.attachResource(resource);\n\t\t\t\tcontainer?.removeChild(panel);\n\t\t\t};\n\t\t\tcontainer?.appendChild(panel);\n\t\t};\n\t};\n\n\n\tconst handlePluginEvent = (evt) => {\n const {event} = evt.detail;\n\t\tif(event === \"change-video\") {\n\t\t\tkillPanel()\n\t\t}\n }\n\n\tconst killPanel = () => {\n\t\tif (panel) {\n\t\t\tpanel.remove();\n\t\t}\n\t}\n\n player.on(PlayerEvent.PLUGIN_EVENT, handlePluginEvent);\n\tplayer.on(PlayerEvent.RESOURCE_START, onContentStart);\n\tplayer.once(PlayerEvent.CONTENT_PROGRESS, onContentStart);\n\tplayer.on(PlayerEvent.PLAYBACK_STATE_CHANGE, onResourceEnd);\n\n\treturn {\n\t\tgetId() {\n\t\t\treturn DISPLAY;\n\t\t},\n\t\tdestroy() {\n\t\t\tif (panel) {\n\t\t\t\tpanel.onclick = null;\n\t\t\t\tcontainer.removeChild(panel);\n\t\t\t}\n\t\t\tplayer.off(PlayerEvent.PLUGIN_EVENT, handlePluginEvent);\n\t\t\tplayer.off(PlayerEvent.RESOURCE_START, onContentStart);\n\t\t\tplayer.off(PlayerEvent.CONTENT_PROGRESS, onContentStart);\n\t\t\tplayer.off(PlayerEvent.PLAYBACK_STATE_CHANGE, onResourceEnd);\n\t\t\tlistening = false;\n\t\t},\n\t};\n}","import {AllocatorVideo} from \"../../../pkgAviaAllocator/allocator.video\";\nimport {initTealium, initOztam} from \"../../../pkgAviaAllocator/tracking.init\";\nimport {OztamV2AviaVod} from \"./oztam.v2.aviaVod\";\nimport {TealiumAviaVod} from \"./tealium\";\nimport {iTrackingService} from \"../../../pkgAviaAllocator/tracking.conf.type\";\nimport {eLocalStorage_tenUser} from \"../../../tenMember/jwt/enum\";\nimport {trackingServiceConfig} from \"../../../pkgAviaAllocator/tracking.conf\";\n\nexport class AllocatorVod extends AllocatorVideo {\n constructor(serviceConfig: iTrackingService = trackingServiceConfig) {\n super(serviceConfig);\n this.resetTrackingService();\n }\n protected initOztam() {\n this.oztam = initOztam.bind(this)(OztamV2AviaVod);\n }\n\n protected initTealium() {\n this.tealium = initTealium.bind(this)(TealiumAviaVod);\n }\n\n protected initExtraInfo() {\n this.updateExtraInfo({\n oztam_userId: localStorage.getItem(eLocalStorage_tenUser.tu_oztamid) || \"\",\n })\n }\n}","import { PlayerEvent } from \"../../avia.lib\";\nimport { eAllocatorEvent } from \"../../../pkgAviaAllocator/allocator.video.type\";\n\nexport const allocatorVodEventMapping = typeof window === \"undefined\" ? {} : {\n // [PlayerEvent.READY]: eAllocatorEvent.LOAD,\n [PlayerEvent.RESOURCE_START]: eAllocatorEvent.LOADED_METADATA,\n\n [PlayerEvent.CONTENT_START]: eAllocatorEvent.FIRST_PLAY,\n [PlayerEvent.CONTENT_PAUSED]: eAllocatorEvent.PAUSE,\n [PlayerEvent.CONTENT_PLAYING]: eAllocatorEvent.UN_PAUSE,\n [PlayerEvent.CONTENT_PROGRESS]: eAllocatorEvent.PROGRESS,\n [PlayerEvent.CONTENT_COMPLETE]: eAllocatorEvent.COMPLETE,\n\n [PlayerEvent.SEEK_START]: eAllocatorEvent.SEEKING,\n [PlayerEvent.SEEK_COMPLETE]: eAllocatorEvent.SEEKED,\n\n [PlayerEvent.AD_START]: eAllocatorEvent.AD_BEGIN,\n [PlayerEvent.AD_COMPLETE]: eAllocatorEvent.AD_COMPLETE,\n [PlayerEvent.AD_BREAK_START]: eAllocatorEvent.AD_BREAK_START,\n [PlayerEvent.AD_BREAK_COMPLETE]: eAllocatorEvent.AD_BREAK_END,\n [PlayerEvent.AD_PAUSED]: eAllocatorEvent.AD_PAUSE,\n [PlayerEvent.AD_PLAYING]: eAllocatorEvent.AD_RESUME,\n ['beforeunloadpage']: eAllocatorEvent.BEFORE_UNLOAD_PAGE,\n [PlayerEvent.RESOURCE_END]: eAllocatorEvent.BEFORE_CHANGE_SOURCE,\n [PlayerEvent.PLAYBACK_SUSPENDED]: eAllocatorEvent.BEFORE_UNLOAD_PAGE,\n} ","import {OzTamV2} from \"../../../pkgAviaAllocator/oztam.v2\";\n\nexport class OztamV2AviaVod extends OzTamV2 {\n\n}","import {TealiumAvia} from \"../../player/track/tealium\";\nimport {eUtag} from \"../../../ten/env.utag\";\n\nexport class TealiumAviaVod extends TealiumAvia {\n private watchPercentageCounter = new WatchPercentageCounter([0.25, 0.5, 0.9]);\n\n public watchedPercentage(watchedPercentage: number) {\n if (typeof window !== \"undefined\"){\n const eventPercentage = this.watchPercentageCounter.shouldTrack(watchedPercentage);\n\n if(!this.mediaInfo) {\n return;\n }\n \n if (eventPercentage) {\n let tealiumData = (window as any).TealiumData || {};\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo[eUtag.showProgramClassification] = tealiumData.showProgramClassification || \"\";\n this.mediaTrackingInfo[eUtag.tealium_event] = `video_watched_${eventPercentage * 100}`;\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n })\n }\n }\n }\n}\n\nclass WatchPercentageCounter {\n private trackedPercentage = 0;\n\n constructor(private breakpoints: Array) {\n\n }\n\n public shouldTrack(watchedPercentage) {\n let shouldTrackBreakpoint = this.breakpoints.find(breakpoint => {\n return this.trackedPercentage < breakpoint && watchedPercentage > breakpoint;\n });\n\n if (shouldTrackBreakpoint) {\n this.trackedPercentage = watchedPercentage;\n return shouldTrackBreakpoint;\n }\n }\n}","export enum VPEnums {\n CONTENT_TYPE = \"application/json\",\n INPUT_DURATION = 120000,\n INTERVAL_DURATION = 300000,\n END_INTERVAL = 10000,\n THRESHHOLD_SECONDS = 30,\n}\n\nlet progressApiTmp = {\n FETCH_URL: `/api/video-progress`,\n REFRESH_URL: `/api/token/refresh`,\n};\nif (typeof window !== \"undefined\") {\n progressApiTmp = {\n FETCH_URL: `${window.apiUrl}/api/video-progress`,\n REFRESH_URL: `${window.apiUrl}/api/token/refresh`,\n }\n}\n\nexport const progressApi = progressApiTmp;","import {VPQuery} from './VideoProgressManagerQuery';\nimport {VPEnums} from './VideoProgressEnums';\nimport {jwtMember} from \"../../../tenMember/jwt/cacheStatus\";\nimport {tVideoProgressItem, tVideoProgressObj} from \"./VideoProgressManager.type\";\nimport Timeout = NodeJS.Timeout;\nimport {iPlayer} from \"../../player/playerCtrl.type\";\nimport {eJwtRefreshToken, jwtRefreshToken} from \"../../../tenMember/jwt/api/jwtToken\";\n\nexport class VideoProgressManager {\n /**\n *\n * every page load this class will fetch user progress list, and let other components know\n *\n */\n static needSync: boolean = typeof window !== \"undefined\" && !!jwtMember.isLoggedIn();\n static requestedTimestamp: number = 0;\n static progressObj: tVideoProgressObj;\n\n static async getVideoProgress(urlCode: string): Promise {\n await VideoProgressManager.getAllProgress();\n\n let {progressObj} = VideoProgressManager;\n if (Array.isArray(progressObj) === false || progressObj.length === 0) {\n return 0;\n }\n\n const progressItem = progressObj.find(obj => {\n return obj.videoCode === urlCode;\n });\n \n return progressItem ? progressItem.progress : 0;\n }\n\n static async getAllProgress(): Promise {\n const tokenRefreshResult = await jwtRefreshToken();\n if (tokenRefreshResult !== eJwtRefreshToken.active) {\n VideoProgressManager.progressObj = [];\n } else {\n if (VideoProgressManager.progressObj === undefined || VideoProgressManager.progressObj.length === 0) {\n const nowTimestamp = Date.now();\n if (nowTimestamp - VideoProgressManager.requestedTimestamp > 5 * 60 * 1000) {\n VideoProgressManager.requestedTimestamp = nowTimestamp;\n VideoProgressManager.progressObj = await VPQuery.fetchVideoProgress() || [];\n } else {\n return new Promise((resolve, reject) => {\n const getProgressInterval = setInterval(()=>{\n if (VideoProgressManager.progressObj) {\n clearInterval(getProgressInterval);\n resolve(VideoProgressManager.progressObj);\n } else if (VideoProgressManager.progressObj === null) {\n clearInterval(getProgressInterval);\n reject()\n }\n }, 100)\n })\n }\n }\n }\n return VideoProgressManager.progressObj || [];\n }\n\n /*\n *\n * Class props\n *\n * */\n private _urlCode: string;\n //private _showUrlCode: string;\n private _currentProgressItem: tVideoProgressItem;\n private _prevSyncTimestamp: number;\n private _endProgressFired: boolean = false;\n\n constructor(private _player: iPlayer) {\n if (VideoProgressManager.needSync === false) {\n return;\n }\n this._interactionWatcher();\n this._syncIntervalWatcher();\n this._closeToEndWatcher();\n }\n\n /*\n *\n * Constructing logic - per player instance\n *\n * */\n private _interactionWatcher() {\n this._prevSyncTimestamp = Date.now();\n const timeChecking = this._checkTimer.bind(this);\n window.addEventListener('mousemove', timeChecking, false);\n window.addEventListener('keypress', timeChecking, false);\n }\n\n private _checkTimer() {\n const dateNow = Date.now();\n if (dateNow - this._prevSyncTimestamp > VPEnums.INPUT_DURATION) {\n this._prevSyncTimestamp = dateNow;\n this._syncProgress();\n }\n }\n\n /*\n *\n * progress sync logic - per Video\n *\n * */\n\n public async initVideoWatcher(urlCode: string) {\n this._resetWatcher();\n\n if (typeof urlCode !== \"string\") {\n return;\n }\n\n this._urlCode = urlCode;\n //this._showUrlCode = showUrlCode;\n await this._registerCurrentProgress();\n this._syncIntervalWatcher();\n this._closeToEndWatcher();\n }\n\n private _resetWatcher() {\n clearInterval(this._syncingWatchInterval);\n clearInterval(this._closeToEndInterval);\n this._urlCode = undefined;\n //this._showUrlCode = undefined;\n this._currentProgressItem = undefined;\n this._prevSyncTimestamp = Date.now();\n this._endProgressFired = false;\n }\n\n private async _registerCurrentProgress() {\n await VideoProgressManager.getAllProgress();\n const {progressObj} = VideoProgressManager;\n if (\n Array.isArray(VideoProgressManager.progressObj) &&\n VideoProgressManager.progressObj.length > 0\n ) {\n this._currentProgressItem = progressObj.find(progress => progress.videoCode === this._urlCode);\n //this._currentProgressItem.ParentCode = this._showUrlCode;\n }\n if (!this._currentProgressItem) {\n this._currentProgressItem = {\n videoCode: this._urlCode,\n progress: 0,\n //ParentCode: this._showUrlCode,\n }\n progressObj.push(this._currentProgressItem);\n }\n }\n\n private _syncingWatchInterval: Timeout;\n private _syncIntervalWatcher() {\n this._syncingWatchInterval = setInterval(() => {\n this._syncProgress();\n }, VPEnums.INTERVAL_DURATION);\n }\n\n // Send progress if the video is 95% complete or less than 1 minute from the end\n private _closeToEndInterval: Timeout;\n private _closeToEndWatcher() {\n this._closeToEndInterval = setInterval(() => {\n const progressSecs = Math.round(this._player?.currentTime());\n const durationSecs = Math.round(this._player?.video?.duration);\n const durationThreshold = durationSecs - VPEnums.THRESHHOLD_SECONDS;\n \n if (progressSecs > durationThreshold) {\n if (this._endProgressFired === false) {\n this._syncProgress();\n this._endProgressFired = true;\n }\n } else {\n this._endProgressFired = false;\n }\n }, VPEnums.END_INTERVAL);\n }\n\n /**\n * Progress sync logic\n */\n private async _syncProgress() {\n const tokenRefreshResult = await jwtRefreshToken();\n if (tokenRefreshResult === eJwtRefreshToken.active) {\n // different player lib have different method to get current position/progress\n const msProgress = this._player.currentTime() * 1000;\n if (msProgress > 0) {\n this._prevSyncTimestamp = Date.now();\n this._currentProgressItem.progress = Math.floor(msProgress);\n VPQuery.syncServerProgress(this._currentProgressItem);\n }\n }\n }\n}","import {progressApi, VPEnums} from './VideoProgressEnums';\nimport { eLocalStorage_tenUser_token as token } from '../../../tenMember/jwt/enum';\nimport { jwtMember } from \"../../../tenMember/jwt/cacheStatus\";\nimport {tVideoProgressObj} from \"./VideoProgressManager.type\";\nexport namespace VPQuery {\n export async function fetchVideoProgress(): Promise {\n let progressObj: tVideoProgressObj;\n if(jwtMember.isLoggedOut() == true) {\n return;\n }\n try {\n let header = getHeaders();\n const resp = await fetch(progressApi.FETCH_URL, {\n headers: header,\n });\n progressObj = await resp.json();\n\n return progressObj;\n } catch (err) {\n console.error(err);\n return null;\n }\n }\n\n export function syncServerProgress(videoObject) {\n if(jwtMember.isLoggedOut() == true) {\n return;\n }\n try {\n let header = getHeaders();\n fetch(progressApi.FETCH_URL, {\n method: \"POST\",\n body: JSON.stringify(videoObject),\n headers: header,\n });\n } catch (err) {\n console.error(err);\n }\n }\n\n function getHeaders() {\n let authToken = localStorage.getItem(token.tu_accesstoken);\n let tenAuth = localStorage.getItem(token.tu_refreshtoken);\n return {\n \"Authorization\": `Bearer ${authToken}`,\n \"Content-Type\": `${VPEnums.CONTENT_TYPE}`,\n \"X-Network-Ten-Auth\": tenAuth,\n };\n }\n}\n","import { TextCuepointEventDetailInterface, TextCuepointInterface, VideoPlayerInterface, PlayerEvent } from \"@cbsinteractive/avia-js\";\nimport { deviceType } from \"../../player/util/device\";\n\nexport function videoTextTrackManager(player) {\n this.player = player\n let textTrackContainer = document.querySelector('.textTrackContainer');\n let textTrackStartTime = 0\n let textTrackEndTime = 0\n let ccText = ''\n let textTrackElement = null;\n let textTrackElementCount = 0;\n let textTrackEnabled = false;\n let ticker = null; \n player.on(PlayerEvent.TEXT_TRACK_AVAILABLE, (event: CustomEvent) => {\n localStorage.getItem('textTrackEnabled') === 'true' ? textTrackEnabled = true : textTrackEnabled = false;\n if(!textTrackEnabled) return;\n player.textTrackEnabled = true;\n });\n\n player.on(PlayerEvent.TEXT_TRACK_ENABLED_CHANGE , (event: CustomEvent) => {\n localStorage.setItem('textTrackEnabled', event.detail.textTrackEnabled.toString());\n textTrackEnabled = event.detail.textTrackEnabled;\n if(!textTrackEnabled) {\n removeTextTrackElement();\n }\n });\n\n player.on(PlayerEvent.FULLSCREEN_CHANGE, (event: CustomEvent) => {\n if( deviceType === 'mobile') return;\n if(event.detail.fullscreen) {\n showTextTrackElement();\n }\n });\n\n player.on(PlayerEvent.ACTIVE_STATE_CHANGE, (event: CustomEvent) => {\n if(event.detail.activeState === 'active') {\n textTrackContainer.style.height = '86%';\n }else {\n textTrackContainer.style.height = '100%';\n } \n });\n\n\n this.updateTextTrack = (textCuePoint : TextCuepointEventDetailInterface) => {\n if( deviceType === 'mobile') return;\n if(!textTrackEnabled) return;\n const activeCue = textCuePoint.activeCues;\n if (activeCue.length === 0) {\n removeTextTrackElement();\n return;\n }\n Array.from(activeCue).forEach((cue: TextCuepointInterface) => {\n const { startTime, endTime, text } = cue;\n textTrackStartTime = startTime;\n textTrackEndTime = endTime;\n ccText = text;\n createTextTrackElement(textTrackStartTime, textTrackEndTime);\n });\n }\n\n const tickerCountDown = function(startTime: number, endTime:number, elementId:string) {\n let timeDifference = endTime * 1000 - startTime * 1000;\n const element = document.getElementById(elementId);\n if(!element) return;\n let ticker = setTimeout(() => {\n element.parentElement.remove();\n clearTimeout(ticker);\n }, timeDifference);\n\n player.on(PlayerEvent.CONTENT_PAUSED, () => {\n clearTimeout(ticker);\n });\n\n player.on(PlayerEvent.SEEK_START, () => {\n removeTextTrackElement();\n });\n \n }\n\n\n const createTextTrackElement = function( startTime:number, endTime:number) {\n if(!textTrackContainer) return;\n if(textTrackContainer.hasChildNodes) {\n removeTextTrackElement();\n }\n\n const cssBoxContainer = document.createElement('div');\n cssBoxContainer.classList.add('cc-box-container');\n textTrackContainer.appendChild(cssBoxContainer);\n\n cssBoxContainer.style.width = '80%';\n cssBoxContainer.style.height = 'auto';\n cssBoxContainer.style.left = '10%';\n\n const cssBoxInner = document.createElement('div');\n cssBoxInner.setAttribute('id', `cc-${textTrackElementCount}-box-inner`);\n cssBoxInner.classList.add('cc-box-inner');\n cssBoxContainer.appendChild(cssBoxInner);\n\n const textTrack = document.createElement('div');\n textTrack.classList.add('cc-container');\n textTrack.setAttribute('starttime', startTime.toString());\n textTrack.setAttribute('endtime', endTime.toString());\n textTrack.innerHTML = ccText;\n textTrack.style.backgroundColor = 'rgba(0,0,0,0.7)';\n textTrack.style.fontWeight = 'normal';\n textTrack.style.display = 'flex';\n textTrack.style.color = 'rgb(255,255,255)';\n textTrack.style.fontSize = '1.5rem';\n \n textTrackElement = textTrack;\n cssBoxInner.appendChild(textTrack);\n tickerCountDown(startTime, endTime, `cc-${textTrackElementCount}-box-inner`);\n updateTextTrackFontSize();\n if(window === undefined) return;\n window.addEventListener('resize', updateTextTrackFontSize);\n }\n\n const showTextTrackElement = function() {\n const ccBoxContainer = document.querySelector('.cc-box-container');\n if (ccBoxContainer) {\n ccBoxContainer.style.display = 'flex';\n }\n }\n\n const hideTextTrackElement = function() {\n const ccBoxContainer = document.querySelector('.cc-box-container');\n if (ccBoxContainer) {\n ccBoxContainer.style.display = 'none';\n }\n }\n\n const removeTextTrackElement = function() {\n const ccBoxContainer = document.querySelector('.cc-box-container');\n if (ccBoxContainer) {\n ccBoxContainer.remove();\n clearTimeout(ticker);\n }\n }\n\n const updateTextTrackFontSize = function() {\n if(deviceType === 'mobile') return;\n const videoPlayerWidth = player.video.offsetWidth;\n const desiredFontSize = videoPlayerWidth * 0.03; // Adjust the factor as needed\n textTrackElement.style.fontSize = `${desiredFontSize}px`;\n }\n}\n\n\n\n\n","/**\n * This class requires the following objects to be available in the window object\n * - window.tenService.ads = new AdManager(env.adsServiceConfig); (PageBase.js)\n * - window.vtg - (comes from tealuim)\n * - window.adsStatus - (ads.js)\n */\n\nimport React from 'react';\nimport queryString from 'query-string';\nimport {iPlayer, playerEventMappable, playerEventStateMap, PlayerStates} from '../player/playerCtrl.type';\nimport {OverlayFactory} from '../player/overlayFactory';\nimport {iPlaybackInfoApiType, iUapApiVideoData, iWebApiVideoData} from \"../api/api.video.type\";\nimport {ApiVideo} from \"../api/api.video\";\nimport {iVodCtrlProps, iVodCtrlState} from \"./vodCtrl.type\";\nimport {tOverlayFactory, tOverlays} from \"../player/overlayTemplate.type\";\nimport {vodCreatePlayer} from \"./vodCtrl.util\";\nimport {tenTrack} from \"../../tenTrack/track.init\";\nimport {VideoProgressManager} from \"./util/VideoProgressManager\";\nimport {eLocalStorage_tenUser} from \"../../tenMember/jwt/enum\";\nimport { Autoplay, createResourceConfig, ErrorCode,PlaybackState, ErrorMessage, ErrorCategory, PlayerEvent, removeVideoPlayer, ResourceConfigurationInterface, ResourceAdInterface, VideoFormat, ResourceLocationDrmInterface, ResourceLocationInterface } from '@cbsinteractive/avia-js';\nimport { eAllocatorEvent } from \"../../pkgAviaAllocator/allocator.video.type\";\nimport {allocatorVodEventMapping} from \"./track/allocatorVod.type\";\nimport {AllocatorVod} from \"./track/allocatorVod\";\nimport {PlayerCtrl} from \"..\";\nimport {TealiumAviaVod} from \"./track/tealium\";\nimport {iVideoAdConfig, iVideoAdRequestParams} from \"../player/util/imaUtil.type\";\nimport {jwtMember} from \"../player/jwt/cacheStatus\";\nimport {eLocalStorage_tenUser_info} from \"../player/jwt/enum\";\nimport {formatIMAServerUrl} from \"../player/util/imaUtil\";\nimport {isCompanionAds} from \"../player/util/isShow\";\nimport {detectBrowser, isDesktop} from \"../player/util/env.util\";\nimport {TrackJS} from \"trackjs\";\nimport { iTrackingOztamConfig } from \"../../pkgAviaAllocator/tracking.conf.type\";\nimport { UUID_v4, getUserIp } from \"../../pkgAviaAllocator/util\";\nimport { trackingServiceConfig } from \"../../pkgAviaAllocator/tracking.conf\";\nimport { env } from \"../../pkgAviaAllocator/tracking.env\";\nimport { videoTextTrackManager } from './util/VideoTextTrackManager';\nimport { VODPayload } from './vodCtrl.type';\nimport { iOzTamTrackingMeta_Media, iOzTamTrackingMeta_Config, DeviceType } from '../../pkgAviaAllocator/oztam.v2.lib';\nimport { deviceType, detectDeviceType } from '../../@util/device';\nimport { iMediaInfo } from '../../pkgAviaAllocator/allocator.video.type';\nimport {AuthenticatedEndpointHandler} from '../api/api.bvod';\nimport { IMSAPIIntegration, IMSResponse } from '../../tenAds/freeWheelManager';\nimport { checkUserFlag, markAdOps } from '../../@util/userFlag';\nimport { generateGoogleAdTagParams } from '../player/player.utls';\nimport { iBVodData } from '../player/player.util.type';\n\nexport class VodCtrl extends PlayerCtrl {\n readonly _adLoadTimeout = 12000;\n\n private _noAds: boolean;\n private _progressMag: VideoProgressManager;\n private _videoInfo: iUapApiVideoData;\n private _video: iWebApiVideoData;\n private _isFirstPlay: boolean = false;\n private adEventData = {};\n private playBackInfo: iPlaybackInfoApiType;\n private _oztamServiceConfig: iTrackingOztamConfig = undefined;\n private lastPausedTimestamp: number;\n private isDaiEnabled: boolean = true;\n private textTrackManager;\n private mediaInfo: iMediaInfo;\n private userIp: string;\n private isFlagged: boolean;\n private globalSettings: { [key: string]: any };\n private globalFWEnable: boolean;\n \n\n private playerMuted: boolean;\n bvodApiKey: string;\n bvodPublisherName: string;\n authHandler: AuthenticatedEndpointHandler;\n freeWheelEnabled: boolean;\n qs: queryString.ParsedQuery;\n upNextPlaying: boolean;\n private imsAPI: IMSAPIIntegration;\n private rolloutPercentage: number;\n\n constructor(props: iVodCtrlProps) {\n super(props);\n this.markAdOperations();\n this.playerContainerId = props.playerId;\n this._oztamServiceConfig = this.setOztamConfig();\n this.bvodApiKey = '///adjust.bouncing.flame';\n this.bvodPublisherName = 'TEN';\n this.playerMuted = false;\n this.qs = queryString.parse(window.location.search);\n this.authHandler = new AuthenticatedEndpointHandler(this.bvodApiKey, this.bvodPublisherName);\n this.playBackInfo = {} as iPlaybackInfoApiType;\n this.upNextPlaying = false;\n this.imsAPI = new IMSAPIIntegration('https://fms.viacomcbs.digital');\n this.globalSettings = props.globalSettings || {};\n this.globalFWEnable = props.globalSettings?.experiments?.[\"Freewheel Enabled\"]?.enabled ?? false;\n this.rolloutPercentage = props.globalSettings?.experiments?.[\"Freewheel Enabled\"]?.rolloutPercentage ?? 0;\n this.isFlagged = this.initializeUserFlag(this.rolloutPercentage);\n this.freeWheelEnabled = this.globalFWEnable && this.isFlagged;\n\n\n this.state = {\n playerState: PlayerStates.PreInitialize,\n overlay: undefined,\n remainingString: '',\n textCuepoint: '',\n drmEnabled: false,\n };\n }\n\n async componentDidMount() {\n if (typeof window === 'undefined') return;\n try {\n const userIp = await getUserIp() as string;\n this.userIp = userIp;\n } catch (error) {\n this.userIp = '';\n console.warn('Failed to get user IP:', error);\n }\n await this._createPlayer();\n await this._updatePlayerState(PlayerStates.PreInitialize);\n await this.initPlayer(this.props.video);\n this.addBeforeUnloadListener();\n window.addEventListener('userLogin', this.handleUserLogin);\n }\n\n componentWillUnmount() {\n removeVideoPlayer(this.props.playerId);\n window.removeEventListener('userLogin', this.handleUserLogin);\n }\n\n private handleUserLogin = async (event) => {\n this.imsAPI.invalidateCache();\n this.imsAPI.logFreewheelDebug('Received userLogin event:', event);\n }\n\n async componentDidUpdate(prevProps) {\n if(prevProps.video !== this.props.video) {\n await this._updatePlayerState(PlayerStates.PreInitialize);\n await this.initPlayer(this.props.video);\n }\n }\n\n initializeUserFlag(percent: number): boolean {\n if (percent < 1) {\n return false; \n }\n try {\n return checkUserFlag(percent);\n } catch (error) {\n console.error('Failed to check user flag:', error);\n return false;\n }\n }\n\n markAdOperations() {\n try {\n markAdOps();\n } catch (error) {\n console.error('Failed to mark ad operations:', error);\n }\n }\n\n render() {\n return (\n
    \n {this.state.overlay &&
    {this.state.overlay}
    }\n
    \n
    \n );\n }\n\n /*\n * overlays\n * */\n private _overlayFactories(): tOverlays {\n return {...OverlayFactory};\n }\n\n private _changeResource = (data) => {\n const { video } = data;\n this.props.videoChangeHandler && this.props.videoChangeHandler(video);\n }\n\n /*\n * Check video access permission then init player\n * */\n public initPlayer = async (newVideo: iWebApiVideoData) => {\n if (typeof window === 'undefined') return;\n this._video = newVideo;\n \n this._noAds = typeof this.qs.noads === 'string' && this.qs.noads.toLowerCase() === 'true';\n if (this._allocator) {\n this._allocator.resetTrackingService();\n }\n \n\n if (this._isFirstPlay) {\n this._isFirstPlay= false\n }\n\n const noAds = this.props.disableAds || this._noAds;\n if (await this._playerShouldBeBlocked() === undefined) {\n if (noAds) {\n await this._updateVideoNoAds();\n } else {\n await this._updateVideo();\n }\n }\n\n this._video && this._progressMag.initVideoWatcher(this._video.urlCode);\n }\n\n /*\n * For blocking video access cases\n * */\n protected async _deniedAdBlocker() {\n await this._updatePlayerState(PlayerStates.AdBlockerOn);\n }\n\n protected async _deniedGeoBlocker() {\n await this._updatePlayerState(PlayerStates.GeoBlocked);\n }\n\n protected async _deniedWindows7(){\n const {_video} = this;\n const {videoId, urlCode} = _video;\n TrackJS.console.error(`VideoId:${videoId} - UrlCode:${urlCode} User using unsupported OS`);\n await this._updatePlayerState(PlayerStates.DetectWindows7)\n }\n\n /*\n * Player creation\n * */\n private async _createPlayer() {\n if(typeof window === 'undefined') return;\n const {playerId, autoplay, video, globalSettings} = this.props;\n await vodCreatePlayer({\n containerId: this.playerContainerId,\n playerId,\n video,\n globalSettings,\n autoplay: Autoplay.ATTEMPT_UNMUTED_THEN_MUTED,\n onPlayerReady: this._onPlayerReady,\n }).then((player) => {\n this.player = player;\n this._onPlayerReady(player);\n }).catch ((error) => {\n this._logger.error('Failed to create player', error)\n });\n this._allocator = new AllocatorVod();\n }\n\n /*\n * Player switch video\n * */\n private async _updateVideo() {\n this.setOztamConfig();\n this._oztamServiceConfig.sessionId = UUID_v4();\n let videoResource = await this._getVideoResource(),\n adResource = await this._getAdResource();\n this.player.attachResource({...videoResource, ...adResource});\n }\n\n private async _updateVideoNoAds() {\n const resource = await this._getVideoResource(); // refreshes the player\n this.player.attachResource(resource);\n }\n\n private async _getVideoResource() {\n const {_video} = this;\n const {videoId, urlCode, showId} = _video;\n \n let playbackInfo: iPlaybackInfoApiType | undefined,\n videoInfo: iUapApiVideoData | undefined;\n \n try {\n const [playbackInfoResponse, videoInfoResponse] = await Promise.all([\n ApiVideo.getPlaybackInfo(urlCode, this.freeWheelEnabled, true),\n ApiVideo.getVideoUapInfo(urlCode),\n ]).then(response => {\n return response;\n })\n \n playbackInfo = playbackInfoResponse;\n videoInfo = videoInfoResponse;\n \n this.setState({ \n drmEnabled: playbackInfo?.drm?.enabled || false\n });\n \n } catch (err) {\n this._logger.error('error fetching video info' + JSON.stringify(err));\n }\n \n if (!playbackInfo || !videoInfo) {\n await this._updatePlayerState(PlayerStates.ErrorFetchingVideo);\n return;\n }\n \n this._videoInfo = videoInfo;\n this.playBackInfo = playbackInfo;\n \n const {source = ''} = playbackInfo;\n const myResource = createResourceConfig();\n const progressDuration = (await VideoProgressManager.getVideoProgress(urlCode) / 1000) || 0;\n const videoPercentage = Math.round((100 / (videoInfo.duration || 1)) * progressDuration);\n const cleanTextTrackUrl = videoInfo.captionUrl ? `${window?.apiUrl}${videoInfo.captionUrl.replace(/^.*\\/\\/[^\\/]+/, '')}` : '';\n const { programClassification, showRatingClassification, displayOverlay, consumerAdvice, airDate, genre, memberGated, title, urlCode: propUrlCode } = this.props.video;\n const classification = programClassification ? programClassification.toUpperCase() : showRatingClassification?.toUpperCase() || '';\n \n const resourceDuration = videoInfo.duration || 0;\n \n if (progressDuration > 30 && progressDuration < resourceDuration - 30) {\n myResource.playback.startTime = progressDuration;\n }\n \n if(videoPercentage >= 95 || progressDuration >= resourceDuration - 30){\n myResource.playback.startTime = 0;\n };\n \n myResource.location.mediaUrl = source;\n myResource.location.textTrackUrl = cleanTextTrackUrl;\n \n myResource.metadata = {\n videoIdForTracking: videoId,\n videoIdForAdCalls: videoId,\n };\n \n if (this._videoInfo) {\n myResource.metadata = {\n ...myResource.metadata,\n videoId,\n altMediaId: this._videoInfo.id || '',\n seriesId: this._videoInfo.seriesCrid || '',\n episodeId: this._videoInfo.episodeCrid || '',\n seriesName: this._videoInfo.tvShow || '',\n episodeName: `${this._videoInfo.clipTitle || ''}${this._videoInfo.episode || ''}`,\n channel: this._videoInfo.tvChannel || '',\n classification,\n duration: this._videoInfo.duration || 0,\n deviceId: tenTrack.deviceId || '',\n demo1: localStorage.getItem(eLocalStorage_tenUser.tu_oztamid) || undefined,\n consumerAdvice: consumerAdvice || this._videoInfo.consumerAdvice || '',\n displayOverlay: displayOverlay || false,\n airDate: airDate || '',\n genre: genre || '',\n memberGated: memberGated || false,\n title: title || '',\n urlCode: propUrlCode || '',\n };\n }\n \n return myResource as ResourceConfigurationInterface;\n }\n\n public async getVODFields() {\n const userId = localStorage.getItem(eLocalStorage_tenUser.tu_oztamid);\n const timestamp = new Date();\n const metadata = PlayerCtrl.convertToVideoTrackObj(this._videoInfo, this.mediaInfo, this._oztamServiceConfig.sessionId);\n const userAgent = typeof window !== 'undefined' ? window.navigator.userAgent : '';\n const vodPayload = {\n AdEventId: null,\n DeviceId: tenTrack.deviceId || '',\n DeviceType: detectDeviceType() || '',\n Genre: metadata.video.ShowGenre || null,\n IpAddress: this.userIp || '',\n MediaId: metadata.custom_fields.alt_media_id || '',\n MediaType: 'vod',\n PublisherId: metadata.publisher_id || '',\n PublisherName: 'TEN',\n RegistrationId: userId || '',\n SessionId: this._oztamServiceConfig.sessionId || '',\n TimeStamp: timestamp.toISOString() || '', \n UserAgent: userAgent || null, \n VendorVersion: this._oztamServiceConfig.vendorVersion || '',\n };\n return vodPayload;\n }\n\n \n\n private async _getAdResource() {\n const utag_data = (window as any).utag_data;\n const retrievedLocalStorageState = localStorage.getItem(\"tu_geo\") || '';\n const isIos = /iPad|iPhone|iPod/.test(navigator.userAgent);\n \n const handleVODData = async () => { \n if (utag_data.memberLoginStatus === 'logged-out') return [];\n try {\n const data = await this.getVODFields();\n const response = await this.authHandler.postAuthenticatedData('/auth', data);\n const { data: responseData } = response;\n const BvodArray = this.authHandler.mapBvodDataToOztamParams(responseData);\n return BvodArray;\n } catch (error) {\n console.error(\"Error handling VOD data: \", error);\n return [];\n }\n };\n \n const generateCustomParams = (customParams) => {\n if (Array.isArray(customParams) && customParams.length > 0) {\n let appendingCustomParams = customParams.map(kv => {\n if (typeof kv[0] !== \"string\" || [undefined, null].indexOf(kv[1]) >= 0) {\n return \"\";\n }\n return `${kv[0]}=${kv[1]}`;\n }).filter(kv => {\n return kv !== \"\";\n });\n return appendingCustomParams.join('&');\n }\n }\n \n const generateRequestParams = (requestParams) => {\n let reqParams = {} as iVideoAdRequestParams;\n if (Array.isArray(requestParams)) {\n requestParams.forEach(kv => {\n if (Array.isArray(kv) && kv.length === 2 && kv[0] !== \"\" && kv[1] !== \"\") {\n reqParams[kv[0]] = kv[1];\n }\n });\n }\n return reqParams;\n }\n\n const signature = this.playBackInfo.streamSignature\n const daiAuthToken = this.playBackInfo.daiAuthToken;\n \n const bvodData = await handleVODData();\n\n const transformedData: iBVodData[] = bvodData.map(([Demo, BvodId]) => ({\n Demo,\n BvodId,\n }));\n\n /* Freewheel */\n\n const commonParams = {\n gr: jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_gr],\n ge: jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_ge],\n state: localStorage.getItem(\"tu_geo\") || '',\n collection: Array.isArray((window as any).utag_data.videoContentCategories) ? (window as any).utag_data.videoContentCategories : [],\n genre: Array.isArray((window as any).utag_data.showGenres) ? (window as any).utag_data.showGenres : [],\n pcode: jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_memberPostcode],\n session: this._oztamServiceConfig.sessionId,\n sub: jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_n10adId],\n tvid: localStorage.getItem(\"tvid_callback\"),\n oztamozsid: this._oztamServiceConfig.sessionId,\n };\n\n let fwParamsToSpread = {};\n if (this.freeWheelEnabled) {\n const fwParameters = await this.fetchIMSDataAndLog();\n const csidPrefix = 'intllocal_tenplay_au';\n const platform = isDesktop ? 'desktop_web' : 'mobile_web';\n\n if (!csidPrefix || !platform) {\n TrackJS.track({\n message: '🔍️ ~ csidPrefix or platform is not defined',\n csidPrefix,\n platform\n });\n }\n\n const imafw_csid = `${csidPrefix}_${platform}_vod`;\n\n if (!imafw_csid) {\n TrackJS.track({\n message: '🔍️ ~ Missing imafw_csid',\n csidPrefix,\n platform\n });\n }\n\n const adParams = {\n ...commonParams,\n };\n\n const additionalParams = {\n video: this._videoInfo,\n plabackInfo: this.playBackInfo,\n miscData: {\n imafw_csid: imafw_csid,\n imafw__fw_continuous_play: this.upNextPlaying ? 1 : 0,\n imafw_mode : 'vod',\n },\n };\n \n const freeWheelParams = generateGoogleAdTagParams( transformedData, { enableFreeWheel: this.freeWheelEnabled }, this._video.videoId || \"\", this.playBackInfo?.dai?.contentSourceId || \"\", fwParameters?.fms_params, adParams, additionalParams); \n fwParamsToSpread = Object.keys(freeWheelParams).reduce((object, key) => {\n if (freeWheelParams[key] != null) {\n object[key] = freeWheelParams[key];\n }\n return object;\n }, {});\n }\n /* End */\n\n \n // CASI ad config\n const videoAdConfig: iVideoAdConfig = {\n \n companionAds: {\n enabled: isCompanionAds(),\n adSizes: [[300, 250], [728, 90], [4, 1]],\n },\n \n account: \"8264\", \n id: \"vau-ten\",\n device: isDesktop ? \"desktop\" : \"mobile_web\",\n site: \"tenplay\",\n cmsID: this.playBackInfo?.dai?.contentSourceId || \"\",\n customParams: [\n ...Object.entries(commonParams),\n ...await handleVODData()\n ],\n // ...(!this.freeWheelEnabled && {\n // customParams: [\n // ...Object.entries(commonParams),\n // ...await handleVODData()\n // ]\n // }),\n requestParams: [\n [\"ppid\", jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_n10adId]],\n ]\n };\n\n // SSAI ad config\n const {account, id, device, site, cmsID, requestParams, customParams} = videoAdConfig;\n const custPram = generateCustomParams(customParams);\n const reqParams = generateRequestParams(requestParams);\n const isSafari = this.isBrowserEnvironment() && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n\n const drmConfig = {} as ResourceLocationDrmInterface;\n\n if (this.playBackInfo.drm?.enabled) {\n const { laType } = this.playBackInfo.drm;\n\n if (laType.playready?.laUrl) {\n drmConfig.playready = {\n url: `${laType.playready.laUrl}&ls_session=${signature}`,\n header: null,\n priority: null,\n audioRobustness: null,\n videoRobustness: null\n };\n }\n\n if (laType.widevine?.laUrl) {\n drmConfig.widevine = {\n url: `${laType.widevine.laUrl}&ls_session=${signature}`,\n header: null,\n priority: null,\n audioRobustness: null,\n videoRobustness: null\n };\n }\n\n if (laType.fairplay) {\n drmConfig.fairplay = {\n appCertUrl: laType.fairplay.cert,\n licenseUrl: `${laType.fairplay.ckc}&ls_session=${signature}`,\n header: null,\n };\n }\n }\n\n const resource: {\n ad: ResourceAdInterface;\n location?: ResourceLocationInterface;\n } = {\n ad: {\n viewabilityTracking: {\n pageType: null,\n partner: 'ten',\n viewGuid: null,\n },\n showPrerollOnNonZeroStart: true,\n ...(this.isDaiEnabled === false ? {\n csai: {\n adCallUrl: formatIMAServerUrl(this._video.videoId, videoAdConfig, bvodData),\n enableAdPreloading: true,\n loadVideoTimeoutMs: this._adLoadTimeout,\n preloadContentAtEndOfPreRoll: !isIos,\n enableStalledAdCheck: true,\n vastLoadTimeout: 12000,\n stalledAdThreshold: 10000\n }\n } : {\n ssai: {\n contentSourceId:this.playBackInfo.dai.contentSourceId,\n videoId: this.playBackInfo.dai.videoId,\n ...(this.freeWheelEnabled && {\n authToken: daiAuthToken,\n }), \n //adParameters: videoAdConfig, // only used for CASI\n adParameters: {\n iu: `/${videoAdConfig.account}/${videoAdConfig.id}/${videoAdConfig.device}/${videoAdConfig.site}`,\n cmsid: this.playBackInfo?.dai?.contentSourceId || \"\",\n ...(!this.freeWheelEnabled && {\n cust_params: custPram,\n }), \n ppid: reqParams.ppid ? reqParams.ppid : null,\n ...(fwParamsToSpread && Object.keys(fwParamsToSpread).length > 0 ? fwParamsToSpread : {}),\n\n vpmute: this.playerMuted ? 1 : 0,\n },\n format: this.state.drmEnabled && !isSafari ? VideoFormat.DASH : VideoFormat.HLS,\n filterOutPremiumAudioCodecs: true,\n isLive: false,\n },\n }),\n },\n };\n \n if (this.state.drmEnabled ) {\n resource.location = {\n drm: drmConfig,\n };\n }\n return resource;\n\n }\n \n\n protected setOztamConfig() {\n let config;\n if(env.hasOwnProperty('isProduction')){\n if(env.isProduction()){\n config = trackingServiceConfig.oztam.config.production;\n } else {\n config = trackingServiceConfig.oztam.config.staging;\n }\n config.sessionId = UUID_v4(); \n }\n\n return config;\n }\n\n private _playerEventToState(eventType: playerEventMappable): PlayerStates {\n return playerEventStateMap[eventType] || this.state.playerState;\n }\n\n private async _updateOverlayState() {\n const {playerState} = this.state;\n const {_video} = this;\n const stateOverlayFactory: tOverlayFactory = this._overlayFactories()[playerState];\n let ui;\n\n if (typeof stateOverlayFactory === \"function\") {\n ui = await stateOverlayFactory(this.player, _video)\n }\n this.setState({overlay: ui});\n }\n\n private async _updatePlayerState(newPlayerState: PlayerStates) {\n this.setState({\n playerState: newPlayerState\n }, async () => {\n if (typeof this.props.onPlayerStateChange === \"function\") {\n await this.props.onPlayerStateChange(newPlayerState);\n }\n\n await this._updateOverlayState();\n });\n }\n\n private _playStateTimer;\n \n private async _onPlayerEvent(event: any) {\n const data = event.detail;\n const UP_NEXT_COUNT = 30;\n let newPlayerState = this._playerEventToState(event.type);\n switch (event.type) {\n case PlayerEvent.ERROR:\n const {fatal, message, code, category} = event.detail.error;\n if (category === ErrorCategory.RESOURCE) {\n console.error(\"RESOURCE_ERROR\", event);\n if (message === ErrorMessage.IMA_SDK_MISSING) {\n await this._updatePlayerState(PlayerStates.AdBlockerOn);\n } else {\n await this._updatePlayerState(PlayerStates.ErrorFetchingVideo);\n }\n return;\n }\n if (fatal) {\n console.error(\"FATAL_ERROR\", event);\n if (category === ErrorCategory.AD && ErrorCode.DAI_DATA_ERROR === code){\n //await this.restartVideoWithoutAds();\n await this._updatePlayerState(PlayerStates.ErrorFetchingAd);\n } else {\n this._updatePlayerState(PlayerStates.ErrorFetchingVideo);\n }\n return;\n }\n \n case PlayerEvent.AD_STALLED:\n break;\n case PlayerEvent.MUTE_CHANGE:\n this.playerMuted = data.muted;\n break;\n case PlayerEvent.CONTENT_PAUSED:\n this.lastPausedTimestamp = Date.now();\n break;\n case PlayerEvent.CONTENT_PROGRESS:\n case PlayerEvent.CONTENT_PLAYING: {\n const secondsRemaining =\n data && data.contentDuration - data.contentTime;\n if (secondsRemaining < UP_NEXT_COUNT && secondsRemaining !== null) {\n newPlayerState = PlayerStates.Next;\n }\n this.calculateRemainingTime(secondsRemaining);\n break;\n }\n case PlayerEvent.CONTENT_PAUSED:\n this.addRemaingTimeAttribute();\n break;\n case PlayerEvent.AUTOPLAY_BLOCKED:\n console.log(\"AUTOPLAY BLOCKED ON THIS BROWSER\")\n break;\n case PlayerEvent.CONTENT_COMPLETE:\n newPlayerState = PlayerStates.End;\n break;\n case PlayerEvent.TEXT_CUEPOINT:\n const textCuepoint = event.detail;\n this.textTrackManager.updateTextTrack(textCuepoint)\n break;\n case PlayerEvent.PLAYBACK_STATE_CHANGE:\n if (data.playbackState === PlaybackState.PAUSED) {\n this.lastPausedTimestamp = Date.now();\n }\n if(data.playbackState === PlaybackState.PLAYING){ \n const timeToReset = Math.floor((Date.now() - this.lastPausedTimestamp) / 1000);\n if(timeToReset > 600) {\n window && window.location.reload();\n }\n }\n break;\n case PlayerEvent.PLUGIN_EVENT:\n if (data.type === \"posterplay\") {\n let playCount = 0;\n const playingCheck = setInterval(()=> {\n playCount++;\n this.player.play();\n if(this.player.playbackState === \"playing\" && playCount >= 5){\n clearInterval(playingCheck);\n }\n }, 2000);\n }\n if (data.type === \"pause\" || data.type === \"seek\") {\n this.addRemaingTimeAttribute();\n }\n if (data.event === \"change-video\") {\n this._changeResource(data);\n this.upNextPlaying = true;\n }\n break;\n case PlayerEvent.CONTENT_START:\n break;\n case PlayerEvent.CONTENT_SEGMENT_START:\n break;\n }\n\n\n this.props.onPlayerEvent && await this.props.onPlayerEvent(event);\n\n if (newPlayerState !== this.state.playerState) {\n await this._updatePlayerState(newPlayerState);\n }\n }\n\n private _onPlayerReady = async (player: iPlayer) => {\n (window as any).player = this.player = player;\n this.player.currentTime = () => { return this.player?.video?.currentTime || 0};\n this.playerUIEffects()\n this.addWatcherToLink();\n this._progressMag = new VideoProgressManager(player);\n this.textTrackManager = new videoTextTrackManager(player)\n\n // const {playerId} = this.props;\n // this._logger.log('Player has been initialized with id: ' + playerId);\n\n const eventTypes = PlayerEvent;\n // Register for player events\n for (const key in eventTypes) {\n this.player.on(eventTypes[key], async (event: any) => {\n this._trackEvent(event);\n await this._onPlayerEvent(event);\n });\n }\n }\n\n private addBeforeUnloadListener() {\n if (typeof window !== 'undefined') {\n window.addEventListener(\"beforeunload\", event => {\n const {mediaInfo} = this.props;\n this._allocator.track(allocatorVodEventMapping['beforeunloadpage'], mediaInfo, this.player);\n setTimeout(() => {\n this.player.stop();\n }, 0);\n });\n } \n }\n\n private async addWatcherToLink() {\n if(window !== undefined) {\n return new Promise((resolve, reject) => {\n const links = document.querySelectorAll('a');\n const selectedLinks = Array.from(links).filter((link) => {\n const href = link.getAttribute('href');\n const target = link.getAttribute('target');\n return href !== null && target !== '_blank';\n });\n selectedLinks.forEach(link => {\n const lnk = link.addEventListener('click', (event) =>{\n const {defaultPrevented} = event;\n if (!defaultPrevented) {\n const {mediaInfo} = this.props;\n this._allocator.track(allocatorVodEventMapping['beforeunloadpage'], mediaInfo, this.player);\n this._allocator && this._allocator.resetTrackingService();\n }\n ({ success }) => resolve(lnk)\n });\n });\n })\n \n }\n \n }\n\n protected convertToVideoTrackObj(mediaInfo, video) { \n this.mediaInfo = mediaInfo;\n const mediaInfoNew = PlayerCtrl.convertToVideoTrackObj(this._videoInfo, mediaInfo, this._oztamServiceConfig.sessionId);\n\n mediaInfoNew.publisher_id = mediaInfo.customFields.publisherid; \n Object.assign(mediaInfoNew.custom_fields);\n return mediaInfoNew;\n \n };\n\n protected _trackEvent(event) {\n const eType = event.type\n const allocatorEvent = allocatorVodEventMapping[eType];\n const {mediaInfo, video} = this.props;\n if ([PlayerEvent.CONTENT_PROGRESS, PlayerEvent.AD_PROGRESS].indexOf(event.type) === -1) {\n }\n\n if (allocatorEvent === undefined) {\n return;\n }\n\n const generateAdData = (event) => {\n if(event.type === PlayerEvent.AD_START) {\n const {adDuration, adTitle, adPosition, adObject} = event.detail.adInfo;\n const ads = {\n adType: adObject?.podInfo?.data?.type === \"mid\" ? \"video_midroll\" : \"video_preroll\",\n adDuration: adDuration,\n adTitle: adTitle, \n adIndex: adObject?.j?.adPodInfo?.adPosition || adObject?.data?.position || adPosition, \n }\n this.adEventData = ads;\n }\n if(event.type === PlayerEvent.AD_START || event.type === PlayerEvent.AD_COMPLETE) {\n return this.adEventData;\n }\n }\n\n if (allocatorEvent === eAllocatorEvent.PROGRESS) {\n\n const {contentDuration, contentTime} = event.detail || {};\n if (contentDuration && contentTime) {\n (this._allocator.tealium as TealiumAviaVod)?.watchedPercentage(contentTime/contentDuration);\n }\n\n setTimeout(()=>{\n this.player.watchPosition = contentTime;\n }, 500);\n }\n\n if (!this._videoInfo) {\n return;\n }\n\n const allocatorVideoObj = PlayerCtrl.convertToVideoTrackObj(this._videoInfo, mediaInfo, this._oztamServiceConfig.sessionId);\n this._allocator.track(allocatorEvent, allocatorVideoObj, this.player, generateAdData(event));\n\n if (allocatorEvent === eAllocatorEvent.FIRST_PLAY) {\n this._allocator.track(eAllocatorEvent.SEGMENT_VIEW, allocatorVideoObj, this.player);\n this._isFirstPlay= true;\n }\n\n // Check for isFirstPlay flag so segment view event does not fire on preroll ad end event\n if (allocatorEvent === eAllocatorEvent.AD_BREAK_END && this._isFirstPlay === true) {\n this._allocator.track(eAllocatorEvent.SEGMENT_VIEW, allocatorVideoObj, this.player);\n }\n\n }\n\n async restartVideoWithoutAds() {\n const {playerState} = this.state;\n if (playerState !== PlayerStates.PreInitialize) {\n this._logger.log('Error Occurred - re-creating player without ads');\n await this._updatePlayerState(PlayerStates.PreInitialize);\n await this._updateVideoNoAds();\n }\n }\n\n async restartPlayerCSAI() {\n await this._updateVideo()\n }\n\n calculateRemainingTime(secondsRemaining: number) {\n let remainingText;\n const remainderSeconds = Math.round(secondsRemaining % 60);\n const remainingMinutes = Math.round(secondsRemaining / 60);\n\n if (isNaN(remainingMinutes) || isNaN(remainderSeconds)) {\n return\n }\n if (remainingMinutes < 1) {\n remainingText = `${remainderSeconds} secs`;\n } else if (remainingMinutes === 1) {\n remainingText = `${remainingMinutes} min`;\n } else if (remainingMinutes > 1) {\n remainingText = `${remainingMinutes} mins`;\n }\n if (remainingText !== this.state.remainingString) {\n this.setState({remainingString: remainingText});\n }\n }\n\n async addRemaingTimeAttribute() {\n const container = document.querySelector(`#${this.playerContainerId}`);\n const {remainingString} = this.state;\n const checkExist = setInterval(function () {\n const playBtn = container.querySelectorAll('avia-play-cta avia-button');\n if (playBtn.length > 0) {\n for (let i = 0; i < playBtn.length; i++) {\n playBtn[i].setAttribute('data-rt', remainingString);\n }\n clearInterval(checkExist);\n } \n }, 100)\n\n }\n\n playerUIEffects() {\n const slider = document.querySelector(\".avia-volume-slider-target\");\n const volCtrl = document.querySelector(\".avia-mute-toggle-target\");\n volCtrl && volCtrl.addEventListener(\"mouseover\", function(event) {\n slider.classList.add(\"show\")\n });\n volCtrl && volCtrl.addEventListener(\"mouseout\", function(event) {\n slider.classList.remove(\"show\")\n });\n slider && slider.addEventListener(\"mouseover\", function(event) {\n slider.classList.add(\"show\")\n });\n slider && slider.addEventListener(\"mouseout\", function(event) {\n slider.classList.remove(\"show\")\n });\n }\n\n isBrowserEnvironment() {\n return typeof window !== 'undefined';\n }\n\n getUrlParam(paramName: string): string {\n if (!this.isBrowserEnvironment()) {\n return null;\n }\n const urlParams = new URLSearchParams(window.location.search);\n return urlParams.get(paramName);\n }\n\n private async fetchIMSDataAndLog(): Promise {\n // COPPA flag 1 indicates child-directed content that follows COPPA ad standards\n // 0 indicates adult-directed content\n const coppaFlag = this.props.video.genre?.toLowerCase() === 'kids' ? 1 : 0;\n\n const data = {\n userIp: this.userIp,\n coppa: coppaFlag\n };\n\n try {\n // This will automatically handle COPPA status updates and cache invalidation\n const response = await this.imsAPI.getIMSData(data);\n if (response) {\n this.imsAPI.logFreewheelDebug('IMS Data:', response);\n return response;\n }\n return null;\n } catch (error) {\n console.error('Error fetching IMS data:', error);\n return null;\n }\n }\n}","import { Autoplay, createVideoPlayer, PlayerOptionsInterface, PerformanceMode, LogLevel } from \"@cbsinteractive/avia-js\";\nimport {ActiveMode, ThemeInterface} from '@cbsinteractive/avia-js-ui'\nimport { iWebApiVideoData } from \"../api/api.video.type\";\nimport {upnext} from \"./Plugins/createUpNext/UpNextPlugin\";\nimport { ui } from '@cbsinteractive/avia-js-ui';\nimport { hls } from '@cbsinteractive/avia-js-hls';\nimport { playlist } from '@cbsinteractive/avia-js-playlist';\nimport { gam } from '@cbsinteractive/avia-js-gam';\nimport { deviceType } from \"../player/util/device\";\nimport { consumeradvice } from '../commonPlugins/ConsumerAdvice/AviaConsumerAdvice';\nimport { isDesktop } from \"../player/util/env.util\";\nimport { display } from './Plugins/display/AviaDisplayPlugin';\nimport { dash } from '@cbsinteractive/avia-js-dash';\n\ninterface iCreatePlayerConfig {\n containerId: string,\n playerId: string,\n autoplay: Autoplay,\n video: iWebApiVideoData,\n onPlayerReady,\n globalSettings?\n}\n\n\nconst createTheme = (isMobile: boolean): ThemeInterface => {\n return {\n html: `\n
    \n
    \n \n
    \n \n
    \n \n \n ${isMobile ? '' : ''}\n
    \n
    \n ${isMobile ? '' : ''}\n \n \n
    \n
    \n
    \n
    \n `,\n };\n};\n\n\nexport async function vodCreatePlayer(props: iCreatePlayerConfig) {\n const { video, globalSettings } = props;\n \n const consumerAdviceOptions = {\n duration: globalSettings?.playbackSettings?.consumerAdviceDisplayTime || 5,\n consumerAdvice: video?.consumerAdvice,\n isLive: false,\n };\n const playerOptions: PlayerOptionsInterface = {\n autoplay: Autoplay.ATTEMPT_UNMUTED,\n container: document.querySelector(`#${props.containerId}`) as HTMLElement,\n id: props.playerId,\n performanceMode: PerformanceMode.AUTO,\n useNativeFullscreen: true,\n playsInline: true,\n renderTextTrackNatively: deviceType === 'mobile',\n enableMoat: false,\n //logLevel: LogLevel.DEBUG,\n enableOm: true,\n plugins: [\n ui({\n posterImageUrl: video?.poster, // optional path to poster\n compactViewBreakpoint: 1,\n theme: createTheme(!isDesktop),\n activeMode: ActiveMode.AUTO,\n enableMobileCaptionsAndSettings: true,\n }),\n dash({ debug: false }),\n hls(),\n gam(),\n playlist(),\n upnext(),\n consumeradvice({\n consumerAdviceOptions\n }),\n display()\n ],\n };\n\n return await createVideoPlayer(playerOptions);\n};","import {isFlashPlayerEnabled} from \"./env.util\";\nimport {iVideoAdConfig} from \"../tenAds/video\";\nimport {iAdsServiceConfig} from \"../tenAds/adManager\";\n\n/**\n * define global objects\n */\ndeclare global {\n interface Window {\n /**\n * global project setting\n */\n debug: any, // debug config\n\n /**\n * global object\n */\n trac: any, // nielsen v60\n NOLCMB: any, // nielsen SDK\n s_gi: any, // omniture SDK\n google,\n googletag: any, // googletag\n bc: any, // brightcove player\n videojs: any, // brightcove player\n\n /**\n * global callback\n */\n blankAdCallback: any, // googletag loaded blank ad callback\n }\n}\n\nexport interface iBCAttrConfig {\n \"data-account\": string;\n defaultPlayerId: string;\n \"data-player\"?: string;\n}\n\nexport interface iAdsMCNExclusion {\n key: string;\n rules: Array;\n}\n\nexport interface iBCConfig{\n attributes: iBCAttrConfig;\n plugins: {[name: string]: () => void };\n pluginsForVod?: {[name: string]: () => void };\n pluginsForLive?: {[name: string]: () => void };\n}\n\nexport interface iEnv {\n productionHostName: string | Array;\n enabledFlash: boolean;\n isProduction: () => boolean;\n isStaging: () => boolean;\n\n meta: {[metaName: string]: string};\n playerConfig: iBCConfig;\n trackingService: iTrackingService;\n adsServiceConfig: iAdsServiceConfig;\n}\n\nexport interface iTrackingServiceConfig {\n enabled: boolean;\n config: { // interface of config obj should be defined in their lib file\n staging: any;\n production: any;\n };\n}\n\nexport interface iTrackingService {\n oztam: iTrackingServiceConfig,\n omniture: iTrackingServiceConfig,\n nielsen: iTrackingServiceConfig,\n mux?: iTrackingServiceConfig,\n}\n\n/**\n * Global environment setting\n * @type {iEnv}\n */\nlet envTemp: iEnv = {} as any;\n\nif (typeof window !== \"undefined\"){\n envTemp = {\n productionHostName: undefined,\n enabledFlash: isFlashPlayerEnabled(),\n isProduction: () => {\n let prodDomain = envTemp.productionHostName;\n if (typeof prodDomain === \"string\") {\n return !!(prodDomain && window.location.hostname === prodDomain);\n }\n\n if (prodDomain && Array.isArray(prodDomain)) {\n return prodDomain.indexOf(window.location.hostname) >= 0;\n }\n },\n isStaging: () => {\n return !envTemp.isProduction();\n },\n meta: (function () {\n let metaObject = {};\n\n let metaDOMs = document.querySelectorAll('meta[property*=\"bt:\"]');\n for (let i = 0; i < metaDOMs.length; i++) {\n let meta = metaDOMs[i];\n metaObject[meta.getAttribute(\"property\")] = meta.getAttribute(\"content\");\n }\n\n\n metaDOMs = document.querySelectorAll('meta[name*=\"gcontent-\"]');\n for (let i = 0; i < metaDOMs.length; i++) {\n let meta = metaDOMs[i];\n metaObject[meta.getAttribute(\"name\")] = meta.getAttribute(\"content\");\n }\n\n return metaObject;\n })(),\n playerConfig: undefined,\n trackingService: undefined,\n adsServiceConfig: undefined\n };\n}\n\nexport const env = envTemp;","import {iAdsServiceConfig} from \"../tenAds/adManager\";\nimport {cookies, isDesktop, isMobileWidth} from \"../ten/env.util\";\nimport {PagePathInfo} from \"../tenAds/page.path.processor\";\nimport {skin_handleBlankLoad, skin_handlePreload, skin_handleSuccessLoad} from \"../tenAds/util.skin\";\nimport {\n addAdhesionDom,\n adhesion_handleBlankLoad,\n adhesion_handlePreload,\n adhesion_handleSuccessLoad\n} from \"../tenAds/util.adhesion\";\nimport {mrec_handleBlankLoad, mrec_handleSuccessLoad} from \"../tenAds/util.mrec.carousel\";\nimport {c06_handleBlankLoad, c06_handleSuccessLoad} from \"../tenAds/util.c06\";\nimport {iUtag} from \"./env.utag\";\nimport {baseCustEnv as env} from \"./cust.env.base\";\nimport {jwtMember} from \"../tenMember/jwt/cacheStatus\";\nimport {eLocalStorage_tenUser_info} from \"../tenMember/jwt/enum\";\nimport {iAdSlotConfig} from \"../tenAds/static.type\";\nimport {adsUtil} from \"./cust.env.ads.util\";\n\n//const utagData = window.utag_data;\nconst utag_data: iUtag = (window as any).utag_data || {};\nconst retrievedLocalStorageStte = localStorage.getItem(\"tenplay.geolocation.state\") || '';\nconst targettedPageCategories = [\n \"melbourne-cup-carnival\",\n];\n\nfunction getUpdatedSections(){\n const sections = [];\n const paths = window.location.pathname.split(\"/\");\n if (paths.length <= 1) {\n return sections\n }\n Array.apply(null, Array(3)).forEach((n, i) =>{\n utag_data[`siteSubSection${i+1}`] && paths[i+1] && sections.push(paths[i+1]);\n });\n\n return sections;\n}\n\nfunction isTargetedCategoryPage(category) {\n return targettedPageCategories.indexOf(category) >= 0;\n}\n\nfunction getShowName() {\n if (utag_data.showNameTargeting) {\n return utag_data.showNameTargeting.toLowerCase();\n } else {\n if (utag_data.showName) {\n let showNameUnformatted = utag_data.showName;\n let showNameFormatted = showNameUnformatted.replace(/[^a-zA-Z ]/g, \"\").replace(/\\s+/g, '-').toLowerCase();\n return showNameFormatted;\n } else {\n return '';\n }\n\n }\n}\n\nfunction isShowPage() {\n if (!utag_data.showChannel) {\n return;\n }\n if (!utag_data.showName) {\n // this is live page\n return;\n }\n return [\"ten\", \"play\", \"bold\", \"peach\", \"shake\"].indexOf(utag_data.showChannel.toLowerCase()) >= 0;\n}\n\nfunction isHubPage() {\n if (!utag_data.hubName) {\n return;\n }\n let hubNameFormatted = utag_data.siteSubSection1.replace(/\\-/g,\"_\");\n return hubNameFormatted;\n}\n\nfunction isShow() {\n switch (utag_data.siteSection) {\n case \"Shows\":\n case \"Sport\":\n break;\n default:\n return;\n }\n\n if (!utag_data.showName) {\n // this is live page\n return;\n }\n\n if (!utag_data.showChannel) {\n return \"tenplay\";\n } else {\n return [\"ten\", \"play\", \"bold\", \"peach\", \"shake\"].indexOf(utag_data.showChannel.toLowerCase()) >= 0;\n }\n}\n\nfunction hasShowVideo() {\n return document.querySelector(\".show-video__player\") !== null;\n}\n\nfunction isCompanionAds() {\n return isShow() && hasShowVideo();\n}\n\nexport const adServiceConfig: iAdsServiceConfig = {\n companionAds: {\n enabled: isCompanionAds(),\n adSizes: [[300, 250], [728,90], [4,1]],\n },\n staticAdConfig: {\n lazyLoading: undefined,\n // todo post launch feature\n // {\n // fetchMarginPercent: 200,\n // renderMarginPercent: 100,\n // mobileScaling: 1.5\n // },\n account: env.isProduction() ? \"8264\" : \"7336\",\n pagePathInfo: (): PagePathInfo=> {\n /**\n * get page type\n */\n // let type;\n // const ldjson = document.querySelector('script[type=\"application/ld+json\"]');\n // if (ldjson !== null) {\n // let jsonldObj = JSON.parse(ldjson.innerHTML);\n // if (jsonldObj && jsonldObj[\"@graph\"]) {\n // jsonldObj = jsonldObj[\"@graph\"];\n //\n // if (jsonldObj && jsonldObj[jsonldObj.length - 1][\"@type\"]) {\n // type = jsonldObj[jsonldObj.length - 1][\"@type\"];\n // }\n // }\n // }\n\n let foundEmptyItem = false;\n const subUrlPath = getUpdatedSections().filter((subUrl, index) => {\n if (foundEmptyItem) {\n return false;\n }\n if (!subUrl) {\n foundEmptyItem = true;\n return false;\n }\n\n if (utag_data.showName && utag_data.showChannel && index === 1) {\n foundEmptyItem = true;\n return true;\n }\n\n return !!subUrl;\n });\n\n\n return new PagePathInfo(\n (utag_data as any).pageType,\n window.location.pathname,\n subUrlPath\n );\n },\n pathRule: {\n 0: (pagePathInfo: PagePathInfo): string => {\n let options = {\n desktop: \"/au-tenplay\",\n mobile: \"/mau-tenplay\"\n };\n\n if (isMobileWidth) { // always specifically check isMobile instead of isDesktop\n return options.mobile;\n } else {\n return options.desktop;\n }\n },\n 1: (pagePathInfo: PagePathInfo): string => {\n if (pagePathInfo.category === \"rugby-world-cup-2019\") {\n return \"/rugbyworldcup\";\n } else if (pagePathInfo.category === \"10-play-trending\") {\n return \"/tenplay-trending\";\n } else if (pagePathInfo.category === \"search\") {\n return \"/search-results\";\n } else if (\n pagePathInfo.category === \"my-tv\" ||\n pagePathInfo.category === \"collection-statement\" ||\n pagePathInfo.category === \"apps\" ||\n pagePathInfo.category === \"casting\" ||\n pagePathInfo.category === \"contact-us\"\n ) {\n return \"/\";\n } else if (isShow() || pagePathInfo.category === \"masterchef-coles\" || pagePathInfo.category === \"hours-of-entertainment\") {\n return \"/shows\";\n } else {\n return \"/\" + pagePathInfo.category;\n }\n }\n },\n ptypeRule: {\n 0: (pagePathInfo: PagePathInfo): string => {\n return \"front_door\";\n },\n 1: (pagePathInfo: PagePathInfo): string => {\n switch (pagePathInfo.category) {\n case \"shows\": return \"show_index\";\n case \"news\": return \"news_index\";\n case \"live\": return \"live\";\n case \"tv-guide\": return \"tv_guide\";\n }\n\n if (isShow() && hasShowVideo()) {\n if (pagePathInfo.clearEnding) {\n return \"show_home\";\n }\n\n // when navigating to different section without page refresh\n if (Array.isArray(pagePathInfo.pathName) && pagePathInfo.pathName[2] && typeof pagePathInfo.pathName[2] === \"string\") {\n return pagePathInfo.pathName[2].toLowerCase();\n } else {\n return \"show_extra_detail\";\n }\n } else if (isTargetedCategoryPage(pagePathInfo.category)) {\n if (Array.isArray(pagePathInfo.pathName) && pagePathInfo.pathName[2] && typeof pagePathInfo.pathName[2] === \"string\") {\n return pagePathInfo.pathName[2].toLowerCase();\n }\n }\n\n return \"category_door\";\n },\n 2: (pagePathInfo: PagePathInfo): string => {\n switch (pagePathInfo.category) {\n case \"live\": return \"live\";\n case \"news\": return \"news_show\";\n }\n\n // todo currently pageContentType does not appear more frequently than showContentCategory, will remove showContentCategory option once fixed this from backend.\n const content = utag_data.pageContentType || utag_data.showContentCategory;\n\n if (isShow() && hasShowVideo()) {\n if (pagePathInfo.section) {\n return pagePathInfo.section.toLowerCase();\n } else {\n return \"show_extra_detail\";\n }\n } else if (isHubPage()) {\n return \"hub_page_detail\";\n } else if (isTargetedCategoryPage(pagePathInfo.category) && pagePathInfo.section) {\n return pagePathInfo.section.toLowerCase();\n } else if (!utag_data.siteSubSection3 && pagePathInfo.section){\n return pagePathInfo.section.toLowerCase();\n } else {\n switch (content) {\n case \"Recipe\":\n return \"show_recipe_detail\";\n case \"Article\":\n return \"show_article_detail\";\n case \"Gallery\":\n return \"show_gallery_detail\";\n case \"Web Extra\":\n return \"show_extra_detail\";\n case \"Episodes\":\n return \"episodes\";\n case \"About\":\n return \"about\";\n case \"Competition\":\n return \"competition\";\n case \"Quiz\":\n return \"show_quiz_detail\";\n }\n return \"sub_category_door\";\n }\n },\n 3: (pagePathInfo: PagePathInfo): string => {\n const content = utag_data.pageContentType || utag_data.showContentCategory;\n if (content && document.querySelector(\".show-video__player\") !== null) {\n return content.toLowerCase();\n } else {\n return \"sub_section_door\";\n }\n }\n },\n keyValueRule: {\n 0: [],\n 1: [\n {\n A_Range: [],\n keyValueRules: [\n {\n k: \"show\",\n v: (pagePathInfo): string => {\n if (pagePathInfo.category === \"masterchef-coles\") {\n return \"masterchef\";\n }\n return isShow() && getShowName();\n }\n },\n {\n k: \"channel\",\n v: (pagePathInfo): string => {\n if (pagePathInfo.category === \"live\") {\n return utag_data.showChannel.toLowerCase();\n }\n if(!utag_data.showChannel) {\n return \"tenplay\";\n } else {\n return isShow() && utag_data.showChannel.toLowerCase();\n }\n }\n },\n {\n k: \"genre\",\n v: (pagePathInfo): string => {\n return Array.isArray(utag_data.showGenre) && utag_data.showGenre.join(\",\").toLowerCase();\n }\n },\n {\n k: \"rating\",\n v: (): string => {\n return isShow() && utag_data.showProgramClassification\n }\n },\n {\n k: \"feat\",\n v: (): string => {\n return isShow() && hasShowVideo() && typeof utag_data.showContentVideoType === \"string\" && utag_data.showContentVideoType.toLowerCase().replace(\" \", \"_\") || undefined;\n }\n },\n {\n k: \"content_type\",\n v: (): string => {\n return isShow() && hasShowVideo() && typeof utag_data.showContentFormatType === \"string\" && utag_data.showContentFormatType.toLowerCase().replace(\" \", \"_\") || undefined;\n }\n },\n {\n k: \"section\",\n v: (pagePathInfo): any => {\n if (pagePathInfo.category === \"news\") {\n return pagePathInfo.section;\n }\n if (pagePathInfo.category === \"live\") {\n return utag_data.showChannel.toLowerCase();\n }\n\n let showGenreLowercase = Array.isArray(utag_data.showGenre) ? utag_data.showGenre.map(genre => {\n return genre && genre.toLowerCase() || \"\";\n }) : [];\n if (showGenreLowercase.indexOf(\"sport\") >= 0) {\n return pagePathInfo.category;\n }\n }\n },\n {\n k: \"pv\",\n v: (pagePathInfo): string => {\n const pv0 = \"pv_0\";\n const pv24 = \"pv_24\";\n let currentPV = 1;\n const sessionCookie = cookies.getCookie(pv0);\n const oneDayCookie = cookies.getCookie(pv24);\n if (sessionCookie && oneDayCookie && sessionCookie === oneDayCookie) {\n currentPV = parseInt(sessionCookie, 10) + 1;\n }\n\n cookies.setCookie(pv0, currentPV);\n cookies.setCookie(pv24, currentPV, 1);\n return currentPV + \"\";\n }\n },\n {\n k: \"collection\",\n v: (pagePathInfo): Array => {\n let addShowName = isShow() ? getShowName() : [];\n let addRecipeCollection = utag_data.recipeCollection ? utag_data.recipeCollection.split('-').join('_').toLowerCase() : [];\n let addContentTags = Array.isArray(utag_data.videoContentCategories) ? utag_data.videoContentCategories : [];\n let addHubName = isHubPage() ? isHubPage() : [];\n let addChannelName = pagePathInfo.category === \"live\" ? utag_data.showChannel.toLowerCase() : []; \n const collections = [`web-extra-${utag_data.siteSubSection1}`];\n return addContentTags.indexOf(\"web-extras\") > -1 ? collections : addContentTags.concat(addShowName, addHubName, addRecipeCollection, addChannelName);\n }\n }\n ]\n }\n ],\n 2: [],\n 3: []\n },\n exclusionRule: {\n general: [\n \"Alcoholic_Beverages\",\n \"Porn\",\n \"Gambling\"\n ],\n shows: []\n },\n // extraTargeting are static, and wont be updated by adManager.syncStaticAdParams()\n extraTargeting: {\n \"keywords\": (): Array => {\n let articleTags = Array.isArray(utag_data.articleTags) ? utag_data.articleTags : [];\n let recipeTags = Array.isArray(utag_data.recipeTags) ? utag_data.recipeTags : [];\n return articleTags.concat(recipeTags);\n },\n \"cid\": (pagePathInfo): string => {\n const content = utag_data.pageContentType || utag_data.showContentCategory;\n if (isHubPage()) {\n isHubPage();\n }\n else {\n switch (content) {\n case \"Recipe\": return adsUtil.replaceSpecChar_cid(utag_data.recipeTitle);\n case \"Video\": return adsUtil.replaceSpecChar_cid(utag_data.showContentName);\n case \"Article\": return adsUtil.replaceSpecChar_cid(utag_data.articleTitle);\n case \"Gallery\": return adsUtil.replaceSpecChar_cid(utag_data.siteSubSection3);\n case \"Quiz\": return adsUtil.replaceSpecChar_cid(utag_data.siteSubSection3);\n case \"Competition\": return adsUtil.replaceSpecChar_cid(utag_data.siteSubSection3);\n }\n return adsUtil.replaceSpecChar_cid(utag_data.siteSubSection3);\n }\n },\n \"device\": (): string => {\n return utag_data.deviceType;\n },\n \"user\": utag_data.memberLoginStatus === \"logged-in\" ? \"register\" : \"anon\",\n \"sub\": jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_n10adId],\n \"gr\": jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_gr],\n \"ge\": jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_ge],\n \"session\": (()=>{\n let cbsSession = cookies.getCookie(\"CBS_ADV_VAL\");\n if (!cbsSession) {\n cbsSession = [\"a\", \"b\", \"c\", \"d\"][Math.floor(Math.random() * 4)];\n cookies.setCookie(\"CBS_ADV_VAL\", cbsSession);\n }\n return cbsSession;\n })(),\n \"pguid\": utag_data.memberEmailHashed || \"\",\n \"env\": env.isProduction() ? \"prod\" : \"qa\",\n \"podcast\": (): string => {\n if (utag_data.siteSection === \"Podcasts\") {\n return utag_data.siteSubSection1;\n }\n }\n },\n genericSlots: [\n {\n pos: \"\", elementId: \"outofpage\",\n size: [\"outOfPage\"], type: [\"adhesion\"],\n insert: {\n before:\n \"#nav\"\n }\n },\n {\n pos: \"top\", elementId: \"mpu_top\",\n size: [[300, 250]], type: [\"mrec\"],\n parent: `\n .content--withMREC .content__ad__content, \n .sidebar__items .mrec,\n #showParticipantsPage .mrec,\n #showRecipePage .mrec,\n #showRecipesPage .mrec,\n #showRecipeCollectionPage .mrec,\n #showArticlePage .mrec,\n #showArticlesPage .mrec,\n #showGalleriesPage .mrec,\n #showCompetitionsPage .mrec,\n #showPage .mrec,\n .content__grid .content__tiles-tile,\n #showQuizzesPage .mrec,\n #newsVodPage .mrec\n `,\n insert: {\n into: `\n .content--withMREC .mrec,\n .sidebar__items .mrec,\n #showParticipantsPage .mrec,\n #showRecipePage .mrec,\n #showRecipesPage .mrec,\n #showRecipeCollectionPage .mrec,\n #showArticlePage .mrec,\n #showArticlesPage .mrec,\n #showGalleriesPage .mrec,\n #showCompetitionsPage .mrec,\n #showPage .mrec,\n #showQuizzesPage .mrec,\n #newsVodPage .mrec,\n .content__grid .mrec\n `,\n },\n style: \"width: 300px; height: 250px; margin: auto;\",\n successLoadCallback: function(){\n mrec_handleSuccessLoad(this);\n },\n blankAdCallback: function(){\n mrec_handleBlankLoad(this);\n }\n },\n getFeatureAdConfig(0),\n getFeatureAdConfig(1),\n getFeatureAdConfig(2),\n getFeatureAdConfig(3),\n getFeatureAdConfig(4),\n getFeatureAdConfig(5),\n getFeatureAdConfig(6),\n getFeatureAdConfig(7),\n getFeatureAdConfig(8),\n getFeatureAdConfig(9),\n {\n pos: \"quick1\", elementId: \"quick_link_1\",\n size: [[148, 212]], type: [\"QuickLink v2/Native\"],\n insert: {\n into: \"#quick-links .content__wrapper .ql.ql-1\"\n }\n },\n {\n pos: \"quick2\", elementId: \"quick_link_2\",\n size: [[148, 212]], type: [\"QuickLink v2/Native\"],\n insert: {\n into: \"#quick-links .content__wrapper .ql.ql-2\"\n }\n },\n {\n pos: \"quick3\", elementId: \"quick_link_3\",\n size: [[148, 212]], type: [\"QuickLink v2/Native\"],\n insert: {\n into: \"#quick-links .content__wrapper .ql.ql-3\"\n }\n },\n {\n pos: \"quick4\", elementId: \"quick_link_4\",\n size: [[148, 212]], type: [\"QuickLink v2/Native\"],\n insert: {\n into: \"#quick-links .content__wrapper .ql.ql-4\"\n }\n },\n {\n pos: \"top\", elementId: \"logo_top\",\n size: [[160, 92]], type: [\"logo\"],\n sizeAny: true,\n parent: \".show-video__sponsor, .recipe__header--sponsor, .article--sponsor\",\n insert: {\n into:\n \".show-video__sponsor, .recipe__header--sponsor, .article--sponsor\",\n }\n },\n ],\n desktopSlots: [\n {\n pos: \"\", elementId: \"skin\",\n size: [[4, 1]], type: [\"skin\"],\n insert: {\n before:\n \"main > .content__wrapper > :first-child\"\n },\n preloadCallback: ()=>{\n skin_handlePreload();\n },\n successLoadCallback: ()=>{\n skin_handleSuccessLoad();\n },\n blankAdCallback: ()=>{\n skin_handleBlankLoad();\n }\n },\n {\n pos: \"sticky\", elementId: \"adhesion\",\n size: [[728,90]], type: [\"leader\"],\n preloadCallback: ()=>{\n adhesion_handlePreload();\n },\n successLoadCallback: ()=>{\n adhesion_handleSuccessLoad();\n },\n blankAdCallback: ()=>{\n adhesion_handleBlankLoad();\n }\n },\n ],\n mobileSlots: [\n {\n pos: \"sticky\", elementId: \"mobile_adhesion\",\n size: [[320,50]], type: [\"leader\"],\n preloadCallback: ()=>{\n adhesion_handlePreload();\n },\n successLoadCallback: ()=>{\n adhesion_handleSuccessLoad();\n },\n blankAdCallback: ()=>{\n adhesion_handleBlankLoad();\n }\n },\n ],\n requestParams: [\n [\"ppid\", jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_n10adId]],\n ],\n },\n videoAdConfig: {\n account: \"8264\", // todo we do not have access to staging video ad account\n id: \"vau-ten\",\n device: isDesktop ? \"desktop\" : \"mobile_web\",\n site: \"tenplay\",\n cmsID: \"2489270\",\n //exclusions: mcnExclusions\n\n customParams:[\n [\"gr\", jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_gr]],\n [\"ge\", jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_ge]],\n [\"state\", retrievedLocalStorageStte],\n [\"collection\", Array.isArray(utag_data.videoContentCategories) ? utag_data.videoContentCategories : []],\n [\"genre\", Array.isArray(utag_data.showGenres) ? utag_data.showGenres : []],\n [\"sub\", jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_n10adId]],\n ],\n requestParams: [\n [\"ppid\", jwtMember.getUserDetail()[eLocalStorage_tenUser_info.tu_n10adId]],\n ]\n }\n};\n\n\nfunction getFeatureAdConfig(index): iAdSlotConfig {\n return {\n pos: \"feature\" + (index + 1),\n elementId: \"feature_\" + (index + 1),\n size: [[234, 227]],\n sizeAny: true,\n type: [\"feature_unit\"],\n parent: \"#c06 #c06_card_\" + index,\n style: \"min-height: 1px;\",\n insert: {\n into: \"#c06 #c06_card_\" + index,\n },\n successLoadCallback: function() {\n c06_handleSuccessLoad(this);\n },\n blankAdCallback: function(){\n c06_handleBlankLoad(this);\n }\n }\n}\n","export namespace adsUtil {\n /**\n * cid value should not include \",\" - remove it\n * @param cidString\n */\n export function replaceSpecChar_cid(cidString: string) {\n if (typeof cidString === \"string\") {\n cidString = cidString.replace(/,/g, \"\");\n }\n return cidString;\n }\n}","import {env as baseEnv} from \"../ten/conf.env\";\nimport {vjsErrorHandler} from \"../tenVod/plugins/errorHandler\";\nimport {vjsEventHandler} from \"../tenVod/plugins/eventHandler\";\nimport {trackingService} from \"../tenVod/plugins/trackingService\";\nimport {vjsOverlayUI} from \"../tenVod/plugins/overlayUI\";\nimport {vjsVideoPlaySync} from \"../tenVod/plugins/videoPlaySync\";\nimport {vjsVolumeSync} from \"../tenVod/plugins/volumeSync\";\nimport {drmFilter} from \"../tenVod/plugins/drmFilter\";\n\n\nbaseEnv.productionHostName = [\n \"10play.com.au\",\n \"www.10play.com.au\"\n];\n\nbaseEnv.playerConfig = {\n plugins: {\n DrmFilter: drmFilter,\n ErrorHandler: vjsErrorHandler,\n EventHandler: vjsEventHandler,\n TrackingService: trackingService,\n OverlayUI: vjsOverlayUI,\n VideoPlaySync: vjsVideoPlaySync,\n VolumeSync: vjsVolumeSync,\n },\n attributes: {\n \"data-account\": \"5699924508001\",\n \"defaultPlayerId\": \"\"\n },\n};\n\nexport const baseCustEnv = baseEnv;","import {iTrackingService} from \"../ten/conf.env\";\n\nexport const trackingServiceConfig: iTrackingService = {\n oztam: {\n enabled: true,\n config: {\n staging: {\n serverTarget: \"//sdeliver.oztam.com.au/api/meter\",\n protocolVersion: \"1\",\n vendorVersion: \"Tenplay_web_3.0\",\n plugin: \"javascript\",\n meta: {\n account_id: \"2199827728001\"\n }\n },\n production: {\n serverTarget: \"//deliver.oztam.com.au/api/meter\",\n protocolVersion: \"1\",\n vendorVersion: \"Tenplay_web_3.0\",\n plugin: \"javascript\",\n meta: {\n account_id: \"2199827728001\"\n }\n }\n }\n },\n omniture: {\n enabled: true,\n config: {\n staging: {\n account: \"nwtplaydev,nwtglobaldev\",\n namespace: \"networkten\",\n server: \"networkten.sc.omtrdc.net\"\n },\n production: {\n account: \"nwtplay,nwtglobal\",\n namespace: \"networkten\",\n server: \"networkten.sc.omtrdc.net\"\n }\n }\n },\n nielsen: {\n enabled: true,\n config: {\n staging: {\n sfcode: \"dcr-cert\",\n apid: \"T06F16904-EF42-4F7F-A5A8-DC3A7341D4F5\",\n apn: \"networkten\",\n nsdkv: \"511\",\n nol_devDebug: \"DEBUG\"\t// 'INFO', 'WARNING', 'ERROR', 'DEBUG'\n },\n production: {\n sfcode: \"dcr\",\n apid: \"P06F16904-EF42-4F7F-A5A8-DC3A7341D4F5\",\n apn: \"networkten\",\n nsdkv: \"511\"\n }\n }\n },\n mux: {\n enabled: true,\n config: {\n staging: {\n key: \"52g3d6oag448r0bhh5fovnch1\",\n },\n production: {\n key: \"aj41vmodeesojujgtkmm1sfcu\",\n }\n }\n }\n};","import {adServiceConfig} from \"./cust.env.ads\";\nimport {iUtag} from \"./env.utag\";\nimport {trackingServiceConfig} from \"./cust.env.track\";\nimport {baseCustEnv} from \"./cust.env.base\";\n\n/**\n * define global objects\n */\ndeclare global {\n interface Window {\n /**\n * global project setting\n */\n debug: any, // debug config\n\n /**\n * global object\n */\n trac: any, // nielsen v60\n NOLCMB: any, // nielsen SDK\n s_gi: any, // omniture SDK\n google,\n googletag: any, // googletag\n bc: any, // brightcove player\n videojs: any, // brightcove player\n utag_data: any,\n trackingData:any,\n\n /**\n * global callback\n */\n blankAdCallback: any, // googletag loaded blank ad callback\n }\n}\n\nbaseCustEnv.trackingService = trackingServiceConfig;\nbaseCustEnv.adsServiceConfig = adServiceConfig;\nexport const env = baseCustEnv;","/**\n * Value are all lower case with _, so we can call toLowerCase when find \"debug\" url param string value, to make the match easily done.\n */\nexport enum eDebug_Title {\n tealium = \"tealium\",\n nielsen = \"nielsen\",\n oztam = \"oztam\",\n omniture = \"omniture\",\n allocator = \"allocator\",\n player = \"player\",\n player_event = \"player_event\",\n ima = \"ima\",\n id3 = \"id3\",\n\n // ads\n staticAd= \"staticAd\",\n adSlotManager = \"adSlotManager\",\n\n // live player source\n yospace = \"yospace\",\n googledai = \"googledai\",\n backupStream = \"backupStream\",\n\n // debug chromecast related issue\n chromecast = \"chromecast\",\n chromecast_plugin = \"chromecast_plugin\",\n chromecast_ads = \"chromecast_ads\",\n chromecast_sync = \"chromecast_sync\",\n chromecast_seek = \"chromecast_seek\",\n chromecast_ad_beacon = \"chromecast_ad_beacon\",\n chromecast_receiver = \"chromecast_receiver\"\n}","export enum eUtag {\n articleAuthor = \"articleAuthor\",\n articleId = \"articleId\",\n articlePublishDate = \"articlePublishDate\",\t\t// \"2018-12-23\"\n articleTags = \"articleTags\",\t // [\"Celebrities\", \"Jungle\", \"Africa\"]\n articleTitle = \"articleTitle\",\t\t// \"8 Most Memorable Tucker Trials\"\n competitionClosure = \"competitionClosure\",\t\t// \"5 days\"\n competitionName = \"competitionName\",\t\t// \"20k Dream Bathroom Renovation\"\n deviceType = \"deviceType\",\t\t // \"desktop\"\n favoritesRecipeCuisine = \"favoritesRecipeCuisine\",\t\t// [\"Indian\", \"Asian\", \"Asian\"]\n favoritesRecipeShow = \"favoritesRecipeShow\",\t\t// [\"mchef\", \"tlr\", \"mchef\"]\n favoritesRecipeType = \"favoritesRecipeType\",\t\t// [\"Lunch\", \"Snack\", \"Dinner\"]\n favoritesShowChannel = \"favoritesShowChannel\",\t\t// [\"TEN\"]\n favoritesShowGenre = \"favoritesShowGenre\",\t\t// [\"Comedy\"]\n favoritesShowGenreSecondary = \"favoritesShowGenreSecondary\",\t\t// [\"Panel,Light Entertainment\"]\n favoritesShowKey = \"favoritesShowKey\",\t\t// [\"gogg\"]\n favoritesShowName = \"favoritesShowName\",\t// [\"Have You Been Paying Attention?\"]\n favoritesShowProgramClassification = \"favoritesShowProgramClassification\",\t\t// [\"M\"]\n hubName = \"hubName\",\t\t// \"Kids Hub\"\n interactionCategory = \"interactionCategory\",\t// \"Carousel\"\n interactionName = \"interactionName\",\t\t// \"Enter Now\"\n interactionType = \"interactionType\",\t\t// \"Button Click\"\n interactionValue = \"interactionValue\",\t// \"5\"\n interactionValueArray = \"interactionValueArray\",\t// [Featured:shows:Reality:2:Australian Survivor, ...]\n memberId = \"memberId\",\n memberOzTamId = \"memberOzTamId\",\n memberAge = \"memberAge\",\t\t // \"48\"\n memberBirthMonth = \"memberBirthMonth\",\t// \"01\"\n memberBirthYear = \"memberBirthYear\",\t\t// \"1970\"\n memberBirthDate = \"memberBirthDate\",\t\t// \"1970-01-01\"\n memberEmail = \"memberEmail\",\t\t // \"firstname.lastname@tealium.com\"\n memberEmailHashed = \"memberEmailHashed\",\t// memberEmailHashed = \"4c02dc4d631b6cef6ec7ad4bc5a5fb5a263ddc8b75a8da42c8b3797d7559444e\"\n memberFavoriteGenre = \"memberFavoriteGenre\",\t// \"Comedy\"\n memberGender = \"memberGender\",\t\t// \"Male\"\n memberLinkedSocialAccounts = \"memberLinkedSocialAccounts\",\t\t// [\"twitter\",\"google\"]\n memberLoginStatus = \"memberLoginStatus\",\t\t// \"logged-in\"\n n10adId=\"n10adId\", // c318e6c41...\n memberMobilePhone = \"memberMobilePhone\",\t\t// \"0400 000 000\"\n memberNameFirst = \"memberNameFirst\",\t\t// \"First\"\n memberNameLast = \"memberNameLast\",\t\t// \"Last\"\n memberPostcode = \"memberPostcode\",\t\t// \"2000\"\n memberState = \"memberState\",\t\t // \"New South Wales\"\n memberSuburb = \"memberSuburb\",\t\t// \"Sydney\"\n newsletterSubs = \"newsletterSubs\",\t\t// [\"All 10 Play Updates\", \"10 Play Trending\", \"Sports\"]\n notificationChannels = \"notificationChannels\",\t\t// [\"Email\", \"Push\"]\n pageContentFilter = \"pageContentFilter\",\t\t// Page Filter Value, eg. Populate,Channel 10,Genre,etc.\t\"Latest\"\n pageContentId = \"pageContentId\",\t\t// \"58987464635\"\n pageContentName = \"pageContentName\",\t\t// \"Win 20K Bathroom Makeover\"\n pageContentType = \"pageContentType\",\t\t// \"Article\"\n pageViewGuid = \"pageViewGuid\",\t\t// Page Identifier (Sitecore)\t\"9fec0651-59ac-4713-c33a-1b49753b46e4\"\n recipeAuthor = \"recipeAuthor\",\t\t// \"Gary Mehigan\"\n recipeCategory = \"recipeCategory\",\t\t// \"Indian\"\n recipeCollection = \"recipeCollection\",\t\t// \"Mystery Box\"\n recipeIngredients = \"recipeIngredients\",\t\t// [\"Avocado, Tuna, Yuzu\"]\n recipePublishDate = \"recipePublishDate\",\t\t// \"2018-11-11\"\n recipeRatingAverage = \"recipeRatingAverage\",\t\t// \"4.3 Stars\"\n recipeRatingVotes = \"recipeRatingVotes\",\t\t// \"506 Votes\"\n recipeServes = \"recipeServes\",\t// \"6 Serves\"\n recipeTags = \"recipeTags\",\t\t// [\"Food and Wine Guide\", \"Billy McKay - Contestant\", \"Chicken Stock\"]\n recipeTitle = \"recipeTitle\",\t\t// \"Tuna, Avocado and Yuzu\"\n searchResults = \"searchResults\",\t// [\"5 shows\",\"1157 videos\",\"66 galleries\",\"2265 recipes\",\"181 articles\"]\n searchTerm = \"searchTerm\",\t\t// \"masterchef\"\n shareChannel = \"channel\",\t// \"Facebook\"\n showChannel = \"showChannel\",\t\t// \"TEN\"\n showContentCategory = \"showContentCategory\",\t\t// \"article\"\n videoContentCategories = \"videoContentCategories\",\t\t// \"web-extras\"\n showContentFormatType = \"showContentFormatType\",\t// \"Short Form\"\n showContentId = \"showContentId\",\t\t// Concatenation of Show Key and Content Type\t\"stud:extra\"\n showContentName = \"showContentName\",\t\t// \"Episode 3\"\n showContentSeason = \"showContentSeason\",\t// \"Season 4\"\n showContentVideoId = \"showContentVideoId\",\t// \"6054169784001\"\n showContentVideoPlatform = \"showContentVideoPlatform\",\t// \"brightcove\"\n showContentVideoType = \"showContentVideoType\",\t// \"Full Episode\"\n showGenre = \"showGenre\",\t\t// [\"Comedy\"]\n showGenres = \"showGenres\",\t\t// [\"Comedy\",\"Panel\",\"Light Entertainment\"]\n showGenreSecondary = \"showGenreSecondary\",\t\t// [\"Panel\",\"Light Entertainment\"]\n showIsPriority = \"showIsPriority\",\t// \"true\"\n showKey = \"showKey\",\t\t // \"gogg\"\n showName = \"showName\",\t\t// \"Have You Been Paying Attention?\"\n showNameTargeting = \"showNameTargeting\",\t\t// \"Have You Been Paying Attention?\"\n showProgramClassification = \"showProgramClassification\",\t\t// \"M\"\n siteDomain = \"siteDomain\",\t\t// \"10play.com.au\"\n siteName = \"siteName\",\t\t// \"10play\"\n siteSection = \"siteSection\",\t\t// \"Shows\"\n siteSubSection1 = \"siteSubSection1\",\t\t// \"the-bachelorette\"\n siteSubSection2 = \"siteSubSection2\",\t\t// \"extra\"\n siteSubSection3 = \"siteSubSection3\",\t\t// \"season-4\"\n siteSubSection4 = \"siteSubSection4\",\t\t// \"the-bachelorette-unpacked-episode-11\"\n siteSubSection5 = \"siteSubSection5\",\t\t// \"1258746697\"\n tealium_event = \"tealium_event\", // \"live_tv_view\"\n tealium_visitor_id = \"tealium_visitor_id\", // \"0186966ec997005d4d343aefdd9c05075001a06d00bd0\"\n tealium_session_id = \"tealium_session_id\",\t// \"1678314877014\"\n tealium_timestamp_utc = \"tealium_timestamp_utc\", // \"2023-03-08T22:34:41.600Z\"\n timestamp_unix = \"timestamp_unix\", // 1678314881\n deviceModelId = \"deviceModelId\", \n visitorIdGoogle = \"visitorIdGoogle\",\t\t// \"755084999.1539054776\"\n visitorNewRepeat = \"visitorNewRepeat\",\t// \"Repeat\"\n SignUpLeadSource = \"SignUpLeadSource\", // \"nav/video/competition/activate\"\n SignUpLeadPage = \"SignUpLeadPage\", // \"homepage ( Page Name which users clicks on the signup from)\"\n SignUpLeadShow = \"SignUpLeadShow\", // \"masterchef ( optional: If they sign up from the video, then pass the associated show into this section)\"\n deviceIdAdobe = \"deviceIdAdobe\",\t// \"71034372000069852993169212641566210749\"\n pageName = \"pageName\",\t// \"10play/home\"\n timeOfDay = \"timeOfDay\",\t// \"Midday\"\n carouselName = \"carouselName\", //Shows You Can't Miss, _ccat in Tealium eCommerce extension \n carouselPosition = \"carouselPosition\", // 1, _csku in Tealium eCommerce extension\n contentType = \"contentType\", // \"Short Form\" _ccat2 in Tealium eCommerce extension\n genre = \"genre\", // [\"Comedy\"] _cbrand in Tealium eCommerce extension\n ctaButton = \"ctaButton\", // \"Slider\"\n carouselType = \"carouselType\", // \"marquee\"\n cardsTotal = \"cardsTotal\", // \"5\"\n cardPosition = \"cardPosition\", // \"3\"\n carouselCta = \"carouselCta\", // \"Sneak Peek\"\n playbackTypeCta = \"playbackTypeCta\" // \"Short Form\"\n}\n\nexport interface iUtag {\n [eUtag.articleAuthor]: string\t\t// \"Studio 10\"\n [eUtag.articleId]: string\t\t // \"1234567890\"\n [eUtag.articlePublishDate]: string\t\t// \"2018-12-23\"\n [eUtag.articleTags]: Array\t\t // [\"Celebrities\", \"Jungle\", \"Africa\"]\n [eUtag.articleTitle]: string\t\t// \"8 Most Memorable Tucker Trials\"\n [eUtag.competitionClosure]: string\t\t// \"5 days\"\n [eUtag.competitionName]: string\t\t// \"20k Dream Bathroom Renovation\"\n [eUtag.deviceType]: string\t\t // \"desktop\"\n [eUtag.favoritesRecipeCuisine]: Array\t\t// [\"Indian\", \"Asian\", \"Asian\"]\n [eUtag.favoritesRecipeShow]: Array\t\t// [\"mchef\", \"tlr\", \"mchef\"]\n [eUtag.favoritesRecipeType]: Array\t\t// [\"Lunch\", \"Snack\", \"Dinner\"]\n [eUtag.favoritesShowChannel]: Array\t\t// [\"TEN\"]\n [eUtag.favoritesShowGenre]: Array\t\t// [\"Comedy\"]\n [eUtag.favoritesShowGenreSecondary]: Array\t\t// [\"Panel,Light Entertainment\"]\n [eUtag.favoritesShowKey]: Array\t\t// [\"gogg\"]\n [eUtag.favoritesShowName]: Array\t// [\"Have You Been Paying Attention?\"]\n [eUtag.favoritesShowProgramClassification]: Array\t\t// [\"M\"]\n [eUtag.hubName]: string\t\t// \"Kids Hub\"\n [eUtag.interactionCategory]: string\t// \"Carousel\"\n [eUtag.interactionName]: string\t\t// \"Enter Now\"\n [eUtag.interactionType]: string\t\t// \"Button Click\"\n [eUtag.interactionValue]: string\t// \"5\"\n [eUtag.interactionValueArray]: Array\t// [Featured:shows:Reality:2:Australian Survivor, ...]\n [eUtag.memberAge]: string\t\t // \"48\"\n [eUtag.memberBirthMonth]: string\t// \"01\"\n [eUtag.memberBirthYear]: string\t\t// \"1970\"\n [eUtag.memberBirthDate]: string\t\t// \"1970-01-01\"\n [eUtag.memberEmail]: string\t\t // \"firstname.lastname@tealium.com\"\n [eUtag.memberEmailHashed]: string\t// memberEmailHashed: \"4c02dc4d631b6cef6ec7ad4bc5a5fb5a263ddc8b75a8da42c8b3797d7559444e\"\n [eUtag.memberFavoriteGenre]: string\t// \"Comedy\"\n [eUtag.memberGender]: string // \"Male\"\n [eUtag.memberId]: string // \"F8F59416717B02809EF40ED7D210A79A5C12441BE4F9DABA25D1D91C070FB643\"\n [eUtag.n10adId]: string // \"c318e6c41b88a6e8220760d542e2f635019817fe90a073b7a05b1c1d613a67df\"\n [eUtag.memberLinkedSocialAccounts]: Array\t\t// [\"twitter\",\"google\"]\n [eUtag.memberLoginStatus]: string\t\t// \"logged-in\"\n [eUtag.memberOzTamId]: string\n [eUtag.memberMobilePhone]: string\t\t// \"0400 000 000\"\n [eUtag.memberNameFirst]: string\t\t// \"First\"\n [eUtag.memberNameLast]: string\t\t// \"Last\"\n [eUtag.memberPostcode]: string\t\t// \"2000\"\n [eUtag.memberState]: string\t\t // \"New South Wales\"\n [eUtag.memberSuburb]: string\t\t// \"Sydney\"\n [eUtag.newsletterSubs]: Array\t\t// [\"All 10 Play Updates\", \"10 Play Trending\", \"Sports\"]\n [eUtag.notificationChannels]: Array\t\t// [\"Email\", \"Push\"]\n [eUtag.pageContentFilter]: string\t\t// Page Filter Value, eg. Populate,Channel 10,Genre,etc.\t\"Latest\"\n [eUtag.pageContentId]: string\t\t// \"58987464635\"\n [eUtag.pageContentName]: string\t\t// \"Win 20K Bathroom Makeover\"\n [eUtag.pageContentType]: string\t\t// \"Article\"\n [eUtag.pageViewGuid]: string\t\t// Page Identifier (Sitecore)\t\"9fec0651-59ac-4713-c33a-1b49753b46e4\"\n [eUtag.recipeAuthor]: string\t\t// \"Gary Mehigan\"\n [eUtag.recipeCategory]: string\t\t// \"Indian\"\n [eUtag.recipeCollection]: string\t\t// \"Mystery Box\"\n [eUtag.recipeIngredients]: Array\t\t// [\"Avocado, Tuna, Yuzu\"]\n [eUtag.recipePublishDate]: string\t\t// \"2018-11-11\"\n [eUtag.recipeRatingAverage]: string\t\t// \"4.3 Stars\"\n [eUtag.recipeRatingVotes]: string\t\t// \"506 Votes\"\n [eUtag.recipeServes]: string\t// \"6 Serves\"\n [eUtag.recipeTags]: Array\t\t// [\"Food and Wine Guide\", \"Billy McKay - Contestant\", \"Chicken Stock\"]\n [eUtag.recipeTitle]: string\t\t// \"Tuna, Avocado and Yuzu\"\n [eUtag.searchResults]: Array\t// [\"5 shows\",\"1157 videos\",\"66 galleries\",\"2265 recipes\",\"181 articles\"]\n [eUtag.searchTerm]: string\t\t// \"masterchef\"\n [eUtag.shareChannel]: string\t// \"Facebook\"\n [eUtag.showChannel]: string\t\t// \"TEN\"\n [eUtag.showContentCategory]: string\t\t// \"article\"\n [eUtag.videoContentCategories]: Array\t\t// \"web-extras\"\n [eUtag.showContentFormatType]: string\t// \"Short Form\"\n [eUtag.showContentId]: string\t\t// Concatenation of Show Key and Content Type\t\"stud:extra\"\n [eUtag.showContentName]: string\t\t// \"Episode 3\"\n [eUtag.showContentSeason]: string\t// \"Season 4\"\n [eUtag.showContentVideoId]: string\t// \"6054169784001\"\n [eUtag.showContentVideoPlatform]: string\t// \"Brightcove\"\n [eUtag.showContentVideoType]: string\t// \"Full Episode\"\n [eUtag.showGenre]: Array\t\t// [\"Comedy\"]\n [eUtag.showGenres]: Array\t\t// [\"Comedy\",\"Panel\",\"Light Entertainment\"]\n [eUtag.showGenreSecondary]: Array\t\t// [\"Panel\",\"Light Entertainment\"]\n [eUtag.showIsPriority]: string\t// \"true\"\n [eUtag.showKey]: string\t\t // \"gogg\"\n [eUtag.showName]: string\t\t// \"Have You Been Paying Attention?\"\n [eUtag.showNameTargeting]: string\t\t// \"Have You Been Paying Attention?\"\n [eUtag.showProgramClassification]: string\t\t// \"M\"\n [eUtag.siteDomain]: string\t\t// \"10play.com.au\"\n [eUtag.siteName]: string\t\t// \"10play\"\n [eUtag.siteSection]: string\t\t// \"Shows\"\n [eUtag.siteSubSection1]: string\t\t// \"the-bachelorette\"\n [eUtag.siteSubSection2]: string\t\t// \"extra\"\n [eUtag.siteSubSection3]: string\t\t// \"season-4\"\n [eUtag.siteSubSection4]: string\t\t// \"the-bachelorette-unpacked-episode-11\"\n [eUtag.siteSubSection5]: string\t\t// \"1258746697\"\n [eUtag.tealium_event]: string\t\t// \"home_view\"\n [eUtag.tealium_visitor_id]: string, // \"0186966ec997005d4d343aefdd9c05075001a06d00bd0\"\n [eUtag.tealium_session_id]: string,\t// \"1678314877014\"\n [eUtag.tealium_timestamp_utc]: string, // \"2023-03-08T22:34:41.600Z\"\n [eUtag.timestamp_unix]: string, // 1678314881\n [eUtag.deviceModelId]: string, \n [eUtag.visitorIdGoogle]: string\t\t// \"755084999.1539054776\"\n [eUtag.visitorNewRepeat]: string\t// \"Repeat\"\n [eUtag.SignUpLeadSource]: string // \"nav/video/competition/activate\"\n [eUtag.SignUpLeadPage]: string // \"homepage ( Page Name which users clicks on the signup from)\"\n [eUtag.SignUpLeadShow]: string // \"masterchef ( optional: If they sign up from the video, then pass the associated show into this section)\"\n [eUtag.deviceIdAdobe]: string\t// \"21fy2ap3-411f-45f5-99ea-0daae7f4f0f0\"\n [eUtag.pageName]: string\t// \"URL of page/screen the customer is on\"\n [eUtag.timeOfDay]: string\t// \"midday\"\n [eUtag.carouselName]: string\t//Shows You Can't Miss\"\n [eUtag.carouselPosition]: string\t// \"1\"\n [eUtag.contentType]: string\t// \"Short Form\"\n [eUtag.genre]: Array\t// ctaButton = \"ctaButton\", // \"Slider\"\n [eUtag.carouselType]: string // \"marquee\"\n [eUtag.cardsTotal]: string // \"5\"\n [eUtag.cardPosition]: string // \"3\"\n [eUtag.carouselCta]: string // \"Sneak Peek\"\n [eUtag.playbackTypeCta]: string // \"Short Form\"[\"Comedy\"]\n track: (type, data)=> void\n}\n","import {deviceType} from \"../@util/device\";\n/**\n * this method depends on the script tag in header of all pages.\n * script src is \"https://assets.adobedtm.com/1277ee49733590b64e2ee25a215a72fed5785f40/satelliteLib-54c8c30a2eca828e741b0ff3bc09e58cecbd8bd5.js\"\n * return true if enabled, return false if disabled, return undefined if do not have enough info to validate\n * @returns {boolean | undefined}\n */\nexport function enabledTrackingProtection(): boolean {\n return true;\n /*\n const headerScripts: HTMLScriptElement[] = document.querySelectorAll(\"head > script\") as any;\n\n let hasSatelliteLibScript;\n for (const script of headerScripts) {\n if (script.src.indexOf(\"satelliteLib\")) {\n hasSatelliteLibScript = true;\n break;\n }\n }\n\n if (hasSatelliteLibScript) {\n return !(window as any)._satellite;\n } else {\n return undefined;\n }\n */\n}\n\ninterface ISafariFilter {\n ios?: boolean;\n iphone?: boolean;\n ipad?: boolean;\n desktop?: boolean;\n}\nfunction getIOSVersion(userAgent) {\n const matchResult = /CPU [a-zA-Z ]{0,}OS ([0-9]{1,})/.exec(userAgent);\n if (matchResult && matchResult.length > 1) {\n return parseInt(matchResult[1], 10) || -1;\n } else {\n return -1;\n }\n}\n/**\n * If it is iOS/MacOS safari/chrome which matches filter option (one option each time), return the IOS version number\n * @param filter\n * @returns {number}\n */\nexport function isMacWebkitBrowser(filter: ISafariFilter): number {\n const userAgent = window.navigator.userAgent;\n const isIOSWebkitBrowser = userAgent.indexOf(\"like Mac OS X\") >= 0;\n\n if (filter.ios) {\n if (isIOSWebkitBrowser) {\n return getIOSVersion(userAgent);\n }\n }\n if (filter.iphone) {\n if (isIOSWebkitBrowser && userAgent.indexOf(\"iPhone\") >= 0) {\n return getIOSVersion(userAgent);\n }\n }\n if (filter.ipad) {\n if (isIOSWebkitBrowser && userAgent.indexOf(\"iPad\") >= 0) {\n return getIOSVersion(userAgent);\n }\n }\n if (filter.desktop) {\n const matchResult = /Mac OS X ([0-9]{1,})/.exec(userAgent);\n if (matchResult && matchResult.length > 1) {\n return parseInt(matchResult[1], 10) || -1;\n }\n }\n\n return -1;\n}\n\n\nexport function requireScript(url, callback)\n{\n var e = document.createElement(\"script\");\n e.src = url;\n e.type=\"text/javascript\";\n e.addEventListener('load', callback);\n document.getElementsByTagName(\"head\")[0].appendChild(e);\n}\n\nexport function isFlashPlayerEnabled(): boolean {\n if (typeof window === \"undefined\") {\n return true;\n }\n let navigator = (window as any).navigator;\n if (navigator.mimeTypes\n && navigator.mimeTypes['application/x-shockwave-flash'] != undefined\n && navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) {\n return true;\n } else {\n try {\n new ActiveXObject('ShockwaveFlash.ShockwaveFlash');\n return true;\n } catch (e) {\n return false;\n }\n }\n}\n\nexport function generateUUID() {\n let d = new Date().getTime();\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n let r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c == 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n}\n\nexport function gup(name) {\n if (typeof window === \"undefined\") {\n return \"\";\n }\n\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n let regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\n let regex = new RegExp(regexS);\n let results = regex.exec(window.location.href);\n return (results === null) ? \"\" : results[1];\n}\n\nexport const urlUtil = (function () {\n if (typeof window === \"undefined\") {\n return {\n kv: {},\n keys: [],\n };\n }\n\n let params: { [key: string]: string } = {};\n let paramKeys = [];\n if (location.search) {\n let paramStr = location.search;\n if (paramStr[0] === \"?\") {\n paramStr = paramStr.substr(1);\n }\n let paramArray = paramStr.split(\"&\");\n for (let i = 0; i < paramArray.length; i++) {\n let kv = paramArray[i].split(\"=\");\n if (kv.length === 2) {\n params[kv[0]] = kv[1];\n paramKeys.push(kv[0]);\n }\n }\n }\n\n return {\n kv: params,\n keys: paramKeys\n }\n})();\n\nexport const getOffsetTop = (element) => {\n if (!element || !element.nodeName || element.nodeName.toLowerCase() === \"body\") {\n return 0;\n } else {\n return element.offsetTop + getOffsetTop(element.offsetParent)\n }\n};\nexport const lazyCallback = (\n slotElement: HTMLElement,\n events: Array,\n pixelOffset: number,\n callback: () => void\n) => {\n events.forEach((event) => {\n let callbackWrapper = () => {\n for (let i = 0; i < events.length; i++) {\n window.removeEventListener(events[i], eventCallback, false);\n }\n callback();\n };\n\n let eventCallback = () => {\n let windowScrollTop = window.pageYOffset || window.scrollY;\n let windowScrollBottom = window.innerHeight + windowScrollTop;\n let slotOffsetTop = getOffsetTop(slotElement);\n let slotOffsetBottom = getOffsetTop(slotElement) + slotElement.clientHeight;\n if (windowScrollTop < 0) {\n callbackWrapper();\n } else {\n if (slotOffsetTop > (windowScrollTop - pixelOffset) && slotOffsetTop < windowScrollBottom) {\n callbackWrapper();\n }\n if (slotOffsetBottom < (windowScrollBottom + pixelOffset) && slotOffsetBottom > windowScrollTop) {\n callbackWrapper();\n }\n }\n };\n\n window.addEventListener(event, eventCallback, false);\n })\n};\n\nexport const cookies = {\n /**\n *\n * @param name\n * @param paths\n */\n expireAllCookies: function (name, paths) {\n let expires = new Date(0).toUTCString();\n\n // expire null-path cookies as well\n document.cookie = name + '=; expires=' + expires;\n\n for (let i = 0, l = paths.length; i < l; i++) {\n document.cookie = name + '=; path=' + paths[i] + '; expires=' + expires;\n }\n },\n /**\n *\n * @param name\n */\n deleteCookie: function (name) {\n this.setCookie(name, '', -1);\n },\n /**\n *\n * @param name\n * @returns {*}\n */\n getCookie: function (name) {\n let reg = new RegExp('(?:^|; )' + encodeURIComponent(name) + '=([^;]*)', \"i\");\n let matches = document.cookie.match(reg);\n if (matches && matches.length > 1) {\n return matches[1];\n } else {\n return undefined;\n }\n },\n /**\n *\n * @param name\n * @param value\n * @param time\n */\n setCookie: function (name, value, time?) {\n let date = new Date();\n let expires;\n if (typeof value === \"object\") {\n value = JSON.stringify(value);\n }\n if (time) {\n if (typeof time === \"number\" || time.days) {\n date.setTime(date.getTime() + (time * 24 * 60 * 60 * 1000));\n } else if (time.hours) {\n date.setTime(date.getTime() + (time.hours * 60 * 60 * 1000));\n } else if (time.mins) {\n date.setTime(date.getTime() + (time.mins * 60 * 1000));\n } else if (time.seconds) {\n date.setTime(date.getTime() + (time.seconds * 1000));\n }\n expires = \"; expires=\" + date.toUTCString();\n } else {\n expires = \"\";\n }\n document.cookie = name + \"=\" + value + expires + \"; path=/\";\n }\n};\n\nexport const storages = {\n getJSONFromLocalStorage: function (key: string) {\n if (typeof window === \"undefined\") {\n return;\n }\n\n let storageData = (window as any).localStorage.getItem(key);\n if (!storageData) {\n return undefined;\n }\n\n try {\n return JSON.parse(storageData);\n } catch (e) {\n return undefined;\n }\n },\n setJSONToLocalStorage: function (key: string, data: any) {\n if (typeof window === \"undefined\") {\n return;\n }\n\n let stringifyData;\n if (data === undefined || data === null) {\n stringifyData = \"\";\n } else {\n stringifyData = JSON.stringify(data)\n }\n\n (window as any).localStorage.setItem(key, stringifyData);\n }\n};\n\nexport class Log {\n static debugConfig = (function () {\n if (typeof window === \"undefined\") {\n return {};\n } else {\n (window as any).tenDebug = (window as any).tenDebug || {};\n return (window as any).tenDebug;\n }\n })();\n static debugUrlParam = typeof gup(\"debug\") === \"string\" ? gup(\"debug\").split(\",\") : [];\n protected serviceName;\n\n constructor(debugServiceName) {\n this.serviceName = debugServiceName;\n }\n\n public get debug() {\n let serviceName = this.serviceName;\n return [true, false].indexOf(Log.debugConfig[serviceName]) > -1 ?\n Log.debugConfig[serviceName] : Log.debugUrlParam.indexOf(serviceName) > -1;\n }\n\n public set debug(ignoreBoolean) {\n }\n\n private formatOutputArgs(args) {\n let arrArgs = this.convertArgumentToArray(args);\n return [this.serviceName].concat(arrArgs);\n }\n\n private convertArgumentToArray(args) {\n let arr = [];\n for (let i = 0; i < args.length; i++) {\n if (typeof args[i] === \"function\") {\n args[i] = args[i]();\n }\n arr.push(args[i]);\n }\n\n return arr;\n }\n\n /**\n * when enabled debug, logging info only visible to developer\n * @param args\n */\n log(...args) {\n if (typeof window !== \"undefined\" && this.debug) {\n console.log.apply(window, this.formatOutputArgs(arguments));\n }\n }\n\n warn(...args) {\n if (typeof window !== \"undefined\" && this.debug) {\n console.warn.apply(window, this.formatOutputArgs(arguments));\n }\n }\n\n /**\n * when enabled debug, only visible to developer\n * @param args\n */\n logCatch(...args) {\n if (typeof window !== \"undefined\" && this.debug) {\n console.error.apply(window, this.formatOutputArgs(arguments));\n }\n }\n\n /**\n * general console error\n * @param args\n */\n error(...args) {\n if (typeof window !== \"undefined\") {\n console.error.apply(window, this.formatOutputArgs(arguments));\n }\n }\n}\n\nexport class Interval_Log extends Log {\n protected intervalStock: Array = [];\n\n constructor(debugServiceName) {\n super(debugServiceName);\n }\n\n protected addInterval(intervalId: number) {\n this.intervalStock.push(intervalId);\n }\n\n protected clearInterval(index?: number) {\n if (index === -1) {\n return;\n } else if (index > -1) {\n clearInterval(this.intervalStock[index]);\n this.intervalStock.splice(index, 1);\n } else {\n for (let i = this.intervalStock.length - 1; i > -1; i--) {\n clearInterval(this.intervalStock[i]);\n this.intervalStock.splice(i, 1);\n }\n }\n }\n}\n\nlet clientWidth, clientHeight;\n\nif (typeof window !== \"undefined\" && document) {\n clientWidth = document.documentElement.clientWidth;\n clientHeight = document.documentElement.clientHeight;\n}\n\nexport const documentClientWidth = clientWidth;\nexport const documentClientHeight = clientHeight;\n\nexport const isMobile = deviceType === \"mobile\";\nexport const isTablet = deviceType === \"tablet\";\nexport const isDesktop = deviceType === \"desktop\";\n\nexport const isMobileWidth = documentClientWidth < 768;\nexport const isTabletWidth = documentClientWidth >= 768 && documentClientWidth < 1024;\nexport const isDesktopWidth = documentClientWidth >= 1024;","export function resolve(path: string, object?: Object) {\n object = object || (this && typeof this === \"object\" && this.resolve === resolve ? self : this);\n\n return path.split('.').reduce(function (prev, curr) {\n return prev ? prev[curr] : undefined\n }, object);\n}\n\n/**\n * isArray([\"a\", \"b\"]) // true\n * isArray([\"a\", \"b\"], String) // true\n * isArray([\"a\", null], String) // false\n * isArray([\"a\", null], String, true) // true - ignore checking null, undefined, isNaN\n * @param {Array} array\n * @param constructor\n * @param {boolean} ignoreUNN\n * @returns {boolean}\n */\nexport function isArray(array: Array, constructor?: any, ignoreUNN?: boolean) {\n if (!array || typeof array !== \"object\" || array.constructor !== Array) {\n return false;\n } else {\n if (constructor) {\n for (let i = 0; i < array.length; i++) {\n if (!ignoreUNN) {\n if (array[i] === undefined || array[i] === null || isNaN(array[i])) {\n return false;\n }\n }\n if (array[i].constructor !== constructor) {\n return false;\n }\n }\n } else {\n return true;\n }\n }\n}\n\nexport function isNumberString(string: string) {\n return /^[0-9]+$/.test(string);\n}\n\nexport function isLetterString(string: string) {\n return string !== undefined && string !== null && /^[a-zA-Z]+$/.test(string);\n}\n\nfunction _add(copy, key, value) {\n if (copy instanceof Array) {\n copy.push(value)\n return copy[copy.length - 1]\n }\n else if (copy instanceof Object) {\n copy[key] = value\n return copy[key]\n }\n}\n\nfunction _process(target, copy) {\n let keys = Object.keys(target);\n for (let i = 0; i < keys.length; i++) {\n let key = keys[i];\n let obj = target[key];\n if (obj instanceof Date) {\n _add(copy, key, new Date(obj.getTime()))\n }\n else if (obj instanceof Function) {\n _add(copy, key, obj)\n }\n else if (obj instanceof Array) {\n let last = _add(copy, key, []);\n _process(obj, last)\n }\n else if (obj instanceof Object) {\n let last = _add(copy, key, {});\n _process(obj, last)\n }\n else {\n _add(copy, key, obj)\n }\n }\n}\n\nexport function deepCopy(source): any {\n if (/number|string|boolean/.test(typeof source)) {\n return source\n }\n if (source instanceof Date) {\n return new Date(source.getTime())\n }\n\n let copy = (source instanceof Array) ? [] : {};\n _process(source, copy);\n return copy;\n\n /* https://github.com/simov/deep-copy/blob/master/index.js modified*/\n}\n\n\nexport function UUID_v4() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }\n\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n}\n\nexport interface iRestParam {\n method: \"POST\" | \"GET\",\n url: string,\n headers: { [header: string]: string },\n successCallback?,\n failCallback?,\n isAsync?: boolean,\n data?: any\n}\nexport function rest(param: iRestParam) {\n let request = new XMLHttpRequest();\n request.open(param.method, param.url);\n let headerNames = Object.keys(param.headers);\n for (let i = 0; i < headerNames.length; i++) {\n let headerName = headerNames[i];\n request.setRequestHeader(headerName, param.headers[headerName]);\n }\n\n if (param.successCallback) {\n request.onreadystatechange = function() {\n if (request.readyState !== 4 || request.status !== 200) {\n return;\n }\n\n try {\n param.successCallback(request.responseText);\n } catch (e) {\n param.failCallback && param.failCallback(e);\n }\n }\n }\n if (param.failCallback) {\n request.onerror = param.failCallback;\n }\n\n request.send(param.method.toLowerCase() === \"post\" && param.data)\n}","import {iVideoAdConfig, VideoAd} from \"./video\";\nimport {iAdSlotConfig, iStaticAdConfig} from \"./static.type\";\nimport {StaticAd} from \"./static\";\n\nexport interface iAdsServiceConfig {\n companionAds?: {\n enabled: boolean,\n adSizes: Array<[number, number] | string>,\n },\n staticAdConfig: iStaticAdConfig,\n videoAdConfig: iVideoAdConfig\n}\n\nexport class AdManager {\n private adsServiceConfig: iAdsServiceConfig;\n private staticAd: StaticAd;\n private videoAd: VideoAd;\n\n constructor(adConfig: iAdsServiceConfig, init?: boolean) {\n this.adsServiceConfig = adConfig;\n adConfig.companionAds = {\n enabled: !!adConfig.companionAds && !!adConfig.companionAds.enabled,\n adSizes: adConfig.companionAds && Array.isArray(adConfig.companionAds.adSizes) ? adConfig.companionAds.adSizes : [],\n };\n adConfig.staticAdConfig.companionAds =\n adConfig.videoAdConfig.companionAds =\n adConfig.companionAds;\n init && this.init();\n }\n\n init() {\n this.initStaticAd();\n this.initVideoAd();\n }\n\n initStaticAd() {\n this.staticAd =\n this.adsServiceConfig.staticAdConfig &&\n !this.adsServiceConfig.staticAdConfig.hideAds ?\n new StaticAd(this.adsServiceConfig.staticAdConfig) : undefined;\n }\n\n initVideoAd() {\n this.videoAd = this.adsServiceConfig.videoAdConfig ?\n new VideoAd(this.adsServiceConfig.videoAdConfig) : undefined;\n }\n\n\n /**\n * static ad API\n */\n get couldDisplayAd() {\n return this.staticAd.inited;\n }\n\n public getSlotConfig(adSlotId: string) {\n return this.staticAd && this.staticAd.getSlotConfig(adSlotId);\n }\n\n // USAGE: for inserting single new ad\n // STEPS:\n // register ad slot;\n // build ad container;\n // load & display ad\n public insertStaticAd(adSlotConfig: iAdSlotConfig) {\n this.staticAd && this.staticAd.registerAdSlot(adSlotConfig);\n this.staticAd && this.staticAd.renderAdSlot(adSlotConfig.elementId);\n }\n\n // same slot, same element, same slot content elements\n public refreshStaticAd(adSlotId: string) {\n this.staticAd && this.staticAd.refreshAdSlot(adSlotId);\n }\n\n // same slot, same element, different slot content elements\n public reloadStaticAd(adSlotId: string) {\n this.staticAd && this.staticAd.reloadAdSlot(adSlotId);\n }\n\n // different slot, different element and surely different slot content elements\n public reinitStaticAd(adSlotId: string) {\n this.staticAd && this.staticAd.reinitAdSlot(adSlotId);\n }\n\n\n public syncStaticAdParams() {\n this.staticAd && this.staticAd.syncAdParams();\n }\n\n // USAGE: for hard reloading all ads (in case of page url change that major page content changed)\n // STEPS:\n // init setting of static ads\n // process ad slot configs, rules, key value param pairs\n // register ad slots;\n // build ads container;\n // load & display ads\n //\n public pageSwitchRefresh() {\n this.staticAd && this.staticAd.pageSwitchRefresh();\n }\n\n public renderAdSlots() {\n this.staticAd.renderAdSlots();\n }\n\n /**\n * video ad API\n */\n public formatIMAServerUrl(videoId): string {\n if (!this.videoAd) {\n return \"\";\n }\n return this.videoAd.formatIMAServerUrl(videoId);\n }\n}\n","import { env } from \"../pkgAviaAllocator/tracking.env\";\n\nexport interface AppInfo {\n webhost: string; // Required for desktop and mobile web\n googledai: number;\n region: string; // Required for non-US domestic properties\n coppa: number; // Required\n}\n\nexport interface DeviceInfo {\n lat: number;\n ip: string;\n ua: string;\n}\n\nexport interface Identifiers {\n userid?: string;\n ifa?: string; // Optional, include if available\n ifatype?: string; // Optional, include if available\n emailhash?: string; // Optional, include if available\n subscriberid?: string; // Optional, include if available\n}\n\nexport interface IMSResponse {\n fms_id_ttl: number;\n fms_params: Record;\n}\n\ninterface FallbackParams {\n imafw__fw_vcid2: string;\n imafw_fms_emailhash?: string;\n imafw_fms_vcid2type: string;\n}\n\ninterface DefaultFMSResponse {\n timestamp: number;\n data: IMSResponse;\n}\n\nexport class IMSAPIIntegration {\n private baseURL: string;\n private cacheKey: string;\n private readonly COPPA_CACHE_KEY = 'coppa_status';\n\n constructor(baseURL: string) {\n this.baseURL = !env.isProduction() ? \"https://n10-proxy-fms.global.ssl.fastly.net/\" : baseURL;\n this.cacheKey = 'ims_response';\n }\n\n private cacheResponse(response: IMSResponse, ttl: number): void {\n const expiry = Date.now() + ttl * 1000;\n localStorage.setItem(this.cacheKey, JSON.stringify({ response, expiry }));\n }\n\n private getCachedResponse(): IMSResponse | null {\n const cachedData = localStorage.getItem(this.cacheKey);\n if (cachedData) {\n const parsedData = JSON.parse(cachedData);\n if (parsedData.expiry > Date.now()) {\n return parsedData.response;\n }\n localStorage.removeItem(this.cacheKey);\n }\n return null;\n }\n\n public invalidateCache(): void {\n localStorage.removeItem(this.cacheKey);\n }\n\n private isIosPlatform(): boolean {\n return /iPad|iPhone|iPod/.test(navigator.userAgent);\n }\n\n private generateFallbackParams(identifiers: Identifiers, appInfo: AppInfo): FallbackParams {\n this.logFreewheelDebug('Generating fallback params with identifiers:', identifiers);\n\n // Priority 4: COPPA = 1 case\n if (appInfo.coppa === 1) {\n return {\n imafw__fw_vcid2: identifiers.userid || this.getOrCreateUserId(),\n imafw_fms_vcid2type: 'userid'\n };\n }\n\n // Priority 1: Email hash for authenticated users\n if (identifiers.emailhash) {\n return {\n imafw__fw_vcid2: identifiers.emailhash,\n imafw_fms_vcid2type: 'emailhash',\n imafw_fms_emailhash: identifiers.emailhash\n };\n }\n // Priority 2 & 3: IFA/IDFV for supported devices\n // This is required for iOS devices only (IFA for iOS 14+ and IDFV for iOS 13 and below)\n\n // Fallback to generated user ID\n const userId = this.getOrCreateUserId();\n this.logFreewheelDebug('Using fallback user ID:', userId);\n \n return {\n imafw__fw_vcid2: userId,\n imafw_fms_vcid2type: 'userid'\n };\n }\n\n async fetchIMSData(appInfo: AppInfo, deviceInfo: DeviceInfo, identifiers: Identifiers): Promise {\n const cachedResponse = this.getCachedResponse();\n if (cachedResponse) {\n return cachedResponse;\n }\n\n const endpoint = `${this.baseURL}/lookup`;\n const payload = {\n app: appInfo,\n device: deviceInfo,\n identifiers: identifiers\n };\n\n try {\n const response = await fetch(endpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n\n if (!response.ok) {\n throw new Error(`Error: ${response.status} ${response.statusText}`);\n }\n\n const data: IMSResponse = await response.json();\n\n this.cacheResponse(data, data.fms_id_ttl || 172800); // Default to 2 days if not specified\n return data;\n } catch (error) {\n this.logFreewheelDebug('IMS request failed, using fallback params:', error);\n \n const fallbackResponse: DefaultFMSResponse = {\n timestamp: Date.now(),\n data: {\n fms_id_ttl: 43200, // 12 hours\n fms_params: this.generateFallbackParams(identifiers, appInfo)\n }\n };\n // No need to cache fallback response\n // Just in case if needed: this.cacheResponse(fallbackResponse.data, fallbackResponse.data.fms_id_ttl);\n return fallbackResponse.data;\n }\n }\n\n public async getIMSData(data: any): Promise {\n const currentCoppaStatus = this.getCachedCoppaStatus();\n if (currentCoppaStatus !== data.coppa) {\n this.updateCoppaStatus(data.coppa);\n }\n\n const appInfo: AppInfo = {\n webhost: '10play.com.au', // Required for desktop and mobile web\n googledai: 1,\n region: 'AU', // Required for non-US domestic properties\n coppa: data.coppa // 0 indicates adult-directed content, 1 indicates child-directed content\n };\n\n const userIp: string = data.userIp || '';\n\n const deviceInfo: DeviceInfo = {\n lat: 0,\n ip: userIp,\n ua: typeof window !== 'undefined' ? window.navigator.userAgent : ''\n };\n\n const rawIdentifiers: Identifiers = {\n userid: localStorage.getItem(\"tu_n10adId\") || '', // Required\n emailhash: localStorage.getItem(\"tu_memberEmailHashed\") || '', // Optional, include if available\n subscriberid: localStorage.getItem(\"tu_memberid\") || '' // Optional, include if available\n };\n\n // Filter out empty string properties\n const identifiers: Partial = this.removeEmptyStringProperties(rawIdentifiers);\n\n // Log the filtered identifiers to verify\n this.logFreewheelDebug('Filtered Identifiers:', identifiers);\n\n const response = await this.fetchIMSData(appInfo, deviceInfo, identifiers);\n return response;\n }\n\n private removeEmptyStringProperties>(obj: T): Partial {\n const result: Partial = {};\n for (const key in obj) {\n if (obj[key] !== '') {\n result[key] = obj[key];\n }\n }\n return result;\n }\n\n // Method to check if Freewheel debugging is enabled\n private isFreewheelDebugEnabled(): boolean {\n return localStorage.getItem('fwdebug') === 'true';\n }\n\n // Method to log Freewheel-related debug information\n public logFreewheelDebug(message: string, data?: any): void {\n if (this.isFreewheelDebugEnabled()) {\n console.log(`[Freewheel Debug] ${message}`, data);\n }\n }\n\n private getOrCreateUserId(): string {\n let userId = localStorage.getItem(\"tu_n10adId\");\n return userId;\n }\n\n private getCachedCoppaStatus(): number | null {\n const status = localStorage.getItem(this.COPPA_CACHE_KEY);\n return status ? parseInt(status, 10) : null;\n }\n\n private setCoppaStatus(status: number): void {\n localStorage.setItem(this.COPPA_CACHE_KEY, status.toString());\n }\n\n public updateCoppaStatus(status: number): void {\n const currentStatus = this.getCachedCoppaStatus();\n if (currentStatus !== status) {\n this.setCoppaStatus(status);\n this.invalidateCache();\n this.logFreewheelDebug('COPPA status updated, cache invalidated', { oldStatus: currentStatus, newStatus: status });\n }\n }\n}\n","/**\n * Util class used by ad config object from outside\n */\nexport class PagePathInfo {\n public level: number;\n public type: string;\n public clearEnding: boolean;\n public category;\n public section;\n public subSection;\n public pathFinal; // path value that overwrite pathRule's result\n\n public pathName: Array; // array of the whole pathname of URL\n public contentId: string; // last sub path of URL\n public show: string; // the last valid page section plus any thing after it in the URL\n\n constructor(type: string,\n pathName: string,\n pagePath?: Array,\n pageStructureMap?: any) {\n this.type = type; // seems not used anywhere\n this.getPathNameAsArray(pathName);\n this.getPathPattern(pagePath, pageStructureMap);\n this.getContentId();\n this.getShow();\n }\n\n private getPathNameAsArray(pathName: string) {\n if (typeof pathName !== \"string\") {\n pathName = \"/\";\n }\n if (pathName[0] !== \"/\") {\n pathName = \"/\" + pathName;\n }\n\n this.pathName = pathName.split(\"/\");\n }\n\n private getContentId() {\n if (this.clearEnding) {\n return;\n }\n\n let lastSubPath = this.pathName[this.pathName.length - 1];\n this.contentId = lastSubPath.replace(/[-_]/g, \"\");\n }\n\n private getPathPattern(pagePath, pageStructureMap) {\n if (pagePath && Array.isArray(pagePath)) {\n this.level = pagePath.length;\n\n switch (this.level) {\n case 3:\n this.subSection = pagePath[2];\n case 2:\n this.section = pagePath[1];\n case 1:\n this.category = pagePath[0];\n case 0:\n break;\n }\n this.clearEnding = !this.pathName[this.level + 1];\n return;\n }\n\n if (pageStructureMap && typeof pageStructureMap === \"object\") {\n let level = 0;\n let section: any = pageStructureMap;\n let reachTheEndOfMenu = false;\n\n while (!reachTheEndOfMenu) {\n let nextLevelName = this.pathName[level + 1];\n if (section.constructor === Object && section[nextLevelName]) {\n level++;\n section = section[nextLevelName];\n } else if (Array.isArray(section) && section.indexOf(nextLevelName) >= 0) {\n level++;\n reachTheEndOfMenu = true;\n } else {\n reachTheEndOfMenu = true;\n }\n }\n\n // validated level of sub path\n this.level = level;\n // clearEnding if no more sub path after identified level\n\n switch (this.level) {\n case 3:\n this.subSection = this.pathName[3];\n case 2:\n this.section = this.pathName[2];\n case 1:\n this.category = this.pathName[1];\n case 0:\n break;\n }\n\n this.clearEnding = !this.pathName[this.level + 1];\n return;\n }\n\n }\n\n private getShow() {\n this.show = this.pathName.slice(this.level, this.pathName.length).join(\"/\");\n }\n}","import {\n iStaticAdConfig,\n iStaticAdKeyValueObject,\n iStaticAdKeyValuePair,\n iStaticAdKeyValueRuleConfig\n} from \"./static.type\";\nimport {PagePathInfo} from \"./page.path.processor\";\n\n\n/**\n * Rule processor - ptype and keyvalue\n */\nexport class StaticAdRuleProcessor {\n public path: string;\n public ptype: string;\n public keyValueArray: Array;\n\n constructor(private account: string,\n private pagePathInfoFn: ()=> PagePathInfo,\n private pathRule: iStaticAdConfig[\"pathRule\"],\n private ptypeRule: iStaticAdConfig[\"ptypeRule\"],\n private keyValueRule: iStaticAdConfig[\"keyValueRule\"]) {\n const pagePathInfo = pagePathInfoFn();\n this.path = \"/\" + account + (new pathRuleRunner(pagePathInfo, pathRule)).path;\n this.ptype = (new ptypeRuleRunner(pagePathInfo, ptypeRule)).ptype;\n this.keyValueArray = (new keyValueRuleRunner(pagePathInfo, keyValueRule)).getArray();\n }\n\n public sync() {\n const pagePathInfo = this.pagePathInfoFn();\n this.path = \"/\" + this.account + (new pathRuleRunner(pagePathInfo, this.pathRule)).path;\n this.ptype = (new ptypeRuleRunner(pagePathInfo, this.ptypeRule)).ptype;\n this.keyValueArray = (new keyValueRuleRunner(pagePathInfo, this.keyValueRule)).getArray();\n }\n}\n\nclass pathRuleRunner {\n public path: string;\n\n constructor(private pagePathInfo: PagePathInfo,\n private pathRule: iStaticAdConfig[\"pathRule\"]) {\n this.path = \"\";\n\n if (pagePathInfo.pathFinal) {\n // final path is given, ignore pathRule\n this.path = pagePathInfo.pathFinal;\n } else {\n // by default get path value from pathRule\n for (let i = 0; i <= pagePathInfo.level; i++) {\n if (pathRule[i] && typeof pathRule[i] === \"function\") {\n this.path += pathRule[i](pagePathInfo);\n }\n }\n if (pagePathInfo.level === 0) {\n this.path += \"/home\";\n }\n }\n }\n}\n\nclass ptypeRuleRunner {\n public ptype: string;\n\n constructor(private pagePathInfo: PagePathInfo,\n private ptypeRule: iStaticAdConfig[\"ptypeRule\"]) {\n this.ptype = ptypeRule[pagePathInfo.level](pagePathInfo);\n }\n}\n\nclass keyValueRuleRunner {\n static runRule(keyValueObject: iStaticAdKeyValueObject,\n pagePathInfo: PagePathInfo,\n keyValueRule: iStaticAdKeyValueRuleConfig) {\n let A = keyValueRule.A_Range;\n let B = keyValueRule.B_Range;\n let C = keyValueRule.C_Range;\n\n // if anything defined in A,B and C, but does not match the item, then ignore running the rules\n if (A && A.length !== 0 && pagePathInfo.category && A.indexOf(pagePathInfo.category) === -1) {\n return;\n }\n if (B && B.length !== 0 && pagePathInfo.section && B.indexOf(pagePathInfo.section) === -1) {\n return;\n }\n if (C && C.length !== 0 && pagePathInfo.subSection && C.indexOf(pagePathInfo.subSection) === -1) {\n return;\n }\n\n for (let i = 0; i < keyValueRule.keyValueRules.length; i++) {\n let kv = keyValueRule.keyValueRules[i];\n let value = kv.v(pagePathInfo, A, B, C);\n\n if (value === undefined) {\n continue;\n }\n\n // finally the output should be an array\n if (typeof value === \"string\") {\n // todo - need to review what case we need to update by appending value instead of just replace as a new [];\n value = value.replace(/ /g, \"-\");\n if (Array.isArray(keyValueObject[kv.k])) {\n if (keyValueObject[kv.k].indexOf(value) === -1) {\n keyValueObject[kv.k].push(value);\n }\n } else {\n keyValueObject[kv.k] = [value];\n }\n } else if (Array.isArray(value)) {\n value = value.map((v) => {\n if (typeof v === \"string\") {\n v = v.replace(/ /g, \"-\");\n }\n return v;\n });\n keyValueObject[kv.k] = value;\n }\n\n\n }\n }\n\n public keyValueObject: iStaticAdKeyValueObject;\n\n constructor(private pagePathInfo: PagePathInfo,\n private keyValueRuleConfig: iStaticAdConfig[\"keyValueRule\"]) {\n this.keyValueObject = {};\n this.runRules();\n }\n\n public getArray() {\n let pairArray = [];\n let keys = Object.keys(this.keyValueObject);\n for (let i = 0; i < keys.length; i++) {\n pairArray.push({\n key: keys[i],\n value: this.keyValueObject[keys[i]].join(\",\")\n })\n }\n\n return pairArray;\n }\n\n private runRules() {\n for (let q = 0; q <= this.pagePathInfo.level; q++) {\n let keyValueRules = this.keyValueRuleConfig[q];\n\n if (!keyValueRules) {\n return;\n }\n\n for (let i = 0; i < keyValueRules.length; i++) {\n keyValueRuleRunner.runRule(\n this.keyValueObject,\n this.pagePathInfo,\n keyValueRules[i]\n )\n }\n }\n }\n}","import {lazyCallback, Log} from \"../ten/env.util\";\nimport {iAdSlot, iAdSlotConfig} from \"./static.type\";\nimport {googletagRequestDataValidate} from \"./util\";\nimport {eDebug_Title} from \"../ten/env.enum\";\n\n/**\n * Ad slot manager\n */\nexport class AdSlotManager extends Log {\n public slotElement: HTMLElement;\n public slotInstance: iAdSlot;\n public slotPos: string;\n // this is a copy of original slotId/elementId\n // it is used in static.ts when looking for adManager by slotId\n readonly slotId: string;\n public domId: string; // only available after used registerInfinite()\n public isAdFilled: boolean = false;\n public isAdLoadFailed: boolean = false;\n public isAdBlankSchedule: boolean = false;\n\n private stateIndicatorClass = [\"rendered\", \"visible\", \"blank_ad\"];\n private finalSize: Array;\n\n constructor(private path: string,\n public slotConfig: iAdSlotConfig,\n private companionAds: {\n enabled: boolean,\n adSizes: Array<[number, number] | string>,\n }) {\n super(eDebug_Title.adSlotManager);\n this.slotId = this.slotConfig.elementId;\n this.slotPos = this.slotConfig.pos;\n this.initiation();\n }\n\n private initiation() {\n this.registerDynamicSlot(); // only first time initiation make change in this method call\n this.slotElement = document.getElementById(this.slotConfig.elementId);\n this.cleanSlotElement();\n }\n\n private removeOverSizeAds() {\n let adSizes = this.finalSize;\n\n if (!this.slotElement || this.slotConfig.sizeAny) {\n return;\n }\n\n for (let i = adSizes.length - 1; i >= 0; i--) {\n let size = adSizes[i];\n if (size && Array.isArray(size) && size[0] > this.slotElement.clientWidth) {\n adSizes.splice(i, 1);\n }\n }\n }\n\n private pickOneSuitableAd() {\n let widthOfEachSize = this.finalSize.map((size) => {\n if (size && Array.isArray(size)) {\n return size[0];\n } else {\n return 0;\n }\n });\n let maxWidth = Math.max(...widthOfEachSize);\n\n // only keep the widest size\n for (let i = this.finalSize.length - 1; i >= 0; i--) {\n let size = this.finalSize[i];\n if (size && Array.isArray(size) && size[0] < maxWidth) {\n this.finalSize.splice(i, 1);\n }\n }\n }\n\n private directRegister() {\n if (!this.finalSize) {\n this.finalSize = this.slotConfig.size.slice();\n this.removeOverSizeAds();\n this.slotConfig.pickOne && this.pickOneSuitableAd();\n }\n this.registerProcess();\n }\n\n private registerInfinite() {\n return new Promise((resolve, reject) => {\n let googletag = (window as any).googletag;\n googletag.cmd.push(() => {\n this.slotInstance = googletag.defineSlot(\n this.path,\n this.finalSize\n );\n this.slotInstance.addService(googletag.pubads());\n this.slotInstance.setTargeting(\"pos\", googletagRequestDataValidate(this.slotConfig.pos));\n this.registerSlotTargeting();\n this.domId = this.slotInstance.getSlotElementId();\n\n resolve();\n });\n })\n }\n\n private registerProcess() {\n let googletag = (window as any).googletag;\n\n googletag.cmd.push(() => {\n // switch ad type\n switch (this.slotConfig.elementId) {\n // - outofpage -> path, divId, add service\n case \"outofpage\":\n case \"mobile_outofpage\":\n this.slotInstance = googletag.defineOutOfPageSlot(\n this.path,\n this.slotConfig.elementId\n )\n .addService(googletag.pubads());\n break;\n // - normal -> path, size array, divId, add service, set targeting\n default:\n this.slotInstance = googletag.defineSlot(\n this.path,\n this.finalSize,\n this.slotConfig.elementId\n );\n\n // if this final size includes any of the companion targed ads\n if (this.companionAds.enabled) {\n if (this.finalSize.filter(size => {\n return this.companionAds.adSizes.filter(companionSize => {\n if (Array.isArray(size) && Array.isArray(companionSize)) {\n return JSON.stringify(size) === JSON.stringify(companionSize);\n } else {\n return size === companionSize;\n }\n }).length > 0\n }).length > 0) {\n this.log(`companionAds ${this.slotConfig.elementId}`, true);\n this.slotInstance.addService(googletag.companionAds());\n } else {\n this.log(`companionAds ${this.slotConfig.elementId}`, false);\n }\n }\n this.slotInstance.addService(googletag.pubads());\n this.slotInstance.setTargeting(\"pos\", googletagRequestDataValidate(this.slotConfig.pos));\n break;\n\n }\n\n this.registerSlotTargeting();\n });\n }\n\n private registerSlotTargeting() {\n if (!this.slotConfig.kv) {\n return;\n }\n\n let k = Object.keys(this.slotConfig.kv);\n for (let i = 0; i < k.length; i++) {\n this.slotInstance.setTargeting(\n googletagRequestDataValidate(k[i]),\n googletagRequestDataValidate(this.slotConfig.kv[k[i]]));\n }\n }\n\n private registerDynamicSlot() {\n if (!this.slotConfig.insert || document.getElementById(this.slotConfig.elementId) !== null) {\n return;\n }\n\n let element;\n let elementSelector =\n this.slotConfig.insert.into ||\n this.slotConfig.insert.before ||\n this.slotConfig.insert.after;\n\n if (this.slotConfig.insert.nth) {\n element = document.querySelectorAll(elementSelector)[this.slotConfig.insert.nth - 1];\n if (element === undefined) {\n return;\n }\n } else {\n element = document.querySelector(elementSelector);\n if (element === null) {\n return;\n }\n }\n\n let adSlot = document.createElement(\"div\");\n adSlot.setAttribute(\"id\", this.slotConfig.elementId);\n adSlot.classList.add(\"tenads\");\n\n if (this.slotConfig.insert.into) {\n // todo this quick fix about \"disclaimer\" is for tenplay old site\n let advText = element.querySelector(\".disclaimer\");\n if (advText === null) {\n element.appendChild(adSlot);\n } else {\n advText.parentNode.insertBefore(adSlot, advText);\n }\n }\n\n if (this.slotConfig.insert.before) {\n element.parentNode.insertBefore(adSlot, element);\n }\n\n if (this.slotConfig.insert.after) {\n let afterSlotElement = element.nextSibling;\n if (afterSlotElement === null) {\n return;\n }\n\n element.parentNode.insertBefore(adSlot, afterSlotElement);\n }\n }\n\n\n private cleanSlotElement() {\n if (!this.slotElement) {\n return;\n }\n\n this.stateIndicatorClass.forEach((className) => {\n this.slotElement.classList.remove(className);\n });\n this.slotElement.setAttribute(\"style\", this.slotConfig.style || \"\");\n }\n\n private showSlotElement() {\n if (!this.slotElement) {\n return;\n }\n\n // slot which has been called \"showSlotElement\" method\n this.slotElement.classList.add(\"rendered\");\n\n let watchInterval = window.setInterval(() => {\n if (this.isAdLoadFailed || this.isAdBlankSchedule) {\n this.slotElement.classList.add(\"blank_ad\");\n window.clearInterval(watchInterval);\n this.log(`${this.slotConfig.elementId} ad is blank`);\n } else if (this.isAdFilled) {\n this.slotElement.classList.add(\"visible\");\n window.clearInterval(watchInterval);\n this.log(`${this.slotConfig.elementId} ad is filled, make it visible`);\n }\n }, 100);\n }\n\n\n public register() {\n if (!this.slotElement) {\n return;\n }\n\n if (!this.slotElement.classList.contains(\"rendered\")) {\n if (this.slotConfig.lazyload) {\n lazyCallback(\n this.slotElement,\n this.slotConfig.lazyload.events,\n this.slotConfig.lazyload.pixelOffset,\n () => {\n this.directRegister();\n this.displayAd();\n this.slotConfig.postloadCallback && this.slotConfig.postloadCallback();\n }\n )\n } else {\n this.directRegister();\n this.slotConfig.postloadCallback && this.slotConfig.postloadCallback();\n }\n }\n }\n\n public displayAd() {\n this.isAdFilled = false;\n this.isAdLoadFailed = false;\n this.isAdBlankSchedule = false;\n\n let googletag = (window as any).googletag;\n\n googletag.cmd.push(() => {\n this.slotConfig.preloadCallback && this.slotConfig.preloadCallback();\n googletag.display(this.slotConfig.elementId);\n this.showSlotElement();\n });\n }\n\n // same slot, same element, same slot content elements\n public refreshAd() {\n let googletag = (window as any).googletag;\n googletag.cmd.push(() => {\n this.slotConfig.preloadCallback && this.slotConfig.preloadCallback();\n googletag.pubads().refresh([this.slotInstance]);\n });\n }\n\n // same slot, same element, different slot content elements\n // show ads that has been reset by react component update process\n public reloadAd() {\n if (!this.slotElement) {\n return;\n }\n\n if (this.slotElement &&\n this.stateIndicatorClass.findIndex(\n className => this.slotElement.classList.contains(className)\n ) >= 0) {\n this.cleanSlotElement();\n this.registerDynamicSlot();\n this.displayAd();\n } else {\n // slot has not been touched by googletag yet\n this.initiation();\n this.register();\n this.displayAd();\n }\n }\n\n // different slot, different element and surely different slot content elements\n // the ad container has been totally wiped from page dom tree, need to create new element for the slot\n // demo ref: https://developers.google.com/doubleclick-gpt/samples/infinite-content\n public reinitAd() {\n this.registerInfinite().then(()=> {\n this.slotConfig.elementId = this.slotInstance.getSlotElementId();\n this.initiation();\n this.displayAd();\n })\n }\n\n public destroyAd() {\n const googletag = (window as any).googletag;\n googletag.cmd.push(() => {\n googletag && typeof googletag.destroySlots === \"function\" && googletag.destroySlots([this.slotInstance]);\n this.cleanSlotElement();\n });\n }\n}","import {cookies, isMobileWidth, Log, urlUtil} from \"../ten/env.util\";\nimport {StaticAdRuleProcessor} from \"./static.rule.processor\";\nimport {AdSlotManager} from \"./static.slot.manager\";\nimport {iAdResponse, iAdSlotConfig, iStaticAdConfig} from \"./static.type\";\nimport {setTargeting, setTargetingAsync} from \"./util\";\nimport {eDebug_Title} from \"../ten/env.enum\";\nimport {PagePathInfo} from \"./page.path.processor\";\n\n\n/**\n * StaticAd manager\n */\nexport class StaticAd extends Log {\n /* slot related */\n private slots: Array;\n private requestParamsObj: any = {};\n\n public inited = false;\n public pagePathInfo: PagePathInfo;\n public ruleProcesser: StaticAdRuleProcessor;\n /* slot instance manager */\n public adSlotManagers: { [slotId: string]: AdSlotManager };\n\n constructor(private staticAdConfig: iStaticAdConfig) {\n super(eDebug_Title.staticAd);\n this.debugConfigUpdate();\n this.init();\n this.watchAdLoading(); // only call once OR if you are sure the listener be removed\n }\n\n public init() {\n const staticAdConfig = this.staticAdConfig;\n if (isMobileWidth) {\n this.slots = staticAdConfig.genericSlots ? staticAdConfig.mobileSlots.concat(staticAdConfig.genericSlots) : staticAdConfig.mobileSlots;\n } else {\n this.slots = staticAdConfig.genericSlots ? staticAdConfig.desktopSlots.concat(staticAdConfig.genericSlots) : staticAdConfig.desktopSlots;\n }\n this.log(\"chosen slots\", this.slots);\n\n this.initEnvParams();\n\n this.collectRequestParams();\n this.registerAdSlots();\n //this.renderAdSlots(); // This has been commented out because it will be run by optanon.\n }\n\n private initEnvParams () {\n const staticAdConfig = this.staticAdConfig;\n this.pagePathInfo = staticAdConfig.pagePathInfo();\n this.log(\"pagePathInfo\", this.pagePathInfo);\n\n this.ruleProcesser = new StaticAdRuleProcessor(\n staticAdConfig.account,\n staticAdConfig.pagePathInfo,\n staticAdConfig.pathRule,\n staticAdConfig.ptypeRule,\n staticAdConfig.keyValueRule\n );\n this.log(\"ruleProcesser\", this.ruleProcesser);\n }\n\n private collectRequestParams() {\n const requestParamsArray = this.staticAdConfig.requestParams;\n if (Array.isArray(requestParamsArray)) {\n requestParamsArray.forEach(kv => {\n if (Array.isArray(kv) && kv.length === 2 && kv[0] !== \"\" && kv[1] !== \"\") {\n this.requestParamsObj[kv[0]] = kv[1];\n }\n })\n }\n }\n\n private debugConfigUpdate() {\n let config = this.staticAdConfig;\n // update DFP instance account\n config.account = this.debugParamFromCookie(\"adNetwork\") || config.account;\n // update environment variable\n config.extraTargeting.env = this.debugParamFromCookie(\"env\") || config.extraTargeting.env;\n\n // update targeting key value pairs on page level\n for (let i = 0; i < urlUtil.keys.length; i++) {\n let urlParamKey = urlUtil.keys[i];\n\n if (urlParamKey.indexOf(\"adTargeting_\") >= 0) {\n config.extraTargeting[urlParamKey.replace(\"adTargeting_\", \"\")] = urlUtil.kv[urlParamKey];\n }\n }\n }\n\n private debugParamFromCookie(queryString) {\n if (urlUtil.kv[queryString]) {\n cookies.setCookie(queryString + \"_0\", urlUtil.kv.adNetwork);\n cookies.setCookie(queryString + \"_24\", urlUtil.kv.adNetwork, 1);\n return urlUtil.kv[queryString];\n } else {\n let sessionCookie = cookies.getCookie(queryString + \"_0\");\n let oneDayCookie = cookies.getCookie(queryString + \"_24\");\n if (sessionCookie && oneDayCookie && sessionCookie === oneDayCookie) {\n return sessionCookie;\n }\n }\n }\n\n private attachTargeting() {\n this.targetingExclusionRules();\n this.targetingPathKeyValueRules();\n this.targetingExtraInfo();\n setTargetingAsync(\"ptype\", this.ruleProcesser.ptype);\n\n this.log(\"updated targeting\", this.pagePathInfo, this.ruleProcesser);\n }\n\n public registerAdSlots() {\n this.adSlotManagers = {};\n\n (window as any).googletag = (window as any).googletag || {};\n let googletag = (window as any).googletag;\n googletag.cmd = googletag.cmd || [];\n\n // todo - could not remember why this is not directly added in cshtml template, better put there since some 3rd party depends on it as well when time available. - lance\n // let gads = document.createElement('script');\n // gads.async = true;\n // gads.type = 'text/javascript';\n // let useSSL = 'https:' == document.location.protocol;\n // gads.src = (useSSL ? 'https:' : 'http:') +\n // '//securepubads.g.doubleclick.net/tag/js/gpt.js';\n // '//www.googletagservices.com/tag/js/gpt.js';\n // let node = document.getElementsByTagName('script')[0];\n // node.parentNode.insertBefore(gads, node);\n\n // init each slot manager, then call register\n for (let i = 0; i < this.slots.length; i++) {\n this.log(\"registering slot\", () => {\n return this.slots[i].elementId || this.slots[i].pos\n });\n this.registerAdSlot(this.slots[i]);\n }\n\n this.attachTargeting();\n\n // todo - NIKE-11 - below blank sharethrough detection is currently not considered.\n // this.watchSharethroughAdLoading();\n\n\n googletag.cmd.push(() => {\n if (this.staticAdConfig.lazyLoading) {\n this.log(\"enabling googletag lazyload for ALL slots\");\n googletag.pubads().enableLazyLoad({\n fetchMarginPercent: this.staticAdConfig.lazyLoading.fetchMarginPercent,\n renderMarginPercent: this.staticAdConfig.lazyLoading.renderMarginPercent,\n mobileScaling: this.staticAdConfig.lazyLoading.mobileScaling\n });\n }\n\n if (this.requestParamsObj.ppid) {\n googletag.pubads().setPublisherProvidedId(this.requestParamsObj.ppid);\n }\n\n if (this.staticAdConfig.companionAds.enabled) {\n googletag.companionAds().setRefreshUnfilledSlots(true);\n googletag.pubads().enableVideoAds();\n //googletag.pubads().disableInitialLoad();\n }\n // - enable async, single request, collapse empty divs\n googletag.pubads().enableAsyncRendering();\n googletag.pubads().enableSingleRequest();\n googletag.pubads().collapseEmptyDivs();\n\n this.inited = true;\n\n // - enable services\n //googletag.enableServices(); // This has been commented out because it will be run by optanon.\n });\n }\n\n public targetingExclusionRules() {\n let exclusionRules = this.staticAdConfig.exclusionRule;\n\n let exclusions = [];\n if (exclusionRules.general && Array.isArray(exclusionRules.general)) {\n exclusions = exclusions.concat(exclusionRules.general);\n }\n\n if (exclusionRules.shows && Array.isArray(exclusionRules.shows)) {\n let showNames = Object.keys(exclusionRules.shows);\n for (let i = 0; i < showNames.length; i++) {\n let showRule = exclusionRules.shows[showNames[i]];\n if (this.pagePathInfo.show && this.pagePathInfo.show.indexOf(showRule.key) >= 0) {\n exclusions = exclusions.concat(showRule.rules);\n }\n }\n }\n\n this.log(\"targeting exclusion rules \", exclusions);\n setTargetingAsync(\"exclude\", exclusions.join(\",\"));\n }\n\n public targetingPathKeyValueRules() {\n let googletag = (window as any).googletag;\n\n googletag.cmd.push(() => {\n let keyValueRules = this.ruleProcesser.keyValueArray;\n this.log(\"setting key value paris\", keyValueRules);\n for (let i = 0; i < keyValueRules.length; i++) {\n setTargeting(\n keyValueRules[i].key,\n keyValueRules[i].value\n );\n }\n })\n }\n\n public targetingExtraInfo() {\n let targetingNames = Object.keys(this.staticAdConfig.extraTargeting);\n for (let i = 0; i < targetingNames.length; i++) {\n let rule = this.staticAdConfig.extraTargeting[targetingNames[i]];\n let value = typeof rule === \"function\" ? rule(this.pagePathInfo) : rule;\n\n if (value) {\n this.log(\"async key value pairs - \", () => {\n return `${targetingNames[i]} : ${value}`\n });\n setTargetingAsync(targetingNames[i], value);\n }\n }\n }\n\n /**\n * blank case one - google blank ad\n */\n private adCallback = (obj: iAdResponse)=>{\n let slotElementId = obj.slot.getSlotId().getDomId();\n let slotManager = this.getAdManagerBySlotId(slotElementId) || this.getAdManagerByDynamicDomId(slotElementId);\n\n // if sharethrough schedule blank verified then ignore following process\n if (slotManager.isAdBlankSchedule) {\n this.warn(`ad is schedule empty, skip general google ad load callback process`);\n slotManager.isAdLoadFailed = true;\n return;\n }\n\n if (obj.isEmpty) {\n slotManager.isAdLoadFailed = true;\n this.loadedBlankAd(slotManager.slotConfig);\n slotManager.slotConfig.blankAdCallback && slotManager.slotConfig.blankAdCallback();\n this.warn(`${slotElementId} ad is empty`);\n } else {\n slotManager.isAdFilled = true;\n this.loadedAd(slotManager.slotConfig);\n slotManager.slotConfig.successLoadCallback && slotManager.slotConfig.successLoadCallback(obj);\n this.log(`${slotElementId} ad is filled`);\n }\n };\n\n /**\n * blank case two - sharethrough's scheduled blank.\n * Below function will be triggered first, then above \"slotRenderEnded\" method will be called with \"hasAd\" result. So there will be inconsistent result for sharethrough ads we need to handle properly.\n */\n private blankAdCallback = (width, height, pos) => {\n let adSlotManagerKeys = Object.keys(this.adSlotManagers);\n for (let i = 0; i < adSlotManagerKeys.length; i++) {\n let adSlotManager = this.getAdManagerBySlotId(adSlotManagerKeys[i]);\n if (pos === adSlotManager.slotPos) {\n let sizes = adSlotManager.slotConfig.size;\n if (sizes && Array.isArray(sizes)) {\n for (let q = 0; q < sizes.length; q++) {\n if (sizes[q] && Array.isArray(sizes[q]) && width == sizes[q][0] && height == sizes[q][1]) {\n adSlotManager.isAdBlankSchedule = true;\n this.loadedBlankAd(adSlotManager.slotConfig);\n adSlotManager.slotConfig.blankAdCallback && adSlotManager.slotConfig.blankAdCallback();\n this.log(`${adSlotManager.slotConfig.elementId} ad is schedule empty`);\n break;\n }\n // todo is it possbile we load scheduled blank ads for \"string\" size ad slot?\n }\n }\n }\n }\n };\n\n // every time slotRenderEnded called (by googletag), this function call adCallback\n // which receives slot response, and it will trigger slotConfig's callbacks\n public watchAdLoading() {\n let googletag = (window as any).googletag;\n googletag.cmd.push(() => {\n googletag.pubads().addEventListener('slotRenderEnded', this.adCallback);\n });\n\n (window as any).blankAdCallback = this.blankAdCallback;\n }\n\n private watchSharethroughAdLoading() {\n let evM = window.addEventListener ? \"addEventListener\" : \"attachEvent\";\n let ev = window[evM];\n let meE = evM == \"attachEvent\" ? \"onmessage\" : \"message\";\n\n ev(meE, function (e) {\n let k = e.message ? \"message\" : \"data\";\n let d = typeof e[k] === \"string\" ? e[k] : \"\";\n let o = (e as any).origin || (e as any).originalEvent.origin;\n\n //check that origin is correct\n if (e.origin !== window.location.protocol + \"//\" + window.location.host) {\n return;\n }\n if (d.indexOf(\"nativeAdBlankServed_sharethrough\") == 0) {\n this.log(\"Sharethrough decided not to serve an ad, collapse empty native. receiving a message, e.origin:\" + e.origin + \" e.data:\" + e.data);\n\n // todo this would be the instance used to check to see if nativead came back as blank.\n }\n })\n }\n\n private loadedBlankAd(adSlotConfig: iAdSlotConfig) {\n if (!adSlotConfig) {\n return;\n }\n if (adSlotConfig.parent) {\n this.warn(\"hide ad slot \", () => {\n return adSlotConfig.elementId || adSlotConfig.pos;\n });\n let parentContainer: HTMLElement = document.querySelector(adSlotConfig.parent);\n if (parentContainer !== null) {\n parentContainer.style.display = \"none\";\n }\n }\n }\n\n private loadedAd(adSlotConfig: iAdSlotConfig) {\n if (!adSlotConfig) {\n return;\n }\n if (adSlotConfig.parent) {\n this.warn(\"show ad slot \", () => {\n return adSlotConfig.elementId || adSlotConfig.pos;\n });\n let parentContainer: HTMLElement = document.querySelector(adSlotConfig.parent);\n if (parentContainer !== null) {\n parentContainer.style.display = \"block\";\n }\n }\n }\n\n public renderAdSlots() {\n let keys = Object.keys(this.adSlotManagers);\n for (let i = 0; i < keys.length; i++) {\n this.renderAdSlot(keys[i]);\n }\n }\n\n public getSlotConfig(slotId) {\n if (this.adSlotManagers[slotId]) {\n return this.adSlotManagers[slotId].slotConfig;\n }\n }\n\n public registerAdSlot(adSlotConfig: iAdSlotConfig) {\n let adSlotManager = new AdSlotManager(\n this.ruleProcesser.path,\n adSlotConfig,\n this.staticAdConfig.companionAds\n );\n\n if (adSlotManager.slotElement === null) {\n this.warn(\"could not find slot element for\", () => {\n return adSlotConfig.elementId || adSlotConfig.pos;\n });\n return;\n }\n\n adSlotManager.register();\n this.adSlotManagers[adSlotConfig.elementId] = adSlotManager;\n }\n\n public renderAdSlot(slotId: string) {\n let adSlotManager = this.getAdManagerBySlotId(slotId);\n adSlotManager && adSlotManager.displayAd();\n }\n\n public refreshAdSlot(slotId: string) {\n let adSlotManager = this.getAdManagerBySlotId(slotId);\n adSlotManager && adSlotManager.refreshAd();\n }\n\n public reloadAdSlot(slotId: string) {\n const adSlotManager = this.getAdManagerBySlotId(slotId);\n adSlotManager && adSlotManager.reloadAd();\n }\n\n public reinitAdSlot(slotId: string) {\n const adSlotManager = this.getAdManagerBySlotId(slotId);\n adSlotManager && adSlotManager.reinitAd();\n }\n\n public destroyAdSlots() {\n Object.keys(this.adSlotManagers).forEach(slotId => {\n const manager = this.getAdManagerBySlotId(slotId);\n manager && manager.destroyAd();\n delete this.adSlotManagers[slotId];\n });\n }\n\n public syncAdParams() {\n this.initEnvParams();\n this.attachTargeting();\n }\n\n public pageSwitchRefresh() {\n this.syncAdParams();\n let googletag = (window as any).googletag;\n googletag.cmd.push(() => {\n googletag.pubads().refresh();\n });\n }\n\n public getAdManagerBySlotId(slotId: string): AdSlotManager | undefined {\n if (this.adSlotManagers[slotId]) {\n // static ad slot instance manager\n return this.adSlotManagers[slotId];\n } else {\n // infinite ad slot instance manager\n const slotIds = Object.keys(this.adSlotManagers);\n for (let i = 0; i < slotIds.length; i++) {\n const manager = this.adSlotManagers[slotIds[i]];\n if (manager.slotId === slotId) {\n return manager;\n }\n }\n }\n }\n\n /**\n *\n * @param domId Id of google defineSlot generated element id.\n */\n public getAdManagerByDynamicDomId(domId): AdSlotManager | undefined {\n const slotIds = Object.keys(this.adSlotManagers);\n for (let i = 0; i < slotIds.length; i++) {\n const manager = this.adSlotManagers[slotIds[i]];\n if (manager.domId === domId) {\n return manager;\n }\n }\n }\n}\n","import {isMobileWidth} from \"../ten/env.util\";\n\nconst adhesionTemplate = `\n
    \n
    \n \n
    \n
    \n`;\n\nfunction getAdhesion() {\n const divTmp = document.createElement(\"div\");\n divTmp.innerHTML = adhesionTemplate;\n return divTmp.querySelector(\".adhesion-container\");\n}\n\nexport function addAdhesionDom() {\n document.body.appendChild(getAdhesion());\n}\n\nexport function adhesion_handlePreload() {\n\n}\n\nexport function adhesion_handleSuccessLoad() {\n document.querySelector(`.tenads.adhesion iframe`).addEventListener(\"load\", function () {\n setTimeout(\n function () {\n document.querySelector(\"body > .adhesion-container\").remove();\n }, 8000\n )\n });\n}\n\nexport function adhesion_handleBlankLoad() {\n\n}","import {iAdSlotConfig} from \"../tenAds/static.type\";\n\nexport function c06_handleSuccessLoad(config: iAdSlotConfig) {\n let adParent: HTMLElement;\n if (config.parent && (adParent = document.querySelector(config.parent)) !== null) {\n handleSuccess(config, adParent);\n }\n}\n\nexport function c06_handleBlankLoad(config: iAdSlotConfig) {\n let adParent: HTMLElement;\n if (config.parent && (adParent = document.querySelector(config.parent)) !== null) {\n handleBlank(config, adParent);\n }\n}\n\n\nfunction handleSuccess(config: iAdSlotConfig, parent: HTMLElement) {\n const adEvent = document.createEvent(\"Event\");\n adEvent.initEvent(\"adLoadEvent\", false, false);\n parent.dispatchEvent(adEvent);\n}\nfunction handleBlank(config: iAdSlotConfig, parent: HTMLElement) {\n const adEvent = document.createEvent(\"Event\");\n adEvent.initEvent(\"adBlankEvent\", false, false);\n parent.dispatchEvent(adEvent);\n}","import {iAdSlotConfig} from \"../tenAds/static.type\";\n\nexport function mrec_handleSuccessLoad(config: iAdSlotConfig) {\n let adParent: HTMLElement | null;\n if (config.parent && (adParent = document.querySelector(config.parent)) !== null) {\n handleSuccessOfCarousel(config, adParent);\n }\n}\n\nexport function mrec_handleBlankLoad(config: iAdSlotConfig) {\n let adParent: HTMLElement | null;\n if (config.parent && (adParent = document.querySelector(config.parent)) !== null) {\n handleBlankOfCarousel(config, adParent);\n }\n}\n\n\nfunction handleSuccessOfCarousel(config: iAdSlotConfig, adParent: HTMLElement) {\n // carousel jsx logic will watch this class\n adParent.classList.add(\"tenads--success\");\n}\n\nfunction handleBlankOfCarousel(config: iAdSlotConfig, adParent: HTMLElement) {\n // carousel jsx logic will watch this class\n adParent.classList.add(\"tenads--blank\");\n}","const imgStyleUrlAttrName = \"imgUrl\";\n\nexport function skin_handlePreload() {\n // todo which element this will be?\n let firstChildDiv = document.querySelector(\"main > .content__wrapper > div:first-child\");\n if (firstChildDiv === null) {\n return;\n }\n\n let adSkinLeft, adSkinRight;\n if (document.querySelector(\"#adSkinLeft\")) {\n adSkinLeft = document.querySelector(\"#adSkinLeft\");\n adSkinRight = document.querySelector(\"#adSkinRight\");\n }\n else {\n adSkinLeft = document.createElement(\"div\");\n adSkinLeft.id = \"adSkinLeft\";\n adSkinLeft.classList.add(\"default\");\n adSkinRight = document.createElement(\"div\");\n adSkinRight.id = \"adSkinRight\";\n adSkinRight.classList.add(\"default\");\n firstChildDiv.parentNode.insertBefore(adSkinLeft, firstChildDiv);\n firstChildDiv.parentNode.insertBefore(adSkinRight, firstChildDiv);\n }\n\n\n let checkAdImgInterval = setInterval(function () {\n let adSkinBGImage = window.getComputedStyle(adSkinLeft).backgroundImage;\n const prevStyle = document.querySelector(\"#skinImgStyle\");\n let prevImg = prevStyle ? prevStyle.getAttribute(imgStyleUrlAttrName) : undefined;\n if (typeof adSkinBGImage === \"string\" && adSkinBGImage.indexOf(\"url(\") >= 0 && adSkinBGImage !== prevImg) {\n initSkinHandler(adSkinLeft, adSkinRight); // do it once\n updateSkinImg(adSkinBGImage); // do it every time skin img updated\n }\n }, 50);\n\n\n // stop interval after 10 sec:\n const timeoutDuration = 10 * 1000;\n setTimeout(function() {\n checkAdImgInterval && clearInterval(checkAdImgInterval);\n checkAdImgInterval = undefined;\n }, timeoutDuration)\n}\n\nlet initedSkinHandler = false;\nfunction initSkinHandler(adSkinLeft, adSkinRight) {\n if (initedSkinHandler === true) {\n return;\n }\n\n const bodyWidth = window.innerWidth;\n let style = document.createElement('style');\n style.type = 'text/css';\n // todo what is the slick-track dom is? could not find it on home page or show page.\n style.innerHTML = `\n @media print, (min-width:1260px) {\n body.loadedSkin.loadedSkin_narrow .content__marquee__infinite:not(.erase) .slick-track {\n margin-left: ${-(bodyWidth - 1260) / 2 + 2 + 8}px; \n } \n }\n `;\n document.head.appendChild(style);\n\n\n adSkinLeft.classList.add(\"boost\");\n adSkinRight.classList.add(\"boost\");\n\n setTimeout(() => {\n if (document.body.classList.contains(\"loadedSkin\")) {\n // todo find marquee template and add the class\n const marquee = document.querySelector(\"#marquee\");\n\n marquee && marquee.classList.add(\"content__marquee__infinite\");\n document.body.classList.add(\"loadedSkin_narrow\");\n\n syncCarouselPosition();\n }\n }, 100);\n\n initedSkinHandler = true;\n\n}\n\nfunction updateSkinImg(adSkinBGImage) {\n const prevStyle = document.querySelector(\"#skinImgStyle\");\n prevStyle && prevStyle.remove();\n let style = document.createElement('style');\n style.type = 'text/css';\n style.id = \"skinImgStyle\";\n style.setAttribute(imgStyleUrlAttrName, adSkinBGImage);\n style.innerHTML = `\n #adSkinLeft.boost::before, #adSkinRight.boost::before {\n background-image: ${adSkinBGImage}\n }\n `;\n document.head.appendChild(style);\n}\n\nfunction syncCarouselPosition() {\n document.querySelectorAll(\".content__marquee__infinite\").forEach(carousel => {\n syncPosition(carousel);\n })\n}\n\nfunction syncPosition(carousel) {\n const slick = carousel.querySelector(\".slick-track\") as HTMLElement;\n const marginLeft = parseFloat(window.getComputedStyle(slick).marginLeft);\n if (!slick || !marginLeft) {\n return;\n }\n\n try {\n const currentLeft = parseFloat(slick.style.left);\n const newLeft = parseFloat(currentLeft + \"\") + parseFloat(marginLeft - 2 + \"\");\n let prevStyle = slick.getAttribute(\"style\");\n if (typeof prevStyle !== \"string\") {\n removeMarginLeft(slick);\n return;\n }\n\n prevStyle = prevStyle.replace(/left:[0-9\\. \\-\\,]{1,}px;/, \"\");\n\n slick.setAttribute(\"style\", `${prevStyle} margin-left: 0;`);\n slick.classList.add(\"erase\");\n\n if(slick.children.length !== 1) {\n slick.setAttribute(\"style\", `${prevStyle} margin-left: 0; left: ${newLeft}px`);\n }\n\n } catch (e) {\n removeMarginLeft(slick);\n }\n}\n\nfunction removeMarginLeft(slick) {\n slick.style.marginLeft = \"0\";\n}\n\nexport function skin_handleSuccessLoad() {\n document.body.classList.add(\"loadedSkin\");\n}\n\nexport function skin_handleBlankLoad() {\n document.body.classList.remove(\"loadedSkin\");\n}","export function setTargetingAsync(key, value) {\n let googletag = (window as any).googletag;\n if (!googletag) {\n return;\n }\n\n googletag.cmd.push(() => {\n setTargeting(key, value);\n });\n}\n\nexport function setTargeting(key, value) {\n if (!key || !value) {\n return;\n }\n\n let googletag = (window as any).googletag;\n if (!googletag) {\n return;\n }\n\n let safeKey = googletagRequestDataValidate(key);\n let safeValue = googletagRequestDataValidate(value);\n\n googletag.pubads().setTargeting(safeKey, safeValue);\n}\n\nexport function googletagRequestDataValidate(value: any): any {\n if (typeof value === \"string\") {\n return value.replace(/[^a-zA-Z0-9-_,]/g, \"-\")\n } else if (Array.isArray(value)){\n const itemArray = value.filter(function(item){\n return item !== undefined && item !== null && item !== \"\";\n });\n return Array.from(new Set(itemArray));\n } else {\n return value;\n }\n}\n","import {isDesktop, Log} from \"../ten/env.util\";\n\nexport interface iVideoAdRequestParams {\n ppid?: string, // TPWP-1371\n}\n\n/**\n * VideoAdConfig type definition\n */\nexport interface iVideoAdConfig {\n companionAds?: {\n enabled: boolean,\n adSizes: Array<[number, number] | string>,\n },\n account: string,\n id: string,\n device: string,\n site: string,\n cmsID: string,\n customParams?: Array<[string, string]>, // extra cust_param properties\n requestParams?: Array<[string, string]>,// extra ad request param properties\n exclusions?: Array<{\n key: string,\n rules: Array,\n }>,\n // categoryPath is required when using paramMappings\n categoryPath?: Array,\n // cust_params kv pair that validate url string and map to given value\n paramMappings?: Array,\n}\n\nexport interface iVideoAdParamMapping {\n param: string,\n mappingKey: Array, // substring start from beginning of \"location.pathname\"\n mappingValue: Array, //\n extensionValue?: \"category\" | \"section\" | \"subSection\",\n extensionReplaceMapping?: Array<[string | RegExp, string]>, // if you want to replace char in value\n}\n\n\nexport class VideoAd extends Log {\n // todo this should not needed, exclusions not managed frontend\n static getExclusions(exclusionConfig, showName) {\n let exclusionParam = '';\n if (!exclusionConfig || exclusionConfig.constructor !== Array) {\n return exclusionParam;\n }\n\n for (let i: number = 0; i < exclusionConfig.length; i++) {\n let config = exclusionConfig[i];\n if (showName.indexOf(config.key) !== -1) {\n exclusionParam = 'excl_cat=' + config.rules.join(\",\");\n break;\n }\n }\n\n return exclusionParam;\n }\n\n // todo this should not needed\n static getPayload(mcnPayloadData) {\n let mcnPayload = '';\n if (mcnPayloadData) {\n mcnPayload = mcnPayloadData.replace(/;/g, '&');\n }\n return mcnPayload;\n }\n\n // todo this should not needed\n static getTargeting(I11CMorphExist) {\n let mcnTargeting = 'pagetype=video';\n /* DTECH-697 */\n if (I11CMorphExist) {\n mcnTargeting += '&shield=1';\n /* DTECH-659 */\n }\n return mcnTargeting;\n }\n\n constructor(private videoAdConfig: iVideoAdConfig) {\n super(\"videoAd\");\n }\n\n static processParamMapping(paramMapping: iVideoAdParamMapping, path): string {\n // setting must be complete\n if (!paramMapping.param ||\n !Array.isArray(paramMapping.mappingKey) ||\n !Array.isArray(paramMapping.mappingValue) ||\n paramMapping.mappingKey.length !== paramMapping.mappingValue.length\n ) {\n return;\n }\n\n // find match key index\n const index = paramMapping.mappingKey.findIndex(key => {\n return location.pathname.indexOf(key) === 0;\n });\n\n // get match key's value\n if (index === -1) {\n return;\n }\n\n let out = paramMapping.mappingValue[index];\n let extensionOut;\n\n // if extension setting exists, add extension to the \"out\" value\n if (paramMapping.extensionValue) {\n switch (paramMapping.extensionValue) {\n case \"category\":\n path[0] && (extensionOut= path[0]);\n break;\n case \"section\":\n path[1] && (extensionOut= path[1]);\n break;\n case \"subSection\":\n path[2] && (extensionOut= path[2]);\n break\n }\n }\n if (extensionOut && Array.isArray(paramMapping.extensionReplaceMapping)) {\n paramMapping.extensionReplaceMapping.forEach(replaceKV=>{\n extensionOut.replace(replaceKV[0], replaceKV[1]);\n })\n }\n if (extensionOut) {\n out += extensionOut;\n }\n\n return out;\n }\n\n static generateAdditionalParam(\n paramMappings: Array, path: Array\n ): string {\n if (!Array.isArray(paramMappings)) {\n return \"\";\n }\n\n const params = paramMappings.map((paramMapping, ind) => {\n const paramOut = VideoAd.processParamMapping(paramMapping, path);\n return paramOut ? paramMapping.param + \"=\" + paramOut : \"\";\n }).filter(param => {\n return !!param;\n });\n\n return encodeURIComponent(Array.from(new Set(params)).join(\"&\"));\n }\n\n public formatIMAServerUrl(videoId: string | number): string {\n if (!videoId) {\n return \"\";\n }\n\n let urlString = \"https://pubads.g.doubleclick.net/gampad/ads?\" +\n \"iu=/\" +\n this.videoAdConfig.account + \"/\" +\n this.videoAdConfig.id + \"/\" +\n this.videoAdConfig.device + \"/\" +\n this.videoAdConfig.site +\n \"&description_url=\" + encodeURIComponent(location.href) +\n \"&env=vp\" +\n \"&impl=s\" +\n \"&correlator=\" +\n \"&scor==\" +\n \"&tfcd=0\" +\n \"&npa=0\" +\n \"&gdfp_req=1\" +\n \"&output=xml_vmap1_vast4\" +\n \"&sz=640x480\" +\n (this.videoAdConfig.companionAds.enabled ? \"&ciu_szs=\" + encodeURIComponent(this.videoAdConfig.companionAds.adSizes.map(size=>(Array.isArray(size) && size.join(\"x\") || size)).join(\",\")) : \"\") +\n \"&pp=\" + (isDesktop ? \"vpaid_js\" : \"ssai\") +\n \"&cmsid=\" + this.videoAdConfig.cmsID +\n \"&vid=\" + videoId +\n \"&unviewed_position_start=1\";\n\n const additionalParam = VideoAd.generateAdditionalParam(this.videoAdConfig.paramMappings, this.videoAdConfig.categoryPath);\n additionalParam && (urlString += `&cust_params=${additionalParam}`);\n \n const requestParams = this.videoAdConfig.requestParams;\n if (Array.isArray(requestParams)) {\n requestParams.forEach(kv => {\n if (Array.isArray(kv) && kv.length === 2 && kv[0] !== \"\" && kv[1] !== \"\") {\n urlString += `&${kv[0]}=${kv[1]}`;\n }\n })\n }\n\n if (Array.isArray(this.videoAdConfig.customParams) && this.videoAdConfig.customParams.length > 0) {\n let appendingCustomParams = this.videoAdConfig.customParams.map(kv=>{\n if (typeof kv[0] !== \"string\" || [undefined, null].indexOf(kv[1]) >= 0) {\n return \"\";\n }\n return `${kv[0]}=${kv[1]}`;\n }).filter(kv=>{\n return kv !== \"\";\n });\n if (appendingCustomParams.length > 0) {\n urlString += \"&cust_params=\" + encodeURIComponent(appendingCustomParams.join(\"&\"));\n }\n }\n\n this.log(\"video ima url\", urlString);\n\n return urlString;\n }\n}","export class Admiral {\n _admiral: any;\n\n init() {\n this.setAdmiral();\n }\n setAdmiral() {\n if (typeof window !== \"undefined\") {\n this._admiral = (window as any)['admiral'] || function () { (this._admiral.q = this._admiral.q || []).push(arguments) };\n }\n }\n detectAdBlocker(output) {\n if (this._admiral) {\n try {\n this._admiral(\"after\", \"measure.detected\", function (user) {\n output(user.adblocking)\n });\n }\n catch (err) {\n console.log(err)\n }\n }\n }\n}","import {\n Allocator_Page_Base,\n} from \"../tenTrack/track.allocator.page\";\nimport {trackingServiceConfig} from \"../ten/cust.env.track\";\nimport {initTealium} from \"./tracking.init\";\nimport {iUtag} from \"../ten/env.utag\";\nimport {TPWPTealium} from \"./tealium\";\nimport {iUpNextClick_videoData, ISearchClick} from \"./allocatorPage.type\";\nimport {eAllocatorPageEvent, tAllocatorPageEvent} from \"./allocatorPage.type\";\nimport { Admiral } from \"./admiral\";\n\n\n\n\nexport class TenplayPageAllocator extends Allocator_Page_Base {\n protected tealium: TPWPTealium;\n public admiral:Admiral;\n\n constructor(trackingService = trackingServiceConfig) {\n super(trackingService);\n this.tealium = initTealium.bind(this)(TPWPTealium);\n this.admiral = new Admiral;\n this.admiral.init()\n }\n\n // eventData - it will be different, specific object for each event\n public track(event: tAllocatorPageEvent, eventData?: any) {\n const utag_data = (window as any).utag_data;\n super.track(event, utag_data);\n\n switch (event) {\n case eAllocatorPageEvent.PAGE_VIEW:\n this.onAdBlockerDetect(utag_data);\n break;\n case eAllocatorPageEvent.CHANGE_VIDEO:\n this.onChangeVideo(utag_data);\n break;\n case eAllocatorPageEvent.CHANGE_PARTICIPANT:\n this.onChangeParticipant(utag_data);\n break;\n case eAllocatorPageEvent.CATEGORY_LOADMORE:\n this.onCategoryLoadMore(utag_data);\n break;\n case eAllocatorPageEvent.ARTICLE_SCROLLMORE:\n this.onArticleScrollMore(utag_data);\n break;\n case eAllocatorPageEvent.CLICKED_CAROUSEL:\n this.onCarouselClick(utag_data, eventData);\n break;\n case eAllocatorPageEvent.CATEGORY_CLICK:\n this.onCategoryClick(utag_data, eventData);\n break;\n case eAllocatorPageEvent.MARQUEE_CLICKED:\n this.onMarqueeClicked(utag_data, eventData);\n break;\n case eAllocatorPageEvent.MARQUEE_IMPRESSION:\n this.onMarqueeImpression(utag_data, eventData);\n break;\n case eAllocatorPageEvent.CAROUSEL_LOAD:\n this.onCarouselLoad(utag_data, eventData);\n break;\n case eAllocatorPageEvent.USER_SIGNUP:\n this.onUserSignup(utag_data, eventData);\n break;\n case eAllocatorPageEvent.USER_SIGNIN:\n this.onUserSignin(utag_data, eventData);\n break;\n case eAllocatorPageEvent.USER_UPDATE:\n this.onUserUpdate(utag_data, eventData);\n break;\n case eAllocatorPageEvent.USER_SIGNOUT:\n this.onUserSignout(utag_data, eventData);\n break;\n case eAllocatorPageEvent.WATCHLIST_ADD:\n this.onWatchlistAdd();\n break;\n case eAllocatorPageEvent.WATCHLIST_REMOVE:\n this.onWatchlistRemove();\n break;\n case eAllocatorPageEvent.FAVORITE_SHOW_ADD:\n this.onFavoriteShowAdd(eventData);\n break;\n case eAllocatorPageEvent.FAVORITE_SHOW_REMOVE:\n this.onFavoriteShowRemove(eventData);\n break;\n case eAllocatorPageEvent.SHARE_CONTENT:\n this.onShareContent(eventData);\n break;\n case eAllocatorPageEvent.SEARCH_SCREEN_OPENED:\n this.onSearchScreen(utag_data, eventData);\n break;\n case eAllocatorPageEvent.SEARCH_VIEW:\n this.onSearchView(utag_data, eventData);\n break;\n case eAllocatorPageEvent.SEARCH_START:\n this.onSearchStart(utag_data, eventData);\n break;\n case eAllocatorPageEvent.SEARCH_COMPLETE:\n this.onSearchComplete(utag_data, eventData);\n break;\n case eAllocatorPageEvent.SEARCH_RESULT_CLICKED:\n this.onSearchResultClick(utag_data, eventData);\n break;\n\n case eAllocatorPageEvent.SIGN_UP_FORM:\n this.onUserSigUpForm(utag_data, eventData);\n break; \n case eAllocatorPageEvent.SIGN_UP_EMAIL_ERROR:\n this.onUserSignUpEmailError(utag_data, eventData);\n break;\n case eAllocatorPageEvent.SIGN_UP_PASSWORD_ERROR:\n this.onUserSignUpPasswordError(utag_data, eventData);\n break;\n case eAllocatorPageEvent.SIGN_UP_ACCOUNT_EXISTS:\n this.onUserSignUpAccountExists(utag_data, eventData);\n break; \n case eAllocatorPageEvent.SIGN_UP_PROFILE:\n this.onUserSignUpProfile(utag_data, eventData);\n break;\n case eAllocatorPageEvent.SIGN_UP_PROFILE_ERROR:\n this.onUserSignUpProfileError(utag_data, eventData);\n break;\n\n case eAllocatorPageEvent.SIGN_UP_SUCCESS:\n this.onUserSignUpSuccess(utag_data, eventData);\n break;\n\n case eAllocatorPageEvent.SIGN_IN_FORM_EMAIL:\n this.onUserSignInFormEmail(utag_data, eventData);\n break;\n case eAllocatorPageEvent.SIGN_IN_EMAIL_ERROR:\n this.onUserSignInEmailError(utag_data, eventData);\n break;\n case eAllocatorPageEvent.SIGN_IN_PASSWORD_ERROR:\n this.onUserSignInPasswordError(utag_data, eventData);\n break; \n case eAllocatorPageEvent.SIGN_IN_SOCIAL:\n this.onUserSignInSocial(utag_data, eventData);\n break; \n case eAllocatorPageEvent.SIGN_IN_PROFILE:\n this.onUserSignInProfile(utag_data, eventData);\n break; \n case eAllocatorPageEvent.SIGN_IN_PROFILE_ERROR:\n this.onUserSignInProfileError(utag_data, eventData);\n break; \n case eAllocatorPageEvent.SIGN_IN_ACCOUNT_LOCKED:\n this.onUserSignInLocked(utag_data, eventData);\n break; \n case eAllocatorPageEvent.SIGN_IN_PASSWORD_FORGOT:\n this.onUserSignInPasswordForgot(utag_data, eventData);\n break; \n case eAllocatorPageEvent.SIGN_IN_PASSWORD_RESET:\n this.onUserSignInPasswordReset(utag_data, eventData);\n break;\n case eAllocatorPageEvent.SIGN_IN_NEW_PASSWORD_ERROR:\n this.onUserSignInNewPasswordError(utag_data, eventData);\n break;\n case eAllocatorPageEvent.ACTIVATION_SUCCESS:\n this.onActivationSuccess(utag_data, eventData)\n break;\n case eAllocatorPageEvent.ACTIVATION_ERROR:\n this.onActivationError(utag_data, eventData)\n break;\n }\n }\n\n private onChangeVideo(utag_data: iUtag) {\n const tealiumData = (window as any).TealiumData;\n (window as any).utag && tealiumData && (window as any).utag.track('view', {...tealiumData});\n }\n private onChangeParticipant(utag_data: iUtag) {\n\n }\n private onCategoryLoadMore(utag_data: iUtag) {\n\n }\n private onArticleScrollMore(utag_data: iUtag) {\n\n }\n private onCarouselClick(utag_data: iUtag, eventData){\n this.tealium && this.tealium.onCarouselClick(eventData);\n }\n private onCategoryClick(utag_data: iUtag, eventData){\n this.tealium && this.tealium.onCategoryClick(eventData);\n }\n private onMarqueeClicked(utag_data: iUtag, eventData){\n this.tealium && this.tealium.onCarouselClick(eventData);\n }\n private onMarqueeImpression(utag_data: iUtag, eventData){\n\n }\n private onCarouselLoad(utag_data: iUtag, eventData){\n\n }\n private onUserSignup(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignup(eventData);\n }\n private onUserSignin(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignin(eventData);\n }\n private onUserUpdate(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserUpdate(eventData);\n }\n private onUserSignout(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignout(eventData);\n }\n private onActivationSuccess(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onActivationSuccess(eventData);\n }\n private onActivationError(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onActivationError(eventData);\n }\n private onWatchlistAdd(){\n this.tealium && this.tealium.onWatchlistAdd();\n }\n private onWatchlistRemove(){\n this.tealium && this.tealium.onWatchlistRemove();\n }\n private onFavoriteShowAdd(eventData){\n this.tealium && this.tealium.onFavoriteShowAdd(eventData);\n }\n private onFavoriteShowRemove(eventData){\n this.tealium && this.tealium.onFavoriteShowRemove(eventData);\n }\n //Ad Blocker - Admiral\n private onAdBlockerDetect(utag_data: iUtag){\n const utag = (window as any).utag;\n const getBlockStatus = (blockDetect:boolean) => {\n if (blockDetect) {\n const trackerObject = {\n interactionCategory: \"Admiral Page Load\",\n interactionType: \"impression\",\n adBlockerEnabled: blockDetect,\n tealium_event: \"adblocker_view\",\n }\n utag && utag.track(\"view\", trackerObject);\n }\n\n }\n this.admiral.detectAdBlocker(getBlockStatus);\n }\n private onShareContent(platform){\n this.tealium && this.tealium.onShareContent(platform);\n }\n\n private onSearchScreen(utag_data, eventData) {\n this.tealium && this.tealium.onSearchScreen(eventData);\n \n }\n\n private onSearchView(utag_data, eventData) {\n this.tealium && this.tealium.onSearchView(eventData);\n }\n\n private onSearchStart(utag_data, eventData) {\n this.tealium && this.tealium.onSearchStart(eventData);\n \n }\n\n private onSearchComplete(utag_data, eventData) {\n this.tealium && this.tealium.onSearchComplete(eventData); \n }\n\n private onSearchResultClick(utag_data, eventData) {\n this.tealium && this.tealium.onSearchResultClick(eventData);\n }\n\n // SIGN UP FLOW EVENTS\n private onUserSigUpForm(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSigUpForm(eventData);\n }\n private onUserSignUpEmailError(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignUpEmailError(eventData);\n }\n private onUserSignUpPasswordError(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignUpPasswordError(eventData);\n }\n private onUserSignUpAccountExists(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignUpAccountExists(eventData);\n }\n private onUserSignUpProfile(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignUpProfile(eventData);\n }\n private onUserSignUpProfileError(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignUpProfileError(eventData);\n }\n private onUserSignUpSuccess(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignUpSuccess(eventData);\n }\n\n //SIGN IN FLOW EVENTS\n private onUserSignInFormEmail(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignInFormEmail(eventData);\n }\n private onUserSignInEmailError(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignInEmailError(eventData);\n }\n private onUserSignInPasswordError(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignInPasswordError(eventData);\n }\n private onUserSignInSocial(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignInSocial(eventData);\n }\n private onUserSignInProfile(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignInProfile(eventData);\n }\n private onUserSignInProfileError(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignInProfileError(eventData);\n }\n private onUserSignInLocked(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignInLocked(eventData);\n }\n private onUserSignInPasswordForgot(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignInPasswordForgot(eventData);\n }\n private onUserSignInPasswordReset(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignInPasswordReset(eventData);\n }\n private onUserSignInNewPasswordError(utag_data:iUtag, eventData){\n this.tealium && this.tealium.onUserSignInNewPasswordError(eventData);\n }\n}","import {eAllocatorPageEventDefault} from \"../tenTrack/track.allocator.page\";\n\nexport interface iUpNextClick_videoData {\n name: string,\n}\n\nexport interface ISearchClick {\n searchTerm: string;\n searchResultShowName: string;\n searchResultsGenre: string;\n searchResults: string;\n numberResults: number;\n linkPositionOnPage: number;\n}\n\nexport const eAllocatorPageEvent = {\n ...eAllocatorPageEventDefault,\n CHANGE_VIDEO: \"CHANGE_VIDEO\",\n CHANGE_PARTICIPANT: \"CHANGE_PARTICIPANT\",\n CATEGORY_LOADMORE: \"CATEGORY_LOADMORE\",\n ARTICLE_SCROLLMORE: \"ARTICLE_SCROLLMORE\",\n CLICKED_CAROUSEL: \"CLICKED_CAROUSEL\",\n MARQUEE_CLICKED: \"MARQUEE_CLICKED\",\n MARQUEE_IMPRESSION: \"MARQUEE_IMPRESSION\",\n CAROUSEL_LOAD: \"CAROUSEL_LOAD\",\n CATEGORY_CLICK: \"CATEGORY_CLICK\",\n USER_SIGNUP: \"USER_SIGNUP\",\n USER_SIGNIN: \"USER_SIGNIN\",\n USER_UPDATE: \"USER_UPDATE\",\n USER_SIGNOUT: \"USER_SIGNOUT\",\n ACTIVATION_SUCCESS:\"ACTIVATION_SUCCESS\",\n ACTIVATION_ERROR:\"ACTIVATION_ERROR\",\n WATCHLIST_ADD: \"WATCHLIST_ADD\",\n WATCHLIST_REMOVE: \"WATCHLIST_REMOVE\",\n FAVORITE_SHOW_ADD: \"FAVORITE_SHOW_ADD\",\n FAVORITE_SHOW_REMOVE: \"FAVORITE_SHOW_REMOVE\",\n SHARE_CONTENT: \"SHARE_CONTENT\",\n ADBLOCKERENABLED: \"ADBLOCKERENABLED\",\n \n UPNEXT_SHOW_BANNER:\"UPNEXT_SHOW_BANNER\",\n UPNEXT_SHOW_THUMBNAIL: \"UPNEXT_SHOW_THUMBNAIL\",\n UPNEXT_CLICK_BANNER: \"UPNEXT_CLICK_BANNER\",\n UPNEXT_CLICK_THUMBNAIL: \"UPNEXT_CLICK_THUMBNAIL\",\n \n SEARCHED_ITEM_CLICKED:\"SEARCHED_ITEM_CLICKED\",\n SEARCH_RESULT_QUICK_RESULT:\"SEARCH_RESULT_QUICK_RESULT\",\n\n SEARCH_SCREEN_OPENED:\"SEARCH_SCREEN_OPENED\",\n SEARCH_START:\"SEARCH_START\",\n SEARCH_COMPLETE:\"SEARCH_COMPLETE\",\n SEARCH_RESULT_CLICKED:\"SEARCH_RESULT_CLICKED\",\n SEARCH_VIEW: \"SEARCH_VIEW\",\n\n // SIGN UP FLOW EVENTS\n SIGN_UP_FORM: \"SIGN_UP_FORM\",\n SIGN_UP_EMAIL_ERROR: \"SIGN_UP_EMAIL_ERROR\",\n SIGN_UP_PASSWORD_ERROR: \"SIGN_UP_PASSWORD_ERROR\",\n SIGN_UP_ACCOUNT_EXISTS: \"SIGN_UP_ACCOUNT_EXISTS\",\n SIGN_UP_PROFILE: \"SIGN_UP_PROFILE\",\n SIGN_UP_PROFILE_ERROR: \"SIGN_UP_PROFILE_ERROR\",\n\n // SIGN UP SUCCESS EVENTS\n SIGN_UP_SUCCESS: \"SIGN_UP_SUCCESS\",\n\n // SIGN IN FLOW EVENTS\n SIGN_IN_FORM_EMAIL: \"SIGN_IN_FORM_EMAIL\",\n SIGN_IN_EMAIL_ERROR: \"SIGN_IN_EMAIL_ERROR\",\n SIGN_IN_PASSWORD_ERROR: \"SIGN_IN_PASSWORD_ERROR\",\n SIGN_IN_SOCIAL: \"SIGN_IN_SOCIAL\",\n SIGN_IN_PROFILE: \"SIGN_IN_PROFILE\",\n SIGN_IN_PROFILE_ERROR: \"SIGN_IN_PROFILE_ERROR\",\n SIGN_IN_ACCOUNT_LOCKED: \"SIGN_IN_ACCOUNT_LOCKED\",\n SIGN_IN_PASSWORD_FORGOT: \"SIGN_IN_PASSWORD_FORGOT\",\n SIGN_IN_PASSWORD_RESET: \"SIGN_IN_PASSWORD_RESET\",\n SIGN_IN_NEW_PASSWORD_ERROR: \"SIGN_IN_NEW_PASSWORD_ERROR\",\n};\n\nexport type tAllocatorPageEvent = (typeof eAllocatorPageEvent)[keyof typeof eAllocatorPageEvent];","type TrackData = {\n interactionCategory?: string;\n interactionType?: string;\n interactionName?: string;\n call_type?: string;\n carouselName?: string;\n carouselPosition?: string;\n carouselType?: string;\n cardsTotal?: string;\n cardPosition?: string;\n showGenre?: string;\n showContentFormatType?: string;\n showName?: string;\n showChannel?: string;\n carouselCta?: string;\n playbackTypeCta?: string;\n memberEmailHashed?: string;\n memberId?: string;\n memberLoginStatus?: string;\n siteSection?: string;\n categoryTotal?: string;\n categoryPosition?: string;\n};\n\nconst DEFAULT_VALUES: Record = {\n carouselName: \"No Carousel Title\",\n carouselPosition: \"na\",\n carouselCta: \"No Button CTA\",\n playbackTypeCta: \"No Link CTA\",\n showChannel: \"na\",\n cardPosition: \"na\",\n carouselType: \"List\",\n cardsTotal: \"na\",\n showGenre: \"na\",\n showContentFormatType: \"na\",\n showName: \"na\",\n memberId: \"na\",\n memberEmailHashed: \"na\",\n memberLoginStatus: \"na\",\n siteSection: \"na\",\n};\n\nconst getValueOrDefault = (value: any, key: string) => value ? value.toString() : undefined;\n\nconst trackClickedCarousel = (eventType: string, data: TrackData) => {\n window.tenService?.pageAllocator?.track(eventType, data);\n};\n\nconst removeTrailingHyphenAndNumber = (str: string) => str.replace(/-\\d+$/, '');\n\nexport function carouselTracking(entities: any[], position: number, title:string, eventType: string) {\n return function clickSlideHandlerWrapper(event: any, data: Record) {\n const mainTitle = title;\n\n if (typeof window !== 'undefined') {\n const { memberEmailHashed, memberId, memberLoginStatus, siteSection } = window.utag_data;\n const { cardIndex, genre, contentType, cardTitle, showChannel, interactionCategory, catTotal, catPosition, position } = data;\n const cardsTotal = entities.length;\n const carouselPosition = position ? position.toString(): undefined;\n const cardPosition = cardIndex ? cardIndex.toString() : undefined;\n const genreClean = genre ? genre : undefined;\n const intCategory = interactionCategory ? removeTrailingHyphenAndNumber(interactionCategory).toLocaleLowerCase() : undefined;\n const playbackTypeCta = \"live\";\n const carouselType = \"list\";\n const carouselCta = \"na\";\n const categoryTotal = catTotal ? catTotal.toString() : undefined;\n const categoryPosition = catPosition ? catPosition.toString() : undefined;\n\n const trackData: TrackData = {\n interactionCategory: intCategory,\n interactionType: \"Button Click\",\n interactionName: mainTitle,\n call_type: \"link\",\n carouselName: getValueOrDefault(mainTitle, 'carouselName'),\n carouselPosition: getValueOrDefault(carouselPosition, 'carouselPosition'),\n carouselType: getValueOrDefault(carouselType, 'carouselType'),\n cardsTotal: getValueOrDefault(cardsTotal, 'cardsTotal'),\n cardPosition: getValueOrDefault(cardPosition, 'cardPosition'),\n categoryTotal: getValueOrDefault(categoryTotal, 'categoryTotal'),\n categoryPosition: getValueOrDefault(categoryPosition, 'categoryPosition'),\n showGenre: getValueOrDefault(genreClean, 'showGenre'),\n showContentFormatType: getValueOrDefault(contentType, 'showContentFormatType'),\n showName: getValueOrDefault(cardTitle, 'showName'),\n showChannel: getValueOrDefault(showChannel, 'showChannel'),\n carouselCta: getValueOrDefault(carouselCta, 'carouselCta'),\n playbackTypeCta: getValueOrDefault(playbackTypeCta, 'playbackTypeCta'),\n memberEmailHashed: getValueOrDefault(memberEmailHashed, 'memberEmailHashed'),\n memberId: getValueOrDefault(memberId, 'memberId'),\n memberLoginStatus: getValueOrDefault(memberLoginStatus, 'memberLoginStatus'),\n siteSection: getValueOrDefault(siteSection, 'siteSection'),\n };\n\n // Remove properties with undefined or empty values\n Object.keys(trackData).forEach(key => {\n if (trackData[key as keyof TrackData] === undefined || trackData[key as keyof TrackData] === '') {\n delete trackData[key as keyof TrackData];\n }\n });\n trackClickedCarousel(eventType, trackData);\n \n }\n };\n}\n","import {iTealiumTrackingData, Tealium} from \"../tenTrack/tealiumTracking\";\nimport {jwtMember} from \"../tenMember/jwt/cacheStatus\";\nimport {eUtag} from \"../ten/env.utag\";\n\nexport interface iTPWPTealiumTrackingData extends iTealiumTrackingData {\n memberId?: string,\n memberEmailHashed?: string,\n memberLoginStatus?: \"logged-in\" | \"logged-out\",\n showProgramClassification?: string,\n}\n\nconst uTagLinkTrackProps = {\n\n click_carousel: [\n eUtag.carouselName,\n eUtag.carouselPosition,\n eUtag.contentType,\n eUtag.genre,\n ],\n carousel_click: [\n eUtag.carouselName,\n eUtag.carouselPosition,\n eUtag.carouselType,\n eUtag.cardsTotal,\n eUtag.cardPosition,\n eUtag.showContentFormatType,\n eUtag.showName,\n eUtag.showChannel,\n eUtag.carouselCta,\n eUtag.playbackTypeCta,\n ],\n liveCategory: [\n eUtag.carouselName,\n eUtag.carouselPosition,\n eUtag.carouselType,\n eUtag.cardsTotal,\n eUtag.cardPosition,\n eUtag.showContentFormatType,\n eUtag.showName,\n eUtag.showChannel,\n eUtag.carouselCta,\n eUtag.playbackTypeCta,\n ],\n view_carousel: [\n eUtag.carouselName,\n eUtag.carouselPosition,\n eUtag.contentType,\n eUtag.genre,\n ],\n click_marquee: [\n eUtag.carouselName,\n eUtag.carouselPosition,\n eUtag.contentType,\n eUtag.genre,\n eUtag.showName,\n eUtag.ctaButton,\n ],\n marquee_impression: [\n eUtag.carouselName,\n eUtag.carouselPosition,\n eUtag.contentType,\n eUtag.showName,\n eUtag.genre,\n ],\n user_signup: [\n eUtag.memberAge,\n eUtag.memberEmailHashed,\n eUtag.memberFavoriteGenre,\n eUtag.memberGender,\n eUtag.memberId,\n eUtag.memberLinkedSocialAccounts,\n eUtag.memberLoginStatus,\n eUtag.memberNameFirst,\n eUtag.memberNameLast,\n eUtag.memberOzTamId,\n eUtag.memberPostcode,\n eUtag.memberState,\n eUtag.memberSuburb,\n eUtag.pageContentName,\n eUtag.SignUpLeadSource,\n eUtag.SignUpLeadPage,\n eUtag.SignUpLeadShow,\n eUtag.memberEmail,\n ],\n user_signin: [\n eUtag.memberAge,\n eUtag.memberEmailHashed,\n eUtag.memberFavoriteGenre,\n eUtag.memberGender,\n eUtag.memberId,\n eUtag.memberLinkedSocialAccounts,\n eUtag.memberLoginStatus,\n eUtag.memberNameFirst,\n eUtag.memberNameLast,\n eUtag.memberOzTamId,\n eUtag.memberPostcode,\n eUtag.memberState,\n eUtag.memberSuburb,\n eUtag.pageContentName,\n eUtag.memberEmail,\n ],\n user_update: [\n eUtag.memberAge,\n eUtag.memberEmailHashed,\n eUtag.memberFavoriteGenre,\n eUtag.memberGender,\n eUtag.memberId,\n eUtag.memberLinkedSocialAccounts,\n eUtag.memberLoginStatus,\n eUtag.memberNameFirst,\n eUtag.memberNameLast,\n eUtag.memberOzTamId,\n eUtag.memberPostcode,\n eUtag.memberState,\n eUtag.memberSuburb,\n eUtag.pageContentName,\n eUtag.memberEmail,\n ],\n user_signout: [\n eUtag.memberAge,\n eUtag.memberEmailHashed,\n eUtag.memberFavoriteGenre,\n eUtag.memberGender,\n eUtag.memberId,\n eUtag.memberLinkedSocialAccounts,\n eUtag.memberLoginStatus,\n eUtag.memberNameFirst,\n eUtag.memberOzTamId,\n eUtag.memberPostcode,\n eUtag.memberState,\n eUtag.memberSuburb,\n eUtag.pageContentName,\n ],\n activation_success: [\n eUtag.memberAge,\n eUtag.memberEmailHashed,\n eUtag.memberFavoriteGenre,\n eUtag.memberGender,\n eUtag.memberId,\n eUtag.memberLinkedSocialAccounts,\n eUtag.memberLoginStatus,\n eUtag.memberNameFirst,\n eUtag.memberOzTamId,\n eUtag.memberPostcode,\n eUtag.memberState,\n eUtag.memberSuburb,\n eUtag.pageContentName,\n ],\n activation_error: [\n eUtag.memberAge,\n eUtag.memberEmailHashed,\n eUtag.memberFavoriteGenre,\n eUtag.memberGender,\n eUtag.memberId,\n eUtag.memberLinkedSocialAccounts,\n eUtag.memberLoginStatus,\n eUtag.memberNameFirst,\n eUtag.memberOzTamId,\n eUtag.memberPostcode,\n eUtag.memberState,\n eUtag.memberSuburb,\n eUtag.pageContentName,\n ],\n watchlist_add: [\n eUtag.memberLoginStatus,\n eUtag.pageContentName,\n eUtag.showChannel,\n eUtag.showContentFormatType,\n eUtag.showContentName,\n eUtag.showContentVideoType,\n eUtag.showGenre,\n eUtag.showGenreSecondary,\n eUtag.showKey,\n eUtag.showName,\n eUtag.showProgramClassification,\n ],\n watchlist_remove: [\n eUtag.memberLoginStatus,\n eUtag.pageContentName,\n eUtag.showChannel,\n eUtag.showContentFormatType,\n eUtag.showContentName,\n eUtag.showContentVideoType,\n eUtag.showGenre,\n eUtag.showGenreSecondary,\n eUtag.showKey,\n eUtag.showName,\n eUtag.showProgramClassification,\n ],\n favorite_show_add: [\n eUtag.deviceType,\n eUtag.memberLoginStatus,\n eUtag.siteDomain,\n eUtag.siteName,\n eUtag.siteSection,\n ],\n favorite_show_remove: [\n eUtag.deviceType,\n eUtag.memberLoginStatus,\n eUtag.siteDomain,\n eUtag.siteName,\n eUtag.siteSection,\n ],\n share_content: [\n eUtag.memberLoginStatus,\n eUtag.pageContentId,\n eUtag.pageContentName,\n eUtag.pageContentType,\n //eUtag.shareChannel, value from interacted UI element\n ],\n sign_up_form: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_up_email_error: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_up_password_error: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_up_account_exists: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_up_profile: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_up_profile_error: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_up_success: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_in_form_email: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_in_email_error: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_in_password_error: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_in_form_social: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_in_form_profile: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_in_form_error: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_in_form_locked: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_in_password_forgot: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n sign_in_password_reset: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ],\n search_screen: [\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.n10adId,\n eUtag.siteSection,\n eUtag.siteSubSection1,\n eUtag.siteSubSection2,\n ],\n searchStart: [\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.n10adId,\n eUtag.siteSection,\n eUtag.siteSubSection1,\n eUtag.siteSubSection2,\n ],\n searchComplete: [\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.n10adId,\n eUtag.siteSection,\n eUtag.siteSubSection1,\n eUtag.siteSubSection2,\n ],\n search_view: [\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.n10adId,\n eUtag.siteSection,\n eUtag.siteSubSection1,\n eUtag.siteSubSection2,\n eUtag.siteDomain,\n eUtag.deviceType\n ],\n searchResultsSelect: [\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.n10adId,\n eUtag.siteSection,\n eUtag.siteSubSection1,\n eUtag.siteSubSection2,\n ],\n sign_in_new_password_error: [\n eUtag.deviceModelId,\n eUtag.tealium_visitor_id,\n eUtag.tealium_session_id,\n eUtag.memberLoginStatus,\n eUtag.memberId,\n eUtag.memberEmailHashed,\n eUtag.memberAge,\n eUtag.memberGender,\n eUtag.memberPostcode,\n eUtag.memberFavoriteGenre,\n eUtag.tealium_timestamp_utc,\n eUtag.timestamp_unix,\n ]\n};\n\nexport class TPWPTealium extends Tealium {\n // different project might have different break points\n private watchPercentageCounter = new WatchPercentageCounter([0.25, 0.5, 0.9]);\n\n protected getGeneralData(mediaInfo): iTPWPTealiumTrackingData {\n const result: iTPWPTealiumTrackingData = super.getGeneralData(mediaInfo);\n\n if (jwtMember.isLoggedIn()) {\n result.memberId = jwtMember.getMemberId();\n result.memberEmailHashed = jwtMember.getMemberEmailHashed();\n result.memberLoginStatus = jwtMember.isLoggedIn() ? \"logged-in\" : \"logged-out\";\n }\n\n return result;\n }\n\n public watchedPercentage(watchedPercentage: number) {\n const eventPercentage = this.watchPercentageCounter.shouldTrack(watchedPercentage);\n\n if (eventPercentage) {\n let tealiumData;\n if (typeof window !== \"undefined\"){\n tealiumData = (window as any).TealiumData || {};\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo[eUtag.showProgramClassification] = tealiumData.showProgramClassification || \"\";\n this.mediaTrackingInfo[eUtag.tealium_event] = `video_watched_${eventPercentage * 100}`;\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n })\n }\n }\n }\n\n private utagLinkTrackUtil = function(event, utag, additionalObject?){\n let tealiumData;\n if (typeof window !== \"undefined\"){\n tealiumData = (window as any).TealiumData;\n if (tealiumData && uTagLinkTrackProps[event]) {\n const trackingObject = {};\n uTagLinkTrackProps[event].forEach(prop=>{\n tealiumData[prop] && (trackingObject[prop] = tealiumData[prop]);\n });\n trackingObject[eUtag.tealium_event] = event;\n additionalObject && Object.assign(trackingObject, additionalObject);\n this.push(()=>{\n this.utag.link(trackingObject);\n })\n }\n }\n };\n\n public onCarouselClick(eventData){\n this.utagLinkTrackUtil(\"carousel_click\", this.utag, eventData);\n }\n public onCategoryClick(eventData){\n this.utagLinkTrackUtil(\"liveCategory\", this.utag, eventData);\n }\n public onMarqueeClicked(eventData){\n this.utagLinkTrackUtil(\"carousel_click\", this.utag, eventData);\n }\n public onMarqueeImpression(eventData){\n //this.utagLinkTrackUtil(\"marquee_impression\", this.utag, eventData);\n }\n public onCarouselLoad(eventData){\n //this.utagLinkTrackUtil(\"view_carousel\", this.utag, eventData);\n }\n public onUserSignup(eventData){\n this.utagLinkTrackUtil(\"user_signup\", this.utag, eventData);\n }\n public onUserSignin(eventData){\n this.utagLinkTrackUtil(\"user_signin\", this.utag, eventData);\n }\n public onUserUpdate(eventData){\n this.utagLinkTrackUtil(\"user_update\", this.utag, eventData);\n }\n public onUserSignout(eventData){\n this.utagLinkTrackUtil(\"user_signout\", this.utag, eventData);\n }\n public onWatchlistAdd(){\n this.utagLinkTrackUtil(\"watchlist_add\", this.utag);\n }\n public onWatchlistRemove(){\n this.utagLinkTrackUtil(\"watchlist_remove\", this.utag);\n }\n public onFavoriteShowAdd(eventData){\n this.utagLinkTrackUtil(\"favorite_show_add\", this.utag, eventData);\n }\n public onFavoriteShowRemove(eventData){\n this.utagLinkTrackUtil(\"favorite_show_remove\", this.utag, eventData);\n }\n public onShareContent(platform){\n this.utagLinkTrackUtil(\"share_content\", this.utag, {\n [eUtag.shareChannel]: platform\n });\n }\n public onSearchScreen(eventData){\n this.utagLinkTrackUtil(\"search_screen\", this.utag, eventData);\n }\n public onSearchView(eventData){\n this.utagLinkTrackUtil(\"search_view\", this.utag, eventData);\n }\n public onSearchStart(eventData){\n this.utagLinkTrackUtil(\"searchStart\", this.utag, eventData);\n }\n public onSearchComplete(eventData){\n this.utagLinkTrackUtil(\"searchComplete\", this.utag, eventData);\n }\n public onSearchResultClick(eventData){\n this.utagLinkTrackUtil(\"searchResultsSelect\", this.utag, eventData);\n }\n // SIGN UP FLOW EVENTS\n public onUserSigUpForm(eventData){\n this.utagLinkTrackUtil(\"sign_up_form\", this.utag, eventData);\n }\n public onUserSignUpEmailError(eventData){\n this.utagLinkTrackUtil(\"sign_up_email_error\", this.utag, eventData);\n }\n public onUserSignUpPasswordError(eventData){\n this.utagLinkTrackUtil(\"sign_up_password_error\", this.utag, eventData);\n }\n public onUserSignUpAccountExists(eventData){\n this.utagLinkTrackUtil(\"sign_up_account_exists\", this.utag, eventData);\n }\n public onUserSignUpProfile(eventData){\n this.utagLinkTrackUtil(\"sign_up_profile\", this.utag, eventData);\n }\n public onUserSignUpProfileError(eventData){\n this.utagLinkTrackUtil(\"sign_up_profile_error\", this.utag, eventData);\n }\n public onUserSignUpSuccess(eventData){\n this.utagLinkTrackUtil(\"sign_up_success\", this.utag, eventData);\n }\n // SIGN IN FLOW EVENTS\n public onUserSignInFormEmail(eventData){\n this.utagLinkTrackUtil(\"sign_in_form_email\", this.utag, eventData);\n }\n public onUserSignInEmailError(eventData){\n this.utagLinkTrackUtil(\"sign_in_email_error\", this.utag, eventData);\n }\n public onUserSignInPasswordError(eventData){\n this.utagLinkTrackUtil(\"sign_in_password_error\", this.utag, eventData);\n }\n public onUserSignInSocial(eventData){\n this.utagLinkTrackUtil(\"sign_in_social\", this.utag, eventData);\n }\n public onUserSignInProfile(eventData){\n this.utagLinkTrackUtil(\"sign_in_profile\", this.utag, eventData);\n }\n public onUserSignInProfileError(eventData){\n this.utagLinkTrackUtil(\"sign_in_profile_error\", this.utag, eventData);\n }\n public onUserSignInLocked(eventData){\n this.utagLinkTrackUtil(\"sign_in_account_locked\", this.utag, eventData);\n }\n public onUserSignInPasswordForgot(eventData){\n this.utagLinkTrackUtil(\"sign_in_password_forgot\", this.utag, eventData);\n }\n public onUserSignInPasswordReset(eventData){\n this.utagLinkTrackUtil(\"sign_in_password_reset\", this.utag, eventData);\n }\n public onUserSignInNewPasswordError(eventData){\n this.utagLinkTrackUtil(\"sign_in_new_password_error\", this.utag, eventData);\n }\n // ACTIVATION FLOW EVENTS\n public onActivationSuccess(eventData){\n this.utagLinkTrackUtil(\"activation_success\", this.utag, eventData);\n }\n public onActivationError(eventData){\n this.utagLinkTrackUtil(\"activation_error\", this.utag, eventData);\n }\n}\n\n\nclass WatchPercentageCounter {\n private trackedPercentage = 0;\n\n constructor(private breakpoints: Array) {\n\n }\n\n public shouldTrack(watchedPercentage) {\n let shouldTrackBreakpoint = this.breakpoints.find(breakpoint => {\n return this.trackedPercentage < breakpoint && watchedPercentage > breakpoint;\n });\n\n if (shouldTrackBreakpoint) {\n this.trackedPercentage = watchedPercentage;\n return shouldTrackBreakpoint;\n }\n }\n}","import {eDebug_Title} from \"../ten/env.enum\";\nimport {CallStack} from \"../@util/callStack\";\nimport {Tracking} from \"../@util/abstract/tracking\";\n\nexport interface iTealiumExtraInfo {\n genre: string,\n genreSecondary: string,\n}\n\nexport interface iTealiumTrackingData {\n showName: string,\n showKey: string,\n showEpisodeName: string,\n showEpisodeVideoType: string,\n showChannel: string,\n showContentName: string,\n showContentVideoType: string,\n showContentFormatType: string,\n showGenre: string,\n showGenreSecondary: string,\n}\n\nexport class Tealium extends CallStack implements Tracking{\n protected mediaInfo;\n protected utag;\n protected mediaTrackingInfo;\n protected extraInfo: iTealiumExtraInfo = {} as any;\n\n constructor() {\n super({\n variable: window,\n property: \"utag\",\n log: eDebug_Title.tealium\n });\n this.push(()=>{\n this.utag = (window as any).utag || {};\n this.utag.track = this.utag.track || function(){\n console.error(\"utag is not availabe\");\n };\n })\n }\n\n // todo - depreciated\n static isLibReady () {\n return !!(window as any).utag;\n }\n\n public addExtraVideoInfo(extraInfo) {\n Object.assign(this.extraInfo, extraInfo);\n }\n\n /**\n * should return string\n */\n protected getMediaGenre() {\n const genre: any = this.extraInfo.genre;\n return genre && Array.isArray(genre) && genre.join(\",\") || genre;\n }\n protected getMediaGenreSecondary() {\n const genre: any = this.extraInfo.genreSecondary;\n return genre && Array.isArray(genre) && genre.join(\",\") || genre;\n }\n\n protected getGeneralData (mediaInfo): iTealiumTrackingData {\n let custom_fields = mediaInfo.custom_fields;\n return {\n showName: custom_fields.tv_show,\n showKey: (function () {\n let tvEpisode = custom_fields.tv_episode;\n if (!tvEpisode) {\n return \"\";\n }\n\n let subStringAsKeyMatch = tvEpisode.match(/([a-zA-Z0-9]{1,}[^0-9]{1,})[0-9]{0,}\\//);\n return subStringAsKeyMatch && subStringAsKeyMatch.length >= 2 ? subStringAsKeyMatch[1] : \"\";\n })(),\n showEpisodeName: custom_fields.clip_title,\n showEpisodeVideoType: custom_fields.video_type_long_form,\n showChannel: custom_fields.tv_channel,\n showContentName: mediaInfo.name,\n showContentVideoType: custom_fields.video_type_long_form,\n showContentFormatType: custom_fields.video_type_long_form === \"Full Episode\" ? \"Long Form\" : \"Short Form\",\n showGenre: this.getMediaGenre(),\n showGenreSecondary: this.getMediaGenreSecondary(),\n }\n }\n\n load(mediaInfo) {\n this.mediaInfo = mediaInfo;\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_load\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n firstPlay () {\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_first_play\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n seeking () {\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_seeking\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n finished () {\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_finished\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n segmentView () {\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"video_segment_view\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n adStart () {\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"ad_start\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n adEnd () {\n if (!this.mediaInfo) {\n return;\n }\n this.mediaTrackingInfo = this.getGeneralData(this.mediaInfo);\n this.mediaTrackingInfo.tealium_event = \"ad_end\";\n this.push(()=>{\n this.utag.track(\"link\", this.mediaTrackingInfo);\n });\n }\n\n public dispose() {\n super.dispose();\n }\n\n public stopTracking() {\n this.dispose();\n }\n};","export const tvid_callback = (tvid) => {\n localStorage.setItem('tvid_callback', tvid);\n}","import {Allocator} from \"./track.allocator\";\n\nexport const eAllocatorPageEventDefault = {\n PAGE_VIEW: \"PAGE_VIEW\"\n};\n\nexport interface iAllocator_Page_DataSource {\n // todo need to workout a list of page properties that is common among projects\n\n\n}\n\nexport class Allocator_Page_Base extends Allocator{\n public track(event, data?: iAllocator_Page_DataSource) {\n switch (event) {\n case eAllocatorPageEventDefault.PAGE_VIEW:\n this.onPageView(data);\n break;\n }\n }\n private onPageView(pageInfo?: iAllocator_Page_DataSource) {\n\n }\n}","import {Log} from \"../ten/env.util\";\nimport {iTrackingService} from \"../ten/conf.env\";\nimport {eDebug_Title} from \"../ten/env.enum\";\n\n\nexport enum eAllocatorService {\n oztam = \"oztam\",\n omniture = \"omniture\",\n nielsen = \"nielsen\",\n tealium = \"tealium\",\n}\n\nexport class Allocator extends Log{\n protected serviceConfig: iTrackingService;\n\n // The name of all tracking services that go through any type of allocator will be listed, their service config should be given in constructor\n protected oztam: any;\n protected omniture: any;\n protected nielsen: any;\n protected tealium: any;\n\n\n constructor (serviceConfig: iTrackingService) {\n super(eDebug_Title.allocator);\n\n this.serviceConfig = serviceConfig;\n }\n}","import {iBCConfig, iTrackingService} from \"../ten/conf.env\";\nimport {dataModels, dataModelUtil, iMediaInfo} from \"./track.dataModel\";\nimport {Allocator, eAllocatorService} from \"./track.allocator\";\n\nexport enum eAllocatorEvent {\n LOAD = \"LOAD\",\t\t// video loaded event\n LOADED_METADATA = \"LOADED_METADATA\",\n START = \"START\",\t\t// video play start, includes ads\n FIRST_PLAY = \"FIRST_PLAY\", // video content first play\n TIME_UPDATE = \"TIME_UPDATE\",\n PLAY = \"PLAY\",\t\t// video continue/resume play after ads\n PAUSE = \"PAUSE\",\t\t// user paused video\n UN_PAUSE = \"UN_PAUSE\",\n RESUME = \"RESUME\",\t// user resumed video\n PROGRESS = \"PROGRESS\",\t// video in progress\n SEGMENT_VIEW = \"SEGMENT_VIEW\",\n CLOSE_THE_END = \"CLOSE_THE_END\", // 98% finished / 7 seconds of short episode left\n COMPLETE = \"COMPLETE\",\t// video completed\n SEEKING = \"SEEKING\",\n SEEKED = \"SEEKED\",\n AD_BEGIN = \"AD_BEGIN\",\n AD_COMPLETE = \"AD_COMPLETE\",\n AD_BREAK_START = \"AD_BREAK_START\",\n AD_BREAK_END = \"AD_BREAK_END\",\n AD_PAUSE = \"AD_PAUSE\",\n AD_RESUME = \"AD_RESUME\",\n BEFORE_UNLOAD_PAGE = \"BEFORE_UNLOAD_PAGE\",\n BEFORE_CHANGE_SOURCE = \"BEFORE_CHANGE_SOURCE\",\n SWITCHING_SOURCE = \"SWITCHING_SOURCE\", // todo be might safe to remove\n SWITCHED_SOURCE = \"SWITCHED_SOURCE\", // todo be might safe to remove\n}\n\n\n\nexport class Allocator_Video extends Allocator{\n /**\n * Supported tracking events - ENUM object.\n * @enum {string}\n */\n static Events = eAllocatorEvent;\n\n /**\n * private properties\n */\n private eventTimestamp;\n private calledFirstPlay = false;\n private calledPrerollBreakStart = false;\n\n private _firstRoundPlay = true;\n set firstRoundPlay(bool) {\n this._firstRoundPlay = bool;\n }\n get firstRoundPlay() {\n return this._firstRoundPlay;\n }\n\n protected serviceConfig: iTrackingService;\n\n /**\n * implemented in child class of project folder.\n * IMPORTANT these function reset tracking property inside function.\n */\n protected initTealium (): void {};\n protected initOztam (): void {};\n protected initOmniture (): void {};\n protected initNielsen (): void {};\n\n protected initExtraInfo(): void {};\n\n /**\n * public properties\n */\n public trackingOnHold = false; // true - ignore all tracking before it change to true\n\n constructor (serviceConfig: iTrackingService) {\n super(serviceConfig);\n\n this.eventTimestamp = {};\n }\n\n private updateEventTimestamp (eventName: eAllocatorEvent) {\n this.eventTimestamp[eventName] = Date.now();\n }\n\n public updateExtraInfo (extraInfo) {\n Object.keys(eAllocatorService).forEach(serviceName => {\n this[serviceName] &&\n this[serviceName].addExtraVideoInfo &&\n this[serviceName].addExtraVideoInfo(extraInfo);\n })\n }\n\n public stopTracking(serviceName?: eAllocatorService) {\n if (serviceName) {\n this[serviceName] &&\n this[serviceName].stopTracking &&\n this[serviceName].stopTracking();\n } else {\n Object.keys(eAllocatorService).forEach(serviceName => {\n this[serviceName] &&\n this[serviceName].stopTracking &&\n this[serviceName].stopTracking();\n });\n }\n }\n private resetTrackingState = () => {\n this.firstRoundPlay = true;\n this.stopTracking();\n this.eventTimestamp = {};\n this.calledFirstPlay = false;\n this.calledPrerollBreakStart = false;\n };\n public resetTrackingService() {\n this.resetTrackingState();\n\n delete this.tealium;\n this.initTealium();\n delete this.oztam;\n this.initOztam();\n delete this.omniture;\n this.initOmniture();\n delete this.nielsen;\n this.initNielsen();\n\n this.initExtraInfo && this.initExtraInfo();\n }\n\n\n /**\n * video events\n */\n public track(event: eAllocatorEvent, data?, playerRef?) {\n if (this.trackingOnHold) {\n return;\n }\n\n let checkMediaInfoModel = [\n eAllocatorEvent.LOAD,\n eAllocatorEvent.START,\n eAllocatorEvent.FIRST_PLAY,\n eAllocatorEvent.PLAY,\n eAllocatorEvent.PAUSE,\n eAllocatorEvent.UN_PAUSE,\n eAllocatorEvent.RESUME,\n eAllocatorEvent.COMPLETE,\n eAllocatorEvent.AD_BREAK_START,\n eAllocatorEvent.AD_BREAK_END\n ];\n if (checkMediaInfoModel.indexOf(event) >= 0) {\n let videoType = data && typeof (data as iMediaInfo).custom_fields === \"object\" ?\n (data as iMediaInfo).custom_fields.video_type_long_form : undefined;\n if (!dataModelUtil.matchModel(dataModels.mediaInfo(videoType), data)) {\n this.logCatch(\"Video data is not complete\");\n return;\n }\n }\n\n let checkAdInfoModel = [\n eAllocatorEvent.AD_BEGIN,\n eAllocatorEvent.AD_PAUSE,\n eAllocatorEvent.AD_RESUME,\n eAllocatorEvent.AD_COMPLETE\n ];\n if (checkAdInfoModel.indexOf(event) >= 0) {\n if (!dataModelUtil.matchModel(dataModels.adInfo, data)) {\n this.logCatch(\"Ad data is not complete\");\n return;\n }\n }\n\n let checkPlayerRef = [\n eAllocatorEvent.LOAD,\n eAllocatorEvent.FIRST_PLAY, // vjsplayer\n eAllocatorEvent.PLAY, // vjsplayer\n eAllocatorEvent.PAUSE, // vjsplayer\n eAllocatorEvent.RESUME, // vjsplayer\n eAllocatorEvent.SEEKED,\n eAllocatorEvent.AD_BEGIN, // ad player\n eAllocatorEvent.AD_PAUSE, // ad player\n eAllocatorEvent.AD_RESUME, // ad player\n eAllocatorEvent.AD_BREAK_END // vjsplayer\n ];\n if (checkPlayerRef.indexOf(event) >= 0) {\n if (!playerRef || typeof playerRef.currentTime !== \"function\") {\n this.logCatch(\"player reference is missing\");\n return;\n }\n }\n\n let eventWillBeHandled = true; // todo this might cause confusion, improve it\n switch (event) {\n case eAllocatorEvent.LOAD:\n this.onLoad();\n break;\n case eAllocatorEvent.LOADED_METADATA:\n this.onLoadedMetadata(data, playerRef);\n break;\n case eAllocatorEvent.START:\n this.onStart(data, playerRef);\n break;\n case eAllocatorEvent.FIRST_PLAY:\n this.calledFirstPlay = true;\n this.onFirstPlay(data, playerRef);\n break;\n case eAllocatorEvent.PLAY:\n\n break;\n case eAllocatorEvent.PAUSE:\n this.onPause(data, playerRef);\n break;\n case eAllocatorEvent.UN_PAUSE:\n this.onUnpause(data, playerRef);\n break;\n case eAllocatorEvent.RESUME:\n this.onResume(data, playerRef);\n break;\n case eAllocatorEvent.PROGRESS:\n this.onProgress();\n break;\n case eAllocatorEvent.SEGMENT_VIEW:\n this.onSegmentView();\n break;\n case eAllocatorEvent.CLOSE_THE_END:\n // todo this logic should be improved\n if (!this.eventTimestamp[event] ||\n Date.now() - this.eventTimestamp[event] > 3000) {\n this.onCloseTheEnd();\n } else {\n eventWillBeHandled = false;\n }\n break;\n case eAllocatorEvent.COMPLETE:\n this.onComplete(data);\n break;\n case eAllocatorEvent.SEEKING:\n this.onSeeking();\n break;\n case eAllocatorEvent.SEEKED:\n this.onSeeked(data, playerRef);\n break;\n case eAllocatorEvent.AD_BEGIN:\n this.onAdBegin(data, playerRef);\n break;\n case eAllocatorEvent.AD_PAUSE:\n this.onAdPause(data, playerRef);\n break;\n case eAllocatorEvent.AD_RESUME:\n this.onAdResume(data, playerRef);\n break;\n case eAllocatorEvent.AD_COMPLETE:\n this.onAdComplete(data);\n break;\n case eAllocatorEvent.AD_BREAK_START:\n if (!this.calledFirstPlay) {\n this.calledPrerollBreakStart = true;\n }\n this.onAdBreakStart(data);\n break;\n case eAllocatorEvent.AD_BREAK_END:\n this.onAdBreakEnd(data, playerRef);\n break;\n case eAllocatorEvent.BEFORE_UNLOAD_PAGE:\n this.beforeUnloadPage();\n break;\n case eAllocatorEvent.BEFORE_CHANGE_SOURCE:\n this.beforeChangeSource();\n break;\n }\n if (eventWillBeHandled) {\n this.log(`tracking event ${event} called`);\n }\n\n /**\n * record last called time of the events\n */\n this.updateEventTimestamp(event);\n }\n\n /**\n * exceptions that allocator should not track\n */\n private validationHost: [Array, (e)=> boolean][] = [];\n protected validate(event): boolean {\n for (let i=0;i< this.validationHost.length; i++) {\n let validation = this.validationHost[i];\n if (validation[0].indexOf(event) >= 0) {\n return validation[1](event);\n }\n }\n return true;\n }\n public registerValidation(events: Array, validatorCB: (e)=> boolean) {\n this.validationHost.push([events, validatorCB]);\n }\n\n /**\n * event handlers\n */\n\n private onLoad() {\n\n }\n\n public onLoadedMetadata(mediainfo, playerRef) {\n this.firstRoundPlay && this.oztam && this.oztam.onLoadedMetadata && this.oztam.onLoadedMetadata(mediainfo, playerRef);\n this.firstRoundPlay && this.omniture && this.omniture.onLoadedMetadata && this.omniture.onLoadedMetadata(mediainfo, playerRef);\n this.firstRoundPlay && this.nielsen && this.nielsen.videoLoadMetadata && this.nielsen.videoLoadMetadata(mediainfo, playerRef);\n this.tealium && this.tealium.load && this.tealium.load(mediainfo);\n }\n\n // occur once, before trigger first play event\n private onStart(mediainfo, playerRef) {\n if (playerRef.ads && [\"adserror\"].indexOf(playerRef.ads.triggerevent) < 0) {\n mediainfo.hasPreroll = true;\n }\n }\n\n private onReplay(mediainfo, playerRef) {\n this.nielsen && this.nielsen.videoStartMetadata && this.nielsen.videoStartMetadata(mediainfo);\n }\n\n // real video content started playing\n protected onFirstPlay(mediainfo, playerRef) {\n if (!this.calledPrerollBreakStart) {\n this.nielsen && this.nielsen.videoStartMetadata && this.nielsen.videoStartMetadata(mediainfo);\n }\n this.nielsen && this.nielsen.videoFirstPlayMetadata && this.nielsen.videoFirstPlayMetadata(mediainfo, playerRef);\n if (this.firstRoundPlay) {\n this.oztam && this.oztam.onFirstPlay && this.oztam.onFirstPlay(mediainfo, playerRef);\n this.omniture && this.omniture.onFirstPlay && this.omniture.onFirstPlay(mediainfo, playerRef);\n }\n this.tealium && this.tealium.firstPlay && this.tealium.firstPlay();\n }\n\n private onPause(mediainfo, playerRef) {\n if (this.validate(eAllocatorEvent.PAUSE)) {\n this.nielsen && this.nielsen.videoPause && this.nielsen.videoPause(mediainfo, playerRef);\n this.oztam && this.oztam.onPause && this.oztam.onPause();\n }\n }\n\n private onUnpause(mediainfo, playerRef) {\n if (this.validate(eAllocatorEvent.UN_PAUSE)) {\n this.nielsen && this.nielsen.videoUnpause && this.nielsen.videoUnpause(mediainfo, playerRef);\n this.oztam && this.oztam.onUnPause && this.oztam.onUnPause(mediainfo, playerRef);\n }\n\n if (!this.firstRoundPlay && playerRef.currentTime() === 0) {\n this.onReplay(mediainfo, playerRef);\n }\n }\n\n private onResume(mediainfo, playerRef) {\n\n }\n\n private onProgress() {\n\n }\n\n protected onSegmentView() {\n if (this.firstRoundPlay) {\n this.omniture && this.omniture.onSegment && this.omniture.onSegment();\n }\n this.tealium && this.tealium.segmentView();\n }\n\n private onCloseTheEnd() {\n if (this.firstRoundPlay) {\n this.omniture && this.omniture.onComplete && this.omniture.onComplete();\n }\n }\n\n private onComplete(mediainfo) {\n this.nielsen && this.nielsen.videoEndMetadata && this.nielsen.videoEndMetadata(mediainfo);\n this.firstRoundPlay && this.oztam && this.oztam.onComplete && this.oztam.onComplete();\n this.tealium && this.tealium.finished && this.tealium.finished();\n\n // as last thing, set state of firstRoundPlay to false, so tracking of replay can be identified\n this.firstRoundPlay = false;\n }\n\n private onSeeking(){\n if (this.validate(eAllocatorEvent.SEEKING)) {\n this.oztam && this.oztam.onSeeking && this.oztam.onSeeking();\n this.tealium && this.tealium.seeking && this.tealium.seeking();\n }\n }\n\n private onSeeked(mediainfo, playerRef){\n if (this.validate(eAllocatorEvent.SEEKED)) {\n this.oztam && this.oztam.onSeeked && this.oztam.onSeeked(mediainfo, playerRef);\n }\n }\n\n private onAdBegin(adInfo, playerRef) {\n this.nielsen && this.nielsen.adPlayMetadata && this.nielsen.adPlayMetadata(adInfo, playerRef);\n this.oztam && this.oztam.onAdBegin && this.oztam.onAdBegin();\n this.tealium && this.tealium.adStart && this.tealium.adStart();\n this.omniture && this.omniture.onAdStart && this.omniture.onAdStart(adInfo);\n }\n\n private onAdPause(adInfo, playerRef) {\n this.nielsen && this.nielsen.adPause && this.nielsen.adPause(adInfo, playerRef);\n }\n\n private onAdResume(adInfo, playerRef) {\n this.nielsen && this.nielsen.adResume && this.nielsen.adResume(adInfo, playerRef);\n }\n\n private onAdComplete(adInfo) {\n this.nielsen && this.nielsen.adStopMetadata && this.nielsen.adStopMetadata(adInfo);\n this.oztam && this.oztam.onAdComplete && this.oztam.onAdComplete();\n this.tealium && this.tealium.adEnd && this.tealium.adEnd();\n this.omniture && this.omniture.onAdComplete && this.omniture.onAdComplete(adInfo);\n }\n\n protected onAdBreakStart(mediainfo) {\n // special break start behaviour\n if (this.calledFirstPlay) {\n // midroll\n } else {\n // preroll\n this.nielsen && this.nielsen.setHasPreroll && this.nielsen.setHasPreroll();\n this.nielsen && this.nielsen.videoStartMetadata && this.nielsen.videoStartMetadata(mediainfo);\n }\n\n // all break start behavior\n this.nielsen && this.nielsen.adBreakStart && this.nielsen.adBreakStart(mediainfo);\n this.oztam && this.oztam.onAdBreakStart && this.oztam.onAdBreakStart();\n this.omniture && this.omniture.onAdBreakStart && this.omniture.onAdBreakStart();\n }\n\n protected onAdBreakEnd(mediainfo, playerRef) {\n this.nielsen && this.nielsen.adBreakEnd && this.nielsen.adBreakEnd(mediainfo, playerRef);\n this.oztam && this.oztam.onAdBreakEnd && this.oztam.onAdBreakEnd(mediainfo, playerRef);\n this.omniture && this.omniture.onAdBreakComplete && this.omniture.onAdBreakComplete();\n }\n\n private beforeChangeSource () {\n this.stopTracking();\n }\n\n private beforeUnloadPage() {\n this.stopTracking();\n }\n}","/**\n * dataModels defines tracking data standard structure.
    \n * this object defines data standard of multiple data model about page, media and ads.\n *
    • 1 means must have
    • \n *
    • 0 means optional
    \n * this definition does not care the value, if value is unexpected empty, should be fixed in each player's \"DataMod\" method\n * @mixin\n */\n\nexport let triggeredErrors = [];\n\nexport interface iPageInfo {\n page_nav_title: string;\n page_name: string;\n content_type: string;\n content_title: string;\n content_id: string;\n platform: string;\n tv_channel: string;\n tv_show: string;\n section: string;\n sub_section_1?: any;\n sub_section_2?: any;\n sub_section_3?: any;\n sub_section_4?: any;\n sub_section_5?: any;\n sub_section_6?: any\n}\n\nexport interface iMediaInfo_CustomFields {\n alt_media_id: string;\n clip_title: string;\n tv_show: string;\n series_crid_id?: string;\n episode_crid_id?: string;\n video_type_long_form?: string;\n tv_channel?: string;\n tv_episode?: string;\n episode_name?: string;\n expiry_date?: string;\n program_classification?: string;\n web_content_url?: string;\n clip_category?: string;\n market?: string;\n publisherid?: string\n tv_season?: string\n}\n\nexport interface iVideo {\n ShowGenre: string | null,\n ShowProgramClassification: string | null,\n isMemberGatedLive: boolean\n}\n\nexport interface iMediaInfo {\n id: string;\n name: string;\n account_id?: string;\n description?: string;\n long_description?: string;\n duration?: string;\n head_position: string;\n created_at?: string;\n published_at?: string;\n updated_at?: string;\n reference_id?: string;\n publisher_id?: string;\n custom_fields: iMediaInfo_CustomFields // live returns customFields;\n video?: iVideo\n preroll?: any; // reference of brightcove player.ima3.currentAdEventInfo\n}\n\nexport interface iAdInfo {\n type: string;\n asset_id: string;\n head_position: string;\n index?: string;\n duration?: string\n}\n\nexport const dataModels = {\n /**\n * Data model definition of page view event\n * @enum{number}\n */\n pageInfo: {\n platformName: 1,\n platformPostfix: 1,\n pageTitle: 0,\n pageId: 1,\n platform: 0,\n category: 0,\n section: 0,\n subSection: 0\n },\n\n /**\n * Data model definition of video content events
    \n * This model is defined base on data structure of brightcove response
    \n * live player (YO) should follow this structure and modify/insert data if necessary
    \n * @param {string} videoType Its value will be \"Full Episode\", \"Live\" or others\n * @return {object}\n */\n mediaInfo: function (videoType) {\n let isFullEpisode = typeof videoType === \"string\" && \"full episode\" === videoType.toLowerCase();\n let isLive = typeof videoType === \"string\" && \"live\" === videoType.toLowerCase();\n /**\n *
      \n *
    • VOD means brightcove player
    • \n *
    • YO means yospace player
    • \n *
    • : means property name is different between players
    • \n *
    • = means sample value
    • \n *
    • -> means get value from variable on the right of arrow
    • \n *
    • inserted means each player's \"DataMod\" method will insert that value
    • \n *
    • VOD means only available in VOD source data
    • \n *
    • VOD; YO; means property is available in both player source data, but might be named differently
    \n */\n return {\n id: 1,\t\t\t\t\t// VOD; YO;\n name: 1,\t\t\t\t// VOD; YO;\n account_id: 0,\t\t\t// VOD; YO: accountId\n description: 0,\t\t\t// VOD; YO: shortDescription\n long_description: 0,\t// VOD; YO: longDescription\n duration: 0,\t\t\t// VOD; YO = \"86400\"\n head_position: 1,\t\t// VOD, get from player.currentTime(); YO: local date()\n created_at: 0,\t\t\t// VOD; YO: creationDate\n published_at: 0,\t\t// VOD; YO: publishedDate\n updated_at: 0,\t\t\t// VOD; YO: lastModifiedDate\n reference_id: 0,\t\t// VOD; YO: referenceId\n custom_fields: {\n alt_media_id: 1,\t\t\t// inserted; VOD -> id; YO -> E.timedMetadata.crid\n clip_title: 1,\t\t\t\t// VOD; YO -> name -> tv_show\n tv_show: 0,\t\t\t\t\t// VOD; YO;\n // VOD; YO -> E.timedMetadata.crid.pA\n series_crid_id: isLive ? 1 : 0,\n // VOD; YO -> E.timedMetadata.crid.pB\n episode_crid_id: isLive ? 1 : 0,\n // VOD = \"Full Episode\"; YO = \"Live\";\n video_type_long_form: isFullEpisode || isLive ? 1 : 0,\n // VOD; YO;\n tv_channel: 0,\n tv_episode: 0,\t\t\t\t// VOD;\n episode_name: 0,\t\t\t// VOD;\n expiry_date: 0,\t\t\t\t// VOD;\n program_classification: 0,\t// VOD;\n web_content_url: 0,\t\t\t// VOD;\n clip_category: 0,\t\t\t// YO = \"Live Hub Market\";\n market: 0,\t\t\t\t\t// YO;\n publisherid: 0\t\t\t\t// YO;\n },\n preroll: 0,\n video:{\n ShowGenre: 0,\n ShowProgramClassification: 0,\n isMemberGatedLive: 0\n }\n }\n },\n /**\n * Data model definition of ads events\n * @enum{number}\n */\n adInfo: {\n type: 1,\n asset_id: 1,\n index: 0,\n duration: 0,\n head_position: 1\n }\n};\n\n/**\n * util includes methods which would be helpful when generating standard tracking data\n * @mixin\n */\nexport const dataModelUtil = {\n /**\n * This method will evaluate given dataObject structure based on given data model.\n *\n * @param {Object} model object of {@link tenTrack.dataModels}\n * @param {Object} dataObject data source of REST response\n * @return {boolean}\n */\n matchModel: function (model, dataObject) {\n if (typeof model !== \"object\" || model.constructor !== Object) {\n let errorMsg = \"Given data model is not object\";\n if (triggeredErrors.indexOf(errorMsg) === -1) {\n console.error(errorMsg);\n triggeredErrors.push(errorMsg);\n }\n return false;\n }\n\n for (let key in model) {\n // check if given dataObject has each property, does not care about the value\n if (model[key] === 1 && !(key in dataObject)) {\n let errorMsg = \"Important tracking data is missing - \" + key;\n if (triggeredErrors.indexOf(errorMsg) === -1) {\n console.error(errorMsg, model, dataObject);\n triggeredErrors.push(errorMsg);\n }\n return false;\n }\n if (model[key].constructor === Object) {\n if (!this.matchModel(model[key], dataObject[key])) {\n return false;\n }\n }\n }\n\n return true;\n },\n\n /**\n * This method will create data object, try to get values of all given model's properties from given \"dataObject\".
    \n * This method normally should be called first, then the player should modify and complete the generated object to make sure it matches given model's requirement, then call the matchModel() method to test if all required properties have value.\n *\n * @param {Object} model object of {@link tenTrack.dataModels}\n * @param {Object} dataObject data source of REST response\n * @param {Object} mapping Object defines property names used in given dataObject which means same thing.\n * @return {*}\n */\n makeData: function (model, dataObject, mapping?):iMediaInfo {\n if (typeof model !== \"object\" || model.constructor !== Object) {\n let errorMsg = \"Given data model is not object\";\n if (triggeredErrors.indexOf(errorMsg) === -1) {\n console.error(errorMsg);\n triggeredErrors.push(errorMsg);\n }\n return undefined;\n }\n\n let tmp = {} as iMediaInfo;\n for (let key in model) {\n let mappedKey = key;\n // if mapping object is given, replace key with given value of each key\n if (mapping && mappedKey in mapping) {\n mappedKey = mapping[key];\n }\n\n if (typeof model[key] === \"object\" && model[key].constructor === Object) {\n tmp[key] = this.makeData(model[key], dataObject[mappedKey], mapping ? mapping[key + \"_mapping\"] : undefined);\n } else if (mappedKey in dataObject) {\n tmp[key] = dataObject[mappedKey];\n }\n }\n return tmp;\n }\n};","/**\n * @namespace\n */\nimport {Allocator_Video} from \"./track.allocator.video\";\nimport {cookies, generateUUID} from \"../ten/env.util\";\nimport {dataModels, dataModelUtil} from \"./track.dataModel\";\nimport {eLocalStorage_tenUser} from \"../tenMember/jwt/enum\";\n\nexport interface iTenTrack {\n deviceId: string,\n userId_ten: string,\n userId_oztam: string,\n userId_nielsen: string,\n\n /**\n * legacy properties\n */\n meta: any,\n dataModels: any,\n dataModelUtil: any,\n Allocator: any,\n}\n\nlet tenTrackTmp: iTenTrack = {} as any;\n\nif (typeof window !== \"undefined\"){\n tenTrackTmp.deviceId = (function() {\n if (window.navigator.cookieEnabled) {\n let tmpDeviceId = cookies.getCookie(\"ten_deviceId\");\n if (tmpDeviceId) {\n return tmpDeviceId;\n } else {\n let newCookieDeviceId = generateUUID();\n cookies.setCookie(\"ten_deviceId\", newCookieDeviceId, 365 * 10);\n return newCookieDeviceId;\n }\n } else {\n // todo if we need to use fingerprint to handle cookie disabled case, then add figerprint logic in here. [DTECH-724]\n return undefined;\n }\n })();\n tenTrackTmp.userId_ten = localStorage.getItem(eLocalStorage_tenUser.tu_userid) || undefined;\n tenTrackTmp.userId_oztam = localStorage.getItem(eLocalStorage_tenUser.tu_oztamid) || undefined;\n tenTrackTmp.userId_nielsen = localStorage.getItem(\"tu_nielsenid\") || generateUUID();\n\n\n /**\n * get page and video info from meta tag. There are bt:type, bt:genre, etc. can be used to send data to tracking tools.\n */\n tenTrackTmp.meta = (function () {\n let metaObject = {};\n\n let metaDOMs = document.querySelectorAll('meta[property*=\"bt:\"]');\n for (let i = 0; i < metaDOMs.length; i++) {\n let meta = metaDOMs[i];\n metaObject[meta.getAttribute(\"property\")] = meta.getAttribute(\"content\");\n }\n\n\n metaDOMs = document.querySelectorAll('meta[name*=\"gcontent-\"]');\n for (let i = 0; i < metaDOMs.length; i++) {\n let meta = metaDOMs[i];\n metaObject[meta.getAttribute(\"name\")] = meta.getAttribute(\"content\");\n }\n\n return metaObject;\n })();\n tenTrackTmp.dataModels = dataModels;\n tenTrackTmp.dataModelUtil = dataModelUtil;\n tenTrackTmp.Allocator = Allocator_Video;\n}\n\nexport const tenTrack = tenTrackTmp;","import {resolve} from \"../ten/js.extension\";\nimport {env} from \"../ten/conf.env\";\n\n/**\n * make sure bind \"this\" to these methods while calling\n */\nexport function initOztam(OztamClass) {\n if (resolve(\"oztam.enabled\", this._servicesConfig)) {\n return new OztamClass(\n env.isStaging() ?\n this._servicesConfig.oztam.config.staging :\n this._servicesConfig.oztam.config.production\n );\n }\n}\n\nexport function initTealium(TealiumClass) {\n return new TealiumClass();\n}","import {Player} from \"../../@types/bc.interface\";\nimport {Allocator_Video} from \"../../tenTrack/track.allocator.video\";\n\nexport enum eIMAEvent {\n /**\n * ad event - needs ima plugin\n */\n AdsRequest = \"ads-request\",\n AdsLoad = \"ads-load\",\n AdsAdStarted = \"ads-ad-started\",\n AdsAdEnded = \"ads-ad-ended\",\n AdsPause = \"ads-pause\",\n AdsPlay = \"ads-play\",\n AdsFirstQuartile = \"ads-first-quartile\",\n AdsMidpoint = \"ads-midpoint\",\n AdsThirdQuartile = \"ads-third-quartile\",\n AdsClick = \"ads-click\",\n AdsVolumechange = \"ads-volumechange\",\n AdsPodStarted = \"ads-pod-started\",\n AdsPodEnded = \"ads-pod-ended\",\n AdsAllpodsCompleted = \"ads-allpods-completed\",\n /**\n * Error events\n */\n ima3Ready = \"ima3-ready\",\n ima3Error = \"ima3error\",\n ima3AdError = \"ima3-ad-error\"\n}\n\ninterface iIMAConfig {\n\n}\n\nexport interface iIMAAds {\n adType: string, // lower case\n ad: {\n id: string,\n type: string, // upper case\n index: number,\n duration: number\n },\n state: \"content-set\"\n}\n\nexport interface iVodPlayer extends Player{\n autoplay?: boolean;\n load?: () => void;\n ads?: iIMAAds;\n trackingFirstPlayEvents: () => void;\n}\n\n// these events are not listed on ima3 page, but triggered in ad related logic\nexport enum BrightcoveIMABackendEvent {\n NoPreRoll = \"nopreroll\",\n AdTimeout = \"adtimeout\",\n ReadyForPreRoll = \"readyforpreroll\",\n IMA3ContentResumeRequested = \"ima3-content-resume-requested\"\n}","import {iVodPlayer} from \"../@types/bc.interface\";\nimport {Log} from \"../../ten/env.util\";\nimport {eDebug_Title} from \"../../ten/env.enum\";\n\nexport function drmFilter(): void {\n const player: iVodPlayer = this;\n const catalogLoad = player.catalog.load;\n const logger = new Log(eDebug_Title.player);\n\n player.catalog.load = function(mediaInfo) {\n const useDrmValue = (mediaInfo.customFields && mediaInfo.customFields.video_type_drm_only) ||\n (mediaInfo.custom_fields && mediaInfo.custom_fields.video_type_drm_only);\n const useDrm = [\"true\", \"TRUE\", \"True\"].indexOf(useDrmValue) >= 0;\n\n const sources = mediaInfo.sources;\n if (Array.isArray(sources) && sources.length > 0) {\n const filtered = sources.filter(function(source) {\n const isDrmSource = (source.key_systems || source.keySystems) && source.src.indexOf(\"http://\") === -1;\n const isNotDrmSource = !source.key_systems && !source.keySystems;\n return (useDrm && isDrmSource) || (!useDrm && isNotDrmSource);\n });\n\n if (filtered.length !== sources.length) {\n mediaInfo.sources = filtered;\n logger.log(\"UPDATED SOURCE - \", filtered);\n }\n }\n\n catalogLoad(mediaInfo);\n }\n};","export function vjsErrorHandler():void {\n\n}","import {iVodPlayer} from \"../@types/bc.interface\";\n\nexport function vjsEventHandler(): void {\n let player: iVodPlayer= this;\n}","import {iVodPlayer} from \"../@types/bc.interface\";\n\nexport function vjsOverlayUI(): void {\n let player: iVodPlayer = this;\n\n player.on(\"loadedmetadata\", () => {\n const mediainfo = player.mediainfo;\n if (!mediainfo) {\n return;\n }\n if (!Array.isArray(mediainfo.cue_points)) {\n return;\n }\n\n const brightcoveControlledDiv = player.el();\n if (!brightcoveControlledDiv && !brightcoveControlledDiv.querySelector) {\n return;\n }\n const progressHolder = brightcoveControlledDiv.querySelector(\".vjs-progress-control > .vjs-progress-holder\");\n const progressBar = brightcoveControlledDiv.querySelector(\".vjs-progress-control > .vjs-progress-holder > .vjs-play-progress\");\n if (progressHolder === null || progressBar === null) {\n return;\n }\n\n const cuePointClass = \"vjs-progress-cue-point\";\n progressHolder.querySelectorAll(`.${cuePointClass}`).forEach(cue => {\n cue.remove();\n });\n\n const duration = player.duration();\n const cuePoints = mediainfo.cue_points;\n cuePoints.forEach((cue) => {\n const div = document.createElement(\"div\");\n div.classList.add(cuePointClass);\n div.style.left = (cue.time / duration) * 100 + \"%\";\n progressHolder.insertBefore(div, progressBar);\n });\n\n const style = document.createElement(\"style\");\n style.type = \"text/css\";\n style.innerHTML = `\n .${cuePointClass} {\n width: 4px;\n height: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n background-color: rgba(255,255,255,0.2);\n }\n `;\n document.head.appendChild(style);\n });\n}\n","import {Allocator_Video, eAllocatorEvent} from \"../../tenTrack/track.allocator.video\";\nimport {dataModels, dataModelUtil, iAdInfo, iMediaInfo} from \"../../tenTrack/track.dataModel\";\nimport {Log} from \"../../ten/env.util\";\nimport {eDebug_Title} from \"../../ten/env.enum\";\nimport {BrightcoveCustomEvent, BrightcoveEvent} from \"../../@types/bc.interface\";\nimport {BrightcoveIMABackendEvent, eIMAEvent, iVodPlayer} from \"../@types/bc.interface\";\n\nfunction getTrackingServiceState() {\n return {\n loadedMetadata: false,\n paused: undefined,\n playedAds: 0,\n };\n}\n\nexport function trackingService(): void {\n let player: iVodPlayer= this;\n let eventLog: Log = new Log(eDebug_Title.player_event);\n\n let previousSegment: number;\n let state = getTrackingServiceState();\n\n let previousPosition = getTimeInSec();\n player.on(BrightcoveEvent.Timeupdate, ()=>{\n // timeupdate in sec\n let nowSec = getTimeInSec();\n if (player.hasStarted() && previousPosition !== nowSec) {\n previousPosition = nowSec;\n player.trigger(BrightcoveCustomEvent.TimeupdateSec);\n }\n\n // watchPosition update\n setTimeout(()=>{\n this.watchPosition = player.currentTime();\n },500);\n });\n\n player.on(BrightcoveEvent.Play, () => {\n eventLog.log(`Called ${BrightcoveEvent.Play}`);\n if (state.paused) {\n eventLog.log(`Tracking ${Allocator_Video.Events.UN_PAUSE}`);\n this.allocator.track(\n Allocator_Video.Events.UN_PAUSE,\n getMediaData(player),\n player\n )\n }\n state.paused = false;\n });\n\n player.on(BrightcoveEvent.Pause, () => {\n if (!state.paused) {\n eventLog.log(`Called ${BrightcoveEvent.Pause}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.PAUSE}`);\n this.allocator.track(\n Allocator_Video.Events.PAUSE,\n getMediaData(player),\n player\n );\n }\n state.paused = true;\n });\n\n player.on(BrightcoveEvent.Resume, () => {\n eventLog.log(`Called ${BrightcoveEvent.Resume}`);\n });\n\n\n player.on(BrightcoveEvent.Seeking, () => {\n eventLog.log(`Called ${BrightcoveEvent.Seeking}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.SEEKING}`);\n this.allocator.track(\n Allocator_Video.Events.SEEKING,\n getMediaData(player),\n player\n )\n });\n\n player.on(BrightcoveEvent.Seeked, () => {\n eventLog.log(`Called ${BrightcoveEvent.Seeked}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.SEEKED}`);\n this.allocator.track(\n Allocator_Video.Events.SEEKED,\n getMediaData(player),\n player\n );\n });\n\n window.addEventListener(\"beforeunload\", ()=>{\n eventLog.log(`Called window beforeunload`);\n eventLog.log(`Tracking ${Allocator_Video.Events.BEFORE_UNLOAD_PAGE}`);\n this.allocator.track(\n Allocator_Video.Events.BEFORE_UNLOAD_PAGE\n )\n });\n\n if (player.ima3) {\n state.playedAds = 0;\n if (player.dataAttrs[\"data-video-ima-url\"]) {\n player.on(eIMAEvent.AdsPlay, () => {\n eventLog.log(`Called ${eIMAEvent.AdsPlay}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.AD_RESUME}`);\n this.allocator.track(\n Allocator_Video.Events.AD_RESUME,\n getAdData(player.ads),\n player.ima3.adPlayer\n )\n });\n player.on(eIMAEvent.AdsPause, () => {\n eventLog.log(`Called ${eIMAEvent.AdsPause}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.AD_PAUSE}`);\n this.allocator.track(\n Allocator_Video.Events.AD_PAUSE,\n getAdData(player.ads, player.ima3.adPlayer.currentTime()),\n player.ima3.adPlayer\n )\n });\n // single ad start/end events\n player.on(eIMAEvent.AdsAdStarted, () => {\n state.playedAds++;\n\n eventLog.log(`Called ${eIMAEvent.AdsAdStarted}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.AD_BEGIN}`);\n this.allocator.track(\n Allocator_Video.Events.AD_BEGIN,\n getAdData(player.ads),\n player.ima3.adPlayer\n )\n });\n player.on(eIMAEvent.AdsAdEnded, () => {\n if (state.playedAds) {\n eventLog.log(`Called ${eIMAEvent.AdsAdEnded}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.AD_COMPLETE}`);\n this.allocator.track(\n Allocator_Video.Events.AD_COMPLETE,\n getAdCompleteData(player.ads)\n )\n }\n });\n // ad break start/end events\n player.on(eIMAEvent.AdsPodStarted, () => {\n eventLog.log(`Called ${eIMAEvent.AdsAdStarted}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.AD_BEGIN}`);\n this.allocator.track(\n Allocator_Video.Events.AD_BREAK_START,\n getMediaData(player),\n player\n )\n });\n player.on(eIMAEvent.AdsPodEnded, () => {\n eventLog.log(`Called ${eIMAEvent.AdsAdEnded}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.AD_COMPLETE}`);\n this.allocator.track(\n Allocator_Video.Events.AD_BREAK_END,\n getMediaData(player),\n player\n )\n });\n }\n }\n\n player.on(BrightcoveCustomEvent.TimeupdateSec, () => {\n // trigger close to the video end event, for OzTam\n if (closeTheEnd(player.currentTime(), player.duration())) {\n eventLog.log(`Tracking ${Allocator_Video.Events.CLOSE_THE_END}`);\n player.trigger(BrightcoveCustomEvent.CloseTheEnd);\n }\n\n // checking segment frequently, call segment change, segment view after it changed\n let mediaCues = getCues(player);\n let currentSegment = getSegmentId(player.currentTime(), mediaCues);\n if (previousSegment !== currentSegment) {\n previousSegment = currentSegment;\n player.trigger(BrightcoveCustomEvent.SegmentChanged);\n }\n });\n\n player.on(BrightcoveCustomEvent.SegmentChanged, () => {\n eventLog.log(`Called ${BrightcoveCustomEvent.SegmentChanged}`);\n player.trigger(BrightcoveCustomEvent.SegmentView);\n });\n\n player.on(BrightcoveCustomEvent.SegmentView, () => {\n eventLog.log(`Called ${BrightcoveCustomEvent.SegmentView}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.SEGMENT_VIEW}`);\n this.allocator.track(\n Allocator_Video.Events.SEGMENT_VIEW,\n previousSegment,\n player\n )\n });\n\n // event handlers that should be triggered once for each video (exclude replay)\n trackingSingletonEvents(player, state);\n player.trackingFirstPlayEvents = () => {\n trackingFirstPlayEvents(player, state);\n };\n player.trackingFirstPlayEvents();\n}\n\nexport function getSingletonEventHandlers (player, state) {\n let eventLog: Log = new Log(eDebug_Title.player_event);\n return {\n loadedMetadata: () => {\n eventLog.log(`Called ${BrightcoveEvent.Loadedmetadata}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.LOADED_METADATA}`);\n player.allocator.track(\n Allocator_Video.Events.LOADED_METADATA,\n getMediaData(player),\n player\n );\n },\n firstPlay: () => {\n state.paused = false;\n eventLog.log(`Called ${BrightcoveEvent.FirstPlay}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.START}`);\n player.allocator.track(\n Allocator_Video.Events.START,\n getMediaData(player),\n player\n );\n player.trigger(BrightcoveCustomEvent.PlayerStarted);\n },\n realFirstPlay: () => {\n eventLog.log(`Called ${BrightcoveCustomEvent.RealFirstPlay}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.FIRST_PLAY}`);\n player.allocator.track(\n Allocator_Video.Events.FIRST_PLAY,\n getMediaData(player),\n player\n )\n },\n closeTheEnd: () => {\n eventLog.log(`Called ${BrightcoveCustomEvent.CloseTheEnd}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.CLOSE_THE_END}`);\n player.allocator.track(\n Allocator_Video.Events.CLOSE_THE_END\n )\n },\n ended: () => {\n eventLog.log(`Called ${BrightcoveEvent.Ended}`);\n eventLog.log(`Tracking ${Allocator_Video.Events.COMPLETE}`);\n player.allocator.track(\n Allocator_Video.Events.COMPLETE,\n getMediaData(player)\n )\n }\n };\n}\n\nexport function trackingSingletonEvents(player, state) {\n // on some platform such as chromecast, some of these event handlers should be removed from listener so they won't affect platform specific logic.\n player.singletonEventsHandler = getSingletonEventHandlers(player, state);\n let handlers = player.singletonEventsHandler;\n\n player.on(BrightcoveEvent.Loadedmetadata, ()=>{\n handlers.loadedMetadata();\n player.one(BrightcoveEvent.Play, ()=> {\n handlers.firstPlay();\n });\n });\n // vod player other than using ima3 ad plugin, need to trigger realfirstplay in their specific logic, in player.one(BrightcoveCustomEvent.PlayerStarted) callback\n player.on(BrightcoveCustomEvent.RealFirstPlay, handlers.realFirstPlay);\n player.on(BrightcoveCustomEvent.CloseTheEnd, handlers.closeTheEnd);\n player.on(BrightcoveEvent.Ended, handlers.ended);\n}\n\nexport function trackingFirstPlayEvents(player, state) {\n let eventLog: Log = new Log(eDebug_Title.player_event);\n let realFirstPlayTriggered = false;\n\n function triggerRealFirstPlay() {\n if (realFirstPlayTriggered) {\n return;\n }\n realFirstPlayTriggered = true;\n eventLog.log(\"+++ \" + BrightcoveCustomEvent.RealFirstPlay);\n player.trigger(BrightcoveCustomEvent.RealFirstPlay);\n }\n function adsPodEndedCallback() {\n if (state.playedAds) {\n triggerRealFirstPlay();\n }\n }\n function silentAdTimeout() {\n /**\n * no scheduled ad\n */\n let waitingAd = setInterval(()=> {\n if (state.playedAds) {\n clearInterval(waitingAd);\n }\n if (state.playedAds === 0 && player.currentTime() > 1) {\n clearInterval(waitingAd);\n player.off(eIMAEvent.AdsPodEnded, adsPodEndedCallback);\n triggerRealFirstPlay();\n }\n }, 500);\n\n /**\n * with ad\n */\n player.one(eIMAEvent.AdsPodEnded, adsPodEndedCallback);\n player.one(BrightcoveIMABackendEvent.AdTimeout, function(){\n eventLog.log(\"+++ \" + BrightcoveIMABackendEvent.AdTimeout);\n player.off(eIMAEvent.AdsPodEnded, adsPodEndedCallback);\n triggerRealFirstPlay();\n });\n }\n\n if (player.ima3) {\n state.playedAds = 0;\n\n if (player.dataAttrs[\"data-video-ima-url\"]) {\n // ima error - empty VAST, etc.\n player.one(eIMAEvent.ima3AdError, function(){\n eventLog.log(\"+++ \" + eIMAEvent.ima3AdError);\n player.one(BrightcoveCustomEvent.PlayerStarted, triggerRealFirstPlay);\n });\n\n // ima served, normal process\n player.one(BrightcoveCustomEvent.PlayerStarted, silentAdTimeout);\n } else {\n player.one(BrightcoveCustomEvent.PlayerStarted, triggerRealFirstPlay)\n }\n\n // once real first play triggered, remove all other \"one\" listener\n player.one(BrightcoveCustomEvent.RealFirstPlay, function(){\n player.off(BrightcoveCustomEvent.PlayerStarted, silentAdTimeout);\n player.off(BrightcoveCustomEvent.PlayerStarted, triggerRealFirstPlay);\n player.off(eIMAEvent.AdsPodEnded, adsPodEndedCallback);\n });\n player.one(\"switchingSource\", ()=>{\n realFirstPlayTriggered = true; // if user switch source and ima3 url, make true so all events for previous source will be ignored.\n player.off(BrightcoveCustomEvent.PlayerStarted, silentAdTimeout);\n player.off(BrightcoveCustomEvent.PlayerStarted, triggerRealFirstPlay);\n player.off(eIMAEvent.AdsPodEnded, adsPodEndedCallback);\n player.allocator.track(eAllocatorEvent.BEFORE_CHANGE_SOURCE);\n });\n }\n}\n\n\nfunction getCues (player) {\n return player.mediainfo.cuePoints || player.mediainfo.cue_points || [];\n}\n\nfunction getSegmentId(currentPosition, cues) {\n for (let i = 0; i < cues.length; i++) {\n cues[i].startTime = i > 0 ? cues[i - 1].time : 0;\n cues[i].endTime = cues[i].time;\n if (i === 0 && currentPosition < cues[i].startTime) {\n return 1;\n } else if (currentPosition >= cues[i].startTime && currentPosition < cues[i].endTime) {\n return i + 2;\n }\n }\n return 1;\n}\n\nfunction closeTheEnd (playerCurrentTime, videoDuration) {\n let secondsToTheEnd = 7;\n let percentageToTheEnd = 0.02;\n if (videoDuration <= 5 * 60) {\n // short episode close to the end seconds\n if (playerCurrentTime + secondsToTheEnd >= videoDuration) {\n return true;\n }\n } else {\n // long episode check close to the end by percentage\n if ((videoDuration - playerCurrentTime)/videoDuration <= percentageToTheEnd) {\n return true;\n }\n }\n\n return false;\n}\n\n\nexport function getMediaData(player) {\n const media = player.mediainfo;\n const headPosition = player.currentTime();\n const mediainfoMapping = player.mediainfoMapping;\n let videoType = media && typeof media.custom_fields === \"object\" ?\n media.custom_fields.video_type_long_form : undefined;\n let mediaInfo: iMediaInfo = dataModelUtil.makeData(dataModels.mediaInfo(videoType), media, mediainfoMapping);\n mediaInfo.head_position = headPosition;\n\n mediaInfo.custom_fields.alt_media_id = mediaInfo.id;\n\n if (mediaInfo.custom_fields && mediaInfo.name && !mediaInfo.custom_fields.clip_title) {\n mediaInfo.custom_fields.clip_title = mediaInfo.name;\n }\n\n if (!dataModelUtil.matchModel(dataModels.mediaInfo(videoType), mediaInfo)) {\n console.error(\"Generated data not match standard of videoJs player data model\");\n }\n return mediaInfo;\n}\n\n/**\n * @param {object} adsObject ads object which is part of player object\n * @param currentPosition\n * @return {*}\n */\nexport function getAdData(adsObject, currentPosition?): iAdInfo {\n if (typeof adsObject !== \"object\") {\n return {} as iAdInfo;\n }\n\n let adTypes = [\"preroll\", \"midroll\"];\n let adMeta = adsObject && adsObject.ad ? adsObject.ad : {};\n let adInfo = {\n type: adMeta.type.toLowerCase(),\n asset_id: adMeta.id,\n index: adMeta.index,\n duration: adMeta.duration,\n head_position: currentPosition ? currentPosition : 0\n };\n\n if (adTypes.indexOf(adInfo.type) < 0 &&\n typeof adsObject.adType === \"string\" &&\n adTypes.indexOf(adsObject.adType.toLowerCase()) > -1) {\n adInfo.type = adsObject.adType.toLowerCase();\n }\n\n return adInfo;\n}\n\n/**\n * when ad complete event called, player.currentTime returns 0. Head position should be same as duration after ad finished\n */\nexport function getAdCompleteData(adsObject) {\n let adInfo = getAdData(adsObject);\n adInfo.head_position = adInfo.duration;\n return adInfo;\n}\n\nfunction getTimeInSec() {\n return Math.floor(Date.now() / 1000);\n}","export function vjsVideoPlaySync():void {\n\n}","export function vjsVolumeSync():void {\n\n}"],"names":["root","factory","exports","module","define","amd","self","requiresAuthentication","Component","props","state","authenticationFinished","loggedIn","userData","isEmailVerified","thresholdDate","Date","getTime","signUpDate","tu_datecreated","tu_isEmailVerified","MyAccountManager","pressedLogOut","redirectURL","window","location","setState","checkIfEmailVerified","myAccountPagesEnum","this","React","showClassificationDisplay","genres","classification","genreDisplayName","genreText","spacerText","classificationText","isArray","length","forEach","genre","className","detectMobileBrowser","userAgent","navigator","match","toLowerCase","indexOf","getLiveStream","liveStreamSchedules","find","schedule","startDate","now","endDate","getLiveStreams","filter","getUpcomingLiveStreams","Loading","hasLoaded","component","defaultState","adSlotId","Mrec","componentDidUpdate","prevProps","adKey","tenService","ads","syncStaticAdParams","reloadStaticAd","refreshStaticAd","SocialLinks","showContent","onClick","bind","closeXHandler","modifierClasses","text","icon","children","i","loadMoreClick","tiles","numberToLoad","endpoint","ids","index","push","id","axios","params","skipIds","pageSize","then","response","data","liveTileCarouselIndex","components","reduce","returnIndex","value","carouselType","eCarouselType","map","carousel","_index","tpId","type","slides","title","hasMore","hasAds","loadMoreUrl","code","sponsorMessage","liveSlide","showThemed","key","keyPrefix","clickSlideHandler","eComponentType","dangerouslySetInnerHTML","__html","ContentGrid","loadMoreTiles","items","checkProgress","urlCode","videoDuration","videoProgress","widthPercentage","ii","videoCode","progressSeconds","progress","Math","round","parseInt","VideoProgressManager","allProgress","isPoster","gridValue","tile","cardImage","cardDescription","cardLink","cardTitle","contentType","videoLabel","currentProgress","style","order","isLive","href","generateContentTypeIcon","width","ContentShare","getShareLink","dateCountdown","countdown","day","closeDate","ceil","generateBody","description","body","maxLength","toString","trim","substring","shareFacebook","shareTwitter","sharePinterest","shareEmail","event","platform","pageAllocator","track","link","preventDefault","shareLink","open","image","display","date","target","shareContent","ContentTiles","storeScroll","FavoriteContent","isFavourite","clickHandler","clickFavouriteHandler","checked","htmlFor","LoadMore","onClickWrapper","trendingData","heading","src","alt","backgroundImage","url","PageTitleBar","scrolling","addScrollingState","name","showRef","isH2","isMobilePlayerStickyState","logoUrl","SearchForm","submitHandler","newTerm","term","replace","handleKeyDown","action","form","onKeyDown","placeholder","onChange","ref","searchInputRef","disabled","disableBtn","texts","upTerm","toUpperCase","upText","termIndex","lastIndex","highlight","slice","elem","ResponsiveEllipsis","responsiveHOC","LinesEllipsis","handleClick","result","searchPage","utag_data","siteSubSection1","clickTealiumData","searchTerm","searchSelectCardPosition","showName","headline","searchContentType","searchResultShowName","searchPageName","siteSection","searchPageInfo","currentType","Object","assign","results","columns","contentTypeEnum","duration","episodes","rating","author","maxLine","ellipsis","trimRight","basedOn","images","makeResults","Sponsor","VideoMarquee","isMobilePlayerSticky","activeChannels","setPageTitle","handleScroll","el","top","offsetTop","left","offsetLeft","offsetWidth","height","offsetHeight","offsetParent","pageYOffset","innerHeight","pageXOffset","innerWidth","processFloatingPlayer","document","getElementById","classList","add","remove","removeSticky","removeEventListener","video","renderPlayer","mediaInfo","liveStreamingUnavailable","customChangeVideoHandler","isLivePrerollDisabled","isMemberGated","liveChannels","relativeUrl","slateTime","slateUrl","globalSettings","isMobileBrowser","containerId","videoId","playerId","videoChangeHandler","autoplay","Autoplay","processMobilePlayerSticky","showVideoElements","getElementsByClassName","showVideoElement","showSocialLinks","addEventListener","airDate","videoLiveNow","showLink","facebookAppId","isLiveTv","showLiveBadge","isNews","format","tvRating","videoDetailSwitch","programClassification","showRatingClassification","localStorage","setItem","displayVideoDescription","isWebLive","displayGenre","showUrlCode","memberGated","GeoSwitch","NewsSocials","poster","defaultProps","LiveTv","handleComingUpClick","details","closeDetailsClick","getLivestreamData","channelId","fetchUrl","fetch","resp","json","channelDisplayName","getUserFavourites","handleChannelSelect","adjustVodLocation","mediaItem","marqueeReloadInterval","setInterval","reloadLivePlayingVideo","reloadLiveTv","nowTime","lastDate","lastComingUpReloadTime","reload","keys","milliseconds","parse","refreshChannels","nowDate","lastVideoMarqueeReloadTime","urlCodeToFavourite","isShowFavourited","handleFavouriteCall","checkWindowWidth","windowWidth","windowHeight","isStickyState","checkMobileBrowser","checkIfMobileBrowser","shows","favouriteUrlCodes","includes","splice","channel","isChannelPreRollDisabled","channelChangeEvent","Event","getMappedGeoState","geoLocation","liveTvInterval","documentElement","setProperty","getActiveChannels","clearInterval","adjustedLocation","sort","first","second","brandingLogoDarkUrl","channelGroups","channelList","err","channelObj","item","findSlateUrl","role","groups","LiveTvPage","hydrateComponent","liveTvData","PageBase","Page","searchData","SearchOverlay","performSearch","lastSearch","unmounted","trackingDelay","replacedTerm","apiUrl","clearTimeout","trackingTimer","setTimeout","searchCardsTotal","searchResults","popularSearch","res","Array","popularResults","updateTerm","updatedTerm","filterSearchInput","searchIsEmpty","searchDelayTimer","closeSearchOverlay","searchOverlayRef","active","CloseX","SearchResults","GlobalHeader","showSearchOverlay","current","focus","hash","anchored","checkWatchlist","watchListValue","triggerPushNotifications","Notification","permission","console","log","appboy","registerAppboyPushMessages","signUpHandler","hideMobileMenu","isGeoAllowed","signInHandler","signOutHandler","setActivationLocation","getUserDropdown","userDisplay","pPlusHambBanner","to","label","external","rel","userName","logout","showAccessLinks","toggleShowAccessLinks","fixed","showMobileMenu","showMegaMenu","activeMegaMenu","isSecondaryHubPage","scrollY","toggleShowMobileMenu","toggleActiveMegaMenu","toggleShowSearchOverlay","menuRef","shouldShowSearchOverlay","player","disableKeyCommands","toggleNoScroll","noScroll","handleEscape","scrollTo","keyCode","activeMenu","$this","mobileMax","checkIfSecondaryHubPage","contains","Geo","resGeo","allow","error","queryString","search","urlParams","URLSearchParams","get","scroll","debounce","leading","trailing","resize","clientWidth","isHubPage","isShowPage","isDefaultPage","isHomePage","headerClass","firstName","getItem","email","displayCacheKey","overlayCreated","megaMenu","showsMenu","liveTvMenu","newsMenu","DEVICETYPE_MOBILE","amfOnloadCalled","isReady","isLoaded","hasInit","gdpr","adsDisabled","adsLoaded","modules","renderInterval","undefined","imsAPI","IMSAPIIntegration","addIMSCacheEventListeners","headerData","carouselData","prototype","hasOwnProperty","call","renderComponent","DisplayBanner","Carousel","componentType","selector","domElement","querySelector","ReactDOM","tvid_callback","TenplayPageAllocator","tenTrack","AdManager","env","initVideoAd","statusReadyValidator","statusUpdate","determineDeviceType","registerModules","registerEventHandlers","hashValue","signInEvent","CustomEvent","detail","message","dispatchEvent","signUpEvent","couldDisplayAd","renderAdSlots","newModule","adheresToGdpr","onWindowLoad","onReady","deviceType","eventArgs","addAdhesionDom","initStaticAd","onWindowResize","onWindowScroll","scope","invalidateCache","logFreewheelDebug","stickyLeaderboardSelector","leaderboardAdWrapper","TrackJS","install","token","application","baseCustEnv","onError","payload","constructor","super","fetchState","newState","coord","Promise","resolve","geolocation","getCurrentPosition","position","coords","fetchGeoFromBrowser","latitude","getTimezoneOffset","eState","WA","NT","SA","QLD","NSW","geoStateLocalValidate","isAuState","req","longitude","address_components","short_name","geoStateOnlineValidate","fetched","eLocalStorage_tenUser_backend","tu_geo","changed","redirectToFAQ","reject","permissions","query","isDeclined","render","C06","CarouselBaseScrollBoosterWrapper","settings","slidesToShow","slidesToScroll","arrows","infinite","mobileFirst","cssEase","swipeToSlide","touchThreshold","useTransform","pauseOnFocus","pauseOnHover","variableWidth","responsive","breakpoint","slidesAdElement","adElement","ind","pageSwitchRefresh","updateState","element","slidesAdElementFilled","adElements","adElementFilled","updateSettings","prevArrow","SamplePrevArrow","sliderRef","nextArrow","SampleNextArrow","afterChange","currentSlideIndex","currentSlideToShow","slider","innerSlider","slickGoTo","numberOfSlide","carouselContainer","createRef","generateSlides","slide","componentDidMount","C06Slide","slideIndex","onDragStart","getPlaceHolder","watchingAdCall","containerSlide","appendChild","currentSlide","toIndex","getCurrentSlide","ee","slickPrev","slideCount","lastIndexAlignLeft","slickNext","LazyVodCtrlClient","showId","currentShowId","setCurrentShowId","useState","isClient","setIsClient","useEffect","openModal","SIGNIN","setLocalStorageItems","VodCtrl","getNextVideos","loadVideo","destinationUrl","history","pushState","importComponent","WithSuspense","LoadedComponent","default","initSettings","settingsOverride","defaultSettings","SHOWS","SQUARE","MYSHOWS","carouselClasses","noExpandOnHover","headerImage","waitForAnimate","trackingData","MyShowsSlide","CarouselBase","initAds","adContent","carouselAdContent","MutationObserver","mutationList","observer","mutation","attributeName","disconnect","initPrevNextButtons","intv","scrollBooster","updateMetrics","observe","attributes","initTrackingImpression","split","interactionValue","join","fetchProgress","getAllProgress","_hasMounted","initUpcomingLiveStreams","stream","previousState","relatedShowsLiveSlides","showSlug","imageLink","videoImage","slideIsLoading","mobileBackgroundImageUrl","desktopBackgroundImageUrl","sideCurrentIndex","liveStreams","componentWillUnmount","setPosition","x","y","onClickHandler","isDragging","_scrolling","_updateSlidesFunction","customSlides","myShows","beforeChange","oldIndex","newIndex","loadMoreIfNecessary","convertCardSlidesToElements","slideProps","cardIndex","cardsTotal","mainTitle","carouselPosition","getLoadMorePageSize","_loadMore","slideClass","_loading","baseUrl","protocol","host","skipIdList","_failedCallCount","status","updatedSlides","concat","updateFunction","catch","backgroundClickThroughUrl","dropdown","mobileBgUrl","retinaUrl","desktopBgUrl","tu_firstname","mobileBackgroundStyles","backgroundRepeat","backgroundPosition","backgroundSize","desktopBackgroundStyles","slideElements","unshift","isLoading","obj","isRunning","_updateSettingsInConstructor","_attachScrollBooster","activeSlide","unitWidth","getBoundingClientRect","lastSlickToSlideIndex","activeIndex","parentNode","dataset","draggable","swipe","_setPosition","getCurrentOffset","viewport","content","startDragging","mode","friction","onUpdate","velocity","abs","shouldSlick","dragOffsetPosition","transform","boundX","from","stopPropagation","static","dragMoveData","isWideEnough","isAwayFromLeftEdge","isAwayFromRightEdge","getTranslate3dX","styleString","getAttribute","translateX","isFewSlides","carouselItemClasses","cardImageClasses","openNewTab","LiveCtrl","LazyLiveCtrlClient","isMemberGatedContent","setIsMemberGatedContent","imageFull","episode","isPlayingNow","classNameTop","buttonDataList","buttonText","epgChannelToClassName","formatScheduleTime","ComingUpDetailsButton","logo","channelUrl","isLiveNow","cssClass","themeColour","handleTracking","progressBarPercentage","setProgressBarPercentage","prevDates","useRef","channelColourStyles","intervalId","differenceInMinutes","trackData","showChannel","setActiveChannels","hasChannels","eventOptions","useClickCapture","activeChannel","clickSlideHandlerWrapper","carouselTracking","sponsorBTYBLOGO","interactionCategory","onClickCapture","xmlns","viewBox","d","activeGroups","setActiveGroups","isSticky","setIsSticky","isActive","setIsActive","setIsLoading","prevScrollPos","setPrevScrollPos","moveStickyDown","setmoveStickyDown","playerHeight","setPlayerHeight","isMobile","setIsMobile","contentRef","hasGroups","globalIndex","checkActiveCategory","querySelectorAll","groupTitleElement","rect","elementId","calculateElementHeight","timeout","checkMobileWidth","viewportWidth","viewportHeight","handleStickyCategoryScroll","handleOverlappingScroll","currentScrollPos","scrollTop","divPosition","activeGroup","clickGroupHandlerWrapper","catPosition","catTotal","scrollIntoView","block","inline","scrollToSection","filteredChannels","ChannelTile","channelColour","channelCssClass","channelLogoDarkUrl","channelName","eventRating","eventTitle","eventIsWebLive","eventStartDate","eventEndDate","timeStamp","setTimeStamp","LiveTVMegaMenu","reloadMegaMenuData","lastLiveFeedReloadTime","primaryItems","secondaryItems","channels","isMenuOpen","fetchedLiveMegaMenuData","fetchLiveTvMenuData","toggleMenu","prevState","checkFocus","hidden","LiveTvMenu","shortName","primaryTitle","secondaryTitle","moreItems","channelItem","NewsMegaMenu","NewsMenu","tenNewsFirstColumn","img","links","localisedNewsFirst","more","color","tenSportsColumn","tenSportsLinks","QuickLinks","textLinks","Menu","trendingLinks","MegaMenuSearchFormData","ShowsMegaMenu","ShowsMenu","secondColumn","secondaryLinkGroups","thirdColumn","firstFourResults","primaryTpId","Shows","primaryLinksHeading","primaryLinks","secondaryTpId","MenuHeading","MenuLinks","MenuMore","textLink","ShowsLinks","showsLink","imageUrl","subText","category","PrevButton","enabled","NextButton","autoplayDefaultSettings","playOnInit","stopOnInteraction","stopOnMouseEnter","delay","sliderDefaultSettings","dragFree","align","containScroll","loop","eventOptionsDefaultSettings","useClickPreventDefaultOnDrag","options","autoplayOptions","autoplaySettings","sliderSettings","embla","prevBtnEnabled","setPrevBtnEnabled","nextBtnEnabled","setNextBtnEnabled","eventSettings","setEventSettings","scrollNext","useCallback","reset","scrollPrev","onSelect","canScrollPrev","canScrollNext","on","onSlideClick","clickAllowed","showMenu","setShowMenu","triggerDropDown","handleClickOutside","marginLeft","EMAILRESEND","StandardPlayerEvent","Progress","Waiting","Playing","Error","Loadstart","Loadedmetadata","Loadeddata","Play","Pause","Seeking","Seeked","Ended","Volumechange","Timeupdate","Stalled","CustomPlayerEvent","TimeupdateSec","PlayerStarted","SegmentChanged","SegmentView","RealFirstPlay","StartPlayFromResume","CloseTheEnd","BrightcoveEvent","BcCatalogError","Ratechange","FirstPlay","Resume","Resize","Fullscreenchange","BrightcoveCustomEvent","CallStack","Log","config","callbacks","ms","watch","fn","interval","variable","property","dispose","userAgentFilter","filterName","regex","regIndex","test","FLAG_KEY","ADOPS_KEY","PERCENTAGE_KEY","getFlagFromLocalStorage","setFlagInLocalStorage","logger","isProduction","percentage","warn","validatePercentage","newPercentage","currentPercentage","parseFloat","removeItem","resetFlagsIfPercentageChanges","isFlagged","newFlagValue","random","markAdOps","removeAdOps","checkIsFlagged","_servicesConfig","eAllocatorServices","AllocatorVideo","Allocator","firstRoundPlay","bool","_state","isFirstRoundPlay","initTealium","initOztam","initExtraInfo","defaultAllocatorVideoState","trackingOnHold","resetTrackingState","stopTracking","eventTimestamp","calledFirstPlay","calledPreRollBreakStart","_validationHolder","updateEventTimestamp","eventName","updateExtraInfo","extraInfo","serviceName","addExtraVideoInfo","resetTrackingService","tealium","oztam","playerRef","otherData","eAllocatorEvent","LOAD","START","FIRST_PLAY","PLAY","PAUSE","UN_PAUSE","RESUME","COMPLETE","AD_BREAK_START","AD_BREAK_END","BEFORE_UNLOAD_PAGE","INIT_PROGRESS_INTERVAL","AD_BEGIN","AD_PAUSE","AD_RESUME","AD_COMPLETE","SEEKED","currentTime","cancelEventTrack","onLoad","LOADED_METADATA","onLoadedMetadata","onStart","onFirstPlay","onPause","onUnpause","onResume","PROGRESS","onProgress","SEGMENT_VIEW","onSegmentView","CLOSE_THE_END","onCloseTheEnd","onComplete","SEEKING","onSeeking","onSeeked","onAdBegin","onAdPause","onAdResume","onAdComplete","onAdBreakStart","onAdBreakEnd","beforeUnloadPage","BEFORE_CHANGE_SOURCE","beforeChangeSource","initProgressInterval","_validate","validation","registerValidation","events","validatorCB","mediainfo","load","onReplay","firstPlay","onInitProgress","pause","onUnPause","segmentView","finished","seeking","adInfo","adStart","adEnd","onChangeVideo","onExit","tealiumEvtOverride","source","latest","pauseDurationBeforeNewId3","pauseDurationBeforeNewId3_nielsen","generateId3Info","TXXX","id3Info","cueType","CRID","EpochTime","Rating","StreamID","floor","LocalTime","matches","series_id","episode_id","update","cueData","eCueType","updateTimestamp","PRIV","TDRL","timestamp","_log","callback","textTracks","kind","unusedEvent","activeCues","cue","cueObject","JSON","stringify","cueObjectSource","cueObj","isIOS","info","trigger","e","txxxObject","eOzTamEvent","eOztamTrigger","DeviceType","eOzTamField","args","getEventData","eventType","triggerType","fromPosition","toPosition","_eventBuilder","BEGIN","getFields","media","oztamConfig","_registeredSessionId","sessionId","UUID_v4","protocolVersion","vendorVersion","plugin","timezoneOffset","publisherId","publisherName","mediaId","mediaType","mediaDuration","hasIntervalRunning","_progressInterval","startProgressInterval","stopProgressInterval","trackProgress","PROGRESS_INTERVAL","dispatch","fields","canDispatch","requestSend","method","_oztamConfig","serverTarget","headers","eventObj","preventDispatch","missingPosition","nanPosition","isNaN","flagPass","startSession","eventBuilder","_media","resetSessionId","trackLoad","trackBegin","properties","trackAdStart","AD_EVENT","trackAdComplete","trackComplete","trackingConfig","_extraInfo","duringAdBreak","_oztamService","OzTamServiceV2","_storedProgressPosition","positionFloat","__storedProgressPosition","toFixed","_storedProgressPositionTimestamp","defineGetMediaDurationFn","defineGetMediaPositionFn","lastPlayTimestamp","contentTime","defineGetMediaTypeFn","defineGetPublisherId","meta","account_id","publisher_id","sessionStart","defineTrackingMedia","defineTrackingEvent","defineTrackingProperties","ALT_MEDIA_ID","SERIES_ID","custom_fields","series_crid_id","EPISODE_ID","episode_crid_id","SERIES_NAME","tv_show","EPISODE_NAME","episode_name","CHANNEL","tv_channel","CLASSIFICATION","program_classification","DEVICE_ID","deviceId","DEMO1","oztam_userId","alt_media_id","ShowGenre","positions","DISPOSE","getContentPositionFromPayloadPosition","watchPosition","Tealium","videoHasStarted","utag","getMediaGenre","eUtag","showGenre","getMediaGenreSecondary","showGenreSecondary","genreSecondary","getGeneralData","video_fields","jwtMember","getUserDetail","fastChannelTrackData","showContentMarket","showProgramClassification","ShowProgramClassification","isMemberGatedLive","showNameTargeting","n10adId","showKey","tvEpisode","tv_episode","subStringAsKeyMatch","showEpisodeName","clip_title","showEpisodeVideoType","video_type_long_form","showContentId","showContentCategory","showContentName","showContentVideoId","showContentVideoType","showContentSeason","season","showContentFormatType","adType","adDuration","adIndex","adTitle","oztamPublisherId","oztamSessionId","autoPlayFlag","getAutoplaySetting","call_type","device","adobeECID","deviceIdAdobe","getAdData","adDataIsEmpty","isEmptyObj","generalData","setMediaInfo","mediaTrackingInfo","tealium_event","matadata","adData","extraData","customExitData","playbackTime","getRoundedMinutes","trackingServiceConfig","staging","production","mux","envTemp","productionHostName","prodDomain","hostname","isStaging","OztamClass","TealiumClass","getDomain","s4","param","keepalive","ok","request","XMLHttpRequest","headerNames","headerName","setRequestHeader","successCallback","onreadystatechange","readyState","responseText","failCallback","onerror","send","some","exactPlatformString","roundedDuration","startTime","endTime","timerId","start","remaining","paused","pausedTime","resume","ip","apiKey","authToken","requestToken","post","PublisherName","access_token","handleError","ensureAuthToken","retryRequest","func","retries","attempt","postAuthenticatedData","makeAuthenticatedPostRequest","Authorization","postUnauthenticatedData","mapBvodDataToOztamParams","bvodData","oztamParamsArray","BvodId","Demo","BvodIdSalt","addCustParamsCsi","resource","bcodData","ad","csai","adCallUrl","URL","custParams","custParamsObj","newCustParams","entries","set","origin","pathname","addCustParamsSsi","ssai","adParameters","cust_params","ApiVideo","Api","attachApiUrl","freeWheelEnabled","drmEnabled","refreshResult","jwtRefreshToken","eJwtRefreshToken","accessToken","getAccessToken","getPlaybackInfoPath","statusText","streamSignature","daiAuthToken","responseData","getVideoUapPath","avia","PlayerEvent","createConsumerAdvice","services","consumerAdviceOptions","dom","consumerAdviceTimer","consumerAdviceActive","panel","main","consumerAdviceTimerId","container","debug","searchParams","startConsumerAdviceTimer","opacity","removeConsumerAdvice","hideConsumerAdvice","showConsumerAdvice","handlePlayerEvent","evt","isAd","PLAYBACK_STATE_CHANGE","playbackState","ACTIVE_STATE_CHANGE","activeState","AD_BREAK_COMPLETE","eventTypes","STREAM_METADATA","assetKey","shouldExclude","consumerAdvice","displayOverlay","metadata","createElement","transition","adviceContainer","wrapper","divider","innerHTML","CONTENT_START","optionalParams","getId","ConsumerAdvice","destroy","values","off","accountID","PlayerStates","PlayerCtrl","ignore","createLogoDisplayOverlayPlugin","listening","styles","maxWidth","onContentStart","zIndex","level","padding","boxShadow","imageTag","getElementsByTagName","onEnded","removeChild","fadeIn","fadeOutInterval","fadeOut","fadeInInterval","READY","dir","CONTENT_SEGMENT_START","CONTENT_SEGMENT_END","LOGODISPLAYOVERLAY","onclick","ID","createPlugin","logoOverlay","createOverlayPlugin","getPlugin","PLUGIN_EVENT","RESOURCE_END","panelElement","playback","attachResource","once","CONTENT_PROGRESS","LIVE_PRESENTATION_STOPPED","OVERLAY","overlay","_resources","_initMockProgress","_firstLoad","_beginTimeStamp","_storedEvents","_oztamServiceConfig","adEventData","_playbackTime","_serverTimeOffset","updateInterval","hasTimestamp","currentStreamTime","customEpochStartingStreamTime","customEpochStartingTimeCheckpoint","customEpochLastCueUpdateTimeCheckpoint","id3EventCuedataOffsetTime","initializeVariables","resetVariables","offsetTime","calculateOffsetTimeInMs","stopIntervals","_initPlayer","playerShouldBeBlocked","_playerShouldBeBlocked","_logger","getConsumerAdvice","_createPlayer","_updatePlayerState","DetectWindows7","GeoBlocked","AdBlockerOn","_onPlayerReady","getLogoUrl","_trackEvent","_handleEvent","watcherClickedLink","handleLIVEData","getLiveFields","authHandler","beginUpdateInterval","getPlayerCurrentTime","getCurrentTime","minimumTimeBeforeFirstCustomCueInSeconds","updateCue","setCustomEpochStartingTimes","_id3Wrapper","toISOString","min","max","canBeParsedAsDate","val","setServerTimeOffset","handleUserLogin","string","qs","markAdOperations","_noAds","noads","playerContainerId","setOztamConfig","bvodApiKey","bvodPublisherName","AuthenticatedEndpointHandler","globalFWEnable","experiments","rolloutPercentage","initializeUserFlag","playerMuted","playerState","PreInitialize","LiveCtrlUtils","detectTouchDevice","addBeforeUnloadListener","customFields","google_dai_key","_resetSession","_resetResources","percent","checkUserFlag","newPlayerState","_updateOverlayState","stateOverlayFactory","OverlayFactory","ui","_createResources","playerOptions","createPlayerOptions","ATTEMPT_UNMUTED","getId3Wrapper","resetAllocator","createVideoPlayer","initRecording","_playResources","filteredLiveChannels","subArray","_updateResource","playList","PLAYLIST","livePlayList","clear","_handleResources","_displaySlateAndExecute","_clearSponsorLogo","_startPlaylistWithResources","_handlePlaylistCompleteEvent","DisplaySlateImage","childContainer","resources","addResources","next","_allocator","allocatorLiveEventMapping","videoWatchedDuration","getRecordedTime","stop","addWatcherToLink","defaultPrevented","extra","userId","eLocalStorage_tenUser","tu_oztamid","convertToVideoTrackObj","ipAddress","getUserIp","AdEventId","DeviceId","Genre","IpAddress","MediaId","MediaType","PublisherId","RegistrationId","SessionId","TimeStamp","UserAgent","VendorVersion","flatMap","isPreRollDisabled","_playBackInfo","getPlaybackInfo","prerollDisabled","imsData","prerollSource","createPrerollResource","fetchIMSDataAndLog","contentSource","createLiveStreamResource","_addCueListener","cueWatcher","getTxxxGoogleAdData","getCueDataFromId3Event","cueDataTime","cueDataTimeWithOffset","dateTimeDifference","maxTime","cueObjectDataAdjusted","cueObjectInfoAdjusted","ArrayBuffer","String","fromCharCode","apply","Uint8Array","_resetId3","AllocatorLive","id3","_checkId3","mediaInfoNew","publisherid","newCustomFields","show_title","mockOztamProgress","currentTimestamp","delayDuration","fullProgressEvents","partialProgressDuration","timeToFullProgress","latestEpochTime","epochStartTime","timeOffset","mockedPartialProgressEvents","offsetTimestamps","postProgressEvents","mockedProgressEvents","mockProgressData","mockedProgressEvent","storeEvents","fullProgress","partialDuration","fromSeconds","offset","eventArray","setEventFields","numFullEvents","isPartial","eventStartEpoch","dataFields","mapMediaInfo","updatedOztamConfig","trackingFields","progressFetch","eType","allocatorEvent","allocatorVideoObj","RESOURCE_START","CONTENT_PLAYING","CONTENT_PAUSED","lastPausedTimestamp","AD_PAUSED","AD_PLAYING","muted","AD_START","adPosition","adObject","podInfo","j","adPodInfo","generateAdData","MUTE_CHANGE","coppaFlag","userIp","coppa","getIMSData","playbackSettings","consumerAdviceDisplayTime","theme","html","isDesktop","renderTextTrackNatively","useNativeFullscreen","enableMoat","overrides","liveStreamPausable","plugins","compactViewBreakpoint","hls","gam","playlist","consumeradvice","prerollResource","createResourceConfig","videoAdConfig","setVideoAdConfig","imaAdCallUrl","formatIMAServerUrl","showPrerollOnNonZeroStart","loadVideoTimeoutMs","preloadContentAtEndOfPreRoll","enableAdPreloading","fwParameters","playBackInfo","liveStreamResource","account","site","cmsID","requestParams","customParams","fwParamsToSpread","csidPrefix","FW_SITE_SECTION_ID","fw","fwSiteSectionId","imafw_csid","adParams","gr","eLocalStorage_tenUser_info","tu_gr","ge","tu_ge","collection","videoContentCategories","showGenres","pcode","tu_memberPostcode","session","sub","tu_n10adId","tvid","oztamozsid","additionalParams","plabackInfo","miscData","imafw_mode","transformedData","freeWheelParams","generateGoogleAdTagParams","enableFreeWheel","dai","contentSourceId","fms_params","object","VideoFormat","HLS","iu","cmsid","generateCustomParams","ppid","generateRequestParams","vpmute","viewabilityTracking","partner","viewGuid","pageType","kv","reqParams","retrievedLocalStorageState","companionAds","isCompanionAds","adSizes","beginTimeStamp","metadataCuePointTimeout","elapsedWatchTime","isPaused","messageColors","currentTimeStamp","roundSecondsToNearestMinute","totalSeconds","totalMinutes","OztamV2AviaLive","TealiumAvia","OzTamV2","onHoldProgressFields","delayProgressLogic","originalCanDispatch","originalCanDispatchFlag","newEpochtime","thisProgressFromEpochtime","batchProgressTrack","newEpochTime","playEpochtime","progressFromPosition","field","pauseTimestamp","id3Wrapper","syncedEpoch","isTokenCached","tu_accesstoken","tu_refreshtoken","getTokenList","refreshToken","expiresIn","tu_expiresin","expiresAt","tu_expiresat","removeTokenList","getSocialStatus","socialLinks","tu_socialLinks","isExpired","isLoggedIn","isLoggedOut","setUserDetail","userDetail","getUserFavouriteShows","eLocalSotrage_tenUser_favourites","tu_shows","getUserFavouriteRecipes","tu_recipes","setUserFavouriteShows","setUserFavouriteRecipes","recipes","removeFavouriteShows","removeFavouriteRecipes","setMemberId","jwt","tu_memberid","memberId","getMemberId","setAutoplaySetting","eLocalSotrage_tenUser_autoplay","tu_autoplay","setMemberEmailHashed","tu_memberEmailHashed","memberEmailHash","getMemberEmailHashed","setTokenList","setSocialStatus","statusList","socialStatus","socialSite","linkSocialStatus","socialName","unlinkSocialStatus","unlinkIndex","removeAllCache","localStorage_remain","eLocalSotrage_tenUser_progress","tu_progress","eLocalStorage_tenUser_display","tu_name","tu_lastname","tu_email","tu_username","tu_userid","tu_vpn","tu_vpn_switch","eLocalStorage_tenUser_token","tu_tokentimestamp","eLocalStorage_tenTrack","tt_deviceid","eLocalStorage","_player","ProxyCheck","storageClean","vpnStorageCleanUp","ErrorFetchingVideo","ErrorFetchingAd","State","ORIGIN_PROD","ORIGIN_DEV","freeWheelConfig","contentId","cmsId","ImsApiParameters","getStateFromPostcode","postcode","numericPostcode","matchedState","range","ACT","VIC","TAS","globalParams","defaultSitePage","sitePage","globalInterfaceParams","imafw__fw_coppa","imafw__fw_site_page","imafw__fw_h_x_country","imafw__fw_content_id","getGlobalParams","customInterfaceParams","imafw_ge","imafw_gr","imafw_pcode","imafw__fw_h_x_postal_code","imafw_sub","imafw_session","imafw_tvid","imafw_state","bvodParams","getBvodCustomParams","getCustomParams","extraParams","videoData","generateExtraFreeWheelParams","adTagParams","createAdTagParams","_bypassAdBlockDetection","bypassShows","bypassDetection","_init","ctrls","batchResumePlay","ctrlsStateCache","ctrl","ePlayerCtrlState","play","playing","notPlay","_initVTG","vtg","OzTam","serverInfo","vodKey","liveKey","bypassAdBlockDetection","geoBlockResponse","adBlockResponse","vpnBlockResponse","promiseAllSettled","isGeoBlocked","isAdBlock","vpnCheck","isAdBlocked","isVpnBlocked","_deniedGeoBlocker","ePlayerBlockedReason","geoBlocker","isWindows7","_deniedWindows7","win7Blocker","_deniedAdBlocker","adBlocker","OzTamSessionID","clipTitle","long_description","head_position","created_at","published","published_at","updated_at","reference_id","referenceId","altId","tvChannel","tvShow","tv_season","episodeCrid","seriesCrid","expiry_date","expiry","videoTypeLongForm","market","allocatorVideo","playerEventStateMap","Paused","CONTENT_COMPLETE","End","ERROR","ErrorOccurred","AD_PROGRESS","AdPlaying","memberEmailHashed","memberLoginStatus","memberGender","getMemberGender","memberAge","getMemberAge","memberPostcode","getMemberPostcode","memberFavouriteGenre","getMemberFavouriteGenre","isBlocked","tryRequest","appVersion","clientHeight","detectBrowser","version","browserName","mimeTypes","enabledPlugin","ActiveXObject","c","r","RegExp","exec","urlUtil","paramKeys","paramStr","substr","paramArray","getOffsetTop","nodeName","lazyCallback","slotElement","pixelOffset","callbackWrapper","eventCallback","windowScrollTop","windowScrollBottom","slotOffsetTop","slotOffsetBottom","cookies","expireAllCookies","paths","expires","toUTCString","cookie","l","deleteCookie","setCookie","getCookie","reg","encodeURIComponent","time","days","setTime","hours","mins","seconds","storages","getJSONFromLocalStorage","storageData","setJSONToLocalStorage","stringifyData","documentClientWidth","documentClientHeight","isTablet","isMobileWidth","isTabletWidth","isDesktopWidth","urlString","size","additionalParam","paramMappings","path","paramMapping","paramOut","mappingKey","mappingValue","findIndex","extensionOut","out","extensionValue","extensionReplaceMapping","replaceKV","processParamMapping","Set","generateAdditionalParam","categoryPath","appendingCustomParams","hasShowVideo","createUpNext","panelEnd","panelNext","nextVideos","videoEndPanelTemplate","upNextCardTemplate","upNextAutoplay","countdownSeconds","countdownHandler","isOpen","vodPlayList","killUpNextPanel","altMediaId","videoEndPanel","upNextCard","createVideoEndPanel","handlePanelClick","handleAutoplay","isFullscreenMode","dataIndex","playNextVideo","AutoplayClass","ON","OFF","exitFullscreen","countDownContainer","offBtn","onBtn","updateCountDownText","updateCountdown","countDownElement","tileIndex","dispatchPluginEvent","killVideoEndPanel","compressIcon","hideCompressionIcon","contentDuration","videoArray","upNext","moreVideos","videos","createDisplayPlugin","onResourceEnd","handlePluginEvent","killPanel","DISPLAY","AllocatorVod","serviceConfig","OztamV2AviaVod","TealiumAviaVod","allocatorVodEventMapping","SEEK_START","SEEK_COMPLETE","PLAYBACK_SUSPENDED","watchPercentageCounter","WatchPercentageCounter","watchedPercentage","eventPercentage","shouldTrack","tealiumData","TealiumData","breakpoints","trackedPercentage","shouldTrackBreakpoint","VPEnums","progressApiTmp","FETCH_URL","REFRESH_URL","progressApi","progressObj","progressItem","nowTimestamp","requestedTimestamp","getProgressInterval","VPQuery","fetchVideoProgress","_endProgressFired","needSync","_interactionWatcher","_syncIntervalWatcher","_closeToEndWatcher","_prevSyncTimestamp","timeChecking","_checkTimer","dateNow","INPUT_DURATION","_syncProgress","initVideoWatcher","_resetWatcher","_urlCode","_registerCurrentProgress","_syncingWatchInterval","_closeToEndInterval","_currentProgressItem","INTERVAL_DURATION","THRESHHOLD_SECONDS","END_INTERVAL","msProgress","syncServerProgress","getHeaders","tenAuth","CONTENT_TYPE","header","videoObject","textTrackContainer","textTrackStartTime","textTrackEndTime","ccText","textTrackElement","textTrackEnabled","TEXT_TRACK_AVAILABLE","TEXT_TRACK_ENABLED_CHANGE","removeTextTrackElement","FULLSCREEN_CHANGE","fullscreen","showTextTrackElement","updateTextTrack","textCuePoint","activeCue","createTextTrackElement","hasChildNodes","cssBoxContainer","cssBoxInner","setAttribute","textTrack","backgroundColor","fontWeight","fontSize","timeDifference","ticker","parentElement","tickerCountDown","updateTextTrackFontSize","ccBoxContainer","desiredFontSize","_adLoadTimeout","_isFirstPlay","isDaiEnabled","_changeResource","initPlayer","newVideo","_video","noAds","disableAds","_updateVideoNoAds","_updateVideo","_progressMag","playerUIEffects","textTrackManager","videoTextTrackManager","_onPlayerEvent","upNextPlaying","remainingString","textCuepoint","removeVideoPlayer","_overlayFactories","vodCreatePlayer","ATTEMPT_UNMUTED_THEN_MUTED","onPlayerReady","videoResource","_getVideoResource","adResource","_getAdResource","playbackInfo","videoInfo","playbackInfoResponse","videoInfoResponse","all","getVideoUapInfo","drm","_videoInfo","myResource","progressDuration","getVideoProgress","videoPercentage","cleanTextTrackUrl","captionUrl","propUrlCode","resourceDuration","mediaUrl","textTrackUrl","videoIdForTracking","videoIdForAdCalls","seriesId","episodeId","seriesName","episodeName","demo1","getVODFields","detectDeviceType","isIos","handleVODData","signature","commonParams","imafw__fw_continuous_play","custPram","isSafari","isBrowserEnvironment","drmConfig","laType","playready","laUrl","priority","audioRobustness","videoRobustness","widevine","fairplay","appCertUrl","cert","licenseUrl","ckc","enableStalledAdCheck","vastLoadTimeout","stalledAdThreshold","DASH","filterOutPremiumAudioCodecs","_playerEventToState","onPlayerStateChange","fatal","ErrorCategory","RESOURCE","ErrorMessage","IMA_SDK_MISSING","AD","ErrorCode","DAI_DATA_ERROR","AD_STALLED","secondsRemaining","Next","calculateRemainingTime","addRemaingTimeAttribute","AUTOPLAY_BLOCKED","TEXT_CUEPOINT","PlaybackState","PAUSED","PLAYING","playCount","playingCheck","onPlayerEvent","restartVideoWithoutAds","restartPlayerCSAI","remainingText","remainderSeconds","remainingMinutes","checkExist","playBtn","volCtrl","getUrlParam","paramName","performanceMode","PerformanceMode","AUTO","playsInline","enableOm","posterImageUrl","activeMode","ActiveMode","enableMobileCaptionsAndSettings","dash","upnext","enabledFlash","isFlashPlayerEnabled","metaObject","metaDOMs","playerConfig","trackingService","adsServiceConfig","retrievedLocalStorageStte","targettedPageCategories","isTargetedCategoryPage","getShowName","hubName","isShow","getFeatureAdConfig","pos","sizeAny","parent","insert","into","successLoadCallback","c06_handleSuccessLoad","blankAdCallback","c06_handleBlankLoad","adServiceConfig","staticAdConfig","lazyLoading","pagePathInfo","foundEmptyItem","subUrlPath","sections","n","getUpdatedSections","subUrl","PagePathInfo","pathRule","ptypeRule","clearEnding","pathName","pageContentType","section","siteSubSection3","keyValueRule","A_Range","keyValueRules","k","v","pv0","pv24","currentPV","sessionCookie","oneDayCookie","addShowName","addRecipeCollection","recipeCollection","addContentTags","addHubName","addChannelName","collections","exclusionRule","general","extraTargeting","articleTags","recipeTags","adsUtil","replaceSpecChar_cid","recipeTitle","articleTitle","cbsSession","genericSlots","before","mrec_handleSuccessLoad","mrec_handleBlankLoad","desktopSlots","preloadCallback","skin_handlePreload","skin_handleSuccessLoad","skin_handleBlankLoad","adhesion_handlePreload","adhesion_handleSuccessLoad","adhesion_handleBlankLoad","mobileSlots","cidString","DrmFilter","drmFilter","ErrorHandler","vjsErrorHandler","EventHandler","vjsEventHandler","TrackingService","OverlayUI","vjsOverlayUI","VideoPlaySync","vjsVideoPlaySync","VolumeSync","vjsVolumeSync","omniture","namespace","server","nielsen","sfcode","apid","apn","nsdkv","nol_devDebug","eDebug_Title","getIOSVersion","matchResult","gup","isIOSWebkitBrowser","ios","iphone","ipad","desktop","debugServiceName","debugConfig","debugUrlParam","ignoreBoolean","formatOutputArgs","arrArgs","convertArgumentToArray","arr","arguments","logCatch","tenDebug","intervalStock","addInterval","_add","copy","_process","Function","prev","curr","array","ignoreUNN","adConfig","init","staticAd","hideAds","StaticAd","videoAd","VideoAd","inited","getSlotConfig","insertStaticAd","adSlotConfig","registerAdSlot","renderAdSlot","refreshAdSlot","reloadAdSlot","reinitStaticAd","reinitAdSlot","syncAdParams","baseURL","COPPA_CACHE_KEY","cacheKey","cacheResponse","ttl","getCachedResponse","cachedData","parsedData","isIosPlatform","generateFallbackParams","identifiers","appInfo","imafw__fw_vcid2","userid","getOrCreateUserId","imafw_fms_vcid2type","emailhash","imafw_fms_emailhash","fetchIMSData","deviceInfo","cachedResponse","app","fms_id_ttl","getCachedCoppaStatus","updateCoppaStatus","webhost","googledai","region","lat","ua","rawIdentifiers","subscriberid","removeEmptyStringProperties","isFreewheelDebugEnabled","setCoppaStatus","currentStatus","oldStatus","newStatus","pagePath","pageStructureMap","getPathNameAsArray","getPathPattern","getContentId","getShow","lastSubPath","subSection","reachTheEndOfMenu","nextLevelName","show","pagePathInfoFn","pathRuleRunner","ptype","ptypeRuleRunner","keyValueArray","keyValueRuleRunner","getArray","sync","pathFinal","keyValueObject","A","B","B_Range","C","C_Range","keyValueRuleConfig","runRules","pairArray","q","runRule","AdSlotManager","slotConfig","adSlotManager","isAdFilled","isAdLoadFailed","isAdBlankSchedule","stateIndicatorClass","slotId","slotPos","initiation","registerDynamicSlot","cleanSlotElement","removeOverSizeAds","finalSize","pickOneSuitableAd","widthOfEachSize","directRegister","pickOne","registerProcess","registerInfinite","googletag","cmd","slotInstance","defineSlot","addService","pubads","setTargeting","googletagRequestDataValidate","registerSlotTargeting","domId","getSlotElementId","defineOutOfPageSlot","companionSize","elementSelector","after","nth","adSlot","advText","insertBefore","afterSlotElement","nextSibling","showSlotElement","watchInterval","register","lazyload","displayAd","postloadCallback","refreshAd","refresh","reloadAd","reinitAd","destroyAd","destroySlots","requestParamsObj","adCallback","slotElementId","slot","getSlotId","getDomId","slotManager","getAdManagerBySlotId","getAdManagerByDynamicDomId","isEmpty","loadedBlankAd","loadedAd","adSlotManagerKeys","adSlotManagers","sizes","debugConfigUpdate","watchAdLoading","slots","initEnvParams","collectRequestParams","registerAdSlots","ruleProcesser","StaticAdRuleProcessor","requestParamsArray","debugParamFromCookie","urlParamKey","adNetwork","attachTargeting","targetingExclusionRules","targetingPathKeyValueRules","targetingExtraInfo","setTargetingAsync","enableLazyLoad","fetchMarginPercent","renderMarginPercent","mobileScaling","setPublisherProvidedId","setRefreshUnfilledSlots","enableVideoAds","enableAsyncRendering","enableSingleRequest","collapseEmptyDivs","exclusionRules","exclusions","showNames","showRule","rules","targetingNames","rule","watchSharethroughAdLoading","evM","ev","originalEvent","parentContainer","destroyAdSlots","manager","slotIds","adhesionTemplate","divTmp","getAdhesion","adParent","adEvent","createEvent","initEvent","handleSuccess","handleBlank","handleSuccessOfCarousel","handleBlankOfCarousel","imgStyleUrlAttrName","adSkinLeft","adSkinRight","firstChildDiv","checkAdImgInterval","adSkinBGImage","getComputedStyle","prevStyle","prevImg","initedSkinHandler","bodyWidth","head","marquee","slick","currentLeft","newLeft","removeMarginLeft","syncPosition","initSkinHandler","updateSkinImg","safeKey","safeValue","itemArray","exclusionConfig","exclusionParam","mcnPayloadData","mcnPayload","I11CMorphExist","mcnTargeting","setAdmiral","_admiral","detectAdBlocker","output","user","adblocking","Allocator_Page_Base","TPWPTealium","admiral","Admiral","eventData","eAllocatorPageEvent","PAGE_VIEW","onAdBlockerDetect","CHANGE_VIDEO","CHANGE_PARTICIPANT","onChangeParticipant","CATEGORY_LOADMORE","onCategoryLoadMore","ARTICLE_SCROLLMORE","onArticleScrollMore","CLICKED_CAROUSEL","onCarouselClick","CATEGORY_CLICK","onCategoryClick","MARQUEE_CLICKED","onMarqueeClicked","MARQUEE_IMPRESSION","onMarqueeImpression","CAROUSEL_LOAD","onCarouselLoad","USER_SIGNUP","onUserSignup","USER_SIGNIN","onUserSignin","USER_UPDATE","onUserUpdate","USER_SIGNOUT","onUserSignout","WATCHLIST_ADD","onWatchlistAdd","WATCHLIST_REMOVE","onWatchlistRemove","FAVORITE_SHOW_ADD","onFavoriteShowAdd","FAVORITE_SHOW_REMOVE","onFavoriteShowRemove","SHARE_CONTENT","onShareContent","SEARCH_SCREEN_OPENED","onSearchScreen","SEARCH_VIEW","onSearchView","SEARCH_START","onSearchStart","SEARCH_COMPLETE","onSearchComplete","SEARCH_RESULT_CLICKED","onSearchResultClick","SIGN_UP_FORM","onUserSigUpForm","SIGN_UP_EMAIL_ERROR","onUserSignUpEmailError","SIGN_UP_PASSWORD_ERROR","onUserSignUpPasswordError","SIGN_UP_ACCOUNT_EXISTS","onUserSignUpAccountExists","SIGN_UP_PROFILE","onUserSignUpProfile","SIGN_UP_PROFILE_ERROR","onUserSignUpProfileError","SIGN_UP_SUCCESS","onUserSignUpSuccess","SIGN_IN_FORM_EMAIL","onUserSignInFormEmail","SIGN_IN_EMAIL_ERROR","onUserSignInEmailError","SIGN_IN_PASSWORD_ERROR","onUserSignInPasswordError","SIGN_IN_SOCIAL","onUserSignInSocial","SIGN_IN_PROFILE","onUserSignInProfile","SIGN_IN_PROFILE_ERROR","onUserSignInProfileError","SIGN_IN_ACCOUNT_LOCKED","onUserSignInLocked","SIGN_IN_PASSWORD_FORGOT","onUserSignInPasswordForgot","SIGN_IN_PASSWORD_RESET","onUserSignInPasswordReset","SIGN_IN_NEW_PASSWORD_ERROR","onUserSignInNewPasswordError","ACTIVATION_SUCCESS","onActivationSuccess","ACTIVATION_ERROR","onActivationError","blockDetect","trackerObject","interactionType","adBlockerEnabled","eAllocatorPageEventDefault","ADBLOCKERENABLED","UPNEXT_SHOW_BANNER","UPNEXT_SHOW_THUMBNAIL","UPNEXT_CLICK_BANNER","UPNEXT_CLICK_THUMBNAIL","SEARCHED_ITEM_CLICKED","SEARCH_RESULT_QUICK_RESULT","getValueOrDefault","entities","cardPosition","genreClean","intCategory","str","toLocaleLowerCase","playbackTypeCta","carouselCta","categoryTotal","categoryPosition","interactionName","carouselName","trackClickedCarousel","uTagLinkTrackProps","click_carousel","carousel_click","liveCategory","view_carousel","click_marquee","ctaButton","marquee_impression","user_signup","memberFavoriteGenre","memberLinkedSocialAccounts","memberNameFirst","memberNameLast","memberOzTamId","memberState","memberSuburb","pageContentName","SignUpLeadSource","SignUpLeadPage","SignUpLeadShow","memberEmail","user_signin","user_update","user_signout","activation_success","activation_error","watchlist_add","watchlist_remove","favorite_show_add","siteDomain","siteName","favorite_show_remove","share_content","pageContentId","sign_up_form","deviceModelId","tealium_visitor_id","tealium_session_id","tealium_timestamp_utc","timestamp_unix","sign_up_email_error","sign_up_password_error","sign_up_account_exists","sign_up_profile","sign_up_profile_error","sign_up_success","sign_in_form_email","sign_in_email_error","sign_in_password_error","sign_in_form_social","sign_in_form_profile","sign_in_form_error","sign_in_form_locked","sign_in_password_forgot","sign_in_password_reset","search_screen","siteSubSection2","searchStart","searchComplete","search_view","searchResultsSelect","sign_in_new_password_error","utagLinkTrackUtil","additionalObject","trackingObject","prop","shareChannel","onPageView","pageInfo","eAllocatorService","allocator","Allocator_Video","_firstRoundPlay","initOmniture","initNielsen","calledPrerollBreakStart","validationHost","videoType","dataModelUtil","matchModel","dataModels","eventWillBeHandled","validate","videoLoadMetadata","triggerevent","hasPreroll","videoStartMetadata","videoFirstPlayMetadata","videoPause","videoUnpause","onSegment","videoEndMetadata","adPlayMetadata","onAdStart","adPause","adResume","adStopMetadata","setHasPreroll","adBreakStart","adBreakEnd","onAdBreakComplete","Events","triggeredErrors","platformName","platformPostfix","pageTitle","pageId","isFullEpisode","web_content_url","clip_category","preroll","asset_id","model","dataObject","errorMsg","makeData","mapping","tmp","mappedKey","tenTrackTmp","cookieEnabled","tmpDeviceId","newCookieDeviceId","generateUUID","userId_ten","userId_oztam","userId_nielsen","BrightcoveIMABackendEvent","eIMAEvent","catalogLoad","catalog","useDrmValue","video_type_drm_only","useDrm","sources","filtered","isDrmSource","key_systems","keySystems","isNotDrmSource","cue_points","brightcoveControlledDiv","progressHolder","progressBar","cuePointClass","div","getSingletonEventHandlers","eventLog","player_event","loadedMetadata","getMediaData","realFirstPlay","closeTheEnd","ended","trackingSingletonEvents","singletonEventsHandler","handlers","one","trackingFirstPlayEvents","realFirstPlayTriggered","triggerRealFirstPlay","adsPodEndedCallback","playedAds","silentAdTimeout","waitingAd","AdsPodEnded","AdTimeout","ima3","dataAttrs","ima3AdError","headPosition","mediainfoMapping","adsObject","currentPosition","adTypes","adMeta","getAdCompleteData","getTimeInSec","previousSegment","previousPosition","nowSec","hasStarted","AdsPlay","adPlayer","AdsPause","AdsAdStarted","AdsAdEnded","AdsPodStarted","playerCurrentTime","mediaCues","cuePoints","getCues","currentSegment","cues","getSegmentId"],"sourceRoot":""}