"use strict";function _defineProperty(e,t,a){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:t+""}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateGetter(e,t,a){return a(_assertClassBrand(e,t))}function _assertClassBrand(e,t,a){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:a;throw new TypeError("Private element is not present on this object")}function _defineProperty(e,t,a){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:t+""}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _defineProperty(e,t,a){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:t+""}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _defineProperty(e,t,a){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:t+""}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}PULSE.app.templates["common.media-list-items-wrapper"]=_.template('<% _.each( items, function( item ) { %>
  • data-match-id="<%= item.data.matchId %>" <% } %>> <%= render( { data: item.data, cssClass: mediaThumbnailClass }, \'common.media-thumbnail\' ) %>
  • <% } ); %> '),PULSE.app.templates["common.alert"]=_.template("
    <%= className ? className : '' %>\"> <%= render( {\n cssClass: icon + ' alert__icon',\n name: icon\n }, 'common.svg-icon' ) %>

    <%= text %>

    "),PULSE.app.templates["common.content-sponsor"]=_.template('

    <%= title %>

    <% if( promoUrl ) { %> target="_blank" <% } %>> <% } %> <%= render( { data : {\n mediaQueryConfig: mediaQueryConfig,\n cssClass: \'\',\n objectFit: false\n } }, \'common.lazy-image\' ) %> <% if( promoUrl ) { %> <%= promoUrlText %> <% } %> '),PULSE.app.templates["common.empty-state"]=_.template("
    <% var icon = typeof iconName !== 'undefined' ? iconName : 'suspension' %> <%= render( {\n cssClass: 'icn-empty',\n name: icon\n }, 'common.svg-icon' ) %>

    <%= message %>

    <%= summary %> <% if ( typeof template !== 'undefined' && template ) { %> <%= render( {}, template ) %> <% } %>
    "),PULSE.app.templates["common.gallery-thumbnail-meta"]=_.template('

    <%= data.pageInfo.numEntries %>

    '),PULSE.app.templates["common.image-element"]=_.template("\" class=\"img <%= typeof cssClass !== 'undefined' ? cssClass : '' %> <%= fadeInOnLoad ? 'js-faded-image fade-in-on-load' : '' %>\" alt=\"<%= title %>\"> "),PULSE.app.templates["common.information-popup"]=_.template('
    <% if ( typeof icon !== \'undefined\' && icon ) { %>
    <%= render( {\n cssClass: \'\',\n name: icon\n }, \'common.svg-icon\' ) %>
    <% } %>

    <%= title %>

    <%= description %>

    '),PULSE.app.templates["common.lazy-image"]=_.template("
    \x3c!-- <% if( data.useImg || data.url ) { %> <%= render( {\n source: data.url,\n cssClass: data.cssClass || '',\n objectFit: data.objectFit && true,\n fadeInOnLoad: true,\n title: data.title\n }, 'common.image-element' ) %> <% } else { %> <%= render( {\n mediaQueryConfig: data.mediaQueryConfig,\n cssClass: data.cssClass || '',\n objectFit: data.objectFit && true,\n fadeInOnLoad: true,\n title: data.title\n }, 'common.picture-element' ) %> <% } %> --\x3e \x3c!-- DO NOT REMOVE THE ABOVE --\x3e
    "),PULSE.app.templates["common.media-meta"]=_.template("<% var userTimeZone = moment.tz.guess() %> <% var displayDate\nif ( data.type === 'video' ) {\n displayDate = data.date\n} else { \n displayDate = data.publishFrom\n} %> <% if ( data.description ) { %>

    <%= PULSE.app.common.content.truncateText( data.description, 85 ) %>

    <% } %>
    <%= render( {\n cssClass: 'media-thumbnail__time-icon',\n name: 'duration'\n }, 'common.svg-icon' ) %> <% if ( data.subtitle ) { %> <% var iconName = data.type === 'text' ? 'topic-news' : 'topic-' + data.type; %> <%= render( {\n cssClass: 'media-thumbnail__topic-news-icon u-hide-until-tablet',\n name: iconName\n }, 'common.svg-icon' ) %> <%= PULSE.app.common.content.truncateText( data.subtitle, 12 ) %> <% } %> <% if ( data.type.toLowerCase() === 'playlist' ) { %> <% } %>
    <% if ( data.type.toLowerCase() === 'playlist' ) { %> <%= render( {\n cssClass: 'media-thumbnail__expand-icon',\n name: 'expand-out'\n }, 'common.svg-icon' ) %> <% } %> "),PULSE.app.templates["common.media-thumbnail"]=_.template('<% var publishLabel = PULSE.app.common.content.getPublishStringFromTag( data ) %> <% var modalId = \'\' %> <% var playlistSize = 0 %> <% var thumbnailTypeText = \'\' %> <% var competitionReference = { label: "", logo: "", url: "", cssClass: "" } %> <% var tagLabel = data.tags.find(item => item.label.includes(\'tag:\') )?.label.replace(\'tag:\', \'\') %> <% var tagLabelForUrl = tagLabel?.replace(\' \', \'-\') %> <% var tagLabelRegexString = \'[a-z ]+\' %> <% var tagUrl = PULSE.I18N.lookupKey( \'url.tag.\' + tagLabelForUrl ) %> <% var typeIconName = \'news\' %> <% var isExclusiveContent = data.tags.find(tag => tag.label === \'AFLClubExclusive:Yes\') ? true : false %> <% if ( data.type.toLowerCase() === \'video\' ) { %> <% modalId = \'data-ui-modal="#VideoModal"\' %> <% typeIconName = \'video-playback\' %> <% } else if ( data.type.toLowerCase() === \'playlist\' ) { %> <% modalId = \'data-ui-modal="#GalleryModal"\' %> <% playlistSize = data.items.length %> <% typeIconName = \'gallery\' %> <% } %> <% if ( tagLabel === \'podcasts\' ) { %> <% typeIconName = \'listen\' %> <% } %> <% for (var i = 0; i < data.references.length; i++) { %> <% if (data.references[i].type == \'AFL_COMPETITION\') { %> <% competitionReference.label = PULSE.I18N.lookupKey( \'label.AFL_COMPETITION.\' + data.references[i].id ) %> <% competitionReference.logo = PULSE.I18N.lookupKey( \'logo.AFL_COMPETITION.\' + data.references[i].id ) %> <% competitionReference.url = PULSE.I18N.lookupKey( \'url.AFL_COMPETITION.\' + data.references[i].id ) %> <% competitionReference.cssClass = competitionReference.label.toLowerCase() %> <% } %> <% } %> <% if ( competitionReference.url.includes(\'url.AFL_COMPETITION.\') ) competitionReference.url = null %> <% if ( tagUrl.includes(\'url.tag.\') ) tagUrl = null %>
    '),PULSE.app.templates["common.modal-all-items"]=_.template("
    <%= render( {\n cssClass: 'modal__thumbnail-chevron',\n name: 'chevron'\n }, 'common.svg-icon' ) %>
    <%= render( {\n cssClass: 'modal__thumbnail-chevron',\n name: 'chevron'\n }, 'common.svg-icon' ) %>
    "),PULSE.app.templates["common.modal-all-photos"]=_.template(' '),PULSE.app.templates["common.modal-gallery-list"]=_.template(' '),PULSE.app.templates["common.modal-gallery-main"]=_.template(' '),PULSE.app.templates["common.modal-video-content"]=_.template('
    '),PULSE.app.templates["common.modal-video-intro"]=_.template("
    <%= render( { data : {\n mediaQueryConfig: data.mediaQueryConfig,\n cssClass: data.cssClass,\n objectFit: data.objectFit\n } }, 'common.lazy-image' ) %>
    "),PULSE.app.templates["common.modal"]=_.template(' '),PULSE.app.templates["common.picture-element"]=_.template("<% if ( mediaQueryConfig ) { %> <%= objectFit ? 'object-fit-cover-picture' : 'picture' %>\" data-photo-id=\"<%= typeof photoId !== 'undefined' ? photoId : '' %>\"> <% _.each( mediaQueryConfig, function( conf ) { %> <% if ( conf.name === 'default' ) { %> __img <%= typeof fadeInOnLoad !== 'undefined' && fadeInOnLoad ? 'js-faded-image fade-in-on-load' : '' %>\" src=\"<%= conf.variantUrls[ 0 ] %>\" alt=\"<%= title %>\"> <% } else { %> <% let sourceConfig = helper.template.getSourceConfig( conf ) %> \" media=\"<%= sourceConfig.mediaQuery %>\"> <% } %> <% } ); %> <% } else { %> <% /* @TODO */ %> <% } %>"),PULSE.app.templates["common.slider-pagination"]=_.template("<% if( slidenumbers > 1 ) { %> <% } %> "),PULSE.app.templates["common.social-share"]=_.template("
    \" class=\"social-share js-social-share <%= data.className ? data.className : '' %>\" data-body=\"<%= data.body ? data.body : '' %>\" data-link-to=\"<%= data.linkTo ? data.linkTo : '' %>\" data-open-in-body=\"<%= data.openInBody !== null && data.openInBody !== undefined ? data.openInBody.toString() : 'false' %>\"> <% \n var facebookLabel = PULSE.I18N.lookupKey( 'label.share.via_facebook' );\n var twitterLabel = PULSE.I18N.lookupKey( 'label.share.via_twitter' );\n var whatsappLabel = PULSE.I18N.lookupKey( 'label.share.via_whatsapp' );\n var shareByCopyLabel = PULSE.I18N.lookupKey( 'label.share.via_copy' );\n var customTextLabel = data.customText;\n var shareLabel = PULSE.I18N.lookupKey( 'label.share' );\n\n if ( data.showLabel ) { %> <%= PULSE.I18N.lookupKey( 'label.share.why_not' ) %> <% } %>
    "),PULSE.app.templates["common.svg-icon"]=_.template("<% /**\n * Render an svg icon\n * @param {string} name - The name of the icon\n * @param {boolean} hideIcon - Optional, when true adds the icon css class\n * @param {string} cssClass - Additional css classes\n * @param {string} folder - Optional folder name for the icon\n * @param {string} subfolder - Optional sub-folder name for the icon\n *\n * @info When used to display SVGs with a folder/subfolder path, the SVGs must include an 'id' property\n * with the value of \"icn\" followed by the file name, like so: id=\"icn-file-name\"\n*/ %> <%= cssClass %>\"> <% if (typeof folder === 'undefined' || folder === '' || folder === 'state-league') { %> i/svg-output/<%= typeof folder !== 'undefined' && folder !== '' ? `${folder}/` : '' %>icons.svg#icn-<%= name %>\"> <% } else { %> i/<%= folder %>/<%= typeof subfolder !== 'undefined' && subfolder !== '' ? `${subfolder}/` : '' %><%= name %>.svg#icn-<%= name %>\"> <% } %> "),PULSE.app.templates["common.team-icon"]=_.template("<%\n var teamAbbr = PULSE.app.common.team.getTeamAbbr( providerId );\n var stateLeague = PULSE.app.common.team.getStateLeagueTeams().includes(teamAbbr);\n var modifier = ''\n\n if (!PULSE.app.common.team.getTeamsWithDefaultThemeOnly().includes(teamAbbr)) {\n modifier = typeof theme !== 'undefined' && theme !== '' ? '-' + theme : '';\n }\n%> <% if ( teamAbbr ) { %> <%= render( {\n cssClass: cssClass,\n name: 'aflc-' + teamAbbr + modifier,\n hideIcon: typeof hideIcon !== 'undefined' ? hideIcon : false,\n folder: stateLeague ? 'state-league' : ''\n }, 'common.svg-icon' ) %> <% } %> "),PULSE.app.templates["common.toggle-input"]=_.template('<% if( typeof options !==\'undefined\' && options.length> 0 ) { %>
    <% _.each( options, function( option ) { %> <% var isSelected = _.isEqual( value, option.value ) %> <% }) %>
    <% } %>'),PULSE.app.templates["common.tooltip"]=_.template('
    <%= label %> <%= render( {\n cssClass: \'tooltip__close js-tooltip-close\',\n name: \'close-hover\'\n }, \'common.svg-icon\' ) %> <%= description %> <% if ( customTemplate ) { %> <%= PULSE.app.templating.render( {}, customTemplate ) %> <% } %>
    '),PULSE.app.templates["common.video-modal-all-items"]=_.template("
  • \" <% if ( typeof nextItem.matchId !== 'undefined' && nextItem.matchId ) { %> data-match-id=\"<%= nextItem.matchId %>\" <% } %>> <%= render( { data: nextItem, cssClass: 'media-thumbnail--sidebar-featured' }, 'common.media-thumbnail' ) %>
  • <% _.each( items, function( item, index ) { %>
  • \" <% if ( typeof item.data.matchId !== 'undefined' && item.data.matchId ) { %> data-match-id=\"<%= item.data.matchId %>\" <% } %>> <%= render( { data: item.data, cssClass: 'media-thumbnail--sidebar-regular' }, 'common.media-thumbnail' ) %>
  • <% } ); %> "),PULSE.app.templates["common.video-modal-description"]=_.template('
    <% if ( typeof subtitle !== \'undefined\' && subtitle ) { %>
    <%= render( {\n cssClass: \'\',\n name: \'topic-video\'\n }, \'common.svg-icon\' ) %> <%= subtitle %>
    <% } %>
    <%= render( {\n cssClass: \'\',\n name: \'content-video\'\n }, \'common.svg-icon\' ) %> <%= PULSE.app.common.date.durationToTime( duration ) %> <%= PULSE.I18N.lookupKey( \'label.mins\' ) %>

    <%= title %>

    <%= description %>

    <%= PULSE.I18N.lookupKey( \'label.published-on\' ) %> <%= date %> '),PULSE.app.templates["common.video-modal-inline-player"]=_.template('
    <% if( promo ) { %>

    <%= promo.title ? promo.title : PULSE.I18N.lookupKey( \'label.videoModal.sponsor.text\' ) %>

    <% } %> '),PULSE.app.templates["common.video-modal-sponsor-banner"]=_.template('

    '),PULSE.app.templates["common.video-modal-stream-ended"]=_.template("
    <%= PULSE.I18N.lookup( 'label.streamEnded' ) %>
    "),PULSE.app.templates["common.paginator"]=_.template('<% for ( var i = 0; i < slideNum; i++ ) { %>
  • <% } %> '),function(e,t){e.I18N={},e.I18N.setup=()=>{const a=t.localStorage.getStorage("req_language",!0);e.language=a||e.defaultLanguage;let n=new e.I18N.Translator(PULSE.I18N);PULSE.I18N||(PULSE.I18N={}),PULSE.I18N.lookup=function(){return n.lookup.apply(n,arguments)},PULSE.I18N.lookupKey=function(){return n.lookupKey.apply(n,arguments)},void 0!==window.moment&&(e.I18N.enOverride(),moment.locale(e.language))},e.I18N.enOverride=()=>{moment.updateLocale("en",{longDateFormat:{LT:"HH:mm",LTS:"h:mm:ss A",l:"DD/MM",L:"DD/MM/YYYY",ll:"D MMMM",LL:"D MMMM YYYY",lll:"MMM D YYYY LT",LLL:"MMMM Do YYYY LT",llll:"ddd MMM D YYYY",LLLL:"dddd, MMMM Do YYYY"},yearFirst:!1})},e.I18N.Translator=function(t){let a=this;a.hasTranslations=!1,a.language=e.language,t?(a.hasTranslations=!0,a.language!==t.language&&(void 0===t.language&&console.warn("Language mismatch! Using "+t.language),a.language=t.language),a.translations=t.translations||{},a.hasTranslations=!0):(a.hasTranslations=!1,a.translations={})},e.I18N.Translator.prototype.lookup=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&t){let a=this.lookupKey(e);for(let e in t)if({}.hasOwnProperty.call(t,e)){let n=new RegExp("\\${"+e+"}","gi");a=a.replace(n,t[e])}return a}return""},e.I18N.Translator.prototype.lookupKey=function(e){let t=this;return t.hasTranslations&&t.translations[e]||e},e.I18N.setup()}(PULSE.app,PULSE.core),function(e){const t=new Map,a=(e,t,a)=>{if(!("Tab"===a.key))return;const n=a.shiftKey;if(n&&document.activeElement===e)return t.focus(),void a.preventDefault();n||document.activeElement!==t||(e.focus(),a.preventDefault())};e.focusContainer={addListener:e=>{const n=[].slice.call(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter((e=>{const{display:t,visibility:a}=getComputedStyle(e),n="none"===t||"hidden"===a;return!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden")&&!n})),o=n[0],i=n[n.length-1];o.focus(),o.blur(),t.set(e,a.bind(this,o,i)),document.addEventListener("keydown",t.get(e))},removeListener:e=>{document.removeEventListener("keydown",t.get(e)),t.delete(e)}}}(PULSE.app.common),function(e,t){const a=["click","keypress"],n=["mousedown","touchdown"],o=32,i=9,s="enter";e.addOnTouchStartListener=(e,t,a)=>{let n=0,o=0,i=!1,s=0,r=0;function l(e){n=e.changedTouches[0].screenX}function c(e){o=e.changedTouches[0].screenX,o-n>50?(t(),n=0,o=0):n-o>50&&(a(),n=0,o=0)}function d(e){i=!0,s=e.clientX}function m(){i=!1,r>0&&(r-s>50?(t(),s=0,r=0):s-r>50&&(a(),s=0,r=0))}function u(e){i&&(r=e.clientX)}return e.addEventListener("touchstart",l),e.addEventListener("touchend",c),e.addEventListener("mousedown",d),e.addEventListener("mouseup",m),e.addEventListener("mousemove",u),{touchstartHandler:l,touchendHandler:c,mousedownHandler:d,mouseupHandler:m,mousemoveHandler:u}},e.removeOnTouchStartListener=(e,t)=>{e.removeEventListener("touchstart",t.touchstartHandler),e.removeEventListener("touchend",t.touchendHandler),e.removeEventListener("mousedown",t.mousedownHandler),e.removeEventListener("mouseup",t.mouseupHandler),e.removeEventListener("mousemove",t.mousemoveHandler)},e.addFocusTrap=e=>{const t='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), [tabindex="0"] li',a=e.querySelectorAll(t)[0],n=e.querySelectorAll(t),o=n[n.length-1];function s(e){("Tab"===e.key||e.keyCode===i)&&(e.shiftKey?document.activeElement===a&&(o.focus(),e.preventDefault()):document.activeElement===o&&(a.focus(),e.preventDefault()))}return e.addEventListener("keydown",s),{addFocusTrap:s}},e.removeFocusTrap=(e,t)=>{e.removeEventListener("keydown",t.addFocusTrap)},e.addAriaClickListener=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const c=i?a.filter((e=>"click"!==e)).concat(n):a,d=i?n:"click",m=e=>l(e,o,d,r)?t(e):null;for(let t=0;t2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Array.prototype.slice.call(t).forEach((t=>e.addAriaClickListener(t,a,n,o)))},e.removeAriaClickListener=function(e,t){const o=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?a.filter((e=>"click"!==e)).concat(n):a;for(let a=0;a{e.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true")},e.toggleAriaMenuAttributes=e=>{const t=e.getAttribute("aria-expanded"),a=e.getAttribute("aria-hidden");if(void 0!==t){const a="true"===t?"false":"true";e.setAttribute("aria-expanded",a)}if(void 0!==a){const t="true"===a?"false":"true";e.setAttribute("aria-hidden",t)}},e.toggleZIndex=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"a";const n=[].slice.call(e.querySelectorAll(a));for(let e=0;e"a"===e,l=function(e,t,a){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(n&&e.key===s)return e.preventDefault(),!0;if(!n&&e.key!==s)return!0;const i=Array.isArray(a)?a.includes(e.type):e.type===a;return!(e.key!==s&&!i)||!(!t||e.which!==o)};e.idifyString=e=>{let t;return t=e.toLowerCase(),t=t.replace(/[^a-zA-Z ]/g,""),t=t.trim().replace(/ +/g,"-"),t}}(PULSE.app.common,PULSE.core),function(e,t){t.arrayHelper={},t.arrayHelper.indexBy=(e,t,a)=>e.reduce(((e,n)=>(e["string"==typeof t?n[t]:t.call(a,n)]=n,e)),{}),t.arrayHelper.groupBy=(e,t)=>e.reduce((function(e,a,n,o){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t(a);return(e[i]||(e[i]=[])).push(a),e}),{})}(PULSE.app,PULSE.app.common),function(e){e.betting={},e.betting.getWageringData=function(){const{store:e,cfsApi:t}=PULSE.app.redux;return e.dispatch(t.endpoints.getBettingOdds.initiate(void 0))},e.betting.isBettingMatch=function(e,t){return t?.find((t=>t.matchId===e))},e.betting.getClickThroughUrl=function(t){const a=e.betting.inferSiteArea();return t&&t.contextualUrls&&a?t.contextualUrls[a]:t.url},e.betting.inferSiteArea=function(){const e=window.location.pathname.split("/");switch(!0){case e.includes("ladder"):return"ladder";case e.includes("matches"):return"matchCentre";case e.includes("fixture"):return"fixture";default:return""}}}(PULSE.app.common),function(e){const t={VIDEO:["Channel 7","Foxtel","Kayo","Watch AFL"],AUDIO:["3AW","6PR","FIVEaa","Triple M","SEN","ABC","AFL Nation","K Rock","NIRS"]};e.processMatchEvent=(e,t)=>{const r=s(e.channels,t),l=i(r),c=s(e.broadcasters,t);return o(l.AUDIO,"AUDIO"),n(l.VIDEO,"VIDEO"),a(c,"VIDEO"),{broadcasters:c,video:l.VIDEO,audio:l.AUDIO}},e.extractBroadcastersFromMatchEvent=(e,t)=>{if(e.broadcasters.length){const n=s(e.broadcasters,t);return a(n,"VIDEO"),n}const n=s(e.channels,t),o=i(n).VIDEO.reduce(((e,t)=>(t.info.broadcaster&&e.push(t.info.broadcaster),e)),[]),r=o?o.filter(((e,t,a)=>t===a.findIndex((t=>t.name===e.name)))):[];return a(r,"VIDEO"),r},e.modifyCountryDisplay=e=>"Australia"===e?e:"International",e.getLocationFromTimezone=t=>e.modifyCountryDisplay(t?.split("/")?.[0]);const a=(e,a)=>{e.sort(((e,n)=>{let o=t[a].indexOf(e.name);-1===o&&(o=t[a].length);let i=t[a].indexOf(n.name);return-1===i&&(i=t[a].length),o-i}))},n=(e,a)=>{e.sort(((e,n)=>{let o=e?.info?.broadcaster?.name?t[a].indexOf(e.info.broadcaster.name):-1;-1===o&&(o=t[a].length);let i=n?.info?.broadcaster?.name?t[a].indexOf(n.info.broadcaster.name):-1;return-1===i&&(i=t[a].length),o-i}))},o=(e,a)=>{e.sort(((e,n)=>{let o=t[a].indexOf(e.info.name);-1===o&&(o=t[a].length);let i=t[a].indexOf(n.info.name);return-1===i&&(i=t[a].length),o-i}))},i=e=>{const t={VIDEO:[],AUDIO:[]};return e.forEach((e=>{e.info.channelTypes.forEach((a=>{t[a.mediaType].push(e)}))})),t},s=(e,t)=>e.filter((e=>r(e,t))),r=(e,t)=>{let a=!1;return a=void 0===e.restrictedRegions||0===e.restrictedRegions.length||e.restrictedRegions.some((e=>e.id===t)),a}}(PULSE.app.common),function(e){let t=[];const a=function(e){let a;for(let n=0;n-1){const t=/(.*?:)/g;return e.replace(t,"").toLowerCase().replace(/ /g,"")}return e},t.content.hasTag=function(e,t){let a=!1;return e.tags.length>0&&e.tags.forEach((function(e){void 0!==e.label&&e.label===t&&(a=!0)})),a},t.content.getPublishStringFromTag=function(e){let a="",o="";return e&&e.tags.length>0&&e.tags.forEach((e=>{if(e.label.includes("ContentLabel:")){const n=t.content.getLowerCaseTagSuffix(e.label);a=PULSE.I18N.lookup(`label.news.${n}`),o=n}e.label.includes("AFLClubExclusive:Yes")&&(a=PULSE.I18N.lookup(`label.news.${n}`),o=n)})),{label:a,cssClass:o}},t.content.isPortrait=function(e){return!!e.originalDetails&&e.originalDetails.width{e.label.includes("brand:")&&(t=e.label.replace("brand:",""))})),t},t.content.truncateText=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",n="";return t>=e.length?e:(n=e.lastIndexOf(" ",t)>=0?e.substring(0,e.lastIndexOf(" ",t)-1)+a:e.substring(0,t)+a,n)},t.content.getTotalDuration=function(e){let a=e.reduce((function(e,t){return e+t.duration}),0);return t.date.durationToTime(a)},t.content.getVariantUrls=function(e,a){let n,o={},i=function(a,n){let i=t.image.getVariantByTag(e,a);i&&(o[n]=i.url)};if(e.length)if(_.isArray(a))a.forEach((function(e){e.tags.forEach((function(t,a){let n=e.name+(0===a?"":"Retina");i(t,n)}))}));else if("object"==typeof a)for(n in a)({}).hasOwnProperty.call(a,n)&&i(a[n],n);return o},t.content.getImageFromContentItem=function(e){let t;if("photo"===e.type)t=e;else if("video"===e.type&&e.thumbnail)t=e.thumbnail;else{let a=e.leadMedia||e.coverItem||e.promoItem;"playlist"===e.type&&e.coverItem&&"playlist"===e.coverItem.type&&(a=e.coverItem.coverItem),a&&("photo"===a.type?t=a:"video"===a.type&&a.thumbnail&&(t=a.thumbnail))}return t},t.content.extendMQConfigWithUrls=(e,n)=>{if(e&&e.onDemandUrl)return n.map((n=>{let o={...n};const i=o.multipliers||a;return o.variantUrls=i.map((a=>{const n=(o.size.height||0)*a,i=(o.size.width||0)*a;return t.image.getOnDemandImageUrl(e,n,i)})),o}))},t.content.formatPublishedAgoDate=function(e){const t=Date.now()-e;let a="";const n=Math.floor(t/36e5);return t>1728e5?"":(0===n?a=PULSE.I18N.lookup("label.now"):1===n?a=PULSE.I18N.lookup("label.timestamp.hours.singular"):n>0&&n<24?a=PULSE.I18N.lookup("label.timestamp.hours.plural",{hours:n}):n>=24&&n<48&&(a=PULSE.I18N.lookup("label.timestamp.days.singular")),a)}}(PULSE.app,PULSE.app.common),function(e){e.customTableSort={};const t=(e,t)=>e-t,a=(e,t)=>e.localeCompare(t),n=(e,t)=>{const a={W:4,D:2,L:0};let n=e.form.substring(e.form.length-5,e.form.length),o=t.form.substring(t.form.length-5,t.form.length),i=[...n].map((e=>a[e])),s=[...o].map((e=>a[e]));return i=i.reduce(((e,t)=>e+t),0),s=s.reduce(((e,t)=>e+t),0),i-s},o=(e,a)=>t(e.position,a.position),i=(e,t)=>a(e.teamName,t.teamName),s=(e,a,n)=>t(e[n],a[n]),r=(e,a)=>t(e.jumperNumber,a.jumperNumber),l=(e,t)=>a(e.surname,t.surname);e.customTableSort.get=e=>{switch(e){case"positionSort":return o;case"teamNameSort":return i;case"customNumberCompare":return s;case"formCompare":return n;case"stringCompare":return a;case"jumperCompare":return r;case"surnameCompare":return l;default:return t}}}(PULSE.app.common),function(e,t,a,n){a.data={},a.data.postData=function(e,t,a,o){fetch(e,{mode:"cors",method:t,body:JSON.stringify(a),headers:{"Content-Type":"application/json"}}).then((e=>e)).then((e=>{e.status===n.STATUS_CODES.BAD_REQUEST||e.status===n.STATUS_CODES.CONFLICT?o(e):o(e.json().then((e=>o(e))))})).catch((e=>{console.error(e)}))}}(PULSE.core,PULSE.app,PULSE.app.common,PULSE.app.common.CONSTANTS),function(e,t,a,n){const o=60,i=60;e.date={},e.date.momentGetDaysFromRange=function(e,a,o,i){let s=e instanceof Date?e:new Date(e),r=a instanceof Date?a:new Date(a),l=[],c=s.getTime();i&&s.toLocaleDateString()!==r.toLocaleDateString()&&l.push({date:s,string:n&&o?n(s).locale(t.language).format(o):s.toLocaleDateString(),std:!!n&&n(s).format("DD-MM-YYYY")});do{c+=864e5;let e=new Date(c);l.push({date:e,string:n&&o?n(e).locale(t.language).format(o):e.toLocaleDateString(),std:!!n&&n(e).format("DD-MM-YYYY")})}while(c=1&&(a=`${n}:`),a+=s1&&void 0!==arguments[1]?arguments[1]:"long";const{DateTime:a}=luxon,n=a.fromMillis(e,{zone:a.local().zoneName}),o={long:"MMM d, yyyy, H:mma",short:"MMM d, yyyy"}[t];return o?n.toFormat(o):(console.warn(`No format string for format ${t}`),"")}}(PULSE.app.common,PULSE.app,PULSE.core,moment),function(e,t,a){a.deviceHelper={},a.deviceHelper.isIOSTouchScreen=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,a.deviceHelper.isAndroidTouchScreen=()=>navigator.userAgent.includes("Android")&&"ontouchend"in document,a.deviceHelper.isTouchScreen=()=>{const{isAndroidTouchScreen:e,isIOSTouchScreen:t}=a.deviceHelper;return e()||t()},a.deviceHelper.isRetinaDisplay=()=>{if(window.matchMedia){let e=window.matchMedia("only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)");return e&&e.matches||window.devicePixelRatio>1}return!1}}(PULSE.app,PULSE.core,PULSE.app.common),function(e){e.element={},e.element.isInView=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=e.getBoundingClientRect(),n=a.top>=0&&a.top<=window.innerHeight,o=a.bottom>=0&&a.bottom<=window.innerHeight,i=a.left>=0&&a.left<=window.innerWidth,s=a.right>=0&&a.right<=window.innerWidth;return t?n&&o&&i&&s:(n||o)&&(i||s)},e.element.contentIsInView=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=e.getBoundingClientRect(),n=a.topt,o=a.leftt;return n&&o},e.element.getFocusableChildElements=function(e){return[...e.querySelectorAll('a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden")))}}(PULSE.app.common),function(e){e.event={},e.event.dispatch=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(arguments.length>2&&void 0!==arguments[2]?arguments[2]:document.body).dispatchEvent(new CustomEvent(e,{detail:t}))}}(PULSE.app.common),function(e,t){t.events={},t.events.getModuleItem=function(e,t){let a;if(e.fields)return e.fields.forEach((e=>{e.title===t&&(a=e.values[0]?.value?e.values[0].value:"")})),a},t.events.getEventTag=function(e,t){const a=[];if(e?.tags.length){const n=e?.tags;for(const e of n)e.label.includes(t)&&a.push(e.label.replace(`${t}`,""))}return a},t.events.hasEventPassed=function(e){return moment().diff(e,"days")>=1},t.events.getEventDates=function(e,t,a){let n=[];return e.forEach((e=>{let o=e.startDate;if(a){const t=e.modulesInContent?.find((e=>"details"===e.title.toLowerCase().replace(" ","")))??null,a=t?PULSE.app.common.events.getModuleItem(t,"Date & Time"):"";o=a||!1}if(!o)return;const i=moment.tz(o,t).format("YYYY/MM/DD");n.includes(i)||n.push(i)})),n.sort(((e,t)=>new Date(e).getTime()-new Date(t).getTime()))}}(PULSE.app,PULSE.app.common),function(e,t){t.image={},t.image.getVariantByTag=function(e,t){for(let a=0;ao&&(s=o,r=o/n),r>o&&(r=o,s=o*n),r&&i.push(`height=${r}`),s&&i.push(`width=${s}`),i.length>0?`${e.onDemandUrl}?${i.join("&")}`:`${e.onDemandUrl}?width=500`}},t.image.getVariantWithWidth=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=1/0,n=!1;return e.forEach(((e,o)=>{const i=Math.abs(e.width-t);i1&&void 0!==arguments[1]?arguments[1]:"XLarge",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.PLAYER_HEADSHOT_YEAR,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"png",s=arguments.length>5?arguments[5]:void 0,r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=n;if("{$PLAYER_HEADSHOT_YEAR$}"!==l&&void 0!==l||(l=(new Date).getFullYear()),!t)return null;return s?`${e.environment.playerImagePath}/${a}${l}/${t}.${i}?im=Resize,${r?"height":"width"}=${s}`:`${e.environment.playerImagePath}/${a}${l}/${t}.${i}?im=Scale,width=${o},height=${o}`},t.image.getCompetitionPlayerImage=function(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"AFL",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"0.6",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"png",s=arguments.length>5?arguments[5]:void 0,r=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(!t)return null;return s?`${e.environment.playerImagePath}/${a}/${n}/${t}.${i}?im=Resize,${r?"height":"width"}=${s}`:`${e.environment.playerImagePath}/${a}/${n}/${t}.${i}?im=Scale,width=${o},height=${o}`},t.image.migratePlayerPhotoURL=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0.6",a=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;if(!e)return`${PULSE.app.environment.cdn}i/elements/player-headshot-placeholder-light-v2.svg`;const o=e.split("?")[0];return a?`${o}?im=Resize,${n?"height":"width"}=${a}`:`${o}?im=Scale,width=${t},height=${t}`}}(PULSE.app,PULSE.app.common),PULSE.app.common.jsonInjector=function(e){const t=document.createElement("script");t.setAttribute("type","application/ld+json"),t.innerHTML=JSON.stringify(e);const a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(t,a)},function(e,t,a,n){const o={matchScore:{totalScore:0,goals:0,behinds:0}},i={period:{periodNumber:"",periodLabel:"",periodSeconds:""}};e.match={},e.match.queryWithMatchStatusPolling=(a,n)=>{const o=PULSE.app.redux,{selectors:i,paths:s,store:r,watch:l,cfsApi:c}=o;let d=n;n||(d=c.endpoints.getMatchItem);const m=r.dispatch(d.initiate(a));return l(s.match.status(a),(n=>{const o=i.match.item(r.getState(),a)?.match.utcStartTime;n&&o&&(e.match.shouldMatchPoll(n,o)?m.updateSubscriptionOptions({pollingInterval:t.MATCH_POLL_DELAY}):m.updateSubscriptionOptions({pollingInterval:0}))}),!0),m},e.match.shouldMatchPoll=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(a!==t.MATCH_STATUS.CONCLUDED){return!(!e.match.startsWithinAnHour(a,n)&&a!==t.MATCH_STATUS.LIVE&&a!==t.MATCH_STATUS.POST_GAME&&a!==t.MATCH_STATUS.POSTGAME)}return!1},e.match.getWinningSide=function(e){if(e.homeTeamScore&&e.awayTeamScore){const t=e.homeTeamScore.matchScore.totalScore,a=e.awayTeamScore.matchScore.totalScore;return t>a?"home":a>t?"away":"draw"}return""},e.match.getMatchStatus=function(e){switch(e){case t.MATCH_STATUS.SCHEDULED:case t.MATCH_STATUS.UNCONFIRMED_TEAMS:case t.MATCH_STATUS.CONFIRMED_TEAMS:case t.MATCH_STATUS.UPCOMING:return t.MATCH_STATUS.UPCOMING;case t.MATCH_STATUS.POST_GAME:case t.MATCH_STATUS.POSTGAME:case t.MATCH_STATUS.CONCLUDED:case t.MATCH_STATUS.COMPLETED:return t.MATCH_STATUS.COMPLETED;case t.MATCH_STATUS.CANCELLED:return t.MATCH_STATUS.CANCELLED;case t.MATCH_STATUS.POSTPONED:return t.MATCH_STATUS.POSTPONED;case t.MATCH_STATUS.PLACEHOLDER:case t.MATCH_STATUS.TBC:return t.MATCH_STATUS.TBC;default:return t.MATCH_STATUS.LIVE}},e.match.getCompAbbr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const a=e.substr(e.length-3);for(const e in t.COMPETITION){const n=t.COMPETITION[e];if(n.providerId.includes(a))return n.code}return"AFL"},e.match.getMatchLabel=function(e,a){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.MATCH_STATUS.LIVE)===t.MATCH_STATUS.COMPLETED?PULSE.I18N.lookup("label.fixtures.draw"):e?PULSE.I18N.lookup("label.fixtures.scores-level"):a&&a.string&&a.string!==PULSE.I18N.lookup("label.mc.clock.startingSoon")?PULSE.I18N.lookup("label.fixtures.countdown-text"):void 0},e.match.getTeamName=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;return e?e.name.length&&e.name.length>t?e.nickname:e.name:PULSE.I18N.lookup("label.team.tbc")},e.match.getSummary=function(t){if(t.homeTeamScore&&t.awayTeamScore){const a=t.homeTeamScore.matchScore.totalScore,n=t.awayTeamScore.matchScore.totalScore;let o=t.status===e.CONSTANTS.MATCH_STATUS.LIVE?"label.match.summary.by":"label.match.summary.win",i="";return a>n?(i=a-n,PULSE.I18N.lookup(o,{team:t.teamNicknames.home,scoreDiff:i})):n>a?(i=n-a,PULSE.I18N.lookup(o,{team:t.teamNicknames.away,scoreDiff:i})):(o=t.status===e.CONSTANTS.MATCH_STATUS.LIVE?"label.match.summary.level":"label.match.summary.draw",PULSE.I18N.lookup(o))}return""},e.match.getLatestPeriod=function(t){if(t.matchClock&&t.matchClock.periods){const a=t.matchClock.periods.sort(((e,t)=>t.periodNumber-e.periodNumber))[0];return a.periodNumber>4?a.periodLabel="ET"+(a.periodNumber-4):a.periodLabel=`Q${a.periodNumber}`,a.periodSummary=e.match.getPeriodSummary(t.status,a.periodNumber),a}return i},e.match.getPeriodSummary=function(e,a){switch(e){case t.MATCH_STATUS.POST_GAME:case t.MATCH_STATUS.POSTGAME:return PULSE.I18N.lookup("label.match.fullTime");case t.MATCH_STATUS.CONCLUDED:case t.MATCH_STATUS.COMPLETED:return PULSE.I18N.lookup("label.match.complete");default:return PULSE.I18N.lookup(`label.match.time.q${a}`)}},e.match.getRenderModel=function(t){return{status:t.status,homeTeamScore:t.homeTeamScore||o,awayTeamScore:t.awayTeamScore||o,summary:e.match.getSummary(t),period:e.match.getLatestPeriod(t),isLive:e.match.getIsLive(t.status,t.matchClock),winningSide:e.match.getWinningSide(t)}},e.match.getIsLive=function(e,a){return e===t.MATCH_STATUS.LIVE&&(!(!a||!a.periods)&&(1!==a.periods.length||0!==a.periods[0].periodSeconds))},e.match.pollForLiveRadio=function(e,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.MC_RADIO_POLL_DELAY;if(!e)return null;const s={url:`${n.environment.aflApi}broadcasting/afl/live/audio?page=0&pageSize=30&matchId=${e}`,method:"GET",callback:o,interval:i};return a.data.manager.add(s)},e.match.cancelledOrPostponed=t=>{const{MATCH_STATUS:a}=e.CONSTANTS;return[a.CANCELLED,a.POSTPONED,a.TBC,a.PLACEHOLDER].includes(t)},e.match.returnMatchStatusSuffix=t=>{const{MATCH_STATUS:a}=e.CONSTANTS;let n;switch(t){case a.COMPLETED:n="fullTime";break;case a.TBC:n=a.TBC.toLowerCase();break;case a.POSTPONED:n=a.POSTPONED.toLowerCase();break;case a.CANCELLED:n=a.CANCELLED.toLowerCase();break;default:n="tbc"}return n},e.match.sortGroupKeys=function(t,a){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=e.match.cancelledOrPostponed(t),i=e.match.cancelledOrPostponed(a);return o&&i?t===e.CONSTANTS.MATCH_STATUS.TBC||t===e.CONSTANTS.MATCH_STATUS.PLACEHOLDER?-1:a===e.CONSTANTS.MATCH_STATUS.TBC||a===e.CONSTANTS.MATCH_STATUS.PLACEHOLDER?1:t===e.CONSTANTS.MATCH_STATUS.POSTPONED?-1:1:o?n?1:-1:i?n?-1:1:void 0},e.match.startsWithinAnHour=(e,a,n)=>{const o=n||t.TIME.ONE_HOUR_IN_MS,i=a.includes("+")?a:`${a}+0000`,s=luxon.DateTime.fromISO(i),r=n?s.diff(luxon.DateTime.utc(),"minutes").values.minutes:s.diff(luxon.DateTime.utc()).values.milliseconds;return!!((e===t.MATCH_STATUS.SCHEDULED||e===t.MATCH_STATUS.UNCONFIRMED_TEAMS||e===t.MATCH_STATUS.CONFIRMED_TEAMS||e===t.MATCH_STATUS.UPCOMING)&&a&&r>-2.5*o&&r1&&void 0!==arguments[1]?arguments[1]:34;return e?.name?.length>t?e.abbreviation:e.name},e.match.isPastStartTime=e=>luxon.DateTime.utc()>luxon.DateTime.fromISO(e),e.match.isNonFinalRound=e=>e.name.includes("Round")||e.name.startsWith("Week")}(PULSE.app.common,PULSE.app.common.CONSTANTS,PULSE.core,PULSE.app),function(e,t,a){let n,o=null;e.common.misApi=e.common.misApi||{},e.common.misApi.requestToken=function(){const o=`${e.environment.cfsApi}/WMCTok`;return n||(n=new Promise(((e,i)=>{t.data.request(o,"POST",(t=>{n=null,t.fullXhttpResponse.status===a.STATUS_CODES.SUCCESS&&t.token?(r(t.token),e()):(console.error("Unable to retrieve WMCTok",t.fullXhttpResponse),i())}),this,null,null,null,null)}))),n},e.common.misApi.getToken=function(){return new Promise(((t,a)=>{const n=l();null!==n?t(n):e.common.misApi.requestToken().then((()=>{t(l())}),(()=>{void 0!==a&&a()}))}))},e.common.misApi.getHeaders=function(){const e=l();return null!==e?[{label:"x-media-mis-token",value:e}]:null},e.common.misApi.requestOnce=n=>{if(n.useAuthToken=n.useAuthToken??!0,!n.useAuthToken)return s(n);const{getToken:o}=e.common.misApi;return o().then((()=>s(n))).then((e=>{const{status:i}=e.fullXhttpResponse,{UNAUTHORIZED:r}=a.STATUS_CODES;return i!==r?e:(t.data.manager.remove(n),c(),o().then((()=>s(n))))}))},e.common.misApi.request=function(t,a){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e.common.misApi.getToken().then((()=>{i(t,n)}))};const i=function(n,i){const s=e.common.misApi.getHeaders();s||console.error("calling _requestData with no token");let r={target:e.common.misApi,...n,headers:s};r.callback=s=>{i>=10?clearTimeout(o):s.fullXhttpResponse.status===a.STATUS_CODES.UNAUTHORIZED?(t.data.manager.remove(r),c(),o&&clearTimeout(o),o=setTimeout((function(){e.common.misApi.request(n,null,i+1)}),3e4)):void 0!==n.callback&&(o&&clearTimeout(o),n.callback(s))},t.data.request(n.url,n.method??"GET",r.callback,e.common.misApi,null,n.data??null,s,null,!!n.isDataUrlEncoded)},s=a=>{let n=a.headers??[];if(a.useAuthToken){const t=e.common.misApi.getHeaders();t||console.error("calling _requestDataOnce with no token"),n=[...n,...t]}return new Promise((o=>{t.data.request(a.url,a.method??"GET",o,e.common.misApi,null,a.data??null,n,null,!!a.isDataUrlEncoded)}))},r=function(e){sessionStorage.setItem(a.MIS_API_TOKEN,e)},l=function(){const e=sessionStorage.getItem(a.MIS_API_TOKEN);return null!==e&&e.length>0?e:null},c=function(){sessionStorage.removeItem(a.MIS_API_TOKEN)}}(PULSE.app,PULSE.core,PULSE.app.common.CONSTANTS),function(e,t,a){a.numberHelper={},a.numberHelper.ordinalSuffix=e=>{const t=e,a=[t%10,t%100],n=["st","nd","rd","th"];return[1,2,3,4].includes(a[0])&&![11,12,13,14,15,16,17,18,19].includes(a[1])?t+n[a[0]-1]:t+n[3]}}(PULSE.app,PULSE.core,PULSE.app.common),function(e){e.objectHelper={},e.objectHelper.forEach=(e,t)=>{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&t(a,e[a])},e.objectHelper.clearEmptyObjectKeys=e=>{if(e)for(const t in e)0===e[t]?.length&&delete e[t]},e.objectHelper.getValueByKey=(t,a)=>{const n=a.split(".");if(t[n[0]]&&n.length>1){const a=n.splice(0,1);return e.objectHelper.getValueByKey(t[a[0]],n.join("."))}return t[n[0]]}}(PULSE.app.common),function(e,t,a,n){a.pulseId={};let o=!1;a.pulseId.fetchPulseId=function(n,o){const i={url:`${e.environment.api}players/idmap`,method:"GET",callback:e=>a.pulseId.getPulseIdObj(e,n,!0,o),target:this};t.data.request(i.url,i.method,i.callback,i.target)},a.pulseId.getPulseIdObj=function(e,t,a,o){a&&(localStorage.setItem("pulseIdObj",JSON.stringify(e.idMapResponse.ids)),document.dispatchEvent(new Event(n.EVENTS.PULSEID.RESOLVED)));const i=a?e.idMapResponse.ids[t]:e[t];return a?o(i):i},a.pulseId.getChampionId=function(e){let t;return new Promise(((i,s)=>{const r=localStorage.getItem("pulseIdObj");if(r){const a=JSON.parse(r);for(const[n,o]of Object.entries(a))if(o===e){t=n;break}i(t)}else o?document.addEventListener(n.EVENTS.PULSEID.RESOLVED,(()=>{const a=localStorage.getItem("pulseIdObj");if(a){const n=JSON.parse(a);for(const[a,o]of Object.entries(n))if(o===e){t=a;break}i(t)}else s(new Error("pulseIdObj not found in localStorage after event."))}),{once:!0}):(a.pulseId.fetchPulseId(e,(a=>{if(a){localStorage.setItem("pulseIdObj",JSON.stringify(a));for(const[n,o]of Object.entries(a))if(o===e){t=n;break}i(t)}else s(new Error("Failed to fetch pulseIdObj."))})),o=!0)}))}}(PULSE.app,PULSE.core,PULSE.app.common,PULSE.app.common.CONSTANTS),PULSE.app.common.prepareParams=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];for(let a in e)if(e.hasOwnProperty(a)){let n=e[a];if(void 0===n){console.warn(`Value for '${a}' in object 'params' was undefined. The key '${a}' has been omitted from the query string. Please be explicit with values, e.g. boolean or empty string`);continue}const o=[a,encodeURIComponent(n)];t.push(o.join("="))}return t.length>0?"?"+t.join("&"):""},function(e){e.regionHelper={},e.regionHelper.abbreviation=(e,t)=>{switch(e){case"Asia/Singapore":return"SGT";case"Pacific/Fiji":return"FJT";default:return t}}}(PULSE.app.common),function(e){void 0===e.security&&(e.security={}),e.security.sanitize=e=>e.replace(/(&|<|"|\/|>|\(|\)|;)/g,"")}(PULSE.app.common),function(e){e.siteSettings={},e.siteSettings.get=function(){const{store:e,selectors:t}=PULSE.app.redux;return t.siteSettings.get(e.getState())},e.siteSettings.getSingleSetting=function(e){const{store:t,selectors:a}=PULSE.app.redux;return a.siteSettings.getSingleSetting(t.getState(),e)},e.siteSettings.set=function(e){const{store:t,actions:a}=PULSE.app.redux;t.dispatch(a.siteSettings.set(e))},e.siteSettings.subscribe=function(e){PULSE.app.redux.watch(["siteSettings"],e)}}(PULSE.app.common),function(e,t){t.styleHelper={};const a=(t,a,n)=>{if(!t)return console.warn(`No "target" provided, instead received ${t}`);const o=e.style[`${n}Class`];NodeList.prototype.isPrototypeOf(t)||Array.isArray(t)?t.forEach((e=>{Array.isArray(a)?a.forEach((t=>{o(e,t)})):o(e,a)})):Array.isArray(a)?a.forEach((e=>{o(t,e)})):o(t,a)};t.styleHelper.addClass=(e,t)=>{a(e,t,"add")},t.styleHelper.removeClass=(e,t)=>{a(e,t,"remove")}}(PULSE.core,PULSE.app.common),function(e){e.team={},e.team.mapPositions=function(e){const t={FB:[],HB:[],C:[],HF:[],FF:[],FOL:[],IC:[],EMERG:[],SUB:[]};return e.forEach((e=>{switch(e.position){case"BPL":case"BPR":case"FB":t.FB.push(e);break;case"HBFL":case"HBFR":case"CHB":t.HB.push(e);break;case"WL":case"WR":case"C":t.C.push(e);break;case"HFFL":case"HFFR":case"CHF":t.HF.push(e);break;case"FPL":case"FPR":case"FF":t.FF.push(e);break;case"RK":case"RR":case"R":t.FOL.push(e);break;case"INT":t.IC.push(e);break;case"EMERG":t.EMERG.push(e);break;case"SUB":t.SUB.push(e);break;default:console.warn("Position not mapped",e)}})),t},e.team.checkForSub=e=>e.find((e=>"SUB"===e.position)),e.team.getTeamAbbr=t=>{const a=e.CONSTANTS.TEAM_ABBR[t];return a?a.toLowerCase():null},e.team.getTeamWatermarkUrl=function(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"left-dark";const n=e.team.getTeamAbbr(t);return n?`${PULSE.app.environment.watermarksPath}${n}-${a}.png`:""},e.team.getTeamLogoTheme=function(e,t){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"light";return e.toLowerCase().includes("wce")&&(n=a?"":t),n},e.team.getTeamsWithDefaultThemeOnly=()=>["ess","melb","port","csy","cdfc","nbul","sand","pm","pmfc","ssfc","san","wpfc","cfc","sfc","sffc","epfc","ptfc","pfc","effc","efc","asp","nofc","ade","sadel","nadel","wwt","cent","wadel","sturt","glen","norw"],e.team.getStateLeagueTeams=()=>["sffc","wpfc","wfc","epfc","pfc","frank","sand","ptfc","dfc","asp","cob","effc","sdfc","fts","nbul","wil","sfc","pm","pmfc","bh","csy","cdfc","ssfc","san","stp","cfc","werr","nofc","ade","sadel","nadel","wwt","cent","wadel","sturt","glen","norw"],e.team.getClubTeamProviderIds=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return PULSE.app.common.CONSTANTS.TEAM_PROVIDER_IDS[e.replace("aflc-","")]}}(PULSE.app.common),function(e){e.template={},e.template.cleanString=function(e){return _.escape(JSON.stringify(e||""))},e.template.getNumberWithCommas=function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},e.template.camelize=function(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(function(e,t){return 0===t?e.toLowerCase():e.toUpperCase()})).replace(/\s+/g,"")},e.template.getSourceConfig=function(e){let t="";t=e.variantUrls.length>1?`${e.variantUrls.join(", ")} 2x`:e.variantUrls.join("");let a=[];return void 0!==e.minWidth&&a.push(`(min-width: ${e.minWidth}px)`),void 0!==e.maxWidth&&a.push(`(max-width: ${e.maxWidth}px)`),{srcset:t,mediaQuery:a.join(" and ")}},e.template.formatTitle=function(e){let t=e;if(-1===t.indexOf("|")){let e=t.split(" ");return e[0]=`${e[0]}`,e.join(" ")}t.split("|").length%2==0&&(t+="|");const a=e.match(/(\|)([^|]+)(\|)/g);return a&&a.forEach((e=>{let a=`${e.substring(1,e.length-1)}`;t=t.split(e).join(a)})),t},e.template.pluralise=function(e,t,a,n){return(n?e+" ":"")+("1"===e.toString()?t:a)},e.template.separateCharacters=function(e,t){let a="";if(void 0!==e){let n=e.toString().split(""),o=t||"";for(let e=0;e'+n[e]+""}return a},e.template.getTeamThemeClass=e=>e?`theme--aflc-${e?.toLowerCase()}`:""}(PULSE.app.common),function(e,t,a){a.url={},a.url.createContentPath=function(a,n,o,i){let s=a?a.toLowerCase()+"/":"",r=t.environment.aflApi+"content/"+t.account+"/"+s+(o||t.defaultLanguage)+"/"+(i||"");return n&&(r+="?"+e.url.buildQueryString(n)),r},a.url.contains=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return window.location.pathname.split("/").slice(1,1+t).includes(e)},a.url.generateUrl=function(e){if(e.hotlinkUrl)return e.hotlinkUrl;let n="//"+t.environment.domain;const o=e.type?.toLowerCase(),i=e.titleUrlSegment?e.titleUrlSegment:a.url.urlify(e.title);let s;switch(e.tags?.find((e=>"AFLClubExclusive:Yes"===e.label))&&(n+="/exclusive"),o){case"text":return s="/news/",e.tags&&e.tags.length>0&&e.tags.forEach((e=>{"feature-article"===e.label&&(s="/featured/")})),n+=s+`${e.id}/${i}`,n;case"video":return n+=`/video/${e.id}/${i}?videoId=${e.id}&modal=true&type=video`,e.playlistId?n+=`&playlistId=${e.playlistId}`:n+=`&publishFrom=${e.publishFrom+1}`,n;case"playlist":return e.typeRestriction&&"photo"===e.typeRestriction.toLowerCase()&&(n+=`/albums/${e.id}/${i}?modal=true&type=gallery&playlistId=${e.id}&playlistSize=${e.items.length}`),n;case"photo":return n+=`${a.url.generateUrl(e.playlist)}/${e.id}/`,e.description&&(n+=a.url.urlify(e.description)),n;default:return""}},a.url.getMatchURL=function(e,t){return e?`/matches/${e}${void 0!==t?`#${a.url.urlify(t)}`:""}`:null},a.url.getPlayerProfileURL=function(e){return e?`${window.STATS_PLAYERS_URL}?playerId=${e}`:null},a.url.getCompareURL=function(e,t){return`${window.STATS_COMPARE_PLAYER_URL}?playerOneId=${e}${void 0!==t?`&playerTwoId=${t}`:""}`},a.url.getStatsLeadersURL=function(e,t,n){return e?`${window.STATS_LEADERS_URL}?category=${a.statsMap[e].category}&seasonId=${t}&sortColumn=${a.statsMap[e].column}${n&&"&dataType="+n}`:null},a.url.getMatchRadioURL=e=>`//${t.environment.domain}/matches/${e}/radio`,a.url.prepareParams=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];for(let a in e)if(e.hasOwnProperty(a)){let n=e[a];if(void 0===n){console.warn(`Value for '${a}' in object 'params' was undefined. The key '${a}' has been omitted from the query string. Please be explicit with values, e.g. boolean or empty string`);continue}const o=[a,encodeURIComponent(n)];t.push(o.join("="))}return t.length>0?"?"+t.join("&"):""},a.url.urlify=function(e){return e.toLowerCase().replace(/[^a-z0-9]+/gi,"-").replace(/-{2,}/g,"-").replace(/^-|-$/g,"")},a.url.checkBaseRoute=function(e){return window.location.pathname.split("/")[1]===e},a.url.isExternalUrl=e=>{try{const t=new URL(window.location.href),a=new URL(e);return t.protocol!==a.protocol||t.host!==a.host||t.port!==a.port}catch{return!1}}}(PULSE.core,PULSE.app,PULSE.app.common),function(e){const t=100;e.videoHelpers={},e.videoHelpers.addPipButton=function(e,t){const a=e.querySelector(".vjs-control-bar"),n=e.querySelector(".vjs-fullscreen-control");if(a.querySelector(".vjs-picture-in-picture-control"))return;const o=document.createElement("button");o.classList.add("vjs-picture-in-picture-control","vjs-control","vjs-button"),o.title="Picture-in-Picture";const i=document.createElement("span");i.classList.add("vjs-icon-placeholder"),i.setAttribute("aria-hidden",!0),o.appendChild(i);const s=document.createElement("span");s.classList.add("vjs-control-text"),s.setAttribute("aria-live","polite"),o.appendChild(s),o.addEventListener("click",(()=>{t.requestPictureInPicture()})),a.insertBefore(o,n)},e.videoHelpers.addCueMarkers=function(e,a){a.on("ads-load",(function(){const n=a.ima3.adsManager.getCuePoints(),o=n?.filter((e=>0!==e));if(!o?.length)return;const i=e.querySelector(".vjs-progress-holder"),s=o.map((e=>function(e,a){const n=a.duration();if(!e||!n)return null;const o=e/n*t;if(o>=t)return null;const i=document.createElement("div");return i.classList.add("vjs-play-progress","custom-cue-marker"),i.setAttribute("aria-hidden","true"),i.style.left=`${o}%`,i}(e,a))).filter((e=>!!e));s.forEach((e=>{i.appendChild(e)}))}))}}(PULSE.app.common),PULSE.app.common.PulselivePlayerManager=class{constructor(){this.instanceSet=new Set,this.scripts={}}createInstance(e,t,a,n){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[];const i={id:e,videoId:a,videoContainer:t,container:n,additionalProperties:arguments.length>4&&void 0!==arguments[4]?arguments[4]:{}};return(arguments.length>5?arguments[5]:void 0).call(i,(function(){o.forEach((e=>{e.call(this)}))})),this.instanceSet.add(i),i}instanceExists(e){return this.instanceSet.has(e)}loadScript(e){return new Promise(((t,a)=>{if(this.scripts[e])return void(this.scripts[e].loaded?(console.warn(`Attempted to load duplicate video script src ${e}. Script already loaded.`),t()):(console.warn(`Attempted to load duplicate video script src ${e}. Script not yet loaded.`),this.scripts[e].promises.push(t)));this.scripts[e]={loaded:!1,promises:[t]};const n=document.createElement("script");n.src=e,n.onerror=()=>this.scripts.delete(e),n.onload=()=>{this.scripts[e].loaded=!0,this.scripts[e].promises.forEach((e=>e()))},document.body.appendChild(n)}))}},function(e,t,a){e.trailerManager=new class{constructor(){this.trailers=new Set,this.activeTrailers=new Set,this.playingTrailerId=null,this.playingTrailerCounter=1,this.index=0,this.playedTrailers=[],this.modalOpen=!1,this.setupGlobalEvents()}addTrailer(e){e.index=this.index,this.trailers.add(e),0===e.index?this.createObserver(e):setTimeout((()=>{this.createObserver(e)}),100),this.index++,this.setupTrailerEvents(e)}setupTrailerEvents(e){const a=e.container?.closest(".js-tracking-link")?.querySelector("a");a?.addEventListener("click",(()=>{t.tracking.recordEvent("content_interaction",{interaction:"click",component:e.container.dataset.trackingName},"video thumbnail")}))}setupGlobalEvents(){document.body.addEventListener(a.EVENTS.VIDEO_MODAL.PLAYER_READY,(()=>{this.modalOpen=!0;let e=Array.from(this.activeTrailers).find((e=>e.id===this.playingTrailerId));e&&this.stopTrailer(e)})),document.body.addEventListener(a.EVENTS.VIDEO_MODAL.CLOSE,(()=>{this.modalOpen=!1,this.startPlayingActiveTrailers()}))}removeTrailer(e){this.observer.unobserve(e.container),this.activeTrailers.has(e)&&this.removeFromActiveTrailers(e),this.trailers.remove(e)}createObserver(e){const t={rootMargin:`-${document.querySelector(".js-main-navigation")?.clientHeight||0}px 0px 0px 0px`};this.observer=new IntersectionObserver((t=>this.handleIntersect(t,e)),t),this.observer.observe(e.container)}handleIntersect(e,t){e.forEach((e=>{e.intersectionRatio>0?this.addToActiveTrailers(t):this.removeFromActiveTrailers(t)}))}addToActiveTrailers(e){this.activeTrailers.add(e),this.activeTrailers=this.sortTrailers(),1!==this.activeTrailers.size||this.playingTrailerId||this.startPlayingActiveTrailers()}removeFromActiveTrailers(e){if(this.activeTrailers.delete(e),this.activeTrailers=this.sortTrailers(),e.id===this.playingTrailerId&&(this.stopTrailer(e),this.playingTrailerCounter=1,this.activeTrailers.size>0)){const e=this.getActiveTrailerByCounter(this.playingTrailerCounter);e&&this.playTrailer(e)}}startPlayingActiveTrailers(){const e=this.getActiveTrailerByCounter(this.playingTrailerCounter);this.playTrailer(e)}nextTrailer(){this.sortTrailers(),this.playingTrailerCounter>=this.activeTrailers.size?this.playingTrailerCounter=1:this.playingTrailerCounter++;const e=this.getActiveTrailerByCounter(this.playingTrailerCounter);e&&this.playTrailer(e)}playTrailer(e){this.modalOpen||setTimeout((()=>{this.playingTrailerId=e.id,e.player.play(),this.playedTrailers.includes(e.id)||(t.tracking.recordEvent("content_interaction",{component:e.container.dataset.trackingName?e.container.dataset.trackingName:"",interaction:"impression",videoId:e.container.dataset.trackingId?e.container.dataset.trackingId:null},"video thumbnail"),this.playedTrailers.push(e.id))}),[1e3])}stopTrailer(e){this.playingTrailerId=null,e.player.pause();const t=parseInt(e.container.dataset.trailerStart)||0;e.player.currentTime(parseInt(t,10))}getActiveTrailerByCounter(e){return[...this.activeTrailers][e-1]}sortTrailers(){return new Set(Array.from(this.activeTrailers).sort(((e,t)=>e.index-t.index)))}}}(PULSE.app.common,PULSE.app,PULSE.app.common.CONSTANTS),PULSE.app.common.middlewares={},function(e,t){e.middlewares.brightcoveAds=function(){const a=document.querySelector('meta[property="video:ad-tag-url"]');videojs(this.id).ready((()=>{if(a&&a.getAttribute("content")&&this.player?.ima3?.settings){let e=new URL(a.getAttribute("content"));const t=this.player.mediainfo.id?this.player.mediainfo.id:this.player.mediainfo.referenceId;t&&(e.searchParams.set("vid",t),this.player.ima3.settings.serverUrl=e.toString())}videojs(this.id).on("ads-ad-ended",(function(){this.ima3.adControlBar?.el_.classList.add(t.U_HIDE)})),videojs(this.id).on("ads-ad-started",(function(){this.ima3.adControlBar?.el_.classList.remove(t.U_HIDE)})),videojs(this.id).on("ads-pause",(function(){e.event.dispatch(t.EVENTS.VIDEO.PAUSE,{},document.body)})),videojs(this.id).on("ads-play",(function(){e.event.dispatch(t.EVENTS.VIDEO.PLAY,{},document.body)}))}))}}(PULSE.app.common,PULSE.app.common.CONSTANTS),function(e,t){let a;e.middlewares.brightcoveEvents=function(){this.player.ready((()=>{this.player.on("play",(()=>{if(this?.additionalProperties?.exclusiveUrl){if(!PULSE.app.authentication.isUserAuthenticated())return document.querySelector(`#${this.id}`)&&videojs(this.id).dispose(),void(location.href=this?.additionalProperties?.exclusiveUrl)}this.playWhenReady=!0,e.event.dispatch(t.EVENTS.VIDEO.PLAY,{},document.body),e.event.dispatch(t.EVENTS.VIDEO.OVERLAY,{videoUniqueId:this.videoUniqueId,showOverlay:!1},document.body),this.timeout&&clearTimeout(this.timeout)})),this.player.on("pause",(()=>{e.event.dispatch(t.EVENTS.VIDEO.PAUSE,{},document.body),n.call(this)})),this.player.on("ended",(function(){e.event.dispatch(t.EVENTS.VIDEO.END,{},document.body)})),this.player.on("useractive",(function(){e.event.dispatch(t.EVENTS.VIDEO.USER_ACTIVE,{},document.body)})),this.player.on("userinactive",(function(){e.event.dispatch(t.EVENTS.VIDEO.USER_INACTIVE,{},document.body)})),this.player.on("fullscreenchange",(function(){e.event.dispatch(t.EVENTS.VIDEO.FULL_SCREEN,{},document.body),o.call(this)}))}))};const n=function(){clearTimeout(this.timeout),this.timeout=setTimeout((()=>{this.player.paused()?e.event.dispatch(t.EVENTS.VIDEO.OVERLAY,{videoUniqueId:this.videoUniqueId},document.body):clearTimeout(this.timeout)}),1e4)},o=function(){e.deviceHelper.isAndroidTouchScreen()&&(this.isFullscreen()?a=window.scrollY:a&&window.scrollTo(0,a))}}(PULSE.app.common,PULSE.app.common.CONSTANTS),function(e,t,a){const n="showing",o="captions",i="video-captions-preference";e.middlewares.brightcoveInit=function(e){const s=document.querySelector('meta[property="video:ad-tag-url"]'),r=this;if(r.captionLanguage=!1,!this.id)return void e.call(r);bc(this.id).ready((function(){r.player=this.player(),s&&s.getAttribute("content")&&this.player?.()?.ima3?.settings&&(this.player().ima3.settings.serverUrl=s.getAttribute("content")),this.player().on("ads-ad-ended",(function(){this.player().ima3.adControlBar?.el_.classList.add(t.U_HIDE)})),this.player().on("ads-ad-started",(function(){this.player().ima3.adControlBar?.el_.classList.remove(t.U_HIDE)})),r.player.on("loadedmetadata",(()=>{const e=r.player.textTracks().tracks_.find((e=>e.kind===o&&e.language===a.localStorage.getStorage(i)));e&&(e.mode=n),r.player.off("texttrackchange",l),r.player.on("texttrackchange",l)})),e.call(r)}));const l=_.debounce((()=>{const e=this.player.textTracks().tracks_.find((e=>e.kind===o&&e.mode===n)),t=!!e&&e.language;this.captionLanguage!==t&&(a.localStorage.setStorage(i,t),this.captionLanguage=t)}),250)}}(PULSE.app.common,PULSE.app.common.CONSTANTS,PULSE.core),function(e){e.middlewares.cueMarkers=function(){this.player.ready((()=>{e.videoHelpers.addCueMarkers(this.videoContainer,this.player)}))}}(PULSE.app.common),function(e){e.middlewares.pipButton=function(){document.pictureInPictureEnabled&&this.player.ready((()=>{e.videoHelpers.addPipButton(this.videoContainer,this.player)}))}}(PULSE.app.common),function(e,t,a,n){const o=[-2,4,"VIDEO_CLOUD_ERR_VIDEO_NOT_PLAYABLE"];t.middlewares.playAdhocModal=function(){this.playerContainer=this.container.querySelector(".js-video-container");const i=this.container.querySelector(".js-start-button");this.player.ready((()=>{this.player.play(),this.playerContainer.classList.add(a.IS_ACTIVE),i&&t.addAriaClickListener(i,(()=>{n.style.addClass(this.playerContainer,a.IS_ACTIVE),this.player.play()})),this.player.on("error",(()=>{const t=this.player.duration();o.find((e=>e===this.player.error().code))&&(0===t||Number.isNaN(t)||t===1/0)&&(videojs(this.player.tech_.el_.id).dispose(),this.playerContainer.insertAdjacentHTML("afterbegin",e.templating.render({},"common.video-modal-stream-ended")))}))}))}}(PULSE.app,PULSE.app.common,PULSE.app.common.CONSTANTS,PULSE.core),function(e,t){const a=[-2,4,"VIDEO_CLOUD_ERR_VIDEO_NOT_PLAYABLE"];t.middlewares.playLiveStream=function(){this.player.ready((()=>{this.currentSrc=this.player.src(),this.player.on("error",(()=>{const t=this.player.duration();a.find((e=>e===this.player.error().code))&&(0===t||Number.isNaN(t)||t===1/0)&&(videojs(this.player.tech_.el_.id).dispose(),this.playerContainer.insertAdjacentHTML("afterbegin",e.templating.render({},"common.video-modal-stream-ended")))}))}))}}(PULSE.app,PULSE.app.common),function(e,t,a,n){const o="is-hidden",i="u-hide",s="show-overlay",r="expand-items",l="overlay-active";t.middlewares.bindEvents=function(){const c=this.container.parentElement,d=this.videoId,m=this.videoUniqueId??d+t.getRandomIntInclusive(1,999),u=c.querySelector(".js-video-player"),p=c.querySelector(".js-video-container"),h=c.querySelector(".js-video-pause"),S=c.querySelector(".js-video-play"),f=c.querySelector(".js-start-button"),g=c.parentElement.querySelector(".js-cover-image");this.player.ready((()=>{this.playerContainer=u,this.videoContainer=p,this.videoPauseBtn=h,this.videoPlayBtn=S,this.playButton=f,this.coverImageContainer=g,this.videoId=d,this.videoUniqueId=m;const c=this.playerContainer.getAttribute("loop");if(null!==this.playerContainer&&null!==this.videoPauseBtn)if(n.style.removeClass(this.videoPauseBtn,i),"true"!==c){this.player.on("loadedmetadata",(()=>{if(this.player.qualityLevels){let t=this.player.qualityLevels();if(t)for(let a=0;a{this.player.currentTime(0)}),17e3);this.player.on("ima3-started",(()=>{n.style.addClass(this.videoPauseBtn,i)})),this.player.on("ima3-complete",(()=>{clearInterval(o),o=setInterval((()=>{this.player.currentTime(0)}),17e3),n.style.removeClass(this.videoPauseBtn,i)})),t.addAriaClickListener(this.videoPauseBtn,(()=>{this.player.pause(),n.style.addClass(this.videoPauseBtn,i),n.style.removeClass(this.videoPlayBtn,i),this.coverImageContainer&&n.style.addClass(this.coverImageContainer,s)})),this.player.on("loadedmetadata",(()=>{this.coverImageContainer&&n.style.removeClass(this.coverImageContainer,s),this.player.play(),n.style.addClass(this.videoContainer,a.IS_ACTIVE)}))}else this.player.on("loadedmetadata",(()=>{this.coverImageContainer&&n.style.removeClass(this.coverImageContainer,s),this.player.play(),n.style.addClass(this.videoContainer,a.IS_ACTIVE)})),t.addAriaClickListener(this.videoPauseBtn,(()=>{this.player.pause(),n.style.addClass(this.videoPauseBtn,i),n.style.removeClass(this.videoPlayBtn,i),this.coverImageContainer&&n.style.addClass(this.coverImageContainer,s)})),n.style.removeClass(this.videoPauseBtn,o),this.player.on("ima3-started",(()=>{n.style.addClass(this.videoPauseBtn,o)})),this.player.on("ima3-complete",(()=>{n.style.removeClass(this.videoPauseBtn,o)}));else if(null!==this.playerContainer&&null!==this.playButton){const e=this,n=t=>{e.playButton.classList.toggle(i,!t),e.coverImageContainer&&e.coverImageContainer?.classList.toggle(s,t),e.container.classList.toggle(r,!t),e.videoContainer.classList.toggle(a.IS_ACTIVE,!t),e.container.classList.toggle(l,t)};t.addAriaClickListener(e.playButton,(()=>{e.player.play(),n(!1)})),document.body.addEventListener(t.CONSTANTS.EVENTS.VIDEO.OVERLAY,(t=>{t.detail.videoUniqueId===e.videoUniqueId&&n(t.detail.showOverlay??!0)}))}}))}}(PULSE.app,PULSE.app.common,PULSE.app.common.CONSTANTS,PULSE.core),function(e,t,a){e.middlewares.videoClose=function(){const n=this.container.querySelector(".js-close-button"),o=document.querySelector('meta[property="video:ad-tag-url"]');videojs(this.id).ready((()=>{n&&e.addAriaClickListener(n,(()=>{if(a.style.removeClass(this.container,t.IS_ACTIVE),this.player.pause(),this.player.reset(),this.reset=!0,o&&o.getAttribute("content")&&this.player.ima3&&void 0!==this.player.ima3.adPlayer){let e=this.player.ima3.adPlayer;e.duration()>0&&(e.pause(),e.options_&&e.options_.contentPlayer&&e.options_.contentPlayer.reset&&e.options_.contentPlayer.reset())}e.event.dispatch(t.EVENTS.VIDEO.CLOSE,{},document.body)}))}))}}(PULSE.app.common,PULSE.app.common.CONSTANTS,PULSE.core),function(e,t){e.middlewares.videoFullscreen=function(){this.player.on("fullscreenchange",(()=>{e.event.dispatch(t.EVENTS.VIDEO.FULLSCREEN_CHANGE,{player:this.player},document.body)}))}}(PULSE.app.common,PULSE.app.common.CONSTANTS),function(e,t,a,n){const o="common.lazy-image",i="common.video-modal-all-items",s="common.video-modal-description",r=[{name:"thumbnailMobile",maxWidth:640,size:{width:120},multipliers:[1,2,3]},{name:"thumbnailDesktop",minWidth:641,size:{width:160},multipliers:[1,2,3]},{name:"default",size:{width:160},multipliers:[1]}],l={USER_ACTIVE:"user-active",USER_INACTIVE:"user-inactive",OVERLAY_ACTIVE:"overlay-active",HAS_SPONSOR:"has-sponsor",VIDEO_FULLSCREEN:"video-fullscreen"};t.middlewares.videoModal=function(){this.videoModal=this.additionalProperties.videoModal,this.mediaId=k.call(this,this.videoModal),this.videoId=R.call(this,this.videoModal),this.videoUniqueId=this.videoUniqueId??this.videoId+t.getRandomIntInclusive(1,999),this.policyKey=this.container.dataset.policyKey,this.playerId=this.container.dataset.playerId,this.policyKeyRestricted=this.container.dataset.policyKeyRestricted,this.playerIdRestricted=this.container.dataset.playerIdRestricted,this.accountId=this.container.dataset.accountId,this.modalContent=this.container.querySelector(".js-modal-content"),this.descriptionContainer=this.container.querySelector(".js-description-container"),this.videoModalSidebar=this.container.querySelector(".js-sidebar-container"),this.videoModalSidebarWrapper=this.container.querySelector(".js-sidebar-wrapper"),n.style.removeClass(this.videoModalSidebarWrapper,"u-hide"),this.pageSize=this.container.dataset.pageSize,this.muted=!1,this.firstRender=!0;const a="true"===this?.videoModal?.config?.current?.uiArgs?.isExclusive;if(this.isLoggedIn=e.authentication.isUserAuthenticated(),a&&!this.isLoggedIn)return e.VideoPlayerModal.close(),void(location.href=this.videoModal.config.current.uiArgs.link);this.autoplay="false"!==n.localStorage.getStorage("autoplay"),null===this.autoplay&&(this.autoplay=!0,n.localStorage.setStorage("autoplay",this.autoplay)),u.call(this);new URL(window.location.href).searchParams.get("modal")?h.call(this):p.call(this)};const c=function(){const e=this,o=()=>{O.call(this,e.nextItem,e.autoplay)},i=document.querySelector('meta[property="video:ad-tag-url"]');if(i&&i.getAttribute("content")&&this.player?.ima3?.settings){let e=new URL(i.getAttribute("content"));const t=this.player.mediainfo.id?this.player.mediainfo.id:this.player.mediainfo.referenceId;t&&(e.searchParams.set("vid",t),this.player.ima3.settings.serverUrl=e.toString())}this.player.on("ads-ad-ended",(function(){this.ima3.adControlBar.el_.classList.add(a.U_HIDE)})),this.player.on("ads-ad-started",(function(){this.ima3.adControlBar.el_.classList.remove(a.U_HIDE),n.style.addClass(e.container.querySelector(".js-video-container"),a.IS_ACTIVE)})),this.player.on("play",(()=>{e.firstPlay=!1,n.style.addClass(e.container,a.IS_ACTIVE),n.style.addClass(e.container.querySelector(".js-video-container"),a.IS_ACTIVE),n.style.removeClass(e.container,l.OVERLAY_ACTIVE)})),this.player.on("pause",(()=>{d.call(this)})),this.player.on("ended",(function(){o.call(e)})),this.player.on("useractive",(function(){n.style.addClass(e.container,l.USER_ACTIVE),n.style.removeClass(e.container,l.USER_INACTIVE)})),this.player.on("userinactive",(function(){n.style.addClass(e.container,l.USER_INACTIVE),n.style.removeClass(e.container,l.USER_ACTIVE)})),this.player.on("fullscreenchange",(function(){e.firstRender&&(document.ontouchmove=e=>e.preventDefault(),e.firstRender=!1),e.player.isFullscreen()?(t.deviceHelper.isIOSTouchScreen()&&(document.ontouchmove=e=>e.preventDefault()),n.style.addClass(document.body,"video-fullscreen")):(t.deviceHelper.isIOSTouchScreen()&&(document.ontouchmove=()=>!0),n.style.removeClass(document.body,"video-fullscreen")),n.style.addClass(e.container,l.OVERLAY_ACTIVE)}))},d=function(){clearTimeout(this.timeout),this.timeout=setTimeout((()=>{this.player.paused()?t.event.dispatch(a.EVENTS.VIDEO.OVERLAY,{videoUniqueId:this.videoUniqueId},document.body):clearTimeout(this.timeout)}),1e4)},m=function(){const e=this;let o=this.mediaId;o.includes("ref:")&&(o=o.replace("ref:","")),this.playerName=`aflm-modal-video-player_${o}`,bc(this.playerName).ready((function(){const o=e.container.querySelector(".js-start-button");e.player=this.player(),c.call(e),o&&(t.addAriaClickListener(o,(()=>{n.style.addClass(e.container,a.IS_ACTIVE),n.style.addClass(e.container.querySelector(".js-video-container"),a.IS_ACTIVE),e.player.play()})),document.body.addEventListener(t.CONSTANTS.EVENTS.VIDEO.OVERLAY,(a=>{a.detail.videoUniqueId===this.videoUniqueId&&(n.style.removeClass(o,l.U_HIDE),n.style.removeClass(e.container.querySelector(".js-video-container"),t.CONSTANTS.IS_ACTIVE))}))),e.player.on("loadedmetadata",(()=>{e.autoplay&&e.player.play()})),t.event.dispatch(a.EVENTS.VIDEO_MODAL.PLAYER_READY,{player:e.player},document.body),document.pictureInPictureEnabled&&t.videoHelpers.addPipButton(e.container,e.player),t.videoHelpers.addCueMarkers(e.container,e.player)}));const i=()=>{w.call(e),M.call(this,!1)};document.body.removeEventListener(a.EVENTS.VIDEO_MODAL.CLOSE,i),document.body.addEventListener(a.EVENTS.VIDEO_MODAL.CLOSE,i)},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new URL(window.location.href);let a=""!==e?e:this.videoModal.config.current?this.videoModal.config.current.uiArgs.link:window.location.href;t.searchParams.get("tagNames")&&(a+=`&tagNames=${t.searchParams.get("tagNames")}`),t.searchParams.get("references")&&(a+=`&references=${t.searchParams.get("references")}`);const n=new URL(location.protocol+a);"localhost"===n.hostname&&(n.port=1896,a=n.toString()),history.replaceState({},{},a)},p=function(){if(!this.videoId){window.location.pathname.split("/").forEach((e=>{parseInt(e)&&(this.videoId=parseInt(e))}))}const t={url:e.common.url.createContentPath("video",{},"en",this.videoId),method:"GET",callback:h.bind(this),target:this},a=e.authentication.getAuthHeader();n.data.request(t.url,t.method,t.callback,t.target,null,null,a?[a]:null)},h=function(t){const a=F.call(this,t);this.videoData=t;const o={url:a.endpoint,method:"GET",callback:S.bind(this),target:this},i=e.authentication.getAuthHeader();n.data.request(o.url,o.method,o.callback,o.target,null,null,i?[i]:null)},S=function(e){e&&(this.data=e.content||e.items,this.originalPageTitle=document.title,f.call(this)&&g.call(this),U.call(this),this.currentItem||this.videoData?(y.call(this),E.call(this),M.call(this,!0,this.currentItem)):p.call(this))},f=function(){return this.videoModal?.config?.current?.activator?.classList.contains("js-header-button")},g=function(){const e=v(this.data);this.data=_(e)},y=function(){let t=D.call(this,this.currentItem,a.VARIANT_CONFIGURATIONS.GALLERY_MODAL);t.date=moment.utc(t.date).tz(moment.tz.guess()).format("lll"),C.call(this,t),this.descriptionContainer.innerHTML=e.templating.render(t,s),x.call(this),n.style.removeClass(this.modalContent,"is-loading")},E=function(){const n=this;let o={};const s=a.VARIANT_CONFIGURATIONS.GALLERY_MODAL,r=a.VARIANT_CONFIGURATIONS.GALLERY_MODAL_PORTRAIT,l=parseInt(this.videoId),c=T(this.nextItem,l);o.nextItem=c&&L(c,s);const d=A(this.data,l,o.nextItem.id);o.items=d.map((e=>{const a=e.response||e;let n=t.content.isPortrait(a)?r:s;return{data:L(a,n)}})),this.videoModalSidebar.innerHTML=o.items&&Object.keys(o.items).length>0||o.nextItem&&Object.keys(o.nextItem).length>0?e.templating.render(o,i):b.call(this),P.call(this),x.call(this),setTimeout((function(){new e.LazyLoad(n.videoModalSidebar)}));const m=document.getElementById("VideoModal");t.focusContainer.addListener(m)},T=(e,t)=>e.id!==t&&e,A=(e,t,a)=>e.filter((e=>e.id!==a&&e.id!==t)),_=e=>(e.sort(((e,t)=>{const a=e.tags.some((e=>"ProgramCategory:Press Conference"===e.label)),n=t.tags.some((e=>"ProgramCategory:Press Conference"===e.label));return a&&!n?-1:!a&&n?1:e.date.localeCompare(t.date)})),e),v=e=>e.filter((e=>e.references.some((e=>"AFL_MATCH"===e.type)))),b=function(){n.style.addClass(this.videoModalSidebarWrapper,"u-hide")},L=(a,n)=>{const i=t.content.isPortrait(a);return{...t.content.getContentModel(a,n),lazyImage:e.templates[o],objectFit:!0,contentType:a.type,isPortrait:i,cssClass:i?"is-portrait":""}},C=function(t){this.mediaId=t.mediaId,this.contentSponsorLabels=[];const a={contentId:t.id,date:moment.utc(t.date).tz(moment.tz.guess()).format("lll"),description:t.description,mediaId:t.mediaId,videoPlayerId:t.mediaId,title:t.title,playlistSize:this.data.items?this.data.items.length:0,subtitle:t.subtitle,accountId:this.accountId,muted:this.muted,policyKey:this.policyKey,playerId:this.playerId,mediaQueryConfig:t.mediaQueryConfig,cssClass:"",objectFit:t.objectFit,isExclusive:!!t.tags.find((e=>"AFLClubExclusive:Yes"===e.label)),link:t.link};if(t.tags&&t.tags.length>0&&t.tags.forEach((e=>{e.label.startsWith("Premium:")&&(a.policyKey=t.policyKeyRestricted,a.playerId=t.playerIdRestricted)})),"video"===t.type&&"OOYALA"===t.platform&&(a.mediaId=`ref:${a.mediaId}`),t.related.length){const o=t.related.filter((e=>"PROMO"===e.type));o.length&&o.forEach((t=>{const o={url:e.common.url.createContentPath("promo",{},"en",t.sid),method:"GET",callback:I.bind(this,a),target:this};n.data.request(o.url,o.method,o.callback,o.target)}))}else I.call(this,a)},I=function(a,o){const i=this;if(a.isExclusive&&!this.isLoggedIn)return e.VideoPlayerModal.close(),void(location.href=a.link);if(i.contentSponsorLabels.includes("content-sponsor"))return;i.videoWrapper=i.container.querySelector(".js-video-wrapper"),a.promo=!1,o?(o.tags.forEach((e=>{i.contentSponsorLabels.push(e.label)})),a.promoImage=t.content.getImageFromContentItem(o),a.promo={cssClass:"video-modal__sponsor-image",objectFit:!1,url:a.promoImage.imageUrl,title:o.title,mediaQueryConfig:r},n.style.addClass(i.videoWrapper,l.HAS_SPONSOR)):n.style.removeClass(i.videoWrapper,l.HAS_SPONSOR),a.autoplay=!1;i.videoWrapper.innerHTML=e.templating.render(a,"common.video-modal-inline-player"),N.call(this),m.call(this),setTimeout((function(){new e.LazyLoad(i.videoWrapper)}))},P=function(){const e=this;[].slice.call(e.container.querySelectorAll(".js-video-sidebar-item")).forEach(((a,n)=>{t.addAriaClickListener(a,(t=>{t.preventDefault();const o=this.container.querySelectorAll(".media-thumbnail__absolute-link").length,i=a.querySelector(".media-thumbnail__absolute-link");i.title=i.getAttribute("aria-label"),i.setAttribute("data-index-position",n),i.contentType=PULSE.app.common.CONSTANTS.TRACKING.CONTENT_TYPES.VIDEO,PULSE.app.tracking.trackCardClicks(this.container,i,o),e.container.querySelector(".modal__inner-wrapper").scrollTo(0,0),O.call(e,a.firstElementChild.dataset.contentId,!0,!0)}))}))},U=function(e){const t=e?parseInt(e):parseInt(this.videoId);let a;e&&(this.videoId=t),this.currentItem=this.data.find(((e,n)=>(a=n+1,e.id===t||e.response===t))),this.currentItem?this.currentItem=this.currentItem.response||this.currentItem:this.videoData&&(this.currentItem=this.videoData.response||this.videoData,a=1),this.nextItem=a{e.stopPropagation(),this.autoplay=e.target.checked,this.playUpNext=this.autoplay,n.localStorage.setStorage("autoplay",this.autoplay),this.autoplay?PULSE.app.tracking.recordEvent(PULSE.app.common.CONSTANTS.TRACKING.EVENTS.MEDIA.AUTOPLAY.SET,{eventData:{[PULSE.app.common.CONSTANTS.TRACKING.PARAMS.CONTENT_SECTION]:this?.autoplayToggleName}}):PULSE.app.tracking.recordEvent(PULSE.app.common.CONSTANTS.TRACKING.EVENTS.MEDIA.AUTOPLAY.UNSET,{eventData:{[PULSE.app.common.CONSTANTS.TRACKING.PARAMS.CONTENT_SECTION]:this?.autoplayToggleName}})}));const e=this.container.querySelector(".js-start-button");e&&t.addAriaClickListener(e,(()=>{this.muted=!1,void 0!==this.timeout&&clearTimeout(this.timeout)}))},O=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.playUpNext=t,!this.playUpNext)return;const n=a?parseInt(e):parseInt(e.id,10);n!==this.currentItem.id&&(w.call(this),U.call(this,n),this.currentItem&&(y.call(this),E.call(this),M.call(this,!0,this.currentItem),u.call(this,this.currentItem.link)))},w=function(){""!==this.playerName&&(this.isPlaying=!1,document.querySelector(`#${this.playerName}`)&&videojs(this.playerName).dispose())},M=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const a=document.querySelector('meta[property="og:url"]'),n=document.querySelector('meta[name="twitter:url"]'),o=new URL(window.location.href),i=document.querySelector(".js-metadata");a&&a.setAttribute("content",o),n&&n.setAttribute("content",o),e||(i&&i.dataset.title?document.title=i.dataset.title:this.originalPageTitle&&(document.title=this.originalPageTitle)),e&&null!==t&&(document.title=t.title,t.metadata&&t.metadata.longTitle&&(document.title=t.metadata.longTitle))},k=function(){return this.videoModal?.config?.current?.uiArgs?.mediaId?this.videoModal.config.current.uiArgs.mediaId:null},R=function(){const e=new URL(window.location.href);return this.videoModal?.config?.current?.uiArgs?.contentId?this.videoModal.config.current.uiArgs.contentId:e.searchParams.get("videoId")?e.searchParams.get("videoId"):null},D=function(a,n){return a&&n?{...t.content.getContentModel(a,n),lazyImage:e.templates[o],objectFit:!0,contentType:a.type}:{}},x=function(){const e=this;[].slice.call(e.container.querySelectorAll(".js-animate-me")).forEach(((t,n)=>{t&&H.call(e,t,a.FADE_IN_UP,100*(n+1))})),setTimeout((()=>{e.container.classList.add("hover"),setTimeout((()=>{e.container.classList.remove("hover")}),600)}),200)},H=function(e,t,a){setTimeout((()=>{e.classList.add(t)}),a)},F=function(t){const a=new URL(window.location.href),n={pageSize:this.pageSize,detail:"DETAILED"};let o="video",i="",s="";if(this.playlistId=a.searchParams.get("playlistId"),this.playlistId||a.searchParams.get("modal")){const e=a.searchParams.get("publishFrom");o=this.playlistId?"playlist":o,s=a.searchParams.get("tagNames")||"",i=a.searchParams.get("references")||"",void 0!==this.videoModal&&(!s&&this.videoModal.config.current&&this.videoModal.config.current.uiArgs.tag&&(s=this.videoModal.config.current.uiArgs.tag),!i&&this.videoModal.config.current&&this.videoModal.config.current.uiArgs.references&&(i=this.videoModal.config.current.uiArgs.references)),i.length>0&&(n.references=i),s.length>0&&(n.tagNames=s),"video"===a.searchParams.get("type")&&"video"===o&&(n.publishFrom=e),"video"===a.searchParams.get("type")&&"playlist"===o&&(n.pageSize="")}else t&&(n.publishFrom=t.publishFrom);const r={filter:n,type:o,playlistId:this.playlistId};return r.endpoint=e.common.url.createContentPath(r.type,r.filter,"en",r.playlistId),r}}(PULSE.app,PULSE.app.common,PULSE.app.common.CONSTANTS,PULSE.core),function(e){e.middlewares.playVideoWithID=function(){this.player.ready((()=>{[].slice.call(document.querySelectorAll(".js-play-button")).forEach((a=>{e.addAriaClickListener(a,(()=>{this.videoInfo=JSON.parse(a.dataset.videoInfo),t.call(this,a)}))}))}));const t=e=>{this.player.ima3&&this.player.ima3.player&&this.player.ima3.adsManager&&this.player.ima3.adsManager.getRemainingTime()>-1&&(this.player.ima3.adPlayer.paused()?this.player.ima3.adsManager.resume():this.player.ima3.adPlayer.paused()||this.player.ima3.adsManager.pause());const t=!this.player.paused();this.playWhenReady=!0;const n=e.dataset.videoId;this.currentPlayButton=e;a(n,this.player.mediainfo)?(t&&this.player.pause(),this.player.catalog.getVideo(n,((e,t)=>{this.player.catalog.load(t),this.reset=!1}))):t?this.player.pause():this.player.play()},a=(e,t)=>{const a=t.referenceId,n=t.id;let o=!1,i=e;if(e.includes("ref:")&&(o=!0,i=i.replace("ref:","")),void 0!==this.reset&&this.reset)return!0;if(o){if(a!==i)return!0;if(a===i)return!1;if(null===a)return!0}else{if(n!==i)return!0;if(n===i)return!1}return!1};this.player.on("loadedmetadata",(()=>{this.playWhenReady&&this.player.play()}))}}(PULSE.app.common),function(e,t,a,n){const o=[-2,4,"VIDEO_CLOUD_ERR_VIDEO_NOT_PLAYABLE"],i="js-video-container",s="js-video-player";t.middlewares.playVideo=function(){const r=this.container,l=this.container.querySelector(".js-start-button");this.playerContainer=r.querySelector("."+i)||r.querySelector("."+s),this.player.ready((()=>{l&&t.addAriaClickListener(l,(()=>{n.style.addClass(r,a.IS_ACTIVE),this.player.play()})),this.player.on("error",(()=>{const t=this.player.duration();o.find((e=>e===this.player.error().code))&&(0===t||Number.isNaN(t)||t===1/0)&&(this.playerContainer.insertAdjacentHTML(this.playerContainer.classList.contains(s)?"beforebegin":"afterbegin",e.templating.render({},"common.video-modal-stream-ended")),videojs(this.player.tech_.el_.id).dispose())}))}))}}(PULSE.app,PULSE.app.common,PULSE.app.common.CONSTANTS,PULSE.core),function(e,t){const a=3e4;let n,o=!0;function i(){clearTimeout(n),n=setTimeout(r,a)}function s(){o||(o=!0,i())}function r(){o&&(o=!1)}e.middlewares.videoTrailer=function(){const a=parseInt(this.container.dataset.trailerStart)||0,n=a+(parseInt(this.container.dataset.trailerDuration)||8);this.player.ready((()=>{this.player.on("loadeddata",(()=>{0!==a&&this.player.currentTime(a)})),this.player.on("timeupdate",(()=>{const i=this.player.currentTime();n&&i>n&&(o&&t.tracking.recordEvent("content_interaction",{component:this.container.dataset.trackingName?this.container.dataset.trackingName:"",interaction:"completion",videoId:this.container.dataset.trackingId?this.container.dataset.trackingId:null},"video thumbnail",!0),this.player.pause(),this.player.currentTime(parseInt(a,10)),e.trailerManager.nextTrailer())})),this.player.on("error",(()=>{e.trailerManager.removeTrailer(this)})),e.trailerManager.addTrailer(this)}))},document.addEventListener("mousemove",s),document.addEventListener("keydown",s),i()}(PULSE.app.common,PULSE.app),function(e,t){t.AudioPlayer=class{constructor(e,t){this.container=e,this.videoContainerId=this.container.getAttribute("id"),this.videoContainer=this.container.querySelector(".js-video-container"),this.account=this.container.dataset.accountId,this.playerId=t,this.policyKey=this.container.dataset.policyKey,this.mediaId="",this.videoModal=videoModal,this.initInstance()}initInstance(){const e=this,a=t.brightcovePlayerManager.generateScript(this.account,this.playerId);t.brightcovePlayerManager.loadScript(a).then((()=>{this.videoInstance=t.brightcovePlayerManager.createInstance(null,e.videoContainer,e.mediaId,e.container,{videoModal:this.videoModal,account:this.account,playerId:this.playerId},t.middlewares.brightcoveInit,[t.middlewares.audioPlayer])}))}}}(PULSE.app,PULSE.app.common),function(e){class t extends e.PulselivePlayerManager{constructor(){super()}generateScript(e,t){return`//players.brightcove.net/${e}/${t}_default/index.js`}}e.brightcovePlayerManager=new t}(PULSE.app.common),function(e,t){t.VideoAdhocModal=class{constructor(e,t,a){this.container=e,this.videoContainer=this.container.querySelector("video"),this.videoContainerId=this.videoContainer.getAttribute("id"),this.account=this.videoContainer.dataset.account,this.playerId=this.videoContainer.dataset.player,this.policyKey=this.videoContainer.dataset.policyKey,this.mediaId=this.videoContainer.dataset.videoId,this.targetId=t,this.isPremium=a,this.initInstance()}initInstance(){const e=t.brightcovePlayerManager.generateScript(this.account,this.playerId);t.brightcovePlayerManager.loadScript(e).then((()=>{this.videoInstance=t.brightcovePlayerManager.createInstance(this.videoContainerId,this.videoContainer,this.mediaId,this.container,{targetId:this.targetId,isPremium:this.isPremium},t.middlewares.brightcoveInit,[t.middlewares.brightcoveEvents,t.middlewares.playAdhocModal,t.middlewares.brightcoveAds,t.middlewares.playVideoWithID,t.middlewares.videoClose,t.middlewares.videoFullscreen,t.middlewares.pipButton,t.middlewares.cueMarkers])}))}}}(PULSE.app,PULSE.app.common),function(e,t){t.VideoLiveStream=class{constructor(e,t){this.container=e,this.videoContainer=this.container.querySelector("video"),this.videoContainerId=this.videoContainer.getAttribute("id"),this.account=this.videoContainer.dataset.account,this.playerId=this.videoContainer.dataset.player,this.policyKey=this.videoContainer.dataset.policyKey,this.mediaId=this.videoContainer.dataset.videoId,this.footyTV=t,this.initInstance()}initInstance(){const e=t.brightcovePlayerManager.generateScript(this.account,this.playerId);t.brightcovePlayerManager.loadScript(e).then((()=>{this.videoInstance=t.brightcovePlayerManager.createInstance(this.videoContainerId,this.videoContainer,this.mediaId,this.container,{footyTV:this.footyTV},t.middlewares.brightcoveInit,[t.middlewares.brightcoveEvents,t.middlewares.playLiveStream,t.middlewares.brightcoveAds,t.middlewares.playVideoWithID,t.middlewares.videoClose,t.middlewares.videoFullscreen,t.middlewares.pipButton,t.middlewares.cueMarkers])}))}}}(PULSE.app,PULSE.app.common),function(e,t){t.VideoModal=class{constructor(e,t){this.container=e,this.videoContainerId=this.container.getAttribute("id"),this.videoContainer=this.container.querySelector(".js-video-container"),this.account=this.container.dataset.accountId,this.playerId=this.container.dataset.playerId,this.policyKey=this.container.dataset.policyKey,this.mediaId="",this.videoModal=t,this.initInstance()}initInstance(){const e=this,a=t.brightcovePlayerManager.generateScript(this.account,this.playerId);t.brightcovePlayerManager.loadScript(a).then((()=>{this.videoInstance=t.brightcovePlayerManager.createInstance(null,e.videoContainer,e.mediaId,e.container,{videoModal:this.videoModal,account:this.account,playerId:this.playerId},t.middlewares.brightcoveInit,[t.middlewares.videoModal])}))}}}(PULSE.app,PULSE.app.common),function(e,t){t.Video=class{constructor(e){_defineProperty(this,"initInstance",(()=>{const e=t.brightcovePlayerManager.generateScript(this.account,this.playerId);this.isTrailer?t.brightcovePlayerManager.loadScript(e).then((()=>{this.videoInstance=t.brightcovePlayerManager.createInstance(this.videoContainerId,this.videoContainer,this.mediaId,this.container,{disableAds:!0,exclusiveUrl:this.exclusiveUrl},t.middlewares.brightcoveInit,[t.middlewares.videoTrailer])})):t.brightcovePlayerManager.loadScript(e).then((()=>{this.videoInstance=t.brightcovePlayerManager.createInstance(this.videoContainerId,this.videoContainer,this.mediaId,this.container,{exclusiveUrl:this.exclusiveUrl},t.middlewares.brightcoveInit,[t.middlewares.brightcoveEvents,t.middlewares.bindEvents,t.middlewares.playVideo,t.middlewares.brightcoveAds,t.middlewares.playVideoWithID,t.middlewares.videoClose,t.middlewares.videoFullscreen,t.middlewares.pipButton,t.middlewares.cueMarkers])}))})),this.container=e,this.videoContainer=this.container.querySelector("video"),this.videoContainerId=this.videoContainer.getAttribute("id"),this.account=this.videoContainer.dataset.account,this.playerId=this.videoContainer.dataset.player,this.policyKey=this.videoContainer.dataset.policyKey,this.mediaId=this.videoContainer.dataset.videoId,this.exclusiveUrl=this.videoContainer.dataset.exclusiveUrl,this.isTrailer="true"===this.container.dataset.isTrailer,void 0===e.dataset.deferInit?this.initInstance():window.addEventListener("load",this.initInstance)}},e.widgetInitialiser.addMultipleWidgetsByName("video-player",t.Video)}(PULSE.app,PULSE.app.common),function(e){e.redux.initialState={token:"",seasons:{},rounds:{},stats:{},teamStats:{},statsPlayerProfile:{loading:[]},competitionNav:{},eventsListing:{}},e.redux.createActionCreator=e=>t=>({type:e,payload:t}),e.redux.createSignalAction=(t,a)=>({REQUEST:`SIGNAL/${t}/${a}/REQUEST`,SUCCESS:`SIGNAL/${t}/${a}/SUCCESS`,FAILURE:`SIGNAL/${t}/${a}/FAILURE`,request:e.redux.createActionCreator(`SIGNAL/${t}/${a}/REQUEST`),success:e.redux.createActionCreator(`SIGNAL/${t}/${a}/SUCCESS`),failure:e.redux.createActionCreator(`SIGNAL/${t}/${a}/FAILURE`)}),e.redux.createDeltaAction=(e,t)=>`DELTA/${e}/${t}`,e.redux.createWatcher=(e,t)=>function*(){for(;;){const{data:a}=yield ReduxSaga.effects.take(e);yield ReduxSaga.effects.fork(t,a)}},e.redux.getNestedItemFromPath=function(e,t){if(0===e.length)return null;let a=t;for(let t=0;t2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_.isEqual;n&&a(e.redux.getNestedItemFromPath(t,e.redux.store.getState()),e.redux.getNestedItemFromPath(t,e.redux.store.getState()),t);const i=function(t,a,n){let o=e.redux.getNestedItemFromPath(a,t());return function(i){return function(){const s=e.redux.getNestedItemFromPath(a,t());if(!n(o,s)){const e=o;o=s,i(s,e,a)}}}}(e.redux.store.getState,t,o);return e.redux.store.subscribe(i(((e,t,n)=>{a(e,t,n)})))}}(PULSE.app),function(e,t){const{actions:a}=t;a.seasons=a.seasons||{};const{seasons:n}=a;n.API__FETCH_SEASONS=e.redux.createSignalAction("API/seasons","API__FETCH_SEASONS"),n.SET_SEASONS=e.redux.createDeltaAction("seasons","SET_SEASONS"),n.setSeasons=e.redux.createActionCreator(n.SET_SEASONS)}(PULSE.app,PULSE.app.redux),function(e){const{actions:t,reducers:a}=e,{produce:n}=immer;a.seasons=a.seasons||{},a.seasons.root=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;const{SET_SEASONS:i}=t.seasons;return n(e,(e=>{switch(a.type){case i:{const{competitionId:t,seasons:n}=a.payload,i=`competition_${t}`;e[i]||(e[i]={});const s=n.filter((e=>"CD_S2021120"!==e.providerId)).sort(o).map((e=>({...e,competitionId:t})));s.forEach((t=>{e[i][`season_${t.id}`]=t})),e[i].list=s;break}}}))};const o=(e,t)=>e.id>t.id?-1:e.id0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;const{SET_ROUNDS:o}=t.rounds;return n(e,(e=>{switch(a.type){case o:{const{seasonId:t,rounds:n}=a.payload,o=`season_${t}`;e[o]||(e[o]={});const i=n.map((e=>({...e,seasonId:t})));if(i?.length){i.forEach((t=>{e[o][`round_${t.id}`]=t})),e[o].list=i;break}e[o].error=!0}}}))}}(PULSE.app.redux,PULSE.app.common.CONSTANTS,PULSE.app.common),function(e){const{actions:t,sagas:a}=e,{call:n,put:o}=ReduxSaga.effects;a.rounds=a.rounds||{},a.rounds.fetchRounds=function(e){let{payload:a}=e;return function*(){const{API__FETCH_ROUNDS:e}=t.rounds,i=yield n(fetch,`${PULSE.app.environment.api}compseasons/${a}/rounds?pageSize=50`),s=yield n([i,"json"]);s.rounds?yield o(e.success({seasonId:a,rounds:s.rounds})):yield o(e.failure(s))}()}}(PULSE.app.redux),function(e){const{all:t,takeEvery:a}=ReduxSaga.effects;e.sagas.rounds.root=function*(){const{rounds:n}=e.actions,{rounds:o}=e.sagas;yield t([a(n.API__FETCH_ROUNDS.REQUEST,o.fetchRounds),a(n.API__FETCH_ROUNDS.SUCCESS,o.setRounds)])}}(PULSE.app.redux),function(e){const{actions:t,sagas:a}=e,{put:n}=ReduxSaga.effects;a.rounds=a.rounds||{},a.rounds.setRounds=function(e){let{payload:a}=e;return function*(){yield n(t.rounds.setRounds(a))}()}}(PULSE.app.redux),function(e,t){const{actions:a}=t;a.token=a.token||{},a.token.GET_TOKEN=e.redux.createSignalAction("token","GET_TOKEN"),a.token.API__FETCH_TOKEN=e.redux.createSignalAction("API/token","FETCH_TOKEN"),a.token.UPDATE_TOKEN=e.redux.createDeltaAction("token","UPDATE_TOKEN"),a.token.updateToken=e.redux.createActionCreator(a.token.UPDATE_TOKEN)}(PULSE.app,PULSE.app.redux),function(e,t){const{actions:a,reducers:n,selectors:o}=t,{produce:i}=immer;n.token=n.token||{},o.token=o.token||{},n.token.root=function(){let e=arguments.length>1?arguments[1]:void 0;return i(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},(()=>{if(e.type===a.token.UPDATE_TOKEN)return e.payload.token}))},o.token.selectToken=e=>e.token}(PULSE.app,PULSE.app.redux),function(e,t){const{actions:a,sagas:n,selectors:o}=t,{call:i,put:s,race:r,take:l,select:c}=ReduxSaga.effects;n.token=n.token||{},n.token.fetchToken=function*(){try{const t=yield i(fetch,`${e.environment.cfsApi}/WMCTok`,{method:"post"}),n=yield i([t,"json"]);n&&n.token?yield s(a.token.API__FETCH_TOKEN.success(n)):yield s(a.token.API__FETCH_TOKEN.failure(n))}catch(e){yield s(a.token.API__FETCH_TOKEN.failure(e))}},n.token.getToken=function*(){if(!(yield c(o.token.selectToken))){yield s(a.token.API__FETCH_TOKEN.request());const{success:e,failure:t}=yield r({success:l(a.token.API__FETCH_TOKEN.SUCCESS),failure:l(a.token.API__FETCH_TOKEN.FAILURE)});e?(yield s(a.token.updateToken(e.payload)),yield s(a.token.GET_TOKEN.success())):yield s(a.token.GET_TOKEN.failure(t))}}}(PULSE.app,PULSE.app.redux),function(e,t){const{actions:a,sagas:n}=t,{all:o,takeLatest:i}=ReduxSaga.effects;n.token.root=function*(){yield o([i(a.token.GET_TOKEN.REQUEST,n.token.getToken),i(a.token.API__FETCH_TOKEN.REQUEST,n.token.fetchToken)])}}(PULSE.app,PULSE.app.redux),function(e,t,a){const{reducers:n,selectors:o,paths:i}=e;n.match=n.match||{},o.match=o.match||{},i.match=i.match||{},o.match.item=(e,t)=>e.cfsAPI.queries[`getMatchItem("${t}")`].data,o.match.status=(t,a)=>e.getNestedItemFromPath(i.match.status(a),t),o.match.utcStartTime=(t,a)=>e.getNestedItemFromPath(i.match.utcStartTime(a),t),o.match.startsWithinAnHour=(e,a)=>{const n=o.match.status(e,a);if(n===t.MATCH_STATUS.SCHEDULED||n===t.MATCH_STATUS.UNCONFIRMED_TEAMS||n===t.MATCH_STATUS.CONFIRMED_TEAMS){const n=o.match.utcStartTime(e,a);if(n){const e=moment.utc(n).diff(moment().utc());if(e>0&&ee.getNestedItemFromPath(i.match.matchClock(a),t),o.match.timeString=(e,a,n)=>{const i=!(void 0!==n&&!n),s={string:null,countdown:!1,secondaryStatus:{useClock:!1,string:null}},r=o.match.status(e,a);if(!r)return s;if(r===t.MATCH_STATUS.POST_GAME||r===t.MATCH_STATUS.POSTGAME||r===t.MATCH_STATUS.CONCLUDED)return s.string=PULSE.I18N.lookup("label.mc.clock.ft"),s.secondaryStatus.useClock=!1,s;const l=o.match.matchClock(e,a),c=o.match.utcStartTime(e,a),d=moment.duration(moment.utc(c).diff());if(r===t.MATCH_STATUS.LIVE&&!l)return d.asSeconds()<1?s.string=PULSE.I18N.lookup("label.mc.clock.startingSoon"):(s.countdown=!0,s.string=PULSE.I18N.lookup("label.mc.clock.countdown",{time:d.format("mm:ss",{trim:!1})})),s;const m=l?[...l?.periods]:null;if(m){const e=m.sort(((e,t)=>t.periodNumber-e.periodNumber))[0];if(1===m.length&&0===e.periodSeconds)return d.asSeconds()<1?s.string=PULSE.I18N.lookup("label.mc.clock.startingSoon"):(s.countdown=!0,s.string=PULSE.I18N.lookup("label.mc.clock.countdown",{time:d.format("mm:ss",{trim:!1})})),s;if(e.periodCompleted){const t=e.nextPeriodStart,a=moment.duration(moment.utc(t).diff());return s.string=PULSE.I18N.lookup(`label.mc.clock.periodComplete.${e.periodNumber}`),t&&(s.secondaryStatus.string=PULSE.I18N.lookup(`label.mc.clock.secondaryStatus.periodComplete.${e.periodNumber}`,{time:a>0?a.format("mm:ss",{trim:!1}):0}),s.secondaryStatus.useClock=!0),s}let a;const n={number:"",time:""};e.periodNumber>t.MAX_PERIOD_NUMBER?(a="label.mc.clock.extraTime",n.number=e.periodNumber-t.MAX_PERIOD_NUMBER):(a="label.mc.clock.quarterTime",n.number=e.periodNumber),n.time=moment.duration(e.periodSeconds,"seconds").format("mm:ss",{trim:!1}),s.string=i?PULSE.I18N.lookup(a,n):`${n.time}`}return s},o.match.season=(t,a)=>e.getNestedItemFromPath(i.match.season(a),t),o.match.homeId=(t,a)=>e.getNestedItemFromPath(i.match.homeId(a),t),o.match.awayId=(t,a)=>e.getNestedItemFromPath(i.match.awayId(a),t),o.match.scoreWorm=(t,a)=>e.getNestedItemFromPath(i.match.scoreWorm(a),t),o.match.statParams=(e,n)=>a.match.getMatchStatus(o.match.status(e,n))===t.MATCH_STATUS.UPCOMING?{competitionId:o.match.season(e,n),teamIds:[o.match.homeId(e,n),o.match.awayId(e,n)]}:{matchId:n},o.match.roundNumber=(t,a)=>e.getNestedItemFromPath(i.match.roundNumber(a),t),o.match.isActuallyLive=(e,t)=>{const n=o.match.status(e,t),i=o.match.matchClock(e,t);return a.match.getIsLive(n,i)},i.match.status=e=>["cfsAPI","queries",`getMatchItem("${e}")`,"data","match","status"],i.match.utcStartTime=e=>["cfsAPI","queries",`getMatchItem("${e}")`,"data","match","utcStartTime"],i.match.scoreWorm=e=>["cfsAPI","queries",`getMatchItem("${e}")`,"data","score","scoreWorm"],i.match.homeTeamScore=e=>["cfsAPI","queries",`getMatchItem("${e}")`,"data","score","homeTeamScore"],i.match.awayTeamScore=e=>["cfsAPI","queries",`getMatchItem("${e}")`,"data","score","awayTeamScore"],i.match.score=e=>["cfsAPI","queries",`getMatchItem("${e}")`,"data","score"],i.match.matchClock=e=>["cfsAPI","queries",`getMatchItem("${e}")`,"data","score","matchClock"],i.match.season=e=>["cfsAPI","queries",`getMatchItem("${e}")`,"data","round","competitionId"],i.match.homeId=e=>["cfsAPI","queries",`getMatchItem("${e}")`,"data","match","homeTeamId"],i.match.awayId=e=>["cfsAPI","queries",`getMatchItem("${e}")`,"data","match","awayTeamId"],i.match.roundNumber=e=>["cfsAPI","queries",`getMatchItem("${e}")`,"data","round","roundNumber"]}(PULSE.app.redux,PULSE.app.common.CONSTANTS,PULSE.app.common),function(e,t){const{actions:a}=t;a.stats=a.stats||{},a.stats.ADD_MATCH_STAT=e.redux.createSignalAction("stats","ADD_MATCH_STAT"),a.stats.API__FETCH_MATCH_STAT=e.redux.createSignalAction("API/stats","API__FETCH_MATCH_STAT"),a.stats.POLL_MATCH_STAT=e.redux.createSignalAction("stats","POLL_MATCH_STAT"),a.stats.FAILED_STATS=e.redux.createSignalAction("stats","FAILED_STATS"),a.stats.UPDATE_MATCH_STAT=e.redux.createDeltaAction("stats","UPDATE_MATCH_STAT"),a.stats.updateMatchStat=e.redux.createActionCreator(a.stats.UPDATE_MATCH_STAT),a.stats.FAILED_STATS=e.redux.createDeltaAction("stats","FAILED_STATS"),a.stats.failedFetch=e.redux.createActionCreator(a.stats.FAILED_STATS)}(PULSE.app,PULSE.app.redux),function(e){const{actions:t,reducers:a,selectors:n,paths:o}=e,{produce:i}=immer,s="match",r="season";a.stats=a.stats||{},n.stats=n.stats||{},o.stats=o.stats||{},a.stats.root=function(){let e=arguments.length>1?arguments[1]:void 0;return i(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},(a=>{switch(e.type){case t.stats.UPDATE_MATCH_STAT:{const t=e.payload.options.match,n=e.payload.options.statKey;a[t]||(a[t]={}),e.payload.options.params.matchId?a[t].scope=s:a[t].scope=r;const o=l(n,e.payload.json.lists);o.length&&(a[t][n]=o);break}case t.stats.FAILED_STATS:{const t=e.payload.options.match,n=e.payload.options.statKey;a[t]||(a[t]={}),a[t][n]=[]}}}))};const l=(e,t)=>{if(t.length){const a=t[0].stats.totals[e];return t.filter((t=>t.stats.totals[e]===a))}return[]};n.stats.scope=(t,a)=>e.getNestedItemFromPath(o.stats.scope(a),t),o.stats.matchLeaders=(e,t)=>["stats",e,t],o.stats.scope=e=>["stats",e,"scope"]}(PULSE.app.redux,PULSE.app.common.CONSTANTS,PULSE.app.common),function(e,t,a,n){const{actions:o,sagas:i,selectors:s}=t,{call:r,put:l,select:c,delay:d,take:m}=ReduxSaga.effects;i.stats=i.stats||{},i.stats.addMatchStat=function*(e){const t=e.payload;yield l(o.stats.API__FETCH_MATCH_STAT.request(t))},i.stats.fetchMatchStat=function*(t){const i=t.payload,d=yield c(s.token.selectToken);if(d)try{const t=n.prepareParams(i.params),s=yield r(fetch,`${e.environment.cfsApi}/statsCentre/players${t}`,{headers:{[a.MIS_TOKEN_HEADER_PROP]:d}}),c=yield r([s,"json"]);c&&c.lists?yield l(o.stats.API__FETCH_MATCH_STAT.success({options:i,json:c})):yield l(o.stats.API__FETCH_MATCH_STAT.failure({options:i,json:c}))}catch(e){yield l(o.stats.API__FETCH_MATCH_STAT.failure({options:i}))}else{(yield m(o.token.GET_TOKEN.SUCCESS))&&(yield l(o.stats.API__FETCH_MATCH_STAT.request(i)))}},i.stats.updateMatchStat=function*(e){const t=e.payload.options;yield l(o.stats.updateMatchStat(e.payload)),yield l(o.stats.ADD_MATCH_STAT.success(t)),yield l(o.stats.POLL_MATCH_STAT.request(t))},i.stats.pollMatchStat=function*(e){const t=e.payload;(yield c(s.match.status,t.match))===a.MATCH_STATUS.LIVE?(yield d(a.MATCH_STATS_POLL_DELAY),yield l(o.stats.API__FETCH_MATCH_STAT.request(t)),yield l(o.stats.POLL_MATCH_STAT.success(t))):yield l(o.stats.POLL_MATCH_STAT.failure(t))},i.stats.failedFetch=function*(e){yield l(o.stats.failedFetch(e.payload))}}(PULSE.app,PULSE.app.redux,PULSE.app.common.CONSTANTS,PULSE.app.common),function(e){const{actions:t,sagas:a}=e,{all:n,takeEvery:o}=ReduxSaga.effects;a.stats.root=function*(){yield n([o(t.stats.ADD_MATCH_STAT.REQUEST,a.stats.addMatchStat),o(t.stats.API__FETCH_MATCH_STAT.REQUEST,a.stats.fetchMatchStat),o(t.stats.API__FETCH_MATCH_STAT.SUCCESS,a.stats.updateMatchStat),o(t.stats.API__FETCH_MATCH_STAT.FAILURE,a.stats.failedFetch),o(t.stats.POLL_MATCH_STAT.REQUEST,a.stats.pollMatchStat)])}}(PULSE.app.redux),function(e,t){const{actions:a}=t;a.teamstats=a.teamstats||{},a.teamstats.ADD_MATCH_TEAM_STAT=e.redux.createSignalAction("teamstats","ADD_MATCH_TEAM_STAT"),a.teamstats.API__FETCH_COACH_STAT=e.redux.createSignalAction("API/teamstats","API__FETCH_COACH_STAT"),a.teamstats.POLL_MATCH_TEAM_STAT=e.redux.createSignalAction("teamstats","POLL_MATCH_TEAM_STAT"),a.teamstats.ADD_SEASON_STATS=e.redux.createSignalAction("teamstats","ADD_SEASON_STATS"),a.teamstats.API__FETCH_SEASON_STATS=e.redux.createSignalAction("API/teamstats","API__FETCH_SEASON_STATS"),a.teamstats.ADD_MATCH_STATS=e.redux.createSignalAction("teamstats","ADD_MATCH_STATS"),a.teamstats.API__FETCH_MATCH_STATS=e.redux.createSignalAction("API/teamstats","API__FETCH_MATCH_STATS"),a.teamstats.FAILED_MATCH_STATS=e.redux.createSignalAction("teamstats","FAILED_MATCH_STATS"),a.teamstats.UPDATE_COACH_STATS=e.redux.createDeltaAction("teamstats","UPDATE_COACH_STATS"),a.teamstats.updateCoachStat=e.redux.createActionCreator(a.teamstats.UPDATE_COACH_STATS),a.teamstats.UPDATE_SEASON_STATS=e.redux.createDeltaAction("teamstats","UPDATE_SEASON_STATS"),a.teamstats.updateSeasonStats=e.redux.createActionCreator(a.teamstats.UPDATE_SEASON_STATS),a.teamstats.UPDATE_MATCH_STATS=e.redux.createDeltaAction("teamstats","UPDATE_MATCH_STATS"),a.teamstats.updateMatchStats=e.redux.createActionCreator(a.teamstats.UPDATE_MATCH_STATS),a.teamstats.FAILED_STATS=e.redux.createDeltaAction("teamstats","FAILED_STATS"),a.teamstats.failedFetch=e.redux.createActionCreator(a.teamstats.FAILED_STATS)}(PULSE.app,PULSE.app.redux),function(e){const{actions:t,reducers:a,selectors:n,paths:o}=e,{produce:i}=immer,s="seasonAverage",r="seasonTotal",l="currentMatch";a.teamstats=a.teamstats||{},n.teamstats=n.teamstats||{},o.teamstats=o.teamstats||{},a.teamstats.root=function(){let e=arguments.length>1?arguments[1]:void 0;return i(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},(a=>{switch(e.type){case t.teamstats.UPDATE_COACH_STATS:{const t=e.payload.options.matchId,n=e.payload.json.possession,o=e.payload.json.scoreDetails.scoreDetails;a[t]||(a[t]={}),a[t].possession||(a[t].possession={}),a[t].possession.periodInDisputePerc=n.periodInDisputePerc,a[t].possession.last10InDisputePerc=n.last10InDisputePerc,a[t].possession.matchInDisputePerc=n.matchInDisputePerc,a[t].possession.homeTeam={...a[t].possession.homeTeam,...n.squadPossessionList[0]},a[t].possession.awayTeam={...a[t].possession.awayTeam,...n.squadPossessionList[1]},a[t].scoreDetails||(a[t].scoreDetails={}),a[t].scoreDetails.homeTeam=o[0],a[t].scoreDetails.awayTeam=o[1],a[t].requestsComplete?a[t].requestsComplete=a[t].requestsComplete+=1:a[t].requestsComplete=1;break}case t.teamstats.UPDATE_SEASON_STATS:{const t=e.payload.options.matchId,n=e.payload.options;e.payload.json.lists.forEach((e=>{const o=e.team.teamId===n.homeTeamId?"homeTeam":"awayTeam";c(a,t,e.stats.averages,s,o),c(a,t,e.stats.totals,r,o)})),a[t]||(a[t]={}),a[t].requestsComplete?a[t].requestsComplete=a[t].requestsComplete+=1:a[t].requestsComplete=1,a[t].seasonStatsRequestComplete||(a[t].seasonStatsRequestComplete=!0);break}case t.teamstats.UPDATE_MATCH_STATS:{const t=e.payload.options.matchId,n=e.payload.options;e.payload.json.teamStats.forEach((e=>{const o=e.teamId===n.homeTeamId?"homeTeam":"awayTeam";c(a,t,e.stats,l,o)})),a[t]||(a[t]={}),a[t].requestsComplete?a[t].requestsComplete=a[t].requestsComplete+=1:a[t].requestsComplete=1;break}case t.teamstats.FAILED_STATS:{const t=e.payload.options.matchId,n=e.payload.type;a[t]||(a[t]={}),a[t].requestsFailed||(a[t].requestsFailed={}),a[t].requestsFailed[n]=!0,a[t].requestsComplete?a[t].requestsComplete=a[t].requestsComplete+=1:a[t].requestsComplete=1;break}}}))};const c=(e,t,a,n,o)=>(Object.keys(a).forEach((i=>{if(e[t]||(e[t]={}),!a[i]||"null"===a[i])return e[t]=m(e[t],d(i),o,n,"-"),void("clearances"===i&&["centreClearances","stoppageClearances","totalClearances"].forEach((a=>{e[t]=m(e[t],a,o,n,"-")})));switch(i){case"clearances":Object.keys(a[i]).forEach((s=>{e[t]=m(e[t],s,o,n,a[i][s])}));break;case"freesFor":case"freeKicks":e[t]=m(e[t],"freeKicks",o,n,a[i]);break;case"totalPossessions":e[t]=m(e[t],"possession",o,n,a[i]),e[t]=m(e[t],i,o,n,a[i]);break;default:e[t]=m(e[t],i,o,n,a[i])}})),e),d=e=>{switch(e){case"freeKicks":case"freesFor":return"freeKicks";case"totalPossesions":case"possesion":return"possession";default:return e}},m=(e,t,a,n,o)=>(e[t]||(e[t]={}),e[t][a]||(e[t][a]={}),e[t][a][n]=o,e);n.teamstats.scope=(t,a)=>e.getNestedItemFromPath(o.teamstats.scope(a),t),o.teamstats.scope=e=>["teamStats",e]}(PULSE.app.redux,PULSE.app.common.CONSTANTS,PULSE.app.common),function(e,t,a,n){const{actions:o,sagas:i,selectors:s}=t,{call:r,put:l,select:c,delay:d,all:m,take:u}=ReduxSaga.effects;function*p(){const e=yield c(s.token.selectToken);if(e){return{[a.MIS_TOKEN_HEADER_PROP]:e}}if(yield u(o.token.GET_TOKEN.SUCCESS))return yield r(p)}i.teamstats=i.teamstats||{},i.teamstats.addMatchStat=function*(e){const t=e.payload;yield m([l(o.teamstats.API__FETCH_COACH_STAT.request(t)),l(o.teamstats.API__FETCH_SEASON_STATS.request(t)),l(o.teamstats.API__FETCH_MATCH_STATS.request(t))])},i.teamstats.fetchCoachStats=function*(t){const a=t.payload,n={headers:{...yield r(p)}};try{const t=yield r(fetch,`${e.environment.cfsApi}/coach/match/${a.matchId}/teamStats`,n),i=yield r([t,"json"]);i&&i.scoreDetails&&i.possession?yield l(o.teamstats.API__FETCH_COACH_STAT.success({options:a,json:i})):yield l(o.teamstats.API__FETCH_COACH_STAT.failure({options:a,json:i,type:"coach"}))}catch(e){yield l(o.teamstats.API__FETCH_COACH_STAT.failure({options:a,type:"coach"}))}},i.teamstats.fetchSeasonStats=function*(t){const a=t.payload,i={headers:{...yield r(p)}};try{const t={competitionId:a.competitionId,teamIds:[a.homeTeamId,a.awayTeamId]},s=yield r(fetch,`${e.environment.cfsApi}/statsCentre/teams${n.prepareParams(t)}`,i),c=yield r([s,"json"]);c&&c.lists?yield l(o.teamstats.API__FETCH_SEASON_STATS.success({options:a,json:c})):yield l(o.teamstats.API__FETCH_SEASON_STATS.failure({options:a,json:c,type:"season"}))}catch(e){yield l(o.teamstats.API__FETCH_SEASON_STATS.failure({options:a,type:"season"}))}},i.teamstats.fetchMatchStats=function*(t){const a=t.payload,n={headers:{...yield r(p)}};try{const t=yield r(fetch,`${e.environment.cfsApi}/teamStats/match/${a.matchId}`,n),i=yield r([t,"json"]);i&&i.teamStats&&null!==i.teamStats[0]?yield l(o.teamstats.API__FETCH_MATCH_STATS.success({options:a,json:i})):yield l(o.teamstats.API__FETCH_MATCH_STATS.failure({options:a,json:i,type:"match"}))}catch(e){yield l(o.teamstats.API__FETCH_MATCH_STATS.failure({options:a,type:"match"}))}},i.teamstats.updateCoachStat=function*(e){const t=e.payload.options;yield l(o.teamstats.updateCoachStat(e.payload)),yield l(o.teamstats.ADD_MATCH_TEAM_STAT.success(t))},i.teamstats.updateSeasonStats=function*(e){const t=e.payload.options;yield l(o.teamstats.updateSeasonStats(e.payload)),yield l(o.teamstats.ADD_SEASON_STATS.success(t))},i.teamstats.updateMatchStats=function*(e){const t=e.payload.options;yield l(o.teamstats.updateMatchStats(e.payload)),yield l(o.teamstats.ADD_MATCH_STATS.success(t)),yield l(o.teamstats.POLL_MATCH_TEAM_STAT.request(t))},i.teamstats.pollMatchStat=function*(e){const t=e.payload;(yield c(s.match.status,t.matchId))===a.MATCH_STATUS.LIVE?(yield d(a.MATCH_STATS_POLL_DELAY),yield l(o.teamstats.API__FETCH_MATCH_STATS.request(t)),yield l(o.teamstats.POLL_MATCH_TEAM_STAT.success(t))):yield l(o.teamstats.POLL_MATCH_TEAM_STAT.failure(t))},i.teamstats.failedFetch=function*(e){const t=e.payload;yield l(o.teamstats.failedFetch(e.payload)),yield l(o.teamstats.FAILED_MATCH_STATS.success(t))}}(PULSE.app,PULSE.app.redux,PULSE.app.common.CONSTANTS,PULSE.app.common),function(e){const{actions:t,sagas:a}=e,{all:n,takeEvery:o}=ReduxSaga.effects;a.teamstats.root=function*(){yield n([o(t.teamstats.ADD_MATCH_TEAM_STAT.REQUEST,a.teamstats.addMatchStat),o(t.teamstats.API__FETCH_COACH_STAT.REQUEST,a.teamstats.fetchCoachStats),o(t.teamstats.API__FETCH_COACH_STAT.SUCCESS,a.teamstats.updateCoachStat),o(t.teamstats.POLL_MATCH_TEAM_STAT.REQUEST,a.teamstats.pollMatchStat),o(t.teamstats.API__FETCH_SEASON_STATS.REQUEST,a.teamstats.fetchSeasonStats),o(t.teamstats.API__FETCH_SEASON_STATS.SUCCESS,a.teamstats.updateSeasonStats),o(t.teamstats.API__FETCH_MATCH_STATS.REQUEST,a.teamstats.fetchMatchStats),o(t.teamstats.API__FETCH_MATCH_STATS.SUCCESS,a.teamstats.updateMatchStats),o(t.teamstats.API__FETCH_SEASON_STATS.FAILURE,a.teamstats.failedFetch),o(t.teamstats.API__FETCH_COACH_STAT.FAILURE,a.teamstats.failedFetch),o(t.teamstats.API__FETCH_MATCH_STATS.FAILURE,a.teamstats.failedFetch)])}}(PULSE.app.redux),function(e,t){const{actions:a}=t;a.playerstats=a.playerstats||{},a.playerstats.ADD_MATCH_PLAYER_STATS=e.redux.createSignalAction("playerstats","ADD_MATCH_PLAYER_STATS"),a.playerstats.API__FETCH_MATCH_PLAYER_STATS=e.redux.createSignalAction("API/playerstats","API__FETCH_MATCH_PLAYER_STATS"),a.playerstats.POLL_MATCH_PLAYER_STATS=e.redux.createSignalAction("playerstats","POLL_MATCH_PLAYER_STATS"),a.playerstats.ADD_SEASON_PLAYER_STATS=e.redux.createSignalAction("playerstats","ADD_SEASON_PLAYER_STATS"),a.playerstats.API__FETCH_SEASON_PLAYER_STATS=e.redux.createSignalAction("API/playerstats","API__FETCH_SEASON_PLAYER_STATS"),a.playerstats.FAILED_MATCH_STATS=e.redux.createSignalAction("playerstats","FAILED_MATCH_STATS"),a.playerstats.UPDATE_MATCH_PLAYER_STATS=e.redux.createDeltaAction("playerstats","UPDATE_MATCH_PLAYER_STATS"),a.playerstats.updateMatchPlayerStats=e.redux.createActionCreator(a.playerstats.UPDATE_MATCH_PLAYER_STATS),a.playerstats.UPDATE_SEASON_PLAYER_STATS=e.redux.createDeltaAction("playerstats","UPDATE_SEASON_PLAYER_STATS"),a.playerstats.updateSeasonPlayerStats=e.redux.createActionCreator(a.playerstats.UPDATE_SEASON_PLAYER_STATS),a.playerstats.FAILED_STATS=e.redux.createDeltaAction("playerstats","FAILED_STATS"),a.playerstats.failedFetch=e.redux.createActionCreator(a.playerstats.FAILED_STATS)}(PULSE.app,PULSE.app.redux),function(e){const{actions:t,reducers:a,selectors:n,paths:o}=e,{produce:i}=immer;a.playerstats=a.playerstats||{},n.playerstats=n.playerstats||{},o.playerstats=o.playerstats||{},a.playerstats.root=function(){let e=arguments.length>1?arguments[1]:void 0;return i(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},(a=>{switch(e.type){case t.playerstats.UPDATE_MATCH_PLAYER_STATS:{const t=e.payload.options.matchId;a[t]||(a[t]={}),a[t].players=[],e.payload.json.homeTeamPlayerStats?.forEach((e=>{for(const t in e.playerStats.stats)null===e.playerStats.stats[t]&&(e.playerStats.stats[t]="-");a[t].players.push(e)})),e.payload.json.awayTeamPlayerStats?.forEach((e=>{for(const t in e.playerStats.stats)null===e.playerStats.stats[t]&&(e.playerStats.stats[t]="-");a[t].players.push(e)})),a[t].players.sort(((e,t)=>e.playerStats.player.playerName.surname.localeCompare(t.playerStats.player.playerName.surname))),a[t].requestsComplete?a[t].requestsComplete=a[t].requestsComplete+=1:a[t].requestsComplete=1;break}case t.playerstats.UPDATE_SEASON_PLAYER_STATS:{const t=e.payload.options.matchId;a[t]||(a[t]={}),a[t].playerAverages=[],e.payload.json.lists.forEach((e=>{a[t].playerAverages.push(e)})),a[t].playerAverages.sort(((e,t)=>e.player.surname.localeCompare(t.player.surname))),a[t].requestsComplete?a[t].requestsComplete=a[t].requestsComplete+=1:a[t].requestsComplete=1;break}case t.playerstats.FAILED_STATS:{const t=e.payload.options.matchId,n=e.payload.type;a[t]||(a[t]={}),a[t].requestsFailed||(a[t].requestsFailed={}),a[t].requestsFailed[n]=!0,a[t].requestsComplete?a[t].requestsComplete=a[t].requestsComplete+=1:a[t].requestsComplete=1;break}}}))},n.playerstats.scope=(t,a)=>e.getNestedItemFromPath(o.playerstats.scope(a),t),o.playerstats.scope=e=>["playerStats",e]}(PULSE.app.redux,PULSE.app.common.CONSTANTS,PULSE.app.common),function(e,t,a,n){const{actions:o,sagas:i,selectors:s}=t,{call:r,put:l,select:c,delay:d,take:m}=ReduxSaga.effects;i.playerstats=i.playerstats||{};i.playerstats.addMatchPlayerStats=function*(e){const t=e.payload;yield l(o.playerstats.API__FETCH_MATCH_PLAYER_STATS.request(t))},i.playerstats.addSeasonPlayerStats=function*(e){const t=e.payload;yield l(o.playerstats.API__FETCH_SEASON_PLAYER_STATS.request(t))},i.playerstats.fetchSeasonPlayerStats=function*(t){const i=t.payload.config,d=yield c(s.token.selectToken);if(d)try{const t={competitionId:i.competitionId,teamIds:[i.homeTeamId,i.awayTeamId]},s=yield r(fetch,`${e.environment.cfsApi}/statsCentre/players${n.prepareParams(t)}`,{headers:{[a.MIS_TOKEN_HEADER_PROP]:d}}),c=yield r([s,"json"]);c&&c.lists?yield l(o.playerstats.API__FETCH_SEASON_PLAYER_STATS.success({options:i,json:c})):yield l(o.playerstats.API__FETCH_SEASON_PLAYER_STATS.failure({options:i,json:c,type:"season"}))}catch(e){yield l(o.playerstats.API__FETCH_SEASON_PLAYER_STATS.failure({options:i,type:"season"}))}else{(yield m(o.token.GET_TOKEN.SUCCESS))&&(yield l(o.playerstats.API__FETCH_SEASON_PLAYER_STATS.request(t.payload)))}},i.playerstats.fetchMatchPlayerStats=function*(t){const n=t.payload.config,i=yield c(s.token.selectToken);if(i)try{const t=yield r(fetch,`${e.environment.cfsApi}/playerStats/match/${n.matchId}`,{headers:{[a.MIS_TOKEN_HEADER_PROP]:i}}),s=yield r([t,"json"]);s&&200===t.status?yield l(o.playerstats.API__FETCH_MATCH_PLAYER_STATS.success({options:n,json:s})):yield l(o.playerstats.API__FETCH_MATCH_PLAYER_STATS.failure({options:n,json:s,type:"match"}))}catch(e){yield l(o.playerstats.API__FETCH_MATCH_PLAYER_STATS.failure({options:n,type:"match"}))}else{(yield m(o.token.GET_TOKEN.SUCCESS))&&(yield l(o.playerstats.API__FETCH_MATCH_PLAYER_STATS.request(t.payload)))}},i.playerstats.updateSeasonPlayerStats=function*(e){const t=e.payload.options;yield l(o.playerstats.updateSeasonPlayerStats(e.payload)),yield l(o.playerstats.ADD_SEASON_PLAYER_STATS.success(t))},i.playerstats.updateMatchPlayerStats=function*(e){const t=e.payload.options;yield l(o.playerstats.updateMatchPlayerStats(e.payload)),yield l(o.playerstats.POLL_MATCH_PLAYER_STATS.request(t))},i.playerstats.pollMatchStat=function*(e){const t=e.payload,n=yield c(s.match.status,t.matchId);n?n===a.MATCH_STATUS.LIVE?(yield d(a.MATCH_POLL_DELAY),yield l(o.playerstats.API__FETCH_MATCH_PLAYER_STATS.request({config:t})),yield l(o.playerstats.POLL_MATCH_PLAYER_STATS.success(t))):yield l(o.playerstats.POLL_MATCH_PLAYER_STATS.failure(t)):(yield d(5e3),yield l(o.playerstats.POLL_MATCH_PLAYER_STATS.request(t)))},i.playerstats.failedFetch=function*(e){const t=e.payload;yield l(o.playerstats.failedFetch(e.payload)),yield l(o.playerstats.FAILED_MATCH_STATS.success(t))}}(PULSE.app,PULSE.app.redux,PULSE.app.common.CONSTANTS,PULSE.app.common),function(e){const{actions:t,sagas:a}=e,{all:n,takeEvery:o}=ReduxSaga.effects;a.playerstats.root=function*(){yield n([o(t.playerstats.ADD_MATCH_PLAYER_STATS.REQUEST,a.playerstats.addMatchPlayerStats),o(t.playerstats.ADD_SEASON_PLAYER_STATS.REQUEST,a.playerstats.addSeasonPlayerStats),o(t.playerstats.API__FETCH_MATCH_PLAYER_STATS.REQUEST,a.playerstats.fetchMatchPlayerStats),o(t.playerstats.API__FETCH_MATCH_PLAYER_STATS.SUCCESS,a.playerstats.updateMatchPlayerStats),o(t.playerstats.POLL_MATCH_PLAYER_STATS.REQUEST,a.playerstats.pollMatchStat),o(t.playerstats.API__FETCH_SEASON_PLAYER_STATS.REQUEST,a.playerstats.fetchSeasonPlayerStats),o(t.playerstats.API__FETCH_SEASON_PLAYER_STATS.SUCCESS,a.playerstats.updateSeasonPlayerStats),o(t.playerstats.API__FETCH_SEASON_PLAYER_STATS.FAILURE,a.playerstats.failedFetch),o(t.playerstats.API__FETCH_MATCH_PLAYER_STATS.FAILURE,a.playerstats.failedFetch)])}}(PULSE.app.redux),function(e,t){const{actions:a}=t;a.customtable=a.customtable||{},a.customtable.ADD_CUSTOM_TABLE=e.redux.createSignalAction("customtable","ADD_CUSTOM_TABLE"),a.customtable.SORT_CUSTOM_TABLE=e.redux.createSignalAction("customtable","SORT_CUSTOM_TABLE"),a.customtable.DISPLAYED_CUSTOM_TABLE_FIELDS=e.redux.createSignalAction("customtable","DISPLAYED_CUSTOM_TABLE_FIELDS"),a.customtable.DISPLAYED_CUSTOM_TABLE_FIELDS_ORDER=e.redux.createSignalAction("customtable","DISPLAYED_CUSTOM_TABLE_FIELDS_ORDER"),a.customtable.RE_INIT_TABLE=e.redux.createSignalAction("customtable","RE_INIT_TABLE"),a.customtable.TOGGLE_MODAL=e.redux.createSignalAction("customtable","TOGGLE_MODAL"),a.customtable.TOGGLE_MANGAGE_FIELDS_BAR=e.redux.createSignalAction("customtable","TOGGLE_MANGAGE_FIELDS_BAR"),a.customtable.UPDATE_TEAM_SORT=e.redux.createSignalAction("customtable","UPDATE_TEAM_SORT"),a.customtable.UPDATE_SHOW_FILTER=e.redux.createSignalAction("customtable","UPDATE_SHOW_FILTER"),a.customtable.POLL_MATCH_PLAYER_STATS=e.redux.createSignalAction("customtable","POLL_MATCH_PLAYER_STATS"),a.customtable.API__FETCH_CUSTOM_TABLE=e.redux.createSignalAction("API/customtable","API__FETCH_CUSTOM_TABLE"),a.customtable.UPDATE_CUSTOM_TABLE=e.redux.createDeltaAction("customtable","UPDATE_CUSTOM_TABLE"),a.customtable.updateCustomTable=e.redux.createActionCreator(a.customtable.UPDATE_CUSTOM_TABLE),a.customtable.UPDATE_PLAYER_STATS_AVG_TABLE=e.redux.createDeltaAction("customtable","UPDATE_PLAYER_STATS_AVG_TABLE"),a.customtable.updatePlayerStatsAvg=e.redux.createActionCreator(a.customtable.UPDATE_PLAYER_STATS_AVG_TABLE),a.customtable.UPDATE_CUSTOM_TABLE_SORT=e.redux.createDeltaAction("customtable","UPDATE_CUSTOM_TABLE_SORT"),a.customtable.updateCustomTableSort=e.redux.createActionCreator(a.customtable.UPDATE_CUSTOM_TABLE_SORT),a.customtable.UPDATE_TABLE_TEAM_SORT=e.redux.createDeltaAction("customtable","UPDATE_TABLE_TEAM_SORT"),a.customtable.updateTableTeamSort=e.redux.createActionCreator(a.customtable.UPDATE_TABLE_TEAM_SORT),a.customtable.UPDATE_TABLE_SHOW_FILTER=e.redux.createDeltaAction("customtable","UPDATE_TABLE_SHOW_FILTER"),a.customtable.updateTableShowFilter=e.redux.createActionCreator(a.customtable.UPDATE_TABLE_SHOW_FILTER),a.customtable.UPDATE_DISPLAYED_CUSTOM_TABLE_FIELDS=e.redux.createDeltaAction("customtable","UPDATE_DISPLAYED_CUSTOM_TABLE_FIELDS"),a.customtable.updateDisplayedCustomTableFields=e.redux.createActionCreator(a.customtable.UPDATE_DISPLAYED_CUSTOM_TABLE_FIELDS),a.customtable.REORDER_DISPLAYED_CUSTOM_TABLE_FIELDS=e.redux.createDeltaAction("customtable","REORDER_DISPLAYED_CUSTOM_TABLE_FIELDS"),a.customtable.reorderDisplayedCustomTableFields=e.redux.createActionCreator(a.customtable.REORDER_DISPLAYED_CUSTOM_TABLE_FIELDS),a.customtable.INIT_TABLE=e.redux.createDeltaAction("customtable","INIT_TABLE"),a.customtable.initTable=e.redux.createActionCreator(a.customtable.INIT_TABLE),a.customtable.UPDATE_MODAL_STATE=e.redux.createDeltaAction("customtable","UPDATE_MODAL_STATE"),a.customtable.updateModalState=e.redux.createActionCreator(a.customtable.UPDATE_MODAL_STATE),a.customtable.UPDATE_MANAGE_FIELDS_STATE=e.redux.createDeltaAction("customtable","UPDATE_MANAGE_FIELDS_STATE"),a.customtable.updateManageFieldsState=e.redux.createActionCreator(a.customtable.UPDATE_MANAGE_FIELDS_STATE),a.customtable.FAILED_TABLE=e.redux.createDeltaAction("customtable","FAILED_TABLE"),a.customtable.failedTable=e.redux.createActionCreator(a.customtable.FAILED_TABLE)}(PULSE.app,PULSE.app.redux),function(e,t){const{actions:a,reducers:n,selectors:o,paths:i}=e,{produce:s}=immer;n.customtable=n.customtable||{},o.customtable=o.customtable||{},i.customtable=i.customtable||{},n.customtable.root=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return s(t,(o=>{switch(n.type){case a.customtable.UPDATE_CUSTOM_TABLE:{let a=!1,i=n.payload.options||n.payload,s={},d=i.type||!1;if(n.payload&&n.payload.tableName&&!n.payload.options){const e={...t[n.payload.tableName]};i.filterOptions&&(s=i.filterOptions),e&&e.config&&(i=e.config,i.displayedFields=t[n.payload.tableName].displayedFields,a=!0)}const m=i.tableName,u=!!i.showTableTitle,p=!!i.tableTitle&&i.tableTitle,h=i.groups,S=i.rowIdentifier,f=!1!==d?S?.selector[d]:S?.selector,g=S?.parentSelector;if(!h||!h.length)return;(a||d)&&(o[m]={},t[i.tableName]&&(i=t[i.tableName].config,i.displayedFields=t[i.tableName].displayedFields)),i.teamFilter&&(o[m].teamFilter=i.teamFilter),h.forEach(((y,E)=>{if(o[m]||(o[m]={}),o[m].filterOptions=s||{},o[m].config||(o[m].config=i),o[m].tableName=m,o[m].modalOpen=!1,o[m].manageFieldsBarShowing||(o[m].manageFieldBarShowing=!0),o[m].tableTitles||(o[m].tableTitles=[]),o[m].tableRows||(o[m].tableRows=[]),o[m].fields||(o[m].fields=[]),o[m].displayedFields||(o[m].displayedFields=i.displayedFields?i.displayedFields:[]),o[m].fieldGroups||(o[m].fieldGroups={}),o[m].data||(o[m].data={}),o[m].dataJson||(o[m].dataJson=[]),o[m].multipleTablesLength||(o[m].multipleTablesLength=1),o[m].multipleTables=!1,o[m].multipleTablesSplit=0,o[m].dataJson[n.payload.json.index]=n.payload.json,y.fields.forEach((e=>{if(!o[m].fieldGroups[y.name]){const e=!!y.isPersistent;o[m].fieldGroups[y.name]={groupName:y.name,groupLabel:y.label,isPersistent:e,fields:[]}}if(e.groupName=y.name,o[m].fieldGroups[y.name].fields.push(e),o[m].fields.push(e),e.displayByDefault&&!a){let a=!1;a=t[m]&&t[m].displayedFields?c(t[m].displayedFields,e):c(o[m].displayedFields,e),a||o[m].displayedFields.push(e)}const i=!1!==d?e.apiMap[d]:e.apiMap;if(i&&i!==n.payload.json.index)return;const s=e.fieldName,h=o[m].dataJson[i],S=!1!==d?e.selector[d]:e.selector||s,f=e.parentSelector.split("|")||"";f.forEach(((e,t)=>{const a=e.split(".")||"";let n=h,i=n;if(a.forEach((e=>{if(n[e]&&!Array.isArray(n))n=n[e];else if(Array.isArray(n)&&n[0][e]){const t=n.reduce(((t,a)=>[...t,a[e]]),[]);n=t}})),u){(p.split(".")||"").forEach((e=>{if(i[e]&&!Array.isArray(i))i=i[e];else if(Array.isArray(i)&&i[0][e]){let t=[];i.forEach((a=>{t.push(a[e])})),i=t}})),o[m].tableTitles=i}if(n&&n.length){let e=0;n.forEach(((a,i)=>{if(Array.isArray(a))a.forEach((t=>{const a="object"==typeof S?l(S,t):r(S,t),n=e;o[m].tableRows[n]||(o[m].tableRows[n]={}),o[m].tableRows[n][s]=a,t.team&&t.team.teamId&&(o[m].tableRows[n].teamId=t.team.teamId),o[m].tableRows[n].multipleTableIndex=i,e++})),o[m].multipleTables=!0,o[m].multipleTablesLength=n.length;else{const e="object"==typeof S?l(S,a):r(S,a),n=t+i*f.length;o[m].tableRows[n]||(o[m].tableRows[n]={}),o[m].tableRows[n][s]=e,a.team&&a.team.teamId&&(o[m].tableRows[n].teamId=a.team.teamId)}}))}}))})),t[m]&&t[m].sortBy&&(i.sortBy=t[m].sortBy),o[m].sortBy=i.sortBy,E===h.length-1){const e=o[m].displayedFields;let t={};e&&(e.forEach(((e,a)=>{t[e.fieldName]=a+1})),o[m].tableRows=o[m].tableRows.map((e=>Object.assign({},...Object.keys(e).sort(((e,a)=>t[e]-t[a])).map((t=>({[t]:e[t]})))))))}const T=o[m].dataJson[S.apiMap];if(T){const t=g.split("|")||"";t.forEach(((a,n)=>{const i=a.split("."),s=e.getNestedItemFromPath(i,T);s&&s.forEach(((a,i)=>{const s=e.getNestedItemFromPath(f.split("."),a),r=n+i*t.length;o[m].tableRows[r]&&!o[m].tableRows[r].rowIdentifier&&s&&(o[m].tableRows[r].rowIdentifier=s)}))}))}}));break}case a.customtable.UPDATE_CUSTOM_TABLE_SORT:o[n.payload.tableName].sortBy.fieldName===n.payload.field.fieldName?(o[n.payload.tableName].sortBy.direction=n.payload.sortDirection,o[n.payload.tableName].sortBy.additionalSortProps=n.payload.additionalSortProps):o[n.payload.tableName]?o[n.payload.tableName].sortBy={fieldName:n.payload.field.fieldName,direction:n.payload.sortDirection,additionalSortProps:n.payload.additionalSortProps}:o[n.payload.tableName]={sortBy:{fieldName:n.payload.field.fieldName,direction:n.payload.sortDirection,additionalSortProps:n.payload.additionalSortProps}};break;case a.customtable.UPDATE_TABLE_TEAM_SORT:o[n.payload.tableName].teamFilter=n.payload.teamId;break;case a.customtable.UPDATE_DISPLAYED_CUSTOM_TABLE_FIELDS:{const e=n.payload.tableName,t=n.payload.fields,a=n.payload.groups;if(e){o[n.payload.tableName].displayedFields=t,a&&(o[n.payload.tableName].fieldGroups=a);let i={};t.forEach(((e,t)=>{i[e.fieldName]=t+1})),o[e].tableRows=o[e].tableRows.map((e=>Object.assign({},...Object.keys(e).sort(((e,t)=>i[e]-i[t])).map((t=>({[t]:e[t]}))))))}break}case a.customtable.REORDER_DISPLAYED_CUSTOM_TABLE_FIELDS:{const e=n.payload.tableName,t=n.payload.newOrder;if(e){o[e].displayedFields=t;let a={};t.forEach(((e,t)=>{a[e.fieldName]=t+1})),o[e].tableRows=o[e].tableRows.map((e=>Object.assign({},...Object.keys(e).sort(((e,t)=>a[e]-a[t])).map((t=>({[t]:e[t]}))))))}break}case a.customtable.UPDATE_TABLE_SHOW_FILTER:o[n.payload.tableName].config.tabType=n.payload.type,o[n.payload.tableName].config.type=n.payload.type,o[n.payload.tableName].config.rowIdentifier.apiMap=n.payload.index,o[n.payload.tableName].config.defaultJsonApi=n.payload.type,o[n.payload.tableName].config.teamFilter=n.payload.teamId;break;case a.customtable.INIT_TABLE:{const e=n.payload.tableName;e&&o[e]&&(o[e].initCounter=o[e].initCounter?o[e].initCounter+1:0);break}case a.customtable.UPDATE_MODAL_STATE:{const e=n.payload.tableName;o[e].modalOpen=!o[e].modalOpen;break}case a.customtable.UPDATE_MANAGE_FIELDS_STATE:{const e=n.payload.tableName;o[e].manageFieldBarShowing=!o[e].manageFieldBarShowing;break}case a.customtable.FAILED_TABLE:{const e=n.payload.options||n.payload,t=e.tableName||e.tableName;o[t]||(o[t]={}),o[t].config||(o[t].config=e),o[t].tableName=t,o[t].failed=!0;break}}}))};const r=(e,t)=>{const a=e.split(".");let n=t,o="-";return a.forEach(((e,t)=>{(n&&n[e]||0===n[e])&&(n=n[e],t===a.length-1&&(o=n))})),o},l=(e,t)=>Object.keys(e).reduce(((a,n)=>({...a,[n]:r(e[n],t)})),{}),c=(e,t)=>e.find((e=>e.fieldName===t.fieldName));o.customtable.scope=(t,a)=>e.getNestedItemFromPath(i.customtable.scope(a),t),o.customtable.item=(e,t)=>e.customTable[t],o.customtable.modalOpen=(e,t)=>{const a=o.customtable.item(e,t);return!!a&&a.modalOpen},o.customtable.manageFieldsBarShowing=(e,t)=>{const a=o.customtable.item(e,t);return!!a&&a.manageFieldBarShowing},o.customtable.sortedTableData=(e,a)=>{const n=o.customtable.item(e,a);if(n&&n.fields&&n.sortBy){const e=n.sortBy,a=n.fields.find((t=>t.fieldName===e.fieldName));let o=n.tableRows;if(n.teamFilter){let e=o.filter((e=>e.teamId===n.teamFilter));e.length&&(o=e)}return o.sort(((n,o)=>"ASC"===e.direction?t.customTableSort.get(a.sortFunction)(n[e.fieldName],o[e.fieldName],e.additionalSortProps):t.customTableSort.get(a.sortFunction)(o[e.fieldName],n[e.fieldName],e.additionalSortProps)))}return[]},o.customtable.displayedCustomTableFields=(e,t)=>{const a=o.customtable.item(e,t);return a?a.displayedFields:[]},i.customtable.scope=e=>["customtable",e],i.customtable.dataset=e=>["customTable",e,"dataJson"]}(PULSE.app.redux,PULSE.app.common),function(e,t,a,n){const{actions:o,sagas:i,selectors:s}=t,{all:r,call:l,put:c,select:d,delay:m,take:u}=ReduxSaga.effects;function*p(){const e=yield d(s.token.selectToken);return{[a.MIS_TOKEN_HEADER_PROP]:e}}i.customtable=i.customtable||{},i.customtable.addCustomTable=function*(e){const t=e.payload.config,a=t.defaultJsonApi;let n=[];for(let e=0;e["cfsCommentaryAPI","queries",`getComms("${e}")`,"data","commentaryEvent"]}(PULSE.app.redux),function(e){const{paths:t}=e;t.interchange=t.interchange||{},t.interchange.data=e=>["cfsAPI","queries",`getInterchange("${e}")`,"data"]}(PULSE.app.redux),function(e,t){const{actions:a}=t;a.statsplayerprofile=a.statsplayerprofile||{},a.statsplayerprofile.ADD_PLAYER_PROFILE=t.createSignalAction("playerprofile","ADD_PLAYER_PROFILE"),a.statsplayerprofile.FETCH_PLAYER_PROFILE=t.createSignalAction("playerprofile","FETCH_PLAYER_PROFILE"),a.statsplayerprofile.ADD_LOADING_PLAYER_PROFILE=t.createDeltaAction("playerprofile","ADD_LOADING_PLAYER_PROFILE"),a.statsplayerprofile.addLoadingPlayerProfile=t.createActionCreator(a.statsplayerprofile.ADD_LOADING_PLAYER_PROFILE),a.statsplayerprofile.DEL_LOADING_PLAYER_PROFILE=t.createDeltaAction("playerprofile","DEL_LOADING_PLAYER_PROFILE"),a.statsplayerprofile.delLoadingPlayerProfile=t.createActionCreator(a.statsplayerprofile.DEL_LOADING_PLAYER_PROFILE),a.statsplayerprofile.SET_PLAYER_PROFILE=t.createDeltaAction("playerprofile","SET_PLAYER_PROFILE"),a.statsplayerprofile.setPlayerProfile=t.createActionCreator(a.statsplayerprofile.SET_PLAYER_PROFILE)}(PULSE.app,PULSE.app.redux),function(e){const{actions:t,reducers:a,selectors:n,paths:o}=e,{produce:i}=immer;a.statsplayerprofile=a.statsplayerprofile||{},n.statsplayerprofile=n.statsplayerprofile||{},o.statsplayerprofile=o.statsplayerprofile||{},a.statsplayerprofile.root=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;return i(e,(n=>{switch(a.type){case t.statsplayerprofile.ADD_LOADING_PLAYER_PROFILE:n.loading.push(a.payload);break;case t.statsplayerprofile.DEL_LOADING_PLAYER_PROFILE:n.loading=e.loading.filter((e=>e!==a.payload));break;case t.statsplayerprofile.SET_PLAYER_PROFILE:n[a.payload.playerId]=a.payload}}))},n.statsplayerprofile.isLoading=(e,t)=>e.statsPlayerProfile.loading.includes(t),n.statsplayerprofile.item=(e,t)=>e.statsPlayerProfile[t],o.statsplayerprofile.player=e=>["statsPlayerProfile",e]}(PULSE.app.redux),function(e,t,a){const{actions:n,sagas:o,selectors:i}=t,{call:s,put:r,select:l,take:c}=ReduxSaga.effects;o.statsplayerprofile=o.statsplayerprofile||{},o.statsplayerprofile.addPlayerProfile=function*(e){const{playerId:t}=e.payload,a=yield l(i.statsplayerprofile.isLoading,t),o=yield l(i.statsplayerprofile.item,t);a||o||!t||(yield r(n.statsplayerprofile.addLoadingPlayerProfile(t)),yield r(n.statsplayerprofile.FETCH_PLAYER_PROFILE.request(e.payload)))},o.statsplayerprofile.fetchPlayerProfile=function*(t){const{seasonId:o,playerId:d}=t.payload,m=yield l(i.token.selectToken);if(m){try{const i=yield s(fetch,`${e.environment.statsPro}/playerProfile/${d}?seasonId=${o}`,{headers:{[a.MIS_TOKEN_HEADER_PROP]:m}}),l=yield s([i,"json"]);l?yield r(n.statsplayerprofile.setPlayerProfile(l)):yield r(n.statsplayerprofile.FETCH_PLAYER_PROFILE.failure(t.payload))}catch(e){yield r(n.statsplayerprofile.FETCH_PLAYER_PROFILE.failure(t.payload))}yield r(n.statsplayerprofile.delLoadingPlayerProfile(d))}else{(yield c(n.token.GET_TOKEN.SUCCESS))&&(yield r(n.statsplayerprofile.FETCH_PLAYER_PROFILE.request(t.payload)))}}}(PULSE.app,PULSE.app.redux,PULSE.app.common.CONSTANTS),function(e,t){const{actions:a,sagas:n}=t,{all:o,takeEvery:i}=ReduxSaga.effects;n.statsplayerprofile.root=function*(){yield o([i(a.statsplayerprofile.ADD_PLAYER_PROFILE.REQUEST,n.statsplayerprofile.addPlayerProfile),i(a.statsplayerprofile.FETCH_PLAYER_PROFILE.REQUEST,n.statsplayerprofile.fetchPlayerProfile)])}}(PULSE.app,PULSE.app.redux),function(e,t){const a=window.Redux,{initialState:n,actions:o,reducers:i,sagas:s}=t,{all:r,fork:l}=ReduxSaga.effects,c=a.combineReducers({[t.cfsApi.reducerPath]:t.cfsApi.reducer,[t.contentApi.reducerPath]:t.contentApi.reducer,[t.aflmContentApi.reducerPath]:t.aflmContentApi.reducer,[t.aflApi.reducerPath]:t.aflApi.reducer,[t.cfsCommentaryApi.reducerPath]:t.cfsCommentaryApi.reducer,token:i.token.root,seasons:i.seasons.root,rounds:i.rounds.root,stats:i.stats.root,teamStats:i.teamstats.root,playerStats:i.playerstats.root,...s.mcPlayerStats.root.map(l),matchCentre:i.mcPlayerStats.root,customTable:i.customtable.root,statsPlayerProfile:i.statsplayerprofile.root,brownlowTracker:i.brownlowtracker.root,bettingVis:i.bettingVis.root,competitionNav:i.competitionNav.root,eventsListing:i.eventsListing.root,siteSettings:i.siteSettings.root}),d=!["adel-prod","bl-prod","carl-prod","coll-prod","ess-prod","fre-prod","gcfc-prod","geel-prod","gws-prod","haw-prod","melb-prod","nmfc-prod","port-prod","rich-prod","stk-prod","syd-prod","wb-prod","wce-prod"].includes(e.environment.label),m=t.createSagaMiddleware(),u=PULSE.app.redux.createListenerMiddleware();t.store=t.configureStore({reducer:c,middleware:e=>e({immutableCheck:!1}).prepend(u.middleware).concat(m).concat(t.aflApi.middleware).concat(t.cfsApi.middleware).concat(t.contentApi.middleware).concat(t.aflmContentApi.middleware).concat(t.cfsCommentaryApi.middleware),devTools:d,preloadedState:n}),m.run((function*(){yield r([l(s.token.root),l(s.seasons.root),l(s.rounds.root),l(s.stats.root),l(s.teamstats.root),l(s.playerstats.root),...s.mcPlayerStats.root.map(l),l(s.customtable.root),l(s.statsplayerprofile.root),...s.brownlowtracker.root.map(l),...s.competitionNav.root.map(l),...s.eventsListing.root.map(l)])})),t.store.dispatch(o.token.GET_TOKEN.request())}(PULSE.app,PULSE.app.redux),function(e,t,a,n){const o="betting-ele-hide",i=".js-betting-vis",s="playingStreams",r=()=>new Date((new Date).setMinutes((new Date).getMinutes()+1));var l=new WeakSet;function c(){setInterval((()=>{this.checkConditions()}),n.TIME.THIRTY_SECS_IN_MS)}function d(e){return"true"===new URLSearchParams(document.location.search).get("disableBettingOdds")}function m(e){return"false"===a.localStorage.getStorage("displayOdds",!0)}function u(){const e=PULSE.app.redux,{store:t,watch:a,cfsApi:o}=e;t.dispatch(o.endpoints.getBettingOdds.initiate(void 0,{subscriptionOptions:{pollingInterval:n.TIME.FIVE_MINS_IN_MS}})).then((e=>_assertClassBrand(l,this,h).call(this,e?.data?.competition?.displayChannels?.web))),a(["cfsAPI","queries","getBettingOdds(undefined)","data","competition","displayInApp","web"],(e=>{_assertClassBrand(l,this,h).call(this,e)}))}function p(e){const t=a.localStorage.getStorage(s,!0);if(t)try{return JSON.parse(t)}catch(e){return console.error("[BettingVis] Erroing parsing cookie.",e),[]}return[]}function h(e){e!==this.wageringDisplayInApp&&(this.wageringDisplayInApp=e,this.checkConditions())}function S(e){return document.querySelectorAll(i)}function f(){_classPrivateGetter(l,this,S)?.forEach((e=>{e?.classList?.add(o)}))}function g(){_classPrivateGetter(l,this,S)?.forEach((e=>{e?.classList?.remove(o)}))}t.bettingVis=new class{get isVisible(){return PULSE.app.redux.store.getState().bettingVis}set isVisible(e){if(e===this.isVisible)return;const{store:t,actions:a}=PULSE.app.redux;t.dispatch(a.bettingVis.setVis(e)),e?_assertClassBrand(l,this,g).call(this):_assertClassBrand(l,this,f).call(this)}constructor(){_classPrivateMethodInitSpec(this,l),_assertClassBrand(l,this,u).call(this),_assertClassBrand(l,this,c).call(this),this.checkConditions()}checkConditions(){!0!==_classPrivateGetter(l,this,d)&&!0!==_classPrivateGetter(l,this,m)?_classPrivateGetter(l,this,p)?.length?this.isVisible=!1:!1!==this.wageringDisplayInApp?this.isVisible=!0:this.isVisible=!1:this.isVisible=!1}addPlayingStream(e){if(_classPrivateGetter(l,this,p)){const t=_classPrivateGetter(l,this,p)?.find((t=>t===e));t||a.localStorage.setStorage(s,JSON.stringify([..._classPrivateGetter(l,this,p),e]),r(),!0)}else a.localStorage.setStorage(s,JSON.stringify([e]),r(),!0);this.checkConditions()}removePlayingStream(e){if(_classPrivateGetter(l,this,p)){const t=_classPrivateGetter(l,this,p).filter((t=>t!==e));t?.length?a.localStorage.setStorage(s,JSON.stringify(t),r(),!0):a.localStorage.clearStorage(s,!0)}this.checkConditions()}watchVisibleChanges(e){PULSE.app.redux.watch(["bettingVis"],e)}}}(PULSE.app,PULSE.app.common,PULSE.core,PULSE.app.common.CONSTANTS),function(e,t,a,n){t.Adverts=function(){const e=this;e.getAdvertWrappers(),e.setListeners(),a.event.windowResize.add({method:e.getAdvertWrappers.bind(e)})},t.Adverts.prototype.setListeners=function(){t.bettingVis.watchVisibleChanges((e=>{if("undefined"!=typeof _telstra&&_telstra.adlib)try{_telstra.adlib.targeting.replace("gambling",e.toString()),_telstra.adlib.refresh()}catch{}}))},t.Adverts.prototype.getAdvertWrappers=function(){const e=this;[].slice.call(document.querySelectorAll(".js-advert")).forEach((t=>{e.styleAdvert(t),e.getAdvertDimensionsList(t)}))},t.Adverts.prototype.getAdvertDimensionsList=function(e){const t=e.getAttribute("data-advert-dimensions").split(", ").sort(((e,t)=>t-e));this.selectAdvertByWidth(e,t)},t.Adverts.prototype.selectAdvertByWidth=function(e,t){const a=t.filter((e=>e.split("x")[0]{e.filter((e=>"attributes"===e.type)).forEach((e=>{const a=e.target;if(!0===t.adVisible(a))t.showAd(e.target);else t.hideAd(e.target)})),e.filter((e=>"childList"===e.type)).forEach((e=>{[].slice.call(e.addedNodes).concat([].slice.call(e.removedNodes)).filter((e=>void 0!==e.classList&&e.classList.contains("tmframe"))).forEach((a=>{a.offsetHeight>0&&t.showAd(e.target),t.hideAd(e.target)}))}))})).observe(e,{attributes:!0,attributeFilter:["style"],subtree:!0,childList:!0})},t.Adverts.prototype.hideAd=function(e){const t=e.closest(".advert"),a=e.closest(".js-content-advert")??e.closest(".widget--advert");t.classList.remove("advert--initialised"),a&&a.classList.add("u-hide")},t.Adverts.prototype.showAd=function(e){const t=e.closest(".advert"),a=e.closest(".js-content-advert")??e.closest(".widget--advert");t.classList.add("advert--initialised"),a&&a.classList.remove("u-hide")},t.Adverts.prototype.adVisible=function(e){return"none"!==getComputedStyle(e).display};const o=function(){return window.innerWidth>e.measurements.tablet?"desktop":window.innerWidthe.measurements.phablet?"tablet":"mobile"},i=function(){if(window.CLUB_LABEL)return n.CLUBS_PUBLISHER_VALUES[window.CLUB_LABEL]},s=function(){const e=document.querySelector('[property="adverts:site-area"]');if(e)return e.getAttribute("content");switch(!0){case t.url.contains(""):return"HOME";case t.url.contains("news"):return"NEWS";case t.url.contains("videos"):case t.url.contains("video"):return"VIDEOS";case t.url.contains("ladder"):return"LADDER";case t.url.contains("match-centre"):case t.url.contains("match"):return"MATCHES";case t.url.contains("fixture",2):case t.url.contains("fixtures",2):return"FIXTURE";case t.url.contains("players"):case t.url.contains("teams"):case t.url.contains("team"):return"TEAMS";case t.url.contains("injury-list",2):return"INJURY";default:return"BLANK"}};e.advertsInstance=new t.Adverts}(PULSE.app,PULSE.app.common,PULSE.core,PULSE.app.common.CONSTANTS),(e=>{const{STATUS_CODES:t}=e.common.CONSTANTS;e.common.api||(e.common.api={teams:{}}),e.common.api.teams||(e.common.api={...e.common.api,teams:{}}),e.common.api.teams.team=t=>fetch(`${e.environment.api}teams/${t}`).then((e=>e.json())).then(a);const a=e=>e?.meta?.code!==t.SUCCESS?null:Array.isArray(e?.teams)?e.teams[0]:null})(PULSE.app),function(e,t,a,n){const o=".js-content-advert",i=".js-advert";a.InitAdvert=class{constructor(e,t,s){if(this.container=e,this.nodeList=t,this.listContainer=s,this.advert=this.container.querySelector(o),this.advert){const e=parseInt(this.advert.dataset.advertIndex);if(this.nodeList.length{const t=".js-alert-text",a={danger:"alert-exclamation"},n={text:"",type:"default",icon:"",className:""};const o=(e,t)=>{const o={...e??n,...t};return o.icon=a[o.type],o},i=e=>!["helper","render","environment"].includes(e);e.Alert=class{constructor(a,n){var s=this;_defineProperty(this,"RENDER",{NONE:()=>null,TEXT:()=>{this.container.querySelector(t).textContent=this.model.text},FULL:()=>{this.container.innerHTML=e.templating.render(this.model,"common.alert")}}),_defineProperty(this,"update",(e=>{const t=o(this.model,e),a=this.getRenderType(t,this.model);this.model=t,this.render(a)})),_defineProperty(this,"render",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"FULL";s.RENDER[e]()})),_defineProperty(this,"remove",(()=>{this.container.innerHTML=""})),_defineProperty(this,"getRenderType",((a,n)=>{if(!this.container.querySelector(t))return"FULL";const o=[];e.common.objectHelper.forEach(a,((e,t)=>{i(e)&&o.push({key:e,matches:t===n[e]})}));const s=o.filter((e=>!e.matches)).length;return 0===s?"NONE":o.find((e=>"text"===e.key)).matches||1!==s?"FULL":"TEXT"})),this.container=a,this.model=o(null,n)}}})(PULSE.app),function(e){e.analytics.trackEvent=function(e){if(e){const t={event:"click",contentType:"widget"};void 0!==window.dataLayer?dataLayer.push({...t,...e}):console.warn("dataLayer not found when trying to track event")}},e.analytics.addEventTracking=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;[].slice.call(a.querySelectorAll(".js-tracked-event")).filter((e=>"click"===e.getAttribute("data-event-type"))).forEach((a=>{e.common.addAriaClickListener(a,t)}))};const t=function(t){const a=t.currentTarget;e.analytics.trackEvent({eventCategory:a.getAttribute("data-event-category"),eventLabel:a.getAttribute("data-event-label"),eventAction:a.getAttribute("data-event-action")})};e.analytics.addEventTracking()}(PULSE.app),function(e,t){e.analytics.addExpandTracking=function(n,o,i){if(n){const s=a(n);o&&(s.component_name=o),i&&(s.component_content_type=i),e.tracking.recordEvent(t.TRACKING.EVENTS.SELECT.EXPAND,{eventData:s})}},e.analytics.addCollapseTracking=function(n,o,i){if(n){const s=a(n);o&&(s.component_name=o),i&&(s.component_content_type=i),e.tracking.recordEvent(t.TRACKING.EVENTS.SELECT.COLLAPSE,{eventData:s})}};const a=function(e){let t={};if(e){const a={type:"data-type",component_name:"data-component-name",component_content_type:"data-component-content-type",name:"data-name"};Object.keys(a).forEach((o=>{const i=n(e,a[o]);i&&(t[o]=i)})),t.name||(t.name=o(e))}return t},n=function(e,t){let a;if(e&&t){const n=e.closest(`[${t}]`);n?.attributes[t]?.value&&(a=n.attributes[t].value)}return a},o=function(e){let t;return e&&(e.outerText?.length>0&&(t=e.outerText),t.length>0&&(t=i(t),t.length>0&&(t=t.split("\n")[0]||""))),t},i=function(e){let t;return e&&(t=e.replace(/\s{2,}/g,"").replace(/<.+>.*<\/.+>/gi,"").replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")),t}}(PULSE.app,PULSE.app.common.CONSTANTS),function(){PULSE.app.analytics.convertFiltersValues=(e,t,a,i)=>{const s=e.map((e=>n(e,t)));return{types:s.map((e=>e.name)),values:s.map((e=>o(e.filterId,e.value,i,a)))}};const e={COMPETITION:{id:"competition",key:"competition.id"},SEASON:{id:"season",key:"season.id"},ROUND:{id:"round",key:"round"},TEAM:{id:"team",key:"team.id"},LOCATION:{id:"location",key:"location.location"},REGION:{id:"region",key:"location.name"},POSITION:{id:"position",key:"position"},FILTERS_TEAMS:{id:"teams",key:"filters.teams"},FILTERS_VENUES:{id:"venues",key:"filters.venues"},FILTERS_CITIES:{id:"cities",key:"filters.cities"},STATS:{id:"stats",key:"stats"},STATS_TEAMS:{id:"statsTeams",key:"statsTeams",name:"teams"},DATA_TYPE:{id:"dataType",key:"dataType.type",name:"data type"},CLUB:{id:"club",key:"team.id"},SHOW_PREDICTED:{id:"showPredicted",key:"showPredicted",name:"show predicted"},SORT_BY_FAVOURITES:{id:"sortByFavourites",key:"sortByFavourites",name:"sort by favourites"},CATEGORY:{id:"category",key:"category"},CAREER_SEASON:{id:"career-season",key:"season.id",name:"career / season"},BENCHMARKING:{id:"benchmarking",key:"benchmarking.isActive"},PERFORMANCE_STAT:{id:"performancechart-stat",key:"category",name:"stat"},HOME_AWAY:{id:"homeaway",key:"homeAway",name:"home / away"},OTHER_MATCHES:{id:"otherMatches",key:"otherMatches.isActive",name:"show other matches"}},t=(e,t)=>t.find((t=>t.id===parseInt(e,10)))?.name??"",a=(e,t)=>t.find((t=>t.value===e||t.label===e))?.label??"",n=(t,a)=>{const n=Object.keys(e).find((a=>e[a].id===t));if(n){const o=e[n],i=PULSE.app.common.objectHelper.getValueByKey(a,o.key);return{name:o.name||t,filterId:t,value:Array.isArray(i)?i:["boolean"==typeof i?i.toString():i]}}return null},o=(n,o,i,s)=>{if(0===o.length)return[""];switch(n){case e.COMPETITION.id:return o.map((e=>t(e,s.competitions)));case e.SEASON.id:return o.map((e=>t(e,s.seasons)));case e.ROUND.id:return o.map((e=>{let t=e;if(e.id)if(-1===e.id)t={roundNumber:PULSE.I18N.lookup("label.statsLeaders.nav.round.entireSeason")};else{const a=s.rounds?.find((t=>t.id===e.id));a&&(t=a)}let a=t.roundNumber;return t.abbreviation&&!t.abbreviation.includes("Rd")&&(a=t.name),isNaN(a)?a:0===parseInt(a,10)?`${PULSE.I18N.lookup("label.fixtures.openingRound")}`:-1===parseInt(a,10)?PULSE.I18N.lookup("label.draftTracker.allRounds"):`Round ${a}`}));case e.FILTERS_TEAMS.id:case e.CLUB.id:return o.map((e=>((e,t)=>{if(-1===e)return PULSE.I18N.lookup("label.stats.allClubs");if(!t)return"";const{data:a}=PULSE.app.redux.aflApi.endpoints.getTeams.select(t)(PULSE.app.redux.store.getState());return a?.find((t=>t.id===parseInt(e,10)||t.providerId===e))?.name??""})(e,i)));case e.FILTERS_VENUES.id:return o.map((e=>((e,a)=>{if(!a)return"";const{data:n}=PULSE.app.redux.aflApi.endpoints.getVenues.select(a)(PULSE.app.redux.store.getState());return t(e,n)})(e,i)));case e.POSITION.id:return o.map((e=>a(e.id,s.positions)));case e.DATA_TYPE.id:return o.map((e=>a(e,s.dataTypes)));case e.CAREER_SEASON.id:return o.map((e=>((e,a)=>-1===e?PULSE.I18N.lookup("label.stats.career"):t(e,a))(e,s.seasons)));case e.SHOW_PREDICTED.id:case e.SORT_BY_FAVOURITES.id:case e.OTHER_MATCHES.id:return o;default:return o.map((e=>e&&""!==e?`${e}`:""))}}}(),function(e,t){const a=".sub-menu__drop-down",n="telstra-dropdown-v3__wrapper",o=".clubs-sub-menu__wrapper",i="sub-menu__link--has-drop-down",s="clubs-sub-menu__sub-menu-link--has-drop-down";e.analytics.addNavigationTracking=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;[].slice.call(a.querySelectorAll(".js-tracked-nav-item")).forEach((a=>{let n={};const o=r(a);o&&(n.link_text=o),a.href&&(n.link_url=a.href);const i=a.closest("[data-component-name]");i?.dataset.componentName&&(n.component_name=i.dataset.componentName),n.outbound="_blank"===a.target,n.nav_breadcrumb=l(a,n.link_text),n&&e.common.addAriaClickListener(a,(()=>{m(n,t.TRACKING.EVENTS.SELECT.NAV_ITEM)}))}))},e.analytics.addPartnerTracking=function(a){Array.from(a.querySelectorAll(".js-tracked-partner-item")).forEach((a=>{let n={name:a.dataset.name.toLowerCase(),tier:a.dataset.tier.toLowerCase(),link_url:a.href};e.common.addAriaClickListener(a,(()=>{m(n,t.TRACKING.EVENTS.SELECT.PARTNER)}))}))};const r=function(e){let t;return e&&(e.outerText?.length>0&&(t=e.outerText),!t&&e.innerHTML?.length>0&&(t=e.innerHTML),(!t||e.classList.contains("club-list__club-link"))&&e.title?.length>0&&(t=e.title),t&&(t=d(t))),t},l=function(e,t){let a;a="aflw"===window.location.pathname.split("/")[1]?"AFLW":"AFL";const n=c(e);return n&&(a+=`>${n}`),t&&(a+=`>${t}`),a},c=function(e){let t;return e.classList.contains("navigation__link--in-drop-down")&&e.title?.length>0?t=e.title:e.closest(`nav.${n}`)?.ariaLabel?t=e.closest(`nav.${n}`).ariaLabel:e.closest(a)?.parentElement?.querySelector(`button.${i}`)?t=e.closest(a).parentElement.querySelector(`button.${i}`).outerText:e.closest(o)?.parentElement?.querySelector(`button.${s}`)&&(t=e.closest(o).parentElement.querySelector(`button.${s}`).outerText),t=d(t),t},d=function(e){let t;return e&&(t=e.replace(/\s{2,}/g,"").replace(/<.+>.*<\/.+>/gi,"").replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")),t},m=function(t,a){e.tracking.recordEvent(a,{eventData:t})}}(PULSE.app,PULSE.app.common.CONSTANTS),function(e,t){const a=".js-search-item",n=".js-media-thumbnail__absolute-link";e.analytics.addSearchTracking=function(a){if(a){let n={};const o=a.closest("[data-component-name]");o?.dataset.componentName&&(n.component_name=o.dataset.componentName,e.tracking.recordEvent(t.TRACKING.EVENTS.SELECT.SEARCH,{eventData:n}))}},e.analytics.itemSelectionTracking=function(){this.container.querySelectorAll(a).forEach(((e,t)=>{e.addEventListener("click",(()=>{const a=e.querySelector(n);PULSE.app.tracking.recordEvent(PULSE.app.common.CONSTANTS.TRACKING.EVENTS.SELECT.SEARCH_RESULT,{eventData:{component_name:"global search",search_term:this.term,sort:o(this.sort),filter:s(this.type),count:t+1,link_text:a.getAttribute("title")||a.ariaLabel,link_url:a.getAttribute("href"),component_content_type:i(a.dataset.contentType)}})}))}))},e.analytics.playerSelectionTracking=function(e,t,a,n,o,i){PULSE.app.tracking.recordEvent(PULSE.app.common.CONSTANTS.TRACKING.EVENTS.SELECT.SEARCH_RESULT,{eventData:{component_name:a,search_term:e,count:o+1,link_text:n,link_url:t,filter:i||""}})};const o=function(e){switch(e){case"publish_from desc":default:return"latest";case"":return"relevance"}},i=function(e){switch(e){case"text":return t.TRACKING.CONTENT_TYPES.ARTICLE;case"video":return t.TRACKING.CONTENT_TYPES.VIDEO;case"playlist":return t.TRACKING.CONTENT_TYPES.ALBUM;default:return t.TRACKING.CONTENT_TYPES.ALL}},s=function(e){switch(e){case"TEXT":return t.TRACKING.CONTENT_TYPES.NEWS;case"VIDEO":return t.TRACKING.CONTENT_TYPES.VIDEOS;case"PLAYLIST":return t.TRACKING.CONTENT_TYPES.GALLERIES;default:return t.TRACKING.CONTENT_TYPES.ALL}}}(PULSE.app,PULSE.app.common.CONSTANTS),function(e,t){e.analytics.addSponsorTracking=function(t){if(!t)return;[].slice.call(t.querySelectorAll(".js-tracked-sponsor-item")).forEach((t=>{let o={};const i={name:"data-name",type:"data-type",component_name:"data-component-name",component_content_type:"data-component-content-type",link_text:"data-link-text"};if(Object.keys(i).forEach((e=>{const n=a(t,i[e]);n&&(o[e]=n)})),!o.name){const e=a(t,"data-sponsor-name");e&&(o.name=e)}t.href&&(o.link_url=t.href),e.common.addAriaClickListener(t,(()=>n(o)))}))};const a=function(e,t){let a;if(e&&t){const n=e.closest(`[${t}]`);n?.attributes[t]?.value&&(a=n.attributes[t].value)}return a},n=function(a){e.tracking.recordEvent(t.TRACKING.EVENTS.SELECT.SPONSOR,{eventData:a})}}(PULSE.app,PULSE.app.common.CONSTANTS),function(e){e.analytics.trackArticleView=function(){t("articleView",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},e.analytics.trackFixtureView=function(){t("virtualPageview",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},e.analytics.trackLadderView=function(){t("virtualPageview",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},e.analytics.trackGalleryModalView=function(){t("virtualPageview",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})};const t=function(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.common.CONSTANTS.TRACKING.BASE,o=e.tracking.getSiteDetails();void 0!==window.dataLayer?dataLayer.push({event:t,...n,...o,...a}):console.warn("dataLayer not found when trying to track articleView")}}(PULSE.app),((e,t)=>{const a="access_token",n=(()=>{const{domain:t}=e.environment,a=Array.isArray(t)?t[0]:t;return a.includes("localhost")?null:a})();e.authentication=e.authentication??{},e.authentication.setAuthenticationCookie=e=>{if(!e)return!1;const t=window.jwt_decode(e);return!!o(t)&&(s(e,t),!0)},e.authentication.isUserAuthenticated=()=>{const e=i();if(!e)return!1;const t=window.jwt_decode(e),a=o(t);return a||r(),a},e.authentication.logout=()=>{i()&&(r(),PULSE.app.tracking.recordEvent(PULSE.app.common.CONSTANTS.TRACKING.EVENTS.LILO.ACTION.LOGOUT,{eventData:{form_name:PULSE.app.common.CONSTANTS.TRACKING.EVENTS.LILO.ACTION.LOGOUT,form_id:"user-menu"}}),-1!==window.location.href.indexOf("/exclusive")?window.location.href=window.location.origin:window.location.reload())},e.authentication.getAuthHeader=()=>{const e=i();return e?{label:"Authorization",value:`Bearer ${e}`}:null};const o=e=>{if(!e)return!1;const{exp:t,nbf:a}=e;if(!t||!a)return null;const n=Date.now()/1e3;return t>=n&&a<=n},i=()=>t.localStorage.getStorage(a,!0),s=(e,o)=>{let i=n;-1!==i.indexOf("localhost")&&(i="localhost"),t.localStorage.setStorage(a,e,new Date(1e3*o.exp),!0,i),PULSE.app.tracking.recordEvent(PULSE.app.common.CONSTANTS.TRACKING.EVENTS.LILO.ACTION.LOGIN,{eventData:{form_name:PULSE.app.common.CONSTANTS.TRACKING.EVENTS.LILO.ACTION.LOGIN,form_id:"ticketmaster-login-form",login_type:PULSE.app.common.CONSTANTS.TRACKING.EVENTS.LILO.TYPE.TICKETMASTER}})},r=()=>{let e=n;-1!==e.indexOf("localhost")&&(e="localhost"),t.localStorage.clearStorage(a,!0,e)}})(PULSE.app,PULSE.core),PULSE.app.common.configChecker=function(e,t,a){const n=[];return t=t||{},a.forEach((function(e){if(!t[e.namespace])switch(e.type){case"HTMLElement":t.container&&e.selector?(t[e.namespace]=t.container.querySelector(e.selector),t[e.namespace]||n.push(`missing config.${e.namespace}, cannot find an element with the selector '${e.selector}'`)):n.push(`missing config.${e.namespace}`);break;case"NodeList":t.container&&e.selector?(t[e.namespace]=t.container.querySelectorAll(e.selector),t[e.namespace].length<1&&n.push(`missing config.${e.namespace}, cannot find any elements with the selector '${e.selector}'`)):n.push(`missing config.${e.namespace}`);break;default:void 0===e.default?n.push(`missing config.${e.namespace}`):t[e.namespace]=e.default}})),n.length>0?(n.unshift(`You have ${n.length} errors initialising ${e}`),null):t},function(e,t,a,n){const o=[{name:"thumbnailMobile",maxWidth:640,size:{width:120},multipliers:[1,2,3]},{name:"thumbnailDesktop",minWidth:641,size:{width:160},multipliers:[1,2,3]},{name:"default",size:{width:160},multipliers:[1]}];e.ContentSponsor=class{constructor(t,a){this.container=t,this.getPromoData(a),new e.LazyLoad(this.container),this.contentSponsorLabels=[]}getPromoData(e){e&&e.forEach((e=>{const n={url:a.url.createContentPath("PROMO",{pageSize:1},null,e.sid),method:"GET",callback:e=>this.renderSponsorPromo(e),target:this};t.data.request(n.url,n.method,n.callback,n.target)}))}renderSponsorPromo(i){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;const l=this;if(l.contentSponsorLabels.includes("content-sponsor"))return;const c=l.container.querySelectorAll(".js-content-sponsor");let d=!!r,m=!1;if(d||i.tags.forEach((e=>{l.contentSponsorLabels.push(e.label),"official-sponsor"!==e.label&&"content-sponsor"!==e.label||(d=!0)})),!d)return;if(d&&i.tags.forEach((e=>{"sponsor:betting"===e.label&&(m=!0)})),m&&!a.bettingVis.isVisible)return;if(c.length<2&&10!==s)return void setTimeout((function(){l.renderSponsorPromo(i,s+1,d)}),300);if(!c)return;let u=a.content.getContentModel(i,o);u.links&&u.links.length&&(u.promoUrl=u.links[0].promoUrl,u.promoUrlText=u.links[0].linkText,u.promoUrlExternal=u.links[0].external),c.forEach((a=>{a.innerHTML=e.templating.render(u,"common.content-sponsor"),t.style.removeClass(a,n.U_HIDE)})),new e.LazyLoad(l.container)}}}(PULSE.app,PULSE.core,PULSE.app.common,PULSE.app.common.CONSTANTS),function(e,t,a,n){e.convertToUsersLocalTime=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;[].slice.call(e.querySelectorAll(".js-datetime")).forEach((e=>{const t=Number(e.dataset.date),o=e.dataset.format||"DD MMM YY",i=e.dataset.hideIfNew||!1,s=e.dataset.connector||"";if(!t)return;const r=new Date(t).getTime(),l=moment.tz.guess(),c=(new Date).getTime()-r,d=Math.floor(c/(a.TIME.ONE_MINUTE_IN_SECS*a.TIME.ONE_MINUTE_IN_SECS*a.TIME.ONE_SECOND_IN_MS));if(c>a.TIME.RELATIVE_TIME_END)n.style.addClass(e,"u-datetime-notrel"),e.innerHTML=moment(t).tz(l).format(o);else{if(i)return void(e.innerHTML="");0===d?e.innerHTML=PULSE.I18N.lookup("label.now"):1===d?e.innerHTML=PULSE.I18N.lookup("label.timestamp.hours.singular"):d>0&&d=a.TIME.ONE_DAY_IN_HOURS&&d<2*a.TIME.ONE_DAY_IN_HOURS?e.innerHTML=PULSE.I18N.lookup("label.timestamp.days.singular"):d>=a.TIME.ONE_DAY_IN_HOURS&&d1&&void 0!==arguments[1]?arguments[1]:{};this.container=e,this.config=t,this.indentifier=t.indentifier||window.location.pathname,this.init()}init(){a.localStorage.getStorage(`popup-${this.indentifier}`)||(a.localStorage.setStorage(`popup-${this.indentifier}`,!0),this.element=e.templating.render(this.config,"common.information-popup",!0),this.container.insertAdjacentElement("beforeend",this.element),this.setListeners())}setListeners(){this.close=this.element.querySelector(".js-close"),this.close&&t.addAriaClickListener(this.close,this.closePopup.bind(this))}closePopup(){this.element&&a.style.addClass(this.element,"is-hidden")}}}(PULSE.app,PULSE.app.common,PULSE.core),function(e,t){const a={root:null,rootMargin:"0px",threshold:.025};e.LazyLoad=function(e){const t=[].slice.call(e.querySelectorAll(".js-lazy-load")),a=this.getUnobservedElements(t);this.setObservableListener(a)},e.LazyLoad.prototype.getUnobservedElements=function(e){return e.filter((e=>e&&"true"!==e.getAttribute("data-picture-in-view")))},e.LazyLoad.prototype.setObservableListener=function(e){const t=this;t.observer=new IntersectionObserver(n,a),e.forEach((e=>{t.observer.observe(e)}))};const n=e=>{e.forEach((e=>{let t=e.target;if(!t)return;let a=t.getAttribute("data-picture-in-view");if(!1===e.isIntersecting||"true"===a)return;t.setAttribute("data-picture-in-view","true");const n=i(t);n&&t.insertAdjacentHTML("beforeend",n.textContent.trim());let s=t.querySelector(".js-faded-image");s&&(s.complete?o(s,t):s.addEventListener("load",(function(){o(s,t)})))}))},o=function(e,a){t.style.addClass(e,"is-loaded"),t.style.addClass(a,"is-loaded")},i=function(e){for(let t=0;t{r||window.requestAnimationFrame((()=>{o.call(s),r=!1})),r=!0}}),this.observer=new IntersectionObserver(n.bind(this),a),this.observer.observe(this.container)};const n=function(e){e.forEach((e=>{let a=e.target;if(!a)return;let n=a.getAttribute("data-parallax-in-view");if(!1===e.isIntersecting||"true"===n)return;a.setAttribute("data-parallax-in-view","true");const o=a.querySelector(".js-content");t.style.addClass(o,"is-active")}))},o=function(){if(window.innerWidth>e.measurements.tablet){const e=this.container.getBoundingClientRect(),t=e.top<0?Math.abs(e.top):-Math.abs(e.top);this.image.style.transform=`translate3d(0,${t}px,0)`}else this.image.style.transform=null};e.widgetInitialiser.addMultipleWidgetsByName("parallax-content",e.ParallaxContent)}(PULSE.app,PULSE.core),function(e,t,a){e.PlayerHeadshot=class{constructor(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.imgElements=n.querySelectorAll(".js-player-image");let i=this.getCompetitionIds(o.compSeasonProviderId||this.findCompSeasonInDOM());this.imgElements.forEach((s=>{const r=t.CONSTANTS.PLAYER_IMAGE_SIZES[s.dataset.size],l=s.dataset.wrapperClass,c={compAbbrev:i.compAbbrev,compSeasonProviderId:i.providerId,playerId:o.playerId??s.dataset.player,year:s.dataset.year,folder:r.folder};void 0===c.compSeasonProviderId&&s.getAttribute("data-comp-pid")&&(i=this.getCompetitionIds(s.getAttribute("data-comp-pid")),c.compAbbrev=i.compAbbrev,c.compSeasonProviderId=i.providerId);const d={cssClass:s.getAttribute("data-picture-classes"),objectFit:s.getAttribute("data-object-fit"),mediaQueryConfig:[{name:"desktop",tags:["Player Image Desktop","Player Image Desktop (Retina)"],variantUrls:[this.playerImageVariant({...c,scale:r.DESKTOP,imageSize:r.WIDTH||r.HEIGHT,useHeight:r.HEIGHT}),this.playerImageVariant({...c,scale:r.DESKTOP_RETINA,imageSize:r.WIDTH||r.HEIGHT_RETINA,useHeight:r.HEIGHT_RETINA})],minWidth:e.measurements.tablet},{name:"mobile",tags:["Player Image Mobile","Player Image Mobile (Retina)"],variantUrls:[this.playerImageVariant({...c,scale:r.MOBILE_RETINA,imageSize:r.WIDTH||r.HEIGHT_RETINA,useHeight:r.HEIGHT_RETINA}),this.playerImageVariant({...c,scale:r.MOBILE_RETINA,imageSize:r.WIDTH||r.HEIGHT_RETINA,useHeight:r.HEIGHT_RETINA})],maxWidth:e.measurements.tablet},{name:"default",variantUrls:[this.playerImageVariant({...c,scale:r.DESKTOP,imageSize:r.WIDTH||r.HEIGHT,useHeight:r.HEIGHT})]}],useImg:"true"===s.getAttribute("data-picture-in-view")},m=e.templating.render({data:d},"common.lazy-image",!0);l&&a.style.addClass(m,l),s.parentNode.replaceChild(m,s),new e.LazyLoad(n)}))}playerImageVariant(e){return void 0!==e.compAbbrev&&void 0!==e.compSeasonProviderId?t.image.getCompetitionPlayerImage(e.playerId,e.compAbbrev,e.compSeasonProviderId,e.scale,"png",e.imageSize,e.useHeight):t.image.getPlayerImage(e.playerId,e.folder,e.year,e.scale,"png",e.imageSize,e.useHeight)}getCompetitionIds(e){const a={};return null!=e&&(a.providerId=e,0===a.providerId.indexOf("CD_S")&&(a.providerId=a.providerId.replace("CD_S","")),a.compAbbrev=t.match.getCompAbbr(e)),a}findCompSeasonInDOM(){const e=document.querySelector(".js-player-squad-compseason-pid");if(e?.value)return e.value}},e.widgetInitialiser.addMultipleWidgetsByName("player-headshot",e.PlayerHeadshot)}(PULSE.app,PULSE.app.common,PULSE.core),function(e){let t=[];e.validateConfig=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).forEach((e=>{a(e,i),n(e,i),o(i[e.namespace],e)})),!(t.length>0)||(t.unshift(`You have ${t.length} errors initialising ${e}.`),console.warn(t.join("\n")),!1)};const a=(e,a)=>!!a[e.namespace]||(t.push(`Missing configuration property. config.${e.namespace} is required and should be of type ${e.elementType}`),!1),n=(e,a)=>{if(void 0===e.namespace||"undefined"===e.elementType)return;let n=a[e.namespace];"object"==typeof n?void 0===n.length||0!==n.length||t.push(`Empty ${e.elementType.name} under config.${e.namespace}`):t.push(`Could not find ${e.elementType.name} under config.${e.namespace}`)},o=(e,a)=>{void 0!==e&&(e instanceof a.elementType||t.push(`Incorrect type. Expected config.${a.namespace} to be instance of ${a.elementType.name}`))}}(PULSE.app.common),function(e,t,a){a.VisitedLinks=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;t.localStorage.setStorage(`visited-${window.location.pathname}`,!0);const a=[].slice.call(e.querySelectorAll(".js-visited-link"));if(a.length){a.filter((e=>!e.dataset.visited)).forEach((e=>{const a=e.pathname||e.dataset.href;a&&t.localStorage.getStorage(`visited-${a}`)&&(e.dataset.visited=!0)}))}},a.VisitedLinks()}(PULSE.app,PULSE.core,PULSE.app.common),function(e,t){e.contentTracker=function(o,i,s,r){const l={contentType:s||o.dataset.trackerType,contentId:r||o.dataset.trackerId,action:i||o.dataset.trackerAction},c=a(l);if(c.length>0)return c;l.contentId=l.contentId.toString();const d={url:`${t.environment.aflApi}interactions`,headers:[t.accountHeader],data:l,method:"POST",callback:n};return e.data.postData(d.url,d.method,d.data,d.callback),!0};const a=e=>{let t="";return e.contentType||(t+="The content event must include a contentType or 'data-tracker-type' on the element/n"),e.contentId||(t+="The content event must include a contentId or 'data-tracker-id' on the element/n"),e.action||(t+="The content event must include an action or 'data-tracker-action' on the element/n"),t},n=()=>{},o=document.querySelectorAll("[data-tracker-action]");for(let t=0;t0&&(t+=","),t+=a+":"+e.references[a]);e.filters.references=t},t.filterOptions.prototype.updateFilters=function(t){this.filters=e.object.extend(this.filters,t)},t.filterOptions.prototype.updateReferences=function(t){const a=this;void 0!==t&&(a.references&&"string"!=typeof a.references?a.references=e.object.extend(a.references,t):a.references=t,a.addRefsToFilters())},t.filterOptions.prototype.removeReference=function(e){delete this.references[e],this.addRefsToFilters()},t.filterOptions.prototype.get=function(){return this.filters}}(PULSE.core,PULSE.app.common),function(e,t,a){const n=()=>{const e=document.getElementById("js-cookie-notice");t.localStorage.setStorage("only-essential-cookies",!0);const n=document.querySelectorAll(".js-cookie-notice-btn");n.length&&(n.forEach((function(e){e.addEventListener("click",a.setCookies)})),t.style.removeClass(e,"u-hide"))};a.setCookies=e=>{const a=document.location.hostname,n=document.getElementById("js-cookie-notice"),o=e.currentTarget.dataset.acceptAllCookies,i=e=>{t.localStorage.setStorage("only-essential-cookies",e),t.localStorage.setStorage("cookie-policy-chosen",!0,730,!0,a)};if("true"===o){i(!1);const e=new CustomEvent("cookiesAccepted",{detail:"all"});window.dispatchEvent(e)}else if("false"===o){i(!0);const e=new CustomEvent("cookiesAccepted",{detail:"essential"});window.dispatchEvent(e)}t.style.addClass(n,"u-hide")},(()=>{const e=t.localStorage.getStorage("cookie-policy-chosen",!0);e&&"true"===e||n()})()}(PULSE.app,PULSE.core,PULSE.app.common),function(e,t){e.CookieToggle=function(e){const t=this;t.acceptBtn=e.querySelector(".js-accept-btn"),t.declineBtn=e.querySelector(".js-refuse-btn"),t.cookieName=e.dataset.cookieName,t.exclusionCookieName=`${t.cookieName}_exclusion`,t.renderButton(),t.listeners()},e.CookieToggle.prototype.renderButton=function(){const e=this,a="u-hide";t.localStorage.getStorage(e.exclusionCookieName,!0)?(t.style.removeClass(e.acceptBtn,a),t.style.addClass(e.declineBtn,a)):(t.style.addClass(e.acceptBtn,a),t.style.removeClass(e.declineBtn,a))},e.CookieToggle.prototype.listeners=function(){const a=this;a.declineBtn.addEventListener("click",(()=>{t.localStorage.setStorage(a.exclusionCookieName,!0,730,!0,e.environment.domain);let n=new CustomEvent("cookieDeclined",{detail:a.cookieName});window.dispatchEvent(n),a.renderButton()})),a.acceptBtn.addEventListener("click",(()=>{t.localStorage.clearStorage(a.exclusionCookieName,!0,e.environment.domain);let n=new CustomEvent("cookieAdded",{detail:a.cookieName});window.dispatchEvent(n),a.renderButton()}))},e.widgetInitialiser.addMultipleWidgetsByName("cookie-toggle",e.CookieToggle)}(PULSE.app,PULSE.core),function(e){e.statsMap={"afl fantasy points":{name:"aflFantasyPoints",category:"Key Stats",column:"dreamTeamPoints"},goals:{name:"goals",category:"Scoring",column:"goals"},disposals:{name:"disposals",category:"Disposals",column:"disposals"},marks:{name:"marks",category:"Marks",column:"marks"},tackles:{name:"tackles",category:"Key Stats",column:"tackles"},"total clearances":{name:"clearances",category:"Stoppages",column:"totalClearances"},kicks:{name:"kicks",category:"Key Stats",column:"kicks"},handballs:{name:"handballs",category:"Key Stats",column:"handballs"},hitouts:{name:"hitouts",category:"Key Stats",column:"hitouts"}},e.statsBenchmarkingMap={ELITE:{KEY:"ELITE",TEXT:"label.statsLeaders.benchmarking.rank.elite",PERCENTAGE:"label.statsLeaders.benchmarking.explainer.percentage.elite",CLASS_TEXT:"elite"},ABOVE_AVERAGE:{KEY:"ABOVE_AVERAGE",TEXT:"label.statsLeaders.benchmarking.rank.aboveAverage",PERCENTAGE:"label.statsLeaders.benchmarking.explainer.percentage.aboveAverage",CLASS_TEXT:"above-average"},AVERAGE:{KEY:"AVERAGE",TEXT:"label.statsLeaders.benchmarking.rank.average",PERCENTAGE:"label.statsLeaders.benchmarking.explainer.percentage.average",CLASS_TEXT:"average"},BELOW_AVERAGE:{KEY:"BELOW_AVERAGE",TEXT:"label.statsLeaders.benchmarking.rank.belowAverage",PERCENTAGE:"label.statsLeaders.benchmarking.explainer.percentage.belowAverage",CLASS_TEXT:"below-average"}},e.statsPositionsMap={KEY_DEFENDER:"label.stats.positions.keyDefender",MEDIUM_DEFENDER:"label.stats.positions.mediumDefender",MIDFIELDER:"label.stats.positions.midfielder",MIDFIELDER_FORWARD:"label.stats.positions.midfielderForward",MEDIUM_FORWARD:"label.stats.positions.mediumForward",KEY_FORWARD:"label.stats.positions.keyForward",RUCK:"label.stats.positions.ruck"}}(PULSE.app.common),function(e,t){const a={ELEMENT:".js-form-control",INPUT:".js-form-control-input"},n={INVALID:"form-control--invalid"},o={email:{isValid:e=>/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/.test(e),message:"Email address invalid."},required:{isValid:e=>!!e&&e.trim().length>0,message:"FormControl is required."}};const i=(e,t)=>{const a=typeof e.function;return(()=>{switch(a){case"string":return o[e.function].isValid(t);case"function":return e.function(t);default:return!0}})()?{isValid:!0}:{isValid:!1,error:e.message??o[e.function].message}},s=e=>{const t={};for(let a of new FormData(e).entries())t[a[0]]=a[1];return t},r=e=>e.value;e.FormV2Validator=class{constructor(o,l){var c=this;_defineProperty(this,"validate",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const a=s(c.elements.form);let n={isValid:!0,errors:{},values:a};return e.common.objectHelper.forEach(a,((a,o)=>{const i=c.validateFormControl(a,o,t);let s=!0;e.common.objectHelper.forEach(c.formControlState,((e,t)=>{t.touched||(s=!1)})),n={...n,isValid:n.isValid&&i.isValid,errors:{...n.errors,[a]:i.error},haveAllFormControlsBeenTouched:s}})),n})),_defineProperty(this,"validateFormControl",(function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s={isValid:!0};const r=c.schema[e];return r?(r.forEach((e=>{if(!s.isValid)return;const a=i(e,t);a.isValid||(s=a)})),o.silent||c.elements.formControls.find((t=>t.querySelector(`${a.INPUT}[name="${e}"]`))).classList.toggle(n.INVALID,!!s.error),s):s})),_defineProperty(this,"onFormSubmit",(e=>{this.onFormSubmitCallbacks.push(e)})),_defineProperty(this,"onFormControlChange",(e=>{this.onFormControlChangeCallbacks.push(e)})),_defineProperty(this,"bindEventListeners",(()=>{const e=e=>{const t=e.target.getAttribute("name"),a=this.validateFormControl(t,r(e.target)),n=this.formControlState[t];n&&(n.touched=!0),this.onFormControlChangeCallbacks.forEach((e=>e(a)))};this.elements.formControls.forEach((t=>{t.querySelector(a.INPUT).addEventListener("change",e)}));this.elements.form.addEventListener("submit",(e=>{e.preventDefault();const t=this.validate();this.onFormSubmitCallbacks.forEach((e=>{e(t)}))}))})),this.elements={},this.elements.form=o,this.elements.formControls=t.object.makeArray(o.querySelectorAll(a.ELEMENT)),this.schema=l,this.onFormSubmitCallbacks=[],this.onFormControlChangeCallbacks=[],this.formControlState={},e.common.objectHelper.forEach(l,(e=>{this.formControlState[e]={touched:!1}})),this.bindEventListeners()}}}(PULSE.app,PULSE.core),function(e){const t="password-visibility-toggle--password-visible",a=".js-form-control",n=".js-form-control-input";e.widgetInitialiser.addMultipleWidgetsByName("password-visibility-toggle",class{constructor(e){_defineProperty(this,"bindEventListeners",(()=>{this.elements.button.addEventListener("click",(e=>{e.preventDefault();let a=this.elements.input.getAttribute("type");a="password"===a?"text":"password",this.elements.input.setAttribute("type",a),this.elements.button.classList.toggle(t,"text"===a);const n=("password"===a?"Show":"Hide")+" password";this.elements.button.setAttribute("title",n)}))})),this.elements={button:e,input:e.closest(a).querySelector(n)},this.bindEventListeners()}})}(PULSE.app),function(e,t,a){const n="js-match-clock";const o=e=>e.format("mm:ss",{trim:!1});e.MatchClock=class{constructor(e,t){this.container=e,this.options=t,this.updateTime()}updateTime(){this.timeout&&clearTimeout(this.timeout),t.style.hasClass(this.container,n)?this.timeElement=this.container:this.timeElement=this.container.querySelector(`.${n}`),this.timeElement&&(this.duration=moment.duration(`00:${this.timeElement.innerHTML}`,"seconds"),this.direction=t.style.hasClass(this.timeElement.parentElement,"is-countdown")?"down":"up",this.periodNumber=!!this.timeElement.parentElement.hasAttribute("data-period")&&this.timeElement.parentElement.getAttribute("data-period"),this.hideableText=this.container.querySelector(".is-hideable"),this.tick())}tick(){"up"===this.direction?this.duration=this.duration.add(1,"seconds"):"down"===this.direction&&(this.duration=this.duration.subtract(1,"seconds")),requestAnimationFrame(this.renderTime.bind(this)),this.timeout=setTimeout(this.tick.bind(this),a.TIME.ONE_SECOND_IN_MS)}renderTime(){if(this.timeElement){let e="";"up"===this.direction?e=o(this.duration):"down"===this.direction&&(this.duration.asSeconds()<1?(this.hideableText&&this.hideableText.remove(),e=PULSE.I18N.lookup("label.mc.clock.startingSoon")):e=this.options?.countdownSuffix?o(this.duration)+" "+this.options.countdownSuffix:o(this.duration)),this.timeElement.innerHTML=e}}}}(PULSE.app,PULSE.core,PULSE.app.common.CONSTANTS),function(e,t){e.StructuredData=function(){a()&&this.generateData()},e.StructuredData.prototype.generateData=function(){const e=[{"@context":"https://schema.org","@type":"WebPage",name:n()||"",description:o()||""}];t.jsonInjector(e)};const a=()=>{switch(!0){case t.url.contains(""):case t.url.contains("news"):case t.url.contains("videos"):case t.url.contains("video"):return!1;default:return!0}},n=()=>{const e=document.querySelector('meta[property="og:title"]');if(e)return e.getAttribute("content")},o=()=>{const e=document.querySelector('meta[property="og:description"]');if(e)return e.getAttribute("content")};new e.StructuredData}(PULSE.app,PULSE.app.common),function(e,t,a,n){const o="gallery-modal",i={LAZY_IMAGE:"common.lazy-image"},s="u-body-fixed",r="close",l="open",c="ready",d="expand-items";e.PlaylistModal=class{constructor(e){this.container=e,this.modalSelector=`#${e.id}`,this.modalId=e.dataset.modalId,this.pageSize=e.dataset.pageSize,this.galleryContainer=e.querySelector(".js-modal-gallery"),this.expandAllItems=e.querySelector(".js-expand-thumbs"),this.allItems=this.container.querySelector(".js-all-items"),this.loader=this.container.querySelector(".js-modal-loader"),this.modalConfig={selector:`[data-ui-modal="${this.modalSelector}"]`,openClass:"open",modalWrapId:this.modalId,openCallback:this.openModal.bind(this),closeCallback:this.closeModal.bind(this),modalWrapClass:"modal-wrap",modalContentWrapClass:"modal-content"},p.call(this)}checkUrlForModal(e){const t=new URL(window.location.href),a=t.searchParams.get("modal"),n=t.searchParams.get("type");a&&e===n&&("video"===n&&(this.muted=!0),setTimeout((()=>{this.openModal()}),600))}openModal(a){this.firstPlay=!0,this.modalObject=a;const o="true"===this?.modalObject?.config?.current?.uiArgs?.isExclusive,i=e.authentication.isUserAuthenticated();if(o&&!i)return e.GalleryPlaylistModal.close(),void(location.href=this.modalObject.config.current.uiArgs.link);u.call(this),t.style.addClass(this.container,l),t.style.addClass(this.modal,l),this.scrollPosition=window.scrollY,void 0===this.pageUrl&&(this.pageUrl=window.location.url),setTimeout((()=>{document.body.classList.add(s),t.style.addClass(this.container,c)}),600);const d=this.modalObject?this.modalObject.config.current.uiArgs.directContentReference:null,m=this.modalObject?this.modalObject.config.current.uiArgs.promoTitle:null;setTimeout((()=>{d?this.renderDirectReference():this.makeRequest()}),200),d?t.style.addClass(this.container,"promo-modal"):t.style.removeClass(this.container,"promo-modal"),m?t.style.addClass(this.container,"promo-title"):t.style.removeClass(this.container,"promo-title"),t.style.removeClass(this.modal,r),this.loader&&this.loader.classList.remove(n.U_HIDE),this.originalPageTitle=document.title,this.updateUrl(),this.updateVirtualTracking()}closeModal(){t.style.removeClass(document.body,s),t.style.addClass(this.modal,r),t.style.removeClass(this.container,c),t.style.removeClass(this.container,d),history.replaceState("","",this.pageUrl),"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual"),void 0!==this.timeout&&clearTimeout(this.timeout),window.scrollTo(0,this.scrollPosition),this.updatePageMetaTags(!1)}makeRequest(){const e={url:m.call(this).endpoint,method:"GET",callback:this.renderModalContent,target:this};t.data.request(e.url,e.method,e.callback,e.target)}renderThumbnailSlider(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.MODAL_ALL_ITEMS;const s={},r=n.VARIANT_CONFIGURATIONS.GALLERY_MODAL_THUMBNAIL;s.items=t.map((t=>{const n=t.response||t;let o=a.content.getContentModel(n,r);return o.lazyImage=e.templates[i.LAZY_IMAGE],o.objectFit=!0,o.contentType=n.type,{data:o}})),s.mediaThumbnailClass="media-thumbnail--modal js-expanded-item",this.allItems.innerHTML=e.templating.render(s,o),e.convertToUsersLocalTime(this.allItems),new e.LazyLoad(this.allItems),this.thumbnails=[].slice.call(this.allItems.querySelectorAll(".js-expanded-item")),this.thumbnailList=this.allItems.querySelector(".js-expanded-list"),this.thumbnailPrev=this.allItems.querySelector(".js-thumbnail-prev"),this.thumbnailNext=this.allItems.querySelector(".js-thumbnail-next"),this.slider=new a.Slider({container:this.container.querySelector(".js-slider-container"),perPage:6,slideContainer:this.thumbnailList,sliderElements:this.thumbnails,nextButton:this.thumbnailNext,prevButton:this.thumbnailPrev,itemActiveClass:"is-active",buttonHideClass:"is-inactive"}),this.listenForThumbnailEvents()}updateUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new URL(window.location.href);let a=""!==e?e:this.modalObject?this.modalObject.config.current.uiArgs.link:window.location.href;t.searchParams.get("tagNames")&&(a+=`&tagNames=${t.searchParams.get("tagNames")}`),t.searchParams.get("references")&&(a+=`&references=${t.searchParams.get("references")}`),history.replaceState({},{},a)}updatePageMetaTags(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const a=document.querySelector('meta[property="og:url"]'),n=document.querySelector('meta[name="twitter:url"]'),o=new URL(window.location.href),i=document.querySelector(".js-metadata");a&&a.setAttribute("content",o),n&&n.setAttribute("content",o),e||(i&&i.dataset.title?document.title=i.dataset.title:this.originalPageTitle&&(document.title=this.originalPageTitle)),e&&null!==t&&(document.title=t.title,t.metadata&&t.metadata.longTitle&&(document.title=t.metadata.longTitle))}updateVirtualTracking(){this.modalId===o&&e.analytics.trackGalleryModalView()}};const m=function(){const t=new URL(window.location.href);this.playlistId=t.searchParams.get("playlistId");const a=this.playlistId?"playlist":t.searchParams.get("type"),n=t.searchParams.get("publishFrom");let o=t.searchParams.get("tagNames")||"",i=t.searchParams.get("references")||"";void 0!==this.modalObject&&(!o&&this.modalObject.config.current.uiArgs.tag&&(o=this.modalObject.config.current.uiArgs.tag),!i&&this.modalObject.config.current.uiArgs.references&&(i=this.modalObject.config.current.uiArgs.references));const s={pageSize:this.pageSize,references:i,tagNames:o,detail:"DETAILED"};"video"===a&&(s.tagExpression='!"AFLClubExclusive:Yes"'),"video"===t.searchParams.get("type")&&"video"===a&&(s.publishedBefore=n),"video"===t.searchParams.get("type")&&"playlist"===a&&(s.pageSize="");const r={filter:s,type:a,playlistId:this.playlistId};return r.endpoint=e.common.url.createContentPath(r.type,r.filter,"en",r.playlistId),r},u=function(){this.allItems&&(this.allItems.innerHTML="")},p=function(){document.querySelectorAll(`[data-ui-modal="${this.modalSelector}"]`).forEach((e=>{a.addAriaClickListener(e,(e=>{e.preventDefault()}))}))}}(PULSE.app,PULSE.core,PULSE.app.common,PULSE.app.common.CONSTANTS),function(e,t,a,n,o){const i="common.lazy-image",s="common.modal-gallery-list",r="common.modal-all-photos",l="show",c="in-active",d="is-active",m="is-active--left",u="is-active--right",p="is-loaded",h="is-selected",S="expand-items",f=".js-floating-bar-scroll",g=n.CONSTANTS.TRACKING.EVENTS;e.GalleryModal=class extends e.PlaylistModal{constructor(e){super(e),this.nextControl=this.container.querySelector(".js-modal-control-next"),this.prevControl=this.container.querySelector(".js-modal-control-prev"),this.modalSlider=this.container.querySelector(".js-modal-slider-overlay"),this.eventHandlers=null,this.focusTrapHandlers=null,this.initModal(),this.setListeners();const t=new URL(window.location.href),a=t.pathname.match(/(\/albums\/[0-9]+)/g);this.pageUrl=a?`${t.href.substring(0,t.href.indexOf("/albums"))}/albums`:window.location.href,this.checkUrlForModal("gallery")}initModal(){void 0===e.GalleryPlaylistModal&&(e.GalleryPlaylistModal=new t.modal(this.modalConfig)),this.modal=document.getElementById(this.modalId)}eventHandlers(){n.addOnTouchStartListener(this.modalSlider,_.bind(this,g.CAROUSEL.TYPE.SWIPE),v.bind(this,g.CAROUSEL.TYPE.SWIPE))}setListeners(){this.container.querySelector(".js-modal-close").addEventListener("click",(t=>{t.preventDefault(),e.GalleryPlaylistModal&&e.GalleryPlaylistModal.close()})),n.addAriaClickListener(this.nextControl,v.bind(this,g.CAROUSEL.TYPE.ARROW),!0),n.addAriaClickListener(this.prevControl,_.bind(this,g.CAROUSEL.TYPE.ARROW),!0),n.addAriaClickListener(this.expandAllItems,(()=>{this.container.classList.toggle(S)}))}closeModal(){super.closeModal(),a.style.removeClass(this.galleryContainer,l),a.style.removeClass(this.prevControl,c),this.eventHandlers&&(n.removeOnTouchStartListener(this.modalSlider,this.eventHandlers),this.eventHandlers=null),this.focusTrapHandlers&&(n.removeFocusTrap(this.container,this.focusTrapHandlers),this.focusTrapHandlers=null)}renderModalContent(t){if(null===this.eventHandlers&&(this.eventHandlers=n.addOnTouchStartListener(this.modalSlider,_.bind(this,g.CAROUSEL.TYPE.SWIPE),v.bind(this,g.CAROUSEL.TYPE.SWIPE))),null===this.focusTrapHandlers&&(this.focusTrapHandlers=n.addFocusTrap(this.container)),!t||!t.items||!t.items.length)return;const s={},l=o.VARIANT_CONFIGURATIONS.GALLERY_MODAL,c=o.VARIANT_CONFIGURATIONS.GALLERY_MODAL_PORTRAIT;if(s.publishedItems=t.items.filter((e=>null!==e.response)),s.items=s.publishedItems.map((a=>{const o=a.response||a;let s=l,r=!1;n.content.isPortrait(o)&&(r=!0,s=c);let d=n.content.getContentModel(o,s);return d.lazyImage=e.templates[i],d.objectFit=!0,d.contentType=o.type,d.isPortrait=r,d.cssClass=r?"is-portrait":"",o.id===t.coverItem.id&&(d.coverItem=!0),{...d}})),t.coverItem&&this.loader&&this.loader.classList.add(o.U_HIDE),t&&t.references){const n=t.references.filter((e=>"PROMO"===e.type));if(n)new e.ContentSponsor(this.container,n);else{this.container.querySelectorAll(".js-content-sponsor").forEach((e=>{e.innerHTML="",a.style.addClass(e,o.U_HIDE)}))}}t.title&&(this.componentName=t.title),y.call(this,s.items),this.renderThumbnailSlider(s.items,r),E.call(this),new n.contentTracker(!1,o.CONTENT_TRACKER.ACTION.VIEW,o.CONTENT_TRACKER.TYPE.PLAYLIST,t.id),this.updatePageMetaTags(!0,t);this.modal.querySelector(f)&&(this.modal.querySelector(f).scrollTop=0)}listenForThumbnailEvents(){this.thumbnails.forEach((t=>{n.addAriaClickListener(t,(a=>{a.preventDefault();let n=t.dataset.photoIndex;if(n===this.thumbIndex)return;const o=parseInt(this.thumbIndex)>parseInt(n)?g.CAROUSEL.DIRECTION.PREVIOUS:g.CAROUSEL.DIRECTION.NEXT;T.call(this,n),A.call(this,n),this.thumbIndex=n,e.tracking.recordEvent(g.CAROUSEL.EVENT_NAME,{eventData:{...this.trackingEvent,direction:o,index:parseInt(n)+1,type:g.CAROUSEL.TYPE.THUMB}})}))}))}};const y=function(t){const a={items:t};this.galleryContainer.innerHTML=e.templating.render(a,s),new e.LazyLoad(this.galleryContainer),this.galleryList=[].slice.call(this.container.querySelectorAll(".js-gallery-item")),this.trackingEvent={component_name:this.componentName||"",component_content_type:g.CAROUSEL.CONTENT_TYPE.GALLERY,count:this.galleryList.length}},E=function(){const e=this.galleryList.find((e=>"0"===e.dataset.photoIndex));this.galleryContainer.classList.add(l),e.classList.add(d),a.style.addClass(this.prevControl,c),a.style.removeClass(this.nextControl,c),T.call(this,0)},T=function(e){if(this.thumbnails.forEach((e=>{e.classList.remove(h)})),this.thumbnails[Number(e)].classList.add(h),this.slider){const t=this.slider.getItemSlide(this.thumbnails[Number(e)]);this.slider.slideTo(parseInt(t))}},A=function(e){0===parseInt(e)?a.style.addClass(this.prevControl,c):a.style.removeClass(this.prevControl,c),parseInt(e)===this.galleryList.length-1?a.style.addClass(this.nextControl,c):a.style.removeClass(this.nextControl,c);const t=this.galleryList.find((e=>a.style.hasClass(e,d)))??this.galleryList[0];let n=0;t&&(n=Number(e)),b.call(this,n,t)},_=function(t){let n=0;a.style.hasClass(this.nextControl,c)&&a.style.removeClass(this.nextControl,c);const o=this.galleryList.find((e=>a.style.hasClass(e,d)));o&&(n=Number(o.dataset.photoIndex)-1),0===n&&a.style.addClass(this.prevControl,c);(function(){this.galleryList[n].classList.remove(m),this.galleryList[n].classList.remove(u),this.galleryList[n].classList.add(m)}).call(this),b.call(this,n,o),T.call(this,n),e.tracking.recordEvent(g.CAROUSEL.EVENT_NAME,{eventData:{...this.trackingEvent,direction:g.CAROUSEL.DIRECTION.PREVIOUS,index:n+1,type:t||""}})},v=function(t){let n=0;a.style.hasClass(this.prevControl,c)&&a.style.removeClass(this.prevControl,c);const o=this.galleryList.find((e=>a.style.hasClass(e,d)));o&&(n=Number(o.dataset.photoIndex)+1),n===this.galleryList.length-1&&a.style.addClass(this.nextControl,c);(function(){this.galleryList[n].classList.remove(m),this.galleryList[n].classList.remove(u),this.galleryList[n].classList.add(u)}).call(this),b.call(this,n,o),T.call(this,n),e.tracking.recordEvent(g.CAROUSEL.EVENT_NAME,{eventData:{...this.trackingEvent,direction:g.CAROUSEL.DIRECTION.NEXT,index:n+1,type:t||""}})},b=function(e,t){this.galleryContainer.classList.add(l),this.galleryList[e].classList.add(d),t&&(t.classList.remove(d),t.classList.remove(m),t.classList.remove(u));const a=this.galleryList[e].querySelector(".js-faded-image");a&&a.classList.add(p)};e.widgetInitialiser.addWidget("gallery-modal",e.GalleryModal)}(PULSE.app,PULSE.ui,PULSE.core,PULSE.app.common,PULSE.app.common.CONSTANTS),function(e,t,a){const n=".js-lazy-load",o=".js-body-content",i=".js-modal",s="[ data-modal ]",r=()=>c,l=()=>d;a.Modal=function(e,t){const c=this;c.root=e,c.imageSelector=n,c.containerSelector=t.containerSelector||o,c.modalSelector=t.modalSelector||i,c.modalMarker=t.modalMarker||s,c.renderModal=t.renderModal||r(),c.onDomUpdate=t.onDomUpdate||l(),c.modal=null,c.ancestor=null,c.container=document.querySelector(c.containerSelector),c.container&&a.addAriaClickListener(c.root,c.delegateClick.bind(c))},a.Modal.prototype.doModal=function(e){const t=this,a=t.renderModal(e);a&&(t.modal?t.modal.outerHTML=a:t.container.insertAdjacentHTML("beforeend",a),t.modal=t.container.querySelector(t.modalSelector),t.onDomUpdate(t.modal))},a.Modal.prototype.delegateClick=function(e){const t=this;t.ancestor=e.target.closest(t.modalMarker),t.ancestor&&(e.preventDefault(),t.doModal(t.ancestor))},a.Modal.prototype.closeModalInstance=function(){const e=this;e.boundEvents&&a.removeAriaClickListener(e.modal,e.boundEvents),e.modal.remove(),e.modal=null};const c=function(t){const a=t.querySelector(this.imageSelector);if(!a)return"";const n={leadMediaUrls:{thumbnail:a.getAttribute("data-desktop-img"),thumbnailRetina:a.getAttribute("data-desktop-img-retina"),thumbnailMobile:a.getAttribute("data-mobile-img"),thumbnailMobileRetina:a.getAttribute("data-mobile-img-retina")},lazyImage:e.templates["common.lazy-image"],objectFit:!1};return e.templating.render({data:n,PULSE:PULSE},"common.modal")},d=function(t){t&&(new e.LazyLoad(t),m.call(this,t),p.call(this,t))},m=function(e){this.boundEvents=a.addAriaClickListener(e,u.bind(this))},u=function(e){const t=this,a=e.target.dataset.modalAction;let n;if("prev"===a?n=t.ancestor.previousElementSibling:"next"===a&&(n=t.ancestor.nextElementSibling),n&&void 0!==n.dataset.modal)return t.closeModalInstance(),void n.click();"close"===e.target.dataset.modalAction&&t.closeModalInstance()},p=function(e){const a=e.querySelector("[ data-modal-action='prev' ]"),n=e.querySelector("[ data-modal-action='next' ]"),o=this.ancestor.previousElementSibling,i=this.ancestor.nextElementSibling;o?t.style.removeClass(a,"disable"):t.style.addClass(a,"disable"),i?t.style.removeClass(n,"disable"):t.style.addClass(n,"disable")}}(PULSE.app,PULSE.core,PULSE.app.common),function(e,t,a){const n="fade-up",o="is-loaded";t.PlaylistSlide=function(e,t,a){const n=this;e&&t&&a&&(n.container=e,n.data=t,n.config=a,n.data.items?n.coverItem=n.data.items.find((e=>e.coverItem)):n.coverItem=t,n.coverItem&&i.call(n))};const i=function(){const t=this,a={contentId:t.config.id,date:t.config.date,description:t.config.description,mediaId:t.config.mediaId||t.data.mediaId,title:t.config.title,playlistSize:t.data.items?t.data.items.length:0,subtitle:t.config.subtitle,data:t.coverItem,accountId:t.config.accountId,muted:t.config.muted,policyKey:t.config.policyKey,playerId:t.config.playerId};a.data.tags&&a.data.tags.length>0&&a.data.tags.forEach((e=>{e.label.startsWith("Premium:")&&(a.policyKey=t.config.policyKeyRestricted,a.playerId=t.config.playerIdRestricted)})),"video"===t.coverItem.type&&"OOYALA"==t.data.platform&&(a.mediaId=`ref:${a.mediaId}`),t.mainContent=t.container.querySelector(".js-modal-main"),t.mainContent.innerHTML=e.templating.render(a,"common.modal-gallery-main"),new e.LazyLoad(t.mainContent),s.call(t)},s=function(){const e=this;e.introImageContainer=e.mainContent.querySelector(".js-intro-image"),e.introImage=e.introImageContainer.querySelector(".js-lazy-load");new MutationObserver(r.bind(e)).observe(e.introImage,{attributes:!0,childList:!0,subtree:!0})},r=function(e,t){const n=this;for(let i=0;i{t&&c.call(e,t,n,100*(a+1))})),e.config.initiated&&"undefined"!==e.config.initiated||setTimeout((()=>{e.container.classList.add("hover"),setTimeout((()=>{e.container.classList.remove("hover")}),600)}),200)},c=function(e,t,a){setTimeout((()=>{e.classList.add(t)}),a)}}(PULSE.app,PULSE.app.common,PULSE.core),function(e,t){const a={GB:"UK",US:"USA",DE:"Germany",SG:"Singapore",HK:"Hong_Kong",CA:"Canada",IN:"India",NZ:"New Zealand",RU:"Russia",CN:"China",FJ:"Fiji",IT:"Italy",MX:"Mexico"};t.regionSelector=new class{constructor(){this.checkRegionInStore()}async getRegionsAndLocate(){const e=PULSE.app.redux.aflmContentApi,t=PULSE.app.redux.store,a=await fetch(`${window.location.origin}/cdn/locate`).then((e=>{const t=Object.fromEntries(e.headers.entries());return t["x-ak-es-country"]&&t["x-ak-es-region"]&&t["x-ak-es-city"]?{country:t["x-ak-es-country"],region:t["x-ak-es-region"],city:t["x-ak-es-city"]}:{country:"",region:"",city:""}})),n=await t.dispatch(e.endpoints.getRegions.initiate()).then((e=>e.data));return Promise.all([a,n])}async determineRegion(){const[e,t]=await this.getRegionsAndLocate(),n="AU"===e.country;if(n){const a=t.filter((t=>t.name.toUpperCase().startsWith(e.region.toUpperCase())));if(1===a.length)return a[0];if(a.length>1){const t=a.find((t=>t.name.toLowerCase().includes(e.city.toLowerCase())));if(t)return t;const n=a.find((t=>t.timezone.toLowerCase().includes(e.city.toLowerCase())));if(n)return n;const o=a.find((e=>e.name.toLowerCase().includes("regional")));return o||a[0]}if("TAS"===e.region)return t.find((e=>"tasmania"===e.name.toLowerCase()))}const o=t.find((t=>t.name.toLowerCase().includes(e.city.toLowerCase())));if(o)return o;const i=t.find((t=>{const n=a[e.country];return!!n&&t.name.toLowerCase().includes(n.toLowerCase())}));if(i)return i;const s=t.find((t=>t.timezone.toLowerCase().includes(e.city.toLowerCase())));if(s)return s;const r=t.find((t=>{const n=a[e.country];return!!n&&t.timezone.toLowerCase().includes(n.toLowerCase())}));if(r)return r;const l={aus:PULSE.I18N.lookup("default.region.aus"),international:PULSE.I18N.lookup("default.region.international")},c={aus:"default.region.aus"!==l.aus?l.aus:"melbourne",international:"default.region.international"!==l.international?l.international:"global"};return e.country&&n?t.find((e=>e.name.toLowerCase().includes(c.aus.toLowerCase()))):e.country?t.find((e=>e.name.toLowerCase().includes(c.international.toLowerCase()))):t.find((e=>e.name.toLowerCase().includes(c.aus.toLowerCase())))}async checkRegionInStore(){const e=t.siteSettings.getSingleSetting("region");let a={};const n=PULSE.core.localStorage.getStorage("userRegionInfo",!0);try{a=JSON.parse(n)}catch(e){PULSE.core.localStorage.clearStorage("userRegionInfo",!0)}let o;!e.id&&a.id&&a.timezone&&a.name?(t.siteSettings.set({[t.SITE_SETTINGS_CONFIG.region.key]:{timezone:a.timezone,name:a.name,id:a.id,location:t.modifyCountryDisplay(a.name)}}),PULSE.core.localStorage.clearStorage("userRegionInfo",!0)):e.name&&!e.location?t.siteSettings.set({[t.SITE_SETTINGS_CONFIG.region.key]:{...e,location:t.modifyCountryDisplay(e.name)}}):e.id||(o=await this.determineRegion(),t.siteSettings.set({[t.SITE_SETTINGS_CONFIG.region.key]:{...o}}))}}}(PULSE.app,PULSE.app.common),function(e,t,a){const n="will-animate",o=t.CONSTANTS.TRACKING.EVENTS;let i=[{namespace:"container"},{namespace:"slideContainer",type:"HTMLElement",selector:".js-slider"},{namespace:"sliderElements",type:"NodeList",selector:".js-slide"},{namespace:"nextButton",type:"HTMLElement",selector:".js-next-btn"},{namespace:"prevButton",type:"HTMLElement",selector:".js-prev-btn"},{namespace:"nudgeLeftClass",default:"nudge-left"},{namespace:"nudgeRightClass",default:"nudge-right"},{namespace:"pagerActiveClass",default:"is-active"},{namespace:"itemActiveClass",default:"item-active"},{namespace:"buttonHideClass",default:"u-hide"},{namespace:"paginationTemplate",default:"common.slider-pagination"},{namespace:"pagingControls",default:"false"},{namespace:"screenWidthRestriction",default:e.measurements.tablet},{namespace:"paginationRestrictionClass",default:"u-hide-until-tablet"},{namespace:"slideWidthIndex",default:0},{namespace:"snapSlider",default:"true"}];const s={root:null,rootMargin:"0px",threshold:[.1,.9]},r="is-inactive";t.Slider=function(e){this.sliderInitialised=!1,this.activeItemIndex,this.config=t.configChecker("common.Slider",e,i),this.config&&(this.observer=new IntersectionObserver(u.bind(this),s),this.observer.observe(this.config.container))},t.Slider.prototype.initSlider=function(){const e=this;if(l.call(this),0!==e.config.perPage){if(e.activeSlide=e.config.activeSlide||0,e.tabbableSlides=e.config.slideContainer.querySelectorAll(".js-focus-on-tab"),e.renderPagination(),e.sliderInitialised?e.setPagerListeners():e.setListeners(),e.slideTo(e.activeSlide),e.config.slideContainer.offsetWidth>e.itemWidth*e.config.sliderElements.length)return a.style.addClass(e.config.nextButton,e.config.buttonHideClass),a.style.addClass(e.config.prevButton,e.config.buttonHideClass),a.style.addClass(e.config.slideContainer,r),void("false"!==e.config.pagingControls&&a.style.addClass(e.config.pagingControls,r));a.style.removeClass(e.config.slideContainer,r),"false"!==e.config.pagingControls&&a.style.removeClass(e.config.pagingControls,r),e.sliderInitialised=!0,setTimeout((()=>{e.config.slideContainer.classList.add(n)}),0),t.event.dispatch(t.CONSTANTS.EVENTS.SLIDER.INITIALISED,{},e.config.container),e.trackingEvent={component_name:e.config.componentName||"",component_content_type:e.config.contentType||"",count:e.getNumberOfSlides()+1}}else console.error("Something went wrong with the slider for",e.config.container)},t.Slider.prototype.setListeners=function(){const t=this;t.config.nextButton.addEventListener("click",(function(){t.scrollNext(),e.tracking.recordEvent(o.CAROUSEL.EVENT_NAME,{eventData:{...t.trackingEvent,index:t.activeSlide+1,direction:o.CAROUSEL.DIRECTION.NEXT,type:o.CAROUSEL.TYPE.ARROW}})})),t.config.prevButton.addEventListener("click",(function(){t.scrollPrev(),e.tracking.recordEvent(o.CAROUSEL.EVENT_NAME,{eventData:{...t.trackingEvent,index:t.activeSlide+1,direction:o.CAROUSEL.DIRECTION.PREVIOUS,type:o.CAROUSEL.TYPE.ARROW}})})),t.tabbableSlides.forEach((e=>{e.addEventListener("focus",(function(e){const n=c(e.target),o=d(e.target);a.style.hasClass(e.target,"js-focus-on-tab")&&!n&&o&&t.scrollNext()})),e.addEventListener("keydown",(function(e){if(!e.shiftKey||"Tab"!==e.key)return;const a=c(e.target);!d(e.target)&&a&&t.scrollPrev()}))})),t.setPagerListeners(),t.lastWidth=window.innerWidth,a.event.windowResize.add({method:()=>{t.lastWidth!==window.innerWidth&&(t.resetSlider(t),t.lastWidth=window.innerWidth)}}),t.interval=null,t.config.slideContainer.addEventListener("scroll",(function(){t.interval||t.checkScroll()}))},t.Slider.prototype.setPagerListeners=function(){const t=this;if(t.config.pagerElements)for(let a=0;at.config.screenWidthRestriction?t.config.slideContainer.style.transform="translate3d( -"+t.slidePos+"px, 0, 0)":(t.config.slideContainer.style.transform="translate3d( 0, 0, 0)",t.config.slideContainer.scrollLeft=t.slidePos),t.config.paginationCallback&&t.config.paginationCallback(a),t.config.slideChangeCallback&&t.config.slideChangeCallback(t.activeSlide)},t.Slider.prototype.updateControls=function(){const e=this;if(e.activeSlide>=e.slideNum-1?a.style.addClass(e.config.nextButton,e.config.buttonHideClass):a.style.hasClass(e.config.nextButton,e.config.buttonHideClass)&&a.style.removeClass(e.config.nextButton,e.config.buttonHideClass),0===e.activeSlide?a.style.addClass(e.config.prevButton,e.config.buttonHideClass):a.style.hasClass(e.config.prevButton,e.config.buttonHideClass)&&a.style.removeClass(e.config.prevButton,e.config.buttonHideClass),e.config.pagerElements)for(let t=0;t{e.initSlider()}),0),t.event.dispatch(t.CONSTANTS.EVENTS.SLIDER.INITIALISED,{},e.config.container)},t.Slider.prototype.checkScroll=function(){const e=this;let t=e.config.slideContainer.scrollLeft;e.interval=setInterval((function(){let a=e.config.slideContainer.scrollLeft;if(a===t){clearInterval(e.interval),e.interval=null;const t=1.5;window.innerWidthm(e,this.config.slideContainer))).length||1,this.slidePos=0;const t=this.config.slideWidthIndex,a=this.config.sliderElements[t].getBoundingClientRect();this.itemWidth=a.width,this.slideWidth=this.itemWidth*this.config.perPage,this.slideNum=Math.ceil(this.config.sliderElements.length/this.config.perPage)},c=function(e){const t=e?.closest(".js-thumb")?.classList.contains("is-active");return t},d=function(e){let t=null;return e.closest(".js-thumb")?.previousElementSibling&&(t=e.closest(".js-thumb")?.previousElementSibling.classList?.contains("is-active")),t},m=function(e,t){const a=e.getBoundingClientRect(),n=t.getBoundingClientRect(),o=Math.ceil(a.left)>=Math.floor(n.left),i=Math.floor(a.right)<=Math.ceil(n.right);return o&&i},u=function(e){const t=this;Array.prototype.forEach.call(e,(function(e){const a=e.target;e.isIntersecting&&"true"!==a.dataset.calculationsComplete&&(t.initSlider(),a.dataset.calculationsComplete="true")}))}}(PULSE.app,PULSE.app.common,PULSE.core),function(e,t,a){const n=".js-copy-url",o=".js-copy-message",i=".js-expand",s=".js-close",r="is-open",l="u-hide",c="is-active",d="social-share__copy-message--fail";a.SharePage=function(e){const t=this;t.element=e,t.bodyContent=t.element.getAttribute("data-body"),t.copyBtn=t.element.querySelector(n),t.copyMessage=t.element.querySelector(o),t.url=t.element.getAttribute("data-link-to")?window.location.origin+t.element.getAttribute("data-link-to"):window.location.href,t.openButton=t.element.querySelector(i),t.closeButton=t.element.querySelector(s),t.setExpandableListeners(),t.setListeners()},a.SharePage.prototype.setExpandableListeners=function(){const e=this;a.addAriaClickListener(e.openButton,(()=>{navigator.share&&a.deviceHelper.isTouchScreen()?navigator.share({title:e.bodyContent,text:e.bodyContent,url:e.url}):e.element.classList.add(r)})),a.addAriaClickListener(e.closeButton,(function(){e.element.classList.remove(r)}))},a.SharePage.prototype.setListeners=function(){const t=this;a.addAriaClickListener(t.element,(a=>{const n=t.getSocialDataset(a.target);n&&n.socialService&&(e.socialHelpers[n.socialService].sharePage(window.location.href,!1,t.updateBodyContent()),t.element.classList.remove(r))})),document.queryCommandSupported("copy")?a.addAriaClickListener(t.copyBtn,(()=>t.copyUrl())):t.copyButton.classList.add(l)},a.SharePage.prototype.copyUrl=function(){const e=this,t=window.location.href;clipboard.writeText(t).then((()=>e.copyUrlMessage()),(()=>e.copyUrlMessage(!0)))},a.SharePage.prototype.copyUrlMessage=function(e){const t=this;t.copyBtn.classList.add(c),e&&(t.copyMessage.classList.add(d),t.copyMessage.innerHTML="URL could not be copied"),setTimeout((function(){t.copyBtn.classList.remove(c)}),2e3)},a.SharePage.prototype.getSocialDataset=function(e){const t=this;let a=e;if(t.element.getAttribute("data-social-service"))return t.element.dataset;do{if(a.getAttribute("data-social-service"))return a.dataset;a=a.parentElement}while(a!==t.element);return!1},a.SharePage.prototype.updateBodyContent=function(){return this.element.getAttribute("data-body")}}(PULSE.app,PULSE.core,PULSE.app.common),function(e){const t="twitter",a="facebook",n="googleplus",o="facebookMessenger",i=function(e){const t=this;t.name=e,t.socialLinks={twitter:{url:"http://www.twitter.com/intent/tweet?text="},facebook:{url:"http://www.facebook.com/sharer/sharer.php?u="},facebookMessenger:{url:"fb-messenger://share/?link="},googleplus:{url:"http://plus.google.com/share?url="},whatsapp:{url:"whatsapp://send?text="},email:{url:"mailto:?body="}},t.defaultWindowConfiguration={width:"500",height:"500",menubar:0,location:1,resizable:0,scrollbars:0,status:0,titlebar:0,toolbar:0}};i.prototype.buildShareUrl=function(e,i){const r=this,l=e||window.location.href,c=s(),d=r.socialLinks[r.name].url;switch(r.name){case a:case n:case o:return d+encodeURIComponent(l);case t:return i?d+encodeURIComponent(`${i} ${l}`):c?d+encodeURIComponent(`${c} ${l}`):d+encodeURIComponent(l);default:return c?d+encodeURIComponent(`${c} ${l}`):d+encodeURIComponent(`${i} ${l}`)}},i.prototype.makeWindowConfigString=function(e){const t=e||this.defaultWindowConfiguration;return Object.keys(t).reduce(((e,a)=>e+`${a}=${t[a]},`),[])},i.prototype.sharePage=function(e,t,a){const n=this.buildShareUrl(e,a),o=this.makeWindowConfigString(t);window.open(n,"_blank",o)};const s=()=>document.querySelector(".js-page-title");e.socialHelpers={twitter:new i(t),facebook:new i(a),google:new i(n),email:new i("email"),whatsapp:new i("whatsapp"),facebookMessenger:new i(o)}}(PULSE.app),PULSE.app.common.getCookie=function(e){let t=e+"=",a=document.cookie.split(";");for(let e=0;e{const a=Math.ceil(e),n=Math.floor(t);return Math.floor(Math.random()*(n-a+1)+a)},PULSE.app.common.scrollElementAnimated=function(e,t,a,n,o){let i,s=t.offsetTop;isNaN(a)||(s+=a),isNaN(n)&&(n=100);let r=s=s?s:r;let l=e.scrollTop+e.offsetHeight===e.scrollHeight;a>=s||l?(cancelAnimationFrame(i),"function"==typeof o&&o()):requestAnimationFrame(t)}))},PULSE.app.common.setCookie=function(e,t,a){const n=new Date;n.setTime(n.getTime()+24*a*60*60*1e3);let o="expires="+n.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"},function(e,t,a){e.Webview=function(){const e=this;"true"===a.url.getParam("webview")&&e.isWebview()},e.Webview.prototype.isWebview=function(){const e=document.getElementById("telstra-bar"),n=document.getElementById("main-navigation"),o=document.getElementById("main-content"),i=document.getElementById("footer-menu-v2"),s=document.getElementById("telstra-footer");a.style.addClass(e,t.U_HIDE),a.style.addClass(n,t.U_HIDE),a.style.addClass(o,"is-webview"),a.style.addClass(i,t.U_HIDE),a.style.addClass(s,t.U_HIDE)},e.webview=new e.Webview}(PULSE.app.common,PULSE.app.common.CONSTANTS,PULSE.core),window.isCommonLoaded=!0,window.dispatchEvent(new CustomEvent(PULSE.app.common.CONSTANTS.EVENTS.SCRIPTS.COMMON.LOADED));