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ClCA,GAAW,GACb,aAAeC,KAAKI,KAAKL,EAAU,EAAI,GAAK,SAE5C,mBAEX,CACF,CAAE,MAAOM,GACP3K,QAAQK,MAAM,8CAA+C8J,EAC/D,CA9BA,CA+BF,CAlDyCS,CAAoBpB,EAAkBqB,qBAAuB,GAoDhF,oBAAXnO,OAAwB,CAEjC,IAAMoO,EAAYpO,OAAOoO,WAAa,CAAC,EAEvCtB,GAAqB3G,OAAO9E,KAAKyL,GAAmB1G,SAAQ,SAAAC,GAC1D+H,EAAU/H,GAAOyG,EAAkBzG,EACrC,IAEArG,OAAO+M,YAAcD,EACrB9M,OAAOoO,UAAYA,CACrB,C","sources":["/source/webpack/universalModuleDefinition","/source/./Frontend/src/assets/js/tenplay/@util/device.ts","/source/./Frontend/src/assets/js/tenplay/ten/env.util.ts","/source/./Frontend/src/assets/js/tenplay/tenMember/jwt/cacheStatus.ts","/source/./Frontend/src/assets/js/tenplay/tenMember/jwt/enum.ts","/source/webpack/bootstrap","/source/webpack/runtime/make namespace object","/source/./Shared/Scripts/GlobalHeader/Tealium.js"],"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\"][\"GlobalHeader\"] = factory();\n})(self, function() {\nreturn ","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}","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;","import {\n eLocalStorage_tenUser_info as userInfoCacheKey,\n eLocalStorage_tenUser_token as tokenCacheKey,\n tLocalStorage_tenUser_info,\n eLocalSotrage_tenUser_favourites,\n eLocalSotrage_tenUser_progress, localStorage_remain\n} from \"./enum\";\nimport {iJWT} from \"./jwt.type\";\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\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 setMemberCache(memberInfo){\n\n const mandatoryFieldNames = [\n \"email\",\n \"firstName\",\n \"lastName\",\n \"gender\",\n \"dob\",\n \"postcode\",\n \"favoriteGenre\",\n ];\n\n const extractedData = {};\n\n mandatoryFieldNames.forEach((fieldName) => {\n if (fieldName in memberInfo) {\n extractedData[fieldName] = memberInfo[fieldName];\n }\n });\n\n const memberInfoString = JSON.stringify(extractedData);\n\n localStorage.setItem(\"member_info\", memberInfoString);\n}\n\nfunction removeMemberCache(){\n localStorage.removeItem(\"member_info\");\n}\n\nfunction getMemberCache() {\n const memberInfoString = localStorage.getItem(\"member_info\");\n if (!memberInfoString) {\n return false;\n }\n const memberInfo = JSON.parse(memberInfoString);\n return memberInfo;\n}\n\nfunction getN10AdId(): string {\n return localStorage.getItem(userInfoCacheKey.tu_n10adId);\n}\n\nfunction setN10AdId(jwt: iJWT): void {\n localStorage.setItem(userInfoCacheKey.tu_n10adId, jwt.n10adId);\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\nfunction setIsEmailVerified(jwt: iJWT): void {\n localStorage.setItem(userInfoCacheKey.tu_isEmailVerified, jwt.isEmailVerified);\n}\n\nfunction getIsEmailVerified(): string {\n return localStorage.getItem(userInfoCacheKey.tu_isEmailVerified);\n}\n\nfunction setMemberGender(jwt: iJWT): void {\n localStorage.setItem(userInfoCacheKey.tu_memberGender, jwt.memberGender);\n}\n\nfunction getMemberGender(): string {\n return localStorage.getItem(userInfoCacheKey.tu_memberGender);\n}\n\nfunction setMemberAge(jwt: iJWT): void {\n localStorage.setItem(userInfoCacheKey.tu_memberAge, jwt.memberAge);\n}\n\nfunction getMemberAge(): string {\n return localStorage.getItem(userInfoCacheKey.tu_memberAge);\n}\n\nfunction setMemberPostcode(jwt: iJWT): void {\n localStorage.setItem(userInfoCacheKey.tu_memberPostcode, jwt.memberPostcode);\n}\n\nfunction getMemberPostcode(): string {\n return localStorage.getItem(userInfoCacheKey.tu_memberPostcode);\n}\n\nfunction setMemberFavouriteGenre(jwt: iJWT): void {\n localStorage.setItem(userInfoCacheKey.tu_memberFavouriteGenre, jwt.memberFavouriteGenre);\n}\n\nfunction getMemberFavouriteGenre(): string {\n return localStorage.getItem(userInfoCacheKey.tu_memberFavouriteGenre);\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}\nfunction removeSocialStatus(): void{\n localStorage.removeItem(userInfoCacheKey.tu_socialLinks);\n return;\n}\n\n\nfunction removeAllCache() {\n removeTokenList();\n removeMemberId();\n removeUserDetail();\n removeSocialStatus();\n removeVideoProgress();\n removeMemberCache();\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 setN10AdId,\n getN10AdId,\n\n setMemberEmailHashed,\n getMemberEmailHashed,\n // get email verification status\n setIsEmailVerified,\n getIsEmailVerified,\n\n setMemberCache,\n getMemberCache,\n\n setMemberGender,\n getMemberGender,\n\n setMemberAge,\n getMemberAge,\n\n setMemberPostcode,\n getMemberPostcode,\n\n setMemberFavouriteGenre,\n getMemberFavouriteGenre,\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_memberEmailHashed: \"tu_memberEmailHashed\",\n tu_isEmailVerified: \"tu_isEmailVerified\",\n tu_datecreated: \"tu_datecreated\",\n tu_n10adId: \"tu_n10adId\",\n tu_memberGender: \"tu_memberGender\",\n tu_memberAge: \"tu_memberAge\",\n tu_memberPostcode: \"tu_memberPostcode\",\n tu_memberFavouriteGenre: \"tu_memberFavouriteGenre\",\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};\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 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];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import {isMobile, isTablet} from \"../../../Frontend/src/assets/js/tenplay/ten/env.util\";\nimport {eLocalStorage_tenUser as cacheKey} from \"../../../Frontend/src/assets/js/tenplay/tenMember/jwt/enum\";\nimport {jwtMember} from \"../../../Frontend/src/assets/js/tenplay/tenMember/jwt/cacheStatus\";\n\nconst tealiumServerData = typeof window !== \"undefined\" ? window.TealiumData : {};\n\ntealiumServerData.deviceType = isMobile ? \"Mobile\" : isTablet ? \"Tablet\" : \"Desktop\";\ntealiumServerData.memberId = jwtMember.getMemberId() || \"\";\ntealiumServerData.memberEmailHashed = jwtMember.getMemberEmailHashed() || \"\";\ntealiumServerData.n10adId = jwtMember.getN10AdId() || \"\";\ntealiumServerData.memberLoginStatus = jwtMember.isLoggedIn() ? \"logged-in\" : \"logged-out\";\ntealiumServerData.memberOzTamId = localStorage.getItem(cacheKey.tu_oztamid);\n\ntealiumServerData.timeOfDay = getTimeOfDay();\ntealiumServerData.timeSincePublication = getDateTimeDuration(tealiumServerData.contentPublishDate) || \"\";\n\nexport function getTimeOfDay() {\n var hours = (new Date()).getHours();\n var hourRange = [\n [\"Night\", 0, 5],\n [\"Morning\", 6, 8],\n [\"Midday\", 9, 15],\n [\"Evening\", 16, 20],\n [\"Night\", 21, 23],\n ];\n return hourRange[hourRange.findIndex(function (range) {\n return hours >= range[1] && hours <= range[2];\n })][0];\n}\n\nexport function getDateTimeDuration(givenDateTime) {\n if (!givenDateTime) {\n return;\n }\n var dateObject = givenDateTime;\n try {\n if (typeof givenDateTime === \"number\") {\n dateObject = new Date(givenDateTime);\n } else if (typeof givenDateTime === \"string\") {\n dateObject = new Date(givenDateTime);\n }\n\n if (typeof dateObject === \"object\" && dateObject.constructor === Date) {\n var now = new Date();\n var oneDay = 24 * 60 * 60 * 1000;\n var dayDiff = Math.abs(now.getTime() - dateObject.getTime()) / oneDay;\n\n if (isNaN(dayDiff)) {\n return;\n }\n\n if (dayDiff <= 1) {\n return \"Less than 24 hours\";\n } else if (dayDiff <= 7) {\n return \"Less than \" + Math.ceil(dayDiff) + \" days\";\n } else if (dayDiff <= 7 * 4) {\n return \"Less than \" + Math.ceil(dayDiff / 7 + 1) + \" weeks\";\n } else {\n return \"More than 28 days\"\n }\n }\n } catch (errorObject) {\n console.error(\"Could not convert datetime string to object\", givenDateTime);\n }\n}\n\nif (typeof window !== \"undefined\") {\n /* eslint-disable camelcase */\n const utag_data = window.utag_data || {};\n\n tealiumServerData && Object.keys(tealiumServerData).forEach(key => {\n utag_data[key] = tealiumServerData[key];\n });\n\n window.TealiumData = tealiumServerData;\n window.utag_data = utag_data;\n}\n"],"names":["root","factory","exports","module","define","amd","self","userAgentFilter","type","window","find","filterName","index","regex","regIndex","test","navigator","userAgent","deviceType","toLowerCase","includes","gup","name","replace","results","RegExp","exec","location","href","kv","keys","params","paramKeys","search","paramStr","substr","paramArray","split","i","length","push","getOffsetTop","element","nodeName","offsetTop","offsetParent","Log","constructor","debugServiceName","this","serviceName","debug","indexOf","debugConfig","debugUrlParam","ignoreBoolean","formatOutputArgs","args","arrArgs","convertArgumentToArray","concat","arr","log","console","apply","arguments","warn","logCatch","error","clientWidth","clientHeight","tenDebug","document","documentElement","documentClientWidth","isMobile","isTablet","isTokenCached","localStorage","getItem","tu_accesstoken","tu_refreshtoken","getTokenList","accessToken","refreshToken","expiresIn","parseInt","tu_expiresin","expiresAt","tu_expiresat","removeTokenList","removeItem","getSocialStatus","socialLinks","JSON","parse","tu_socialLinks","Array","isArray","err","jwtMember","isExpired","Date","now","isLoggedIn","isLoggedOut","setUserDetail","data","Object","forEach","key","undefined","setItem","getUserDetail","userDetail","getUserFavouriteShows","eLocalSotrage_tenUser_favourites","tu_shows","getUserFavouriteRecipes","tu_recipes","setUserFavouriteShows","shows","setUserFavouriteRecipes","recipes","removeFavouriteShows","removeFavouriteRecipes","setMemberId","jwt","tu_memberid","memberId","getMemberId","setN10AdId","tu_n10adId","n10adId","getN10AdId","setMemberEmailHashed","tu_memberEmailHashed","memberEmailHash","getMemberEmailHashed","setIsEmailVerified","tu_isEmailVerified","isEmailVerified","getIsEmailVerified","setMemberCache","memberInfo","extractedData","fieldName","memberInfoString","stringify","getMemberCache","setMemberGender","tu_memberGender","memberGender","getMemberGender","setMemberAge","tu_memberAge","memberAge","getMemberAge","setMemberPostcode","tu_memberPostcode","memberPostcode","getMemberPostcode","setMemberFavouriteGenre","tu_memberFavouriteGenre","memberFavouriteGenre","getMemberFavouriteGenre","setTokenList","getAccessToken","setSocialStatus","statusList","socialStatus","socialSite","linkSocialStatus","socialName","unlinkSocialStatus","unlinkIndex","splice","removeAllCache","localStorage_remain","eLocalSotrage_tenUser_progress","tu_progress","eLocalStorage_tenUser_display","tu_name","tu_firstname","tu_lastname","tu_email","eLocalStorage_tenUser_backend","tu_username","tu_userid","tu_oztamid","tu_datecreated","tu_gr","tu_ge","tu_geo","tu_vpn","tu_vpn_switch","eLocalStorage_tenUser_info","eLocalStorage_tenUser_token","tu_tokentimestamp","eLocalStorage_tenUser","eLocalStorage_tenTrack","tt_deviceid","eLocalStorage","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","r","Symbol","toStringTag","defineProperty","value","hours","hourRange","tealiumServerData","TealiumData","memberEmailHashed","memberLoginStatus","memberOzTamId","cacheKey","timeOfDay","getHours","findIndex","range","timeSincePublication","givenDateTime","dateObject","dayDiff","Math","abs","getTime","isNaN","ceil","errorObject","getDateTimeDuration","contentPublishDate","utag_data"],"sourceRoot":""}