function newsletterSubscribe(n){var t,i;if(n.preventDefault(),$(n.target).closest(".toast").find(".alert").hide(),t=$(n.target).closest(".toast").find('input[name="email"]').val(),t==""){$(n.target).closest(".toast").find(".alert .error-message").text("Please enter your work email address");$(n.target).closest(".toast").find(".alert").fadeIn();return}if(i=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/,!i.test(t)){$(n.target).closest(".toast").find(".alert .error-message").text("Please enter a valid email address");$(n.target).closest(".toast").find(".alert").fadeIn();return}$.post(_ttvApiUrl+"/user/capture",{email:t}).done(function(){$(n.target).closest(".toast").find(".toast-close-button").click();setTimeout(function(){toastr.success("You're now subscribed to TelecomTV's email newsletters","Thanks",{faClass:"fal fa-thumbs-up"})},500)}).fail(function(){$(n.target).closest(".toast").find(".alert .error-message").text("Sorry there was a problem, please try again");$(n.target).closest(".toast").find(".alert").fadeIn()})}function newsletterRemindLater(n){$(n.target).closest(".toast").fadeOut()}String.prototype.format||(String.prototype.format=function(){var n=arguments;return this.replace(/{(\d+)}/g,function(t,i){return typeof n[i]!="undefined"?n[i]:t})});String.prototype.hashCode||(String.prototype.hashCode=function(){var n=0;if(this.length==0)return n;for(i=0;i<this.length;i++)char=this.charCodeAt(i),n=(n<<5)-n+char,n=n&n;return n}),function(){"use strict";angular.module("app",["app.core","app.error","app.layout","app.elements","app.content","app.page","app.search","app.user"])}();String.prototype.startsWith||(String.prototype.startsWith=function(n,t){return t=t||0,this.indexOf(n,t)===t}),function(){"use strict";angular.module("blocks.auth",["angularModalService","ngStorage","ui.bootstrap.showErrors"])}(),function(){"use strict";function n(n,t,i,r,u,f){function h(){e()}function e(){f.storage.context!=null&&f.storage.context.tokenExpiry!=null&&moment.utc(f.storage.context.tokenExpiry)<moment.utc()&&(delete f.storage.context,i.info("User session expired"));f.storage.context!=null&&(f.storage.context.tokenUpdated==null||moment.utc(f.storage.context.tokenUpdated)<moment.utc().subtract(7,"days"))&&t.getRefresh().then(function(n){f.storage.context=n;f.storage.context!=null?i.info("User session refreshed"):(i.error("User session refresh failed",message),delete f.storage.context)},function(n){delete f.storage.context;i.error("Error trying to refresh user session.",n)})}function c(){f.storage.context==null&&u.path("/user/login/").search({"return":u.search().return||window.location.pathname+window.location.search})}function l(){f.storage.context==null&&u.path("/user/register/").search({"return":u.search().return||window.location.pathname+window.location.search})}function a(){t.getLogout().then(function(){delete f.storage.context;n.$broadcast("user:logout");f.eventTrack("Sign Out","User");i.infoAlert("Ok, you're now signed out");u.path("/user/login/").search({"return":window.location.pathname+window.location.search})},function(n){i.errorAlert("Sorry there was an error when trying to log you out.",n)})}function v(){t.getLogoutAllSessions().then(function(){delete f.storage.context;n.$broadcast("user:logout");f.eventTrack("Sign Out All Sessions","User");i.infoAlert("Ok, you're now signed out everywhere");u.path("/user/login/").search({"return":window.location.pathname+window.location.search})},function(n){i.errorAlert("Sorry there was an error when trying to log you out.",n)})}function y(){t.getLogout().then(function(){delete f.storage.context;n.$broadcast("user:logout");f.eventTrack("Sign Out","User");i.infoAlert("Ok, you're now signed out")},function(n){i.errorAlert("Sorry there was an error when trying to log you out.",n)})}function p(){f.storage.context==null&&u.path("/user/forgot/").search({"return":u.search().return||window.location.pathname+window.location.search})}function w(){return o()?!0:(u.path("/user/login/").search({"return":u.search().return||window.location.pathname+window.location.search}),!1)}function o(){return f.storage.context!=null}function b(){return f.storage.context!=null?(u.url(u.search().return||"/"),!0):!1}function k(n){r.showModal({templateUrl:"/app/blocks/auth/barrierModal.html?v="+_ttvVersion,controller:"BarrierModal",inputs:{reason:n}}).then(function(n){n.element.modal()})}var s={refreshToken:e,login:c,register:l,logout:a,logoutAllSessions:v,logoutNoRedirect:y,forgot:p,authorize:w,authorized:o,bounce:b,barrier:k};return h(),s}angular.module("blocks.auth").factory("auth",n);n.$inject=["$rootScope","UserData","logger","ModalService","$location","common"]}(),function(){"use strict";function n(n,t,i){function r(n){if(!n.url.startsWith(_ttvApiUrl))return n;n.headers=n.headers||{};var t=i.storage.context;return t&&t.tokenId&&t.tokenSecret&&(n.headers.Authorization="Basic "+i.toBase64(t.tokenId+":"+t.tokenSecret)),n}function u(t){return t.status===401&&(delete i.storage.context,i.logger.errorAlert("Sorry, your session has expired - please sign in and try again, or reload the page.")),t.status===403&&i.logger.errorAlert("Sorry, you do not have permission to do that - please try again or reload the page."),n.reject(t)}return{request:r,responseError:u}}angular.module("blocks.auth").factory("authInterceptor",n);n.$inject=["$q","$location","common"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o){n.reason=e;n.auth=u;switch(e){case"filters":n.message="";break;case"export":n.message="To export Analysis charts to Excel please register for a free account"}o.eventTrack("Barrier","User",e);n.cancel=function(){t.modal("hide");i(null,500)};n.forgot=function(){t.modal("hide");u.forgot()};n.subscribe=function(){t.modal("hide");u.subscribe()};n.login=function(){t.modal("hide");u.login()};n.register=function(){t.modal("hide");u.register()}}angular.module("blocks.auth").controller("BarrierModal",n);n.$inject=["$scope","$element","close","UserData","auth","logger","reason","common"]}(),function(){"use strict";angular.module("blocks.exception",["blocks.logger"])}(),function(){"use strict";function i(){this.config={};this.$get=function(){return{config:this.config}}}function n(n){n.decorator("$exceptionHandler",t)}function t(n,t,i){var r=t.config.appErrorPrefix||"";return function(t,u){n(t,u);var f={exception:t,cause:u},e=r+t.message;i.error(e,f)}}angular.module("blocks.exception").provider("exceptionConfig",i).config(n);n.$inject=["$provide"];t.$inject=["$delegate","exceptionConfig","logger"]}(),function(){"use strict";function n(n){function t(t){return function(i){n.error(t,i)}}return{catcher:t}}angular.module("blocks.exception").factory("exception",n);n.$inject=["logger"]}(),function(){"use strict";angular.module("blocks.logger",[])}(),function(){"use strict";function n(n,t){function r(i,r,u,f,e){e&&t.error(i+'<br />Please try again or <a href="/pages/help/" target="_blank">contact us<\/a> if the problem persists.',u,{faClass:f||"fal fa-times-octagon"});i="[Error] "+i;r?n.error(i,r):n.error(i)}function e(n,t,i,u){r(n,t,i,u,!0)}function i(i,r,u,f,e,o,s){e&&(o?t.info(i,u,{timeOut:0,extendedTimeOut:0,faClass:f||"fal fa-info-circle",onHidden:s}):t.info(i,u,{faClass:f||"fal fa-info-circle",onHidden:s}));i="[Info] "+i;r?n.info(i,r):n.info(i)}function o(n,t,r,u){i(n,t,r,u,!0)}function s(n,t,r,u){i(n,t,r,u,!0,!0)}function u(i,r,u,f,e){e&&t.success(i,u,{faClass:f||"fal fa-check"});i="[Success] "+i;r?n.info(i,r):n.info(i)}function h(n,t,i,r){u(n,t,i,r,!0)}function f(i,r,u,f,e){e&&t.warning(i,u,{faClass:f||"fal fa-exclamation-triangle"});i="[Warning] "+i;r?n.warn(i,r):n.warn(i)}function c(n,t,i,r){f(n,t,i,r,!0)}function l(t,i){n.debug("[Debug] "+t,i)}function a(t,i){i?n.log(t,i):n.log(t)}return{showToasts:!0,error:r,errorAlert:e,info:i,infoAlert:o,infoAlertSticky:s,success:u,successAlert:h,warning:f,warningAlert:c,debug:l,log:a}}angular.module("blocks.logger").factory("logger",n);n.$inject=["$log","toastr"]}(),function(){"use strict";angular.module("blocks.router",["ngRoute","blocks.logger"])}(),function(){"use strict";function t(){this.config={};this.$get=function(){return{config:this.config}}}function n(n,t,i,r,u,f,e,o){function v(n){c.caseInsensitiveMatch=!0;n.forEach(function(n){n.config.resolve=angular.extend(n.config.resolve||{},u.config.resolveAlways);c.when(n.url,n.config)});c.otherwise({templateUrl:"/app/error/error.html?v="+_ttvVersion,title:"Error"})}function y(){t.$on("$routeChangeError",function(t,i,u,f){if(!s){h.errors++;s=!0;var e=i&&(i.title||i.name||i.loadedTemplateUrl)||"unknown target",o="Error routing to "+e+". "+(f.msg||"");r.error(o,[i]);n.path("/")}})}function p(){y();b();k()}function w(){var n,t,r;for(n in i.routes)i.routes.hasOwnProperty(n)&&(t=i.routes[n],r=!!t.title,r&&l.push(t));return l}function b(){t.$on("$routeChangeSuccess",function(){h.changes++;s=!1})}function k(){t.$on("$viewContentLoaded",function(){o(function(){window.scrollTo(0,0)})})}function d(n){t.title=g(n)}function g(n){return n?n+" | "+u.config.docTitle:u.config.docTitle}var s=!1,h={errors:0,changes:0},l=[],c=u.config.$routeProvider,a={configureRoutes:v,getRoutes:w,routeCounts:h,setDocTitle:d};return p(),a}angular.module("blocks.router").provider("routehelperConfig",t).factory("routehelper",n);n.$inject=["$location","$rootScope","$route","logger","routehelperConfig","$http","$q","$timeout"]}(),function(){"use strict";angular.module("blocks.time",[])}(),function(){"use strict";function n(n){function r(){}function u(i){if(t!==null)return t;if(i!==i){t=new Date(i);var r=t.getTime()-Date.now();moment.now=function(){return r+Date.now()};return}return n.getUtc().then(function(n){t=new Date(n);var i=t.getTime()-Date.now();return moment.now=function(){return i+Date.now()},n},function(){})}var i={syncUtc:u},t=null;return r(),i}angular.module("blocks.time").factory("time",n);n.$inject=["AppData"]}(),function(){"use strict";angular.module("app.content",[])}(),function(){"use strict";function n(n){n.configureRoutes(t())}function t(){return[{url:"/",config:{templateUrl:"/app/content/index.html?v="+_ttvVersion,title:"Home"}},{url:"/content/:tag/",config:{templateUrl:"/app/content/index.html?v="+_ttvVersion,title:"Content",reloadOnSearch:!1}},{url:"/content/:tag/layout-:layout/",config:{templateUrl:"/app/content/index.html?v="+_ttvVersion,title:"Content",reloadOnSearch:!1}},{url:"/content/:tag/analyse/",config:{templateUrl:"/app/content/analyse.html?v="+_ttvVersion,title:"Analyse",view:"analyse",reloadOnSearch:!1}},{url:"/content/:tag/:alias/",config:{templateUrl:"/app/content/detail.html?v="+_ttvVersion,title:"Content",reloadOnSearch:!1}}]}angular.module("app.content").run(n);n.$inject=["routehelper"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o,s,h,c,l){function p(){w();a.query={primaryTagAlias:a.tag}}function w(){return o.getTag(a.tag).then(function(n){a.tagData=n;t.current.data={tag:a.tag};t.current.meta={title:a.tagData.title,nav:{title:a.tagData.title}};var i=JSON.parse(a.tagData.attributes);return i!=null&&i.nav!=null&&(t.current.meta.nav=i.nav),i!=null&&i.subnav!=null&&(t.current.meta.subnav=i.subnav),i!=null&&i.bg!=null&&(t.current.meta.bg=i.bg),i!=null&&i.section!=null&&(t.current.meta.section=i.section),h.$broadcast("route.meta.changed"),l.setDocTitle(a.tagData.title),f.pageTrack(),b(),n},function(){f.logger.error("Tag not found:",a.tag)})}function b(){return o.getFilters().then(function(n){return a.tags=n,y(!0),d(),n},function(n){f.logger.error("Couldn't retrieve tag filter list",n)})}function k(){return s.postReportAnalyse(a.query).then(function(n){return a.busy=!1,a.loaded=!0,a.report=n,g(),nt(),n},function(n){f.logger.error("Couldn't retrieve tag filter list",n)})}function d(){n.$on("$routeUpdate",function(){y()})}function y(){var n,r,u;i.path()!==v||a.busy||(n=i.search(),a.query.tags=n.t&&n.t.length>0?angular.isArray(n.t)?n.t:[n.t]:[],n.from?(r=moment.utc(n.from,"YYYYMM").startOf("month"),a.query.from=r.format("YYYY-MM-DD"),a.from=r.format("D-MMM-YYYY")):(r=moment.utc().subtract(12,"months").startOf("month"),a.query.from=r.format("YYYY-MM-DD"),a.from=r.format("D-MMM-YYYY")),n.to?(u=moment.utc(n.to,"YYYYMM").endOf("month"),a.query.to=u.format("YYYY-MM-DD"),a.to=u.format("D-MMM-YYYY")):(u=moment.utc().subtract(1,"month").endOf("month"),a.query.to=u.format("YYYY-MM-DD"),a.to=u.format("D-MMM-YYYY")),a.search=angular.copy(n),t.current.data.query=a.query,h.$broadcast("content.search"),a.content=[],a.busy=!0,k())}function g(){a.selectedTechnologies=Enumerable.From(a.tags).Where(function(n){return n.type==="technology"&&Enumerable.From(a.query.tags).Contains(n.alias)}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray();a.selectedIndustrySectors=Enumerable.From(a.tags).Where(function(n){return n.type==="industrySector"&&Enumerable.From(a.query.tags).Contains(n.alias)}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray();a.selectedCompanies=Enumerable.From(a.tags).Where(function(n){return n.type==="company"&&Enumerable.From(a.query.tags).Contains(n.alias)}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray();a.selectedRegions=Enumerable.From(a.tags).Where(function(n){return n.type==="region"&&Enumerable.From(a.query.tags).Contains(n.alias)}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray();a.selectedTypes=Enumerable.From(a.tags).Where(function(n){return n.type==="contentType"&&Enumerable.From(a.query.tags).Contains(n.alias)}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray();a.selectedGovernance=Enumerable.From(a.tags).Where(function(n){return n.type==="governance"&&Enumerable.From(a.query.tags).Contains(n.alias)}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray()}function nt(){a.charts={countMonthly:{},countByTechnology:{},countByIndustrySector:{},countByCompany:{},countByRegion:{},countByType:{},countByGovernance:{}};a.charts.countMonthly.options={animation:!1,scales:{yAxes:[{ticks:{fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}],xAxes:[{ticks:{beginAtZero:!0,fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}]},elements:{line:{tension:0,borderColor:"#2d76bb",borderWidth:2},point:{radius:0,hitRadius:10,hoverRadius:0}},tooltips:{titleFontSize:10,position:"nearest",bodyFontSize:10,cornerRadius:0,caretPadding:0,intersect:!1,displayColors:!1}};a.charts.countMonthly.labels=Enumerable.From(a.report.countMonthly).Select("x=>moment.utc(x.date).format('MMM-YY')").ToArray();a.charts.countMonthly.data=[Enumerable.From(a.report.countMonthly).Select("x=>x.value").ToArray()];a.charts.countMonthly.colors=[{fill:{color:"#fff"}}];a.charts.countByTechnology.options={animation:!1,scales:{yAxes:[{ticks:{fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}],xAxes:[{ticks:{beginAtZero:!0,fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}]},tooltips:{titleFontSize:10,position:"nearest",bodyFontSize:10,cornerRadius:0,caretPadding:0,displayColors:!1}};a.charts.countByTechnology.labels=Enumerable.From(a.report.countByTechnology).Take(10).Select("x=>x.name").ToArray();a.charts.countByTechnology.data=[Enumerable.From(a.report.countByTechnology).Take(10).Select("x=>x.value").ToArray()];a.charts.countByTechnology.colors=[{backgroundColor:"#2d76bb",hoverBackgroundColor:"#2d76bb",borderWidth:0}];a.charts.countByIndustrySector.options={animation:!1,scales:{yAxes:[{ticks:{fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}],xAxes:[{ticks:{beginAtZero:!0,fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}]},tooltips:{titleFontSize:10,position:"nearest",bodyFontSize:10,cornerRadius:0,caretPadding:0,displayColors:!1}};a.charts.countByIndustrySector.labels=Enumerable.From(a.report.countByIndustrySector).Take(10).Select("x=>x.name").ToArray();a.charts.countByIndustrySector.data=[Enumerable.From(a.report.countByIndustrySector).Take(10).Select("x=>x.value").ToArray()];a.charts.countByIndustrySector.colors=[{backgroundColor:"#2d76bb",hoverBackgroundColor:"#2d76bb",borderWidth:0}];a.charts.countByCompany.options={animation:!1,scales:{yAxes:[{ticks:{fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}],xAxes:[{ticks:{beginAtZero:!0,fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}]},tooltips:{titleFontSize:10,position:"nearest",bodyFontSize:10,cornerRadius:0,caretPadding:0,displayColors:!1}};a.charts.countByCompany.labels=Enumerable.From(a.report.countByCompany).Take(10).Select("x=>x.name").ToArray();a.charts.countByCompany.data=[Enumerable.From(a.report.countByCompany).Take(10).Select("x=>x.value").ToArray()];a.charts.countByCompany.colors=[{backgroundColor:"#2d76bb",hoverBackgroundColor:"#2d76bb",borderWidth:0}];a.charts.countByRegion.options={animation:!1,scales:{yAxes:[{ticks:{fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}],xAxes:[{ticks:{beginAtZero:!0,fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}]},tooltips:{titleFontSize:10,position:"nearest",bodyFontSize:10,cornerRadius:0,caretPadding:0,displayColors:!1}};a.charts.countByRegion.labels=Enumerable.From(a.report.countByRegion).Take(10).Select("x=>x.name").ToArray();a.charts.countByRegion.data=[Enumerable.From(a.report.countByRegion).Take(10).Select("x=>x.value").ToArray()];a.charts.countByRegion.colors=[{backgroundColor:"#2d76bb",hoverBackgroundColor:"#2d76bb",borderWidth:0}];a.charts.countByType.options={animation:!1,scales:{yAxes:[{ticks:{fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}],xAxes:[{ticks:{beginAtZero:!0,fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}]},tooltips:{titleFontSize:10,position:"nearest",bodyFontSize:10,cornerRadius:0,caretPadding:0,displayColors:!1}};a.charts.countByType.labels=Enumerable.From(a.report.countByType).Take(10).Select("x=>x.name").ToArray();a.charts.countByType.data=[Enumerable.From(a.report.countByType).Take(10).Select("x=>x.value").ToArray()];a.charts.countByType.colors=[{backgroundColor:"#2d76bb",hoverBackgroundColor:"#2d76bb",borderWidth:0}];a.charts.countByGovernance.options={animation:!1,scales:{yAxes:[{ticks:{fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}],xAxes:[{ticks:{beginAtZero:!0,fontSize:11,fontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}}]},tooltips:{titleFontSize:10,position:"nearest",bodyFontSize:10,cornerRadius:0,caretPadding:0,displayColors:!1}};a.charts.countByGovernance.labels=Enumerable.From(a.report.countByGovernance).Take(10).Select("x=>x.name").ToArray();a.charts.countByGovernance.data=[Enumerable.From(a.report.countByGovernance).Take(10).Select("x=>x.value").ToArray()];a.charts.countByGovernance.colors=[{backgroundColor:"#2d76bb",hoverBackgroundColor:"#2d76bb",borderWidth:0}]}function tt(){if(!a.auth.authorized()){a.auth.barrier("export");return}return f.eventTrack("Export","Analyse",i.url().split("?")[1]),s.postReportAnalyseExcel(a.query).then(function(n){window.location=n})}var a=this,v;a.auth=c;a.include=null;a.loaded=!1;a.busy=!1;a.tag=r.tag||"home";a.tags=[];a.query={};a.report={};a.charts={};a.exportExcel=tt;v=i.path();p()}angular.module("app.content").controller("ContentAnalyse",n);n.$inject=["$scope","$route","$location","$routeParams","$sce","common","config","TagData","ReportData","$rootScope","auth","routehelper"]}(),function(){"use strict";function n(n,t){function i(i){function u(){r.authors=Enumerable.From(r.content.tags).Where(function(n){return n.type==="author"}).ToArray();r.content.stub?(r.url=r.content.stubUrl,r.fullurl=r.url.startsWith("http://")||r.url.startsWith("https://")?r.url:window.location.origin+r.url):(r.url="/content/{0}/{1}/".format(r.overridealias!=null?r.overridealias:r.content.primaryTag.alias,r.content.alias),r.fullurl=window.location.origin+r.url);r.loaded=!0}function f(){r.share=!r.share;n(function(){addthis.toolbox(".addthis_inline_share_toolbox_a67y");typeof addthis.layers.refresh=="function"&&addthis.layers.refresh()},500)}var r={};i.vm=r;r.content=i.content;r.overridealias=i.overridealias;r.options=i.options;r.share=!1;r.toggleShare=f;r.common=t;r.loaded=!1;u()}return{restrict:"E",scope:{content:"=content",overridealias:"=overridealias",options:"=options"},templateUrl:"/app/content/appContentCard.html?v="+_ttvVersion,link:{pre:i}}}angular.module("app.content").directive("appContentCard",n);n.$inject=["$timeout","common"]}(),function(){"use strict";function n(n){function t(t){function r(){i.authors=Enumerable.From(i.content.tags).Where(function(n){return n.type==="author"}).ToArray();i.video=Enumerable.From(i.content.chapters).Any(function(n){return n.type==="video"});i.video&&(i.videoDurationSeconds=Enumerable.From(i.content.chapters).FirstOrDefault(function(n){return n.type==="video"}).video.durationSeconds);i.url=i.content.stub?i.content.stubUrl:"/content/{0}/{1}/".format(i.overridealias!=null?i.overridealias:i.content.primaryTag.alias,i.content.alias);i.loaded=!0}var i={};t.vm=i;i.content=t.content;i.overridealias=t.overridealias;i.options=t.options;i.common=n;i.loaded=!1;r()}return{restrict:"E",scope:{content:"=content",overridealias:"=overridealias",options:"=options"},templateUrl:"/app/content/appContentCardCompact.html?v="+_ttvVersion,link:{pre:t}}}angular.module("app.content").directive("appContentCardCompact",n);n.$inject=["common"]}(),function(){"use strict";function n(n,t,i,r,u,f,e){function o(f){function s(){o.authors=Enumerable.From(o.content.tags).Where(function(n){return n.type==="author"}).ToArray();o.tags=Enumerable.From(o.content.tags).Where(function(n){return n.type!="author"}).ToArray();o.tracker=Enumerable.From(o.content.tags).Any(function(n){return n.alias==="tracker"});o.firstChapter=Enumerable.From(o.content.chapters).Take(1).Where(function(n){return n.type==="video"||n.type==="image"}).FirstOrDefault();o.otherChapters=Enumerable.From(o.content.chapters).Where(function(n){return n!==o.firstChapter}).ToArray();o.content.consentFields!==null&&(o.fields=JSON.parse(o.content.consentFields).fields);i(function(){addthis.toolbox(".addthis_inline_share_toolbox");typeof addthis.layers.refresh=="function"&&addthis.layers.refresh()},500);o.loaded=!0}function h(){if(u.authorized()){e.$broadcast("app-form-show-validation-errors");o.consentFormValid=!0;var i={};if(angular.forEach(o.fields,function(n){if(n.type==="checkbox"||n.type==="text"||n.type==="textarea"||n.type==="select"||n.type==="country"){n.valid||(o.consentFormValid=!1);var t={};t[n.name]=n.value;angular.extend(i,t)}}),o.consentFormValid)return t.postConsent(o.content.alias,i).then(function(t){t!==null&&(o.content=t,o.firstChapter=Enumerable.From(o.content.chapters).Take(1).Where(function(n){return n.type==="video"||n.type==="image"}).FirstOrDefault(),o.otherChapters=Enumerable.From(o.content.chapters).Where(function(n){return n!==o.firstChapter}).ToArray(),$("html, body").animate({scrollTop:0},800));n.logger.successAlert("Thanks, we've saved your preferences")},function(t){n.logger.errorAlert("Sorry, there was a problem saving your preferences.",t)})}}var o={};f.vm=o;o.loaded=!1;o.content=f.content;o.trustAsHtml=r.trustAsHtml;o.submitConsent=h;o.common=n;o.auth=u;o.fields=null;o.consentFormValid=!0;o.currentDateTime=moment.utc();o.moment=moment;s()}return{restrict:"E",scope:{content:"=content"},templateUrl:"/app/content/appContentDetail.html?v="+_ttvVersion,link:{pre:o}}}angular.module("app.content").directive("appContentDetail",n);n.$inject=["common","ContentData","$timeout","$sce","auth","$location","$rootScope"]}(),function(){"use strict";function n(n,t,i,r,u){function f(n){function e(){o();h();f()}function o(){for(var r=moment("2015-06-01"),u=moment.utc().startOf("month"),i=[],n=moment(r);n.diff(u,"months")<=0;n.add(1,"months"))i.unshift({id:n.format("YYYYMM"),name:n.format("MMM YYYY")});t.dateOptions=i}function s(){t.expanded=!t.expanded}function h(){n.$on("content.search",function(){f()})}function f(){var n=i.current.data.query;n!=null&&(t.selected=r.search().from!=null||r.search().to!=null,t.from=moment.utc(n.from).format("YYYYMM"),t.to=moment.utc(n.to).format("YYYYMM"),t.loaded=!0)}function c(){if(!t.auth.authorized()){t.auth.barrier("date");return}r.search("from",t.from.format("YYYYMM"));r.search("to",t.to.format("YYYYMM"))}var t={};n.vm=t;t.auth=u;t.view=n.view;t.expanded=!1;t.loaded=!1;t.togglePanel=s;t.dateChanged=c;e()}return{restrict:"E",scope:{view:"=view"},templateUrl:"/app/content/appContentFilterDates.html?v="+_ttvVersion,link:{pre:f}}}angular.module("app.content").directive("appContentFilterDates",n);n.$inject=["common","TagData","$route","$location","auth","$timeout"]}(),function(){"use strict";function n(n,t,i,r,u){function f(f){function s(){o();l();h()}function h(){return t.getFilters().then(function(n){return e.tags=n,e.loaded=!0,n},function(t){n.logger.error("Couldn't retrieve tag filter list",t)})}function c(){var t=angular.copy(e.query);return moment.utc(t.to).startOf("month").diff(moment.utc(t.from),"months")>12&&(t.from=moment.utc(t.to).subtract(11,"months").startOf("month")),i.postReportSummary(t).then(function(n){return e.reportSummary=n,e.chart.min=Enumerable.From(e.reportSummary.countMonthly).Min("x=>x.value"),e.chart.max=Enumerable.From(e.reportSummary.countMonthly).Max("x=>x.value"),e.chart.options={animation:!1,scales:{xAxes:[{display:!1}],yAxes:[{display:!1,ticks:{min:e.chart.min-10,max:e.chart.max+10,stepWidth:1}}]},legend:{position:"bottom"},layout:{padding:{left:0,right:0,top:10,bottom:10}},elements:{line:{tension:0,borderColor:"#fff",borderWidth:2},point:{radius:0,hitRadius:10,hoverRadius:0}},tooltips:{titleFontSize:10,position:"nearest",bodyFontSize:10,cornerRadius:0,caretPadding:0,intersect:!1,displayColors:!1}},e.chart.labels=Enumerable.From(e.reportSummary.countMonthly).Select("x=>moment.utc(x.date).format('MMM-YY')").ToArray(),e.chart.data=[Enumerable.From(e.reportSummary.countMonthly).Select("x=>x.value").ToArray()],e.chart.colors=[{fill:{color:"#fff"}}],n},function(t){n.logger.error("Couldn't retrieve tag filter list",t)})}function l(){f.$on("content.search",function(){o()})}function o(){if((e.urlDefault="/content/{0}/{1}".format(e.tag,window.location.search),e.urlAnalyse="/content/{0}/analyse/{1}".format(e.tag,window.location.search),e.urlBase=e.view=="analyse"?"/content/{0}/analyse/".format(e.tag):"/content/{0}/".format(e.tag),$(".tracker-timeline-link").attr("href",e.urlDefault),$(".tracker-analyse-link").attr("href",e.urlAnalyse),e.reportSummary=null,r.current&&r.current.data)&&(e.query=r.current.data.query,e.query!=null)){var n=u.search();(e.filtersDirty=e.query.tags.length>0||n.from!=null||n.to!=null,e.view!="analyse")&&c()}}var e={};f.vm=e;e.tag=f.tag;e.view=f.view;e.loaded=!1;e.tags=null;e.query={};e.reportSummary=null;e.chart={};s()}return{restrict:"E",scope:{tag:"=tag",view:"=view"},templateUrl:"/app/content/appContentFilters.html?v="+_ttvVersion,link:{pre:f}}}angular.module("app.content").directive("appContentFilters",n);n.$inject=["common","TagData","ReportData","$route","$location"]}(),function(){"use strict";function n(n,t,i,r,u){function f(n){function e(){t.tags=Enumerable.From(t.data).Where(function(n){return n.type==t.sectionType}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray();s();f()}function o(){t.expanded=!t.expanded}function s(){n.$on("content.search",function(){f()})}function f(){var n=i.current.data.query,r;n!=null&&(r=Enumerable.From(t.tags).Where(function(t){return Enumerable.From(n.tags).Contains(t.alias)}).OrderBy(function(n){return n.shortTitle.toLowerCase()}),t.selected=r.ToArray(),t.loaded=!0)}function h(n){var i,u;if(!t.auth.authorized()){t.auth.barrier("filters");return}i=r.search().t;i&&i.length!=0?angular.isArray(i)||(i=[i]):i=[];u=i.indexOf(n);u>-1?i.splice(u,1):i.push(n);r.search("i",null);r.search("t",i)}var t={};n.vm=t;t.auth=u;t.data=n.data;t.sectionType=n.sectionType;t.sectionTitle=n.sectionTitle;t.expanded=!1;t.loaded=!1;t.allTags=null;t.togglePanel=o;t.toggle=h;e()}return{restrict:"E",scope:{data:"=data",sectionType:"@sectionType",sectionTitle:"@sectionTitle"},templateUrl:"/app/content/appContentFilterSection.html?v="+_ttvVersion,link:{pre:f}}}angular.module("app.content").directive("appContentFilterSection",n);n.$inject=["common","TagData","$route","$location","auth"]}(),function(){"use strict";function n(n,t,i){function r(r){function f(){e();o()}function e(){return t.getFiltersFeatured().then(function(n){return u.tags=n,u.companies=Enumerable.From(u.tags).Where(function(n){return n.type=="company"}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray(),u.technologies=Enumerable.From(u.tags).Where(function(n){return n.type=="technology"}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray(),u.industrySectors=Enumerable.From(u.tags).Where(function(n){return n.type=="industrySector"}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray(),u.regions=Enumerable.From(u.tags).Where(function(n){return n.type=="region"}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray(),u.types=Enumerable.From(u.tags).Where(function(n){return n.type=="contentType"}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray(),u.governance=Enumerable.From(u.tags).Where(function(n){return n.type=="governance"}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray(),u.loaded=!0,n},function(t){n.logger.error("Couldn't retrieve tag filter list",t)})}function o(){return i.postReportSummary({primaryTagAlias:"tracker"}).then(function(n){return u.reportSummary=n,u.chart.min=Enumerable.From(u.reportSummary.countMonthly).Min("x=>x.value"),u.chart.max=Enumerable.From(u.reportSummary.countMonthly).Max("x=>x.value"),u.chart.options={animation:!1,scales:{xAxes:[{display:!1}],yAxes:[{display:!1,ticks:{min:u.chart.min-10,max:u.chart.max+10,stepWidth:1}}]},legend:{position:"bottom"},layout:{padding:{left:0,right:0,top:10,bottom:10}},elements:{line:{tension:0,borderColor:"#fff",borderWidth:2},point:{radius:0,hitRadius:10,hoverRadius:0}},tooltips:{titleFontSize:10,position:"nearest",bodyFontSize:10,cornerRadius:0,caretPadding:0,intersect:!1,displayColors:!1}},u.chart.labels=Enumerable.From(u.reportSummary.countMonthly).Select("x=>moment.utc(x.date).format('MMM-YY')").ToArray(),u.chart.data=[Enumerable.From(u.reportSummary.countMonthly).Select("x=>x.value").ToArray()],u.chart.colors=[{fill:{color:"#fff"}}],n},function(t){n.logger.error("Couldn't retrieve tag filter list",t)})}var u={};r.vm=u;u.loaded=!1;u.tags=null;u.reportSummary=null;u.chart={};f()}return{restrict:"E",scope:{},templateUrl:"/app/content/appContentFiltersFeatured.html?v="+_ttvVersion,link:{pre:r}}}angular.module("app.content").directive("appContentFiltersFeatured",n);n.$inject=["common","TagData","ReportData","$route","$location"]}(),function(){"use strict";function n(n,t,i,r,u,f,e){function o(f){function l(){window.scrollTo(0,0);o.query={primaryTagAlias:o.tag,pageSize:o.pageSize};s(!0);v();e.onscroll=n.debounce(a,500);f.$on("$destroy",function(){e.onscroll=null})}function a(){var n=$(window).scrollTop()-60;$(".scroll-track").children("app-content-card").each(function(t){if($(this).offset().top>n)return o.scrollTrackId=t!=0||o.moreAbove?$(this).data("scroll-track-id"):null,!1});f.$apply(function(){r.search("i",o.scrollTrackId);r.replace()})}function c(i){var r=angular.copy(o.query);return i!=null&&(r.sortOrderLessThan=i),t.postContentIndexRequest(r).then(function(n){return(o.busy=!1,o.loaded=!0,o.moreBelow=n.content.length==o.pageSize,n.content.length==0)?n:(o.pages++,angular.forEach(n.content,function(n){n.rowId=o.pages+"_"+n.alias}),o.content=o.content.concat(Enumerable.From(n.content).Where(function(n){return n.alias!=o.excludeitem}).ToArray()),o.bottomSortOrder=n.content[n.content.length-1].sortOrder,n)},function(t){o.busy=!1;n.logger.error("Couldn't retrieve content list",t)})}function v(){f.$on("$routeUpdate",function(){s()})}function s(n){var t,f,e;r.path()!=h||o.busy||(t=r.search(),!n&&o.loaded&&angular.equals(t.t,o.search.t)&&angular.equals(t.from,o.search.from)&&angular.equals(t.to,o.search.to))||(!o.loaded&&t.i?(o.query.startAtAlias=t.i,o.moreAbove=!0):(o.moreAbove=!1,delete o.query.startAtAlias),o.query.tags=t.t&&t.t.length>0?angular.isArray(t.t)?t.t:[t.t]:[],t.from?(f=moment.utc(t.from,"YYYYMM").startOf("month"),o.query.from=f.format("YYYY-MM-DD")):(f=moment.utc("2015-06-01").startOf("month"),o.query.from=f.format("YYYY-MM-DD")),t.to?(e=moment.utc(t.to,"YYYYMM").endOf("month"),o.query.to=e.format("YYYY-MM-DD")):(e=moment.utc().endOf("month"),o.query.to=e.format("YYYY-MM-DD")),o.search=angular.copy(t),i.current.data.query=o.query,u.$broadcast("content.search"),o.content=[],o.busy=!0,o.pages=0,c())}function y(){r.search("i",null);s(!0)}function p(){!o.busy&&o.loaded&&o.moreBelow&&o.content.length!=0&&(o.busy=!0,c(o.bottomSortOrder))}var o={},h;f.vm=o;o.tag=f.tag;o.overridealias=f.overridealias;o.excludeitem=f.excludeitem;o.loaded=!1;o.busy=!1;o.query={};o.content=[];o.search={};o.moreAbove=!1;o.moreBelow=!1;o.pages=0;o.pageSize=25;o.backToTop=y;o.loadMoreItems=p;h=r.path();l()}return{restrict:"E",scope:{tag:"=tag",overridealias:"=overridealias",excludeitem:"=excludeitem"},templateUrl:"/app/content/appContentIndex.html?v="+_ttvVersion,link:{pre:o}}}angular.module("app.content").directive("appContentIndex",n);n.$inject=["common","ContentData","$route","$location","$rootScope","$document","$window"]}(),function(){"use strict";function n(){function n(n){function i(){t.url=t.content.stub?t.content.stubUrl:"/content/{0}/{1}/".format(t.overridealias!=null?t.overridealias:t.content.primaryTag.alias,t.content.alias);t.loaded=!0}var t={};n.vm=t;t.content=n.content;t.overridealias=n.overridealias;t.options=n.options;t.loaded=!1;i()}return{restrict:"E",scope:{content:"=content",overridealias:"=overridealias",options:"=options"},templateUrl:"/app/content/appContentInlineCompact.html?v="+_ttvVersion,link:{pre:n}}}angular.module("app.content").directive("appContentInlineCompact",n);n.$inject=[]}(),function(){"use strict";function n(n,t,i){function r(r){function e(){u.mode=="list"?(u.query==null?u.query={alias:u.alias,pageSize:u.excludeitem!=null?u.pageSize+1:u.pageSize}:u.query.pageSize=u.excludeitem!=null?u.query.pageSize+1:u.query.pageSize||10,o()):u.mode=="content"&&(u.query==null?u.query={tags:[u.alias],pageSize:u.excludeitem!=null?u.pageSize+1:u.pageSize}:u.query.pageSize=u.excludeitem!=null?u.query.pageSize+1:u.query.pageSize||10,u.busy=!0,f())}function o(){return i.postListIndexRequest(u.query).then(function(n){return u.content=n,u.loaded=!0,n},function(t){n.logger.error("Couldn't retrieve list",t)})}function f(i){var r=angular.copy(u.query);return i!=null&&(r.sortOrderLessThan=i,delete r.skip),t.postContentIndexRequest(r).then(function(n){if(u.busy=!1,u.loaded=!0,u.moreBelow=n.content.length==u.query.pageSize,n.content.length==0)return n;var t=u.excludeitem!=null?u.query.pageSize-1:u.query.pageSize;return u.content=u.content.concat(Enumerable.From(n.content).Where(function(n){return n.alias!=u.excludeitem}).Take(t).ToArray()),u.pages++,u.bottomSortOrder=n.content[n.content.length-1].sortOrder,n},function(t){n.logger.error("Couldn't retrieve content list",t)})}function s(){!u.busy&&u.loaded&&u.moreBelow&&u.content.length!=0&&(u.busy=!0,f(u.bottomSortOrder))}var u={};r.vm=u;u.mode=r.mode;u.layout=r.layout;u.options=r.options;u.alias=r.alias;u.query=r.query;u.pagination=r.pagination;u.pageSize=r.pageSize||10;u.overridealias=r.overridealias;u.excludeitem=r.excludeitem;u.busy=!1;u.loaded=!1;u.content=[];u.moreBelow=!1;u.pages=0;u.bottomSortOrder=null;u.loadMoreItems=s;e()}return{restrict:"E",scope:{mode:"@mode",layout:"@layout",options:"=options",query:"=query",alias:"=alias",pageSize:"@pageSize",pagination:"@pagination",overridealias:"=overridealias",excludeitem:"=excludeitem"},templateUrl:"/app/content/appContentList.html?v="+_ttvVersion,link:{pre:r}}}angular.module("app.content").directive("appContentList",n);n.$inject=["common","ContentData","ListData","$route","$location","$rootScope"]}(),function(){"use strict";function n(n,t,i){function r(r){function f(){}function e(){if(u.questionSent=!1,r.$broadcast("show-errors-check-validity"),u.question.name&&u.question.body&&u.question.body.length<=1e3){var i={alias:r.alias,name:u.question.name,body:u.question.body};return t.postQuestion(i).then(function(n){return u.questionSent=!0,u.question.body="",n},function(){n.logger.error("Sorry, there was a problem posting your question. Please try again.")})}}function o(){u.questionSent=!1}var u={};r.vm=u;u.questionSent=!1;u.question={};u.postQuestion=e;u.questionReset=o;u.common=n;u.auth=i;f()}return{restrict:"E",scope:{alias:"=alias"},templateUrl:"/app/content/appContentQuestion.html?v="+_ttvVersion,link:{pre:r}}}angular.module("app.content").directive("appContentQuestion",n);n.$inject=["common","QuestionData","auth"]}(),function(){"use strict";function n(){function n(n){function i(){r()}function r(){n.$watch("data",function(n){t.data=n})}var t={};n.vm=t;t.layout=n.layout;t.options=n.options;t.data=n.data;t.overridealias=n.overridealias;i()}return{restrict:"E",scope:{layout:"=layout",options:"=options",data:"=data",overridealias:"=overridealias"},templateUrl:"/app/content/appContentRepeater.html?v="+_ttvVersion,link:{pre:n}}}angular.module("app.content").directive("appContentRepeater",n);n.$inject=["common","ContentData","ListData","$route","$location","$rootScope"]}(),function(){"use strict";function n(n,t){function i(i){function u(){f()}function f(){return t.getList().then(function(n){return r.tags=n,r.loaded=!0,n},function(t){n.logger.error("Couldn't retrieve tag list",t)})}var r={};i.vm=r;r.loaded=!1;r.tags=null;u()}return{restrict:"E",scope:{},templateUrl:"/app/content/appTagList.html?v="+_ttvVersion,link:{pre:i}}}angular.module("app.content").directive("appTagList",n);n.$inject=["common","TagData"]}(),function(){"use strict";function n(){function n(n){function i(){t.tags=Enumerable.From(t.data).Where(function(n){return n.type==t.sectionType}).OrderBy(function(n){return n.shortTitle.toLowerCase()}).ToArray();t.loaded=!0}var t={};n.vm=t;t.data=n.data;t.sectionType=n.sectionType;t.sectionTitle=n.sectionTitle;t.loaded=!1;i()}return{restrict:"E",scope:{data:"=data",sectionType:"@sectionType",sectionTitle:"@sectionTitle"},templateUrl:"/app/content/appTagListSection.html?v="+_ttvVersion,link:{pre:n}}}angular.module("app.content").directive("appTagListSection",n);n.$inject=["common","TagData"]}(),function(){"use strict";function n(n,t,i,r,u,f,e){function s(){h()}function h(){return e.getTagExists(i.tag).then(function(t){return n.current.data={tag:i.tag},o.include="/layout/tag/"+i.tag+"/detail/",o.loaded=!0,t},function(){u.logger.error("Tag not found")})}var o=this;o.include=null;o.loaded=!1;s()}angular.module("app.content").controller("ContentDetail",n);n.$inject=["$route","$location","$routeParams","$sce","common","config","TagData"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o,s,h){function l(){a()}function a(){return e.getContent(c.tagAlias,c.alias).then(function(t){if(t.content.stub){if(t.content.sourceUrl!=null){h.location.href=t.content.sourceUrl;return}h.location.href="/";return}if(t.tag.redirectDetailUrl!=null){h.location.href=t.tag.redirectDetailUrl+c.alias+"/";return}c.tag=t.tag;c.content=t.content;n.current.data={tag:i.tag,alias:i.alias};n.current.meta={title:c.content.title};var r=JSON.parse(c.tag.attributes);return r!=null&&r.bg!=null&&(n.current.meta.bg=r.bg),r!=null&&r.section!=null&&(n.current.meta.section=r.section),o.$broadcast("route.meta.changed"),s.setDocTitle(c.content.title),u.pageTrack(),c.loaded=!0,t},function(n){u.logger.error("Couldn't retrieve content item",n)})}var c=this;c.loaded=!1;c.tag=null;c.content=null;c.tagAlias=i.tag;c.alias=i.alias;l()}angular.module("app.content").controller("ContentDetailLayout",n);n.$inject=["$route","$location","$routeParams","$sce","common","config","ContentData","$rootScope","routehelper","$window"]}(),function(){"use strict";function n(n,t,i,r,u,f,e){function s(){h()}function h(){return e.getTagExists(o.tag).then(function(t){return n.current.data={tag:o.tag},o.include=o.layout!=null?"/layout/"+o.layout+"/":"/layout/tag/"+o.tag+"/index/",o.loaded=!0,t},function(){u.logger.error("Tag not found:",o.tag)})}var o=this;o.include=null;o.loaded=!1;o.tag=i.tag||"home";o.layout=i.layout;s()}angular.module("app.content").controller("ContentIndex",n);n.$inject=["$route","$location","$routeParams","$sce","common","config","TagData"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o,s,h){function l(){a()}function a(){return e.getTag(c.alias).then(function(t){if(t.redirectIndexUrl!=null){h.location.href=t.redirectIndexUrl;return}return c.tag=t,n.current.data={tag:c.alias},n.current.meta={title:c.tag.title},c.tag.attributes=JSON.parse(c.tag.attributes),c.tag.attributes!=null&&c.tag.attributes.bg!=null&&(n.current.meta.bg=c.tag.attributes.bg),c.tag.attributes!=null&&c.tag.attributes.section!=null&&(n.current.meta.section=c.tag.attributes.section),s.$broadcast("route.meta.changed"),o.setDocTitle(c.tag.title),u.pageTrack(),c.loaded=!0,t},function(){t.path("/error/404/").replace()})}var c=this;c.loaded=!1;c.tag={};c.alias=i.tag||"home";c.tagAlias=c.alias;c.view=n.current.view||"default";l()}angular.module("app.content").controller("ContentIndexLayout",n);n.$inject=["$route","$location","$routeParams","$sce","common","config","TagData","routehelper","$rootScope","$window"]}(),function(){"use strict";angular.module("app.core",["ngAnimate","ngRoute","ngResource","ngSanitize","blocks.auth","blocks.exception","blocks.logger","blocks.router","blocks.time","angular-loading-bar","angularDfp","angulartics","angulartics.google.analytics","chart.js","infinite-scroll","validation.match"])}(),function(){"use strict";function n(n){function r(n,r){var u=i[n];return u?(new Date).getTime()-u>r?(delete t[n],delete i[n],null):t[n]:null}function u(n,r,u){t[n]=u;i[n]=(new Date).getTime();return}var t=n("app"),i={},t={};return{get:r,put:u}}angular.module("app.core").factory("cache",n);n.$inject=["$cacheFactory"]}(),function(){"use strict";function n(n){var t={};return{request:function(i){var r;return i.timeToLive&&(i.cache=!0,r=i.timeToLive,delete i.timeToLive,(new Date).getTime()-(t[i.url]||0)>r&&(n.get("$http").remove(i.url),t[i.url]=(new Date).getTime())),i}}}angular.module("app.core").factory("cacheInterceptor",n);n.$inject=["$cacheFactory"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o,s,h,c){function v(){$.get("/app/splash.txt?v="+_ttvVersion,function(n){var t=n.replace("yyyy",(new Date).getFullYear())+"\n";t+="\nVersion:     "+_ttvVersion;t+="\nTimestamp:   "+new Date;t+="\nUser Agent:  "+navigator.userAgent;u.log(t)})}function y(){return i.$broadcast.apply(i,arguments)}function p(n,t,i,u,f){f=+f||300;i||(i="filtered"+t[0].toUpperCase()+t.substr(1).toLowerCase(),u=t+"Filter");var e=function(){n[i]=n[t].filter(function(t){return n[u](t)})};return function(){var n;return function(t){n&&(r.cancel(n),n=null);t||!f?e():n=r(e,f)}}()}function w(n,t,i,u){i=i||1e3;l[n]&&(r.cancel(l[n]),l[n]=undefined);u?t():l[n]=r(t,i)}function b(n){return/^[-]?\d+$/.test(n)}function k(n,t){return n&&-1!==n.toLowerCase().indexOf(t.toLowerCase())}function d(n){return window.btoa(unescape(encodeURIComponent(n)))}function g(){e.pageTrack(n.url())}function nt(n,t,i,r){e.eventTrack(n,{category:t,label:i,value:r})}function tt(n,t,i){var r;return function(){var u=this,f=arguments,e=function(){r=null;i||n.apply(u,f)},o=i&&!r;clearTimeout(r);r=setTimeout(e,t);o&&n.apply(u,f)}}var l={},a={$broadcast:y,$q:t,$timeout:r,createSearchThrottle:p,debouncedThrottle:w,isNumber:b,logger:u,storage:f,textContains:k,toBase64:d,pageTrack:g,eventTrack:nt,$analytics:e,session:h,cache:c,debounce:tt,config:{assetsUrl:_ttvAssetsUrl}};return v(),a}angular.module("app.core").factory("common",n);n.$inject=["$location","$q","$rootScope","$timeout","logger","$localStorage","$analytics","$interval","$window","$sessionStorage","cache"]}(),function(){"use strict";function i(n,i,r,u,f,e,o,s,h,c){function l(){e.options.timeOut=1e4;e.options.extendedTimeOut=1e4;e.options.positionClass="toast-bottom-center";e.options.closeButton=!0;e.options.showMethod="slideDown";e.options.hideMethod="fadeOut";e.options.preventDuplicates=!0;e.options.tapToDismiss=!1;e.options.hideDuration=500}function a(){n.debugEnabled&&n.debugEnabled(!0)}function v(){u.config.appErrorPrefix=t.appErrorPrefix}function y(){var n=f;n.config.$routeProvider=i;n.config.docTitle="TelecomTV ";r.html5Mode(!0)}function p(){o.interceptors.push("authInterceptor");o.interceptors.push("cacheInterceptor")}function w(){s.latencyThreshold=500}function b(){h.firstPageview(!1);h.withAutoBase(!0);h.virtualPageviews(!1)}function k(){angular.module("infinite-scroll").value("THROTTLE_MILLISECONDS",250)}function d(){c.setOptions({colours:["#1B587C"],responsive:!0,maintainAspectRatio:!1,tooltips:{bodyFontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif",titleFontFamily:"'Open Sans', 'Helvetica Neue', Arial, sans-serif"}});c.setOptions("Bar",{barShowStroke:!1,barValueSpacing:2,barPercentage:1});c.setOptions("Line",{datasetFill:!1,datasetStrokeWidth:3,pointDotRadius:5,pointDotStrokeWidth:2});c.setOptions("Doughnut",{animationSteps:60,animationEasing:"easeOutQuart",percentageInnerCutout:45,maintainAspectRatio:!0,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %> (<%= Math.round(circumference / 6.283 * 100) %>%)",segmentShowStroke:!0,segmentStrokeWidth:3})}l();a();v();y();p();w();b();k();d()}var n=angular.module("app.core"),t={appErrorPrefix:"[TTV Error] ",events:{controllerActivateSuccess:"controller.activateSuccess"},imageSettings:{imageBasePath:"/assets/"},keyCodes:{backspace:8,tab:9,enter:13,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,del:46},version:_ttvVersion};n.constant("config",t);n.config(i);i.$inject=["$logProvider","$routeProvider","$locationProvider","exceptionConfigProvider","routehelperConfigProvider","toastr","$httpProvider","cfpLoadingBarProvider","$analyticsProvider","ChartJsProvider"]}(),function(){"use strict";angular.module("app.core").constant("moment",moment).constant("toastr",toastr).constant("Constant",{timeToLive:12e4,timeToLiveOneMinute:6e4,timeToLiveTenSeconds:1e4})}(),function(){"use strict";function n(n,t,i,r,u){function e(){return n.get(f+"/app/init",{cache:!0,timeToLive:u.timeToLive}).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}function o(){return n.get(f+"/app/utc").then(function(n){return n.data}).catch(function(n){return r.reject(n)})}var f=_ttvApiUrl;return{getInit:e,getUtc:o}}angular.module("app.core").factory("AppData",n);n.$inject=["$http","exception","$location","$q","Constant"]}(),function(){"use strict";function n(n,t,i,r,u,f){function o(t){var i="/content|"+JSON.stringify(t).hashCode(),o=f.cache.get(i,u.timeToLive);return o!=null?r(function(n){n(o)}):n.post(e+"/content",t).then(function(n){return f.cache.put(i,u.timeToLive,n.data),n.data}).catch(function(n){return r.reject(n)})}function s(t,i){return n.get(e+"/content/"+t+"/"+i).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}function h(t,i){return n.post(e+"/content/consent",{alias:t,formData:i}).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}var e=_ttvApiUrl;return{postContentIndexRequest:o,getContent:s,postConsent:h}}angular.module("app.core").factory("ContentData",n);n.$inject=["$http","exception","$location","$q","Constant","common"]}(),function(){"use strict";function n(n,t,i){function u(t){return n.get(r+"/form/"+t).then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function f(t,u){return n.post(r+"/form/"+t+"/exists",u).then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function e(t,u){return n.post(r+"/form/"+t,u).then(function(n){return n.data}).catch(function(n){return i.reject(n)})}var r=_ttvApiUrl;return{getForm:u,postFormSubmissionExists:f,postFormSubmission:e}}angular.module("app.core").factory("FormData",n);n.$inject=["$http","exception","$q"]}(),function(){"use strict";function n(n,t,i,r){function f(t){return n.post(u+"/list",t).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}var u=_ttvApiUrl;return{postListIndexRequest:f}}angular.module("app.core").factory("ListData",n);n.$inject=["$http","exception","$location","$q"]}(),function(){"use strict";function n(n,t,i,r,u){function e(t){return t=t!==null?"/"+t:"",n.get(f+"/notification"+t,{cache:!0,timeToLive:u.timeToLiveOneMinute}).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}var f=_ttvApiUrl;return{getNotification:e}}angular.module("app.core").factory("NotificationData",n);n.$inject=["$http","exception","$location","$q","Constant"]}(),function(){"use strict";function n(n,t,i,r,u){function e(t){return n.get(f+"/page/"+t,{cache:!0,timeToLive:u.timeToLive}).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}var f=_ttvApiUrl;return{getPage:e}}angular.module("app.core").factory("PageData",n);n.$inject=["$http","exception","$location","$q","Constant"]}(),function(){"use strict";function n(n,t,i){function u(u){return n.get(r+"/poll/"+u,{cache:!0,timeToLive:i.timeToLiveTenSeconds}).then(function(n){return n.data}).catch(function(n){return t.reject(n)})}function f(i){return n.post(r+"/poll",i).then(function(n){return n.data}).catch(function(n){return t.reject(n)})}var r=_ttvApiUrl;return{getPoll:u,postPollVote:f}}angular.module("app.core").factory("PollData",n);n.$inject=["$http","$q","Constant"]}(),function(){"use strict";function n(n,t,i,r){function f(t){return n.post(u+"/questions",t).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}var u=_ttvApiUrl;return{postQuestion:f}}angular.module("app.core").factory("QuestionData",n);n.$inject=["$http","exception","$location","$q"]}(),function(){"use strict";function n(n,t,i,r,u,f){function o(t){var i="/reports/summary|"+JSON.stringify(t).hashCode(),o=f.cache.get(i,u.timeToLive);return o!=null?r(function(n){n(o)}):n.post(e+"/reports/summary",t).then(function(n){return f.cache.put(i,u.timeToLive,n.data),n.data}).catch(function(n){return r.reject(n)})}function s(t){var i="/reports/analyse|"+JSON.stringify(t).hashCode(),o=f.cache.get(i,u.timeToLive);return o!=null?r(function(n){n(o)}):n.post(e+"/reports/analyse",t).then(function(n){return f.cache.put(i,u.timeToLive,n.data),n.data}).catch(function(n){return r.reject(n)})}function h(t){var i="/reports/analyse/excel|"+JSON.stringify(t).hashCode(),o=f.cache.get(i,u.timeToLive);return o!=null?r(function(n){n(o)}):n.post(e+"/reports/analyse/excel",t).then(function(n){return f.cache.put(i,u.timeToLive,n.data),n.data}).catch(function(n){return r.reject(n)})}var e=_ttvApiUrl;return{postReportSummary:o,postReportAnalyse:s,postReportAnalyseExcel:h}}angular.module("app.core").factory("ReportData",n);n.$inject=["$http","exception","$location","$q","Constant","common"]}(),function(){"use strict";function n(n,t,i,r,u){function f(t,i,f){return n.get("https://www.googleapis.com/customsearch/v1/siterestrict?key=AIzaSyDscbdZNPCe20vMTMoFOMpOsttRjv5Xzcc&cx=003589148450028900067:swglom-1wtk&q={0}&start={1}&sort={2}".format(t,i,f),{cache:!0,timeToLive:u.timeToLive}).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}var e=_ttvApiUrl;return{getSearch:f}}angular.module("app.core").factory("SearchData",n);n.$inject=["$http","exception","$location","$q","Constant"]}(),function(){"use strict";function n(n,t,i,r,u){function e(t){return n.get(f+"/tag/"+t,{cache:!0,timeToLive:u.timeToLive}).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}function o(t){return n.get(f+"/tag/"+t+"/exists",{cache:!0,timeToLive:u.timeToLive}).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}function s(){return n.get(f+"/tag/filters",{cache:!0,timeToLive:u.timeToLive}).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}function h(){return n.get(f+"/tag/filters/featured",{cache:!0,timeToLive:u.timeToLive}).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}function c(){return n.get(f+"/tag/list",{cache:!0,timeToLive:u.timeToLive}).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}var f=_ttvApiUrl;return{getTag:e,getTagExists:o,getFilters:s,getFiltersFeatured:h,getList:c}}angular.module("app.core").factory("TagData",n);n.$inject=["$http","exception","$location","$q","Constant"]}(),function(){"use strict";function n(n,t,i){function u(){return n.get(r+"/user/init").then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function f(){return n.get(r+"/user/countries").then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function e(t,u){return n.post(r+"/user/login",{email:t,password:u}).then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function o(){return n.get(r+"/user/logout").then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function s(){return n.get(r+"/user/logoutallsessions").then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function h(){return n.get(r+"/user/refresh").then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function c(t){return n.post(r+"/user",t).then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function l(){return n.get(r+"/user").then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function a(t){return n.put(r+"/user",t).then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function v(t,u){return n.post(r+"/user/email/verify",{id:t,token:u}).then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function y(t){return n.post(r+"/user/password/reset",{email:t}).then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function p(t,u,f){return n.put(r+"/user/password/reset",{id:t,token:u,password:f}).then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function w(t){return n.post(r+"/user/capture",t).then(function(n){return n.data}).catch(function(n){return i.reject(n)})}function b(t,u){return n.put(r+"/user/passwordlesslogin",{tokenId:t,secret:u}).then(function(n){return n.data}).catch(function(n){return i.reject(n)})}var r=_ttvApiUrl;return{getInit:u,getCountries:f,postLogin:e,getLogout:o,getLogoutAllSessions:s,getRefresh:h,postRegister:c,getProfile:l,putProfile:a,postEmailVerify:v,postPasswordReset:y,putPasswordReset:p,postCapture:w,putPasswordlessLogin:b}}angular.module("app.core").factory("UserData",n);n.$inject=["$http","exception","$q"]}(),function(){"use strict";function n(n,t,i,r,u){function e(t){return n.get(f+"/video/"+t,{cache:!0,timeToLive:u.timeToLiveTenSeconds}).then(function(n){return n.data}).catch(function(n){return r.reject(n)})}var f=_ttvApiUrl;return{getVideo:e}}angular.module("app.core").factory("VideoData",n);n.$inject=["$http","exception","$location","$q","Constant"]}(),function(){"use strict";angular.module("app.elements",[])}(),function(){"use strict";function n(n){function t(t){function r(){(i.tag==""||i.tag==null)&&(i.tag="null");n()}var i={};t.vm=i;i.layout=t.layout;i.adUnit=t.adUnit;i.tag=t.tag;r()}return{restrict:"E",scope:{layout:"@layout",adUnit:"@adUnit",tag:"=tag"},templateUrl:"/app/elements/appAd.html?v="+_ttvVersion,link:{pre:t}}}angular.module("app.elements").directive("appAd",n);n.$inject=["dfp","common","$timeout","$rootScope"]}(),function(){"use strict";function n(n,t,i,r,u,f){function e(e){function s(){h()}function h(){return t.getForm(o.alias).then(function(n){return o.form=n,o.form.fields!==null&&(o.form.fields=JSON.parse(o.form.fields).fields),o.form.config!==null&&(o.form.config=JSON.parse(o.form.config)),o.form.config.header!==undefined&&(o.header=o.form.config.header),o.form.config.footer!==undefined&&(o.footer=o.form.config.footer),o.form.config.submitted!==undefined&&(o.submittedText=o.form.config.submitted),o.form.config.submittedLoggedIn!==undefined&&(o.submittedTextLoggedIn=o.form.config.submittedLoggedIn),o.form.config.alreadySubmitted!==undefined&&(o.alreadySubmittedText=o.form.config.alreadySubmitted),o.form.config.preCheckAlreadySubmittedIntro!==undefined&&(o.preCheckAlreadySubmittedIntroText=o.form.config.preCheckAlreadySubmittedIntro),o.form.config.preCheckAlreadySubmitted!==undefined&&(o.preCheckAlreadySubmittedText=o.form.config.preCheckAlreadySubmitted),o.form.config.preCheckNotAlreadySubmitted!==undefined&&(o.preCheckNotAlreadySubmittedText=o.form.config.preCheckNotAlreadySubmitted),o.loaded=!0,n},function(){o.notFound=!0})}function c(){return o.common.storage.context==null&&o.form.preCheckIfAlreadySubmitted&&!o.preCheckIfAlreadySubmittedComplete?l():a()}function l(){if(!o.submitted&&!o.busy&&!i.authorized()&&o.form.preCheckIfAlreadySubmitted){if(o.busy=!0,o.error=null,e.$broadcast("show-errors-check-validity"),!o.formSubmission.$valid){o.busy=!1;o.error="validation";return}var u={email:o.email,url:r.url()};return t.postFormSubmissionExists(o.alias,u).then(function(n){return o.preCheckIfAlreadySubmittedComplete=!0,o.preCheckIfAlreadySubmittedResult=n,o.busy=!1,n},function(){n.logger.errorAlert("Sorry, there was a problem submitting your information. Please try again.");o.busy=!1})}}function a(){var s,f;if(!o.submitted&&!o.busy){if(o.busy=!0,o.error=null,u.$broadcast("app-form-show-validation-errors"),e.$broadcast("show-errors-check-validity"),o.valid=!0,s={},angular.forEach(o.form.fields,function(n){if(n.type==="checkbox"||n.type==="text"||n.type==="textarea"||n.type==="select"||n.type==="country"){n.valid||(o.valid=!1);var t={};t[n.name]=n.value;angular.extend(s,t)}}),!o.formSubmission.$valid||!o.valid){o.busy=!1;o.error="validation";return}return f={formData:s,url:r.url()},i.authorized()||(f.email=o.email),o.form.showNewsletterOption&&(f.newsletter=o.newsletter),t.postFormSubmission(o.alias,f).then(function(n){return o.submitted=!0,o.busy=!1,n},function(){n.logger.errorAlert("Sorry, there was a problem submitting your information. Please try again.");o.busy=!1})}}var o={};e.vm=o;o.loaded=!1;o.busy=!1;o.notFound=!1;o.submitted=!1;o.valid=!0;o.error=null;o.alias=e.alias;o.header="";o.footer='<p><a href="/pages/privacy/" class="underline" target="_blank">Privacy policy<\/a><\/p>';o.submittedText="<p>Thank you for registering!<\/p>";o.submittedTextLoggedIn="<p>Thank you for registering!<\/p>";o.alreadySubmittedText="<p>Thank you - you're already registered!<\/p>";o.preCheckAlreadySubmittedIntroText="<p>First, please enter your email address and click Continue.<\/p>";o.preCheckAlreadySubmittedText="<p>Thank you - you're already registered!<\/p>";o.preCheckNotAlreadySubmittedText="<p>Thank you. Now please complete your details below.<\/p>";o.form={};o.submit=c;o.trustAsHtml=f.trustAsHtml;o.common=n;o.auth=i;s()}return{restrict:"E",scope:{alias:"@alias",layout:"@layout"},templateUrl:function(n,t){return t.layout||"/app/elements/appForm.html?v="+_ttvVersion},link:{pre:e}}}angular.module("app.elements").directive("appForm",n);n.$inject=["common","FormData","auth","$location","$rootScope","$sce"]}(),function(){"use strict";function n(n,t){function i(i){function f(){i.$on("app-form-show-validation-errors",function(){u()});r.field.type==="checkbox"?(r.field.value=!1,r.field.valid=!0):r.field.type==="text"||r.field.type==="textarea"||r.field.type==="select"?(r.field.value="",r.field.valid=r.field.required?null:!0):r.field.type==="country"&&(e(),r.field.value="",r.field.valid=r.field.required?null:!0)}function u(){(r.field.type==="text"||r.field.type==="textarea"||r.field.type==="select"||r.field.type==="country")&&r.field.required&&(r.field.valid=r.field.value!==undefined&&r.field.value!==null&&r.field.value.length>0?!0:!1);r.field.type==="checkbox"&&r.field.required&&r.field.value!==undefined&&r.field.value!==null&&(r.field.valid=r.field.value)}function e(){t.getCountries().then(function(n){r.countries=n})}var r={};i.vm=r;r.field=i.field;r.trustAsHtml=n.trustAsHtml;r.validate=u;r.countries=null;f()}return{restrict:"E",scope:{field:"=field"},templateUrl:"/app/elements/appFormField.html?v="+_ttvVersion,link:{pre:i}}}angular.module("app.elements").directive("appFormField",n);n.$inject=["$sce","UserData"]}(),function(){"use strict";function n(n,t,i,r){function u(u){function h(){f.voted=f.common.storage.pollsVoted!==null&&Array.isArray(f.common.storage.pollsVoted)&&f.common.storage.pollsVoted.includes(f.pollId);s();u.$on("$destroy",function(){e&&r.cancel(e)})}function s(){return t.getPoll(f.pollId).then(function(n){o++;f.poll=n;try{f.poll.config=JSON.parse(f.poll.config)}catch(t){f.poll.config={}}return f.poll.config===null&&(f.poll.config={}),f.canVote=!f.voted&&f.poll.votingActive,f.loaded=!0,e&&r.cancel(e),o<(f.poll.config.refreshLimit||120)&&(e=r(function(){s()},f.poll.config.refreshInterval||9e4)),n},function(){f.notFound=!0})}function c(i){if(!f.voted&&!f.busy){f.busy=!0;i==null&&(i=f.option);var r={pollId:f.pollId,pollOptionId:i};return t.postPollVote(r).then(function(n){f.poll=n;try{f.poll.config=JSON.parse(f.poll.config)}catch(t){f.poll.config={}}return f.common.storage.pollsVoted!==null&&Array.isArray(f.common.storage.pollsVoted)?f.common.storage.pollsVoted.includes(f.pollId)||f.common.storage.pollsVoted.push(f.pollId):f.common.storage.pollsVoted=[f.pollId],f.canVote=!1,f.voted=!0,f.busy=!1,n},function(t){if(t.status===409){n.logger.infoAlert("Sorry, this poll is now closed!");f.busy=!1;s();return}n.logger.errorAlert("Sorry, there was a problem submitting your vote. Please try again.");f.busy=!1})}}var f={},e,o;u.vm=f;f.notFound=!1;f.loaded=!1;f.pollId=u.pollId;f.poll={};f.option=null;f.voted=!1;f.canVote=!0;f.busy=!1;f.postVote=c;f.common=n;f.auth=i;e=null;o=0;h()}return{restrict:"E",scope:{pollId:"=pollId"},templateUrl:"/app/elements/appPoll.html?v="+_ttvVersion,link:{pre:u}}}angular.module("app.elements").directive("appPoll",n);n.$inject=["common","PollData","auth","$timeout"]}(),function(){"use strict";function n(n,t){function i(i){function u(){}var r={};i.vm=r;r.buttonClass=i.buttonClass||"btn btn-lg btn-primary";r.buttonText=i.buttonText||"Register Now";r.registeredClass=i.registeredClass||"lead";r.registeredText=i.registeredText||"Thanks, you're registered";r.auth=n;r.common=t;u()}return{restrict:"E",scope:{buttonClass:"@buttonClass",buttonText:"@buttonText",registeredClass:"@registeredClass",registeredText:"@registeredText"},templateUrl:"/app/elements/appRegister.html?v="+_ttvVersion,link:{pre:i}}}angular.module("app.elements").directive("appRegister",n);n.$inject=["auth","common","$route","$location"]}(),function(){"use strict";function n(n,t){function i(i){function u(){}function f(){if(i.$broadcast("show-errors-check-validity"),i.subscribeForm.$valid){var u={email:r.email};t.postCapture(u).then(function(){n.logger.successAlert("Thanks, you're now subscribed to TelecomTV's email newsletters",null,"Subscribed","fal fa-check")},function(t){t.status==409?r.error="existing":n.logger.errorAlert("Sorry there was an error when trying to save your details.",t)})}else r.error="validation"}var r={};i.vm=r;r.subscribe=f;u()}return{restrict:"E",scope:{},templateUrl:"/app/elements/appSubscribe.html?v="+_ttvVersion,link:{pre:i}}}angular.module("app.elements").directive("appSubscribe",n);n.$inject=["common","UserData","$route","$location"]}(),function(){"use strict";function n(n,t,i,r,u,f,e){function o(i){function l(){r.video.config!==null&&(r.video.config=JSON.parse(r.video.config));i.$on("$destroy",function(){u&&e.cancel(u);o&&f.cancel(o)});h();r.loaded=!0}function h(){c();a()}function a(){r.video.config!==null&&r.video.config.refresh===!0?s<(r.video.config.refreshLimit||120)&&(o=f(function(){v()},r.video.config.refreshInterval||9e4)):o&&f.cancel(o)}function c(){if(r.video.availableFrom==null||moment.utc()>moment(r.video.availableFrom))r.countdownActive=!1,u!==null&&(e.cancel(u),u=null);else{r.countdownActive=!0;var n=moment.utc(r.video.availableFrom)-moment.utc();r.countdownTimeDisplay=n>864e5?moment.utc(r.video.availableFrom).format("MMM D, YYYY"):n>36e5?moment.utc(n).format("[in] H:mm:ss"):moment.utc(n).format("[in] mm:ss");u==null&&(u=e(function(){c()},1e3))}}function v(){return t.getVideo(r.video.id).then(function(n){return s++,r.video=n,r.video.config!==null&&(r.video.config=JSON.parse(r.video.config)),h(),n},function(){})}var r={};i.vm=r;r.common=n;r.loaded=!1;r.busy=!1;r.video=JSON.parse(i.video);r.countdownActive=!1;r.countdownTimeDisplay="";var s=0,o=null,u=null;l()}return{restrict:"E",scope:{video:"@video"},templateUrl:function(n,t){return t.layout||"/app/elements/appVideo.html?v="+_ttvVersion},link:{pre:o}}}angular.module("app.elements").directive("appVideo",n);n.$inject=["common","VideoData","$location","$rootScope","$sce","$timeout","$interval"]}(),function(){"use strict";angular.module("app.error",[])}(),function(){"use strict";function n(n){n.configureRoutes(t())}function t(){return[{url:"/error/:code/",config:{templateUrl:"/app/error/error.html?v="+_ttvVersion,title:"Error"}}]}angular.module("app.error").run(n);n.$inject=["routehelper"]}(),function(){"use strict";function n(n,t,i,r,u,f){function o(){f.current.meta={title:"Error"};u.$broadcast("route.meta.changed")}var e=this;e.code=t.code;o()}angular.module("app.error").controller("Error",n);n.$inject=["$location","$routeParams","common","config","$rootScope","$route"]}(),function(){"use strict";angular.module("app.core").filter("capitalize",function(){return function(n){return!n?"":n.charAt(0).toUpperCase()+n.substr(1).toLowerCase()}})}(),function(){"use strict";angular.module("app.core").filter("dateRelative",function(){return function(n){return moment.utc(n).fromNow()}});angular.module("app.core").filter("dateTime",function(){return function(n){return moment.utc(n).format("LLL")}});angular.module("app.core").filter("timeFromSeconds",function(){return function(n){return n>=3600?moment.utc(n*1e3).format("h:mm:ss"):moment.utc(n*1e3).format("m:ss")}})}(),function(){"use strict";function n(n){return function(t){return t.player==="youTube"?n.trustAsResourceUrl("https://www.youtube.com/embed/"+t.externalId+"?modestbranding=1&rel=0"):t.player==="vimeo"?n.trustAsResourceUrl("https://player.vimeo.com/video/"+t.externalId+"?byline=false&title=false&portrait=false&color=2d76bb"):""}}angular.module("app.core").filter("videoEmbedUrl",n);n.$inject=["$sce"]}(),function(){"use strict";angular.module("app.layout",[])}(),function(){"use strict";function n(n){function i(){}var t=this;t.common=n;t.year=(new Date).getFullYear();i()}angular.module("app.layout").controller("Footer",n);n.$inject=["common"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o,s,h,c,l){function nt(){var n,t;k();tt();n=$("#navbar-top-menu");n.on("click","a[href]",null,function(){n.collapse("hide");p(null)});t=$(".nav-panel");t.on("click","a",null,function(){p(null)});ut()}function k(){p(null);t.current==null||t.current.$$route==null?a.meta={title:"Error"}:(a.meta=t.current.meta,t.current.meta==null&&(a.meta={title:t.current.$$route.title}));o.bg=a.meta.bg?"url('{0}')".format(a.meta.bg.img):null;u.setDocTitle(a.meta.title)}function tt(){e.$on("route.meta.changed",function(){k()})}function it(){n.path("/search/").search({q:a.searchInput});a.navPanel=null;a.searchInput="";$("#navbar-top-menu").collapse("hide")}function p(n){a.navPanel=n;n==="search"&&document.getElementById("searchInput").focus()}function rt(n){if(a.navPanel===n){a.navPanel=null;return}p(n)}function ut(){n.search()!==null&&n.search().notification&&(b=n.search().notification);d();e.$on("$locationChangeSuccess",function(){g()});e.$on("$destroy",function(){w&&c.cancel(w)})}function d(){return h.getNotification(b).then(function(n){a.notification=n;l.syncUtc(n.utc);a.notificationOverlayBodyFixed!==n.overlayBody&&(a.notificationOverlayBodyFixed=n.overlayBody);a.notificationOverlayBodyClosedFixed!==n.overlayBodyClosed&&(a.notificationOverlayBodyClosedFixed=n.overlayBodyClosed);try{a.notification.config=JSON.parse(a.notification.config)}catch(t){a.notification=null}if(g(),$("body").toggleClass("notification-nav-active",a.notification!==null&&a.notification.showNav),moment(a.storage.notificationOverlayDismissed)<moment().subtract(1,"hours")&&delete a.storage.notificationOverlayDismissed,v++,v<=5)y=9e4;else if(v<=10)y=18e4;else if(v<=30)y=3e5;else if(v<=40)y=6e5;else return n;return w=c(function(){d()},y),n},function(){})}function g(){if(a.notification===null||!a.notification.showOverlay||a.notification.config.overlay.hideIfContains===undefined){a.notificationOverlayHidden=!1;return}for(var t=0;t<a.notification.config.overlay.hideIfContains.length;t++)if(n.path().indexOf(a.notification.config.overlay.hideIfContains[t])>=0)return a.notificationOverlayHidden=!0,!0;a.notificationOverlayHidden=!1;return}function ft(){r.storage.notificationOverlayDismissed=moment()}function et(){delete r.storage.notificationOverlayDismissed}var a=this;a.version=_ttvVersion;a.auth=f;a.storage=r.storage;a.location=n;a.trustAsHtml=s.trustAsHtml;a.routes=u.getRoutes();a.route=t;a.navPanel=null;a.meta=null;a.notification=null;a.notificationOverlayHidden=!1;var v=0,y=9e4,w=null,b=null;a.search=it;a.toggleNavPanel=rt;a.setNavPanel=p;a.notificationOverlayClose=ft;a.notificationOverlayOpen=et;nt()}angular.module("app.layout").controller("Nav",n);n.$inject=["$location","$route","config","common","routehelper","auth","$scope","$rootScope","$sce","NotificationData","$timeout","time"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o,s){function c(){r.storage.cookieMessageClosed==null&&l();r.storage.newsletterMessageClosed!=null||f.authorized()||v()}function l(){e(function(){r.logger.info('TelecomTV uses cookies to give you the best possible experience. <a href="/pages/cookies/">Learn more<\/a>',null,"Cookies",null,!0,!0,a)},2500)}function a(){r.storage.cookieMessageClosed=new Date;s.$apply()}function v(){e(function(){r.logger.info('<div class="row"><div class="col-md-6"><p class="mb-2">Stay up to date with the latest industry developments: sign up to receive TelecomTV\'s top news and videos plus exclusive subscriber-only content direct to your inbox &ndash; including our daily news briefing and weekly wrap.<\/p><\/div><div class="col-md-6"><form role="form" name="subscribeForm" onsubmit="newsletterSubscribe(event)" novalidate><div class="form-group mb-2" show-errors><input type="email" class="form-control" name="email" placeholder="Work Email address..." /><\/div><button type="submit" class="btn btn-primary mb-1 mr-3">Subscribe<\/button><a onclick="newsletterRemindLater(event)" class="mr-3 underline">Remind&nbsp;me&nbsp;later<\/a><a href="/pages/privacy/" class="underline" target="_blank">Privacy&nbsp;policy<\/a><\/form><div class="alert alert-danger mt-2" style="display:none;"><p class="mb-0"><i class="fal fa-fw fa-exclamation-triangle mr-2"><\/i> <span class="error-message"><\/span><\/p><\/div><\/div><\/div>',null,"Email Newsletters","fal fa-envelope",!0,!0,y)},2e4)}function y(){r.storage.newsletterMessageClosed=new Date;s.$apply()}function p(){$("html, body").animate({scrollTop:0},1e3)}var h=this;h.version=_ttvVersion;h.auth=f;h.storage=r.storage;h.routes=u.getRoutes();h.route=t;h.backToTop=p;c()}angular.module("app.layout").controller("Shell",n);n.$inject=["$location","$route","config","common","routehelper","auth","$timeout","$window","$scope"]}(),function(){"use strict";angular.module("app.page",[])}(),function(){"use strict";function n(n){n.configureRoutes(t())}function t(){return[{url:"/pages/:alias/",config:{templateUrl:"/app/page/page.html?v="+_ttvVersion,title:"Page"}}]}angular.module("app.page").run(n);n.$inject=["routehelper"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o,s){function c(){l()}function l(){return e.getPage(i.alias).then(function(t){return t.body=r.trustAsHtml(t.body),h.page=t,h.loaded=!0,n.current.meta={title:h.page.title},s.$broadcast("route.meta.changed"),o.setDocTitle(h.page.title),u.pageTrack(),t},function(){t.path("/error/404/").replace()})}var h=this;h.loaded=!1;h.page={};c()}angular.module("app.page").controller("Page",n);n.$inject=["$route","$location","$routeParams","$sce","common","config","PageData","routehelper","$rootScope"]}(),function(){"use strict";angular.module("app.search",[])}(),function(){"use strict";function n(n){n.configureRoutes(t())}function t(){return[{url:"/search/",config:{templateUrl:"/app/search/search.html?v="+_ttvVersion,title:"Search"}}]}angular.module("app.search").run(n);n.$inject=["routehelper"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o,s){function l(){n.current.meta={title:"Search"};s.$broadcast("route.meta.changed");o.setDocTitle("Search");u.pageTrack();c()}function a(){h.sortDate=!h.sortDate;h.results=[];h.page=1;c()}function c(){if(h.query)return e.getSearch(h.query,(h.page-1)*10+1,h.sortDate?"date":"").then(function(n){return angular.forEach(n.items,function(n){n.htmlTitle=r.trustAsHtml(n.htmlTitle)}),h.results=h.results.concat(n.items),h.page++,n},function(n){u.logger.error("Failed to get search results",n)})}function v(){t.search({q:h.input})}function y(){h.page>=10||c()}var h=this;h.results=[];h.page=1;h.query=t.search().q;h.input=h.query;h.loadMore=y;h.newSearch=v;h.sortDate=!0;h.changeSort=a;l()}angular.module("app.search").controller("Search",n);n.$inject=["$route","$location","$routeParams","$sce","common","config","SearchData","routehelper","$rootScope"]}(),function(){"use strict";angular.module("app.user",[])}(),function(){"use strict";function n(n){n.configureRoutes(t())}function t(){return[{url:"/user/login/",config:{templateUrl:"/app/user/login.html?v="+_ttvVersion,title:"Sign In"}},{url:"/user/login/:id/:token/",config:{templateUrl:"/app/user/passwordlesslogin.html?v="+_ttvVersion,title:"Sign In"}},{url:"/user/forgot/",config:{templateUrl:"/app/user/forgot.html?v="+_ttvVersion,title:"Reset Password"}},{url:"/user/profile/",config:{templateUrl:"/app/user/profile.html?v="+_ttvVersion,title:"Manage Your Profile"}},{url:"/user/register/",config:{templateUrl:"/app/user/register.html?v="+_ttvVersion,title:"Register"}},{url:"/user/verify/:id/:token/",config:{templateUrl:"/app/user/verify.html?v="+_ttvVersion,title:"Confirm Email Address"}},{url:"/user/reset/:id/:token/",config:{templateUrl:"/app/user/reset.html?v="+_ttvVersion,title:"Reset Password"}}]}angular.module("app.user").run(n);n.$inject=["routehelper"]}(),function(){"use strict";function n(n,t,i,r,u,f){function o(){i.bounce()||(f.current.meta={title:"Password Reset Request"},u.$broadcast("route.meta.changed"),r.pageTrack())}var e=this;e.email=null;e.password=null;e.error=null;e.register=i.register;e.login=i.login;o();e.ok=function(){n.$broadcast("show-errors-check-validity");n.resetForm.$valid&&t.postPasswordReset(e.email).then(function(){r.eventTrack("Password Reset Request","User");r.logger.successAlert("Thanks - please now check your email inbox and spam folder for email from us containing a link to reset your password");i.authorize()},function(n){n.status==404?e.error="email-notfound":n.status==409?e.error="email-partial":r.logger.errorAlert("Sorry there was an error when trying to reset your password.",n)})}}angular.module("app.user").controller("UserForgot",n);n.$inject=["$scope","UserData","auth","common","$rootScope","$route"]}(),function(){"use strict";function n(n,t,i,r,u,f,e){function s(){f.bounce()||(e.current.meta={title:"Sign In"},t.$broadcast("route.meta.changed"),r.pageTrack())}var o=this;o.storage=r.storage;o.register=f.register;o.forgot=f.forgot;o.email=null;o.password=null;o.error=null;s();o.login=function(){o.error=null;n.$broadcast("show-errors-check-validity");n.loginForm.$valid&&u.postLogin(o.email,o.password).then(function(n){r.storage.context=n;r.storage.context!=null&&(t.$broadcast("user:login"),r.eventTrack("Sign In","User"),r.logger.successAlert("Welcome back, "+r.storage.context.firstName+" - you're now signed in to TelecomTV"));i.url(i.search().return||"/")},function(n){n.status==404?o.error="login-failed":r.logger.errorAlert("Sorry there was an error when trying to log you in.",n)})}}angular.module("app.user").controller("UserLogin",n);n.$inject=["$scope","$rootScope","$location","common","UserData","auth","$route"]}(),function(){"use strict";function n(n,t,i,r,u,f,e){function h(){e.current.meta={title:"Sign In"};f.$broadcast("route.meta.changed");c()}function c(){if(r.storage.context!=null)return r.logger.successAlert("Welcome back, "+r.storage.context.firstName+" - you clicked a sign in link but you're already signed in to TelecomTV"),o();if(t.id==null||t.token==null)return r.logger.errorAlert("Sorry, we couldn't sign in you to TelecomTV as the link wasn't valid"),o();u.putPasswordlessLogin(t.id,t.token).then(function(n){return r.storage.context=n,r.storage.context!=null?(f.$broadcast("user:login"),r.eventTrack("Sign In","User"),r.logger.successAlert("Welcome, "+r.storage.context.firstName+" - you're now signed in to TelecomTV"),o()):void 0},function(){return r.logger.warningAlert("Sorry, we couldn't sign in you to TelecomTV - the link may have expired or have been used previously."),o()})}function o(){i.url(s.returnUrl)}var s=this;s.returnUrl=i.search().returnurl||"/";h()}angular.module("app.user").controller("PasswordlessLogin",n);n.$inject=["$scope","$routeParams","$location","common","UserData","$rootScope","$route"]}(),function(){"use strict";function n(n,t,i,r,u,f,e){function s(){u.authorize()&&(h(),i.pageTrack(),e.current.meta={title:"Update Profile"},f.$broadcast("route.meta.changed"))}function h(){r.getInit().then(function(n){o.init=n;c()})}function c(){return o.storage.context==null?null:r.getProfile().then(function(n){return n!=null&&(o.profile=n),n})}function l(){if(n.$broadcast("show-errors-check-validity"),n.profileForm.$valid){var t={email:o.profile.email,newPassword:o.profile.newPassword,currentPassword:o.profile.currentPassword,firstName:o.profile.firstName,lastName:o.profile.lastName,company:o.profile.company,userCompanyTypeId:o.profile.userCompanyTypeId,jobTitle:o.profile.jobTitle,userJobRoleId:o.profile.userJobRoleId,countryId:o.profile.countryId,newsletter:o.profile.newsletter};r.putProfile(t).then(function(){i.logger.successAlert("Thanks, your profile has been updated")},function(n){n.status==409&&(o.error="email-existing");n.status==403?o.error="password-incorrect":i.logger.errorAlert("Sorry there was an error when trying to update your profile.",n)})}}var o=this;o.storage=i.storage;o.login=u.login;o.register=u.register;o.logoutAllSessions=u.logoutAllSessions;o.profile={};o.init=null;o.save=l;o.error=null;s()}angular.module("app.user").controller("UserProfile",n);n.$inject=["$scope","$location","common","UserData","auth","$rootScope","$route"]}(),function(){"use strict";function n(n,t,i,r,u,f,e){function s(){if(r.authorized()){r.bounce();return}h();u.pageTrack();e.current.meta={title:"Register"};t.$broadcast("route.meta.changed")}function h(){return i.getInit().then(function(n){return o.init=n,n})}var o=this;o.email=null;o.password=null;o.passwordConfirm=null;o.firstName=null;o.lastName=null;o.company=null;o.userCompanyTypeId=null;o.jobRoleId=null;o.newsletter=!1;o.terms=!1;o.error=null;o.init={};o.auth=r;o.search=f.search();s();o.register=function(){if(n.$broadcast("show-errors-check-validity"),n.registrationForm.$valid){var r={email:o.email,password:o.password,firstName:o.firstName,lastName:o.lastName,company:o.company,userCompanyTypeId:o.userCompanyTypeId,jobTitle:o.jobTitle,userJobRoleId:o.userJobRoleId,countryId:o.countryId,newsletter:o.newsletter};i.postRegister(r).then(function(n){u.storage.context=n;u.storage.context!=null&&(t.$broadcast("user:login"),u.eventTrack("Register","User"),u.logger.successAlert("Welcome, "+u.storage.context.firstName+" - you're now registered and signed in to TelecomTV"),f.url(f.search().return||"/"))},function(n){n.status==409?o.error="register-existing":u.logger.errorAlert("Sorry there was an error when trying to register you.",n);$("html, body").animate({scrollTop:0},800)})}else o.error="validation",$("html, body").animate({scrollTop:0},800)}}angular.module("app.user").controller("UserRegister",n);n.$inject=["$scope","$rootScope","UserData","auth","common","$location","$route"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o){function h(){o.current.meta={title:"Password Reset"};e.$broadcast("route.meta.changed")}function c(){return t.id==null||t.token==null?(s.result="error",null):(n.$broadcast("show-errors-check-validity"),n.resetCompleteForm.$valid?u.putPasswordReset(t.id,t.token,s.password).then(function(){s.result="success"},function(){s.result="error"}):void 0)}var s=this;s.storage=r.storage;s.password=null;s.login=f.login;s.reset=c;s.result=null;h()}angular.module("app.user").controller("Reset",n);n.$inject=["$scope","$routeParams","$location","common","UserData","auth","$rootScope","$route"]}(),function(){"use strict";function n(n,t,i,r,u,f,e,o){function h(){o.current.meta={title:"Verify Email Address"};e.$broadcast("route.meta.changed");c()}function c(){return t.id==null||t.token==null?(s.result="error",null):u.postEmailVerify(t.id,t.token).then(function(){s.result="success"},function(){s.result="error"})}var s=this;s.result=null;h()}angular.module("app.user").controller("Verify",n);n.$inject=["$scope","$routeParams","$location","common","UserData","auth","$rootScope","$route"]}()